@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,13 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2018 by ChartIQ, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
6
|
+
import React from "react";
|
|
7
|
+
interface IProps {
|
|
8
|
+
app: any;
|
|
9
|
+
folder: any;
|
|
10
|
+
}
|
|
11
|
+
interface IState {
|
|
12
|
+
isVisible: boolean;
|
|
13
|
+
}
|
|
14
|
+
export default class AppActionsMenu extends React.Component<IProps, IState> {
|
|
15
|
+
menuRef: HTMLDivElement | null;
|
|
16
|
+
constructor(props: IProps);
|
|
17
|
+
componentDidMount(): void;
|
|
18
|
+
componentWillUnmount(): void;
|
|
19
|
+
toggleMenu(e?: React.MouseEvent<HTMLElement>): void;
|
|
3
20
|
onViewInfo(): void;
|
|
4
|
-
toggleMenu(e: any): void;
|
|
5
21
|
onRemove(): void;
|
|
6
|
-
setMenuRef(node:
|
|
7
|
-
|
|
8
|
-
handleClickOutside(e: Event): void;
|
|
22
|
+
setMenuRef(node: HTMLDivElement): void;
|
|
23
|
+
handleClickOutside(e: any): void;
|
|
9
24
|
handleWindowBlurred(): void;
|
|
10
|
-
|
|
25
|
+
deleteApp(): void;
|
|
11
26
|
renderList(): JSX.Element;
|
|
27
|
+
render(): JSX.Element;
|
|
12
28
|
}
|
|
13
|
-
|
|
29
|
+
export {};
|
|
@@ -39,6 +39,7 @@ export default class AppActionsMenu extends React.Component {
|
|
|
39
39
|
this.deleteApp = this.deleteApp.bind(this);
|
|
40
40
|
this.handleClickOutside = this.handleClickOutside.bind(this);
|
|
41
41
|
this.handleWindowBlurred = this.handleWindowBlurred.bind(this);
|
|
42
|
+
this.menuRef = null;
|
|
42
43
|
}
|
|
43
44
|
componentDidMount() {
|
|
44
45
|
document.addEventListener("portal:click", this.handleClickOutside);
|
|
@@ -67,7 +68,7 @@ export default class AppActionsMenu extends React.Component {
|
|
|
67
68
|
spawnIfNotFound: true,
|
|
68
69
|
left: "center",
|
|
69
70
|
top: "center",
|
|
70
|
-
}, (
|
|
71
|
+
}, () => {
|
|
71
72
|
setTimeout(() => {
|
|
72
73
|
FSBL.Clients.RouterClient.transmit("viewApp", {
|
|
73
74
|
app: this.props.app,
|
|
@@ -83,7 +84,8 @@ export default class AppActionsMenu extends React.Component {
|
|
|
83
84
|
this.menuRef = node;
|
|
84
85
|
}
|
|
85
86
|
handleClickOutside(e) {
|
|
86
|
-
|
|
87
|
+
var _a;
|
|
88
|
+
const eventTarget = (_a = e === null || e === void 0 ? void 0 : e.detail) === null || _a === void 0 ? void 0 : _a.target;
|
|
87
89
|
const clickedInMyDropdown = someParentHasClassName(eventTarget, "actions-menu");
|
|
88
90
|
if (this.state.isVisible && !clickedInMyDropdown) {
|
|
89
91
|
this.setState({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppActionsMenu.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/AppActionsMenu.jsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AACtD,MAAM,SAAS,GAAG,WAAW,CAAC;AAC9B,MAAM,IAAI,GAAG,MAAM,CAAC;AAMpB,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,EAAE;IAC3B,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,GAAG,YAAY,EAAE,CAAC;IACvD,MAAM,EAAE,IAAI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AAC,IAAI,EACZ,QAAQ,EAAC,aAAa,EACtB,IAAI,EAAE,GAAG,CAAC,IAAI,EACd,IAAI,EAAE,GAAG,CAAC,IAAI,EACd,QAAQ,EAAE,IAAI,GACb,CACE;gBACJ,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,MAAM,KAAK,IAAI,IAAI,4BAAI,OAAO,EAAE,IAAI,CAAC,UAAU,gBAAgB;gBACjF,CAAC,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,SAAS,IAAI,oBAAC,SAAS,IAAC,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,GAAI;gBACvF,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAClE,4BAAI,OAAO,EAAE,IAAI,CAAC,QAAQ;;oBAAe,MAAM,CAAC,IAAI,CAAM,CAC1D,CACG,CACA,CACN,CAAC;IACH,CAAC;IAED,MAAM;QACL,OAAO,CACN,6BAAK,GAAG,EAAE,IAAI,CAAC,UAAU,EAAE,SAAS,EAAC,sBAAsB,EAAC,OAAO,EAAE,IAAI,CAAC,UAAU;YACnF;gBACC,2BAAG,SAAS,EAAC,cAAc,EAAC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,GAAI,CAClD;YACN,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,UAAU,EAAE,CACrC,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["/*!\r\n * Copyright 2018 by ChartIQ, Inc.\r\n * All rights reserved.\r\n *\r\n */\r\n\r\nimport React from \"react\";\r\nimport storeActions from \"../stores/StoreActions\";\r\nimport { ToggleFavoriteDropdown } from \"./ToggleFavoriteDropdown\";\r\nimport { useFavorites } from \"../../../../hooks/useFavorites\";\r\n\r\nconst ADVANCED_APP_LAUNCHER = \"Advanced App Launcher\";\r\nconst FAVORITES = \"Favorites\";\r\nconst FDC3 = \"FDC3\";\r\n\r\n/**\r\n * Handles deleting a component and removing it from favorites if necessary\r\n * @param {*} props\r\n */\r\nconst DeleteApp = (props) => {\r\n\tconst { isFavorited, removeFavorite } = useFavorites();\r\n\tconst { name, id } = props;\r\n\tconst removeFavoriteAndDelete = () => {\r\n\t\tif (isFavorited(name)) {\r\n\t\t\tremoveFavorite(name);\r\n\t\t}\r\n\t\tstoreActions.deleteApp(id);\r\n\t};\r\n\treturn <li onClick={removeFavoriteAndDelete}>Delete App</li>;\r\n};\r\n\r\n/**\r\n * This method checks an element and all of its parents to determine whether any of them\r\n * contain a particular class name. We use this to determine whether the user is clicking\r\n * inside or outside of the actions menu pop up.\r\n * @param {HTMLElement} element\r\n * @param {string} className\r\n */\r\nconst someParentHasClassName = (element, className) => {\r\n\tif (element.className && element.className.split(\" \").indexOf(className) >= 0) return true;\r\n\treturn element.parentNode && someParentHasClassName(element.parentNode, className);\r\n};\r\n\r\n/**\r\n * Displays a list of actions like 'View info', 'Add to favorite'\r\n * etc on each app in the list\r\n */\r\nexport default class AppActionsMenu extends React.Component {\r\n\tconstructor(props) {\r\n\t\tsuper(props);\r\n\t\tthis.state = {\r\n\t\t\tisVisible: false,\r\n\t\t};\r\n\t\t// Bind correct context\r\n\t\tthis.onViewInfo = this.onViewInfo.bind(this);\r\n\t\tthis.toggleMenu = this.toggleMenu.bind(this);\r\n\t\tthis.onRemove = this.onRemove.bind(this);\r\n\t\tthis.setMenuRef = this.setMenuRef.bind(this);\r\n\t\tthis.deleteApp = this.deleteApp.bind(this);\r\n\t\tthis.handleClickOutside = this.handleClickOutside.bind(this);\r\n\t\tthis.handleWindowBlurred = this.handleWindowBlurred.bind(this);\r\n\t}\r\n\r\n\tcomponentDidMount() {\r\n\t\tdocument.addEventListener(\"portal:click\", this.handleClickOutside);\r\n\t\t// Mody on 12/12/19\r\n\t\t// window.blur seems to work much better than finsembleWindow's\r\n\t\t// blurred event. The first, is only fired when you actually click\r\n\t\t// away from the window, while finsembleWindow's blurred fires even\r\n\t\t// when you click inside the window, causing possible race conditions.\r\n\t\twindow.addEventListener(\"blur\", this.handleWindowBlurred);\r\n\t}\r\n\r\n\tcomponentWillUnmount() {\r\n\t\tdocument.removeEventListener(\"portal:click\", this.handleClickOutside);\r\n\t\twindow.removeEventListener(\"blur\", this.handleWindowBlurred);\r\n\t}\r\n\r\n\ttoggleMenu(e) {\r\n\t\tif (e) {\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t}\r\n\t\tthis.setState({\r\n\t\t\tisVisible: !this.state.isVisible,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Opens app catalog and switches to the page when you see all\r\n\t * the details about the app\r\n\t */\r\n\tonViewInfo() {\r\n\t\tthis.toggleMenu();\r\n\t\tFSBL.Clients.LauncherClient.showWindow(\r\n\t\t\t{\r\n\t\t\t\tcomponentType: \"App Catalog\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tmonitor: \"mine\",\r\n\t\t\t\tstaggerPixels: 0,\r\n\t\t\t\tspawnIfNotFound: true,\r\n\t\t\t\tleft: \"center\",\r\n\t\t\t\ttop: \"center\",\r\n\t\t\t},\r\n\t\t\t(error) => {\r\n\t\t\t\t// Publish this event so that catalog knows\r\n\t\t\t\t// what app we want to view\r\n\r\n\t\t\t\t// NOTE: While not ideal, without a small delay (when having to launch the app catalog) the app catalog wont receive the message as it will still be initializing\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tFSBL.Clients.RouterClient.transmit(\"viewApp\", {\r\n\t\t\t\t\t\tapp: this.props.app,\r\n\t\t\t\t\t});\r\n\t\t\t\t}, 250);\r\n\t\t\t}\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Calls the storeActions.removeAppFromFolder to remove\r\n\t * an app from the currently selected folder\r\n\t */\r\n\tonRemove() {\r\n\t\tstoreActions.removeAppFromFolder(this.props.folder.name, this.props.app);\r\n\t\tthis.toggleMenu();\r\n\t}\r\n\r\n\tsetMenuRef(node) {\r\n\t\tthis.menuRef = node;\r\n\t}\r\n\r\n\t/**\r\n\t * This event handler is responsible for closing action menu pop ups when the user clicks outside of the pop up (what we might think of as a blur event).\r\n\t * The event is triggered by a document level click handler (via portals). When we receive the event, we determine whether the user was clicking inside\r\n\t * or outside of our action menu. If inside the menu then we do nothing (the click event will be captured and handled by react) but if the event occurred\r\n\t * outside of the action menu then we set its state to invisible.\r\n\t *\r\n\t * To determine whether we've clicked inside of the action menu we traverse the parent elements looking for a clue (a parent element that contains the class \"actions-menu\").\r\n\t *\r\n\t * Note: this event will fire multiple times for every click - once for each action menu on the page.\r\n\t * @param {Event} e\r\n\t */\r\n\thandleClickOutside(e) {\r\n\t\tconst eventTarget = e?.detail?.target;\r\n\t\tconst clickedInMyDropdown = someParentHasClassName(eventTarget, \"actions-menu\");\r\n\r\n\t\tif (this.state.isVisible && !clickedInMyDropdown) {\r\n\t\t\tthis.setState({\r\n\t\t\t\tisVisible: false,\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\thandleWindowBlurred() {\r\n\t\tthis.setState({\r\n\t\t\tisVisible: false,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Calls storeActions.deleteApp() to delete an app\r\n\t * from all folders and from apps list\r\n\t */\r\n\tdeleteApp() {\r\n\t\tstoreActions.deleteApp(this.props.app.appID);\r\n\t}\r\n\r\n\trenderList() {\r\n\t\t// The 'View info' action is only visible on apps\r\n\t\t// that have the source property and with a value of FDC3\r\n\t\tconst apps = storeActions.getAllApps();\r\n\t\tconst app = apps[this.props.app.appID];\r\n\t\tconst { folder } = this.props;\r\n\t\treturn (\r\n\t\t\t<div className=\"actions-menu\" style={{ right: 0 }}>\r\n\t\t\t\t<ul>\r\n\t\t\t\t\t<li>\r\n\t\t\t\t\t\t<ToggleFavoriteDropdown\r\n\t\t\t\t\t\t\tid={app.name}\r\n\t\t\t\t\t\t\tcategory=\"Application\"\r\n\t\t\t\t\t\t\tname={app.name}\r\n\t\t\t\t\t\t\ticon={app.icon}\r\n\t\t\t\t\t\t\tinstance={this}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t\t{app.source && app.source === FDC3 && <li onClick={this.onViewInfo}>View Info</li>}\r\n\t\t\t\t\t{!app.source && app.canDelete && <DeleteApp name={app.name} id={this.props.app.appID} />}\r\n\t\t\t\t\t{[ADVANCED_APP_LAUNCHER, FAVORITES].indexOf(folder.name) === -1 && (\r\n\t\t\t\t\t\t<li onClick={this.onRemove}>Remove from {folder.name}</li>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</ul>\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n\r\n\trender() {\r\n\t\treturn (\r\n\t\t\t<div ref={this.setMenuRef} className=\"actions-menu-wrapper\" onClick={this.toggleMenu}>\r\n\t\t\t\t<span>\r\n\t\t\t\t\t<i className=\"ff-dots-vert\" id={this.props.app.appID} />\r\n\t\t\t\t</span>\r\n\t\t\t\t{this.state.isVisible && this.renderList()}\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"AppActionsMenu.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/AppActionsMenu.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AACtD,MAAM,SAAS,GAAG,WAAW,CAAC;AAC9B,MAAM,IAAI,GAAG,MAAM,CAAC;AAWpB,MAAM,SAAS,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC3C,MAAM,EAAE,WAAW,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from \"../stores/StoreActions\";\r\nimport { ToggleFavoriteDropdown } from \"./ToggleFavoriteDropdown\";\r\nimport { useFavorites } from \"../../../../hooks/useFavorites\";\r\n\r\nconst ADVANCED_APP_LAUNCHER = \"Advanced App Launcher\";\r\nconst FAVORITES = \"Favorites\";\r\nconst FDC3 = \"FDC3\";\r\n\r\ninterface DeleteAppProps {\r\n\tname: string;\r\n\tid: any;\r\n}\r\n\r\n/**\r\n * Handles deleting a component and removing it from favorites if necessary\r\n * @param {*} props\r\n */\r\nconst DeleteApp = (props: DeleteAppProps) => {\r\n\tconst { isFavorited, removeFavorite } = useFavorites();\r\n\tconst { name, id } = props;\r\n\tconst removeFavoriteAndDelete = () => {\r\n\t\tif (isFavorited(name)) {\r\n\t\t\tremoveFavorite(name);\r\n\t\t}\r\n\t\tstoreActions.deleteApp(id);\r\n\t};\r\n\treturn <li onClick={removeFavoriteAndDelete}>Delete App</li>;\r\n};\r\n\r\n/**\r\n * This method checks an element and all of its parents to determine whether any of them\r\n * contain a particular class name. We use this to determine whether the user is clicking\r\n * inside or outside of the actions menu pop up.\r\n * @param {HTMLElement} element\r\n * @param {string} className\r\n */\r\nconst someParentHasClassName = (element: HTMLElement, className: string): any => {\r\n\tif (element.className && element.className.split(\" \").indexOf(className) >= 0) return true;\r\n\treturn element.parentNode && someParentHasClassName(element.parentNode as HTMLElement, className);\r\n};\r\n\r\ninterface IProps {\r\n\tapp: any;\r\n\tfolder: any;\r\n}\r\ninterface IState {\r\n\tisVisible: boolean;\r\n}\r\n\r\n/**\r\n * Displays a list of actions like 'View info', 'Add to favorite'\r\n * etc on each app in the list\r\n */\r\nexport default class AppActionsMenu extends React.Component<IProps, IState> {\r\n\tmenuRef: HTMLDivElement | null;\r\n\r\n\tconstructor(props: IProps) {\r\n\t\tsuper(props);\r\n\t\tthis.state = {\r\n\t\t\tisVisible: false,\r\n\t\t};\r\n\t\t// Bind correct context\r\n\t\tthis.onViewInfo = this.onViewInfo.bind(this);\r\n\t\tthis.toggleMenu = this.toggleMenu.bind(this);\r\n\t\tthis.onRemove = this.onRemove.bind(this);\r\n\t\tthis.setMenuRef = this.setMenuRef.bind(this);\r\n\t\tthis.deleteApp = this.deleteApp.bind(this);\r\n\t\tthis.handleClickOutside = this.handleClickOutside.bind(this);\r\n\t\tthis.handleWindowBlurred = this.handleWindowBlurred.bind(this);\r\n\t\tthis.menuRef = null;\r\n\t}\r\n\r\n\tcomponentDidMount() {\r\n\t\tdocument.addEventListener(\"portal:click\", this.handleClickOutside);\r\n\t\t// Mody on 12/12/19\r\n\t\t// window.blur seems to work much better than finsembleWindow's\r\n\t\t// blurred event. The first, is only fired when you actually click\r\n\t\t// away from the window, while finsembleWindow's blurred fires even\r\n\t\t// when you click inside the window, causing possible race conditions.\r\n\t\twindow.addEventListener(\"blur\", this.handleWindowBlurred);\r\n\t}\r\n\r\n\tcomponentWillUnmount() {\r\n\t\tdocument.removeEventListener(\"portal:click\", this.handleClickOutside);\r\n\t\twindow.removeEventListener(\"blur\", this.handleWindowBlurred);\r\n\t}\r\n\r\n\ttoggleMenu(e?: React.MouseEvent<HTMLElement>) {\r\n\t\tif (e) {\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t}\r\n\t\tthis.setState({\r\n\t\t\tisVisible: !this.state.isVisible,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Opens app catalog and switches to the page when you see all\r\n\t * the details about the app\r\n\t */\r\n\tonViewInfo() {\r\n\t\tthis.toggleMenu();\r\n\t\tFSBL.Clients.LauncherClient.showWindow(\r\n\t\t\t{\r\n\t\t\t\tcomponentType: \"App Catalog\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tmonitor: \"mine\",\r\n\t\t\t\tstaggerPixels: 0,\r\n\t\t\t\tspawnIfNotFound: true,\r\n\t\t\t\tleft: \"center\",\r\n\t\t\t\ttop: \"center\",\r\n\t\t\t},\r\n\t\t\t() => {\r\n\t\t\t\t// Publish this event so that catalog knows\r\n\t\t\t\t// what app we want to view\r\n\r\n\t\t\t\t// NOTE: While not ideal, without a small delay (when having to launch the app catalog) the app catalog wont receive the message as it will still be initializing\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tFSBL.Clients.RouterClient.transmit(\"viewApp\", {\r\n\t\t\t\t\t\tapp: this.props.app,\r\n\t\t\t\t\t});\r\n\t\t\t\t}, 250);\r\n\t\t\t}\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Calls the storeActions.removeAppFromFolder to remove\r\n\t * an app from the currently selected folder\r\n\t */\r\n\tonRemove() {\r\n\t\tstoreActions.removeAppFromFolder(this.props.folder.name, this.props.app);\r\n\t\tthis.toggleMenu();\r\n\t}\r\n\r\n\tsetMenuRef(node: HTMLDivElement) {\r\n\t\tthis.menuRef = node;\r\n\t}\r\n\r\n\t/**\r\n\t * This event handler is responsible for closing action menu pop ups when the user clicks outside of the pop up (what we might think of as a blur event).\r\n\t * The event is triggered by a document level click handler (via portals). When we receive the event, we determine whether the user was clicking inside\r\n\t * or outside of our action menu. If inside the menu then we do nothing (the click event will be captured and handled by react) but if the event occurred\r\n\t * outside of the action menu then we set its state to invisible.\r\n\t *\r\n\t * To determine whether we've clicked inside of the action menu we traverse the parent elements looking for a clue (a parent element that contains the class \"actions-menu\").\r\n\t *\r\n\t * Note: this event will fire multiple times for every click - once for each action menu on the page.\r\n\t * @param {Event} e\r\n\t */\r\n\thandleClickOutside(e: any) {\r\n\t\tconst eventTarget = e?.detail?.target;\r\n\t\tconst clickedInMyDropdown = someParentHasClassName(eventTarget, \"actions-menu\");\r\n\r\n\t\tif (this.state.isVisible && !clickedInMyDropdown) {\r\n\t\t\tthis.setState({\r\n\t\t\t\tisVisible: false,\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\thandleWindowBlurred() {\r\n\t\tthis.setState({\r\n\t\t\tisVisible: false,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Calls storeActions.deleteApp() to delete an app\r\n\t * from all folders and from apps list\r\n\t */\r\n\tdeleteApp() {\r\n\t\tstoreActions.deleteApp(this.props.app.appID);\r\n\t}\r\n\r\n\trenderList() {\r\n\t\t// The 'View info' action is only visible on apps\r\n\t\t// that have the source property and with a value of FDC3\r\n\t\tconst apps = storeActions.getAllApps();\r\n\t\tconst app = apps[this.props.app.appID];\r\n\t\tconst { folder } = this.props;\r\n\t\treturn (\r\n\t\t\t<div className=\"actions-menu\" style={{ right: 0 }}>\r\n\t\t\t\t<ul>\r\n\t\t\t\t\t<li>\r\n\t\t\t\t\t\t<ToggleFavoriteDropdown\r\n\t\t\t\t\t\t\tid={app.name}\r\n\t\t\t\t\t\t\tcategory=\"Application\"\r\n\t\t\t\t\t\t\tname={app.name}\r\n\t\t\t\t\t\t\ticon={app.icon}\r\n\t\t\t\t\t\t\tinstance={this}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t\t{app.source && app.source === FDC3 && <li onClick={this.onViewInfo}>View Info</li>}\r\n\t\t\t\t\t{!app.source && app.canDelete && <DeleteApp name={app.name} id={this.props.app.appID} />}\r\n\t\t\t\t\t{[ADVANCED_APP_LAUNCHER, FAVORITES].indexOf(folder.name) === -1 && (\r\n\t\t\t\t\t\t<li onClick={this.onRemove}>Remove from {folder.name}</li>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</ul>\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n\r\n\trender() {\r\n\t\treturn (\r\n\t\t\t<div ref={this.setMenuRef} className=\"actions-menu-wrapper\" onClick={this.toggleMenu}>\r\n\t\t\t\t<span>\r\n\t\t\t\t\t<i className=\"ff-dots-vert\" id={this.props.app.appID} />\r\n\t\t\t\t</span>\r\n\t\t\t\t{this.state.isVisible && this.renderList()}\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n}\r\n"]}
|
|
@@ -1,6 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Icon } from "../../../../types/iconTypes";
|
|
3
|
+
import { FolderAppType, FolderType } from "../../../../types/advancedAppLauncherTypes";
|
|
4
|
+
declare type App = FolderAppType & {
|
|
5
|
+
title?: string;
|
|
6
|
+
icon?: Icon;
|
|
7
|
+
};
|
|
8
|
+
interface IProps {
|
|
9
|
+
folder: FolderType;
|
|
10
|
+
app: App;
|
|
11
|
+
}
|
|
12
|
+
interface IState {
|
|
13
|
+
}
|
|
14
|
+
export default class AppDefinition extends React.Component<IProps, IState> {
|
|
15
|
+
constructor(props: IProps);
|
|
16
|
+
onDragToFolder(event: React.DragEvent): void;
|
|
4
17
|
onItemClick(): void;
|
|
18
|
+
render(): JSX.Element;
|
|
5
19
|
}
|
|
6
|
-
|
|
20
|
+
export {};
|
|
@@ -10,7 +10,7 @@ export default class AppDefinition extends React.Component {
|
|
|
10
10
|
this.onDragToFolder = this.onDragToFolder.bind(this);
|
|
11
11
|
this.onItemClick = this.onItemClick.bind(this);
|
|
12
12
|
}
|
|
13
|
-
onDragToFolder(event
|
|
13
|
+
onDragToFolder(event) {
|
|
14
14
|
event.dataTransfer.setData("app", JSON.stringify(this.props.app));
|
|
15
15
|
}
|
|
16
16
|
onItemClick() {
|
|
@@ -19,9 +19,10 @@ export default class AppDefinition extends React.Component {
|
|
|
19
19
|
addToWorkspace: true,
|
|
20
20
|
});
|
|
21
21
|
setTimeout(() => {
|
|
22
|
+
var _a;
|
|
22
23
|
finsembleWindow.blur();
|
|
23
|
-
if (storeActions.getSearchText) {
|
|
24
|
-
getStore().setValue({
|
|
24
|
+
if (storeActions.getSearchText()) {
|
|
25
|
+
(_a = getStore()) === null || _a === void 0 ? void 0 : _a.setValue({
|
|
25
26
|
field: "filterText",
|
|
26
27
|
value: null,
|
|
27
28
|
});
|
|
@@ -32,11 +33,12 @@ export default class AppDefinition extends React.Component {
|
|
|
32
33
|
const { app } = this.props;
|
|
33
34
|
const appId = app.title || app.name;
|
|
34
35
|
const displayName = app.displayName || app.name;
|
|
36
|
+
const tags = (app === null || app === void 0 ? void 0 : app.tags) || [];
|
|
35
37
|
return (React.createElement("div", { onClick: this.onItemClick, className: "app-item link", draggable: "true", onDragStart: this.onDragToFolder },
|
|
36
38
|
React.createElement("span", { className: "app-item-title" },
|
|
37
|
-
React.createElement(FavoriteMaker, { id: appId, category: "Application",
|
|
39
|
+
React.createElement(FavoriteMaker, { id: appId, category: "Application", name: displayName, icon: app.icon }),
|
|
38
40
|
React.createElement("span", { className: "app-name", title: displayName }, displayName)),
|
|
39
|
-
|
|
41
|
+
tags.length > 0 && React.createElement(AppTagsList, { tags: tags }),
|
|
40
42
|
React.createElement(AppActionsMenu, { app: app, folder: this.props.folder })));
|
|
41
43
|
}
|
|
42
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppDefinition.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/AppDefinition.
|
|
1
|
+
{"version":3,"file":"AppDefinition.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/AppDefinition.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAoBlD,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,KAAK,CAAC,SAAyB;IACzE,YAAY,KAAa;QACxB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;I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AK,EAAE,QAAQ,EAAC,aAAa,EAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,GAAI;gBACtF,8BAAM,SAAS,EAAC,UAAU,EAAC,KAAK,EAAE,WAAW,IAC3C,WAAW,CACN,CACD;YACN,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,oBAAC,WAAW,IAAC,IAAI,EAAE,IAAI,GAAI;YAC/C,oBAAC,cAAc,IAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,GAAI,CAClD,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\r\nimport AppActionsMenu from \"./AppActionsMenu\";\r\nimport AppTagsList from \"./AppTagsList\";\r\nimport { FavoriteMaker } from \"../../../favorites/FavoriteMaker\";\r\nimport { getStore } from \"../stores/LauncherStore\";\r\nimport storeActions from \"../stores/StoreActions\";\r\nimport { Icon } from \"../../../../types/iconTypes\";\r\nimport { FolderAppType, FolderType } from \"../../../../types/advancedAppLauncherTypes\";\r\n\r\ntype App = FolderAppType & {\r\n\ttitle?: string;\r\n\ticon?: Icon;\r\n};\r\ninterface IProps {\r\n\tfolder: FolderType;\r\n\tapp: App;\r\n}\r\n\r\ninterface IState {}\r\n\r\n/**\r\n * Used to make sure that a user is not waiting for component\r\n * to spawn after a double click, helps us prevent multiple\r\n * spawns for the same app.\r\n */\r\nexport default class AppDefinition extends React.Component<IProps, IState> {\r\n\tconstructor(props: IProps) {\r\n\t\tsuper(props);\r\n\t\tthis.onDragToFolder = this.onDragToFolder.bind(this);\r\n\t\tthis.onItemClick = this.onItemClick.bind(this);\r\n\t}\r\n\r\n\t/**\r\n\t * Native HTML5 drag and drop\r\n\t **/\r\n\tonDragToFolder(event: React.DragEvent) {\r\n\t\tevent.dataTransfer.setData(\"app\", JSON.stringify(this.props.app));\r\n\t}\r\n\r\n\t/**\r\n\t * Spawns a component on click\r\n\t * @param {object} e The Synthetic React event\r\n\t *\r\n\t */\r\n\tonItemClick() {\r\n\t\tconst name = this.props.app.title || this.props.app.name;\r\n\t\tFSBL.Clients.LauncherClient.spawn(name.trim(), {\r\n\t\t\taddToWorkspace: true,\r\n\t\t});\r\n\t\t/**\r\n\t\t * If a component takes 4 seconds until it's first painted and the app launcher closes immediately -- that feels discordant.\r\n\t\t * If a component takes 4 seconds until it's first painted and the app launcher stays open, that feels like a bug.\r\n\t\t * This is a middle ground. If the component paints quickly (like our html apps), the app launcher will hide as soon as\r\n\t\t * that new window gets focused. If the component takes a while to paint, we'll hide after half a second instead of\r\n\t\t * waiting for the window to grab focus.\r\n\t\t *\r\n\t\t * Longer term we should leave the menu open and have a micro-interaction telling the user that something is happening.\r\n\t\t */\r\n\t\tsetTimeout(() => {\r\n\t\t\tfinsembleWindow.blur();\r\n\t\t\t// clear any search text on app launch.\r\n\t\t\tif (storeActions.getSearchText()) {\r\n\t\t\t\tgetStore()?.setValue({\r\n\t\t\t\t\tfield: \"filterText\",\r\n\t\t\t\t\tvalue: null,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}, 500);\r\n\t}\r\n\r\n\trender() {\r\n\t\tconst { app } = this.props;\r\n\t\tconst appId = app.title || app.name;\r\n\t\tconst displayName = app.displayName || app.name;\r\n\t\tconst tags = app?.tags || [];\r\n\t\treturn (\r\n\t\t\t<div onClick={this.onItemClick} className=\"app-item link\" draggable=\"true\" onDragStart={this.onDragToFolder}>\r\n\t\t\t\t<span className=\"app-item-title\">\r\n\t\t\t\t\t<FavoriteMaker id={appId} category=\"Application\" name={displayName} icon={app.icon} />\r\n\t\t\t\t\t<span className=\"app-name\" title={displayName}>\r\n\t\t\t\t\t\t{displayName}\r\n\t\t\t\t\t</span>\r\n\t\t\t\t</span>\r\n\t\t\t\t{tags.length > 0 && <AppTagsList tags={tags} />}\r\n\t\t\t\t<AppActionsMenu app={app} folder={this.props.folder} />\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n}\r\n"]}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface IProps {
|
|
3
|
+
tags: string[];
|
|
4
|
+
}
|
|
5
|
+
interface IState {
|
|
6
|
+
highlightedTag: number;
|
|
7
|
+
}
|
|
8
|
+
export default class AppTagsList extends React.Component<IProps, IState> {
|
|
9
|
+
constructor(props: IProps);
|
|
10
|
+
highlightTag(index: number): void;
|
|
4
11
|
clearHighlights(): void;
|
|
5
|
-
|
|
6
|
-
|
|
12
|
+
onTagClick(tag: string, e: React.MouseEvent): void;
|
|
13
|
+
generateTags(): JSX.Element[];
|
|
14
|
+
render(): JSX.Element;
|
|
7
15
|
}
|
|
8
|
-
|
|
16
|
+
export {};
|
|
@@ -29,12 +29,11 @@ export default class AppTagsList extends React.Component {
|
|
|
29
29
|
storeActions.addTag(tag);
|
|
30
30
|
}
|
|
31
31
|
generateTags() {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
const { highlightedTag: highlight } = this.state;
|
|
33
|
+
return this.props.tags.map((tag, i) => {
|
|
34
34
|
let style = highlight === i ? "tag-name highlight" : "tag-name";
|
|
35
35
|
return (React.createElement("span", { key: i, className: style, onClick: this.onTagClick.bind(this, tag), onMouseEnter: this.highlightTag.bind(this, i), onMouseLeave: this.clearHighlights }, this.props.tags[i + 1] ? `${tag}, ` : `${tag}`));
|
|
36
36
|
});
|
|
37
|
-
return tags;
|
|
38
37
|
}
|
|
39
38
|
render() {
|
|
40
39
|
return (React.createElement("div", { className: "app-item-tags" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppTagsList.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/AppTagsList.
|
|
1
|
+
{"version":3,"file":"AppTagsList.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/AppTagsList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE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CAAC,CAAC,UAAU,CAAC;YAChE,OAAO,CACN,8BACC,GAAG,EAAE,CAAC,EACN,SAAS,EAAE,KAAK,EAChB,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,EACxC,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,EAC7C,YAAY,EAAE,IAAI,CAAC,eAAe,IAEjC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,EAAE,CACzC,CACP,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM;QACL,OAAO,CACN,6BAAK,SAAS,EAAC,eAAe;YAC7B,2BAAG,SAAS,EAAC,QAAQ,GAAK;YACzB,IAAI,CAAC,YAAY,EAAE,CACf,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\r\n\r\nimport storeActions from \"../stores/StoreActions\";\r\n\r\ninterface IProps {\r\n\ttags: string[];\r\n}\r\n\r\ninterface IState {\r\n\thighlightedTag: number;\r\n}\r\n\r\nexport default class AppTagsList extends React.Component<IProps, IState> {\r\n\tconstructor(props: IProps) {\r\n\t\tsuper(props);\r\n\t\tthis.state = {\r\n\t\t\thighlightedTag: -1,\r\n\t\t};\r\n\t\tthis.highlightTag = this.highlightTag.bind(this);\r\n\t\tthis.clearHighlights = this.clearHighlights.bind(this);\r\n\t\tthis.generateTags = this.generateTags.bind(this);\r\n\t\tthis.onTagClick = this.onTagClick.bind(this);\r\n\t}\r\n\r\n\thighlightTag(index: number) {\r\n\t\tthis.setState({\r\n\t\t\thighlightedTag: index,\r\n\t\t});\r\n\t}\r\n\r\n\tclearHighlights() {\r\n\t\tthis.setState({\r\n\t\t\thighlightedTag: -1,\r\n\t\t});\r\n\t}\r\n\r\n\tonTagClick(tag: string, e: React.MouseEvent) {\r\n\t\tif (e) {\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t}\r\n\t\tstoreActions.addTag(tag);\r\n\t}\r\n\r\n\tgenerateTags() {\r\n\t\tconst { highlightedTag: highlight } = this.state;\r\n\t\treturn this.props.tags.map((tag, i) => {\r\n\t\t\tlet style = highlight === i ? \"tag-name highlight\" : \"tag-name\";\r\n\t\t\treturn (\r\n\t\t\t\t<span\r\n\t\t\t\t\tkey={i}\r\n\t\t\t\t\tclassName={style}\r\n\t\t\t\t\tonClick={this.onTagClick.bind(this, tag)}\r\n\t\t\t\t\tonMouseEnter={this.highlightTag.bind(this, i)}\r\n\t\t\t\t\tonMouseLeave={this.clearHighlights}\r\n\t\t\t\t>\r\n\t\t\t\t\t{this.props.tags[i + 1] ? `${tag}, ` : `${tag}`}\r\n\t\t\t\t</span>\r\n\t\t\t);\r\n\t\t});\r\n\t}\r\n\r\n\trender() {\r\n\t\treturn (\r\n\t\t\t<div className=\"app-item-tags\">\r\n\t\t\t\t<i className=\"ff-tag\"></i>\r\n\t\t\t\t{this.generateTags()}\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n}\r\n"]}
|
|
@@ -1,16 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import sortFunctions from "../utils/sort-functions";
|
|
3
|
+
import { FolderAppType, FolderType } from "../../../../types/advancedAppLauncherTypes";
|
|
4
|
+
import { StandardError } from "@finsemble/finsemble-core/types/types";
|
|
5
|
+
interface IProps {
|
|
6
|
+
}
|
|
7
|
+
interface IState {
|
|
8
|
+
apps: any;
|
|
9
|
+
tags: any;
|
|
10
|
+
sortBy: keyof typeof sortFunctions;
|
|
11
|
+
filterText: string;
|
|
12
|
+
folder: FolderType;
|
|
13
|
+
}
|
|
14
|
+
export default class Content extends React.Component<IProps, IState> {
|
|
3
15
|
routerSubscription: any;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
16
|
+
constructor(props: IProps);
|
|
17
|
+
_setFolderState(): void;
|
|
18
|
+
filterApps(): FolderAppType[];
|
|
19
|
+
filterAppsByTags(apps: FolderAppType[]): FolderAppType[];
|
|
20
|
+
onActiveFolderChanged(): void;
|
|
21
|
+
onSearch(error: StandardError, data: any): void;
|
|
22
|
+
onSort(error: StandardError, data: any): void;
|
|
23
|
+
onTagsUpdate(error: StandardError, data: any): void;
|
|
24
|
+
onAppListUpdate(): void;
|
|
9
25
|
onAppLauncherUpdate(): void;
|
|
10
|
-
updateAppDefinitions(err:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
renderAppList():
|
|
14
|
-
getNoResultsMessage():
|
|
26
|
+
updateAppDefinitions(err: StandardError, response: any): void;
|
|
27
|
+
componentDidMount(): void;
|
|
28
|
+
componentWillUnmount(): void;
|
|
29
|
+
renderAppList(): JSX.Element[];
|
|
30
|
+
getNoResultsMessage(): (string | JSX.Element)[];
|
|
31
|
+
render(): JSX.Element;
|
|
15
32
|
}
|
|
16
|
-
|
|
33
|
+
export {};
|
|
@@ -27,15 +27,14 @@ export default class Content extends React.Component {
|
|
|
27
27
|
this.updateAppDefinitions = this.updateAppDefinitions.bind(this);
|
|
28
28
|
store = getStore();
|
|
29
29
|
}
|
|
30
|
+
_setFolderState() {
|
|
31
|
+
this.setState({
|
|
32
|
+
folder: storeActions.getActiveFolder(),
|
|
33
|
+
});
|
|
34
|
+
}
|
|
30
35
|
filterApps() {
|
|
31
|
-
const folder = this.state
|
|
32
|
-
let apps;
|
|
33
|
-
if (folder.name === ADVANCED_APP_LAUNCHER) {
|
|
34
|
-
apps = Object.values(storeActions.getAllApps());
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
apps = folder.apps;
|
|
38
|
-
}
|
|
36
|
+
const { folder } = this.state;
|
|
37
|
+
let apps = folder.name === ADVANCED_APP_LAUNCHER ? Object.values(storeActions.getAllApps()) : folder.apps;
|
|
39
38
|
if (!folder || !apps) {
|
|
40
39
|
return [];
|
|
41
40
|
}
|
|
@@ -44,27 +43,30 @@ export default class Content extends React.Component {
|
|
|
44
43
|
if (!this.state.filterText) {
|
|
45
44
|
return filteredApps;
|
|
46
45
|
}
|
|
47
|
-
return filteredApps.filter(({ displayName, name }) =>
|
|
48
|
-
|
|
46
|
+
return filteredApps.filter(({ displayName, name }) => {
|
|
47
|
+
var _a;
|
|
48
|
+
return (_a = displayName === null || displayName === void 0 ? void 0 : displayName.toLowerCase().includes(this.state.filterText.toLowerCase())) !== null && _a !== void 0 ? _a : name === null || name === void 0 ? void 0 : name.toLowerCase().includes(this.state.filterText.toLowerCase());
|
|
49
|
+
});
|
|
49
50
|
}
|
|
50
51
|
filterAppsByTags(apps) {
|
|
51
52
|
if (!this.state.tags) {
|
|
52
53
|
return apps;
|
|
53
54
|
}
|
|
54
55
|
return apps.filter((app) => {
|
|
56
|
+
var _a;
|
|
55
57
|
for (let i = 0; i < this.state.tags.length; i++) {
|
|
56
58
|
let tag = this.state.tags[i];
|
|
57
|
-
if (!app.tags.includes(tag)) {
|
|
59
|
+
if (!((_a = app.tags) === null || _a === void 0 ? void 0 : _a.includes(tag))) {
|
|
58
60
|
return false;
|
|
59
61
|
}
|
|
60
62
|
}
|
|
61
63
|
return true;
|
|
62
64
|
});
|
|
63
65
|
}
|
|
64
|
-
onActiveFolderChanged(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
});
|
|
66
|
+
onActiveFolderChanged() {
|
|
67
|
+
setTimeout(() => {
|
|
68
|
+
this._setFolderState();
|
|
69
|
+
}, 50);
|
|
68
70
|
}
|
|
69
71
|
onSearch(error, data) {
|
|
70
72
|
this.setState({
|
|
@@ -81,10 +83,8 @@ export default class Content extends React.Component {
|
|
|
81
83
|
tags: data.value,
|
|
82
84
|
});
|
|
83
85
|
}
|
|
84
|
-
onAppListUpdate(
|
|
85
|
-
this.
|
|
86
|
-
folder: storeActions.getActiveFolder(),
|
|
87
|
-
});
|
|
86
|
+
onAppListUpdate() {
|
|
87
|
+
this._setFolderState();
|
|
88
88
|
}
|
|
89
89
|
onAppLauncherUpdate() {
|
|
90
90
|
this.setState({
|
|
@@ -92,35 +92,33 @@ export default class Content extends React.Component {
|
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
updateAppDefinitions(err, response) {
|
|
95
|
-
FSBL.Clients.Logger.debug("list updated", err, response);
|
|
95
|
+
FSBL.Clients.Logger.system.debug("list updated", err, response);
|
|
96
96
|
if (err) {
|
|
97
97
|
return console.error(err);
|
|
98
98
|
}
|
|
99
99
|
storeActions.refreshAppDefinitions(response.data.componentList);
|
|
100
|
-
this.onAppListUpdate(
|
|
100
|
+
this.onAppListUpdate();
|
|
101
101
|
}
|
|
102
102
|
componentDidMount() {
|
|
103
|
-
store.addListener({ field: "activeFolder" }, this.onActiveFolderChanged);
|
|
104
|
-
store.addListener({ field: "filterText" }, this.onSearch);
|
|
105
|
-
store.addListener({ field: "sortBy" }, this.onSort);
|
|
106
|
-
store.addListener({ field: "activeLauncherTags" }, this.onTagsUpdate);
|
|
107
|
-
store.addListener({ field: "appFolders.folders" }, this.onAppListUpdate);
|
|
108
|
-
store.addListener({ field: "appDefinitions" }, this.onAppLauncherUpdate);
|
|
103
|
+
store === null || store === void 0 ? void 0 : store.addListener({ field: "activeFolder" }, this.onActiveFolderChanged);
|
|
104
|
+
store === null || store === void 0 ? void 0 : store.addListener({ field: "filterText" }, this.onSearch);
|
|
105
|
+
store === null || store === void 0 ? void 0 : store.addListener({ field: "sortBy" }, this.onSort);
|
|
106
|
+
store === null || store === void 0 ? void 0 : store.addListener({ field: "activeLauncherTags" }, this.onTagsUpdate);
|
|
107
|
+
store === null || store === void 0 ? void 0 : store.addListener({ field: "appFolders.folders" }, this.onAppListUpdate);
|
|
108
|
+
store === null || store === void 0 ? void 0 : store.addListener({ field: "appDefinitions" }, this.onAppLauncherUpdate);
|
|
109
109
|
this.routerSubscription = FSBL.Clients.RouterClient.subscribe("Launcher.update", this.updateAppDefinitions);
|
|
110
110
|
}
|
|
111
111
|
componentWillUnmount() {
|
|
112
|
-
store.removeListener({ field: "activeFolder" }, this.onActiveFolderChanged);
|
|
113
|
-
store.removeListener({ field: "filterText" }, this.onSearch);
|
|
114
|
-
store.removeListener({ field: "sortBy" }, this.onSort);
|
|
115
|
-
store.removeListener({ field: "activeLauncherTags" }, this.onTagsUpdate);
|
|
116
|
-
store.removeListener({ field: "appFolders.folders" }, this.onAppListUpdate);
|
|
117
|
-
store.removeListener({ field: "appDefinitions" }, this.onAppLauncherUpdate);
|
|
112
|
+
store === null || store === void 0 ? void 0 : store.removeListener({ field: "activeFolder" }, this.onActiveFolderChanged);
|
|
113
|
+
store === null || store === void 0 ? void 0 : store.removeListener({ field: "filterText" }, this.onSearch);
|
|
114
|
+
store === null || store === void 0 ? void 0 : store.removeListener({ field: "sortBy" }, this.onSort);
|
|
115
|
+
store === null || store === void 0 ? void 0 : store.removeListener({ field: "activeLauncherTags" }, this.onTagsUpdate);
|
|
116
|
+
store === null || store === void 0 ? void 0 : store.removeListener({ field: "appFolders.folders" }, this.onAppListUpdate);
|
|
117
|
+
store === null || store === void 0 ? void 0 : store.removeListener({ field: "appDefinitions" }, this.onAppLauncherUpdate);
|
|
118
118
|
FSBL.Clients.RouterClient.unsubscribe(this.routerSubscription.subscribeID);
|
|
119
119
|
}
|
|
120
120
|
renderAppList() {
|
|
121
|
-
return this.filterApps().map((app, index) => {
|
|
122
|
-
return React.createElement(AppDefinition, { app: app, folder: this.state.folder, key: index });
|
|
123
|
-
});
|
|
121
|
+
return this.filterApps().map((app, index) => React.createElement(AppDefinition, { app: app, folder: this.state.folder, key: index }));
|
|
124
122
|
}
|
|
125
123
|
getNoResultsMessage() {
|
|
126
124
|
const messages = {
|
|
@@ -139,7 +137,7 @@ export default class Content extends React.Component {
|
|
|
139
137
|
return messages.Favorites;
|
|
140
138
|
break;
|
|
141
139
|
case "Dashboards":
|
|
142
|
-
return
|
|
140
|
+
return [""];
|
|
143
141
|
default:
|
|
144
142
|
return messages.default;
|
|
145
143
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/Content.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,aAAa,MAAM,yBAAyB,CAAC;AACpD,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAEtD,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;AAEnC,IAAI,KAAK,CAAC;AAEV,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,KAAK,CAAC,SAAS;IAEnD,YAAY,KAAK;QAChB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,IAAI,EAAE,YAAY,CAAC,OAAO,EAAE;YAC5B,IAAI,EAAE,YAAY,CAAC,OAAO,EAAE;YAC5B,MAAM,EAAE,YAAY,CAAC,SAAS,EAAE;YAChC,UAAU,EAAE,YAAY,CAAC,aAAa,EAAE,CAAC,WAAW,EAAE;YACtD,MAAM,EAAE,YAAY,CAAC,eAAe,EAAE;SACtC,CAAC;QACF,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjD,IAAI,CAAC,qBAAq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AAuB,EAAE,4BAAI,GAAG,EAAE,CAAC,GAAI,EAAE,wCAAwC,CAAC;SAC5F,CAAC;QACF,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;YACvB,OAAO,CAAC,iBAAiB,EAAE,4BAAI,GAAG,EAAE,CAAC,GAAI,CAAC,CAAC;SAC3C;QAED,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE;YACpD,OAAO,QAAQ,CAAC,MAAM,CAAC;SACvB;QAED,QAAQ,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE;YAC/B,KAAK,WAAW;gBACf,OAAO,QAAQ,CAAC,SAAS,CAAC;gBAC1B,MAAM;YACP,KAAK,YAAY;gBAChB,OAAO,QAAQ,CAAC,UAAU,CAAC;YAC5B;gBACC,OAAO,QAAQ,CAAC,OAAO,CAAC;SACzB;IACF,CAAC;IAED,MAAM;QACL,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QAClC,OAAO,CACN,6BAAK,SAAS,EAAC,0BAA0B;YACxC,oBAAC,UAAU,OAAc;YACzB,6BAAK,SAAS,EAAC,cAAc,IAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,oBAAC,WAAW,IAAC,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAE,GAAI,CAAO,CAC1G,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\r\nimport AppDefinition from \"./AppDefinition\";\r\nimport NoAppsFound from \"./NoAppsFound\";\r\nimport FilterSort from \"./FilterSort\";\r\nimport { getStore } from \"../stores/LauncherStore\";\r\nimport storeActions from \"../stores/StoreActions\";\r\nimport sortFunctions from \"../utils/sort-functions\";\r\nconst ADVANCED_APP_LAUNCHER = \"Advanced App Launcher\";\r\n\r\nwindow.storeActions = storeActions;\r\n// To be assigned a value later in the constructor\r\nlet store;\r\n\r\nexport default class Content extends React.Component {\r\n\trouterSubscription;\r\n\tconstructor(props) {\r\n\t\tsuper(props);\r\n\t\tthis.state = {\r\n\t\t\tapps: storeActions.getApps(),\r\n\t\t\ttags: storeActions.getTags(),\r\n\t\t\tsortBy: storeActions.getSortBy(),\r\n\t\t\tfilterText: storeActions.getSearchText().toLowerCase(),\r\n\t\t\tfolder: storeActions.getActiveFolder(),\r\n\t\t};\r\n\t\tthis.onSort = this.onSort.bind(this);\r\n\t\tthis.onSearch = this.onSearch.bind(this);\r\n\t\tthis.onTagsUpdate = this.onTagsUpdate.bind(this);\r\n\t\tthis.onActiveFolderChanged = this.onActiveFolderChanged.bind(this);\r\n\t\tthis.onAppListUpdate = this.onAppListUpdate.bind(this);\r\n\t\tthis.onAppLauncherUpdate = this.onAppLauncherUpdate.bind(this);\r\n\t\tthis.updateAppDefinitions = this.updateAppDefinitions.bind(this);\r\n\t\tstore = getStore();\r\n\t}\r\n\r\n\tfilterApps() {\r\n\t\tconst folder = this.state.folder;\r\n\t\tlet apps;\r\n\t\tif (folder.name === ADVANCED_APP_LAUNCHER) {\r\n\t\t\tapps = Object.values(storeActions.getAllApps());\r\n\t\t} else {\r\n\t\t\tapps = folder.apps;\r\n\t\t}\r\n\r\n\t\tif (!folder || !apps) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\t\tconst sortFunc = sortFunctions[this.state.sortBy];\r\n\t\tconst filteredApps = this.filterAppsByTags(sortFunc(apps));\r\n\t\tif (!this.state.filterText) {\r\n\t\t\treturn filteredApps;\r\n\t\t}\r\n\r\n\t\treturn filteredApps.filter(\r\n\t\t\t({ displayName, name }) =>\r\n\t\t\t\tdisplayName?.toLowerCase().includes(this.state.filterText.toLowerCase()) ??\r\n\t\t\t\tname?.toLowerCase().includes(this.state.filterText.toLowerCase())\r\n\t\t);\r\n\t}\r\n\r\n\tfilterAppsByTags(apps) {\r\n\t\tif (!this.state.tags) {\r\n\t\t\treturn apps;\r\n\t\t}\r\n\t\t//All active tags must be present in an app for it to show\r\n\t\treturn apps.filter((app) => {\r\n\t\t\tfor (let i = 0; i < this.state.tags.length; i++) {\r\n\t\t\t\tlet tag = this.state.tags[i];\r\n\t\t\t\tif (!app.tags.includes(tag)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t});\r\n\t}\r\n\r\n\tonActiveFolderChanged(error, data) {\r\n\t\tthis.setState({\r\n\t\t\tfolder: storeActions.getActiveFolder(),\r\n\t\t});\r\n\t}\r\n\r\n\tonSearch(error, data) {\r\n\t\tthis.setState({\r\n\t\t\tfilterText: data.value,\r\n\t\t});\r\n\t}\r\n\r\n\tonSort(error, data) {\r\n\t\tthis.setState({\r\n\t\t\tsortBy: data.value,\r\n\t\t});\r\n\t}\r\n\r\n\tonTagsUpdate(error, data) {\r\n\t\tthis.setState({\r\n\t\t\ttags: data.value,\r\n\t\t});\r\n\t}\r\n\t/**\r\n\t * Mainly used to know when a user remove an app from a folder\r\n\t * Because there is no way to subscribe to\r\n\t * folders[index].appDefinitions updates.\r\n\t */\r\n\tonAppListUpdate(error, data) {\r\n\t\tthis.setState({\r\n\t\t\tfolder: storeActions.getActiveFolder(),\r\n\t\t});\r\n\t}\r\n\r\n\tonAppLauncherUpdate() {\r\n\t\tthis.setState({\r\n\t\t\tapps: storeActions.getApps(),\r\n\t\t});\r\n\t}\r\n\r\n\tupdateAppDefinitions(err, response) {\r\n\t\tFSBL.Clients.Logger.debug(\"list updated\", err, response);\r\n\t\tif (err) {\r\n\t\t\treturn console.error(err);\r\n\t\t}\r\n\t\tstoreActions.refreshAppDefinitions(response.data.componentList);\r\n\t\tthis.onAppListUpdate(err);\r\n\t}\r\n\r\n\tcomponentDidMount() {\r\n\t\t//this.setStateValues();\r\n\t\tstore.addListener({ field: \"activeFolder\" }, this.onActiveFolderChanged);\r\n\t\tstore.addListener({ field: \"filterText\" }, this.onSearch);\r\n\t\tstore.addListener({ field: \"sortBy\" }, this.onSort);\r\n\t\tstore.addListener({ field: \"activeLauncherTags\" }, this.onTagsUpdate);\r\n\t\t// We can't subscribe to folders[index].appDefinitions\r\n\t\t// So we are looking at appFolders.folders update\r\n\t\t// Since that update is done After removing an app of definitions\r\n\t\tstore.addListener({ field: \"appFolders.folders\" }, this.onAppListUpdate);\r\n\r\n\t\tstore.addListener({ field: \"appDefinitions\" }, this.onAppLauncherUpdate);\r\n\t\tthis.routerSubscription = FSBL.Clients.RouterClient.subscribe(\"Launcher.update\", this.updateAppDefinitions);\r\n\t}\r\n\r\n\tcomponentWillUnmount() {\r\n\t\tstore.removeListener({ field: \"activeFolder\" }, this.onActiveFolderChanged);\r\n\t\tstore.removeListener({ field: \"filterText\" }, this.onSearch);\r\n\t\tstore.removeListener({ field: \"sortBy\" }, this.onSort);\r\n\t\tstore.removeListener({ field: \"activeLauncherTags\" }, this.onTagsUpdate);\r\n\t\tstore.removeListener({ field: \"appFolders.folders\" }, this.onAppListUpdate);\r\n\r\n\t\tstore.removeListener({ field: \"appDefinitions\" }, this.onAppLauncherUpdate);\r\n\t\tFSBL.Clients.RouterClient.unsubscribe(this.routerSubscription.subscribeID);\r\n\t}\r\n\r\n\trenderAppList() {\r\n\t\treturn this.filterApps().map((app, index) => {\r\n\t\t\treturn <AppDefinition app={app} folder={this.state.folder} key={index} />;\r\n\t\t});\r\n\t}\r\n\r\n\tgetNoResultsMessage() {\r\n\t\tconst messages = {\r\n\t\t\tsearch: [\"No results found. Please try again.\"],\r\n\t\t\tFavorites: [\"There’s nothing here!\", <br key={1} />, \"Add apps to Favorites to view them here.\"],\r\n\t\t\t//Dashboards: ['There’s nothing here!', <br />, 'Press “New Dashboard” to construct an Dashboard.'],\r\n\t\t\tdefault: [\"There’s nothing here!\", <br key={2} />, \"Add apps to folders to view them here.\"],\r\n\t\t};\r\n\t\tif (!this.state.folder) {\r\n\t\t\treturn [\"Loading data...\", <br key={3} />];\r\n\t\t}\r\n\t\t// User is searching so we need the search message\r\n\t\tif (this.state.filterText || this.state.tags.length) {\r\n\t\t\treturn messages.search;\r\n\t\t}\r\n\t\t// Now let's check which folder is currently active\r\n\t\tswitch (this.state.folder.name) {\r\n\t\t\tcase \"Favorites\":\r\n\t\t\t\treturn messages.Favorites;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Dashboards\":\r\n\t\t\t\treturn messages.Dashboards;\r\n\t\t\tdefault:\r\n\t\t\t\treturn messages.default;\r\n\t\t}\r\n\t}\r\n\r\n\trender() {\r\n\t\tconst apps = this.renderAppList();\r\n\t\treturn (\r\n\t\t\t<div className=\"complex-menu-content-row\">\r\n\t\t\t\t<FilterSort></FilterSort>\r\n\t\t\t\t<div className=\"item-wrapper\">{apps.length ? apps : <NoAppsFound message={this.getNoResultsMessage()} />}</div>\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"Content.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/Content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,aAAa,MAAM,yBAAyB,CAAC;AAIpD,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAErD,MAAc,CAAC,YAAY,GAAG,YAAY,CAAC;AAE5C,IAAI,KAA6B,CAAC;AAWlC,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,KAAK,CAAC,SAAyB;IAGnE,YAAY,KAAa;QACxB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,IAAI,EAAE,YAAY,CAAC,OAAO,EAAE;YAC5B,IAAI,EAAE,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B,KAAK,WAAW;gBACf,OAAO,QAAQ,CAAC,SAAS,CAAC;gBAC1B,MAAM;YACP,KAAK,YAAY;gBAChB,OAAO,CAAC,EAAE,CAAC,CAAC;YAEb;gBACC,OAAO,QAAQ,CAAC,OAAO,CAAC;SACzB;IACF,CAAC;IAED,MAAM;QACL,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QAClC,OAAO,CACN,6BAAK,SAAS,EAAC,0BAA0B;YACxC,oBAAC,UAAU,OAAc;YACzB,6BAAK,SAAS,EAAC,cAAc,IAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,oBAAC,WAAW,IAAC,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAE,GAAI,CAAO,CAC1G,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\r\nimport AppDefinition from \"./AppDefinition\";\r\nimport NoAppsFound from \"./NoAppsFound\";\r\nimport FilterSort from \"./FilterSort\";\r\nimport { getStore } from \"../stores/LauncherStore\";\r\nimport storeActions from \"../stores/StoreActions\";\r\nimport sortFunctions from \"../utils/sort-functions\";\r\nimport StoreModel from \"@finsemble/finsemble-core/types/clients/StoreModel\";\r\nimport { FolderAppType, FolderType } from \"../../../../types/advancedAppLauncherTypes\";\r\nimport { StandardError } from \"@finsemble/finsemble-core/types/types\";\r\nconst ADVANCED_APP_LAUNCHER = \"Advanced App Launcher\";\r\n\r\n(window as any).storeActions = storeActions;\r\n// To be assigned a value later in the constructor\r\nlet store: StoreModel | undefined;\r\n\r\ninterface IProps {}\r\ninterface IState {\r\n\tapps: any;\r\n\ttags: any;\r\n\tsortBy: keyof typeof sortFunctions;\r\n\tfilterText: string;\r\n\tfolder: FolderType;\r\n}\r\n\r\nexport default class Content extends React.Component<IProps, IState> {\r\n\trouterSubscription: any;\r\n\r\n\tconstructor(props: IProps) {\r\n\t\tsuper(props);\r\n\t\tthis.state = {\r\n\t\t\tapps: storeActions.getApps(),\r\n\t\t\ttags: storeActions.getTags(),\r\n\t\t\tsortBy: storeActions.getSortBy(),\r\n\t\t\tfilterText: storeActions.getSearchText().toLowerCase(),\r\n\t\t\tfolder: storeActions.getActiveFolder(),\r\n\t\t};\r\n\t\tthis.onSort = this.onSort.bind(this);\r\n\t\tthis.onSearch = this.onSearch.bind(this);\r\n\t\tthis.onTagsUpdate = this.onTagsUpdate.bind(this);\r\n\t\tthis.onActiveFolderChanged = this.onActiveFolderChanged.bind(this);\r\n\t\tthis.onAppListUpdate = this.onAppListUpdate.bind(this);\r\n\t\tthis.onAppLauncherUpdate = this.onAppLauncherUpdate.bind(this);\r\n\t\tthis.updateAppDefinitions = this.updateAppDefinitions.bind(this);\r\n\t\tstore = getStore();\r\n\t}\r\n\r\n\t_setFolderState() {\r\n\t\tthis.setState({\r\n\t\t\tfolder: storeActions.getActiveFolder(),\r\n\t\t});\r\n\t}\r\n\r\n\tfilterApps() {\r\n\t\tconst { folder } = this.state;\r\n\t\tlet apps: FolderAppType[] =\r\n\t\t\tfolder.name === ADVANCED_APP_LAUNCHER ? Object.values(storeActions.getAllApps()) : folder.apps;\r\n\r\n\t\tif (!folder || !apps) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\t\tconst sortFunc = sortFunctions[this.state.sortBy];\r\n\t\tconst filteredApps: FolderAppType[] = this.filterAppsByTags(sortFunc(apps));\r\n\t\tif (!this.state.filterText) {\r\n\t\t\treturn filteredApps;\r\n\t\t}\r\n\r\n\t\treturn filteredApps.filter(\r\n\t\t\t({ displayName, name }: FolderAppType) =>\r\n\t\t\t\tdisplayName?.toLowerCase().includes(this.state.filterText.toLowerCase()) ??\r\n\t\t\t\tname?.toLowerCase().includes(this.state.filterText.toLowerCase())\r\n\t\t);\r\n\t}\r\n\r\n\tfilterAppsByTags(apps: FolderAppType[]) {\r\n\t\tif (!this.state.tags) {\r\n\t\t\treturn apps;\r\n\t\t}\r\n\t\t//All active tags must be present in an app for it to show\r\n\t\treturn apps.filter((app) => {\r\n\t\t\tfor (let i = 0; i < this.state.tags.length; i++) {\r\n\t\t\t\tlet tag = this.state.tags[i];\r\n\t\t\t\tif (!app.tags?.includes(tag)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t});\r\n\t}\r\n\r\n\tonActiveFolderChanged() {\r\n\t\t// Quick fix for release 6.3.0\r\n\t\t// There are 2 listeners for \"activeFolder\". One in this file, the other is in packages\\ui\\src\\components\\toolbar\\advancedAppLauncher\\stores\\StoreActions.ts\r\n\t\t// The first listener is invoked earlier with nonupdated 'activeFolder' value in the storeActions. So I use a timeout to change this.\r\n\t\t// Otherwise, for correct re-rendering, we need to do double-click on the left folders panel.\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis._setFolderState();\r\n\t\t}, 50);\r\n\t}\r\n\r\n\tonSearch(error: StandardError, data: any) {\r\n\t\tthis.setState({\r\n\t\t\tfilterText: data.value,\r\n\t\t});\r\n\t}\r\n\r\n\tonSort(error: StandardError, data: any) {\r\n\t\tthis.setState({\r\n\t\t\tsortBy: data.value,\r\n\t\t});\r\n\t}\r\n\r\n\tonTagsUpdate(error: StandardError, data: any) {\r\n\t\tthis.setState({\r\n\t\t\ttags: data.value,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Mainly used to know when a user remove an app from a folder\r\n\t * Because there is no way to subscribe to\r\n\t * folders[index].appDefinitions updates.\r\n\t */\r\n\tonAppListUpdate() {\r\n\t\tthis._setFolderState();\r\n\t}\r\n\r\n\tonAppLauncherUpdate() {\r\n\t\tthis.setState({\r\n\t\t\tapps: storeActions.getApps(),\r\n\t\t});\r\n\t}\r\n\r\n\tupdateAppDefinitions(err: StandardError, response: any) {\r\n\t\tFSBL.Clients.Logger.system.debug(\"list updated\", err, response);\r\n\t\tif (err) {\r\n\t\t\treturn console.error(err);\r\n\t\t}\r\n\t\tstoreActions.refreshAppDefinitions(response.data.componentList);\r\n\t\tthis.onAppListUpdate();\r\n\t}\r\n\r\n\tcomponentDidMount() {\r\n\t\t//this.setStateValues();\r\n\t\tstore?.addListener({ field: \"activeFolder\" }, this.onActiveFolderChanged);\r\n\t\tstore?.addListener({ field: \"filterText\" }, this.onSearch);\r\n\t\tstore?.addListener({ field: \"sortBy\" }, this.onSort);\r\n\t\tstore?.addListener({ field: \"activeLauncherTags\" }, this.onTagsUpdate);\r\n\t\t// We can't subscribe to folders[index].appDefinitions\r\n\t\t// So we are looking at appFolders.folders update\r\n\t\t// Since that update is done After removing an app of definitions\r\n\t\tstore?.addListener({ field: \"appFolders.folders\" }, this.onAppListUpdate);\r\n\r\n\t\tstore?.addListener({ field: \"appDefinitions\" }, this.onAppLauncherUpdate);\r\n\t\tthis.routerSubscription = FSBL.Clients.RouterClient.subscribe(\"Launcher.update\", this.updateAppDefinitions);\r\n\t}\r\n\r\n\tcomponentWillUnmount() {\r\n\t\tstore?.removeListener({ field: \"activeFolder\" }, this.onActiveFolderChanged);\r\n\t\tstore?.removeListener({ field: \"filterText\" }, this.onSearch);\r\n\t\tstore?.removeListener({ field: \"sortBy\" }, this.onSort);\r\n\t\tstore?.removeListener({ field: \"activeLauncherTags\" }, this.onTagsUpdate);\r\n\t\tstore?.removeListener({ field: \"appFolders.folders\" }, this.onAppListUpdate);\r\n\r\n\t\tstore?.removeListener({ field: \"appDefinitions\" }, this.onAppLauncherUpdate);\r\n\t\tFSBL.Clients.RouterClient.unsubscribe(this.routerSubscription.subscribeID);\r\n\t}\r\n\r\n\trenderAppList() {\r\n\t\treturn this.filterApps().map((app, index) => <AppDefinition app={app} folder={this.state.folder} key={index} />);\r\n\t}\r\n\r\n\tgetNoResultsMessage() {\r\n\t\tconst messages = {\r\n\t\t\tsearch: [\"No results found. Please try again.\"],\r\n\t\t\tFavorites: [\"There’s nothing here!\", <br key={1} />, \"Add apps to Favorites to view them here.\"],\r\n\t\t\t//Dashboards: ['There’s nothing here!', <br />, 'Press “New Dashboard” to construct an Dashboard.'],\r\n\t\t\tdefault: [\"There’s nothing here!\", <br key={2} />, \"Add apps to folders to view them here.\"],\r\n\t\t};\r\n\t\tif (!this.state.folder) {\r\n\t\t\treturn [\"Loading data...\", <br key={3} />];\r\n\t\t}\r\n\t\t// User is searching so we need the search message\r\n\t\tif (this.state.filterText || this.state.tags.length) {\r\n\t\t\treturn messages.search;\r\n\t\t}\r\n\t\t// Now let's check which folder is currently active\r\n\t\tswitch (this.state.folder.name) {\r\n\t\t\tcase \"Favorites\":\r\n\t\t\t\treturn messages.Favorites;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Dashboards\":\r\n\t\t\t\treturn [\"\"];\r\n\t\t\t// return messages.Dashboards;\r\n\t\t\tdefault:\r\n\t\t\t\treturn messages.default;\r\n\t\t}\r\n\t}\r\n\r\n\trender() {\r\n\t\tconst apps = this.renderAppList();\r\n\t\treturn (\r\n\t\t\t<div className=\"complex-menu-content-row\">\r\n\t\t\t\t<FilterSort></FilterSort>\r\n\t\t\t\t<div className=\"item-wrapper\">{apps.length ? apps : <NoAppsFound message={this.getNoResultsMessage()} />}</div>\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n}\r\n"]}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface IProps {
|
|
3
|
+
}
|
|
4
|
+
interface IState {
|
|
5
|
+
tags: string[];
|
|
6
|
+
search: string;
|
|
7
|
+
}
|
|
8
|
+
export default class FilterSort extends React.Component<IProps, IState> {
|
|
9
|
+
constructor(props: IProps);
|
|
4
10
|
setStateValues(): void;
|
|
5
|
-
|
|
11
|
+
onSearch(event: any): void;
|
|
12
|
+
onTagClick(tag: string): void;
|
|
13
|
+
componentDidMount(): void;
|
|
14
|
+
componentWillUnmount(): void;
|
|
15
|
+
render(): JSX.Element;
|
|
6
16
|
}
|
|
7
|
-
|
|
17
|
+
export {};
|
|
@@ -26,7 +26,8 @@ export default class FilterSort extends React.Component {
|
|
|
26
26
|
this.setState({
|
|
27
27
|
search: event.target.value,
|
|
28
28
|
}, () => {
|
|
29
|
-
|
|
29
|
+
var _a;
|
|
30
|
+
(_a = getStore()) === null || _a === void 0 ? void 0 : _a.setValue({
|
|
30
31
|
field: "filterText",
|
|
31
32
|
value: this.state.search,
|
|
32
33
|
});
|
|
@@ -43,10 +44,10 @@ export default class FilterSort extends React.Component {
|
|
|
43
44
|
}
|
|
44
45
|
componentDidMount() {
|
|
45
46
|
this.setStateValues();
|
|
46
|
-
store.addListener({ field: "appFolders.folders" }, this.setStateValues);
|
|
47
|
+
store === null || store === void 0 ? void 0 : store.addListener({ field: "appFolders.folders" }, this.setStateValues);
|
|
47
48
|
}
|
|
48
49
|
componentWillUnmount() {
|
|
49
|
-
store.removeListener({ field: "appFolders.folders" }, this.setStateValues);
|
|
50
|
+
store === null || store === void 0 ? void 0 : store.removeListener({ field: "appFolders.folders" }, this.setStateValues);
|
|
50
51
|
}
|
|
51
52
|
render() {
|
|
52
53
|
let activeTags = storeActions.getTags();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterSort.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/FilterSort.
|
|
1
|
+
{"version":3,"file":"FilterSort.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/FilterSort.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAUlD,IAAI,KAA6B,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,KAAK,CAAC,SAAyB;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nB,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,cAAc,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;IAC7E,CAAC;IAED,MAAM;QACL,IAAI,UAAU,GAAG,YAAY,CAAC,OAAO,EAAE,CAAC;QACxC,OAAO,CACN,6BAAK,SAAS,EAAC,aAAa;YAC3B,oBAAC,SAAS,OAAG;YACb,oBAAC,QAAQ,OAAG;YACZ,oBAAC,MAAM,OAAG;YACV,oBAAC,QAAQ,IAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAC,OAAO,EAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,CAAC,UAAU,GAAI,CAC3G,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\r\nimport SearchBox from \"./SearchBox\";\r\nimport TagsMenu from \"../../../shared/TagsMenu\";\r\nimport SortBy from \"./SortBy\";\r\nimport TagsList from \"./TagsList\";\r\nimport { getStore } from \"../stores/LauncherStore\";\r\nimport storeActions from \"../stores/StoreActions\";\r\nimport StoreModel from \"@finsemble/finsemble-core/types/clients/StoreModel\";\r\n\r\ninterface IProps {}\r\n\r\ninterface IState {\r\n\ttags: string[];\r\n\tsearch: string;\r\n}\r\n\r\nlet store: StoreModel | undefined;\r\n\r\nexport default class FilterSort extends React.Component<IProps, IState> {\r\n\tconstructor(props: IProps) {\r\n\t\tsuper(props);\r\n\t\tthis.state = {\r\n\t\t\ttags: [],\r\n\t\t\tsearch: \"\",\r\n\t\t};\r\n\t\tthis.onSearch = this.onSearch.bind(this);\r\n\t\tthis.setStateValues = this.setStateValues.bind(this);\r\n\t\tstore = getStore();\r\n\t}\r\n\r\n\tsetStateValues() {\r\n\t\tthis.setState({\r\n\t\t\ttags: storeActions.getAllAppsTags(),\r\n\t\t});\r\n\t}\r\n\r\n\tonSearch(event: any) {\r\n\t\tthis.setState(\r\n\t\t\t{\r\n\t\t\t\tsearch: event.target.value,\r\n\t\t\t},\r\n\t\t\t() => {\r\n\t\t\t\tgetStore()?.setValue({\r\n\t\t\t\t\tfield: \"filterText\",\r\n\t\t\t\t\tvalue: this.state.search,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Add tag to list in local store\r\n\t * so that other components get notified\r\n\t **/\r\n\tonTagClick(tag: string) {\r\n\t\tlet tags = storeActions.getTags();\r\n\r\n\t\tif (tags.includes(tag)) {\r\n\t\t\tstoreActions.deleteTag(tag);\r\n\t\t} else {\r\n\t\t\tstoreActions.addTag(tag);\r\n\t\t}\r\n\t}\r\n\r\n\tcomponentDidMount() {\r\n\t\tthis.setStateValues();\r\n\t\tstore?.addListener({ field: \"appFolders.folders\" }, this.setStateValues);\r\n\t}\r\n\r\n\tcomponentWillUnmount() {\r\n\t\tstore?.removeListener({ field: \"appFolders.folders\" }, this.setStateValues);\r\n\t}\r\n\r\n\trender() {\r\n\t\tlet activeTags = storeActions.getTags();\r\n\t\treturn (\r\n\t\t\t<div className=\"filter-sort\">\r\n\t\t\t\t<SearchBox />\r\n\t\t\t\t<TagsList />\r\n\t\t\t\t<SortBy />\r\n\t\t\t\t<TagsMenu label=\"Tags\" align=\"right\" list={this.state.tags} active={activeTags} onItemClick={this.onTagClick} />\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n}\r\n"]}
|