@finsemble/finsemble-ui 7.0.0 → 7.1.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +13 -11
- package/react/actions/favoriteActions.d.ts +1 -0
- package/react/actions/favoriteActions.js +1 -0
- package/react/actions/favoriteActions.js.map +1 -1
- package/react/actions/menuActions.d.ts +1 -0
- package/react/actions/menuActions.js +1 -0
- package/react/actions/menuActions.js.map +1 -1
- package/react/actions/rootActions.d.ts +1 -0
- package/react/actions/rootActions.js +1 -0
- package/react/actions/rootActions.js.map +1 -1
- package/react/actions/searchActions.d.ts +1 -0
- package/react/actions/searchActions.js +1 -0
- package/react/actions/searchActions.js.map +1 -1
- package/react/actions/toolbarActions.d.ts +34 -0
- package/react/actions/toolbarActions.js +17 -0
- package/react/actions/toolbarActions.js.map +1 -1
- package/react/actions/workspaceActions.d.ts +1 -0
- package/react/actions/workspaceActions.js +1 -0
- package/react/actions/workspaceActions.js.map +1 -1
- package/react/assets/css/advancedAppLauncher.css +22 -19
- package/react/assets/css/appCatalog.css +67 -72
- package/react/assets/css/authentication.css +4 -3
- package/react/assets/css/button.css +3 -10
- package/react/assets/css/core/formElements.css +1 -1
- package/react/assets/css/core/icons.css +3 -2
- package/react/assets/css/core/notifications.css +2 -2
- package/react/assets/css/core/windowFrame.css +9 -9
- package/react/assets/css/dashbar.css +1 -1
- package/react/assets/css/defaultTheme.css +9 -53
- package/react/assets/css/dialogs.css +13 -11
- package/react/assets/css/favorites.css +3 -1
- package/react/assets/css/finsemble.css +3 -2
- package/react/assets/css/font-finance.css +233 -120
- package/react/assets/css/fonts/Open_Sans/OpenSans-Definition.css +10 -10
- package/react/assets/css/linkerWindow.css +2 -2
- package/react/assets/css/menus.css +10 -10
- package/react/assets/css/notificationsCenter.css +16 -31
- package/react/assets/css/processMonitor.css +7 -4
- package/react/assets/css/search.css +1 -1
- package/react/assets/css/shared/animations.css +10 -4
- package/react/assets/css/shared/common.css +2 -2
- package/react/assets/css/tags.css +10 -10
- package/react/assets/css/toolbar.css +22 -19
- package/react/assets/css/userPreferences.css +12 -14
- package/react/assets/css/windowTitleBar.css +75 -36
- package/react/componentTemplateGenerator.js +3 -2
- package/react/componentTemplateGenerator.js.map +1 -1
- package/react/components/FinsembleProvider.d.ts +7 -0
- package/react/components/FinsembleProvider.js +2 -0
- package/react/components/FinsembleProvider.js.map +1 -1
- package/react/components/appCatalog/AppCatalog.d.ts +4 -0
- package/react/components/appCatalog/AppCatalog.js +4 -0
- package/react/components/appCatalog/AppCatalog.js.map +1 -1
- package/react/components/appCatalog/AppCatalogComponent.d.ts +58 -0
- package/react/components/appCatalog/AppCatalogComponent.js +70 -1
- package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
- package/react/components/appCatalog/components/AppCard.d.ts +35 -0
- package/react/components/appCatalog/components/AppCard.js +42 -0
- package/react/components/appCatalog/components/AppCard.js.map +1 -1
- package/react/components/appCatalog/components/AppResults.d.ts +10 -0
- package/react/components/appCatalog/components/AppResults.js +24 -0
- package/react/components/appCatalog/components/AppResults.js.map +1 -1
- package/react/components/appCatalog/components/Carousel.d.ts +26 -0
- package/react/components/appCatalog/components/Carousel.js +34 -0
- package/react/components/appCatalog/components/Carousel.js.map +1 -1
- package/react/components/appCatalog/components/EmptyResults.d.ts +4 -0
- package/react/components/appCatalog/components/EmptyResults.js +8 -0
- package/react/components/appCatalog/components/EmptyResults.js.map +1 -1
- package/react/components/appCatalog/components/Hero.d.ts +15 -0
- package/react/components/appCatalog/components/Hero.js +15 -0
- package/react/components/appCatalog/components/Hero.js.map +1 -1
- package/react/components/appCatalog/components/Home.d.ts +6 -4
- package/react/components/appCatalog/components/Home.js +10 -0
- package/react/components/appCatalog/components/Home.js.map +1 -1
- package/react/components/appCatalog/components/SearchBar.d.ts +31 -0
- package/react/components/appCatalog/components/SearchBar.js +33 -0
- package/react/components/appCatalog/components/SearchBar.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppDescription.d.ts +5 -0
- package/react/components/appCatalog/components/Showcase/AppDescription.js +9 -0
- package/react/components/appCatalog/components/Showcase/AppDescription.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppDevNotes.d.ts +7 -0
- package/react/components/appCatalog/components/Showcase/AppDevNotes.js +15 -0
- package/react/components/appCatalog/components/Showcase/AppDevNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppShowcase.d.ts +17 -0
- package/react/components/appCatalog/components/Showcase/AppShowcase.js +25 -0
- package/react/components/appCatalog/components/Showcase/AppShowcase.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/Header.d.ts +7 -0
- package/react/components/appCatalog/components/Showcase/Header.js +12 -0
- package/react/components/appCatalog/components/Showcase/Header.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/ImageCarousel.d.ts +7 -0
- package/react/components/appCatalog/components/Showcase/ImageCarousel.js +11 -0
- package/react/components/appCatalog/components/Showcase/ImageCarousel.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/Modal.d.ts +10 -0
- package/react/components/appCatalog/components/Showcase/Modal.js +10 -0
- package/react/components/appCatalog/components/Showcase/Modal.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/ReleaseNotes.d.ts +5 -0
- package/react/components/appCatalog/components/Showcase/ReleaseNotes.js +9 -0
- package/react/components/appCatalog/components/Showcase/ReleaseNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/SupportNotes.d.ts +6 -0
- package/react/components/appCatalog/components/Showcase/SupportNotes.js +11 -0
- package/react/components/appCatalog/components/Showcase/SupportNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/VersionNotes.d.ts +5 -0
- package/react/components/appCatalog/components/Showcase/VersionNotes.js +9 -0
- package/react/components/appCatalog/components/Showcase/VersionNotes.js.map +1 -1
- package/react/components/appCatalog/components/Tag.d.ts +6 -0
- package/react/components/appCatalog/components/Tag.js +10 -0
- package/react/components/appCatalog/components/Tag.js.map +1 -1
- package/react/components/appCatalog/components/Toast.d.ts +5 -0
- package/react/components/appCatalog/components/Toast.js +9 -0
- package/react/components/appCatalog/components/Toast.js.map +1 -1
- package/react/components/appCatalog/components/helpers.js +1 -0
- package/react/components/appCatalog/components/helpers.js.map +1 -1
- package/react/components/appCatalog/modules/AppDirectory.d.ts +5 -0
- package/react/components/appCatalog/modules/AppDirectory.js +5 -0
- package/react/components/appCatalog/modules/AppDirectory.js.map +1 -1
- package/react/components/appCatalog/modules/FDC3.d.ts +37 -0
- package/react/components/appCatalog/modules/FDC3.js +40 -0
- package/react/components/appCatalog/modules/FDC3.js.map +1 -1
- package/react/components/appCatalog/stores/appStore.js +1 -0
- package/react/components/appCatalog/stores/appStore.js.map +1 -1
- package/react/components/appCatalog/stores/storeActions.d.ts +91 -0
- package/react/components/appCatalog/stores/storeActions.js +116 -1
- package/react/components/appCatalog/stores/storeActions.js.map +1 -1
- package/react/components/common/Checkbox.d.ts +1 -0
- package/react/components/common/Checkbox.js +2 -2
- package/react/components/common/Checkbox.js.map +1 -1
- package/react/components/common/ColorPicker.d.ts +5 -0
- package/react/components/common/ColorPicker.js +40 -0
- package/react/components/common/ColorPicker.js.map +1 -1
- package/react/components/common/DropZone.d.ts +11 -0
- package/react/components/common/DropZone.js +21 -1
- package/react/components/common/DropZone.js.map +1 -1
- package/react/components/common/DropdownButton.d.ts +4 -0
- package/react/components/common/DropdownButton.js +4 -0
- package/react/components/common/DropdownButton.js.map +1 -1
- package/react/components/common/ErrorBoundary.d.ts +18 -0
- package/react/components/common/ErrorBoundary.js +21 -0
- package/react/components/common/ErrorBoundary.js.map +1 -1
- package/react/components/common/FileInput.d.ts +8 -1
- package/react/components/common/FileInput.js +19 -4
- package/react/components/common/FileInput.js.map +1 -1
- package/react/components/common/FinsembleIcon.d.ts +10 -0
- package/react/components/common/FinsembleIcon.js +51 -2
- package/react/components/common/FinsembleIcon.js.map +1 -1
- package/react/components/common/FinsembleSelect.js +5 -1
- package/react/components/common/FinsembleSelect.js.map +1 -1
- package/react/components/common/FinsembleToggleButtonBar.js +1 -1
- package/react/components/common/FinsembleToggleButtonBar.js.map +1 -1
- package/react/components/common/InputTable.d.ts +7 -0
- package/react/components/common/InputTable.js +7 -0
- package/react/components/common/InputTable.js.map +1 -1
- package/react/components/common/Tab.js +3 -0
- package/react/components/common/Tab.js.map +1 -1
- package/react/components/common/TimeSelect.js +24 -0
- package/react/components/common/TimeSelect.js.map +1 -1
- package/react/components/common/Tooltip.js +2 -0
- package/react/components/common/Tooltip.js.map +1 -1
- package/react/components/common/css/accordion.css +9 -6
- package/react/components/common/css/application-edit-page.css +39 -44
- package/react/components/common/css/button.css +10 -5
- package/react/components/common/css/color-picker.css +3 -3
- package/react/components/common/css/drop-zone.css +2 -6
- package/react/components/common/css/file-input.css +5 -5
- package/react/components/common/css/header.css +3 -2
- package/react/components/common/css/icon.css +1 -1
- package/react/components/common/css/loading-spinner.css +7 -12
- package/react/components/common/css/selector.css +4 -4
- package/react/components/common/css/styles.css +22 -16
- package/react/components/common/css/tab.css +8 -8
- package/react/components/common/css/time-select.css +1 -0
- package/react/components/common/css/toggle.css +4 -4
- package/react/components/common/css/tooltip.css +2 -3
- package/react/components/common/file_helpers.js +2 -0
- package/react/components/common/file_helpers.js.map +1 -1
- package/react/components/common/helpers.js +1 -0
- package/react/components/common/helpers.js.map +1 -1
- package/react/components/common/stories/ColorPicker.stories.js +3 -0
- package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
- package/react/components/common/stories/FileInput.stories.d.ts +3 -1
- package/react/components/common/stories/FileInput.stories.js +12 -0
- package/react/components/common/stories/FileInput.stories.js.map +1 -1
- package/react/components/common/tests/Accordion.spec.js +6 -0
- package/react/components/common/tests/Accordion.spec.js.map +1 -1
- package/react/components/common/tests/Checkbox.spec.js +1 -0
- package/react/components/common/tests/Checkbox.spec.js.map +1 -1
- package/react/components/common/tests/ColorPicker.spec.js +6 -0
- package/react/components/common/tests/ColorPicker.spec.js.map +1 -1
- package/react/components/common/tests/DropZone.spec.js +1 -0
- package/react/components/common/tests/DropZone.spec.js.map +1 -1
- package/react/components/common/tests/FileInput.spec.js +22 -0
- package/react/components/common/tests/FileInput.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleSelect.spec.js +1 -0
- package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleToggle.spec.js +1 -0
- package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleToggleButtonBar.spec.js +1 -0
- package/react/components/common/tests/FinsembleToggleButtonBar.spec.js.map +1 -1
- package/react/components/common/tests/TimeSelect.spec.js +4 -0
- package/react/components/common/tests/TimeSelect.spec.js.map +1 -1
- package/react/components/common/tests/Tooltip.spec.js +16 -0
- package/react/components/common/tests/Tooltip.spec.js.map +1 -1
- package/react/components/favorites/FavoriteMaker.d.ts +8 -0
- package/react/components/favorites/FavoriteMaker.js +9 -0
- package/react/components/favorites/FavoriteMaker.js.map +1 -1
- package/react/components/favorites/FavoritesShell.d.ts +4 -0
- package/react/components/favorites/FavoritesShell.js +13 -1
- package/react/components/favorites/FavoritesShell.js.map +1 -1
- package/react/components/favorites/FavoritesShell.spec.js +3 -0
- package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverContainer.js +8 -0
- package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.css +16 -3
- package/react/components/fdc3Resolver/ResolverDialog.js +7 -2
- package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.spec.js +3 -2
- package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.stories.js +2 -0
- package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
- package/react/components/icon/Icon.d.ts +13 -0
- package/react/components/icon/Icon.js +34 -0
- package/react/components/icon/Icon.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialog.d.ts +4 -0
- package/react/components/legacyControls/FinsembleDialog.js +15 -0
- package/react/components/legacyControls/FinsembleDialog.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogButton.d.ts +3 -0
- package/react/components/legacyControls/FinsembleDialogButton.js +6 -1
- package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogQuestion.d.ts +7 -0
- package/react/components/legacyControls/FinsembleDialogQuestion.js +7 -0
- package/react/components/legacyControls/FinsembleDialogQuestion.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogTextInput.d.ts +3 -0
- package/react/components/legacyControls/FinsembleDialogTextInput.js +14 -0
- package/react/components/legacyControls/FinsembleDialogTextInput.js.map +1 -1
- package/react/components/legacyControls/FinsembleDnDContext.d.ts +19 -0
- package/react/components/legacyControls/FinsembleDnDContext.js +126 -1
- package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
- package/react/components/legacyControls/FinsembleDraggable.d.ts +3 -0
- package/react/components/legacyControls/FinsembleDraggable.js +3 -0
- package/react/components/legacyControls/FinsembleDraggable.js.map +1 -1
- package/react/components/legacyControls/FinsembleHoverDetector.d.ts +15 -0
- package/react/components/legacyControls/FinsembleHoverDetector.js +26 -1
- package/react/components/legacyControls/FinsembleHoverDetector.js.map +1 -1
- package/react/components/legacyControls/FinsembleMenuSection.d.ts +4 -0
- package/react/components/legacyControls/FinsembleMenuSection.js +38 -0
- package/react/components/legacyControls/FinsembleMenuSection.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js +1 -0
- package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js +1 -0
- package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
- package/react/components/linker/LinkerMenu.d.ts +3 -0
- package/react/components/linker/LinkerMenu.js +21 -0
- package/react/components/linker/LinkerMenu.js.map +1 -1
- package/react/components/linker/LinkerMenuDeprecated.d.ts +3 -0
- package/react/components/linker/LinkerMenuDeprecated.js +9 -0
- package/react/components/linker/LinkerMenuDeprecated.js.map +1 -1
- package/react/components/menu/Menu.d.ts +15 -0
- package/react/components/menu/Menu.js +15 -0
- package/react/components/menu/Menu.js.map +1 -1
- package/react/components/menu/MenuAutoResizer.d.ts +7 -0
- package/react/components/menu/MenuAutoResizer.js +27 -0
- package/react/components/menu/MenuAutoResizer.js.map +1 -1
- package/react/components/menu/MenuContent.d.ts +4 -0
- package/react/components/menu/MenuContent.js +4 -0
- package/react/components/menu/MenuContent.js.map +1 -1
- package/react/components/menu/MenuHotKey.d.ts +14 -0
- package/react/components/menu/MenuHotKey.js +15 -0
- package/react/components/menu/MenuHotKey.js.map +1 -1
- package/react/components/menu/MenuItem.d.ts +8 -0
- package/react/components/menu/MenuItem.js +13 -2
- package/react/components/menu/MenuItem.js.map +1 -1
- package/react/components/menu/MenuPortal.js +112 -2
- package/react/components/menu/MenuPortal.js.map +1 -1
- package/react/components/menu/MenuShell.d.ts +16 -0
- package/react/components/menu/MenuShell.js +26 -0
- package/react/components/menu/MenuShell.js.map +1 -1
- package/react/components/menu/MenuToggle.d.ts +3 -0
- package/react/components/menu/MenuToggle.js +3 -0
- package/react/components/menu/MenuToggle.js.map +1 -1
- package/react/components/menu/keyboardNavigation.d.ts +12 -0
- package/react/components/menu/keyboardNavigation.js +55 -0
- package/react/components/menu/keyboardNavigation.js.map +1 -1
- package/react/components/menu/menuContext.d.ts +6 -0
- package/react/components/menu/menuContext.js +6 -0
- package/react/components/menu/menuContext.js.map +1 -1
- package/react/components/menu/menuHelpers.d.ts +22 -0
- package/react/components/menu/menuHelpers.js +58 -1
- package/react/components/menu/menuHelpers.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerControls.js +8 -0
- package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerHeader.js +5 -0
- package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +18 -0
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +3 -0
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
- package/react/components/notifications/components/shared/CheckButton.js +1 -1
- package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.d.ts +9 -0
- package/react/components/notifications/components/shared/NotificationCardShell.js +13 -6
- package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
- package/react/components/notifications/components/shared/OverflowMenu.d.ts +4 -0
- package/react/components/notifications/components/shared/OverflowMenu.js +16 -2
- package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
- package/react/components/notifications/components/views/CardView.js +3 -0
- package/react/components/notifications/components/views/CardView.js.map +1 -1
- package/react/components/notifications/components/views/ListView.js +8 -0
- package/react/components/notifications/components/views/ListView.js.map +1 -1
- package/react/components/notifications/notificationsContext.d.ts +4 -0
- package/react/components/notifications/notificationsContext.js +4 -0
- package/react/components/notifications/notificationsContext.js.map +1 -1
- package/react/components/notifications/types.d.ts +3 -0
- package/react/components/notifications/utils.d.ts +4 -0
- package/react/components/notifications/utils.js +4 -0
- package/react/components/notifications/utils.js.map +1 -1
- package/react/components/processMonitor/ProcessMonitor.d.ts +3 -0
- package/react/components/processMonitor/ProcessMonitor.js +17 -2
- package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
- package/react/components/processMonitor/components/ChildWindow.d.ts +3 -0
- package/react/components/processMonitor/components/ChildWindow.js +5 -0
- package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
- package/react/components/processMonitor/components/ListHeader.d.ts +5 -0
- package/react/components/processMonitor/components/ListHeader.js +7 -0
- package/react/components/processMonitor/components/ListHeader.js.map +1 -1
- package/react/components/processMonitor/components/ProcessStatistics.js +12 -1
- package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
- package/react/components/processMonitor/constants.js +6 -0
- package/react/components/processMonitor/constants.js.map +1 -1
- package/react/components/processMonitor/helpers.d.ts +13 -0
- package/react/components/processMonitor/helpers.js +23 -3
- package/react/components/processMonitor/helpers.js.map +1 -1
- package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +39 -0
- package/react/components/processMonitor/stores/ProcessMonitorStore.js +50 -0
- package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
- package/react/components/quickComponentForm/QuickComponentForm.d.ts +3 -0
- package/react/components/quickComponentForm/QuickComponentForm.js +20 -0
- package/react/components/quickComponentForm/QuickComponentForm.js.map +1 -1
- package/react/components/quickComponentForm/quickComponent.css +1 -1
- package/react/components/sdd/AddApp.d.ts +4 -2
- package/react/components/sdd/AddApp.js +57 -49
- package/react/components/sdd/AddApp.js.map +1 -1
- package/react/components/sdd/AppEditAccess.js +8 -0
- package/react/components/sdd/AppEditAccess.js.map +1 -1
- package/react/components/sdd/AppEditPage.d.ts +2 -1
- package/react/components/sdd/AppEditPage.js +148 -361
- package/react/components/sdd/AppEditPage.js.map +1 -1
- package/react/components/sdd/Appearance.css +1 -1
- package/react/components/sdd/Appearance.js +3 -0
- package/react/components/sdd/Appearance.js.map +1 -1
- package/react/components/sdd/Application.js +39 -7
- package/react/components/sdd/Application.js.map +1 -1
- package/react/components/sdd/Applications.js +89 -13
- package/react/components/sdd/Applications.js.map +1 -1
- package/react/components/sdd/AssetsPage.css +3 -3
- package/react/components/sdd/EditPreload.js +10 -0
- package/react/components/sdd/EditPreload.js.map +1 -1
- package/react/components/sdd/ExportCloud.js +4 -0
- package/react/components/sdd/ExportCloud.js.map +1 -1
- package/react/components/sdd/Publish.js +2 -0
- package/react/components/sdd/Publish.js.map +1 -1
- package/react/components/sdd/PublishProgress.js +11 -1
- package/react/components/sdd/PublishProgress.js.map +1 -1
- package/react/components/sdd/SmartDesktopDesigner.js +17 -0
- package/react/components/sdd/SmartDesktopDesigner.js.map +1 -1
- package/react/components/sdd/ThemePage.css +6 -23
- package/react/components/sdd/ThemePage.js +1 -1
- package/react/components/sdd/ThemePage.js.map +1 -1
- package/react/components/sdd/Themes.js +2 -0
- package/react/components/sdd/Themes.js.map +1 -1
- package/react/components/sdd/Toolbar.js +7 -0
- package/react/components/sdd/Toolbar.js.map +1 -1
- package/react/components/sdd/appEditPage/Behavior.d.ts +34 -0
- package/react/components/sdd/appEditPage/Behavior.js +134 -0
- package/react/components/sdd/appEditPage/Behavior.js.map +1 -0
- package/react/components/sdd/appEditPage/Component.d.ts +22 -0
- package/react/components/sdd/appEditPage/Component.js +76 -0
- package/react/components/sdd/appEditPage/Component.js.map +1 -0
- package/react/components/sdd/appEditPage/DebugToolkit.d.ts +9 -0
- package/react/components/sdd/appEditPage/DebugToolkit.js +20 -0
- package/react/components/sdd/appEditPage/DebugToolkit.js.map +1 -0
- package/react/components/sdd/appEditPage/Interop.d.ts +10 -0
- package/react/components/sdd/appEditPage/Interop.js +40 -0
- package/react/components/sdd/appEditPage/Interop.js.map +1 -0
- package/react/components/sdd/appEditPage/Position.d.ts +18 -0
- package/react/components/sdd/appEditPage/Position.js +72 -0
- package/react/components/sdd/appEditPage/Position.js.map +1 -0
- package/react/components/sdd/appEditPage/Preloads.d.ts +9 -0
- package/react/components/sdd/appEditPage/Preloads.js +16 -0
- package/react/components/sdd/appEditPage/Preloads.js.map +1 -0
- package/react/components/sdd/appEditPage/SelectConnect.d.ts +15 -0
- package/react/components/sdd/appEditPage/SelectConnect.js +28 -0
- package/react/components/sdd/appEditPage/SelectConnect.js.map +1 -0
- package/react/components/sdd/appEditPage/Workspace.d.ts +12 -0
- package/react/components/sdd/appEditPage/Workspace.js +30 -0
- package/react/components/sdd/appEditPage/Workspace.js.map +1 -0
- package/react/components/sdd/common/getCSSVars.js +7 -2
- package/react/components/sdd/common/getCSSVars.js.map +1 -1
- package/react/components/sdd/common/setPreloadDefaults.js +4 -0
- package/react/components/sdd/common/setPreloadDefaults.js.map +1 -1
- package/react/components/sdd/css/addApp.css +18 -5
- package/react/components/sdd/css/appearance.css +6 -0
- package/react/components/sdd/css/applications.css +27 -14
- package/react/components/sdd/css/authentication.css +7 -6
- package/react/components/sdd/css/buttons.css +1 -1
- package/react/components/sdd/css/export.css +5 -3
- package/react/components/sdd/css/getting-started.css +2 -2
- package/react/components/sdd/css/nav.css +8 -11
- package/react/components/sdd/css/project-header.css +5 -7
- package/react/components/sdd/css/styles.css +29 -23
- package/react/components/sdd/css/views.css +4 -3
- package/react/components/sdd/fixtures/apps.js +12 -0
- package/react/components/sdd/fixtures/apps.js.map +1 -1
- package/react/components/sdd/fixtures/configTemplate.js +1 -0
- package/react/components/sdd/fixtures/configTemplate.js.map +1 -1
- package/react/components/sdd/fixtures/publishProgress.js +40 -0
- package/react/components/sdd/fixtures/publishProgress.js.map +1 -1
- package/react/components/sdd/sdd_helpers.d.ts +6 -0
- package/react/components/sdd/sdd_helpers.js +6 -0
- package/react/components/sdd/sdd_helpers.js.map +1 -1
- package/react/components/sdd/smartDesktopClient.d.ts +303 -0
- package/react/components/sdd/smartDesktopClient.js +334 -1
- package/react/components/sdd/smartDesktopClient.js.map +1 -1
- package/react/components/sdd/smartDesktopClient.spec.js +5 -2
- package/react/components/sdd/smartDesktopClient.spec.js.map +1 -1
- package/react/components/sdd/stories/AddApp.stories.d.ts +2 -1
- package/react/components/sdd/stories/AddApp.stories.js +8 -0
- package/react/components/sdd/stories/AddApp.stories.js.map +1 -1
- package/react/components/sdd/stories/AppEditPage.stories.d.ts +3 -1
- package/react/components/sdd/stories/AppEditPage.stories.js +3 -0
- package/react/components/sdd/stories/AppEditPage.stories.js.map +1 -1
- package/react/components/sdd/stories/Appearance.stories.js +1 -0
- package/react/components/sdd/stories/Appearance.stories.js.map +1 -1
- package/react/components/sdd/tests/AddApp.spec.js +40 -3
- package/react/components/sdd/tests/AddApp.spec.js.map +1 -1
- package/react/components/sdd/tests/AppEditPage.spec.js +16 -0
- package/react/components/sdd/tests/AppEditPage.spec.js.map +1 -1
- package/react/components/sdd/tests/Application.spec.js +33 -438
- package/react/components/sdd/tests/Application.spec.js.map +1 -1
- package/react/components/sdd/tests/Applications.spec.d.ts +1 -1
- package/react/components/sdd/tests/Applications.spec.js +29 -5
- package/react/components/sdd/tests/Applications.spec.js.map +1 -1
- package/react/components/sdd/tests/Authentication.spec.js +7 -0
- package/react/components/sdd/tests/Authentication.spec.js.map +1 -1
- package/react/components/sdd/tests/ContentHeader.spec.js +2 -0
- package/react/components/sdd/tests/ContentHeader.spec.js.map +1 -1
- package/react/components/sdd/tests/EditPreload.spec.js +13 -0
- package/react/components/sdd/tests/EditPreload.spec.js.map +1 -1
- package/react/components/sdd/tests/Export.spec.js +2 -1
- package/react/components/sdd/tests/Export.spec.js.map +1 -1
- package/react/components/sdd/tests/ItemList.spec.js +4 -0
- package/react/components/sdd/tests/ItemList.spec.js.map +1 -1
- package/react/components/sdd/tests/OptionalSettingsView.spec.js +29 -0
- package/react/components/sdd/tests/OptionalSettingsView.spec.js.map +1 -1
- package/react/components/sdd/tests/ProjectErrors.spec.js +2 -0
- package/react/components/sdd/tests/ProjectErrors.spec.js.map +1 -1
- package/react/components/sdd/tests/Themes.spec.js +1 -1
- package/react/components/sdd/tests/Themes.spec.js.map +1 -1
- package/react/components/sdd/tests/Toolbar.spec.js +53 -0
- package/react/components/sdd/tests/Toolbar.spec.js.map +1 -1
- package/react/components/sdd/tests/a11y_helper.js +8 -0
- package/react/components/sdd/tests/a11y_helper.js.map +1 -1
- package/react/components/search/Highlight.d.ts +6 -0
- package/react/components/search/Highlight.js +19 -0
- package/react/components/search/Highlight.js.map +1 -1
- package/react/components/search/SearchBestMatch.d.ts +4 -0
- package/react/components/search/SearchBestMatch.js +11 -0
- package/react/components/search/SearchBestMatch.js.map +1 -1
- package/react/components/search/SearchInput.d.ts +5 -0
- package/react/components/search/SearchInput.js +6 -0
- package/react/components/search/SearchInput.js.map +1 -1
- package/react/components/search/SearchProviderResults.js +2 -0
- package/react/components/search/SearchProviderResults.js.map +1 -1
- package/react/components/search/SearchResult.js +6 -0
- package/react/components/search/SearchResult.js.map +1 -1
- package/react/components/search/SearchResult.spec.js +7 -0
- package/react/components/search/SearchResult.spec.js.map +1 -1
- package/react/components/search/SearchResult.stories.js +4 -0
- package/react/components/search/SearchResult.stories.js.map +1 -1
- package/react/components/search/SearchResults.js +5 -1
- package/react/components/search/SearchResults.js.map +1 -1
- package/react/components/search/SearchResults.spec.js +7 -0
- package/react/components/search/SearchResults.spec.js.map +1 -1
- package/react/components/shared/Animate.d.ts +5 -0
- package/react/components/shared/Animate.js +12 -1
- package/react/components/shared/Animate.js.map +1 -1
- package/react/components/shared/DefaultDropdownButton.js +9 -0
- package/react/components/shared/DefaultDropdownButton.js.map +1 -1
- package/react/components/shared/Tag.d.ts +0 -4
- package/react/components/shared/Tag.js +4 -0
- package/react/components/shared/Tag.js.map +1 -1
- package/react/components/shared/TagsMenu.d.ts +6 -0
- package/react/components/shared/TagsMenu.js +7 -0
- package/react/components/shared/TagsMenu.js.map +1 -1
- package/react/components/shared/addProtocolToValidURL.d.ts +6 -0
- package/react/components/shared/addProtocolToValidURL.js +6 -0
- package/react/components/shared/addProtocolToValidURL.js.map +1 -1
- package/react/components/shared/openQuitConfirmationDialog.d.ts +1 -1
- package/react/components/shared/openQuitConfirmationDialog.js +4 -4
- package/react/components/shared/openQuitConfirmationDialog.js.map +1 -1
- package/react/components/shared/tests/addProtocolToValidURL.spec.js +1 -0
- package/react/components/shared/tests/addProtocolToValidURL.spec.js.map +1 -1
- package/react/components/shared/validateURL.d.ts +18 -0
- package/react/components/shared/validateURL.js +24 -5
- package/react/components/shared/validateURL.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.css +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.d.ts +3 -0
- package/react/components/singleInputDialog/SingleInputDialog.js +44 -0
- package/react/components/singleInputDialog/SingleInputDialog.js.map +1 -1
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +6 -0
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
- package/react/components/system/System.d.ts +22 -0
- package/react/components/system/System.js +23 -1
- package/react/components/system/System.js.map +1 -1
- package/react/components/system/System.stories.js +1 -0
- package/react/components/system/System.stories.js.map +1 -1
- package/react/components/system/SystemTrayComponentShell.d.ts +6 -0
- package/react/components/system/SystemTrayComponentShell.js +9 -0
- package/react/components/system/SystemTrayComponentShell.js.map +1 -1
- package/react/components/toolbar/AutoArrange.d.ts +5 -0
- package/react/components/toolbar/AutoArrange.js +8 -1
- package/react/components/toolbar/AutoArrange.js.map +1 -1
- package/react/components/toolbar/AutoArrange.spec.js +1 -0
- package/react/components/toolbar/AutoArrange.spec.js.map +1 -1
- package/react/components/toolbar/AutoArrange.stories.js +1 -0
- package/react/components/toolbar/AutoArrange.stories.js.map +1 -1
- package/react/components/toolbar/DragHandle.d.ts +4 -0
- package/react/components/toolbar/DragHandle.js +11 -0
- package/react/components/toolbar/DragHandle.js.map +1 -1
- package/react/components/toolbar/DragHandle.spec.js +1 -0
- package/react/components/toolbar/DragHandle.spec.js.map +1 -1
- package/react/components/toolbar/DragHandle.stories.js +1 -0
- package/react/components/toolbar/DragHandle.stories.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.d.ts +4 -0
- package/react/components/toolbar/MinimizeAll.js +7 -1
- package/react/components/toolbar/MinimizeAll.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.spec.js +1 -0
- package/react/components/toolbar/MinimizeAll.spec.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.stories.js +1 -0
- package/react/components/toolbar/MinimizeAll.stories.js.map +1 -1
- package/react/components/toolbar/NotificationControl.d.ts +5 -0
- package/react/components/toolbar/NotificationControl.js +8 -1
- package/react/components/toolbar/NotificationControl.js.map +1 -1
- package/react/components/toolbar/RevealAll.d.ts +4 -0
- package/react/components/toolbar/RevealAll.js +7 -1
- package/react/components/toolbar/RevealAll.js.map +1 -1
- package/react/components/toolbar/RevealAll.spec.js +1 -0
- package/react/components/toolbar/RevealAll.spec.js.map +1 -1
- package/react/components/toolbar/RevealAll.stories.js +1 -0
- package/react/components/toolbar/RevealAll.stories.js.map +1 -1
- package/react/components/toolbar/SddButton.d.ts +4 -0
- package/react/components/toolbar/SddButton.js +4 -0
- package/react/components/toolbar/SddButton.js.map +1 -1
- package/react/components/toolbar/ToolbarIcon.d.ts +4 -0
- package/react/components/toolbar/ToolbarIcon.js +4 -0
- package/react/components/toolbar/ToolbarIcon.js.map +1 -1
- package/react/components/toolbar/ToolbarSection.d.ts +7 -0
- package/react/components/toolbar/ToolbarSection.js +19 -1
- package/react/components/toolbar/ToolbarSection.js.map +1 -1
- package/react/components/toolbar/ToolbarShell.d.ts +5 -0
- package/react/components/toolbar/ToolbarShell.js +7 -0
- package/react/components/toolbar/ToolbarShell.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.d.ts +16 -0
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js +20 -0
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.d.ts +52 -0
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js +58 -0
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.d.ts +5 -0
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js +5 -0
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.d.ts +27 -0
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js +49 -0
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.d.ts +13 -0
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js +14 -0
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/Content.d.ts +5 -0
- package/react/components/toolbar/advancedAppLauncher/components/Content.js +19 -0
- package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.d.ts +4 -0
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js +4 -0
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.d.ts +16 -0
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js +39 -0
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.d.ts +4 -0
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js +9 -0
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js +3 -0
- package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.d.ts +6 -0
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js +7 -0
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/ToggleFavoriteDropdown.d.ts +5 -0
- package/react/components/toolbar/advancedAppLauncher/components/ToggleFavoriteDropdown.js +5 -0
- package/react/components/toolbar/advancedAppLauncher/components/ToggleFavoriteDropdown.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.d.ts +5 -0
- package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js +5 -0
- package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/modules/FDC3.d.ts +37 -0
- package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js +40 -0
- package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.d.ts +3 -0
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js +82 -0
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.d.ts +10 -0
- package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js +11 -0
- package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js.map +1 -1
- package/react/components/toolbar/appLauncher/AppLauncherMenu.d.ts +18 -0
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js +20 -0
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.d.ts +9 -0
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js +12 -0
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/appLauncher.css +1 -1
- package/react/components/toolbar/appLauncher/components/componentList.d.ts +3 -0
- package/react/components/toolbar/appLauncher/components/componentList.js +17 -3
- package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +6 -0
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js +26 -0
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
- package/react/components/toolbar/dashbar/Dashbar.js +70 -3
- package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
- package/react/components/toolbar/dashbar/DashbarItem.js +5 -0
- package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.d.ts +7 -0
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js +7 -0
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.d.ts +16 -0
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js +20 -0
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.d.ts +26 -0
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js +29 -0
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.d.ts +5 -0
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js +6 -0
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.d.ts +76 -0
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +140 -1
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/workspaceManagementMenu.css +8 -18
- package/react/components/userPreferences/NotificationsPreferencesContext.d.ts +4 -0
- package/react/components/userPreferences/NotificationsPreferencesContext.js +4 -0
- package/react/components/userPreferences/NotificationsPreferencesContext.js.map +1 -1
- package/react/components/userPreferences/UserPreferenceTypes.d.ts +3 -0
- package/react/components/userPreferences/UserPreferences.d.ts +8 -0
- package/react/components/userPreferences/UserPreferences.js +8 -0
- package/react/components/userPreferences/UserPreferences.js.map +1 -1
- package/react/components/userPreferences/UserPreferencesBase.js +4 -0
- package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
- package/react/components/userPreferences/components/ContentSection.d.ts +5 -0
- package/react/components/userPreferences/components/LeftNav.d.ts +4 -0
- package/react/components/userPreferences/components/content/DashbarEditor.js +3 -0
- package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
- package/react/components/userPreferences/components/content/Notifications.js +3 -0
- package/react/components/userPreferences/components/content/Notifications.js.map +1 -1
- package/react/components/userPreferences/components/content/Workspaces.d.ts +12 -0
- package/react/components/userPreferences/components/content/Workspaces.js +33 -1
- package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js +3 -0
- package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js +3 -0
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js +3 -0
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
- package/react/components/userPreferences/components/general/ScheduledClose.js +11 -0
- package/react/components/userPreferences/components/general/ScheduledClose.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.js +3 -0
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.js.map +1 -1
- package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +17 -0
- package/react/components/userPreferences/stores/UserPreferencesStore.js +27 -0
- package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
- package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js +1 -0
- package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js.map +1 -1
- package/react/components/userPreferences/tests/Workspace.spec.js +20 -0
- package/react/components/userPreferences/tests/Workspace.spec.js.map +1 -1
- package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +124 -0
- package/react/components/windowTitleBar/WindowTitleBarShell.js +284 -35
- package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
- package/react/components/windowTitleBar/components/center/Tab.d.ts +3 -0
- package/react/components/windowTitleBar/components/center/Tab.js +3 -0
- package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
- package/react/components/windowTitleBar/components/center/TabList.d.ts +90 -0
- package/react/components/windowTitleBar/components/center/TabList.js +170 -4
- package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButton.d.ts +9 -1
- package/react/components/windowTitleBar/components/left/LinkerButton.js +25 -9
- package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.d.ts +47 -0
- package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.js +76 -1
- package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerGroups.d.ts +4 -0
- package/react/components/windowTitleBar/components/left/LinkerGroups.js +5 -0
- package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.d.ts +18 -0
- package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js +49 -0
- package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js.map +1 -1
- package/react/components/windowTitleBar/components/left/ShareButton.d.ts +17 -0
- package/react/components/windowTitleBar/components/left/ShareButton.js +39 -0
- package/react/components/windowTitleBar/components/left/ShareButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.js +4 -0
- package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/CloseButton.d.ts +27 -0
- package/react/components/windowTitleBar/components/right/CloseButton.js +27 -0
- package/react/components/windowTitleBar/components/right/CloseButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/GroupingButton.d.ts +37 -0
- package/react/components/windowTitleBar/components/right/GroupingButton.js +40 -0
- package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/MaximizeButton.d.ts +46 -0
- package/react/components/windowTitleBar/components/right/MaximizeButton.js +54 -0
- package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/MinimizeButton.d.ts +26 -0
- package/react/components/windowTitleBar/components/right/MinimizeButton.js +26 -0
- package/react/components/windowTitleBar/components/right/MinimizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/windowTitle.d.ts +40 -0
- package/react/components/windowTitleBar/components/windowTitle.js +172 -10
- package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts +5 -0
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js +72 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.css +1 -1
- package/react/components/yesNoDialog/YesNoDialog.d.ts +3 -0
- package/react/components/yesNoDialog/YesNoDialog.js +63 -0
- package/react/components/yesNoDialog/YesNoDialog.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.spec.js +4 -0
- package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
- package/react/components/yesNoDialog/timer.js +2 -0
- package/react/components/yesNoDialog/timer.js.map +1 -1
- package/react/enzymeSetup.js +5 -0
- package/react/enzymeSetup.js.map +1 -1
- package/react/hooks/useDashbar.js +10 -0
- package/react/hooks/useDashbar.js.map +1 -1
- package/react/hooks/useDeepEffect.d.ts +4 -0
- package/react/hooks/useDeepEffect.js +21 -0
- package/react/hooks/useDeepEffect.js.map +1 -1
- package/react/hooks/useFavorites.d.ts +15 -0
- package/react/hooks/useFavorites.js +3 -0
- package/react/hooks/useFavorites.js.map +1 -1
- package/react/hooks/useFavoritesShell.d.ts +4 -0
- package/react/hooks/useFavoritesShell.js +23 -0
- package/react/hooks/useFavoritesShell.js.map +1 -1
- package/react/hooks/useHotkey.d.ts +6 -0
- package/react/hooks/useHotkey.js +9 -0
- package/react/hooks/useHotkey.js.map +1 -1
- package/react/hooks/useLinker.js +14 -0
- package/react/hooks/useLinker.js.map +1 -1
- package/react/hooks/useMenu.d.ts +29 -0
- package/react/hooks/useMenu.js +12 -1
- package/react/hooks/useMenu.js.map +1 -1
- package/react/hooks/useNotifications.d.ts +44 -0
- package/react/hooks/useNotifications.js +90 -0
- package/react/hooks/useNotifications.js.map +1 -1
- package/react/hooks/useOutsideClickDetector.d.ts +3 -0
- package/react/hooks/useOutsideClickDetector.js +3 -0
- package/react/hooks/useOutsideClickDetector.js.map +1 -1
- package/react/hooks/usePubSub.d.ts +17 -0
- package/react/hooks/usePubSub.js +18 -0
- package/react/hooks/usePubSub.js.map +1 -1
- package/react/hooks/useSearch.d.ts +5 -0
- package/react/hooks/useSearch.js +30 -0
- package/react/hooks/useSearch.js.map +1 -1
- package/react/hooks/useToolbar.js +52 -0
- package/react/hooks/useToolbar.js.map +1 -1
- package/react/reducers/favoriteReducer.d.ts +3 -0
- package/react/reducers/linkerReducer.d.ts +3 -0
- package/react/reducers/linkerReducer.js +4 -0
- package/react/reducers/linkerReducer.js.map +1 -1
- package/react/reducers/menuReducer.d.ts +28 -0
- package/react/reducers/menuReducer.js +34 -0
- package/react/reducers/menuReducer.js.map +1 -1
- package/react/reducers/rootReducer.js +3 -0
- package/react/reducers/rootReducer.js.map +1 -1
- package/react/reducers/searchReducer.d.ts +7 -0
- package/react/reducers/searchReducer.js +6 -0
- package/react/reducers/searchReducer.js.map +1 -1
- package/react/reducers/workspaceReducer.js +1 -0
- package/react/reducers/workspaceReducer.js.map +1 -1
- package/react/store.d.ts +4 -0
- package/react/store.js +11 -0
- package/react/store.js.map +1 -1
- package/react/tsconfig.tsbuildinfo +1 -1
- package/react/types/fdc3.d.ts +2 -0
- package/react/types/linkerTypes.d.ts +13 -0
- package/react/types/linkerTypes.js +1 -0
- package/react/types/linkerTypes.js.map +1 -1
- package/react/types/smartDesktopDesignerTypes.d.ts +5 -0
- package/react/types/smartDesktopDesignerTypes.js.map +1 -1
- package/react/types/workspaceTypes.d.ts +8 -0
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
const { useState, useEffect } = React;
|
|
3
|
+
/**
|
|
4
|
+
* Animate the child component
|
|
5
|
+
* props have default values attached in the component
|
|
6
|
+
* @param props
|
|
7
|
+
*/
|
|
3
8
|
export default function Animate(props) {
|
|
9
|
+
// provide some defaults to ensure it still works even though it is blank
|
|
4
10
|
const { animateIn, animateOut, displayDuration, animateOutComplete = () => {
|
|
5
11
|
("");
|
|
6
12
|
}, } = props;
|
|
@@ -12,11 +18,16 @@ export default function Animate(props) {
|
|
|
12
18
|
animateOut && setCSS(animateOut);
|
|
13
19
|
}, displayDuration);
|
|
14
20
|
}
|
|
21
|
+
// this will clear Timeout when component unmount like in willComponentUnmount
|
|
15
22
|
return () => {
|
|
16
23
|
timer1 && clearTimeout(timer1);
|
|
17
24
|
animateOut && setCSS(animateOut);
|
|
18
25
|
};
|
|
19
|
-
}, [animateOut, displayDuration, props.displayDuration]
|
|
26
|
+
}, [animateOut, displayDuration, props.displayDuration]
|
|
27
|
+
// eslint-disable-line
|
|
28
|
+
//useEffect will run only one time
|
|
29
|
+
//if you pass a value to array, like this [data] than clearTimeout will run every time this value changes (useEffect re-run)
|
|
30
|
+
);
|
|
20
31
|
const hideChildElement = () => {
|
|
21
32
|
css === animateOut && animateOutComplete();
|
|
22
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Animate.js","sourceRoot":"","sources":["../../../src/components/shared/Animate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"Animate.js","sourceRoot":"","sources":["../../../src/components/shared/Animate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;AAStC;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAY;IAC3C,yEAAyE;IACzE,MAAM,EACL,SAAS,EACT,UAAU,EACV,eAAe,EACf,kBAAkB,GAAG,GAAG,EAAE;QACzB,CAAC,EAAE,CAAC,CAAC;IACN,CAAC,GACD,GAAG,KAAK,CAAC;IACV,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,QAAQ,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC;IAEhD,SAAS,CACR,GAAG,EAAE;QACJ,IAAI,MAAM,GAA0B,IAAI,CAAC;QACzC,IAAI,KAAK,CAAC,eAAe,EAAE;YAC1B,MAAM,GAAG,UAAU,CAAC,GAAG,EAAE;gBACxB,UAAU,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC;YAClC,CAAC,EAAE,eAAe,CAAC,CAAC;SACpB;QAED,8EAA8E;QAC9E,OAAO,GAAG,EAAE;YACX,MAAM,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;YAC/B,UAAU,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC;QAClC,CAAC,CAAC;IACH,CAAC,EACD,CAAC,UAAU,EAAE,eAAe,EAAE,KAAK,CAAC,eAAe,CAAC;IACpD,sBAAsB;IACtB,kCAAkC;IAClC,4HAA4H;KAC5H,CAAC;IAEF,MAAM,gBAAgB,GAAG,GAAG,EAAE;QAC7B,GAAG,KAAK,UAAU,IAAI,kBAAkB,EAAE,CAAC;IAC5C,CAAC,CAAC;IAEF,OAAO,CACN,6BAAK,SAAS,EAAE,GAAG,EAAE,cAAc,EAAE,gBAAgB,IACnD,KAAK,CAAC,QAAQ,CACV,CACN,CAAC;AACH,CAAC","sourcesContent":["import * as React from \"react\";\nconst { useState, useEffect } = React;\n\ninterface Props {\n\tchildren?: React.PropsWithChildren<any>;\n\tdisplayDuration?: number;\n\tanimateIn?: string;\n\tanimateOut?: string;\n\tanimateOutComplete?: Function;\n}\n/**\n * Animate the child component\n * props have default values attached in the component\n * @param props\n */\nexport default function Animate(props: Props) {\n\t// provide some defaults to ensure it still works even though it is blank\n\tconst {\n\t\tanimateIn,\n\t\tanimateOut,\n\t\tdisplayDuration,\n\t\tanimateOutComplete = () => {\n\t\t\t(\"\");\n\t\t},\n\t} = props;\n\tconst [css, setCSS] = useState(animateIn || \"\");\n\n\tuseEffect(\n\t\t() => {\n\t\t\tlet timer1: null | NodeJS.Timeout = null;\n\t\t\tif (props.displayDuration) {\n\t\t\t\ttimer1 = setTimeout(() => {\n\t\t\t\t\tanimateOut && setCSS(animateOut);\n\t\t\t\t}, displayDuration);\n\t\t\t}\n\n\t\t\t// this will clear Timeout when component unmount like in willComponentUnmount\n\t\t\treturn () => {\n\t\t\t\ttimer1 && clearTimeout(timer1);\n\t\t\t\tanimateOut && setCSS(animateOut);\n\t\t\t};\n\t\t},\n\t\t[animateOut, displayDuration, props.displayDuration]\n\t\t// eslint-disable-line\n\t\t//useEffect will run only one time\n\t\t//if you pass a value to array, like this [data] than clearTimeout will run every time this value changes (useEffect re-run)\n\t);\n\n\tconst hideChildElement = () => {\n\t\tcss === animateOut && animateOutComplete();\n\t};\n\n\treturn (\n\t\t<div className={css} onAnimationEnd={hideChildElement}>\n\t\t\t{props.children}\n\t\t</div>\n\t);\n}\n"]}
|
|
@@ -60,25 +60,32 @@ const DefaultDropdownButton = ({ allowEmpty = true, caretLocation = "left", clas
|
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
62
|
if (optionsVisible) {
|
|
63
|
+
// Keyboard navigation for the expanded combobox options
|
|
63
64
|
if (e.key === "Enter" || e.key === " ") {
|
|
65
|
+
// Activate the selected option (equiv: click the hovered option)
|
|
64
66
|
selectOptionByIndex(focusIndex);
|
|
65
67
|
}
|
|
66
68
|
else if (e.key === "ArrowDown") {
|
|
69
|
+
// Select next option down (equiv: hover over the next option down)
|
|
67
70
|
setFocusIndex(focusIndex + 1 >= buttonOptions.length ? buttonOptions.length - 1 : focusIndex + 1);
|
|
68
71
|
e.preventDefault();
|
|
69
72
|
}
|
|
70
73
|
else if (e.key === "ArrowUp") {
|
|
74
|
+
// Select next option up (equiv: hover over the next option up)
|
|
71
75
|
setFocusIndex(focusIndex - 1 <= 0 ? 0 : focusIndex - 1);
|
|
72
76
|
e.preventDefault();
|
|
73
77
|
}
|
|
74
78
|
else if (e.key === "Escape") {
|
|
79
|
+
// Without activating anything, close the options. (equiv: clicking away)
|
|
75
80
|
toggleOptionsPanel(false);
|
|
76
81
|
setFocusIndex(0);
|
|
77
82
|
e.preventDefault();
|
|
78
83
|
}
|
|
79
84
|
}
|
|
80
85
|
else {
|
|
86
|
+
// Keyboard navigation for a collapsed combobox
|
|
81
87
|
if (e.key === "Enter" || e.key === " ") {
|
|
88
|
+
// Expand the combobox
|
|
82
89
|
toggleOptionsPanel(!optionsVisible);
|
|
83
90
|
setFocusIndex(0);
|
|
84
91
|
e.preventDefault();
|
|
@@ -88,11 +95,13 @@ const DefaultDropdownButton = ({ allowEmpty = true, caretLocation = "left", clas
|
|
|
88
95
|
toggleOptionsPanel(!optionsVisible);
|
|
89
96
|
}
|
|
90
97
|
else {
|
|
98
|
+
// Cycle between options (down)
|
|
91
99
|
changeOptionByDirection("down");
|
|
92
100
|
}
|
|
93
101
|
e.preventDefault();
|
|
94
102
|
}
|
|
95
103
|
else if (e.key === "ArrowUp") {
|
|
104
|
+
// Cycle between options (up)
|
|
96
105
|
e.preventDefault();
|
|
97
106
|
changeOptionByDirection("up");
|
|
98
107
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultDropdownButton.js","sourceRoot":"","sources":["../../../src/components/shared/DefaultDropdownButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAkB9E,MAAM,WAAW,GAAgD;IAChE,WAAW,EAAE,iBAAiB;IAC9B,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC;CACtB,CAAC;AAEF,MAAM,qBAAqB,GAAkE,CAAC,EAC7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C5D,CACH;QACA,cAAc,CAAC,CAAC,CAAC,CACjB,6BAAK,EAAE,EAAE,oBAAoB,QAAQ,EAAE,EAAE,SAAS,EAAC,iCAAiC,IAClF,OAAO,CACH,CACN,CAAC,CAAC,CAAC,IAAI,CACH,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC","sourcesContent":["import React, { useEffect, useMemo, useRef, useState } from \"react\";\nimport \"../../assets/css/button.css\";\nimport { useOutsideClickDetector } from \"../../hooks/useOutsideClickDetector\";\n\nexport interface IFinsembleDefaultDropdownButtonOptionsProps {\n\toptionLabel: string;\n\toptionValue?: any;\n\tclickHandler: Function;\n}\n\nexport interface IFinsembleDefaultDropdownButtonProps {\n\tallowEmpty?: boolean;\n\tbuttonLabel?: string;\n\tcaretLocation?: \"left\" | \"right\";\n\tclassNames?: string;\n\tbuttonOptions: Array<IFinsembleDefaultDropdownButtonOptionsProps>;\n\tdefaultSelection?: IFinsembleDefaultDropdownButtonOptionsProps | null;\n\tenabled?: boolean;\n}\n\nconst emptyOption: IFinsembleDefaultDropdownButtonOptionsProps = {\n\toptionLabel: \"Please select..\",\n\tclickHandler: () => {},\n};\n\nconst DefaultDropdownButton: React.FunctionComponent<IFinsembleDefaultDropdownButtonProps> = ({\n\tallowEmpty = true,\n\tcaretLocation = \"left\",\n\tclassNames = \"\",\n\tbuttonOptions = [],\n\tdefaultSelection = null,\n\tenabled = true,\n\tbuttonLabel = \"Select value\",\n}: IFinsembleDefaultDropdownButtonProps) => {\n\tconst wrapperRef = useRef<HTMLDivElement>(null);\n\tconst uniqueId = useMemo(() => Math.random(), []);\n\tconst [optionsVisible, toggleOptionsPanel] = useState(false);\n\tconst [focusIndex, setFocusIndex] = useState(-1);\n\tuseOutsideClickDetector(wrapperRef, () => toggleOptionsPanel(false));\n\n\tconst [selectedValue, setSelectedValue] = useState<IFinsembleDefaultDropdownButtonOptionsProps | null>(\n\t\tdefaultSelection\n\t);\n\n\tuseEffect(() => {\n\t\tif (defaultSelection) {\n\t\t\tsetSelectedValue(defaultSelection);\n\t\t} else {\n\t\t\tif (allowEmpty) {\n\t\t\t\tif (!buttonOptions.includes(emptyOption)) buttonOptions.unshift(emptyOption);\n\t\t\t\tsetSelectedValue(emptyOption);\n\t\t\t} else {\n\t\t\t\tsetSelectedValue(buttonOptions[0]);\n\t\t\t}\n\t\t}\n\t}, [defaultSelection]);\n\n\tconst selectOptionByIndex = (index: number) => {\n\t\tsetSelectedValue(buttonOptions[index]);\n\t\tif (\"clickHandler\" in buttonOptions[index]) {\n\t\t\tbuttonOptions[index].clickHandler();\n\t\t}\n\t\ttoggleOptionsPanel(false);\n\t};\n\n\tconst changeOptionByDirection = (direction: \"up\" | \"down\") => {\n\t\tif (!selectedValue) {\n\t\t\tif (direction === \"down\") {\n\t\t\t\tselectOptionByIndex(0);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst optionLabels = buttonOptions.map((opt) => opt.optionLabel);\n\t\tconst currentOptionIndex = optionLabels.indexOf(selectedValue.optionLabel);\n\n\t\tif (direction === \"up\") {\n\t\t\tconst newIndex = currentOptionIndex - 1;\n\t\t\tselectOptionByIndex(Math.max(0, newIndex));\n\t\t} else {\n\t\t\tconst newIndex = currentOptionIndex + 1;\n\t\t\tselectOptionByIndex(Math.min(newIndex, buttonOptions.length - 1));\n\t\t}\n\t};\n\n\tconst options = buttonOptions.map((option, index) => (\n\t\t<div\n\t\t\tkey={index}\n\t\t\ttabIndex={0}\n\t\t\tclassName=\"finsemble-dropdown__btn-option\"\n\t\t\tonClick={() => {\n\t\t\t\tselectOptionByIndex(index);\n\t\t\t}}\n\t\t\trole=\"option\"\n\t\t\taria-selected={focusIndex === index}\n\t\t>\n\t\t\t{option.optionLabel}\n\t\t</div>\n\t));\n\n\treturn (\n\t\t<div\n\t\t\ttabIndex={enabled ? 0 : -1}\n\t\t\tref={wrapperRef}\n\t\t\trole=\"combobox\"\n\t\t\taria-haspopup={optionsVisible}\n\t\t\taria-expanded={optionsVisible}\n\t\t\taria-owns={`default-dropdown_${uniqueId}`}\n\t\t\taria-label={buttonLabel}\n\t\t\tclassName={`finsemble-dropdown__btn ${classNames} ${optionsVisible ? \"active\" : \"\"}`}\n\t\t\tonClick={enabled ? () => toggleOptionsPanel(!optionsVisible) : () => {}}\n\t\t\tonKeyDown={(e) => {\n\t\t\t\tif (!enabled) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (optionsVisible) {\n\t\t\t\t\t// Keyboard navigation for the expanded combobox options\n\t\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\t\t\t\t\t// Activate the selected option (equiv: click the hovered option)\n\t\t\t\t\t\tselectOptionByIndex(focusIndex);\n\t\t\t\t\t} else if (e.key === \"ArrowDown\") {\n\t\t\t\t\t\t// Select next option down (equiv: hover over the next option down)\n\t\t\t\t\t\tsetFocusIndex(focusIndex + 1 >= buttonOptions.length ? buttonOptions.length - 1 : focusIndex + 1);\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t} else if (e.key === \"ArrowUp\") {\n\t\t\t\t\t\t// Select next option up (equiv: hover over the next option up)\n\t\t\t\t\t\tsetFocusIndex(focusIndex - 1 <= 0 ? 0 : focusIndex - 1);\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t} else if (e.key === \"Escape\") {\n\t\t\t\t\t\t// Without activating anything, close the options. (equiv: clicking away)\n\t\t\t\t\t\ttoggleOptionsPanel(false);\n\t\t\t\t\t\tsetFocusIndex(0);\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Keyboard navigation for a collapsed combobox\n\t\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\t\t\t\t\t// Expand the combobox\n\t\t\t\t\t\ttoggleOptionsPanel(!optionsVisible);\n\t\t\t\t\t\tsetFocusIndex(0);\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t} else if (e.key === \"ArrowDown\") {\n\t\t\t\t\t\tif (e.altKey) {\n\t\t\t\t\t\t\ttoggleOptionsPanel(!optionsVisible);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Cycle between options (down)\n\t\t\t\t\t\t\tchangeOptionByDirection(\"down\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t} else if (e.key === \"ArrowUp\") {\n\t\t\t\t\t\t// Cycle between options (up)\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tchangeOptionByDirection(\"up\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t{caretLocation === \"left\" ? (\n\t\t\t\t<>\n\t\t\t\t\t<i className={`ff-caret-${optionsVisible ? \"up\" : \"down\"}`} />\n\t\t\t\t\t<span className=\"finsemble-dropdown__btn-label\">\n\t\t\t\t\t\t{selectedValue ? selectedValue.optionLabel : emptyOption.optionLabel}\n\t\t\t\t\t</span>\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<span className=\"finsemble-dropdown__btn-label\">\n\t\t\t\t\t\t{selectedValue ? selectedValue.optionLabel : emptyOption.optionLabel}\n\t\t\t\t\t</span>\n\t\t\t\t\t<i className={`ff-caret-${optionsVisible ? \"up\" : \"down\"}`} />\n\t\t\t\t</>\n\t\t\t)}\n\t\t\t{optionsVisible ? (\n\t\t\t\t<div id={`default-dropdown_${uniqueId}`} className=\"finsemble-dropdown__btn-options\">\n\t\t\t\t\t{options}\n\t\t\t\t</div>\n\t\t\t) : null}\n\t\t</div>\n\t);\n};\n\nexport default DefaultDropdownButton;\n"]}
|
|
1
|
+
{"version":3,"file":"DefaultDropdownButton.js","sourceRoot":"","sources":["../../../src/components/shared/DefaultDropdownButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,6BAA6B,CAAC;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Aa,CAAC,CAAC,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,WAAW,CAC9D,CACL,CACH,CAAC,CAAC,CAAC,CACH;YACC,8BAAM,SAAS,EAAC,+BAA+B,IAC7C,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,WAAW,CAC9D;YACP,2BAAG,SAAS,EAAE,YAAY,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,GAAI,CAC5D,CACH;QACA,cAAc,CAAC,CAAC,CAAC,CACjB,6BAAK,EAAE,EAAE,oBAAoB,QAAQ,EAAE,EAAE,SAAS,EAAC,iCAAiC,IAClF,OAAO,CACH,CACN,CAAC,CAAC,CAAC,IAAI,CACH,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC","sourcesContent":["import React, { useEffect, useMemo, useRef, useState } from \"react\";\nimport \"../../assets/css/button.css\";\nimport { useOutsideClickDetector } from \"../../hooks/useOutsideClickDetector\";\n\nexport interface IFinsembleDefaultDropdownButtonOptionsProps {\n\toptionLabel: string;\n\toptionValue?: any;\n\tclickHandler: Function;\n}\n\nexport interface IFinsembleDefaultDropdownButtonProps {\n\tallowEmpty?: boolean;\n\tbuttonLabel?: string;\n\tcaretLocation?: \"left\" | \"right\";\n\tclassNames?: string;\n\tbuttonOptions: Array<IFinsembleDefaultDropdownButtonOptionsProps>;\n\tdefaultSelection?: IFinsembleDefaultDropdownButtonOptionsProps | null;\n\tenabled?: boolean;\n}\n\nconst emptyOption: IFinsembleDefaultDropdownButtonOptionsProps = {\n\toptionLabel: \"Please select..\",\n\tclickHandler: () => {},\n};\n\nconst DefaultDropdownButton: React.FunctionComponent<IFinsembleDefaultDropdownButtonProps> = ({\n\tallowEmpty = true,\n\tcaretLocation = \"left\",\n\tclassNames = \"\",\n\tbuttonOptions = [],\n\tdefaultSelection = null,\n\tenabled = true,\n\tbuttonLabel = \"Select value\",\n}: IFinsembleDefaultDropdownButtonProps) => {\n\tconst wrapperRef = useRef<HTMLDivElement>(null);\n\tconst uniqueId = useMemo(() => Math.random(), []);\n\tconst [optionsVisible, toggleOptionsPanel] = useState(false);\n\tconst [focusIndex, setFocusIndex] = useState(-1);\n\tuseOutsideClickDetector(wrapperRef, () => toggleOptionsPanel(false));\n\n\tconst [selectedValue, setSelectedValue] = useState<IFinsembleDefaultDropdownButtonOptionsProps | null>(\n\t\tdefaultSelection\n\t);\n\n\tuseEffect(() => {\n\t\tif (defaultSelection) {\n\t\t\tsetSelectedValue(defaultSelection);\n\t\t} else {\n\t\t\tif (allowEmpty) {\n\t\t\t\tif (!buttonOptions.includes(emptyOption)) buttonOptions.unshift(emptyOption);\n\t\t\t\tsetSelectedValue(emptyOption);\n\t\t\t} else {\n\t\t\t\tsetSelectedValue(buttonOptions[0]);\n\t\t\t}\n\t\t}\n\t}, [defaultSelection]);\n\n\tconst selectOptionByIndex = (index: number) => {\n\t\tsetSelectedValue(buttonOptions[index]);\n\t\tif (\"clickHandler\" in buttonOptions[index]) {\n\t\t\tbuttonOptions[index].clickHandler();\n\t\t}\n\t\ttoggleOptionsPanel(false);\n\t};\n\n\tconst changeOptionByDirection = (direction: \"up\" | \"down\") => {\n\t\tif (!selectedValue) {\n\t\t\tif (direction === \"down\") {\n\t\t\t\tselectOptionByIndex(0);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst optionLabels = buttonOptions.map((opt) => opt.optionLabel);\n\t\tconst currentOptionIndex = optionLabels.indexOf(selectedValue.optionLabel);\n\n\t\tif (direction === \"up\") {\n\t\t\tconst newIndex = currentOptionIndex - 1;\n\t\t\tselectOptionByIndex(Math.max(0, newIndex));\n\t\t} else {\n\t\t\tconst newIndex = currentOptionIndex + 1;\n\t\t\tselectOptionByIndex(Math.min(newIndex, buttonOptions.length - 1));\n\t\t}\n\t};\n\n\tconst options = buttonOptions.map((option, index) => (\n\t\t<div\n\t\t\tkey={index}\n\t\t\ttabIndex={0}\n\t\t\tclassName=\"finsemble-dropdown__btn-option\"\n\t\t\tonClick={() => {\n\t\t\t\tselectOptionByIndex(index);\n\t\t\t}}\n\t\t\trole=\"option\"\n\t\t\taria-selected={focusIndex === index}\n\t\t>\n\t\t\t{option.optionLabel}\n\t\t</div>\n\t));\n\n\treturn (\n\t\t<div\n\t\t\ttabIndex={enabled ? 0 : -1}\n\t\t\tref={wrapperRef}\n\t\t\trole=\"combobox\"\n\t\t\taria-haspopup={optionsVisible}\n\t\t\taria-expanded={optionsVisible}\n\t\t\taria-owns={`default-dropdown_${uniqueId}`}\n\t\t\taria-label={buttonLabel}\n\t\t\tclassName={`finsemble-dropdown__btn ${classNames} ${optionsVisible ? \"active\" : \"\"}`}\n\t\t\tonClick={enabled ? () => toggleOptionsPanel(!optionsVisible) : () => {}}\n\t\t\tonKeyDown={(e) => {\n\t\t\t\tif (!enabled) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (optionsVisible) {\n\t\t\t\t\t// Keyboard navigation for the expanded combobox options\n\t\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\t\t\t\t\t// Activate the selected option (equiv: click the hovered option)\n\t\t\t\t\t\tselectOptionByIndex(focusIndex);\n\t\t\t\t\t} else if (e.key === \"ArrowDown\") {\n\t\t\t\t\t\t// Select next option down (equiv: hover over the next option down)\n\t\t\t\t\t\tsetFocusIndex(focusIndex + 1 >= buttonOptions.length ? buttonOptions.length - 1 : focusIndex + 1);\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t} else if (e.key === \"ArrowUp\") {\n\t\t\t\t\t\t// Select next option up (equiv: hover over the next option up)\n\t\t\t\t\t\tsetFocusIndex(focusIndex - 1 <= 0 ? 0 : focusIndex - 1);\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t} else if (e.key === \"Escape\") {\n\t\t\t\t\t\t// Without activating anything, close the options. (equiv: clicking away)\n\t\t\t\t\t\ttoggleOptionsPanel(false);\n\t\t\t\t\t\tsetFocusIndex(0);\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Keyboard navigation for a collapsed combobox\n\t\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\t\t\t\t\t// Expand the combobox\n\t\t\t\t\t\ttoggleOptionsPanel(!optionsVisible);\n\t\t\t\t\t\tsetFocusIndex(0);\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t} else if (e.key === \"ArrowDown\") {\n\t\t\t\t\t\tif (e.altKey) {\n\t\t\t\t\t\t\ttoggleOptionsPanel(!optionsVisible);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Cycle between options (down)\n\t\t\t\t\t\t\tchangeOptionByDirection(\"down\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t} else if (e.key === \"ArrowUp\") {\n\t\t\t\t\t\t// Cycle between options (up)\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tchangeOptionByDirection(\"up\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t{caretLocation === \"left\" ? (\n\t\t\t\t<>\n\t\t\t\t\t<i className={`ff-caret-${optionsVisible ? \"up\" : \"down\"}`} />\n\t\t\t\t\t<span className=\"finsemble-dropdown__btn-label\">\n\t\t\t\t\t\t{selectedValue ? selectedValue.optionLabel : emptyOption.optionLabel}\n\t\t\t\t\t</span>\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<span className=\"finsemble-dropdown__btn-label\">\n\t\t\t\t\t\t{selectedValue ? selectedValue.optionLabel : emptyOption.optionLabel}\n\t\t\t\t\t</span>\n\t\t\t\t\t<i className={`ff-caret-${optionsVisible ? \"up\" : \"down\"}`} />\n\t\t\t\t</>\n\t\t\t)}\n\t\t\t{optionsVisible ? (\n\t\t\t\t<div id={`default-dropdown_${uniqueId}`} className=\"finsemble-dropdown__btn-options\">\n\t\t\t\t\t{options}\n\t\t\t\t</div>\n\t\t\t) : null}\n\t\t</div>\n\t);\n};\n\nexport default DefaultDropdownButton;\n"]}
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
* Copyright 2017 by ChartIQ, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*/
|
|
5
|
+
/**
|
|
6
|
+
* This component is the name of a component and a pin that will pin that component to all toolbars.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
5
9
|
import React from "react";
|
|
6
10
|
import { getTruncatedStringWithEllipses } from "../appCatalog/components/helpers";
|
|
7
11
|
import "../../assets/css/tags.css";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.js","sourceRoot":"","sources":["../../../src/components/shared/Tag.tsx"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"Tag.js","sourceRoot":"","sources":["../../../src/components/shared/Tag.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH;;;GAGG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAElF,OAAO,2BAA2B,CAAC;AAOnC,MAAM,GAAG,GAAG,CAAC,KAAe,EAAE,EAAE;IAC/B,MAAM,MAAM,GAAG,GAAG,EAAE;QACnB,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC,CAAC;IAEF,OAAO,CACN,6BAAK,SAAS,EAAC,SAAS;QACvB,6BAAK,SAAS,EAAC,aAAa;YAC3B,6BAAK,SAAS,EAAC,UAAU,EAAC,KAAK,EAAE,KAAK,CAAC,IAAI,IACzC,8BAA8B,CAAC,KAAK,CAAC,IAAI,CAAC,CACtC;;YAEN,2BAAG,SAAS,EAAC,qBAAqB,EAAC,OAAO,EAAE,MAAM,GAAM,CACnD,CACD,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,GAAG,CAAC","sourcesContent":["/*!\n * Copyright 2017 by ChartIQ, Inc.\n * All rights reserved.\n */\n/**\n * This component is the name of a component and a pin that will pin that component to all toolbars.\n *\n */\nimport React from \"react\";\n\nimport { getTruncatedStringWithEllipses } from \"../appCatalog/components/helpers\";\n\nimport \"../../assets/css/tags.css\";\n\ntype TagProps = {\n\tname: string;\n\tremoveTag: (tagName: string) => void;\n};\n\nconst Tag = (props: TagProps) => {\n\tconst remove = () => {\n\t\tprops.removeTag(props.name);\n\t};\n\n\treturn (\n\t\t<div className=\"app-tag\">\n\t\t\t<div className=\"tag-content\">\n\t\t\t\t<div className=\"tag-name\" title={props.name}>\n\t\t\t\t\t{getTruncatedStringWithEllipses(props.name)}\n\t\t\t\t</div>\n\t\t\t\t \n\t\t\t\t<i className=\"ff-close tag-delete\" onClick={remove}></i>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default Tag;\n"]}
|
|
@@ -15,6 +15,12 @@ interface IProps {
|
|
|
15
15
|
interface IState {
|
|
16
16
|
isVisible: boolean;
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* A reusable fly out component for tags and any other lists
|
|
20
|
+
* This component creates a button with a customizable label
|
|
21
|
+
* and an item click handler.
|
|
22
|
+
* Example: <TagsMenu label="Tags" align="left" list={list} onItemClick={handler}/>
|
|
23
|
+
**/
|
|
18
24
|
export default class TagsMenu extends React.Component<IProps, IState> {
|
|
19
25
|
wrapperRef: any;
|
|
20
26
|
constructor(props: IProps);
|
|
@@ -5,12 +5,19 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import React from "react";
|
|
7
7
|
import "../../assets/css/tags.css";
|
|
8
|
+
/**
|
|
9
|
+
* A reusable fly out component for tags and any other lists
|
|
10
|
+
* This component creates a button with a customizable label
|
|
11
|
+
* and an item click handler.
|
|
12
|
+
* Example: <TagsMenu label="Tags" align="left" list={list} onItemClick={handler}/>
|
|
13
|
+
**/
|
|
8
14
|
export default class TagsMenu extends React.Component {
|
|
9
15
|
constructor(props) {
|
|
10
16
|
super(props);
|
|
11
17
|
this.state = {
|
|
12
18
|
isVisible: false,
|
|
13
19
|
};
|
|
20
|
+
// Bind context
|
|
14
21
|
this.toggleMenu = this.toggleMenu.bind(this);
|
|
15
22
|
this.onItemClick = this.onItemClick.bind(this);
|
|
16
23
|
this.setWrapperRef = this.setWrapperRef.bind(this);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagsMenu.js","sourceRoot":"","sources":["../../../src/components/shared/TagsMenu.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"TagsMenu.js","sourceRoot":"","sources":["../../../src/components/shared/TagsMenu.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,2BAA2B,CAAC;AAanC;;;;;IAKI;AACJ,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,KAAK,CAAC,SAAyB;IAGpE,YAAY,KAAa;QACxB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,SAAS,EAAE,KAAK;SAChB,CAAC;QACF,eAAe;QACf,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/C,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnD,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9D,CAAC;IAED,iBAAiB;QAChB,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CA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C;oBAE9C,OAAO,CACN,4BAAI,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;wBACnD,MAAM,CAAC,CAAC,CAAC,2BAAG,SAAS,EAAC,eAAe,GAAG,CAAC,CAAC,CAAC,6BAAK,SAAS,EAAC,wBAAwB,aAAa;;wBACnF,IAAI,CACb,CACL,CAAC;gBACH,CAAC,CAAC;gBAAE,GAAG,CACH,CACA,CACN,CAAC;IACH,CAAC;IAED,MAAM;QACL,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,gCAAW,CAAC;QACrD,OAAO,CACN,6BAAK,GAAG,EAAE,IAAI,CAAC,aAAa,EAAE,SAAS,EAAC,mBAAmB,EAAC,OAAO,EAAE,IAAI,CAAC,UAAU;YACnF;gBACE,IAAI,CAAC,KAAK,CAAC,KAAK;gBACjB,2BAAG,SAAS,EAAC,iBAAiB,GAAG,CAC3B;YACN,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,UAAU,EAAE,CACrC,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["/*!\n * Copyright 2018 by ChartIQ, Inc.\n * All rights reserved.\n *\n */\n\nimport React from \"react\";\n\nimport \"../../assets/css/tags.css\";\n\ninterface IProps {\n\tactive: string[]; // active tags\n\tlist: string[]; // list of tags\n\tonItemClick: (tag: string) => void;\n\tlabel: string;\n\talign: string;\n}\ninterface IState {\n\tisVisible: boolean;\n}\n\n/**\n * A reusable fly out component for tags and any other lists\n * This component creates a button with a customizable label\n * and an item click handler.\n * Example: <TagsMenu label=\"Tags\" align=\"left\" list={list} onItemClick={handler}/>\n **/\nexport default class TagsMenu extends React.Component<IProps, IState> {\n\twrapperRef: any;\n\n\tconstructor(props: IProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tisVisible: false,\n\t\t};\n\t\t// Bind context\n\t\tthis.toggleMenu = this.toggleMenu.bind(this);\n\t\tthis.onItemClick = this.onItemClick.bind(this);\n\t\tthis.setWrapperRef = this.setWrapperRef.bind(this);\n\t\tthis.handleClickOutside = this.handleClickOutside.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tdocument.addEventListener(\"mousedown\", this.handleClickOutside);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tdocument.removeEventListener(\"mousedown\", this.handleClickOutside);\n\t}\n\n\ttoggleMenu() {\n\t\tthis.setState({\n\t\t\tisVisible: !this.state.isVisible,\n\t\t});\n\t}\n\n\tonItemClick(item: string) {\n\t\tthis.setState({\n\t\t\tisVisible: false,\n\t\t});\n\t\tthis.props.onItemClick(item);\n\t}\n\n\tsetWrapperRef(node: any) {\n\t\tthis.wrapperRef = node;\n\t}\n\n\thandleClickOutside(e: MouseEvent) {\n\t\tif (this.wrapperRef && !this.wrapperRef.contains(e.target)) {\n\t\t\tthis.setState({\n\t\t\t\tisVisible: false,\n\t\t\t});\n\t\t}\n\t}\n\n\trenderList() {\n\t\tconst items = this.props.list;\n\t\tconst styles = this.props.align === \"right\" ? { right: 0 } : { left: 0 };\n\t\treturn (\n\t\t\t<div className=\"tags-menu\" style={styles}>\n\t\t\t\t<ul>\n\t\t\t\t\t{\" \"}\n\t\t\t\t\t{items.sort().map((item, index) => {\n\t\t\t\t\t\tlet active = this.props.active.includes(item);\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<li key={index} onClick={() => this.onItemClick(item)}>\n\t\t\t\t\t\t\t\t{active ? <i className=\"ff-check-mark\" /> : <div className=\"tags-checkmark-wrapper\"> </div>}\n\t\t\t\t\t\t\t\t {item}\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}{\" \"}\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t);\n\t}\n\n\trender() {\n\t\tif (this.props.list.length === 0) return <div></div>;\n\t\treturn (\n\t\t\t<div ref={this.setWrapperRef} className=\"tags-menu-wrapper\" onClick={this.toggleMenu}>\n\t\t\t\t<span>\n\t\t\t\t\t{this.props.label}\n\t\t\t\t\t<i className=\"ff-chevron-down\" />\n\t\t\t\t</span>\n\t\t\t\t{this.state.isVisible && this.renderList()}\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
|
|
@@ -1 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adds a protocol to a valid URL. booger.io is a valid URL,
|
|
3
|
+
* but if you try to create a new URL object with it, e.g.,
|
|
4
|
+
* `new URL("booger.io"), you'll get a javascript exception. No bueno.
|
|
5
|
+
* @param url
|
|
6
|
+
*/
|
|
1
7
|
export declare function addProtocolToValidURL(url: string): string;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adds a protocol to a valid URL. booger.io is a valid URL,
|
|
3
|
+
* but if you try to create a new URL object with it, e.g.,
|
|
4
|
+
* `new URL("booger.io"), you'll get a javascript exception. No bueno.
|
|
5
|
+
* @param url
|
|
6
|
+
*/
|
|
1
7
|
export function addProtocolToValidURL(url) {
|
|
2
8
|
if (url.includes("://"))
|
|
3
9
|
return url;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addProtocolToValidURL.js","sourceRoot":"","sources":["../../../src/components/shared/addProtocolToValidURL.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"addProtocolToValidURL.js","sourceRoot":"","sources":["../../../src/components/shared/addProtocolToValidURL.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAC,GAAW;IAChD,IAAI,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,GAAG,CAAC;IACpC,OAAO,GAAG,QAAQ,CAAC,QAAQ,KAAK,GAAG,EAAE,CAAC;AACvC,CAAC","sourcesContent":["/**\n * Adds a protocol to a valid URL. booger.io is a valid URL,\n * but if you try to create a new URL object with it, e.g.,\n * `new URL(\"booger.io\"), you'll get a javascript exception. No bueno.\n * @param url\n */\nexport function addProtocolToValidURL(url: string) {\n\tif (url.includes(\"://\")) return url;\n\treturn `${location.protocol}//${url}`;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const openQuitConfirmationDialog: () => Promise<void>;
|
|
1
|
+
export declare const openQuitConfirmationDialog: (type?: string) => Promise<void>;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export const openQuitConfirmationDialog = async () => {
|
|
1
|
+
export const openQuitConfirmationDialog = async (type = "Shutdown") => {
|
|
2
2
|
let { data: appname } = await FSBL.Clients.ConfigClient.getValue("startup_app.name");
|
|
3
3
|
if (!appname)
|
|
4
4
|
appname = "Finsemble";
|
|
5
5
|
FSBL.Clients.DialogManager.open("yesNo", {
|
|
6
|
-
title:
|
|
6
|
+
title: `${type} ${appname}?`,
|
|
7
7
|
monitor: "primary",
|
|
8
|
-
question: `Are you sure you want to close ${appname}?`,
|
|
8
|
+
question: `Are you sure you want to ${type === "Restart" ? "restart" : "close"} ${appname}?`,
|
|
9
9
|
hideModalOnClose: true,
|
|
10
10
|
showNegativeButton: false,
|
|
11
11
|
}, (err, response) => {
|
|
12
12
|
if (response && response.choice === "affirmative") {
|
|
13
|
-
FSBL.shutdownApplication();
|
|
13
|
+
type === "Restart" ? FSBL.restartApplication() : FSBL.shutdownApplication();
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openQuitConfirmationDialog.js","sourceRoot":"","sources":["../../../src/components/shared/openQuitConfirmationDialog.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,0BAA0B,GAAG,KAAK,
|
|
1
|
+
{"version":3,"file":"openQuitConfirmationDialog.js","sourceRoot":"","sources":["../../../src/components/shared/openQuitConfirmationDialog.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,0BAA0B,GAAG,KAAK,EAAE,OAAe,UAAU,EAAE,EAAE;IAC7E,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IACrF,IAAI,CAAC,OAAO;QAAE,OAAO,GAAG,WAAW,CAAC;IAEpC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAC9B,OAAO,EACP;QACC,KAAK,EAAE,GAAG,IAAI,IAAI,OAAO,GAAG;QAC5B,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,4BAA4B,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,IAAI,OAAO,GAAG;QAC5F,gBAAgB,EAAE,IAAI;QACtB,kBAAkB,EAAE,KAAK;KACzB,EACD,CAAC,GAAQ,EAAE,QAA4B,EAAE,EAAE;QAC1C,IAAI,QAAQ,IAAI,QAAQ,CAAC,MAAM,KAAK,aAAa,EAAE;YAClD,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,mBAAmB,EAAE,CAAC;SAC5E;IACF,CAAC,CACD,CAAC;AACH,CAAC,CAAC","sourcesContent":["export const openQuitConfirmationDialog = async (type: string = \"Shutdown\") => {\n\tlet { data: appname } = await FSBL.Clients.ConfigClient.getValue(\"startup_app.name\");\n\tif (!appname) appname = \"Finsemble\";\n\n\tFSBL.Clients.DialogManager.open(\n\t\t\"yesNo\",\n\t\t{\n\t\t\ttitle: `${type} ${appname}?`,\n\t\t\tmonitor: \"primary\",\n\t\t\tquestion: `Are you sure you want to ${type === \"Restart\" ? \"restart\" : \"close\"} ${appname}?`,\n\t\t\thideModalOnClose: true,\n\t\t\tshowNegativeButton: false,\n\t\t},\n\t\t(err: any, response: { choice: string }) => {\n\t\t\tif (response && response.choice === \"affirmative\") {\n\t\t\t\ttype === \"Restart\" ? FSBL.restartApplication() : FSBL.shutdownApplication();\n\t\t\t}\n\t\t}\n\t);\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addProtocolToValidURL.spec.js","sourceRoot":"","sources":["../../../../src/components/shared/tests/addProtocolToValidURL.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"addProtocolToValidURL.spec.js","sourceRoot":"","sources":["../../../../src/components/shared/tests/addProtocolToValidURL.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,gCAAgC;AAChC,MAAM,CAAC,QAAQ,GAAQ;IACtB,QAAQ,EAAE,OAAO;CACjB,CAAC;AAEF,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;IACtC,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;QAC7C,MAAM,CAAC,qBAAqB,CAAC,gBAAgB,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAC7F,MAAM,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,wDAAwD,EAAE,GAAG,EAAE;QACjE,MAAM,IAAI,GAAG,CAAC,uBAAuB,EAAE,mBAAmB,EAAE,mBAAmB,CAAC,CAAC;QACjF,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACpB,MAAM,CAAC,qBAAqB,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACvD,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport { addProtocolToValidURL } from \"../addProtocolToValidURL\";\n\n// Mock global variable location\nglobal.location = <any>{\n\tprotocol: \"http:\",\n};\n\ndescribe(\"addProtocolToValidURL\", () => {\n\tit(\"should add protocol when necessary\", () => {\n\t\texpect(addProtocolToValidURL(\"www.google.com\"), \"website\").to.equal(\"http://www.google.com\");\n\t\texpect(addProtocolToValidURL(\"blah\"), \"words\").to.equal(\"http://blah\");\n\t});\n\tit(\"should not add protocol to URLs that already have them\", () => {\n\t\tconst urls = [\"http://www.google.com\", \"https://cosaic.io\", \"file:///C:/Users/\"];\n\t\turls.forEach((url) => {\n\t\t\texpect(addProtocolToValidURL(url), url).to.equal(url);\n\t\t});\n\t});\n});\n"]}
|
|
@@ -1 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* URL validation regex taken from stack overflow: https://stackoverflow.com/questions/5717093/check-if-a-javascript-string-is-a-url
|
|
3
|
+
*
|
|
4
|
+
* "https://www.google.com" => valid
|
|
5
|
+
* "http://google.com" => valid
|
|
6
|
+
* "http://booger.io" => valid
|
|
7
|
+
* "http://intraneturl" => valid
|
|
8
|
+
* "http://localhost:3375/components/test/index.html" => valid
|
|
9
|
+
* "http://localhost:8089/SLEJSonServiceWeb/commonReact2.jsp?viewid=/lcm.houseacctprodlinexre.wrjs&swfversion=3_0&zone=CollateralManagement&functionName=Collateral%20Management&zoneLabel=Collateral%20Management#/?_k=f3xqnk" => valid
|
|
10
|
+
* "http://127.0.0.1:3375/components/test/index.html" => valid
|
|
11
|
+
* "http://127.0.01:3375/components/test/index.html" => not valid
|
|
12
|
+
* "www.google.com" => not valid
|
|
13
|
+
* "google.com" => not valid
|
|
14
|
+
* "booger.io" => not valid
|
|
15
|
+
* "boog" => not valid
|
|
16
|
+
* NOTE: This function will fail intranet URLs without a top level domain.
|
|
17
|
+
* @param str
|
|
18
|
+
*/
|
|
1
19
|
export declare function isValidURL(str: string): boolean;
|
|
@@ -1,11 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* URL validation regex taken from stack overflow: https://stackoverflow.com/questions/5717093/check-if-a-javascript-string-is-a-url
|
|
3
|
+
*
|
|
4
|
+
* "https://www.google.com" => valid
|
|
5
|
+
* "http://google.com" => valid
|
|
6
|
+
* "http://booger.io" => valid
|
|
7
|
+
* "http://intraneturl" => valid
|
|
8
|
+
* "http://localhost:3375/components/test/index.html" => valid
|
|
9
|
+
* "http://localhost:8089/SLEJSonServiceWeb/commonReact2.jsp?viewid=/lcm.houseacctprodlinexre.wrjs&swfversion=3_0&zone=CollateralManagement&functionName=Collateral%20Management&zoneLabel=Collateral%20Management#/?_k=f3xqnk" => valid
|
|
10
|
+
* "http://127.0.0.1:3375/components/test/index.html" => valid
|
|
11
|
+
* "http://127.0.01:3375/components/test/index.html" => not valid
|
|
12
|
+
* "www.google.com" => not valid
|
|
13
|
+
* "google.com" => not valid
|
|
14
|
+
* "booger.io" => not valid
|
|
15
|
+
* "boog" => not valid
|
|
16
|
+
* NOTE: This function will fail intranet URLs without a top level domain.
|
|
17
|
+
* @param str
|
|
18
|
+
*/
|
|
1
19
|
export function isValidURL(str) {
|
|
2
20
|
if (str === "about:blank")
|
|
3
21
|
return true;
|
|
4
|
-
var pattern = new RegExp("^(https?:\\/\\/)" +
|
|
5
|
-
"((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}|" +
|
|
6
|
-
"((\\d{1,3}\\.){3}\\d{1,3}))" +
|
|
7
|
-
"(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*" +
|
|
8
|
-
"(\\?)?([;&a-z\\d\\/#\\?%_.~+=-]*)?",
|
|
22
|
+
var pattern = new RegExp("^(https?:\\/\\/)" + // protocol
|
|
23
|
+
"((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}|" + // domain name
|
|
24
|
+
"((\\d{1,3}\\.){3}\\d{1,3}))" + // OR ip (v4) address
|
|
25
|
+
"(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*" + // port and path
|
|
26
|
+
"(\\?)?([;&a-z\\d\\/#\\?%_.~+=-]*)?", // query string
|
|
27
|
+
"i"); // fragment locator
|
|
9
28
|
return !!pattern.test(str);
|
|
10
29
|
}
|
|
11
30
|
//# sourceMappingURL=validateURL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateURL.js","sourceRoot":"","sources":["../../../src/components/shared/validateURL.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validateURL.js","sourceRoot":"","sources":["../../../src/components/shared/validateURL.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,UAAU,CAAC,GAAW;IACrC,IAAI,GAAG,KAAK,aAAa;QAAE,OAAO,IAAI,CAAC;IAEvC,IAAI,OAAO,GAAG,IAAI,MAAM,CACvB,kBAAkB,GAAG,WAAW;QAC/B,mDAAmD,GAAG,cAAc;QACpE,6BAA6B,GAAG,qBAAqB;QACrD,iCAAiC,GAAG,gBAAgB;QACpD,oCAAoC,EAAE,eAAe;IACtD,GAAG,CACH,CAAC,CAAC,mBAAmB;IACtB,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC5B,CAAC","sourcesContent":["/**\n * URL validation regex taken from stack overflow: https://stackoverflow.com/questions/5717093/check-if-a-javascript-string-is-a-url\n *\n * \"https://www.google.com\" => valid\n * \"http://google.com\" => valid\n * \"http://booger.io\" => valid\n * \"http://intraneturl\" => valid\n * \"http://localhost:3375/components/test/index.html\" => valid\n * \"http://localhost:8089/SLEJSonServiceWeb/commonReact2.jsp?viewid=/lcm.houseacctprodlinexre.wrjs&swfversion=3_0&zone=CollateralManagement&functionName=Collateral%20Management&zoneLabel=Collateral%20Management#/?_k=f3xqnk\" => valid\n * \"http://127.0.0.1:3375/components/test/index.html\" => valid\n * \"http://127.0.01:3375/components/test/index.html\" => not valid\n * \"www.google.com\" => not valid\n * \"google.com\" => not valid\n * \"booger.io\" => not valid\n * \"boog\" => not valid\n * NOTE: This function will fail intranet URLs without a top level domain.\n * @param str\n */\nexport function isValidURL(str: string) {\n\tif (str === \"about:blank\") return true;\n\n\tvar pattern = new RegExp(\n\t\t\"^(https?:\\\\/\\\\/)\" + // protocol\n\t\t\t\"((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.?)+[a-z]{2,}|\" + // domain name\n\t\t\t\"((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))\" + // OR ip (v4) address\n\t\t\t\"(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*\" + // port and path\n\t\t\t\"(\\\\?)?([;&a-z\\\\d\\\\/#\\\\?%_.~+=-]*)?\", // query string\n\t\t\"i\"\n\t); // fragment locator\n\treturn !!pattern.test(str);\n}\n"]}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2017 by ChartIQ, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*/
|
|
1
5
|
import React from "react";
|
|
2
6
|
import { FinsembleDialog } from "../legacyControls/FinsembleDialog";
|
|
3
7
|
import { FinsembleDialogTextInput } from "../legacyControls/FinsembleDialogTextInput";
|
|
@@ -5,12 +9,19 @@ import { FinsembleDialogButton } from "../legacyControls/FinsembleDialogButton";
|
|
|
5
9
|
import "./SingleInputDialog.css";
|
|
6
10
|
import "../../assets/css/finsemble.css";
|
|
7
11
|
import "../../assets/css/dialogs.css";
|
|
12
|
+
/**
|
|
13
|
+
* This is our standard input dialog. It gives the user a single button and a text field, and ferries that data back to the window that opened it.
|
|
14
|
+
*
|
|
15
|
+
* @class SingleInputDialog
|
|
16
|
+
* @extends {React.Component}
|
|
17
|
+
*/
|
|
8
18
|
class _SingleInputDialog extends React.Component {
|
|
9
19
|
constructor(props = {}) {
|
|
10
20
|
super(props);
|
|
11
21
|
this.bindCorrectContext();
|
|
12
22
|
this.state = {
|
|
13
23
|
affirmativeResponseLabel: "Yes",
|
|
24
|
+
/** Our input uses the HTML autoFocus attribute. This only fires when the element is rendered for the 1st time. Since we re-use the dialogs, the 2nd time the dialog is shown, autoFocus will not trigger. To force it to trigger, we change this boolean when a response is sent back to the opener, which unmounts the element from the dom. The next time the dialog is used, we will render the element again, and autoFocus will trigger. */
|
|
14
25
|
renderInput: false,
|
|
15
26
|
inputPlaceholder: "New workspace",
|
|
16
27
|
};
|
|
@@ -22,6 +33,12 @@ class _SingleInputDialog extends React.Component {
|
|
|
22
33
|
this.setInputValue = this.setInputValue.bind(this);
|
|
23
34
|
this.sendResponse = this.sendResponse.bind(this);
|
|
24
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Handles escape and enter.
|
|
38
|
+
*
|
|
39
|
+
* @param {any} e
|
|
40
|
+
* @memberof SingleInputDialog
|
|
41
|
+
*/
|
|
25
42
|
handleKeydownOnBody(e) {
|
|
26
43
|
if (e.code === "Enter" && e.shiftKey === false) {
|
|
27
44
|
this.sendResponse("affirmative");
|
|
@@ -30,6 +47,13 @@ class _SingleInputDialog extends React.Component {
|
|
|
30
47
|
this.sendResponse("cancel");
|
|
31
48
|
}
|
|
32
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* 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.
|
|
52
|
+
*
|
|
53
|
+
* @param {any} err
|
|
54
|
+
* @param {any} response
|
|
55
|
+
* @memberof SingleInputDialog
|
|
56
|
+
*/
|
|
33
57
|
onShowRequested(err, response) {
|
|
34
58
|
let { data } = response;
|
|
35
59
|
this.setState({
|
|
@@ -45,11 +69,22 @@ class _SingleInputDialog extends React.Component {
|
|
|
45
69
|
inputPlaceholder: data.inputPlaceholder || this.state.inputPlaceholder,
|
|
46
70
|
}, this.fitAndShow);
|
|
47
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* 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.
|
|
74
|
+
*
|
|
75
|
+
* @memberof SingleInputDialog
|
|
76
|
+
*/
|
|
48
77
|
fitAndShow() {
|
|
49
78
|
FSBL.Clients.WindowClient.fitToDOM(null, () => {
|
|
50
79
|
FSBL.Clients.DialogManager.showDialog();
|
|
51
80
|
});
|
|
52
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Sends user input to the opener.
|
|
84
|
+
*
|
|
85
|
+
* @param {any} response
|
|
86
|
+
* @memberof SingleInputDialog
|
|
87
|
+
*/
|
|
53
88
|
sendResponse(response) {
|
|
54
89
|
FSBL.Clients.DialogManager.respondToOpener({
|
|
55
90
|
value: this.state.inputValue,
|
|
@@ -62,6 +97,12 @@ class _SingleInputDialog extends React.Component {
|
|
|
62
97
|
});
|
|
63
98
|
Array.from(document.querySelectorAll("input")).forEach((el) => (el.value = ""));
|
|
64
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* onChange handler. When the user types, we keep the value up to date in the dialog's state.
|
|
102
|
+
*
|
|
103
|
+
* @param {any} e
|
|
104
|
+
* @memberof SingleInputDialog
|
|
105
|
+
*/
|
|
65
106
|
setInputValue(e) {
|
|
66
107
|
this.setState({
|
|
67
108
|
inputValue: e.target.value,
|
|
@@ -80,5 +121,8 @@ class _SingleInputDialog extends React.Component {
|
|
|
80
121
|
} }, this.state.affirmativeResponseLabel))));
|
|
81
122
|
}
|
|
82
123
|
}
|
|
124
|
+
/**
|
|
125
|
+
* A window for collecting input from a user (e.g., a new workspace's name).
|
|
126
|
+
*/
|
|
83
127
|
export const SingleInputDialog = () => React.createElement(_SingleInputDialog, null);
|
|
84
128
|
//# sourceMappingURL=SingleInputDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleInputDialog.js","sourceRoot":"","sources":["../../../src/components/singleInputDialog/SingleInputDialog.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,yBAAyB,CAAC;AACjC,OAAO,gCAAgC,CAAC;AACxC,OAAO,8BAA8B,CAAC;AAwBtC,MAAM,kBAAmB,SAAQ,KAAK,CAAC,SAAyB;IAC/D,YAAY,KAAK,GAAG,EAAE;QACrB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC1B,IAAI,CAAC,KAAK,GAAG;YACZ,wBAAwB,EAAE,KAAK;YAE/B,WAAW,EAAE,KAAK;YAClB,gBAAgB,EAAE,eAAe;SACjC,CAAC;QACF,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACrE,CAAC;IAED,kBAAkB;QACjB,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/D,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClD,CAAC;IAQD,mBAAmB,CAAC,CAAgB;QACnC,IAAI,CAAC,CAAC,IAAI,KAAK,OAAO,IAAI,CAAC,CAAC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V,OAAO,EAAE,GAAG,EAAE;wBACb,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;oBAC7B,CAAC,IAEA,IAAI,CAAC,KAAK,CAAC,mBAAmB,CACR,CACxB;gBACD,oBAAC,qBAAqB,IACrB,SAAS,EAAC,yBAAyB,EACnC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,GAAG,EAAE;wBACb,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;oBAClC,CAAC,IAEA,IAAI,CAAC,KAAK,CAAC,wBAAwB,CACb,CACnB,CACW,CAClB,CAAC;IACH,CAAC;CACD;AAKD,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAAC,oBAAC,kBAAkB,OAAG,CAAC","sourcesContent":["/*!\n * Copyright 2017 by ChartIQ, Inc.\n * All rights reserved.\n */\nimport React from \"react\";\nimport { FinsembleDialog } from \"../legacyControls/FinsembleDialog\";\nimport { FinsembleDialogTextInput } from \"../legacyControls/FinsembleDialogTextInput\";\nimport { FinsembleDialogButton } from \"../legacyControls/FinsembleDialogButton\";\nimport \"./SingleInputDialog.css\";\nimport \"../../assets/css/finsemble.css\";\nimport \"../../assets/css/dialogs.css\";\n\n// SingleInputDialog and YesNoDialog can be combined. There's a lot of code being repeated between the 2.\n\ninterface IProps {}\ninterface IState {\n\taffirmativeResponseLabel: string;\n\trenderInput: boolean;\n\ttitle?: string;\n\tcancelResponseLabel?: string;\n\tshowCancelButton?: boolean;\n\thideModalOnClose?: boolean;\n\tinputValue?: string | null;\n\tinputPattern?: string;\n\tinputMaxLength?: number;\n\tinputPlaceholder: string;\n}\n\n/**\n * This is our standard input dialog. It gives the user a single button and a text field, and ferries that data back to the window that opened it.\n *\n * @class SingleInputDialog\n * @extends {React.Component}\n */\nclass _SingleInputDialog extends React.Component<IProps, IState> {\n\tconstructor(props = {}) {\n\t\tsuper(props);\n\t\tthis.bindCorrectContext();\n\t\tthis.state = {\n\t\t\taffirmativeResponseLabel: \"Yes\",\n\t\t\t/** Our input uses the HTML autoFocus attribute. This only fires when the element is rendered for the 1st time. Since we re-use the dialogs, the 2nd time the dialog is shown, autoFocus will not trigger. To force it to trigger, we change this boolean when a response is sent back to the opener, which unmounts the element from the dom. The next time the dialog is used, we will render the element again, and autoFocus will trigger. */\n\t\t\trenderInput: false,\n\t\t\tinputPlaceholder: \"New workspace\",\n\t\t};\n\t\tdocument.body.addEventListener(\"keydown\", this.handleKeydownOnBody);\n\t}\n\n\tbindCorrectContext() {\n\t\tthis.handleKeydownOnBody = this.handleKeydownOnBody.bind(this);\n\t\tthis.onShowRequested = this.onShowRequested.bind(this);\n\t\tthis.setInputValue = this.setInputValue.bind(this);\n\t\tthis.sendResponse = this.sendResponse.bind(this);\n\t}\n\n\t/**\n\t * Handles escape and enter.\n\t *\n\t * @param {any} e\n\t * @memberof SingleInputDialog\n\t */\n\thandleKeydownOnBody(e: KeyboardEvent) {\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 * 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 SingleInputDialog\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: data.title || \"Title\",\n\t\t\t\tinputValue: null,\n\t\t\t\thideModalOnClose: typeof data.hideModalOnClose === \"undefined\" ? true : data.hideModalOnClose,\n\t\t\t\taffirmativeResponseLabel: data.affirmativeResponseLabel || \"OK\",\n\t\t\t\tcancelResponseLabel: data.cancelResponseLabel || \"Cancel\",\n\t\t\t\tshowCancelButton: typeof data.showCancelButton === \"undefined\" ? false : data.showCancelButton,\n\t\t\t\trenderInput: true,\n\t\t\t\tinputPattern: data.inputPattern,\n\t\t\t\tinputMaxLength: data.inputMaxLength,\n\t\t\t\tinputPlaceholder: data.inputPlaceholder || this.state.inputPlaceholder,\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 SingleInputDialog\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 SingleInputDialog\n\t */\n\tsendResponse(response: any) {\n\t\tFSBL.Clients.DialogManager.respondToOpener({\n\t\t\tvalue: this.state.inputValue,\n\t\t\tchoice: response,\n\t\t\thideModalOnClose: this.state.hideModalOnClose,\n\t\t});\n\n\t\tthis.setState({\n\t\t\tinputValue: null,\n\t\t\trenderInput: false,\n\t\t});\n\t\tArray.from(document.querySelectorAll(\"input\")).forEach((el) => (el.value = \"\"));\n\t}\n\n\t/**\n\t * onChange handler. When the user types, we keep the value up to date in the dialog's state.\n\t *\n\t * @param {any} e\n\t * @memberof SingleInputDialog\n\t */\n\tsetInputValue(e: React.ChangeEvent<HTMLInputElement>) {\n\t\tthis.setState({\n\t\t\tinputValue: e.target.value,\n\t\t});\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{this.state.renderInput && (\n\t\t\t\t\t<FinsembleDialogTextInput\n\t\t\t\t\t\tonInputChange={this.setInputValue}\n\t\t\t\t\t\tplaceholder={this.state.inputPlaceholder}\n\t\t\t\t\t\tautoFocus={true}\n\t\t\t\t\t\tinputPattern={this.state.inputPattern}\n\t\t\t\t\t\tmaxLength={this.state.inputMaxLength}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t<div className=\"button-wrapper\">\n\t\t\t\t\t{this.state.showCancelButton && (\n\t\t\t\t\t\t<FinsembleDialogButton\n\t\t\t\t\t\t\tclassName=\"fsbl-button-neutral\"\n\t\t\t\t\t\t\tshow={true}\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tthis.sendResponse(\"cancel\");\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{this.state.cancelResponseLabel}\n\t\t\t\t\t\t</FinsembleDialogButton>\n\t\t\t\t\t)}\n\t\t\t\t\t<FinsembleDialogButton\n\t\t\t\t\t\tclassName=\"fsbl-button-affirmative\"\n\t\t\t\t\t\tshow={true}\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tthis.sendResponse(\"affirmative\");\n\t\t\t\t\t\t}}\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 * A window for collecting input from a user (e.g., a new workspace's name).\n */\nexport const SingleInputDialog = () => <_SingleInputDialog />;\n"]}
|
|
1
|
+
{"version":3,"file":"SingleInputDialog.js","sourceRoot":"","sources":["../../../src/components/singleInputDialog/SingleInputDialog.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,yBAAyB,CAAC;AACjC,OAAO,gCAAg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,CAAC,aAAa,CAAC,CAAC;oBAClC,CAAC,IAEA,IAAI,CAAC,KAAK,CAAC,wBAAwB,CACb,CACnB,CACW,CAClB,CAAC;IACH,CAAC;CACD;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAAC,oBAAC,kBAAkB,OAAG,CAAC","sourcesContent":["/*!\n * Copyright 2017 by ChartIQ, Inc.\n * All rights reserved.\n */\nimport React from \"react\";\nimport { FinsembleDialog } from \"../legacyControls/FinsembleDialog\";\nimport { FinsembleDialogTextInput } from \"../legacyControls/FinsembleDialogTextInput\";\nimport { FinsembleDialogButton } from \"../legacyControls/FinsembleDialogButton\";\nimport \"./SingleInputDialog.css\";\nimport \"../../assets/css/finsemble.css\";\nimport \"../../assets/css/dialogs.css\";\n\n// SingleInputDialog and YesNoDialog can be combined. There's a lot of code being repeated between the 2.\n\ninterface IProps {}\ninterface IState {\n\taffirmativeResponseLabel: string;\n\trenderInput: boolean;\n\ttitle?: string;\n\tcancelResponseLabel?: string;\n\tshowCancelButton?: boolean;\n\thideModalOnClose?: boolean;\n\tinputValue?: string | null;\n\tinputPattern?: string;\n\tinputMaxLength?: number;\n\tinputPlaceholder: string;\n}\n\n/**\n * This is our standard input dialog. It gives the user a single button and a text field, and ferries that data back to the window that opened it.\n *\n * @class SingleInputDialog\n * @extends {React.Component}\n */\nclass _SingleInputDialog extends React.Component<IProps, IState> {\n\tconstructor(props = {}) {\n\t\tsuper(props);\n\t\tthis.bindCorrectContext();\n\t\tthis.state = {\n\t\t\taffirmativeResponseLabel: \"Yes\",\n\t\t\t/** Our input uses the HTML autoFocus attribute. This only fires when the element is rendered for the 1st time. Since we re-use the dialogs, the 2nd time the dialog is shown, autoFocus will not trigger. To force it to trigger, we change this boolean when a response is sent back to the opener, which unmounts the element from the dom. The next time the dialog is used, we will render the element again, and autoFocus will trigger. */\n\t\t\trenderInput: false,\n\t\t\tinputPlaceholder: \"New workspace\",\n\t\t};\n\t\tdocument.body.addEventListener(\"keydown\", this.handleKeydownOnBody);\n\t}\n\n\tbindCorrectContext() {\n\t\tthis.handleKeydownOnBody = this.handleKeydownOnBody.bind(this);\n\t\tthis.onShowRequested = this.onShowRequested.bind(this);\n\t\tthis.setInputValue = this.setInputValue.bind(this);\n\t\tthis.sendResponse = this.sendResponse.bind(this);\n\t}\n\n\t/**\n\t * Handles escape and enter.\n\t *\n\t * @param {any} e\n\t * @memberof SingleInputDialog\n\t */\n\thandleKeydownOnBody(e: KeyboardEvent) {\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 * 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 SingleInputDialog\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: data.title || \"Title\",\n\t\t\t\tinputValue: null,\n\t\t\t\thideModalOnClose: typeof data.hideModalOnClose === \"undefined\" ? true : data.hideModalOnClose,\n\t\t\t\taffirmativeResponseLabel: data.affirmativeResponseLabel || \"OK\",\n\t\t\t\tcancelResponseLabel: data.cancelResponseLabel || \"Cancel\",\n\t\t\t\tshowCancelButton: typeof data.showCancelButton === \"undefined\" ? false : data.showCancelButton,\n\t\t\t\trenderInput: true,\n\t\t\t\tinputPattern: data.inputPattern,\n\t\t\t\tinputMaxLength: data.inputMaxLength,\n\t\t\t\tinputPlaceholder: data.inputPlaceholder || this.state.inputPlaceholder,\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 SingleInputDialog\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 SingleInputDialog\n\t */\n\tsendResponse(response: any) {\n\t\tFSBL.Clients.DialogManager.respondToOpener({\n\t\t\tvalue: this.state.inputValue,\n\t\t\tchoice: response,\n\t\t\thideModalOnClose: this.state.hideModalOnClose,\n\t\t});\n\n\t\tthis.setState({\n\t\t\tinputValue: null,\n\t\t\trenderInput: false,\n\t\t});\n\t\tArray.from(document.querySelectorAll(\"input\")).forEach((el) => (el.value = \"\"));\n\t}\n\n\t/**\n\t * onChange handler. When the user types, we keep the value up to date in the dialog's state.\n\t *\n\t * @param {any} e\n\t * @memberof SingleInputDialog\n\t */\n\tsetInputValue(e: React.ChangeEvent<HTMLInputElement>) {\n\t\tthis.setState({\n\t\t\tinputValue: e.target.value,\n\t\t});\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{this.state.renderInput && (\n\t\t\t\t\t<FinsembleDialogTextInput\n\t\t\t\t\t\tonInputChange={this.setInputValue}\n\t\t\t\t\t\tplaceholder={this.state.inputPlaceholder}\n\t\t\t\t\t\tautoFocus={true}\n\t\t\t\t\t\tinputPattern={this.state.inputPattern}\n\t\t\t\t\t\tmaxLength={this.state.inputMaxLength}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t<div className=\"button-wrapper\">\n\t\t\t\t\t{this.state.showCancelButton && (\n\t\t\t\t\t\t<FinsembleDialogButton\n\t\t\t\t\t\t\tclassName=\"fsbl-button-neutral\"\n\t\t\t\t\t\t\tshow={true}\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tthis.sendResponse(\"cancel\");\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{this.state.cancelResponseLabel}\n\t\t\t\t\t\t</FinsembleDialogButton>\n\t\t\t\t\t)}\n\t\t\t\t\t<FinsembleDialogButton\n\t\t\t\t\t\tclassName=\"fsbl-button-affirmative\"\n\t\t\t\t\t\tshow={true}\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tthis.sendResponse(\"affirmative\");\n\t\t\t\t\t\t}}\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 * A window for collecting input from a user (e.g., a new workspace's name).\n */\nexport const SingleInputDialog = () => <_SingleInputDialog />;\n"]}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This class is a dummy class that exists only for build compatibility with LTS seed projects.
|
|
3
|
+
*
|
|
4
|
+
* If you rename "SmartDesktopDesigner" to something else (it's been Maker UI, Jumpstart, and DesktopProjectEditor in the past), grep for the following terms (case insensitive):
|
|
5
|
+
* "SmartDesktop", "Smart Desktop", "SDD", "SDServer", "SMART_DESKTOP"
|
|
6
|
+
*/
|
|
1
7
|
import React from "react";
|
|
2
8
|
export const SmartDesktopDesigner = (props) => React.createElement(React.Fragment, null);
|
|
3
9
|
//# sourceMappingURL=SmartDesktopDesigner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SmartDesktopDesigner.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/SmartDesktopDesigner.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SmartDesktopDesigner.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/SmartDesktopDesigner.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,yCAAK,CAAC","sourcesContent":["/**\n * This class is a dummy class that exists only for build compatibility with LTS seed projects.\n *\n * If you rename \"SmartDesktopDesigner\" to something else (it's been Maker UI, Jumpstart, and DesktopProjectEditor in the past), grep for the following terms (case insensitive):\n * \"SmartDesktop\", \"Smart Desktop\", \"SDD\", \"SDServer\", \"SMART_DESKTOP\"\n */\nimport React from \"react\";\n\nexport const SmartDesktopDesigner = (props: any) => <></>;\n"]}
|