@finsemble/finsemble-ui 6.4.0 → 6.6.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +31 -28
- package/react/actions/smartDesktopDesignerActions.d.ts +6 -2
- package/react/actions/smartDesktopDesignerActions.js +2 -0
- package/react/actions/smartDesktopDesignerActions.js.map +1 -1
- package/react/assets/css/finsemble.css +0 -1
- package/react/assets/css/userPreferences.css +6 -0
- package/react/assets/icons/code-block.svg +15 -0
- package/react/componentTemplateGenerator.js +1 -1
- package/react/componentTemplateGenerator.js.map +1 -1
- package/react/components/FinsembleProvider.js.map +1 -1
- package/react/components/appCatalog/AppCatalogComponent.d.ts +1 -1
- package/react/components/appCatalog/components/Showcase/ImageCarousel.d.ts +3 -3
- package/react/components/appCatalog/components/Showcase/SupportNotes.d.ts +1 -1
- package/react/components/appCatalog/modules/FDC3.d.ts +1 -1
- package/react/components/appCatalog/modules/FDC3.js.map +1 -1
- package/react/components/appCatalog/stores/appStore.d.ts +2 -2
- package/react/components/appCatalog/stores/appStore.js.map +1 -1
- package/react/components/appCatalog/stores/storeActions.d.ts +1 -1
- package/react/components/common/Checkbox.js +1 -1
- package/react/components/common/Checkbox.js.map +1 -1
- package/react/components/common/DropZone.js +3 -1
- package/react/components/common/DropZone.js.map +1 -1
- package/react/components/common/FileInput.d.ts +2 -1
- package/react/components/common/FileInput.js +2 -2
- package/react/components/common/FileInput.js.map +1 -1
- package/react/components/common/FinsembleIcon.d.ts +1 -1
- package/react/components/common/FinsembleIcon.js +2 -0
- package/react/components/common/FinsembleIcon.js.map +1 -1
- package/react/components/common/FinsembleSelect.js +1 -1
- package/react/components/common/FinsembleSelect.js.map +1 -1
- package/react/components/common/ImagePreview.js +1 -1
- package/react/components/common/ImagePreview.js.map +1 -1
- package/react/components/common/Tooltip.js +3 -1
- package/react/components/common/Tooltip.js.map +1 -1
- package/react/components/common/css/application-edit-page.css +4 -1
- package/react/components/common/css/application-list.css +4 -0
- package/react/components/common/css/preload-edit-page.css +37 -0
- package/react/components/common/helpers.js +1 -0
- package/react/components/common/helpers.js.map +1 -1
- package/react/components/common/stories/FileInput.stories.d.ts +2 -1
- package/react/components/common/stories/FileInput.stories.js +6 -0
- package/react/components/common/stories/FileInput.stories.js.map +1 -1
- package/react/components/common/tests/Accordion.spec.js +1 -1
- package/react/components/common/tests/Accordion.spec.js.map +1 -1
- package/react/components/common/tests/FileInput.spec.js +8 -1
- package/react/components/common/tests/FileInput.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleSelect.spec.js +1 -1
- package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleToggle.spec.js +2 -2
- package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
- package/react/components/favorites/FavoriteMaker.js.map +1 -1
- package/react/components/favorites/FavoritesShell.spec.js +1 -1
- package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
- package/react/components/favorites/FavoritesShell.stories.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.spec.js +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
- package/react/components/icon/Icon.d.ts +4 -3
- package/react/components/icon/Icon.js +22 -12
- package/react/components/icon/Icon.js.map +1 -1
- package/react/components/legacyControls/FinsembleDnDContext.d.ts +2 -1
- package/react/components/legacyControls/FinsembleDnDContext.js +8 -6
- package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
- package/react/components/linker/LinkerMenu.js.map +1 -1
- package/react/components/linker/remoteRedux.d.ts +1 -1
- package/react/components/linker/remoteRedux.js.map +1 -1
- package/react/components/menu/MenuAutoResizer.js.map +1 -1
- package/react/components/menu/MenuPortal.js +20 -1
- package/react/components/menu/MenuPortal.js.map +1 -1
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
- package/react/components/notifications/components/shared/CheckButton.d.ts +1 -1
- package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.d.ts +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
- package/react/components/notifications/components/shared/OverflowMenu.d.ts +1 -1
- package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.d.ts +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.d.ts +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.d.ts +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.d.ts +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
- package/react/components/notifications/components/views/CardView.js.map +1 -1
- package/react/components/notifications/components/views/ListView.d.ts +1 -1
- package/react/components/notifications/components/views/ListView.js.map +1 -1
- package/react/components/notifications/components/views/NotificationDetailsView.d.ts +1 -1
- package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
- package/react/components/notifications/types.d.ts +1 -1
- package/react/components/notifications/types.js.map +1 -1
- package/react/components/notifications/utils.d.ts +1 -1
- package/react/components/notifications/utils.js.map +1 -1
- package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
- package/react/components/processMonitor/ProcessMonitorTypes.d.ts +4 -11
- package/react/components/processMonitor/ProcessMonitorTypes.js.map +1 -1
- package/react/components/processMonitor/components/ChildWindow.js +5 -10
- package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
- package/react/components/processMonitor/components/ListHeader.d.ts +1 -1
- package/react/components/processMonitor/components/ListHeader.js.map +1 -1
- package/react/components/processMonitor/components/ProcessStatistics.js +8 -10
- package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
- package/react/components/processMonitor/constants.d.ts +0 -2
- package/react/components/processMonitor/constants.js +0 -2
- package/react/components/processMonitor/constants.js.map +1 -1
- package/react/components/processMonitor/helpers.d.ts +0 -11
- package/react/components/processMonitor/helpers.js +1 -9
- package/react/components/processMonitor/helpers.js.map +1 -1
- package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +6 -14
- package/react/components/processMonitor/stores/ProcessMonitorStore.js +22 -62
- package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
- package/react/components/{smartDesktopDesigner → sdd}/AddApp.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/AddApp.js +0 -0
- package/react/components/sdd/AddApp.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/AppEditAccess.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/AppEditAccess.js +0 -0
- package/react/components/sdd/AppEditAccess.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/AppEditPage.d.ts +2 -1
- package/react/components/{smartDesktopDesigner → sdd}/AppEditPage.js +77 -73
- package/react/components/sdd/AppEditPage.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Appearance.css +8 -0
- package/react/components/{smartDesktopDesigner → sdd}/Appearance.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Appearance.helpers.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Appearance.helpers.js +0 -0
- package/react/components/sdd/Appearance.helpers.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Appearance.js +0 -0
- package/react/components/sdd/Appearance.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Application.d.ts +10 -3
- package/react/components/sdd/Application.js +220 -0
- package/react/components/sdd/Application.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Applications.d.ts +2 -0
- package/react/components/{smartDesktopDesigner → sdd}/Applications.js +17 -7
- package/react/components/sdd/Applications.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/AssetsPage.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/AssetsPage.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/AssetsPage.js +0 -0
- package/react/components/sdd/AssetsPage.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Authentication.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Authentication.js +1 -1
- package/react/components/sdd/Authentication.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/AuthenticationProviderConfig.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/AuthenticationProviderConfig.js +0 -0
- package/react/components/sdd/AuthenticationProviderConfig.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Content.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Content.js +0 -0
- package/react/components/sdd/Content.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/ContentHeader.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/ContentHeader.js +0 -0
- package/react/components/sdd/ContentHeader.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/CurrentView.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/CurrentView.js +0 -0
- package/react/components/sdd/CurrentView.js.map +1 -0
- package/react/components/sdd/EditPreload.d.ts +14 -0
- package/react/components/sdd/EditPreload.js +169 -0
- package/react/components/sdd/EditPreload.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Export.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Export.js +0 -0
- package/react/components/sdd/Export.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/ExportCloud.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/ExportCloud.js +0 -0
- package/react/components/sdd/ExportCloud.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/ExportDeployInfo.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/ExportDeployInfo.js +0 -0
- package/react/components/sdd/ExportDeployInfo.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/ExportZip.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/ExportZip.js +0 -0
- package/react/components/sdd/ExportZip.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/GettingStarted.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/GettingStarted.js +0 -0
- package/react/components/sdd/GettingStarted.js.map +1 -0
- package/react/components/sdd/ItemList.d.ts +17 -0
- package/react/components/sdd/ItemList.js +58 -0
- package/react/components/sdd/ItemList.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Navigation.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Navigation.js +0 -0
- package/react/components/sdd/Navigation.js.map +1 -0
- package/react/components/sdd/OptionalSettingsView.d.ts +11 -0
- package/react/components/sdd/OptionalSettingsView.js +71 -0
- package/react/components/sdd/OptionalSettingsView.js.map +1 -0
- package/react/components/sdd/Preloads.d.ts +8 -0
- package/react/components/sdd/Preloads.js +26 -0
- package/react/components/sdd/Preloads.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/ProjectErrors.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/ProjectErrors.js +0 -0
- package/react/components/sdd/ProjectErrors.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Publish.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Publish.js +0 -0
- package/react/components/sdd/Publish.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/PublishProgress.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/PublishProgress.js +0 -0
- package/react/components/sdd/PublishProgress.js.map +1 -0
- package/react/components/sdd/SmartDesktopDesigner.d.ts +28 -0
- package/react/components/sdd/SmartDesktopDesigner.js +121 -0
- package/react/components/sdd/SmartDesktopDesigner.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/ThemePage.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/ThemePage.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/ThemePage.js +0 -0
- package/react/components/sdd/ThemePage.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Themes.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Themes.js +0 -0
- package/react/components/sdd/Themes.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/Toolbar.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/Toolbar.js +13 -11
- package/react/components/sdd/Toolbar.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/View.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/View.js +0 -0
- package/react/components/sdd/View.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/common/fsbl_functions.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/common/fsbl_functions.js +0 -0
- package/react/components/sdd/common/fsbl_functions.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/common/getCSSVars.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/common/getCSSVars.js +0 -0
- package/react/components/sdd/common/getCSSVars.js.map +1 -0
- package/react/components/{smartDesktopDesigner/fixtures → sdd/common}/views.d.ts +0 -0
- package/react/components/sdd/common/views.js +204 -0
- package/react/components/sdd/common/views.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/appearance.css +3 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/applications.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/authentication.css +5 -1
- package/react/components/{smartDesktopDesigner → sdd}/css/buttons.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/export.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/getting-started.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/nav.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/project-errors.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/project-header.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/styles.css +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/css/views.css +0 -1
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/apps.d.ts +1 -1
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/apps.js +27 -5
- package/react/components/sdd/fixtures/apps.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/authenticationProps.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/authenticationProps.js +0 -0
- package/react/components/sdd/fixtures/authenticationProps.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/configTemplate.d.ts +1 -1
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/configTemplate.js +1 -1
- package/react/components/sdd/fixtures/configTemplate.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/exportProps.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/exportProps.js +0 -0
- package/react/components/sdd/fixtures/exportProps.js.map +1 -0
- package/react/components/sdd/fixtures/preloads.d.ts +22 -0
- package/react/components/sdd/fixtures/preloads.js +40 -0
- package/react/components/sdd/fixtures/preloads.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/projectErrorsProps.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/projectErrorsProps.js +0 -0
- package/react/components/sdd/fixtures/projectErrorsProps.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/publishProgress.d.ts +1 -1
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/publishProgress.js +0 -0
- package/react/components/sdd/fixtures/publishProgress.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/themeProps.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/themeProps.js +0 -0
- package/react/components/sdd/fixtures/themeProps.js.map +1 -0
- package/react/components/sdd/fixtures/views.d.ts +3 -0
- package/react/components/{smartDesktopDesigner → sdd}/fixtures/views.js +9 -0
- package/react/components/sdd/fixtures/views.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/sdd_helpers.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/sdd_helpers.js +0 -0
- package/react/components/sdd/sdd_helpers.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/AppEditPage.stories.d.ts +1 -1
- package/react/components/{smartDesktopDesigner → sdd}/stories/AppEditPage.stories.js +1 -0
- package/react/components/sdd/stories/AppEditPage.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Appearance.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Appearance.stories.js +0 -0
- package/react/components/sdd/stories/Appearance.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Applications.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Applications.stories.js +0 -0
- package/react/components/sdd/stories/Applications.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/AssetsPage.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/AssetsPage.stories.js +0 -0
- package/react/components/sdd/stories/AssetsPage.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Authentication.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Authentication.stories.js +0 -0
- package/react/components/sdd/stories/Authentication.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ContentHeader.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ContentHeader.stories.js +0 -0
- package/react/components/sdd/stories/ContentHeader.stories.js.map +1 -0
- package/react/components/sdd/stories/EditPreload.stories.d.ts +11 -0
- package/react/components/sdd/stories/EditPreload.stories.js +35 -0
- package/react/components/sdd/stories/EditPreload.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Export.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Export.stories.js +0 -0
- package/react/components/sdd/stories/Export.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ExportCloud.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ExportCloud.stories.js +0 -0
- package/react/components/sdd/stories/ExportCloud.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ExportZip.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ExportZip.stories.js +0 -0
- package/react/components/sdd/stories/ExportZip.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/GettingStarted.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/GettingStarted.stories.js +0 -0
- package/react/components/sdd/stories/GettingStarted.stories.js.map +1 -0
- package/react/components/sdd/stories/ItemList.stories.d.ts +16 -0
- package/react/components/{smartDesktopDesigner/stories/ApplicationList.stories.js → sdd/stories/ItemList.stories.js} +26 -26
- package/react/components/sdd/stories/ItemList.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Navigation.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Navigation.stories.js +0 -0
- package/react/components/sdd/stories/Navigation.stories.js.map +1 -0
- package/react/components/sdd/stories/OptionalSettingsView.stories.d.ts +11 -0
- package/react/components/sdd/stories/OptionalSettingsView.stories.js +28 -0
- package/react/components/sdd/stories/OptionalSettingsView.stories.js.map +1 -0
- package/react/components/sdd/stories/Preloads.stories.d.ts +11 -0
- package/react/components/sdd/stories/Preloads.stories.js +31 -0
- package/react/components/sdd/stories/Preloads.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ProjectErrors.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ProjectErrors.stories.js +0 -0
- package/react/components/sdd/stories/ProjectErrors.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Publish.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Publish.stories.js +0 -0
- package/react/components/sdd/stories/Publish.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/PublishProgress.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/PublishProgress.stories.js +0 -0
- package/react/components/sdd/stories/PublishProgress.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/SmartDesktopDesigner.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/SmartDesktopDesigner.stories.js +0 -0
- package/react/components/sdd/stories/SmartDesktopDesigner.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ThemePage.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/ThemePage.stories.js +0 -0
- package/react/components/sdd/stories/ThemePage.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Themes.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Themes.stories.js +0 -0
- package/react/components/sdd/stories/Themes.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Toolbar.stories.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/stories/Toolbar.stories.js +0 -0
- package/react/components/sdd/stories/Toolbar.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/AppEditPage.spec.d.ts +0 -0
- package/react/components/sdd/tests/AppEditPage.spec.js +1151 -0
- package/react/components/sdd/tests/AppEditPage.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/ApplicationList.spec.d.ts → sdd/tests/Application.spec.d.ts} +0 -0
- package/react/components/sdd/tests/Application.spec.js +1478 -0
- package/react/components/sdd/tests/Application.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Applications.spec.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Applications.spec.js +3 -3
- package/react/components/sdd/tests/Applications.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Authentication.spec.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Authentication.spec.js +0 -0
- package/react/components/sdd/tests/Authentication.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/ContentHeader.spec.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/ContentHeader.spec.js +0 -0
- package/react/components/sdd/tests/ContentHeader.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/Export.spec.d.ts → sdd/tests/EditPreload.spec.d.ts} +0 -0
- package/react/components/sdd/tests/EditPreload.spec.js +61 -0
- package/react/components/sdd/tests/EditPreload.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/ExportZip.spec.d.ts → sdd/tests/Export.spec.d.ts} +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Export.spec.js +0 -0
- package/react/components/sdd/tests/Export.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/Navigation.spec.d.ts → sdd/tests/ExportZip.spec.d.ts} +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/ExportZip.spec.js +0 -0
- package/react/components/sdd/tests/ExportZip.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/ProjectErrors.spec.d.ts → sdd/tests/ItemList.spec.d.ts} +0 -0
- package/react/components/{smartDesktopDesigner/tests/ApplicationList.spec.js → sdd/tests/ItemList.spec.js} +8 -8
- package/react/components/sdd/tests/ItemList.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/Publish.spec.d.ts → sdd/tests/Navigation.spec.d.ts} +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Navigation.spec.js +0 -0
- package/react/components/sdd/tests/Navigation.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/PublishProgess.spec.d.ts → sdd/tests/Preloads.spec.d.ts} +0 -0
- package/react/components/sdd/tests/Preloads.spec.js +47 -0
- package/react/components/sdd/tests/Preloads.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/SmartDesktopDesigner.spec.d.ts → sdd/tests/ProjectErrors.spec.d.ts} +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/ProjectErrors.spec.js +0 -0
- package/react/components/sdd/tests/ProjectErrors.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/Themes.spec.d.ts → sdd/tests/Publish.spec.d.ts} +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Publish.spec.js +0 -0
- package/react/components/sdd/tests/Publish.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/sdd_helpers.spec.d.ts → sdd/tests/PublishProgess.spec.d.ts} +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/PublishProgess.spec.js +0 -0
- package/react/components/sdd/tests/PublishProgess.spec.js.map +1 -0
- package/react/components/sdd/tests/SmartDesktopDesigner.spec.d.ts +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/SmartDesktopDesigner.spec.js +6 -0
- package/react/components/sdd/tests/SmartDesktopDesigner.spec.js.map +1 -0
- package/react/components/sdd/tests/Themes.spec.d.ts +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Themes.spec.js +0 -0
- package/react/components/sdd/tests/Themes.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Toolbar.spec.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/Toolbar.spec.js +0 -0
- package/react/components/sdd/tests/Toolbar.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/a11y_helper.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/a11y_helper.js +0 -0
- package/react/components/sdd/tests/a11y_helper.js.map +1 -0
- package/react/components/sdd/tests/sdd_helpers.spec.d.ts +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/tests/sdd_helpers.spec.js +0 -0
- package/react/components/sdd/tests/sdd_helpers.spec.js.map +1 -0
- package/react/components/{smartDesktopDesigner → sdd}/themeDefinitions.d.ts +0 -0
- package/react/components/{smartDesktopDesigner → sdd}/themeDefinitions.js +0 -0
- package/react/components/sdd/themeDefinitions.js.map +1 -0
- package/react/components/search/SearchBestMatch.js.map +1 -1
- package/react/components/search/SearchProviderResults.d.ts +3 -1
- package/react/components/search/SearchProviderResults.js.map +1 -1
- package/react/components/search/SearchResult.d.ts +3 -1
- package/react/components/search/SearchResult.js +11 -8
- package/react/components/search/SearchResult.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.spec.js +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +0 -11
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +2 -116
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/views.js +1 -185
- package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
- package/react/components/toolbar/AutoArrange.js +1 -1
- package/react/components/toolbar/AutoArrange.js.map +1 -1
- package/react/components/toolbar/AutoArrange.spec.d.ts +1 -0
- package/react/components/toolbar/AutoArrange.spec.js +48 -0
- package/react/components/toolbar/AutoArrange.spec.js.map +1 -0
- package/react/components/toolbar/AutoArrange.stories.d.ts +11 -0
- package/react/components/toolbar/AutoArrange.stories.js +21 -0
- package/react/components/toolbar/AutoArrange.stories.js.map +1 -0
- package/react/components/toolbar/DragHandle.spec.d.ts +1 -0
- package/react/components/toolbar/DragHandle.spec.js +31 -0
- package/react/components/toolbar/DragHandle.spec.js.map +1 -0
- package/react/components/toolbar/DragHandle.stories.d.ts +13 -0
- package/react/components/toolbar/DragHandle.stories.js +39 -0
- package/react/components/toolbar/DragHandle.stories.js.map +1 -0
- package/react/components/toolbar/SddButton.d.ts +2 -0
- package/react/components/toolbar/SddButton.js +23 -0
- package/react/components/toolbar/SddButton.js.map +1 -0
- package/react/components/toolbar/ToolbarShell.js +4 -1
- package/react/components/toolbar/ToolbarShell.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.d.ts +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.d.ts +3 -2
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/Content.d.ts +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.d.ts +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsList.d.ts +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.d.ts +2 -2
- package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js +15 -4
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/components/componentList.d.ts +2 -2
- package/react/components/toolbar/appLauncher/components/componentList.js +3 -4
- package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +2 -2
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
- package/react/components/toolbar/dashbar/Dashbar.js +11 -12
- package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.d.ts +2 -2
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.d.ts +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.d.ts +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.d.ts +4 -4
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +72 -13
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
- package/react/components/userPreferences/components/content/Workspaces.d.ts +6 -1
- package/react/components/userPreferences/components/content/Workspaces.js +59 -18
- package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
- package/react/components/userPreferences/components/general/ScheduledRestart.d.ts +2 -0
- package/react/components/userPreferences/components/general/ScheduledRestart.js +10 -2
- package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
- package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +2 -1
- package/react/components/userPreferences/stores/UserPreferencesStore.js +10 -0
- package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
- package/react/components/userPreferences/tests/ScheduledRestart.spec.js +6 -6
- package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -1
- package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +5 -2
- package/react/components/windowTitleBar/WindowTitleBarShell.js +70 -59
- package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
- package/react/components/windowTitleBar/components/center/TabList.d.ts +2 -2
- package/react/components/windowTitleBar/components/center/TabList.js +5 -2
- package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/windowTitle.d.ts +5 -2
- package/react/components/windowTitleBar/components/windowTitle.js +99 -94
- package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts +3 -3
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js +218 -219
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
- package/react/components/yesNoDialog/Timer.spec.js +1 -1
- package/react/components/yesNoDialog/Timer.spec.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.spec.js +1 -1
- package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
- package/react/hooks/useDashbar.js.map +1 -1
- package/react/hooks/useFavoritesShell.js.map +1 -1
- package/react/hooks/useNotifications.d.ts +1 -1
- package/react/hooks/useNotifications.js.map +1 -1
- package/react/hooks/useSearch.d.ts +2 -1
- package/react/hooks/useSearch.js.map +1 -1
- package/react/hooks/useToolbar.js +6 -0
- package/react/hooks/useToolbar.js.map +1 -1
- package/react/reducers/rootReducer.d.ts +11 -3
- package/react/reducers/smartDesktopDesignerReducer.js +8 -0
- package/react/reducers/smartDesktopDesignerReducer.js.map +1 -1
- package/react/store.d.ts +22 -6
- package/react/types/advancedAppLauncherTypes.d.ts +5 -3
- package/react/types/advancedAppLauncherTypes.js.map +1 -1
- package/react/types/favoriteTypes.d.ts +4 -2
- package/react/types/favoriteTypes.js.map +1 -1
- package/react/types/fdc3.d.ts +2 -2
- package/react/types/fdc3.js.map +1 -1
- package/react/types/smartDesktopDesignerTypes.d.ts +8 -2
- package/react/types/smartDesktopDesignerTypes.js.map +1 -1
- package/react/types/windowTitleBar.d.ts +1 -1
- package/react/types/windowTitleBar.js.map +1 -1
- package/react/components/smartDesktopDesigner/AddApp.js.map +0 -1
- package/react/components/smartDesktopDesigner/AppEditAccess.js.map +0 -1
- package/react/components/smartDesktopDesigner/AppEditPage.js.map +0 -1
- package/react/components/smartDesktopDesigner/Appearance.helpers.js.map +0 -1
- package/react/components/smartDesktopDesigner/Appearance.js.map +0 -1
- package/react/components/smartDesktopDesigner/Application.js +0 -228
- package/react/components/smartDesktopDesigner/Application.js.map +0 -1
- package/react/components/smartDesktopDesigner/ApplicationList.d.ts +0 -16
- package/react/components/smartDesktopDesigner/ApplicationList.js +0 -60
- package/react/components/smartDesktopDesigner/ApplicationList.js.map +0 -1
- package/react/components/smartDesktopDesigner/Applications.js.map +0 -1
- package/react/components/smartDesktopDesigner/AssetsPage.js.map +0 -1
- package/react/components/smartDesktopDesigner/Authentication.js.map +0 -1
- package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +0 -1
- package/react/components/smartDesktopDesigner/Content.js.map +0 -1
- package/react/components/smartDesktopDesigner/ContentHeader.js.map +0 -1
- package/react/components/smartDesktopDesigner/CurrentView.js.map +0 -1
- package/react/components/smartDesktopDesigner/Export.js.map +0 -1
- package/react/components/smartDesktopDesigner/ExportCloud.js.map +0 -1
- package/react/components/smartDesktopDesigner/ExportDeployInfo.js.map +0 -1
- package/react/components/smartDesktopDesigner/ExportZip.js.map +0 -1
- package/react/components/smartDesktopDesigner/GettingStarted.js.map +0 -1
- package/react/components/smartDesktopDesigner/Navigation.js.map +0 -1
- package/react/components/smartDesktopDesigner/ProjectErrors.js.map +0 -1
- package/react/components/smartDesktopDesigner/Publish.js.map +0 -1
- package/react/components/smartDesktopDesigner/PublishProgress.js.map +0 -1
- package/react/components/smartDesktopDesigner/ThemePage.js.map +0 -1
- package/react/components/smartDesktopDesigner/Themes.js.map +0 -1
- package/react/components/smartDesktopDesigner/Toolbar.js.map +0 -1
- package/react/components/smartDesktopDesigner/View.js.map +0 -1
- package/react/components/smartDesktopDesigner/common/fsbl_functions.js.map +0 -1
- package/react/components/smartDesktopDesigner/common/getCSSVars.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/apps.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/authenticationProps.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/configTemplate.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/projectErrorsProps.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/themeProps.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/views.js.map +0 -1
- package/react/components/smartDesktopDesigner/sdd_helpers.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/Appearance.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.d.ts +0 -16
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/AssetsPage.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/Authentication.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/Export.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/Navigation.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/Publish.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ThemePage.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/Themes.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/Toolbar.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js +0 -310
- package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/Authentication.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/ContentHeader.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/Navigation.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/Publish.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/Themes.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/Toolbar.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/a11y_helper.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/themeDefinitions.js.map +0 -1
- package/react/components/toolbar/appLauncher/DynamicAppLauncher.d.ts +0 -6
- package/react/components/toolbar/appLauncher/DynamicAppLauncher.js +0 -23
- package/react/components/toolbar/appLauncher/DynamicAppLauncher.js.map +0 -1
- package/react/hooks/useWorkspace.d.ts +0 -5
- package/react/hooks/useWorkspace.js +0 -26
- package/react/hooks/useWorkspace.js.map +0 -1
- package/react/types/iconTypes.d.ts +0 -11
- package/react/types/iconTypes.js +0 -2
- package/react/types/iconTypes.js.map +0 -1
- package/react/types/searchTypes.d.ts +0 -29
- package/react/types/searchTypes.js +0 -2
- package/react/types/searchTypes.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finsemble/finsemble-ui",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.6.0-beta.2",
|
|
4
4
|
"description": "Ready-made React components to give you a head-start building your SmartDesktop.",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"files": [
|
|
7
7
|
"react"
|
|
8
8
|
],
|
|
9
9
|
"scripts": {
|
|
10
|
-
"build": "
|
|
11
|
-
"do-audit": " improved-yarn-audit --min-severity high
|
|
10
|
+
"build": "yarn clean && yarn copy-css && tsc",
|
|
11
|
+
"do-audit": " improved-yarn-audit --min-severity high",
|
|
12
12
|
"clean": "rimraf ./react & rimraf coverage",
|
|
13
|
-
"copy-css": "copyfiles -u 1 \"src/**/*.css\" \"react/\"",
|
|
14
|
-
"dev": "
|
|
13
|
+
"copy-css": "copyfiles -u 1 \"./src/assets/**/*\" react/ && copyfiles -u 1 \"src/**/*.css\" \"react/\"",
|
|
14
|
+
"dev": "yarn copy-css && yarn watch",
|
|
15
15
|
"monodev": "yarn dev",
|
|
16
16
|
"new-component": "node ./src/componentTemplateGenerator.js",
|
|
17
17
|
"obfuscate": "npm run build",
|
|
18
|
-
"
|
|
19
|
-
"preprod": "rimraf ./react && copyfiles -u 1 \"./src/assets/**/*\" react/ && npm run copy-css",
|
|
20
|
-
"prod": "tsc",
|
|
18
|
+
"pack_obfuscate": "npm install ../api/api.tgz --force --no-package-lock && npm install --force --no-package-lock && yarn run obfuscate && npm pack && mv *.tgz ui.tgz",
|
|
21
19
|
"test": "yarn test-mocha && yarn test-storybook",
|
|
22
20
|
"test-mocha": "ts-mocha -p ./spec/tsconfig.spec.json \"./spec/**/*.spec.ts\"",
|
|
23
21
|
"test-storybook": "ts-mocha -p ./spec/tsconfig.storybook.json \"./src/**/*.spec.ts*\" --require src/enzymeSetup.js --require ignore-styles",
|
|
24
22
|
"test-coverage": "nyc yarn test && nyc merge .nyc_output ../../.nyc_output/ui.json",
|
|
23
|
+
"watch": "concurrently \"npm run watch-css\" \"tsc --watch --preserveWatchOutput\" --prefix [{time}:{command}]: --prefix-length 20 --prefix-colors cyan,green",
|
|
25
24
|
"watch-css": "chokidar \"./src/**/*.css\" -c \"npm run copy-css\"",
|
|
26
25
|
"storybook": "start-storybook -p 6006",
|
|
27
26
|
"build-storybook": "build-storybook"
|
|
28
27
|
},
|
|
29
28
|
"dependencies": {
|
|
29
|
+
"@finsemble/finsemble-api": "6.6.0-beta.2",
|
|
30
30
|
"@q42/floating-focus-a11y": "^1.3.3",
|
|
31
31
|
"@reduxjs/toolkit": "^1.5.0",
|
|
32
32
|
"@svgr/webpack": "^5.5.0",
|
|
33
|
-
"@types/async": "3.2.
|
|
34
|
-
"@types/chai": "4.
|
|
35
|
-
"@types/lodash": "4.14.
|
|
33
|
+
"@types/async": "3.2.12",
|
|
34
|
+
"@types/chai": "4.3.0",
|
|
35
|
+
"@types/lodash": "4.14.178",
|
|
36
36
|
"@types/mime-types": "^2.1.0",
|
|
37
37
|
"@types/mocha": "9.0.0",
|
|
38
|
-
"@types/react": "17.0.
|
|
38
|
+
"@types/react": "17.0.38",
|
|
39
39
|
"@types/react-dom": "17.0.11",
|
|
40
40
|
"@types/react-input-autosize": "2.2.1",
|
|
41
|
-
"@types/react-redux": "7.1.
|
|
41
|
+
"@types/react-redux": "7.1.22",
|
|
42
42
|
"@types/react-relative-portal": "^1.8.1",
|
|
43
|
-
"
|
|
43
|
+
"@types/react-syntax-highlighter": "13.5.2",
|
|
44
|
+
"async": "3.2.3",
|
|
44
45
|
"date-fns": "^2.25.0",
|
|
45
|
-
"
|
|
46
|
-
"immer": "9.0.6",
|
|
46
|
+
"immer": "9.0.12",
|
|
47
47
|
"lodash": "4.17.21",
|
|
48
|
-
"prop-types": "15.
|
|
48
|
+
"prop-types": "15.8.1",
|
|
49
49
|
"react-circular-progressbar": "^2.0.3",
|
|
50
|
-
"react-input-autosize": "^3.0.0",
|
|
51
50
|
"react-redux": "7.2.6",
|
|
52
51
|
"react-relative-portal": "^1.8.0",
|
|
53
52
|
"react-sortable-hoc": "2.0.0",
|
|
54
53
|
"react-transition-group": "4.4.2",
|
|
55
54
|
"redux": "4.1.2",
|
|
55
|
+
"redux-loop": "6.2.0",
|
|
56
56
|
"unionize": "3.1.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
@@ -60,16 +60,16 @@
|
|
|
60
60
|
"react-dom": "17.0.2"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@babel/plugin-proposal-private-methods": "7.16.
|
|
63
|
+
"@babel/plugin-proposal-private-methods": "7.16.7",
|
|
64
64
|
"@babel/preset-env": "^7.16.0",
|
|
65
65
|
"@babel/preset-react": "^7.12.10",
|
|
66
66
|
"@babel/register": "^7.16.0",
|
|
67
|
-
"@
|
|
68
|
-
"@storybook/addon-
|
|
69
|
-
"@storybook/addon-
|
|
70
|
-
"@storybook/
|
|
71
|
-
"@storybook/react": "6.3.12",
|
|
67
|
+
"@storybook/addon-actions": "6.4.13",
|
|
68
|
+
"@storybook/addon-essentials": "6.4.19",
|
|
69
|
+
"@storybook/addon-links": "6.4.13",
|
|
70
|
+
"@storybook/react": "6.4.13",
|
|
72
71
|
"@types/enzyme": "^3.10.8",
|
|
72
|
+
"@types/react-syntax-highlighter": "13.5.2",
|
|
73
73
|
"@types/react-transition-group": "4.4.4",
|
|
74
74
|
"@types/sinon": "^10.0.2",
|
|
75
75
|
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.2",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"canvas": "^2.6.1",
|
|
79
79
|
"chai": "4.3.4",
|
|
80
80
|
"chokidar-cli": "3.0.0",
|
|
81
|
-
"concurrently": "
|
|
81
|
+
"concurrently": "7.0.0",
|
|
82
82
|
"copyfiles": "2.4.1",
|
|
83
83
|
"core-js": "^3.15.2",
|
|
84
84
|
"enzyme": "^3.11.0",
|
|
@@ -93,10 +93,11 @@
|
|
|
93
93
|
"rimraf": "3.0.2",
|
|
94
94
|
"sinon": "^12.0.0",
|
|
95
95
|
"ts-loader": "^9.2.3",
|
|
96
|
-
"ts-mocha": "
|
|
97
|
-
"typescript": "4.
|
|
96
|
+
"ts-mocha": "9.0.2",
|
|
97
|
+
"typescript": "4.5.5"
|
|
98
98
|
},
|
|
99
99
|
"resolutions": {
|
|
100
|
+
"@types/react-dom": "17.0.11",
|
|
100
101
|
"ts-mocha/ts-node": "^10.1.0",
|
|
101
102
|
"trim": "0.0.3",
|
|
102
103
|
"css-what": "5.0.1",
|
|
@@ -105,7 +106,9 @@
|
|
|
105
106
|
"set-value": "^4.0.1",
|
|
106
107
|
"glob-parent": "^5.1.2",
|
|
107
108
|
"immer": "^9.0.6",
|
|
108
|
-
"coa": "2.0.2"
|
|
109
|
+
"coa": "2.0.2",
|
|
110
|
+
"node-fetch": "2.6.7",
|
|
111
|
+
"simple-get": "^4.0.1"
|
|
109
112
|
},
|
|
110
113
|
"repository": {
|
|
111
114
|
"type": "git",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UnionOf } from "unionize";
|
|
2
|
-
import { AuthenticationProvider, MenuType, ProjectError, ProjectSaveData } from "../types/smartDesktopDesignerTypes";
|
|
3
|
-
import { services, FEA } from "@finsemble/finsemble-
|
|
2
|
+
import { AuthenticationProvider, MenuType, PreloadType, ProjectError, ProjectSaveData } from "../types/smartDesktopDesignerTypes";
|
|
3
|
+
import { services, FEA } from "@finsemble/finsemble-api";
|
|
4
4
|
export declare const SmartDesktopDesignerActions: import("unionize").Unionized<{
|
|
5
5
|
change_view: string;
|
|
6
6
|
update_apps: services.Interop.types.AppDefinition[];
|
|
@@ -9,6 +9,8 @@ export declare const SmartDesktopDesignerActions: import("unionize").Unionized<{
|
|
|
9
9
|
update_app: services.Interop.types.AppDefinition;
|
|
10
10
|
delete_app: string;
|
|
11
11
|
update_menus: MenuType;
|
|
12
|
+
update_preloads: PreloadType[];
|
|
13
|
+
set_current_preload: PreloadType | null;
|
|
12
14
|
set_deploy_info: FEA.DeployInfo | null;
|
|
13
15
|
set_publish_error: string | null;
|
|
14
16
|
set_is_publishing: boolean;
|
|
@@ -27,6 +29,8 @@ export declare const SmartDesktopDesignerActions: import("unionize").Unionized<{
|
|
|
27
29
|
update_app: services.Interop.types.AppDefinition;
|
|
28
30
|
delete_app: string;
|
|
29
31
|
update_menus: MenuType;
|
|
32
|
+
update_preloads: PreloadType[];
|
|
33
|
+
set_current_preload: PreloadType | null;
|
|
30
34
|
set_deploy_info: FEA.DeployInfo | null;
|
|
31
35
|
set_publish_error: string | null;
|
|
32
36
|
set_is_publishing: boolean;
|
|
@@ -7,6 +7,8 @@ export const SmartDesktopDesignerActions = unionize({
|
|
|
7
7
|
update_app: ofType(),
|
|
8
8
|
delete_app: ofType(),
|
|
9
9
|
update_menus: ofType(),
|
|
10
|
+
update_preloads: ofType(),
|
|
11
|
+
set_current_preload: ofType(),
|
|
10
12
|
set_deploy_info: ofType(),
|
|
11
13
|
set_publish_error: ofType(),
|
|
12
14
|
set_is_publishing: ofType(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smartDesktopDesignerActions.js","sourceRoot":"","sources":["../../src/actions/smartDesktopDesignerActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAW,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"smartDesktopDesignerActions.js","sourceRoot":"","sources":["../../src/actions/smartDesktopDesignerActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAW,MAAM,UAAU,CAAC;AAcrD,MAAM,CAAC,MAAM,2BAA2B,GAAG,QAAQ,CAClD;IACC,WAAW,EAAE,MAAM,EAAU;IAC7B,WAAW,EAAE,MAAM,EAAmB;IACtC,OAAO,EAAE,MAAM,EAAiB;IAChC,kBAAkB,EAAE,MAAM,EAAiB;IAC3C,UAAU,EAAE,MAAM,EAAiB;IACnC,UAAU,EAAE,MAAM,EAAU;IAC5B,YAAY,EAAE,MAAM,EAAY;IAChC,eAAe,EAAE,MAAM,EAAiB;IACxC,mBAAmB,EAAE,MAAM,EAAsB;IACjD,eAAe,EAAE,MAAM,EAAqB;IAC5C,iBAAiB,EAAE,MAAM,EAAiB;IAC1C,iBAAiB,EAAE,MAAM,EAAW;IACpC,gBAAgB,EAAE,MAAM,EAAmB;IAC3C,sBAAsB,EAAE,MAAM,EAAW;IACzC,oBAAoB,EAAE,MAAM,EAA0B;IACtD,oBAAoB,EAAE,MAAM,EAAU;IACtC,iBAAiB,EAAE,MAAM,EAAgB;IACzC,oBAAoB,EAAE,MAAM,EAAgB;IAC5C,4BAA4B,EAAE,MAAM,EAAW;CAC/C,EACD,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,CACjC,CAAC","sourcesContent":["import { unionize, ofType, UnionOf } from \"unionize\";\nimport {\n\tAuthenticationProvider,\n\tMenuType,\n\tPreloadType,\n\tProjectError,\n\tProjectSaveData,\n} from \"../types/smartDesktopDesignerTypes\";\n\nimport { services, FEA } from \"@finsemble/finsemble-api\";\n\ntype AppDefinition = services.Interop.types.AppDefinition;\ntype DeployInfo = FEA.DeployInfo;\n\nexport const SmartDesktopDesignerActions = unionize(\n\t{\n\t\tchange_view: ofType<string>(),\n\t\tupdate_apps: ofType<AppDefinition[]>(),\n\t\tnew_app: ofType<string | null>(),\n\t\tset_current_app_id: ofType<string | null>(),\n\t\tupdate_app: ofType<AppDefinition>(),\n\t\tdelete_app: ofType<string>(),\n\t\tupdate_menus: ofType<MenuType>(),\n\t\tupdate_preloads: ofType<PreloadType[]>(),\n\t\tset_current_preload: ofType<PreloadType | null>(),\n\t\tset_deploy_info: ofType<DeployInfo | null>(),\n\t\tset_publish_error: ofType<string | null>(),\n\t\tset_is_publishing: ofType<boolean>(),\n\t\tset_project_info: ofType<ProjectSaveData>(),\n\t\tset_is_getting_started: ofType<boolean>(),\n\t\tupdate_auth_provider: ofType<AuthenticationProvider>(),\n\t\tenable_auth_provider: ofType<string>(),\n\t\tset_project_error: ofType<ProjectError>(),\n\t\tdelete_project_error: ofType<ProjectError>(),\n\t\tset_reviewing_project_errors: ofType<boolean>(),\n\t},\n\t{ tag: \"type\", value: \"payload\" }\n);\n\nexport type SmartDesktopDesignerActionsTypes = UnionOf<typeof SmartDesktopDesignerActions>;\n"]}
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
@import url("core/icons.css");
|
|
9
9
|
@import url("core/windowFrame.css");
|
|
10
10
|
@import url("core/formElements.css");
|
|
11
|
-
@import url("core/notifications.css");
|
|
12
11
|
@import url("./font-finance.css");
|
|
13
12
|
@import url("./fonts/Open_Sans/OpenSans-Definition.css");
|
|
14
13
|
@import url("./focus.css");
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="16px" height="13px" viewBox="0 0 16 13" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>Group 7 Copy</title>
|
|
4
|
+
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="main-menu-copy" transform="translate(-32.000000, -199.000000)" fill="#5B606F">
|
|
6
|
+
<g id="Optional" transform="translate(14.000000, 188.000000)">
|
|
7
|
+
<g id="Group-7-Copy" transform="translate(18.000000, 11.000000)">
|
|
8
|
+
<path d="M4.7920808,9.07004831 L1.4321161,6.48309179 L4.7920808,3.91304348 C5.03076681,3.72705314 5.06748774,3.4057971 4.86552265,3.18599034 C4.75535987,3.06763285 4.5901157,3 4.42487154,3 C4.2963483,3 4.16782506,3.03381643 4.05766228,3.11835749 L0.201965091,6.0942029 C0.0734418513,6.19565217 0,6.33091787 0,6.5 C0,6.66908213 0.0734418513,6.80434783 0.201965091,6.9057971 L4.07602275,9.88164251 C4.18618552,9.96618357 4.2963483,10 4.443232,10 C4.60847617,10 4.77372033,9.93236715 4.88388311,9.81384058 C5.06748774,9.57729469 5.03076681,9.25603865 4.7920808,9.07004831" id="Fill-1"></path>
|
|
9
|
+
<path d="M16,6.5 C16,6.34799517 15.927227,6.19565217 15.7993727,6.09437198 L11.9327372,3.11835749 C11.8234865,3.03381643 11.6956322,3 11.5679602,3 C11.4038106,3 11.239661,3.06763285 11.1302279,3.18599034 C10.9296006,3.4057971 10.9660783,3.72722222 11.2031833,3.91304348 L14.5408923,6.5 L11.2214222,9.0871256 C10.9843172,9.27294686 10.9478395,9.59437198 11.1484668,9.81417874 C11.2578999,9.93253623 11.4038106,10 11.5861991,10 C11.713871,10 11.8415429,9.94927536 11.950976,9.88164251 L15.7993727,6.9057971 C15.927227,6.80451691 16,6.65217391 16,6.5" id="Fill-3"></path>
|
|
10
|
+
<path d="M9.6316044,0.0167741935 C9.57864799,0 9.52569158,0 9.47273517,0 C9.24325739,0 9.03143175,0.134193548 8.9608232,0.369032258 L5.02439668,12.3458065 C4.936136,12.6141935 5.09500523,12.8993548 5.37743942,12.9832258 C5.43039583,13 5.48335224,13 5.53630865,13 C5.78343857,13 5.97761207,12.8490323 6.04822062,12.6309677 L9.966995,0.637419355 C10.0729078,0.385806452 9.91403859,0.100645161 9.6316044,0.0167741935" id="Fill-5"></path>
|
|
11
|
+
</g>
|
|
12
|
+
</g>
|
|
13
|
+
</g>
|
|
14
|
+
</g>
|
|
15
|
+
</svg>
|
|
@@ -83,7 +83,7 @@ import { ${name}Props } from "./${path.parse(component_file).name}";
|
|
|
83
83
|
import { BasicStory } from "./${path.parse(component_file).name}.stories";
|
|
84
84
|
|
|
85
85
|
// For running accessibility scans
|
|
86
|
-
import { accessibilityAssessor } from "${prepRelativeLink(test_file, "./src/components/
|
|
86
|
+
import { accessibilityAssessor } from "${prepRelativeLink(test_file, "./src/components/sdd/tests/a11y_helper")}";
|
|
87
87
|
|
|
88
88
|
// For testing user interactions (like click events):
|
|
89
89
|
import sinon from "sinon";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"componentTemplateGenerator.js","sourceRoot":"","sources":["../src/componentTemplateGenerator.js"],"names":[],"mappings":";AAAA,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACzB,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAE7B,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACnC,IAAI,IAAI,GAAG,EAAE,CAAC;AACd,IAAI,IAAI,GAAG,aAAa,CAAC;AAGzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACrC,QAAQ,IAAI,CAAC,CAAC,CAAC,EAAE;QAChB,KAAK,QAAQ,CAAC,CAAC;YACd,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;YACjB,MAAM;SACN;QACD,KAAK,QAAQ,CAAC,CAAC;YACd,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;YACjB,MAAM;SACN;QACD,OAAO,CAAC,CAAC;YACR,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;SACxC;KACD;CACD;AAED,IAAI,IAAI,KAAK,EAAE,EAAE;IAChB,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;IACvC,OAAO;CACP;AAED,MAAM,gBAAgB,GAAG,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,CACrC,IAAI;KACF,QAAQ,CAA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AAC,sBAAsB,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC;AACzE,CAAC,CAAC,CAAC;AACH,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,cAAc,EAAE,CAAC,GAAG,EAAE,EAAE;IAChD,IAAI,GAAG,EAAE;QACR,OAAO,CAAC,GAAG,CAAC,8BAA8B,UAAU,EAAE,EAAE,GAAG,CAAC,CAAC;QAC7D,OAAO;KACP;IACD,OAAO,CAAC,GAAG,CAAC,wBAAwB,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC;gCACnC,CAAC,CAAC;AAClC,CAAC,CAAC,CAAC;AACH,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,aAAa,EAAE,CAAC,GAAG,EAAE,EAAE;IAC9C,IAAI,GAAG,EAAE;QACR,OAAO,CAAC,GAAG,CAAC,8BAA8B,SAAS,EAAE,EAAE,GAAG,CAAC,CAAC;QAC5D,OAAO;KACP;IACD,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;gDACb,IAAI;iCACnB,CAAC,CAAC;AACnC,CAAC,CAAC,CAAC","sourcesContent":["const fs = require(\"fs\");\nconst path = require(\"path\");\n\nconst args = process.argv.slice(2);\nlet file = \"\";\nlet name = \"MyComponent\";\n\n// Stupid simple args parser\nfor (let i = 0; i < args.length; i++) {\n\tswitch (args[i]) {\n\t\tcase \"--file\": {\n\t\t\tfile = args[++i];\n\t\t\tbreak;\n\t\t}\n\t\tcase \"--name\": {\n\t\t\tname = args[++i];\n\t\t\tbreak;\n\t\t}\n\t\tdefault: {\n\t\t\tconsole.log(`Unknown flag: ${args[i]}`);\n\t\t}\n\t}\n}\n\nif (file === \"\") {\n\tconsole.log(\"Error: no provided file\");\n\treturn;\n}\n\nconst prepRelativeLink = (from, to) =>\n\tpath\n\t\t.relative(from, to)\n\t\t.replace(/\\\\/g, \"/\") // swap the slashes\n\t\t.replace(\"../\", \"\"); // path.relative adds an extra \"../\" for some reason, so remove it\nconst base_path = path.join(\"src\", \"components\", file);\nconst component_file = `${base_path}.tsx`;\nconst story_file = `${base_path}.stories.tsx`;\nconst test_file = `${base_path}.spec.tsx`;\n\nconst parsed_component_file = path.parse(component_file);\nconst { dir } = parsed_component_file;\nif (!fs.existsSync(dir)) {\n\tconsole.log(`Target directory, ${path.relative(\".\", dir)}, does not exist`);\n\treturn;\n}\n\nconst component_template = `\nimport React from \"react\";\n\nexport interface ${name}Props {\n example: string;\n onClick: () => void;\n};\n\nexport const ${name}: React.FunctionComponent<${name}Props> = (props: ${name}Props) => {\n // Do things\n return (\n <div>\n <button onClick={props.onClick}>{props.example}</button>\n </div>\n );\n};\n`;\n\nconst story_template = `\nimport React from \"react\";\nimport { ${name}, ${name}Props } from \"./${parsed_component_file.name}\";\nimport { Story } from \"@storybook/react/types-6-0\";\nimport { action } from \"@storybook/addon-actions\";\nimport \"${prepRelativeLink(story_file, \"./src/assets/css/finsemble.css\")}\";\n\nexport default {\n title: \"${name}\",\n component: ${name}\n};\n\nconst Template: Story<${name}Props> = (args: ${name}Props) => <${name} {...args} />;\n\nexport const BasicStory = Template.bind({});\nBasicStory.args = {\n example: \"My Example\",\n onClick: action(\"Clicked\")\n};\n`;\n\nconst test_template = `\nimport * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { describe, it, afterEach } from \"mocha\";\nimport { expect } from \"chai\";\nimport { ${name}Props } from \"./${path.parse(component_file).name}\";\nimport { BasicStory } from \"./${path.parse(component_file).name}.stories\";\n\n// For running accessibility scans\nimport { accessibilityAssessor } from \"${prepRelativeLink(test_file, \"./src/components/sdd/tests/a11y_helper\")}\";\n\n// For testing user interactions (like click events):\nimport sinon from \"sinon\";\n// Necessary to allow sinon to work with mocked actions (which are shown in the Actions panel in Storybook)\nimport addons, { mockChannel } from \"@storybook/addons\";\naddons.setChannel(mockChannel());\n\ndescribe(\"<${name}/>\", () => {\n // Used to clear after each interactive test using sinon\n afterEach(() => {\n sinon.restore();\n });\n\n // Example basic test\n it(\"should display text\", () => {\n const wrapper = mount(<BasicStory {...(BasicStory.args as ${name}Props)} />);\n\n expect(wrapper.find(\"button\").exists(), \"The button exists\").to.be.true;\n expect(wrapper.find(\"button\").text(), \"The button's text\").to.equal(\"My Example\");\n });\n\n // Example interactive test\n it(\"should call function when clicked\", () => {\n\t\tconst buttonSpy = sinon.spy(BasicStory.args as ${name}Props, \"onClick\");\n\t\tconst wrapper = mount(<BasicStory {...(BasicStory.args as ${name}Props)} />);\n\n wrapper.find(\"button\").simulate(\"click\");\n expect(buttonSpy.calledOnce).to.be.true;\n });\n\n\t// Example accessibility scan\n\tit(\"should pass accessibility scans\", async () => {\n\t\tconst wrapper = mount(<BasicStory {...(BasicStory.args as ${name}Props)} />);\n\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\n\t});\n});\n`;\n\nfs.writeFile(component_file, component_template, (err) => {\n\tif (err) {\n\t\tconsole.log(`Error writing to file path ${component_file}`, err);\n\t\treturn;\n\t}\n\tconsole.log(`Component added at ${path.relative(\".\", component_file)}`);\n});\nfs.writeFile(story_file, story_template, (err) => {\n\tif (err) {\n\t\tconsole.log(`Error writing to file path ${story_file}`, err);\n\t\treturn;\n\t}\n\tconsole.log(`Story added at path \"${path.relative(\".\", story_file)}\".\nTo view it, run: yarn storybook`);\n});\nfs.writeFile(test_file, test_template, (err) => {\n\tif (err) {\n\t\tconsole.log(`Error writing to file path ${test_file}`, err);\n\t\treturn;\n\t}\n\tconsole.log(`Tests added at \"${path.relative(\".\", test_file)}\".\nTo run this test, run: yarn test-storybook -g ${name}\nTo run all tests, run: yarn test`);\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FinsembleProvider.js","sourceRoot":"","sources":["../../src/components/FinsembleProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAK5C,OAAO,EAAE,WAAW,EAAE,CAAC;AAcvB,MAAM,CAAC,MAAM,iBAAiB,GAAoD,CAAC,KAAK,EAAE,EAAE;IAC3F,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE1C,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,KAAK;YAAE,OAAO;QAClB,MAAM,OAAO,GAAG,GAAG,EAAE;YACpB,QAAQ,CAAC,IAAI,CAAC,CAAC;QAChB,CAAC,CAAC;QACF,MAAM,CAAC,IAAI,KAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,CAAA;YACpC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC;YAC3C,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,KAAK,CAAC,CAAC,CAAC,oBAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,KAAK,IAAG,KAAK,CAAC,QAAQ,CAAY,CAAC,CAAC,CAAC,IAAI,CAAC;AAC1F,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { store, createStore } from \"../store\";\nimport { Provider } from \"react-redux\";\nimport { useState, useEffect } from \"react\";\n//import { common } from \"@finsemble/finsemble-
|
|
1
|
+
{"version":3,"file":"FinsembleProvider.js","sourceRoot":"","sources":["../../src/components/FinsembleProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAK5C,OAAO,EAAE,WAAW,EAAE,CAAC;AAcvB,MAAM,CAAC,MAAM,iBAAiB,GAAoD,CAAC,KAAK,EAAE,EAAE;IAC3F,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE1C,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,KAAK;YAAE,OAAO;QAClB,MAAM,OAAO,GAAG,GAAG,EAAE;YACpB,QAAQ,CAAC,IAAI,CAAC,CAAC;QAChB,CAAC,CAAC;QACF,MAAM,CAAC,IAAI,KAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,CAAA;YACpC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC;YAC3C,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,KAAK,CAAC,CAAC,CAAC,oBAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,KAAK,IAAG,KAAK,CAAC,QAAQ,CAAY,CAAC,CAAC,CAAC,IAAI,CAAC;AAC1F,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { store, createStore } from \"../store\";\nimport { Provider } from \"react-redux\";\nimport { useState, useEffect } from \"react\";\n//import { common } from \"@finsemble/finsemble-api\";\n\n//let { Globals } = common;\n\nexport { createStore };\n\n/**\n * The <FinsembleProvider> must be an ancestor of any Finsemble React UI components or hooks.\n * It manages FSBL initialization (ensuring that all components and hooks are operating with a properly initialized API.)\n * It also constructs the UI API's redux store and makes it available through a Context Provider for all descendent components and hooks.\n *\n * The <FinsembleProvider> will render its children.\n */\n\nexport type FinsembleProviderProps = {\n\tstore?: typeof store;\n};\n\nexport const FinsembleProvider: React.FunctionComponent<FinsembleProviderProps> = (props) => {\n\tconst [ready, setReady] = useState(false);\n\n\tuseEffect(() => {\n\t\tif (ready) return;\n\t\tconst release = () => {\n\t\t\tsetReady(true);\n\t\t};\n\t\twindow.FSBL && FSBL?.addEventListener\n\t\t\t? FSBL.addEventListener(\"onReady\", release)\n\t\t\t: window.addEventListener(\"FSBLReady\", release);\n\t}, [ready]);\n\n\treturn ready ? <Provider store={props.store || store}>{props.children}</Provider> : null;\n};\n"]}
|
|
@@ -15,7 +15,7 @@ export class AppCatalogComponent extends React.Component<any, any, any> {
|
|
|
15
15
|
navigateToShowcase(id: any): void;
|
|
16
16
|
viewApp(error: any, event: any): void;
|
|
17
17
|
isActiveApp(): boolean;
|
|
18
|
-
getActiveTags():
|
|
18
|
+
getActiveTags(): array;
|
|
19
19
|
_asyncAppRequest: Promise<void> | undefined;
|
|
20
20
|
_asyncTagsRequest: Promise<void> | undefined;
|
|
21
21
|
getActiveApp(): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { FDC3Props, FDC3PostCallback, FDC3SearchCallback, FDC3GetCallback } from "../../../types/fdc3";
|
|
3
|
-
import { StandardError } from "@finsemble/finsemble-
|
|
3
|
+
import { StandardError } from "@finsemble/finsemble-api/types/types";
|
|
4
4
|
export default class FDC3 extends React.Component<FDC3Props> {
|
|
5
5
|
creds: {};
|
|
6
6
|
config: FDC3Props["config"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FDC3.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/modules/FDC3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,MAAM,kBAAkB,GAAG,CAC1B,QAGC,EACD,IAA2C,EAC1C,EAAE;IACH,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,CAA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IAAI,IAAI,EAAE;oBAChB,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;iBAC3B;YACF,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC;CACD","sourcesContent":["import React from \"react\";\nimport {\n\tFDC3Props,\n\tFDC3PostCallback,\n\tFDC3SearchCallback,\n\tFDC3GetCallback,\n\tErrorOrMessage,\n\tFDC3PostCallbackData,\n} from \"../../../types/fdc3\";\nimport { StandardError } from \"@finsemble/finsemble-
|
|
1
|
+
{"version":3,"file":"FDC3.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/modules/FDC3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,MAAM,kBAAkB,GAAG,CAC1B,QAGC,EACD,IAA2C,EAC1C,EAAE;IACH,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;QAE7B,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE;YAE5B,IAAI,CAAC,IAAI,CAAC,CAAC;SACX;aAAM;YAEN,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;SACjB;IACF,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,KAAY,EAAE,IAAwC,EAAE,EAAE;IAClF,IAAI,CAAC;QACJ,OAAO,EAAE,kBAAkB,KAAK,CAAC,OAAO,EAAE;KAC1C,CAAC,CAAC;AACJ,CAAC,CAAC;AAUF,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,KAAK,CAAC,SAAoB;IAK3D,YAAY,KAAgB;QAC3B,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE;YAC3B,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;SAChE;QACD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK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,IAAI,QAAQ,IAAI,IAAI,EAAE;oBACrB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;iBAC1B;YACF,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC;IAQD,MAAM,CAAC,MAA8B,EAAE,QAA4B;QAClE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACtC,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,MAAM,EAAE,CAAC,KAAqB,EAAE,IAA0B,EAAE,EAAE;gBACxF,IAAI,KAAK,EAAE;oBACV,MAAM,CAAC,KAAK,CAAC,CAAC;iBACd;gBAED,IAAI,QAAQ,EAAE;oBACb,QAAQ,CAAC,IAAI,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,YAAY,CAAC,CAAC;iBACnC;qBAAM,IAAI,IAAI,EAAE;oBAChB,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;iBAC3B;YACF,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC;CACD","sourcesContent":["import React from \"react\";\nimport {\n\tFDC3Props,\n\tFDC3PostCallback,\n\tFDC3SearchCallback,\n\tFDC3GetCallback,\n\tErrorOrMessage,\n\tFDC3PostCallbackData,\n} from \"../../../types/fdc3\";\nimport { StandardError } from \"@finsemble/finsemble-api/types/types\";\n\nconst handleFdc3Response = (\n\tresponse: {\n\t\tjson: () => Promise<any>;\n\t\tstatus: number;\n\t},\n\tdone: (dataOrNull: any, data?: any) => void\n) => {\n\tresponse.json().then((data) => {\n\t\t// We are expecting 200 here for data\n\t\tif (response.status !== 200) {\n\t\t\t// We have a problem, data as error message\n\t\t\tdone(data);\n\t\t} else {\n\t\t\t// All good, no problem\n\t\t\tdone(null, data);\n\t\t}\n\t});\n};\n\nconst handleFdc3Error = (error: Error, done: (msg: { message: string }) => void) => {\n\tdone({\n\t\tmessage: `Request failed ${error.message}`,\n\t});\n};\n\n/**\n * Copyright 2018 by ChartIQ, Inc.\n * All rights reserved.\n *\n * FDC3 App directory client, I will be using fetch()\n * to make calls to the appd web service, even though I'm\n * not sure where did fetch() come from, will investigate later\n */\nexport default class FDC3 extends React.Component<FDC3Props> {\n\tcreds: {};\n\n\tconfig: FDC3Props[\"config\"];\n\n\tconstructor(props: FDC3Props) {\n\t\tsuper(props);\n\t\tif (!this.props.config.url) {\n\t\t\tthrow new Error(\"Please specify the url of the app directory.\");\n\t\t}\n\t\tthis.creds = this.props.creds;\n\t\tthis.config = {\n\t\t\turl: this.props.config.url.replace(/\\/+$/, \"\"),\n\t\t};\n\t}\n\n\t/**\n\t * Http get wrapper\n\t * @param {string} path The restful method path\n\t * @param {function} done The callback function\n\t */\n\t_get(path: string, done: FDC3GetCallback) {\n\t\tfetch(this.config.url + path, {\n\t\t\tmethod: \"GET\",\n\t\t})\n\t\t\t.then((response) => handleFdc3Response(response, done))\n\t\t\t.catch((error) => handleFdc3Error(error, done));\n\t}\n\n\t/**\n\t *\n\t * @param {string} path The restful method path\n\t * @param {object} params The post data\n\t * @param {function} done The callback function\n\t */\n\t_post(path: string, params: Record<string, string>, done: FDC3PostCallback) {\n\t\tfetch(this.config.url + path, {\n\t\t\tmethod: \"POST\",\n\t\t\tbody: JSON.stringify(params),\n\t\t\theaders: {\n\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t},\n\t\t})\n\t\t\t.then((response) => handleFdc3Response(response, done))\n\t\t\t.catch((error) => handleFdc3Error(error, done));\n\t}\n\n\t/**\n\t * Returns all applications\n\t * @param {function} callback The optional callback function\n\t */\n\tgetAll(callback: (arg1: Record<string, string> | null, applications: string[]) => void) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._get(\"/apps/\", (error, data) => {\n\t\t\t\tif (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t} else {\n\t\t\t\t\tresolve(data?.applications);\n\t\t\t\t}\n\t\t\t\tif (callback) {\n\t\t\t\t\tcallback(error, data?.applications || []);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * Returns a single application in results\n\t * @param {string} appId The app id\n\t */\n\tget(appId: string, callback: (error: StandardError, application: string) => void) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._get(`/apps/${appId}`, (error, data) => {\n\t\t\t\tif (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t}\n\t\t\t\tif (callback && data?.applications) {\n\t\t\t\t\tcallback(null, data.applications[0]);\n\t\t\t\t}\n\n\t\t\t\tif (data?.applications) {\n\t\t\t\t\tresolve(data.applications[0]);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * Returns unique tags\n\t * @param {function} callback The optional callback function\n\t */\n\tgetTags(callback: (error: StandardError, results: string[]) => void) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._get(\"/tags/\", (error, data) => {\n\t\t\t\tif (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t} else if (data) {\n\t\t\t\t\tresolve(data.tags);\n\t\t\t\t}\n\t\t\t\tif (callback && data) {\n\t\t\t\t\tcallback(null, data.tags);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * Returns a list of applications based on text and filter\n\t * @param {object} params The search criteria\n\t * @param {function} callback The callback function\n\t * @example search({text: 'blah', filter: {tag: 'newrelease'}})\n\t */\n\tsearch(params: Record<string, string>, callback: FDC3SearchCallback) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._post(\"/apps/search\", params, (error: ErrorOrMessage, data: FDC3PostCallbackData) => {\n\t\t\t\tif (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t}\n\n\t\t\t\tif (callback) {\n\t\t\t\t\tcallback(null, data?.applications);\n\t\t\t\t} else if (data) {\n\t\t\t\t\tresolve(data.applications);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n}\n"]}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Copyright 2018 by ChartIQ, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*/
|
|
5
|
-
import StoreModel from "@finsemble/finsemble-
|
|
6
|
-
import { StandardCallback } from "@finsemble/finsemble-
|
|
5
|
+
import StoreModel from "@finsemble/finsemble-api/types/clients/StoreModel";
|
|
6
|
+
import { StandardCallback } from "@finsemble/finsemble-api/types/types";
|
|
7
7
|
export { createStore, getStore };
|
|
8
8
|
declare function createStore(cb: StandardCallback): void;
|
|
9
9
|
declare function getStore(): StoreModel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appStore.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/stores/appStore.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;AAEjC,MAAM,aAAa,GAAG;IACrB;QACC,KAAK,EAAE,MAAM;QACb,KAAK,EAAE,EAAE;KACT;IACD;QACC,KAAK,EAAE,cAAc;QACrB,KAAK,EAAE,EAAE;KACT;IACD;QACC,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,EAAE;KACT;IACD;QACC,KAAK,EAAE,WAAW;QAClB,KAAK,EAAE,IAAI;KACX;IACD;QACC,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,EAAE;KACT;IACD;QACC,KAAK,EAAE,aAAa;QACpB,KAAK,EAAE,KAAK;KACZ;CACD,CAAC;AAEF,IAAI,eAA2B,CAAC;AAEhC,SAAS,WAAW,CAAC,EAAoB;IACxC,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAC3C,EAAE,KAAK,EAAE,6BAA6B,EAAE,MAAM,EAAE,IAAI,EAAE,EACtD,CAAC,GAAkB,EAAE,KAAkB,EAAE,EAAE;QAC1C,IAAI,KAAK,EAAE;YACV,eAAe,GAAG,KAAK,CAAC;YAGxB,eAAe,CAAC,SAAS,CAAC,aAAa,EAAE,GAAG,EAAE;gBAC7C,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;YAC3B,CAAC,CAAC,CAAC;SACH;IACF,CAAC,CACD,CAAC;AACH,CAAC;AAED,SAAS,QAAQ;IAChB,OAAO,eAAe,CAAC;AACxB,CAAC","sourcesContent":["/*!\n * Copyright 2018 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport StoreModel from \"@finsemble/finsemble-
|
|
1
|
+
{"version":3,"file":"appStore.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/stores/appStore.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;AAEjC,MAAM,aAAa,GAAG;IACrB;QACC,KAAK,EAAE,MAAM;QACb,KAAK,EAAE,EAAE;KACT;IACD;QACC,KAAK,EAAE,cAAc;QACrB,KAAK,EAAE,EAAE;KACT;IACD;QACC,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,EAAE;KACT;IACD;QACC,KAAK,EAAE,WAAW;QAClB,KAAK,EAAE,IAAI;KACX;IACD;QACC,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,EAAE;KACT;IACD;QACC,KAAK,EAAE,aAAa;QACpB,KAAK,EAAE,KAAK;KACZ;CACD,CAAC;AAEF,IAAI,eAA2B,CAAC;AAEhC,SAAS,WAAW,CAAC,EAAoB;IACxC,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAC3C,EAAE,KAAK,EAAE,6BAA6B,EAAE,MAAM,EAAE,IAAI,EAAE,EACtD,CAAC,GAAkB,EAAE,KAAkB,EAAE,EAAE;QAC1C,IAAI,KAAK,EAAE;YACV,eAAe,GAAG,KAAK,CAAC;YAGxB,eAAe,CAAC,SAAS,CAAC,aAAa,EAAE,GAAG,EAAE;gBAC7C,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;YAC3B,CAAC,CAAC,CAAC;SACH;IACF,CAAC,CACD,CAAC;AACH,CAAC;AAED,SAAS,QAAQ;IAChB,OAAO,eAAe,CAAC;AACxB,CAAC","sourcesContent":["/*!\n * Copyright 2018 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport StoreModel from \"@finsemble/finsemble-api/types/clients/StoreModel\";\nimport { StandardCallback, StandardError } from \"@finsemble/finsemble-api/types/types\";\n\nexport { createStore, getStore };\n\nconst defaultValues = [\n\t{\n\t\tfield: \"apps\",\n\t\tvalue: [],\n\t},\n\t{\n\t\tfield: \"filteredApps\",\n\t\tvalue: [],\n\t},\n\t{\n\t\tfield: \"activeTags\",\n\t\tvalue: [],\n\t},\n\t{\n\t\tfield: \"activeApp\",\n\t\tvalue: null,\n\t},\n\t{\n\t\tfield: \"searchText\",\n\t\tvalue: \"\",\n\t},\n\t{\n\t\tfield: \"forceSearch\",\n\t\tvalue: false,\n\t},\n];\n\nlet appCatalogStore: StoreModel;\n\nfunction createStore(cb: StandardCallback) {\n\tFSBL.Clients.DistributedStoreClient.getStore(\n\t\t{ store: \"Finsemble-AppLauncher-Store\", global: true },\n\t\t(err: StandardError, store?: StoreModel) => {\n\t\t\tif (store) {\n\t\t\t\tappCatalogStore = store;\n\n\t\t\t\t// set default values before initializing the store with values from storage.\n\t\t\t\tappCatalogStore.setValues(defaultValues, () => {\n\t\t\t\t\tcb(null, appCatalogStore);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t);\n}\n\nfunction getStore() {\n\treturn appCatalogStore;\n}\n"]}
|
|
@@ -47,7 +47,7 @@ declare function getInstalledApps(): any;
|
|
|
47
47
|
declare function getActiveApp(): string;
|
|
48
48
|
declare function setActiveApp(app: any): void;
|
|
49
49
|
declare function filterApps(): void;
|
|
50
|
-
declare function setSearchValue(val:
|
|
50
|
+
declare function setSearchValue(val: set): void;
|
|
51
51
|
declare function setForceSearch(val: string): void;
|
|
52
52
|
declare function getSearchValue(): string;
|
|
53
53
|
declare function getForceSearch(): boolean;
|
|
@@ -13,7 +13,7 @@ export const Checkbox = ({ checked = false, disabled = false, label = "", onClic
|
|
|
13
13
|
opacity: ".55",
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
return (React.createElement("div", { style: style, className: "complex-menu-checkbox-wrapper", role: "checkbox", "aria-label": label, tabIndex: 0, onClick: disabled ? () => { } : onClick, onKeyDown: (e) => {
|
|
16
|
+
return (React.createElement("div", { style: style, className: "complex-menu-checkbox-wrapper", role: "checkbox", "aria-checked": checked, "aria-label": label, tabIndex: 0, onClick: disabled ? () => { } : onClick, onKeyDown: (e) => {
|
|
17
17
|
if (e.key === "Enter" || e.key === " ") {
|
|
18
18
|
!disabled && onClick(e);
|
|
19
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/components/common/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,oBAAoB,CAAC;AAS5B,MAAM,CAAC,MAAM,QAAQ,GAA4B,CAAC,EACjD,OAAO,GAAG,KAAK,EACf,QAAQ,GAAG,KAAK,EAChB,KAAK,GAAG,EAAE,EACV,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,GAClB,EAAE,EAAE;IACJ,IAAI,eAAe,GAAG,uBAAuB,CAAC;IAC9C,IAAI,OAAO,EAAE;QACZ,eAAe,GAAG,GAAG,eAAe,UAAU,CAAC;KAC/C;IACD,IAAI,KAAK,GAAG,EAAE,CAAC;IACf,IAAI,QAAQ,EAAE;QACb,KAAK,GAAG;YACP,MAAM,EAAE,SAAS;YACjB,OAAO,EAAE,KAAK;SACd,CAAC;KACF;IACD,OAAO,CACN,6BACC,KAAK,EAAE,KAAK,EACZ,SAAS,EAAC,+BAA+B,EACzC,IAAI,EAAC,UAAU,
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/components/common/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,oBAAoB,CAAC;AAS5B,MAAM,CAAC,MAAM,QAAQ,GAA4B,CAAC,EACjD,OAAO,GAAG,KAAK,EACf,QAAQ,GAAG,KAAK,EAChB,KAAK,GAAG,EAAE,EACV,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,GAClB,EAAE,EAAE;IACJ,IAAI,eAAe,GAAG,uBAAuB,CAAC;IAC9C,IAAI,OAAO,EAAE;QACZ,eAAe,GAAG,GAAG,eAAe,UAAU,CAAC;KAC/C;IACD,IAAI,KAAK,GAAG,EAAE,CAAC;IACf,IAAI,QAAQ,EAAE;QACb,KAAK,GAAG;YACP,MAAM,EAAE,SAAS;YACjB,OAAO,EAAE,KAAK;SACd,CAAC;KACF;IACD,OAAO,CACN,6BACC,KAAK,EAAE,KAAK,EACZ,SAAS,EAAC,+BAA+B,EACzC,IAAI,EAAC,UAAU,kBACD,OAAO,gBACT,KAAK,EACjB,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC,CAAC,OAAO,EACtC,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;YAChB,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,EAAE;gBACvC,CAAC,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;aACxB;QACF,CAAC;QAED,6BAAK,SAAS,EAAE,eAAe,IAAG,OAAO,IAAI,oBAAC,aAAa,IAAC,IAAI,EAAC,OAAO,GAAG,CAAO;QAClF,6BAAK,SAAS,EAAC,6BAA6B,IAAE,KAAK,CAAO,CACrD,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\nimport { FinsembleIcon } from \"./FinsembleIcon\";\nimport \"./css/checkbox.css\";\n\nexport interface CheckboxProps {\n\tchecked?: boolean;\n\tdisabled?: boolean;\n\tlabel?: string;\n\tonClick?: (e: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>) => void;\n}\n\nexport const Checkbox: React.FC<CheckboxProps> = ({\n\tchecked = false,\n\tdisabled = false,\n\tlabel = \"\",\n\tonClick = () => {},\n}) => {\n\tlet checkboxClasses = \"complex-menu-checkbox\";\n\tif (checked) {\n\t\tcheckboxClasses = `${checkboxClasses} checked`;\n\t}\n\tlet style = {};\n\tif (disabled) {\n\t\tstyle = {\n\t\t\tcursor: \"default\",\n\t\t\topacity: \".55\",\n\t\t};\n\t}\n\treturn (\n\t\t<div\n\t\t\tstyle={style}\n\t\t\tclassName=\"complex-menu-checkbox-wrapper\"\n\t\t\trole=\"checkbox\"\n\t\t\taria-checked={checked}\n\t\t\taria-label={label}\n\t\t\ttabIndex={0}\n\t\t\tonClick={disabled ? () => {} : onClick}\n\t\t\tonKeyDown={(e) => {\n\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\t\t\t\t!disabled && onClick(e);\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t<div className={checkboxClasses}>{checked && <FinsembleIcon icon=\"check\" />}</div>\n\t\t\t<div className=\"complex-menu-checkbox-label\">{label}</div>\n\t\t</div>\n\t);\n};\n"]}
|
|
@@ -22,7 +22,9 @@ export const DropZone = ({ processFile, children, suppress = false }) => {
|
|
|
22
22
|
});
|
|
23
23
|
setSingleton(false);
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
const isPotentialStr = potential ? "isPotential" : "";
|
|
26
|
+
const isDraggingStr = isDragging ? "isDragging" : isPotentialStr;
|
|
27
|
+
return suppress ? (React.createElement(React.Fragment, null, children)) : (React.createElement("div", { className: `dropZone ${isDraggingStr}`, onDragEnter: (e) => {
|
|
26
28
|
preventDefaults(e);
|
|
27
29
|
setIsDragging(true);
|
|
28
30
|
}, onDragLeave: (e) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropZone.js","sourceRoot":"","sources":["../../../src/components/common/DropZone.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,qBAAqB,CAAC;AAsB7B,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,GAAG,KAAK,EAAiB,EAAE,EAAE;IACtF,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAEjD,MAAM,eAAe,GAAG,CAAC,CAA0D,EAAE,EAAE;QACtF,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,CAAC,CAAC,eAAe,EAAE,CAAC;IACrB,CAAC,CAAC;IAIF,IAAI,SAAS,EAAE;QAId,IAAI,OAAO,GAA0B,IAAI,CAAC;QAC1C,QAAQ,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE;YAC3C,eAAe,CAAC,CAAC,CAAC,CAAC;YACnB,YAAY,CAAC,IAAI,CAAC,CAAC;YAGnB,IAAI,OAAO,KAAK,IAAI,EAAE;gBACrB,YAAY,CAAC,OAAO,CAAC,CAAC;aACtB;YAGD,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;gBAEzB,YAAY,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,EAAE,GAAG,CAAC,CAAC;QAET,CAAC,CAAC,CAAC;QACH,YAAY,CAAC,KAAK,CAAC,CAAC;KACpB;IAED,
|
|
1
|
+
{"version":3,"file":"DropZone.js","sourceRoot":"","sources":["../../../src/components/common/DropZone.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,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AAG,QAAQ,CAAI,CACf,CAAC,CAAC,CAAC,CACH,6BACC,SAAS,EAAE,YAAY,aAAa,EAAE,EACtC,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE;YAClB,eAAe,CAAC,CAAC,CAAC,CAAC;YACnB,aAAa,CAAC,IAAI,CAAC,CAAC;QACrB,CAAC,EACD,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE;YAClB,eAAe,CAAC,CAAC,CAAC,CAAC;YACnB,aAAa,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC,EACD,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE;YACb,aAAa,CAAC,KAAK,CAAC,CAAC;YAErB,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,YAAY,CAAC;YACjC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACtC,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE;oBACtB,SAAS;iBACT;gBACD,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aACzB;YAED,eAAe,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC,IAEA,QAAQ,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState } from \"react\";\nimport \"./css/drop-zone.css\";\n\n// Electron adds File.path\nexport type FileWithPath = File & { path?: string };\n\nexport type DropZoneProps = {\n\tchildren: React.ReactNode;\n\tprocessFile: (fileObj: FileWithPath, index: number) => void;\n\tsuppress?: boolean;\n};\n\n/***\n * Component that serves as a drop zone. It also keeps track of visual concerns and event handlers for\n * drag-and-drop.\n *\n * The DropZone component is intended to be a container element for other elements, such as text, lists,\n * images, input elements, etc.\n *\n * @callback processFile - This function will be called for each file that is dropped in the dropzone.\n * @param {ReactNode} children - React will fill this in.\n * @param {boolean} suppress=false - If the dropzone-ness should be suppressed, which would turn this container into just a div\n */\nexport const DropZone = ({ processFile, children, suppress = false }: DropZoneProps) => {\n\tconst [isDragging, setIsDragging] = useState(false);\n\tconst [potential, setPotential] = useState(false);\n\tconst [singleton, setSingleton] = useState(true);\n\n\tconst preventDefaults = (e: { preventDefault: Function; stopPropagation: Function }) => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t};\n\n\t// Check if something is being dragged somewhere on the page\n\t// If dragging is happening on the page, there will be a visual indication for potential drop zone\n\tif (singleton) {\n\t\t// \"dragenter\" and \"dragleave\" events are fired off of every single child element, and counting them isn't reliable\n\t\t// so, when \"dragover\" events are fired, we know dragging is happening.\n\t\t// we will wait 100ms after the last \"dragover\" event is fired, and then turn off the potential zone.\n\t\tlet timeout: NodeJS.Timeout | null = null;\n\t\tdocument.addEventListener(\"dragover\", (e) => {\n\t\t\tpreventDefaults(e);\n\t\t\tsetPotential(true);\n\n\t\t\t// If timeout was previously set, clear it\n\t\t\tif (timeout !== null) {\n\t\t\t\tclearTimeout(timeout);\n\t\t\t}\n\n\t\t\t// Set a new timeout, now that we've gotten a new dragover event\n\t\t\ttimeout = setTimeout(() => {\n\t\t\t\t// If it's been 100ms and no dragover event has been fired, assume the user isn't dragging anymore.\n\t\t\t\tsetPotential(false);\n\t\t\t}, 100); // 100ms was chosen by trial and error.\n\t\t\t// 10ms was too little time, and caused flicker. 100ms doesn't have a flicker, and turns off potential without a noticeable delay\n\t\t});\n\t\tsetSingleton(false);\n\t}\n\n\tconst isPotentialStr = potential ? \"isPotential\" : \"\";\n\tconst isDraggingStr = isDragging ? \"isDragging\" : isPotentialStr;\n\n\treturn suppress ? (\n\t\t<>{children}</>\n\t) : (\n\t\t<div\n\t\t\tclassName={`dropZone ${isDraggingStr}`}\n\t\t\tonDragEnter={(e) => {\n\t\t\t\tpreventDefaults(e);\n\t\t\t\tsetIsDragging(true);\n\t\t\t}}\n\t\t\tonDragLeave={(e) => {\n\t\t\t\tpreventDefaults(e);\n\t\t\t\tsetIsDragging(false);\n\t\t\t}}\n\t\t\tonDrop={(e) => {\n\t\t\t\tsetIsDragging(false);\n\n\t\t\t\tconst { files } = e.dataTransfer;\n\t\t\t\tfor (let i = 0; i < files.length; i++) {\n\t\t\t\t\tif (files[i] === null) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tprocessFile(files[i], i);\n\t\t\t\t}\n\n\t\t\t\tpreventDefaults(e);\n\t\t\t}}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n"]}
|
|
@@ -18,5 +18,6 @@ export declare type FileInputProps = {
|
|
|
18
18
|
presetFile?: null | File;
|
|
19
19
|
suppressDropzone?: boolean;
|
|
20
20
|
disabled?: boolean;
|
|
21
|
+
allowClearing?: boolean;
|
|
21
22
|
};
|
|
22
|
-
export declare const FileInput: ({ acceptTypes, value, onSetValue, id, shouldUpload, uploadFunction, presetFile, suppressDropzone, disabled, }: FileInputProps) => JSX.Element;
|
|
23
|
+
export declare const FileInput: ({ acceptTypes, value, onSetValue, id, shouldUpload, uploadFunction, presetFile, suppressDropzone, disabled, allowClearing, }: FileInputProps) => JSX.Element;
|
|
@@ -17,7 +17,7 @@ const INVALID_FILE_TYPE_ERROR = {
|
|
|
17
17
|
const defaultUploadFunction = async () => {
|
|
18
18
|
return { err: null, path: "" };
|
|
19
19
|
};
|
|
20
|
-
export const FileInput = ({ acceptTypes, value, onSetValue, id, shouldUpload = true, uploadFunction = defaultUploadFunction, presetFile = null, suppressDropzone = false, disabled = false, }) => {
|
|
20
|
+
export const FileInput = ({ acceptTypes, value, onSetValue, id, shouldUpload = true, uploadFunction = defaultUploadFunction, presetFile = null, suppressDropzone = false, disabled = false, allowClearing = true, }) => {
|
|
21
21
|
const dispatch = useDispatch();
|
|
22
22
|
const fileInputElement = useRef({});
|
|
23
23
|
const [isUploading, setIsUploading] = useState(false);
|
|
@@ -96,7 +96,7 @@ export const FileInput = ({ acceptTypes, value, onSetValue, id, shouldUpload = t
|
|
|
96
96
|
} })),
|
|
97
97
|
React.createElement("div", { className: "file-input-value" },
|
|
98
98
|
React.createElement("span", Object.assign({ className: `file-input-value-input ${isInvalid && "invalid"}` }, { id }), path),
|
|
99
|
-
path !== "" && (React.createElement(ButtonIcon, { text: "Cancel", icon: "times", onClick: () => {
|
|
99
|
+
allowClearing && path !== "" && (React.createElement(ButtonIcon, { text: "Cancel", icon: "times", onClick: () => {
|
|
100
100
|
setPath("");
|
|
101
101
|
onSetValue === null || onSetValue === void 0 ? void 0 : onSetValue("");
|
|
102
102
|
} })),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileInput.js","sourceRoot":"","sources":["../../../src/components/common/FileInput.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,sBAAsB,CAAC;AAE9B,OAAO,EAAE,QAAQ,EAAgB,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAmBlD,MAAM,uBAAuB,GAAiB;IAC7C,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,iDAAiD;CAC1D,CAAC;AAEF,MAAM,qBAAqB,GAAG,KAAK,IAAI,EAAE;IACxC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;AAChC,CAAC,CAAC;AAQF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EACzB,WAAW,EACX,KAAK,EACL,UAAU,EACV,EAAE,EACF,YAAY,GAAG,IAAI,EACnB,cAAc,GAAG,qBAAqB,EACtC,UAAU,GAA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,CAAC;wBACZ,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAG,EAAE,CAAC,CAAC;oBAClB,CAAC,GACA,CACF;gBACA,YAAY,IAAI,6BAAK,SAAS,EAAC,kBAAkB,IAAE,YAAY,CAAO,CAClE;YACN,6BAAK,SAAS,EAAC,mBAAmB,IAChC,WAAW,CAAC,CAAC,CAAC,CACd,6BAAK,SAAS,EAAC,+BAA+B;gBAAE,cAAc;6BAAiB,CAC/E,CAAC,CAAC,CAAC,CACH,CAAC,YAAY,IAAI,yCAAK,CACtB,CACI,CACD,CACI,CACX,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React, { useState, useRef, useEffect } from \"react\";\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\nimport { useDispatch } from \"../../store\";\nimport { ProjectError } from \"../../types/smartDesktopDesignerTypes\";\n\nimport { Button } from \"./Button\";\nimport { ButtonIcon } from \"./ButtonIcon\";\nimport \"./css/file-input.css\";\n\nimport { DropZone, FileWithPath } from \"./DropZone\";\nimport { validateFilename } from \"./file_helpers\";\n\nexport type FileInputUploadCb = (\n\tfileObject: File,\n\tcb?: (progress: number) => void\n) => Promise<{ err: string | null; path: string }>;\n\nexport type FileInputProps = {\n\tacceptTypes: string[];\n\tvalue: string;\n\tid?: string;\n\tshouldUpload?: boolean;\n\tonSetValue?: (value: string) => void;\n\tuploadFunction?: FileInputUploadCb;\n\tpresetFile?: null | File;\n\tsuppressDropzone?: boolean;\n\tdisabled?: boolean;\n};\n\nconst INVALID_FILE_TYPE_ERROR: ProjectError = {\n\tviewId: \"themes\",\n\tmessage: \"Your uploaded file is not in the correct format\",\n};\n\nconst defaultUploadFunction = async () => {\n\treturn { err: null, path: \"\" };\n};\n\n/**\n * A Browse button with a hidden file input to allow for a file select dialog and extraction of a path\n *\n * @param {FileInputProps} { acceptTypes, value, onSetValue, shouldUpload=true, uploadFunction = defaultUploadFunction}\n * @return {*}\n */\nexport const FileInput = ({\n\tacceptTypes,\n\tvalue,\n\tonSetValue,\n\tid,\n\tshouldUpload = true,\n\tuploadFunction = defaultUploadFunction,\n\tpresetFile = null,\n\tsuppressDropzone = false,\n\tdisabled = false,\n}: FileInputProps) => {\n\tconst dispatch = useDispatch();\n\tconst fileInputElement = useRef({} as HTMLInputElement);\n\tconst [isUploading, setIsUploading] = useState(false);\n\tconst [uploadProgress, setUploadProgress] = useState(0);\n\tconst [fileInput, setFileInput] = useState({} as HTMLInputElement); // cast to correct type so typescript doesn't complain\n\tconst [path, setPath] = useState(value || \"\");\n\tconst [errorMessage, setErrorMessage] = useState(null as string | null);\n\tconst [handedFile, setHandedFile] = useState<FileWithPath | null>(presetFile);\n\n\tconst isInvalid = validateFilename(acceptTypes, path);\n\n\tconst uploadSuccess = ({ err, path: successPath }: { err: string | null; path: string }) => {\n\t\tif (err) {\n\t\t\tdispatch(SmartDesktopDesignerActions.set_project_error(INVALID_FILE_TYPE_ERROR));\n\n\t\t\tsetErrorMessage(err);\n\t\t\tsetPath(\"\");\n\t\t} else {\n\t\t\tdispatch(SmartDesktopDesignerActions.delete_project_error(INVALID_FILE_TYPE_ERROR));\n\t\t\tsetErrorMessage(null);\n\t\t\tsetPath(successPath);\n\n\t\t\tonSetValue?.(successPath);\n\n\t\t\tfileInput.value = \"\";\n\t\t}\n\t};\n\n\tconst uploadError = (err: string) => {\n\t\tsetErrorMessage(err);\n\t};\n\n\tconst uploadFile = (fileObj: FileWithPath | undefined) => {\n\t\t// If it's not a file, we can't do anything with it\n\t\tif (!(fileObj instanceof File)) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetIsUploading(true);\n\t\tuploadFunction?.(fileObj, (progress: number) => {\n\t\t\tsetUploadProgress(progress);\n\t\t})\n\t\t\t.then(uploadSuccess)\n\t\t\t.catch(uploadError)\n\t\t\t.finally(() => {\n\t\t\t\tsetIsUploading(false);\n\t\t\t\tsetUploadProgress(0);\n\t\t\t});\n\t};\n\n\tconst processFile = (fileObj: FileWithPath) => {\n\t\tif (shouldUpload) {\n\t\t\tuploadFile(fileObj);\n\t\t} else if (fileObj?.path) {\n\t\t\t// If the consumer doesn't want the file actually uploaded, just return the file name\n\t\t\tuploadSuccess({\n\t\t\t\terr: null,\n\t\t\t\tpath: fileObj.path,\n\t\t\t});\n\t\t}\n\t\tsetIsUploading(false);\n\t\tsetUploadProgress(0);\n\t\tsetErrorMessage(null);\n\t};\n\n\tuseEffect(() => {\n\t\tsetPath(value || \"\");\n\t}, [value]);\n\n\tconst onFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n\t\tconst fileObj = e.target.files?.[0] as FileWithPath | undefined;\n\n\t\tif (fileObj !== undefined) {\n\t\t\tprocessFile(fileObj);\n\t\t}\n\n\t\tsetFileInput(e.target);\n\t};\n\n\t// Check if props updated\n\tif (handedFile !== presetFile) {\n\t\tsetHandedFile(presetFile);\n\t\tif (presetFile !== null) {\n\t\t\tuploadFile(presetFile);\n\t\t}\n\t}\n\n\treturn (\n\t\t<DropZone processFile={processFile} suppress={suppressDropzone}>\n\t\t\t<div className=\"file-input-container\">\n\t\t\t\t<div className=\"file-input-actions\">\n\t\t\t\t\t<input\n\t\t\t\t\t\tref={fileInputElement}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\ttype=\"file\"\n\t\t\t\t\t\tonChange={onFileChange}\n\t\t\t\t\t\taccept={acceptTypes.join(\", \")}\n\t\t\t\t\t\ttabIndex={-1}\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t/>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tfashion=\"primary\"\n\t\t\t\t\t\ttext=\"Select file\"\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tfileInputElement.current.click();\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"file-input-value\">\n\t\t\t\t\t<span className={`file-input-value-input ${isInvalid && \"invalid\"}`} {...{ id }}>\n\t\t\t\t\t\t{path}\n\t\t\t\t\t</span>\n\t\t\t\t\t{path !== \"\" && (\n\t\t\t\t\t\t<ButtonIcon\n\t\t\t\t\t\t\ttext=\"Cancel\"\n\t\t\t\t\t\t\ticon=\"times\"\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tsetPath(\"\");\n\t\t\t\t\t\t\t\tonSetValue?.(\"\");\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t{errorMessage && <div className=\"file-input-error\">{errorMessage}</div>}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"file-input-status\">\n\t\t\t\t\t{isUploading ? (\n\t\t\t\t\t\t<div className=\"file-input-progress-container\">{uploadProgress}% uploaded</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t!errorMessage && <></>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</DropZone>\n\t);\n};\n"]}
|
|
1
|
+
{"version":3,"file":"FileInput.js","sourceRoot":"","sources":["../../../src/components/common/FileInput.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,sBAAsB,CAAC;AAE9B,OAAO,EAAE,QAAQ,EAAgB,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAoBlD,MAAM,uBAAuB,GAAiB;IAC7C,MAAM,EAAE,QAAQ;IACh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,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;oBAClC,CAAC,GACA,CACG;YACN,6BAAK,SAAS,EAAC,kBAAkB;gBAChC,4CAAM,SAAS,EAAE,0BAA0B,SAAS,IAAI,SAAS,EAAE,IAAM,EAAE,EAAE,EAAE,GAC7E,IAAI,CACC;gBACN,aAAa,IAAI,IAAI,KAAK,EAAE,IAAI,CAChC,oBAAC,UAAU,IACV,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,GAAG,EAAE;wBACb,OAAO,CAAC,EAAE,CAAC,CAAC;wBACZ,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAG,EAAE,CAAC,CAAC;oBAClB,CAAC,GACA,CACF;gBACA,YAAY,IAAI,6BAAK,SAAS,EAAC,kBAAkB,IAAE,YAAY,CAAO,CAClE;YACN,6BAAK,SAAS,EAAC,mBAAmB,IAChC,WAAW,CAAC,CAAC,CAAC,CACd,6BAAK,SAAS,EAAC,+BAA+B;gBAAE,cAAc;6BAAiB,CAC/E,CAAC,CAAC,CAAC,CACH,CAAC,YAAY,IAAI,yCAAK,CACtB,CACI,CACD,CACI,CACX,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React, { useState, useRef, useEffect } from \"react\";\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\nimport { useDispatch } from \"../../store\";\nimport { ProjectError } from \"../../types/smartDesktopDesignerTypes\";\n\nimport { Button } from \"./Button\";\nimport { ButtonIcon } from \"./ButtonIcon\";\nimport \"./css/file-input.css\";\n\nimport { DropZone, FileWithPath } from \"./DropZone\";\nimport { validateFilename } from \"./file_helpers\";\n\nexport type FileInputUploadCb = (\n\tfileObject: File,\n\tcb?: (progress: number) => void\n) => Promise<{ err: string | null; path: string }>;\n\nexport type FileInputProps = {\n\tacceptTypes: string[];\n\tvalue: string;\n\tid?: string;\n\tshouldUpload?: boolean;\n\tonSetValue?: (value: string) => void;\n\tuploadFunction?: FileInputUploadCb;\n\tpresetFile?: null | File;\n\tsuppressDropzone?: boolean;\n\tdisabled?: boolean;\n\tallowClearing?: boolean;\n};\n\nconst INVALID_FILE_TYPE_ERROR: ProjectError = {\n\tviewId: \"themes\",\n\tmessage: \"Your uploaded file is not in the correct format\",\n};\n\nconst defaultUploadFunction = async () => {\n\treturn { err: null, path: \"\" };\n};\n\n/**\n * A Browse button with a hidden file input to allow for a file select dialog and extraction of a path\n *\n * @param {FileInputProps} { acceptTypes, value, onSetValue, shouldUpload=true, uploadFunction = defaultUploadFunction}\n * @return {*}\n */\nexport const FileInput = ({\n\tacceptTypes,\n\tvalue,\n\tonSetValue,\n\tid,\n\tshouldUpload = true,\n\tuploadFunction = defaultUploadFunction,\n\tpresetFile = null,\n\tsuppressDropzone = false,\n\tdisabled = false,\n\tallowClearing = true,\n}: FileInputProps) => {\n\tconst dispatch = useDispatch();\n\tconst fileInputElement = useRef({} as HTMLInputElement);\n\tconst [isUploading, setIsUploading] = useState(false);\n\tconst [uploadProgress, setUploadProgress] = useState(0);\n\tconst [fileInput, setFileInput] = useState({} as HTMLInputElement); // cast to correct type so typescript doesn't complain\n\tconst [path, setPath] = useState(value || \"\");\n\tconst [errorMessage, setErrorMessage] = useState(null as string | null);\n\tconst [handedFile, setHandedFile] = useState<FileWithPath | null>(presetFile);\n\n\tconst isInvalid = validateFilename(acceptTypes, path);\n\n\tconst uploadSuccess = ({ err, path: successPath }: { err: string | null; path: string }) => {\n\t\tif (err) {\n\t\t\tdispatch(SmartDesktopDesignerActions.set_project_error(INVALID_FILE_TYPE_ERROR));\n\n\t\t\tsetErrorMessage(err);\n\t\t\tsetPath(\"\");\n\t\t} else {\n\t\t\tdispatch(SmartDesktopDesignerActions.delete_project_error(INVALID_FILE_TYPE_ERROR));\n\t\t\tsetErrorMessage(null);\n\t\t\tsetPath(successPath);\n\n\t\t\tonSetValue?.(successPath);\n\n\t\t\tfileInput.value = \"\";\n\t\t}\n\t};\n\n\tconst uploadError = (err: string) => {\n\t\tsetErrorMessage(err);\n\t};\n\n\tconst uploadFile = (fileObj: FileWithPath | undefined) => {\n\t\t// If it's not a file, we can't do anything with it\n\t\tif (!(fileObj instanceof File)) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetIsUploading(true);\n\t\tuploadFunction?.(fileObj, (progress: number) => {\n\t\t\tsetUploadProgress(progress);\n\t\t})\n\t\t\t.then(uploadSuccess)\n\t\t\t.catch(uploadError)\n\t\t\t.finally(() => {\n\t\t\t\tsetIsUploading(false);\n\t\t\t\tsetUploadProgress(0);\n\t\t\t});\n\t};\n\n\tconst processFile = (fileObj: FileWithPath) => {\n\t\tif (shouldUpload) {\n\t\t\tuploadFile(fileObj);\n\t\t} else if (fileObj?.path) {\n\t\t\t// If the consumer doesn't want the file actually uploaded, just return the file name\n\t\t\tuploadSuccess({\n\t\t\t\terr: null,\n\t\t\t\tpath: fileObj.path,\n\t\t\t});\n\t\t}\n\t\tsetIsUploading(false);\n\t\tsetUploadProgress(0);\n\t\tsetErrorMessage(null);\n\t};\n\n\tuseEffect(() => {\n\t\tsetPath(value || \"\");\n\t}, [value]);\n\n\tconst onFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n\t\tconst fileObj = e.target.files?.[0] as FileWithPath | undefined;\n\n\t\tif (fileObj !== undefined) {\n\t\t\tprocessFile(fileObj);\n\t\t}\n\n\t\tsetFileInput(e.target);\n\t};\n\n\t// Check if props updated\n\tif (handedFile !== presetFile) {\n\t\tsetHandedFile(presetFile);\n\t\tif (presetFile !== null) {\n\t\t\tuploadFile(presetFile);\n\t\t}\n\t}\n\n\treturn (\n\t\t<DropZone processFile={processFile} suppress={suppressDropzone}>\n\t\t\t<div className=\"file-input-container\">\n\t\t\t\t<div className=\"file-input-actions\">\n\t\t\t\t\t<input\n\t\t\t\t\t\tref={fileInputElement}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\ttype=\"file\"\n\t\t\t\t\t\tonChange={onFileChange}\n\t\t\t\t\t\taccept={acceptTypes.join(\", \")}\n\t\t\t\t\t\ttabIndex={-1}\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t/>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tfashion=\"primary\"\n\t\t\t\t\t\ttext=\"Select file\"\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tfileInputElement.current.click();\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"file-input-value\">\n\t\t\t\t\t<span className={`file-input-value-input ${isInvalid && \"invalid\"}`} {...{ id }}>\n\t\t\t\t\t\t{path}\n\t\t\t\t\t</span>\n\t\t\t\t\t{allowClearing && path !== \"\" && (\n\t\t\t\t\t\t<ButtonIcon\n\t\t\t\t\t\t\ttext=\"Cancel\"\n\t\t\t\t\t\t\ticon=\"times\"\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tsetPath(\"\");\n\t\t\t\t\t\t\t\tonSetValue?.(\"\");\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t{errorMessage && <div className=\"file-input-error\">{errorMessage}</div>}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"file-input-status\">\n\t\t\t\t\t{isUploading ? (\n\t\t\t\t\t\t<div className=\"file-input-progress-container\">{uploadProgress}% uploaded</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t!errorMessage && <></>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</DropZone>\n\t);\n};\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import "./css/icon.css";
|
|
3
|
-
export declare type FinsembleIconType = "alwaysOnTop" | "caret" | "check-square" | "check" | "chevron-left" | "chevron-right" | "close" | "copy" | "documentation" | "exclamation-circle" | "external-link" | "flag" | "folder" | "font" | "globe" | "hdd" | "key" | "life-ring" | "linker" | "lock" | "magic" | "maximize" | "minimize" | "moon" | "paint-roller" | "pencil" | "plus" | "question-circle" | "search" | "sun" | "times" | "toggle-off" | "toggle-on" | "toolbar" | "tools" | "trash" | "upload" | "window";
|
|
3
|
+
export declare type FinsembleIconType = "alwaysOnTop" | "caret" | "check-square" | "check" | "chevron-left" | "chevron-right" | "close" | "code-block" | "copy" | "documentation" | "exclamation-circle" | "external-link" | "flag" | "folder" | "font" | "globe" | "hdd" | "key" | "life-ring" | "linker" | "lock" | "magic" | "maximize" | "minimize" | "moon" | "paint-roller" | "pencil" | "plus" | "question-circle" | "search" | "sun" | "times" | "toggle-off" | "toggle-on" | "toolbar" | "tools" | "trash" | "upload" | "window";
|
|
4
4
|
export declare type FinsembleIconProps = {
|
|
5
5
|
icon: FinsembleIconType;
|
|
6
6
|
className?: string;
|
|
@@ -7,6 +7,7 @@ import { ReactComponent as CheckSquare } from "../../assets/icons/check-square.s
|
|
|
7
7
|
import { ReactComponent as ChevronLeftIcon } from "../../assets/icons/chevron-left.svg";
|
|
8
8
|
import { ReactComponent as ChevronRightIcon } from "../../assets/icons/chevron-right.svg";
|
|
9
9
|
import { ReactComponent as CloseIcon } from "../../assets/icons/close.svg";
|
|
10
|
+
import { ReactComponent as CodeBlockIcon } from "../../assets/icons/code-block.svg";
|
|
10
11
|
import { ReactComponent as CopyIcon } from "../../assets/icons/copy.svg";
|
|
11
12
|
import { ReactComponent as DocumentationIcon } from "../../assets/icons/documentation.svg";
|
|
12
13
|
import { ReactComponent as ExclaimationCircleIcon } from "../../assets/icons/exclamation-circle.svg";
|
|
@@ -46,6 +47,7 @@ const icons = {
|
|
|
46
47
|
"chevron-left": ChevronLeftIcon,
|
|
47
48
|
"chevron-right": ChevronRightIcon,
|
|
48
49
|
close: CloseIcon,
|
|
50
|
+
"code-block": CodeBlockIcon,
|
|
49
51
|
copy: CopyIcon,
|
|
50
52
|
documentation: DocumentationIcon,
|
|
51
53
|
"exclamation-circle": ExclaimationCircleIcon,
|