@finsemble/finsemble-ui 6.3.0 → 6.4.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/README.md +28 -28
- package/package.json +21 -33
- package/react/actions/favoriteActions.js.map +1 -1
- package/react/actions/linkerActions.js.map +1 -1
- package/react/actions/menuActions.js.map +1 -1
- package/react/actions/rootActions.js.map +1 -1
- package/react/actions/searchActions.js.map +1 -1
- package/react/actions/smartDesktopDesignerActions.d.ts +1 -3
- package/react/actions/smartDesktopDesignerActions.js +0 -1
- package/react/actions/smartDesktopDesignerActions.js.map +1 -1
- package/react/actions/toolbarActions.js.map +1 -1
- package/react/actions/workspaceActions.js.map +1 -1
- package/react/assets/css/advancedAppLauncher.css +636 -636
- package/react/assets/css/appCatalog.css +1069 -1069
- package/react/assets/css/authentication.css +78 -78
- package/react/assets/css/button.css +220 -220
- package/react/assets/css/core/formElements.css +23 -23
- package/react/assets/css/core/icons.css +69 -69
- package/react/assets/css/core/notifications.css +75 -75
- package/react/assets/css/core/windowFrame.css +36 -36
- package/react/assets/css/dashbar.css +78 -78
- package/react/assets/css/defaultTheme.css +356 -356
- package/react/assets/css/dialogs.css +158 -158
- package/react/assets/css/favorites.css +101 -101
- package/react/assets/css/finsemble.css +38 -38
- package/react/assets/css/focus.css +4 -4
- package/react/assets/css/font-finance.css +385 -385
- package/react/assets/css/fonts/Open_Sans/LICENSE.txt +202 -202
- package/react/assets/css/fonts/Open_Sans/OpenSans-Definition.css +118 -118
- package/react/assets/css/fonts/font-finance.svg +124 -124
- package/react/assets/css/fonts/icons-reference.html +1174 -1174
- package/react/assets/css/linkerWindow.css +124 -124
- package/react/assets/css/menus.css +195 -195
- package/react/assets/css/notificationsCenter.css +597 -597
- package/react/assets/css/processMonitor.css +213 -213
- package/react/assets/css/search.css +128 -128
- package/react/assets/css/shared/animations.css +99 -99
- package/react/assets/css/tags.css +136 -136
- package/react/assets/css/toolbar.css +413 -413
- package/react/assets/css/userPreferences.css +538 -568
- package/react/assets/css/windowTitleBar.css +653 -652
- package/react/assets/icons/always-on-top.svg +20 -0
- package/react/assets/icons/caret.svg +7 -0
- package/react/assets/icons/check-square.svg +5 -5
- package/react/assets/icons/check.svg +3 -3
- package/react/assets/icons/chevron-left.svg +3 -3
- package/react/assets/icons/chevron-right.svg +3 -3
- package/react/assets/icons/close.svg +11 -0
- package/react/assets/icons/copy.svg +10 -10
- package/react/assets/icons/documentation.svg +20 -0
- package/react/assets/icons/exclamation-circle.svg +4 -4
- package/react/assets/icons/external-link.svg +12 -12
- package/react/assets/icons/flag.svg +10 -10
- package/react/assets/icons/folder.svg +3 -3
- package/react/assets/icons/font.svg +3 -3
- package/react/assets/icons/globe.svg +3 -3
- package/react/assets/icons/hdd.svg +9 -9
- package/react/assets/icons/key.svg +10 -10
- package/react/assets/icons/life-ring.svg +3 -3
- package/react/assets/icons/linker.svg +18 -0
- package/react/assets/icons/lock.svg +5 -5
- package/react/assets/icons/magic.svg +15 -15
- package/react/assets/icons/maximize.svg +16 -0
- package/react/assets/icons/minimize.svg +15 -0
- package/react/assets/icons/moon.svg +10 -10
- package/react/assets/icons/paint-roller.svg +3 -3
- package/react/assets/icons/pencil.svg +10 -10
- package/react/assets/icons/plus.svg +3 -3
- package/react/assets/icons/question-circle.svg +5 -5
- package/react/assets/icons/search.svg +3 -3
- package/react/assets/icons/sun.svg +9 -9
- package/react/assets/icons/times.svg +3 -3
- package/react/assets/icons/toggle-off.svg +6 -6
- package/react/assets/icons/toggle-on.svg +6 -6
- package/react/assets/icons/toolbar.svg +12 -0
- package/react/assets/icons/tools.svg +3 -3
- package/react/assets/icons/trash.svg +12 -12
- package/react/assets/icons/upload.svg +10 -10
- package/react/assets/icons/window.svg +3 -3
- package/react/assets/img/finsemble-display.png +0 -0
- package/react/componentTemplateGenerator.js +85 -85
- package/react/componentTemplateGenerator.js.map +1 -1
- package/react/components/FinsembleProvider.js.map +1 -1
- package/react/components/appCatalog/AppCatalog.js.map +1 -1
- package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
- package/react/components/appCatalog/components/AppCard.js.map +1 -1
- package/react/components/appCatalog/components/AppList.js.map +1 -1
- package/react/components/appCatalog/components/AppResults.js.map +1 -1
- package/react/components/appCatalog/components/Carousel.js.map +1 -1
- package/react/components/appCatalog/components/EmptyResults.js.map +1 -1
- package/react/components/appCatalog/components/Hero.js.map +1 -1
- package/react/components/appCatalog/components/Home.js.map +1 -1
- package/react/components/appCatalog/components/SearchBar.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppDescription.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppDevNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppShowcase.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/Header.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/ImageCarousel.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/Modal.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/ReleaseNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/SupportNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/VersionNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/defaults.js.map +1 -1
- package/react/components/appCatalog/components/Tag.js.map +1 -1
- package/react/components/appCatalog/components/Toast.js.map +1 -1
- package/react/components/appCatalog/components/helpers.js.map +1 -1
- package/react/components/appCatalog/index.js.map +1 -1
- package/react/components/appCatalog/modules/AppDirectory.js.map +1 -1
- package/react/components/appCatalog/modules/FDC3.js.map +1 -1
- package/react/components/appCatalog/stores/appStore.js.map +1 -1
- package/react/components/appCatalog/stores/storeActions.js.map +1 -1
- package/react/components/common/Accordion.d.ts +11 -0
- package/react/components/common/Accordion.js +20 -0
- package/react/components/common/Accordion.js.map +1 -0
- package/react/components/common/Button.js.map +1 -1
- package/react/components/common/ButtonIcon.js.map +1 -1
- package/react/components/common/ButtonRow.js.map +1 -1
- package/react/components/common/ButtonTile.js.map +1 -1
- package/react/components/common/Checkbox.d.ts +1 -0
- package/react/components/common/Checkbox.js +3 -1
- package/react/components/common/Checkbox.js.map +1 -1
- package/react/components/common/ColorPicker.js.map +1 -1
- package/react/components/common/DropZone.js.map +1 -1
- package/react/components/common/DropdownButton.js.map +1 -1
- package/react/components/common/FileInput.d.ts +2 -1
- package/react/components/common/FileInput.js +9 -4
- package/react/components/common/FileInput.js.map +1 -1
- package/react/components/common/FinsembleIcon.d.ts +1 -1
- package/react/components/common/FinsembleIcon.js +16 -0
- package/react/components/common/FinsembleIcon.js.map +1 -1
- package/react/components/common/FinsembleSelect.js.map +1 -1
- package/react/components/common/FinsembleToggle.js.map +1 -1
- package/react/components/common/Header.js +1 -1
- package/react/components/common/Header.js.map +1 -1
- package/react/components/common/ImagePreview.js.map +1 -1
- package/react/components/common/InputTable.d.ts +11 -0
- package/react/components/common/InputTable.js +50 -0
- package/react/components/common/InputTable.js.map +1 -0
- package/react/components/common/LoadingSpinner.js.map +1 -1
- package/react/components/common/Tab.js.map +1 -1
- package/react/components/common/Tooltip.js.map +1 -1
- package/react/components/common/css/accordion.css +99 -0
- package/react/components/common/css/application-edit-page.css +324 -117
- package/react/components/common/css/application-list.css +49 -47
- package/react/components/common/css/button.css +166 -164
- package/react/components/common/css/checkbox.css +30 -0
- package/react/components/common/css/color-picker.css +52 -52
- package/react/components/common/css/drop-zone.css +17 -17
- package/react/components/common/css/file-input.css +65 -49
- package/react/components/common/css/header.css +30 -43
- package/react/components/common/css/icon.css +13 -13
- package/react/components/common/css/image-preview.css +57 -57
- package/react/components/common/css/loading-spinner.css +39 -39
- package/react/components/common/css/selector.css +51 -51
- package/react/components/common/css/styles.css +127 -128
- package/react/components/common/css/tab.css +56 -56
- package/react/components/common/css/toggle.css +32 -32
- package/react/components/common/css/tooltip.css +78 -78
- package/react/components/common/file_helpers.js.map +1 -1
- package/react/components/common/fixtures/FinsembleIcon.css +4 -4
- package/react/components/common/helpers.js.map +1 -1
- package/react/components/common/stories/Accordion.stories.d.ts +14 -0
- package/react/components/common/stories/Accordion.stories.js +42 -0
- package/react/components/common/stories/Accordion.stories.js.map +1 -0
- package/react/components/common/stories/Button.stories.js.map +1 -1
- package/react/components/common/stories/ButtonIcon.stories.js.map +1 -1
- package/react/components/common/stories/ButtonRow.stories.js.map +1 -1
- package/react/components/common/stories/ButtonTile.stories.js.map +1 -1
- package/react/components/common/stories/Checkbox.stories.js.map +1 -1
- package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
- package/react/components/common/stories/DropZone.stories.js.map +1 -1
- package/react/components/common/stories/DropdownButton.stories.d.ts +11 -0
- package/react/components/common/stories/DropdownButton.stories.js +12 -0
- package/react/components/common/stories/DropdownButton.stories.js.map +1 -1
- package/react/components/common/stories/FileInput.stories.d.ts +2 -1
- package/react/components/common/stories/FileInput.stories.js +6 -0
- package/react/components/common/stories/FileInput.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleIcon.stories.js +1 -0
- package/react/components/common/stories/FinsembleIcon.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleSelect.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
- package/react/components/common/stories/Header.stories.js.map +1 -1
- package/react/components/common/stories/ImagePreview.stories.js.map +1 -1
- package/react/components/common/stories/InputTable.stories.d.ts +12 -0
- package/react/components/common/stories/InputTable.stories.js +35 -0
- package/react/components/common/stories/InputTable.stories.js.map +1 -0
- package/react/components/common/stories/LoadingSpinner.stories.js.map +1 -1
- package/react/components/common/stories/Tab.stories.js.map +1 -1
- package/react/components/common/stories/Tooltip.stories.js.map +1 -1
- package/react/components/{smartDesktopDesigner/tests/ApplicationEdit.spec.d.ts → common/tests/Accordion.spec.d.ts} +0 -0
- package/react/components/common/tests/Accordion.spec.js +53 -0
- package/react/components/common/tests/Accordion.spec.js.map +1 -0
- package/react/components/common/tests/ButtonRow.spec.js.map +1 -1
- package/react/components/common/tests/Checkbox.spec.js +5 -3
- package/react/components/common/tests/Checkbox.spec.js.map +1 -1
- package/react/components/common/tests/ColorPicker.spec.js.map +1 -1
- package/react/components/common/tests/DropZone.spec.js.map +1 -1
- package/react/components/common/tests/FileInput.spec.js +20 -5
- package/react/components/common/tests/FileInput.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
- package/react/components/common/tests/Header.spec.js +6 -2
- package/react/components/common/tests/Header.spec.js.map +1 -1
- package/react/components/common/tests/ImagePreview.spec.js.map +1 -1
- package/react/components/{smartDesktopDesigner/tests/ApplicationSetup.spec.d.ts → common/tests/InputTable.spec.d.ts} +0 -0
- package/react/components/common/tests/InputTable.spec.js +166 -0
- package/react/components/common/tests/InputTable.spec.js.map +1 -0
- package/react/components/common/tests/Tab.spec.js.map +1 -1
- package/react/components/common/tests/Tooltip.spec.js.map +1 -1
- package/react/components/favorites/FavoriteMaker.js.map +1 -1
- package/react/components/favorites/FavoritesShell.js.map +1 -1
- package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
- package/react/components/favorites/FavoritesShell.stories.js.map +1 -1
- package/react/components/favorites/index.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.css +126 -126
- package/react/components/fdc3Resolver/ResolverDialog.js +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.spec.js +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.stories.js +13 -0
- package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
- package/react/components/icon/Icon.js.map +1 -1
- package/react/components/icon/index.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialog.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogButton.js +1 -1
- package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogQuestion.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogTextInput.js.map +1 -1
- package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
- package/react/components/legacyControls/FinsembleDraggable.js.map +1 -1
- package/react/components/legacyControls/FinsembleHoverDetector.js.map +1 -1
- package/react/components/legacyControls/FinsembleMenuSection.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialog.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialog.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
- package/react/components/linker/LinkerMenu.js.map +1 -1
- package/react/components/linker/LinkerMenuDeprecated.js.map +1 -1
- package/react/components/linker/index.js.map +1 -1
- package/react/components/linker/remoteRedux.js.map +1 -1
- package/react/components/menu/Menu.d.ts +1 -0
- package/react/components/menu/Menu.js.map +1 -1
- package/react/components/menu/MenuAutoResizer.d.ts +2 -1
- package/react/components/menu/MenuAutoResizer.js +4 -3
- package/react/components/menu/MenuAutoResizer.js.map +1 -1
- package/react/components/menu/MenuContent.js.map +1 -1
- package/react/components/menu/MenuHotKey.js.map +1 -1
- package/react/components/menu/MenuItem.js.map +1 -1
- package/react/components/menu/MenuPortal.js +99 -92
- package/react/components/menu/MenuPortal.js.map +1 -1
- package/react/components/menu/MenuShell.d.ts +1 -0
- package/react/components/menu/MenuShell.js +3 -2
- package/react/components/menu/MenuShell.js.map +1 -1
- package/react/components/menu/MenuToggle.js.map +1 -1
- package/react/components/menu/index.js.map +1 -1
- package/react/components/menu/keyboardNavigation.js.map +1 -1
- package/react/components/menu/menuContext.d.ts +1 -0
- package/react/components/menu/menuContext.js.map +1 -1
- package/react/components/menu/menuHelpers.d.ts +1 -1
- package/react/components/menu/menuHelpers.js +2 -2
- package/react/components/menu/menuHelpers.js.map +1 -1
- package/react/components/notifications/components/NoNotifications.js.map +1 -1
- package/react/components/notifications/components/drawer/Drawer.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerControls.js +30 -6
- package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +2 -0
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +20 -27
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
- package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
- package/react/components/notifications/components/shared/IconButton.js +5 -1
- package/react/components/notifications/components/shared/IconButton.js.map +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.js +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
- package/react/components/notifications/components/shared/OverflowMenu.js +5 -1
- package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyContentLogo.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderLogo.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
- package/react/components/notifications/components/views/CardView.js.map +1 -1
- package/react/components/notifications/components/views/ListView.js +1 -1
- package/react/components/notifications/components/views/ListView.js.map +1 -1
- package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
- package/react/components/notifications/constants.js.map +1 -1
- package/react/components/notifications/icons/Card.js.map +1 -1
- package/react/components/notifications/icons/Chevron.js.map +1 -1
- package/react/components/notifications/icons/CloseIcon.js.map +1 -1
- package/react/components/notifications/icons/EnvelopeClose.js.map +1 -1
- package/react/components/notifications/icons/EnvelopeOpen.js.map +1 -1
- package/react/components/notifications/icons/SnoozeIcon.js.map +1 -1
- package/react/components/notifications/index.js.map +1 -1
- package/react/components/notifications/notificationsContext.js.map +1 -1
- package/react/components/notifications/types.js.map +1 -1
- package/react/components/notifications/utils.js.map +1 -1
- package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
- package/react/components/processMonitor/ProcessMonitorTypes.js.map +1 -1
- package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
- package/react/components/processMonitor/components/ListHeader.js.map +1 -1
- package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
- package/react/components/processMonitor/constants.js.map +1 -1
- package/react/components/processMonitor/helpers.js.map +1 -1
- package/react/components/processMonitor/helpers.spec.js.map +1 -1
- package/react/components/processMonitor/index.js.map +1 -1
- package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +1 -0
- package/react/components/processMonitor/stores/ProcessMonitorStore.js +51 -50
- package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
- package/react/components/quickComponentForm/QuickComponentForm.js.map +1 -1
- package/react/components/quickComponentForm/index.js.map +1 -1
- package/react/components/quickComponentForm/quickComponent.css +3 -3
- package/react/components/search/Highlight.js.map +1 -1
- package/react/components/search/Highlight.spec.js.map +1 -1
- package/react/components/search/Highlight.stories.js.map +1 -1
- package/react/components/search/Search.js.map +1 -1
- package/react/components/search/SearchBestMatch.js.map +1 -1
- package/react/components/search/SearchInput.js.map +1 -1
- package/react/components/search/SearchProviderResults.js.map +1 -1
- package/react/components/search/SearchResult.js.map +1 -1
- package/react/components/search/SearchResults.js.map +1 -1
- package/react/components/search/index.js.map +1 -1
- package/react/components/shared/Animate.js.map +1 -1
- package/react/components/shared/BellIcon.js.map +1 -1
- package/react/components/shared/BellIconCrossed.js.map +1 -1
- package/react/components/shared/Button.js.map +1 -1
- package/react/components/shared/ConditionalWrapper.js.map +1 -1
- package/react/components/shared/DefaultDropdownButton.js +1 -1
- package/react/components/shared/DefaultDropdownButton.js.map +1 -1
- package/react/components/shared/NavigationButton.js.map +1 -1
- package/react/components/shared/Tag.js.map +1 -1
- package/react/components/shared/TagsMenu.js.map +1 -1
- package/react/components/shared/addProtocolToValidURL.js.map +1 -1
- package/react/components/shared/linkerUtil.js.map +1 -1
- package/react/components/shared/openQuitConfirmationDialog.js.map +1 -1
- package/react/components/shared/tests/DefaultDropdownButton.spec.js.map +1 -1
- package/react/components/shared/tests/addProtocolToValidURL.spec.js.map +1 -1
- package/react/components/shared/validateURL.js.map +1 -1
- package/react/components/shared/validateURL.spec.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.css +3 -3
- package/react/components/singleInputDialog/SingleInputDialog.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.spec.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.stories.js.map +1 -1
- package/react/components/singleInputDialog/index.js.map +1 -1
- package/react/components/smartDesktopDesigner/AddApp.d.ts +14 -0
- package/react/components/smartDesktopDesigner/AddApp.js +60 -0
- package/react/components/smartDesktopDesigner/AddApp.js.map +1 -0
- package/react/components/smartDesktopDesigner/AppEditAccess.js +16 -32
- package/react/components/smartDesktopDesigner/AppEditAccess.js.map +1 -1
- package/react/components/smartDesktopDesigner/AppEditPage.d.ts +5 -19
- package/react/components/smartDesktopDesigner/AppEditPage.js +548 -59
- package/react/components/smartDesktopDesigner/AppEditPage.js.map +1 -1
- package/react/components/smartDesktopDesigner/Appearance.css +27 -94
- package/react/components/smartDesktopDesigner/Appearance.helpers.js.map +1 -1
- package/react/components/smartDesktopDesigner/Appearance.js +1 -1
- package/react/components/smartDesktopDesigner/Appearance.js.map +1 -1
- package/react/components/smartDesktopDesigner/Application.d.ts +1 -0
- package/react/components/smartDesktopDesigner/Application.js +151 -93
- package/react/components/smartDesktopDesigner/Application.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationList.d.ts +2 -1
- package/react/components/smartDesktopDesigner/ApplicationList.js +7 -3
- package/react/components/smartDesktopDesigner/ApplicationList.js.map +1 -1
- package/react/components/smartDesktopDesigner/Applications.d.ts +0 -3
- package/react/components/smartDesktopDesigner/Applications.js +52 -102
- package/react/components/smartDesktopDesigner/Applications.js.map +1 -1
- package/react/components/smartDesktopDesigner/AssetsPage.css +26 -26
- package/react/components/smartDesktopDesigner/AssetsPage.js.map +1 -1
- package/react/components/smartDesktopDesigner/Authentication.js +2 -9
- package/react/components/smartDesktopDesigner/Authentication.js.map +1 -1
- package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js +8 -1
- package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +1 -1
- package/react/components/smartDesktopDesigner/Content.js.map +1 -1
- package/react/components/smartDesktopDesigner/ContentHeader.d.ts +5 -0
- package/react/components/smartDesktopDesigner/ContentHeader.js +10 -0
- package/react/components/smartDesktopDesigner/ContentHeader.js.map +1 -0
- package/react/components/smartDesktopDesigner/CurrentView.js +2 -1
- package/react/components/smartDesktopDesigner/CurrentView.js.map +1 -1
- package/react/components/smartDesktopDesigner/Export.d.ts +1 -0
- package/react/components/smartDesktopDesigner/Export.js +40 -9
- package/react/components/smartDesktopDesigner/Export.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportCloud.d.ts +3 -1
- package/react/components/smartDesktopDesigner/ExportCloud.js +4 -6
- package/react/components/smartDesktopDesigner/ExportCloud.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportDeployInfo.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportZip.d.ts +3 -1
- package/react/components/smartDesktopDesigner/ExportZip.js +8 -3
- package/react/components/smartDesktopDesigner/ExportZip.js.map +1 -1
- package/react/components/smartDesktopDesigner/GettingStarted.d.ts +1 -0
- package/react/components/smartDesktopDesigner/GettingStarted.js +11 -25
- package/react/components/smartDesktopDesigner/GettingStarted.js.map +1 -1
- package/react/components/smartDesktopDesigner/Navigation.d.ts +2 -2
- package/react/components/smartDesktopDesigner/Navigation.js +17 -15
- package/react/components/smartDesktopDesigner/Navigation.js.map +1 -1
- package/react/components/smartDesktopDesigner/ProjectErrors.js.map +1 -1
- package/react/components/smartDesktopDesigner/Publish.js.map +1 -1
- package/react/components/smartDesktopDesigner/PublishProgress.js.map +1 -1
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +3 -3
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +11 -17
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
- package/react/components/smartDesktopDesigner/ThemePage.css +109 -110
- package/react/components/smartDesktopDesigner/ThemePage.js +0 -7
- package/react/components/smartDesktopDesigner/ThemePage.js.map +1 -1
- package/react/components/smartDesktopDesigner/Themes.js +0 -2
- package/react/components/smartDesktopDesigner/Themes.js.map +1 -1
- package/react/components/smartDesktopDesigner/Toolbar.d.ts +15 -0
- package/react/components/smartDesktopDesigner/Toolbar.js +123 -0
- package/react/components/smartDesktopDesigner/Toolbar.js.map +1 -0
- package/react/components/smartDesktopDesigner/View.js +1 -1
- package/react/components/smartDesktopDesigner/View.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/fsbl_functions.d.ts +1 -1
- package/react/components/smartDesktopDesigner/common/fsbl_functions.js +2 -2
- package/react/components/smartDesktopDesigner/common/fsbl_functions.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/getCSSVars.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/views.d.ts +2 -36
- package/react/components/smartDesktopDesigner/common/views.js +150 -111
- package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
- package/react/components/smartDesktopDesigner/css/appearance.css +18 -10
- package/react/components/smartDesktopDesigner/css/applications.css +167 -127
- package/react/components/smartDesktopDesigner/css/authentication.css +119 -125
- package/react/components/smartDesktopDesigner/css/buttons.css +12 -12
- package/react/components/smartDesktopDesigner/css/export.css +176 -163
- package/react/components/smartDesktopDesigner/css/getting-started.css +28 -6
- package/react/components/smartDesktopDesigner/css/nav.css +120 -93
- package/react/components/smartDesktopDesigner/css/project-errors.css +15 -15
- package/react/components/smartDesktopDesigner/css/project-header.css +124 -121
- package/react/components/smartDesktopDesigner/css/styles.css +178 -179
- package/react/components/smartDesktopDesigner/css/views.css +23 -16
- package/react/components/smartDesktopDesigner/fixtures/apps.d.ts +2 -0
- package/react/components/smartDesktopDesigner/fixtures/apps.js +41 -6
- package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/authenticationProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/configTemplate.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/exportProps.js +3 -0
- package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/projectErrorsProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/themeProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/views.d.ts +2 -2
- package/react/components/smartDesktopDesigner/fixtures/views.js +58 -26
- package/react/components/smartDesktopDesigner/fixtures/views.js.map +1 -1
- package/react/components/smartDesktopDesigner/sdd_helpers.d.ts +1 -1
- package/react/components/smartDesktopDesigner/sdd_helpers.js +4 -3
- package/react/components/smartDesktopDesigner/sdd_helpers.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.d.ts +3 -1
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js +12 -33
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Appearance.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.d.ts +2 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js +8 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/AssetsPage.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Authentication.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.d.ts +10 -0
- package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.js +13 -0
- package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.js.map +1 -0
- package/react/components/smartDesktopDesigner/stories/Export.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.d.ts +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportZip.stories.d.ts +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Navigation.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Publish.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js +7 -1
- package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ThemePage.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Themes.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Toolbar.stories.d.ts +14 -0
- package/react/components/smartDesktopDesigner/stories/Toolbar.stories.js +38 -0
- package/react/components/smartDesktopDesigner/stories/Toolbar.stories.js.map +1 -0
- package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js +73 -122
- package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Applications.spec.d.ts +1 -1
- package/react/components/smartDesktopDesigner/tests/Applications.spec.js +61 -560
- package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Authentication.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/{ProjectHeader.spec.d.ts → ContentHeader.spec.d.ts} +0 -0
- package/react/components/smartDesktopDesigner/tests/ContentHeader.spec.js +31 -0
- package/react/components/smartDesktopDesigner/tests/ContentHeader.spec.js.map +1 -0
- package/react/components/smartDesktopDesigner/tests/Export.spec.js +129 -0
- package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js +7 -0
- package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Navigation.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js +3 -14
- package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Publish.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js +2 -31
- package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Themes.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Toolbar.spec.d.ts +1 -0
- package/react/components/smartDesktopDesigner/tests/Toolbar.spec.js +203 -0
- package/react/components/smartDesktopDesigner/tests/Toolbar.spec.js.map +1 -0
- package/react/components/smartDesktopDesigner/tests/a11y_helper.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.d.ts +1 -0
- package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.js +18 -0
- package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.js.map +1 -0
- package/react/components/smartDesktopDesigner/themeDefinitions.js.map +1 -1
- package/react/components/system/System.js.map +1 -1
- package/react/components/system/System.spec.js.map +1 -1
- package/react/components/system/System.stories.js.map +1 -1
- package/react/components/system/SystemTrayComponentShell.js.map +1 -1
- package/react/components/system/index.js.map +1 -1
- package/react/components/toolbar/AutoArrange.js.map +1 -1
- package/react/components/toolbar/DragHandle.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.spec.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.stories.js.map +1 -1
- package/react/components/toolbar/NotificationControl.js.map +1 -1
- package/react/components/toolbar/RevealAll.js.map +1 -1
- package/react/components/toolbar/RevealAll.spec.js.map +1 -1
- package/react/components/toolbar/RevealAll.stories.js.map +1 -1
- package/react/components/toolbar/ToolbarIcon.js.map +1 -1
- package/react/components/toolbar/ToolbarSection.js.map +1 -1
- package/react/components/toolbar/ToolbarShell.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js +47 -45
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/SortBy.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/ToggleFavoriteDropdown.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js.map +1 -1
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/DynamicAppLauncher.js.map +1 -1
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.d.ts +1 -0
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/appLauncher.css +30 -30
- package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +1 -0
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js +17 -34
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
- package/react/components/toolbar/dashbar/Dashbar.js +3 -1
- package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
- package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
- package/react/components/toolbar/index.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.d.ts +1 -1
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.d.ts +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.d.ts +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.d.ts +1 -1
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/workspaceManagementMenu.css +90 -90
- package/react/components/userPreferences/NotificationsPreferencesContext.js.map +1 -1
- package/react/components/userPreferences/UserPreferenceTypes.js.map +1 -1
- package/react/components/userPreferences/UserPreferences.js.map +1 -1
- package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
- package/react/components/userPreferences/UserPreferencesWrapper.js.map +1 -1
- package/react/components/userPreferences/components/ContentSection.js.map +1 -1
- package/react/components/userPreferences/components/LeftNav.js.map +1 -1
- package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
- package/react/components/userPreferences/components/content/DashbarEditorItem.js.map +1 -1
- package/react/components/userPreferences/components/content/General.js.map +1 -1
- package/react/components/userPreferences/components/content/Notifications.js.map +1 -1
- package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
- package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceButton.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js.map +1 -1
- package/react/components/userPreferences/index.js.map +1 -1
- package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
- package/react/components/userPreferences/stories/DashbarEditor.stories.js.map +1 -1
- package/react/components/userPreferences/stories/DashbarEditorItem.stories.js.map +1 -1
- package/react/components/userPreferences/stories/General.stories.js.map +1 -1
- package/react/components/userPreferences/stories/Notifications.stories.js.map +1 -1
- package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js.map +1 -1
- package/react/components/userPreferences/stories/NotificationsSources.stories.js.map +1 -1
- package/react/components/userPreferences/stories/UserPreferences.stories.js.map +1 -1
- package/react/components/userPreferences/stories/WorkspaceButton.stories.js.map +1 -1
- package/react/components/userPreferences/stories/WorkspaceComponents.stories.js.map +1 -1
- package/react/components/userPreferences/stories/WorkspaceItem.stories.js.map +1 -1
- package/react/components/userPreferences/stories/WorkspaceItemList.stories.js.map +1 -1
- package/react/components/userPreferences/stories/Workspaces.stories.js.map +1 -1
- package/react/components/userPreferences/tests/ContentSection.spec.js.map +1 -1
- package/react/components/userPreferences/tests/DashbarEditor.spec.js.map +1 -1
- package/react/components/userPreferences/tests/DashbarEditorItem.spec.js.map +1 -1
- package/react/components/userPreferences/tests/General.spec.js.map +1 -1
- package/react/components/userPreferences/tests/LeftNav.spec.js.map +1 -1
- package/react/components/userPreferences/tests/NotificationSourceTypes.spec.js.map +1 -1
- package/react/components/userPreferences/tests/Notifications.spec.js.map +1 -1
- package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js.map +1 -1
- package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.js.map +1 -1
- package/react/components/userPreferences/tests/ScheduledRestart.spec.js +1 -1
- package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceButton.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceComponents.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceItem.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceItemList.spec.js.map +1 -1
- package/react/components/utils.js.map +1 -1
- package/react/components/windowTitleBar/WindowTitleBarShell.js +8 -1
- package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
- package/react/components/windowTitleBar/components/center/Tab.d.ts +0 -1
- package/react/components/windowTitleBar/components/center/Tab.js +2 -2
- package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
- package/react/components/windowTitleBar/components/center/TabList.d.ts +0 -1
- package/react/components/windowTitleBar/components/center/TabList.js +16 -79
- package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
- package/react/components/windowTitleBar/components/center/TabRegion.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js.map +1 -1
- package/react/components/windowTitleBar/components/left/ShareButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/CloseButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/MaximizeButton.d.ts +7 -0
- package/react/components/windowTitleBar/components/right/MaximizeButton.js +11 -1
- package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/MinimizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/windowTitle.d.ts +5 -4
- package/react/components/windowTitleBar/components/windowTitle.js +102 -39
- package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
- package/react/components/windowTitleBar/index.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js +5 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.js.map +1 -1
- package/react/components/windowTitleBar/windowTitleBarContext.js.map +1 -1
- package/react/components/yesNoDialog/Timer.spec.js.map +1 -1
- package/react/components/yesNoDialog/Timer.stories.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.css +3 -3
- package/react/components/yesNoDialog/YesNoDialog.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.stories.js.map +1 -1
- package/react/components/yesNoDialog/index.js.map +1 -1
- package/react/components/yesNoDialog/timer.js.map +1 -1
- package/react/enzymeSetup.js +1 -1
- package/react/enzymeSetup.js.map +1 -1
- package/react/hooks/index.js.map +1 -1
- package/react/hooks/useAuth.js.map +1 -1
- package/react/hooks/useDashbar.d.ts +8 -0
- package/react/hooks/useDashbar.js +104 -0
- package/react/hooks/useDashbar.js.map +1 -0
- package/react/hooks/useDeepEffect.js.map +1 -1
- package/react/hooks/useFavorites.js.map +1 -1
- package/react/hooks/useFavoritesShell.js.map +1 -1
- package/react/hooks/useHotkey.js.map +1 -1
- package/react/hooks/useLinker.js.map +1 -1
- package/react/hooks/useMenu.js.map +1 -1
- package/react/hooks/useNotifications.js.map +1 -1
- package/react/hooks/useOutsideClickDetector.js.map +1 -1
- package/react/hooks/usePubSub.js.map +1 -1
- package/react/hooks/useSearch.js.map +1 -1
- package/react/hooks/useToolbar.d.ts +0 -6
- package/react/hooks/useToolbar.js +0 -101
- package/react/hooks/useToolbar.js.map +1 -1
- package/react/hooks/useWorkspace.js.map +1 -1
- package/react/reducers/favoriteReducer.js.map +1 -1
- package/react/reducers/linkerReducer.js.map +1 -1
- package/react/reducers/menuReducer.js.map +1 -1
- package/react/reducers/rootReducer.d.ts +0 -4
- package/react/reducers/rootReducer.js.map +1 -1
- package/react/reducers/searchReducer.js.map +1 -1
- package/react/reducers/smartDesktopDesignerReducer.js +0 -3
- package/react/reducers/smartDesktopDesignerReducer.js.map +1 -1
- package/react/reducers/toolbarReducer.js.map +1 -1
- package/react/reducers/workspaceReducer.js.map +1 -1
- package/react/store.d.ts +0 -8
- package/react/store.js.map +1 -1
- package/react/types/advancedAppLauncherTypes.js.map +1 -1
- package/react/types/dashbarTypes.js.map +1 -1
- package/react/types/favoriteTypes.js.map +1 -1
- package/react/types/fdc3.d.ts +7 -35
- package/react/types/fdc3.js.map +1 -1
- package/react/types/hotkeyTypes.js.map +1 -1
- package/react/types/iconTypes.js.map +1 -1
- package/react/types/linkerTypes.js.map +1 -1
- package/react/types/searchTypes.js.map +1 -1
- package/react/types/smartDesktopDesignerTypes.d.ts +45 -5
- package/react/types/smartDesktopDesignerTypes.js.map +1 -1
- package/react/types/windowTitleBar.d.ts +3 -2
- package/react/types/windowTitleBar.js.map +1 -1
- package/react/types/workspaceTypes.js.map +1 -1
- package/react/components/common/FontSizeSelector.d.ts +0 -7
- package/react/components/common/FontSizeSelector.js +0 -42
- package/react/components/common/FontSizeSelector.js.map +0 -1
- package/react/components/common/stories/FontSizeSelector.stories.d.ts +0 -12
- package/react/components/common/stories/FontSizeSelector.stories.js +0 -24
- package/react/components/common/stories/FontSizeSelector.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/ApplicationEdit.d.ts +0 -25
- package/react/components/smartDesktopDesigner/ApplicationEdit.js +0 -103
- package/react/components/smartDesktopDesigner/ApplicationEdit.js.map +0 -1
- package/react/components/smartDesktopDesigner/ApplicationSetup.d.ts +0 -23
- package/react/components/smartDesktopDesigner/ApplicationSetup.js +0 -73
- package/react/components/smartDesktopDesigner/ApplicationSetup.js.map +0 -1
- package/react/components/smartDesktopDesigner/ProjectHeader.d.ts +0 -14
- package/react/components/smartDesktopDesigner/ProjectHeader.js +0 -70
- package/react/components/smartDesktopDesigner/ProjectHeader.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.d.ts +0 -4
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js +0 -45
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.d.ts +0 -3
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js +0 -29
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.d.ts +0 -12
- package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js +0 -21
- package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.d.ts +0 -12
- package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js +0 -28
- package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.d.ts +0 -10
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js +0 -19
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js +0 -66
- package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js +0 -41
- package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js +0 -27
- package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Timer.stories.js","sourceRoot":"","sources":["../../../src/components/yesNoDialog/Timer.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAiB,MAAM,SAAS,CAAC;AAExC,OAAO,8BAA8B,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,eAAe;IACd,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,KAAK;CAChB,CAAC;AAEF,MAAM,QAAQ,GAAkB,CAAC,IAAY,EAAE,EAAE,CAAC,oBAAC,KAAK,oBAAK,IAAI,EAAI,CAAC;AAEtE,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;IACZ,aAAa,EAAE,IAAI;IACnB,yBAAyB,EAAE,MAAM,CAAC,SAAS,CAAC;CAC5C,CAAC","sourcesContent":["import React from \"react\";\
|
|
1
|
+
{"version":3,"file":"Timer.stories.js","sourceRoot":"","sources":["../../../src/components/yesNoDialog/Timer.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAiB,MAAM,SAAS,CAAC;AAExC,OAAO,8BAA8B,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,eAAe;IACd,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,KAAK;CAChB,CAAC;AAEF,MAAM,QAAQ,GAAkB,CAAC,IAAY,EAAE,EAAE,CAAC,oBAAC,KAAK,oBAAK,IAAI,EAAI,CAAC;AAEtE,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;IACZ,aAAa,EAAE,IAAI;IACnB,yBAAyB,EAAE,MAAM,CAAC,SAAS,CAAC;CAC5C,CAAC","sourcesContent":["import React from \"react\";\nimport Timer, { IProps } from \"./timer\";\nimport { Story } from \"@storybook/react/types-6-0\";\nimport \"../../assets/css/dialogs.css\";\nimport { action } from \"@storybook/addon-actions\";\n\nexport default {\n\ttitle: \"YesNoDialog/Timer\",\n\tcomponent: Timer,\n};\n\nconst Template: Story<IProps> = (args: IProps) => <Timer {...args} />;\n\nexport const Basic = Template.bind({});\nBasic.args = {\n\ttimerDuration: 1000,\n\tontimerDurationExpiration: action(\"Expired\"),\n};\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
body {
|
|
2
|
-
margin: 0px;
|
|
3
|
-
}
|
|
1
|
+
body {
|
|
2
|
+
margin: 0px;
|
|
3
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YesNoDialog.js","sourceRoot":"","sources":["../../../src/components/yesNoDialog/YesNoDialog.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,8BAA8B,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,MAAM,aAAa,GAAG,EAAE,CAAC;AACzB,MAAM,uBAAuB,GAAG;IAC/B,KAAK,EAAE,aAAa;IACpB,QAAQ,EAAE,cAAc;IACxB,qBAAqB,EAAE,IAAI;IAC3B,wBAAwB,EAAE,KAAK;IAC/B,mBAAmB,EAAE,QAAQ;IAC7B,kBAAkB,EAAE,IAAI;IACxB,qBAAqB,EAAE,IAAI;IAC3B,gBAAgB,EAAE,IAAI;CACtB,CAAC;AAuBF,MAAM,eAAgB,SAAQ,KAAK,CAAC,SAAyB;IAC5D,YAAY,KAAK,GAAG,EAAE;QACrB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC1B,IAAI,CAAC,KAAK,GAAG,uBAAuB,CAAC;QACrC,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACrE,CAAC;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IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,gBAAgB,EACjC,SAAS,EAAC,qBAAqB,EAC/B,OAAO,EAAE,IAAI,CAAC,kBAAkB,IAE/B,IAAI,CAAC,KAAK,CAAC,mBAAmB,CACR;gBAExB,oBAAC,qBAAqB,IACrB,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,EACtC,SAAS,EAAC,yBAAyB,EACnC,OAAO,EAAE,IAAI,CAAC,uBAAuB,IAEpC,IAAI,CAAC,KAAK,CAAC,wBAAwB,CACb,CACnB,CACW,CAClB,CAAC;IACH,CAAC;CACD;AAKD,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,oBAAC,eAAe,OAAG,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\nimport React from \"react\";\r\nimport \"./YesNoDialog.css\";\r\nimport \"../../assets/css/dialogs.css\";\r\nimport { FinsembleDialog } from \"../legacyControls/FinsembleDialog\";\r\nimport { FinsembleDialogQuestion } from \"../legacyControls/FinsembleDialogQuestion\";\r\nimport { FinsembleDialogButton } from \"../legacyControls/FinsembleDialogButton\";\r\nimport Timer from \"./timer\";\r\nconst DEFAULT_TITLE = \"\";\r\nconst DEFAULT_COMPONENT_STATE = {\r\n\ttitle: DEFAULT_TITLE,\r\n\tquestion: \"No question.\",\r\n\tnegativeResponseLabel: \"No\",\r\n\taffirmativeResponseLabel: \"Yes\",\r\n\tcancelResponseLabel: \"Cancel\",\r\n\tshowNegativeButton: true,\r\n\tshowAffirmativeButton: true,\r\n\tshowCancelButton: true,\r\n};\r\n\r\ninterface IProps {}\r\ninterface IState {\r\n\ttitle: string;\r\n\tquestion: string;\r\n\tnegativeResponseLabel: string;\r\n\taffirmativeResponseLabel: string;\r\n\tcancelResponseLabel: string;\r\n\tshowNegativeButton: boolean;\r\n\tshowAffirmativeButton: boolean;\r\n\tshowCancelButton: boolean;\r\n\thideModalOnClose?: boolean;\r\n\tshowTimer?: boolean;\r\n\ttimerDuration?: number | null;\r\n}\r\n\r\n/**\r\n * This is our standard dialog that presents the user with 1 - 3 choices. It can be used to allow the user to confirm, reject, or cancel an action. All of these options can be included, and all can be excluded.\r\n *\r\n * @class YesNoDialog\r\n * @extends {React.Component}\r\n */\r\nclass YesNoDialogBase extends React.Component<IProps, IState> {\r\n\tconstructor(props = {}) {\r\n\t\tsuper(props);\r\n\t\tthis.bindCorrectContext();\r\n\t\tthis.state = DEFAULT_COMPONENT_STATE;\r\n\t\tdocument.body.addEventListener(\"keydown\", this.handleKeydownOnBody);\r\n\t}\r\n\r\n\t/**\r\n\t * Handles escape and enter.\r\n\t *\r\n\t * @param {any} e\r\n\t * @memberof YesNoDialog\r\n\t */\r\n\thandleKeydownOnBody(e: any) {\r\n\t\tif (e.code === \"Enter\" && e.shiftKey === false) {\r\n\t\t\tthis.sendResponse(\"affirmative\");\r\n\t\t}\r\n\r\n\t\tif (e.code === \"Escape\") {\r\n\t\t\tthis.sendResponse(\"cancel\");\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Necessary to ensure that `this` is correct when our methods are invoked.\r\n\t *\r\n\t * @memberof YesNoDialog\r\n\t */\r\n\tbindCorrectContext() {\r\n\t\tthis.handleKeydownOnBody = this.handleKeydownOnBody.bind(this);\r\n\t\tthis.onShowRequested = this.onShowRequested.bind(this);\r\n\t\tthis.sendAffirmativeResponse = this.sendAffirmativeResponse.bind(this);\r\n\t\tthis.sendCancelResponse = this.sendCancelResponse.bind(this);\r\n\t\tthis.sendNegativeResponse = this.sendNegativeResponse.bind(this);\r\n\t\tthis.sendExpiredResponse = this.sendExpiredResponse.bind(this);\r\n\t\tthis.sendResponse = this.sendResponse.bind(this);\r\n\t}\r\n\r\n\t/**\r\n\t * When the opener requests that the dialog show itself, it also passes in initialization data. This function grabs that data, calls setState, and then fits the window to the contents of the DOM. Then we call `showDialog`, which will display the dialog on the proper monitor.\r\n\t *\r\n\t * @param {any} err\r\n\t * @param {any} response\r\n\t * @memberof YesNoDialog\r\n\t */\r\n\tonShowRequested(err: any, response: any) {\r\n\t\tlet { data } = response;\r\n\t\tthis.setState(\r\n\t\t\t{\r\n\t\t\t\ttitle: typeof data.title === \"undefined\" ? DEFAULT_TITLE : data.title,\r\n\t\t\t\thideModalOnClose: typeof data.hideModalOnClose === \"undefined\" ? true : data.hideModalOnClose,\r\n\t\t\t\tquestion: data.question,\r\n\t\t\t\tnegativeResponseLabel: data.negativeResponseLabel || \"No\",\r\n\t\t\t\taffirmativeResponseLabel: data.affirmativeResponseLabel || \"Yes\",\r\n\t\t\t\tcancelResponseLabel: data.cancelResponseLabel || \"Cancel\",\r\n\t\t\t\tshowNegativeButton: typeof data.showNegativeButton === \"undefined\" ? true : data.showNegativeButton,\r\n\t\t\t\tshowAffirmativeButton: typeof data.showAffirmativeButton === \"undefined\" ? true : data.showAffirmativeButton,\r\n\t\t\t\tshowCancelButton: typeof data.showCancelButton === \"undefined\" ? true : data.showCancelButton,\r\n\t\t\t\tshowTimer: typeof data.showTimer === \"undefined\" ? false : data.showTimer,\r\n\t\t\t\ttimerDuration: typeof data.timerDuration === \"undefined\" ? null : data.timerDuration,\r\n\t\t\t},\r\n\t\t\tthis.fitAndShow\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Fits the contents of the DOM to the window, then calls `showDialog`, which positions the dialog on the proper monitor and toggles the visibility of the window.\r\n\t *\r\n\t * @memberof YesNoDialog\r\n\t */\r\n\tfitAndShow() {\r\n\t\tFSBL.Clients.WindowClient.fitToDOM(null, () => {\r\n\t\t\tFSBL.Clients.DialogManager.showDialog();\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Sends user input to the opener.\r\n\t *\r\n\t * @param {any} response\r\n\t * @memberof YesNoDialog\r\n\t */\r\n\tsendResponse(response: any) {\r\n\t\tconsole.log(\"Response: \", response);\r\n\t\tFSBL.Clients.DialogManager.respondToOpener({\r\n\t\t\tchoice: response,\r\n\t\t\thideModalOnClose: this.state.hideModalOnClose,\r\n\t\t});\r\n\t\t// This will detach the timer component from the dom. Next time the component comes up, it'll have a fresh timer.\r\n\t\tthis.setState({\r\n\t\t\tshowTimer: false,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Sends an affirmative response to the opener.\r\n\t *\r\n\t * @memberof YesNoDialog\r\n\t */\r\n\tsendAffirmativeResponse() {\r\n\t\tthis.sendResponse(\"affirmative\");\r\n\t}\r\n\r\n\t/**\r\n\t * Sends a negative response to the opener.\r\n\t *\r\n\t * @memberof YesNoDialog\r\n\t */\r\n\tsendNegativeResponse() {\r\n\t\tthis.sendResponse(\"negative\");\r\n\t}\r\n\r\n\t/**\r\n\t * Sends a cancel response to the opener.\r\n\t *\r\n\t * @memberof YesNoDialog\r\n\t */\r\n\tsendCancelResponse() {\r\n\t\tthis.sendResponse(\"cancel\");\r\n\t}\r\n\r\n\t/**\r\n\t * Sends an expired response to the opener.\r\n\t *\r\n\t * @memberof YesNoDialog\r\n\t */\r\n\tsendExpiredResponse() {\r\n\t\tthis.sendResponse(\"expired\");\r\n\t}\r\n\r\n\trender() {\r\n\t\treturn (\r\n\t\t\t<FinsembleDialog\r\n\t\t\t\tuserInputTimeout={10000}\r\n\t\t\t\tbehaviorOnResponse=\"hide\"\r\n\t\t\t\tonShowRequested={this.onShowRequested}\r\n\t\t\t\tisModal={true}\r\n\t\t\t>\r\n\t\t\t\t<div className=\"dialog-title\">{this.state.title}</div>\r\n\t\t\t\t<FinsembleDialogQuestion>\r\n\t\t\t\t\t{this.state.question}\r\n\t\t\t\t\t{this.state.showTimer && typeof this.state.timerDuration === \"number\" && (\r\n\t\t\t\t\t\t<Timer ontimerDurationExpiration={this.sendExpiredResponse} timerDuration={this.state.timerDuration} />\r\n\t\t\t\t\t)}\r\n\t\t\t\t</FinsembleDialogQuestion>\r\n\t\t\t\t<div className=\"button-wrapper\">\r\n\t\t\t\t\t<FinsembleDialogButton\r\n\t\t\t\t\t\tshow={this.state.showNegativeButton}\r\n\t\t\t\t\t\tclassName=\"fsbl-button-neutral\"\r\n\t\t\t\t\t\tonClick={this.sendNegativeResponse}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t{this.state.negativeResponseLabel}\r\n\t\t\t\t\t</FinsembleDialogButton>\r\n\r\n\t\t\t\t\t<FinsembleDialogButton\r\n\t\t\t\t\t\tshow={this.state.showCancelButton}\r\n\t\t\t\t\t\tclassName=\"fsbl-button-neutral\"\r\n\t\t\t\t\t\tonClick={this.sendCancelResponse}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t{this.state.cancelResponseLabel}\r\n\t\t\t\t\t</FinsembleDialogButton>\r\n\r\n\t\t\t\t\t<FinsembleDialogButton\r\n\t\t\t\t\t\tshow={this.state.showAffirmativeButton}\r\n\t\t\t\t\t\tclassName=\"fsbl-button-affirmative\"\r\n\t\t\t\t\t\tonClick={this.sendAffirmativeResponse}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t{this.state.affirmativeResponseLabel}\r\n\t\t\t\t\t</FinsembleDialogButton>\r\n\t\t\t\t</div>\r\n\t\t\t</FinsembleDialog>\r\n\t\t);\r\n\t}\r\n}\r\n\r\n/**\r\n * This dialog window provides a binary choice to the user, and reports back the response to the opener.\r\n */\r\nexport const YesNoDialog = () => <YesNoDialogBase />;\r\n"]}
|
|
1
|
+
{"version":3,"file":"YesNoDialog.js","sourceRoot":"","sources":["../../../src/components/yesNoDialog/YesNoDialog.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,8BAA8B,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,MAAM,aAAa,GAAG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I,CAAC,KAAK,CAAC,KAAK,CAAO;YACtD,oBAAC,uBAAuB;gBACtB,IAAI,CAAC,KAAK,CAAC,QAAQ;gBACnB,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,KAAK,QAAQ,IAAI,CACxE,oBAAC,KAAK,IAAC,yBAAyB,EAAE,IAAI,CAAC,mBAAmB,EAAE,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa,GAAI,CACvG,CACwB;YAC1B,6BAAK,SAAS,EAAC,gBAAgB;gBAC9B,oBAAC,qBAAqB,IACrB,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,kBAAkB,EACnC,SAAS,EAAC,qBAAqB,EAC/B,OAAO,EAAE,IAAI,CAAC,oBAAoB,IAEjC,IAAI,CAAC,KAAK,CAAC,qBAAqB,CACV;gBAExB,oBAAC,qBAAqB,IACrB,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,gBAAgB,EACjC,SAAS,EAAC,qBAAqB,EAC/B,OAAO,EAAE,IAAI,CAAC,kBAAkB,IAE/B,IAAI,CAAC,KAAK,CAAC,mBAAmB,CACR;gBAExB,oBAAC,qBAAqB,IACrB,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,EACtC,SAAS,EAAC,yBAAyB,EACnC,OAAO,EAAE,IAAI,CAAC,uBAAuB,IAEpC,IAAI,CAAC,KAAK,CAAC,wBAAwB,CACb,CACnB,CACW,CAClB,CAAC;IACH,CAAC;CACD;AAKD,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,oBAAC,eAAe,OAAG,CAAC","sourcesContent":["/*!\n * Copyright 2017 by ChartIQ, Inc.\n * All rights reserved.\n */\nimport React from \"react\";\nimport \"./YesNoDialog.css\";\nimport \"../../assets/css/dialogs.css\";\nimport { FinsembleDialog } from \"../legacyControls/FinsembleDialog\";\nimport { FinsembleDialogQuestion } from \"../legacyControls/FinsembleDialogQuestion\";\nimport { FinsembleDialogButton } from \"../legacyControls/FinsembleDialogButton\";\nimport Timer from \"./timer\";\nconst DEFAULT_TITLE = \"\";\nconst DEFAULT_COMPONENT_STATE = {\n\ttitle: DEFAULT_TITLE,\n\tquestion: \"No question.\",\n\tnegativeResponseLabel: \"No\",\n\taffirmativeResponseLabel: \"Yes\",\n\tcancelResponseLabel: \"Cancel\",\n\tshowNegativeButton: true,\n\tshowAffirmativeButton: true,\n\tshowCancelButton: true,\n};\n\ninterface IProps {}\ninterface IState {\n\ttitle: string;\n\tquestion: string;\n\tnegativeResponseLabel: string;\n\taffirmativeResponseLabel: string;\n\tcancelResponseLabel: string;\n\tshowNegativeButton: boolean;\n\tshowAffirmativeButton: boolean;\n\tshowCancelButton: boolean;\n\thideModalOnClose?: boolean;\n\tshowTimer?: boolean;\n\ttimerDuration?: number | null;\n}\n\n/**\n * This is our standard dialog that presents the user with 1 - 3 choices. It can be used to allow the user to confirm, reject, or cancel an action. All of these options can be included, and all can be excluded.\n *\n * @class YesNoDialog\n * @extends {React.Component}\n */\nclass YesNoDialogBase extends React.Component<IProps, IState> {\n\tconstructor(props = {}) {\n\t\tsuper(props);\n\t\tthis.bindCorrectContext();\n\t\tthis.state = DEFAULT_COMPONENT_STATE;\n\t\tdocument.body.addEventListener(\"keydown\", this.handleKeydownOnBody);\n\t}\n\n\t/**\n\t * Handles escape and enter.\n\t *\n\t * @param {any} e\n\t * @memberof YesNoDialog\n\t */\n\thandleKeydownOnBody(e: any) {\n\t\tif (e.code === \"Enter\" && e.shiftKey === false) {\n\t\t\tthis.sendResponse(\"affirmative\");\n\t\t}\n\n\t\tif (e.code === \"Escape\") {\n\t\t\tthis.sendResponse(\"cancel\");\n\t\t}\n\t}\n\n\t/**\n\t * Necessary to ensure that `this` is correct when our methods are invoked.\n\t *\n\t * @memberof YesNoDialog\n\t */\n\tbindCorrectContext() {\n\t\tthis.handleKeydownOnBody = this.handleKeydownOnBody.bind(this);\n\t\tthis.onShowRequested = this.onShowRequested.bind(this);\n\t\tthis.sendAffirmativeResponse = this.sendAffirmativeResponse.bind(this);\n\t\tthis.sendCancelResponse = this.sendCancelResponse.bind(this);\n\t\tthis.sendNegativeResponse = this.sendNegativeResponse.bind(this);\n\t\tthis.sendExpiredResponse = this.sendExpiredResponse.bind(this);\n\t\tthis.sendResponse = this.sendResponse.bind(this);\n\t}\n\n\t/**\n\t * When the opener requests that the dialog show itself, it also passes in initialization data. This function grabs that data, calls setState, and then fits the window to the contents of the DOM. Then we call `showDialog`, which will display the dialog on the proper monitor.\n\t *\n\t * @param {any} err\n\t * @param {any} response\n\t * @memberof YesNoDialog\n\t */\n\tonShowRequested(err: any, response: any) {\n\t\tlet { data } = response;\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\ttitle: typeof data.title === \"undefined\" ? DEFAULT_TITLE : data.title,\n\t\t\t\thideModalOnClose: typeof data.hideModalOnClose === \"undefined\" ? true : data.hideModalOnClose,\n\t\t\t\tquestion: data.question,\n\t\t\t\tnegativeResponseLabel: data.negativeResponseLabel || \"No\",\n\t\t\t\taffirmativeResponseLabel: data.affirmativeResponseLabel || \"Yes\",\n\t\t\t\tcancelResponseLabel: data.cancelResponseLabel || \"Cancel\",\n\t\t\t\tshowNegativeButton: typeof data.showNegativeButton === \"undefined\" ? true : data.showNegativeButton,\n\t\t\t\tshowAffirmativeButton: typeof data.showAffirmativeButton === \"undefined\" ? true : data.showAffirmativeButton,\n\t\t\t\tshowCancelButton: typeof data.showCancelButton === \"undefined\" ? true : data.showCancelButton,\n\t\t\t\tshowTimer: typeof data.showTimer === \"undefined\" ? false : data.showTimer,\n\t\t\t\ttimerDuration: typeof data.timerDuration === \"undefined\" ? null : data.timerDuration,\n\t\t\t},\n\t\t\tthis.fitAndShow\n\t\t);\n\t}\n\n\t/**\n\t * Fits the contents of the DOM to the window, then calls `showDialog`, which positions the dialog on the proper monitor and toggles the visibility of the window.\n\t *\n\t * @memberof YesNoDialog\n\t */\n\tfitAndShow() {\n\t\tFSBL.Clients.WindowClient.fitToDOM(null, () => {\n\t\t\tFSBL.Clients.DialogManager.showDialog();\n\t\t});\n\t}\n\n\t/**\n\t * Sends user input to the opener.\n\t *\n\t * @param {any} response\n\t * @memberof YesNoDialog\n\t */\n\tsendResponse(response: any) {\n\t\tconsole.log(\"Response: \", response);\n\t\tFSBL.Clients.DialogManager.respondToOpener({\n\t\t\tchoice: response,\n\t\t\thideModalOnClose: this.state.hideModalOnClose,\n\t\t});\n\t\t// This will detach the timer component from the dom. Next time the component comes up, it'll have a fresh timer.\n\t\tthis.setState({\n\t\t\tshowTimer: false,\n\t\t});\n\t}\n\n\t/**\n\t * Sends an affirmative response to the opener.\n\t *\n\t * @memberof YesNoDialog\n\t */\n\tsendAffirmativeResponse() {\n\t\tthis.sendResponse(\"affirmative\");\n\t}\n\n\t/**\n\t * Sends a negative response to the opener.\n\t *\n\t * @memberof YesNoDialog\n\t */\n\tsendNegativeResponse() {\n\t\tthis.sendResponse(\"negative\");\n\t}\n\n\t/**\n\t * Sends a cancel response to the opener.\n\t *\n\t * @memberof YesNoDialog\n\t */\n\tsendCancelResponse() {\n\t\tthis.sendResponse(\"cancel\");\n\t}\n\n\t/**\n\t * Sends an expired response to the opener.\n\t *\n\t * @memberof YesNoDialog\n\t */\n\tsendExpiredResponse() {\n\t\tthis.sendResponse(\"expired\");\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<FinsembleDialog\n\t\t\t\tuserInputTimeout={10000}\n\t\t\t\tbehaviorOnResponse=\"hide\"\n\t\t\t\tonShowRequested={this.onShowRequested}\n\t\t\t\tisModal={true}\n\t\t\t>\n\t\t\t\t<div className=\"dialog-title\">{this.state.title}</div>\n\t\t\t\t<FinsembleDialogQuestion>\n\t\t\t\t\t{this.state.question}\n\t\t\t\t\t{this.state.showTimer && typeof this.state.timerDuration === \"number\" && (\n\t\t\t\t\t\t<Timer ontimerDurationExpiration={this.sendExpiredResponse} timerDuration={this.state.timerDuration} />\n\t\t\t\t\t)}\n\t\t\t\t</FinsembleDialogQuestion>\n\t\t\t\t<div className=\"button-wrapper\">\n\t\t\t\t\t<FinsembleDialogButton\n\t\t\t\t\t\tshow={this.state.showNegativeButton}\n\t\t\t\t\t\tclassName=\"fsbl-button-neutral\"\n\t\t\t\t\t\tonClick={this.sendNegativeResponse}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.state.negativeResponseLabel}\n\t\t\t\t\t</FinsembleDialogButton>\n\n\t\t\t\t\t<FinsembleDialogButton\n\t\t\t\t\t\tshow={this.state.showCancelButton}\n\t\t\t\t\t\tclassName=\"fsbl-button-neutral\"\n\t\t\t\t\t\tonClick={this.sendCancelResponse}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.state.cancelResponseLabel}\n\t\t\t\t\t</FinsembleDialogButton>\n\n\t\t\t\t\t<FinsembleDialogButton\n\t\t\t\t\t\tshow={this.state.showAffirmativeButton}\n\t\t\t\t\t\tclassName=\"fsbl-button-affirmative\"\n\t\t\t\t\t\tonClick={this.sendAffirmativeResponse}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.state.affirmativeResponseLabel}\n\t\t\t\t\t</FinsembleDialogButton>\n\t\t\t\t</div>\n\t\t\t</FinsembleDialog>\n\t\t);\n\t}\n}\n\n/**\n * This dialog window provides a binary choice to the user, and reports back the response to the opener.\n */\nexport const YesNoDialog = () => <YesNoDialogBase />;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YesNoDialog.spec.js","sourceRoot":"","sources":["../../../src/components/yesNoDialog/YesNoDialog.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,KAAK,MAAM,OAAO,CAAC;AAC1B,OAA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AAE;QAC9D,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,SAAS,oBAAM,SAAS,CAAC,IAAY,EAAI,CAAC,CAAC;QAClE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE;QAC5D,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,kBAAkB,oBAAM,kBAAkB,CAAC,IAAY,EAAI,CAAC,CAAC;QAEpF,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC;QACnD,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACtC,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACtC,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACzC,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAC1C,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACzC,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,IAAI,CAAC,qCAAqC,EAAE,GAAG,EAAE;IAKpD,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\
|
|
1
|
+
{"version":3,"file":"YesNoDialog.spec.js","sourceRoot":"","sources":["../../../src/components/yesNoDialog/YesNoDialog.spec.tsx"],"names":[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C,CAAC;IAC9C,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,IAAI,CAAC,qCAAqC,EAAE,GAAG,EAAE;IAKpD,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 sinon from \"sinon\";\nimport { Basic, Empty, WithTimer, NoText, NoButtons, CustomButtonLabels } from \"./YesNoDialog.stories\";\nimport { accessibilityAssessor } from \"../smartDesktopDesigner/tests/a11y_helper\";\n\ndescribe(\"<YesNoDialog/>\", () => {\n\tit(\"should pass accessibility scans\", async () => {\n\t\tconst wrapper = mount(<Basic />);\n\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\n\t});\n\tit(\"should display Yes, No, and Cancel by default\", async () => {\n\t\tconst wrapper = mount(<Empty />);\n\n\t\tconst dialog_text = wrapper.find(\".dialog\").text();\n\t\texpect(dialog_text).to.contain(\"Yes\");\n\t\texpect(dialog_text).to.contain(\"No\");\n\t\texpect(dialog_text).to.contain(\"Cancel\");\n\t});\n\tit(\"should display Yes and Cancel, but not No\", async () => {\n\t\tconst wrapper = mount(<Basic {...(Basic.args as any)} />);\n\n\t\tconst dialog_text = wrapper.find(\".dialog\").text();\n\t\texpect(dialog_text).to.contain(\"Yes\");\n\t\texpect(dialog_text).to.not.contain(\"No\");\n\t\texpect(dialog_text).to.contain(\"Cancel\");\n\t});\n\tit(\"should show 'Time remaining' until the clock ticks away\", () => {\n\t\tconst clock = sinon.useFakeTimers();\n\t\tconst wrapper = mount(<WithTimer {...(WithTimer.args as any)} />);\n\n\t\texpect(wrapper.find(\".dialog\").text(), \"Before countdown\").to.contain(\"Time remaining:\");\n\t\tclock.tick(1000);\n\t\tclock.tick(1000);\n\t\tclock.tick(1000);\n\t\texpect(wrapper.find(\".dialog\").text(), \"After countdown\").to.not.contain(\"Time remaining:\");\n\t\tclock.restore();\n\t});\n\tit(\"should display empty text if no title is provided\", () => {\n\t\tconst wrapper = mount(<NoText {...(NoText.args as any)} />);\n\t\tconst titleText = wrapper.find(\".dialog-title\").text();\n\t\texpect(titleText).to.be.empty;\n\t});\n\tit(\"should not display any buttons if none are approved\", () => {\n\t\tconst wrapper = mount(<NoButtons {...(NoButtons.args as any)} />);\n\t\texpect(wrapper.find(\"button\").length).to.equal(0);\n\t});\n\tit(\"should display custom button labels when provided\", () => {\n\t\tconst wrapper = mount(<CustomButtonLabels {...(CustomButtonLabels.args as any)} />);\n\n\t\tconst dialog_text = wrapper.find(\".dialog\").text();\n\t\texpect(dialog_text).to.contain(\"Tak\");\n\t\texpect(dialog_text).to.contain(\"Nie\");\n\t\texpect(dialog_text).to.contain(\"Anuluj\");\n\t\texpect(dialog_text).to.not.contain(\"Yes\");\n\t\texpect(dialog_text).to.not.contain(\"No\");\n\t\texpect(dialog_text).to.not.contain(\"Cancel\");\n\t});\n\tit.skip(\"should handle keyboard interactions\", () => {\n\t\t// const wrapper = mount(<Basic {...(Basic.args as any)} />);\n\t\t// Keyboard interactions are wired up to document.body.addEventListener, and Enzyme doesn't let us mock that\n\t\t// This is a possibility, but it would require simulant and maybe also jsdom:\n\t\t// https://github.com/enzymejs/enzyme/issues/426\n\t});\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YesNoDialog.stories.js","sourceRoot":"","sources":["../../../src/components/yesNoDialog/YesNoDialog.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,8BAA8B,CAAC;AAEtC,eAAe;IACd,KAAK,EAAE,yBAAyB;IAChC,SAAS,EAAE,WAAW;CACtB,CAAC;AAEF,MAAM,QAAQ,GAAc,CAAC,IAAS,EAAE,EAAE;IACzC,QAAQ,CAAC,MAAM,CAAC,C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AEF,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,SAAS,CAAC,IAAI,GAAG;IAChB,KAAK,EAAE;QACN,KAAK,EAAE,YAAY;QACnB,QAAQ,EAAE,oCAAoC;QAC9C,kBAAkB,EAAE,KAAK;QACzB,qBAAqB,EAAE,KAAK;QAC5B,gBAAgB,EAAE,KAAK;KACvB;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACpD,kBAAkB,CAAC,IAAI,GAAG;IACzB,KAAK,EAAE;QACN,KAAK,EAAE,gBAAgB;QACvB,QAAQ,EAAE,qBAAqB;QAC/B,kBAAkB,EAAE,IAAI;QACxB,qBAAqB,EAAE,IAAI;QAC3B,gBAAgB,EAAE,IAAI;QACtB,wBAAwB,EAAE,KAAK;QAC/B,qBAAqB,EAAE,KAAK;QAC5B,mBAAmB,EAAE,QAAQ;QAC7B,SAAS,EAAE,KAAK;KAChB;CACD,CAAC","sourcesContent":["import React from \"react\";\
|
|
1
|
+
{"version":3,"file":"YesNoDialog.stories.js","sourceRoot":"","sources":["../../../src/components/yesNoDialog/YesNoDialog.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,8BAA8B,CAAC;AAEtC,eAAe;IACd,KAAK,EAAE,yBAAyB;IAChC,SAAS,EAAE,WAAW;CACtB,CAAC;AAEF,MAAM,QAAQ,GAAc,CAAC,IAAS,EAAE,EAAE;IACzC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEjB,IAAI,IAAI,CAAC,KAAK,EAAE;QACf,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,sBAAsB,GAAG,CAAC,EAAY,EAA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B,KAAK,EAAE;QACN,KAAK,EAAE,YAAY;QACnB,QAAQ,EAAE,oCAAoC;QAC9C,kBAAkB,EAAE,KAAK;QACzB,qBAAqB,EAAE,KAAK;QAC5B,gBAAgB,EAAE,KAAK;KACvB;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACpD,kBAAkB,CAAC,IAAI,GAAG;IACzB,KAAK,EAAE;QACN,KAAK,EAAE,gBAAgB;QACvB,QAAQ,EAAE,qBAAqB;QAC/B,kBAAkB,EAAE,IAAI;QACxB,qBAAqB,EAAE,IAAI;QAC3B,gBAAgB,EAAE,IAAI;QACtB,wBAAwB,EAAE,KAAK;QAC/B,qBAAqB,EAAE,KAAK;QAC5B,mBAAmB,EAAE,QAAQ;QAC7B,SAAS,EAAE,KAAK;KAChB;CACD,CAAC","sourcesContent":["import React from \"react\";\nimport { YesNoDialog } from \"./YesNoDialog\";\nimport { initFSBL } from \"../common/helpers\";\nimport { Story } from \"@storybook/react/types-6-0\";\nimport \"../../assets/css/dialogs.css\";\n\nexport default {\n\ttitle: \"YesNoDialog/YesNoDialog\",\n\tcomponent: YesNoDialog,\n};\n\nconst Template: Story<{}> = (args: any) => {\n\tinitFSBL(window);\n\n\tif (args._data) {\n\t\tFSBL.Clients.DialogManager.registerDialogCallback = (cb: Function) => {\n\t\t\tcb(\"\", { data: args._data });\n\t\t};\n\t}\n\n\treturn <YesNoDialog {...args} />;\n};\n\nexport const Empty = Template.bind({});\n\nexport const Basic = Template.bind({});\nBasic.args = {\n\t_data: {\n\t\ttitle: \"Example titles\",\n\t\tquestion: \"Is this a question?\",\n\t\tshowNegativeButton: false,\n\t\tshowAffirmativeButton: true,\n\t\tshowCancelButton: true,\n\t\tshowTimer: false,\n\t},\n};\n\nexport const NoText = Template.bind({});\nNoText.args = {\n\t_data: {\n\t\tshowNegativeButton: false,\n\t\tshowAffirmativeButton: true,\n\t\tshowCancelButton: true,\n\t},\n};\n\nexport const WithTimer = Template.bind({});\nWithTimer.args = {\n\t_data: {\n\t\ttitle: \"Example titles\",\n\t\tquestion: \"Is this a question?\",\n\t\tshowNegativeButton: false,\n\t\tshowAffirmativeButton: true,\n\t\tshowCancelButton: true,\n\t\tshowTimer: true,\n\t\ttimerDuration: 3000,\n\t},\n};\n\nexport const NoButtons = Template.bind({});\nNoButtons.args = {\n\t_data: {\n\t\ttitle: \"No buttons\",\n\t\tquestion: \"What are you going to do about it?\",\n\t\tshowNegativeButton: false,\n\t\tshowAffirmativeButton: false,\n\t\tshowCancelButton: false,\n\t},\n};\n\nexport const CustomButtonLabels = Template.bind({});\nCustomButtonLabels.args = {\n\t_data: {\n\t\ttitle: \"Example titles\",\n\t\tquestion: \"Is this a question?\",\n\t\tshowNegativeButton: true,\n\t\tshowAffirmativeButton: true,\n\t\tshowCancelButton: true,\n\t\taffirmativeResponseLabel: \"Tak\",\n\t\tnegativeResponseLabel: \"Nie\",\n\t\tcancelResponseLabel: \"Anuluj\",\n\t\tshowTimer: false,\n\t},\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/yesNoDialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC","sourcesContent":["export { YesNoDialog } from \"./YesNoDialog\";\
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/yesNoDialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC","sourcesContent":["export { YesNoDialog } from \"./YesNoDialog\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timer.js","sourceRoot":"","sources":["../../../src/components/yesNoDialog/timer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,KAAK,CAAC,SAAyB;IAGjE,YAAY,KAAU;QACrB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,aAAa,EAAE,KAAK,CAAC,aAAa;SAClC,CAAC;IACH,CAAC;IAGD,iBAAiB;QAChB,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE;YAChC,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC;YAC9C,IAAI,OAAO,IAAI,CAAC,EAAE;gBACjB,IAAI,CAAC,KAAK,CAAC,yBAAyB,EAAE,CAAC;gBACvC,IAAI,IAAI,CAAC,QAAQ;oBAAE,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAChD;iBAAM;gBACN,IAAI,CAAC,QAAQ,CAAC;oBACb,aAAa,EAAE,OAAO;iBACtB,CAAC,CAAC;aACH;QACF,CAAC,EAAE,IAAI,CAAC,CAAC;IACV,CAAC;IAGD,MAAM;QACL,OAAO;;YAAsB,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,IAAI,CAAO,CAAC;IACrE,CAAC;CACD","sourcesContent":["import React from \"react\";\
|
|
1
|
+
{"version":3,"file":"timer.js","sourceRoot":"","sources":["../../../src/components/yesNoDialog/timer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,KAAK,CAAC,SAAyB;IAGjE,YAAY,KAAU;QACrB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,aAAa,EAAE,KAAK,CAAC,aAAa;SAClC,CAAC;IACH,CAAC;IAGD,iBAAiB;QAChB,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE;YAChC,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC;YAC9C,IAAI,OAAO,IAAI,CAAC,EAAE;gBACjB,IAAI,CAAC,KAAK,CAAC,yBAAyB,EAAE,CAAC;gBACvC,IAAI,IAAI,CAAC,QAAQ;oBAAE,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAChD;iBAAM;gBACN,IAAI,CAAC,QAAQ,CAAC;oBACb,aAAa,EAAE,OAAO;iBACtB,CAAC,CAAC;aACH;QACF,CAAC,EAAE,IAAI,CAAC,CAAC;IACV,CAAC;IAGD,MAAM;QACL,OAAO;;YAAsB,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,IAAI,CAAO,CAAC;IACrE,CAAC;CACD","sourcesContent":["import React from \"react\";\n\nexport interface IProps {\n\ttimerDuration: number;\n\tontimerDurationExpiration: () => void;\n}\ninterface IState {\n\ttimerDuration: number;\n}\n\nexport default class Timer extends React.Component<IProps, IState> {\n\tinterval?: NodeJS.Timeout;\n\n\tconstructor(props: any) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\ttimerDuration: props.timerDuration,\n\t\t};\n\t}\n\n\t//Every second, subtract a second.\n\tcomponentDidMount() {\n\t\tthis.interval = setInterval(() => {\n\t\t\tlet newTime = this.state.timerDuration - 1000;\n\t\t\tif (newTime <= 0) {\n\t\t\t\tthis.props.ontimerDurationExpiration();\n\t\t\t\tif (this.interval) clearInterval(this.interval);\n\t\t\t} else {\n\t\t\t\tthis.setState({\n\t\t\t\t\ttimerDuration: newTime,\n\t\t\t\t});\n\t\t\t}\n\t\t}, 1000);\n\t}\n\n\t//Countdown clock.\n\trender() {\n\t\treturn <div>Time remaining: {this.state.timerDuration / 1000}</div>;\n\t}\n}\n"]}
|
package/react/enzymeSetup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Adapter from "@wojtekmaj/enzyme-adapter-react-17";
|
|
2
2
|
import { configure } from "enzyme";
|
|
3
3
|
import jsdom from "jsdom";
|
|
4
|
-
require("babel
|
|
4
|
+
require("@babel/register")();
|
|
5
5
|
function copyProps(src, target) {
|
|
6
6
|
const props = Object.getOwnPropertyNames(src)
|
|
7
7
|
.filter((prop) => typeof target[prop] === "undefined")
|
package/react/enzymeSetup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enzymeSetup.js","sourceRoot":"","sources":["../src/enzymeSetup.js"],"names":[],"mappings":"AAMA,OAAO,OAAO,MAAM,oCAAoC,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"enzymeSetup.js","sourceRoot":"","sources":["../src/enzymeSetup.js"],"names":[],"mappings":"AAMA,OAAO,OAAO,MAAM,oCAAoC,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,CAAC,iBAAiB,CAAC,EAAE,CAAC;AAE7B,SAAS,SAAS,CAAC,GAAG,EAAE,MAAM;IAC7B,MAAM,KAAK,GAAG,MAAM,CAAC,mBAAmB,CAAC,GAAG,CAAC;SAC3C,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,WAAW,CAAC;SACrD,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,wBAAwB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;IAC5D,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACxC,CAAC;AAED,SAAS,mBAAmB;IAC3B,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IACxB,MAAM,GAAG,GAAG,IAAI,KAAK,CAAC,2CAA2C,EAAE,EAAE,GAAG,EAAE,mBAAmB,EAAE,CAAC,CAAC;IACjG,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC;IAEvB,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IAClC,MAAM,CAAC,SAAS,GAAG;QAClB,SAAS,EAAE,SAAS;KACpB,CAAC;IACF,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;IAC1B,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC3B,CAAC;AAED,mBAAmB,EAAE,CAAC;AAEtB,SAAS,CAAC,EAAE,OAAO,EAAE,IAAI,OAAO,EAAE,EAAE,CAAC,CAAC","sourcesContent":["// This is a helper/setup script that should be `--require`d when calling mocha to run enzyme tests\n// that require more real-world browser DOM objects to be exposed, like `.document` and `.window`.\n// This is needed to use methods like `.mount()` within enzyme.\n// It uses jsdom to set up a fake web browser in JavaScript.\n\n//import Adapter from \"enzyme-adapter-react-16\";\nimport Adapter from \"@wojtekmaj/enzyme-adapter-react-17\";\nimport { configure } from \"enzyme\";\nimport jsdom from \"jsdom\";\n\nrequire(\"@babel/register\")();\n\nfunction copyProps(src, target) {\n\tconst props = Object.getOwnPropertyNames(src)\n\t\t.filter((prop) => typeof target[prop] === \"undefined\")\n\t\t.map((prop) => Object.getOwnPropertyDescriptor(src, prop));\n\tObject.defineProperties(target, props);\n}\n\nfunction setUpDomEnvironment() {\n\tconst { JSDOM } = jsdom;\n\tconst dom = new JSDOM(\"<!doctype html><html><body></body></html>\", { url: \"http://localhost/\" });\n\tconst { window } = dom;\n\n\tglobal.window = window;\n\tglobal.document = window.document;\n\tglobal.navigator = {\n\t\tuserAgent: \"node.js\",\n\t};\n\tglobal.File = window.File;\n\tcopyProps(window, global);\n}\n\nsetUpDomEnvironment();\n\nconfigure({ adapter: new Adapter() });\n"]}
|
package/react/hooks/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export { useAuth, useAuthSimulator } from \"./useAuth\";\
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export { useAuth, useAuthSimulator } from \"./useAuth\";\nexport { useHotkey } from \"./useHotkey\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAuth.js","sourceRoot":"","sources":["../../src/hooks/useAuth.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,EAAE;IAC3B,MAAM,oBAAoB,GAAG,CAAC,IAAY,EAAE,WAAiB,EAAE,EAAE;QAChE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC;QACvC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,oBAAoB,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IAC3E,CAAC,CAAC;IAEF,MAAM,eAAe,GAAG,GAAG,EAAE;QAC5B,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACpB,CAAC,CAAC;IAEF,OAAO;QACN,oBAAoB;QACpB,eAAe;KACf,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACpC,MAAM,YAAY,GAAG,KAAK,EAAE,QAAgB,EAAE,QAAgB,EAAgD,EAAE;QAC/G,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,MAAM;YAAE,OAAO,MAAM,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,2BAA2B,EAAE,CAAC,CAAC;QACxG,IAAI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AK,EAAE,2BAA2B,EAAE,CAAC,CAAC;QACxG,OAAO,MAAM,OAAO,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IAChD,CAAC,CAAC;IAEF,OAAO;QACN,YAAY;KACZ,CAAC;AACH,CAAC,CAAC","sourcesContent":["export const useAuth = () => {\n\tconst publishAuthorization = (user: string, credentials?: any) => {\n\t\tFSBL.System.Window.getCurrent().hide();\n\t\tFSBL.Clients.AuthenticationClient.publishAuthorization(user, credentials);\n\t};\n\n\tconst quitApplication = () => {\n\t\tFSBL.System.exit();\n\t};\n\n\treturn {\n\t\tpublishAuthorization,\n\t\tquitApplication,\n\t};\n};\n\nexport const useAuthSimulator = () => {\n\tconst sendToServer = async (username: string, password: string): Promise<{ result?: string; error?: string }> => {\n\t\tif (!username || !username.length) return await Promise.resolve({ error: \"Missing or empty username\" });\n\t\tif (!password || !password.length) return await Promise.resolve({ error: \"Missing or empty password\" });\n\t\treturn await Promise.resolve({ result: \"ok\" });\n\t};\n\n\treturn {\n\t\tsendToServer,\n\t};\n};\n"]}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { useDeepEffect } from "./useDeepEffect";
|
|
2
|
+
import { useSelector } from "../store";
|
|
3
|
+
import { ToolbarActions } from "../actions/toolbarActions";
|
|
4
|
+
import { useDispatch } from "react-redux";
|
|
5
|
+
let storageIsInitialized = false;
|
|
6
|
+
let DashbarStore;
|
|
7
|
+
const setDashbarItem = (itemName, availableDashbarItems, newDashbarItems) => {
|
|
8
|
+
if (availableDashbarItems.hasOwnProperty(itemName)) {
|
|
9
|
+
const newItem = availableDashbarItems[itemName];
|
|
10
|
+
newItem.id = itemName;
|
|
11
|
+
newDashbarItems.push(newItem);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
const initializeDistributedStore = async () => {
|
|
15
|
+
const storeParams = {
|
|
16
|
+
store: "Finsemble-Dashbar-Store",
|
|
17
|
+
global: true,
|
|
18
|
+
persist: true,
|
|
19
|
+
};
|
|
20
|
+
const { err, data: store } = await FSBL.Clients.DistributedStoreClient.createStore(storeParams);
|
|
21
|
+
if (err || !store) {
|
|
22
|
+
const error = `Error initializing dashbar: unable to retrieve stored items, falling back to config: ${err}`;
|
|
23
|
+
FSBL.Clients.Logger.system.error(error);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
DashbarStore = store;
|
|
27
|
+
};
|
|
28
|
+
const initializeDashbarItems = async () => {
|
|
29
|
+
var _a;
|
|
30
|
+
let dashbarItemList;
|
|
31
|
+
if (DashbarStore && Object.keys(DashbarStore.values).length > 0) {
|
|
32
|
+
dashbarItemList = DashbarStore.values.dashbaritems;
|
|
33
|
+
}
|
|
34
|
+
if (!dashbarItemList) {
|
|
35
|
+
const spawnData = FSBL.Clients.WindowClient.getSpawnData();
|
|
36
|
+
if (Array.isArray((_a = spawnData === null || spawnData === void 0 ? void 0 : spawnData.dashbar) === null || _a === void 0 ? void 0 : _a.items)) {
|
|
37
|
+
dashbarItemList = spawnData.dashbar.items;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
if (!dashbarItemList)
|
|
41
|
+
dashbarItemList = [];
|
|
42
|
+
const newDashbarItems = [];
|
|
43
|
+
if (dashbarItemList.length > 0) {
|
|
44
|
+
const { data: availableDashbarItems } = await FSBL.Clients.ConfigClient.getValue({
|
|
45
|
+
field: "finsemble.availableDashbarItems",
|
|
46
|
+
});
|
|
47
|
+
dashbarItemList.forEach((itemName) => setDashbarItem(itemName, availableDashbarItems, newDashbarItems));
|
|
48
|
+
}
|
|
49
|
+
if (!DashbarStore.values.dashbaritems) {
|
|
50
|
+
DashbarStore.setValue({
|
|
51
|
+
field: "dashbaritems",
|
|
52
|
+
value: dashbarItemList,
|
|
53
|
+
});
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
return newDashbarItems;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
export const useDashbar = () => {
|
|
61
|
+
const dispatch = useDispatch();
|
|
62
|
+
const setDashbarItems = async (err, data) => {
|
|
63
|
+
if (!err && data) {
|
|
64
|
+
const { data: availableDashbarItems } = await FSBL.Clients.ConfigClient.getValue({
|
|
65
|
+
field: "finsemble.availableDashbarItems",
|
|
66
|
+
});
|
|
67
|
+
const newDashbarItems = [];
|
|
68
|
+
data.value.forEach((item) => setDashbarItem(item, availableDashbarItems, newDashbarItems));
|
|
69
|
+
dispatch(ToolbarActions.SET_DASHBAR_ITEMS(newDashbarItems));
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
useDeepEffect(async () => {
|
|
73
|
+
if (!storageIsInitialized) {
|
|
74
|
+
storageIsInitialized = true;
|
|
75
|
+
await initializeDistributedStore();
|
|
76
|
+
const newDashbarItems = await initializeDashbarItems();
|
|
77
|
+
if (newDashbarItems)
|
|
78
|
+
dispatch(ToolbarActions.SET_DASHBAR_ITEMS(newDashbarItems));
|
|
79
|
+
DashbarStore.addListener({ field: "dashbaritems" }, setDashbarItems);
|
|
80
|
+
}
|
|
81
|
+
return function cleanup() {
|
|
82
|
+
DashbarStore.removeListener({ field: "dashbaritems" }, setDashbarItems);
|
|
83
|
+
};
|
|
84
|
+
}, [dispatch]);
|
|
85
|
+
const { dashbarItems } = useSelector((state) => state.toolbar);
|
|
86
|
+
const reorderDashbarItems = ({ oldIndex, newIndex }) => {
|
|
87
|
+
const dashbarItemsNewOrder = [...dashbarItems];
|
|
88
|
+
const dashbarItemToMove = dashbarItemsNewOrder[oldIndex];
|
|
89
|
+
dashbarItemsNewOrder.splice(oldIndex, 1);
|
|
90
|
+
dashbarItemsNewOrder.splice(newIndex, 0, dashbarItemToMove);
|
|
91
|
+
const newOrderList = dashbarItemsNewOrder.map((dashbarItem) => dashbarItem.id);
|
|
92
|
+
DashbarStore.setValue({
|
|
93
|
+
field: "dashbaritems",
|
|
94
|
+
value: newOrderList,
|
|
95
|
+
}, () => {
|
|
96
|
+
dispatch(ToolbarActions.REORDER_DASHBAR_ITEMS({ oldIndex, newIndex }));
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
return {
|
|
100
|
+
dashbarItems,
|
|
101
|
+
reorderDashbarItems,
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=useDashbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDashbar.js","sourceRoot":"","sources":["../../src/hooks/useDashbar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAO1C,IAAI,oBAAoB,GAAY,KAAK,CAAC;AAM1C,IAAI,YAAwB,CAAC;AAE7B,MAAM,cAAc,GAAG,CACtB,QAAgB,EAChB,qBAAkD,EAClD,eAA8B,EAC7B,EAAE;IACH,IAAI,qBAAqB,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;QACnD,MAAM,OAAO,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAC;QAChD,OAAO,CAAC,EAAE,GAAG,QAAQ,CAAC;QACtB,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KAC9B;AACF,CAAC,CAAC;AAEF,MAAM,0BAA0B,GAAG,KAAK,IAAmB,EAAE;IAC5D,MAAM,WAAW,GAAG;QACnB,KAAK,EAAE,yBAAyB;QAChC,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,IAAI;KACb,CAAC;IACF,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAChG,IAAI,GAAG,IAAI,CAAC,KAAK,EAAE;QAClB,MAAM,KAAK,GAAG,wF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IACH,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,MAAM,EAAE,YAAY,EAAE,GAAG,WAAW,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAE/D,MAAM,mBAAmB,GAAG,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAA0C,EAAE,EAAE;QAC9F,MAAM,oBAAoB,GAAG,CAAC,GAAG,YAAY,CAAC,CAAC;QAC/C,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC;QACzD,oBAAoB,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;QACzC,oBAAoB,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,EAAE,iBAAiB,CAAC,CAAC;QAE5D,MAAM,YAAY,GAAG,oBAAoB,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QAE/E,YAAY,CAAC,QAAQ,CACpB;YACC,KAAK,EAAE,cAAc;YACrB,KAAK,EAAE,YAAY;SACnB,EACD,GAAG,EAAE;YACJ,QAAQ,CAAC,cAAc,CAAC,qBAAqB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;QACxE,CAAC,CACD,CAAC;IACH,CAAC,CAAC;IAEF,OAAO;QACN,YAAY;QACZ,mBAAmB;KACnB,CAAC;AACH,CAAC,CAAC","sourcesContent":["import { useDeepEffect } from \"./useDeepEffect\";\nimport { useSelector } from \"../store\";\nimport { ToolbarActions } from \"../actions/toolbarActions\";\nimport { useDispatch } from \"react-redux\";\nimport { DashbarItem } from \"../types/dashbarTypes\";\nimport { types } from \"@finsemble/finsemble-core\";\n\ntype StoreModel = types.StoreModel;\ntype StandardError = types.StandardError;\n\nlet storageIsInitialized: boolean = false;\n\ntype DashbarStoreValueType = {\n\tdashbaritems: DashbarItem[];\n};\n\nlet DashbarStore: StoreModel;\n\nconst setDashbarItem = (\n\titemName: string,\n\tavailableDashbarItems: Record<string, DashbarItem>,\n\tnewDashbarItems: DashbarItem[]\n) => {\n\tif (availableDashbarItems.hasOwnProperty(itemName)) {\n\t\tconst newItem = availableDashbarItems[itemName];\n\t\tnewItem.id = itemName;\n\t\tnewDashbarItems.push(newItem);\n\t}\n};\n\nconst initializeDistributedStore = async (): Promise<void> => {\n\tconst storeParams = {\n\t\tstore: \"Finsemble-Dashbar-Store\",\n\t\tglobal: true,\n\t\tpersist: true,\n\t};\n\tconst { err, data: store } = await FSBL.Clients.DistributedStoreClient.createStore(storeParams);\n\tif (err || !store) {\n\t\tconst error = `Error initializing dashbar: unable to retrieve stored items, falling back to config: ${err}`;\n\t\tFSBL.Clients.Logger.system.error(error);\n\t\treturn;\n\t}\n\n\tDashbarStore = store;\n};\n\n/**\n * Fetches an initial list of dashbar items from the persistent distributed store,\n * and if that doesn't exist, from spawnData\n */\nconst initializeDashbarItems = async (): Promise<DashbarItem[] | null> => {\n\tlet dashbarItemList;\n\tif (DashbarStore && Object.keys(DashbarStore.values).length > 0) {\n\t\tdashbarItemList = (DashbarStore.values as DashbarStoreValueType).dashbaritems;\n\t}\n\n\tif (!dashbarItemList) {\n\t\tconst spawnData = FSBL.Clients.WindowClient.getSpawnData();\n\t\tif (Array.isArray(spawnData?.dashbar?.items)) {\n\t\t\tdashbarItemList = spawnData.dashbar.items;\n\t\t}\n\t}\n\n\tif (!dashbarItemList) dashbarItemList = [];\n\n\tconst newDashbarItems: DashbarItem[] = [];\n\tif (dashbarItemList.length > 0) {\n\t\tconst { data: availableDashbarItems } = await FSBL.Clients.ConfigClient.getValue({\n\t\t\tfield: \"finsemble.availableDashbarItems\",\n\t\t});\n\n\t\tdashbarItemList.forEach((itemName: string) => setDashbarItem(itemName, availableDashbarItems, newDashbarItems));\n\t}\n\n\tif (!DashbarStore.values.dashbaritems) {\n\t\tDashbarStore.setValue({\n\t\t\tfield: \"dashbaritems\",\n\t\t\tvalue: dashbarItemList,\n\t\t});\n\t\treturn null;\n\t} else {\n\t\treturn newDashbarItems;\n\t}\n};\n\nexport const useDashbar = () => {\n\tconst dispatch = useDispatch();\n\n\tconst setDashbarItems = async (err: StandardError, data: any) => {\n\t\tif (!err && data) {\n\t\t\tconst { data: availableDashbarItems } = await FSBL.Clients.ConfigClient.getValue({\n\t\t\t\tfield: \"finsemble.availableDashbarItems\",\n\t\t\t});\n\t\t\tconst newDashbarItems: DashbarItem[] = [];\n\t\t\t// Add the widget name as an id to help identify\n\t\t\t// keys -> widgets when reordering items\n\t\t\tdata.value.forEach((item: string) => setDashbarItem(item, availableDashbarItems, newDashbarItems));\n\n\t\t\tdispatch(ToolbarActions.SET_DASHBAR_ITEMS(newDashbarItems));\n\t\t}\n\t};\n\n\t/**\n\t * This effect initializes the dashbar items in the redux store. The store must only be initialized once. We use the module level variable\n\t * `storageIsInitialized` as a simple flag to prevent initialization from occuring more than once.\n\t */\n\tuseDeepEffect(async () => {\n\t\tif (!storageIsInitialized) {\n\t\t\tstorageIsInitialized = true;\n\t\t\tawait initializeDistributedStore();\n\t\t\tconst newDashbarItems = await initializeDashbarItems();\n\t\t\tif (newDashbarItems) dispatch(ToolbarActions.SET_DASHBAR_ITEMS(newDashbarItems));\n\t\t\tDashbarStore.addListener({ field: \"dashbaritems\" }, setDashbarItems);\n\t\t}\n\t\treturn function cleanup() {\n\t\t\tDashbarStore.removeListener({ field: \"dashbaritems\" }, setDashbarItems);\n\t\t};\n\t}, [dispatch]);\n\n\tconst { dashbarItems } = useSelector((state) => state.toolbar);\n\n\tconst reorderDashbarItems = ({ oldIndex, newIndex }: { oldIndex: number; newIndex: number }) => {\n\t\tconst dashbarItemsNewOrder = [...dashbarItems];\n\t\tconst dashbarItemToMove = dashbarItemsNewOrder[oldIndex];\n\t\tdashbarItemsNewOrder.splice(oldIndex, 1);\n\t\tdashbarItemsNewOrder.splice(newIndex, 0, dashbarItemToMove);\n\n\t\tconst newOrderList = dashbarItemsNewOrder.map((dashbarItem) => dashbarItem.id);\n\n\t\tDashbarStore.setValue(\n\t\t\t{\n\t\t\t\tfield: \"dashbaritems\",\n\t\t\t\tvalue: newOrderList,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tdispatch(ToolbarActions.REORDER_DASHBAR_ITEMS({ oldIndex, newIndex }));\n\t\t\t}\n\t\t);\n\t};\n\n\treturn {\n\t\tdashbarItems,\n\t\treorderDashbarItems,\n\t};\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDeepEffect.js","sourceRoot":"","sources":["../../src/hooks/useDeepEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAErC,SAAS,qBAAqB,CAAC,KAAU;IACxC,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IAErB,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,EAAE;QACjC,GAAG,CAAC,OAAO,GAAG,KAAK,CAAC;KACpB;IAED,OAAO,GAAG,CAAC,OAAO,CAAC;AACpB,CAAC;AAMD,MAAM,UAAU,aAAa,CAAC,QAAa,EAAE,YAAwB;IACpE,SAAS,CAAC,QAAQ,EAAE,qBAAqB,CAAC,YAAY,CAAC,CAAC,CAAC;AAC1D,CAAC","sourcesContent":["import { useEffect, useRef } from \"react\";\
|
|
1
|
+
{"version":3,"file":"useDeepEffect.js","sourceRoot":"","sources":["../../src/hooks/useDeepEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAErC,SAAS,qBAAqB,CAAC,KAAU;IACxC,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IAErB,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,EAAE;QACjC,GAAG,CAAC,OAAO,GAAG,KAAK,CAAC;KACpB;IAED,OAAO,GAAG,CAAC,OAAO,CAAC;AACpB,CAAC;AAMD,MAAM,UAAU,aAAa,CAAC,QAAa,EAAE,YAAwB;IACpE,SAAS,CAAC,QAAQ,EAAE,qBAAqB,CAAC,YAAY,CAAC,CAAC,CAAC;AAC1D,CAAC","sourcesContent":["import { useEffect, useRef } from \"react\";\nimport isEqual from \"lodash/isEqual\";\n\nfunction useDeepCompareMemoize(value: any) {\n\tconst ref = useRef();\n\n\tif (!isEqual(value, ref.current)) {\n\t\tref.current = value;\n\t}\n\n\treturn ref.current;\n}\n\n/**\n * Use this just like useEffect() except that this will compare objects and arrays using lodash's isEqual() method.\n * Always pass an array of dependencies as the second parameter!!!\n */\nexport function useDeepEffect(callback: any, dependencies: Array<any>) {\n\tuseEffect(callback, useDeepCompareMemoize(dependencies));\n}\n\n/*\n// Previous implementation that had bugs. Keep around for a bit until we shake out the new version.\nexport function useDeepEffect(effectFunc : Function, deps : Array<any>) {\n\tconst isFirst = useRef(true);\n\tconst prevDeps = useRef(deps);\n\n\tuseEffect(() => {\n\t\tconst isSame = prevDeps.current.every((obj: any, index: any) => isEqual(obj, deps[index]));\n\t\tif (isFirst.current || !isSame) {\n\t\t\teffectFunc();\n\t\t}\n\n\t\tisFirst.current = false;\n\t\tprevDeps.current = deps;\n\t}, deps);\n}\n*/\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFavorites.js","sourceRoot":"","sources":["../../src/hooks/useFavorites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AA2B7D,MAAM,CAAC,MAAM,YAAY,GAAG,GAAkB,EAAE;IAC/C,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,EAAE,SAAS,EAAE,GAAG,WAAW,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC7D,MAAM,YAAY,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAEpD,MAAM,WAAW,GAAG,CAAC,QAAkB,EAAE,EAAE;QAC1C,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC;IAEF,MAAM,cAAc,GAAG,CAAC,EAAkB,EAAE,EAAE;QAC7C,QAAQ,CAAC,eAAe,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/C,CAAC,CAAC;IAEF,MAAM,WAAW,GAAG,CAAC,EAAkB,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAEtE,OAAO;QACN,SAAS;QACT,WAAW;QACX,cAAc;QACd,WAAW;KACX,CAAC;AACH,CAAC,CAAC","sourcesContent":["import { useDispatch, useSelector } from \"../store\";\
|
|
1
|
+
{"version":3,"file":"useFavorites.js","sourceRoot":"","sources":["../../src/hooks/useFavorites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AA2B7D,MAAM,CAAC,MAAM,YAAY,GAAG,GAAkB,EAAE;IAC/C,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,EAAE,SAAS,EAAE,GAAG,WAAW,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC7D,MAAM,YAAY,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAEpD,MAAM,WAAW,GAAG,CAAC,QAAkB,EAAE,EAAE;QAC1C,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC;IAEF,MAAM,cAAc,GAAG,CAAC,EAAkB,EAAE,EAAE;QAC7C,QAAQ,CAAC,eAAe,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/C,CAAC,CAAC;IAEF,MAAM,WAAW,GAAG,CAAC,EAAkB,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAEtE,OAAO;QACN,SAAS;QACT,WAAW;QACX,cAAc;QACd,WAAW;KACX,CAAC;AACH,CAAC,CAAC","sourcesContent":["import { useDispatch, useSelector } from \"../store\";\nimport { Favorite } from \"../types/favoriteTypes\";\nimport { FavoriteActions } from \"../actions/favoriteActions\";\n\ntype FavoritesHook = {\n\t/**\n\t * The current favorites list from the store.\n\t */\n\tfavorites: Favorite[];\n\n\t/**\n\t * Adds a favorite to the favorites store.\n\t */\n\taddFavorite: (favorite: Favorite) => void;\n\n\t/**\n\t * Removes the favorite for the given id from the favorites store.\n\t */\n\tremoveFavorite: (id: Favorite[\"id\"]) => void;\n\n\t/**\n\t * Returns true if the current id has been favorited.\n\t */\n\tisFavorited: (id: Favorite[\"id\"]) => boolean;\n};\n\n/**\n * The useFavorites() hook is used by FavoriteMaker to interact with the redux store.\n */\nexport const useFavorites = (): FavoritesHook => {\n\tconst dispatch = useDispatch();\n\tconst { favorites } = useSelector((state) => state.favorite);\n\tconst favoritesIds = favorites.map((fav) => fav.id);\n\n\tconst addFavorite = (favorite: Favorite) => {\n\t\tdispatch(FavoriteActions.ADD_FAVORITE(favorite));\n\t};\n\n\tconst removeFavorite = (id: Favorite[\"id\"]) => {\n\t\tdispatch(FavoriteActions.REMOVE_FAVORITE(id));\n\t};\n\n\tconst isFavorited = (id: Favorite[\"id\"]) => favoritesIds.includes(id);\n\n\treturn {\n\t\tfavorites,\n\t\taddFavorite,\n\t\tremoveFavorite,\n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EAA0C,EAAE,EAAE;QAC5F,QAAQ,CAAC,eAAe,CAAC,iBAAiB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;IACrE,CAAC,CAAC;IAOF,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,oBAAoB;YAAE,OAAO;QACjC,oBAAoB,GAAG,IAAI,CAAC;QAE5B,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,qBAAqB,EAAE,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YAChG,IAAI,GAAG,EAAE;gBACR,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CACtC,qEAAqE,GAAG,EAAE,CAC1E,CAAC;aACF;YACD,QAAQ,CAAC,eAAe,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC;QACtD,CAAC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAGf,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC;YAC/B,KAAK,EAAE,WAAW;YAClB,GAAG,EAAE,qBAAqB;YAC1B,KAAK,EAAE,SAAS;SAChB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,OAAO;QACN,SAAS;QACT,cAAc;QACd,eAAe;QACf,iBAAiB;KACjB,CAAC;AACH,CAAC,CAAC","sourcesContent":["import { useDispatch } from \"../store\";\
|
|
1
|
+
{"version":3,"file":"useFavoritesShell.js","sourceRoot":"","sources":["../../src/hooks/useFavoritesShell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,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AAC,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,qBAAqB,EAAE,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YAChG,IAAI,GAAG,EAAE;gBACR,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CACtC,qEAAqE,GAAG,EAAE,CAC1E,CAAC;aACF;YACD,QAAQ,CAAC,eAAe,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC;QACtD,CAAC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAGf,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC;YAC/B,KAAK,EAAE,WAAW;YAClB,GAAG,EAAE,qBAAqB;YAC1B,KAAK,EAAE,SAAS;SAChB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,OAAO;QACN,SAAS;QACT,cAAc;QACd,eAAe;QACf,iBAAiB;KACjB,CAAC;AACH,CAAC,CAAC","sourcesContent":["import { useDispatch } from \"../store\";\nimport { Favorite } from \"../types/favoriteTypes\";\nimport { FavoriteActions } from \"../actions/favoriteActions\";\nimport { useFavorites } from \"./useFavorites\";\nimport { useEffect } from \"react\";\nimport { types } from \"@finsemble/finsemble-core\";\n\ntype StandardError = types.StandardError;\n\nlet storageIsInitialized: boolean = false;\n\n/**\n * The useFavoritesShell() hook is used by FavoritesShell to interact with the redux store\n * and storage.\n */\nexport const useFavoritesShell = () => {\n\tconst dispatch = useDispatch();\n\tconst { favorites, removeFavorite } = useFavorites();\n\n\t// Ideally in the future the following function will be decoupled from implementation, allowing Favorites to generically dispatch actions.\n\t/**\n\t * Given a favorite item, trigger the associated action on that item.\n\t * I.e. If it's a finsemble component, a new window of that component is launched. If it's a workspace, the workspace would be switched to.\n\t * @param id The favorite item's id\n\t * @param category The to be triggered favorite item's category\n\t */\n\tconst triggerFavorite = async (id: Favorite[\"id\"], category: Favorite[\"category\"]) => {\n\t\tif (category === \"Application\") {\n\t\t\tFSBL.Clients.LauncherClient.spawn(id, {\n\t\t\t\taddToWorkspace: true,\n\t\t\t\tmonitor: \"mine\",\n\t\t\t});\n\t\t} else if (category === \"Workspace\") {\n\t\t\tFSBL.Clients.DistributedStoreClient.getStore(\n\t\t\t\t{ store: \"Finsemble-WorkspaceMenu-Global-Store\", global: true },\n\t\t\t\t(err: StandardError, store?: any) => {\n\t\t\t\t\tstore.Dispatcher.dispatch({\n\t\t\t\t\t\tactionType: \"switchToWorkspace\",\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\tname: id,\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\n\t/**\n\t * We need to persist the right order in whent he user reorders favorites in the toolbar. This ensures\n\t * that favorites will appear in the right order on future Toolbar launches.\n\t * @param favElements The ordered collection of favorite elements\n\t */\n\tconst setFavoritesOrder = ({ oldIndex, newIndex }: { oldIndex: number; newIndex: number }) => {\n\t\tdispatch(FavoriteActions.REORDER_FAVORITES({ oldIndex, newIndex }));\n\t};\n\n\t/**\n\t * This effect initializes the favorites redux store. The store must only be initialized once, even though useFavorites may be\n\t * referenced by many different React components. We use the module level variable `storageIsInitialized` as a simple flag to\n\t * prevent initialization from occuring more than once.\n\t */\n\tuseEffect(() => {\n\t\tif (storageIsInitialized) return;\n\t\tstorageIsInitialized = true;\n\t\t// Copy the persisted favorites from Storage to the redux store\n\t\tFSBL.Clients.StorageClient.get({ topic: \"favorites\", key: \"allCurrentFavorites\" }, (err, data) => {\n\t\t\tif (err) {\n\t\t\t\treturn FSBL.Clients.Logger.system.error(\n\t\t\t\t\t`Favorite Hook -> Failed to retrieve favorites from StorageClient: ${err}`\n\t\t\t\t);\n\t\t\t}\n\t\t\tdispatch(FavoriteActions.INITIALIZE_FAVORITES(data));\n\t\t});\n\t}, [dispatch]);\n\n\t// When the list of favorite items change, we want to persist that data to the store.\n\tuseEffect(() => {\n\t\tFSBL.Clients.StorageClient.save({\n\t\t\ttopic: \"favorites\",\n\t\t\tkey: \"allCurrentFavorites\",\n\t\t\tvalue: favorites,\n\t\t});\n\t}, [favorites]);\n\n\treturn {\n\t\tfavorites,\n\t\tremoveFavorite,\n\t\ttriggerFavorite,\n\t\tsetFavoritesOrder,\n\t};\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useHotkey.js","sourceRoot":"","sources":["../../src/hooks/useHotkey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAShD,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,cAAoD,EAAE,MAAgB,EAAE,EAAE;IAKnG,aAAa,CAAC,GAAG,EAAE;QAClB,IAAI,iBAAiB,GAAG,OAAO,MAAM,KAAK,UAAU,CAAC;QACrD,IAAI,CAAC,iBAAiB;YAAE,OAAO,CAAC,KAAK,CAAC,0DAA0D,CAAC,CAAC;QAClG,cAAc,IAAI,iBAAiB,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;QACzG,OAAO,SAAS,OAAO;YACtB,cAAc,IAAI,iBAAiB,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,kBAAkB,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;QAC7G,CAAC,CAAC;IACH,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC;AAC9B,CAAC,CAAC","sourcesContent":["import { useDeepEffect } from \"./useDeepEffect\";\
|
|
1
|
+
{"version":3,"file":"useHotkey.js","sourceRoot":"","sources":["../../src/hooks/useHotkey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAShD,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,cAAoD,EAAE,MAAgB,EAAE,EAAE;IAKnG,aAAa,CAAC,GAAG,EAAE;QAClB,IAAI,iBAAiB,GAAG,OAAO,MAAM,KAAK,UAAU,CAAC;QACrD,IAAI,CAAC,iBAAiB;YAAE,OAAO,CAAC,KAAK,CAAC,0DAA0D,CAAC,CAAC;QAClG,cAAc,IAAI,iBAAiB,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;QACzG,OAAO,SAAS,OAAO;YACtB,cAAc,IAAI,iBAAiB,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,kBAAkB,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;QAC7G,CAAC,CAAC;IACH,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC;AAC9B,CAAC,CAAC","sourcesContent":["import { useDeepEffect } from \"./useDeepEffect\";\nimport { HotkeyCombination } from \"../types/hotkeyTypes\";\n\n/**\n * This hook can be used to register a global hotkey. It makes use of Finsemble's HotkeyClient API.\n *\n * @param keyCombination [Array<string>] - A hotkey Combination. If null or undefined then no operation will occur.\n * @param action Function - The function to call when the hotkey combination is pressed.\n */\nexport const useHotkey = (keyCombination: HotkeyCombination | undefined | null, action: Function) => {\n\t// We use a deep effect comparison because we expect arrays to be passed in.\n\t// React's useEffect() hook only performs shallow comparisons. We use the literal [\"escape\"] which would trigger an effect with every render.\n\t// useDeepEffect() is a custom hook that will compare the *contents* of the arrays. This way, two literal instances will still be perceived by React as identical.\n\n\tuseDeepEffect(() => {\n\t\tlet actionIsAFunction = typeof action === \"function\";\n\t\tif (!actionIsAFunction) console.error(\"useHotkey() invalid parameters: action is not a function\");\n\t\tkeyCombination && actionIsAFunction && FSBL.Clients.HotkeyClient.addGlobalHotkey(keyCombination, action);\n\t\treturn function cleanup() {\n\t\t\tkeyCombination && actionIsAFunction && FSBL.Clients.HotkeyClient.removeGlobalHotkey(keyCombination, action);\n\t\t};\n\t}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,WAAW,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,MAAM,CAAC,CAAC,MAAM,CAAC;QAGnG,MAAM,UAAU,GAAG,CAAC,aAAa,CAAC;QAClC,MAAM,YAAY,GAAG,aAAa,CAAC;QACnC,MAAM,+BAA+B,GAAG,sBAAsB,GAAG,+BAA+B,CAAC;QAIjG,IAAI,YAAY,EAAE;YACjB,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,iBAAiB,CAAC,WAAW,EAAE,gBAAgB,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC;SACtG;aAAM,IAAI,UAAU,IAAI,+BAA+B,EAAE;YACzD,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,aAAa,CAAC,WAAW,EAAE,gBAAgB,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;SACjG;aAAM;YACN,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAC/B,iCAAiC,+BAA+B,8HAA8H,+BAA+B,2CAA2C,CACxQ,CAAC;SACF;QACD,UAAU,EAAE,CAAC;IACd,CAAC,CAAC;IAEF,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC;AAC9C,CAAC,CAAC","sourcesContent":["import { useDispatch, useSelector } from \"../store\";\
|
|
1
|
+
{"version":3,"file":"useLinker.js","sourceRoot":"","sources":["../../src/hooks/useLinker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAW,+BAA+B,EAAE,MAAM,sBAAsB,CAAC;AAKhF,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,EAAE;IAC7B,M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C,KAAK,CAAC,CAAC,CAAC;SACtG;aAAM,IAAI,UAAU,IAAI,+BAA+B,EAAE;YACzD,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,aAAa,CAAC,WAAW,EAAE,gBAAgB,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;SACjG;aAAM;YACN,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAC/B,iCAAiC,+BAA+B,8HAA8H,+BAA+B,2CAA2C,CACxQ,CAAC;SACF;QACD,UAAU,EAAE,CAAC;IACd,CAAC,CAAC;IAEF,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC;AAC9C,CAAC,CAAC","sourcesContent":["import { useDispatch, useSelector } from \"../store\";\nimport { useEffect } from \"react\";\nimport { LinkerActions } from \"../actions/linkerActions\";\nimport { Channel, MAXIMUM_ALLOWED_ACTIVE_CHANNELS } from \"../types/linkerTypes\";\n\ndeclare const finsembleWindow: any;\n\n// Encapsulate the linker initialization and Redux dispatch functions inside the hook\nexport const useLinker = () => {\n\tconst dispatch = useDispatch();\n\tconst linkerState = useSelector((state) => state.linker);\n\n\tconst hideWindow = () => {\n\t\t// Must blur or you end up having to click twice to show the window.\n\t\t// If you just hide, the first time the user clicks\n\t\t// on the linker button, the blur will trigger, which will hide the window.\n\t\tfinsembleWindow.blur();\n\t\tfinsembleWindow.hide();\n\t};\n\n\tuseEffect(() => {\n\t\tconst setInitialChannels = () => {\n\t\t\tconst channels: Channel[] = FSBL.Clients.LinkerClient.getAllChannels();\n\t\t\tdispatch(LinkerActions.SET_CHANNELS({ channels }));\n\t\t};\n\n\t\tconst focusWindow = () => {\n\t\t\tfinsembleWindow.focus();\n\t\t};\n\n\t\tconst initAccessibleLinkerMode = () => {\n\t\t\tconst accessibilityCallback = (err: any, value: any) => {\n\t\t\t\tif (err) {\n\t\t\t\t\tFSBL.Clients.Logger.system.error(`Failed to get accessibleLinker value: ${err}`);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tdispatch(\n\t\t\t\t\tLinkerActions.SET_ACCESSIBILITY({\n\t\t\t\t\t\tisAccessibleLinker: Boolean(value),\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t};\n\t\t\tFSBL.Clients.ConfigClient.getValue(\"finsemble.accessibleLinker\", accessibilityCallback);\n\t\t};\n\n\t\t/** If user switches the linker channel for different components, this function would be invoked. It will dispatch another\n\t\t * action to update the linker's state according to the linker setup on the switched component.\n\t\t *\n\t\t * @param err error from FSBL\n\t\t * @param msg msg from FSBL\n\t\t */\n\t\tconst onActiveChannelsChanged = (err: any, msg: any) => {\n\t\t\tconst componentLinkerState = FSBL.Clients.LinkerClient.getState(msg.data.windowIdentifier);\n\n\t\t\tif (err) {\n\t\t\t\tFSBL.Clients.Logger.system.error(\"Failed to update the linker state.\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdispatch(\n\t\t\t\tLinkerActions.UPDATE_ACTIVE_CHANNELS({\n\t\t\t\t\tchannelNames: componentLinkerState.channels,\n\t\t\t\t\twindowIdentifier: msg.data.windowIdentifier,\n\t\t\t\t})\n\t\t\t);\n\n\t\t\tmsg.sendQueryResponse(null, null);\n\t\t};\n\n\t\tFSBL.Clients.Logger.system.log(\"Linker component is mounted. Initializing.\");\n\t\tfinsembleWindow.addEventListener(\"blurred\", hideWindow);\n\t\tfinsembleWindow.addEventListener(\"shown\", focusWindow);\n\t\tsetInitialChannels();\n\t\tinitAccessibleLinkerMode();\n\t\tFSBL.Clients.RouterClient.addResponder(\"Finsemble.LinkerWindow.SetActiveChannels\", onActiveChannelsChanged);\n\n\t\treturn () => {\n\t\t\tFSBL.Clients.Logger.system.log(\"Linker component is unmounted. Cleaning up the event listeners.\");\n\t\t\tfinsembleWindow.removeEventListener(\"blurred\", hideWindow);\n\t\t\tfinsembleWindow.removeEventListener(\"shown\", focusWindow);\n\t\t\tFSBL.Clients.RouterClient.removeResponder(\"Finsemble.LinkerWindow.SetActiveChannels\");\n\t\t};\n\t}, []);\n\n\tuseEffect(() => {\n\t\tFSBL.Clients.WindowClient.fitToDOM();\n\t}, [linkerState]);\n\n\tconst toggleChannel = (channelId: number) => {\n\t\tconst channel = linkerState.channels[channelId];\n\t\tif (!channel) {\n\t\t\tFSBL.Clients.Logger.system.error(\"Targeted channel to toggle is not found.\");\n\t\t\treturn;\n\t\t}\n\t\tconst channelName = channel.name;\n\t\tconst channelActive = channel.active;\n\t\tconst { windowIdentifier } = linkerState;\n\n\t\tconst updateActivationTo = (isActive: boolean) => (err: any) => {\n\t\t\tif (err) {\n\t\t\t\tFSBL.Clients.Logger.system.error(\"Error in linkerHook, linkCallback\", err);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdispatch(\n\t\t\t\tLinkerActions.UPDATE_CHANNEL_STATUS({\n\t\t\t\t\tchannelId,\n\t\t\t\t\tactive: isActive,\n\t\t\t\t})\n\t\t\t);\n\t\t};\n\n\t\tconst numberOfActiveChannels = Object.values(linkerState.channels).filter((c) => c?.active).length;\n\n\t\t// We're activating if the channel is currently inactive\n\t\tconst activating = !channelActive;\n\t\tconst deactivating = channelActive;\n\t\tconst allowedToActivateAnotherChannel = numberOfActiveChannels < MAXIMUM_ALLOWED_ACTIVE_CHANNELS;\n\t\t// if we're toggling a channel to be inactive OR\n\t\t// we're trying to toggle one to be active AND we have not hit our maximum,\n\t\t// let the call go through. Otherwise log an error.\n\t\tif (deactivating) {\n\t\t\tFSBL.Clients.LinkerClient.unlinkFromChannel(channelName, windowIdentifier, updateActivationTo(false));\n\t\t} else if (activating && allowedToActivateAnotherChannel) {\n\t\t\tFSBL.Clients.LinkerClient.linkToChannel(channelName, windowIdentifier, updateActivationTo(true));\n\t\t} else {\n\t\t\tFSBL.Clients.Logger.system.error(\n\t\t\t\t`Attempted to toggle more than ${MAXIMUM_ALLOWED_ACTIVE_CHANNELS} channels. This could result in an unacceptable UX. Please contact finsemble support if you would like to render more than ${MAXIMUM_ALLOWED_ACTIVE_CHANNELS} linker channels in the window title bar.`\n\t\t\t);\n\t\t}\n\t\thideWindow();\n\t};\n\n\treturn { state: linkerState, toggleChannel };\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMenu.js","sourceRoot":"","sources":["../../src/hooks/useMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAwC7D,MAAM,CAAC,MAAM,OAAO,GAAG,GAAa,EAAE;IACrC,MAAM,QAAQ,GAAW,GAAG,CAAC;IAC7B,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,EAAE,UAAU,EAAE,GAAG,WAAW,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1D,MAAM,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IAE/C,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE;QACnC,QAAQ,CAAC,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC;IAC/C,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;IAE3B,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE;QAEjC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC;QACzC,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;IAC7C,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;IAE3B,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE;QAClC,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;IAC9C,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;IAE3B,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE;QACjC,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK;YAAE,OAAO;QAGxB,MAAM,cAAc,GAAG,GAAG,EAAE;YAC3B,QAAQ,CAAC,WAAW,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC,CAAC;QACzD,CAAC,CAAC;QAEF,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;QAG5C,UAAU,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;IACtC,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;IAE3B,MAAM,YAAY,GAAG,GAAY,EAAE,CAAC,UAAU,KAAK,UAAU,CAAC;IAE9D,OAAO;QACN,UAAU;QACV,UAAU;QACV,SAAS;QACT,QAAQ;QACR,QAAQ;QACR,YAAY;KACZ,CAAC;AACH,CAAC,CAAC","sourcesContent":["import { useDispatch, useSelector } from \"../store\";\
|
|
1
|
+
{"version":3,"file":"useMenu.js","sourceRoot":"","sources":["../../src/hooks/useMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAwC7D,MAAM,CAAC,MAAM,OAAO,GAAG,GAAa,EAAE;IACrC,MAAM,QAAQ,GAAW,GAAG,CAAC;IAC7B,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,EAAE,UAAU,EAAE,GAAG,WAAW,CAAC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AO;QACN,UAAU;QACV,UAAU;QACV,SAAS;QACT,QAAQ;QACR,QAAQ;QACR,YAAY;KACZ,CAAC;AACH,CAAC,CAAC","sourcesContent":["import { useDispatch, useSelector } from \"../store\";\nimport { MenuActions } from \"../actions/menuActions\";\nimport { useCallback, useContext } from \"react\";\nimport { MenuContext } from \"../components/menu/menuContext\";\n\ntype MenuHook = {\n\t/**\n\t * The Id of the menu that is currently open\n\t *\n\t * @type {string | null}\n\t */\n\topenMenuId: string | null;\n\t/**\n\t * Dispatches a TOGGLE_MENU action, which should cause the menu to close if it is open, or to open if it is closed.\n\t */\n\ttoggleMenu: () => void;\n\t/**\n\t * Dispatches a CLOSE_MENU action, which should cause the menu to close if it is open.\n\t */\n\tcloseMenu: () => void;\n\t/**\n\t * Dispatches a CLOSE_MENU action after a timeout (DURATION in ms). See description in useMenu comments.\n\t */\n\tblurMenu: () => void;\n\t/**\n\t * Dispatches a OPEN_MENU action, which should cause the menu to open if it is closed.\n\t */\n\topenMenu: () => void;\n\t/**\n\t * Returns true if the id of the menu matches the currently active menu\n\t * @return boolean - Returns true if the menu is active\n\t */\n\tisMenuActive: () => boolean;\n};\n\n/**\n * A hook for working with menus. It gets its implicit menu \"id\" from React context.\n * It dispatches actions to the reducer to modify menu state across MenuShell instances.\n *\n * See menuReducer.ts for \"toggle/blur\" race condition algorithm\n *\n * Setting window.FSBL.debug=true will override menu close on blur, to make it easier to debug windows\n */\nexport const useMenu = (): MenuHook => {\n\tconst DURATION: number = 120;\n\tconst dispatch = useDispatch();\n\tconst { openMenuId } = useSelector((state) => state.menu);\n\tconst { thisMenuId } = useContext(MenuContext);\n\n\tconst toggleMenu = useCallback(() => {\n\t\tdispatch(MenuActions.TOGGLE_MENU(thisMenuId));\n\t}, [dispatch, thisMenuId]);\n\n\tconst openMenu = useCallback(() => {\n\t\t// without this call, the toolbar will stay hidden behind other content, and the menus will not be visible\n\t\tFSBL.Clients.WindowClient.bringToFront();\n\t\tdispatch(MenuActions.OPEN_MENU(thisMenuId));\n\t}, [dispatch, thisMenuId]);\n\n\tconst closeMenu = useCallback(() => {\n\t\tdispatch(MenuActions.CLOSE_MENU(thisMenuId));\n\t}, [dispatch, thisMenuId]);\n\n\tconst blurMenu = useCallback(() => {\n\t\tif (FSBL?.debug) return; // If we're debugging then don't blur menus\n\n\t\t// This is a purposeful closure. There is no need to update it with new state.\n\t\tconst closeIfPending = () => {\n\t\t\tdispatch(MenuActions.CLOSE_MENU_IF_PENDING(thisMenuId));\n\t\t};\n\n\t\tdispatch(MenuActions.BLUR_MENU(thisMenuId));\n\n\t\t// See menuReducer.ts for how this timeout is used. Removing the timeout will cause a race condition.\n\t\tsetTimeout(closeIfPending, DURATION);\n\t}, [dispatch, thisMenuId]);\n\n\tconst isMenuActive = (): boolean => openMenuId === thisMenuId;\n\n\treturn {\n\t\topenMenuId,\n\t\ttoggleMenu,\n\t\tcloseMenu,\n\t\topenMenu,\n\t\tblurMenu,\n\t\tisMenuActive,\n\t};\n};\n"]}
|