@zextras/carbonio-shell-ui 6.0.0 → 7.0.0
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/lib/boot/app/app-context-provider.d.ts +7 -0
- package/lib/boot/app/app-context-provider.js +17 -0
- package/lib/boot/app/app-context-provider.js.map +1 -0
- package/lib/boot/app/app-error-catcher.d.ts +3 -0
- package/lib/boot/app/app-error-catcher.js +41 -0
- package/lib/boot/app/app-error-catcher.js.map +1 -0
- package/lib/boot/app/app-loader-functions.d.ts +37 -0
- package/lib/boot/app/app-loader-functions.js +121 -0
- package/lib/boot/app/app-loader-functions.js.map +1 -0
- package/lib/boot/app/app-loader-setters.d.ts +38 -0
- package/lib/boot/app/app-loader-setters.js +46 -0
- package/lib/boot/app/app-loader-setters.js.map +1 -0
- package/lib/boot/matomo.d.ts +12 -0
- package/lib/boot/matomo.js +22 -0
- package/lib/boot/matomo.js.map +1 -0
- package/lib/boot/module-i18next-provider.d.ts +7 -0
- package/lib/boot/module-i18next-provider.js +22 -0
- package/lib/boot/module-i18next-provider.js.map +1 -0
- package/lib/boot/tracker.d.ts +11 -0
- package/lib/boot/tracker.js +57 -0
- package/lib/boot/tracker.js.map +1 -0
- package/lib/constants/index.d.ts +146 -0
- package/lib/constants/index.js +160 -0
- package/lib/constants/index.js.map +1 -0
- package/lib/constants/locales.d.ts +83 -0
- package/lib/constants/locales.js +86 -0
- package/lib/constants/locales.js.map +1 -0
- package/lib/history/hooks.d.ts +12 -0
- package/lib/history/hooks.js +69 -0
- package/lib/history/hooks.js.map +1 -0
- package/lib/lib.d.ts +74 -0
- package/lib/lib.js +134 -0
- package/lib/lib.js.map +1 -0
- package/lib/network/edit-settings.d.ts +14 -0
- package/lib/network/edit-settings.js +144 -0
- package/lib/network/edit-settings.js.map +1 -0
- package/lib/network/fetch.d.ts +4 -0
- package/lib/network/fetch.js +175 -0
- package/lib/network/fetch.js.map +1 -0
- package/lib/network/tags.d.ts +27 -0
- package/lib/network/tags.js +31 -0
- package/lib/network/tags.js.map +1 -0
- package/lib/network/user-agent.d.ts +1 -0
- package/lib/network/user-agent.js +15 -0
- package/lib/network/user-agent.js.map +1 -0
- package/lib/network/utils.d.ts +2 -0
- package/lib/network/utils.js +17 -0
- package/lib/network/utils.js.map +1 -0
- package/lib/notification/NotificationManager.d.ts +22 -0
- package/lib/notification/NotificationManager.js +153 -0
- package/lib/notification/NotificationManager.js.map +1 -0
- package/lib/reporting/functions.d.ts +2 -0
- package/lib/reporting/functions.js +14 -0
- package/lib/reporting/functions.js.map +1 -0
- package/lib/reporting/store.d.ts +8 -0
- package/lib/reporting/store.js +43 -0
- package/lib/reporting/store.js.map +1 -0
- package/lib/search/run-search.d.ts +2 -0
- package/lib/search/run-search.js +17 -0
- package/lib/search/run-search.js.map +1 -0
- package/lib/search/search-store.d.ts +2 -0
- package/lib/search/search-store.js +20 -0
- package/lib/search/search-store.js.map +1 -0
- package/lib/search/useSearchModule.d.ts +3 -0
- package/lib/search/useSearchModule.js +21 -0
- package/lib/search/useSearchModule.js.map +1 -0
- package/lib/settings/components/settings-header.d.ts +9 -0
- package/lib/settings/components/settings-header.js +86 -0
- package/lib/settings/components/settings-header.js.map +1 -0
- package/lib/shell/hooks/useIsMobile.d.ts +4 -0
- package/lib/shell/hooks/useIsMobile.js +22 -0
- package/lib/shell/hooks/useIsMobile.js.map +1 -0
- package/lib/shell/hooks/useLocalStorage.d.ts +14 -0
- package/lib/shell/hooks/useLocalStorage.js +77 -0
- package/lib/shell/hooks/useLocalStorage.js.map +1 -0
- package/lib/shell/shell-context.d.ts +4 -0
- package/lib/shell/shell-context.js +11 -0
- package/lib/shell/shell-context.js.map +1 -0
- package/lib/store/account/hooks.d.ts +14 -0
- package/lib/store/account/hooks.js +51 -0
- package/lib/store/account/hooks.js.map +1 -0
- package/lib/store/account/index.d.ts +2 -0
- package/lib/store/account/index.js +24 -0
- package/lib/store/account/index.js.map +1 -0
- package/lib/store/account/store.d.ts +2 -0
- package/lib/store/account/store.js +23 -0
- package/lib/store/account/store.js.map +1 -0
- package/lib/store/app/hooks.d.ts +14 -0
- package/lib/store/app/hooks.js +41 -0
- package/lib/store/app/hooks.js.map +1 -0
- package/lib/store/app/index.d.ts +2 -0
- package/lib/store/app/index.js +24 -0
- package/lib/store/app/index.js.map +1 -0
- package/lib/store/app/store.d.ts +44 -0
- package/lib/store/app/store.js +265 -0
- package/lib/store/app/store.js.map +1 -0
- package/lib/store/app/utils.d.ts +10 -0
- package/lib/store/app/utils.js +123 -0
- package/lib/store/app/utils.js.map +1 -0
- package/lib/store/boards/hooks.d.ts +31 -0
- package/lib/store/boards/hooks.js +82 -0
- package/lib/store/boards/hooks.js.map +1 -0
- package/lib/store/boards/index.d.ts +2 -0
- package/lib/store/boards/index.js +24 -0
- package/lib/store/boards/index.js.map +1 -0
- package/lib/store/boards/store.d.ts +23 -0
- package/lib/store/boards/store.js +124 -0
- package/lib/store/boards/store.js.map +1 -0
- package/lib/store/context-bridge.d.ts +11 -0
- package/lib/store/context-bridge.js +34 -0
- package/lib/store/context-bridge.js.map +1 -0
- package/lib/store/folder/hooks.d.ts +21 -0
- package/lib/store/folder/hooks.js +77 -0
- package/lib/store/folder/hooks.js.map +1 -0
- package/lib/store/folder/index.d.ts +2 -0
- package/lib/store/folder/index.js +24 -0
- package/lib/store/folder/index.js.map +1 -0
- package/lib/store/folder/store.d.ts +2 -0
- package/lib/store/folder/store.js +20 -0
- package/lib/store/folder/store.js.map +1 -0
- package/lib/store/folder/utils.d.ts +16 -0
- package/lib/store/folder/utils.js +53 -0
- package/lib/store/folder/utils.js.map +1 -0
- package/lib/store/i18n/hooks.d.ts +4 -0
- package/lib/store/i18n/hooks.js +21 -0
- package/lib/store/i18n/hooks.js.map +1 -0
- package/lib/store/i18n/store.d.ts +13 -0
- package/lib/store/i18n/store.js +104 -0
- package/lib/store/i18n/store.js.map +1 -0
- package/lib/store/integrations/composer.d.ts +49 -0
- package/lib/store/integrations/composer.js +233 -0
- package/lib/store/integrations/composer.js.map +1 -0
- package/lib/store/integrations/getters.d.ts +9 -0
- package/lib/store/integrations/getters.js +41 -0
- package/lib/store/integrations/getters.js.map +1 -0
- package/lib/store/integrations/hooks.d.ts +9 -0
- package/lib/store/integrations/hooks.js +42 -0
- package/lib/store/integrations/hooks.js.map +1 -0
- package/lib/store/integrations/store.d.ts +41 -0
- package/lib/store/integrations/store.js +65 -0
- package/lib/store/integrations/store.js.map +1 -0
- package/lib/store/integrations/utils.d.ts +8 -0
- package/lib/store/integrations/utils.js +50 -0
- package/lib/store/integrations/utils.js.map +1 -0
- package/lib/store/login/getters.d.ts +2 -0
- package/lib/store/login/getters.js +18 -0
- package/lib/store/login/getters.js.map +1 -0
- package/lib/store/login/store.d.ts +12 -0
- package/lib/store/login/store.js +18 -0
- package/lib/store/login/store.js.map +1 -0
- package/lib/store/network/hooks.d.ts +3 -0
- package/lib/store/network/hooks.js +14 -0
- package/lib/store/network/hooks.js.map +1 -0
- package/lib/store/network/index.d.ts +2 -0
- package/lib/store/network/index.js +24 -0
- package/lib/store/network/index.js.map +1 -0
- package/lib/store/network/store.d.ts +2 -0
- package/lib/store/network/store.js +15 -0
- package/lib/store/network/store.js.map +1 -0
- package/lib/store/network/utils.d.ts +13 -0
- package/lib/store/network/utils.js +94 -0
- package/lib/store/network/utils.js.map +1 -0
- package/lib/store/tags/hooks.d.ts +3 -0
- package/lib/store/tags/hooks.js +15 -0
- package/lib/store/tags/hooks.js.map +1 -0
- package/lib/store/tags/index.d.ts +2 -0
- package/lib/store/tags/index.js +24 -0
- package/lib/store/tags/index.js.map +1 -0
- package/lib/store/tags/store.d.ts +2 -0
- package/lib/store/tags/store.js +18 -0
- package/lib/store/tags/store.js.map +1 -0
- package/lib/tsdoc-metadata.json +11 -0
- package/lib/types/account/index.d.ts +140 -0
- package/lib/types/account/index.js +8 -0
- package/lib/types/account/index.js.map +1 -0
- package/lib/types/apps/index.d.ts +120 -0
- package/lib/types/apps/index.js +9 -0
- package/lib/types/apps/index.js.map +1 -0
- package/lib/types/boards/index.d.ts +10 -0
- package/lib/types/boards/index.js +3 -0
- package/lib/types/boards/index.js.map +1 -0
- package/lib/types/folder/index.d.ts +29 -0
- package/lib/types/folder/index.js +8 -0
- package/lib/types/folder/index.js.map +1 -0
- package/lib/types/integrations/index.d.ts +8 -0
- package/lib/types/integrations/index.js +8 -0
- package/lib/types/integrations/index.js.map +1 -0
- package/lib/types/misc/index.d.ts +156 -0
- package/lib/types/misc/index.js +8 -0
- package/lib/types/misc/index.js.map +1 -0
- package/lib/types/network/entities.d.ts +47 -0
- package/lib/types/network/entities.js +3 -0
- package/lib/types/network/entities.js.map +1 -0
- package/lib/types/network/index.d.ts +171 -0
- package/lib/types/network/index.js +23 -0
- package/lib/types/network/index.js.map +1 -0
- package/lib/types/network/soap.d.ts +102 -0
- package/lib/types/network/soap.js +8 -0
- package/lib/types/network/soap.js.map +1 -0
- package/lib/types/search/index.d.ts +11 -0
- package/lib/types/search/index.js +23 -0
- package/lib/types/search/index.js.map +1 -0
- package/lib/types/search/items.d.ts +6 -0
- package/lib/types/search/items.js +3 -0
- package/lib/types/search/items.js.map +1 -0
- package/lib/types/tags/index.d.ts +12 -0
- package/lib/types/tags/index.js +9 -0
- package/lib/types/tags/index.js.map +1 -0
- package/lib/types/workers/index.d.ts +17 -0
- package/lib/types/workers/index.js +3 -0
- package/lib/types/workers/index.js.map +1 -0
- package/lib/ui-extras/app-link.d.ts +6 -0
- package/lib/ui-extras/app-link.js +40 -0
- package/lib/ui-extras/app-link.js.map +1 -0
- package/lib/ui-extras/nav-guard.d.ts +9 -0
- package/lib/ui-extras/nav-guard.js +96 -0
- package/lib/ui-extras/nav-guard.js.map +1 -0
- package/lib/ui-extras/spinner.d.ts +2 -0
- package/lib/ui-extras/spinner.js +18 -0
- package/lib/ui-extras/spinner.js.map +1 -0
- package/lib/utils/typeUtils.d.ts +14 -0
- package/lib/utils/typeUtils.js +3 -0
- package/lib/utils/typeUtils.js.map +1 -0
- package/lib/utils/utils.d.ts +20 -0
- package/lib/utils/utils.js +39 -0
- package/lib/utils/utils.js.map +1 -0
- package/lib/workers/index.d.ts +2 -0
- package/lib/workers/index.js +15 -0
- package/lib/workers/index.js.map +1 -0
- package/package.json +34 -37
- package/dist/20d012c938e8d0dcc703.mp3 +0 -0
- package/dist/2d9c9ae572663301cb7d.js +0 -75391
- package/dist/CHANGELOG.md +0 -701
- package/dist/carbonio-head.svg +0 -200
- package/dist/carbonio.svg +0 -10
- package/dist/commit +0 -1
- package/dist/component.json +0 -13
- package/dist/favicon.png +0 -0
- package/dist/files/roboto-cyrillic-300-normal.woff +0 -0
- package/dist/files/roboto-cyrillic-300-normal.woff2 +0 -0
- package/dist/files/roboto-cyrillic-400-normal.woff +0 -0
- package/dist/files/roboto-cyrillic-400-normal.woff2 +0 -0
- package/dist/files/roboto-cyrillic-500-normal.woff +0 -0
- package/dist/files/roboto-cyrillic-500-normal.woff2 +0 -0
- package/dist/files/roboto-cyrillic-700-normal.woff +0 -0
- package/dist/files/roboto-cyrillic-700-normal.woff2 +0 -0
- package/dist/files/roboto-cyrillic-ext-300-normal.woff +0 -0
- package/dist/files/roboto-cyrillic-ext-300-normal.woff2 +0 -0
- package/dist/files/roboto-cyrillic-ext-400-normal.woff +0 -0
- package/dist/files/roboto-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/files/roboto-cyrillic-ext-500-normal.woff +0 -0
- package/dist/files/roboto-cyrillic-ext-500-normal.woff2 +0 -0
- package/dist/files/roboto-cyrillic-ext-700-normal.woff +0 -0
- package/dist/files/roboto-cyrillic-ext-700-normal.woff2 +0 -0
- package/dist/files/roboto-greek-300-normal.woff +0 -0
- package/dist/files/roboto-greek-300-normal.woff2 +0 -0
- package/dist/files/roboto-greek-400-normal.woff +0 -0
- package/dist/files/roboto-greek-400-normal.woff2 +0 -0
- package/dist/files/roboto-greek-500-normal.woff +0 -0
- package/dist/files/roboto-greek-500-normal.woff2 +0 -0
- package/dist/files/roboto-greek-700-normal.woff +0 -0
- package/dist/files/roboto-greek-700-normal.woff2 +0 -0
- package/dist/files/roboto-greek-ext-300-normal.woff +0 -0
- package/dist/files/roboto-greek-ext-300-normal.woff2 +0 -0
- package/dist/files/roboto-greek-ext-400-normal.woff +0 -0
- package/dist/files/roboto-greek-ext-400-normal.woff2 +0 -0
- package/dist/files/roboto-greek-ext-500-normal.woff +0 -0
- package/dist/files/roboto-greek-ext-500-normal.woff2 +0 -0
- package/dist/files/roboto-greek-ext-700-normal.woff +0 -0
- package/dist/files/roboto-greek-ext-700-normal.woff2 +0 -0
- package/dist/files/roboto-latin-300-normal.woff +0 -0
- package/dist/files/roboto-latin-300-normal.woff2 +0 -0
- package/dist/files/roboto-latin-400-normal.woff +0 -0
- package/dist/files/roboto-latin-400-normal.woff2 +0 -0
- package/dist/files/roboto-latin-500-normal.woff +0 -0
- package/dist/files/roboto-latin-500-normal.woff2 +0 -0
- package/dist/files/roboto-latin-700-normal.woff +0 -0
- package/dist/files/roboto-latin-700-normal.woff2 +0 -0
- package/dist/files/roboto-latin-ext-300-normal.woff +0 -0
- package/dist/files/roboto-latin-ext-300-normal.woff2 +0 -0
- package/dist/files/roboto-latin-ext-400-normal.woff +0 -0
- package/dist/files/roboto-latin-ext-400-normal.woff2 +0 -0
- package/dist/files/roboto-latin-ext-500-normal.woff +0 -0
- package/dist/files/roboto-latin-ext-500-normal.woff2 +0 -0
- package/dist/files/roboto-latin-ext-700-normal.woff +0 -0
- package/dist/files/roboto-latin-ext-700-normal.woff2 +0 -0
- package/dist/files/roboto-vietnamese-300-normal.woff +0 -0
- package/dist/files/roboto-vietnamese-300-normal.woff2 +0 -0
- package/dist/files/roboto-vietnamese-400-normal.woff +0 -0
- package/dist/files/roboto-vietnamese-400-normal.woff2 +0 -0
- package/dist/files/roboto-vietnamese-500-normal.woff +0 -0
- package/dist/files/roboto-vietnamese-500-normal.woff2 +0 -0
- package/dist/files/roboto-vietnamese-700-normal.woff +0 -0
- package/dist/files/roboto-vietnamese-700-normal.woff2 +0 -0
- package/dist/i18n/ar.json +0 -1
- package/dist/i18n/de.json +0 -438
- package/dist/i18n/en-US.json +0 -1
- package/dist/i18n/en.json +0 -438
- package/dist/i18n/es-419.json +0 -1
- package/dist/i18n/es.json +0 -438
- package/dist/i18n/fa.json +0 -1
- package/dist/i18n/fi.json +0 -12
- package/dist/i18n/fr.json +0 -438
- package/dist/i18n/hi.json +0 -438
- package/dist/i18n/hr.json +0 -1
- package/dist/i18n/hu.json +0 -31
- package/dist/i18n/id.json +0 -438
- package/dist/i18n/it.json +0 -438
- package/dist/i18n/ja.json +0 -438
- package/dist/i18n/ky.json +0 -6
- package/dist/i18n/nl.json +0 -438
- package/dist/i18n/pl.json +0 -438
- package/dist/i18n/pt-PT.json +0 -1
- package/dist/i18n/pt.json +0 -438
- package/dist/i18n/pt_BR.json +0 -438
- package/dist/i18n/ro.json +0 -9
- package/dist/i18n/ru.json +0 -438
- package/dist/i18n/th.json +0 -438
- package/dist/i18n/tr.json +0 -438
- package/dist/i18n/uk.json +0 -186
- package/dist/i18n/vi.json +0 -396
- package/dist/i18n/zh_Hans.json +0 -412
- package/dist/index.html +0 -25
- package/dist/notification.mp3 +0 -0
- package/dist/package/PKGBUILD +0 -45
- package/dist/plugins/help/js/i18n/keynav/de.js +0 -90
- package/dist/plugins/help/js/i18n/keynav/en.js +0 -90
- package/dist/plugins/help/js/i18n/keynav/es.js +0 -90
- package/dist/plugins/help/js/i18n/keynav/fr_FR.js +0 -90
- package/dist/plugins/help/js/i18n/keynav/hi.js +0 -90
- package/dist/plugins/help/js/i18n/keynav/it.js +0 -90
- package/dist/plugins/help/js/i18n/keynav/ja.js +0 -90
- package/dist/plugins/help/js/i18n/keynav/nl.js +0 -90
- package/dist/plugins/help/js/i18n/keynav/pl.js +0 -90
- package/dist/plugins/help/js/i18n/keynav/pt_BR.js +0 -90
- package/dist/plugins/help/js/i18n/keynav/ro.js +0 -90
- package/dist/plugins/help/js/i18n/keynav/ru.js +0 -90
- package/dist/plugins/help/js/i18n/keynav/th_TH.js +0 -90
- package/dist/plugins/help/js/i18n/keynav/tr.js +0 -90
- package/dist/plugins/help/js/i18n/keynav/vi.js +0 -90
- package/dist/skins/content/dark/content.css +0 -59
- package/dist/skins/content/dark/content.min.css +0 -8
- package/dist/skins/content/default/content.css +0 -49
- package/dist/skins/content/default/content.min.css +0 -8
- package/dist/skins/content/document/content.css +0 -53
- package/dist/skins/content/document/content.min.css +0 -8
- package/dist/skins/content/writer/content.css +0 -50
- package/dist/skins/content/writer/content.min.css +0 -8
- package/dist/skins/ui/oxide/content.css +0 -615
- package/dist/skins/ui/oxide/content.inline.css +0 -608
- package/dist/skins/ui/oxide/content.inline.min.css +0 -8
- package/dist/skins/ui/oxide/content.min.css +0 -8
- package/dist/skins/ui/oxide/content.mobile.css +0 -29
- package/dist/skins/ui/oxide/content.mobile.min.css +0 -8
- package/dist/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
- package/dist/skins/ui/oxide/skin.css +0 -2884
- package/dist/skins/ui/oxide/skin.min.css +0 -8
- package/dist/skins/ui/oxide/skin.mobile.css +0 -673
- package/dist/skins/ui/oxide/skin.mobile.min.css +0 -8
- package/dist/skins/ui/oxide-dark/content.css +0 -596
- package/dist/skins/ui/oxide-dark/content.inline.css +0 -608
- package/dist/skins/ui/oxide-dark/content.inline.min.css +0 -8
- package/dist/skins/ui/oxide-dark/content.min.css +0 -8
- package/dist/skins/ui/oxide-dark/content.mobile.css +0 -29
- package/dist/skins/ui/oxide-dark/content.mobile.min.css +0 -8
- package/dist/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
- package/dist/skins/ui/oxide-dark/skin.css +0 -2884
- package/dist/skins/ui/oxide-dark/skin.min.css +0 -8
- package/dist/skins/ui/oxide-dark/skin.mobile.css +0 -673
- package/dist/skins/ui/oxide-dark/skin.mobile.min.css +0 -8
- package/dist/src_boot_bootstrapper_tsx-node_modules_moment_locale_sync_recursive_.css +0 -21
- package/dist/src_boot_bootstrapper_tsx-node_modules_moment_locale_sync_recursive_.css.map +0 -1
- package/dist/src_boot_bootstrapper_tsx-node_modules_moment_locale_sync_recursive_.d07f086d.chunk.js +0 -13399
- package/dist/src_boot_bootstrapper_tsx-node_modules_moment_locale_sync_recursive_.d07f086d.chunk.js.map +0 -1
- package/dist/src_workers_folder_ts.2df69eae.chunk.js +0 -537
- package/dist/src_workers_folder_ts.2df69eae.chunk.js.map +0 -1
- package/dist/src_workers_tag_ts.59a752d7.chunk.js +0 -113
- package/dist/src_workers_tag_ts.59a752d7.chunk.js.map +0 -1
- package/dist/style.a7eb9e6c.css +0 -389
- package/dist/style.a7eb9e6c.css.map +0 -1
- package/dist/tinymce/langs/de.js +0 -1
- package/dist/tinymce/langs/es.js +0 -1
- package/dist/tinymce/langs/fr_FR.js +0 -1
- package/dist/tinymce/langs/hi.js +0 -1
- package/dist/tinymce/langs/it.js +0 -1
- package/dist/tinymce/langs/ja.js +0 -1
- package/dist/tinymce/langs/nl.js +0 -1
- package/dist/tinymce/langs/pl.js +0 -1
- package/dist/tinymce/langs/pt_BR.js +0 -1
- package/dist/tinymce/langs/ro.js +0 -1
- package/dist/tinymce/langs/ru.js +0 -1
- package/dist/tinymce/langs/th_TH.js +0 -1
- package/dist/tinymce/langs/tr.js +0 -1
- package/dist/tinymce/langs/vi.js +0 -1
- package/dist/tinymce/langs/zh-Hans.js +0 -1
- package/dist/vendors-node_modules_date-fns__lib_isSameUTCWeek_index_js-node_modules_date-fns_locale__lib_b-41ea83.3e405109.chunk.js +0 -412
- package/dist/vendors-node_modules_date-fns__lib_isSameUTCWeek_index_js-node_modules_date-fns_locale__lib_b-41ea83.3e405109.chunk.js.map +0 -1
- package/dist/vendors-node_modules_date-fns_locale_de_index_js.42fc0cb6.chunk.js +0 -787
- package/dist/vendors-node_modules_date-fns_locale_de_index_js.42fc0cb6.chunk.js.map +0 -1
- package/dist/vendors-node_modules_date-fns_locale_en-US_index_js.1575ad91.chunk.js +0 -693
- package/dist/vendors-node_modules_date-fns_locale_en-US_index_js.1575ad91.chunk.js.map +0 -1
- package/dist/vendors-node_modules_date-fns_locale_es_index_js.a054d7dc.chunk.js +0 -685
- package/dist/vendors-node_modules_date-fns_locale_es_index_js.a054d7dc.chunk.js.map +0 -1
- package/dist/vendors-node_modules_date-fns_locale_fr_index_js.20eefc5f.chunk.js +0 -644
- package/dist/vendors-node_modules_date-fns_locale_fr_index_js.20eefc5f.chunk.js.map +0 -1
- package/dist/vendors-node_modules_date-fns_locale_hi_index_js.016d9c1b.chunk.js +0 -741
- package/dist/vendors-node_modules_date-fns_locale_hi_index_js.016d9c1b.chunk.js.map +0 -1
- package/dist/vendors-node_modules_date-fns_locale_it_index_js.b1509e74.chunk.js +0 -531
- package/dist/vendors-node_modules_date-fns_locale_it_index_js.b1509e74.chunk.js.map +0 -1
- package/dist/vendors-node_modules_date-fns_locale_ja_index_js.7ee709ea.chunk.js +0 -703
- package/dist/vendors-node_modules_date-fns_locale_ja_index_js.7ee709ea.chunk.js.map +0 -1
- package/dist/vendors-node_modules_date-fns_locale_nl_index_js.03ea6284.chunk.js +0 -638
- package/dist/vendors-node_modules_date-fns_locale_nl_index_js.03ea6284.chunk.js.map +0 -1
- package/dist/vendors-node_modules_date-fns_locale_pl_index_js.b1a781fa.chunk.js +0 -623
- package/dist/vendors-node_modules_date-fns_locale_pl_index_js.b1a781fa.chunk.js.map +0 -1
- package/dist/vendors-node_modules_date-fns_locale_pt-BR_index_js.695bc207.chunk.js +0 -682
- package/dist/vendors-node_modules_date-fns_locale_pt-BR_index_js.695bc207.chunk.js.map +0 -1
- package/dist/vendors-node_modules_date-fns_locale_pt_index_js.09460edb.chunk.js +0 -678
- package/dist/vendors-node_modules_date-fns_locale_pt_index_js.09460edb.chunk.js.map +0 -1
- package/dist/vendors-node_modules_date-fns_locale_ro_index_js.53425395.chunk.js +0 -670
- package/dist/vendors-node_modules_date-fns_locale_ro_index_js.53425395.chunk.js.map +0 -1
- package/dist/vendors-node_modules_date-fns_locale_ru_index_js.ab8b44d9.chunk.js +0 -707
- package/dist/vendors-node_modules_date-fns_locale_ru_index_js.ab8b44d9.chunk.js.map +0 -1
- package/dist/vendors-node_modules_date-fns_locale_th_index_js.9f2448ee.chunk.js +0 -672
- package/dist/vendors-node_modules_date-fns_locale_th_index_js.9f2448ee.chunk.js.map +0 -1
- package/dist/vendors-node_modules_date-fns_locale_tr_index_js.c47c86fa.chunk.js +0 -677
- package/dist/vendors-node_modules_date-fns_locale_tr_index_js.c47c86fa.chunk.js.map +0 -1
- package/dist/vendors-node_modules_date-fns_locale_vi_index_js.d02adf1c.chunk.js +0 -765
- package/dist/vendors-node_modules_date-fns_locale_vi_index_js.d02adf1c.chunk.js.map +0 -1
- package/dist/vendors-node_modules_date-fns_locale_zh-CN_index_js.505f5507.chunk.js +0 -521
- package/dist/vendors-node_modules_date-fns_locale_zh-CN_index_js.505f5507.chunk.js.map +0 -1
- package/dist/vendors-node_modules_lodash_lodash_js-node_modules_core-js_modules_es_array_push_js.8ced7511.chunk.js +0 -19112
- package/dist/vendors-node_modules_lodash_lodash_js-node_modules_core-js_modules_es_array_push_js.8ced7511.chunk.js.map +0 -1
- package/dist/vendors-node_modules_tinymce_skins_ui_oxide_skin_min_css-node_modules_reduxjs_toolkit_dist_re-f60063.88e81e25.chunk.js +0 -219343
- package/dist/vendors-node_modules_tinymce_skins_ui_oxide_skin_min_css-node_modules_reduxjs_toolkit_dist_re-f60063.88e81e25.chunk.js.map +0 -1
- package/dist/vendors-node_modules_tinymce_skins_ui_oxide_skin_min_css-node_modules_reduxjs_toolkit_dist_re-f60063.css +0 -4104
- package/dist/vendors-node_modules_tinymce_skins_ui_oxide_skin_min_css-node_modules_reduxjs_toolkit_dist_re-f60063.css.map +0 -1
- package/dist/yap.json +0 -11
- package/dist/zapp-shell.bundle.js +0 -30430
- package/dist/zapp-shell.bundle.js.map +0 -1
- package/types/account/index.d.ts +0 -179
- package/types/apps/index.d.ts +0 -198
- package/types/boards/index.d.ts +0 -31
- package/types/exports/index.d.ts +0 -256
- package/types/folder/index.d.ts +0 -33
- package/types/i18n/index.d.ts +0 -19
- package/types/index.d.ts +0 -20
- package/types/integrations/index.d.ts +0 -41
- package/types/loginConfig/index.d.ts +0 -17
- package/types/misc/index.d.ts +0 -309
- package/types/network/entities.d.ts +0 -106
- package/types/network/index.d.ts +0 -239
- package/types/network/soap.d.ts +0 -106
- package/types/notification/index.d.ts +0 -31
- package/types/search/index.d.ts +0 -18
- package/types/search/items.d.ts +0 -13
- package/types/settings/index.d.ts +0 -10
- package/types/styled-components.d.ts +0 -18
- package/types/tags/index.d.ts +0 -21
- package/types/theme/index.d.ts +0 -9
- package/types/workers/index.d.ts +0 -24
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* SPDX-FileCopyrightText: 2022 Zextras <https://www.zextras.com>
|
|
4
|
+
*
|
|
5
|
+
* SPDX-License-Identifier: AGPL-3.0-only
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.useFolderStore = void 0;
|
|
9
|
+
const zustand_1 = require("zustand");
|
|
10
|
+
const workers_1 = require("../../workers");
|
|
11
|
+
// extra currying as suggested in https://github.com/pmndrs/zustand/blob/main/docs/guides/typescript.md#basic-usage
|
|
12
|
+
exports.useFolderStore = (0, zustand_1.create)()(() => ({
|
|
13
|
+
folders: {},
|
|
14
|
+
roots: {},
|
|
15
|
+
searches: {}
|
|
16
|
+
}));
|
|
17
|
+
workers_1.folderWorker.onmessage = ({ data }) => {
|
|
18
|
+
exports.useFolderStore.setState(data);
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../../src/store/folder/store.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,qCAAiC;AAGjC,2CAA6C;AAE7C,mHAAmH;AACtG,QAAA,cAAc,GAAG,IAAA,gBAAM,GAAe,CAAC,GAAG,EAAE,CAAC,CAAC;IAC1D,OAAO,EAAE,EAAE;IACX,KAAK,EAAE,EAAE;IACT,QAAQ,EAAE,EAAE;CACZ,CAAC,CAAC,CAAC;AAEJ,sBAAY,CAAC,SAAS,GAAG,CAAC,EAAE,IAAI,EAAE,EAAQ,EAAE;IAC3C,sBAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Folder } from '../../types/folder';
|
|
2
|
+
import type { FolderView, TreeNode } from '../../types/misc';
|
|
3
|
+
export declare const sortFolders: (f: Folder) => string;
|
|
4
|
+
export declare const isTrash: (f: Folder) => boolean;
|
|
5
|
+
export declare const isRoot: (f: Folder) => boolean;
|
|
6
|
+
export declare const folderViewFilter: (v: FolderView) => (deep?: boolean) => (f: Folder) => boolean;
|
|
7
|
+
export declare const filterNodes: <T>(children: TreeNode<T>[], f: (deep?: boolean) => (i: TreeNode<T>) => boolean, sortFunction?: ((i: TreeNode<T>) => number | string) | undefined, deep?: boolean) => TreeNode<T>[];
|
|
8
|
+
type MapNodesOptions<T, U> = {
|
|
9
|
+
mapFunction: (i: TreeNode<T>) => U;
|
|
10
|
+
filterFunction: (deep?: boolean) => (i: TreeNode<T>) => boolean;
|
|
11
|
+
recursionKey: keyof U;
|
|
12
|
+
sortFunction: (i: TreeNode<T>) => number | string;
|
|
13
|
+
deep: boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare const mapNodes: <T, U>(children: TreeNode<T>[], { mapFunction, filterFunction, recursionKey, sortFunction, deep }: MapNodesOptions<T, U>) => U[];
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mapNodes = exports.filterNodes = exports.folderViewFilter = exports.isRoot = exports.isTrash = exports.sortFolders = void 0;
|
|
4
|
+
/*
|
|
5
|
+
* SPDX-FileCopyrightText: 2022 Zextras <https://www.zextras.com>
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: AGPL-3.0-only
|
|
8
|
+
*/
|
|
9
|
+
const lodash_1 = require("lodash");
|
|
10
|
+
const constants_1 = require("../../constants");
|
|
11
|
+
const hasId = (f, id) => f.id.split(':').includes(id);
|
|
12
|
+
const getOriginalId = (f) => {
|
|
13
|
+
const parts = f.id.split(':');
|
|
14
|
+
return parts[1] ?? parts[0];
|
|
15
|
+
};
|
|
16
|
+
const sortFolders = (f) => {
|
|
17
|
+
const id = getOriginalId(f);
|
|
18
|
+
if (id === constants_1.FOLDERS.TRASH) {
|
|
19
|
+
return constants_1.FOLDERS.LAST_SYSTEM_FOLDER_POSITION;
|
|
20
|
+
}
|
|
21
|
+
return parseInt(id, 10) < 17 ? ` ${id}` : f.name.toLowerCase();
|
|
22
|
+
};
|
|
23
|
+
exports.sortFolders = sortFolders;
|
|
24
|
+
const isTrash = (f) => hasId(f, constants_1.FOLDERS.TRASH);
|
|
25
|
+
exports.isTrash = isTrash;
|
|
26
|
+
const isRoot = (f) => f.id === constants_1.FOLDERS.USER_ROOT || f.oname === constants_1.ROOT_NAME;
|
|
27
|
+
exports.isRoot = isRoot;
|
|
28
|
+
const folderViewFilter = (v) => (deep) => (f) => f.view === v || !deep || (typeof f.view === 'undefined' && !(0, exports.isRoot)(f));
|
|
29
|
+
exports.folderViewFilter = folderViewFilter;
|
|
30
|
+
const filterNodes = (children, f, sortFunction, deep) => {
|
|
31
|
+
const childrenSorted = sortFunction ? (0, lodash_1.sortBy)(children, sortFunction) : children;
|
|
32
|
+
return childrenSorted
|
|
33
|
+
.filter(f(deep))
|
|
34
|
+
.map((i) => ({ ...i, children: (0, exports.filterNodes)(i.children, f, sortFunction, true) }));
|
|
35
|
+
};
|
|
36
|
+
exports.filterNodes = filterNodes;
|
|
37
|
+
const mapNodes = (children, { mapFunction, filterFunction, recursionKey, sortFunction, deep }) => (0, lodash_1.sortBy)(children, sortFunction).reduce((acc, folder) => {
|
|
38
|
+
if (filterFunction(deep)(folder)) {
|
|
39
|
+
acc.push({
|
|
40
|
+
...mapFunction(folder),
|
|
41
|
+
[recursionKey]: (0, exports.mapNodes)(folder.children, {
|
|
42
|
+
mapFunction,
|
|
43
|
+
filterFunction,
|
|
44
|
+
recursionKey,
|
|
45
|
+
sortFunction,
|
|
46
|
+
deep: true
|
|
47
|
+
})
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return acc;
|
|
51
|
+
}, []);
|
|
52
|
+
exports.mapNodes = mapNodes;
|
|
53
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/store/folder/utils.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,mCAAgC;AAEhC,+CAAqD;AAIrD,MAAM,KAAK,GAAG,CAAC,CAA6B,EAAE,EAAU,EAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AACnG,MAAM,aAAa,GAAG,CAAC,CAAS,EAAU,EAAE;IAC3C,MAAM,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9B,OAAO,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;AAC7B,CAAC,CAAC;AACK,MAAM,WAAW,GAAG,CAAC,CAAS,EAAU,EAAE;IAChD,MAAM,EAAE,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;IAC5B,IAAI,EAAE,KAAK,mBAAO,CAAC,KAAK,EAAE,CAAC;QAC1B,OAAO,mBAAO,CAAC,2BAA2B,CAAC;IAC5C,CAAC;IACD,OAAO,QAAQ,CAAC,EAAE,EAAE,EAAE,CAA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jG,CAAC,CAAC;AAVW,QAAA,WAAW,eAUtB;AASK,MAAM,QAAQ,GAAG,CACvB,QAAuB,EACvB,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,IAAI,EAAyB,EAClF,EAAE,CACR,IAAA,eAAM,EAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE;IACrD,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;QAClC,GAAG,CAAC,IAAI,CAAC;YACR,GAAG,WAAW,CAAC,MAAM,CAAC;YACtB,CAAC,YAAY,CAAC,EAAE,IAAA,gBAAQ,EAAiB,MAAM,CAAC,QAAQ,EAAE;gBACzD,WAAW;gBACX,cAAc;gBACd,YAAY;gBACZ,YAAY;gBACZ,IAAI,EAAE,IAAI;aACV,CAAC;SACF,CAAC,CAAC;IACJ,CAAC;IACD,OAAO,GAAG,CAAC;AACZ,CAAC,EAAE,EAAS,CAAC,CAAC;AAlBF,QAAA,QAAQ,YAkBN"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getT = exports.getTFunction = exports.getI18n = void 0;
|
|
4
|
+
const store_1 = require("./store");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
const getI18n = (app) => () => {
|
|
7
|
+
const { instances, defaultI18n } = store_1.useI18nStore.getState();
|
|
8
|
+
return instances[app] ?? instances[constants_1.SHELL_APP_ID] ?? defaultI18n;
|
|
9
|
+
};
|
|
10
|
+
exports.getI18n = getI18n;
|
|
11
|
+
const getTFunction = (app) => {
|
|
12
|
+
const { instances, defaultI18n } = store_1.useI18nStore.getState();
|
|
13
|
+
return instances[app]?.t ?? defaultI18n.t;
|
|
14
|
+
};
|
|
15
|
+
exports.getTFunction = getTFunction;
|
|
16
|
+
const getT = () => {
|
|
17
|
+
const { instances, defaultI18n } = store_1.useI18nStore.getState();
|
|
18
|
+
return instances[constants_1.SHELL_APP_ID]?.t ?? defaultI18n.t;
|
|
19
|
+
};
|
|
20
|
+
exports.getT = getT;
|
|
21
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/store/i18n/hooks.ts"],"names":[],"mappings":";;;AAOA,mCAAuC;AACvC,+CAA+C;AAExC,MAAM,OAAO,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAS,EAAE;IAClD,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,oBAAY,CAAC,QAAQ,EAAE,CAAC;IAC3D,OAAO,SAAS,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,wBAAY,CAAC,IAAI,WAAW,CAAC;AACjE,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB;AAEK,MAAM,YAAY,GAAG,CAAC,GAAW,EAAa,EAAE;IACtD,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,oBAAY,CAAC,QAAQ,EAAE,CAAC;IAC3D,OAAO,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC;AAC3C,CAAC,CAAC;AAHW,QAAA,YAAY,gBAGvB;AAEK,MAAM,IAAI,GAAG,GAAc,EAAE;IACnC,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,oBAAY,CAAC,QAAQ,EAAE,CAAC;IAC3D,OAAO,SAAS,CAAC,wBAAY,CAAC,EAAE,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC;AACpD,CAAC,CAAC;AAHW,QAAA,IAAI,QAGf"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { i18n } from 'i18next';
|
|
2
|
+
import type { CarbonioModule } from '../../types/apps';
|
|
3
|
+
export type I18nState = {
|
|
4
|
+
instances: Record<string, i18n>;
|
|
5
|
+
defaultI18n: i18n;
|
|
6
|
+
locale: string;
|
|
7
|
+
};
|
|
8
|
+
type I18nActions = {
|
|
9
|
+
setLocale: (locale: string) => void;
|
|
10
|
+
addI18n: (apps: Array<CarbonioModule>, locale: string) => void;
|
|
11
|
+
};
|
|
12
|
+
export declare const useI18nStore: import("zustand").UseBoundStore<import("zustand").StoreApi<I18nState & I18nActions>>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* SPDX-FileCopyrightText: 2021 Zextras <https://www.zextras.com>
|
|
4
|
+
*
|
|
5
|
+
* SPDX-License-Identifier: AGPL-3.0-only
|
|
6
|
+
*/
|
|
7
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
|
+
};
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.useI18nStore = void 0;
|
|
12
|
+
const i18next_1 = __importDefault(require("i18next"));
|
|
13
|
+
const i18next_http_backend_1 = __importDefault(require("i18next-http-backend"));
|
|
14
|
+
const immer_1 = require("immer");
|
|
15
|
+
const lodash_1 = require("lodash");
|
|
16
|
+
const react_i18next_1 = require("react-i18next");
|
|
17
|
+
const zustand_1 = require("zustand");
|
|
18
|
+
const constants_1 = require("../../constants");
|
|
19
|
+
const account_1 = require("../account");
|
|
20
|
+
const addShell = (apps) => [
|
|
21
|
+
...apps,
|
|
22
|
+
{
|
|
23
|
+
commit: '',
|
|
24
|
+
description: '',
|
|
25
|
+
js_entrypoint: '',
|
|
26
|
+
name: constants_1.SHELL_APP_ID,
|
|
27
|
+
priority: -1,
|
|
28
|
+
version: '',
|
|
29
|
+
type: 'shell',
|
|
30
|
+
attrKey: '',
|
|
31
|
+
icon: '',
|
|
32
|
+
display: 'Shell'
|
|
33
|
+
}
|
|
34
|
+
];
|
|
35
|
+
const { settings } = account_1.useAccountStore.getState();
|
|
36
|
+
const defaultLng = settings?.prefs?.zimbraPrefLocale ??
|
|
37
|
+
settings?.attrs?.zimbraLocale ??
|
|
38
|
+
'en';
|
|
39
|
+
const defaultI18n = i18next_1.default.createInstance({ lng: defaultLng });
|
|
40
|
+
const defaultI18nInitOptions = {
|
|
41
|
+
returnEmptyString: true,
|
|
42
|
+
returnNull: false,
|
|
43
|
+
compatibilityJSON: 'v4',
|
|
44
|
+
lng: defaultLng,
|
|
45
|
+
fallbackLng: 'en',
|
|
46
|
+
debug: false,
|
|
47
|
+
interpolation: {
|
|
48
|
+
escapeValue: false // not needed for react as it escapes by default
|
|
49
|
+
},
|
|
50
|
+
missingKeyHandler: (_, __, key) => {
|
|
51
|
+
// eslint-disable-next-line no-console
|
|
52
|
+
console.warn(`Missing translation with key '${key}'`);
|
|
53
|
+
},
|
|
54
|
+
backend: {
|
|
55
|
+
loadPath: `${BASE_PATH}/i18n/{{lng}}.json`
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
exports.useI18nStore = (0, zustand_1.create)()((set) => ({
|
|
59
|
+
instances: {},
|
|
60
|
+
defaultI18n,
|
|
61
|
+
locale: 'en',
|
|
62
|
+
setLocale: (locale) => {
|
|
63
|
+
set((0, immer_1.produce)((state) => {
|
|
64
|
+
state.locale = locale;
|
|
65
|
+
(0, lodash_1.forEach)(state.instances, (i18nInst) => i18nInst.changeLanguage(locale));
|
|
66
|
+
}));
|
|
67
|
+
},
|
|
68
|
+
addI18n: (apps, locale) => {
|
|
69
|
+
const appsWithShell = addShell(apps);
|
|
70
|
+
set((0, immer_1.produce)((state) => {
|
|
71
|
+
state.instances = (0, lodash_1.reduce)(appsWithShell, (acc, app) => {
|
|
72
|
+
const newI18n = i18next_1.default.createInstance();
|
|
73
|
+
newI18n
|
|
74
|
+
// load translation using http -> see /public/locales (i.e. https://github.com/i18next/react-i18next/tree/master/example/react/public/locales)
|
|
75
|
+
// learn more: https://github.com/i18next/i18next-http-backend
|
|
76
|
+
.use(i18next_http_backend_1.default)
|
|
77
|
+
// init i18next
|
|
78
|
+
// for all options read: https://www.i18next.com/overview/configuration-options
|
|
79
|
+
.init({
|
|
80
|
+
...defaultI18nInitOptions,
|
|
81
|
+
lng: locale,
|
|
82
|
+
backend: {
|
|
83
|
+
loadPath: app.name === constants_1.SHELL_APP_ID
|
|
84
|
+
? `${BASE_PATH}/i18n/{{lng}}.json`
|
|
85
|
+
: `${(0, lodash_1.dropRight)(app.js_entrypoint.split('/')).join('/')}/i18n/{{lng}}.json`
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
// eslint-disable-next-line no-param-reassign
|
|
89
|
+
acc[app.name] = newI18n;
|
|
90
|
+
return acc;
|
|
91
|
+
}, {});
|
|
92
|
+
state.defaultI18n.t = state.instances[constants_1.SHELL_APP_ID].t;
|
|
93
|
+
state.locale = locale;
|
|
94
|
+
}));
|
|
95
|
+
}
|
|
96
|
+
}));
|
|
97
|
+
defaultI18n
|
|
98
|
+
.use(i18next_http_backend_1.default)
|
|
99
|
+
// pass the i18n instance to react-i18next.
|
|
100
|
+
.use(react_i18next_1.initReactI18next)
|
|
101
|
+
// init i18next
|
|
102
|
+
// for all options read: https://www.i18next.com/overview/configuration-options
|
|
103
|
+
.init(defaultI18nInitOptions);
|
|
104
|
+
//# sourceMappingURL=store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../../src/store/i18n/store.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AAGH,sDAA8B;AAC9B,gFAA2C;AAC3C,iCAAgC;AAChC,mCAAoD;AACpD,iDAAiD;AACjD,qCAAiC;AAEjC,+CAA+C;AAE/C,wCAA6C;AAa7C,MAAM,QAAQ,GAAG,CAAC,IAA2B,EAAyB,EAAE,CAAC;IACxE,GAAG,IAAI;IACP;QACC,MAAM,EAAE,EAAE;QACV,WAAW,EAAE,EAAE;QACf,aAAa,EAAE,EAAE;QACjB,IAAI,EAAE,wBA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AC,CAAC,CAAC;AAEJ,WAAW;KACT,GAAG,CAAC,8BAAO,CAAC;IACb,2CAA2C;KAC1C,GAAG,CAAC,gCAAgB,CAAC;IACtB,eAAe;IACf,+EAA+E;KAC9E,IAAI,CAAC,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { IAllProps as EditorProps } from '@tinymce/tinymce-react';
|
|
3
|
+
import type { TinyMCE } from 'tinymce/tinymce';
|
|
4
|
+
import 'tinymce/models/dom';
|
|
5
|
+
import 'tinymce/themes/silver';
|
|
6
|
+
import 'tinymce/icons/default';
|
|
7
|
+
import 'tinymce/skins/ui/oxide/skin.min.css';
|
|
8
|
+
import 'tinymce/plugins/advlist';
|
|
9
|
+
import 'tinymce/plugins/anchor';
|
|
10
|
+
import 'tinymce/plugins/autolink';
|
|
11
|
+
import 'tinymce/plugins/autoresize';
|
|
12
|
+
import 'tinymce/plugins/charmap';
|
|
13
|
+
import 'tinymce/plugins/code';
|
|
14
|
+
import 'tinymce/plugins/directionality';
|
|
15
|
+
import 'tinymce/plugins/fullscreen';
|
|
16
|
+
import 'tinymce/plugins/help';
|
|
17
|
+
import 'tinymce/plugins/image';
|
|
18
|
+
import 'tinymce/plugins/insertdatetime';
|
|
19
|
+
import 'tinymce/plugins/link';
|
|
20
|
+
import 'tinymce/plugins/lists';
|
|
21
|
+
import 'tinymce/plugins/media';
|
|
22
|
+
import 'tinymce/plugins/preview';
|
|
23
|
+
import 'tinymce/plugins/quickbars';
|
|
24
|
+
import 'tinymce/plugins/searchreplace';
|
|
25
|
+
import 'tinymce/plugins/table';
|
|
26
|
+
import 'tinymce/plugins/visualblocks';
|
|
27
|
+
import 'tinymce/plugins/wordcount';
|
|
28
|
+
type ComposerProps = EditorProps & {
|
|
29
|
+
/** The callback invoked when an edit is performed into the editor. `([text, html]) => {}` */
|
|
30
|
+
onEditorChange?: (values: [string, string]) => void;
|
|
31
|
+
/** Enable the distraction-free mode */
|
|
32
|
+
inline?: boolean;
|
|
33
|
+
/** The initial content of the editor */
|
|
34
|
+
initialValue?: EditorProps['initialValue'];
|
|
35
|
+
/** The content of the editor (controlled mode) */
|
|
36
|
+
value?: EditorProps['value'];
|
|
37
|
+
/**
|
|
38
|
+
* Callback called when user choose some file from the os.
|
|
39
|
+
* If defined, a menu item to add inline images is added to the composer.
|
|
40
|
+
*/
|
|
41
|
+
onFileSelect?: (arg: {
|
|
42
|
+
editor: TinyMCE;
|
|
43
|
+
files: HTMLInputElement['files'] | undefined;
|
|
44
|
+
}) => void;
|
|
45
|
+
customInitOptions?: Partial<EditorProps['init']>;
|
|
46
|
+
};
|
|
47
|
+
export declare const FileInput: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, {}, never>;
|
|
48
|
+
declare const Composer: FC<ComposerProps>;
|
|
49
|
+
export default Composer;
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.FileInput = void 0;
|
|
30
|
+
const react_1 = __importStar(require("react"));
|
|
31
|
+
const tinymce_react_1 = require("@tinymce/tinymce-react");
|
|
32
|
+
const carbonio_design_system_1 = require("@zextras/carbonio-design-system");
|
|
33
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
34
|
+
// TinyMCE so the global var exists
|
|
35
|
+
const tinymce_1 = __importDefault(require("tinymce/tinymce"));
|
|
36
|
+
require("tinymce/models/dom");
|
|
37
|
+
// Theme
|
|
38
|
+
require("tinymce/themes/silver");
|
|
39
|
+
// Toolbar icons
|
|
40
|
+
require("tinymce/icons/default");
|
|
41
|
+
// Editor styles
|
|
42
|
+
require("tinymce/skins/ui/oxide/skin.min.css");
|
|
43
|
+
// importing the plugin js.
|
|
44
|
+
require("tinymce/plugins/advlist");
|
|
45
|
+
require("tinymce/plugins/anchor");
|
|
46
|
+
require("tinymce/plugins/autolink");
|
|
47
|
+
require("tinymce/plugins/autoresize");
|
|
48
|
+
require("tinymce/plugins/charmap");
|
|
49
|
+
require("tinymce/plugins/code");
|
|
50
|
+
require("tinymce/plugins/directionality");
|
|
51
|
+
require("tinymce/plugins/fullscreen");
|
|
52
|
+
require("tinymce/plugins/help");
|
|
53
|
+
require("tinymce/plugins/image");
|
|
54
|
+
require("tinymce/plugins/insertdatetime");
|
|
55
|
+
require("tinymce/plugins/link");
|
|
56
|
+
require("tinymce/plugins/lists");
|
|
57
|
+
require("tinymce/plugins/media");
|
|
58
|
+
require("tinymce/plugins/preview");
|
|
59
|
+
require("tinymce/plugins/quickbars");
|
|
60
|
+
require("tinymce/plugins/searchreplace");
|
|
61
|
+
require("tinymce/plugins/table");
|
|
62
|
+
require("tinymce/plugins/visualblocks");
|
|
63
|
+
require("tinymce/plugins/wordcount");
|
|
64
|
+
const locales_1 = require("../../constants/locales");
|
|
65
|
+
const account_1 = require("../account");
|
|
66
|
+
const hooks_1 = require("../i18n/hooks");
|
|
67
|
+
const store_1 = require("../i18n/store");
|
|
68
|
+
exports.FileInput = styled_components_1.default.input `
|
|
69
|
+
display: none;
|
|
70
|
+
`;
|
|
71
|
+
const Composer = ({ onEditorChange, onFileSelect, inline = false, value, initialValue, customInitOptions, ...rest }) => {
|
|
72
|
+
const _onEditorChange = (0, react_1.useCallback)((newContent, editor) => {
|
|
73
|
+
onEditorChange?.([
|
|
74
|
+
editor.getContent({ format: 'text' }),
|
|
75
|
+
editor.getContent({ format: 'html' })
|
|
76
|
+
]);
|
|
77
|
+
}, [onEditorChange]);
|
|
78
|
+
const { prefs } = (0, account_1.useUserSettings)();
|
|
79
|
+
const defaultStyle = (0, react_1.useMemo)(() => ({
|
|
80
|
+
font: prefs?.zimbraPrefHtmlEditorDefaultFontFamily,
|
|
81
|
+
fontSize: prefs?.zimbraPrefHtmlEditorDefaultFontSize,
|
|
82
|
+
color: prefs?.zimbraPrefHtmlEditorDefaultFontColor
|
|
83
|
+
}), [prefs]);
|
|
84
|
+
const inputRef = (0, react_1.useRef)(null);
|
|
85
|
+
const onFileClick = (0, react_1.useCallback)(() => {
|
|
86
|
+
if (inputRef.current) {
|
|
87
|
+
inputRef.current.value = '';
|
|
88
|
+
inputRef.current.click();
|
|
89
|
+
}
|
|
90
|
+
}, []);
|
|
91
|
+
const t = (0, hooks_1.getT)();
|
|
92
|
+
const { locale } = store_1.useI18nStore.getState();
|
|
93
|
+
const language = (0, react_1.useMemo)(() => {
|
|
94
|
+
const localeObj = locale in locales_1.SUPPORTED_LOCALES && locales_1.SUPPORTED_LOCALES[locale];
|
|
95
|
+
return ((localeObj &&
|
|
96
|
+
(('tinymceLocale' in localeObj && localeObj?.tinymceLocale) || localeObj?.value)) ||
|
|
97
|
+
locale);
|
|
98
|
+
}, [locale]);
|
|
99
|
+
const inlineLabel = (0, react_1.useMemo)(() => t('label.add_inline_image', 'Add inline image'), [t]);
|
|
100
|
+
const setupCallback = (0, react_1.useCallback)((editor) => {
|
|
101
|
+
if (onFileSelect)
|
|
102
|
+
editor.ui.registry.addMenuButton('imageSelector', {
|
|
103
|
+
icon: 'gallery',
|
|
104
|
+
tooltip: t('label.select_image', 'Select image'),
|
|
105
|
+
fetch: (callback) => {
|
|
106
|
+
const items = [
|
|
107
|
+
{
|
|
108
|
+
type: 'menuitem',
|
|
109
|
+
text: inlineLabel,
|
|
110
|
+
onAction: () => {
|
|
111
|
+
onFileClick();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
];
|
|
115
|
+
callback(items);
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}, [inlineLabel, onFileClick, onFileSelect, t]);
|
|
119
|
+
const editorInitConfig = (0, react_1.useMemo)(() => ({
|
|
120
|
+
content_css: `${BASE_PATH}/tinymce/skins/content/default/content.css`,
|
|
121
|
+
language_url: `${BASE_PATH}tinymce/langs/${language}.js`,
|
|
122
|
+
language,
|
|
123
|
+
setup: setupCallback,
|
|
124
|
+
min_height: 350,
|
|
125
|
+
auto_focus: true,
|
|
126
|
+
menubar: false,
|
|
127
|
+
statusbar: false,
|
|
128
|
+
branding: false,
|
|
129
|
+
resize: true,
|
|
130
|
+
inline,
|
|
131
|
+
font_size_formats: '8pt 9pt 10pt 11pt 12pt 13pt 14pt 16pt 18pt 24pt 30pt 36pt 48pt 60pt 72pt 96pt',
|
|
132
|
+
object_resizing: 'img',
|
|
133
|
+
style_formats: [
|
|
134
|
+
{
|
|
135
|
+
title: 'Headers',
|
|
136
|
+
items: [
|
|
137
|
+
{ title: 'h1', block: 'h1' },
|
|
138
|
+
{ title: 'h2', block: 'h2' },
|
|
139
|
+
{ title: 'h3', block: 'h3' },
|
|
140
|
+
{ title: 'h4', block: 'h4' },
|
|
141
|
+
{ title: 'h5', block: 'h5' },
|
|
142
|
+
{ title: 'h6', block: 'h6' }
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
title: 'Blocks',
|
|
147
|
+
items: [
|
|
148
|
+
{ title: 'p', block: 'p' },
|
|
149
|
+
{ title: 'div', block: 'div' },
|
|
150
|
+
{ title: 'pre', block: 'pre' }
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
title: 'Containers',
|
|
155
|
+
items: [
|
|
156
|
+
{ title: 'section', block: 'section', wrapper: true, merge_siblings: false },
|
|
157
|
+
{ title: 'article', block: 'article', wrapper: true, merge_siblings: false },
|
|
158
|
+
{ title: 'blockquote', block: 'blockquote', wrapper: true },
|
|
159
|
+
{ title: 'hgroup', block: 'hgroup', wrapper: true },
|
|
160
|
+
{ title: 'aside', block: 'aside', wrapper: true },
|
|
161
|
+
{ title: 'figure', block: 'figure', wrapper: true }
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
],
|
|
165
|
+
plugins: [
|
|
166
|
+
'advlist',
|
|
167
|
+
'autolink',
|
|
168
|
+
'lists',
|
|
169
|
+
'link',
|
|
170
|
+
'image',
|
|
171
|
+
'charmap',
|
|
172
|
+
'preview',
|
|
173
|
+
'anchor',
|
|
174
|
+
'searchreplace',
|
|
175
|
+
'code',
|
|
176
|
+
'fullscreen',
|
|
177
|
+
'insertdatetime',
|
|
178
|
+
'media',
|
|
179
|
+
'table',
|
|
180
|
+
'code',
|
|
181
|
+
'help',
|
|
182
|
+
'quickbars',
|
|
183
|
+
'directionality',
|
|
184
|
+
'autoresize',
|
|
185
|
+
'visualblocks'
|
|
186
|
+
],
|
|
187
|
+
toolbar: inline
|
|
188
|
+
? false
|
|
189
|
+
: [
|
|
190
|
+
'fontfamily fontsize styles visualblocks',
|
|
191
|
+
'bold italic underline strikethrough',
|
|
192
|
+
'removeformat code',
|
|
193
|
+
'alignleft aligncenter alignright alignjustify',
|
|
194
|
+
'forecolor backcolor',
|
|
195
|
+
'bullist numlist outdent indent',
|
|
196
|
+
'ltr rtl',
|
|
197
|
+
'link',
|
|
198
|
+
'insertfile image',
|
|
199
|
+
'imageSelector'
|
|
200
|
+
].join(' | '),
|
|
201
|
+
quickbars_insert_toolbar: inline ? 'bullist numlist' : '',
|
|
202
|
+
quickbars_selection_toolbar: inline
|
|
203
|
+
? 'bold italic underline | forecolor backcolor | removeformat | link'
|
|
204
|
+
: 'link',
|
|
205
|
+
contextmenu: '',
|
|
206
|
+
toolbar_mode: 'wrap',
|
|
207
|
+
content_style: `body { color: ${defaultStyle?.color}; font-size: ${defaultStyle?.fontSize}; font-family: ${defaultStyle?.font}; }`,
|
|
208
|
+
visualblocks_default_state: false,
|
|
209
|
+
end_container_on_empty_block: true,
|
|
210
|
+
relative_urls: false,
|
|
211
|
+
remove_script_host: false,
|
|
212
|
+
newline_behavior: 'default',
|
|
213
|
+
browser_spellcheck: true,
|
|
214
|
+
convert_unsafe_embeds: true,
|
|
215
|
+
...customInitOptions
|
|
216
|
+
}), [
|
|
217
|
+
language,
|
|
218
|
+
setupCallback,
|
|
219
|
+
inline,
|
|
220
|
+
defaultStyle?.color,
|
|
221
|
+
defaultStyle?.fontSize,
|
|
222
|
+
defaultStyle?.font,
|
|
223
|
+
customInitOptions
|
|
224
|
+
]);
|
|
225
|
+
const fileInputOnChange = (0, react_1.useCallback)(() => {
|
|
226
|
+
onFileSelect?.({ editor: tinymce_1.default, files: inputRef?.current?.files });
|
|
227
|
+
}, [onFileSelect]);
|
|
228
|
+
return (react_1.default.createElement(carbonio_design_system_1.Container, { height: "100%", crossAlignment: "baseline", mainAlignment: "flex-start", style: { overflowY: 'hidden' } },
|
|
229
|
+
react_1.default.createElement(exports.FileInput, { type: "file", ref: inputRef, accept: "image/*", onChange: fileInputOnChange, multiple: true }),
|
|
230
|
+
react_1.default.createElement(tinymce_react_1.Editor, { initialValue: initialValue, value: value, init: editorInitConfig, onEditorChange: _onEditorChange, ...rest })));
|
|
231
|
+
};
|
|
232
|
+
exports.default = Composer;
|
|
233
|
+
//# sourceMappingURL=composer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composer.js","sourceRoot":"","sources":["../../../src/store/integrations/composer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,+CAA4D;AAG5D,0DAAgD;AAChD,4EAA4D;AAC5D,0EAAuC;AAEvC,mCAAmC;AACnC,8DAAsC;AACtC,8BAA4B;AAC5B,QAAQ;AACR,iCAA+B;AAC/B,gBAAgB;AAChB,iCAA+B;AAC/B,gBAAgB;AAChB,+CAA6C;AAC7C,2BAA2B;AAC3B,mCAAiC;AACjC,kCAAgC;AAChC,oCAAkC;AAClC,sCAAoC;AACpC,mCAAiC;AACjC,gCAA8B;AAC9B,0CAAwC;AACxC,sCAAoC;AACpC,gCAA8B;AAC9B,iCAA+B;AAC/B,0CAAwC;AACxC,gCAA8B;AAC9B,iCAA+B;AAC/B,iCAA+B;AAC/B,mCAAiC;AACjC,qCAAmC;AACnC,yCAAuC;AACvC,iCAA+B;AAC/B,wCAAsC;AACtC,qCAAmC;AAEnC,qDAA4D;AAC5D,wCAA6C;AAC7C,yCAAqC;AACrC,yCAA6C;AAmBhC,QAAA,SAAS,GAAG,2BAAM,CAAC,KAAK,CAAA;;CAEpC,CAAC;AAEF,MAAM,QAAQ,GAAsB,CAAC,EACpC,cAAc,EACd,YAAY,EACZ,MAAM,GAAG,KAAK,EACd,KAAK,EACL,YAAY,EACZ,iBAAiB,EACjB,GAAG,IAAI,EACP,EAAE,EAAE;IACJ,MAAM,eAAe,GAAG,IAAA,mBAAW,EAClC,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE;QACtB,cAAc,EAAE,CAAC;YAChB,MAAM,CAAC,UA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,EAAE,CAAC,EAAE,MAAM,EAAE,iBAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;IACtE,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,OAAO,CACN,8BAAC,kCAAS,IACT,MAAM,EAAC,MAAM,EACb,cAAc,EAAC,UAAU,EACzB,aAAa,EAAC,YAAY,EAC1B,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE;QAE9B,8BAAC,iBAAS,IACT,IAAI,EAAC,MAAM,EACX,GAAG,EAAE,QAAQ,EACb,MAAM,EAAC,SAAS,EAChB,QAAQ,EAAE,iBAAiB,EAC3B,QAAQ,SACP;QAEF,8BAAC,sBAAM,IACN,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,gBAAgB,EACtB,cAAc,EAAE,eAAe,KAC3B,IAAI,GACP,CACS,CACZ,CAAC;AACH,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { Action, ActionFactory } from '../../types/integrations';
|
|
3
|
+
import type { AnyFunction } from '../../utils/typeUtils';
|
|
4
|
+
export declare const getIntegratedFunction: (id: string) => [AnyFunction, boolean];
|
|
5
|
+
export declare const getIntegratedComponent: (id: string) => [React.FunctionComponent<Record<string, unknown>>, boolean];
|
|
6
|
+
export declare const getActions: <T>(target: T, type: string) => Array<Action>;
|
|
7
|
+
export declare const getActionsFactory: (type: string) => <T>(target: T) => Array<Action>;
|
|
8
|
+
export declare const getAction: <T>(type: string, id: string, target?: T | undefined) => [Action | undefined, boolean];
|
|
9
|
+
export declare const getActionFactory: <T>(type: string, id: string) => [ActionFactory<T> | undefined, boolean];
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* SPDX-FileCopyrightText: 2021 Zextras <https://www.zextras.com>
|
|
4
|
+
*
|
|
5
|
+
* SPDX-License-Identifier: AGPL-3.0-only
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.getActionFactory = exports.getAction = exports.getActionsFactory = exports.getActions = exports.getIntegratedComponent = exports.getIntegratedFunction = void 0;
|
|
9
|
+
const store_1 = require("./store");
|
|
10
|
+
const utils_1 = require("./utils");
|
|
11
|
+
const getIntegratedFunction = (id) => {
|
|
12
|
+
const integration = store_1.useIntegrationsStore.getState().functions?.[id];
|
|
13
|
+
return integration ? [integration, true] : [() => undefined, false];
|
|
14
|
+
};
|
|
15
|
+
exports.getIntegratedFunction = getIntegratedFunction;
|
|
16
|
+
const getIntegratedComponent = (id) => {
|
|
17
|
+
const integration = store_1.useIntegrationsStore.getState().components?.[id];
|
|
18
|
+
return (0, utils_1.buildIntegrationComponent)(integration);
|
|
19
|
+
};
|
|
20
|
+
exports.getIntegratedComponent = getIntegratedComponent;
|
|
21
|
+
const getActions = (target, type) => {
|
|
22
|
+
const factories = store_1.useIntegrationsStore.getState().actions[type];
|
|
23
|
+
return (0, utils_1.buildIntegrationActions)(factories, target);
|
|
24
|
+
};
|
|
25
|
+
exports.getActions = getActions;
|
|
26
|
+
const getActionsFactory = (type) => {
|
|
27
|
+
const factories = store_1.useIntegrationsStore.getState().actions[type];
|
|
28
|
+
return (target) => (0, utils_1.buildIntegrationActions)(factories, target);
|
|
29
|
+
};
|
|
30
|
+
exports.getActionsFactory = getActionsFactory;
|
|
31
|
+
const getAction = (type, id, target) => {
|
|
32
|
+
const factory = store_1.useIntegrationsStore.getState().actions[type]?.[id];
|
|
33
|
+
return (0, utils_1.buildIntegrationAction)(factory, target);
|
|
34
|
+
};
|
|
35
|
+
exports.getAction = getAction;
|
|
36
|
+
const getActionFactory = (type, id) => {
|
|
37
|
+
const factory = store_1.useIntegrationsStore.getState().actions[type]?.[id];
|
|
38
|
+
return [factory, !!factory];
|
|
39
|
+
};
|
|
40
|
+
exports.getActionFactory = getActionFactory;
|
|
41
|
+
//# sourceMappingURL=getters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getters.js","sourceRoot":"","sources":["../../../src/store/integrations/getters.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAIH,mCAA+C;AAC/C,mCAIiB;AAIV,MAAM,qBAAqB,GAAG,CAAC,EAAU,EAA0B,EAAE;IAC3E,MAAM,WAAW,GAAG,4BAAoB,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;IACpE,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAS,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;AAC3E,CAAC,CAAC;AAHW,QAAA,qBAAqB,yBAGhC;AAEK,MAAM,sBAAsB,GAAG,CACrC,EAAU,EACoD,EAAE;IAChE,MAAM,WAAW,GAAG,4BAAoB,CAAC,QAAQ,EAAE,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC;IACrE,OAAO,IAAA,iCAAyB,EAAC,WAAW,CAAC,CAAC;AAC/C,CAAC,CAAC;AALW,QAAA,sBAAsB,0BAKjC;AAEK,MAAM,UAAU,GAAG,CAAK,MAAS,EAAE,IAAY,EAAiB,EAAE;IACxE,MAAM,SAAS,GAAG,4BAAoB,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,OAAO,IAAA,+BAAuB,EAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AACnD,CAAC,CAAC;AAHW,QAAA,UAAU,cAGrB;AAEK,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAqC,EAAE;IACpF,MAAM,SAAS,GAAG,4BAAoB,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,OAAO,CAAK,MAAS,EAAiB,EAAE,CAAC,IAAA,+BAAuB,EAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AACrF,CAAC,CAAC;AAHW,QAAA,iBAAiB,qBAG5B;AAEK,MAAM,SAAS,GAAG,CACxB,IAAY,EACZ,EAAU,EACV,MAAU,EACsB,EAAE;IAClC,MAAM,OAAO,GAAG,4BAAoB,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IACpE,OAAO,IAAA,8BAAsB,EAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAChD,CAAC,CAAC;AAPW,QAAA,SAAS,aAOpB;AAEK,MAAM,gBAAgB,GAAG,CAC/B,IAAY,EACZ,EAAU,EACgC,EAAE;IAC5C,MAAM,OAAO,GAAG,4BAAoB,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IACpE,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;AAC7B,CAAC,CAAC;AANW,QAAA,gBAAgB,oBAM3B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { Action, ActionFactory } from '../../types/integrations';
|
|
3
|
+
import type { AnyFunction } from '../../utils/typeUtils';
|
|
4
|
+
export declare const useIntegratedFunction: (id: string) => [AnyFunction, boolean];
|
|
5
|
+
export declare const useIntegratedComponent: (id: string) => [React.FunctionComponent<Record<string, unknown>>, boolean];
|
|
6
|
+
export declare const useActions: <T>(target: T, type: string) => Array<Action>;
|
|
7
|
+
export declare const useActionsFactory: (type: string) => <T>(target: T) => Array<Action>;
|
|
8
|
+
export declare const useAction: <T>(type: string, id: string, target?: T | undefined) => [Action | undefined, boolean];
|
|
9
|
+
export declare const useActionFactory: <T>(type: string, id: string) => [ActionFactory<T> | undefined, boolean];
|