@inboxsdk/core 0.2.28-alpha.4 → 0.2.28-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/inboxsdk.js +1 -1
- package/package.json +5 -1
- package/src/inboxsdk-js/check-requirements.js +7 -3
- package/src/inboxsdk-js/header.js +1 -0
- package/src/inboxsdk-js/inboxsdk-NONREMOTE-INTEGRATED-PAGEWORLD.js +5 -6
- package/src/inboxsdk-js/inboxsdk-NONREMOTE.js +4 -3
- package/src/inboxsdk-js/inboxsdk-REMOTE.js +3 -1
- package/src/inboxsdk-js/inboxsdk-TEST.js +4 -3
- package/src/inboxsdk-js/inboxsdk.js +33 -39
- package/src/inboxsdk-js/loading/load-platform-implementation-DEV.js +15 -18
- package/src/injected-js/gmail/modify-suggestions.test.js +8 -9
- package/src/injected-js/gmail/setup-gmail-interceptor.js +340 -579
- package/src/injected-js/gmail/sync-compose-request-processor.test.js +39 -49
- package/src/injected-js/gmail/thread-identifier/click-and-get-popup-url.js +20 -33
- package/src/injected-js/gmail/thread-identifier/index.js +57 -93
- package/src/injected-js/gmail/thread-identifier/thread-row-parser.js +22 -31
- package/src/injected-js/gmail/thread-identifier/thread-row-parser.test.js +12 -28
- package/src/injected-js/inbox/setupAjaxInterceptor.js +64 -121
- package/src/injected-js/inbox/setupClickAndGetNewIframeSrc.js +53 -66
- package/src/injected-js/inbox/setupComposeViewDraftIDFinder.js +20 -36
- package/src/injected-js/inbox/setupInboxFakeWindowResizeListener.js +13 -13
- package/src/injected-js/main.js +11 -24
- package/src/injected-js/message-metadata-holder.js +52 -82
- package/src/injected-js/setup-data-exposer.js +89 -148
- package/src/injected-js/setup-error-silencer.js +21 -21
- package/src/injected-js/setup-event-reemitter.js +30 -22
- package/src/injected-js/setupInboxCustomViewLinkFixer.js +24 -29
- package/src/injected-js/setupPushStateListener.js +18 -11
- package/src/injected-js/xhr-helper.js +62 -65
- package/src/injected-js/xhr-proxy-factory.js +195 -445
- package/src/injected-js/xhr-proxy-factory.test.js +824 -991
- package/src/platform-implementation-js/constants/router.js +14 -9
- package/src/platform-implementation-js/constants/toolbars.js +8 -3
- package/src/platform-implementation-js/dom-driver/gmail/custom-style.js +13 -13
- package/src/platform-implementation-js/dom-driver/gmail/gmail-butter-bar-driver.js +115 -136
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/add-toolbar-button-for-app.js +13 -14
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/create-link.js +27 -48
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/get-draft-id-for-message-id.js +31 -42
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/get-native-nav-item.js +30 -40
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/get-url-object.js +10 -18
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/getSyncThreadForOldGmailThreadId.js +21 -28
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/getSyncThreadFromSyncThreadId.js +33 -45
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/gmail-load-event.js +31 -49
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/goto-view.js +58 -65
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/keyboard-shortcut-help-modifier.js +40 -124
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/open-compose-window.js +17 -22
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/open-draft-by-message-id.test.js +10 -11
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/override-gmail-back-button.js +44 -80
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/register-search-query-rewriter.js +19 -26
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/register-search-suggestions-provider.js +71 -147
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/setup-compose-view-driver-stream.js +91 -148
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/setup-route-view-driver-stream.js +150 -166
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/setup-route-view-driver-stream.test.js +70 -120
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/show-app-id-warning.js +15 -15
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/show-custom-route-view.js +44 -67
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/show-custom-thread-list.js +230 -379
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/show-custom-thread-list.test.js +121 -307
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/show-native-route-view.js +17 -24
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/suppressAddon.js +41 -49
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/temporary-track-download-url-validity.js +30 -40
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/thread-row-identifier.js +28 -60
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/track-events.js +61 -133
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/user-info.js +30 -42
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/user-info.test.js +52 -46
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver.js +354 -694
- package/src/platform-implementation-js/dom-driver/gmail/make-xhr-interceptor.js +77 -93
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-app-sidebar-view/index.js +35 -82
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-app-sidebar-view/index.test.js +44 -94
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-app-sidebar-view/primary/add-companion-global-icon-area.js +12 -19
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-app-sidebar-view/primary/add-companion-thread-icon-area.js +17 -29
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-app-sidebar-view/primary/add-to-icon-area.js +26 -26
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-app-sidebar-view/primary/index.js +391 -797
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-app-toolbar-button-view/monitor-top-banner-size-and-react.js +7 -9
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-app-toolbar-button-view.js +60 -109
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-attachment-area-view.js +95 -135
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-attachment-card-view.js +103 -211
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-attachment-card-view.test.js +61 -61
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-backdrop.js +17 -17
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-collapsible-section-view.js +188 -541
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/add-button.js +67 -135
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/add-compose-notice.js +27 -49
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/add-inner-sidebar.js +7 -13
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/add-outer-sidebar.js +9 -22
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/add-recipient-row.js +36 -63
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/add-tooltip-to-button.js +38 -113
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/ensure-app-button-toolbars-are-closed.js +11 -16
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/ensure-grouping-is-open.js +11 -17
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/focus.js +8 -11
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/from-manager.js +27 -47
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/get-additional-action-toolbar.js +11 -24
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/get-address-changes-stream.js +59 -111
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/get-body-changes-stream.js +15 -14
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/get-formatting-area-offset-left.js +11 -17
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/get-minimized-stream.js +18 -24
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/get-response-type-changes-stream.js +19 -23
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/insert-link-into-body.js +11 -19
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/manage-button-grouping.js +141 -376
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/monitor-selection-range.js +17 -28
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/override-edit-subject.js +34 -70
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/position-formatting-toolbar.js +10 -17
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/size-fixer.js +83 -137
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/update-insert-more-area-left.js +10 -19
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view.js +632 -1190
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-message-view/get-updated-contact.js +29 -38
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-message-view.js +327 -617
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-route-view/gmail-route-processor.js +26 -49
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-route-view/gmail-route-view.js +188 -380
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-row-list-view.js +104 -194
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-thread-row-view.js +382 -811
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-thread-sidebar-view/add-icon-area.js +34 -58
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-thread-sidebar-view.js +330 -581
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-thread-sidebar-view.test.js +123 -277
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-thread-view/width-manager.js +15 -35
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-thread-view.js +216 -571
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-toolbar-view.js +152 -336
- package/src/platform-implementation-js/dom-driver/gmail/views/native-gmail-nav-item-view.js +87 -211
- package/src/platform-implementation-js/dom-driver/gmail/widgets/buttons/inbox-dropdown-button-view.js +10 -11
- package/src/platform-implementation-js/dom-driver/gmail/widgets/gmail-action-button-view.js +20 -29
- package/src/platform-implementation-js/dom-driver/gmail/widgets/gmail-label-view.js +41 -76
- package/src/platform-implementation-js/dom-driver/gmail/widgets/gmail-modal-view-driver.js +45 -99
- package/src/platform-implementation-js/dom-driver/gmail/widgets/gmail-mole-view-driver.js +76 -128
- package/src/platform-implementation-js/dom-driver/gmail/widgets/gmail-tooltip-view.js +128 -319
- package/src/platform-implementation-js/dom-driver/gmail/widgets/gmail-top-message-bar-driver.js +45 -78
- package/src/platform-implementation-js/dom-driver/inbox/__mocks__/getSidebarClassnames.js +8 -4
- package/src/platform-implementation-js/dom-driver/inbox/addNavItem.js +36 -54
- package/src/platform-implementation-js/dom-driver/inbox/addRecipientRow.js +35 -53
- package/src/platform-implementation-js/dom-driver/inbox/createLink.js +13 -15
- package/src/platform-implementation-js/dom-driver/inbox/createLink.test.js +15 -18
- package/src/platform-implementation-js/dom-driver/inbox/custom-style.js +14 -13
- package/src/platform-implementation-js/dom-driver/inbox/detection/appToolbarLocation/parser.js +14 -20
- package/src/platform-implementation-js/dom-driver/inbox/detection/attachmentCard/parser.js +14 -13
- package/src/platform-implementation-js/dom-driver/inbox/detection/attachmentOverlay/parser.js +35 -67
- package/src/platform-implementation-js/dom-driver/inbox/detection/chatSidebar/parser.js +16 -18
- package/src/platform-implementation-js/dom-driver/inbox/detection/compose/parser.js +68 -185
- package/src/platform-implementation-js/dom-driver/inbox/detection/message/parser.js +28 -56
- package/src/platform-implementation-js/dom-driver/inbox/detection/nativeDrawer/parser.js +12 -10
- package/src/platform-implementation-js/dom-driver/inbox/detection/searchBar/parser.js +16 -16
- package/src/platform-implementation-js/dom-driver/inbox/detection/thread/parser.js +24 -35
- package/src/platform-implementation-js/dom-driver/inbox/detection/thread-row/parser.js +37 -89
- package/src/platform-implementation-js/dom-driver/inbox/getComposeViewDriverLiveSet.js +56 -78
- package/src/platform-implementation-js/dom-driver/inbox/getInboxMessageIdForInboxThreadId.js +26 -32
- package/src/platform-implementation-js/dom-driver/inbox/getSidebarClassnames.js +52 -109
- package/src/platform-implementation-js/dom-driver/inbox/getSidebarClassnames.test.js +7 -8
- package/src/platform-implementation-js/dom-driver/inbox/gotoView.js +16 -20
- package/src/platform-implementation-js/dom-driver/inbox/gotoView.test.js +15 -16
- package/src/platform-implementation-js/dom-driver/inbox/inbox-butter-bar-driver.js +75 -83
- package/src/platform-implementation-js/dom-driver/inbox/inbox-driver.js +530 -822
- package/src/platform-implementation-js/dom-driver/inbox/inbox-page-communicator.js +48 -61
- package/src/platform-implementation-js/dom-driver/inbox/inboxResponseProcessor.js +9 -12
- package/src/platform-implementation-js/dom-driver/inbox/inboxResponseProcessor.test.js +12 -19
- package/src/platform-implementation-js/dom-driver/inbox/makePageParserTree.js +24 -33
- package/src/platform-implementation-js/dom-driver/inbox/pageParserOptions.js +201 -388
- package/src/platform-implementation-js/dom-driver/inbox/registerSearchSuggestionsProvider.js +249 -265
- package/src/platform-implementation-js/dom-driver/inbox/setupCustomAutocompleteSelectionHandling.js +84 -152
- package/src/platform-implementation-js/dom-driver/inbox/setupRouteViewDriverStream.js +55 -67
- package/src/platform-implementation-js/dom-driver/inbox/setupRouteViewDriverStream.test.js +43 -65
- package/src/platform-implementation-js/dom-driver/inbox/views/InboxLabelView.js +31 -56
- package/src/platform-implementation-js/dom-driver/inbox/views/InboxMoleViewDriver.js +191 -294
- package/src/platform-implementation-js/dom-driver/inbox/views/InboxToolbarButtonView.js +32 -45
- package/src/platform-implementation-js/dom-driver/inbox/views/InboxToolbarView.js +21 -39
- package/src/platform-implementation-js/dom-driver/inbox/views/inbox-app-sidebar-view.js +153 -240
- package/src/platform-implementation-js/dom-driver/inbox/views/inbox-app-toolbar-button-view.js +75 -150
- package/src/platform-implementation-js/dom-driver/inbox/views/inbox-app-toolbar-tooltip-view.js +20 -37
- package/src/platform-implementation-js/dom-driver/inbox/views/inbox-attachment-card-view.js +60 -114
- package/src/platform-implementation-js/dom-driver/inbox/views/inbox-attachment-overlay-view.js +47 -65
- package/src/platform-implementation-js/dom-driver/inbox/views/inbox-backdrop.js +41 -52
- package/src/platform-implementation-js/dom-driver/inbox/views/inbox-chat-sidebar-view.js +27 -36
- package/src/platform-implementation-js/dom-driver/inbox/views/inbox-compose-button-view.js +52 -80
- package/src/platform-implementation-js/dom-driver/inbox/views/inbox-compose-view.js +465 -649
- package/src/platform-implementation-js/dom-driver/inbox/views/inbox-custom-route-view.js +37 -58
- package/src/platform-implementation-js/dom-driver/inbox/views/inbox-custom-route-view.test.js +14 -26
- package/src/platform-implementation-js/dom-driver/inbox/views/inbox-drawer-view.js +118 -235
- package/src/platform-implementation-js/dom-driver/inbox/views/inbox-dropdown-view.js +10 -11
- package/src/platform-implementation-js/dom-driver/inbox/views/inbox-dummy-route-view.js +28 -46
- package/src/platform-implementation-js/dom-driver/inbox/views/inbox-message-view.js +131 -202
- package/src/platform-implementation-js/dom-driver/inbox/views/inbox-modal-view.js +40 -80
- package/src/platform-implementation-js/dom-driver/inbox/views/inbox-route-view.js +35 -61
- package/src/platform-implementation-js/dom-driver/inbox/views/inbox-thread-row-view.js +124 -221
- package/src/platform-implementation-js/dom-driver/inbox/views/inbox-thread-view.js +125 -213
- package/src/platform-implementation-js/dom-driver/inbox/views/inbox-thread-view.test.js +104 -126
- package/src/platform-implementation-js/dom-driver/inbox/views/inbox-tooltip-view.js +36 -51
- package/src/platform-implementation-js/dom-driver/inbox/views/inboxNavItemView.js +158 -297
- package/src/platform-implementation-js/dom-driver/inbox/waitForAnimationClickBlockerGone.js +21 -35
- package/src/platform-implementation-js/driver-common/compose/getDiscardStream.js +24 -43
- package/src/platform-implementation-js/driver-common/compose/getPresendingStream.js +39 -68
- package/src/platform-implementation-js/driver-common/getGmailMessageIdForSyncMessageId.js +14 -19
- package/src/platform-implementation-js/driver-common/getGmailThreadIdForRfcMessageId.js +27 -35
- package/src/platform-implementation-js/driver-common/getRfcMessageIdForSyncMessageId.js +16 -22
- package/src/platform-implementation-js/driver-common/getThreadIdFromMessageId.js +14 -14
- package/src/platform-implementation-js/driver-common/inboxAjax.js +12 -7
- package/src/platform-implementation-js/driver-common/requestGmailThread.js +19 -20
- package/src/platform-implementation-js/driver-common/sidebar/AppSidebar.js +197 -306
- package/src/platform-implementation-js/driver-common/sidebar/ContentPanelViewDriver.js +113 -161
- package/src/platform-implementation-js/driver-interfaces/compose-view-driver.js +1 -114
- package/src/platform-implementation-js/driver-interfaces/driver.js +1 -131
- package/src/platform-implementation-js/driver-interfaces/message-view-driver.js +4 -48
- package/src/platform-implementation-js/driver-interfaces/mole-view-driver.js +1 -29
- package/src/platform-implementation-js/driver-interfaces/route-view-driver.js +1 -32
- package/src/platform-implementation-js/driver-interfaces/thread-row-view-driver.js +1 -11
- package/src/platform-implementation-js/lib/array-to-lifetimes.js +43 -41
- package/src/platform-implementation-js/lib/array-to-lifetimes.test.js +139 -155
- package/src/platform-implementation-js/lib/copyAndValidateAutocompleteResults.js +19 -38
- package/src/platform-implementation-js/lib/css-selector-escape.js +7 -3
- package/src/platform-implementation-js/lib/dom/element-view-mapper.js +8 -11
- package/src/platform-implementation-js/lib/dom/get-selection.js +23 -52
- package/src/platform-implementation-js/lib/dom/insert-html-at-cursor.js +69 -101
- package/src/platform-implementation-js/lib/dom/is-node-in-range.js +8 -10
- package/src/platform-implementation-js/lib/dom/on-mouse-down-and-up.js +15 -17
- package/src/platform-implementation-js/lib/dom/querySelectorOne.js +8 -11
- package/src/platform-implementation-js/lib/dom/set-css.js +7 -3
- package/src/platform-implementation-js/lib/dom/set-value-and-dispatch-event.js +9 -11
- package/src/platform-implementation-js/lib/dom/simulate-drag-and-drop.js +32 -33
- package/src/platform-implementation-js/lib/extract-contact-from-email-contact-string.test.js +23 -26
- package/src/platform-implementation-js/lib/handle-compose-link-chips.js +86 -149
- package/src/platform-implementation-js/lib/insert-link-chip-into-body.js +42 -57
- package/src/platform-implementation-js/lib/make-revocable-function.js +19 -21
- package/src/platform-implementation-js/lib/make-revocable-function.test.js +20 -22
- package/src/platform-implementation-js/lib/parseParamsFromRouteID.js +15 -17
- package/src/platform-implementation-js/lib/parseParamsFromRouteID.test.js +9 -18
- package/src/platform-implementation-js/lib/populateRouteID.js +8 -9
- package/src/platform-implementation-js/lib/populateRouteID.test.js +20 -19
- package/src/platform-implementation-js/lib/react/ElementContainer.js +23 -20
- package/src/platform-implementation-js/lib/rewriteCssWithIdMap.js +10 -9
- package/src/platform-implementation-js/lib/rewriteCssWithIdMap.test.js +13 -20
- package/src/platform-implementation-js/lib/routeIDmatchesHash.js +13 -18
- package/src/platform-implementation-js/lib/routeIDmatchesHash.test.js +11 -17
- package/src/platform-implementation-js/lib/shared-style.js +14 -13
- package/src/platform-implementation-js/lib/toItemWithLifetimeStream.js +18 -17
- package/src/platform-implementation-js/lib/toLiveSet.js +17 -15
- package/src/platform-implementation-js/main-INTEGRATED-PAGEWORLD.js +6 -5
- package/src/platform-implementation-js/main.js +9 -24
- package/src/platform-implementation-js/namespaces/compose.js +37 -60
- package/src/platform-implementation-js/namespaces/conversations.js +52 -124
- package/src/platform-implementation-js/namespaces/global.js +27 -39
- package/src/platform-implementation-js/namespaces/keyboard.js +29 -33
- package/src/platform-implementation-js/namespaces/lists.js +25 -31
- package/src/platform-implementation-js/namespaces/modal.js +34 -28
- package/src/platform-implementation-js/namespaces/nav-menu.js +30 -45
- package/src/platform-implementation-js/namespaces/router.js +70 -137
- package/src/platform-implementation-js/namespaces/search.js +19 -17
- package/src/platform-implementation-js/namespaces/toolbars.js +71 -117
- package/src/platform-implementation-js/namespaces/user.js +36 -37
- package/src/platform-implementation-js/namespaces/widgets.js +54 -61
- package/src/platform-implementation-js/platform-implementation.js +98 -229
- package/src/platform-implementation-js/views/app-toolbar-button-view.js +26 -47
- package/src/platform-implementation-js/views/collapsible-section-view.js +66 -63
- package/src/platform-implementation-js/views/content-panel-view.js +28 -30
- package/src/platform-implementation-js/views/conversations/attachment-card-view.js +21 -44
- package/src/platform-implementation-js/views/conversations/custom-message-view.js +44 -104
- package/src/platform-implementation-js/views/conversations/message-view.js +131 -202
- package/src/platform-implementation-js/views/conversations/thread-view.js +75 -127
- package/src/platform-implementation-js/views/native-nav-item-view.js +32 -65
- package/src/platform-implementation-js/views/nav-item-view.js +51 -115
- package/src/platform-implementation-js/views/route-view/custom-route-view.js +25 -20
- package/src/platform-implementation-js/views/route-view/dummy-route-view-driver.js +18 -18
- package/src/platform-implementation-js/views/route-view/list-route-view.js +30 -52
- package/src/platform-implementation-js/views/route-view/route-view.js +24 -35
- package/src/platform-implementation-js/views/section-view.js +60 -52
- package/src/platform-implementation-js/views/thread-row-view.js +49 -74
- package/src/platform-implementation-js/widgets/drawer-view.js +29 -36
- package/src/platform-implementation-js/widgets/modal-view.js +39 -68
- package/src/platform-implementation-js/widgets/mole-view.js +22 -22
- package/src/platform-implementation-js/widgets/top-message-bar-view.js +13 -10
|
@@ -1,301 +1,233 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
getSelectedHTMLInElement,
|
|
37
|
-
getSelectedTextInElement,
|
|
38
|
-
} from '../../../lib/dom/get-selection';
|
|
39
|
-
import getGmailThreadIdForRfcMessageId from '../../../driver-common/getGmailThreadIdForRfcMessageId';
|
|
40
|
-
|
|
41
|
-
import type { Parsed } from '../detection/compose/parser';
|
|
42
|
-
|
|
43
|
-
let cachedFromContacts: ?Array<Contact> = null;
|
|
44
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _escape = _interopRequireDefault(require("lodash/escape"));
|
|
10
|
+
var _find = _interopRequireDefault(require("lodash/find"));
|
|
11
|
+
var _ud = require("ud");
|
|
12
|
+
var _closestNg = _interopRequireDefault(require("closest-ng"));
|
|
13
|
+
var _kefir = _interopRequireDefault(require("kefir"));
|
|
14
|
+
var _kefirStopper = _interopRequireDefault(require("kefir-stopper"));
|
|
15
|
+
var _kefirBus = _interopRequireDefault(require("kefir-bus"));
|
|
16
|
+
var _autoHtml = _interopRequireDefault(require("auto-html"));
|
|
17
|
+
var _censorHTMLstring = _interopRequireDefault(require("../../../../common/censorHTMLstring"));
|
|
18
|
+
var _delayAsap = _interopRequireDefault(require("../../../lib/delay-asap"));
|
|
19
|
+
var _arrayToLifetimes = _interopRequireDefault(require("../../../lib/array-to-lifetimes"));
|
|
20
|
+
var _querySelectorOrFail = _interopRequireDefault(require("../../../lib/dom/querySelectorOrFail"));
|
|
21
|
+
var _makeMutationObserverChunkedStream = _interopRequireDefault(require("../../../lib/dom/make-mutation-observer-chunked-stream"));
|
|
22
|
+
var _simulateMouseEvent = require("../../../lib/dom/simulate-mouse-event");
|
|
23
|
+
var _simulateKey = _interopRequireDefault(require("../../../lib/dom/simulate-key"));
|
|
24
|
+
var _insertHtmlAtCursor = _interopRequireDefault(require("../../../lib/dom/insert-html-at-cursor"));
|
|
25
|
+
var _querySelectorOne = _interopRequireDefault(require("../../../lib/dom/querySelectorOne"));
|
|
26
|
+
var _ErrorCollector = _interopRequireDefault(require("../../../lib/ErrorCollector"));
|
|
27
|
+
var _handleComposeLinkChips = _interopRequireDefault(require("../../../lib/handle-compose-link-chips"));
|
|
28
|
+
var _insertLinkChipIntoBody = _interopRequireDefault(require("../../../lib/insert-link-chip-into-body"));
|
|
29
|
+
var _getPresendingStream = _interopRequireDefault(require("../../../driver-common/compose/getPresendingStream"));
|
|
30
|
+
var _getDiscardStream = _interopRequireDefault(require("../../../driver-common/compose/getDiscardStream"));
|
|
31
|
+
var _addRecipientRow = _interopRequireDefault(require("../addRecipientRow"));
|
|
32
|
+
var _inboxComposeButtonView = _interopRequireDefault(require("./inbox-compose-button-view"));
|
|
33
|
+
var _getSelection = require("../../../lib/dom/get-selection");
|
|
34
|
+
var _getGmailThreadIdForRfcMessageId = _interopRequireDefault(require("../../../driver-common/getGmailThreadIdForRfcMessageId"));
|
|
35
|
+
let cachedFromContacts = null;
|
|
45
36
|
class InboxComposeView {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
_lastBodySelectionRange: ?Range;
|
|
55
|
-
_draftID: string;
|
|
56
|
-
_isMinimized: boolean = false;
|
|
57
|
-
_isFullscreenMode: boolean = false;
|
|
58
|
-
_isPresending: boolean = false;
|
|
59
|
-
_closedProgrammatically: boolean = false;
|
|
60
|
-
_p: Parsed;
|
|
61
|
-
_els: *;
|
|
62
|
-
|
|
63
|
-
constructor(driver: InboxDriver, el: HTMLElement, parsed: Parsed) {
|
|
64
|
-
(this: ComposeViewDriver);
|
|
37
|
+
constructor(driver, el, parsed) {
|
|
38
|
+
(0, _defineProperty2.default)(this, "_eventStream", (0, _kefirBus.default)());
|
|
39
|
+
(0, _defineProperty2.default)(this, "_stopper", (0, _kefirStopper.default)());
|
|
40
|
+
(0, _defineProperty2.default)(this, "_isMinimized", false);
|
|
41
|
+
(0, _defineProperty2.default)(this, "_isFullscreenMode", false);
|
|
42
|
+
(0, _defineProperty2.default)(this, "_isPresending", false);
|
|
43
|
+
(0, _defineProperty2.default)(this, "_closedProgrammatically", false);
|
|
44
|
+
this;
|
|
65
45
|
this._element = el;
|
|
66
46
|
this._driver = driver;
|
|
67
47
|
this._modifierButtonContainer = null;
|
|
68
48
|
this._lastBodySelectionRange = null;
|
|
69
49
|
this._p = parsed;
|
|
70
50
|
this._els = parsed.elements;
|
|
71
|
-
|
|
72
|
-
const bottomAreaElementCount =
|
|
73
|
-
this._els.sendBtn &&
|
|
74
|
-
this._els.sendBtn.parentElement &&
|
|
75
|
-
this._els.sendBtn.parentElement.childElementCount;
|
|
76
|
-
|
|
51
|
+
const bottomAreaElementCount = this._els.sendBtn && this._els.sendBtn.parentElement && this._els.sendBtn.parentElement.childElementCount;
|
|
77
52
|
this._driver.getLogger().eventSite('compose open', {
|
|
78
53
|
errorCount: this._p.errors.length,
|
|
79
54
|
bottomAreaElementCount,
|
|
80
|
-
isInline: this._p.attributes.isInline
|
|
55
|
+
isInline: this._p.attributes.isInline
|
|
81
56
|
});
|
|
82
|
-
|
|
83
|
-
const draftSaveTriggerer = kefirBus();
|
|
57
|
+
const draftSaveTriggerer = (0, _kefirBus.default)();
|
|
84
58
|
this._queueDraftSave = () => {
|
|
85
59
|
draftSaveTriggerer.emit(null);
|
|
86
60
|
};
|
|
87
|
-
|
|
88
61
|
const bodyEl = this._els.body;
|
|
89
62
|
if (bodyEl) {
|
|
90
|
-
draftSaveTriggerer
|
|
91
|
-
.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
.silenceGmailErrorsForAMoment();
|
|
98
|
-
try {
|
|
99
|
-
simulateKey(bodyEl, 13, 0);
|
|
100
|
-
} finally {
|
|
101
|
-
unsilence();
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
Kefir.merge([
|
|
106
|
-
Kefir.fromEvents((document.body: any), 'mousedown'),
|
|
107
|
-
Kefir.fromEvents((document.body: any), 'keydown'),
|
|
108
|
-
])
|
|
109
|
-
.takeUntilBy(this.getStopper())
|
|
110
|
-
.onValue((event) => {
|
|
111
|
-
const selection = (document: any).getSelection();
|
|
112
|
-
if (
|
|
113
|
-
selection.rangeCount > 0 &&
|
|
114
|
-
bodyEl.contains(selection.anchorNode)
|
|
115
|
-
) {
|
|
116
|
-
this._lastBodySelectionRange = selection.getRangeAt(0);
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
this._eventStream.plug(
|
|
121
|
-
makeMutationObserverChunkedStream(bodyEl, {
|
|
122
|
-
childList: true,
|
|
123
|
-
subtree: true,
|
|
124
|
-
characterData: true,
|
|
125
|
-
}).map(() => ({ eventName: 'bodyChanged' }))
|
|
126
|
-
);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
Kefir.fromEvents(this._element, 'closedProgrammatically')
|
|
130
|
-
.takeUntilBy(this._stopper)
|
|
131
|
-
.onValue(() => {
|
|
132
|
-
this._closedProgrammatically = true;
|
|
63
|
+
draftSaveTriggerer.bufferBy(draftSaveTriggerer.flatMap(() => (0, _delayAsap.default)(null))).filter(x => x.length > 0).takeUntilBy(this._stopper).onValue(() => {
|
|
64
|
+
var unsilence = this._driver.getPageCommunicator().silenceGmailErrorsForAMoment();
|
|
65
|
+
try {
|
|
66
|
+
(0, _simulateKey.default)(bodyEl, 13, 0);
|
|
67
|
+
} finally {
|
|
68
|
+
unsilence();
|
|
69
|
+
}
|
|
133
70
|
});
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
.
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
71
|
+
_kefir.default.merge([_kefir.default.fromEvents(document.body, 'mousedown'), _kefir.default.fromEvents(document.body, 'keydown')]).takeUntilBy(this.getStopper()).onValue(event => {
|
|
72
|
+
const selection = document.getSelection();
|
|
73
|
+
if (selection.rangeCount > 0 && bodyEl.contains(selection.anchorNode)) {
|
|
74
|
+
this._lastBodySelectionRange = selection.getRangeAt(0);
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
this._eventStream.plug((0, _makeMutationObserverChunkedStream.default)(bodyEl, {
|
|
78
|
+
childList: true,
|
|
79
|
+
subtree: true,
|
|
80
|
+
characterData: true
|
|
81
|
+
}).map(() => ({
|
|
82
|
+
eventName: 'bodyChanged'
|
|
83
|
+
})));
|
|
84
|
+
}
|
|
85
|
+
_kefir.default.fromEvents(this._element, 'closedProgrammatically').takeUntilBy(this._stopper).onValue(() => {
|
|
86
|
+
this._closedProgrammatically = true;
|
|
87
|
+
});
|
|
88
|
+
this._draftID = this._driver.getPageCommunicator().getDraftIDForComposeView(this.getElement());
|
|
89
|
+
this._ajaxInterceptStream = this._driver.getPageCommunicator().ajaxInterceptStream.takeUntilBy(this._stopper).filter(_ref => {
|
|
90
|
+
let {
|
|
91
|
+
draftID
|
|
92
|
+
} = _ref;
|
|
93
|
+
return draftID === this._draftID;
|
|
94
|
+
});
|
|
144
95
|
this._setupStreams();
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
.takeUntilBy(sendCanceledStream)
|
|
175
|
-
.takeUntilBy(this._stopper)
|
|
176
|
-
.take(1)
|
|
177
|
-
.takeErrors(1);
|
|
178
|
-
|
|
179
|
-
this._sendingStream
|
|
180
|
-
.onValue(() => {
|
|
181
|
-
this._isPresending = false;
|
|
182
|
-
})
|
|
183
|
-
.onError((error) => {
|
|
184
|
-
this._driver.getLogger().error(error);
|
|
185
|
-
});
|
|
186
|
-
this._driver.getPageCommunicator().notifyEmailSending();
|
|
187
|
-
if (!this._p.attributes.isInline) {
|
|
188
|
-
// TODO make this code less fragile on slow machines/connections
|
|
189
|
-
Kefir.later(5 * 1000)
|
|
190
|
-
.takeUntilBy(
|
|
191
|
-
this.getEventStream().filter(
|
|
192
|
-
({ eventName }) =>
|
|
193
|
-
['sendCanceled', 'presending'].indexOf(eventName) !== -1
|
|
194
|
-
)
|
|
195
|
-
)
|
|
196
|
-
.onValue(() => {
|
|
197
|
-
// In cases where Inbox decides to cancel the send client-side,
|
|
198
|
-
// we need to make sure we realize sending is not going to happen
|
|
199
|
-
// and inform consumers who might be expecting a send.
|
|
200
|
-
// The most common case for this is trying to send an email
|
|
201
|
-
// with no recipients.
|
|
202
|
-
if (document.contains(this._element)) {
|
|
203
|
-
this._eventStream.emit({ eventName: 'sendCanceled' });
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
} else if (eventName === 'sendCanceled') {
|
|
96
|
+
this.getEventStream().takeUntilBy(this._stopper).onValue(_ref2 => {
|
|
97
|
+
let {
|
|
98
|
+
eventName
|
|
99
|
+
} = _ref2;
|
|
100
|
+
if (eventName === 'presending') {
|
|
101
|
+
this._isPresending = true;
|
|
102
|
+
const sendCanceledStream = this.getEventStream().filter(_ref3 => {
|
|
103
|
+
let {
|
|
104
|
+
eventName
|
|
105
|
+
} = _ref3;
|
|
106
|
+
return eventName === 'sendCanceled';
|
|
107
|
+
});
|
|
108
|
+
this._sendingStream = _kefir.default.merge([_kefir.default.combine([this.getEventStream().filter(_ref4 => {
|
|
109
|
+
let {
|
|
110
|
+
eventName
|
|
111
|
+
} = _ref4;
|
|
112
|
+
return eventName === 'sending';
|
|
113
|
+
}), this.getEventStream().filter(_ref5 => {
|
|
114
|
+
let {
|
|
115
|
+
eventName
|
|
116
|
+
} = _ref5;
|
|
117
|
+
return eventName === 'sent';
|
|
118
|
+
})]), this._ajaxInterceptStream.filter(_ref6 => {
|
|
119
|
+
let {
|
|
120
|
+
type
|
|
121
|
+
} = _ref6;
|
|
122
|
+
return type === 'emailSendFailed';
|
|
123
|
+
}), _kefir.default.later(60 * 1000).flatMap(() => _kefir.default.constantError(new Error('Timed out waiting for ComposeView send')))]).takeUntilBy(sendCanceledStream).takeUntilBy(this._stopper).take(1).takeErrors(1);
|
|
124
|
+
this._sendingStream.onValue(() => {
|
|
208
125
|
this._isPresending = false;
|
|
209
|
-
|
|
126
|
+
}).onError(error => {
|
|
127
|
+
this._driver.getLogger().error(error);
|
|
128
|
+
});
|
|
129
|
+
this._driver.getPageCommunicator().notifyEmailSending();
|
|
130
|
+
if (!this._p.attributes.isInline) {
|
|
131
|
+
// TODO make this code less fragile on slow machines/connections
|
|
132
|
+
_kefir.default.later(5 * 1000).takeUntilBy(this.getEventStream().filter(_ref7 => {
|
|
133
|
+
let {
|
|
134
|
+
eventName
|
|
135
|
+
} = _ref7;
|
|
136
|
+
return ['sendCanceled', 'presending'].indexOf(eventName) !== -1;
|
|
137
|
+
})).onValue(() => {
|
|
138
|
+
// In cases where Inbox decides to cancel the send client-side,
|
|
139
|
+
// we need to make sure we realize sending is not going to happen
|
|
140
|
+
// and inform consumers who might be expecting a send.
|
|
141
|
+
// The most common case for this is trying to send an email
|
|
142
|
+
// with no recipients.
|
|
143
|
+
if (document.contains(this._element)) {
|
|
144
|
+
this._eventStream.emit({
|
|
145
|
+
eventName: 'sendCanceled'
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
});
|
|
210
149
|
}
|
|
211
|
-
})
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
150
|
+
} else if (eventName === 'sendCanceled') {
|
|
151
|
+
this._isPresending = false;
|
|
152
|
+
this._driver.getPageCommunicator().notifyEmailSendCanceled();
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
(0, _handleComposeLinkChips.default)(this);
|
|
156
|
+
const {
|
|
157
|
+
fromPickerEmailSpan
|
|
158
|
+
} = this._els;
|
|
216
159
|
if (fromPickerEmailSpan) {
|
|
217
|
-
this._eventStream.plug(
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
}
|
|
226
|
-
);
|
|
160
|
+
this._eventStream.plug((0, _makeMutationObserverChunkedStream.default)(fromPickerEmailSpan, {
|
|
161
|
+
childList: true,
|
|
162
|
+
subtree: true,
|
|
163
|
+
characterData: true
|
|
164
|
+
}).map(() => ({
|
|
165
|
+
eventName: 'fromContactChanged',
|
|
166
|
+
data: {
|
|
167
|
+
contact: this.getFromContact()
|
|
168
|
+
}
|
|
169
|
+
})));
|
|
227
170
|
}
|
|
228
|
-
|
|
229
|
-
|
|
171
|
+
const {
|
|
172
|
+
minimizeBtnImage
|
|
173
|
+
} = this._els;
|
|
230
174
|
if (minimizeBtnImage) {
|
|
231
175
|
const isMinimized = () => /_maximize_/.test(minimizeBtnImage.src);
|
|
232
|
-
const minimizeButtonChanges =
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
)
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
});
|
|
242
|
-
this._eventStream.plug(
|
|
243
|
-
minimizeButtonChanges.map(() => ({
|
|
244
|
-
eventName: isMinimized() ? 'minimized' : 'restored',
|
|
245
|
-
}))
|
|
246
|
-
);
|
|
176
|
+
const minimizeButtonChanges = (0, _makeMutationObserverChunkedStream.default)(minimizeBtnImage, {
|
|
177
|
+
attributes: true
|
|
178
|
+
});
|
|
179
|
+
minimizeButtonChanges.toProperty(() => null).takeUntilBy(this._stopper).onValue(() => {
|
|
180
|
+
this._isMinimized = isMinimized();
|
|
181
|
+
});
|
|
182
|
+
this._eventStream.plug(minimizeButtonChanges.map(() => ({
|
|
183
|
+
eventName: isMinimized() ? 'minimized' : 'restored'
|
|
184
|
+
})));
|
|
247
185
|
}
|
|
248
|
-
|
|
249
|
-
|
|
186
|
+
const {
|
|
187
|
+
toggleFullscreenButtonImage
|
|
188
|
+
} = this._els;
|
|
250
189
|
if (toggleFullscreenButtonImage) {
|
|
251
|
-
const isFullscreenMode = () =>
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
toggleButtonChanges.map(() => ({
|
|
265
|
-
eventName: 'fullscreenChanged',
|
|
266
|
-
data: { fullscreen: isFullscreenMode() },
|
|
267
|
-
}))
|
|
268
|
-
);
|
|
190
|
+
const isFullscreenMode = () => !/_enter_full_screen/.test(toggleFullscreenButtonImage.src);
|
|
191
|
+
const toggleButtonChanges = (0, _makeMutationObserverChunkedStream.default)(toggleFullscreenButtonImage, {
|
|
192
|
+
attributes: true
|
|
193
|
+
});
|
|
194
|
+
toggleButtonChanges.toProperty(() => null).takeUntilBy(this._stopper).onValue(() => {
|
|
195
|
+
this._isFullscreenMode = isFullscreenMode();
|
|
196
|
+
});
|
|
197
|
+
this._eventStream.plug(toggleButtonChanges.map(() => ({
|
|
198
|
+
eventName: 'fullscreenChanged',
|
|
199
|
+
data: {
|
|
200
|
+
fullscreen: isFullscreenMode()
|
|
201
|
+
}
|
|
202
|
+
})));
|
|
269
203
|
}
|
|
270
204
|
}
|
|
271
205
|
removedFromDOM() {
|
|
272
206
|
// The element of an inline draft may be re-used with a new ID.
|
|
273
207
|
this._element.removeAttribute('data-inboxsdk-draft-id');
|
|
274
|
-
|
|
275
208
|
const cleanup = () => {
|
|
276
209
|
this._eventStream.emit({
|
|
277
210
|
eventName: 'destroy',
|
|
278
211
|
data: {
|
|
279
|
-
closedByInboxSDK: this._closedProgrammatically
|
|
280
|
-
}
|
|
212
|
+
closedByInboxSDK: this._closedProgrammatically
|
|
213
|
+
}
|
|
281
214
|
});
|
|
282
215
|
this._eventStream.end();
|
|
283
216
|
this._stopper.destroy();
|
|
284
217
|
};
|
|
285
|
-
|
|
286
218
|
if (this._isPresending) {
|
|
287
219
|
this._sendingStream && this._sendingStream.onEnd(cleanup);
|
|
288
220
|
} else {
|
|
289
221
|
cleanup();
|
|
290
222
|
}
|
|
291
223
|
}
|
|
292
|
-
getEventStream()
|
|
224
|
+
getEventStream() {
|
|
293
225
|
return this._eventStream;
|
|
294
226
|
}
|
|
295
|
-
getStopper()
|
|
227
|
+
getStopper() {
|
|
296
228
|
return this._stopper;
|
|
297
229
|
}
|
|
298
|
-
getElement()
|
|
230
|
+
getElement() {
|
|
299
231
|
return this._element;
|
|
300
232
|
}
|
|
301
233
|
// Call this whenever we change the body directly by mucking with the
|
|
@@ -314,160 +246,132 @@ class InboxComposeView {
|
|
|
314
246
|
this._queueDraftSave();
|
|
315
247
|
}
|
|
316
248
|
_getAddressChangesStream() {
|
|
317
|
-
const {
|
|
318
|
-
|
|
249
|
+
const {
|
|
250
|
+
toInput,
|
|
251
|
+
ccInput,
|
|
252
|
+
bccInput
|
|
253
|
+
} = this._els;
|
|
319
254
|
function makeChangesStream(prefix, input, cb) {
|
|
320
|
-
if (!input) return
|
|
321
|
-
const contactArrayStream =
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
255
|
+
if (!input) return _kefir.default.never();
|
|
256
|
+
const contactArrayStream = (0, _makeMutationObserverChunkedStream.default)(input.parentElement, {
|
|
257
|
+
childList: true,
|
|
258
|
+
attributes: true,
|
|
259
|
+
subtree: true
|
|
260
|
+
}).merge(_kefir.default.later(0)).map(cb);
|
|
261
|
+
return (0, _arrayToLifetimes.default)(contactArrayStream, c => c.emailAddress).flatMap(_ref8 => {
|
|
262
|
+
let {
|
|
263
|
+
el,
|
|
264
|
+
removalStream
|
|
265
|
+
} = _ref8;
|
|
266
|
+
return _kefir.default.constant({
|
|
332
267
|
eventName: prefix + 'ContactAdded',
|
|
333
|
-
data: {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
268
|
+
data: {
|
|
269
|
+
contact: el
|
|
270
|
+
}
|
|
271
|
+
}).merge(removalStream.map(() => ({
|
|
272
|
+
eventName: prefix + 'ContactRemoved',
|
|
273
|
+
data: {
|
|
274
|
+
contact: el
|
|
275
|
+
}
|
|
276
|
+
})));
|
|
277
|
+
});
|
|
341
278
|
}
|
|
342
|
-
|
|
343
|
-
return Kefir.merge([
|
|
344
|
-
makeChangesStream('to', toInput, () => this.getToRecipients()),
|
|
345
|
-
makeChangesStream('cc', ccInput, () => this.getCcRecipients()),
|
|
346
|
-
makeChangesStream('bcc', bccInput, () => this.getBccRecipients()),
|
|
347
|
-
]).takeUntilBy(this._stopper);
|
|
279
|
+
return _kefir.default.merge([makeChangesStream('to', toInput, () => this.getToRecipients()), makeChangesStream('cc', ccInput, () => this.getCcRecipients()), makeChangesStream('bcc', bccInput, () => this.getBccRecipients())]).takeUntilBy(this._stopper);
|
|
348
280
|
}
|
|
349
281
|
_setupStreams() {
|
|
350
282
|
this._eventStream.plug(this._getAddressChangesStream());
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
this._eventStream.plug(
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
);
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
)
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
.getLogger()
|
|
402
|
-
.deprecationWarning(
|
|
403
|
-
`ComposeView sent event.${name}`,
|
|
404
|
-
'ComposeView sent event.getThreadID() or event.getMessageID()'
|
|
405
|
-
);
|
|
406
|
-
throw new Error('Not supported');
|
|
407
|
-
},
|
|
408
|
-
});
|
|
409
|
-
}
|
|
410
|
-
);
|
|
411
|
-
return { eventName: 'sent', data };
|
|
412
|
-
})
|
|
413
|
-
);
|
|
414
|
-
}
|
|
415
|
-
getFromContact(): Contact {
|
|
416
|
-
const { fromPickerEmailSpan } = this._els;
|
|
283
|
+
this._eventStream.plug((0, _getPresendingStream.default)({
|
|
284
|
+
element: this.getElement(),
|
|
285
|
+
sendButton: this.getSendButton()
|
|
286
|
+
}));
|
|
287
|
+
this._eventStream.plug((0, _getDiscardStream.default)({
|
|
288
|
+
element: this.getElement(),
|
|
289
|
+
discardButton: this.getDiscardButton()
|
|
290
|
+
}));
|
|
291
|
+
this._eventStream.plug(_kefir.default.fromEvents(this.getElement(), 'inboxSDKsendCanceled').map(() => ({
|
|
292
|
+
eventName: 'sendCanceled'
|
|
293
|
+
})));
|
|
294
|
+
this._eventStream.plug(_kefir.default.fromEvents(this.getElement(), 'inboxSDKdiscardCanceled').map(() => ({
|
|
295
|
+
eventName: 'discardCanceled'
|
|
296
|
+
})));
|
|
297
|
+
this._eventStream.plug(this._ajaxInterceptStream.filter(_ref9 => {
|
|
298
|
+
let {
|
|
299
|
+
type
|
|
300
|
+
} = _ref9;
|
|
301
|
+
return type === 'emailSending';
|
|
302
|
+
}).map(() => ({
|
|
303
|
+
eventName: 'sending'
|
|
304
|
+
})));
|
|
305
|
+
this._eventStream.plug(this._ajaxInterceptStream.filter(_ref10 => {
|
|
306
|
+
let {
|
|
307
|
+
type
|
|
308
|
+
} = _ref10;
|
|
309
|
+
return type === 'emailSent';
|
|
310
|
+
}).map(event => {
|
|
311
|
+
const data = {
|
|
312
|
+
getThreadID: () => (0, _getGmailThreadIdForRfcMessageId.default)(this._driver, event.rfcID),
|
|
313
|
+
getMessageID: () => this._driver.getGmailMessageIdForSyncMessageId(`msg-a:${event.draftID}`)
|
|
314
|
+
};
|
|
315
|
+
['gmailThreadId', 'gmailMessageId', 'threadID', 'messageID'].forEach(name => {
|
|
316
|
+
Object.defineProperty(data, name, {
|
|
317
|
+
get: () => {
|
|
318
|
+
this._driver.getLogger().deprecationWarning(`ComposeView sent event.${name}`, 'ComposeView sent event.getThreadID() or event.getMessageID()');
|
|
319
|
+
throw new Error('Not supported');
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
});
|
|
323
|
+
return {
|
|
324
|
+
eventName: 'sent',
|
|
325
|
+
data
|
|
326
|
+
};
|
|
327
|
+
}));
|
|
328
|
+
}
|
|
329
|
+
getFromContact() {
|
|
330
|
+
const {
|
|
331
|
+
fromPickerEmailSpan
|
|
332
|
+
} = this._els;
|
|
417
333
|
if (!fromPickerEmailSpan) {
|
|
418
334
|
return this._driver.getUserContact();
|
|
419
335
|
}
|
|
420
336
|
const email = fromPickerEmailSpan.textContent;
|
|
421
|
-
const contact =
|
|
422
|
-
this.getFromContactChoices(),
|
|
423
|
-
(c) => c.emailAddress === email
|
|
424
|
-
);
|
|
337
|
+
const contact = (0, _find.default)(this.getFromContactChoices(), c => c.emailAddress === email);
|
|
425
338
|
if (!contact) {
|
|
426
339
|
throw new Error('Failed to find from contact');
|
|
427
340
|
}
|
|
428
341
|
return contact;
|
|
429
342
|
}
|
|
430
|
-
getFromContactChoices()
|
|
431
|
-
if (this._p.attributes.isInline)
|
|
432
|
-
throw new Error("Can't get from values of inline compose");
|
|
343
|
+
getFromContactChoices() {
|
|
344
|
+
if (this._p.attributes.isInline) throw new Error("Can't get from values of inline compose");
|
|
433
345
|
if (cachedFromContacts) {
|
|
434
346
|
return cachedFromContacts;
|
|
435
347
|
}
|
|
436
|
-
const {
|
|
348
|
+
const {
|
|
349
|
+
fromPicker
|
|
350
|
+
} = this._els;
|
|
437
351
|
if (!fromPicker) {
|
|
438
352
|
cachedFromContacts = [this._driver.getUserContact()];
|
|
439
353
|
return cachedFromContacts;
|
|
440
354
|
}
|
|
441
355
|
const startActiveElement = document.activeElement;
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
.parentElement.firstElementChild;
|
|
445
|
-
let fromOptionEls = grandUncle.querySelectorAll(
|
|
446
|
-
'li[role=menuitem][data-jsaction*=".switch_custom_from"]'
|
|
447
|
-
);
|
|
448
|
-
|
|
356
|
+
const grandUncle = this._element.parentElement.parentElement.firstElementChild;
|
|
357
|
+
let fromOptionEls = grandUncle.querySelectorAll('li[role=menuitem][data-jsaction*=".switch_custom_from"]');
|
|
449
358
|
const needToOpenMenu = fromOptionEls.length === 0;
|
|
450
|
-
|
|
451
359
|
try {
|
|
452
360
|
if (needToOpenMenu) {
|
|
453
|
-
simulateClick(fromPicker);
|
|
454
|
-
fromOptionEls = grandUncle.querySelectorAll(
|
|
455
|
-
'li[role=menuitem][data-jsaction*=".switch_custom_from"]'
|
|
456
|
-
);
|
|
361
|
+
(0, _simulateMouseEvent.simulateClick)(fromPicker);
|
|
362
|
+
fromOptionEls = grandUncle.querySelectorAll('li[role=menuitem][data-jsaction*=".switch_custom_from"]');
|
|
457
363
|
}
|
|
458
|
-
|
|
459
364
|
if (fromOptionEls.length === 0) {
|
|
460
365
|
cachedFromContacts = [this._driver.getUserContact()];
|
|
461
366
|
return cachedFromContacts;
|
|
462
367
|
}
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
emailAddress: querySelector(el, 'span:not([title])').textContent,
|
|
368
|
+
cachedFromContacts = Array.from(fromOptionEls).map(el => ({
|
|
369
|
+
name: (0, _querySelectorOrFail.default)(el, 'span[title]').title,
|
|
370
|
+
emailAddress: (0, _querySelectorOrFail.default)(el, 'span:not([title])').textContent
|
|
467
371
|
}));
|
|
468
372
|
} finally {
|
|
469
373
|
if (needToOpenMenu) {
|
|
470
|
-
simulateClick(
|
|
374
|
+
(0, _simulateMouseEvent.simulateClick)(document.body);
|
|
471
375
|
}
|
|
472
376
|
if (startActiveElement) {
|
|
473
377
|
startActiveElement.focus();
|
|
@@ -475,41 +379,30 @@ class InboxComposeView {
|
|
|
475
379
|
}
|
|
476
380
|
return cachedFromContacts;
|
|
477
381
|
}
|
|
478
|
-
setFromEmail(email
|
|
479
|
-
if (this._p.attributes.isInline)
|
|
480
|
-
throw new Error("Can't set from value of inline compose");
|
|
382
|
+
setFromEmail(email) {
|
|
383
|
+
if (this._p.attributes.isInline) throw new Error("Can't set from value of inline compose");
|
|
481
384
|
if (this.getFromContact().emailAddress === email) return;
|
|
482
|
-
|
|
483
|
-
|
|
385
|
+
const {
|
|
386
|
+
fromPicker
|
|
387
|
+
} = this._els;
|
|
484
388
|
if (!fromPicker) throw new Error('from picker element not found');
|
|
485
|
-
|
|
486
389
|
const startActiveElement = document.activeElement;
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
.parentElement.firstElementChild;
|
|
490
|
-
let fromOptionEls = grandUncle.querySelectorAll(
|
|
491
|
-
'li[role=menuitem][data-jsaction*=".switch_custom_from"]'
|
|
492
|
-
);
|
|
493
|
-
|
|
390
|
+
const grandUncle = this._element.parentElement.parentElement.firstElementChild;
|
|
391
|
+
let fromOptionEls = grandUncle.querySelectorAll('li[role=menuitem][data-jsaction*=".switch_custom_from"]');
|
|
494
392
|
const needToOpenMenu = fromOptionEls.length === 0;
|
|
495
393
|
try {
|
|
496
394
|
if (needToOpenMenu) {
|
|
497
|
-
simulateClick(fromPicker);
|
|
498
|
-
fromOptionEls = grandUncle.querySelectorAll(
|
|
499
|
-
'li[role=menuitem][data-jsaction*=".switch_custom_from"]'
|
|
500
|
-
);
|
|
395
|
+
(0, _simulateMouseEvent.simulateClick)(fromPicker);
|
|
396
|
+
fromOptionEls = grandUncle.querySelectorAll('li[role=menuitem][data-jsaction*=".switch_custom_from"]');
|
|
501
397
|
}
|
|
502
|
-
const fromOptionEl =
|
|
503
|
-
fromOptionEls,
|
|
504
|
-
(el) => el.querySelector('span:not([title])').textContent === email
|
|
505
|
-
);
|
|
398
|
+
const fromOptionEl = (0, _find.default)(fromOptionEls, el => el.querySelector('span:not([title])').textContent === email);
|
|
506
399
|
if (!fromOptionEl) {
|
|
507
400
|
throw new Error('Failed to find from contact to set');
|
|
508
401
|
}
|
|
509
|
-
simulateClick(fromOptionEl);
|
|
402
|
+
(0, _simulateMouseEvent.simulateClick)(fromOptionEl);
|
|
510
403
|
} finally {
|
|
511
404
|
if (needToOpenMenu) {
|
|
512
|
-
simulateClick(fromPicker);
|
|
405
|
+
(0, _simulateMouseEvent.simulateClick)(fromPicker);
|
|
513
406
|
}
|
|
514
407
|
if (startActiveElement) {
|
|
515
408
|
startActiveElement.focus();
|
|
@@ -526,122 +419,102 @@ class InboxComposeView {
|
|
|
526
419
|
selection.addRange(lastSelectionRange);
|
|
527
420
|
}
|
|
528
421
|
}
|
|
529
|
-
insertBodyTextAtCursor(text
|
|
530
|
-
return this.insertBodyHTMLAtCursor(
|
|
422
|
+
insertBodyTextAtCursor(text) {
|
|
423
|
+
return this.insertBodyHTMLAtCursor((0, _escape.default)(text).replace(/\n/g, '<br>'));
|
|
531
424
|
}
|
|
532
|
-
insertBodyHTMLAtCursor(html
|
|
533
|
-
var retVal =
|
|
534
|
-
this.getBodyElement(),
|
|
535
|
-
html,
|
|
536
|
-
this._lastBodySelectionRange
|
|
537
|
-
);
|
|
425
|
+
insertBodyHTMLAtCursor(html) {
|
|
426
|
+
var retVal = (0, _insertHtmlAtCursor.default)(this.getBodyElement(), html, this._lastBodySelectionRange);
|
|
538
427
|
this._informBodyChanged();
|
|
539
428
|
return retVal;
|
|
540
429
|
}
|
|
541
|
-
insertLinkIntoBody(text
|
|
542
|
-
var html =
|
|
430
|
+
insertLinkIntoBody(text, href) {
|
|
431
|
+
var html = (0, _autoHtml.default)`<a href="${href}">${text}</a>`;
|
|
543
432
|
return this.insertBodyHTMLAtCursor(html);
|
|
544
433
|
}
|
|
545
|
-
insertLinkChipIntoBody(options
|
|
546
|
-
|
|
547
|
-
url: string,
|
|
548
|
-
text: string,
|
|
549
|
-
}): HTMLElement {
|
|
550
|
-
var retval = insertLinkChipIntoBody(this, options);
|
|
434
|
+
insertLinkChipIntoBody(options) {
|
|
435
|
+
var retval = (0, _insertLinkChipIntoBody.default)(this, options);
|
|
551
436
|
this._informBodyChanged();
|
|
552
437
|
return retval;
|
|
553
438
|
}
|
|
554
|
-
setBodyHTML(html
|
|
439
|
+
setBodyHTML(html) {
|
|
555
440
|
if (!this._els.body) throw new Error('Compose View missing body element');
|
|
556
441
|
this._els.body.innerHTML = html;
|
|
557
442
|
this._informBodyChanged();
|
|
558
443
|
}
|
|
559
|
-
setBodyText(text
|
|
444
|
+
setBodyText(text) {
|
|
560
445
|
if (!this._els.body) throw new Error('Compose View missing body element');
|
|
561
446
|
this._els.body.textContent = text;
|
|
562
447
|
this._informBodyChanged();
|
|
563
448
|
}
|
|
564
|
-
_setRecipients(inputElement
|
|
449
|
+
_setRecipients(inputElement, emails) {
|
|
565
450
|
const chipContainer = inputElement.parentElement;
|
|
566
451
|
if (!chipContainer) throw new Error('Should not happen');
|
|
567
|
-
|
|
568
452
|
const startActiveElement = document.activeElement;
|
|
569
453
|
|
|
570
454
|
// Inbox re-uses the chip elements as some are removed, so finding all the
|
|
571
455
|
// button elements at once and then clicking on each of them wouldn't work.
|
|
572
|
-
const removeButtonCount = chipContainer.querySelectorAll(
|
|
573
|
-
'[role=button][jsaction*="remove_chip"]'
|
|
574
|
-
).length;
|
|
456
|
+
const removeButtonCount = chipContainer.querySelectorAll('[role=button][jsaction*="remove_chip"]').length;
|
|
575
457
|
for (let i = 0; i < removeButtonCount; i++) {
|
|
576
|
-
const removeButton = chipContainer.querySelector(
|
|
577
|
-
'[role=button][jsaction*="remove_chip"]'
|
|
578
|
-
);
|
|
458
|
+
const removeButton = chipContainer.querySelector('[role=button][jsaction*="remove_chip"]');
|
|
579
459
|
if (!removeButton) break;
|
|
580
|
-
simulateClick(removeButton);
|
|
460
|
+
(0, _simulateMouseEvent.simulateClick)(removeButton);
|
|
581
461
|
}
|
|
582
|
-
|
|
583
|
-
emails.forEach((email) => {
|
|
462
|
+
emails.forEach(email => {
|
|
584
463
|
inputElement.value = email;
|
|
585
464
|
inputElement.dispatchEvent(new window.FocusEvent('blur'));
|
|
586
465
|
});
|
|
587
|
-
|
|
588
466
|
if (startActiveElement) {
|
|
589
467
|
startActiveElement.focus();
|
|
590
468
|
}
|
|
591
469
|
}
|
|
592
|
-
setToRecipients(emails
|
|
593
|
-
if (this._p.attributes.isInline)
|
|
594
|
-
|
|
595
|
-
|
|
470
|
+
setToRecipients(emails) {
|
|
471
|
+
if (this._p.attributes.isInline) throw new Error("Can't set recipients of inline compose");
|
|
472
|
+
const {
|
|
473
|
+
toInput
|
|
474
|
+
} = this._els;
|
|
596
475
|
if (!toInput) throw new Error('Compose View missing recipient input');
|
|
597
476
|
this._setRecipients(toInput, emails);
|
|
598
477
|
}
|
|
599
|
-
setCcRecipients(emails
|
|
600
|
-
if (this._p.attributes.isInline)
|
|
601
|
-
|
|
602
|
-
|
|
478
|
+
setCcRecipients(emails) {
|
|
479
|
+
if (this._p.attributes.isInline) throw new Error("Can't set recipients of inline compose");
|
|
480
|
+
const {
|
|
481
|
+
ccInput
|
|
482
|
+
} = this._els;
|
|
603
483
|
if (!ccInput) throw new Error('Compose View missing recipient input');
|
|
604
484
|
this._setRecipients(ccInput, emails);
|
|
605
|
-
const {
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
toggleCcBccButton
|
|
610
|
-
) {
|
|
611
|
-
simulateClick(toggleCcBccButton);
|
|
485
|
+
const {
|
|
486
|
+
toggleCcBccButton
|
|
487
|
+
} = this._els;
|
|
488
|
+
if (emails.length && toggleCcBccButton && toggleCcBccButton.style.display !== 'none') {
|
|
489
|
+
(0, _simulateMouseEvent.simulateClick)(toggleCcBccButton);
|
|
612
490
|
}
|
|
613
491
|
}
|
|
614
|
-
setBccRecipients(emails
|
|
615
|
-
if (this._p.attributes.isInline)
|
|
616
|
-
|
|
617
|
-
|
|
492
|
+
setBccRecipients(emails) {
|
|
493
|
+
if (this._p.attributes.isInline) throw new Error("Can't set recipients of inline compose");
|
|
494
|
+
const {
|
|
495
|
+
bccInput
|
|
496
|
+
} = this._els;
|
|
618
497
|
if (!bccInput) throw new Error('Compose View missing recipient input');
|
|
619
498
|
this._setRecipients(bccInput, emails);
|
|
620
|
-
const {
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
toggleCcBccButton
|
|
625
|
-
) {
|
|
626
|
-
simulateClick(toggleCcBccButton);
|
|
499
|
+
const {
|
|
500
|
+
toggleCcBccButton
|
|
501
|
+
} = this._els;
|
|
502
|
+
if (emails.length && toggleCcBccButton && toggleCcBccButton.style.display !== 'none') {
|
|
503
|
+
(0, _simulateMouseEvent.simulateClick)(toggleCcBccButton);
|
|
627
504
|
}
|
|
628
505
|
}
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
506
|
+
replaceSendButton(el) {
|
|
507
|
+
const {
|
|
508
|
+
sendBtn
|
|
509
|
+
} = this._p.elements;
|
|
632
510
|
if (!sendBtn) throw new Error('Could not locate send button');
|
|
633
|
-
|
|
634
511
|
sendBtn.style.display = 'none';
|
|
635
|
-
|
|
636
512
|
const container = document.createElement('div');
|
|
637
513
|
container.classList.add('inboxsdk__compose_customSendContainer');
|
|
638
514
|
container.appendChild(el);
|
|
639
515
|
this._element.setAttribute('data-inboxsdk-send-replaced', '');
|
|
640
|
-
|
|
641
516
|
sendBtn.insertAdjacentElement('afterend', container);
|
|
642
|
-
|
|
643
|
-
const removalStopper = kefirStopper();
|
|
644
|
-
|
|
517
|
+
const removalStopper = (0, _kefirStopper.default)();
|
|
645
518
|
return () => {
|
|
646
519
|
removalStopper.destroy();
|
|
647
520
|
container.remove();
|
|
@@ -649,200 +522,164 @@ class InboxComposeView {
|
|
|
649
522
|
sendBtn.style.display = '';
|
|
650
523
|
};
|
|
651
524
|
}
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
525
|
+
hideDiscardButton() {
|
|
526
|
+
const {
|
|
527
|
+
discardBtn
|
|
528
|
+
} = this._p.elements;
|
|
655
529
|
if (!discardBtn) throw new Error('Could not locate discard button');
|
|
656
|
-
|
|
657
530
|
const discardDivider = discardBtn.previousElementSibling;
|
|
658
531
|
if (!(discardDivider instanceof HTMLElement)) {
|
|
659
532
|
throw new Error('Could not locate discard button divider');
|
|
660
533
|
}
|
|
661
|
-
|
|
662
534
|
discardBtn.style.display = 'none';
|
|
663
535
|
discardDivider.style.display = 'none';
|
|
664
|
-
|
|
665
536
|
return () => {
|
|
666
537
|
discardBtn.style.display = '';
|
|
667
538
|
discardDivider.style.display = '';
|
|
668
539
|
};
|
|
669
540
|
}
|
|
670
|
-
|
|
671
541
|
close() {
|
|
672
542
|
if (this._p.attributes.isInline) {
|
|
673
543
|
throw new Error('Not implemented for inline compose');
|
|
674
544
|
}
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
545
|
+
const {
|
|
546
|
+
closeBtn
|
|
547
|
+
} = this._els;
|
|
678
548
|
if (closeBtn) {
|
|
679
|
-
this._element.dispatchEvent(
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
);
|
|
686
|
-
|
|
687
|
-
simulateClick(closeBtn);
|
|
549
|
+
this._element.dispatchEvent(new CustomEvent('closedProgrammatically', {
|
|
550
|
+
bubbles: false,
|
|
551
|
+
cancelable: false,
|
|
552
|
+
detail: null
|
|
553
|
+
}));
|
|
554
|
+
(0, _simulateMouseEvent.simulateClick)(closeBtn);
|
|
688
555
|
}
|
|
689
556
|
}
|
|
690
|
-
send(
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
557
|
+
send(_ref11) {
|
|
558
|
+
let {
|
|
559
|
+
sendAndArchive
|
|
560
|
+
} = _ref11;
|
|
561
|
+
if (!this._els.sendBtn) throw new Error('Compose View missing send element');
|
|
562
|
+
(0, _simulateMouseEvent.simulateClick)(this._els.sendBtn);
|
|
694
563
|
}
|
|
695
564
|
discard() {
|
|
696
|
-
simulateClick(this.getDiscardButton());
|
|
565
|
+
(0, _simulateMouseEvent.simulateClick)(this.getDiscardButton());
|
|
697
566
|
}
|
|
698
|
-
setMinimized(minimized
|
|
567
|
+
setMinimized(minimized) {
|
|
699
568
|
if (minimized !== this.isMinimized()) {
|
|
700
|
-
if (this._p.attributes.isInline)
|
|
701
|
-
|
|
702
|
-
|
|
569
|
+
if (this._p.attributes.isInline) throw new Error('Not implemented for inline compose views');
|
|
570
|
+
const {
|
|
571
|
+
minimizeBtn
|
|
572
|
+
} = this._els;
|
|
703
573
|
if (!minimizeBtn) throw new Error('Could not find minimize button');
|
|
704
574
|
minimizeBtn.click();
|
|
705
575
|
}
|
|
706
576
|
}
|
|
707
|
-
setFullscreen(fullscreen
|
|
577
|
+
setFullscreen(fullscreen) {
|
|
708
578
|
if (fullscreen !== this.isFullscreen()) {
|
|
709
|
-
if (this._p.attributes.isInline)
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
579
|
+
if (this._p.attributes.isInline) throw new Error('Not implemented for inline compose views');
|
|
580
|
+
const {
|
|
581
|
+
toggleFullscreenButton
|
|
582
|
+
} = this._els;
|
|
583
|
+
if (!toggleFullscreenButton) throw new Error('Could not find fullscreen button');
|
|
714
584
|
toggleFullscreenButton.click();
|
|
715
585
|
}
|
|
716
586
|
}
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
587
|
+
setTitleBarColor(color) {
|
|
588
|
+
const {
|
|
589
|
+
isInline
|
|
590
|
+
} = this._p.attributes;
|
|
720
591
|
if (isInline) throw new Error('Cannot set title bar of inline compose');
|
|
721
|
-
|
|
722
|
-
|
|
592
|
+
const {
|
|
593
|
+
titleBar
|
|
594
|
+
} = this._p.elements;
|
|
723
595
|
if (!titleBar) throw new Error('Could not locate compose title bar');
|
|
724
|
-
|
|
725
596
|
titleBar.style.backgroundColor = color;
|
|
726
|
-
|
|
727
597
|
return () => {
|
|
728
598
|
titleBar.style.backgroundColor = '';
|
|
729
599
|
};
|
|
730
600
|
}
|
|
731
|
-
|
|
732
|
-
setTitleBarText(text: string): () => void {
|
|
601
|
+
setTitleBarText(text) {
|
|
733
602
|
throw new Error('Not supported in Inbox');
|
|
734
603
|
}
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
buttonDescriptor: Kefir.Observable<?ComposeButtonDescriptor>,
|
|
738
|
-
groupOrderHint: string,
|
|
739
|
-
extraOnClickOptions: Object
|
|
740
|
-
): Promise<?Object> {
|
|
741
|
-
var buttonViewController = new InboxComposeButtonView(
|
|
742
|
-
this,
|
|
743
|
-
buttonDescriptor,
|
|
744
|
-
groupOrderHint,
|
|
745
|
-
extraOnClickOptions
|
|
746
|
-
);
|
|
604
|
+
addButton(buttonDescriptor, groupOrderHint, extraOnClickOptions) {
|
|
605
|
+
var buttonViewController = new _inboxComposeButtonView.default(this, buttonDescriptor, groupOrderHint, extraOnClickOptions);
|
|
747
606
|
return Promise.resolve({
|
|
748
607
|
buttonViewController,
|
|
749
|
-
buttonDescriptor: {}
|
|
608
|
+
buttonDescriptor: {}
|
|
750
609
|
});
|
|
751
610
|
}
|
|
752
|
-
getModifierButtonContainer()
|
|
611
|
+
getModifierButtonContainer() {
|
|
753
612
|
if (this._modifierButtonContainer) {
|
|
754
613
|
return this._modifierButtonContainer;
|
|
755
614
|
}
|
|
756
|
-
this._modifierButtonContainer = this._element.querySelector(
|
|
757
|
-
'.inboxsdk__compose_actionToolbar'
|
|
758
|
-
);
|
|
615
|
+
this._modifierButtonContainer = this._element.querySelector('.inboxsdk__compose_actionToolbar');
|
|
759
616
|
if (this._modifierButtonContainer) {
|
|
760
617
|
return this._modifierButtonContainer;
|
|
761
618
|
}
|
|
762
619
|
const div = document.createElement('div');
|
|
763
620
|
div.className = 'inboxsdk__compose_actionToolbar';
|
|
764
|
-
|
|
765
621
|
if (!this._p.attributes.isInline) {
|
|
766
|
-
const hiddenAttachBtn = this._els.attachBtn
|
|
767
|
-
|
|
768
|
-
: null;
|
|
769
|
-
if (
|
|
770
|
-
hiddenAttachBtn instanceof HTMLElement &&
|
|
771
|
-
hiddenAttachBtn.style.position === 'absolute'
|
|
772
|
-
) {
|
|
622
|
+
const hiddenAttachBtn = this._els.attachBtn ? this._els.attachBtn.nextSibling : null;
|
|
623
|
+
if (hiddenAttachBtn instanceof HTMLElement && hiddenAttachBtn.style.position === 'absolute') {
|
|
773
624
|
hiddenAttachBtn.style.display = 'none';
|
|
774
625
|
} else {
|
|
775
|
-
this._driver
|
|
776
|
-
.getLogger()
|
|
777
|
-
.error(new Error("Didn't find hiddenAttachBtn"));
|
|
626
|
+
this._driver.getLogger().error(new Error("Didn't find hiddenAttachBtn"));
|
|
778
627
|
}
|
|
779
628
|
}
|
|
780
|
-
|
|
781
629
|
const sendBtn = this._els.sendBtn;
|
|
782
630
|
if (!sendBtn) throw new Error('Compose View missing send element');
|
|
783
631
|
const sendParent = sendBtn.parentElement;
|
|
784
632
|
if (!sendParent) throw new Error('Could not find send button parent');
|
|
785
633
|
sendParent.insertBefore(div, sendBtn.nextSibling);
|
|
786
|
-
|
|
787
634
|
this._modifierButtonContainer = div;
|
|
788
635
|
return div;
|
|
789
636
|
}
|
|
790
|
-
addRecipientRow(options
|
|
791
|
-
if (this._p.attributes.isInline)
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
return addRecipientRow(this, options);
|
|
637
|
+
addRecipientRow(options) {
|
|
638
|
+
if (this._p.attributes.isInline) throw new Error('Cannot add recipient rows to inline compose views');
|
|
639
|
+
return (0, _addRecipientRow.default)(this, options);
|
|
795
640
|
}
|
|
796
|
-
forceRecipientRowsOpen()
|
|
641
|
+
forceRecipientRowsOpen() {
|
|
797
642
|
console.warn('ComposeView.forceRecipientRowsOpen() is a no-op in Inbox'); // eslint-disable-line no-console
|
|
798
643
|
return () => {};
|
|
799
644
|
}
|
|
800
|
-
hideNativeRecipientRows()
|
|
801
|
-
if (this._p.attributes.isInline)
|
|
802
|
-
throw new Error('Cannot hide recipient rows on inline compose views');
|
|
803
|
-
|
|
645
|
+
hideNativeRecipientRows() {
|
|
646
|
+
if (this._p.attributes.isInline) throw new Error('Cannot hide recipient rows on inline compose views');
|
|
804
647
|
const rows = [this.getToRow(), this.getCCRow(), this.getBCCRow()];
|
|
805
|
-
|
|
806
|
-
rows.forEach((row) => {
|
|
648
|
+
rows.forEach(row => {
|
|
807
649
|
row.classList.add('inboxsdk__compose_forceRecipientRowHidden');
|
|
808
650
|
});
|
|
809
|
-
|
|
810
651
|
return () => {
|
|
811
|
-
rows.forEach(
|
|
652
|
+
rows.forEach(row => {
|
|
812
653
|
row.classList.remove('inboxsdk__compose_forceRecipientRowHidden');
|
|
813
654
|
});
|
|
814
655
|
};
|
|
815
656
|
}
|
|
816
|
-
hideRecipientArea()
|
|
657
|
+
hideRecipientArea() {
|
|
817
658
|
throw new Error('Not implemented');
|
|
818
659
|
}
|
|
819
|
-
addOuterSidebar(options
|
|
660
|
+
addOuterSidebar(options) {
|
|
820
661
|
throw new Error('Not implemented');
|
|
821
662
|
}
|
|
822
|
-
addInnerSidebar(options
|
|
663
|
+
addInnerSidebar(options) {
|
|
823
664
|
throw new Error('Not implemented');
|
|
824
665
|
}
|
|
825
|
-
addComposeNotice(composeNoticeDescriptor
|
|
666
|
+
addComposeNotice(composeNoticeDescriptor) {
|
|
826
667
|
throw new Error('Not implemented');
|
|
827
668
|
}
|
|
828
|
-
addStatusBar(options
|
|
829
|
-
height?: number,
|
|
830
|
-
orderHint?: number,
|
|
831
|
-
addAboveNativeStatusBar?: boolean,
|
|
832
|
-
}): StatusBar {
|
|
669
|
+
addStatusBar(options) {
|
|
833
670
|
throw new Error('Not implemented');
|
|
834
671
|
}
|
|
835
|
-
hideNativeStatusBar()
|
|
672
|
+
hideNativeStatusBar() {
|
|
836
673
|
throw new Error('Not Implemented');
|
|
837
674
|
}
|
|
838
|
-
isForward()
|
|
675
|
+
isForward() {
|
|
839
676
|
throw new Error('Not Implemented');
|
|
840
677
|
}
|
|
841
|
-
isReply()
|
|
678
|
+
isReply() {
|
|
842
679
|
if (this._p.attributes.isInline) return true;
|
|
843
680
|
throw new Error('Not implemented');
|
|
844
681
|
}
|
|
845
|
-
isInlineReplyForm()
|
|
682
|
+
isInlineReplyForm() {
|
|
846
683
|
return this._p.attributes.isInline;
|
|
847
684
|
}
|
|
848
685
|
popOut() {
|
|
@@ -852,83 +689,76 @@ class InboxComposeView {
|
|
|
852
689
|
if (!this._els.popOutBtn) {
|
|
853
690
|
throw new Error('Should not happen');
|
|
854
691
|
}
|
|
855
|
-
simulateClick(this._els.popOutBtn);
|
|
692
|
+
(0, _simulateMouseEvent.simulateClick)(this._els.popOutBtn);
|
|
856
693
|
}
|
|
857
|
-
registerRequestModifier(modifier
|
|
694
|
+
registerRequestModifier(modifier) {
|
|
858
695
|
throw new Error('Not implemented');
|
|
859
696
|
}
|
|
860
|
-
attachFiles(files
|
|
697
|
+
attachFiles(files) {
|
|
861
698
|
throw new Error('Not implemented');
|
|
862
699
|
}
|
|
863
|
-
attachInlineFiles(files
|
|
700
|
+
attachInlineFiles(files) {
|
|
864
701
|
throw new Error('Not implemented');
|
|
865
702
|
}
|
|
866
|
-
isFullscreen()
|
|
703
|
+
isFullscreen() {
|
|
867
704
|
return this._isFullscreenMode;
|
|
868
705
|
}
|
|
869
|
-
isMinimized()
|
|
706
|
+
isMinimized() {
|
|
870
707
|
return this._isMinimized;
|
|
871
708
|
}
|
|
872
|
-
|
|
873
|
-
getSubjectInput(): ?HTMLInputElement {
|
|
709
|
+
getSubjectInput() {
|
|
874
710
|
return this._els.subject;
|
|
875
711
|
}
|
|
876
|
-
|
|
877
|
-
getMetadataFormElement(): HTMLElement {
|
|
712
|
+
getMetadataFormElement() {
|
|
878
713
|
throw new Error('Not supported in Inbox.');
|
|
879
714
|
}
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
715
|
+
getToRow() {
|
|
716
|
+
const {
|
|
717
|
+
toRow
|
|
718
|
+
} = this._els;
|
|
883
719
|
if (!toRow) throw new Error('Could not locate To row');
|
|
884
|
-
|
|
885
720
|
return toRow;
|
|
886
721
|
}
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
722
|
+
getCCRow() {
|
|
723
|
+
const {
|
|
724
|
+
ccRow
|
|
725
|
+
} = this._els;
|
|
890
726
|
if (!ccRow) throw new Error('Could not locate CC row');
|
|
891
|
-
|
|
892
727
|
return ccRow;
|
|
893
728
|
}
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
729
|
+
getBCCRow() {
|
|
730
|
+
const {
|
|
731
|
+
bccRow
|
|
732
|
+
} = this._els;
|
|
897
733
|
if (!bccRow) throw new Error('Could not locate BCC row');
|
|
898
|
-
|
|
899
734
|
return bccRow;
|
|
900
735
|
}
|
|
901
|
-
|
|
902
|
-
getBodyElement(): HTMLElement {
|
|
736
|
+
getBodyElement() {
|
|
903
737
|
if (!this._els.body) throw new Error('Compose View missing body element');
|
|
904
738
|
return this._els.body;
|
|
905
739
|
}
|
|
906
|
-
getHTMLContent()
|
|
740
|
+
getHTMLContent() {
|
|
907
741
|
return this.getBodyElement().innerHTML;
|
|
908
742
|
}
|
|
909
|
-
getTextContent()
|
|
743
|
+
getTextContent() {
|
|
910
744
|
return this.getBodyElement().textContent;
|
|
911
745
|
}
|
|
912
|
-
getSelectedBodyHTML()
|
|
913
|
-
return getSelectedHTMLInElement(
|
|
914
|
-
this.getBodyElement(),
|
|
915
|
-
this._lastBodySelectionRange
|
|
916
|
-
);
|
|
746
|
+
getSelectedBodyHTML() {
|
|
747
|
+
return (0, _getSelection.getSelectedHTMLInElement)(this.getBodyElement(), this._lastBodySelectionRange);
|
|
917
748
|
}
|
|
918
|
-
getSelectedBodyText()
|
|
919
|
-
return getSelectedTextInElement(
|
|
920
|
-
this.getBodyElement(),
|
|
921
|
-
this._lastBodySelectionRange
|
|
922
|
-
);
|
|
749
|
+
getSelectedBodyText() {
|
|
750
|
+
return (0, _getSelection.getSelectedTextInElement)(this.getBodyElement(), this._lastBodySelectionRange);
|
|
923
751
|
}
|
|
924
|
-
getSubject()
|
|
925
|
-
const {
|
|
752
|
+
getSubject() {
|
|
753
|
+
const {
|
|
754
|
+
subject
|
|
755
|
+
} = this._els;
|
|
926
756
|
if (!subject) {
|
|
927
757
|
throw new Error('InboxSDK: Could not locate subject field');
|
|
928
758
|
}
|
|
929
759
|
return subject.value;
|
|
930
760
|
}
|
|
931
|
-
setSubject(text
|
|
761
|
+
setSubject(text) {
|
|
932
762
|
if (this._p.attributes.isInline) {
|
|
933
763
|
throw new Error('setSubject is not supported for inline compose views');
|
|
934
764
|
}
|
|
@@ -937,82 +767,68 @@ class InboxComposeView {
|
|
|
937
767
|
}
|
|
938
768
|
this._els.subject.value = text;
|
|
939
769
|
}
|
|
940
|
-
_getRecipients(inputElement
|
|
770
|
+
_getRecipients(inputElement) {
|
|
941
771
|
const chipContainer = inputElement.parentElement;
|
|
942
772
|
if (!chipContainer) throw new Error('Should not happen');
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
.
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
name: chip.textContent,
|
|
954
|
-
}));
|
|
955
|
-
}
|
|
956
|
-
getToRecipients(): Contact[] {
|
|
957
|
-
if (this._p.attributes.isInline)
|
|
958
|
-
throw new Error("Can't get recipients of inline compose");
|
|
959
|
-
const { toInput } = this._els;
|
|
773
|
+
return Array.from(chipContainer.children).filter(el => el.nodeName === 'DIV' && el.hasAttribute('email') && el.style.display !== 'none').map(chip => ({
|
|
774
|
+
emailAddress: chip.getAttribute('email') || '',
|
|
775
|
+
name: chip.textContent
|
|
776
|
+
}));
|
|
777
|
+
}
|
|
778
|
+
getToRecipients() {
|
|
779
|
+
if (this._p.attributes.isInline) throw new Error("Can't get recipients of inline compose");
|
|
780
|
+
const {
|
|
781
|
+
toInput
|
|
782
|
+
} = this._els;
|
|
960
783
|
if (!toInput) throw new Error('Compose View missing recipient input');
|
|
961
784
|
return this._getRecipients(toInput);
|
|
962
785
|
}
|
|
963
|
-
getCcRecipients()
|
|
964
|
-
if (this._p.attributes.isInline)
|
|
965
|
-
|
|
966
|
-
|
|
786
|
+
getCcRecipients() {
|
|
787
|
+
if (this._p.attributes.isInline) throw new Error("Can't get recipients of inline compose");
|
|
788
|
+
const {
|
|
789
|
+
ccInput
|
|
790
|
+
} = this._els;
|
|
967
791
|
if (!ccInput) throw new Error('Compose View missing recipient input');
|
|
968
792
|
return this._getRecipients(ccInput);
|
|
969
793
|
}
|
|
970
|
-
getBccRecipients()
|
|
971
|
-
if (this._p.attributes.isInline)
|
|
972
|
-
|
|
973
|
-
|
|
794
|
+
getBccRecipients() {
|
|
795
|
+
if (this._p.attributes.isInline) throw new Error("Can't get recipients of inline compose");
|
|
796
|
+
const {
|
|
797
|
+
bccInput
|
|
798
|
+
} = this._els;
|
|
974
799
|
if (!bccInput) throw new Error('Compose View missing recipient input');
|
|
975
800
|
return this._getRecipients(bccInput);
|
|
976
801
|
}
|
|
977
|
-
getComposeID()
|
|
802
|
+
getComposeID() {
|
|
978
803
|
throw new Error('This method was discontinued');
|
|
979
804
|
}
|
|
980
|
-
getInitialMessageID()
|
|
981
|
-
throw new Error(
|
|
982
|
-
'composeView.getInitialMessageID is not implemented in Inbox'
|
|
983
|
-
);
|
|
805
|
+
getInitialMessageID() {
|
|
806
|
+
throw new Error('composeView.getInitialMessageID is not implemented in Inbox');
|
|
984
807
|
}
|
|
985
|
-
getMessageID()
|
|
808
|
+
getMessageID() {
|
|
986
809
|
throw new Error('composeView.getMessageID is not implemented in Inbox');
|
|
987
810
|
}
|
|
988
|
-
getThreadID()
|
|
811
|
+
getThreadID() {
|
|
989
812
|
// TODO
|
|
990
813
|
return null;
|
|
991
814
|
}
|
|
992
|
-
getCurrentDraftID()
|
|
815
|
+
getCurrentDraftID() {
|
|
993
816
|
return Promise.resolve(this._draftID);
|
|
994
817
|
}
|
|
995
|
-
getDraftID()
|
|
818
|
+
getDraftID() {
|
|
996
819
|
return Promise.resolve(this._draftID);
|
|
997
820
|
}
|
|
998
|
-
addTooltipToButton(
|
|
999
|
-
buttonViewController
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
);
|
|
1006
|
-
}
|
|
1007
|
-
closeButtonTooltip(buttonViewController: Object) {
|
|
1008
|
-
(buttonViewController: InboxComposeButtonView).closeTooltip();
|
|
1009
|
-
}
|
|
1010
|
-
getDiscardButton(): HTMLElement {
|
|
1011
|
-
if (!this._els.discardBtn)
|
|
1012
|
-
throw new Error('Compose View missing discard button');
|
|
821
|
+
addTooltipToButton(buttonViewController, buttonDescriptor, tooltipDescriptor) {
|
|
822
|
+
buttonViewController.showTooltip(tooltipDescriptor);
|
|
823
|
+
}
|
|
824
|
+
closeButtonTooltip(buttonViewController) {
|
|
825
|
+
buttonViewController.closeTooltip();
|
|
826
|
+
}
|
|
827
|
+
getDiscardButton() {
|
|
828
|
+
if (!this._els.discardBtn) throw new Error('Compose View missing discard button');
|
|
1013
829
|
return this._els.discardBtn;
|
|
1014
830
|
}
|
|
1015
|
-
getSendButton()
|
|
831
|
+
getSendButton() {
|
|
1016
832
|
if (!this._els.sendBtn) throw new Error('Compose View missing send button');
|
|
1017
833
|
return this._els.sendBtn;
|
|
1018
834
|
}
|
|
@@ -1023,5 +839,5 @@ class InboxComposeView {
|
|
|
1023
839
|
//TODO
|
|
1024
840
|
}
|
|
1025
841
|
}
|
|
1026
|
-
|
|
1027
|
-
|
|
842
|
+
var _default = (0, _ud.defn)(module, InboxComposeView);
|
|
843
|
+
exports.default = _default;
|