@finsemble/finsemble-ui 7.0.1 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +13 -11
- package/react/actions/favoriteActions.d.ts +1 -0
- package/react/actions/favoriteActions.js +1 -0
- package/react/actions/favoriteActions.js.map +1 -1
- package/react/actions/menuActions.d.ts +1 -0
- package/react/actions/menuActions.js +1 -0
- package/react/actions/menuActions.js.map +1 -1
- package/react/actions/rootActions.d.ts +1 -0
- package/react/actions/rootActions.js +1 -0
- package/react/actions/rootActions.js.map +1 -1
- package/react/actions/searchActions.d.ts +1 -0
- package/react/actions/searchActions.js +1 -0
- package/react/actions/searchActions.js.map +1 -1
- package/react/actions/toolbarActions.d.ts +34 -0
- package/react/actions/toolbarActions.js +17 -0
- package/react/actions/toolbarActions.js.map +1 -1
- package/react/actions/workspaceActions.d.ts +1 -0
- package/react/actions/workspaceActions.js +1 -0
- package/react/actions/workspaceActions.js.map +1 -1
- package/react/assets/css/advancedAppLauncher.css +22 -19
- package/react/assets/css/appCatalog.css +67 -72
- package/react/assets/css/authentication.css +4 -3
- package/react/assets/css/button.css +3 -10
- package/react/assets/css/core/formElements.css +1 -1
- package/react/assets/css/core/icons.css +3 -2
- package/react/assets/css/core/notifications.css +2 -2
- package/react/assets/css/core/windowFrame.css +9 -9
- package/react/assets/css/dashbar.css +1 -1
- package/react/assets/css/defaultTheme.css +9 -53
- package/react/assets/css/dialogs.css +13 -11
- package/react/assets/css/favorites.css +3 -1
- package/react/assets/css/finsemble.css +3 -2
- package/react/assets/css/font-finance.css +233 -120
- package/react/assets/css/fonts/Open_Sans/OpenSans-Definition.css +10 -10
- package/react/assets/css/linkerWindow.css +2 -2
- package/react/assets/css/menus.css +10 -10
- package/react/assets/css/notificationsCenter.css +16 -31
- package/react/assets/css/processMonitor.css +7 -4
- package/react/assets/css/search.css +1 -1
- package/react/assets/css/shared/animations.css +10 -4
- package/react/assets/css/shared/common.css +2 -2
- package/react/assets/css/tags.css +10 -10
- package/react/assets/css/toolbar.css +22 -19
- package/react/assets/css/userPreferences.css +12 -14
- package/react/assets/css/windowTitleBar.css +75 -36
- package/react/componentTemplateGenerator.js +3 -2
- package/react/componentTemplateGenerator.js.map +1 -1
- package/react/components/FinsembleProvider.d.ts +7 -0
- package/react/components/FinsembleProvider.js +2 -0
- package/react/components/FinsembleProvider.js.map +1 -1
- package/react/components/appCatalog/AppCatalog.d.ts +4 -0
- package/react/components/appCatalog/AppCatalog.js +4 -0
- package/react/components/appCatalog/AppCatalog.js.map +1 -1
- package/react/components/appCatalog/AppCatalogComponent.d.ts +58 -0
- package/react/components/appCatalog/AppCatalogComponent.js +70 -1
- package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
- package/react/components/appCatalog/components/AppCard.d.ts +35 -0
- package/react/components/appCatalog/components/AppCard.js +42 -0
- package/react/components/appCatalog/components/AppCard.js.map +1 -1
- package/react/components/appCatalog/components/AppResults.d.ts +10 -0
- package/react/components/appCatalog/components/AppResults.js +24 -0
- package/react/components/appCatalog/components/AppResults.js.map +1 -1
- package/react/components/appCatalog/components/Carousel.d.ts +26 -0
- package/react/components/appCatalog/components/Carousel.js +34 -0
- package/react/components/appCatalog/components/Carousel.js.map +1 -1
- package/react/components/appCatalog/components/EmptyResults.d.ts +4 -0
- package/react/components/appCatalog/components/EmptyResults.js +8 -0
- package/react/components/appCatalog/components/EmptyResults.js.map +1 -1
- package/react/components/appCatalog/components/Hero.d.ts +15 -0
- package/react/components/appCatalog/components/Hero.js +15 -0
- package/react/components/appCatalog/components/Hero.js.map +1 -1
- package/react/components/appCatalog/components/Home.d.ts +6 -4
- package/react/components/appCatalog/components/Home.js +10 -0
- package/react/components/appCatalog/components/Home.js.map +1 -1
- package/react/components/appCatalog/components/SearchBar.d.ts +31 -0
- package/react/components/appCatalog/components/SearchBar.js +33 -0
- package/react/components/appCatalog/components/SearchBar.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppDescription.d.ts +5 -0
- package/react/components/appCatalog/components/Showcase/AppDescription.js +9 -0
- package/react/components/appCatalog/components/Showcase/AppDescription.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppDevNotes.d.ts +7 -0
- package/react/components/appCatalog/components/Showcase/AppDevNotes.js +15 -0
- package/react/components/appCatalog/components/Showcase/AppDevNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppShowcase.d.ts +17 -0
- package/react/components/appCatalog/components/Showcase/AppShowcase.js +25 -0
- package/react/components/appCatalog/components/Showcase/AppShowcase.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/Header.d.ts +7 -0
- package/react/components/appCatalog/components/Showcase/Header.js +12 -0
- package/react/components/appCatalog/components/Showcase/Header.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/ImageCarousel.d.ts +7 -0
- package/react/components/appCatalog/components/Showcase/ImageCarousel.js +11 -0
- package/react/components/appCatalog/components/Showcase/ImageCarousel.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/Modal.d.ts +10 -0
- package/react/components/appCatalog/components/Showcase/Modal.js +10 -0
- package/react/components/appCatalog/components/Showcase/Modal.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/ReleaseNotes.d.ts +5 -0
- package/react/components/appCatalog/components/Showcase/ReleaseNotes.js +9 -0
- package/react/components/appCatalog/components/Showcase/ReleaseNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/SupportNotes.d.ts +6 -0
- package/react/components/appCatalog/components/Showcase/SupportNotes.js +11 -0
- package/react/components/appCatalog/components/Showcase/SupportNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/VersionNotes.d.ts +5 -0
- package/react/components/appCatalog/components/Showcase/VersionNotes.js +9 -0
- package/react/components/appCatalog/components/Showcase/VersionNotes.js.map +1 -1
- package/react/components/appCatalog/components/Tag.d.ts +6 -0
- package/react/components/appCatalog/components/Tag.js +10 -0
- package/react/components/appCatalog/components/Tag.js.map +1 -1
- package/react/components/appCatalog/components/Toast.d.ts +5 -0
- package/react/components/appCatalog/components/Toast.js +9 -0
- package/react/components/appCatalog/components/Toast.js.map +1 -1
- package/react/components/appCatalog/components/helpers.js +1 -0
- package/react/components/appCatalog/components/helpers.js.map +1 -1
- package/react/components/appCatalog/modules/AppDirectory.d.ts +5 -0
- package/react/components/appCatalog/modules/AppDirectory.js +5 -0
- package/react/components/appCatalog/modules/AppDirectory.js.map +1 -1
- package/react/components/appCatalog/modules/FDC3.d.ts +37 -0
- package/react/components/appCatalog/modules/FDC3.js +40 -0
- package/react/components/appCatalog/modules/FDC3.js.map +1 -1
- package/react/components/appCatalog/stores/appStore.js +1 -0
- package/react/components/appCatalog/stores/appStore.js.map +1 -1
- package/react/components/appCatalog/stores/storeActions.d.ts +91 -0
- package/react/components/appCatalog/stores/storeActions.js +116 -1
- package/react/components/appCatalog/stores/storeActions.js.map +1 -1
- package/react/components/common/Checkbox.d.ts +1 -0
- package/react/components/common/Checkbox.js +2 -2
- package/react/components/common/Checkbox.js.map +1 -1
- package/react/components/common/ColorPicker.d.ts +5 -0
- package/react/components/common/ColorPicker.js +40 -0
- package/react/components/common/ColorPicker.js.map +1 -1
- package/react/components/common/DropZone.d.ts +11 -0
- package/react/components/common/DropZone.js +21 -1
- package/react/components/common/DropZone.js.map +1 -1
- package/react/components/common/DropdownButton.d.ts +4 -0
- package/react/components/common/DropdownButton.js +4 -0
- package/react/components/common/DropdownButton.js.map +1 -1
- package/react/components/common/ErrorBoundary.d.ts +18 -0
- package/react/components/common/ErrorBoundary.js +21 -0
- package/react/components/common/ErrorBoundary.js.map +1 -1
- package/react/components/common/FileInput.d.ts +8 -1
- package/react/components/common/FileInput.js +19 -4
- package/react/components/common/FileInput.js.map +1 -1
- package/react/components/common/FinsembleIcon.d.ts +10 -0
- package/react/components/common/FinsembleIcon.js +51 -2
- package/react/components/common/FinsembleIcon.js.map +1 -1
- package/react/components/common/FinsembleSelect.js +5 -1
- package/react/components/common/FinsembleSelect.js.map +1 -1
- package/react/components/common/FinsembleToggleButtonBar.js +1 -1
- package/react/components/common/FinsembleToggleButtonBar.js.map +1 -1
- package/react/components/common/InputTable.d.ts +7 -0
- package/react/components/common/InputTable.js +7 -0
- package/react/components/common/InputTable.js.map +1 -1
- package/react/components/common/Tab.js +3 -0
- package/react/components/common/Tab.js.map +1 -1
- package/react/components/common/TimeSelect.js +24 -0
- package/react/components/common/TimeSelect.js.map +1 -1
- package/react/components/common/Tooltip.js +2 -0
- package/react/components/common/Tooltip.js.map +1 -1
- package/react/components/common/css/accordion.css +9 -6
- package/react/components/common/css/application-edit-page.css +39 -44
- package/react/components/common/css/button.css +10 -5
- package/react/components/common/css/color-picker.css +3 -3
- package/react/components/common/css/drop-zone.css +2 -6
- package/react/components/common/css/file-input.css +5 -5
- package/react/components/common/css/header.css +3 -2
- package/react/components/common/css/icon.css +1 -1
- package/react/components/common/css/loading-spinner.css +7 -12
- package/react/components/common/css/selector.css +4 -4
- package/react/components/common/css/styles.css +22 -16
- package/react/components/common/css/tab.css +8 -8
- package/react/components/common/css/time-select.css +1 -0
- package/react/components/common/css/toggle.css +4 -4
- package/react/components/common/css/tooltip.css +2 -3
- package/react/components/common/file_helpers.js +2 -0
- package/react/components/common/file_helpers.js.map +1 -1
- package/react/components/common/helpers.js +1 -0
- package/react/components/common/helpers.js.map +1 -1
- package/react/components/common/stories/ColorPicker.stories.js +3 -0
- package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
- package/react/components/common/stories/FileInput.stories.d.ts +3 -1
- package/react/components/common/stories/FileInput.stories.js +12 -0
- package/react/components/common/stories/FileInput.stories.js.map +1 -1
- package/react/components/common/tests/Accordion.spec.js +6 -0
- package/react/components/common/tests/Accordion.spec.js.map +1 -1
- package/react/components/common/tests/Checkbox.spec.js +1 -0
- package/react/components/common/tests/Checkbox.spec.js.map +1 -1
- package/react/components/common/tests/ColorPicker.spec.js +6 -0
- package/react/components/common/tests/ColorPicker.spec.js.map +1 -1
- package/react/components/common/tests/DropZone.spec.js +1 -0
- package/react/components/common/tests/DropZone.spec.js.map +1 -1
- package/react/components/common/tests/FileInput.spec.js +22 -0
- package/react/components/common/tests/FileInput.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleSelect.spec.js +1 -0
- package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleToggle.spec.js +1 -0
- package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleToggleButtonBar.spec.js +1 -0
- package/react/components/common/tests/FinsembleToggleButtonBar.spec.js.map +1 -1
- package/react/components/common/tests/TimeSelect.spec.js +4 -0
- package/react/components/common/tests/TimeSelect.spec.js.map +1 -1
- package/react/components/common/tests/Tooltip.spec.js +16 -0
- package/react/components/common/tests/Tooltip.spec.js.map +1 -1
- package/react/components/favorites/FavoriteMaker.d.ts +8 -0
- package/react/components/favorites/FavoriteMaker.js +9 -0
- package/react/components/favorites/FavoriteMaker.js.map +1 -1
- package/react/components/favorites/FavoritesShell.d.ts +4 -0
- package/react/components/favorites/FavoritesShell.js +13 -1
- package/react/components/favorites/FavoritesShell.js.map +1 -1
- package/react/components/favorites/FavoritesShell.spec.js +3 -0
- package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverContainer.js +8 -0
- package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.css +16 -3
- package/react/components/fdc3Resolver/ResolverDialog.js +7 -2
- package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.spec.js +3 -2
- package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.stories.js +2 -0
- package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
- package/react/components/icon/Icon.d.ts +13 -0
- package/react/components/icon/Icon.js +34 -0
- package/react/components/icon/Icon.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialog.d.ts +4 -0
- package/react/components/legacyControls/FinsembleDialog.js +15 -0
- package/react/components/legacyControls/FinsembleDialog.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogButton.d.ts +3 -0
- package/react/components/legacyControls/FinsembleDialogButton.js +6 -1
- package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogQuestion.d.ts +7 -0
- package/react/components/legacyControls/FinsembleDialogQuestion.js +7 -0
- package/react/components/legacyControls/FinsembleDialogQuestion.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogTextInput.d.ts +3 -0
- package/react/components/legacyControls/FinsembleDialogTextInput.js +14 -0
- package/react/components/legacyControls/FinsembleDialogTextInput.js.map +1 -1
- package/react/components/legacyControls/FinsembleDnDContext.d.ts +19 -0
- package/react/components/legacyControls/FinsembleDnDContext.js +126 -1
- package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
- package/react/components/legacyControls/FinsembleDraggable.d.ts +3 -0
- package/react/components/legacyControls/FinsembleDraggable.js +3 -0
- package/react/components/legacyControls/FinsembleDraggable.js.map +1 -1
- package/react/components/legacyControls/FinsembleHoverDetector.d.ts +15 -0
- package/react/components/legacyControls/FinsembleHoverDetector.js +26 -1
- package/react/components/legacyControls/FinsembleHoverDetector.js.map +1 -1
- package/react/components/legacyControls/FinsembleMenuSection.d.ts +4 -0
- package/react/components/legacyControls/FinsembleMenuSection.js +38 -0
- package/react/components/legacyControls/FinsembleMenuSection.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js +1 -0
- package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js +1 -0
- package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
- package/react/components/linker/LinkerMenu.d.ts +3 -0
- package/react/components/linker/LinkerMenu.js +21 -0
- package/react/components/linker/LinkerMenu.js.map +1 -1
- package/react/components/linker/LinkerMenuDeprecated.d.ts +3 -0
- package/react/components/linker/LinkerMenuDeprecated.js +9 -0
- package/react/components/linker/LinkerMenuDeprecated.js.map +1 -1
- package/react/components/menu/Menu.d.ts +15 -0
- package/react/components/menu/Menu.js +15 -0
- package/react/components/menu/Menu.js.map +1 -1
- package/react/components/menu/MenuAutoResizer.d.ts +7 -0
- package/react/components/menu/MenuAutoResizer.js +27 -0
- package/react/components/menu/MenuAutoResizer.js.map +1 -1
- package/react/components/menu/MenuContent.d.ts +4 -0
- package/react/components/menu/MenuContent.js +4 -0
- package/react/components/menu/MenuContent.js.map +1 -1
- package/react/components/menu/MenuHotKey.d.ts +14 -0
- package/react/components/menu/MenuHotKey.js +15 -0
- package/react/components/menu/MenuHotKey.js.map +1 -1
- package/react/components/menu/MenuItem.d.ts +8 -0
- package/react/components/menu/MenuItem.js +13 -2
- package/react/components/menu/MenuItem.js.map +1 -1
- package/react/components/menu/MenuPortal.js +112 -2
- package/react/components/menu/MenuPortal.js.map +1 -1
- package/react/components/menu/MenuShell.d.ts +16 -0
- package/react/components/menu/MenuShell.js +26 -0
- package/react/components/menu/MenuShell.js.map +1 -1
- package/react/components/menu/MenuToggle.d.ts +3 -0
- package/react/components/menu/MenuToggle.js +3 -0
- package/react/components/menu/MenuToggle.js.map +1 -1
- package/react/components/menu/keyboardNavigation.d.ts +12 -0
- package/react/components/menu/keyboardNavigation.js +55 -0
- package/react/components/menu/keyboardNavigation.js.map +1 -1
- package/react/components/menu/menuContext.d.ts +6 -0
- package/react/components/menu/menuContext.js +6 -0
- package/react/components/menu/menuContext.js.map +1 -1
- package/react/components/menu/menuHelpers.d.ts +22 -0
- package/react/components/menu/menuHelpers.js +58 -1
- package/react/components/menu/menuHelpers.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerControls.js +8 -0
- package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerHeader.js +5 -0
- package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +18 -0
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +3 -0
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
- package/react/components/notifications/components/shared/CheckButton.js +1 -1
- package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.d.ts +9 -0
- package/react/components/notifications/components/shared/NotificationCardShell.js +13 -6
- package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
- package/react/components/notifications/components/shared/OverflowMenu.d.ts +4 -0
- package/react/components/notifications/components/shared/OverflowMenu.js +16 -2
- package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
- package/react/components/notifications/components/views/CardView.js +3 -0
- package/react/components/notifications/components/views/CardView.js.map +1 -1
- package/react/components/notifications/components/views/ListView.js +8 -0
- package/react/components/notifications/components/views/ListView.js.map +1 -1
- package/react/components/notifications/notificationsContext.d.ts +4 -0
- package/react/components/notifications/notificationsContext.js +4 -0
- package/react/components/notifications/notificationsContext.js.map +1 -1
- package/react/components/notifications/types.d.ts +3 -0
- package/react/components/notifications/utils.d.ts +4 -0
- package/react/components/notifications/utils.js +4 -0
- package/react/components/notifications/utils.js.map +1 -1
- package/react/components/processMonitor/ProcessMonitor.d.ts +3 -0
- package/react/components/processMonitor/ProcessMonitor.js +17 -2
- package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
- package/react/components/processMonitor/components/ChildWindow.d.ts +3 -0
- package/react/components/processMonitor/components/ChildWindow.js +5 -0
- package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
- package/react/components/processMonitor/components/ListHeader.d.ts +5 -0
- package/react/components/processMonitor/components/ListHeader.js +7 -0
- package/react/components/processMonitor/components/ListHeader.js.map +1 -1
- package/react/components/processMonitor/components/ProcessStatistics.js +12 -1
- package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
- package/react/components/processMonitor/constants.js +6 -0
- package/react/components/processMonitor/constants.js.map +1 -1
- package/react/components/processMonitor/helpers.d.ts +13 -0
- package/react/components/processMonitor/helpers.js +23 -3
- package/react/components/processMonitor/helpers.js.map +1 -1
- package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +39 -0
- package/react/components/processMonitor/stores/ProcessMonitorStore.js +50 -0
- package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
- package/react/components/quickComponentForm/QuickComponentForm.d.ts +3 -0
- package/react/components/quickComponentForm/QuickComponentForm.js +20 -0
- package/react/components/quickComponentForm/QuickComponentForm.js.map +1 -1
- package/react/components/quickComponentForm/quickComponent.css +1 -1
- package/react/components/sdd/AddApp.d.ts +4 -2
- package/react/components/sdd/AddApp.js +57 -49
- package/react/components/sdd/AddApp.js.map +1 -1
- package/react/components/sdd/AppEditAccess.js +8 -0
- package/react/components/sdd/AppEditAccess.js.map +1 -1
- package/react/components/sdd/AppEditPage.d.ts +2 -1
- package/react/components/sdd/AppEditPage.js +148 -361
- package/react/components/sdd/AppEditPage.js.map +1 -1
- package/react/components/sdd/Appearance.css +1 -1
- package/react/components/sdd/Appearance.js +3 -0
- package/react/components/sdd/Appearance.js.map +1 -1
- package/react/components/sdd/Application.js +39 -7
- package/react/components/sdd/Application.js.map +1 -1
- package/react/components/sdd/Applications.js +89 -13
- package/react/components/sdd/Applications.js.map +1 -1
- package/react/components/sdd/AssetsPage.css +3 -3
- package/react/components/sdd/EditPreload.js +10 -0
- package/react/components/sdd/EditPreload.js.map +1 -1
- package/react/components/sdd/ExportCloud.js +4 -0
- package/react/components/sdd/ExportCloud.js.map +1 -1
- package/react/components/sdd/Publish.js +2 -0
- package/react/components/sdd/Publish.js.map +1 -1
- package/react/components/sdd/PublishProgress.js +11 -1
- package/react/components/sdd/PublishProgress.js.map +1 -1
- package/react/components/sdd/SmartDesktopDesigner.js +17 -0
- package/react/components/sdd/SmartDesktopDesigner.js.map +1 -1
- package/react/components/sdd/ThemePage.css +6 -23
- package/react/components/sdd/ThemePage.js +1 -1
- package/react/components/sdd/ThemePage.js.map +1 -1
- package/react/components/sdd/Themes.js +2 -0
- package/react/components/sdd/Themes.js.map +1 -1
- package/react/components/sdd/Toolbar.js +7 -0
- package/react/components/sdd/Toolbar.js.map +1 -1
- package/react/components/sdd/appEditPage/Behavior.d.ts +34 -0
- package/react/components/sdd/appEditPage/Behavior.js +134 -0
- package/react/components/sdd/appEditPage/Behavior.js.map +1 -0
- package/react/components/sdd/appEditPage/Component.d.ts +22 -0
- package/react/components/sdd/appEditPage/Component.js +76 -0
- package/react/components/sdd/appEditPage/Component.js.map +1 -0
- package/react/components/sdd/appEditPage/DebugToolkit.d.ts +9 -0
- package/react/components/sdd/appEditPage/DebugToolkit.js +20 -0
- package/react/components/sdd/appEditPage/DebugToolkit.js.map +1 -0
- package/react/components/sdd/appEditPage/Interop.d.ts +10 -0
- package/react/components/sdd/appEditPage/Interop.js +40 -0
- package/react/components/sdd/appEditPage/Interop.js.map +1 -0
- package/react/components/sdd/appEditPage/Position.d.ts +18 -0
- package/react/components/sdd/appEditPage/Position.js +72 -0
- package/react/components/sdd/appEditPage/Position.js.map +1 -0
- package/react/components/sdd/appEditPage/Preloads.d.ts +9 -0
- package/react/components/sdd/appEditPage/Preloads.js +16 -0
- package/react/components/sdd/appEditPage/Preloads.js.map +1 -0
- package/react/components/sdd/appEditPage/SelectConnect.d.ts +15 -0
- package/react/components/sdd/appEditPage/SelectConnect.js +28 -0
- package/react/components/sdd/appEditPage/SelectConnect.js.map +1 -0
- package/react/components/sdd/appEditPage/Workspace.d.ts +12 -0
- package/react/components/sdd/appEditPage/Workspace.js +30 -0
- package/react/components/sdd/appEditPage/Workspace.js.map +1 -0
- package/react/components/sdd/common/getCSSVars.js +7 -2
- package/react/components/sdd/common/getCSSVars.js.map +1 -1
- package/react/components/sdd/common/setPreloadDefaults.js +4 -0
- package/react/components/sdd/common/setPreloadDefaults.js.map +1 -1
- package/react/components/sdd/css/addApp.css +18 -5
- package/react/components/sdd/css/appearance.css +6 -0
- package/react/components/sdd/css/applications.css +27 -14
- package/react/components/sdd/css/authentication.css +7 -6
- package/react/components/sdd/css/buttons.css +1 -1
- package/react/components/sdd/css/export.css +5 -3
- package/react/components/sdd/css/getting-started.css +2 -2
- package/react/components/sdd/css/nav.css +8 -11
- package/react/components/sdd/css/project-header.css +5 -7
- package/react/components/sdd/css/styles.css +29 -23
- package/react/components/sdd/css/views.css +4 -3
- package/react/components/sdd/fixtures/apps.js +12 -0
- package/react/components/sdd/fixtures/apps.js.map +1 -1
- package/react/components/sdd/fixtures/configTemplate.js +1 -0
- package/react/components/sdd/fixtures/configTemplate.js.map +1 -1
- package/react/components/sdd/fixtures/publishProgress.js +40 -0
- package/react/components/sdd/fixtures/publishProgress.js.map +1 -1
- package/react/components/sdd/sdd_helpers.d.ts +6 -0
- package/react/components/sdd/sdd_helpers.js +6 -0
- package/react/components/sdd/sdd_helpers.js.map +1 -1
- package/react/components/sdd/smartDesktopClient.d.ts +303 -0
- package/react/components/sdd/smartDesktopClient.js +334 -1
- package/react/components/sdd/smartDesktopClient.js.map +1 -1
- package/react/components/sdd/smartDesktopClient.spec.js +5 -2
- package/react/components/sdd/smartDesktopClient.spec.js.map +1 -1
- package/react/components/sdd/stories/AddApp.stories.d.ts +2 -1
- package/react/components/sdd/stories/AddApp.stories.js +8 -0
- package/react/components/sdd/stories/AddApp.stories.js.map +1 -1
- package/react/components/sdd/stories/AppEditPage.stories.d.ts +3 -1
- package/react/components/sdd/stories/AppEditPage.stories.js +3 -0
- package/react/components/sdd/stories/AppEditPage.stories.js.map +1 -1
- package/react/components/sdd/stories/Appearance.stories.js +1 -0
- package/react/components/sdd/stories/Appearance.stories.js.map +1 -1
- package/react/components/sdd/tests/AddApp.spec.js +40 -3
- package/react/components/sdd/tests/AddApp.spec.js.map +1 -1
- package/react/components/sdd/tests/AppEditPage.spec.js +16 -0
- package/react/components/sdd/tests/AppEditPage.spec.js.map +1 -1
- package/react/components/sdd/tests/Application.spec.js +33 -438
- package/react/components/sdd/tests/Application.spec.js.map +1 -1
- package/react/components/sdd/tests/Applications.spec.d.ts +1 -1
- package/react/components/sdd/tests/Applications.spec.js +29 -5
- package/react/components/sdd/tests/Applications.spec.js.map +1 -1
- package/react/components/sdd/tests/Authentication.spec.js +7 -0
- package/react/components/sdd/tests/Authentication.spec.js.map +1 -1
- package/react/components/sdd/tests/ContentHeader.spec.js +2 -0
- package/react/components/sdd/tests/ContentHeader.spec.js.map +1 -1
- package/react/components/sdd/tests/EditPreload.spec.js +13 -0
- package/react/components/sdd/tests/EditPreload.spec.js.map +1 -1
- package/react/components/sdd/tests/Export.spec.js +2 -1
- package/react/components/sdd/tests/Export.spec.js.map +1 -1
- package/react/components/sdd/tests/ItemList.spec.js +4 -0
- package/react/components/sdd/tests/ItemList.spec.js.map +1 -1
- package/react/components/sdd/tests/OptionalSettingsView.spec.js +29 -0
- package/react/components/sdd/tests/OptionalSettingsView.spec.js.map +1 -1
- package/react/components/sdd/tests/ProjectErrors.spec.js +2 -0
- package/react/components/sdd/tests/ProjectErrors.spec.js.map +1 -1
- package/react/components/sdd/tests/Themes.spec.js +1 -1
- package/react/components/sdd/tests/Themes.spec.js.map +1 -1
- package/react/components/sdd/tests/Toolbar.spec.js +53 -0
- package/react/components/sdd/tests/Toolbar.spec.js.map +1 -1
- package/react/components/sdd/tests/a11y_helper.js +8 -0
- package/react/components/sdd/tests/a11y_helper.js.map +1 -1
- package/react/components/search/Highlight.d.ts +6 -0
- package/react/components/search/Highlight.js +19 -0
- package/react/components/search/Highlight.js.map +1 -1
- package/react/components/search/SearchBestMatch.d.ts +4 -0
- package/react/components/search/SearchBestMatch.js +11 -0
- package/react/components/search/SearchBestMatch.js.map +1 -1
- package/react/components/search/SearchInput.d.ts +5 -0
- package/react/components/search/SearchInput.js +6 -0
- package/react/components/search/SearchInput.js.map +1 -1
- package/react/components/search/SearchProviderResults.js +2 -0
- package/react/components/search/SearchProviderResults.js.map +1 -1
- package/react/components/search/SearchResult.js +6 -0
- package/react/components/search/SearchResult.js.map +1 -1
- package/react/components/search/SearchResult.spec.js +7 -0
- package/react/components/search/SearchResult.spec.js.map +1 -1
- package/react/components/search/SearchResult.stories.js +4 -0
- package/react/components/search/SearchResult.stories.js.map +1 -1
- package/react/components/search/SearchResults.js +5 -1
- package/react/components/search/SearchResults.js.map +1 -1
- package/react/components/search/SearchResults.spec.js +7 -0
- package/react/components/search/SearchResults.spec.js.map +1 -1
- package/react/components/shared/Animate.d.ts +5 -0
- package/react/components/shared/Animate.js +12 -1
- package/react/components/shared/Animate.js.map +1 -1
- package/react/components/shared/DefaultDropdownButton.js +9 -0
- package/react/components/shared/DefaultDropdownButton.js.map +1 -1
- package/react/components/shared/Tag.d.ts +0 -4
- package/react/components/shared/Tag.js +4 -0
- package/react/components/shared/Tag.js.map +1 -1
- package/react/components/shared/TagsMenu.d.ts +6 -0
- package/react/components/shared/TagsMenu.js +7 -0
- package/react/components/shared/TagsMenu.js.map +1 -1
- package/react/components/shared/addProtocolToValidURL.d.ts +6 -0
- package/react/components/shared/addProtocolToValidURL.js +6 -0
- package/react/components/shared/addProtocolToValidURL.js.map +1 -1
- package/react/components/shared/openQuitConfirmationDialog.d.ts +1 -1
- package/react/components/shared/openQuitConfirmationDialog.js +4 -4
- package/react/components/shared/openQuitConfirmationDialog.js.map +1 -1
- package/react/components/shared/tests/addProtocolToValidURL.spec.js +1 -0
- package/react/components/shared/tests/addProtocolToValidURL.spec.js.map +1 -1
- package/react/components/shared/validateURL.d.ts +18 -0
- package/react/components/shared/validateURL.js +24 -5
- package/react/components/shared/validateURL.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.css +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.d.ts +3 -0
- package/react/components/singleInputDialog/SingleInputDialog.js +44 -0
- package/react/components/singleInputDialog/SingleInputDialog.js.map +1 -1
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +6 -0
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
- package/react/components/system/System.d.ts +22 -0
- package/react/components/system/System.js +23 -1
- package/react/components/system/System.js.map +1 -1
- package/react/components/system/System.stories.js +1 -0
- package/react/components/system/System.stories.js.map +1 -1
- package/react/components/system/SystemTrayComponentShell.d.ts +6 -0
- package/react/components/system/SystemTrayComponentShell.js +9 -0
- package/react/components/system/SystemTrayComponentShell.js.map +1 -1
- package/react/components/toolbar/AutoArrange.d.ts +5 -0
- package/react/components/toolbar/AutoArrange.js +8 -1
- package/react/components/toolbar/AutoArrange.js.map +1 -1
- package/react/components/toolbar/AutoArrange.spec.js +1 -0
- package/react/components/toolbar/AutoArrange.spec.js.map +1 -1
- package/react/components/toolbar/AutoArrange.stories.js +1 -0
- package/react/components/toolbar/AutoArrange.stories.js.map +1 -1
- package/react/components/toolbar/DragHandle.d.ts +4 -0
- package/react/components/toolbar/DragHandle.js +11 -0
- package/react/components/toolbar/DragHandle.js.map +1 -1
- package/react/components/toolbar/DragHandle.spec.js +1 -0
- package/react/components/toolbar/DragHandle.spec.js.map +1 -1
- package/react/components/toolbar/DragHandle.stories.js +1 -0
- package/react/components/toolbar/DragHandle.stories.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.d.ts +4 -0
- package/react/components/toolbar/MinimizeAll.js +7 -1
- package/react/components/toolbar/MinimizeAll.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.spec.js +1 -0
- package/react/components/toolbar/MinimizeAll.spec.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.stories.js +1 -0
- package/react/components/toolbar/MinimizeAll.stories.js.map +1 -1
- package/react/components/toolbar/NotificationControl.d.ts +5 -0
- package/react/components/toolbar/NotificationControl.js +8 -1
- package/react/components/toolbar/NotificationControl.js.map +1 -1
- package/react/components/toolbar/RevealAll.d.ts +4 -0
- package/react/components/toolbar/RevealAll.js +7 -1
- package/react/components/toolbar/RevealAll.js.map +1 -1
- package/react/components/toolbar/RevealAll.spec.js +1 -0
- package/react/components/toolbar/RevealAll.spec.js.map +1 -1
- package/react/components/toolbar/RevealAll.stories.js +1 -0
- package/react/components/toolbar/RevealAll.stories.js.map +1 -1
- package/react/components/toolbar/SddButton.d.ts +4 -0
- package/react/components/toolbar/SddButton.js +4 -0
- package/react/components/toolbar/SddButton.js.map +1 -1
- package/react/components/toolbar/ToolbarIcon.d.ts +4 -0
- package/react/components/toolbar/ToolbarIcon.js +4 -0
- package/react/components/toolbar/ToolbarIcon.js.map +1 -1
- package/react/components/toolbar/ToolbarSection.d.ts +7 -0
- package/react/components/toolbar/ToolbarSection.js +19 -1
- package/react/components/toolbar/ToolbarSection.js.map +1 -1
- package/react/components/toolbar/ToolbarShell.d.ts +5 -0
- package/react/components/toolbar/ToolbarShell.js +7 -0
- package/react/components/toolbar/ToolbarShell.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.d.ts +16 -0
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js +20 -0
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.d.ts +52 -0
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js +58 -0
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.d.ts +5 -0
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js +5 -0
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.d.ts +27 -0
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js +49 -0
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.d.ts +13 -0
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js +14 -0
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/Content.d.ts +5 -0
- package/react/components/toolbar/advancedAppLauncher/components/Content.js +19 -0
- package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.d.ts +4 -0
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js +4 -0
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.d.ts +16 -0
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js +39 -0
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.d.ts +4 -0
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js +9 -0
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js +3 -0
- package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.d.ts +6 -0
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js +7 -0
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/ToggleFavoriteDropdown.d.ts +5 -0
- package/react/components/toolbar/advancedAppLauncher/components/ToggleFavoriteDropdown.js +5 -0
- package/react/components/toolbar/advancedAppLauncher/components/ToggleFavoriteDropdown.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.d.ts +5 -0
- package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js +5 -0
- package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/modules/FDC3.d.ts +37 -0
- package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js +40 -0
- package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.d.ts +3 -0
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js +82 -0
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.d.ts +10 -0
- package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js +11 -0
- package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js.map +1 -1
- package/react/components/toolbar/appLauncher/AppLauncherMenu.d.ts +18 -0
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js +20 -0
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.d.ts +9 -0
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js +12 -0
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/appLauncher.css +1 -1
- package/react/components/toolbar/appLauncher/components/componentList.d.ts +3 -0
- package/react/components/toolbar/appLauncher/components/componentList.js +17 -3
- package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +6 -0
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js +26 -0
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
- package/react/components/toolbar/dashbar/Dashbar.js +70 -3
- package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
- package/react/components/toolbar/dashbar/DashbarItem.js +5 -0
- package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.d.ts +7 -0
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js +7 -0
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.d.ts +16 -0
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js +20 -0
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.d.ts +26 -0
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js +29 -0
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.d.ts +5 -0
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js +6 -0
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.d.ts +76 -0
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +140 -1
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/workspaceManagementMenu.css +8 -18
- package/react/components/userPreferences/NotificationsPreferencesContext.d.ts +4 -0
- package/react/components/userPreferences/NotificationsPreferencesContext.js +4 -0
- package/react/components/userPreferences/NotificationsPreferencesContext.js.map +1 -1
- package/react/components/userPreferences/UserPreferenceTypes.d.ts +3 -0
- package/react/components/userPreferences/UserPreferences.d.ts +8 -0
- package/react/components/userPreferences/UserPreferences.js +8 -0
- package/react/components/userPreferences/UserPreferences.js.map +1 -1
- package/react/components/userPreferences/UserPreferencesBase.js +4 -0
- package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
- package/react/components/userPreferences/components/ContentSection.d.ts +5 -0
- package/react/components/userPreferences/components/LeftNav.d.ts +4 -0
- package/react/components/userPreferences/components/content/DashbarEditor.js +3 -0
- package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
- package/react/components/userPreferences/components/content/Notifications.js +3 -0
- package/react/components/userPreferences/components/content/Notifications.js.map +1 -1
- package/react/components/userPreferences/components/content/Workspaces.d.ts +12 -0
- package/react/components/userPreferences/components/content/Workspaces.js +36 -3
- package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js +3 -0
- package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js +3 -0
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js +3 -0
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
- package/react/components/userPreferences/components/general/ScheduledClose.js +11 -0
- package/react/components/userPreferences/components/general/ScheduledClose.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.d.ts +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.js +20 -10
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.js.map +1 -1
- package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +17 -0
- package/react/components/userPreferences/stores/UserPreferencesStore.js +27 -0
- package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
- package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js +1 -0
- package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js.map +1 -1
- package/react/components/userPreferences/tests/Workspace.spec.js +20 -0
- package/react/components/userPreferences/tests/Workspace.spec.js.map +1 -1
- package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +111 -0
- package/react/components/windowTitleBar/WindowTitleBarShell.js +218 -47
- package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
- package/react/components/windowTitleBar/components/center/Tab.d.ts +3 -0
- package/react/components/windowTitleBar/components/center/Tab.js +3 -0
- package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
- package/react/components/windowTitleBar/components/center/TabList.d.ts +90 -0
- package/react/components/windowTitleBar/components/center/TabList.js +170 -4
- package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButton.d.ts +9 -1
- package/react/components/windowTitleBar/components/left/LinkerButton.js +25 -9
- package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.d.ts +47 -0
- package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.js +76 -1
- package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerGroups.d.ts +4 -0
- package/react/components/windowTitleBar/components/left/LinkerGroups.js +5 -0
- package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.d.ts +18 -0
- package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js +49 -0
- package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js.map +1 -1
- package/react/components/windowTitleBar/components/left/ShareButton.d.ts +17 -0
- package/react/components/windowTitleBar/components/left/ShareButton.js +39 -0
- package/react/components/windowTitleBar/components/left/ShareButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.js +4 -0
- package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/CloseButton.d.ts +27 -0
- package/react/components/windowTitleBar/components/right/CloseButton.js +27 -0
- package/react/components/windowTitleBar/components/right/CloseButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/GroupingButton.d.ts +37 -0
- package/react/components/windowTitleBar/components/right/GroupingButton.js +40 -0
- package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/MaximizeButton.d.ts +46 -0
- package/react/components/windowTitleBar/components/right/MaximizeButton.js +54 -0
- package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/MinimizeButton.d.ts +26 -0
- package/react/components/windowTitleBar/components/right/MinimizeButton.js +26 -0
- package/react/components/windowTitleBar/components/right/MinimizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/windowTitle.d.ts +40 -0
- package/react/components/windowTitleBar/components/windowTitle.js +172 -10
- package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts +5 -0
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js +72 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.css +1 -1
- package/react/components/yesNoDialog/YesNoDialog.d.ts +3 -0
- package/react/components/yesNoDialog/YesNoDialog.js +63 -0
- package/react/components/yesNoDialog/YesNoDialog.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.spec.js +4 -0
- package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
- package/react/components/yesNoDialog/timer.js +2 -0
- package/react/components/yesNoDialog/timer.js.map +1 -1
- package/react/enzymeSetup.js +5 -0
- package/react/enzymeSetup.js.map +1 -1
- package/react/hooks/useDashbar.js +10 -0
- package/react/hooks/useDashbar.js.map +1 -1
- package/react/hooks/useDeepEffect.d.ts +4 -0
- package/react/hooks/useDeepEffect.js +21 -0
- package/react/hooks/useDeepEffect.js.map +1 -1
- package/react/hooks/useFavorites.d.ts +15 -0
- package/react/hooks/useFavorites.js +3 -0
- package/react/hooks/useFavorites.js.map +1 -1
- package/react/hooks/useFavoritesShell.d.ts +4 -0
- package/react/hooks/useFavoritesShell.js +23 -0
- package/react/hooks/useFavoritesShell.js.map +1 -1
- package/react/hooks/useHotkey.d.ts +6 -0
- package/react/hooks/useHotkey.js +9 -0
- package/react/hooks/useHotkey.js.map +1 -1
- package/react/hooks/useLinker.js +14 -0
- package/react/hooks/useLinker.js.map +1 -1
- package/react/hooks/useMenu.d.ts +29 -0
- package/react/hooks/useMenu.js +12 -1
- package/react/hooks/useMenu.js.map +1 -1
- package/react/hooks/useNotifications.d.ts +44 -0
- package/react/hooks/useNotifications.js +100 -4
- package/react/hooks/useNotifications.js.map +1 -1
- package/react/hooks/useOutsideClickDetector.d.ts +3 -0
- package/react/hooks/useOutsideClickDetector.js +3 -0
- package/react/hooks/useOutsideClickDetector.js.map +1 -1
- package/react/hooks/usePubSub.d.ts +17 -0
- package/react/hooks/usePubSub.js +18 -0
- package/react/hooks/usePubSub.js.map +1 -1
- package/react/hooks/useSearch.d.ts +5 -0
- package/react/hooks/useSearch.js +30 -0
- package/react/hooks/useSearch.js.map +1 -1
- package/react/hooks/useToolbar.js +52 -0
- package/react/hooks/useToolbar.js.map +1 -1
- package/react/reducers/favoriteReducer.d.ts +3 -0
- package/react/reducers/linkerReducer.d.ts +3 -0
- package/react/reducers/linkerReducer.js +4 -0
- package/react/reducers/linkerReducer.js.map +1 -1
- package/react/reducers/menuReducer.d.ts +28 -0
- package/react/reducers/menuReducer.js +34 -0
- package/react/reducers/menuReducer.js.map +1 -1
- package/react/reducers/rootReducer.js +3 -0
- package/react/reducers/rootReducer.js.map +1 -1
- package/react/reducers/searchReducer.d.ts +7 -0
- package/react/reducers/searchReducer.js +6 -0
- package/react/reducers/searchReducer.js.map +1 -1
- package/react/reducers/workspaceReducer.js +1 -0
- package/react/reducers/workspaceReducer.js.map +1 -1
- package/react/store.d.ts +4 -0
- package/react/store.js +11 -0
- package/react/store.js.map +1 -1
- package/react/tsconfig.tsbuildinfo +1 -1
- package/react/types/fdc3.d.ts +2 -0
- package/react/types/linkerTypes.d.ts +13 -0
- package/react/types/linkerTypes.js +1 -0
- package/react/types/linkerTypes.js.map +1 -1
- package/react/types/smartDesktopDesignerTypes.d.ts +5 -0
- package/react/types/smartDesktopDesignerTypes.js.map +1 -1
- package/react/types/workspaceTypes.d.ts +8 -0
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
const handleFdc3Response = (response, done) => {
|
|
3
3
|
response.json().then((data) => {
|
|
4
|
+
// We are expecting 200 here for data
|
|
4
5
|
if (response.status !== 200) {
|
|
6
|
+
// We have a problem, data as error message
|
|
5
7
|
done(data);
|
|
6
8
|
}
|
|
7
9
|
else {
|
|
10
|
+
// All good, no problem
|
|
8
11
|
done(null, data);
|
|
9
12
|
}
|
|
10
13
|
});
|
|
@@ -14,6 +17,14 @@ const handleFdc3Error = (error, done) => {
|
|
|
14
17
|
message: `Request failed ${error.message}`,
|
|
15
18
|
});
|
|
16
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* Copyright 2018 by ChartIQ, Inc.
|
|
22
|
+
* All rights reserved.
|
|
23
|
+
*
|
|
24
|
+
* FDC3 App directory client, I will be using fetch()
|
|
25
|
+
* to make calls to the appd web service, even though I'm
|
|
26
|
+
* not sure where did fetch() come from, will investigate later
|
|
27
|
+
*/
|
|
17
28
|
export default class FDC3 extends React.Component {
|
|
18
29
|
constructor(props) {
|
|
19
30
|
super(props);
|
|
@@ -25,6 +36,11 @@ export default class FDC3 extends React.Component {
|
|
|
25
36
|
url: this.props.config.url.replace(/\/+$/, ""),
|
|
26
37
|
};
|
|
27
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Http get wrapper
|
|
41
|
+
* @param {string} path The restful method path
|
|
42
|
+
* @param {function} done The callback function
|
|
43
|
+
*/
|
|
28
44
|
_get(path, done) {
|
|
29
45
|
fetch(this.config.url + path, {
|
|
30
46
|
method: "GET",
|
|
@@ -32,6 +48,12 @@ export default class FDC3 extends React.Component {
|
|
|
32
48
|
.then((response) => handleFdc3Response(response, done))
|
|
33
49
|
.catch((error) => handleFdc3Error(error, done));
|
|
34
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @param {string} path The restful method path
|
|
54
|
+
* @param {object} params The post data
|
|
55
|
+
* @param {function} done The callback function
|
|
56
|
+
*/
|
|
35
57
|
_post(path, params, done) {
|
|
36
58
|
fetch(this.config.url + path, {
|
|
37
59
|
method: "POST",
|
|
@@ -43,6 +65,10 @@ export default class FDC3 extends React.Component {
|
|
|
43
65
|
.then((response) => handleFdc3Response(response, done))
|
|
44
66
|
.catch((error) => handleFdc3Error(error, done));
|
|
45
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Returns all applications
|
|
70
|
+
* @param {function} callback The optional callback function
|
|
71
|
+
*/
|
|
46
72
|
getAll(callback) {
|
|
47
73
|
return new Promise((resolve, reject) => {
|
|
48
74
|
this._get("/apps/", (error, data) => {
|
|
@@ -58,6 +84,10 @@ export default class FDC3 extends React.Component {
|
|
|
58
84
|
});
|
|
59
85
|
});
|
|
60
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* Returns a single application in results
|
|
89
|
+
* @param {string} appId The app id
|
|
90
|
+
*/
|
|
61
91
|
get(appId, callback) {
|
|
62
92
|
return new Promise((resolve, reject) => {
|
|
63
93
|
this._get(`/apps/${appId}`, (error, data) => {
|
|
@@ -73,6 +103,10 @@ export default class FDC3 extends React.Component {
|
|
|
73
103
|
});
|
|
74
104
|
});
|
|
75
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* Returns unique tags
|
|
108
|
+
* @param {function} callback The optional callback function
|
|
109
|
+
*/
|
|
76
110
|
getTags(callback) {
|
|
77
111
|
return new Promise((resolve, reject) => {
|
|
78
112
|
this._get("/tags/", (error, data) => {
|
|
@@ -88,6 +122,12 @@ export default class FDC3 extends React.Component {
|
|
|
88
122
|
});
|
|
89
123
|
});
|
|
90
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* Returns a list of applications based on text and filter
|
|
127
|
+
* @param {object} params The search criteria
|
|
128
|
+
* @param {function} callback The callback function
|
|
129
|
+
* @example search({text: 'blah', filter: {tag: 'newrelease'}})
|
|
130
|
+
*/
|
|
91
131
|
search(params, callback) {
|
|
92
132
|
return new Promise((resolve, reject) => {
|
|
93
133
|
this._post("/apps/search", params, (error, data) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FDC3.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/modules/FDC3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,MAAM,kBAAkB,GAAG,CAC1B,QAGC,EACD,IAA2C,EAC1C,EAAE;IACH,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"FDC3.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/modules/FDC3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,MAAM,kBAAkB,GAAG,CAC1B,QAGC,EACD,IAA2C,EAC1C,EAAE;IACH,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;QAC7B,qCAAqC;QACrC,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE;YAC5B,2CAA2C;YAC3C,IAAI,CAAC,IAAI,CAAC,CAAC;SACX;aAAM;YACN,uBAAuB;YACvB,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;SACjB;IACF,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,KAAY,EAAE,IAAwC,EAAE,EAAE;IAClF,IAAI,CAAC;QACJ,OAAO,EAAE,kBAAkB,KAAK,CAAC,OAAO,EAAE;KAC1C,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,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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I,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;IAED;;;;;OAKG;IACH,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\";\nimport {\n\tFDC3Props,\n\tFDC3PostCallback,\n\tFDC3SearchCallback,\n\tFDC3GetCallback,\n\tErrorOrMessage,\n\tFDC3PostCallbackData,\n} from \"../../../types/fdc3\";\nimport { StandardError } from \"@finsemble/finsemble-api/types/types\";\n\nconst handleFdc3Response = (\n\tresponse: {\n\t\tjson: () => Promise<any>;\n\t\tstatus: number;\n\t},\n\tdone: (dataOrNull: any, data?: any) => void\n) => {\n\tresponse.json().then((data) => {\n\t\t// We are expecting 200 here for data\n\t\tif (response.status !== 200) {\n\t\t\t// We have a problem, data as error message\n\t\t\tdone(data);\n\t\t} else {\n\t\t\t// All good, no problem\n\t\t\tdone(null, data);\n\t\t}\n\t});\n};\n\nconst handleFdc3Error = (error: Error, done: (msg: { message: string }) => void) => {\n\tdone({\n\t\tmessage: `Request failed ${error.message}`,\n\t});\n};\n\n/**\n * Copyright 2018 by ChartIQ, Inc.\n * All rights reserved.\n *\n * FDC3 App directory client, I will be using fetch()\n * to make calls to the appd web service, even though I'm\n * not sure where did fetch() come from, will investigate later\n */\nexport default class FDC3 extends React.Component<FDC3Props> {\n\tcreds: {};\n\n\tconfig: FDC3Props[\"config\"];\n\n\tconstructor(props: FDC3Props) {\n\t\tsuper(props);\n\t\tif (!this.props.config.url) {\n\t\t\tthrow new Error(\"Please specify the url of the app directory.\");\n\t\t}\n\t\tthis.creds = this.props.creds;\n\t\tthis.config = {\n\t\t\turl: this.props.config.url.replace(/\\/+$/, \"\"),\n\t\t};\n\t}\n\n\t/**\n\t * Http get wrapper\n\t * @param {string} path The restful method path\n\t * @param {function} done The callback function\n\t */\n\t_get(path: string, done: FDC3GetCallback) {\n\t\tfetch(this.config.url + path, {\n\t\t\tmethod: \"GET\",\n\t\t})\n\t\t\t.then((response) => handleFdc3Response(response, done))\n\t\t\t.catch((error) => handleFdc3Error(error, done));\n\t}\n\n\t/**\n\t *\n\t * @param {string} path The restful method path\n\t * @param {object} params The post data\n\t * @param {function} done The callback function\n\t */\n\t_post(path: string, params: Record<string, string>, done: FDC3PostCallback) {\n\t\tfetch(this.config.url + path, {\n\t\t\tmethod: \"POST\",\n\t\t\tbody: JSON.stringify(params),\n\t\t\theaders: {\n\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t},\n\t\t})\n\t\t\t.then((response) => handleFdc3Response(response, done))\n\t\t\t.catch((error) => handleFdc3Error(error, done));\n\t}\n\n\t/**\n\t * Returns all applications\n\t * @param {function} callback The optional callback function\n\t */\n\tgetAll(callback: (arg1: Record<string, string> | null, applications: string[]) => void) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._get(\"/apps/\", (error, data) => {\n\t\t\t\tif (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t} else {\n\t\t\t\t\tresolve(data?.applications);\n\t\t\t\t}\n\t\t\t\tif (callback) {\n\t\t\t\t\tcallback(error, data?.applications || []);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * Returns a single application in results\n\t * @param {string} appId The app id\n\t */\n\tget(appId: string, callback: (error: StandardError, application: string) => void) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._get(`/apps/${appId}`, (error, data) => {\n\t\t\t\tif (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t}\n\t\t\t\tif (callback && data?.applications) {\n\t\t\t\t\tcallback(null, data.applications[0]);\n\t\t\t\t}\n\n\t\t\t\tif (data?.applications) {\n\t\t\t\t\tresolve(data.applications[0]);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * Returns unique tags\n\t * @param {function} callback The optional callback function\n\t */\n\tgetTags(callback: (error: StandardError, results: string[]) => void) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._get(\"/tags/\", (error, data) => {\n\t\t\t\tif (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t} else if (data) {\n\t\t\t\t\tresolve(data.tags);\n\t\t\t\t}\n\t\t\t\tif (callback && data) {\n\t\t\t\t\tcallback(null, data.tags);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * Returns a list of applications based on text and filter\n\t * @param {object} params The search criteria\n\t * @param {function} callback The callback function\n\t * @example search({text: 'blah', filter: {tag: 'newrelease'}})\n\t */\n\tsearch(params: Record<string, string>, callback: FDC3SearchCallback) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._post(\"/apps/search\", params, (error: ErrorOrMessage, data: FDC3PostCallbackData) => {\n\t\t\t\tif (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t}\n\n\t\t\t\tif (callback) {\n\t\t\t\t\tcallback(null, data?.applications);\n\t\t\t\t} else if (data) {\n\t\t\t\t\tresolve(data.applications);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n}\n"]}
|
|
@@ -34,6 +34,7 @@ function createStore(cb) {
|
|
|
34
34
|
FSBL.Clients.DistributedStoreClient.getStore({ store: "Finsemble-AppLauncher-Store", global: true }, (err, store) => {
|
|
35
35
|
if (store) {
|
|
36
36
|
appCatalogStore = store;
|
|
37
|
+
// set default values before initializing the store with values from storage.
|
|
37
38
|
appCatalogStore.setValues(defaultValues, () => {
|
|
38
39
|
cb(null, appCatalogStore);
|
|
39
40
|
});
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;YAExB,6EAA6E;YAC7E,eAAe,CAAC,SAAS,CAAC,aAAa,EAAE,GAAG,EAAE;gBAC7C,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;YAC3B,CAAC,CAAC,CAAC;SACH;IACF,CAAC,CACD,CAAC;AACH,CAAC;AAED,SAAS,QAAQ;IAChB,OAAO,eAAe,CAAC;AACxB,CAAC","sourcesContent":["/*!\n * Copyright 2018 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport StoreModel from \"@finsemble/finsemble-api/types/clients/StoreModel\";\nimport { StandardCallback, StandardError } from \"@finsemble/finsemble-api/types/types\";\n\nexport { createStore, getStore };\n\nconst defaultValues = [\n\t{\n\t\tfield: \"apps\",\n\t\tvalue: [],\n\t},\n\t{\n\t\tfield: \"filteredApps\",\n\t\tvalue: [],\n\t},\n\t{\n\t\tfield: \"activeTags\",\n\t\tvalue: [],\n\t},\n\t{\n\t\tfield: \"activeApp\",\n\t\tvalue: null,\n\t},\n\t{\n\t\tfield: \"searchText\",\n\t\tvalue: \"\",\n\t},\n\t{\n\t\tfield: \"forceSearch\",\n\t\tvalue: false,\n\t},\n];\n\nlet appCatalogStore: StoreModel;\n\nfunction createStore(cb: StandardCallback) {\n\tFSBL.Clients.DistributedStoreClient.getStore(\n\t\t{ store: \"Finsemble-AppLauncher-Store\", global: true },\n\t\t(err: StandardError, store?: StoreModel) => {\n\t\t\tif (store) {\n\t\t\t\tappCatalogStore = store;\n\n\t\t\t\t// set default values before initializing the store with values from storage.\n\t\t\t\tappCatalogStore.setValues(defaultValues, () => {\n\t\t\t\t\tcb(null, appCatalogStore);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t);\n}\n\nfunction getStore() {\n\treturn appCatalogStore;\n}\n"]}
|
|
@@ -28,27 +28,118 @@ declare namespace _default {
|
|
|
28
28
|
}
|
|
29
29
|
export default _default;
|
|
30
30
|
declare function initialize(done?: Function): void;
|
|
31
|
+
/**
|
|
32
|
+
* Async function to fetch apps from the FDC3 api (appD)
|
|
33
|
+
*/
|
|
31
34
|
declare function getApps(): Promise<any>;
|
|
35
|
+
/**
|
|
36
|
+
* Gets the list of filtered apps (when searching/filtering by tags)
|
|
37
|
+
*/
|
|
32
38
|
declare function getFilteredApps(): any;
|
|
39
|
+
/**
|
|
40
|
+
* Clears the list of filtered apps
|
|
41
|
+
*/
|
|
33
42
|
declare function clearFilteredApps(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Calls appD to search the directory of apps based on search text and tag names
|
|
45
|
+
* @param {string} terms The search terms provided by the user
|
|
46
|
+
*/
|
|
34
47
|
declare function searchApps(terms: string, cb?: Function): void;
|
|
48
|
+
/**
|
|
49
|
+
* Gets the list of active tags (these are tags that are actively filtering the content list)
|
|
50
|
+
*/
|
|
35
51
|
declare function getActiveTags(): any;
|
|
52
|
+
/**
|
|
53
|
+
* Call to appD to get the list of all tags
|
|
54
|
+
*/
|
|
36
55
|
declare function getTags(): Promise<any>;
|
|
56
|
+
/**
|
|
57
|
+
* Adds an 'active tag' to the list of filtered tags
|
|
58
|
+
* @param {string} tag The tag name
|
|
59
|
+
*/
|
|
37
60
|
declare function addTag(tag: string): void;
|
|
61
|
+
/**
|
|
62
|
+
* Removes an 'active tag' from the list of filtered tags
|
|
63
|
+
* @param {string} tag The tag name
|
|
64
|
+
*/
|
|
38
65
|
declare function removeTag(tag: string): void;
|
|
66
|
+
/**
|
|
67
|
+
* Refreshes the active tags search
|
|
68
|
+
*/
|
|
39
69
|
declare function refreshTagSearch(): void;
|
|
70
|
+
/**
|
|
71
|
+
* Removes all tags from the active tags list
|
|
72
|
+
*/
|
|
40
73
|
declare function clearTags(): void;
|
|
74
|
+
/**
|
|
75
|
+
* Clears the search text in store
|
|
76
|
+
*
|
|
77
|
+
*/
|
|
41
78
|
declare function clearSearchText(): void;
|
|
79
|
+
/**
|
|
80
|
+
* Function to "install" an app. Adds the id to a list of installed apps
|
|
81
|
+
* @param {string} name The name of the app
|
|
82
|
+
*/
|
|
42
83
|
declare function addApp(id: any, cb?: Function): Promise<any>;
|
|
84
|
+
/**
|
|
85
|
+
* Function to "uninstall" an app. Removes the id from a list of installed apps
|
|
86
|
+
* @param {string} name The name of the app
|
|
87
|
+
*/
|
|
43
88
|
declare function removeApp(id: any, cb?: Function): void;
|
|
89
|
+
/**
|
|
90
|
+
* Function to set the 'active app' for the catalog.
|
|
91
|
+
* @param {string} id The app id to show as the actively showcasing app
|
|
92
|
+
*/
|
|
44
93
|
declare function openApp(id: string): void;
|
|
94
|
+
/**
|
|
95
|
+
* Clear the activeApp in store
|
|
96
|
+
*/
|
|
45
97
|
declare function clearApp(): void;
|
|
98
|
+
/**
|
|
99
|
+
* Retrieves a list of installed apps by id
|
|
100
|
+
*/
|
|
46
101
|
declare function getInstalledApps(): any;
|
|
102
|
+
/**
|
|
103
|
+
* Return activeApp from store
|
|
104
|
+
*
|
|
105
|
+
* @returns {string} activeApp
|
|
106
|
+
*/
|
|
47
107
|
declare function getActiveApp(): string;
|
|
108
|
+
/**
|
|
109
|
+
* Set the activeApp param in store
|
|
110
|
+
*
|
|
111
|
+
* @param {*} app
|
|
112
|
+
*/
|
|
48
113
|
declare function setActiveApp(app: any): void;
|
|
114
|
+
/**
|
|
115
|
+
* Send the search text and tags to the appd server and get a list of apps
|
|
116
|
+
*/
|
|
49
117
|
declare function filterApps(): void;
|
|
118
|
+
/**
|
|
119
|
+
* Set the value of the search text in store
|
|
120
|
+
*
|
|
121
|
+
* @param {set} val Search string
|
|
122
|
+
*/
|
|
50
123
|
declare function setSearchValue(val: set): void;
|
|
124
|
+
/**
|
|
125
|
+
* Set the forceSearch value
|
|
126
|
+
*
|
|
127
|
+
* @param {string} val Boolean value for forceSearch
|
|
128
|
+
*/
|
|
51
129
|
declare function setForceSearch(val: string): void;
|
|
130
|
+
/**
|
|
131
|
+
* Get the current value of the text in the store
|
|
132
|
+
*
|
|
133
|
+
* @returns {string} Search string
|
|
134
|
+
*/
|
|
52
135
|
declare function getSearchValue(): string;
|
|
136
|
+
/**
|
|
137
|
+
* Get forceSearch store value
|
|
138
|
+
*
|
|
139
|
+
* @returns {boolean} forceSearch
|
|
140
|
+
*/
|
|
53
141
|
declare function getForceSearch(): boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Return to the App Catalog home page
|
|
144
|
+
*/
|
|
54
145
|
declare function goHome(): void;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2017 - 2020 by ChartIQ, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*/
|
|
1
5
|
import AppDirectory from "../modules/AppDirectory";
|
|
2
6
|
import FDC3 from "../modules/FDC3";
|
|
3
7
|
import { getStore } from "./appStore";
|
|
@@ -42,9 +46,15 @@ function initialize(done = Function.prototype) {
|
|
|
42
46
|
done();
|
|
43
47
|
});
|
|
44
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Clears all active tags
|
|
51
|
+
*/
|
|
45
52
|
function _clearActiveTags() {
|
|
46
53
|
getStore().setValue({ field: "activeTags", value: [] });
|
|
47
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Async function to fetch apps from the FDC3 api (appD)
|
|
57
|
+
*/
|
|
48
58
|
async function getApps() {
|
|
49
59
|
return await appd.getAll((err, retrievedApps) => {
|
|
50
60
|
if (!err) {
|
|
@@ -55,6 +65,9 @@ async function getApps() {
|
|
|
55
65
|
}
|
|
56
66
|
});
|
|
57
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Call to appD to get the list of all tags
|
|
70
|
+
*/
|
|
58
71
|
async function getTags() {
|
|
59
72
|
return await appd.getTags((err, retrievedTags) => {
|
|
60
73
|
getStore().setValue({
|
|
@@ -63,9 +76,18 @@ async function getTags() {
|
|
|
63
76
|
});
|
|
64
77
|
});
|
|
65
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* Function to write errors to the log
|
|
81
|
+
* @param {string} message The log message
|
|
82
|
+
* @param {string} [protocol] Provide the logging protocol (default is error)
|
|
83
|
+
*/
|
|
66
84
|
function writeToLog(message, protocol = "error") {
|
|
67
85
|
FSBL.Clients.Logger[protocol](message);
|
|
68
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* Function to "install" an app. Adds the id to a list of installed apps
|
|
89
|
+
* @param {string} name The name of the app
|
|
90
|
+
*/
|
|
69
91
|
async function addApp(id, cb = Function.prototype) {
|
|
70
92
|
const { activeApp, installed, apps } = data;
|
|
71
93
|
const appID = id;
|
|
@@ -82,6 +104,9 @@ async function addApp(id, cb = Function.prototype) {
|
|
|
82
104
|
}
|
|
83
105
|
let manifest;
|
|
84
106
|
let appConfig;
|
|
107
|
+
// Manifest from FDC3 is a string property which can either be a stringified JSON, or a uri which delivers valid JSON.
|
|
108
|
+
// The catalog will attempt to parse the string as JSON, then fetch from a URL if that fails.
|
|
109
|
+
// If both paths fail, notify the user that this app can't be added
|
|
85
110
|
if (app.manifestType.toLowerCase() === "finsemble") {
|
|
86
111
|
try {
|
|
87
112
|
manifest = JSON.parse(app.manifest);
|
|
@@ -137,6 +162,10 @@ async function addApp(id, cb = Function.prototype) {
|
|
|
137
162
|
], cb);
|
|
138
163
|
});
|
|
139
164
|
}
|
|
165
|
+
/**
|
|
166
|
+
* Function to "uninstall" an app. Removes the id from a list of installed apps
|
|
167
|
+
* @param {string} name The name of the app
|
|
168
|
+
*/
|
|
140
169
|
function removeApp(id, cb = Function.prototype) {
|
|
141
170
|
let { installed, folders } = data;
|
|
142
171
|
FSBL.Clients.LauncherClient.unRegisterComponent({ componentType: installed[id].name }, (err) => {
|
|
@@ -150,6 +179,7 @@ function removeApp(id, cb = Function.prototype) {
|
|
|
150
179
|
folders[key].apps.splice(appIndex, 1);
|
|
151
180
|
}
|
|
152
181
|
}
|
|
182
|
+
// Delete the app from the list
|
|
153
183
|
delete installed[id];
|
|
154
184
|
getStore().setValues([
|
|
155
185
|
{
|
|
@@ -163,6 +193,10 @@ function removeApp(id, cb = Function.prototype) {
|
|
|
163
193
|
], cb);
|
|
164
194
|
});
|
|
165
195
|
}
|
|
196
|
+
/**
|
|
197
|
+
* Function to set the 'active app' for the catalog.
|
|
198
|
+
* @param {string} id The app id to show as the actively showcasing app
|
|
199
|
+
*/
|
|
166
200
|
function openApp(id) {
|
|
167
201
|
let { apps } = data;
|
|
168
202
|
let index = apps.findIndex((app) => app.appId === id);
|
|
@@ -173,54 +207,109 @@ function openApp(id) {
|
|
|
173
207
|
});
|
|
174
208
|
}
|
|
175
209
|
}
|
|
210
|
+
/**
|
|
211
|
+
* Clear the activeApp in store
|
|
212
|
+
*/
|
|
176
213
|
function clearApp() {
|
|
177
214
|
getStore().setValue({
|
|
178
215
|
field: "activeApp",
|
|
179
216
|
value: null,
|
|
180
217
|
});
|
|
181
218
|
}
|
|
219
|
+
/**
|
|
220
|
+
* Return activeApp from store
|
|
221
|
+
*
|
|
222
|
+
* @returns {string} activeApp
|
|
223
|
+
*/
|
|
182
224
|
function getActiveApp() {
|
|
183
225
|
return data.activeApp;
|
|
184
226
|
}
|
|
227
|
+
/**
|
|
228
|
+
* Set the activeApp param in store
|
|
229
|
+
*
|
|
230
|
+
* @param {*} app
|
|
231
|
+
*/
|
|
185
232
|
function setActiveApp(app) {
|
|
186
233
|
getStore().setValue({
|
|
187
234
|
field: "activeApp",
|
|
188
235
|
value: app,
|
|
189
236
|
});
|
|
190
237
|
}
|
|
238
|
+
/**
|
|
239
|
+
* Retrieves a list of installed apps by id
|
|
240
|
+
*/
|
|
191
241
|
function getInstalledApps() {
|
|
192
242
|
return data.installed;
|
|
193
243
|
}
|
|
244
|
+
/**
|
|
245
|
+
* Gets the list of filtered apps (when searching/filtering by tags)
|
|
246
|
+
*/
|
|
194
247
|
function getFilteredApps() {
|
|
195
248
|
return data.filteredApps;
|
|
196
249
|
}
|
|
250
|
+
/**
|
|
251
|
+
* Clears the list of filtered apps
|
|
252
|
+
*/
|
|
197
253
|
function clearFilteredApps() {
|
|
198
254
|
getStore().setValue({
|
|
199
255
|
field: "filteredApps",
|
|
200
256
|
value: [],
|
|
201
257
|
});
|
|
202
258
|
}
|
|
259
|
+
/**
|
|
260
|
+
* Set the value of the search text in store
|
|
261
|
+
*
|
|
262
|
+
* @param {set} val Search string
|
|
263
|
+
*/
|
|
203
264
|
function setSearchValue(val) {
|
|
204
265
|
getStore().setValue({ field: "searchText", value: val });
|
|
205
266
|
}
|
|
267
|
+
/**
|
|
268
|
+
* Get the current value of the text in the store
|
|
269
|
+
*
|
|
270
|
+
* @returns {string} Search string
|
|
271
|
+
*/
|
|
206
272
|
function getSearchValue() {
|
|
207
273
|
return data.searchText;
|
|
208
274
|
}
|
|
275
|
+
/**
|
|
276
|
+
* Clears the search text in store
|
|
277
|
+
*
|
|
278
|
+
*/
|
|
209
279
|
function clearSearchText() {
|
|
210
280
|
getStore().setValue({ field: "searchText", value: "" });
|
|
211
281
|
}
|
|
282
|
+
/**
|
|
283
|
+
* Get forceSearch store value
|
|
284
|
+
*
|
|
285
|
+
* @returns {boolean} forceSearch
|
|
286
|
+
*/
|
|
212
287
|
function getForceSearch() {
|
|
213
288
|
return data.forceSearch;
|
|
214
289
|
}
|
|
290
|
+
/**
|
|
291
|
+
* Set the forceSearch value
|
|
292
|
+
*
|
|
293
|
+
* @param {string} val Boolean value for forceSearch
|
|
294
|
+
*/
|
|
215
295
|
function setForceSearch(val) {
|
|
216
296
|
getStore().setValue({ field: "forceSearch", value: val });
|
|
217
297
|
}
|
|
298
|
+
/**
|
|
299
|
+
* Gets the list of active tags (these are tags that are actively filtering the content list)
|
|
300
|
+
*/
|
|
218
301
|
function getActiveTags() {
|
|
219
|
-
return data.activeTags;
|
|
302
|
+
return data.activeTags; // type: string[]
|
|
220
303
|
}
|
|
304
|
+
/**
|
|
305
|
+
* Removes all tags from the active tags list
|
|
306
|
+
*/
|
|
221
307
|
function clearTags() {
|
|
222
308
|
_clearActiveTags();
|
|
223
309
|
}
|
|
310
|
+
/**
|
|
311
|
+
* Return to the App Catalog home page
|
|
312
|
+
*/
|
|
224
313
|
function goHome() {
|
|
225
314
|
setForceSearch(false);
|
|
226
315
|
clearFilteredApps();
|
|
@@ -228,6 +317,9 @@ function goHome() {
|
|
|
228
317
|
clearTags();
|
|
229
318
|
clearSearchText();
|
|
230
319
|
}
|
|
320
|
+
/**
|
|
321
|
+
* Send the search text and tags to the appd server and get a list of apps
|
|
322
|
+
*/
|
|
231
323
|
function filterApps() {
|
|
232
324
|
let { activeTags, searchText } = data;
|
|
233
325
|
if (activeTags.length === 0 && searchText === "") {
|
|
@@ -245,9 +337,16 @@ function filterApps() {
|
|
|
245
337
|
});
|
|
246
338
|
}
|
|
247
339
|
}
|
|
340
|
+
/**
|
|
341
|
+
* Refreshes the active tags search
|
|
342
|
+
*/
|
|
248
343
|
function refreshTagSearch() {
|
|
249
344
|
filterApps();
|
|
250
345
|
}
|
|
346
|
+
/**
|
|
347
|
+
* Calls appD to search the directory of apps based on search text and tag names
|
|
348
|
+
* @param {string} terms The search terms provided by the user
|
|
349
|
+
*/
|
|
251
350
|
function searchApps(terms, cb = Function.prototype) {
|
|
252
351
|
data.searchText = terms;
|
|
253
352
|
setForceSearch(true);
|
|
@@ -259,14 +358,26 @@ function searchApps(terms, cb = Function.prototype) {
|
|
|
259
358
|
cb();
|
|
260
359
|
});
|
|
261
360
|
}
|
|
361
|
+
/**
|
|
362
|
+
* Private function to remove an active tag. This will filter apps based on tags
|
|
363
|
+
* @param {string} tag The name of the tag
|
|
364
|
+
*/
|
|
262
365
|
function _removeActiveTag(tag) {
|
|
263
366
|
data.activeTags = data.activeTags.filter((currentTag) => currentTag !== tag);
|
|
264
367
|
getStore().setValue({ field: "activeTags", value: data.activeTags });
|
|
265
368
|
filterApps();
|
|
266
369
|
}
|
|
370
|
+
/**
|
|
371
|
+
* Removes an 'active tag' from the list of filtered tags
|
|
372
|
+
* @param {string} tag The tag name
|
|
373
|
+
*/
|
|
267
374
|
function removeTag(tag) {
|
|
268
375
|
_removeActiveTag(tag);
|
|
269
376
|
}
|
|
377
|
+
/**
|
|
378
|
+
* Private function to add an active tag. This will filter apps based on tags
|
|
379
|
+
* @param {string} tag The name of the tag
|
|
380
|
+
*/
|
|
270
381
|
function _addActiveTag(tag) {
|
|
271
382
|
let { activeTags } = data;
|
|
272
383
|
if (!activeTags.includes(tag)) {
|
|
@@ -276,6 +387,10 @@ function _addActiveTag(tag) {
|
|
|
276
387
|
filterApps();
|
|
277
388
|
});
|
|
278
389
|
}
|
|
390
|
+
/**
|
|
391
|
+
* Adds an 'active tag' to the list of filtered tags
|
|
392
|
+
* @param {string} tag The tag name
|
|
393
|
+
*/
|
|
279
394
|
function addTag(tag) {
|
|
280
395
|
_addActiveTag(tag);
|
|
281
396
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storeActions.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/stores/storeActions.js"],"names":[],"mappings":"AAIA,OAAO,YAAY,MAAM,y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IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;IACrE,UAAU,EAAE,CAAC;AACd,CAAC;AAMD,SAAS,SAAS,CAAC,GAAG;IACrB,gBAAgB,CAAC,GAAG,CAAC,CAAC;AACvB,CAAC;AAMD,SAAS,aAAa,CAAC,GAAG;IACzB,IAAI,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAC1B,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QAC9B,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACrB;IAED,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,GAAG,EAAE;QACpE,UAAU,EAAE,CAAC;IACd,CAAC,CAAC,CAAC;AACJ,CAAC;AAMD,SAAS,MAAM,CAAC,GAAG;IAClB,aAAa,CAAC,GAAG,CAAC,CAAC;AACpB,CAAC;AAED,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","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\nimport AppDirectory from \"../modules/AppDirectory\";\nimport FDC3 from \"../modules/FDC3\";\nimport { getStore } from \"./appStore\";\nimport { findIndex } from \"lodash\";\n\nexport const findAppIndexInFolder = (appID, folderName, folders) =>\n\tfindIndex(folders[folderName].apps, (app) => app.appID === appID);\n\nconst data = {};\nlet FDC3Client;\nlet appd;\n\nfunction initialize(done = Function.prototype) {\n\tFSBL.Clients.ConfigClient.getValue({ field: \"finsemble.appDirectoryEndpoint\" }, (err, appDirectoryEndpoint) => {\n\t\tFDC3Client = new FDC3({ url: appDirectoryEndpoint });\n\t\tappd = new AppDirectory(FDC3Client);\n\n\t\tconst store = getStore();\n\t\tdata.apps = store.values.apps;\n\t\tstore.getValue({ field: \"appFolders.folders\" }, (_err, folders) => {\n\t\t\tdata.folders = folders;\n\t\t\tstore.addListener({ field: \"appFolders.folders\" }, (__err, dt) => (data.folders = dt.value));\n\t\t});\n\t\tstore.getValue({ field: \"activeFolder\" }, (_err, active) => {\n\t\t\tdata.activeFolder = active;\n\t\t\tstore.addListener({ field: \"activeFolder\" }, (__err, dt) => (data.activeFolder = dt.value));\n\t\t});\n\t\tstore.getValue({ field: \"defaultFolder\" }, (_err, folder) => {\n\t\t\tdata.defaultFolder = folder;\n\t\t});\n\n\t\tdata.installed = store.values.appDefinitions;\n\t\tdata.tags = store.values.tags;\n\t\tdata.filteredApps = store.values.filteredApps;\n\t\tdata.activeTags = store.values.activeTags;\n\t\tdata.activeApp = store.values.activeApp;\n\t\tdata.searchText = store.values.searchText;\n\t\tdata.forceSearch = store.values.forceSearch;\n\t\tdata.ADVANCED_APP_LAUNCHER = store.values.defaultFolder;\n\n\t\tstore.addListener({ field: \"apps\" }, (_err, dt) => (data.apps = dt.value));\n\t\tstore.addListener({ field: \"appDefinitions\" }, (_err, dt) => (data.installed = dt.value));\n\t\tstore.addListener({ field: \"tags\" }, (_err, dt) => (data.tags = dt.value));\n\t\tstore.addListener({ field: \"activeApp\" }, (_err, dt) => (data.activeApp = dt.value));\n\t\tstore.addListener({ field: \"activeTags\" }, (_err, dt) => (data.activeTags = dt.value));\n\t\tstore.addListener({ field: \"filteredApps\" }, (_err, dt) => (data.filteredApps = dt.value));\n\t\tstore.addListener({ field: \"searchText\" }, (_err, dt) => (data.searchText = dt.value));\n\t\tstore.addListener({ field: \"forceSearch\" }, (_err, dt) => (data.forceSearch = dt.value));\n\t\tdone();\n\t});\n}\n\n/**\n * Clears all active tags\n */\nfunction _clearActiveTags() {\n\tgetStore().setValue({ field: \"activeTags\", value: [] });\n}\n\n/**\n * Async function to fetch apps from the FDC3 api (appD)\n */\nasync function getApps() {\n\treturn await appd.getAll((err, retrievedApps) => {\n\t\tif (!err) {\n\t\t\tgetStore().setValue({\n\t\t\t\tfield: \"apps\",\n\t\t\t\tvalue: retrievedApps,\n\t\t\t});\n\t\t}\n\t});\n}\n\n/**\n * Call to appD to get the list of all tags\n */\nasync function getTags() {\n\treturn await appd.getTags((err, retrievedTags) => {\n\t\tgetStore().setValue({\n\t\t\tfield: \"tags\",\n\t\t\tvalue: retrievedTags,\n\t\t});\n\t});\n}\n\n/**\n * Function to write errors to the log\n * @param {string} message The log message\n * @param {string} [protocol] Provide the logging protocol (default is error)\n */\nfunction writeToLog(message, protocol = \"error\") {\n\tFSBL.Clients.Logger[protocol](message);\n}\n\n/**\n * Function to \"install\" an app. Adds the id to a list of installed apps\n * @param {string} name The name of the app\n */\nasync function addApp(id, cb = Function.prototype) {\n\tconst { activeApp, installed, apps } = data;\n\tconst appID = id;\n\tconst app = apps.find((checkedApp) => checkedApp.appId === appID);\n\n\tif (!app) {\n\t\tFSBL.Clients.Logger.system.error(\n\t\t\t`Attempted to install app with id: ${id}, but could not find it in the local store.`\n\t\t);\n\t\treturn cb();\n\t}\n\n\tconst name = app.title || app.name;\n\tconst folder = data.activeFolder;\n\n\tif (app === undefined) {\n\t\tconsole.warn(\"App not found.\");\n\t\treturn cb();\n\t}\n\n\tlet manifest;\n\tlet appConfig;\n\t// Manifest from FDC3 is a string property which can either be a stringified JSON, or a uri which delivers valid JSON.\n\t// The catalog will attempt to parse the string as JSON, then fetch from a URL if that fails.\n\t// If both paths fail, notify the user that this app can't be added\n\tif (app.manifestType.toLowerCase() === \"finsemble\") {\n\t\ttry {\n\t\t\tmanifest = JSON.parse(app.manifest);\n\t\t} catch (e) {\n\t\t\ttry {\n\t\t\t\tconst urlRes = await fetch(app.manifest, { method: \"GET\" });\n\t\t\t\tmanifest = await urlRes.json();\n\t\t\t} catch (err) {\n\t\t\t\twriteToLog(\n\t\t\t\t\t`${name} is missing a valid manifest or URI that delivers a valid JSON manifest. Unable to add app.`,\n\t\t\t\t\t\"error\"\n\t\t\t\t);\n\t\t\t\treturn cb();\n\t\t\t}\n\t\t} finally {\n\t\t\tappConfig = installed[appID] = {\n\t\t\t\tappID,\n\t\t\t\ttags: app.tags,\n\t\t\t\tname: name.trim(),\n\t\t\t\ttype: \"component\",\n\t\t\t\tmanifest,\n\t\t\t\tcanDelete: true,\n\t\t\t\tsource: \"FDC3\",\n\t\t\t};\n\t\t}\n\t} else {\n\t\twriteToLog(`${name} does not appear to be a Finsemble manifest. This app cannot be added to Finsemble.`, \"error\");\n\t\treturn cb();\n\t}\n\n\tconst ADVANCED_APP_LAUNCHER = data.defaultFolder;\n\tconst { folders } = data;\n\n\tfolders[ADVANCED_APP_LAUNCHER].apps.push(appConfig);\n\tif (folder !== ADVANCED_APP_LAUNCHER) folders[folder].apps.push(appConfig);\n\n\tFSBL.Clients.LauncherClient.registerComponent(\n\t\t{\n\t\t\tcomponentType: appConfig.name,\n\t\t\tmanifest: appConfig.manifest,\n\t\t},\n\t\t() => {\n\t\t\tgetStore().setValues(\n\t\t\t\t[\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"activeApp\",\n\t\t\t\t\t\tvalue: activeApp,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"appDefinitions\",\n\t\t\t\t\t\tvalue: installed,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"appFolders.folders\",\n\t\t\t\t\t\tvalue: folders,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tcb\n\t\t\t);\n\t\t}\n\t);\n}\n\n/**\n * Function to \"uninstall\" an app. Removes the id from a list of installed apps\n * @param {string} name The name of the app\n */\nfunction removeApp(id, cb = Function.prototype) {\n\tlet { installed, folders } = data;\n\tFSBL.Clients.LauncherClient.unRegisterComponent({ componentType: installed[id].name }, (err) => {\n\t\tif (err) {\n\t\t\tconsole.warn(\"Failed to deregister a component\");\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const key in data.folders) {\n\t\t\tconst appIndex = findAppIndexInFolder(id, key, data.folders);\n\t\t\tif (appIndex > -1) {\n\t\t\t\tfolders[key].apps.splice(appIndex, 1);\n\t\t\t}\n\t\t}\n\n\t\t// Delete the app from the list\n\t\tdelete installed[id];\n\n\t\tgetStore().setValues(\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\tfield: \"appDefinitions\",\n\t\t\t\t\tvalue: installed,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tfield: \"appFolders.folders\",\n\t\t\t\t\tvalue: folders,\n\t\t\t\t},\n\t\t\t],\n\t\t\tcb\n\t\t);\n\t});\n}\n\n/**\n * Function to set the 'active app' for the catalog.\n * @param {string} id The app id to show as the actively showcasing app\n */\nfunction openApp(id) {\n\tlet { apps } = data;\n\n\tlet index = apps.findIndex((app) => app.appId === id);\n\n\tif (index > -1) {\n\t\tgetStore().setValue({\n\t\t\tfield: \"activeApp\",\n\t\t\tvalue: id,\n\t\t});\n\t}\n}\n\n/**\n * Clear the activeApp in store\n */\nfunction clearApp() {\n\tgetStore().setValue({\n\t\tfield: \"activeApp\",\n\t\tvalue: null,\n\t});\n}\n\n/**\n * Return activeApp from store\n *\n * @returns {string} activeApp\n */\nfunction getActiveApp() {\n\treturn data.activeApp;\n}\n\n/**\n * Set the activeApp param in store\n *\n * @param {*} app\n */\nfunction setActiveApp(app) {\n\tgetStore().setValue({\n\t\tfield: \"activeApp\",\n\t\tvalue: app,\n\t});\n}\n\n/**\n * Retrieves a list of installed apps by id\n */\nfunction getInstalledApps() {\n\treturn data.installed;\n}\n\n/**\n * Gets the list of filtered apps (when searching/filtering by tags)\n */\nfunction getFilteredApps() {\n\treturn data.filteredApps;\n}\n\n/**\n * Clears the list of filtered apps\n */\nfunction clearFilteredApps() {\n\tgetStore().setValue({\n\t\tfield: \"filteredApps\",\n\t\tvalue: [],\n\t});\n}\n\n/**\n * Set the value of the search text in store\n *\n * @param {set} val Search string\n */\nfunction setSearchValue(val) {\n\tgetStore().setValue({ field: \"searchText\", value: val });\n}\n\n/**\n * Get the current value of the text in the store\n *\n * @returns {string} Search string\n */\nfunction getSearchValue() {\n\treturn data.searchText;\n}\n\n/**\n * Clears the search text in store\n *\n */\nfunction clearSearchText() {\n\tgetStore().setValue({ field: \"searchText\", value: \"\" });\n}\n\n/**\n * Get forceSearch store value\n *\n * @returns {boolean} forceSearch\n */\nfunction getForceSearch() {\n\treturn data.forceSearch;\n}\n\n/**\n * Set the forceSearch value\n *\n * @param {string} val Boolean value for forceSearch\n */\nfunction setForceSearch(val) {\n\tgetStore().setValue({ field: \"forceSearch\", value: val });\n}\n\n/**\n * Gets the list of active tags (these are tags that are actively filtering the content list)\n */\nfunction getActiveTags() {\n\treturn data.activeTags; // type: string[]\n}\n\n/**\n * Removes all tags from the active tags list\n */\nfunction clearTags() {\n\t_clearActiveTags();\n}\n\n/**\n * Return to the App Catalog home page\n */\nfunction goHome() {\n\tsetForceSearch(false);\n\tclearFilteredApps();\n\tclearApp();\n\tclearTags();\n\tclearSearchText();\n}\n\n/**\n * Send the search text and tags to the appd server and get a list of apps\n */\nfunction filterApps() {\n\tlet { activeTags, searchText } = data;\n\n\tif (activeTags.length === 0 && searchText === \"\") {\n\t\tgoHome();\n\t} else {\n\t\tappd.search({ text: searchText, tags: activeTags }, (err, retrievedData) => {\n\t\t\tif (err) {\n\t\t\t\tFSBL.Logger.system.error(`FDC3 App search failed!: ${err}`);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tgetStore().setValue({ field: \"activeApp\", value: null });\n\t\t\tgetStore().setValue({ field: \"activeTags\", value: activeTags });\n\t\t\tgetStore().setValue({ field: \"filteredApps\", value: retrievedData });\n\t\t});\n\t}\n}\n\n/**\n * Refreshes the active tags search\n */\nfunction refreshTagSearch() {\n\tfilterApps();\n}\n\n/**\n * Calls appD to search the directory of apps based on search text and tag names\n * @param {string} terms The search terms provided by the user\n */\nfunction searchApps(terms, cb = Function.prototype) {\n\tdata.searchText = terms;\n\tsetForceSearch(true);\n\tgetStore().setValue(\n\t\t{\n\t\t\tfield: \"searchText\",\n\t\t\tvalue: terms,\n\t\t},\n\t\t() => {\n\t\t\tfilterApps();\n\t\t\tcb();\n\t\t}\n\t);\n}\n\n/**\n * Private function to remove an active tag. This will filter apps based on tags\n * @param {string} tag The name of the tag\n */\nfunction _removeActiveTag(tag) {\n\tdata.activeTags = data.activeTags.filter((currentTag) => currentTag !== tag);\n\n\tgetStore().setValue({ field: \"activeTags\", value: data.activeTags });\n\tfilterApps();\n}\n\n/**\n * Removes an 'active tag' from the list of filtered tags\n * @param {string} tag The tag name\n */\nfunction removeTag(tag) {\n\t_removeActiveTag(tag);\n}\n\n/**\n * Private function to add an active tag. This will filter apps based on tags\n * @param {string} tag The name of the tag\n */\nfunction _addActiveTag(tag) {\n\tlet { activeTags } = data;\n\tif (!activeTags.includes(tag)) {\n\t\tactiveTags.push(tag);\n\t}\n\n\tgetStore().setValue({ field: \"activeTags\", value: activeTags }, () => {\n\t\tfilterApps();\n\t});\n}\n\n/**\n * Adds an 'active tag' to the list of filtered tags\n * @param {string} tag The tag name\n */\nfunction addTag(tag) {\n\t_addActiveTag(tag);\n}\n\nexport default {\n\tinitialize,\n\tgetApps,\n\tgetFilteredApps,\n\tclearFilteredApps,\n\tsearchApps,\n\tgetActiveTags,\n\tgetTags,\n\taddTag,\n\tremoveTag,\n\trefreshTagSearch,\n\tclearTags,\n\tclearSearchText,\n\taddApp,\n\tremoveApp,\n\topenApp,\n\tclearApp,\n\tgetInstalledApps,\n\tgetActiveApp,\n\tsetActiveApp,\n\tfilterApps,\n\tsetSearchValue,\n\tsetForceSearch,\n\tgetSearchValue,\n\tgetForceSearch,\n\tgoHome,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"storeActions.js","sourceRoot":"","sources":["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f,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","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\nimport AppDirectory from \"../modules/AppDirectory\";\nimport FDC3 from \"../modules/FDC3\";\nimport { getStore } from \"./appStore\";\nimport { findIndex } from \"lodash\";\n\nexport const findAppIndexInFolder = (appID, folderName, folders) =>\n\tfindIndex(folders[folderName].apps, (app) => app.appID === appID);\n\nconst data = {};\nlet FDC3Client;\nlet appd;\n\nfunction initialize(done = Function.prototype) {\n\tFSBL.Clients.ConfigClient.getValue({ field: \"finsemble.appDirectoryEndpoint\" }, (err, appDirectoryEndpoint) => {\n\t\tFDC3Client = new FDC3({ url: appDirectoryEndpoint });\n\t\tappd = new AppDirectory(FDC3Client);\n\n\t\tconst store = getStore();\n\t\tdata.apps = store.values.apps;\n\t\tstore.getValue({ field: \"appFolders.folders\" }, (_err, folders) => {\n\t\t\tdata.folders = folders;\n\t\t\tstore.addListener({ field: \"appFolders.folders\" }, (__err, dt) => (data.folders = dt.value));\n\t\t});\n\t\tstore.getValue({ field: \"activeFolder\" }, (_err, active) => {\n\t\t\tdata.activeFolder = active;\n\t\t\tstore.addListener({ field: \"activeFolder\" }, (__err, dt) => (data.activeFolder = dt.value));\n\t\t});\n\t\tstore.getValue({ field: \"defaultFolder\" }, (_err, folder) => {\n\t\t\tdata.defaultFolder = folder;\n\t\t});\n\n\t\tdata.installed = store.values.appDefinitions;\n\t\tdata.tags = store.values.tags;\n\t\tdata.filteredApps = store.values.filteredApps;\n\t\tdata.activeTags = store.values.activeTags;\n\t\tdata.activeApp = store.values.activeApp;\n\t\tdata.searchText = store.values.searchText;\n\t\tdata.forceSearch = store.values.forceSearch;\n\t\tdata.ADVANCED_APP_LAUNCHER = store.values.defaultFolder;\n\n\t\tstore.addListener({ field: \"apps\" }, (_err, dt) => (data.apps = dt.value));\n\t\tstore.addListener({ field: \"appDefinitions\" }, (_err, dt) => (data.installed = dt.value));\n\t\tstore.addListener({ field: \"tags\" }, (_err, dt) => (data.tags = dt.value));\n\t\tstore.addListener({ field: \"activeApp\" }, (_err, dt) => (data.activeApp = dt.value));\n\t\tstore.addListener({ field: \"activeTags\" }, (_err, dt) => (data.activeTags = dt.value));\n\t\tstore.addListener({ field: \"filteredApps\" }, (_err, dt) => (data.filteredApps = dt.value));\n\t\tstore.addListener({ field: \"searchText\" }, (_err, dt) => (data.searchText = dt.value));\n\t\tstore.addListener({ field: \"forceSearch\" }, (_err, dt) => (data.forceSearch = dt.value));\n\t\tdone();\n\t});\n}\n\n/**\n * Clears all active tags\n */\nfunction _clearActiveTags() {\n\tgetStore().setValue({ field: \"activeTags\", value: [] });\n}\n\n/**\n * Async function to fetch apps from the FDC3 api (appD)\n */\nasync function getApps() {\n\treturn await appd.getAll((err, retrievedApps) => {\n\t\tif (!err) {\n\t\t\tgetStore().setValue({\n\t\t\t\tfield: \"apps\",\n\t\t\t\tvalue: retrievedApps,\n\t\t\t});\n\t\t}\n\t});\n}\n\n/**\n * Call to appD to get the list of all tags\n */\nasync function getTags() {\n\treturn await appd.getTags((err, retrievedTags) => {\n\t\tgetStore().setValue({\n\t\t\tfield: \"tags\",\n\t\t\tvalue: retrievedTags,\n\t\t});\n\t});\n}\n\n/**\n * Function to write errors to the log\n * @param {string} message The log message\n * @param {string} [protocol] Provide the logging protocol (default is error)\n */\nfunction writeToLog(message, protocol = \"error\") {\n\tFSBL.Clients.Logger[protocol](message);\n}\n\n/**\n * Function to \"install\" an app. Adds the id to a list of installed apps\n * @param {string} name The name of the app\n */\nasync function addApp(id, cb = Function.prototype) {\n\tconst { activeApp, installed, apps } = data;\n\tconst appID = id;\n\tconst app = apps.find((checkedApp) => checkedApp.appId === appID);\n\n\tif (!app) {\n\t\tFSBL.Clients.Logger.system.error(\n\t\t\t`Attempted to install app with id: ${id}, but could not find it in the local store.`\n\t\t);\n\t\treturn cb();\n\t}\n\n\tconst name = app.title || app.name;\n\tconst folder = data.activeFolder;\n\n\tif (app === undefined) {\n\t\tconsole.warn(\"App not found.\");\n\t\treturn cb();\n\t}\n\n\tlet manifest;\n\tlet appConfig;\n\t// Manifest from FDC3 is a string property which can either be a stringified JSON, or a uri which delivers valid JSON.\n\t// The catalog will attempt to parse the string as JSON, then fetch from a URL if that fails.\n\t// If both paths fail, notify the user that this app can't be added\n\tif (app.manifestType.toLowerCase() === \"finsemble\") {\n\t\ttry {\n\t\t\tmanifest = JSON.parse(app.manifest);\n\t\t} catch (e) {\n\t\t\ttry {\n\t\t\t\tconst urlRes = await fetch(app.manifest, { method: \"GET\" });\n\t\t\t\tmanifest = await urlRes.json();\n\t\t\t} catch (err) {\n\t\t\t\twriteToLog(\n\t\t\t\t\t`${name} is missing a valid manifest or URI that delivers a valid JSON manifest. Unable to add app.`,\n\t\t\t\t\t\"error\"\n\t\t\t\t);\n\t\t\t\treturn cb();\n\t\t\t}\n\t\t} finally {\n\t\t\tappConfig = installed[appID] = {\n\t\t\t\tappID,\n\t\t\t\ttags: app.tags,\n\t\t\t\tname: name.trim(),\n\t\t\t\ttype: \"component\",\n\t\t\t\tmanifest,\n\t\t\t\tcanDelete: true,\n\t\t\t\tsource: \"FDC3\",\n\t\t\t};\n\t\t}\n\t} else {\n\t\twriteToLog(`${name} does not appear to be a Finsemble manifest. This app cannot be added to Finsemble.`, \"error\");\n\t\treturn cb();\n\t}\n\n\tconst ADVANCED_APP_LAUNCHER = data.defaultFolder;\n\tconst { folders } = data;\n\n\tfolders[ADVANCED_APP_LAUNCHER].apps.push(appConfig);\n\tif (folder !== ADVANCED_APP_LAUNCHER) folders[folder].apps.push(appConfig);\n\n\tFSBL.Clients.LauncherClient.registerComponent(\n\t\t{\n\t\t\tcomponentType: appConfig.name,\n\t\t\tmanifest: appConfig.manifest,\n\t\t},\n\t\t() => {\n\t\t\tgetStore().setValues(\n\t\t\t\t[\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"activeApp\",\n\t\t\t\t\t\tvalue: activeApp,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"appDefinitions\",\n\t\t\t\t\t\tvalue: installed,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"appFolders.folders\",\n\t\t\t\t\t\tvalue: folders,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tcb\n\t\t\t);\n\t\t}\n\t);\n}\n\n/**\n * Function to \"uninstall\" an app. Removes the id from a list of installed apps\n * @param {string} name The name of the app\n */\nfunction removeApp(id, cb = Function.prototype) {\n\tlet { installed, folders } = data;\n\tFSBL.Clients.LauncherClient.unRegisterComponent({ componentType: installed[id].name }, (err) => {\n\t\tif (err) {\n\t\t\tconsole.warn(\"Failed to deregister a component\");\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const key in data.folders) {\n\t\t\tconst appIndex = findAppIndexInFolder(id, key, data.folders);\n\t\t\tif (appIndex > -1) {\n\t\t\t\tfolders[key].apps.splice(appIndex, 1);\n\t\t\t}\n\t\t}\n\n\t\t// Delete the app from the list\n\t\tdelete installed[id];\n\n\t\tgetStore().setValues(\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\tfield: \"appDefinitions\",\n\t\t\t\t\tvalue: installed,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tfield: \"appFolders.folders\",\n\t\t\t\t\tvalue: folders,\n\t\t\t\t},\n\t\t\t],\n\t\t\tcb\n\t\t);\n\t});\n}\n\n/**\n * Function to set the 'active app' for the catalog.\n * @param {string} id The app id to show as the actively showcasing app\n */\nfunction openApp(id) {\n\tlet { apps } = data;\n\n\tlet index = apps.findIndex((app) => app.appId === id);\n\n\tif (index > -1) {\n\t\tgetStore().setValue({\n\t\t\tfield: \"activeApp\",\n\t\t\tvalue: id,\n\t\t});\n\t}\n}\n\n/**\n * Clear the activeApp in store\n */\nfunction clearApp() {\n\tgetStore().setValue({\n\t\tfield: \"activeApp\",\n\t\tvalue: null,\n\t});\n}\n\n/**\n * Return activeApp from store\n *\n * @returns {string} activeApp\n */\nfunction getActiveApp() {\n\treturn data.activeApp;\n}\n\n/**\n * Set the activeApp param in store\n *\n * @param {*} app\n */\nfunction setActiveApp(app) {\n\tgetStore().setValue({\n\t\tfield: \"activeApp\",\n\t\tvalue: app,\n\t});\n}\n\n/**\n * Retrieves a list of installed apps by id\n */\nfunction getInstalledApps() {\n\treturn data.installed;\n}\n\n/**\n * Gets the list of filtered apps (when searching/filtering by tags)\n */\nfunction getFilteredApps() {\n\treturn data.filteredApps;\n}\n\n/**\n * Clears the list of filtered apps\n */\nfunction clearFilteredApps() {\n\tgetStore().setValue({\n\t\tfield: \"filteredApps\",\n\t\tvalue: [],\n\t});\n}\n\n/**\n * Set the value of the search text in store\n *\n * @param {set} val Search string\n */\nfunction setSearchValue(val) {\n\tgetStore().setValue({ field: \"searchText\", value: val });\n}\n\n/**\n * Get the current value of the text in the store\n *\n * @returns {string} Search string\n */\nfunction getSearchValue() {\n\treturn data.searchText;\n}\n\n/**\n * Clears the search text in store\n *\n */\nfunction clearSearchText() {\n\tgetStore().setValue({ field: \"searchText\", value: \"\" });\n}\n\n/**\n * Get forceSearch store value\n *\n * @returns {boolean} forceSearch\n */\nfunction getForceSearch() {\n\treturn data.forceSearch;\n}\n\n/**\n * Set the forceSearch value\n *\n * @param {string} val Boolean value for forceSearch\n */\nfunction setForceSearch(val) {\n\tgetStore().setValue({ field: \"forceSearch\", value: val });\n}\n\n/**\n * Gets the list of active tags (these are tags that are actively filtering the content list)\n */\nfunction getActiveTags() {\n\treturn data.activeTags; // type: string[]\n}\n\n/**\n * Removes all tags from the active tags list\n */\nfunction clearTags() {\n\t_clearActiveTags();\n}\n\n/**\n * Return to the App Catalog home page\n */\nfunction goHome() {\n\tsetForceSearch(false);\n\tclearFilteredApps();\n\tclearApp();\n\tclearTags();\n\tclearSearchText();\n}\n\n/**\n * Send the search text and tags to the appd server and get a list of apps\n */\nfunction filterApps() {\n\tlet { activeTags, searchText } = data;\n\n\tif (activeTags.length === 0 && searchText === \"\") {\n\t\tgoHome();\n\t} else {\n\t\tappd.search({ text: searchText, tags: activeTags }, (err, retrievedData) => {\n\t\t\tif (err) {\n\t\t\t\tFSBL.Logger.system.error(`FDC3 App search failed!: ${err}`);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tgetStore().setValue({ field: \"activeApp\", value: null });\n\t\t\tgetStore().setValue({ field: \"activeTags\", value: activeTags });\n\t\t\tgetStore().setValue({ field: \"filteredApps\", value: retrievedData });\n\t\t});\n\t}\n}\n\n/**\n * Refreshes the active tags search\n */\nfunction refreshTagSearch() {\n\tfilterApps();\n}\n\n/**\n * Calls appD to search the directory of apps based on search text and tag names\n * @param {string} terms The search terms provided by the user\n */\nfunction searchApps(terms, cb = Function.prototype) {\n\tdata.searchText = terms;\n\tsetForceSearch(true);\n\tgetStore().setValue(\n\t\t{\n\t\t\tfield: \"searchText\",\n\t\t\tvalue: terms,\n\t\t},\n\t\t() => {\n\t\t\tfilterApps();\n\t\t\tcb();\n\t\t}\n\t);\n}\n\n/**\n * Private function to remove an active tag. This will filter apps based on tags\n * @param {string} tag The name of the tag\n */\nfunction _removeActiveTag(tag) {\n\tdata.activeTags = data.activeTags.filter((currentTag) => currentTag !== tag);\n\n\tgetStore().setValue({ field: \"activeTags\", value: data.activeTags });\n\tfilterApps();\n}\n\n/**\n * Removes an 'active tag' from the list of filtered tags\n * @param {string} tag The tag name\n */\nfunction removeTag(tag) {\n\t_removeActiveTag(tag);\n}\n\n/**\n * Private function to add an active tag. This will filter apps based on tags\n * @param {string} tag The name of the tag\n */\nfunction _addActiveTag(tag) {\n\tlet { activeTags } = data;\n\tif (!activeTags.includes(tag)) {\n\t\tactiveTags.push(tag);\n\t}\n\n\tgetStore().setValue({ field: \"activeTags\", value: activeTags }, () => {\n\t\tfilterApps();\n\t});\n}\n\n/**\n * Adds an 'active tag' to the list of filtered tags\n * @param {string} tag The tag name\n */\nfunction addTag(tag) {\n\t_addActiveTag(tag);\n}\n\nexport default {\n\tinitialize,\n\tgetApps,\n\tgetFilteredApps,\n\tclearFilteredApps,\n\tsearchApps,\n\tgetActiveTags,\n\tgetTags,\n\taddTag,\n\tremoveTag,\n\trefreshTagSearch,\n\tclearTags,\n\tclearSearchText,\n\taddApp,\n\tremoveApp,\n\topenApp,\n\tclearApp,\n\tgetInstalledApps,\n\tgetActiveApp,\n\tsetActiveApp,\n\tfilterApps,\n\tsetSearchValue,\n\tsetForceSearch,\n\tgetSearchValue,\n\tgetForceSearch,\n\tgoHome,\n};\n"]}
|
|
@@ -4,6 +4,7 @@ export interface CheckboxProps {
|
|
|
4
4
|
checked?: boolean;
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
label?: string;
|
|
7
|
+
showLabel?: boolean;
|
|
7
8
|
onClick?: (e: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>) => void;
|
|
8
9
|
}
|
|
9
10
|
export declare const Checkbox: React.FC<CheckboxProps>;
|