@finsemble/finsemble-ui 6.3.0 → 6.4.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -28
- package/package.json +21 -33
- package/react/actions/favoriteActions.js.map +1 -1
- package/react/actions/linkerActions.js.map +1 -1
- package/react/actions/menuActions.js.map +1 -1
- package/react/actions/rootActions.js.map +1 -1
- package/react/actions/searchActions.js.map +1 -1
- package/react/actions/smartDesktopDesignerActions.d.ts +1 -3
- package/react/actions/smartDesktopDesignerActions.js +0 -1
- package/react/actions/smartDesktopDesignerActions.js.map +1 -1
- package/react/actions/toolbarActions.js.map +1 -1
- package/react/actions/workspaceActions.js.map +1 -1
- package/react/assets/css/advancedAppLauncher.css +636 -636
- package/react/assets/css/appCatalog.css +1069 -1069
- package/react/assets/css/authentication.css +78 -78
- package/react/assets/css/button.css +220 -220
- package/react/assets/css/core/formElements.css +23 -23
- package/react/assets/css/core/icons.css +69 -69
- package/react/assets/css/core/notifications.css +75 -75
- package/react/assets/css/core/windowFrame.css +36 -36
- package/react/assets/css/dashbar.css +78 -78
- package/react/assets/css/defaultTheme.css +356 -356
- package/react/assets/css/dialogs.css +158 -158
- package/react/assets/css/favorites.css +101 -101
- package/react/assets/css/finsemble.css +38 -38
- package/react/assets/css/focus.css +4 -4
- package/react/assets/css/font-finance.css +385 -385
- package/react/assets/css/fonts/Open_Sans/LICENSE.txt +202 -202
- package/react/assets/css/fonts/Open_Sans/OpenSans-Definition.css +118 -118
- package/react/assets/css/fonts/font-finance.svg +124 -124
- package/react/assets/css/fonts/icons-reference.html +1174 -1174
- package/react/assets/css/linkerWindow.css +124 -124
- package/react/assets/css/menus.css +195 -195
- package/react/assets/css/notificationsCenter.css +597 -597
- package/react/assets/css/processMonitor.css +213 -213
- package/react/assets/css/search.css +128 -128
- package/react/assets/css/shared/animations.css +99 -99
- package/react/assets/css/tags.css +136 -136
- package/react/assets/css/toolbar.css +413 -413
- package/react/assets/css/userPreferences.css +538 -568
- package/react/assets/css/windowTitleBar.css +653 -652
- package/react/assets/icons/always-on-top.svg +20 -0
- package/react/assets/icons/caret.svg +7 -0
- package/react/assets/icons/check-square.svg +5 -5
- package/react/assets/icons/check.svg +3 -3
- package/react/assets/icons/chevron-left.svg +3 -3
- package/react/assets/icons/chevron-right.svg +3 -3
- package/react/assets/icons/close.svg +11 -0
- package/react/assets/icons/copy.svg +10 -10
- package/react/assets/icons/documentation.svg +20 -0
- package/react/assets/icons/exclamation-circle.svg +4 -4
- package/react/assets/icons/external-link.svg +12 -12
- package/react/assets/icons/flag.svg +10 -10
- package/react/assets/icons/folder.svg +3 -3
- package/react/assets/icons/font.svg +3 -3
- package/react/assets/icons/globe.svg +3 -3
- package/react/assets/icons/hdd.svg +9 -9
- package/react/assets/icons/key.svg +10 -10
- package/react/assets/icons/life-ring.svg +3 -3
- package/react/assets/icons/linker.svg +18 -0
- package/react/assets/icons/lock.svg +5 -5
- package/react/assets/icons/magic.svg +15 -15
- package/react/assets/icons/maximize.svg +16 -0
- package/react/assets/icons/minimize.svg +15 -0
- package/react/assets/icons/moon.svg +10 -10
- package/react/assets/icons/paint-roller.svg +3 -3
- package/react/assets/icons/pencil.svg +10 -10
- package/react/assets/icons/plus.svg +3 -3
- package/react/assets/icons/question-circle.svg +5 -5
- package/react/assets/icons/search.svg +3 -3
- package/react/assets/icons/sun.svg +9 -9
- package/react/assets/icons/times.svg +3 -3
- package/react/assets/icons/toggle-off.svg +6 -6
- package/react/assets/icons/toggle-on.svg +6 -6
- package/react/assets/icons/toolbar.svg +12 -0
- package/react/assets/icons/tools.svg +3 -3
- package/react/assets/icons/trash.svg +12 -12
- package/react/assets/icons/upload.svg +10 -10
- package/react/assets/icons/window.svg +3 -3
- package/react/assets/img/finsemble-display.png +0 -0
- package/react/componentTemplateGenerator.js +85 -85
- package/react/componentTemplateGenerator.js.map +1 -1
- package/react/components/FinsembleProvider.js.map +1 -1
- package/react/components/appCatalog/AppCatalog.js.map +1 -1
- package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
- package/react/components/appCatalog/components/AppCard.js.map +1 -1
- package/react/components/appCatalog/components/AppList.js.map +1 -1
- package/react/components/appCatalog/components/AppResults.js.map +1 -1
- package/react/components/appCatalog/components/Carousel.js.map +1 -1
- package/react/components/appCatalog/components/EmptyResults.js.map +1 -1
- package/react/components/appCatalog/components/Hero.js.map +1 -1
- package/react/components/appCatalog/components/Home.js.map +1 -1
- package/react/components/appCatalog/components/SearchBar.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppDescription.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppDevNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppShowcase.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/Header.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/ImageCarousel.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/Modal.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/ReleaseNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/SupportNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/VersionNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/defaults.js.map +1 -1
- package/react/components/appCatalog/components/Tag.js.map +1 -1
- package/react/components/appCatalog/components/Toast.js.map +1 -1
- package/react/components/appCatalog/components/helpers.js.map +1 -1
- package/react/components/appCatalog/index.js.map +1 -1
- package/react/components/appCatalog/modules/AppDirectory.js.map +1 -1
- package/react/components/appCatalog/modules/FDC3.js.map +1 -1
- package/react/components/appCatalog/stores/appStore.js.map +1 -1
- package/react/components/appCatalog/stores/storeActions.js.map +1 -1
- package/react/components/common/Accordion.d.ts +11 -0
- package/react/components/common/Accordion.js +20 -0
- package/react/components/common/Accordion.js.map +1 -0
- package/react/components/common/Button.js.map +1 -1
- package/react/components/common/ButtonIcon.js.map +1 -1
- package/react/components/common/ButtonRow.js.map +1 -1
- package/react/components/common/ButtonTile.js.map +1 -1
- package/react/components/common/Checkbox.d.ts +1 -0
- package/react/components/common/Checkbox.js +3 -1
- package/react/components/common/Checkbox.js.map +1 -1
- package/react/components/common/ColorPicker.js.map +1 -1
- package/react/components/common/DropZone.js.map +1 -1
- package/react/components/common/DropdownButton.js.map +1 -1
- package/react/components/common/FileInput.d.ts +2 -1
- package/react/components/common/FileInput.js +9 -4
- package/react/components/common/FileInput.js.map +1 -1
- package/react/components/common/FinsembleIcon.d.ts +1 -1
- package/react/components/common/FinsembleIcon.js +16 -0
- package/react/components/common/FinsembleIcon.js.map +1 -1
- package/react/components/common/FinsembleSelect.js.map +1 -1
- package/react/components/common/FinsembleToggle.js.map +1 -1
- package/react/components/common/Header.js +1 -1
- package/react/components/common/Header.js.map +1 -1
- package/react/components/common/ImagePreview.js.map +1 -1
- package/react/components/common/InputTable.d.ts +11 -0
- package/react/components/common/InputTable.js +50 -0
- package/react/components/common/InputTable.js.map +1 -0
- package/react/components/common/LoadingSpinner.js.map +1 -1
- package/react/components/common/Tab.js.map +1 -1
- package/react/components/common/Tooltip.js.map +1 -1
- package/react/components/common/css/accordion.css +99 -0
- package/react/components/common/css/application-edit-page.css +324 -117
- package/react/components/common/css/application-list.css +49 -47
- package/react/components/common/css/button.css +166 -164
- package/react/components/common/css/checkbox.css +30 -0
- package/react/components/common/css/color-picker.css +52 -52
- package/react/components/common/css/drop-zone.css +17 -17
- package/react/components/common/css/file-input.css +65 -49
- package/react/components/common/css/header.css +30 -43
- package/react/components/common/css/icon.css +13 -13
- package/react/components/common/css/image-preview.css +57 -57
- package/react/components/common/css/loading-spinner.css +39 -39
- package/react/components/common/css/selector.css +51 -51
- package/react/components/common/css/styles.css +127 -128
- package/react/components/common/css/tab.css +56 -56
- package/react/components/common/css/toggle.css +32 -32
- package/react/components/common/css/tooltip.css +78 -78
- package/react/components/common/file_helpers.js.map +1 -1
- package/react/components/common/fixtures/FinsembleIcon.css +4 -4
- package/react/components/common/helpers.js.map +1 -1
- package/react/components/common/stories/Accordion.stories.d.ts +14 -0
- package/react/components/common/stories/Accordion.stories.js +42 -0
- package/react/components/common/stories/Accordion.stories.js.map +1 -0
- package/react/components/common/stories/Button.stories.js.map +1 -1
- package/react/components/common/stories/ButtonIcon.stories.js.map +1 -1
- package/react/components/common/stories/ButtonRow.stories.js.map +1 -1
- package/react/components/common/stories/ButtonTile.stories.js.map +1 -1
- package/react/components/common/stories/Checkbox.stories.js.map +1 -1
- package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
- package/react/components/common/stories/DropZone.stories.js.map +1 -1
- package/react/components/common/stories/DropdownButton.stories.d.ts +11 -0
- package/react/components/common/stories/DropdownButton.stories.js +12 -0
- package/react/components/common/stories/DropdownButton.stories.js.map +1 -1
- package/react/components/common/stories/FileInput.stories.d.ts +2 -1
- package/react/components/common/stories/FileInput.stories.js +6 -0
- package/react/components/common/stories/FileInput.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleIcon.stories.js +1 -0
- package/react/components/common/stories/FinsembleIcon.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleSelect.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
- package/react/components/common/stories/Header.stories.js.map +1 -1
- package/react/components/common/stories/ImagePreview.stories.js.map +1 -1
- package/react/components/common/stories/InputTable.stories.d.ts +12 -0
- package/react/components/common/stories/InputTable.stories.js +35 -0
- package/react/components/common/stories/InputTable.stories.js.map +1 -0
- package/react/components/common/stories/LoadingSpinner.stories.js.map +1 -1
- package/react/components/common/stories/Tab.stories.js.map +1 -1
- package/react/components/common/stories/Tooltip.stories.js.map +1 -1
- package/react/components/{smartDesktopDesigner/tests/ApplicationEdit.spec.d.ts → common/tests/Accordion.spec.d.ts} +0 -0
- package/react/components/common/tests/Accordion.spec.js +53 -0
- package/react/components/common/tests/Accordion.spec.js.map +1 -0
- package/react/components/common/tests/ButtonRow.spec.js.map +1 -1
- package/react/components/common/tests/Checkbox.spec.js +5 -3
- package/react/components/common/tests/Checkbox.spec.js.map +1 -1
- package/react/components/common/tests/ColorPicker.spec.js.map +1 -1
- package/react/components/common/tests/DropZone.spec.js.map +1 -1
- package/react/components/common/tests/FileInput.spec.js +20 -5
- package/react/components/common/tests/FileInput.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
- package/react/components/common/tests/Header.spec.js +6 -2
- package/react/components/common/tests/Header.spec.js.map +1 -1
- package/react/components/common/tests/ImagePreview.spec.js.map +1 -1
- package/react/components/{smartDesktopDesigner/tests/ApplicationSetup.spec.d.ts → common/tests/InputTable.spec.d.ts} +0 -0
- package/react/components/common/tests/InputTable.spec.js +166 -0
- package/react/components/common/tests/InputTable.spec.js.map +1 -0
- package/react/components/common/tests/Tab.spec.js.map +1 -1
- package/react/components/common/tests/Tooltip.spec.js.map +1 -1
- package/react/components/favorites/FavoriteMaker.js.map +1 -1
- package/react/components/favorites/FavoritesShell.js.map +1 -1
- package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
- package/react/components/favorites/FavoritesShell.stories.js.map +1 -1
- package/react/components/favorites/index.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.css +126 -126
- package/react/components/fdc3Resolver/ResolverDialog.js +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.spec.js +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.stories.js +13 -0
- package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
- package/react/components/icon/Icon.js.map +1 -1
- package/react/components/icon/index.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialog.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogButton.js +1 -1
- package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogQuestion.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogTextInput.js.map +1 -1
- package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
- package/react/components/legacyControls/FinsembleDraggable.js.map +1 -1
- package/react/components/legacyControls/FinsembleHoverDetector.js.map +1 -1
- package/react/components/legacyControls/FinsembleMenuSection.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialog.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialog.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
- package/react/components/linker/LinkerMenu.js.map +1 -1
- package/react/components/linker/LinkerMenuDeprecated.js.map +1 -1
- package/react/components/linker/index.js.map +1 -1
- package/react/components/linker/remoteRedux.js.map +1 -1
- package/react/components/menu/Menu.d.ts +1 -0
- package/react/components/menu/Menu.js.map +1 -1
- package/react/components/menu/MenuAutoResizer.d.ts +2 -1
- package/react/components/menu/MenuAutoResizer.js +4 -3
- package/react/components/menu/MenuAutoResizer.js.map +1 -1
- package/react/components/menu/MenuContent.js.map +1 -1
- package/react/components/menu/MenuHotKey.js.map +1 -1
- package/react/components/menu/MenuItem.js.map +1 -1
- package/react/components/menu/MenuPortal.js +99 -92
- package/react/components/menu/MenuPortal.js.map +1 -1
- package/react/components/menu/MenuShell.d.ts +1 -0
- package/react/components/menu/MenuShell.js +3 -2
- package/react/components/menu/MenuShell.js.map +1 -1
- package/react/components/menu/MenuToggle.js.map +1 -1
- package/react/components/menu/index.js.map +1 -1
- package/react/components/menu/keyboardNavigation.js.map +1 -1
- package/react/components/menu/menuContext.d.ts +1 -0
- package/react/components/menu/menuContext.js.map +1 -1
- package/react/components/menu/menuHelpers.d.ts +1 -1
- package/react/components/menu/menuHelpers.js +2 -2
- package/react/components/menu/menuHelpers.js.map +1 -1
- package/react/components/notifications/components/NoNotifications.js.map +1 -1
- package/react/components/notifications/components/drawer/Drawer.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerControls.js +30 -6
- package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +2 -0
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +20 -27
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
- package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
- package/react/components/notifications/components/shared/IconButton.js +5 -1
- package/react/components/notifications/components/shared/IconButton.js.map +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.js +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
- package/react/components/notifications/components/shared/OverflowMenu.js +5 -1
- package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyContentLogo.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderLogo.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
- package/react/components/notifications/components/views/CardView.js.map +1 -1
- package/react/components/notifications/components/views/ListView.js +1 -1
- package/react/components/notifications/components/views/ListView.js.map +1 -1
- package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
- package/react/components/notifications/constants.js.map +1 -1
- package/react/components/notifications/icons/Card.js.map +1 -1
- package/react/components/notifications/icons/Chevron.js.map +1 -1
- package/react/components/notifications/icons/CloseIcon.js.map +1 -1
- package/react/components/notifications/icons/EnvelopeClose.js.map +1 -1
- package/react/components/notifications/icons/EnvelopeOpen.js.map +1 -1
- package/react/components/notifications/icons/SnoozeIcon.js.map +1 -1
- package/react/components/notifications/index.js.map +1 -1
- package/react/components/notifications/notificationsContext.js.map +1 -1
- package/react/components/notifications/types.js.map +1 -1
- package/react/components/notifications/utils.js.map +1 -1
- package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
- package/react/components/processMonitor/ProcessMonitorTypes.js.map +1 -1
- package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
- package/react/components/processMonitor/components/ListHeader.js.map +1 -1
- package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
- package/react/components/processMonitor/constants.js.map +1 -1
- package/react/components/processMonitor/helpers.js.map +1 -1
- package/react/components/processMonitor/helpers.spec.js.map +1 -1
- package/react/components/processMonitor/index.js.map +1 -1
- package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +1 -0
- package/react/components/processMonitor/stores/ProcessMonitorStore.js +51 -50
- package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
- package/react/components/quickComponentForm/QuickComponentForm.js.map +1 -1
- package/react/components/quickComponentForm/index.js.map +1 -1
- package/react/components/quickComponentForm/quickComponent.css +3 -3
- package/react/components/search/Highlight.js.map +1 -1
- package/react/components/search/Highlight.spec.js.map +1 -1
- package/react/components/search/Highlight.stories.js.map +1 -1
- package/react/components/search/Search.js.map +1 -1
- package/react/components/search/SearchBestMatch.js.map +1 -1
- package/react/components/search/SearchInput.js.map +1 -1
- package/react/components/search/SearchProviderResults.js.map +1 -1
- package/react/components/search/SearchResult.js.map +1 -1
- package/react/components/search/SearchResults.js.map +1 -1
- package/react/components/search/index.js.map +1 -1
- package/react/components/shared/Animate.js.map +1 -1
- package/react/components/shared/BellIcon.js.map +1 -1
- package/react/components/shared/BellIconCrossed.js.map +1 -1
- package/react/components/shared/Button.js.map +1 -1
- package/react/components/shared/ConditionalWrapper.js.map +1 -1
- package/react/components/shared/DefaultDropdownButton.js +1 -1
- package/react/components/shared/DefaultDropdownButton.js.map +1 -1
- package/react/components/shared/NavigationButton.js.map +1 -1
- package/react/components/shared/Tag.js.map +1 -1
- package/react/components/shared/TagsMenu.js.map +1 -1
- package/react/components/shared/addProtocolToValidURL.js.map +1 -1
- package/react/components/shared/linkerUtil.js.map +1 -1
- package/react/components/shared/openQuitConfirmationDialog.js.map +1 -1
- package/react/components/shared/tests/DefaultDropdownButton.spec.js.map +1 -1
- package/react/components/shared/tests/addProtocolToValidURL.spec.js.map +1 -1
- package/react/components/shared/validateURL.js.map +1 -1
- package/react/components/shared/validateURL.spec.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.css +3 -3
- package/react/components/singleInputDialog/SingleInputDialog.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.spec.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.stories.js.map +1 -1
- package/react/components/singleInputDialog/index.js.map +1 -1
- package/react/components/smartDesktopDesigner/AddApp.d.ts +14 -0
- package/react/components/smartDesktopDesigner/AddApp.js +60 -0
- package/react/components/smartDesktopDesigner/AddApp.js.map +1 -0
- package/react/components/smartDesktopDesigner/AppEditAccess.js +16 -32
- package/react/components/smartDesktopDesigner/AppEditAccess.js.map +1 -1
- package/react/components/smartDesktopDesigner/AppEditPage.d.ts +5 -19
- package/react/components/smartDesktopDesigner/AppEditPage.js +548 -59
- package/react/components/smartDesktopDesigner/AppEditPage.js.map +1 -1
- package/react/components/smartDesktopDesigner/Appearance.css +27 -94
- package/react/components/smartDesktopDesigner/Appearance.helpers.js.map +1 -1
- package/react/components/smartDesktopDesigner/Appearance.js +1 -1
- package/react/components/smartDesktopDesigner/Appearance.js.map +1 -1
- package/react/components/smartDesktopDesigner/Application.d.ts +1 -0
- package/react/components/smartDesktopDesigner/Application.js +151 -93
- package/react/components/smartDesktopDesigner/Application.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationList.d.ts +2 -1
- package/react/components/smartDesktopDesigner/ApplicationList.js +7 -3
- package/react/components/smartDesktopDesigner/ApplicationList.js.map +1 -1
- package/react/components/smartDesktopDesigner/Applications.d.ts +0 -3
- package/react/components/smartDesktopDesigner/Applications.js +52 -102
- package/react/components/smartDesktopDesigner/Applications.js.map +1 -1
- package/react/components/smartDesktopDesigner/AssetsPage.css +26 -26
- package/react/components/smartDesktopDesigner/AssetsPage.js.map +1 -1
- package/react/components/smartDesktopDesigner/Authentication.js +2 -9
- package/react/components/smartDesktopDesigner/Authentication.js.map +1 -1
- package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js +8 -1
- package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +1 -1
- package/react/components/smartDesktopDesigner/Content.js.map +1 -1
- package/react/components/smartDesktopDesigner/ContentHeader.d.ts +5 -0
- package/react/components/smartDesktopDesigner/ContentHeader.js +10 -0
- package/react/components/smartDesktopDesigner/ContentHeader.js.map +1 -0
- package/react/components/smartDesktopDesigner/CurrentView.js +2 -1
- package/react/components/smartDesktopDesigner/CurrentView.js.map +1 -1
- package/react/components/smartDesktopDesigner/Export.d.ts +1 -0
- package/react/components/smartDesktopDesigner/Export.js +40 -9
- package/react/components/smartDesktopDesigner/Export.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportCloud.d.ts +3 -1
- package/react/components/smartDesktopDesigner/ExportCloud.js +4 -6
- package/react/components/smartDesktopDesigner/ExportCloud.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportDeployInfo.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportZip.d.ts +3 -1
- package/react/components/smartDesktopDesigner/ExportZip.js +8 -3
- package/react/components/smartDesktopDesigner/ExportZip.js.map +1 -1
- package/react/components/smartDesktopDesigner/GettingStarted.d.ts +1 -0
- package/react/components/smartDesktopDesigner/GettingStarted.js +11 -25
- package/react/components/smartDesktopDesigner/GettingStarted.js.map +1 -1
- package/react/components/smartDesktopDesigner/Navigation.d.ts +2 -2
- package/react/components/smartDesktopDesigner/Navigation.js +17 -15
- package/react/components/smartDesktopDesigner/Navigation.js.map +1 -1
- package/react/components/smartDesktopDesigner/ProjectErrors.js.map +1 -1
- package/react/components/smartDesktopDesigner/Publish.js.map +1 -1
- package/react/components/smartDesktopDesigner/PublishProgress.js.map +1 -1
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +3 -3
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +11 -17
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
- package/react/components/smartDesktopDesigner/ThemePage.css +109 -110
- package/react/components/smartDesktopDesigner/ThemePage.js +0 -7
- package/react/components/smartDesktopDesigner/ThemePage.js.map +1 -1
- package/react/components/smartDesktopDesigner/Themes.js +0 -2
- package/react/components/smartDesktopDesigner/Themes.js.map +1 -1
- package/react/components/smartDesktopDesigner/Toolbar.d.ts +15 -0
- package/react/components/smartDesktopDesigner/Toolbar.js +123 -0
- package/react/components/smartDesktopDesigner/Toolbar.js.map +1 -0
- package/react/components/smartDesktopDesigner/View.js +1 -1
- package/react/components/smartDesktopDesigner/View.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/fsbl_functions.d.ts +1 -1
- package/react/components/smartDesktopDesigner/common/fsbl_functions.js +2 -2
- package/react/components/smartDesktopDesigner/common/fsbl_functions.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/getCSSVars.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/views.d.ts +2 -36
- package/react/components/smartDesktopDesigner/common/views.js +150 -111
- package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
- package/react/components/smartDesktopDesigner/css/appearance.css +18 -10
- package/react/components/smartDesktopDesigner/css/applications.css +167 -127
- package/react/components/smartDesktopDesigner/css/authentication.css +119 -125
- package/react/components/smartDesktopDesigner/css/buttons.css +12 -12
- package/react/components/smartDesktopDesigner/css/export.css +176 -163
- package/react/components/smartDesktopDesigner/css/getting-started.css +28 -6
- package/react/components/smartDesktopDesigner/css/nav.css +120 -93
- package/react/components/smartDesktopDesigner/css/project-errors.css +15 -15
- package/react/components/smartDesktopDesigner/css/project-header.css +124 -121
- package/react/components/smartDesktopDesigner/css/styles.css +178 -179
- package/react/components/smartDesktopDesigner/css/views.css +23 -16
- package/react/components/smartDesktopDesigner/fixtures/apps.d.ts +2 -0
- package/react/components/smartDesktopDesigner/fixtures/apps.js +41 -6
- package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/authenticationProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/configTemplate.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/exportProps.js +3 -0
- package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/projectErrorsProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/themeProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/views.d.ts +2 -2
- package/react/components/smartDesktopDesigner/fixtures/views.js +58 -26
- package/react/components/smartDesktopDesigner/fixtures/views.js.map +1 -1
- package/react/components/smartDesktopDesigner/sdd_helpers.d.ts +1 -1
- package/react/components/smartDesktopDesigner/sdd_helpers.js +4 -3
- package/react/components/smartDesktopDesigner/sdd_helpers.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.d.ts +3 -1
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js +12 -33
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Appearance.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.d.ts +2 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js +8 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/AssetsPage.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Authentication.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.d.ts +10 -0
- package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.js +13 -0
- package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.js.map +1 -0
- package/react/components/smartDesktopDesigner/stories/Export.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.d.ts +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportZip.stories.d.ts +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Navigation.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Publish.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js +7 -1
- package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ThemePage.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Themes.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Toolbar.stories.d.ts +14 -0
- package/react/components/smartDesktopDesigner/stories/Toolbar.stories.js +38 -0
- package/react/components/smartDesktopDesigner/stories/Toolbar.stories.js.map +1 -0
- package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js +73 -122
- package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Applications.spec.d.ts +1 -1
- package/react/components/smartDesktopDesigner/tests/Applications.spec.js +61 -560
- package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Authentication.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/{ProjectHeader.spec.d.ts → ContentHeader.spec.d.ts} +0 -0
- package/react/components/smartDesktopDesigner/tests/ContentHeader.spec.js +31 -0
- package/react/components/smartDesktopDesigner/tests/ContentHeader.spec.js.map +1 -0
- package/react/components/smartDesktopDesigner/tests/Export.spec.js +129 -0
- package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js +7 -0
- package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Navigation.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js +3 -14
- package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Publish.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js +2 -31
- package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Themes.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Toolbar.spec.d.ts +1 -0
- package/react/components/smartDesktopDesigner/tests/Toolbar.spec.js +203 -0
- package/react/components/smartDesktopDesigner/tests/Toolbar.spec.js.map +1 -0
- package/react/components/smartDesktopDesigner/tests/a11y_helper.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.d.ts +1 -0
- package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.js +18 -0
- package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.js.map +1 -0
- package/react/components/smartDesktopDesigner/themeDefinitions.js.map +1 -1
- package/react/components/system/System.js.map +1 -1
- package/react/components/system/System.spec.js.map +1 -1
- package/react/components/system/System.stories.js.map +1 -1
- package/react/components/system/SystemTrayComponentShell.js.map +1 -1
- package/react/components/system/index.js.map +1 -1
- package/react/components/toolbar/AutoArrange.js.map +1 -1
- package/react/components/toolbar/DragHandle.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.spec.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.stories.js.map +1 -1
- package/react/components/toolbar/NotificationControl.js.map +1 -1
- package/react/components/toolbar/RevealAll.js.map +1 -1
- package/react/components/toolbar/RevealAll.spec.js.map +1 -1
- package/react/components/toolbar/RevealAll.stories.js.map +1 -1
- package/react/components/toolbar/ToolbarIcon.js.map +1 -1
- package/react/components/toolbar/ToolbarSection.js.map +1 -1
- package/react/components/toolbar/ToolbarShell.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js +47 -45
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/SortBy.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/ToggleFavoriteDropdown.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js.map +1 -1
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/DynamicAppLauncher.js.map +1 -1
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.d.ts +1 -0
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/appLauncher.css +30 -30
- package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +1 -0
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js +17 -34
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
- package/react/components/toolbar/dashbar/Dashbar.js +3 -1
- package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
- package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
- package/react/components/toolbar/index.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.d.ts +1 -1
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.d.ts +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.d.ts +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.d.ts +1 -1
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/workspaceManagementMenu.css +90 -90
- package/react/components/userPreferences/NotificationsPreferencesContext.js.map +1 -1
- package/react/components/userPreferences/UserPreferenceTypes.js.map +1 -1
- package/react/components/userPreferences/UserPreferences.js.map +1 -1
- package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
- package/react/components/userPreferences/UserPreferencesWrapper.js.map +1 -1
- package/react/components/userPreferences/components/ContentSection.js.map +1 -1
- package/react/components/userPreferences/components/LeftNav.js.map +1 -1
- package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
- package/react/components/userPreferences/components/content/DashbarEditorItem.js.map +1 -1
- package/react/components/userPreferences/components/content/General.js.map +1 -1
- package/react/components/userPreferences/components/content/Notifications.js.map +1 -1
- package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
- package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceButton.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js.map +1 -1
- package/react/components/userPreferences/index.js.map +1 -1
- package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
- package/react/components/userPreferences/stories/DashbarEditor.stories.js.map +1 -1
- package/react/components/userPreferences/stories/DashbarEditorItem.stories.js.map +1 -1
- package/react/components/userPreferences/stories/General.stories.js.map +1 -1
- package/react/components/userPreferences/stories/Notifications.stories.js.map +1 -1
- package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js.map +1 -1
- package/react/components/userPreferences/stories/NotificationsSources.stories.js.map +1 -1
- package/react/components/userPreferences/stories/UserPreferences.stories.js.map +1 -1
- package/react/components/userPreferences/stories/WorkspaceButton.stories.js.map +1 -1
- package/react/components/userPreferences/stories/WorkspaceComponents.stories.js.map +1 -1
- package/react/components/userPreferences/stories/WorkspaceItem.stories.js.map +1 -1
- package/react/components/userPreferences/stories/WorkspaceItemList.stories.js.map +1 -1
- package/react/components/userPreferences/stories/Workspaces.stories.js.map +1 -1
- package/react/components/userPreferences/tests/ContentSection.spec.js.map +1 -1
- package/react/components/userPreferences/tests/DashbarEditor.spec.js.map +1 -1
- package/react/components/userPreferences/tests/DashbarEditorItem.spec.js.map +1 -1
- package/react/components/userPreferences/tests/General.spec.js.map +1 -1
- package/react/components/userPreferences/tests/LeftNav.spec.js.map +1 -1
- package/react/components/userPreferences/tests/NotificationSourceTypes.spec.js.map +1 -1
- package/react/components/userPreferences/tests/Notifications.spec.js.map +1 -1
- package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js.map +1 -1
- package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.js.map +1 -1
- package/react/components/userPreferences/tests/ScheduledRestart.spec.js +1 -1
- package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceButton.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceComponents.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceItem.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceItemList.spec.js.map +1 -1
- package/react/components/utils.js.map +1 -1
- package/react/components/windowTitleBar/WindowTitleBarShell.js +8 -1
- package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
- package/react/components/windowTitleBar/components/center/Tab.d.ts +0 -1
- package/react/components/windowTitleBar/components/center/Tab.js +2 -2
- package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
- package/react/components/windowTitleBar/components/center/TabList.d.ts +0 -1
- package/react/components/windowTitleBar/components/center/TabList.js +16 -79
- package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
- package/react/components/windowTitleBar/components/center/TabRegion.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js.map +1 -1
- package/react/components/windowTitleBar/components/left/ShareButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/CloseButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/MaximizeButton.d.ts +7 -0
- package/react/components/windowTitleBar/components/right/MaximizeButton.js +11 -1
- package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/MinimizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/windowTitle.d.ts +5 -4
- package/react/components/windowTitleBar/components/windowTitle.js +102 -39
- package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
- package/react/components/windowTitleBar/index.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js +5 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.js.map +1 -1
- package/react/components/windowTitleBar/windowTitleBarContext.js.map +1 -1
- package/react/components/yesNoDialog/Timer.spec.js.map +1 -1
- package/react/components/yesNoDialog/Timer.stories.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.css +3 -3
- package/react/components/yesNoDialog/YesNoDialog.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.stories.js.map +1 -1
- package/react/components/yesNoDialog/index.js.map +1 -1
- package/react/components/yesNoDialog/timer.js.map +1 -1
- package/react/enzymeSetup.js +1 -1
- package/react/enzymeSetup.js.map +1 -1
- package/react/hooks/index.js.map +1 -1
- package/react/hooks/useAuth.js.map +1 -1
- package/react/hooks/useDashbar.d.ts +8 -0
- package/react/hooks/useDashbar.js +104 -0
- package/react/hooks/useDashbar.js.map +1 -0
- package/react/hooks/useDeepEffect.js.map +1 -1
- package/react/hooks/useFavorites.js.map +1 -1
- package/react/hooks/useFavoritesShell.js.map +1 -1
- package/react/hooks/useHotkey.js.map +1 -1
- package/react/hooks/useLinker.js.map +1 -1
- package/react/hooks/useMenu.js.map +1 -1
- package/react/hooks/useNotifications.js.map +1 -1
- package/react/hooks/useOutsideClickDetector.js.map +1 -1
- package/react/hooks/usePubSub.js.map +1 -1
- package/react/hooks/useSearch.js.map +1 -1
- package/react/hooks/useToolbar.d.ts +0 -6
- package/react/hooks/useToolbar.js +0 -101
- package/react/hooks/useToolbar.js.map +1 -1
- package/react/hooks/useWorkspace.js.map +1 -1
- package/react/reducers/favoriteReducer.js.map +1 -1
- package/react/reducers/linkerReducer.js.map +1 -1
- package/react/reducers/menuReducer.js.map +1 -1
- package/react/reducers/rootReducer.d.ts +0 -4
- package/react/reducers/rootReducer.js.map +1 -1
- package/react/reducers/searchReducer.js.map +1 -1
- package/react/reducers/smartDesktopDesignerReducer.js +0 -3
- package/react/reducers/smartDesktopDesignerReducer.js.map +1 -1
- package/react/reducers/toolbarReducer.js.map +1 -1
- package/react/reducers/workspaceReducer.js.map +1 -1
- package/react/store.d.ts +0 -8
- package/react/store.js.map +1 -1
- package/react/types/advancedAppLauncherTypes.js.map +1 -1
- package/react/types/dashbarTypes.js.map +1 -1
- package/react/types/favoriteTypes.js.map +1 -1
- package/react/types/fdc3.d.ts +7 -35
- package/react/types/fdc3.js.map +1 -1
- package/react/types/hotkeyTypes.js.map +1 -1
- package/react/types/iconTypes.js.map +1 -1
- package/react/types/linkerTypes.js.map +1 -1
- package/react/types/searchTypes.js.map +1 -1
- package/react/types/smartDesktopDesignerTypes.d.ts +45 -5
- package/react/types/smartDesktopDesignerTypes.js.map +1 -1
- package/react/types/windowTitleBar.d.ts +3 -2
- package/react/types/windowTitleBar.js.map +1 -1
- package/react/types/workspaceTypes.js.map +1 -1
- package/react/components/common/FontSizeSelector.d.ts +0 -7
- package/react/components/common/FontSizeSelector.js +0 -42
- package/react/components/common/FontSizeSelector.js.map +0 -1
- package/react/components/common/stories/FontSizeSelector.stories.d.ts +0 -12
- package/react/components/common/stories/FontSizeSelector.stories.js +0 -24
- package/react/components/common/stories/FontSizeSelector.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/ApplicationEdit.d.ts +0 -25
- package/react/components/smartDesktopDesigner/ApplicationEdit.js +0 -103
- package/react/components/smartDesktopDesigner/ApplicationEdit.js.map +0 -1
- package/react/components/smartDesktopDesigner/ApplicationSetup.d.ts +0 -23
- package/react/components/smartDesktopDesigner/ApplicationSetup.js +0 -73
- package/react/components/smartDesktopDesigner/ApplicationSetup.js.map +0 -1
- package/react/components/smartDesktopDesigner/ProjectHeader.d.ts +0 -14
- package/react/components/smartDesktopDesigner/ProjectHeader.js +0 -70
- package/react/components/smartDesktopDesigner/ProjectHeader.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.d.ts +0 -4
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js +0 -45
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.d.ts +0 -3
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js +0 -29
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.d.ts +0 -12
- package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js +0 -21
- package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.d.ts +0 -12
- package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js +0 -28
- package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.d.ts +0 -10
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js +0 -19
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js +0 -66
- package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js +0 -41
- package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js +0 -27
- package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storeActions.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/stores/storeActions.js"],"names":[],"mappings":"AAIA,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;A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ACrB,gBAAgB,CAAC,GAAG,CAAC,CAAC;AACvB,CAAC;AAMD,SAAS,aAAa,CAAC,GAAG;IACzB,IAAI,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAC1B,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QAC9B,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACrB;IAED,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,GAAG,EAAE;QACpE,UAAU,EAAE,CAAC;IACd,CAAC,CAAC,CAAC;AACJ,CAAC;AAMD,SAAS,MAAM,CAAC,GAAG;IAClB,aAAa,CAAC,GAAG,CAAC,CAAC;AACpB,CAAC;AAED,eAAe;IACd,UAAU;IACV,OAAO;IACP,eAAe;IACf,iBAAiB;IACjB,UAAU;IACV,aAAa;IACb,OAAO;IACP,MAAM;IACN,SAAS;IACT,gBAAgB;IAChB,SAAS;IACT,eAAe;IACf,MAAM;IACN,SAAS;IACT,OAAO;IACP,QAAQ;IACR,gBAAgB;IAChB,YAAY;IACZ,YAAY;IACZ,UAAU;IACV,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,MAAM;CACN,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\nimport AppDirectory from \"../modules/AppDirectory\";\r\nimport FDC3 from \"../modules/FDC3\";\r\nimport { getStore } from \"./appStore\";\r\nimport { findIndex } from \"lodash\";\r\n\r\nexport const findAppIndexInFolder = (appID, folderName, folders) =>\r\n\tfindIndex(folders[folderName].apps, (app) => app.appID === appID);\r\n\r\nconst data = {};\r\nlet FDC3Client;\r\nlet appd;\r\n\r\nfunction initialize(done = Function.prototype) {\r\n\tFSBL.Clients.ConfigClient.getValue({ field: \"finsemble.appDirectoryEndpoint\" }, (err, appDirectoryEndpoint) => {\r\n\t\tFDC3Client = new FDC3({ url: appDirectoryEndpoint });\r\n\t\tappd = new AppDirectory(FDC3Client);\r\n\r\n\t\tconst store = getStore();\r\n\t\tdata.apps = store.values.apps;\r\n\t\tstore.getValue({ field: \"appFolders.folders\" }, (_err, folders) => {\r\n\t\t\tdata.folders = folders;\r\n\t\t\tstore.addListener({ field: \"appFolders.folders\" }, (__err, dt) => (data.folders = dt.value));\r\n\t\t});\r\n\t\tstore.getValue({ field: \"activeFolder\" }, (_err, active) => {\r\n\t\t\tdata.activeFolder = active;\r\n\t\t\tstore.addListener({ field: \"activeFolder\" }, (__err, dt) => (data.activeFolder = dt.value));\r\n\t\t});\r\n\t\tstore.getValue({ field: \"defaultFolder\" }, (_err, folder) => {\r\n\t\t\tdata.defaultFolder = folder;\r\n\t\t});\r\n\r\n\t\tdata.installed = store.values.appDefinitions;\r\n\t\tdata.tags = store.values.tags;\r\n\t\tdata.filteredApps = store.values.filteredApps;\r\n\t\tdata.activeTags = store.values.activeTags;\r\n\t\tdata.activeApp = store.values.activeApp;\r\n\t\tdata.searchText = store.values.searchText;\r\n\t\tdata.forceSearch = store.values.forceSearch;\r\n\t\tdata.ADVANCED_APP_LAUNCHER = store.values.defaultFolder;\r\n\r\n\t\tstore.addListener({ field: \"apps\" }, (_err, dt) => (data.apps = dt.value));\r\n\t\tstore.addListener({ field: \"appDefinitions\" }, (_err, dt) => (data.installed = dt.value));\r\n\t\tstore.addListener({ field: \"tags\" }, (_err, dt) => (data.tags = dt.value));\r\n\t\tstore.addListener({ field: \"activeApp\" }, (_err, dt) => (data.activeApp = dt.value));\r\n\t\tstore.addListener({ field: \"activeTags\" }, (_err, dt) => (data.activeTags = dt.value));\r\n\t\tstore.addListener({ field: \"filteredApps\" }, (_err, dt) => (data.filteredApps = dt.value));\r\n\t\tstore.addListener({ field: \"searchText\" }, (_err, dt) => (data.searchText = dt.value));\r\n\t\tstore.addListener({ field: \"forceSearch\" }, (_err, dt) => (data.forceSearch = dt.value));\r\n\t\tdone();\r\n\t});\r\n}\r\n\r\n/**\r\n * Clears all active tags\r\n */\r\nfunction _clearActiveTags() {\r\n\tgetStore().setValue({ field: \"activeTags\", value: [] });\r\n}\r\n\r\n/**\r\n * Async function to fetch apps from the FDC3 api (appD)\r\n */\r\nasync function getApps() {\r\n\treturn await appd.getAll((err, retrievedApps) => {\r\n\t\tif (!err) {\r\n\t\t\tgetStore().setValue({\r\n\t\t\t\tfield: \"apps\",\r\n\t\t\t\tvalue: retrievedApps,\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n}\r\n\r\n/**\r\n * Call to appD to get the list of all tags\r\n */\r\nasync function getTags() {\r\n\treturn await appd.getTags((err, retrievedTags) => {\r\n\t\tgetStore().setValue({\r\n\t\t\tfield: \"tags\",\r\n\t\t\tvalue: retrievedTags,\r\n\t\t});\r\n\t});\r\n}\r\n\r\n/**\r\n * Function to write errors to the log\r\n * @param {string} message The log message\r\n * @param {string} [protocol] Provide the logging protocol (default is error)\r\n */\r\nfunction writeToLog(message, protocol = \"error\") {\r\n\tFSBL.Clients.Logger[protocol](message);\r\n}\r\n\r\n/**\r\n * Function to \"install\" an app. Adds the id to a list of installed apps\r\n * @param {string} name The name of the app\r\n */\r\nasync function addApp(id, cb = Function.prototype) {\r\n\tconst { activeApp, installed, apps } = data;\r\n\tconst appID = id;\r\n\tconst app = apps.find((checkedApp) => checkedApp.appId === appID);\r\n\r\n\tif (!app) {\r\n\t\tFSBL.Clients.Logger.system.error(\r\n\t\t\t`Attempted to install app with id: ${id}, but could not find it in the local store.`\r\n\t\t);\r\n\t\treturn cb();\r\n\t}\r\n\r\n\tconst name = app.title || app.name;\r\n\tconst folder = data.activeFolder;\r\n\r\n\tif (app === undefined) {\r\n\t\tconsole.warn(\"App not found.\");\r\n\t\treturn cb();\r\n\t}\r\n\r\n\tlet manifest;\r\n\tlet appConfig;\r\n\t// Manifest from FDC3 is a string property which can either be a stringified JSON, or a uri which delivers valid JSON.\r\n\t// The catalog will attempt to parse the string as JSON, then fetch from a URL if that fails.\r\n\t// If both paths fail, notify the user that this app can't be added\r\n\tif (app.manifestType.toLowerCase() === \"finsemble\") {\r\n\t\ttry {\r\n\t\t\tmanifest = JSON.parse(app.manifest);\r\n\t\t} catch (e) {\r\n\t\t\ttry {\r\n\t\t\t\tconst urlRes = await fetch(app.manifest, { method: \"GET\" });\r\n\t\t\t\tmanifest = await urlRes.json();\r\n\t\t\t} catch (err) {\r\n\t\t\t\twriteToLog(\r\n\t\t\t\t\t`${name} is missing a valid manifest or URI that delivers a valid JSON manifest. Unable to add app.`,\r\n\t\t\t\t\t\"error\"\r\n\t\t\t\t);\r\n\t\t\t\treturn cb();\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tappConfig = installed[appID] = {\r\n\t\t\t\tappID,\r\n\t\t\t\ttags: app.tags,\r\n\t\t\t\tname: name.trim(),\r\n\t\t\t\ttype: \"component\",\r\n\t\t\t\tmanifest,\r\n\t\t\t\tcanDelete: true,\r\n\t\t\t\tsource: \"FDC3\",\r\n\t\t\t};\r\n\t\t}\r\n\t} else {\r\n\t\twriteToLog(`${name} does not appear to be a Finsemble manifest. This app cannot be added to Finsemble.`, \"error\");\r\n\t\treturn cb();\r\n\t}\r\n\r\n\tconst ADVANCED_APP_LAUNCHER = data.defaultFolder;\r\n\tconst { folders } = data;\r\n\r\n\tfolders[ADVANCED_APP_LAUNCHER].apps.push(appConfig);\r\n\tif (folder !== ADVANCED_APP_LAUNCHER) folders[folder].apps.push(appConfig);\r\n\r\n\tFSBL.Clients.LauncherClient.registerComponent(\r\n\t\t{\r\n\t\t\tcomponentType: appConfig.name,\r\n\t\t\tmanifest: appConfig.manifest,\r\n\t\t},\r\n\t\t() => {\r\n\t\t\tgetStore().setValues(\r\n\t\t\t\t[\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfield: \"activeApp\",\r\n\t\t\t\t\t\tvalue: activeApp,\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfield: \"appDefinitions\",\r\n\t\t\t\t\t\tvalue: installed,\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfield: \"appFolders.folders\",\r\n\t\t\t\t\t\tvalue: folders,\r\n\t\t\t\t\t},\r\n\t\t\t\t],\r\n\t\t\t\tcb\r\n\t\t\t);\r\n\t\t}\r\n\t);\r\n}\r\n\r\n/**\r\n * Function to \"uninstall\" an app. Removes the id from a list of installed apps\r\n * @param {string} name The name of the app\r\n */\r\nfunction removeApp(id, cb = Function.prototype) {\r\n\tlet { installed, folders } = data;\r\n\tFSBL.Clients.LauncherClient.unRegisterComponent({ componentType: installed[id].name }, (err) => {\r\n\t\tif (err) {\r\n\t\t\tconsole.warn(\"Failed to deregister a component\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tfor (const key in data.folders) {\r\n\t\t\tconst appIndex = findAppIndexInFolder(id, key, data.folders);\r\n\t\t\tif (appIndex > -1) {\r\n\t\t\t\tfolders[key].apps.splice(appIndex, 1);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Delete the app from the list\r\n\t\tdelete installed[id];\r\n\r\n\t\tgetStore().setValues(\r\n\t\t\t[\r\n\t\t\t\t{\r\n\t\t\t\t\tfield: \"appDefinitions\",\r\n\t\t\t\t\tvalue: installed,\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\tfield: \"appFolders.folders\",\r\n\t\t\t\t\tvalue: folders,\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t\tcb\r\n\t\t);\r\n\t});\r\n}\r\n\r\n/**\r\n * Function to set the 'active app' for the catalog.\r\n * @param {string} id The app id to show as the actively showcasing app\r\n */\r\nfunction openApp(id) {\r\n\tlet { apps } = data;\r\n\r\n\tlet index = apps.findIndex((app) => app.appId === id);\r\n\r\n\tif (index > -1) {\r\n\t\tgetStore().setValue({\r\n\t\t\tfield: \"activeApp\",\r\n\t\t\tvalue: id,\r\n\t\t});\r\n\t}\r\n}\r\n\r\n/**\r\n * Clear the activeApp in store\r\n */\r\nfunction clearApp() {\r\n\tgetStore().setValue({\r\n\t\tfield: \"activeApp\",\r\n\t\tvalue: null,\r\n\t});\r\n}\r\n\r\n/**\r\n * Return activeApp from store\r\n *\r\n * @returns {string} activeApp\r\n */\r\nfunction getActiveApp() {\r\n\treturn data.activeApp;\r\n}\r\n\r\n/**\r\n * Set the activeApp param in store\r\n *\r\n * @param {*} app\r\n */\r\nfunction setActiveApp(app) {\r\n\tgetStore().setValue({\r\n\t\tfield: \"activeApp\",\r\n\t\tvalue: app,\r\n\t});\r\n}\r\n\r\n/**\r\n * Retrieves a list of installed apps by id\r\n */\r\nfunction getInstalledApps() {\r\n\treturn data.installed;\r\n}\r\n\r\n/**\r\n * Gets the list of filtered apps (when searching/filtering by tags)\r\n */\r\nfunction getFilteredApps() {\r\n\treturn data.filteredApps;\r\n}\r\n\r\n/**\r\n * Clears the list of filtered apps\r\n */\r\nfunction clearFilteredApps() {\r\n\tgetStore().setValue({\r\n\t\tfield: \"filteredApps\",\r\n\t\tvalue: [],\r\n\t});\r\n}\r\n\r\n/**\r\n * Set the value of the search text in store\r\n *\r\n * @param {set} val Search string\r\n */\r\nfunction setSearchValue(val) {\r\n\tgetStore().setValue({ field: \"searchText\", value: val });\r\n}\r\n\r\n/**\r\n * Get the current value of the text in the store\r\n *\r\n * @returns {string} Search string\r\n */\r\nfunction getSearchValue() {\r\n\treturn data.searchText;\r\n}\r\n\r\n/**\r\n * Clears the search text in store\r\n *\r\n */\r\nfunction clearSearchText() {\r\n\tgetStore().setValue({ field: \"searchText\", value: \"\" });\r\n}\r\n\r\n/**\r\n * Get forceSearch store value\r\n *\r\n * @returns {boolean} forceSearch\r\n */\r\nfunction getForceSearch() {\r\n\treturn data.forceSearch;\r\n}\r\n\r\n/**\r\n * Set the forceSearch value\r\n *\r\n * @param {string} val Boolean value for forceSearch\r\n */\r\nfunction setForceSearch(val) {\r\n\tgetStore().setValue({ field: \"forceSearch\", value: val });\r\n}\r\n\r\n/**\r\n * Gets the list of active tags (these are tags that are actively filtering the content list)\r\n */\r\nfunction getActiveTags() {\r\n\treturn data.activeTags; // type: string[]\r\n}\r\n\r\n/**\r\n * Removes all tags from the active tags list\r\n */\r\nfunction clearTags() {\r\n\t_clearActiveTags();\r\n}\r\n\r\n/**\r\n * Return to the App Catalog home page\r\n */\r\nfunction goHome() {\r\n\tsetForceSearch(false);\r\n\tclearFilteredApps();\r\n\tclearApp();\r\n\tclearTags();\r\n\tclearSearchText();\r\n}\r\n\r\n/**\r\n * Send the search text and tags to the appd server and get a list of apps\r\n */\r\nfunction filterApps() {\r\n\tlet { activeTags, searchText } = data;\r\n\r\n\tif (activeTags.length === 0 && searchText === \"\") {\r\n\t\tgoHome();\r\n\t} else {\r\n\t\tappd.search({ text: searchText, tags: activeTags }, (err, retrievedData) => {\r\n\t\t\tif (err) {\r\n\t\t\t\tFSBL.Logger.system.error(`FDC3 App search failed!: ${err}`);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tgetStore().setValue({ field: \"activeApp\", value: null });\r\n\t\t\tgetStore().setValue({ field: \"activeTags\", value: activeTags });\r\n\t\t\tgetStore().setValue({ field: \"filteredApps\", value: retrievedData });\r\n\t\t});\r\n\t}\r\n}\r\n\r\n/**\r\n * Refreshes the active tags search\r\n */\r\nfunction refreshTagSearch() {\r\n\tfilterApps();\r\n}\r\n\r\n/**\r\n * Calls appD to search the directory of apps based on search text and tag names\r\n * @param {string} terms The search terms provided by the user\r\n */\r\nfunction searchApps(terms, cb = Function.prototype) {\r\n\tdata.searchText = terms;\r\n\tsetForceSearch(true);\r\n\tgetStore().setValue(\r\n\t\t{\r\n\t\t\tfield: \"searchText\",\r\n\t\t\tvalue: terms,\r\n\t\t},\r\n\t\t() => {\r\n\t\t\tfilterApps();\r\n\t\t\tcb();\r\n\t\t}\r\n\t);\r\n}\r\n\r\n/**\r\n * Private function to remove an active tag. This will filter apps based on tags\r\n * @param {string} tag The name of the tag\r\n */\r\nfunction _removeActiveTag(tag) {\r\n\tdata.activeTags = data.activeTags.filter((currentTag) => currentTag !== tag);\r\n\r\n\tgetStore().setValue({ field: \"activeTags\", value: data.activeTags });\r\n\tfilterApps();\r\n}\r\n\r\n/**\r\n * Removes an 'active tag' from the list of filtered tags\r\n * @param {string} tag The tag name\r\n */\r\nfunction removeTag(tag) {\r\n\t_removeActiveTag(tag);\r\n}\r\n\r\n/**\r\n * Private function to add an active tag. This will filter apps based on tags\r\n * @param {string} tag The name of the tag\r\n */\r\nfunction _addActiveTag(tag) {\r\n\tlet { activeTags } = data;\r\n\tif (!activeTags.includes(tag)) {\r\n\t\tactiveTags.push(tag);\r\n\t}\r\n\r\n\tgetStore().setValue({ field: \"activeTags\", value: activeTags }, () => {\r\n\t\tfilterApps();\r\n\t});\r\n}\r\n\r\n/**\r\n * Adds an 'active tag' to the list of filtered tags\r\n * @param {string} tag The tag name\r\n */\r\nfunction addTag(tag) {\r\n\t_addActiveTag(tag);\r\n}\r\n\r\nexport default {\r\n\tinitialize,\r\n\tgetApps,\r\n\tgetFilteredApps,\r\n\tclearFilteredApps,\r\n\tsearchApps,\r\n\tgetActiveTags,\r\n\tgetTags,\r\n\taddTag,\r\n\tremoveTag,\r\n\trefreshTagSearch,\r\n\tclearTags,\r\n\tclearSearchText,\r\n\taddApp,\r\n\tremoveApp,\r\n\topenApp,\r\n\tclearApp,\r\n\tgetInstalledApps,\r\n\tgetActiveApp,\r\n\tsetActiveApp,\r\n\tfilterApps,\r\n\tsetSearchValue,\r\n\tsetForceSearch,\r\n\tgetSearchValue,\r\n\tgetForceSearch,\r\n\tgoHome,\r\n};\r\n"]}
|
|
1
|
+
{"version":3,"file":"storeActions.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/stores/storeActions.js"],"names":[],"mappings":"AAIA,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAA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G;IACrB,gBAAgB,CAAC,GAAG,CAAC,CAAC;AACvB,CAAC;AAMD,SAAS,aAAa,CAAC,GAAG;IACzB,IAAI,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAC1B,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QAC9B,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACrB;IAED,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,GAAG,EAAE;QACpE,UAAU,EAAE,CAAC;IACd,CAAC,CAAC,CAAC;AACJ,CAAC;AAMD,SAAS,MAAM,CAAC,GAAG;IAClB,aAAa,CAAC,GAAG,CAAC,CAAC;AACpB,CAAC;AAED,eAAe;IACd,UAAU;IACV,OAAO;IACP,eAAe;IACf,iBAAiB;IACjB,UAAU;IACV,aAAa;IACb,OAAO;IACP,MAAM;IACN,SAAS;IACT,gBAAgB;IAChB,SAAS;IACT,eAAe;IACf,MAAM;IACN,SAAS;IACT,OAAO;IACP,QAAQ;IACR,gBAAgB;IAChB,YAAY;IACZ,YAAY;IACZ,UAAU;IACV,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,MAAM;CACN,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\nimport AppDirectory from \"../modules/AppDirectory\";\nimport FDC3 from \"../modules/FDC3\";\nimport { getStore } from \"./appStore\";\nimport { findIndex } from \"lodash\";\n\nexport const findAppIndexInFolder = (appID, folderName, folders) =>\n\tfindIndex(folders[folderName].apps, (app) => app.appID === appID);\n\nconst data = {};\nlet FDC3Client;\nlet appd;\n\nfunction initialize(done = Function.prototype) {\n\tFSBL.Clients.ConfigClient.getValue({ field: \"finsemble.appDirectoryEndpoint\" }, (err, appDirectoryEndpoint) => {\n\t\tFDC3Client = new FDC3({ url: appDirectoryEndpoint });\n\t\tappd = new AppDirectory(FDC3Client);\n\n\t\tconst store = getStore();\n\t\tdata.apps = store.values.apps;\n\t\tstore.getValue({ field: \"appFolders.folders\" }, (_err, folders) => {\n\t\t\tdata.folders = folders;\n\t\t\tstore.addListener({ field: \"appFolders.folders\" }, (__err, dt) => (data.folders = dt.value));\n\t\t});\n\t\tstore.getValue({ field: \"activeFolder\" }, (_err, active) => {\n\t\t\tdata.activeFolder = active;\n\t\t\tstore.addListener({ field: \"activeFolder\" }, (__err, dt) => (data.activeFolder = dt.value));\n\t\t});\n\t\tstore.getValue({ field: \"defaultFolder\" }, (_err, folder) => {\n\t\t\tdata.defaultFolder = folder;\n\t\t});\n\n\t\tdata.installed = store.values.appDefinitions;\n\t\tdata.tags = store.values.tags;\n\t\tdata.filteredApps = store.values.filteredApps;\n\t\tdata.activeTags = store.values.activeTags;\n\t\tdata.activeApp = store.values.activeApp;\n\t\tdata.searchText = store.values.searchText;\n\t\tdata.forceSearch = store.values.forceSearch;\n\t\tdata.ADVANCED_APP_LAUNCHER = store.values.defaultFolder;\n\n\t\tstore.addListener({ field: \"apps\" }, (_err, dt) => (data.apps = dt.value));\n\t\tstore.addListener({ field: \"appDefinitions\" }, (_err, dt) => (data.installed = dt.value));\n\t\tstore.addListener({ field: \"tags\" }, (_err, dt) => (data.tags = dt.value));\n\t\tstore.addListener({ field: \"activeApp\" }, (_err, dt) => (data.activeApp = dt.value));\n\t\tstore.addListener({ field: \"activeTags\" }, (_err, dt) => (data.activeTags = dt.value));\n\t\tstore.addListener({ field: \"filteredApps\" }, (_err, dt) => (data.filteredApps = dt.value));\n\t\tstore.addListener({ field: \"searchText\" }, (_err, dt) => (data.searchText = dt.value));\n\t\tstore.addListener({ field: \"forceSearch\" }, (_err, dt) => (data.forceSearch = dt.value));\n\t\tdone();\n\t});\n}\n\n/**\n * Clears all active tags\n */\nfunction _clearActiveTags() {\n\tgetStore().setValue({ field: \"activeTags\", value: [] });\n}\n\n/**\n * Async function to fetch apps from the FDC3 api (appD)\n */\nasync function getApps() {\n\treturn await appd.getAll((err, retrievedApps) => {\n\t\tif (!err) {\n\t\t\tgetStore().setValue({\n\t\t\t\tfield: \"apps\",\n\t\t\t\tvalue: retrievedApps,\n\t\t\t});\n\t\t}\n\t});\n}\n\n/**\n * Call to appD to get the list of all tags\n */\nasync function getTags() {\n\treturn await appd.getTags((err, retrievedTags) => {\n\t\tgetStore().setValue({\n\t\t\tfield: \"tags\",\n\t\t\tvalue: retrievedTags,\n\t\t});\n\t});\n}\n\n/**\n * Function to write errors to the log\n * @param {string} message The log message\n * @param {string} [protocol] Provide the logging protocol (default is error)\n */\nfunction writeToLog(message, protocol = \"error\") {\n\tFSBL.Clients.Logger[protocol](message);\n}\n\n/**\n * Function to \"install\" an app. Adds the id to a list of installed apps\n * @param {string} name The name of the app\n */\nasync function addApp(id, cb = Function.prototype) {\n\tconst { activeApp, installed, apps } = data;\n\tconst appID = id;\n\tconst app = apps.find((checkedApp) => checkedApp.appId === appID);\n\n\tif (!app) {\n\t\tFSBL.Clients.Logger.system.error(\n\t\t\t`Attempted to install app with id: ${id}, but could not find it in the local store.`\n\t\t);\n\t\treturn cb();\n\t}\n\n\tconst name = app.title || app.name;\n\tconst folder = data.activeFolder;\n\n\tif (app === undefined) {\n\t\tconsole.warn(\"App not found.\");\n\t\treturn cb();\n\t}\n\n\tlet manifest;\n\tlet appConfig;\n\t// Manifest from FDC3 is a string property which can either be a stringified JSON, or a uri which delivers valid JSON.\n\t// The catalog will attempt to parse the string as JSON, then fetch from a URL if that fails.\n\t// If both paths fail, notify the user that this app can't be added\n\tif (app.manifestType.toLowerCase() === \"finsemble\") {\n\t\ttry {\n\t\t\tmanifest = JSON.parse(app.manifest);\n\t\t} catch (e) {\n\t\t\ttry {\n\t\t\t\tconst urlRes = await fetch(app.manifest, { method: \"GET\" });\n\t\t\t\tmanifest = await urlRes.json();\n\t\t\t} catch (err) {\n\t\t\t\twriteToLog(\n\t\t\t\t\t`${name} is missing a valid manifest or URI that delivers a valid JSON manifest. Unable to add app.`,\n\t\t\t\t\t\"error\"\n\t\t\t\t);\n\t\t\t\treturn cb();\n\t\t\t}\n\t\t} finally {\n\t\t\tappConfig = installed[appID] = {\n\t\t\t\tappID,\n\t\t\t\ttags: app.tags,\n\t\t\t\tname: name.trim(),\n\t\t\t\ttype: \"component\",\n\t\t\t\tmanifest,\n\t\t\t\tcanDelete: true,\n\t\t\t\tsource: \"FDC3\",\n\t\t\t};\n\t\t}\n\t} else {\n\t\twriteToLog(`${name} does not appear to be a Finsemble manifest. This app cannot be added to Finsemble.`, \"error\");\n\t\treturn cb();\n\t}\n\n\tconst ADVANCED_APP_LAUNCHER = data.defaultFolder;\n\tconst { folders } = data;\n\n\tfolders[ADVANCED_APP_LAUNCHER].apps.push(appConfig);\n\tif (folder !== ADVANCED_APP_LAUNCHER) folders[folder].apps.push(appConfig);\n\n\tFSBL.Clients.LauncherClient.registerComponent(\n\t\t{\n\t\t\tcomponentType: appConfig.name,\n\t\t\tmanifest: appConfig.manifest,\n\t\t},\n\t\t() => {\n\t\t\tgetStore().setValues(\n\t\t\t\t[\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"activeApp\",\n\t\t\t\t\t\tvalue: activeApp,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"appDefinitions\",\n\t\t\t\t\t\tvalue: installed,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"appFolders.folders\",\n\t\t\t\t\t\tvalue: folders,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tcb\n\t\t\t);\n\t\t}\n\t);\n}\n\n/**\n * Function to \"uninstall\" an app. Removes the id from a list of installed apps\n * @param {string} name The name of the app\n */\nfunction removeApp(id, cb = Function.prototype) {\n\tlet { installed, folders } = data;\n\tFSBL.Clients.LauncherClient.unRegisterComponent({ componentType: installed[id].name }, (err) => {\n\t\tif (err) {\n\t\t\tconsole.warn(\"Failed to deregister a component\");\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const key in data.folders) {\n\t\t\tconst appIndex = findAppIndexInFolder(id, key, data.folders);\n\t\t\tif (appIndex > -1) {\n\t\t\t\tfolders[key].apps.splice(appIndex, 1);\n\t\t\t}\n\t\t}\n\n\t\t// Delete the app from the list\n\t\tdelete installed[id];\n\n\t\tgetStore().setValues(\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\tfield: \"appDefinitions\",\n\t\t\t\t\tvalue: installed,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tfield: \"appFolders.folders\",\n\t\t\t\t\tvalue: folders,\n\t\t\t\t},\n\t\t\t],\n\t\t\tcb\n\t\t);\n\t});\n}\n\n/**\n * Function to set the 'active app' for the catalog.\n * @param {string} id The app id to show as the actively showcasing app\n */\nfunction openApp(id) {\n\tlet { apps } = data;\n\n\tlet index = apps.findIndex((app) => app.appId === id);\n\n\tif (index > -1) {\n\t\tgetStore().setValue({\n\t\t\tfield: \"activeApp\",\n\t\t\tvalue: id,\n\t\t});\n\t}\n}\n\n/**\n * Clear the activeApp in store\n */\nfunction clearApp() {\n\tgetStore().setValue({\n\t\tfield: \"activeApp\",\n\t\tvalue: null,\n\t});\n}\n\n/**\n * Return activeApp from store\n *\n * @returns {string} activeApp\n */\nfunction getActiveApp() {\n\treturn data.activeApp;\n}\n\n/**\n * Set the activeApp param in store\n *\n * @param {*} app\n */\nfunction setActiveApp(app) {\n\tgetStore().setValue({\n\t\tfield: \"activeApp\",\n\t\tvalue: app,\n\t});\n}\n\n/**\n * Retrieves a list of installed apps by id\n */\nfunction getInstalledApps() {\n\treturn data.installed;\n}\n\n/**\n * Gets the list of filtered apps (when searching/filtering by tags)\n */\nfunction getFilteredApps() {\n\treturn data.filteredApps;\n}\n\n/**\n * Clears the list of filtered apps\n */\nfunction clearFilteredApps() {\n\tgetStore().setValue({\n\t\tfield: \"filteredApps\",\n\t\tvalue: [],\n\t});\n}\n\n/**\n * Set the value of the search text in store\n *\n * @param {set} val Search string\n */\nfunction setSearchValue(val) {\n\tgetStore().setValue({ field: \"searchText\", value: val });\n}\n\n/**\n * Get the current value of the text in the store\n *\n * @returns {string} Search string\n */\nfunction getSearchValue() {\n\treturn data.searchText;\n}\n\n/**\n * Clears the search text in store\n *\n */\nfunction clearSearchText() {\n\tgetStore().setValue({ field: \"searchText\", value: \"\" });\n}\n\n/**\n * Get forceSearch store value\n *\n * @returns {boolean} forceSearch\n */\nfunction getForceSearch() {\n\treturn data.forceSearch;\n}\n\n/**\n * Set the forceSearch value\n *\n * @param {string} val Boolean value for forceSearch\n */\nfunction setForceSearch(val) {\n\tgetStore().setValue({ field: \"forceSearch\", value: val });\n}\n\n/**\n * Gets the list of active tags (these are tags that are actively filtering the content list)\n */\nfunction getActiveTags() {\n\treturn data.activeTags; // type: string[]\n}\n\n/**\n * Removes all tags from the active tags list\n */\nfunction clearTags() {\n\t_clearActiveTags();\n}\n\n/**\n * Return to the App Catalog home page\n */\nfunction goHome() {\n\tsetForceSearch(false);\n\tclearFilteredApps();\n\tclearApp();\n\tclearTags();\n\tclearSearchText();\n}\n\n/**\n * Send the search text and tags to the appd server and get a list of apps\n */\nfunction filterApps() {\n\tlet { activeTags, searchText } = data;\n\n\tif (activeTags.length === 0 && searchText === \"\") {\n\t\tgoHome();\n\t} else {\n\t\tappd.search({ text: searchText, tags: activeTags }, (err, retrievedData) => {\n\t\t\tif (err) {\n\t\t\t\tFSBL.Logger.system.error(`FDC3 App search failed!: ${err}`);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tgetStore().setValue({ field: \"activeApp\", value: null });\n\t\t\tgetStore().setValue({ field: \"activeTags\", value: activeTags });\n\t\t\tgetStore().setValue({ field: \"filteredApps\", value: retrievedData });\n\t\t});\n\t}\n}\n\n/**\n * Refreshes the active tags search\n */\nfunction refreshTagSearch() {\n\tfilterApps();\n}\n\n/**\n * Calls appD to search the directory of apps based on search text and tag names\n * @param {string} terms The search terms provided by the user\n */\nfunction searchApps(terms, cb = Function.prototype) {\n\tdata.searchText = terms;\n\tsetForceSearch(true);\n\tgetStore().setValue(\n\t\t{\n\t\t\tfield: \"searchText\",\n\t\t\tvalue: terms,\n\t\t},\n\t\t() => {\n\t\t\tfilterApps();\n\t\t\tcb();\n\t\t}\n\t);\n}\n\n/**\n * Private function to remove an active tag. This will filter apps based on tags\n * @param {string} tag The name of the tag\n */\nfunction _removeActiveTag(tag) {\n\tdata.activeTags = data.activeTags.filter((currentTag) => currentTag !== tag);\n\n\tgetStore().setValue({ field: \"activeTags\", value: data.activeTags });\n\tfilterApps();\n}\n\n/**\n * Removes an 'active tag' from the list of filtered tags\n * @param {string} tag The tag name\n */\nfunction removeTag(tag) {\n\t_removeActiveTag(tag);\n}\n\n/**\n * Private function to add an active tag. This will filter apps based on tags\n * @param {string} tag The name of the tag\n */\nfunction _addActiveTag(tag) {\n\tlet { activeTags } = data;\n\tif (!activeTags.includes(tag)) {\n\t\tactiveTags.push(tag);\n\t}\n\n\tgetStore().setValue({ field: \"activeTags\", value: activeTags }, () => {\n\t\tfilterApps();\n\t});\n}\n\n/**\n * Adds an 'active tag' to the list of filtered tags\n * @param {string} tag The tag name\n */\nfunction addTag(tag) {\n\t_addActiveTag(tag);\n}\n\nexport default {\n\tinitialize,\n\tgetApps,\n\tgetFilteredApps,\n\tclearFilteredApps,\n\tsearchApps,\n\tgetActiveTags,\n\tgetTags,\n\taddTag,\n\tremoveTag,\n\trefreshTagSearch,\n\tclearTags,\n\tclearSearchText,\n\taddApp,\n\tremoveApp,\n\topenApp,\n\tclearApp,\n\tgetInstalledApps,\n\tgetActiveApp,\n\tsetActiveApp,\n\tfilterApps,\n\tsetSearchValue,\n\tsetForceSearch,\n\tgetSearchValue,\n\tgetForceSearch,\n\tgoHome,\n};\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React, { ReactElement } from "react";
|
|
2
|
+
import "./css/accordion.css";
|
|
3
|
+
export interface AccordionProps {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
summary?: ReactElement | string;
|
|
7
|
+
startOpen?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
size?: "normal" | "medium";
|
|
10
|
+
}
|
|
11
|
+
export declare const Accordion: React.FunctionComponent<AccordionProps>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import "./css/accordion.css";
|
|
3
|
+
import { FinsembleIcon } from "./FinsembleIcon";
|
|
4
|
+
import { CSSTransition } from "react-transition-group";
|
|
5
|
+
export const Accordion = ({ id, label, summary, startOpen = false, className = "", children, size = "small", }) => {
|
|
6
|
+
const [isOpen, setIsOpen] = useState(startOpen);
|
|
7
|
+
const toggle = () => {
|
|
8
|
+
setIsOpen(!isOpen);
|
|
9
|
+
};
|
|
10
|
+
const containerClassName = ["accordion", size, className].join(" ");
|
|
11
|
+
return (React.createElement(CSSTransition, { in: isOpen, timeout: 500, className: containerClassName },
|
|
12
|
+
React.createElement("div", null,
|
|
13
|
+
React.createElement("input", { type: "checkbox", id: `accordion-cb-${id}`, checked: isOpen, readOnly: true, "aria-hidden": "true", className: "accordion-cb" }),
|
|
14
|
+
React.createElement("button", { onClick: toggle, "aria-controls": `content-${id}`, "aria-expanded": isOpen ? "true" : "false", id: `accordion-control-${id}` },
|
|
15
|
+
React.createElement(FinsembleIcon, { className: "accordion-caret", icon: "caret" }),
|
|
16
|
+
React.createElement("span", { className: "label" }, label)),
|
|
17
|
+
summary && (React.createElement("div", { className: "accordion-summary", id: `summary-${id}` }, summary)),
|
|
18
|
+
React.createElement("div", { id: `content-${id}`, role: "region", "aria-labelledby": `accordion-control-${id}`, "aria-hidden": isOpen ? "false" : "true", "aria-describedby": summary && `summary-${id}`, className: "accordion-content" }, children))));
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=Accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.js","sourceRoot":"","sources":["../../../src/components/common/Accordion.tsx"],"names":[],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ACX,6BAAK,SAAS,EAAC,mBAAmB,EAAC,EAAE,EAAE,WAAW,EAAE,EAAE,IACpD,OAAO,CACH,CACN;YACD,6BACC,EAAE,EAAE,WAAW,EAAE,EAAE,EACnB,IAAI,EAAC,QAAQ,qBACI,qBAAqB,EAAE,EAAE,iBAC7B,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,sBACpB,OAAO,IAAI,WAAW,EAAE,EAAE,EAC5C,SAAS,EAAC,mBAAmB,IAE5B,QAAQ,CACJ,CACD,CACS,CAChB,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { ReactElement, useState } from \"react\";\nimport \"./css/accordion.css\";\nimport { FinsembleIcon } from \"./FinsembleIcon\";\nimport { CSSTransition } from \"react-transition-group\";\n\nexport interface AccordionProps {\n\tid: string;\n\tlabel: string;\n\tsummary?: ReactElement | string;\n\tstartOpen?: boolean;\n\tclassName?: string;\n\tsize?: \"normal\" | \"medium\";\n}\n\nexport const Accordion: React.FunctionComponent<AccordionProps> = ({\n\tid,\n\tlabel,\n\tsummary,\n\tstartOpen = false,\n\tclassName = \"\",\n\tchildren,\n\tsize = \"small\",\n}) => {\n\tconst [isOpen, setIsOpen] = useState<boolean>(startOpen);\n\n\tconst toggle = () => {\n\t\tsetIsOpen(!isOpen);\n\t};\n\n\tconst containerClassName = [\"accordion\", size, className].join(\" \");\n\treturn (\n\t\t<CSSTransition in={isOpen} timeout={500} className={containerClassName}>\n\t\t\t<div>\n\t\t\t\t<input\n\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\tid={`accordion-cb-${id}`}\n\t\t\t\t\tchecked={isOpen}\n\t\t\t\t\treadOnly={true}\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclassName=\"accordion-cb\"\n\t\t\t\t/>\n\t\t\t\t<button\n\t\t\t\t\tonClick={toggle}\n\t\t\t\t\taria-controls={`content-${id}`}\n\t\t\t\t\taria-expanded={isOpen ? \"true\" : \"false\"}\n\t\t\t\t\tid={`accordion-control-${id}`}\n\t\t\t\t>\n\t\t\t\t\t<FinsembleIcon className=\"accordion-caret\" icon={\"caret\"} />\n\t\t\t\t\t<span className=\"label\">{label}</span>\n\t\t\t\t</button>\n\t\t\t\t{summary && (\n\t\t\t\t\t<div className=\"accordion-summary\" id={`summary-${id}`}>\n\t\t\t\t\t\t{summary}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t<div\n\t\t\t\t\tid={`content-${id}`}\n\t\t\t\t\trole=\"region\"\n\t\t\t\t\taria-labelledby={`accordion-control-${id}`}\n\t\t\t\t\taria-hidden={isOpen ? \"false\" : \"true\"}\n\t\t\t\t\taria-describedby={summary && `summary-${id}`}\n\t\t\t\t\tclassName=\"accordion-content\"\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</CSSTransition>\n\t);\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/common/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAqB,MAAM,iBAAiB,CAAC;AAwBnE,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC,SAAS,EAAE,4BAA4B;IACvC,IAAI,EAAE,uBAAuB;IAC7B,OAAO,EAAE,0BAA0B;IACnC,IAAI,EAAE,uBAAuB;IAC7B,MAAM,EAAE,yBAAyB;IACjC,KAAK,EAAE,wBAAwB;IAC/B,cAAc,EAAE,+BAA+B;CAC/C,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAA0B,CAAC,EAC7C,OAAO,GAAG,WAAW,EACrB,IAAI,GAAG,EAAE,EACT,UAAU,EACV,SAAS,EACT,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,EAClB,SAAS,GAAG,EAAE,EACd,gBAAgB,GAAG,EAAE,EACrB,SAAS,GACT,EAAE,EAAE;IACJ,MAAM,kBAAkB,GAAG,CAAC,oBAAoB,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAEhF,OAAO,CACN,6BAAK,SAAS,EAAE,GAAG,kBAAkB,EAAE;QACtC,gDAAY,gBAAgB,IAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;YAC7F,UAAU,IAAI,oBAAC,aAAa,IAAC,SAAS,EAAC,oBAAoB,EAAC,IAAI,EAAE,UAAU,GAAkB;YAC9F,IAAI;YACJ,SAAS,IAAI,oBAAC,aAAa,IAAC,SAAS,EAAC,mBAAmB,EAAC,IAAI,EAAE,SAAS,GAAkB,CACpF,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/common/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAqB,MAAM,iBAAiB,CAAC;AAwBnE,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC,SAAS,EAAE,4BAA4B;IACvC,IAAI,EAAE,uBAAuB;IAC7B,OAAO,EAAE,0BAA0B;IACnC,IAAI,EAAE,uBAAuB;IAC7B,MAAM,EAAE,yBAAyB;IACjC,KAAK,EAAE,wBAAwB;IAC/B,cAAc,EAAE,+BAA+B;CAC/C,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAA0B,CAAC,EAC7C,OAAO,GAAG,WAAW,EACrB,IAAI,GAAG,EAAE,EACT,UAAU,EACV,SAAS,EACT,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,EAClB,SAAS,GAAG,EAAE,EACd,gBAAgB,GAAG,EAAE,EACrB,SAAS,GACT,EAAE,EAAE;IACJ,MAAM,kBAAkB,GAAG,CAAC,oBAAoB,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAEhF,OAAO,CACN,6BAAK,SAAS,EAAE,GAAG,kBAAkB,EAAE;QACtC,gDAAY,gBAAgB,IAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;YAC7F,UAAU,IAAI,oBAAC,aAAa,IAAC,SAAS,EAAC,oBAAoB,EAAC,IAAI,EAAE,UAAU,GAAkB;YAC9F,IAAI;YACJ,SAAS,IAAI,oBAAC,aAAa,IAAC,SAAS,EAAC,mBAAmB,EAAC,IAAI,EAAE,SAAS,GAAkB,CACpF,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\nimport \"./css/button.css\";\nimport { FinsembleIcon, FinsembleIconType } from \"./FinsembleIcon\";\n\nexport interface AdvancedButtonProps {\n\ticon: FinsembleIconType;\n\ttext: string;\n\tdisabled?: boolean;\n\tonClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;\n\ttabIndex?: number;\n\tclassName?: string;\n\tbuttonAttributes?: object;\n}\n\nexport interface ButtonProps {\n\tfashion: \"secondary\" | \"primary\" | \"danger\" | \"ghost\" | \"danger ghost\";\n\ttext: string;\n\ticonBefore?: FinsembleIconType;\n\ticonAfter?: FinsembleIconType;\n\tdisabled?: boolean;\n\tonClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;\n\tclassName?: string;\n\tbuttonAttributes?: object;\n\tfixedSize?: number;\n}\n\nexport const fashion_class_lookup = {\n\tsecondary: \"button-container-secondary\",\n\ttile: \"button-container-tile\",\n\tprimary: \"button-container-primary\",\n\ticon: \"button-container-icon\",\n\tdanger: \"button-container-danger\",\n\tghost: \"button-container-ghost\",\n\t\"danger ghost\": \"button-container-danger-ghost\",\n};\n\nexport const Button: React.FC<ButtonProps> = ({\n\tfashion = \"secondary\",\n\ttext = \"\",\n\ticonBefore,\n\ticonAfter,\n\tdisabled = false,\n\tonClick = () => {},\n\tclassName = \"\",\n\tbuttonAttributes = {},\n\tfixedSize,\n}) => {\n\tconst containerClassName = [fashion_class_lookup[fashion], className].join(\" \");\n\n\treturn (\n\t\t<div className={`${containerClassName}`}>\n\t\t\t<button {...buttonAttributes} onClick={onClick} disabled={disabled} style={{ width: fixedSize }}>\n\t\t\t\t{iconBefore && <FinsembleIcon className=\"button-icon-before\" icon={iconBefore}></FinsembleIcon>}\n\t\t\t\t{text}\n\t\t\t\t{iconAfter && <FinsembleIcon className=\"button-icon-after\" icon={iconAfter}></FinsembleIcon>}\n\t\t\t</button>\n\t\t</div>\n\t);\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonIcon.js","sourceRoot":"","sources":["../../../src/components/common/ButtonIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAuB,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,CAAC,MAAM,UAAU,GAAkC,CAAC,EACzD,IAAI,EACJ,IAAI,GAAG,EAAE,EACT,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,CAAC,EACZ,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,EAClB,SAAS,GAAG,EAAE,EACd,gBAAgB,GAAG,EAAE,GACrB,EAAE,EAAE;IACJ,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,IAAI,CAAC;IAErD,OAAO,CACN,6BAAK,SAAS,EAAE,GAAG,kBAAkB,IAAI,SAAS,EAAE;QACnD,gDAAY,gBAAgB,IAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ;YAClG,oBAAC,aAAa,IAAC,IAAI,EAAE,IAAI,GAAkB,CACnC,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\
|
|
1
|
+
{"version":3,"file":"ButtonIcon.js","sourceRoot":"","sources":["../../../src/components/common/ButtonIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAuB,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,CAAC,MAAM,UAAU,GAAkC,CAAC,EACzD,IAAI,EACJ,IAAI,GAAG,EAAE,EACT,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,CAAC,EACZ,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,EAClB,SAAS,GAAG,EAAE,EACd,gBAAgB,GAAG,EAAE,GACrB,EAAE,EAAE;IACJ,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,IAAI,CAAC;IAErD,OAAO,CACN,6BAAK,SAAS,EAAE,GAAG,kBAAkB,IAAI,SAAS,EAAE;QACnD,gDAAY,gBAAgB,IAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ;YAClG,oBAAC,aAAa,IAAC,IAAI,EAAE,IAAI,GAAkB,CACnC,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\nimport { AdvancedButtonProps, fashion_class_lookup } from \"./Button\";\nimport \"./css/button.css\";\nimport { FinsembleIcon } from \"./FinsembleIcon\";\n\nexport const ButtonIcon: React.FC<AdvancedButtonProps> = ({\n\ticon,\n\ttext = \"\",\n\tdisabled = false,\n\ttabIndex = 0,\n\tonClick = () => {},\n\tclassName = \"\",\n\tbuttonAttributes = {},\n}) => {\n\tconst containerClassName = fashion_class_lookup.icon;\n\n\treturn (\n\t\t<div className={`${containerClassName} ${className}`}>\n\t\t\t<button {...buttonAttributes} onClick={onClick} disabled={disabled} title={text} tabIndex={tabIndex}>\n\t\t\t\t<FinsembleIcon icon={icon}></FinsembleIcon>\n\t\t\t</button>\n\t\t</div>\n\t);\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonRow.js","sourceRoot":"","sources":["../../../src/components/common/ButtonRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAexC,MAAM,YAAY,GAAmB;IACpC,KAAK,EAAE,EAAE;IACT,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC;IACjB,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,KAAK;IACtB,SAAS,EAAE,SAAS;CACpB,CAAC;AAEF,MAAM,SAAS,GAA6B,CAAC,EAC5C,KAAK,EACL,OAAO,EACP,SAAS,EACT,QAAQ,EACR,GAAG,EACH,eAAe,EACf,SAAS,GACT,EAAE,EAAE;IACJ,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChD,OAAO,CACN,6BACC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,EACpD,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,GAAG,EAAE;YACb,IAAI,CAAC,QAAQ,EAAE;gBACd,MAAM,IAAI,GAAG,OAAO,CAAC;gBACrB,IAAI,EAAE,CAAC;aACP;QACF,CAAC,EACD,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;YAChB,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,OAAO,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE;gBACtD,MAAM,IAAI,GAAG,OAAO,CAAC;gBACrB,IAAI,EAAE,CAAC;aACP;QACF,CAAC;QAEA,GAAG,IAAI,CACP,6BACC,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,eAAe,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAC5F,OAAO,EAAE,GAAG,EAAE;gBACb,WAAW,CAAC,IAAI,CAAC,CAAC;YACnB,CAAC,GACA,CACF;QACA,CAAC,eAAe,IAAI,QAAQ,CAAC,IAAI,2BAAG,SAAS,EAAC,0BAA0B,GAAG;QAC5E,8BAAM,SAAS,EAAC,UAAU,IAAE,KAAK,CAAQ;QACzC,2BAAG,SAAS,EAAE,SAAS,GAAI,CACtB,CACN,CAAC;AACH,CAAC,CAAC;AAEF,SAAS,CAAC,YAAY,GAAG,YAAY,CAAC;AACtC,eAAe,SAAS,CAAC","sourcesContent":["import React, { useState } from \"react\";\
|
|
1
|
+
{"version":3,"file":"ButtonRow.js","sourceRoot":"","sources":["../../../src/components/common/ButtonRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAexC,MAAM,YAAY,GAAmB;IACpC,KAAK,EAAE,EAAE;IACT,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC;IACjB,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,KAAK;IACtB,SAAS,EAAE,SAAS;CACpB,CAAC;AAEF,MAAM,SAAS,GAA6B,CAAC,EAC5C,KAAK,EACL,OAAO,EACP,SAAS,EACT,QAAQ,EACR,GAAG,EACH,eAAe,EACf,SAAS,GACT,EAAE,EAAE;IACJ,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChD,OAAO,CACN,6BACC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,EACpD,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,GAAG,EAAE;YACb,IAAI,CAAC,QAAQ,EAAE;gBACd,MAAM,IAAI,GAAG,OAAO,CAAC;gBACrB,IAAI,EAAE,CAAC;aACP;QACF,CAAC,EACD,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;YAChB,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,OAAO,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE;gBACtD,MAAM,IAAI,GAAG,OAAO,CAAC;gBACrB,IAAI,EAAE,CAAC;aACP;QACF,CAAC;QAEA,GAAG,IAAI,CACP,6BACC,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,eAAe,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAC5F,OAAO,EAAE,GAAG,EAAE;gBACb,WAAW,CAAC,IAAI,CAAC,CAAC;YACnB,CAAC,GACA,CACF;QACA,CAAC,eAAe,IAAI,QAAQ,CAAC,IAAI,2BAAG,SAAS,EAAC,0BAA0B,GAAG;QAC5E,8BAAM,SAAS,EAAC,UAAU,IAAE,KAAK,CAAQ;QACzC,2BAAG,SAAS,EAAE,SAAS,GAAI,CACtB,CACN,CAAC;AACH,CAAC,CAAC;AAEF,SAAS,CAAC,YAAY,GAAG,YAAY,CAAC;AACtC,eAAe,SAAS,CAAC","sourcesContent":["import React, { useState } from \"react\";\n\nexport interface ButtonRowProps {\n\tlabel?: string;\n\tonClick: Function;\n\ticonClass?: string;\n\tdisabled?: boolean;\n\timg?: string;\n\tshowDefaultIcon?: boolean;\n\tclassName?: string;\n\trole?: string;\n\ttabIndex?: number;\n\tonKeyDown?: Function;\n}\n\nconst defaultProps: ButtonRowProps = {\n\tlabel: \"\",\n\tonClick: () => {},\n\ticonClass: \"\",\n\tdisabled: false,\n\tshowDefaultIcon: false,\n\tclassName: \"row-btn\",\n};\n\nconst ButtonRow: React.FC<ButtonRowProps> = ({\n\tlabel,\n\tonClick,\n\ticonClass,\n\tdisabled,\n\timg,\n\tshowDefaultIcon,\n\tclassName,\n}) => {\n\tconst [imgError, setImgError] = useState(false);\n\treturn (\n\t\t<div\n\t\t\tclassName={disabled ? \"row-btn-disabled\" : className}\n\t\t\trole=\"button\"\n\t\t\ttabIndex={0}\n\t\t\tonClick={() => {\n\t\t\t\tif (!disabled) {\n\t\t\t\t\tconst func = onClick;\n\t\t\t\t\tfunc();\n\t\t\t\t}\n\t\t\t}}\n\t\t\tonKeyDown={(e) => {\n\t\t\t\tif ((e.key === \"Enter\" || e.key === \" \") && !disabled) {\n\t\t\t\t\tconst func = onClick;\n\t\t\t\t\tfunc();\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t{img && (\n\t\t\t\t<img\n\t\t\t\t\tsrc={img}\n\t\t\t\t\tstyle={showDefaultIcon || imgError ? { display: \"none\" } : { width: \"auto\", height: \"20px\" }}\n\t\t\t\t\tonError={() => {\n\t\t\t\t\t\tsetImgError(true);\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{(showDefaultIcon || imgError) && <i className=\"ff-finsemble default-img\" />}\n\t\t\t<span className=\"row__lbl\">{label}</span>\n\t\t\t<i className={iconClass} />\n\t\t</div>\n\t);\n};\n\nButtonRow.defaultProps = defaultProps;\nexport default ButtonRow;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonTile.js","sourceRoot":"","sources":["../../../src/components/common/ButtonTile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAuB,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,CAAC,MAAM,UAAU,GAAkC,CAAC,EACzD,IAAI,GAAG,EAAE,EACT,IAAI,EACJ,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,EAClB,SAAS,GAAG,EAAE,GACd,EAAE,EAAE;IACJ,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,IAAI,CAAC;IAErD,OAAO,CACN,6BAAK,SAAS,EAAE,GAAG,kBAAkB,IAAI,SAAS,EAAE;QACnD,gCAAQ,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ;YAC1C,IAAI,IAAI,oBAAC,aAAa,IAAC,SAAS,EAAE,GAAG,oBAAoB,CAAC,IAAI,OAAO,EAAE,IAAI,EAAE,IAAI,GAAkB;YAEpG,iCAAM,IAAI,CAAO,CACT,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\
|
|
1
|
+
{"version":3,"file":"ButtonTile.js","sourceRoot":"","sources":["../../../src/components/common/ButtonTile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAuB,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,CAAC,MAAM,UAAU,GAAkC,CAAC,EACzD,IAAI,GAAG,EAAE,EACT,IAAI,EACJ,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,EAClB,SAAS,GAAG,EAAE,GACd,EAAE,EAAE;IACJ,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,IAAI,CAAC;IAErD,OAAO,CACN,6BAAK,SAAS,EAAE,GAAG,kBAAkB,IAAI,SAAS,EAAE;QACnD,gCAAQ,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ;YAC1C,IAAI,IAAI,oBAAC,aAAa,IAAC,SAAS,EAAE,GAAG,oBAAoB,CAAC,IAAI,OAAO,EAAE,IAAI,EAAE,IAAI,GAAkB;YAEpG,iCAAM,IAAI,CAAO,CACT,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\nimport { AdvancedButtonProps, fashion_class_lookup } from \"./Button\";\nimport \"./css/button.css\";\nimport { FinsembleIcon } from \"./FinsembleIcon\";\n\nexport const ButtonTile: React.FC<AdvancedButtonProps> = ({\n\ttext = \"\",\n\ticon,\n\tdisabled = false,\n\tonClick = () => {},\n\tclassName = \"\",\n}) => {\n\tconst containerClassName = fashion_class_lookup.tile;\n\n\treturn (\n\t\t<div className={`${containerClassName} ${className}`}>\n\t\t\t<button onClick={onClick} disabled={disabled}>\n\t\t\t\t{icon && <FinsembleIcon className={`${fashion_class_lookup.tile}-icon`} icon={icon}></FinsembleIcon>}\n\n\t\t\t\t<div>{text}</div>\n\t\t\t</button>\n\t\t</div>\n\t);\n};\n"]}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { FinsembleIcon } from "./FinsembleIcon";
|
|
3
|
+
import "./css/checkbox.css";
|
|
2
4
|
export const Checkbox = ({ checked = false, disabled = false, label = "", onClick = () => { }, }) => {
|
|
3
5
|
let checkboxClasses = "complex-menu-checkbox";
|
|
4
6
|
if (checked) {
|
|
@@ -16,7 +18,7 @@ export const Checkbox = ({ checked = false, disabled = false, label = "", onClic
|
|
|
16
18
|
!disabled && onClick(e);
|
|
17
19
|
}
|
|
18
20
|
} },
|
|
19
|
-
React.createElement("div", { className: checkboxClasses }, checked && React.createElement(
|
|
21
|
+
React.createElement("div", { className: checkboxClasses }, checked && React.createElement(FinsembleIcon, { icon: "check" })),
|
|
20
22
|
React.createElement("div", { className: "complex-menu-checkbox-label" }, label)));
|
|
21
23
|
};
|
|
22
24
|
//# sourceMappingURL=Checkbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/components/common/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/components/common/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,oBAAoB,CAAC;AAS5B,MAAM,CAAC,MAAM,QAAQ,GAA4B,CAAC,EACjD,OAAO,GAAG,KAAK,EACf,QAAQ,GAAG,KAAK,EAChB,KAAK,GAAG,EAAE,EACV,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,GAClB,EAAE,EAAE;IACJ,IAAI,eAAe,GAAG,uBAAuB,CAAC;IAC9C,IAAI,OAAO,EAAE;QACZ,eAAe,GAAG,GAAG,eAAe,UAAU,CAAC;KAC/C;IACD,IAAI,KAAK,GAAG,EAAE,CAAC;IACf,IAAI,QAAQ,EAAE;QACb,KAAK,GAAG;YACP,MAAM,EAAE,SAAS;YACjB,OAAO,EAAE,KAAK;SACd,CAAC;KACF;IACD,OAAO,CACN,6BACC,KAAK,EAAE,KAAK,EACZ,SAAS,EAAC,+BAA+B,EACzC,IAAI,EAAC,UAAU,gBACH,KAAK,EACjB,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC,CAAC,OAAO,EACtC,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;YAChB,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,EAAE;gBACvC,CAAC,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;aACxB;QACF,CAAC;QAED,6BAAK,SAAS,EAAE,eAAe,IAAG,OAAO,IAAI,oBAAC,aAAa,IAAC,IAAI,EAAC,OAAO,GAAG,CAAO;QAClF,6BAAK,SAAS,EAAC,6BAA6B,IAAE,KAAK,CAAO,CACrD,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\nimport { FinsembleIcon } from \"./FinsembleIcon\";\nimport \"./css/checkbox.css\";\n\nexport interface CheckboxProps {\n\tchecked?: boolean;\n\tdisabled?: boolean;\n\tlabel?: string;\n\tonClick?: (e: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>) => void;\n}\n\nexport const Checkbox: React.FC<CheckboxProps> = ({\n\tchecked = false,\n\tdisabled = false,\n\tlabel = \"\",\n\tonClick = () => {},\n}) => {\n\tlet checkboxClasses = \"complex-menu-checkbox\";\n\tif (checked) {\n\t\tcheckboxClasses = `${checkboxClasses} checked`;\n\t}\n\tlet style = {};\n\tif (disabled) {\n\t\tstyle = {\n\t\t\tcursor: \"default\",\n\t\t\topacity: \".55\",\n\t\t};\n\t}\n\treturn (\n\t\t<div\n\t\t\tstyle={style}\n\t\t\tclassName=\"complex-menu-checkbox-wrapper\"\n\t\t\trole=\"checkbox\"\n\t\t\taria-label={label}\n\t\t\ttabIndex={0}\n\t\t\tonClick={disabled ? () => {} : onClick}\n\t\t\tonKeyDown={(e) => {\n\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\t\t\t\t!disabled && onClick(e);\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t<div className={checkboxClasses}>{checked && <FinsembleIcon icon=\"check\" />}</div>\n\t\t\t<div className=\"complex-menu-checkbox-label\">{label}</div>\n\t\t</div>\n\t);\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPicker.js","sourceRoot":"","sources":["../../../src/components/common/ColorPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QA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","sourcesContent":["import React, { useState, useEffect } from \"react\";\nimport \"./css/color-picker.css\";\n\nconst RE_HEX_COLOR = /^#[0-9a-f]{6}$/i;\n\nexport enum RGBA_CHANNEL {\n\tRED = 0,\n\tGREEN = 1,\n\tBLUE = 2,\n\tALPHA = 3,\n}\n\n// From https://stackoverflow.com/a/24390910\nexport function colorToRGBA(color: string) {\n\t// Returns the color as an array of [r, g, b, a] -- all range from 0 - 255\n\t// color must be a valid canvas fillStyle. This will cover most anything\n\t// you'd want to use.\n\t// Examples:\n\t// colorToRGBA('red') # [255, 0, 0, 255]\n\t// colorToRGBA('#f00') # [255, 0, 0, 255]\n\tconst cvs = document.createElement(\"canvas\");\n\tcvs.height = 1;\n\tcvs.width = 1;\n\n\tconst ctx = cvs.getContext(\"2d\")!;\n\tctx.fillStyle = color;\n\tctx.fillRect(0, 0, 1, 1);\n\treturn ctx.getImageData(0, 0, 1, 1).data;\n}\n\nfunction byteToHex(num: number) {\n\t// Turns a number (0-255) into a 2-character hex number (00-ff)\n\treturn `0${num.toString(16)}`.slice(-2);\n}\n\nfunction colorToHex(color: string) {\n\t// Convert any CSS color to a hex representation\n\t// Examples:\n\t// colorToHex('red') # '#ff0000'\n\t// colorToHex('rgb(255, 0, 0)') # '#ff0000'\n\t// colorToHex('#ff0000') # '#ff0000'\n\tif (color.match(RE_HEX_COLOR) !== null) {\n\t\treturn color;\n\t}\n\tconst rgba = colorToRGBA(color);\n\tconst hex = [0, 1, 2].map((idx) => byteToHex(rgba[idx])).join(\"\");\n\treturn `#${hex}`;\n}\n\nexport interface ColorPickerProps {\n\tstartColor: string;\n\tupdateColor: (newColor: string) => void;\n\tid?: string;\n}\n\n/**\n * ColorPicker component to update theme variables. Displays a browser color input alongside a text version for hex color values.\n *\n * @param {{ [id]: string, startColor: string; updateColor: function }} { id, startColor, callback }\n */\nexport const ColorPicker = ({ id, startColor, updateColor }: ColorPickerProps) => {\n\tconst [color, setColor] = useState(colorToHex(startColor));\n\tconst isValid = color.match(RE_HEX_COLOR) !== null;\n\n\tuseEffect(() => {\n\t\tif (isValid) {\n\t\t\tupdateColor(color);\n\t\t}\n\t}, [color]);\n\n\tuseEffect(() => {\n\t\tif (startColor) {\n\t\t\tsetColor(startColor);\n\t\t}\n\t}, [startColor]);\n\n\tconst onColorChanged = ({ target }: { target: HTMLInputElement }) => {\n\t\tsetColor(target.value);\n\t};\n\n\treturn (\n\t\t<div className=\"color-picker\">\n\t\t\t<input\n\t\t\t\tclassName=\"theme-color-picker\"\n\t\t\t\ttype=\"color\"\n\t\t\t\tvalue={color}\n\t\t\t\tonChange={onColorChanged}\n\t\t\t\taria-hidden=\"true\"\n\t\t\t></input>\n\t\t\t<input\n\t\t\t\tclassName=\"theme-color-picker-text\"\n\t\t\t\ttype=\"text\"\n\t\t\t\taria-invalid={!isValid}\n\t\t\t\tvalue={color}\n\t\t\t\tonChange={onColorChanged}\n\t\t\t\t{...{ id }}\n\t\t\t></input>\n\t\t</div>\n\t);\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropZone.js","sourceRoot":"","sources":["../../../src/components/common/DropZone.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,qBAAqB,CAAC;AAsB7B,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,GAAG,KAAK,EAAiB,EAAE,EAAE;IACtF,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAEjD,MAAM,eAAe,GAAG,CAAC,CAA0D,EAAE,EAAE;QACtF,CAAC,CAAC,cA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AE,EAAE;gBACtC,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE;oBACtB,SAAS;iBACT;gBACD,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aACzB;YAED,eAAe,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC,IAEA,QAAQ,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState } from \"react\";\
|
|
1
|
+
{"version":3,"file":"DropZone.js","sourceRoot":"","sources":["../../../src/components/common/DropZone.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,qBAAqB,CAAC;AAsB7B,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,GAAG,KAAK,EAAiB,EAAE,EAAE;IACtF,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAEjD,MAAM,eAAe,GAAG,CAAC,CAA0D,EAAE,EAAE;QACtF,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,CAAC,CAAC,eAAe,EAAE,CAAC;IACrB,CAAC,CAAC;IAIF,IAAI,SAAS,EAAE;QAId,IAAI,OAAO,GAA0B,IAAI,CAAC;QAC1C,QAAQ,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE;YAC3C,eAAe,CAAC,CAAC,CAAC,CAAC;YACnB,YAAY,CAAC,IAAI,CAAC,CAAC;YAGnB,IAAI,OAAO,KAAK,IAAI,EAAE;gBACrB,YAAY,CAAC,OAAO,CAAC,CAAC;aACtB;YAGD,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;gBAEzB,YAAY,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,EAAE,GAAG,CAAC,CAAC;QAET,CAAC,CAAC,CAAC;QACH,YAAY,CAAC,KAAK,CAAC,CAAC;KACpB;IAED,OAAO,QAAQ,CAAC,CAAC,CAAC,CACjB,0CAAG,QAAQ,CAAI,CACf,CAAC,CAAC,CAAC,CACH,6BACC,SAAS,EAAE,YAAY,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE,EACnF,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE;YAClB,eAAe,CAAC,CAAC,CAAC,CAAC;YACnB,aAAa,CAAC,IAAI,CAAC,CAAC;QACrB,CAAC,EACD,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE;YAClB,eAAe,CAAC,CAAC,CAAC,CAAC;YACnB,aAAa,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC,EACD,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE;YACb,aAAa,CAAC,KAAK,CAAC,CAAC;YAErB,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,YAAY,CAAC;YACjC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACtC,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE;oBACtB,SAAS;iBACT;gBACD,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aACzB;YAED,eAAe,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC,IAEA,QAAQ,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState } from \"react\";\nimport \"./css/drop-zone.css\";\n\n// Electron adds File.path\nexport type FileWithPath = File & { path?: string };\n\nexport type DropZoneProps = {\n\tchildren: React.ReactNode;\n\tprocessFile: (fileObj: FileWithPath, index: number) => void;\n\tsuppress?: boolean;\n};\n\n/***\n * Component that serves as a drop zone. It also keeps track of visual concerns and event handlers for\n * drag-and-drop.\n *\n * The DropZone component is intended to be a container element for other elements, such as text, lists,\n * images, input elements, etc.\n *\n * @callback processFile - This function will be called for each file that is dropped in the dropzone.\n * @param {ReactNode} children - React will fill this in.\n * @param {boolean} suppress=false - If the dropzone-ness should be suppressed, which would turn this container into just a div\n */\nexport const DropZone = ({ processFile, children, suppress = false }: DropZoneProps) => {\n\tconst [isDragging, setIsDragging] = useState(false);\n\tconst [potential, setPotential] = useState(false);\n\tconst [singleton, setSingleton] = useState(true);\n\n\tconst preventDefaults = (e: { preventDefault: Function; stopPropagation: Function }) => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t};\n\n\t// Check if something is being dragged somewhere on the page\n\t// If dragging is happening on the page, there will be a visual indication for potential drop zone\n\tif (singleton) {\n\t\t// \"dragenter\" and \"dragleave\" events are fired off of every single child element, and counting them isn't reliable\n\t\t// so, when \"dragover\" events are fired, we know dragging is happening.\n\t\t// we will wait 100ms after the last \"dragover\" event is fired, and then turn off the potential zone.\n\t\tlet timeout: NodeJS.Timeout | null = null;\n\t\tdocument.addEventListener(\"dragover\", (e) => {\n\t\t\tpreventDefaults(e);\n\t\t\tsetPotential(true);\n\n\t\t\t// If timeout was previously set, clear it\n\t\t\tif (timeout !== null) {\n\t\t\t\tclearTimeout(timeout);\n\t\t\t}\n\n\t\t\t// Set a new timeout, now that we've gotten a new dragover event\n\t\t\ttimeout = setTimeout(() => {\n\t\t\t\t// If it's been 100ms and no dragover event has been fired, assume the user isn't dragging anymore.\n\t\t\t\tsetPotential(false);\n\t\t\t}, 100); // 100ms was chosen by trial and error.\n\t\t\t// 10ms was too little time, and caused flicker. 100ms doesn't have a flicker, and turns off potential without a noticeable delay\n\t\t});\n\t\tsetSingleton(false);\n\t}\n\n\treturn suppress ? (\n\t\t<>{children}</>\n\t) : (\n\t\t<div\n\t\t\tclassName={`dropZone ${isDragging ? \"isDragging\" : potential ? \"isPotential\" : \"\"}`}\n\t\t\tonDragEnter={(e) => {\n\t\t\t\tpreventDefaults(e);\n\t\t\t\tsetIsDragging(true);\n\t\t\t}}\n\t\t\tonDragLeave={(e) => {\n\t\t\t\tpreventDefaults(e);\n\t\t\t\tsetIsDragging(false);\n\t\t\t}}\n\t\t\tonDrop={(e) => {\n\t\t\t\tsetIsDragging(false);\n\n\t\t\t\tconst { files } = e.dataTransfer;\n\t\t\t\tfor (let i = 0; i < files.length; i++) {\n\t\t\t\t\tif (files[i] === null) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tprocessFile(files[i], i);\n\t\t\t\t}\n\n\t\t\t\tpreventDefaults(e);\n\t\t\t}}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownButton.js","sourceRoot":"","sources":["../../../src/components/common/DropdownButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAS9E,MAAM,cAAc,GAAiE,CAAC,EACrF,WAAW,GAAG,OAAO,EACrB,aAAa,GAAG,EAAE,EAClB,UAAU,GAC2B,EAAE,EAAE;IACzC,MAAM,UAAU,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAChD,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEhD,uBAAuB,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;IAE9D,MAAM,OAAO,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CACpD,6BACC,GAAG,EAAE,KAAK,EACV,SAAS,EAAC,uCAAuC,EACjD,OAAO,EAAE,GAAG,EAAE;YACb,MAAM,CAAC,YAAY,EAAE,CAAC;YACtB,WAAW,CAAC,KAAK,CAAC,CAAC;QACpB,CAAC,IAEA,MAAM,CAAC,WAAW,CACd,CACN,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,GAAG,EAAE;QACzB,IAAI,QAAQ,EAAE;YACb,WAAW,CAAC,KAAK,CAAC,CAAC;YACnB,OAAO;SACP;QAED,IAAI,UAAU,EAAE;YACf,UAAU,EAAE,CAAC;SACb;aAAM;YACN,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,CAAC;SAC7B;IACF,CAAC,CAAC;IAEF,OAAO,CACN,6BAAK,GAAG,EAAE,UAAU,EAAE,SAAS,EAAC,0CAA0C;QACzE,6BAAK,SAAS,EAAC,gCAAgC;YAC9C,8BAAM,SAAS,EAAC,WAAW,EAAC,OAAO,EAAE,YAAY,IAC/C,WAAW,CACN;YACP,8BAAM,SAAS,EAAC,WAAW,GAAQ;YACnC,6BAAK,SAAS,EAAC,gBAAgB,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC;gBACpE,8BAAM,SAAS,EAAC,OAAO,GAAQ,CAC1B,CACD;QACL,QAAQ,CAAC,CAAC,CAAC,6BAAK,SAAS,EAAC,wCAAwC,IAAE,OAAO,CAAO,CAAC,CAAC,CAAC,IAAI,CACrF,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import React, { useState, useRef } from \"react\";\
|
|
1
|
+
{"version":3,"file":"DropdownButton.js","sourceRoot":"","sources":["../../../src/components/common/DropdownButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,6BAA6B,CAA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C,WAAW,CAAC,CAAC,QAAQ,CAAC;gBACpE,8BAAM,SAAS,EAAC,OAAO,GAAQ,CAC1B,CACD;QACL,QAAQ,CAAC,CAAC,CAAC,6BAAK,SAAS,EAAC,wCAAwC,IAAE,OAAO,CAAO,CAAC,CAAC,CAAC,IAAI,CACrF,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import React, { useState, useRef } from \"react\";\nimport \"../../assets/css/button.css\";\nimport { useOutsideClickDetector } from \"../../hooks/useOutsideClickDetector\";\nimport { IFinsembleButtonProps } from \"../shared/Button\";\n\nexport interface IFinsembleDropdownActionButtonProps {\n\tbuttonLabel: string;\n\tbuttonOptions: Array<IFinsembleButtonProps>;\n\tmainAction: Function;\n}\n\nconst DropdownButton: React.FunctionComponent<IFinsembleDropdownActionButtonProps> = ({\n\tbuttonLabel = \"Label\",\n\tbuttonOptions = [],\n\tmainAction,\n}: IFinsembleDropdownActionButtonProps) => {\n\tconst wrapperRef = useRef<HTMLDivElement>(null);\n\tconst [expanded, setExpanded] = useState(false);\n\n\tuseOutsideClickDetector(wrapperRef, () => setExpanded(false));\n\n\tconst options = buttonOptions.map((option, index) => (\n\t\t<div\n\t\t\tkey={index}\n\t\t\tclassName=\"finsemble-dropdown-action__btn-option\"\n\t\t\tonClick={() => {\n\t\t\t\toption.clickHandler();\n\t\t\t\tsetExpanded(false);\n\t\t\t}}\n\t\t>\n\t\t\t{option.buttonLabel}\n\t\t</div>\n\t));\n\n\tconst buttonAction = () => {\n\t\tif (expanded) {\n\t\t\tsetExpanded(false);\n\t\t\treturn;\n\t\t}\n\n\t\tif (mainAction) {\n\t\t\tmainAction();\n\t\t} else {\n\t\t\t() => setExpanded(!expanded);\n\t\t}\n\t};\n\n\treturn (\n\t\t<div ref={wrapperRef} className=\"finsemble-dropdown-action__btn-container\">\n\t\t\t<div className=\"finsemble-dropdown-action__btn\">\n\t\t\t\t<span className=\"btn-label\" onClick={buttonAction}>\n\t\t\t\t\t{buttonLabel}\n\t\t\t\t</span>\n\t\t\t\t<span className=\"separator\"></span>\n\t\t\t\t<div className=\"expand-options\" onClick={() => setExpanded(!expanded)}>\n\t\t\t\t\t<span className=\"caret\"></span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{expanded ? <div className=\"finsemble-dropdown-action__btn-options\">{options}</div> : null}\n\t\t</div>\n\t);\n};\n\nexport default DropdownButton;\n"]}
|
|
@@ -17,5 +17,6 @@ export declare type FileInputProps = {
|
|
|
17
17
|
uploadFunction?: FileInputUploadCb;
|
|
18
18
|
presetFile?: null | File;
|
|
19
19
|
suppressDropzone?: boolean;
|
|
20
|
+
disabled?: boolean;
|
|
20
21
|
};
|
|
21
|
-
export declare const FileInput: ({ acceptTypes, value, onSetValue, id, shouldUpload, uploadFunction, presetFile, suppressDropzone, }: FileInputProps) => JSX.Element;
|
|
22
|
+
export declare const FileInput: ({ acceptTypes, value, onSetValue, id, shouldUpload, uploadFunction, presetFile, suppressDropzone, disabled, }: FileInputProps) => JSX.Element;
|
|
@@ -6,6 +6,7 @@ import React, { useState, useRef, useEffect } from "react";
|
|
|
6
6
|
import { SmartDesktopDesignerActions } from "../../actions/smartDesktopDesignerActions";
|
|
7
7
|
import { useDispatch } from "../../store";
|
|
8
8
|
import { Button } from "./Button";
|
|
9
|
+
import { ButtonIcon } from "./ButtonIcon";
|
|
9
10
|
import "./css/file-input.css";
|
|
10
11
|
import { DropZone } from "./DropZone";
|
|
11
12
|
import { validateFilename } from "./file_helpers";
|
|
@@ -16,7 +17,7 @@ const INVALID_FILE_TYPE_ERROR = {
|
|
|
16
17
|
const defaultUploadFunction = async () => {
|
|
17
18
|
return { err: null, path: "" };
|
|
18
19
|
};
|
|
19
|
-
export const FileInput = ({ acceptTypes, value, onSetValue, id, shouldUpload = true, uploadFunction = defaultUploadFunction, presetFile = null, suppressDropzone = false, }) => {
|
|
20
|
+
export const FileInput = ({ acceptTypes, value, onSetValue, id, shouldUpload = true, uploadFunction = defaultUploadFunction, presetFile = null, suppressDropzone = false, disabled = false, }) => {
|
|
20
21
|
const dispatch = useDispatch();
|
|
21
22
|
const fileInputElement = useRef({});
|
|
22
23
|
const [isUploading, setIsUploading] = useState(false);
|
|
@@ -89,12 +90,16 @@ export const FileInput = ({ acceptTypes, value, onSetValue, id, shouldUpload = t
|
|
|
89
90
|
return (React.createElement(DropZone, { processFile: processFile, suppress: suppressDropzone },
|
|
90
91
|
React.createElement("div", { className: "file-input-container" },
|
|
91
92
|
React.createElement("div", { className: "file-input-actions" },
|
|
92
|
-
React.createElement("input", { ref: fileInputElement, type: "file", onChange: onFileChange, accept: acceptTypes.join(", "), tabIndex: -1, "aria-hidden": "true" }),
|
|
93
|
-
React.createElement(Button, { fashion: "primary", text: "
|
|
93
|
+
React.createElement("input", { ref: fileInputElement, disabled: disabled, type: "file", onChange: onFileChange, accept: acceptTypes.join(", "), tabIndex: -1, "aria-hidden": "true" }),
|
|
94
|
+
React.createElement(Button, { fashion: "primary", text: "Select file", disabled: disabled, onClick: () => {
|
|
94
95
|
fileInputElement.current.click();
|
|
95
96
|
} })),
|
|
96
97
|
React.createElement("div", { className: "file-input-value" },
|
|
97
|
-
React.createElement("
|
|
98
|
+
React.createElement("span", Object.assign({ className: `file-input-value-input ${isInvalid && "invalid"}` }, { id }), path),
|
|
99
|
+
path !== "" && (React.createElement(ButtonIcon, { text: "Cancel", icon: "times", onClick: () => {
|
|
100
|
+
setPath("");
|
|
101
|
+
onSetValue === null || onSetValue === void 0 ? void 0 : onSetValue("");
|
|
102
|
+
} })),
|
|
98
103
|
errorMessage && React.createElement("div", { className: "file-input-error" }, errorMessage)),
|
|
99
104
|
React.createElement("div", { className: "file-input-status" }, isUploading ? (React.createElement("div", { className: "file-input-progress-container" },
|
|
100
105
|
uploadProgress,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileInput.js","sourceRoot":"","sources":["../../../src/components/common/FileInput.tsx"],"names":[],"mappings":"AAAA;;;GAGG;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,6BAAK,SAAS,EAAC,oBAAoB;gBAClC,+BACC,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAC,MAAM,EACX,QAAQ,EAAE,YAAY,EACtB,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAC9B,QAAQ,EAAE,CAAC,CAAC,iBACA,MAAM,GACjB;gBACF,oBAAC,MAAM,IACN,OAAO,EAAC,SAAS,EACjB,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,GAAG,EAAE;wBACb,gBAAgB,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;oBAClC,CAAC,GACA,CACG;YACN,6BAAK,SAAS,EAAC,kBAAkB;gBAChC,6CACC,SAAS,EAAC,wBAAwB,EAClC,IAAI,EAAC,MAAM,EACX,QAAQ,QACR,KAAK,EAAE,IAAI,kBACG,SAAS,IACnB,EAAE,EAAE,EAAE,EACF;gBACR,YAAY,IAAI,6BAAK,SAAS,EAAC,kBAAkB,IAAE,YAAY,CAAO,CAClE;YACN,6BAAK,SAAS,EAAC,mBAAmB,IAChC,WAAW,CAAC,CAAC,CAAC,CACd,6BAAK,SAAS,EAAC,+BAA+B;gBAAE,cAAc;6BAAiB,CAC/E,CAAC,CAAC,CAAC,CACH,CAAC,YAAY,IAAI,yCAAK,CACtB,CACI,CACD,CACI,CACX,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport React, { useState, useRef, useEffect } from \"react\";\r\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\r\nimport { useDispatch } from \"../../store\";\r\nimport { ProjectError } from \"../../types/smartDesktopDesignerTypes\";\r\n\r\nimport { Button } from \"./Button\";\r\nimport \"./css/file-input.css\";\r\n\r\nimport { DropZone, FileWithPath } from \"./DropZone\";\r\nimport { validateFilename } from \"./file_helpers\";\r\n\r\nexport type FileInputUploadCb = (\r\n\tfileObject: File,\r\n\tcb?: (progress: number) => void\r\n) => Promise<{ err: string | null; path: string }>;\r\n\r\nexport type FileInputProps = {\r\n\tacceptTypes: string[];\r\n\tvalue: string;\r\n\tid?: string;\r\n\tshouldUpload?: boolean;\r\n\tonSetValue?: (value: string) => void;\r\n\tuploadFunction?: FileInputUploadCb;\r\n\tpresetFile?: null | File;\r\n\tsuppressDropzone?: boolean;\r\n};\r\n\r\nconst INVALID_FILE_TYPE_ERROR: ProjectError = {\r\n\tviewId: \"themes\",\r\n\tmessage: \"Your uploaded file is not in the correct format\",\r\n};\r\n\r\nconst defaultUploadFunction = async () => {\r\n\treturn { err: null, path: \"\" };\r\n};\r\n\r\n/**\r\n * A Browse button with a hidden file input to allow for a file select dialog and extraction of a path\r\n *\r\n * @param {FileInputProps} { acceptTypes, value, onSetValue, shouldUpload=true, uploadFunction = defaultUploadFunction}\r\n * @return {*}\r\n */\r\nexport const FileInput = ({\r\n\tacceptTypes,\r\n\tvalue,\r\n\tonSetValue,\r\n\tid,\r\n\tshouldUpload = true,\r\n\tuploadFunction = defaultUploadFunction,\r\n\tpresetFile = null,\r\n\tsuppressDropzone = false,\r\n}: FileInputProps) => {\r\n\tconst dispatch = useDispatch();\r\n\tconst fileInputElement = useRef({} as HTMLInputElement);\r\n\tconst [isUploading, setIsUploading] = useState(false);\r\n\tconst [uploadProgress, setUploadProgress] = useState(0);\r\n\tconst [fileInput, setFileInput] = useState({} as HTMLInputElement); // cast to correct type so typescript doesn't complain\r\n\tconst [path, setPath] = useState(value || \"\");\r\n\tconst [errorMessage, setErrorMessage] = useState(null as string | null);\r\n\tconst [handedFile, setHandedFile] = useState<FileWithPath | null>(presetFile);\r\n\r\n\tconst isInvalid = validateFilename(acceptTypes, path);\r\n\r\n\tconst uploadSuccess = ({ err, path: successPath }: { err: string | null; path: string }) => {\r\n\t\tif (err) {\r\n\t\t\tdispatch(SmartDesktopDesignerActions.set_project_error(INVALID_FILE_TYPE_ERROR));\r\n\r\n\t\t\tsetErrorMessage(err);\r\n\t\t\tsetPath(\"\");\r\n\t\t} else {\r\n\t\t\tdispatch(SmartDesktopDesignerActions.delete_project_error(INVALID_FILE_TYPE_ERROR));\r\n\t\t\tsetErrorMessage(null);\r\n\t\t\tsetPath(successPath);\r\n\r\n\t\t\tonSetValue?.(successPath);\r\n\r\n\t\t\tfileInput.value = \"\";\r\n\t\t}\r\n\t};\r\n\r\n\tconst uploadError = (err: string) => {\r\n\t\tsetErrorMessage(err);\r\n\t};\r\n\r\n\tconst uploadFile = (fileObj: FileWithPath | undefined) => {\r\n\t\t// If it's not a file, we can't do anything with it\r\n\t\tif (!(fileObj instanceof File)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tsetIsUploading(true);\r\n\t\tuploadFunction?.(fileObj, (progress: number) => {\r\n\t\t\tsetUploadProgress(progress);\r\n\t\t})\r\n\t\t\t.then(uploadSuccess)\r\n\t\t\t.catch(uploadError)\r\n\t\t\t.finally(() => {\r\n\t\t\t\tsetIsUploading(false);\r\n\t\t\t\tsetUploadProgress(0);\r\n\t\t\t});\r\n\t};\r\n\r\n\tconst processFile = (fileObj: FileWithPath) => {\r\n\t\tif (shouldUpload) {\r\n\t\t\tuploadFile(fileObj);\r\n\t\t} else if (fileObj?.path) {\r\n\t\t\t// If the consumer doesn't want the file actually uploaded, just return the file name\r\n\t\t\tuploadSuccess({\r\n\t\t\t\terr: null,\r\n\t\t\t\tpath: fileObj.path,\r\n\t\t\t});\r\n\t\t}\r\n\t\tsetIsUploading(false);\r\n\t\tsetUploadProgress(0);\r\n\t\tsetErrorMessage(null);\r\n\t};\r\n\r\n\tuseEffect(() => {\r\n\t\tsetPath(value || \"\");\r\n\t}, [value]);\r\n\r\n\tconst onFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n\t\tconst fileObj = e.target.files?.[0] as FileWithPath | undefined;\r\n\r\n\t\tif (fileObj !== undefined) {\r\n\t\t\tprocessFile(fileObj);\r\n\t\t}\r\n\r\n\t\tsetFileInput(e.target);\r\n\t};\r\n\r\n\t// Check if props updated\r\n\tif (handedFile !== presetFile) {\r\n\t\tsetHandedFile(presetFile);\r\n\t\tif (presetFile !== null) {\r\n\t\t\tuploadFile(presetFile);\r\n\t\t}\r\n\t}\r\n\r\n\treturn (\r\n\t\t<DropZone processFile={processFile} suppress={suppressDropzone}>\r\n\t\t\t<div className=\"file-input-container\">\r\n\t\t\t\t<div className=\"file-input-actions\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\tref={fileInputElement}\r\n\t\t\t\t\t\ttype=\"file\"\r\n\t\t\t\t\t\tonChange={onFileChange}\r\n\t\t\t\t\t\taccept={acceptTypes.join(\", \")}\r\n\t\t\t\t\t\ttabIndex={-1}\r\n\t\t\t\t\t\taria-hidden=\"true\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<Button\r\n\t\t\t\t\t\tfashion=\"primary\"\r\n\t\t\t\t\t\ttext=\"Browse\"\r\n\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\tfileInputElement.current.click();\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t/>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div className=\"file-input-value\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\tclassName=\"file-input-value-input\"\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\tvalue={path}\r\n\t\t\t\t\t\taria-invalid={isInvalid}\r\n\t\t\t\t\t\t{...{ id }}\r\n\t\t\t\t\t></input>\r\n\t\t\t\t\t{errorMessage && <div className=\"file-input-error\">{errorMessage}</div>}\r\n\t\t\t\t</div>\r\n\t\t\t\t<div className=\"file-input-status\">\r\n\t\t\t\t\t{isUploading ? (\r\n\t\t\t\t\t\t<div className=\"file-input-progress-container\">{uploadProgress}% uploaded</div>\r\n\t\t\t\t\t) : (\r\n\t\t\t\t\t\t!errorMessage && <></>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</div>\r\n\t\t\t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AC,CAAC,CAAC,CACH,CAAC,YAAY,IAAI,yCAAK,CACtB,CACI,CACD,CACI,CACX,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React, { useState, useRef, useEffect } from \"react\";\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\nimport { useDispatch } from \"../../store\";\nimport { ProjectError } from \"../../types/smartDesktopDesignerTypes\";\n\nimport { Button } from \"./Button\";\nimport { ButtonIcon } from \"./ButtonIcon\";\nimport \"./css/file-input.css\";\n\nimport { DropZone, FileWithPath } from \"./DropZone\";\nimport { validateFilename } from \"./file_helpers\";\n\nexport type FileInputUploadCb = (\n\tfileObject: File,\n\tcb?: (progress: number) => void\n) => Promise<{ err: string | null; path: string }>;\n\nexport type FileInputProps = {\n\tacceptTypes: string[];\n\tvalue: string;\n\tid?: string;\n\tshouldUpload?: boolean;\n\tonSetValue?: (value: string) => void;\n\tuploadFunction?: FileInputUploadCb;\n\tpresetFile?: null | File;\n\tsuppressDropzone?: boolean;\n\tdisabled?: boolean;\n};\n\nconst INVALID_FILE_TYPE_ERROR: ProjectError = {\n\tviewId: \"themes\",\n\tmessage: \"Your uploaded file is not in the correct format\",\n};\n\nconst defaultUploadFunction = async () => {\n\treturn { err: null, path: \"\" };\n};\n\n/**\n * A Browse button with a hidden file input to allow for a file select dialog and extraction of a path\n *\n * @param {FileInputProps} { acceptTypes, value, onSetValue, shouldUpload=true, uploadFunction = defaultUploadFunction}\n * @return {*}\n */\nexport const FileInput = ({\n\tacceptTypes,\n\tvalue,\n\tonSetValue,\n\tid,\n\tshouldUpload = true,\n\tuploadFunction = defaultUploadFunction,\n\tpresetFile = null,\n\tsuppressDropzone = false,\n\tdisabled = false,\n}: FileInputProps) => {\n\tconst dispatch = useDispatch();\n\tconst fileInputElement = useRef({} as HTMLInputElement);\n\tconst [isUploading, setIsUploading] = useState(false);\n\tconst [uploadProgress, setUploadProgress] = useState(0);\n\tconst [fileInput, setFileInput] = useState({} as HTMLInputElement); // cast to correct type so typescript doesn't complain\n\tconst [path, setPath] = useState(value || \"\");\n\tconst [errorMessage, setErrorMessage] = useState(null as string | null);\n\tconst [handedFile, setHandedFile] = useState<FileWithPath | null>(presetFile);\n\n\tconst isInvalid = validateFilename(acceptTypes, path);\n\n\tconst uploadSuccess = ({ err, path: successPath }: { err: string | null; path: string }) => {\n\t\tif (err) {\n\t\t\tdispatch(SmartDesktopDesignerActions.set_project_error(INVALID_FILE_TYPE_ERROR));\n\n\t\t\tsetErrorMessage(err);\n\t\t\tsetPath(\"\");\n\t\t} else {\n\t\t\tdispatch(SmartDesktopDesignerActions.delete_project_error(INVALID_FILE_TYPE_ERROR));\n\t\t\tsetErrorMessage(null);\n\t\t\tsetPath(successPath);\n\n\t\t\tonSetValue?.(successPath);\n\n\t\t\tfileInput.value = \"\";\n\t\t}\n\t};\n\n\tconst uploadError = (err: string) => {\n\t\tsetErrorMessage(err);\n\t};\n\n\tconst uploadFile = (fileObj: FileWithPath | undefined) => {\n\t\t// If it's not a file, we can't do anything with it\n\t\tif (!(fileObj instanceof File)) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetIsUploading(true);\n\t\tuploadFunction?.(fileObj, (progress: number) => {\n\t\t\tsetUploadProgress(progress);\n\t\t})\n\t\t\t.then(uploadSuccess)\n\t\t\t.catch(uploadError)\n\t\t\t.finally(() => {\n\t\t\t\tsetIsUploading(false);\n\t\t\t\tsetUploadProgress(0);\n\t\t\t});\n\t};\n\n\tconst processFile = (fileObj: FileWithPath) => {\n\t\tif (shouldUpload) {\n\t\t\tuploadFile(fileObj);\n\t\t} else if (fileObj?.path) {\n\t\t\t// If the consumer doesn't want the file actually uploaded, just return the file name\n\t\t\tuploadSuccess({\n\t\t\t\terr: null,\n\t\t\t\tpath: fileObj.path,\n\t\t\t});\n\t\t}\n\t\tsetIsUploading(false);\n\t\tsetUploadProgress(0);\n\t\tsetErrorMessage(null);\n\t};\n\n\tuseEffect(() => {\n\t\tsetPath(value || \"\");\n\t}, [value]);\n\n\tconst onFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n\t\tconst fileObj = e.target.files?.[0] as FileWithPath | undefined;\n\n\t\tif (fileObj !== undefined) {\n\t\t\tprocessFile(fileObj);\n\t\t}\n\n\t\tsetFileInput(e.target);\n\t};\n\n\t// Check if props updated\n\tif (handedFile !== presetFile) {\n\t\tsetHandedFile(presetFile);\n\t\tif (presetFile !== null) {\n\t\t\tuploadFile(presetFile);\n\t\t}\n\t}\n\n\treturn (\n\t\t<DropZone processFile={processFile} suppress={suppressDropzone}>\n\t\t\t<div className=\"file-input-container\">\n\t\t\t\t<div className=\"file-input-actions\">\n\t\t\t\t\t<input\n\t\t\t\t\t\tref={fileInputElement}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\ttype=\"file\"\n\t\t\t\t\t\tonChange={onFileChange}\n\t\t\t\t\t\taccept={acceptTypes.join(\", \")}\n\t\t\t\t\t\ttabIndex={-1}\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t/>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tfashion=\"primary\"\n\t\t\t\t\t\ttext=\"Select file\"\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tfileInputElement.current.click();\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"file-input-value\">\n\t\t\t\t\t<span className={`file-input-value-input ${isInvalid && \"invalid\"}`} {...{ id }}>\n\t\t\t\t\t\t{path}\n\t\t\t\t\t</span>\n\t\t\t\t\t{path !== \"\" && (\n\t\t\t\t\t\t<ButtonIcon\n\t\t\t\t\t\t\ttext=\"Cancel\"\n\t\t\t\t\t\t\ticon=\"times\"\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tsetPath(\"\");\n\t\t\t\t\t\t\t\tonSetValue?.(\"\");\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t{errorMessage && <div className=\"file-input-error\">{errorMessage}</div>}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"file-input-status\">\n\t\t\t\t\t{isUploading ? (\n\t\t\t\t\t\t<div className=\"file-input-progress-container\">{uploadProgress}% uploaded</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t!errorMessage && <></>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</DropZone>\n\t);\n};\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import "./css/icon.css";
|
|
3
|
-
export declare type FinsembleIconType = "
|
|
3
|
+
export declare type FinsembleIconType = "alwaysOnTop" | "caret" | "check-square" | "check" | "chevron-left" | "chevron-right" | "close" | "copy" | "documentation" | "exclamation-circle" | "external-link" | "flag" | "folder" | "font" | "globe" | "hdd" | "key" | "life-ring" | "linker" | "lock" | "magic" | "maximize" | "minimize" | "moon" | "paint-roller" | "pencil" | "plus" | "question-circle" | "search" | "sun" | "times" | "toggle-off" | "toggle-on" | "toolbar" | "tools" | "trash" | "upload" | "window";
|
|
4
4
|
export declare type FinsembleIconProps = {
|
|
5
5
|
icon: FinsembleIconType;
|
|
6
6
|
className?: string;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import "./css/icon.css";
|
|
3
|
+
import { ReactComponent as AlwaysOnTopIcon } from "../../assets/icons/always-on-top.svg";
|
|
4
|
+
import { ReactComponent as Caret } from "../../assets/icons/caret.svg";
|
|
3
5
|
import { ReactComponent as CheckIcon } from "../../assets/icons/check.svg";
|
|
4
6
|
import { ReactComponent as CheckSquare } from "../../assets/icons/check-square.svg";
|
|
5
7
|
import { ReactComponent as ChevronLeftIcon } from "../../assets/icons/chevron-left.svg";
|
|
6
8
|
import { ReactComponent as ChevronRightIcon } from "../../assets/icons/chevron-right.svg";
|
|
9
|
+
import { ReactComponent as CloseIcon } from "../../assets/icons/close.svg";
|
|
7
10
|
import { ReactComponent as CopyIcon } from "../../assets/icons/copy.svg";
|
|
11
|
+
import { ReactComponent as DocumentationIcon } from "../../assets/icons/documentation.svg";
|
|
8
12
|
import { ReactComponent as ExclaimationCircleIcon } from "../../assets/icons/exclamation-circle.svg";
|
|
9
13
|
import { ReactComponent as ExternalLinkIcon } from "../../assets/icons/external-link.svg";
|
|
10
14
|
import { ReactComponent as FlagIcon } from "../../assets/icons/flag.svg";
|
|
@@ -14,8 +18,11 @@ import { ReactComponent as GlobeIcon } from "../../assets/icons/globe.svg";
|
|
|
14
18
|
import { ReactComponent as HDDIcon } from "../../assets/icons/hdd.svg";
|
|
15
19
|
import { ReactComponent as KeyIcon } from "../../assets/icons/key.svg";
|
|
16
20
|
import { ReactComponent as LifeRingIcon } from "../../assets/icons/life-ring.svg";
|
|
21
|
+
import { ReactComponent as LinkerIcon } from "../../assets/icons/linker.svg";
|
|
17
22
|
import { ReactComponent as LockIcon } from "../../assets/icons/lock.svg";
|
|
18
23
|
import { ReactComponent as MagicIcon } from "../../assets/icons/magic.svg";
|
|
24
|
+
import { ReactComponent as MaximizeIcon } from "../../assets/icons/maximize.svg";
|
|
25
|
+
import { ReactComponent as MinimizeIcon } from "../../assets/icons/minimize.svg";
|
|
19
26
|
import { ReactComponent as MoonIcon } from "../../assets/icons/moon.svg";
|
|
20
27
|
import { ReactComponent as PaintRollerIcon } from "../../assets/icons/paint-roller.svg";
|
|
21
28
|
import { ReactComponent as PencilIcon } from "../../assets/icons/pencil.svg";
|
|
@@ -26,16 +33,21 @@ import { ReactComponent as SunIcon } from "../../assets/icons/sun.svg";
|
|
|
26
33
|
import { ReactComponent as TimesIcon } from "../../assets/icons/times.svg";
|
|
27
34
|
import { ReactComponent as ToggleOffIcon } from "../../assets/icons/toggle-off.svg";
|
|
28
35
|
import { ReactComponent as ToggleOnIcon } from "../../assets/icons/toggle-on.svg";
|
|
36
|
+
import { ReactComponent as ToolbarIcon } from "../../assets/icons/toolbar.svg";
|
|
29
37
|
import { ReactComponent as ToolsIcon } from "../../assets/icons/tools.svg";
|
|
30
38
|
import { ReactComponent as TrashIcon } from "../../assets/icons/trash.svg";
|
|
31
39
|
import { ReactComponent as UploadIcon } from "../../assets/icons/upload.svg";
|
|
32
40
|
import { ReactComponent as WindowIcon } from "../../assets/icons/window.svg";
|
|
33
41
|
const icons = {
|
|
42
|
+
alwaysOnTop: AlwaysOnTopIcon,
|
|
43
|
+
caret: Caret,
|
|
34
44
|
check: CheckIcon,
|
|
35
45
|
"check-square": CheckSquare,
|
|
36
46
|
"chevron-left": ChevronLeftIcon,
|
|
37
47
|
"chevron-right": ChevronRightIcon,
|
|
48
|
+
close: CloseIcon,
|
|
38
49
|
copy: CopyIcon,
|
|
50
|
+
documentation: DocumentationIcon,
|
|
39
51
|
"exclamation-circle": ExclaimationCircleIcon,
|
|
40
52
|
"external-link": ExternalLinkIcon,
|
|
41
53
|
flag: FlagIcon,
|
|
@@ -45,8 +57,11 @@ const icons = {
|
|
|
45
57
|
hdd: HDDIcon,
|
|
46
58
|
key: KeyIcon,
|
|
47
59
|
"life-ring": LifeRingIcon,
|
|
60
|
+
linker: LinkerIcon,
|
|
48
61
|
lock: LockIcon,
|
|
49
62
|
magic: MagicIcon,
|
|
63
|
+
maximize: MaximizeIcon,
|
|
64
|
+
minimize: MinimizeIcon,
|
|
50
65
|
moon: MoonIcon,
|
|
51
66
|
"paint-roller": PaintRollerIcon,
|
|
52
67
|
pencil: PencilIcon,
|
|
@@ -57,6 +72,7 @@ const icons = {
|
|
|
57
72
|
times: TimesIcon,
|
|
58
73
|
"toggle-off": ToggleOffIcon,
|
|
59
74
|
"toggle-on": ToggleOnIcon,
|
|
75
|
+
toolbar: ToolbarIcon,
|
|
60
76
|
tools: ToolsIcon,
|
|
61
77
|
trash: TrashIcon,
|
|
62
78
|
upload: UploadIcon,
|
|
@@ -1 +1 @@
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sourcesContent":["import React from \"react\";\nimport \"./css/icon.css\";\nimport { ReactComponent as AlwaysOnTopIcon } from \"../../assets/icons/always-on-top.svg\";\nimport { ReactComponent as Caret } from \"../../assets/icons/caret.svg\";\nimport { ReactComponent as CheckIcon } from \"../../assets/icons/check.svg\";\nimport { ReactComponent as CheckSquare } from \"../../assets/icons/check-square.svg\";\nimport { ReactComponent as ChevronLeftIcon } from \"../../assets/icons/chevron-left.svg\";\nimport { ReactComponent as ChevronRightIcon } from \"../../assets/icons/chevron-right.svg\";\nimport { ReactComponent as CloseIcon } from \"../../assets/icons/close.svg\";\nimport { ReactComponent as CopyIcon } from \"../../assets/icons/copy.svg\";\nimport { ReactComponent as DocumentationIcon } from \"../../assets/icons/documentation.svg\";\nimport { ReactComponent as ExclaimationCircleIcon } from \"../../assets/icons/exclamation-circle.svg\";\nimport { ReactComponent as ExternalLinkIcon } from \"../../assets/icons/external-link.svg\";\nimport { ReactComponent as FlagIcon } from \"../../assets/icons/flag.svg\";\nimport { ReactComponent as FolderIcon } from \"../../assets/icons/folder.svg\";\nimport { ReactComponent as FontIcon } from \"../../assets/icons/font.svg\";\nimport { ReactComponent as GlobeIcon } from \"../../assets/icons/globe.svg\";\nimport { ReactComponent as HDDIcon } from \"../../assets/icons/hdd.svg\";\nimport { ReactComponent as KeyIcon } from \"../../assets/icons/key.svg\";\nimport { ReactComponent as LifeRingIcon } from \"../../assets/icons/life-ring.svg\";\nimport { ReactComponent as LinkerIcon } from \"../../assets/icons/linker.svg\";\nimport { ReactComponent as LockIcon } from \"../../assets/icons/lock.svg\";\nimport { ReactComponent as MagicIcon } from \"../../assets/icons/magic.svg\";\nimport { ReactComponent as MaximizeIcon } from \"../../assets/icons/maximize.svg\";\nimport { ReactComponent as MinimizeIcon } from \"../../assets/icons/minimize.svg\";\nimport { ReactComponent as MoonIcon } from \"../../assets/icons/moon.svg\";\nimport { ReactComponent as PaintRollerIcon } from \"../../assets/icons/paint-roller.svg\";\nimport { ReactComponent as PencilIcon } from \"../../assets/icons/pencil.svg\";\nimport { ReactComponent as PlusIcon } from \"../../assets/icons/plus.svg\";\nimport { ReactComponent as QuestionCircleIcon } from \"../../assets/icons/question-circle.svg\";\nimport { ReactComponent as SearchIcon } from \"../../assets/icons/search.svg\";\nimport { ReactComponent as SunIcon } from \"../../assets/icons/sun.svg\";\nimport { ReactComponent as TimesIcon } from \"../../assets/icons/times.svg\";\nimport { ReactComponent as ToggleOffIcon } from \"../../assets/icons/toggle-off.svg\";\nimport { ReactComponent as ToggleOnIcon } from \"../../assets/icons/toggle-on.svg\";\nimport { ReactComponent as ToolbarIcon } from \"../../assets/icons/toolbar.svg\";\nimport { ReactComponent as ToolsIcon } from \"../../assets/icons/tools.svg\";\nimport { ReactComponent as TrashIcon } from \"../../assets/icons/trash.svg\";\nimport { ReactComponent as UploadIcon } from \"../../assets/icons/upload.svg\";\nimport { ReactComponent as WindowIcon } from \"../../assets/icons/window.svg\";\n\nexport type FinsembleIconType =\n\t| \"alwaysOnTop\"\n\t| \"caret\"\n\t| \"check-square\"\n\t| \"check\"\n\t| \"chevron-left\"\n\t| \"chevron-right\"\n\t| \"close\"\n\t| \"copy\"\n\t| \"documentation\"\n\t| \"exclamation-circle\"\n\t| \"external-link\"\n\t| \"flag\"\n\t| \"folder\"\n\t| \"font\"\n\t| \"globe\"\n\t| \"hdd\"\n\t| \"key\"\n\t| \"life-ring\"\n\t| \"linker\"\n\t| \"lock\"\n\t| \"magic\"\n\t| \"maximize\"\n\t| \"minimize\"\n\t| \"moon\"\n\t| \"paint-roller\"\n\t| \"pencil\"\n\t| \"plus\"\n\t| \"question-circle\"\n\t| \"search\"\n\t| \"sun\"\n\t| \"times\"\n\t| \"toggle-off\"\n\t| \"toggle-on\"\n\t| \"toolbar\"\n\t| \"tools\"\n\t| \"trash\"\n\t| \"upload\"\n\t| \"window\";\n\ntype IconComponents = {\n\t[key in FinsembleIconType]: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;\n};\n\nconst icons: IconComponents = {\n\talwaysOnTop: AlwaysOnTopIcon,\n\tcaret: Caret,\n\tcheck: CheckIcon,\n\t\"check-square\": CheckSquare,\n\t\"chevron-left\": ChevronLeftIcon,\n\t\"chevron-right\": ChevronRightIcon,\n\tclose: CloseIcon,\n\tcopy: CopyIcon,\n\tdocumentation: DocumentationIcon,\n\t\"exclamation-circle\": ExclaimationCircleIcon,\n\t\"external-link\": ExternalLinkIcon,\n\tflag: FlagIcon,\n\tfolder: FolderIcon,\n\tfont: FontIcon,\n\tglobe: GlobeIcon,\n\thdd: HDDIcon,\n\tkey: KeyIcon,\n\t\"life-ring\": LifeRingIcon,\n\tlinker: LinkerIcon,\n\tlock: LockIcon,\n\tmagic: MagicIcon,\n\tmaximize: MaximizeIcon,\n\tminimize: MinimizeIcon,\n\tmoon: MoonIcon,\n\t\"paint-roller\": PaintRollerIcon,\n\tpencil: PencilIcon,\n\tplus: PlusIcon,\n\t\"question-circle\": QuestionCircleIcon,\n\tsearch: SearchIcon,\n\tsun: SunIcon,\n\ttimes: TimesIcon,\n\t\"toggle-off\": ToggleOffIcon,\n\t\"toggle-on\": ToggleOnIcon,\n\ttoolbar: ToolbarIcon,\n\ttools: ToolsIcon,\n\ttrash: TrashIcon,\n\tupload: UploadIcon,\n\twindow: WindowIcon,\n};\n\nexport type FinsembleIconProps = {\n\ticon: FinsembleIconType;\n\tclassName?: string;\n\tonClick?: (e: React.MouseEvent) => void;\n};\n\nexport const FinsembleIcon = (props: FinsembleIconProps) => {\n\tconst Icon = icons[props.icon];\n\n\treturn (\n\t\t<span\n\t\t\tclassName={[\"finsemble-icon\", `finsemble-icon-${props.icon}`, props.className || \"\"].join(\" \")}\n\t\t\trole=\"img\"\n\t\t\taria-label={`${props.icon} icon`}\n\t\t\tonClick={(e) => props.onClick && props.onClick(e)}\n\t\t>\n\t\t\t{Icon && <Icon></Icon>}\n\t\t</span>\n\t);\n};\n"]}
|