diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 5008ddfcf..000000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.gitignore b/.gitignore index dbfee4de3..52a372cbb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ temp-cjsx node_modules +*.DS_Store +api.json diff --git a/api.json b/api.json deleted file mode 100644 index c2c78341c..000000000 --- a/api.json +++ /dev/null @@ -1,5237 +0,0 @@ -{ - "classes": { - "Account": { - "name": "Account", - "superClass": "Model", - "filename": "src/flux/models/account.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/models/account.coffee#L30", - "sections": [], - "classMethods": [], - "instanceMethods": [ - { - "name": "usesLabels", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/models/account.coffee#L57", - "visibility": "Public", - "summary": "The current organization_unit used by the account. ", - "description": "The current organization_unit used by the account. " - }, - { - "name": "displayProvider", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/models/account.coffee#L62", - "visibility": "Public", - "summary": "", - "description": "", - "returnValues": [ - { - "type": null, - "description": "Returns the localized, properly capitalized provider name,\nlike Gmail, Exchange, or Outlook 365" - } - ] - } - ], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "The Account model represents a Account served by the Nylas Platform API.\nEvery object on the Nylas platform exists within a Account, which typically represents\nan email account.", - "description": "The Account model represents a Account served by the Nylas Platform API.\nEvery object on the Nylas platform exists within a Account, which typically represents\nan email account.\n\nFor more information about Accounts on the Nylas Platform, read the\n[Account API Documentation](https://nylas.com/docs/api#Account)\n\n## Attributes\n\n`name`: {AttributeString} The name of the Account.\n\n`provider`: {AttributeString} The Account's mail provider (ie: `gmail`)\n\n`emailAddress`: {AttributeString} The Account's email address\n(ie: `ben@nylas.com`). Queryable.\n\n`organizationUnit`: {AttributeString} Either \"label\" or \"folder\".\nDepending on the provider, the account may be organized by folders or\nlabels.\n\nThis class also inherits attributes from {Model}\n\nSection: Models" - }, - "AccountStore": { - "name": "AccountStore", - "filename": "src/flux/stores/account-store.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/account-store.coffee#L20", - "sections": [], - "classMethods": [], - "instanceMethods": [ - { - "name": "items", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/account-store.coffee#L88", - "visibility": "Public", - "summary": "", - "description": "", - "returnValues": [ - { - "type": "Array", - "description": "Returns an {Array} of {Account} objects" - } - ] - }, - { - "name": "itemWithEmailAddress", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/account-store.coffee#L92", - "visibility": "Public", - "summary": "", - "description": "", - "returnValues": [ - { - "type": "Account", - "description": "Returns the {Account} for the given email address, or null." - } - ] - }, - { - "name": "current", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/account-store.coffee#L97", - "visibility": "Public", - "summary": "", - "description": "", - "returnValues": [ - { - "type": "Account", - "description": "Returns the currently active {Account}." - } - ] - } - ], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "The AccountStore listens to changes to the available accounts in\nthe database and exposes the currently active Account via {::current}", - "description": "The AccountStore listens to changes to the available accounts in\nthe database and exposes the currently active Account via {::current}\n\nSection: Stores" - }, - "Actions": { - "name": "Actions", - "filename": "src/flux/actions.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L59", - "sections": [], - "classMethods": [], - "instanceMethods": [], - "classProperties": [ - { - "name": "didPassivelyReceiveNewModels", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L75", - "visibility": "Public", - "summary": "Fired when the Nylas API Connector receives new data from the API.", - "description": "Fired when the Nylas API Connector receives new data from the API.\n\n*Scope: Global*\n\nReceives an {Object} of {Array}s of {Model}s, for example:\n\n```json\n{\n 'thread': [, ]\n 'contact': []\n}\n```" - }, - { - "name": "queueTask", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L92", - "visibility": "Public", - "summary": "Queue a {Task} object to the {TaskQueue}.", - "description": "Queue a {Task} object to the {TaskQueue}.\n\n*Scope: Work Window*" - }, - { - "name": "dequeueAllTasks", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L101", - "visibility": "Public", - "summary": "Dequeue all {Task}s from the {TaskQueue}. Use with care.", - "description": "Dequeue all {Task}s from the {TaskQueue}. Use with care.\n\n*Scope: Work Window*" - }, - { - "name": "dequeueMatchingTask", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L109", - "visibility": "Public", - "summary": "Dequeue a {Task} matching the description provided.", - "description": "Dequeue a {Task} matching the description provided.\n\n*Scope: Work Window*" - }, - { - "name": "retryInitialSync", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L126", - "visibility": "Public", - "summary": "Retry the initial sync", - "description": "Retry the initial sync\n\n*Scope: Work Window*" - }, - { - "name": "openPreferences", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L134", - "visibility": "Public", - "summary": "Open the preferences window. Pass an object with a tab name\n(ie: `{tab: 'Accounts'}`) to open a specific panel.", - "description": "Open the preferences window. Pass an object with a tab name\n(ie: `{tab: 'Accounts'}`) to open a specific panel.\n\n*Scope: Window*" - }, - { - "name": "registerPreferencesTab", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L141", - "visibility": "Public", - "summary": "Register a preferences tab, usually applied in Preferences window", - "description": "Register a preferences tab, usually applied in Preferences window\n\n*Scope: Window*" - }, - { - "name": "clearDeveloperConsole", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L148", - "visibility": "Public", - "summary": "Clear the developer console for the current window.", - "description": "Clear the developer console for the current window.\n\n*Scope: Window*" - }, - { - "name": "selectAccountId", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L155", - "visibility": "Public", - "summary": "Select the provided account ID in the current window.", - "description": "Select the provided account ID in the current window.\n\n*Scope: Window*" - }, - { - "name": "selectRootSheet", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L167", - "visibility": "Public", - "summary": "Select the provided sheet in the current window. This action changes\nthe top level sheet.", - "description": "Select the provided sheet in the current window. This action changes\nthe top level sheet.\n\n*Scope: Window*\n\n```\nActions.selectRootSheet(WorkspaceStore.Sheet.Threads)\n```" - }, - { - "name": "toggleWorkspaceLocationHidden", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L177", - "visibility": "Public", - "summary": "Toggle whether a particular column is visible. Call this action\nwith one of the Sheet location constants:", - "description": "Toggle whether a particular column is visible. Call this action\nwith one of the Sheet location constants:\n\n```\nActions.toggleWorkspaceLocationHidden(WorkspaceStore.Location.MessageListSidebar)\n```" - }, - { - "name": "setCursorPosition", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L190", - "visibility": "Public", - "summary": "Focus the keyboard on an item in a collection. This action moves the\n`keyboard focus` element in lists and other components, but does not change\nthe focused DOM element.", - "description": "Focus the keyboard on an item in a collection. This action moves the\n`keyboard focus` element in lists and other components, but does not change\nthe focused DOM element.\n\n*Scope: Window*\n\n```\nActions.setCursorPosition(collection: 'thread', item: )\n```" - }, - { - "name": "setFocus", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L202", - "visibility": "Public", - "summary": "Focus on an item in a collection. This action changes the selection\nin lists and other components, but does not change the focused DOM element.", - "description": "Focus on an item in a collection. This action changes the selection\nin lists and other components, but does not change the focused DOM element.\n\n*Scope: Window*\n\n```\nActions.setFocus(collection: 'thread', item: )\n```" - }, - { - "name": "focusMailView", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L213", - "visibility": "Public", - "summary": "Focus the interface on a specific {Category}.", - "description": "Focus the interface on a specific {Category}.\n\n*Scope: Window*\n\n```\nActions.focusMailView()\n```" - }, - { - "name": "toggleMessageIdExpanded", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L226", - "visibility": "Public", - "summary": "If the message with the provided id is currently beign displayed in the\nthread view, this action toggles whether it's full content or snippet is shown.", - "description": "If the message with the provided id is currently beign displayed in the\nthread view, this action toggles whether it's full content or snippet is shown.\n\n*Scope: Window*\n\n```\nmessage = \nActions.toggleMessageIdExpanded(message.id)\n```" - }, - { - "name": "composeReply", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L243", - "visibility": "Public", - "summary": "Create a new reply to the provided threadId and messageId. Note that\nthis action does not focus on the thread, so you may not be able to see the new draft\nunless you also call {::setFocus}.", - "description": "Create a new reply to the provided threadId and messageId. Note that\nthis action does not focus on the thread, so you may not be able to see the new draft\nunless you also call {::setFocus}.\n\n*Scope: Window*\n\n```\n# Compose a reply to the last message in the thread\nActions.composeReply({threadId: '123'})\n\n# Compose a reply to a specific message in the thread\nActions.composeReply({threadId: '123', messageId: '123'})\n```" - }, - { - "name": "composeForward", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L251", - "visibility": "Public", - "summary": "Create a new draft for forwarding the provided threadId and messageId. See\n{::composeReply} for parameters and behavior.", - "description": "Create a new draft for forwarding the provided threadId and messageId. See\n{::composeReply} for parameters and behavior.\n\n*Scope: Window*" - }, - { - "name": "composeReplyAll", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L259", - "visibility": "Public", - "summary": "Create a new draft and \"reply all\" to the provided threadId and messageId. See\n{::composeReply} for parameters and behavior.", - "description": "Create a new draft and \"reply all\" to the provided threadId and messageId. See\n{::composeReply} for parameters and behavior.\n\n*Scope: Window*" - }, - { - "name": "composePopoutDraft", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L272", - "visibility": "Public", - "summary": "Pop out the draft with the provided ID so the user can edit it in another\nwindow.", - "description": "Pop out the draft with the provided ID so the user can edit it in another\nwindow.\n\n*Scope: Window*\n\n```\nmessageId = '123'\nActions.composePopoutDraft(messageId)\n```" - }, - { - "name": "composeNewBlankDraft", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L283", - "visibility": "Public", - "summary": "Open a new composer window for creating a new draft from scratch.", - "description": "Open a new composer window for creating a new draft from scratch.\n\n*Scope: Window*\n\n```\nActions.composeNewBlankDraft()\n```" - }, - { - "name": "sendDraft", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L297", - "visibility": "Public", - "summary": "Send the draft with the given ID. This Action is handled by the {DraftStore},\nwhich finalizes the {DraftChangeSet} and allows {DraftStoreExtension}s to display\nwarnings and do post-processing. To change send behavior, you should consider using\none of these objects rather than listening for the {sendDraft} action.", - "description": "Send the draft with the given ID. This Action is handled by the {DraftStore},\nwhich finalizes the {DraftChangeSet} and allows {DraftStoreExtension}s to display\nwarnings and do post-processing. To change send behavior, you should consider using\none of these objects rather than listening for the {sendDraft} action.\n\n*Scope: Window*\n\n```\nActions.sendDraft('123')\n```" - }, - { - "name": "destroyDraft", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L305", - "visibility": "Public", - "summary": "Destroys the draft with the given ID. This Action is handled by the {DraftStore},\nand does not display any confirmation UI.", - "description": "Destroys the draft with the given ID. This Action is handled by the {DraftStore},\nand does not display any confirmation UI.\n\n*Scope: Window*" - }, - { - "name": "removeCurrentlyFocusedThread", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L312", - "visibility": "Public", - "summary": "Remove the currently focused {Thread}.", - "description": "Remove the currently focused {Thread}.\n\n*Scope: Window*" - }, - { - "name": "removeSelection", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L319", - "visibility": "Public", - "summary": "Removes the Thread objects currently selected in the app's main thread list.", - "description": "Removes the Thread objects currently selected in the app's main thread list.\n\n*Scope: Window*" - }, - { - "name": "searchQueryChanged", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L339", - "visibility": "Public", - "summary": "Updates the search query in the app's main search bar with the provided query text.", - "description": "Updates the search query in the app's main search bar with the provided query text.\n\n*Scope: Window*\n\n```\nActions.searchQueryChanged(\"New Search Query\")\n```" - }, - { - "name": "searchQueryCommitted", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L351", - "visibility": "Public", - "summary": "Submits a search with the provided query text. Unlike `searchQueryChanged`, this\naction immediately performs a search.", - "description": "Submits a search with the provided query text. Unlike `searchQueryChanged`, this\naction immediately performs a search.\n\n*Scope: Window*\n\n```\nActions.searchQueryCommitted(\"New Search Query\")\n```" - }, - { - "name": "RSVPEvent", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L360", - "visibility": "Public", - "summary": "Submits the user's response to an RSVP event.", - "description": "Submits the user's response to an RSVP event.\n\n*Scope: Window*" - }, - { - "name": "postNotification", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L391", - "visibility": "Public", - "summary": "Fire to display an in-window notification to the user in the app's standard\nnotification interface.", - "description": "Fire to display an in-window notification to the user in the app's standard\nnotification interface.\n\n*Scope: Global*\n\n```\n# A simple notification\nActions.postNotification({message: \"Removed Thread\", type: 'success'})\n\n# A sticky notification with actions\nNOTIF_ACTION_YES = 'YES'\nNOTIF_ACTION_NO = 'NO'\n\nActions.postNotification\n type: 'info',\n sticky: true\n message: \"Thanks for trying out N1! Would you like to make it your default mail client?\",\n icon: 'fa-inbox',\n actions: [{\n label: 'Yes'\n id: NOTIF_ACTION_YES\n },{\n label: 'Not Now'\n id: NOTIF_ACTION_NO\n }]\n```" - }, - { - "name": "notificationActionTaken", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L407", - "visibility": "Public", - "summary": "Listen to this action to handle user interaction with notifications you\npublished via `postNotification`.", - "description": "Listen to this action to handle user interaction with notifications you\npublished via `postNotification`.\n\n*Scope: Global*\n\n```\n@_unlisten = Actions.notificationActionTaken.listen(@_onActionTaken, @)\n\n_onActionTaken: ({notification, action}) ->\n if action.id is NOTIF_ACTION_YES\n # perform action\n```" - }, - { - "name": "removeFile", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L429", - "visibility": "Public", - "summary": "Remove a file from a draft.", - "description": "Remove a file from a draft.\n\n*Scope: Window*\n\n```\nActions.removeFile\n file: fileObject\n messageClientId: draftClientId\n```" - }, - { - "name": "popSheet", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L448", - "visibility": "Public", - "summary": "Pop the current sheet off the Sheet stack maintained by the {WorkspaceStore}.\nThis action has no effect if the window is currently showing a root sheet.", - "description": "Pop the current sheet off the Sheet stack maintained by the {WorkspaceStore}.\nThis action has no effect if the window is currently showing a root sheet.\n\n*Scope: Window*" - }, - { - "name": "pushSheet", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/actions.coffee#L466", - "visibility": "Public", - "summary": "Push a sheet of a specific type onto the Sheet stack maintained by the\n{WorkspaceStore}. Note that sheets have no state. To show a *specific* thread,\nyou should push a Thread sheet and call `setFocus` to select the thread.", - "description": "Push a sheet of a specific type onto the Sheet stack maintained by the\n{WorkspaceStore}. Note that sheets have no state. To show a *specific* thread,\nyou should push a Thread sheet and call `setFocus` to select the thread.\n\n*Scope: Window*\n\n```\nWorkspaceStore.defineSheet 'Thread', {},\n list: ['MessageList', 'MessageListSidebar']\n\n...\n\n@pushSheet(WorkspaceStore.Sheet.Thread)\n```" - } - ], - "instanceProperties": [], - "visibility": "Public", - "summary": "In the Flux {Architecture.md}, almost every user action\nis translated into an Action object and fired globally. Stores in the app observe\nthese actions and perform business logic. This loose coupling means that your\npackages can observe actions and perform additional logic, or fire actions which\nthe rest of the app will handle.", - "description": "In the Flux {Architecture.md}, almost every user action\nis translated into an Action object and fired globally. Stores in the app observe\nthese actions and perform business logic. This loose coupling means that your\npackages can observe actions and perform additional logic, or fire actions which\nthe rest of the app will handle.\n\nIn Reflux, each {Action} is an independent object that acts as an event emitter.\nYou can listen to an Action, or invoke it as a function to fire it.\n\n## Action Scopes\n\nN1 is a multi-window application. The `scope` of an Action dictates\nhow it propogates between windows.\n\n* **Global**: These actions can be listened to from any window and fired from any\n window. The action is sent from the originating window to all other windows via\n IPC, so they should be used with care. Firing this action from anywhere will\n cause all listeners in all windows to fire.\n* **Main Window**: You can fire these actions in any window. They'll be sent\n to the main window and triggered there.\n* **Window**: These actions only trigger listeners in the window they're fired in.\n\n## Firing Actions\n\n```coffee\nActions.postNotification({message: \"Removed Thread\", type: 'success'})\n\nActions.queueTask(new ChangeStarredTask(thread: @_thread, starred: true))\n```\n\n## Listening for Actions\n\nIf you're using Reflux to create your own Store, you can use the `listenTo`\nconvenience method to listen for an Action. If you're creating your own class\nthat is not a Store, you can still use the `listen` method provided by Reflux:\n\n```coffee\nsetup: ->\n @unlisten = Actions.didPassivelyReceiveNewModels.listen(@onNewMailReceived, @)\n\nonNewMailReceived: (data) ->\n console.log(\"You've got mail!\", data)\n\nteardown: ->\n @unlisten()\n```\n\nSection: General" - }, - "Atom": { - "name": "Atom", - "superClass": "Model", - "filename": "src/atom.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L25", - "sections": [ - { - "name": "Properties", - "description": "" - }, - { - "name": "Event Subscription", - "description": "" - }, - { - "name": "Atom Details", - "description": "" - }, - { - "name": "Managing The Atom Window", - "description": "" - }, - { - "name": "Messaging the User", - "description": "" - }, - { - "name": "Managing the Dev Tools", - "description": "" - } - ], - "classMethods": [], - "instanceMethods": [ - { - "name": "onDidBeep", - "sectionName": "Event Subscription", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L293", - "visibility": "Extended", - "summary": "Invoke the given callback whenever {::beep} is called.", - "description": "Invoke the given callback whenever {::beep} is called.", - "arguments": [ - { - "name": "callback", - "description": "{Function} to be called whenever {::beep} is called.", - "type": "Function", - "isOptional": false - } - ], - "returnValues": [ - { - "type": "Disposable", - "description": "Returns a {Disposable} on which `.dispose()` can be called to unsubscribe." - } - ] - }, - { - "name": "onWillThrowError", - "sectionName": "Event Subscription", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L309", - "visibility": "Extended", - "summary": "Invoke the given callback when there is an unhandled error, but\nbefore the devtools pop open", - "description": "Invoke the given callback when there is an unhandled error, but\nbefore the devtools pop open", - "arguments": [ - { - "children": [ - { - "children": [ - { - "name": "originalError", - "description": "{Object} the original error object", - "type": "Object", - "isOptional": false - }, - { - "name": "message", - "description": "{String} the original error object", - "type": "String", - "isOptional": false - }, - { - "name": "url", - "description": "{String} Url to the file where the error originated.", - "type": "String", - "isOptional": false - }, - { - "name": "line", - "description": "{Number}", - "type": "Number", - "isOptional": false - }, - { - "name": "column", - "description": "{Number}", - "type": "Number", - "isOptional": false - }, - { - "name": "preventDefault", - "description": "{Function} call this to avoid popping up the dev tools.", - "type": "Function", - "isOptional": false - } - ], - "name": "event", - "description": "{Object}", - "type": "Object", - "isOptional": false - } - ], - "name": "callback", - "description": "{Function} to be called whenever there is an unhandled error", - "type": "Function", - "isOptional": false - } - ], - "returnValues": [ - { - "type": "Disposable", - "description": "Returns a {Disposable} on which `.dispose()` can be called to unsubscribe." - } - ] - }, - { - "name": "onDidThrowError", - "sectionName": "Event Subscription", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L323", - "visibility": "Extended", - "summary": "Invoke the given callback whenever there is an unhandled error.", - "description": "Invoke the given callback whenever there is an unhandled error.", - "arguments": [ - { - "children": [ - { - "children": [ - { - "name": "originalError", - "description": "{Object} the original error object", - "type": "Object", - "isOptional": false - }, - { - "name": "message", - "description": "{String} the original error object", - "type": "String", - "isOptional": false - }, - { - "name": "url", - "description": "{String} Url to the file where the error originated.", - "type": "String", - "isOptional": false - }, - { - "name": "line", - "description": "{Number}", - "type": "Number", - "isOptional": false - }, - { - "name": "column", - "description": "{Number}", - "type": "Number", - "isOptional": false - } - ], - "name": "event", - "description": "{Object}", - "type": "Object", - "isOptional": false - } - ], - "name": "callback", - "description": "{Function} to be called whenever there is an unhandled error", - "type": "Function", - "isOptional": false - } - ], - "returnValues": [ - { - "type": "Disposable", - "description": "Returns a {Disposable} on which `.dispose()` can be called to unsubscribe." - } - ] - }, - { - "name": "trace", - "sectionName": "Event Subscription", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L331", - "visibility": "Extended", - "summary": "Run the Chromium content-tracing module for five seconds, and save\nthe output to a file which is printed to the command-line output of the app.\nYou can take the file exported by this function and load it into Chrome's\ncontent trace visualizer (chrome://tracing). It's like Chromium Developer\nTools Profiler, but for all processes and threads. ", - "description": "Run the Chromium content-tracing module for five seconds, and save\nthe output to a file which is printed to the command-line output of the app.\nYou can take the file exported by this function and load it into Chrome's\ncontent trace visualizer (chrome://tracing). It's like Chromium Developer\nTools Profiler, but for all processes and threads. " - }, - { - "name": "inDevMode", - "sectionName": "Atom Details", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L353", - "visibility": "Public", - "summary": "Is the current window in development mode? ", - "description": "Is the current window in development mode? " - }, - { - "name": "inSafeMode", - "sectionName": "Atom Details", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L357", - "visibility": "Public", - "summary": "Is the current window in safe mode? ", - "description": "Is the current window in safe mode? " - }, - { - "name": "inSpecMode", - "sectionName": "Atom Details", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L361", - "visibility": "Public", - "summary": "Is the current window running specs? ", - "description": "Is the current window running specs? " - }, - { - "name": "getVersion", - "sectionName": "Atom Details", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L367", - "visibility": "Public", - "summary": "Get the version of the Atom application.", - "description": "Get the version of the Atom application.", - "returnValues": [ - { - "type": "String", - "description": "Returns the version text {String}." - } - ] - }, - { - "name": "isReleasedVersion", - "sectionName": "Atom Details", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L371", - "visibility": "Public", - "summary": "Determine whether the current version is an official release. ", - "description": "Determine whether the current version is an official release. " - }, - { - "name": "getWindowLoadTime", - "sectionName": "Atom Details", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L387", - "visibility": "Public", - "summary": "Get the time taken to completely load the current window.", - "description": "Get the time taken to completely load the current window.\n\nThis time include things like loading and activating packages, creating\nDOM elements for the editor, and reading the config.", - "returnValues": [ - { - "type": "Number", - "description": "Returns the {Number} of milliseconds taken to load the window or null\nif the window hasn't finished loading yet." - } - ] - }, - { - "name": "close", - "sectionName": "Managing The Atom Window", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L401", - "visibility": "Essential", - "summary": "Close the current window. ", - "description": "Close the current window. " - }, - { - "name": "getSize", - "sectionName": "Managing The Atom Window", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L410", - "visibility": "Essential", - "summary": "Get the size of current window.", - "description": "Get the size of current window.", - "returnValues": [ - { - "type": "Object", - "description": "Returns an {Object} in the format `{width: 1000, height: 700}`" - } - ] - }, - { - "name": "setSize", - "sectionName": "Managing The Atom Window", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L418", - "visibility": "Essential", - "summary": "Set the size of current window.", - "description": "Set the size of current window.", - "arguments": [ - { - "name": "width", - "description": "The {Number} of pixels.", - "type": "Number", - "isOptional": false - }, - { - "name": "height", - "description": "The {Number} of pixels. ", - "type": "Number", - "isOptional": false - } - ] - }, - { - "name": "setSizeAnimated", - "sectionName": "Managing The Atom Window", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L426", - "visibility": "Essential", - "summary": "Transition and set the size of the current window.", - "description": "Transition and set the size of the current window.", - "arguments": [ - { - "name": "width", - "description": "The {Number} of pixels.", - "type": "Number", - "isOptional": false - }, - { - "name": "height", - "description": "The {Number} of pixels.", - "type": "Number", - "isOptional": false - }, - { - "name": "duration", - "description": "The {Number} of pixels. ", - "type": "Number", - "isOptional": false - } - ] - }, - { - "name": "getPosition", - "sectionName": "Managing The Atom Window", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L457", - "visibility": "Essential", - "summary": "Get the position of current window.", - "description": "Get the position of current window.", - "returnValues": [ - { - "type": "Object", - "description": "Returns an {Object} in the format `{x: 10, y: 20}`" - } - ] - }, - { - "name": "setPosition", - "sectionName": "Managing The Atom Window", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L465", - "visibility": "Essential", - "summary": "Set the position of current window.", - "description": "Set the position of current window.", - "arguments": [ - { - "name": "x", - "description": "The {Number} of pixels.", - "type": "Number", - "isOptional": false - }, - { - "name": "y", - "description": "The {Number} of pixels. ", - "type": "Number", - "isOptional": false - } - ] - }, - { - "name": "center", - "sectionName": "Managing The Atom Window", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L473", - "visibility": "Extended", - "summary": "Move current window to the center of the screen. ", - "description": "Move current window to the center of the screen. " - }, - { - "name": "focus", - "sectionName": "Managing The Atom Window", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L477", - "visibility": "Extended", - "summary": "Focus the current window. ", - "description": "Focus the current window. " - }, - { - "name": "show", - "sectionName": "Managing The Atom Window", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L482", - "visibility": "Extended", - "summary": "Show the current window. ", - "description": "Show the current window. " - }, - { - "name": "hide", - "sectionName": "Managing The Atom Window", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L489", - "visibility": "Extended", - "summary": "Hide the current window. ", - "description": "Hide the current window. " - }, - { - "name": "reload", - "sectionName": "Managing The Atom Window", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L493", - "visibility": "Extended", - "summary": "Reload the current window. ", - "description": "Reload the current window. " - }, - { - "name": "getWindowProps", - "sectionName": "Managing The Atom Window", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L511", - "visibility": "Public", - "summary": "The windowProps passed when creating the window via `newWindow`.", - "description": "The windowProps passed when creating the window via `newWindow`." - }, - { - "name": "onWindowPropsReceived", - "sectionName": "Managing The Atom Window", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L521", - "visibility": "Public", - "summary": "If your package declares hot-loaded window types, `onWindowPropsReceived`\nfires when your hot-loaded window is about to be shown so you can update\ncomponents to reflect the new window props.", - "description": "If your package declares hot-loaded window types, `onWindowPropsReceived`\nfires when your hot-loaded window is about to be shown so you can update\ncomponents to reflect the new window props.\n\n* callback: A function to call when window props are received, just before\n the hot window is shown. The first parameter is the new windowProps." - }, - { - "name": "isMaximixed", - "sectionName": "Managing The Atom Window", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L525", - "visibility": "Extended", - "summary": "Is the current window maximized? ", - "description": "Is the current window maximized? " - }, - { - "name": "isFullScreen", - "sectionName": "Managing The Atom Window", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L535", - "visibility": "Extended", - "summary": "Is the current window in full screen mode? ", - "description": "Is the current window in full screen mode? " - }, - { - "name": "setFullScreen", - "sectionName": "Managing The Atom Window", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L539", - "visibility": "Extended", - "summary": "Set the full screen state of the current window. ", - "description": "Set the full screen state of the current window. " - }, - { - "name": "toggleFullScreen", - "sectionName": "Managing The Atom Window", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L544", - "visibility": "Extended", - "summary": "Toggle the full screen state of the current window. ", - "description": "Toggle the full screen state of the current window. " - }, - { - "name": "beep", - "sectionName": "Messaging the User", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L698", - "visibility": "Essential", - "summary": "Visually and audibly trigger a beep. ", - "description": "Visually and audibly trigger a beep. " - }, - { - "name": "confirm", - "sectionName": "Messaging the User", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L730", - "visibility": "Essential", - "summary": "A flexible way to open a dialog akin to an alert dialog.", - "description": "A flexible way to open a dialog akin to an alert dialog.", - "arguments": [ - { - "children": [ - { - "name": "message", - "description": "The {String} message to display.", - "type": "String", - "isOptional": false - }, - { - "name": "detailedMessage", - "description": "The {String} detailed message to display.", - "type": "String", - "isOptional": true - }, - { - "name": "buttons", - "description": "Either an array of strings or an object where keys are button names and the values are callbacks to invoke when clicked.", - "type": null, - "isOptional": true - } - ], - "name": "options", - "description": "An {Object} with the following keys:", - "type": "Object", - "isOptional": false - } - ], - "examples": [ - { - "description": "", - "lang": "coffee", - "code": "atom.confirm\n message: 'How you feeling?'\n detailedMessage: 'Be honest.'\n buttons:\n Good: -> window.alert('good to hear')\n Bad: -> window.alert('bummer')", - "raw": "```coffee\natom.confirm\n message: 'How you feeling?'\n detailedMessage: 'Be honest.'\n buttons:\n Good: -> window.alert('good to hear')\n Bad: -> window.alert('bummer')\n```" - } - ], - "returnValues": [ - { - "type": "Number", - "description": "Returns the chosen button index {Number} if the buttons option was an array." - } - ] - }, - { - "name": "openDevTools", - "sectionName": "Managing the Dev Tools", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L755", - "visibility": "Extended", - "summary": "Open the dev tools for the current window. ", - "description": "Open the dev tools for the current window. " - }, - { - "name": "toggleDevTools", - "sectionName": "Managing the Dev Tools", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L759", - "visibility": "Extended", - "summary": "Toggle the visibility of the dev tools for the current window. ", - "description": "Toggle the visibility of the dev tools for the current window. " - }, - { - "name": "executeJavaScriptInDevTools", - "sectionName": "Managing the Dev Tools", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L763", - "visibility": "Extended", - "summary": "Execute code in dev tools. ", - "description": "Execute code in dev tools. " - } - ], - "classProperties": [], - "instanceProperties": [ - { - "name": "commands", - "sectionName": "Properties", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L99", - "visibility": "Public", - "summary": "A {CommandRegistry} instance ", - "description": "A {CommandRegistry} instance " - }, - { - "name": "config", - "sectionName": "Properties", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L102", - "visibility": "Public", - "summary": "A {Config} instance ", - "description": "A {Config} instance " - }, - { - "name": "clipboard", - "sectionName": "Properties", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L105", - "visibility": "Public", - "summary": "A {Clipboard} instance ", - "description": "A {Clipboard} instance " - }, - { - "name": "menu", - "sectionName": "Properties", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L108", - "visibility": "Public", - "summary": "A {MenuManager} instance ", - "description": "A {MenuManager} instance " - }, - { - "name": "keymaps", - "sectionName": "Properties", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L111", - "visibility": "Public", - "summary": "A {KeymapManager} instance ", - "description": "A {KeymapManager} instance " - }, - { - "name": "packages", - "sectionName": "Properties", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L114", - "visibility": "Public", - "summary": "A {PackageManager} instance ", - "description": "A {PackageManager} instance " - }, - { - "name": "themes", - "sectionName": "Properties", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L117", - "visibility": "Public", - "summary": "A {ThemeManager} instance ", - "description": "A {ThemeManager} instance " - }, - { - "name": "styles", - "sectionName": "Properties", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/atom.coffee#L120", - "visibility": "Public", - "summary": "A {StyleManager} instance ", - "description": "A {StyleManager} instance " - } - ], - "visibility": "Essential", - "summary": "Atom global for dealing with packages, themes, menus, and the window.", - "description": "Atom global for dealing with packages, themes, menus, and the window.\n\nThe singleton of this class is always available as the `atom` global. " - }, - "Attribute": { - "name": "Attribute", - "filename": "src/flux/attributes/attribute.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/attributes/attribute.coffee#L13", - "sections": [], - "classMethods": [], - "instanceMethods": [ - { - "name": "equal", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/attributes/attribute.coffee#L21", - "visibility": "Public", - "summary": "", - "description": "", - "returnValues": [ - { - "type": "Matcher", - "description": "Returns a {Matcher} for objects `=` to the provided value." - } - ] - }, - { - "name": "in", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/attributes/attribute.coffee#L27", - "visibility": "Public", - "summary": "", - "description": "", - "returnValues": [ - { - "type": "Matcher", - "description": "Returns a {Matcher} for objects `=` to the provided value." - } - ] - }, - { - "name": "not", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/attributes/attribute.coffee#L34", - "visibility": "Public", - "summary": "", - "description": "", - "returnValues": [ - { - "type": "Matcher", - "description": "Returns a {Matcher} for objects `!=` to the provided value." - } - ] - }, - { - "name": "descending", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/attributes/attribute.coffee#L40", - "visibility": "Public", - "summary": "", - "description": "", - "returnValues": [ - { - "type": "SortOrder", - "description": "Returns a descending {SortOrder} for this attribute." - } - ] - }, - { - "name": "ascending", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/attributes/attribute.coffee#L44", - "visibility": "Public", - "summary": "", - "description": "", - "returnValues": [ - { - "type": "SortOrder", - "description": "Returns an ascending {SortOrder} for this attribute." - } - ] - } - ], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "The Attribute class represents a single model attribute, like 'account_id'.\nSubclasses of {Attribute} like {AttributeDateTime} know how to covert between\nthe JSON representation of that type and the javascript representation.\nThe Attribute class also exposes convenience methods for generating {Matcher} objects.", - "description": "The Attribute class represents a single model attribute, like 'account_id'.\nSubclasses of {Attribute} like {AttributeDateTime} know how to covert between\nthe JSON representation of that type and the javascript representation.\nThe Attribute class also exposes convenience methods for generating {Matcher} objects.\n\nSection: Database" - }, - "AttributeBoolean": { - "name": "AttributeBoolean", - "superClass": "Attribute", - "filename": "src/flux/attributes/attribute-boolean.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/attributes/attribute-boolean.coffee#L13", - "sections": [], - "classMethods": [], - "instanceMethods": [], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "The value of this attribute is always a boolean. Null values are coerced to false.", - "description": "The value of this attribute is always a boolean. Null values are coerced to false.\n\nString attributes can be queries using `equal` and `not`. Matching on\n`greaterThan` and `lessThan` is not supported.\n\nSection: Database" - }, - "AttributeCollection": { - "name": "AttributeCollection", - "superClass": "Attribute", - "filename": "src/flux/attributes/attribute-collection.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/attributes/attribute-collection.coffee#L34", - "sections": [], - "classMethods": [], - "instanceMethods": [ - { - "name": "contains", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/attributes/attribute-collection.coffee#L68", - "visibility": "Public", - "summary": "", - "description": "", - "returnValues": [ - { - "type": "Matcher", - "description": "Returns a {Matcher} for objects containing the provided value." - } - ] - } - ], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "Collection attributes provide basic support for one-to-many relationships.\nFor example, Threads in N1 have a collection of Labels or Folders.", - "description": "Collection attributes provide basic support for one-to-many relationships.\nFor example, Threads in N1 have a collection of Labels or Folders.\n\nWhen Collection attributes are marked as `queryable`, the DatabaseStore\nautomatically creates a join table and maintains it as you create, save,\nand delete models. When you call `persistModel`, entries are added to the\njoin table associating the ID of the model with the IDs of models in the collection.\n\nCollection attributes have an additional clause builder, `contains`:\n\n```coffee\nDatabaseStore.findAll(Thread).where([Thread.attributes.labels.contains('inbox')])\n```\n\nThis is equivalent to writing the following SQL:\n\n```sql\nSELECT `Thread`.`data` FROM `Thread`\nINNER JOIN `Thread-Label` AS `M1` ON `M1`.`id` = `Thread`.`id`\nWHERE `M1`.`value` = 'inbox'\nORDER BY `Thread`.`last_message_received_timestamp` DESC\n```\n\nThe value of this attribute is always an array of other model objects.\n\nSection: Database" - }, - "AttributeDateTime": { - "name": "AttributeDateTime", - "superClass": "Attribute", - "filename": "src/flux/attributes/attribute-datetime.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/attributes/attribute-datetime.coffee#L10", - "sections": [], - "classMethods": [], - "instanceMethods": [ - { - "name": "greaterThan", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/attributes/attribute-datetime.coffee#L24", - "visibility": "Public", - "summary": "", - "description": "", - "returnValues": [ - { - "type": "Matcher", - "description": "Returns a {Matcher} for objects greater than the provided value." - } - ] - }, - { - "name": "lessThan", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/attributes/attribute-datetime.coffee#L30", - "visibility": "Public", - "summary": "", - "description": "", - "returnValues": [ - { - "type": "Matcher", - "description": "Returns a {Matcher} for objects less than the provided value." - } - ] - } - ], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "The value of this attribute is always a Javascript `Date`, or `null`.", - "description": "The value of this attribute is always a Javascript `Date`, or `null`.\n\nSection: Database" - }, - "AttributeJoinedData": { - "name": "AttributeJoinedData", - "superClass": "Attribute", - "filename": "src/flux/attributes/attribute-joined-data.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/attributes/attribute-joined-data.coffee#L35", - "sections": [], - "classMethods": [], - "instanceMethods": [], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "Joined Data attributes allow you to store certain attributes of an\nobject in a separate table in the database. We use this attribute\ntype for Message bodies. Storing message bodies, which can be very\nlarge, in a separate table allows us to make queries on message\nmetadata extremely fast, and inflate Message objects without their\nbodies to build the thread list.", - "description": "Joined Data attributes allow you to store certain attributes of an\nobject in a separate table in the database. We use this attribute\ntype for Message bodies. Storing message bodies, which can be very\nlarge, in a separate table allows us to make queries on message\nmetadata extremely fast, and inflate Message objects without their\nbodies to build the thread list.\n\nWhen building a query on a model with a JoinedData attribute, you need\nto call `include` to explicitly load the joined data attribute.\nThe query builder will automatically perform a `LEFT OUTER JOIN` with\nthe secondary table to retrieve the attribute:\n\n```coffee\nDatabaseStore.find(Message, '123').then (message) ->\n # message.body is undefined\n\nDatabaseStore.find(Message, '123').include(Message.attributes.body).then (message) ->\n # message.body is defined\n```\n\nWhen you call `persistModel`, JoinedData attributes are automatically\nwritten to the secondary table.\n\nJoinedData attributes cannot be `queryable`.\n\nSection: Database" - }, - "AttributeNumber": { - "name": "AttributeNumber", - "superClass": "Attribute", - "filename": "src/flux/attributes/attribute-number.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/attributes/attribute-number.coffee#L10", - "sections": [], - "classMethods": [], - "instanceMethods": [ - { - "name": "greaterThan", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/attributes/attribute-number.coffee#L16", - "visibility": "Public", - "summary": "", - "description": "", - "returnValues": [ - { - "type": "Matcher", - "description": "Returns a {Matcher} for objects greater than the provided value." - } - ] - }, - { - "name": "lessThan", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/attributes/attribute-number.coffee#L22", - "visibility": "Public", - "summary": "", - "description": "", - "returnValues": [ - { - "type": "Matcher", - "description": "Returns a {Matcher} for objects less than the provided value." - } - ] - } - ], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "The value of this attribute is always a number, or null.", - "description": "The value of this attribute is always a number, or null.\n\nSection: Database" - }, - "AttributeObject": { - "name": "AttributeObject", - "superClass": "Attribute", - "filename": "src/flux/attributes/attribute-object.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/attributes/attribute-object.coffee#L8", - "sections": [], - "classMethods": [], - "instanceMethods": [], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "An object that can be cast to `itemClass`\nSection: Database", - "description": "An object that can be cast to `itemClass`\nSection: Database" - }, - "AttributeServerId": { - "name": "AttributeServerId", - "superClass": "AttributeString", - "filename": "src/flux/attributes/attribute-serverid.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/attributes/attribute-serverid.coffee#L12", - "sections": [], - "classMethods": [], - "instanceMethods": [], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "The value of this attribute is always a string or `null`.", - "description": "The value of this attribute is always a string or `null`.\n\nString attributes can be queries using `equal`, `not`, and `startsWith`. Matching on\n`greaterThan` and `lessThan` is not supported.\n\nSection: Database" - }, - "AttributeString": { - "name": "AttributeString", - "superClass": "Attribute", - "filename": "src/flux/attributes/attribute-string.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/attributes/attribute-string.coffee#L12", - "sections": [], - "classMethods": [], - "instanceMethods": [ - { - "name": "startsWith", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/attributes/attribute-string.coffee#L17", - "visibility": "Public", - "summary": "", - "description": "", - "returnValues": [ - { - "type": "Matcher", - "description": "Returns a {Matcher} for objects starting with the provided value." - } - ] - } - ], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "The value of this attribute is always a string or `null`.", - "description": "The value of this attribute is always a string or `null`.\n\nString attributes can be queries using `equal`, `not`, and `startsWith`. Matching on\n`greaterThan` and `lessThan` is not supported.\n\nSection: Database" - }, - "BufferedNodeProcess": { - "name": "BufferedNodeProcess", - "superClass": "BufferedProcess", - "filename": "src/buffered-node-process.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/buffered-node-process.coffee#L15", - "sections": [], - "classMethods": [], - "instanceMethods": [ - { - "name": "constructor", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/buffered-node-process.coffee#L38", - "visibility": "Public", - "summary": "Runs the given Node script by spawning a new child process.", - "description": "Runs the given Node script by spawning a new child process.", - "arguments": [ - { - "children": [ - { - "name": "command", - "description": "The {String} path to the JavaScript script to execute.", - "type": "String", - "isOptional": false - }, - { - "name": "args", - "description": "The {Array} of arguments to pass to the script (optional).", - "type": "Array", - "isOptional": false - }, - { - "name": "options", - "description": "The options {Object} to pass to Node's `ChildProcess.spawn`\n```\n method (optional).\n```", - "type": "Object", - "isOptional": false - }, - { - "name": "stdout", - "description": "The callback {Function} that receives a single argument which\n```\n contains the standard output from the command. The callback is\n called as data is received but it's buffered to ensure only\n complete lines are passed until the source stream closes. After\n the source stream has closed all remaining data is sent in a\n final call (optional).\n```", - "type": "Function", - "isOptional": false - }, - { - "name": "stderr", - "description": "The callback {Function} that receives a single argument which\n```\n contains the standard error output from the command. The\n callback is called as data is received but it's buffered to\n ensure only complete lines are passed until the source stream\n closes. After the source stream has closed all remaining data\n is sent in a final call (optional).\n```", - "type": "Function", - "isOptional": false - }, - { - "name": "exit", - "description": "The callback {Function} which receives a single argument\n```\n containing the exit status (optional).\n```", - "type": "Function", - "isOptional": false - } - ], - "name": "options", - "description": "An {Object} with the following keys:", - "type": "Object", - "isOptional": false - } - ] - } - ], - "classProperties": [], - "instanceProperties": [], - "visibility": "Extended", - "summary": "Like {BufferedProcess}, but accepts a Node script as the command\nto run.", - "description": "Like {BufferedProcess}, but accepts a Node script as the command\nto run.\n\nThis is necessary on Windows since it doesn't support shebang `#!` lines.", - "examples": [ - { - "description": "", - "lang": "coffee", - "code": " {BufferedNodeProcess} = require 'atom'", - "raw": "```coffee\n {BufferedNodeProcess} = require 'atom'\n```" - } - ] - }, - "BufferedProcess": { - "name": "BufferedProcess", - "filename": "src/buffered-process.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/buffered-process.coffee#L21", - "sections": [ - { - "name": "Construction", - "description": "" - }, - { - "name": "Event Subscription", - "description": "" - }, - { - "name": "Helper Methods", - "description": "" - } - ], - "classMethods": [], - "instanceMethods": [ - { - "name": "constructor", - "sectionName": "Construction", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/buffered-process.coffee#L48", - "visibility": "Public", - "summary": "Runs the given command by spawning a new child process.", - "description": "Runs the given command by spawning a new child process.", - "arguments": [ - { - "children": [ - { - "name": "command", - "description": "The {String} command to execute.", - "type": "String", - "isOptional": false - }, - { - "name": "args", - "description": "The {Array} of arguments to pass to the command (optional).", - "type": "Array", - "isOptional": false - }, - { - "name": "options", - "description": "{Object} (optional) The options {Object} to pass to Node's `ChildProcess.spawn` method.", - "type": "Object", - "isOptional": false - }, - { - "children": [ - { - "name": "data", - "description": "{String}", - "type": "String", - "isOptional": false - } - ], - "name": "stdout", - "description": "{Function} (optional) The callback that receives a single argument which contains the standard output from the command. The callback is called as data is received but it's buffered to ensure only complete lines are passed until the source stream closes. After the source stream has closed all remaining data is sent in a final call.", - "type": "Function", - "isOptional": false - }, - { - "children": [ - { - "name": "data", - "description": "{String}", - "type": "String", - "isOptional": false - } - ], - "name": "stderr", - "description": "{Function} (optional) The callback that receives a single argument which contains the standard error output from the command. The callback is called as data is received but it's buffered to ensure only complete lines are passed until the source stream closes. After the source stream has closed all remaining data is sent in a final call.", - "type": "Function", - "isOptional": false - }, - { - "children": [ - { - "name": "code", - "description": "{Number} ", - "type": "Number", - "isOptional": false - } - ], - "name": "exit", - "description": "{Function} (optional) The callback which receives a single argument containing the exit status.", - "type": "Function", - "isOptional": false - } - ], - "name": "options", - "description": "An {Object} with the following keys:", - "type": "Object", - "isOptional": false - } - ] - }, - { - "name": "onWillThrowError", - "sectionName": "Event Subscription", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/buffered-process.coffee#L96", - "visibility": "Public", - "summary": "Will call your callback when an error will be raised by the process.\nUsually this is due to the command not being available or not on the PATH.\nYou can call `handle()` on the object passed to your callback to indicate\nthat you have handled this error.", - "description": "Will call your callback when an error will be raised by the process.\nUsually this is due to the command not being available or not on the PATH.\nYou can call `handle()` on the object passed to your callback to indicate\nthat you have handled this error.", - "arguments": [ - { - "children": [ - { - "children": [ - { - "name": "error", - "description": "{Object} the error object", - "type": "Object", - "isOptional": false - }, - { - "name": "handle", - "description": "{Function} call this to indicate you have handled the error. The error will not be thrown if this function is called.", - "type": "Function", - "isOptional": false - } - ], - "name": "errorObject", - "description": "{Object}", - "type": "Object", - "isOptional": false - } - ], - "name": "callback", - "description": "{Function} callback", - "type": "Function", - "isOptional": false - } - ], - "returnValues": [ - { - "type": "Disposable", - "description": "Returns a {Disposable}" - } - ] - }, - { - "name": "kill", - "sectionName": "Helper Methods", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/buffered-process.coffee#L183", - "visibility": "Public", - "summary": "Terminate the process. ", - "description": "Terminate the process. " - } - ], - "classProperties": [], - "instanceProperties": [], - "visibility": "Extended", - "summary": "A wrapper which provides standard error/output line buffering for\nNode's ChildProcess.", - "description": "A wrapper which provides standard error/output line buffering for\nNode's ChildProcess.", - "examples": [ - { - "description": "", - "lang": "coffee", - "code": "{BufferedProcess} = require 'atom'\n\ncommand = 'ps'\nargs = ['-ef']\nstdout = (output) -> console.log(output)\nexit = (code) -> console.log(\"ps -ef exited with #{code}\")\nprocess = new BufferedProcess({command, args, stdout, exit})", - "raw": "```coffee\n{BufferedProcess} = require 'atom'\n\ncommand = 'ps'\nargs = ['-ef']\nstdout = (output) -> console.log(output)\nexit = (code) -> console.log(\"ps -ef exited with #{code}\")\nprocess = new BufferedProcess({command, args, stdout, exit})\n```" - } - ] - }, - "Calendar": { - "name": "Calendar", - "superClass": "Model", - "filename": "src/flux/models/calendar.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/models/calendar.coffee#L20", - "sections": [], - "classMethods": [], - "instanceMethods": [], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "The Calendar model represents a Calendar object served by the Nylas Platform API.\nFor more information about Calendar on the Nylas Platform, read the\n[Calendar API Documentation](https://nylas.com/docs/api#calendar)", - "description": "The Calendar model represents a Calendar object served by the Nylas Platform API.\nFor more information about Calendar on the Nylas Platform, read the\n[Calendar API Documentation](https://nylas.com/docs/api#calendar)\n\n## Attributes\n\n`name`: {AttributeString} The name of the calendar.\n\n`description`: {AttributeString} The description of the calendar.\n\nThis class also inherits attributes from {Model}\n\nSection: Models" - }, - "ChangeFolderTask": { - "name": "ChangeFolderTask", - "superClass": "ChangeMailTask", - "filename": "src/flux/tasks/change-folder-task.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/tasks/change-folder-task.coffee#L21", - "sections": [], - "classMethods": [], - "instanceMethods": [], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "Create a new task to apply labels to a message or thread.", - "description": "Create a new task to apply labels to a message or thread.\n\nTakes an options object of the form:\n\n* folder: The {Folder} or {Folder} IDs to move to\n* threads: An array of {Thread}s or {Thread} IDs\n* threads: An array of {Message}s or {Message} IDs\n* undoData: Since changing the folder is a destructive action,\n undo tasks need to store the configuration of what folders messages\n were in. When creating an undo task, we fill this parameter with\n that configuration" - }, - "ChangeLabelsTask": { - "name": "ChangeLabelsTask", - "superClass": "ChangeMailTask", - "filename": "src/flux/tasks/change-labels-task.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/tasks/change-labels-task.coffee#L17", - "sections": [], - "classMethods": [], - "instanceMethods": [], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "Create a new task to apply labels to a message or thread.", - "description": "Create a new task to apply labels to a message or thread.\n\nTakes an options object of the form:\n\n* labelsToAdd: An {Array} of {Label}s or {Label} ids to add\n* labelsToRemove: An {Array} of {Label}s or {Label} ids to remove\n* threads: An {Array} of {Thread}s or {Thread} ids\n* messages: An {Array} of {Message}s or {Message} ids " - }, - "Clipboard": { - "name": "Clipboard", - "filename": "src/clipboard.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/clipboard.coffee#L18", - "sections": [], - "classMethods": [], - "instanceMethods": [ - { - "name": "write", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/clipboard.coffee#L37", - "visibility": "Public", - "summary": "Write the given text to the clipboard.", - "description": "Write the given text to the clipboard.\n\nThe metadata associated with the text is available by calling\n{::readWithMetadata}.", - "arguments": [ - { - "name": "text", - "description": "The {String} to store.", - "type": "String", - "isOptional": false - }, - { - "name": "metadata", - "description": "The additional info to associate with the text. ", - "type": null, - "isOptional": false - } - ] - }, - { - "name": "read", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/clipboard.coffee#L45", - "visibility": "Public", - "summary": "Read the text from the clipboard.", - "description": "Read the text from the clipboard.", - "returnValues": [ - { - "type": "String", - "description": "Returns a {String}." - } - ] - }, - { - "name": "readWithMetadata", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/clipboard.coffee#L54", - "visibility": "Public", - "summary": "Read the text from the clipboard and return both the text and the\nassociated metadata.", - "description": "Read the text from the clipboard and return both the text and the\nassociated metadata.", - "returnValues": [ - { - "type": "Object", - "description": "Returns an {Object} with the following keys:\n\n* `text` The {String} clipboard text.\n* `metadata` The metadata stored by an earlier call to {::write}." - } - ] - } - ], - "classProperties": [], - "instanceProperties": [], - "visibility": "Extended", - "summary": "Represents the clipboard used for copying and pasting in Atom.", - "description": "Represents the clipboard used for copying and pasting in Atom.\n\nAn instance of this class is always available as the `atom.clipboard` global.\n\nSection: Atom", - "examples": [ - { - "description": "", - "lang": "coffee", - "code": "atom.clipboard.write('hello')\n\nconsole.log(atom.clipboard.read()) # 'hello'", - "raw": "```coffee\natom.clipboard.write('hello')\n\nconsole.log(atom.clipboard.read()) # 'hello'\n```" - } - ] - }, - "Color": { - "name": "Color", - "filename": "src/color.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/color.coffee#L10", - "sections": [], - "classMethods": [ - { - "name": "parse", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/color.coffee#L18", - "visibility": "Essential", - "summary": "Parse a {String} or {Object} into a {Color}.", - "description": "Parse a {String} or {Object} into a {Color}.", - "arguments": [ - { - "name": "value", - "description": "A {String} such as `'white'`, `#ff00ff`, or `'rgba(255, 15, 60, .75)'` or an {Object} with `red`, `green`, `blue`, and `alpha` properties.", - "type": "String", - "isOptional": false - } - ], - "returnValues": [ - { - "type": "Color", - "description": "Returns a {Color} or `null` if it cannot be parsed." - } - ] - } - ], - "instanceMethods": [ - { - "name": "toHexString", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/color.coffee#L60", - "visibility": "Essential", - "summary": "", - "description": "", - "returnValues": [ - { - "type": "String", - "description": "Returns a {String} in the form `'#abcdef'`." - } - ] - }, - { - "name": "toRGBAString", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/color.coffee#L64", - "visibility": "Essential", - "summary": "", - "description": "", - "returnValues": [ - { - "type": "String", - "description": "Returns a {String} in the form `'rgba(25, 50, 75, .9)'`." - } - ] - } - ], - "classProperties": [], - "instanceProperties": [], - "visibility": "Essential", - "summary": "A simple color class returned from {Config::get} when the value\nat the key path is of type 'color'.", - "description": "A simple color class returned from {Config::get} when the value\nat the key path is of type 'color'.\n\nSection: Atom" - }, - "CommandRegistry": { - "name": "CommandRegistry", - "filename": "src/command-registry.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/command-registry.coffee#L44", - "sections": [], - "classMethods": [], - "instanceMethods": [ - { - "name": "add", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/command-registry.coffee#L83", - "visibility": "Public", - "summary": "Add one or more command listeners associated with a selector.", - "description": "Add one or more command listeners associated with a selector.", - "titledArguments": [ - { - "title": "Registering One Command", - "description": "", - "arguments": [ - { - "name": "target", - "description": "A {String} containing a CSS selector or a DOM element. If you pass a selector, the command will be globally associated with all matching elements. The `,` combinator is not currently supported. If you pass a DOM element, the command will be associated with just that element.", - "type": "String", - "isOptional": false - }, - { - "name": "commandName", - "description": "A {String} containing the name of a command you want to handle such as `user:insert-date`.", - "type": "String", - "isOptional": false - }, - { - "children": [ - { - "name": "event", - "description": "A standard DOM event instance. Call `stopPropagation` or `stopImmediatePropagation` to terminate bubbling early.", - "type": null, - "isOptional": false - } - ], - "name": "callback", - "description": "A {Function} to call when the given command is invoked on an element matching the selector. It will be called with `this` referencing the matching DOM node.", - "type": "Function", - "isOptional": false - } - ] - }, - { - "title": "Registering Multiple Commands", - "description": "", - "arguments": [ - { - "name": "target", - "description": "A {String} containing a CSS selector or a DOM element. If you pass a selector, the commands will be globally associated with all matching elements. The `,` combinator is not currently supported. If you pass a DOM element, the command will be associated with just that element.", - "type": "String", - "isOptional": false - }, - { - "name": "commands", - "description": "An {Object} mapping command names like `user:insert-date` to listener {Function}s.", - "type": "Object", - "isOptional": false - } - ] - } - ], - "returnValues": [ - { - "type": "Disposable", - "description": "Returns a {Disposable} on which `.dispose()` can be called to remove the\nadded command handler(s)." - } - ] - }, - { - "name": "findCommands", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/command-registry.coffee#L138", - "visibility": "Public", - "summary": "Find all registered commands matching a query.", - "description": "Find all registered commands matching a query.", - "arguments": [ - { - "children": [ - { - "name": "target", - "description": "A DOM node that is the hypothetical target of a given command.", - "type": null, - "isOptional": false - } - ], - "name": "params", - "description": "An {Object} containing one or more of the following keys:", - "type": "Object", - "isOptional": false - } - ], - "returnValues": [ - { - "type": "Array", - "description": "Returns an {Array} of {Object}s containing the following keys:\n\n* `name` The name of the command. For example, `user:insert-date`.\n* `displayName` The display name of the command. For example,\n `User: Insert Date`.\n* `jQuery` Present if the command was registered with the legacy\n `$::command` method." - } - ] - }, - { - "name": "dispatch", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/command-registry.coffee#L171", - "visibility": "Public", - "summary": "Simulate the dispatch of a command on a DOM node.", - "description": "Simulate the dispatch of a command on a DOM node.\n\nThis can be useful for testing when you want to simulate the invocation of a\ncommand on a detached DOM node. Otherwise, the DOM node in question needs to\nbe attached to the document so the event bubbles up to the root node to be\nprocessed.", - "arguments": [ - { - "name": "target", - "description": "The DOM node at which to start bubbling the command event.", - "type": null, - "isOptional": false - }, - { - "name": "commandName", - "description": "{String} indicating the name of the command to dispatch. ", - "type": "String", - "isOptional": false - } - ] - } - ], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "Associates listener functions with commands in a\ncontext-sensitive way using CSS selectors. You can access a global instance of\nthis class via `atom.commands`, and commands registered there will be\npresented in the command palette.", - "description": "Associates listener functions with commands in a\ncontext-sensitive way using CSS selectors. You can access a global instance of\nthis class via `atom.commands`, and commands registered there will be\npresented in the command palette.\n\nThe global command registry facilitates a style of event handling known as\n*event delegation* that was popularized by jQuery. Atom commands are expressed\nas custom DOM events that can be invoked on the currently focused element via\na key binding or manually via the command palette. Rather than binding\nlisteners for command events directly to DOM nodes, you instead register\ncommand event listeners globally on `atom.commands` and constrain them to\nspecific kinds of elements with CSS selectors.\n\nAs the event bubbles upward through the DOM, all registered event listeners\nwith matching selectors are invoked in order of specificity. In the event of a\nspecificity tie, the most recently registered listener is invoked first. This\nmirrors the \"cascade\" semantics of CSS. Event listeners are invoked in the\ncontext of the current DOM node, meaning `this` always points at\n`event.currentTarget`. As is normally the case with DOM events,\n`stopPropagation` and `stopImmediatePropagation` can be used to terminate the\nbubbling process and prevent invocation of additional listeners.\n\nSection: Atom\n\n## Example\n\nHere is a command that inserts the current date in an editor:\n\n```coffee\natom.commands.add 'atom-text-editor',\n 'user:insert-date': (event) ->\n editor = @getModel()\n editor.insertText(new Date().toLocaleString())\n```" - }, - "ComponentRegistry": { - "name": "ComponentRegistry", - "filename": "src/component-registry.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/component-registry.coffee#L15", - "sections": [], - "classMethods": [], - "instanceMethods": [ - { - "name": "register", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/component-registry.coffee#L50", - "visibility": "Public", - "summary": "Register a new component with the Component Registry.\nTypically, packages call this method from their main `activate` method\nto extend the Nylas user interface, and call the corresponding `unregister`\nmethod in `deactivate`.", - "description": "Register a new component with the Component Registry.\nTypically, packages call this method from their main `activate` method\nto extend the Nylas user interface, and call the corresponding `unregister`\nmethod in `deactivate`.\n\nThis method is chainable.", - "arguments": [ - { - "name": "component", - "description": "{Object} A React Component with a `displayName`", - "type": "Object", - "isOptional": false - }, - { - "children": [ - { - "name": "role", - "description": "{String} If you want to display your component in a location desigated by a role, pass the role identifier.", - "type": "String", - "isOptional": true - }, - { - "name": "modes", - "description": "{Array} If your component should only be displayed in particular Workspace Modes, pass an array of supported modes. ('list', 'split', etc.)", - "type": "Array", - "isOptional": true - }, - { - "name": "location", - "description": "{Object} If your component should be displayed in a column or toolbar, pass the fully qualified location object, such as: `WorkspaceStore.Location.ThreadList`", - "type": "Object", - "isOptional": true - } - ], - "name": "options", - "description": "{Object}: Note that for advanced use cases, you can also pass (`modes`, `roles`, `locations`) with arrays instead of single values.", - "type": "Object", - "isOptional": false - } - ] - }, - { - "name": "findComponentByName", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/component-registry.coffee#L87", - "visibility": "Public", - "summary": "Retrieve the registry entry for a given name.", - "description": "Retrieve the registry entry for a given name.", - "arguments": [ - { - "name": "name", - "description": "The {String} name of the registered component to retrieve.", - "type": "String", - "isOptional": false - } - ], - "returnValues": [ - { - "type": "React.Component", - "description": "Returns a {React.Component}" - } - ] - }, - { - "name": "findComponentsMatching", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/component-registry.coffee#L120", - "visibility": "Public", - "summary": "Retrieve all of the registry entries matching a given descriptor.", - "description": "Retrieve all of the registry entries matching a given descriptor.\n\n```coffee\n ComponentRegistry.findComponentsMatching({\n role: 'Composer:ActionButton'\n })\n\n ComponentRegistry.findComponentsMatching({\n location: WorkspaceStore.Location.RootSidebar.Toolbar\n })\n```", - "arguments": [ - { - "children": [ - { - "name": "mode", - "description": "{String} Components that specifically list modes will only be returned if they include this mode.", - "type": "String", - "isOptional": true - }, - { - "name": "role", - "description": "{String} Only return components that have registered for this role.", - "type": "String", - "isOptional": true - }, - { - "name": "location", - "description": "{Object} Only return components that have registered for this location.", - "type": "Object", - "isOptional": true - } - ], - "name": "descriptor", - "description": "An {Object} that specifies set of components using the available keys below. Note that for advanced use cases, you can also pass (`modes`, `roles`, `locations`) with arrays instead of single values.", - "type": "Object", - "isOptional": false - } - ], - "returnValues": [ - { - "type": "Array", - "description": "Returns an {Array} of {React.Component} objects" - } - ] - } - ], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "The ComponentRegistry maintains an index of React components registered\nby Nylas packages. Components can use {InjectedComponent} and {InjectedComponentSet}\nto dynamically render components registered with the ComponentRegistry.", - "description": "The ComponentRegistry maintains an index of React components registered\nby Nylas packages. Components can use {InjectedComponent} and {InjectedComponentSet}\nto dynamically render components registered with the ComponentRegistry.\n\nSection: Stores" - }, - "Config": { - "name": "Config", - "filename": "src/config.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/config.coffee#L298", - "sections": [ - { - "name": "Config Subscription", - "description": "" - }, - { - "name": "Managing Settings", - "description": "" - } - ], - "classMethods": [], - "instanceMethods": [ - { - "name": "observe", - "sectionName": "Config Subscription", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/config.coffee#L384", - "visibility": "Essential", - "summary": "Add a listener for changes to a given key path. This is different\nthan {::onDidChange} in that it will immediately call your callback with the\ncurrent value of the config entry.", - "description": "Add a listener for changes to a given key path. This is different\nthan {::onDidChange} in that it will immediately call your callback with the\ncurrent value of the config entry.\n\n### Examples\n\nYou might want to be notified when the themes change. We'll watch\n`core.themes` for changes\n\n```coffee\natom.config.observe 'core.themes', (value) ->\n # do stuff with value\n```", - "arguments": [ - { - "name": "keyPath", - "description": "{String} name of the key to observe", - "type": "String", - "isOptional": false - }, - { - "children": [ - { - "name": "scopeDescriptor", - "description": "{ScopeDescriptor} describing a path from the root of the syntax tree to a token. Get one by calling {editor.getLastCursor().getScopeDescriptor()}. See {::get} for examples. See [the scopes docs](https://atom.io/docs/latest/advanced/scopes-and-scope-descriptors) for more information.", - "type": "ScopeDescriptor", - "isOptional": true - } - ], - "name": "options", - "description": "{Object}", - "type": "Object", - "isOptional": false - }, - { - "children": [ - { - "name": "value", - "description": "the new value of the key", - "type": null, - "isOptional": false - } - ], - "name": "callback", - "description": "{Function} to call when the value of the key changes.", - "type": "Function", - "isOptional": false - } - ], - "returnValues": [ - { - "type": "Disposable", - "description": "Returns a {Disposable} with the following keys on which you can call\n`.dispose()` to unsubscribe." - } - ] - }, - { - "name": "onDidChange", - "sectionName": "Config Subscription", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/config.coffee#L430", - "visibility": "Essential", - "summary": "Add a listener for changes to a given key path. If `keyPath` is\nnot specified, your callback will be called on changes to any key.", - "description": "Add a listener for changes to a given key path. If `keyPath` is\nnot specified, your callback will be called on changes to any key.", - "arguments": [ - { - "name": "keyPath", - "description": "{String} name of the key to observe. Must be specified if `scopeDescriptor` is specified.", - "type": "String", - "isOptional": true - }, - { - "children": [ - { - "name": "scopeDescriptor", - "description": "{ScopeDescriptor} describing a path from the root of the syntax tree to a token. Get one by calling {editor.getLastCursor().getScopeDescriptor()}. See {::get} for examples. See [the scopes docs](https://atom.io/docs/latest/advanced/scopes-and-scope-descriptors) for more information.", - "type": "ScopeDescriptor", - "isOptional": true - } - ], - "name": "optional", - "description": "{Object}", - "type": "Object", - "isOptional": true - }, - { - "children": [ - { - "children": [ - { - "name": "newValue", - "description": "the new value of the key", - "type": null, - "isOptional": false - }, - { - "name": "oldValue", - "description": "the prior value of the key.", - "type": null, - "isOptional": false - }, - { - "name": "keyPath", - "description": "the keyPath of the changed key", - "type": null, - "isOptional": false - } - ], - "name": "event", - "description": "{Object}", - "type": "Object", - "isOptional": false - } - ], - "name": "callback", - "description": "{Function} to call when the value of the key changes.", - "type": "Function", - "isOptional": false - } - ], - "returnValues": [ - { - "type": "Disposable", - "description": "Returns a {Disposable} with the following keys on which you can call\n`.dispose()` to unsubscribe." - } - ] - }, - { - "name": "get", - "sectionName": "Managing Settings", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/config.coffee#L509", - "visibility": "Essential", - "summary": "Retrieves the setting for the given key.", - "description": "Retrieves the setting for the given key.\n\n### Examples\n\nYou might want to know what themes are enabled, so check `core.themes`\n\n```coffee\natom.config.get('core.themes')\n```\n\nWith scope descriptors you can get settings within a specific editor\nscope. For example, you might want to know `editor.tabLength` for ruby\nfiles.\n\n```coffee\natom.config.get('editor.tabLength', scope: ['source.ruby']) # => 2\n```\n\nThis setting in ruby files might be different than the global tabLength setting\n\n```coffee\natom.config.get('editor.tabLength') # => 4\natom.config.get('editor.tabLength', scope: ['source.ruby']) # => 2\n```\n\nYou can get the language scope descriptor via\n{TextEditor::getRootScopeDescriptor}. This will get the setting specifically\nfor the editor's language.\n\n```coffee\natom.config.get('editor.tabLength', scope: @editor.getRootScopeDescriptor()) # => 2\n```\n\nAdditionally, you can get the setting at the specific cursor position.\n\n```coffee\nscopeDescriptor = @editor.getLastCursor().getScopeDescriptor()\natom.config.get('editor.tabLength', scope: scopeDescriptor) # => 2\n```", - "arguments": [ - { - "name": "keyPath", - "description": "The {String} name of the key to retrieve.", - "type": "String", - "isOptional": false - }, - { - "children": [ - { - "name": "sources", - "description": "{Array} of {String} source names. If provided, only values that were associated with these sources during {::set} will be used.", - "type": "Array", - "isOptional": true - }, - { - "name": "excludeSources", - "description": "{Array} of {String} source names. If provided, values that were associated with these sources during {::set} will not be used.", - "type": "Array", - "isOptional": true - }, - { - "name": "scope", - "description": "{ScopeDescriptor} describing a path from the root of the syntax tree to a token. Get one by calling {editor.getLastCursor().getScopeDescriptor()} See [the scopes docs](https://atom.io/docs/latest/advanced/scopes-and-scope-descriptors) for more information.", - "type": "ScopeDescriptor", - "isOptional": true - } - ], - "name": "options", - "description": "{Object}", - "type": "Object", - "isOptional": true - } - ], - "returnValues": [ - { - "type": null, - "description": "Returns the value from Atom's default settings, the user's configuration\nfile in the type specified by the configuration schema." - } - ] - }, - { - "name": "getAll", - "sectionName": "Managing Settings", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/config.coffee#L538", - "visibility": "Extended", - "summary": "Get all of the values for the given key-path, along with their\nassociated scope selector.", - "description": "Get all of the values for the given key-path, along with their\nassociated scope selector.", - "arguments": [ - { - "name": "keyPath", - "description": "The {String} name of the key to retrieve", - "type": "String", - "isOptional": false - }, - { - "name": "options", - "description": "{Object} see the `options` argument to {::get}", - "type": "Object", - "isOptional": true - } - ], - "returnValues": [ - { - "type": "Array", - "description": "Returns an {Array} of {Object}s with the following keys:\n\n* `scopeDescriptor` The {ScopeDescriptor} with which the value is associated\n* `value` The value for the key-path" - } - ] - }, - { - "name": "set", - "sectionName": "Managing Settings", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/config.coffee#L593", - "visibility": "Essential", - "summary": "Sets the value for a configuration setting.", - "description": "Sets the value for a configuration setting.\n\nThis value is stored in Atom's internal configuration file.\n\n### Examples\n\nYou might want to change the themes programmatically:\n\n```coffee\natom.config.set('core.themes', ['ui-light', 'atom-light-syntax'])\n```\n\nYou can also set scoped settings. For example, you might want change the\n`editor.tabLength` only for ruby files.\n\n```coffee\natom.config.get('editor.tabLength') # => 4\natom.config.get('editor.tabLength', scope: ['source.ruby']) # => 4\natom.config.get('editor.tabLength', scope: ['source.js']) # => 4\n\n# Set ruby to 2\natom.config.set('editor.tabLength', 2, scopeSelector: 'source.ruby') # => true\n\n# Notice it's only set to 2 in the case of ruby\natom.config.get('editor.tabLength') # => 4\natom.config.get('editor.tabLength', scope: ['source.ruby']) # => 2\natom.config.get('editor.tabLength', scope: ['source.js']) # => 4\n```", - "arguments": [ - { - "name": "keyPath", - "description": "The {String} name of the key.", - "type": "String", - "isOptional": false - }, - { - "name": "value", - "description": "The value of the setting. Passing `undefined` will revert the setting to the default value.", - "type": null, - "isOptional": false - }, - { - "children": [ - { - "name": "scopeSelector", - "description": "{String}. eg. '.source.ruby' See [the scopes docs](https://atom.io/docs/latest/advanced/scopes-and-scope-descriptors) for more information.", - "type": "String", - "isOptional": true - }, - { - "name": "source", - "description": "{String} The name of a file with which the setting is associated. Defaults to the user's config file.", - "type": "String", - "isOptional": true - } - ], - "name": "options", - "description": "{Object}", - "type": "Object", - "isOptional": true - } - ], - "returnValues": [ - { - "type": "Boolean", - "description": "Returns a {Boolean}\n\n* `true` if the value was set.\n* `false` if the value was not able to be coerced to the type specified in the setting's schema." - } - ] - }, - { - "name": "unset", - "sectionName": "Managing Settings", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/config.coffee#L632", - "visibility": "Essential", - "summary": "Restore the setting at `keyPath` to its default value.", - "description": "Restore the setting at `keyPath` to its default value.", - "arguments": [ - { - "name": "keyPath", - "description": "The {String} name of the key.", - "type": "String", - "isOptional": false - }, - { - "children": [ - { - "name": "scopeSelector", - "description": "{String}. See {::set}", - "type": "String", - "isOptional": true - }, - { - "name": "source", - "description": "{String}. See {::set} ", - "type": "String", - "isOptional": true - } - ], - "name": "options", - "description": "{Object}", - "type": "Object", - "isOptional": true - } - ] - }, - { - "name": "getSources", - "sectionName": "Managing Settings", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/config.coffee#L665", - "visibility": "Extended", - "summary": "Get an {Array} of all of the `source` {String}s with which\nsettings have been added via {::set}. ", - "description": "Get an {Array} of all of the `source` {String}s with which\nsettings have been added via {::set}. " - }, - { - "name": "getSchema", - "sectionName": "Managing Settings", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/config.coffee#L717", - "visibility": "Extended", - "summary": "Retrieve the schema for a specific key path. The schema will tell\nyou what type the keyPath expects, and other metadata about the config\noption.", - "description": "Retrieve the schema for a specific key path. The schema will tell\nyou what type the keyPath expects, and other metadata about the config\noption.", - "arguments": [ - { - "name": "keyPath", - "description": "The {String} name of the key.", - "type": "String", - "isOptional": false - } - ], - "returnValues": [ - { - "type": "Object", - "description": "Returns an {Object} eg. `{type: 'integer', default: 23, minimum: 1}`." - }, - { - "type": null, - "description": "Returns `null` when the keyPath has no schema specified." - } - ] - }, - { - "name": "getUserConfigPath", - "sectionName": "Managing Settings", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/config.coffee#L732", - "visibility": "Extended", - "summary": "Get the {String} path to the config file being used. ", - "description": "Get the {String} path to the config file being used. " - }, - { - "name": "transact", - "sectionName": "Managing Settings", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/config.coffee#L740", - "visibility": "Extended", - "summary": "Suppress calls to handler functions registered with {::onDidChange}\nand {::observe} for the duration of `callback`. After `callback` executes,\nhandlers will be called once if the value for their key-path has changed.", - "description": "Suppress calls to handler functions registered with {::onDidChange}\nand {::observe} for the duration of `callback`. After `callback` executes,\nhandlers will be called once if the value for their key-path has changed.", - "arguments": [ - { - "name": "callback", - "description": "{Function} to execute while suppressing calls to handlers. ", - "type": "Function", - "isOptional": false - } - ] - } - ], - "classProperties": [], - "instanceProperties": [], - "visibility": "Essential", - "summary": "Used to access all of Atom's configuration details.", - "description": "Used to access all of Atom's configuration details.\n\nAn instance of this class is always available as the `atom.config` global.\n\n## Getting and setting config settings.\n\n```coffee\n# Note that with no value set, ::get returns the setting's default value.\natom.config.get('my-package.myKey') # -> 'defaultValue'\n\natom.config.set('my-package.myKey', 'value')\natom.config.get('my-package.myKey') # -> 'value'\n```\n\nYou may want to watch for changes. Use {::observe} to catch changes to the setting.\n\n```coffee\natom.config.set('my-package.myKey', 'value')\natom.config.observe 'my-package.myKey', (newValue) ->\n # `observe` calls immediately and every time the value is changed\n console.log 'My configuration changed:', newValue\n```\n\nIf you want a notification only when the value changes, use {::onDidChange}.\n\n```coffee\natom.config.onDidChange 'my-package.myKey', ({newValue, oldValue}) ->\n console.log 'My configuration changed:', newValue, oldValue\n```\n\n### Value Coercion\n\nConfig settings each have a type specified by way of a\n[schema](json-schema.org). For example we might an integer setting that only\nallows integers greater than `0`:\n\n```coffee\n# When no value has been set, `::get` returns the setting's default value\natom.config.get('my-package.anInt') # -> 12\n\n# The string will be coerced to the integer 123\natom.config.set('my-package.anInt', '123')\natom.config.get('my-package.anInt') # -> 123\n\n# The string will be coerced to an integer, but it must be greater than 0, so is set to 1\natom.config.set('my-package.anInt', '-20')\natom.config.get('my-package.anInt') # -> 1\n```\n\n## Defining settings for your package\n\nDefine a schema under a `config` key in your package main.\n\n```coffee\nmodule.exports =\n # Your config schema\n config:\n someInt:\n type: 'integer'\n default: 23\n minimum: 1\n\n activate: (state) -> # ...\n # ...\n```\n\nSee [Creating a Package](https://atom.io/docs/latest/creating-a-package) for\nmore info.\n\n## Config Schemas\n\nWe use [json schema](http://json-schema.org) which allows you to define your value's\ndefault, the type it should be, etc. A simple example:\n\n```coffee\n# We want to provide an `enableThing`, and a `thingVolume`\nconfig:\n enableThing:\n type: 'boolean'\n default: false\n thingVolume:\n type: 'integer'\n default: 5\n minimum: 1\n maximum: 11\n```\n\nThe type keyword allows for type coercion and validation. If a `thingVolume` is\nset to a string `'10'`, it will be coerced into an integer.\n\n```coffee\natom.config.set('my-package.thingVolume', '10')\natom.config.get('my-package.thingVolume') # -> 10\n\n# It respects the min / max\natom.config.set('my-package.thingVolume', '400')\natom.config.get('my-package.thingVolume') # -> 11\n\n# If it cannot be coerced, the value will not be set\natom.config.set('my-package.thingVolume', 'cats')\natom.config.get('my-package.thingVolume') # -> 11\n```\n\n### Supported Types\n\nThe `type` keyword can be a string with any one of the following. You can also\nchain them by specifying multiple in an an array. For example\n\n```coffee\nconfig:\n someSetting:\n type: ['boolean', 'integer']\n default: 5\n\n# Then\natom.config.set('my-package.someSetting', 'true')\natom.config.get('my-package.someSetting') # -> true\n\natom.config.set('my-package.someSetting', '12')\natom.config.get('my-package.someSetting') # -> 12\n```\n\n#### string\n\nValues must be a string.\n\n```coffee\nconfig:\n someSetting:\n type: 'string'\n default: 'hello'\n```\n\n#### integer\n\nValues will be coerced into integer. Supports the (optional) `minimum` and\n`maximum` keys.\n\n```coffee\n config:\n someSetting:\n type: 'integer'\n default: 5\n minimum: 1\n maximum: 11\n```\n\n#### number\n\nValues will be coerced into a number, including real numbers. Supports the\n(optional) `minimum` and `maximum` keys.\n\n```coffee\nconfig:\n someSetting:\n type: 'number'\n default: 5.3\n minimum: 1.5\n maximum: 11.5\n```\n\n#### boolean\n\nValues will be coerced into a Boolean. `'true'` and `'false'` will be coerced into\na boolean. Numbers, arrays, objects, and anything else will not be coerced.\n\n```coffee\nconfig:\n someSetting:\n type: 'boolean'\n default: false\n```\n\n#### array\n\nValue must be an Array. The types of the values can be specified by a\nsubschema in the `items` key.\n\n```coffee\nconfig:\n someSetting:\n type: 'array'\n default: [1, 2, 3]\n items:\n type: 'integer'\n minimum: 1.5\n maximum: 11.5\n```\n\n#### object\n\nValue must be an object. This allows you to nest config options. Sub options\nmust be under a `properties key`\n\n```coffee\nconfig:\n someSetting:\n type: 'object'\n properties:\n myChildIntOption:\n type: 'integer'\n minimum: 1.5\n maximum: 11.5\n```\n\n#### color\n\nValues will be coerced into a {Color} with `red`, `green`, `blue`, and `alpha`\nproperties that all have numeric values. `red`, `green`, `blue` will be in\nthe range 0 to 255 and `value` will be in the range 0 to 1. Values can be any\nvalid CSS color format such as `#abc`, `#abcdef`, `white`,\n`rgb(50, 100, 150)`, and `rgba(25, 75, 125, .75)`.\n\n```coffee\nconfig:\n someSetting:\n type: 'color'\n default: 'white'\n```\n\n### Other Supported Keys\n\n#### enum\n\nAll types support an `enum` key. The enum key lets you specify all values\nthat the config setting can possibly be. `enum` _must_ be an array of values\nof your specified type. Schema:\n\n```coffee\nconfig:\n someSetting:\n type: 'integer'\n default: 4\n enum: [2, 4, 6, 8]\n```\n\nUsage:\n\n```coffee\natom.config.set('my-package.someSetting', '2')\natom.config.get('my-package.someSetting') # -> 2\n\n# will not set values outside of the enum values\natom.config.set('my-package.someSetting', '3')\natom.config.get('my-package.someSetting') # -> 2\n\n# If it cannot be coerced, the value will not be set\natom.config.set('my-package.someSetting', '4')\natom.config.get('my-package.someSetting') # -> 4\n```\n\n#### title and description\n\nThe settings view will use the `title` and `description` keys to display your\nconfig setting in a readable way. By default the settings view humanizes your\nconfig key, so `someSetting` becomes `Some Setting`. In some cases, this is\nconfusing for users, and a more descriptive title is useful.\n\nDescriptions will be displayed below the title in the settings view.\n\n```coffee\nconfig:\n someSetting:\n title: 'Setting Magnitude'\n description: 'This will affect the blah and the other blah'\n type: 'integer'\n default: 4\n```\n\n__Note__: You should strive to be so clear in your naming of the setting that\nyou do not need to specify a title or description!\n\n## Best practices\n\n* Don't depend on (or write to) configuration keys outside of your keypath." - }, - "Contact": { - "name": "Contact", - "superClass": "Model", - "filename": "src/flux/models/contact.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/models/contact.coffee#L36", - "sections": [], - "classMethods": [], - "instanceMethods": [ - { - "name": "toString", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/models/contact.coffee#L70", - "visibility": "Public", - "summary": "", - "description": "", - "returnValues": [ - { - "type": null, - "description": "Returns a string of the format `Full Name ` if\nthe contact has a populated name, just the email address otherwise." - } - ] - }, - { - "name": "isMe", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/models/contact.coffee#L84", - "visibility": "Public", - "summary": "", - "description": "", - "returnValues": [ - { - "type": null, - "description": "Returns true if the contact is the current user, false otherwise.\nYou should use this method instead of comparing the user's email address to\nthe account email, since it is case-insensitive and future-proof." - } - ] - } - ], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "The Contact model represents a Contact object served by the Nylas Platform API.\nFor more information about Contacts on the Nylas Platform, read the\n[Contacts API Documentation](https://nylas.com/docs/api#contacts)", - "description": "The Contact model represents a Contact object served by the Nylas Platform API.\nFor more information about Contacts on the Nylas Platform, read the\n[Contacts API Documentation](https://nylas.com/docs/api#contacts)\n\n## Attributes\n\n`name`: {AttributeString} The name of the contact. Queryable.\n\n`email`: {AttributeString} The email address of the contact. Queryable.\n\n`thirdPartyData`: {AttributeObject} Extra data that we find out about a\ncontact. The data is keyed by the 3rd party service that dumped the data\nthere. The value is an object of raw data in the form that the service\nprovides\n\nWe also have \"normalized\" optional data for each contact. This list may\ngrow as the needs of a contact become more complex.\n\nThis class also inherits attributes from {Model}\n\nSection: Models" - }, - "ContactStore": { - "name": "ContactStore", - "superClass": "NylasStore", - "filename": "src/flux/stores/contact-store.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/contact-store.coffee#L137", - "sections": [], - "classMethods": [], - "instanceMethods": [ - { - "name": "searchContacts", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/contact-store.coffee#L163", - "visibility": "Public", - "summary": "Search the user's contact list for the given search term.\nThis method compares the `search` string against each Contact's\n`name` and `email`.", - "description": "Search the user's contact list for the given search term.\nThis method compares the `search` string against each Contact's\n`name` and `email`.", - "arguments": [ - { - "name": "search", - "description": "{String} A search phrase, such as `ben@n` or `Ben G`", - "type": "String", - "isOptional": false - }, - { - "name": "options", - "description": "{Object} If you will only be displaying a few results, you should pass a limit value. {::searchContacts} will return as soon as `limit` matches have been found.", - "type": "Object", - "isOptional": true - } - ], - "returnValues": [ - { - "type": "Array", - "description": "Returns an {Array} of matching {Contact} models" - } - ] - }, - { - "name": "isValidContact", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/contact-store.coffee#L216", - "visibility": "Public", - "summary": "", - "description": "", - "returnValues": [ - { - "type": "Contact", - "description": "Returns true if the contact provided is a {Contact} instance and\ncontains a properly formatted email address." - } - ] - } - ], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "ContactStore maintains an in-memory cache of the user's address\nbook, making it easy to build autocompletion functionality and resolve\nthe names associated with email addresses.", - "description": "ContactStore maintains an in-memory cache of the user's address\nbook, making it easy to build autocompletion functionality and resolve\nthe names associated with email addresses.\n\n## Listening for Changes\n\nThe ContactStore monitors the {DatabaseStore} for changes to {Contact} models\nand triggers when contacts have changed, allowing your stores and components\nto refresh data based on the ContactStore.\n\n```coffee\n@unsubscribe = ContactStore.listen(@_onContactsChanged, @)\n\n_onContactsChanged: ->\n # refresh your contact results\n```\n\nSection: Stores" - }, - "DatabaseStore": { - "name": "DatabaseStore", - "superClass": "NylasStore", - "filename": "src/flux/stores/database-store.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/database-store.coffee#L78", - "sections": [], - "classMethods": [], - "instanceMethods": [ - { - "name": "find", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/database-store.coffee#L289", - "visibility": "Public", - "summary": "Creates a new Model Query for retrieving a single model specified by\nthe class and id.", - "description": "Creates a new Model Query for retrieving a single model specified by\nthe class and id.\n\nExample:\n\n```coffee\nDatabaseStore.find(Thread, 'id-123').then (thread) ->\n # thread is a Thread object, or null if no match was found.\n```", - "arguments": [ - { - "name": "class", - "description": "The class of the {Model} you're trying to retrieve.", - "type": "Model", - "isOptional": false - }, - { - "name": "id", - "description": "The {String} id of the {Model} you're trying to retrieve", - "type": "String", - "isOptional": false - } - ], - "returnValues": [ - { - "type": "ModelQuery", - "description": "Returns a {ModelQuery}" - } - ] - }, - { - "name": "findBy", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/database-store.coffee#L303", - "visibility": "Public", - "summary": "Creates a new Model Query for retrieving a single model matching the\npredicates provided.", - "description": "Creates a new Model Query for retrieving a single model matching the\npredicates provided.", - "arguments": [ - { - "name": "class", - "description": "The class of the {Model} you're trying to retrieve.", - "type": "Model", - "isOptional": false - }, - { - "name": "predicates", - "description": "An {Array} of {matcher} objects. The set of predicates the returned model must match.", - "type": "Array", - "isOptional": false - } - ], - "returnValues": [ - { - "type": "ModelQuery", - "description": "Returns a {ModelQuery}" - } - ] - }, - { - "name": "findAll", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/database-store.coffee#L316", - "visibility": "Public", - "summary": "Creates a new Model Query for retrieving all models matching the\npredicates provided.", - "description": "Creates a new Model Query for retrieving all models matching the\npredicates provided.", - "arguments": [ - { - "name": "class", - "description": "The class of the {Model} you're trying to retrieve.", - "type": "Model", - "isOptional": false - }, - { - "name": "predicates", - "description": "An {Array} of {matcher} objects. The set of predicates the returned model must match.", - "type": "Array", - "isOptional": false - } - ], - "returnValues": [ - { - "type": "ModelQuery", - "description": "Returns a {ModelQuery}" - } - ] - }, - { - "name": "count", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/database-store.coffee#L329", - "visibility": "Public", - "summary": "Creates a new Model Query that returns the {Number} of models matching\nthe predicates provided.", - "description": "Creates a new Model Query that returns the {Number} of models matching\nthe predicates provided.", - "arguments": [ - { - "name": "class", - "description": "The class of the {Model} you're trying to retrieve.", - "type": "Model", - "isOptional": false - }, - { - "name": "predicates", - "description": "An {Array} of {matcher} objects. The set of predicates the returned model must match.", - "type": "Array", - "isOptional": false - } - ], - "returnValues": [ - { - "type": "ModelQuery", - "description": "Returns a {ModelQuery}" - } - ] - }, - { - "name": "modelify", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/database-store.coffee#L342", - "visibility": "Public", - "summary": "Modelify converts the provided array of IDs or models (or a mix of\nIDs and models) into an array of models of the `klass` provided by querying for the missing items.", - "description": "Modelify converts the provided array of IDs or models (or a mix of\nIDs and models) into an array of models of the `klass` provided by querying for the missing items.\n\nModelify is efficient and uses a single database query. It resolves Immediately\nif no query is necessary.", - "arguments": [ - { - "name": "class", - "description": "The {Model} class desired.", - "type": "Model", - "isOptional": false - }, - { - "name": null, - "description": "'arr' An {Array} with a mix of string model IDs and/or models.", - "type": null - } - ] - }, - { - "name": "run", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/database-store.coffee#L393", - "visibility": "Public", - "summary": "Executes a {ModelQuery} on the local database.", - "description": "Executes a {ModelQuery} on the local database.", - "arguments": [ - { - "name": "modelQuery", - "description": "A {ModelQuery} to execute.", - "type": "ModelQuery", - "isOptional": false - } - ], - "returnValues": [ - { - "type": "Promise", - "description": "Returns a {Promise} that\n\n* resolves with the result of the database query." - } - ] - }, - { - "name": "persistModel", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/database-store.coffee#L411", - "visibility": "Public", - "summary": "Asynchronously writes `model` to the cache and triggers a change event.", - "description": "Asynchronously writes `model` to the cache and triggers a change event.", - "arguments": [ - { - "name": "model", - "description": "A {Model} to write to the database.", - "type": "Model", - "isOptional": false - } - ], - "returnValues": [ - { - "type": "Promise", - "description": "Returns a {Promise} that\n\n* resolves after the database queries are complete and any listening\n database callbacks have finished\n* rejects if any databse query fails or one of the triggering\n callbacks failed" - } - ] - }, - { - "name": "persistModels", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/database-store.coffee#L428", - "visibility": "Public", - "summary": "Asynchronously writes `models` to the cache and triggers a single change\nevent. Note: Models must be of the same class to be persisted in a batch operation.", - "description": "Asynchronously writes `models` to the cache and triggers a single change\nevent. Note: Models must be of the same class to be persisted in a batch operation.", - "arguments": [ - { - "name": "models", - "description": "An {Array} of {Model} objects to write to the database.", - "type": "Array", - "isOptional": false - } - ], - "returnValues": [ - { - "type": "Promise", - "description": "Returns a {Promise} that\n\n* resolves after the database queries are complete and any listening\n database callbacks have finished\n* rejects if any databse query fails or one of the triggering\n callbacks failed" - } - ] - }, - { - "name": "unpersistModel", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/database-store.coffee#L455", - "visibility": "Public", - "summary": "Asynchronously removes `model` from the cache and triggers a change event.", - "description": "Asynchronously removes `model` from the cache and triggers a change event.", - "arguments": [ - { - "name": "model", - "description": "A {Model} to write to the database.", - "type": "Model", - "isOptional": false - } - ], - "returnValues": [ - { - "type": "Promise", - "description": "Returns a {Promise} that\n\n* resolves after the database queries are complete and any listening\n database callbacks have finished\n* rejects if any databse query fails or one of the triggering\n callbacks failed" - } - ] - } - ], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "N1 is built on top of a custom database layer modeled after\nActiveRecord. For many parts of the application, the database is the source\nof truth. Data is retrieved from the API, written to the database, and changes\nto the database trigger Stores and components to refresh their contents.", - "description": "N1 is built on top of a custom database layer modeled after\nActiveRecord. For many parts of the application, the database is the source\nof truth. Data is retrieved from the API, written to the database, and changes\nto the database trigger Stores and components to refresh their contents.\n\nThe DatabaseStore is available in every application window and allows you to\nmake queries against the local cache. Every change to the local cache is\nbroadcast as a change event, and listening to the DatabaseStore keeps the\nrest of the application in sync.\n\n## Listening for Changes\n\nTo listen for changes to the local cache, subscribe to the DatabaseStore and\ninspect the changes that are sent to your listener method.\n\n```coffeescript\n@unsubscribe = DatabaseStore.listen(@_onDataChanged, @)\n\n...\n\n_onDataChanged: (change) ->\n return unless change.objectClass is Message\n return unless @_myMessageID in _.map change.objects, (m) -> m.id\n\n # Refresh Data\n```\n\nThe local cache changes very frequently, and your stores and components should\ncarefully choose when to refresh their data. The `change` object passed to your\nevent handler allows you to decide whether to refresh your data and exposes\nthe following keys:\n\n`objectClass`: The {Model} class that has been changed. If multiple types of models\nwere saved to the database, you will receive multiple change events.\n\n`objects`: An {Array} of {Model} instances that were either created, updated or\ndeleted from the local cache. If your component or store presents a single object\nor a small collection of objects, you should look to see if any of the objects\nare in your displayed set before refreshing.\n\nSection: Database" - }, - "DatabaseView": { - "name": "DatabaseView", - "superClass": "ModelView", - "filename": "src/flux/stores/database-view.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/database-view.coffee#L62", - "sections": [], - "classMethods": [], - "instanceMethods": [ - { - "name": "invalidate", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/database-view.coffee#L138", - "visibility": "Public", - "summary": "Call this method when the DatabaseStore triggers and will impact the\ndata maintained by this DatabaseView. In the future, the DatabaseView will\nprobably observe the DatabaseView directly.", - "description": "Call this method when the DatabaseStore triggers and will impact the\ndata maintained by this DatabaseView. In the future, the DatabaseView will\nprobably observe the DatabaseView directly.\n\nTODO: In order for the DatabaseView to monitor the DatabaseStore directly,\nit needs to have some way of detatching it's listener when it's no longer needed!\nNeed a destructor...", - "arguments": [ - { - "children": [ - { - "name": "change", - "description": "The change object provided by the DatabaseStore, with `items` and a `type`.", - "type": null, - "isOptional": false - }, - { - "name": "shallow", - "description": "True if this change will not invalidate item metadata, only items.", - "type": null, - "isOptional": false - } - ], - "name": "options", - "description": "an Object with the following optional keys which can be used to optimize the behavior of the DatabaseView:", - "type": null, - "isOptional": false - } - ] - } - ], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "DatabaseView abstracts away the process of paginating a query\nand loading ranges of data. It's very smart about deciding when\nresults need to be refreshed. There are a few core concepts that\nmake it flexible:", - "description": "DatabaseView abstracts away the process of paginating a query\nand loading ranges of data. It's very smart about deciding when\nresults need to be refreshed. There are a few core concepts that\nmake it flexible:\n\nmetadataProvider: For each item loaded, you can provide a promise\nthat resolves with additional data for that item. The DatabaseView\nwill not consider the page of data \"loaded\" until all the metadata\npromises have resolved. (Used for message metadata on threads)\n\nretainedRange: The retained range ({start, end}) represents the\nobjects currently being displayed. React components displaying the\nview can alter the retained range as the user scrolls.\n\nNote: Do not make the retainedRange larger than you need. The\nDatabaseView may internally keep a larger set of items loaded\nfor performance.\n\nSection: Database" - }, - "DraftChangeSet": { - "name": "DraftChangeSet", - "filename": "src/flux/stores/draft-store-proxy.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/draft-store-proxy.coffee#L25", - "sections": [], - "classMethods": [], - "instanceMethods": [], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "As the user interacts with the draft, changes are accumulated in the\nDraftChangeSet associated with the store proxy. The DraftChangeSet does two things:", - "description": "As the user interacts with the draft, changes are accumulated in the\nDraftChangeSet associated with the store proxy. The DraftChangeSet does two things:\n\n1. It debounces changes and calls Actions.saveDraft() at a reasonable interval.\n1. It exposes `applyToModel`, which allows you to optimistically apply changes\n to a draft object. When the proxy vends the draft, it passes it through this\n function to apply uncommitted changes. This means the Draft provided by the\n DraftStoreProxy will always relfect recent changes, even though they're\n written to the database intermittently.\n\nSection: Drafts" - }, - "DraftStore": { - "name": "DraftStore", - "filename": "src/flux/stores/draft-store.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/draft-store.coffee#L41", - "sections": [], - "classMethods": [], - "instanceMethods": [ - { - "name": "sessionForClientId", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/draft-store.coffee#L117", - "visibility": "Public", - "summary": "Fetch a {DraftStoreProxy} for displaying and/or editing the\ndraft with `clientId`.", - "description": "Fetch a {DraftStoreProxy} for displaying and/or editing the\ndraft with `clientId`.\n\nExample:\n\n```coffee\nsession = DraftStore.sessionForClientId(clientId)\nsession.prepare().then ->\n # session.draft() is now ready\n```", - "arguments": [ - { - "name": "clientId", - "description": "The {String} clientId of the draft.", - "type": "String", - "isOptional": false - } - ], - "returnValues": [ - { - "type": "Promise", - "description": "Returns a {Promise} that resolves to an {DraftStoreProxy} for the\ndraft once it has been prepared:" - } - ] - }, - { - "name": "isSendingDraft", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/draft-store.coffee#L125", - "visibility": "Public", - "summary": "Look up the sending state of the given draftClientId.\nIn popout windows the existance of the window is the sending state. ", - "description": "Look up the sending state of the given draftClientId.\nIn popout windows the existance of the window is the sending state. " - }, - { - "name": "extensions", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/draft-store.coffee#L133", - "visibility": "Public", - "summary": "", - "description": "", - "returnValues": [ - { - "type": null, - "description": "Returns the extensions registered with the DraftStore." - } - ] - }, - { - "name": "registerExtension", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/draft-store.coffee#L142", - "visibility": "Public", - "summary": "Registers a new extension with the DraftStore. DraftStore extensions\nmake it possible to extend the editor experience, modify draft contents,\ndisplay warnings before draft are sent, and more.", - "description": "Registers a new extension with the DraftStore. DraftStore extensions\nmake it possible to extend the editor experience, modify draft contents,\ndisplay warnings before draft are sent, and more.", - "arguments": [ - { - "name": "ext", - "description": "A {DraftStoreExtension} instance.", - "type": "DraftStoreExtension", - "isOptional": false - } - ] - }, - { - "name": "unregisterExtension", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/draft-store.coffee#L149", - "visibility": "Public", - "summary": "Unregisters the extension provided from the DraftStore.", - "description": "Unregisters the extension provided from the DraftStore.", - "arguments": [ - { - "name": "ext", - "description": "A {DraftStoreExtension} instance.", - "type": "DraftStoreExtension", - "isOptional": false - } - ] - } - ], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "DraftStore responds to Actions that interact with Drafts and exposes\npublic getter methods to return Draft objects and sessions.", - "description": "DraftStore responds to Actions that interact with Drafts and exposes\npublic getter methods to return Draft objects and sessions.\n\nIt also creates and queues {Task} objects to persist changes to the Nylas\nAPI.\n\nRemember that a \"Draft\" is actually just a \"Message\" with `draft: true`.\n\nSection: Drafts" - }, - "DraftStoreExtension": { - "name": "DraftStoreExtension", - "filename": "src/flux/stores/draft-store-extension.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/draft-store-extension.coffee#L32", - "sections": [], - "classMethods": [ - { - "name": "warningsForSending", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/draft-store-extension.coffee#L43", - "visibility": "Public", - "summary": "Inspect the draft, and return any warnings that need to be displayed before\nthe draft is sent. Warnings should be string phrases, such as \"without an attachment\"\nthat fit into a message of the form: \"Send #{phase1} and #{phase2}?\"", - "description": "Inspect the draft, and return any warnings that need to be displayed before\nthe draft is sent. Warnings should be string phrases, such as \"without an attachment\"\nthat fit into a message of the form: \"Send #{phase1} and #{phase2}?\"", - "arguments": [ - { - "name": "draft", - "description": "A fully populated {Message} object that is about to be sent.", - "type": "Message", - "isOptional": false - } - ], - "returnValues": [ - { - "type": null, - "description": "Returns a list of warning strings, or an empty array if no warnings need to be displayed." - } - ] - }, - { - "name": "composerToolbar", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/draft-store-extension.coffee#L66", - "visibility": "Public", - "summary": "declare an icon to be displayed in the composer's toolbar (where\nbold, italic, underline, etc are).", - "description": "declare an icon to be displayed in the composer's toolbar (where\nbold, italic, underline, etc are).\n\nYou must declare the following properties:", - "arguments": [ - { - "name": "mutator", - "description": "A function that's called when your toolbar button is clicked. This mutator function will be passed as its only argument the `dom`. The `dom` is the full {DOM} object of the current composer. You may mutate this in place. We don't care about the mutator's return value.", - "type": "DOM", - "isOptional": false - }, - { - "name": "tooltip", - "description": "A one or two word description of what your icon does", - "type": null, - "isOptional": false - }, - { - "name": "iconUrl", - "description": "The url of your icon. It should be in the `nylas://` scheme. For example: `nylas://your-package-name/assets/my-icon@2x.png`. Note, we will downsample your image by 2x (for Retina screens), so make sure it's twice the resolution. The icon should be black and white. We will directly pass the `url` prop of a {RetinaImg}", - "type": "RetinaImg", - "isOptional": false - } - ] - }, - { - "name": "prepareNewDraft", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/draft-store-extension.coffee#L80", - "visibility": "Public", - "summary": "Override prepareNewDraft to modify a brand new draft before it is displayed\nin a composer. This is one of the only places in the application where it's safe\nto modify the draft object you're given directly to add participants to the draft,\nadd a signature, etc.", - "description": "Override prepareNewDraft to modify a brand new draft before it is displayed\nin a composer. This is one of the only places in the application where it's safe\nto modify the draft object you're given directly to add participants to the draft,\nadd a signature, etc.\n\nBy default, new drafts are considered `pristine`. If the user leaves the composer\nwithout making any changes, the draft is discarded. If your extension populates\nthe draft in a way that makes it \"populated\" in a valuable way, you should set\n`draft.pristine = false` so the draft saves, even if no further changes are made." - }, - { - "name": "finalizeSessionBeforeSending", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/draft-store-extension.coffee#L102", - "visibility": "Public", - "summary": "Override finalizeSessionBeforeSending in your DraftStoreExtension subclass to transform\nthe {DraftStoreProxy} editing session just before the draft is sent. This method\ngives you an opportunity to make any final substitutions or changes after any\n{::warningsForSending} have been displayed.", - "description": "Override finalizeSessionBeforeSending in your DraftStoreExtension subclass to transform\nthe {DraftStoreProxy} editing session just before the draft is sent. This method\ngives you an opportunity to make any final substitutions or changes after any\n{::warningsForSending} have been displayed.\n\nExample:\n\n```coffee\n# Remove any tags found in the draft body\nfinalizeSessionBeforeSending: (session) ->\n body = session.draft().body\n clean = body.replace(/<\\/?code[^>]*>/g, '')\n if body != clean\n session.changes.add(body: clean)\n```", - "arguments": [ - { - "name": "session", - "description": "A {DraftStoreProxy} for the draft.", - "type": "DraftStoreProxy", - "isOptional": false - } - ] - }, - { - "name": "onMouseUp", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/draft-store-extension.coffee#L118", - "visibility": "Public", - "summary": "Override onMouseUp in your DraftStoreExtension subclass to\nlisten for mouse up events sent to the composer's body text area. This\nhook provides the contenteditable DOM Node itself, allowing you to\nadjust selection ranges and change content as necessary.", - "description": "Override onMouseUp in your DraftStoreExtension subclass to\nlisten for mouse up events sent to the composer's body text area. This\nhook provides the contenteditable DOM Node itself, allowing you to\nadjust selection ranges and change content as necessary.", - "arguments": [ - { - "name": "editableNode", - "description": "The composer's contenteditable {Node} that received the event.", - "type": "Node", - "isOptional": false - }, - { - "name": "range", - "description": "The currently selected {Range} in the `editableNode`", - "type": "Range", - "isOptional": false - }, - { - "name": "event", - "description": "The mouse up event.", - "type": null, - "isOptional": false - } - ] - }, - { - "name": "onFocusPrevious", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/draft-store-extension.coffee#L134", - "visibility": "Public", - "summary": "Called when the user presses `Shift-Tab` while focused on the composer's body field.\nOverride onFocusPrevious in your DraftStoreExtension to adjust the selection or perform\nother actions. If your package implements Shift-Tab behavior in a particular scenario, you\nshould prevent the default behavior of Shift-Tab via `event.preventDefault()`.", - "description": "Called when the user presses `Shift-Tab` while focused on the composer's body field.\nOverride onFocusPrevious in your DraftStoreExtension to adjust the selection or perform\nother actions. If your package implements Shift-Tab behavior in a particular scenario, you\nshould prevent the default behavior of Shift-Tab via `event.preventDefault()`.", - "arguments": [ - { - "name": "editableNode", - "description": "The composer's contenteditable {Node} that received the event.", - "type": "Node", - "isOptional": false - }, - { - "name": "range", - "description": "The currently selected {Range} in the `editableNode`", - "type": "Range", - "isOptional": false - }, - { - "name": "event", - "description": "The mouse up event.", - "type": null, - "isOptional": false - } - ] - }, - { - "name": "onFocusNext", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/draft-store-extension.coffee#L151", - "visibility": "Public", - "summary": "Called when the user presses `Tab` while focused on the composer's body field.\nOverride onFocusPrevious in your DraftStoreExtension to adjust the selection or perform\nother actions. If your package implements Tab behavior in a particular scenario, you\nshould prevent the default behavior of Tab via `event.preventDefault()`.", - "description": "Called when the user presses `Tab` while focused on the composer's body field.\nOverride onFocusPrevious in your DraftStoreExtension to adjust the selection or perform\nother actions. If your package implements Tab behavior in a particular scenario, you\nshould prevent the default behavior of Tab via `event.preventDefault()`.", - "arguments": [ - { - "name": "editableNode", - "description": "The composer's contenteditable {Node} that received the event.", - "type": "Node", - "isOptional": false - }, - { - "name": "range", - "description": "The currently selected {Range} in the `editableNode`", - "type": "Range", - "isOptional": false - }, - { - "name": "event", - "description": "The mouse up event.", - "type": null, - "isOptional": false - } - ] - }, - { - "name": "onInput", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/draft-store-extension.coffee#L186", - "visibility": "Public", - "summary": "Override onInput in your DraftStoreExtension subclass to\nimplement custom behavior as the user types in the composer's\ncontenteditable body field.", - "description": "Override onInput in your DraftStoreExtension subclass to\nimplement custom behavior as the user types in the composer's\ncontenteditable body field.\n\nAs the first argument you are passed the entire DOM object of the\ncomposer. You may mutate this object and edit it in place.\n\nExample:\n\nThe Nylas `templates` package uses this method to see if the user has populated a\n`` tag placed in the body and change it's CSS class to reflect that it is no\nlonger empty.\n\n```coffee\nonInput: (editableNode, event) ->\n selection = document.getSelection()\n\n isWithinNode = (node) ->\n test = selection.baseNode\n while test isnt editableNode\n return true if test is node\n test = test.parentNode\n return false\n\n codeTags = editableNode.querySelectorAll('code.var.empty')\n for codeTag in codeTags\n if selection.containsNode(codeTag) or isWithinNode(codeTag)\n codeTag.classList.remove('empty')\n```" - } - ], - "instanceMethods": [], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "DraftStoreExtension is an abstract base class. To create DraftStoreExtensions\nthat enhance the composer experience, you should subclass {DraftStoreExtension} and\nimplement the class methods your plugin needs.", - "description": "DraftStoreExtension is an abstract base class. To create DraftStoreExtensions\nthat enhance the composer experience, you should subclass {DraftStoreExtension} and\nimplement the class methods your plugin needs.\n\nTo register your extension with the DraftStore, call {DraftStore::registerExtension}.\nWhen your package is being unloaded, you *must* call the corresponding\n{DraftStore::unregisterExtension} to unhook your extension.\n\n```coffee\nactivate: ->\n DraftStore.registerExtension(MyExtension)\n\n...\n\ndeactivate: ->\n DraftStore.unregisterExtension(MyExtension)\n```\n\nYour DraftStoreExtension subclass should be stateless. The user may have multiple drafts\nopen at any time, and the methods of your DraftStoreExtension may be called for different\ndrafts at any time. You should not expect that the session you receive in\n {::finalizeSessionBeforeSending} is for the same draft you previously received in\n {::warningsForSending}, etc.\n\nThe DraftStoreExtension API does not currently expose any asynchronous or {Promise}-based APIs.\nThis will likely change in the future. If you have a use-case for a Draft Store extension that\nis not possible with the current API, please let us know.\n\nSection: Drafts" - }, - "DraftStoreProxy": { - "name": "DraftStoreProxy", - "filename": "src/flux/stores/draft-store-proxy.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/draft-store-proxy.coffee#L80", - "sections": [], - "classMethods": [], - "instanceMethods": [ - { - "name": "draft", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/draft-store-proxy.coffee#L104", - "visibility": "Public", - "summary": "", - "description": "", - "returnValues": [ - { - "type": null, - "description": "Returns the draft object with the latest changes applied." - } - ] - }, - { - "name": "draftPristineBody", - "sectionName": null, - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/draft-store-proxy.coffee#L112", - "visibility": "Public", - "summary": "", - "description": "", - "returnValues": [ - { - "type": null, - "description": "Returns the initial body of the draft when it was pristine, or null if the\ndraft was never pristine in this editing session. Useful for determining if the\nbody is still in an unchanged / empty state." - } - ] - } - ], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "DraftStoreProxy is a small class that makes it easy to implement components\nthat display Draft objects or allow for interactive editing of Drafts.", - "description": "DraftStoreProxy is a small class that makes it easy to implement components\nthat display Draft objects or allow for interactive editing of Drafts.\n\n1. It synchronously provides an instance of a draft via `draft()`, and\n triggers whenever that draft instance has changed.\n1. It provides an interface for modifying the draft that transparently\n batches changes, and ensures that the draft provided via `draft()`\n always has pending changes applied.\n\nSection: Drafts" - }, - "DraggableImg": { - "name": "DraggableImg", - "superClass": "React", - "filename": "draggable-img.coffee", - "srcUrl": null, - "sections": [], - "classMethods": [], - "instanceMethods": [], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "Images are supposed to by default show a ghost image when dragging and\ndropping. Unfortunately this does not work in Electron. Since we're a\ndesktop app we don't want all images draggable, but we do want some (like\nattachments) to be able to be dragged away with a preview image.", - "description": "Images are supposed to by default show a ghost image when dragging and\ndropping. Unfortunately this does not work in Electron. Since we're a\ndesktop app we don't want all images draggable, but we do want some (like\nattachments) to be able to be dragged away with a preview image." - }, - "EventStore": { - "name": "EventStore", - "superClass": "NylasStore", - "filename": "src/flux/stores/event-store.coffee", - "srcUrl": "https://github.com/nylas/edgehill/blob/v0.3.10/src/flux/stores/event-store.coffee#L33", - "sections": [], - "classMethods": [], - "instanceMethods": [], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "EventStore maintains", - "description": "EventStore maintains\n\n## Listening for Changes\n\nThe EventStore monitors the {DatabaseStore} for changes to {Event} models\nand triggers when events have changed, allowing your stores and components\nto refresh data based on the EventStore.\n\n```coffee\n@unsubscribe = EventStore.listen(@_onEventsChanged, @)\n\n_onEventsChanged: ->\n # refresh your event results\n```\n\nSection: Stores" - }, - "EventedIFrame": { - "name": "EventedIFrame", - "superClass": "React", - "filename": "evented-iframe.coffee", - "srcUrl": null, - "sections": [], - "classMethods": [], - "instanceMethods": [ - { - "name": "documentWasReplaced", - "sectionName": null, - "srcUrl": null, - "visibility": "Public", - "summary": "Call this method if you replace the contents of the iframe's document.\nThis allows {EventedIframe} to re-attach it's event listeners.", - "description": "Call this method if you replace the contents of the iframe's document.\nThis allows {EventedIframe} to re-attach it's event listeners." - } - ], - "classProperties": [], - "instanceProperties": [], - "visibility": "Public", - "summary": "EventedIFrame is a thin wrapper around the DOM's standard `