@finsemble/finsemble-ui 6.4.0 → 6.6.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +31 -28
- package/react/actions/smartDesktopDesignerActions.d.ts +6 -2
- package/react/actions/smartDesktopDesignerActions.js +2 -0
- package/react/actions/smartDesktopDesignerActions.js.map +1 -1
- package/react/assets/css/finsemble.css +0 -1
- package/react/assets/css/userPreferences.css +6 -0
- package/react/assets/icons/code-block.svg +15 -0
- package/react/componentTemplateGenerator.js +1 -1
- package/react/componentTemplateGenerator.js.map +1 -1
- package/react/components/FinsembleProvider.js.map +1 -1
- package/react/components/appCatalog/AppCatalogComponent.d.ts +1 -1
- package/react/components/appCatalog/components/Showcase/ImageCarousel.d.ts +3 -3
- package/react/components/appCatalog/components/Showcase/SupportNotes.d.ts +1 -1
- package/react/components/appCatalog/modules/FDC3.d.ts +1 -1
- package/react/components/appCatalog/modules/FDC3.js.map +1 -1
- package/react/components/appCatalog/stores/appStore.d.ts +2 -2
- package/react/components/appCatalog/stores/appStore.js.map +1 -1
- package/react/components/appCatalog/stores/storeActions.d.ts +1 -1
- package/react/components/common/Checkbox.js +1 -1
- package/react/components/common/Checkbox.js.map +1 -1
- package/react/components/common/DropZone.js +3 -1
- package/react/components/common/DropZone.js.map +1 -1
- package/react/components/common/FileInput.d.ts +2 -1
- package/react/components/common/FileInput.js +2 -2
- package/react/components/common/FileInput.js.map +1 -1
- package/react/components/common/FinsembleIcon.d.ts +1 -1
- package/react/components/common/FinsembleIcon.js +2 -0
- package/react/components/common/FinsembleIcon.js.map +1 -1
- package/react/components/common/FinsembleSelect.js +1 -1
- package/react/components/common/FinsembleSelect.js.map +1 -1
- package/react/components/common/ImagePreview.js +1 -1
- package/react/components/common/ImagePreview.js.map +1 -1
- package/react/components/common/Tooltip.js +3 -1
- package/react/components/common/Tooltip.js.map +1 -1
- package/react/components/common/css/application-edit-page.css +4 -1
- package/react/components/common/css/application-list.css +4 -0
- package/react/components/common/css/preload-edit-page.css +37 -0
- package/react/components/common/helpers.js +1 -0
- package/react/components/common/helpers.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/tests/Accordion.spec.js +1 -1
- package/react/components/common/tests/Accordion.spec.js.map +1 -1
- package/react/components/common/tests/FileInput.spec.js +8 -1
- package/react/components/common/tests/FileInput.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleSelect.spec.js +1 -1
- package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleToggle.spec.js +2 -2
- package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
- package/react/components/favorites/FavoriteMaker.js.map +1 -1
- package/react/components/favorites/FavoritesShell.spec.js +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/fdc3Resolver/ResolverContainer.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/icon/Icon.d.ts +4 -3
- package/react/components/icon/Icon.js +22 -12
- package/react/components/icon/Icon.js.map +1 -1
- package/react/components/legacyControls/FinsembleDnDContext.d.ts +2 -1
- package/react/components/legacyControls/FinsembleDnDContext.js +8 -6
- package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js +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/remoteRedux.d.ts +1 -1
- package/react/components/linker/remoteRedux.js.map +1 -1
- package/react/components/menu/MenuAutoResizer.js.map +1 -1
- package/react/components/menu/MenuPortal.js +20 -1
- package/react/components/menu/MenuPortal.js.map +1 -1
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
- package/react/components/notifications/components/shared/CheckButton.d.ts +1 -1
- package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.d.ts +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
- package/react/components/notifications/components/shared/OverflowMenu.d.ts +1 -1
- package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.d.ts +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.d.ts +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.d.ts +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.d.ts +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.d.ts +1 -1
- package/react/components/notifications/components/views/ListView.js.map +1 -1
- package/react/components/notifications/components/views/NotificationDetailsView.d.ts +1 -1
- package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
- package/react/components/notifications/types.d.ts +1 -1
- package/react/components/notifications/types.js.map +1 -1
- package/react/components/notifications/utils.d.ts +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.d.ts +4 -11
- package/react/components/processMonitor/ProcessMonitorTypes.js.map +1 -1
- package/react/components/processMonitor/components/ChildWindow.js +5 -10
- package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
- package/react/components/processMonitor/components/ListHeader.d.ts +1 -1
- package/react/components/processMonitor/components/ListHeader.js.map +1 -1
- package/react/components/processMonitor/components/ProcessStatistics.js +8 -10
- package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
- package/react/components/processMonitor/constants.d.ts +0 -2
- package/react/components/processMonitor/constants.js +0 -2
- package/react/components/processMonitor/constants.js.map +1 -1
- package/react/components/processMonitor/helpers.d.ts +0 -11
- package/react/components/processMonitor/helpers.js +1 -9
- package/react/components/processMonitor/helpers.js.map +1 -1
- package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +6 -14
- package/react/components/processMonitor/stores/ProcessMonitorStore.js +22 -62
- package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
- package/react/components/{smartDesktopDesigner → sdd}/AddApp.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/AddApp.js +0 -0
- package/react/components/sdd/AddApp.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/AppEditAccess.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/AppEditAccess.js +0 -0
- package/react/components/sdd/AppEditAccess.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/AppEditPage.d.ts +2 -1
- package/react/components/{smartDesktopDesigner → sdd}/AppEditPage.js +77 -73
- package/react/components/sdd/AppEditPage.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Appearance.css +8 -0
- package/react/components/{smartDesktopDesigner → sdd}/Appearance.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Appearance.helpers.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Appearance.helpers.js +0 -0
- package/react/components/sdd/Appearance.helpers.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Appearance.js +0 -0
- package/react/components/sdd/Appearance.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Application.d.ts +10 -3
- package/react/components/sdd/Application.js +220 -0
- package/react/components/sdd/Application.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Applications.d.ts +2 -0
- package/react/components/{smartDesktopDesigner → sdd}/Applications.js +17 -7
- package/react/components/sdd/Applications.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/AssetsPage.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/AssetsPage.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/AssetsPage.js +0 -0
- package/react/components/sdd/AssetsPage.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Authentication.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Authentication.js +1 -1
- package/react/components/sdd/Authentication.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/AuthenticationProviderConfig.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/AuthenticationProviderConfig.js +0 -0
- package/react/components/sdd/AuthenticationProviderConfig.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Content.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Content.js +0 -0
- package/react/components/sdd/Content.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/ContentHeader.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/ContentHeader.js +0 -0
- package/react/components/sdd/ContentHeader.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/CurrentView.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/CurrentView.js +0 -0
- package/react/components/sdd/CurrentView.js.map +1 -0
- package/react/components/sdd/EditPreload.d.ts +14 -0
- package/react/components/sdd/EditPreload.js +169 -0
- package/react/components/sdd/EditPreload.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Export.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Export.js +0 -0
- package/react/components/sdd/Export.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/ExportCloud.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/ExportCloud.js +0 -0
- package/react/components/sdd/ExportCloud.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/ExportDeployInfo.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/ExportDeployInfo.js +0 -0
- package/react/components/sdd/ExportDeployInfo.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/ExportZip.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/ExportZip.js +0 -0
- package/react/components/sdd/ExportZip.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/GettingStarted.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/GettingStarted.js +0 -0
- package/react/components/sdd/GettingStarted.js.map +1 -0
- package/react/components/sdd/ItemList.d.ts +17 -0
- package/react/components/sdd/ItemList.js +58 -0
- package/react/components/sdd/ItemList.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Navigation.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Navigation.js +0 -0
- package/react/components/sdd/Navigation.js.map +1 -0
- package/react/components/sdd/OptionalSettingsView.d.ts +11 -0
- package/react/components/sdd/OptionalSettingsView.js +71 -0
- package/react/components/sdd/OptionalSettingsView.js.map +1 -0
- package/react/components/sdd/Preloads.d.ts +8 -0
- package/react/components/sdd/Preloads.js +26 -0
- package/react/components/sdd/Preloads.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/ProjectErrors.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/ProjectErrors.js +0 -0
- package/react/components/sdd/ProjectErrors.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Publish.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Publish.js +0 -0
- package/react/components/sdd/Publish.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/PublishProgress.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/PublishProgress.js +0 -0
- package/react/components/sdd/PublishProgress.js.map +1 -0
- package/react/components/sdd/SmartDesktopDesigner.d.ts +28 -0
- package/react/components/sdd/SmartDesktopDesigner.js +121 -0
- package/react/components/sdd/SmartDesktopDesigner.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/ThemePage.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/ThemePage.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/ThemePage.js +0 -0
- package/react/components/sdd/ThemePage.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Themes.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Themes.js +0 -0
- package/react/components/sdd/Themes.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Toolbar.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Toolbar.js +13 -11
- package/react/components/sdd/Toolbar.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/View.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/View.js +0 -0
- package/react/components/sdd/View.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/common/fsbl_functions.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/common/fsbl_functions.js +0 -0
- package/react/components/sdd/common/fsbl_functions.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/common/getCSSVars.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/common/getCSSVars.js +0 -0
- package/react/components/sdd/common/getCSSVars.js.map +1 -0
- package/react/components/{smartDesktopDesigner/fixtures → sdd/common}/views.d.ts +0 -0
- package/react/components/sdd/common/views.js +204 -0
- package/react/components/sdd/common/views.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/appearance.css +3 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/applications.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/authentication.css +5 -1
- package/react/components/{smartDesktopDesigner → sdd}/css/buttons.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/export.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/getting-started.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/nav.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/project-errors.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/project-header.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/styles.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/views.css +0 -1
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/apps.d.ts +1 -1
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/apps.js +27 -5
- package/react/components/sdd/fixtures/apps.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/authenticationProps.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/authenticationProps.js +0 -0
- package/react/components/sdd/fixtures/authenticationProps.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/configTemplate.d.ts +1 -1
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/configTemplate.js +1 -1
- package/react/components/sdd/fixtures/configTemplate.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/exportProps.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/exportProps.js +0 -0
- package/react/components/sdd/fixtures/exportProps.js.map +1 -0
- package/react/components/sdd/fixtures/preloads.d.ts +22 -0
- package/react/components/sdd/fixtures/preloads.js +40 -0
- package/react/components/sdd/fixtures/preloads.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/projectErrorsProps.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/projectErrorsProps.js +0 -0
- package/react/components/sdd/fixtures/projectErrorsProps.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/publishProgress.d.ts +1 -1
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/publishProgress.js +0 -0
- package/react/components/sdd/fixtures/publishProgress.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/themeProps.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/themeProps.js +0 -0
- package/react/components/sdd/fixtures/themeProps.js.map +1 -0
- package/react/components/sdd/fixtures/views.d.ts +3 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/views.js +9 -0
- package/react/components/sdd/fixtures/views.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/sdd_helpers.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/sdd_helpers.js +0 -0
- package/react/components/sdd/sdd_helpers.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/AppEditPage.stories.d.ts +1 -1
- package/react/components/{smartDesktopDesigner → sdd}/stories/AppEditPage.stories.js +1 -0
- package/react/components/sdd/stories/AppEditPage.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Appearance.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Appearance.stories.js +0 -0
- package/react/components/sdd/stories/Appearance.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Applications.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Applications.stories.js +0 -0
- package/react/components/sdd/stories/Applications.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/AssetsPage.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/AssetsPage.stories.js +0 -0
- package/react/components/sdd/stories/AssetsPage.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Authentication.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Authentication.stories.js +0 -0
- package/react/components/sdd/stories/Authentication.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ContentHeader.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ContentHeader.stories.js +0 -0
- package/react/components/sdd/stories/ContentHeader.stories.js.map +1 -0
- package/react/components/sdd/stories/EditPreload.stories.d.ts +11 -0
- package/react/components/sdd/stories/EditPreload.stories.js +35 -0
- package/react/components/sdd/stories/EditPreload.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Export.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Export.stories.js +0 -0
- package/react/components/sdd/stories/Export.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ExportCloud.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ExportCloud.stories.js +0 -0
- package/react/components/sdd/stories/ExportCloud.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ExportZip.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ExportZip.stories.js +0 -0
- package/react/components/sdd/stories/ExportZip.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/GettingStarted.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/GettingStarted.stories.js +0 -0
- package/react/components/sdd/stories/GettingStarted.stories.js.map +1 -0
- package/react/components/sdd/stories/ItemList.stories.d.ts +16 -0
- package/react/components/{smartDesktopDesigner/stories/ApplicationList.stories.js → sdd/stories/ItemList.stories.js} +26 -26
- package/react/components/sdd/stories/ItemList.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Navigation.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Navigation.stories.js +0 -0
- package/react/components/sdd/stories/Navigation.stories.js.map +1 -0
- package/react/components/sdd/stories/OptionalSettingsView.stories.d.ts +11 -0
- package/react/components/sdd/stories/OptionalSettingsView.stories.js +28 -0
- package/react/components/sdd/stories/OptionalSettingsView.stories.js.map +1 -0
- package/react/components/sdd/stories/Preloads.stories.d.ts +11 -0
- package/react/components/sdd/stories/Preloads.stories.js +31 -0
- package/react/components/sdd/stories/Preloads.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ProjectErrors.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ProjectErrors.stories.js +0 -0
- package/react/components/sdd/stories/ProjectErrors.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Publish.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Publish.stories.js +0 -0
- package/react/components/sdd/stories/Publish.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/PublishProgress.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/PublishProgress.stories.js +0 -0
- package/react/components/sdd/stories/PublishProgress.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/SmartDesktopDesigner.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/SmartDesktopDesigner.stories.js +0 -0
- package/react/components/sdd/stories/SmartDesktopDesigner.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ThemePage.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ThemePage.stories.js +0 -0
- package/react/components/sdd/stories/ThemePage.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Themes.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Themes.stories.js +0 -0
- package/react/components/sdd/stories/Themes.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Toolbar.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Toolbar.stories.js +0 -0
- package/react/components/sdd/stories/Toolbar.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/AppEditPage.spec.d.ts +0 -0
- package/react/components/sdd/tests/AppEditPage.spec.js +1151 -0
- package/react/components/sdd/tests/AppEditPage.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/ApplicationList.spec.d.ts → sdd/tests/Application.spec.d.ts} +0 -0
- package/react/components/sdd/tests/Application.spec.js +1478 -0
- package/react/components/sdd/tests/Application.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Applications.spec.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Applications.spec.js +3 -3
- package/react/components/sdd/tests/Applications.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Authentication.spec.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Authentication.spec.js +0 -0
- package/react/components/sdd/tests/Authentication.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/ContentHeader.spec.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/ContentHeader.spec.js +0 -0
- package/react/components/sdd/tests/ContentHeader.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/Export.spec.d.ts → sdd/tests/EditPreload.spec.d.ts} +0 -0
- package/react/components/sdd/tests/EditPreload.spec.js +61 -0
- package/react/components/sdd/tests/EditPreload.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/ExportZip.spec.d.ts → sdd/tests/Export.spec.d.ts} +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Export.spec.js +0 -0
- package/react/components/sdd/tests/Export.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/Navigation.spec.d.ts → sdd/tests/ExportZip.spec.d.ts} +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/ExportZip.spec.js +0 -0
- package/react/components/sdd/tests/ExportZip.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/ProjectErrors.spec.d.ts → sdd/tests/ItemList.spec.d.ts} +0 -0
- package/react/components/{smartDesktopDesigner/tests/ApplicationList.spec.js → sdd/tests/ItemList.spec.js} +8 -8
- package/react/components/sdd/tests/ItemList.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/Publish.spec.d.ts → sdd/tests/Navigation.spec.d.ts} +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Navigation.spec.js +0 -0
- package/react/components/sdd/tests/Navigation.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/PublishProgess.spec.d.ts → sdd/tests/Preloads.spec.d.ts} +0 -0
- package/react/components/sdd/tests/Preloads.spec.js +47 -0
- package/react/components/sdd/tests/Preloads.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/SmartDesktopDesigner.spec.d.ts → sdd/tests/ProjectErrors.spec.d.ts} +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/ProjectErrors.spec.js +0 -0
- package/react/components/sdd/tests/ProjectErrors.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/Themes.spec.d.ts → sdd/tests/Publish.spec.d.ts} +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Publish.spec.js +0 -0
- package/react/components/sdd/tests/Publish.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/sdd_helpers.spec.d.ts → sdd/tests/PublishProgess.spec.d.ts} +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/PublishProgess.spec.js +0 -0
- package/react/components/sdd/tests/PublishProgess.spec.js.map +1 -0
- package/react/components/sdd/tests/SmartDesktopDesigner.spec.d.ts +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/SmartDesktopDesigner.spec.js +6 -0
- package/react/components/sdd/tests/SmartDesktopDesigner.spec.js.map +1 -0
- package/react/components/sdd/tests/Themes.spec.d.ts +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Themes.spec.js +0 -0
- package/react/components/sdd/tests/Themes.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Toolbar.spec.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Toolbar.spec.js +0 -0
- package/react/components/sdd/tests/Toolbar.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/a11y_helper.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/a11y_helper.js +0 -0
- package/react/components/sdd/tests/a11y_helper.js.map +1 -0
- package/react/components/sdd/tests/sdd_helpers.spec.d.ts +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/sdd_helpers.spec.js +0 -0
- package/react/components/sdd/tests/sdd_helpers.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/themeDefinitions.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/themeDefinitions.js +0 -0
- package/react/components/sdd/themeDefinitions.js.map +1 -0
- package/react/components/search/SearchBestMatch.js.map +1 -1
- package/react/components/search/SearchProviderResults.d.ts +3 -1
- package/react/components/search/SearchProviderResults.js.map +1 -1
- package/react/components/search/SearchResult.d.ts +3 -1
- package/react/components/search/SearchResult.js +11 -8
- package/react/components/search/SearchResult.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.spec.js +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +0 -11
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +2 -116
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/views.js +1 -185
- package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
- package/react/components/toolbar/AutoArrange.js +1 -1
- package/react/components/toolbar/AutoArrange.js.map +1 -1
- package/react/components/toolbar/AutoArrange.spec.d.ts +1 -0
- package/react/components/toolbar/AutoArrange.spec.js +48 -0
- package/react/components/toolbar/AutoArrange.spec.js.map +1 -0
- package/react/components/toolbar/AutoArrange.stories.d.ts +11 -0
- package/react/components/toolbar/AutoArrange.stories.js +21 -0
- package/react/components/toolbar/AutoArrange.stories.js.map +1 -0
- package/react/components/toolbar/DragHandle.spec.d.ts +1 -0
- package/react/components/toolbar/DragHandle.spec.js +31 -0
- package/react/components/toolbar/DragHandle.spec.js.map +1 -0
- package/react/components/toolbar/DragHandle.stories.d.ts +13 -0
- package/react/components/toolbar/DragHandle.stories.js +39 -0
- package/react/components/toolbar/DragHandle.stories.js.map +1 -0
- package/react/components/toolbar/SddButton.d.ts +2 -0
- package/react/components/toolbar/SddButton.js +23 -0
- package/react/components/toolbar/SddButton.js.map +1 -0
- package/react/components/toolbar/ToolbarShell.js +4 -1
- package/react/components/toolbar/ToolbarShell.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.d.ts +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.d.ts +3 -2
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/Content.d.ts +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.d.ts +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsList.d.ts +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.d.ts +2 -2
- 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/appLauncher/AppLauncherMenu.js +15 -4
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/components/componentList.d.ts +2 -2
- package/react/components/toolbar/appLauncher/components/componentList.js +3 -4
- package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +2 -2
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
- package/react/components/toolbar/dashbar/Dashbar.js +11 -12
- package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.d.ts +2 -2
- 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/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 +4 -4
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +72 -13
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
- package/react/components/userPreferences/components/content/Workspaces.d.ts +6 -1
- package/react/components/userPreferences/components/content/Workspaces.js +59 -18
- package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
- package/react/components/userPreferences/components/general/ScheduledRestart.d.ts +2 -0
- package/react/components/userPreferences/components/general/ScheduledRestart.js +10 -2
- package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
- package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +2 -1
- package/react/components/userPreferences/stores/UserPreferencesStore.js +10 -0
- package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
- package/react/components/userPreferences/tests/ScheduledRestart.spec.js +6 -6
- package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -1
- package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +5 -2
- package/react/components/windowTitleBar/WindowTitleBarShell.js +70 -59
- package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
- package/react/components/windowTitleBar/components/center/TabList.d.ts +2 -2
- package/react/components/windowTitleBar/components/center/TabList.js +5 -2
- package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/windowTitle.d.ts +5 -2
- package/react/components/windowTitleBar/components/windowTitle.js +99 -94
- package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts +3 -3
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js +218 -219
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
- package/react/components/yesNoDialog/Timer.spec.js +1 -1
- package/react/components/yesNoDialog/Timer.spec.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.spec.js +1 -1
- package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
- package/react/hooks/useDashbar.js.map +1 -1
- package/react/hooks/useFavoritesShell.js.map +1 -1
- package/react/hooks/useNotifications.d.ts +1 -1
- package/react/hooks/useNotifications.js.map +1 -1
- package/react/hooks/useSearch.d.ts +2 -1
- package/react/hooks/useSearch.js.map +1 -1
- package/react/hooks/useToolbar.js +6 -0
- package/react/hooks/useToolbar.js.map +1 -1
- package/react/reducers/rootReducer.d.ts +11 -3
- package/react/reducers/smartDesktopDesignerReducer.js +8 -0
- package/react/reducers/smartDesktopDesignerReducer.js.map +1 -1
- package/react/store.d.ts +22 -6
- package/react/types/advancedAppLauncherTypes.d.ts +5 -3
- package/react/types/advancedAppLauncherTypes.js.map +1 -1
- package/react/types/favoriteTypes.d.ts +4 -2
- package/react/types/favoriteTypes.js.map +1 -1
- package/react/types/fdc3.d.ts +2 -2
- package/react/types/fdc3.js.map +1 -1
- package/react/types/smartDesktopDesignerTypes.d.ts +8 -2
- package/react/types/smartDesktopDesignerTypes.js.map +1 -1
- package/react/types/windowTitleBar.d.ts +1 -1
- package/react/types/windowTitleBar.js.map +1 -1
- package/react/components/smartDesktopDesigner/AddApp.js.map +0 -1
- package/react/components/smartDesktopDesigner/AppEditAccess.js.map +0 -1
- package/react/components/smartDesktopDesigner/AppEditPage.js.map +0 -1
- package/react/components/smartDesktopDesigner/Appearance.helpers.js.map +0 -1
- package/react/components/smartDesktopDesigner/Appearance.js.map +0 -1
- package/react/components/smartDesktopDesigner/Application.js +0 -228
- package/react/components/smartDesktopDesigner/Application.js.map +0 -1
- package/react/components/smartDesktopDesigner/ApplicationList.d.ts +0 -16
- package/react/components/smartDesktopDesigner/ApplicationList.js +0 -60
- package/react/components/smartDesktopDesigner/ApplicationList.js.map +0 -1
- package/react/components/smartDesktopDesigner/Applications.js.map +0 -1
- package/react/components/smartDesktopDesigner/AssetsPage.js.map +0 -1
- package/react/components/smartDesktopDesigner/Authentication.js.map +0 -1
- package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +0 -1
- package/react/components/smartDesktopDesigner/Content.js.map +0 -1
- package/react/components/smartDesktopDesigner/ContentHeader.js.map +0 -1
- package/react/components/smartDesktopDesigner/CurrentView.js.map +0 -1
- package/react/components/smartDesktopDesigner/Export.js.map +0 -1
- package/react/components/smartDesktopDesigner/ExportCloud.js.map +0 -1
- package/react/components/smartDesktopDesigner/ExportDeployInfo.js.map +0 -1
- package/react/components/smartDesktopDesigner/ExportZip.js.map +0 -1
- package/react/components/smartDesktopDesigner/GettingStarted.js.map +0 -1
- package/react/components/smartDesktopDesigner/Navigation.js.map +0 -1
- package/react/components/smartDesktopDesigner/ProjectErrors.js.map +0 -1
- package/react/components/smartDesktopDesigner/Publish.js.map +0 -1
- package/react/components/smartDesktopDesigner/PublishProgress.js.map +0 -1
- package/react/components/smartDesktopDesigner/ThemePage.js.map +0 -1
- package/react/components/smartDesktopDesigner/Themes.js.map +0 -1
- package/react/components/smartDesktopDesigner/Toolbar.js.map +0 -1
- package/react/components/smartDesktopDesigner/View.js.map +0 -1
- package/react/components/smartDesktopDesigner/common/fsbl_functions.js.map +0 -1
- package/react/components/smartDesktopDesigner/common/getCSSVars.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/apps.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/authenticationProps.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/configTemplate.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/projectErrorsProps.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/themeProps.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/views.js.map +0 -1
- package/react/components/smartDesktopDesigner/sdd_helpers.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/Appearance.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.d.ts +0 -16
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/AssetsPage.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/Authentication.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/Export.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/Navigation.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/Publish.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ThemePage.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/Themes.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/Toolbar.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js +0 -310
- package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/Authentication.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/ContentHeader.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/Navigation.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/Publish.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/Themes.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/Toolbar.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/a11y_helper.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/themeDefinitions.js.map +0 -1
- package/react/components/toolbar/appLauncher/DynamicAppLauncher.d.ts +0 -6
- package/react/components/toolbar/appLauncher/DynamicAppLauncher.js +0 -23
- package/react/components/toolbar/appLauncher/DynamicAppLauncher.js.map +0 -1
- package/react/hooks/useWorkspace.d.ts +0 -5
- package/react/hooks/useWorkspace.js +0 -26
- package/react/hooks/useWorkspace.js.map +0 -1
- package/react/types/iconTypes.d.ts +0 -11
- package/react/types/iconTypes.js +0 -2
- package/react/types/iconTypes.js.map +0 -1
- package/react/types/searchTypes.d.ts +0 -29
- package/react/types/searchTypes.js +0 -2
- package/react/types/searchTypes.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FinsembleIcon.js","sourceRoot":"","sources":["../../../src/components/common/FinsembleIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAE,cAAc,IAAI,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACzF,OAAO,EAAE,cAAc,IAAI,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,cAAc,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,cAAc,IAAI,WAAW,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,cAAc,IAAI,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,EAAE,cAAc,IAAI,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,cAAc,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAC3F,OAAO,EAAE,cAAc,IAAI,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACrG,OAAO,EAAE,cAAc,IAAI,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,cAAc,IAAI,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,cA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IACd,iBAAiB,EAAE,kBAAkB;IACrC,MAAM,EAAE,UAAU;IAClB,GAAG,EAAE,OAAO;IACZ,KAAK,EAAE,SAAS;IAChB,YAAY,EAAE,aAAa;IAC3B,WAAW,EAAE,YAAY;IACzB,OAAO,EAAE,WAAW;IACpB,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,UAAU;CAClB,CAAC;AAQF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAyB,EAAE,EAAE;IAC1D,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAE/B,OAAO,CACN,8BACC,SAAS,EAAE,CAAC,gBAAgB,EAAE,kBAAkB,KAAK,CAAC,IAAI,EAAE,EAAE,KAAK,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAC9F,IAAI,EAAC,KAAK,gBACE,GAAG,KAAK,CAAC,IAAI,OAAO,EAChC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAEhD,IAAI,IAAI,oBAAC,IAAI,OAAQ,CAChB,CACP,CAAC;AACH,CAAC,CAAC","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 CodeBlockIcon } from \"../../assets/icons/code-block.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| \"code-block\"\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\t\"code-block\": CodeBlockIcon,\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"]}
|
|
@@ -42,7 +42,7 @@ export const FinsembleSelect = ({ options, optionComponents, updateCallback, sel
|
|
|
42
42
|
showSearch && (React.createElement(React.Fragment, null,
|
|
43
43
|
React.createElement(FinsembleIcon, { className: "searchIcon", icon: "search" }),
|
|
44
44
|
React.createElement("input", { type: "text", placeholder: "Search", "aria-label": "search", className: "search", onInput: updateSearch }))),
|
|
45
|
-
React.createElement("select", { className: "shogunSelect", multiple: true, onChange: changeHandler }, displayOptions.map(({ option, value }, index) => (React.createElement("option", { key: `shogun-option-${index}`, value: value }, option)))),
|
|
45
|
+
React.createElement("select", { "aria-hidden": "true", className: "shogunSelect", multiple: true, onChange: changeHandler }, displayOptions.map(({ option, value }, index) => (React.createElement("option", { key: `shogun-option-${index}`, value: value }, option)))),
|
|
46
46
|
React.createElement("div", { className: "emperorSelect", style: height === "" ? {} : { height } }, displayOptions.map(({ option, value }, index) => (React.createElement("div", { className: "emperorOption", key: `emperor-option-${index}` },
|
|
47
47
|
React.createElement("label", null,
|
|
48
48
|
React.createElement(FinsembleToggle, { checked: selectedOptions.includes(value) || selected.includes(value), onChange: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FinsembleSelect.js","sourceRoot":"","sources":["../../../src/components/common/FinsembleSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAa,MAAM,OAAO,CAAC;AACnD,OAAO,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAE5B,MAAM,UAAU,GAAG,CAAC,aAAuB,EAAE,aAAqB,EAAE,EAAE;IACrE,MAAM,cAAc,GAAG,aAAa,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IAC5D,IAAI,cAAc,GAAG,CAAC,EAAE;QACvB,OAAO,aAAa,CAAC;KACrB;IACD,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC,CAAC;AAC/F,CAAC,CAAC;AAaF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC/B,OAAO,EACP,gBAAgB,EAChB,cAAc,EACd,QAAQ,GAAG,EAAE,EACb,IAAI,EACJ,MAAM,GAAG,OAAO,EAChB,UAAU,GAAG,KAAK,EAClB,KAAK,GAAG,QAAQ,GACM,EAAE,EAAE;IAC1B,MAAM,aAAa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AK,EAAE,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IACnE,cAAc,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,KAAa,EAAE,EAAE,CAAC,CACzD,6BAAK,SAAS,EAAC,eAAe,EAAC,GAAG,EAAE,kBAAkB,KAAK,EAAE;gBAC5D;oBACC,oBAAC,eAAe,IACf,OAAO,EAAE,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,EACpE,QAAQ,EAAE,GAAG,EAAE;4BACd,IAAI,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;gCAChE,oBAAoB,CAAC,UAAU,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC,CAAC;6BACzD;iCAAM;gCACN,oBAAoB,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;6BACtD;wBACF,CAAC,GACiB;oBAClB,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAG,KAAK,CAAC,EAAC,CAAC,CAAC,CAC5B,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAG,KAAK,CAAC,CACzB,CAAC,CAAC,CAAC,CACH,8BAAM,uBAAuB,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,GAAS,CAC1D,CACM,CACH,CACN,CAAC,CACG,CACD,CACJ,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState, ReactNode } from \"react\";\nimport \"./css/selector.css\";\nimport { FinsembleIcon } from \"./FinsembleIcon\";\nimport { FinsembleToggle } from \"./FinsembleToggle\";\n\nconst heightMultiplier = 40; // It works in storybook, but we will probably want a better way of detecting this soon.\n\nconst removeItem = (startingArray: string[], removableItem: string) => {\n\tconst removableIndex = startingArray.indexOf(removableItem);\n\tif (removableIndex < 0) {\n\t\treturn startingArray;\n\t}\n\treturn startingArray.slice(0, removableIndex).concat(startingArray.slice(removableIndex + 1));\n};\n\nexport interface FinsembleSelectProps {\n\toptions: string[];\n\toptionComponents?: ReactNode[];\n\tvalues?: string[];\n\tselected?: string[];\n\tsize?: number;\n\tupdateCallback: (selectedValues: string[]) => void;\n\tshowSearch?: boolean;\n\tlimit?: number;\n}\n\nexport const FinsembleSelect = ({\n\toptions,\n\toptionComponents,\n\tupdateCallback,\n\tselected = [],\n\tsize,\n\tvalues = options,\n\tshowSearch = false,\n\tlimit = Infinity,\n}: FinsembleSelectProps) => {\n\tconst mappedOptions = options.map((option, index) => {\n\t\treturn { option, value: values[index] };\n\t});\n\tconst [selectedOptions, setSelectedOptions] = useState<string[]>(selected);\n\tconst [displayOptions, setDisplayOptions] = useState(mappedOptions);\n\n\t// Magic numbers\n\tconst height = size ? heightMultiplier * size : \"\";\n\n\t// Updating consumer\n\tconst doSetSelectedOptions = (opts: string[]) => {\n\t\tif (opts.length > limit) {\n\t\t\topts = opts.slice(limit * -1);\n\t\t}\n\n\t\tif (JSON.stringify(opts) !== JSON.stringify(selectedOptions)) {\n\t\t\tupdateCallback(opts);\n\t\t}\n\t\tsetSelectedOptions(opts);\n\t};\n\n\t// Event handlers\n\tconst changeHandler = (e: any) => {\n\t\tdoSetSelectedOptions(Array.from(e.target.selectedOptions).map((option: any) => option.value));\n\t};\n\n\tconst updateSearch = (e: React.KeyboardEvent<HTMLInputElement>) => {\n\t\t// TS doesn't complain if I use .currentTarget, but then I can't use Enzyme to test it, so here we are\n\t\tconst searchString = (e.target as HTMLInputElement).value;\n\t\tsetDisplayOptions(\n\t\t\tmappedOptions\n\t\t\t\t.filter((optionMap) => optionMap.option.toUpperCase().includes(searchString.toUpperCase()))\n\t\t\t\t.map((combination) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...combination,\n\t\t\t\t\t\toption: combination.option.replace(\n\t\t\t\t\t\t\tnew RegExp(`(${searchString})`, \"i\"),\n\t\t\t\t\t\t\t`<span class=\"highlight\">$1</span>`\n\t\t\t\t\t\t),\n\t\t\t\t\t};\n\t\t\t\t})\n\t\t);\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\"emperorSelectContainer\">\n\t\t\t\t{showSearch && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<FinsembleIcon className=\"searchIcon\" icon=\"search\"></FinsembleIcon>\n\t\t\t\t\t\t<input type=\"text\" placeholder=\"Search\" aria-label=\"search\" className=\"search\" onInput={updateSearch} />\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t\t<select aria-hidden=\"true\" className=\"shogunSelect\" multiple onChange={changeHandler}>\n\t\t\t\t\t{displayOptions.map(({ option, value }, index: number) => (\n\t\t\t\t\t\t<option key={`shogun-option-${index}`} value={value}>\n\t\t\t\t\t\t\t{option}\n\t\t\t\t\t\t</option>\n\t\t\t\t\t))}\n\t\t\t\t</select>\n\t\t\t\t<div className=\"emperorSelect\" style={height === \"\" ? {} : { height }}>\n\t\t\t\t\t{displayOptions.map(({ option, value }, index: number) => (\n\t\t\t\t\t\t<div className=\"emperorOption\" key={`emperor-option-${index}`}>\n\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t<FinsembleToggle\n\t\t\t\t\t\t\t\t\tchecked={selectedOptions.includes(value) || selected.includes(value)}\n\t\t\t\t\t\t\t\t\tonChange={() => {\n\t\t\t\t\t\t\t\t\t\tif (selectedOptions.includes(value) || selected.includes(value)) {\n\t\t\t\t\t\t\t\t\t\t\tdoSetSelectedOptions(removeItem(selectedOptions, value));\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tdoSetSelectedOptions(selectedOptions.concat([value]));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t></FinsembleToggle>\n\t\t\t\t\t\t\t\t{optionComponents?.[index] ? (\n\t\t\t\t\t\t\t\t\toptionComponents?.[index]\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<span dangerouslySetInnerHTML={{ __html: option }}></span>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"]}
|
|
@@ -36,7 +36,7 @@ export const ImagePreview = (props) => {
|
|
|
36
36
|
React.createElement(FileInput, Object.assign({ value: imagePath, uploadFunction: props.uploadFunction, onSetValue: (value) => {
|
|
37
37
|
setImagePath(value);
|
|
38
38
|
setCacheIndex(++globalCacheIndex);
|
|
39
|
-
}, acceptTypes: props.acceptTypes, presetFile: droppedFile, suppressDropzone: true }, (props.id ? { id: props.id } : {}))),
|
|
39
|
+
}, acceptTypes: props.acceptTypes, presetFile: droppedFile, suppressDropzone: true, allowClearing: false }, (props.id ? { id: props.id } : {}))),
|
|
40
40
|
!imagePath ? (React.createElement("div", { className: "empty-preview" })) : (React.createElement("div", { className: "filled-preview" },
|
|
41
41
|
React.createElement("img", { src: `${props.baseURL}/${imagePath}?${cacheIndex}` }))))));
|
|
42
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImagePreview.js","sourceRoot":"","sources":["../../../src/components/common/ImagePreview.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAqB,MAAM,aAAa,CAAC;AAC3D,OAAO,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAgB,MAAM,YAAY,CAAC;AAEpD,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC3B,mCAAe,CAAA;IACf,mCAAe,CAAA;AAChB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAY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,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC1B;YAEZ,CAAC,SAAS,CAAC,CAAC,CAAC,CACb,6BAAK,SAAS,EAAC,eAAe,GAAO,CACrC,CAAC,CAAC,CAAC,CACH,6BAAK,SAAS,EAAC,gBAAgB;gBAC9B,6BAAK,GAAG,EAAE,GAAG,KAAK,CAAC,OAAO,IAAI,SAAS,IAAI,UAAU,EAAE,GAAI,CACtD,CACN,CACI,CACI,CACX,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React, { useState, useEffect } from \"react\";\n\nimport { FileInput, FileInputUploadCb } from \"./FileInput\";\nimport \"./css/image-preview.css\";\nimport { DropZone, FileWithPath } from \"./DropZone\";\n\nexport enum ImagePreviewSize {\n\tSMALL = \"small\",\n\tLARGE = \"large\",\n}\n\nexport type ImagePreviewProps = {\n\tid?: string;\n\tvalue: string;\n\tbaseURL: string;\n\tonSetValue?: (value: string) => void;\n\tuploadFunction: FileInputUploadCb;\n\tacceptTypes: string[];\n\tpreviewSize?: ImagePreviewSize;\n};\n\nlet globalCacheIndex = 0;\n\nconst cleanPath = (path: string, baseURL: string) =>\n\tpath\n\t\t.replace(new RegExp(`^${baseURL}`), \"\")\n\t\t.replace(/\\/{1,}/g, \"/\")\n\t\t.replace(/^\\//, \"\");\n\nexport const ImagePreview = (props: ImagePreviewProps) => {\n\tconst [cacheIndex, setCacheIndex] = useState(++globalCacheIndex);\n\tconst previewSize = props.previewSize || ImagePreviewSize.SMALL;\n\tconst [droppedFile, setDroppedFile] = useState<FileWithPath | null>(null);\n\n\tconst [imagePath, setImagePath] = useState(cleanPath(props.value, props.baseURL));\n\n\tuseEffect(() => {\n\t\tif (props.onSetValue) {\n\t\t\tprops.onSetValue(imagePath);\n\t\t}\n\t}, [imagePath]);\n\n\tuseEffect(() => {\n\t\tsetImagePath(cleanPath(props.value, props.baseURL));\n\t}, [props]);\n\n\treturn (\n\t\t<DropZone\n\t\t\tprocessFile={(file: File) => {\n\t\t\t\tsetDroppedFile(file);\n\t\t\t}}\n\t\t>\n\t\t\t<div className={[\"image-preview-container\", `image-preview-size-${previewSize}`].join(\" \")}>\n\t\t\t\t<FileInput\n\t\t\t\t\tvalue={imagePath}\n\t\t\t\t\tuploadFunction={props.uploadFunction}\n\t\t\t\t\tonSetValue={(value: string) => {\n\t\t\t\t\t\tsetImagePath(value);\n\t\t\t\t\t\tsetCacheIndex(++globalCacheIndex);\n\t\t\t\t\t}}\n\t\t\t\t\tacceptTypes={props.acceptTypes}\n\t\t\t\t\tpresetFile={droppedFile}\n\t\t\t\t\tsuppressDropzone={true}\n\t\t\t\t\tallowClearing={false}\n\t\t\t\t\t{...(props.id ? { id: props.id } : {})}\n\t\t\t\t></FileInput>\n\n\t\t\t\t{!imagePath ? (\n\t\t\t\t\t<div className=\"empty-preview\"></div>\n\t\t\t\t) : (\n\t\t\t\t\t<div className=\"filled-preview\">\n\t\t\t\t\t\t<img src={`${props.baseURL}/${imagePath}?${cacheIndex}`} />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</DropZone>\n\t);\n};\n"]}
|
|
@@ -11,6 +11,8 @@ export const Tooltip = ({ type = "info", position = "right", children = "", altC
|
|
|
11
11
|
const pos = tooltipContentRef.current && tooltipContentRef.current.getBoundingClientRect().right > window.innerWidth
|
|
12
12
|
? "left"
|
|
13
13
|
: position;
|
|
14
|
+
const FinsembleIconLockedOrQuestion = type === "lock" ? (React.createElement(FinsembleIcon, { icon: "lock" })) : (React.createElement(FinsembleIcon, { icon: "question-circle" }));
|
|
15
|
+
const FinsembleIconForType = type === "error" || type === "warn" ? (React.createElement(FinsembleIcon, { icon: "exclamation-circle" })) : (FinsembleIconLockedOrQuestion);
|
|
14
16
|
return (React.createElement("div", { className: ["tooltip", `tooltip-position-content-${pos}`].join(" "), tabIndex: 0, role: "tooltip", "aria-label": children, onMouseOver: () => {
|
|
15
17
|
setTooltipOpen(true);
|
|
16
18
|
}, onFocus: () => {
|
|
@@ -20,7 +22,7 @@ export const Tooltip = ({ type = "info", position = "right", children = "", altC
|
|
|
20
22
|
}, onBlur: () => {
|
|
21
23
|
setTooltipOpen(false);
|
|
22
24
|
}, onClick: onClick },
|
|
23
|
-
altClassName ? (React.createElement("div", { className: altClassName })) : (React.createElement("div", { className: ["tooltip-icon", `tooltip-icon-${type}`].join(" ") },
|
|
25
|
+
altClassName ? (React.createElement("div", { className: altClassName })) : (React.createElement("div", { className: ["tooltip-icon", `tooltip-icon-${type}`].join(" ") }, FinsembleIconForType)),
|
|
24
26
|
React.createElement("div", { ref: tooltipContentRef, className: ["tooltip-content", tooltipOpen ? "visible" : ""].join(" ") }, children)));
|
|
25
27
|
};
|
|
26
28
|
//# sourceMappingURL=Tooltip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../src/components/common/Tooltip.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAUhD,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EACvB,IAAI,GAAG,MAAM,EACb,QAAQ,GAAG,OAAO,EAClB,QAAQ,GAAG,EAAE,EACb,YAAY,EACZ,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,GACJ,EAAE,EAAE;IAClB,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAItD,MAAM,iBAAiB,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IACvD,MAAM,GAAG,GACR,iBAAiB,CAAC,OAAO,IAAI,iBAAiB,CAAC,OAAO,CAAC,qBAAqB,EAAE,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CACf,6BAAK,SAAS,EAAE,YAAY,GAAQ,CACpC,CAAC,CAAC,CAAC,CACH,6BAAK,SAAS,EAAE,CAAC,cAAc,EAAE,gBAAgB,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAG,oBAAoB,CAAO,CAChG;QACD,6BAAK,GAAG,EAAE,iBAAiB,EAAE,SAAS,EAAE,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IACjG,QAAQ,CACJ,CACD,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React, { useState, useRef } from \"react\";\nimport \"./css/tooltip.css\";\nimport { FinsembleIcon } from \"./FinsembleIcon\";\n\nexport type TooltipProps = {\n\ttype?: \"info\" | \"error\" | \"warn\" | \"lock\";\n\taltClassName?: string;\n\tposition?: string;\n\tchildren?: string;\n\tonClick?: (e: React.MouseEvent<HTMLDivElement>) => void;\n};\n\nexport const Tooltip = ({\n\ttype = \"info\",\n\tposition = \"right\",\n\tchildren = \"\",\n\taltClassName,\n\tonClick = () => {},\n}: TooltipProps) => {\n\tconst [tooltipOpen, setTooltipOpen] = useState(false);\n\n\t// If the tooltip content is floating so far to the right that it flows offscreen, switch the position to the left.\n\t// This only works for right-sided tooltips. Left-sided tooltips that float offscreen are not addressed.\n\tconst tooltipContentRef = useRef<HTMLDivElement>(null);\n\tconst pos =\n\t\ttooltipContentRef.current && tooltipContentRef.current.getBoundingClientRect().right > window.innerWidth\n\t\t\t? \"left\"\n\t\t\t: position;\n\n\tconst FinsembleIconLockedOrQuestion =\n\t\ttype === \"lock\" ? (\n\t\t\t<FinsembleIcon icon=\"lock\"></FinsembleIcon>\n\t\t) : (\n\t\t\t<FinsembleIcon icon=\"question-circle\"></FinsembleIcon>\n\t\t);\n\tconst FinsembleIconForType =\n\t\ttype === \"error\" || type === \"warn\" ? (\n\t\t\t<FinsembleIcon icon=\"exclamation-circle\"></FinsembleIcon>\n\t\t) : (\n\t\t\tFinsembleIconLockedOrQuestion\n\t\t);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={[\"tooltip\", `tooltip-position-content-${pos}`].join(\" \")}\n\t\t\ttabIndex={0}\n\t\t\trole=\"tooltip\"\n\t\t\taria-label={children}\n\t\t\tonMouseOver={() => {\n\t\t\t\tsetTooltipOpen(true);\n\t\t\t}}\n\t\t\tonFocus={() => {\n\t\t\t\tsetTooltipOpen(true);\n\t\t\t}}\n\t\t\tonMouseLeave={() => {\n\t\t\t\tsetTooltipOpen(false);\n\t\t\t}}\n\t\t\tonBlur={() => {\n\t\t\t\tsetTooltipOpen(false);\n\t\t\t}}\n\t\t\tonClick={onClick}\n\t\t>\n\t\t\t{altClassName ? (\n\t\t\t\t<div className={altClassName}></div>\n\t\t\t) : (\n\t\t\t\t<div className={[\"tooltip-icon\", `tooltip-icon-${type}`].join(\" \")}>{FinsembleIconForType}</div>\n\t\t\t)}\n\t\t\t<div ref={tooltipContentRef} className={[\"tooltip-content\", tooltipOpen ? \"visible\" : \"\"].join(\" \")}>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n"]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.preload-edit-table {
|
|
2
|
+
width: 515px;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.preload-edit-table td,
|
|
6
|
+
.preload-edit-table th {
|
|
7
|
+
padding-bottom: 17px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.preload-edit-table th {
|
|
11
|
+
width: 130px;
|
|
12
|
+
text-align: left;
|
|
13
|
+
font-weight: normal;
|
|
14
|
+
vertical-align: bottom;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
th.table-header__top-label {
|
|
18
|
+
vertical-align: top;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.preload-edit-table .edit-field > input[type="text"] {
|
|
22
|
+
width: 100%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.preload-edit-table .emperorSelectContainer {
|
|
26
|
+
width: 100%;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.preload-edit-table .load-option {
|
|
30
|
+
margin-bottom: 10px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.preload-edit-actions {
|
|
34
|
+
display: flex;
|
|
35
|
+
justify-content: space-between;
|
|
36
|
+
margin: 0.65em 3em 0.65em 0;
|
|
37
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/components/common/helpers.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,CAAC,MAAM,cAAc,GAAsB,CAAC,UAAgB,EAAE,EAAE,CACrE,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;IACvB,OAAO,CAAC;QACP,GAAG,EAAE,EAAE;QACP,IAAI,EAAE,UAAU,CAAC,IAAI;KACrB,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEJ,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,YAAkB,EAAE,EAAE;IAE9C,MAAM,WAAW,GAAQ,MAAM,CAAC;IAEhC,IAAI,CAAC,YAAY,EAAE;QAClB,YAAY,GAAG,WAAW,CAAC,MAAM,GAAG,EAAS,CAAC;KAC9C;SAAM;QACN,YAAY,GAAG,MAAM,CAAC;QAEtB,UAAU,CAAC,GAAG,EAAE;YACf,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;YAEnD,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,SAAS,CAAC,WAAW,EAAE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CAAC;QAC1B,mBAAmB,EAAE,GAAG,EAAE,GAAE,CAAC;KAC7B,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,UAAU,WAAW,CAAI,SAAmB,EAAE,IAAO;IAC1D,MAAM,QAAQ,GAAa,CAAC,KAAQ,EAAE,EAAE;QACvC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAEjB,OAAO,CACN,oBAAC,QAAQ,IAAC,KAAK,EAAE,WAAW,EAAE;YAC7B,oBAAC,SAAS,oDAAU,IAAI,GAAK,KAAK,GAAM,CAC9B,CACX,CAAC;IACH,CAAC,CAAC;IAEF,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;IAErB,OAAO,QAAQ,CAAC;AACjB,CAAC","sourcesContent":["import React from \"react\";\nimport { FileInputUploadCb } from \"./FileInput\";\nimport { Story } from \"@storybook/react/types-6-0\";\n\nimport { SDServerInfo } from \"../../types/smartDesktopDesignerTypes\";\nimport { Provider } from \"react-redux\";\nimport { createStore } from \"../../store\";\n\nexport const uploadFunction: FileInputUploadCb = (fileObject: File) =>\n\tnew Promise((resolve) => {\n\t\tresolve({\n\t\t\terr: \"\",\n\t\t\tpath: fileObject.name,\n\t\t});\n\t});\n\nexport const initFSBL = (windowObject?: any) => {\n\t// Poor man's global that can take any appendage\n\tconst globalAsAny: any = global;\n\n\tif (!windowObject) {\n\t\twindowObject = globalAsAny.window = {} as any;\n\t} else {\n\t\twindowObject = window;\n\n\t\tsetTimeout(() => {\n\t\t\tconst event = window.document.createEvent(\"Event\");\n\n\t\t\tevent?.initEvent(\"FSBLReady\", true, true);\n\n\t\t\twindow.dispatchEvent(event);\n\t\t});\n\t}\n\n\tglobalAsAny.FSBL = windowObject.FSBL = {\n\t\taddEventListener: (name: String, callback: () => void) => {\n\t\t\tcallback();\n\t\t},\n\t\tClients: {\n\t\t\tSmartDesktopClient: {\n\t\t\t\tcheckValidURL(url: string) {\n\t\t\t\t\tif (url.length === 0) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\treturn /^https?:\\/\\/[^\\s]+$/.test(url);\n\t\t\t\t},\n\t\t\t\tcheckValidProjectName(name: string) {\n\t\t\t\t\treturn /^[a-zA-Z0-9 \\-_.]{1,}$/.test(name) && /[a-zA-Z0-9]{1,}/.test(name);\n\t\t\t\t},\n\t\t\t} as unknown,\n\t\t\tConfigClient: {\n\t\t\t\tsetPreference: () => {},\n\t\t\t\tgetValues: () => {},\n\t\t\t\tgetPreferences: () => {},\n\t\t\t},\n\t\t\tDialogManager: {\n\t\t\t\tspawnDialog: (obj1: any) => {\n\t\t\t\t\tconsole.table(obj1);\n\t\t\t\t},\n\t\t\t\tregisterDialogCallback: () => {},\n\t\t\t\trespondToOpener: () => {},\n\t\t\t},\n\t\t\tLauncherClient: {\n\t\t\t\tshowWindow: () => {},\n\t\t\t},\n\t\t\tLogger: {\n\t\t\t\tlog: () => {},\n\t\t\t\terror: () => {},\n\t\t\t\tsystem: {\n\t\t\t\t\tdebug: () => {},\n\t\t\t\t\tlog: () => {},\n\t\t\t\t\terror: () => {},\n\t\t\t\t\tverbose: () => {},\n\t\t\t\t\tdeprecated: () => {},\n\t\t\t\t},\n\t\t\t},\n\t\t\tRouterClient: {\n\t\t\t\ttransmit: () => {},\n\t\t\t\taddListener: () => {},\n\t\t\t\tsubscribe: () => {},\n\t\t\t},\n\t\t\tStorageClient: {\n\t\t\t\tsave: () => {},\n\t\t\t\tclearCache: () => {},\n\t\t\t},\n\t\t\tWindowClient: {\n\t\t\t\tfitToDOM: () => {},\n\t\t\t},\n\t\t\tWorkspaceClient: {\n\t\t\t\tbringWindowsToFront: () => {},\n\t\t\t\tminimizeAll: () => {},\n\t\t\t\tactiveWorkspace: {\n\t\t\t\t\tname: \" \",\n\t\t\t\t},\n\t\t\t\tgetWorkspaceDefinition: (obj: Object, cb: Function) => {\n\t\t\t\t\tcb(null, null);\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tonShutdown: () => {},\n\t\tSystem: {\n\t\t\tgetSDServerInfo: () =>\n\t\t\t\tnew Promise((resolve) => {\n\t\t\t\t\tresolve({} as SDServerInfo);\n\t\t\t\t}),\n\t\t},\n\t\tSystemManagerClient: {\n\t\t\tpublishCheckpointState: () => {},\n\t\t},\n\t} as any;\n\n\tglobalAsAny.FSBL.Clients = {\n\t\t...globalAsAny.FSBL.Clients,\n\t\tWindowClient: {\n\t\t\tfitToDOM: () => {},\n\t\t} as any,\n\t};\n\n\tglobalAsAny.finsembleWindow = windowObject.finsembleWindow = {\n\t\tsetAlwaysOnTop: () => {},\n\t\taddEventListener: () => {},\n\t\tremoveEventListener: () => {},\n\t};\n};\n\nexport function createStory<T>(Component: Function, args: T) {\n\tconst template: Story<T> = (props: T) => {\n\t\tinitFSBL(window);\n\n\t\treturn (\n\t\t\t<Provider store={createStore()}>\n\t\t\t\t<Component {...{ ...args, ...props }} />\n\t\t\t</Provider>\n\t\t);\n\t};\n\n\ttemplate.args = args;\n\n\treturn template;\n}\n"]}
|
|
@@ -4,7 +4,7 @@ import "../../../assets/css/finsemble.css";
|
|
|
4
4
|
import "../css/styles.css";
|
|
5
5
|
declare const _default: {
|
|
6
6
|
title: string;
|
|
7
|
-
component: ({ acceptTypes, value, onSetValue, id, shouldUpload, uploadFunction, presetFile, suppressDropzone, disabled, }: FileInputProps) => JSX.Element;
|
|
7
|
+
component: ({ acceptTypes, value, onSetValue, id, shouldUpload, uploadFunction, presetFile, suppressDropzone, disabled, allowClearing, }: FileInputProps) => JSX.Element;
|
|
8
8
|
};
|
|
9
9
|
export default _default;
|
|
10
10
|
export declare const EmptyField: import("@storybook/react").Story<FileInputProps>;
|
|
@@ -13,3 +13,4 @@ export declare const PreFilledField: import("@storybook/react").Story<FileInputP
|
|
|
13
13
|
export declare const PreFilledInvalidField: import("@storybook/react").Story<FileInputProps>;
|
|
14
14
|
export declare const anyField: import("@storybook/react").Story<FileInputProps>;
|
|
15
15
|
export declare const hasId: import("@storybook/react").Story<FileInputProps>;
|
|
16
|
+
export declare const PreFilledFieldNoClearing: import("@storybook/react").Story<FileInputProps>;
|
|
@@ -38,4 +38,10 @@ export const hasId = createStory(FileInput, {
|
|
|
38
38
|
uploadFunction,
|
|
39
39
|
id: "myId",
|
|
40
40
|
});
|
|
41
|
+
export const PreFilledFieldNoClearing = createStory(FileInput, {
|
|
42
|
+
acceptTypes: ["image/png"],
|
|
43
|
+
value: "ThisIsATest.png",
|
|
44
|
+
uploadFunction,
|
|
45
|
+
allowClearing: false,
|
|
46
|
+
});
|
|
41
47
|
//# sourceMappingURL=FileInput.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileInput.stories.js","sourceRoot":"","sources":["../../../../src/components/common/stories/FileInput.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,SAAS,EAAkB,MAAM,cAAc,CAAC;AACzD,OAAO,mCAAmC,CAAC;AAC3C,OAAO,mBAAmB,CAAC;AAE3B,eAAe;IACd,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,SAAS;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAiB,SAAS,EAAE;IAChE,KAAK,EAAE,EAAE;IACT,WAAW,EAAE,CAAC,WAAW,CAAC;IAC1B,cAAc;CACd,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAiB,SAAS,EAAE;IAC9D,KAAK,EAAE,EAAE;IACT,WAAW,EAAE,CAAC,WAAW,CAAC;IAC1B,cAAc;IACd,QAAQ,EAAE,IAAI;CACd,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CAAiB,SAAS,EAAE;IACpE,WAAW,EAAE,CAAC,WAAW,CAAC;IAC1B,KAAK,EAAE,iBAAiB;IACxB,cAAc;CACd,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,WAAW,CAAiB,SAAS,EAAE;IAC3E,WAAW,EAAE,CAAC,WAAW,CAAC;IAC1B,KAAK,EAAE,eAAe;IACtB,cAAc;CACd,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAiB,SAAS,EAAE;IAC9D,WAAW,EAAE,CAAC,GAAG,CAAC;IAClB,KAAK,EAAE,SAAS;IAChB,cAAc;CACd,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,KAAK,GAAG,WAAW,CAAiB,SAAS,EAAE;IAC3D,WAAW,EAAE,CAAC,GAAG,CAAC;IAClB,KAAK,EAAE,EAAE;IACT,cAAc;IACd,EAAE,EAAE,MAAM;CACV,CAAC,CAAC","sourcesContent":["import { createStory, uploadFunction } from \"../helpers\";\nimport { FileInput, FileInputProps } from \"../FileInput\";\nimport \"../../../assets/css/finsemble.css\";\nimport \"../css/styles.css\";\n\nexport default {\n\ttitle: \"Common/FileInput\",\n\tcomponent: FileInput,\n};\n\nexport const EmptyField = createStory<FileInputProps>(FileInput, {\n\tvalue: \"\",\n\tacceptTypes: [\"image/png\"],\n\tuploadFunction,\n});\n\nexport const Disabled = createStory<FileInputProps>(FileInput, {\n\tvalue: \"\",\n\tacceptTypes: [\"image/png\"],\n\tuploadFunction,\n\tdisabled: true,\n});\n\nexport const PreFilledField = createStory<FileInputProps>(FileInput, {\n\tacceptTypes: [\"image/png\"],\n\tvalue: \"ThisIsATest.png\",\n\tuploadFunction,\n});\n\nexport const PreFilledInvalidField = createStory<FileInputProps>(FileInput, {\n\tacceptTypes: [\"image/png\"],\n\tvalue: \"MyBadPath.jpg\",\n\tuploadFunction,\n});\n\nexport const anyField = createStory<FileInputProps>(FileInput, {\n\tacceptTypes: [\"*\"],\n\tvalue: \"abc.exe\",\n\tuploadFunction,\n});\n\nexport const hasId = createStory<FileInputProps>(FileInput, {\n\tacceptTypes: [\"*\"],\n\tvalue: \"\",\n\tuploadFunction,\n\tid: \"myId\",\n});\n"]}
|
|
1
|
+
{"version":3,"file":"FileInput.stories.js","sourceRoot":"","sources":["../../../../src/components/common/stories/FileInput.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,SAAS,EAAkB,MAAM,cAAc,CAAC;AACzD,OAAO,mCAAmC,CAAC;AAC3C,OAAO,mBAAmB,CAAC;AAE3B,eAAe;IACd,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,SAAS;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAiB,SAAS,EAAE;IAChE,KAAK,EAAE,EAAE;IACT,WAAW,EAAE,CAAC,WAAW,CAAC;IAC1B,cAAc;CACd,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAiB,SAAS,EAAE;IAC9D,KAAK,EAAE,EAAE;IACT,WAAW,EAAE,CAAC,WAAW,CAAC;IAC1B,cAAc;IACd,QAAQ,EAAE,IAAI;CACd,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CAAiB,SAAS,EAAE;IACpE,WAAW,EAAE,CAAC,WAAW,CAAC;IAC1B,KAAK,EAAE,iBAAiB;IACxB,cAAc;CACd,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,WAAW,CAAiB,SAAS,EAAE;IAC3E,WAAW,EAAE,CAAC,WAAW,CAAC;IAC1B,KAAK,EAAE,eAAe;IACtB,cAAc;CACd,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAiB,SAAS,EAAE;IAC9D,WAAW,EAAE,CAAC,GAAG,CAAC;IAClB,KAAK,EAAE,SAAS;IAChB,cAAc;CACd,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,KAAK,GAAG,WAAW,CAAiB,SAAS,EAAE;IAC3D,WAAW,EAAE,CAAC,GAAG,CAAC;IAClB,KAAK,EAAE,EAAE;IACT,cAAc;IACd,EAAE,EAAE,MAAM;CACV,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG,WAAW,CAAiB,SAAS,EAAE;IAC9E,WAAW,EAAE,CAAC,WAAW,CAAC;IAC1B,KAAK,EAAE,iBAAiB;IACxB,cAAc;IACd,aAAa,EAAE,KAAK;CACpB,CAAC,CAAC","sourcesContent":["import { createStory, uploadFunction } from \"../helpers\";\nimport { FileInput, FileInputProps } from \"../FileInput\";\nimport \"../../../assets/css/finsemble.css\";\nimport \"../css/styles.css\";\n\nexport default {\n\ttitle: \"Common/FileInput\",\n\tcomponent: FileInput,\n};\n\nexport const EmptyField = createStory<FileInputProps>(FileInput, {\n\tvalue: \"\",\n\tacceptTypes: [\"image/png\"],\n\tuploadFunction,\n});\n\nexport const Disabled = createStory<FileInputProps>(FileInput, {\n\tvalue: \"\",\n\tacceptTypes: [\"image/png\"],\n\tuploadFunction,\n\tdisabled: true,\n});\n\nexport const PreFilledField = createStory<FileInputProps>(FileInput, {\n\tacceptTypes: [\"image/png\"],\n\tvalue: \"ThisIsATest.png\",\n\tuploadFunction,\n});\n\nexport const PreFilledInvalidField = createStory<FileInputProps>(FileInput, {\n\tacceptTypes: [\"image/png\"],\n\tvalue: \"MyBadPath.jpg\",\n\tuploadFunction,\n});\n\nexport const anyField = createStory<FileInputProps>(FileInput, {\n\tacceptTypes: [\"*\"],\n\tvalue: \"abc.exe\",\n\tuploadFunction,\n});\n\nexport const hasId = createStory<FileInputProps>(FileInput, {\n\tacceptTypes: [\"*\"],\n\tvalue: \"\",\n\tuploadFunction,\n\tid: \"myId\",\n});\n\nexport const PreFilledFieldNoClearing = createStory<FileInputProps>(FileInput, {\n\tacceptTypes: [\"image/png\"],\n\tvalue: \"ThisIsATest.png\",\n\tuploadFunction,\n\tallowClearing: false,\n});\n"]}
|
|
@@ -3,7 +3,7 @@ import { mount } from "enzyme";
|
|
|
3
3
|
import { describe, it, afterEach } from "mocha";
|
|
4
4
|
import { expect } from "chai";
|
|
5
5
|
import { BasicAccordion, BasicAccordionOpen, BasicAccordionWithSummary, NestedAccordion, } from "../stories/Accordion.stories";
|
|
6
|
-
import { accessibilityAssessor } from "../../
|
|
6
|
+
import { accessibilityAssessor } from "../../sdd/tests/a11y_helper";
|
|
7
7
|
import sinon from "sinon";
|
|
8
8
|
import addons, { mockChannel } from "@storybook/addons";
|
|
9
9
|
addons.setChannel(mockChannel());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.spec.js","sourceRoot":"","sources":["../../../../src/components/common/tests/Accordion.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAE9B,OAAO,EACN,cAAc,EACd,kBAAkB,EAClB,yBAAyB,EACzB,eAAe,GACf,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Accordion.spec.js","sourceRoot":"","sources":["../../../../src/components/common/tests/Accordion.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAE9B,OAAO,EACN,cAAc,EACd,kBAAkB,EAClB,yBAAyB,EACzB,eAAe,GACf,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAGpE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE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EAAE,UAAU,EAAE,CAAC,CAAC;QAC9C,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mBAAmB,EAAE,GAAG,EAAE;QAC5B,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,kBAAkB,oBAAM,kBAAkB,CAAC,IAAuB,EAAI,CAAC,CAAC;QAE/F,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;QACpD,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;IAGH,EAAE,CAAC,iCAAiC,EAAE,KAAK,IAAI,EAAE;QAChD,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,eAAe,oBAAM,eAAe,CAAC,IAAuB,EAAI,CAAC,CAAC;QAEzF,MAAM,CAAC,MAAM,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACzD,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { describe, it, afterEach } from \"mocha\";\nimport { expect } from \"chai\";\nimport { AccordionProps } from \"../Accordion\";\nimport {\n\tBasicAccordion,\n\tBasicAccordionOpen,\n\tBasicAccordionWithSummary,\n\tNestedAccordion,\n} from \"../stories/Accordion.stories\";\n\n// For running accessibility scans\nimport { accessibilityAssessor } from \"../../sdd/tests/a11y_helper\";\n\n// For testing user interactions (like click events):\nimport sinon from \"sinon\";\n// Necessary to allow sinon to work with mocked actions (which are shown in the Actions panel in Storybook)\nimport addons, { mockChannel } from \"@storybook/addons\";\naddons.setChannel(mockChannel());\n\ndescribe(\"<Accordion/>\", () => {\n\t// Used to clear after each interactive test using sinon\n\tafterEach(() => {\n\t\tsinon.restore();\n\t});\n\n\t// Example basic test\n\tit(\"should display the label\", () => {\n\t\tconst wrapper = mount(<BasicAccordion {...(BasicAccordion.args as AccordionProps)} />);\n\n\t\texpect(wrapper.find(\".accordion-summary\").exists(), \"The does not exist\").to.be.false;\n\t\texpect(wrapper.find(\"button\").exists(), \"The button exists\").to.be.true;\n\t\texpect(wrapper.find(\"button\").text(), \"The button's text\").to.equal(\"Accordion Label\");\n\t});\n\n\tit(\"should display the summary\", () => {\n\t\tconst wrapper = mount(<BasicAccordionWithSummary {...(BasicAccordionWithSummary.args as AccordionProps)} />);\n\n\t\texpect(wrapper.find(\".accordion-summary\").exists(), \"The summary exists\").to.be.true;\n\t\texpect(wrapper.find(\".accordion-summary\").text(), \"The Summary text\").to.equal(\n\t\t\t\"A summary of what the accordion contains\"\n\t\t);\n\t});\n\n\tit(\"should accept react as a summary\", () => {\n\t\tconst summary = (\n\t\t\t<div>\n\t\t\t\tI am a summary <a>Link</a>\n\t\t\t</div>\n\t\t);\n\t\tconst props = { ...(BasicAccordionOpen.args as AccordionProps), summary };\n\t\tconst wrapper = mount(<BasicAccordionOpen {...props} />);\n\n\t\texpect(wrapper.find(\".accordion-summary\").exists(), \"The summary exists\").to.be.true;\n\t\texpect(wrapper.find(\"a\").exists(), \"link exists in the summary\").to.be.true;\n\t\texpect(wrapper.find(\".accordion-summary\").text(), \"The Summary text\").to.equal(\"I am a summary Link\");\n\t});\n\n\tit(\"should change state when clicked\", () => {\n\t\tconst wrapper = mount(<BasicAccordion {...(BasicAccordion.args as AccordionProps)} />);\n\n\t\tlet checkbox = wrapper.find({ type: \"checkbox\" });\n\t\texpect(checkbox.props().checked).to.equal(false);\n\t\twrapper.find(\"button\").simulate(\"click\");\n\t\tcheckbox = wrapper.find({ type: \"checkbox\" });\n\t\texpect(checkbox.props().checked).to.equal(true);\n\t});\n\n\tit(\"should start open\", () => {\n\t\tconst wrapper = mount(<BasicAccordionOpen {...(BasicAccordionOpen.args as AccordionProps)} />);\n\n\t\tconst checkbox = wrapper.find({ type: \"checkbox\" });\n\t\texpect(checkbox.props().checked).to.equal(true);\n\t});\n\n\t// Example accessibility scan\n\tit(\"should pass accessibility scans\", async () => {\n\t\tconst wrapper = mount(<NestedAccordion {...(NestedAccordion.args as AccordionProps)} />);\n\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\n\t});\n});\n"]}
|
|
@@ -2,10 +2,11 @@ import * as React from "react";
|
|
|
2
2
|
import { mount } from "enzyme";
|
|
3
3
|
import { describe, it } from "mocha";
|
|
4
4
|
import { expect } from "chai";
|
|
5
|
-
import { EmptyField, PreFilledField, PreFilledInvalidField } from "../stories/FileInput.stories";
|
|
5
|
+
import { EmptyField, PreFilledField, PreFilledInvalidField, PreFilledFieldNoClearing, } from "../stories/FileInput.stories";
|
|
6
6
|
import sinon from "sinon";
|
|
7
7
|
const locators = {
|
|
8
8
|
displayPath: ".file-input-value-input",
|
|
9
|
+
clearButton: ".finsemble-icon-times",
|
|
9
10
|
};
|
|
10
11
|
describe("<FileInput/>", () => {
|
|
11
12
|
afterEach(() => {
|
|
@@ -18,6 +19,7 @@ describe("<FileInput/>", () => {
|
|
|
18
19
|
it("should display the chosen file name", () => {
|
|
19
20
|
const wrapper = mount(React.createElement(PreFilledField, Object.assign({}, PreFilledField.args)));
|
|
20
21
|
expect(wrapper.find(locators.displayPath).text()).to.equal("ThisIsATest.png");
|
|
22
|
+
expect(wrapper.find(locators.clearButton).exists(), "Clear button displayed").to.be.true;
|
|
21
23
|
});
|
|
22
24
|
it("should display an error for invalid file types", () => {
|
|
23
25
|
const wrapper = mount(React.createElement(PreFilledInvalidField, Object.assign({}, PreFilledInvalidField.args)));
|
|
@@ -39,5 +41,10 @@ describe("<FileInput/>", () => {
|
|
|
39
41
|
expect(spy.args[0], "onSetValue returned with a value of an empty string").to.deep.equal([""]);
|
|
40
42
|
expect(wrapper.find(".file-input-value-input").text(), "The filename field was emptied").to.be.empty;
|
|
41
43
|
});
|
|
44
|
+
it("should not display the clear button when allowClearing=false", () => {
|
|
45
|
+
const wrapper = mount(React.createElement(PreFilledFieldNoClearing, Object.assign({}, PreFilledFieldNoClearing.args)));
|
|
46
|
+
expect(wrapper.find(locators.displayPath).text()).to.equal("ThisIsATest.png");
|
|
47
|
+
expect(wrapper.find(locators.clearButton).exists()).to.be.false;
|
|
48
|
+
});
|
|
42
49
|
});
|
|
43
50
|
//# sourceMappingURL=FileInput.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileInput.spec.js","sourceRoot":"","sources":["../../../../src/components/common/tests/FileInput.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAE9B,OAAO,
|
|
1
|
+
{"version":3,"file":"FileInput.spec.js","sourceRoot":"","sources":["../../../../src/components/common/tests/FileInput.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAE9B,OAAO,EACN,UAAU,EACV,cAAc,EACd,qBAAqB,EACrB,wBAAwB,GACxB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,QAAQ,GAAG;IAChB,WAAW,EAAE,yBAAyB;IACtC,WAAW,EAAE,uBAAuB;CACpC,CAAC;AAEF,QAAQ,CAAC,cAAc,EAAE,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tG,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8DAA8D,EAAE,GAAG,EAAE;QACvE,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,wBAAwB,oBAAM,wBAAwB,CAAC,IAAuB,EAAI,CAAC,CAAC;QAC3G,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAC9E,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;IACjE,CAAC,CAAC,CAAC;AAyBJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport { FileInputProps } from \"../FileInput\";\nimport {\n\tEmptyField,\n\tPreFilledField,\n\tPreFilledInvalidField,\n\tPreFilledFieldNoClearing,\n} from \"../stories/FileInput.stories\";\n\n// For testing user interactions (like click events):\nimport sinon from \"sinon\";\n\nconst locators = {\n\tdisplayPath: \".file-input-value-input\",\n\tclearButton: \".finsemble-icon-times\",\n};\n\ndescribe(\"<FileInput/>\", () => {\n\t// Used to clear after each interactive test using sinon\n\tafterEach(() => {\n\t\tsinon.restore();\n\t});\n\n\tit(\"should display an empty string in its default state\", () => {\n\t\tconst wrapper = mount(<EmptyField {...(EmptyField.args as FileInputProps)} />);\n\t\texpect(wrapper.find(locators.displayPath).text()).to.equal(\"\");\n\t});\n\n\tit(\"should display the chosen file name\", () => {\n\t\tconst wrapper = mount(<PreFilledField {...(PreFilledField.args as FileInputProps)} />);\n\t\texpect(wrapper.find(locators.displayPath).text()).to.equal(\"ThisIsATest.png\");\n\t\texpect(wrapper.find(locators.clearButton).exists(), \"Clear button displayed\").to.be.true;\n\t});\n\n\tit(\"should display an error for invalid file types\", () => {\n\t\tconst wrapper = mount(<PreFilledInvalidField {...(PreFilledInvalidField.args as FileInputProps)} />);\n\t\texpect(wrapper.find(locators.displayPath).is(\".invalid\")).to.be.true;\n\t});\n\n\tit(\"should display no error for valid file types\", () => {\n\t\tconst wrapper = mount(<PreFilledField {...(PreFilledField.args as FileInputProps)} />);\n\t\texpect(wrapper.find(locators.displayPath).is(\".invalid\")).to.be.false;\n\t});\n\n\tit(\"should display no error when no file is chosen\", () => {\n\t\tconst wrapper = mount(<EmptyField {...(EmptyField.args as FileInputProps)} />);\n\t\texpect(wrapper.find(locators.displayPath).is(\".invalid\")).to.be.false;\n\t});\n\n\tit(\"should call onSetValue when file is cleared\", () => {\n\t\tconst spy = sinon.spy();\n\t\tconst wrapper = mount(<PreFilledField onSetValue={spy} {...(PreFilledField.args as FileInputProps)} />);\n\t\twrapper.find(\".button-container-icon button\").simulate(\"click\");\n\n\t\texpect(spy.calledOnce).to.be.true;\n\t\texpect(spy.args[0], \"onSetValue returned with a value of an empty string\").to.deep.equal([\"\"]);\n\t\texpect(wrapper.find(\".file-input-value-input\").text(), \"The filename field was emptied\").to.be.empty;\n\t});\n\n\tit(\"should not display the clear button when allowClearing=false\", () => {\n\t\tconst wrapper = mount(<PreFilledFieldNoClearing {...(PreFilledFieldNoClearing.args as FileInputProps)} />);\n\t\texpect(wrapper.find(locators.displayPath).text()).to.equal(\"ThisIsATest.png\");\n\t\texpect(wrapper.find(locators.clearButton).exists()).to.be.false;\n\t});\n\n\t// it(\"should update the display when the file is changed\", () => {\n\t// \tconst oldFileName = \"old.txt\";\n\t// \tconst newFileName = \"newimage/png\";\n\n\t// \tconst uploadFunction = (fileObject: File) =>\n\t// \t\tnew Promise((resolve) => {\n\t// \t\t\tresolve({\n\t// \t\t\t\terr: \"\",\n\t// \t\t\t\tpath: fileObject.name,\n\t// \t\t\t});\n\t// \t\t});\n\n\t// \tconst wrapper = mount(<FileInput uploadFunction value={oldFileName} acceptTypes={[\"image/png\", \"image/jpg\", \"image/ico\"]} />);\n\t// \twrapper.find(\"input[type='file']\").simulate('change', {\n\t// \t\ttarget: {\n\t// \t\t\tfiles: [\n\t// \t\t\t\tnewFileName\n\t// \t\t\t]\n\t// \t\t}\n\t// \t});\n\n\t// \texpect(wrapper.find(\"input[type='text']\").prop(\"value\")).to.equal(newFileName);\n\t// });\n});\n"]}
|
|
@@ -5,7 +5,7 @@ import { expect } from "chai";
|
|
|
5
5
|
import sinon from "sinon";
|
|
6
6
|
import { Sample, SeperateValuesFromText, PreSelected, PreSelectedValues, InvalidPreSelected, Searchable, } from "../stories/FinsembleSelect.stories";
|
|
7
7
|
import addons, { mockChannel } from "@storybook/addons";
|
|
8
|
-
import { waitTime } from "../../
|
|
8
|
+
import { waitTime } from "../../sdd/sdd_helpers";
|
|
9
9
|
addons.setChannel(mockChannel());
|
|
10
10
|
describe("<FinsembleSelect/>", () => {
|
|
11
11
|
afterEach(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FinsembleSelect.spec.js","sourceRoot":"","sources":["../../../../src/components/common/tests/FinsembleSelect.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACN,MAAM,EACN,sBAAsB,EACtB,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,UAAU,GACV,MAAM,oCAAoC,CAAC;AAG5C,OAAO,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,C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AAC,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport sinon from \"sinon\";\nimport { FinsembleSelectProps } from \"../FinsembleSelect\";\nimport {\n\tSample,\n\tSeperateValuesFromText,\n\tPreSelected,\n\tPreSelectedValues,\n\tInvalidPreSelected,\n\tSearchable,\n} from \"../stories/FinsembleSelect.stories\";\n\n// Necessary to allow sinon to work with mocked actions (which are shown in the Actions panel in Storybook)\nimport addons, { mockChannel } from \"@storybook/addons\";\nimport { waitTime } from \"../../smartDesktopDesigner/sdd_helpers\";\naddons.setChannel(mockChannel());\n\ndescribe(\"<FinsembleSelect/>\", () => {\n\tafterEach(() => {\n\t\tsinon.restore();\n\t});\n\n\tit(\"should display text and a checkbox\", () => {\n\t\tconst wrapper = mount(<Sample {...(Sample.args as FinsembleSelectProps)} />);\n\n\t\texpect(wrapper.find(\".emperorOption span\").exists(), \"Options have text\").to.be.true;\n\t\texpect(wrapper.find(\".emperorOption input[type='checkbox']\").exists(), \"Options have checkboxes\").to.be.true;\n\t});\n\tit(\"should call a function when checkbox is checked\", () => {\n\t\tconst buttonSpy = sinon.spy(Sample.args as FinsembleSelectProps, \"updateCallback\");\n\t\tconst wrapper = mount(<Sample {...(Sample.args as FinsembleSelectProps)} />);\n\t\twrapper.find(\".emperorOption input[type='checkbox']\").at(1).simulate(\"change\");\n\t\texpect(buttonSpy.getCall(0)).to.not.be.null;\n\t});\n\tit(\"should return all items checked when multiple items have been checked\", () => {\n\t\tconst buttonSpy = sinon.spy(Sample.args as FinsembleSelectProps, \"updateCallback\");\n\t\tconst wrapper = mount(<Sample {...(Sample.args as FinsembleSelectProps)} />);\n\t\twrapper.find(\".emperorOption input[type='checkbox']\").at(0).simulate(\"change\");\n\t\twrapper.find(\".emperorOption input[type='checkbox']\").at(2).simulate(\"change\");\n\t\texpect(buttonSpy.getCall(1).args[0]).lengthOf(2);\n\t});\n\tit(\"should limit checked selection\", () => {\n\t\tconst buttonSpy = sinon.spy(Sample.args as FinsembleSelectProps, \"updateCallback\");\n\t\tconst wrapper = mount(<Sample {...{ ...(Sample.args as FinsembleSelectProps), limit: 2 }} />);\n\t\twrapper.find(\".emperorOption input[type='checkbox']\").at(0).simulate(\"change\");\n\t\twrapper.find(\".emperorOption input[type='checkbox']\").at(1).simulate(\"change\");\n\t\twrapper.find(\".emperorOption input[type='checkbox']\").at(2).simulate(\"change\");\n\t\texpect(buttonSpy.getCall(1).args[0]).lengthOf(2);\n\t});\n\tit(\"should return values, not display text, if values are provided\", () => {\n\t\tconst buttonSpy = sinon.spy(SeperateValuesFromText.args as FinsembleSelectProps, \"updateCallback\");\n\t\tconst wrapper = mount(<SeperateValuesFromText {...(SeperateValuesFromText.args as FinsembleSelectProps)} />);\n\t\twrapper.find(\".emperorOption input[type='checkbox']\").at(0).simulate(\"change\");\n\t\texpect(buttonSpy.getCall(0).args[0]).to.deep.equal([\"1\"]);\n\t});\n\tit(\"should start with selected items if pre-selected items are provided\", () => {\n\t\tconst wrapper = mount(<PreSelected {...(PreSelected.args as FinsembleSelectProps)} />);\n\t\texpect(wrapper.find(\".emperorOption input[type='checkbox']\").at(1).prop(\"checked\")).to.be.true;\n\t});\n\tit(\"should show selected items if pre-selected items are provided after initial render\", async () => {\n\t\tconst wrapper = mount(<PreSelected {...(Sample.args as FinsembleSelectProps)} />);\n\n\t\tawait waitTime(10);\n\n\t\twrapper.setProps({ selected: PreSelected.args?.selected });\n\n\t\twrapper.update();\n\n\t\texpect(wrapper.find(\".emperorOption input[type='checkbox']\").at(1).prop(\"checked\")).to.be.true;\n\t});\n\tit(\"should start with selected values if both values and pre-selected values are provided\", () => {\n\t\tconst wrapper = mount(<PreSelectedValues {...(PreSelectedValues.args as FinsembleSelectProps)} />);\n\t\texpect(wrapper.find(\".emperorOption input[type='checkbox']\").at(0).prop(\"checked\")).to.be.false;\n\t\texpect(wrapper.find(\".emperorOption input[type='checkbox']\").at(1).prop(\"checked\")).to.be.true;\n\t\texpect(wrapper.find(\".emperorOption input[type='checkbox']\").at(2).prop(\"checked\")).to.be.true;\n\t\texpect(wrapper.find(\".emperorOption input[type='checkbox']\").at(3).prop(\"checked\")).to.be.false;\n\t});\n\tit(\"should ignore invalid pre-selected items\", () => {\n\t\tconst wrapper = mount(<InvalidPreSelected {...(InvalidPreSelected.args as FinsembleSelectProps)} />);\n\t\texpect(wrapper.find(\".emperorOption input[type='checkbox']\").at(0).prop(\"checked\")).to.be.false;\n\t\texpect(wrapper.find(\".emperorOption input[type='checkbox']\").at(1).prop(\"checked\")).to.be.false;\n\t\texpect(wrapper.find(\".emperorOption input[type='checkbox']\").at(2).prop(\"checked\")).to.be.false;\n\t\texpect(wrapper.find(\".emperorOption input[type='checkbox']\").at(3).prop(\"checked\")).to.be.false;\n\t});\n\tit(\"should filter list on input (case-insensitive)\", () => {\n\t\tconst buttonSpy = sinon.spy(Searchable.args as FinsembleSelectProps, \"updateCallback\");\n\t\tconst wrapper = mount(<Searchable {...(Searchable.args as FinsembleSelectProps)} />);\n\t\twrapper\n\t\t\t.find(\"input.search\")\n\t\t\t.at(0)\n\t\t\t.simulate(\"input\", {\n\t\t\t\ttarget: {\n\t\t\t\t\tvalue: \"north\",\n\t\t\t\t},\n\t\t\t});\n\t\texpect(wrapper.find(\".emperorOption\")).lengthOf(2);\n\t\twrapper.find(\".emperorOption input[type='checkbox']\").at(0).simulate(\"change\");\n\t\texpect(buttonSpy.getCall(0).args[0]).to.deep.equal([\"NC\"]);\n\t});\n});\n"]}
|
|
1
|
+
{"version":3,"file":"FinsembleSelect.spec.js","sourceRoot":"","sources":["../../../../src/components/common/tests/FinsembleSelect.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA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A6B,EAAI,CAAC,CAAC;QACrF,OAAO;aACL,IAAI,CAAC,cAAc,CAAC;aACpB,EAAE,CAAC,CAAC,CAAC;aACL,QAAQ,CAAC,OAAO,EAAE;YAClB,MAAM,EAAE;gBACP,KAAK,EAAE,OAAO;aACd;SACD,CAAC,CAAC;QACJ,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QACnD,OAAO,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC/E,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport sinon from \"sinon\";\nimport { FinsembleSelectProps } from \"../FinsembleSelect\";\nimport {\n\tSample,\n\tSeperateValuesFromText,\n\tPreSelected,\n\tPreSelectedValues,\n\tInvalidPreSelected,\n\tSearchable,\n} from \"../stories/FinsembleSelect.stories\";\n\n// Necessary to allow sinon to work with mocked actions (which are shown in the Actions panel in Storybook)\nimport addons, { mockChannel } from \"@storybook/addons\";\nimport { waitTime } from \"../../sdd/sdd_helpers\";\naddons.setChannel(mockChannel());\n\ndescribe(\"<FinsembleSelect/>\", () => {\n\tafterEach(() => {\n\t\tsinon.restore();\n\t});\n\n\tit(\"should display text and a checkbox\", () => {\n\t\tconst wrapper = mount(<Sample {...(Sample.args as FinsembleSelectProps)} />);\n\n\t\texpect(wrapper.find(\".emperorOption span\").exists(), \"Options have text\").to.be.true;\n\t\texpect(wrapper.find(\".emperorOption input[type='checkbox']\").exists(), \"Options have checkboxes\").to.be.true;\n\t});\n\tit(\"should call a function when checkbox is checked\", () => {\n\t\tconst buttonSpy = sinon.spy(Sample.args as FinsembleSelectProps, \"updateCallback\");\n\t\tconst wrapper = mount(<Sample {...(Sample.args as FinsembleSelectProps)} />);\n\t\twrapper.find(\".emperorOption input[type='checkbox']\").at(1).simulate(\"change\");\n\t\texpect(buttonSpy.getCall(0)).to.not.be.null;\n\t});\n\tit(\"should return all items checked when multiple items have been checked\", () => {\n\t\tconst buttonSpy = sinon.spy(Sample.args as FinsembleSelectProps, \"updateCallback\");\n\t\tconst wrapper = mount(<Sample {...(Sample.args as FinsembleSelectProps)} />);\n\t\twrapper.find(\".emperorOption input[type='checkbox']\").at(0).simulate(\"change\");\n\t\twrapper.find(\".emperorOption input[type='checkbox']\").at(2).simulate(\"change\");\n\t\texpect(buttonSpy.getCall(1).args[0]).lengthOf(2);\n\t});\n\tit(\"should limit checked selection\", () => {\n\t\tconst buttonSpy = sinon.spy(Sample.args as FinsembleSelectProps, \"updateCallback\");\n\t\tconst wrapper = mount(<Sample {...{ ...(Sample.args as FinsembleSelectProps), limit: 2 }} />);\n\t\twrapper.find(\".emperorOption input[type='checkbox']\").at(0).simulate(\"change\");\n\t\twrapper.find(\".emperorOption input[type='checkbox']\").at(1).simulate(\"change\");\n\t\twrapper.find(\".emperorOption input[type='checkbox']\").at(2).simulate(\"change\");\n\t\texpect(buttonSpy.getCall(1).args[0]).lengthOf(2);\n\t});\n\tit(\"should return values, not display text, if values are provided\", () => {\n\t\tconst buttonSpy = sinon.spy(SeperateValuesFromText.args as FinsembleSelectProps, \"updateCallback\");\n\t\tconst wrapper = mount(<SeperateValuesFromText {...(SeperateValuesFromText.args as FinsembleSelectProps)} />);\n\t\twrapper.find(\".emperorOption input[type='checkbox']\").at(0).simulate(\"change\");\n\t\texpect(buttonSpy.getCall(0).args[0]).to.deep.equal([\"1\"]);\n\t});\n\tit(\"should start with selected items if pre-selected items are provided\", () => {\n\t\tconst wrapper = mount(<PreSelected {...(PreSelected.args as FinsembleSelectProps)} />);\n\t\texpect(wrapper.find(\".emperorOption input[type='checkbox']\").at(1).prop(\"checked\")).to.be.true;\n\t});\n\tit(\"should show selected items if pre-selected items are provided after initial render\", async () => {\n\t\tconst wrapper = mount(<PreSelected {...(Sample.args as FinsembleSelectProps)} />);\n\n\t\tawait waitTime(10);\n\n\t\twrapper.setProps({ selected: PreSelected.args?.selected });\n\n\t\twrapper.update();\n\n\t\texpect(wrapper.find(\".emperorOption input[type='checkbox']\").at(1).prop(\"checked\")).to.be.true;\n\t});\n\tit(\"should start with selected values if both values and pre-selected values are provided\", () => {\n\t\tconst wrapper = mount(<PreSelectedValues {...(PreSelectedValues.args as FinsembleSelectProps)} />);\n\t\texpect(wrapper.find(\".emperorOption input[type='checkbox']\").at(0).prop(\"checked\")).to.be.false;\n\t\texpect(wrapper.find(\".emperorOption input[type='checkbox']\").at(1).prop(\"checked\")).to.be.true;\n\t\texpect(wrapper.find(\".emperorOption input[type='checkbox']\").at(2).prop(\"checked\")).to.be.true;\n\t\texpect(wrapper.find(\".emperorOption input[type='checkbox']\").at(3).prop(\"checked\")).to.be.false;\n\t});\n\tit(\"should ignore invalid pre-selected items\", () => {\n\t\tconst wrapper = mount(<InvalidPreSelected {...(InvalidPreSelected.args as FinsembleSelectProps)} />);\n\t\texpect(wrapper.find(\".emperorOption input[type='checkbox']\").at(0).prop(\"checked\")).to.be.false;\n\t\texpect(wrapper.find(\".emperorOption input[type='checkbox']\").at(1).prop(\"checked\")).to.be.false;\n\t\texpect(wrapper.find(\".emperorOption input[type='checkbox']\").at(2).prop(\"checked\")).to.be.false;\n\t\texpect(wrapper.find(\".emperorOption input[type='checkbox']\").at(3).prop(\"checked\")).to.be.false;\n\t});\n\tit(\"should filter list on input (case-insensitive)\", () => {\n\t\tconst buttonSpy = sinon.spy(Searchable.args as FinsembleSelectProps, \"updateCallback\");\n\t\tconst wrapper = mount(<Searchable {...(Searchable.args as FinsembleSelectProps)} />);\n\t\twrapper\n\t\t\t.find(\"input.search\")\n\t\t\t.at(0)\n\t\t\t.simulate(\"input\", {\n\t\t\t\ttarget: {\n\t\t\t\t\tvalue: \"north\",\n\t\t\t\t},\n\t\t\t});\n\t\texpect(wrapper.find(\".emperorOption\")).lengthOf(2);\n\t\twrapper.find(\".emperorOption input[type='checkbox']\").at(0).simulate(\"change\");\n\t\texpect(buttonSpy.getCall(0).args[0]).to.deep.equal([\"NC\"]);\n\t});\n});\n"]}
|
|
@@ -4,9 +4,9 @@ import { describe, it } from "mocha";
|
|
|
4
4
|
import { expect } from "chai";
|
|
5
5
|
import sinon from "sinon";
|
|
6
6
|
import { Checked, Unchecked } from "../stories/FinsembleToggle.stories";
|
|
7
|
-
import { accessibilityAssessor } from "../../
|
|
7
|
+
import { accessibilityAssessor } from "../../sdd/tests/a11y_helper";
|
|
8
8
|
import addons, { mockChannel } from "@storybook/addons";
|
|
9
|
-
import { waitTime } from "../../
|
|
9
|
+
import { waitTime } from "../../sdd/sdd_helpers";
|
|
10
10
|
addons.setChannel(mockChannel());
|
|
11
11
|
describe("<FinsembleToggle/>", () => {
|
|
12
12
|
afterEach(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FinsembleToggle.spec.js","sourceRoot":"","sources":["../../../../src/components/common/tests/FinsembleToggle.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"F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C,EAAE,OAAO,EAAE,MAAA,OAAO,CAAC,IAAI,0CAAE,OAAO,EAAE,CAAC,CAAC;QAErD,OAAO,CAAC,MAAM,EAAE,CAAC;QAEjB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACjF,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport sinon from \"sinon\";\nimport { FinsembleToggleProps } from \"../FinsembleToggle\";\nimport { Checked, Unchecked } from \"../stories/FinsembleToggle.stories\";\nimport { accessibilityAssessor } from \"../../sdd/tests/a11y_helper\";\n\n// Necessary to allow sinon to work with mocked actions (which are shown in the Actions panel in Storybook)\nimport addons, { mockChannel } from \"@storybook/addons\";\nimport { waitTime } from \"../../sdd/sdd_helpers\";\naddons.setChannel(mockChannel());\n\ndescribe(\"<FinsembleToggle/>\", () => {\n\tafterEach(() => {\n\t\tsinon.restore();\n\t});\n\n\tit(\"should pass accessibility scans\", async () => {\n\t\tconst wrapper = mount(<Unchecked {...(Unchecked.args as FinsembleToggleProps)} />);\n\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\n\t});\n\n\tit(\"should be checked items if checked prop is updated after initial render\", async () => {\n\t\tconst wrapper = mount(<Unchecked {...(Unchecked.args as FinsembleToggleProps)} />);\n\n\t\tawait waitTime(10);\n\n\t\twrapper.setProps({ checked: Checked.args?.checked });\n\n\t\twrapper.update();\n\n\t\texpect(wrapper.find(\"input[type='checkbox']\").at(0).prop(\"checked\")).to.be.true;\n\t});\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FavoriteMaker.js","sourceRoot":"","sources":["../../../src/components/favorites/FavoriteMaker.tsx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,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC;IAE1D,OAAO,CACN,6BAAK,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,IAC1E,QAAQ,IAAI,2BAAG,SAAS,EAAC,aAAa,GAAK,CACvC,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { useFavorites } from \"../../hooks/useFavorites\";\nimport { Favorite } from \"../../types/favoriteTypes\";\nimport { services } from \"@finsemble/finsemble-api\";\n\ntype IconDescriptor = services.window.types.IconDescriptor;\n\ntype FavoriteMakerProps = Favorite & {\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n};\n\n/**\n * Creates a clickable \"favorite\" that coordinates with the toolbar's pinned <FavoritesShell>.\n * @param {string} [className] - An optional CSS className to append.\n * @param {string} [id] - The unique identifier for the favorite item. This must be consistent across restarts.\n * @param {string} [category] - \"Workspace\" | \"Application\". The catagory of the favorite item. Currenly only workspaces and launchable Finsemble applications can be favorited.\n * @param {string} [name] - The name of the favorite item. This will be used for display in the FavoriteShell.\n * @param {IconDescriptor} [icon] - The icon of the favorite item. This displays in the FavoriteShell. It defaults to use the initials of the `name` field as its content.\n */\nexport const FavoriteMaker: React.FunctionComponent<FavoriteMakerProps> = ({\n\tid,\n\tcategory,\n\ticon,\n\tname,\n\tchildren,\n\tclassName = \"\",\n\tstyle,\n}) => {\n\tconst { isFavorited, addFavorite, removeFavorite } = useFavorites();\n\n\t// If no icon is specified then default to an avatar based on initials\n\tconst definitiveIcon: IconDescriptor = icon ?? {\n\t\timageType: \"initials\",\n\t\tname: name,\n\t\tcategory: category,\n\t};\n\n\tconst toggleFavorite = (e: React.MouseEvent) => {\n\t\tdefinitiveIcon;\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\tif (isFavorited(id)) {\n\t\t\tremoveFavorite(id);\n\t\t} else {\n\t\t\taddFavorite({\n\t\t\t\tid,\n\t\t\t\tcategory,\n\t\t\t\tname,\n\t\t\t\ticon: definitiveIcon,\n\t\t\t});\n\t\t}\n\t};\n\n\tconst active = isFavorited(id) ? \"favorited\" : \"not-favorited\";\n\tconst classes = `favorite-maker ${active} ${className}`;\n\tconst title = isFavorited(id) ? \"Unfavorite\" : \"Favorite\";\n\n\treturn (\n\t\t<div onClick={toggleFavorite} className={classes} style={style} title={title}>\n\t\t\t{children || <i className=\"ff-favorite\"></i>}\n\t\t</div>\n\t);\n};\n"]}
|
|
@@ -4,7 +4,7 @@ import { describe, it } from "mocha";
|
|
|
4
4
|
import { expect } from "chai";
|
|
5
5
|
import sinon from "sinon";
|
|
6
6
|
import { Basic } from "./FavoritesShell.stories";
|
|
7
|
-
import { accessibilityAssessor } from "../
|
|
7
|
+
import { accessibilityAssessor } from "../sdd/tests/a11y_helper";
|
|
8
8
|
import addons, { mockChannel } from "@storybook/addons";
|
|
9
9
|
addons.setChannel(mockChannel());
|
|
10
10
|
describe("<FavoritesShell/>", () => {
|