@finsemble/finsemble-ui 6.3.2 → 6.5.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 -42
- package/react/actions/smartDesktopDesignerActions.d.ts +6 -4
- package/react/actions/smartDesktopDesignerActions.js +2 -1
- package/react/actions/smartDesktopDesignerActions.js.map +1 -1
- package/react/assets/css/userPreferences.css +0 -30
- package/react/assets/css/windowTitleBar.css +6 -5
- package/react/assets/icons/always-on-top.svg +20 -0
- package/react/assets/icons/caret.svg +7 -0
- package/react/assets/icons/close.svg +11 -0
- package/react/assets/icons/code-block.svg +15 -0
- package/react/assets/icons/documentation.svg +20 -0
- package/react/assets/icons/linker.svg +18 -0
- package/react/assets/icons/maximize.svg +16 -0
- package/react/assets/icons/minimize.svg +15 -0
- package/react/assets/icons/toolbar.svg +12 -0
- package/react/assets/img/finsemble-display.png +0 -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/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/common/Accordion.d.ts +11 -0
- package/react/components/common/Accordion.js +20 -0
- package/react/components/common/Accordion.js.map +1 -0
- package/react/components/common/Checkbox.d.ts +1 -0
- package/react/components/common/Checkbox.js +4 -2
- 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 +9 -4
- package/react/components/common/FileInput.js.map +1 -1
- package/react/components/common/FinsembleIcon.d.ts +1 -1
- package/react/components/common/FinsembleIcon.js +18 -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/Header.js +1 -1
- package/react/components/common/Header.js.map +1 -1
- package/react/components/common/InputTable.d.ts +11 -0
- package/react/components/common/InputTable.js +50 -0
- package/react/components/common/InputTable.js.map +1 -0
- package/react/components/common/Tooltip.js +3 -1
- package/react/components/common/Tooltip.js.map +1 -1
- package/react/components/common/css/accordion.css +99 -0
- package/react/components/common/css/application-edit-page.css +209 -2
- package/react/components/common/css/application-list.css +6 -0
- package/react/components/common/css/button.css +9 -7
- package/react/components/common/css/checkbox.css +30 -0
- package/react/components/common/css/file-input.css +16 -0
- package/react/components/common/css/header.css +1 -14
- package/react/components/common/css/preload-edit-page.css +37 -0
- package/react/components/common/css/styles.css +0 -1
- package/react/components/common/css/tab.css +1 -1
- package/react/components/common/stories/Accordion.stories.d.ts +14 -0
- package/react/components/common/stories/Accordion.stories.js +42 -0
- package/react/components/common/stories/Accordion.stories.js.map +1 -0
- package/react/components/common/stories/DropdownButton.stories.d.ts +11 -0
- package/react/components/common/stories/DropdownButton.stories.js +12 -0
- package/react/components/common/stories/DropdownButton.stories.js.map +1 -1
- package/react/components/common/stories/FileInput.stories.d.ts +2 -1
- package/react/components/common/stories/FileInput.stories.js +6 -0
- package/react/components/common/stories/FileInput.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleIcon.stories.js +1 -0
- package/react/components/common/stories/FinsembleIcon.stories.js.map +1 -1
- package/react/components/common/stories/InputTable.stories.d.ts +12 -0
- package/react/components/common/stories/InputTable.stories.js +35 -0
- package/react/components/common/stories/InputTable.stories.js.map +1 -0
- package/react/components/{smartDesktopDesigner/tests/ApplicationEdit.spec.d.ts → common/tests/Accordion.spec.d.ts} +0 -0
- package/react/components/common/tests/Accordion.spec.js +53 -0
- package/react/components/common/tests/Accordion.spec.js.map +1 -0
- package/react/components/common/tests/Checkbox.spec.js +5 -3
- package/react/components/common/tests/Checkbox.spec.js.map +1 -1
- package/react/components/common/tests/FileInput.spec.js +20 -5
- package/react/components/common/tests/FileInput.spec.js.map +1 -1
- package/react/components/common/tests/Header.spec.js +6 -2
- package/react/components/common/tests/Header.spec.js.map +1 -1
- package/react/components/{smartDesktopDesigner/tests/ApplicationList.spec.d.ts → common/tests/InputTable.spec.d.ts} +0 -0
- package/react/components/common/tests/InputTable.spec.js +166 -0
- package/react/components/common/tests/InputTable.spec.js.map +1 -0
- package/react/components/favorites/FavoritesShell.stories.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.js +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.spec.js +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.stories.js +13 -0
- package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogButton.js +1 -1
- package/react/components/legacyControls/FinsembleDialogButton.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/linker/remoteRedux.d.ts +1 -1
- package/react/components/linker/remoteRedux.js.map +1 -1
- package/react/components/menu/Menu.d.ts +1 -0
- package/react/components/menu/Menu.js.map +1 -1
- package/react/components/menu/MenuAutoResizer.d.ts +2 -1
- package/react/components/menu/MenuAutoResizer.js +4 -3
- package/react/components/menu/MenuAutoResizer.js.map +1 -1
- package/react/components/menu/MenuPortal.js +118 -92
- package/react/components/menu/MenuPortal.js.map +1 -1
- package/react/components/menu/MenuShell.d.ts +1 -0
- package/react/components/menu/MenuShell.js +3 -2
- package/react/components/menu/MenuShell.js.map +1 -1
- package/react/components/menu/menuContext.d.ts +1 -0
- package/react/components/menu/menuContext.js.map +1 -1
- package/react/components/menu/menuHelpers.d.ts +1 -1
- package/react/components/menu/menuHelpers.js +2 -2
- package/react/components/menu/menuHelpers.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerControls.js +30 -6
- package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +2 -0
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +20 -27
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
- package/react/components/notifications/components/shared/CheckButton.d.ts +1 -1
- package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
- package/react/components/notifications/components/shared/IconButton.js +5 -1
- package/react/components/notifications/components/shared/IconButton.js.map +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.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 +5 -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/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/stores/ProcessMonitorStore.d.ts +3 -3
- package/react/components/processMonitor/stores/ProcessMonitorStore.js +49 -49
- package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
- package/react/components/search/SearchResult.js +4 -3
- package/react/components/search/SearchResult.js.map +1 -1
- package/react/components/shared/DefaultDropdownButton.js +1 -1
- package/react/components/shared/DefaultDropdownButton.js.map +1 -1
- package/react/components/smartDesktopDesigner/AddApp.d.ts +14 -0
- package/react/components/smartDesktopDesigner/AddApp.js +60 -0
- package/react/components/smartDesktopDesigner/AddApp.js.map +1 -0
- package/react/components/smartDesktopDesigner/AppEditAccess.js +16 -32
- package/react/components/smartDesktopDesigner/AppEditAccess.js.map +1 -1
- package/react/components/smartDesktopDesigner/AppEditPage.d.ts +6 -19
- package/react/components/smartDesktopDesigner/AppEditPage.js +552 -59
- package/react/components/smartDesktopDesigner/AppEditPage.js.map +1 -1
- package/react/components/smartDesktopDesigner/Appearance.css +8 -67
- package/react/components/smartDesktopDesigner/Appearance.js +1 -1
- package/react/components/smartDesktopDesigner/Appearance.js.map +1 -1
- package/react/components/smartDesktopDesigner/Application.d.ts +11 -3
- package/react/components/smartDesktopDesigner/Application.js +155 -104
- package/react/components/smartDesktopDesigner/Application.js.map +1 -1
- package/react/components/smartDesktopDesigner/Applications.d.ts +2 -3
- package/react/components/smartDesktopDesigner/Applications.js +67 -107
- package/react/components/smartDesktopDesigner/Applications.js.map +1 -1
- package/react/components/smartDesktopDesigner/Authentication.js +2 -9
- package/react/components/smartDesktopDesigner/Authentication.js.map +1 -1
- package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js +8 -1
- package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +1 -1
- package/react/components/smartDesktopDesigner/ContentHeader.d.ts +5 -0
- package/react/components/smartDesktopDesigner/ContentHeader.js +10 -0
- package/react/components/smartDesktopDesigner/ContentHeader.js.map +1 -0
- package/react/components/smartDesktopDesigner/CurrentView.js +2 -1
- package/react/components/smartDesktopDesigner/CurrentView.js.map +1 -1
- package/react/components/smartDesktopDesigner/EditPreload.d.ts +14 -0
- package/react/components/smartDesktopDesigner/EditPreload.js +169 -0
- package/react/components/smartDesktopDesigner/EditPreload.js.map +1 -0
- package/react/components/smartDesktopDesigner/Export.d.ts +1 -0
- package/react/components/smartDesktopDesigner/Export.js +40 -9
- package/react/components/smartDesktopDesigner/Export.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportCloud.d.ts +3 -1
- package/react/components/smartDesktopDesigner/ExportCloud.js +4 -6
- package/react/components/smartDesktopDesigner/ExportCloud.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportZip.d.ts +3 -1
- package/react/components/smartDesktopDesigner/ExportZip.js +8 -3
- package/react/components/smartDesktopDesigner/ExportZip.js.map +1 -1
- package/react/components/smartDesktopDesigner/GettingStarted.d.ts +1 -0
- package/react/components/smartDesktopDesigner/GettingStarted.js +11 -25
- package/react/components/smartDesktopDesigner/GettingStarted.js.map +1 -1
- package/react/components/smartDesktopDesigner/ItemList.d.ts +17 -0
- package/react/components/smartDesktopDesigner/ItemList.js +58 -0
- package/react/components/smartDesktopDesigner/ItemList.js.map +1 -0
- package/react/components/smartDesktopDesigner/Navigation.d.ts +2 -2
- package/react/components/smartDesktopDesigner/Navigation.js +17 -15
- package/react/components/smartDesktopDesigner/Navigation.js.map +1 -1
- package/react/components/smartDesktopDesigner/OptionalSettingsView.d.ts +11 -0
- package/react/components/smartDesktopDesigner/OptionalSettingsView.js +71 -0
- package/react/components/smartDesktopDesigner/OptionalSettingsView.js.map +1 -0
- package/react/components/smartDesktopDesigner/Preloads.d.ts +8 -0
- package/react/components/smartDesktopDesigner/Preloads.js +26 -0
- package/react/components/smartDesktopDesigner/Preloads.js.map +1 -0
- package/react/components/smartDesktopDesigner/Publish.js.map +1 -1
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +3 -3
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +11 -17
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
- package/react/components/smartDesktopDesigner/ThemePage.css +0 -1
- package/react/components/smartDesktopDesigner/ThemePage.js +0 -7
- package/react/components/smartDesktopDesigner/ThemePage.js.map +1 -1
- package/react/components/smartDesktopDesigner/Themes.js +0 -2
- package/react/components/smartDesktopDesigner/Themes.js.map +1 -1
- package/react/components/smartDesktopDesigner/Toolbar.d.ts +15 -0
- package/react/components/smartDesktopDesigner/Toolbar.js +123 -0
- package/react/components/smartDesktopDesigner/Toolbar.js.map +1 -0
- package/react/components/smartDesktopDesigner/View.js +1 -1
- package/react/components/smartDesktopDesigner/View.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/fsbl_functions.d.ts +1 -1
- package/react/components/smartDesktopDesigner/common/fsbl_functions.js +2 -2
- package/react/components/smartDesktopDesigner/common/fsbl_functions.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/views.d.ts +2 -36
- package/react/components/smartDesktopDesigner/common/views.js +168 -111
- package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
- package/react/components/smartDesktopDesigner/css/appearance.css +20 -9
- package/react/components/smartDesktopDesigner/css/applications.css +40 -0
- package/react/components/smartDesktopDesigner/css/authentication.css +5 -11
- package/react/components/smartDesktopDesigner/css/export.css +32 -19
- package/react/components/smartDesktopDesigner/css/getting-started.css +22 -0
- package/react/components/smartDesktopDesigner/css/nav.css +38 -11
- package/react/components/smartDesktopDesigner/css/project-header.css +19 -16
- package/react/components/smartDesktopDesigner/css/styles.css +2 -3
- package/react/components/smartDesktopDesigner/css/views.css +11 -4
- package/react/components/smartDesktopDesigner/fixtures/apps.d.ts +3 -1
- package/react/components/smartDesktopDesigner/fixtures/apps.js +63 -6
- package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/exportProps.js +3 -0
- package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/preloads.d.ts +22 -0
- package/react/components/smartDesktopDesigner/fixtures/preloads.js +40 -0
- package/react/components/smartDesktopDesigner/fixtures/preloads.js.map +1 -0
- package/react/components/smartDesktopDesigner/fixtures/publishProgress.d.ts +1 -1
- package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/views.d.ts +2 -2
- package/react/components/smartDesktopDesigner/fixtures/views.js +67 -26
- package/react/components/smartDesktopDesigner/fixtures/views.js.map +1 -1
- package/react/components/smartDesktopDesigner/sdd_helpers.d.ts +1 -1
- package/react/components/smartDesktopDesigner/sdd_helpers.js +4 -3
- package/react/components/smartDesktopDesigner/sdd_helpers.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.d.ts +3 -1
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js +13 -33
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.d.ts +10 -0
- package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.js +13 -0
- package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.js.map +1 -0
- package/react/components/smartDesktopDesigner/stories/EditPreload.stories.d.ts +11 -0
- package/react/components/smartDesktopDesigner/stories/EditPreload.stories.js +35 -0
- package/react/components/smartDesktopDesigner/stories/EditPreload.stories.js.map +1 -0
- package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.d.ts +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportZip.stories.d.ts +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ItemList.stories.d.ts +16 -0
- package/react/components/smartDesktopDesigner/stories/{ApplicationList.stories.js → ItemList.stories.js} +30 -23
- package/react/components/smartDesktopDesigner/stories/ItemList.stories.js.map +1 -0
- package/react/components/smartDesktopDesigner/stories/OptionalSettingsView.stories.d.ts +11 -0
- package/react/components/smartDesktopDesigner/stories/OptionalSettingsView.stories.js +28 -0
- package/react/components/smartDesktopDesigner/stories/OptionalSettingsView.stories.js.map +1 -0
- package/react/components/smartDesktopDesigner/stories/Preloads.stories.d.ts +11 -0
- package/react/components/smartDesktopDesigner/stories/Preloads.stories.js +31 -0
- package/react/components/smartDesktopDesigner/stories/Preloads.stories.js.map +1 -0
- package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js +7 -1
- package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Toolbar.stories.d.ts +14 -0
- package/react/components/smartDesktopDesigner/stories/Toolbar.stories.js +38 -0
- package/react/components/smartDesktopDesigner/stories/Toolbar.stories.js.map +1 -0
- package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js +1100 -308
- package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/{ApplicationSetup.spec.d.ts → Application.spec.d.ts} +0 -0
- package/react/components/smartDesktopDesigner/tests/Application.spec.js +1496 -0
- package/react/components/smartDesktopDesigner/tests/Application.spec.js.map +1 -0
- package/react/components/smartDesktopDesigner/tests/Applications.spec.d.ts +1 -1
- package/react/components/smartDesktopDesigner/tests/Applications.spec.js +62 -561
- package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/{ProjectHeader.spec.d.ts → ContentHeader.spec.d.ts} +0 -0
- package/react/components/smartDesktopDesigner/tests/ContentHeader.spec.js +31 -0
- package/react/components/smartDesktopDesigner/tests/ContentHeader.spec.js.map +1 -0
- package/react/components/smartDesktopDesigner/tests/EditPreload.spec.d.ts +1 -0
- package/react/components/smartDesktopDesigner/tests/EditPreload.spec.js +61 -0
- package/react/components/smartDesktopDesigner/tests/EditPreload.spec.js.map +1 -0
- package/react/components/smartDesktopDesigner/tests/Export.spec.js +129 -0
- package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js +7 -0
- package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ItemList.spec.d.ts +1 -0
- package/react/components/smartDesktopDesigner/tests/{ApplicationList.spec.js → ItemList.spec.js} +8 -8
- package/react/components/smartDesktopDesigner/tests/ItemList.spec.js.map +1 -0
- package/react/components/smartDesktopDesigner/tests/Preloads.spec.d.ts +1 -0
- package/react/components/smartDesktopDesigner/tests/Preloads.spec.js +47 -0
- package/react/components/smartDesktopDesigner/tests/Preloads.spec.js.map +1 -0
- package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js +3 -14
- package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js +7 -30
- package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Toolbar.spec.d.ts +1 -0
- package/react/components/smartDesktopDesigner/tests/Toolbar.spec.js +203 -0
- package/react/components/smartDesktopDesigner/tests/Toolbar.spec.js.map +1 -0
- package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.d.ts +1 -0
- package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.js +18 -0
- package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.js.map +1 -0
- package/react/components/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/advancedAppLauncher/AdvancedAppLauncher.d.ts +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.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 +47 -45
- 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.map +1 -1
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.d.ts +1 -0
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/components/componentList.d.ts +2 -2
- package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +3 -2
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js +17 -34
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
- package/react/components/toolbar/dashbar/Dashbar.js +12 -13
- 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 +1 -1
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
- package/react/components/userPreferences/components/content/Workspaces.d.ts +1 -1
- package/react/components/userPreferences/components/content/Workspaces.js +1 -1
- 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/stores/UserPreferencesStore.d.ts +1 -1
- package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
- package/react/components/userPreferences/tests/ScheduledRestart.spec.js +1 -1
- package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -1
- package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +4 -2
- package/react/components/windowTitleBar/WindowTitleBarShell.js +60 -52
- package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
- package/react/components/windowTitleBar/components/center/Tab.d.ts +0 -1
- package/react/components/windowTitleBar/components/center/Tab.js +2 -2
- package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
- package/react/components/windowTitleBar/components/center/TabList.d.ts +2 -3
- package/react/components/windowTitleBar/components/center/TabList.js +19 -79
- 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.d.ts +7 -0
- package/react/components/windowTitleBar/components/right/MaximizeButton.js +11 -1
- package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/windowTitle.d.ts +9 -5
- package/react/components/windowTitleBar/components/windowTitle.js +154 -42
- 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 +214 -214
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
- package/react/enzymeSetup.js +1 -1
- package/react/enzymeSetup.js.map +1 -1
- package/react/hooks/useDashbar.d.ts +8 -0
- package/react/hooks/useDashbar.js +104 -0
- package/react/hooks/useDashbar.js.map +1 -0
- package/react/hooks/useFavoritesShell.js.map +1 -1
- package/react/hooks/useNotifications.d.ts +1 -1
- package/react/hooks/useNotifications.js.map +1 -1
- package/react/hooks/useToolbar.d.ts +0 -6
- package/react/hooks/useToolbar.js +0 -101
- package/react/hooks/useToolbar.js.map +1 -1
- package/react/reducers/rootReducer.d.ts +11 -7
- package/react/reducers/smartDesktopDesignerReducer.js +8 -3
- package/react/reducers/smartDesktopDesignerReducer.js.map +1 -1
- package/react/store.d.ts +22 -14
- package/react/types/fdc3.d.ts +7 -35
- package/react/types/fdc3.js.map +1 -1
- package/react/types/searchTypes.d.ts +1 -8
- package/react/types/searchTypes.js.map +1 -1
- package/react/types/smartDesktopDesignerTypes.d.ts +52 -6
- package/react/types/smartDesktopDesignerTypes.js.map +1 -1
- package/react/types/windowTitleBar.d.ts +4 -2
- package/react/types/windowTitleBar.js.map +1 -1
- package/react/components/common/FontSizeSelector.d.ts +0 -7
- package/react/components/common/FontSizeSelector.js +0 -42
- package/react/components/common/FontSizeSelector.js.map +0 -1
- package/react/components/common/stories/FontSizeSelector.stories.d.ts +0 -12
- package/react/components/common/stories/FontSizeSelector.stories.js +0 -24
- package/react/components/common/stories/FontSizeSelector.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/ApplicationEdit.d.ts +0 -25
- package/react/components/smartDesktopDesigner/ApplicationEdit.js +0 -103
- package/react/components/smartDesktopDesigner/ApplicationEdit.js.map +0 -1
- package/react/components/smartDesktopDesigner/ApplicationList.d.ts +0 -15
- package/react/components/smartDesktopDesigner/ApplicationList.js +0 -56
- package/react/components/smartDesktopDesigner/ApplicationList.js.map +0 -1
- package/react/components/smartDesktopDesigner/ApplicationSetup.d.ts +0 -23
- package/react/components/smartDesktopDesigner/ApplicationSetup.js +0 -73
- package/react/components/smartDesktopDesigner/ApplicationSetup.js.map +0 -1
- package/react/components/smartDesktopDesigner/ProjectHeader.d.ts +0 -14
- package/react/components/smartDesktopDesigner/ProjectHeader.js +0 -70
- package/react/components/smartDesktopDesigner/ProjectHeader.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.d.ts +0 -4
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js +0 -45
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.d.ts +0 -3
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js +0 -29
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.d.ts +0 -12
- package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js +0 -21
- package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.d.ts +0 -15
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.d.ts +0 -12
- package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js +0 -28
- package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.d.ts +0 -10
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js +0 -19
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js +0 -66
- package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js +0 -41
- package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js +0 -27
- package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js.map +0 -1
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
|
+
import "../common/css/preload-edit-page.css";
|
|
3
|
+
import { FinsembleSelect } from "../common/FinsembleSelect";
|
|
4
|
+
import { Button } from "../common/Button";
|
|
5
|
+
export const EditPreload = ({ preload, getConfig, getApps, updateApp, cancelFunction, addPreload, updatePreload, deletePreload, }) => {
|
|
6
|
+
const [appList, setAppList] = useState([]);
|
|
7
|
+
const [appNameList, setAppNameList] = useState([]);
|
|
8
|
+
const [appNameValues, setAppNameValues] = useState([]);
|
|
9
|
+
const [selectedApps, setSelectedApps] = useState([]);
|
|
10
|
+
const [usageType, setUsageType] = useState("selection");
|
|
11
|
+
const [livePreload, setLivePreload] = useState(Object.assign({}, preload));
|
|
12
|
+
const [disableSubmit, setDisableSubmit] = useState(true);
|
|
13
|
+
const [key, setKey] = useState(`${Date.now()}.${Math.random()}`);
|
|
14
|
+
const validatePreload = (edited) => {
|
|
15
|
+
let urlValid = true;
|
|
16
|
+
try {
|
|
17
|
+
new URL(edited.url);
|
|
18
|
+
}
|
|
19
|
+
catch (e) {
|
|
20
|
+
urlValid = false;
|
|
21
|
+
}
|
|
22
|
+
return !!edited.alias && urlValid;
|
|
23
|
+
};
|
|
24
|
+
const removePreload = async (alias) => {
|
|
25
|
+
await deletePreload(alias);
|
|
26
|
+
cancelFunction();
|
|
27
|
+
};
|
|
28
|
+
const getUsageType = () => {
|
|
29
|
+
getConfig("finsemble.servicesConfig.launcher.defaultPreloads").then(({ data }) => {
|
|
30
|
+
var _a, _b;
|
|
31
|
+
let type = "selection";
|
|
32
|
+
const globalConfig = data !== null && data !== void 0 ? data : {};
|
|
33
|
+
if ((_a = globalConfig.allComponents) === null || _a === void 0 ? void 0 : _a.includes(preload.alias)) {
|
|
34
|
+
type = "all";
|
|
35
|
+
}
|
|
36
|
+
else if ((_b = globalConfig.launchableComponents) === null || _b === void 0 ? void 0 : _b.includes(preload.alias)) {
|
|
37
|
+
type = "launchable";
|
|
38
|
+
}
|
|
39
|
+
setUsageType(type);
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
const setAlias = (alias) => {
|
|
43
|
+
setLivePreload(Object.assign(Object.assign({}, livePreload), { alias }));
|
|
44
|
+
};
|
|
45
|
+
const setUrl = (url) => {
|
|
46
|
+
setLivePreload(Object.assign(Object.assign({}, livePreload), { url }));
|
|
47
|
+
};
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
setDisableSubmit(!validatePreload(livePreload));
|
|
50
|
+
}, [livePreload]);
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
setKey(`${Date.now()}.${Math.random()}`);
|
|
53
|
+
}, [appList, appNameList, selectedApps]);
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
getUsageType();
|
|
56
|
+
getApps().then(({ apps }) => {
|
|
57
|
+
const appNames = [];
|
|
58
|
+
const appValues = [];
|
|
59
|
+
const selectedNames = [];
|
|
60
|
+
apps.forEach((app) => {
|
|
61
|
+
var _a, _b, _c;
|
|
62
|
+
appNames.push(app.name);
|
|
63
|
+
appValues.push(app.appId);
|
|
64
|
+
if ((_c = (_b = (_a = app.manifest) === null || _a === void 0 ? void 0 : _a.component) === null || _b === void 0 ? void 0 : _b.preload) === null || _c === void 0 ? void 0 : _c.includes(preload === null || preload === void 0 ? void 0 : preload.alias)) {
|
|
65
|
+
selectedNames.push(app.name);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
setAppNameValues(appValues);
|
|
69
|
+
setAppNameList(appNames);
|
|
70
|
+
setSelectedApps(selectedNames);
|
|
71
|
+
setAppList(apps);
|
|
72
|
+
});
|
|
73
|
+
validatePreload(livePreload);
|
|
74
|
+
}, []);
|
|
75
|
+
const onRadioChange = (e) => {
|
|
76
|
+
setUsageType(e.target.value);
|
|
77
|
+
};
|
|
78
|
+
const selectChange = (selectedValues) => {
|
|
79
|
+
setSelectedApps(selectedValues);
|
|
80
|
+
};
|
|
81
|
+
const updateAppConfigs = async () => {
|
|
82
|
+
const promises = appList.map((app) => {
|
|
83
|
+
var _a, _b, _c, _d, _e;
|
|
84
|
+
let appPreloads = (_c = (_b = (_a = app.manifest) === null || _a === void 0 ? void 0 : _a.component) === null || _b === void 0 ? void 0 : _b.preload) !== null && _c !== void 0 ? _c : [];
|
|
85
|
+
appPreloads = Array.isArray(appPreloads) ? appPreloads : [appPreloads];
|
|
86
|
+
const isRenaming = livePreload.alias != preload.alias;
|
|
87
|
+
const wasPreviouslySelected = appPreloads.includes(preload.alias);
|
|
88
|
+
const inNewList = selectedApps.includes(app.appId);
|
|
89
|
+
app.manifest = (_d = app.manifest) !== null && _d !== void 0 ? _d : {};
|
|
90
|
+
app.manifest.component = (_e = app.manifest.component) !== null && _e !== void 0 ? _e : {};
|
|
91
|
+
if ((!isRenaming && wasPreviouslySelected == inNewList) || (!wasPreviouslySelected && !inNewList)) {
|
|
92
|
+
return Promise.resolve();
|
|
93
|
+
}
|
|
94
|
+
if (wasPreviouslySelected) {
|
|
95
|
+
appPreloads = appPreloads.filter((preloadAlias) => preloadAlias != preload.alias);
|
|
96
|
+
}
|
|
97
|
+
if (inNewList) {
|
|
98
|
+
appPreloads.push(livePreload.alias);
|
|
99
|
+
}
|
|
100
|
+
app.manifest.component.preload = appPreloads;
|
|
101
|
+
return updateApp(app.appId, app);
|
|
102
|
+
});
|
|
103
|
+
return Promise.all(promises);
|
|
104
|
+
};
|
|
105
|
+
const clickSubmit = async () => {
|
|
106
|
+
const usage = {
|
|
107
|
+
all: usageType == "all",
|
|
108
|
+
launchable: usageType == "launchable",
|
|
109
|
+
apps: selectedApps,
|
|
110
|
+
};
|
|
111
|
+
if (preload.alias === "") {
|
|
112
|
+
await addPreload(livePreload, usage);
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
await updatePreload(preload.alias, livePreload, usage);
|
|
116
|
+
}
|
|
117
|
+
await updateAppConfigs();
|
|
118
|
+
cancelFunction();
|
|
119
|
+
};
|
|
120
|
+
return (React.createElement("div", { className: "preload-edit-container" },
|
|
121
|
+
React.createElement("h2", null, (livePreload === null || livePreload === void 0 ? void 0 : livePreload.alias) ? livePreload.alias : "Untitled preload"),
|
|
122
|
+
React.createElement("div", { className: "app-edit-field" },
|
|
123
|
+
React.createElement("table", { role: "presentation", className: "preload-edit-table" },
|
|
124
|
+
React.createElement("tbody", null,
|
|
125
|
+
React.createElement("tr", null,
|
|
126
|
+
React.createElement("th", null,
|
|
127
|
+
React.createElement("label", { htmlFor: "preload-alias" }, "Name")),
|
|
128
|
+
React.createElement("td", { className: "edit-field" },
|
|
129
|
+
React.createElement("input", { type: "text", id: "preload-alias", value: livePreload === null || livePreload === void 0 ? void 0 : livePreload.alias, placeholder: "UntitledPreload", onChange: (e) => {
|
|
130
|
+
setAlias(e.target.value);
|
|
131
|
+
} }))),
|
|
132
|
+
React.createElement("tr", null,
|
|
133
|
+
React.createElement("th", null,
|
|
134
|
+
React.createElement("label", { htmlFor: "preload-url" }, "Web URL")),
|
|
135
|
+
React.createElement("td", { className: "edit-field" },
|
|
136
|
+
React.createElement("input", { type: "text", id: "preload-url", value: livePreload === null || livePreload === void 0 ? void 0 : livePreload.url, onChange: (e) => {
|
|
137
|
+
setUrl(e.target.value);
|
|
138
|
+
} }))),
|
|
139
|
+
React.createElement("tr", null,
|
|
140
|
+
React.createElement("th", { className: "table-header__top-label" }, "Load for"),
|
|
141
|
+
React.createElement("td", null,
|
|
142
|
+
React.createElement("div", { className: "load-option" },
|
|
143
|
+
React.createElement("label", null,
|
|
144
|
+
React.createElement("input", { type: "radio", name: "preload-usage", value: "launchable", checked: usageType == "launchable", onChange: onRadioChange }),
|
|
145
|
+
" ",
|
|
146
|
+
"Apps launched by users")),
|
|
147
|
+
React.createElement("div", { className: "load-option" },
|
|
148
|
+
React.createElement("label", null,
|
|
149
|
+
React.createElement("input", { type: "radio", name: "preload-usage", value: "all", checked: usageType == "all", onChange: onRadioChange }),
|
|
150
|
+
" ",
|
|
151
|
+
"All apps")),
|
|
152
|
+
React.createElement("div", { className: "load-option" },
|
|
153
|
+
React.createElement("label", null,
|
|
154
|
+
React.createElement("input", { type: "radio", name: "preload-usage", value: "selection", checked: usageType == "selection", onChange: onRadioChange }),
|
|
155
|
+
" ",
|
|
156
|
+
"Select apps")),
|
|
157
|
+
usageType == "selection" && (React.createElement(FinsembleSelect, { key: key, options: appNameList, values: appNameValues, selected: selectedApps, updateCallback: selectChange, showSearch: true }))))))),
|
|
158
|
+
React.createElement("div", { className: "preload-edit-actions" },
|
|
159
|
+
React.createElement("div", null, preload.alias && (React.createElement(Button, { fashion: "danger", text: "Remove preload", onClick: (e) => {
|
|
160
|
+
removePreload(preload.alias);
|
|
161
|
+
e.preventDefault();
|
|
162
|
+
} }))),
|
|
163
|
+
React.createElement("div", { className: "app-actions-right-wrapper" },
|
|
164
|
+
React.createElement(Button, { fashion: "ghost", text: "Cancel", onClick: () => {
|
|
165
|
+
cancelFunction();
|
|
166
|
+
} }),
|
|
167
|
+
React.createElement(Button, { fashion: "secondary", text: "Save", disabled: disableSubmit, onClick: clickSubmit })))));
|
|
168
|
+
};
|
|
169
|
+
//# sourceMappingURL=EditPreload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditPreload.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/EditPreload.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAe,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,qCAAqC,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAkB1C,MAAM,CAAC,MAAM,WAAW,GAA8C,CAAC,EACtE,OAAO,EACP,SAAS,EACT,OAAO,EACP,SAAS,EACT,cAAc,EACd,UAAU,EACV,aAAa,EACb,aAAa,GACb,EAAE,EAAE;IACJ,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAkB,EAAE,CAAC,CAAC;IAC5D,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAW,EAAE,CAAC,CAAC;IAC7D,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAW,EAAE,CAAC,CAAC;IACjE,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAW,EAAE,CAAC,CAAC;IAC/D,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAmB,WAAW,CAAC,CAAC;IAC1E,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,mBAAM,OAAO,EAAG,CAAC;IAC/D,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAU,IAAI,CAAC,CAAC;IAClE,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG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IAAI,EAAC,OAAO,EACZ,IAAI,EAAC,eAAe,EACpB,KAAK,EAAC,WAAW,EACjB,OAAO,EAAE,SAAS,IAAI,WAAW,EACjC,QAAQ,EAAE,aAAa,GACtB;oCAAC,GAAG;kDAEC,CACH;4BACL,SAAS,IAAI,WAAW,IAAI,CAC5B,oBAAC,eAAe,IACf,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,YAAY,EACtB,cAAc,EAAE,YAAY,EAC5B,UAAU,EAAE,IAAI,GACf,CACF,CACG,CACD,CACE,CACD,CACH;QACN,6BAAK,SAAS,EAAC,sBAAsB;YACpC,iCACE,OAAO,CAAC,KAAK,IAAI,CACjB,oBAAC,MAAM,IACN,OAAO,EAAC,QAAQ,EAChB,IAAI,EAAC,gBAAgB,EACrB,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;oBACd,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;oBAC7B,CAAC,CAAC,cAAc,EAAE,CAAC;gBACpB,CAAC,GACA,CACF,CACI;YAEN,6BAAK,SAAS,EAAC,2BAA2B;gBACzC,oBAAC,MAAM,IACN,OAAO,EAAC,OAAO,EACf,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,GAAG,EAAE;wBACb,cAAc,EAAE,CAAC;oBAClB,CAAC,GACA;gBACF,oBAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,GAAI,CACpF,CACD,CACD,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { ChangeEvent, useEffect, useState } from \"react\";\nimport \"../common/css/preload-edit-page.css\";\nimport { FinsembleSelect } from \"../common/FinsembleSelect\";\nimport { Button } from \"../common/Button\";\nimport { PreloadType } from \"../../types/smartDesktopDesignerTypes\";\nimport { AppDefinition } from \"./Application\";\n\nexport interface EditPreloadProps {\n\tgetConfig: typeof FSBL.Clients.ConfigClient.getValue;\n\tpreload: PreloadType;\n\t// Perhaps use the root state to get this value\n\tgetApps: typeof FSBL.Clients.SmartDesktopClient.prototype.getApps;\n\tupdateApp: typeof FSBL.Clients.SmartDesktopClient.prototype.updateApp;\n\tcancelFunction: Function;\n\taddPreload: Function;\n\tupdatePreload: Function;\n\tdeletePreload: (alias: string) => Promise<void>;\n}\n\ntype preloadUsageType = \"launchable\" | \"all\" | \"selection\";\n\nexport const EditPreload: React.FunctionComponent<EditPreloadProps> = ({\n\tpreload,\n\tgetConfig,\n\tgetApps,\n\tupdateApp,\n\tcancelFunction,\n\taddPreload,\n\tupdatePreload,\n\tdeletePreload,\n}) => {\n\tconst [appList, setAppList] = useState<AppDefinition[]>([]);\n\tconst [appNameList, setAppNameList] = useState<string[]>([]);\n\tconst [appNameValues, setAppNameValues] = useState<string[]>([]);\n\tconst [selectedApps, setSelectedApps] = useState<string[]>([]);\n\tconst [usageType, setUsageType] = useState<preloadUsageType>(\"selection\");\n\tconst [livePreload, setLivePreload] = useState({ ...preload });\n\tconst [disableSubmit, setDisableSubmit] = useState<boolean>(true);\n\tconst [key, setKey] = useState(`${Date.now()}.${Math.random()}`);\n\n\tconst validatePreload = (edited: PreloadType): boolean => {\n\t\tlet urlValid = true;\n\t\ttry {\n\t\t\tnew URL(edited.url);\n\t\t} catch (e) {\n\t\t\turlValid = false;\n\t\t}\n\n\t\treturn !!edited.alias && urlValid;\n\t};\n\n\tconst removePreload = async (alias: string) => {\n\t\tawait deletePreload(alias);\n\t\tcancelFunction();\n\t};\n\n\tconst getUsageType = () => {\n\t\tgetConfig(\"finsemble.servicesConfig.launcher.defaultPreloads\").then(({ data }) => {\n\t\t\tlet type: preloadUsageType = \"selection\";\n\t\t\tconst globalConfig = data ?? {};\n\t\t\tif (globalConfig.allComponents?.includes(preload.alias)) {\n\t\t\t\ttype = \"all\";\n\t\t\t} else if (globalConfig.launchableComponents?.includes(preload.alias)) {\n\t\t\t\ttype = \"launchable\";\n\t\t\t}\n\t\t\tsetUsageType(type);\n\t\t});\n\t};\n\n\tconst setAlias = (alias: string) => {\n\t\tsetLivePreload({ ...livePreload, alias });\n\t};\n\n\tconst setUrl = (url: string) => {\n\t\tsetLivePreload({ ...livePreload, url });\n\t};\n\n\tuseEffect(() => {\n\t\tsetDisableSubmit(!validatePreload(livePreload));\n\t}, [livePreload]);\n\n\tuseEffect(() => {\n\t\tsetKey(`${Date.now()}.${Math.random()}`);\n\t}, [appList, appNameList, selectedApps]);\n\n\tuseEffect(() => {\n\t\tgetUsageType();\n\t\tgetApps().then(({ apps }) => {\n\t\t\tconst appNames: string[] = [];\n\t\t\tconst appValues: string[] = [];\n\t\t\tconst selectedNames: string[] = [];\n\n\t\t\tapps.forEach((app: AppDefinition) => {\n\t\t\t\tappNames.push(app.name);\n\t\t\t\tappValues.push(app.appId);\n\t\t\t\tif (app.manifest?.component?.preload?.includes(preload?.alias)) {\n\t\t\t\t\tselectedNames.push(app.name);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tsetAppNameValues(appValues);\n\t\t\tsetAppNameList(appNames);\n\t\t\tsetSelectedApps(selectedNames);\n\t\t\tsetAppList(apps);\n\t\t});\n\t\tvalidatePreload(livePreload);\n\t}, []);\n\n\tconst onRadioChange = (e: ChangeEvent<HTMLInputElement>) => {\n\t\tsetUsageType(e.target.value as preloadUsageType);\n\t};\n\n\tconst selectChange = (selectedValues: string[]) => {\n\t\tsetSelectedApps(selectedValues);\n\t};\n\n\tconst updateAppConfigs = async () => {\n\t\tconst promises: Promise<any>[] = appList.map((app) => {\n\t\t\tlet appPreloads = app.manifest?.component?.preload ?? [];\n\t\t\tappPreloads = Array.isArray(appPreloads) ? appPreloads : [appPreloads];\n\t\t\tconst isRenaming = livePreload.alias != preload.alias;\n\t\t\tconst wasPreviouslySelected = appPreloads.includes(preload.alias);\n\t\t\tconst inNewList = selectedApps.includes(app.appId);\n\t\t\tapp.manifest = app.manifest ?? {};\n\t\t\tapp.manifest.component = app.manifest.component ?? {};\n\n\t\t\tif ((!isRenaming && wasPreviouslySelected == inNewList) || (!wasPreviouslySelected && !inNewList)) {\n\t\t\t\t// No change for this app\n\t\t\t\treturn Promise.resolve();\n\t\t\t}\n\n\t\t\tif (wasPreviouslySelected) {\n\t\t\t\t// Remove it from the list\n\t\t\t\tappPreloads = appPreloads.filter((preloadAlias: string) => preloadAlias != preload.alias);\n\t\t\t}\n\n\t\t\tif (inNewList) {\n\t\t\t\tappPreloads.push(livePreload.alias);\n\t\t\t}\n\n\t\t\tapp.manifest.component.preload = appPreloads;\n\t\t\treturn updateApp(app.appId, app);\n\t\t});\n\n\t\treturn Promise.all(promises);\n\t};\n\n\tconst clickSubmit = async () => {\n\t\tconst usage: any = {\n\t\t\tall: usageType == \"all\",\n\t\t\tlaunchable: usageType == \"launchable\",\n\t\t\tapps: selectedApps,\n\t\t};\n\n\t\tif (preload.alias === \"\") {\n\t\t\tawait addPreload(livePreload, usage);\n\t\t} else {\n\t\t\tawait updatePreload(preload.alias, livePreload, usage);\n\t\t}\n\t\tawait updateAppConfigs();\n\t\tcancelFunction();\n\t};\n\n\treturn (\n\t\t<div className=\"preload-edit-container\">\n\t\t\t<h2>{livePreload?.alias ? livePreload.alias : \"Untitled preload\"}</h2>\n\t\t\t<div className=\"app-edit-field\">\n\t\t\t\t<table role=\"presentation\" className=\"preload-edit-table\">\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t<label htmlFor=\"preload-alias\">Name</label>\n\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t<td className=\"edit-field\">\n\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\tid=\"preload-alias\"\n\t\t\t\t\t\t\t\t\tvalue={livePreload?.alias}\n\t\t\t\t\t\t\t\t\tplaceholder=\"UntitledPreload\"\n\t\t\t\t\t\t\t\t\t// onKeyDown=\"\"\n\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\tsetAlias(e.target.value);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t<label htmlFor=\"preload-url\">Web URL</label>\n\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t<td className=\"edit-field\">\n\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\tid=\"preload-url\"\n\t\t\t\t\t\t\t\t\tvalue={livePreload?.url}\n\t\t\t\t\t\t\t\t\t// onKeyDown={submitOnEnter}\n\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\tsetUrl(e.target.value);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th className=\"table-header__top-label\">Load for</th>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<div className=\"load-option\">\n\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\tname=\"preload-usage\"\n\t\t\t\t\t\t\t\t\t\t\tvalue=\"launchable\"\n\t\t\t\t\t\t\t\t\t\t\tchecked={usageType == \"launchable\"}\n\t\t\t\t\t\t\t\t\t\t\tonChange={onRadioChange}\n\t\t\t\t\t\t\t\t\t\t/>{\" \"}\n\t\t\t\t\t\t\t\t\t\tApps launched by users\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div className=\"load-option\">\n\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\tname=\"preload-usage\"\n\t\t\t\t\t\t\t\t\t\t\tvalue=\"all\"\n\t\t\t\t\t\t\t\t\t\t\tchecked={usageType == \"all\"}\n\t\t\t\t\t\t\t\t\t\t\tonChange={onRadioChange}\n\t\t\t\t\t\t\t\t\t\t/>{\" \"}\n\t\t\t\t\t\t\t\t\t\tAll apps\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div className=\"load-option\">\n\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\tname=\"preload-usage\"\n\t\t\t\t\t\t\t\t\t\t\tvalue=\"selection\"\n\t\t\t\t\t\t\t\t\t\t\tchecked={usageType == \"selection\"}\n\t\t\t\t\t\t\t\t\t\t\tonChange={onRadioChange}\n\t\t\t\t\t\t\t\t\t\t/>{\" \"}\n\t\t\t\t\t\t\t\t\t\tSelect apps\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{usageType == \"selection\" && (\n\t\t\t\t\t\t\t\t\t<FinsembleSelect\n\t\t\t\t\t\t\t\t\t\tkey={key}\n\t\t\t\t\t\t\t\t\t\toptions={appNameList}\n\t\t\t\t\t\t\t\t\t\tvalues={appNameValues}\n\t\t\t\t\t\t\t\t\t\tselected={selectedApps}\n\t\t\t\t\t\t\t\t\t\tupdateCallback={selectChange}\n\t\t\t\t\t\t\t\t\t\tshowSearch={true}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t\t<div className=\"preload-edit-actions\">\n\t\t\t\t<div>\n\t\t\t\t\t{preload.alias && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tfashion=\"danger\"\n\t\t\t\t\t\t\ttext=\"Remove preload\"\n\t\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\t\tremovePreload(preload.alias);\n\t\t\t\t\t\t\t\te.preventDefault();\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</div>\n\n\t\t\t\t<div className=\"app-actions-right-wrapper\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tfashion=\"ghost\"\n\t\t\t\t\t\ttext=\"Cancel\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tcancelFunction();\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\t<Button fashion=\"secondary\" text=\"Save\" disabled={disableSubmit} onClick={clickSubmit} />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n"]}
|
|
@@ -11,5 +11,6 @@ export declare type ExportProps = {
|
|
|
11
11
|
publishToCosaicCloud: typeof FSBL.Clients.SmartDesktopClient.prototype.publishToCosaicCloud;
|
|
12
12
|
getPublishProgress: typeof FSBL.Clients.SmartDesktopClient.prototype.getPublishProgress;
|
|
13
13
|
copyProjectFiles: typeof FSBL.Clients.SmartDesktopClient.prototype.copyProjectFiles;
|
|
14
|
+
updateProjectSettings: typeof FSBL.Clients.SmartDesktopClient.prototype.updateProjectSettings;
|
|
14
15
|
};
|
|
15
16
|
export declare const Export: (props: ExportProps) => JSX.Element;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright 2017 - 2020 by ChartIQ, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*/
|
|
5
|
-
import React from "react";
|
|
5
|
+
import React, { useState } from "react";
|
|
6
6
|
import { View } from "./View";
|
|
7
7
|
import { Header } from "../common/Header";
|
|
8
8
|
import { Content } from "./Content";
|
|
@@ -10,24 +10,55 @@ import { ExportCloud } from "./ExportCloud";
|
|
|
10
10
|
import { ExportZip } from "./ExportZip";
|
|
11
11
|
import { Publish } from "./Publish";
|
|
12
12
|
import { ExportDeployInfo } from "./ExportDeployInfo";
|
|
13
|
-
import { useSelector } from "../../store";
|
|
13
|
+
import { useSelector, useDispatch } from "../../store";
|
|
14
|
+
import { SmartDesktopDesignerActions } from "../../actions/smartDesktopDesignerActions";
|
|
14
15
|
import { launchTutorialLink } from "./common/fsbl_functions";
|
|
15
16
|
import "./css/export.css";
|
|
16
17
|
export const Export = (props) => {
|
|
18
|
+
const dispatch = useDispatch();
|
|
17
19
|
const isPublishing = useSelector((store) => store.smartDesktopDesigner.export.isPublishing);
|
|
18
20
|
const deployInfo = useSelector((store) => store.smartDesktopDesigner.export.deployInfo);
|
|
21
|
+
const project = useSelector((state) => state.smartDesktopDesigner.projectInfo);
|
|
22
|
+
const [tmpProjectName, setTmpProjectName] = useState((project === null || project === void 0 ? void 0 : project.name) === "default" ? "" : project === null || project === void 0 ? void 0 : project.name);
|
|
23
|
+
const isProjectNameValid = FSBL.Clients.SmartDesktopClient.checkValidProjectName(tmpProjectName);
|
|
24
|
+
const setProject = (value) => {
|
|
25
|
+
dispatch(SmartDesktopDesignerActions.set_project_info(value));
|
|
26
|
+
};
|
|
27
|
+
const onSaveProjectName = (name) => {
|
|
28
|
+
props.updateProjectSettings(Object.assign(Object.assign({}, project), { name: name })).then(({ err }) => {
|
|
29
|
+
if (err) {
|
|
30
|
+
FSBL.Clients.Logger.system.error(`ERROR updateProjectSettings: ${JSON.stringify(err)}`);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
setProject(Object.assign(Object.assign({}, project), { name }));
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
};
|
|
19
37
|
return (React.createElement(View, null,
|
|
20
38
|
React.createElement(Header, { helpFunction: () => {
|
|
21
|
-
launchTutorialLink("
|
|
22
|
-
} }, "Publish"),
|
|
23
|
-
React.createElement(Content, null, isPublishing ? (React.createElement(Publish, Object.assign({}, props))) : (React.createElement("div",
|
|
39
|
+
launchTutorialLink("SDD-10-Finish");
|
|
40
|
+
} }, "Publish project"),
|
|
41
|
+
React.createElement(Content, null, isPublishing ? (React.createElement(Publish, Object.assign({}, props))) : (React.createElement("div", { className: "export-block" },
|
|
42
|
+
React.createElement("h2", null, "Desktop Project"),
|
|
43
|
+
React.createElement("div", { className: "export-project-name" },
|
|
44
|
+
React.createElement("label", { htmlFor: "projectName" }, "Project name"),
|
|
45
|
+
React.createElement("input", { type: "text", className: "project-name-field", id: "project-name", name: "project-name", placeholder: "Untitled", "aria-invalid": !isProjectNameValid, value: tmpProjectName, style: { fontSize: 14 }, onInput: (e) => {
|
|
46
|
+
setTmpProjectName(e.target.value);
|
|
47
|
+
}, onKeyDown: (e) => {
|
|
48
|
+
if (e.key === "Enter") {
|
|
49
|
+
e.currentTarget.blur();
|
|
50
|
+
}
|
|
51
|
+
}, onBlur: () => {
|
|
52
|
+
if (isProjectNameValid) {
|
|
53
|
+
onSaveProjectName(tmpProjectName);
|
|
54
|
+
}
|
|
55
|
+
} })),
|
|
24
56
|
React.createElement("div", { className: "export-methods" },
|
|
25
|
-
React.createElement(ExportCloud, Object.assign({}, props)),
|
|
26
|
-
React.createElement(ExportZip, Object.assign({}, props))),
|
|
57
|
+
React.createElement(ExportCloud, Object.assign({}, props, { valid: isProjectNameValid })),
|
|
58
|
+
React.createElement(ExportZip, Object.assign({}, props, { valid: isProjectNameValid }))),
|
|
27
59
|
deployInfo && (React.createElement("div", { className: "deployInfoContainer" },
|
|
28
|
-
React.createElement("h2", null, "Published Project"),
|
|
29
60
|
React.createElement("div", null,
|
|
30
|
-
React.createElement("p", null, "
|
|
61
|
+
React.createElement("p", null, "Project installer link:"),
|
|
31
62
|
React.createElement(ExportDeployInfo, null)))))))));
|
|
32
63
|
};
|
|
33
64
|
//# sourceMappingURL=Export.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Export.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/Export.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Export.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/Export.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AAGxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,kBAAkB,CAAC;AAY1B,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAAkB,EAAE,EAAE;IAC5C,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,MAAM,YAAY,GAAG,WAAW,CAAC,CAAC,KAAgB,EAAE,EAAE,CAAC,KAAK,CAAC,oBAAoB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IACvG,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,KAAgB,EAAE,EAAE,CAAC,KAAK,CAAC,oBAAoB,CAAC,MAAM,CAAC,UAAU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AAK,EAAI,CACtB,CAAC,CAAC,CAAC,CACH,6BAAK,SAAS,EAAC,cAAc;YAC5B,kDAAwB;YACxB,6BAAK,SAAS,EAAC,qBAAqB;gBACnC,+BAAO,OAAO,EAAC,aAAa,mBAAqB;gBACjD,+BACC,IAAI,EAAC,MAAM,EACX,SAAS,EAAC,oBAAoB,EAC9B,EAAE,EAAC,cAAc,EACjB,IAAI,EAAC,cAAc,EACnB,WAAW,EAAC,UAAU,kBACR,CAAC,kBAAkB,EACjC,KAAK,EAAE,cAAc,EACrB,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,EACvB,OAAO,EAAE,CAAC,CAAsC,EAAE,EAAE;wBACnD,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;oBACnC,CAAC,EACD,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;wBAChB,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,EAAE;4BACtB,CAAC,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;yBACvB;oBACF,CAAC,EACD,MAAM,EAAE,GAAG,EAAE;wBACZ,IAAI,kBAAkB,EAAE;4BACvB,iBAAiB,CAAC,cAAc,CAAC,CAAC;yBAClC;oBACF,CAAC,GACA,CACG;YACN,6BAAK,SAAS,EAAC,gBAAgB;gBAC9B,oBAAC,WAAW,oBAAK,KAAK,IAAE,KAAK,EAAE,kBAAkB,IAAI;gBACrD,oBAAC,SAAS,oBAAK,KAAK,IAAE,KAAK,EAAE,kBAAkB,IAAI,CAC9C;YACL,UAAU,IAAI,CACd,6BAAK,SAAS,EAAC,qBAAqB;gBACnC;oBACC,yDAA8B;oBAC9B,oBAAC,gBAAgB,OAAG,CACf,CACD,CACN,CACI,CACN,CACQ,CACJ,CACP,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React, { useState } from \"react\";\nimport { View } from \"./View\";\nimport { Header } from \"../common/Header\";\nimport { Content } from \"./Content\";\nimport { ExportCloud } from \"./ExportCloud\";\nimport { ExportZip } from \"./ExportZip\";\nimport { Publish } from \"./Publish\";\nimport { ExportDeployInfo } from \"./ExportDeployInfo\";\nimport { useSelector, useDispatch } from \"../../store\";\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\nimport { ProjectSaveData } from \"../../types/smartDesktopDesignerTypes\";\nimport { RootState } from \"../../reducers/rootReducer\";\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\n\nimport \"./css/export.css\";\n\nexport type ExportProps = {\n\tprogressCheckInterval: number;\n\tgetProjectConfig: typeof FSBL.Clients.SmartDesktopClient.prototype.projectConfig;\n\tcreateProjectZip: typeof FSBL.Clients.SmartDesktopClient.prototype.createProjectZip;\n\tpublishToCosaicCloud: typeof FSBL.Clients.SmartDesktopClient.prototype.publishToCosaicCloud;\n\tgetPublishProgress: typeof FSBL.Clients.SmartDesktopClient.prototype.getPublishProgress;\n\tcopyProjectFiles: typeof FSBL.Clients.SmartDesktopClient.prototype.copyProjectFiles;\n\tupdateProjectSettings: typeof FSBL.Clients.SmartDesktopClient.prototype.updateProjectSettings;\n};\n\nexport const Export = (props: ExportProps) => {\n\tconst dispatch = useDispatch();\n\n\tconst isPublishing = useSelector((store: RootState) => store.smartDesktopDesigner.export.isPublishing);\n\tconst deployInfo = useSelector((store: RootState) => store.smartDesktopDesigner.export.deployInfo);\n\tconst project = useSelector((state: RootState) => state.smartDesktopDesigner.projectInfo);\n\tconst [tmpProjectName, setTmpProjectName] = useState(project?.name === \"default\" ? \"\" : project?.name);\n\tconst isProjectNameValid = FSBL.Clients.SmartDesktopClient.checkValidProjectName(tmpProjectName);\n\tconst setProject = (value: ProjectSaveData) => {\n\t\tdispatch(SmartDesktopDesignerActions.set_project_info(value));\n\t};\n\n\tconst onSaveProjectName = (name: string) => {\n\t\tprops.updateProjectSettings({ ...project, name: name }).then(({ err }) => {\n\t\t\tif (err) {\n\t\t\t\tFSBL.Clients.Logger.system.error(`ERROR updateProjectSettings: ${JSON.stringify(err)}`);\n\t\t\t} else {\n\t\t\t\tsetProject({\n\t\t\t\t\t...project,\n\t\t\t\t\tname,\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t};\n\n\treturn (\n\t\t<View>\n\t\t\t<Header\n\t\t\t\thelpFunction={() => {\n\t\t\t\t\tlaunchTutorialLink(\"SDD-10-Finish\");\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\tPublish project\n\t\t\t</Header>\n\n\t\t\t<Content>\n\t\t\t\t{isPublishing ? (\n\t\t\t\t\t<Publish {...props} />\n\t\t\t\t) : (\n\t\t\t\t\t<div className=\"export-block\">\n\t\t\t\t\t\t<h2>Desktop Project</h2>\n\t\t\t\t\t\t<div className=\"export-project-name\">\n\t\t\t\t\t\t\t<label htmlFor=\"projectName\">Project name</label>\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\tclassName=\"project-name-field\"\n\t\t\t\t\t\t\t\tid=\"project-name\"\n\t\t\t\t\t\t\t\tname=\"project-name\"\n\t\t\t\t\t\t\t\tplaceholder=\"Untitled\"\n\t\t\t\t\t\t\t\taria-invalid={!isProjectNameValid}\n\t\t\t\t\t\t\t\tvalue={tmpProjectName}\n\t\t\t\t\t\t\t\tstyle={{ fontSize: 14 }}\n\t\t\t\t\t\t\t\tonInput={(e: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\t\t\t\t\t\t\tsetTmpProjectName(e.target.value);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\t\t\t\te.currentTarget.blur();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tonBlur={() => {\n\t\t\t\t\t\t\t\t\tif (isProjectNameValid) {\n\t\t\t\t\t\t\t\t\t\tonSaveProjectName(tmpProjectName);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"export-methods\">\n\t\t\t\t\t\t\t<ExportCloud {...props} valid={isProjectNameValid} />\n\t\t\t\t\t\t\t<ExportZip {...props} valid={isProjectNameValid} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{deployInfo && (\n\t\t\t\t\t\t\t<div className=\"deployInfoContainer\">\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t<p>Project installer link:</p>\n\t\t\t\t\t\t\t\t\t<ExportDeployInfo />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Content>\n\t\t</View>\n\t);\n};\n"]}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ExportProps } from "./Export";
|
|
3
|
-
export declare type ExportCloudProps = ExportProps
|
|
3
|
+
export declare type ExportCloudProps = ExportProps & {
|
|
4
|
+
valid: boolean;
|
|
5
|
+
};
|
|
4
6
|
export declare const ExportCloud: (props: ExportCloudProps) => JSX.Element;
|
|
@@ -17,15 +17,13 @@ export const ExportCloud = (props) => {
|
|
|
17
17
|
};
|
|
18
18
|
getProjectConfig();
|
|
19
19
|
}, []);
|
|
20
|
-
return (React.createElement("div", { className: "export-method" },
|
|
20
|
+
return (React.createElement("div", { className: "export-method package-project" },
|
|
21
21
|
deployInfo ? (React.createElement("div", null,
|
|
22
|
-
React.createElement("
|
|
23
|
-
React.createElement("p", null, "You can continue
|
|
24
|
-
React.createElement("h2", null, "Publish your project"),
|
|
25
|
-
React.createElement("p", null, "Upload your smart desktop to Cosaic's cloud service to make it available to your team. After you publish, you can make changes and push updates to your team."))),
|
|
22
|
+
React.createElement("p", null, "Publish your project to share it with your users. Click Publish to create a project installer. Please be patient, it can take up to 20 minutes."))) : (React.createElement("div", null,
|
|
23
|
+
React.createElement("p", null, "You can continue working on your desktop project after you publish it. To update the project, republish it. Users will see the changes when they restart their desktop."))),
|
|
26
24
|
React.createElement(ProjectErrors, { errors: projectErrors }),
|
|
27
25
|
React.createElement("div", { className: "export-method-actions" },
|
|
28
|
-
React.createElement(Button, { disabled: projectErrors.length > 0, fashion: "secondary", text: "Publish", onClick: () => {
|
|
26
|
+
React.createElement(Button, { disabled: projectErrors.length > 0 || !props.valid, fashion: "secondary", text: "Publish", onClick: () => {
|
|
29
27
|
dispatch(SmartDesktopDesignerActions.set_is_publishing(true));
|
|
30
28
|
props
|
|
31
29
|
.publishToCosaicCloud()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExportCloud.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/ExportCloud.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AAExF,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"ExportCloud.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/ExportCloud.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AAExF,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CA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AAK;yBACH,oBAAoB,EAAE;yBACtB,IAAI,CAAC,CAAC,iBAAiB,EAAE,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC,CAAC;yBACrG,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBACpF,CAAC,GACA,CACG,CACD,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect } from \"react\";\nimport { Button } from \"../common/Button\";\nimport { useDispatch, useSelector } from \"../../store\";\nimport { RootState } from \"../../reducers/rootReducer\";\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\nimport { ExportProps } from \"./Export\";\nimport { ProjectErrors } from \"./ProjectErrors\";\n\nexport type ExportCloudProps = ExportProps & {\n\tvalid: boolean;\n};\n\nexport const ExportCloud = (props: ExportCloudProps) => {\n\tconst dispatch = useDispatch();\n\tconst deployInfo = useSelector((store: RootState) => store.smartDesktopDesigner.export.deployInfo);\n\tconst projectErrors = useSelector((store: RootState) => store.smartDesktopDesigner.errors);\n\n\t/**\n\t * This will run once. We'll check to see if there's a current deployInfo for our\n\t * project, in other words has it already been published.\n\t */\n\tuseEffect(() => {\n\t\tconst getProjectConfig = async () => {\n\t\t\tconst projectConfig = await props.getProjectConfig();\n\t\t\tconst currentDeployInfo = projectConfig?.deployInfo;\n\n\t\t\tif (currentDeployInfo) {\n\t\t\t\tdispatch(SmartDesktopDesignerActions.set_deploy_info(currentDeployInfo));\n\t\t\t}\n\t\t};\n\t\tgetProjectConfig();\n\t}, []);\n\n\treturn (\n\t\t<div className=\"export-method package-project\">\n\t\t\t{deployInfo ? (\n\t\t\t\t<div>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tPublish your project to share it with your users. Click Publish to create a project installer. Please be\n\t\t\t\t\t\tpatient, it can take up to 20 minutes.\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t) : (\n\t\t\t\t<div>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tYou can continue working on your desktop project after you publish it. To update the project, republish it.\n\t\t\t\t\t\tUsers will see the changes when they restart their desktop.\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t)}\n\n\t\t\t<ProjectErrors errors={projectErrors}></ProjectErrors>\n\n\t\t\t<div className=\"export-method-actions\">\n\t\t\t\t<Button\n\t\t\t\t\tdisabled={projectErrors.length > 0 || !props.valid}\n\t\t\t\t\tfashion=\"secondary\"\n\t\t\t\t\ttext=\"Publish\"\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tdispatch(SmartDesktopDesignerActions.set_is_publishing(true));\n\t\t\t\t\t\tprops\n\t\t\t\t\t\t\t.publishToCosaicCloud()\n\t\t\t\t\t\t\t.then((currentDeployInfo) => dispatch(SmartDesktopDesignerActions.set_deploy_info(currentDeployInfo)))\n\t\t\t\t\t\t\t.catch((error) => dispatch(SmartDesktopDesignerActions.set_publish_error(error)));\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n"]}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ExportProps } from "./Export";
|
|
3
|
-
export declare type ExportZipProps = ExportProps
|
|
3
|
+
export declare type ExportZipProps = ExportProps & {
|
|
4
|
+
valid: boolean;
|
|
5
|
+
};
|
|
4
6
|
export declare const ExportZip: (props: ExportZipProps) => JSX.Element;
|
|
@@ -2,6 +2,7 @@ import React, { useState } from "react";
|
|
|
2
2
|
import { useSelector } from "../../store";
|
|
3
3
|
import { FinsembleIcon } from "../common/FinsembleIcon";
|
|
4
4
|
import { Button } from "../common/Button";
|
|
5
|
+
import { Checkbox } from "../common/Checkbox";
|
|
5
6
|
export const ExportZip = (props) => {
|
|
6
7
|
const projectSettings = useSelector((store) => store.smartDesktopDesigner.projectInfo);
|
|
7
8
|
const projectErrors = useSelector((store) => store.smartDesktopDesigner.errors);
|
|
@@ -9,12 +10,16 @@ export const ExportZip = (props) => {
|
|
|
9
10
|
const [lastExportCount, setLastExportCount] = useState(0);
|
|
10
11
|
const [lastExportTime, setLastExportTime] = useState(null);
|
|
11
12
|
const [lastExportError, setLastExportError] = useState(null);
|
|
13
|
+
const [iUnderstand, setIUnderstand] = useState(false);
|
|
12
14
|
return (React.createElement("div", { className: "export-method" },
|
|
13
15
|
React.createElement("div", null,
|
|
14
|
-
React.createElement("h2", null, "
|
|
15
|
-
React.createElement("p", null, "
|
|
16
|
+
React.createElement("h2", null, "Package project"),
|
|
17
|
+
React.createElement("p", null, "Many Finsemble features can't be configured by using SDD. Share your project with developers or IT to take it further."),
|
|
18
|
+
React.createElement(Checkbox, { label: "I understand that packaging a project is a one-time only operation. A packaged .zip file can\u2019t be imported back into SDD.", checked: iUnderstand, onClick: () => {
|
|
19
|
+
setIUnderstand(!iUnderstand);
|
|
20
|
+
} })),
|
|
16
21
|
React.createElement("div", { className: "export-method-actions" },
|
|
17
|
-
!isCopying ? (React.createElement(Button, { className: "export-method-button", disabled: projectErrors.length > 0, fashion: "secondary", text: "
|
|
22
|
+
!isCopying ? (React.createElement(Button, { className: "export-method-button", disabled: projectErrors.length > 0 || !props.valid || !iUnderstand, fashion: "secondary", text: "Package", buttonAttributes: { "data-target-upload-path": "" }, onClick: (e) => {
|
|
18
23
|
setIsCopying(true);
|
|
19
24
|
setLastExportError(null);
|
|
20
25
|
props
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExportZip.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/ExportZip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,MAA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,uBAAuB,EAAC,IAAI,EAAC,OAAO,GAAiB;;gBACpE,eAAe;;gBAAY,cAAc,CAC7C,CACP;YACA,eAAe,KAAK,IAAI,IAAI,8BAAM,SAAS,EAAC,mBAAmB,IAAE,eAAe,CAAQ,CAEpF,CACD,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState } from \"react\";\nimport { RootState } from \"../../reducers/rootReducer\";\nimport { useSelector } from \"../../store\";\nimport { FinsembleIcon } from \"../common/FinsembleIcon\";\nimport { ExportProps } from \"./Export\";\nimport { Button } from \"../common/Button\";\nimport { Checkbox } from \"../common/Checkbox\";\n\nexport type ExportZipProps = ExportProps & {\n\tvalid: boolean;\n};\n\nexport const ExportZip = (props: ExportZipProps) => {\n\tconst projectSettings = useSelector((store: RootState) => store.smartDesktopDesigner.projectInfo);\n\tconst projectErrors = useSelector((store: RootState) => store.smartDesktopDesigner.errors);\n\n\tconst [isCopying, setIsCopying] = useState(false);\n\tconst [lastExportCount, setLastExportCount] = useState<number>(0);\n\tconst [lastExportTime, setLastExportTime] = useState<null | string>(null);\n\tconst [lastExportError, setLastExportError] = useState<null | string>(null);\n\tconst [iUnderstand, setIUnderstand] = useState(false);\n\n\treturn (\n\t\t<div className=\"export-method\">\n\t\t\t<div>\n\t\t\t\t<h2>Package project</h2>\n\n\t\t\t\t<p>\n\t\t\t\t\tMany Finsemble features can't be configured by using SDD. Share your project with developers or IT to\n\t\t\t\t\ttake it further.\n\t\t\t\t</p>\n\n\t\t\t\t<Checkbox\n\t\t\t\t\tlabel=\"I understand that packaging a project is a one-time only operation. A packaged .zip file can’t be imported back into SDD.\"\n\t\t\t\t\tchecked={iUnderstand}\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tsetIUnderstand(!iUnderstand);\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t</div>\n\n\t\t\t<div className=\"export-method-actions\">\n\t\t\t\t{!isCopying ? (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"export-method-button\"\n\t\t\t\t\t\tdisabled={projectErrors.length > 0 || !props.valid || !iUnderstand}\n\t\t\t\t\t\tfashion=\"secondary\"\n\t\t\t\t\t\ttext=\"Package\"\n\t\t\t\t\t\tbuttonAttributes={{ \"data-target-upload-path\": \"\" }}\n\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\tsetIsCopying(true);\n\t\t\t\t\t\t\tsetLastExportError(null);\n\n\t\t\t\t\t\t\tprops\n\t\t\t\t\t\t\t\t.copyProjectFiles(projectSettings.name, e.currentTarget.dataset.targetUploadPath)\n\t\t\t\t\t\t\t\t.catch((error) => {\n\t\t\t\t\t\t\t\t\tsetLastExportError(error);\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.then((files) => {\n\t\t\t\t\t\t\t\t\tsetLastExportTime(new Date().toLocaleTimeString());\n\n\t\t\t\t\t\t\t\t\tif (files) {\n\t\t\t\t\t\t\t\t\t\tsetLastExportCount(files.length);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.finally(() => {\n\t\t\t\t\t\t\t\t\tsetIsCopying(false);\n\t\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) : (\n\t\t\t\t\t<div>Exporting to seed project...</div>\n\t\t\t\t)}\n\t\t\t\t{lastExportTime !== null && lastExportCount > 0 && (\n\t\t\t\t\t<span className=\"last-export-time\">\n\t\t\t\t\t\t<FinsembleIcon className=\"last-export-time-icon\" icon=\"check\"></FinsembleIcon>\n\t\t\t\t\t\tExported {lastExportCount} files at {lastExportTime}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t{lastExportError !== null && <span className=\"last-export-error\">{lastExportError}</span>}\n\t\t\t\t{/* <button type=\"submit\">Share to Github</button> */}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n"]}
|
|
@@ -5,35 +5,21 @@
|
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { useDispatch } from "../../store";
|
|
7
7
|
import { Header } from "../common/Header";
|
|
8
|
-
import { ButtonTile } from "../common/ButtonTile";
|
|
9
8
|
import { View } from "./View";
|
|
10
9
|
import { Content } from "./Content";
|
|
11
10
|
import { launchTutorialLink } from "./common/fsbl_functions";
|
|
12
|
-
import
|
|
11
|
+
import "./css/getting-started.css";
|
|
13
12
|
export const GettingStarted = () => {
|
|
14
13
|
const dispatch = useDispatch();
|
|
15
|
-
return (React.createElement(
|
|
16
|
-
React.createElement(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
React.createElement(
|
|
22
|
-
|
|
23
|
-
React.createElement(
|
|
24
|
-
|
|
25
|
-
dispatch(SmartDesktopDesignerActions.change_view("applications"));
|
|
26
|
-
dispatch(SmartDesktopDesignerActions.new_app(new Date().getTime().toString()));
|
|
27
|
-
dispatch(SmartDesktopDesignerActions.set_is_getting_started(true));
|
|
28
|
-
} }),
|
|
29
|
-
React.createElement(ButtonTile, { className: "icon-theme", icon: "paint-roller", text: "Edit theme", onClick: () => {
|
|
30
|
-
dispatch(SmartDesktopDesignerActions.change_view("themes"));
|
|
31
|
-
} }),
|
|
32
|
-
React.createElement(ButtonTile, { className: "icon-publish", icon: "upload", text: "Publish desktop", onClick: () => {
|
|
33
|
-
dispatch(SmartDesktopDesignerActions.change_view("export"));
|
|
34
|
-
} }),
|
|
35
|
-
React.createElement(ButtonTile, { className: "icon-authentication", icon: "key", text: "Set up authentication", onClick: () => {
|
|
36
|
-
dispatch(SmartDesktopDesignerActions.change_view("authentication"));
|
|
37
|
-
} })))));
|
|
14
|
+
return (React.createElement(React.Fragment, null,
|
|
15
|
+
React.createElement("div", { className: "getting-started-gray-back" }),
|
|
16
|
+
React.createElement(View, null,
|
|
17
|
+
React.createElement(Header, { helpFunction: () => {
|
|
18
|
+
launchTutorialLink("SDD-01-Welcome");
|
|
19
|
+
} }, "Your Smart Desktop Designer"),
|
|
20
|
+
React.createElement(Content, null,
|
|
21
|
+
React.createElement("p", null, "Design a desktop for your users. Add, manage, and remove apps, configure the desktop look to follow your branding, and arrange workspaces. When you\u2019re done, you can publish your desktop to share with others or package it for further development."),
|
|
22
|
+
React.createElement("div", { className: "hero" },
|
|
23
|
+
React.createElement("img", { src: "/build/assets/img/finsemble-display.png", width: "436px", height: "354px" }))))));
|
|
38
24
|
};
|
|
39
25
|
//# sourceMappingURL=GettingStarted.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GettingStarted.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/GettingStarted.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"GettingStarted.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/GettingStarted.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAI7D,OAAO,2BAA2B,CAAC;AAInC,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE;IAClC,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,OAAO,CACN;QACC,6BAAK,SAAS,EAAC,2BAA2B,GAAG;QAC7C,oBAAC,IAAI;YACJ,oBAAC,MAAM,IACN,YAAY,EAAE,GAAG,EAAE;oBAClB,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;gBACtC,CAAC,kCAGO;YAET,oBAAC,OAAO;gBACP,4RAII;gBAEJ,6BAAK,SAAS,EAAC,MAAM;oBACpB,6BAAK,GAAG,EAAC,yCAAyC,EAAC,KAAK,EAAC,OAAO,EAAC,MAAM,EAAC,OAAO,GAAG,CAC7E,CACG,CACJ,CACL,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React from \"react\";\nimport { useDispatch } from \"../../store\";\nimport { Header } from \"../common/Header\";\nimport { ButtonTile } from \"../common/ButtonTile\";\nimport { View } from \"./View\";\nimport { Content } from \"./Content\";\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\n\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\n\nimport \"./css/getting-started.css\";\n\nexport type GettingStartedProps = {};\n\nexport const GettingStarted = () => {\n\tconst dispatch = useDispatch();\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\"getting-started-gray-back\" />\n\t\t\t<View>\n\t\t\t\t<Header\n\t\t\t\t\thelpFunction={() => {\n\t\t\t\t\t\tlaunchTutorialLink(\"SDD-01-Welcome\");\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tYour Smart Desktop Designer\n\t\t\t\t</Header>\n\n\t\t\t\t<Content>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tDesign a desktop for your users. Add, manage, and remove apps, configure the desktop look to follow your\n\t\t\t\t\t\tbranding, and arrange workspaces. When you’re done, you can publish your desktop to share with others or\n\t\t\t\t\t\tpackage it for further development.\n\t\t\t\t\t</p>\n\n\t\t\t\t\t<div className=\"hero\">\n\t\t\t\t\t\t<img src=\"/build/assets/img/finsemble-display.png\" width=\"436px\" height=\"354px\" />\n\t\t\t\t\t</div>\n\t\t\t\t</Content>\n\t\t\t</View>\n\t\t</>\n\t);\n};\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2017 - 2020 by ChartIQ, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*/
|
|
5
|
+
import { ReactNode } from "react";
|
|
6
|
+
import "../common/css/application-list.css";
|
|
7
|
+
export declare type ItemListProps = {
|
|
8
|
+
items: any[];
|
|
9
|
+
getItemId?: (item: any) => string;
|
|
10
|
+
getItemDisplayName?: (item: any) => string;
|
|
11
|
+
clickItem: (s: string) => void;
|
|
12
|
+
deleteItem: (s: string) => void;
|
|
13
|
+
editItem?: (s: string) => void;
|
|
14
|
+
emptyListMessage?: ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const ItemList: ({ items, clickItem, deleteItem, editItem, getItemId, getItemDisplayName, emptyListMessage, className, }: ItemListProps) => JSX.Element;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2017 - 2020 by ChartIQ, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { ButtonIcon } from "../common/ButtonIcon";
|
|
7
|
+
import "../common/css/application-list.css";
|
|
8
|
+
export const ItemList = ({ items, clickItem, deleteItem, editItem, getItemId = (item) => item.appId, getItemDisplayName = (item) => { var _a, _b; return ((_b = (_a = item.manifest) === null || _a === void 0 ? void 0 : _a.component) === null || _b === void 0 ? void 0 : _b.displayName) || item.name || item.appId; }, emptyListMessage = (React.createElement(React.Fragment, null,
|
|
9
|
+
"There\u2019s nothing here!",
|
|
10
|
+
React.createElement("br", null),
|
|
11
|
+
"Click the Add button to add apps.")), className = "", }) => (React.createElement(React.Fragment, null, items.length < 1 ? (React.createElement("div", { className: `app-list-empty ${className}` }, emptyListMessage)) : (React.createElement("div", { className: `app-list-table ${className}`, role: "list" }, items
|
|
12
|
+
.sort((a, b) => {
|
|
13
|
+
if (getItemDisplayName(a) > getItemDisplayName(b)) {
|
|
14
|
+
return 1;
|
|
15
|
+
}
|
|
16
|
+
else if (getItemDisplayName(b) > getItemDisplayName(a)) {
|
|
17
|
+
return -1;
|
|
18
|
+
}
|
|
19
|
+
return 0;
|
|
20
|
+
})
|
|
21
|
+
.map((item) => {
|
|
22
|
+
const appID = getItemId(item);
|
|
23
|
+
const openItemEventHandler = (e) => {
|
|
24
|
+
clickItem(appID);
|
|
25
|
+
e.preventDefault();
|
|
26
|
+
};
|
|
27
|
+
const editItemEventHandler = (e) => {
|
|
28
|
+
e.stopPropagation();
|
|
29
|
+
editItem === null || editItem === void 0 ? void 0 : editItem(appID);
|
|
30
|
+
e.preventDefault();
|
|
31
|
+
};
|
|
32
|
+
const deleteItemEventHandler = (e) => {
|
|
33
|
+
e.stopPropagation();
|
|
34
|
+
deleteItem(appID);
|
|
35
|
+
};
|
|
36
|
+
const keyDownHandler = (e) => {
|
|
37
|
+
switch (e.key) {
|
|
38
|
+
case "Enter":
|
|
39
|
+
case " ": {
|
|
40
|
+
openItemEventHandler(e);
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
case "Delete": {
|
|
44
|
+
deleteItemEventHandler(e);
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
default: {
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const displayName = getItemDisplayName(item);
|
|
52
|
+
return (React.createElement("div", { key: appID, id: `app-list-row-${appID}`, className: "app-list-row", role: "listitem", tabIndex: 0, onClick: openItemEventHandler, onKeyDown: keyDownHandler },
|
|
53
|
+
React.createElement("span", { className: "app-name" }, displayName),
|
|
54
|
+
React.createElement("div", { className: "icon-bar" },
|
|
55
|
+
editItem && (React.createElement(ButtonIcon, { className: "icon-edit", icon: "pencil", text: "Edit", onClick: editItemEventHandler })),
|
|
56
|
+
React.createElement(ButtonIcon, { tabIndex: -1, className: "icon-delete", icon: "trash", text: "Delete", onClick: deleteItemEventHandler }))));
|
|
57
|
+
})))));
|
|
58
|
+
//# sourceMappingURL=ItemList.js.map
|