@social-mail/social-mail-client 1.1.7 → 1.1.9
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/dist/admin/AdminAppIndex.pack.js +2848 -1578
- package/dist/admin/AdminAppIndex.pack.js.map +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js +329 -20
- package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
- package/dist/common/controls/file-preview/FilePreview.d.ts +3 -0
- package/dist/common/controls/file-preview/FilePreview.d.ts.map +1 -0
- package/dist/common/controls/file-preview/FilePreview.js +105 -0
- package/dist/common/controls/file-preview/FilePreview.js.map +1 -0
- package/dist/services/FileTypes.d.ts +8 -0
- package/dist/services/FileTypes.d.ts.map +1 -0
- package/dist/services/FileTypes.js +29 -0
- package/dist/services/FileTypes.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.js +1300 -30
- package/dist/web/AppIndex.pack.js.map +1 -1
- package/dist/web/AppIndex.pack.min.js +313 -4
- package/dist/web/AppIndex.pack.min.js.map +1 -1
- package/dist/web/commands/AppCommands.d.ts +5 -0
- package/dist/web/commands/AppCommands.d.ts.map +1 -1
- package/dist/web/commands/AppCommands.js +29 -3
- package/dist/web/commands/AppCommands.js.map +1 -1
- package/dist/web/page/files/FolderPage.d.ts.map +1 -1
- package/dist/web/page/files/FolderPage.js +1 -0
- package/dist/web/page/files/FolderPage.js.map +1 -1
- package/dist/web/page/files/preview/document/PreviewDocument.d.ts +6 -0
- package/dist/web/page/files/preview/document/PreviewDocument.d.ts.map +1 -0
- package/dist/web/page/files/preview/document/PreviewDocument.js +72 -0
- package/dist/web/page/files/preview/document/PreviewDocument.js.map +1 -0
- package/dist/web/page/files/preview/image/PreviewImage.d.ts +6 -0
- package/dist/web/page/files/preview/image/PreviewImage.d.ts.map +1 -0
- package/dist/web/page/files/preview/image/PreviewImage.js +55 -0
- package/dist/web/page/files/preview/image/PreviewImage.js.map +1 -0
- package/dist/web/page/files/preview/media/PreviewMedia.d.ts +6 -0
- package/dist/web/page/files/preview/media/PreviewMedia.d.ts.map +1 -0
- package/dist/web/page/files/preview/media/PreviewMedia.js +50 -0
- package/dist/web/page/files/preview/media/PreviewMedia.js.map +1 -0
- package/dist/web/page/mails/ConversationPage.d.ts.map +1 -1
- package/dist/web/page/mails/ConversationPage.js +5 -9
- package/dist/web/page/mails/ConversationPage.js.map +1 -1
- package/package.json +1 -1
- package/src/common/controls/file-preview/FilePreview.tsx +76 -0
- package/src/services/FileTypes.ts +24 -0
- package/src/web/commands/AppCommands.ts +31 -0
- package/src/web/page/files/FolderPage.tsx +1 -0
- package/src/web/page/files/preview/document/PreviewDocument.tsx +58 -0
- package/src/web/page/files/preview/image/PreviewImage.tsx +40 -0
- package/src/web/page/files/preview/media/PreviewMedia.tsx +36 -0
- package/src/web/page/mails/ConversationPage.tsx +2 -4
|
@@ -1865,7 +1865,7 @@ const UMD = new UMDClass();
|
|
|
1865
1865
|
|
|
1866
1866
|
AmdLoader.instance.register(
|
|
1867
1867
|
["@social-mail/social-mail-client","@web-atoms/core","@web-atoms/web-controls","reflect-metadata","@web-atoms/date-time","@web-atoms/data-styles","@web-atoms/entity","@web-atoms/email-dom"],
|
|
1868
|
-
["@social-mail/social-mail-client/dist/admin/AdminAppIndex","@web-atoms/core/dist/Pack","@web-atoms/web-controls/dist/desktop-app/MobileDesktopApp","@web-atoms/web-controls/dist/mobile-app/MobileApp","@web-atoms/core/dist/core/AtomLoader","@web-atoms/core/dist/services/JsonService","@web-atoms/core/dist/core/StringHelper","@web-atoms/core/dist/di/RegisterSingleton","@web-atoms/core/dist/di/Register","@web-atoms/core/dist/core/types","reflect-metadata","@web-atoms/core/dist/core/AtomMap","@web-atoms/core/dist/di/ServiceCollection","@web-atoms/core/dist/di/TypeKey","@web-atoms/date-time/dist/DateTime","@web-atoms/date-time/dist/TimeSpan","@web-atoms/core/dist/services/ReferenceService","@web-atoms/core/dist/di/DISingleton","@web-atoms/core/dist/core/AtomUri","@web-atoms/core/dist/web/core/AtomUI","@web-atoms/core/dist/core/Command","@web-atoms/core/dist/core/EventScope","@web-atoms/core/dist/core/Route","@web-atoms/core/dist/core/InheritedProperty","@web-atoms/core/dist/core/AtomBinder","@web-atoms/core/dist/core/sleep","@web-atoms/core/dist/core/XNode","@web-atoms/core/dist/core/Bind","@web-atoms/core/dist/core/ExpressionParser","@web-atoms/core/dist/services/NavigationService","@web-atoms/core/dist/core/AtomComponent","@web-atoms/core/dist/App","@web-atoms/core/dist/core/AtomDispatcher","@web-atoms/core/dist/di/ServiceProvider","@web-atoms/core/dist/core/TransientDisposable","@web-atoms/core/dist/di/Inject","@web-atoms/core/dist/services/BusyIndicatorService","@web-atoms/core/dist/core/AtomDisposableList","@web-atoms/core/dist/core/AtomWatcher","@web-atoms/core/dist/core/Hacks","@web-atoms/core/dist/core/PropertyMap","@web-atoms/core/dist/core/FormattedString","@web-atoms/core/dist/web/controls/AtomControl","@web-atoms/core/dist/core/BindableProperty","@web-atoms/core/dist/core/WebImage","@web-atoms/core/dist/web/styles/AtomStyle","@web-atoms/core/dist/web/styles/AtomStyleSheet","@web-atoms/core/dist/web/services/PopupService","@web-atoms/core/dist/style/styled","@web-atoms/core/dist/web/services/PopupWindow","@web-atoms/web-controls/dist/PageNavigator","@web-atoms/web-controls/dist/desktop-app/DesktopApp","@social-mail/social-mail-client/dist/style/GlobalStyle","@web-atoms/core/dist/core/AtomList","@social-mail/social-mail-client/dist/style/OverrideAppStyle","@web-atoms/data-styles/data-styles","@social-mail/social-mail-client/dist/services/LoginService","@social-mail/social-mail-client/dist/services/EntityService","@web-atoms/entity/dist/services/BaseEntityService","@web-atoms/entity/dist/models/Cloner","@web-atoms/entity/dist/models/cloneSource","@web-atoms/entity/dist/models/IEntityModel","@web-atoms/entity/dist/services/HttpSession","@web-atoms/core/dist/services/http/JsonError","@web-atoms/entity/dist/models/TaskManager","@web-atoms/entity/dist/models/Queue","@web-atoms/entity/dist/services/mergeProperties","@web-atoms/entity/dist/services/Query","@web-atoms/entity/dist/services/StringHelper","@web-atoms/entity/dist/services/resolve","@social-mail/social-mail-client/dist/services/BusyProgress","@social-mail/social-mail-client/dist/model/model","@social-mail/social-mail-client/dist/common/SocialMailApp","@web-atoms/core/dist/core/InjectProperty","@social-mail/social-mail-client/dist/admin/commands/AdminCommands","@social-mail/social-mail-client/dist/admin/pages/home/AdminHome","@social-mail/social-mail-client/dist/admin/pages/domains/DomainListPage","@web-atoms/web-controls/dist/basic/AtomRepeater","@web-atoms/core/dist/core/Colors","@web-atoms/core/dist/core/WatchProperty","@web-atoms/web-controls/dist/basic/InlinePopup","@web-atoms/web-controls/dist/basic/styles/inline-popup-style","@web-atoms/web-controls/dist/basic/MergeNode","@web-atoms/web-controls/dist/basic/ItemPath","@web-atoms/web-controls/dist/basic/styles/ui-display-none-style","@web-atoms/web-controls/dist/basic/styles/popup-style","@web-atoms/web-controls/dist/basic/styles/suggestion-popup","@web-atoms/web-controls/dist/basic/styles/repeater-style","@social-mail/social-mail-client/dist/admin/pages/domains/services/AdminDomainService","@web-atoms/core/dist/di/DITransient","@web-atoms/core/dist/view-model/Action","@social-mail/social-mail-client/dist/admin/pages/domains/edit/EditDomainPage","@web-atoms/web-controls/dist/basic/Form","@social-mail/social-mail-client/dist/common/controls/form/RequiredFormField","@web-atoms/web-controls/dist/basic/FormField","@web-atoms/web-controls/dist/basic/styles/form-field-style","@web-atoms/web-controls/dist/basic/PasswordBox","@web-atoms/web-controls/dist/basic/styles/password-box-style","@web-atoms/web-controls/dist/basic/Checkbox","@web-atoms/web-controls/dist/basic/styles/checkbox-style","@web-atoms/web-controls/dist/basic/Expander","@web-atoms/web-controls/dist/basic/styles/expander-style","@social-mail/social-mail-client/dist/common/controls/buttons/IconButton","@social-mail/social-mail-client/dist/admin/pages/domains/edit/DomainKeySetupPage","@social-mail/social-mail-client/dist/common/controls/buttons/CopyIcon","@social-mail/social-mail-client/dist/admin/pages/domains/domain-user/DomainUserEditor","@social-mail/social-mail-client/dist/common/controls/drop-downs/user/UserDropDown","@web-atoms/web-controls/dist/basic/DropDown","@web-atoms/web-controls/dist/basic/styles/drop-down-style","@social-mail/social-mail-client/dist/admin/pages/users/services/AdminUserService","@social-mail/social-mail-client/dist/common/Sql","@social-mail/social-mail-client/dist/common/pages/folders/ChooserFolderPage","@social-mail/social-mail-client/dist/web/page/files/service/CloudFileService","@web-atoms/core/dist/services/FetchBuilder","@social-mail/social-mail-client/dist/common/controls/tree/TreeView","@social-mail/social-mail-client/dist/admin/pages/users/UserListPage","@social-mail/social-mail-client/dist/common/controls/repeater/InfiniteRepeater","@social-mail/social-mail-client/dist/admin/pages/users/EditUserPage","@social-mail/social-mail-client/dist/common/validators/Validators","@social-mail/social-mail-client/dist/common/controls/password/PasswordStrength","@web-atoms/web-controls/dist/mobile-app/MasterDetailPage","@social-mail/social-mail-client/dist/admin/pages/users/UserDetailsPage","@social-mail/social-mail-client/dist/common/NumberFormats","@social-mail/social-mail-client/dist/common/controls/collection-editor/CollectionEditor","@social-mail/social-mail-client/dist/admin/pages/users/domains/EditDomainUserPage","@social-mail/social-mail-client/dist/admin/pages/users/mailboxes/EditUserMailboxPage","@social-mail/social-mail-client/dist/common/pages/mailboxes/services/MailboxService","@social-mail/social-mail-client/dist/admin/pages/users/files/EditFileAccessPage","@web-atoms/web-controls/dist/basic/ComboBox","@social-mail/social-mail-client/dist/common/pages/mailboxes/MailboxListPage","@social-mail/social-mail-client/dist/common/pages/mailboxes/MailboxEditorPage","@social-mail/social-mail-client/dist/admin/pages/users/ChooseUserPage","@social-mail/social-mail-client/dist/common/commands/CommonCommands","@social-mail/social-mail-client/dist/web/page/mails/MailboxContacts","@social-mail/social-mail-client/dist/web/page/mails/service/MailService","@social-mail/social-mail-client/dist/web/page/mails/ConversationPage","@social-mail/social-mail-client/dist/web/page/mails/service/ConversationService","@web-atoms/email-dom/dist/DomToString","@web-atoms/email-dom/dist/dom/StyleHelper","@web-atoms/email-dom/dist/style/mergeStyle","@social-mail/social-mail-client/dist/common/events/CommonEvents","@web-atoms/web-controls/dist/basic/InlinePopupControl","@social-mail/social-mail-client/dist/web/page/mails/ComposeMailPage","@social-mail/social-mail-client/dist/common/controls/html/InlineHtmlEditorWithToolbar","@web-atoms/web-controls/dist/html-editor/InlineHtmlEditor","@web-atoms/web-controls/dist/html-editor/commands/AddImage","@web-atoms/web-controls/dist/html-editor/commands/CommandButton","@web-atoms/web-controls/dist/html-editor/commands/HtmlCommands","@web-atoms/web-controls/dist/html-editor/commands/Toolbar","@web-atoms/web-controls/dist/html-editor/commands/Bold","@web-atoms/web-controls/dist/html-editor/commands/Command","@web-atoms/web-controls/dist/html-editor/commands/Italic","@web-atoms/web-controls/dist/html-editor/commands/Underline","@web-atoms/web-controls/dist/html-editor/commands/StrikeThrough","@web-atoms/web-controls/dist/html-editor/commands/Align","@web-atoms/web-controls/dist/basic/PopupButton","@web-atoms/web-controls/dist/basic/styles/popup-button-style","@web-atoms/web-controls/dist/html-editor/commands/HorizontalRule","@web-atoms/web-controls/dist/html-editor/commands/Separator","@web-atoms/web-controls/dist/html-editor/commands/Headings","@web-atoms/web-controls/dist/html-editor/commands/ChangeColor","@web-atoms/web-controls/dist/html-editor/commands/ChangeFont","@web-atoms/web-controls/dist/html-editor/commands/ChangeFontSize","@web-atoms/web-controls/dist/html-editor/commands/NumberedList","@web-atoms/web-controls/dist/html-editor/commands/UnorderedList","@web-atoms/web-controls/dist/html-editor/commands/IndentLess","@web-atoms/web-controls/dist/html-editor/commands/IndentMore","@web-atoms/web-controls/dist/html-editor/commands/AddLink","@web-atoms/core/dist/web/controls/AtomToggleButtonBar","@web-atoms/core/dist/web/styles/AtomToggleButtonBarStyle","@web-atoms/core/dist/web/styles/AtomListBoxStyle","@web-atoms/core/dist/web/controls/AtomListBox","@web-atoms/core/dist/web/controls/AtomItemsControl","@web-atoms/core/dist/core/AtomEnumerator","@web-atoms/web-controls/dist/html-editor/commands/Unlink","@web-atoms/web-controls/dist/html-editor/commands/RemoveFormat","@web-atoms/web-controls/dist/html-editor/commands/Source","@web-atoms/web-controls/dist/basic/UploadEvent","@social-mail/social-mail-client/dist/services/files/LocalFileService","@web-atoms/web-controls/dist/basic/TitleEditor","@web-atoms/web-controls/dist/basic/styles/title-editor-style","@social-mail/social-mail-client/dist/common/controls/email-recipients/EmailRecipientChips","@web-atoms/web-controls/dist/basic/AtomChips","@web-atoms/web-controls/dist/basic/Chip","@web-atoms/web-controls/dist/basic/styles/chip-style","@web-atoms/web-controls/dist/basic/styles/chips-style","@web-atoms/web-controls/dist/basic/styles/item-suggestion-style","@social-mail/social-mail-client/dist/services/email-addresses/EmailAddressService","@social-mail/social-mail-client/dist/common/cache/CacheTTL","@social-mail/social-mail-client/dist/web/page/templates/social/SocialTemplate","@social-mail/social-mail-client/dist/services/socket/sockets","@web-atoms/web-controls/dist/basic/LimitedText","@social-mail/social-mail-client/dist/common/date/DateFormats","@social-mail/social-mail-client/dist/common/pages/logs/LogsPage","@social-mail/social-mail-client/dist/common/pages/logs/services/AppLogService","@social-mail/social-mail-client/dist/web/page/mails/detail/MailDetailPage","@social-mail/social-mail-client/dist/web/page/mails/ChooseMailboxPage","@social-mail/social-mail-client/dist/web/commands/AppCommands","@social-mail/social-mail-client/dist/web/page/home/HomePage","@social-mail/social-mail-client/dist/web/page/files/FolderPage","@social-mail/social-mail-client/dist/common/controls/drag-drop/FilesDragDrop","@social-mail/social-mail-client/dist/web/page/files/shares/EditSharesPage","@social-mail/social-mail-client/dist/services/files/FileShareService","@social-mail/social-mail-client/dist/web/page/files/shares/AddSharePage","@web-atoms/web-controls/dist/basic/Switch","@web-atoms/web-controls/dist/basic/styles/switch-style","@web-atoms/web-controls/dist/basic/DateField","@web-atoms/web-controls/dist/basic/Calendar","@web-atoms/web-controls/dist/basic/Select","@web-atoms/web-controls/dist/basic/styles/calendar-style","@web-atoms/web-controls/dist/basic/TimeEditor","@web-atoms/web-controls/dist/basic/styles/time-editor-style","@web-atoms/web-controls/dist/basic/styles/date-field-style","@social-mail/social-mail-client/dist/web/page/templates/EditTemplatePage","@social-mail/social-mail-client/dist/services/mime-service/MimeNode","@social-mail/social-mail-client/dist/common/QueryIterator","@social-mail/social-mail-client/dist/services/mime-service/AttachmentFile","@social-mail/social-mail-client/dist/services/mime-service/HeaderContentType","@social-mail/social-mail-client/dist/services/mime-service/parsePairs","@social-mail/social-mail-client/dist/services/mime-service/tokenizer","@social-mail/social-mail-client/dist/services/mime-service/HeaderContentDisposition","@social-mail/social-mail-client/dist/services/mime-service/encoder/word-encoding","@social-mail/social-mail-client/dist/services/mime-service/encoder/RawBuffer","@social-mail/social-mail-client/dist/services/mime-service/encoder/base64-to-blob","@social-mail/social-mail-client/dist/services/mime-service/encoder/quoted-printable","@social-mail/social-mail-client/dist/services/mime-service/MimeMessage","@social-mail/social-mail-client/dist/services/mime-service/stream/LineStream","@social-mail/social-mail-client/dist/services/mime-service/stream/TextWriter","@social-mail/social-mail-client/dist/common/pages/folders/ChooseTemplatePage","@web-atoms/web-controls/dist/basic/Resizable","@web-atoms/web-controls/dist/basic/ToggleButtonBar","@web-atoms/web-controls/dist/basic/styles/toggle-button-bar-style","@social-mail/social-mail-client/dist/web/page/channels/detail/ChannelDetailPage","@social-mail/social-mail-client/dist/web/page/channels/subscribers/ChannelSubscribersPage","@social-mail/social-mail-client/dist/web/page/channels/services/ChannelService","@social-mail/social-mail-client/dist/web/page/channels/subscribers/add/AddSubscriberPage","@social-mail/social-mail-client/dist/web/page/channels/subscribers/rights/UpdateRightsPage","@social-mail/social-mail-client/dist/common/pages/drives/DriveListPage","@social-mail/social-mail-client/dist/common/pages/websites/manage/ManageWebSitePage","@social-mail/social-mail-client/dist/services/websites/WebSiteService","@social-mail/social-mail-client/dist/common/pages/websites/studio/WebSiteStudioPage","@social-mail/social-mail-client/dist/common/pages/websites/templates/ChooseWebSiteTemplatePage","@social-mail/social-mail-client/dist/common/controls/tree/FileTreeView","@social-mail/social-mail-client/dist/site-editor/editor/WebSitePageEditor","@social-mail/social-mail-client/dist/site-editor/editor/HtmlPageEditor","@social-mail/social-mail-client/dist/site-editor/blocks/ImageBlock","@social-mail/social-mail-client/dist/site-editor/blocks/Block","@social-mail/social-mail-client/dist/site-editor/drag-drop/DragDropHelper","@social-mail/social-mail-client/dist/site-editor/commands/CodeCommand","@social-mail/social-mail-client/dist/site-editor/commands/EditorCommand","@social-mail/social-mail-client/dist/site-editor/toolbars/UndoRedoToolbar","@social-mail/social-mail-client/dist/site-editor/toolbars/EditorToolbar","@social-mail/social-mail-client/dist/site-editor/blocks/WrapGrid","@social-mail/social-mail-client/dist/site-editor/properties/Properties","@social-mail/social-mail-client/dist/site-editor/properties/groups/LayoutEditor","@social-mail/social-mail-client/dist/site-editor/properties/controls/PropertyEditor","@social-mail/social-mail-client/dist/site-editor/styler/StylerSet","@social-mail/social-mail-client/dist/site-editor/styler/Styler","@social-mail/social-mail-client/dist/site-editor/styler/properties/stylerBorder","@social-mail/social-mail-client/dist/site-editor/styler/properties/layout/display","@social-mail/social-mail-client/dist/site-editor/styler/properties/layout/flex/flex","@social-mail/social-mail-client/dist/site-editor/styler/properties/layout/items-position/itemsPosition","@social-mail/social-mail-client/dist/site-editor/styler/properties/layout/layout","@social-mail/social-mail-client/dist/site-editor/styler/properties/stylerPosition","@social-mail/social-mail-client/dist/site-editor/styler/properties/stylerSizes","@social-mail/social-mail-client/dist/site-editor/styler/properties/stylerSpace","@social-mail/social-mail-client/dist/site-editor/styler/properties/text/stylerText","@social-mail/social-mail-client/dist/site-editor/styler/properties/stylerBackground","@social-mail/social-mail-client/dist/site-editor/properties/groups/TextPropertyEditor","@social-mail/social-mail-client/dist/site-editor/properties/controls/SizeEditorControl","@social-mail/social-mail-client/dist/site-editor/properties/groups/BorderGroupEditor","@social-mail/social-mail-client/dist/site-editor/properties/groups/SizeGroupEditor","@social-mail/social-mail-client/dist/site-editor/properties/groups/SpaceGroupEditor","@social-mail/social-mail-client/dist/site-editor/properties/groups/PositionGroupEditor","@social-mail/social-mail-client/dist/site-editor/properties/groups/BackgroundGroupEditor","@social-mail/social-mail-client/dist/site-editor/editor/SelectedElement","@social-mail/social-mail-client/dist/web/page/files/media/ChooseMediaPage","@social-mail/social-mail-client/dist/common/pages/user/change-password/ChangePasswordPage","@social-mail/social-mail-client/dist/common/pages/user/services/UserService","@social-mail/social-mail-client/dist/common/pages/user/multi-factor/MultiFactorSetupPage","@social-mail/social-mail-client/dist/common/pages/websites/list/WebSiteListPage","@social-mail/social-mail-client/dist/common/pages/websites/edit/WebSiteFolderEditor","@social-mail/social-mail-client/dist/common/pages/mailboxes/MailboxDetailPage","@social-mail/social-mail-client/dist/common/pages/mailboxes/settings/EditSyncTargetPage","@social-mail/social-mail-client/dist/common/icons/Icons","@social-mail/social-mail-client/dist/admin/pages/relays/edit/EditRelayPage","@social-mail/social-mail-client/dist/admin/pages/repair/RepairPage","@social-mail/social-mail-client/dist/common/pages/user/login/LoginPage","@social-mail/social-mail-client/dist/admin/drawer/AdminDrawer","@social-mail/social-mail-client/dist/common/controls/menu/MenuItem","@social-mail/social-mail-client/dist/common/controls/ModuleInfo","@web-atoms/core/dist/web/WebApp","@web-atoms/core/dist/core/AtomOnce","@web-atoms/core/dist/web/services/WebBusyIndicatorService","@web-atoms/core/dist/web/styles/StyleBuilder","@web-atoms/core/dist/web/services/WindowService","@web-atoms/core/dist/Atom","@web-atoms/core/dist/core/FormattedError","@web-atoms/core/dist/view-model/AtomWindowViewModel","@web-atoms/core/dist/view-model/AtomViewModel","@web-atoms/core/dist/view-model/baseTypes","@web-atoms/core/dist/web/controls/AtomAlertWindow","@web-atoms/core/dist/web/styles/AtomAlertWindowStyle","@web-atoms/core/dist/web/styles/AtomWindowStyle","@web-atoms/core/src/web/images/close-button-hover.svg","@web-atoms/core/dist/web/controls/AtomWindow","@web-atoms/core/dist/web/controls/AtomTemplate","@web-atoms/core/dist/web/controls/AtomNotification","@web-atoms/core/dist/web/styles/AtomNotificationStyle","@web-atoms/core/dist/web/styles/AtomPopupStyle","@web-atoms/core/dist/web/services/NotificationPopup","@web-atoms/core/dist/web/styles/AtomTheme"]);
|
|
1868
|
+
["@social-mail/social-mail-client/dist/admin/AdminAppIndex","@web-atoms/core/dist/Pack","@web-atoms/web-controls/dist/desktop-app/MobileDesktopApp","@web-atoms/web-controls/dist/mobile-app/MobileApp","@web-atoms/core/dist/core/AtomLoader","@web-atoms/core/dist/services/JsonService","@web-atoms/core/dist/core/StringHelper","@web-atoms/core/dist/di/RegisterSingleton","@web-atoms/core/dist/di/Register","@web-atoms/core/dist/core/types","reflect-metadata","@web-atoms/core/dist/core/AtomMap","@web-atoms/core/dist/di/ServiceCollection","@web-atoms/core/dist/di/TypeKey","@web-atoms/date-time/dist/DateTime","@web-atoms/date-time/dist/TimeSpan","@web-atoms/core/dist/services/ReferenceService","@web-atoms/core/dist/di/DISingleton","@web-atoms/core/dist/core/AtomUri","@web-atoms/core/dist/web/core/AtomUI","@web-atoms/core/dist/core/Command","@web-atoms/core/dist/core/EventScope","@web-atoms/core/dist/core/Route","@web-atoms/core/dist/core/InheritedProperty","@web-atoms/core/dist/core/AtomBinder","@web-atoms/core/dist/core/sleep","@web-atoms/core/dist/core/XNode","@web-atoms/core/dist/core/Bind","@web-atoms/core/dist/core/ExpressionParser","@web-atoms/core/dist/services/NavigationService","@web-atoms/core/dist/core/AtomComponent","@web-atoms/core/dist/App","@web-atoms/core/dist/core/AtomDispatcher","@web-atoms/core/dist/di/ServiceProvider","@web-atoms/core/dist/core/TransientDisposable","@web-atoms/core/dist/di/Inject","@web-atoms/core/dist/services/BusyIndicatorService","@web-atoms/core/dist/core/AtomDisposableList","@web-atoms/core/dist/core/AtomWatcher","@web-atoms/core/dist/core/Hacks","@web-atoms/core/dist/core/PropertyMap","@web-atoms/core/dist/core/FormattedString","@web-atoms/core/dist/web/controls/AtomControl","@web-atoms/core/dist/core/BindableProperty","@web-atoms/core/dist/core/WebImage","@web-atoms/core/dist/web/styles/AtomStyle","@web-atoms/core/dist/web/styles/AtomStyleSheet","@web-atoms/core/dist/web/services/PopupService","@web-atoms/core/dist/style/styled","@web-atoms/core/dist/web/services/PopupWindow","@web-atoms/web-controls/dist/PageNavigator","@web-atoms/web-controls/dist/desktop-app/DesktopApp","@social-mail/social-mail-client/dist/style/GlobalStyle","@web-atoms/core/dist/core/AtomList","@social-mail/social-mail-client/dist/style/OverrideAppStyle","@web-atoms/data-styles/data-styles","@social-mail/social-mail-client/dist/services/LoginService","@social-mail/social-mail-client/dist/services/EntityService","@web-atoms/entity/dist/services/BaseEntityService","@web-atoms/entity/dist/models/Cloner","@web-atoms/entity/dist/models/cloneSource","@web-atoms/entity/dist/models/IEntityModel","@web-atoms/entity/dist/services/HttpSession","@web-atoms/core/dist/services/http/JsonError","@web-atoms/entity/dist/models/TaskManager","@web-atoms/entity/dist/models/Queue","@web-atoms/entity/dist/services/mergeProperties","@web-atoms/entity/dist/services/Query","@web-atoms/entity/dist/services/StringHelper","@web-atoms/entity/dist/services/resolve","@social-mail/social-mail-client/dist/services/BusyProgress","@social-mail/social-mail-client/dist/model/model","@social-mail/social-mail-client/dist/common/SocialMailApp","@web-atoms/core/dist/core/InjectProperty","@social-mail/social-mail-client/dist/admin/commands/AdminCommands","@social-mail/social-mail-client/dist/admin/pages/home/AdminHome","@social-mail/social-mail-client/dist/admin/pages/domains/DomainListPage","@web-atoms/web-controls/dist/basic/AtomRepeater","@web-atoms/core/dist/core/Colors","@web-atoms/core/dist/core/WatchProperty","@web-atoms/web-controls/dist/basic/InlinePopup","@web-atoms/web-controls/dist/basic/styles/inline-popup-style","@web-atoms/web-controls/dist/basic/MergeNode","@web-atoms/web-controls/dist/basic/ItemPath","@web-atoms/web-controls/dist/basic/styles/ui-display-none-style","@web-atoms/web-controls/dist/basic/styles/popup-style","@web-atoms/web-controls/dist/basic/styles/suggestion-popup","@web-atoms/web-controls/dist/basic/styles/repeater-style","@social-mail/social-mail-client/dist/admin/pages/domains/services/AdminDomainService","@web-atoms/core/dist/di/DITransient","@web-atoms/core/dist/view-model/Action","@social-mail/social-mail-client/dist/admin/pages/domains/edit/EditDomainPage","@web-atoms/web-controls/dist/basic/Form","@social-mail/social-mail-client/dist/common/controls/form/RequiredFormField","@web-atoms/web-controls/dist/basic/FormField","@web-atoms/web-controls/dist/basic/styles/form-field-style","@web-atoms/web-controls/dist/basic/PasswordBox","@web-atoms/web-controls/dist/basic/styles/password-box-style","@web-atoms/web-controls/dist/basic/Checkbox","@web-atoms/web-controls/dist/basic/styles/checkbox-style","@web-atoms/web-controls/dist/basic/Expander","@web-atoms/web-controls/dist/basic/styles/expander-style","@social-mail/social-mail-client/dist/common/controls/buttons/IconButton","@social-mail/social-mail-client/dist/admin/pages/domains/edit/DomainKeySetupPage","@social-mail/social-mail-client/dist/common/controls/buttons/CopyIcon","@social-mail/social-mail-client/dist/admin/pages/domains/domain-user/DomainUserEditor","@social-mail/social-mail-client/dist/common/controls/drop-downs/user/UserDropDown","@web-atoms/web-controls/dist/basic/DropDown","@web-atoms/web-controls/dist/basic/styles/drop-down-style","@social-mail/social-mail-client/dist/admin/pages/users/services/AdminUserService","@social-mail/social-mail-client/dist/common/Sql","@social-mail/social-mail-client/dist/common/pages/folders/ChooserFolderPage","@social-mail/social-mail-client/dist/web/page/files/service/CloudFileService","@web-atoms/core/dist/services/FetchBuilder","@social-mail/social-mail-client/dist/common/controls/tree/TreeView","@social-mail/social-mail-client/dist/admin/pages/users/UserListPage","@social-mail/social-mail-client/dist/common/controls/repeater/InfiniteRepeater","@social-mail/social-mail-client/dist/admin/pages/users/EditUserPage","@social-mail/social-mail-client/dist/common/validators/Validators","@social-mail/social-mail-client/dist/common/controls/password/PasswordStrength","@web-atoms/web-controls/dist/mobile-app/MasterDetailPage","@social-mail/social-mail-client/dist/admin/pages/users/UserDetailsPage","@social-mail/social-mail-client/dist/common/NumberFormats","@social-mail/social-mail-client/dist/common/controls/collection-editor/CollectionEditor","@social-mail/social-mail-client/dist/admin/pages/users/domains/EditDomainUserPage","@social-mail/social-mail-client/dist/admin/pages/users/mailboxes/EditUserMailboxPage","@social-mail/social-mail-client/dist/common/pages/mailboxes/services/MailboxService","@social-mail/social-mail-client/dist/admin/pages/users/files/EditFileAccessPage","@web-atoms/web-controls/dist/basic/ComboBox","@social-mail/social-mail-client/dist/common/pages/mailboxes/MailboxListPage","@social-mail/social-mail-client/dist/common/pages/mailboxes/MailboxEditorPage","@social-mail/social-mail-client/dist/admin/pages/users/ChooseUserPage","@social-mail/social-mail-client/dist/common/commands/CommonCommands","@social-mail/social-mail-client/dist/web/page/mails/MailboxContacts","@social-mail/social-mail-client/dist/web/page/mails/service/MailService","@social-mail/social-mail-client/dist/web/page/mails/ConversationPage","@social-mail/social-mail-client/dist/web/page/mails/service/ConversationService","@web-atoms/email-dom/dist/DomToString","@web-atoms/email-dom/dist/dom/StyleHelper","@web-atoms/email-dom/dist/style/mergeStyle","@social-mail/social-mail-client/dist/common/events/CommonEvents","@web-atoms/web-controls/dist/basic/InlinePopupControl","@social-mail/social-mail-client/dist/web/page/mails/ComposeMailPage","@social-mail/social-mail-client/dist/common/controls/html/InlineHtmlEditorWithToolbar","@web-atoms/web-controls/dist/html-editor/InlineHtmlEditor","@web-atoms/web-controls/dist/html-editor/commands/AddImage","@web-atoms/web-controls/dist/html-editor/commands/CommandButton","@web-atoms/web-controls/dist/html-editor/commands/HtmlCommands","@web-atoms/web-controls/dist/html-editor/commands/Toolbar","@web-atoms/web-controls/dist/html-editor/commands/Bold","@web-atoms/web-controls/dist/html-editor/commands/Command","@web-atoms/web-controls/dist/html-editor/commands/Italic","@web-atoms/web-controls/dist/html-editor/commands/Underline","@web-atoms/web-controls/dist/html-editor/commands/StrikeThrough","@web-atoms/web-controls/dist/html-editor/commands/Align","@web-atoms/web-controls/dist/basic/PopupButton","@web-atoms/web-controls/dist/basic/styles/popup-button-style","@web-atoms/web-controls/dist/html-editor/commands/HorizontalRule","@web-atoms/web-controls/dist/html-editor/commands/Separator","@web-atoms/web-controls/dist/html-editor/commands/Headings","@web-atoms/web-controls/dist/html-editor/commands/ChangeColor","@web-atoms/web-controls/dist/html-editor/commands/ChangeFont","@web-atoms/web-controls/dist/html-editor/commands/ChangeFontSize","@web-atoms/web-controls/dist/html-editor/commands/NumberedList","@web-atoms/web-controls/dist/html-editor/commands/UnorderedList","@web-atoms/web-controls/dist/html-editor/commands/IndentLess","@web-atoms/web-controls/dist/html-editor/commands/IndentMore","@web-atoms/web-controls/dist/html-editor/commands/AddLink","@web-atoms/core/dist/web/controls/AtomToggleButtonBar","@web-atoms/core/dist/web/styles/AtomToggleButtonBarStyle","@web-atoms/core/dist/web/styles/AtomListBoxStyle","@web-atoms/core/dist/web/controls/AtomListBox","@web-atoms/core/dist/web/controls/AtomItemsControl","@web-atoms/core/dist/core/AtomEnumerator","@web-atoms/web-controls/dist/html-editor/commands/Unlink","@web-atoms/web-controls/dist/html-editor/commands/RemoveFormat","@web-atoms/web-controls/dist/html-editor/commands/Source","@web-atoms/web-controls/dist/basic/UploadEvent","@social-mail/social-mail-client/dist/services/files/LocalFileService","@web-atoms/web-controls/dist/basic/TitleEditor","@web-atoms/web-controls/dist/basic/styles/title-editor-style","@social-mail/social-mail-client/dist/common/controls/email-recipients/EmailRecipientChips","@web-atoms/web-controls/dist/basic/AtomChips","@web-atoms/web-controls/dist/basic/Chip","@web-atoms/web-controls/dist/basic/styles/chip-style","@web-atoms/web-controls/dist/basic/styles/chips-style","@web-atoms/web-controls/dist/basic/styles/item-suggestion-style","@social-mail/social-mail-client/dist/services/email-addresses/EmailAddressService","@social-mail/social-mail-client/dist/common/cache/CacheTTL","@social-mail/social-mail-client/dist/web/page/templates/social/SocialTemplate","@social-mail/social-mail-client/dist/services/socket/sockets","@web-atoms/web-controls/dist/basic/LimitedText","@social-mail/social-mail-client/dist/common/date/DateFormats","@social-mail/social-mail-client/dist/common/pages/logs/LogsPage","@social-mail/social-mail-client/dist/common/pages/logs/services/AppLogService","@social-mail/social-mail-client/dist/web/page/mails/detail/MailDetailPage","@social-mail/social-mail-client/dist/common/controls/file-preview/FilePreview","@social-mail/social-mail-client/dist/web/commands/AppCommands","@social-mail/social-mail-client/dist/web/page/home/HomePage","@social-mail/social-mail-client/dist/web/page/files/FolderPage","@social-mail/social-mail-client/dist/common/controls/drag-drop/FilesDragDrop","@social-mail/social-mail-client/dist/web/page/files/shares/EditSharesPage","@social-mail/social-mail-client/dist/services/files/FileShareService","@social-mail/social-mail-client/dist/web/page/files/shares/AddSharePage","@web-atoms/web-controls/dist/basic/Switch","@web-atoms/web-controls/dist/basic/styles/switch-style","@web-atoms/web-controls/dist/basic/DateField","@web-atoms/web-controls/dist/basic/Calendar","@web-atoms/web-controls/dist/basic/Select","@web-atoms/web-controls/dist/basic/styles/calendar-style","@web-atoms/web-controls/dist/basic/TimeEditor","@web-atoms/web-controls/dist/basic/styles/time-editor-style","@web-atoms/web-controls/dist/basic/styles/date-field-style","@social-mail/social-mail-client/dist/web/page/templates/EditTemplatePage","@social-mail/social-mail-client/dist/services/mime-service/MimeNode","@social-mail/social-mail-client/dist/common/QueryIterator","@social-mail/social-mail-client/dist/services/mime-service/AttachmentFile","@social-mail/social-mail-client/dist/services/mime-service/HeaderContentType","@social-mail/social-mail-client/dist/services/mime-service/parsePairs","@social-mail/social-mail-client/dist/services/mime-service/tokenizer","@social-mail/social-mail-client/dist/services/mime-service/HeaderContentDisposition","@social-mail/social-mail-client/dist/services/mime-service/encoder/word-encoding","@social-mail/social-mail-client/dist/services/mime-service/encoder/RawBuffer","@social-mail/social-mail-client/dist/services/mime-service/encoder/base64-to-blob","@social-mail/social-mail-client/dist/services/mime-service/encoder/quoted-printable","@social-mail/social-mail-client/dist/services/mime-service/MimeMessage","@social-mail/social-mail-client/dist/services/mime-service/stream/LineStream","@social-mail/social-mail-client/dist/services/mime-service/stream/TextWriter","@social-mail/social-mail-client/dist/web/page/files/preview/image/PreviewImage","@web-atoms/web-controls/dist/basic/PinchZoomView","@web-atoms/web-controls/dist/basic/styles/pinch-zoom-view-style","@social-mail/social-mail-client/dist/web/page/files/preview/document/PreviewDocument","@social-mail/social-mail-client/dist/web/page/files/preview/media/PreviewMedia","@web-atoms/web-controls/dist/player/AtomVideoPlayer","@social-mail/social-mail-client/dist/services/FileTypes","@social-mail/social-mail-client/dist/web/page/mails/ChooseMailboxPage","@social-mail/social-mail-client/dist/common/pages/folders/ChooseTemplatePage","@web-atoms/web-controls/dist/basic/Resizable","@web-atoms/web-controls/dist/basic/ToggleButtonBar","@web-atoms/web-controls/dist/basic/styles/toggle-button-bar-style","@social-mail/social-mail-client/dist/web/page/channels/detail/ChannelDetailPage","@social-mail/social-mail-client/dist/web/page/channels/subscribers/ChannelSubscribersPage","@social-mail/social-mail-client/dist/web/page/channels/services/ChannelService","@social-mail/social-mail-client/dist/web/page/channels/subscribers/add/AddSubscriberPage","@social-mail/social-mail-client/dist/web/page/channels/subscribers/rights/UpdateRightsPage","@social-mail/social-mail-client/dist/common/pages/drives/DriveListPage","@social-mail/social-mail-client/dist/common/pages/websites/manage/ManageWebSitePage","@social-mail/social-mail-client/dist/services/websites/WebSiteService","@social-mail/social-mail-client/dist/common/pages/websites/studio/WebSiteStudioPage","@social-mail/social-mail-client/dist/common/pages/websites/templates/ChooseWebSiteTemplatePage","@social-mail/social-mail-client/dist/common/controls/tree/FileTreeView","@social-mail/social-mail-client/dist/site-editor/editor/WebSitePageEditor","@social-mail/social-mail-client/dist/site-editor/editor/HtmlPageEditor","@social-mail/social-mail-client/dist/site-editor/blocks/ImageBlock","@social-mail/social-mail-client/dist/site-editor/blocks/Block","@social-mail/social-mail-client/dist/site-editor/drag-drop/DragDropHelper","@social-mail/social-mail-client/dist/site-editor/commands/CodeCommand","@social-mail/social-mail-client/dist/site-editor/commands/EditorCommand","@social-mail/social-mail-client/dist/site-editor/toolbars/UndoRedoToolbar","@social-mail/social-mail-client/dist/site-editor/toolbars/EditorToolbar","@social-mail/social-mail-client/dist/site-editor/blocks/WrapGrid","@social-mail/social-mail-client/dist/site-editor/properties/Properties","@social-mail/social-mail-client/dist/site-editor/properties/groups/LayoutEditor","@social-mail/social-mail-client/dist/site-editor/properties/controls/PropertyEditor","@social-mail/social-mail-client/dist/site-editor/styler/StylerSet","@social-mail/social-mail-client/dist/site-editor/styler/Styler","@social-mail/social-mail-client/dist/site-editor/styler/properties/stylerBorder","@social-mail/social-mail-client/dist/site-editor/styler/properties/layout/display","@social-mail/social-mail-client/dist/site-editor/styler/properties/layout/flex/flex","@social-mail/social-mail-client/dist/site-editor/styler/properties/layout/items-position/itemsPosition","@social-mail/social-mail-client/dist/site-editor/styler/properties/layout/layout","@social-mail/social-mail-client/dist/site-editor/styler/properties/stylerPosition","@social-mail/social-mail-client/dist/site-editor/styler/properties/stylerSizes","@social-mail/social-mail-client/dist/site-editor/styler/properties/stylerSpace","@social-mail/social-mail-client/dist/site-editor/styler/properties/text/stylerText","@social-mail/social-mail-client/dist/site-editor/styler/properties/stylerBackground","@social-mail/social-mail-client/dist/site-editor/properties/groups/TextPropertyEditor","@social-mail/social-mail-client/dist/site-editor/properties/controls/SizeEditorControl","@social-mail/social-mail-client/dist/site-editor/properties/groups/BorderGroupEditor","@social-mail/social-mail-client/dist/site-editor/properties/groups/SizeGroupEditor","@social-mail/social-mail-client/dist/site-editor/properties/groups/SpaceGroupEditor","@social-mail/social-mail-client/dist/site-editor/properties/groups/PositionGroupEditor","@social-mail/social-mail-client/dist/site-editor/properties/groups/BackgroundGroupEditor","@social-mail/social-mail-client/dist/site-editor/editor/SelectedElement","@social-mail/social-mail-client/dist/web/page/files/media/ChooseMediaPage","@social-mail/social-mail-client/dist/common/pages/user/change-password/ChangePasswordPage","@social-mail/social-mail-client/dist/common/pages/user/services/UserService","@social-mail/social-mail-client/dist/common/pages/user/multi-factor/MultiFactorSetupPage","@social-mail/social-mail-client/dist/common/pages/websites/list/WebSiteListPage","@social-mail/social-mail-client/dist/common/pages/websites/edit/WebSiteFolderEditor","@social-mail/social-mail-client/dist/common/pages/mailboxes/MailboxDetailPage","@social-mail/social-mail-client/dist/common/pages/mailboxes/settings/EditSyncTargetPage","@social-mail/social-mail-client/dist/common/icons/Icons","@social-mail/social-mail-client/dist/admin/pages/relays/edit/EditRelayPage","@social-mail/social-mail-client/dist/admin/pages/repair/RepairPage","@social-mail/social-mail-client/dist/common/pages/user/login/LoginPage","@social-mail/social-mail-client/dist/admin/drawer/AdminDrawer","@social-mail/social-mail-client/dist/common/controls/menu/MenuItem","@social-mail/social-mail-client/dist/common/controls/ModuleInfo","@web-atoms/core/dist/web/WebApp","@web-atoms/core/dist/core/AtomOnce","@web-atoms/core/dist/web/services/WebBusyIndicatorService","@web-atoms/core/dist/web/styles/StyleBuilder","@web-atoms/core/dist/web/services/WindowService","@web-atoms/core/dist/Atom","@web-atoms/core/dist/core/FormattedError","@web-atoms/core/dist/view-model/AtomWindowViewModel","@web-atoms/core/dist/view-model/AtomViewModel","@web-atoms/core/dist/view-model/baseTypes","@web-atoms/core/dist/web/controls/AtomAlertWindow","@web-atoms/core/dist/web/styles/AtomAlertWindowStyle","@web-atoms/core/dist/web/styles/AtomWindowStyle","@web-atoms/core/src/web/images/close-button-hover.svg","@web-atoms/core/dist/web/controls/AtomWindow","@web-atoms/core/dist/web/controls/AtomTemplate","@web-atoms/core/dist/web/controls/AtomNotification","@web-atoms/core/dist/web/styles/AtomNotificationStyle","@web-atoms/core/dist/web/styles/AtomPopupStyle","@web-atoms/core/dist/web/services/NotificationPopup","@web-atoms/core/dist/web/styles/AtomTheme"]);
|
|
1869
1869
|
|
|
1870
1870
|
System.register([], function (_export, _context) {
|
|
1871
1871
|
"use strict";
|
|
@@ -26445,376 +26445,62 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
|
|
|
26445
26445
|
|
|
26446
26446
|
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/web/page/mails/detail/MailDetailPage");
|
|
26447
26447
|
|
|
26448
|
-
System.register(["
|
|
26448
|
+
System.register(["@web-atoms/web-controls/dist/mobile-app/MobileApp"], function (_export, _context) {
|
|
26449
26449
|
"use strict";
|
|
26450
26450
|
|
|
26451
|
-
var
|
|
26451
|
+
var ContentPage, HomePage;
|
|
26452
26452
|
_export("default", void 0);
|
|
26453
|
+
return {
|
|
26454
|
+
setters: [function (_webAtomsWebControlsDistMobileAppMobileApp) {
|
|
26455
|
+
ContentPage = _webAtomsWebControlsDistMobileAppMobileApp.ContentPage;
|
|
26456
|
+
}],
|
|
26457
|
+
execute: function () {
|
|
26458
|
+
_export("default", HomePage = class HomePage extends ContentPage {});
|
|
26459
|
+
}
|
|
26460
|
+
};
|
|
26461
|
+
});
|
|
26462
|
+
//# sourceMappingURL=HomePage.js.map
|
|
26463
|
+
|
|
26464
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/web/page/home/HomePage");
|
|
26465
|
+
|
|
26466
|
+
System.register(["tslib", "@web-atoms/core/dist/style/styled", "@web-atoms/core/dist/web/controls/AtomControl"], function (_export, _context) {
|
|
26467
|
+
"use strict";
|
|
26468
|
+
|
|
26469
|
+
var __asyncValues, __awaiter, styled, AtomControl, supportsFileSystemAccessAPI, supportsWebkitGetAsEntry, dragEnter, dragOver, dragLeave, eventDrop, FilesDragDrop;
|
|
26453
26470
|
return {
|
|
26454
26471
|
setters: [function (_tslib) {
|
|
26472
|
+
__asyncValues = _tslib.__asyncValues;
|
|
26455
26473
|
__awaiter = _tslib.__awaiter;
|
|
26456
|
-
__decorate = _tslib.__decorate;
|
|
26457
|
-
__metadata = _tslib.__metadata;
|
|
26458
|
-
}, function (_webAtomsWebControlsDistMobileAppMobileApp) {
|
|
26459
|
-
ContentPage = _webAtomsWebControlsDistMobileAppMobileApp.ContentPage;
|
|
26460
|
-
isMobileView = _webAtomsWebControlsDistMobileAppMobileApp.isMobileView;
|
|
26461
|
-
}, function (_modelModel) {
|
|
26462
|
-
Email = _modelModel.Email;
|
|
26463
|
-
EmailRecipient = _modelModel.EmailRecipient;
|
|
26464
|
-
}, function (_webAtomsCoreDistCoreXNode) {
|
|
26465
|
-
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
26466
|
-
}, function (_webAtomsWebControlsDistBasicAtomRepeater) {
|
|
26467
|
-
AtomRepeater = _webAtomsWebControlsDistBasicAtomRepeater.default;
|
|
26468
|
-
}, function (_commonControlsRepeaterInfiniteRepeater) {
|
|
26469
|
-
InfiniteRepeater = _commonControlsRepeaterInfiniteRepeater.default;
|
|
26470
|
-
}, function (_serviceConversationService) {
|
|
26471
|
-
ConversationService = _serviceConversationService.default;
|
|
26472
|
-
renderMail = _serviceConversationService.renderMail;
|
|
26473
|
-
}, function (_webAtomsCoreDistCoreInjectProperty) {
|
|
26474
|
-
InjectProperty = _webAtomsCoreDistCoreInjectProperty.default;
|
|
26475
|
-
}, function (_webAtomsWebControlsDistBasicInlinePopupControl) {
|
|
26476
|
-
InlinePopupControl = _webAtomsWebControlsDistBasicInlinePopupControl.default;
|
|
26477
|
-
}, function (_webAtomsCoreDistCoreBind) {
|
|
26478
|
-
Bind = _webAtomsCoreDistCoreBind.default;
|
|
26479
26474
|
}, function (_webAtomsCoreDistStyleStyled) {
|
|
26480
26475
|
styled = _webAtomsCoreDistStyleStyled.default;
|
|
26481
|
-
}, function (
|
|
26482
|
-
|
|
26483
|
-
}, function (_webAtomsWebControlsDistPageNavigator) {
|
|
26484
|
-
PageNavigator = _webAtomsWebControlsDistPageNavigator.default;
|
|
26485
|
-
}, function (_ComposeMailPage) {
|
|
26486
|
-
ComposeMailPage = _ComposeMailPage.default;
|
|
26487
|
-
}, function (_servicesSocketSockets) {
|
|
26488
|
-
MailboxSocket = _servicesSocketSockets.MailboxSocket;
|
|
26489
|
-
}, function (_webAtomsWebControlsDistBasicLimitedText) {
|
|
26490
|
-
LimitedText = _webAtomsWebControlsDistBasicLimitedText.default;
|
|
26491
|
-
}, function (_commonDateDateFormats) {
|
|
26492
|
-
DateFormats = _commonDateDateFormats.DateFormats;
|
|
26493
|
-
}, function (_webAtomsWebControlsDistBasicPopupButton) {
|
|
26494
|
-
MenuItem = _webAtomsWebControlsDistBasicPopupButton.MenuItem;
|
|
26495
|
-
PopupActionButton = _webAtomsWebControlsDistBasicPopupButton.PopupActionButton;
|
|
26496
|
-
}, function (_commonPagesLogsLogsPage) {
|
|
26497
|
-
LogsPage = _commonPagesLogsLogsPage.default;
|
|
26498
|
-
}, function (_commonSocialMailApp) {
|
|
26499
|
-
SocialMailApp = _commonSocialMailApp.default;
|
|
26500
|
-
}, function (_detailMailDetailPage) {
|
|
26501
|
-
MailDetailPage = _detailMailDetailPage.default;
|
|
26476
|
+
}, function (_webAtomsCoreDistWebControlsAtomControl) {
|
|
26477
|
+
AtomControl = _webAtomsCoreDistWebControlsAtomControl.AtomControl;
|
|
26502
26478
|
}],
|
|
26503
26479
|
execute: function () {
|
|
26504
|
-
|
|
26505
|
-
|
|
26506
|
-
|
|
26507
|
-
|
|
26508
|
-
|
|
26509
|
-
|
|
26510
|
-
position: relative;
|
|
26511
|
-
background-color: canvas;
|
|
26512
|
-
&[data-sent=true] {
|
|
26513
|
-
margin-right: 0;
|
|
26514
|
-
margin-left: 20%;
|
|
26515
|
-
}
|
|
26516
|
-
& > * > .message {
|
|
26517
|
-
margin-bottom: 25px;
|
|
26518
|
-
}
|
|
26519
|
-
`.installLocal();
|
|
26520
|
-
css = styled.css`
|
|
26521
|
-
background-color: var(--window-background);
|
|
26522
|
-
`.installLocal();
|
|
26523
|
-
id = 1;
|
|
26524
|
-
fixLinks = () => {
|
|
26525
|
-
const mID = `m_id_${id++}`;
|
|
26526
|
-
setTimeout(x => {
|
|
26527
|
-
const m = document.getElementById(x);
|
|
26528
|
-
if (!m) {
|
|
26529
|
-
return;
|
|
26530
|
-
}
|
|
26531
|
-
m.querySelectorAll("a").forEach(a => a.target = "_blank");
|
|
26532
|
-
}, 100, mID);
|
|
26533
|
-
return mID;
|
|
26534
|
-
};
|
|
26535
|
-
_export("default", ConversationPage = class ConversationPage extends ContentPage {
|
|
26536
|
-
constructor() {
|
|
26537
|
-
super(...arguments);
|
|
26538
|
-
this.mails = [];
|
|
26539
|
-
this.search = "";
|
|
26540
|
-
this.version = 1;
|
|
26480
|
+
supportsFileSystemAccessAPI = "getAsFileSystemHandle" in DataTransferItem.prototype;
|
|
26481
|
+
supportsWebkitGetAsEntry = "webkitGetAsEntry" in DataTransferItem.prototype;
|
|
26482
|
+
styled.css`
|
|
26483
|
+
|
|
26484
|
+
&[data-drop-enabled] {
|
|
26485
|
+
outline: solid 5px green;
|
|
26541
26486
|
}
|
|
26542
|
-
|
|
26543
|
-
|
|
26544
|
-
|
|
26545
|
-
|
|
26546
|
-
|
|
26547
|
-
const emailAddress = mb.emailAddress.emailAddress;
|
|
26548
|
-
const title = `${name} <${emailAddress}>`;
|
|
26549
|
-
if (isMobileView) {
|
|
26550
|
-
this.title = title;
|
|
26551
|
-
this.headerRenderer = () => XNode.create("div", {
|
|
26552
|
-
"data-layout": "row"
|
|
26553
|
-
}, XNode.create("input", {
|
|
26554
|
-
value: Bind.twoWaysImmediate(() => this.search),
|
|
26555
|
-
type: "search",
|
|
26556
|
-
placeholder: "Search"
|
|
26557
|
-
}));
|
|
26558
|
-
} else {
|
|
26559
|
-
this.titleRenderer = () => XNode.create("div", {
|
|
26560
|
-
"data-layout": "row"
|
|
26561
|
-
}, XNode.create("input", {
|
|
26562
|
-
value: Bind.twoWaysImmediate(() => this.search),
|
|
26563
|
-
type: "search",
|
|
26564
|
-
placeholder: "Search"
|
|
26565
|
-
}), XNode.create("span", {
|
|
26566
|
-
text: title
|
|
26567
|
-
}));
|
|
26568
|
-
}
|
|
26569
|
-
this.registerDisposable(yield this.resolve(MailboxSocket).join(mb.mailboxID.toString(), {
|
|
26570
|
-
newMail: () => {
|
|
26571
|
-
this.version++;
|
|
26572
|
-
}
|
|
26573
|
-
}));
|
|
26574
|
-
this.renderer = XNode.create("div", null, XNode.create(AtomRepeater, Object.assign({
|
|
26575
|
-
"data-layout": "vertical-flex",
|
|
26576
|
-
style: "flex-direction: column-reverse",
|
|
26577
|
-
items: this.mails
|
|
26578
|
-
}, InfiniteRepeater.pagedItems(start => (c, e, cancelToken) => this.conversationService.list({
|
|
26579
|
-
start,
|
|
26580
|
-
size: 10,
|
|
26581
|
-
search: this.search,
|
|
26582
|
-
mailboxID: mb.mailboxID,
|
|
26583
|
-
emailAddressID: mb.emailAddressID,
|
|
26584
|
-
version: this.version,
|
|
26585
|
-
cancelToken
|
|
26586
|
-
})), {
|
|
26587
|
-
itemRenderer: thread => {
|
|
26588
|
-
var _a, _b, _c, _d, _e;
|
|
26589
|
-
const item = thread.email;
|
|
26590
|
-
const internalDate = (_b = (_a = item.dateSent) !== null && _a !== void 0 ? _a : item.dateReceived) !== null && _b !== void 0 ? _b : item.dateCreated;
|
|
26591
|
-
const sent = item.senderID === thread.mailboxID;
|
|
26592
|
-
return XNode.create("div", {
|
|
26593
|
-
class: itemCss,
|
|
26594
|
-
"data-sent": sent
|
|
26595
|
-
}, XNode.create("div", {
|
|
26596
|
-
"data-layout": "row"
|
|
26597
|
-
}, XNode.create("div", {
|
|
26598
|
-
"data-flex": "stretch-full",
|
|
26599
|
-
text: item.subject
|
|
26600
|
-
}), item.received ? XNode.create("div", null) : item.userID !== SocialMailApp.user.userID && XNode.create("div", {
|
|
26601
|
-
"style-max-width": "20ch",
|
|
26602
|
-
title: (_c = item.senderUser) === null || _c === void 0 ? void 0 : _c.displayName,
|
|
26603
|
-
text: (_d = item.senderUser) === null || _d === void 0 ? void 0 : _d.displayName
|
|
26604
|
-
}), XNode.create("div", {
|
|
26605
|
-
text: DateFormats.relative.short(internalDate),
|
|
26606
|
-
title: DateFormats.withWeekDayAndTime(internalDate)
|
|
26607
|
-
}), XNode.create("i", {
|
|
26608
|
-
"data-click-event": "mail-options",
|
|
26609
|
-
class: "fa-light fa-square-ellipsis-vertical",
|
|
26610
|
-
title: "Options"
|
|
26611
|
-
})), XNode.create(LimitedText, {
|
|
26612
|
-
height: "40vh"
|
|
26613
|
-
}, XNode.create("div", Object.assign({
|
|
26614
|
-
class: "message"
|
|
26615
|
-
}, renderMail(thread)))), ((_e = item.attachments) === null || _e === void 0 ? void 0 : _e.length) && XNode.create("div", {
|
|
26616
|
-
class: "attachments",
|
|
26617
|
-
"data-layout": "flex-wrap-padding"
|
|
26618
|
-
}, ...item.attachments.map(a => XNode.create("div", null, XNode.create("i", {
|
|
26619
|
-
class: "fas fa-paperclip"
|
|
26620
|
-
}), XNode.create("a", {
|
|
26621
|
-
text: a.name,
|
|
26622
|
-
target: "_blank",
|
|
26623
|
-
href: a.url
|
|
26624
|
-
})))), !sent && XNode.create("div", {
|
|
26625
|
-
"data-layout": "row"
|
|
26626
|
-
}, XNode.create("i", {
|
|
26627
|
-
"data-click-event": "reply-email",
|
|
26628
|
-
class: "fas fa-reply",
|
|
26629
|
-
title: "Reply"
|
|
26630
|
-
}), XNode.create("i", {
|
|
26631
|
-
"data-click-event": "reply-all-email",
|
|
26632
|
-
class: "fa-solid fa-reply-all"
|
|
26633
|
-
})));
|
|
26634
|
-
}
|
|
26635
|
-
})));
|
|
26636
|
-
this.actionRenderer = () => XNode.create(PopupActionButton, {
|
|
26637
|
-
icon: "fas fa-bars"
|
|
26638
|
-
}, XNode.create("div", {
|
|
26639
|
-
"data-layout": "vertical-flex",
|
|
26640
|
-
"style-width": "200px"
|
|
26641
|
-
}, this.parameters.blocked ? XNode.create(MenuItem, {
|
|
26642
|
-
"data-click-event": "unblock-sender",
|
|
26643
|
-
icon: "fas fa-badge-check",
|
|
26644
|
-
label: "Unblock Sender"
|
|
26645
|
-
}) : XNode.create(MenuItem, {
|
|
26646
|
-
"data-click-event": "block-sender",
|
|
26647
|
-
icon: "fas fa-ban",
|
|
26648
|
-
label: "Block Sender"
|
|
26649
|
-
})));
|
|
26650
|
-
});
|
|
26487
|
+
|
|
26488
|
+
`.installGlobal("[data-drag-drop=\"1\"]");
|
|
26489
|
+
dragEnter = e => {
|
|
26490
|
+
if (!e.dataTransfer) {
|
|
26491
|
+
return;
|
|
26651
26492
|
}
|
|
26652
|
-
|
|
26653
|
-
|
|
26654
|
-
|
|
26655
|
-
|
|
26656
|
-
|
|
26657
|
-
}, XNode.create(MenuItem, {
|
|
26658
|
-
eventClick: () => PageNavigator.pushPage(MailDetailPage, thread.email),
|
|
26659
|
-
icon: "fas fa-eye",
|
|
26660
|
-
label: "Details"
|
|
26661
|
-
}), XNode.create(MenuItem, {
|
|
26662
|
-
href: `/api/files/download/${thread.email.originalFileID}`,
|
|
26663
|
-
icon: "fas fa-download",
|
|
26664
|
-
label: "Download"
|
|
26665
|
-
}), XNode.create(MenuItem, {
|
|
26666
|
-
"data-click-event": "open-logs",
|
|
26667
|
-
icon: "fa-regular fa-clock-rotate-left",
|
|
26668
|
-
label: "Logs"
|
|
26669
|
-
})));
|
|
26670
|
-
});
|
|
26493
|
+
e.currentTarget.setAttribute("data-drop-enabled", "1");
|
|
26494
|
+
};
|
|
26495
|
+
dragOver = e => {
|
|
26496
|
+
if (!e.dataTransfer) {
|
|
26497
|
+
return;
|
|
26671
26498
|
}
|
|
26672
|
-
|
|
26673
|
-
|
|
26674
|
-
|
|
26675
|
-
|
|
26676
|
-
|
|
26677
|
-
emailID
|
|
26678
|
-
});
|
|
26679
|
-
});
|
|
26680
|
-
}
|
|
26681
|
-
replyEmail({
|
|
26682
|
-
email
|
|
26683
|
-
}, ce) {
|
|
26684
|
-
var _a, _b, _c;
|
|
26685
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
26686
|
-
const parse = JSON.parse(email.headers);
|
|
26687
|
-
const emailAddressText = ((_b = (_a = parse === null || parse === void 0 ? void 0 : parse.replyTo) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : this.parameters.emailAddress.emailAddress).toLocaleLowerCase();
|
|
26688
|
-
const name = email.senderName;
|
|
26689
|
-
const parentID = (_c = email.parentID) !== null && _c !== void 0 ? _c : email.emailID;
|
|
26690
|
-
const recipients = [EmailRecipient.create({
|
|
26691
|
-
name,
|
|
26692
|
-
emailAddressText
|
|
26693
|
-
})];
|
|
26694
|
-
if (/all/i.test(ce.type)) {
|
|
26695
|
-
for (const {
|
|
26696
|
-
name: rName,
|
|
26697
|
-
emailAddress: {
|
|
26698
|
-
emailAddress
|
|
26699
|
-
}
|
|
26700
|
-
} of email.recipients) {
|
|
26701
|
-
if (recipients.some(er => er.emailAddress.emailAddress === emailAddress)) {
|
|
26702
|
-
continue;
|
|
26703
|
-
}
|
|
26704
|
-
recipients.push(EmailRecipient.create({
|
|
26705
|
-
name: rName,
|
|
26706
|
-
emailAddressText: emailAddress
|
|
26707
|
-
}));
|
|
26708
|
-
}
|
|
26709
|
-
}
|
|
26710
|
-
const subject = /^re\s?\:/i.test(email.subject) ? email.subject : `Re: ${email.subject}`;
|
|
26711
|
-
const child = Email.create({
|
|
26712
|
-
senderID: this.parameters.mailboxID,
|
|
26713
|
-
subject,
|
|
26714
|
-
parentID,
|
|
26715
|
-
received: false,
|
|
26716
|
-
recipients,
|
|
26717
|
-
htmlBody: `<div contentEditable="true"><p><br/><br/><br/><br/><br/></p></div>`
|
|
26718
|
-
});
|
|
26719
|
-
yield PageNavigator.pushPageForResult(ComposeMailPage, {
|
|
26720
|
-
mailboxID: child.senderID,
|
|
26721
|
-
mailbox: this.parameters.mailbox,
|
|
26722
|
-
model: child
|
|
26723
|
-
});
|
|
26724
|
-
});
|
|
26725
|
-
}
|
|
26726
|
-
blockSender() {
|
|
26727
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
26728
|
-
yield this.conversationService.block(this.parameters);
|
|
26729
|
-
});
|
|
26730
|
-
}
|
|
26731
|
-
unblockSender() {
|
|
26732
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
26733
|
-
yield this.conversationService.block(this.parameters);
|
|
26734
|
-
});
|
|
26735
|
-
}
|
|
26736
|
-
});
|
|
26737
|
-
__decorate([InjectProperty, __metadata("design:type", ConversationService)], ConversationPage.prototype, "conversationService", void 0);
|
|
26738
|
-
__decorate([Action({
|
|
26739
|
-
onEvent: "mail-options"
|
|
26740
|
-
}), __metadata("design:type", Function), __metadata("design:paramtypes", [Object, CustomEvent]), __metadata("design:returntype", Promise)], ConversationPage.prototype, "mailOptions", null);
|
|
26741
|
-
__decorate([Action({
|
|
26742
|
-
onEvent: "open-logs"
|
|
26743
|
-
}), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Promise)], ConversationPage.prototype, "openLogs", null);
|
|
26744
|
-
__decorate([Action({
|
|
26745
|
-
onEvent: ["reply-email", "reply-all-email"]
|
|
26746
|
-
}), __metadata("design:type", Function), __metadata("design:paramtypes", [Object, CustomEvent]), __metadata("design:returntype", Promise)], ConversationPage.prototype, "replyEmail", null);
|
|
26747
|
-
__decorate([Action({
|
|
26748
|
-
onEvent: "block-sender",
|
|
26749
|
-
confirm: "Are you sure you want to block this sender?"
|
|
26750
|
-
}), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise)], ConversationPage.prototype, "blockSender", null);
|
|
26751
|
-
__decorate([Action({
|
|
26752
|
-
onEvent: "unblock-sender",
|
|
26753
|
-
confirm: "Are you sure you want to unblock this sender?"
|
|
26754
|
-
}), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise)], ConversationPage.prototype, "unblockSender", null);
|
|
26755
|
-
}
|
|
26756
|
-
};
|
|
26757
|
-
});
|
|
26758
|
-
//# sourceMappingURL=ConversationPage.js.map
|
|
26759
|
-
|
|
26760
|
-
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/web/page/mails/ConversationPage");
|
|
26761
|
-
|
|
26762
|
-
System.register(["@web-atoms/web-controls/dist/mobile-app/MobileApp"], function (_export, _context) {
|
|
26763
|
-
"use strict";
|
|
26764
|
-
|
|
26765
|
-
var ContentPage, HomePage;
|
|
26766
|
-
_export("default", void 0);
|
|
26767
|
-
return {
|
|
26768
|
-
setters: [function (_webAtomsWebControlsDistMobileAppMobileApp) {
|
|
26769
|
-
ContentPage = _webAtomsWebControlsDistMobileAppMobileApp.ContentPage;
|
|
26770
|
-
}],
|
|
26771
|
-
execute: function () {
|
|
26772
|
-
_export("default", HomePage = class HomePage extends ContentPage {});
|
|
26773
|
-
}
|
|
26774
|
-
};
|
|
26775
|
-
});
|
|
26776
|
-
//# sourceMappingURL=HomePage.js.map
|
|
26777
|
-
|
|
26778
|
-
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/web/page/home/HomePage");
|
|
26779
|
-
|
|
26780
|
-
System.register(["tslib", "@web-atoms/core/dist/style/styled", "@web-atoms/core/dist/web/controls/AtomControl"], function (_export, _context) {
|
|
26781
|
-
"use strict";
|
|
26782
|
-
|
|
26783
|
-
var __asyncValues, __awaiter, styled, AtomControl, supportsFileSystemAccessAPI, supportsWebkitGetAsEntry, dragEnter, dragOver, dragLeave, eventDrop, FilesDragDrop;
|
|
26784
|
-
return {
|
|
26785
|
-
setters: [function (_tslib) {
|
|
26786
|
-
__asyncValues = _tslib.__asyncValues;
|
|
26787
|
-
__awaiter = _tslib.__awaiter;
|
|
26788
|
-
}, function (_webAtomsCoreDistStyleStyled) {
|
|
26789
|
-
styled = _webAtomsCoreDistStyleStyled.default;
|
|
26790
|
-
}, function (_webAtomsCoreDistWebControlsAtomControl) {
|
|
26791
|
-
AtomControl = _webAtomsCoreDistWebControlsAtomControl.AtomControl;
|
|
26792
|
-
}],
|
|
26793
|
-
execute: function () {
|
|
26794
|
-
supportsFileSystemAccessAPI = "getAsFileSystemHandle" in DataTransferItem.prototype;
|
|
26795
|
-
supportsWebkitGetAsEntry = "webkitGetAsEntry" in DataTransferItem.prototype;
|
|
26796
|
-
styled.css`
|
|
26797
|
-
|
|
26798
|
-
&[data-drop-enabled] {
|
|
26799
|
-
outline: solid 5px green;
|
|
26800
|
-
}
|
|
26801
|
-
|
|
26802
|
-
`.installGlobal("[data-drag-drop=\"1\"]");
|
|
26803
|
-
dragEnter = e => {
|
|
26804
|
-
if (!e.dataTransfer) {
|
|
26805
|
-
return;
|
|
26806
|
-
}
|
|
26807
|
-
e.currentTarget.setAttribute("data-drop-enabled", "1");
|
|
26808
|
-
};
|
|
26809
|
-
dragOver = e => {
|
|
26810
|
-
if (!e.dataTransfer) {
|
|
26811
|
-
return;
|
|
26812
|
-
}
|
|
26813
|
-
e.preventDefault();
|
|
26814
|
-
};
|
|
26815
|
-
dragLeave = e => {
|
|
26816
|
-
if (!e.dataTransfer) {
|
|
26817
|
-
return;
|
|
26499
|
+
e.preventDefault();
|
|
26500
|
+
};
|
|
26501
|
+
dragLeave = e => {
|
|
26502
|
+
if (!e.dataTransfer) {
|
|
26503
|
+
return;
|
|
26818
26504
|
}
|
|
26819
26505
|
e.currentTarget.removeAttribute("data-drop-enabled");
|
|
26820
26506
|
};
|
|
@@ -28466,1095 +28152,2736 @@ System.register(["./tokenizer"], function (_export, _context) {
|
|
|
28466
28152
|
if (value.startsWith('"')) {
|
|
28467
28153
|
value = JSON.parse(value);
|
|
28468
28154
|
}
|
|
28469
|
-
} catch (_a) {}
|
|
28470
|
-
pairs[key] = value;
|
|
28155
|
+
} catch (_a) {}
|
|
28156
|
+
pairs[key] = value;
|
|
28157
|
+
}
|
|
28158
|
+
return pairs;
|
|
28159
|
+
});
|
|
28160
|
+
}
|
|
28161
|
+
};
|
|
28162
|
+
});
|
|
28163
|
+
//# sourceMappingURL=parsePairs.js.map
|
|
28164
|
+
|
|
28165
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/services/mime-service/parsePairs");
|
|
28166
|
+
|
|
28167
|
+
System.register(["./parsePairs"], function (_export, _context) {
|
|
28168
|
+
"use strict";
|
|
28169
|
+
|
|
28170
|
+
var parsePairs, HeaderContentType;
|
|
28171
|
+
_export("HeaderContentType", void 0);
|
|
28172
|
+
return {
|
|
28173
|
+
setters: [function (_parsePairs) {
|
|
28174
|
+
parsePairs = _parsePairs.parsePairs;
|
|
28175
|
+
}],
|
|
28176
|
+
execute: function () {
|
|
28177
|
+
_export("HeaderContentType", HeaderContentType = class HeaderContentType {
|
|
28178
|
+
constructor(type, charset = "UTF-8", boundary) {
|
|
28179
|
+
this.type = type;
|
|
28180
|
+
this.charset = charset;
|
|
28181
|
+
this.boundary = boundary;
|
|
28182
|
+
}
|
|
28183
|
+
parse(text) {
|
|
28184
|
+
const items = parsePairs(text, "type");
|
|
28185
|
+
this.type = items.type;
|
|
28186
|
+
this.charset = items.charset;
|
|
28187
|
+
this.boundary = items.boundary;
|
|
28188
|
+
}
|
|
28189
|
+
toString() {
|
|
28190
|
+
if (this.boundary) {
|
|
28191
|
+
return `${this.type}; charset="${this.charset}"; boundary="${this.boundary}";`;
|
|
28192
|
+
}
|
|
28193
|
+
return `${this.type}; charset="${this.charset}";`;
|
|
28194
|
+
}
|
|
28195
|
+
});
|
|
28196
|
+
}
|
|
28197
|
+
};
|
|
28198
|
+
});
|
|
28199
|
+
//# sourceMappingURL=HeaderContentType.js.map
|
|
28200
|
+
|
|
28201
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/services/mime-service/HeaderContentType");
|
|
28202
|
+
|
|
28203
|
+
System.register([], function (_export, _context) {
|
|
28204
|
+
"use strict";
|
|
28205
|
+
|
|
28206
|
+
var toBuffer, RawBuffer;
|
|
28207
|
+
return {
|
|
28208
|
+
setters: [],
|
|
28209
|
+
execute: function () {
|
|
28210
|
+
toBuffer = text => {
|
|
28211
|
+
const bytes = new Uint8Array(text.length);
|
|
28212
|
+
for (let index = 0; index < text.length; index++) {
|
|
28213
|
+
bytes[index] = text.charCodeAt(index);
|
|
28214
|
+
}
|
|
28215
|
+
return bytes.buffer;
|
|
28216
|
+
};
|
|
28217
|
+
_export("RawBuffer", RawBuffer = {
|
|
28218
|
+
decode: (bytesAsString, encoding = "utf-8") => {
|
|
28219
|
+
if (!encoding) {
|
|
28220
|
+
return bytesAsString;
|
|
28221
|
+
}
|
|
28222
|
+
const te = new TextDecoder(encoding);
|
|
28223
|
+
return te.decode(toBuffer(bytesAsString));
|
|
28224
|
+
},
|
|
28225
|
+
encode: (text, encoding = "utf-8") => {
|
|
28226
|
+
if (!/utf\-?8/i.test(encoding)) {
|
|
28227
|
+
throw new Error(`Encoding ${encoding} not supported`);
|
|
28228
|
+
}
|
|
28229
|
+
const te = new TextEncoder();
|
|
28230
|
+
const array = te.encode(text);
|
|
28231
|
+
const a = [];
|
|
28232
|
+
for (const iterator of array) {
|
|
28233
|
+
a.push(String.fromCharCode(iterator));
|
|
28234
|
+
}
|
|
28235
|
+
return a.join("");
|
|
28236
|
+
},
|
|
28237
|
+
toBase64Async(blob, asDataUrl = false) {
|
|
28238
|
+
return new Promise((resolve, reject) => {
|
|
28239
|
+
const reader = new FileReader();
|
|
28240
|
+
reader.onerror = () => {
|
|
28241
|
+
reject(reader.error);
|
|
28242
|
+
};
|
|
28243
|
+
reader.onload = () => {
|
|
28244
|
+
const text = reader.result;
|
|
28245
|
+
if (asDataUrl) {
|
|
28246
|
+
resolve(text);
|
|
28247
|
+
return;
|
|
28248
|
+
}
|
|
28249
|
+
const index = text.indexOf(",");
|
|
28250
|
+
resolve(text.substring(index + 1));
|
|
28251
|
+
};
|
|
28252
|
+
reader.readAsDataURL(blob);
|
|
28253
|
+
});
|
|
28254
|
+
}
|
|
28255
|
+
});
|
|
28256
|
+
}
|
|
28257
|
+
};
|
|
28258
|
+
});
|
|
28259
|
+
//# sourceMappingURL=RawBuffer.js.map
|
|
28260
|
+
|
|
28261
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/services/mime-service/encoder/RawBuffer");
|
|
28262
|
+
|
|
28263
|
+
System.register(["./RawBuffer"], function (_export, _context) {
|
|
28264
|
+
"use strict";
|
|
28265
|
+
|
|
28266
|
+
var RawBuffer, isEncodedRegEx, hexToUnicode, decode, isSimpleText, wordEncoding;
|
|
28267
|
+
return {
|
|
28268
|
+
setters: [function (_RawBuffer) {
|
|
28269
|
+
RawBuffer = _RawBuffer.RawBuffer;
|
|
28270
|
+
}],
|
|
28271
|
+
execute: function () {
|
|
28272
|
+
isEncodedRegEx = /\=\?([^\?\s]+)\?([^\?\s]{1})\?([^\s\?]+)\?\=\s*/gm;
|
|
28273
|
+
hexToUnicode = /(\=([0-9a-f]{2}))|(\_)/gmi;
|
|
28274
|
+
decode = text => {
|
|
28275
|
+
return text.replace(isEncodedRegEx, (matched, encoding, format, buffer) => {
|
|
28276
|
+
if (/b/i.test(format)) {
|
|
28277
|
+
return RawBuffer.decode(atob(buffer), encoding);
|
|
28278
|
+
}
|
|
28279
|
+
if (/q/i.test(format)) {
|
|
28280
|
+
const replaced = buffer.replace(hexToUnicode, (m, group, code) => {
|
|
28281
|
+
if (m === "_") {
|
|
28282
|
+
return " ";
|
|
28283
|
+
}
|
|
28284
|
+
return String.fromCharCode(parseInt(code, 16));
|
|
28285
|
+
});
|
|
28286
|
+
return RawBuffer.decode(replaced, encoding);
|
|
28287
|
+
}
|
|
28288
|
+
return matched;
|
|
28289
|
+
});
|
|
28290
|
+
};
|
|
28291
|
+
isSimpleText = /[0-9a-zA-Z\x20]/;
|
|
28292
|
+
_export("wordEncoding", wordEncoding = {
|
|
28293
|
+
decode,
|
|
28294
|
+
encode: (word, ifNeeded = false) => {
|
|
28295
|
+
if (ifNeeded) {
|
|
28296
|
+
if (isSimpleText.test(word)) {
|
|
28297
|
+
return word;
|
|
28298
|
+
}
|
|
28299
|
+
}
|
|
28300
|
+
word = RawBuffer.encode(word);
|
|
28301
|
+
return `=?UTF-8?B?${btoa(word)}?=`;
|
|
28302
|
+
}
|
|
28303
|
+
});
|
|
28304
|
+
}
|
|
28305
|
+
};
|
|
28306
|
+
});
|
|
28307
|
+
//# sourceMappingURL=word-encoding.js.map
|
|
28308
|
+
|
|
28309
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/services/mime-service/encoder/word-encoding");
|
|
28310
|
+
|
|
28311
|
+
System.register(["./encoder/word-encoding", "./parsePairs"], function (_export, _context) {
|
|
28312
|
+
"use strict";
|
|
28313
|
+
|
|
28314
|
+
var wordEncoding, parsePairs, HeaderContentDisposition;
|
|
28315
|
+
_export("HeaderContentDisposition", void 0);
|
|
28316
|
+
return {
|
|
28317
|
+
setters: [function (_encoderWordEncoding) {
|
|
28318
|
+
wordEncoding = _encoderWordEncoding.wordEncoding;
|
|
28319
|
+
}, function (_parsePairs) {
|
|
28320
|
+
parsePairs = _parsePairs.parsePairs;
|
|
28321
|
+
}],
|
|
28322
|
+
execute: function () {
|
|
28323
|
+
_export("HeaderContentDisposition", HeaderContentDisposition = class HeaderContentDisposition {
|
|
28324
|
+
constructor(type, filename, name) {
|
|
28325
|
+
this.type = type;
|
|
28326
|
+
this.filename = filename;
|
|
28327
|
+
this.name = name;
|
|
28328
|
+
}
|
|
28329
|
+
parse(text) {
|
|
28330
|
+
const items = parsePairs(text, "type");
|
|
28331
|
+
this.type = items.type;
|
|
28332
|
+
this.filename = items.filename;
|
|
28333
|
+
this.name = items.name;
|
|
28334
|
+
}
|
|
28335
|
+
toString() {
|
|
28336
|
+
return `${this.type};\r\n\t\tfilename="${wordEncoding.encode(this.filename)}";`;
|
|
28337
|
+
}
|
|
28338
|
+
});
|
|
28339
|
+
}
|
|
28340
|
+
};
|
|
28341
|
+
});
|
|
28342
|
+
//# sourceMappingURL=HeaderContentDisposition.js.map
|
|
28343
|
+
|
|
28344
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/services/mime-service/HeaderContentDisposition");
|
|
28345
|
+
|
|
28346
|
+
System.register([], function (_export, _context) {
|
|
28347
|
+
"use strict";
|
|
28348
|
+
|
|
28349
|
+
function base64toBlob(base64Data, contentType) {
|
|
28350
|
+
contentType = contentType || '';
|
|
28351
|
+
const sliceSize = 1024;
|
|
28352
|
+
const byteCharacters = atob(base64Data);
|
|
28353
|
+
const bytesLength = byteCharacters.length;
|
|
28354
|
+
const slicesCount = Math.ceil(bytesLength / sliceSize);
|
|
28355
|
+
const byteArrays = new Array(slicesCount);
|
|
28356
|
+
for (let sliceIndex = 0; sliceIndex < slicesCount; ++sliceIndex) {
|
|
28357
|
+
const begin = sliceIndex * sliceSize;
|
|
28358
|
+
const end = Math.min(begin + sliceSize, bytesLength);
|
|
28359
|
+
const bytes = new Array(end - begin);
|
|
28360
|
+
for (let offset = begin, i = 0; offset < end; ++i, ++offset) {
|
|
28361
|
+
bytes[i] = byteCharacters[offset].charCodeAt(0);
|
|
28362
|
+
}
|
|
28363
|
+
byteArrays[sliceIndex] = new Uint8Array(bytes);
|
|
28364
|
+
}
|
|
28365
|
+
return new Blob(byteArrays, {
|
|
28366
|
+
type: contentType
|
|
28367
|
+
});
|
|
28368
|
+
}
|
|
28369
|
+
_export("base64toBlob", base64toBlob);
|
|
28370
|
+
return {
|
|
28371
|
+
setters: [],
|
|
28372
|
+
execute: function () {}
|
|
28373
|
+
};
|
|
28374
|
+
});
|
|
28375
|
+
//# sourceMappingURL=base64-to-blob.js.map
|
|
28376
|
+
|
|
28377
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/services/mime-service/encoder/base64-to-blob");
|
|
28378
|
+
|
|
28379
|
+
System.register([], function (_export, _context) {
|
|
28380
|
+
"use strict";
|
|
28381
|
+
|
|
28382
|
+
var stringFromCharCode, decode, handleTrailingCharacters, regexUnsafeSymbols, encode, quotedPrintable;
|
|
28383
|
+
return {
|
|
28384
|
+
setters: [],
|
|
28385
|
+
execute: function () {
|
|
28386
|
+
stringFromCharCode = String.fromCharCode;
|
|
28387
|
+
decode = function (input) {
|
|
28388
|
+
return input.replace(/[\t\x20]$/gm, '').replace(/=(?:\r\n?|\n|$)/g, '').replace(/=([a-fA-F0-9]{2})/g, function ($0, $1) {
|
|
28389
|
+
const codePoint = parseInt($1, 16);
|
|
28390
|
+
return stringFromCharCode(codePoint);
|
|
28391
|
+
});
|
|
28392
|
+
};
|
|
28393
|
+
handleTrailingCharacters = function (text) {
|
|
28394
|
+
return text.replace(/\x20$/, '=20').replace(/\t$/, '=09');
|
|
28395
|
+
};
|
|
28396
|
+
regexUnsafeSymbols = /[\0-\x08\n-\x1F=\x7F-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
|
28397
|
+
encode = function (text) {
|
|
28398
|
+
const encoded = text.replace(regexUnsafeSymbols, function (symbol) {
|
|
28399
|
+
if (symbol > '\xFF') {
|
|
28400
|
+
throw RangeError('`quotedPrintable.encode()` expects extended ASCII input only. ' + 'Don\u2019t forget to encode the input first using a character ' + 'encoding like UTF-8.');
|
|
28401
|
+
}
|
|
28402
|
+
const codePoint = symbol.charCodeAt(0);
|
|
28403
|
+
const hexadecimal = codePoint.toString(16).toUpperCase();
|
|
28404
|
+
return '=' + ('0' + hexadecimal).slice(-2);
|
|
28405
|
+
});
|
|
28406
|
+
const LINE_LENGTH = 75;
|
|
28407
|
+
const lines = encoded.split(/\r\n?|\n/g);
|
|
28408
|
+
let lineIndex = -1;
|
|
28409
|
+
const lineCount = lines.length;
|
|
28410
|
+
const result = [];
|
|
28411
|
+
let buffer;
|
|
28412
|
+
while (++lineIndex < lineCount) {
|
|
28413
|
+
const line = lines[lineIndex];
|
|
28414
|
+
let index = 0;
|
|
28415
|
+
const length = line.length;
|
|
28416
|
+
while (index < length) {
|
|
28417
|
+
buffer = encoded.slice(index, index + LINE_LENGTH);
|
|
28418
|
+
if (/=$/.test(buffer)) {
|
|
28419
|
+
buffer = buffer.slice(0, LINE_LENGTH - 1);
|
|
28420
|
+
index += LINE_LENGTH - 1;
|
|
28421
|
+
} else if (/=[A-F0-9]$/.test(buffer)) {
|
|
28422
|
+
buffer = buffer.slice(0, LINE_LENGTH - 2);
|
|
28423
|
+
index += LINE_LENGTH - 2;
|
|
28424
|
+
} else {
|
|
28425
|
+
index += LINE_LENGTH;
|
|
28426
|
+
}
|
|
28427
|
+
result.push(buffer);
|
|
28428
|
+
}
|
|
28429
|
+
}
|
|
28430
|
+
const lastLineLength = buffer.length;
|
|
28431
|
+
if (/[\t\x20]$/.test(buffer)) {
|
|
28432
|
+
result.pop();
|
|
28433
|
+
if (lastLineLength + 2 <= LINE_LENGTH + 1) {
|
|
28434
|
+
result.push(handleTrailingCharacters(buffer));
|
|
28435
|
+
} else {
|
|
28436
|
+
result.push(buffer.slice(0, lastLineLength - 1), handleTrailingCharacters(buffer.slice(lastLineLength - 1, lastLineLength)));
|
|
28437
|
+
}
|
|
28438
|
+
}
|
|
28439
|
+
return result.join('=\r\n');
|
|
28440
|
+
};
|
|
28441
|
+
_export("quotedPrintable", quotedPrintable = {
|
|
28442
|
+
encode,
|
|
28443
|
+
decode,
|
|
28444
|
+
'version': '1.0.1'
|
|
28445
|
+
});
|
|
28446
|
+
}
|
|
28447
|
+
};
|
|
28448
|
+
});
|
|
28449
|
+
//# sourceMappingURL=quoted-printable.js.map
|
|
28450
|
+
|
|
28451
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/services/mime-service/encoder/quoted-printable");
|
|
28452
|
+
|
|
28453
|
+
System.register(["tslib", "../../common/QueryIterator", "./AttachmentFile", "./HeaderContentType", "./HeaderContentDisposition", "./encoder/RawBuffer", "./encoder/base64-to-blob", "./encoder/quoted-printable", "./encoder/word-encoding"], function (_export, _context) {
|
|
28454
|
+
"use strict";
|
|
28455
|
+
|
|
28456
|
+
var __asyncValues, __awaiter, QueryIterator, AttachmentFile, HeaderContentType, HeaderContentDisposition, RawBuffer, base64toBlob, quotedPrintable, wordEncoding, MimeNode;
|
|
28457
|
+
_export("MimeNode", void 0);
|
|
28458
|
+
return {
|
|
28459
|
+
setters: [function (_tslib) {
|
|
28460
|
+
__asyncValues = _tslib.__asyncValues;
|
|
28461
|
+
__awaiter = _tslib.__awaiter;
|
|
28462
|
+
}, function (_commonQueryIterator) {
|
|
28463
|
+
QueryIterator = _commonQueryIterator.default;
|
|
28464
|
+
}, function (_AttachmentFile) {
|
|
28465
|
+
AttachmentFile = _AttachmentFile.AttachmentFile;
|
|
28466
|
+
}, function (_HeaderContentType) {
|
|
28467
|
+
HeaderContentType = _HeaderContentType.HeaderContentType;
|
|
28468
|
+
}, function (_HeaderContentDisposition) {
|
|
28469
|
+
HeaderContentDisposition = _HeaderContentDisposition.HeaderContentDisposition;
|
|
28470
|
+
}, function (_encoderRawBuffer) {
|
|
28471
|
+
RawBuffer = _encoderRawBuffer.RawBuffer;
|
|
28472
|
+
}, function (_encoderBase64ToBlob) {
|
|
28473
|
+
base64toBlob = _encoderBase64ToBlob.base64toBlob;
|
|
28474
|
+
}, function (_encoderQuotedPrintable) {
|
|
28475
|
+
quotedPrintable = _encoderQuotedPrintable.quotedPrintable;
|
|
28476
|
+
}, function (_encoderWordEncoding) {
|
|
28477
|
+
wordEncoding = _encoderWordEncoding.wordEncoding;
|
|
28478
|
+
}],
|
|
28479
|
+
execute: function () {
|
|
28480
|
+
;
|
|
28481
|
+
;
|
|
28482
|
+
_export("MimeNode", MimeNode = class MimeNode {
|
|
28483
|
+
static createMessage({
|
|
28484
|
+
html,
|
|
28485
|
+
subject,
|
|
28486
|
+
text = "",
|
|
28487
|
+
name = "",
|
|
28488
|
+
attachments = []
|
|
28489
|
+
}) {
|
|
28490
|
+
const root = new MimeNode("multipart/mixed");
|
|
28491
|
+
root.setHeader("Subject", subject);
|
|
28492
|
+
if (name) {
|
|
28493
|
+
root.setHeader("X-Name", name);
|
|
28494
|
+
}
|
|
28495
|
+
const body = new MimeNode("multipart/alternative");
|
|
28496
|
+
body.children = [];
|
|
28497
|
+
if (html) {
|
|
28498
|
+
body.children.push(this.create(html, "text/html"));
|
|
28499
|
+
}
|
|
28500
|
+
if (text) {
|
|
28501
|
+
body.children.push(this.create(text, "text/plain"));
|
|
28502
|
+
}
|
|
28503
|
+
root.children = [body];
|
|
28504
|
+
if (attachments) {
|
|
28505
|
+
for (const iterator of attachments) {
|
|
28506
|
+
root.children.push(this.create(iterator));
|
|
28507
|
+
}
|
|
28508
|
+
}
|
|
28509
|
+
return root;
|
|
28510
|
+
}
|
|
28511
|
+
static create(text, type, id) {
|
|
28512
|
+
if (typeof text === "string") {
|
|
28513
|
+
const node = new MimeNode(type);
|
|
28514
|
+
node.text = text;
|
|
28515
|
+
return node;
|
|
28516
|
+
}
|
|
28517
|
+
const fileNode = new MimeNode(text.type);
|
|
28518
|
+
fileNode.blobData = text;
|
|
28519
|
+
fileNode.contentDisposition = new HeaderContentDisposition(type || "attachment");
|
|
28520
|
+
fileNode.contentDisposition.filename = text.name;
|
|
28521
|
+
fileNode.setHeader("Content-Disposition", fileNode.contentDisposition);
|
|
28522
|
+
if (id) {
|
|
28523
|
+
fileNode.setHeader("Content-Id", id);
|
|
28524
|
+
}
|
|
28525
|
+
return fileNode;
|
|
28526
|
+
}
|
|
28527
|
+
get text() {
|
|
28528
|
+
var _a, _b, _c;
|
|
28529
|
+
let {
|
|
28530
|
+
encoded
|
|
28531
|
+
} = this;
|
|
28532
|
+
if (!encoded) {
|
|
28533
|
+
return;
|
|
28534
|
+
}
|
|
28535
|
+
const cte = (_a = this.contentTransferEncoding) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
28536
|
+
switch (cte) {
|
|
28537
|
+
case "quoted-printable":
|
|
28538
|
+
encoded = quotedPrintable.decode(encoded);
|
|
28539
|
+
break;
|
|
28540
|
+
case "base64":
|
|
28541
|
+
encoded = btoa(encoded);
|
|
28542
|
+
break;
|
|
28543
|
+
}
|
|
28544
|
+
return (_b = this.textContent) !== null && _b !== void 0 ? _b : this.textContent = RawBuffer.decode(encoded, (_c = this.contentType) === null || _c === void 0 ? void 0 : _c.charset);
|
|
28545
|
+
}
|
|
28546
|
+
set text(v) {
|
|
28547
|
+
this.contentTransferEncoding = "quoted-printable";
|
|
28548
|
+
this.textContent = v;
|
|
28549
|
+
}
|
|
28550
|
+
get blob() {
|
|
28551
|
+
var _a, _b;
|
|
28552
|
+
if (((_a = this.contentTransferEncoding) === null || _a === void 0 ? void 0 : _a.toLocaleLowerCase()) !== "base64") {
|
|
28553
|
+
throw new Error("Not supported");
|
|
28554
|
+
}
|
|
28555
|
+
return (_b = this.blobData) !== null && _b !== void 0 ? _b : this.blobData = base64toBlob(this.encoded, this.contentType.type);
|
|
28556
|
+
}
|
|
28557
|
+
set blob(v) {
|
|
28558
|
+
this.blobData = v;
|
|
28559
|
+
}
|
|
28560
|
+
get contentTransferEncoding() {
|
|
28561
|
+
return this.header("Content-Transfer-Encoding");
|
|
28562
|
+
}
|
|
28563
|
+
set contentTransferEncoding(v) {
|
|
28564
|
+
this.setHeader("Content-Transfer-Encoding", v);
|
|
28565
|
+
}
|
|
28566
|
+
get boundary() {
|
|
28567
|
+
return this.contentType.boundary;
|
|
28568
|
+
}
|
|
28569
|
+
get descendents() {
|
|
28570
|
+
return this.enumerate();
|
|
28571
|
+
}
|
|
28572
|
+
constructor(type) {
|
|
28573
|
+
this.headers = new Map();
|
|
28574
|
+
this.contentType = new HeaderContentType(type);
|
|
28575
|
+
this.headers.set("Content-Type", this.contentType);
|
|
28576
|
+
}
|
|
28577
|
+
getFirstChild(contentType, create = false) {
|
|
28578
|
+
var _a;
|
|
28579
|
+
contentType = contentType.toLocaleLowerCase();
|
|
28580
|
+
let child = QueryIterator.first(this.descendents, x => x.contentType.type === contentType);
|
|
28581
|
+
if (!child && create) {
|
|
28582
|
+
child = new MimeNode(contentType);
|
|
28583
|
+
((_a = this.children) !== null && _a !== void 0 ? _a : this.children = []).push(child);
|
|
28584
|
+
}
|
|
28585
|
+
return child;
|
|
28586
|
+
}
|
|
28587
|
+
header(name) {
|
|
28588
|
+
for (const [key, value] of this.headers.entries()) {
|
|
28589
|
+
if (key.toLocaleLowerCase() === name.toLocaleLowerCase()) {
|
|
28590
|
+
return value;
|
|
28591
|
+
}
|
|
28592
|
+
}
|
|
28593
|
+
}
|
|
28594
|
+
setHeader(name, value) {
|
|
28595
|
+
for (const [key] of this.headers.keys()) {
|
|
28596
|
+
if (key.toLocaleLowerCase() === name.toLocaleLowerCase()) {
|
|
28597
|
+
this.headers.set(key, value);
|
|
28598
|
+
return;
|
|
28599
|
+
}
|
|
28600
|
+
}
|
|
28601
|
+
switch (name.toLocaleLowerCase()) {
|
|
28602
|
+
case "content-type":
|
|
28603
|
+
name = "Content-Type";
|
|
28604
|
+
break;
|
|
28605
|
+
case "content-transfer-encoding":
|
|
28606
|
+
name = "Content-Transfer-Encoding";
|
|
28607
|
+
break;
|
|
28608
|
+
case "content-disposition":
|
|
28609
|
+
name = "Content-Disposition";
|
|
28610
|
+
break;
|
|
28611
|
+
}
|
|
28612
|
+
this.headers.set(name, value);
|
|
28613
|
+
}
|
|
28614
|
+
asFile() {
|
|
28615
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28616
|
+
const text = this.encoded.split("\n").map(x => x.trim()).join("");
|
|
28617
|
+
const url = `data:${this.contentType.type};base64,${text}`;
|
|
28618
|
+
const blob = yield fetch(url);
|
|
28619
|
+
const af = new AttachmentFile([yield blob.blob()], this.contentDisposition.filename, {
|
|
28620
|
+
type: this.contentType.type,
|
|
28621
|
+
contentId: this.header("Content-Id"),
|
|
28622
|
+
disposition: this.contentDisposition.type
|
|
28623
|
+
});
|
|
28624
|
+
af.node = this;
|
|
28625
|
+
return af;
|
|
28626
|
+
});
|
|
28627
|
+
}
|
|
28628
|
+
attachments(files = []) {
|
|
28629
|
+
var _a;
|
|
28630
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28631
|
+
for (const iterator of this.children) {
|
|
28632
|
+
if (iterator.children) {
|
|
28633
|
+
yield iterator.attachments(files);
|
|
28634
|
+
continue;
|
|
28635
|
+
}
|
|
28636
|
+
if ((_a = iterator.contentDisposition) === null || _a === void 0 ? void 0 : _a.type) {
|
|
28637
|
+
files.push(yield iterator.asFile());
|
|
28638
|
+
}
|
|
28639
|
+
}
|
|
28640
|
+
return files;
|
|
28641
|
+
});
|
|
28642
|
+
}
|
|
28643
|
+
parse(lines, last = "") {
|
|
28644
|
+
var _a, e_1, _b, _c, _d, e_2, _e, _f;
|
|
28645
|
+
var _g;
|
|
28646
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28647
|
+
yield this.parseHeaders(lines);
|
|
28648
|
+
let boundary = this.contentType.boundary;
|
|
28649
|
+
if (!boundary) {
|
|
28650
|
+
const data = [];
|
|
28651
|
+
try {
|
|
28652
|
+
for (var _h = true, _j = __asyncValues(lines.read()), _k; _k = yield _j.next(), _a = _k.done, !_a;) {
|
|
28653
|
+
_c = _k.value;
|
|
28654
|
+
_h = false;
|
|
28655
|
+
try {
|
|
28656
|
+
const line = _c;
|
|
28657
|
+
const trimmed = line.trimEnd();
|
|
28658
|
+
if (trimmed.length === 0) {
|
|
28659
|
+
break;
|
|
28660
|
+
}
|
|
28661
|
+
if (trimmed === last) {
|
|
28662
|
+
break;
|
|
28663
|
+
}
|
|
28664
|
+
data.push(line);
|
|
28665
|
+
} finally {
|
|
28666
|
+
_h = true;
|
|
28667
|
+
}
|
|
28668
|
+
}
|
|
28669
|
+
} catch (e_1_1) {
|
|
28670
|
+
e_1 = {
|
|
28671
|
+
error: e_1_1
|
|
28672
|
+
};
|
|
28673
|
+
} finally {
|
|
28674
|
+
try {
|
|
28675
|
+
if (!_h && !_a && (_b = _j.return)) yield _b.call(_j);
|
|
28676
|
+
} finally {
|
|
28677
|
+
if (e_1) throw e_1.error;
|
|
28678
|
+
}
|
|
28679
|
+
}
|
|
28680
|
+
this.encoded = data.join("\n");
|
|
28681
|
+
return;
|
|
28682
|
+
}
|
|
28683
|
+
boundary = "--" + boundary;
|
|
28684
|
+
const end = boundary + "--";
|
|
28685
|
+
for (;;) {
|
|
28686
|
+
let boundaryFound = false;
|
|
28687
|
+
try {
|
|
28688
|
+
for (var _l = true, _m = (e_2 = void 0, __asyncValues(lines.read())), _o; _o = yield _m.next(), _d = _o.done, !_d;) {
|
|
28689
|
+
_f = _o.value;
|
|
28690
|
+
_l = false;
|
|
28691
|
+
try {
|
|
28692
|
+
const line = _f;
|
|
28693
|
+
if (line === boundary) {
|
|
28694
|
+
boundaryFound = true;
|
|
28695
|
+
break;
|
|
28696
|
+
}
|
|
28697
|
+
if (line === end) {
|
|
28698
|
+
return;
|
|
28699
|
+
}
|
|
28700
|
+
} finally {
|
|
28701
|
+
_l = true;
|
|
28702
|
+
}
|
|
28703
|
+
}
|
|
28704
|
+
} catch (e_2_1) {
|
|
28705
|
+
e_2 = {
|
|
28706
|
+
error: e_2_1
|
|
28707
|
+
};
|
|
28708
|
+
} finally {
|
|
28709
|
+
try {
|
|
28710
|
+
if (!_l && !_d && (_e = _m.return)) yield _e.call(_m);
|
|
28711
|
+
} finally {
|
|
28712
|
+
if (e_2) throw e_2.error;
|
|
28713
|
+
}
|
|
28714
|
+
}
|
|
28715
|
+
if (!boundaryFound) {
|
|
28716
|
+
break;
|
|
28717
|
+
}
|
|
28718
|
+
const child = new MimeNode("");
|
|
28719
|
+
yield child.parse(lines, end);
|
|
28720
|
+
((_g = this.children) !== null && _g !== void 0 ? _g : this.children = []).push(child);
|
|
28721
|
+
}
|
|
28722
|
+
});
|
|
28723
|
+
}
|
|
28724
|
+
parseHeaders(lines) {
|
|
28725
|
+
var _a, e_3, _b, _c;
|
|
28726
|
+
var _d;
|
|
28727
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28728
|
+
let headerName = "";
|
|
28729
|
+
let headerValue = "";
|
|
28730
|
+
try {
|
|
28731
|
+
for (var _e = true, _f = __asyncValues(lines.read()), _g; _g = yield _f.next(), _a = _g.done, !_a;) {
|
|
28732
|
+
_c = _g.value;
|
|
28733
|
+
_e = false;
|
|
28734
|
+
try {
|
|
28735
|
+
const iterator = _c;
|
|
28736
|
+
const value = iterator.trim();
|
|
28737
|
+
if (value.length === 0) {
|
|
28738
|
+
break;
|
|
28739
|
+
}
|
|
28740
|
+
if (/^[\x20\t]/.test(iterator)) {
|
|
28741
|
+
headerValue += wordEncoding.decode(value);
|
|
28742
|
+
continue;
|
|
28743
|
+
}
|
|
28744
|
+
if (headerValue) {
|
|
28745
|
+
this.setHeader(headerName, headerValue);
|
|
28746
|
+
}
|
|
28747
|
+
const [k, v] = value.split(":", 2);
|
|
28748
|
+
headerName = k;
|
|
28749
|
+
headerValue = wordEncoding.decode(v.trim());
|
|
28750
|
+
} finally {
|
|
28751
|
+
_e = true;
|
|
28752
|
+
}
|
|
28753
|
+
}
|
|
28754
|
+
} catch (e_3_1) {
|
|
28755
|
+
e_3 = {
|
|
28756
|
+
error: e_3_1
|
|
28757
|
+
};
|
|
28758
|
+
} finally {
|
|
28759
|
+
try {
|
|
28760
|
+
if (!_e && !_a && (_b = _f.return)) yield _b.call(_f);
|
|
28761
|
+
} finally {
|
|
28762
|
+
if (e_3) throw e_3.error;
|
|
28763
|
+
}
|
|
28764
|
+
}
|
|
28765
|
+
if (headerValue) {
|
|
28766
|
+
this.setHeader(headerName, headerValue);
|
|
28767
|
+
}
|
|
28768
|
+
const ct = this.header("Content-Type");
|
|
28769
|
+
this.contentType.parse(ct);
|
|
28770
|
+
this.setHeader("Content-Type", ct);
|
|
28771
|
+
const cd = this.header("Content-Disposition");
|
|
28772
|
+
if (cd) {
|
|
28773
|
+
(_d = this.contentDisposition) !== null && _d !== void 0 ? _d : this.contentDisposition = new HeaderContentDisposition();
|
|
28774
|
+
this.contentDisposition.parse(cd);
|
|
28775
|
+
this.setHeader("Content-Disposition", cd);
|
|
28776
|
+
}
|
|
28777
|
+
});
|
|
28778
|
+
}
|
|
28779
|
+
save(writer) {
|
|
28780
|
+
var _a, _b;
|
|
28781
|
+
var _c;
|
|
28782
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28783
|
+
if (this.textContent) {
|
|
28784
|
+
this.contentType.charset = "UTF-8";
|
|
28785
|
+
}
|
|
28786
|
+
if ((_a = this.children) === null || _a === void 0 ? void 0 : _a.length) {
|
|
28787
|
+
(_c = this.contentType).boundary || (_c.boundary = `${Date.now()}-${Date.now()}-${Date.now()}`);
|
|
28788
|
+
}
|
|
28789
|
+
for (const [key, element] of this.headers.entries()) {
|
|
28790
|
+
switch (key) {
|
|
28791
|
+
case "content-disposition":
|
|
28792
|
+
writer.writeLine(`Content-Disposition: ${this.contentDisposition}`);
|
|
28793
|
+
continue;
|
|
28794
|
+
case "content-type":
|
|
28795
|
+
writer.writeLine(`Content-Type:${this.contentType.toString()}`);
|
|
28796
|
+
continue;
|
|
28797
|
+
case "subject":
|
|
28798
|
+
writer.writeLine(`${key}: ${wordEncoding.encode(element, true)}`);
|
|
28799
|
+
continue;
|
|
28800
|
+
}
|
|
28801
|
+
writer.writeLine(`${key}: ${element}`);
|
|
28802
|
+
}
|
|
28803
|
+
writer.writeLine("");
|
|
28804
|
+
if ((_b = this.children) === null || _b === void 0 ? void 0 : _b.length) {
|
|
28805
|
+
const boundary = `--${this.contentType.boundary}`;
|
|
28806
|
+
for (const iterator of this.children) {
|
|
28807
|
+
writer.writeLine(boundary);
|
|
28808
|
+
yield iterator.save(writer);
|
|
28809
|
+
writer.writeLine("");
|
|
28810
|
+
}
|
|
28811
|
+
writer.writeLine(boundary + "--");
|
|
28812
|
+
return;
|
|
28813
|
+
}
|
|
28814
|
+
if (this.blobData) {
|
|
28815
|
+
const base64 = yield RawBuffer.toBase64Async(this.blobData);
|
|
28816
|
+
let start = 0;
|
|
28817
|
+
const max = 80;
|
|
28818
|
+
for (;;) {
|
|
28819
|
+
if (start + max > base64.length) {
|
|
28820
|
+
writer.writeLine(base64.substring(start));
|
|
28821
|
+
break;
|
|
28822
|
+
}
|
|
28823
|
+
writer.writeLine(base64.substring(start, start + max));
|
|
28824
|
+
start += max;
|
|
28825
|
+
}
|
|
28826
|
+
writer.writeLine("");
|
|
28827
|
+
return;
|
|
28828
|
+
}
|
|
28829
|
+
let text = this.textContent;
|
|
28830
|
+
if (this.contentTransferEncoding === "quoted-printable") {
|
|
28831
|
+
text = quotedPrintable.encode(RawBuffer.encode(text));
|
|
28832
|
+
}
|
|
28833
|
+
writer.writeLine(RawBuffer.encode(text));
|
|
28834
|
+
writer.writeLine("");
|
|
28835
|
+
return;
|
|
28836
|
+
});
|
|
28837
|
+
}
|
|
28838
|
+
*enumerate() {
|
|
28839
|
+
yield this;
|
|
28840
|
+
if (!this.children) {
|
|
28841
|
+
return;
|
|
28842
|
+
}
|
|
28843
|
+
for (const iterator of this.children) {
|
|
28844
|
+
yield* iterator.enumerate();
|
|
28845
|
+
}
|
|
28846
|
+
}
|
|
28847
|
+
});
|
|
28848
|
+
}
|
|
28849
|
+
};
|
|
28850
|
+
});
|
|
28851
|
+
//# sourceMappingURL=MimeNode.js.map
|
|
28852
|
+
|
|
28853
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/services/mime-service/MimeNode");
|
|
28854
|
+
|
|
28855
|
+
System.register(["tslib", "../tokenizer"], function (_export, _context) {
|
|
28856
|
+
"use strict";
|
|
28857
|
+
|
|
28858
|
+
var __asyncGenerator, __await, tokenize, LineStream, StringLineStream, ReadableLineStream;
|
|
28859
|
+
_export({
|
|
28860
|
+
default: void 0,
|
|
28861
|
+
StringLineStream: void 0,
|
|
28862
|
+
ReadableLineStream: void 0
|
|
28863
|
+
});
|
|
28864
|
+
return {
|
|
28865
|
+
setters: [function (_tslib) {
|
|
28866
|
+
__asyncGenerator = _tslib.__asyncGenerator;
|
|
28867
|
+
__await = _tslib.__await;
|
|
28868
|
+
}, function (_tokenizer) {
|
|
28869
|
+
tokenize = _tokenizer.tokenize;
|
|
28870
|
+
}],
|
|
28871
|
+
execute: function () {
|
|
28872
|
+
_export("default", LineStream = class LineStream {
|
|
28873
|
+
read() {
|
|
28874
|
+
var _a;
|
|
28875
|
+
return __asyncGenerator(this, arguments, function* read_1() {
|
|
28876
|
+
const g = (_a = this.g) !== null && _a !== void 0 ? _a : this.g = this.lines();
|
|
28877
|
+
for (;;) {
|
|
28878
|
+
const {
|
|
28879
|
+
value,
|
|
28880
|
+
done
|
|
28881
|
+
} = yield __await(g.next());
|
|
28882
|
+
if (done) {
|
|
28883
|
+
break;
|
|
28884
|
+
}
|
|
28885
|
+
yield yield __await(value);
|
|
28886
|
+
}
|
|
28887
|
+
});
|
|
28888
|
+
}
|
|
28889
|
+
});
|
|
28890
|
+
_export("StringLineStream", StringLineStream = class StringLineStream extends LineStream {
|
|
28891
|
+
constructor(text) {
|
|
28892
|
+
super();
|
|
28893
|
+
this.text = text;
|
|
28894
|
+
}
|
|
28895
|
+
lines() {
|
|
28896
|
+
return __asyncGenerator(this, arguments, function* lines_1() {
|
|
28897
|
+
for (const iterator of tokenize(this.text, "\n")) {
|
|
28898
|
+
yield yield __await(iterator);
|
|
28899
|
+
}
|
|
28900
|
+
});
|
|
28901
|
+
}
|
|
28902
|
+
});
|
|
28903
|
+
_export("ReadableLineStream", ReadableLineStream = class ReadableLineStream extends LineStream {
|
|
28904
|
+
constructor(readable) {
|
|
28905
|
+
super();
|
|
28906
|
+
this.readable = readable;
|
|
28907
|
+
}
|
|
28908
|
+
lines() {
|
|
28909
|
+
return __asyncGenerator(this, arguments, function* lines_2() {
|
|
28910
|
+
const utf8Decoder = new TextDecoder("utf-8");
|
|
28911
|
+
const reader = this.readable.getReader();
|
|
28912
|
+
let {
|
|
28913
|
+
value: chunk,
|
|
28914
|
+
done: readerDone
|
|
28915
|
+
} = yield __await(reader.read());
|
|
28916
|
+
chunk = chunk ? utf8Decoder.decode(chunk, {
|
|
28917
|
+
stream: true
|
|
28918
|
+
}) : "";
|
|
28919
|
+
const re = /\r\n|\n|\r/gm;
|
|
28920
|
+
let startIndex = 0;
|
|
28921
|
+
for (;;) {
|
|
28922
|
+
const result = re.exec(chunk);
|
|
28923
|
+
if (!result) {
|
|
28924
|
+
if (readerDone) {
|
|
28925
|
+
break;
|
|
28926
|
+
}
|
|
28927
|
+
const remainder = chunk.substr(startIndex);
|
|
28928
|
+
({
|
|
28929
|
+
value: chunk,
|
|
28930
|
+
done: readerDone
|
|
28931
|
+
} = yield __await(reader.read()));
|
|
28932
|
+
chunk = remainder + (chunk ? utf8Decoder.decode(chunk, {
|
|
28933
|
+
stream: true
|
|
28934
|
+
}) : "");
|
|
28935
|
+
startIndex = re.lastIndex = 0;
|
|
28936
|
+
continue;
|
|
28937
|
+
}
|
|
28938
|
+
yield yield __await(chunk.substring(startIndex, result.index));
|
|
28939
|
+
startIndex = re.lastIndex;
|
|
28940
|
+
}
|
|
28941
|
+
if (startIndex < chunk.length) {
|
|
28942
|
+
yield yield __await(chunk.substr(startIndex));
|
|
28943
|
+
}
|
|
28944
|
+
});
|
|
28945
|
+
}
|
|
28946
|
+
});
|
|
28947
|
+
}
|
|
28948
|
+
};
|
|
28949
|
+
});
|
|
28950
|
+
//# sourceMappingURL=LineStream.js.map
|
|
28951
|
+
|
|
28952
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/services/mime-service/stream/LineStream");
|
|
28953
|
+
|
|
28954
|
+
System.register([], function (_export, _context) {
|
|
28955
|
+
"use strict";
|
|
28956
|
+
|
|
28957
|
+
var TextWriter, BlobWriter;
|
|
28958
|
+
_export({
|
|
28959
|
+
default: void 0,
|
|
28960
|
+
BlobWriter: void 0
|
|
28961
|
+
});
|
|
28962
|
+
return {
|
|
28963
|
+
setters: [],
|
|
28964
|
+
execute: function () {
|
|
28965
|
+
_export("default", TextWriter = class TextWriter {});
|
|
28966
|
+
_export("BlobWriter", BlobWriter = class BlobWriter extends TextWriter {
|
|
28967
|
+
constructor() {
|
|
28968
|
+
super(...arguments);
|
|
28969
|
+
this.lines = [];
|
|
28970
|
+
}
|
|
28971
|
+
writeLine(line) {
|
|
28972
|
+
this.lines.push(line);
|
|
28973
|
+
}
|
|
28974
|
+
toBlob() {
|
|
28975
|
+
const all = this.lines.join("\n");
|
|
28976
|
+
return new Blob([all], {});
|
|
28977
|
+
}
|
|
28978
|
+
toString() {
|
|
28979
|
+
return this.lines.join("\n");
|
|
28980
|
+
}
|
|
28981
|
+
});
|
|
28982
|
+
}
|
|
28983
|
+
};
|
|
28984
|
+
});
|
|
28985
|
+
//# sourceMappingURL=TextWriter.js.map
|
|
28986
|
+
|
|
28987
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/services/mime-service/stream/TextWriter");
|
|
28988
|
+
|
|
28989
|
+
System.register(["tslib", "./MimeNode", "./stream/LineStream", "./stream/TextWriter"], function (_export, _context) {
|
|
28990
|
+
"use strict";
|
|
28991
|
+
|
|
28992
|
+
var __awaiter, MimeNode, ReadableLineStream, BlobWriter, MimeMessage;
|
|
28993
|
+
_export("default", void 0);
|
|
28994
|
+
return {
|
|
28995
|
+
setters: [function (_tslib) {
|
|
28996
|
+
__awaiter = _tslib.__awaiter;
|
|
28997
|
+
}, function (_MimeNode) {
|
|
28998
|
+
MimeNode = _MimeNode.MimeNode;
|
|
28999
|
+
}, function (_streamLineStream) {
|
|
29000
|
+
ReadableLineStream = _streamLineStream.ReadableLineStream;
|
|
29001
|
+
}, function (_streamTextWriter) {
|
|
29002
|
+
BlobWriter = _streamTextWriter.BlobWriter;
|
|
29003
|
+
}],
|
|
29004
|
+
execute: function () {
|
|
29005
|
+
_export("default", MimeMessage = class MimeMessage {
|
|
29006
|
+
static load(reader, name, inline) {
|
|
29007
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29008
|
+
const node = new MimeNode();
|
|
29009
|
+
if (name) {
|
|
29010
|
+
node.setHeader("X-Name", name);
|
|
29011
|
+
}
|
|
29012
|
+
yield node.parse(new ReadableLineStream(reader));
|
|
29013
|
+
const attachments = yield node.attachments();
|
|
29014
|
+
const msg = new MimeMessage(node, attachments);
|
|
29015
|
+
if (inline) {
|
|
29016
|
+
yield msg.inlineImages();
|
|
29017
|
+
}
|
|
29018
|
+
return msg;
|
|
29019
|
+
});
|
|
29020
|
+
}
|
|
29021
|
+
get name() {
|
|
29022
|
+
return this.node.header("x-name");
|
|
29023
|
+
}
|
|
29024
|
+
get html() {
|
|
29025
|
+
var _a, _b;
|
|
29026
|
+
const alternative = this.node.getFirstChild("multipart/alternative");
|
|
29027
|
+
return (_b = (_a = alternative === null || alternative === void 0 ? void 0 : alternative.getFirstChild("text/html")) === null || _a === void 0 ? void 0 : _a.text) !== null && _b !== void 0 ? _b : "";
|
|
29028
|
+
}
|
|
29029
|
+
set html(v) {
|
|
29030
|
+
const alternative = this.node.getFirstChild("multipart/alternative", true);
|
|
29031
|
+
const htmlMime = alternative.getFirstChild("text/html", true);
|
|
29032
|
+
htmlMime.contentTransferEncoding = "quoted-printable";
|
|
29033
|
+
htmlMime.text = v;
|
|
29034
|
+
htmlMime.contentType.charset = "UTF-8";
|
|
29035
|
+
}
|
|
29036
|
+
get text() {
|
|
29037
|
+
var _a, _b;
|
|
29038
|
+
const alternative = this.node.getFirstChild("multipart/alternative");
|
|
29039
|
+
return (_b = (_a = alternative === null || alternative === void 0 ? void 0 : alternative.getFirstChild("text/plain")) === null || _a === void 0 ? void 0 : _a.text) !== null && _b !== void 0 ? _b : "";
|
|
29040
|
+
}
|
|
29041
|
+
set text(v) {
|
|
29042
|
+
const alternative = this.node.getFirstChild("multipart/alternative", true);
|
|
29043
|
+
const htmlMime = alternative.getFirstChild("text/plain", true);
|
|
29044
|
+
htmlMime.contentTransferEncoding = "quoted-printable";
|
|
29045
|
+
htmlMime.text = v;
|
|
29046
|
+
htmlMime.contentType.charset = "UTF-8";
|
|
29047
|
+
}
|
|
29048
|
+
get subject() {
|
|
29049
|
+
var _a;
|
|
29050
|
+
return (_a = this.node.header("subject")) !== null && _a !== void 0 ? _a : "";
|
|
29051
|
+
}
|
|
29052
|
+
set subject(v) {
|
|
29053
|
+
this.node.setHeader("subject", v);
|
|
29054
|
+
}
|
|
29055
|
+
constructor(node = new MimeNode("multipart/mixed"), attachments = []) {
|
|
29056
|
+
this.node = node;
|
|
29057
|
+
this.attachments = attachments;
|
|
29058
|
+
}
|
|
29059
|
+
save() {
|
|
29060
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29061
|
+
const blobWriter = new BlobWriter();
|
|
29062
|
+
yield this.node.save(blobWriter);
|
|
29063
|
+
return blobWriter.toBlob();
|
|
29064
|
+
});
|
|
29065
|
+
}
|
|
29066
|
+
inlineImages() {
|
|
29067
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29068
|
+
let text = this.html;
|
|
29069
|
+
if (!text) {
|
|
29070
|
+
return;
|
|
29071
|
+
}
|
|
29072
|
+
for (const iterator of this.attachments) {
|
|
29073
|
+
if (iterator.contentId) {
|
|
29074
|
+
const encoded = iterator.node.encoded;
|
|
29075
|
+
text = text.split(`cid:${iterator.contentId}`).join(`data://${iterator.type},${encoded}`);
|
|
29076
|
+
}
|
|
29077
|
+
}
|
|
29078
|
+
});
|
|
29079
|
+
}
|
|
29080
|
+
});
|
|
29081
|
+
}
|
|
29082
|
+
};
|
|
29083
|
+
});
|
|
29084
|
+
//# sourceMappingURL=MimeMessage.js.map
|
|
29085
|
+
|
|
29086
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/services/mime-service/MimeMessage");
|
|
29087
|
+
|
|
29088
|
+
System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/core/Bind", "../../../common/controls/html/InlineHtmlEditorWithToolbar", "../../../services/mime-service/MimeNode", "@web-atoms/web-controls/dist/basic/Form", "@web-atoms/web-controls/dist/basic/FormField", "../../../common/controls/buttons/IconButton", "@web-atoms/core/dist/view-model/Action", "../../../services/mime-service/MimeMessage", "@web-atoms/web-controls/dist/basic/AtomRepeater", "@web-atoms/core/dist/web/core/AtomUI", "../../../services/mime-service/stream/TextWriter", "../../../services/files/LocalFileService"], function (_export, _context) {
|
|
29089
|
+
"use strict";
|
|
29090
|
+
|
|
29091
|
+
var __awaiter, __decorate, __metadata, ContentPage, XNode, Bind, InlineHtmlEditorWithToolbar, MimeNode, Form, FormField, SaveIconTextButton, Action, MimeMessage, AtomRepeater, descendentElementIterator, BlobWriter, LocalFileService, EditTemplatePage;
|
|
29092
|
+
_export("default", void 0);
|
|
29093
|
+
return {
|
|
29094
|
+
setters: [function (_tslib) {
|
|
29095
|
+
__awaiter = _tslib.__awaiter;
|
|
29096
|
+
__decorate = _tslib.__decorate;
|
|
29097
|
+
__metadata = _tslib.__metadata;
|
|
29098
|
+
}, function (_webAtomsWebControlsDistMobileAppMobileApp) {
|
|
29099
|
+
ContentPage = _webAtomsWebControlsDistMobileAppMobileApp.ContentPage;
|
|
29100
|
+
}, function (_webAtomsCoreDistCoreXNode) {
|
|
29101
|
+
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
29102
|
+
}, function (_webAtomsCoreDistCoreBind) {
|
|
29103
|
+
Bind = _webAtomsCoreDistCoreBind.default;
|
|
29104
|
+
}, function (_commonControlsHtmlInlineHtmlEditorWithToolbar) {
|
|
29105
|
+
InlineHtmlEditorWithToolbar = _commonControlsHtmlInlineHtmlEditorWithToolbar.default;
|
|
29106
|
+
}, function (_servicesMimeServiceMimeNode) {
|
|
29107
|
+
MimeNode = _servicesMimeServiceMimeNode.MimeNode;
|
|
29108
|
+
}, function (_webAtomsWebControlsDistBasicForm) {
|
|
29109
|
+
Form = _webAtomsWebControlsDistBasicForm.default;
|
|
29110
|
+
}, function (_webAtomsWebControlsDistBasicFormField) {
|
|
29111
|
+
FormField = _webAtomsWebControlsDistBasicFormField.default;
|
|
29112
|
+
}, function (_commonControlsButtonsIconButton) {
|
|
29113
|
+
SaveIconTextButton = _commonControlsButtonsIconButton.SaveIconTextButton;
|
|
29114
|
+
}, function (_webAtomsCoreDistViewModelAction) {
|
|
29115
|
+
Action = _webAtomsCoreDistViewModelAction.default;
|
|
29116
|
+
}, function (_servicesMimeServiceMimeMessage) {
|
|
29117
|
+
MimeMessage = _servicesMimeServiceMimeMessage.default;
|
|
29118
|
+
}, function (_webAtomsWebControlsDistBasicAtomRepeater) {
|
|
29119
|
+
AtomRepeater = _webAtomsWebControlsDistBasicAtomRepeater.default;
|
|
29120
|
+
}, function (_webAtomsCoreDistWebCoreAtomUI) {
|
|
29121
|
+
descendentElementIterator = _webAtomsCoreDistWebCoreAtomUI.descendentElementIterator;
|
|
29122
|
+
}, function (_servicesMimeServiceStreamTextWriter) {
|
|
29123
|
+
BlobWriter = _servicesMimeServiceStreamTextWriter.BlobWriter;
|
|
29124
|
+
}, function (_servicesFilesLocalFileService) {
|
|
29125
|
+
LocalFileService = _servicesFilesLocalFileService.default;
|
|
29126
|
+
}],
|
|
29127
|
+
execute: function () {
|
|
29128
|
+
_export("default", EditTemplatePage = class EditTemplatePage extends ContentPage {
|
|
29129
|
+
init() {
|
|
29130
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29131
|
+
this.model = yield this.loadModel(this.parameters.file);
|
|
29132
|
+
this.renderer = XNode.create("div", {
|
|
29133
|
+
"data-layout": "center-page-900px"
|
|
29134
|
+
}, XNode.create(Form, null, XNode.create(FormField, {
|
|
29135
|
+
label: "File Name:"
|
|
29136
|
+
}, XNode.create("input", {
|
|
29137
|
+
value: Bind.twoWaysImmediate(() => this.model.name)
|
|
29138
|
+
})), XNode.create(FormField, {
|
|
29139
|
+
label: "Subject:"
|
|
29140
|
+
}, XNode.create("input", {
|
|
29141
|
+
value: Bind.twoWaysImmediate(() => this.model.subject)
|
|
29142
|
+
})), XNode.create(InlineHtmlEditorWithToolbar, {
|
|
29143
|
+
inlineImage: true,
|
|
29144
|
+
presenter: Bind.presenter(c => this.editor = c),
|
|
29145
|
+
"event-content-ready": () => this.setupEditable(),
|
|
29146
|
+
content: this.model.htmlBody,
|
|
29147
|
+
"style-min-height": "200px"
|
|
29148
|
+
}), XNode.create(AtomRepeater, {
|
|
29149
|
+
items: this.model.attachments,
|
|
29150
|
+
"data-layout": "flex-wrap-padding",
|
|
29151
|
+
itemRenderer: item => XNode.create("div", null, XNode.create("i", {
|
|
29152
|
+
class: "fas fa-file"
|
|
29153
|
+
}), XNode.create("span", {
|
|
29154
|
+
text: item.name
|
|
29155
|
+
}))
|
|
29156
|
+
}), XNode.create("div", null, XNode.create(SaveIconTextButton, {
|
|
29157
|
+
"data-click-event": "save-template",
|
|
29158
|
+
text: "Save"
|
|
29159
|
+
}))));
|
|
29160
|
+
});
|
|
29161
|
+
}
|
|
29162
|
+
loadModel(file) {
|
|
29163
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29164
|
+
if (file.appFileID) {
|
|
29165
|
+
const data = yield fetch(file.url);
|
|
29166
|
+
const node = yield MimeMessage.load(data.body, file.name);
|
|
29167
|
+
const name = node.name;
|
|
29168
|
+
const htmlBody = node.html;
|
|
29169
|
+
const attachments = node.attachments;
|
|
29170
|
+
const subject = node.subject;
|
|
29171
|
+
return {
|
|
29172
|
+
node: node.node,
|
|
29173
|
+
mime: node,
|
|
29174
|
+
name,
|
|
29175
|
+
subject,
|
|
29176
|
+
htmlBody,
|
|
29177
|
+
attachments
|
|
29178
|
+
};
|
|
29179
|
+
}
|
|
29180
|
+
return {
|
|
29181
|
+
name: "Template 1",
|
|
29182
|
+
subject: "Template Subject",
|
|
29183
|
+
htmlBody: `<div contentEditable="true"><p><br/><br/><br/><br/><br/></p></div>`,
|
|
29184
|
+
attachments: []
|
|
29185
|
+
};
|
|
29186
|
+
});
|
|
29187
|
+
}
|
|
29188
|
+
saveTemplate() {
|
|
29189
|
+
var _a, _b;
|
|
29190
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29191
|
+
const {
|
|
29192
|
+
html,
|
|
29193
|
+
text
|
|
29194
|
+
} = this.editor.htmlTextContent;
|
|
29195
|
+
const root = MimeNode.createMessage({
|
|
29196
|
+
subject: this.model.subject,
|
|
29197
|
+
name: this.model.name,
|
|
29198
|
+
html,
|
|
29199
|
+
text,
|
|
29200
|
+
attachments: this.model.attachments
|
|
29201
|
+
});
|
|
29202
|
+
const blobWriter = new BlobWriter();
|
|
29203
|
+
yield root.save(blobWriter);
|
|
29204
|
+
const blob = blobWriter.toBlob();
|
|
29205
|
+
const localFileService = this.resolve(LocalFileService);
|
|
29206
|
+
const file = new File([blob], this.model.name, {
|
|
29207
|
+
type: "message/rfc822"
|
|
29208
|
+
});
|
|
29209
|
+
const appFileID = (_b = (_a = this.parameters.file) === null || _a === void 0 ? void 0 : _a.appFileID) !== null && _b !== void 0 ? _b : void 0;
|
|
29210
|
+
const parentID = appFileID ? void 0 : this.parameters.file.parentID;
|
|
29211
|
+
yield localFileService.uploadWithProgress([file], {
|
|
29212
|
+
appFileID,
|
|
29213
|
+
parentID
|
|
29214
|
+
});
|
|
29215
|
+
});
|
|
29216
|
+
}
|
|
29217
|
+
setupEditable() {
|
|
29218
|
+
const editor = this.editor.editor;
|
|
29219
|
+
if (editor.isContentEditable) {
|
|
29220
|
+
return;
|
|
29221
|
+
}
|
|
29222
|
+
for (const node of descendentElementIterator(editor)) {
|
|
29223
|
+
if (node.isContentEditable) {
|
|
29224
|
+
return;
|
|
29225
|
+
}
|
|
29226
|
+
}
|
|
29227
|
+
editor.contentEditable = "true";
|
|
29228
|
+
}
|
|
29229
|
+
});
|
|
29230
|
+
__decorate([Action({
|
|
29231
|
+
onEvent: "save-template"
|
|
29232
|
+
}), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise)], EditTemplatePage.prototype, "saveTemplate", null);
|
|
29233
|
+
}
|
|
29234
|
+
};
|
|
29235
|
+
});
|
|
29236
|
+
//# sourceMappingURL=EditTemplatePage.js.map
|
|
29237
|
+
|
|
29238
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/web/page/templates/EditTemplatePage");
|
|
29239
|
+
|
|
29240
|
+
System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "../../../model/model", "@web-atoms/core/dist/core/XNode", "@web-atoms/web-controls/dist/basic/UploadEvent", "@web-atoms/web-controls/dist/basic/AtomRepeater", "../../../common/controls/tree/TreeView", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dist/view-model/Action", "./service/CloudFileService", "@web-atoms/core/dist/core/InjectProperty", "@web-atoms/core/dist/style/styled", "../../../common/NumberFormats", "../../../common/controls/drag-drop/FilesDragDrop", "@web-atoms/web-controls/dist/basic/PopupButton", "@web-atoms/web-controls/dist/PageNavigator", "./shares/EditSharesPage", "../templates/EditTemplatePage"], function (_export, _context) {
|
|
29241
|
+
"use strict";
|
|
29242
|
+
|
|
29243
|
+
var __awaiter, __decorate, __metadata, ContentPage, AppFile, XNode, UploadEvent, AtomRepeater, TreeView, Bind, Action, CloudFileService, InjectProperty, styled, toFileSize, FilesDragDrop, PopupButton, MenuItem, PageNavigator, EditSharesPage, EditTemplatePage, FolderPage, css, getExtension;
|
|
29244
|
+
_export("default", void 0);
|
|
29245
|
+
return {
|
|
29246
|
+
setters: [function (_tslib) {
|
|
29247
|
+
__awaiter = _tslib.__awaiter;
|
|
29248
|
+
__decorate = _tslib.__decorate;
|
|
29249
|
+
__metadata = _tslib.__metadata;
|
|
29250
|
+
}, function (_webAtomsWebControlsDistMobileAppMobileApp) {
|
|
29251
|
+
ContentPage = _webAtomsWebControlsDistMobileAppMobileApp.ContentPage;
|
|
29252
|
+
}, function (_modelModel) {
|
|
29253
|
+
AppFile = _modelModel.AppFile;
|
|
29254
|
+
}, function (_webAtomsCoreDistCoreXNode) {
|
|
29255
|
+
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
29256
|
+
}, function (_webAtomsWebControlsDistBasicUploadEvent) {
|
|
29257
|
+
UploadEvent = _webAtomsWebControlsDistBasicUploadEvent.default;
|
|
29258
|
+
}, function (_webAtomsWebControlsDistBasicAtomRepeater) {
|
|
29259
|
+
AtomRepeater = _webAtomsWebControlsDistBasicAtomRepeater.default;
|
|
29260
|
+
}, function (_commonControlsTreeTreeView) {
|
|
29261
|
+
TreeView = _commonControlsTreeTreeView.default;
|
|
29262
|
+
}, function (_webAtomsCoreDistCoreBind) {
|
|
29263
|
+
Bind = _webAtomsCoreDistCoreBind.default;
|
|
29264
|
+
}, function (_webAtomsCoreDistViewModelAction) {
|
|
29265
|
+
Action = _webAtomsCoreDistViewModelAction.default;
|
|
29266
|
+
}, function (_serviceCloudFileService) {
|
|
29267
|
+
CloudFileService = _serviceCloudFileService.default;
|
|
29268
|
+
}, function (_webAtomsCoreDistCoreInjectProperty) {
|
|
29269
|
+
InjectProperty = _webAtomsCoreDistCoreInjectProperty.default;
|
|
29270
|
+
}, function (_webAtomsCoreDistStyleStyled) {
|
|
29271
|
+
styled = _webAtomsCoreDistStyleStyled.default;
|
|
29272
|
+
}, function (_commonNumberFormats) {
|
|
29273
|
+
toFileSize = _commonNumberFormats.toFileSize;
|
|
29274
|
+
}, function (_commonControlsDragDropFilesDragDrop) {
|
|
29275
|
+
FilesDragDrop = _commonControlsDragDropFilesDragDrop.FilesDragDrop;
|
|
29276
|
+
}, function (_webAtomsWebControlsDistBasicPopupButton) {
|
|
29277
|
+
PopupButton = _webAtomsWebControlsDistBasicPopupButton.default;
|
|
29278
|
+
MenuItem = _webAtomsWebControlsDistBasicPopupButton.MenuItem;
|
|
29279
|
+
}, function (_webAtomsWebControlsDistPageNavigator) {
|
|
29280
|
+
PageNavigator = _webAtomsWebControlsDistPageNavigator.default;
|
|
29281
|
+
}, function (_sharesEditSharesPage) {
|
|
29282
|
+
EditSharesPage = _sharesEditSharesPage.default;
|
|
29283
|
+
}, function (_templatesEditTemplatePage) {
|
|
29284
|
+
EditTemplatePage = _templatesEditTemplatePage.default;
|
|
29285
|
+
}],
|
|
29286
|
+
execute: function () {
|
|
29287
|
+
css = styled.css`
|
|
29288
|
+
display: grid;
|
|
29289
|
+
grid-template-columns: 200px 1fr;
|
|
29290
|
+
gap: 5px;
|
|
29291
|
+
& .folder-tree {
|
|
29292
|
+
grid-column: 1;
|
|
29293
|
+
grid-row: 1;
|
|
29294
|
+
}
|
|
29295
|
+
& .file-list {
|
|
29296
|
+
grid-row: 1;
|
|
29297
|
+
grid-column: 2;
|
|
29298
|
+
position: relative;
|
|
29299
|
+
overflow: auto;
|
|
29300
|
+
& > * {
|
|
29301
|
+
width: 100%;
|
|
29302
|
+
}
|
|
29303
|
+
|
|
29304
|
+
& .file-link {
|
|
29305
|
+
cursor: pointer;
|
|
29306
|
+
&:hover {
|
|
29307
|
+
text-decoration: underline;
|
|
29308
|
+
}
|
|
29309
|
+
}
|
|
29310
|
+
}
|
|
29311
|
+
`.installLocal();
|
|
29312
|
+
getExtension = name => {
|
|
29313
|
+
const index = name.lastIndexOf(".");
|
|
29314
|
+
if (index === -1) {
|
|
29315
|
+
return "dat";
|
|
29316
|
+
}
|
|
29317
|
+
return name.substring(index + 1);
|
|
29318
|
+
};
|
|
29319
|
+
_export("default", FolderPage = class FolderPage extends ContentPage {
|
|
29320
|
+
constructor() {
|
|
29321
|
+
super(...arguments);
|
|
29322
|
+
this.version = 1;
|
|
29323
|
+
}
|
|
29324
|
+
init() {
|
|
29325
|
+
var _a;
|
|
29326
|
+
var _b;
|
|
29327
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29328
|
+
this.search = "";
|
|
29329
|
+
this.root = yield this.cloudFileService.root(this.parameters);
|
|
29330
|
+
(_a = (_b = this.root).children) !== null && _a !== void 0 ? _a : _b.children = [];
|
|
29331
|
+
this.root.children.remove(x => !x.isFolder);
|
|
29332
|
+
this.selectedFolder = this.root;
|
|
29333
|
+
this.titleRenderer = () => XNode.create("div", {
|
|
29334
|
+
"data-layout": "row"
|
|
29335
|
+
}, XNode.create("div", {
|
|
29336
|
+
text: Bind.oneWay(() => this.selectedFolder.name)
|
|
29337
|
+
}), XNode.create(PopupButton, {
|
|
29338
|
+
icon: "fas fa-upload",
|
|
29339
|
+
label: "Upload",
|
|
29340
|
+
"data-layout": "accent-icon-button",
|
|
29341
|
+
alignment: "bottomLeft",
|
|
29342
|
+
popup: () => XNode.create("div", null, XNode.create(MenuItem, Object.assign({
|
|
29343
|
+
icon: "fas fa-upload",
|
|
29344
|
+
"data-extra": Bind.oneWay(() => JSON.stringify({
|
|
29345
|
+
parentID: this.selectedFolder.appFileID
|
|
29346
|
+
}))
|
|
29347
|
+
}, UploadEvent.AttachUploadAction({
|
|
29348
|
+
multiple: true,
|
|
29349
|
+
accept: "*/*"
|
|
29350
|
+
}), {
|
|
29351
|
+
label: "Files"
|
|
29352
|
+
})), XNode.create(MenuItem, Object.assign({
|
|
29353
|
+
icon: "fas fa-upload",
|
|
29354
|
+
"data-extra": Bind.oneWay(() => JSON.stringify({
|
|
29355
|
+
parentID: this.selectedFolder.appFileID
|
|
29356
|
+
}))
|
|
29357
|
+
}, UploadEvent.AttachUploadAction({
|
|
29358
|
+
multiple: true,
|
|
29359
|
+
folder: true,
|
|
29360
|
+
accept: "*/*"
|
|
29361
|
+
}), {
|
|
29362
|
+
label: "Folder"
|
|
29363
|
+
})))
|
|
29364
|
+
}), XNode.create("span", {
|
|
29365
|
+
text: "|"
|
|
29366
|
+
}), XNode.create("i", {
|
|
29367
|
+
"data-click-event": "new-folder",
|
|
29368
|
+
class: "fas fa-plus"
|
|
29369
|
+
}), XNode.create("span", {
|
|
29370
|
+
"data-click-event": "new-folder",
|
|
29371
|
+
text: "Folder"
|
|
29372
|
+
}), XNode.create("span", {
|
|
29373
|
+
text: "|"
|
|
29374
|
+
}), this.parameters.templates && XNode.create("div", {
|
|
29375
|
+
"data-layout": "row",
|
|
29376
|
+
"style-display": Bind.oneWay(() => this.selectedFolder.appFileID > 0)
|
|
29377
|
+
}, XNode.create("i", {
|
|
29378
|
+
class: "fas fa-plus",
|
|
29379
|
+
"data-click-event": "new-template"
|
|
29380
|
+
}), XNode.create("span", {
|
|
29381
|
+
"data-click-event": "new-template",
|
|
29382
|
+
text: "New Template"
|
|
29383
|
+
})));
|
|
29384
|
+
this.renderer = XNode.create("div", {
|
|
29385
|
+
class: css
|
|
29386
|
+
}, XNode.create(TreeView, {
|
|
29387
|
+
class: "folder-tree",
|
|
29388
|
+
presenter: Bind.presenter(c => this.folderTree = c),
|
|
29389
|
+
childrenProperty: item => {
|
|
29390
|
+
var _a;
|
|
29391
|
+
return (_a = item.children) !== null && _a !== void 0 ? _a : item.children = [];
|
|
29392
|
+
},
|
|
29393
|
+
root: this.root,
|
|
29394
|
+
selectedItem: Bind.twoWaysImmediate(() => this.selectedFolder)
|
|
29395
|
+
}), XNode.create("div", Object.assign({
|
|
29396
|
+
class: "file-list"
|
|
29397
|
+
}, FilesDragDrop({
|
|
29398
|
+
extra: Bind.oneWay(() => {
|
|
29399
|
+
var _a;
|
|
29400
|
+
return JSON.stringify({
|
|
29401
|
+
parentID: (_a = this.selectedFolder) === null || _a === void 0 ? void 0 : _a.appFileID
|
|
29402
|
+
});
|
|
29403
|
+
})
|
|
29404
|
+
})), XNode.create(AtomRepeater, {
|
|
29405
|
+
for: "table",
|
|
29406
|
+
items: Bind.oneWayAsync((c, e, cancelToken) => this.cloudFileService.files({
|
|
29407
|
+
search: this.search,
|
|
29408
|
+
folder: this.selectedFolder,
|
|
29409
|
+
version: this.version,
|
|
29410
|
+
cancelToken
|
|
29411
|
+
})),
|
|
29412
|
+
itemRenderer: file => this.renderFile(file)
|
|
29413
|
+
})));
|
|
29414
|
+
});
|
|
29415
|
+
}
|
|
29416
|
+
renderFile(item) {
|
|
29417
|
+
if (item.isFolder) {
|
|
29418
|
+
return XNode.create("tr", null, XNode.create("td", null, XNode.create("i", {
|
|
29419
|
+
class: item.isFolder ? "fiv-viv fiv-icon-folder" : `fiv-viv fiv-icon-${getExtension(item.name)}`
|
|
29420
|
+
}), XNode.create("span", {
|
|
29421
|
+
"data-click-event": "open-folder",
|
|
29422
|
+
class: "file-link",
|
|
29423
|
+
text: item.name,
|
|
29424
|
+
"data-padding-left": "auto"
|
|
29425
|
+
})), XNode.create("td", null, item.isShared && XNode.create("i", {
|
|
29426
|
+
title: "Shared",
|
|
29427
|
+
class: "fas fa-folder-user"
|
|
29428
|
+
})), XNode.create("td", {
|
|
29429
|
+
text: toFileSize(item.fileSize)
|
|
29430
|
+
}), XNode.create("td", null), XNode.create("td", null, XNode.create("i", {
|
|
29431
|
+
"data-click-event": "edit-shares",
|
|
29432
|
+
class: "fas fa-share"
|
|
29433
|
+
})));
|
|
29434
|
+
}
|
|
29435
|
+
if (this.parameters.templates && item.contentType === "message/rfc822") {
|
|
29436
|
+
return XNode.create("tr", null, XNode.create("td", null, XNode.create("i", {
|
|
29437
|
+
class: item.isFolder ? "fiv-viv fiv-icon-folder" : `fiv-viv fiv-icon-${getExtension(item.name)}`
|
|
29438
|
+
}), XNode.create("span", {
|
|
29439
|
+
"data-click-event": "open-template",
|
|
29440
|
+
class: "file-link",
|
|
29441
|
+
text: item.name,
|
|
29442
|
+
"data-margin-left": "default"
|
|
29443
|
+
})), XNode.create("td", null, item.isShared && XNode.create("i", {
|
|
29444
|
+
title: "Shared",
|
|
29445
|
+
class: "fas fa-folder-user"
|
|
29446
|
+
})), XNode.create("td", {
|
|
29447
|
+
text: toFileSize(item.fileSize)
|
|
29448
|
+
}), XNode.create("td", null, XNode.create("a", {
|
|
29449
|
+
href: item.downloadUrl,
|
|
29450
|
+
target: "_blank",
|
|
29451
|
+
download: true
|
|
29452
|
+
}, XNode.create("i", {
|
|
29453
|
+
class: "fas fa-download"
|
|
29454
|
+
}))), XNode.create("td", null, XNode.create("i", {
|
|
29455
|
+
"data-click-event": "edit-shares",
|
|
29456
|
+
class: "fas fa-share"
|
|
29457
|
+
})));
|
|
29458
|
+
}
|
|
29459
|
+
return XNode.create("tr", null, XNode.create("td", null, XNode.create("i", {
|
|
29460
|
+
class: item.isFolder ? "fiv-viv fiv-icon-folder" : `fiv-viv fiv-icon-${getExtension(item.name)}`
|
|
29461
|
+
}), XNode.create("a", {
|
|
29462
|
+
href: item.url,
|
|
29463
|
+
target: "_blank",
|
|
29464
|
+
text: item.name,
|
|
29465
|
+
"data-margin-left": "default"
|
|
29466
|
+
})), XNode.create("td", null, item.isShared && XNode.create("i", {
|
|
29467
|
+
title: "Shared",
|
|
29468
|
+
class: "fas fa-folder-user"
|
|
29469
|
+
})), XNode.create("td", {
|
|
29470
|
+
text: toFileSize(item.fileSize)
|
|
29471
|
+
}), XNode.create("td", null, XNode.create("a", {
|
|
29472
|
+
href: item.downloadUrl,
|
|
29473
|
+
target: "_blank",
|
|
29474
|
+
download: true
|
|
29475
|
+
}, XNode.create("i", {
|
|
29476
|
+
class: "fas fa-download"
|
|
29477
|
+
}))), XNode.create("td", null, XNode.create("i", {
|
|
29478
|
+
"data-click-event": "edit-shares",
|
|
29479
|
+
class: "fas fa-share"
|
|
29480
|
+
})));
|
|
29481
|
+
}
|
|
29482
|
+
editShares(file) {
|
|
29483
|
+
PageNavigator.pushPage(EditSharesPage, file);
|
|
29484
|
+
}
|
|
29485
|
+
openFolder(file) {
|
|
29486
|
+
this.selectedFolder = file;
|
|
29487
|
+
}
|
|
29488
|
+
newFolder() {
|
|
29489
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29490
|
+
const name = prompt("Enter name of the folder");
|
|
29491
|
+
if (!name) {
|
|
29492
|
+
return;
|
|
29493
|
+
}
|
|
29494
|
+
const parentID = this.selectedFolder.appFileID;
|
|
29495
|
+
const folder = yield this.cloudFileService.createFolder({
|
|
29496
|
+
name,
|
|
29497
|
+
parentID
|
|
29498
|
+
});
|
|
29499
|
+
this.selectedFolder.children.add(folder);
|
|
29500
|
+
});
|
|
29501
|
+
}
|
|
29502
|
+
onItemExpanded(item) {
|
|
29503
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29504
|
+
yield this.cloudFileService.expand(item);
|
|
29505
|
+
});
|
|
29506
|
+
}
|
|
29507
|
+
onFilesUploaded() {
|
|
29508
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29509
|
+
this.version++;
|
|
29510
|
+
});
|
|
29511
|
+
}
|
|
29512
|
+
newTemplate() {
|
|
29513
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29514
|
+
const parentID = this.selectedFolder.appFileID;
|
|
29515
|
+
const file = yield PageNavigator.pushPageForResult(EditTemplatePage, {
|
|
29516
|
+
file: AppFile.create({
|
|
29517
|
+
parentID
|
|
29518
|
+
})
|
|
29519
|
+
});
|
|
29520
|
+
this.selectedFolder.children.add(file);
|
|
29521
|
+
});
|
|
29522
|
+
}
|
|
29523
|
+
openTemplate(file) {
|
|
29524
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29525
|
+
yield PageNavigator.pushPageForResultOrCancel(EditTemplatePage, {
|
|
29526
|
+
file
|
|
29527
|
+
});
|
|
29528
|
+
});
|
|
28471
29529
|
}
|
|
28472
|
-
return pairs;
|
|
28473
29530
|
});
|
|
29531
|
+
__decorate([InjectProperty, __metadata("design:type", CloudFileService)], FolderPage.prototype, "cloudFileService", void 0);
|
|
29532
|
+
__decorate([Action({
|
|
29533
|
+
onEvent: "edit-shares"
|
|
29534
|
+
}), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", void 0)], FolderPage.prototype, "editShares", null);
|
|
29535
|
+
__decorate([Action({
|
|
29536
|
+
onEvent: "open-folder"
|
|
29537
|
+
}), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", void 0)], FolderPage.prototype, "openFolder", null);
|
|
29538
|
+
__decorate([Action({
|
|
29539
|
+
onEvent: "new-folder"
|
|
29540
|
+
}), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise)], FolderPage.prototype, "newFolder", null);
|
|
29541
|
+
__decorate([Action({
|
|
29542
|
+
onEvent: "item-expanded"
|
|
29543
|
+
}), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Promise)], FolderPage.prototype, "onItemExpanded", null);
|
|
29544
|
+
__decorate([Action({
|
|
29545
|
+
onEvent: "files-available"
|
|
29546
|
+
}), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise)], FolderPage.prototype, "onFilesUploaded", null);
|
|
29547
|
+
__decorate([Action({
|
|
29548
|
+
onEvent: "new-template"
|
|
29549
|
+
}), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise)], FolderPage.prototype, "newTemplate", null);
|
|
29550
|
+
__decorate([Action({
|
|
29551
|
+
onEvent: "open-template"
|
|
29552
|
+
}), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Promise)], FolderPage.prototype, "openTemplate", null);
|
|
28474
29553
|
}
|
|
28475
29554
|
};
|
|
28476
29555
|
});
|
|
28477
|
-
//# sourceMappingURL=
|
|
29556
|
+
//# sourceMappingURL=FolderPage.js.map
|
|
28478
29557
|
|
|
28479
|
-
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/
|
|
29558
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/web/page/files/FolderPage");
|
|
28480
29559
|
|
|
28481
|
-
System.register(["
|
|
29560
|
+
System.register(["@web-atoms/core/dist/style/styled"], function (_export, _context) {
|
|
28482
29561
|
"use strict";
|
|
28483
29562
|
|
|
28484
|
-
var
|
|
28485
|
-
_export("HeaderContentType", void 0);
|
|
29563
|
+
var styled;
|
|
28486
29564
|
return {
|
|
28487
|
-
setters: [function (
|
|
28488
|
-
|
|
29565
|
+
setters: [function (_webAtomsCoreDistStyleStyled) {
|
|
29566
|
+
styled = _webAtomsCoreDistStyleStyled.default;
|
|
28489
29567
|
}],
|
|
28490
29568
|
execute: function () {
|
|
28491
|
-
|
|
28492
|
-
|
|
28493
|
-
|
|
28494
|
-
|
|
28495
|
-
|
|
29569
|
+
styled.css`
|
|
29570
|
+
position: relative;
|
|
29571
|
+
overflow: hidden;
|
|
29572
|
+
cursor: grab;
|
|
29573
|
+
|
|
29574
|
+
&[data-state=grabbing] {
|
|
29575
|
+
cursor: grabbing;
|
|
28496
29576
|
}
|
|
28497
|
-
|
|
28498
|
-
|
|
28499
|
-
|
|
28500
|
-
|
|
28501
|
-
|
|
29577
|
+
|
|
29578
|
+
& > .scale {
|
|
29579
|
+
position: absolute;
|
|
29580
|
+
right: 10px;
|
|
29581
|
+
top: 10px;
|
|
29582
|
+
border: solid 2px darkgray;
|
|
29583
|
+
border-radius: 4px;
|
|
29584
|
+
background-color: white;
|
|
29585
|
+
padding: 4px;
|
|
29586
|
+
color: black;
|
|
28502
29587
|
}
|
|
28503
|
-
|
|
28504
|
-
|
|
28505
|
-
|
|
28506
|
-
|
|
28507
|
-
|
|
29588
|
+
|
|
29589
|
+
& > .image-container {
|
|
29590
|
+
position: absolute;
|
|
29591
|
+
left: 0;
|
|
29592
|
+
top: 0;
|
|
29593
|
+
right: 0;
|
|
29594
|
+
bottom: 0;
|
|
29595
|
+
overflow: hidden;
|
|
29596
|
+
display: grid;
|
|
29597
|
+
align-items: center;
|
|
29598
|
+
justify-items: center;
|
|
29599
|
+
justify-content: center;
|
|
28508
29600
|
}
|
|
28509
|
-
|
|
29601
|
+
|
|
29602
|
+
& > .spinner {
|
|
29603
|
+
position: absolute;
|
|
29604
|
+
left: 0;
|
|
29605
|
+
top: 0;
|
|
29606
|
+
right: 0;
|
|
29607
|
+
bottom: 0;
|
|
29608
|
+
display: inline-grid;
|
|
29609
|
+
align-items: center;
|
|
29610
|
+
justify-items: center;
|
|
29611
|
+
}
|
|
29612
|
+
|
|
29613
|
+
& > .hide {
|
|
29614
|
+
display: none;
|
|
29615
|
+
}
|
|
29616
|
+
`.installGlobal("div[data-pinch-zoom]");
|
|
28510
29617
|
}
|
|
28511
29618
|
};
|
|
28512
29619
|
});
|
|
28513
|
-
//# sourceMappingURL=
|
|
29620
|
+
//# sourceMappingURL=pinch-zoom-view-style.js.map
|
|
28514
29621
|
|
|
28515
|
-
AmdLoader.instance.setup("@
|
|
29622
|
+
AmdLoader.instance.setup("@web-atoms/web-controls/dist/basic/styles/pinch-zoom-view-style");
|
|
28516
29623
|
|
|
28517
|
-
System.register([], function (_export, _context) {
|
|
29624
|
+
System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dist/core/BindableProperty", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/web/controls/AtomControl", "./styles/pinch-zoom-view-style"], function (_export, _context) {
|
|
28518
29625
|
"use strict";
|
|
28519
29626
|
|
|
28520
|
-
var
|
|
29627
|
+
var __decorate, __metadata, Bind, BindableProperty, XNode, AtomControl, PinchZoomView, center, distance;
|
|
29628
|
+
_export("default", void 0);
|
|
28521
29629
|
return {
|
|
28522
|
-
setters: [
|
|
29630
|
+
setters: [function (_tslib) {
|
|
29631
|
+
__decorate = _tslib.__decorate;
|
|
29632
|
+
__metadata = _tslib.__metadata;
|
|
29633
|
+
}, function (_webAtomsCoreDistCoreBind) {
|
|
29634
|
+
Bind = _webAtomsCoreDistCoreBind.default;
|
|
29635
|
+
}, function (_webAtomsCoreDistCoreBindableProperty) {
|
|
29636
|
+
BindableProperty = _webAtomsCoreDistCoreBindableProperty.BindableProperty;
|
|
29637
|
+
}, function (_webAtomsCoreDistCoreXNode) {
|
|
29638
|
+
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
29639
|
+
}, function (_webAtomsCoreDistWebControlsAtomControl) {
|
|
29640
|
+
AtomControl = _webAtomsCoreDistWebControlsAtomControl.AtomControl;
|
|
29641
|
+
}, function (_stylesPinchZoomViewStyle) {}],
|
|
28523
29642
|
execute: function () {
|
|
28524
|
-
|
|
28525
|
-
const
|
|
28526
|
-
|
|
28527
|
-
|
|
29643
|
+
center = ev => {
|
|
29644
|
+
const touch = ev.touches[0];
|
|
29645
|
+
if (touch) {
|
|
29646
|
+
return {
|
|
29647
|
+
x: touch.clientX,
|
|
29648
|
+
y: touch.clientY
|
|
29649
|
+
};
|
|
28528
29650
|
}
|
|
28529
|
-
return
|
|
29651
|
+
return {
|
|
29652
|
+
x: 0,
|
|
29653
|
+
y: 0
|
|
29654
|
+
};
|
|
28530
29655
|
};
|
|
28531
|
-
|
|
28532
|
-
|
|
28533
|
-
|
|
28534
|
-
|
|
28535
|
-
|
|
28536
|
-
|
|
28537
|
-
|
|
28538
|
-
|
|
28539
|
-
|
|
28540
|
-
|
|
28541
|
-
|
|
28542
|
-
|
|
28543
|
-
|
|
28544
|
-
|
|
28545
|
-
|
|
28546
|
-
|
|
28547
|
-
|
|
28548
|
-
}
|
|
28549
|
-
|
|
28550
|
-
|
|
28551
|
-
|
|
28552
|
-
|
|
28553
|
-
|
|
28554
|
-
|
|
28555
|
-
|
|
28556
|
-
|
|
28557
|
-
|
|
28558
|
-
|
|
28559
|
-
|
|
28560
|
-
|
|
29656
|
+
distance = (first, second) => {
|
|
29657
|
+
return Math.hypot(first.pageX - second.pageX, first.pageY - second.pageY);
|
|
29658
|
+
};
|
|
29659
|
+
_export("default", PinchZoomView = class PinchZoomView extends AtomControl {
|
|
29660
|
+
preCreate() {
|
|
29661
|
+
this.element.title = "Use mouse wheel to zoom";
|
|
29662
|
+
this.loading = false;
|
|
29663
|
+
this.zoom = {
|
|
29664
|
+
scale: 0,
|
|
29665
|
+
anchorX: 0,
|
|
29666
|
+
anchorY: 0,
|
|
29667
|
+
x: 0,
|
|
29668
|
+
y: 0
|
|
29669
|
+
};
|
|
29670
|
+
this.element.dataset.pinchZoom = "true";
|
|
29671
|
+
this.render(XNode.create("div", null, XNode.create("div", {
|
|
29672
|
+
class: "image-container"
|
|
29673
|
+
}, XNode.create("img", {
|
|
29674
|
+
src: Bind.oneWay(() => this.getSource(this.source)),
|
|
29675
|
+
"event-load": () => {
|
|
29676
|
+
this.loading = false;
|
|
29677
|
+
this.updateZoom(this.zoom);
|
|
29678
|
+
}
|
|
29679
|
+
})), XNode.create("i", {
|
|
29680
|
+
class: Bind.oneWay(() => this.loading ? "spinner fa-duotone fa-spinner fa-spin" : "hide")
|
|
29681
|
+
}), XNode.create("i", {
|
|
29682
|
+
"event-click": () => this.updateZoom(),
|
|
29683
|
+
class: Bind.oneWay(() => this.zoom.scale ? "scale fa-solid fa-arrows-minimize" : "hide"),
|
|
29684
|
+
title: "Display entire image"
|
|
29685
|
+
})));
|
|
29686
|
+
this.imageContainer = this.element.firstElementChild;
|
|
29687
|
+
this.image = this.imageContainer.firstElementChild;
|
|
29688
|
+
const scrollView = this.element;
|
|
29689
|
+
let previous;
|
|
29690
|
+
let touchMoveDisposable;
|
|
29691
|
+
let touchEndDisposable;
|
|
29692
|
+
this.bindEvent(scrollView, "touchstart", evs => {
|
|
29693
|
+
previous = center(evs);
|
|
29694
|
+
let previousDistance = undefined;
|
|
29695
|
+
touchMoveDisposable !== null && touchMoveDisposable !== void 0 ? touchMoveDisposable : touchMoveDisposable = this.bindEvent(scrollView, "touchmove", ev => {
|
|
29696
|
+
var _a;
|
|
29697
|
+
ev.preventDefault();
|
|
29698
|
+
(_a = ev.stopImmediatePropagation) === null || _a === void 0 ? void 0 : _a.call(ev);
|
|
29699
|
+
let {
|
|
29700
|
+
x,
|
|
29701
|
+
y,
|
|
29702
|
+
anchorX,
|
|
29703
|
+
anchorY,
|
|
29704
|
+
scale
|
|
29705
|
+
} = this.zoom;
|
|
29706
|
+
if (ev.touches.length === 2) {
|
|
29707
|
+
const rect = this.element.getBoundingClientRect();
|
|
29708
|
+
const first = ev.touches[0];
|
|
29709
|
+
const second = ev.touches[1];
|
|
29710
|
+
anchorX = (first.clientX + second.clientX) / 2 - rect.left;
|
|
29711
|
+
anchorY = (first.clientY + second.clientY) / 2 - rect.top;
|
|
29712
|
+
const newScale = distance(first, second);
|
|
29713
|
+
if (previousDistance === void 0) {
|
|
29714
|
+
previousDistance = newScale;
|
|
29715
|
+
return;
|
|
29716
|
+
}
|
|
29717
|
+
if (previousDistance === newScale) {
|
|
29718
|
+
return;
|
|
29719
|
+
}
|
|
29720
|
+
scale += newScale - previousDistance;
|
|
29721
|
+
previousDistance = newScale;
|
|
29722
|
+
this.updateZoom({
|
|
29723
|
+
anchorX,
|
|
29724
|
+
anchorY,
|
|
29725
|
+
x,
|
|
29726
|
+
y,
|
|
29727
|
+
scale
|
|
29728
|
+
});
|
|
28561
29729
|
return;
|
|
28562
29730
|
}
|
|
28563
|
-
|
|
28564
|
-
|
|
29731
|
+
if (!previous) {
|
|
29732
|
+
return;
|
|
29733
|
+
}
|
|
29734
|
+
const cp = center(ev);
|
|
29735
|
+
x += cp.x - previous.x;
|
|
29736
|
+
y += cp.y - previous.y;
|
|
29737
|
+
previous = cp;
|
|
29738
|
+
this.updateZoom({
|
|
29739
|
+
anchorX,
|
|
29740
|
+
anchorY,
|
|
29741
|
+
x,
|
|
29742
|
+
y,
|
|
29743
|
+
scale
|
|
29744
|
+
});
|
|
29745
|
+
});
|
|
29746
|
+
touchEndDisposable !== null && touchEndDisposable !== void 0 ? touchEndDisposable : touchEndDisposable = this.bindEvent(scrollView, "touchend", ev => {
|
|
29747
|
+
touchMoveDisposable === null || touchMoveDisposable === void 0 ? void 0 : touchMoveDisposable.dispose();
|
|
29748
|
+
touchEndDisposable === null || touchEndDisposable === void 0 ? void 0 : touchEndDisposable.dispose();
|
|
29749
|
+
touchMoveDisposable = undefined;
|
|
29750
|
+
touchEndDisposable = undefined;
|
|
29751
|
+
previousDistance = undefined;
|
|
29752
|
+
});
|
|
29753
|
+
});
|
|
29754
|
+
let mouseMoveDisposable;
|
|
29755
|
+
let mouseUpDisposable;
|
|
29756
|
+
this.bindEvent(scrollView, "mousedown", ev => {
|
|
29757
|
+
this.element.dataset.state = "grabbing";
|
|
29758
|
+
previous = {
|
|
29759
|
+
x: ev.clientX,
|
|
29760
|
+
y: ev.clientY
|
|
28565
29761
|
};
|
|
28566
|
-
|
|
29762
|
+
mouseMoveDisposable !== null && mouseMoveDisposable !== void 0 ? mouseMoveDisposable : mouseMoveDisposable = this.bindEvent(scrollView, "mousemove", e => {
|
|
29763
|
+
var _a;
|
|
29764
|
+
e.preventDefault();
|
|
29765
|
+
(_a = e.stopImmediatePropagation) === null || _a === void 0 ? void 0 : _a.call(e);
|
|
29766
|
+
const {
|
|
29767
|
+
anchorX,
|
|
29768
|
+
anchorY,
|
|
29769
|
+
scale
|
|
29770
|
+
} = this.zoom;
|
|
29771
|
+
let {
|
|
29772
|
+
x,
|
|
29773
|
+
y
|
|
29774
|
+
} = this.zoom;
|
|
29775
|
+
const cp = {
|
|
29776
|
+
x: e.clientX,
|
|
29777
|
+
y: e.clientY
|
|
29778
|
+
};
|
|
29779
|
+
x += cp.x - previous.x;
|
|
29780
|
+
y += cp.y - previous.y;
|
|
29781
|
+
previous = cp;
|
|
29782
|
+
this.updateZoom({
|
|
29783
|
+
anchorX,
|
|
29784
|
+
anchorY,
|
|
29785
|
+
x,
|
|
29786
|
+
y,
|
|
29787
|
+
scale
|
|
29788
|
+
});
|
|
29789
|
+
});
|
|
29790
|
+
mouseUpDisposable !== null && mouseUpDisposable !== void 0 ? mouseUpDisposable : mouseUpDisposable = this.bindEvent(scrollView, "mouseup", e => {
|
|
29791
|
+
var _a;
|
|
29792
|
+
e.preventDefault();
|
|
29793
|
+
(_a = e.stopImmediatePropagation) === null || _a === void 0 ? void 0 : _a.call(e);
|
|
29794
|
+
this.element.dataset.state = "";
|
|
29795
|
+
previous = null;
|
|
29796
|
+
mouseMoveDisposable.dispose();
|
|
29797
|
+
mouseUpDisposable.dispose();
|
|
29798
|
+
mouseMoveDisposable = undefined;
|
|
29799
|
+
mouseUpDisposable = undefined;
|
|
29800
|
+
});
|
|
29801
|
+
});
|
|
29802
|
+
this.bindEvent(scrollView, "wheel", ev => {
|
|
29803
|
+
var _a;
|
|
29804
|
+
const target = ev.currentTarget;
|
|
29805
|
+
ev.preventDefault();
|
|
29806
|
+
(_a = ev.stopImmediatePropagation) === null || _a === void 0 ? void 0 : _a.call(ev);
|
|
29807
|
+
const newScale = this.zoom.scale - (ev.deltaY < 0 ? -50 : 50);
|
|
29808
|
+
const anchorX = ev.offsetX;
|
|
29809
|
+
const anchorY = ev.offsetY;
|
|
29810
|
+
const {
|
|
29811
|
+
x,
|
|
29812
|
+
y
|
|
29813
|
+
} = this.zoom;
|
|
29814
|
+
this.updateZoom({
|
|
29815
|
+
anchorX,
|
|
29816
|
+
anchorY,
|
|
29817
|
+
x,
|
|
29818
|
+
y,
|
|
29819
|
+
scale: newScale < 0 ? 0 : newScale
|
|
29820
|
+
});
|
|
29821
|
+
}, undefined, {
|
|
29822
|
+
passive: false
|
|
29823
|
+
});
|
|
29824
|
+
}
|
|
29825
|
+
getSource(text) {
|
|
29826
|
+
if (text) {
|
|
29827
|
+
this.loading = true;
|
|
29828
|
+
}
|
|
29829
|
+
return text;
|
|
29830
|
+
}
|
|
29831
|
+
updateZoom(zoom = {
|
|
29832
|
+
x: 0,
|
|
29833
|
+
y: 0,
|
|
29834
|
+
anchorX: 0,
|
|
29835
|
+
anchorY: 0,
|
|
29836
|
+
scale: 0
|
|
29837
|
+
}) {
|
|
29838
|
+
const {
|
|
29839
|
+
anchorX,
|
|
29840
|
+
anchorY,
|
|
29841
|
+
x,
|
|
29842
|
+
y
|
|
29843
|
+
} = zoom;
|
|
29844
|
+
let {
|
|
29845
|
+
scale
|
|
29846
|
+
} = zoom;
|
|
29847
|
+
this.zoom = zoom;
|
|
29848
|
+
const image = this.image;
|
|
29849
|
+
if (!image.naturalHeight) {
|
|
29850
|
+
return;
|
|
29851
|
+
}
|
|
29852
|
+
const maxHeight = this.element.clientWidth > this.element.clientHeight;
|
|
29853
|
+
const s = maxHeight ? this.element.clientWidth / image.naturalWidth : this.element.clientHeight / image.naturalHeight;
|
|
29854
|
+
if (scale <= 0) {
|
|
29855
|
+
scale = 0;
|
|
29856
|
+
}
|
|
29857
|
+
const newWidth = this.element.clientWidth + scale + "px";
|
|
29858
|
+
const newHeight = this.element.clientHeight + scale + "px";
|
|
29859
|
+
this.image.style.maxWidth = this.element.clientWidth + "px";
|
|
29860
|
+
this.image.style.maxHeight = this.element.clientHeight + "px";
|
|
29861
|
+
if (scale <= 0) {
|
|
29862
|
+
this.imageContainer.style.transform = "";
|
|
29863
|
+
return;
|
|
29864
|
+
}
|
|
29865
|
+
const clientWidth = this.element.clientWidth;
|
|
29866
|
+
const scaleFactor = (clientWidth + scale) / clientWidth;
|
|
29867
|
+
this.imageContainer.style.transformOrigin = `${anchorX}px ${anchorY}`;
|
|
29868
|
+
this.imageContainer.style.transform = `translate(${x}px, ${y}px) scale(${scaleFactor})`;
|
|
29869
|
+
}
|
|
29870
|
+
});
|
|
29871
|
+
__decorate([BindableProperty, __metadata("design:type", Object)], PinchZoomView.prototype, "zoom", void 0);
|
|
29872
|
+
__decorate([BindableProperty, __metadata("design:type", String)], PinchZoomView.prototype, "source", void 0);
|
|
29873
|
+
__decorate([BindableProperty, __metadata("design:type", Boolean)], PinchZoomView.prototype, "loading", void 0);
|
|
29874
|
+
}
|
|
29875
|
+
};
|
|
29876
|
+
});
|
|
29877
|
+
//# sourceMappingURL=PinchZoomView.js.map
|
|
29878
|
+
|
|
29879
|
+
AmdLoader.instance.setup("@web-atoms/web-controls/dist/basic/PinchZoomView");
|
|
29880
|
+
|
|
29881
|
+
System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "@web-atoms/core/dist/core/XNode", "@web-atoms/web-controls/dist/basic/PinchZoomView", "../../../../../common/controls/buttons/IconButton"], function (_export, _context) {
|
|
29882
|
+
"use strict";
|
|
29883
|
+
|
|
29884
|
+
var __awaiter, ContentPage, XNode, PinchZoomView, IconButton, PreviewImage;
|
|
29885
|
+
_export("default", void 0);
|
|
29886
|
+
return {
|
|
29887
|
+
setters: [function (_tslib) {
|
|
29888
|
+
__awaiter = _tslib.__awaiter;
|
|
29889
|
+
}, function (_webAtomsWebControlsDistMobileAppMobileApp) {
|
|
29890
|
+
ContentPage = _webAtomsWebControlsDistMobileAppMobileApp.ContentPage;
|
|
29891
|
+
}, function (_webAtomsCoreDistCoreXNode) {
|
|
29892
|
+
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
29893
|
+
}, function (_webAtomsWebControlsDistBasicPinchZoomView) {
|
|
29894
|
+
PinchZoomView = _webAtomsWebControlsDistBasicPinchZoomView.default;
|
|
29895
|
+
}, function (_commonControlsButtonsIconButton) {
|
|
29896
|
+
IconButton = _commonControlsButtonsIconButton.IconButton;
|
|
29897
|
+
}],
|
|
29898
|
+
execute: function () {
|
|
29899
|
+
_export("default", PreviewImage = class PreviewImage extends ContentPage {
|
|
29900
|
+
init() {
|
|
29901
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29902
|
+
const {
|
|
29903
|
+
appFileID,
|
|
29904
|
+
fileContentID,
|
|
29905
|
+
name
|
|
29906
|
+
} = this.parameters;
|
|
29907
|
+
const pdf = `/api/files/pdf/${appFileID}/${fileContentID}/${name}/${name}.pdf`;
|
|
29908
|
+
const download = `/api/files/download/${appFileID}/${fileContentID}/${name}`;
|
|
29909
|
+
this.title = name;
|
|
29910
|
+
this.headerRenderer = () => XNode.create("div", {
|
|
29911
|
+
"data-layout": "header-row"
|
|
29912
|
+
}, XNode.create("a", {
|
|
29913
|
+
href: pdf,
|
|
29914
|
+
target: "_blank"
|
|
29915
|
+
}, XNode.create(IconButton, {
|
|
29916
|
+
icon: "fas fa-print",
|
|
29917
|
+
text: "Print"
|
|
29918
|
+
})), XNode.create("a", {
|
|
29919
|
+
href: download,
|
|
29920
|
+
target: "_blank"
|
|
29921
|
+
}, XNode.create(IconButton, {
|
|
29922
|
+
icon: "fas fa-download",
|
|
29923
|
+
text: "Download"
|
|
29924
|
+
})));
|
|
29925
|
+
const webp = `/api/files/webp/${appFileID}/${fileContentID}/${name}/${name}.webp`;
|
|
29926
|
+
this.renderer = XNode.create("div", null, XNode.create(PinchZoomView, {
|
|
29927
|
+
source: webp
|
|
29928
|
+
}));
|
|
28567
29929
|
});
|
|
28568
29930
|
}
|
|
28569
29931
|
});
|
|
28570
29932
|
}
|
|
28571
29933
|
};
|
|
28572
29934
|
});
|
|
28573
|
-
//# sourceMappingURL=
|
|
29935
|
+
//# sourceMappingURL=PreviewImage.js.map
|
|
28574
29936
|
|
|
28575
|
-
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/
|
|
29937
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/web/page/files/preview/image/PreviewImage");
|
|
28576
29938
|
|
|
28577
|
-
System.register(["
|
|
29939
|
+
System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "@web-atoms/core/dist/services/FetchBuilder", "@web-atoms/core/dist/core/XNode", "../../../../../common/controls/buttons/IconButton", "@web-atoms/core/dist/web/controls/AtomControl"], function (_export, _context) {
|
|
28578
29940
|
"use strict";
|
|
28579
29941
|
|
|
28580
|
-
var
|
|
29942
|
+
var __awaiter, ContentPage, FetchBuilder, XNode, IconButton, AtomControl, PreviewDocument, renderHTML;
|
|
29943
|
+
_export("default", void 0);
|
|
28581
29944
|
return {
|
|
28582
|
-
setters: [function (
|
|
28583
|
-
|
|
29945
|
+
setters: [function (_tslib) {
|
|
29946
|
+
__awaiter = _tslib.__awaiter;
|
|
29947
|
+
}, function (_webAtomsWebControlsDistMobileAppMobileApp) {
|
|
29948
|
+
ContentPage = _webAtomsWebControlsDistMobileAppMobileApp.ContentPage;
|
|
29949
|
+
}, function (_webAtomsCoreDistServicesFetchBuilder) {
|
|
29950
|
+
FetchBuilder = _webAtomsCoreDistServicesFetchBuilder.default;
|
|
29951
|
+
}, function (_webAtomsCoreDistCoreXNode) {
|
|
29952
|
+
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
29953
|
+
}, function (_commonControlsButtonsIconButton) {
|
|
29954
|
+
IconButton = _commonControlsButtonsIconButton.IconButton;
|
|
29955
|
+
}, function (_webAtomsCoreDistWebControlsAtomControl) {
|
|
29956
|
+
AtomControl = _webAtomsCoreDistWebControlsAtomControl.AtomControl;
|
|
28584
29957
|
}],
|
|
28585
29958
|
execute: function () {
|
|
28586
|
-
|
|
28587
|
-
|
|
28588
|
-
|
|
28589
|
-
|
|
28590
|
-
|
|
28591
|
-
|
|
28592
|
-
|
|
28593
|
-
|
|
28594
|
-
|
|
28595
|
-
|
|
28596
|
-
return " ";
|
|
28597
|
-
}
|
|
28598
|
-
return String.fromCharCode(parseInt(code, 16));
|
|
28599
|
-
});
|
|
28600
|
-
return RawBuffer.decode(replaced, encoding);
|
|
28601
|
-
}
|
|
28602
|
-
return matched;
|
|
29959
|
+
renderHTML = AtomControl.registerProperty("data-html", "html", (c, e, value) => {
|
|
29960
|
+
if (!value) {
|
|
29961
|
+
e.innerHTML = "";
|
|
29962
|
+
return;
|
|
29963
|
+
}
|
|
29964
|
+
const html = value;
|
|
29965
|
+
const msg = document.createElement("div");
|
|
29966
|
+
msg.innerHTML = html;
|
|
29967
|
+
const shadow = e.attachShadow({
|
|
29968
|
+
mode: "open"
|
|
28603
29969
|
});
|
|
28604
|
-
|
|
28605
|
-
|
|
28606
|
-
|
|
28607
|
-
|
|
28608
|
-
|
|
28609
|
-
|
|
28610
|
-
|
|
28611
|
-
|
|
28612
|
-
|
|
28613
|
-
|
|
28614
|
-
|
|
28615
|
-
|
|
29970
|
+
shadow.appendChild(msg);
|
|
29971
|
+
return;
|
|
29972
|
+
});
|
|
29973
|
+
_export("default", PreviewDocument = class PreviewDocument extends ContentPage {
|
|
29974
|
+
init() {
|
|
29975
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29976
|
+
const {
|
|
29977
|
+
appFileID,
|
|
29978
|
+
fileContentID,
|
|
29979
|
+
name
|
|
29980
|
+
} = this.parameters;
|
|
29981
|
+
const pdf = `/api/files/pdf/${appFileID}/${fileContentID}/${name}/${name}.pdf`;
|
|
29982
|
+
const download = `/api/files/download/${appFileID}/${fileContentID}/${name}`;
|
|
29983
|
+
this.title = name;
|
|
29984
|
+
this.headerRenderer = () => XNode.create("div", {
|
|
29985
|
+
"data-layout": "header-row"
|
|
29986
|
+
}, XNode.create("a", {
|
|
29987
|
+
href: pdf,
|
|
29988
|
+
target: "_blank"
|
|
29989
|
+
}, XNode.create(IconButton, {
|
|
29990
|
+
icon: "fas fa-print",
|
|
29991
|
+
text: "Print"
|
|
29992
|
+
})), XNode.create("a", {
|
|
29993
|
+
href: download,
|
|
29994
|
+
target: "_blank"
|
|
29995
|
+
}, XNode.create(IconButton, {
|
|
29996
|
+
icon: "fas fa-download",
|
|
29997
|
+
text: "Download"
|
|
29998
|
+
})));
|
|
29999
|
+
this.renderer = XNode.create("div", null, XNode.create("div", {
|
|
30000
|
+
text: "..."
|
|
30001
|
+
}));
|
|
30002
|
+
const html = yield FetchBuilder.get(`/api/files/html/${appFileID}/${fileContentID}/${name}/${name}.html`).responseAsText();
|
|
30003
|
+
this.renderer = XNode.create("div", null, XNode.create("div", Object.assign({}, renderHTML(html))));
|
|
30004
|
+
});
|
|
28616
30005
|
}
|
|
28617
30006
|
});
|
|
28618
30007
|
}
|
|
28619
30008
|
};
|
|
28620
30009
|
});
|
|
28621
|
-
//# sourceMappingURL=
|
|
30010
|
+
//# sourceMappingURL=PreviewDocument.js.map
|
|
28622
30011
|
|
|
28623
|
-
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/
|
|
30012
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/web/page/files/preview/document/PreviewDocument");
|
|
28624
30013
|
|
|
28625
|
-
System.register(["
|
|
30014
|
+
System.register(["tslib", "@web-atoms/core/dist/core/AtomBinder", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dist/core/BindableProperty", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/web/controls/AtomControl", "@web-atoms/core/dist/web/core/AtomUI", "@web-atoms/core/dist/style/styled"], function (_export, _context) {
|
|
28626
30015
|
"use strict";
|
|
28627
30016
|
|
|
28628
|
-
var
|
|
28629
|
-
_export("
|
|
30017
|
+
var __awaiter, __decorate, __metadata, AtomBinder, Bind, BindableProperty, XNode, AtomControl, ChildEnumerator, styled, AtomVideoPlayer, isTouchEnabled, gatherElements, numberToText, durationText, noSoundIcon, mute, low, mid, high, getPlayIcon;
|
|
30018
|
+
_export("default", void 0);
|
|
28630
30019
|
return {
|
|
28631
|
-
setters: [function (
|
|
28632
|
-
|
|
28633
|
-
|
|
28634
|
-
|
|
30020
|
+
setters: [function (_tslib) {
|
|
30021
|
+
__awaiter = _tslib.__awaiter;
|
|
30022
|
+
__decorate = _tslib.__decorate;
|
|
30023
|
+
__metadata = _tslib.__metadata;
|
|
30024
|
+
}, function (_webAtomsCoreDistCoreAtomBinder) {
|
|
30025
|
+
AtomBinder = _webAtomsCoreDistCoreAtomBinder.AtomBinder;
|
|
30026
|
+
}, function (_webAtomsCoreDistCoreBind) {
|
|
30027
|
+
Bind = _webAtomsCoreDistCoreBind.default;
|
|
30028
|
+
}, function (_webAtomsCoreDistCoreBindableProperty) {
|
|
30029
|
+
BindableProperty = _webAtomsCoreDistCoreBindableProperty.BindableProperty;
|
|
30030
|
+
}, function (_webAtomsCoreDistCoreXNode) {
|
|
30031
|
+
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
30032
|
+
}, function (_webAtomsCoreDistWebControlsAtomControl) {
|
|
30033
|
+
AtomControl = _webAtomsCoreDistWebControlsAtomControl.AtomControl;
|
|
30034
|
+
}, function (_webAtomsCoreDistWebCoreAtomUI) {
|
|
30035
|
+
ChildEnumerator = _webAtomsCoreDistWebCoreAtomUI.ChildEnumerator;
|
|
30036
|
+
}, function (_webAtomsCoreDistStyleStyled) {
|
|
30037
|
+
styled = _webAtomsCoreDistStyleStyled.default;
|
|
28635
30038
|
}],
|
|
28636
30039
|
execute: function () {
|
|
28637
|
-
|
|
28638
|
-
|
|
28639
|
-
|
|
28640
|
-
|
|
28641
|
-
|
|
30040
|
+
isTouchEnabled = /android|iPhone|iPad/i.test(navigator.userAgent);
|
|
30041
|
+
styled.css`
|
|
30042
|
+
|
|
30043
|
+
display: grid;
|
|
30044
|
+
grid-template-rows: auto 1fr auto auto auto;
|
|
30045
|
+
grid-template-columns: auto 1fr auto;
|
|
30046
|
+
overflow: hidden;
|
|
30047
|
+
|
|
30048
|
+
& > [data-element=banner] {
|
|
30049
|
+
|
|
30050
|
+
grid-row-start: 3;
|
|
30051
|
+
grid-row-end: span 3;
|
|
30052
|
+
grid-column-start: 1;
|
|
30053
|
+
grid-column-end: span 3;
|
|
30054
|
+
|
|
30055
|
+
align-self: end;
|
|
30056
|
+
justify-self: center;
|
|
30057
|
+
height: 15%;
|
|
30058
|
+
|
|
30059
|
+
gap: 5px;
|
|
30060
|
+
|
|
30061
|
+
overflow: hidden;
|
|
30062
|
+
|
|
30063
|
+
grid-template-columns: auto 1fr;
|
|
30064
|
+
grid-template-rows: auto auto;
|
|
30065
|
+
|
|
30066
|
+
background-color: black;
|
|
30067
|
+
color: white;
|
|
30068
|
+
|
|
30069
|
+
border-radius: 10px;
|
|
30070
|
+
|
|
30071
|
+
padding: 10px;
|
|
30072
|
+
|
|
30073
|
+
align-items: center;
|
|
30074
|
+
justify-items: stretch;
|
|
30075
|
+
z-index: 2;
|
|
30076
|
+
|
|
30077
|
+
display: none;
|
|
30078
|
+
|
|
30079
|
+
&[data-has-logo=true] {
|
|
30080
|
+
display: grid;
|
|
30081
|
+
}
|
|
30082
|
+
|
|
30083
|
+
& > * {
|
|
30084
|
+
min-height: 0;
|
|
30085
|
+
min-width: 0;
|
|
30086
|
+
}
|
|
30087
|
+
|
|
30088
|
+
& > [data-element=logo] {
|
|
30089
|
+
grid-row: 1 / span 2;
|
|
30090
|
+
grid-column: 1;
|
|
30091
|
+
z-index: 2;
|
|
30092
|
+
height: 100%;
|
|
30093
|
+
}
|
|
30094
|
+
|
|
30095
|
+
& > [data-element=logo-title] {
|
|
30096
|
+
grid-row-start: 1;
|
|
30097
|
+
grid-column-start: 2;
|
|
30098
|
+
z-index: 2;
|
|
30099
|
+
font-weight: bold;
|
|
30100
|
+
overflow: hidden;
|
|
30101
|
+
white-space: nowrap;
|
|
30102
|
+
text-overflow: ellipsis;
|
|
30103
|
+
}
|
|
30104
|
+
|
|
30105
|
+
& > [data-element=logo-description] {
|
|
30106
|
+
grid-row-start: 2;
|
|
30107
|
+
grid-column-start: 2;
|
|
30108
|
+
z-index: 2;
|
|
30109
|
+
font-size: smaller;
|
|
30110
|
+
overflow: hidden;
|
|
30111
|
+
white-space: nowrap;
|
|
30112
|
+
text-overflow: ellipsis;
|
|
30113
|
+
}
|
|
30114
|
+
}
|
|
30115
|
+
|
|
30116
|
+
& > [data-element=video], & > [data-element=poster] {
|
|
30117
|
+
grid-row-start: 1;
|
|
30118
|
+
grid-row-end: span 5;
|
|
30119
|
+
grid-column-start: 1;
|
|
30120
|
+
grid-column-end: span 3;
|
|
30121
|
+
align-self: stretch;
|
|
30122
|
+
justify-self: stretch;
|
|
30123
|
+
}
|
|
30124
|
+
|
|
30125
|
+
& > [data-element=play-element] {
|
|
30126
|
+
z-index: 10;
|
|
30127
|
+
grid-row-start: 1;
|
|
30128
|
+
grid-row-end: span 5;
|
|
30129
|
+
grid-column-start: 1;
|
|
30130
|
+
grid-column-end: span 3;
|
|
30131
|
+
align-self: center;
|
|
30132
|
+
justify-self: center;
|
|
30133
|
+
flex-direction: row;
|
|
30134
|
+
align-items: center;
|
|
30135
|
+
justify-content: center;
|
|
30136
|
+
gap: 4px;
|
|
30137
|
+
display: flex;
|
|
30138
|
+
|
|
30139
|
+
& > button.play {
|
|
30140
|
+
display: inline-flex;
|
|
30141
|
+
align-items: center;
|
|
30142
|
+
justify-content: center;
|
|
30143
|
+
color: #ffffff;
|
|
30144
|
+
background-color: #0000ff;
|
|
30145
|
+
border-radius: 9999px;
|
|
30146
|
+
font-size: 25px;
|
|
30147
|
+
padding: 10px;
|
|
30148
|
+
width: 50px;
|
|
30149
|
+
height: 50px;
|
|
30150
|
+
text-align: center;
|
|
30151
|
+
vertical-align: middle;
|
|
30152
|
+
& > i {
|
|
30153
|
+
margin-left: 4px;
|
|
30154
|
+
}
|
|
30155
|
+
}
|
|
30156
|
+
}
|
|
30157
|
+
|
|
30158
|
+
& > [data-element=progress] {
|
|
30159
|
+
z-index: 11;
|
|
30160
|
+
grid-row-start: 4;
|
|
30161
|
+
grid-column-start: 1;
|
|
30162
|
+
grid-column-end: span 3;
|
|
30163
|
+
align-self: flex-end;
|
|
30164
|
+
height: 15px;
|
|
30165
|
+
padding-top: 5px;
|
|
30166
|
+
padding-bottom: 5px;
|
|
30167
|
+
justify-self: stretch;
|
|
30168
|
+
background-color: rgba(0,0,0,0.3);
|
|
30169
|
+
width: 100%;
|
|
30170
|
+
cursor: pointer;
|
|
30171
|
+
}
|
|
30172
|
+
|
|
30173
|
+
& > [data-element=toolbar] {
|
|
30174
|
+
z-index: 10;
|
|
30175
|
+
grid-row-start: 5;
|
|
30176
|
+
grid-column-start: 1;
|
|
30177
|
+
grid-column-end: span 3;
|
|
30178
|
+
background-color: rgba(0,0,0,0.3);
|
|
30179
|
+
color: #ffffff;
|
|
30180
|
+
flex-direction: row;
|
|
30181
|
+
align-items: center;
|
|
30182
|
+
justify-content: flex-start;
|
|
30183
|
+
gap: 4px;
|
|
30184
|
+
display: flex;
|
|
30185
|
+
|
|
30186
|
+
& > * {
|
|
30187
|
+
min-width: 20px;
|
|
30188
|
+
margin-left: 5px;
|
|
30189
|
+
padding: 5px;
|
|
30190
|
+
}
|
|
30191
|
+
|
|
30192
|
+
& > [data-style=button] {
|
|
30193
|
+
width: 30px;
|
|
30194
|
+
height: 30px;
|
|
30195
|
+
padding: 5px;
|
|
30196
|
+
}
|
|
30197
|
+
|
|
30198
|
+
& > [data-font-size=small] {
|
|
30199
|
+
font-size: x-small;
|
|
28642
30200
|
}
|
|
28643
|
-
|
|
28644
|
-
|
|
28645
|
-
|
|
28646
|
-
|
|
28647
|
-
|
|
30201
|
+
|
|
30202
|
+
& > [data-element=volume-range] {
|
|
30203
|
+
height: 2px;
|
|
30204
|
+
color: #008000;
|
|
30205
|
+
box-shadow: none;
|
|
30206
|
+
border: none;
|
|
28648
30207
|
}
|
|
28649
|
-
|
|
28650
|
-
|
|
30208
|
+
|
|
30209
|
+
& > [data-element=volume-range]:focus {
|
|
30210
|
+
box-shadow: none;
|
|
30211
|
+
border: none;
|
|
28651
30212
|
}
|
|
28652
|
-
|
|
30213
|
+
|
|
30214
|
+
& > [data-element=full-screen] {
|
|
30215
|
+
margin-left: auto;
|
|
30216
|
+
}
|
|
30217
|
+
|
|
28653
30218
|
}
|
|
28654
|
-
};
|
|
28655
|
-
});
|
|
28656
|
-
//# sourceMappingURL=HeaderContentDisposition.js.map
|
|
28657
|
-
|
|
28658
|
-
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/services/mime-service/HeaderContentDisposition");
|
|
28659
|
-
|
|
28660
|
-
System.register([], function (_export, _context) {
|
|
28661
|
-
"use strict";
|
|
28662
30219
|
|
|
28663
|
-
|
|
28664
|
-
|
|
28665
|
-
|
|
28666
|
-
|
|
28667
|
-
|
|
28668
|
-
|
|
28669
|
-
|
|
28670
|
-
|
|
28671
|
-
const begin = sliceIndex * sliceSize;
|
|
28672
|
-
const end = Math.min(begin + sliceSize, bytesLength);
|
|
28673
|
-
const bytes = new Array(end - begin);
|
|
28674
|
-
for (let offset = begin, i = 0; offset < end; ++i, ++offset) {
|
|
28675
|
-
bytes[i] = byteCharacters[offset].charCodeAt(0);
|
|
28676
|
-
}
|
|
28677
|
-
byteArrays[sliceIndex] = new Uint8Array(bytes);
|
|
30220
|
+
&[data-controls=true] {
|
|
30221
|
+
& > [data-element=toolbar] {
|
|
30222
|
+
display: flex;
|
|
30223
|
+
}
|
|
30224
|
+
|
|
30225
|
+
& > [data-element=progress] {
|
|
30226
|
+
display: flex;
|
|
30227
|
+
}
|
|
28678
30228
|
}
|
|
28679
|
-
return new Blob(byteArrays, {
|
|
28680
|
-
type: contentType
|
|
28681
|
-
});
|
|
28682
|
-
}
|
|
28683
|
-
_export("base64toBlob", base64toBlob);
|
|
28684
|
-
return {
|
|
28685
|
-
setters: [],
|
|
28686
|
-
execute: function () {}
|
|
28687
|
-
};
|
|
28688
|
-
});
|
|
28689
|
-
//# sourceMappingURL=base64-to-blob.js.map
|
|
28690
|
-
|
|
28691
|
-
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/services/mime-service/encoder/base64-to-blob");
|
|
28692
|
-
|
|
28693
|
-
System.register([], function (_export, _context) {
|
|
28694
|
-
"use strict";
|
|
28695
30229
|
|
|
28696
|
-
|
|
28697
|
-
|
|
28698
|
-
|
|
28699
|
-
|
|
28700
|
-
stringFromCharCode = String.fromCharCode;
|
|
28701
|
-
decode = function (input) {
|
|
28702
|
-
return input.replace(/[\t\x20]$/gm, '').replace(/=(?:\r\n?|\n|$)/g, '').replace(/=([a-fA-F0-9]{2})/g, function ($0, $1) {
|
|
28703
|
-
const codePoint = parseInt($1, 16);
|
|
28704
|
-
return stringFromCharCode(codePoint);
|
|
28705
|
-
});
|
|
28706
|
-
};
|
|
28707
|
-
handleTrailingCharacters = function (text) {
|
|
28708
|
-
return text.replace(/\x20$/, '=20').replace(/\t$/, '=09');
|
|
28709
|
-
};
|
|
28710
|
-
regexUnsafeSymbols = /[\0-\x08\n-\x1F=\x7F-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
|
28711
|
-
encode = function (text) {
|
|
28712
|
-
const encoded = text.replace(regexUnsafeSymbols, function (symbol) {
|
|
28713
|
-
if (symbol > '\xFF') {
|
|
28714
|
-
throw RangeError('`quotedPrintable.encode()` expects extended ASCII input only. ' + 'Don\u2019t forget to encode the input first using a character ' + 'encoding like UTF-8.');
|
|
28715
|
-
}
|
|
28716
|
-
const codePoint = symbol.charCodeAt(0);
|
|
28717
|
-
const hexadecimal = codePoint.toString(16).toUpperCase();
|
|
28718
|
-
return '=' + ('0' + hexadecimal).slice(-2);
|
|
28719
|
-
});
|
|
28720
|
-
const LINE_LENGTH = 75;
|
|
28721
|
-
const lines = encoded.split(/\r\n?|\n/g);
|
|
28722
|
-
let lineIndex = -1;
|
|
28723
|
-
const lineCount = lines.length;
|
|
28724
|
-
const result = [];
|
|
28725
|
-
let buffer;
|
|
28726
|
-
while (++lineIndex < lineCount) {
|
|
28727
|
-
const line = lines[lineIndex];
|
|
28728
|
-
let index = 0;
|
|
28729
|
-
const length = line.length;
|
|
28730
|
-
while (index < length) {
|
|
28731
|
-
buffer = encoded.slice(index, index + LINE_LENGTH);
|
|
28732
|
-
if (/=$/.test(buffer)) {
|
|
28733
|
-
buffer = buffer.slice(0, LINE_LENGTH - 1);
|
|
28734
|
-
index += LINE_LENGTH - 1;
|
|
28735
|
-
} else if (/=[A-F0-9]$/.test(buffer)) {
|
|
28736
|
-
buffer = buffer.slice(0, LINE_LENGTH - 2);
|
|
28737
|
-
index += LINE_LENGTH - 2;
|
|
28738
|
-
} else {
|
|
28739
|
-
index += LINE_LENGTH;
|
|
30230
|
+
&[data-state=playing] {
|
|
30231
|
+
&[data-controls=false] {
|
|
30232
|
+
& > [data-element=play-element], & > [data-element=progress], & > [data-element=toolbar] {
|
|
30233
|
+
display: none;
|
|
28740
30234
|
}
|
|
28741
|
-
result.push(buffer);
|
|
28742
|
-
}
|
|
28743
|
-
}
|
|
28744
|
-
const lastLineLength = buffer.length;
|
|
28745
|
-
if (/[\t\x20]$/.test(buffer)) {
|
|
28746
|
-
result.pop();
|
|
28747
|
-
if (lastLineLength + 2 <= LINE_LENGTH + 1) {
|
|
28748
|
-
result.push(handleTrailingCharacters(buffer));
|
|
28749
|
-
} else {
|
|
28750
|
-
result.push(buffer.slice(0, lastLineLength - 1), handleTrailingCharacters(buffer.slice(lastLineLength - 1, lastLineLength)));
|
|
28751
|
-
}
|
|
28752
30235
|
}
|
|
28753
|
-
return result.join('=\r\n');
|
|
28754
|
-
};
|
|
28755
|
-
_export("quotedPrintable", quotedPrintable = {
|
|
28756
|
-
encode,
|
|
28757
|
-
decode,
|
|
28758
|
-
'version': '1.0.1'
|
|
28759
|
-
});
|
|
28760
30236
|
}
|
|
28761
|
-
};
|
|
28762
|
-
});
|
|
28763
|
-
//# sourceMappingURL=quoted-printable.js.map
|
|
28764
30237
|
|
|
28765
|
-
|
|
30238
|
+
&[data-state=waiting] {
|
|
30239
|
+
&[data-controls=false] {
|
|
30240
|
+
& > [data-element=toolbar], & > [data-element=progress] {
|
|
30241
|
+
display: none;
|
|
30242
|
+
}
|
|
30243
|
+
}
|
|
28766
30244
|
|
|
28767
|
-
|
|
28768
|
-
|
|
30245
|
+
& > [data-element=toolbar] {
|
|
30246
|
+
& > [data-element=play] {
|
|
30247
|
+
display: none;
|
|
30248
|
+
}
|
|
30249
|
+
}
|
|
28769
30250
|
|
|
28770
|
-
|
|
28771
|
-
|
|
28772
|
-
|
|
28773
|
-
|
|
28774
|
-
|
|
28775
|
-
|
|
28776
|
-
|
|
28777
|
-
|
|
28778
|
-
|
|
28779
|
-
AttachmentFile = _AttachmentFile.AttachmentFile;
|
|
28780
|
-
}, function (_HeaderContentType) {
|
|
28781
|
-
HeaderContentType = _HeaderContentType.HeaderContentType;
|
|
28782
|
-
}, function (_HeaderContentDisposition) {
|
|
28783
|
-
HeaderContentDisposition = _HeaderContentDisposition.HeaderContentDisposition;
|
|
28784
|
-
}, function (_encoderRawBuffer) {
|
|
28785
|
-
RawBuffer = _encoderRawBuffer.RawBuffer;
|
|
28786
|
-
}, function (_encoderBase64ToBlob) {
|
|
28787
|
-
base64toBlob = _encoderBase64ToBlob.base64toBlob;
|
|
28788
|
-
}, function (_encoderQuotedPrintable) {
|
|
28789
|
-
quotedPrintable = _encoderQuotedPrintable.quotedPrintable;
|
|
28790
|
-
}, function (_encoderWordEncoding) {
|
|
28791
|
-
wordEncoding = _encoderWordEncoding.wordEncoding;
|
|
28792
|
-
}],
|
|
28793
|
-
execute: function () {
|
|
28794
|
-
;
|
|
28795
|
-
;
|
|
28796
|
-
_export("MimeNode", MimeNode = class MimeNode {
|
|
28797
|
-
static createMessage({
|
|
28798
|
-
html,
|
|
28799
|
-
subject,
|
|
28800
|
-
text = "",
|
|
28801
|
-
name = "",
|
|
28802
|
-
attachments = []
|
|
28803
|
-
}) {
|
|
28804
|
-
const root = new MimeNode("multipart/mixed");
|
|
28805
|
-
root.setHeader("Subject", subject);
|
|
28806
|
-
if (name) {
|
|
28807
|
-
root.setHeader("X-Name", name);
|
|
28808
|
-
}
|
|
28809
|
-
const body = new MimeNode("multipart/alternative");
|
|
28810
|
-
body.children = [];
|
|
28811
|
-
if (html) {
|
|
28812
|
-
body.children.push(this.create(html, "text/html"));
|
|
28813
|
-
}
|
|
28814
|
-
if (text) {
|
|
28815
|
-
body.children.push(this.create(text, "text/plain"));
|
|
28816
|
-
}
|
|
28817
|
-
root.children = [body];
|
|
28818
|
-
if (attachments) {
|
|
28819
|
-
for (const iterator of attachments) {
|
|
28820
|
-
root.children.push(this.create(iterator));
|
|
30251
|
+
& > [data-element=play-element] {
|
|
30252
|
+
display: none;
|
|
30253
|
+
}
|
|
30254
|
+
}
|
|
30255
|
+
|
|
30256
|
+
&[data-state=paused] {
|
|
30257
|
+
& > [data-element=toolbar] {
|
|
30258
|
+
& > [data-element-pause] {
|
|
30259
|
+
display: none;
|
|
28821
30260
|
}
|
|
28822
|
-
}
|
|
28823
|
-
return root;
|
|
28824
30261
|
}
|
|
28825
|
-
|
|
28826
|
-
|
|
28827
|
-
|
|
28828
|
-
|
|
28829
|
-
|
|
28830
|
-
|
|
28831
|
-
|
|
28832
|
-
|
|
28833
|
-
|
|
28834
|
-
|
|
28835
|
-
fileNode.setHeader("Content-Disposition", fileNode.contentDisposition);
|
|
28836
|
-
if (id) {
|
|
28837
|
-
fileNode.setHeader("Content-Id", id);
|
|
30262
|
+
}
|
|
30263
|
+
|
|
30264
|
+
`.installGlobal("[data-video-player=video-player]");
|
|
30265
|
+
gatherElements = (e, data = {}) => {
|
|
30266
|
+
var _a;
|
|
30267
|
+
const ce = ChildEnumerator.enumerate(e);
|
|
30268
|
+
for (const iterator of ce) {
|
|
30269
|
+
const elementName = (_a = iterator.dataset.element) === null || _a === void 0 ? void 0 : _a.replace(/-([a-z])/g, g => g[1].toUpperCase());
|
|
30270
|
+
if (elementName) {
|
|
30271
|
+
data[elementName] = iterator;
|
|
28838
30272
|
}
|
|
28839
|
-
|
|
30273
|
+
gatherElements(iterator, data);
|
|
28840
30274
|
}
|
|
28841
|
-
|
|
28842
|
-
|
|
28843
|
-
|
|
28844
|
-
|
|
28845
|
-
|
|
28846
|
-
if (!encoded) {
|
|
28847
|
-
return;
|
|
28848
|
-
}
|
|
28849
|
-
const cte = (_a = this.contentTransferEncoding) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
28850
|
-
switch (cte) {
|
|
28851
|
-
case "quoted-printable":
|
|
28852
|
-
encoded = quotedPrintable.decode(encoded);
|
|
28853
|
-
break;
|
|
28854
|
-
case "base64":
|
|
28855
|
-
encoded = btoa(encoded);
|
|
28856
|
-
break;
|
|
28857
|
-
}
|
|
28858
|
-
return (_b = this.textContent) !== null && _b !== void 0 ? _b : this.textContent = RawBuffer.decode(encoded, (_c = this.contentType) === null || _c === void 0 ? void 0 : _c.charset);
|
|
30275
|
+
return data;
|
|
30276
|
+
};
|
|
30277
|
+
numberToText = n => {
|
|
30278
|
+
if (n < 10) {
|
|
30279
|
+
return "0" + n;
|
|
28859
30280
|
}
|
|
28860
|
-
|
|
28861
|
-
|
|
28862
|
-
|
|
30281
|
+
return n.toString();
|
|
30282
|
+
};
|
|
30283
|
+
durationText = (n, total) => {
|
|
30284
|
+
if (n === null || n === undefined) {
|
|
30285
|
+
return "";
|
|
28863
30286
|
}
|
|
28864
|
-
|
|
28865
|
-
|
|
28866
|
-
|
|
28867
|
-
|
|
28868
|
-
|
|
28869
|
-
|
|
30287
|
+
const minutes = Math.floor(n / 60);
|
|
30288
|
+
const seconds = numberToText(Math.ceil(n % 60));
|
|
30289
|
+
const totalMinutes = Math.floor(total / 60);
|
|
30290
|
+
const totalSeconds = numberToText(Math.ceil(total % 60));
|
|
30291
|
+
return `${minutes}:${seconds} / ${totalMinutes}:${totalSeconds}`;
|
|
30292
|
+
};
|
|
30293
|
+
noSoundIcon = "fa-duotone fa-volume-slash";
|
|
30294
|
+
mute = "fa-duotone fa-volume-xmark";
|
|
30295
|
+
low = "fa-duotone fa-volume-low";
|
|
30296
|
+
mid = "fa-duotone fa-volume";
|
|
30297
|
+
high = "fa-duotone fa-volume-high";
|
|
30298
|
+
getPlayIcon = state => {
|
|
30299
|
+
switch (state) {
|
|
30300
|
+
case "ended":
|
|
30301
|
+
return "fa-solid fa-refresh";
|
|
30302
|
+
case "paused":
|
|
30303
|
+
return "fa-solid fa-play";
|
|
30304
|
+
case "playing":
|
|
30305
|
+
return "fa-solid fa-pause";
|
|
30306
|
+
}
|
|
30307
|
+
return "fa-solid fa-play";
|
|
30308
|
+
};
|
|
30309
|
+
_export("default", AtomVideoPlayer = class AtomVideoPlayer extends AtomControl {
|
|
30310
|
+
constructor() {
|
|
30311
|
+
super(...arguments);
|
|
30312
|
+
this.maxWidth = "";
|
|
28870
30313
|
}
|
|
28871
|
-
|
|
28872
|
-
this.
|
|
30314
|
+
get poster() {
|
|
30315
|
+
return this.video.poster;
|
|
28873
30316
|
}
|
|
28874
|
-
|
|
28875
|
-
|
|
30317
|
+
set poster(v) {
|
|
30318
|
+
this.video.poster = v;
|
|
28876
30319
|
}
|
|
28877
|
-
|
|
28878
|
-
this.
|
|
30320
|
+
get state() {
|
|
30321
|
+
return this.element.getAttribute("data-state");
|
|
28879
30322
|
}
|
|
28880
|
-
|
|
28881
|
-
|
|
30323
|
+
set state(v) {
|
|
30324
|
+
this.element.setAttribute("data-state", v);
|
|
30325
|
+
AtomBinder.refreshValue(this, "paused");
|
|
30326
|
+
AtomBinder.refreshValue(this, "state");
|
|
28882
30327
|
}
|
|
28883
|
-
get
|
|
28884
|
-
return this.
|
|
30328
|
+
get duration() {
|
|
30329
|
+
return this.video.duration;
|
|
28885
30330
|
}
|
|
28886
|
-
|
|
28887
|
-
this.
|
|
28888
|
-
this.contentType = new HeaderContentType(type);
|
|
28889
|
-
this.headers.set("Content-Type", this.contentType);
|
|
30331
|
+
get time() {
|
|
30332
|
+
return this.video.currentTime;
|
|
28890
30333
|
}
|
|
28891
|
-
|
|
30334
|
+
set time(v) {
|
|
30335
|
+
this.video.currentTime = v;
|
|
30336
|
+
}
|
|
30337
|
+
get paused() {
|
|
30338
|
+
return this.video.paused;
|
|
30339
|
+
}
|
|
30340
|
+
get isFullScreen() {
|
|
28892
30341
|
var _a;
|
|
28893
|
-
|
|
28894
|
-
let child = QueryIterator.first(this.descendents, x => x.contentType.type === contentType);
|
|
28895
|
-
if (!child && create) {
|
|
28896
|
-
child = new MimeNode(contentType);
|
|
28897
|
-
((_a = this.children) !== null && _a !== void 0 ? _a : this.children = []).push(child);
|
|
28898
|
-
}
|
|
28899
|
-
return child;
|
|
30342
|
+
return (_a = document.fullscreenEnabled && this.element === document.fullscreenElement) !== null && _a !== void 0 ? _a : false;
|
|
28900
30343
|
}
|
|
28901
|
-
|
|
28902
|
-
|
|
28903
|
-
|
|
28904
|
-
return value;
|
|
28905
|
-
}
|
|
30344
|
+
stopFullscreen() {
|
|
30345
|
+
if (this.isFullScreen) {
|
|
30346
|
+
return document.exitFullscreen();
|
|
28906
30347
|
}
|
|
30348
|
+
return Promise.resolve();
|
|
28907
30349
|
}
|
|
28908
|
-
|
|
28909
|
-
|
|
28910
|
-
|
|
28911
|
-
|
|
28912
|
-
|
|
28913
|
-
|
|
28914
|
-
|
|
28915
|
-
switch (name
|
|
28916
|
-
case "
|
|
28917
|
-
|
|
28918
|
-
break;
|
|
28919
|
-
case "content-transfer-encoding":
|
|
28920
|
-
name = "Content-Transfer-Encoding";
|
|
28921
|
-
break;
|
|
28922
|
-
case "content-disposition":
|
|
28923
|
-
name = "Content-Disposition";
|
|
30350
|
+
pause() {
|
|
30351
|
+
this.video.pause();
|
|
30352
|
+
}
|
|
30353
|
+
play() {
|
|
30354
|
+
this.video.play().catch(console.error);
|
|
30355
|
+
}
|
|
30356
|
+
onPropertyChanged(name) {
|
|
30357
|
+
switch (name) {
|
|
30358
|
+
case "source":
|
|
30359
|
+
this.updateSource();
|
|
28924
30360
|
break;
|
|
28925
30361
|
}
|
|
28926
|
-
this.headers.set(name, value);
|
|
28927
|
-
}
|
|
28928
|
-
asFile() {
|
|
28929
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
28930
|
-
const text = this.encoded.split("\n").map(x => x.trim()).join("");
|
|
28931
|
-
const url = `data:${this.contentType.type};base64,${text}`;
|
|
28932
|
-
const blob = yield fetch(url);
|
|
28933
|
-
const af = new AttachmentFile([yield blob.blob()], this.contentDisposition.filename, {
|
|
28934
|
-
type: this.contentType.type,
|
|
28935
|
-
contentId: this.header("Content-Id"),
|
|
28936
|
-
disposition: this.contentDisposition.type
|
|
28937
|
-
});
|
|
28938
|
-
af.node = this;
|
|
28939
|
-
return af;
|
|
28940
|
-
});
|
|
28941
30362
|
}
|
|
28942
|
-
|
|
28943
|
-
|
|
28944
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
28945
|
-
for (const iterator of this.children) {
|
|
28946
|
-
if (iterator.children) {
|
|
28947
|
-
yield iterator.attachments(files);
|
|
28948
|
-
continue;
|
|
28949
|
-
}
|
|
28950
|
-
if ((_a = iterator.contentDisposition) === null || _a === void 0 ? void 0 : _a.type) {
|
|
28951
|
-
files.push(yield iterator.asFile());
|
|
28952
|
-
}
|
|
28953
|
-
}
|
|
28954
|
-
return files;
|
|
28955
|
-
});
|
|
30363
|
+
setCurrentTime(n) {
|
|
30364
|
+
this.video.currentTime = n * this.video.duration;
|
|
28956
30365
|
}
|
|
28957
|
-
|
|
28958
|
-
|
|
28959
|
-
|
|
28960
|
-
|
|
28961
|
-
yield this.parseHeaders(lines);
|
|
28962
|
-
let boundary = this.contentType.boundary;
|
|
28963
|
-
if (!boundary) {
|
|
28964
|
-
const data = [];
|
|
28965
|
-
try {
|
|
28966
|
-
for (var _h = true, _j = __asyncValues(lines.read()), _k; _k = yield _j.next(), _a = _k.done, !_a;) {
|
|
28967
|
-
_c = _k.value;
|
|
28968
|
-
_h = false;
|
|
28969
|
-
try {
|
|
28970
|
-
const line = _c;
|
|
28971
|
-
const trimmed = line.trimEnd();
|
|
28972
|
-
if (trimmed.length === 0) {
|
|
28973
|
-
break;
|
|
28974
|
-
}
|
|
28975
|
-
if (trimmed === last) {
|
|
28976
|
-
break;
|
|
28977
|
-
}
|
|
28978
|
-
data.push(line);
|
|
28979
|
-
} finally {
|
|
28980
|
-
_h = true;
|
|
28981
|
-
}
|
|
28982
|
-
}
|
|
28983
|
-
} catch (e_1_1) {
|
|
28984
|
-
e_1 = {
|
|
28985
|
-
error: e_1_1
|
|
28986
|
-
};
|
|
28987
|
-
} finally {
|
|
28988
|
-
try {
|
|
28989
|
-
if (!_h && !_a && (_b = _j.return)) yield _b.call(_j);
|
|
28990
|
-
} finally {
|
|
28991
|
-
if (e_1) throw e_1.error;
|
|
28992
|
-
}
|
|
28993
|
-
}
|
|
28994
|
-
this.encoded = data.join("\n");
|
|
30366
|
+
create() {
|
|
30367
|
+
this.element.dataset.videoPlayer = "video-player";
|
|
30368
|
+
this.bindEvent(this.element, "togglePlay", e => {
|
|
30369
|
+
if (e.defaultPrevented) {
|
|
28995
30370
|
return;
|
|
28996
30371
|
}
|
|
28997
|
-
|
|
28998
|
-
|
|
28999
|
-
|
|
29000
|
-
|
|
29001
|
-
|
|
29002
|
-
|
|
29003
|
-
|
|
29004
|
-
|
|
29005
|
-
try {
|
|
29006
|
-
const line = _f;
|
|
29007
|
-
if (line === boundary) {
|
|
29008
|
-
boundaryFound = true;
|
|
29009
|
-
break;
|
|
29010
|
-
}
|
|
29011
|
-
if (line === end) {
|
|
29012
|
-
return;
|
|
29013
|
-
}
|
|
29014
|
-
} finally {
|
|
29015
|
-
_l = true;
|
|
29016
|
-
}
|
|
29017
|
-
}
|
|
29018
|
-
} catch (e_2_1) {
|
|
29019
|
-
e_2 = {
|
|
29020
|
-
error: e_2_1
|
|
29021
|
-
};
|
|
29022
|
-
} finally {
|
|
29023
|
-
try {
|
|
29024
|
-
if (!_l && !_d && (_e = _m.return)) yield _e.call(_m);
|
|
29025
|
-
} finally {
|
|
29026
|
-
if (e_2) throw e_2.error;
|
|
29027
|
-
}
|
|
29028
|
-
}
|
|
29029
|
-
if (!boundaryFound) {
|
|
29030
|
-
break;
|
|
29031
|
-
}
|
|
29032
|
-
const child = new MimeNode("");
|
|
29033
|
-
yield child.parse(lines, end);
|
|
29034
|
-
((_g = this.children) !== null && _g !== void 0 ? _g : this.children = []).push(child);
|
|
29035
|
-
}
|
|
29036
|
-
});
|
|
29037
|
-
}
|
|
29038
|
-
parseHeaders(lines) {
|
|
29039
|
-
var _a, e_3, _b, _c;
|
|
29040
|
-
var _d;
|
|
29041
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
29042
|
-
let headerName = "";
|
|
29043
|
-
let headerValue = "";
|
|
29044
|
-
try {
|
|
29045
|
-
for (var _e = true, _f = __asyncValues(lines.read()), _g; _g = yield _f.next(), _a = _g.done, !_a;) {
|
|
29046
|
-
_c = _g.value;
|
|
29047
|
-
_e = false;
|
|
29048
|
-
try {
|
|
29049
|
-
const iterator = _c;
|
|
29050
|
-
const value = iterator.trim();
|
|
29051
|
-
if (value.length === 0) {
|
|
29052
|
-
break;
|
|
29053
|
-
}
|
|
29054
|
-
if (/^[\x20\t]/.test(iterator)) {
|
|
29055
|
-
headerValue += wordEncoding.decode(value);
|
|
29056
|
-
continue;
|
|
29057
|
-
}
|
|
29058
|
-
if (headerValue) {
|
|
29059
|
-
this.setHeader(headerName, headerValue);
|
|
30372
|
+
e.preventDefault();
|
|
30373
|
+
if (isTouchEnabled) {
|
|
30374
|
+
if (this.state === "playing") {
|
|
30375
|
+
if (e.target === this.video) {
|
|
30376
|
+
if (this.element.dataset.controls === "true") {
|
|
30377
|
+
this.element.dataset.controls = "false";
|
|
30378
|
+
} else {
|
|
30379
|
+
this.element.dataset.controls = "true";
|
|
29060
30380
|
}
|
|
29061
|
-
|
|
29062
|
-
headerName = k;
|
|
29063
|
-
headerValue = wordEncoding.decode(v.trim());
|
|
29064
|
-
} finally {
|
|
29065
|
-
_e = true;
|
|
30381
|
+
return;
|
|
29066
30382
|
}
|
|
29067
30383
|
}
|
|
29068
|
-
|
|
29069
|
-
|
|
29070
|
-
error: e_3_1
|
|
29071
|
-
};
|
|
29072
|
-
} finally {
|
|
29073
|
-
try {
|
|
29074
|
-
if (!_e && !_a && (_b = _f.return)) yield _b.call(_f);
|
|
29075
|
-
} finally {
|
|
29076
|
-
if (e_3) throw e_3.error;
|
|
30384
|
+
if (e.target.tagName === "CANVAS") {
|
|
30385
|
+
return;
|
|
29077
30386
|
}
|
|
29078
30387
|
}
|
|
29079
|
-
if (
|
|
29080
|
-
this.
|
|
29081
|
-
|
|
29082
|
-
|
|
29083
|
-
|
|
29084
|
-
|
|
29085
|
-
const cd = this.header("Content-Disposition");
|
|
29086
|
-
if (cd) {
|
|
29087
|
-
(_d = this.contentDisposition) !== null && _d !== void 0 ? _d : this.contentDisposition = new HeaderContentDisposition();
|
|
29088
|
-
this.contentDisposition.parse(cd);
|
|
29089
|
-
this.setHeader("Content-Disposition", cd);
|
|
30388
|
+
if (this.video.paused) {
|
|
30389
|
+
this.video.play();
|
|
30390
|
+
this.element.dataset.controls = "false";
|
|
30391
|
+
} else {
|
|
30392
|
+
this.video.pause();
|
|
30393
|
+
this.element.dataset.controls = "true";
|
|
29090
30394
|
}
|
|
29091
30395
|
});
|
|
29092
|
-
|
|
29093
|
-
|
|
29094
|
-
|
|
29095
|
-
|
|
29096
|
-
|
|
29097
|
-
if (this.
|
|
29098
|
-
this.
|
|
29099
|
-
}
|
|
29100
|
-
if ((_a = this.children) === null || _a === void 0 ? void 0 : _a.length) {
|
|
29101
|
-
(_c = this.contentType).boundary || (_c.boundary = `${Date.now()}-${Date.now()}-${Date.now()}`);
|
|
29102
|
-
}
|
|
29103
|
-
for (const [key, element] of this.headers.entries()) {
|
|
29104
|
-
switch (key) {
|
|
29105
|
-
case "content-disposition":
|
|
29106
|
-
writer.writeLine(`Content-Disposition: ${this.contentDisposition}`);
|
|
29107
|
-
continue;
|
|
29108
|
-
case "content-type":
|
|
29109
|
-
writer.writeLine(`Content-Type:${this.contentType.toString()}`);
|
|
29110
|
-
continue;
|
|
29111
|
-
case "subject":
|
|
29112
|
-
writer.writeLine(`${key}: ${wordEncoding.encode(element, true)}`);
|
|
29113
|
-
continue;
|
|
29114
|
-
}
|
|
29115
|
-
writer.writeLine(`${key}: ${element}`);
|
|
29116
|
-
}
|
|
29117
|
-
writer.writeLine("");
|
|
29118
|
-
if ((_b = this.children) === null || _b === void 0 ? void 0 : _b.length) {
|
|
29119
|
-
const boundary = `--${this.contentType.boundary}`;
|
|
29120
|
-
for (const iterator of this.children) {
|
|
29121
|
-
writer.writeLine(boundary);
|
|
29122
|
-
yield iterator.save(writer);
|
|
29123
|
-
writer.writeLine("");
|
|
29124
|
-
}
|
|
29125
|
-
writer.writeLine(boundary + "--");
|
|
30396
|
+
this.bindEvent(this.element, "volume", e => {
|
|
30397
|
+
this.video.muted = !this.video.muted;
|
|
30398
|
+
this.updateVolume();
|
|
30399
|
+
});
|
|
30400
|
+
this.bindEvent(this.element, "fullScreen", e => __awaiter(this, void 0, void 0, function* () {
|
|
30401
|
+
if (!this.element.requestFullscreen) {
|
|
30402
|
+
this.video.webkitEnterFullscreen();
|
|
29126
30403
|
return;
|
|
29127
30404
|
}
|
|
29128
|
-
if (this.
|
|
29129
|
-
|
|
29130
|
-
let start = 0;
|
|
29131
|
-
const max = 80;
|
|
29132
|
-
for (;;) {
|
|
29133
|
-
if (start + max > base64.length) {
|
|
29134
|
-
writer.writeLine(base64.substring(start));
|
|
29135
|
-
break;
|
|
29136
|
-
}
|
|
29137
|
-
writer.writeLine(base64.substring(start, start + max));
|
|
29138
|
-
start += max;
|
|
29139
|
-
}
|
|
29140
|
-
writer.writeLine("");
|
|
30405
|
+
if (this.isFullScreen) {
|
|
30406
|
+
yield document.exitFullscreen();
|
|
29141
30407
|
return;
|
|
29142
30408
|
}
|
|
29143
|
-
|
|
29144
|
-
|
|
29145
|
-
|
|
30409
|
+
yield this.element.requestFullscreen({
|
|
30410
|
+
navigationUI: "show"
|
|
30411
|
+
});
|
|
30412
|
+
}));
|
|
30413
|
+
this.bindEvent(document, "fullscreenchange", () => {
|
|
30414
|
+
AtomBinder.refreshValue(this, "isFullScreen");
|
|
30415
|
+
});
|
|
30416
|
+
this.render(XNode.create("div", {
|
|
30417
|
+
"data-click-event": "toggle-play",
|
|
30418
|
+
"data-state": "pause"
|
|
30419
|
+
}, XNode.create("div", {
|
|
30420
|
+
"data-has-logo": Bind.oneWay(() => this.logo ? "true" : "false", "false"),
|
|
30421
|
+
"data-element": "banner",
|
|
30422
|
+
"style-width": Bind.oneWay(() => this.maxWidth)
|
|
30423
|
+
}, XNode.create("img", {
|
|
30424
|
+
"data-element": "logo",
|
|
30425
|
+
src: Bind.oneWay(() => this.logo)
|
|
30426
|
+
}), XNode.create("div", {
|
|
30427
|
+
"data-element": "logo-title",
|
|
30428
|
+
text: Bind.oneWay(() => this.logo && this.logoTitle)
|
|
30429
|
+
}), XNode.create("div", {
|
|
30430
|
+
"data-element": "logo-description",
|
|
30431
|
+
text: Bind.oneWay(() => this.logo && this.logoDescription)
|
|
30432
|
+
})), XNode.create("video", {
|
|
30433
|
+
"event-abort": () => this.state = "aborted",
|
|
30434
|
+
"event-durationchange": e => AtomBinder.refreshValue(this, "duration"),
|
|
30435
|
+
"event-ended": e => __awaiter(this, void 0, void 0, function* () {
|
|
30436
|
+
this.state = "ended";
|
|
30437
|
+
if (document.fullscreenEnabled && this.element === document.fullscreenElement) {
|
|
30438
|
+
yield document.exitFullscreen();
|
|
30439
|
+
}
|
|
30440
|
+
e.target.dispatchEvent(new CustomEvent("videoEnded", {
|
|
30441
|
+
bubbles: true
|
|
30442
|
+
}));
|
|
30443
|
+
}),
|
|
30444
|
+
"event-loadedmetadata": () => {
|
|
30445
|
+
this.updateVolume();
|
|
30446
|
+
this.currentTimeSpan.textContent = durationText(0, this.duration);
|
|
30447
|
+
this.updateProgress();
|
|
30448
|
+
const {
|
|
30449
|
+
video
|
|
30450
|
+
} = this;
|
|
30451
|
+
const {
|
|
30452
|
+
videoWidth,
|
|
30453
|
+
videoHeight
|
|
30454
|
+
} = video;
|
|
30455
|
+
const eW = video.offsetWidth * videoHeight / videoWidth;
|
|
30456
|
+
const maxWidth = 100 * (this.element.offsetWidth - eW) / this.element.offsetWidth;
|
|
30457
|
+
if (maxWidth > 50 && maxWidth < 100) {
|
|
30458
|
+
this.maxWidth = `${maxWidth}%`;
|
|
30459
|
+
}
|
|
30460
|
+
AtomBinder.refreshValue(this, "duration");
|
|
30461
|
+
},
|
|
30462
|
+
"event-pause": () => this.state = "paused",
|
|
30463
|
+
"event-play": () => this.state = "playing",
|
|
30464
|
+
"event-progress": () => this.updateProgress(),
|
|
30465
|
+
"event-timeupdate": () => {
|
|
30466
|
+
this.currentTimeSpan.textContent = durationText(this.time, this.duration);
|
|
30467
|
+
this.state = "playing";
|
|
30468
|
+
this.updateProgress();
|
|
30469
|
+
AtomBinder.refreshValue(this, "time");
|
|
30470
|
+
},
|
|
30471
|
+
"event-waiting": () => this.state = "waiting",
|
|
30472
|
+
"event-volumechange": () => this.updateVolume(),
|
|
30473
|
+
autoplay: false,
|
|
30474
|
+
playsInline: true,
|
|
30475
|
+
"style-max-width": "100%",
|
|
30476
|
+
"style-max-height": "100%",
|
|
30477
|
+
"data-element": "video"
|
|
30478
|
+
}), XNode.create("canvas", {
|
|
30479
|
+
"data-element": "progress"
|
|
30480
|
+
}), XNode.create("img", {
|
|
30481
|
+
"data-element": "poster"
|
|
30482
|
+
}), XNode.create("div", {
|
|
30483
|
+
"data-element": "toolbar"
|
|
30484
|
+
}, XNode.create("i", {
|
|
30485
|
+
"data-element": "play",
|
|
30486
|
+
"data-style": "button",
|
|
30487
|
+
class: Bind.oneWay(() => getPlayIcon(this.state))
|
|
30488
|
+
}), XNode.create("i", {
|
|
30489
|
+
"data-click-event": "volume",
|
|
30490
|
+
"data-style": "button",
|
|
30491
|
+
"data-element": "sound",
|
|
30492
|
+
class: "fa-duotone fa-volume-slash"
|
|
30493
|
+
}), !isTouchEnabled && XNode.create("input", {
|
|
30494
|
+
"data-click-event": "none",
|
|
30495
|
+
"data-element": "volume-range",
|
|
30496
|
+
type: "range",
|
|
30497
|
+
min: 0,
|
|
30498
|
+
max: 1,
|
|
30499
|
+
step: 0.1
|
|
30500
|
+
}), XNode.create("span", {
|
|
30501
|
+
"data-font-size": "small",
|
|
30502
|
+
"data-element": "current",
|
|
30503
|
+
text: "0:00"
|
|
30504
|
+
}), XNode.create("i", {
|
|
30505
|
+
"data-click-event": "full-screen",
|
|
30506
|
+
"data-style": "button",
|
|
30507
|
+
"data-element": "full-screen",
|
|
30508
|
+
class: Bind.oneWay(() => this.isFullScreen ? "fa-solid fa-compress" : "fa-solid fa-expand")
|
|
30509
|
+
})), XNode.create("div", {
|
|
30510
|
+
"data-click-event": "toggle-play",
|
|
30511
|
+
"data-element": "play-element"
|
|
30512
|
+
}, XNode.create("button", {
|
|
30513
|
+
class: "play"
|
|
30514
|
+
}, XNode.create("i", {
|
|
30515
|
+
class: Bind.oneWay(() => getPlayIcon(this.state))
|
|
30516
|
+
})))));
|
|
30517
|
+
const all = gatherElements(this.element);
|
|
30518
|
+
this.video = all.video;
|
|
30519
|
+
this.progress = all.progress;
|
|
30520
|
+
this.currentTimeSpan = all.current;
|
|
30521
|
+
this.soundIcon = all.sound;
|
|
30522
|
+
this.volumeRange = all.volumeRange;
|
|
30523
|
+
if (this.volumeRange) {
|
|
30524
|
+
this.bindEvent(this.volumeRange, "input", () => {
|
|
30525
|
+
setTimeout(() => {
|
|
30526
|
+
this.video.volume = parseFloat(this.volumeRange.value);
|
|
30527
|
+
}, 1);
|
|
30528
|
+
});
|
|
30529
|
+
}
|
|
30530
|
+
this.bindEvent(this.element, "mouseenter", () => {
|
|
30531
|
+
this.element.dataset.controls = "true";
|
|
30532
|
+
});
|
|
30533
|
+
this.bindEvent(this.element, "mouseleave", () => {
|
|
30534
|
+
this.element.dataset.controls = "false";
|
|
30535
|
+
});
|
|
30536
|
+
this.bindEvent(this.progress, "pointerdown", e => {
|
|
30537
|
+
e.preventDefault();
|
|
30538
|
+
this.setCurrentTime(e.offsetX / this.progress.clientWidth);
|
|
30539
|
+
const move = e1 => {
|
|
30540
|
+
e1.preventDefault();
|
|
30541
|
+
this.setCurrentTime(e1.offsetX / this.progress.clientWidth);
|
|
30542
|
+
};
|
|
30543
|
+
const up = e1 => {
|
|
30544
|
+
e1.preventDefault();
|
|
30545
|
+
this.progress.removeEventListener("pointermove", move);
|
|
30546
|
+
this.progress.removeEventListener("pointerup", up);
|
|
30547
|
+
};
|
|
30548
|
+
this.progress.addEventListener("pointermove", move);
|
|
30549
|
+
this.progress.addEventListener("pointerup", up);
|
|
30550
|
+
});
|
|
30551
|
+
}
|
|
30552
|
+
updateSource() {
|
|
30553
|
+
this.video.src = this.source;
|
|
30554
|
+
}
|
|
30555
|
+
updateProgress() {
|
|
30556
|
+
const context = this.progress.getContext("2d");
|
|
30557
|
+
context.strokeStyle = "rgba(0,0,0,0)";
|
|
30558
|
+
const width = this.progress.clientWidth;
|
|
30559
|
+
const height = this.progress.clientHeight;
|
|
30560
|
+
this.progress.width = width;
|
|
30561
|
+
this.progress.height = height;
|
|
30562
|
+
context.clearRect(0, 0, width, height);
|
|
30563
|
+
const max = this.video.duration;
|
|
30564
|
+
const seekable = this.video.buffered;
|
|
30565
|
+
const scale = width / max;
|
|
30566
|
+
context.fillStyle = "rgba(255,255,255,0.3)";
|
|
30567
|
+
context.fillRect(0, 0, width, height);
|
|
30568
|
+
context.fillStyle = "rgba(255,255,255,0.6)";
|
|
30569
|
+
for (let index = 0; index < seekable.length; index++) {
|
|
30570
|
+
const start = seekable.start(index) * scale;
|
|
30571
|
+
const end = seekable.end(index) * scale;
|
|
30572
|
+
context.fillRect(start, 0, end, height);
|
|
30573
|
+
}
|
|
30574
|
+
context.fillStyle = "#ffffff";
|
|
30575
|
+
context.fillRect(0, 0, this.video.currentTime * scale, height);
|
|
30576
|
+
}
|
|
30577
|
+
updateVolume() {
|
|
30578
|
+
if (this.video.muted) {
|
|
30579
|
+
this.soundIcon.className = mute;
|
|
30580
|
+
this.soundIcon.title = "Unmute";
|
|
30581
|
+
if (this.volumeRange) {
|
|
30582
|
+
this.volumeRange.style.display = "none";
|
|
29146
30583
|
}
|
|
29147
|
-
writer.writeLine(RawBuffer.encode(text));
|
|
29148
|
-
writer.writeLine("");
|
|
29149
30584
|
return;
|
|
29150
|
-
}
|
|
29151
|
-
|
|
29152
|
-
|
|
29153
|
-
|
|
29154
|
-
|
|
30585
|
+
}
|
|
30586
|
+
const audio = this.video.volume;
|
|
30587
|
+
if (this.volumeRange) {
|
|
30588
|
+
this.volumeRange.style.display = "";
|
|
30589
|
+
this.volumeRange.value = audio === null || audio === void 0 ? void 0 : audio.toString();
|
|
30590
|
+
}
|
|
30591
|
+
this.soundIcon.title = "Mute";
|
|
30592
|
+
if (audio > 0.8) {
|
|
30593
|
+
this.soundIcon.className = high;
|
|
29155
30594
|
return;
|
|
29156
30595
|
}
|
|
29157
|
-
|
|
29158
|
-
|
|
30596
|
+
if (audio < 0.2) {
|
|
30597
|
+
this.soundIcon.className = low;
|
|
30598
|
+
return;
|
|
29159
30599
|
}
|
|
30600
|
+
this.soundIcon.className = mid;
|
|
29160
30601
|
}
|
|
29161
30602
|
});
|
|
30603
|
+
__decorate([BindableProperty, __metadata("design:type", Object)], AtomVideoPlayer.prototype, "source", void 0);
|
|
30604
|
+
__decorate([BindableProperty, __metadata("design:type", Object)], AtomVideoPlayer.prototype, "logo", void 0);
|
|
30605
|
+
__decorate([BindableProperty, __metadata("design:type", String)], AtomVideoPlayer.prototype, "logoTitle", void 0);
|
|
30606
|
+
__decorate([BindableProperty, __metadata("design:type", String)], AtomVideoPlayer.prototype, "logoDescription", void 0);
|
|
29162
30607
|
}
|
|
29163
30608
|
};
|
|
29164
30609
|
});
|
|
29165
|
-
//# sourceMappingURL=
|
|
30610
|
+
//# sourceMappingURL=AtomVideoPlayer.js.map
|
|
29166
30611
|
|
|
29167
|
-
AmdLoader.instance.setup("@
|
|
30612
|
+
AmdLoader.instance.setup("@web-atoms/web-controls/dist/player/AtomVideoPlayer");
|
|
29168
30613
|
|
|
29169
|
-
System.register(["tslib", "
|
|
30614
|
+
System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "@web-atoms/core/dist/core/XNode", "@web-atoms/web-controls/dist/player/AtomVideoPlayer", "../../../../../common/controls/buttons/IconButton"], function (_export, _context) {
|
|
29170
30615
|
"use strict";
|
|
29171
30616
|
|
|
29172
|
-
var
|
|
29173
|
-
_export(
|
|
29174
|
-
default: void 0,
|
|
29175
|
-
StringLineStream: void 0,
|
|
29176
|
-
ReadableLineStream: void 0
|
|
29177
|
-
});
|
|
30617
|
+
var __awaiter, ContentPage, XNode, AtomVideoPlayer, IconButton, PreviewImage;
|
|
30618
|
+
_export("default", void 0);
|
|
29178
30619
|
return {
|
|
29179
30620
|
setters: [function (_tslib) {
|
|
29180
|
-
|
|
29181
|
-
|
|
29182
|
-
|
|
29183
|
-
|
|
30621
|
+
__awaiter = _tslib.__awaiter;
|
|
30622
|
+
}, function (_webAtomsWebControlsDistMobileAppMobileApp) {
|
|
30623
|
+
ContentPage = _webAtomsWebControlsDistMobileAppMobileApp.ContentPage;
|
|
30624
|
+
}, function (_webAtomsCoreDistCoreXNode) {
|
|
30625
|
+
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
30626
|
+
}, function (_webAtomsWebControlsDistPlayerAtomVideoPlayer) {
|
|
30627
|
+
AtomVideoPlayer = _webAtomsWebControlsDistPlayerAtomVideoPlayer.default;
|
|
30628
|
+
}, function (_commonControlsButtonsIconButton) {
|
|
30629
|
+
IconButton = _commonControlsButtonsIconButton.IconButton;
|
|
29184
30630
|
}],
|
|
29185
30631
|
execute: function () {
|
|
29186
|
-
_export("default",
|
|
29187
|
-
|
|
29188
|
-
|
|
29189
|
-
|
|
29190
|
-
|
|
29191
|
-
|
|
29192
|
-
|
|
29193
|
-
|
|
29194
|
-
|
|
29195
|
-
|
|
29196
|
-
|
|
29197
|
-
|
|
29198
|
-
|
|
29199
|
-
|
|
29200
|
-
|
|
29201
|
-
|
|
29202
|
-
|
|
29203
|
-
|
|
29204
|
-
|
|
29205
|
-
|
|
29206
|
-
|
|
29207
|
-
|
|
29208
|
-
|
|
29209
|
-
|
|
29210
|
-
|
|
29211
|
-
for (const iterator of tokenize(this.text, "\n")) {
|
|
29212
|
-
yield yield __await(iterator);
|
|
29213
|
-
}
|
|
29214
|
-
});
|
|
29215
|
-
}
|
|
29216
|
-
});
|
|
29217
|
-
_export("ReadableLineStream", ReadableLineStream = class ReadableLineStream extends LineStream {
|
|
29218
|
-
constructor(readable) {
|
|
29219
|
-
super();
|
|
29220
|
-
this.readable = readable;
|
|
29221
|
-
}
|
|
29222
|
-
lines() {
|
|
29223
|
-
return __asyncGenerator(this, arguments, function* lines_2() {
|
|
29224
|
-
const utf8Decoder = new TextDecoder("utf-8");
|
|
29225
|
-
const reader = this.readable.getReader();
|
|
29226
|
-
let {
|
|
29227
|
-
value: chunk,
|
|
29228
|
-
done: readerDone
|
|
29229
|
-
} = yield __await(reader.read());
|
|
29230
|
-
chunk = chunk ? utf8Decoder.decode(chunk, {
|
|
29231
|
-
stream: true
|
|
29232
|
-
}) : "";
|
|
29233
|
-
const re = /\r\n|\n|\r/gm;
|
|
29234
|
-
let startIndex = 0;
|
|
29235
|
-
for (;;) {
|
|
29236
|
-
const result = re.exec(chunk);
|
|
29237
|
-
if (!result) {
|
|
29238
|
-
if (readerDone) {
|
|
29239
|
-
break;
|
|
29240
|
-
}
|
|
29241
|
-
const remainder = chunk.substr(startIndex);
|
|
29242
|
-
({
|
|
29243
|
-
value: chunk,
|
|
29244
|
-
done: readerDone
|
|
29245
|
-
} = yield __await(reader.read()));
|
|
29246
|
-
chunk = remainder + (chunk ? utf8Decoder.decode(chunk, {
|
|
29247
|
-
stream: true
|
|
29248
|
-
}) : "");
|
|
29249
|
-
startIndex = re.lastIndex = 0;
|
|
29250
|
-
continue;
|
|
29251
|
-
}
|
|
29252
|
-
yield yield __await(chunk.substring(startIndex, result.index));
|
|
29253
|
-
startIndex = re.lastIndex;
|
|
29254
|
-
}
|
|
29255
|
-
if (startIndex < chunk.length) {
|
|
29256
|
-
yield yield __await(chunk.substr(startIndex));
|
|
29257
|
-
}
|
|
30632
|
+
_export("default", PreviewImage = class PreviewImage extends ContentPage {
|
|
30633
|
+
init() {
|
|
30634
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30635
|
+
const {
|
|
30636
|
+
appFileID,
|
|
30637
|
+
fileContentID,
|
|
30638
|
+
name
|
|
30639
|
+
} = this.parameters;
|
|
30640
|
+
const download = `/api/files/download/${appFileID}/${fileContentID}/${name}`;
|
|
30641
|
+
this.title = name;
|
|
30642
|
+
this.headerRenderer = () => XNode.create("div", {
|
|
30643
|
+
"data-layout": "header-row"
|
|
30644
|
+
}, XNode.create("a", {
|
|
30645
|
+
href: download,
|
|
30646
|
+
target: "_blank"
|
|
30647
|
+
}, XNode.create(IconButton, {
|
|
30648
|
+
icon: "fas fa-download",
|
|
30649
|
+
text: "Download"
|
|
30650
|
+
})));
|
|
30651
|
+
const webm = `/api/files/webm/${appFileID}/${fileContentID}/${name}/${name}.webm`;
|
|
30652
|
+
const webp = `/api/files/webp/${appFileID}/${fileContentID}/${name}/${name}.webp`;
|
|
30653
|
+
this.renderer = XNode.create("div", null, XNode.create(AtomVideoPlayer, {
|
|
30654
|
+
poster: webp,
|
|
30655
|
+
source: webm
|
|
30656
|
+
}));
|
|
29258
30657
|
});
|
|
29259
30658
|
}
|
|
29260
30659
|
});
|
|
29261
30660
|
}
|
|
29262
30661
|
};
|
|
29263
30662
|
});
|
|
29264
|
-
//# sourceMappingURL=
|
|
30663
|
+
//# sourceMappingURL=PreviewMedia.js.map
|
|
29265
30664
|
|
|
29266
|
-
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/
|
|
30665
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/web/page/files/preview/media/PreviewMedia");
|
|
29267
30666
|
|
|
29268
30667
|
System.register([], function (_export, _context) {
|
|
29269
30668
|
"use strict";
|
|
29270
30669
|
|
|
29271
|
-
var
|
|
29272
|
-
_export(
|
|
29273
|
-
default: void 0,
|
|
29274
|
-
BlobWriter: void 0
|
|
29275
|
-
});
|
|
30670
|
+
var FileTypes;
|
|
30671
|
+
_export("default", void 0);
|
|
29276
30672
|
return {
|
|
29277
30673
|
setters: [],
|
|
29278
30674
|
execute: function () {
|
|
29279
|
-
_export("default",
|
|
29280
|
-
|
|
29281
|
-
|
|
29282
|
-
|
|
29283
|
-
|
|
30675
|
+
_export("default", FileTypes = class FileTypes {
|
|
30676
|
+
static canPreview(file) {
|
|
30677
|
+
if (/(image|video|audio)\//.test(file.contentType)) {
|
|
30678
|
+
return true;
|
|
30679
|
+
}
|
|
30680
|
+
return /\.(pdf|docx|docm|pptx|pptm|xlsx|xlsm|doc|xls|pdf|ppt|dot|xlst|sxw|sxc|sxd|sxi|sxm|sxg|txt)$/i.test(file.name);
|
|
29284
30681
|
}
|
|
29285
|
-
|
|
29286
|
-
|
|
30682
|
+
static isMedia(file) {
|
|
30683
|
+
return /^(audio|video)\//i.test(file.contentType);
|
|
29287
30684
|
}
|
|
29288
|
-
|
|
29289
|
-
|
|
29290
|
-
return new Blob([all], {});
|
|
30685
|
+
static isImage(file) {
|
|
30686
|
+
return /^image\//i.test(file.contentType) || /\.(jpg|png|bmp|gif|tif|tiff|jiff|jpg)$/i.test(file.name);
|
|
29291
30687
|
}
|
|
29292
|
-
|
|
29293
|
-
return
|
|
30688
|
+
static isDocument(file) {
|
|
30689
|
+
return /\.(pdf|docx|docm|pptx|pptm|xlsx|xlsm|doc|xls|pdf|ppt|dot|xlst|sxw|sxc|sxd|sxi|sxm|sxg|txt|md)$/i.test(file.name);
|
|
29294
30690
|
}
|
|
29295
30691
|
});
|
|
29296
30692
|
}
|
|
29297
30693
|
};
|
|
29298
30694
|
});
|
|
29299
|
-
//# sourceMappingURL=
|
|
30695
|
+
//# sourceMappingURL=FileTypes.js.map
|
|
29300
30696
|
|
|
29301
|
-
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/services/
|
|
30697
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/services/FileTypes");
|
|
29302
30698
|
|
|
29303
|
-
System.register(["
|
|
30699
|
+
System.register(["@web-atoms/core/dist/core/Command", "../../common/commands/CommonCommands", "../../services/FileTypes"], function (_export, _context) {
|
|
29304
30700
|
"use strict";
|
|
29305
30701
|
|
|
29306
|
-
var
|
|
30702
|
+
var Command, CommonCommands, FileTypes, AppCommands;
|
|
29307
30703
|
_export("default", void 0);
|
|
29308
30704
|
return {
|
|
29309
|
-
setters: [function (
|
|
29310
|
-
|
|
29311
|
-
}, function (
|
|
29312
|
-
|
|
29313
|
-
}, function (
|
|
29314
|
-
|
|
29315
|
-
},
|
|
29316
|
-
|
|
29317
|
-
|
|
29318
|
-
|
|
29319
|
-
|
|
29320
|
-
|
|
29321
|
-
|
|
29322
|
-
|
|
29323
|
-
|
|
29324
|
-
|
|
29325
|
-
|
|
29326
|
-
|
|
29327
|
-
|
|
29328
|
-
const msg = new MimeMessage(node, attachments);
|
|
29329
|
-
if (inline) {
|
|
29330
|
-
yield msg.inlineImages();
|
|
29331
|
-
}
|
|
29332
|
-
return msg;
|
|
29333
|
-
});
|
|
29334
|
-
}
|
|
29335
|
-
get name() {
|
|
29336
|
-
return this.node.header("x-name");
|
|
29337
|
-
}
|
|
29338
|
-
get html() {
|
|
29339
|
-
var _a, _b;
|
|
29340
|
-
const alternative = this.node.getFirstChild("multipart/alternative");
|
|
29341
|
-
return (_b = (_a = alternative === null || alternative === void 0 ? void 0 : alternative.getFirstChild("text/html")) === null || _a === void 0 ? void 0 : _a.text) !== null && _b !== void 0 ? _b : "";
|
|
29342
|
-
}
|
|
29343
|
-
set html(v) {
|
|
29344
|
-
const alternative = this.node.getFirstChild("multipart/alternative", true);
|
|
29345
|
-
const htmlMime = alternative.getFirstChild("text/html", true);
|
|
29346
|
-
htmlMime.contentTransferEncoding = "quoted-printable";
|
|
29347
|
-
htmlMime.text = v;
|
|
29348
|
-
htmlMime.contentType.charset = "UTF-8";
|
|
29349
|
-
}
|
|
29350
|
-
get text() {
|
|
29351
|
-
var _a, _b;
|
|
29352
|
-
const alternative = this.node.getFirstChild("multipart/alternative");
|
|
29353
|
-
return (_b = (_a = alternative === null || alternative === void 0 ? void 0 : alternative.getFirstChild("text/plain")) === null || _a === void 0 ? void 0 : _a.text) !== null && _b !== void 0 ? _b : "";
|
|
29354
|
-
}
|
|
29355
|
-
set text(v) {
|
|
29356
|
-
const alternative = this.node.getFirstChild("multipart/alternative", true);
|
|
29357
|
-
const htmlMime = alternative.getFirstChild("text/plain", true);
|
|
29358
|
-
htmlMime.contentTransferEncoding = "quoted-printable";
|
|
29359
|
-
htmlMime.text = v;
|
|
29360
|
-
htmlMime.contentType.charset = "UTF-8";
|
|
29361
|
-
}
|
|
29362
|
-
get subject() {
|
|
29363
|
-
var _a;
|
|
29364
|
-
return (_a = this.node.header("subject")) !== null && _a !== void 0 ? _a : "";
|
|
29365
|
-
}
|
|
29366
|
-
set subject(v) {
|
|
29367
|
-
this.node.setHeader("subject", v);
|
|
29368
|
-
}
|
|
29369
|
-
constructor(node = new MimeNode("multipart/mixed"), attachments = []) {
|
|
29370
|
-
this.node = node;
|
|
29371
|
-
this.attachments = attachments;
|
|
29372
|
-
}
|
|
29373
|
-
save() {
|
|
29374
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
29375
|
-
const blobWriter = new BlobWriter();
|
|
29376
|
-
yield this.node.save(blobWriter);
|
|
29377
|
-
return blobWriter.toBlob();
|
|
29378
|
-
});
|
|
29379
|
-
}
|
|
29380
|
-
inlineImages() {
|
|
29381
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
29382
|
-
let text = this.html;
|
|
29383
|
-
if (!text) {
|
|
29384
|
-
return;
|
|
29385
|
-
}
|
|
29386
|
-
for (const iterator of this.attachments) {
|
|
29387
|
-
if (iterator.contentId) {
|
|
29388
|
-
const encoded = iterator.node.encoded;
|
|
29389
|
-
text = text.split(`cid:${iterator.contentId}`).join(`data://${iterator.type},${encoded}`);
|
|
29390
|
-
}
|
|
29391
|
-
}
|
|
29392
|
-
});
|
|
30705
|
+
setters: [function (_webAtomsCoreDistCoreCommand) {
|
|
30706
|
+
Command = _webAtomsCoreDistCoreCommand.default;
|
|
30707
|
+
}, function (_commonCommandsCommonCommands) {
|
|
30708
|
+
CommonCommands = _commonCommandsCommonCommands.default;
|
|
30709
|
+
}, function (_servicesFileTypes) {
|
|
30710
|
+
FileTypes = _servicesFileTypes.default;
|
|
30711
|
+
}],
|
|
30712
|
+
execute: function () {
|
|
30713
|
+
_export("default", AppCommands = class AppCommands extends CommonCommands {
|
|
30714
|
+
static getPreviewCommand(p) {
|
|
30715
|
+
if (FileTypes.isDocument(p)) {
|
|
30716
|
+
return this.previewHtml;
|
|
30717
|
+
}
|
|
30718
|
+
if (FileTypes.isImage(p)) {
|
|
30719
|
+
return this.previewImage;
|
|
30720
|
+
}
|
|
30721
|
+
if (FileTypes.isMedia(p)) {
|
|
30722
|
+
return this.previewMedia;
|
|
30723
|
+
}
|
|
29393
30724
|
}
|
|
29394
30725
|
});
|
|
30726
|
+
AppCommands.openHome = Command.create({
|
|
30727
|
+
route: "/",
|
|
30728
|
+
routeOrder: 200,
|
|
30729
|
+
openPage: () => _context.import("../page/home/HomePage")
|
|
30730
|
+
});
|
|
30731
|
+
AppCommands.openMailboxList = Command.create({
|
|
30732
|
+
route: "/mailboxes",
|
|
30733
|
+
routeOrder: 100,
|
|
30734
|
+
openPage: () => _context.import("../../common/pages/mailboxes/MailboxListPage")
|
|
30735
|
+
});
|
|
30736
|
+
AppCommands.openMails = Command.create({
|
|
30737
|
+
route: "/mails",
|
|
30738
|
+
routeOrder: 100,
|
|
30739
|
+
openPage: () => _context.import("../page/mails/MailboxContacts")
|
|
30740
|
+
});
|
|
30741
|
+
AppCommands.openFiles = Command.create({
|
|
30742
|
+
route: "/files/{id}",
|
|
30743
|
+
routeOrder: 100,
|
|
30744
|
+
openPage: () => _context.import("../page/files/FolderPage")
|
|
30745
|
+
});
|
|
30746
|
+
AppCommands.openTemplates = Command.create({
|
|
30747
|
+
route: "/templates",
|
|
30748
|
+
routeOrder: 100,
|
|
30749
|
+
routeDefaults: {
|
|
30750
|
+
templates: true
|
|
30751
|
+
},
|
|
30752
|
+
openPage: () => _context.import("../page/files/FolderPage")
|
|
30753
|
+
});
|
|
30754
|
+
AppCommands.previewImage = Command.create({
|
|
30755
|
+
route: "/social-mail/file-preview/image/{appFileID}/{fileContentID}/{name}",
|
|
30756
|
+
pushPage: () => _context.import("../page/files/preview/image/PreviewImage")
|
|
30757
|
+
});
|
|
30758
|
+
AppCommands.previewHtml = Command.create({
|
|
30759
|
+
route: "/social-mail/file-preview/html/{appFileID}/{fileContentID}/{name}",
|
|
30760
|
+
pushPage: () => _context.import("../page/files/preview/document/PreviewDocument")
|
|
30761
|
+
});
|
|
30762
|
+
AppCommands.previewMedia = Command.create({
|
|
30763
|
+
route: "/social-mail/file-preview/media/{appFileID}/{fileContentID}/{name}",
|
|
30764
|
+
pushPage: () => _context.import("../page/files/preview/media/PreviewMedia")
|
|
30765
|
+
});
|
|
29395
30766
|
}
|
|
29396
30767
|
};
|
|
29397
30768
|
});
|
|
29398
|
-
//# sourceMappingURL=
|
|
30769
|
+
//# sourceMappingURL=AppCommands.js.map
|
|
29399
30770
|
|
|
29400
|
-
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/
|
|
30771
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/web/commands/AppCommands");
|
|
29401
30772
|
|
|
29402
|
-
System.register(["
|
|
30773
|
+
System.register(["@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/style/styled", "../../NumberFormats", "../../../web/commands/AppCommands"], function (_export, _context) {
|
|
29403
30774
|
"use strict";
|
|
29404
30775
|
|
|
29405
|
-
var
|
|
29406
|
-
|
|
30776
|
+
var XNode, styled, toFileSize, AppCommands;
|
|
30777
|
+
function FilePreview(a) {
|
|
30778
|
+
const size = toFileSize(a.fileSize);
|
|
30779
|
+
const {
|
|
30780
|
+
appFileID,
|
|
30781
|
+
name,
|
|
30782
|
+
fileContentID
|
|
30783
|
+
} = a;
|
|
30784
|
+
const src = `/api/files/webp(300)/${appFileID}/${fileContentID}/${name}/${name}.300.webp`;
|
|
30785
|
+
const p = {
|
|
30786
|
+
appFileID,
|
|
30787
|
+
name,
|
|
30788
|
+
fileContentID
|
|
30789
|
+
};
|
|
30790
|
+
const command = AppCommands.getPreviewCommand(a);
|
|
30791
|
+
if (command) {
|
|
30792
|
+
return XNode.create("a", {
|
|
30793
|
+
href: command.displayRoute(p),
|
|
30794
|
+
"data-click-event": "route",
|
|
30795
|
+
"data-file-preview": "file-preview"
|
|
30796
|
+
}, XNode.create("img", {
|
|
30797
|
+
"data-element": "preview",
|
|
30798
|
+
src: src
|
|
30799
|
+
}), XNode.create("label", {
|
|
30800
|
+
"data-element": "file-name",
|
|
30801
|
+
text: a.name
|
|
30802
|
+
}), XNode.create("label", {
|
|
30803
|
+
"data-element": "file-size",
|
|
30804
|
+
text: size
|
|
30805
|
+
}));
|
|
30806
|
+
}
|
|
30807
|
+
return XNode.create("a", {
|
|
30808
|
+
href: a.downloadUrl,
|
|
30809
|
+
target: "_blank",
|
|
30810
|
+
"data-file-preview": "attachment"
|
|
30811
|
+
}, XNode.create("i", {
|
|
30812
|
+
class: "fas fa-paperclip"
|
|
30813
|
+
}), XNode.create("label", {
|
|
30814
|
+
"data-element": "file-name",
|
|
30815
|
+
text: a.name
|
|
30816
|
+
}), XNode.create("label", {
|
|
30817
|
+
"data-element": "file-size",
|
|
30818
|
+
text: size
|
|
30819
|
+
}));
|
|
30820
|
+
}
|
|
30821
|
+
_export("default", FilePreview);
|
|
29407
30822
|
return {
|
|
29408
|
-
setters: [function (
|
|
29409
|
-
__awaiter = _tslib.__awaiter;
|
|
29410
|
-
__decorate = _tslib.__decorate;
|
|
29411
|
-
__metadata = _tslib.__metadata;
|
|
29412
|
-
}, function (_webAtomsWebControlsDistMobileAppMobileApp) {
|
|
29413
|
-
ContentPage = _webAtomsWebControlsDistMobileAppMobileApp.ContentPage;
|
|
29414
|
-
}, function (_webAtomsCoreDistCoreXNode) {
|
|
30823
|
+
setters: [function (_webAtomsCoreDistCoreXNode) {
|
|
29415
30824
|
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
29416
|
-
}, function (
|
|
29417
|
-
|
|
29418
|
-
}, function (
|
|
29419
|
-
|
|
29420
|
-
}, function (
|
|
29421
|
-
|
|
29422
|
-
}, function (_webAtomsWebControlsDistBasicForm) {
|
|
29423
|
-
Form = _webAtomsWebControlsDistBasicForm.default;
|
|
29424
|
-
}, function (_webAtomsWebControlsDistBasicFormField) {
|
|
29425
|
-
FormField = _webAtomsWebControlsDistBasicFormField.default;
|
|
29426
|
-
}, function (_commonControlsButtonsIconButton) {
|
|
29427
|
-
SaveIconTextButton = _commonControlsButtonsIconButton.SaveIconTextButton;
|
|
29428
|
-
}, function (_webAtomsCoreDistViewModelAction) {
|
|
29429
|
-
Action = _webAtomsCoreDistViewModelAction.default;
|
|
29430
|
-
}, function (_servicesMimeServiceMimeMessage) {
|
|
29431
|
-
MimeMessage = _servicesMimeServiceMimeMessage.default;
|
|
29432
|
-
}, function (_webAtomsWebControlsDistBasicAtomRepeater) {
|
|
29433
|
-
AtomRepeater = _webAtomsWebControlsDistBasicAtomRepeater.default;
|
|
29434
|
-
}, function (_webAtomsCoreDistWebCoreAtomUI) {
|
|
29435
|
-
descendentElementIterator = _webAtomsCoreDistWebCoreAtomUI.descendentElementIterator;
|
|
29436
|
-
}, function (_servicesMimeServiceStreamTextWriter) {
|
|
29437
|
-
BlobWriter = _servicesMimeServiceStreamTextWriter.BlobWriter;
|
|
29438
|
-
}, function (_servicesFilesLocalFileService) {
|
|
29439
|
-
LocalFileService = _servicesFilesLocalFileService.default;
|
|
30825
|
+
}, function (_webAtomsCoreDistStyleStyled) {
|
|
30826
|
+
styled = _webAtomsCoreDistStyleStyled.default;
|
|
30827
|
+
}, function (_NumberFormats) {
|
|
30828
|
+
toFileSize = _NumberFormats.toFileSize;
|
|
30829
|
+
}, function (_webCommandsAppCommands) {
|
|
30830
|
+
AppCommands = _webCommandsAppCommands.default;
|
|
29440
30831
|
}],
|
|
29441
30832
|
execute: function () {
|
|
29442
|
-
|
|
29443
|
-
|
|
29444
|
-
|
|
29445
|
-
|
|
29446
|
-
|
|
29447
|
-
|
|
29448
|
-
|
|
29449
|
-
|
|
29450
|
-
|
|
29451
|
-
|
|
29452
|
-
|
|
29453
|
-
|
|
29454
|
-
}, XNode.create("input", {
|
|
29455
|
-
value: Bind.twoWaysImmediate(() => this.model.subject)
|
|
29456
|
-
})), XNode.create(InlineHtmlEditorWithToolbar, {
|
|
29457
|
-
inlineImage: true,
|
|
29458
|
-
presenter: Bind.presenter(c => this.editor = c),
|
|
29459
|
-
"event-content-ready": () => this.setupEditable(),
|
|
29460
|
-
content: this.model.htmlBody,
|
|
29461
|
-
"style-min-height": "200px"
|
|
29462
|
-
}), XNode.create(AtomRepeater, {
|
|
29463
|
-
items: this.model.attachments,
|
|
29464
|
-
"data-layout": "flex-wrap-padding",
|
|
29465
|
-
itemRenderer: item => XNode.create("div", null, XNode.create("i", {
|
|
29466
|
-
class: "fas fa-file"
|
|
29467
|
-
}), XNode.create("span", {
|
|
29468
|
-
text: item.name
|
|
29469
|
-
}))
|
|
29470
|
-
}), XNode.create("div", null, XNode.create(SaveIconTextButton, {
|
|
29471
|
-
"data-click-event": "save-template",
|
|
29472
|
-
text: "Save"
|
|
29473
|
-
}))));
|
|
29474
|
-
});
|
|
30833
|
+
styled.css`
|
|
30834
|
+
border: solid 2px lightgray;
|
|
30835
|
+
display: inline-grid;
|
|
30836
|
+
padding: 10px;
|
|
30837
|
+
margin: 5px;
|
|
30838
|
+
height: 150px;
|
|
30839
|
+
width: 150px;
|
|
30840
|
+
text-decoration: none;
|
|
30841
|
+
grid-template-columns: auto 1fr auto;
|
|
30842
|
+
grid-template-rows: 1fr auto;
|
|
30843
|
+
& a {
|
|
30844
|
+
text-decoration: none;
|
|
29475
30845
|
}
|
|
29476
|
-
|
|
29477
|
-
|
|
29478
|
-
|
|
29479
|
-
|
|
29480
|
-
|
|
29481
|
-
const name = node.name;
|
|
29482
|
-
const htmlBody = node.html;
|
|
29483
|
-
const attachments = node.attachments;
|
|
29484
|
-
const subject = node.subject;
|
|
29485
|
-
return {
|
|
29486
|
-
node: node.node,
|
|
29487
|
-
mime: node,
|
|
29488
|
-
name,
|
|
29489
|
-
subject,
|
|
29490
|
-
htmlBody,
|
|
29491
|
-
attachments
|
|
29492
|
-
};
|
|
29493
|
-
}
|
|
29494
|
-
return {
|
|
29495
|
-
name: "Template 1",
|
|
29496
|
-
subject: "Template Subject",
|
|
29497
|
-
htmlBody: `<div contentEditable="true"><p><br/><br/><br/><br/><br/></p></div>`,
|
|
29498
|
-
attachments: []
|
|
29499
|
-
};
|
|
29500
|
-
});
|
|
30846
|
+
& > [data-element=preview] {
|
|
30847
|
+
grid-column: 1 / span 3;
|
|
30848
|
+
grid-row: 1;
|
|
30849
|
+
max-width: 130px;
|
|
30850
|
+
max-height: 100px;
|
|
29501
30851
|
}
|
|
29502
|
-
|
|
29503
|
-
|
|
29504
|
-
|
|
29505
|
-
const {
|
|
29506
|
-
html,
|
|
29507
|
-
text
|
|
29508
|
-
} = this.editor.htmlTextContent;
|
|
29509
|
-
const root = MimeNode.createMessage({
|
|
29510
|
-
subject: this.model.subject,
|
|
29511
|
-
name: this.model.name,
|
|
29512
|
-
html,
|
|
29513
|
-
text,
|
|
29514
|
-
attachments: this.model.attachments
|
|
29515
|
-
});
|
|
29516
|
-
const blobWriter = new BlobWriter();
|
|
29517
|
-
yield root.save(blobWriter);
|
|
29518
|
-
const blob = blobWriter.toBlob();
|
|
29519
|
-
const localFileService = this.resolve(LocalFileService);
|
|
29520
|
-
const file = new File([blob], this.model.name, {
|
|
29521
|
-
type: "message/rfc822"
|
|
29522
|
-
});
|
|
29523
|
-
const appFileID = (_b = (_a = this.parameters.file) === null || _a === void 0 ? void 0 : _a.appFileID) !== null && _b !== void 0 ? _b : void 0;
|
|
29524
|
-
const parentID = appFileID ? void 0 : this.parameters.file.parentID;
|
|
29525
|
-
yield localFileService.uploadWithProgress([file], {
|
|
29526
|
-
appFileID,
|
|
29527
|
-
parentID
|
|
29528
|
-
});
|
|
29529
|
-
});
|
|
30852
|
+
& > [data-element=icon] {
|
|
30853
|
+
grid-column: 1;
|
|
30854
|
+
grid-row: 2;
|
|
29530
30855
|
}
|
|
29531
|
-
|
|
29532
|
-
|
|
29533
|
-
|
|
29534
|
-
|
|
29535
|
-
|
|
29536
|
-
|
|
29537
|
-
if (node.isContentEditable) {
|
|
29538
|
-
return;
|
|
29539
|
-
}
|
|
29540
|
-
}
|
|
29541
|
-
editor.contentEditable = "true";
|
|
30856
|
+
& > [data-element=file-name] {
|
|
30857
|
+
grid-column: 2;
|
|
30858
|
+
grid-row: 2;
|
|
30859
|
+
text-overflow: ellipsis;
|
|
30860
|
+
overflow: hidden;
|
|
30861
|
+
margin-right: 5px;
|
|
29542
30862
|
}
|
|
29543
|
-
|
|
29544
|
-
|
|
29545
|
-
|
|
29546
|
-
|
|
30863
|
+
& > [data-element=file-size] {
|
|
30864
|
+
grid-column: 3;
|
|
30865
|
+
grid-row: 2;
|
|
30866
|
+
}
|
|
30867
|
+
`.installGlobal("[data-file-preview=file-preview]");
|
|
30868
|
+
styled.css`
|
|
30869
|
+
border: solid 1px lightgray;
|
|
30870
|
+
display: inline-flex;
|
|
30871
|
+
padding: 10px;
|
|
30872
|
+
margin: 5px;
|
|
30873
|
+
`.installGlobal("[data-file-preview=attachment]");
|
|
29547
30874
|
}
|
|
29548
30875
|
};
|
|
29549
30876
|
});
|
|
29550
|
-
//# sourceMappingURL=
|
|
30877
|
+
//# sourceMappingURL=FilePreview.js.map
|
|
29551
30878
|
|
|
29552
|
-
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/
|
|
30879
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/common/controls/file-preview/FilePreview");
|
|
29553
30880
|
|
|
29554
|
-
System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "../../../model/model", "@web-atoms/core/dist/core/XNode", "@web-atoms/web-controls/dist/basic/
|
|
30881
|
+
System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "../../../model/model", "@web-atoms/core/dist/core/XNode", "@web-atoms/web-controls/dist/basic/AtomRepeater", "../../../common/controls/repeater/InfiniteRepeater", "./service/ConversationService", "@web-atoms/core/dist/core/InjectProperty", "@web-atoms/web-controls/dist/basic/InlinePopupControl", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dist/style/styled", "@web-atoms/core/dist/view-model/Action", "@web-atoms/web-controls/dist/PageNavigator", "./ComposeMailPage", "../../../services/socket/sockets", "@web-atoms/web-controls/dist/basic/LimitedText", "../../../common/date/DateFormats", "@web-atoms/web-controls/dist/basic/PopupButton", "../../../common/pages/logs/LogsPage", "../../../common/SocialMailApp", "./detail/MailDetailPage", "../../../common/controls/file-preview/FilePreview"], function (_export, _context) {
|
|
29555
30882
|
"use strict";
|
|
29556
30883
|
|
|
29557
|
-
var __awaiter, __decorate, __metadata, ContentPage,
|
|
30884
|
+
var __awaiter, __decorate, __metadata, ContentPage, isMobileView, Email, EmailRecipient, XNode, AtomRepeater, InfiniteRepeater, ConversationService, renderMail, InjectProperty, InlinePopupControl, Bind, styled, Action, PageNavigator, ComposeMailPage, MailboxSocket, LimitedText, DateFormats, MenuItem, PopupActionButton, LogsPage, SocialMailApp, MailDetailPage, FilePreview, ConversationPage, itemCss, css, id, fixLinks;
|
|
29558
30885
|
_export("default", void 0);
|
|
29559
30886
|
return {
|
|
29560
30887
|
setters: [function (_tslib) {
|
|
@@ -29563,360 +30890,303 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
|
|
|
29563
30890
|
__metadata = _tslib.__metadata;
|
|
29564
30891
|
}, function (_webAtomsWebControlsDistMobileAppMobileApp) {
|
|
29565
30892
|
ContentPage = _webAtomsWebControlsDistMobileAppMobileApp.ContentPage;
|
|
30893
|
+
isMobileView = _webAtomsWebControlsDistMobileAppMobileApp.isMobileView;
|
|
29566
30894
|
}, function (_modelModel) {
|
|
29567
|
-
|
|
30895
|
+
Email = _modelModel.Email;
|
|
30896
|
+
EmailRecipient = _modelModel.EmailRecipient;
|
|
29568
30897
|
}, function (_webAtomsCoreDistCoreXNode) {
|
|
29569
30898
|
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
29570
|
-
}, function (_webAtomsWebControlsDistBasicUploadEvent) {
|
|
29571
|
-
UploadEvent = _webAtomsWebControlsDistBasicUploadEvent.default;
|
|
29572
30899
|
}, function (_webAtomsWebControlsDistBasicAtomRepeater) {
|
|
29573
30900
|
AtomRepeater = _webAtomsWebControlsDistBasicAtomRepeater.default;
|
|
29574
|
-
}, function (
|
|
29575
|
-
|
|
29576
|
-
}, function (
|
|
29577
|
-
|
|
29578
|
-
|
|
29579
|
-
Action = _webAtomsCoreDistViewModelAction.default;
|
|
29580
|
-
}, function (_serviceCloudFileService) {
|
|
29581
|
-
CloudFileService = _serviceCloudFileService.default;
|
|
30901
|
+
}, function (_commonControlsRepeaterInfiniteRepeater) {
|
|
30902
|
+
InfiniteRepeater = _commonControlsRepeaterInfiniteRepeater.default;
|
|
30903
|
+
}, function (_serviceConversationService) {
|
|
30904
|
+
ConversationService = _serviceConversationService.default;
|
|
30905
|
+
renderMail = _serviceConversationService.renderMail;
|
|
29582
30906
|
}, function (_webAtomsCoreDistCoreInjectProperty) {
|
|
29583
30907
|
InjectProperty = _webAtomsCoreDistCoreInjectProperty.default;
|
|
30908
|
+
}, function (_webAtomsWebControlsDistBasicInlinePopupControl) {
|
|
30909
|
+
InlinePopupControl = _webAtomsWebControlsDistBasicInlinePopupControl.default;
|
|
30910
|
+
}, function (_webAtomsCoreDistCoreBind) {
|
|
30911
|
+
Bind = _webAtomsCoreDistCoreBind.default;
|
|
29584
30912
|
}, function (_webAtomsCoreDistStyleStyled) {
|
|
29585
30913
|
styled = _webAtomsCoreDistStyleStyled.default;
|
|
29586
|
-
}, function (
|
|
29587
|
-
|
|
29588
|
-
}, function (_commonControlsDragDropFilesDragDrop) {
|
|
29589
|
-
FilesDragDrop = _commonControlsDragDropFilesDragDrop.FilesDragDrop;
|
|
29590
|
-
}, function (_webAtomsWebControlsDistBasicPopupButton) {
|
|
29591
|
-
PopupButton = _webAtomsWebControlsDistBasicPopupButton.default;
|
|
29592
|
-
MenuItem = _webAtomsWebControlsDistBasicPopupButton.MenuItem;
|
|
30914
|
+
}, function (_webAtomsCoreDistViewModelAction) {
|
|
30915
|
+
Action = _webAtomsCoreDistViewModelAction.default;
|
|
29593
30916
|
}, function (_webAtomsWebControlsDistPageNavigator) {
|
|
29594
30917
|
PageNavigator = _webAtomsWebControlsDistPageNavigator.default;
|
|
29595
|
-
}, function (
|
|
29596
|
-
|
|
29597
|
-
}, function (
|
|
29598
|
-
|
|
30918
|
+
}, function (_ComposeMailPage) {
|
|
30919
|
+
ComposeMailPage = _ComposeMailPage.default;
|
|
30920
|
+
}, function (_servicesSocketSockets) {
|
|
30921
|
+
MailboxSocket = _servicesSocketSockets.MailboxSocket;
|
|
30922
|
+
}, function (_webAtomsWebControlsDistBasicLimitedText) {
|
|
30923
|
+
LimitedText = _webAtomsWebControlsDistBasicLimitedText.default;
|
|
30924
|
+
}, function (_commonDateDateFormats) {
|
|
30925
|
+
DateFormats = _commonDateDateFormats.DateFormats;
|
|
30926
|
+
}, function (_webAtomsWebControlsDistBasicPopupButton) {
|
|
30927
|
+
MenuItem = _webAtomsWebControlsDistBasicPopupButton.MenuItem;
|
|
30928
|
+
PopupActionButton = _webAtomsWebControlsDistBasicPopupButton.PopupActionButton;
|
|
30929
|
+
}, function (_commonPagesLogsLogsPage) {
|
|
30930
|
+
LogsPage = _commonPagesLogsLogsPage.default;
|
|
30931
|
+
}, function (_commonSocialMailApp) {
|
|
30932
|
+
SocialMailApp = _commonSocialMailApp.default;
|
|
30933
|
+
}, function (_detailMailDetailPage) {
|
|
30934
|
+
MailDetailPage = _detailMailDetailPage.default;
|
|
30935
|
+
}, function (_commonControlsFilePreviewFilePreview) {
|
|
30936
|
+
FilePreview = _commonControlsFilePreviewFilePreview.default;
|
|
29599
30937
|
}],
|
|
29600
30938
|
execute: function () {
|
|
29601
|
-
|
|
29602
|
-
|
|
29603
|
-
|
|
29604
|
-
|
|
29605
|
-
|
|
29606
|
-
|
|
29607
|
-
|
|
30939
|
+
itemCss = styled.css`
|
|
30940
|
+
border: solid 1px lightgray;
|
|
30941
|
+
border-radius: 10px;
|
|
30942
|
+
padding: 10px;
|
|
30943
|
+
margin-right: 20%;
|
|
30944
|
+
overflow: hidden;
|
|
30945
|
+
position: relative;
|
|
30946
|
+
background-color: canvas;
|
|
30947
|
+
&[data-sent=true] {
|
|
30948
|
+
margin-right: 0;
|
|
30949
|
+
margin-left: 20%;
|
|
29608
30950
|
}
|
|
29609
|
-
& .
|
|
29610
|
-
|
|
29611
|
-
grid-column: 2;
|
|
29612
|
-
position: relative;
|
|
29613
|
-
overflow: auto;
|
|
29614
|
-
& > * {
|
|
29615
|
-
width: 100%;
|
|
29616
|
-
}
|
|
29617
|
-
|
|
29618
|
-
& .file-link {
|
|
29619
|
-
cursor: pointer;
|
|
29620
|
-
&:hover {
|
|
29621
|
-
text-decoration: underline;
|
|
29622
|
-
}
|
|
29623
|
-
}
|
|
30951
|
+
& > * > .message {
|
|
30952
|
+
margin-bottom: 25px;
|
|
29624
30953
|
}
|
|
29625
30954
|
`.installLocal();
|
|
29626
|
-
|
|
29627
|
-
|
|
29628
|
-
|
|
29629
|
-
|
|
29630
|
-
|
|
29631
|
-
|
|
30955
|
+
css = styled.css`
|
|
30956
|
+
background-color: var(--window-background);
|
|
30957
|
+
`.installLocal();
|
|
30958
|
+
id = 1;
|
|
30959
|
+
fixLinks = () => {
|
|
30960
|
+
const mID = `m_id_${id++}`;
|
|
30961
|
+
setTimeout(x => {
|
|
30962
|
+
const m = document.getElementById(x);
|
|
30963
|
+
if (!m) {
|
|
30964
|
+
return;
|
|
30965
|
+
}
|
|
30966
|
+
m.querySelectorAll("a").forEach(a => a.target = "_blank");
|
|
30967
|
+
}, 100, mID);
|
|
30968
|
+
return mID;
|
|
29632
30969
|
};
|
|
29633
|
-
_export("default",
|
|
30970
|
+
_export("default", ConversationPage = class ConversationPage extends ContentPage {
|
|
29634
30971
|
constructor() {
|
|
29635
30972
|
super(...arguments);
|
|
30973
|
+
this.mails = [];
|
|
30974
|
+
this.search = "";
|
|
29636
30975
|
this.version = 1;
|
|
29637
30976
|
}
|
|
29638
30977
|
init() {
|
|
29639
|
-
var _a;
|
|
29640
|
-
var _b;
|
|
29641
30978
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29642
|
-
this.
|
|
29643
|
-
|
|
29644
|
-
|
|
29645
|
-
|
|
29646
|
-
|
|
29647
|
-
|
|
29648
|
-
|
|
29649
|
-
|
|
29650
|
-
|
|
29651
|
-
|
|
29652
|
-
|
|
29653
|
-
|
|
29654
|
-
|
|
29655
|
-
|
|
29656
|
-
|
|
29657
|
-
|
|
29658
|
-
|
|
29659
|
-
|
|
29660
|
-
|
|
29661
|
-
|
|
29662
|
-
|
|
29663
|
-
}), {
|
|
29664
|
-
|
|
29665
|
-
}))
|
|
29666
|
-
|
|
29667
|
-
|
|
29668
|
-
|
|
29669
|
-
|
|
29670
|
-
}
|
|
29671
|
-
|
|
29672
|
-
|
|
29673
|
-
|
|
29674
|
-
|
|
29675
|
-
|
|
29676
|
-
|
|
29677
|
-
|
|
29678
|
-
|
|
29679
|
-
|
|
29680
|
-
|
|
29681
|
-
|
|
29682
|
-
|
|
29683
|
-
|
|
29684
|
-
|
|
29685
|
-
|
|
29686
|
-
|
|
29687
|
-
|
|
29688
|
-
|
|
29689
|
-
|
|
29690
|
-
|
|
29691
|
-
|
|
29692
|
-
|
|
29693
|
-
|
|
29694
|
-
|
|
29695
|
-
|
|
29696
|
-
|
|
29697
|
-
|
|
29698
|
-
|
|
29699
|
-
|
|
29700
|
-
|
|
29701
|
-
|
|
29702
|
-
|
|
29703
|
-
|
|
29704
|
-
|
|
29705
|
-
|
|
29706
|
-
|
|
29707
|
-
|
|
29708
|
-
|
|
29709
|
-
|
|
29710
|
-
|
|
29711
|
-
|
|
29712
|
-
|
|
29713
|
-
|
|
29714
|
-
|
|
29715
|
-
|
|
29716
|
-
|
|
29717
|
-
|
|
29718
|
-
|
|
29719
|
-
|
|
29720
|
-
|
|
29721
|
-
|
|
29722
|
-
|
|
29723
|
-
|
|
29724
|
-
|
|
29725
|
-
|
|
29726
|
-
|
|
29727
|
-
});
|
|
29728
|
-
}
|
|
29729
|
-
renderFile(item) {
|
|
29730
|
-
if (item.isFolder) {
|
|
29731
|
-
return XNode.create("tr", null, XNode.create("td", null, XNode.create("i", {
|
|
29732
|
-
class: item.isFolder ? "fiv-viv fiv-icon-folder" : `fiv-viv fiv-icon-${getExtension(item.name)}`
|
|
29733
|
-
}), XNode.create("span", {
|
|
29734
|
-
"data-click-event": "open-folder",
|
|
29735
|
-
class: "file-link",
|
|
29736
|
-
text: item.name,
|
|
29737
|
-
"data-padding-left": "auto"
|
|
29738
|
-
})), XNode.create("td", null, item.isShared && XNode.create("i", {
|
|
29739
|
-
title: "Shared",
|
|
29740
|
-
class: "fas fa-folder-user"
|
|
29741
|
-
})), XNode.create("td", {
|
|
29742
|
-
text: toFileSize(item.fileSize)
|
|
29743
|
-
}), XNode.create("td", null), XNode.create("td", null, XNode.create("i", {
|
|
29744
|
-
"data-click-event": "edit-shares",
|
|
29745
|
-
class: "fas fa-share"
|
|
30979
|
+
this.element.className = css;
|
|
30980
|
+
const mb = this.parameters;
|
|
30981
|
+
const name = mb.emailAddress.name;
|
|
30982
|
+
const emailAddress = mb.emailAddress.emailAddress;
|
|
30983
|
+
const title = `${name} <${emailAddress}>`;
|
|
30984
|
+
if (isMobileView) {
|
|
30985
|
+
this.title = title;
|
|
30986
|
+
this.headerRenderer = () => XNode.create("div", {
|
|
30987
|
+
"data-layout": "row"
|
|
30988
|
+
}, XNode.create("input", {
|
|
30989
|
+
value: Bind.twoWaysImmediate(() => this.search),
|
|
30990
|
+
type: "search",
|
|
30991
|
+
placeholder: "Search"
|
|
30992
|
+
}));
|
|
30993
|
+
} else {
|
|
30994
|
+
this.titleRenderer = () => XNode.create("div", {
|
|
30995
|
+
"data-layout": "row"
|
|
30996
|
+
}, XNode.create("input", {
|
|
30997
|
+
value: Bind.twoWaysImmediate(() => this.search),
|
|
30998
|
+
type: "search",
|
|
30999
|
+
placeholder: "Search"
|
|
31000
|
+
}), XNode.create("span", {
|
|
31001
|
+
text: title
|
|
31002
|
+
}));
|
|
31003
|
+
}
|
|
31004
|
+
this.registerDisposable(yield this.resolve(MailboxSocket).join(mb.mailboxID.toString(), {
|
|
31005
|
+
newMail: () => {
|
|
31006
|
+
this.version++;
|
|
31007
|
+
}
|
|
31008
|
+
}));
|
|
31009
|
+
this.renderer = XNode.create("div", null, XNode.create(AtomRepeater, Object.assign({
|
|
31010
|
+
"data-layout": "vertical-flex",
|
|
31011
|
+
style: "flex-direction: column-reverse",
|
|
31012
|
+
items: this.mails
|
|
31013
|
+
}, InfiniteRepeater.pagedItems(start => (c, e, cancelToken) => this.conversationService.list({
|
|
31014
|
+
start,
|
|
31015
|
+
size: 10,
|
|
31016
|
+
search: this.search,
|
|
31017
|
+
mailboxID: mb.mailboxID,
|
|
31018
|
+
emailAddressID: mb.emailAddressID,
|
|
31019
|
+
version: this.version,
|
|
31020
|
+
cancelToken
|
|
31021
|
+
})), {
|
|
31022
|
+
itemRenderer: thread => {
|
|
31023
|
+
var _a, _b, _c, _d, _e;
|
|
31024
|
+
const item = thread.email;
|
|
31025
|
+
const internalDate = (_b = (_a = item.dateSent) !== null && _a !== void 0 ? _a : item.dateReceived) !== null && _b !== void 0 ? _b : item.dateCreated;
|
|
31026
|
+
const sent = item.senderID === thread.mailboxID;
|
|
31027
|
+
return XNode.create("div", {
|
|
31028
|
+
class: itemCss,
|
|
31029
|
+
"data-sent": sent
|
|
31030
|
+
}, XNode.create("div", {
|
|
31031
|
+
"data-layout": "row"
|
|
31032
|
+
}, XNode.create("div", {
|
|
31033
|
+
"data-flex": "stretch-full",
|
|
31034
|
+
text: item.subject
|
|
31035
|
+
}), item.received ? XNode.create("div", null) : item.userID !== SocialMailApp.user.userID && XNode.create("div", {
|
|
31036
|
+
"style-max-width": "20ch",
|
|
31037
|
+
title: (_c = item.senderUser) === null || _c === void 0 ? void 0 : _c.displayName,
|
|
31038
|
+
text: (_d = item.senderUser) === null || _d === void 0 ? void 0 : _d.displayName
|
|
31039
|
+
}), XNode.create("div", {
|
|
31040
|
+
text: DateFormats.relative.short(internalDate),
|
|
31041
|
+
title: DateFormats.withWeekDayAndTime(internalDate)
|
|
31042
|
+
}), XNode.create("i", {
|
|
31043
|
+
"data-click-event": "mail-options",
|
|
31044
|
+
class: "fa-light fa-square-ellipsis-vertical",
|
|
31045
|
+
title: "Options"
|
|
31046
|
+
})), XNode.create(LimitedText, {
|
|
31047
|
+
height: "40vh"
|
|
31048
|
+
}, XNode.create("div", Object.assign({
|
|
31049
|
+
class: "message"
|
|
31050
|
+
}, renderMail(thread)))), ((_e = item.attachments) === null || _e === void 0 ? void 0 : _e.length) && XNode.create("div", {
|
|
31051
|
+
class: "attachments",
|
|
31052
|
+
"data-layout": "flex-wrap-padding"
|
|
31053
|
+
}, ...item.attachments.map(FilePreview)), !sent && XNode.create("div", {
|
|
31054
|
+
"data-layout": "row"
|
|
31055
|
+
}, XNode.create("i", {
|
|
31056
|
+
"data-click-event": "reply-email",
|
|
31057
|
+
class: "fas fa-reply",
|
|
31058
|
+
title: "Reply"
|
|
31059
|
+
}), XNode.create("i", {
|
|
31060
|
+
"data-click-event": "reply-all-email",
|
|
31061
|
+
class: "fa-solid fa-reply-all"
|
|
31062
|
+
})));
|
|
31063
|
+
}
|
|
29746
31064
|
})));
|
|
29747
|
-
|
|
29748
|
-
|
|
29749
|
-
|
|
29750
|
-
|
|
29751
|
-
|
|
29752
|
-
|
|
29753
|
-
|
|
29754
|
-
|
|
29755
|
-
|
|
29756
|
-
})
|
|
29757
|
-
|
|
29758
|
-
|
|
29759
|
-
|
|
29760
|
-
text: toFileSize(item.fileSize)
|
|
29761
|
-
}), XNode.create("td", null, XNode.create("a", {
|
|
29762
|
-
href: item.downloadUrl,
|
|
29763
|
-
target: "_blank",
|
|
29764
|
-
download: true
|
|
29765
|
-
}, XNode.create("i", {
|
|
29766
|
-
class: "fas fa-download"
|
|
29767
|
-
}))), XNode.create("td", null, XNode.create("i", {
|
|
29768
|
-
"data-click-event": "edit-shares",
|
|
29769
|
-
class: "fas fa-share"
|
|
31065
|
+
this.actionRenderer = () => XNode.create(PopupActionButton, {
|
|
31066
|
+
icon: "fas fa-bars"
|
|
31067
|
+
}, XNode.create("div", {
|
|
31068
|
+
"data-layout": "vertical-flex",
|
|
31069
|
+
"style-width": "200px"
|
|
31070
|
+
}, this.parameters.blocked ? XNode.create(MenuItem, {
|
|
31071
|
+
"data-click-event": "unblock-sender",
|
|
31072
|
+
icon: "fas fa-badge-check",
|
|
31073
|
+
label: "Unblock Sender"
|
|
31074
|
+
}) : XNode.create(MenuItem, {
|
|
31075
|
+
"data-click-event": "block-sender",
|
|
31076
|
+
icon: "fas fa-ban",
|
|
31077
|
+
label: "Block Sender"
|
|
29770
31078
|
})));
|
|
29771
|
-
}
|
|
29772
|
-
return XNode.create("tr", null, XNode.create("td", null, XNode.create("i", {
|
|
29773
|
-
class: item.isFolder ? "fiv-viv fiv-icon-folder" : `fiv-viv fiv-icon-${getExtension(item.name)}`
|
|
29774
|
-
}), XNode.create("a", {
|
|
29775
|
-
href: item.url,
|
|
29776
|
-
target: "_blank",
|
|
29777
|
-
text: item.name,
|
|
29778
|
-
"data-margin-left": "default"
|
|
29779
|
-
})), XNode.create("td", null, item.isShared && XNode.create("i", {
|
|
29780
|
-
title: "Shared",
|
|
29781
|
-
class: "fas fa-folder-user"
|
|
29782
|
-
})), XNode.create("td", {
|
|
29783
|
-
text: toFileSize(item.fileSize)
|
|
29784
|
-
}), XNode.create("td", null, XNode.create("a", {
|
|
29785
|
-
href: item.downloadUrl,
|
|
29786
|
-
target: "_blank",
|
|
29787
|
-
download: true
|
|
29788
|
-
}, XNode.create("i", {
|
|
29789
|
-
class: "fas fa-download"
|
|
29790
|
-
}))), XNode.create("td", null, XNode.create("i", {
|
|
29791
|
-
"data-click-event": "edit-shares",
|
|
29792
|
-
class: "fas fa-share"
|
|
29793
|
-
})));
|
|
29794
|
-
}
|
|
29795
|
-
editShares(file) {
|
|
29796
|
-
PageNavigator.pushPage(EditSharesPage, file);
|
|
29797
|
-
}
|
|
29798
|
-
openFolder(file) {
|
|
29799
|
-
this.selectedFolder = file;
|
|
31079
|
+
});
|
|
29800
31080
|
}
|
|
29801
|
-
|
|
31081
|
+
mailOptions(thread, ce) {
|
|
29802
31082
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29803
|
-
|
|
29804
|
-
|
|
29805
|
-
|
|
29806
|
-
}
|
|
29807
|
-
|
|
29808
|
-
|
|
29809
|
-
|
|
29810
|
-
|
|
29811
|
-
|
|
29812
|
-
|
|
31083
|
+
void InlinePopupControl.showPopup(ce.target, XNode.create("div", {
|
|
31084
|
+
"data-click-event": "none",
|
|
31085
|
+
"data-click-animate": "none"
|
|
31086
|
+
}, XNode.create(MenuItem, {
|
|
31087
|
+
eventClick: () => PageNavigator.pushPage(MailDetailPage, thread.email),
|
|
31088
|
+
icon: "fas fa-eye",
|
|
31089
|
+
label: "Details"
|
|
31090
|
+
}), XNode.create(MenuItem, {
|
|
31091
|
+
href: `/api/files/download/${thread.email.originalFileID}`,
|
|
31092
|
+
icon: "fas fa-download",
|
|
31093
|
+
label: "Download"
|
|
31094
|
+
}), XNode.create(MenuItem, {
|
|
31095
|
+
"data-click-event": "open-logs",
|
|
31096
|
+
icon: "fa-regular fa-clock-rotate-left",
|
|
31097
|
+
label: "Logs"
|
|
31098
|
+
})));
|
|
29813
31099
|
});
|
|
29814
31100
|
}
|
|
29815
|
-
|
|
31101
|
+
openLogs({
|
|
31102
|
+
emailID
|
|
31103
|
+
}) {
|
|
29816
31104
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29817
|
-
|
|
31105
|
+
PageNavigator.pushPage(LogsPage, {
|
|
31106
|
+
emailID
|
|
31107
|
+
});
|
|
29818
31108
|
});
|
|
29819
31109
|
}
|
|
29820
|
-
|
|
31110
|
+
replyEmail({
|
|
31111
|
+
email
|
|
31112
|
+
}, ce) {
|
|
31113
|
+
var _a, _b, _c;
|
|
29821
31114
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29822
|
-
|
|
31115
|
+
const parse = JSON.parse(email.headers);
|
|
31116
|
+
const emailAddressText = ((_b = (_a = parse === null || parse === void 0 ? void 0 : parse.replyTo) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : this.parameters.emailAddress.emailAddress).toLocaleLowerCase();
|
|
31117
|
+
const name = email.senderName;
|
|
31118
|
+
const parentID = (_c = email.parentID) !== null && _c !== void 0 ? _c : email.emailID;
|
|
31119
|
+
const recipients = [EmailRecipient.create({
|
|
31120
|
+
name,
|
|
31121
|
+
emailAddressText
|
|
31122
|
+
})];
|
|
31123
|
+
if (/all/i.test(ce.type)) {
|
|
31124
|
+
for (const {
|
|
31125
|
+
name: rName,
|
|
31126
|
+
emailAddress: {
|
|
31127
|
+
emailAddress
|
|
31128
|
+
}
|
|
31129
|
+
} of email.recipients) {
|
|
31130
|
+
if (recipients.some(er => er.emailAddress.emailAddress === emailAddress)) {
|
|
31131
|
+
continue;
|
|
31132
|
+
}
|
|
31133
|
+
recipients.push(EmailRecipient.create({
|
|
31134
|
+
name: rName,
|
|
31135
|
+
emailAddressText: emailAddress
|
|
31136
|
+
}));
|
|
31137
|
+
}
|
|
31138
|
+
}
|
|
31139
|
+
const subject = /^re\s?\:/i.test(email.subject) ? email.subject : `Re: ${email.subject}`;
|
|
31140
|
+
const child = Email.create({
|
|
31141
|
+
senderID: this.parameters.mailboxID,
|
|
31142
|
+
subject,
|
|
31143
|
+
parentID,
|
|
31144
|
+
received: false,
|
|
31145
|
+
recipients,
|
|
31146
|
+
htmlBody: `<div contentEditable="true"><p><br/><br/><br/><br/><br/></p></div>`
|
|
31147
|
+
});
|
|
31148
|
+
yield PageNavigator.pushPageForResult(ComposeMailPage, {
|
|
31149
|
+
mailboxID: child.senderID,
|
|
31150
|
+
mailbox: this.parameters.mailbox,
|
|
31151
|
+
model: child
|
|
31152
|
+
});
|
|
29823
31153
|
});
|
|
29824
31154
|
}
|
|
29825
|
-
|
|
31155
|
+
blockSender() {
|
|
29826
31156
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29827
|
-
|
|
29828
|
-
const file = yield PageNavigator.pushPageForResult(EditTemplatePage, {
|
|
29829
|
-
file: AppFile.create({
|
|
29830
|
-
parentID
|
|
29831
|
-
})
|
|
29832
|
-
});
|
|
29833
|
-
this.selectedFolder.children.add(file);
|
|
31157
|
+
yield this.conversationService.block(this.parameters);
|
|
29834
31158
|
});
|
|
29835
31159
|
}
|
|
29836
|
-
|
|
31160
|
+
unblockSender() {
|
|
29837
31161
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29838
|
-
yield
|
|
29839
|
-
file
|
|
29840
|
-
});
|
|
31162
|
+
yield this.conversationService.block(this.parameters);
|
|
29841
31163
|
});
|
|
29842
31164
|
}
|
|
29843
31165
|
});
|
|
29844
|
-
__decorate([InjectProperty, __metadata("design:type",
|
|
29845
|
-
__decorate([Action({
|
|
29846
|
-
onEvent: "edit-shares"
|
|
29847
|
-
}), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", void 0)], FolderPage.prototype, "editShares", null);
|
|
29848
|
-
__decorate([Action({
|
|
29849
|
-
onEvent: "open-folder"
|
|
29850
|
-
}), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", void 0)], FolderPage.prototype, "openFolder", null);
|
|
31166
|
+
__decorate([InjectProperty, __metadata("design:type", ConversationService)], ConversationPage.prototype, "conversationService", void 0);
|
|
29851
31167
|
__decorate([Action({
|
|
29852
|
-
onEvent: "
|
|
29853
|
-
}), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise)],
|
|
31168
|
+
onEvent: "mail-options"
|
|
31169
|
+
}), __metadata("design:type", Function), __metadata("design:paramtypes", [Object, CustomEvent]), __metadata("design:returntype", Promise)], ConversationPage.prototype, "mailOptions", null);
|
|
29854
31170
|
__decorate([Action({
|
|
29855
|
-
onEvent: "
|
|
29856
|
-
}), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Promise)],
|
|
31171
|
+
onEvent: "open-logs"
|
|
31172
|
+
}), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Promise)], ConversationPage.prototype, "openLogs", null);
|
|
29857
31173
|
__decorate([Action({
|
|
29858
|
-
onEvent: "
|
|
29859
|
-
}), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise)],
|
|
31174
|
+
onEvent: ["reply-email", "reply-all-email"]
|
|
31175
|
+
}), __metadata("design:type", Function), __metadata("design:paramtypes", [Object, CustomEvent]), __metadata("design:returntype", Promise)], ConversationPage.prototype, "replyEmail", null);
|
|
29860
31176
|
__decorate([Action({
|
|
29861
|
-
onEvent: "
|
|
29862
|
-
|
|
31177
|
+
onEvent: "block-sender",
|
|
31178
|
+
confirm: "Are you sure you want to block this sender?"
|
|
31179
|
+
}), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise)], ConversationPage.prototype, "blockSender", null);
|
|
29863
31180
|
__decorate([Action({
|
|
29864
|
-
onEvent: "
|
|
29865
|
-
|
|
29866
|
-
|
|
29867
|
-
};
|
|
29868
|
-
});
|
|
29869
|
-
//# sourceMappingURL=FolderPage.js.map
|
|
29870
|
-
|
|
29871
|
-
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/web/page/files/FolderPage");
|
|
29872
|
-
|
|
29873
|
-
System.register(["@web-atoms/core/dist/core/Command", "../../common/commands/CommonCommands"], function (_export, _context) {
|
|
29874
|
-
"use strict";
|
|
29875
|
-
|
|
29876
|
-
var Command, CommonCommands, AppCommands;
|
|
29877
|
-
_export("default", void 0);
|
|
29878
|
-
return {
|
|
29879
|
-
setters: [function (_webAtomsCoreDistCoreCommand) {
|
|
29880
|
-
Command = _webAtomsCoreDistCoreCommand.default;
|
|
29881
|
-
}, function (_commonCommandsCommonCommands) {
|
|
29882
|
-
CommonCommands = _commonCommandsCommonCommands.default;
|
|
29883
|
-
}],
|
|
29884
|
-
execute: function () {
|
|
29885
|
-
_export("default", AppCommands = class AppCommands extends CommonCommands {});
|
|
29886
|
-
AppCommands.openHome = Command.create({
|
|
29887
|
-
route: "/",
|
|
29888
|
-
routeOrder: 200,
|
|
29889
|
-
openPage: () => _context.import("../page/home/HomePage")
|
|
29890
|
-
});
|
|
29891
|
-
AppCommands.openMailboxList = Command.create({
|
|
29892
|
-
route: "/mailboxes",
|
|
29893
|
-
routeOrder: 100,
|
|
29894
|
-
openPage: () => _context.import("../../common/pages/mailboxes/MailboxListPage")
|
|
29895
|
-
});
|
|
29896
|
-
AppCommands.openMails = Command.create({
|
|
29897
|
-
route: "/mails",
|
|
29898
|
-
routeOrder: 100,
|
|
29899
|
-
openPage: () => _context.import("../page/mails/MailboxContacts")
|
|
29900
|
-
});
|
|
29901
|
-
AppCommands.openFiles = Command.create({
|
|
29902
|
-
route: "/files/{id}",
|
|
29903
|
-
routeOrder: 100,
|
|
29904
|
-
openPage: () => _context.import("../page/files/FolderPage")
|
|
29905
|
-
});
|
|
29906
|
-
AppCommands.openTemplates = Command.create({
|
|
29907
|
-
route: "/templates",
|
|
29908
|
-
routeOrder: 100,
|
|
29909
|
-
routeDefaults: {
|
|
29910
|
-
templates: true
|
|
29911
|
-
},
|
|
29912
|
-
openPage: () => _context.import("../page/files/FolderPage")
|
|
29913
|
-
});
|
|
31181
|
+
onEvent: "unblock-sender",
|
|
31182
|
+
confirm: "Are you sure you want to unblock this sender?"
|
|
31183
|
+
}), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise)], ConversationPage.prototype, "unblockSender", null);
|
|
29914
31184
|
}
|
|
29915
31185
|
};
|
|
29916
31186
|
});
|
|
29917
|
-
//# sourceMappingURL=
|
|
31187
|
+
//# sourceMappingURL=ConversationPage.js.map
|
|
29918
31188
|
|
|
29919
|
-
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/web/
|
|
31189
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/web/page/mails/ConversationPage");
|
|
29920
31190
|
|
|
29921
31191
|
System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "../../../common/pages/mailboxes/services/MailboxService", "@web-atoms/core/dist/core/InjectProperty", "@web-atoms/core/dist/core/XNode", "@web-atoms/web-controls/dist/basic/AtomRepeater", "../../../common/controls/repeater/InfiniteRepeater", "../../../common/NumberFormats", "../../commands/AppCommands", "@web-atoms/core/dist/core/Bind"], function (_export, _context) {
|
|
29922
31192
|
"use strict";
|