@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
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Actions } from "../../stores/UserPreferencesStore";
|
|
3
|
-
import { Checkbox } from "../../../common/Checkbox";
|
|
4
|
-
import DefaultDropdownButton from "../../../shared/DefaultDropdownButton";
|
|
5
|
-
const DEFAULT_RESTART = {
|
|
6
|
-
hour: 4,
|
|
7
|
-
minute: "00",
|
|
8
|
-
meridiem: "AM",
|
|
9
|
-
};
|
|
10
|
-
let HOURS = [];
|
|
11
|
-
for (var i = 1; i < 13; i++) {
|
|
12
|
-
HOURS.push(i);
|
|
13
|
-
}
|
|
14
|
-
const MINUTES = ["00", 15, 30, 45];
|
|
15
|
-
export default class ScheduledRestart extends React.Component {
|
|
16
|
-
constructor(props) {
|
|
17
|
-
super(props);
|
|
18
|
-
this.state = {
|
|
19
|
-
scheduledRestart: DEFAULT_RESTART,
|
|
20
|
-
enabled: false,
|
|
21
|
-
};
|
|
22
|
-
this.setPreferences = this.setPreferences.bind(this);
|
|
23
|
-
this.toggleEnabled = this.toggleEnabled.bind(this);
|
|
24
|
-
this.setHour = this.setHour.bind(this);
|
|
25
|
-
this.setMinute = this.setMinute.bind(this);
|
|
26
|
-
this.setMeridiem = this.setMeridiem.bind(this);
|
|
27
|
-
this.getDisplayHour = this.getDisplayHour.bind(this);
|
|
28
|
-
}
|
|
29
|
-
setPreferences(err, data) {
|
|
30
|
-
if (!data && !data.value)
|
|
31
|
-
return;
|
|
32
|
-
let scheduledRestart = data.value["finsemble.scheduledRestart"];
|
|
33
|
-
let enabled = typeof scheduledRestart === "object";
|
|
34
|
-
if (enabled) {
|
|
35
|
-
scheduledRestart.meridiem = scheduledRestart.hour > 11 ? "PM" : "AM";
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
scheduledRestart = DEFAULT_RESTART;
|
|
39
|
-
}
|
|
40
|
-
this.setState({ scheduledRestart, enabled });
|
|
41
|
-
}
|
|
42
|
-
toggleEnabled() {
|
|
43
|
-
let { enabled, scheduledRestart } = this.state;
|
|
44
|
-
enabled = !enabled;
|
|
45
|
-
if (!enabled) {
|
|
46
|
-
scheduledRestart = DEFAULT_RESTART;
|
|
47
|
-
this.setState({ enabled, scheduledRestart });
|
|
48
|
-
Actions.disableScheduledRestart();
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
this.setState({ enabled });
|
|
52
|
-
Actions.setScheduledRestart(scheduledRestart);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
setHour(e) {
|
|
56
|
-
let hour = Number(e);
|
|
57
|
-
let { scheduledRestart } = this.state;
|
|
58
|
-
if (hour < 12 && scheduledRestart.meridiem === "PM") {
|
|
59
|
-
hour = hour + 12;
|
|
60
|
-
}
|
|
61
|
-
else if (hour > 12 && scheduledRestart.meridiem === "AM") {
|
|
62
|
-
hour = hour - 12;
|
|
63
|
-
}
|
|
64
|
-
else if (scheduledRestart.meridiem === "AM" && hour === 12) {
|
|
65
|
-
hour = 0;
|
|
66
|
-
}
|
|
67
|
-
scheduledRestart.hour = hour;
|
|
68
|
-
this.setState({ scheduledRestart });
|
|
69
|
-
Actions.setScheduledRestart(scheduledRestart);
|
|
70
|
-
}
|
|
71
|
-
setMinute(e) {
|
|
72
|
-
let minute = Number(e);
|
|
73
|
-
let { scheduledRestart } = this.state;
|
|
74
|
-
scheduledRestart.minute = minute;
|
|
75
|
-
this.setState({ scheduledRestart });
|
|
76
|
-
Actions.setScheduledRestart(scheduledRestart);
|
|
77
|
-
}
|
|
78
|
-
setMeridiem(e) {
|
|
79
|
-
let { scheduledRestart } = this.state;
|
|
80
|
-
let meridiem = e;
|
|
81
|
-
scheduledRestart.meridiem = meridiem;
|
|
82
|
-
this.setState({
|
|
83
|
-
scheduledRestart,
|
|
84
|
-
}, () => {
|
|
85
|
-
this.setHour(this.state.scheduledRestart.hour);
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
getDisplayHour() {
|
|
89
|
-
let { scheduledRestart } = this.state;
|
|
90
|
-
if (scheduledRestart.meridiem === "AM" && scheduledRestart.hour === 0) {
|
|
91
|
-
return 12;
|
|
92
|
-
}
|
|
93
|
-
else if (scheduledRestart.meridiem === "PM" && scheduledRestart.hour > 12) {
|
|
94
|
-
return scheduledRestart.hour - 12;
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
return scheduledRestart.hour;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
componentDidMount() {
|
|
101
|
-
this.props.addListener({ field: "preferences" }, this.setPreferences);
|
|
102
|
-
this.props.getValue({ field: "preferences" }, (err, data) => {
|
|
103
|
-
if (data) {
|
|
104
|
-
let scheduledRestart = data["finsemble.scheduledRestart"];
|
|
105
|
-
let enabled = typeof scheduledRestart === "object";
|
|
106
|
-
if (enabled) {
|
|
107
|
-
scheduledRestart.meridiem = scheduledRestart.hour > 11 ? "PM" : "AM";
|
|
108
|
-
}
|
|
109
|
-
else {
|
|
110
|
-
scheduledRestart = DEFAULT_RESTART;
|
|
111
|
-
}
|
|
112
|
-
this.setState({ scheduledRestart, enabled });
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
componentWillUnmount() {
|
|
117
|
-
this.props.removeListener({ field: "preferences" }, this.setPreferences);
|
|
118
|
-
}
|
|
119
|
-
render() {
|
|
120
|
-
const { scheduledRestart, enabled } = this.state;
|
|
121
|
-
let wrapClasses = "scheduled-restart";
|
|
122
|
-
if (!enabled) {
|
|
123
|
-
wrapClasses = `${wrapClasses} disabled-restart`;
|
|
124
|
-
}
|
|
125
|
-
const hourOptions = HOURS.map((hour) => {
|
|
126
|
-
return {
|
|
127
|
-
optionLabel: hour,
|
|
128
|
-
optionValue: hour,
|
|
129
|
-
clickHandler: () => {
|
|
130
|
-
this.setHour(hour);
|
|
131
|
-
},
|
|
132
|
-
};
|
|
133
|
-
});
|
|
134
|
-
const minuteOptions = MINUTES.map((minute) => {
|
|
135
|
-
return {
|
|
136
|
-
optionLabel: minute,
|
|
137
|
-
optionValue: minute,
|
|
138
|
-
clickHandler: () => {
|
|
139
|
-
this.setMinute(minute);
|
|
140
|
-
},
|
|
141
|
-
};
|
|
142
|
-
});
|
|
143
|
-
return (React.createElement("div", { className: "complex-menu-content-row", style: { overflow: "visible" } },
|
|
144
|
-
React.createElement(Checkbox, { onClick: this.toggleEnabled, checked: this.state.enabled, label: "Restart daily" }),
|
|
145
|
-
React.createElement("div", { className: wrapClasses, style: { display: "flex" } },
|
|
146
|
-
React.createElement("span", { className: "scheduled-restart-select-label" }, "Time:"),
|
|
147
|
-
React.createElement("div", { className: "row-section", style: { width: "10px", marginRight: "40px" } },
|
|
148
|
-
React.createElement(DefaultDropdownButton, { classNames: "push-right", allowEmpty: false, caretLocation: "right", buttonOptions: hourOptions, defaultSelection: {
|
|
149
|
-
optionLabel: this.getDisplayHour(),
|
|
150
|
-
optionValue: this.getDisplayHour(),
|
|
151
|
-
clickHandler: () => {
|
|
152
|
-
this.setHour(this.getDisplayHour());
|
|
153
|
-
},
|
|
154
|
-
}, enabled: enabled })),
|
|
155
|
-
React.createElement("div", { className: "row-section", style: { marginLeft: 30, marginRight: 10, marginTop: 5 } }, "\u00A0:\u00A0"),
|
|
156
|
-
React.createElement("div", { style: { width: "10px", marginRight: "65px" } },
|
|
157
|
-
React.createElement(DefaultDropdownButton, { classNames: "push-right", allowEmpty: false, caretLocation: "right", buttonOptions: minuteOptions, defaultSelection: {
|
|
158
|
-
optionLabel: scheduledRestart.minute === 0 ? "00" : scheduledRestart.minute,
|
|
159
|
-
optionValue: scheduledRestart.minute,
|
|
160
|
-
clickHandler: () => {
|
|
161
|
-
this.setMinute(scheduledRestart.minute);
|
|
162
|
-
},
|
|
163
|
-
}, enabled: enabled })),
|
|
164
|
-
"\u00A0",
|
|
165
|
-
React.createElement("div", { className: "row-section", style: { width: "10px" } },
|
|
166
|
-
React.createElement(DefaultDropdownButton, { classNames: "push-right", allowEmpty: false, caretLocation: "right", buttonOptions: [
|
|
167
|
-
{
|
|
168
|
-
optionLabel: "AM",
|
|
169
|
-
optionValue: "AM",
|
|
170
|
-
clickHandler: () => {
|
|
171
|
-
this.setMeridiem("AM");
|
|
172
|
-
},
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
optionLabel: "PM",
|
|
176
|
-
optionValue: "PM",
|
|
177
|
-
clickHandler: () => {
|
|
178
|
-
this.setMeridiem("PM");
|
|
179
|
-
},
|
|
180
|
-
},
|
|
181
|
-
], defaultSelection: {
|
|
182
|
-
optionLabel: scheduledRestart.meridiem,
|
|
183
|
-
optionValue: scheduledRestart.meridiem,
|
|
184
|
-
clickHandler: () => {
|
|
185
|
-
this.setHour(scheduledRestart.meridiem);
|
|
186
|
-
},
|
|
187
|
-
}, enabled: enabled })))));
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
//# sourceMappingURL=ScheduledRestart.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ScheduledRestart.js","sourceRoot":"","sources":["../../../../../src/components/userPreferences/components/general/ScheduledRestart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,qBAAqB,MAAM,uCAAuC,CAAC;AAE1E,MAAM,eAAe,GAAG;IACvB,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,IAAI;CACd,CAAC;AAGF,IAAI,KAAK,GAAkB,EAAE,CAAC;AAC9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE;IAC5B,KAA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CACD,CACD,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\nimport { Actions } from \"../../stores/UserPreferencesStore\";\nimport { Checkbox } from \"../../../common/Checkbox\";\nimport DefaultDropdownButton from \"../../../shared/DefaultDropdownButton\";\n\nconst DEFAULT_RESTART = {\n\thour: 4,\n\tminute: \"00\",\n\tmeridiem: \"AM\",\n};\n\n// Create an array 1-12.\nlet HOURS: Array<number> = [];\nfor (var i = 1; i < 13; i++) {\n\tHOURS.push(i);\n}\n\n// FOR TESTING\n// let MINUTES = [];\n// for (var i = 1; i <= 60; i++){\n// MINUTES.push(i);\n// }\nconst MINUTES = [\"00\", 15, 30, 45];\n\ntype ScheduledRestartProps = {\n\taddListener: Function;\n\tremoveListener: Function;\n\tgetValue: Function;\n};\n\ntype ScheduledRestartState = {\n\tscheduledRestart: { hour: number; minute: string | number; meridiem: string };\n\tenabled: boolean;\n};\n\nexport default class ScheduledRestart extends React.Component<ScheduledRestartProps, ScheduledRestartState> {\n\tconstructor(props: ScheduledRestartProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tscheduledRestart: DEFAULT_RESTART,\n\t\t\tenabled: false,\n\t\t};\n\t\tthis.setPreferences = this.setPreferences.bind(this);\n\t\tthis.toggleEnabled = this.toggleEnabled.bind(this);\n\t\tthis.setHour = this.setHour.bind(this);\n\t\tthis.setMinute = this.setMinute.bind(this);\n\t\tthis.setMeridiem = this.setMeridiem.bind(this);\n\t\tthis.getDisplayHour = this.getDisplayHour.bind(this);\n\t}\n\n\t/**\n\t * Invoked when any preference is changed on the userPreferencesStore.\n\t * @param {obj} err\n\t * @param {data} data\n\t */\n\tsetPreferences(err: any, data: any) {\n\t\tif (!data && !data.value) return;\n\t\tlet scheduledRestart = data.value[\"finsemble.scheduledRestart\"];\n\t\t// If scheduledRestart is falsy, set \"enabled\" to false. I probably could've done !scheduledRestart. Oh well.\n\t\tlet enabled = typeof scheduledRestart === \"object\";\n\t\tif (enabled) {\n\t\t\t// This is purely for display. I found that military time forced a scroll bar onto the dropdown that looked bad.\n\t\t\tscheduledRestart.meridiem = scheduledRestart.hour > 11 ? \"PM\" : \"AM\";\n\t\t} else {\n\t\t\tscheduledRestart = DEFAULT_RESTART;\n\t\t}\n\t\tthis.setState({ scheduledRestart, enabled });\n\t}\n\n\t/**\n\t * Toggle the enabled state of the select boxes.\n\t */\n\ttoggleEnabled() {\n\t\tlet { enabled, scheduledRestart }: any = this.state;\n\t\tenabled = !enabled;\n\t\t// If the select boxes are no longer enabled, reset the scheduled restart time and call a method on the Actions object.\n\t\t// That function will set scheduledRestart to null via the preferences API. But we want our display to look nice, hence the bit where we reset it to the default value.\n\t\tif (!enabled) {\n\t\t\tscheduledRestart = DEFAULT_RESTART;\n\t\t\tthis.setState({ enabled, scheduledRestart });\n\t\t\tActions.disableScheduledRestart();\n\t\t} else {\n\t\t\tthis.setState({ enabled });\n\t\t\tActions.setScheduledRestart(scheduledRestart);\n\t\t}\n\t}\n\n\t/**\n\t * This method will transform 8 PM into 20:00. It also handles when the user changes the meridiem.\n\t * e.g., 8PM (20) => 8AM (8).\n\t * Set the minute, then set the 'finsemble.scheduledRestart' preference via the method on the Actions object.\n\t * @param {event} e\n\t */\n\tsetHour(e: any) {\n\t\tlet hour = Number(e);\n\t\tlet { scheduledRestart }: any = this.state;\n\t\tif (hour < 12 && scheduledRestart.meridiem === \"PM\") {\n\t\t\thour = hour + 12;\n\t\t} else if (hour > 12 && scheduledRestart.meridiem === \"AM\") {\n\t\t\thour = hour - 12;\n\t\t} else if (scheduledRestart.meridiem === \"AM\" && hour === 12) {\n\t\t\thour = 0;\n\t\t}\n\n\t\tscheduledRestart.hour = hour;\n\t\tthis.setState({ scheduledRestart });\n\t\tActions.setScheduledRestart(scheduledRestart);\n\t}\n\n\t/**\n\t * Set the minute, then set the 'finsemble.scheduledRestart' preference via the method on the Actions object.\n\t * @param {event} e\n\t */\n\tsetMinute(e: any) {\n\t\tlet minute = Number(e);\n\t\tlet { scheduledRestart }: any = this.state;\n\t\tscheduledRestart.minute = minute;\n\n\t\tthis.setState({ scheduledRestart });\n\t\tActions.setScheduledRestart(scheduledRestart);\n\t}\n\n\t/**\n\t * Sets the meridiem for the time (AM or PM). Afterwards, this calls setHour to handle any necessary conversions to military time.\n\t * @param {event} e\n\t */\n\tsetMeridiem(e: any) {\n\t\tlet { scheduledRestart }: any = this.state;\n\t\tlet meridiem = e;\n\t\tscheduledRestart.meridiem = meridiem;\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tscheduledRestart,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.setHour(this.state.scheduledRestart.hour);\n\t\t\t}\n\t\t);\n\t}\n\n\tgetDisplayHour() {\n\t\tlet { scheduledRestart }: any = this.state;\n\t\tif (scheduledRestart.meridiem === \"AM\" && scheduledRestart.hour === 0) {\n\t\t\treturn 12;\n\t\t} else if (scheduledRestart.meridiem === \"PM\" && scheduledRestart.hour > 12) {\n\t\t\treturn scheduledRestart.hour - 12;\n\t\t} else {\n\t\t\treturn scheduledRestart.hour;\n\t\t}\n\t}\n\n\t/**\n\t * Add listener on the store. When the preferences field changes, we change our local state.\n\t * Also, get the initial state from the store.\n\t */\n\tcomponentDidMount() {\n\t\tthis.props.addListener({ field: \"preferences\" }, this.setPreferences);\n\t\tthis.props.getValue({ field: \"preferences\" }, (err: any, data: any) => {\n\t\t\tif (data) {\n\t\t\t\tlet scheduledRestart = data[\"finsemble.scheduledRestart\"];\n\t\t\t\tlet enabled = typeof scheduledRestart === \"object\";\n\t\t\t\tif (enabled) {\n\t\t\t\t\tscheduledRestart.meridiem = scheduledRestart.hour > 11 ? \"PM\" : \"AM\";\n\t\t\t\t} else {\n\t\t\t\t\tscheduledRestart = DEFAULT_RESTART;\n\t\t\t\t}\n\t\t\t\tthis.setState({ scheduledRestart, enabled });\n\t\t\t}\n\t\t});\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.props.removeListener({ field: \"preferences\" }, this.setPreferences);\n\t}\n\n\trender() {\n\t\tconst { scheduledRestart, enabled }: any = this.state;\n\t\tlet wrapClasses = \"scheduled-restart\";\n\t\tif (!enabled) {\n\t\t\twrapClasses = `${wrapClasses} disabled-restart`;\n\t\t}\n\t\tconst hourOptions: Array<any> = HOURS.map((hour: number) => {\n\t\t\treturn {\n\t\t\t\toptionLabel: hour,\n\t\t\t\toptionValue: hour,\n\t\t\t\tclickHandler: () => {\n\t\t\t\t\tthis.setHour(hour);\n\t\t\t\t},\n\t\t\t};\n\t\t});\n\t\tconst minuteOptions: Array<any> = MINUTES.map((minute) => {\n\t\t\treturn {\n\t\t\t\toptionLabel: minute,\n\t\t\t\toptionValue: minute,\n\t\t\t\tclickHandler: () => {\n\t\t\t\t\tthis.setMinute(minute);\n\t\t\t\t},\n\t\t\t};\n\t\t});\n\t\treturn (\n\t\t\t<div className=\"complex-menu-content-row\" style={{ overflow: \"visible\" }}>\n\t\t\t\t<Checkbox onClick={this.toggleEnabled} checked={this.state.enabled} label=\"Restart daily\" />\n\t\t\t\t<div className={wrapClasses} style={{ display: \"flex\" }}>\n\t\t\t\t\t<span className=\"scheduled-restart-select-label\">Time:</span>\n\t\t\t\t\t{/* HOURS */}\n\t\t\t\t\t<div className=\"row-section\" style={{ width: \"10px\", marginRight: \"40px\" }}>\n\t\t\t\t\t\t<DefaultDropdownButton\n\t\t\t\t\t\t\tclassNames={\"push-right\"}\n\t\t\t\t\t\t\tallowEmpty={false}\n\t\t\t\t\t\t\tcaretLocation={\"right\"}\n\t\t\t\t\t\t\tbuttonOptions={hourOptions}\n\t\t\t\t\t\t\tdefaultSelection={{\n\t\t\t\t\t\t\t\toptionLabel: this.getDisplayHour(),\n\t\t\t\t\t\t\t\toptionValue: this.getDisplayHour(),\n\t\t\t\t\t\t\t\tclickHandler: () => {\n\t\t\t\t\t\t\t\t\tthis.setHour(this.getDisplayHour());\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tenabled={enabled}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"row-section\" style={{ marginLeft: 30, marginRight: 10, marginTop: 5 }}>\n\t\t\t\t\t\t : \n\t\t\t\t\t</div>\n\t\t\t\t\t{/* MINUTES */}\n\t\t\t\t\t<div style={{ width: \"10px\", marginRight: \"65px\" }}>\n\t\t\t\t\t\t<DefaultDropdownButton\n\t\t\t\t\t\t\tclassNames={\"push-right\"}\n\t\t\t\t\t\t\tallowEmpty={false}\n\t\t\t\t\t\t\tcaretLocation={\"right\"}\n\t\t\t\t\t\t\tbuttonOptions={minuteOptions}\n\t\t\t\t\t\t\tdefaultSelection={{\n\t\t\t\t\t\t\t\toptionLabel: scheduledRestart.minute === 0 ? \"00\" : scheduledRestart.minute,\n\t\t\t\t\t\t\t\toptionValue: scheduledRestart.minute,\n\t\t\t\t\t\t\t\tclickHandler: () => {\n\t\t\t\t\t\t\t\t\tthis.setMinute(scheduledRestart.minute);\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tenabled={enabled}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t \n\t\t\t\t\t{/* MERIDIEM */}\n\t\t\t\t\t<div className=\"row-section\" style={{ width: \"10px\" }}>\n\t\t\t\t\t\t<DefaultDropdownButton\n\t\t\t\t\t\t\tclassNames={\"push-right\"}\n\t\t\t\t\t\t\tallowEmpty={false}\n\t\t\t\t\t\t\tcaretLocation={\"right\"}\n\t\t\t\t\t\t\tbuttonOptions={[\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\toptionLabel: \"AM\",\n\t\t\t\t\t\t\t\t\toptionValue: \"AM\",\n\t\t\t\t\t\t\t\t\tclickHandler: () => {\n\t\t\t\t\t\t\t\t\t\tthis.setMeridiem(\"AM\");\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\toptionLabel: \"PM\",\n\t\t\t\t\t\t\t\t\toptionValue: \"PM\",\n\t\t\t\t\t\t\t\t\tclickHandler: () => {\n\t\t\t\t\t\t\t\t\t\tthis.setMeridiem(\"PM\");\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\tdefaultSelection={{\n\t\t\t\t\t\t\t\toptionLabel: scheduledRestart.meridiem,\n\t\t\t\t\t\t\t\toptionValue: scheduledRestart.meridiem,\n\t\t\t\t\t\t\t\tclickHandler: () => {\n\t\t\t\t\t\t\t\t\tthis.setHour(scheduledRestart.meridiem);\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tenabled={enabled}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { mount, shallow } from "enzyme";
|
|
3
|
-
import { describe, it } from "mocha";
|
|
4
|
-
import { expect } from "chai";
|
|
5
|
-
import ScheduledRestart from "../components/general/ScheduledRestart";
|
|
6
|
-
import { Checkbox } from "../../common/Checkbox";
|
|
7
|
-
import DefaultDropdownButton from "../../shared/DefaultDropdownButton";
|
|
8
|
-
import { initFSBL } from "../../common/helpers";
|
|
9
|
-
import sinon from "sinon";
|
|
10
|
-
describe("<ScheduledRestart/>", () => {
|
|
11
|
-
afterEach(() => {
|
|
12
|
-
sinon.restore();
|
|
13
|
-
});
|
|
14
|
-
it("should disable all the dropdowns if Scheduled Restart is off", () => {
|
|
15
|
-
initFSBL(window);
|
|
16
|
-
const wrapper = shallow(React.createElement(ScheduledRestart, { addListener: () => { }, removeListener: () => { }, getValue: () => { } }));
|
|
17
|
-
expect(wrapper.find(DefaultDropdownButton).at(0).props().enabled).to.be.false;
|
|
18
|
-
expect(wrapper.find(DefaultDropdownButton).at(1).props().enabled).to.be.false;
|
|
19
|
-
expect(wrapper.find(DefaultDropdownButton).at(2).props().enabled).to.be.false;
|
|
20
|
-
});
|
|
21
|
-
it("should enable all the dropdowns if Scheduled Restart is on", () => {
|
|
22
|
-
initFSBL(window);
|
|
23
|
-
const wrapper = shallow(React.createElement(ScheduledRestart, { addListener: () => { }, removeListener: () => { }, getValue: () => { } }));
|
|
24
|
-
wrapper.find(Checkbox).simulate("click");
|
|
25
|
-
expect(wrapper.find(DefaultDropdownButton).at(0).props().enabled).to.be.true;
|
|
26
|
-
expect(wrapper.find(DefaultDropdownButton).at(1).props().enabled).to.be.true;
|
|
27
|
-
expect(wrapper.find(DefaultDropdownButton).at(2).props().enabled).to.be.true;
|
|
28
|
-
});
|
|
29
|
-
it("should disable all the dropdowns if Scheduled Restart is on and turned off", () => {
|
|
30
|
-
initFSBL(window);
|
|
31
|
-
const wrapper = shallow(React.createElement(ScheduledRestart, { addListener: () => { }, removeListener: () => { }, getValue: () => { } }));
|
|
32
|
-
wrapper.find(Checkbox).simulate("click");
|
|
33
|
-
wrapper.find(Checkbox).simulate("click");
|
|
34
|
-
expect(wrapper.find(DefaultDropdownButton).at(0).props().enabled).to.be.false;
|
|
35
|
-
expect(wrapper.find(DefaultDropdownButton).at(1).props().enabled).to.be.false;
|
|
36
|
-
expect(wrapper.find(DefaultDropdownButton).at(2).props().enabled).to.be.false;
|
|
37
|
-
});
|
|
38
|
-
it("should change the scheduled restart hour correctly", () => {
|
|
39
|
-
initFSBL(window);
|
|
40
|
-
const wrapper = mount(React.createElement(ScheduledRestart, { addListener: () => { }, removeListener: () => { }, getValue: () => { } }));
|
|
41
|
-
wrapper.find(Checkbox).simulate("click");
|
|
42
|
-
wrapper.find(".finsemble-dropdown__btn").at(0).simulate("click");
|
|
43
|
-
wrapper.find(".finsemble-dropdown__btn-option").at(1).simulate("click");
|
|
44
|
-
const timeAfterChange = wrapper.state("scheduledRestart");
|
|
45
|
-
expect(timeAfterChange.hour).to.equal(2);
|
|
46
|
-
});
|
|
47
|
-
it.skip("should change the scheduled restart minute correctly", () => {
|
|
48
|
-
initFSBL(window);
|
|
49
|
-
const wrapper = mount(React.createElement(ScheduledRestart, { addListener: () => { }, removeListener: () => { }, getValue: () => { } }));
|
|
50
|
-
wrapper.find(Checkbox).simulate("click");
|
|
51
|
-
wrapper.find(".finsemble-dropdown__btn").at(1).simulate("click");
|
|
52
|
-
wrapper.find(".finsemble-dropdown__btn-option").at(1).simulate("click");
|
|
53
|
-
const timeAfterChange = wrapper.state("scheduledRestart");
|
|
54
|
-
expect(timeAfterChange.minute).to.equal(15);
|
|
55
|
-
});
|
|
56
|
-
it("should change the scheduled restart meridiem correctly and getDisplayHour should work", () => {
|
|
57
|
-
initFSBL(window);
|
|
58
|
-
const wrapper = mount(React.createElement(ScheduledRestart, { addListener: () => { }, removeListener: () => { }, getValue: () => { } }));
|
|
59
|
-
wrapper.find(Checkbox).simulate("click");
|
|
60
|
-
wrapper.find(".finsemble-dropdown__btn").at(0).simulate("click");
|
|
61
|
-
wrapper.find(".finsemble-dropdown__btn-option").at(3).simulate("click");
|
|
62
|
-
wrapper.find(".finsemble-dropdown__btn").at(2).simulate("click");
|
|
63
|
-
wrapper.find(".finsemble-dropdown__btn-option").at(1).simulate("click");
|
|
64
|
-
const timeAfterChange = wrapper.state("scheduledRestart");
|
|
65
|
-
expect(timeAfterChange.meridiem).to.equal("PM");
|
|
66
|
-
expect(timeAfterChange.hour).to.equal(16);
|
|
67
|
-
expect(wrapper.find(".finsemble-dropdown__btn-label").at(0).text()).to.equal("4");
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
//# sourceMappingURL=ScheduledRestart.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ScheduledRestart.spec.js","sourceRoot":"","sources":["../../../../src/components/userPreferences/tests/ScheduledRestart.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAA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C,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC,GAAI,CAAC,CAAC;QACjH,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACjE,OAAO,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACxE,OAAO,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACjE,OAAO,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACxE,MAAM,eAAe,GAAQ,OAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;QAC/D,MAAM,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAChD,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC1C,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnF,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount, shallow } from \"enzyme\";\nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport ScheduledRestart from \"../components/general/ScheduledRestart\";\nimport { Checkbox } from \"../../common/Checkbox\";\nimport DefaultDropdownButton from \"../../shared/DefaultDropdownButton\";\nimport { initFSBL } from \"../../common/helpers\";\nimport sinon from \"sinon\";\n\ndescribe(\"<ScheduledRestart/>\", () => {\n\tafterEach(() => {\n\t\tsinon.restore();\n\t});\n\n\tit(\"should disable all the dropdowns if Scheduled Restart is off\", () => {\n\t\tinitFSBL(window);\n\t\tconst wrapper = shallow(<ScheduledRestart addListener={() => {}} removeListener={() => {}} getValue={() => {}} />);\n\t\texpect(wrapper.find(DefaultDropdownButton).at(0).props().enabled).to.be.false;\n\t\texpect(wrapper.find(DefaultDropdownButton).at(1).props().enabled).to.be.false;\n\t\texpect(wrapper.find(DefaultDropdownButton).at(2).props().enabled).to.be.false;\n\t});\n\n\tit(\"should enable all the dropdowns if Scheduled Restart is on\", () => {\n\t\tinitFSBL(window);\n\t\tconst wrapper = shallow(<ScheduledRestart addListener={() => {}} removeListener={() => {}} getValue={() => {}} />);\n\t\twrapper.find(Checkbox).simulate(\"click\");\n\t\texpect(wrapper.find(DefaultDropdownButton).at(0).props().enabled).to.be.true;\n\t\texpect(wrapper.find(DefaultDropdownButton).at(1).props().enabled).to.be.true;\n\t\texpect(wrapper.find(DefaultDropdownButton).at(2).props().enabled).to.be.true;\n\t});\n\n\tit(\"should disable all the dropdowns if Scheduled Restart is on and turned off\", () => {\n\t\tinitFSBL(window);\n\t\tconst wrapper = shallow(<ScheduledRestart addListener={() => {}} removeListener={() => {}} getValue={() => {}} />);\n\t\twrapper.find(Checkbox).simulate(\"click\");\n\t\twrapper.find(Checkbox).simulate(\"click\");\n\t\texpect(wrapper.find(DefaultDropdownButton).at(0).props().enabled).to.be.false;\n\t\texpect(wrapper.find(DefaultDropdownButton).at(1).props().enabled).to.be.false;\n\t\texpect(wrapper.find(DefaultDropdownButton).at(2).props().enabled).to.be.false;\n\t});\n\n\tit(\"should change the scheduled restart hour correctly\", () => {\n\t\tinitFSBL(window);\n\t\tconst wrapper = mount(<ScheduledRestart addListener={() => {}} removeListener={() => {}} getValue={() => {}} />);\n\t\twrapper.find(Checkbox).simulate(\"click\");\n\t\twrapper.find(\".finsemble-dropdown__btn\").at(0).simulate(\"click\");\n\t\twrapper.find(\".finsemble-dropdown__btn-option\").at(1).simulate(\"click\");\n\t\tconst timeAfterChange: any = wrapper.state(\"scheduledRestart\");\n\t\texpect(timeAfterChange.hour).to.equal(2);\n\t});\n\n\tit.skip(\"should change the scheduled restart minute correctly\", () => {\n\t\tinitFSBL(window);\n\t\tconst wrapper = mount(<ScheduledRestart addListener={() => {}} removeListener={() => {}} getValue={() => {}} />);\n\t\twrapper.find(Checkbox).simulate(\"click\");\n\t\twrapper.find(\".finsemble-dropdown__btn\").at(1).simulate(\"click\");\n\t\twrapper.find(\".finsemble-dropdown__btn-option\").at(1).simulate(\"click\");\n\t\tconst timeAfterChange: any = wrapper.state(\"scheduledRestart\");\n\t\texpect(timeAfterChange.minute).to.equal(15);\n\t});\n\n\tit(\"should change the scheduled restart meridiem correctly and getDisplayHour should work\", () => {\n\t\tinitFSBL(window);\n\t\tconst wrapper = mount(<ScheduledRestart addListener={() => {}} removeListener={() => {}} getValue={() => {}} />);\n\t\twrapper.find(Checkbox).simulate(\"click\");\n\t\twrapper.find(\".finsemble-dropdown__btn\").at(0).simulate(\"click\");\n\t\twrapper.find(\".finsemble-dropdown__btn-option\").at(3).simulate(\"click\");\n\t\twrapper.find(\".finsemble-dropdown__btn\").at(2).simulate(\"click\");\n\t\twrapper.find(\".finsemble-dropdown__btn-option\").at(1).simulate(\"click\");\n\t\tconst timeAfterChange: any = wrapper.state(\"scheduledRestart\");\n\t\texpect(timeAfterChange.meridiem).to.equal(\"PM\");\n\t\texpect(timeAfterChange.hour).to.equal(16);\n\t\texpect(wrapper.find(\".finsemble-dropdown__btn-label\").at(0).text()).to.equal(\"4\");\n\t});\n});\n"]}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { useDispatch, useSelector } from "../store";
|
|
2
|
-
import { WorkspaceActions } from "../actions/workspaceActions";
|
|
3
|
-
import { useEffect } from "react";
|
|
4
|
-
export const useWorkspaces = () => {
|
|
5
|
-
const dispatch = useDispatch();
|
|
6
|
-
const onWorkspaceUpdate = (_, { data }) => {
|
|
7
|
-
if (data) {
|
|
8
|
-
dispatch(WorkspaceActions.UPDATE_ALL_WORKSPACES(data));
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
const workspaceState = useSelector((state) => state.workspace);
|
|
12
|
-
const { workspaces, activeWorkspace, promptOnSave } = workspaceState;
|
|
13
|
-
useEffect(() => {
|
|
14
|
-
const WorkspaceUpdateSubscribeID = FSBL.Clients.RouterClient.subscribe("Finsemble.WorkspaceService.update", onWorkspaceUpdate);
|
|
15
|
-
FSBL.Clients.ConfigClient.getValue({
|
|
16
|
-
field: "finsemble.preferences.workspaceService.promptUserOnDirtyWorkspace",
|
|
17
|
-
}, (err, data) => {
|
|
18
|
-
data && dispatch(WorkspaceActions.UPDATE_PROMPT_ON_SAVE_WORKSPACE_PREFERENCE(data));
|
|
19
|
-
});
|
|
20
|
-
return function cleanup() {
|
|
21
|
-
FSBL.Clients.RouterClient.unsubscribe(WorkspaceUpdateSubscribeID);
|
|
22
|
-
};
|
|
23
|
-
}, []);
|
|
24
|
-
return { workspaces, activeWorkspace, promptOnSave };
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=useWorkspace.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useWorkspace.js","sourceRoot":"","sources":["../../src/hooks/useWorkspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMlC,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE;IACjC,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,MAAM,iBAAiB,GAAG,CAAC,CAAM,EAAE,EAAE,IAAI,EAA4B,EAAE,EAAE;QACxE,IAAI,IAAI,EAAE;YACT,QAAQ,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC;SACvD;IACF,CAAC,CAAC;IAEF,MAAM,cAAc,GAAG,WAAW,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAC/D,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,GAAG,cAAc,CAAC;IAErE,SAAS,CAAC,GAAG,EAAE;QAGd,MAAM,0BAA0B,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,SAAS,CACrE,mCAAmC,EACnC,iBAAiB,CACjB,CAAC;QACF,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,QAAQ,CACjC;YACC,KAAK,EAAE,mEAAmE;SAC1E,EACD,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YAEb,IAAI,IAAI,QAAQ,CAAC,gBAAgB,CAAC,0CAA0C,CAAC,IAAI,CAAC,CAAC,CAAC;QACrF,CAAC,CACD,CAAC;QAEF,OAAO,SAAS,OAAO;YACtB,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,WAAW,CAAC,0BAA0B,CAAC,CAAC;QACnE,CAAC,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,CAAC;AACtD,CAAC,CAAC","sourcesContent":["import { useDispatch, useSelector } from \"../store\";\nimport { WorkspaceActions } from \"../actions/workspaceActions\";\nimport { WorkspaceState } from \"../reducers/workspaceReducer\";\nimport { useEffect } from \"react\";\n\n/**\n * A hook for getting the current workspaces including the ActiveWorkspace,\n * and listening on any workspace updates.\n */\nexport const useWorkspaces = () => {\n\tconst dispatch = useDispatch();\n\n\tconst onWorkspaceUpdate = (_: any, { data }: { data: WorkspaceState }) => {\n\t\tif (data) {\n\t\t\tdispatch(WorkspaceActions.UPDATE_ALL_WORKSPACES(data));\n\t\t}\n\t};\n\n\tconst workspaceState = useSelector((state) => state.workspace);\n\tconst { workspaces, activeWorkspace, promptOnSave } = workspaceState;\n\n\tuseEffect(() => {\n\t\t// When the workspace updates, update the active workspace name.\n\t\t// We will also get the active workspace as soon as we subscribe.\n\t\tconst WorkspaceUpdateSubscribeID = FSBL.Clients.RouterClient.subscribe(\n\t\t\t\"Finsemble.WorkspaceService.update\",\n\t\t\tonWorkspaceUpdate\n\t\t);\n\t\tFSBL.Clients.ConfigClient.getValue<boolean>(\n\t\t\t{\n\t\t\t\tfield: \"finsemble.preferences.workspaceService.promptUserOnDirtyWorkspace\",\n\t\t\t},\n\t\t\t(err, data) => {\n\t\t\t\t// default to false.\n\t\t\t\tdata && dispatch(WorkspaceActions.UPDATE_PROMPT_ON_SAVE_WORKSPACE_PREFERENCE(data));\n\t\t\t}\n\t\t);\n\n\t\treturn function cleanup() {\n\t\t\tFSBL.Clients.RouterClient.unsubscribe(WorkspaceUpdateSubscribeID);\n\t\t};\n\t}, []);\n\n\treturn { workspaces, activeWorkspace, promptOnSave };\n};\n"]}
|
package/react/types/iconTypes.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"iconTypes.js","sourceRoot":"","sources":["../../src/types/iconTypes.ts"],"names":[],"mappings":"","sourcesContent":["export type IconUrl = {\n\timageType: \"url\" | \"fonticon\";\n\tpath: string;\n};\n\nexport type IconInitials = {\n\timageType: \"initials\";\n\tname: string;\n};\n\nexport type Icon = (IconUrl | IconInitials) & {\n\tcategory?: string;\n};\n"]}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Icon } from "./iconTypes";
|
|
2
|
-
import { SearchProvider } from "@finsemble/finsemble-api/types/services/search";
|
|
3
|
-
export declare type SearchProviderResponse = {
|
|
4
|
-
provider: SearchProvider;
|
|
5
|
-
returnCallback: string;
|
|
6
|
-
searchId: string;
|
|
7
|
-
data: SearchResults;
|
|
8
|
-
};
|
|
9
|
-
export declare type SearchResultType = {
|
|
10
|
-
actions: {
|
|
11
|
-
name: string;
|
|
12
|
-
}[];
|
|
13
|
-
description: string;
|
|
14
|
-
displayName: string;
|
|
15
|
-
icon: Icon;
|
|
16
|
-
score: number;
|
|
17
|
-
name: string;
|
|
18
|
-
provider: FunctionStringCallback;
|
|
19
|
-
type: string;
|
|
20
|
-
};
|
|
21
|
-
export declare type SearchQuery = string | null;
|
|
22
|
-
export declare type SearchResults = SearchResultType[] | null;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"searchTypes.js","sourceRoot":"","sources":["../../src/types/searchTypes.ts"],"names":[],"mappings":"","sourcesContent":["import { Icon } from \"./iconTypes\";\n\nimport { SearchProvider } from \"@finsemble/finsemble-api/types/services/search\";\n\nexport type SearchProviderResponse = {\n\tprovider: SearchProvider;\n\treturnCallback: string;\n\tsearchId: string;\n\tdata: SearchResults;\n};\n\nexport type SearchResultType = {\n\tactions: { name: string }[];\n\tdescription: string;\n\tdisplayName: string;\n\ticon: Icon;\n\tscore: number;\n\tname: string;\n\tprovider: FunctionStringCallback;\n\ttype: string;\n};\n\nexport type SearchQuery = string | null;\nexport type SearchResults = SearchResultType[] | null;\n"]}
|