@finsemble/finsemble-ui 6.2.1 → 6.3.1-beta-1
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 +27 -22
- package/react/actions/smartDesktopDesignerActions.d.ts +7 -8
- package/react/actions/smartDesktopDesignerActions.js.map +1 -1
- package/react/actions/toolbarActions.d.ts +2 -3
- package/react/actions/toolbarActions.js.map +1 -1
- package/react/assets/css/button.css +2 -1
- package/react/assets/css/notificationsCenter.css +4 -2
- package/react/assets/css/userPreferences.css +1 -0
- package/react/assets/css/windowTitleBar.css +33 -1
- package/react/componentTemplateGenerator.js.map +1 -1
- package/react/components/FinsembleProvider.js +1 -1
- package/react/components/FinsembleProvider.js.map +1 -1
- package/react/components/appCatalog/AppCatalogComponent.js +7 -13
- package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
- package/react/components/appCatalog/components/AppList.d.ts +7 -1
- package/react/components/appCatalog/components/AppList.js +1 -1
- package/react/components/appCatalog/components/AppList.js.map +1 -1
- package/react/components/appCatalog/components/AppResults.d.ts +10 -8
- package/react/components/appCatalog/components/AppResults.js +1 -1
- package/react/components/appCatalog/components/AppResults.js.map +1 -1
- package/react/components/appCatalog/components/Carousel.js +1 -1
- package/react/components/appCatalog/components/Carousel.js.map +1 -1
- package/react/components/appCatalog/components/EmptyResults.d.ts +2 -1
- package/react/components/appCatalog/components/EmptyResults.js +2 -4
- package/react/components/appCatalog/components/EmptyResults.js.map +1 -1
- package/react/components/appCatalog/components/Hero.d.ts +24 -4
- package/react/components/appCatalog/components/Hero.js +2 -1
- package/react/components/appCatalog/components/Hero.js.map +1 -1
- package/react/components/appCatalog/components/Home.d.ts +18 -4
- package/react/components/appCatalog/components/Home.js.map +1 -1
- package/react/components/appCatalog/components/SearchBar.d.ts +20 -7
- package/react/components/appCatalog/components/SearchBar.js +4 -7
- package/react/components/appCatalog/components/SearchBar.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppDescription.d.ts +5 -3
- package/react/components/appCatalog/components/Showcase/AppDescription.js +4 -6
- package/react/components/appCatalog/components/Showcase/AppDescription.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppDevNotes.d.ts +5 -4
- package/react/components/appCatalog/components/Showcase/AppDevNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppShowcase.js +1 -1
- package/react/components/appCatalog/components/Showcase/AppShowcase.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/Header.d.ts +13 -5
- package/react/components/appCatalog/components/Showcase/Header.js +2 -2
- package/react/components/appCatalog/components/Showcase/Header.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/Modal.d.ts +7 -4
- package/react/components/appCatalog/components/Showcase/Modal.js +6 -6
- package/react/components/appCatalog/components/Showcase/Modal.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/defaults.d.ts +3 -3
- package/react/components/appCatalog/components/Showcase/defaults.js.map +1 -1
- package/react/components/appCatalog/components/Tag.d.ts +6 -4
- package/react/components/appCatalog/components/Tag.js.map +1 -1
- package/react/components/appCatalog/components/Toast.d.ts +5 -3
- package/react/components/appCatalog/components/Toast.js +5 -5
- package/react/components/appCatalog/components/Toast.js.map +1 -1
- package/react/components/appCatalog/components/helpers.js +2 -1
- package/react/components/appCatalog/components/helpers.js.map +1 -1
- package/react/components/appCatalog/modules/AppDirectory.d.ts +5 -1
- package/react/components/appCatalog/modules/AppDirectory.js.map +1 -1
- package/react/components/appCatalog/modules/FDC3.d.ts +12 -11
- package/react/components/appCatalog/modules/FDC3.js +39 -48
- package/react/components/appCatalog/modules/FDC3.js.map +1 -1
- package/react/components/appCatalog/stores/appStore.d.ts +9 -2
- package/react/components/appCatalog/stores/appStore.js +10 -4
- package/react/components/appCatalog/stores/appStore.js.map +1 -1
- package/react/components/appCatalog/stores/storeActions.js +96 -98
- package/react/components/appCatalog/stores/storeActions.js.map +1 -1
- package/react/components/common/Button.d.ts +4 -4
- package/react/components/common/Button.js +1 -1
- package/react/components/common/Button.js.map +1 -1
- package/react/components/common/ButtonIcon.js +1 -1
- package/react/components/common/ButtonIcon.js.map +1 -1
- package/react/components/common/ColorPicker.js +1 -1
- package/react/components/common/ColorPicker.js.map +1 -1
- package/react/components/common/DropZone.d.ts +0 -5
- package/react/components/common/DropZone.js.map +1 -1
- package/react/components/common/DropdownButton.js +1 -1
- package/react/components/common/DropdownButton.js.map +1 -1
- package/react/components/common/FileInput.d.ts +0 -5
- package/react/components/common/FileInput.js +7 -9
- package/react/components/common/FileInput.js.map +1 -1
- package/react/components/common/FinsembleIcon.d.ts +2 -2
- package/react/components/common/FinsembleIcon.js.map +1 -1
- package/react/components/common/FinsembleSelect.js +2 -5
- package/react/components/common/FinsembleSelect.js.map +1 -1
- package/react/components/common/FinsembleToggle.js +2 -2
- package/react/components/common/FinsembleToggle.js.map +1 -1
- package/react/components/common/FontSizeSelector.js +2 -2
- package/react/components/common/FontSizeSelector.js.map +1 -1
- package/react/components/common/ImagePreview.js +2 -2
- package/react/components/common/ImagePreview.js.map +1 -1
- package/react/components/common/Tab.js +2 -1
- package/react/components/common/Tab.js.map +1 -1
- package/react/components/common/file_helpers.js +3 -2
- package/react/components/common/file_helpers.js.map +1 -1
- package/react/components/common/helpers.js +12 -10
- package/react/components/common/helpers.js.map +1 -1
- package/react/components/common/stories/Button.stories.js +1 -1
- package/react/components/common/stories/Button.stories.js.map +1 -1
- package/react/components/common/stories/ButtonIcon.stories.js +1 -1
- package/react/components/common/stories/ButtonIcon.stories.js.map +1 -1
- package/react/components/common/stories/ButtonRow.stories.js +2 -2
- package/react/components/common/stories/ButtonRow.stories.js.map +1 -1
- package/react/components/common/stories/ButtonTile.stories.js +1 -1
- package/react/components/common/stories/ButtonTile.stories.js.map +1 -1
- package/react/components/common/stories/Checkbox.stories.js +1 -1
- package/react/components/common/stories/Checkbox.stories.js.map +1 -1
- package/react/components/common/stories/ColorPicker.stories.js +1 -1
- package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
- package/react/components/common/stories/DropZone.stories.js +1 -1
- package/react/components/common/stories/DropZone.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleIcon.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleSelect.stories.js +1 -1
- package/react/components/common/stories/FinsembleSelect.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleToggle.stories.js +3 -1
- package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
- package/react/components/common/stories/FontSizeSelector.stories.js +1 -1
- package/react/components/common/stories/FontSizeSelector.stories.js.map +1 -1
- package/react/components/common/stories/Header.stories.js +1 -1
- package/react/components/common/stories/Header.stories.js.map +1 -1
- package/react/components/common/tests/Checkbox.spec.js +4 -4
- package/react/components/common/tests/Checkbox.spec.js.map +1 -1
- package/react/components/common/tests/ColorPicker.spec.js +6 -6
- package/react/components/common/tests/ColorPicker.spec.js.map +1 -1
- package/react/components/common/tests/DropZone.spec.js +4 -4
- package/react/components/common/tests/DropZone.spec.js.map +1 -1
- package/react/components/common/tests/FileInput.spec.js +5 -5
- package/react/components/common/tests/FileInput.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleSelect.spec.js +12 -11
- package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleToggle.spec.js +8 -2
- package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
- package/react/components/common/tests/Header.spec.js +3 -3
- package/react/components/common/tests/Header.spec.js.map +1 -1
- package/react/components/common/tests/ImagePreview.spec.js +8 -8
- package/react/components/common/tests/ImagePreview.spec.js.map +1 -1
- package/react/components/common/tests/Tab.spec.js +3 -3
- package/react/components/common/tests/Tab.spec.js.map +1 -1
- package/react/components/common/tests/Tooltip.spec.js +5 -5
- package/react/components/common/tests/Tooltip.spec.js.map +1 -1
- package/react/components/favorites/FavoriteMaker.d.ts +0 -5
- package/react/components/favorites/FavoriteMaker.js +1 -1
- package/react/components/favorites/FavoriteMaker.js.map +1 -1
- package/react/components/favorites/FavoritesShell.js +1 -1
- package/react/components/favorites/FavoritesShell.js.map +1 -1
- package/react/components/favorites/FavoritesShell.spec.js +7 -7
- package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
- package/react/components/favorites/FavoritesShell.stories.js +5 -4
- package/react/components/favorites/FavoritesShell.stories.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverContainer.js +2 -1
- package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.js +13 -13
- package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.spec.js +5 -5
- package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.stories.js +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
- package/react/components/icon/Icon.js +5 -4
- package/react/components/icon/Icon.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialog.js +0 -1
- package/react/components/legacyControls/FinsembleDialog.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogButton.d.ts +1 -1
- package/react/components/legacyControls/FinsembleDialogButton.js +4 -3
- package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogQuestion.js +2 -1
- package/react/components/legacyControls/FinsembleDialogQuestion.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogTextInput.d.ts +1 -1
- package/react/components/legacyControls/FinsembleDialogTextInput.js +8 -5
- package/react/components/legacyControls/FinsembleDialogTextInput.js.map +1 -1
- package/react/components/legacyControls/FinsembleDnDContext.js +34 -22
- package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
- package/react/components/legacyControls/FinsembleDraggable.js +3 -3
- package/react/components/legacyControls/FinsembleDraggable.js.map +1 -1
- package/react/components/legacyControls/FinsembleHoverDetector.js +2 -1
- package/react/components/legacyControls/FinsembleHoverDetector.js.map +1 -1
- package/react/components/legacyControls/FinsembleMenuSection.js +9 -5
- package/react/components/legacyControls/FinsembleMenuSection.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialog.stories.js +1 -1
- package/react/components/legacyControls/stories/FinsembleDialog.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialog.spec.js +1 -1
- package/react/components/legacyControls/tests/FinsembleDialog.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js +8 -7
- package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js +7 -5
- package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js +13 -12
- package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
- package/react/components/linker/LinkerMenu.js +4 -3
- package/react/components/linker/LinkerMenu.js.map +1 -1
- package/react/components/linker/LinkerMenuDeprecated.js +1 -1
- package/react/components/linker/LinkerMenuDeprecated.js.map +1 -1
- package/react/components/linker/remoteRedux.d.ts +10 -42
- package/react/components/linker/remoteRedux.js.map +1 -1
- package/react/components/menu/Menu.d.ts +1 -1
- package/react/components/menu/Menu.js +1 -1
- package/react/components/menu/Menu.js.map +1 -1
- package/react/components/menu/MenuAutoResizer.js.map +1 -1
- package/react/components/menu/MenuContent.js +1 -2
- package/react/components/menu/MenuContent.js.map +1 -1
- package/react/components/menu/MenuHotKey.js +1 -1
- package/react/components/menu/MenuHotKey.js.map +1 -1
- package/react/components/menu/MenuPortal.js +7 -6
- package/react/components/menu/MenuPortal.js.map +1 -1
- package/react/components/menu/keyboardNavigation.js +14 -15
- package/react/components/menu/keyboardNavigation.js.map +1 -1
- package/react/components/notifications/components/NoNotifications.js +2 -4
- package/react/components/notifications/components/NoNotifications.js.map +1 -1
- package/react/components/notifications/components/drawer/Drawer.js +2 -4
- package/react/components/notifications/components/drawer/Drawer.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerControls.js +3 -5
- package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerHeader.js +1 -4
- package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +64 -79
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +15 -13
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
- package/react/components/notifications/components/shared/CheckButton.d.ts +2 -2
- package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
- package/react/components/notifications/components/shared/IconButton.js +3 -5
- package/react/components/notifications/components/shared/IconButton.js.map +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.d.ts +3 -2
- package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
- package/react/components/notifications/components/shared/OverflowMenu.d.ts +2 -1
- package/react/components/notifications/components/shared/OverflowMenu.js +6 -5
- package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.d.ts +3 -2
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js +2 -2
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.d.ts +3 -2
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.d.ts +3 -2
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js +2 -4
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.d.ts +3 -2
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
- package/react/components/notifications/components/views/CardView.js +15 -24
- package/react/components/notifications/components/views/CardView.js.map +1 -1
- package/react/components/notifications/components/views/ListView.d.ts +2 -2
- package/react/components/notifications/components/views/ListView.js +9 -9
- package/react/components/notifications/components/views/ListView.js.map +1 -1
- package/react/components/notifications/components/views/NotificationDetailsView.d.ts +2 -2
- package/react/components/notifications/components/views/NotificationDetailsView.js +2 -6
- package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
- package/react/components/notifications/constants.d.ts +0 -13
- package/react/components/notifications/constants.js.map +1 -1
- package/react/components/notifications/types.d.ts +7 -6
- package/react/components/notifications/types.js.map +1 -1
- package/react/components/notifications/utils.d.ts +6 -4
- package/react/components/notifications/utils.js +26 -32
- package/react/components/notifications/utils.js.map +1 -1
- package/react/components/processMonitor/ProcessMonitor.d.ts +3 -1
- package/react/components/processMonitor/ProcessMonitor.js +24 -14
- package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
- package/react/components/processMonitor/ProcessMonitorTypes.d.ts +33 -0
- package/react/components/processMonitor/ProcessMonitorTypes.js +6 -0
- package/react/components/processMonitor/ProcessMonitorTypes.js.map +1 -0
- package/react/components/processMonitor/components/ChildWindow.d.ts +10 -3
- package/react/components/processMonitor/components/ChildWindow.js +29 -10
- package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
- package/react/components/processMonitor/components/ListHeader.d.ts +18 -4
- package/react/components/processMonitor/components/ListHeader.js +11 -3
- package/react/components/processMonitor/components/ListHeader.js.map +1 -1
- package/react/components/processMonitor/components/ProcessStatistics.d.ts +11 -3
- package/react/components/processMonitor/components/ProcessStatistics.js +35 -18
- package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
- package/react/components/processMonitor/constants.d.ts +11 -16
- package/react/components/processMonitor/constants.js +6 -1
- package/react/components/processMonitor/constants.js.map +1 -1
- package/react/components/processMonitor/helpers.d.ts +14 -6
- package/react/components/processMonitor/helpers.js +31 -23
- package/react/components/processMonitor/helpers.js.map +1 -1
- package/react/components/processMonitor/helpers.spec.d.ts +1 -0
- package/react/components/processMonitor/helpers.spec.js +44 -0
- package/react/components/processMonitor/helpers.spec.js.map +1 -0
- package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +31 -15
- package/react/components/processMonitor/stores/ProcessMonitorStore.js +104 -95
- package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
- package/react/components/quickComponentForm/QuickComponentForm.d.ts +4 -1
- package/react/components/quickComponentForm/QuickComponentForm.js +14 -15
- package/react/components/quickComponentForm/QuickComponentForm.js.map +1 -1
- package/react/components/search/Highlight.js +2 -2
- package/react/components/search/Highlight.js.map +1 -1
- package/react/components/search/Highlight.spec.js +3 -3
- package/react/components/search/Highlight.spec.js.map +1 -1
- package/react/components/search/Highlight.stories.js +1 -1
- package/react/components/search/Highlight.stories.js.map +1 -1
- package/react/components/search/Search.js +17 -8
- package/react/components/search/Search.js.map +1 -1
- package/react/components/search/SearchBestMatch.js +3 -5
- package/react/components/search/SearchBestMatch.js.map +1 -1
- package/react/components/search/SearchProviderResults.js +4 -5
- package/react/components/search/SearchProviderResults.js.map +1 -1
- package/react/components/search/SearchResult.js +3 -2
- package/react/components/search/SearchResult.js.map +1 -1
- package/react/components/search/SearchResults.js +1 -1
- package/react/components/search/SearchResults.js.map +1 -1
- package/react/components/shared/Button.js +2 -4
- package/react/components/shared/Button.js.map +1 -1
- package/react/components/shared/DefaultDropdownButton.js +58 -13
- package/react/components/shared/DefaultDropdownButton.js.map +1 -1
- package/react/components/shared/NavigationButton.js +9 -11
- package/react/components/shared/NavigationButton.js.map +1 -1
- package/react/components/shared/Tag.d.ts +11 -1
- package/react/components/shared/Tag.js.map +1 -1
- package/react/components/shared/TagsMenu.d.ts +26 -6
- package/react/components/shared/TagsMenu.js.map +1 -1
- package/react/components/shared/linkerUtil.d.ts +3 -1
- package/react/components/shared/linkerUtil.js.map +1 -1
- package/react/components/shared/tests/DefaultDropdownButton.spec.js.map +1 -1
- package/react/components/shared/tests/addProtocolToValidURL.spec.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.js +0 -2
- package/react/components/singleInputDialog/SingleInputDialog.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.spec.js +6 -6
- package/react/components/singleInputDialog/SingleInputDialog.spec.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.stories.js +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/AppEditAccess.d.ts +1 -1
- package/react/components/smartDesktopDesigner/AppEditAccess.js +17 -34
- package/react/components/smartDesktopDesigner/AppEditAccess.js.map +1 -1
- package/react/components/smartDesktopDesigner/AppEditPage.d.ts +4 -4
- package/react/components/smartDesktopDesigner/AppEditPage.js +2 -2
- package/react/components/smartDesktopDesigner/AppEditPage.js.map +1 -1
- package/react/components/smartDesktopDesigner/Appearance.js +3 -5
- package/react/components/smartDesktopDesigner/Appearance.js.map +1 -1
- package/react/components/smartDesktopDesigner/Application.d.ts +7 -5
- package/react/components/smartDesktopDesigner/Application.js +78 -92
- package/react/components/smartDesktopDesigner/Application.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationEdit.d.ts +4 -1
- package/react/components/smartDesktopDesigner/ApplicationEdit.js +68 -51
- package/react/components/smartDesktopDesigner/ApplicationEdit.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationList.d.ts +4 -2
- package/react/components/smartDesktopDesigner/ApplicationList.js +23 -20
- package/react/components/smartDesktopDesigner/ApplicationList.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationSetup.d.ts +4 -3
- package/react/components/smartDesktopDesigner/ApplicationSetup.js +8 -20
- package/react/components/smartDesktopDesigner/ApplicationSetup.js.map +1 -1
- package/react/components/smartDesktopDesigner/Applications.d.ts +3 -2
- package/react/components/smartDesktopDesigner/Applications.js +73 -62
- package/react/components/smartDesktopDesigner/Applications.js.map +1 -1
- package/react/components/smartDesktopDesigner/Authentication.js +2 -8
- package/react/components/smartDesktopDesigner/Authentication.js.map +1 -1
- package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js +1 -8
- package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +1 -1
- package/react/components/smartDesktopDesigner/Content.js.map +1 -1
- package/react/components/smartDesktopDesigner/CurrentView.js +1 -1
- package/react/components/smartDesktopDesigner/CurrentView.js.map +1 -1
- package/react/components/smartDesktopDesigner/Export.js +3 -3
- package/react/components/smartDesktopDesigner/Export.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportCloud.js +1 -1
- package/react/components/smartDesktopDesigner/ExportCloud.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportDeployInfo.js +1 -1
- package/react/components/smartDesktopDesigner/ExportDeployInfo.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportZip.js +0 -1
- package/react/components/smartDesktopDesigner/ExportZip.js.map +1 -1
- package/react/components/smartDesktopDesigner/GettingStarted.d.ts +1 -1
- package/react/components/smartDesktopDesigner/GettingStarted.js +1 -1
- package/react/components/smartDesktopDesigner/GettingStarted.js.map +1 -1
- package/react/components/smartDesktopDesigner/ProjectHeader.d.ts +1 -1
- package/react/components/smartDesktopDesigner/ProjectHeader.js +1 -1
- package/react/components/smartDesktopDesigner/ProjectHeader.js.map +1 -1
- package/react/components/smartDesktopDesigner/Publish.js +1 -1
- package/react/components/smartDesktopDesigner/Publish.js.map +1 -1
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +0 -11
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +18 -31
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
- package/react/components/smartDesktopDesigner/Themes.js +2 -8
- package/react/components/smartDesktopDesigner/Themes.js.map +1 -1
- package/react/components/smartDesktopDesigner/View.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/getCSSVars.d.ts +1 -2
- package/react/components/smartDesktopDesigner/common/getCSSVars.js +2 -2
- package/react/components/smartDesktopDesigner/common/getCSSVars.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/views.d.ts +1 -1
- package/react/components/smartDesktopDesigner/common/views.js +8 -18
- package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js +16 -24
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js +8 -9
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/apps.d.ts +4 -70
- package/react/components/smartDesktopDesigner/fixtures/apps.js +20 -31
- package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/authenticationProps.js +6 -9
- package/react/components/smartDesktopDesigner/fixtures/authenticationProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/exportProps.js +5 -5
- package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/publishProgress.d.ts +2 -1
- package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/themeProps.d.ts +5 -5
- package/react/components/smartDesktopDesigner/fixtures/themeProps.js +6 -7
- package/react/components/smartDesktopDesigner/fixtures/themeProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/views.js +4 -4
- package/react/components/smartDesktopDesigner/fixtures/views.js.map +1 -1
- package/react/components/smartDesktopDesigner/sdd_helpers.js +2 -1
- package/react/components/smartDesktopDesigner/sdd_helpers.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.d.ts +3 -4
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js +14 -20
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Appearance.stories.js +7 -7
- package/react/components/smartDesktopDesigner/stories/Appearance.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js +3 -7
- package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js +9 -2
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js +3 -10
- package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Applications.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Authentication.stories.js +18 -36
- package/react/components/smartDesktopDesigner/stories/Authentication.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Export.stories.js +2 -2
- package/react/components/smartDesktopDesigner/stories/Export.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js +2 -2
- package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js +5 -11
- package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.d.ts +1 -1
- package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Navigation.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/Navigation.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js +2 -4
- package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.d.ts +1 -1
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Publish.stories.js +13 -28
- package/react/components/smartDesktopDesigner/stories/Publish.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js +3 -3
- package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Themes.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/Themes.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js +32 -32
- package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js +6 -5
- package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js +11 -11
- package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js +9 -7
- package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Applications.spec.js +35 -35
- package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Authentication.spec.js +6 -18
- package/react/components/smartDesktopDesigner/tests/Authentication.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Export.spec.js +14 -22
- package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js +2 -6
- package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Navigation.spec.js +2 -2
- package/react/components/smartDesktopDesigner/tests/Navigation.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js +2 -2
- package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js +2 -2
- package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Publish.spec.js +3 -10
- package/react/components/smartDesktopDesigner/tests/Publish.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js +2 -6
- package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js +3 -3
- package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Themes.spec.js +7 -7
- package/react/components/smartDesktopDesigner/tests/Themes.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/a11y_helper.js +4 -5
- package/react/components/smartDesktopDesigner/tests/a11y_helper.js.map +1 -1
- package/react/components/system/System.spec.js +1 -1
- package/react/components/system/System.spec.js.map +1 -1
- package/react/components/system/SystemTrayComponentShell.js +1 -1
- package/react/components/system/SystemTrayComponentShell.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.spec.js +5 -5
- package/react/components/toolbar/MinimizeAll.spec.js.map +1 -1
- package/react/components/toolbar/NotificationControl.js +3 -2
- package/react/components/toolbar/NotificationControl.js.map +1 -1
- package/react/components/toolbar/RevealAll.spec.js +5 -5
- package/react/components/toolbar/RevealAll.spec.js.map +1 -1
- package/react/components/toolbar/ToolbarIcon.js +14 -2
- package/react/components/toolbar/ToolbarIcon.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.d.ts +22 -5
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js +11 -6
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js +21 -9
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.d.ts +33 -10
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js +41 -10
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.d.ts +3 -3
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js +0 -3
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.d.ts +24 -8
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js +4 -2
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.d.ts +18 -4
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js +7 -5
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.d.ts +14 -6
- package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js +2 -3
- package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/Content.d.ts +30 -13
- package/react/components/toolbar/advancedAppLauncher/components/Content.js +35 -37
- package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.d.ts +15 -5
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js +4 -3
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.d.ts +38 -21
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js +14 -9
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.d.ts +18 -3
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js +8 -4
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.d.ts +10 -3
- package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js +1 -3
- package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/SearchBox.d.ts +15 -6
- package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js +11 -6
- package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/SortBy.d.ts +11 -4
- package/react/components/toolbar/advancedAppLauncher/components/SortBy.js +3 -2
- package/react/components/toolbar/advancedAppLauncher/components/SortBy.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsList.d.ts +18 -6
- package/react/components/toolbar/advancedAppLauncher/components/TagsList.js +2 -2
- package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.d.ts +20 -4
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js +2 -4
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/modules/FDC3.d.ts +15 -10
- package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js +19 -30
- package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.d.ts +5 -2
- package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.d.ts +87 -59
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js +51 -54
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.d.ts +7 -6
- package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js +11 -13
- package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js.map +1 -1
- package/react/components/toolbar/appLauncher/AppLauncherMenu.d.ts +3 -3
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js +1 -1
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/DynamicAppLauncher.js.map +1 -1
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.d.ts +25 -3
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js +4 -11
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/components/componentList.d.ts +34 -6
- package/react/components/toolbar/appLauncher/components/componentList.js +25 -22
- package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +32 -32
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js +43 -65
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
- package/react/components/toolbar/dashbar/Dashbar.js +143 -125
- package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
- package/react/components/toolbar/dashbar/DashbarItem.js +4 -5
- package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.d.ts +28 -5
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js +17 -23
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.d.ts +25 -3
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.d.ts +13 -8
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js +2 -2
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.d.ts +16 -8
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js +0 -3
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.d.ts +66 -11
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +103 -153
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/workspaceManagementMenu.css +0 -4
- package/react/components/userPreferences/UserPreferenceTypes.d.ts +5 -0
- package/react/components/userPreferences/UserPreferenceTypes.js +2 -0
- package/react/components/userPreferences/UserPreferenceTypes.js.map +1 -0
- package/react/components/userPreferences/UserPreferencesBase.js +2 -2
- package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
- package/react/components/userPreferences/UserPreferencesWrapper.js +1 -1
- package/react/components/userPreferences/UserPreferencesWrapper.js.map +1 -1
- package/react/components/userPreferences/components/ContentSection.js +1 -1
- package/react/components/userPreferences/components/ContentSection.js.map +1 -1
- package/react/components/userPreferences/components/LeftNav.d.ts +1 -1
- package/react/components/userPreferences/components/LeftNav.js +1 -1
- package/react/components/userPreferences/components/LeftNav.js.map +1 -1
- package/react/components/userPreferences/components/content/DashbarEditor.js +4 -4
- package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
- package/react/components/userPreferences/components/content/Notifications.js +2 -0
- package/react/components/userPreferences/components/content/Notifications.js.map +1 -1
- package/react/components/userPreferences/components/content/Workspaces.d.ts +51 -14
- package/react/components/userPreferences/components/content/Workspaces.js +96 -90
- package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js +48 -51
- package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js +9 -9
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js +4 -6
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js +6 -6
- package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
- package/react/components/userPreferences/components/general/ScheduledRestart.js +0 -1
- package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceButton.d.ts +3 -4
- package/react/components/userPreferences/components/workspaces/WorkspaceButton.js +5 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceButton.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js +8 -5
- package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.d.ts +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.js +24 -9
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js +16 -2
- package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js.map +1 -1
- package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +12 -12
- package/react/components/userPreferences/stores/UserPreferencesStore.js +10 -17
- package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
- package/react/components/userPreferences/stories/DashbarEditor.stories.js +1 -1
- package/react/components/userPreferences/stories/DashbarEditor.stories.js.map +1 -1
- package/react/components/userPreferences/stories/DashbarEditorItem.stories.js +1 -1
- package/react/components/userPreferences/stories/DashbarEditorItem.stories.js.map +1 -1
- package/react/components/userPreferences/stories/General.stories.js.map +1 -1
- package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js +1 -1
- package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js.map +1 -1
- package/react/components/userPreferences/stories/NotificationsSources.stories.js +1 -1
- package/react/components/userPreferences/stories/NotificationsSources.stories.js.map +1 -1
- package/react/components/userPreferences/stories/UserPreferences.stories.d.ts +1 -1
- package/react/components/userPreferences/stories/UserPreferences.stories.js +1 -1
- package/react/components/userPreferences/stories/UserPreferences.stories.js.map +1 -1
- package/react/components/userPreferences/stories/WorkspaceButton.stories.d.ts +5 -9
- package/react/components/userPreferences/stories/WorkspaceButton.stories.js +10 -3
- package/react/components/userPreferences/stories/WorkspaceButton.stories.js.map +1 -1
- package/react/components/userPreferences/stories/WorkspaceItem.stories.js +2 -2
- package/react/components/userPreferences/stories/WorkspaceItem.stories.js.map +1 -1
- package/react/components/userPreferences/stories/WorkspaceItemList.stories.js.map +1 -1
- package/react/components/userPreferences/stories/Workspaces.stories.js +2 -2
- package/react/components/userPreferences/stories/Workspaces.stories.js.map +1 -1
- package/react/components/userPreferences/tests/ContentSection.spec.js.map +1 -1
- package/react/components/userPreferences/tests/DashbarEditor.spec.js.map +1 -1
- package/react/components/userPreferences/tests/DashbarEditorItem.spec.js.map +1 -1
- package/react/components/userPreferences/tests/General.spec.js.map +1 -1
- package/react/components/userPreferences/tests/LeftNav.spec.js.map +1 -1
- package/react/components/userPreferences/tests/NotificationSourceTypes.spec.js.map +1 -1
- package/react/components/userPreferences/tests/Notifications.spec.js.map +1 -1
- package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js.map +1 -1
- package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.js.map +1 -1
- package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceButton.spec.js +17 -3
- package/react/components/userPreferences/tests/WorkspaceButton.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceComponents.spec.js +1 -1
- package/react/components/userPreferences/tests/WorkspaceComponents.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceItem.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceItemList.spec.js.map +1 -1
- package/react/components/utils.js +1 -1
- package/react/components/utils.js.map +1 -1
- package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +58 -31
- package/react/components/windowTitleBar/WindowTitleBarShell.js +47 -50
- package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
- package/react/components/windowTitleBar/components/center/Tab.d.ts +28 -7
- package/react/components/windowTitleBar/components/center/Tab.js +11 -4
- package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
- package/react/components/windowTitleBar/components/center/TabList.d.ts +43 -30
- package/react/components/windowTitleBar/components/center/TabList.js +179 -66
- package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButton.js +5 -4
- package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.d.ts +1 -21
- package/react/components/windowTitleBar/components/left/LinkerGroups.js +6 -8
- package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js +2 -1
- package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js.map +1 -1
- package/react/components/windowTitleBar/components/left/ShareButton.d.ts +1 -21
- package/react/components/windowTitleBar/components/right/CloseButton.d.ts +12 -25
- package/react/components/windowTitleBar/components/right/CloseButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/GroupingButton.d.ts +17 -26
- package/react/components/windowTitleBar/components/right/GroupingButton.js +2 -2
- package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/MaximizeButton.d.ts +16 -26
- package/react/components/windowTitleBar/components/right/MaximizeButton.js +7 -9
- package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/MinimizeButton.d.ts +12 -25
- package/react/components/windowTitleBar/components/right/MinimizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/windowTitle.d.ts +2 -1
- package/react/components/windowTitleBar/components/windowTitle.js +22 -10
- package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts +56 -44
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js +96 -64
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.d.ts +42 -44
- package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.js.map +1 -1
- package/react/components/windowTitleBar/windowTitleBarContext.d.ts +9 -9
- package/react/components/windowTitleBar/windowTitleBarContext.js +2 -4
- package/react/components/windowTitleBar/windowTitleBarContext.js.map +1 -1
- package/react/components/yesNoDialog/Timer.spec.js +2 -2
- package/react/components/yesNoDialog/Timer.spec.js.map +1 -1
- package/react/components/yesNoDialog/Timer.stories.js +1 -1
- package/react/components/yesNoDialog/Timer.stories.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.spec.js +5 -5
- package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.stories.js +1 -1
- package/react/components/yesNoDialog/YesNoDialog.stories.js.map +1 -1
- package/react/hooks/useFavoritesShell.js +1 -3
- package/react/hooks/useFavoritesShell.js.map +1 -1
- package/react/hooks/useLinker.js +4 -4
- package/react/hooks/useLinker.js.map +1 -1
- package/react/hooks/useMenu.js +2 -2
- package/react/hooks/useMenu.js.map +1 -1
- package/react/hooks/useNotifications.d.ts +8 -8
- package/react/hooks/useNotifications.js +30 -30
- package/react/hooks/useNotifications.js.map +1 -1
- package/react/hooks/usePubSub.js +3 -5
- package/react/hooks/usePubSub.js.map +1 -1
- package/react/hooks/useSearch.js +1 -1
- package/react/hooks/useSearch.js.map +1 -1
- package/react/hooks/useToolbar.js +16 -35
- package/react/hooks/useToolbar.js.map +1 -1
- package/react/hooks/useWorkspace.js +1 -1
- package/react/hooks/useWorkspace.js.map +1 -1
- package/react/reducers/favoriteReducer.js +1 -1
- package/react/reducers/favoriteReducer.js.map +1 -1
- package/react/reducers/linkerReducer.js.map +1 -1
- package/react/reducers/rootReducer.d.ts +3 -4
- package/react/reducers/toolbarReducer.js +1 -1
- package/react/reducers/toolbarReducer.js.map +1 -1
- package/react/store.d.ts +6 -7
- package/react/store.js.map +1 -1
- package/react/types/advancedAppLauncherTypes.d.ts +28 -1
- package/react/types/advancedAppLauncherTypes.js.map +1 -1
- package/react/types/favoriteTypes.d.ts +1 -1
- package/react/types/favoriteTypes.js.map +1 -1
- package/react/types/fdc3.d.ts +22 -0
- package/react/types/fdc3.js.map +1 -1
- package/react/types/searchTypes.d.ts +3 -0
- package/react/types/searchTypes.js.map +1 -1
- package/react/types/smartDesktopDesignerTypes.d.ts +11 -9
- package/react/types/smartDesktopDesignerTypes.js.map +1 -1
- package/react/types/windowTitleBar.d.ts +47 -0
- package/react/types/windowTitleBar.js +2 -0
- package/react/types/windowTitleBar.js.map +1 -0
- package/react/types/workspaceTypes.d.ts +19 -0
- package/react/types/workspaceTypes.js.map +1 -1
- package/react/components/processMonitor/components/ChildWindows.d.ts +0 -4
- package/react/components/processMonitor/components/ChildWindows.js +0 -11
- package/react/components/processMonitor/components/ChildWindows.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationsProps.d.ts +0 -2
- package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js +0 -88
- package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js.map +0 -1
- package/react/components/toolbar/advancedAppLauncher/components/LeftNav.d.ts +0 -4
- package/react/components/toolbar/advancedAppLauncher/components/LeftNav.js +0 -14
- package/react/components/toolbar/advancedAppLauncher/components/LeftNav.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appLauncherStore.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/appLauncher/stores/appLauncherStore.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,IAAI,gBAAgB,CAAC;AACrB,IAAI,gBAAgB,CAAC;AACrB,IAAI,wBAAwB,CAAC;AAE7B,IAAI,OAAO,GAAG;IACb,UAAU,EAAE,UAAU,EAAE;QACvB,KAAK,CAAC,QAAQ,CACb;YACC,OAAO,CAAC,uBAAuB;YAC/B,OAAO,CAAC,2BAA2B;YAEnC,YAAY;SACZ,EACD,CAAC,GAAG,EAAE,EAAE;YACP,IAAI,GAAG,EAAE;gBACR,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aACnB;YACD,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;YACrD,EAAE,EAAE,CAAC;QACN,CAAC,CACD,CAAC;IACH,CAAC;IACD,gBAAgB,CAAC,EAAE;QAClB,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE;YAC9D,IAAI,GAAG,EAAE;gBACR,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;aACrB;YAED,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,sCAAsC,EAAE,QAAQ,CAAC,CAAC;YAC5E,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;YACnC,IAAI,EAAE,EAAE;gBACP,EAAE,EAAE,CAAC;aACL;QACF,CAAC,CAAC,CAAC;IACJ,CAAC;IACD,uBAAuB,CAAC,EAAE;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IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC;IACjE,CAAC;CACD;AACD,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,OAAO,EAAE,gBAAgB,IAAI,KAAK,EAAE,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport async from \"async\";\r\nlet appLauncherStore;\r\nlet windowGroupStore;\r\nvar COMPONENT_UPDATE_CHANNEL;\r\n\r\nvar Actions = {\r\n\tinitialize: function (cb) {\r\n\t\tasync.parallel(\r\n\t\t\t[\r\n\t\t\t\tActions.initializeComponentList,\r\n\t\t\t\tActions.getUserDefinedComponentList,\r\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-use-before-define\r\n\t\t\t\tsetupHotkeys,\r\n\t\t\t],\r\n\t\t\t(err) => {\r\n\t\t\t\tif (err) {\r\n\t\t\t\t\tconsole.error(err);\r\n\t\t\t\t}\r\n\t\t\t\tFSBL.Clients.Logger.debug(\"Actions.initialize done\");\r\n\t\t\t\tcb();\r\n\t\t\t}\r\n\t\t);\r\n\t},\r\n\tgetComponentList(cb) {\r\n\t\tFSBL.Clients.LauncherClient.getComponentList((err, response) => {\r\n\t\t\tif (err) {\r\n\t\t\t\tthrow new Error(err);\r\n\t\t\t}\r\n\t\t\t// Each AppLauncher\r\n\t\t\tFSBL.Clients.Logger.debug(\"getComponentList from LauncherClient\", response);\r\n\t\t\tActions.filterComponents(response);\r\n\t\t\tif (cb) {\r\n\t\t\t\tcb();\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\tinitializeComponentList(cb) {\r\n\t\tvar self = Actions;\r\n\t\tvar firstTime = true;\r\n\r\n\t\t// When an app launcher button is clicked, it sends over the types of components that the app launcher can spawn. We assign that data to an object in the windowClient, and then use that to render the app launcher.\r\n\t\tFSBL.Clients.RouterClient.subscribe(COMPONENT_UPDATE_CHANNEL, (err, response) => {\r\n\t\t\tif (!FSBL.Clients.WindowClient.options.customData.spawnData) {\r\n\t\t\t\tFSBL.Clients.WindowClient.options.customData.spawnData = {};\r\n\t\t\t}\r\n\t\t\tObject.assign(FSBL.Clients.WindowClient.options.customData.spawnData, response.data);\r\n\t\t\tif (firstTime) {\r\n\t\t\t\t// only update component list the first time to eliminate re-rendering the menu\r\n\t\t\t\tActions.getComponentList(cb);\r\n\t\t\t\tfirstTime = false;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t// Whenever we add or remove a component, this event is fired. We get a list of all components, then filter it out to include only the ones that this particular launcher is capable of spawning.\r\n\t\tFSBL.Clients.RouterClient.subscribe(\"Launcher.update\", (err, response) => {\r\n\t\t\tFSBL.Clients.Logger.debug(\"list updated\", err, response);\r\n\t\t\tif (err) {\r\n\t\t\t\treturn console.error(err);\r\n\t\t\t}\r\n\t\t\tself.filterComponents(response.data.componentList);\r\n\t\t});\r\n\t},\r\n\t// get quick components that the user created from storage.\r\n\tgetUserDefinedComponentList(cb) {\r\n\t\treturn cb();\r\n\t},\r\n\t// saves quick components\r\n\tsaveCustomComponents() {\r\n\t\tvar UDCs = {};\r\n\t\tvar components = Object.keys(Actions.componentList);\r\n\t\tfor (var i = 0; i < components.length; i++) {\r\n\t\t\tvar config = Actions.componentList[components[i]];\r\n\t\t\tif (config.component && config.component.isUserDefined) {\r\n\t\t\t\tUDCs[config.component.type] = config;\r\n\t\t\t}\r\n\t\t}\r\n\t\tFSBL.Clients.StorageClient.save({\r\n\t\t\ttopic: \"finsemble\",\r\n\t\t\tkey: \"userDefinedComponents\",\r\n\t\t\tvalue: UDCs,\r\n\t\t});\r\n\t},\r\n\t// This filters components based on the mode and list settings in customData\r\n\t// Available settings are list - where you list specific individual component Types, mode - which piggybacks on config.mode and lists all components where the mode matches\r\n\t// If neither mode not list are set, all components are shown\r\n\t// Custom Components are always shown @TODO - make this a setting\r\n\tfilterComponents(components) {\r\n\t\tvar self = this;\r\n\t\tvar settings = FSBL.Clients.WindowClient.getSpawnData();\r\n\t\tvar componentList = {};\r\n\t\tvar keys = Object.keys(components);\r\n\t\tif (!settings) {\r\n\t\t\tsettings = {};\r\n\t\t\tFSBL.Clients.Logger.system.warn(\"appLauncherStore.js: `settings` is null or undefined\");\r\n\t\t}\r\n\t\tif (settings.mode) {\r\n\t\t\tif (!Array.isArray(settings.mode)) {\r\n\t\t\t\tsettings.mode = [settings.mode];\r\n\t\t\t}\r\n\t\t\tkeys.forEach((componentType) => {\r\n\t\t\t\tvar config = components[componentType];\r\n\t\t\t\tvar componentMode = config.component && config.component.mode ? config.component.mode : \"\";\r\n\r\n\t\t\t\tif (componentMode || componentMode === \"\") {\r\n\t\t\t\t\t// component.mode can either be a string or an array of strings. So rationalize it to an array.\r\n\t\t\t\t\tif (componentMode.constructor !== Array) {\r\n\t\t\t\t\t\tcomponentMode = [componentMode];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tlet commonModes = componentMode.filter((n) => settings.mode.indexOf(n) !== -1);\r\n\r\n\t\t\t\t\t// If the current mode isn't in the list of modes for the component then don't include it in our list\r\n\t\t\t\t\tif (commonModes.length) {\r\n\t\t\t\t\t\tcomponentList[componentType] = components[componentType];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\tif (settings.list) {\r\n\t\t\tvar commonItems = settings.list.filter((n) => keys.indexOf(n) !== -1);\r\n\r\n\t\t\tfor (let i = 0; i < commonItems.length; i++) {\r\n\t\t\t\tcomponentList[commonItems[i]] = components[commonItems[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!settings.mode && !settings.list) {\r\n\t\t\tcomponentList = components;\r\n\t\t} else {\r\n\t\t\tfor (let i = 0; i < keys.length; i++) {\r\n\t\t\t\tlet component = components[keys[i]];\r\n\t\t\t\tif (component.component.isUserDefined) {\r\n\t\t\t\t\tcomponentList[keys[i]] = component;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tself.componentList = componentList;\r\n\r\n\t\tFSBL.Clients.Logger.debug(\r\n\t\t\t\"appLauncher filterComponents\",\r\n\t\t\tself.componentList,\r\n\t\t\t\"settings\",\r\n\t\t\tsettings,\r\n\t\t\t\"customData\",\r\n\t\t\tFSBL.Clients.WindowClient.options.customData\r\n\t\t);\r\n\t\tappLauncherStore.setValue({\r\n\t\t\tfield: \"componentList\",\r\n\t\t\tvalue: self.componentList,\r\n\t\t});\r\n\t\tself.saveCustomComponents();\r\n\t},\r\n\t// Handler for when the user wants to remove a quick component.\r\n\thandleRemoveCustomComponent(componentName, cb = Function.prototype) {\r\n\t\tvar self = this;\r\n\t\tFSBL.Clients.DialogManager.open(\r\n\t\t\t\"yesNo\",\r\n\t\t\t{\r\n\t\t\t\ttitle: \"Delete this App?\",\r\n\t\t\t\tquestion: `Are you sure you would like to delete \"${componentName}\"?`,\r\n\t\t\t\taffirmativeResponseLabel: \"Delete\",\r\n\t\t\t\tshowNegativeButton: false,\r\n\t\t\t},\r\n\t\t\t(err, response) => {\r\n\t\t\t\t// If the user chooses \"affirmative\" then delete the component.\r\n\t\t\t\t// We should never get an error, but if we do then go ahead and delete the component too.\r\n\t\t\t\tif (err || response.choice === \"affirmative\") {\r\n\t\t\t\t\tcb(true);\r\n\t\t\t\t\tself.removeCustomComponent(componentName);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcb(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t);\r\n\t},\r\n\t// Remove the component, notify others.\r\n\tremoveCustomComponent(componentName) {\r\n\t\tFSBL.Clients.LauncherClient.removeUserDefinedComponent(\r\n\t\t\t{\r\n\t\t\t\tname: componentName,\r\n\t\t\t},\r\n\t\t\t(err) => {\r\n\t\t\t\tif (err) {\r\n\t\t\t\t\treturn console.error(err);\r\n\t\t\t\t}\r\n\t\t\t\tActions.getComponentList();\r\n\t\t\t}\r\n\t\t);\r\n\t},\r\n\t// Hide the window.\r\n\thideWindow() {\r\n\t\tfinsembleWindow.hide();\r\n\t},\r\n\t// Spawn a component.\r\n\tlaunchComponent(config, params, cb) {\r\n\t\t// Actions.hideWindow();\r\n\t\tconsole.log(\"launchComponent\");\r\n\t\tlet defaultParams = {\r\n\t\t\taddToWorkspace: true,\r\n\t\t\tmonitor: \"mine\",\r\n\t\t\toptions: { customData: {} },\r\n\t\t};\r\n\t\tparams = Object.assign(defaultParams, params);\r\n\t\tif (!params.options.customData) {\r\n\t\t\tparams.options.customData = {};\r\n\t\t}\r\n\t\tif (!params.options.customData.component) {\r\n\t\t\tparams.options.customData.component = {};\r\n\t\t}\r\n\t\tif (config.component.windowGroup) {\r\n\t\t\tparams.groupName = config.component.windowGroup;\r\n\t\t}\r\n\t\tFSBL.Clients.LauncherClient.spawn(config.component.type, params, (err, windowInfo) => {\r\n\t\t\tif (cb) {\r\n\t\t\t\tcb(windowInfo.windowIdentifier);\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\tcreateNewWindowGroup(groupPrefix, cb) {\r\n\t\twindowGroupStore.getValue({ field: groupPrefix }, (err, value) => {\r\n\t\t\tvar currentGroup = 1;\r\n\t\t\tif (value) {\r\n\t\t\t\tcurrentGroup = Math.max(...Object.keys(value)) + 1;\r\n\t\t\t}\r\n\t\t\tlet groupName = `${groupPrefix}.${currentGroup}`;\r\n\t\t\tFSBL.Clients.LauncherClient.createWindowGroup(\r\n\t\t\t\t{\r\n\t\t\t\t\tgroupName: groupName,\r\n\t\t\t\t},\r\n\t\t\t\t() => {\r\n\t\t\t\t\tcb(groupName);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t});\r\n\t},\r\n};\r\n\r\nfunction createLocalStore(done) {\r\n\tlet defaultData = {\r\n\t\tcomponentList: {},\r\n\t\tmonitorDimensions: {},\r\n\t};\r\n\r\n\tFSBL.Clients.DistributedStoreClient.createStore(\r\n\t\t{ store: \"Finsemble-AppLauncher-Local-Store\", values: defaultData },\r\n\t\t(err, store) => {\r\n\t\t\tappLauncherStore = store;\r\n\t\t\tdone();\r\n\t\t}\r\n\t);\r\n}\r\n\r\nfunction getWindowGroupStore(done) {\r\n\tFSBL.Clients.DistributedStoreClient.getStore({ global: true, store: \"Finsemble-WindowGroups\" }, (err, store) => {\r\n\t\twindowGroupStore = store;\r\n\t\tdone();\r\n\t});\r\n}\r\n\r\nfunction initialize(cb) {\r\n\tCOMPONENT_UPDATE_CHANNEL = `${finsembleWindow.name}.ComponentsToRender`;\r\n\tFSBL.Clients.RouterClient.addPubSubResponder(COMPONENT_UPDATE_CHANNEL, {});\r\n\tasync.parallel([createLocalStore, getWindowGroupStore, Actions.initialize], (err) => {\r\n\t\tif (err) {\r\n\t\t\tconsole.error(err);\r\n\t\t}\r\n\t\tFSBL.Clients.Logger.debug(\"appLauncherstore init done\");\r\n\t\tcb(appLauncherStore);\r\n\t});\r\n}\r\nvar keys = {};\r\nfunction setupHotkeys(cb) {\r\n\tFSBL.Clients.RouterClient.subscribe(\"humanInterface.keydown\", (err, response) => {\r\n\t\tif (!keys[response.data.key]) {\r\n\t\t\tkeys[response.data.key] = {};\r\n\t\t}\r\n\t\tkeys[response.data.key] = true;\r\n\t\tif (keys[160] && keys[162] && keys[68]) {\r\n\t\t\tif (Actions.componentList[\"Advanced Chart\"]) {\r\n\t\t\t\tFSBL.Clients.LauncherClient.spawn(\"Advanced Chart\", { addToWorkspace: true }, { monitor: \"mine\" });\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\tFSBL.Clients.RouterClient.subscribe(\"humanInterface.keyup\", (err, response) => {\r\n\t\tif (!keys[response.data.key]) {\r\n\t\t\tkeys[response.data.key] = {};\r\n\t\t}\r\n\t\tkeys[response.data.key] = false;\r\n\t});\r\n\r\n\treturn cb();\r\n}\r\nlet getStore = () => appLauncherStore;\r\n\r\n/**\r\n * This is a quick little initialization manager that Terry hacked up.\r\n * Ultimately everything in this file should be rewritten in hooks/redux pattern.\r\n */\r\nclass StoreManager {\r\n\tconstructor() {\r\n\t\tthis.initialized = false;\r\n\t\tthis.initializing = false;\r\n\t\tthis.callbacks = [];\r\n\t\tthis.store = null;\r\n\t}\r\n\r\n\tinitialize() {\r\n\t\tif (this.initializing) return;\r\n\t\tthis.initializing = true;\r\n\t\tinitialize((store) => {\r\n\t\t\tthis.initialized = true;\r\n\t\t\tthis.store = store;\r\n\t\t\tthis.callbacks.forEach((cb) => cb(store));\r\n\t\t});\r\n\t}\r\n\r\n\taddInitializedListener(cb) {\r\n\t\tif (this.initialized) return cb(this.store);\r\n\t\tthis.callbacks.push(cb);\r\n\t}\r\n\r\n\tremoveInitializedListener(cb) {\r\n\t\tthis.callbacks = this.callbacks.filter((entry) => entry !== cb);\r\n\t}\r\n}\r\nconst storeManager = new StoreManager();\r\n\r\nexport { storeManager };\r\nexport { initialize };\r\nexport { appLauncherStore as Store };\r\nexport { Actions };\r\nexport { getStore };\r\n"]}
|
|
1
|
+
{"version":3,"file":"appLauncherStore.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/appLauncher/stores/appLauncherStore.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,IAAI,gBAAwC,CAAC;AAC7C,IAAI,wBAAgC,CAAC;AAKrC,MAAM,OAAO,GAAG;IACf,aAAa,EAAE,EAAmB;IAClC,UAAU,EAAE,UAAU,EAAgB;QACrC,KAAK,CAAC,QAAQ,CACb;YACC,OAAO,CAAC,uBAAuB;YAC/B,OAAO,CAAC,2BAA2B;YAEnC,YAAY;SACZ,EACD,CAAC,GAAG,EAAE,EAAE;YACP,IAAI,GAAG,EAAE;gBACR,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aACnB;YACD,IAAI,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C,EAAE,CAAC,CAAC;IACzB,CAAC;IAED,yBAAyB,CAAC,EAAY;QACrC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC;IACjE,CAAC;CACD;AACD,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,gBAAgB,IAAI,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport StoreModel from \"@finsemble/finsemble-core/types/clients/StoreModel\";\r\nimport { SpawnResponse } from \"@finsemble/finsemble-core/types/clients/launcherClient\";\r\nimport { StandardError } from \"@finsemble/finsemble-core/types/types\";\r\nimport async from \"async\";\r\nimport { WindowIdentifier } from \"@finsemble/finsemble-core\";\r\nlet appLauncherStore: StoreModel | undefined;\r\nlet COMPONENT_UPDATE_CHANNEL: string;\r\ntype VoidCallback = () => void;\r\ntype ComponentDescriptor = Record<string, any>;\r\ntype ComponentList = Record<string, ComponentDescriptor>;\r\n\r\nconst Actions = {\r\n\tcomponentList: {} as ComponentList,\r\n\tinitialize: function (cb: VoidCallback) {\r\n\t\tasync.parallel(\r\n\t\t\t[\r\n\t\t\t\tActions.initializeComponentList,\r\n\t\t\t\tActions.getUserDefinedComponentList,\r\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-use-before-define\r\n\t\t\t\tsetupHotkeys,\r\n\t\t\t],\r\n\t\t\t(err) => {\r\n\t\t\t\tif (err) {\r\n\t\t\t\t\tconsole.error(err);\r\n\t\t\t\t}\r\n\t\t\t\tFSBL.Clients.Logger.system.debug(\"Actions.initialize done\");\r\n\t\t\t\tcb();\r\n\t\t\t}\r\n\t\t);\r\n\t},\r\n\tgetComponentList(cb?: VoidCallback) {\r\n\t\tFSBL.Clients.LauncherClient.getComponentList((err: StandardError, response) => {\r\n\t\t\tif (typeof err === \"string\") {\r\n\t\t\t\tthrow new Error(err);\r\n\t\t\t}\r\n\t\t\t// Each AppLauncher\r\n\t\t\tFSBL.Clients.Logger.system.debug(\"getComponentList from LauncherClient\", response);\r\n\t\t\tActions.filterComponents(response);\r\n\t\t\tif (cb) {\r\n\t\t\t\tcb();\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\tinitializeComponentList(cb: VoidCallback) {\r\n\t\tconst self = Actions;\r\n\t\tlet firstTime = true;\r\n\r\n\t\t// When an app launcher button is clicked, it sends over the types of components that the app launcher can spawn. We assign that data to an object in the windowClient, and then use that to render the app launcher.\r\n\t\tFSBL.Clients.RouterClient.subscribe(COMPONENT_UPDATE_CHANNEL, (_err, response) => {\r\n\t\t\tif (!FSBL.Clients.WindowClient.options.customData.spawnData) {\r\n\t\t\t\tFSBL.Clients.WindowClient.options.customData.spawnData = {};\r\n\t\t\t}\r\n\t\t\tObject.assign(FSBL.Clients.WindowClient.options.customData.spawnData, response.data);\r\n\t\t\tif (firstTime) {\r\n\t\t\t\t// only update component list the first time to eliminate re-rendering the menu\r\n\t\t\t\tActions.getComponentList(cb);\r\n\t\t\t\tfirstTime = false;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t// Whenever we add or remove a component, this event is fired. We get a list of all components, then filter it out to include only the ones that this particular launcher is capable of spawning.\r\n\t\tFSBL.Clients.RouterClient.subscribe(\"Launcher.update\", (err, response) => {\r\n\t\t\tFSBL.Clients.Logger.system.debug(\"list updated\", err, response);\r\n\t\t\tif (err) {\r\n\t\t\t\treturn console.error(err);\r\n\t\t\t}\r\n\t\t\tself.filterComponents(response.data.componentList);\r\n\t\t});\r\n\t},\r\n\t// get quick components that the user created from storage.\r\n\tgetUserDefinedComponentList(cb: VoidCallback) {\r\n\t\treturn cb();\r\n\t},\r\n\t// saves quick components\r\n\tsaveCustomComponents() {\r\n\t\tconst UDCs: { [key: string]: any } = {};\r\n\t\tconst components = Object.keys(Actions.componentList);\r\n\t\tfor (let i = 0; i < components.length; i++) {\r\n\t\t\tconst config = Actions.componentList[components[i]];\r\n\t\t\tif (config.component && config.component.isUserDefined) {\r\n\t\t\t\tUDCs[config.component.type] = config;\r\n\t\t\t}\r\n\t\t}\r\n\t\tFSBL.Clients.StorageClient.save({\r\n\t\t\ttopic: \"finsemble\",\r\n\t\t\tkey: \"userDefinedComponents\",\r\n\t\t\tvalue: UDCs,\r\n\t\t});\r\n\t},\r\n\t// This filters components based on the mode and list settings in customData\r\n\t// Available settings are list - where you list specific individual component Types, mode - which piggybacks on config.mode and lists all components where the mode matches\r\n\t// If neither mode not list are set, all components are shown\r\n\t// Custom Components are always shown\r\n\tfilterComponents(components: ComponentList = {}) {\r\n\t\tconst self = this;\r\n\t\tlet settings: any = FSBL.Clients.WindowClient.getSpawnData();\r\n\t\tlet componentList: ComponentList = {};\r\n\t\tconst keys = Object.keys(components);\r\n\t\tif (!settings) {\r\n\t\t\tsettings = {};\r\n\t\t\tFSBL.Clients.Logger.system.warn(\"appLauncherStore.js: `settings` is null or undefined\");\r\n\t\t}\r\n\t\tif (settings.mode) {\r\n\t\t\tif (!Array.isArray(settings.mode)) {\r\n\t\t\t\tsettings.mode = [settings.mode];\r\n\t\t\t}\r\n\t\t\tkeys.forEach((componentType) => {\r\n\t\t\t\tconst config = components[componentType];\r\n\t\t\t\tlet componentMode = config.component && config.component.mode ? config.component.mode : \"\";\r\n\r\n\t\t\t\tif (componentMode || componentMode === \"\") {\r\n\t\t\t\t\t// component.mode can either be a string or an array of strings. So rationalize it to an array.\r\n\t\t\t\t\tif (componentMode.constructor !== Array) {\r\n\t\t\t\t\t\tcomponentMode = [componentMode];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tconst commonModes = componentMode.filter((n: ComponentDescriptor) => settings.mode.indexOf(n) !== -1);\r\n\r\n\t\t\t\t\t// If the current mode isn't in the list of modes for the component then don't include it in our list\r\n\t\t\t\t\tif (commonModes.length) {\r\n\t\t\t\t\t\tcomponentList[componentType] = components[componentType];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\tif (settings.list) {\r\n\t\t\tconst commonItems = settings.list.filter((n: any) => keys.indexOf(n) !== -1);\r\n\r\n\t\t\tfor (let i = 0; i < commonItems.length; i++) {\r\n\t\t\t\tcomponentList[commonItems[i]] = components[commonItems[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!settings.mode && !settings.list) {\r\n\t\t\tcomponentList = components;\r\n\t\t} else {\r\n\t\t\tfor (let i = 0; i < keys.length; i++) {\r\n\t\t\t\tconst component = components[keys[i]];\r\n\t\t\t\tif (component.component.isUserDefined) {\r\n\t\t\t\t\tcomponentList[keys[i]] = component;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tself.componentList = componentList;\r\n\r\n\t\tFSBL.Clients.Logger.system.debug(\r\n\t\t\t\"appLauncher filterComponents\",\r\n\t\t\tself.componentList,\r\n\t\t\t\"settings\",\r\n\t\t\tsettings,\r\n\t\t\t\"customData\",\r\n\t\t\tFSBL.Clients.WindowClient.options.customData\r\n\t\t);\r\n\t\tappLauncherStore?.setValue({\r\n\t\t\tfield: \"componentList\",\r\n\t\t\tvalue: self.componentList,\r\n\t\t});\r\n\t\tself.saveCustomComponents();\r\n\t},\r\n\t// Handler for when the user wants to remove a quick component.\r\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n\thandleRemoveCustomComponent(componentName: string, cb = (wasDeconsted: boolean) => {}) {\r\n\t\tconst self = this;\r\n\t\tFSBL.Clients.DialogManager.open(\r\n\t\t\t\"yesNo\",\r\n\t\t\t{\r\n\t\t\t\ttitle: \"Delete this App?\",\r\n\t\t\t\tquestion: `Are you sure you would like to delete \"${componentName}\"?`,\r\n\t\t\t\taffirmativeResponseLabel: \"Delete\",\r\n\t\t\t\tshowNegativeButton: false,\r\n\t\t\t},\r\n\t\t\t(err, response) => {\r\n\t\t\t\t// If the user chooses \"affirmative\" then delete the component.\r\n\t\t\t\t// We should never get an error, but if we do then go ahead and delete the component too.\r\n\t\t\t\tif (err || response.choice === \"affirmative\") {\r\n\t\t\t\t\tcb(true);\r\n\t\t\t\t\tself.removeCustomComponent(componentName);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcb(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t);\r\n\t},\r\n\t// Remove the component, notify others.\r\n\tremoveCustomComponent(componentName: string) {\r\n\t\tFSBL.Clients.LauncherClient.removeUserDefinedComponent(\r\n\t\t\t{\r\n\t\t\t\tname: componentName,\r\n\t\t\t},\r\n\t\t\t(err) => {\r\n\t\t\t\tif (err) {\r\n\t\t\t\t\treturn console.error(err);\r\n\t\t\t\t}\r\n\t\t\t\tActions.getComponentList();\r\n\t\t\t}\r\n\t\t);\r\n\t},\r\n\t// Hide the window.\r\n\thideWindow() {\r\n\t\tfinsembleWindow.hide();\r\n\t},\r\n\t// Spawn a component.\r\n\tlaunchComponent(config: any, params: any, cb?: (win?: WindowIdentifier) => void) {\r\n\t\t// Actions.hideWindow();\r\n\t\tconst defaultParams = {\r\n\t\t\taddToWorkspace: true,\r\n\t\t\tmonitor: \"mine\",\r\n\t\t\toptions: { customData: {} },\r\n\t\t};\r\n\t\tparams = Object.assign(defaultParams, params);\r\n\t\tif (!params.options.customData) {\r\n\t\t\tparams.options.customData = {};\r\n\t\t}\r\n\t\tif (!params.options.customData.component) {\r\n\t\t\tparams.options.customData.component = {};\r\n\t\t}\r\n\t\tif (config.component.windowGroup) {\r\n\t\t\tparams.groupName = config.component.windowGroup;\r\n\t\t}\r\n\t\tFSBL.Clients.LauncherClient.spawn(\r\n\t\t\tconfig.component.type,\r\n\t\t\tparams,\r\n\t\t\t(_err: StandardError, windowInfo?: SpawnResponse) => {\r\n\t\t\t\tif (cb) {\r\n\t\t\t\t\tcb(windowInfo?.windowIdentifier);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t);\r\n\t},\r\n};\r\n\r\nfunction createLocalStore(done: VoidCallback) {\r\n\tconst defaultData = {\r\n\t\tcomponentList: {},\r\n\t\tmonitorDimensions: {},\r\n\t};\r\n\r\n\tFSBL.Clients.DistributedStoreClient.createStore(\r\n\t\t{ store: \"Finsemble-AppLauncher-Local-Store\", values: defaultData },\r\n\t\t(_err, store) => {\r\n\t\t\tappLauncherStore = store;\r\n\t\t\tdone();\r\n\t\t}\r\n\t);\r\n}\r\n\r\nfunction getWindowGroupStore(done: VoidCallback) {\r\n\tFSBL.Clients.DistributedStoreClient.createStore({ global: true, store: \"Finsemble-WindowGroups\" }, () => {\r\n\t\tdone();\r\n\t});\r\n}\r\n\r\nfunction initialize(cb: (store?: StoreModel) => void) {\r\n\tCOMPONENT_UPDATE_CHANNEL = `${finsembleWindow.name}.ComponentsToRender`;\r\n\tFSBL.Clients.RouterClient.addPubSubResponder(COMPONENT_UPDATE_CHANNEL, {});\r\n\tasync.parallel([createLocalStore, getWindowGroupStore, Actions.initialize], (err) => {\r\n\t\tif (err) {\r\n\t\t\tconsole.error(err);\r\n\t\t}\r\n\t\tFSBL.Clients.Logger.system.debug(\"appLauncherstore init done\");\r\n\t\tcb(appLauncherStore);\r\n\t});\r\n}\r\n\r\nconst keys: { [key: string]: any } = {};\r\nfunction setupHotkeys(cb: VoidCallback) {\r\n\tFSBL.Clients.RouterClient.subscribe(\"humanInterface.keydown\", (_err, response) => {\r\n\t\tif (!keys[response.data.key]) {\r\n\t\t\tkeys[response.data.key] = {};\r\n\t\t}\r\n\t\tkeys[response.data.key] = true;\r\n\t\tif (keys[160] && keys[162] && keys[68] && Actions.componentList[\"Advanced Chart\"]) {\r\n\t\t\tFSBL.Clients.LauncherClient.spawn(\"Advanced Chart\", { addToWorkspace: true, monitor: \"mine\" });\r\n\t\t}\r\n\t});\r\n\tFSBL.Clients.RouterClient.subscribe(\"humanInterface.keyup\", (_err, response) => {\r\n\t\tif (!keys[response.data.key]) {\r\n\t\t\tkeys[response.data.key] = {};\r\n\t\t}\r\n\t\tkeys[response.data.key] = false;\r\n\t});\r\n\r\n\treturn cb();\r\n}\r\n\r\nconst getStore = () => appLauncherStore;\r\n\r\nclass StoreManager {\r\n\tinitialized: boolean;\r\n\r\n\tinitializing: boolean;\r\n\r\n\tcallbacks: Function[];\r\n\r\n\tstore: StoreModel | undefined | null;\r\n\r\n\tconstructor() {\r\n\t\tthis.initialized = false;\r\n\t\tthis.initializing = false;\r\n\t\tthis.callbacks = [];\r\n\t\tthis.store = null;\r\n\t}\r\n\r\n\tinitialize() {\r\n\t\tif (this.initializing) return;\r\n\t\tthis.initializing = true;\r\n\t\tinitialize((store?: StoreModel) => {\r\n\t\t\tthis.initialized = true;\r\n\t\t\tthis.store = store;\r\n\t\t\tthis.callbacks.forEach((cb) => cb(store));\r\n\t\t});\r\n\t}\r\n\r\n\taddInitializedListener(cb: (store: StoreModel) => void) {\r\n\t\tif (this.initialized && this.store) return cb(this.store);\r\n\t\tthis.callbacks.push(cb);\r\n\t}\r\n\r\n\tremoveInitializedListener(cb: Function) {\r\n\t\tthis.callbacks = this.callbacks.filter((entry) => entry !== cb);\r\n\t}\r\n}\r\nconst storeManager = new StoreManager();\r\n\r\nexport { storeManager, initialize, appLauncherStore as Store, Actions, getStore };\r\n"]}
|
|
@@ -12,6 +12,7 @@ export const Dashbar = ({ className, children, widgetTitleGenerator }) => {
|
|
|
12
12
|
const [wasReorganized, setReorganized] = useState(false);
|
|
13
13
|
const [totalWidgetsWidth, setTotalWidgetsWidth] = useState(0);
|
|
14
14
|
const [isUpdatingState, setIsUpdatingState] = useState(false);
|
|
15
|
+
const [secondUpdateRequired, setSecondUpdateRequired] = useState(false);
|
|
15
16
|
let movingIndex = null;
|
|
16
17
|
let titleGrabPosition = null;
|
|
17
18
|
let offsetX = null;
|
|
@@ -26,7 +27,7 @@ export const Dashbar = ({ className, children, widgetTitleGenerator }) => {
|
|
|
26
27
|
return (React.createElement("div", { ref: titleRef, onClick: () => handleWidgetTitleClick() },
|
|
27
28
|
React.createElement("span", { dangerouslySetInnerHTML: { __html: widget.title } })));
|
|
28
29
|
};
|
|
29
|
-
const titleGenerator = widgetTitleGenerator
|
|
30
|
+
const titleGenerator = widgetTitleGenerator !== null && widgetTitleGenerator !== void 0 ? widgetTitleGenerator : defaultWidgetTitleGenerator;
|
|
30
31
|
const reorderItems = ({ oldIndex, newIndex }) => {
|
|
31
32
|
movingIndex = null;
|
|
32
33
|
titleGrabPosition = null;
|
|
@@ -55,138 +56,146 @@ export const Dashbar = ({ className, children, widgetTitleGenerator }) => {
|
|
|
55
56
|
};
|
|
56
57
|
const [leftButtonTooltip, setLeftButtonTooltip] = useState("");
|
|
57
58
|
const [rightButtonTooltip, setRightButtonTooltip] = useState("");
|
|
58
|
-
const setWidgetsPositions = (isCalledFromDashbar) => {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
const setWidgetsPositions = async (isCalledFromDashbar) => {
|
|
60
|
+
var _a;
|
|
61
|
+
const { data: bounds } = await finsembleWindow.getBounds();
|
|
62
|
+
const scrollButtonsEnabled = document.querySelectorAll("#dashbar-container > .chevron-container").length > 0;
|
|
63
|
+
const elements = document.getElementsByClassName("dashbar-item-frame");
|
|
64
|
+
let toolbarWidth = (_a = bounds === null || bounds === void 0 ? void 0 : bounds.width) !== null && _a !== void 0 ? _a : 0;
|
|
65
|
+
if (scrollButtonsEnabled)
|
|
66
|
+
toolbarWidth = toolbarWidth - 2 * SCROLL_BUTTON_WIDTH;
|
|
67
|
+
let tempLeft = 0;
|
|
68
|
+
let leftButtonSize = 0;
|
|
69
|
+
if (scrollButtonsEnabled) {
|
|
70
|
+
tempLeft = SCROLL_BUTTON_WIDTH;
|
|
71
|
+
leftButtonSize = SCROLL_BUTTON_WIDTH;
|
|
72
|
+
}
|
|
73
|
+
let leftItemsCount = 0;
|
|
74
|
+
let rightItemsCount = 0;
|
|
75
|
+
for (const element of elements) {
|
|
76
|
+
const rect = element.getBoundingClientRect();
|
|
77
|
+
const widget = widgets[element.id];
|
|
78
|
+
if (!widget)
|
|
79
|
+
continue;
|
|
80
|
+
if (rect.left < SCROLL_BUTTON_WIDTH && scrollButtonsEnabled) {
|
|
81
|
+
widget.bounds.width = 0;
|
|
82
|
+
widget.bounds.left = tempLeft;
|
|
83
|
+
leftItemsCount++;
|
|
66
84
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const rect = element.getBoundingClientRect();
|
|
71
|
-
const widget = widgets[element.id];
|
|
72
|
-
if (rect.left < SCROLL_BUTTON_WIDTH && toolbarWidth < totalWidgetsWidth) {
|
|
73
|
-
widget.bounds.width = 0;
|
|
74
|
-
widget.bounds.left = tempLeft;
|
|
75
|
-
leftItemsCount++;
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
widget.bounds.width = rect.width - widgetDividerWidth;
|
|
79
|
-
widget.bounds.left = tempLeft;
|
|
80
|
-
}
|
|
81
|
-
tempLeft = tempLeft + widget.bounds.width + widgetDividerWidth;
|
|
82
|
-
let offsetRight = rect.left + rect.width - (toolbarWidth - SCROLL_BUTTON_WIDTH) + widgetDividerWidth;
|
|
83
|
-
if (offsetRight > 0) {
|
|
84
|
-
element.childNodes[0].style.visibility = "hidden";
|
|
85
|
-
widget.bounds.width = 0;
|
|
86
|
-
rightItemsCount++;
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
element.childNodes[0].style.visibility = "visible";
|
|
90
|
-
}
|
|
91
|
-
widget.view.setBounds(widget.bounds);
|
|
85
|
+
else {
|
|
86
|
+
widget.bounds.width = rect.width - widgetDividerWidth;
|
|
87
|
+
widget.bounds.left = tempLeft;
|
|
92
88
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
89
|
+
tempLeft = tempLeft + widget.bounds.width + widgetDividerWidth;
|
|
90
|
+
let offsetRight = rect.left + rect.width + widgetDividerWidth - leftButtonSize - toolbarWidth;
|
|
91
|
+
if (offsetRight > 0) {
|
|
92
|
+
element.childNodes[0].style.visibility = "hidden";
|
|
93
|
+
widget.bounds.width = 0;
|
|
94
|
+
rightItemsCount++;
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
element.childNodes[0].style.visibility = "visible";
|
|
98
|
+
}
|
|
99
|
+
widget.view.setBounds(widget.bounds);
|
|
100
|
+
}
|
|
101
|
+
setLeftButtonTooltip(`${leftItemsCount} more`);
|
|
102
|
+
setRightButtonTooltip(`${rightItemsCount} more`);
|
|
96
103
|
if (!isCalledFromDashbar) {
|
|
97
|
-
setWidgetsPositions(true);
|
|
104
|
+
await setWidgetsPositions(true);
|
|
98
105
|
}
|
|
99
106
|
};
|
|
100
|
-
const
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
width: item.width - widgetDividerWidth,
|
|
110
|
-
height: item.height || dashbar.height,
|
|
111
|
-
};
|
|
112
|
-
if (!_widgets.hasOwnProperty(item.id)) {
|
|
113
|
-
const res = await finsembleWindow.addBrowserView({
|
|
114
|
-
url: item.url,
|
|
115
|
-
bounds: widgetBounds,
|
|
116
|
-
allowAutoResize: false,
|
|
117
|
-
});
|
|
118
|
-
_widgets[item.id] = {
|
|
119
|
-
url: item.url,
|
|
120
|
-
title: item.title,
|
|
121
|
-
bounds: widgetBounds,
|
|
122
|
-
view: res,
|
|
123
|
-
width: item.width,
|
|
124
|
-
raiseIntentOptions: item.raiseIntentOptions,
|
|
125
|
-
};
|
|
126
|
-
tempHorizontalBounds = tempHorizontalBounds + item.width;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
setWidgets(_widgets);
|
|
130
|
-
setHorizontalBounds(tempHorizontalBounds);
|
|
107
|
+
const addWidgets = async () => {
|
|
108
|
+
const _widgets = widgets;
|
|
109
|
+
let tempHorizontalBounds = horizontalBounds;
|
|
110
|
+
for (const item of dashbarItems) {
|
|
111
|
+
const widgetBounds = {
|
|
112
|
+
top: verticalBounds,
|
|
113
|
+
left: tempHorizontalBounds,
|
|
114
|
+
width: item.width - widgetDividerWidth,
|
|
115
|
+
height: item.height || dashbar.height,
|
|
131
116
|
};
|
|
132
|
-
|
|
133
|
-
const
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
const dashItem = dashbarItems[i];
|
|
138
|
-
if (dashItem.id === widgetId) {
|
|
139
|
-
found = true;
|
|
140
|
-
break;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
if (!found) {
|
|
144
|
-
toRemove.push(widgetId);
|
|
145
|
-
}
|
|
117
|
+
if (!_widgets.hasOwnProperty(item.id)) {
|
|
118
|
+
const res = await finsembleWindow.addBrowserView({
|
|
119
|
+
url: item.url,
|
|
120
|
+
bounds: widgetBounds,
|
|
121
|
+
allowAutoResize: false,
|
|
146
122
|
});
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
123
|
+
_widgets[item.id] = {
|
|
124
|
+
url: item.url,
|
|
125
|
+
title: item.title,
|
|
126
|
+
bounds: widgetBounds,
|
|
127
|
+
view: res,
|
|
128
|
+
width: item.width,
|
|
129
|
+
raiseIntentOptions: item.raiseIntentOptions,
|
|
130
|
+
};
|
|
131
|
+
tempHorizontalBounds = tempHorizontalBounds + item.width;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
setWidgets(_widgets);
|
|
135
|
+
setHorizontalBounds(tempHorizontalBounds);
|
|
136
|
+
};
|
|
137
|
+
const removeWidgets = () => {
|
|
138
|
+
const _widgets = widgets;
|
|
139
|
+
const toRemove = [];
|
|
140
|
+
Object.keys(_widgets).forEach((widgetId) => {
|
|
141
|
+
let found = false;
|
|
142
|
+
for (let i = 0; i < dashbarItems.length; i++) {
|
|
143
|
+
const dashItem = dashbarItems[i];
|
|
144
|
+
if (dashItem.id === widgetId) {
|
|
145
|
+
found = true;
|
|
146
|
+
break;
|
|
169
147
|
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
148
|
+
}
|
|
149
|
+
if (!found) {
|
|
150
|
+
toRemove.push(widgetId);
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
for (const id of toRemove) {
|
|
154
|
+
if (_widgets.hasOwnProperty(id)) {
|
|
155
|
+
let tempNewHorizontalBounds = 0;
|
|
156
|
+
_widgets[id].view.remove(() => {
|
|
157
|
+
delete _widgets[id];
|
|
158
|
+
Object.values(_widgets).forEach((widget) => {
|
|
159
|
+
widget.bounds = {
|
|
160
|
+
width: widget.bounds.width,
|
|
161
|
+
height: widget.bounds.height,
|
|
162
|
+
left: tempNewHorizontalBounds,
|
|
163
|
+
top: widget.bounds.top,
|
|
164
|
+
};
|
|
165
|
+
widget.view.setBounds(widget.bounds);
|
|
166
|
+
tempNewHorizontalBounds = tempNewHorizontalBounds + widget.bounds.width;
|
|
167
|
+
});
|
|
168
|
+
setWidgets(_widgets);
|
|
169
|
+
setHorizontalBounds(tempNewHorizontalBounds);
|
|
185
170
|
});
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
FSBL.Clients.Logger.system.error(`Error removing widget: ${id} from dashbar`);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
const reorganizeWidgets = () => {
|
|
178
|
+
const _widgets = widgets;
|
|
179
|
+
let tempBounds = 0;
|
|
180
|
+
dashbarItems.forEach((item) => {
|
|
181
|
+
const widget = _widgets[item.id];
|
|
182
|
+
widget.bounds = {
|
|
183
|
+
height: cachedWidgetHeight || widget.bounds.height,
|
|
184
|
+
width: widget.bounds.width,
|
|
185
|
+
top: cachedWidgetTop || verticalBounds,
|
|
186
|
+
left: tempBounds,
|
|
189
187
|
};
|
|
188
|
+
widget.view.setBounds(widget.bounds);
|
|
189
|
+
delete _widgets[item.id];
|
|
190
|
+
_widgets[item.id] = widget;
|
|
191
|
+
tempBounds = tempBounds + item.width;
|
|
192
|
+
});
|
|
193
|
+
setReorganized(false);
|
|
194
|
+
setWidgets(_widgets);
|
|
195
|
+
setHorizontalBounds(tempBounds);
|
|
196
|
+
};
|
|
197
|
+
const updateItems = () => {
|
|
198
|
+
const doUpdate = async () => {
|
|
190
199
|
if (dashbarItems.length > WIDGET_COUNT) {
|
|
191
200
|
await addWidgets();
|
|
192
201
|
setTotalWidgetsWidth(getTotalWidth());
|
|
@@ -200,17 +209,26 @@ export const Dashbar = ({ className, children, widgetTitleGenerator }) => {
|
|
|
200
209
|
return;
|
|
201
210
|
reorganizeWidgets();
|
|
202
211
|
}
|
|
203
|
-
setWidgetsPositions(true);
|
|
212
|
+
await setWidgetsPositions(true);
|
|
204
213
|
setIsUpdatingState(false);
|
|
205
214
|
};
|
|
206
215
|
if (isUpdatingState === false) {
|
|
207
216
|
setIsUpdatingState(true);
|
|
208
217
|
doUpdate();
|
|
209
218
|
}
|
|
219
|
+
else if (!secondUpdateRequired) {
|
|
220
|
+
setSecondUpdateRequired(true);
|
|
221
|
+
}
|
|
210
222
|
};
|
|
211
223
|
useEffect(() => {
|
|
212
224
|
updateItems();
|
|
213
|
-
}, [dashbarItems
|
|
225
|
+
}, [dashbarItems]);
|
|
226
|
+
useEffect(() => {
|
|
227
|
+
if (secondUpdateRequired && !isUpdatingState) {
|
|
228
|
+
updateItems();
|
|
229
|
+
setSecondUpdateRequired(false);
|
|
230
|
+
}
|
|
231
|
+
}, [isUpdatingState, secondUpdateRequired]);
|
|
214
232
|
const setTitleHeight = (titleHeight, id) => {
|
|
215
233
|
const _widgets = widgets;
|
|
216
234
|
const widget = _widgets[id];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dashbar.js","sourceRoot":"","sources":["../../../../src/components/toolbar/dashbar/Dashbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAEjG,OAAO,iCAAiC,CAAC;AAOzC,IAAI,eAAuB,CAAC;AAC5B,IAAI,kBAA0B,CAAC;AAE/B,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,oBAAoB,EAAe,EAAE,EAAE;IACrF,MAAM,EAAE,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,GAAG,UAAU,EAAE,CAAC;IAE9E,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC3C,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5D,MAAM,CAAC,cAAc,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACzD,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC9D,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC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WAAW,IACX,GAAG,EAAE,CAAC,EACN,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAC3B,KAAK,EAAE,CAAC,EACR,oBAAoB,EAAE,cAAc,EACpC,MAAM,EAAE,MAAqB,EAC7B,aAAa,EAAE,OAAO,CAAC,MAAM,EAC7B,kBAAkB,EAAE,kBAAkB,EACtC,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,GAC/B,CACF,CAAC,CACmB,CACtB;QACA,YAAY,KAAK,CAAC,IAAI,CACtB,6BAAK,SAAS,EAAC,yBAAyB,EAAC,OAAO,EAAE,aAAa;YAC9D;gBACC,2BAAG,SAAS,EAAC,SAAS,GAAK,CACrB,CACF,CACN;QACA,QAAQ,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useState } from \"react\";\r\nimport { DashbarItem } from \"./DashbarItem\";\r\nimport { Dashbar as DashbarType, DashbarItem as DashbarItemType, DashbarView } from \"../../../types/dashbarTypes\";\r\nimport { useToolbar } from \"../../../hooks/useToolbar\";\r\nimport { FinsembleDnDContext, AllowableDnDAxis } from \"../../legacyControls/FinsembleDnDContext\";\r\n\r\nimport \"../../../assets/css/dashbar.css\";\r\nimport { FinsembleWindow } from \"common/window/FinsembleWindow\";\r\n\r\ntype DashbarViews = {\r\n\t[key: string]: DashbarView;\r\n} & {};\r\n\r\nlet cachedWidgetTop: number;\r\nlet cachedWidgetHeight: number;\r\n\r\nexport const Dashbar = ({ className, children, widgetTitleGenerator }: DashbarType) => {\r\n\tconst { dashbarItems, reorderDashbarItems, launchPreferences } = useToolbar();\r\n\r\n\tconst [widgets, setWidgets] = useState({});\r\n\tconst [horizontalBounds, setHorizontalBounds] = useState(0);\r\n\tconst [wasReorganized, setReorganized] = useState(false);\r\n\tconst [totalWidgetsWidth, setTotalWidgetsWidth] = useState(0);\r\n\tconst [isUpdatingState, setIsUpdatingState] = useState(false);\r\n\r\n\tlet movingIndex: number | null = null; // The dasharItem index being dragged, null if none\r\n\tlet titleGrabPosition: number | null = null; // The mouse of event when a widget title is dragged\r\n\tlet offsetX: number | null = null; // The original grab location of a given view titlebar\r\n\r\n\tconst WIDGET_COUNT: number = Object.keys(widgets).length;\r\n\tconst SCROLL_BUTTON_WIDTH = 30;\r\n\r\n\tconst defaultWidgetTitleGenerator = (widget: DashbarView, titleRef: React.MutableRefObject<null>) => {\r\n\t\tconst handleWidgetTitleClick = () => {\r\n\t\t\tif (widget.raiseIntentOptions) {\r\n\t\t\t\tfdc3.raiseIntent(\r\n\t\t\t\t\twidget.raiseIntentOptions.intent,\r\n\t\t\t\t\twidget.raiseIntentOptions.context,\r\n\t\t\t\t\twidget.raiseIntentOptions.targetApp\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\treturn (\r\n\t\t\t<div ref={titleRef} onClick={() => handleWidgetTitleClick()}>\r\n\t\t\t\t<span dangerouslySetInnerHTML={{ __html: widget.title }}></span>\r\n\t\t\t</div>\r\n\t\t);\r\n\t};\r\n\r\n\tconst titleGenerator = widgetTitleGenerator ?? defaultWidgetTitleGenerator;\r\n\r\n\t/**\r\n\t *\r\n\t * @param {object} params\r\n\t * @param {number} oldIndex The index of the item being moved\r\n\t * @param {number} newIndex The index to move the item to\r\n\t */\r\n\tconst reorderItems = ({ oldIndex, newIndex }: { oldIndex: number; newIndex: number }) => {\r\n\t\tmovingIndex = null;\r\n\t\ttitleGrabPosition = null;\r\n\t\toffsetX = null;\r\n\t\tsetReorganized(true);\r\n\t\t// Update the redux store\r\n\t\treorderDashbarItems({ oldIndex, newIndex });\r\n\t};\r\n\r\n\tconst launchDashbar = () => {\r\n\t\tlaunchPreferences(\"Dashbar\");\r\n\t};\r\n\r\n\tconst { dashbar } = FSBL.Clients.WindowClient.getSpawnData();\r\n\r\n\t// Dashbar is disabled (no config in toolbar) or dashbar height is not specified\r\n\tif (!dashbar || !dashbar.height) {\r\n\t\treturn null;\r\n\t}\r\n\tconst toolbarHeight = finsembleWindow.windowOptions.height;\r\n\tconst dashbarHeight = `${dashbar.height}px`;\r\n\tconst verticalBounds = toolbarHeight - dashbar.height;\r\n\tconst widgetDividerWidth = dashbar.widgetDividerWidth || 0;\r\n\r\n\tconst wrapperClasses = `finsemble-dashbar ${className || \"\"}`.trim();\r\n\r\n\tconst getTotalWidth = () => {\r\n\t\tlet totalWidth = 0;\r\n\t\tdashbarItems.forEach((item: DashbarItemType) => {\r\n\t\t\ttotalWidth = totalWidth + item.width;\r\n\t\t});\r\n\t\treturn totalWidth;\r\n\t};\r\n\r\n\tconst [leftButtonTooltip, setLeftButtonTooltip] = useState(\"\");\r\n\tconst [rightButtonTooltip, setRightButtonTooltip] = useState(\"\");\r\n\r\n\tconst setWidgetsPositions = (isCalledFromDashbar: boolean | undefined) => {\r\n\t\t// This type conversion is safe and was put in place to remove the TS error\r\n\t\t// Currently getCurrentWindow return type is openFin window\r\n\t\t// which apparently does not have a getBounds property, however, the method exists and this\r\n\t\t// is working as expected.\r\n\t\tconst fsblWindow = FSBL.Clients.WindowClient.getCurrentWindow() as unknown as FinsembleWindow;\r\n\t\tfsblWindow.getBounds((bounds: any) => {\r\n\t\t\tconst toolbarWidth = bounds.width ? bounds.width : 0;\r\n\t\t\tconst elements = document.getElementsByClassName(\"dashbar-item-frame\");\r\n\r\n\t\t\tlet tempLeft = 0;\r\n\t\t\tif (toolbarWidth < totalWidgetsWidth) {\r\n\t\t\t\ttempLeft = SCROLL_BUTTON_WIDTH;\r\n\t\t\t}\r\n\r\n\t\t\tlet leftItemsCount = 0;\r\n\t\t\tlet rightItemsCount = 0;\r\n\r\n\t\t\tfor (const element of elements) {\r\n\t\t\t\tconst rect = element.getBoundingClientRect();\r\n\t\t\t\tconst widget = (widgets as DashbarViews)[element.id];\r\n\r\n\t\t\t\tif (rect.left < SCROLL_BUTTON_WIDTH && toolbarWidth < totalWidgetsWidth) {\r\n\t\t\t\t\twidget.bounds.width = 0;\r\n\t\t\t\t\twidget.bounds.left = tempLeft;\r\n\t\t\t\t\tleftItemsCount++;\r\n\t\t\t\t} else {\r\n\t\t\t\t\twidget.bounds.width = rect.width - widgetDividerWidth;\r\n\t\t\t\t\twidget.bounds.left = tempLeft;\r\n\t\t\t\t}\r\n\t\t\t\ttempLeft = tempLeft + widget.bounds.width + widgetDividerWidth;\r\n\r\n\t\t\t\tlet offsetRight = rect.left + rect.width - (toolbarWidth - SCROLL_BUTTON_WIDTH) + widgetDividerWidth;\r\n\t\t\t\tif (offsetRight > 0) {\r\n\t\t\t\t\t// hide title for invisible items\r\n\t\t\t\t\t// @ts-ignore\r\n\t\t\t\t\telement.childNodes[0].style.visibility = \"hidden\";\r\n\t\t\t\t\twidget.bounds.width = 0;\r\n\t\t\t\t\trightItemsCount++;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// @ts-ignore\r\n\t\t\t\t\telement.childNodes[0].style.visibility = \"visible\";\r\n\t\t\t\t}\r\n\t\t\t\twidget.view.setBounds(widget.bounds);\r\n\t\t\t}\r\n\r\n\t\t\tsetLeftButtonTooltip(`${leftItemsCount} more`);\r\n\t\t\tsetRightButtonTooltip(`${rightItemsCount} more`);\r\n\t\t});\r\n\r\n\t\t//double call for fix fake empty space between widgets while scrolling\r\n\t\tif (!isCalledFromDashbar) {\r\n\t\t\tsetWidgetsPositions(true);\r\n\t\t}\r\n\t};\r\n\r\n\tconst updateItems = async () => {\r\n\t\tconst doUpdate = async () => {\r\n\t\t\tconst _widgets: DashbarViews = widgets;\r\n\r\n\t\t\tconst addWidgets = async () => {\r\n\t\t\t\tlet tempHorizontalBounds = horizontalBounds;\r\n\r\n\t\t\t\tfor (const item of dashbarItems) {\r\n\t\t\t\t\tconst widgetBounds = {\r\n\t\t\t\t\t\ttop: verticalBounds,\r\n\t\t\t\t\t\tleft: tempHorizontalBounds,\r\n\t\t\t\t\t\twidth: item.width - widgetDividerWidth,\r\n\t\t\t\t\t\theight: item.height || dashbar.height,\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tif (!_widgets.hasOwnProperty(item.id)) {\r\n\t\t\t\t\t\tconst res: any = await finsembleWindow.addBrowserView({\r\n\t\t\t\t\t\t\turl: item.url,\r\n\t\t\t\t\t\t\tbounds: widgetBounds,\r\n\t\t\t\t\t\t\tallowAutoResize: false,\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t_widgets[item.id] = {\r\n\t\t\t\t\t\t\turl: item.url,\r\n\t\t\t\t\t\t\ttitle: item.title,\r\n\t\t\t\t\t\t\tbounds: widgetBounds,\r\n\t\t\t\t\t\t\tview: res,\r\n\t\t\t\t\t\t\twidth: item.width,\r\n\t\t\t\t\t\t\traiseIntentOptions: item.raiseIntentOptions,\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\ttempHorizontalBounds = tempHorizontalBounds + item.width;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tsetWidgets(_widgets);\r\n\t\t\t\tsetHorizontalBounds(tempHorizontalBounds);\r\n\t\t\t};\r\n\r\n\t\t\tconst removeWidgets = () => {\r\n\t\t\t\t// Widgets is an object, with each key being a reference to an item in dashbarItems\r\n\t\t\t\t// but dashbarItems is an array of objects. Its necessary to loop through them to determine\r\n\t\t\t\t// the differences to figure out which items were removed.\r\n\t\t\t\tconst toRemove: string[] = [];\r\n\t\t\t\tObject.keys(_widgets).map((widgetId) => {\r\n\t\t\t\t\tlet found = false;\r\n\t\t\t\t\tfor (let i = 0; i < dashbarItems.length; i++) {\r\n\t\t\t\t\t\tconst dashItem = dashbarItems[i];\r\n\t\t\t\t\t\tif (dashItem.id === widgetId) {\r\n\t\t\t\t\t\t\tfound = true;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!found) {\r\n\t\t\t\t\t\ttoRemove.push(widgetId);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\t// toRemove is an array of widgetIds which were no longer found in dashbarItems\r\n\t\t\t\t// As items are removed, the remaining items have to be shuffled to fill the space\r\n\t\t\t\tfor (const id of toRemove) {\r\n\t\t\t\t\tif (_widgets.hasOwnProperty(id)) {\r\n\t\t\t\t\t\tlet tempNewHorizontalBounds = 0;\r\n\t\t\t\t\t\t_widgets[id].view.remove(() => {\r\n\t\t\t\t\t\t\tdelete _widgets[id];\r\n\t\t\t\t\t\t\t// Shuffle remaining views to fill any gaps that were left\r\n\t\t\t\t\t\t\tObject.values(_widgets).map((widget) => {\r\n\t\t\t\t\t\t\t\twidget.bounds = {\r\n\t\t\t\t\t\t\t\t\twidth: widget.bounds.width,\r\n\t\t\t\t\t\t\t\t\theight: widget.bounds.height,\r\n\t\t\t\t\t\t\t\t\tleft: tempNewHorizontalBounds,\r\n\t\t\t\t\t\t\t\t\ttop: widget.bounds.top,\r\n\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\twidget.view.setBounds(widget.bounds);\r\n\t\t\t\t\t\t\t\ttempNewHorizontalBounds = tempNewHorizontalBounds + widget.bounds.width;\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tsetWidgets(_widgets);\r\n\t\t\t\t\t\t\tsetHorizontalBounds(tempNewHorizontalBounds);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tFSBL.Clients.Logger.error(`Error removing widget: ${id} from dashbar`);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tconst reorganizeWidgets = () => {\r\n\t\t\t\t// Each view needs to be resituated to fill any holes\r\n\t\t\t\t// left by views that have been removed. Use a tempBounds\r\n\t\t\t\t// int to keep track of new widths and set the overall width\r\n\t\t\t\t// once everything is re-seated\r\n\t\t\t\tlet tempBounds = 0;\r\n\t\t\t\tdashbarItems.map((item) => {\r\n\t\t\t\t\tconst widget = _widgets[item.id];\r\n\r\n\t\t\t\t\twidget.bounds = {\r\n\t\t\t\t\t\theight: cachedWidgetHeight || widget.bounds.height,\r\n\t\t\t\t\t\twidth: widget.bounds.width,\r\n\t\t\t\t\t\ttop: cachedWidgetTop || verticalBounds,\r\n\t\t\t\t\t\tleft: tempBounds,\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\twidget.view.setBounds(widget.bounds);\r\n\r\n\t\t\t\t\tdelete _widgets[item.id];\r\n\t\t\t\t\t_widgets[item.id] = widget;\r\n\r\n\t\t\t\t\ttempBounds = tempBounds + item.width;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tsetReorganized(false);\r\n\t\t\t\tsetWidgets(_widgets);\r\n\t\t\t\tsetHorizontalBounds(tempBounds);\r\n\t\t\t};\r\n\r\n\t\t\tif (dashbarItems.length > WIDGET_COUNT) {\r\n\t\t\t\t//Items have been added\r\n\t\t\t\tawait addWidgets();\r\n\t\t\t\tsetTotalWidgetsWidth(getTotalWidth());\r\n\t\t\t} else if (dashbarItems.length < WIDGET_COUNT) {\r\n\t\t\t\t//Items have been removed\r\n\t\t\t\tremoveWidgets();\r\n\t\t\t\tsetTotalWidgetsWidth(getTotalWidth());\r\n\t\t\t} else if (wasReorganized) {\r\n\t\t\t\tif (movingIndex) return;\r\n\t\t\t\t// Length is the same, order has changed\r\n\t\t\t\treorganizeWidgets();\r\n\t\t\t}\r\n\r\n\t\t\tsetWidgetsPositions(true);\r\n\t\t\tsetIsUpdatingState(false);\r\n\t\t};\r\n\r\n\t\tif (isUpdatingState === false) {\r\n\t\t\tsetIsUpdatingState(true);\r\n\t\t\tdoUpdate();\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * When the distributed store's 'dashbaritems' is updated it will cause this hook to\r\n\t * execute. The local representation of widgets will be mutated, then a call to\r\n\t * setWidgets will re-render the component\r\n\t *\r\n\t * DashbarItems can be changed very quickly before all widgets will be initialized.\r\n\t * Double-calling updateItems() for \"isUpdatingState\" fixes a bug.\r\n\t */\r\n\tuseEffect(() => {\r\n\t\tupdateItems();\r\n\t}, [dashbarItems, isUpdatingState]);\r\n\r\n\t/**\r\n\t * Sets the title height as determined by the DashbarItem\r\n\t * component, since the CSS can be changed by the user\r\n\t * the component will render the title and pass back\r\n\t * computed height of that title, then the Dashbar will\r\n\t * make room for item\r\n\t *\r\n\t * @param {number} titleHeight The height of the span containing the title\r\n\t * @param {string} id The key'ed id of the view\r\n\t */\r\n\tconst setTitleHeight = (titleHeight: number, id: string) => {\r\n\t\tconst _widgets: DashbarViews = widgets;\r\n\t\tconst widget = _widgets[id];\r\n\t\tif (cachedWidgetTop) {\r\n\t\t\ttitleHeight = 0;\r\n\t\t}\r\n\r\n\t\tconst newBounds = {\r\n\t\t\ttop: cachedWidgetTop || widget.bounds.top + titleHeight,\r\n\t\t\tleft: widget.bounds.left,\r\n\t\t\theight: cachedWidgetHeight || widget.bounds.height - titleHeight,\r\n\t\t\twidth: widget.bounds.width,\r\n\t\t};\r\n\t\tcachedWidgetTop = newBounds.top;\r\n\t\tcachedWidgetHeight = newBounds.height;\r\n\r\n\t\twidget.view.setBounds(newBounds);\r\n\t\twidget.bounds = newBounds;\r\n\t\tsetWidgets(_widgets);\r\n\t};\r\n\r\n\t/**\r\n\t * When a view starts moving, bring it to the front\r\n\t *\r\n\t * @param {MouseEvent} event The event passed by react-sortable-hoc\r\n\t */\r\n\tconst startMove = (node: any, event: any) => {\r\n\t\tmovingIndex = node.index;\r\n\t\tif (offsetX === null && titleGrabPosition !== null) {\r\n\t\t\toffsetX = event.clientX - titleGrabPosition;\r\n\t\t}\r\n\t\tconst widget = Object.values(widgets)[node.index] as DashbarView;\r\n\t\twidget.view.bringToFront();\r\n\t};\r\n\r\n\t/**\r\n\t * Event triggered by view movement\r\n\t *\r\n\t * @param {MouseEvent} event\r\n\t */\r\n\tconst moveItem = (event: any) => {\r\n\t\t// if (movingIndex !== null && titleGrabPosition !== null) {\r\n\t\t// \t//@ts-ignore: Checked above if movingIndex is null, will always have a value below\r\n\t\tif (movingIndex !== null) {\r\n\t\t\tconst movingWidget = Object.values(widgets)[movingIndex] as DashbarView;\r\n\r\n\t\t\tmovingWidget.view.setBounds({\r\n\t\t\t\ttop: movingWidget.bounds.top,\r\n\t\t\t\theight: movingWidget.bounds.height,\r\n\t\t\t\twidth: movingWidget.bounds.width,\r\n\t\t\t\tleft: event.clientX - (offsetX || 0),\r\n\t\t\t});\r\n\r\n\t\t\t// Some completely not react very hacky stuff to make browserviews move in conjunction with the titles\r\n\t\t\tconst elements = document.getElementsByClassName(\"dashbar-item-frame\");\r\n\t\t\tfor (const element of elements) {\r\n\t\t\t\tconst rect = element.getBoundingClientRect();\r\n\t\t\t\tconst widget = (widgets as any)[element.id];\r\n\t\t\t\tif (widget !== movingWidget && widget.bounds.left !== rect.left) {\r\n\t\t\t\t\twidget.bounds.left = rect.left;\r\n\t\t\t\t\twidget.view.setBounds(widget.bounds);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tconst setGrabLocation = (location: number) => {\r\n\t\ttitleGrabPosition = location;\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div className={wrapperClasses} style={{ height: dashbarHeight }}>\r\n\t\t\t{WIDGET_COUNT > 0 && (\r\n\t\t\t\t<FinsembleDnDContext\r\n\t\t\t\t\tonDragEnd={reorderItems}\r\n\t\t\t\t\tonDragStart={startMove}\r\n\t\t\t\t\tonDragMove={moveItem}\r\n\t\t\t\t\tonLayoutUpdate={setWidgetsPositions}\r\n\t\t\t\t\tclassName=\"finsemble-dashbar-section rearrange-region\"\r\n\t\t\t\t\tid=\"dashbar-container\"\r\n\t\t\t\t\taxis={AllowableDnDAxis.x}\r\n\t\t\t\t\tlockAxis={AllowableDnDAxis.x}\r\n\t\t\t\t\tallowHorizontalScroll={true}\r\n\t\t\t\t\tshowScrollButtonsTooltip={true}\r\n\t\t\t\t\tleftButtonTooltip={leftButtonTooltip}\r\n\t\t\t\t\trightButtonTooltip={rightButtonTooltip}\r\n\t\t\t\t>\r\n\t\t\t\t\t{Object.values(widgets).map((widget, i) => (\r\n\t\t\t\t\t\t<DashbarItem\r\n\t\t\t\t\t\t\tkey={i}\r\n\t\t\t\t\t\t\tid={Object.keys(widgets)[i]}\r\n\t\t\t\t\t\t\tindex={i}\r\n\t\t\t\t\t\t\twidgetTitleGenerator={titleGenerator}\r\n\t\t\t\t\t\t\twidget={widget as DashbarView}\r\n\t\t\t\t\t\t\tdashbarHeight={dashbar.height}\r\n\t\t\t\t\t\t\twidgetDividerWidth={widgetDividerWidth}\r\n\t\t\t\t\t\t\tsetTitleHeight={setTitleHeight}\r\n\t\t\t\t\t\t\tsetGrabLocation={setGrabLocation}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t))}\r\n\t\t\t\t</FinsembleDnDContext>\r\n\t\t\t)}\r\n\t\t\t{WIDGET_COUNT === 0 && (\r\n\t\t\t\t<div className=\"add-dashbar-item-button\" onClick={launchDashbar}>\r\n\t\t\t\t\t<span>\r\n\t\t\t\t\t\t<i className=\"ff-plus\"></i>\r\n\t\t\t\t\t</span>\r\n\t\t\t\t</div>\r\n\t\t\t)}\r\n\t\t\t{children}\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
|
|
1
|
+
{"version":3,"file":"Dashbar.js","sourceRoot":"","sources":["../../../../src/components/toolbar/dashbar/Dashbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAEjG,OAAO,iCAAiC,CAAC;AAMzC,IAAI,eAAuB,CAAC;AAC5B,IAAI,kBAA0B,CAAC;AAE/B,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,oBAAoB,EAAe,EAAE,EA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E,cAAc,EACpC,MAAM,EAAE,MAAqB,EAC7B,aAAa,EAAE,OAAO,CAAC,MAAM,EAC7B,kBAAkB,EAAE,kBAAkB,EACtC,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,GAC/B,CACF,CAAC,CACmB,CACtB;QACA,YAAY,KAAK,CAAC,IAAI,CACtB,6BAAK,SAAS,EAAC,yBAAyB,EAAC,OAAO,EAAE,aAAa;YAC9D;gBACC,2BAAG,SAAS,EAAC,SAAS,GAAK,CACrB,CACF,CACN;QACA,QAAQ,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useState } from \"react\";\r\nimport { DashbarItem } from \"./DashbarItem\";\r\nimport { Dashbar as DashbarType, DashbarItem as DashbarItemType, DashbarView } from \"../../../types/dashbarTypes\";\r\nimport { useToolbar } from \"../../../hooks/useToolbar\";\r\nimport { FinsembleDnDContext, AllowableDnDAxis } from \"../../legacyControls/FinsembleDnDContext\";\r\n\r\nimport \"../../../assets/css/dashbar.css\";\r\n\r\ntype DashbarViews = {\r\n\t[key: string]: DashbarView;\r\n} & {};\r\n\r\nlet cachedWidgetTop: number;\r\nlet cachedWidgetHeight: number;\r\n\r\nexport const Dashbar = ({ className, children, widgetTitleGenerator }: DashbarType) => {\r\n\tconst { dashbarItems, reorderDashbarItems, launchPreferences } = useToolbar();\r\n\r\n\tconst [widgets, setWidgets] = useState({});\r\n\tconst [horizontalBounds, setHorizontalBounds] = useState(0);\r\n\tconst [wasReorganized, setReorganized] = useState(false);\r\n\tconst [totalWidgetsWidth, setTotalWidgetsWidth] = useState(0);\r\n\tconst [isUpdatingState, setIsUpdatingState] = useState(false);\r\n\tconst [secondUpdateRequired, setSecondUpdateRequired] = useState(false);\r\n\r\n\tlet movingIndex: number | null = null; // The dasharItem index being dragged, null if none\r\n\tlet titleGrabPosition: number | null = null; // The mouse of event when a widget title is dragged\r\n\tlet offsetX: number | null = null; // The original grab location of a given view titlebar\r\n\r\n\tconst WIDGET_COUNT: number = Object.keys(widgets).length;\r\n\tconst SCROLL_BUTTON_WIDTH = 30;\r\n\r\n\tconst defaultWidgetTitleGenerator = (widget: DashbarView, titleRef: React.MutableRefObject<null>) => {\r\n\t\tconst handleWidgetTitleClick = () => {\r\n\t\t\tif (widget.raiseIntentOptions) {\r\n\t\t\t\tfdc3.raiseIntent(\r\n\t\t\t\t\twidget.raiseIntentOptions.intent,\r\n\t\t\t\t\twidget.raiseIntentOptions.context,\r\n\t\t\t\t\twidget.raiseIntentOptions.targetApp\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\treturn (\r\n\t\t\t<div ref={titleRef} onClick={() => handleWidgetTitleClick()}>\r\n\t\t\t\t<span dangerouslySetInnerHTML={{ __html: widget.title }}></span>\r\n\t\t\t</div>\r\n\t\t);\r\n\t};\r\n\r\n\tconst titleGenerator = widgetTitleGenerator ?? defaultWidgetTitleGenerator;\r\n\r\n\t/**\r\n\t *\r\n\t * @param {object} params\r\n\t * @param {number} oldIndex The index of the item being moved\r\n\t * @param {number} newIndex The index to move the item to\r\n\t */\r\n\tconst reorderItems = ({ oldIndex, newIndex }: { oldIndex: number; newIndex: number }) => {\r\n\t\tmovingIndex = null;\r\n\t\ttitleGrabPosition = null;\r\n\t\toffsetX = null;\r\n\t\tsetReorganized(true);\r\n\t\t// Update the redux store\r\n\t\treorderDashbarItems({ oldIndex, newIndex });\r\n\t};\r\n\r\n\tconst launchDashbar = () => {\r\n\t\tlaunchPreferences(\"Dashbar\");\r\n\t};\r\n\r\n\tconst { dashbar } = FSBL.Clients.WindowClient.getSpawnData();\r\n\r\n\t// Dashbar is disabled (no config in toolbar) or dashbar height is not specified\r\n\tif (!dashbar || !dashbar.height) {\r\n\t\treturn null;\r\n\t}\r\n\tconst toolbarHeight = finsembleWindow.windowOptions.height;\r\n\tconst dashbarHeight = `${dashbar.height}px`;\r\n\tconst verticalBounds = toolbarHeight - dashbar.height;\r\n\tconst widgetDividerWidth = dashbar.widgetDividerWidth || 0;\r\n\r\n\tconst wrapperClasses = `finsemble-dashbar ${className || \"\"}`.trim();\r\n\r\n\tconst getTotalWidth = () => {\r\n\t\tlet totalWidth = 0;\r\n\t\tdashbarItems.forEach((item: DashbarItemType) => {\r\n\t\t\ttotalWidth = totalWidth + item.width;\r\n\t\t});\r\n\t\treturn totalWidth;\r\n\t};\r\n\r\n\tconst [leftButtonTooltip, setLeftButtonTooltip] = useState(\"\");\r\n\tconst [rightButtonTooltip, setRightButtonTooltip] = useState(\"\");\r\n\r\n\tconst setWidgetsPositions = async (isCalledFromDashbar?: boolean) => {\r\n\t\tconst { data: bounds } = await finsembleWindow.getBounds();\r\n\t\tconst scrollButtonsEnabled = document.querySelectorAll(\"#dashbar-container > .chevron-container\").length > 0;\r\n\t\tconst elements = document.getElementsByClassName(\"dashbar-item-frame\");\r\n\t\tlet toolbarWidth = bounds?.width ?? 0;\r\n\t\tif (scrollButtonsEnabled) toolbarWidth = toolbarWidth - 2 * SCROLL_BUTTON_WIDTH;\r\n\r\n\t\tlet tempLeft = 0;\r\n\t\tlet leftButtonSize = 0;\r\n\t\tif (scrollButtonsEnabled) {\r\n\t\t\ttempLeft = SCROLL_BUTTON_WIDTH;\r\n\t\t\tleftButtonSize = SCROLL_BUTTON_WIDTH;\r\n\t\t}\r\n\r\n\t\tlet leftItemsCount = 0;\r\n\t\tlet rightItemsCount = 0;\r\n\r\n\t\tfor (const element of elements) {\r\n\t\t\tconst rect = element.getBoundingClientRect();\r\n\t\t\tconst widget = (widgets as DashbarViews)[element.id];\r\n\t\t\t// Happens when widgets were removed, but dom-elements still exists. So just ignore.\r\n\t\t\tif (!widget) continue;\r\n\r\n\t\t\tif (rect.left < SCROLL_BUTTON_WIDTH && scrollButtonsEnabled) {\r\n\t\t\t\twidget.bounds.width = 0;\r\n\t\t\t\twidget.bounds.left = tempLeft;\r\n\t\t\t\tleftItemsCount++;\r\n\t\t\t} else {\r\n\t\t\t\twidget.bounds.width = rect.width - widgetDividerWidth;\r\n\t\t\t\twidget.bounds.left = tempLeft;\r\n\t\t\t}\r\n\t\t\ttempLeft = tempLeft + widget.bounds.width + widgetDividerWidth;\r\n\r\n\t\t\tlet offsetRight = rect.left + rect.width + widgetDividerWidth - leftButtonSize - toolbarWidth;\r\n\t\t\tif (offsetRight > 0) {\r\n\t\t\t\t// hide title for invisible items\r\n\t\t\t\t(element.childNodes[0] as HTMLElement).style.visibility = \"hidden\";\r\n\t\t\t\twidget.bounds.width = 0;\r\n\t\t\t\trightItemsCount++;\r\n\t\t\t} else {\r\n\t\t\t\t(element.childNodes[0] as HTMLElement).style.visibility = \"visible\";\r\n\t\t\t}\r\n\t\t\twidget.view.setBounds(widget.bounds);\r\n\t\t}\r\n\r\n\t\tsetLeftButtonTooltip(`${leftItemsCount} more`);\r\n\t\tsetRightButtonTooltip(`${rightItemsCount} more`);\r\n\r\n\t\t//double call for fix fake empty space between widgets while scrolling\r\n\t\tif (!isCalledFromDashbar) {\r\n\t\t\tawait setWidgetsPositions(true);\r\n\t\t}\r\n\t};\r\n\r\n\tconst addWidgets = async () => {\r\n\t\tconst _widgets: DashbarViews = widgets;\r\n\t\tlet tempHorizontalBounds = horizontalBounds;\r\n\r\n\t\tfor (const item of dashbarItems) {\r\n\t\t\tconst widgetBounds = {\r\n\t\t\t\ttop: verticalBounds,\r\n\t\t\t\tleft: tempHorizontalBounds,\r\n\t\t\t\twidth: item.width - widgetDividerWidth,\r\n\t\t\t\theight: item.height || dashbar.height,\r\n\t\t\t};\r\n\r\n\t\t\tif (!_widgets.hasOwnProperty(item.id)) {\r\n\t\t\t\tconst res: any = await finsembleWindow.addBrowserView({\r\n\t\t\t\t\turl: item.url,\r\n\t\t\t\t\tbounds: widgetBounds,\r\n\t\t\t\t\tallowAutoResize: false,\r\n\t\t\t\t});\r\n\r\n\t\t\t\t_widgets[item.id] = {\r\n\t\t\t\t\turl: item.url,\r\n\t\t\t\t\ttitle: item.title,\r\n\t\t\t\t\tbounds: widgetBounds,\r\n\t\t\t\t\tview: res,\r\n\t\t\t\t\twidth: item.width,\r\n\t\t\t\t\traiseIntentOptions: item.raiseIntentOptions,\r\n\t\t\t\t};\r\n\r\n\t\t\t\ttempHorizontalBounds = tempHorizontalBounds + item.width;\r\n\t\t\t}\r\n\t\t}\r\n\t\tsetWidgets(_widgets);\r\n\t\tsetHorizontalBounds(tempHorizontalBounds);\r\n\t};\r\n\r\n\tconst removeWidgets = () => {\r\n\t\tconst _widgets: DashbarViews = widgets;\r\n\t\t// Widgets is an object, with each key being a reference to an item in dashbarItems\r\n\t\t// but dashbarItems is an array of objects. Its necessary to loop through them to determine\r\n\t\t// the differences to figure out which items were removed.\r\n\t\tconst toRemove: string[] = [];\r\n\t\tObject.keys(_widgets).forEach((widgetId) => {\r\n\t\t\tlet found = false;\r\n\t\t\tfor (let i = 0; i < dashbarItems.length; i++) {\r\n\t\t\t\tconst dashItem = dashbarItems[i];\r\n\t\t\t\tif (dashItem.id === widgetId) {\r\n\t\t\t\t\tfound = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!found) {\r\n\t\t\t\ttoRemove.push(widgetId);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t// toRemove is an array of widgetIds which were no longer found in dashbarItems\r\n\t\t// As items are removed, the remaining items have to be shuffled to fill the space\r\n\t\tfor (const id of toRemove) {\r\n\t\t\tif (_widgets.hasOwnProperty(id)) {\r\n\t\t\t\tlet tempNewHorizontalBounds = 0;\r\n\t\t\t\t_widgets[id].view.remove(() => {\r\n\t\t\t\t\tdelete _widgets[id];\r\n\t\t\t\t\t// Shuffle remaining views to fill any gaps that were left\r\n\t\t\t\t\tObject.values(_widgets).forEach((widget) => {\r\n\t\t\t\t\t\twidget.bounds = {\r\n\t\t\t\t\t\t\twidth: widget.bounds.width,\r\n\t\t\t\t\t\t\theight: widget.bounds.height,\r\n\t\t\t\t\t\t\tleft: tempNewHorizontalBounds,\r\n\t\t\t\t\t\t\ttop: widget.bounds.top,\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t\twidget.view.setBounds(widget.bounds);\r\n\t\t\t\t\t\ttempNewHorizontalBounds = tempNewHorizontalBounds + widget.bounds.width;\r\n\t\t\t\t\t});\r\n\t\t\t\t\tsetWidgets(_widgets);\r\n\t\t\t\t\tsetHorizontalBounds(tempNewHorizontalBounds);\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tFSBL.Clients.Logger.system.error(`Error removing widget: ${id} from dashbar`);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tconst reorganizeWidgets = () => {\r\n\t\tconst _widgets: DashbarViews = widgets;\r\n\t\t// Each view needs to be resituated to fill any holes\r\n\t\t// left by views that have been removed. Use a tempBounds\r\n\t\t// int to keep track of new widths and set the overall width\r\n\t\t// once everything is re-seated\r\n\t\tlet tempBounds = 0;\r\n\t\tdashbarItems.forEach((item) => {\r\n\t\t\tconst widget = _widgets[item.id];\r\n\r\n\t\t\twidget.bounds = {\r\n\t\t\t\theight: cachedWidgetHeight || widget.bounds.height,\r\n\t\t\t\twidth: widget.bounds.width,\r\n\t\t\t\ttop: cachedWidgetTop || verticalBounds,\r\n\t\t\t\tleft: tempBounds,\r\n\t\t\t};\r\n\r\n\t\t\twidget.view.setBounds(widget.bounds);\r\n\r\n\t\t\tdelete _widgets[item.id];\r\n\t\t\t_widgets[item.id] = widget;\r\n\r\n\t\t\ttempBounds = tempBounds + item.width;\r\n\t\t});\r\n\r\n\t\tsetReorganized(false);\r\n\t\tsetWidgets(_widgets);\r\n\t\tsetHorizontalBounds(tempBounds);\r\n\t};\r\n\r\n\tconst updateItems = () => {\r\n\t\tconst doUpdate = async () => {\r\n\t\t\tif (dashbarItems.length > WIDGET_COUNT) {\r\n\t\t\t\t//Items have been added\r\n\t\t\t\tawait addWidgets();\r\n\t\t\t\tsetTotalWidgetsWidth(getTotalWidth());\r\n\t\t\t} else if (dashbarItems.length < WIDGET_COUNT) {\r\n\t\t\t\t//Items have been removed\r\n\t\t\t\tremoveWidgets();\r\n\t\t\t\tsetTotalWidgetsWidth(getTotalWidth());\r\n\t\t\t} else if (wasReorganized) {\r\n\t\t\t\tif (movingIndex) return;\r\n\t\t\t\t// Length is the same, order has changed\r\n\t\t\t\treorganizeWidgets();\r\n\t\t\t}\r\n\r\n\t\t\tawait setWidgetsPositions(true);\r\n\t\t\tsetIsUpdatingState(false);\r\n\t\t};\r\n\r\n\t\tif (isUpdatingState === false) {\r\n\t\t\tsetIsUpdatingState(true);\r\n\t\t\tdoUpdate();\r\n\t\t} else if (!secondUpdateRequired) {\r\n\t\t\tsetSecondUpdateRequired(true);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * When the distributed store's 'dashbaritems' is updated it will cause this hook to\r\n\t * execute. The local representation of widgets will be mutated, then a call to\r\n\t * setWidgets will re-render the component\r\n\t */\r\n\tuseEffect(() => {\r\n\t\tupdateItems();\r\n\t}, [dashbarItems]);\r\n\r\n\t/**\r\n\t * DashbarItems can be changed very quickly before all widgets will be initialized.\r\n\t * Double-calling updateItems() fixes a bug.\r\n\t */\r\n\tuseEffect(() => {\r\n\t\tif (secondUpdateRequired && !isUpdatingState) {\r\n\t\t\tupdateItems();\r\n\t\t\tsetSecondUpdateRequired(false);\r\n\t\t}\r\n\t}, [isUpdatingState, secondUpdateRequired]);\r\n\r\n\t/**\r\n\t * Sets the title height as determined by the DashbarItem\r\n\t * component, since the CSS can be changed by the user\r\n\t * the component will render the title and pass back\r\n\t * computed height of that title, then the Dashbar will\r\n\t * make room for item\r\n\t *\r\n\t * @param {number} titleHeight The height of the span containing the title\r\n\t * @param {string} id The key'ed id of the view\r\n\t */\r\n\tconst setTitleHeight = (titleHeight: number, id: string) => {\r\n\t\tconst _widgets: DashbarViews = widgets;\r\n\t\tconst widget = _widgets[id];\r\n\t\tif (cachedWidgetTop) {\r\n\t\t\ttitleHeight = 0;\r\n\t\t}\r\n\r\n\t\tconst newBounds = {\r\n\t\t\ttop: cachedWidgetTop || widget.bounds.top + titleHeight,\r\n\t\t\tleft: widget.bounds.left,\r\n\t\t\theight: cachedWidgetHeight || widget.bounds.height - titleHeight,\r\n\t\t\twidth: widget.bounds.width,\r\n\t\t};\r\n\t\tcachedWidgetTop = newBounds.top;\r\n\t\tcachedWidgetHeight = newBounds.height;\r\n\r\n\t\twidget.view.setBounds(newBounds);\r\n\t\twidget.bounds = newBounds;\r\n\t\tsetWidgets(_widgets);\r\n\t};\r\n\r\n\t/**\r\n\t * When a view starts moving, bring it to the front\r\n\t *\r\n\t * @param {MouseEvent} event The event passed by react-sortable-hoc\r\n\t */\r\n\tconst startMove = (node: any, event: any) => {\r\n\t\tmovingIndex = node.index;\r\n\t\tif (offsetX === null && titleGrabPosition !== null) {\r\n\t\t\toffsetX = event.clientX - titleGrabPosition;\r\n\t\t}\r\n\t\tconst widget = Object.values(widgets)[node.index] as DashbarView;\r\n\t\twidget.view.bringToFront();\r\n\t};\r\n\r\n\t/**\r\n\t * Event triggered by view movement\r\n\t *\r\n\t * @param {MouseEvent} event\r\n\t */\r\n\tconst moveItem = (event: any) => {\r\n\t\tif (movingIndex !== null) {\r\n\t\t\tconst movingWidget = Object.values(widgets)[movingIndex] as DashbarView;\r\n\r\n\t\t\tmovingWidget.view.setBounds({\r\n\t\t\t\ttop: movingWidget.bounds.top,\r\n\t\t\t\theight: movingWidget.bounds.height,\r\n\t\t\t\twidth: movingWidget.bounds.width,\r\n\t\t\t\tleft: event.clientX - (offsetX || 0),\r\n\t\t\t});\r\n\r\n\t\t\t// Some completely not react very hacky stuff to make browserviews move in conjunction with the titles\r\n\t\t\tconst elements = document.getElementsByClassName(\"dashbar-item-frame\");\r\n\t\t\tfor (const element of elements) {\r\n\t\t\t\tconst rect = element.getBoundingClientRect();\r\n\t\t\t\tconst widget = (widgets as any)[element.id];\r\n\t\t\t\tif (widget !== movingWidget && widget.bounds.left !== rect.left) {\r\n\t\t\t\t\twidget.bounds.left = rect.left;\r\n\t\t\t\t\twidget.view.setBounds(widget.bounds);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tconst setGrabLocation = (location: number) => {\r\n\t\ttitleGrabPosition = location;\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div className={wrapperClasses} style={{ height: dashbarHeight }}>\r\n\t\t\t{WIDGET_COUNT > 0 && (\r\n\t\t\t\t<FinsembleDnDContext\r\n\t\t\t\t\tonDragEnd={reorderItems}\r\n\t\t\t\t\tonDragStart={startMove}\r\n\t\t\t\t\tonDragMove={moveItem}\r\n\t\t\t\t\tonLayoutUpdate={setWidgetsPositions}\r\n\t\t\t\t\tclassName=\"finsemble-dashbar-section rearrange-region\"\r\n\t\t\t\t\tid=\"dashbar-container\"\r\n\t\t\t\t\taxis={AllowableDnDAxis.x}\r\n\t\t\t\t\tlockAxis={AllowableDnDAxis.x}\r\n\t\t\t\t\tallowHorizontalScroll={true}\r\n\t\t\t\t\tshowScrollButtonsTooltip={true}\r\n\t\t\t\t\tleftButtonTooltip={leftButtonTooltip}\r\n\t\t\t\t\trightButtonTooltip={rightButtonTooltip}\r\n\t\t\t\t>\r\n\t\t\t\t\t{Object.values(widgets).map((widget, i) => (\r\n\t\t\t\t\t\t<DashbarItem\r\n\t\t\t\t\t\t\tkey={i}\r\n\t\t\t\t\t\t\tid={Object.keys(widgets)[i]}\r\n\t\t\t\t\t\t\tindex={i}\r\n\t\t\t\t\t\t\twidgetTitleGenerator={titleGenerator}\r\n\t\t\t\t\t\t\twidget={widget as DashbarView}\r\n\t\t\t\t\t\t\tdashbarHeight={dashbar.height}\r\n\t\t\t\t\t\t\twidgetDividerWidth={widgetDividerWidth}\r\n\t\t\t\t\t\t\tsetTitleHeight={setTitleHeight}\r\n\t\t\t\t\t\t\tsetGrabLocation={setGrabLocation}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t))}\r\n\t\t\t\t</FinsembleDnDContext>\r\n\t\t\t)}\r\n\t\t\t{WIDGET_COUNT === 0 && (\r\n\t\t\t\t<div className=\"add-dashbar-item-button\" onClick={launchDashbar}>\r\n\t\t\t\t\t<span>\r\n\t\t\t\t\t\t<i className=\"ff-plus\"></i>\r\n\t\t\t\t\t</span>\r\n\t\t\t\t</div>\r\n\t\t\t)}\r\n\t\t\t{children}\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
|
|
@@ -2,19 +2,18 @@ import * as React from "react";
|
|
|
2
2
|
import { useRef, useLayoutEffect } from "react";
|
|
3
3
|
import { FinsembleDraggable } from "../../legacyControls/FinsembleDraggable";
|
|
4
4
|
import "../../../assets/css/dashbar.css";
|
|
5
|
-
export const DashbarItem = ({ id
|
|
5
|
+
export const DashbarItem = ({ id = `finsemble-draggable-${Date.now()}-${Math.random()}`, index, className, widget, height, dashbarHeight, widgetDividerWidth, setTitleHeight, setGrabLocation, widgetTitleGenerator, }) => {
|
|
6
6
|
const titleRef = useRef(null);
|
|
7
7
|
const divRef = useRef(null);
|
|
8
|
-
id = id ? id : `finsemble-draggable-${Date.now()}-${Math.random()}`;
|
|
9
8
|
useLayoutEffect(() => {
|
|
10
|
-
if (titleRef
|
|
9
|
+
if ((titleRef === null || titleRef === void 0 ? void 0 : titleRef.current) && dashbarHeight) {
|
|
11
10
|
const { offsetHeight } = titleRef.current;
|
|
12
11
|
const titleHeight = height ? height + offsetHeight : offsetHeight;
|
|
13
12
|
setTitleHeight(titleHeight, id);
|
|
14
13
|
}
|
|
15
14
|
});
|
|
16
|
-
const _setGrabLocation = (
|
|
17
|
-
if (divRef
|
|
15
|
+
const _setGrabLocation = () => {
|
|
16
|
+
if (divRef === null || divRef === void 0 ? void 0 : divRef.current) {
|
|
18
17
|
const rect = divRef.current.getBoundingClientRect();
|
|
19
18
|
setGrabLocation(rect.left);
|
|
20
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashbarItem.js","sourceRoot":"","sources":["../../../../src/components/toolbar/dashbar/DashbarItem.tsx"],"names":[],"mappings":"A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AqB,EAAE,CAAC;YACrE,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAC3B;IACF,CAAC,CAAC;IAEF,MAAM,YAAY,GAAG,0BAA0B,SAAS,IAAI,EAAE,EAAE,CAAC;IACjE,MAAM,SAAS,GAAG;QACjB,OAAO,EAAE,MAAM;QACf,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,WAAW,EAAE,GAAG,kBAAkB,uCAAuC;KACzE,CAAC;IAEF,MAAM,KAAK,GAAG,oBAAoB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAErD,OAAO,CACN,oBAAC,kBAAkB,IAAC,WAAW,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,YAAY,EAAE,YAAY;QACrF,6BAAK,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,gBAAgB,EAAE,SAAS,EAAC,oBAAoB,EAAC,KAAK,EAAE,SAAS;YACvG,iCAAM,KAAK,CAAO;YAClB,6BAAK,SAAS,EAAC,aAAa,GAAO,CAC9B,CACc,CACrB,CAAC;AACH,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\r\nimport { useRef, useLayoutEffect } from \"react\";\r\nimport { FinsembleDraggable } from \"../../legacyControls/FinsembleDraggable\";\r\nimport { DashbarView } from \"../../../types/dashbarTypes\";\r\n\r\nimport \"../../../assets/css/dashbar.css\";\r\n\r\ntype DashbarItemProps = {\r\n\tid?: string;\r\n\tindex: number;\r\n\tclassName?: string;\r\n\theight?: number;\r\n\twidget: DashbarView;\r\n\tdashbarHeight?: number;\r\n\twidgetDividerWidth?: number;\r\n\tsetTitleHeight: Function;\r\n\tsetGrabLocation: Function;\r\n\twidgetTitleGenerator: Function;\r\n};\r\n\r\nexport const DashbarItem = ({\r\n\tid = `finsemble-draggable-${Date.now()}-${Math.random()}`,\r\n\tindex,\r\n\tclassName,\r\n\twidget,\r\n\theight,\r\n\tdashbarHeight,\r\n\twidgetDividerWidth,\r\n\tsetTitleHeight,\r\n\tsetGrabLocation,\r\n\twidgetTitleGenerator,\r\n}: DashbarItemProps) => {\r\n\tconst titleRef = useRef<HTMLDivElement>(null);\r\n\tconst divRef = useRef<HTMLDivElement>(null);\r\n\r\n\tuseLayoutEffect(() => {\r\n\t\tif (titleRef?.current && dashbarHeight) {\r\n\t\t\tconst { offsetHeight } = titleRef.current;\r\n\r\n\t\t\tconst titleHeight = height ? height + offsetHeight : offsetHeight;\r\n\t\t\tsetTitleHeight(titleHeight, id);\r\n\t\t}\r\n\t});\r\n\r\n\t/**\r\n\t * Sets the location the titlebar of a view is clicked on when a user grabs a dashbar item\r\n\t *\r\n\t * @param event\r\n\t */\r\n\tconst _setGrabLocation = () => {\r\n\t\tif (divRef?.current) {\r\n\t\t\tconst rect = (divRef.current as HTMLElement).getBoundingClientRect();\r\n\t\t\tsetGrabLocation(rect.left);\r\n\t\t}\r\n\t};\r\n\r\n\tconst wrapperClass = `finsemble-dashbar-item ${className || \"\"}`;\r\n\tconst itemStyle = {\r\n\t\tdisplay: \"flex\",\r\n\t\twidth: widget.width,\r\n\t\tborderRight: `${widgetDividerWidth}px solid var(--dashbar-divider-color)`,\r\n\t};\r\n\r\n\tconst title = widgetTitleGenerator(widget, titleRef);\r\n\r\n\treturn (\r\n\t\t<FinsembleDraggable draggableId={id} index={index} key={id} wrapperClass={wrapperClass}>\r\n\t\t\t<div ref={divRef} id={id} onMouseDown={_setGrabLocation} className=\"dashbar-item-frame\" style={itemStyle}>\r\n\t\t\t\t<div>{title}</div>\r\n\t\t\t\t<div className=\"empty-space\"></div>\r\n\t\t\t</div>\r\n\t\t</FinsembleDraggable>\r\n\t);\r\n};\r\n"]}
|