@finsemble/finsemble-ui 6.4.0 → 6.6.0-beta.2
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/package.json +31 -28
- package/react/actions/smartDesktopDesignerActions.d.ts +6 -2
- package/react/actions/smartDesktopDesignerActions.js +2 -0
- package/react/actions/smartDesktopDesignerActions.js.map +1 -1
- package/react/assets/css/finsemble.css +0 -1
- package/react/assets/css/userPreferences.css +6 -0
- package/react/assets/icons/code-block.svg +15 -0
- package/react/componentTemplateGenerator.js +1 -1
- package/react/componentTemplateGenerator.js.map +1 -1
- package/react/components/FinsembleProvider.js.map +1 -1
- package/react/components/appCatalog/AppCatalogComponent.d.ts +1 -1
- package/react/components/appCatalog/components/Showcase/ImageCarousel.d.ts +3 -3
- package/react/components/appCatalog/components/Showcase/SupportNotes.d.ts +1 -1
- package/react/components/appCatalog/modules/FDC3.d.ts +1 -1
- package/react/components/appCatalog/modules/FDC3.js.map +1 -1
- package/react/components/appCatalog/stores/appStore.d.ts +2 -2
- package/react/components/appCatalog/stores/appStore.js.map +1 -1
- package/react/components/appCatalog/stores/storeActions.d.ts +1 -1
- package/react/components/common/Checkbox.js +1 -1
- package/react/components/common/Checkbox.js.map +1 -1
- package/react/components/common/DropZone.js +3 -1
- package/react/components/common/DropZone.js.map +1 -1
- package/react/components/common/FileInput.d.ts +2 -1
- package/react/components/common/FileInput.js +2 -2
- package/react/components/common/FileInput.js.map +1 -1
- package/react/components/common/FinsembleIcon.d.ts +1 -1
- package/react/components/common/FinsembleIcon.js +2 -0
- package/react/components/common/FinsembleIcon.js.map +1 -1
- package/react/components/common/FinsembleSelect.js +1 -1
- package/react/components/common/FinsembleSelect.js.map +1 -1
- package/react/components/common/ImagePreview.js +1 -1
- package/react/components/common/ImagePreview.js.map +1 -1
- package/react/components/common/Tooltip.js +3 -1
- package/react/components/common/Tooltip.js.map +1 -1
- package/react/components/common/css/application-edit-page.css +4 -1
- package/react/components/common/css/application-list.css +4 -0
- package/react/components/common/css/preload-edit-page.css +37 -0
- package/react/components/common/helpers.js +1 -0
- package/react/components/common/helpers.js.map +1 -1
- package/react/components/common/stories/FileInput.stories.d.ts +2 -1
- package/react/components/common/stories/FileInput.stories.js +6 -0
- package/react/components/common/stories/FileInput.stories.js.map +1 -1
- package/react/components/common/tests/Accordion.spec.js +1 -1
- package/react/components/common/tests/Accordion.spec.js.map +1 -1
- package/react/components/common/tests/FileInput.spec.js +8 -1
- package/react/components/common/tests/FileInput.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleSelect.spec.js +1 -1
- package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleToggle.spec.js +2 -2
- package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
- package/react/components/favorites/FavoriteMaker.js.map +1 -1
- package/react/components/favorites/FavoritesShell.spec.js +1 -1
- package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
- package/react/components/favorites/FavoritesShell.stories.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.spec.js +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
- package/react/components/icon/Icon.d.ts +4 -3
- package/react/components/icon/Icon.js +22 -12
- package/react/components/icon/Icon.js.map +1 -1
- package/react/components/legacyControls/FinsembleDnDContext.d.ts +2 -1
- package/react/components/legacyControls/FinsembleDnDContext.js +8 -6
- package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
- package/react/components/linker/LinkerMenu.js.map +1 -1
- package/react/components/linker/remoteRedux.d.ts +1 -1
- package/react/components/linker/remoteRedux.js.map +1 -1
- package/react/components/menu/MenuAutoResizer.js.map +1 -1
- package/react/components/menu/MenuPortal.js +20 -1
- package/react/components/menu/MenuPortal.js.map +1 -1
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
- package/react/components/notifications/components/shared/CheckButton.d.ts +1 -1
- package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.d.ts +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
- package/react/components/notifications/components/shared/OverflowMenu.d.ts +1 -1
- package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.d.ts +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.d.ts +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.d.ts +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.d.ts +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
- package/react/components/notifications/components/views/CardView.js.map +1 -1
- package/react/components/notifications/components/views/ListView.d.ts +1 -1
- package/react/components/notifications/components/views/ListView.js.map +1 -1
- package/react/components/notifications/components/views/NotificationDetailsView.d.ts +1 -1
- package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
- package/react/components/notifications/types.d.ts +1 -1
- package/react/components/notifications/types.js.map +1 -1
- package/react/components/notifications/utils.d.ts +1 -1
- package/react/components/notifications/utils.js.map +1 -1
- package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
- package/react/components/processMonitor/ProcessMonitorTypes.d.ts +4 -11
- package/react/components/processMonitor/ProcessMonitorTypes.js.map +1 -1
- package/react/components/processMonitor/components/ChildWindow.js +5 -10
- package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
- package/react/components/processMonitor/components/ListHeader.d.ts +1 -1
- package/react/components/processMonitor/components/ListHeader.js.map +1 -1
- package/react/components/processMonitor/components/ProcessStatistics.js +8 -10
- package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
- package/react/components/processMonitor/constants.d.ts +0 -2
- package/react/components/processMonitor/constants.js +0 -2
- package/react/components/processMonitor/constants.js.map +1 -1
- package/react/components/processMonitor/helpers.d.ts +0 -11
- package/react/components/processMonitor/helpers.js +1 -9
- package/react/components/processMonitor/helpers.js.map +1 -1
- package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +6 -14
- package/react/components/processMonitor/stores/ProcessMonitorStore.js +22 -62
- package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
- package/react/components/{smartDesktopDesigner → sdd}/AddApp.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/AddApp.js +0 -0
- package/react/components/sdd/AddApp.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/AppEditAccess.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/AppEditAccess.js +0 -0
- package/react/components/sdd/AppEditAccess.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/AppEditPage.d.ts +2 -1
- package/react/components/{smartDesktopDesigner → sdd}/AppEditPage.js +77 -73
- package/react/components/sdd/AppEditPage.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Appearance.css +8 -0
- package/react/components/{smartDesktopDesigner → sdd}/Appearance.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Appearance.helpers.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Appearance.helpers.js +0 -0
- package/react/components/sdd/Appearance.helpers.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Appearance.js +0 -0
- package/react/components/sdd/Appearance.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Application.d.ts +10 -3
- package/react/components/sdd/Application.js +220 -0
- package/react/components/sdd/Application.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Applications.d.ts +2 -0
- package/react/components/{smartDesktopDesigner → sdd}/Applications.js +17 -7
- package/react/components/sdd/Applications.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/AssetsPage.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/AssetsPage.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/AssetsPage.js +0 -0
- package/react/components/sdd/AssetsPage.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Authentication.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Authentication.js +1 -1
- package/react/components/sdd/Authentication.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/AuthenticationProviderConfig.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/AuthenticationProviderConfig.js +0 -0
- package/react/components/sdd/AuthenticationProviderConfig.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Content.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Content.js +0 -0
- package/react/components/sdd/Content.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/ContentHeader.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/ContentHeader.js +0 -0
- package/react/components/sdd/ContentHeader.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/CurrentView.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/CurrentView.js +0 -0
- package/react/components/sdd/CurrentView.js.map +1 -0
- package/react/components/sdd/EditPreload.d.ts +14 -0
- package/react/components/sdd/EditPreload.js +169 -0
- package/react/components/sdd/EditPreload.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Export.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Export.js +0 -0
- package/react/components/sdd/Export.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/ExportCloud.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/ExportCloud.js +0 -0
- package/react/components/sdd/ExportCloud.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/ExportDeployInfo.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/ExportDeployInfo.js +0 -0
- package/react/components/sdd/ExportDeployInfo.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/ExportZip.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/ExportZip.js +0 -0
- package/react/components/sdd/ExportZip.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/GettingStarted.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/GettingStarted.js +0 -0
- package/react/components/sdd/GettingStarted.js.map +1 -0
- package/react/components/sdd/ItemList.d.ts +17 -0
- package/react/components/sdd/ItemList.js +58 -0
- package/react/components/sdd/ItemList.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Navigation.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Navigation.js +0 -0
- package/react/components/sdd/Navigation.js.map +1 -0
- package/react/components/sdd/OptionalSettingsView.d.ts +11 -0
- package/react/components/sdd/OptionalSettingsView.js +71 -0
- package/react/components/sdd/OptionalSettingsView.js.map +1 -0
- package/react/components/sdd/Preloads.d.ts +8 -0
- package/react/components/sdd/Preloads.js +26 -0
- package/react/components/sdd/Preloads.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/ProjectErrors.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/ProjectErrors.js +0 -0
- package/react/components/sdd/ProjectErrors.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Publish.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Publish.js +0 -0
- package/react/components/sdd/Publish.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/PublishProgress.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/PublishProgress.js +0 -0
- package/react/components/sdd/PublishProgress.js.map +1 -0
- package/react/components/sdd/SmartDesktopDesigner.d.ts +28 -0
- package/react/components/sdd/SmartDesktopDesigner.js +121 -0
- package/react/components/sdd/SmartDesktopDesigner.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/ThemePage.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/ThemePage.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/ThemePage.js +0 -0
- package/react/components/sdd/ThemePage.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Themes.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Themes.js +0 -0
- package/react/components/sdd/Themes.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Toolbar.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Toolbar.js +13 -11
- package/react/components/sdd/Toolbar.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/View.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/View.js +0 -0
- package/react/components/sdd/View.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/common/fsbl_functions.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/common/fsbl_functions.js +0 -0
- package/react/components/sdd/common/fsbl_functions.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/common/getCSSVars.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/common/getCSSVars.js +0 -0
- package/react/components/sdd/common/getCSSVars.js.map +1 -0
- package/react/components/{smartDesktopDesigner/fixtures → sdd/common}/views.d.ts +0 -0
- package/react/components/sdd/common/views.js +204 -0
- package/react/components/sdd/common/views.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/appearance.css +3 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/applications.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/authentication.css +5 -1
- package/react/components/{smartDesktopDesigner → sdd}/css/buttons.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/export.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/getting-started.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/nav.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/project-errors.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/project-header.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/styles.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/views.css +0 -1
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/apps.d.ts +1 -1
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/apps.js +27 -5
- package/react/components/sdd/fixtures/apps.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/authenticationProps.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/authenticationProps.js +0 -0
- package/react/components/sdd/fixtures/authenticationProps.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/configTemplate.d.ts +1 -1
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/configTemplate.js +1 -1
- package/react/components/sdd/fixtures/configTemplate.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/exportProps.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/exportProps.js +0 -0
- package/react/components/sdd/fixtures/exportProps.js.map +1 -0
- package/react/components/sdd/fixtures/preloads.d.ts +22 -0
- package/react/components/sdd/fixtures/preloads.js +40 -0
- package/react/components/sdd/fixtures/preloads.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/projectErrorsProps.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/projectErrorsProps.js +0 -0
- package/react/components/sdd/fixtures/projectErrorsProps.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/publishProgress.d.ts +1 -1
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/publishProgress.js +0 -0
- package/react/components/sdd/fixtures/publishProgress.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/themeProps.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/themeProps.js +0 -0
- package/react/components/sdd/fixtures/themeProps.js.map +1 -0
- package/react/components/sdd/fixtures/views.d.ts +3 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/views.js +9 -0
- package/react/components/sdd/fixtures/views.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/sdd_helpers.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/sdd_helpers.js +0 -0
- package/react/components/sdd/sdd_helpers.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/AppEditPage.stories.d.ts +1 -1
- package/react/components/{smartDesktopDesigner → sdd}/stories/AppEditPage.stories.js +1 -0
- package/react/components/sdd/stories/AppEditPage.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Appearance.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Appearance.stories.js +0 -0
- package/react/components/sdd/stories/Appearance.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Applications.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Applications.stories.js +0 -0
- package/react/components/sdd/stories/Applications.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/AssetsPage.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/AssetsPage.stories.js +0 -0
- package/react/components/sdd/stories/AssetsPage.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Authentication.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Authentication.stories.js +0 -0
- package/react/components/sdd/stories/Authentication.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ContentHeader.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ContentHeader.stories.js +0 -0
- package/react/components/sdd/stories/ContentHeader.stories.js.map +1 -0
- package/react/components/sdd/stories/EditPreload.stories.d.ts +11 -0
- package/react/components/sdd/stories/EditPreload.stories.js +35 -0
- package/react/components/sdd/stories/EditPreload.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Export.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Export.stories.js +0 -0
- package/react/components/sdd/stories/Export.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ExportCloud.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ExportCloud.stories.js +0 -0
- package/react/components/sdd/stories/ExportCloud.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ExportZip.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ExportZip.stories.js +0 -0
- package/react/components/sdd/stories/ExportZip.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/GettingStarted.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/GettingStarted.stories.js +0 -0
- package/react/components/sdd/stories/GettingStarted.stories.js.map +1 -0
- package/react/components/sdd/stories/ItemList.stories.d.ts +16 -0
- package/react/components/{smartDesktopDesigner/stories/ApplicationList.stories.js → sdd/stories/ItemList.stories.js} +26 -26
- package/react/components/sdd/stories/ItemList.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Navigation.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Navigation.stories.js +0 -0
- package/react/components/sdd/stories/Navigation.stories.js.map +1 -0
- package/react/components/sdd/stories/OptionalSettingsView.stories.d.ts +11 -0
- package/react/components/sdd/stories/OptionalSettingsView.stories.js +28 -0
- package/react/components/sdd/stories/OptionalSettingsView.stories.js.map +1 -0
- package/react/components/sdd/stories/Preloads.stories.d.ts +11 -0
- package/react/components/sdd/stories/Preloads.stories.js +31 -0
- package/react/components/sdd/stories/Preloads.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ProjectErrors.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ProjectErrors.stories.js +0 -0
- package/react/components/sdd/stories/ProjectErrors.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Publish.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Publish.stories.js +0 -0
- package/react/components/sdd/stories/Publish.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/PublishProgress.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/PublishProgress.stories.js +0 -0
- package/react/components/sdd/stories/PublishProgress.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/SmartDesktopDesigner.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/SmartDesktopDesigner.stories.js +0 -0
- package/react/components/sdd/stories/SmartDesktopDesigner.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ThemePage.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ThemePage.stories.js +0 -0
- package/react/components/sdd/stories/ThemePage.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Themes.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Themes.stories.js +0 -0
- package/react/components/sdd/stories/Themes.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Toolbar.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Toolbar.stories.js +0 -0
- package/react/components/sdd/stories/Toolbar.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/AppEditPage.spec.d.ts +0 -0
- package/react/components/sdd/tests/AppEditPage.spec.js +1151 -0
- package/react/components/sdd/tests/AppEditPage.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/ApplicationList.spec.d.ts → sdd/tests/Application.spec.d.ts} +0 -0
- package/react/components/sdd/tests/Application.spec.js +1478 -0
- package/react/components/sdd/tests/Application.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Applications.spec.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Applications.spec.js +3 -3
- package/react/components/sdd/tests/Applications.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Authentication.spec.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Authentication.spec.js +0 -0
- package/react/components/sdd/tests/Authentication.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/ContentHeader.spec.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/ContentHeader.spec.js +0 -0
- package/react/components/sdd/tests/ContentHeader.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/Export.spec.d.ts → sdd/tests/EditPreload.spec.d.ts} +0 -0
- package/react/components/sdd/tests/EditPreload.spec.js +61 -0
- package/react/components/sdd/tests/EditPreload.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/ExportZip.spec.d.ts → sdd/tests/Export.spec.d.ts} +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Export.spec.js +0 -0
- package/react/components/sdd/tests/Export.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/Navigation.spec.d.ts → sdd/tests/ExportZip.spec.d.ts} +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/ExportZip.spec.js +0 -0
- package/react/components/sdd/tests/ExportZip.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/ProjectErrors.spec.d.ts → sdd/tests/ItemList.spec.d.ts} +0 -0
- package/react/components/{smartDesktopDesigner/tests/ApplicationList.spec.js → sdd/tests/ItemList.spec.js} +8 -8
- package/react/components/sdd/tests/ItemList.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/Publish.spec.d.ts → sdd/tests/Navigation.spec.d.ts} +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Navigation.spec.js +0 -0
- package/react/components/sdd/tests/Navigation.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/PublishProgess.spec.d.ts → sdd/tests/Preloads.spec.d.ts} +0 -0
- package/react/components/sdd/tests/Preloads.spec.js +47 -0
- package/react/components/sdd/tests/Preloads.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/SmartDesktopDesigner.spec.d.ts → sdd/tests/ProjectErrors.spec.d.ts} +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/ProjectErrors.spec.js +0 -0
- package/react/components/sdd/tests/ProjectErrors.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/Themes.spec.d.ts → sdd/tests/Publish.spec.d.ts} +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Publish.spec.js +0 -0
- package/react/components/sdd/tests/Publish.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/sdd_helpers.spec.d.ts → sdd/tests/PublishProgess.spec.d.ts} +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/PublishProgess.spec.js +0 -0
- package/react/components/sdd/tests/PublishProgess.spec.js.map +1 -0
- package/react/components/sdd/tests/SmartDesktopDesigner.spec.d.ts +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/SmartDesktopDesigner.spec.js +6 -0
- package/react/components/sdd/tests/SmartDesktopDesigner.spec.js.map +1 -0
- package/react/components/sdd/tests/Themes.spec.d.ts +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Themes.spec.js +0 -0
- package/react/components/sdd/tests/Themes.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Toolbar.spec.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Toolbar.spec.js +0 -0
- package/react/components/sdd/tests/Toolbar.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/a11y_helper.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/a11y_helper.js +0 -0
- package/react/components/sdd/tests/a11y_helper.js.map +1 -0
- package/react/components/sdd/tests/sdd_helpers.spec.d.ts +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/sdd_helpers.spec.js +0 -0
- package/react/components/sdd/tests/sdd_helpers.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/themeDefinitions.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/themeDefinitions.js +0 -0
- package/react/components/sdd/themeDefinitions.js.map +1 -0
- package/react/components/search/SearchBestMatch.js.map +1 -1
- package/react/components/search/SearchProviderResults.d.ts +3 -1
- package/react/components/search/SearchProviderResults.js.map +1 -1
- package/react/components/search/SearchResult.d.ts +3 -1
- package/react/components/search/SearchResult.js +11 -8
- package/react/components/search/SearchResult.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.spec.js +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +0 -11
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +2 -116
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/views.js +1 -185
- package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
- package/react/components/toolbar/AutoArrange.js +1 -1
- package/react/components/toolbar/AutoArrange.js.map +1 -1
- package/react/components/toolbar/AutoArrange.spec.d.ts +1 -0
- package/react/components/toolbar/AutoArrange.spec.js +48 -0
- package/react/components/toolbar/AutoArrange.spec.js.map +1 -0
- package/react/components/toolbar/AutoArrange.stories.d.ts +11 -0
- package/react/components/toolbar/AutoArrange.stories.js +21 -0
- package/react/components/toolbar/AutoArrange.stories.js.map +1 -0
- package/react/components/toolbar/DragHandle.spec.d.ts +1 -0
- package/react/components/toolbar/DragHandle.spec.js +31 -0
- package/react/components/toolbar/DragHandle.spec.js.map +1 -0
- package/react/components/toolbar/DragHandle.stories.d.ts +13 -0
- package/react/components/toolbar/DragHandle.stories.js +39 -0
- package/react/components/toolbar/DragHandle.stories.js.map +1 -0
- package/react/components/toolbar/SddButton.d.ts +2 -0
- package/react/components/toolbar/SddButton.js +23 -0
- package/react/components/toolbar/SddButton.js.map +1 -0
- package/react/components/toolbar/ToolbarShell.js +4 -1
- package/react/components/toolbar/ToolbarShell.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.d.ts +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.d.ts +3 -2
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/Content.d.ts +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.d.ts +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsList.d.ts +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.d.ts +2 -2
- package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js +15 -4
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/components/componentList.d.ts +2 -2
- package/react/components/toolbar/appLauncher/components/componentList.js +3 -4
- package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +2 -2
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
- package/react/components/toolbar/dashbar/Dashbar.js +11 -12
- package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.d.ts +2 -2
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.d.ts +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.d.ts +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.d.ts +4 -4
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +72 -13
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
- package/react/components/userPreferences/components/content/Workspaces.d.ts +6 -1
- package/react/components/userPreferences/components/content/Workspaces.js +59 -18
- package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
- package/react/components/userPreferences/components/general/ScheduledRestart.d.ts +2 -0
- package/react/components/userPreferences/components/general/ScheduledRestart.js +10 -2
- package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
- package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +2 -1
- package/react/components/userPreferences/stores/UserPreferencesStore.js +10 -0
- package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
- package/react/components/userPreferences/tests/ScheduledRestart.spec.js +6 -6
- package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -1
- package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +5 -2
- package/react/components/windowTitleBar/WindowTitleBarShell.js +70 -59
- package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
- package/react/components/windowTitleBar/components/center/TabList.d.ts +2 -2
- package/react/components/windowTitleBar/components/center/TabList.js +5 -2
- package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/windowTitle.d.ts +5 -2
- package/react/components/windowTitleBar/components/windowTitle.js +99 -94
- package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts +3 -3
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js +218 -219
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
- package/react/components/yesNoDialog/Timer.spec.js +1 -1
- package/react/components/yesNoDialog/Timer.spec.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.spec.js +1 -1
- package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
- package/react/hooks/useDashbar.js.map +1 -1
- package/react/hooks/useFavoritesShell.js.map +1 -1
- package/react/hooks/useNotifications.d.ts +1 -1
- package/react/hooks/useNotifications.js.map +1 -1
- package/react/hooks/useSearch.d.ts +2 -1
- package/react/hooks/useSearch.js.map +1 -1
- package/react/hooks/useToolbar.js +6 -0
- package/react/hooks/useToolbar.js.map +1 -1
- package/react/reducers/rootReducer.d.ts +11 -3
- package/react/reducers/smartDesktopDesignerReducer.js +8 -0
- package/react/reducers/smartDesktopDesignerReducer.js.map +1 -1
- package/react/store.d.ts +22 -6
- package/react/types/advancedAppLauncherTypes.d.ts +5 -3
- package/react/types/advancedAppLauncherTypes.js.map +1 -1
- package/react/types/favoriteTypes.d.ts +4 -2
- package/react/types/favoriteTypes.js.map +1 -1
- package/react/types/fdc3.d.ts +2 -2
- package/react/types/fdc3.js.map +1 -1
- package/react/types/smartDesktopDesignerTypes.d.ts +8 -2
- package/react/types/smartDesktopDesignerTypes.js.map +1 -1
- package/react/types/windowTitleBar.d.ts +1 -1
- package/react/types/windowTitleBar.js.map +1 -1
- package/react/components/smartDesktopDesigner/AddApp.js.map +0 -1
- package/react/components/smartDesktopDesigner/AppEditAccess.js.map +0 -1
- package/react/components/smartDesktopDesigner/AppEditPage.js.map +0 -1
- package/react/components/smartDesktopDesigner/Appearance.helpers.js.map +0 -1
- package/react/components/smartDesktopDesigner/Appearance.js.map +0 -1
- package/react/components/smartDesktopDesigner/Application.js +0 -228
- package/react/components/smartDesktopDesigner/Application.js.map +0 -1
- package/react/components/smartDesktopDesigner/ApplicationList.d.ts +0 -16
- package/react/components/smartDesktopDesigner/ApplicationList.js +0 -60
- package/react/components/smartDesktopDesigner/ApplicationList.js.map +0 -1
- package/react/components/smartDesktopDesigner/Applications.js.map +0 -1
- package/react/components/smartDesktopDesigner/AssetsPage.js.map +0 -1
- package/react/components/smartDesktopDesigner/Authentication.js.map +0 -1
- package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +0 -1
- package/react/components/smartDesktopDesigner/Content.js.map +0 -1
- package/react/components/smartDesktopDesigner/ContentHeader.js.map +0 -1
- package/react/components/smartDesktopDesigner/CurrentView.js.map +0 -1
- package/react/components/smartDesktopDesigner/Export.js.map +0 -1
- package/react/components/smartDesktopDesigner/ExportCloud.js.map +0 -1
- package/react/components/smartDesktopDesigner/ExportDeployInfo.js.map +0 -1
- package/react/components/smartDesktopDesigner/ExportZip.js.map +0 -1
- package/react/components/smartDesktopDesigner/GettingStarted.js.map +0 -1
- package/react/components/smartDesktopDesigner/Navigation.js.map +0 -1
- package/react/components/smartDesktopDesigner/ProjectErrors.js.map +0 -1
- package/react/components/smartDesktopDesigner/Publish.js.map +0 -1
- package/react/components/smartDesktopDesigner/PublishProgress.js.map +0 -1
- package/react/components/smartDesktopDesigner/ThemePage.js.map +0 -1
- package/react/components/smartDesktopDesigner/Themes.js.map +0 -1
- package/react/components/smartDesktopDesigner/Toolbar.js.map +0 -1
- package/react/components/smartDesktopDesigner/View.js.map +0 -1
- package/react/components/smartDesktopDesigner/common/fsbl_functions.js.map +0 -1
- package/react/components/smartDesktopDesigner/common/getCSSVars.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/apps.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/authenticationProps.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/configTemplate.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/projectErrorsProps.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/themeProps.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/views.js.map +0 -1
- package/react/components/smartDesktopDesigner/sdd_helpers.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/Appearance.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.d.ts +0 -16
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/AssetsPage.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/Authentication.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/Export.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/Navigation.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/Publish.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ThemePage.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/Themes.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/Toolbar.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js +0 -310
- package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/Authentication.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/ContentHeader.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/Navigation.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/Publish.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/Themes.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/Toolbar.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/a11y_helper.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/themeDefinitions.js.map +0 -1
- package/react/components/toolbar/appLauncher/DynamicAppLauncher.d.ts +0 -6
- package/react/components/toolbar/appLauncher/DynamicAppLauncher.js +0 -23
- package/react/components/toolbar/appLauncher/DynamicAppLauncher.js.map +0 -1
- package/react/hooks/useWorkspace.d.ts +0 -5
- package/react/hooks/useWorkspace.js +0 -26
- package/react/hooks/useWorkspace.js.map +0 -1
- package/react/types/iconTypes.d.ts +0 -11
- package/react/types/iconTypes.js +0 -2
- package/react/types/iconTypes.js.map +0 -1
- package/react/types/searchTypes.d.ts +0 -29
- package/react/types/searchTypes.js +0 -2
- package/react/types/searchTypes.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdvancedAppLauncher.js","sourceRoot":"","sources":["../../../../src/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.tsx"],"names":[],"mappings":"AAAA,OAAO,6CAA6C,CAAC;AAErD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,YAAY,MAAM,uBAAuB,CAAC;AAGjD,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,aAAa,MAAM,4BAA4B,CAAC;AAEvD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,kBAAkB,MAAM,iCAAiC,CAAC;AAGjE,IAAI,wBAAgD,CAAC;AAkBrD,MAAM,OAAO,mBAAoB,SAAQ,KAAK,CAAC,SAAyB;IACvE,YAAY,KAAa;QACxB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,aAAa,EAAE,YAAY,CAAC,aAAa,EAAE;SAC3C,CAAC;QACF,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/D,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;IAED,yBAAyB;QACxB,WAAW,CAAC,CAAC,KAAoB,EAAE,KAAkB,EAAE,EAAE;YACxD,wBAAwB,GAAG,KAAK,CAAC;YACjC,YAAY,CAAC,UAAU,CAAC,GAAG,EAAE;gBAC5B,wBAAw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,EAAC,sBAAsB;gBACpC,6BAAK,SAAS,EAAC,uBAAuB;oBACrC,oBAAC,WAAW,OAAG;oBACf,oBAAC,kBAAkB,IAClB,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,qBAAqB,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,GACtD,CACG;gBAEN,oBAAC,OAAO,OAAG;gBACV,IAAI,CAAC,KAAK,CAAC,aAAa,IAAI,CAC5B,oBAAC,aAAa,IACb,MAAM,EAAE,IAAI,CAAC,qBAAqB,EAClC,mBAAmB,EAAE,IAAI,CAAC,KAAK,CAAC,mBAAmB,EACnD,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,kBAAkB,EACjD,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,kBAAkB,GAChD,CACF,CACI,CACD,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import \"../../../assets/css/advancedAppLauncher.css\";\n// Import js modules\nimport React from \"react\";\nimport { createStore, getStore } from \"./stores/LauncherStore\";\nimport storeActions from \"./stores/StoreActions\";\n\n// Import React components\nimport Content from \"./components/Content\";\nimport AddNewAppForm from \"./components/AddNewAppForm\";\nimport { StandardError } from \"@finsemble/finsemble-
|
|
1
|
+
{"version":3,"file":"AdvancedAppLauncher.js","sourceRoot":"","sources":["../../../../src/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.tsx"],"names":[],"mappings":"AAAA,OAAO,6CAA6C,CAAC;AAErD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,YAAY,MAAM,uBAAuB,CAAC;AAGjD,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,aAAa,MAAM,4BAA4B,CAAC;AAEvD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,kBAAkB,MAAM,iCAAiC,CAAC;AAGjE,IAAI,wBAAgD,CAAC;AAkBrD,MAAM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B,KAAK,EAAE,KAAK;SACZ,EACD,CAAC,KAAoB,EAAE,EAAE;YACxB,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;QAC9D,CAAC,CACD,CAAC;IACH,CAAC;IAED,aAAa;QACZ,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,UAAU,CACrC;YACC,aAAa,EAAE,sBAAsB;SACrC,EACD;YACC,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,CAAC;YAChB,eAAe,EAAE,IAAI;YACrB,IAAI,EAAE,QAAQ;YACd,GAAG,EAAE,QAAQ;SACb,CACD,CAAC;IACH,CAAC;IAED,MAAM;QACL,IAAI,CAAC,wBAAwB;YAAE,OAAO,IAAI,CAAC;QAC3C,OAAO,CACN,6BAAK,SAAS,EAAC,uBAAuB;YACrC,6BAAK,SAAS,EAAC,sBAAsB;gBACpC,6BAAK,SAAS,EAAC,uBAAuB;oBACrC,oBAAC,WAAW,OAAG;oBACf,oBAAC,kBAAkB,IAClB,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,qBAAqB,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,GACtD,CACG;gBAEN,oBAAC,OAAO,OAAG;gBACV,IAAI,CAAC,KAAK,CAAC,aAAa,IAAI,CAC5B,oBAAC,aAAa,IACb,MAAM,EAAE,IAAI,CAAC,qBAAqB,EAClC,mBAAmB,EAAE,IAAI,CAAC,KAAK,CAAC,mBAAmB,EACnD,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,kBAAkB,EACjD,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,kBAAkB,GAChD,CACF,CACI,CACD,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import \"../../../assets/css/advancedAppLauncher.css\";\n// Import js modules\nimport React from \"react\";\nimport { createStore, getStore } from \"./stores/LauncherStore\";\nimport storeActions from \"./stores/StoreActions\";\n\n// Import React components\nimport Content from \"./components/Content\";\nimport AddNewAppForm from \"./components/AddNewAppForm\";\nimport { StandardError } from \"@finsemble/finsemble-api/types/types\";\nimport FoldersList from \"./components/FoldersList\";\nimport LeftNavBottomLinks from \"./components/LeftNavBottomLinks\";\nimport StoreModel from \"@finsemble/finsemble-api/types/clients/StoreModel\";\n\nlet advancedAppLauncherStore: StoreModel | undefined;\n\ninterface IProps {\n\tcustomURLValidation: ((url: string) => [boolean, string]) | null;\n\tcustomAddComponent: ((formData: any, callback: (error: any | null) => void) => void) | null;\n\tbeforeAddComponent: ((formData: any) => object) | null;\n\tenableQuickComponents: boolean;\n}\n\ninterface IState {\n\tisFormVisible: boolean;\n}\n/**\n * The \"app\" button that launches the Advanced App Launcher.\n * The Advanced App Launcher comes with search capabilities and allows users to organize their application components into folders.\n *\n * @param {boolean} [enableQuickComponents=false] DEPRECATED: Set to true to allow users to create their own components\n */\nexport class AdvancedAppLauncher extends React.Component<IProps, IState> {\n\tconstructor(props: IProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tisFormVisible: storeActions.getFormStatus(),\n\t\t};\n\t\tthis.toggleAddNewAppForm = this.toggleAddNewAppForm.bind(this);\n\t\tthis.openAppMarket = this.openAppMarket.bind(this);\n\t}\n\n\tUNSAFE_componentWillMount() {\n\t\tcreateStore((error: StandardError, store?: StoreModel) => {\n\t\t\tadvancedAppLauncherStore = store;\n\t\t\tstoreActions.initialize(() => {\n\t\t\t\tadvancedAppLauncherStore?.addListener({ field: \"isFormVisible\" }, this.toggleAddNewAppForm);\n\t\t\t\tthis.forceUpdate();\n\t\t\t});\n\t\t\t// Delete the search text from the store as searches should not persist over restart.\n\t\t\t// The deletion is done on startup as a shutdown listener wouldn't trigger on crashes\n\t\t\tstore?.setValue({\n\t\t\t\tfield: \"filterText\",\n\t\t\t\tvalue: \"\",\n\t\t\t});\n\t\t});\n\t}\n\n\tcomponentWillUnmount() {\n\t\tgetStore()?.removeListener({ field: \"isFormVisible\" }, this.toggleAddNewAppForm);\n\t}\n\n\t/**\n\t * Sets isFormVisible to true or false in state\n\t * isFormVisible is used to conditionally show/hide the\n\t * add new component form.\n\t * @param {objec} error\n\t * @param {object} data\n\t */\n\ttoggleAddNewAppForm(error: StandardError, data: { value: any }) {\n\t\tthis.setState({\n\t\t\tisFormVisible: data.value,\n\t\t});\n\t}\n\n\t/**\n\t * Sets isFormVisible to false in store to remove the form\n\t */\n\tonAddNewAppFormAction() {\n\t\tgetStore()?.setValue(\n\t\t\t{\n\t\t\t\tfield: \"isFormVisible\",\n\t\t\t\tvalue: false,\n\t\t\t},\n\t\t\t(error: StandardError) => {\n\t\t\t\terror && console.log(\"Failed to set isFormVisible to false\");\n\t\t\t}\n\t\t);\n\t}\n\n\topenAppMarket() {\n\t\tFSBL.Clients.LauncherClient.showWindow(\n\t\t\t{\n\t\t\t\tcomponentType: \"Advanced App Catalog\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tmonitor: \"mine\",\n\t\t\t\tstaggerPixels: 0,\n\t\t\t\tspawnIfNotFound: true,\n\t\t\t\tleft: \"center\",\n\t\t\t\ttop: \"center\",\n\t\t\t}\n\t\t);\n\t}\n\n\trender() {\n\t\tif (!advancedAppLauncherStore) return null;\n\t\treturn (\n\t\t\t<div className=\"advanced-app-launcher\">\n\t\t\t\t<div className=\"complex-menu-wrapper\">\n\t\t\t\t\t<div className=\"complex-menu-left-nav\">\n\t\t\t\t\t\t<FoldersList />\n\t\t\t\t\t\t<LeftNavBottomLinks\n\t\t\t\t\t\t\topenAppMarket={this.openAppMarket}\n\t\t\t\t\t\t\tenableQuickComponents={this.props.enableQuickComponents}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<Content />\n\t\t\t\t\t{this.state.isFormVisible && (\n\t\t\t\t\t\t<AddNewAppForm\n\t\t\t\t\t\t\tonDone={this.onAddNewAppFormAction}\n\t\t\t\t\t\t\tcustomURLValidation={this.props.customURLValidation}\n\t\t\t\t\t\t\tcustomAddComponent={this.props.customAddComponent}\n\t\t\t\t\t\t\tbeforeAddComponent={this.props.beforeAddComponent}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Icon } from "../../../../types/iconTypes";
|
|
3
2
|
import { FolderAppType, FolderType } from "../../../../types/advancedAppLauncherTypes";
|
|
3
|
+
import { services } from "@finsemble/finsemble-api";
|
|
4
|
+
declare type IconDescriptor = services.window.types.IconDescriptor;
|
|
4
5
|
declare type App = FolderAppType & {
|
|
5
6
|
title?: string;
|
|
6
|
-
icon?:
|
|
7
|
+
icon?: IconDescriptor;
|
|
7
8
|
};
|
|
8
9
|
interface IProps {
|
|
9
10
|
folder: FolderType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppDefinition.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/AppDefinition.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,YAAY,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"AppDefinition.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/AppDefinition.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,YAAY,MAAM,wBAAwB,CAAC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AAG,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,KAAI,EAAE,CAAC;QAC7B,OAAO,CACN,6BAAK,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,EAAC,eAAe,EAAC,SAAS,EAAC,MAAM,EAAC,WAAW,EAAE,IAAI,CAAC,cAAc;YAC1G,8BAAM,SAAS,EAAC,gBAAgB;gBAC/B,oBAAC,aAAa,IAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAC,aAAa,EAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,GAAI;gBACtF,8BAAM,SAAS,EAAC,UAAU,EAAC,KAAK,EAAE,WAAW,IAC3C,WAAW,CACN,CACD;YACN,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,oBAAC,WAAW,IAAC,IAAI,EAAE,IAAI,GAAI;YAC/C,oBAAC,cAAc,IAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,GAAI,CAClD,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\nimport AppActionsMenu from \"./AppActionsMenu\";\nimport AppTagsList from \"./AppTagsList\";\nimport { FavoriteMaker } from \"../../../favorites/FavoriteMaker\";\nimport { getStore } from \"../stores/LauncherStore\";\nimport storeActions from \"../stores/StoreActions\";\nimport { FolderAppType, FolderType } from \"../../../../types/advancedAppLauncherTypes\";\nimport { services } from \"@finsemble/finsemble-api\";\n\ntype IconDescriptor = services.window.types.IconDescriptor;\n\ntype App = FolderAppType & {\n\ttitle?: string;\n\ticon?: IconDescriptor;\n};\ninterface IProps {\n\tfolder: FolderType;\n\tapp: App;\n}\n\ninterface IState {}\n\n/**\n * Used to make sure that a user is not waiting for component\n * to spawn after a double click, helps us prevent multiple\n * spawns for the same app.\n */\nexport default class AppDefinition extends React.Component<IProps, IState> {\n\tconstructor(props: IProps) {\n\t\tsuper(props);\n\t\tthis.onDragToFolder = this.onDragToFolder.bind(this);\n\t\tthis.onItemClick = this.onItemClick.bind(this);\n\t}\n\n\t/**\n\t * Native HTML5 drag and drop\n\t **/\n\tonDragToFolder(event: React.DragEvent) {\n\t\tevent.dataTransfer.setData(\"app\", JSON.stringify(this.props.app));\n\t}\n\n\t/**\n\t * Spawns a component on click\n\t * @param {object} e The Synthetic React event\n\t *\n\t */\n\tonItemClick() {\n\t\tconst name = this.props.app.title || this.props.app.name;\n\t\tFSBL.Clients.LauncherClient.spawn(name.trim(), {\n\t\t\taddToWorkspace: true,\n\t\t});\n\t\t/**\n\t\t * If a component takes 4 seconds until it's first painted and the app launcher closes immediately -- that feels discordant.\n\t\t * If a component takes 4 seconds until it's first painted and the app launcher stays open, that feels like a bug.\n\t\t * This is a middle ground. If the component paints quickly (like our html apps), the app launcher will hide as soon as\n\t\t * that new window gets focused. If the component takes a while to paint, we'll hide after half a second instead of\n\t\t * waiting for the window to grab focus.\n\t\t *\n\t\t * Longer term we should leave the menu open and have a micro-interaction telling the user that something is happening.\n\t\t */\n\t\tsetTimeout(() => {\n\t\t\tfinsembleWindow.blur();\n\t\t\t// clear any search text on app launch.\n\t\t\tif (storeActions.getSearchText()) {\n\t\t\t\tgetStore()?.setValue({\n\t\t\t\t\tfield: \"filterText\",\n\t\t\t\t\tvalue: null,\n\t\t\t\t});\n\t\t\t}\n\t\t}, 500);\n\t}\n\n\trender() {\n\t\tconst { app } = this.props;\n\t\tconst appId = app.title || app.name;\n\t\tconst displayName = app.displayName || app.name;\n\t\tconst tags = app?.tags || [];\n\t\treturn (\n\t\t\t<div onClick={this.onItemClick} className=\"app-item link\" draggable=\"true\" onDragStart={this.onDragToFolder}>\n\t\t\t\t<span className=\"app-item-title\">\n\t\t\t\t\t<FavoriteMaker id={appId} category=\"Application\" name={displayName} icon={app.icon} />\n\t\t\t\t\t<span className=\"app-name\" title={displayName}>\n\t\t\t\t\t\t{displayName}\n\t\t\t\t\t</span>\n\t\t\t\t</span>\n\t\t\t\t{tags.length > 0 && <AppTagsList tags={tags} />}\n\t\t\t\t<AppActionsMenu app={app} folder={this.props.folder} />\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import sortFunctions from "../utils/sort-functions";
|
|
3
3
|
import { FolderAppType, FolderType } from "../../../../types/advancedAppLauncherTypes";
|
|
4
|
-
import { StandardError } from "@finsemble/finsemble-
|
|
4
|
+
import { StandardError } from "@finsemble/finsemble-api/types/types";
|
|
5
5
|
interface IProps {
|
|
6
6
|
}
|
|
7
7
|
interface IState {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/Content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,aAAa,MAAM,yBAAyB,CAAC;AAIpD,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAErD,MAAc,CAAC,YAAY,GAAG,YAAY,CAAC;AAE5C,IAAI,KAA6B,CAAC;AAWlC,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,KAAK,CAAC,SAAyB;IAGnE,YAAY,KAAa;QACxB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,IAAI,EAAE,YAAY,CAAC,OAAO,EAAE;YAC5B,IAAI,EAAE,YAAY,CAAC,OAAO,EAAE;YAC5B,MAAM,EAAE,YAAY,CAAC,SAAS,EAAE;YAChC,UAAU,EAAE,YAAY,CAAC,aAAa,EAAE,CAAC,WAAW,EAAE;YACtD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OAAO,QAAQ,CAAC,OAAO,CAAC;SACzB;IACF,CAAC;IAED,MAAM;QACL,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QAClC,OAAO,CACN,6BAAK,SAAS,EAAC,0BAA0B;YACxC,oBAAC,UAAU,OAAc;YACzB,6BAAK,SAAS,EAAC,cAAc,IAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,oBAAC,WAAW,IAAC,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAE,GAAI,CAAO,CAC1G,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\nimport AppDefinition from \"./AppDefinition\";\nimport NoAppsFound from \"./NoAppsFound\";\nimport FilterSort from \"./FilterSort\";\nimport { getStore } from \"../stores/LauncherStore\";\nimport storeActions from \"../stores/StoreActions\";\nimport sortFunctions from \"../utils/sort-functions\";\nimport StoreModel from \"@finsemble/finsemble-core/types/clients/StoreModel\";\nimport { FolderAppType, FolderType } from \"../../../../types/advancedAppLauncherTypes\";\nimport { StandardError } from \"@finsemble/finsemble-core/types/types\";\nconst ADVANCED_APP_LAUNCHER = \"Advanced App Launcher\";\n\n(window as any).storeActions = storeActions;\n// To be assigned a value later in the constructor\nlet store: StoreModel | undefined;\n\ninterface IProps {}\ninterface IState {\n\tapps: any;\n\ttags: any;\n\tsortBy: keyof typeof sortFunctions;\n\tfilterText: string;\n\tfolder: FolderType;\n}\n\nexport default class Content extends React.Component<IProps, IState> {\n\trouterSubscription: any;\n\n\tconstructor(props: IProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tapps: storeActions.getApps(),\n\t\t\ttags: storeActions.getTags(),\n\t\t\tsortBy: storeActions.getSortBy(),\n\t\t\tfilterText: storeActions.getSearchText().toLowerCase(),\n\t\t\tfolder: storeActions.getActiveFolder(),\n\t\t};\n\t\tthis.onSort = this.onSort.bind(this);\n\t\tthis.onSearch = this.onSearch.bind(this);\n\t\tthis.onTagsUpdate = this.onTagsUpdate.bind(this);\n\t\tthis.onActiveFolderChanged = this.onActiveFolderChanged.bind(this);\n\t\tthis.onAppListUpdate = this.onAppListUpdate.bind(this);\n\t\tthis.onAppLauncherUpdate = this.onAppLauncherUpdate.bind(this);\n\t\tthis.updateAppDefinitions = this.updateAppDefinitions.bind(this);\n\t\tstore = getStore();\n\t}\n\n\t_setFolderState() {\n\t\tthis.setState({\n\t\t\tfolder: storeActions.getActiveFolder(),\n\t\t});\n\t}\n\n\tfilterApps() {\n\t\tconst { folder } = this.state;\n\t\tlet apps: FolderAppType[] =\n\t\t\tfolder.name === ADVANCED_APP_LAUNCHER ? Object.values(storeActions.getAllApps()) : folder.apps;\n\n\t\tif (!folder || !apps) {\n\t\t\treturn [];\n\t\t}\n\t\tconst sortFunc = sortFunctions[this.state.sortBy];\n\t\tconst filteredApps: FolderAppType[] = this.filterAppsByTags(sortFunc(apps));\n\t\tif (!this.state.filterText) {\n\t\t\treturn filteredApps;\n\t\t}\n\n\t\treturn filteredApps.filter(\n\t\t\t({ displayName, name }: FolderAppType) =>\n\t\t\t\tdisplayName?.toLowerCase().includes(this.state.filterText.toLowerCase()) ??\n\t\t\t\tname?.toLowerCase().includes(this.state.filterText.toLowerCase())\n\t\t);\n\t}\n\n\tfilterAppsByTags(apps: FolderAppType[]) {\n\t\tif (!this.state.tags) {\n\t\t\treturn apps;\n\t\t}\n\t\t//All active tags must be present in an app for it to show\n\t\treturn apps.filter((app) => {\n\t\t\tfor (let i = 0; i < this.state.tags.length; i++) {\n\t\t\t\tlet tag = this.state.tags[i];\n\t\t\t\tif (!app.tags?.includes(tag)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\t}\n\n\tonActiveFolderChanged() {\n\t\t// Quick fix for release 6.3.0\n\t\t// There are 2 listeners for \"activeFolder\". One in this file, the other is in packages\\ui\\src\\components\\toolbar\\advancedAppLauncher\\stores\\StoreActions.ts\n\t\t// The first listener is invoked earlier with nonupdated 'activeFolder' value in the storeActions. So I use a timeout to change this.\n\t\t// Otherwise, for correct re-rendering, we need to do double-click on the left folders panel.\n\t\tsetTimeout(() => {\n\t\t\tthis._setFolderState();\n\t\t}, 50);\n\t}\n\n\tonSearch(error: StandardError, data: any) {\n\t\tthis.setState({\n\t\t\tfilterText: data.value,\n\t\t});\n\t}\n\n\tonSort(error: StandardError, data: any) {\n\t\tthis.setState({\n\t\t\tsortBy: data.value,\n\t\t});\n\t}\n\n\tonTagsUpdate(error: StandardError, data: any) {\n\t\tthis.setState({\n\t\t\ttags: data.value,\n\t\t});\n\t}\n\n\t/**\n\t * Mainly used to know when a user remove an app from a folder\n\t * Because there is no way to subscribe to\n\t * folders[index].appDefinitions updates.\n\t */\n\tonAppListUpdate() {\n\t\tthis._setFolderState();\n\t}\n\n\tonAppLauncherUpdate() {\n\t\tthis.setState({\n\t\t\tapps: storeActions.getApps(),\n\t\t});\n\t}\n\n\tupdateAppDefinitions(err: StandardError, response: any) {\n\t\tFSBL.Clients.Logger.system.debug(\"list updated\", err, response);\n\t\tif (err) {\n\t\t\treturn console.error(err);\n\t\t}\n\t\tstoreActions.refreshAppDefinitions(response.data.componentList);\n\t\tthis.onAppListUpdate();\n\t}\n\n\tcomponentDidMount() {\n\t\t//this.setStateValues();\n\t\tstore?.addListener({ field: \"activeFolder\" }, this.onActiveFolderChanged);\n\t\tstore?.addListener({ field: \"filterText\" }, this.onSearch);\n\t\tstore?.addListener({ field: \"sortBy\" }, this.onSort);\n\t\tstore?.addListener({ field: \"activeLauncherTags\" }, this.onTagsUpdate);\n\t\t// We can't subscribe to folders[index].appDefinitions\n\t\t// So we are looking at appFolders.folders update\n\t\t// Since that update is done After removing an app of definitions\n\t\tstore?.addListener({ field: \"appFolders.folders\" }, this.onAppListUpdate);\n\n\t\tstore?.addListener({ field: \"appDefinitions\" }, this.onAppLauncherUpdate);\n\t\tthis.routerSubscription = FSBL.Clients.RouterClient.subscribe(\"Launcher.update\", this.updateAppDefinitions);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tstore?.removeListener({ field: \"activeFolder\" }, this.onActiveFolderChanged);\n\t\tstore?.removeListener({ field: \"filterText\" }, this.onSearch);\n\t\tstore?.removeListener({ field: \"sortBy\" }, this.onSort);\n\t\tstore?.removeListener({ field: \"activeLauncherTags\" }, this.onTagsUpdate);\n\t\tstore?.removeListener({ field: \"appFolders.folders\" }, this.onAppListUpdate);\n\n\t\tstore?.removeListener({ field: \"appDefinitions\" }, this.onAppLauncherUpdate);\n\t\tFSBL.Clients.RouterClient.unsubscribe(this.routerSubscription.subscribeID);\n\t}\n\n\trenderAppList() {\n\t\treturn this.filterApps().map((app, index) => <AppDefinition app={app} folder={this.state.folder} key={index} />);\n\t}\n\n\tgetNoResultsMessage() {\n\t\tconst messages = {\n\t\t\tsearch: [\"No results found. Please try again.\"],\n\t\t\tFavorites: [\"There’s nothing here!\", <br key={1} />, \"Add apps to Favorites to view them here.\"],\n\t\t\t//Dashboards: ['There’s nothing here!', <br />, 'Press “New Dashboard” to construct an Dashboard.'],\n\t\t\tdefault: [\"There’s nothing here!\", <br key={2} />, \"Add apps to folders to view them here.\"],\n\t\t};\n\t\tif (!this.state.folder) {\n\t\t\treturn [\"Loading data...\", <br key={3} />];\n\t\t}\n\t\t// User is searching so we need the search message\n\t\tif (this.state.filterText || this.state.tags.length) {\n\t\t\treturn messages.search;\n\t\t}\n\t\t// Now let's check which folder is currently active\n\t\tswitch (this.state.folder.name) {\n\t\t\tcase \"Favorites\":\n\t\t\t\treturn messages.Favorites;\n\t\t\t\tbreak;\n\t\t\tcase \"Dashboards\":\n\t\t\t\treturn [\"\"];\n\t\t\t// return messages.Dashboards;\n\t\t\tdefault:\n\t\t\t\treturn messages.default;\n\t\t}\n\t}\n\n\trender() {\n\t\tconst apps = this.renderAppList();\n\t\treturn (\n\t\t\t<div className=\"complex-menu-content-row\">\n\t\t\t\t<FilterSort></FilterSort>\n\t\t\t\t<div className=\"item-wrapper\">{apps.length ? apps : <NoAppsFound message={this.getNoResultsMessage()} />}</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Content.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/Content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,aAAa,MAAM,yBAAyB,CAAC;AAIpD,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAErD,MAAc,CAAC,YAAY,GAAG,YAAY,CAAC;AAE5C,IAAI,KAA6B,CAAC;AAWlC,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,KAAK,CAAC,SAAyB;IAGnE,YAAY,KAAa;QACxB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,IAAI,EAAE,YAAY,CAAC,OAAO,EAAE;YAC5B,IAAI,EAAE,YAAY,CAAC,OAAO,EAAE;YAC5B,MAAM,EAAE,YAAY,CAAC,SAAS,EAAE;YAChC,UAAU,EAAE,YAAY,CAAC,aAAa,EAAE,CAAC,WAAW,EAAE;YACtD,MAAM,EAAE,YAAY,CAAC,eAAe,EAAE;SACtC,CAAC;QACF,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjD,IAAI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I,CAAC,mBAAmB,EAAE,GAAI,CAAO,CAC1G,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\nimport AppDefinition from \"./AppDefinition\";\nimport NoAppsFound from \"./NoAppsFound\";\nimport FilterSort from \"./FilterSort\";\nimport { getStore } from \"../stores/LauncherStore\";\nimport storeActions from \"../stores/StoreActions\";\nimport sortFunctions from \"../utils/sort-functions\";\nimport StoreModel from \"@finsemble/finsemble-api/types/clients/StoreModel\";\nimport { FolderAppType, FolderType } from \"../../../../types/advancedAppLauncherTypes\";\nimport { StandardError } from \"@finsemble/finsemble-api/types/types\";\nconst ADVANCED_APP_LAUNCHER = \"Advanced App Launcher\";\n\n(window as any).storeActions = storeActions;\n// To be assigned a value later in the constructor\nlet store: StoreModel | undefined;\n\ninterface IProps {}\ninterface IState {\n\tapps: any;\n\ttags: any;\n\tsortBy: keyof typeof sortFunctions;\n\tfilterText: string;\n\tfolder: FolderType;\n}\n\nexport default class Content extends React.Component<IProps, IState> {\n\trouterSubscription: any;\n\n\tconstructor(props: IProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tapps: storeActions.getApps(),\n\t\t\ttags: storeActions.getTags(),\n\t\t\tsortBy: storeActions.getSortBy(),\n\t\t\tfilterText: storeActions.getSearchText().toLowerCase(),\n\t\t\tfolder: storeActions.getActiveFolder(),\n\t\t};\n\t\tthis.onSort = this.onSort.bind(this);\n\t\tthis.onSearch = this.onSearch.bind(this);\n\t\tthis.onTagsUpdate = this.onTagsUpdate.bind(this);\n\t\tthis.onActiveFolderChanged = this.onActiveFolderChanged.bind(this);\n\t\tthis.onAppListUpdate = this.onAppListUpdate.bind(this);\n\t\tthis.onAppLauncherUpdate = this.onAppLauncherUpdate.bind(this);\n\t\tthis.updateAppDefinitions = this.updateAppDefinitions.bind(this);\n\t\tstore = getStore();\n\t}\n\n\t_setFolderState() {\n\t\tthis.setState({\n\t\t\tfolder: storeActions.getActiveFolder(),\n\t\t});\n\t}\n\n\tfilterApps() {\n\t\tconst { folder } = this.state;\n\t\tlet apps: FolderAppType[] =\n\t\t\tfolder.name === ADVANCED_APP_LAUNCHER ? Object.values(storeActions.getAllApps()) : folder.apps;\n\n\t\tif (!folder || !apps) {\n\t\t\treturn [];\n\t\t}\n\t\tconst sortFunc = sortFunctions[this.state.sortBy];\n\t\tconst filteredApps: FolderAppType[] = this.filterAppsByTags(sortFunc(apps));\n\t\tif (!this.state.filterText) {\n\t\t\treturn filteredApps;\n\t\t}\n\n\t\treturn filteredApps.filter(\n\t\t\t({ displayName, name }: FolderAppType) =>\n\t\t\t\tdisplayName?.toLowerCase().includes(this.state.filterText.toLowerCase()) ??\n\t\t\t\tname?.toLowerCase().includes(this.state.filterText.toLowerCase())\n\t\t);\n\t}\n\n\tfilterAppsByTags(apps: FolderAppType[]) {\n\t\tif (!this.state.tags) {\n\t\t\treturn apps;\n\t\t}\n\t\t//All active tags must be present in an app for it to show\n\t\treturn apps.filter((app) => {\n\t\t\tfor (let i = 0; i < this.state.tags.length; i++) {\n\t\t\t\tlet tag = this.state.tags[i];\n\t\t\t\tif (!app.tags?.includes(tag)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\t}\n\n\tonActiveFolderChanged() {\n\t\t// Quick fix for release 6.3.0\n\t\t// There are 2 listeners for \"activeFolder\". One in this file, the other is in packages\\ui\\src\\components\\toolbar\\advancedAppLauncher\\stores\\StoreActions.ts\n\t\t// The first listener is invoked earlier with nonupdated 'activeFolder' value in the storeActions. So I use a timeout to change this.\n\t\t// Otherwise, for correct re-rendering, we need to do double-click on the left folders panel.\n\t\tsetTimeout(() => {\n\t\t\tthis._setFolderState();\n\t\t}, 50);\n\t}\n\n\tonSearch(error: StandardError, data: any) {\n\t\tthis.setState({\n\t\t\tfilterText: data.value,\n\t\t});\n\t}\n\n\tonSort(error: StandardError, data: any) {\n\t\tthis.setState({\n\t\t\tsortBy: data.value,\n\t\t});\n\t}\n\n\tonTagsUpdate(error: StandardError, data: any) {\n\t\tthis.setState({\n\t\t\ttags: data.value,\n\t\t});\n\t}\n\n\t/**\n\t * Mainly used to know when a user remove an app from a folder\n\t * Because there is no way to subscribe to\n\t * folders[index].appDefinitions updates.\n\t */\n\tonAppListUpdate() {\n\t\tthis._setFolderState();\n\t}\n\n\tonAppLauncherUpdate() {\n\t\tthis.setState({\n\t\t\tapps: storeActions.getApps(),\n\t\t});\n\t}\n\n\tupdateAppDefinitions(err: StandardError, response: any) {\n\t\tFSBL.Clients.Logger.system.debug(\"list updated\", err, response);\n\t\tif (err) {\n\t\t\treturn console.error(err);\n\t\t}\n\t\tstoreActions.refreshAppDefinitions(response.data.componentList);\n\t\tthis.onAppListUpdate();\n\t}\n\n\tcomponentDidMount() {\n\t\t//this.setStateValues();\n\t\tstore?.addListener({ field: \"activeFolder\" }, this.onActiveFolderChanged);\n\t\tstore?.addListener({ field: \"filterText\" }, this.onSearch);\n\t\tstore?.addListener({ field: \"sortBy\" }, this.onSort);\n\t\tstore?.addListener({ field: \"activeLauncherTags\" }, this.onTagsUpdate);\n\t\t// We can't subscribe to folders[index].appDefinitions\n\t\t// So we are looking at appFolders.folders update\n\t\t// Since that update is done After removing an app of definitions\n\t\tstore?.addListener({ field: \"appFolders.folders\" }, this.onAppListUpdate);\n\n\t\tstore?.addListener({ field: \"appDefinitions\" }, this.onAppLauncherUpdate);\n\t\tthis.routerSubscription = FSBL.Clients.RouterClient.subscribe(\"Launcher.update\", this.updateAppDefinitions);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tstore?.removeListener({ field: \"activeFolder\" }, this.onActiveFolderChanged);\n\t\tstore?.removeListener({ field: \"filterText\" }, this.onSearch);\n\t\tstore?.removeListener({ field: \"sortBy\" }, this.onSort);\n\t\tstore?.removeListener({ field: \"activeLauncherTags\" }, this.onTagsUpdate);\n\t\tstore?.removeListener({ field: \"appFolders.folders\" }, this.onAppListUpdate);\n\n\t\tstore?.removeListener({ field: \"appDefinitions\" }, this.onAppLauncherUpdate);\n\t\tFSBL.Clients.RouterClient.unsubscribe(this.routerSubscription.subscribeID);\n\t}\n\n\trenderAppList() {\n\t\treturn this.filterApps().map((app, index) => <AppDefinition app={app} folder={this.state.folder} key={index} />);\n\t}\n\n\tgetNoResultsMessage() {\n\t\tconst messages = {\n\t\t\tsearch: [\"No results found. Please try again.\"],\n\t\t\tFavorites: [\"There’s nothing here!\", <br key={1} />, \"Add apps to Favorites to view them here.\"],\n\t\t\t//Dashboards: ['There’s nothing here!', <br />, 'Press “New Dashboard” to construct an Dashboard.'],\n\t\t\tdefault: [\"There’s nothing here!\", <br key={2} />, \"Add apps to folders to view them here.\"],\n\t\t};\n\t\tif (!this.state.folder) {\n\t\t\treturn [\"Loading data...\", <br key={3} />];\n\t\t}\n\t\t// User is searching so we need the search message\n\t\tif (this.state.filterText || this.state.tags.length) {\n\t\t\treturn messages.search;\n\t\t}\n\t\t// Now let's check which folder is currently active\n\t\tswitch (this.state.folder.name) {\n\t\t\tcase \"Favorites\":\n\t\t\t\treturn messages.Favorites;\n\t\t\t\tbreak;\n\t\t\tcase \"Dashboards\":\n\t\t\t\treturn [\"\"];\n\t\t\t// return messages.Dashboards;\n\t\t\tdefault:\n\t\t\t\treturn messages.default;\n\t\t}\n\t}\n\n\trender() {\n\t\tconst apps = this.renderAppList();\n\t\treturn (\n\t\t\t<div className=\"complex-menu-content-row\">\n\t\t\t\t<FilterSort></FilterSort>\n\t\t\t\t<div className=\"item-wrapper\">{apps.length ? apps : <NoAppsFound message={this.getNoResultsMessage()} />}</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterSort.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/FilterSort.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,QAAQ,MAAM,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M;YACN,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;SACzB;IACF,CAAC;IAED,iBAAiB;QAChB,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;IAC1E,CAAC;IAED,oBAAoB;QACnB,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,cAAc,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;IAC7E,CAAC;IAED,MAAM;QACL,IAAI,UAAU,GAAG,YAAY,CAAC,OAAO,EAAE,CAAC;QACxC,OAAO,CACN,6BAAK,SAAS,EAAC,aAAa;YAC3B,oBAAC,SAAS,OAAG;YACb,oBAAC,QAAQ,OAAG;YACZ,oBAAC,MAAM,OAAG;YACV,oBAAC,QAAQ,IAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAC,OAAO,EAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,CAAC,UAAU,GAAI,CAC3G,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\nimport SearchBox from \"./SearchBox\";\nimport TagsMenu from \"../../../shared/TagsMenu\";\nimport SortBy from \"./SortBy\";\nimport TagsList from \"./TagsList\";\nimport { getStore } from \"../stores/LauncherStore\";\nimport storeActions from \"../stores/StoreActions\";\nimport StoreModel from \"@finsemble/finsemble-
|
|
1
|
+
{"version":3,"file":"FilterSort.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/FilterSort.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,O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AM,CAAC,GAAG,CAAC,CAAC;SACzB;IACF,CAAC;IAED,iBAAiB;QAChB,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;IAC1E,CAAC;IAED,oBAAoB;QACnB,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,cAAc,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;IAC7E,CAAC;IAED,MAAM;QACL,IAAI,UAAU,GAAG,YAAY,CAAC,OAAO,EAAE,CAAC;QACxC,OAAO,CACN,6BAAK,SAAS,EAAC,aAAa;YAC3B,oBAAC,SAAS,OAAG;YACb,oBAAC,QAAQ,OAAG;YACZ,oBAAC,MAAM,OAAG;YACV,oBAAC,QAAQ,IAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAC,OAAO,EAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,CAAC,UAAU,GAAI,CAC3G,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\nimport SearchBox from \"./SearchBox\";\nimport TagsMenu from \"../../../shared/TagsMenu\";\nimport SortBy from \"./SortBy\";\nimport TagsList from \"./TagsList\";\nimport { getStore } from \"../stores/LauncherStore\";\nimport storeActions from \"../stores/StoreActions\";\nimport StoreModel from \"@finsemble/finsemble-api/types/clients/StoreModel\";\n\ninterface IProps {}\n\ninterface IState {\n\ttags: string[];\n\tsearch: string;\n}\n\nlet store: StoreModel | undefined;\n\nexport default class FilterSort extends React.Component<IProps, IState> {\n\tconstructor(props: IProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\ttags: [],\n\t\t\tsearch: \"\",\n\t\t};\n\t\tthis.onSearch = this.onSearch.bind(this);\n\t\tthis.setStateValues = this.setStateValues.bind(this);\n\t\tstore = getStore();\n\t}\n\n\tsetStateValues() {\n\t\tthis.setState({\n\t\t\ttags: storeActions.getAllAppsTags(),\n\t\t});\n\t}\n\n\tonSearch(event: any) {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tsearch: event.target.value,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tgetStore()?.setValue({\n\t\t\t\t\tfield: \"filterText\",\n\t\t\t\t\tvalue: this.state.search,\n\t\t\t\t});\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * Add tag to list in local store\n\t * so that other components get notified\n\t **/\n\tonTagClick(tag: string) {\n\t\tlet tags = storeActions.getTags();\n\n\t\tif (tags.includes(tag)) {\n\t\t\tstoreActions.deleteTag(tag);\n\t\t} else {\n\t\t\tstoreActions.addTag(tag);\n\t\t}\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.setStateValues();\n\t\tstore?.addListener({ field: \"appFolders.folders\" }, this.setStateValues);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tstore?.removeListener({ field: \"appFolders.folders\" }, this.setStateValues);\n\t}\n\n\trender() {\n\t\tlet activeTags = storeActions.getTags();\n\t\treturn (\n\t\t\t<div className=\"filter-sort\">\n\t\t\t\t<SearchBox />\n\t\t\t\t<TagsList />\n\t\t\t\t<SortBy />\n\t\t\t\t<TagsMenu label=\"Tags\" align=\"right\" list={this.state.tags} active={activeTags} onItemClick={this.onTagClick} />\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { FoldersType, FolderType } from "../../../../types/advancedAppLauncherTypes";
|
|
3
|
-
import { StandardError } from "@finsemble/finsemble-
|
|
3
|
+
import { StandardError } from "@finsemble/finsemble-api/types/types";
|
|
4
4
|
interface IProps {
|
|
5
5
|
}
|
|
6
6
|
interface IState {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fo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MAAM,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QACrD,CAAC,CAAC,CAAC;IACJ,CAAC;IAKD,sBAAsB;QACrB,MAAM,OAAO,GAAG,YAAY,CAAC,UAAU,EAAE,CAAC;QAC1C,MAAM,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CACrD,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,UAAU,IAAI,OAAO,CAC3E,CAAC;QACF,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,EAAE;YACjD,MAAM,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;YACnC,OAAO,CACN,oBAAC,kBAAkB,IAAC,WAAW,EAAE,UAAU,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,IACnE,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC,CACzB,CACrB,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM;QACL,OAAO,CACN,6BAAK,SAAS,EAAC,KAAK;YACnB,6BAAK,SAAS,EAAC,aAAa,EAAC,GAAG,EAAE,IAAI,CAAC,OAAO;gBAC5C,IAAI,CAAC,wBAAwB,EAAE;gBAChC,oBAAC,mBAAmB,IAAC,SAAS,EAAE,IAAI,CAAC,SAAS,IAAG,IAAI,CAAC,sBAAsB,EAAE,CAAuB,CAChG,CACD,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\nimport storeActions from \"../stores/StoreActions\";\nimport { getStore } from \"../stores/LauncherStore\";\nimport { useFavorites } from \"../../../../hooks/useFavorites\";\nimport { FinsembleDraggable } from \"../../../legacyControls/FinsembleDraggable\";\nimport { FinsembleDnDContext } from \"../../../legacyControls/FinsembleDnDContext\";\nimport { FavoriteCategory, FolderAppType, FoldersType, FolderType } from \"../../../../types/advancedAppLauncherTypes\";\nimport { StandardError } from \"@finsemble/finsemble-core/types/types\";\nconst { ADVANCED_APP_LAUNCHER, DASHBOARDS, FAVORITES } = storeActions.getConstants();\n\nconst dragDisabled = storeActions.getDragDisabled();\n\ninterface IProps {}\n\ninterface IState {\n\tfoldersList: FoldersType[\"list\"];\n\tactiveFolder: string;\n\trenamingFolder: any | null;\n\tfolderNameInput: string;\n\tisNameError: boolean;\n}\n\ntype RenderFolderProps = {\n\tonDragOver: (e: React.DragEvent<HTMLDivElement>) => void;\n\tonDrop: (e: React.DragEvent<HTMLDivElement>) => void;\n\tonClick: (event: React.MouseEvent) => void;\n\tclassName: string;\n\tchildren?: React.ReactNode;\n\ttitle: string;\n};\n\nconst RenderButtons = (props: any) => {\n\tif (!props.showIcon) return <></>;\n\n\tconst { isEditing, canEdit, canDelete, attemptRename, cancelEdit, renameFolder, deleteFolder } = props;\n\n\tif (isEditing) {\n\t\t// We can't use onClick for these buttons because onBlur causes a re-render of these buttons which means mousedown and mouseup\n\t\t// technically don't fire on the same button. This means onClick is never fired, so we trigger the buttons on mousedown instead.\n\t\t// For more information see: https://www.eventbrite.com/engineering/a-story-of-a-react-re-rendering-bug/\n\t\treturn (\n\t\t\t<span className=\"folder-action-icons\">\n\t\t\t\t<i id=\"confirm-edit\" className=\"ff-check-mark-2\" title=\"Accept Rename\" onMouseDown={attemptRename}></i>\n\t\t\t\t<i id=\"cancel-edit\" className=\"ff-close\" title=\"Cancel\" onMouseDown={cancelEdit}></i>\n\t\t\t</span>\n\t\t);\n\t} else {\n\t\treturn (\n\t\t\t<span className=\"folder-action-icons\">\n\t\t\t\t{canEdit && <i className=\"ff-adp-edit\" title=\"Rename\" onClick={renameFolder}></i>}\n\t\t\t\t{canDelete && <i className=\"ff-adp-trash-outline\" title=\"Delete Folder\" onClick={deleteFolder}></i>}\n\t\t\t</span>\n\t\t);\n\t}\n};\n\nconst RenderFolder = (props: RenderFolderProps) => {\n\tconst { addFavorite, isFavorited, favorites } = useFavorites();\n\t// If an app is dropped in the Favorites folder, favorite the app\n\tconst onDrop = (e: React.DragEvent<HTMLDivElement>) => {\n\t\tprops.onDrop(e);\n\t\tconst app = JSON.parse(e.dataTransfer.getData(\"app\"));\n\t\tif (props.title === FAVORITES && !isFavorited(app.name)) {\n\t\t\tconst favoriteApp = {\n\t\t\t\tid: app.name,\n\t\t\t\tcategory: \"Application\" as FavoriteCategory,\n\t\t\t\tname: app.name,\n\t\t\t\ticon: app.icon,\n\t\t\t};\n\t\t\taddFavorite(favoriteApp);\n\t\t}\n\t};\n\t// When favorites changes remove all items from the favorites folder and re-add all current favorites.\n\tReact.useEffect(() => {\n\t\tconst existingFavApps: FolderAppType[] = storeActions.getAllAppsFromFolder(FAVORITES);\n\t\tObject.values(existingFavApps).forEach((app) => {\n\t\t\tif (!favorites.some((fav) => fav.name === app.name)) {\n\t\t\t\tstoreActions.removeAppFromFolder(\"Favorites\", app);\n\t\t\t}\n\t\t});\n\t\tfavorites.forEach((fav) => {\n\t\t\tconst app = storeActions.findAppByField(\"name\", fav.name) || storeActions.findAppByField(\"displayName\", fav.name);\n\t\t\t// may have things other than favorites in here.\n\t\t\tif (app) {\n\t\t\t\tstoreActions.addAppToFolder(\"Favorites\", app);\n\t\t\t}\n\t\t});\n\t}, [favorites]);\n\treturn (\n\t\t<div {...props} onDrop={onDrop}>\n\t\t\t{props.children}\n\t\t</div>\n\t);\n};\n\nexport default class FoldersList extends React.Component<IProps, IState> {\n\tlistDiv: React.RefObject<HTMLDivElement> | undefined;\n\n\terrorInput: React.RefObject<HTMLInputElement> | undefined;\n\n\tmouseY: number | null;\n\n\tconstructor(props: IProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tfoldersList: storeActions.getFoldersList(),\n\t\t\tactiveFolder: storeActions.getActiveFolderName(),\n\t\t\trenamingFolder: null,\n\t\t\tfolderNameInput: \"\",\n\t\t\tisNameError: false,\n\t\t};\n\t\t// Reference to ontainer element of folder list\n\t\tthis.listDiv = React.createRef();\n\t\tthis.renameFolder = this.renameFolder.bind(this);\n\t\tthis.changeFolderName = this.changeFolderName.bind(this);\n\t\tthis.cancelEdit = this.cancelEdit.bind(this);\n\t\tthis.onFoldersListUpdate = this.onFoldersListUpdate.bind(this);\n\t\tthis.keyPressed = this.keyPressed.bind(this);\n\t\tthis.deleteFolder = this.deleteFolder.bind(this);\n\t\tthis.onFocusRemove = this.onFocusRemove.bind(this);\n\t\tthis.onDragEnd = this.onDragEnd.bind(this);\n\t\tthis.onMouseMove = this.onMouseMove.bind(this);\n\t\tthis.animateErrorInput = this.animateErrorInput.bind(this);\n\n\t\t// The last known mouse Y position\n\t\tthis.mouseY = null;\n\n\t\t//Reference to a folder name input in error\n\t\tthis.errorInput = React.createRef();\n\t}\n\n\tanimateErrorInput() {\n\t\tif (this.errorInput?.current) {\n\t\t\tthis.errorInput.current.classList.remove(\"error\");\n\t\t\tconst flickerInput = setTimeout(() => {\n\t\t\t\tif (this.errorInput?.current) {\n\t\t\t\t\tthis.errorInput.current.classList.add(\"error\");\n\t\t\t\t}\n\t\t\t\tclearTimeout(flickerInput);\n\t\t\t}, 500);\n\t\t}\n\t}\n\n\tcancelEdit() {\n\t\tconsole.log(\"cancelling edit\");\n\t\tthis.setState({\n\t\t\trenamingFolder: null,\n\t\t\tisNameError: false,\n\t\t\tfolderNameInput: \"\",\n\t\t});\n\t}\n\n\t/**\n\t * Keeps a track of the last mouse's clientY position\n\t * @param {MouseEvent} event The mouse move event\n\t */\n\tonMouseMove(event: MouseEvent) {\n\t\tthis.mouseY = event.clientY;\n\t}\n\n\tonDragEnd({ oldIndex, newIndex }: { oldIndex: number; newIndex: number }) {\n\t\tstoreActions.reorderFolders(oldIndex, newIndex);\n\t}\n\n\tonAppDrop(event: React.DragEvent, folder: string) {\n\t\tevent.preventDefault();\n\t\tconst app = JSON.parse(event.dataTransfer.getData(\"app\"));\n\t\t// Do not do anything if its Advanced App Launcher or dashboards folder\n\t\tif ([ADVANCED_APP_LAUNCHER, DASHBOARDS].indexOf(folder) < 0) {\n\t\t\tstoreActions.addAppToFolder(folder, app);\n\t\t}\n\t}\n\n\tonFoldersListUpdate(error: StandardError, data: { value: FoldersType[\"list\"] }) {\n\t\tthis.setState({\n\t\t\tfoldersList: data.value,\n\t\t});\n\t}\n\n\tonFolderClicked(event: React.MouseEvent, folder: string) {\n\t\tgetStore()?.setValue(\n\t\t\t{\n\t\t\t\tfield: \"activeFolder\",\n\t\t\t\tvalue: folder,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.setState({\n\t\t\t\t\tactiveFolder: folder,\n\t\t\t\t});\n\t\t\t}\n\t\t);\n\t}\n\n\tonFocusRemove() {\n\t\tif (this.state.isNameError) {\n\t\t\tthis.animateErrorInput();\n\t\t}\n\t\t// If focus removed and nothing was type, then just hide\n\t\t// and consider it a rename cancel\n\t\tif (!this.state.folderNameInput) {\n\t\t\t// Cancel rename\n\t\t\tthis.setState({\n\t\t\t\trenamingFolder: null,\n\t\t\t\tisNameError: false,\n\t\t\t\tfolderNameInput: \"\",\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\t// Finally, all good and so we can rename the folder\n\t\tthis.attemptRename();\n\t}\n\n\tUNSAFE_componentWillMount() {\n\t\tgetStore()?.addListener({ field: \"appFolders.list\" }, this.onFoldersListUpdate);\n\t\tdocument.addEventListener(\"mousemove\", this.onMouseMove);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tgetStore()?.addListener({ field: \"appFolders.list\" }, this.onFoldersListUpdate);\n\t\tdocument.removeEventListener(\"mousemove\", this.onMouseMove);\n\t}\n\n\trenameFolder(name: string, e: React.MouseEvent) {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\tif (!this.state.isNameError) {\n\t\t\tthis.setState({\n\t\t\t\trenamingFolder: name,\n\t\t\t});\n\t\t}\n\t}\n\n\tchangeFolderName(e: React.ChangeEvent<HTMLInputElement>) {\n\t\tthis.setState({\n\t\t\tfolderNameInput: e.target.value,\n\t\t});\n\t}\n\n\tdeleteFolder(name: string, e: React.MouseEvent) {\n\t\te.stopPropagation();\n\t\te.preventDefault();\n\t\t// Do not attempt to delete if user is renaming a folder\n\t\t!this.state.renamingFolder && storeActions.deleteFolder(name);\n\t}\n\n\tkeyPressed(e: React.KeyboardEvent<HTMLInputElement>) {\n\t\tif (e.key === \"Enter\") {\n\t\t\tthis.attemptRename();\n\t\t}\n\t}\n\n\t/**\n\t * To be called when user press Enter or when focus is removed\n\t */\n\tattemptRename() {\n\t\tconst folders = storeActions.getFolders();\n\t\tconst input = this.state.folderNameInput.trim();\n\t\tconst oldName = this.state.renamingFolder;\n\t\tlet newName = input;\n\t\t// Check user input to make sure its at least 1 character\n\t\t// made of string, number or both\n\t\tif (!/^([a-zA-Z0-9\\s]{1,})$/.test(input)) {\n\t\t\t// Do not rename\n\t\t\tconsole.warn(\"A valid folder name is required. /^([a-zA-Z0-9s]{1,})$/\");\n\t\t\treturn this.setState({\n\t\t\t\tisNameError: true,\n\t\t\t});\n\t\t}\n\n\t\t// Check if the submission is the same text as the old name.\n\t\t// If false, renaming will be skipped\n\t\tlet nameChanged = true;\n\t\t// We no longer allow leading or trailing spaces, but the trim on the oldName needs to remain for any existing folders\n\t\tif (oldName.trim() === newName) nameChanged = false;\n\n\t\t// Names must be unique, folders cant share same names\n\t\tif (folders[newName]) {\n\t\t\tlet repeatedFolderIndex = 0;\n\t\t\tdo {\n\t\t\t\trepeatedFolderIndex++;\n\t\t\t} while (Object.keys(folders).includes(`${newName}(${repeatedFolderIndex})`));\n\t\t\tnewName = `${newName}(${repeatedFolderIndex})`;\n\t\t}\n\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tfolderNameInput: \"\",\n\t\t\t\trenamingFolder: null,\n\t\t\t\tisNameError: false,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tif (nameChanged) {\n\t\t\t\t\tstoreActions.renameFolder(oldName, newName);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * Given some data, renders the basic folder structure that cannot be unordered. Used for orderable folders too. Those just get wrapped in a Draggable\n\t */\n\trenderFolder(folder: FolderType, folderName: string, index: number) {\n\t\tlet className = \"complex-menu-section-toggle\";\n\t\tif (this.state.activeFolder === folderName) {\n\t\t\tclassName = `${className} active-section-toggle`;\n\t\t}\n\t\tif (folder.icon) {\n\t\t\tclassName = `${className} folder-with-icon`;\n\t\t}\n\n\t\tconst { canDelete, canEdit } = folder;\n\n\t\tlet nameField,\n\t\t\tisEditing = false;\n\t\tif (this.state.renamingFolder === folderName && canEdit) {\n\t\t\tconst { isNameError } = this.state;\n\t\t\tnameField = (\n\t\t\t\t<input\n\t\t\t\t\tid=\"rename\"\n\t\t\t\t\tvalue={this.state.folderNameInput}\n\t\t\t\t\tonChange={this.changeFolderName}\n\t\t\t\t\tonKeyPress={this.keyPressed}\n\t\t\t\t\tonBlur={this.onFocusRemove}\n\t\t\t\t\tclassName={isNameError ? \"error\" : \"\"}\n\t\t\t\t\tautoFocus\n\t\t\t\t\tref={isNameError ? this.errorInput : null}\n\t\t\t\t/>\n\t\t\t);\n\t\t\tisEditing = true;\n\t\t} else if (folderName === \"Advanced App Launcher\") {\n\t\t\tnameField = \"App Launcher\";\n\t\t} else {\n\t\t\tnameField = folderName;\n\t\t}\n\n\t\tconst showIcon = canEdit || canDelete;\n\n\t\t// This DOM will be rendered within a draggable (if the folder can be dragged), and a plain ol div if it cannot be dragged.\n\t\treturn (\n\t\t\t<RenderFolder\n\t\t\t\tonDragOver={(event: React.DragEvent) => event.preventDefault()}\n\t\t\t\tonDrop={(event: React.DragEvent) => this.onAppDrop(event, folderName)}\n\t\t\t\tonClick={(event: React.MouseEvent) => this.onFolderClicked(event, folderName)}\n\t\t\t\tclassName={className}\n\t\t\t\tkey={index}\n\t\t\t\ttitle={folderName}\n\t\t\t>\n\t\t\t\t<div className=\"left-nav-label\">\n\t\t\t\t\t{folder.icon && <i className={folder.icon}></i>}\n\t\t\t\t\t<div className=\"folder-name\">{nameField}</div>\n\t\t\t\t</div>\n\t\t\t\t<RenderButtons\n\t\t\t\t\tshowIcon={showIcon}\n\t\t\t\t\tisEditing={isEditing}\n\t\t\t\t\tcanEdit={canEdit}\n\t\t\t\t\tcanDelete={canDelete}\n\t\t\t\t\tattemptRename={() => this.attemptRename()}\n\t\t\t\t\tcancelEdit={() => this.cancelEdit()}\n\t\t\t\t\trenameFolder={(event: React.DragEvent) => this.renameFolder(folderName, event)}\n\t\t\t\t\tdeleteFolder={(event: React.DragEvent) => this.deleteFolder(folderName, event)}\n\t\t\t\t/>\n\t\t\t</RenderFolder>\n\t\t);\n\t}\n\n\t/**\n\t * Render all folders that cannot be reordered.\n\t */\n\trenderUnorderableFolders() {\n\t\tconst folders: FoldersType[\"folders\"] = storeActions.getFolders();\n\t\tconst unorderableFolders: string[] = this.state.foldersList.filter(\n\t\t\t(folderName) => dragDisabled.includes(folderName) && folderName in folders\n\t\t);\n\t\treturn unorderableFolders.map((folderName: string, index) => {\n\t\t\tconst folder: FolderType = folders[folderName];\n\t\t\tfolder.icon = \"\";\n\t\t\treturn this.renderFolder(folder, folderName, index);\n\t\t});\n\t}\n\n\t/**\n\t * Renders all folders that can be reordered (user created folders).\n\t */\n\trenderOrderableFolders() {\n\t\tconst folders = storeActions.getFolders();\n\t\tconst orderableFolders = this.state.foldersList.filter(\n\t\t\t(folderName) => !dragDisabled.includes(folderName) && folderName in folders\n\t\t);\n\t\treturn orderableFolders.map((folderName, index) => {\n\t\t\tconst folder = folders[folderName];\n\t\t\treturn (\n\t\t\t\t<FinsembleDraggable draggableId={folderName} key={index} index={index}>\n\t\t\t\t\t{this.renderFolder(folder, folderName, index)}\n\t\t\t\t</FinsembleDraggable>\n\t\t\t);\n\t\t});\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<div className=\"top\">\n\t\t\t\t<div className=\"folder-list\" ref={this.listDiv}>\n\t\t\t\t\t{this.renderUnorderableFolders()}\n\t\t\t\t\t<FinsembleDnDContext onDragEnd={this.onDragEnd}>{this.renderOrderableFolders()}</FinsembleDnDContext>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FoldersList.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/FoldersList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAGlF,MAAM,EAAE,qBAAqB,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,YAAY,CAAC,YAAY,EAAE,CAAC;AAErF,MAAM,YAAY,GAAG,YAAY,CAAC,eAAe,EAAE,CAAC;AAqBpD,MAAM,aAAa,GAAG,CAAC,KAAU,EAAE,EAAE;IACpC,IAAI,CAAC,KAAK,CAAC,QAAQ;QAAE,OAAO,yCAAK,CAAC;IAElC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;IAEvG,IAAI,SAAS,EAAE;QAId,OAAO,CACN,8BAAM,SAAS,EAAC,qBAAqB;YACpC,2BAAG,EAAE,EAAC,cAAc,EAAC,SAAS,EAAC,iBAAiB,EAAC,KAAK,EAAC,eAAe,EAAC,WAAW,EAAE,aAAa,GAAM;YACvG,2BAAG,EAAE,EAAC,aAAa,EAAC,SAAS,EAAC,UAAU,EAAC,KAAK,EAAC,QAAQ,EAAC,WAAW,EAAE,UAAU,GAAM,CAC/E,CACP,CAAC;KACF;SAAM;QACN,OAAO,CACN,8BAAM,SAAS,EAAC,qBAAqB;YACnC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,GAAe,OAAO,CAAC,UAAU,CAAC,CAAC;YAC/C,MAAM,CAAC,IAAI,GAAG,EAAE,CAAC;YACjB,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QACrD,CAAC,CAAC,CAAC;IACJ,CAAC;IAKD,sBAAsB;QACrB,MAAM,OAAO,GAAG,YAAY,CAAC,UAAU,EAAE,CAAC;QAC1C,MAAM,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CACrD,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,UAAU,IAAI,OAAO,CAC3E,CAAC;QACF,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,EAAE;YACjD,MAAM,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;YACnC,OAAO,CACN,oBAAC,kBAAkB,IAAC,WAAW,EAAE,UAAU,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,IACnE,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC,CACzB,CACrB,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM;QACL,OAAO,CACN,6BAAK,SAAS,EAAC,KAAK;YACnB,6BAAK,SAAS,EAAC,aAAa,EAAC,GAAG,EAAE,IAAI,CAAC,OAAO;gBAC5C,IAAI,CAAC,wBAAwB,EAAE;gBAChC,oBAAC,mBAAmB,IAAC,SAAS,EAAE,IAAI,CAAC,SAAS,IAAG,IAAI,CAAC,sBAAsB,EAAE,CAAuB,CAChG,CACD,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\nimport storeActions from \"../stores/StoreActions\";\nimport { getStore } from \"../stores/LauncherStore\";\nimport { useFavorites } from \"../../../../hooks/useFavorites\";\nimport { FinsembleDraggable } from \"../../../legacyControls/FinsembleDraggable\";\nimport { FinsembleDnDContext } from \"../../../legacyControls/FinsembleDnDContext\";\nimport { FavoriteCategory, FolderAppType, FoldersType, FolderType } from \"../../../../types/advancedAppLauncherTypes\";\nimport { StandardError } from \"@finsemble/finsemble-api/types/types\";\nconst { ADVANCED_APP_LAUNCHER, DASHBOARDS, FAVORITES } = storeActions.getConstants();\n\nconst dragDisabled = storeActions.getDragDisabled();\n\ninterface IProps {}\n\ninterface IState {\n\tfoldersList: FoldersType[\"list\"];\n\tactiveFolder: string;\n\trenamingFolder: any | null;\n\tfolderNameInput: string;\n\tisNameError: boolean;\n}\n\ntype RenderFolderProps = {\n\tonDragOver: (e: React.DragEvent<HTMLDivElement>) => void;\n\tonDrop: (e: React.DragEvent<HTMLDivElement>) => void;\n\tonClick: (event: React.MouseEvent) => void;\n\tclassName: string;\n\tchildren?: React.ReactNode;\n\ttitle: string;\n};\n\nconst RenderButtons = (props: any) => {\n\tif (!props.showIcon) return <></>;\n\n\tconst { isEditing, canEdit, canDelete, attemptRename, cancelEdit, renameFolder, deleteFolder } = props;\n\n\tif (isEditing) {\n\t\t// We can't use onClick for these buttons because onBlur causes a re-render of these buttons which means mousedown and mouseup\n\t\t// technically don't fire on the same button. This means onClick is never fired, so we trigger the buttons on mousedown instead.\n\t\t// For more information see: https://www.eventbrite.com/engineering/a-story-of-a-react-re-rendering-bug/\n\t\treturn (\n\t\t\t<span className=\"folder-action-icons\">\n\t\t\t\t<i id=\"confirm-edit\" className=\"ff-check-mark-2\" title=\"Accept Rename\" onMouseDown={attemptRename}></i>\n\t\t\t\t<i id=\"cancel-edit\" className=\"ff-close\" title=\"Cancel\" onMouseDown={cancelEdit}></i>\n\t\t\t</span>\n\t\t);\n\t} else {\n\t\treturn (\n\t\t\t<span className=\"folder-action-icons\">\n\t\t\t\t{canEdit && <i className=\"ff-adp-edit\" title=\"Rename\" onClick={renameFolder}></i>}\n\t\t\t\t{canDelete && <i className=\"ff-adp-trash-outline\" title=\"Delete Folder\" onClick={deleteFolder}></i>}\n\t\t\t</span>\n\t\t);\n\t}\n};\n\nconst RenderFolder = (props: RenderFolderProps) => {\n\tconst { addFavorite, isFavorited, favorites } = useFavorites();\n\t// If an app is dropped in the Favorites folder, favorite the app\n\tconst onDrop = (e: React.DragEvent<HTMLDivElement>) => {\n\t\tprops.onDrop(e);\n\t\tconst app = JSON.parse(e.dataTransfer.getData(\"app\"));\n\t\tif (props.title === FAVORITES && !isFavorited(app.name)) {\n\t\t\tconst favoriteApp = {\n\t\t\t\tid: app.name,\n\t\t\t\tcategory: \"Application\" as FavoriteCategory,\n\t\t\t\tname: app.name,\n\t\t\t\ticon: app.icon,\n\t\t\t};\n\t\t\taddFavorite(favoriteApp);\n\t\t}\n\t};\n\t// When favorites changes remove all items from the favorites folder and re-add all current favorites.\n\tReact.useEffect(() => {\n\t\tconst existingFavApps: FolderAppType[] = storeActions.getAllAppsFromFolder(FAVORITES);\n\t\tObject.values(existingFavApps).forEach((app) => {\n\t\t\tif (!favorites.some((fav) => fav.name === app.name)) {\n\t\t\t\tstoreActions.removeAppFromFolder(\"Favorites\", app);\n\t\t\t}\n\t\t});\n\t\tfavorites.forEach((fav) => {\n\t\t\tconst app = storeActions.findAppByField(\"name\", fav.name) || storeActions.findAppByField(\"displayName\", fav.name);\n\t\t\t// may have things other than favorites in here.\n\t\t\tif (app) {\n\t\t\t\tstoreActions.addAppToFolder(\"Favorites\", app);\n\t\t\t}\n\t\t});\n\t}, [favorites]);\n\treturn (\n\t\t<div {...props} onDrop={onDrop}>\n\t\t\t{props.children}\n\t\t</div>\n\t);\n};\n\nexport default class FoldersList extends React.Component<IProps, IState> {\n\tlistDiv: React.RefObject<HTMLDivElement> | undefined;\n\n\terrorInput: React.RefObject<HTMLInputElement> | undefined;\n\n\tmouseY: number | null;\n\n\tconstructor(props: IProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tfoldersList: storeActions.getFoldersList(),\n\t\t\tactiveFolder: storeActions.getActiveFolderName(),\n\t\t\trenamingFolder: null,\n\t\t\tfolderNameInput: \"\",\n\t\t\tisNameError: false,\n\t\t};\n\t\t// Reference to ontainer element of folder list\n\t\tthis.listDiv = React.createRef();\n\t\tthis.renameFolder = this.renameFolder.bind(this);\n\t\tthis.changeFolderName = this.changeFolderName.bind(this);\n\t\tthis.cancelEdit = this.cancelEdit.bind(this);\n\t\tthis.onFoldersListUpdate = this.onFoldersListUpdate.bind(this);\n\t\tthis.keyPressed = this.keyPressed.bind(this);\n\t\tthis.deleteFolder = this.deleteFolder.bind(this);\n\t\tthis.onFocusRemove = this.onFocusRemove.bind(this);\n\t\tthis.onDragEnd = this.onDragEnd.bind(this);\n\t\tthis.onMouseMove = this.onMouseMove.bind(this);\n\t\tthis.animateErrorInput = this.animateErrorInput.bind(this);\n\n\t\t// The last known mouse Y position\n\t\tthis.mouseY = null;\n\n\t\t//Reference to a folder name input in error\n\t\tthis.errorInput = React.createRef();\n\t}\n\n\tanimateErrorInput() {\n\t\tif (this.errorInput?.current) {\n\t\t\tthis.errorInput.current.classList.remove(\"error\");\n\t\t\tconst flickerInput = setTimeout(() => {\n\t\t\t\tif (this.errorInput?.current) {\n\t\t\t\t\tthis.errorInput.current.classList.add(\"error\");\n\t\t\t\t}\n\t\t\t\tclearTimeout(flickerInput);\n\t\t\t}, 500);\n\t\t}\n\t}\n\n\tcancelEdit() {\n\t\tconsole.log(\"cancelling edit\");\n\t\tthis.setState({\n\t\t\trenamingFolder: null,\n\t\t\tisNameError: false,\n\t\t\tfolderNameInput: \"\",\n\t\t});\n\t}\n\n\t/**\n\t * Keeps a track of the last mouse's clientY position\n\t * @param {MouseEvent} event The mouse move event\n\t */\n\tonMouseMove(event: MouseEvent) {\n\t\tthis.mouseY = event.clientY;\n\t}\n\n\tonDragEnd({ oldIndex, newIndex }: { oldIndex: number; newIndex: number }) {\n\t\tstoreActions.reorderFolders(oldIndex, newIndex);\n\t}\n\n\tonAppDrop(event: React.DragEvent, folder: string) {\n\t\tevent.preventDefault();\n\t\tconst app = JSON.parse(event.dataTransfer.getData(\"app\"));\n\t\t// Do not do anything if its Advanced App Launcher or dashboards folder\n\t\tif ([ADVANCED_APP_LAUNCHER, DASHBOARDS].indexOf(folder) < 0) {\n\t\t\tstoreActions.addAppToFolder(folder, app);\n\t\t}\n\t}\n\n\tonFoldersListUpdate(error: StandardError, data: { value: FoldersType[\"list\"] }) {\n\t\tthis.setState({\n\t\t\tfoldersList: data.value,\n\t\t});\n\t}\n\n\tonFolderClicked(event: React.MouseEvent, folder: string) {\n\t\tgetStore()?.setValue(\n\t\t\t{\n\t\t\t\tfield: \"activeFolder\",\n\t\t\t\tvalue: folder,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.setState({\n\t\t\t\t\tactiveFolder: folder,\n\t\t\t\t});\n\t\t\t}\n\t\t);\n\t}\n\n\tonFocusRemove() {\n\t\tif (this.state.isNameError) {\n\t\t\tthis.animateErrorInput();\n\t\t}\n\t\t// If focus removed and nothing was type, then just hide\n\t\t// and consider it a rename cancel\n\t\tif (!this.state.folderNameInput) {\n\t\t\t// Cancel rename\n\t\t\tthis.setState({\n\t\t\t\trenamingFolder: null,\n\t\t\t\tisNameError: false,\n\t\t\t\tfolderNameInput: \"\",\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\t// Finally, all good and so we can rename the folder\n\t\tthis.attemptRename();\n\t}\n\n\tUNSAFE_componentWillMount() {\n\t\tgetStore()?.addListener({ field: \"appFolders.list\" }, this.onFoldersListUpdate);\n\t\tdocument.addEventListener(\"mousemove\", this.onMouseMove);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tgetStore()?.addListener({ field: \"appFolders.list\" }, this.onFoldersListUpdate);\n\t\tdocument.removeEventListener(\"mousemove\", this.onMouseMove);\n\t}\n\n\trenameFolder(name: string, e: React.MouseEvent) {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\tif (!this.state.isNameError) {\n\t\t\tthis.setState({\n\t\t\t\trenamingFolder: name,\n\t\t\t});\n\t\t}\n\t}\n\n\tchangeFolderName(e: React.ChangeEvent<HTMLInputElement>) {\n\t\tthis.setState({\n\t\t\tfolderNameInput: e.target.value,\n\t\t});\n\t}\n\n\tdeleteFolder(name: string, e: React.MouseEvent) {\n\t\te.stopPropagation();\n\t\te.preventDefault();\n\t\t// Do not attempt to delete if user is renaming a folder\n\t\t!this.state.renamingFolder && storeActions.deleteFolder(name);\n\t}\n\n\tkeyPressed(e: React.KeyboardEvent<HTMLInputElement>) {\n\t\tif (e.key === \"Enter\") {\n\t\t\tthis.attemptRename();\n\t\t}\n\t}\n\n\t/**\n\t * To be called when user press Enter or when focus is removed\n\t */\n\tattemptRename() {\n\t\tconst folders = storeActions.getFolders();\n\t\tconst input = this.state.folderNameInput.trim();\n\t\tconst oldName = this.state.renamingFolder;\n\t\tlet newName = input;\n\t\t// Check user input to make sure its at least 1 character\n\t\t// made of string, number or both\n\t\tif (!/^([a-zA-Z0-9\\s]{1,})$/.test(input)) {\n\t\t\t// Do not rename\n\t\t\tconsole.warn(\"A valid folder name is required. /^([a-zA-Z0-9s]{1,})$/\");\n\t\t\treturn this.setState({\n\t\t\t\tisNameError: true,\n\t\t\t});\n\t\t}\n\n\t\t// Check if the submission is the same text as the old name.\n\t\t// If false, renaming will be skipped\n\t\tlet nameChanged = true;\n\t\t// We no longer allow leading or trailing spaces, but the trim on the oldName needs to remain for any existing folders\n\t\tif (oldName.trim() === newName) nameChanged = false;\n\n\t\t// Names must be unique, folders cant share same names\n\t\tif (folders[newName]) {\n\t\t\tlet repeatedFolderIndex = 0;\n\t\t\tdo {\n\t\t\t\trepeatedFolderIndex++;\n\t\t\t} while (Object.keys(folders).includes(`${newName}(${repeatedFolderIndex})`));\n\t\t\tnewName = `${newName}(${repeatedFolderIndex})`;\n\t\t}\n\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tfolderNameInput: \"\",\n\t\t\t\trenamingFolder: null,\n\t\t\t\tisNameError: false,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tif (nameChanged) {\n\t\t\t\t\tstoreActions.renameFolder(oldName, newName);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * Given some data, renders the basic folder structure that cannot be unordered. Used for orderable folders too. Those just get wrapped in a Draggable\n\t */\n\trenderFolder(folder: FolderType, folderName: string, index: number) {\n\t\tlet className = \"complex-menu-section-toggle\";\n\t\tif (this.state.activeFolder === folderName) {\n\t\t\tclassName = `${className} active-section-toggle`;\n\t\t}\n\t\tif (folder.icon) {\n\t\t\tclassName = `${className} folder-with-icon`;\n\t\t}\n\n\t\tconst { canDelete, canEdit } = folder;\n\n\t\tlet nameField,\n\t\t\tisEditing = false;\n\t\tif (this.state.renamingFolder === folderName && canEdit) {\n\t\t\tconst { isNameError } = this.state;\n\t\t\tnameField = (\n\t\t\t\t<input\n\t\t\t\t\tid=\"rename\"\n\t\t\t\t\tvalue={this.state.folderNameInput}\n\t\t\t\t\tonChange={this.changeFolderName}\n\t\t\t\t\tonKeyPress={this.keyPressed}\n\t\t\t\t\tonBlur={this.onFocusRemove}\n\t\t\t\t\tclassName={isNameError ? \"error\" : \"\"}\n\t\t\t\t\tautoFocus\n\t\t\t\t\tref={isNameError ? this.errorInput : null}\n\t\t\t\t/>\n\t\t\t);\n\t\t\tisEditing = true;\n\t\t} else if (folderName === \"Advanced App Launcher\") {\n\t\t\tnameField = \"App Launcher\";\n\t\t} else {\n\t\t\tnameField = folderName;\n\t\t}\n\n\t\tconst showIcon = canEdit || canDelete;\n\n\t\t// This DOM will be rendered within a draggable (if the folder can be dragged), and a plain ol div if it cannot be dragged.\n\t\treturn (\n\t\t\t<RenderFolder\n\t\t\t\tonDragOver={(event: React.DragEvent) => event.preventDefault()}\n\t\t\t\tonDrop={(event: React.DragEvent) => this.onAppDrop(event, folderName)}\n\t\t\t\tonClick={(event: React.MouseEvent) => this.onFolderClicked(event, folderName)}\n\t\t\t\tclassName={className}\n\t\t\t\tkey={index}\n\t\t\t\ttitle={folderName}\n\t\t\t>\n\t\t\t\t<div className=\"left-nav-label\">\n\t\t\t\t\t{folder.icon && <i className={folder.icon}></i>}\n\t\t\t\t\t<div className=\"folder-name\">{nameField}</div>\n\t\t\t\t</div>\n\t\t\t\t<RenderButtons\n\t\t\t\t\tshowIcon={showIcon}\n\t\t\t\t\tisEditing={isEditing}\n\t\t\t\t\tcanEdit={canEdit}\n\t\t\t\t\tcanDelete={canDelete}\n\t\t\t\t\tattemptRename={() => this.attemptRename()}\n\t\t\t\t\tcancelEdit={() => this.cancelEdit()}\n\t\t\t\t\trenameFolder={(event: React.DragEvent) => this.renameFolder(folderName, event)}\n\t\t\t\t\tdeleteFolder={(event: React.DragEvent) => this.deleteFolder(folderName, event)}\n\t\t\t\t/>\n\t\t\t</RenderFolder>\n\t\t);\n\t}\n\n\t/**\n\t * Render all folders that cannot be reordered.\n\t */\n\trenderUnorderableFolders() {\n\t\tconst folders: FoldersType[\"folders\"] = storeActions.getFolders();\n\t\tconst unorderableFolders: string[] = this.state.foldersList.filter(\n\t\t\t(folderName) => dragDisabled.includes(folderName) && folderName in folders\n\t\t);\n\t\treturn unorderableFolders.map((folderName: string, index) => {\n\t\t\tconst folder: FolderType = folders[folderName];\n\t\t\tfolder.icon = \"\";\n\t\t\treturn this.renderFolder(folder, folderName, index);\n\t\t});\n\t}\n\n\t/**\n\t * Renders all folders that can be reordered (user created folders).\n\t */\n\trenderOrderableFolders() {\n\t\tconst folders = storeActions.getFolders();\n\t\tconst orderableFolders = this.state.foldersList.filter(\n\t\t\t(folderName) => !dragDisabled.includes(folderName) && folderName in folders\n\t\t);\n\t\treturn orderableFolders.map((folderName, index) => {\n\t\t\tconst folder = folders[folderName];\n\t\t\treturn (\n\t\t\t\t<FinsembleDraggable draggableId={folderName} key={index} index={index}>\n\t\t\t\t\t{this.renderFolder(folder, folderName, index)}\n\t\t\t\t</FinsembleDraggable>\n\t\t\t);\n\t\t});\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<div className=\"top\">\n\t\t\t\t<div className=\"folder-list\" ref={this.listDiv}>\n\t\t\t\t\t{this.renderUnorderableFolders()}\n\t\t\t\t\t<FinsembleDnDContext onDragEnd={this.onDragEnd}>{this.renderOrderableFolders()}</FinsembleDnDContext>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagsList.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/TagsList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,qBAAqB,CAAC;AACtC,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAUnD,IAAI,KAA6B,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,KAAK,CAAC,SAAyB;IACpE,YAAY,KAAa;QACxB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,IAAI,EAAE,YAAY,CAAC,OAAO,EAAE;SAC5B,CAAC;QACF,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/C,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvD,KAAK,GAAG,QAAQ,EAAE,CAAC;IACpB,CAAC;IAED,WAAW,CAAC,GAAW;QACtB,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;IAED,eAAe,CAAC,KAAoB,EAAE,IAAyB;QAC9D,IAAI,CAAC,QAAQ,CAAC;YACb,IAAI,EAAE,IAAI,CAAC,KAAK;SAChB,CAAC,CAAC;IACJ,CAAC;IAED,iBAAiB;QAChB,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;IAC3E,CAAC;IAED,oBAAoB;QACnB,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,cAAc,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;IAC9E,CAAC;IAED,cAAc;QACb,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC;QAClC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,oBAAC,GAAG,IAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,WAAW,GAAI,CAAC,CAAC;IACzG,CAAC;IAED,MAAM;QACL,OAAO,6BAAK,SAAS,EAAC,WAAW,IAAE,IAAI,CAAC,cAAc,EAAE,CAAO,CAAC;IACjE,CAAC;CACD","sourcesContent":["import React from \"react\";\nimport Tag from \"../../../shared/Tag\";\nimport storeActions from \"../stores/StoreActions\";\nimport { getStore } from \"../stores/LauncherStore\";\nimport StoreModel from \"@finsemble/finsemble-
|
|
1
|
+
{"version":3,"file":"TagsList.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/TagsList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,qBAAqB,CAAC;AACtC,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAUnD,IAAI,KAA6B,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,KAAK,CAAC,SAAyB;IACpE,YAAY,KAAa;QACxB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,IAAI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../../shared/Tag\";\nimport storeActions from \"../stores/StoreActions\";\nimport { getStore } from \"../stores/LauncherStore\";\nimport StoreModel from \"@finsemble/finsemble-api/types/clients/StoreModel\";\nimport { StandardError } from \"@finsemble/finsemble-api/types/types\";\n\ninterface IProps {}\n\ninterface IState {\n\ttags: string[];\n}\n\nlet store: StoreModel | undefined;\n\nexport default class TagsList extends React.Component<IProps, IState> {\n\tconstructor(props: IProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\ttags: storeActions.getTags(),\n\t\t};\n\t\tthis.onTagDelete = this.onTagDelete.bind(this);\n\t\tthis.onTagListUpdate = this.onTagListUpdate.bind(this);\n\t\tstore = getStore();\n\t}\n\n\tonTagDelete(tag: string) {\n\t\tstoreActions.deleteTag(tag);\n\t}\n\n\tonTagListUpdate(error: StandardError, data: { value: string[] }) {\n\t\tthis.setState({\n\t\t\ttags: data.value,\n\t\t});\n\t}\n\n\tcomponentDidMount() {\n\t\tstore?.addListener({ field: \"activeLauncherTags\" }, this.onTagListUpdate);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tstore?.removeListener({ field: \"activeLauncherTags\" }, this.onTagListUpdate);\n\t}\n\n\trenderTagsList() {\n\t\tif (!this.state.tags) return null;\n\t\treturn this.state.tags.map((tag, index) => <Tag key={index} name={tag} removeTag={this.onTagDelete} />);\n\t}\n\n\trender() {\n\t\treturn <div className=\"tags-list\">{this.renderTagsList()}</div>;\n\t}\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import StoreModel from "@finsemble/finsemble-
|
|
2
|
-
import { StandardError } from "@finsemble/finsemble-
|
|
1
|
+
import StoreModel from "@finsemble/finsemble-api/types/clients/StoreModel";
|
|
2
|
+
import { StandardError } from "@finsemble/finsemble-api/types/types";
|
|
3
3
|
declare function createStore(done: (err: StandardError, store?: StoreModel) => void): void;
|
|
4
4
|
declare function getStore(): StoreModel | undefined;
|
|
5
5
|
export { createStore, getStore };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LauncherStore.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/stores/LauncherStore.ts"],"names":[],"mappings":"AAGA,IAAI,aAAqC,CAAC;AAE1C,MAAM,IAAI,GAAG;IACZ,KAAK,EAAE,eAAe;IACtB,KAAK,EAAE,uBAAuB;CAC9B,CAAC;AAEF,SAAS,WAAW,CAAC,IAAsD;IAC1E,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAC3C;QACC,KAAK,EAAE,6BAA6B;QACpC,MAAM,EAAE,IAAI;KACZ,EACD,CAAC,KAAoB,EAAE,KAAkB,EAAE,EAAE;QAC5C,aAAa,GAAG,KAAK,CAAC;QACtB,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC9B,IAAI,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;IAC3B,CAAC,CACD,CAAC;AACH,CAAC;AAED,SAAS,QAAQ;IAChB,OAAO,aAAa,CAAC;AACtB,CAAC;AAED,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["import StoreModel from \"@finsemble/finsemble-
|
|
1
|
+
{"version":3,"file":"LauncherStore.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/stores/LauncherStore.ts"],"names":[],"mappings":"AAGA,IAAI,aAAqC,CAAC;AAE1C,MAAM,IAAI,GAAG;IACZ,KAAK,EAAE,eAAe;IACtB,KAAK,EAAE,uBAAuB;CAC9B,CAAC;AAEF,SAAS,WAAW,CAAC,IAAsD;IAC1E,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAC3C;QACC,KAAK,EAAE,6BAA6B;QACpC,MAAM,EAAE,IAAI;KACZ,EACD,CAAC,KAAoB,EAAE,KAAkB,EAAE,EAAE;QAC5C,aAAa,GAAG,KAAK,CAAC;QACtB,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC9B,IAAI,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;IAC3B,CAAC,CACD,CAAC;AACH,CAAC;AAED,SAAS,QAAQ;IAChB,OAAO,aAAa,CAAC;AACtB,CAAC;AAED,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["import StoreModel from \"@finsemble/finsemble-api/types/clients/StoreModel\";\nimport { StandardError } from \"@finsemble/finsemble-api/types/types\";\n\nlet launcherStore: StoreModel | undefined;\n\nconst data = {\n\tfield: \"defaultFolder\",\n\tvalue: \"Advanced App Launcher\",\n};\n\nfunction createStore(done: (err: StandardError, store?: StoreModel) => void) {\n\tFSBL.Clients.DistributedStoreClient.getStore(\n\t\t{\n\t\t\tstore: \"Finsemble-AppLauncher-Store\",\n\t\t\tglobal: true,\n\t\t},\n\t\t(error: StandardError, store?: StoreModel) => {\n\t\t\tlauncherStore = store;\n\t\t\tlauncherStore?.setValue(data);\n\t\t\tdone(null, launcherStore);\n\t\t}\n\t);\n}\n\nfunction getStore() {\n\treturn launcherStore;\n}\n\nexport { createStore, getStore };\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StoreActions.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/stores/StoreActions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIpD,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAC/B,IAAI,UAAgB,CAAC;AACrB,IAAI,IAAS,CAAC;AACd,IAAI,YAAiB,CAAC;AAsCtB,eAAe;IACd,UAAU;IACV,MAAM;IACN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AAE,CAAC,CAAC,CAAC;AACtD,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-use-before-define */\nimport { findIndex } from \"lodash\";\nimport { getStore } from \"./LauncherStore\";\nimport AppDirectory from \"../modules/AppDirectory\";\nimport FDC3 from \"../modules/FDC3\";\nimport { iconFromConfig } from \"../../../icon/Icon\";\nimport { FoldersType, FolderAppType } from \"../../../../types/advancedAppLauncherTypes\";\nimport { StandardError } from \"@finsemble/finsemble-core/types/types\";\nimport sortFunctions from \"../utils/sort-functions\";\nconst async = require(\"async\");\nlet FDC3Client: FDC3;\nlet appd: any;\nlet appDEndpoint: any;\n\ntype ComponentDescriptor = Record<string, any>;\ntype ComponentList = Record<string, ComponentDescriptor>;\n\ntype AppsType = {\n\tappID: string;\n\ttags: string[];\n\tname: string;\n\turl: string;\n\ttype: string;\n\tcanDelete: boolean;\n\tdisplayName?: string;\n};\ntype ConfigType = {\n\tappID: string;\n\ticon: any;\n\tname: string;\n\tdisplayName: string;\n\tsource: string;\n\ttags: string[];\n};\ntype DataType = {\n\tfolders: FoldersType[\"folders\"];\n\tfoldersList: FoldersType[\"list\"];\n\tapps: {\n\t\t[field: string]: AppsType;\n\t};\n\ttags: string[];\n\tactiveFolder: string;\n\tfilterText: string;\n\tsortBy: keyof typeof sortFunctions;\n\tisFormVisible: boolean;\n\tconfigComponents: {\n\t\t[field: string]: ConfigType;\n\t};\n};\n\nexport default {\n\tinitialize,\n\taddApp,\n\taddNewFolder,\n\taddAppToFolder,\n\tremoveAppFromFolder,\n\trenameFolder,\n\tdeleteFolder,\n\tdeleteApp,\n\tdeleteTag,\n\treorderFolders,\n\tgetFolders,\n\tgetFoldersList,\n\tgetActiveFolderName,\n\tgetActiveFolder,\n\tgetSingleFolder,\n\tgetAllAppsTags,\n\tgetAllApps,\n\tgetAllAppsFromFolder,\n\tgetFormStatus,\n\tgetSearchText,\n\tgetSortBy,\n\taddTag,\n\tgetTags,\n\tgetApp,\n\tgetDragDisabled,\n\tgetConstants,\n\tfindAppByField,\n\tgetApps,\n\trefreshAppDefinitions,\n};\n\nlet data = <DataType>{};\nconst ADVANCED_APP_LAUNCHER = \"Advanced App Launcher\";\nconst NEW_FOLDER_NAME = \"New folder\";\n// returns names of default folders.\nfunction getConstants() {\n\tconst DASHBOARDS = \"Dashboards\";\n\tconst FAVORITES = \"Favorites\";\n\treturn { ADVANCED_APP_LAUNCHER, DASHBOARDS, FAVORITES };\n}\n\n// Add to here if you want to disable dragging on a folder.\nfunction getDragDisabled() {\n\tconst { DASHBOARDS, FAVORITES } = getConstants();\n\treturn [ADVANCED_APP_LAUNCHER, DASHBOARDS, FAVORITES];\n}\n\nfunction initialize(callback = Function.prototype) {\n\tFSBL.Clients.ConfigClient.getValue({ field: \"finsemble.appDirectoryEndpoint\" }, (_, appDirectoryEndpoint) => {\n\t\t// cache value globally to be used in the event that we need to fetch data for a given component.\n\t\tappDEndpoint = appDirectoryEndpoint;\n\t\tconst store = getStore();\n\t\tdata.folders = store?.values.appFolders.folders;\n\t\tdata.foldersList = store?.values.appFolders.list;\n\t\tvalidateFolderDataStructure();\n\t\tdata.apps = store?.values.appDefinitions;\n\t\tdata.tags = store?.values.activeLauncherTags;\n\t\tdata.activeFolder = store?.values.activeFolder;\n\t\tdata.filterText = store?.values.filterText;\n\t\tdata.sortBy = store?.values.sortBy;\n\t\tdata.isFormVisible = store?.values.isFormVisible;\n\t\tdata.configComponents = {};\n\n\t\t// Add listeners to keep our copy up to date\n\t\tstore?.addListener({ field: \"appFolders.folders\" }, (foldersErr, dt) => {\n\t\t\tdata.folders = dt.value;\n\t\t});\n\t\tstore?.addListener({ field: \"appFolders.list\" }, (folderListErr, dt) => (data.foldersList = dt.value));\n\t\tstore?.addListener({ field: \"appDefinitions\" }, (appDefinitionsErr, dt) => (data.apps = dt.value));\n\t\tstore?.addListener({ field: \"activeFolder\" }, (activeFolderErr, dt) => {\n\t\t\tdata.activeFolder = dt.value;\n\t\t});\n\t\tstore?.addListener({ field: \"isFormVisible\" }, (visibilityErr, dt) => (data.isFormVisible = dt.value));\n\t\tstore?.addListener({ field: \"sortBy\" }, (sortErr, dt) => (data.sortBy = dt.value));\n\t\tstore?.addListener({ field: \"activeLauncherTags\" }, (launcherTagsErr, dt) => (data.tags = dt.value));\n\t\tstore?.addListener({ field: \"filterText\" }, (filterTextErr, dt) => (data.filterText = dt.value));\n\n\t\tFSBL.Clients.RouterClient.subscribe(\"Launcher.update\", (err, response) => {\n\t\t\tFSBL.Clients.Logger.debug(\"list updated\", err, response);\n\t\t\tif (err) {\n\t\t\t\treturn console.error(err);\n\t\t\t}\n\t\t\trefreshAppDefinitions(response.data.componentList);\n\t\t});\n\n\t\tFSBL.Clients.RouterClient.subscribe(\"Finsemble.Service.State.launcherService\", (unsubscribeErr) => {\n\t\t\tif (unsubscribeErr) {\n\t\t\t\tFSBL.Clients.Logger.error(\n\t\t\t\t\t\"App Launcher encountered an error unsubscribing from the launcher service\",\n\t\t\t\t\tunsubscribeErr\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tloadInstalledComponentsFromStore(() => {\n\t\t\t\t// We load our stored components(config driven) here\n\t\t\t\tloadInstalledConfigComponents(() => {\n\t\t\t\t\tupdateAppsInFolders(callback);\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t});\n}\n\n// This gets a specific app in FDC3 and returns the results\nfunction getApp(appID: string, cb = Function.prototype) {\n\tappd\n\t\t.get(appID)\n\t\t.then((app: any) => cb(null, app))\n\t\t.catch((err: StandardError) => cb(err));\n}\n/**\n * Ensures all 'apps' properties on folders conform\n * to the new structure (Array vs object)\n */\nfunction validateFolderDataStructure() {\n\tObject.keys(data.folders).forEach((folderName) => {\n\t\tconst folder = data.folders[folderName];\n\t\tif (!Array.isArray(folder.apps)) {\n\t\t\tconst warning =\n\t\t\t\t\"Application Launcher Persistent Store has data stored in deprecated format. Please check distributedStore configs\";\n\t\t\t// If the structure is wrong, notify the user in hopes that the foundation will be fixed\n\t\t\tFSBL.Clients.Logger.warn(warning);\n\t\t\tFSBL.UserNotification.alert(\"system\", \"ONCE-SINCE-STARTUP\", \"Distributed Store Type Mismatch\", warning);\n\t\t\tlet newApps: FolderAppType[] = [];\n\t\t\tObject.values(folder.apps).forEach((app: any) => {\n\t\t\t\tnewApps.push(app);\n\t\t\t});\n\t\t\tfolder.apps = newApps;\n\t\t}\n\t});\n\t_setFolders();\n}\n\n// Update apps in folders with updated config information\nfunction updateAppsInFolders(cb = Function.prototype) {\n\t// Loop through folders and update apps with new info\n\tconst { ADVANCED_APP_LAUNCHER: advancedAppLauncherFolderName } = getConstants();\n\tObject.keys(data.folders).forEach((folderName) => {\n\t\tif (folderName === advancedAppLauncherFolderName) return;\n\t\telse {\n\t\t\tconst folder = data.folders[folderName];\n\t\t\tObject.values(data.configComponents).forEach((configComp) => {\n\t\t\t\tlet index = -1;\n\t\t\t\tfolder.apps.forEach((folderApp, i) => {\n\t\t\t\t\tif (folderApp.appID.toString().trim() === configComp.appID.toString().trim()) {\n\t\t\t\t\t\tindex = i;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (index > -1) {\n\t\t\t\t\tdata.folders[folderName].apps.splice(index, 1, configComp);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n\t_setFolders(cb);\n}\n\n/**\n * Given a component config, will return tags, or an empty array.\n *\n * @param {*} componentConfig\n * @returns\n */\nfunction extractTagsFromFinsembleComponentConfig(componentConfig: ComponentDescriptor) {\n\tif (!componentConfig.foreign) return [];\n\tif (!componentConfig.foreign.components) return [];\n\tif (!componentConfig.foreign.components[\"App Launcher\"]) return [];\n\n\tconst { tags } = componentConfig.foreign.components[\"App Launcher\"];\n\n\tif (tags) {\n\t\tif (typeof tags === \"string\") {\n\t\t\treturn [tags];\n\t\t}\n\t\treturn tags;\n\t}\n\n\treturn [];\n}\n/**\n * Instantiates classes needed to interact with the appD server.\n * Only done when needed. If there are no components with source 'FDC3', this code will not execute.\n */\nfunction lazyLoadAppD() {\n\tif (!FDC3Client) FDC3Client = new FDC3({ url: appDEndpoint });\n\tif (!appd) appd = new AppDirectory(FDC3Client) as FDC3;\n}\n\n/**\n * Here we load apps from FDC3\n * @param {*} cb\n */\nfunction loadInstalledComponentsFromStore(cb = Function.prototype) {\n\tasync.map(\n\t\tObject.values(data.apps),\n\t\t(component: any, componentDone: any) => {\n\t\t\t// Load FDC3 components here\n\t\t\tif (component.source && component.source === \"FDC3\") {\n\t\t\t\tlazyLoadAppD();\n\t\t\t\t// get the app info so we can load it into the launcher\n\t\t\t\treturn getApp(component.appID, (err: StandardError) => {\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\t// don't want to kill this;\n\t\t\t\t\t\tdeleteApp(component.appID);\n\t\t\t\t\t\tconsole.error(\"there was an error loading from FDC3\", component, err);\n\t\t\t\t\t}\n\t\t\t\t\treturn componentDone();\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Assumption - component is always a user defined component\n\t\t\t// when testing I was never able to get any other component types in this method\n\t\t\tFSBL.Clients.LauncherClient.addUserDefinedComponent(component, (compAddErr) => {\n\t\t\t\tif (compAddErr) {\n\t\t\t\t\tconsole.warn(\"Failed to add new app:\", compAddErr);\n\t\t\t\t}\n\t\t\t\tcomponentDone(compAddErr);\n\t\t\t});\n\t\t},\n\t\t(err: StandardError) => {\n\t\t\tcb(err);\n\t\t}\n\t);\n}\n\n// We load our apps that were loaded from the config.\nfunction loadInstalledConfigComponents(cb = Function.prototype) {\n\t// Get the list of components from the launcher service\n\tFSBL.Clients.LauncherClient.getComponentList((err, componentList) => {\n\t\t/*\n\t\t * Update the folders under the \"App\" menu and delete any apps in the folder\n\t\t * that are no longer in the config and are not user defined components.\n\t\t */\n\t\trefreshAppDefinitions(componentList || {});\n\t\tcb();\n\t});\n}\n\nfunction getApps() {\n\treturn data.apps;\n}\n\nfunction refreshAppDefinitions(componentList: ComponentList) {\n\tconst componentTypeList = Object.keys(componentList);\n\n\tconst { folders } = data;\n\t// Get the user defined apps\n\tconst apps = Object.keys(data.apps);\n\tObject.keys(folders).forEach((folderName) => {\n\t\tfolders[folderName].apps.forEach((configDefinedApp, i) => {\n\t\t\tconst { name, appID } = configDefinedApp;\n\t\t\t// If the component is not in the config component list and is not a user defined component\n\t\t\tif (!componentTypeList.includes(name) && !apps.includes(appID)) {\n\t\t\t\t// Delete app from the folder\n\t\t\t\tfolders[folderName].apps.splice(i, 1);\n\t\t\t}\n\t\t});\n\t});\n\n\tcomponentTypeList.forEach((componentType) => {\n\t\tconst component = componentList?.[componentType];\n\t\tif (component && component.component) {\n\t\t\tconst launchableByUser = component?.foreign?.components?.[\"App Launcher\"]?.launchableByUser;\n\n\t\t\tconst displayName = component.component.displayName ?? componentType;\n\t\t\tconst iconObject = iconFromConfig(component?.foreign?.components?.Toolbar, displayName);\n\t\t\t// Make sure the app is launchable by user\n\t\t\tif (launchableByUser && !component.component.isUserDefined) {\n\t\t\t\tdata.configComponents[componentType] = {\n\t\t\t\t\tappID: componentType,\n\t\t\t\t\ticon: iconObject,\n\t\t\t\t\tname: componentType,\n\t\t\t\t\tdisplayName,\n\t\t\t\t\tsource: \"config\",\n\t\t\t\t\ttags: extractTagsFromFinsembleComponentConfig(component),\n\t\t\t\t};\n\t\t\t} else if (!launchableByUser && data.configComponents[componentType]) {\n\t\t\t\tdelete data.configComponents[componentType];\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction _setValue(field: string, value: any, cb: any) {\n\tgetStore()?.setValue(\n\t\t{\n\t\t\tfield: field,\n\t\t\tvalue: value,\n\t\t},\n\t\t(error) => {\n\t\t\tif (error) {\n\t\t\t\tFSBL.Clients.Logger.error(`Advanced App Launcher: Failed to save: ${field}:${value}`);\n\t\t\t} else {\n\t\t\t\tcb && cb();\n\t\t\t}\n\t\t}\n\t);\n}\n\nfunction _setFolders(cb = Function.prototype) {\n\t_setValue(\"appFolders.folders\", data.folders, (err: StandardError) => {\n\t\tif (err) {\n\t\t\tFSBL.Clients.Logger.error(`Advanced App Launcher: Failed to set folders: ${err}`);\n\t\t\treturn;\n\t\t}\n\n\t\tcb();\n\t});\n}\n\nfunction _findAppIndexInFolders(appID: string, folderName: string) {\n\treturn findIndex(data.folders[folderName].apps, (app) => app.appID === appID);\n}\n\nfunction getFolders() {\n\treturn data.folders;\n}\n\nfunction getFoldersList() {\n\treturn data.foldersList;\n}\n\nfunction getAllApps() {\n\treturn Object.assign({}, data.apps, data.configComponents);\n}\n\nfunction getFormStatus() {\n\treturn data.isFormVisible;\n}\n\nfunction getSingleFolder(folderName: string) {\n\treturn data.folders[folderName];\n}\n\nfunction reorderFolders(destIndex: number, srcIndex: number) {\n\t// There are two types of folders: Those that can be arranged, and those that cannot. We don't want to reorder the folders relative to the unorderable folders. Split them out, and then combine them after doing the filtering/swapping.\n\tconst dragDisabled = getDragDisabled();\n\tconst unorderableFolders = data.foldersList.filter((folderName) => dragDisabled.includes(folderName));\n\tconst orderableFolders = data.foldersList.filter((folderName) => !dragDisabled.includes(folderName));\n\tconst movedFolder = orderableFolders[destIndex];\n\tconst remainingItems = orderableFolders.filter((item, index) => index !== destIndex);\n\tdata.foldersList = [\n\t\t...unorderableFolders,\n\t\t...remainingItems.slice(0, srcIndex),\n\t\tmovedFolder,\n\t\t...remainingItems.slice(srcIndex),\n\t];\n\t_setValue(\"appFolders.list\", data.foldersList, () => {});\n\treturn data.foldersList;\n}\n\nfunction addApp(app = <AppsType>{}, cb: any) {\n\tconst appID = `${new Date().getTime()}`;\n\tconst folder = data.activeFolder;\n\tconst newAppData = {\n\t\tappID,\n\t\ttags: app.tags,\n\t\tname: app.name,\n\t\turl: app.url,\n\t\ttype: \"component\",\n\t\tcanDelete: true,\n\t};\n\n\t/**\n\t * Note, the advanced app launcher can currently only keep track of apps that\n\t * are added by itself. Apps added by the basic launcher, or any other means,\n\t * will not be detected. A reconciliation process would need to be added that\n\t * listens on the distributed store similar to how the basic app launcher works.\n\t *\n\t * FSBL.Clients.RouterClient.subscribe(\"Launcher.update\", (err, response) => {\n\t\t\tFSBL.Clients.Logger.debug(\"list updated\", err, response);\n\t\t\tif (err) {\n\t\t\t\treturn console.error(err);\n\t\t\t}\n\t\t\tself.filterComponents(response.data.componentList);\n\t\t});\n\t */\n\tFSBL.Clients.LauncherClient.addUserDefinedComponent(newAppData, (compAddErr) => {\n\t\tif (compAddErr) {\n\t\t\tcb({ code: \"failed_to_add_app\", message: compAddErr });\n\t\t\tconsole.warn(\"Failed to add new app:\", compAddErr);\n\t\t\treturn;\n\t\t}\n\t\tdata.apps[appID] = newAppData;\n\n\t\t// Add to ADVANCED_APP_LAUNCHER folder\n\t\tdata.folders[ADVANCED_APP_LAUNCHER].apps.push(newAppData);\n\n\t\t// Check if we need to add to another folder as well\n\t\tif (folder !== ADVANCED_APP_LAUNCHER) {\n\t\t\tdata.folders[folder].apps.push(newAppData);\n\t\t}\n\t\t// Save appDefinitions and then folders\n\t\t_setValue(\"appDefinitions\", data.apps, () => {\n\t\t\t_setFolders();\n\t\t\tcb && cb();\n\t\t});\n\t});\n}\n\nfunction deleteApp(appID: string) {\n\t// Delete app from any folder that has it\n\tfor (const key in data.folders) {\n\t\tconst appIndex = _findAppIndexInFolders(appID, key);\n\t\tdata.folders[key].apps.splice(appIndex, 1);\n\t}\n\n\t// Delete app from the apps list\n\tFSBL.Clients.LauncherClient.removeUserDefinedComponent(data.apps[appID], () => {\n\t\tdelete data.apps[appID];\n\t\t// Save appDefinitions and then folders\n\t\t_setValue(\"appDefinitions\", data.apps, () => {\n\t\t\t_setFolders();\n\t\t});\n\t});\n}\n\nfunction addNewFolder(name?: string) {\n\t// Each new folder is given a number, lets store them here\n\t// to get the highest one and then increment\n\t// result of this will be [0, 1, 2] etc\n\tconst newFoldersNums = [\n\t\t0,\n\t\t// Find folders that have a name of \"New folder\" or \"New folder #\"\n\t\t...data.foldersList\n\t\t\t.filter((folder) => folder.startsWith(NEW_FOLDER_NAME))\n\t\t\t.map((folder) => {\n\t\t\t\tconst numbers: any[] = folder.match(/\\d+/g) || [];\n\t\t\t\treturn Math.max(...numbers);\n\t\t\t}),\n\t];\n\tconst highestFolderNumber = Math.max(...newFoldersNums);\n\tconst folderName: string = name ?? `${NEW_FOLDER_NAME} ${highestFolderNumber + 1}`;\n\tconst newFolder = {\n\t\tdisableUserRemove: true,\n\t\ticon: \"ff-adp-hamburger\",\n\t\tcanEdit: true,\n\t\tcanDelete: true,\n\t\tapps: [],\n\t};\n\tdata.folders[folderName] = newFolder;\n\t_setFolders(() => {\n\t\t// Update folders order if adding was successful\n\t\tdata.foldersList.push(folderName);\n\t\t_setValue(\"appFolders.list\", data.foldersList, () => {});\n\t});\n}\n\nfunction deleteFolder(folderName: string) {\n\t// Check if user is trying to delete the active folder\n\tif (folderName === data.activeFolder) {\n\t\tdata.activeFolder = ADVANCED_APP_LAUNCHER;\n\t\t_setValue(\"activeFolder\", data.activeFolder, () => {});\n\t}\n\n\tdelete data.folders[folderName] &&\n\t\t_setFolders(() => {\n\t\t\t// Update the order of folders\n\t\t\tconst index = data.foldersList.indexOf(folderName);\n\t\t\tdata.foldersList.splice(index, 1);\n\t\t\t_setValue(\"appFolders.list\", data.foldersList, () => {});\n\t\t});\n}\n\nfunction renameFolder(oldName: string, newName: string) {\n\tlet indexOfOld = data.foldersList.findIndex((folderName) => folderName === oldName);\n\n\tif (indexOfOld > -1) {\n\t\tlet oldFolder = data.folders[oldName];\n\t\tdata.folders[newName] = oldFolder;\n\t\tdata.foldersList.splice(indexOfOld, 1, newName);\n\n\t\t_setFolders(() => {\n\t\t\t_setValue(\"appFolders.list\", data.foldersList, () => {});\n\n\t\t\tif (data.activeFolder === oldName) {\n\t\t\t\t_setValue(\"activeFolder\", newName, () => {});\n\t\t\t}\n\n\t\t\tdelete data.folders[oldName];\n\t\t});\n\t}\n}\n\nfunction addAppToFolder(folderName: string, app: FolderAppType) {\n\tconst appIndex = _findAppIndexInFolders(app.appID, folderName);\n\n\tif (appIndex < 0) {\n\t\tdata.folders[folderName].apps.push({\n\t\t\tname: app.name,\n\t\t\tdisplayName: app.displayName,\n\t\t\tappID: app.appID,\n\t\t});\n\t\t_setFolders();\n\t}\n}\n\nfunction removeAppFromFolder(folderName: string, app: FolderAppType) {\n\tconst appIndex = _findAppIndexInFolders(app.appID, folderName);\n\tdata.folders[folderName].apps.splice(appIndex, 1);\n\t_setFolders();\n}\n\nfunction getAllAppsFromFolder(folderName: string) {\n\treturn data.folders[folderName].apps;\n}\n\n/**\n * Given a field, search through FDC3 apps and apps pulled in via config and return that app.\n * */\nfunction findAppByField(field: keyof AppsType | keyof ConfigType, value: any) {\n\treturn (\n\t\tObject.values(data.apps).find((app) => (app ? (app as any)[field] === value : false)) ||\n\t\tObject.values(data.configComponents).find((app) => (app ? (app as any)[field] === value : false))\n\t);\n}\n\nfunction getActiveFolder() {\n\tconst folder = data.folders[data.activeFolder];\n\n\tif (!folder) {\n\t\tFSBL.Clients.Logger.error(`activeFolder:\"${data.activeFolder}\" not found! Defaulting to empty folder`);\n\t\treturn {\n\t\t\tname: data.activeFolder,\n\t\t\tapps: [],\n\t\t};\n\t}\n\n\tObject.values(folder.apps).forEach((app) => {\n\t\tconst appData = findAppByField(\"appID\", app.appID);\n\t\tif (!appData) {\n\t\t\tapp.tags = [];\n\t\t} else {\n\t\t\tapp.tags = appData.tags;\n\t\t}\n\t});\n\t// Need a name for the AppDefinition/AppActionsMenu rendering\n\tfolder.name = data.activeFolder;\n\treturn folder;\n}\n\nfunction getActiveFolderName() {\n\treturn data.activeFolder;\n}\n\nfunction getSearchText() {\n\treturn data.filterText;\n}\n\nfunction getSortBy() {\n\treturn data.sortBy;\n}\n\nfunction getTags() {\n\treturn data.tags;\n}\n\nfunction getAllAppsTags() {\n\tlet tags: any[] = [];\n\t// Pull tags from applications installed via FDC3 and the component config.\n\tconst apps = Object.values(data.apps).concat(Object.values(data.configComponents) as any);\n\n\tapps.forEach((app) => {\n\t\ttags = tags.concat(app.tags);\n\t});\n\t// return unique ones only\n\treturn tags.filter((tag, index) => tags.indexOf(tag) === index);\n}\n\nfunction addTag(tag: string) {\n\t// Push new tag to list\n\tdata.tags.indexOf(tag) < 0 && data.tags.push(tag);\n\t// Update tags in store\n\t_setValue(\"activeLauncherTags\", data.tags, () => {});\n}\n\nfunction deleteTag(tag: string) {\n\t// Push new tag to list\n\tdata.tags.splice(data.tags.indexOf(tag), 1);\n\t// Update tags in store\n\t_setValue(\"activeLauncherTags\", data.tags, () => {});\n}\n"]}
|
|
1
|
+
{"version":3,"file":"StoreActions.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/stores/StoreActions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIpD,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAC/B,IAAI,UAAgB,CAAC;AACrB,IAAI,IAAS,CAAC;AACd,IAAI,YAAiB,CAAC;AAsCtB,eAAe;IACd,UAAU;IACV,MAAM;IACN,YAAY;IACZ,cAAc;IACd,mBAAmB;IACnB,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,SAAS;IACT,cAAc;IACd,UAAU;IACV,cAAc;IACd,mBAAmB;IACnB,eAAe;IACf,eAAe;IACf,cAAc;IACd,UAAU;IACV,oBAAoB;IACpB,aAAa;IACb,aAAa;IACb,SAAS;IACT,MAAM;IACN,OAAO;IACP,MAAM;IACN,eAAe;IACf,YAAY;IACZ,cAAc;IACd,OAAO;IACP,qBAAqB;CACrB,CAAC;AAEF,IAAI,IAAI,GAAa,EAAE,CAAC;AACxB,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AACtD,MAAM,eAAe,GAAG,YAAY,CAAC;AAErC,SAAS,YAAY;IACpB,MAAM,UAAU,GAAG,YAAY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AAC,CAAC,GAAG,EAAE,EAAE;QACpB,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,CAAC;AACjE,CAAC;AAED,SAAS,MAAM,CAAC,GAAW;IAE1B,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAElD,SAAS,CAAC,oBAAoB,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;AACtD,CAAC;AAED,SAAS,SAAS,CAAC,GAAW;IAE7B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IAE5C,SAAS,CAAC,oBAAoB,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;AACtD,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-use-before-define */\nimport { findIndex } from \"lodash\";\nimport { getStore } from \"./LauncherStore\";\nimport AppDirectory from \"../modules/AppDirectory\";\nimport FDC3 from \"../modules/FDC3\";\nimport { iconFromConfig } from \"../../../icon/Icon\";\nimport { FoldersType, FolderAppType } from \"../../../../types/advancedAppLauncherTypes\";\nimport { StandardError } from \"@finsemble/finsemble-api/types/types\";\nimport sortFunctions from \"../utils/sort-functions\";\nconst async = require(\"async\");\nlet FDC3Client: FDC3;\nlet appd: any;\nlet appDEndpoint: any;\n\ntype ComponentDescriptor = Record<string, any>;\ntype ComponentList = Record<string, ComponentDescriptor>;\n\ntype AppsType = {\n\tappID: string;\n\ttags: string[];\n\tname: string;\n\turl: string;\n\ttype: string;\n\tcanDelete: boolean;\n\tdisplayName?: string;\n};\ntype ConfigType = {\n\tappID: string;\n\ticon: any;\n\tname: string;\n\tdisplayName: string;\n\tsource: string;\n\ttags: string[];\n};\ntype DataType = {\n\tfolders: FoldersType[\"folders\"];\n\tfoldersList: FoldersType[\"list\"];\n\tapps: {\n\t\t[field: string]: AppsType;\n\t};\n\ttags: string[];\n\tactiveFolder: string;\n\tfilterText: string;\n\tsortBy: keyof typeof sortFunctions;\n\tisFormVisible: boolean;\n\tconfigComponents: {\n\t\t[field: string]: ConfigType;\n\t};\n};\n\nexport default {\n\tinitialize,\n\taddApp,\n\taddNewFolder,\n\taddAppToFolder,\n\tremoveAppFromFolder,\n\trenameFolder,\n\tdeleteFolder,\n\tdeleteApp,\n\tdeleteTag,\n\treorderFolders,\n\tgetFolders,\n\tgetFoldersList,\n\tgetActiveFolderName,\n\tgetActiveFolder,\n\tgetSingleFolder,\n\tgetAllAppsTags,\n\tgetAllApps,\n\tgetAllAppsFromFolder,\n\tgetFormStatus,\n\tgetSearchText,\n\tgetSortBy,\n\taddTag,\n\tgetTags,\n\tgetApp,\n\tgetDragDisabled,\n\tgetConstants,\n\tfindAppByField,\n\tgetApps,\n\trefreshAppDefinitions,\n};\n\nlet data = <DataType>{};\nconst ADVANCED_APP_LAUNCHER = \"Advanced App Launcher\";\nconst NEW_FOLDER_NAME = \"New folder\";\n// returns names of default folders.\nfunction getConstants() {\n\tconst DASHBOARDS = \"Dashboards\";\n\tconst FAVORITES = \"Favorites\";\n\treturn { ADVANCED_APP_LAUNCHER, DASHBOARDS, FAVORITES };\n}\n\n// Add to here if you want to disable dragging on a folder.\nfunction getDragDisabled() {\n\tconst { DASHBOARDS, FAVORITES } = getConstants();\n\treturn [ADVANCED_APP_LAUNCHER, DASHBOARDS, FAVORITES];\n}\n\nfunction initialize(callback = Function.prototype) {\n\tFSBL.Clients.ConfigClient.getValue({ field: \"finsemble.appDirectoryEndpoint\" }, (_, appDirectoryEndpoint) => {\n\t\t// cache value globally to be used in the event that we need to fetch data for a given component.\n\t\tappDEndpoint = appDirectoryEndpoint;\n\t\tconst store = getStore();\n\t\tdata.folders = store?.values.appFolders.folders;\n\t\tdata.foldersList = store?.values.appFolders.list;\n\t\tvalidateFolderDataStructure();\n\t\tdata.apps = store?.values.appDefinitions;\n\t\tdata.tags = store?.values.activeLauncherTags;\n\t\tdata.activeFolder = store?.values.activeFolder;\n\t\tdata.filterText = store?.values.filterText;\n\t\tdata.sortBy = store?.values.sortBy;\n\t\tdata.isFormVisible = store?.values.isFormVisible;\n\t\tdata.configComponents = {};\n\n\t\t// Add listeners to keep our copy up to date\n\t\tstore?.addListener({ field: \"appFolders.folders\" }, (foldersErr, dt) => {\n\t\t\tdata.folders = dt.value;\n\t\t});\n\t\tstore?.addListener({ field: \"appFolders.list\" }, (folderListErr, dt) => (data.foldersList = dt.value));\n\t\tstore?.addListener({ field: \"appDefinitions\" }, (appDefinitionsErr, dt) => (data.apps = dt.value));\n\t\tstore?.addListener({ field: \"activeFolder\" }, (activeFolderErr, dt) => {\n\t\t\tdata.activeFolder = dt.value;\n\t\t});\n\t\tstore?.addListener({ field: \"isFormVisible\" }, (visibilityErr, dt) => (data.isFormVisible = dt.value));\n\t\tstore?.addListener({ field: \"sortBy\" }, (sortErr, dt) => (data.sortBy = dt.value));\n\t\tstore?.addListener({ field: \"activeLauncherTags\" }, (launcherTagsErr, dt) => (data.tags = dt.value));\n\t\tstore?.addListener({ field: \"filterText\" }, (filterTextErr, dt) => (data.filterText = dt.value));\n\n\t\tFSBL.Clients.RouterClient.subscribe(\"Launcher.update\", (err, response) => {\n\t\t\tFSBL.Clients.Logger.debug(\"list updated\", err, response);\n\t\t\tif (err) {\n\t\t\t\treturn console.error(err);\n\t\t\t}\n\t\t\trefreshAppDefinitions(response.data.componentList);\n\t\t});\n\n\t\t// @deprecate in favor of SystemManagerClient.waitForStartup()\n\t\tFSBL.Clients.RouterClient.subscribe(\"Finsemble.Service.State.launcherService\", (unsubscribeErr) => {\n\t\t\tif (unsubscribeErr) {\n\t\t\t\tFSBL.Clients.Logger.error(\n\t\t\t\t\t\"App Launcher encountered an error unsubscribing from the launcher service\",\n\t\t\t\t\tunsubscribeErr\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tloadInstalledComponentsFromStore(() => {\n\t\t\t\t// We load our stored components(config driven) here\n\t\t\t\tloadInstalledConfigComponents(() => {\n\t\t\t\t\tupdateAppsInFolders(callback);\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t});\n}\n\n// This gets a specific app in FDC3 and returns the results\nfunction getApp(appID: string, cb = Function.prototype) {\n\tappd\n\t\t.get(appID)\n\t\t.then((app: any) => cb(null, app))\n\t\t.catch((err: StandardError) => cb(err));\n}\n/**\n * Ensures all 'apps' properties on folders conform\n * to the new structure (Array vs object)\n */\nfunction validateFolderDataStructure() {\n\tObject.keys(data.folders).forEach((folderName) => {\n\t\tconst folder = data.folders[folderName];\n\t\tif (!Array.isArray(folder.apps)) {\n\t\t\tconst warning =\n\t\t\t\t\"Application Launcher Persistent Store has data stored in deprecated format. Please check distributedStore configs\";\n\t\t\t// If the structure is wrong, notify the user in hopes that the foundation will be fixed\n\t\t\tFSBL.Clients.Logger.warn(warning);\n\t\t\tFSBL.UserNotification.alert(\"system\", \"ONCE-SINCE-STARTUP\", \"Distributed Store Type Mismatch\", warning);\n\t\t\tlet newApps: FolderAppType[] = [];\n\t\t\tObject.values(folder.apps).forEach((app: any) => {\n\t\t\t\tnewApps.push(app);\n\t\t\t});\n\t\t\tfolder.apps = newApps;\n\t\t}\n\t});\n\t_setFolders();\n}\n\n// Update apps in folders with updated config information\nfunction updateAppsInFolders(cb = Function.prototype) {\n\t// Loop through folders and update apps with new info\n\tconst { ADVANCED_APP_LAUNCHER: advancedAppLauncherFolderName } = getConstants();\n\tObject.keys(data.folders).forEach((folderName) => {\n\t\tif (folderName === advancedAppLauncherFolderName) return;\n\t\telse {\n\t\t\tconst folder = data.folders[folderName];\n\t\t\tObject.values(data.configComponents).forEach((configComp) => {\n\t\t\t\tlet index = -1;\n\t\t\t\tfolder.apps.forEach((folderApp, i) => {\n\t\t\t\t\tif (folderApp.appID.toString().trim() === configComp.appID.toString().trim()) {\n\t\t\t\t\t\tindex = i;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (index > -1) {\n\t\t\t\t\tdata.folders[folderName].apps.splice(index, 1, configComp);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n\t_setFolders(cb);\n}\n\n/**\n * Given a component config, will return tags, or an empty array.\n *\n * @param {*} componentConfig\n * @returns\n */\nfunction extractTagsFromFinsembleComponentConfig(componentConfig: ComponentDescriptor) {\n\tif (!componentConfig.foreign) return [];\n\tif (!componentConfig.foreign.components) return [];\n\tif (!componentConfig.foreign.components[\"App Launcher\"]) return [];\n\n\tconst { tags } = componentConfig.foreign.components[\"App Launcher\"];\n\n\tif (tags) {\n\t\tif (typeof tags === \"string\") {\n\t\t\treturn [tags];\n\t\t}\n\t\treturn tags;\n\t}\n\n\treturn [];\n}\n/**\n * Instantiates classes needed to interact with the appD server.\n * Only done when needed. If there are no components with source 'FDC3', this code will not execute.\n */\nfunction lazyLoadAppD() {\n\tif (!FDC3Client) FDC3Client = new FDC3({ url: appDEndpoint });\n\tif (!appd) appd = new AppDirectory(FDC3Client) as FDC3;\n}\n\n/**\n * Here we load apps from FDC3\n * @param {*} cb\n */\nfunction loadInstalledComponentsFromStore(cb = Function.prototype) {\n\tasync.map(\n\t\tObject.values(data.apps),\n\t\t(component: any, componentDone: any) => {\n\t\t\t// Load FDC3 components here\n\t\t\tif (component.source && component.source === \"FDC3\") {\n\t\t\t\tlazyLoadAppD();\n\t\t\t\t// get the app info so we can load it into the launcher\n\t\t\t\treturn getApp(component.appID, (err: StandardError) => {\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\t// don't want to kill this;\n\t\t\t\t\t\tdeleteApp(component.appID);\n\t\t\t\t\t\tconsole.error(\"there was an error loading from FDC3\", component, err);\n\t\t\t\t\t}\n\t\t\t\t\treturn componentDone();\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Assumption - component is always a user defined component\n\t\t\t// when testing I was never able to get any other component types in this method\n\t\t\tFSBL.Clients.LauncherClient.addUserDefinedComponent(component, (compAddErr) => {\n\t\t\t\tif (compAddErr) {\n\t\t\t\t\tconsole.warn(\"Failed to add new app:\", compAddErr);\n\t\t\t\t}\n\t\t\t\tcomponentDone(compAddErr);\n\t\t\t});\n\t\t},\n\t\t(err: StandardError) => {\n\t\t\tcb(err);\n\t\t}\n\t);\n}\n\n// We load our apps that were loaded from the config.\nfunction loadInstalledConfigComponents(cb = Function.prototype) {\n\t// Get the list of components from the launcher service\n\tFSBL.Clients.LauncherClient.getComponentList((err, componentList) => {\n\t\t/*\n\t\t * Update the folders under the \"App\" menu and delete any apps in the folder\n\t\t * that are no longer in the config and are not user defined components.\n\t\t */\n\t\trefreshAppDefinitions(componentList || {});\n\t\tcb();\n\t});\n}\n\nfunction getApps() {\n\treturn data.apps;\n}\n\nfunction refreshAppDefinitions(componentList: ComponentList) {\n\tconst componentTypeList = Object.keys(componentList);\n\n\tconst { folders } = data;\n\t// Get the user defined apps\n\tconst apps = Object.keys(data.apps);\n\tObject.keys(folders).forEach((folderName) => {\n\t\tfolders[folderName].apps.forEach((configDefinedApp, i) => {\n\t\t\tconst { name, appID } = configDefinedApp;\n\t\t\t// If the component is not in the config component list and is not a user defined component\n\t\t\tif (!componentTypeList.includes(name) && !apps.includes(appID)) {\n\t\t\t\t// Delete app from the folder\n\t\t\t\tfolders[folderName].apps.splice(i, 1);\n\t\t\t}\n\t\t});\n\t});\n\n\tcomponentTypeList.forEach((componentType) => {\n\t\tconst component = componentList?.[componentType];\n\t\tif (component && component.component) {\n\t\t\tconst launchableByUser = component?.foreign?.components?.[\"App Launcher\"]?.launchableByUser;\n\n\t\t\tconst displayName = component.component.displayName ?? componentType;\n\t\t\tconst iconObject = iconFromConfig(component?.foreign?.components?.Toolbar, displayName);\n\t\t\t// Make sure the app is launchable by user\n\t\t\tif (launchableByUser && !component.component.isUserDefined) {\n\t\t\t\tdata.configComponents[componentType] = {\n\t\t\t\t\tappID: componentType,\n\t\t\t\t\ticon: iconObject,\n\t\t\t\t\tname: componentType,\n\t\t\t\t\tdisplayName,\n\t\t\t\t\tsource: \"config\",\n\t\t\t\t\ttags: extractTagsFromFinsembleComponentConfig(component),\n\t\t\t\t};\n\t\t\t} else if (!launchableByUser && data.configComponents[componentType]) {\n\t\t\t\tdelete data.configComponents[componentType];\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction _setValue(field: string, value: any, cb: any) {\n\tgetStore()?.setValue(\n\t\t{\n\t\t\tfield: field,\n\t\t\tvalue: value,\n\t\t},\n\t\t(error) => {\n\t\t\tif (error) {\n\t\t\t\tFSBL.Clients.Logger.error(`Advanced App Launcher: Failed to save: ${field}:${value}`);\n\t\t\t} else {\n\t\t\t\tcb && cb();\n\t\t\t}\n\t\t}\n\t);\n}\n\nfunction _setFolders(cb = Function.prototype) {\n\t_setValue(\"appFolders.folders\", data.folders, (err: StandardError) => {\n\t\tif (err) {\n\t\t\tFSBL.Clients.Logger.error(`Advanced App Launcher: Failed to set folders: ${err}`);\n\t\t\treturn;\n\t\t}\n\n\t\tcb();\n\t});\n}\n\nfunction _findAppIndexInFolders(appID: string, folderName: string) {\n\treturn findIndex(data.folders[folderName].apps, (app) => app.appID === appID);\n}\n\nfunction getFolders() {\n\treturn data.folders;\n}\n\nfunction getFoldersList() {\n\treturn data.foldersList;\n}\n\nfunction getAllApps() {\n\treturn Object.assign({}, data.apps, data.configComponents);\n}\n\nfunction getFormStatus() {\n\treturn data.isFormVisible;\n}\n\nfunction getSingleFolder(folderName: string) {\n\treturn data.folders[folderName];\n}\n\nfunction reorderFolders(destIndex: number, srcIndex: number) {\n\t// There are two types of folders: Those that can be arranged, and those that cannot. We don't want to reorder the folders relative to the unorderable folders. Split them out, and then combine them after doing the filtering/swapping.\n\tconst dragDisabled = getDragDisabled();\n\tconst unorderableFolders = data.foldersList.filter((folderName) => dragDisabled.includes(folderName));\n\tconst orderableFolders = data.foldersList.filter((folderName) => !dragDisabled.includes(folderName));\n\tconst movedFolder = orderableFolders[destIndex];\n\tconst remainingItems = orderableFolders.filter((item, index) => index !== destIndex);\n\tdata.foldersList = [\n\t\t...unorderableFolders,\n\t\t...remainingItems.slice(0, srcIndex),\n\t\tmovedFolder,\n\t\t...remainingItems.slice(srcIndex),\n\t];\n\t_setValue(\"appFolders.list\", data.foldersList, () => {});\n\treturn data.foldersList;\n}\n\nfunction addApp(app = <AppsType>{}, cb: any) {\n\tconst appID = `${new Date().getTime()}`;\n\tconst folder = data.activeFolder;\n\tconst newAppData = {\n\t\tappID,\n\t\ttags: app.tags,\n\t\tname: app.name,\n\t\turl: app.url,\n\t\ttype: \"component\",\n\t\tcanDelete: true,\n\t};\n\n\t/**\n\t * Note, the advanced app launcher can currently only keep track of apps that\n\t * are added by itself. Apps added by the basic launcher, or any other means,\n\t * will not be detected. A reconciliation process would need to be added that\n\t * listens on the distributed store similar to how the basic app launcher works.\n\t *\n\t * FSBL.Clients.RouterClient.subscribe(\"Launcher.update\", (err, response) => {\n\t\t\tFSBL.Clients.Logger.debug(\"list updated\", err, response);\n\t\t\tif (err) {\n\t\t\t\treturn console.error(err);\n\t\t\t}\n\t\t\tself.filterComponents(response.data.componentList);\n\t\t});\n\t */\n\tFSBL.Clients.LauncherClient.addUserDefinedComponent(newAppData, (compAddErr) => {\n\t\tif (compAddErr) {\n\t\t\tcb({ code: \"failed_to_add_app\", message: compAddErr });\n\t\t\tconsole.warn(\"Failed to add new app:\", compAddErr);\n\t\t\treturn;\n\t\t}\n\t\tdata.apps[appID] = newAppData;\n\n\t\t// Add to ADVANCED_APP_LAUNCHER folder\n\t\tdata.folders[ADVANCED_APP_LAUNCHER].apps.push(newAppData);\n\n\t\t// Check if we need to add to another folder as well\n\t\tif (folder !== ADVANCED_APP_LAUNCHER) {\n\t\t\tdata.folders[folder].apps.push(newAppData);\n\t\t}\n\t\t// Save appDefinitions and then folders\n\t\t_setValue(\"appDefinitions\", data.apps, () => {\n\t\t\t_setFolders();\n\t\t\tcb && cb();\n\t\t});\n\t});\n}\n\nfunction deleteApp(appID: string) {\n\t// Delete app from any folder that has it\n\tfor (const key in data.folders) {\n\t\tconst appIndex = _findAppIndexInFolders(appID, key);\n\t\tdata.folders[key].apps.splice(appIndex, 1);\n\t}\n\n\t// Delete app from the apps list\n\tFSBL.Clients.LauncherClient.removeUserDefinedComponent(data.apps[appID], () => {\n\t\tdelete data.apps[appID];\n\t\t// Save appDefinitions and then folders\n\t\t_setValue(\"appDefinitions\", data.apps, () => {\n\t\t\t_setFolders();\n\t\t});\n\t});\n}\n\nfunction addNewFolder(name?: string) {\n\t// Each new folder is given a number, lets store them here\n\t// to get the highest one and then increment\n\t// result of this will be [0, 1, 2] etc\n\tconst newFoldersNums = [\n\t\t0,\n\t\t// Find folders that have a name of \"New folder\" or \"New folder #\"\n\t\t...data.foldersList\n\t\t\t.filter((folder) => folder.startsWith(NEW_FOLDER_NAME))\n\t\t\t.map((folder) => {\n\t\t\t\tconst numbers: any[] = folder.match(/\\d+/g) || [];\n\t\t\t\treturn Math.max(...numbers);\n\t\t\t}),\n\t];\n\tconst highestFolderNumber = Math.max(...newFoldersNums);\n\tconst folderName: string = name ?? `${NEW_FOLDER_NAME} ${highestFolderNumber + 1}`;\n\tconst newFolder = {\n\t\tdisableUserRemove: true,\n\t\ticon: \"ff-adp-hamburger\",\n\t\tcanEdit: true,\n\t\tcanDelete: true,\n\t\tapps: [],\n\t};\n\tdata.folders[folderName] = newFolder;\n\t_setFolders(() => {\n\t\t// Update folders order if adding was successful\n\t\tdata.foldersList.push(folderName);\n\t\t_setValue(\"appFolders.list\", data.foldersList, () => {});\n\t});\n}\n\nfunction deleteFolder(folderName: string) {\n\t// Check if user is trying to delete the active folder\n\tif (folderName === data.activeFolder) {\n\t\tdata.activeFolder = ADVANCED_APP_LAUNCHER;\n\t\t_setValue(\"activeFolder\", data.activeFolder, () => {});\n\t}\n\n\tdelete data.folders[folderName] &&\n\t\t_setFolders(() => {\n\t\t\t// Update the order of folders\n\t\t\tconst index = data.foldersList.indexOf(folderName);\n\t\t\tdata.foldersList.splice(index, 1);\n\t\t\t_setValue(\"appFolders.list\", data.foldersList, () => {});\n\t\t});\n}\n\nfunction renameFolder(oldName: string, newName: string) {\n\tlet indexOfOld = data.foldersList.findIndex((folderName) => folderName === oldName);\n\n\tif (indexOfOld > -1) {\n\t\tlet oldFolder = data.folders[oldName];\n\t\tdata.folders[newName] = oldFolder;\n\t\tdata.foldersList.splice(indexOfOld, 1, newName);\n\n\t\t_setFolders(() => {\n\t\t\t_setValue(\"appFolders.list\", data.foldersList, () => {});\n\n\t\t\tif (data.activeFolder === oldName) {\n\t\t\t\t_setValue(\"activeFolder\", newName, () => {});\n\t\t\t}\n\n\t\t\tdelete data.folders[oldName];\n\t\t});\n\t}\n}\n\nfunction addAppToFolder(folderName: string, app: FolderAppType) {\n\tconst appIndex = _findAppIndexInFolders(app.appID, folderName);\n\n\tif (appIndex < 0) {\n\t\tdata.folders[folderName].apps.push({\n\t\t\tname: app.name,\n\t\t\tdisplayName: app.displayName,\n\t\t\tappID: app.appID,\n\t\t});\n\t\t_setFolders();\n\t}\n}\n\nfunction removeAppFromFolder(folderName: string, app: FolderAppType) {\n\tconst appIndex = _findAppIndexInFolders(app.appID, folderName);\n\tdata.folders[folderName].apps.splice(appIndex, 1);\n\t_setFolders();\n}\n\nfunction getAllAppsFromFolder(folderName: string) {\n\treturn data.folders[folderName].apps;\n}\n\n/**\n * Given a field, search through FDC3 apps and apps pulled in via config and return that app.\n * */\nfunction findAppByField(field: keyof AppsType | keyof ConfigType, value: any) {\n\treturn (\n\t\tObject.values(data.apps).find((app) => (app ? (app as any)[field] === value : false)) ||\n\t\tObject.values(data.configComponents).find((app) => (app ? (app as any)[field] === value : false))\n\t);\n}\n\nfunction getActiveFolder() {\n\tconst folder = data.folders[data.activeFolder];\n\n\tif (!folder) {\n\t\tFSBL.Clients.Logger.error(`activeFolder:\"${data.activeFolder}\" not found! Defaulting to empty folder`);\n\t\treturn {\n\t\t\tname: data.activeFolder,\n\t\t\tapps: [],\n\t\t};\n\t}\n\n\tObject.values(folder.apps).forEach((app) => {\n\t\tconst appData = findAppByField(\"appID\", app.appID);\n\t\tif (!appData) {\n\t\t\tapp.tags = [];\n\t\t} else {\n\t\t\tapp.tags = appData.tags;\n\t\t}\n\t});\n\t// Need a name for the AppDefinition/AppActionsMenu rendering\n\tfolder.name = data.activeFolder;\n\treturn folder;\n}\n\nfunction getActiveFolderName() {\n\treturn data.activeFolder;\n}\n\nfunction getSearchText() {\n\treturn data.filterText;\n}\n\nfunction getSortBy() {\n\treturn data.sortBy;\n}\n\nfunction getTags() {\n\treturn data.tags;\n}\n\nfunction getAllAppsTags() {\n\tlet tags: any[] = [];\n\t// Pull tags from applications installed via FDC3 and the component config.\n\tconst apps = Object.values(data.apps).concat(Object.values(data.configComponents) as any);\n\n\tapps.forEach((app) => {\n\t\ttags = tags.concat(app.tags);\n\t});\n\t// return unique ones only\n\treturn tags.filter((tag, index) => tags.indexOf(tag) === index);\n}\n\nfunction addTag(tag: string) {\n\t// Push new tag to list\n\tdata.tags.indexOf(tag) < 0 && data.tags.push(tag);\n\t// Update tags in store\n\t_setValue(\"activeLauncherTags\", data.tags, () => {});\n}\n\nfunction deleteTag(tag: string) {\n\t// Push new tag to list\n\tdata.tags.splice(data.tags.indexOf(tag), 1);\n\t// Update tags in store\n\t_setValue(\"activeLauncherTags\", data.tags, () => {});\n}\n"]}
|
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
2
|
import { StaticAppLauncherMenu } from "./StaticAppLauncherMenu";
|
|
3
|
-
import { DynamicAppLauncher } from "./DynamicAppLauncher";
|
|
4
3
|
export const AppLauncherMenu = (props) => {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const [menus, setMenus] = useState({});
|
|
5
|
+
const updateMenu = () => {
|
|
6
|
+
FSBL.Clients.ConfigClient.getValue("finsemble.toolbarMenus").then(({ data }) => {
|
|
7
|
+
setMenus(data);
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
updateMenu();
|
|
12
|
+
FSBL.Clients.ConfigClient.addListener({ field: "finsemble.toolbarMenus" }, updateMenu);
|
|
13
|
+
}, []);
|
|
14
|
+
if (Object.values(menus).length > 0) {
|
|
15
|
+
return (React.createElement(React.Fragment, null, Object.values(menus)
|
|
16
|
+
.sort((a, b) => a.position - b.position)
|
|
17
|
+
.map((menuObj, index) => (React.createElement(StaticAppLauncherMenu, { key: index, id: `AppLauncher-${index}`, title: menuObj.displayName, componentFilter: menuObj.applications, suppressFavorites: menuObj.applications && menuObj.applications.length > 0 })))));
|
|
7
18
|
}
|
|
8
19
|
else {
|
|
9
20
|
return React.createElement(StaticAppLauncherMenu, Object.assign({}, props));
|