@finsemble/finsemble-ui 7.0.0 → 7.1.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +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 +33 -1
- 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.js +3 -0
- 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 +124 -0
- package/react/components/windowTitleBar/WindowTitleBarShell.js +284 -35
- 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 +90 -0
- 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceItem.js","sourceRoot":"","sources":["../../../../../src/components/userPreferences/components/workspaces/WorkspaceItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B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,SAAS,EAAC,sBAAsB,GAAK,CACnC,CACJ,CACH,CACI,CACc,CACrB,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import React, { MouseEventHandler } from \"react\";\nimport { FinsembleDraggable } from \"../../../legacyControls/FinsembleDraggable\";\n\ntype WorkspaceEditorProps = {\n\tcancelHandler?: Function;\n\tsaveHandler?: Function;\n\tvalue?: string;\n};\n\ntype WorkspaceEditorState = {\n\tvalue: string;\n\tfinished: boolean;\n};\n\nexport class WorkspaceEditor extends React.Component<WorkspaceEditorProps, WorkspaceEditorState> {\n\tconstructor(props: WorkspaceEditorProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tvalue: props.value || \"\",\n\t\t\tfinished: false,\n\t\t};\n\t\tthis.onKeyDown = this.onKeyDown.bind(this);\n\t\tthis.onChange = this.onChange.bind(this);\n\t\tthis.onBlur = this.onBlur.bind(this);\n\t\tthis.onFocus = this.onFocus.bind(this);\n\t}\n\n\tonKeyDown(e: any) {\n\t\tif (e.key === \"Escape\") {\n\t\t\tthis.setState({ finished: true }, () => {\n\t\t\t\tthis.props.cancelHandler?.();\n\t\t\t});\n\t\t} else if (e.key === \"Enter\") {\n\t\t\tconst finish = (val: string) => {\n\t\t\t\tthis.props.saveHandler?.(val);\n\t\t\t};\n\t\t\t// binding so we don't lose the event inside of react's crazy callback structure\n\t\t\tthis.setState({ finished: true }, finish.bind(this, e.target.value));\n\t\t}\n\t}\n\n\tonChange(e: any) {\n\t\tthis.setState({\n\t\t\tvalue: e.target.value,\n\t\t});\n\t}\n\n\tonFocus(e: any) {\n\t\te.target.select();\n\t}\n\n\tonBlur() {\n\t\t// console.log(\"ON BLUR\", performance.now());\n\t\tconst finish = (val: string) => {\n\t\t\tthis.props.saveHandler?.(val);\n\t\t};\n\t\t// binding so we don't lose the event inside of react's crazy callback structure. Finished is set so that the component doesn't call the saveHandler again on unMount\n\t\tthis.setState({ finished: true }, finish.bind(this, this.state.value));\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<input\n\t\t\t\tonFocus={this.onFocus}\n\t\t\t\tonBlur={this.onBlur}\n\t\t\t\tautoFocus={true}\n\t\t\t\tvalue={this.state.value}\n\t\t\t\tclassName=\"workspace-editor\"\n\t\t\t\tonChange={this.onChange}\n\t\t\t\tonKeyDown={this.onKeyDown}\n\t\t\t/>\n\t\t);\n\t}\n}\n\nexport type WorkspaceItemProps = {\n\tworkspace: { name?: string; components?: Array<String> };\n\tworkspaceToLoadOnStart?: any;\n\tfocusedWorkspace?: string;\n\ti?: number;\n\tediting?: boolean;\n\tadding?: boolean;\n\tkey?: number;\n\trenameWorkspace?: Function;\n\taddWorkspace?: Function;\n\tcancelEdit?: Function;\n\tsetFocusedWorkspace?: Function;\n\trenameTooltip?: string;\n\trenameButtonClasses?: string;\n\thandleButtonClicks?: MouseEventHandler<HTMLDivElement>;\n\tallowRename?: boolean;\n\tstartEditingWorkspace?: (e: React.SyntheticEvent, name: string) => void;\n\tdeleteTooltip?: string;\n\tdeleteButtonClasses?: string;\n\tallowDelete?: boolean;\n\tdeleteWorkspace?: (name: string) => void;\n};\nconst WorkspaceItem = (props: WorkspaceItemProps) => {\n\tlet baseClass = \"workspace-item\";\n\tlet classNames = baseClass;\n\tif (FSBL.Clients.WorkspaceClient.activeWorkspace?.name === props.workspace.name) {\n\t\tclassNames = `${classNames} active-workspace`;\n\t}\n\n\tif (props.workspaceToLoadOnStart === props.workspace.name) {\n\t\tclassNames = `${classNames} auto-start-workspace-item`;\n\t}\n\n\tif (props.focusedWorkspace === props.workspace.name) {\n\t\tclassNames = `${classNames} focused-workspace-item`;\n\t\tif (props.i === 0) {\n\t\t\tclassNames = `${classNames} no-top-border`;\n\t\t}\n\t\tif (props.editing || props.adding) {\n\t\t\tclassNames = `${classNames} workspace-item-editing`;\n\t\t\treturn (\n\t\t\t\t<div key={props.i} className={classNames}>\n\t\t\t\t\t<WorkspaceEditor\n\t\t\t\t\t\tvalue={props.workspace.name || \"\"}\n\t\t\t\t\t\tsaveHandler={props.editing ? props.renameWorkspace : props.addWorkspace}\n\t\t\t\t\t\tcancelHandler={props.cancelEdit}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\t}\n\n\treturn (\n\t\t<FinsembleDraggable\n\t\t\tonClick={() => {\n\t\t\t\tprops.setFocusedWorkspace?.(props.workspace.name);\n\t\t\t}}\n\t\t\twrapperClass={classNames}\n\t\t\tdraggableId={props.workspace.name || \"\"}\n\t\t\tindex={props.i || 0}\n\t\t\tonKeydown={(e) => {\n\t\t\t\tif (e.code === \"F2\") {\n\t\t\t\t\tprops.allowRename && props.startEditingWorkspace?.(e, props.workspace.name || \"\");\n\t\t\t\t} else if (e.code === \"Delete\") {\n\t\t\t\t\tprops.allowDelete && props.deleteWorkspace?.(props.workspace.name || \"\");\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t<div className=\"ff-adp-hamburger\"></div>\n\t\t\t<div className=\"workspace-name\" title={props.workspace.name}>\n\t\t\t\t{props.workspace.name}\n\t\t\t</div>\n\t\t\t<div className=\"individual-workspace-actions\">\n\t\t\t\t{props.workspace.name !== FSBL.Clients.WorkspaceClient.activeWorkspace?.name && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\ttitle={props.renameTooltip}\n\t\t\t\t\t\t\tclassName={props.renameButtonClasses}\n\t\t\t\t\t\t\tonMouseDown={props.handleButtonClicks}\n\t\t\t\t\t\t\tonClick={(e: any) => {\n\t\t\t\t\t\t\t\tprops.allowRename && props.startEditingWorkspace?.(e, props.workspace.name || \"\");\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<i className=\"ff-adp-edit\"></i>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\ttitle={props.deleteTooltip}\n\t\t\t\t\t\t\tclassName={props.deleteButtonClasses}\n\t\t\t\t\t\t\tonMouseDown={props.handleButtonClicks}\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tprops.allowDelete && props.deleteWorkspace?.(props.workspace.name || \"\");\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<i className=\"ff-adp-trash-outline\"></i>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</FinsembleDraggable>\n\t);\n};\n\nexport default WorkspaceItem;\n"]}
|
|
1
|
+
{"version":3,"file":"WorkspaceItem.js","sourceRoot":"","sources":["../../../../../src/components/userPreferences/components/workspaces/WorkspaceItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAahF,MAAM,OAAO,eAAgB,SAAQ,KAAK,CAAC,SAAqD;IAC/F,YAAY,KAA2B;QACtC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,EAAE;YACxB,QAAQ,EAAE,KAAK;SACf,CAAC;QACF,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IAED,SAAS,CAAC,CAAM;QACf,IAAI,CAAC,CAAC,GAAG,KAAK,QAAQ,EAAE;YACvB,IAAI,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE;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AAC,qBAAqB,+CAA3B,KAAK,EAAyB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI,IAAI,EAAE,CAAC,CAAA,CAAC;gBACnF,CAAC;gBAED,2BAAG,SAAS,EAAC,aAAa,GAAK,CAC1B;YACN,6BACC,KAAK,EAAE,KAAK,CAAC,aAAa,EAC1B,SAAS,EAAE,KAAK,CAAC,mBAAmB,EACpC,WAAW,EAAE,KAAK,CAAC,kBAAkB,EACrC,OAAO,EAAE,GAAG,EAAE;;oBACb,KAAK,CAAC,WAAW,KAAI,MAAA,KAAK,CAAC,eAAe,+CAArB,KAAK,EAAmB,KAAK,CAAC,SAAS,CAAC,IAAI,IAAI,EAAE,CAAC,CAAA,CAAC;gBAC1E,CAAC;gBAED,2BAAG,SAAS,EAAC,sBAAsB,GAAK,CACnC,CACJ,CACH,CACI,CACc,CACrB,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import React, { MouseEventHandler } from \"react\";\nimport { FinsembleDraggable } from \"../../../legacyControls/FinsembleDraggable\";\n\ntype WorkspaceEditorProps = {\n\tcancelHandler?: Function;\n\tsaveHandler?: Function;\n\tvalue?: string;\n};\n\ntype WorkspaceEditorState = {\n\tvalue: string;\n\tfinished: boolean;\n};\n\nexport class WorkspaceEditor extends React.Component<WorkspaceEditorProps, WorkspaceEditorState> {\n\tconstructor(props: WorkspaceEditorProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tvalue: props.value || \"\",\n\t\t\tfinished: false,\n\t\t};\n\t\tthis.onKeyDown = this.onKeyDown.bind(this);\n\t\tthis.onChange = this.onChange.bind(this);\n\t\tthis.onBlur = this.onBlur.bind(this);\n\t\tthis.onFocus = this.onFocus.bind(this);\n\t}\n\n\tonKeyDown(e: any) {\n\t\tif (e.key === \"Escape\") {\n\t\t\tthis.setState({ finished: true }, () => {\n\t\t\t\tthis.props.cancelHandler?.();\n\t\t\t});\n\t\t} else if (e.key === \"Enter\") {\n\t\t\tconst finish = (val: string) => {\n\t\t\t\tthis.props.saveHandler?.(val);\n\t\t\t};\n\t\t\t// binding so we don't lose the event inside of react's crazy callback structure\n\t\t\tthis.setState({ finished: true }, finish.bind(this, e.target.value));\n\t\t}\n\t}\n\n\tonChange(e: any) {\n\t\tthis.setState({\n\t\t\tvalue: e.target.value,\n\t\t});\n\t}\n\n\tonFocus(e: any) {\n\t\te.target.select();\n\t}\n\n\tonBlur() {\n\t\t// console.log(\"ON BLUR\", performance.now());\n\t\tconst finish = (val: string) => {\n\t\t\tthis.props.saveHandler?.(val);\n\t\t};\n\t\t// binding so we don't lose the event inside of react's crazy callback structure. Finished is set so that the component doesn't call the saveHandler again on unMount\n\t\tthis.setState({ finished: true }, finish.bind(this, this.state.value));\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<input\n\t\t\t\tonFocus={this.onFocus}\n\t\t\t\tonBlur={this.onBlur}\n\t\t\t\tautoFocus={true}\n\t\t\t\tvalue={this.state.value}\n\t\t\t\tclassName=\"workspace-editor\"\n\t\t\t\tonChange={this.onChange}\n\t\t\t\tonKeyDown={this.onKeyDown}\n\t\t\t/>\n\t\t);\n\t}\n}\n\nexport type WorkspaceItemProps = {\n\tworkspace: { name?: string; components?: Array<String> };\n\tworkspaceToLoadOnStart?: any;\n\tfocusedWorkspace?: string;\n\ti?: number;\n\tediting?: boolean;\n\tadding?: boolean;\n\tkey?: number;\n\trenameWorkspace?: Function;\n\taddWorkspace?: Function;\n\tcancelEdit?: Function;\n\tsetFocusedWorkspace?: Function;\n\trenameTooltip?: string;\n\trenameButtonClasses?: string;\n\thandleButtonClicks?: MouseEventHandler<HTMLDivElement>;\n\tallowRename?: boolean;\n\tstartEditingWorkspace?: (e: React.SyntheticEvent, name: string) => void;\n\tdeleteTooltip?: string;\n\tdeleteButtonClasses?: string;\n\tallowDelete?: boolean;\n\tdeleteWorkspace?: (name: string) => void;\n};\nconst WorkspaceItem = (props: WorkspaceItemProps) => {\n\tlet baseClass = \"workspace-item\";\n\tlet classNames = baseClass;\n\tif (FSBL.Clients.WorkspaceClient.activeWorkspace?.name === props.workspace.name) {\n\t\tclassNames = `${classNames} active-workspace`;\n\t}\n\n\tif (props.workspaceToLoadOnStart === props.workspace.name) {\n\t\tclassNames = `${classNames} auto-start-workspace-item`;\n\t}\n\n\tif (props.focusedWorkspace === props.workspace.name) {\n\t\tclassNames = `${classNames} focused-workspace-item`;\n\t\tif (props.i === 0) {\n\t\t\tclassNames = `${classNames} no-top-border`;\n\t\t}\n\t\tif (props.editing || props.adding) {\n\t\t\tclassNames = `${classNames} workspace-item-editing`;\n\t\t\treturn (\n\t\t\t\t<div key={props.i} className={classNames}>\n\t\t\t\t\t<WorkspaceEditor\n\t\t\t\t\t\tvalue={props.workspace.name || \"\"}\n\t\t\t\t\t\tsaveHandler={props.editing ? props.renameWorkspace : props.addWorkspace}\n\t\t\t\t\t\tcancelHandler={props.cancelEdit}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\t}\n\n\treturn (\n\t\t<FinsembleDraggable\n\t\t\tonClick={() => {\n\t\t\t\tprops.setFocusedWorkspace?.(props.workspace.name);\n\t\t\t}}\n\t\t\twrapperClass={classNames}\n\t\t\tdraggableId={props.workspace.name || \"\"}\n\t\t\tindex={props.i || 0}\n\t\t\tonKeydown={(e) => {\n\t\t\t\tif (e.code === \"F2\") {\n\t\t\t\t\tprops.allowRename && props.startEditingWorkspace?.(e, props.workspace.name || \"\");\n\t\t\t\t} else if (e.code === \"Delete\") {\n\t\t\t\t\tprops.allowDelete && props.deleteWorkspace?.(props.workspace.name || \"\");\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t<div className=\"ff-adp-hamburger\"></div>\n\t\t\t<div className=\"workspace-name\" title={props.workspace.name}>\n\t\t\t\t{props.workspace.name}\n\t\t\t</div>\n\t\t\t<div className=\"individual-workspace-actions\">\n\t\t\t\t{props.workspace.name !== FSBL.Clients.WorkspaceClient.activeWorkspace?.name && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\ttitle={props.renameTooltip}\n\t\t\t\t\t\t\tclassName={props.renameButtonClasses}\n\t\t\t\t\t\t\tonMouseDown={props.handleButtonClicks}\n\t\t\t\t\t\t\tonClick={(e: any) => {\n\t\t\t\t\t\t\t\tprops.allowRename && props.startEditingWorkspace?.(e, props.workspace.name || \"\");\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<i className=\"ff-adp-edit\"></i>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\ttitle={props.deleteTooltip}\n\t\t\t\t\t\t\tclassName={props.deleteButtonClasses}\n\t\t\t\t\t\t\tonMouseDown={props.handleButtonClicks}\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tprops.allowDelete && props.deleteWorkspace?.(props.workspace.name || \"\");\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<i className=\"ff-adp-trash-outline\"></i>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</FinsembleDraggable>\n\t);\n};\n\nexport default WorkspaceItem;\n"]}
|
|
@@ -6,11 +6,28 @@ declare let WorkspaceManagementMenuStore: StoreModel;
|
|
|
6
6
|
declare const Actions: {
|
|
7
7
|
initialize: () => void;
|
|
8
8
|
getWorkspaces(cb?: Function): void;
|
|
9
|
+
/**
|
|
10
|
+
* By making the value of `finsemble.scheduledRestart` falsy, the application will remove any existing restart timers.
|
|
11
|
+
* @deprecated use `setScheduledRestart(false)` instead.
|
|
12
|
+
*/
|
|
9
13
|
disableScheduledRestart: () => void;
|
|
14
|
+
/**
|
|
15
|
+
* Finsemble listens for this piece of config. When it changes, it will schedule a daily restart at that time.
|
|
16
|
+
* By making the value of `finsemble.scheduledRestart` falsy, the application will remove any existing restart timers.
|
|
17
|
+
* @deprecated use setScheduledClose
|
|
18
|
+
*/
|
|
10
19
|
setScheduledRestart: (val: ScheduledDayTimeObjectType | false) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Finsemble listens the config set by this function. When it changes, it will schedule a daily restart/shutdown at
|
|
22
|
+
* that time. By making the value falsy, the application will remove any existing restart/shutdown timers.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
11
25
|
setScheduledClose: (key: "finsemble.scheduledRestart" | "finsemble.scheduledShutdown", value: ScheduledDayTimeObjectType | false) => void;
|
|
12
26
|
setDiscardUnsavedChangesPreference: (value: boolean) => void;
|
|
13
27
|
getPreferences: (callback: StandardCallback) => void;
|
|
14
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* Initializes the store for the User Preferences Menu.
|
|
31
|
+
*/
|
|
15
32
|
declare function initialize(WorkspaceMngMenuStore: StoreModel, cb: (store: StoreModel) => void): void;
|
|
16
33
|
export { WorkspaceManagementMenuStore, initialize, UserPreferencesStore, Actions };
|
|
@@ -7,6 +7,7 @@ const Actions = {
|
|
|
7
7
|
if (constants)
|
|
8
8
|
updateConstants = constants;
|
|
9
9
|
});
|
|
10
|
+
// Gets the workspace list and sets the value in the store.
|
|
10
11
|
FSBL.Clients.WorkspaceClient.getWorkspaces((err, workspaces) => {
|
|
11
12
|
if (workspaces)
|
|
12
13
|
UserPreferencesStore.setValue({
|
|
@@ -14,6 +15,7 @@ const Actions = {
|
|
|
14
15
|
value: workspaces,
|
|
15
16
|
});
|
|
16
17
|
});
|
|
18
|
+
// Get the activeWorkspace and set the value.
|
|
17
19
|
FSBL.Clients.WorkspaceClient.getActiveWorkspace((err, activeWorkspace) => {
|
|
18
20
|
if (activeWorkspace) {
|
|
19
21
|
UserPreferencesStore.setValue({
|
|
@@ -22,6 +24,10 @@ const Actions = {
|
|
|
22
24
|
});
|
|
23
25
|
}
|
|
24
26
|
});
|
|
27
|
+
/**
|
|
28
|
+
* We listen here for any workspace updates, and pass them to the store.
|
|
29
|
+
* **NOTE**: You may notice that the signature of this callback is different from the previous ones. In this case we receive a `response`, instead of `workspaces` or `activeWorkspace`. This is because this callback is for a `RouterClient` message. The functions above are callbacks to `WorkspaceClient` API calls.
|
|
30
|
+
*/
|
|
25
31
|
FSBL.Clients.RouterClient.subscribe("Finsemble.WorkspaceService.update", (err, response) => {
|
|
26
32
|
if (response.data && response.data.activeWorkspace) {
|
|
27
33
|
UserPreferencesStore.setValue({
|
|
@@ -51,6 +57,7 @@ const Actions = {
|
|
|
51
57
|
});
|
|
52
58
|
},
|
|
53
59
|
getWorkspaces(cb = Function.prototype) {
|
|
60
|
+
// Gets the workspace list and sets the value in the store.
|
|
54
61
|
FSBL.Clients.WorkspaceClient.getWorkspaces((err, workspaces) => {
|
|
55
62
|
UserPreferencesStore.setValue({
|
|
56
63
|
field: "WorkspaceList",
|
|
@@ -59,6 +66,10 @@ const Actions = {
|
|
|
59
66
|
cb();
|
|
60
67
|
});
|
|
61
68
|
},
|
|
69
|
+
/**
|
|
70
|
+
* By making the value of `finsemble.scheduledRestart` falsy, the application will remove any existing restart timers.
|
|
71
|
+
* @deprecated use `setScheduledRestart(false)` instead.
|
|
72
|
+
*/
|
|
62
73
|
disableScheduledRestart: () => {
|
|
63
74
|
FSBL.Clients.ConfigClient.setPreference({
|
|
64
75
|
field: "finsemble.scheduledRestart",
|
|
@@ -69,12 +80,22 @@ const Actions = {
|
|
|
69
80
|
value: false,
|
|
70
81
|
});
|
|
71
82
|
},
|
|
83
|
+
/**
|
|
84
|
+
* Finsemble listens for this piece of config. When it changes, it will schedule a daily restart at that time.
|
|
85
|
+
* By making the value of `finsemble.scheduledRestart` falsy, the application will remove any existing restart timers.
|
|
86
|
+
* @deprecated use setScheduledClose
|
|
87
|
+
*/
|
|
72
88
|
setScheduledRestart: (val) => {
|
|
73
89
|
FSBL.Clients.ConfigClient.setPreference({
|
|
74
90
|
field: "finsemble.scheduledRestart",
|
|
75
91
|
value: val,
|
|
76
92
|
});
|
|
77
93
|
},
|
|
94
|
+
/**
|
|
95
|
+
* Finsemble listens the config set by this function. When it changes, it will schedule a daily restart/shutdown at
|
|
96
|
+
* that time. By making the value falsy, the application will remove any existing restart/shutdown timers.
|
|
97
|
+
*
|
|
98
|
+
*/
|
|
78
99
|
setScheduledClose: (key, value) => {
|
|
79
100
|
FSBL.Clients.ConfigClient.setPreference({
|
|
80
101
|
field: key,
|
|
@@ -92,6 +113,9 @@ const Actions = {
|
|
|
92
113
|
},
|
|
93
114
|
};
|
|
94
115
|
async function createLocalStore(done) {
|
|
116
|
+
// While the order of these two functions is unimportant, they cannot be done in series as we don't want
|
|
117
|
+
// to call the callback until both stores have been initiated. This keeps the initialization function
|
|
118
|
+
// executing until both stores either have values, or fail to initialize.
|
|
95
119
|
FSBL.Clients.DistributedStoreClient.createStore({ store: "Finsemble-UserPreferences-Local-Store" }, (preferencesErr, preferencesStore) => {
|
|
96
120
|
if (preferencesErr) {
|
|
97
121
|
FSBL.Clients.Logger.system.error("Error fetching user preferences data: ", preferencesErr);
|
|
@@ -102,6 +126,9 @@ async function createLocalStore(done) {
|
|
|
102
126
|
done();
|
|
103
127
|
});
|
|
104
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
* Initializes the store for the User Preferences Menu.
|
|
131
|
+
*/
|
|
105
132
|
function initialize(WorkspaceMngMenuStore, cb) {
|
|
106
133
|
WorkspaceManagementMenuStore = WorkspaceMngMenuStore;
|
|
107
134
|
createLocalStore(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserPreferencesStore.js","sourceRoot":"","sources":["../../../../src/components/userPreferences/stores/UserPreferencesStore.tsx"],"names":[],"mappings":"AAeA,IAAI,oBAAgC,CAAC;AACrC,IAAI,4BAAwC,CAAC;AAE7C,IAAI,eAA8B,CAAC;AAEnC,MAAM,OAAO,GAAG;IACf,UAAU,EAAE;QACX,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC,GAAG,EAAE,SAAS,EAAE,EAAE;YACnE,IAAI,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EAAE,CAAC,KAAc,EAAE,EAAE;QACtD,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,aAAa,CAAC;YACvC,KAAK,EAAE,+CAA+C;YACtD,KAAK,EAAE,KAAK;SACZ,CAAC,CAAC;IACJ,CAAC;IAED,cAAc,EAAE,CAAC,QAA0B,EAAE,EAAE;QAC9C,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IACpD,CAAC;CACD,CAAC;AAEF,KAAK,UAAU,gBAAgB,CAAC,IAAgB;IAI/C,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,WAAW,CAC9C,EAAE,KAAK,EAAE,uCAAuC,EAAE,EAClD,CAAC,cAA6B,EAAE,gBAAwC,EAAE,EAAE;QAC3E,IAAI,cAAc,EAAE;YACnB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,wCAAwC,EAAE,cAAc,CAAC,CAAC;SAC3F;QACD,IAAI,gBAAgB,EAAE;YACrB,oBAAoB,GAAG,gBAAgB,CAAC;SACxC;QACD,IAAI,EAAE,CAAC;IACR,CAAC,CACD,CAAC;AACH,CAAC;AAKD,SAAS,UAAU,CAAC,qBAAiC,EAAE,EAA+B;IACrF,4BAA4B,GAAG,qBAAqB,CAAC;IACrD,gBAAgB,CAAC,GAAG,EAAE;QACrB,OAAO,CAAC,UAAU,EAAE,CAAC;QACrB,EAAE,CAAC,oBAAoB,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,4BAA4B,EAAE,UAAU,EAAE,oBAAoB,EAAE,OAAO,EAAE,CAAC","sourcesContent":["import StoreModel from \"@finsemble/finsemble-api/types/clients/StoreModel\";\nimport { WORKSPACE } from \"@finsemble/finsemble-api/types/common/constants\";\nimport { Workspace as WorkspaceType } from \"@finsemble/finsemble-api/types/services/workspace/types\";\nimport { StandardError, StandardCallback } from \"@finsemble/finsemble-api/types/types\";\nimport { ScheduledDayTimeObjectType } from \"../UserPreferenceTypes\";\n\ntype ConstantsType = typeof WORKSPACE[\"API_CHANNELS\"];\n\ntype UpdateResponseType = {\n\tdata: {\n\t\tactiveWorkspace: WorkspaceType;\n\t\treason: keyof ConstantsType;\n\t};\n};\n\nlet UserPreferencesStore: StoreModel;\nlet WorkspaceManagementMenuStore: StoreModel;\n\nlet updateConstants: ConstantsType;\n\nconst Actions = {\n\tinitialize: function () {\n\t\tFSBL.Clients.WorkspaceClient.getWorkspaceActions((err, constants) => {\n\t\t\tif (constants) updateConstants = constants as ConstantsType;\n\t\t});\n\n\t\t// Gets the workspace list and sets the value in the store.\n\t\tFSBL.Clients.WorkspaceClient.getWorkspaces((err: StandardError, workspaces?: WorkspaceType[]) => {\n\t\t\tif (workspaces)\n\t\t\t\tUserPreferencesStore.setValue({\n\t\t\t\t\tfield: \"WorkspaceList\",\n\t\t\t\t\tvalue: workspaces,\n\t\t\t\t});\n\t\t});\n\n\t\t// Get the activeWorkspace and set the value.\n\t\tFSBL.Clients.WorkspaceClient.getActiveWorkspace((err: StandardError, activeWorkspace?: { data: WorkspaceType }) => {\n\t\t\tif (activeWorkspace) {\n\t\t\t\tUserPreferencesStore.setValue({\n\t\t\t\t\tfield: \"activeWorkspace\",\n\t\t\t\t\tvalue: activeWorkspace,\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * We listen here for any workspace updates, and pass them to the store.\n\t\t * **NOTE**: You may notice that the signature of this callback is different from the previous ones. In this case we receive a `response`, instead of `workspaces` or `activeWorkspace`. This is because this callback is for a `RouterClient` message. The functions above are callbacks to `WorkspaceClient` API calls.\n\t\t */\n\t\tFSBL.Clients.RouterClient.subscribe(\n\t\t\t\"Finsemble.WorkspaceService.update\",\n\t\t\t(err: StandardError, response: UpdateResponseType) => {\n\t\t\t\tif (response.data && response.data.activeWorkspace) {\n\t\t\t\t\tUserPreferencesStore.setValue({\n\t\t\t\t\t\tfield: \"activeWorkspace\",\n\t\t\t\t\t\tvalue: response.data.activeWorkspace,\n\t\t\t\t\t});\n\n\t\t\t\t\tif (updateConstants) {\n\t\t\t\t\t\tswitch (response.data.reason) {\n\t\t\t\t\t\t\tcase updateConstants.GET_ACTIVE_WORKSPACE:\n\t\t\t\t\t\t\tcase updateConstants.NEW_WORKSPACE:\n\t\t\t\t\t\t\tcase updateConstants.IMPORT:\n\t\t\t\t\t\t\tcase updateConstants.SAVE:\n\t\t\t\t\t\t\tcase updateConstants.SAVE_AS:\n\t\t\t\t\t\t\tcase updateConstants.REMOVE:\n\t\t\t\t\t\t\tcase updateConstants.SWITCH_TO:\n\t\t\t\t\t\t\tcase updateConstants.SET_WORKSPACE_ORDER:\n\t\t\t\t\t\t\tcase updateConstants.ADD_WINDOW:\n\t\t\t\t\t\t\tcase updateConstants.REMOVE_WINDOW:\n\t\t\t\t\t\t\tcase updateConstants.RENAME:\n\t\t\t\t\t\t\t\tActions.getWorkspaces();\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t},\n\tgetWorkspaces(cb = Function.prototype) {\n\t\t// Gets the workspace list and sets the value in the store.\n\t\tFSBL.Clients.WorkspaceClient.getWorkspaces((err: StandardError, workspaces: WorkspaceType[]) => {\n\t\t\tUserPreferencesStore.setValue({\n\t\t\t\tfield: \"WorkspaceList\",\n\t\t\t\tvalue: workspaces,\n\t\t\t});\n\t\t\tcb();\n\t\t});\n\t},\n\t/**\n\t * By making the value of `finsemble.scheduledRestart` falsy, the application will remove any existing restart timers.\n\t * @deprecated use `setScheduledRestart(false)` instead.\n\t */\n\tdisableScheduledRestart: () => {\n\t\tFSBL.Clients.ConfigClient.setPreference({\n\t\t\tfield: \"finsemble.scheduledRestart\",\n\t\t\tvalue: false,\n\t\t});\n\n\t\tFSBL.Clients.ConfigClient.setPreference({\n\t\t\tfield: \"finsemble.scheduledCloseDiscardUnsavedChanges\",\n\t\t\tvalue: false,\n\t\t});\n\t},\n\t/**\n\t * Finsemble listens for this piece of config. When it changes, it will schedule a daily restart at that time.\n\t * By making the value of `finsemble.scheduledRestart` falsy, the application will remove any existing restart timers.\n\t * @deprecated use setScheduledClose\n\t */\n\tsetScheduledRestart: (val: ScheduledDayTimeObjectType | false) => {\n\t\tFSBL.Clients.ConfigClient.setPreference({\n\t\t\tfield: \"finsemble.scheduledRestart\",\n\t\t\tvalue: val,\n\t\t});\n\t},\n\n\t/**\n\t * Finsemble listens the config set by this function. When it changes, it will schedule a daily restart/shutdown at\n\t * that time. By making the value falsy, the application will remove any existing restart/shutdown timers.\n\t *\n\t */\n\tsetScheduledClose: (\n\t\tkey: \"finsemble.scheduledRestart\" | \"finsemble.scheduledShutdown\",\n\t\tvalue: ScheduledDayTimeObjectType | false\n\t) => {\n\t\tFSBL.Clients.ConfigClient.setPreference({\n\t\t\tfield: key,\n\t\t\tvalue: value,\n\t\t});\n\t},\n\n\tsetDiscardUnsavedChangesPreference: (value: boolean) => {\n\t\tFSBL.Clients.ConfigClient.setPreference({\n\t\t\tfield: \"finsemble.scheduledCloseDiscardUnsavedChanges\",\n\t\t\tvalue: value,\n\t\t});\n\t},\n\n\tgetPreferences: (callback: StandardCallback) => {\n\t\tFSBL.Clients.ConfigClient.getPreferences(callback);\n\t},\n};\n\nasync function createLocalStore(done: () => void) {\n\t// While the order of these two functions is unimportant, they cannot be done in series as we don't want\n\t// to call the callback until both stores have been initiated. This keeps the initialization function\n\t// executing until both stores either have values, or fail to initialize.\n\tFSBL.Clients.DistributedStoreClient.createStore(\n\t\t{ store: \"Finsemble-UserPreferences-Local-Store\" },\n\t\t(preferencesErr: StandardError, preferencesStore: StoreModel | undefined) => {\n\t\t\tif (preferencesErr) {\n\t\t\t\tFSBL.Clients.Logger.system.error(\"Error fetching user preferences data: \", preferencesErr);\n\t\t\t}\n\t\t\tif (preferencesStore) {\n\t\t\t\tUserPreferencesStore = preferencesStore;\n\t\t\t}\n\t\t\tdone();\n\t\t}\n\t);\n}\n\n/**\n * Initializes the store for the User Preferences Menu.\n */\nfunction initialize(WorkspaceMngMenuStore: StoreModel, cb: (store: StoreModel) => void) {\n\tWorkspaceManagementMenuStore = WorkspaceMngMenuStore;\n\tcreateLocalStore(() => {\n\t\tActions.initialize();\n\t\tcb(UserPreferencesStore);\n\t});\n}\n\nexport { WorkspaceManagementMenuStore, initialize, UserPreferencesStore, Actions };\n"]}
|
|
1
|
+
{"version":3,"file":"UserPreferencesStore.js","sourceRoot":"","sources":["../../../../src/components/userPreferences/stores/UserPreferencesStore.tsx"],"names":[],"mappings":"AAeA,IAAI,oBAAgC,CAAC;AACrC,IAAI,4BAAwC,CAAC;AAE7C,IAAI,eAA8B,CAAC;AAEnC,MAAM,OAAO,GAAG;IACf,UAAU,EAAE;QACX,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC,GAAG,EAAE,SAAS,EAAE,EAAE;YACnE,IAAI,SAAS;gBAAE,eAAe,GAAG,SAA0B,CAAC;QAC7D,CAAC,CAAC,CAAC;QAEH,2DAA2D;QAC3D,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC,GAAkB,EAAE,UAA4B,EAAE,EAAE;YAC/F,IAAI,UAAU;gBACb,oBAAoB,CAAC,QAAQ,CAAC;oBAC7B,KAAK,EAAE,eAAe;oBACtB,KAAK,EAAE,UAAU;iBACjB,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,6CAA6C;QAC7C,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC,GAAkB,EAAE,eAAyC,EAAE,EAAE;YACjH,IAAI,eAAe,EAAE;gBACpB,oBAAoB,CAAC,QAAQ,CAAC;oBAC7B,KAAK,EAAE,iBAAiB;oBACxB,KAAK,EAAE,eAAe;iBACtB,CAAC,CAAC;aACH;QACF,CAAC,CAAC,C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AC,cAA6B,EAAE,gBAAwC,EAAE,EAAE;QAC3E,IAAI,cAAc,EAAE;YACnB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,wCAAwC,EAAE,cAAc,CAAC,CAAC;SAC3F;QACD,IAAI,gBAAgB,EAAE;YACrB,oBAAoB,GAAG,gBAAgB,CAAC;SACxC;QACD,IAAI,EAAE,CAAC;IACR,CAAC,CACD,CAAC;AACH,CAAC;AAED;;GAEG;AACH,SAAS,UAAU,CAAC,qBAAiC,EAAE,EAA+B;IACrF,4BAA4B,GAAG,qBAAqB,CAAC;IACrD,gBAAgB,CAAC,GAAG,EAAE;QACrB,OAAO,CAAC,UAAU,EAAE,CAAC;QACrB,EAAE,CAAC,oBAAoB,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,4BAA4B,EAAE,UAAU,EAAE,oBAAoB,EAAE,OAAO,EAAE,CAAC","sourcesContent":["import StoreModel from \"@finsemble/finsemble-api/types/clients/StoreModel\";\nimport { WORKSPACE } from \"@finsemble/finsemble-api/types/common/constants\";\nimport { Workspace as WorkspaceType } from \"@finsemble/finsemble-api/types/services/workspace/types\";\nimport { StandardError, StandardCallback } from \"@finsemble/finsemble-api/types/types\";\nimport { ScheduledDayTimeObjectType } from \"../UserPreferenceTypes\";\n\ntype ConstantsType = typeof WORKSPACE[\"API_CHANNELS\"];\n\ntype UpdateResponseType = {\n\tdata: {\n\t\tactiveWorkspace: WorkspaceType;\n\t\treason: keyof ConstantsType;\n\t};\n};\n\nlet UserPreferencesStore: StoreModel;\nlet WorkspaceManagementMenuStore: StoreModel;\n\nlet updateConstants: ConstantsType;\n\nconst Actions = {\n\tinitialize: function () {\n\t\tFSBL.Clients.WorkspaceClient.getWorkspaceActions((err, constants) => {\n\t\t\tif (constants) updateConstants = constants as ConstantsType;\n\t\t});\n\n\t\t// Gets the workspace list and sets the value in the store.\n\t\tFSBL.Clients.WorkspaceClient.getWorkspaces((err: StandardError, workspaces?: WorkspaceType[]) => {\n\t\t\tif (workspaces)\n\t\t\t\tUserPreferencesStore.setValue({\n\t\t\t\t\tfield: \"WorkspaceList\",\n\t\t\t\t\tvalue: workspaces,\n\t\t\t\t});\n\t\t});\n\n\t\t// Get the activeWorkspace and set the value.\n\t\tFSBL.Clients.WorkspaceClient.getActiveWorkspace((err: StandardError, activeWorkspace?: { data: WorkspaceType }) => {\n\t\t\tif (activeWorkspace) {\n\t\t\t\tUserPreferencesStore.setValue({\n\t\t\t\t\tfield: \"activeWorkspace\",\n\t\t\t\t\tvalue: activeWorkspace,\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * We listen here for any workspace updates, and pass them to the store.\n\t\t * **NOTE**: You may notice that the signature of this callback is different from the previous ones. In this case we receive a `response`, instead of `workspaces` or `activeWorkspace`. This is because this callback is for a `RouterClient` message. The functions above are callbacks to `WorkspaceClient` API calls.\n\t\t */\n\t\tFSBL.Clients.RouterClient.subscribe(\n\t\t\t\"Finsemble.WorkspaceService.update\",\n\t\t\t(err: StandardError, response: UpdateResponseType) => {\n\t\t\t\tif (response.data && response.data.activeWorkspace) {\n\t\t\t\t\tUserPreferencesStore.setValue({\n\t\t\t\t\t\tfield: \"activeWorkspace\",\n\t\t\t\t\t\tvalue: response.data.activeWorkspace,\n\t\t\t\t\t});\n\n\t\t\t\t\tif (updateConstants) {\n\t\t\t\t\t\tswitch (response.data.reason) {\n\t\t\t\t\t\t\tcase updateConstants.GET_ACTIVE_WORKSPACE:\n\t\t\t\t\t\t\tcase updateConstants.NEW_WORKSPACE:\n\t\t\t\t\t\t\tcase updateConstants.IMPORT:\n\t\t\t\t\t\t\tcase updateConstants.SAVE:\n\t\t\t\t\t\t\tcase updateConstants.SAVE_AS:\n\t\t\t\t\t\t\tcase updateConstants.REMOVE:\n\t\t\t\t\t\t\tcase updateConstants.SWITCH_TO:\n\t\t\t\t\t\t\tcase updateConstants.SET_WORKSPACE_ORDER:\n\t\t\t\t\t\t\tcase updateConstants.ADD_WINDOW:\n\t\t\t\t\t\t\tcase updateConstants.REMOVE_WINDOW:\n\t\t\t\t\t\t\tcase updateConstants.RENAME:\n\t\t\t\t\t\t\t\tActions.getWorkspaces();\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t},\n\tgetWorkspaces(cb = Function.prototype) {\n\t\t// Gets the workspace list and sets the value in the store.\n\t\tFSBL.Clients.WorkspaceClient.getWorkspaces((err: StandardError, workspaces: WorkspaceType[]) => {\n\t\t\tUserPreferencesStore.setValue({\n\t\t\t\tfield: \"WorkspaceList\",\n\t\t\t\tvalue: workspaces,\n\t\t\t});\n\t\t\tcb();\n\t\t});\n\t},\n\t/**\n\t * By making the value of `finsemble.scheduledRestart` falsy, the application will remove any existing restart timers.\n\t * @deprecated use `setScheduledRestart(false)` instead.\n\t */\n\tdisableScheduledRestart: () => {\n\t\tFSBL.Clients.ConfigClient.setPreference({\n\t\t\tfield: \"finsemble.scheduledRestart\",\n\t\t\tvalue: false,\n\t\t});\n\n\t\tFSBL.Clients.ConfigClient.setPreference({\n\t\t\tfield: \"finsemble.scheduledCloseDiscardUnsavedChanges\",\n\t\t\tvalue: false,\n\t\t});\n\t},\n\t/**\n\t * Finsemble listens for this piece of config. When it changes, it will schedule a daily restart at that time.\n\t * By making the value of `finsemble.scheduledRestart` falsy, the application will remove any existing restart timers.\n\t * @deprecated use setScheduledClose\n\t */\n\tsetScheduledRestart: (val: ScheduledDayTimeObjectType | false) => {\n\t\tFSBL.Clients.ConfigClient.setPreference({\n\t\t\tfield: \"finsemble.scheduledRestart\",\n\t\t\tvalue: val,\n\t\t});\n\t},\n\n\t/**\n\t * Finsemble listens the config set by this function. When it changes, it will schedule a daily restart/shutdown at\n\t * that time. By making the value falsy, the application will remove any existing restart/shutdown timers.\n\t *\n\t */\n\tsetScheduledClose: (\n\t\tkey: \"finsemble.scheduledRestart\" | \"finsemble.scheduledShutdown\",\n\t\tvalue: ScheduledDayTimeObjectType | false\n\t) => {\n\t\tFSBL.Clients.ConfigClient.setPreference({\n\t\t\tfield: key,\n\t\t\tvalue: value,\n\t\t});\n\t},\n\n\tsetDiscardUnsavedChangesPreference: (value: boolean) => {\n\t\tFSBL.Clients.ConfigClient.setPreference({\n\t\t\tfield: \"finsemble.scheduledCloseDiscardUnsavedChanges\",\n\t\t\tvalue: value,\n\t\t});\n\t},\n\n\tgetPreferences: (callback: StandardCallback) => {\n\t\tFSBL.Clients.ConfigClient.getPreferences(callback);\n\t},\n};\n\nasync function createLocalStore(done: () => void) {\n\t// While the order of these two functions is unimportant, they cannot be done in series as we don't want\n\t// to call the callback until both stores have been initiated. This keeps the initialization function\n\t// executing until both stores either have values, or fail to initialize.\n\tFSBL.Clients.DistributedStoreClient.createStore(\n\t\t{ store: \"Finsemble-UserPreferences-Local-Store\" },\n\t\t(preferencesErr: StandardError, preferencesStore: StoreModel | undefined) => {\n\t\t\tif (preferencesErr) {\n\t\t\t\tFSBL.Clients.Logger.system.error(\"Error fetching user preferences data: \", preferencesErr);\n\t\t\t}\n\t\t\tif (preferencesStore) {\n\t\t\t\tUserPreferencesStore = preferencesStore;\n\t\t\t}\n\t\t\tdone();\n\t\t}\n\t);\n}\n\n/**\n * Initializes the store for the User Preferences Menu.\n */\nfunction initialize(WorkspaceMngMenuStore: StoreModel, cb: (store: StoreModel) => void) {\n\tWorkspaceManagementMenuStore = WorkspaceMngMenuStore;\n\tcreateLocalStore(() => {\n\t\tActions.initialize();\n\t\tcb(UserPreferencesStore);\n\t});\n}\n\nexport { WorkspaceManagementMenuStore, initialize, UserPreferencesStore, Actions };\n"]}
|
|
@@ -7,6 +7,7 @@ import { initFSBL } from "../../common/helpers";
|
|
|
7
7
|
describe("<NotificationPreferencesHome/>", () => {
|
|
8
8
|
initFSBL(window);
|
|
9
9
|
beforeEach(() => {
|
|
10
|
+
// Ensures Checkboxes are resetted to default check status
|
|
10
11
|
const wrapper = mount(React.createElement(NotificationsPreferencesHome, null));
|
|
11
12
|
if (!wrapper.find("Checkbox").at(0).props().checked) {
|
|
12
13
|
wrapper.find("Checkbox").at(0).simulate("click");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationsPreferencesHome.spec.js","sourceRoot":"","sources":["../../../../src/components/userPreferences/tests/NotificationsPreferencesHome.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,4BAA4B,MAAM,wEAAwE,CAAC;AAClH,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,QAAQ,CAAC,gCAAgC,EAAE,GAAG,EAAE;IAC/C,QAAQ,CAAC,MAAM,CAAC,CAAC;IACjB,UAAU,CAAC,GAAG,EAAE;
|
|
1
|
+
{"version":3,"file":"NotificationsPreferencesHome.spec.js","sourceRoot":"","sources":["../../../../src/components/userPreferences/tests/NotificationsPreferencesHome.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,4BAA4B,MAAM,wEAAwE,CAAC;AAClH,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,QAAQ,CAAC,gCAAgC,EAAE,GAAG,EAAE;IAC/C,QAAQ,CAAC,MA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CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE;QACjD,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,4BAA4B,OAAG,CAAC,CAAC;QACxD,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kEAAkE,EAAE,GAAG,EAAE;QAC3E,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,4BAA4B,OAAG,CAAC,CAAC;QACxD,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACjD,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACpE,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport NotificationsPreferencesHome from \"./../components/content/notificationViews/NotificationsPreferencesHome\";\nimport { initFSBL } from \"../../common/helpers\";\n\ndescribe(\"<NotificationPreferencesHome/>\", () => {\n\tinitFSBL(window);\n\tbeforeEach(() => {\n\t\t// Ensures Checkboxes are resetted to default check status\n\t\tconst wrapper = mount(<NotificationsPreferencesHome />);\n\t\tif (!wrapper.find(\"Checkbox\").at(0).props().checked) {\n\t\t\twrapper.find(\"Checkbox\").at(0).simulate(\"click\");\n\t\t}\n\t\tif (wrapper.find(\"Checkbox\").at(1).props().checked) {\n\t\t\twrapper.find(\"Checkbox\").at(1).simulate(\"click\");\n\t\t}\n\t\tif (wrapper.find(\"Checkbox\").at(2).props().checked) {\n\t\t\twrapper.find(\"Checkbox\").at(1).simulate(\"click\");\n\t\t}\n\t});\n\tit(\"should render 1 ButtonRow for Notification Sources\", () => {\n\t\tconst wrapper = mount(<NotificationsPreferencesHome />);\n\t\texpect(wrapper.find(\"ButtonRow\")).to.have.lengthOf(1);\n\t});\n\n\tit(\"should render 3 Checkboxes\", () => {\n\t\tconst wrapper = mount(<NotificationsPreferencesHome />);\n\t\texpect(wrapper.find(\"Checkbox\")).to.have.lengthOf(3);\n\t});\n\n\tit(\"should render 3 DefualtDropdownButtons\", () => {\n\t\tconst wrapper = mount(<NotificationsPreferencesHome />);\n\t\texpect(wrapper.find(\"DefaultDropdownButton\")).to.have.lengthOf(3);\n\t});\n\n\tit(\"should disable the second Checkbox if the first one is unchecked\", () => {\n\t\tconst wrapper = mount(<NotificationsPreferencesHome />);\n\t\twrapper.find(\"Checkbox\").at(0).simulate(\"click\");\n\t\texpect(wrapper.find(\"Checkbox\").at(1).props().disabled).to.be.true;\n\t});\n});\n"]}
|
|
@@ -60,57 +60,77 @@ describe("<Workspace/>", () => {
|
|
|
60
60
|
it("should display the workspace items", async () => {
|
|
61
61
|
const wrapper = mount(React.createElement(Workspaces, { addListener: () => { }, removeListener: () => { }, getValue: () => { } }));
|
|
62
62
|
expect(wrapper.find("WorkspaceItem")).to.be.length(0);
|
|
63
|
+
// add some workspaces
|
|
63
64
|
wrapper.setState({ workspaceList: workspaces });
|
|
64
65
|
expect(wrapper.find("WorkspaceItem")).to.be.length(6);
|
|
65
66
|
});
|
|
66
67
|
it("should not rename active workspace", () => {
|
|
68
|
+
// Stub the active workspace name
|
|
67
69
|
FSBL.Clients.WorkspaceClient.activeWorkspace = {
|
|
68
70
|
name: "auto_afterFeature",
|
|
69
71
|
};
|
|
70
72
|
const wrapper = mount(React.createElement(Workspaces, { addListener: () => { }, removeListener: () => { }, getValue: () => { } }));
|
|
73
|
+
// add some workspaces
|
|
71
74
|
wrapper.setState({ workspaceList: workspaces });
|
|
72
75
|
expect(wrapper.find("WorkspaceItem")).to.be.length(6);
|
|
76
|
+
// check that we have one active workspace
|
|
73
77
|
const activeWorkspaceNode = wrapper.find(".active-workspace").hostNodes();
|
|
74
78
|
expect(activeWorkspaceNode).to.be.length(1);
|
|
79
|
+
// check that we have the correct active workspace name
|
|
75
80
|
expect(activeWorkspaceNode.find(".workspace-name").text()).to.be.string("auto_afterFeature");
|
|
81
|
+
// no edit or trash icons
|
|
76
82
|
expect(activeWorkspaceNode.find(".ff-adp-edit")).to.be.length(0);
|
|
77
83
|
expect(activeWorkspaceNode.find(".ff-adp-trash-outline")).to.be.length(0);
|
|
78
84
|
});
|
|
79
85
|
it("should cancel workspace rename when ESC key is pressed", () => {
|
|
80
86
|
const wrapper = mount(React.createElement(Workspaces, { addListener: () => { }, removeListener: () => { }, getValue: () => { } }));
|
|
87
|
+
// add some workspaces
|
|
81
88
|
wrapper.setState({ workspaceList: workspaces, focusedWorkspace: "PRF03" });
|
|
82
89
|
expect(wrapper.find("WorkspaceItem")).to.be.length(6);
|
|
90
|
+
// get PRF03 Workspace
|
|
83
91
|
const perf03Node = wrapper.find("WorkspaceItem").at(3);
|
|
84
92
|
expect(perf03Node.find(".workspace-name").text()).to.be.string("PRF03");
|
|
93
|
+
// expect to find one edit icon
|
|
85
94
|
const editIconNode = perf03Node.find(".ff-adp-edit");
|
|
86
95
|
expect(editIconNode).to.be.length(1);
|
|
96
|
+
// click the edit button
|
|
87
97
|
perf03Node.find(".individual-workspace-action").at(0).simulate("click");
|
|
88
98
|
expect(wrapper.find(".workspace-item-editing")).to.be.length(1);
|
|
99
|
+
// assert the input is showing
|
|
89
100
|
const inputNode = wrapper.find("input.workspace-editor");
|
|
90
101
|
expect(inputNode).to.be.length(1);
|
|
102
|
+
// add some text to the input and assert
|
|
91
103
|
inputNode.simulate("change", { target: { value: "Renaming Workspace" } });
|
|
92
104
|
expect(inputNode.getDOMNode().value).to.be.string("Renaming Workspace");
|
|
105
|
+
// press ESC key and assert original value remains unaltered
|
|
93
106
|
inputNode.simulate("keydown", { key: "Escape" });
|
|
94
107
|
expect(wrapper.find(".workspace-item-editing")).to.be.length(0);
|
|
95
108
|
expect(perf03Node.find(".workspace-name").text()).to.be.string("PRF03");
|
|
96
109
|
});
|
|
97
110
|
it("should rename workspace when ENTER key is pressed in the rename prompt", async () => {
|
|
98
111
|
const wrapper = mount(React.createElement(Workspaces, { addListener: () => { }, removeListener: () => { }, getValue: () => { } }));
|
|
112
|
+
// add some workspaces
|
|
99
113
|
wrapper.setState({
|
|
100
114
|
workspaceList: workspaces,
|
|
101
115
|
focusedWorkspace: "PRF03",
|
|
102
116
|
});
|
|
103
117
|
expect(wrapper.find("WorkspaceItem")).to.be.length(6);
|
|
118
|
+
// get PRF03 Workspace
|
|
104
119
|
const perf03Node = wrapper.find("WorkspaceItem").at(3);
|
|
105
120
|
expect(perf03Node.find(".workspace-name").text()).to.be.string("PRF03");
|
|
121
|
+
// expect to find one edit icon
|
|
106
122
|
const editIconNode = perf03Node.find(".ff-adp-edit");
|
|
107
123
|
expect(editIconNode).to.be.length(1);
|
|
124
|
+
// click the edit button
|
|
108
125
|
perf03Node.find(".individual-workspace-action").at(0).simulate("click");
|
|
109
126
|
expect(wrapper.find(".workspace-item-editing")).to.be.length(1);
|
|
127
|
+
// assert the input is showing
|
|
110
128
|
const inputNode = wrapper.find("input.workspace-editor");
|
|
111
129
|
expect(inputNode).to.be.length(1);
|
|
130
|
+
// add some text to the input and assert
|
|
112
131
|
inputNode.simulate("change", { target: { value: "Renamed Workspace" } });
|
|
113
132
|
expect(inputNode.getDOMNode().value).to.be.string("Renamed Workspace");
|
|
133
|
+
// press Enter key and assert original value remains unaltered
|
|
114
134
|
inputNode.simulate("keydown", { key: "Enter" });
|
|
115
135
|
expect(wrapper.find(".workspace-item-editing")).to.be.length(0);
|
|
116
136
|
expect(wrapper.find("WorkspaceItem").at(3).find(".workspace-name").text()).to.be.string("Renamed Workspace");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Workspace.spec.js","sourceRoot":"","sources":["../../../../src/components/userPreferences/tests/Workspace.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,UAAU,MAAM,kCAAkC,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIhD,MAAM,UAAU,GAAG;IAClB;QACC,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,mBAAmB;QACzB,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,CAAC,2CAA2C,CAAC;KACtD;IACD;QACC,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,qBAAqB;QAC3B,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,EAAE;KACV;IACD;QACC,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,mBAAmB;QACzB,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,EAAE;KACV;IACD;QACC,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,CAAC,GAAG,CAAC;QACd,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,EAAE;KACV;IACD;QACC,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,CAAC,GAAG,CAAC;QACd,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,EAAE;KACV;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C;QAChD,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAChE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;IAC9G,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount, shallow } from \"enzyme\";\nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport Workspaces from \"../components/content/Workspaces\";\nimport { initFSBL } from \"../../common/helpers\";\nimport sinon from \"sinon\";\nimport { waitTick } from \"../../sdd/sdd_helpers\";\n\nconst workspaces = [\n\t{\n\t\tversion: \"1.0.0\",\n\t\tname: \"Default Workspace\",\n\t\ttype: \"workspace\",\n\t\tgroups: {},\n\t\twindows: [\"Tour-0580db91-7f2d-4583-a003-d079e74b8fb6\"],\n\t},\n\t{\n\t\tversion: \"1.0.0\",\n\t\tname: \"auto_emptyWorkspace\",\n\t\twindows: [],\n\t\ttype: \"workspace\",\n\t\tgroups: {},\n\t},\n\t{\n\t\tversion: \"1.0.0\",\n\t\tname: \"auto_afterFeature\",\n\t\twindows: [],\n\t\ttype: \"workspace\",\n\t\tgroups: {},\n\t},\n\t{\n\t\tversion: \"1.0.0\",\n\t\tname: \"PRF03\",\n\t\twindows: [\"2\"],\n\t\ttype: \"workspace\",\n\t\tgroups: {},\n\t},\n\t{\n\t\tversion: \"1.0.0\",\n\t\tname: \"RenameTest\",\n\t\twindows: [\"2\"],\n\t\ttype: \"workspace\",\n\t\tgroups: {},\n\t},\n\t{\n\t\tversion: \"1.0.0\",\n\t\tname: \"RenameTest (1)\",\n\t\twindows: [\"2\"],\n\t\ttype: \"workspace\",\n\t\tgroups: {},\n\t},\n];\n\ndescribe(\"<Workspace/>\", () => {\n\tinitFSBL(window);\n\n\tit(\"should render the workspaces components\", async () => {\n\t\tconst wrapper = shallow(<Workspaces addListener={() => {}} removeListener={() => {}} getValue={() => {}} />);\n\t\texpect(wrapper.find(\"WorkspaceItemList\")).to.be.length(1);\n\t\texpect(wrapper.find(\"WorkspaceButton\")).to.be.length(2);\n\t\texpect(wrapper.find(\"Checkbox\")).to.be.length(3);\n\t\texpect(wrapper.find(\"WorkspaceItem\")).to.be.length(0);\n\t});\n\n\tit(\"should display the workspace items\", async () => {\n\t\tconst wrapper = mount(<Workspaces addListener={() => {}} removeListener={() => {}} getValue={() => {}} />);\n\t\texpect(wrapper.find(\"WorkspaceItem\")).to.be.length(0);\n\t\t// add some workspaces\n\t\twrapper.setState({ workspaceList: workspaces });\n\t\texpect(wrapper.find(\"WorkspaceItem\")).to.be.length(6);\n\t});\n\n\tit(\"should not rename active workspace\", () => {\n\t\t// Stub the active workspace name\n\t\t(FSBL.Clients.WorkspaceClient as any).activeWorkspace = {\n\t\t\tname: \"auto_afterFeature\",\n\t\t};\n\n\t\tconst wrapper = mount(<Workspaces addListener={() => {}} removeListener={() => {}} getValue={() => {}} />);\n\t\t// add some workspaces\n\t\twrapper.setState({ workspaceList: workspaces });\n\t\texpect(wrapper.find(\"WorkspaceItem\")).to.be.length(6);\n\n\t\t// check that we have one active workspace\n\t\tconst activeWorkspaceNode = wrapper.find(\".active-workspace\").hostNodes();\n\t\texpect(activeWorkspaceNode).to.be.length(1);\n\t\t// check that we have the correct active workspace name\n\t\texpect(activeWorkspaceNode.find(\".workspace-name\").text()).to.be.string(\"auto_afterFeature\");\n\t\t// no edit or trash icons\n\t\texpect(activeWorkspaceNode.find(\".ff-adp-edit\")).to.be.length(0);\n\t\texpect(activeWorkspaceNode.find(\".ff-adp-trash-outline\")).to.be.length(0);\n\t});\n\n\tit(\"should cancel workspace rename when ESC key is pressed\", () => {\n\t\tconst wrapper = mount(<Workspaces addListener={() => {}} removeListener={() => {}} getValue={() => {}} />);\n\t\t// add some workspaces\n\t\twrapper.setState({ workspaceList: workspaces, focusedWorkspace: \"PRF03\" });\n\t\texpect(wrapper.find(\"WorkspaceItem\")).to.be.length(6);\n\n\t\t// get PRF03 Workspace\n\t\tconst perf03Node = wrapper.find(\"WorkspaceItem\").at(3);\n\t\texpect(perf03Node.find(\".workspace-name\").text()).to.be.string(\"PRF03\");\n\t\t// expect to find one edit icon\n\t\tconst editIconNode = perf03Node.find(\".ff-adp-edit\");\n\t\texpect(editIconNode).to.be.length(1);\n\n\t\t// click the edit button\n\t\tperf03Node.find(\".individual-workspace-action\").at(0).simulate(\"click\");\n\t\texpect(wrapper.find(\".workspace-item-editing\")).to.be.length(1);\n\n\t\t// assert the input is showing\n\t\tconst inputNode = wrapper.find(\"input.workspace-editor\");\n\t\texpect(inputNode).to.be.length(1);\n\n\t\t// add some text to the input and assert\n\t\tinputNode.simulate(\"change\", { target: { value: \"Renaming Workspace\" } });\n\t\texpect((inputNode.getDOMNode() as HTMLInputElement).value).to.be.string(\"Renaming Workspace\");\n\n\t\t// press ESC key and assert original value remains unaltered\n\t\tinputNode.simulate(\"keydown\", { key: \"Escape\" });\n\t\texpect(wrapper.find(\".workspace-item-editing\")).to.be.length(0);\n\t\texpect(perf03Node.find(\".workspace-name\").text()).to.be.string(\"PRF03\");\n\t});\n\n\tit(\"should rename workspace when ENTER key is pressed in the rename prompt\", async () => {\n\t\tconst wrapper = mount(<Workspaces addListener={() => {}} removeListener={() => {}} getValue={() => {}} />);\n\t\t// add some workspaces\n\t\twrapper.setState({\n\t\t\tworkspaceList: workspaces,\n\t\t\tfocusedWorkspace: \"PRF03\",\n\t\t});\n\t\texpect(wrapper.find(\"WorkspaceItem\")).to.be.length(6);\n\n\t\t// get PRF03 Workspace\n\t\tconst perf03Node = wrapper.find(\"WorkspaceItem\").at(3);\n\t\texpect(perf03Node.find(\".workspace-name\").text()).to.be.string(\"PRF03\");\n\t\t// expect to find one edit icon\n\t\tconst editIconNode = perf03Node.find(\".ff-adp-edit\");\n\t\texpect(editIconNode).to.be.length(1);\n\n\t\t// click the edit button\n\t\tperf03Node.find(\".individual-workspace-action\").at(0).simulate(\"click\");\n\t\texpect(wrapper.find(\".workspace-item-editing\")).to.be.length(1);\n\n\t\t// assert the input is showing\n\t\tconst inputNode = wrapper.find(\"input.workspace-editor\");\n\t\texpect(inputNode).to.be.length(1);\n\n\t\t// add some text to the input and assert\n\t\tinputNode.simulate(\"change\", { target: { value: \"Renamed Workspace\" } });\n\t\texpect((inputNode.getDOMNode() as HTMLInputElement).value).to.be.string(\"Renamed Workspace\");\n\n\t\t// press Enter key and assert original value remains unaltered\n\t\tinputNode.simulate(\"keydown\", { key: \"Enter\" });\n\t\texpect(wrapper.find(\".workspace-item-editing\")).to.be.length(0);\n\t\texpect(wrapper.find(\"WorkspaceItem\").at(3).find(\".workspace-name\").text()).to.be.string(\"Renamed Workspace\");\n\t});\n});\n"]}
|
|
1
|
+
{"version":3,"file":"Workspace.spec.js","sourceRoot":"","sources":["../../../../src/components/userPreferences/tests/Workspace.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,UAAU,MAAM,kCAAkC,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIhD,MAAM,UAAU,GAAG;IAClB;QACC,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,mBAAmB;QACzB,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,CAAC,2CAA2C,CAAC;KACtD;IACD;QACC,OAAO,EAAE,OA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nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport Workspaces from \"../components/content/Workspaces\";\nimport { initFSBL } from \"../../common/helpers\";\nimport sinon from \"sinon\";\nimport { waitTick } from \"../../sdd/sdd_helpers\";\n\nconst workspaces = [\n\t{\n\t\tversion: \"1.0.0\",\n\t\tname: \"Default Workspace\",\n\t\ttype: \"workspace\",\n\t\tgroups: {},\n\t\twindows: [\"Tour-0580db91-7f2d-4583-a003-d079e74b8fb6\"],\n\t},\n\t{\n\t\tversion: \"1.0.0\",\n\t\tname: \"auto_emptyWorkspace\",\n\t\twindows: [],\n\t\ttype: \"workspace\",\n\t\tgroups: {},\n\t},\n\t{\n\t\tversion: \"1.0.0\",\n\t\tname: \"auto_afterFeature\",\n\t\twindows: [],\n\t\ttype: \"workspace\",\n\t\tgroups: {},\n\t},\n\t{\n\t\tversion: \"1.0.0\",\n\t\tname: \"PRF03\",\n\t\twindows: [\"2\"],\n\t\ttype: \"workspace\",\n\t\tgroups: {},\n\t},\n\t{\n\t\tversion: \"1.0.0\",\n\t\tname: \"RenameTest\",\n\t\twindows: [\"2\"],\n\t\ttype: \"workspace\",\n\t\tgroups: {},\n\t},\n\t{\n\t\tversion: \"1.0.0\",\n\t\tname: \"RenameTest (1)\",\n\t\twindows: [\"2\"],\n\t\ttype: \"workspace\",\n\t\tgroups: {},\n\t},\n];\n\ndescribe(\"<Workspace/>\", () => {\n\tinitFSBL(window);\n\n\tit(\"should render the workspaces components\", async () => {\n\t\tconst wrapper = shallow(<Workspaces addListener={() => {}} removeListener={() => {}} getValue={() => {}} />);\n\t\texpect(wrapper.find(\"WorkspaceItemList\")).to.be.length(1);\n\t\texpect(wrapper.find(\"WorkspaceButton\")).to.be.length(2);\n\t\texpect(wrapper.find(\"Checkbox\")).to.be.length(3);\n\t\texpect(wrapper.find(\"WorkspaceItem\")).to.be.length(0);\n\t});\n\n\tit(\"should display the workspace items\", async () => {\n\t\tconst wrapper = mount(<Workspaces addListener={() => {}} removeListener={() => {}} getValue={() => {}} />);\n\t\texpect(wrapper.find(\"WorkspaceItem\")).to.be.length(0);\n\t\t// add some workspaces\n\t\twrapper.setState({ workspaceList: workspaces });\n\t\texpect(wrapper.find(\"WorkspaceItem\")).to.be.length(6);\n\t});\n\n\tit(\"should not rename active workspace\", () => {\n\t\t// Stub the active workspace name\n\t\t(FSBL.Clients.WorkspaceClient as any).activeWorkspace = {\n\t\t\tname: \"auto_afterFeature\",\n\t\t};\n\n\t\tconst wrapper = mount(<Workspaces addListener={() => {}} removeListener={() => {}} getValue={() => {}} />);\n\t\t// add some workspaces\n\t\twrapper.setState({ workspaceList: workspaces });\n\t\texpect(wrapper.find(\"WorkspaceItem\")).to.be.length(6);\n\n\t\t// check that we have one active workspace\n\t\tconst activeWorkspaceNode = wrapper.find(\".active-workspace\").hostNodes();\n\t\texpect(activeWorkspaceNode).to.be.length(1);\n\t\t// check that we have the correct active workspace name\n\t\texpect(activeWorkspaceNode.find(\".workspace-name\").text()).to.be.string(\"auto_afterFeature\");\n\t\t// no edit or trash icons\n\t\texpect(activeWorkspaceNode.find(\".ff-adp-edit\")).to.be.length(0);\n\t\texpect(activeWorkspaceNode.find(\".ff-adp-trash-outline\")).to.be.length(0);\n\t});\n\n\tit(\"should cancel workspace rename when ESC key is pressed\", () => {\n\t\tconst wrapper = mount(<Workspaces addListener={() => {}} removeListener={() => {}} getValue={() => {}} />);\n\t\t// add some workspaces\n\t\twrapper.setState({ workspaceList: workspaces, focusedWorkspace: \"PRF03\" });\n\t\texpect(wrapper.find(\"WorkspaceItem\")).to.be.length(6);\n\n\t\t// get PRF03 Workspace\n\t\tconst perf03Node = wrapper.find(\"WorkspaceItem\").at(3);\n\t\texpect(perf03Node.find(\".workspace-name\").text()).to.be.string(\"PRF03\");\n\t\t// expect to find one edit icon\n\t\tconst editIconNode = perf03Node.find(\".ff-adp-edit\");\n\t\texpect(editIconNode).to.be.length(1);\n\n\t\t// click the edit button\n\t\tperf03Node.find(\".individual-workspace-action\").at(0).simulate(\"click\");\n\t\texpect(wrapper.find(\".workspace-item-editing\")).to.be.length(1);\n\n\t\t// assert the input is showing\n\t\tconst inputNode = wrapper.find(\"input.workspace-editor\");\n\t\texpect(inputNode).to.be.length(1);\n\n\t\t// add some text to the input and assert\n\t\tinputNode.simulate(\"change\", { target: { value: \"Renaming Workspace\" } });\n\t\texpect((inputNode.getDOMNode() as HTMLInputElement).value).to.be.string(\"Renaming Workspace\");\n\n\t\t// press ESC key and assert original value remains unaltered\n\t\tinputNode.simulate(\"keydown\", { key: \"Escape\" });\n\t\texpect(wrapper.find(\".workspace-item-editing\")).to.be.length(0);\n\t\texpect(perf03Node.find(\".workspace-name\").text()).to.be.string(\"PRF03\");\n\t});\n\n\tit(\"should rename workspace when ENTER key is pressed in the rename prompt\", async () => {\n\t\tconst wrapper = mount(<Workspaces addListener={() => {}} removeListener={() => {}} getValue={() => {}} />);\n\t\t// add some workspaces\n\t\twrapper.setState({\n\t\t\tworkspaceList: workspaces,\n\t\t\tfocusedWorkspace: \"PRF03\",\n\t\t});\n\t\texpect(wrapper.find(\"WorkspaceItem\")).to.be.length(6);\n\n\t\t// get PRF03 Workspace\n\t\tconst perf03Node = wrapper.find(\"WorkspaceItem\").at(3);\n\t\texpect(perf03Node.find(\".workspace-name\").text()).to.be.string(\"PRF03\");\n\t\t// expect to find one edit icon\n\t\tconst editIconNode = perf03Node.find(\".ff-adp-edit\");\n\t\texpect(editIconNode).to.be.length(1);\n\n\t\t// click the edit button\n\t\tperf03Node.find(\".individual-workspace-action\").at(0).simulate(\"click\");\n\t\texpect(wrapper.find(\".workspace-item-editing\")).to.be.length(1);\n\n\t\t// assert the input is showing\n\t\tconst inputNode = wrapper.find(\"input.workspace-editor\");\n\t\texpect(inputNode).to.be.length(1);\n\n\t\t// add some text to the input and assert\n\t\tinputNode.simulate(\"change\", { target: { value: \"Renamed Workspace\" } });\n\t\texpect((inputNode.getDOMNode() as HTMLInputElement).value).to.be.string(\"Renamed Workspace\");\n\n\t\t// press Enter key and assert original value remains unaltered\n\t\tinputNode.simulate(\"keydown\", { key: \"Enter\" });\n\t\texpect(wrapper.find(\".workspace-item-editing\")).to.be.length(0);\n\t\texpect(wrapper.find(\"WorkspaceItem\").at(3).find(\".workspace-name\").text()).to.be.string(\"Renamed Workspace\");\n\t});\n});\n"]}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2017 by ChartIQ, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*/
|
|
1
5
|
import * as React from "react";
|
|
2
6
|
import "../../assets/css/windowTitleBar.css";
|
|
3
7
|
import { StandardError } from "@finsemble/finsemble-api/types/types";
|
|
@@ -41,6 +45,11 @@ export declare class WindowTitleBarShell extends React.Component<WindowTitleBarS
|
|
|
41
45
|
store?: StoreModel;
|
|
42
46
|
constructor(props: WindowTitleBarShellProps);
|
|
43
47
|
alwaysOnTopListener({ data: { alwaysOnTop } }: any): void;
|
|
48
|
+
/**
|
|
49
|
+
* This is necessary to make sure that the `this` inside of the callback is correct.
|
|
50
|
+
*
|
|
51
|
+
* @memberof WindowTitleBar
|
|
52
|
+
*/
|
|
44
53
|
bindCorrectContext(): void;
|
|
45
54
|
onInitialized(): void;
|
|
46
55
|
onStoreChange(): void;
|
|
@@ -48,19 +57,66 @@ export declare class WindowTitleBarShell extends React.Component<WindowTitleBarS
|
|
|
48
57
|
componentDidUpdate(): void;
|
|
49
58
|
componentWillUnmount(): void;
|
|
50
59
|
setDOMBasedMovement(err: StandardError, response: any): void;
|
|
60
|
+
/**
|
|
61
|
+
* When we are not tiling/tabbing, we want to allow the user to drag the window around via any available space in the tab-region. This function allows that.
|
|
62
|
+
*/
|
|
51
63
|
allowDragOnCenterRegion(): void;
|
|
64
|
+
/**
|
|
65
|
+
* When we are tiling/tabbing, we do not want to allow any window to be dragged around and moved.
|
|
66
|
+
*/
|
|
52
67
|
disallowDragOnCenterRegion(): void;
|
|
68
|
+
/**
|
|
69
|
+
* When tiling start, we want to find the dragHandler and hide it
|
|
70
|
+
*/
|
|
53
71
|
onTilingStart(): void;
|
|
72
|
+
/**
|
|
73
|
+
* When tiling stops, we want to find the dragHandler and re-show it
|
|
74
|
+
*/
|
|
54
75
|
onTilingStop(): void;
|
|
76
|
+
/**
|
|
77
|
+
* Called whenever a tab is dropped on a non tab area.
|
|
78
|
+
* It won't be called when dropped on a tab that handles handle the event.
|
|
79
|
+
*/
|
|
55
80
|
onDropHandler(): void;
|
|
81
|
+
/**
|
|
82
|
+
* Called when user double clicks on drag handle
|
|
83
|
+
*/
|
|
56
84
|
onDoubleClick(): void;
|
|
57
85
|
_setOnMouseUpAndDownHandlers(element: HTMLDivElement): void;
|
|
58
86
|
makeDragHandle(fsblHeader: Element, dragHandleCssClass: string): HTMLElement;
|
|
59
87
|
dragHandleBoundsForShowTabs(startingBounds: DOMRect): DOMRect;
|
|
88
|
+
/**
|
|
89
|
+
* The dragger is an absolutely positioned element that is superimposed on the actual area that we'd like to drag.
|
|
90
|
+
* This is necessary due to a bug in Chromium. Effectively, we need the dragger to change its left position and width
|
|
91
|
+
* to match the intended drag area. These dimensions can change whenever the header is re-rendered (for instance when
|
|
92
|
+
* changing mode from tabbing to non-tabbing). Dimensions can also change when the window itself is resized (due to natural
|
|
93
|
+
* css).
|
|
94
|
+
*
|
|
95
|
+
* Can remove all of the cq-drag and cq-no-drag because Chromium bug is fixed
|
|
96
|
+
* Remove fsbl-drag-region, it is no longer needed
|
|
97
|
+
* Hide the dragHandle during drop operations, so that it doesn't interfere
|
|
98
|
+
*/
|
|
60
99
|
resizeDragHandle(): void;
|
|
100
|
+
/**
|
|
101
|
+
* Whether the component's config allows for the linker.
|
|
102
|
+
* @param {} err
|
|
103
|
+
* @param {*} response
|
|
104
|
+
*/
|
|
61
105
|
showLinkerButton(err: StandardError, response: any): void;
|
|
106
|
+
/**
|
|
107
|
+
* Whether the window is the top-right-most window in a group of windows. If so, it renders a minimize icon for the whole group.
|
|
108
|
+
* @param {} err
|
|
109
|
+
* @param {*} response
|
|
110
|
+
*/
|
|
62
111
|
isTopRight(err: StandardError, response: any): void;
|
|
112
|
+
/**
|
|
113
|
+
* @param {*} err
|
|
114
|
+
* @param {*} response
|
|
115
|
+
*/
|
|
63
116
|
onTitleChange(err: StandardError, response: any): void;
|
|
117
|
+
/**
|
|
118
|
+
* The next few methods are store change handlers that sync local state with the store's state.
|
|
119
|
+
*/
|
|
64
120
|
onShowDockingToolTip(err: StandardError, response: any): void;
|
|
65
121
|
onToggleDockingIcon(err: StandardError, response: any): void;
|
|
66
122
|
onDockingEnabledChanged(err: StandardError, response: any): void;
|
|
@@ -70,15 +126,83 @@ export declare class WindowTitleBarShell extends React.Component<WindowTitleBarS
|
|
|
70
126
|
onTabsChanged(err: StandardError, response: any): void;
|
|
71
127
|
onShowTabsChanged(err: StandardError, response: any): void;
|
|
72
128
|
hackScrollbar(): void;
|
|
129
|
+
/**
|
|
130
|
+
* Gets all the CSS styles in the document that match the element.
|
|
131
|
+
*
|
|
132
|
+
* @param element
|
|
133
|
+
*/
|
|
134
|
+
getStylesForElement(element: HTMLElement): any[];
|
|
135
|
+
/**
|
|
136
|
+
* Get the Actual computed style values for an element native alternative is getComputedStyle() can return used
|
|
137
|
+
* values for some specific values eg a height specified in a % value will return a px value. Setting style with
|
|
138
|
+
* used values can lead to issues when resizing and potentially break application design.
|
|
139
|
+
*
|
|
140
|
+
* Note: this only takes into account the style from styles sheets and not inline styles on the element itself
|
|
141
|
+
*/
|
|
142
|
+
getActualComputedStylesFromStylesheets(element: HTMLElement, property: string): string;
|
|
143
|
+
beginAdjustment(): void;
|
|
144
|
+
/**
|
|
145
|
+
* Once document is ready and header is injected into DOM, begin adjusting the height of elements and bump fixed/absolute elements
|
|
146
|
+
*/
|
|
73
147
|
maybeAdjustWindow(): Promise<void>;
|
|
148
|
+
/**
|
|
149
|
+
* Monitors the DOM for mutations, if the added node has a fixed position with a top style of 0px, it will be bumped by the title bar height.
|
|
150
|
+
* @param headerHeight the height of the header
|
|
151
|
+
*/
|
|
74
152
|
monitorFixedPositionedElements(headerHeight: string): void;
|
|
153
|
+
/**
|
|
154
|
+
* Calls functions to bump fixed and/or absolute elements if configured to do so.
|
|
155
|
+
* @param {object} config bumpElements object
|
|
156
|
+
*/
|
|
75
157
|
bumpElements(config: BumpElements): void;
|
|
158
|
+
/**
|
|
159
|
+
* Set the max height of each element to be the height of the parent container
|
|
160
|
+
* subtracted by the height of the previous element. This forces the element to either obey its
|
|
161
|
+
* predefined height or stay within the bounds of the max height.
|
|
162
|
+
* @param {object} elem HTML element
|
|
163
|
+
* @param {number} prev height of previous sibling
|
|
164
|
+
* @param maxHeight
|
|
165
|
+
*/
|
|
76
166
|
private adjust;
|
|
167
|
+
/**
|
|
168
|
+
* Adjusts the top level content view height to be its height subtracted by the headerHeight and its
|
|
169
|
+
* maxHeight to be 100vh subtracted by the total height of the previous elements.
|
|
170
|
+
* The height of the previous elements are added to this calculation if they are not fixed or absolute.
|
|
171
|
+
* @param {number} headerHeight the height of the header
|
|
172
|
+
*/
|
|
77
173
|
private adjustTopLevelHeight;
|
|
174
|
+
/**
|
|
175
|
+
* Adjusts the content view height to be maximum the parent container height subtracted by the total height elements above it.
|
|
176
|
+
* The height of the previous elements are added to this calculation if they are not fixed or absolute.
|
|
177
|
+
* @param {object} headerNode window titlebar
|
|
178
|
+
*/
|
|
78
179
|
private adjustContentHeight;
|
|
180
|
+
/**
|
|
181
|
+
* Calculates value to bump element by. If 'all' return top style and header height, if '0Positioned' return header height
|
|
182
|
+
* @param type Whether all elements are being bumped by the header height and their top style or just header height
|
|
183
|
+
* @param topStyle Element top value
|
|
184
|
+
* @param bumpBy Value to bump element by
|
|
185
|
+
* @returns Top style for element
|
|
186
|
+
*/
|
|
79
187
|
private calculateBumpValue;
|
|
188
|
+
/**
|
|
189
|
+
* Recursively traverse through the HTML document and return an array of the top level elements
|
|
190
|
+
* and elements with static parents
|
|
191
|
+
* @param {object} element The HTML element
|
|
192
|
+
* @param {array} acc accumulator
|
|
193
|
+
* @returns {array} array top level elements and elements with static parents
|
|
194
|
+
*
|
|
195
|
+
*/
|
|
80
196
|
private traverseHtml;
|
|
197
|
+
/**
|
|
198
|
+
* Bumps elements with fixed positioning down by the configured amount.
|
|
199
|
+
* @private
|
|
200
|
+
*/
|
|
81
201
|
private bumpFixedElements;
|
|
202
|
+
/**
|
|
203
|
+
* Bumps absolute positioned elements with static parents down by the configured amount.
|
|
204
|
+
* @private
|
|
205
|
+
*/
|
|
82
206
|
private bumpAbsoluteElements;
|
|
83
207
|
render(): JSX.Element;
|
|
84
208
|
}
|