@finsemble/finsemble-ui 6.5.2 → 6.6.0-beta.3
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/index.d.ts +1 -0
- package/package.json +18 -15
- package/react/actions/smartDesktopDesignerActions.d.ts +3 -3
- package/react/actions/smartDesktopDesignerActions.js.map +1 -1
- package/react/assets/css/finsemble.css +0 -1
- package/react/assets/css/toolbar.css +0 -4
- package/react/assets/css/userPreferences.css +39 -4
- package/react/componentTemplateGenerator.js +1 -1
- package/react/componentTemplateGenerator.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/stores/storeActions.d.ts +1 -1
- package/react/components/common/DropdownButton.js.map +1 -1
- package/react/components/common/FileInput.d.ts +2 -1
- package/react/components/common/FileInput.js +2 -2
- package/react/components/common/FileInput.js.map +1 -1
- package/react/components/common/FinsembleToggle.d.ts +3 -1
- package/react/components/common/FinsembleToggle.js +12 -4
- package/react/components/common/FinsembleToggle.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/TimeSelect.d.ts +16 -0
- package/react/components/common/TimeSelect.js +143 -0
- package/react/components/common/TimeSelect.js.map +1 -0
- package/react/components/common/css/accordion.css +3 -5
- package/react/components/common/css/application-edit-page.css +4 -1
- package/react/components/common/css/time-select.css +8 -0
- package/react/components/common/css/toggle.css +39 -3
- 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/stories/FinsembleToggle.stories.d.ts +3 -1
- package/react/components/common/stories/FinsembleToggle.stories.js +12 -0
- package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
- package/react/components/common/stories/TimeSelect.stories.d.ts +11 -0
- package/react/components/common/stories/TimeSelect.stories.js +20 -0
- package/react/components/common/stories/TimeSelect.stories.js.map +1 -0
- 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 +8 -3
- package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
- package/react/components/{smartDesktopDesigner/tests/AppEditPage.spec.d.ts → common/tests/TimeSelect.spec.d.ts} +0 -0
- package/react/components/common/tests/TimeSelect.spec.js +71 -0
- package/react/components/common/tests/TimeSelect.spec.js.map +1 -0
- 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/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/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/menu/MenuPortal.js +1 -1
- package/react/components/menu/MenuPortal.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/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 +3 -11
- 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 +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/AppEditPage.js +7 -1
- package/react/components/sdd/AppEditPage.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Appearance.css +0 -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 +1 -2
- package/react/components/{smartDesktopDesigner → sdd}/Application.js +37 -39
- package/react/components/sdd/Application.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Applications.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Applications.js +2 -2
- 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/{smartDesktopDesigner → sdd}/EditPreload.d.ts +5 -7
- package/react/components/sdd/EditPreload.js +156 -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/{smartDesktopDesigner → sdd}/ItemList.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/ItemList.js +0 -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/{smartDesktopDesigner → sdd}/OptionalSettingsView.d.ts +1 -3
- package/react/components/sdd/OptionalSettingsView.js +56 -0
- package/react/components/sdd/OptionalSettingsView.js.map +1 -0
- package/react/components/sdd/Preloads.d.ts +6 -0
- package/react/components/sdd/Preloads.js +24 -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 +29 -0
- package/react/components/sdd/SmartDesktopDesigner.js +122 -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 +9 -7
- 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/sdd/common/setPreloadDefaults.d.ts +1 -0
- package/react/components/sdd/common/setPreloadDefaults.js +21 -0
- package/react/components/sdd/common/setPreloadDefaults.js.map +1 -0
- package/react/components/{smartDesktopDesigner/fixtures → sdd/common}/views.d.ts +0 -0
- package/react/components/sdd/common/views.js +202 -0
- package/react/components/sdd/common/views.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/appearance.css +0 -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 +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/apps.js +10 -10
- 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 +3 -0
- package/react/components/sdd/fixtures/preloads.js +57 -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 +0 -0
- 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 +0 -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 +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/AppEditPage.stories.js +0 -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/{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/{smartDesktopDesigner → sdd}/stories/ItemList.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ItemList.stories.js +0 -0
- 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/{smartDesktopDesigner → sdd}/stories/OptionalSettingsView.stories.d.ts +3 -2
- package/react/components/sdd/stories/OptionalSettingsView.stories.js +27 -0
- package/react/components/sdd/stories/OptionalSettingsView.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 +1 -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/tests/Application.spec.d.ts → sdd/tests/AppEditPage.spec.d.ts} +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/AppEditPage.spec.js +0 -0
- package/react/components/sdd/tests/AppEditPage.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/Authentication.spec.d.ts → sdd/tests/Application.spec.d.ts} +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Application.spec.js +13 -31
- 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 +0 -0
- package/react/components/sdd/tests/Applications.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/ContentHeader.spec.d.ts → 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/tests/EditPreload.spec.d.ts → 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/{smartDesktopDesigner → sdd}/tests/EditPreload.spec.js +8 -10
- 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/ItemList.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/Navigation.spec.d.ts → sdd/tests/ItemList.spec.d.ts} +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/ItemList.spec.js +0 -0
- package/react/components/sdd/tests/ItemList.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/Preloads.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/ProjectErrors.spec.d.ts → sdd/tests/OptionalSettingsView.spec.d.ts} +0 -0
- package/react/components/sdd/tests/OptionalSettingsView.spec.js +22 -0
- package/react/components/sdd/tests/OptionalSettingsView.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/Publish.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/PublishProgess.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/SmartDesktopDesigner.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/{smartDesktopDesigner/tests/Themes.spec.d.ts → sdd/tests/SmartDesktopDesigner.spec.d.ts} +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/SmartDesktopDesigner.spec.js +1 -1
- package/react/components/sdd/tests/SmartDesktopDesigner.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/sdd_helpers.spec.d.ts → sdd/tests/Themes.spec.d.ts} +0 -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/{userPreferences/tests/ScheduledRestart.spec.d.ts → sdd/tests/sdd_helpers.spec.d.ts} +0 -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 +9 -7
- package/react/components/search/SearchResult.js.map +1 -1
- package/react/components/shared/DefaultDropdownButton.js +5 -4
- package/react/components/shared/DefaultDropdownButton.js.map +1 -1
- package/react/components/shared/tests/DefaultDropdownButton.spec.js +9 -0
- package/react/components/shared/tests/DefaultDropdownButton.spec.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 -203
- 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/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/components/AppActionsMenu.js +2 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.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/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.js +3 -4
- package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
- package/react/components/toolbar/dashbar/Dashbar.js +2 -0
- package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +71 -12
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
- package/react/components/userPreferences/UserPreferenceTypes.d.ts +3 -2
- package/react/components/userPreferences/UserPreferenceTypes.js.map +1 -1
- package/react/components/userPreferences/components/content/General.d.ts +2 -5
- package/react/components/userPreferences/components/content/General.js +31 -11
- package/react/components/userPreferences/components/content/General.js.map +1 -1
- package/react/components/userPreferences/components/content/Workspaces.d.ts +5 -0
- package/react/components/userPreferences/components/content/Workspaces.js +58 -17
- package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
- package/react/components/userPreferences/components/general/ScheduledClose.d.ts +10 -0
- package/react/components/userPreferences/components/general/ScheduledClose.js +95 -0
- package/react/components/userPreferences/components/general/ScheduledClose.js.map +1 -0
- package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +6 -2
- package/react/components/userPreferences/stores/UserPreferencesStore.js +19 -3
- package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
- package/react/components/userPreferences/stories/General.stories.d.ts +6 -2
- package/react/components/userPreferences/stories/ScheduledClose.stories.d.ts +12 -0
- package/react/components/userPreferences/stories/ScheduledClose.stories.js +53 -0
- package/react/components/userPreferences/stories/ScheduledClose.stories.js.map +1 -0
- package/react/components/userPreferences/tests/General.spec.js +4 -17
- package/react/components/userPreferences/tests/General.spec.js.map +1 -1
- package/react/components/userPreferences/tests/ScheduledClose.spec.d.ts +1 -0
- package/react/components/userPreferences/tests/ScheduledClose.spec.js +47 -0
- package/react/components/userPreferences/tests/ScheduledClose.spec.js.map +1 -0
- package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +1 -0
- package/react/components/windowTitleBar/WindowTitleBarShell.js +16 -6
- package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
- package/react/components/windowTitleBar/components/center/TabList.js +2 -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/windowTitle.js +11 -10
- package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js +12 -9
- 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/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 +1 -1
- package/react/reducers/smartDesktopDesignerReducer.js +1 -1
- package/react/reducers/smartDesktopDesignerReducer.js.map +1 -1
- package/react/store.d.ts +2 -2
- 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/smartDesktopDesignerTypes.d.ts +9 -1
- package/react/types/smartDesktopDesignerTypes.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.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/EditPreload.js +0 -169
- package/react/components/smartDesktopDesigner/EditPreload.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/ItemList.js.map +0 -1
- package/react/components/smartDesktopDesigner/Navigation.js.map +0 -1
- package/react/components/smartDesktopDesigner/OptionalSettingsView.js +0 -71
- package/react/components/smartDesktopDesigner/OptionalSettingsView.js.map +0 -1
- package/react/components/smartDesktopDesigner/Preloads.d.ts +0 -8
- package/react/components/smartDesktopDesigner/Preloads.js +0 -26
- package/react/components/smartDesktopDesigner/Preloads.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/preloads.d.ts +0 -22
- package/react/components/smartDesktopDesigner/fixtures/preloads.js +0 -40
- package/react/components/smartDesktopDesigner/fixtures/preloads.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/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/EditPreload.stories.d.ts +0 -11
- package/react/components/smartDesktopDesigner/stories/EditPreload.stories.js +0 -35
- package/react/components/smartDesktopDesigner/stories/EditPreload.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/ItemList.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/Navigation.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/OptionalSettingsView.stories.js +0 -28
- package/react/components/smartDesktopDesigner/stories/OptionalSettingsView.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/Preloads.stories.d.ts +0 -11
- package/react/components/smartDesktopDesigner/stories/Preloads.stories.js +0 -31
- package/react/components/smartDesktopDesigner/stories/Preloads.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.map +0 -1
- package/react/components/smartDesktopDesigner/tests/Application.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/EditPreload.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/ItemList.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/Navigation.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/Preloads.spec.js +0 -47
- package/react/components/smartDesktopDesigner/tests/Preloads.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/components/userPreferences/components/general/ScheduledRestart.d.ts +0 -27
- package/react/components/userPreferences/components/general/ScheduledRestart.js +0 -190
- package/react/components/userPreferences/components/general/ScheduledRestart.js.map +0 -1
- package/react/components/userPreferences/tests/ScheduledRestart.spec.js +0 -70
- package/react/components/userPreferences/tests/ScheduledRestart.spec.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 -22
- package/react/types/searchTypes.js +0 -2
- package/react/types/searchTypes.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SmartDesktopDesigner.spec.js","sourceRoot":"","sources":["../../../../src/components/sdd/tests/SmartDesktopDesigner.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,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAEtD,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACxC,EAAE,CAAC,wCAAwC,EAAE,KAAK,IAAI,EAAE;QACvD,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,UAAU,oBAAM,UAAU,CAAC,IAAkC,EAAI,CAAC,CAAC;QAE1F,MAAM,CAAC,MAAM,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACzD,CAAC,CAAC,CAAC;IAEH;QACC;YACC,GAAG,EAAE;gBACJ,EAAE,EAAE,uBAAuB;gBAC3B,KAAK,EAAE,aAAa;aACpB;SACD;QACD;YACC,GAAG,EAAE;gBACJ,EAAE,EAAE,gCAAgC;gBACpC,KAAK,EAAE,YAAY;aACnB;SACD;QACD;YACC,GAAG,EAAE;gBACJ,EAAE,EAAE,iBAAiB;gBACrB,KAAK,EAAE,OAAO;aACd;SACD;QACD;YACC,GAAG,E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ChB,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,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 { DefaultSDD } from \"../stories/SmartDesktopDesigner.stories\";\nimport { waitTick } from \"../sdd_helpers\";\nimport { SmartDesktopDesignerProps } from \"../SmartDesktopDesigner\";\nimport { accessibilityAssessor } from \"./a11y_helper\";\n\ndescribe(\"<SmartDesktopDesigner/>\", () => {\n\tit(\"should pass accessibility scans (Page)\", async () => {\n\t\tconst wrapper = mount(<DefaultSDD {...(DefaultSDD.args as SmartDesktopDesignerProps)} />);\n\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\n\t});\n\n\t[\n\t\t{\n\t\t\tnav: {\n\t\t\t\tid: \"applications-nav-link\",\n\t\t\t\ttitle: \"Manage apps\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tnav: {\n\t\t\t\tid: \"applications-optional-nav-link\",\n\t\t\t\ttitle: \"Extensions\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tnav: {\n\t\t\t\tid: \"themes-nav-link\",\n\t\t\t\ttitle: \"Theme\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tnav: {\n\t\t\t\tid: \"authentication-nav-link\",\n\t\t\t\ttitle: \"Authentication\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tnav: {\n\t\t\t\tid: \"export-nav-link\",\n\t\t\t\ttitle: \"Publish\",\n\t\t\t},\n\t\t},\n\t].forEach((target) => {\n\t\tit(`should navigate to ${target.nav.title} from left navigation`, async () => {\n\t\t\tconst wrapper = mount(<DefaultSDD {...(DefaultSDD.args as SmartDesktopDesignerProps)} />);\n\n\t\t\tawait waitTick();\n\t\t\twrapper.update();\n\n\t\t\texpect(\n\t\t\t\twrapper.find(\".nav-item.active #getting-started-nav-link\").length,\n\t\t\t\t\"Currently on Getting Started\"\n\t\t\t).to.equal(1);\n\n\t\t\twrapper.find(`.nav-item #${target.nav.id}`).at(0).simulate(\"click\");\n\n\t\t\tawait waitTick();\n\t\t\twrapper.update();\n\n\t\t\texpect(wrapper.find(`.nav-item.active #${target.nav.id}`).length, `${target.nav.id} is active`).to.equal(1);\n\t\t\texpect(wrapper.find(\".view-title .leftSide\").at(0).text(), `page title is \"${target.nav.title}\"`).contains(\n\t\t\t\ttarget.nav.title\n\t\t\t);\n\t\t});\n\t});\n});\n"]}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Themes.spec.js","sourceRoot":"","sources":["../../../../src/components/sdd/tests/Themes.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAEtD,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IAC1B,SAAS,CAAC,GAAG,EAAE;QACd,KAAK,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,IAAI,CAAC,iCAAiC,EAAE,KAAK,IAAI,EAAE;QACrD,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,IAAI,oBAAM,IAAI,CAAC,IAAmB,EAAI,CAAC,CAAC;QAE/D,MAAM,CAAC,MAAM,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACzD,CAAC,CAAC,CAAC,OAAO,CA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AAK,CAAC,oBAAC,IAAI,oBAAM,IAAI,CAAC,IAAmB,EAAI,CAAC,CAAC;QAC/D,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC7D,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC7D,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAClF,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { afterEach, describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport sinon from \"sinon\";\nimport { ThemeProps } from \"../Themes\";\nimport { Page } from \"../stories/Themes.stories\";\nimport { accessibilityAssessor } from \"./a11y_helper\";\n\ndescribe(\"<Themes/>\", () => {\n\tafterEach(() => {\n\t\tsinon.restore();\n\t});\n\tit.skip(\"should pass accessibility scans\", async () => {\n\t\tconst wrapper = mount(<Page {...(Page.args as ThemeProps)} />);\n\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\n\t}).timeout(5000); // This scan is very heavy (4s)\n\n\tit(\"should change tab panels with the tab 'Images' is chosen\", () => {\n\t\tconst wrapper = mount(<Page {...(Page.args as ThemeProps)} />);\n\t\twrapper.find(\"[role='tab']\").at(1).simulate(\"click\");\n\t\texpect(wrapper.find(\".visible .images-section\").exists()).to.be.true;\n\t\texpect(wrapper.find(\".visible .theme-settings\").exists()).to.be.false;\n\t});\n\tit(\"should change tab panels with the tab 'Themes' is chosen\", () => {\n\t\tconst wrapper = mount(<Page {...(Page.args as ThemeProps)} />);\n\t\twrapper.find(\"[role='tab']\").at(0).simulate(\"click\");\n\t\texpect(wrapper.find(\".visible .images-section\").exists()).to.be.false;\n\t\texpect(wrapper.find(\".visible .theme-settings\").exists()).to.be.true;\n\t});\n\tit(\"should launch an Are You Sure dialog when the Dark Theme button is clicked\", () => {\n\t\tconst buttonSpy = sinon.spy(Page.args as ThemeProps, \"areYouSure\");\n\t\tconst wrapper = mount(<Page {...(Page.args as ThemeProps)} />);\n\t\twrapper.find(\".template-row button\").at(0).simulate(\"click\");\n\t\texpect(buttonSpy.calledOnce).to.be.true;\n\t});\n\tit(\"should launch an Are You Sure dialog when the Light Theme button is clicked\", () => {\n\t\tconst buttonSpy = sinon.spy(Page.args as ThemeProps, \"areYouSure\");\n\t\tconst wrapper = mount(<Page {...(Page.args as ThemeProps)} />);\n\t\twrapper.find(\".template-row button\").at(1).simulate(\"click\");\n\t\texpect(buttonSpy.calledOnce).to.be.true;\n\t});\n\tit(\"should change the color values when the Light Theme is chosen\", () => {\n\t\tconst wrapper = mount(<Page {...(Page.args as ThemeProps)} />);\n\t\twrapper.find(\".template-row button\").at(1).simulate(\"click\");\n\t\texpect(wrapper.find(\"[type='color']\").first().prop(\"value\")).to.equal(\"#2C2C2C\");\n\t});\n\tit(\"should change the color values when the Dark Theme is chosen\", () => {\n\t\tconst wrapper = mount(<Page {...(Page.args as ThemeProps)} />);\n\t\twrapper.find(\".template-row button\").at(1).simulate(\"click\");\n\t\twrapper.find(\".template-row button\").at(0).simulate(\"click\");\n\t\texpect(wrapper.find(\"[type='color']\").first().prop(\"value\")).to.equal(\"#ffffff\");\n\t});\n});\n"]}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toolbar.spec.js","sourceRoot":"","sources":["../../../../src/components/sdd/tests/Toolbar.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,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AAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;QAGrE,OAAO;aACL,IAAI,CAAC,YAAY,CAAC;aAClB,EAAE,CAAC,CAAC,CAAC;aACL,QAAQ,CAAC,QAAQ,EAAE;YACnB,MAAM,EAAE;gBACP,KAAK,EAAE,MAAM;aACb;SACD,CAAC,CAAC;QAGJ,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAE/C,MAAM,QAAQ,EAAE,CAAC;QACjB,OAAO,CAAC,MAAM,EAAE,CAAC;QAGjB,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC3D,MAAM,QAAQ,EAAE,CAAC;QAGjB,OAAO,CAAC,MAAM,EAAE,CAAC;QACjB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;IACtE,CAAC,CAAC,CAAC;AAiCJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport { ToolbarProps } from \"../Toolbar\";\nimport { DefaultApplications, EmptyApplications, Long } from \"../stories/Toolbar.stories\";\nimport { getToolbarArgs } from \"../fixtures/apps\";\nimport { waitTick } from \"../sdd_helpers\";\n\n// For running accessibility scans\nimport { accessibilityAssessor } from \"./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\";\naddons.setChannel(mockChannel());\n\nexport const ADD_NEW_APP_BUTTON = \".icon-before-add button\",\n\tACTIVE_TAB_APP_LIST_TABLE_ROW = \".app-list-row\",\n\tAPP_LIST_EMPTY_MESSAGE = \".app-list-empty\",\n\tPAGE_HEADER = \".view-title .leftSide\",\n\tPAGE_HEADER_BUTTON = \".view-title .leftSide button\",\n\tSETUP_WIZARD_BUTTON = \".tile-type-buttons .icon-wizard button\",\n\tSETUP_MANUAL_BUTTON = \".tile-type-buttons .icon-manual button\",\n\tAPP_ACCESS_RULE = \".app-edit-access-item\",\n\tAPP_ACCESS_BLOCKED = \".app-edit-access-blocked\",\n\tQUICK_ADD_APP = \".quick-add-app\",\n\tQUICK_ADD_APP_URL = \".quick-add-app #app-url\",\n\tQUICK_ADD_APP_BUTTON = \".save-button-container button\";\n\nconst preventable = {\n\tpreventDefault: () => {},\n\tstopPropagation: () => {},\n};\n\ndescribe(\"SDD: <Toolbar /> - Menu tab\", () => {\n\t// Example accessibility scan\n\tit(\"should pass accessibility scans\", async () => {\n\t\tconst wrapper = mount(<DefaultApplications {...(DefaultApplications.args as ToolbarProps)} />);\n\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\n\t});\n\n\tit(\"should display empty state with 0 menus\", async () => {\n\t\tconst wrapper = mount(<EmptyApplications {...getToolbarArgs(\"empty\")} />);\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\texpect(wrapper.find(ADD_NEW_APP_BUTTON).first().text()).to.contain(\"Add\");\n\t\texpect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length).to.be.equal(0);\n\t\texpect(wrapper.find(\".app-list-empty\").first().text()).to.contain(\"nothing here\");\n\t});\n\tit(\"should display menu name and delete button when there are 1+ menus\", async () => {\n\t\tconst wrapper = mount(<DefaultApplications {...getToolbarArgs(\"default\")} />);\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\texpect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length).to.be.equal(1);\n\t\texpect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).first().text()).to.contain(\"Examples\");\n\t\texpect(wrapper.find(\".app-list-row .icon-delete\").exists()).to.be.true;\n\t});\n\tit(\"MenuEdit: should have an empty Name field by default\", () => {\n\t\tconst wrapper = mount(<DefaultApplications {...getToolbarArgs(\"default\")} />);\n\t\twrapper.find(ADD_NEW_APP_BUTTON).first().simulate(\"click\");\n\t\texpect(wrapper.find(\"#menu-name\").first().prop(\"value\")).to.equal(\"\");\n\t});\n\tit(\"should display disabled Add New button when there are 5 menus\", async () => {\n\t\tconst wrapper = mount(<Long {...getToolbarArgs(\"long\")} />);\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\texpect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length).to.be.equal(5);\n\t\texpect(wrapper.find(ADD_NEW_APP_BUTTON).first().prop(\"disabled\")).to.be.true;\n\t});\n\tit(\"MenuEdit: should disable submit button when Name field is empty\", async () => {\n\t\tconst wrapper = mount(<DefaultApplications {...getToolbarArgs(\"default\")} />);\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\twrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).at(0).simulate(\"click\", preventable);\n\t\twrapper\n\t\t\t.find(\"#menu-name\")\n\t\t\t.at(0)\n\t\t\t.simulate(\"change\", {\n\t\t\t\ttarget: {\n\t\t\t\t\tvalue: \"\",\n\t\t\t\t},\n\t\t\t});\n\t\texpect(wrapper.find(\"button\").at(1).prop(\"disabled\")).to.be.true;\n\t});\n\n\tconst characters_49 = \"Hubert Blaine Wolfeschlegelsteinhausenbergerdorff\";\n\tconst characters_50 = \"Hubert Blaine Wolfeschlegelsteinhausenbergerdorff!\";\n\tconst characters_51 = \"Hubert Blaine Wolfeschlegelsteinhausenbergerdorff!?\";\n\tit(\"MenuEdit: when Name input receives 49 characters, it should display 49\", async () => {\n\t\tconst wrapper = mount(<DefaultApplications {...getToolbarArgs(\"default\")} />);\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\twrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).at(0).simulate(\"click\", preventable);\n\t\twrapper\n\t\t\t.find(\"#menu-name\")\n\t\t\t.at(0)\n\t\t\t.simulate(\"change\", {\n\t\t\t\ttarget: {\n\t\t\t\t\tvalue: characters_49,\n\t\t\t\t},\n\t\t\t});\n\t\texpect(wrapper.find(\"#menu-name\").prop(\"value\")).to.equal(characters_49);\n\t});\n\tit(\"MenuEdit: when Name input receives 50 characters, it should display 50\", async () => {\n\t\tconst wrapper = mount(<DefaultApplications {...getToolbarArgs(\"default\")} />);\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\twrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).at(0).simulate(\"click\", preventable);\n\t\twrapper\n\t\t\t.find(\"#menu-name\")\n\t\t\t.at(0)\n\t\t\t.simulate(\"change\", {\n\t\t\t\ttarget: {\n\t\t\t\t\tvalue: characters_50,\n\t\t\t\t},\n\t\t\t});\n\t\texpect(wrapper.find(\"#menu-name\").prop(\"value\")).to.equal(characters_50);\n\t});\n\tit(\"MenuEdit: when Name input receives 51 characters, it should only display 50\", async () => {\n\t\tconst wrapper = mount(<DefaultApplications {...getToolbarArgs(\"default\")} />);\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\twrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).at(0).simulate(\"click\", preventable);\n\t\twrapper\n\t\t\t.find(\"#menu-name\")\n\t\t\t.at(0)\n\t\t\t.simulate(\"change\", {\n\t\t\t\ttarget: {\n\t\t\t\t\tvalue: characters_51,\n\t\t\t\t},\n\t\t\t});\n\t\texpect(wrapper.find(\"#menu-name\").prop(\"value\")).to.equal(characters_50);\n\t});\n\tit(\"MenuEdit: back button should take users back to Applications page, Menu tab\", async () => {\n\t\tconst wrapper = mount(<DefaultApplications {...getToolbarArgs(\"default\")} />);\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\t// Click \"Add\" button\n\t\twrapper.find(ADD_NEW_APP_BUTTON).first().simulate(\"click\");\n\n\t\t// Click \"Back\" button\n\t\twrapper.find(\"button\").first().simulate(\"click\");\n\n\t\t// expect(wrapper.find(\".visible div[data-label='Menus']\").exists(), \"Menus Tab is visible\").to.be.true;\n\t\texpect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length, \"Still only 1 menu in list\").to.be.equal(1);\n\t});\n\tit(\"MenuEdit: click Add New, then click Cancel, then see menu list has not changed\", async () => {\n\t\tconst wrapper = mount(<DefaultApplications {...getToolbarArgs(\"default\")} />);\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\texpect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length, \"Only 1 menu in list\").to.be.equal(1);\n\n\t\t// Click \"Add\" button\n\t\twrapper.find(ADD_NEW_APP_BUTTON).first().simulate(\"click\");\n\n\t\t// Click \"Back\" button\n\t\twrapper.find(\"button\").first().simulate(\"click\");\n\n\t\texpect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length, \"Still only 1 menu in list\").to.be.equal(1);\n\t});\n\tit(\"MenuEdit: should show a new menu in the list after a menu has been added\", async () => {\n\t\tconst wrapper = mount(<DefaultApplications {...getToolbarArgs(\"default\")} />);\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\texpect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length, \"Only 1 menu in list\").to.be.equal(1);\n\n\t\t// Click \"Add\" button\n\t\twrapper.find(ADD_NEW_APP_BUTTON).first().simulate(\"click\");\n\n\t\t// Set name as \"Charts\"\n\t\twrapper\n\t\t\t.find(\"#menu-name\")\n\t\t\t.at(0)\n\t\t\t.simulate(\"change\", {\n\t\t\t\ttarget: {\n\t\t\t\t\tvalue: \"Charts\",\n\t\t\t\t},\n\t\t\t});\n\n\t\t// Check \"Example Charts App\"\n\t\twrapper.find(\"input[type='checkbox']\").at(0).simulate(\"change\");\n\n\t\tconsole.log(6);\n\t\t// Click Save\n\t\twrapper.find(\"button\").at(1).simulate(\"click\");\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\t\texpect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length, \"Menu list shows 2 menus\").to.be.equal(2);\n\t});\n\tit(\"name change to a menu should persist\", async () => {\n\t\tconst wrapper = mount(<DefaultApplications {...getToolbarArgs(\"default\")} />);\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\t// Click Examples\n\t\twrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).at(0).simulate(\"click\");\n\n\t\t// Change name to Hello World\n\t\twrapper\n\t\t\t.find(\"#menu-name\")\n\t\t\t.at(0)\n\t\t\t.simulate(\"change\", {\n\t\t\t\ttarget: {\n\t\t\t\t\tvalue: \"Hello World\",\n\t\t\t\t},\n\t\t\t});\n\n\t\t// Click Save\n\t\twrapper.find(\"button\").at(1).simulate(\"click\");\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\t// Confirm name is Hello World\n\t\texpect(wrapper.find(\"[role='listitem']\").at(0).text()).contains(\"Hello World\");\n\t});\n\tit(\"selected applications changes to a menu should persist\", async () => {\n\t\tconst wrapper = mount(<DefaultApplications {...getToolbarArgs(\"default\")} />);\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\t// Click Examples\n\t\twrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).at(0).simulate(\"click\");\n\n\t\t// Select items\n\t\twrapper.find(\"input[type='checkbox']\").at(2).simulate(\"change\");\n\n\t\t// Click save\n\t\twrapper.find(\"button\").at(1).simulate(\"click\");\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\t// Click examples\n\t\twrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).at(0).simulate(\"click\");\n\n\t\t// Confirm items still present\n\t\texpect(wrapper.find(\"input[type='checkbox']\").at(2).prop(\"checked\")).to.be.true;\n\t});\n\tit(\"should not persist menu name when saving multiple menus\", async () => {\n\t\tconst wrapper = mount(<DefaultApplications {...getToolbarArgs(\"default\")} />);\n\n\t\t// Click \"Add\" button\n\t\twrapper.find(ADD_NEW_APP_BUTTON).first().simulate(\"click\");\n\n\t\tawait waitTick();\n\t\t// Confirm name field is empty\n\t\twrapper.update();\n\t\texpect(wrapper.find(\"#menu-name\").first().prop(\"value\")).to.be.empty;\n\n\t\t// Change name to Test\n\t\twrapper\n\t\t\t.find(\"#menu-name\")\n\t\t\t.at(0)\n\t\t\t.simulate(\"change\", {\n\t\t\t\ttarget: {\n\t\t\t\t\tvalue: \"Test\",\n\t\t\t\t},\n\t\t\t});\n\n\t\t// Click save\n\t\twrapper.find(\"button\").at(1).simulate(\"click\");\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\t// Click \"Add\" button\n\t\twrapper.find(ADD_NEW_APP_BUTTON).first().simulate(\"click\");\n\t\tawait waitTick();\n\t\t// Confirm name field is empty\n\n\t\twrapper.update();\n\t\texpect(wrapper.find(\"#menu-name\").first().prop(\"value\")).to.be.empty;\n\t});\n\t// it(\"should show a warning icon if an empty menu is created\", async () => {\n\t// \tconst wrapper = mount(<DefaultApplications {...getToolbarArgs(\"default\")} />);\n\n\t// \t// Click \"Add\" button\n\t// \twrapper.find(ADD_NEW_APP_BUTTON).first().simulate(\"click\");\n\n\t// \tawait waitTick();\n\t// \t// Confirm name field is empty\n\t// \twrapper.update();\n\t// \texpect(wrapper.find(\"#menu-name\").first().prop(\"value\")).to.be.empty;\n\n\t// \t// Change name to Test\n\t// \twrapper\n\t// \t\t.find(\"#menu-name\")\n\t// \t\t.at(0)\n\t// \t\t.simulate(\"change\", {\n\t// \t\t\ttarget: {\n\t// \t\t\t\tvalue: \"Test\",\n\t// \t\t\t},\n\t// \t\t});\n\n\t// \t// Click save\n\t// \twrapper.find(\"button\").at(1).simulate(\"click\");\n\n\t// \tawait waitTick();\n\t// \twrapper.update();\n\n\t// \texpect(\n\t// \t\twrapper.find(\".app-list-row\").at(1).find(\".tooltip-icon-warn\").exists(),\n\t// \t\t\"Warning tooltip present in 2nd row\"\n\t// \t).to.be.true;\n\t// });\n});\n"]}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"a11y_helper.js","sourceRoot":"","sources":["../../../../src/components/sdd/tests/a11y_helper.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,UAAU,CAAC;AAG3B,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,EAAE,OAAqB,EAAE,EAAE;;IACpE,MAAM,EAAE,GAAG,kBAAkB,CAAC;IAI9B,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,WAAW,EAAE,YAAY,EAAE,KAAK,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACzF,MAAM,OAAO,GAAG,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;IAC5C,IAAI,OAAO,KAAK,IAAI,EAAE;QACrB,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;QACtC,OAAO,KAAK,CAAC;KACb;IAGD,MAAM,OAAO,GAAG;QACf,OAAO,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;KAC9B,CAAC;IAGF,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,GAAG,CAAC,OAAsB,EAAE,OAAO,CAAC,CAAC;IAG/D,MAAA,OAAO,CAAC,aAAa,0CAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAG5C,IAAI,OAAO,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;QACpC,OAAO,IAAI,CAAC;KACZ;IAGD,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAEhC,MAAM,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG,CAC1C,CAAC,SAAS,EAAE,GAAG,EAAE,EAAE,CAAC,IAAI,GAAG,GAAG,CAAC,KAAK,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC1G,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,eAAe,YAAY,EAAE,CAAC,CAAC;IAG3C,OAAO,KAAK,CAAC;AACd,CAAC,CAAC","sourcesContent":["import axe from \"axe-core\";\nimport { ReactWrapper } from \"enzyme\";\n\nexport const accessibilityAssessor = async (wrapper: ReactWrapper) => {\n\tconst id = \"axeTestContainer\";\n\n\t// Axe needs a DOM object\n\t// Create a DOM based on the ReactWrapper\n\tdocument.body.insertAdjacentHTML(\"beforeend\", `<div id=\"${id}\">${wrapper.html()}</div>`);\n\tconst element = document.getElementById(id);\n\tif (element === null) {\n\t\tconsole.log(\"Couldn't parse wrapper\");\n\t\treturn false;\n\t}\n\n\t// Only run WCAG 2.0 A and AA rules\n\tconst options = {\n\t\trunOnly: [\"wcag2a\", \"wcag2aa\"],\n\t};\n\n\t// Run the scan\n\tconst results = await axe.run(element as HTMLElement, options);\n\n\t// Tear down the created DOM\n\telement.parentElement?.removeChild(element);\n\n\t// If there are no violations, so this scan passes\n\tif (results.violations.length === 0) {\n\t\treturn true;\n\t}\n\n\t// If there are violations, print them out in a human-readable way\n\tconsole.log(results.violations);\n\n\tconst violationMap = results.violations.map(\n\t\t(violation, key) => `#${key + 1}. ${violation.help}${violation.nodes.map((node) => node.html).join(\"\\n\")}`\n\t);\n\tconsole.log(`Violations: ${violationMap}`);\n\n\t// There were violations, so this scan didn't pass\n\treturn false;\n};\n"]}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdd_helpers.spec.js","sourceRoot":"","sources":["../../../../src/components/sdd/tests/sdd_helpers.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC5B,EAAE,CAAC,gBAAgB,EAAE,GAAG,EAAE;QACzB;YACC,CAAC,EAAE,EAAE,EAAE,CAAC;YACR,CAAC,uBAAuB,EAAE,QAAQ,CAAC;YACnC,CAAC,wBAAwB,EAAE,QAAQ,CAAC;YACpC,CAAC,oBAAoB,EAAE,EAAE,CAAC;YAC1B,CAAC,qCAAqC,EAAE,QAAQ,CAAC;YACjD,CAAC,6BAA6B,EAAE,EAAE,CAAC;SACnC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,EAAE;YAC7B,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,WAAW,KAAK,IAAI,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACtE,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport { getDefaultName } from \"../sdd_helpers\";\n\ndescribe(\"sdd_helpers\", () => {\n\tit(\"getDefaultName\", () => {\n\t\t[\n\t\t\t[\"\", \"\"],\n\t\t\t[\"http://www.google.com\", \"Google\"],\n\t\t\t[\"https://www.google.com\", \"Google\"],\n\t\t\t[\"http://www.cnn.com\", \"\"],\n\t\t\t[\"http://finance.yahoo.com/charts/SPY\", \"Charts\"],\n\t\t\t[\"http://www.cnn.com/abc.html\", \"\"],\n\t\t].forEach(([input, output]) => {\n\t\t\texpect(getDefaultName(input), `Input: \"${input}\"\"`).to.equal(output);\n\t\t});\n\t});\n});\n"]}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themeDefinitions.js","sourceRoot":"","sources":["../../../src/components/sdd/themeDefinitions.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG;IACxB,gBAAgB,EAAE,SAA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AiB,EAAE,MAAM;IAEzB,aAAa,EAAE,MAAM;CACrB,CAAC","sourcesContent":["export const darkTheme = {\n\t\"--core-primary\": \"#22262f\",\n\t\"--core-primary-1\": \"#171a20\",\n\t\"--core-primary-2\": \"#373b43\",\n\t\"--core-primary-3\": \"#3d4455\",\n\t\"--core-primary-4\": \"#5b606f\",\n\t\"--core-primary-5\": \"#acb2c0\",\n\n\t\"--accent-primary\": \"#42a5ba\",\n\t\"--accent-primary-1\": \"#36788b\",\n\n\t\"--accent-positive\": \"#2cc13f\",\n\t\"--accent-positive-1\": \"#27ae38\",\n\n\t\"--accent-aware\": \"#f5a623\",\n\t\"--accent-aware-1\": \"#dc951f\",\n\n\t\"--accent-negative\": \"#f26666\",\n\t\"--accent-negative-1\": \"#b54f4f\",\n\n\t\"--scrollbar-color\": \"#ffffff\",\n\n\t\"--toolbar-separator\": \"rgba(255, 255, 255, 0.3)\",\n\n\t\"--font-color\": \"#ffffff\",\n\t\"--font-color-2\": \"#000000\",\n\t\"--font-shadow\": \"rgba(0, 0, 0, 0.5)\",\n\n\t\"--font-weight\": \"600\",\n\t\"--font-weight-1\": \"400\",\n\t\"--font-weight-2\": \"bold\",\n\n\t\"--font-size\": \"12px\",\n};\nexport const lightTheme = {\n\t\"--core-primary\": \"#FFFFFF\",\n\t\"--core-primary-1\": \"#EFEFEF\",\n\t\"--core-primary-2\": \"#C8D1D6\",\n\t\"--core-primary-3\": \"#A8B6BD\",\n\t\"--core-primary-4\": \"#5A6368\",\n\t\"--core-primary-5\": \"#313738\",\n\n\t\"--accent-primary\": \"#42a5ba\",\n\t\"--accent-primary-1\": \"#36788b\",\n\n\t\"--accent-positive\": \"#2cc13f\",\n\t\"--accent-positive-1\": \"#27ae38\",\n\n\t\"--accent-aware\": \"#a57424\",\n\t\"--accent-aware-1\": \"#8e631e\",\n\n\t\"--accent-negative\": \"#f26666\",\n\t\"--accent-negative-1\": \"#b54f4f\",\n\n\t\"--scrollbar-color\": \"#2c2c2c\",\n\n\t\"--toolbar-separator\": \"rgba(0, 0, 0, 0.3)\",\n\n\t\"--font-color\": \"#2C2C2C\",\n\t\"--font-color-2\": \"#ffffff\",\n\t\"--font-shadow\": \"rgba(0, 0, 0, 0.5)\",\n\n\t\"--font-weight\": \"600\",\n\t\"--font-weight-1\": \"400\",\n\t\"--font-weight-2\": \"bold\",\n\n\t\"--font-size\": \"12px\",\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBestMatch.js","sourceRoot":"","sources":["../../../src/components/search/SearchBestMatch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"SearchBestMatch.js","sourceRoot":"","sources":["../../../src/components/search/SearchBestMatch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAalD,MAAM,aAAa,GAAG,CAAC,uBAAwD,EAAE,EAAE;IAClF,IAAI,uBAAuB,EAAE;QAC5B,IAAI,SAAS,GAA4B,IAAI,CAAC;QAC9C,uBAAuB,CAAC,OAAO,CAAC,CAAC,YAAoC,EAAE,EAAE;;YACxE,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,0CAAE,OAAO,CAAC,CAAC,MAAwB,EAAE,EAAE;gBACxD,IAAI,SAAS,KAAK,IAAI,IAAI,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,EAAE;oBACzD,SAAS,GAAG,MAAM,CAAC;iBACnB;YACF,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;QACH,OAAO,SAAS,CAAC;KACjB;IACD,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;AAMF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE;IACnC,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,GAAG,SAAS,EAAE,CAAC;IAChE,MAAM,aAAa,GAAG,aAAa,CAAC,aAAa,CAAC,CAAC;IACnD,IAAI,CAAC,aAAa;QAAE,OAAO,IAAI,CAAC;IAEhC,OAAO,CACN;QACC,6BAAK,SAAS,EAAC,cAAc,iBAAiB;QAC9C,oBAAC,YAAY,IAAC,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,GAAI,CACpF,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { SearchResult } from \"./SearchResult\";\nimport { useSearch } from \"../../hooks/useSearch\";\nimport { services } from \"@finsemble/finsemble-api\";\n\ntype SearchProviderResponse = services.search.types.SearchProviderResponse;\ntype SearchResultType = services.search.types.SearchResultType;\n\n/**\n * Iterates through the responses from every search provider\n * and returns the item with the highest score.\n * Half of the time this makes sense. The other half\n * it doesn't make sense. It's all built on Fuse JS and how\n * it grades the 'score' of a query to an entity.\n */\nconst findBestMatch = (searchProviderResponses: SearchProviderResponse[] | null) => {\n\tif (searchProviderResponses) {\n\t\tlet bestMatch: SearchResultType | null = null;\n\t\tsearchProviderResponses.forEach((providerInfo: SearchProviderResponse) => {\n\t\t\tproviderInfo?.data?.forEach((result: SearchResultType) => {\n\t\t\t\tif (bestMatch === null || result.score < bestMatch.score) {\n\t\t\t\t\tbestMatch = result;\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\treturn bestMatch;\n\t}\n\treturn null;\n};\n\n/**\n * Simple component that renders a menu item for the entity that\n * best matches the user's query.\n */\nexport const SearchBestMatch = () => {\n\tconst { searchResults, searchQuery, resetSearch } = useSearch();\n\tconst bestMatchData = findBestMatch(searchResults);\n\tif (!bestMatchData) return null;\n\n\treturn (\n\t\t<div>\n\t\t\t<div className=\"search-title\">Best Match</div>\n\t\t\t<SearchResult resetSearch={resetSearch} data={bestMatchData} searchQuery={searchQuery} />\n\t\t</div>\n\t);\n};\n"]}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { services } from "@finsemble/finsemble-api";
|
|
3
|
+
declare type SearchProviderResponse = services.search.types.SearchProviderResponse;
|
|
3
4
|
export declare const SearchProviderResults: React.FunctionComponent<{
|
|
4
5
|
providerResponse: SearchProviderResponse;
|
|
5
6
|
}>;
|
|
7
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchProviderResults.js","sourceRoot":"","sources":["../../../src/components/search/SearchProviderResults.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"SearchProviderResults.js","sourceRoot":"","sources":["../../../src/components/search/SearchProviderResults.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAMlD,MAAM,CAAC,MAAM,qBAAqB,GAE7B,CAAC,EAAE,gBAAgB,EAAE,EAAE,EAAE;;IAC7B,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,GAAG,SAAS,EAAE,CAAC;IAEjD,MAAM,gBAAgB,GAAG,GAAG,EAAE;QAC7B,WAAW,EAAE,CAAC;IACf,CAAC,CAAC;IAGF,MAAM,eAAe,GAAG,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,IAAI,0CAC3C,MAAM,CAAC,CAAC,CAAmB,EAAE,EAAE,CAAC,CAAC,EAClC,IAAI,CAAC,CAAC,CAAmB,EAAE,CAAmB,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;IAExE,MAAM,aAAa,GAAG,GAAG,EAAE;QAC1B,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAC1E,WAAW,EAAE,CAAC;QACd,eAAe,CAAC,IAAI,EAAE,CAAC;IACxB,CAAC,CAAC;IACF,OAAO,CACN;QACE,gBAAgB,IAAI,CACpB,6BAAK,SAAS,EAAC,cAAc;YAC3B,gBAAgB,CAAC,QAAQ,CAAC,WAAW;YACrC,gBAAgB,CAAC,QAAQ,CAAC,mBAAmB,IAAI,CACjD,6BAAK,SAAS,EAAC,gBAAgB,EAAC,OAAO,EAAE,aAAa;gBACpD,gBAAgB,CAAC,QAAQ,CAAC,mBAAmB;gBAC9C,6BAAK,SAAS,EAAC,iCAAiC,GAAO,CAClD,CACN,CACI,CACN,EACA,eAAe,aAAf,eAAe;QAAf,eAAe,CAAE,GAAG,CAAC,CAAC,gBAAgB,EAAE,CAAS,EAAE,EAAE,CAAC,CACtD,oBAAC,YAAY,IAAC,GAAG,EAAE,CAAC,EAAE,WAAW,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,gBAAgB,GAAI,CACzG,CAAC,CACA,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { SearchResult } from \"./SearchResult\";\nimport { useSearch } from \"../../hooks/useSearch\";\nimport { services } from \"@finsemble/finsemble-api\";\n\ntype SearchProviderResponse = services.search.types.SearchProviderResponse;\ntype SearchResultType = services.search.types.SearchResultType;\n\nexport const SearchProviderResults: React.FunctionComponent<{\n\tproviderResponse: SearchProviderResponse;\n}> = ({ providerResponse }) => {\n\tconst { searchQuery, resetSearch } = useSearch();\n\n\tconst clickResetSearch = () => {\n\t\tresetSearch();\n\t};\n\t// Removes empty results then sorts by *lowest* score (search results are retuned from Finsemble where lowest is best)\n\t// This uses fuse.js which uses the \"bitap\" algorithm\n\tconst providerResults = providerResponse?.data\n\t\t?.filter((r: SearchResultType) => r)\n\t\t.sort((a: SearchResultType, b: SearchResultType) => a.score - b.score);\n\n\tconst providerClick = () => {\n\t\tFSBL.Clients.SearchClient.invokeProviderAction(providerResponse.provider);\n\t\tresetSearch();\n\t\tfinsembleWindow.blur();\n\t};\n\treturn (\n\t\t<>\n\t\t\t{providerResponse && (\n\t\t\t\t<div className=\"search-title\">\n\t\t\t\t\t{providerResponse.provider.displayName}\n\t\t\t\t\t{providerResponse.provider.providerActionTitle && (\n\t\t\t\t\t\t<div className=\"provider-title\" onClick={providerClick}>\n\t\t\t\t\t\t\t{providerResponse.provider.providerActionTitle}\n\t\t\t\t\t\t\t<div className=\"ff-arrow-right arrow_right_grey\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{providerResults?.map((individualResult, i: number) => (\n\t\t\t\t<SearchResult key={i} resetSearch={clickResetSearch} searchQuery={searchQuery} data={individualResult} />\n\t\t\t))}\n\t\t</>\n\t);\n};\n"]}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { services } from "@finsemble/finsemble-api";
|
|
3
|
+
declare type SearchQuery = services.search.types.SearchQuery;
|
|
3
4
|
export declare const SearchResult: (props: {
|
|
4
5
|
data: any;
|
|
5
6
|
searchQuery: SearchQuery;
|
|
6
7
|
resetSearch: () => void;
|
|
7
8
|
}) => JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -3,7 +3,7 @@ import { MenuItem } from "../menu/MenuItem";
|
|
|
3
3
|
import { Icon } from "../icon/Icon";
|
|
4
4
|
import { Highlight } from "./Highlight";
|
|
5
5
|
export const SearchResult = (props) => {
|
|
6
|
-
var _a, _b, _c;
|
|
6
|
+
var _a, _b, _c, _d;
|
|
7
7
|
const { data, searchQuery, resetSearch } = props;
|
|
8
8
|
const displayName = (_a = data.displayName) !== null && _a !== void 0 ? _a : data.name;
|
|
9
9
|
const onSearchResultClicked = () => {
|
|
@@ -15,20 +15,22 @@ export const SearchResult = (props) => {
|
|
|
15
15
|
FSBL.Clients.SearchClient.invokeItemAction(data, action);
|
|
16
16
|
resetSearch();
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
const defaultIcon = {
|
|
19
19
|
imageType: "initials",
|
|
20
20
|
name: displayName,
|
|
21
21
|
category: data.type,
|
|
22
22
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
const maybeProviderIcon = () => {
|
|
24
|
+
if (!data.icon)
|
|
25
|
+
return undefined;
|
|
26
|
+
return Object.assign({ imageType: data.icon.type, name: displayName, category: data.type }, data.icon);
|
|
27
|
+
};
|
|
28
|
+
const icon = (_b = maybeProviderIcon()) !== null && _b !== void 0 ? _b : defaultIcon;
|
|
27
29
|
return (React.createElement(MenuItem, { onClick: onSearchResultClicked },
|
|
28
30
|
React.createElement("div", { className: "menu-item-row" },
|
|
29
31
|
React.createElement(Icon, Object.assign({}, icon)),
|
|
30
32
|
React.createElement(Highlight, { text: displayName, matchAgainst: searchQuery || "" }),
|
|
31
|
-
((
|
|
33
|
+
((_c = data.actions) === null || _c === void 0 ? void 0 : _c.length) > 1 && (React.createElement("div", { className: "search-actions" }, (_d = data.actions) === null || _d === void 0 ? void 0 : _d.map((action, i) => (React.createElement("div", { key: `actionbtn${i}`, className: "search-actions actionButton", onClick: (e) => {
|
|
32
34
|
e.preventDefault();
|
|
33
35
|
e.stopPropagation();
|
|
34
36
|
onActionClicked(action);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchResult.js","sourceRoot":"","sources":["../../../src/components/search/SearchResult.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MA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EAAE,WAAW,EACjB,QAAQ,EAAE,IAAI,CAAC,IAAI,IAChB,IAAI,CAAC,IAAI,EACX;IACH,CAAC,CAAC;IAEF,MAAM,IAAI,GAAG,MAAA,iBAAiB,EAAE,mCAAI,WAAW,CAAC;IAEhD,OAAO,CACN,oBAAC,QAAQ,IAAC,OAAO,EAAE,qBAAqB;QACvC,6BAAK,SAAS,EAAC,eAAe;YAC7B,oBAAC,IAAI,oBAAK,IAAI,EAAI;YAClB,oBAAC,SAAS,IAAC,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,IAAI,EAAE,GAAI;YAChE,CAAA,MAAA,IAAI,CAAC,OAAO,0CAAE,MAAM,IAAG,CAAC,IAAI,CAC5B,6BAAK,SAAS,EAAC,gBAAgB,IAC7B,MAAA,IAAI,CAAC,OAAO,0CAAE,GAAG,CAAC,CAAC,MAAW,EAAE,CAAS,EAAE,EAAE,CAAC,CAC9C,6BACC,GAAG,EAAE,YAAY,CAAC,EAAE,EACpB,SAAS,EAAC,6BAA6B,EACvC,OAAO,EAAE,CAAC,CAAmB,EAAE,EAAE;oBAChC,CAAC,CAAC,cAAc,EAAE,CAAC;oBACnB,CAAC,CAAC,eAAe,EAAE,CAAC;oBACpB,eAAe,CAAC,MAAM,CAAC,CAAC;oBACxB,WAAW,EAAE,CAAC;oBACd,eAAe,CAAC,IAAI,EAAE,CAAC;gBACxB,CAAC,IAEA,MAAM,CAAC,IAAI,CACP,CACN,CAAC,CACG,CACN,CACI,CACI,CACX,CAAC;AACH,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { MenuItem } from \"../menu/MenuItem\";\nimport { Icon } from \"../icon/Icon\";\nimport { Highlight } from \"./Highlight\";\nimport { services } from \"@finsemble/finsemble-api\";\nimport { IconDescriptor } from \"@finsemble/finsemble-api/types/services/window/types\";\n\ntype SearchQuery = services.search.types.SearchQuery;\n\nexport const SearchResult = (props: { data: any; searchQuery: SearchQuery; resetSearch: () => void }) => {\n\tconst { data, searchQuery, resetSearch } = props;\n\n\tconst displayName = data.displayName ?? data.name;\n\n\t// Will trigger the action associated with the item\n\t// (e.g., loading a workspace, spawning a component)\n\tconst onSearchResultClicked = () => {\n\t\tFSBL.Clients.SearchClient.invokeItemAction(data, data.actions?.[0]);\n\t\tresetSearch();\n\t};\n\n\tconst onActionClicked = (action: any) => {\n\t\tFSBL.Clients.SearchClient.invokeItemAction(data, action);\n\t\tresetSearch();\n\t};\n\n\t// Default icon to be based on initials\n\tconst defaultIcon: IconDescriptor = {\n\t\timageType: \"initials\",\n\t\tname: displayName,\n\t\tcategory: data.type,\n\t};\n\n\t// Use iconography if provided in the search results\n\tconst maybeProviderIcon = () => {\n\t\tif (!data.icon) return undefined;\n\t\t// Default conversion which can be overridden if the provider explicitly\n\t\t// provides `imageType`, `name` or `category` fields.\n\t\treturn {\n\t\t\timageType: data.icon.type,\n\t\t\tname: displayName,\n\t\t\tcategory: data.type,\n\t\t\t...data.icon,\n\t\t};\n\t};\n\n\tconst icon = maybeProviderIcon() ?? defaultIcon;\n\n\treturn (\n\t\t<MenuItem onClick={onSearchResultClicked}>\n\t\t\t<div className=\"menu-item-row\">\n\t\t\t\t<Icon {...icon} />\n\t\t\t\t<Highlight text={displayName} matchAgainst={searchQuery || \"\"} />\n\t\t\t\t{data.actions?.length > 1 && (\n\t\t\t\t\t<div className=\"search-actions\">\n\t\t\t\t\t\t{data.actions?.map((action: any, i: number) => (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tkey={`actionbtn${i}`}\n\t\t\t\t\t\t\t\tclassName=\"search-actions actionButton\"\n\t\t\t\t\t\t\t\tonClick={(e: React.MouseEvent) => {\n\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t\t\t\tonActionClicked(action);\n\t\t\t\t\t\t\t\t\tresetSearch();\n\t\t\t\t\t\t\t\t\tfinsembleWindow.blur();\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{action.name}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</MenuItem>\n\t);\n};\n"]}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import React, { useEffect, useRef, useState } from "react";
|
|
1
|
+
import React, { useEffect, useMemo, useRef, useState } from "react";
|
|
2
2
|
import "../../assets/css/button.css";
|
|
3
3
|
import { useOutsideClickDetector } from "../../hooks/useOutsideClickDetector";
|
|
4
4
|
const emptyOption = {
|
|
5
5
|
optionLabel: "Please select..",
|
|
6
6
|
clickHandler: () => { },
|
|
7
7
|
};
|
|
8
|
-
const DefaultDropdownButton = ({ allowEmpty = true, caretLocation = "left", classNames = "", buttonOptions = [], defaultSelection = null, enabled = true, }) => {
|
|
8
|
+
const DefaultDropdownButton = ({ allowEmpty = true, caretLocation = "left", classNames = "", buttonOptions = [], defaultSelection = null, enabled = true, buttonLabel = "Select value", }) => {
|
|
9
9
|
const wrapperRef = useRef(null);
|
|
10
|
+
const uniqueId = useMemo(() => Math.random(), []);
|
|
10
11
|
const [optionsVisible, toggleOptionsPanel] = useState(false);
|
|
11
12
|
const [focusIndex, setFocusIndex] = useState(-1);
|
|
12
13
|
useOutsideClickDetector(wrapperRef, () => toggleOptionsPanel(false));
|
|
@@ -54,7 +55,7 @@ const DefaultDropdownButton = ({ allowEmpty = true, caretLocation = "left", clas
|
|
|
54
55
|
const options = buttonOptions.map((option, index) => (React.createElement("div", { key: index, tabIndex: 0, className: "finsemble-dropdown__btn-option", onClick: () => {
|
|
55
56
|
selectOptionByIndex(index);
|
|
56
57
|
}, role: "option", "aria-selected": focusIndex === index }, option.optionLabel)));
|
|
57
|
-
return (React.createElement("div", { tabIndex: enabled ? 0 : -1, ref: wrapperRef, role: "combobox", "aria-haspopup": optionsVisible, className: `finsemble-dropdown__btn ${classNames} ${optionsVisible ? "active" : ""}`, onClick: enabled ? () => toggleOptionsPanel(!optionsVisible) : () => { }, onKeyDown: (e) => {
|
|
58
|
+
return (React.createElement("div", { tabIndex: enabled ? 0 : -1, ref: wrapperRef, role: "combobox", "aria-haspopup": optionsVisible, "aria-expanded": optionsVisible, "aria-owns": `default-dropdown_${uniqueId}`, "aria-label": buttonLabel, className: `finsemble-dropdown__btn ${classNames} ${optionsVisible ? "active" : ""}`, onClick: enabled ? () => toggleOptionsPanel(!optionsVisible) : () => { }, onKeyDown: (e) => {
|
|
58
59
|
if (!enabled) {
|
|
59
60
|
return;
|
|
60
61
|
}
|
|
@@ -91,7 +92,7 @@ const DefaultDropdownButton = ({ allowEmpty = true, caretLocation = "left", clas
|
|
|
91
92
|
React.createElement("span", { className: "finsemble-dropdown__btn-label" }, selectedValue ? selectedValue.optionLabel : emptyOption.optionLabel))) : (React.createElement(React.Fragment, null,
|
|
92
93
|
React.createElement("span", { className: "finsemble-dropdown__btn-label" }, selectedValue ? selectedValue.optionLabel : emptyOption.optionLabel),
|
|
93
94
|
React.createElement("i", { className: `ff-caret-${optionsVisible ? "up" : "down"}` }))),
|
|
94
|
-
optionsVisible ? React.createElement("div", { className: "finsemble-dropdown__btn-options" }, options) : null));
|
|
95
|
+
optionsVisible ? (React.createElement("div", { id: `default-dropdown_${uniqueId}`, className: "finsemble-dropdown__btn-options" }, options)) : null));
|
|
95
96
|
};
|
|
96
97
|
export default DefaultDropdownButton;
|
|
97
98
|
//# sourceMappingURL=DefaultDropdownButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultDropdownButton.js","sourceRoot":"","sources":["../../../src/components/shared/DefaultDropdownButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAkB9E,MAAM,WAAW,GAA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G,KAAK,GAAG,EAAE;oBAEvC,kBAAkB,CAAC,CAAC,cAAc,CAAC,CAAC;oBACpC,aAAa,CAAC,CAAC,CAAC,CAAC;iBACjB;qBAAM,IAAI,CAAC,CAAC,GAAG,KAAK,WAAW,EAAE;oBAEjC,uBAAuB,CAAC,MAAM,CAAC,CAAC;iBAChC;qBAAM,IAAI,CAAC,CAAC,GAAG,KAAK,SAAS,EAAE;oBAE/B,uBAAuB,CAAC,IAAI,CAAC,CAAC;iBAC9B;aACD;QACF,CAAC;QAEA,aAAa,KAAK,MAAM,CAAC,CAAC,CAAC,CAC3B;YACC,2BAAG,SAAS,EAAE,YAAY,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,GAAI;YAC9D,8BAAM,SAAS,EAAC,+BAA+B,IAC7C,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,WAAW,CAC9D,CACL,CACH,CAAC,CAAC,CAAC,CACH;YACC,8BAAM,SAAS,EAAC,+BAA+B,IAC7C,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,WAAW,CAC9D;YACP,2BAAG,SAAS,EAAE,YAAY,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,GAAI,CAC5D,CACH;QACA,cAAc,CAAC,CAAC,CAAC,6BAAK,SAAS,EAAC,iCAAiC,IAAE,OAAO,CAAO,CAAC,CAAC,CAAC,IAAI,CACpF,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC","sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\nimport \"../../assets/css/button.css\";\nimport { useOutsideClickDetector } from \"../../hooks/useOutsideClickDetector\";\n\nexport interface IFinsembleDefaultDropdownButtonOptionsProps {\n\toptionLabel: string;\n\toptionValue?: any;\n\tclickHandler: Function;\n}\n\nexport interface IFinsembleDefaultDropdownButtonProps {\n\tallowEmpty?: boolean;\n\tbuttonLabel?: string;\n\tcaretLocation?: \"left\" | \"right\";\n\tclassNames?: string;\n\tbuttonOptions: Array<IFinsembleDefaultDropdownButtonOptionsProps>;\n\tdefaultSelection?: IFinsembleDefaultDropdownButtonOptionsProps | null;\n\tenabled?: boolean;\n}\n\nconst emptyOption: IFinsembleDefaultDropdownButtonOptionsProps = {\n\toptionLabel: \"Please select..\",\n\tclickHandler: () => {},\n};\n\nconst DefaultDropdownButton: React.FunctionComponent<IFinsembleDefaultDropdownButtonProps> = ({\n\tallowEmpty = true,\n\tcaretLocation = \"left\",\n\tclassNames = \"\",\n\tbuttonOptions = [],\n\tdefaultSelection = null,\n\tenabled = true,\n}: IFinsembleDefaultDropdownButtonProps) => {\n\tconst wrapperRef = useRef<HTMLDivElement>(null);\n\tconst [optionsVisible, toggleOptionsPanel] = useState(false);\n\tconst [focusIndex, setFocusIndex] = useState(-1);\n\tuseOutsideClickDetector(wrapperRef, () => toggleOptionsPanel(false));\n\n\tconst [selectedValue, setSelectedValue] = useState<IFinsembleDefaultDropdownButtonOptionsProps | null>(\n\t\tdefaultSelection\n\t);\n\n\tuseEffect(() => {\n\t\tif (defaultSelection) {\n\t\t\tsetSelectedValue(defaultSelection);\n\t\t} else {\n\t\t\tif (allowEmpty) {\n\t\t\t\tif (!buttonOptions.includes(emptyOption)) buttonOptions.unshift(emptyOption);\n\t\t\t\tsetSelectedValue(emptyOption);\n\t\t\t} else {\n\t\t\t\tsetSelectedValue(buttonOptions[0]);\n\t\t\t}\n\t\t}\n\t}, [defaultSelection]);\n\n\tconst selectOptionByIndex = (index: number) => {\n\t\tsetSelectedValue(buttonOptions[index]);\n\t\tif (\"clickHandler\" in buttonOptions[index]) {\n\t\t\tbuttonOptions[index].clickHandler();\n\t\t}\n\t\ttoggleOptionsPanel(false);\n\t};\n\n\tconst changeOptionByDirection = (direction: \"up\" | \"down\") => {\n\t\tif (!selectedValue) {\n\t\t\tif (direction === \"down\") {\n\t\t\t\tselectOptionByIndex(0);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst optionLabels = buttonOptions.map((opt) => opt.optionLabel);\n\t\tconst currentOptionIndex = optionLabels.indexOf(selectedValue.optionLabel);\n\n\t\tif (direction === \"up\") {\n\t\t\tconst newIndex = currentOptionIndex - 1;\n\t\t\tselectOptionByIndex(Math.max(0, newIndex));\n\t\t} else {\n\t\t\tconst newIndex = currentOptionIndex + 1;\n\t\t\tselectOptionByIndex(Math.min(newIndex, buttonOptions.length - 1));\n\t\t}\n\t};\n\n\tconst options = buttonOptions.map((option, index) => (\n\t\t<div\n\t\t\tkey={index}\n\t\t\ttabIndex={0}\n\t\t\tclassName=\"finsemble-dropdown__btn-option\"\n\t\t\tonClick={() => {\n\t\t\t\tselectOptionByIndex(index);\n\t\t\t}}\n\t\t\trole=\"option\"\n\t\t\taria-selected={focusIndex === index}\n\t\t>\n\t\t\t{option.optionLabel}\n\t\t</div>\n\t));\n\n\treturn (\n\t\t<div\n\t\t\ttabIndex={enabled ? 0 : -1}\n\t\t\tref={wrapperRef}\n\t\t\trole=\"combobox\"\n\t\t\taria-haspopup={optionsVisible}\n\t\t\tclassName={`finsemble-dropdown__btn ${classNames} ${optionsVisible ? \"active\" : \"\"}`}\n\t\t\tonClick={enabled ? () => toggleOptionsPanel(!optionsVisible) : () => {}}\n\t\t\tonKeyDown={(e) => {\n\t\t\t\tif (!enabled) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (optionsVisible) {\n\t\t\t\t\t// Keyboard navigation for the expanded combobox options\n\t\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\t\t\t\t\t// Activate the selected option (equiv: click the hovered option)\n\t\t\t\t\t\tselectOptionByIndex(focusIndex);\n\t\t\t\t\t} else if (e.key === \"ArrowDown\") {\n\t\t\t\t\t\t// Select next option down (equiv: hover over the next option down)\n\t\t\t\t\t\tsetFocusIndex(focusIndex + 1 >= buttonOptions.length ? buttonOptions.length - 1 : focusIndex + 1);\n\t\t\t\t\t} else if (e.key === \"ArrowUp\") {\n\t\t\t\t\t\t// Select next option up (equiv: hover over the next option up)\n\t\t\t\t\t\tsetFocusIndex(focusIndex - 1 <= 0 ? 0 : focusIndex - 1);\n\t\t\t\t\t} else if (e.key === \"Escape\") {\n\t\t\t\t\t\t// Without activating anything, close the options. (equiv: clicking away)\n\t\t\t\t\t\ttoggleOptionsPanel(false);\n\t\t\t\t\t\tsetFocusIndex(0);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Keyboard navigation for a collapsed combobox\n\t\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\t\t\t\t\t// Expand the combobox\n\t\t\t\t\t\ttoggleOptionsPanel(!optionsVisible);\n\t\t\t\t\t\tsetFocusIndex(0);\n\t\t\t\t\t} else if (e.key === \"ArrowDown\") {\n\t\t\t\t\t\t// Cycle between options (down)\n\t\t\t\t\t\tchangeOptionByDirection(\"down\");\n\t\t\t\t\t} else if (e.key === \"ArrowUp\") {\n\t\t\t\t\t\t// Cycle between options (up)\n\t\t\t\t\t\tchangeOptionByDirection(\"up\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t{caretLocation === \"left\" ? (\n\t\t\t\t<>\n\t\t\t\t\t<i className={`ff-caret-${optionsVisible ? \"up\" : \"down\"}`} />\n\t\t\t\t\t<span className=\"finsemble-dropdown__btn-label\">\n\t\t\t\t\t\t{selectedValue ? selectedValue.optionLabel : emptyOption.optionLabel}\n\t\t\t\t\t</span>\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<span className=\"finsemble-dropdown__btn-label\">\n\t\t\t\t\t\t{selectedValue ? selectedValue.optionLabel : emptyOption.optionLabel}\n\t\t\t\t\t</span>\n\t\t\t\t\t<i className={`ff-caret-${optionsVisible ? \"up\" : \"down\"}`} />\n\t\t\t\t</>\n\t\t\t)}\n\t\t\t{optionsVisible ? <div className=\"finsemble-dropdown__btn-options\">{options}</div> : null}\n\t\t</div>\n\t);\n};\n\nexport default DefaultDropdownButton;\n"]}
|
|
1
|
+
{"version":3,"file":"DefaultDropdownButton.js","sourceRoot":"","sources":["../../../src/components/shared/DefaultDropdownButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAkB9E,MAAM,WAAW,GAAgD;IAChE,WAAW,EAAE,iBAAiB;IAC9B,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC;CACtB,CAAC;AAEF,MAAM,qBAAqB,GAAkE,CAAC,EAC7F,UAAU,GAAG,IAAI,EACjB,aAAa,GAAG,MAAM,EACtB,UAAU,GAAG,EAAE,EACf,aAAa,GAAG,EAAE,EAClB,gBAAgB,GAAG,IAAI,EACvB,OAAO,GAAG,IAAI,EACd,WAAW,GAAG,cAAc,GACU,EAAE,EAAE;IAC1C,MAAM,UAAU,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAChD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;IAClD,MAAM,CAAC,cAAc,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC7D,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IACjD,uBAAuB,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC;IAErE,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CACjD,gBAAgB,CAChB,CAAC;IAEF,SAAS,CAAC,GAAG,EAA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A+B,IAC7C,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,WAAW,CAC9D;YACP,2BAAG,SAAS,EAAE,YAAY,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,GAAI,CAC5D,CACH;QACA,cAAc,CAAC,CAAC,CAAC,CACjB,6BAAK,EAAE,EAAE,oBAAoB,QAAQ,EAAE,EAAE,SAAS,EAAC,iCAAiC,IAClF,OAAO,CACH,CACN,CAAC,CAAC,CAAC,IAAI,CACH,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC","sourcesContent":["import React, { useEffect, useMemo, useRef, useState } from \"react\";\nimport \"../../assets/css/button.css\";\nimport { useOutsideClickDetector } from \"../../hooks/useOutsideClickDetector\";\n\nexport interface IFinsembleDefaultDropdownButtonOptionsProps {\n\toptionLabel: string;\n\toptionValue?: any;\n\tclickHandler: Function;\n}\n\nexport interface IFinsembleDefaultDropdownButtonProps {\n\tallowEmpty?: boolean;\n\tbuttonLabel?: string;\n\tcaretLocation?: \"left\" | \"right\";\n\tclassNames?: string;\n\tbuttonOptions: Array<IFinsembleDefaultDropdownButtonOptionsProps>;\n\tdefaultSelection?: IFinsembleDefaultDropdownButtonOptionsProps | null;\n\tenabled?: boolean;\n}\n\nconst emptyOption: IFinsembleDefaultDropdownButtonOptionsProps = {\n\toptionLabel: \"Please select..\",\n\tclickHandler: () => {},\n};\n\nconst DefaultDropdownButton: React.FunctionComponent<IFinsembleDefaultDropdownButtonProps> = ({\n\tallowEmpty = true,\n\tcaretLocation = \"left\",\n\tclassNames = \"\",\n\tbuttonOptions = [],\n\tdefaultSelection = null,\n\tenabled = true,\n\tbuttonLabel = \"Select value\",\n}: IFinsembleDefaultDropdownButtonProps) => {\n\tconst wrapperRef = useRef<HTMLDivElement>(null);\n\tconst uniqueId = useMemo(() => Math.random(), []);\n\tconst [optionsVisible, toggleOptionsPanel] = useState(false);\n\tconst [focusIndex, setFocusIndex] = useState(-1);\n\tuseOutsideClickDetector(wrapperRef, () => toggleOptionsPanel(false));\n\n\tconst [selectedValue, setSelectedValue] = useState<IFinsembleDefaultDropdownButtonOptionsProps | null>(\n\t\tdefaultSelection\n\t);\n\n\tuseEffect(() => {\n\t\tif (defaultSelection) {\n\t\t\tsetSelectedValue(defaultSelection);\n\t\t} else {\n\t\t\tif (allowEmpty) {\n\t\t\t\tif (!buttonOptions.includes(emptyOption)) buttonOptions.unshift(emptyOption);\n\t\t\t\tsetSelectedValue(emptyOption);\n\t\t\t} else {\n\t\t\t\tsetSelectedValue(buttonOptions[0]);\n\t\t\t}\n\t\t}\n\t}, [defaultSelection]);\n\n\tconst selectOptionByIndex = (index: number) => {\n\t\tsetSelectedValue(buttonOptions[index]);\n\t\tif (\"clickHandler\" in buttonOptions[index]) {\n\t\t\tbuttonOptions[index].clickHandler();\n\t\t}\n\t\ttoggleOptionsPanel(false);\n\t};\n\n\tconst changeOptionByDirection = (direction: \"up\" | \"down\") => {\n\t\tif (!selectedValue) {\n\t\t\tif (direction === \"down\") {\n\t\t\t\tselectOptionByIndex(0);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst optionLabels = buttonOptions.map((opt) => opt.optionLabel);\n\t\tconst currentOptionIndex = optionLabels.indexOf(selectedValue.optionLabel);\n\n\t\tif (direction === \"up\") {\n\t\t\tconst newIndex = currentOptionIndex - 1;\n\t\t\tselectOptionByIndex(Math.max(0, newIndex));\n\t\t} else {\n\t\t\tconst newIndex = currentOptionIndex + 1;\n\t\t\tselectOptionByIndex(Math.min(newIndex, buttonOptions.length - 1));\n\t\t}\n\t};\n\n\tconst options = buttonOptions.map((option, index) => (\n\t\t<div\n\t\t\tkey={index}\n\t\t\ttabIndex={0}\n\t\t\tclassName=\"finsemble-dropdown__btn-option\"\n\t\t\tonClick={() => {\n\t\t\t\tselectOptionByIndex(index);\n\t\t\t}}\n\t\t\trole=\"option\"\n\t\t\taria-selected={focusIndex === index}\n\t\t>\n\t\t\t{option.optionLabel}\n\t\t</div>\n\t));\n\n\treturn (\n\t\t<div\n\t\t\ttabIndex={enabled ? 0 : -1}\n\t\t\tref={wrapperRef}\n\t\t\trole=\"combobox\"\n\t\t\taria-haspopup={optionsVisible}\n\t\t\taria-expanded={optionsVisible}\n\t\t\taria-owns={`default-dropdown_${uniqueId}`}\n\t\t\taria-label={buttonLabel}\n\t\t\tclassName={`finsemble-dropdown__btn ${classNames} ${optionsVisible ? \"active\" : \"\"}`}\n\t\t\tonClick={enabled ? () => toggleOptionsPanel(!optionsVisible) : () => {}}\n\t\t\tonKeyDown={(e) => {\n\t\t\t\tif (!enabled) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (optionsVisible) {\n\t\t\t\t\t// Keyboard navigation for the expanded combobox options\n\t\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\t\t\t\t\t// Activate the selected option (equiv: click the hovered option)\n\t\t\t\t\t\tselectOptionByIndex(focusIndex);\n\t\t\t\t\t} else if (e.key === \"ArrowDown\") {\n\t\t\t\t\t\t// Select next option down (equiv: hover over the next option down)\n\t\t\t\t\t\tsetFocusIndex(focusIndex + 1 >= buttonOptions.length ? buttonOptions.length - 1 : focusIndex + 1);\n\t\t\t\t\t} else if (e.key === \"ArrowUp\") {\n\t\t\t\t\t\t// Select next option up (equiv: hover over the next option up)\n\t\t\t\t\t\tsetFocusIndex(focusIndex - 1 <= 0 ? 0 : focusIndex - 1);\n\t\t\t\t\t} else if (e.key === \"Escape\") {\n\t\t\t\t\t\t// Without activating anything, close the options. (equiv: clicking away)\n\t\t\t\t\t\ttoggleOptionsPanel(false);\n\t\t\t\t\t\tsetFocusIndex(0);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Keyboard navigation for a collapsed combobox\n\t\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\t\t\t\t\t// Expand the combobox\n\t\t\t\t\t\ttoggleOptionsPanel(!optionsVisible);\n\t\t\t\t\t\tsetFocusIndex(0);\n\t\t\t\t\t} else if (e.key === \"ArrowDown\") {\n\t\t\t\t\t\t// Cycle between options (down)\n\t\t\t\t\t\tchangeOptionByDirection(\"down\");\n\t\t\t\t\t} else if (e.key === \"ArrowUp\") {\n\t\t\t\t\t\t// Cycle between options (up)\n\t\t\t\t\t\tchangeOptionByDirection(\"up\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t{caretLocation === \"left\" ? (\n\t\t\t\t<>\n\t\t\t\t\t<i className={`ff-caret-${optionsVisible ? \"up\" : \"down\"}`} />\n\t\t\t\t\t<span className=\"finsemble-dropdown__btn-label\">\n\t\t\t\t\t\t{selectedValue ? selectedValue.optionLabel : emptyOption.optionLabel}\n\t\t\t\t\t</span>\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<span className=\"finsemble-dropdown__btn-label\">\n\t\t\t\t\t\t{selectedValue ? selectedValue.optionLabel : emptyOption.optionLabel}\n\t\t\t\t\t</span>\n\t\t\t\t\t<i className={`ff-caret-${optionsVisible ? \"up\" : \"down\"}`} />\n\t\t\t\t</>\n\t\t\t)}\n\t\t\t{optionsVisible ? (\n\t\t\t\t<div id={`default-dropdown_${uniqueId}`} className=\"finsemble-dropdown__btn-options\">\n\t\t\t\t\t{options}\n\t\t\t\t</div>\n\t\t\t) : null}\n\t\t</div>\n\t);\n};\n\nexport default DefaultDropdownButton;\n"]}
|
|
@@ -4,6 +4,7 @@ import { describe, it } from "mocha";
|
|
|
4
4
|
import { expect } from "chai";
|
|
5
5
|
import DefaultDropdownButton from "./../DefaultDropdownButton";
|
|
6
6
|
import * as sinon from "sinon";
|
|
7
|
+
import { accessibilityAssessor } from "../../sdd/tests/a11y_helper";
|
|
7
8
|
describe("<DefaultDropdownButton/>", () => {
|
|
8
9
|
it("should display options when not displaying options and clicked on", () => {
|
|
9
10
|
const buttonOptions = [
|
|
@@ -50,5 +51,13 @@ describe("<DefaultDropdownButton/>", () => {
|
|
|
50
51
|
expect(spy.calledWith("Hello World")).to.be.true;
|
|
51
52
|
spy.restore();
|
|
52
53
|
});
|
|
54
|
+
it("should pass accessibility scans", async () => {
|
|
55
|
+
const buttonOptions = [
|
|
56
|
+
{ optionLabel: "one", clickHandler: () => { } },
|
|
57
|
+
{ optionLabel: "two", clickHandler: () => { } },
|
|
58
|
+
];
|
|
59
|
+
const wrapper = mount(React.createElement(DefaultDropdownButton, { buttonOptions: buttonOptions }));
|
|
60
|
+
expect(await accessibilityAssessor(wrapper)).to.be.true;
|
|
61
|
+
});
|
|
53
62
|
});
|
|
54
63
|
//# sourceMappingURL=DefaultDropdownButton.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultDropdownButton.spec.js","sourceRoot":"","sources":["../../../../src/components/shared/tests/DefaultDropdownButton.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,qBAAqB,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DefaultDropdownButton.spec.js","sourceRoot":"","sources":["../../../../src/components/shared/tests/DefaultDropdownButton.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,qBAAqB,MAAM,4BAA4B,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C,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC3D,OAAO,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACxE,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QACjD,GAAG,CAAC,OAAO,EAAE,CAAC;IACf,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iCAAiC,EAAE,KAAK,IAAI,EAAE;QAChD,MAAM,aAAa,GAAG;YACrB,EAAE,WAAW,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE;YAC9C,EAAE,WAAW,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE;SAC9C,CAAC;QACF,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,qBAAqB,IAAC,aAAa,EAAE,aAAa,GAAI,CAAC,CAAC;QAC/E,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 } from \"mocha\";\nimport { expect } from \"chai\";\nimport DefaultDropdownButton from \"./../DefaultDropdownButton\";\nimport * as sinon from \"sinon\";\nimport { accessibilityAssessor } from \"../../sdd/tests/a11y_helper\";\n\ndescribe(\"<DefaultDropdownButton/>\", () => {\n\tit(\"should display options when not displaying options and clicked on\", () => {\n\t\tconst buttonOptions = [\n\t\t\t{ optionLabel: \"one\", clickHandler: () => {} },\n\t\t\t{ optionLabel: \"two\", clickHandler: () => {} },\n\t\t];\n\t\tconst wrapper = mount(<DefaultDropdownButton buttonOptions={buttonOptions} />);\n\t\twrapper.find(\".finsemble-dropdown__btn\").simulate(\"click\");\n\t\texpect(wrapper.find(\".finsemble-dropdown__btn-options\")).to.have.lengthOf(1);\n\t});\n\n\tit(\"should not display options when currently displaying options and clicked on\", () => {\n\t\tconst buttonOptions = [\n\t\t\t{ optionLabel: \"one\", clickHandler: () => {} },\n\t\t\t{ optionLabel: \"two\", clickHandler: () => {} },\n\t\t];\n\t\tconst wrapper = mount(<DefaultDropdownButton buttonOptions={buttonOptions} />);\n\t\twrapper.find(\".finsemble-dropdown__btn\").simulate(\"click\");\n\t\twrapper.find(\".finsemble-dropdown__btn\").simulate(\"click\");\n\t\texpect(wrapper.find(\".finsemble-dropdown__btn-options\")).to.have.lengthOf(0);\n\t});\n\n\tit(\"should not display options when clicked on and not enabled\", () => {\n\t\tconst buttonOptions = [\n\t\t\t{ optionLabel: \"one\", clickHandler: () => {} },\n\t\t\t{ optionLabel: \"two\", clickHandler: () => {} },\n\t\t];\n\t\tconst wrapper = mount(<DefaultDropdownButton buttonOptions={buttonOptions} enabled={false} />);\n\t\twrapper.find(\".finsemble-dropdown__btn\").simulate(\"click\");\n\t\texpect(wrapper.find(\".finsemble-dropdown__btn-options\")).to.have.lengthOf(0);\n\t});\n\n\tit(\"should perform the specific clickHandler function corresponding to its option\", () => {\n\t\tlet spy = sinon.spy(console, \"log\");\n\t\tconst buttonOptions = [\n\t\t\t{ optionLabel: \"one\", clickHandler: () => {} },\n\t\t\t{\n\t\t\t\toptionLabel: \"two\",\n\t\t\t\tclickHandler: () => {\n\t\t\t\t\tconsole.log(\"Hello World\");\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t\tconst wrapper = mount(<DefaultDropdownButton buttonOptions={buttonOptions} />);\n\t\twrapper.find(\".finsemble-dropdown__btn\").simulate(\"click\");\n\t\twrapper.find(\".finsemble-dropdown__btn-option\").at(2).simulate(\"click\");\n\t\texpect(spy.calledWith(\"Hello World\")).to.be.true;\n\t\tspy.restore();\n\t});\n\n\tit(\"should pass accessibility scans\", async () => {\n\t\tconst buttonOptions = [\n\t\t\t{ optionLabel: \"one\", clickHandler: () => {} },\n\t\t\t{ optionLabel: \"two\", clickHandler: () => {} },\n\t\t];\n\t\tconst wrapper = mount(<DefaultDropdownButton buttonOptions={buttonOptions} />);\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\n\t});\n});\n"]}
|
|
@@ -3,7 +3,7 @@ import { mount } from "enzyme";
|
|
|
3
3
|
import { describe, it } from "mocha";
|
|
4
4
|
import { expect } from "chai";
|
|
5
5
|
import { Basic, CustomButtonLabels, NoCancelButton, WithInputPlaceholder } from "./SingleInputDialog.stories";
|
|
6
|
-
import { accessibilityAssessor } from "../
|
|
6
|
+
import { accessibilityAssessor } from "../sdd/tests/a11y_helper";
|
|
7
7
|
describe("<SingleInputDialog/>", () => {
|
|
8
8
|
it("should pass accessibility scans", async () => {
|
|
9
9
|
const wrapper = mount(React.createElement(Basic, Object.assign({}, Basic.args)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleInputDialog.spec.js","sourceRoot":"","sources":["../../../src/components/singleInputDialog/SingleInputDialog.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,EAAE,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAC9G,OAAO,EAAE,qBAAqB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SingleInputDialog.spec.js","sourceRoot":"","sources":["../../../src/components/singleInputDialog/SingleInputDialog.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;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AAC,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACzC,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE;QAClD,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,cAAc,oBAAM,cAAc,CAAC,IAAY,EAAI,CAAC,CAAC;QAE5E,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;QAClC,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,gCAAgC,EAAE,GAAG,EAAE;QACzC,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,oBAAoB,oBAAM,oBAAoB,CAAC,IAAY,EAAI,CAAC,CAAC;QAExF,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAC9E,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;QAC7C,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,KAAK,oBAAM,KAAK,CAAC,IAAY,EAAI,CAAC,CAAC;QAE1D,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IAC7E,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 { Basic, CustomButtonLabels, NoCancelButton, WithInputPlaceholder } from \"./SingleInputDialog.stories\";\nimport { accessibilityAssessor } from \"../sdd/tests/a11y_helper\";\n\ndescribe(\"<SingleInputDialog/>\", () => {\n\tit(\"should pass accessibility scans\", async () => {\n\t\tconst wrapper = mount(<Basic {...(Basic.args as any)} />);\n\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\n\t});\n\tit(\"should contain a text input\", () => {\n\t\tconst wrapper = mount(<Basic {...(Basic.args as any)} />);\n\n\t\texpect(wrapper.find(\"input\").exists()).to.be.true;\n\t});\n\tit(\"should display custom labels\", () => {\n\t\tconst wrapper = mount(<CustomButtonLabels {...(CustomButtonLabels.args as any)} />);\n\n\t\tconst dialogText = wrapper.text();\n\t\texpect(dialogText).to.contain(\"Да\");\n\t\texpect(dialogText).to.contain(\"Отмена\");\n\t\texpect(dialogText).to.not.contain(\"Yes\");\n\t\texpect(dialogText).to.not.contain(\"Cancel\");\n\t});\n\tit(\"should supress cancel button on request\", () => {\n\t\tconst wrapper = mount(<NoCancelButton {...(NoCancelButton.args as any)} />);\n\n\t\tconst dialogText = wrapper.text();\n\t\texpect(dialogText).to.not.contain(\"Cancel\");\n\t});\n\tit(\"can display custom placeholder\", () => {\n\t\tconst wrapper = mount(<WithInputPlaceholder {...(WithInputPlaceholder.args as any)} />);\n\n\t\texpect(wrapper.find(\"input\").prop(\"placeholder\")).to.equal(\"My placeholder\");\n\t});\n\tit(\"should display default placeholder\", () => {\n\t\tconst wrapper = mount(<Basic {...(Basic.args as any)} />);\n\n\t\texpect(wrapper.find(\"input\").prop(\"placeholder\")).to.equal(\"New workspace\");\n\t});\n});\n"]}
|
|
@@ -3,16 +3,6 @@
|
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
/// <reference types="react" />
|
|
6
|
-
import "../../assets/css/finsemble.css";
|
|
7
|
-
import "./css/styles.css";
|
|
8
|
-
declare let themeConfig: {
|
|
9
|
-
currentTheme: string;
|
|
10
|
-
defaultTheme: string;
|
|
11
|
-
themes: {
|
|
12
|
-
Default: any;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
export declare type ThemeConfig = typeof themeConfig;
|
|
16
6
|
export declare type SmartDesktopDesignerProps = {
|
|
17
7
|
views: any[];
|
|
18
8
|
getConfig: typeof FSBL.Clients.ConfigClient.getValues;
|
|
@@ -25,4 +15,3 @@ export declare type SmartDesktopDesignerProps = {
|
|
|
25
15
|
restartFinsemble?: () => void;
|
|
26
16
|
};
|
|
27
17
|
export declare const SmartDesktopDesigner: (props: SmartDesktopDesignerProps) => JSX.Element;
|
|
28
|
-
export {};
|
|
@@ -2,120 +2,6 @@
|
|
|
2
2
|
* Copyright 2017 - 2020 by ChartIQ, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*/
|
|
5
|
-
import React
|
|
6
|
-
|
|
7
|
-
import "../../assets/css/finsemble.css";
|
|
8
|
-
import "./css/styles.css";
|
|
9
|
-
import { Navigation } from "./Navigation";
|
|
10
|
-
import { CurrentView } from "./CurrentView";
|
|
11
|
-
import { getCSSVars } from "./common/getCSSVars";
|
|
12
|
-
import { useSelector, useDispatch } from "../../store";
|
|
13
|
-
import { SmartDesktopDesignerActions } from "../../actions/smartDesktopDesignerActions";
|
|
14
|
-
import { ContentHeader } from "./ContentHeader";
|
|
15
|
-
import { Button } from "../common/Button";
|
|
16
|
-
new FloatingFocus();
|
|
17
|
-
const getDefaultTheme = () => {
|
|
18
|
-
let globalCssVars = {};
|
|
19
|
-
const docStyle = window.getComputedStyle(document.documentElement);
|
|
20
|
-
getCSSVars(document.styleSheets).forEach((varName) => {
|
|
21
|
-
globalCssVars[varName] = docStyle.getPropertyValue(varName).trim();
|
|
22
|
-
});
|
|
23
|
-
const themesheet = document.body.querySelector("#themesheet");
|
|
24
|
-
if (themesheet) {
|
|
25
|
-
document.body.removeChild(themesheet);
|
|
26
|
-
}
|
|
27
|
-
return globalCssVars;
|
|
28
|
-
};
|
|
29
|
-
let themeConfig = {
|
|
30
|
-
currentTheme: "Default",
|
|
31
|
-
defaultTheme: "Default",
|
|
32
|
-
themes: {
|
|
33
|
-
Default: getDefaultTheme(),
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
export const SmartDesktopDesigner = (props) => {
|
|
37
|
-
const dispatch = useDispatch();
|
|
38
|
-
const { views } = props;
|
|
39
|
-
const [theme, setTheme] = useState(themeConfig);
|
|
40
|
-
const [sdServerInfo, setSDServerInfo] = useState({ enabled: false, applicationRoot: "" });
|
|
41
|
-
const [version, setVersion] = useState("");
|
|
42
|
-
const project = useSelector((state) => state.smartDesktopDesigner.projectInfo);
|
|
43
|
-
const setProject = (value) => {
|
|
44
|
-
dispatch(SmartDesktopDesignerActions.set_project_info(value));
|
|
45
|
-
};
|
|
46
|
-
const themeListenerRef = useRef((addListenerErr, { data }) => {
|
|
47
|
-
const newTheme = Object.assign({}, themeConfig);
|
|
48
|
-
newTheme.themes.Default = Object.assign({}, newTheme.themes.Default);
|
|
49
|
-
for (let [key, value] of Object.entries(data)) {
|
|
50
|
-
newTheme.themes.Default[key] = value;
|
|
51
|
-
}
|
|
52
|
-
setTheme(newTheme);
|
|
53
|
-
});
|
|
54
|
-
useEffect(() => {
|
|
55
|
-
props.getConfig(null, (err, newConfig) => {
|
|
56
|
-
var _a, _b, _c;
|
|
57
|
-
if (err) {
|
|
58
|
-
FSBL.Clients.Logger.system.error("SmartDesktopDesigner", err);
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
setVersion((_c = (_b = (_a = newConfig === null || newConfig === void 0 ? void 0 : newConfig.finsemble) === null || _a === void 0 ? void 0 : _a.system) === null || _b === void 0 ? void 0 : _b.FSBLVersion) !== null && _c !== void 0 ? _c : "");
|
|
62
|
-
props.getProjectSettings().then((response) => {
|
|
63
|
-
var _a;
|
|
64
|
-
let projectPath = project.path;
|
|
65
|
-
if ((_a = response.settings) === null || _a === void 0 ? void 0 : _a.path) {
|
|
66
|
-
projectPath = response.settings.path;
|
|
67
|
-
}
|
|
68
|
-
props.getSDServerInfo().then((jsInfo) => {
|
|
69
|
-
var _a, _b, _c;
|
|
70
|
-
if (!jsInfo.enabled) {
|
|
71
|
-
FSBL.Clients.Logger.system.error("Smart Desktop Designer started without the Smart Desktop Server being enabled. Check FEA configuration.");
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
FSBL.Clients.Logger.system.log(`DPS application root: ${jsInfo.applicationRoot}`);
|
|
75
|
-
}
|
|
76
|
-
FSBL.Clients.Logger.system.log(`DPS info: ${JSON.stringify(jsInfo)}`);
|
|
77
|
-
FSBL.Clients.Logger.system.log(`NewConfig info: ${JSON.stringify(newConfig)}`);
|
|
78
|
-
setProject(Object.assign(Object.assign({}, project), { name: ((_a = jsInfo === null || jsInfo === void 0 ? void 0 : jsInfo.projectConfig) === null || _a === void 0 ? void 0 : _a.name) || "", path: projectPath, export: Object.assign(Object.assign({}, project.export), { toolbarIcon: "/assets/img/Finsemble_Toolbar_Icon.png", installerIcon: "/assets/img/installer_icon.ico", taskbarIcon: (_b = newConfig === null || newConfig === void 0 ? void 0 : newConfig.startup_app) === null || _b === void 0 ? void 0 : _b.applicationIcon, systemTrayIcon: (_c = newConfig === null || newConfig === void 0 ? void 0 : newConfig.finsemble) === null || _c === void 0 ? void 0 : _c.systemTrayIcon, splashScreenImage: newConfig === null || newConfig === void 0 ? void 0 : newConfig.splashScreenImage }) }));
|
|
79
|
-
setSDServerInfo(jsInfo);
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
const removeHandler = props.onThemeUpdated(themeListenerRef.current);
|
|
84
|
-
return () => {
|
|
85
|
-
removeHandler();
|
|
86
|
-
};
|
|
87
|
-
}, []);
|
|
88
|
-
const clickResetProjectButton = () => {
|
|
89
|
-
const resetProject = async () => {
|
|
90
|
-
const [err] = await props.resetProject();
|
|
91
|
-
if (err)
|
|
92
|
-
alert(`Project failed to reset: ${err.message}`);
|
|
93
|
-
};
|
|
94
|
-
FSBL.Clients.DialogManager.open("yesNo", {
|
|
95
|
-
title: "Are you sure?",
|
|
96
|
-
question: `Your project will be set back to factory defaults. You will lose all customizations except the name of the project. Finsemble will then be restarted.`,
|
|
97
|
-
hideModalOnClose: true,
|
|
98
|
-
showNegativeButton: false,
|
|
99
|
-
affirmativeResponseLabel: "Reset Project",
|
|
100
|
-
}, (err, response) => {
|
|
101
|
-
if (response.choice === "affirmative") {
|
|
102
|
-
resetProject();
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
};
|
|
106
|
-
return sdServerInfo.enabled ? (React.createElement("div", { className: "config-container" },
|
|
107
|
-
React.createElement("div", { className: "project-container" },
|
|
108
|
-
React.createElement("div", { className: "nav-container" },
|
|
109
|
-
React.createElement(Navigation, { views: views }),
|
|
110
|
-
React.createElement("div", { className: "bottom-nav-wrapper" },
|
|
111
|
-
React.createElement("div", { className: "nav-anchor-reset" },
|
|
112
|
-
React.createElement("div", { className: "version-info" }, version && `Finsemble version ${version}`),
|
|
113
|
-
React.createElement(Button, { fashion: "danger", text: "Reset project", onClick: () => {
|
|
114
|
-
clickResetProjectButton();
|
|
115
|
-
} })))),
|
|
116
|
-
React.createElement("div", { className: "content-container" },
|
|
117
|
-
React.createElement(ContentHeader, { name: project.name }),
|
|
118
|
-
React.createElement("div", { className: "view-container" },
|
|
119
|
-
React.createElement(CurrentView, { views: views, theme: theme })))))) : (React.createElement(React.Fragment, null));
|
|
120
|
-
};
|
|
5
|
+
import React from "react";
|
|
6
|
+
export const SmartDesktopDesigner = (props) => React.createElement(React.Fragment, null);
|
|
121
7
|
//# sourceMappingURL=SmartDesktopDesigner.js.map
|