@finsemble/finsemble-ui 6.2.0 → 6.3.0-beta.20211008
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 +17 -16
- 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/notificationsCenter.css +4 -2
- package/react/assets/css/userPreferences.css +1 -0
- package/react/assets/css/windowTitleBar.css +33 -1
- package/react/components/FinsembleProvider.js +1 -1
- package/react/components/FinsembleProvider.js.map +1 -1
- 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 -4
- package/react/components/appCatalog/components/Toast.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 +20 -18
- 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.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 +8 -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/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 +18 -17
- 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 +6 -3
- 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/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 +2 -4
- 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 +28 -43
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +10 -9
- 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 +1 -1
- 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/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 +17 -10
- 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 +19 -10
- package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
- package/react/components/processMonitor/components/ListHeader.d.ts +17 -4
- 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 +25 -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 +3 -1
- package/react/components/processMonitor/constants.js.map +1 -1
- package/react/components/processMonitor/helpers.d.ts +25 -5
- package/react/components/processMonitor/helpers.js +28 -20
- 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 +30 -15
- package/react/components/processMonitor/stores/ProcessMonitorStore.js +101 -86
- 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 +13 -14
- 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 +2 -1
- 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 +1 -1
- 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/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 +4 -4
- package/react/components/smartDesktopDesigner/Application.js +84 -92
- package/react/components/smartDesktopDesigner/Application.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationEdit.d.ts +1 -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 +0 -1
- 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 +11 -24
- 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 -1
- package/react/components/smartDesktopDesigner/common/getCSSVars.js +2 -1
- 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 +4 -14
- package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js +4 -4
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js +2 -2
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js +2 -3
- package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/apps.d.ts +4 -70
- package/react/components/smartDesktopDesigner/fixtures/apps.js +9 -20
- package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
- 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/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 +8 -8
- 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 +7 -14
- 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 +2 -1
- 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 +24 -3
- 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 +5 -4
- 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 -2
- package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/Content.d.ts +34 -13
- package/react/components/toolbar/advancedAppLauncher/components/Content.js +23 -29
- 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 +13 -8
- 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 +7 -3
- 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.d.ts +5 -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.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.js +5 -4
- 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 +3 -10
- 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 +24 -21
- 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 +37 -55
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
- package/react/components/toolbar/dashbar/Dashbar.js +2 -3
- package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
- package/react/components/toolbar/dashbar/DashbarItem.js +1 -1
- 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 +65 -11
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +95 -145
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
- 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 +2 -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 +1 -1
- 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.js +21 -10
- 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.js +15 -8
- 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 +9 -16
- 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 +1 -1
- 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 +27 -7
- package/react/components/windowTitleBar/components/center/Tab.js +2 -2
- 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 +111 -37
- 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/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 +1 -21
- 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.js +11 -6
- package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts +51 -44
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js +63 -56
- 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.map +1 -1
- package/react/hooks/useLinker.js +1 -1
- package/react/hooks/useLinker.js.map +1 -1
- package/react/hooks/useMenu.js +1 -1
- package/react/hooks/useMenu.js.map +1 -1
- package/react/hooks/useNotifications.d.ts +6 -6
- package/react/hooks/useNotifications.js +16 -17
- package/react/hooks/useNotifications.js.map +1 -1
- package/react/hooks/useSearch.js +1 -1
- package/react/hooks/useSearch.js.map +1 -1
- 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/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/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/smartDesktopDesignerTypes.d.ts +11 -9
- package/react/types/smartDesktopDesignerTypes.js.map +1 -1
- package/react/types/windowTitleBar.d.ts +46 -0
- package/react/types/windowTitleBar.js +2 -0
- package/react/types/windowTitleBar.js.map +1 -0
- 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/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,11 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
export default class FDC3 extends React.Component {
|
|
3
|
+
constructor(props) {
|
|
4
|
+
super(props);
|
|
5
|
+
if (!this.props.config.url) {
|
|
4
6
|
throw new Error("Please specify the url of the app directory.");
|
|
5
7
|
}
|
|
6
|
-
this.creds = creds;
|
|
8
|
+
this.creds = this.props.creds;
|
|
7
9
|
this.config = {
|
|
8
|
-
url: config.url.replace(/\/+$/, ""),
|
|
10
|
+
url: this.props.config.url.replace(/\/+$/, ""),
|
|
9
11
|
};
|
|
10
12
|
}
|
|
11
13
|
_get(path, done) {
|
|
@@ -59,10 +61,10 @@ export default class FDC3 {
|
|
|
59
61
|
reject(error);
|
|
60
62
|
}
|
|
61
63
|
else {
|
|
62
|
-
resolve(data.applications);
|
|
64
|
+
resolve(data === null || data === void 0 ? void 0 : data.applications);
|
|
63
65
|
}
|
|
64
66
|
if (callback) {
|
|
65
|
-
callback(error,
|
|
67
|
+
callback(error, (data === null || data === void 0 ? void 0 : data.applications) || []);
|
|
66
68
|
}
|
|
67
69
|
});
|
|
68
70
|
});
|
|
@@ -73,11 +75,11 @@ export default class FDC3 {
|
|
|
73
75
|
if (error) {
|
|
74
76
|
reject(error);
|
|
75
77
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
if (callback && (data === null || data === void 0 ? void 0 : data.applications)) {
|
|
79
|
+
callback(null, data.applications[0]);
|
|
78
80
|
}
|
|
79
|
-
if (
|
|
80
|
-
|
|
81
|
+
if (data === null || data === void 0 ? void 0 : data.applications) {
|
|
82
|
+
resolve(data.applications[0]);
|
|
81
83
|
}
|
|
82
84
|
});
|
|
83
85
|
});
|
|
@@ -88,11 +90,11 @@ export default class FDC3 {
|
|
|
88
90
|
if (error) {
|
|
89
91
|
reject(error);
|
|
90
92
|
}
|
|
91
|
-
else {
|
|
93
|
+
else if (data) {
|
|
92
94
|
resolve(data.tags);
|
|
93
95
|
}
|
|
94
|
-
if (callback) {
|
|
95
|
-
callback(
|
|
96
|
+
if (callback && data) {
|
|
97
|
+
callback(null, data.tags);
|
|
96
98
|
}
|
|
97
99
|
});
|
|
98
100
|
});
|
|
@@ -103,11 +105,11 @@ export default class FDC3 {
|
|
|
103
105
|
if (error) {
|
|
104
106
|
reject(error);
|
|
105
107
|
}
|
|
106
|
-
else {
|
|
107
|
-
resolve(data.applications);
|
|
108
|
-
}
|
|
109
108
|
if (callback) {
|
|
110
|
-
callback(
|
|
109
|
+
callback(null, data === null || data === void 0 ? void 0 : data.applications);
|
|
110
|
+
}
|
|
111
|
+
else if (data) {
|
|
112
|
+
resolve(data.applications);
|
|
111
113
|
}
|
|
112
114
|
});
|
|
113
115
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FDC3.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/modules/FDC3.
|
|
1
|
+
{"version":3,"file":"FDC3.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/modules/FDC3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAmB1B,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,KAAK,CAAC,SAAoB;IAK3D,YAAY,KAAgB;QAC3B,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE;YAC3B,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;SAChE;QACD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;QAC9B,IAAI,CAAC,MAAM,GAAG;YACb,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;SAC9C,CAAC;IACH,CAAC;IAOD,IAAI,CAAC,IAAY,EAAE,IAAqB;QACvC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,IAAI,EAAE;YAC7B,MAAM,EAAE,KAAK;SACb,CAAC;aACA,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YAClB,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;gBAE7B,IAAI,QAAQ,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,CAAC,CAAC;iBACd;qBAAM,IAAI,IAAI,EAAE;oBAChB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;iBACnB;gBACD,IAAI,QAAQ,IAAI,IAAI,EAAE;oBACrB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;iBAC1B;YACF,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC;IAQD,MAAM,CAAC,MAA8B,EAAE,QAA4B;QAClE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACtC,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,MAAM,EAAE,CAAC,KAAqB,EAAE,IAA0B,EAAE,EAAE;gBACxF,IAAI,KAAK,EAAE;oBACV,MAAM,CAAC,KAAK,CAAC,CAAC;iBACd;gBAED,IAAI,QAAQ,EAAE;oBACb,QAAQ,CAAC,IAAI,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,YAAY,CAAC,CAAC;iBACnC;qBAAM,IAAI,IAAI,EAAE;oBAChB,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;iBAC3B;YACF,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC;CACD","sourcesContent":["import React from \"react\";\r\nimport {\r\n\tFDC3Props,\r\n\tFDC3PostCallback,\r\n\tFDC3SearchCallback,\r\n\tFDC3GetCallback,\r\n\tErrorOrMessage,\r\n\tFDC3PostCallbackData,\r\n} from \"../../../types/fdc3\";\r\nimport { StandardError } from \"@finsemble/finsemble-core/types/types\";\r\n\r\n/**\r\n * Copyright 2018 by ChartIQ, Inc.\r\n * All rights reserved.\r\n *\r\n * FDC3 App directory client, I will be using fetch()\r\n * to make calls to the appd web service, even though I'm\r\n * not sure where did fetch() come from, will investigate later\r\n */\r\nexport default class FDC3 extends React.Component<FDC3Props> {\r\n\tcreds: {};\r\n\r\n\tconfig: FDC3Props[\"config\"];\r\n\r\n\tconstructor(props: FDC3Props) {\r\n\t\tsuper(props);\r\n\t\tif (!this.props.config.url) {\r\n\t\t\tthrow new Error(\"Please specify the url of the app directory.\");\r\n\t\t}\r\n\t\tthis.creds = this.props.creds;\r\n\t\tthis.config = {\r\n\t\t\turl: this.props.config.url.replace(/\\/+$/, \"\"),\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Http get wrapper\r\n\t * @param {string} path The restful method path\r\n\t * @param {function} done The callback function\r\n\t */\r\n\t_get(path: string, done: FDC3GetCallback) {\r\n\t\tfetch(this.config.url + path, {\r\n\t\t\tmethod: \"GET\",\r\n\t\t})\r\n\t\t\t.then((response) => {\r\n\t\t\t\tresponse.json().then((data) => {\r\n\t\t\t\t\t// We are expecting 200 here for data\r\n\t\t\t\t\tif (response.status !== 200) {\r\n\t\t\t\t\t\t// We have a problem, data as error message\r\n\t\t\t\t\t\tdone(data);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// All good, no problem\r\n\t\t\t\t\t\tdone(null, data);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t})\r\n\t\t\t.catch((error) => {\r\n\t\t\t\tdone({\r\n\t\t\t\t\tmessage: `Request failed ${error.message}`,\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t *\r\n\t * @param {string} path The restful method path\r\n\t * @param {object} params The post data\r\n\t * @param {function} done The callback function\r\n\t */\r\n\t_post(path: string, params: Record<string, string>, done: FDC3PostCallback) {\r\n\t\tfetch(this.config.url + path, {\r\n\t\t\tmethod: \"POST\",\r\n\t\t\tbody: JSON.stringify(params),\r\n\t\t\theaders: {\r\n\t\t\t\t\"Content-Type\": \"application/json\",\r\n\t\t\t},\r\n\t\t})\r\n\t\t\t.then((response) => {\r\n\t\t\t\tresponse.json().then((data) => {\r\n\t\t\t\t\t// We are expecting 200 here for data\r\n\t\t\t\t\tif (response.status !== 200) {\r\n\t\t\t\t\t\t// We have a problem, data as error message\r\n\t\t\t\t\t\tdone(data);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// All good, no problem\r\n\t\t\t\t\t\tdone(null, data);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t})\r\n\t\t\t.catch((error) => {\r\n\t\t\t\tdone({\r\n\t\t\t\t\tmessage: `Request failed ${error.message}`,\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Returns all applications\r\n\t * @param {function} callback The optional callback function\r\n\t */\r\n\tgetAll(callback: (arg1: Record<string, string> | null, applications: string[]) => void) {\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis._get(\"/apps/\", (error, data) => {\r\n\t\t\t\tif (error) {\r\n\t\t\t\t\treject(error);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresolve(data?.applications);\r\n\t\t\t\t}\r\n\t\t\t\tif (callback) {\r\n\t\t\t\t\tcallback(error, data?.applications || []);\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 * Returns a single application in results\r\n\t * @param {string} appId The app id\r\n\t */\r\n\tget(appId: string, callback: (error: StandardError, application: string) => void) {\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis._get(`/apps/${appId}`, (error, data) => {\r\n\t\t\t\tif (error) {\r\n\t\t\t\t\treject(error);\r\n\t\t\t\t}\r\n\t\t\t\tif (callback && data?.applications) {\r\n\t\t\t\t\tcallback(null, data.applications[0]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (data?.applications) {\r\n\t\t\t\t\tresolve(data.applications[0]);\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 * Returns unique tags\r\n\t * @param {function} callback The optional callback function\r\n\t */\r\n\tgetTags(callback: (error: StandardError, results: string[]) => void) {\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis._get(\"/tags/\", (error, data) => {\r\n\t\t\t\tif (error) {\r\n\t\t\t\t\treject(error);\r\n\t\t\t\t} else if (data) {\r\n\t\t\t\t\tresolve(data.tags);\r\n\t\t\t\t}\r\n\t\t\t\tif (callback && data) {\r\n\t\t\t\t\tcallback(null, data.tags);\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 * Returns a list of applications based on text and filter\r\n\t * @param {object} params The search criteria\r\n\t * @param {function} callback The callback function\r\n\t * @example search({text: 'blah', filter: {tag: 'newrelease'}})\r\n\t */\r\n\tsearch(params: Record<string, string>, callback: FDC3SearchCallback) {\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis._post(\"/apps/search\", params, (error: ErrorOrMessage, data: FDC3PostCallbackData) => {\r\n\t\t\t\tif (error) {\r\n\t\t\t\t\treject(error);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (callback) {\r\n\t\t\t\t\tcallback(null, data?.applications);\r\n\t\t\t\t} else if (data) {\r\n\t\t\t\t\tresolve(data.applications);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n}\r\n"]}
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2018 by ChartIQ, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*/
|
|
5
|
+
import StoreModel from "@finsemble/finsemble-core/types/clients/StoreModel";
|
|
6
|
+
import { StandardCallback } from "@finsemble/finsemble-core/types/types";
|
|
7
|
+
export { createStore, getStore };
|
|
8
|
+
declare function createStore(cb: StandardCallback): void;
|
|
9
|
+
declare function getStore(): StoreModel;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2018 by ChartIQ, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*/
|
|
1
5
|
export { createStore, getStore };
|
|
2
6
|
const defaultValues = [
|
|
3
7
|
{
|
|
@@ -28,10 +32,12 @@ const defaultValues = [
|
|
|
28
32
|
let appCatalogStore;
|
|
29
33
|
function createStore(cb) {
|
|
30
34
|
FSBL.Clients.DistributedStoreClient.getStore({ store: "Finsemble-AppLauncher-Store", global: true }, (err, store) => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
if (store) {
|
|
36
|
+
appCatalogStore = store;
|
|
37
|
+
appCatalogStore.setValues(defaultValues, () => {
|
|
38
|
+
cb(null, appCatalogStore);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
35
41
|
});
|
|
36
42
|
}
|
|
37
43
|
function getStore() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appStore.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/stores/appStore.
|
|
1
|
+
{"version":3,"file":"appStore.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/stores/appStore.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;AAEjC,MAAM,aAAa,GAAG;IACrB;QACC,KAAK,EAAE,MAAM;QACb,KAAK,EAAE,EAAE;KACT;IACD;QACC,KAAK,EAAE,cAAc;QACrB,KAAK,EAAE,EAAE;KACT;IACD;QACC,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,EAAE;KACT;IACD;QACC,KAAK,EAAE,WAAW;QAClB,KAAK,EAAE,IAAI;KACX;IACD;QACC,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,EAAE;KACT;IACD;QACC,KAAK,EAAE,aAAa;QACpB,KAAK,EAAE,KAAK;KACZ;CACD,CAAC;AAEF,IAAI,eAA2B,CAAC;AAEhC,SAAS,WAAW,CAAC,EAAoB;IACxC,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAC3C,EAAE,KAAK,EAAE,6BAA6B,EAAE,MAAM,EAAE,IAAI,EAAE,EACtD,CAAC,GAAkB,EAAE,KAAkB,EAAE,EAAE;QAC1C,IAAI,KAAK,EAAE;YACV,eAAe,GAAG,KAAK,CAAC;YAGxB,eAAe,CAAC,SAAS,CAAC,aAAa,EAAE,GAAG,EAAE;gBAC7C,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;YAC3B,CAAC,CAAC,CAAC;SACH;IAEF,CAAC,CACD,CAAC;AACH,CAAC;AAED,SAAS,QAAQ;IAChB,OAAO,eAAe,CAAC;AACxB,CAAC","sourcesContent":["/*!\r\n * Copyright 2018 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport StoreModel from \"@finsemble/finsemble-core/types/clients/StoreModel\";\r\nimport { StandardCallback, StandardError } from \"@finsemble/finsemble-core/types/types\";\r\n\r\nexport { createStore, getStore };\r\n\r\nconst defaultValues = [\r\n\t{\r\n\t\tfield: \"apps\",\r\n\t\tvalue: [],\r\n\t},\r\n\t{\r\n\t\tfield: \"filteredApps\",\r\n\t\tvalue: [],\r\n\t},\r\n\t{\r\n\t\tfield: \"activeTags\",\r\n\t\tvalue: [],\r\n\t},\r\n\t{\r\n\t\tfield: \"activeApp\",\r\n\t\tvalue: null,\r\n\t},\r\n\t{\r\n\t\tfield: \"searchText\",\r\n\t\tvalue: \"\",\r\n\t},\r\n\t{\r\n\t\tfield: \"forceSearch\",\r\n\t\tvalue: false,\r\n\t},\r\n];\r\n\r\nlet appCatalogStore: StoreModel;\r\n\r\nfunction createStore(cb: StandardCallback) {\r\n\tFSBL.Clients.DistributedStoreClient.getStore(\r\n\t\t{ store: \"Finsemble-AppLauncher-Store\", global: true },\r\n\t\t(err: StandardError, store?: StoreModel) => {\r\n\t\t\tif (store) {\r\n\t\t\t\tappCatalogStore = store;\r\n\r\n\t\t\t\t// set default values before initializing the store with values from storage.\r\n\t\t\t\tappCatalogStore.setValues(defaultValues, () => {\r\n\t\t\t\t\tcb(null, appCatalogStore);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t// @todo: Provide error messaging if an undefined store is returned?\r\n\t\t}\r\n\t);\r\n}\r\n\r\nfunction getStore() {\r\n\treturn appCatalogStore;\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storeActions.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/stores/storeActions.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAMnC,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAItC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,CAClE,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;AAEnE,eAAe;IACd,UAAU;IACV,OAAO;IACP,eAAe;IACf,iBAAiB;IACjB,UAAU;IACV,aAAa;IACb,OAAO;IACP,MAAM;IACN,SAAS;IACT,gBAAgB;IAChB,SAAS;IACT,eAAe;IACf,MAAM;IACN,SAAS;IACT,OAAO;IACP,QAAQ;IACR,gBAAgB;IAChB,YAAY;IACZ,YAAY;IACZ,UAAU;IACV,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,MAAM;CACN,CAAC;AAEF,MAAM,IAAI,GAAG,EAAE,CAAC;AAChB,IAAI,UAAU,CAAC;AACf,IAAI,IAAI,CAAC;AAET,SAAS,UAAU,CAAC,IAAI,GAAG,QAAQ,CAAC,SAAS;IAC5C,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,gCAAgC,EAAE,EAAE,CAAC,GAAG,EAAE,oBAAoB,EAAE,EAAE;QAC7G,UAAU,GAAG,IAAI,IAAI,CAAC,EAAE,GAAG,EAAE,oBAAo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,CAClB;QACC,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,KAAK;KACZ,EACD,GAAG,EAAE;QACJ,UAAU,EAAE,CAAC;QACb,EAAE,EAAE,CAAC;IACN,CAAC,CACD,CAAC;AACH,CAAC","sourcesContent":["import { findIndex } from \"lodash\";\r\n\r\n/*!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\nimport AppDirectory from \"../modules/AppDirectory\";\r\nimport FDC3 from \"../modules/FDC3\";\r\nimport { getStore } from \"./appStore\";\r\nimport { findIndex } from \"lodash\";\r\nimport * as path from \"path\";\r\n\r\nexport const findAppIndexInFolder = (appID, folderName, folders) =>\r\n\tfindIndex(folders[folderName].apps, (app) => app.appID === appID);\r\n\r\nexport default {\r\n\tinitialize,\r\n\tgetApps,\r\n\tgetFilteredApps,\r\n\tclearFilteredApps,\r\n\tsearchApps,\r\n\tgetActiveTags,\r\n\tgetTags,\r\n\taddTag,\r\n\tremoveTag,\r\n\trefreshTagSearch,\r\n\tclearTags,\r\n\tclearSearchText,\r\n\taddApp,\r\n\tremoveApp,\r\n\topenApp,\r\n\tclearApp,\r\n\tgetInstalledApps,\r\n\tgetActiveApp,\r\n\tsetActiveApp,\r\n\tfilterApps,\r\n\tsetSearchValue,\r\n\tsetForceSearch,\r\n\tgetSearchValue,\r\n\tgetForceSearch,\r\n\tgoHome,\r\n};\r\n\r\nconst data = {};\r\nlet FDC3Client;\r\nlet appd;\r\n\r\nfunction initialize(done = Function.prototype) {\r\n\tFSBL.Clients.ConfigClient.getValue({ field: \"finsemble.appDirectoryEndpoint\" }, (err, appDirectoryEndpoint) => {\r\n\t\tFDC3Client = new FDC3({ url: appDirectoryEndpoint });\r\n\t\tappd = new AppDirectory(FDC3Client);\r\n\r\n\t\tconst store = getStore();\r\n\t\tdata.apps = store.values.apps;\r\n\t\tstore.getValue({ field: \"appFolders.folders\" }, (err, folders) => {\r\n\t\t\tdata.folders = folders;\r\n\t\t\tstore.addListener({ field: \"appFolders.folders\" }, (err, dt) => (data.folders = dt.value));\r\n\t\t});\r\n\t\tstore.getValue({ field: \"activeFolder\" }, (err, active) => {\r\n\t\t\tdata.activeFolder = active;\r\n\t\t\tstore.addListener({ field: \"activeFolder\" }, (err, dt) => (data.activeFolder = dt.value));\r\n\t\t});\r\n\t\tstore.getValue({ field: \"defaultFolder\" }, (err, folder) => {\r\n\t\t\tdata.defaultFolder = folder;\r\n\t\t});\r\n\r\n\t\tdata.installed = store.values.appDefinitions;\r\n\t\tdata.tags = store.values.tags;\r\n\t\tdata.filteredApps = store.values.filteredApps;\r\n\t\tdata.activeTags = store.values.activeTags;\r\n\t\tdata.activeApp = store.values.activeApp;\r\n\t\tdata.searchText = store.values.searchText;\r\n\t\tdata.forceSearch = store.values.forceSearch;\r\n\t\tdata.ADVANCED_APP_LAUNCHER = store.values.defaultFolder;\r\n\r\n\t\tstore.addListener({ field: \"apps\" }, (err, dt) => (data.apps = dt.value));\r\n\t\tstore.addListener({ field: \"appDefinitions\" }, (err, dt) => (data.installed = dt.value));\r\n\t\tstore.addListener({ field: \"tags\" }, (err, dt) => (data.tags = dt.value));\r\n\t\tstore.addListener({ field: \"activeApp\" }, (err, dt) => (data.activeApp = dt.value));\r\n\t\tstore.addListener({ field: \"activeTags\" }, (err, dt) => (data.activeTags = dt.value));\r\n\t\tstore.addListener({ field: \"filteredApps\" }, (err, dt) => (data.filteredApps = dt.value));\r\n\t\tstore.addListener({ field: \"searchText\" }, (err, dt) => (data.searchText = dt.value));\r\n\t\tstore.addListener({ field: \"forceSearch\" }, (err, dt) => (data.forceSearch = dt.value));\r\n\t\tdone();\r\n\t});\r\n}\r\n\r\n/**\r\n * Return to the App Catalog home page\r\n */\r\nfunction goHome() {\r\n\tsetForceSearch(false);\r\n\tclearFilteredApps();\r\n\tclearApp();\r\n\tclearTags();\r\n\tclearSearchText();\r\n}\r\n\r\n/**\r\n * Send the search text and tags to the appd server and get a list of apps\r\n */\r\nfunction filterApps() {\r\n\tlet { activeTags, searchText } = data;\r\n\r\n\tif (activeTags.length === 0 && searchText === \"\") {\r\n\t\tgoHome();\r\n\t} else {\r\n\t\tappd.search({ text: searchText, tags: activeTags }, (err, data) => {\r\n\t\t\tif (err) {\r\n\t\t\t\tFSBL.Logger.system.error(`FDC3 App search failed!: ${err}`);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tgetStore().setValue({ field: \"activeApp\", value: null });\r\n\t\t\tgetStore().setValue({ field: \"activeTags\", value: activeTags });\r\n\t\t\tgetStore().setValue({ field: \"filteredApps\", value: data });\r\n\t\t});\r\n\t}\r\n}\r\n\r\n/**\r\n * Private function to add an active tag. This will filter apps based on tags\r\n * @param {string} tag The name of the tag\r\n */\r\nfunction _addActiveTag(tag) {\r\n\tlet { activeTags } = data;\r\n\tif (!activeTags.includes(tag)) {\r\n\t\tactiveTags.push(tag);\r\n\t}\r\n\r\n\tgetStore().setValue({ field: \"activeTags\", value: activeTags }, filterApps());\r\n}\r\n\r\nfunction _findAppIndexInFolder(appID, folderName) {\r\n\treturn findIndex(data.folders[folderName].apps, (app) => app.appID === appID);\r\n}\r\n\r\n/**\r\n * Private function to remove an active tag. This will filter apps based on tags\r\n * @param {string} tag The name of the tag\r\n */\r\nfunction _removeActiveTag(tag) {\r\n\tdata.activeTags = data.activeTags.filter((currentTag) => currentTag !== tag);\r\n\r\n\tgetStore().setValue({ field: \"activeTags\", value: data.activeTags });\r\n\tfilterApps();\r\n}\r\n\r\n/**\r\n * Clears all active tags\r\n */\r\nfunction _clearActiveTags() {\r\n\tgetStore().setValue({ field: \"activeTags\", value: [] });\r\n}\r\n\r\n/**\r\n * Async function to fetch apps from the FDC3 api (appD)\r\n */\r\nasync function getApps() {\r\n\tlet apps = await appd.getAll((err, apps) => {\r\n\t\tif (!err) {\r\n\t\t\tgetStore().setValue({\r\n\t\t\t\tfield: \"apps\",\r\n\t\t\t\tvalue: apps,\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n\treturn apps;\r\n}\r\n\r\n/**\r\n * Call to appD to get the list of all tags\r\n */\r\nasync function getTags() {\r\n\tlet tags = await appd.getTags((err, tags) => {\r\n\t\tgetStore().setValue({\r\n\t\t\tfield: \"tags\",\r\n\t\t\tvalue: tags,\r\n\t\t});\r\n\t});\r\n\treturn tags;\r\n}\r\n\r\n/**\r\n * Function to write errors to the log\r\n * @param {string} message The log message\r\n * @param {string} [protocol] Provide the logging protocol (default is error)\r\n */\r\nfunction writeToLog(message, protocol = \"error\") {\r\n\tFSBL.Clients.Logger[protocol](message);\r\n}\r\n\r\n/**\r\n * Function to \"install\" an app. Adds the id to a list of installed apps\r\n * @param {string} name The name of the app\r\n */\r\nasync function addApp(id, cb = Function.prototype) {\r\n\tconst { activeApp, installed, apps } = data;\r\n\tconst appID = id;\r\n\tconst app = apps.find((app) => app.appId === appID);\r\n\r\n\tif (!app) {\r\n\t\tFSBL.Clients.Logger.system.error(\r\n\t\t\t`Attempted to install app with id: ${id}, but could not find it in the local store.`\r\n\t\t);\r\n\t\treturn cb();\r\n\t}\r\n\r\n\tconst name = app.title || app.name;\r\n\tconst folder = data.activeFolder;\r\n\r\n\tif (app === undefined) {\r\n\t\tconsole.warn(\"App not found.\");\r\n\t\treturn cb();\r\n\t}\r\n\r\n\tlet manifest, appConfig;\r\n\t// Manifest from FDC3 is a string property which can either be a stringified JSON, or a uri which delivers valid JSON.\r\n\t// The catalog will attempt to parse the string as JSON, then fetch from a URL if that fails.\r\n\t// If both paths fail, notify the user that this app can't be added\r\n\tif (app.manifestType.toLowerCase() === \"finsemble\") {\r\n\t\ttry {\r\n\t\t\tmanifest = JSON.parse(app.manifest);\r\n\t\t} catch (e) {\r\n\t\t\ttry {\r\n\t\t\t\tconst urlRes = await fetch(app.manifest, { method: \"GET\" });\r\n\t\t\t\tmanifest = await urlRes.json();\r\n\t\t\t} catch (e) {\r\n\t\t\t\twriteToLog(\r\n\t\t\t\t\t`${name} is missing a valid manifest or URI that delivers a valid JSON manifest. Unable to add app.`,\r\n\t\t\t\t\t\"error\"\r\n\t\t\t\t);\r\n\t\t\t\treturn cb();\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tappConfig = installed[appID] = {\r\n\t\t\t\tappID,\r\n\t\t\t\ttags: app.tags,\r\n\t\t\t\tname: name.trim(),\r\n\t\t\t\ttype: \"component\",\r\n\t\t\t\tmanifest,\r\n\t\t\t\tcanDelete: true,\r\n\t\t\t\tsource: \"FDC3\",\r\n\t\t\t};\r\n\t\t}\r\n\t} else {\r\n\t\twriteToLog(`${name} does not appear to be a Finsemble manifest. This app cannot be added to Finsemble.`, \"error\");\r\n\t\treturn cb();\r\n\t}\r\n\r\n\tconst ADVANCED_APP_LAUNCHER = data.defaultFolder;\r\n\tconst { folders } = data;\r\n\r\n\tfolders[ADVANCED_APP_LAUNCHER].apps.push(appConfig);\r\n\tif (folder !== ADVANCED_APP_LAUNCHER) folders[folder].apps.push(appConfig);\r\n\r\n\tFSBL.Clients.LauncherClient.registerComponent(\r\n\t\t{\r\n\t\t\tcomponentType: appConfig.name,\r\n\t\t\tmanifest: appConfig.manifest,\r\n\t\t},\r\n\t\t(err, response) => {\r\n\t\t\tgetStore().setValues(\r\n\t\t\t\t[\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfield: \"activeApp\",\r\n\t\t\t\t\t\tvalue: activeApp,\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfield: \"appDefinitions\",\r\n\t\t\t\t\t\tvalue: installed,\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfield: \"appFolders.folders\",\r\n\t\t\t\t\t\tvalue: folders,\r\n\t\t\t\t\t},\r\n\t\t\t\t],\r\n\t\t\t\tcb\r\n\t\t\t);\r\n\t\t}\r\n\t);\r\n}\r\n\r\n/**\r\n * Function to \"uninstall\" an app. Removes the id from a list of installed apps\r\n * @param {string} name The name of the app\r\n */\r\nfunction removeApp(id, cb = Function.prototype) {\r\n\tlet { installed, folders } = data;\r\n\tFSBL.Clients.LauncherClient.unRegisterComponent({ componentType: installed[id].name }, (err, res) => {\r\n\t\tif (err) {\r\n\t\t\tconsole.warn(\"Failed to deregister a component\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tfor (const key in data.folders) {\r\n\t\t\tconst appIndex = findAppIndexInFolder(id, key, data.folders);\r\n\t\t\tif (appIndex > -1) {\r\n\t\t\t\tfolders[key].apps.splice(appIndex, 1);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Delete the app from the list\r\n\t\tdelete installed[id];\r\n\r\n\t\tgetStore().setValues(\r\n\t\t\t[\r\n\t\t\t\t{\r\n\t\t\t\t\tfield: \"appDefinitions\",\r\n\t\t\t\t\tvalue: installed,\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\tfield: \"appFolders.folders\",\r\n\t\t\t\t\tvalue: folders,\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t\tcb\r\n\t\t);\r\n\t});\r\n}\r\n\r\n/**\r\n * Function to set the 'active app' for the catalog.\r\n * @param {string} id The app id to show as the actively showcasing app\r\n */\r\nfunction openApp(id) {\r\n\tlet { apps } = data;\r\n\r\n\tlet index = apps.findIndex((app) => app.appId === id);\r\n\r\n\tif (index > -1) {\r\n\t\tgetStore().setValue({\r\n\t\t\tfield: \"activeApp\",\r\n\t\t\tvalue: id,\r\n\t\t});\r\n\t}\r\n}\r\n\r\n/**\r\n * Clear the activeApp in store\r\n */\r\nfunction clearApp() {\r\n\tgetStore().setValue({\r\n\t\tfield: \"activeApp\",\r\n\t\tvalue: null,\r\n\t});\r\n}\r\n\r\n/**\r\n * Return activeApp from store\r\n *\r\n * @returns {string} activeApp\r\n */\r\nfunction getActiveApp() {\r\n\treturn data.activeApp;\r\n}\r\n\r\n/**\r\n * Set the activeApp param in store\r\n *\r\n * @param {*} app\r\n */\r\nfunction setActiveApp(app) {\r\n\tgetStore().setValue({\r\n\t\tfield: \"activeApp\",\r\n\t\tvalue: app,\r\n\t});\r\n}\r\n\r\n/**\r\n * Retrieves a list of installed apps by id\r\n */\r\nfunction getInstalledApps() {\r\n\treturn data.installed;\r\n}\r\n\r\n/**\r\n * Gets the list of filtered apps (when searching/filtering by tags)\r\n */\r\nfunction getFilteredApps() {\r\n\treturn data.filteredApps;\r\n}\r\n\r\n/**\r\n * Clears the list of filtered apps\r\n */\r\nfunction clearFilteredApps() {\r\n\tgetStore().setValue({\r\n\t\tfield: \"filteredApps\",\r\n\t\tvalue: [],\r\n\t});\r\n}\r\n\r\n/**\r\n * Set the value of the search text in store\r\n *\r\n * @param {set} val Search string\r\n */\r\nfunction setSearchValue(val) {\r\n\tgetStore().setValue({ field: \"searchText\", value: val });\r\n}\r\n\r\n/**\r\n * Get the current value of the text in the store\r\n *\r\n * @returns {string} Search string\r\n */\r\nfunction getSearchValue() {\r\n\treturn data.searchText;\r\n}\r\n\r\n/**\r\n * Clears the search text in store\r\n *\r\n */\r\nfunction clearSearchText() {\r\n\tgetStore().setValue({ field: \"searchText\", value: \"\" });\r\n}\r\n\r\n/**\r\n * Get forceSearch store value\r\n *\r\n * @returns {boolean} forceSearch\r\n */\r\nfunction getForceSearch() {\r\n\treturn data.forceSearch;\r\n}\r\n\r\n/**\r\n * Set the forceSearch value\r\n *\r\n * @param {string} val Boolean value for forceSearch\r\n */\r\nfunction setForceSearch(val) {\r\n\tgetStore().setValue({ field: \"forceSearch\", value: val });\r\n}\r\n\r\n/**\r\n * Gets the list of active tags (these are tags that are actively filtering the content list)\r\n */\r\nfunction getActiveTags() {\r\n\treturn data.activeTags;\r\n}\r\n\r\n/**\r\n * Adds an 'active tag' to the list of filtered tags\r\n * @param {string} tag The tag name\r\n */\r\nfunction addTag(tag) {\r\n\t_addActiveTag(tag);\r\n}\r\n\r\n/**\r\n * Removes an 'active tag' from the list of filtered tags\r\n * @param {string} tag The tag name\r\n */\r\nfunction removeTag(tag) {\r\n\t_removeActiveTag(tag);\r\n}\r\n\r\n/**\r\n * Refreshes the active tags search\r\n */\r\nfunction refreshTagSearch() {\r\n\tfilterApps();\r\n}\r\n\r\n/**\r\n * Removes all tags from the active tags list\r\n */\r\nfunction clearTags() {\r\n\t_clearActiveTags();\r\n}\r\n\r\n/**\r\n * Calls appD to search the directory of apps based on search text and tag names\r\n * @param {string} terms The search terms provided by the user\r\n */\r\nfunction searchApps(terms, cb = Function.prototype) {\r\n\tdata.searchText = terms;\r\n\tsetForceSearch(true);\r\n\tgetStore().setValue(\r\n\t\t{\r\n\t\t\tfield: \"searchText\",\r\n\t\t\tvalue: terms,\r\n\t\t},\r\n\t\t() => {\r\n\t\t\tfilterApps();\r\n\t\t\tcb();\r\n\t\t}\r\n\t);\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"storeActions.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/stores/storeActions.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAMnC,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAItC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,CAClE,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;AAEnE,eAAe;IACd,UAAU;IACV,OAAO;IACP,eAAe;IACf,iBAAiB;IACjB,UAAU;IACV,aAAa;IACb,OAAO;IACP,MAAM;IACN,SAAS;IACT,gBAAgB;IAChB,SAAS;IACT,eAAe;IACf,MAAM;IACN,SAAS;IACT,OAAO;IACP,QAAQ;IACR,gBAAgB;IAChB,YAAY;IACZ,YAAY;IACZ,UAAU;IACV,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;I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S,CAAC,GAAG;IACrB,gBAAgB,CAAC,GAAG,CAAC,CAAC;AACvB,CAAC;AAKD,SAAS,gBAAgB;IACxB,UAAU,EAAE,CAAC;AACd,CAAC;AAKD,SAAS,SAAS;IACjB,gBAAgB,EAAE,CAAC;AACpB,CAAC;AAMD,SAAS,UAAU,CAAC,KAAK,EAAE,EAAE,GAAG,QAAQ,CAAC,SAAS;IACjD,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IACxB,cAAc,CAAC,IAAI,CAAC,CAAC;IACrB,QAAQ,EAAE,CAAC,QAAQ,CAClB;QACC,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,KAAK;KACZ,EACD,GAAG,EAAE;QACJ,UAAU,EAAE,CAAC;QACb,EAAE,EAAE,CAAC;IACN,CAAC,CACD,CAAC;AACH,CAAC","sourcesContent":["import { findIndex } from \"lodash\";\r\n\r\n/*!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\nimport AppDirectory from \"../modules/AppDirectory\";\r\nimport FDC3 from \"../modules/FDC3\";\r\nimport { getStore } from \"./appStore\";\r\nimport { findIndex } from \"lodash\";\r\nimport * as path from \"path\";\r\n\r\nexport const findAppIndexInFolder = (appID, folderName, folders) =>\r\n\tfindIndex(folders[folderName].apps, (app) => app.appID === appID);\r\n\r\nexport default {\r\n\tinitialize,\r\n\tgetApps,\r\n\tgetFilteredApps,\r\n\tclearFilteredApps,\r\n\tsearchApps,\r\n\tgetActiveTags,\r\n\tgetTags,\r\n\taddTag,\r\n\tremoveTag,\r\n\trefreshTagSearch,\r\n\tclearTags,\r\n\tclearSearchText,\r\n\taddApp,\r\n\tremoveApp,\r\n\topenApp,\r\n\tclearApp,\r\n\tgetInstalledApps,\r\n\tgetActiveApp,\r\n\tsetActiveApp,\r\n\tfilterApps,\r\n\tsetSearchValue,\r\n\tsetForceSearch,\r\n\tgetSearchValue,\r\n\tgetForceSearch,\r\n\tgoHome,\r\n};\r\n\r\nconst data = {};\r\nlet FDC3Client;\r\nlet appd;\r\n\r\nfunction initialize(done = Function.prototype) {\r\n\tFSBL.Clients.ConfigClient.getValue({ field: \"finsemble.appDirectoryEndpoint\" }, (err, appDirectoryEndpoint) => {\r\n\t\tFDC3Client = new FDC3({ url: appDirectoryEndpoint });\r\n\t\tappd = new AppDirectory(FDC3Client);\r\n\r\n\t\tconst store = getStore();\r\n\t\tdata.apps = store.values.apps;\r\n\t\tstore.getValue({ field: \"appFolders.folders\" }, (err, folders) => {\r\n\t\t\tdata.folders = folders;\r\n\t\t\tstore.addListener({ field: \"appFolders.folders\" }, (err, dt) => (data.folders = dt.value));\r\n\t\t});\r\n\t\tstore.getValue({ field: \"activeFolder\" }, (err, active) => {\r\n\t\t\tdata.activeFolder = active;\r\n\t\t\tstore.addListener({ field: \"activeFolder\" }, (err, dt) => (data.activeFolder = dt.value));\r\n\t\t});\r\n\t\tstore.getValue({ field: \"defaultFolder\" }, (err, folder) => {\r\n\t\t\tdata.defaultFolder = folder;\r\n\t\t});\r\n\r\n\t\tdata.installed = store.values.appDefinitions;\r\n\t\tdata.tags = store.values.tags;\r\n\t\tdata.filteredApps = store.values.filteredApps;\r\n\t\tdata.activeTags = store.values.activeTags;\r\n\t\tdata.activeApp = store.values.activeApp;\r\n\t\tdata.searchText = store.values.searchText;\r\n\t\tdata.forceSearch = store.values.forceSearch;\r\n\t\tdata.ADVANCED_APP_LAUNCHER = store.values.defaultFolder;\r\n\r\n\t\tstore.addListener({ field: \"apps\" }, (err, dt) => (data.apps = dt.value));\r\n\t\tstore.addListener({ field: \"appDefinitions\" }, (err, dt) => (data.installed = dt.value));\r\n\t\tstore.addListener({ field: \"tags\" }, (err, dt) => (data.tags = dt.value));\r\n\t\tstore.addListener({ field: \"activeApp\" }, (err, dt) => (data.activeApp = dt.value));\r\n\t\tstore.addListener({ field: \"activeTags\" }, (err, dt) => (data.activeTags = dt.value));\r\n\t\tstore.addListener({ field: \"filteredApps\" }, (err, dt) => (data.filteredApps = dt.value));\r\n\t\tstore.addListener({ field: \"searchText\" }, (err, dt) => (data.searchText = dt.value));\r\n\t\tstore.addListener({ field: \"forceSearch\" }, (err, dt) => (data.forceSearch = dt.value));\r\n\t\tdone();\r\n\t});\r\n}\r\n\r\n/**\r\n * Return to the App Catalog home page\r\n */\r\nfunction goHome() {\r\n\tsetForceSearch(false);\r\n\tclearFilteredApps();\r\n\tclearApp();\r\n\tclearTags();\r\n\tclearSearchText();\r\n}\r\n\r\n/**\r\n * Send the search text and tags to the appd server and get a list of apps\r\n */\r\nfunction filterApps() {\r\n\tlet { activeTags, searchText } = data;\r\n\r\n\tif (activeTags.length === 0 && searchText === \"\") {\r\n\t\tgoHome();\r\n\t} else {\r\n\t\tappd.search({ text: searchText, tags: activeTags }, (err, data) => {\r\n\t\t\tif (err) {\r\n\t\t\t\tFSBL.Logger.system.error(`FDC3 App search failed!: ${err}`);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tgetStore().setValue({ field: \"activeApp\", value: null });\r\n\t\t\tgetStore().setValue({ field: \"activeTags\", value: activeTags });\r\n\t\t\tgetStore().setValue({ field: \"filteredApps\", value: data });\r\n\t\t});\r\n\t}\r\n}\r\n\r\n/**\r\n * Private function to add an active tag. This will filter apps based on tags\r\n * @param {string} tag The name of the tag\r\n */\r\nfunction _addActiveTag(tag) {\r\n\tlet { activeTags } = data;\r\n\tif (!activeTags.includes(tag)) {\r\n\t\tactiveTags.push(tag);\r\n\t}\r\n\r\n\tgetStore().setValue({ field: \"activeTags\", value: activeTags }, filterApps());\r\n}\r\n\r\nfunction _findAppIndexInFolder(appID, folderName) {\r\n\treturn findIndex(data.folders[folderName].apps, (app) => app.appID === appID);\r\n}\r\n\r\n/**\r\n * Private function to remove an active tag. This will filter apps based on tags\r\n * @param {string} tag The name of the tag\r\n */\r\nfunction _removeActiveTag(tag) {\r\n\tdata.activeTags = data.activeTags.filter((currentTag) => currentTag !== tag);\r\n\r\n\tgetStore().setValue({ field: \"activeTags\", value: data.activeTags });\r\n\tfilterApps();\r\n}\r\n\r\n/**\r\n * Clears all active tags\r\n */\r\nfunction _clearActiveTags() {\r\n\tgetStore().setValue({ field: \"activeTags\", value: [] });\r\n}\r\n\r\n/**\r\n * Async function to fetch apps from the FDC3 api (appD)\r\n */\r\nasync function getApps() {\r\n\tlet apps = await appd.getAll((err, apps) => {\r\n\t\tif (!err) {\r\n\t\t\tgetStore().setValue({\r\n\t\t\t\tfield: \"apps\",\r\n\t\t\t\tvalue: apps,\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n\treturn apps;\r\n}\r\n\r\n/**\r\n * Call to appD to get the list of all tags\r\n */\r\nasync function getTags() {\r\n\tlet tags = await appd.getTags((err, tags) => {\r\n\t\tgetStore().setValue({\r\n\t\t\tfield: \"tags\",\r\n\t\t\tvalue: tags,\r\n\t\t});\r\n\t});\r\n\treturn tags;\r\n}\r\n\r\n/**\r\n * Function to write errors to the log\r\n * @param {string} message The log message\r\n * @param {string} [protocol] Provide the logging protocol (default is error)\r\n */\r\nfunction writeToLog(message, protocol = \"error\") {\r\n\tFSBL.Clients.Logger[protocol](message);\r\n}\r\n\r\n/**\r\n * Function to \"install\" an app. Adds the id to a list of installed apps\r\n * @param {string} name The name of the app\r\n */\r\nasync function addApp(id, cb = Function.prototype) {\r\n\tconst { activeApp, installed, apps } = data;\r\n\tconst appID = id;\r\n\tconst app = apps.find((app) => app.appId === appID);\r\n\r\n\tif (!app) {\r\n\t\tFSBL.Clients.Logger.system.error(\r\n\t\t\t`Attempted to install app with id: ${id}, but could not find it in the local store.`\r\n\t\t);\r\n\t\treturn cb();\r\n\t}\r\n\r\n\tconst name = app.title || app.name;\r\n\tconst folder = data.activeFolder;\r\n\r\n\tif (app === undefined) {\r\n\t\tconsole.warn(\"App not found.\");\r\n\t\treturn cb();\r\n\t}\r\n\r\n\tlet manifest, appConfig;\r\n\t// Manifest from FDC3 is a string property which can either be a stringified JSON, or a uri which delivers valid JSON.\r\n\t// The catalog will attempt to parse the string as JSON, then fetch from a URL if that fails.\r\n\t// If both paths fail, notify the user that this app can't be added\r\n\tif (app.manifestType.toLowerCase() === \"finsemble\") {\r\n\t\ttry {\r\n\t\t\tmanifest = JSON.parse(app.manifest);\r\n\t\t} catch (e) {\r\n\t\t\ttry {\r\n\t\t\t\tconst urlRes = await fetch(app.manifest, { method: \"GET\" });\r\n\t\t\t\tmanifest = await urlRes.json();\r\n\t\t\t} catch (e) {\r\n\t\t\t\twriteToLog(\r\n\t\t\t\t\t`${name} is missing a valid manifest or URI that delivers a valid JSON manifest. Unable to add app.`,\r\n\t\t\t\t\t\"error\"\r\n\t\t\t\t);\r\n\t\t\t\treturn cb();\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tappConfig = installed[appID] = {\r\n\t\t\t\tappID,\r\n\t\t\t\ttags: app.tags,\r\n\t\t\t\tname: name.trim(),\r\n\t\t\t\ttype: \"component\",\r\n\t\t\t\tmanifest,\r\n\t\t\t\tcanDelete: true,\r\n\t\t\t\tsource: \"FDC3\",\r\n\t\t\t};\r\n\t\t}\r\n\t} else {\r\n\t\twriteToLog(`${name} does not appear to be a Finsemble manifest. This app cannot be added to Finsemble.`, \"error\");\r\n\t\treturn cb();\r\n\t}\r\n\r\n\tconst ADVANCED_APP_LAUNCHER = data.defaultFolder;\r\n\tconst { folders } = data;\r\n\r\n\tfolders[ADVANCED_APP_LAUNCHER].apps.push(appConfig);\r\n\tif (folder !== ADVANCED_APP_LAUNCHER) folders[folder].apps.push(appConfig);\r\n\r\n\tFSBL.Clients.LauncherClient.registerComponent(\r\n\t\t{\r\n\t\t\tcomponentType: appConfig.name,\r\n\t\t\tmanifest: appConfig.manifest,\r\n\t\t},\r\n\t\t(err, response) => {\r\n\t\t\tgetStore().setValues(\r\n\t\t\t\t[\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfield: \"activeApp\",\r\n\t\t\t\t\t\tvalue: activeApp,\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfield: \"appDefinitions\",\r\n\t\t\t\t\t\tvalue: installed,\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfield: \"appFolders.folders\",\r\n\t\t\t\t\t\tvalue: folders,\r\n\t\t\t\t\t},\r\n\t\t\t\t],\r\n\t\t\t\tcb\r\n\t\t\t);\r\n\t\t}\r\n\t);\r\n}\r\n\r\n/**\r\n * Function to \"uninstall\" an app. Removes the id from a list of installed apps\r\n * @param {string} name The name of the app\r\n */\r\nfunction removeApp(id, cb = Function.prototype) {\r\n\tlet { installed, folders } = data;\r\n\tFSBL.Clients.LauncherClient.unRegisterComponent({ componentType: installed[id].name }, (err, res) => {\r\n\t\tif (err) {\r\n\t\t\tconsole.warn(\"Failed to deregister a component\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tfor (const key in data.folders) {\r\n\t\t\tconst appIndex = findAppIndexInFolder(id, key, data.folders);\r\n\t\t\tif (appIndex > -1) {\r\n\t\t\t\tfolders[key].apps.splice(appIndex, 1);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Delete the app from the list\r\n\t\tdelete installed[id];\r\n\r\n\t\tgetStore().setValues(\r\n\t\t\t[\r\n\t\t\t\t{\r\n\t\t\t\t\tfield: \"appDefinitions\",\r\n\t\t\t\t\tvalue: installed,\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\tfield: \"appFolders.folders\",\r\n\t\t\t\t\tvalue: folders,\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t\tcb\r\n\t\t);\r\n\t});\r\n}\r\n\r\n/**\r\n * Function to set the 'active app' for the catalog.\r\n * @param {string} id The app id to show as the actively showcasing app\r\n */\r\nfunction openApp(id) {\r\n\tlet { apps } = data;\r\n\r\n\tlet index = apps.findIndex((app) => app.appId === id);\r\n\r\n\tif (index > -1) {\r\n\t\tgetStore().setValue({\r\n\t\t\tfield: \"activeApp\",\r\n\t\t\tvalue: id,\r\n\t\t});\r\n\t}\r\n}\r\n\r\n/**\r\n * Clear the activeApp in store\r\n */\r\nfunction clearApp() {\r\n\tgetStore().setValue({\r\n\t\tfield: \"activeApp\",\r\n\t\tvalue: null,\r\n\t});\r\n}\r\n\r\n/**\r\n * Return activeApp from store\r\n *\r\n * @returns {string} activeApp\r\n */\r\nfunction getActiveApp() {\r\n\treturn data.activeApp;\r\n}\r\n\r\n/**\r\n * Set the activeApp param in store\r\n *\r\n * @param {*} app\r\n */\r\nfunction setActiveApp(app) {\r\n\tgetStore().setValue({\r\n\t\tfield: \"activeApp\",\r\n\t\tvalue: app,\r\n\t});\r\n}\r\n\r\n/**\r\n * Retrieves a list of installed apps by id\r\n */\r\nfunction getInstalledApps() {\r\n\treturn data.installed;\r\n}\r\n\r\n/**\r\n * Gets the list of filtered apps (when searching/filtering by tags)\r\n */\r\nfunction getFilteredApps() {\r\n\treturn data.filteredApps;\r\n}\r\n\r\n/**\r\n * Clears the list of filtered apps\r\n */\r\nfunction clearFilteredApps() {\r\n\tgetStore().setValue({\r\n\t\tfield: \"filteredApps\",\r\n\t\tvalue: [],\r\n\t});\r\n}\r\n\r\n/**\r\n * Set the value of the search text in store\r\n *\r\n * @param {set} val Search string\r\n */\r\nfunction setSearchValue(val) {\r\n\tgetStore().setValue({ field: \"searchText\", value: val });\r\n}\r\n\r\n/**\r\n * Get the current value of the text in the store\r\n *\r\n * @returns {string} Search string\r\n */\r\nfunction getSearchValue() {\r\n\treturn data.searchText;\r\n}\r\n\r\n/**\r\n * Clears the search text in store\r\n *\r\n */\r\nfunction clearSearchText() {\r\n\tgetStore().setValue({ field: \"searchText\", value: \"\" });\r\n}\r\n\r\n/**\r\n * Get forceSearch store value\r\n *\r\n * @returns {boolean} forceSearch\r\n */\r\nfunction getForceSearch() {\r\n\treturn data.forceSearch;\r\n}\r\n\r\n/**\r\n * Set the forceSearch value\r\n *\r\n * @param {string} val Boolean value for forceSearch\r\n */\r\nfunction setForceSearch(val) {\r\n\tgetStore().setValue({ field: \"forceSearch\", value: val });\r\n}\r\n\r\n/**\r\n * Gets the list of active tags (these are tags that are actively filtering the content list)\r\n */\r\nfunction getActiveTags() {\r\n\treturn data.activeTags; // type: string[]\r\n}\r\n\r\n/**\r\n * Adds an 'active tag' to the list of filtered tags\r\n * @param {string} tag The tag name\r\n */\r\nfunction addTag(tag) {\r\n\t_addActiveTag(tag);\r\n}\r\n\r\n/**\r\n * Removes an 'active tag' from the list of filtered tags\r\n * @param {string} tag The tag name\r\n */\r\nfunction removeTag(tag) {\r\n\t_removeActiveTag(tag);\r\n}\r\n\r\n/**\r\n * Refreshes the active tags search\r\n */\r\nfunction refreshTagSearch() {\r\n\tfilterApps();\r\n}\r\n\r\n/**\r\n * Removes all tags from the active tags list\r\n */\r\nfunction clearTags() {\r\n\t_clearActiveTags();\r\n}\r\n\r\n/**\r\n * Calls appD to search the directory of apps based on search text and tag names\r\n * @param {string} terms The search terms provided by the user\r\n */\r\nfunction searchApps(terms, cb = Function.prototype) {\r\n\tdata.searchText = terms;\r\n\tsetForceSearch(true);\r\n\tgetStore().setValue(\r\n\t\t{\r\n\t\t\tfield: \"searchText\",\r\n\t\t\tvalue: terms,\r\n\t\t},\r\n\t\t() => {\r\n\t\t\tfilterApps();\r\n\t\t\tcb();\r\n\t\t}\r\n\t);\r\n}\r\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import "./css/button.css";
|
|
3
|
-
import {
|
|
3
|
+
import { FinsembleIconType } from "./FinsembleIcon";
|
|
4
4
|
export interface AdvancedButtonProps {
|
|
5
|
-
icon:
|
|
5
|
+
icon: FinsembleIconType;
|
|
6
6
|
text: string;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
@@ -13,8 +13,8 @@ export interface AdvancedButtonProps {
|
|
|
13
13
|
export interface ButtonProps {
|
|
14
14
|
fashion: "secondary" | "primary" | "danger" | "ghost" | "danger ghost";
|
|
15
15
|
text: string;
|
|
16
|
-
iconBefore?:
|
|
17
|
-
iconAfter?:
|
|
16
|
+
iconBefore?: FinsembleIconType;
|
|
17
|
+
iconAfter?: FinsembleIconType;
|
|
18
18
|
disabled?: boolean;
|
|
19
19
|
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
20
20
|
className?: string;
|
|
@@ -13,7 +13,7 @@ export const fashion_class_lookup = {
|
|
|
13
13
|
export const Button = ({ fashion = "secondary", text = "", iconBefore, iconAfter, disabled = false, onClick = () => { }, className = "", buttonAttributes = {}, fixedSize, }) => {
|
|
14
14
|
const containerClassName = [fashion_class_lookup[fashion], className].join(" ");
|
|
15
15
|
return (React.createElement("div", { className: `${containerClassName}` },
|
|
16
|
-
React.createElement("button", {
|
|
16
|
+
React.createElement("button", Object.assign({}, buttonAttributes, { onClick: onClick, disabled: disabled, style: { width: fixedSize } }),
|
|
17
17
|
iconBefore && React.createElement(FinsembleIcon, { className: "button-icon-before", icon: iconBefore }),
|
|
18
18
|
text,
|
|
19
19
|
iconAfter && React.createElement(FinsembleIcon, { className: "button-icon-after", icon: iconAfter }))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/common/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/common/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAqB,MAAM,iBAAiB,CAAC;AAwBnE,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC,SAAS,EAAE,4BAA4B;IACvC,IAAI,EAAE,uBAAuB;IAC7B,OAAO,EAAE,0BAA0B;IACnC,IAAI,EAAE,uBAAuB;IAC7B,MAAM,EAAE,yBAAyB;IACjC,KAAK,EAAE,wBAAwB;IAC/B,cAAc,EAAE,+BAA+B;CAC/C,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAA0B,CAAC,EAC7C,OAAO,GAAG,WAAW,EACrB,IAAI,GAAG,EAAE,EACT,UAAU,EACV,SAAS,EACT,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,EAClB,SAAS,GAAG,EAAE,EACd,gBAAgB,GAAG,EAAE,EACrB,SAAS,GACT,EAAE,EAAE;IACJ,MAAM,kBAAkB,GAAG,CAAC,oBAAoB,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAEhF,OAAO,CACN,6BAAK,SAAS,EAAE,GAAG,kBAAkB,EAAE;QACtC,gDAAY,gBAAgB,IAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;YAC7F,UAAU,IAAI,oBAAC,aAAa,IAAC,SAAS,EAAC,oBAAoB,EAAC,IAAI,EAAE,UAAU,GAAkB;YAC9F,IAAI;YACJ,SAAS,IAAI,oBAAC,aAAa,IAAC,SAAS,EAAC,mBAAmB,EAAC,IAAI,EAAE,SAAS,GAAkB,CACpF,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\r\nimport \"./css/button.css\";\r\nimport { FinsembleIcon, FinsembleIconType } from \"./FinsembleIcon\";\r\n\r\nexport interface AdvancedButtonProps {\r\n\ticon: FinsembleIconType;\r\n\ttext: string;\r\n\tdisabled?: boolean;\r\n\tonClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;\r\n\ttabIndex?: number;\r\n\tclassName?: string;\r\n\tbuttonAttributes?: object;\r\n}\r\n\r\nexport interface ButtonProps {\r\n\tfashion: \"secondary\" | \"primary\" | \"danger\" | \"ghost\" | \"danger ghost\";\r\n\ttext: string;\r\n\ticonBefore?: FinsembleIconType;\r\n\ticonAfter?: FinsembleIconType;\r\n\tdisabled?: boolean;\r\n\tonClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;\r\n\tclassName?: string;\r\n\tbuttonAttributes?: object;\r\n\tfixedSize?: number;\r\n}\r\n\r\nexport const fashion_class_lookup = {\r\n\tsecondary: \"button-container-secondary\",\r\n\ttile: \"button-container-tile\",\r\n\tprimary: \"button-container-primary\",\r\n\ticon: \"button-container-icon\",\r\n\tdanger: \"button-container-danger\",\r\n\tghost: \"button-container-ghost\",\r\n\t\"danger ghost\": \"button-container-danger-ghost\",\r\n};\r\n\r\nexport const Button: React.FC<ButtonProps> = ({\r\n\tfashion = \"secondary\",\r\n\ttext = \"\",\r\n\ticonBefore,\r\n\ticonAfter,\r\n\tdisabled = false,\r\n\tonClick = () => {},\r\n\tclassName = \"\",\r\n\tbuttonAttributes = {},\r\n\tfixedSize,\r\n}) => {\r\n\tconst containerClassName = [fashion_class_lookup[fashion], className].join(\" \");\r\n\r\n\treturn (\r\n\t\t<div className={`${containerClassName}`}>\r\n\t\t\t<button {...buttonAttributes} onClick={onClick} disabled={disabled} style={{ width: fixedSize }}>\r\n\t\t\t\t{iconBefore && <FinsembleIcon className=\"button-icon-before\" icon={iconBefore}></FinsembleIcon>}\r\n\t\t\t\t{text}\r\n\t\t\t\t{iconAfter && <FinsembleIcon className=\"button-icon-after\" icon={iconAfter}></FinsembleIcon>}\r\n\t\t\t</button>\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
|
|
@@ -5,7 +5,7 @@ import { FinsembleIcon } from "./FinsembleIcon";
|
|
|
5
5
|
export const ButtonIcon = ({ icon, text = "", disabled = false, tabIndex = 0, onClick = () => { }, className = "", buttonAttributes = {}, }) => {
|
|
6
6
|
const containerClassName = fashion_class_lookup.icon;
|
|
7
7
|
return (React.createElement("div", { className: `${containerClassName} ${className}` },
|
|
8
|
-
React.createElement("button", {
|
|
8
|
+
React.createElement("button", Object.assign({}, buttonAttributes, { onClick: onClick, disabled: disabled, title: text, tabIndex: tabIndex }),
|
|
9
9
|
React.createElement(FinsembleIcon, { icon: icon }))));
|
|
10
10
|
};
|
|
11
11
|
//# sourceMappingURL=ButtonIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonIcon.js","sourceRoot":"","sources":["../../../src/components/common/ButtonIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAuB,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,CAAC,MAAM,UAAU,GAAkC,CAAC,EACzD,IAAI,EACJ,IAAI,GAAG,EAAE,EACT,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,CAAC,EACZ,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,EAClB,SAAS,GAAG,EAAE,EACd,gBAAgB,GAAG,EAAE,GACrB,EAAE,EAAE;IACJ,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,IAAI,CAAC;IAErD,OAAO,CACN,6BAAK,SAAS,EAAE,GAAG,kBAAkB,IAAI,SAAS,EAAE;QACnD,
|
|
1
|
+
{"version":3,"file":"ButtonIcon.js","sourceRoot":"","sources":["../../../src/components/common/ButtonIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAuB,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,CAAC,MAAM,UAAU,GAAkC,CAAC,EACzD,IAAI,EACJ,IAAI,GAAG,EAAE,EACT,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,CAAC,EACZ,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,EAClB,SAAS,GAAG,EAAE,EACd,gBAAgB,GAAG,EAAE,GACrB,EAAE,EAAE;IACJ,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,IAAI,CAAC;IAErD,OAAO,CACN,6BAAK,SAAS,EAAE,GAAG,kBAAkB,IAAI,SAAS,EAAE;QACnD,gDAAY,gBAAgB,IAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ;YAClG,oBAAC,aAAa,IAAC,IAAI,EAAE,IAAI,GAAkB,CACnC,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\r\nimport { AdvancedButtonProps, fashion_class_lookup } from \"./Button\";\r\nimport \"./css/button.css\";\r\nimport { FinsembleIcon } from \"./FinsembleIcon\";\r\n\r\nexport const ButtonIcon: React.FC<AdvancedButtonProps> = ({\r\n\ticon,\r\n\ttext = \"\",\r\n\tdisabled = false,\r\n\ttabIndex = 0,\r\n\tonClick = () => {},\r\n\tclassName = \"\",\r\n\tbuttonAttributes = {},\r\n}) => {\r\n\tconst containerClassName = fashion_class_lookup.icon;\r\n\r\n\treturn (\r\n\t\t<div className={`${containerClassName} ${className}`}>\r\n\t\t\t<button {...buttonAttributes} onClick={onClick} disabled={disabled} title={text} tabIndex={tabIndex}>\r\n\t\t\t\t<FinsembleIcon icon={icon}></FinsembleIcon>\r\n\t\t\t</button>\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
|
|
@@ -46,6 +46,6 @@ export const ColorPicker = ({ id, startColor, updateColor }) => {
|
|
|
46
46
|
};
|
|
47
47
|
return (React.createElement("div", { className: "color-picker" },
|
|
48
48
|
React.createElement("input", { className: "theme-color-picker", type: "color", value: color, onChange: onColorChanged, "aria-hidden": "true" }),
|
|
49
|
-
React.createElement("input", { className: "theme-color-picker-text", type: "text", "aria-invalid": !isValid, value: color, onChange: onColorChanged,
|
|
49
|
+
React.createElement("input", Object.assign({ className: "theme-color-picker-text", type: "text", "aria-invalid": !isValid, value: color, onChange: onColorChanged }, { id }))));
|
|
50
50
|
};
|
|
51
51
|
//# sourceMappingURL=ColorPicker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPicker.js","sourceRoot":"","sources":["../../../src/components/common/ColorPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,wBAAwB,CAAC;AAEhC,MAAM,YAAY,GAAG,iBAAiB,CAAC;AAEvC,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACvB,6CAAO,CAAA;IACP,iDAAS,CAAA;IACT,+CAAQ,CAAA;IACR,iDAAS,CAAA;AACV,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AAGD,MAAM,UAAU,WAAW,CAAC,KAAa;IAOxC,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IAC7C,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;IACf,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC;IAEd,MAAM,GAAG,GAAG,GAAG,CAAC,UAAU,CAAC,IAAI,CAAE,CAAC;IAClC,GAAG,CAAC,SAAS,GAAG,KAAK,CAAC;IACtB,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACzB,OAAO,GAAG,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAC1C,CAAC;AAED,SAAS,SAAS,CAAC,GAAW;IAE7B,OAAO,IAAI,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACzC,CAAC;AAED,SAAS,UAAU,CAAC,KAAa;IAMhC,IAAI,K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B,EAAE,EAAE,EAAE,EACF,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState, useEffect } from \"react\";\r\nimport \"./css/color-picker.css\";\r\n\r\nconst RE_HEX_COLOR = /^#[0-9a-f]{6}$/i;\r\n\r\nexport enum RGBA_CHANNEL {\r\n\tRED = 0,\r\n\tGREEN = 1,\r\n\tBLUE = 2,\r\n\tALPHA = 3,\r\n}\r\n\r\n// From https://stackoverflow.com/a/24390910\r\nexport function colorToRGBA(color: string) {\r\n\t// Returns the color as an array of [r, g, b, a] -- all range from 0 - 255\r\n\t// color must be a valid canvas fillStyle. This will cover most anything\r\n\t// you'd want to use.\r\n\t// Examples:\r\n\t// colorToRGBA('red') # [255, 0, 0, 255]\r\n\t// colorToRGBA('#f00') # [255, 0, 0, 255]\r\n\tconst cvs = document.createElement(\"canvas\");\r\n\tcvs.height = 1;\r\n\tcvs.width = 1;\r\n\r\n\tconst ctx = cvs.getContext(\"2d\")!;\r\n\tctx.fillStyle = color;\r\n\tctx.fillRect(0, 0, 1, 1);\r\n\treturn ctx.getImageData(0, 0, 1, 1).data;\r\n}\r\n\r\nfunction byteToHex(num: number) {\r\n\t// Turns a number (0-255) into a 2-character hex number (00-ff)\r\n\treturn `0${num.toString(16)}`.slice(-2);\r\n}\r\n\r\nfunction colorToHex(color: string) {\r\n\t// Convert any CSS color to a hex representation\r\n\t// Examples:\r\n\t// colorToHex('red') # '#ff0000'\r\n\t// colorToHex('rgb(255, 0, 0)') # '#ff0000'\r\n\t// colorToHex('#ff0000') # '#ff0000'\r\n\tif (color.match(RE_HEX_COLOR) !== null) {\r\n\t\treturn color;\r\n\t}\r\n\tconst rgba = colorToRGBA(color);\r\n\tconst hex = [0, 1, 2].map((idx) => byteToHex(rgba[idx])).join(\"\");\r\n\treturn `#${hex}`;\r\n}\r\n\r\nexport interface ColorPickerProps {\r\n\tstartColor: string;\r\n\tupdateColor: (newColor: string) => void;\r\n\tid?: string;\r\n}\r\n\r\n/**\r\n * ColorPicker component to update theme variables. Displays a browser color input alongside a text version for hex color values.\r\n *\r\n * @param {{ [id]: string, startColor: string; updateColor: function }} { id, startColor, callback }\r\n */\r\nexport const ColorPicker = ({ id, startColor, updateColor }: ColorPickerProps) => {\r\n\tconst [color, setColor] = useState(colorToHex(startColor));\r\n\tconst isValid = color.match(RE_HEX_COLOR) !== null;\r\n\r\n\tuseEffect(() => {\r\n\t\tif (isValid) {\r\n\t\t\tupdateColor(color);\r\n\t\t}\r\n\t}, [color]);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (startColor) {\r\n\t\t\tsetColor(startColor);\r\n\t\t}\r\n\t}, [startColor]);\r\n\r\n\tconst onColorChanged = ({ target }: { target: HTMLInputElement }) => {\r\n\t\tsetColor(target.value);\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div className=\"color-picker\">\r\n\t\t\t<input\r\n\t\t\t\tclassName=\"theme-color-picker\"\r\n\t\t\t\ttype=\"color\"\r\n\t\t\t\tvalue={color}\r\n\t\t\t\tonChange={onColorChanged}\r\n\t\t\t\taria-hidden=\"true\"\r\n\t\t\t></input>\r\n\t\t\t<input\r\n\t\t\t\tclassName=\"theme-color-picker-text\"\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\taria-invalid={!isValid}\r\n\t\t\t\tvalue={color}\r\n\t\t\t\tonChange={onColorChanged}\r\n\t\t\t\t{...{ id }}\r\n\t\t\t></input>\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropZone.js","sourceRoot":"","sources":["../../../src/components/common/DropZone.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"DropZone.js","sourceRoot":"","sources":["../../../src/components/common/DropZone.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,qBAAqB,CAAC;AAsB7B,MAAM,CA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CAAC,CAAC;YACnB,aAAa,CAAC,IAAI,CAAC,CAAC;QACrB,CAAC,EACD,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE;YAClB,eAAe,CAAC,CAAC,CAAC,CAAC;YACnB,aAAa,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC,EACD,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE;YACb,aAAa,CAAC,KAAK,CAAC,CAAC;YAErB,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,YAAY,CAAC;YACjC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACtC,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE;oBACtB,SAAS;iBACT;gBACD,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aACzB;YAED,eAAe,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC,IAEA,QAAQ,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState } from \"react\";\r\nimport \"./css/drop-zone.css\";\r\n\r\n// Electron adds File.path\r\nexport type FileWithPath = File & { path?: string };\r\n\r\nexport type DropZoneProps = {\r\n\tchildren: React.ReactNode;\r\n\tprocessFile: (fileObj: FileWithPath, index: number) => void;\r\n\tsuppress?: boolean;\r\n};\r\n\r\n/***\r\n * Component that serves as a drop zone. It also keeps track of visual concerns and event handlers for\r\n * drag-and-drop.\r\n *\r\n * The DropZone component is intended to be a container element for other elements, such as text, lists,\r\n * images, input elements, etc.\r\n *\r\n * @callback processFile - This function will be called for each file that is dropped in the dropzone.\r\n * @param {ReactNode} children - React will fill this in.\r\n * @param {boolean} suppress=false - If the dropzone-ness should be suppressed, which would turn this container into just a div\r\n */\r\nexport const DropZone = ({ processFile, children, suppress = false }: DropZoneProps) => {\r\n\tconst [isDragging, setIsDragging] = useState(false);\r\n\tconst [potential, setPotential] = useState(false);\r\n\tconst [singleton, setSingleton] = useState(true);\r\n\r\n\tconst preventDefaults = (e: { preventDefault: Function; stopPropagation: Function }) => {\r\n\t\te.preventDefault();\r\n\t\te.stopPropagation();\r\n\t};\r\n\r\n\t// Check if something is being dragged somewhere on the page\r\n\t// If dragging is happening on the page, there will be a visual indication for potential drop zone\r\n\tif (singleton) {\r\n\t\t// \"dragenter\" and \"dragleave\" events are fired off of every single child element, and counting them isn't reliable\r\n\t\t// so, when \"dragover\" events are fired, we know dragging is happening.\r\n\t\t// we will wait 100ms after the last \"dragover\" event is fired, and then turn off the potential zone.\r\n\t\tlet timeout: NodeJS.Timeout | null = null;\r\n\t\tdocument.addEventListener(\"dragover\", (e) => {\r\n\t\t\tpreventDefaults(e);\r\n\t\t\tsetPotential(true);\r\n\r\n\t\t\t// If timeout was previously set, clear it\r\n\t\t\tif (timeout !== null) {\r\n\t\t\t\tclearTimeout(timeout);\r\n\t\t\t}\r\n\r\n\t\t\t// Set a new timeout, now that we've gotten a new dragover event\r\n\t\t\ttimeout = setTimeout(() => {\r\n\t\t\t\t// If it's been 100ms and no dragover event has been fired, assume the user isn't dragging anymore.\r\n\t\t\t\tsetPotential(false);\r\n\t\t\t}, 100); // 100ms was chosen by trial and error.\r\n\t\t\t// 10ms was too little time, and caused flicker. 100ms doesn't have a flicker, and turns off potential without a noticeable delay\r\n\t\t});\r\n\t\tsetSingleton(false);\r\n\t}\r\n\r\n\treturn suppress ? (\r\n\t\t<>{children}</>\r\n\t) : (\r\n\t\t<div\r\n\t\t\tclassName={`dropZone ${isDragging ? \"isDragging\" : potential ? \"isPotential\" : \"\"}`}\r\n\t\t\tonDragEnter={(e) => {\r\n\t\t\t\tpreventDefaults(e);\r\n\t\t\t\tsetIsDragging(true);\r\n\t\t\t}}\r\n\t\t\tonDragLeave={(e) => {\r\n\t\t\t\tpreventDefaults(e);\r\n\t\t\t\tsetIsDragging(false);\r\n\t\t\t}}\r\n\t\t\tonDrop={(e) => {\r\n\t\t\t\tsetIsDragging(false);\r\n\r\n\t\t\t\tconst { files } = e.dataTransfer;\r\n\t\t\t\tfor (let i = 0; i < files.length; i++) {\r\n\t\t\t\t\tif (files[i] === null) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tprocessFile(files[i], i);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tpreventDefaults(e);\r\n\t\t\t}}\r\n\t\t>\r\n\t\t\t{children}\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
|
|
@@ -25,7 +25,7 @@ const DropdownButton = ({ buttonLabel = "Label", buttonOptions = [], mainAction,
|
|
|
25
25
|
React.createElement("div", { className: "finsemble-dropdown-action__btn" },
|
|
26
26
|
React.createElement("span", { className: "btn-label", onClick: buttonAction }, buttonLabel),
|
|
27
27
|
React.createElement("span", { className: "separator" }),
|
|
28
|
-
React.createElement("div", { className: "expand-options", onClick: (
|
|
28
|
+
React.createElement("div", { className: "expand-options", onClick: () => setExpanded(!expanded) },
|
|
29
29
|
React.createElement("span", { className: "caret" }))),
|
|
30
30
|
expanded ? React.createElement("div", { className: "finsemble-dropdown-action__btn-options" }, options) : null));
|
|
31
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownButton.js","sourceRoot":"","sources":["../../../src/components/common/DropdownButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAS9E,MAAM,cAAc,GAAiE,CAAC,EACrF,WAAW,GAAG,OAAO,EACrB,aAAa,GAAG,EAAE,EAClB,UAAU,GAC2B,EAAE,EAAE;IACzC,MAAM,UAAU,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAChD,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,C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S,EAAC,wCAAwC,IAAE,OAAO,CAAO,CAAC,CAAC,CAAC,IAAI,CACrF,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import React, { useState, useRef } from \"react\";\r\nimport \"../../assets/css/button.css\";\r\nimport { useOutsideClickDetector } from \"../../hooks/useOutsideClickDetector\";\r\nimport { IFinsembleButtonProps } from \"../shared/Button\";\r\n\r\nexport interface IFinsembleDropdownActionButtonProps {\r\n\tbuttonLabel: string;\r\n\tbuttonOptions: Array<IFinsembleButtonProps>;\r\n\tmainAction: Function;\r\n}\r\n\r\nconst DropdownButton: React.FunctionComponent<IFinsembleDropdownActionButtonProps> = ({\r\n\tbuttonLabel = \"Label\",\r\n\tbuttonOptions = [],\r\n\tmainAction,\r\n}: IFinsembleDropdownActionButtonProps) => {\r\n\tconst wrapperRef = useRef<HTMLDivElement>(null);\r\n\tconst [expanded, setExpanded] = useState(false);\r\n\r\n\tuseOutsideClickDetector(wrapperRef, () => setExpanded(false));\r\n\r\n\tconst options = buttonOptions.map((option, index) => (\r\n\t\t<div\r\n\t\t\tkey={index}\r\n\t\t\tclassName=\"finsemble-dropdown-action__btn-option\"\r\n\t\t\tonClick={() => {\r\n\t\t\t\toption.clickHandler();\r\n\t\t\t\tsetExpanded(false);\r\n\t\t\t}}\r\n\t\t>\r\n\t\t\t{option.buttonLabel}\r\n\t\t</div>\r\n\t));\r\n\r\n\tconst buttonAction = () => {\r\n\t\tif (expanded) {\r\n\t\t\tsetExpanded(false);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (mainAction) {\r\n\t\t\tmainAction();\r\n\t\t} else {\r\n\t\t\t() => setExpanded(!expanded);\r\n\t\t}\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div ref={wrapperRef} className=\"finsemble-dropdown-action__btn-container\">\r\n\t\t\t<div className=\"finsemble-dropdown-action__btn\">\r\n\t\t\t\t<span className=\"btn-label\" onClick={buttonAction}>\r\n\t\t\t\t\t{buttonLabel}\r\n\t\t\t\t</span>\r\n\t\t\t\t<span className=\"separator\"></span>\r\n\t\t\t\t<div className=\"expand-options\" onClick={() => setExpanded(!expanded)}>\r\n\t\t\t\t\t<span className=\"caret\"></span>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t{expanded ? <div className=\"finsemble-dropdown-action__btn-options\">{options}</div> : null}\r\n\t\t</div>\r\n\t);\r\n};\r\n\r\nexport default DropdownButton;\r\n"]}
|
|
@@ -4,11 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
/// <reference types="react" />
|
|
6
6
|
import "./css/file-input.css";
|
|
7
|
-
declare global {
|
|
8
|
-
interface Window {
|
|
9
|
-
File: object;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
7
|
export declare type FileInputUploadCb = (fileObject: File, cb?: (progress: number) => void) => Promise<{
|
|
13
8
|
err: string | null;
|
|
14
9
|
path: string;
|
|
@@ -36,7 +36,7 @@ export const FileInput = ({ acceptTypes, value, onSetValue, id, shouldUpload = t
|
|
|
36
36
|
dispatch(SmartDesktopDesignerActions.delete_project_error(INVALID_FILE_TYPE_ERROR));
|
|
37
37
|
setErrorMessage(null);
|
|
38
38
|
setPath(successPath);
|
|
39
|
-
onSetValue
|
|
39
|
+
onSetValue === null || onSetValue === void 0 ? void 0 : onSetValue(successPath);
|
|
40
40
|
fileInput.value = "";
|
|
41
41
|
}
|
|
42
42
|
};
|
|
@@ -48,12 +48,9 @@ export const FileInput = ({ acceptTypes, value, onSetValue, id, shouldUpload = t
|
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
50
|
setIsUploading(true);
|
|
51
|
-
uploadFunction
|
|
51
|
+
uploadFunction === null || uploadFunction === void 0 ? void 0 : uploadFunction(fileObj, (progress) => {
|
|
52
52
|
setUploadProgress(progress);
|
|
53
|
-
})
|
|
54
|
-
.then(uploadSuccess)
|
|
55
|
-
.catch(uploadError)
|
|
56
|
-
.finally(() => {
|
|
53
|
+
}).then(uploadSuccess).catch(uploadError).finally(() => {
|
|
57
54
|
setIsUploading(false);
|
|
58
55
|
setUploadProgress(0);
|
|
59
56
|
});
|
|
@@ -62,7 +59,7 @@ export const FileInput = ({ acceptTypes, value, onSetValue, id, shouldUpload = t
|
|
|
62
59
|
if (shouldUpload) {
|
|
63
60
|
uploadFile(fileObj);
|
|
64
61
|
}
|
|
65
|
-
else if (fileObj
|
|
62
|
+
else if (fileObj === null || fileObj === void 0 ? void 0 : fileObj.path) {
|
|
66
63
|
uploadSuccess({
|
|
67
64
|
err: null,
|
|
68
65
|
path: fileObj.path,
|
|
@@ -76,7 +73,8 @@ export const FileInput = ({ acceptTypes, value, onSetValue, id, shouldUpload = t
|
|
|
76
73
|
setPath(value || "");
|
|
77
74
|
}, [value]);
|
|
78
75
|
const onFileChange = (e) => {
|
|
79
|
-
|
|
76
|
+
var _a;
|
|
77
|
+
const fileObj = (_a = e.target.files) === null || _a === void 0 ? void 0 : _a[0];
|
|
80
78
|
if (fileObj !== undefined) {
|
|
81
79
|
processFile(fileObj);
|
|
82
80
|
}
|
|
@@ -96,7 +94,7 @@ export const FileInput = ({ acceptTypes, value, onSetValue, id, shouldUpload = t
|
|
|
96
94
|
fileInputElement.current.click();
|
|
97
95
|
} })),
|
|
98
96
|
React.createElement("div", { className: "file-input-value" },
|
|
99
|
-
React.createElement("input", { className: "file-input-value-input", type: "text", disabled: true, value: path, "aria-invalid": isInvalid,
|
|
97
|
+
React.createElement("input", Object.assign({ className: "file-input-value-input", type: "text", disabled: true, value: path, "aria-invalid": isInvalid }, { id })),
|
|
100
98
|
errorMessage && React.createElement("div", { className: "file-input-error" }, errorMessage)),
|
|
101
99
|
React.createElement("div", { className: "file-input-status" }, isUploading ? (React.createElement("div", { className: "file-input-progress-container" },
|
|
102
100
|
uploadProgress,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileInput.js","sourceRoot":"","sources":["../../../src/components/common/FileInput.tsx"],"names":[],"mappings":"AAAA;;;GA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C,CACH,CAAC,YAAY,IAAI,yCAAK,CACtB,CACI,CACD,CACI,CACX,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport React, { useState, useRef, useEffect } from \"react\";\r\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\r\nimport { useDispatch } from \"../../store\";\r\nimport { ProjectError } from \"../../types/smartDesktopDesignerTypes\";\r\n\r\nimport { Button } from \"./Button\";\r\nimport \"./css/file-input.css\";\r\n\r\nimport { DropZone, FileWithPath } from \"./DropZone\";\r\nimport { validateFilename } from \"./file_helpers\";\r\n\r\nexport type FileInputUploadCb = (\r\n\tfileObject: File,\r\n\tcb?: (progress: number) => void\r\n) => Promise<{ err: string | null; path: string }>;\r\n\r\nexport type FileInputProps = {\r\n\tacceptTypes: string[];\r\n\tvalue: string;\r\n\tid?: string;\r\n\tshouldUpload?: boolean;\r\n\tonSetValue?: (value: string) => void;\r\n\tuploadFunction?: FileInputUploadCb;\r\n\tpresetFile?: null | File;\r\n\tsuppressDropzone?: boolean;\r\n};\r\n\r\nconst INVALID_FILE_TYPE_ERROR: ProjectError = {\r\n\tviewId: \"themes\",\r\n\tmessage: \"Your uploaded file is not in the correct format\",\r\n};\r\n\r\nconst defaultUploadFunction = async () => {\r\n\treturn { err: null, path: \"\" };\r\n};\r\n\r\n/**\r\n * A Browse button with a hidden file input to allow for a file select dialog and extraction of a path\r\n *\r\n * @param {FileInputProps} { acceptTypes, value, onSetValue, shouldUpload=true, uploadFunction = defaultUploadFunction}\r\n * @return {*}\r\n */\r\nexport const FileInput = ({\r\n\tacceptTypes,\r\n\tvalue,\r\n\tonSetValue,\r\n\tid,\r\n\tshouldUpload = true,\r\n\tuploadFunction = defaultUploadFunction,\r\n\tpresetFile = null,\r\n\tsuppressDropzone = false,\r\n}: FileInputProps) => {\r\n\tconst dispatch = useDispatch();\r\n\tconst fileInputElement = useRef({} as HTMLInputElement);\r\n\tconst [isUploading, setIsUploading] = useState(false);\r\n\tconst [uploadProgress, setUploadProgress] = useState(0);\r\n\tconst [fileInput, setFileInput] = useState({} as HTMLInputElement); // cast to correct type so typescript doesn't complain\r\n\tconst [path, setPath] = useState(value || \"\");\r\n\tconst [errorMessage, setErrorMessage] = useState(null as string | null);\r\n\tconst [handedFile, setHandedFile] = useState<FileWithPath | null>(presetFile);\r\n\r\n\tconst isInvalid = validateFilename(acceptTypes, path);\r\n\r\n\tconst uploadSuccess = ({ err, path: successPath }: { err: string | null; path: string }) => {\r\n\t\tif (err) {\r\n\t\t\tdispatch(SmartDesktopDesignerActions.set_project_error(INVALID_FILE_TYPE_ERROR));\r\n\r\n\t\t\tsetErrorMessage(err);\r\n\t\t\tsetPath(\"\");\r\n\t\t} else {\r\n\t\t\tdispatch(SmartDesktopDesignerActions.delete_project_error(INVALID_FILE_TYPE_ERROR));\r\n\t\t\tsetErrorMessage(null);\r\n\t\t\tsetPath(successPath);\r\n\r\n\t\t\tonSetValue?.(successPath);\r\n\r\n\t\t\tfileInput.value = \"\";\r\n\t\t}\r\n\t};\r\n\r\n\tconst uploadError = (err: string) => {\r\n\t\tsetErrorMessage(err);\r\n\t};\r\n\r\n\tconst uploadFile = (fileObj: FileWithPath | undefined) => {\r\n\t\t// If it's not a file, we can't do anything with it\r\n\t\tif (!(fileObj instanceof File)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tsetIsUploading(true);\r\n\t\tuploadFunction?.(fileObj, (progress: number) => {\r\n\t\t\tsetUploadProgress(progress);\r\n\t\t})\r\n\t\t\t.then(uploadSuccess)\r\n\t\t\t.catch(uploadError)\r\n\t\t\t.finally(() => {\r\n\t\t\t\tsetIsUploading(false);\r\n\t\t\t\tsetUploadProgress(0);\r\n\t\t\t});\r\n\t};\r\n\r\n\tconst processFile = (fileObj: FileWithPath) => {\r\n\t\tif (shouldUpload) {\r\n\t\t\tuploadFile(fileObj);\r\n\t\t} else if (fileObj?.path) {\r\n\t\t\t// If the consumer doesn't want the file actually uploaded, just return the file name\r\n\t\t\tuploadSuccess({\r\n\t\t\t\terr: null,\r\n\t\t\t\tpath: fileObj.path,\r\n\t\t\t});\r\n\t\t}\r\n\t\tsetIsUploading(false);\r\n\t\tsetUploadProgress(0);\r\n\t\tsetErrorMessage(null);\r\n\t};\r\n\r\n\tuseEffect(() => {\r\n\t\tsetPath(value || \"\");\r\n\t}, [value]);\r\n\r\n\tconst onFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n\t\tconst fileObj = e.target.files?.[0] as FileWithPath | undefined;\r\n\r\n\t\tif (fileObj !== undefined) {\r\n\t\t\tprocessFile(fileObj);\r\n\t\t}\r\n\r\n\t\tsetFileInput(e.target);\r\n\t};\r\n\r\n\t// Check if props updated\r\n\tif (handedFile !== presetFile) {\r\n\t\tsetHandedFile(presetFile);\r\n\t\tif (presetFile !== null) {\r\n\t\t\tuploadFile(presetFile);\r\n\t\t}\r\n\t}\r\n\r\n\treturn (\r\n\t\t<DropZone processFile={processFile} suppress={suppressDropzone}>\r\n\t\t\t<div className=\"file-input-container\">\r\n\t\t\t\t<div className=\"file-input-actions\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\tref={fileInputElement}\r\n\t\t\t\t\t\ttype=\"file\"\r\n\t\t\t\t\t\tonChange={onFileChange}\r\n\t\t\t\t\t\taccept={acceptTypes.join(\", \")}\r\n\t\t\t\t\t\ttabIndex={-1}\r\n\t\t\t\t\t\taria-hidden=\"true\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<Button\r\n\t\t\t\t\t\tfashion=\"primary\"\r\n\t\t\t\t\t\ttext=\"Browse\"\r\n\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\tfileInputElement.current.click();\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t/>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div className=\"file-input-value\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\tclassName=\"file-input-value-input\"\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\tvalue={path}\r\n\t\t\t\t\t\taria-invalid={isInvalid}\r\n\t\t\t\t\t\t{...{ id }}\r\n\t\t\t\t\t></input>\r\n\t\t\t\t\t{errorMessage && <div className=\"file-input-error\">{errorMessage}</div>}\r\n\t\t\t\t</div>\r\n\t\t\t\t<div className=\"file-input-status\">\r\n\t\t\t\t\t{isUploading ? (\r\n\t\t\t\t\t\t<div className=\"file-input-progress-container\">{uploadProgress}% uploaded</div>\r\n\t\t\t\t\t) : (\r\n\t\t\t\t\t\t!errorMessage && <></>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</DropZone>\r\n\t);\r\n};\r\n"]}
|