@finsemble/finsemble-ui 6.3.1 → 6.3.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/README.md +28 -28
- package/package.json +1 -1
- package/react/actions/favoriteActions.js.map +1 -1
- package/react/actions/linkerActions.js.map +1 -1
- package/react/actions/menuActions.js.map +1 -1
- package/react/actions/rootActions.js.map +1 -1
- package/react/actions/searchActions.js.map +1 -1
- package/react/actions/smartDesktopDesignerActions.js.map +1 -1
- package/react/actions/toolbarActions.js.map +1 -1
- package/react/actions/workspaceActions.js.map +1 -1
- package/react/assets/css/advancedAppLauncher.css +636 -636
- package/react/assets/css/appCatalog.css +1069 -1069
- package/react/assets/css/authentication.css +78 -78
- package/react/assets/css/button.css +220 -220
- package/react/assets/css/core/formElements.css +23 -23
- package/react/assets/css/core/icons.css +69 -69
- package/react/assets/css/core/notifications.css +75 -75
- package/react/assets/css/core/windowFrame.css +36 -36
- package/react/assets/css/dashbar.css +78 -78
- package/react/assets/css/defaultTheme.css +356 -356
- package/react/assets/css/dialogs.css +158 -158
- package/react/assets/css/favorites.css +101 -101
- package/react/assets/css/finsemble.css +38 -38
- package/react/assets/css/focus.css +4 -4
- package/react/assets/css/font-finance.css +385 -385
- package/react/assets/css/fonts/Open_Sans/LICENSE.txt +202 -202
- package/react/assets/css/fonts/Open_Sans/OpenSans-Definition.css +118 -118
- package/react/assets/css/fonts/font-finance.svg +124 -124
- package/react/assets/css/fonts/icons-reference.html +1174 -1174
- package/react/assets/css/linkerWindow.css +124 -124
- package/react/assets/css/menus.css +195 -195
- package/react/assets/css/notificationsCenter.css +597 -597
- package/react/assets/css/processMonitor.css +213 -213
- package/react/assets/css/search.css +128 -128
- package/react/assets/css/shared/animations.css +99 -99
- package/react/assets/css/tags.css +136 -136
- package/react/assets/css/toolbar.css +413 -413
- package/react/assets/css/userPreferences.css +568 -568
- package/react/assets/css/windowTitleBar.css +652 -652
- package/react/assets/icons/check-square.svg +5 -5
- package/react/assets/icons/check.svg +3 -3
- package/react/assets/icons/chevron-left.svg +3 -3
- package/react/assets/icons/chevron-right.svg +3 -3
- package/react/assets/icons/copy.svg +10 -10
- package/react/assets/icons/exclamation-circle.svg +4 -4
- package/react/assets/icons/external-link.svg +12 -12
- package/react/assets/icons/flag.svg +10 -10
- package/react/assets/icons/folder.svg +3 -3
- package/react/assets/icons/font.svg +3 -3
- package/react/assets/icons/globe.svg +3 -3
- package/react/assets/icons/hdd.svg +9 -9
- package/react/assets/icons/key.svg +10 -10
- package/react/assets/icons/life-ring.svg +3 -3
- package/react/assets/icons/lock.svg +5 -5
- package/react/assets/icons/magic.svg +15 -15
- package/react/assets/icons/moon.svg +10 -10
- package/react/assets/icons/paint-roller.svg +3 -3
- package/react/assets/icons/pencil.svg +10 -10
- package/react/assets/icons/plus.svg +3 -3
- package/react/assets/icons/question-circle.svg +5 -5
- package/react/assets/icons/search.svg +3 -3
- package/react/assets/icons/sun.svg +9 -9
- package/react/assets/icons/times.svg +3 -3
- package/react/assets/icons/toggle-off.svg +6 -6
- package/react/assets/icons/toggle-on.svg +6 -6
- package/react/assets/icons/tools.svg +3 -3
- package/react/assets/icons/trash.svg +12 -12
- package/react/assets/icons/upload.svg +10 -10
- package/react/assets/icons/window.svg +3 -3
- package/react/componentTemplateGenerator.js +85 -85
- package/react/componentTemplateGenerator.js.map +1 -1
- package/react/components/FinsembleProvider.js.map +1 -1
- package/react/components/appCatalog/AppCatalog.js.map +1 -1
- package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
- package/react/components/appCatalog/components/AppCard.js.map +1 -1
- package/react/components/appCatalog/components/AppList.js.map +1 -1
- package/react/components/appCatalog/components/AppResults.js.map +1 -1
- package/react/components/appCatalog/components/Carousel.js.map +1 -1
- package/react/components/appCatalog/components/EmptyResults.js.map +1 -1
- package/react/components/appCatalog/components/Hero.js.map +1 -1
- package/react/components/appCatalog/components/Home.js.map +1 -1
- package/react/components/appCatalog/components/SearchBar.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppDescription.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppDevNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppShowcase.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/Header.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/ImageCarousel.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/Modal.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/ReleaseNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/SupportNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/VersionNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/defaults.js.map +1 -1
- package/react/components/appCatalog/components/Tag.js.map +1 -1
- package/react/components/appCatalog/components/Toast.js.map +1 -1
- package/react/components/appCatalog/components/helpers.js.map +1 -1
- package/react/components/appCatalog/index.js.map +1 -1
- package/react/components/appCatalog/modules/AppDirectory.js.map +1 -1
- package/react/components/appCatalog/modules/FDC3.js.map +1 -1
- package/react/components/appCatalog/stores/appStore.js.map +1 -1
- package/react/components/appCatalog/stores/storeActions.js.map +1 -1
- package/react/components/common/Button.js.map +1 -1
- package/react/components/common/ButtonIcon.js.map +1 -1
- package/react/components/common/ButtonRow.js.map +1 -1
- package/react/components/common/ButtonTile.js.map +1 -1
- package/react/components/common/Checkbox.js.map +1 -1
- package/react/components/common/ColorPicker.js.map +1 -1
- package/react/components/common/DropZone.js.map +1 -1
- package/react/components/common/DropdownButton.js.map +1 -1
- package/react/components/common/FileInput.js.map +1 -1
- package/react/components/common/FinsembleIcon.js.map +1 -1
- package/react/components/common/FinsembleSelect.js.map +1 -1
- package/react/components/common/FinsembleToggle.js.map +1 -1
- package/react/components/common/FontSizeSelector.js.map +1 -1
- package/react/components/common/Header.js.map +1 -1
- package/react/components/common/ImagePreview.js.map +1 -1
- package/react/components/common/LoadingSpinner.js.map +1 -1
- package/react/components/common/Tab.js.map +1 -1
- package/react/components/common/Tooltip.js.map +1 -1
- package/react/components/common/css/application-edit-page.css +117 -117
- package/react/components/common/css/application-list.css +47 -47
- package/react/components/common/css/button.css +164 -164
- package/react/components/common/css/color-picker.css +52 -52
- package/react/components/common/css/drop-zone.css +17 -17
- package/react/components/common/css/file-input.css +49 -49
- package/react/components/common/css/header.css +43 -43
- package/react/components/common/css/icon.css +13 -13
- package/react/components/common/css/image-preview.css +57 -57
- package/react/components/common/css/loading-spinner.css +39 -39
- package/react/components/common/css/selector.css +51 -51
- package/react/components/common/css/styles.css +128 -128
- package/react/components/common/css/tab.css +56 -56
- package/react/components/common/css/toggle.css +32 -32
- package/react/components/common/css/tooltip.css +78 -78
- package/react/components/common/file_helpers.js.map +1 -1
- package/react/components/common/fixtures/FinsembleIcon.css +4 -4
- package/react/components/common/helpers.js.map +1 -1
- package/react/components/common/stories/Button.stories.js.map +1 -1
- package/react/components/common/stories/ButtonIcon.stories.js.map +1 -1
- package/react/components/common/stories/ButtonRow.stories.js.map +1 -1
- package/react/components/common/stories/ButtonTile.stories.js.map +1 -1
- package/react/components/common/stories/Checkbox.stories.js.map +1 -1
- package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
- package/react/components/common/stories/DropZone.stories.js.map +1 -1
- package/react/components/common/stories/DropdownButton.stories.js.map +1 -1
- package/react/components/common/stories/FileInput.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleIcon.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleSelect.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
- package/react/components/common/stories/FontSizeSelector.stories.js.map +1 -1
- package/react/components/common/stories/Header.stories.js.map +1 -1
- package/react/components/common/stories/ImagePreview.stories.js.map +1 -1
- package/react/components/common/stories/LoadingSpinner.stories.js.map +1 -1
- package/react/components/common/stories/Tab.stories.js.map +1 -1
- package/react/components/common/stories/Tooltip.stories.js.map +1 -1
- package/react/components/common/tests/ButtonRow.spec.js.map +1 -1
- package/react/components/common/tests/Checkbox.spec.js.map +1 -1
- package/react/components/common/tests/ColorPicker.spec.js.map +1 -1
- package/react/components/common/tests/DropZone.spec.js.map +1 -1
- package/react/components/common/tests/FileInput.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
- package/react/components/common/tests/Header.spec.js.map +1 -1
- package/react/components/common/tests/ImagePreview.spec.js.map +1 -1
- package/react/components/common/tests/Tab.spec.js.map +1 -1
- package/react/components/common/tests/Tooltip.spec.js.map +1 -1
- package/react/components/favorites/FavoriteMaker.js.map +1 -1
- package/react/components/favorites/FavoritesShell.js.map +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/favorites/index.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.css +126 -126
- package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
- package/react/components/icon/Icon.js.map +1 -1
- package/react/components/icon/index.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialog.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogQuestion.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogTextInput.js.map +1 -1
- package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
- package/react/components/legacyControls/FinsembleDraggable.js.map +1 -1
- package/react/components/legacyControls/FinsembleHoverDetector.js.map +1 -1
- package/react/components/legacyControls/FinsembleMenuSection.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialog.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialog.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js.map +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/LinkerMenuDeprecated.js.map +1 -1
- package/react/components/linker/index.js.map +1 -1
- package/react/components/linker/remoteRedux.js.map +1 -1
- package/react/components/menu/Menu.js.map +1 -1
- package/react/components/menu/MenuAutoResizer.js.map +1 -1
- package/react/components/menu/MenuContent.js.map +1 -1
- package/react/components/menu/MenuHotKey.js.map +1 -1
- package/react/components/menu/MenuItem.js.map +1 -1
- package/react/components/menu/MenuPortal.js.map +1 -1
- package/react/components/menu/MenuShell.js.map +1 -1
- package/react/components/menu/MenuToggle.js.map +1 -1
- package/react/components/menu/index.js.map +1 -1
- package/react/components/menu/keyboardNavigation.js.map +1 -1
- package/react/components/menu/menuContext.js.map +1 -1
- package/react/components/menu/menuHelpers.js.map +1 -1
- package/react/components/notifications/components/NoNotifications.js.map +1 -1
- package/react/components/notifications/components/drawer/Drawer.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerHeader.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.js.map +1 -1
- package/react/components/notifications/components/shared/IconButton.js.map +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.js +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
- package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyContentLogo.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderLogo.js.map +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.js +1 -1
- package/react/components/notifications/components/views/ListView.js.map +1 -1
- package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
- package/react/components/notifications/constants.js.map +1 -1
- package/react/components/notifications/icons/Card.js.map +1 -1
- package/react/components/notifications/icons/Chevron.js.map +1 -1
- package/react/components/notifications/icons/CloseIcon.js.map +1 -1
- package/react/components/notifications/icons/EnvelopeClose.js.map +1 -1
- package/react/components/notifications/icons/EnvelopeOpen.js.map +1 -1
- package/react/components/notifications/icons/SnoozeIcon.js.map +1 -1
- package/react/components/notifications/index.js.map +1 -1
- package/react/components/notifications/notificationsContext.js.map +1 -1
- package/react/components/notifications/types.js.map +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.js.map +1 -1
- package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
- package/react/components/processMonitor/components/ListHeader.js.map +1 -1
- package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
- package/react/components/processMonitor/constants.js.map +1 -1
- package/react/components/processMonitor/helpers.js.map +1 -1
- package/react/components/processMonitor/helpers.spec.js.map +1 -1
- package/react/components/processMonitor/index.js.map +1 -1
- package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
- package/react/components/quickComponentForm/QuickComponentForm.js.map +1 -1
- package/react/components/quickComponentForm/index.js.map +1 -1
- package/react/components/quickComponentForm/quickComponent.css +3 -3
- package/react/components/search/Highlight.js.map +1 -1
- package/react/components/search/Highlight.spec.js.map +1 -1
- package/react/components/search/Highlight.stories.js.map +1 -1
- package/react/components/search/Search.js.map +1 -1
- package/react/components/search/SearchBestMatch.js.map +1 -1
- package/react/components/search/SearchInput.js.map +1 -1
- package/react/components/search/SearchProviderResults.js.map +1 -1
- package/react/components/search/SearchResult.js.map +1 -1
- package/react/components/search/SearchResults.js.map +1 -1
- package/react/components/search/index.js.map +1 -1
- package/react/components/shared/Animate.js.map +1 -1
- package/react/components/shared/BellIcon.js.map +1 -1
- package/react/components/shared/BellIconCrossed.js.map +1 -1
- package/react/components/shared/Button.js.map +1 -1
- package/react/components/shared/ConditionalWrapper.js.map +1 -1
- package/react/components/shared/DefaultDropdownButton.js.map +1 -1
- package/react/components/shared/NavigationButton.js.map +1 -1
- package/react/components/shared/Tag.js.map +1 -1
- package/react/components/shared/TagsMenu.js.map +1 -1
- package/react/components/shared/addProtocolToValidURL.js.map +1 -1
- package/react/components/shared/linkerUtil.js.map +1 -1
- package/react/components/shared/openQuitConfirmationDialog.js.map +1 -1
- package/react/components/shared/tests/DefaultDropdownButton.spec.js.map +1 -1
- package/react/components/shared/tests/addProtocolToValidURL.spec.js.map +1 -1
- package/react/components/shared/validateURL.js.map +1 -1
- package/react/components/shared/validateURL.spec.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.css +3 -3
- package/react/components/singleInputDialog/SingleInputDialog.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.spec.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.stories.js.map +1 -1
- package/react/components/singleInputDialog/index.js.map +1 -1
- package/react/components/smartDesktopDesigner/AppEditAccess.js.map +1 -1
- package/react/components/smartDesktopDesigner/AppEditPage.js.map +1 -1
- package/react/components/smartDesktopDesigner/Appearance.css +94 -94
- package/react/components/smartDesktopDesigner/Appearance.helpers.js.map +1 -1
- package/react/components/smartDesktopDesigner/Appearance.js.map +1 -1
- package/react/components/smartDesktopDesigner/Application.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationEdit.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationList.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationSetup.js.map +1 -1
- package/react/components/smartDesktopDesigner/Applications.js.map +1 -1
- package/react/components/smartDesktopDesigner/AssetsPage.css +26 -26
- package/react/components/smartDesktopDesigner/AssetsPage.js.map +1 -1
- package/react/components/smartDesktopDesigner/Authentication.js.map +1 -1
- package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +1 -1
- package/react/components/smartDesktopDesigner/Content.js.map +1 -1
- package/react/components/smartDesktopDesigner/CurrentView.js.map +1 -1
- package/react/components/smartDesktopDesigner/Export.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportCloud.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportDeployInfo.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportZip.js.map +1 -1
- package/react/components/smartDesktopDesigner/GettingStarted.js.map +1 -1
- package/react/components/smartDesktopDesigner/Navigation.js.map +1 -1
- package/react/components/smartDesktopDesigner/ProjectErrors.js.map +1 -1
- package/react/components/smartDesktopDesigner/ProjectHeader.js.map +1 -1
- package/react/components/smartDesktopDesigner/Publish.js.map +1 -1
- package/react/components/smartDesktopDesigner/PublishProgress.js.map +1 -1
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
- package/react/components/smartDesktopDesigner/ThemePage.css +110 -110
- package/react/components/smartDesktopDesigner/ThemePage.js.map +1 -1
- package/react/components/smartDesktopDesigner/Themes.js.map +1 -1
- package/react/components/smartDesktopDesigner/View.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/fsbl_functions.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/getCSSVars.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
- package/react/components/smartDesktopDesigner/css/appearance.css +10 -10
- package/react/components/smartDesktopDesigner/css/applications.css +127 -127
- package/react/components/smartDesktopDesigner/css/authentication.css +125 -125
- package/react/components/smartDesktopDesigner/css/buttons.css +12 -12
- package/react/components/smartDesktopDesigner/css/export.css +163 -163
- package/react/components/smartDesktopDesigner/css/getting-started.css +6 -6
- package/react/components/smartDesktopDesigner/css/nav.css +93 -93
- package/react/components/smartDesktopDesigner/css/project-errors.css +15 -15
- package/react/components/smartDesktopDesigner/css/project-header.css +121 -121
- package/react/components/smartDesktopDesigner/css/styles.css +179 -179
- package/react/components/smartDesktopDesigner/css/views.css +16 -16
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/authenticationProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/configTemplate.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/projectErrorsProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/themeProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/views.js.map +1 -1
- package/react/components/smartDesktopDesigner/sdd_helpers.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Appearance.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/AssetsPage.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Authentication.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Export.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Navigation.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Publish.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ThemePage.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Themes.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Authentication.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Navigation.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Publish.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Themes.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/a11y_helper.js.map +1 -1
- package/react/components/smartDesktopDesigner/themeDefinitions.js.map +1 -1
- package/react/components/system/System.js.map +1 -1
- package/react/components/system/System.spec.js.map +1 -1
- package/react/components/system/System.stories.js.map +1 -1
- package/react/components/system/SystemTrayComponentShell.js.map +1 -1
- package/react/components/system/index.js.map +1 -1
- package/react/components/toolbar/AutoArrange.js.map +1 -1
- package/react/components/toolbar/DragHandle.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.spec.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.stories.js.map +1 -1
- package/react/components/toolbar/NotificationControl.js.map +1 -1
- package/react/components/toolbar/RevealAll.js.map +1 -1
- package/react/components/toolbar/RevealAll.spec.js.map +1 -1
- package/react/components/toolbar/RevealAll.stories.js.map +1 -1
- package/react/components/toolbar/ToolbarIcon.js.map +1 -1
- package/react/components/toolbar/ToolbarSection.js.map +1 -1
- package/react/components/toolbar/ToolbarShell.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js.map +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.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/SortBy.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/ToggleFavoriteDropdown.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js.map +1 -1
- 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/advancedAppLauncher/utils/sort-functions.js.map +1 -1
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/DynamicAppLauncher.js.map +1 -1
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/appLauncher.css +30 -30
- package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
- package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
- package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
- package/react/components/toolbar/index.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/workspaceManagementMenu.css +90 -90
- package/react/components/userPreferences/NotificationsPreferencesContext.js.map +1 -1
- package/react/components/userPreferences/UserPreferenceTypes.js.map +1 -1
- package/react/components/userPreferences/UserPreferences.js.map +1 -1
- package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
- package/react/components/userPreferences/UserPreferencesWrapper.js.map +1 -1
- package/react/components/userPreferences/components/ContentSection.js.map +1 -1
- package/react/components/userPreferences/components/LeftNav.js.map +1 -1
- package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
- package/react/components/userPreferences/components/content/DashbarEditorItem.js.map +1 -1
- package/react/components/userPreferences/components/content/General.js.map +1 -1
- package/react/components/userPreferences/components/content/Notifications.js.map +1 -1
- package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
- package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceButton.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js.map +1 -1
- package/react/components/userPreferences/index.js.map +1 -1
- package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
- package/react/components/userPreferences/stories/DashbarEditor.stories.js.map +1 -1
- package/react/components/userPreferences/stories/DashbarEditorItem.stories.js.map +1 -1
- package/react/components/userPreferences/stories/General.stories.js.map +1 -1
- package/react/components/userPreferences/stories/Notifications.stories.js.map +1 -1
- package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js.map +1 -1
- package/react/components/userPreferences/stories/NotificationsSources.stories.js.map +1 -1
- package/react/components/userPreferences/stories/UserPreferences.stories.js.map +1 -1
- package/react/components/userPreferences/stories/WorkspaceButton.stories.js.map +1 -1
- package/react/components/userPreferences/stories/WorkspaceComponents.stories.js.map +1 -1
- package/react/components/userPreferences/stories/WorkspaceItem.stories.js.map +1 -1
- package/react/components/userPreferences/stories/WorkspaceItemList.stories.js.map +1 -1
- package/react/components/userPreferences/stories/Workspaces.stories.js.map +1 -1
- package/react/components/userPreferences/tests/ContentSection.spec.js.map +1 -1
- package/react/components/userPreferences/tests/DashbarEditor.spec.js.map +1 -1
- package/react/components/userPreferences/tests/DashbarEditorItem.spec.js.map +1 -1
- package/react/components/userPreferences/tests/General.spec.js.map +1 -1
- package/react/components/userPreferences/tests/LeftNav.spec.js.map +1 -1
- package/react/components/userPreferences/tests/NotificationSourceTypes.spec.js.map +1 -1
- package/react/components/userPreferences/tests/Notifications.spec.js.map +1 -1
- package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js.map +1 -1
- package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.js.map +1 -1
- package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceButton.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceComponents.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceItem.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceItemList.spec.js.map +1 -1
- package/react/components/utils.js.map +1 -1
- package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
- package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
- package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
- package/react/components/windowTitleBar/components/center/TabRegion.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js.map +1 -1
- package/react/components/windowTitleBar/components/left/ShareButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/CloseButton.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/right/MinimizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
- package/react/components/windowTitleBar/index.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.js.map +1 -1
- package/react/components/windowTitleBar/windowTitleBarContext.js.map +1 -1
- package/react/components/yesNoDialog/Timer.spec.js.map +1 -1
- package/react/components/yesNoDialog/Timer.stories.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.css +3 -3
- package/react/components/yesNoDialog/YesNoDialog.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.stories.js.map +1 -1
- package/react/components/yesNoDialog/index.js.map +1 -1
- package/react/components/yesNoDialog/timer.js.map +1 -1
- package/react/enzymeSetup.js.map +1 -1
- package/react/hooks/index.js.map +1 -1
- package/react/hooks/useAuth.js.map +1 -1
- package/react/hooks/useDeepEffect.js.map +1 -1
- package/react/hooks/useFavorites.js.map +1 -1
- package/react/hooks/useFavoritesShell.js.map +1 -1
- package/react/hooks/useHotkey.js.map +1 -1
- package/react/hooks/useLinker.js.map +1 -1
- package/react/hooks/useMenu.js.map +1 -1
- package/react/hooks/useNotifications.js.map +1 -1
- package/react/hooks/useOutsideClickDetector.js.map +1 -1
- package/react/hooks/usePubSub.js.map +1 -1
- package/react/hooks/useSearch.js.map +1 -1
- package/react/hooks/useToolbar.js.map +1 -1
- package/react/hooks/useWorkspace.js.map +1 -1
- package/react/reducers/favoriteReducer.js.map +1 -1
- package/react/reducers/linkerReducer.js.map +1 -1
- package/react/reducers/menuReducer.js.map +1 -1
- package/react/reducers/rootReducer.js.map +1 -1
- package/react/reducers/searchReducer.js.map +1 -1
- package/react/reducers/smartDesktopDesignerReducer.js.map +1 -1
- package/react/reducers/toolbarReducer.js.map +1 -1
- package/react/reducers/workspaceReducer.js.map +1 -1
- package/react/store.js.map +1 -1
- package/react/types/advancedAppLauncherTypes.js.map +1 -1
- package/react/types/dashbarTypes.js.map +1 -1
- package/react/types/favoriteTypes.js.map +1 -1
- package/react/types/fdc3.js.map +1 -1
- package/react/types/hotkeyTypes.js.map +1 -1
- package/react/types/iconTypes.js.map +1 -1
- package/react/types/linkerTypes.js.map +1 -1
- package/react/types/searchTypes.js.map +1 -1
- package/react/types/smartDesktopDesignerTypes.js.map +1 -1
- package/react/types/windowTitleBar.js.map +1 -1
- package/react/types/workspaceTypes.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddNewAppForm.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/AddNewAppForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,kDAAkD,CAAC;AAC5F,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAE9E,MAAM,aAAa,GAAG;IACrB,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,GAAG,EAAE,EAAE;CACP,CAAC;AACF,MAAM,mBAAmB,GAAG;IAC3B,IAAI,EAAE,IAAI;IACV,GAAG,EAAE,IAAI;CACT,CAAC;AAEF,MAAM,gBAAgB,GAAG,kEAAkE,CAAC;AAC5F,IAAI,eAAe,GAAG,+FAA+F,CAAC;AA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OAAO,YAEpD;oBACxB,oBAAC,qBAAqB,IAAC,SAAS,EAAC,qBAAqB,EAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,aAErD;oBACxB,oBAAC,qBAAqB,IAAC,SAAS,EAAC,yBAAyB,EAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,cAEzD,CACnB,CACA,CACF,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\r\nimport storeActions from \"../stores/StoreActions\";\r\nimport { FinsembleDialogTextInput } from \"../../../legacyControls/FinsembleDialogTextInput\";\r\nimport { FinsembleDialogButton } from \"../../../legacyControls/FinsembleDialogButton\";\r\nimport \"../../../../assets/css/dialogs.css\";\r\nimport { isValidURL } from \"../../../shared/validateURL\";\r\nimport { addProtocolToValidURL } from \"../../../shared/addProtocolToValidURL\";\r\n\r\nconst FORM_DEFAULTS = {\r\n\tname: \"\",\r\n\ttags: \"\",\r\n\turl: \"\",\r\n};\r\nconst VALIDATION_DEFAULTS = {\r\n\tname: true,\r\n\turl: true,\r\n};\r\n\r\nconst INVALID_NAME_MSG = \"Name cannot be empty or be a duplicate of an existing component.\";\r\nlet INVALID_URL_MSG = \"URL must be valid (e.g., http://www.google.com). Only http and https protocols are supported.\";\r\n\r\ninterface IState {\r\n\tform: {\r\n\t\tname?: string;\r\n\t\turl?: string;\r\n\t\ttags?: string;\r\n\t};\r\n\tvalidation: {\r\n\t\tname: boolean;\r\n\t\turl: boolean;\r\n\t};\r\n\tvalidateOnInputChange: boolean;\r\n}\r\ninterface IProps {\r\n\tonDone: () => void;\r\n\tcustomURLValidation: ((url: string) => [boolean, string]) | null;\r\n\tcustomAddComponent: ((formData: any, callback: (error: any | null) => void) => void) | null;\r\n\tbeforeAddComponent: ((formData: any) => object) | null;\r\n}\r\n/**\r\n * A component that has a form to accept new app properties\r\n * like name, url and tags, validates user input then saves it\r\n * to persistent store. Showing or hiding this component is up to\r\n * parent component.\r\n * @example <AddNewAppForm onDone={this.someHandlerFunction}></AddNewAppForm>\r\n */\r\nexport default class AddNewAppForm extends React.Component<IProps, IState> {\r\n\tconstructor(props: IProps) {\r\n\t\tsuper(props);\r\n\t\tthis.state = {\r\n\t\t\t// if you do not do this, FORM_DEFAULTS gets mutated by setState later on.\r\n\t\t\tform: Object.assign({}, FORM_DEFAULTS),\r\n\t\t\tvalidation: Object.assign({}, VALIDATION_DEFAULTS),\r\n\t\t\t// changed to true after the user submits (if they submit bad information). This gives updated information on keypress.\r\n\t\t\tvalidateOnInputChange: false,\r\n\t\t};\r\n\r\n\t\tthis.onSubmit = this.onSubmit.bind(this);\r\n\t\tthis.onClear = this.onClear.bind(this);\r\n\t\tthis.onCancel = this.onCancel.bind(this);\r\n\t\tthis.done = this.done.bind(this);\r\n\t\tthis.onURLChanged = this.onURLChanged.bind(this);\r\n\t\tthis.onAppNameChanged = this.onAppNameChanged.bind(this);\r\n\t\tthis.onKeyDown = this.onKeyDown.bind(this);\r\n\t\tthis.addNewApp = this.addNewApp.bind(this);\r\n\t\tthis.addNewAppCallback = this.addNewAppCallback.bind(this);\r\n\t}\r\n\r\n\t/**\r\n\t * Calls the storeActions.addApp() method\r\n\t * to save the new app in store.\r\n\t */\r\n\tonSubmit() {\r\n\t\tthis.fixURL();\r\n\t\tthis.fixName();\r\n\t\tlet validName = this.validateName(this.state.form.name);\r\n\t\tlet validURL = this.validateURL(this.state.form.url);\r\n\t\tif (!validName || !validURL) {\r\n\t\t\tthis.setState({\r\n\t\t\t\tvalidation: {\r\n\t\t\t\t\turl: validURL,\r\n\t\t\t\t\tname: validName,\r\n\t\t\t\t},\r\n\t\t\t\tvalidateOnInputChange: true,\r\n\t\t\t});\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.setState({\r\n\t\t\tvalidation: Object.assign({}, VALIDATION_DEFAULTS),\r\n\t\t\tvalidateOnInputChange: false,\r\n\t\t});\r\n\r\n\t\tlet formData = this.state.form;\r\n\t\tif (this.props.beforeAddComponent) {\r\n\t\t\tif (typeof this.props.beforeAddComponent !== \"function\") {\r\n\t\t\t\tFSBL.Clients.Logger.system.error(\r\n\t\t\t\t\t\"beforeAddComponent provided to Advanced App Launcher does not appear to be a function, skipping\"\r\n\t\t\t\t);\r\n\t\t\t} else {\r\n\t\t\t\tformData = this.props.beforeAddComponent(formData);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.addNewApp(formData, this.addNewAppCallback);\r\n\t}\r\n\r\n\taddNewAppCallback(error: any) {\r\n\t\t// Notify parent if no errors\r\n\t\tif (error) {\r\n\t\t\tFSBL.Clients.Logger.system.error(error);\r\n\t\t\tthis.setState({\r\n\t\t\t\tvalidation: {\r\n\t\t\t\t\tname: false,\r\n\t\t\t\t\turl: true,\r\n\t\t\t\t},\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tthis.done();\r\n\t\t}\r\n\t}\r\n\r\n\taddNewApp(form: IState[\"form\"], cb: (err?: any) => void) {\r\n\t\tif (this.props.customAddComponent) {\r\n\t\t\tif (typeof this.props.customAddComponent === \"function\") {\r\n\t\t\t\tthis.props.customAddComponent(form, cb);\r\n\t\t\t\treturn;\r\n\t\t\t} else {\r\n\t\t\t\tFSBL.Clients.Logger.system.error(\r\n\t\t\t\t\t\"Custom Add Component parameter provided to Advanced App Launcher does not appear to be a function, falling back to default add\"\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\t\tconst { name, url, tags } = form;\r\n\t\tif (name && url) {\r\n\t\t\tstoreActions.addApp(\r\n\t\t\t\t{\r\n\t\t\t\t\tname,\r\n\t\t\t\t\turl,\r\n\t\t\t\t\ttags: tags ? tags.split(\",\") : [],\r\n\t\t\t\t\tappID: name,\r\n\t\t\t\t\ttype: \"unknown\",\r\n\t\t\t\t\tcanDelete: true,\r\n\t\t\t\t},\r\n\t\t\t\tcb\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Clears all form inputs\r\n\t */\r\n\tonClear() {\r\n\t\t//document.getElementById(\"new-app\").reset();\r\n\t\tthis.setState({\r\n\t\t\tform: Object.assign({}, FORM_DEFAULTS),\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Just cancel and do not add the app\r\n\t */\r\n\tonCancel() {\r\n\t\tthis.done();\r\n\t}\r\n\r\n\t/**\r\n\t * Calls the passed onDone property to let the parent component\r\n\t * know that we finished processing user's request (submit/cancel)\r\n\t */\r\n\tdone() {\r\n\t\tif (this.props.onDone && typeof this.props.onDone === \"function\") {\r\n\t\t\tthis.props.onDone();\r\n\t\t}\r\n\t\tthis.onClear();\r\n\t}\r\n\r\n\t/**\r\n\t * When the url changes, validate it (after submit), or set state.\r\n\t * @param {keyboardEvent} e\r\n\t */\r\n\tonURLChanged(e: React.ChangeEvent<HTMLInputElement>) {\r\n\t\tlet { form, validation } = this.state;\r\n\t\tif (!form) {\r\n\t\t\tform = {};\r\n\t\t}\r\n\t\tform.url = e.target.value;\r\n\t\tif (this.state.validateOnInputChange) {\r\n\t\t\tvalidation.url = this.validateURL(form.url);\r\n\t\t}\r\n\t\tthis.setState({\r\n\t\t\tform,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * When the name changes, validate it (after submit), or set state.\r\n\t * @param {keyboardEvent} e\r\n\t */\r\n\tonAppNameChanged(e: React.ChangeEvent<HTMLInputElement>) {\r\n\t\tlet { form, validation } = this.state;\r\n\t\tif (!form) {\r\n\t\t\tform = {};\r\n\t\t}\r\n\t\tform.name = e.target.value;\r\n\t\tif (this.state.validateOnInputChange) {\r\n\t\t\tvalidation.name = this.validateName(form.name);\r\n\t\t}\r\n\t\tthis.setState({\r\n\t\t\tform,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Attempt to make a URL object, if successful the provided URL is valid.\r\n\t * If the URL constructor determines the provided string to be invalid it throws a TypeError.\r\n\t *\r\n\t * @param {string} url\r\n\t * @return boolean\r\n\t */\r\n\tvalidateURL(url?: string) {\r\n\t\tif (!url) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this.props.customURLValidation) {\r\n\t\t\tif (typeof this.props.customURLValidation === \"function\") {\r\n\t\t\t\tconst [result, message] = this.props.customURLValidation(url);\r\n\t\t\t\tif (typeof result !== \"boolean\") {\r\n\t\t\t\t\tFSBL.Clients.Logger.system.error(\r\n\t\t\t\t\t\t\"Custom URL Validation routine does not return a boolean, falling back to default validation\"\r\n\t\t\t\t\t);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (message) {\r\n\t\t\t\t\t\tINVALID_URL_MSG = message;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tFSBL.Clients.Logger.system.error(\r\n\t\t\t\t\t\"Custom url validation provided to Advanced App Launcher does not appear to be a function, falling back to default validation\"\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn isValidURL(url);\r\n\t}\r\n\r\n\t/**\r\n\t * When the url changes, validate it (after submit), or set state.\r\n\t * @param {string} name\r\n\t */\r\n\tvalidateName(name?: string) {\r\n\t\tif (typeof name !== \"string\") {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn name !== \"\" || /^[0-9a-zA-Z_.-\\s]+$/.test(name);\r\n\t}\r\n\r\n\t/**\r\n\t * Allows user to skip the protocol. Puts one in there if they don't have it.\r\n\t */\r\n\tfixURL() {\r\n\t\tlet { form } = this.state;\r\n\t\tif (!form) {\r\n\t\t\tform = {};\r\n\t\t}\r\n\t\tif (typeof form.url === \"string\") {\r\n\t\t\tform.url = addProtocolToValidURL(form?.url);\r\n\t\t}\r\n\t\tthis.setState({ form });\r\n\t}\r\n\r\n\t/**\r\n\t * Removes empty spaces from beginning and end of line\r\n\t */\r\n\tfixName() {\r\n\t\tlet { form } = this.state;\r\n\t\tif (!form) {\r\n\t\t\tform = {};\r\n\t\t}\r\n\t\tform.name = form.name?.trim();\r\n\t\tthis.setState({ form });\r\n\t}\r\n\r\n\t/**\r\n\t * Hotkey handler\r\n\t * Escape clears the form and hides it.\r\n\t * Enter submits.\r\n\t * @param {} e\r\n\t */\r\n\tonKeyDown(e: any) {\r\n\t\tif (e.detail.key === \"Escape\") {\r\n\t\t\tthis.onClear();\r\n\t\t\tthis.done();\r\n\t\t}\r\n\t\tif (e.detail.key === \"Enter\") {\r\n\t\t\tthis.onSubmit();\r\n\t\t}\r\n\t}\r\n\r\n\t// Listen for esc/enter\r\n\tcomponentDidMount() {\r\n\t\tdocument.addEventListener(\"portal:keydown\", this.onKeyDown);\r\n\t}\r\n\r\n\t// remove listen for esc/enter\r\n\tcomponentWillUnmount() {\r\n\t\tdocument.removeEventListener(\"portal:keydown\", this.onKeyDown);\r\n\t}\r\n\r\n\trender() {\r\n\t\treturn (\r\n\t\t\t<div className=\"add-app-form controls-wrapper\">\r\n\t\t\t\t<form id=\"new-app\">\r\n\t\t\t\t\t<FinsembleDialogTextInput\r\n\t\t\t\t\t\tinputLabel=\"Name\"\r\n\t\t\t\t\t\tonInputChange={this.onAppNameChanged}\r\n\t\t\t\t\t\tplaceholder=\"Name\"\r\n\t\t\t\t\t\tautoFocus={true}\r\n\t\t\t\t\t\tvalue={this.state.form.name}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t{!this.state.validation.name && <div className=\"input-error\">{INVALID_NAME_MSG}</div>}\r\n\t\t\t\t\t<FinsembleDialogTextInput\r\n\t\t\t\t\t\tinputLabel=\"URL\"\r\n\t\t\t\t\t\tonInputChange={this.onURLChanged}\r\n\t\t\t\t\t\tplaceholder=\"URL\"\r\n\t\t\t\t\t\tvalue={this.state.form.url}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t{!this.state.validation.url && <div className=\"input-error\">{INVALID_URL_MSG}</div>}\r\n\t\t\t\t\t<div className=\"button-wrapper\">\r\n\t\t\t\t\t\t<FinsembleDialogButton className=\"fsbl-button-neutral\" onClick={this.onClear}>\r\n\t\t\t\t\t\t\tClear\r\n\t\t\t\t\t\t</FinsembleDialogButton>\r\n\t\t\t\t\t\t<FinsembleDialogButton className=\"fsbl-button-neutral\" onClick={this.onCancel}>\r\n\t\t\t\t\t\t\tCancel\r\n\t\t\t\t\t\t</FinsembleDialogButton>\r\n\t\t\t\t\t\t<FinsembleDialogButton className=\"fsbl-button-affirmative\" onClick={this.onSubmit}>\r\n\t\t\t\t\t\t\tConfirm\r\n\t\t\t\t\t\t</FinsembleDialogButton>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</form>\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"AddNewAppForm.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/AddNewAppForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,kDAAkD,CAAC;AAC5F,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAE9E,MAAM,aAAa,GAAG;IACrB,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,GAAG,EAAE,EAAE;CACP,CAAC;AACF,MAAM,mBAAmB,GAAG;IAC3B,IAAI,EAAE,IAAI;IACV,GAAG,EAAE,IAAI;CACT,CAAC;AAEF,MAAM,gBAAgB,GAAG,kEAAkE,CAAC;AAC5F,IAAI,eAAe,GAAG,+FAA+F,CAAC;AA2BtH,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,KAAK,CAAC,SAAyB;IACzE,YAAY,KAAa;QACxB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YAEZ,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,E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zD,CACnB,CACA,CACF,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\nimport storeActions from \"../stores/StoreActions\";\nimport { FinsembleDialogTextInput } from \"../../../legacyControls/FinsembleDialogTextInput\";\nimport { FinsembleDialogButton } from \"../../../legacyControls/FinsembleDialogButton\";\nimport \"../../../../assets/css/dialogs.css\";\nimport { isValidURL } from \"../../../shared/validateURL\";\nimport { addProtocolToValidURL } from \"../../../shared/addProtocolToValidURL\";\n\nconst FORM_DEFAULTS = {\n\tname: \"\",\n\ttags: \"\",\n\turl: \"\",\n};\nconst VALIDATION_DEFAULTS = {\n\tname: true,\n\turl: true,\n};\n\nconst INVALID_NAME_MSG = \"Name cannot be empty or be a duplicate of an existing component.\";\nlet INVALID_URL_MSG = \"URL must be valid (e.g., http://www.google.com). Only http and https protocols are supported.\";\n\ninterface IState {\n\tform: {\n\t\tname?: string;\n\t\turl?: string;\n\t\ttags?: string;\n\t};\n\tvalidation: {\n\t\tname: boolean;\n\t\turl: boolean;\n\t};\n\tvalidateOnInputChange: boolean;\n}\ninterface IProps {\n\tonDone: () => void;\n\tcustomURLValidation: ((url: string) => [boolean, string]) | null;\n\tcustomAddComponent: ((formData: any, callback: (error: any | null) => void) => void) | null;\n\tbeforeAddComponent: ((formData: any) => object) | null;\n}\n/**\n * A component that has a form to accept new app properties\n * like name, url and tags, validates user input then saves it\n * to persistent store. Showing or hiding this component is up to\n * parent component.\n * @example <AddNewAppForm onDone={this.someHandlerFunction}></AddNewAppForm>\n */\nexport default class AddNewAppForm extends React.Component<IProps, IState> {\n\tconstructor(props: IProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\t// if you do not do this, FORM_DEFAULTS gets mutated by setState later on.\n\t\t\tform: Object.assign({}, FORM_DEFAULTS),\n\t\t\tvalidation: Object.assign({}, VALIDATION_DEFAULTS),\n\t\t\t// changed to true after the user submits (if they submit bad information). This gives updated information on keypress.\n\t\t\tvalidateOnInputChange: false,\n\t\t};\n\n\t\tthis.onSubmit = this.onSubmit.bind(this);\n\t\tthis.onClear = this.onClear.bind(this);\n\t\tthis.onCancel = this.onCancel.bind(this);\n\t\tthis.done = this.done.bind(this);\n\t\tthis.onURLChanged = this.onURLChanged.bind(this);\n\t\tthis.onAppNameChanged = this.onAppNameChanged.bind(this);\n\t\tthis.onKeyDown = this.onKeyDown.bind(this);\n\t\tthis.addNewApp = this.addNewApp.bind(this);\n\t\tthis.addNewAppCallback = this.addNewAppCallback.bind(this);\n\t}\n\n\t/**\n\t * Calls the storeActions.addApp() method\n\t * to save the new app in store.\n\t */\n\tonSubmit() {\n\t\tthis.fixURL();\n\t\tthis.fixName();\n\t\tlet validName = this.validateName(this.state.form.name);\n\t\tlet validURL = this.validateURL(this.state.form.url);\n\t\tif (!validName || !validURL) {\n\t\t\tthis.setState({\n\t\t\t\tvalidation: {\n\t\t\t\t\turl: validURL,\n\t\t\t\t\tname: validName,\n\t\t\t\t},\n\t\t\t\tvalidateOnInputChange: true,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tthis.setState({\n\t\t\tvalidation: Object.assign({}, VALIDATION_DEFAULTS),\n\t\t\tvalidateOnInputChange: false,\n\t\t});\n\n\t\tlet formData = this.state.form;\n\t\tif (this.props.beforeAddComponent) {\n\t\t\tif (typeof this.props.beforeAddComponent !== \"function\") {\n\t\t\t\tFSBL.Clients.Logger.system.error(\n\t\t\t\t\t\"beforeAddComponent provided to Advanced App Launcher does not appear to be a function, skipping\"\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tformData = this.props.beforeAddComponent(formData);\n\t\t\t}\n\t\t}\n\n\t\tthis.addNewApp(formData, this.addNewAppCallback);\n\t}\n\n\taddNewAppCallback(error: any) {\n\t\t// Notify parent if no errors\n\t\tif (error) {\n\t\t\tFSBL.Clients.Logger.system.error(error);\n\t\t\tthis.setState({\n\t\t\t\tvalidation: {\n\t\t\t\t\tname: false,\n\t\t\t\t\turl: true,\n\t\t\t\t},\n\t\t\t});\n\t\t} else {\n\t\t\tthis.done();\n\t\t}\n\t}\n\n\taddNewApp(form: IState[\"form\"], cb: (err?: any) => void) {\n\t\tif (this.props.customAddComponent) {\n\t\t\tif (typeof this.props.customAddComponent === \"function\") {\n\t\t\t\tthis.props.customAddComponent(form, cb);\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tFSBL.Clients.Logger.system.error(\n\t\t\t\t\t\"Custom Add Component parameter provided to Advanced App Launcher does not appear to be a function, falling back to default add\"\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tconst { name, url, tags } = form;\n\t\tif (name && url) {\n\t\t\tstoreActions.addApp(\n\t\t\t\t{\n\t\t\t\t\tname,\n\t\t\t\t\turl,\n\t\t\t\t\ttags: tags ? tags.split(\",\") : [],\n\t\t\t\t\tappID: name,\n\t\t\t\t\ttype: \"unknown\",\n\t\t\t\t\tcanDelete: true,\n\t\t\t\t},\n\t\t\t\tcb\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Clears all form inputs\n\t */\n\tonClear() {\n\t\t//document.getElementById(\"new-app\").reset();\n\t\tthis.setState({\n\t\t\tform: Object.assign({}, FORM_DEFAULTS),\n\t\t});\n\t}\n\n\t/**\n\t * Just cancel and do not add the app\n\t */\n\tonCancel() {\n\t\tthis.done();\n\t}\n\n\t/**\n\t * Calls the passed onDone property to let the parent component\n\t * know that we finished processing user's request (submit/cancel)\n\t */\n\tdone() {\n\t\tif (this.props.onDone && typeof this.props.onDone === \"function\") {\n\t\t\tthis.props.onDone();\n\t\t}\n\t\tthis.onClear();\n\t}\n\n\t/**\n\t * When the url changes, validate it (after submit), or set state.\n\t * @param {keyboardEvent} e\n\t */\n\tonURLChanged(e: React.ChangeEvent<HTMLInputElement>) {\n\t\tlet { form, validation } = this.state;\n\t\tif (!form) {\n\t\t\tform = {};\n\t\t}\n\t\tform.url = e.target.value;\n\t\tif (this.state.validateOnInputChange) {\n\t\t\tvalidation.url = this.validateURL(form.url);\n\t\t}\n\t\tthis.setState({\n\t\t\tform,\n\t\t});\n\t}\n\n\t/**\n\t * When the name changes, validate it (after submit), or set state.\n\t * @param {keyboardEvent} e\n\t */\n\tonAppNameChanged(e: React.ChangeEvent<HTMLInputElement>) {\n\t\tlet { form, validation } = this.state;\n\t\tif (!form) {\n\t\t\tform = {};\n\t\t}\n\t\tform.name = e.target.value;\n\t\tif (this.state.validateOnInputChange) {\n\t\t\tvalidation.name = this.validateName(form.name);\n\t\t}\n\t\tthis.setState({\n\t\t\tform,\n\t\t});\n\t}\n\n\t/**\n\t * Attempt to make a URL object, if successful the provided URL is valid.\n\t * If the URL constructor determines the provided string to be invalid it throws a TypeError.\n\t *\n\t * @param {string} url\n\t * @return boolean\n\t */\n\tvalidateURL(url?: string) {\n\t\tif (!url) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (this.props.customURLValidation) {\n\t\t\tif (typeof this.props.customURLValidation === \"function\") {\n\t\t\t\tconst [result, message] = this.props.customURLValidation(url);\n\t\t\t\tif (typeof result !== \"boolean\") {\n\t\t\t\t\tFSBL.Clients.Logger.system.error(\n\t\t\t\t\t\t\"Custom URL Validation routine does not return a boolean, falling back to default validation\"\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tif (message) {\n\t\t\t\t\t\tINVALID_URL_MSG = message;\n\t\t\t\t\t}\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tFSBL.Clients.Logger.system.error(\n\t\t\t\t\t\"Custom url validation provided to Advanced App Launcher does not appear to be a function, falling back to default validation\"\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn isValidURL(url);\n\t}\n\n\t/**\n\t * When the url changes, validate it (after submit), or set state.\n\t * @param {string} name\n\t */\n\tvalidateName(name?: string) {\n\t\tif (typeof name !== \"string\") {\n\t\t\treturn false;\n\t\t}\n\t\treturn name !== \"\" || /^[0-9a-zA-Z_.-\\s]+$/.test(name);\n\t}\n\n\t/**\n\t * Allows user to skip the protocol. Puts one in there if they don't have it.\n\t */\n\tfixURL() {\n\t\tlet { form } = this.state;\n\t\tif (!form) {\n\t\t\tform = {};\n\t\t}\n\t\tif (typeof form.url === \"string\") {\n\t\t\tform.url = addProtocolToValidURL(form?.url);\n\t\t}\n\t\tthis.setState({ form });\n\t}\n\n\t/**\n\t * Removes empty spaces from beginning and end of line\n\t */\n\tfixName() {\n\t\tlet { form } = this.state;\n\t\tif (!form) {\n\t\t\tform = {};\n\t\t}\n\t\tform.name = form.name?.trim();\n\t\tthis.setState({ form });\n\t}\n\n\t/**\n\t * Hotkey handler\n\t * Escape clears the form and hides it.\n\t * Enter submits.\n\t * @param {} e\n\t */\n\tonKeyDown(e: any) {\n\t\tif (e.detail.key === \"Escape\") {\n\t\t\tthis.onClear();\n\t\t\tthis.done();\n\t\t}\n\t\tif (e.detail.key === \"Enter\") {\n\t\t\tthis.onSubmit();\n\t\t}\n\t}\n\n\t// Listen for esc/enter\n\tcomponentDidMount() {\n\t\tdocument.addEventListener(\"portal:keydown\", this.onKeyDown);\n\t}\n\n\t// remove listen for esc/enter\n\tcomponentWillUnmount() {\n\t\tdocument.removeEventListener(\"portal:keydown\", this.onKeyDown);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<div className=\"add-app-form controls-wrapper\">\n\t\t\t\t<form id=\"new-app\">\n\t\t\t\t\t<FinsembleDialogTextInput\n\t\t\t\t\t\tinputLabel=\"Name\"\n\t\t\t\t\t\tonInputChange={this.onAppNameChanged}\n\t\t\t\t\t\tplaceholder=\"Name\"\n\t\t\t\t\t\tautoFocus={true}\n\t\t\t\t\t\tvalue={this.state.form.name}\n\t\t\t\t\t/>\n\t\t\t\t\t{!this.state.validation.name && <div className=\"input-error\">{INVALID_NAME_MSG}</div>}\n\t\t\t\t\t<FinsembleDialogTextInput\n\t\t\t\t\t\tinputLabel=\"URL\"\n\t\t\t\t\t\tonInputChange={this.onURLChanged}\n\t\t\t\t\t\tplaceholder=\"URL\"\n\t\t\t\t\t\tvalue={this.state.form.url}\n\t\t\t\t\t/>\n\t\t\t\t\t{!this.state.validation.url && <div className=\"input-error\">{INVALID_URL_MSG}</div>}\n\t\t\t\t\t<div className=\"button-wrapper\">\n\t\t\t\t\t\t<FinsembleDialogButton className=\"fsbl-button-neutral\" onClick={this.onClear}>\n\t\t\t\t\t\t\tClear\n\t\t\t\t\t\t</FinsembleDialogButton>\n\t\t\t\t\t\t<FinsembleDialogButton className=\"fsbl-button-neutral\" onClick={this.onCancel}>\n\t\t\t\t\t\t\tCancel\n\t\t\t\t\t\t</FinsembleDialogButton>\n\t\t\t\t\t\t<FinsembleDialogButton className=\"fsbl-button-affirmative\" onClick={this.onSubmit}>\n\t\t\t\t\t\t\tConfirm\n\t\t\t\t\t\t</FinsembleDialogButton>\n\t\t\t\t\t</div>\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddNewFolder.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/AddNewFolder.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAOlD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,KAAK,CAAC,SAAS;IACxD,YAAY;QACX,YAAY,CAAC,YAAY,EAAE,CAAC;IAC7B,CAAC;IAED,MAAM;QACL,OAAO,CACN,6BAAK,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,EAAC,+BAA+B,iBAEpE,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\
|
|
1
|
+
{"version":3,"file":"AddNewFolder.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/AddNewFolder.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAOlD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,KAAK,CAAC,SAAS;IACxD,YAAY;QACX,YAAY,CAAC,YAAY,EAAE,CAAC;IAC7B,CAAC;IAED,MAAM;QACL,OAAO,CACN,6BAAK,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,EAAC,+BAA+B,iBAEpE,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\nimport storeActions from \"../stores/StoreActions\";\n\n/**\n * A basic component that calls storeActions.addNewFolder()\n * to create a new folder in store. This component could be upgraded\n * to support inline naming of the new folder\n */\nexport default class AddNewFolder extends React.Component {\n\taddNewFolder() {\n\t\tstoreActions.addNewFolder();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<div onClick={this.addNewFolder} className=\"ff-plus-2 complex-menu-action\">\n\t\t\t\tNew Folder\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppActionsMenu.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/AppActionsMenu.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AACtD,MAAM,SAAS,GAAG,WAAW,CAAC;AAC9B,MAAM,IAAI,GAAG,MAAM,CAAC;AAWpB,MAAM,SAAS,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC3C,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,GAAG,YAAY,EAAE,CAAC;IACvD,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;IAC3B,MAAM,uBAAuB,GAAG,GAAG,EAAE;QACpC,IAAI,WAAW,CAAC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Q,EAAC,aAAa,EACtB,IAAI,EAAE,GAAG,CAAC,IAAI,EACd,IAAI,EAAE,GAAG,CAAC,IAAI,EACd,QAAQ,EAAE,IAAI,GACb,CACE;gBACJ,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,MAAM,KAAK,IAAI,IAAI,4BAAI,OAAO,EAAE,IAAI,CAAC,UAAU,gBAAgB;gBACjF,CAAC,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,SAAS,IAAI,oBAAC,SAAS,IAAC,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,GAAI;gBACvF,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAClE,4BAAI,OAAO,EAAE,IAAI,CAAC,QAAQ;;oBAAe,MAAM,CAAC,IAAI,CAAM,CAC1D,CACG,CACA,CACN,CAAC;IACH,CAAC;IAED,MAAM;QACL,OAAO,CACN,6BAAK,GAAG,EAAE,IAAI,CAAC,UAAU,EAAE,SAAS,EAAC,sBAAsB,EAAC,OAAO,EAAE,IAAI,CAAC,UAAU;YACnF;gBACC,2BAAG,SAAS,EAAC,cAAc,EAAC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,GAAI,CAClD;YACN,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,UAAU,EAAE,CACrC,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["/*!\r\n * Copyright 2018 by ChartIQ, Inc.\r\n * All rights reserved.\r\n *\r\n */\r\n\r\nimport React from \"react\";\r\nimport storeActions from \"../stores/StoreActions\";\r\nimport { ToggleFavoriteDropdown } from \"./ToggleFavoriteDropdown\";\r\nimport { useFavorites } from \"../../../../hooks/useFavorites\";\r\n\r\nconst ADVANCED_APP_LAUNCHER = \"Advanced App Launcher\";\r\nconst FAVORITES = \"Favorites\";\r\nconst FDC3 = \"FDC3\";\r\n\r\ninterface DeleteAppProps {\r\n\tname: string;\r\n\tid: any;\r\n}\r\n\r\n/**\r\n * Handles deleting a component and removing it from favorites if necessary\r\n * @param {*} props\r\n */\r\nconst DeleteApp = (props: DeleteAppProps) => {\r\n\tconst { isFavorited, removeFavorite } = useFavorites();\r\n\tconst { name, id } = props;\r\n\tconst removeFavoriteAndDelete = () => {\r\n\t\tif (isFavorited(name)) {\r\n\t\t\tremoveFavorite(name);\r\n\t\t}\r\n\t\tstoreActions.deleteApp(id);\r\n\t};\r\n\treturn <li onClick={removeFavoriteAndDelete}>Delete App</li>;\r\n};\r\n\r\n/**\r\n * This method checks an element and all of its parents to determine whether any of them\r\n * contain a particular class name. We use this to determine whether the user is clicking\r\n * inside or outside of the actions menu pop up.\r\n * @param {HTMLElement} element\r\n * @param {string} className\r\n */\r\nconst someParentHasClassName = (element: HTMLElement, className: string): any => {\r\n\tif (element.className && element.className.split(\" \").indexOf(className) >= 0) return true;\r\n\treturn element.parentNode && someParentHasClassName(element.parentNode as HTMLElement, className);\r\n};\r\n\r\ninterface IProps {\r\n\tapp: any;\r\n\tfolder: any;\r\n}\r\ninterface IState {\r\n\tisVisible: boolean;\r\n}\r\n\r\n/**\r\n * Displays a list of actions like 'View info', 'Add to favorite'\r\n * etc on each app in the list\r\n */\r\nexport default class AppActionsMenu extends React.Component<IProps, IState> {\r\n\tmenuRef: HTMLDivElement | null;\r\n\r\n\tconstructor(props: IProps) {\r\n\t\tsuper(props);\r\n\t\tthis.state = {\r\n\t\t\tisVisible: false,\r\n\t\t};\r\n\t\t// Bind correct context\r\n\t\tthis.onViewInfo = this.onViewInfo.bind(this);\r\n\t\tthis.toggleMenu = this.toggleMenu.bind(this);\r\n\t\tthis.onRemove = this.onRemove.bind(this);\r\n\t\tthis.setMenuRef = this.setMenuRef.bind(this);\r\n\t\tthis.deleteApp = this.deleteApp.bind(this);\r\n\t\tthis.handleClickOutside = this.handleClickOutside.bind(this);\r\n\t\tthis.handleWindowBlurred = this.handleWindowBlurred.bind(this);\r\n\t\tthis.menuRef = null;\r\n\t}\r\n\r\n\tcomponentDidMount() {\r\n\t\tdocument.addEventListener(\"portal:click\", this.handleClickOutside);\r\n\t\t// Mody on 12/12/19\r\n\t\t// window.blur seems to work much better than finsembleWindow's\r\n\t\t// blurred event. The first, is only fired when you actually click\r\n\t\t// away from the window, while finsembleWindow's blurred fires even\r\n\t\t// when you click inside the window, causing possible race conditions.\r\n\t\twindow.addEventListener(\"blur\", this.handleWindowBlurred);\r\n\t}\r\n\r\n\tcomponentWillUnmount() {\r\n\t\tdocument.removeEventListener(\"portal:click\", this.handleClickOutside);\r\n\t\twindow.removeEventListener(\"blur\", this.handleWindowBlurred);\r\n\t}\r\n\r\n\ttoggleMenu(e?: React.MouseEvent<HTMLElement>) {\r\n\t\tif (e) {\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t}\r\n\t\tthis.setState({\r\n\t\t\tisVisible: !this.state.isVisible,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Opens app catalog and switches to the page when you see all\r\n\t * the details about the app\r\n\t */\r\n\tonViewInfo() {\r\n\t\tthis.toggleMenu();\r\n\t\tFSBL.Clients.LauncherClient.showWindow(\r\n\t\t\t{\r\n\t\t\t\tcomponentType: \"App Catalog\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tmonitor: \"mine\",\r\n\t\t\t\tstaggerPixels: 0,\r\n\t\t\t\tspawnIfNotFound: true,\r\n\t\t\t\tleft: \"center\",\r\n\t\t\t\ttop: \"center\",\r\n\t\t\t},\r\n\t\t\t() => {\r\n\t\t\t\t// Publish this event so that catalog knows\r\n\t\t\t\t// what app we want to view\r\n\r\n\t\t\t\t// NOTE: While not ideal, without a small delay (when having to launch the app catalog) the app catalog wont receive the message as it will still be initializing\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tFSBL.Clients.RouterClient.transmit(\"viewApp\", {\r\n\t\t\t\t\t\tapp: this.props.app,\r\n\t\t\t\t\t});\r\n\t\t\t\t}, 250);\r\n\t\t\t}\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Calls the storeActions.removeAppFromFolder to remove\r\n\t * an app from the currently selected folder\r\n\t */\r\n\tonRemove() {\r\n\t\tstoreActions.removeAppFromFolder(this.props.folder.name, this.props.app);\r\n\t\tthis.toggleMenu();\r\n\t}\r\n\r\n\tsetMenuRef(node: HTMLDivElement) {\r\n\t\tthis.menuRef = node;\r\n\t}\r\n\r\n\t/**\r\n\t * This event handler is responsible for closing action menu pop ups when the user clicks outside of the pop up (what we might think of as a blur event).\r\n\t * The event is triggered by a document level click handler (via portals). When we receive the event, we determine whether the user was clicking inside\r\n\t * or outside of our action menu. If inside the menu then we do nothing (the click event will be captured and handled by react) but if the event occurred\r\n\t * outside of the action menu then we set its state to invisible.\r\n\t *\r\n\t * To determine whether we've clicked inside of the action menu we traverse the parent elements looking for a clue (a parent element that contains the class \"actions-menu\").\r\n\t *\r\n\t * Note: this event will fire multiple times for every click - once for each action menu on the page.\r\n\t * @param {Event} e\r\n\t */\r\n\thandleClickOutside(e: any) {\r\n\t\tconst eventTarget = e?.detail?.target;\r\n\t\tconst clickedInMyDropdown = someParentHasClassName(eventTarget, \"actions-menu\");\r\n\r\n\t\tif (this.state.isVisible && !clickedInMyDropdown) {\r\n\t\t\tthis.setState({\r\n\t\t\t\tisVisible: false,\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\thandleWindowBlurred() {\r\n\t\tthis.setState({\r\n\t\t\tisVisible: false,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Calls storeActions.deleteApp() to delete an app\r\n\t * from all folders and from apps list\r\n\t */\r\n\tdeleteApp() {\r\n\t\tstoreActions.deleteApp(this.props.app.appID);\r\n\t}\r\n\r\n\trenderList() {\r\n\t\t// The 'View info' action is only visible on apps\r\n\t\t// that have the source property and with a value of FDC3\r\n\t\tconst apps = storeActions.getAllApps();\r\n\t\tconst app = apps[this.props.app.appID];\r\n\t\tconst { folder } = this.props;\r\n\t\treturn (\r\n\t\t\t<div className=\"actions-menu\" style={{ right: 0 }}>\r\n\t\t\t\t<ul>\r\n\t\t\t\t\t<li>\r\n\t\t\t\t\t\t<ToggleFavoriteDropdown\r\n\t\t\t\t\t\t\tid={app.name}\r\n\t\t\t\t\t\t\tcategory=\"Application\"\r\n\t\t\t\t\t\t\tname={app.name}\r\n\t\t\t\t\t\t\ticon={app.icon}\r\n\t\t\t\t\t\t\tinstance={this}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t\t{app.source && app.source === FDC3 && <li onClick={this.onViewInfo}>View Info</li>}\r\n\t\t\t\t\t{!app.source && app.canDelete && <DeleteApp name={app.name} id={this.props.app.appID} />}\r\n\t\t\t\t\t{[ADVANCED_APP_LAUNCHER, FAVORITES].indexOf(folder.name) === -1 && (\r\n\t\t\t\t\t\t<li onClick={this.onRemove}>Remove from {folder.name}</li>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</ul>\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n\r\n\trender() {\r\n\t\treturn (\r\n\t\t\t<div ref={this.setMenuRef} className=\"actions-menu-wrapper\" onClick={this.toggleMenu}>\r\n\t\t\t\t<span>\r\n\t\t\t\t\t<i className=\"ff-dots-vert\" id={this.props.app.appID} />\r\n\t\t\t\t</span>\r\n\t\t\t\t{this.state.isVisible && this.renderList()}\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"AppActionsMenu.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/AppActionsMenu.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0B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IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,GAAI,CAClD;YACN,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,UAAU,EAAE,CACrC,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["/*!\n * Copyright 2018 by ChartIQ, Inc.\n * All rights reserved.\n *\n */\n\nimport React from \"react\";\nimport storeActions from \"../stores/StoreActions\";\nimport { ToggleFavoriteDropdown } from \"./ToggleFavoriteDropdown\";\nimport { useFavorites } from \"../../../../hooks/useFavorites\";\n\nconst ADVANCED_APP_LAUNCHER = \"Advanced App Launcher\";\nconst FAVORITES = \"Favorites\";\nconst FDC3 = \"FDC3\";\n\ninterface DeleteAppProps {\n\tname: string;\n\tid: any;\n}\n\n/**\n * Handles deleting a component and removing it from favorites if necessary\n * @param {*} props\n */\nconst DeleteApp = (props: DeleteAppProps) => {\n\tconst { isFavorited, removeFavorite } = useFavorites();\n\tconst { name, id } = props;\n\tconst removeFavoriteAndDelete = () => {\n\t\tif (isFavorited(name)) {\n\t\t\tremoveFavorite(name);\n\t\t}\n\t\tstoreActions.deleteApp(id);\n\t};\n\treturn <li onClick={removeFavoriteAndDelete}>Delete App</li>;\n};\n\n/**\n * This method checks an element and all of its parents to determine whether any of them\n * contain a particular class name. We use this to determine whether the user is clicking\n * inside or outside of the actions menu pop up.\n * @param {HTMLElement} element\n * @param {string} className\n */\nconst someParentHasClassName = (element: HTMLElement, className: string): any => {\n\tif (element.className && element.className.split(\" \").indexOf(className) >= 0) return true;\n\treturn element.parentNode && someParentHasClassName(element.parentNode as HTMLElement, className);\n};\n\ninterface IProps {\n\tapp: any;\n\tfolder: any;\n}\ninterface IState {\n\tisVisible: boolean;\n}\n\n/**\n * Displays a list of actions like 'View info', 'Add to favorite'\n * etc on each app in the list\n */\nexport default class AppActionsMenu extends React.Component<IProps, IState> {\n\tmenuRef: HTMLDivElement | null;\n\n\tconstructor(props: IProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tisVisible: false,\n\t\t};\n\t\t// Bind correct context\n\t\tthis.onViewInfo = this.onViewInfo.bind(this);\n\t\tthis.toggleMenu = this.toggleMenu.bind(this);\n\t\tthis.onRemove = this.onRemove.bind(this);\n\t\tthis.setMenuRef = this.setMenuRef.bind(this);\n\t\tthis.deleteApp = this.deleteApp.bind(this);\n\t\tthis.handleClickOutside = this.handleClickOutside.bind(this);\n\t\tthis.handleWindowBlurred = this.handleWindowBlurred.bind(this);\n\t\tthis.menuRef = null;\n\t}\n\n\tcomponentDidMount() {\n\t\tdocument.addEventListener(\"portal:click\", this.handleClickOutside);\n\t\t// Mody on 12/12/19\n\t\t// window.blur seems to work much better than finsembleWindow's\n\t\t// blurred event. The first, is only fired when you actually click\n\t\t// away from the window, while finsembleWindow's blurred fires even\n\t\t// when you click inside the window, causing possible race conditions.\n\t\twindow.addEventListener(\"blur\", this.handleWindowBlurred);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tdocument.removeEventListener(\"portal:click\", this.handleClickOutside);\n\t\twindow.removeEventListener(\"blur\", this.handleWindowBlurred);\n\t}\n\n\ttoggleMenu(e?: React.MouseEvent<HTMLElement>) {\n\t\tif (e) {\n\t\t\te.stopPropagation();\n\t\t\te.preventDefault();\n\t\t}\n\t\tthis.setState({\n\t\t\tisVisible: !this.state.isVisible,\n\t\t});\n\t}\n\n\t/**\n\t * Opens app catalog and switches to the page when you see all\n\t * the details about the app\n\t */\n\tonViewInfo() {\n\t\tthis.toggleMenu();\n\t\tFSBL.Clients.LauncherClient.showWindow(\n\t\t\t{\n\t\t\t\tcomponentType: \"App Catalog\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tmonitor: \"mine\",\n\t\t\t\tstaggerPixels: 0,\n\t\t\t\tspawnIfNotFound: true,\n\t\t\t\tleft: \"center\",\n\t\t\t\ttop: \"center\",\n\t\t\t},\n\t\t\t() => {\n\t\t\t\t// Publish this event so that catalog knows\n\t\t\t\t// what app we want to view\n\n\t\t\t\t// NOTE: While not ideal, without a small delay (when having to launch the app catalog) the app catalog wont receive the message as it will still be initializing\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tFSBL.Clients.RouterClient.transmit(\"viewApp\", {\n\t\t\t\t\t\tapp: this.props.app,\n\t\t\t\t\t});\n\t\t\t\t}, 250);\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * Calls the storeActions.removeAppFromFolder to remove\n\t * an app from the currently selected folder\n\t */\n\tonRemove() {\n\t\tstoreActions.removeAppFromFolder(this.props.folder.name, this.props.app);\n\t\tthis.toggleMenu();\n\t}\n\n\tsetMenuRef(node: HTMLDivElement) {\n\t\tthis.menuRef = node;\n\t}\n\n\t/**\n\t * This event handler is responsible for closing action menu pop ups when the user clicks outside of the pop up (what we might think of as a blur event).\n\t * The event is triggered by a document level click handler (via portals). When we receive the event, we determine whether the user was clicking inside\n\t * or outside of our action menu. If inside the menu then we do nothing (the click event will be captured and handled by react) but if the event occurred\n\t * outside of the action menu then we set its state to invisible.\n\t *\n\t * To determine whether we've clicked inside of the action menu we traverse the parent elements looking for a clue (a parent element that contains the class \"actions-menu\").\n\t *\n\t * Note: this event will fire multiple times for every click - once for each action menu on the page.\n\t * @param {Event} e\n\t */\n\thandleClickOutside(e: any) {\n\t\tconst eventTarget = e?.detail?.target;\n\t\tconst clickedInMyDropdown = someParentHasClassName(eventTarget, \"actions-menu\");\n\n\t\tif (this.state.isVisible && !clickedInMyDropdown) {\n\t\t\tthis.setState({\n\t\t\t\tisVisible: false,\n\t\t\t});\n\t\t}\n\t}\n\n\thandleWindowBlurred() {\n\t\tthis.setState({\n\t\t\tisVisible: false,\n\t\t});\n\t}\n\n\t/**\n\t * Calls storeActions.deleteApp() to delete an app\n\t * from all folders and from apps list\n\t */\n\tdeleteApp() {\n\t\tstoreActions.deleteApp(this.props.app.appID);\n\t}\n\n\trenderList() {\n\t\t// The 'View info' action is only visible on apps\n\t\t// that have the source property and with a value of FDC3\n\t\tconst apps = storeActions.getAllApps();\n\t\tconst app = apps[this.props.app.appID];\n\t\tconst { folder } = this.props;\n\t\treturn (\n\t\t\t<div className=\"actions-menu\" style={{ right: 0 }}>\n\t\t\t\t<ul>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<ToggleFavoriteDropdown\n\t\t\t\t\t\t\tid={app.name}\n\t\t\t\t\t\t\tcategory=\"Application\"\n\t\t\t\t\t\t\tname={app.name}\n\t\t\t\t\t\t\ticon={app.icon}\n\t\t\t\t\t\t\tinstance={this}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</li>\n\t\t\t\t\t{app.source && app.source === FDC3 && <li onClick={this.onViewInfo}>View Info</li>}\n\t\t\t\t\t{!app.source && app.canDelete && <DeleteApp name={app.name} id={this.props.app.appID} />}\n\t\t\t\t\t{[ADVANCED_APP_LAUNCHER, FAVORITES].indexOf(folder.name) === -1 && (\n\t\t\t\t\t\t<li onClick={this.onRemove}>Remove from {folder.name}</li>\n\t\t\t\t\t)}\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<div ref={this.setMenuRef} className=\"actions-menu-wrapper\" onClick={this.toggleMenu}>\n\t\t\t\t<span>\n\t\t\t\t\t<i className=\"ff-dots-vert\" id={this.props.app.appID} />\n\t\t\t\t</span>\n\t\t\t\t{this.state.isVisible && this.renderList()}\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppDefinition.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/AppDefinition.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,YAAY,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QAChD,MAAM,IAAI,GAAG,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,KAAI,EAAE,CAAC;QAC7B,OAAO,CACN,6BAAK,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,EAAC,eAAe,EAAC,SAAS,EAAC,MAAM,EAAC,WAAW,EAAE,IAAI,CAAC,cAAc;YAC1G,8BAAM,SAAS,EAAC,gBAAgB;gBAC/B,oBAAC,aAAa,IAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAC,aAAa,EAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,GAAI;gBACtF,8BAAM,SAAS,EAAC,UAAU,EAAC,KAAK,EAAE,WAAW,IAC3C,WAAW,CACN,CACD;YACN,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,oBAAC,WAAW,IAAC,IAAI,EAAE,IAAI,GAAI;YAC/C,oBAAC,cAAc,IAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,GAAI,CAClD,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\
|
|
1
|
+
{"version":3,"file":"AppDefinition.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/AppDefinition.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAoBlD,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,KAAK,CAAC,SAAyB;IACzE,YAAY,KAAa;QACxB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,cAAc,GAAG,I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,EAAC,SAAS,EAAC,MAAM,EAAC,WAAW,EAAE,IAAI,CAAC,cAAc;YAC1G,8BAAM,SAAS,EAAC,gBAAgB;gBAC/B,oBAAC,aAAa,IAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAC,aAAa,EAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,GAAI;gBACtF,8BAAM,SAAS,EAAC,UAAU,EAAC,KAAK,EAAE,WAAW,IAC3C,WAAW,CACN,CACD;YACN,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,oBAAC,WAAW,IAAC,IAAI,EAAE,IAAI,GAAI;YAC/C,oBAAC,cAAc,IAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,GAAI,CAClD,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\nimport AppActionsMenu from \"./AppActionsMenu\";\nimport AppTagsList from \"./AppTagsList\";\nimport { FavoriteMaker } from \"../../../favorites/FavoriteMaker\";\nimport { getStore } from \"../stores/LauncherStore\";\nimport storeActions from \"../stores/StoreActions\";\nimport { Icon } from \"../../../../types/iconTypes\";\nimport { FolderAppType, FolderType } from \"../../../../types/advancedAppLauncherTypes\";\n\ntype App = FolderAppType & {\n\ttitle?: string;\n\ticon?: Icon;\n};\ninterface IProps {\n\tfolder: FolderType;\n\tapp: App;\n}\n\ninterface IState {}\n\n/**\n * Used to make sure that a user is not waiting for component\n * to spawn after a double click, helps us prevent multiple\n * spawns for the same app.\n */\nexport default class AppDefinition extends React.Component<IProps, IState> {\n\tconstructor(props: IProps) {\n\t\tsuper(props);\n\t\tthis.onDragToFolder = this.onDragToFolder.bind(this);\n\t\tthis.onItemClick = this.onItemClick.bind(this);\n\t}\n\n\t/**\n\t * Native HTML5 drag and drop\n\t **/\n\tonDragToFolder(event: React.DragEvent) {\n\t\tevent.dataTransfer.setData(\"app\", JSON.stringify(this.props.app));\n\t}\n\n\t/**\n\t * Spawns a component on click\n\t * @param {object} e The Synthetic React event\n\t *\n\t */\n\tonItemClick() {\n\t\tconst name = this.props.app.title || this.props.app.name;\n\t\tFSBL.Clients.LauncherClient.spawn(name.trim(), {\n\t\t\taddToWorkspace: true,\n\t\t});\n\t\t/**\n\t\t * If a component takes 4 seconds until it's first painted and the app launcher closes immediately -- that feels discordant.\n\t\t * If a component takes 4 seconds until it's first painted and the app launcher stays open, that feels like a bug.\n\t\t * This is a middle ground. If the component paints quickly (like our html apps), the app launcher will hide as soon as\n\t\t * that new window gets focused. If the component takes a while to paint, we'll hide after half a second instead of\n\t\t * waiting for the window to grab focus.\n\t\t *\n\t\t * Longer term we should leave the menu open and have a micro-interaction telling the user that something is happening.\n\t\t */\n\t\tsetTimeout(() => {\n\t\t\tfinsembleWindow.blur();\n\t\t\t// clear any search text on app launch.\n\t\t\tif (storeActions.getSearchText()) {\n\t\t\t\tgetStore()?.setValue({\n\t\t\t\t\tfield: \"filterText\",\n\t\t\t\t\tvalue: null,\n\t\t\t\t});\n\t\t\t}\n\t\t}, 500);\n\t}\n\n\trender() {\n\t\tconst { app } = this.props;\n\t\tconst appId = app.title || app.name;\n\t\tconst displayName = app.displayName || app.name;\n\t\tconst tags = app?.tags || [];\n\t\treturn (\n\t\t\t<div onClick={this.onItemClick} className=\"app-item link\" draggable=\"true\" onDragStart={this.onDragToFolder}>\n\t\t\t\t<span className=\"app-item-title\">\n\t\t\t\t\t<FavoriteMaker id={appId} category=\"Application\" name={displayName} icon={app.icon} />\n\t\t\t\t\t<span className=\"app-name\" title={displayName}>\n\t\t\t\t\t\t{displayName}\n\t\t\t\t\t</span>\n\t\t\t\t</span>\n\t\t\t\t{tags.length > 0 && <AppTagsList tags={tags} />}\n\t\t\t\t<AppActionsMenu app={app} folder={this.props.folder} />\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppTagsList.js","sourceRoot":"","sources":["../../../../../src/components/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,EAAE,EAAE;YACrC,IAAI,KAAK,GAAG,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,UAAU,CAAC;YAChE,OAAO,CACN,8BACC,GAAG,EAAE,CAAC,EACN,SAAS,EAAE,KAAK,EAChB,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,EACxC,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,EAC7C,YAAY,EAAE,IAAI,CAAC,eAAe,IAEjC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,EAAE,CACzC,CACP,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM;QACL,OAAO,CACN,6BAAK,SAAS,EAAC,eAAe;YAC7B,2BAAG,SAAS,EAAC,QAAQ,GAAK;YACzB,IAAI,CAAC,YAAY,EAAE,CACf,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\
|
|
1
|
+
{"version":3,"file":"AppTagsList.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/AppTagsList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAUlD,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,KAAK,CAAC,SAAyB;IACvE,YAAY,KAAa;QACxB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,cAAc,EAAE,CAAC,CAAC;SAClB,CAAC;QACF,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjD,IAAI,CAAC,eAAe,GAAG,IAAI,CAA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,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,EAAE,CACzC,CACP,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM;QACL,OAAO,CACN,6BAAK,SAAS,EAAC,eAAe;YAC7B,2BAAG,SAAS,EAAC,QAAQ,GAAK;YACzB,IAAI,CAAC,YAAY,EAAE,CACf,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\n\nimport storeActions from \"../stores/StoreActions\";\n\ninterface IProps {\n\ttags: string[];\n}\n\ninterface IState {\n\thighlightedTag: number;\n}\n\nexport default class AppTagsList extends React.Component<IProps, IState> {\n\tconstructor(props: IProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\thighlightedTag: -1,\n\t\t};\n\t\tthis.highlightTag = this.highlightTag.bind(this);\n\t\tthis.clearHighlights = this.clearHighlights.bind(this);\n\t\tthis.generateTags = this.generateTags.bind(this);\n\t\tthis.onTagClick = this.onTagClick.bind(this);\n\t}\n\n\thighlightTag(index: number) {\n\t\tthis.setState({\n\t\t\thighlightedTag: index,\n\t\t});\n\t}\n\n\tclearHighlights() {\n\t\tthis.setState({\n\t\t\thighlightedTag: -1,\n\t\t});\n\t}\n\n\tonTagClick(tag: string, e: React.MouseEvent) {\n\t\tif (e) {\n\t\t\te.stopPropagation();\n\t\t\te.preventDefault();\n\t\t}\n\t\tstoreActions.addTag(tag);\n\t}\n\n\tgenerateTags() {\n\t\tconst { highlightedTag: highlight } = this.state;\n\t\treturn this.props.tags.map((tag, i) => {\n\t\t\tlet style = highlight === i ? \"tag-name highlight\" : \"tag-name\";\n\t\t\treturn (\n\t\t\t\t<span\n\t\t\t\t\tkey={i}\n\t\t\t\t\tclassName={style}\n\t\t\t\t\tonClick={this.onTagClick.bind(this, tag)}\n\t\t\t\t\tonMouseEnter={this.highlightTag.bind(this, i)}\n\t\t\t\t\tonMouseLeave={this.clearHighlights}\n\t\t\t\t>\n\t\t\t\t\t{this.props.tags[i + 1] ? `${tag}, ` : `${tag}`}\n\t\t\t\t</span>\n\t\t\t);\n\t\t});\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<div className=\"app-item-tags\">\n\t\t\t\t<i className=\"ff-tag\"></i>\n\t\t\t\t{this.generateTags()}\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/Content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,aAAa,MAAM,yBAAyB,CAAC;AAIpD,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAErD,MAAc,CAAC,YAAY,GAAG,YAAY,CAAC;AAE5C,IAAI,KAA6B,CAAC;AAWlC,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,KAAK,CAAC,SAAyB;IAGnE,YAAY,KAAa;QACxB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,IAAI,EAAE,YAAY,CAAC,OAAO,EAAE;YAC5B,IAAI,EAAE,YAAY,CAAC,OAAO,EAAE;YAC5B,MAAM,EAAE,YAAY,CAAC,SAAS,EAAE;YAChC,UAAU,EAAE,YAAY,CAAC,aAAa,EAAE,CAAC,WAAW,EAAE;YACtD,MAAM,EAAE,YAAY,CAAC,eAAe,EAAE;SACtC,CAAC;QACF,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,QAA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B;YACxC,oBAAC,UAAU,OAAc;YACzB,6BAAK,SAAS,EAAC,cAAc,IAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,oBAAC,WAAW,IAAC,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAE,GAAI,CAAO,CAC1G,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\r\nimport AppDefinition from \"./AppDefinition\";\r\nimport NoAppsFound from \"./NoAppsFound\";\r\nimport FilterSort from \"./FilterSort\";\r\nimport { getStore } from \"../stores/LauncherStore\";\r\nimport storeActions from \"../stores/StoreActions\";\r\nimport sortFunctions from \"../utils/sort-functions\";\r\nimport StoreModel from \"@finsemble/finsemble-core/types/clients/StoreModel\";\r\nimport { FolderAppType, FolderType } from \"../../../../types/advancedAppLauncherTypes\";\r\nimport { StandardError } from \"@finsemble/finsemble-core/types/types\";\r\nconst ADVANCED_APP_LAUNCHER = \"Advanced App Launcher\";\r\n\r\n(window as any).storeActions = storeActions;\r\n// To be assigned a value later in the constructor\r\nlet store: StoreModel | undefined;\r\n\r\ninterface IProps {}\r\ninterface IState {\r\n\tapps: any;\r\n\ttags: any;\r\n\tsortBy: keyof typeof sortFunctions;\r\n\tfilterText: string;\r\n\tfolder: FolderType;\r\n}\r\n\r\nexport default class Content extends React.Component<IProps, IState> {\r\n\trouterSubscription: any;\r\n\r\n\tconstructor(props: IProps) {\r\n\t\tsuper(props);\r\n\t\tthis.state = {\r\n\t\t\tapps: storeActions.getApps(),\r\n\t\t\ttags: storeActions.getTags(),\r\n\t\t\tsortBy: storeActions.getSortBy(),\r\n\t\t\tfilterText: storeActions.getSearchText().toLowerCase(),\r\n\t\t\tfolder: storeActions.getActiveFolder(),\r\n\t\t};\r\n\t\tthis.onSort = this.onSort.bind(this);\r\n\t\tthis.onSearch = this.onSearch.bind(this);\r\n\t\tthis.onTagsUpdate = this.onTagsUpdate.bind(this);\r\n\t\tthis.onActiveFolderChanged = this.onActiveFolderChanged.bind(this);\r\n\t\tthis.onAppListUpdate = this.onAppListUpdate.bind(this);\r\n\t\tthis.onAppLauncherUpdate = this.onAppLauncherUpdate.bind(this);\r\n\t\tthis.updateAppDefinitions = this.updateAppDefinitions.bind(this);\r\n\t\tstore = getStore();\r\n\t}\r\n\r\n\t_setFolderState() {\r\n\t\tthis.setState({\r\n\t\t\tfolder: storeActions.getActiveFolder(),\r\n\t\t});\r\n\t}\r\n\r\n\tfilterApps() {\r\n\t\tconst { folder } = this.state;\r\n\t\tlet apps: FolderAppType[] =\r\n\t\t\tfolder.name === ADVANCED_APP_LAUNCHER ? Object.values(storeActions.getAllApps()) : folder.apps;\r\n\r\n\t\tif (!folder || !apps) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\t\tconst sortFunc = sortFunctions[this.state.sortBy];\r\n\t\tconst filteredApps: FolderAppType[] = this.filterAppsByTags(sortFunc(apps));\r\n\t\tif (!this.state.filterText) {\r\n\t\t\treturn filteredApps;\r\n\t\t}\r\n\r\n\t\treturn filteredApps.filter(\r\n\t\t\t({ displayName, name }: FolderAppType) =>\r\n\t\t\t\tdisplayName?.toLowerCase().includes(this.state.filterText.toLowerCase()) ??\r\n\t\t\t\tname?.toLowerCase().includes(this.state.filterText.toLowerCase())\r\n\t\t);\r\n\t}\r\n\r\n\tfilterAppsByTags(apps: FolderAppType[]) {\r\n\t\tif (!this.state.tags) {\r\n\t\t\treturn apps;\r\n\t\t}\r\n\t\t//All active tags must be present in an app for it to show\r\n\t\treturn apps.filter((app) => {\r\n\t\t\tfor (let i = 0; i < this.state.tags.length; i++) {\r\n\t\t\t\tlet tag = this.state.tags[i];\r\n\t\t\t\tif (!app.tags?.includes(tag)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t});\r\n\t}\r\n\r\n\tonActiveFolderChanged() {\r\n\t\t// Quick fix for release 6.3.0\r\n\t\t// There are 2 listeners for \"activeFolder\". One in this file, the other is in packages\\ui\\src\\components\\toolbar\\advancedAppLauncher\\stores\\StoreActions.ts\r\n\t\t// The first listener is invoked earlier with nonupdated 'activeFolder' value in the storeActions. So I use a timeout to change this.\r\n\t\t// Otherwise, for correct re-rendering, we need to do double-click on the left folders panel.\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis._setFolderState();\r\n\t\t}, 50);\r\n\t}\r\n\r\n\tonSearch(error: StandardError, data: any) {\r\n\t\tthis.setState({\r\n\t\t\tfilterText: data.value,\r\n\t\t});\r\n\t}\r\n\r\n\tonSort(error: StandardError, data: any) {\r\n\t\tthis.setState({\r\n\t\t\tsortBy: data.value,\r\n\t\t});\r\n\t}\r\n\r\n\tonTagsUpdate(error: StandardError, data: any) {\r\n\t\tthis.setState({\r\n\t\t\ttags: data.value,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Mainly used to know when a user remove an app from a folder\r\n\t * Because there is no way to subscribe to\r\n\t * folders[index].appDefinitions updates.\r\n\t */\r\n\tonAppListUpdate() {\r\n\t\tthis._setFolderState();\r\n\t}\r\n\r\n\tonAppLauncherUpdate() {\r\n\t\tthis.setState({\r\n\t\t\tapps: storeActions.getApps(),\r\n\t\t});\r\n\t}\r\n\r\n\tupdateAppDefinitions(err: StandardError, response: any) {\r\n\t\tFSBL.Clients.Logger.system.debug(\"list updated\", err, response);\r\n\t\tif (err) {\r\n\t\t\treturn console.error(err);\r\n\t\t}\r\n\t\tstoreActions.refreshAppDefinitions(response.data.componentList);\r\n\t\tthis.onAppListUpdate();\r\n\t}\r\n\r\n\tcomponentDidMount() {\r\n\t\t//this.setStateValues();\r\n\t\tstore?.addListener({ field: \"activeFolder\" }, this.onActiveFolderChanged);\r\n\t\tstore?.addListener({ field: \"filterText\" }, this.onSearch);\r\n\t\tstore?.addListener({ field: \"sortBy\" }, this.onSort);\r\n\t\tstore?.addListener({ field: \"activeLauncherTags\" }, this.onTagsUpdate);\r\n\t\t// We can't subscribe to folders[index].appDefinitions\r\n\t\t// So we are looking at appFolders.folders update\r\n\t\t// Since that update is done After removing an app of definitions\r\n\t\tstore?.addListener({ field: \"appFolders.folders\" }, this.onAppListUpdate);\r\n\r\n\t\tstore?.addListener({ field: \"appDefinitions\" }, this.onAppLauncherUpdate);\r\n\t\tthis.routerSubscription = FSBL.Clients.RouterClient.subscribe(\"Launcher.update\", this.updateAppDefinitions);\r\n\t}\r\n\r\n\tcomponentWillUnmount() {\r\n\t\tstore?.removeListener({ field: \"activeFolder\" }, this.onActiveFolderChanged);\r\n\t\tstore?.removeListener({ field: \"filterText\" }, this.onSearch);\r\n\t\tstore?.removeListener({ field: \"sortBy\" }, this.onSort);\r\n\t\tstore?.removeListener({ field: \"activeLauncherTags\" }, this.onTagsUpdate);\r\n\t\tstore?.removeListener({ field: \"appFolders.folders\" }, this.onAppListUpdate);\r\n\r\n\t\tstore?.removeListener({ field: \"appDefinitions\" }, this.onAppLauncherUpdate);\r\n\t\tFSBL.Clients.RouterClient.unsubscribe(this.routerSubscription.subscribeID);\r\n\t}\r\n\r\n\trenderAppList() {\r\n\t\treturn this.filterApps().map((app, index) => <AppDefinition app={app} folder={this.state.folder} key={index} />);\r\n\t}\r\n\r\n\tgetNoResultsMessage() {\r\n\t\tconst messages = {\r\n\t\t\tsearch: [\"No results found. Please try again.\"],\r\n\t\t\tFavorites: [\"There’s nothing here!\", <br key={1} />, \"Add apps to Favorites to view them here.\"],\r\n\t\t\t//Dashboards: ['There’s nothing here!', <br />, 'Press “New Dashboard” to construct an Dashboard.'],\r\n\t\t\tdefault: [\"There’s nothing here!\", <br key={2} />, \"Add apps to folders to view them here.\"],\r\n\t\t};\r\n\t\tif (!this.state.folder) {\r\n\t\t\treturn [\"Loading data...\", <br key={3} />];\r\n\t\t}\r\n\t\t// User is searching so we need the search message\r\n\t\tif (this.state.filterText || this.state.tags.length) {\r\n\t\t\treturn messages.search;\r\n\t\t}\r\n\t\t// Now let's check which folder is currently active\r\n\t\tswitch (this.state.folder.name) {\r\n\t\t\tcase \"Favorites\":\r\n\t\t\t\treturn messages.Favorites;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Dashboards\":\r\n\t\t\t\treturn [\"\"];\r\n\t\t\t// return messages.Dashboards;\r\n\t\t\tdefault:\r\n\t\t\t\treturn messages.default;\r\n\t\t}\r\n\t}\r\n\r\n\trender() {\r\n\t\tconst apps = this.renderAppList();\r\n\t\treturn (\r\n\t\t\t<div className=\"complex-menu-content-row\">\r\n\t\t\t\t<FilterSort></FilterSort>\r\n\t\t\t\t<div className=\"item-wrapper\">{apps.length ? apps : <NoAppsFound message={this.getNoResultsMessage()} />}</div>\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"Content.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/Content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,aAAa,MAAM,yBAAyB,CAAC;AAIpD,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAErD,MAAc,CAAC,YAAY,GAAG,YAAY,CAAC;AAE5C,IAAI,KAA6B,CAAC;AAWlC,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,KAAK,CAAC,SAAyB;IAGnE,YAAY,KAAa;QACxB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,IAAI,EAAE,YAAY,CAAC,OAAO,EAAE;YAC5B,IAAI,EAAE,YAAY,CAAC,OAAO,EAAE;YAC5B,MAAM,EAAE,YAAY,CAAC,SAAS,EAAE;YAChC,UAAU,EAAE,YAAY,CAAC,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AAC,EAAE,CAAC,CAAC;YAEb;gBACC,OAAO,QAAQ,CAAC,OAAO,CAAC;SACzB;IACF,CAAC;IAED,MAAM;QACL,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QAClC,OAAO,CACN,6BAAK,SAAS,EAAC,0BAA0B;YACxC,oBAAC,UAAU,OAAc;YACzB,6BAAK,SAAS,EAAC,cAAc,IAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,oBAAC,WAAW,IAAC,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAE,GAAI,CAAO,CAC1G,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\nimport AppDefinition from \"./AppDefinition\";\nimport NoAppsFound from \"./NoAppsFound\";\nimport FilterSort from \"./FilterSort\";\nimport { getStore } from \"../stores/LauncherStore\";\nimport storeActions from \"../stores/StoreActions\";\nimport sortFunctions from \"../utils/sort-functions\";\nimport StoreModel from \"@finsemble/finsemble-core/types/clients/StoreModel\";\nimport { FolderAppType, FolderType } from \"../../../../types/advancedAppLauncherTypes\";\nimport { StandardError } from \"@finsemble/finsemble-core/types/types\";\nconst ADVANCED_APP_LAUNCHER = \"Advanced App Launcher\";\n\n(window as any).storeActions = storeActions;\n// To be assigned a value later in the constructor\nlet store: StoreModel | undefined;\n\ninterface IProps {}\ninterface IState {\n\tapps: any;\n\ttags: any;\n\tsortBy: keyof typeof sortFunctions;\n\tfilterText: string;\n\tfolder: FolderType;\n}\n\nexport default class Content extends React.Component<IProps, IState> {\n\trouterSubscription: any;\n\n\tconstructor(props: IProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tapps: storeActions.getApps(),\n\t\t\ttags: storeActions.getTags(),\n\t\t\tsortBy: storeActions.getSortBy(),\n\t\t\tfilterText: storeActions.getSearchText().toLowerCase(),\n\t\t\tfolder: storeActions.getActiveFolder(),\n\t\t};\n\t\tthis.onSort = this.onSort.bind(this);\n\t\tthis.onSearch = this.onSearch.bind(this);\n\t\tthis.onTagsUpdate = this.onTagsUpdate.bind(this);\n\t\tthis.onActiveFolderChanged = this.onActiveFolderChanged.bind(this);\n\t\tthis.onAppListUpdate = this.onAppListUpdate.bind(this);\n\t\tthis.onAppLauncherUpdate = this.onAppLauncherUpdate.bind(this);\n\t\tthis.updateAppDefinitions = this.updateAppDefinitions.bind(this);\n\t\tstore = getStore();\n\t}\n\n\t_setFolderState() {\n\t\tthis.setState({\n\t\t\tfolder: storeActions.getActiveFolder(),\n\t\t});\n\t}\n\n\tfilterApps() {\n\t\tconst { folder } = this.state;\n\t\tlet apps: FolderAppType[] =\n\t\t\tfolder.name === ADVANCED_APP_LAUNCHER ? Object.values(storeActions.getAllApps()) : folder.apps;\n\n\t\tif (!folder || !apps) {\n\t\t\treturn [];\n\t\t}\n\t\tconst sortFunc = sortFunctions[this.state.sortBy];\n\t\tconst filteredApps: FolderAppType[] = this.filterAppsByTags(sortFunc(apps));\n\t\tif (!this.state.filterText) {\n\t\t\treturn filteredApps;\n\t\t}\n\n\t\treturn filteredApps.filter(\n\t\t\t({ displayName, name }: FolderAppType) =>\n\t\t\t\tdisplayName?.toLowerCase().includes(this.state.filterText.toLowerCase()) ??\n\t\t\t\tname?.toLowerCase().includes(this.state.filterText.toLowerCase())\n\t\t);\n\t}\n\n\tfilterAppsByTags(apps: FolderAppType[]) {\n\t\tif (!this.state.tags) {\n\t\t\treturn apps;\n\t\t}\n\t\t//All active tags must be present in an app for it to show\n\t\treturn apps.filter((app) => {\n\t\t\tfor (let i = 0; i < this.state.tags.length; i++) {\n\t\t\t\tlet tag = this.state.tags[i];\n\t\t\t\tif (!app.tags?.includes(tag)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\t}\n\n\tonActiveFolderChanged() {\n\t\t// Quick fix for release 6.3.0\n\t\t// There are 2 listeners for \"activeFolder\". One in this file, the other is in packages\\ui\\src\\components\\toolbar\\advancedAppLauncher\\stores\\StoreActions.ts\n\t\t// The first listener is invoked earlier with nonupdated 'activeFolder' value in the storeActions. So I use a timeout to change this.\n\t\t// Otherwise, for correct re-rendering, we need to do double-click on the left folders panel.\n\t\tsetTimeout(() => {\n\t\t\tthis._setFolderState();\n\t\t}, 50);\n\t}\n\n\tonSearch(error: StandardError, data: any) {\n\t\tthis.setState({\n\t\t\tfilterText: data.value,\n\t\t});\n\t}\n\n\tonSort(error: StandardError, data: any) {\n\t\tthis.setState({\n\t\t\tsortBy: data.value,\n\t\t});\n\t}\n\n\tonTagsUpdate(error: StandardError, data: any) {\n\t\tthis.setState({\n\t\t\ttags: data.value,\n\t\t});\n\t}\n\n\t/**\n\t * Mainly used to know when a user remove an app from a folder\n\t * Because there is no way to subscribe to\n\t * folders[index].appDefinitions updates.\n\t */\n\tonAppListUpdate() {\n\t\tthis._setFolderState();\n\t}\n\n\tonAppLauncherUpdate() {\n\t\tthis.setState({\n\t\t\tapps: storeActions.getApps(),\n\t\t});\n\t}\n\n\tupdateAppDefinitions(err: StandardError, response: any) {\n\t\tFSBL.Clients.Logger.system.debug(\"list updated\", err, response);\n\t\tif (err) {\n\t\t\treturn console.error(err);\n\t\t}\n\t\tstoreActions.refreshAppDefinitions(response.data.componentList);\n\t\tthis.onAppListUpdate();\n\t}\n\n\tcomponentDidMount() {\n\t\t//this.setStateValues();\n\t\tstore?.addListener({ field: \"activeFolder\" }, this.onActiveFolderChanged);\n\t\tstore?.addListener({ field: \"filterText\" }, this.onSearch);\n\t\tstore?.addListener({ field: \"sortBy\" }, this.onSort);\n\t\tstore?.addListener({ field: \"activeLauncherTags\" }, this.onTagsUpdate);\n\t\t// We can't subscribe to folders[index].appDefinitions\n\t\t// So we are looking at appFolders.folders update\n\t\t// Since that update is done After removing an app of definitions\n\t\tstore?.addListener({ field: \"appFolders.folders\" }, this.onAppListUpdate);\n\n\t\tstore?.addListener({ field: \"appDefinitions\" }, this.onAppLauncherUpdate);\n\t\tthis.routerSubscription = FSBL.Clients.RouterClient.subscribe(\"Launcher.update\", this.updateAppDefinitions);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tstore?.removeListener({ field: \"activeFolder\" }, this.onActiveFolderChanged);\n\t\tstore?.removeListener({ field: \"filterText\" }, this.onSearch);\n\t\tstore?.removeListener({ field: \"sortBy\" }, this.onSort);\n\t\tstore?.removeListener({ field: \"activeLauncherTags\" }, this.onTagsUpdate);\n\t\tstore?.removeListener({ field: \"appFolders.folders\" }, this.onAppListUpdate);\n\n\t\tstore?.removeListener({ field: \"appDefinitions\" }, this.onAppLauncherUpdate);\n\t\tFSBL.Clients.RouterClient.unsubscribe(this.routerSubscription.subscribeID);\n\t}\n\n\trenderAppList() {\n\t\treturn this.filterApps().map((app, index) => <AppDefinition app={app} folder={this.state.folder} key={index} />);\n\t}\n\n\tgetNoResultsMessage() {\n\t\tconst messages = {\n\t\t\tsearch: [\"No results found. Please try again.\"],\n\t\t\tFavorites: [\"There’s nothing here!\", <br key={1} />, \"Add apps to Favorites to view them here.\"],\n\t\t\t//Dashboards: ['There’s nothing here!', <br />, 'Press “New Dashboard” to construct an Dashboard.'],\n\t\t\tdefault: [\"There’s nothing here!\", <br key={2} />, \"Add apps to folders to view them here.\"],\n\t\t};\n\t\tif (!this.state.folder) {\n\t\t\treturn [\"Loading data...\", <br key={3} />];\n\t\t}\n\t\t// User is searching so we need the search message\n\t\tif (this.state.filterText || this.state.tags.length) {\n\t\t\treturn messages.search;\n\t\t}\n\t\t// Now let's check which folder is currently active\n\t\tswitch (this.state.folder.name) {\n\t\t\tcase \"Favorites\":\n\t\t\t\treturn messages.Favorites;\n\t\t\t\tbreak;\n\t\t\tcase \"Dashboards\":\n\t\t\t\treturn [\"\"];\n\t\t\t// return messages.Dashboards;\n\t\t\tdefault:\n\t\t\t\treturn messages.default;\n\t\t}\n\t}\n\n\trender() {\n\t\tconst apps = this.renderAppList();\n\t\treturn (\n\t\t\t<div className=\"complex-menu-content-row\">\n\t\t\t\t<FilterSort></FilterSort>\n\t\t\t\t<div className=\"item-wrapper\">{apps.length ? apps : <NoAppsFound message={this.getNoResultsMessage()} />}</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterSort.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/FilterSort.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAUlD,IAAI,KAA6B,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,KAAK,CAAC,SAAyB;IACtE,YAAY,KAAa;QACxB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,IAAI,EAAE,EAAE;YACR,MAAM,EAAE,EAAE;SACV,CAAC;QACF,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrD,KAAK,GAAG,QAAQ,EAAE,CAAC;IACpB,CAAC;IAED,cAAc;QACb,IAAI,CAAC,QAAQ,CAAC;YACb,IAAI,EAAE,YAAY,CAAC,cAAc,EAAE;SACnC,CAAC,CAAC;IACJ,CAAC;IAED,QAAQ,CAAC,KAAU;QAClB,IAAI,CAAC,QAAQ,CACZ;YACC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK;SAC1B,EACD,GAAG,EAAE;;YACJ,MAAA,QAAQ,EAAE,0CAAE,QAAQ,CAAC;gBACpB,KAAK,EAAE,YAAY;gBACnB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;aACxB,CAAC,CAAC;QACJ,CAAC,CACD,CAAC;IACH,CAAC;IAMD,UAAU,CAAC,GAAW;QACrB,IAAI,IAAI,GAAG,YAAY,CAAC,OAAO,EAAE,CAAC;QAElC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACvB,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;SAC5B;aAAM;YACN,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;SACzB;IACF,CAAC;IAED,iBAAiB;QAChB,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;IAC1E,CAAC;IAED,oBAAoB;QACnB,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,cAAc,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;IAC7E,CAAC;IAED,MAAM;QACL,IAAI,UAAU,GAAG,YAAY,CAAC,OAAO,EAAE,CAAC;QACxC,OAAO,CACN,6BAAK,SAAS,EAAC,aAAa;YAC3B,oBAAC,SAAS,OAAG;YACb,oBAAC,QAAQ,OAAG;YACZ,oBAAC,MAAM,OAAG;YACV,oBAAC,QAAQ,IAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAC,OAAO,EAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,CAAC,UAAU,GAAI,CAC3G,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\
|
|
1
|
+
{"version":3,"file":"FilterSort.js","sourceRoot":"","sources":["../../../../../src/components/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,YAAY,CAAC,OAAO,EAAE,CAAC;QAElC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACvB,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;SAC5B;aAAM;YACN,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;SACzB;IACF,CAAC;IAED,iBAAiB;QAChB,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;IAC1E,CAAC;IAED,oBAAoB;QACnB,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,cAAc,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;IAC7E,CAAC;IAED,MAAM;QACL,IAAI,UAAU,GAAG,YAAY,CAAC,OAAO,EAAE,CAAC;QACxC,OAAO,CACN,6BAAK,SAAS,EAAC,aAAa;YAC3B,oBAAC,SAAS,OAAG;YACb,oBAAC,QAAQ,OAAG;YACZ,oBAAC,MAAM,OAAG;YACV,oBAAC,QAAQ,IAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAC,OAAO,EAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,CAAC,UAAU,GAAI,CAC3G,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\nimport SearchBox from \"./SearchBox\";\nimport TagsMenu from \"../../../shared/TagsMenu\";\nimport SortBy from \"./SortBy\";\nimport TagsList from \"./TagsList\";\nimport { getStore } from \"../stores/LauncherStore\";\nimport storeActions from \"../stores/StoreActions\";\nimport StoreModel from \"@finsemble/finsemble-core/types/clients/StoreModel\";\n\ninterface IProps {}\n\ninterface IState {\n\ttags: string[];\n\tsearch: string;\n}\n\nlet store: StoreModel | undefined;\n\nexport default class FilterSort extends React.Component<IProps, IState> {\n\tconstructor(props: IProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\ttags: [],\n\t\t\tsearch: \"\",\n\t\t};\n\t\tthis.onSearch = this.onSearch.bind(this);\n\t\tthis.setStateValues = this.setStateValues.bind(this);\n\t\tstore = getStore();\n\t}\n\n\tsetStateValues() {\n\t\tthis.setState({\n\t\t\ttags: storeActions.getAllAppsTags(),\n\t\t});\n\t}\n\n\tonSearch(event: any) {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tsearch: event.target.value,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tgetStore()?.setValue({\n\t\t\t\t\tfield: \"filterText\",\n\t\t\t\t\tvalue: this.state.search,\n\t\t\t\t});\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * Add tag to list in local store\n\t * so that other components get notified\n\t **/\n\tonTagClick(tag: string) {\n\t\tlet tags = storeActions.getTags();\n\n\t\tif (tags.includes(tag)) {\n\t\t\tstoreActions.deleteTag(tag);\n\t\t} else {\n\t\t\tstoreActions.addTag(tag);\n\t\t}\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.setStateValues();\n\t\tstore?.addListener({ field: \"appFolders.folders\" }, this.setStateValues);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tstore?.removeListener({ field: \"appFolders.folders\" }, this.setStateValues);\n\t}\n\n\trender() {\n\t\tlet activeTags = storeActions.getTags();\n\t\treturn (\n\t\t\t<div className=\"filter-sort\">\n\t\t\t\t<SearchBox />\n\t\t\t\t<TagsList />\n\t\t\t\t<SortBy />\n\t\t\t\t<TagsMenu label=\"Tags\" align=\"right\" list={this.state.tags} active={activeTags} onItemClick={this.onTagClick} />\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FoldersList.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/FoldersList.tsx"],"names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AC;YACnC,OAAO,CACN,oBAAC,kBAAkB,IAAC,WAAW,EAAE,UAAU,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,IACnE,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC,CACzB,CACrB,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM;QACL,OAAO,CACN,6BAAK,SAAS,EAAC,KAAK;YACnB,6BAAK,SAAS,EAAC,aAAa,EAAC,GAAG,EAAE,IAAI,CAAC,OAAO;gBAC5C,IAAI,CAAC,wBAAwB,EAAE;gBAChC,oBAAC,mBAAmB,IAAC,SAAS,EAAE,IAAI,CAAC,SAAS,IAAG,IAAI,CAAC,sBAAsB,EAAE,CAAuB,CAChG,CACD,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\r\nimport storeActions from \"../stores/StoreActions\";\r\nimport { getStore } from \"../stores/LauncherStore\";\r\nimport { useFavorites } from \"../../../../hooks/useFavorites\";\r\nimport { FinsembleDraggable } from \"../../../legacyControls/FinsembleDraggable\";\r\nimport { FinsembleDnDContext } from \"../../../legacyControls/FinsembleDnDContext\";\r\nimport { FavoriteCategory, FolderAppType, FoldersType, FolderType } from \"../../../../types/advancedAppLauncherTypes\";\r\nimport { StandardError } from \"@finsemble/finsemble-core/types/types\";\r\nconst { ADVANCED_APP_LAUNCHER, DASHBOARDS, FAVORITES } = storeActions.getConstants();\r\n\r\nconst dragDisabled = storeActions.getDragDisabled();\r\n\r\ninterface IProps {}\r\n\r\ninterface IState {\r\n\tfoldersList: FoldersType[\"list\"];\r\n\tactiveFolder: string;\r\n\trenamingFolder: any | null;\r\n\tfolderNameInput: string;\r\n\tisNameError: boolean;\r\n}\r\nexport default class FoldersList extends React.Component<IProps, IState> {\r\n\tlistDiv: React.RefObject<HTMLDivElement> | undefined;\r\n\r\n\terrorInput: React.RefObject<HTMLInputElement> | undefined;\r\n\r\n\tmouseY: number | null;\r\n\r\n\tconstructor(props: IProps) {\r\n\t\tsuper(props);\r\n\t\tthis.state = {\r\n\t\t\tfoldersList: storeActions.getFoldersList(),\r\n\t\t\tactiveFolder: storeActions.getActiveFolderName(),\r\n\t\t\trenamingFolder: null,\r\n\t\t\tfolderNameInput: \"\",\r\n\t\t\tisNameError: false,\r\n\t\t};\r\n\t\t// Reference to ontainer element of folder list\r\n\t\tthis.listDiv = React.createRef();\r\n\t\tthis.renameFolder = this.renameFolder.bind(this);\r\n\t\tthis.changeFolderName = this.changeFolderName.bind(this);\r\n\t\tthis.cancelEdit = this.cancelEdit.bind(this);\r\n\t\tthis.onFoldersListUpdate = this.onFoldersListUpdate.bind(this);\r\n\t\tthis.keyPressed = this.keyPressed.bind(this);\r\n\t\tthis.deleteFolder = this.deleteFolder.bind(this);\r\n\t\tthis.onFocusRemove = this.onFocusRemove.bind(this);\r\n\t\tthis.onDragEnd = this.onDragEnd.bind(this);\r\n\t\tthis.onMouseMove = this.onMouseMove.bind(this);\r\n\t\tthis.animateErrorInput = this.animateErrorInput.bind(this);\r\n\r\n\t\t// The last known mouse Y position\r\n\t\tthis.mouseY = null;\r\n\r\n\t\t//Reference to a folder name input in error\r\n\t\tthis.errorInput = React.createRef();\r\n\t}\r\n\r\n\tanimateErrorInput() {\r\n\t\tif (this.errorInput?.current) {\r\n\t\t\tthis.errorInput.current.classList.remove(\"error\");\r\n\t\t\tconst flickerInput = setTimeout(() => {\r\n\t\t\t\tif (this.errorInput?.current) {\r\n\t\t\t\t\tthis.errorInput.current.classList.add(\"error\");\r\n\t\t\t\t}\r\n\t\t\t\tclearTimeout(flickerInput);\r\n\t\t\t}, 500);\r\n\t\t}\r\n\t}\r\n\r\n\tcancelEdit() {\r\n\t\tconsole.log(\"cancelling edit\");\r\n\t\tthis.setState({\r\n\t\t\trenamingFolder: null,\r\n\t\t\tisNameError: false,\r\n\t\t\tfolderNameInput: \"\",\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Keeps a track of the last mouse's clientY position\r\n\t * @param {MouseEvent} event The mouse move event\r\n\t */\r\n\tonMouseMove(event: MouseEvent) {\r\n\t\tthis.mouseY = event.clientY;\r\n\t}\r\n\r\n\tonDragEnd({ oldIndex, newIndex }: { oldIndex: number; newIndex: number }) {\r\n\t\tstoreActions.reorderFolders(oldIndex, newIndex);\r\n\t}\r\n\r\n\tonAppDrop(event: React.DragEvent, folder: string) {\r\n\t\tevent.preventDefault();\r\n\t\tconst app = JSON.parse(event.dataTransfer.getData(\"app\"));\r\n\t\t// Do not do anything if its Advanced App Launcher or dashboards folder\r\n\t\tif ([ADVANCED_APP_LAUNCHER, DASHBOARDS].indexOf(folder) < 0) {\r\n\t\t\tstoreActions.addAppToFolder(folder, app);\r\n\t\t}\r\n\t}\r\n\r\n\tonFoldersListUpdate(error: StandardError, data: { value: FoldersType[\"list\"] }) {\r\n\t\tthis.setState({\r\n\t\t\tfoldersList: data.value,\r\n\t\t});\r\n\t}\r\n\r\n\tonFolderClicked(event: React.MouseEvent, folder: string) {\r\n\t\tgetStore()?.setValue(\r\n\t\t\t{\r\n\t\t\t\tfield: \"activeFolder\",\r\n\t\t\t\tvalue: folder,\r\n\t\t\t},\r\n\t\t\t() => {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tactiveFolder: folder,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t);\r\n\t}\r\n\r\n\tonFocusRemove() {\r\n\t\tif (this.state.isNameError) {\r\n\t\t\tthis.animateErrorInput();\r\n\t\t}\r\n\t\t// If focus removed and nothing was type, then just hide\r\n\t\t// and consider it a rename cancel\r\n\t\tif (!this.state.folderNameInput) {\r\n\t\t\t// Cancel rename\r\n\t\t\tthis.setState({\r\n\t\t\t\trenamingFolder: null,\r\n\t\t\t\tisNameError: false,\r\n\t\t\t\tfolderNameInput: \"\",\r\n\t\t\t});\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// Finally, all good and so we can rename the folder\r\n\t\tthis.attemptRename();\r\n\t}\r\n\r\n\tUNSAFE_componentWillMount() {\r\n\t\tgetStore()?.addListener({ field: \"appFolders.list\" }, this.onFoldersListUpdate);\r\n\t\tdocument.addEventListener(\"mousemove\", this.onMouseMove);\r\n\t}\r\n\r\n\tcomponentWillUnmount() {\r\n\t\tgetStore()?.addListener({ field: \"appFolders.list\" }, this.onFoldersListUpdate);\r\n\t\tdocument.removeEventListener(\"mousemove\", this.onMouseMove);\r\n\t}\r\n\r\n\trenameFolder(name: string, e: React.MouseEvent) {\r\n\t\te.preventDefault();\r\n\t\te.stopPropagation();\r\n\t\tif (!this.state.isNameError) {\r\n\t\t\tthis.setState({\r\n\t\t\t\trenamingFolder: name,\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tchangeFolderName(e: React.ChangeEvent<HTMLInputElement>) {\r\n\t\tthis.setState({\r\n\t\t\tfolderNameInput: e.target.value,\r\n\t\t});\r\n\t}\r\n\r\n\tdeleteFolder(name: string, e: React.MouseEvent) {\r\n\t\te.stopPropagation();\r\n\t\te.preventDefault();\r\n\t\t// Do not attempt to delete if user is renaming a folder\r\n\t\t!this.state.renamingFolder && storeActions.deleteFolder(name);\r\n\t}\r\n\r\n\tkeyPressed(e: React.KeyboardEvent<HTMLInputElement>) {\r\n\t\tif (e.key === \"Enter\") {\r\n\t\t\tthis.attemptRename();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * To be called when user press Enter or when focus is removed\r\n\t */\r\n\tattemptRename() {\r\n\t\tconst folders = storeActions.getFolders();\r\n\t\tconst input = this.state.folderNameInput.trim();\r\n\t\tconst oldName = this.state.renamingFolder;\r\n\t\tlet newName = input;\r\n\t\t// Check user input to make sure its at least 1 character\r\n\t\t// made of string, number or both\r\n\t\tif (!/^([a-zA-Z0-9\\s]{1,})$/.test(input)) {\r\n\t\t\t// Do not rename\r\n\t\t\tconsole.warn(\"A valid folder name is required. /^([a-zA-Z0-9s]{1,})$/\");\r\n\t\t\treturn this.setState({\r\n\t\t\t\tisNameError: true,\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t// Check if the submission is the same text as the old name.\r\n\t\t// If false, renaming will be skipped\r\n\t\tlet nameChanged = true;\r\n\t\t// We no longer allow leading or trailing spaces, but the trim on the oldName needs to remain for any existing folders\r\n\t\tif (oldName.trim() === newName) nameChanged = false;\r\n\r\n\t\t// Names must be unique, folders cant share same names\r\n\t\tif (folders[newName]) {\r\n\t\t\tlet repeatedFolderIndex = 0;\r\n\t\t\tdo {\r\n\t\t\t\trepeatedFolderIndex++;\r\n\t\t\t} while (Object.keys(folders).includes(`${newName}(${repeatedFolderIndex})`));\r\n\t\t\tnewName = `${newName}(${repeatedFolderIndex})`;\r\n\t\t}\r\n\r\n\t\tthis.setState(\r\n\t\t\t{\r\n\t\t\t\tfolderNameInput: \"\",\r\n\t\t\t\trenamingFolder: null,\r\n\t\t\t\tisNameError: false,\r\n\t\t\t},\r\n\t\t\t() => {\r\n\t\t\t\tif (nameChanged) {\r\n\t\t\t\t\tstoreActions.renameFolder(oldName, newName);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Given some data, renders the basic folder structure that cannot be unordered. Used for orderable folders too. Those just get wrapped in a Draggable\r\n\t */\r\n\trenderFolder(folder: FolderType, folderName: string, index: number) {\r\n\t\tlet className = \"complex-menu-section-toggle\";\r\n\t\tif (this.state.activeFolder === folderName) {\r\n\t\t\tclassName = `${className} active-section-toggle`;\r\n\t\t}\r\n\t\tif (folder.icon) {\r\n\t\t\tclassName = `${className} folder-with-icon`;\r\n\t\t}\r\n\r\n\t\tconst { canDelete, canEdit } = folder;\r\n\r\n\t\tlet nameField,\r\n\t\t\tisEditing = false;\r\n\t\tif (this.state.renamingFolder === folderName && canEdit) {\r\n\t\t\tconst { isNameError } = this.state;\r\n\t\t\tnameField = (\r\n\t\t\t\t<input\r\n\t\t\t\t\tid=\"rename\"\r\n\t\t\t\t\tvalue={this.state.folderNameInput}\r\n\t\t\t\t\tonChange={this.changeFolderName}\r\n\t\t\t\t\tonKeyPress={this.keyPressed}\r\n\t\t\t\t\tonBlur={this.onFocusRemove}\r\n\t\t\t\t\tclassName={isNameError ? \"error\" : \"\"}\r\n\t\t\t\t\tautoFocus\r\n\t\t\t\t\tref={isNameError ? this.errorInput : null}\r\n\t\t\t\t/>\r\n\t\t\t);\r\n\t\t\tisEditing = true;\r\n\t\t} else if (folderName === \"Advanced App Launcher\") {\r\n\t\t\tnameField = \"App Launcher\";\r\n\t\t} else {\r\n\t\t\tnameField = folderName;\r\n\t\t}\r\n\r\n\t\ttype RenderFolderProps = {\r\n\t\t\tonDragOver: (e: React.DragEvent<HTMLDivElement>) => void;\r\n\t\t\tonDrop: (e: React.DragEvent<HTMLDivElement>) => void;\r\n\t\t\tonClick: (event: React.MouseEvent) => void;\r\n\t\t\tclassName: string;\r\n\t\t\tchildren?: React.ReactNode;\r\n\t\t\ttitle: string;\r\n\t\t};\r\n\t\tconst RenderFolder = (props: RenderFolderProps) => {\r\n\t\t\tconst { addFavorite, isFavorited, favorites } = useFavorites();\r\n\t\t\t// If an app is dropped in the Favorites folder, favorite the app\r\n\t\t\tconst onDrop = (e: React.DragEvent<HTMLDivElement>) => {\r\n\t\t\t\tprops.onDrop(e);\r\n\t\t\t\tconst app = JSON.parse(e.dataTransfer.getData(\"app\"));\r\n\t\t\t\tif (folderName === FAVORITES && !isFavorited(app.name)) {\r\n\t\t\t\t\tconst favoriteApp = {\r\n\t\t\t\t\t\tid: app.name,\r\n\t\t\t\t\t\tcategory: \"Application\" as FavoriteCategory,\r\n\t\t\t\t\t\tname: app.name,\r\n\t\t\t\t\t\ticon: app.icon,\r\n\t\t\t\t\t};\r\n\t\t\t\t\taddFavorite(favoriteApp);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t// When favorites changes remove all items from the favorites folder and re-add all current favorites.\r\n\t\t\tReact.useEffect(() => {\r\n\t\t\t\tconst existingFavApps: FolderAppType[] = storeActions.getAllAppsFromFolder(FAVORITES);\r\n\t\t\t\tObject.values(existingFavApps).forEach((app) => {\r\n\t\t\t\t\tif (!favorites.some((fav) => fav.name === app.name)) {\r\n\t\t\t\t\t\tstoreActions.removeAppFromFolder(\"Favorites\", app);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tfavorites.forEach((fav) => {\r\n\t\t\t\t\tconst app =\r\n\t\t\t\t\t\tstoreActions.findAppByField(\"name\", fav.name) || storeActions.findAppByField(\"displayName\", fav.name);\r\n\t\t\t\t\t// may have things other than favorites in here.\r\n\t\t\t\t\tif (app) {\r\n\t\t\t\t\t\tstoreActions.addAppToFolder(\"Favorites\", app);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}, [favorites]);\r\n\t\t\treturn (\r\n\t\t\t\t<div {...props} onDrop={onDrop}>\r\n\t\t\t\t\t{props.children}\r\n\t\t\t\t</div>\r\n\t\t\t);\r\n\t\t};\r\n\r\n\t\tconst showIcon = canEdit || canDelete;\r\n\r\n\t\tlet buttons;\r\n\t\tif (showIcon) {\r\n\t\t\tif (isEditing) {\r\n\t\t\t\t// We can't use onClick for these buttons because onBlur causes a re-render of these buttons which means mousedown and mouseup\r\n\t\t\t\t// technically don't fire on the same button. This means onClick is never fired, so we trigger the buttons on mousedown instead.\r\n\t\t\t\t// For more information see: https://www.eventbrite.com/engineering/a-story-of-a-react-re-rendering-bug/\r\n\t\t\t\tbuttons = (\r\n\t\t\t\t\t<span className=\"folder-action-icons\">\r\n\t\t\t\t\t\t<i\r\n\t\t\t\t\t\t\tid=\"confirm-edit\"\r\n\t\t\t\t\t\t\tclassName=\"ff-check-mark-2\"\r\n\t\t\t\t\t\t\ttitle=\"Accept Rename\"\r\n\t\t\t\t\t\t\tonMouseDown={this.attemptRename.bind(this)}\r\n\t\t\t\t\t\t></i>\r\n\t\t\t\t\t\t<i id=\"cancel-edit\" className=\"ff-close\" title=\"Cancel\" onMouseDown={this.cancelEdit.bind(this)}></i>\r\n\t\t\t\t\t</span>\r\n\t\t\t\t);\r\n\t\t\t} else {\r\n\t\t\t\tbuttons = (\r\n\t\t\t\t\t<span className=\"folder-action-icons\">\r\n\t\t\t\t\t\t{canEdit && (\r\n\t\t\t\t\t\t\t<i className=\"ff-adp-edit\" title=\"Rename\" onClick={this.renameFolder.bind(this, folderName)}></i>\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t{canDelete && (\r\n\t\t\t\t\t\t\t<i\r\n\t\t\t\t\t\t\t\tclassName=\"ff-adp-trash-outline\"\r\n\t\t\t\t\t\t\t\ttitle=\"Delete Folder\"\r\n\t\t\t\t\t\t\t\tonClick={this.deleteFolder.bind(this, folderName)}\r\n\t\t\t\t\t\t\t></i>\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t\t</span>\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// This DOM will be rendered within a draggable (if the folder can be dragged), and a plain ol div if it cannot be dragged.\r\n\t\treturn (\r\n\t\t\t<RenderFolder\r\n\t\t\t\tonDragOver={(event: React.DragEvent) => event.preventDefault()}\r\n\t\t\t\tonDrop={(event: React.DragEvent) => this.onAppDrop(event, folderName)}\r\n\t\t\t\tonClick={(event: React.MouseEvent) => this.onFolderClicked(event, folderName)}\r\n\t\t\t\tclassName={className}\r\n\t\t\t\tkey={index}\r\n\t\t\t\ttitle={folderName}\r\n\t\t\t>\r\n\t\t\t\t<div className=\"left-nav-label\">\r\n\t\t\t\t\t{folder.icon && <i className={folder.icon}></i>}\r\n\t\t\t\t\t<div className=\"folder-name\">{nameField}</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t{buttons}\r\n\t\t\t</RenderFolder>\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Render all folders that cannot be reordered.\r\n\t */\r\n\trenderUnorderableFolders() {\r\n\t\tconst folders: FoldersType[\"folders\"] = storeActions.getFolders();\r\n\t\tconst unorderableFolders: string[] = this.state.foldersList.filter(\r\n\t\t\t(folderName) => dragDisabled.includes(folderName) && folderName in folders\r\n\t\t);\r\n\t\treturn unorderableFolders.map((folderName: string, index) => {\r\n\t\t\tconst folder: FolderType = folders[folderName];\r\n\t\t\tfolder.icon = \"\";\r\n\t\t\treturn this.renderFolder(folder, folderName, index);\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Renders all folders that can be reordered (user created folders).\r\n\t */\r\n\trenderOrderableFolders() {\r\n\t\tconst folders = storeActions.getFolders();\r\n\t\tconst orderableFolders = this.state.foldersList.filter(\r\n\t\t\t(folderName) => !dragDisabled.includes(folderName) && folderName in folders\r\n\t\t);\r\n\t\treturn orderableFolders.map((folderName, index) => {\r\n\t\t\tconst folder = folders[folderName];\r\n\t\t\treturn (\r\n\t\t\t\t<FinsembleDraggable draggableId={folderName} key={index} index={index}>\r\n\t\t\t\t\t{this.renderFolder(folder, folderName, index)}\r\n\t\t\t\t</FinsembleDraggable>\r\n\t\t\t);\r\n\t\t});\r\n\t}\r\n\r\n\trender() {\r\n\t\treturn (\r\n\t\t\t<div className=\"top\">\r\n\t\t\t\t<div className=\"folder-list\" ref={this.listDiv}>\r\n\t\t\t\t\t{this.renderUnorderableFolders()}\r\n\t\t\t\t\t<FinsembleDnDContext onDragEnd={this.onDragEnd}>{this.renderOrderableFolders()}</FinsembleDnDContext>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"FoldersList.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/FoldersList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,EAAE,m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AAS,EAAC,KAAK;YACnB,6BAAK,SAAS,EAAC,aAAa,EAAC,GAAG,EAAE,IAAI,CAAC,OAAO;gBAC5C,IAAI,CAAC,wBAAwB,EAAE;gBAChC,oBAAC,mBAAmB,IAAC,SAAS,EAAE,IAAI,CAAC,SAAS,IAAG,IAAI,CAAC,sBAAsB,EAAE,CAAuB,CAChG,CACD,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\nimport storeActions from \"../stores/StoreActions\";\nimport { getStore } from \"../stores/LauncherStore\";\nimport { useFavorites } from \"../../../../hooks/useFavorites\";\nimport { FinsembleDraggable } from \"../../../legacyControls/FinsembleDraggable\";\nimport { FinsembleDnDContext } from \"../../../legacyControls/FinsembleDnDContext\";\nimport { FavoriteCategory, FolderAppType, FoldersType, FolderType } from \"../../../../types/advancedAppLauncherTypes\";\nimport { StandardError } from \"@finsemble/finsemble-core/types/types\";\nconst { ADVANCED_APP_LAUNCHER, DASHBOARDS, FAVORITES } = storeActions.getConstants();\n\nconst dragDisabled = storeActions.getDragDisabled();\n\ninterface IProps {}\n\ninterface IState {\n\tfoldersList: FoldersType[\"list\"];\n\tactiveFolder: string;\n\trenamingFolder: any | null;\n\tfolderNameInput: string;\n\tisNameError: boolean;\n}\nexport default class FoldersList extends React.Component<IProps, IState> {\n\tlistDiv: React.RefObject<HTMLDivElement> | undefined;\n\n\terrorInput: React.RefObject<HTMLInputElement> | undefined;\n\n\tmouseY: number | null;\n\n\tconstructor(props: IProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tfoldersList: storeActions.getFoldersList(),\n\t\t\tactiveFolder: storeActions.getActiveFolderName(),\n\t\t\trenamingFolder: null,\n\t\t\tfolderNameInput: \"\",\n\t\t\tisNameError: false,\n\t\t};\n\t\t// Reference to ontainer element of folder list\n\t\tthis.listDiv = React.createRef();\n\t\tthis.renameFolder = this.renameFolder.bind(this);\n\t\tthis.changeFolderName = this.changeFolderName.bind(this);\n\t\tthis.cancelEdit = this.cancelEdit.bind(this);\n\t\tthis.onFoldersListUpdate = this.onFoldersListUpdate.bind(this);\n\t\tthis.keyPressed = this.keyPressed.bind(this);\n\t\tthis.deleteFolder = this.deleteFolder.bind(this);\n\t\tthis.onFocusRemove = this.onFocusRemove.bind(this);\n\t\tthis.onDragEnd = this.onDragEnd.bind(this);\n\t\tthis.onMouseMove = this.onMouseMove.bind(this);\n\t\tthis.animateErrorInput = this.animateErrorInput.bind(this);\n\n\t\t// The last known mouse Y position\n\t\tthis.mouseY = null;\n\n\t\t//Reference to a folder name input in error\n\t\tthis.errorInput = React.createRef();\n\t}\n\n\tanimateErrorInput() {\n\t\tif (this.errorInput?.current) {\n\t\t\tthis.errorInput.current.classList.remove(\"error\");\n\t\t\tconst flickerInput = setTimeout(() => {\n\t\t\t\tif (this.errorInput?.current) {\n\t\t\t\t\tthis.errorInput.current.classList.add(\"error\");\n\t\t\t\t}\n\t\t\t\tclearTimeout(flickerInput);\n\t\t\t}, 500);\n\t\t}\n\t}\n\n\tcancelEdit() {\n\t\tconsole.log(\"cancelling edit\");\n\t\tthis.setState({\n\t\t\trenamingFolder: null,\n\t\t\tisNameError: false,\n\t\t\tfolderNameInput: \"\",\n\t\t});\n\t}\n\n\t/**\n\t * Keeps a track of the last mouse's clientY position\n\t * @param {MouseEvent} event The mouse move event\n\t */\n\tonMouseMove(event: MouseEvent) {\n\t\tthis.mouseY = event.clientY;\n\t}\n\n\tonDragEnd({ oldIndex, newIndex }: { oldIndex: number; newIndex: number }) {\n\t\tstoreActions.reorderFolders(oldIndex, newIndex);\n\t}\n\n\tonAppDrop(event: React.DragEvent, folder: string) {\n\t\tevent.preventDefault();\n\t\tconst app = JSON.parse(event.dataTransfer.getData(\"app\"));\n\t\t// Do not do anything if its Advanced App Launcher or dashboards folder\n\t\tif ([ADVANCED_APP_LAUNCHER, DASHBOARDS].indexOf(folder) < 0) {\n\t\t\tstoreActions.addAppToFolder(folder, app);\n\t\t}\n\t}\n\n\tonFoldersListUpdate(error: StandardError, data: { value: FoldersType[\"list\"] }) {\n\t\tthis.setState({\n\t\t\tfoldersList: data.value,\n\t\t});\n\t}\n\n\tonFolderClicked(event: React.MouseEvent, folder: string) {\n\t\tgetStore()?.setValue(\n\t\t\t{\n\t\t\t\tfield: \"activeFolder\",\n\t\t\t\tvalue: folder,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.setState({\n\t\t\t\t\tactiveFolder: folder,\n\t\t\t\t});\n\t\t\t}\n\t\t);\n\t}\n\n\tonFocusRemove() {\n\t\tif (this.state.isNameError) {\n\t\t\tthis.animateErrorInput();\n\t\t}\n\t\t// If focus removed and nothing was type, then just hide\n\t\t// and consider it a rename cancel\n\t\tif (!this.state.folderNameInput) {\n\t\t\t// Cancel rename\n\t\t\tthis.setState({\n\t\t\t\trenamingFolder: null,\n\t\t\t\tisNameError: false,\n\t\t\t\tfolderNameInput: \"\",\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\t// Finally, all good and so we can rename the folder\n\t\tthis.attemptRename();\n\t}\n\n\tUNSAFE_componentWillMount() {\n\t\tgetStore()?.addListener({ field: \"appFolders.list\" }, this.onFoldersListUpdate);\n\t\tdocument.addEventListener(\"mousemove\", this.onMouseMove);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tgetStore()?.addListener({ field: \"appFolders.list\" }, this.onFoldersListUpdate);\n\t\tdocument.removeEventListener(\"mousemove\", this.onMouseMove);\n\t}\n\n\trenameFolder(name: string, e: React.MouseEvent) {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\tif (!this.state.isNameError) {\n\t\t\tthis.setState({\n\t\t\t\trenamingFolder: name,\n\t\t\t});\n\t\t}\n\t}\n\n\tchangeFolderName(e: React.ChangeEvent<HTMLInputElement>) {\n\t\tthis.setState({\n\t\t\tfolderNameInput: e.target.value,\n\t\t});\n\t}\n\n\tdeleteFolder(name: string, e: React.MouseEvent) {\n\t\te.stopPropagation();\n\t\te.preventDefault();\n\t\t// Do not attempt to delete if user is renaming a folder\n\t\t!this.state.renamingFolder && storeActions.deleteFolder(name);\n\t}\n\n\tkeyPressed(e: React.KeyboardEvent<HTMLInputElement>) {\n\t\tif (e.key === \"Enter\") {\n\t\t\tthis.attemptRename();\n\t\t}\n\t}\n\n\t/**\n\t * To be called when user press Enter or when focus is removed\n\t */\n\tattemptRename() {\n\t\tconst folders = storeActions.getFolders();\n\t\tconst input = this.state.folderNameInput.trim();\n\t\tconst oldName = this.state.renamingFolder;\n\t\tlet newName = input;\n\t\t// Check user input to make sure its at least 1 character\n\t\t// made of string, number or both\n\t\tif (!/^([a-zA-Z0-9\\s]{1,})$/.test(input)) {\n\t\t\t// Do not rename\n\t\t\tconsole.warn(\"A valid folder name is required. /^([a-zA-Z0-9s]{1,})$/\");\n\t\t\treturn this.setState({\n\t\t\t\tisNameError: true,\n\t\t\t});\n\t\t}\n\n\t\t// Check if the submission is the same text as the old name.\n\t\t// If false, renaming will be skipped\n\t\tlet nameChanged = true;\n\t\t// We no longer allow leading or trailing spaces, but the trim on the oldName needs to remain for any existing folders\n\t\tif (oldName.trim() === newName) nameChanged = false;\n\n\t\t// Names must be unique, folders cant share same names\n\t\tif (folders[newName]) {\n\t\t\tlet repeatedFolderIndex = 0;\n\t\t\tdo {\n\t\t\t\trepeatedFolderIndex++;\n\t\t\t} while (Object.keys(folders).includes(`${newName}(${repeatedFolderIndex})`));\n\t\t\tnewName = `${newName}(${repeatedFolderIndex})`;\n\t\t}\n\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tfolderNameInput: \"\",\n\t\t\t\trenamingFolder: null,\n\t\t\t\tisNameError: false,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tif (nameChanged) {\n\t\t\t\t\tstoreActions.renameFolder(oldName, newName);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * Given some data, renders the basic folder structure that cannot be unordered. Used for orderable folders too. Those just get wrapped in a Draggable\n\t */\n\trenderFolder(folder: FolderType, folderName: string, index: number) {\n\t\tlet className = \"complex-menu-section-toggle\";\n\t\tif (this.state.activeFolder === folderName) {\n\t\t\tclassName = `${className} active-section-toggle`;\n\t\t}\n\t\tif (folder.icon) {\n\t\t\tclassName = `${className} folder-with-icon`;\n\t\t}\n\n\t\tconst { canDelete, canEdit } = folder;\n\n\t\tlet nameField,\n\t\t\tisEditing = false;\n\t\tif (this.state.renamingFolder === folderName && canEdit) {\n\t\t\tconst { isNameError } = this.state;\n\t\t\tnameField = (\n\t\t\t\t<input\n\t\t\t\t\tid=\"rename\"\n\t\t\t\t\tvalue={this.state.folderNameInput}\n\t\t\t\t\tonChange={this.changeFolderName}\n\t\t\t\t\tonKeyPress={this.keyPressed}\n\t\t\t\t\tonBlur={this.onFocusRemove}\n\t\t\t\t\tclassName={isNameError ? \"error\" : \"\"}\n\t\t\t\t\tautoFocus\n\t\t\t\t\tref={isNameError ? this.errorInput : null}\n\t\t\t\t/>\n\t\t\t);\n\t\t\tisEditing = true;\n\t\t} else if (folderName === \"Advanced App Launcher\") {\n\t\t\tnameField = \"App Launcher\";\n\t\t} else {\n\t\t\tnameField = folderName;\n\t\t}\n\n\t\ttype RenderFolderProps = {\n\t\t\tonDragOver: (e: React.DragEvent<HTMLDivElement>) => void;\n\t\t\tonDrop: (e: React.DragEvent<HTMLDivElement>) => void;\n\t\t\tonClick: (event: React.MouseEvent) => void;\n\t\t\tclassName: string;\n\t\t\tchildren?: React.ReactNode;\n\t\t\ttitle: string;\n\t\t};\n\t\tconst RenderFolder = (props: RenderFolderProps) => {\n\t\t\tconst { addFavorite, isFavorited, favorites } = useFavorites();\n\t\t\t// If an app is dropped in the Favorites folder, favorite the app\n\t\t\tconst onDrop = (e: React.DragEvent<HTMLDivElement>) => {\n\t\t\t\tprops.onDrop(e);\n\t\t\t\tconst app = JSON.parse(e.dataTransfer.getData(\"app\"));\n\t\t\t\tif (folderName === FAVORITES && !isFavorited(app.name)) {\n\t\t\t\t\tconst favoriteApp = {\n\t\t\t\t\t\tid: app.name,\n\t\t\t\t\t\tcategory: \"Application\" as FavoriteCategory,\n\t\t\t\t\t\tname: app.name,\n\t\t\t\t\t\ticon: app.icon,\n\t\t\t\t\t};\n\t\t\t\t\taddFavorite(favoriteApp);\n\t\t\t\t}\n\t\t\t};\n\t\t\t// When favorites changes remove all items from the favorites folder and re-add all current favorites.\n\t\t\tReact.useEffect(() => {\n\t\t\t\tconst existingFavApps: FolderAppType[] = storeActions.getAllAppsFromFolder(FAVORITES);\n\t\t\t\tObject.values(existingFavApps).forEach((app) => {\n\t\t\t\t\tif (!favorites.some((fav) => fav.name === app.name)) {\n\t\t\t\t\t\tstoreActions.removeAppFromFolder(\"Favorites\", app);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tfavorites.forEach((fav) => {\n\t\t\t\t\tconst app =\n\t\t\t\t\t\tstoreActions.findAppByField(\"name\", fav.name) || storeActions.findAppByField(\"displayName\", fav.name);\n\t\t\t\t\t// may have things other than favorites in here.\n\t\t\t\t\tif (app) {\n\t\t\t\t\t\tstoreActions.addAppToFolder(\"Favorites\", app);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}, [favorites]);\n\t\t\treturn (\n\t\t\t\t<div {...props} onDrop={onDrop}>\n\t\t\t\t\t{props.children}\n\t\t\t\t</div>\n\t\t\t);\n\t\t};\n\n\t\tconst showIcon = canEdit || canDelete;\n\n\t\tlet buttons;\n\t\tif (showIcon) {\n\t\t\tif (isEditing) {\n\t\t\t\t// We can't use onClick for these buttons because onBlur causes a re-render of these buttons which means mousedown and mouseup\n\t\t\t\t// technically don't fire on the same button. This means onClick is never fired, so we trigger the buttons on mousedown instead.\n\t\t\t\t// For more information see: https://www.eventbrite.com/engineering/a-story-of-a-react-re-rendering-bug/\n\t\t\t\tbuttons = (\n\t\t\t\t\t<span className=\"folder-action-icons\">\n\t\t\t\t\t\t<i\n\t\t\t\t\t\t\tid=\"confirm-edit\"\n\t\t\t\t\t\t\tclassName=\"ff-check-mark-2\"\n\t\t\t\t\t\t\ttitle=\"Accept Rename\"\n\t\t\t\t\t\t\tonMouseDown={this.attemptRename.bind(this)}\n\t\t\t\t\t\t></i>\n\t\t\t\t\t\t<i id=\"cancel-edit\" className=\"ff-close\" title=\"Cancel\" onMouseDown={this.cancelEdit.bind(this)}></i>\n\t\t\t\t\t</span>\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tbuttons = (\n\t\t\t\t\t<span className=\"folder-action-icons\">\n\t\t\t\t\t\t{canEdit && (\n\t\t\t\t\t\t\t<i className=\"ff-adp-edit\" title=\"Rename\" onClick={this.renameFolder.bind(this, folderName)}></i>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{canDelete && (\n\t\t\t\t\t\t\t<i\n\t\t\t\t\t\t\t\tclassName=\"ff-adp-trash-outline\"\n\t\t\t\t\t\t\t\ttitle=\"Delete Folder\"\n\t\t\t\t\t\t\t\tonClick={this.deleteFolder.bind(this, folderName)}\n\t\t\t\t\t\t\t></i>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</span>\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// This DOM will be rendered within a draggable (if the folder can be dragged), and a plain ol div if it cannot be dragged.\n\t\treturn (\n\t\t\t<RenderFolder\n\t\t\t\tonDragOver={(event: React.DragEvent) => event.preventDefault()}\n\t\t\t\tonDrop={(event: React.DragEvent) => this.onAppDrop(event, folderName)}\n\t\t\t\tonClick={(event: React.MouseEvent) => this.onFolderClicked(event, folderName)}\n\t\t\t\tclassName={className}\n\t\t\t\tkey={index}\n\t\t\t\ttitle={folderName}\n\t\t\t>\n\t\t\t\t<div className=\"left-nav-label\">\n\t\t\t\t\t{folder.icon && <i className={folder.icon}></i>}\n\t\t\t\t\t<div className=\"folder-name\">{nameField}</div>\n\t\t\t\t</div>\n\t\t\t\t{buttons}\n\t\t\t</RenderFolder>\n\t\t);\n\t}\n\n\t/**\n\t * Render all folders that cannot be reordered.\n\t */\n\trenderUnorderableFolders() {\n\t\tconst folders: FoldersType[\"folders\"] = storeActions.getFolders();\n\t\tconst unorderableFolders: string[] = this.state.foldersList.filter(\n\t\t\t(folderName) => dragDisabled.includes(folderName) && folderName in folders\n\t\t);\n\t\treturn unorderableFolders.map((folderName: string, index) => {\n\t\t\tconst folder: FolderType = folders[folderName];\n\t\t\tfolder.icon = \"\";\n\t\t\treturn this.renderFolder(folder, folderName, index);\n\t\t});\n\t}\n\n\t/**\n\t * Renders all folders that can be reordered (user created folders).\n\t */\n\trenderOrderableFolders() {\n\t\tconst folders = storeActions.getFolders();\n\t\tconst orderableFolders = this.state.foldersList.filter(\n\t\t\t(folderName) => !dragDisabled.includes(folderName) && folderName in folders\n\t\t);\n\t\treturn orderableFolders.map((folderName, index) => {\n\t\t\tconst folder = folders[folderName];\n\t\t\treturn (\n\t\t\t\t<FinsembleDraggable draggableId={folderName} key={index} index={index}>\n\t\t\t\t\t{this.renderFolder(folder, folderName, index)}\n\t\t\t\t</FinsembleDraggable>\n\t\t\t);\n\t\t});\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<div className=\"top\">\n\t\t\t\t<div className=\"folder-list\" ref={this.listDiv}>\n\t\t\t\t\t{this.renderUnorderableFolders()}\n\t\t\t\t\t<FinsembleDnDContext onDragEnd={this.onDragEnd}>{this.renderOrderableFolders()}</FinsembleDnDContext>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeftNavBottomLinks.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAgB1C,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,KAAK,CAAC,SAAyB;IAC9E,YAAY,KAAa;QACxB,KAAK,CAA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A+B,CAAC;gBACnG,OAAO,CACN,6BAAK,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,IACrD,KAAK,CAAC,IAAI,CACN,CACN,CAAC;YACH,CAAC,CAAC,CACG,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\
|
|
1
|
+
{"version":3,"file":"LeftNavBottomLinks.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAgB1C,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,KAAK,CAAC,SAAyB;IAC9E,YAAY,KAAa;QACxB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,aAAa,EAAE;gBACd,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,gBAAgB,EAAE;gBAC5C;oBACC,IAAI,EAAE,kBAAkB;oBACxB,IAAI,EAAE,eAAe;oBACrB,KAAK,EAAE,aAAa;iBACpB;aACD;SACD,CAAC;QAKF,IAAI,KAAK,CAAC,qBAAqB,EAAE;YAChC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC;gBAC7B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,eAAe;aACtB,CAAC,CAAC;SACH;IACF,CAAC;IAED,yBAAyB;QAGxB,eAAe,CAAC,UAAU,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;;YACxC,MAAM,aAAa,GAAG,MAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,UAAU,0CAAE,SAAS,0CAAE,aAAa,CAAC;YACjE,IAAI,aAAa,EAAE;gBAClB,I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AAK,QAAQ,CAAC;oBACd;wBACC,OAAO;iBACR;aACD;QACF,CAAC,CACD,CAAC;IACH,CAAC;IAED,MAAM;QACL,OAAO,CACN,6BAAK,SAAS,EAAC,QAAQ;YACtB,oBAAC,YAAY,OAAG;YACf,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;gBAC9C,IAAI,OAAO,GAAG,KAAK,CAAC,KAAK;oBACxB,CAAC,CAAE,IAA+B,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC;oBAC1E,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC;gBACtB,IAAI,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI,sBAAsB,CAAC,CAAC,CAAC,+BAA+B,CAAC;gBACnG,OAAO,CACN,6BAAK,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,IACrD,KAAK,CAAC,IAAI,CACN,CACN,CAAC;YACH,CAAC,CAAC,CACG,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\nimport { getStore } from \"../stores/LauncherStore\";\nimport AddNewFolder from \"./AddNewFolder\";\n\ninterface IProps {\n\tenableQuickComponents: boolean;\n\topenAppMarket: () => void;\n\t[prop: string]: string | boolean | (() => void);\n}\n\ninterface IState {\n\tbottomEntries: {\n\t\tname: string;\n\t\tclick: string;\n\t\ticon?: string;\n\t}[];\n}\n\nexport default class LeftNavBottomLinks extends React.Component<IProps, IState> {\n\tconstructor(props: IProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tbottomEntries: [\n\t\t\t\t{ name: \"New App\", click: \"showAddAppForm\" },\n\t\t\t\t{\n\t\t\t\t\tname: \"Restore Defaults\",\n\t\t\t\t\ticon: \"ff-arrow-back\",\n\t\t\t\t\tclick: \"removeStore\",\n\t\t\t\t},\n\t\t\t],\n\t\t};\n\n\t\t// Display the menu item for adding a quick component only if the prop has been explicitly\n\t\t// turned on. This is passed all the way down from AdvancedAppLauncher.\n\t\t// DEPRECATED: Quick Components is deprecated and will be removed in a future version\n\t\tif (props.enableQuickComponents) {\n\t\t\tthis.state.bottomEntries.push({\n\t\t\t\tname: \"App Catalog\",\n\t\t\t\ticon: \"ff-list\",\n\t\t\t\tclick: \"openAppMarket\",\n\t\t\t});\n\t\t}\n\t}\n\n\tUNSAFE_componentWillMount() {\n\t\t// If user configures the advanced app launcher to use the app catalog, add app catalog button to the bottom entries of the\n\t\t// advanced app launcher menu.\n\t\tfinsembleWindow.getOptions((err, opts) => {\n\t\t\tconst useAppCatalog = opts?.customData?.component?.useAppCatalog;\n\t\t\tif (useAppCatalog) {\n\t\t\t\tthis.setState((prevState) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tbottomEntries: [\n\t\t\t\t\t\t\t...prevState.bottomEntries,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: \"App Catalog\",\n\t\t\t\t\t\t\t\ticon: \"ff-list\",\n\t\t\t\t\t\t\t\tclick: \"openAppMarket\",\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});\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Sets isFormVisible to true in store so that main component\n\t * renders the AddNewAppForm component or removes it\n\t */\n\tshowAddAppForm() {\n\t\tgetStore()?.setValue(\n\t\t\t{\n\t\t\t\tfield: \"isFormVisible\",\n\t\t\t\tvalue: true,\n\t\t\t},\n\t\t\t(error) => {\n\t\t\t\terror && console.log(\"Failed to set isFormVisible to true\");\n\t\t\t}\n\t\t);\n\t}\n\n\tremoveStore() {\n\t\tFSBL.Clients.DialogManager.open(\n\t\t\t\"yesNo\",\n\t\t\t{\n\t\t\t\tmonitor: \"primary\",\n\t\t\t\ttitle: \"Restore App Launcher?\",\n\t\t\t\tquestion: \"The application will restart and restore the app launcher to its default state.\",\n\t\t\t\tshowTimer: false,\n\t\t\t\tincludeNegative: false,\n\t\t\t\tincludeCancel: true,\n\t\t\t\tshowCancelButton: true,\n\t\t\t\tshowNegativeButton: false,\n\t\t\t\taffirmativeResponseLabel: \"Restore\",\n\t\t\t},\n\t\t\t(err, response) => {\n\t\t\t\tconst { choice } = response;\n\t\t\t\tif (choice) {\n\t\t\t\t\tswitch (choice) {\n\t\t\t\t\t\tcase \"affirmative\":\n\t\t\t\t\t\t\tFSBL.Clients.DistributedStoreClient.removeStore(\n\t\t\t\t\t\t\t\t{ store: \"Finsemble-AppLauncher-Store\", global: true },\n\t\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\t\tFSBL.restartApplication();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\tcase \"negative\":\n\t\t\t\t\t\tcase \"cancel\":\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<div className=\"bottom\">\n\t\t\t\t<AddNewFolder />\n\t\t\t\t{this.state.bottomEntries.map((entry, index) => {\n\t\t\t\t\tlet handler = entry.click\n\t\t\t\t\t\t? (this as { [key: string]: any })[entry.click] || this.props[entry.click]\n\t\t\t\t\t\t: Function.prototype;\n\t\t\t\t\tlet className = entry.icon ? `${entry.icon} complex-menu-action` : \"ff-plus-2 complex-menu-action\";\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div className={className} key={index} onClick={handler}>\n\t\t\t\t\t\t\t{entry.name}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoAppsFound.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/NoAppsFound.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,KAAK,CAAC,SAAyB;IACvE,YAAY,KAAa;QACxB,KAAK,CAAC,KAAK,CAAC,CAAC;IACd,CAAC;IAED,MAAM;QACL,OAAO,CACN,6BAAK,SAAS,EAAC,YAAY,IACzB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,CAC3C,8BAAM,GAAG,EAAE,KAAK,IAAG,OAAO,CAAQ,CAClC,CAAC,CACG,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\
|
|
1
|
+
{"version":3,"file":"NoAppsFound.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/NoAppsFound.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,KAAK,CAAC,SAAyB;IACvE,YAAY,KAAa;QACxB,KAAK,CAAC,KAAK,CAAC,CAAC;IACd,CAAC;IAED,MAAM;QACL,OAAO,CACN,6BAAK,SAAS,EAAC,YAAY,IACzB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,CAC3C,8BAAM,GAAG,EAAE,KAAK,IAAG,OAAO,CAAQ,CAClC,CAAC,CACG,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\n\ninterface IProps {\n\tmessage: (string | JSX.Element)[];\n}\n\ninterface IState {}\n\nexport default class NoAppsFound extends React.Component<IProps, IState> {\n\tconstructor(props: IProps) {\n\t\tsuper(props);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<div className=\"no-results\">\n\t\t\t\t{this.props.message.map((message, index) => (\n\t\t\t\t\t<span key={index}>{message}</span>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBox.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/SearchBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAQlD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,KAAK,CAAC,SAAyB;IAGrE,YAAY,KAAa;QACxB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;QACnC,IAAI,CAAC,KAAK,GAAG;YACZ,MAAM,EAAE,YAAY,CAAC,aAAa,EAAE;SACpC,CAAC;QACF,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChE,CAAC;IAKD,QAAQ,CAAC,KAA0C;;QAClD,MAAA,QAAQ,EAAE,0CAAE,QAAQ,CAAC;YACpB,KAAK,EAAE,YAAY;YACnB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK;SACzB,CAAC,CAAC;IACJ,CAAC;IAED,WAAW;;QACV,MAAA,QAAQ,EAAE,0CAAE,QAAQ,CAAC;YACpB,KAAK,EAAE,YAAY;YACnB,KAAK,EAAE,IAAI;SACX,CAAC,CAAC;QACH,IAAI,CAAC,KAAK,EAAE,CAAC;IACd,CAAC;IAED,mBAAmB,CAAC,KAAU,EAAE,MAAW;QAC1C,IAAI,CAAC,QAAQ,CAAC;YACb,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,EAAE;SAC1B,CAAC,CAAC;IACJ,CAAC;IAED,KAAK;;QACJ,MAAA,MAAA,IAAI,CAAC,SAAS,0CAAE,OAAO,0CAAE,KAAK,EAAE,CAAC;IAClC,CAAC;IAED,yBAAyB;;QACxB,MAAA,QAAQ,EAAE,0CAAE,WAAW,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;IAC5E,CAAC;IAED,oBAAoB;;QACnB,MAAA,QAAQ,EAAE,0CAAE,cAAc,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;IAC/E,CAAC;IAED,MAAM;QACL,OAAO,CACN,6BAAK,SAAS,EAAC,YAAY;YAC1B,2BAAG,SAAS,EAAC,WAAW,GAAG;YAC3B,+BACC,QAAQ,QACR,SAAS,EAAC,WAAW,EACrB,GAAG,EAAE,IAAI,CAAC,SAAS,EACnB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EACxB,IAAI,EAAC,MAAM,EACX,WAAW,EAAC,QAAQ,EACpB,QAAQ,EAAE,IAAI,CAAC,QAAQ,GACtB;YACF,gCAAQ,SAAS,EAAC,YAAY,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,EAAC,OAAO,GAAU,CAC3E,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\
|
|
1
|
+
{"version":3,"file":"SearchBox.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/SearchBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,y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AK,EAAE,CAAC;IAClC,CAAC;IAED,yBAAyB;;QACxB,MAAA,QAAQ,EAAE,0CAAE,WAAW,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;IAC5E,CAAC;IAED,oBAAoB;;QACnB,MAAA,QAAQ,EAAE,0CAAE,cAAc,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;IAC/E,CAAC;IAED,MAAM;QACL,OAAO,CACN,6BAAK,SAAS,EAAC,YAAY;YAC1B,2BAAG,SAAS,EAAC,WAAW,GAAG;YAC3B,+BACC,QAAQ,QACR,SAAS,EAAC,WAAW,EACrB,GAAG,EAAE,IAAI,CAAC,SAAS,EACnB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EACxB,IAAI,EAAC,MAAM,EACX,WAAW,EAAC,QAAQ,EACpB,QAAQ,EAAE,IAAI,CAAC,QAAQ,GACtB;YACF,gCAAQ,SAAS,EAAC,YAAY,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,EAAC,OAAO,GAAU,CAC3E,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\nimport { getStore } from \"../stores/LauncherStore\";\nimport storeActions from \"../stores/StoreActions\";\n\ninterface IProps {}\n\ninterface IState {\n\tsearch: string;\n}\n\nexport default class SearchBox extends React.Component<IProps, IState> {\n\ttextInput: React.RefObject<HTMLInputElement> | undefined;\n\n\tconstructor(props: IProps) {\n\t\tsuper(props);\n\t\tthis.textInput = React.createRef();\n\t\tthis.state = {\n\t\t\tsearch: storeActions.getSearchText(),\n\t\t};\n\t\tthis.onSearch = this.onSearch.bind(this);\n\t\tthis.clearSearch = this.clearSearch.bind(this);\n\t\tthis.focus = this.focus.bind(this);\n\t\tthis.onFilterTextUpdated = this.onFilterTextUpdated.bind(this);\n\t}\n\n\t// Push value to store, which will come back to us via an update.\n\t// This redirection is necessary so that other parts of the program can\n\t// change filterText and the searchBox will actually update.\n\tonSearch(event: React.ChangeEvent<HTMLInputElement>) {\n\t\tgetStore()?.setValue({\n\t\t\tfield: \"filterText\",\n\t\t\tvalue: event.target.value,\n\t\t});\n\t}\n\n\tclearSearch() {\n\t\tgetStore()?.setValue({\n\t\t\tfield: \"filterText\",\n\t\t\tvalue: null,\n\t\t});\n\t\tthis.focus();\n\t}\n\n\tonFilterTextUpdated(error: any, update: any) {\n\t\tthis.setState({\n\t\t\tsearch: update.value || \"\",\n\t\t});\n\t}\n\n\tfocus() {\n\t\tthis.textInput?.current?.focus();\n\t}\n\n\tUNSAFE_componentWillMount() {\n\t\tgetStore()?.addListener({ field: \"filterText\" }, this.onFilterTextUpdated);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tgetStore()?.removeListener({ field: \"filterText\" }, this.onFilterTextUpdated);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<div className=\"search-box\">\n\t\t\t\t<i className=\"ff-search\" />\n\t\t\t\t<input\n\t\t\t\t\trequired\n\t\t\t\t\tclassName=\"input-box\"\n\t\t\t\t\tref={this.textInput}\n\t\t\t\t\tvalue={this.state.search}\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tplaceholder=\"Search\"\n\t\t\t\t\tonChange={this.onSearch}\n\t\t\t\t/>\n\t\t\t\t<button className=\"close-icon\" onClick={this.clearSearch} type=\"reset\"></button>\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortBy.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/SortBy.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,aAAa,MAAM,yBAAyB,CAAC;AAOpD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,KAAK,CAAC,SAAyB;IAClE,YAAY,KAAa;QACxB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,MAAM,EAAE,YAAY,CAAC,SAAS,EAAE;SAChC,CAAC;QACF,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;IAED,aAAa,CAAC,MAAc;QAC3B,IAAI,CAAC,QAAQ,CACZ;YACC,MAAM,EAAE,MAAM;SACd,EACD,GAAG,EAAE;;YACJ,MAAA,QAAQ,EAAE,0CAAE,QAAQ,CAAC;gBACpB,KAAK,EAAE,QAAQ;gBACf,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;aACxB,CAAC,CAAC;QACJ,CAAC,CACD,CAAC;IACH,CAAC;IAED,iBAAiB;QAChB,OAAO,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YACvD,IAAI,OAAO,GAAG,sBAAsB,CAAC;YACrC,IAAI,MAAM,KAAK,IAAI,CAAC,KAAK,CAAC,MAAM;gBAAE,OAAO,GAAG,GAAG,OAAO,SAAS,CAAC;YAChE,OAAO,CACN,8BAAM,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,OAAO,IAC7E,MAAM,CACD,CACP,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM;QACL,OAAO,6BAAK,SAAS,EAAC,MAAM;;YAAW,IAAI,CAAC,iBAAiB,EAAE,CAAO,CAAC;IACxE,CAAC;CACD","sourcesContent":["import React from \"react\";\
|
|
1
|
+
{"version":3,"file":"SortBy.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/SortBy.tsx"],"names":[],"mappings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MAAM;;YAAW,IAAI,CAAC,iBAAiB,EAAE,CAAO,CAAC;IACxE,CAAC;CACD","sourcesContent":["import React from \"react\";\nimport { getStore } from \"../stores/LauncherStore\";\nimport storeActions from \"../stores/StoreActions\";\nimport sortFunctions from \"../utils/sort-functions\";\n\ninterface IProps {}\ninterface IState {\n\tsortBy: string;\n}\n\nexport default class SortBy extends React.Component<IProps, IState> {\n\tconstructor(props: IProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tsortBy: storeActions.getSortBy(),\n\t\t};\n\t\tthis.onOptionClick = this.onOptionClick.bind(this);\n\t}\n\n\tonOptionClick(option: string) {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tsortBy: option,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tgetStore()?.setValue({\n\t\t\t\t\tfield: \"sortBy\",\n\t\t\t\t\tvalue: this.state.sortBy,\n\t\t\t\t});\n\t\t\t}\n\t\t);\n\t}\n\n\trenderOptionsList() {\n\t\treturn Object.keys(sortFunctions).map((option, index) => {\n\t\t\tlet classes = \"sort-option pointer \";\n\t\t\tif (option === this.state.sortBy) classes = `${classes} active`;\n\t\t\treturn (\n\t\t\t\t<span key={index} onClick={() => this.onOptionClick(option)} className={classes}>\n\t\t\t\t\t{option}\n\t\t\t\t</span>\n\t\t\t);\n\t\t});\n\t}\n\n\trender() {\n\t\treturn <div className=\"sort\">Sort by: {this.renderOptionsList()}</div>;\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagsList.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/TagsList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,qBAAqB,CAAC;AACtC,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAUnD,IAAI,KAA6B,CAAC;AAElC,MAAM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,CAAC;IAED,MAAM;QACL,OAAO,6BAAK,SAAS,EAAC,WAAW,IAAE,IAAI,CAAC,cAAc,EAAE,CAAO,CAAC;IACjE,CAAC;CACD","sourcesContent":["import React from \"react\";\
|
|
1
|
+
{"version":3,"file":"TagsList.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/TagsList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,qBAAqB,CAAC;AACtC,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAUnD,IAAI,KAA6B,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,KAAK,CAAC,SAAyB;IACpE,YAAY,KAAa;QACxB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,IAAI,EAAE,YAAY,CAAC,OAAO,EAAE;SAC5B,CAAC;QACF,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/C,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvD,KAAK,GAAG,QAAQ,EAAE,CAAC;IACpB,CAAC;IAED,WAAW,CAAC,GAAW;QACtB,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;IAED,eAAe,CAAC,KAAoB,EAAE,IAAyB;QAC9D,IAAI,CAAC,QAAQ,CAAC;YACb,IAAI,EAAE,IAAI,CAAC,KAAK;SAChB,CAAC,CAAC;IACJ,CAAC;IAED,iBAAiB;QAChB,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;IAC3E,CAAC;IAED,oBAAoB;QACnB,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,cAAc,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;IAC9E,CAAC;IAED,cAAc;QACb,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC;QAClC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,oBAAC,GAAG,IAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,WAAW,GAAI,CAAC,CAAC;IACzG,CAAC;IAED,MAAM;QACL,OAAO,6BAAK,SAAS,EAAC,WAAW,IAAE,IAAI,CAAC,cAAc,EAAE,CAAO,CAAC;IACjE,CAAC;CACD","sourcesContent":["import React from \"react\";\nimport Tag from \"../../../shared/Tag\";\nimport storeActions from \"../stores/StoreActions\";\nimport { getStore } from \"../stores/LauncherStore\";\nimport StoreModel from \"@finsemble/finsemble-core/types/clients/StoreModel\";\nimport { StandardError } from \"@finsemble/finsemble-core/types/types\";\n\ninterface IProps {}\n\ninterface IState {\n\ttags: string[];\n}\n\nlet store: StoreModel | undefined;\n\nexport default class TagsList extends React.Component<IProps, IState> {\n\tconstructor(props: IProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\ttags: storeActions.getTags(),\n\t\t};\n\t\tthis.onTagDelete = this.onTagDelete.bind(this);\n\t\tthis.onTagListUpdate = this.onTagListUpdate.bind(this);\n\t\tstore = getStore();\n\t}\n\n\tonTagDelete(tag: string) {\n\t\tstoreActions.deleteTag(tag);\n\t}\n\n\tonTagListUpdate(error: StandardError, data: { value: string[] }) {\n\t\tthis.setState({\n\t\t\ttags: data.value,\n\t\t});\n\t}\n\n\tcomponentDidMount() {\n\t\tstore?.addListener({ field: \"activeLauncherTags\" }, this.onTagListUpdate);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tstore?.removeListener({ field: \"activeLauncherTags\" }, this.onTagListUpdate);\n\t}\n\n\trenderTagsList() {\n\t\tif (!this.state.tags) return null;\n\t\treturn this.state.tags.map((tag, index) => <Tag key={index} name={tag} removeTag={this.onTagDelete} />);\n\t}\n\n\trender() {\n\t\treturn <div className=\"tags-list\">{this.renderTagsList()}</div>;\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagsMenu.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/TagsMenu.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAmB1B,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,KAAK,CAAC,SAAyB;IACpE,YAAY,KAAa;QACxB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,SAAS,EAAE,KAAK;SAChB,CAAC;QAEF,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IAED,UAAU;QACT,IAAI,CAAC,QAAQ,CAAC;YACb,SAAS,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS;SAChC,CAAC,CAAC;IACJ,CAAC;IAED,WAAW,CAAC,IAAY;QACvB,IAAI,CAAC,QAAQ,CAAC;YACb,SAAS,EAAE,KAAK;SAChB,CAAC,CAAC;QACH,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,UAAU;QACT,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;QAC9B,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;QACzE,OAAO,CACN,6BAAK,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,EAAE,GAAE,CAAC,EAAE,SAAS,EAAC,WAAW,EAAC,KAAK,EAAE,MAAM;YACxG;gBACE,GAAG;gBACH,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC3B,4BAAI,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IACnD,IAAI,CACD,CACL,CAAC;gBAAE,GAAG,CACH,CACA,CACN,CAAC;IACH,CAAC;IAED,MAAM;QACL,OAAO,CACN,6BAAK,SAAS,EAAC,mBAAmB,EAAC,OAAO,EAAE,IAAI,CAAC,UAAU;YAC1D;gBACC,2BAAG,SAAS,EAAC,QAAQ,GAAG;gBACvB,IAAI,CAAC,KAAK,CAAC,KAAK,CACX;YACN,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,UAAU,EAAE,CACrC,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["/*!\
|
|
1
|
+
{"version":3,"file":"TagsMenu.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/advancedAppLauncher/components/TagsMenu.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAmB1B,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,KAAK,CAAC,SAAyB;IACpE,YAAY,KAAa;QACxB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,SAAS,EAAE,KAAK;SAChB,CAAC;QAEF,IAAI,CAAC,UAAU,GAAG,IA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C1D;gBACC,2BAAG,SAAS,EAAC,QAAQ,GAAG;gBACvB,IAAI,CAAC,KAAK,CAAC,KAAK,CACX;YACN,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,UAAU,EAAE,CACrC,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["/*!\n * Copyright 2018 by ChartIQ, Inc.\n * All rights reserved.\n *\n */\n\nimport React from \"react\";\n\ninterface IProps {\n\tonItemClick: (item: string) => void;\n\tlist: string[];\n\tlabel: string;\n\talign: string;\n}\n\ninterface IState {\n\tisVisible: boolean;\n}\n\n/**\n * A reusable fly out component for tags and any other lists\n * This component creates a button with a customizable label\n * and an item click handler.\n * Example: <TagsMenu label=\"Tags\" align=\"left\" list={list} onItemClick={handler}/>\n **/\nexport default class TagsMenu extends React.Component<IProps, IState> {\n\tconstructor(props: IProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tisVisible: false,\n\t\t};\n\t\t// Bind context\n\t\tthis.toggleMenu = this.toggleMenu.bind(this);\n\t\tthis.onItemClick = this.onItemClick.bind(this);\n\t}\n\n\ttoggleMenu() {\n\t\tthis.setState({\n\t\t\tisVisible: !this.state.isVisible,\n\t\t});\n\t}\n\n\tonItemClick(item: string) {\n\t\tthis.setState({\n\t\t\tisVisible: false,\n\t\t});\n\t\tthis.props.onItemClick(item);\n\t}\n\n\trenderList() {\n\t\tconst items = this.props.list;\n\t\tconst styles = this.props.align === \"right\" ? { right: 0 } : { left: 0 };\n\t\treturn (\n\t\t\t<div onMouseLeave={this.state.isVisible ? this.toggleMenu : () => {}} className=\"tags-menu\" style={styles}>\n\t\t\t\t<ul>\n\t\t\t\t\t{\" \"}\n\t\t\t\t\t{items.map((item, index) => (\n\t\t\t\t\t\t<li key={index} onClick={() => this.onItemClick(item)}>\n\t\t\t\t\t\t\t{item}\n\t\t\t\t\t\t</li>\n\t\t\t\t\t))}{\" \"}\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<div className=\"tags-menu-wrapper\" onClick={this.toggleMenu}>\n\t\t\t\t<span>\n\t\t\t\t\t<i className=\"ff-tag\" />\n\t\t\t\t\t{this.props.label}\n\t\t\t\t</span>\n\t\t\t\t{this.state.isVisible && this.renderList()}\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
|