@comet/cms-admin 8.20.2 → 9.0.0-beta.1
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/lib/blocks/AnchorBlock.js +18 -23
- package/lib/blocks/DamVideoBlock.generated.js +1 -7
- package/lib/blocks/DamVideoBlock.js +38 -44
- package/lib/blocks/EmailLinkBlock.js +19 -25
- package/lib/blocks/ExternalLinkBlock.js +22 -28
- package/lib/blocks/InternalLinkBlock.generated.js +1 -7
- package/lib/blocks/InternalLinkBlock.js +31 -38
- package/lib/blocks/PhoneLinkBlock.js +19 -25
- package/lib/blocks/PixelImageBlock.generated.js +1 -7
- package/lib/blocks/PixelImageBlock.js +37 -43
- package/lib/blocks/SpaceBlock.js +16 -22
- package/lib/blocks/SvgImageBlock.generated.js +1 -7
- package/lib/blocks/SvgImageBlock.js +25 -31
- package/lib/blocks/VimeoVideoBlock.js +34 -40
- package/lib/blocks/YouTubeVideoBlock.js +34 -40
- package/lib/blocks/clipboard/CannotPasteBlockDialog.js +18 -19
- package/lib/blocks/clipboard/useBlockClipboard.js +14 -19
- package/lib/blocks/common/AddBlockDrawer.js +41 -47
- package/lib/blocks/common/AdminComponentStickyFooter.d.ts +1 -1
- package/lib/blocks/common/AdminComponentStickyFooter.d.ts.map +1 -1
- package/lib/blocks/common/AdminComponentStickyFooter.js +2 -8
- package/lib/blocks/common/AdminComponentStickyHeader.d.ts +1 -1
- package/lib/blocks/common/AdminComponentStickyHeader.d.ts.map +1 -1
- package/lib/blocks/common/AdminComponentStickyHeader.js +2 -8
- package/lib/blocks/common/AdminTabsTabContent.js +9 -15
- package/lib/blocks/common/BlockAdminComponentButton.js +8 -13
- package/lib/blocks/common/BlockAdminComponentNestedButton.js +17 -23
- package/lib/blocks/common/BlockAdminComponentPaper.js +12 -19
- package/lib/blocks/common/BlockAdminComponentRoot.js +11 -16
- package/lib/blocks/common/BlockAdminComponentSection.js +12 -18
- package/lib/blocks/common/BlockAdminComponentSectionGroup.js +9 -15
- package/lib/blocks/common/BlockAdminTabLabel.js +9 -15
- package/lib/blocks/common/BlockAdminTabs.d.ts +1 -0
- package/lib/blocks/common/BlockAdminTabs.d.ts.map +1 -1
- package/lib/blocks/common/BlockAdminTabs.js +24 -30
- package/lib/blocks/common/Collapsible.js +7 -13
- package/lib/blocks/common/CollapsibleSwitchButtonHeader.js +8 -14
- package/lib/blocks/common/HiddenInSubroute.js +5 -11
- package/lib/blocks/common/blockRow/BlockPreviewContent.d.ts +1 -1
- package/lib/blocks/common/blockRow/BlockPreviewContent.d.ts.map +1 -1
- package/lib/blocks/common/blockRow/BlockPreviewContent.js +18 -26
- package/lib/blocks/common/blockRow/BlockPreviewContent.sc.d.ts +5 -5
- package/lib/blocks/common/blockRow/BlockPreviewContent.sc.d.ts.map +1 -1
- package/lib/blocks/common/blockRow/BlockPreviewContent.sc.js +6 -12
- package/lib/blocks/common/blockRow/BlockRow.d.ts +1 -1
- package/lib/blocks/common/blockRow/BlockRow.d.ts.map +1 -1
- package/lib/blocks/common/blockRow/BlockRow.js +51 -58
- package/lib/blocks/common/blockRow/BlockRow.sc.js +16 -22
- package/lib/blocks/common/blockRow/image/StackedImages.d.ts +1 -0
- package/lib/blocks/common/blockRow/image/StackedImages.d.ts.map +1 -1
- package/lib/blocks/common/blockRow/image/StackedImages.js +18 -26
- package/lib/blocks/common/blockRow/image/StackedImages.sc.d.ts +8 -8
- package/lib/blocks/common/blockRow/image/StackedImages.sc.d.ts.map +1 -1
- package/lib/blocks/common/blockRow/image/StackedImages.sc.js +11 -17
- package/lib/blocks/common/usePromise.js +6 -10
- package/lib/blocks/common/useScrollRestoration.d.ts +2 -2
- package/lib/blocks/common/useScrollRestoration.d.ts.map +1 -1
- package/lib/blocks/common/useScrollRestoration.js +8 -14
- package/lib/blocks/config/BlocksConfigContext.js +7 -14
- package/lib/blocks/context/BlockContext.js +2 -8
- package/lib/blocks/context/BlockContextProvider.js +4 -10
- package/lib/blocks/context/useBlockContext.js +12 -18
- package/lib/blocks/createImageLinkBlock.js +10 -16
- package/lib/blocks/createLinkBlock.js +25 -30
- package/lib/blocks/createRichTextBlock.js +29 -38
- package/lib/blocks/createSeoBlock.js +114 -121
- package/lib/blocks/createTableBlock.js +30 -36
- package/lib/blocks/createTextImageBlock.js +43 -48
- package/lib/blocks/createTextLinkBlock.js +24 -30
- package/lib/blocks/factories/columnsBlock/ColumnsIcon.d.ts +1 -0
- package/lib/blocks/factories/columnsBlock/ColumnsIcon.d.ts.map +1 -1
- package/lib/blocks/factories/columnsBlock/ColumnsIcon.js +6 -12
- package/lib/blocks/factories/columnsBlock/ColumnsLayoutPreview.js +13 -21
- package/lib/blocks/factories/columnsBlock/FinalFormColumnsSelect.js +7 -13
- package/lib/blocks/factories/columnsBlock/FinalFormLayoutSelect.js +21 -27
- package/lib/blocks/factories/createBlocksBlock.js +113 -117
- package/lib/blocks/factories/createColumnsBlock.js +85 -91
- package/lib/blocks/factories/createCompositeBlock.js +54 -60
- package/lib/blocks/factories/createListBlock.js +80 -84
- package/lib/blocks/factories/createOneOfBlock.js +54 -61
- package/lib/blocks/factories/createOptionalBlock.js +24 -29
- package/lib/blocks/factories/listBlock/createUseAdminComponent.js +24 -30
- package/lib/blocks/factories/spaceBlock/createSpaceBlock.js +16 -22
- package/lib/blocks/form/AutosaveFinalForm.d.ts +1 -0
- package/lib/blocks/form/AutosaveFinalForm.d.ts.map +1 -1
- package/lib/blocks/form/AutosaveFinalForm.js +7 -13
- package/lib/blocks/form/BlocksFinalForm.d.ts +1 -0
- package/lib/blocks/form/BlocksFinalForm.d.ts.map +1 -1
- package/lib/blocks/form/BlocksFinalForm.js +12 -18
- package/lib/blocks/form/createFinalFormBlock.js +7 -12
- package/lib/blocks/helpers/VideoOptionsFields.js +15 -21
- package/lib/blocks/helpers/composeBlocks/composeBlocks.js +40 -40
- package/lib/blocks/helpers/composeBlocks/createCompositeBlockField.js +3 -9
- package/lib/blocks/helpers/composeBlocks/createCompositeBlockFields.js +3 -9
- package/lib/blocks/helpers/composeBlocks/createSettingsBlock.js +3 -9
- package/lib/blocks/helpers/composeBlocks/types.js +1 -5
- package/lib/blocks/helpers/composeBlocks/utility-types.js +1 -5
- package/lib/blocks/helpers/composeBlocks/utils.js +5 -14
- package/lib/blocks/helpers/createBlockSkeleton.js +14 -16
- package/lib/blocks/helpers/createCompositeBlockSelectField.js +8 -14
- package/lib/blocks/helpers/createCompositeBlockSwitchField.js +8 -14
- package/lib/blocks/helpers/createCompositeBlockTextField.js +8 -14
- package/lib/blocks/helpers/decomposeUpdateStateAction.js +3 -9
- package/lib/blocks/helpers/deduplicateBlockDependencies.js +3 -10
- package/lib/blocks/helpers/isBlockInterface.js +1 -7
- package/lib/blocks/helpers/withAdditionalBlockAttributes.js +1 -7
- package/lib/blocks/iframebridge/HoverPreviewComponent.js +15 -24
- package/lib/blocks/iframebridge/HoverPreviewComponent.sc.d.ts +1 -3
- package/lib/blocks/iframebridge/HoverPreviewComponent.sc.d.ts.map +1 -1
- package/lib/blocks/iframebridge/HoverPreviewComponent.sc.js +6 -12
- package/lib/blocks/iframebridge/IFrameBridge.js +26 -32
- package/lib/blocks/iframebridge/IFrameMessage.js +16 -8
- package/lib/blocks/iframebridge/SelectPreviewComponent.js +9 -15
- package/lib/blocks/iframebridge/useIFrameBridge.js +4 -10
- package/lib/blocks/image/EditImageDialog.js +66 -69
- package/lib/blocks/rte/extension/CmsLink/Decorator.js +4 -10
- package/lib/blocks/rte/extension/CmsLink/EditorComponent.js +3 -9
- package/lib/blocks/rte/extension/CmsLink/createCmsLinkToolbarButton.js +46 -52
- package/lib/blocks/seo/useSeoTagGeneration.generated.js +1 -7
- package/lib/blocks/seo/useSeoTagGeneration.js +24 -30
- package/lib/blocks/seo/useSitemapChangeFrequencyFormOptions.js +3 -9
- package/lib/blocks/seo/useSitemapPagePriorityFormOptions.js +3 -9
- package/lib/blocks/table/CellValue.js +12 -18
- package/lib/blocks/table/ColumnHeader.js +74 -80
- package/lib/blocks/table/EditCell.js +23 -29
- package/lib/blocks/table/FailedToPasteSnackbar.js +8 -14
- package/lib/blocks/table/RowActionsCell.js +58 -64
- package/lib/blocks/table/TableBlockContext.js +7 -13
- package/lib/blocks/table/TableBlockGrid.js +31 -35
- package/lib/blocks/table/__mocks__/TableBlockData.mocks.js +23 -29
- package/lib/blocks/table/dataGridStyles.js +1 -7
- package/lib/blocks/table/utils/column.js +19 -25
- package/lib/blocks/table/utils/ensureMinimumTableState.js +4 -10
- package/lib/blocks/table/utils/getClipboardValueForSchema.js +3 -9
- package/lib/blocks/table/utils/row.js +15 -21
- package/lib/blocks/table/utils/rteSchema.js +3 -9
- package/lib/blocks/table/utils/useRecentlyPastedIds.js +6 -12
- package/lib/blocks/types.js +19 -22
- package/lib/blocks/utils/parallelAsyncEvery.js +1 -7
- package/lib/blocks/utils.js +1 -7
- package/lib/blocks/validators/isValidUrl.js +1 -7
- package/lib/blocks.generated.js +1 -5
- package/lib/builds/BuildEntry.generated.js +1 -7
- package/lib/builds/BuildEntry.js +44 -50
- package/lib/builds/PublishButton.js +13 -19
- package/lib/builds/PublisherPage.generated.js +1 -7
- package/lib/builds/PublisherPage.js +33 -39
- package/lib/builds/StartBuildsDialog.generated.js +1 -7
- package/lib/builds/StartBuildsDialog.js +29 -33
- package/lib/common/DropdownMenuItem.js +22 -29
- package/lib/common/DropdownMenuItem.sc.d.ts +3 -9
- package/lib/common/DropdownMenuItem.sc.d.ts.map +1 -1
- package/lib/common/DropdownMenuItem.sc.js +10 -16
- package/lib/common/InsertInBetweenAction.js +9 -15
- package/lib/common/InsertInBetweenActionButton.js +8 -14
- package/lib/common/MarkedMatches.js +16 -23
- package/lib/common/MasterMenu.js +20 -27
- package/lib/common/MasterMenuRoutes.js +11 -18
- package/lib/common/PageList.d.ts +1 -0
- package/lib/common/PageList.d.ts.map +1 -1
- package/lib/common/PageList.js +22 -28
- package/lib/common/PageName.d.ts +1 -0
- package/lib/common/PageName.d.ts.map +1 -1
- package/lib/common/PageName.generated.js +1 -7
- package/lib/common/PageName.js +15 -21
- package/lib/common/SearchInput.js +24 -30
- package/lib/common/apollo/links/includeInvisibleContentContext.js +3 -8
- package/lib/common/errors/errorMessages.js +9 -15
- package/lib/common/header/Header.js +13 -18
- package/lib/common/header/ImpersonationInlay.js +22 -28
- package/lib/common/header/UserHeaderItem.js +58 -64
- package/lib/common/header/about/AboutModal.js +41 -46
- package/lib/common/header/about/build-information/buildInformation.js +1 -5
- package/lib/common/header/about/build-information/useBuildInformation.js +3 -9
- package/lib/common/image/ChooseFocalPoint.js +19 -25
- package/lib/common/image/ImageCrop.js +15 -23
- package/lib/common/image/ImageCrop.sc.js +10 -16
- package/lib/common/impersonation/commonImpersonationMessages.js +6 -12
- package/lib/common/signOutButton/SignOutButton.gql.d.ts +1 -1
- package/lib/common/signOutButton/SignOutButton.gql.d.ts.map +1 -1
- package/lib/common/signOutButton/SignOutButton.gql.generated.js +1 -7
- package/lib/common/signOutButton/SignOutButton.gql.js +2 -8
- package/lib/common/signOutButton/SignOutButton.js +13 -18
- package/lib/common/useEditState.js +10 -17
- package/lib/common/useSaveState.d.ts +1 -1
- package/lib/common/useSaveState.d.ts.map +1 -1
- package/lib/common/useSaveState.js +11 -17
- package/lib/config/CometConfigContext.js +11 -18
- package/lib/contentLanguage/contentLanguageConfig.js +3 -9
- package/lib/contentLanguage/useContentLanguage.js +3 -9
- package/lib/contentScope/ContentScopeIndicator.js +21 -27
- package/lib/contentScope/ContentScopeSelect.js +40 -47
- package/lib/contentScope/Controls.d.ts +1 -1
- package/lib/contentScope/Controls.d.ts.map +1 -1
- package/lib/contentScope/Controls.js +6 -12
- package/lib/contentScope/Provider.d.ts +1 -1
- package/lib/contentScope/Provider.d.ts.map +1 -1
- package/lib/contentScope/Provider.js +29 -37
- package/lib/contentScope/noContentScopeFallback/NoContentScopeFallback.js +30 -36
- package/lib/contentScope/useContentScopeConfig.js +5 -11
- package/lib/contentScope/utils/createPathFromDimensionValues.js +1 -7
- package/lib/contentScope/utils/defaultCreatePath.js +5 -10
- package/lib/contentScope/utils/groupObjectsIntoArrays.js +1 -7
- package/lib/cronJobs/CronJobsGrid.generated.js +1 -7
- package/lib/cronJobs/CronJobsGrid.js +51 -55
- package/lib/cronJobs/CronJobsPage.js +27 -33
- package/lib/cronJobs/JobLogs.generated.js +1 -7
- package/lib/cronJobs/JobLogs.js +19 -25
- package/lib/cronJobs/JobRuntime.js +11 -17
- package/lib/cronJobs/JobStatus.d.ts +1 -1
- package/lib/cronJobs/JobStatus.js +2 -8
- package/lib/cronJobs/JobsGrid.generated.js +1 -7
- package/lib/cronJobs/JobsGrid.js +35 -41
- package/lib/dam/CurrentDamFolderProvider.js +7 -14
- package/lib/dam/DamPage.js +21 -26
- package/lib/dam/DamTable.js +36 -44
- package/lib/dam/DataGrid/DamContextMenu.d.ts.map +1 -1
- package/lib/dam/DataGrid/DamContextMenu.generated.js +1 -7
- package/lib/dam/DataGrid/DamContextMenu.gql.d.ts +3 -3
- package/lib/dam/DataGrid/DamContextMenu.gql.d.ts.map +1 -1
- package/lib/dam/DataGrid/DamContextMenu.gql.generated.js +1 -7
- package/lib/dam/DataGrid/DamContextMenu.gql.js +4 -10
- package/lib/dam/DataGrid/DamContextMenu.js +70 -77
- package/lib/dam/DataGrid/FolderDataGrid.gql.d.ts +5 -5
- package/lib/dam/DataGrid/FolderDataGrid.gql.d.ts.map +1 -1
- package/lib/dam/DataGrid/FolderDataGrid.gql.generated.js +1 -7
- package/lib/dam/DataGrid/FolderDataGrid.gql.js +9 -15
- package/lib/dam/DataGrid/FolderDataGrid.js +101 -125
- package/lib/dam/DataGrid/FolderDataGrid.sc.js +8 -14
- package/lib/dam/DataGrid/duplicatedFilenames/ManualDuplicatedFilenamesHandler.gql.d.ts +1 -1
- package/lib/dam/DataGrid/duplicatedFilenames/ManualDuplicatedFilenamesHandler.gql.d.ts.map +1 -1
- package/lib/dam/DataGrid/duplicatedFilenames/ManualDuplicatedFilenamesHandler.gql.generated.js +1 -7
- package/lib/dam/DataGrid/duplicatedFilenames/ManualDuplicatedFilenamesHandler.gql.js +2 -8
- package/lib/dam/DataGrid/duplicatedFilenames/ManualDuplicatedFilenamesHandler.js +20 -26
- package/lib/dam/DataGrid/duplicatedFilenames/ManuallyHandleDuplicatedFilenamesDialog.d.ts +2 -2
- package/lib/dam/DataGrid/duplicatedFilenames/ManuallyHandleDuplicatedFilenamesDialog.d.ts.map +1 -1
- package/lib/dam/DataGrid/duplicatedFilenames/ManuallyHandleDuplicatedFilenamesDialog.js +49 -53
- package/lib/dam/DataGrid/fileUpload/FileUploadContext.js +10 -16
- package/lib/dam/DataGrid/fileUpload/FileUploadErrorDialog.js +35 -39
- package/lib/dam/DataGrid/fileUpload/ProgressDialog.js +21 -25
- package/lib/dam/DataGrid/fileUpload/UploadFilesButton.js +18 -24
- package/lib/dam/DataGrid/fileUpload/fileUpload.utils.js +2 -10
- package/lib/dam/DataGrid/fileUpload/fileUploadErrorMessages.js +26 -32
- package/lib/dam/DataGrid/fileUpload/useDamFileUpload.gql.d.ts +2 -2
- package/lib/dam/DataGrid/fileUpload/useDamFileUpload.gql.d.ts.map +1 -1
- package/lib/dam/DataGrid/fileUpload/useDamFileUpload.gql.generated.js +1 -7
- package/lib/dam/DataGrid/fileUpload/useDamFileUpload.gql.js +3 -9
- package/lib/dam/DataGrid/fileUpload/useDamFileUpload.js +58 -64
- package/lib/dam/DataGrid/filter/DamSortPopover.js +28 -36
- package/lib/dam/DataGrid/filter/DamSortPopover.sc.d.ts +2 -4
- package/lib/dam/DataGrid/filter/DamSortPopover.sc.d.ts.map +1 -1
- package/lib/dam/DataGrid/filter/DamSortPopover.sc.js +8 -14
- package/lib/dam/DataGrid/filter/DamTableFilter.d.ts.map +1 -1
- package/lib/dam/DataGrid/filter/DamTableFilter.js +15 -22
- package/lib/dam/DataGrid/footer/DamFooter.js +6 -12
- package/lib/dam/DataGrid/footer/UploadFooter.js +13 -19
- package/lib/dam/DataGrid/label/DamItemLabel.js +19 -25
- package/lib/dam/DataGrid/label/DamItemLabelColumn.js +25 -32
- package/lib/dam/DataGrid/selection/DamMoreActions.js +38 -44
- package/lib/dam/DataGrid/selection/DamSelectionContext.generated.js +1 -7
- package/lib/dam/DataGrid/selection/DamSelectionContext.js +42 -48
- package/lib/dam/DataGrid/tags/ArchivedTag.js +8 -14
- package/lib/dam/DataGrid/tags/LicenseValidityTags.js +16 -22
- package/lib/dam/DataGrid/tags/Tag.d.ts +1 -1
- package/lib/dam/DataGrid/tags/Tag.js +2 -8
- package/lib/dam/DataGrid/thumbnail/AudioThumbnail.js +8 -14
- package/lib/dam/DataGrid/thumbnail/DamThumbnail.gql.d.ts +1 -1
- package/lib/dam/DataGrid/thumbnail/DamThumbnail.gql.d.ts.map +1 -1
- package/lib/dam/DataGrid/thumbnail/DamThumbnail.gql.generated.js +1 -7
- package/lib/dam/DataGrid/thumbnail/DamThumbnail.gql.js +2 -8
- package/lib/dam/DataGrid/thumbnail/DamThumbnail.js +28 -41
- package/lib/dam/DataGrid/thumbnail/VideoThumbnail.js +8 -14
- package/lib/dam/DataGrid/useDamSearchHighlighting.js +5 -12
- package/lib/dam/FileActions/ConfirmDeleteDialog.js +28 -33
- package/lib/dam/FileActions/ConfirmDeleteDialog.sc.js +9 -15
- package/lib/dam/FileForm/CropSettingsFields.d.ts +1 -0
- package/lib/dam/FileForm/CropSettingsFields.d.ts.map +1 -1
- package/lib/dam/FileForm/CropSettingsFields.js +34 -40
- package/lib/dam/FileForm/Duplicates.generated.js +1 -7
- package/lib/dam/FileForm/Duplicates.js +37 -43
- package/lib/dam/FileForm/EditFile.gql.d.ts +3 -3
- package/lib/dam/FileForm/EditFile.gql.d.ts.map +1 -1
- package/lib/dam/FileForm/EditFile.gql.generated.d.ts +3 -0
- package/lib/dam/FileForm/EditFile.gql.generated.d.ts.map +1 -1
- package/lib/dam/FileForm/EditFile.gql.generated.js +1 -7
- package/lib/dam/FileForm/EditFile.gql.js +5 -11
- package/lib/dam/FileForm/EditFile.js +79 -86
- package/lib/dam/FileForm/FilePreview.d.ts.map +1 -1
- package/lib/dam/FileForm/FilePreview.gql.d.ts +3 -3
- package/lib/dam/FileForm/FilePreview.gql.d.ts.map +1 -1
- package/lib/dam/FileForm/FilePreview.gql.generated.js +1 -7
- package/lib/dam/FileForm/FilePreview.gql.js +4 -10
- package/lib/dam/FileForm/FilePreview.js +56 -64
- package/lib/dam/FileForm/FileSettingsFields.generated.js +1 -7
- package/lib/dam/FileForm/FileSettingsFields.gql.d.ts +2 -2
- package/lib/dam/FileForm/FileSettingsFields.gql.d.ts.map +1 -1
- package/lib/dam/FileForm/FileSettingsFields.gql.generated.js +1 -7
- package/lib/dam/FileForm/FileSettingsFields.gql.js +3 -9
- package/lib/dam/FileForm/FileSettingsFields.js +78 -84
- package/lib/dam/FileForm/ImageInfos.js +24 -30
- package/lib/dam/FileForm/ReplaceFileButton.js +30 -36
- package/lib/dam/FileForm/licenseType.js +6 -12
- package/lib/dam/FileForm/previews/AudioPreview.js +15 -21
- package/lib/dam/FileForm/previews/DefaultFilePreview.js +11 -17
- package/lib/dam/FileForm/previews/ImagePreview.d.ts +1 -0
- package/lib/dam/FileForm/previews/ImagePreview.d.ts.map +1 -1
- package/lib/dam/FileForm/previews/ImagePreview.js +4 -10
- package/lib/dam/FileForm/previews/PdfPreview.js +7 -13
- package/lib/dam/FileForm/previews/VideoPreview.generated.js +1 -7
- package/lib/dam/FileForm/previews/VideoPreview.js +15 -21
- package/lib/dam/FolderForm/AddFolder.gql.d.ts +1 -1
- package/lib/dam/FolderForm/AddFolder.gql.d.ts.map +1 -1
- package/lib/dam/FolderForm/AddFolder.gql.generated.js +1 -7
- package/lib/dam/FolderForm/AddFolder.gql.js +2 -8
- package/lib/dam/FolderForm/AddFolder.js +13 -19
- package/lib/dam/FolderForm/EditFolder.gql.d.ts +2 -2
- package/lib/dam/FolderForm/EditFolder.gql.d.ts.map +1 -1
- package/lib/dam/FolderForm/EditFolder.gql.generated.js +1 -7
- package/lib/dam/FolderForm/EditFolder.gql.js +3 -9
- package/lib/dam/FolderForm/EditFolder.js +11 -17
- package/lib/dam/FolderForm/FolderFormFields.js +7 -13
- package/lib/dam/MoveDamItemDialog/ChooseFolder.gql.d.ts +1 -1
- package/lib/dam/MoveDamItemDialog/ChooseFolder.gql.d.ts.map +1 -1
- package/lib/dam/MoveDamItemDialog/ChooseFolder.gql.generated.js +1 -7
- package/lib/dam/MoveDamItemDialog/ChooseFolder.gql.js +2 -8
- package/lib/dam/MoveDamItemDialog/ChooseFolder.js +30 -43
- package/lib/dam/MoveDamItemDialog/MoveDamItemDialog.js +44 -48
- package/lib/dam/MoveDamItemDialog/useFolderTree.js +11 -17
- package/lib/dam/MoveDamItemDialog/useFolderTreeSearch.js +14 -21
- package/lib/dam/blocks/DamFileDownloadLinkBlock.generated.js +1 -7
- package/lib/dam/blocks/DamFileDownloadLinkBlock.js +27 -33
- package/lib/dam/blocks/DamImageBlock.d.ts +1 -1
- package/lib/dam/blocks/DamImageBlock.d.ts.map +1 -1
- package/lib/dam/blocks/DamImageBlock.js +26 -31
- package/lib/dam/config/DamScopeContext.js +2 -8
- package/lib/dam/config/DamScopeProvider.js +8 -14
- package/lib/dam/config/damConfig.js +4 -11
- package/lib/dam/config/damDefaultAcceptedMimeTypes.js +1 -7
- package/lib/dam/config/useDamAcceptedMimeTypes.js +5 -11
- package/lib/dam/config/useDamScope.js +5 -10
- package/lib/dam/dependencies/createDamFileDependency.generated.js +1 -7
- package/lib/dam/dependencies/createDamFileDependency.js +8 -13
- package/lib/dam/helpers/clearDamItemCache.js +1 -7
- package/lib/dam/helpers/isFile.js +1 -7
- package/lib/dam/helpers/isFolder.js +1 -7
- package/lib/dam/helpers/slugifyFilename.js +3 -10
- package/lib/dam/mediaAlternatives/MediaAlternativeForm.generated.js +1 -7
- package/lib/dam/mediaAlternatives/MediaAlternativeForm.js +25 -31
- package/lib/dam/mediaAlternatives/MediaAlternativesGrid.d.ts +1 -1
- package/lib/dam/mediaAlternatives/MediaAlternativesGrid.d.ts.map +1 -1
- package/lib/dam/mediaAlternatives/MediaAlternativesGrid.generated.js +1 -7
- package/lib/dam/mediaAlternatives/MediaAlternativesGrid.js +44 -51
- package/lib/dashboard/DashboardHeader.js +12 -18
- package/lib/dashboard/DateTime.js +15 -21
- package/lib/dashboard/DefaultGreeting.js +6 -12
- package/lib/dashboard/widgets/DashboardWidgetRoot.js +8 -14
- package/lib/dashboard/widgets/LatestBuildsDashboardWidget.generated.js +1 -7
- package/lib/dashboard/widgets/LatestBuildsDashboardWidget.js +19 -25
- package/lib/dashboard/widgets/LatestContentUpdatesDashboardWidget.js +16 -22
- package/lib/dependencies/DependenciesList.d.ts +30 -0
- package/lib/dependencies/DependenciesList.d.ts.map +1 -0
- package/lib/dependencies/DependenciesList.js +282 -0
- package/lib/dependencies/DependentsList.d.ts +30 -0
- package/lib/dependencies/DependentsList.d.ts.map +1 -0
- package/lib/dependencies/{DependencyList.js → DependentsList.js} +190 -167
- package/lib/dependencies/createDependencyMethods.js +3 -9
- package/lib/dependencies/createDocumentDependencyMethods.js +3 -9
- package/lib/dependencies/dependenciesConfig.js +3 -9
- package/lib/dependencies/getDisplayNameString.d.ts +4 -0
- package/lib/dependencies/getDisplayNameString.d.ts.map +1 -0
- package/lib/dependencies/getDisplayNameString.js +12 -0
- package/lib/dependencies/types.js +1 -5
- package/lib/documents/ContentGenerationConfigContext.js +7 -13
- package/lib/documents/createDocumentRootBlocksMethods.js +1 -7
- package/lib/documents/types.js +1 -5
- package/lib/form/SyncFields.js +7 -13
- package/lib/form/file/DamPathLazy.generated.js +1 -7
- package/lib/form/file/DamPathLazy.js +7 -13
- package/lib/form/file/FileField.gql.d.ts +1 -1
- package/lib/form/file/FileField.gql.d.ts.map +1 -1
- package/lib/form/file/FileField.gql.generated.js +1 -7
- package/lib/form/file/FileField.gql.js +3 -9
- package/lib/form/file/FileField.js +53 -58
- package/lib/form/file/FileUploadField.js +6 -12
- package/lib/form/file/FinalFormFileUpload.d.ts +2 -2
- package/lib/form/file/FinalFormFileUpload.d.ts.map +1 -1
- package/lib/form/file/FinalFormFileUpload.generated.js +1 -7
- package/lib/form/file/FinalFormFileUpload.js +20 -26
- package/lib/form/file/chooseFile/ChooseFileDialog.js +28 -35
- package/lib/form/file/chooseFile/RedirectToPersistedDamLocation.js +12 -18
- package/lib/form/file/upload.js +3 -11
- package/lib/form/queryUpdatedAt.js +3 -9
- package/lib/form/serializeInitialValues.js +1 -7
- package/lib/form/useFormSaveConflict.d.ts +2 -2
- package/lib/form/useFormSaveConflict.d.ts.map +1 -1
- package/lib/form/useFormSaveConflict.js +3 -9
- package/lib/graphql.generated.d.ts +27 -3
- package/lib/graphql.generated.d.ts.map +1 -1
- package/lib/graphql.generated.js +1 -5
- package/lib/index.d.ts +3 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +144 -1128
- package/lib/pages/LocalPageTreeNodeDocumentAnchors.js +7 -13
- package/lib/pages/SaveConflictDialog.js +54 -57
- package/lib/pages/config/usePageTreeScope.js +5 -11
- package/lib/pages/createEditPageNode.d.ts +1 -1
- package/lib/pages/createEditPageNode.d.ts.map +1 -1
- package/lib/pages/createEditPageNode.generated.js +1 -7
- package/lib/pages/createEditPageNode.js +83 -90
- package/lib/pages/createUsePage.d.ts +1 -1
- package/lib/pages/createUsePage.d.ts.map +1 -1
- package/lib/pages/createUsePage.generated.js +1 -7
- package/lib/pages/createUsePage.js +46 -45
- package/lib/pages/pageSearch/PageSearch.js +4 -10
- package/lib/pages/pageSearch/usePageSearch.d.ts +1 -1
- package/lib/pages/pageSearch/usePageSearch.d.ts.map +1 -1
- package/lib/pages/pageSearch/usePageSearch.generated.js +1 -7
- package/lib/pages/pageSearch/usePageSearch.js +16 -22
- package/lib/pages/pageTree/CopyPasteMenuItem.js +19 -25
- package/lib/pages/pageTree/MovePageMenuItem.generated.js +1 -7
- package/lib/pages/pageTree/MovePageMenuItem.js +17 -23
- package/lib/pages/pageTree/Page.d.ts +1 -1
- package/lib/pages/pageTree/Page.d.ts.map +1 -1
- package/lib/pages/pageTree/Page.generated.js +1 -7
- package/lib/pages/pageTree/Page.js +2 -8
- package/lib/pages/pageTree/PageActions.js +54 -60
- package/lib/pages/pageTree/PageDeleteDialog.js +56 -58
- package/lib/pages/pageTree/PageDeleteDialog.sc.d.ts +1 -3
- package/lib/pages/pageTree/PageDeleteDialog.sc.d.ts.map +1 -1
- package/lib/pages/pageTree/PageDeleteDialog.sc.js +8 -14
- package/lib/pages/pageTree/PageInfo.js +13 -19
- package/lib/pages/pageTree/PageLabel.js +25 -31
- package/lib/pages/pageTree/PageTree.generated.js +1 -7
- package/lib/pages/pageTree/PageTree.js +52 -58
- package/lib/pages/pageTree/PageTreeContext.js +2 -8
- package/lib/pages/pageTree/PageTreeDragLayer.js +13 -22
- package/lib/pages/pageTree/PageTreeDragLayer.sc.d.ts +2 -2
- package/lib/pages/pageTree/PageTreeDragLayer.sc.d.ts.map +1 -1
- package/lib/pages/pageTree/PageTreeDragLayer.sc.js +3 -9
- package/lib/pages/pageTree/PageTreeRow.js +54 -63
- package/lib/pages/pageTree/PageTreeRow.sc.js +9 -15
- package/lib/pages/pageTree/PageTreeRowDivider.js +12 -18
- package/lib/pages/pageTree/PageTreeService.js +2 -7
- package/lib/pages/pageTree/PageTypeIcon.d.ts +1 -0
- package/lib/pages/pageTree/PageTypeIcon.d.ts.map +1 -1
- package/lib/pages/pageTree/PageTypeIcon.js +8 -14
- package/lib/pages/pageTree/PageVisibility.d.ts +1 -1
- package/lib/pages/pageTree/PageVisibility.d.ts.map +1 -1
- package/lib/pages/pageTree/PageVisibility.generated.js +1 -7
- package/lib/pages/pageTree/PageVisibility.js +37 -43
- package/lib/pages/pageTree/PageVisibilityIcon.d.ts +1 -0
- package/lib/pages/pageTree/PageVisibilityIcon.d.ts.map +1 -1
- package/lib/pages/pageTree/PageVisibilityIcon.js +6 -12
- package/lib/pages/pageTree/common/PageTreeTableRow.d.ts +1 -1
- package/lib/pages/pageTree/common/PageTreeTableRow.d.ts.map +1 -1
- package/lib/pages/pageTree/common/PageTreeTableRow.js +18 -24
- package/lib/pages/pageTree/treemap/TreeMapUtils.js +9 -14
- package/lib/pages/pageTree/useButtonHoverStates.js +4 -10
- package/lib/pages/pageTree/useCopyPastePages/ProgressDialog.js +26 -30
- package/lib/pages/pageTree/useCopyPastePages/createInboxFolder.generated.js +1 -7
- package/lib/pages/pageTree/useCopyPastePages/createInboxFolder.js +7 -13
- package/lib/pages/pageTree/useCopyPastePages/sendPages.generated.js +1 -7
- package/lib/pages/pageTree/useCopyPastePages/sendPages.js +33 -39
- package/lib/pages/pageTree/useCopyPastePages.js +38 -43
- package/lib/pages/pageTree/useDndWindowScroll/ScrollManager.js +3 -8
- package/lib/pages/pageTree/useDndWindowScroll/useAnimationFrame.js +6 -11
- package/lib/pages/pageTree/useDndWindowScroll/useDndWindowScroll.d.ts +1 -1
- package/lib/pages/pageTree/useDndWindowScroll/useDndWindowScroll.d.ts.map +1 -1
- package/lib/pages/pageTree/useDndWindowScroll/useDndWindowScroll.js +12 -19
- package/lib/pages/pageTree/usePageTree.d.ts +1 -1
- package/lib/pages/pageTree/usePageTree.d.ts.map +1 -1
- package/lib/pages/pageTree/usePageTree.generated.js +1 -7
- package/lib/pages/pageTree/usePageTree.js +17 -24
- package/lib/pages/pageTree/usePageTreeContext.js +4 -10
- package/lib/pages/pageTreeConfig.js +3 -9
- package/lib/pages/pageTreeSelect/FinalFormPageTreeSelect.d.ts +1 -0
- package/lib/pages/pageTreeSelect/FinalFormPageTreeSelect.d.ts.map +1 -1
- package/lib/pages/pageTreeSelect/FinalFormPageTreeSelect.js +4 -11
- package/lib/pages/pageTreeSelect/PageTreeSelect.generated.js +1 -7
- package/lib/pages/pageTreeSelect/PageTreeSelect.js +20 -27
- package/lib/pages/pageTreeSelect/PageTreeSelectDialog.d.ts +2 -1
- package/lib/pages/pageTreeSelect/PageTreeSelectDialog.d.ts.map +1 -1
- package/lib/pages/pageTreeSelect/PageTreeSelectDialog.generated.js +1 -7
- package/lib/pages/pageTreeSelect/PageTreeSelectDialog.js +88 -96
- package/lib/pages/pageTreeSelect/PageTreeSelectDialog.sc.js +6 -12
- package/lib/pages/pagesPage/ConfirmPageActionDialog.js +23 -27
- package/lib/pages/pagesPage/PageCanNotDeleteDialog.js +15 -19
- package/lib/pages/pagesPage/PagesPage.js +80 -86
- package/lib/pages/pagesPage/PagesPageActionToolbar.js +97 -103
- package/lib/pages/pagesPage/PagesPageActionToolbar.sc.d.ts +4 -8
- package/lib/pages/pagesPage/PagesPageActionToolbar.sc.d.ts.map +1 -1
- package/lib/pages/pagesPage/PagesPageActionToolbar.sc.js +6 -12
- package/lib/pages/pagesPage/PagesPageActionToolbarBatchUpdateHelper.js +5 -11
- package/lib/pages/pagesPage/areAllSubTreesFullSelected.js +4 -10
- package/lib/pages/pagesPage/createPagesQuery.generated.js +1 -7
- package/lib/pages/pagesPage/createPagesQuery.js +6 -12
- package/lib/pages/resolveHasSaveConflict.js +5 -11
- package/lib/pages/usePageTreeDocumentAnchors.generated.js +1 -7
- package/lib/pages/usePageTreeDocumentAnchors.js +10 -14
- package/lib/pages/useSaveConflict.js +20 -26
- package/lib/pages/useSaveConflictQuery.js +7 -13
- package/lib/preview/block/BlockPreview.generated.js +1 -7
- package/lib/preview/block/BlockPreview.js +33 -38
- package/lib/preview/block/BlockPreviewWithTabs.js +10 -15
- package/lib/preview/block/SplitPreview.js +22 -27
- package/lib/preview/block/SplitPreview.sc.js +12 -19
- package/lib/preview/block/useBlockPreview.js +7 -12
- package/lib/preview/common/Device.js +3 -8
- package/lib/preview/common/DeviceToggle.js +22 -27
- package/lib/preview/common/IFrameViewer.js +24 -30
- package/lib/preview/common/ToggleButton.d.ts +1 -3
- package/lib/preview/common/ToggleButton.d.ts.map +1 -1
- package/lib/preview/common/ToggleButton.js +5 -10
- package/lib/preview/common/VisibilityToggle.js +9 -14
- package/lib/preview/openSitePreviewWindow.js +2 -8
- package/lib/preview/site/OpenLinkDialog.js +31 -33
- package/lib/preview/site/SitePreview.generated.js +1 -7
- package/lib/preview/site/SitePreview.js +58 -61
- package/lib/preview/site/SitePreview.sc.d.ts +1 -3
- package/lib/preview/site/SitePreview.sc.d.ts.map +1 -1
- package/lib/preview/site/SitePreview.sc.js +8 -14
- package/lib/preview/site/iframebridge/SitePreviewIFrameMessage.js +3 -7
- package/lib/preview/site/iframebridge/useSitePreviewIFrameBridge.js +5 -11
- package/lib/redirects/RedirectActiveness.d.ts +2 -1
- package/lib/redirects/RedirectActiveness.d.ts.map +1 -1
- package/lib/redirects/RedirectActiveness.generated.js +1 -7
- package/lib/redirects/RedirectActiveness.js +26 -32
- package/lib/redirects/RedirectForm.d.ts +1 -0
- package/lib/redirects/RedirectForm.d.ts.map +1 -1
- package/lib/redirects/RedirectForm.generated.js +1 -7
- package/lib/redirects/RedirectForm.gql.d.ts +3 -3
- package/lib/redirects/RedirectForm.gql.d.ts.map +1 -1
- package/lib/redirects/RedirectForm.gql.generated.js +1 -7
- package/lib/redirects/RedirectForm.gql.js +5 -11
- package/lib/redirects/RedirectForm.js +64 -65
- package/lib/redirects/RedirectsGrid.d.ts +1 -0
- package/lib/redirects/RedirectsGrid.d.ts.map +1 -1
- package/lib/redirects/RedirectsGrid.gql.d.ts +2 -2
- package/lib/redirects/RedirectsGrid.gql.d.ts.map +1 -1
- package/lib/redirects/RedirectsGrid.gql.generated.js +1 -7
- package/lib/redirects/RedirectsGrid.gql.js +6 -11
- package/lib/redirects/RedirectsGrid.js +48 -55
- package/lib/redirects/createRedirectsPage.d.ts +1 -1
- package/lib/redirects/createRedirectsPage.d.ts.map +1 -1
- package/lib/redirects/createRedirectsPage.js +37 -43
- package/lib/redirects/redirectsConfig.js +5 -11
- package/lib/redirects/submitMutation.js +5 -11
- package/lib/siteConfigs/siteConfigsConfig.js +1 -5
- package/lib/siteConfigs/useSiteConfig.js +3 -9
- package/lib/siteConfigs/useSiteConfigs.js +3 -9
- package/lib/testing/test-utils.js +15 -32
- package/lib/translation/AzureAiTranslatorProvider.generated.js +1 -7
- package/lib/translation/AzureAiTranslatorProvider.js +11 -17
- package/lib/userPermissions/ImpersonateMenuItem.generated.js +1 -7
- package/lib/userPermissions/ImpersonateMenuItem.js +27 -33
- package/lib/userPermissions/UserGrid.generated.js +1 -7
- package/lib/userPermissions/UserGrid.js +45 -51
- package/lib/userPermissions/UserPermissionsPage.js +42 -48
- package/lib/userPermissions/hooks/currentUser.generated.js +1 -7
- package/lib/userPermissions/hooks/currentUser.js +21 -27
- package/lib/userPermissions/user/ImpersonationButtons.js +18 -24
- package/lib/userPermissions/user/UserPageToolbar.generated.js +1 -7
- package/lib/userPermissions/user/UserPageToolbar.js +29 -35
- package/lib/userPermissions/user/basicData/UserBasicData.generated.js +1 -7
- package/lib/userPermissions/user/basicData/UserBasicData.js +23 -29
- package/lib/userPermissions/user/permissions/ContentScopeGrid.generated.js +1 -7
- package/lib/userPermissions/user/permissions/ContentScopeGrid.js +38 -44
- package/lib/userPermissions/user/permissions/OverrideContentScopesDialog.generated.js +1 -7
- package/lib/userPermissions/user/permissions/OverrideContentScopesDialog.js +34 -38
- package/lib/userPermissions/user/permissions/PermissionDialog.d.ts.map +1 -1
- package/lib/userPermissions/user/permissions/PermissionDialog.generated.js +1 -7
- package/lib/userPermissions/user/permissions/PermissionDialog.js +50 -54
- package/lib/userPermissions/user/permissions/PermissionGrid.generated.js +1 -7
- package/lib/userPermissions/user/permissions/PermissionGrid.js +48 -54
- package/lib/userPermissions/user/permissions/PermissionsPanel.js +9 -15
- package/lib/userPermissions/user/permissions/selectScopesDialogContent/SelectScopesDialogContent.generated.js +1 -7
- package/lib/userPermissions/user/permissions/selectScopesDialogContent/SelectScopesDialogContent.js +19 -26
- package/lib/userPermissions/utils/camelCaseToHumanReadable.js +1 -7
- package/lib/userPermissions/utils/handleImpersonation.js +5 -12
- package/lib/validation/isLinkTarget.js +6 -12
- package/lib/validation/isPhoneNumber.js +1 -7
- package/lib/validation/validateLinkTarget.js +6 -12
- package/lib/validation/validatePhoneNumber.js +6 -12
- package/lib/validation/validateUrl.js +6 -12
- package/lib/vendors.d.js +1 -5
- package/lib/warnings/LatestWarningsDashboardWidget.generated.js +1 -7
- package/lib/warnings/LatestWarningsDashboardWidget.js +27 -33
- package/lib/warnings/WarningActions.js +25 -31
- package/lib/warnings/WarningMessage.d.ts +1 -1
- package/lib/warnings/WarningMessage.d.ts.map +1 -1
- package/lib/warnings/WarningMessage.js +1 -7
- package/lib/warnings/WarningSeverity.js +9 -15
- package/lib/warnings/WarningsGrid.generated.js +1 -7
- package/lib/warnings/WarningsGrid.js +45 -52
- package/lib/warnings/WarningsPage.js +11 -17
- package/lib/warnings/warningMessages.js +10 -16
- package/lib/warnings/warningsConfig.js +5 -11
- package/package.json +25 -26
- package/lib/dependencies/DependencyList.d.ts +0 -29
- package/lib/dependencies/DependencyList.d.ts.map +0 -1
- package/lib/dependencies/DependencyList.sc.d.ts +0 -11
- package/lib/dependencies/DependencyList.sc.d.ts.map +0 -1
- package/lib/dependencies/DependencyList.sc.js +0 -79
- package/lib/http/createHttpClient.d.ts +0 -3
- package/lib/http/createHttpClient.d.ts.map +0 -1
- package/lib/http/createHttpClient.js +0 -43
|
@@ -1,19 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.CurrentUserProvider = exports.CurrentUserContext = void 0;
|
|
7
|
-
exports.useCurrentUser = useCurrentUser;
|
|
8
|
-
exports.useUserPermissionCheck = useUserPermissionCheck;
|
|
9
|
-
var _client = require("@apollo/client");
|
|
10
|
-
var _admin = require("@comet/admin");
|
|
11
|
-
var _react = require("react");
|
|
12
|
-
var _reactIntl = require("react-intl");
|
|
13
|
-
var _Provider = require("../../contentScope/Provider");
|
|
14
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
var _templateObject; // eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
16
|
-
// This interface can be overwritten to add custom permissions
|
|
1
|
+
var _templateObject;
|
|
17
2
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
18
3
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
19
4
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
@@ -21,15 +6,24 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
21
6
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
22
7
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
23
8
|
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
24
|
-
|
|
25
|
-
|
|
9
|
+
import { gql, useQuery } from "@apollo/client";
|
|
10
|
+
import { Loading } from "@comet/admin";
|
|
11
|
+
import { createContext, useContext } from "react";
|
|
12
|
+
import { FormattedMessage } from "react-intl";
|
|
13
|
+
import { useContentScope } from "../../contentScope/Provider";
|
|
14
|
+
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
16
|
+
// This interface can be overwritten to add custom permissions
|
|
17
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
+
export var CurrentUserContext = /*#__PURE__*/createContext(undefined);
|
|
19
|
+
export var CurrentUserProvider = function CurrentUserProvider(_ref) {
|
|
26
20
|
var isAllowed = _ref.isAllowed,
|
|
27
21
|
children = _ref.children;
|
|
28
|
-
var _useQuery =
|
|
22
|
+
var _useQuery = useQuery(gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n query CurrentUser {\n currentUser {\n id\n name\n email\n impersonated\n accountUrl\n authenticatedUser {\n name\n email\n }\n permissions {\n permission\n contentScopes\n }\n allowedContentScopes {\n scope\n label\n }\n }\n }\n "])))),
|
|
29
23
|
data = _useQuery.data,
|
|
30
24
|
error = _useQuery.error;
|
|
31
25
|
if (error) {
|
|
32
|
-
return /*#__PURE__*/(
|
|
26
|
+
return /*#__PURE__*/_jsx(FormattedMessage, {
|
|
33
27
|
id: "comet.currentUser.loadError",
|
|
34
28
|
defaultMessage: "Cannot load user: {errorMessage}",
|
|
35
29
|
values: {
|
|
@@ -37,7 +31,7 @@ var CurrentUserProvider = exports.CurrentUserProvider = function CurrentUserProv
|
|
|
37
31
|
}
|
|
38
32
|
});
|
|
39
33
|
}
|
|
40
|
-
if (!data) return /*#__PURE__*/(
|
|
34
|
+
if (!data) return /*#__PURE__*/_jsx(Loading, {
|
|
41
35
|
behavior: "fillPageHeight"
|
|
42
36
|
});
|
|
43
37
|
var context = {
|
|
@@ -78,20 +72,20 @@ var CurrentUserProvider = exports.CurrentUserProvider = function CurrentUserProv
|
|
|
78
72
|
});
|
|
79
73
|
}
|
|
80
74
|
};
|
|
81
|
-
return /*#__PURE__*/(
|
|
75
|
+
return /*#__PURE__*/_jsx(CurrentUserContext.Provider, {
|
|
82
76
|
value: context,
|
|
83
77
|
children: children
|
|
84
78
|
});
|
|
85
79
|
};
|
|
86
|
-
function useCurrentUser() {
|
|
87
|
-
var ret =
|
|
80
|
+
export function useCurrentUser() {
|
|
81
|
+
var ret = useContext(CurrentUserContext);
|
|
88
82
|
if (!ret || !ret.currentUser) throw new Error("CurrentUser not found. Make sure CurrentUserContext exists.");
|
|
89
83
|
return ret.currentUser;
|
|
90
84
|
}
|
|
91
|
-
function useUserPermissionCheck() {
|
|
92
|
-
var context =
|
|
85
|
+
export function useUserPermissionCheck() {
|
|
86
|
+
var context = useContext(CurrentUserContext);
|
|
93
87
|
if (!context) throw new Error("CurrentUser not found. Make sure CurrentUserContext exists.");
|
|
94
|
-
var contentScope =
|
|
88
|
+
var contentScope = useContentScope();
|
|
95
89
|
return function (permission) {
|
|
96
90
|
return context.isAllowed(context.currentUser, permission, contentScope.scope);
|
|
97
91
|
};
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.StopImpersonationButton = exports.StartImpersonationButton = void 0;
|
|
8
|
-
var _material = require("@mui/material");
|
|
9
|
-
var _jsCookie = _interopRequireDefault(require("js-cookie"));
|
|
10
|
-
var _commonImpersonationMessages = require("../../common/impersonation/commonImpersonationMessages");
|
|
11
|
-
var _currentUser = require("../hooks/currentUser");
|
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -19,14 +7,20 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
19
7
|
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
20
8
|
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
21
9
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
22
|
-
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
23
|
-
|
|
10
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
11
|
+
// eslint-disable-next-line no-restricted-imports
|
|
12
|
+
import { Button } from "@mui/material";
|
|
13
|
+
import Cookies from "js-cookie";
|
|
14
|
+
import { commonImpersonationMessages } from "../../common/impersonation/commonImpersonationMessages";
|
|
15
|
+
import { useCurrentUser, useUserPermissionCheck } from "../hooks/currentUser";
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
export var StopImpersonationButton = function StopImpersonationButton(buttonProps) {
|
|
24
18
|
var stopImpersonation = /*#__PURE__*/function () {
|
|
25
19
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
26
20
|
return _regenerator().w(function (_context) {
|
|
27
21
|
while (1) switch (_context.n) {
|
|
28
22
|
case 0:
|
|
29
|
-
|
|
23
|
+
Cookies.remove("comet-impersonate-user-id");
|
|
30
24
|
location.href = "/";
|
|
31
25
|
case 1:
|
|
32
26
|
return _context.a(2);
|
|
@@ -37,22 +31,22 @@ var StopImpersonationButton = exports.StopImpersonationButton = function StopImp
|
|
|
37
31
|
return _ref.apply(this, arguments);
|
|
38
32
|
};
|
|
39
33
|
}();
|
|
40
|
-
return /*#__PURE__*/(
|
|
34
|
+
return /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({
|
|
41
35
|
onClick: stopImpersonation
|
|
42
36
|
}, buttonProps), {}, {
|
|
43
|
-
children:
|
|
37
|
+
children: commonImpersonationMessages.stopImpersonation
|
|
44
38
|
}));
|
|
45
39
|
};
|
|
46
|
-
var StartImpersonationButton =
|
|
40
|
+
export var StartImpersonationButton = function StartImpersonationButton(_ref2) {
|
|
47
41
|
var userId = _ref2.userId;
|
|
48
|
-
var currentUser =
|
|
49
|
-
var isAllowed =
|
|
42
|
+
var currentUser = useCurrentUser();
|
|
43
|
+
var isAllowed = useUserPermissionCheck();
|
|
50
44
|
var startImpersonation = /*#__PURE__*/function () {
|
|
51
45
|
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
|
|
52
46
|
return _regenerator().w(function (_context2) {
|
|
53
47
|
while (1) switch (_context2.n) {
|
|
54
48
|
case 0:
|
|
55
|
-
|
|
49
|
+
Cookies.set("comet-impersonate-user-id", userId);
|
|
56
50
|
location.href = "/";
|
|
57
51
|
case 1:
|
|
58
52
|
return _context2.a(2);
|
|
@@ -65,14 +59,14 @@ var StartImpersonationButton = exports.StartImpersonationButton = function Start
|
|
|
65
59
|
}();
|
|
66
60
|
if (!isAllowed("impersonation")) return null;
|
|
67
61
|
if (currentUser.id !== userId && !currentUser.impersonated) {
|
|
68
|
-
return /*#__PURE__*/(
|
|
62
|
+
return /*#__PURE__*/_jsx(Button, {
|
|
69
63
|
onClick: startImpersonation,
|
|
70
64
|
variant: "contained",
|
|
71
|
-
children:
|
|
65
|
+
children: commonImpersonationMessages.startImpersonation
|
|
72
66
|
});
|
|
73
67
|
}
|
|
74
68
|
if (currentUser.impersonated && currentUser.id === userId) {
|
|
75
|
-
return /*#__PURE__*/(
|
|
69
|
+
return /*#__PURE__*/_jsx(StopImpersonationButton, {
|
|
76
70
|
variant: "contained"
|
|
77
71
|
});
|
|
78
72
|
}
|
|
@@ -1,25 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.UserPermissionsUserPageToolbar = void 0;
|
|
7
|
-
var _client = require("@apollo/client");
|
|
8
|
-
var _admin = require("@comet/admin");
|
|
9
|
-
var _adminIcons = require("@comet/admin-icons");
|
|
10
|
-
var _styles = require("@mui/material/styles");
|
|
11
|
-
var _commonImpersonationMessages = require("../../common/impersonation/commonImpersonationMessages");
|
|
12
|
-
var _ContentScopeIndicator = require("../../contentScope/ContentScopeIndicator");
|
|
13
|
-
var _currentUser = require("../hooks/currentUser");
|
|
14
|
-
var _handleImpersonation = require("../utils/handleImpersonation");
|
|
15
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
1
|
var _templateObject;
|
|
17
2
|
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
18
|
-
|
|
3
|
+
import { gql, useQuery } from "@apollo/client";
|
|
4
|
+
import { CrudMoreActionsMenu, FillSpace, Loading, StackToolbar, ToolbarActions, ToolbarBackButton, ToolbarTitleItem } from "@comet/admin";
|
|
5
|
+
import { ImpersonateUser, Reset } from "@comet/admin-icons";
|
|
6
|
+
import { styled } from "@mui/material/styles";
|
|
7
|
+
import { commonImpersonationMessages } from "../../common/impersonation/commonImpersonationMessages";
|
|
8
|
+
import { ContentScopeIndicator } from "../../contentScope/ContentScopeIndicator";
|
|
9
|
+
import { useCurrentUser, useUserPermissionCheck } from "../hooks/currentUser";
|
|
10
|
+
import { startImpersonation, stopImpersonation } from "../utils/handleImpersonation";
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
export var UserPermissionsUserPageToolbar = function UserPermissionsUserPageToolbar(_ref) {
|
|
19
13
|
var userId = _ref.userId;
|
|
20
|
-
var currentUser =
|
|
21
|
-
var isAllowed =
|
|
22
|
-
var _useQuery =
|
|
14
|
+
var currentUser = useCurrentUser();
|
|
15
|
+
var isAllowed = useUserPermissionCheck();
|
|
16
|
+
var _useQuery = useQuery(gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n query UserPage($id: String!) {\n user: userPermissionsUserById(id: $id) {\n name\n email\n impersonationAllowed\n }\n }\n "]))), {
|
|
23
17
|
variables: {
|
|
24
18
|
id: userId
|
|
25
19
|
}
|
|
@@ -31,39 +25,39 @@ var UserPermissionsUserPageToolbar = exports.UserPermissionsUserPageToolbar = fu
|
|
|
31
25
|
throw new Error(error.message);
|
|
32
26
|
}
|
|
33
27
|
if (loading || !data) {
|
|
34
|
-
return /*#__PURE__*/(
|
|
28
|
+
return /*#__PURE__*/_jsx(Loading, {});
|
|
35
29
|
}
|
|
36
|
-
return /*#__PURE__*/(
|
|
37
|
-
scopeIndicator: /*#__PURE__*/(
|
|
30
|
+
return /*#__PURE__*/_jsxs(StackToolbar, {
|
|
31
|
+
scopeIndicator: /*#__PURE__*/_jsx(ContentScopeIndicator, {
|
|
38
32
|
global: true
|
|
39
33
|
}),
|
|
40
|
-
children: [/*#__PURE__*/(
|
|
41
|
-
children: [/*#__PURE__*/(
|
|
34
|
+
children: [/*#__PURE__*/_jsx(ToolbarBackButton, {}), /*#__PURE__*/_jsxs(ToolbarTitleItem, {
|
|
35
|
+
children: [/*#__PURE__*/_jsx(TitleText, {
|
|
42
36
|
children: data.user.name
|
|
43
|
-
}), /*#__PURE__*/(
|
|
37
|
+
}), /*#__PURE__*/_jsx(SupportText, {
|
|
44
38
|
children: data.user.email
|
|
45
39
|
})]
|
|
46
|
-
}), /*#__PURE__*/(
|
|
47
|
-
children: isAllowed("impersonation") && /*#__PURE__*/(
|
|
40
|
+
}), /*#__PURE__*/_jsx(FillSpace, {}), /*#__PURE__*/_jsx(ToolbarActions, {
|
|
41
|
+
children: isAllowed("impersonation") && /*#__PURE__*/_jsx(CrudMoreActionsMenu, {
|
|
48
42
|
overallActions: [currentUser.impersonated ? {
|
|
49
|
-
icon: /*#__PURE__*/(
|
|
50
|
-
label:
|
|
43
|
+
icon: /*#__PURE__*/_jsx(Reset, {}),
|
|
44
|
+
label: commonImpersonationMessages.stopImpersonation,
|
|
51
45
|
onClick: function onClick() {
|
|
52
|
-
return
|
|
46
|
+
return stopImpersonation();
|
|
53
47
|
}
|
|
54
48
|
} : {
|
|
55
|
-
label:
|
|
56
|
-
icon: /*#__PURE__*/(
|
|
49
|
+
label: commonImpersonationMessages.startImpersonation,
|
|
50
|
+
icon: /*#__PURE__*/_jsx(ImpersonateUser, {}),
|
|
57
51
|
disabled: !data.user.impersonationAllowed,
|
|
58
52
|
onClick: function onClick() {
|
|
59
|
-
return
|
|
53
|
+
return startImpersonation(userId);
|
|
60
54
|
}
|
|
61
55
|
}]
|
|
62
56
|
})
|
|
63
57
|
})]
|
|
64
58
|
});
|
|
65
59
|
};
|
|
66
|
-
var TitleText = /*#__PURE__*/
|
|
60
|
+
var TitleText = /*#__PURE__*/styled("div", process.env.NODE_ENV === "production" ? {
|
|
67
61
|
target: "e1ug6q2t1"
|
|
68
62
|
} : {
|
|
69
63
|
target: "e1ug6q2t1",
|
|
@@ -75,7 +69,7 @@ var TitleText = /*#__PURE__*/(0, _styles.styled)("div", process.env.NODE_ENV ===
|
|
|
75
69
|
var theme = _ref3.theme;
|
|
76
70
|
return theme.palette.text.primary;
|
|
77
71
|
}, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy91c2VyUGVybWlzc2lvbnMvdXNlci9Vc2VyUGFnZVRvb2xiYXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXNFK0IiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL3VzZXJQZXJtaXNzaW9ucy91c2VyL1VzZXJQYWdlVG9vbGJhci50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBncWwsIHVzZVF1ZXJ5IH0gZnJvbSBcIkBhcG9sbG8vY2xpZW50XCI7XG5pbXBvcnQgeyBDcnVkTW9yZUFjdGlvbnNNZW51LCBGaWxsU3BhY2UsIExvYWRpbmcsIFN0YWNrVG9vbGJhciwgVG9vbGJhckFjdGlvbnMsIFRvb2xiYXJCYWNrQnV0dG9uLCBUb29sYmFyVGl0bGVJdGVtIH0gZnJvbSBcIkBjb21ldC9hZG1pblwiO1xuaW1wb3J0IHsgSW1wZXJzb25hdGVVc2VyLCBSZXNldCB9IGZyb20gXCJAY29tZXQvYWRtaW4taWNvbnNcIjtcbmltcG9ydCB7IHN0eWxlZCB9IGZyb20gXCJAbXVpL21hdGVyaWFsL3N0eWxlc1wiO1xuXG5pbXBvcnQgeyBjb21tb25JbXBlcnNvbmF0aW9uTWVzc2FnZXMgfSBmcm9tIFwiLi4vLi4vY29tbW9uL2ltcGVyc29uYXRpb24vY29tbW9uSW1wZXJzb25hdGlvbk1lc3NhZ2VzXCI7XG5pbXBvcnQgeyBDb250ZW50U2NvcGVJbmRpY2F0b3IgfSBmcm9tIFwiLi4vLi4vY29udGVudFNjb3BlL0NvbnRlbnRTY29wZUluZGljYXRvclwiO1xuaW1wb3J0IHsgdXNlQ3VycmVudFVzZXIsIHVzZVVzZXJQZXJtaXNzaW9uQ2hlY2sgfSBmcm9tIFwiLi4vaG9va3MvY3VycmVudFVzZXJcIjtcbmltcG9ydCB7IHN0YXJ0SW1wZXJzb25hdGlvbiwgc3RvcEltcGVyc29uYXRpb24gfSBmcm9tIFwiLi4vdXRpbHMvaGFuZGxlSW1wZXJzb25hdGlvblwiO1xuaW1wb3J0IHsgdHlwZSBHUUxVc2VyUGFnZVF1ZXJ5LCB0eXBlIEdRTFVzZXJQYWdlUXVlcnlWYXJpYWJsZXMgfSBmcm9tIFwiLi9Vc2VyUGFnZVRvb2xiYXIuZ2VuZXJhdGVkXCI7XG5cbmV4cG9ydCBjb25zdCBVc2VyUGVybWlzc2lvbnNVc2VyUGFnZVRvb2xiYXIgPSAoeyB1c2VySWQgfTogeyB1c2VySWQ6IHN0cmluZyB9KSA9PiB7XG4gICAgY29uc3QgY3VycmVudFVzZXIgPSB1c2VDdXJyZW50VXNlcigpO1xuICAgIGNvbnN0IGlzQWxsb3dlZCA9IHVzZVVzZXJQZXJtaXNzaW9uQ2hlY2soKTtcblxuICAgIGNvbnN0IHsgZGF0YSwgZXJyb3IsIGxvYWRpbmcgfSA9IHVzZVF1ZXJ5PEdRTFVzZXJQYWdlUXVlcnksIEdRTFVzZXJQYWdlUXVlcnlWYXJpYWJsZXM+KFxuICAgICAgICBncWxgXG4gICAgICAgICAgICBxdWVyeSBVc2VyUGFnZSgkaWQ6IFN0cmluZyEpIHtcbiAgICAgICAgICAgICAgICB1c2VyOiB1c2VyUGVybWlzc2lvbnNVc2VyQnlJZChpZDogJGlkKSB7XG4gICAgICAgICAgICAgICAgICAgIG5hbWVcbiAgICAgICAgICAgICAgICAgICAgZW1haWxcbiAgICAgICAgICAgICAgICAgICAgaW1wZXJzb25hdGlvbkFsbG93ZWRcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIGAsXG4gICAgICAgIHtcbiAgICAgICAgICAgIHZhcmlhYmxlczogeyBpZDogdXNlcklkIH0sXG4gICAgICAgIH0sXG4gICAgKTtcblxuICAgIGlmIChlcnJvcikge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoZXJyb3IubWVzc2FnZSk7XG4gICAgfVxuXG4gICAgaWYgKGxvYWRpbmcgfHwgIWRhdGEpIHtcbiAgICAgICAgcmV0dXJuIDxMb2FkaW5nIC8+O1xuICAgIH1cblxuICAgIHJldHVybiAoXG4gICAgICAgIDxTdGFja1Rvb2xiYXIgc2NvcGVJbmRpY2F0b3I9ezxDb250ZW50U2NvcGVJbmRpY2F0b3IgZ2xvYmFsIC8+fT5cbiAgICAgICAgICAgIDxUb29sYmFyQmFja0J1dHRvbiAvPlxuICAgICAgICAgICAgPFRvb2xiYXJUaXRsZUl0ZW0+XG4gICAgICAgICAgICAgICAgPFRpdGxlVGV4dD57ZGF0YS51c2VyLm5hbWV9PC9UaXRsZVRleHQ+XG4gICAgICAgICAgICAgICAgPFN1cHBvcnRUZXh0PntkYXRhLnVzZXIuZW1haWx9PC9TdXBwb3J0VGV4dD5cbiAgICAgICAgICAgIDwvVG9vbGJhclRpdGxlSXRlbT5cbiAgICAgICAgICAgIDxGaWxsU3BhY2UgLz5cbiAgICAgICAgICAgIDxUb29sYmFyQWN0aW9ucz5cbiAgICAgICAgICAgICAgICB7aXNBbGxvd2VkKFwiaW1wZXJzb25hdGlvblwiKSAmJiAoXG4gICAgICAgICAgICAgICAgICAgIDxDcnVkTW9yZUFjdGlvbnNNZW51XG4gICAgICAgICAgICAgICAgICAgICAgICBvdmVyYWxsQWN0aW9ucz17W1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRVc2VyLmltcGVyc29uYXRlZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWNvbjogPFJlc2V0IC8+LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogY29tbW9uSW1wZXJzb25hdGlvbk1lc3NhZ2VzLnN0b3BJbXBlcnNvbmF0aW9uLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrOiAoKSA9PiBzdG9wSW1wZXJzb25hdGlvbigpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiBjb21tb25JbXBlcnNvbmF0aW9uTWVzc2FnZXMuc3RhcnRJbXBlcnNvbmF0aW9uLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY29uOiA8SW1wZXJzb25hdGVVc2VyIC8+LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNhYmxlZDogIWRhdGEudXNlci5pbXBlcnNvbmF0aW9uQWxsb3dlZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DbGljazogKCkgPT4gc3RhcnRJbXBlcnNvbmF0aW9uKHVzZXJJZCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIF19XG4gICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgIDwvVG9vbGJhckFjdGlvbnM+XG4gICAgICAgIDwvU3RhY2tUb29sYmFyPlxuICAgICk7XG59O1xuXG5jb25zdCBUaXRsZVRleHQgPSBzdHlsZWQoXCJkaXZcIilgXG4gICAgZm9udC13ZWlnaHQ6ICR7KHsgdGhlbWUgfSkgPT4gdGhlbWUudHlwb2dyYXBoeS5mb250V2VpZ2h0UmVndWxhcn07XG4gICAgZm9udC1zaXplOiAxOHB4O1xuICAgIGxpbmUtaGVpZ2h0OiAyMXB4O1xuICAgIGNvbG9yOiAkeyh7IHRoZW1lIH0pID0+IHRoZW1lLnBhbGV0dGUudGV4dC5wcmltYXJ5fTtcbmA7XG5cbmNvbnN0IFN1cHBvcnRUZXh0ID0gc3R5bGVkKFwiZGl2XCIpYFxuICAgIGZvbnQtd2VpZ2h0OiAkeyh7IHRoZW1lIH0pID0+IHRoZW1lLnR5cG9ncmFwaHkuZm9udFdlaWdodFJlZ3VsYXJ9O1xuICAgIGZvbnQtc2l6ZTogMTRweDtcbiAgICBsaW5lLWhlaWdodDogMjBweDtcbiAgICBjb2xvcjogJHsoeyB0aGVtZSB9KSA9PiB0aGVtZS5wYWxldHRlLnRleHQuc2Vjb25kYXJ5fTtcbmA7XG4iXX0= */"));
|
|
78
|
-
var SupportText = /*#__PURE__*/
|
|
72
|
+
var SupportText = /*#__PURE__*/styled("div", process.env.NODE_ENV === "production" ? {
|
|
79
73
|
target: "e1ug6q2t0"
|
|
80
74
|
} : {
|
|
81
75
|
target: "e1ug6q2t0",
|
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.UserPermissionsUserPageBasicDataPanel = void 0;
|
|
7
|
-
var _client = require("@apollo/client");
|
|
8
|
-
var _admin = require("@comet/admin");
|
|
9
|
-
var _material = require("@mui/material");
|
|
10
|
-
var _styles = require("@mui/material/styles");
|
|
11
|
-
var _reactIntl = require("react-intl");
|
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
1
|
var _templateObject;
|
|
14
2
|
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
15
|
-
|
|
3
|
+
import { gql, useQuery } from "@apollo/client";
|
|
4
|
+
import { Field, FillSpace, FinalForm, FinalFormInput, Loading, ToolbarTitleItem } from "@comet/admin";
|
|
5
|
+
import { Card, CardContent, Toolbar } from "@mui/material";
|
|
6
|
+
import { styled } from "@mui/material/styles";
|
|
7
|
+
import { FormattedMessage } from "react-intl";
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
export var UserPermissionsUserPageBasicDataPanel = function UserPermissionsUserPageBasicDataPanel(_ref) {
|
|
16
10
|
var userId = _ref.userId;
|
|
17
|
-
var _useQuery =
|
|
11
|
+
var _useQuery = useQuery(gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n query UserBasicData($id: String!) {\n user: userPermissionsUserById(id: $id) {\n id\n name\n email\n }\n }\n "]))), {
|
|
18
12
|
variables: {
|
|
19
13
|
id: userId
|
|
20
14
|
}
|
|
@@ -26,38 +20,38 @@ var UserPermissionsUserPageBasicDataPanel = exports.UserPermissionsUserPageBasic
|
|
|
26
20
|
throw new Error(error.message);
|
|
27
21
|
}
|
|
28
22
|
if (loading || !data) {
|
|
29
|
-
return /*#__PURE__*/(
|
|
23
|
+
return /*#__PURE__*/_jsx(Loading, {});
|
|
30
24
|
}
|
|
31
|
-
return /*#__PURE__*/(
|
|
32
|
-
children: [/*#__PURE__*/(
|
|
33
|
-
children: [/*#__PURE__*/(
|
|
34
|
-
children: /*#__PURE__*/(
|
|
25
|
+
return /*#__PURE__*/_jsxs(Card, {
|
|
26
|
+
children: [/*#__PURE__*/_jsxs(CardToolbar, {
|
|
27
|
+
children: [/*#__PURE__*/_jsx(ToolbarTitleItem, {
|
|
28
|
+
children: /*#__PURE__*/_jsx(FormattedMessage, {
|
|
35
29
|
id: "comet.userPermissions.basicData",
|
|
36
30
|
defaultMessage: "Basic Data"
|
|
37
31
|
})
|
|
38
|
-
}), /*#__PURE__*/(
|
|
39
|
-
}), /*#__PURE__*/(
|
|
40
|
-
children: /*#__PURE__*/(
|
|
32
|
+
}), /*#__PURE__*/_jsx(FillSpace, {})]
|
|
33
|
+
}), /*#__PURE__*/_jsx(CardContent, {
|
|
34
|
+
children: /*#__PURE__*/_jsxs(FinalForm, {
|
|
41
35
|
mode: "edit",
|
|
42
36
|
initialValues: data.user,
|
|
43
37
|
onSubmit: function onSubmit() {
|
|
44
38
|
/* do nothing */
|
|
45
39
|
},
|
|
46
|
-
children: [/*#__PURE__*/(
|
|
40
|
+
children: [/*#__PURE__*/_jsx(Field, {
|
|
47
41
|
variant: "horizontal",
|
|
48
42
|
name: "email",
|
|
49
|
-
component:
|
|
43
|
+
component: FinalFormInput,
|
|
50
44
|
disabled: true,
|
|
51
|
-
label: /*#__PURE__*/(
|
|
45
|
+
label: /*#__PURE__*/_jsx(FormattedMessage, {
|
|
52
46
|
id: "comet.userPermissions.email",
|
|
53
47
|
defaultMessage: "E-Mail"
|
|
54
48
|
})
|
|
55
|
-
}), /*#__PURE__*/(
|
|
49
|
+
}), /*#__PURE__*/_jsx(Field, {
|
|
56
50
|
variant: "horizontal",
|
|
57
51
|
name: "name",
|
|
58
|
-
component:
|
|
52
|
+
component: FinalFormInput,
|
|
59
53
|
disabled: true,
|
|
60
|
-
label: /*#__PURE__*/(
|
|
54
|
+
label: /*#__PURE__*/_jsx(FormattedMessage, {
|
|
61
55
|
id: "comet.userPermissions.name",
|
|
62
56
|
defaultMessage: "Name"
|
|
63
57
|
})
|
|
@@ -66,7 +60,7 @@ var UserPermissionsUserPageBasicDataPanel = exports.UserPermissionsUserPageBasic
|
|
|
66
60
|
})]
|
|
67
61
|
});
|
|
68
62
|
};
|
|
69
|
-
var CardToolbar = /*#__PURE__*/
|
|
63
|
+
var CardToolbar = /*#__PURE__*/styled(Toolbar, process.env.NODE_ENV === "production" ? {
|
|
70
64
|
target: "e1qgdr650"
|
|
71
65
|
} : {
|
|
72
66
|
target: "e1qgdr650",
|
|
@@ -1,24 +1,5 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.ContentScopeGrid = void 0;
|
|
8
|
-
exports.generateGridColumnsFromContentScopeProperties = generateGridColumnsFromContentScopeProperties;
|
|
9
|
-
var _client = require("@apollo/client");
|
|
10
|
-
var _admin = require("@comet/admin");
|
|
11
|
-
var _adminIcons = require("@comet/admin-icons");
|
|
12
|
-
var _material = require("@mui/material");
|
|
13
|
-
var _xDataGrid = require("@mui/x-data-grid");
|
|
14
|
-
var _lodash = _interopRequireDefault(require("lodash.isequal"));
|
|
15
|
-
var _react = require("react");
|
|
16
|
-
var _reactIntl = require("react-intl");
|
|
17
|
-
var _camelCaseToHumanReadable = require("../../utils/camelCaseToHumanReadable");
|
|
18
|
-
var _SelectScopesDialogContent = require("./selectScopesDialogContent/SelectScopesDialogContent");
|
|
19
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
2
|
var _templateObject;
|
|
21
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
22
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24
5
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -31,21 +12,34 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
31
12
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
32
13
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
33
14
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
15
|
+
import { gql, useQuery } from "@apollo/client";
|
|
16
|
+
import { Button, CancelButton, DataGridToolbar, FieldSet, FillSpace, Loading, messages, SaveBoundary, SaveBoundarySaveButton } from "@comet/admin";
|
|
17
|
+
import { Select } from "@comet/admin-icons";
|
|
18
|
+
import {
|
|
19
|
+
// eslint-disable-next-line no-restricted-imports
|
|
20
|
+
Dialog, DialogActions, DialogTitle, Typography } from "@mui/material";
|
|
21
|
+
import { DataGrid } from "@mui/x-data-grid";
|
|
22
|
+
import isEqual from "lodash.isequal";
|
|
23
|
+
import { useState } from "react";
|
|
24
|
+
import { FormattedMessage, useIntl } from "react-intl";
|
|
25
|
+
import { camelCaseToHumanReadable } from "../../utils/camelCaseToHumanReadable";
|
|
26
|
+
import { SelectScopesDialogContent } from "./selectScopesDialogContent/SelectScopesDialogContent";
|
|
27
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
34
28
|
function ContentScopeGridToolbar(_ref) {
|
|
35
29
|
var toolbarAction = _ref.toolbarAction;
|
|
36
|
-
return /*#__PURE__*/(
|
|
37
|
-
children: [/*#__PURE__*/(
|
|
30
|
+
return /*#__PURE__*/_jsxs(DataGridToolbar, {
|
|
31
|
+
children: [/*#__PURE__*/_jsx(FillSpace, {}), toolbarAction]
|
|
38
32
|
});
|
|
39
33
|
}
|
|
40
|
-
var ContentScopeGrid =
|
|
34
|
+
export var ContentScopeGrid = function ContentScopeGrid(_ref2) {
|
|
41
35
|
var _data$userContentScop;
|
|
42
36
|
var userId = _ref2.userId;
|
|
43
|
-
var intl =
|
|
44
|
-
var _useState =
|
|
37
|
+
var intl = useIntl();
|
|
38
|
+
var _useState = useState(false),
|
|
45
39
|
_useState2 = _slicedToArray(_useState, 2),
|
|
46
40
|
open = _useState2[0],
|
|
47
41
|
setOpen = _useState2[1];
|
|
48
|
-
var _useQuery =
|
|
42
|
+
var _useQuery = useQuery(gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n query ContentScopes($userId: String!) {\n userContentScopes: userPermissionsContentScopes(userId: $userId)\n userContentScopesSkipManual: userPermissionsContentScopes(userId: $userId, skipManual: true)\n availableContentScopes: userPermissionsAvailableContentScopes {\n scope\n label\n }\n }\n "]))), {
|
|
49
43
|
variables: {
|
|
50
44
|
userId: userId
|
|
51
45
|
}
|
|
@@ -54,29 +48,29 @@ var ContentScopeGrid = exports.ContentScopeGrid = function ContentScopeGrid(_ref
|
|
|
54
48
|
error = _useQuery.error;
|
|
55
49
|
if (error) throw new Error(error.message);
|
|
56
50
|
if (!data) {
|
|
57
|
-
return /*#__PURE__*/(
|
|
51
|
+
return /*#__PURE__*/_jsx(Loading, {});
|
|
58
52
|
}
|
|
59
53
|
var columns = generateGridColumnsFromContentScopeProperties(data.availableContentScopes);
|
|
60
54
|
var toolbarSlotProps = {
|
|
61
|
-
toolbarAction: /*#__PURE__*/(
|
|
62
|
-
startIcon: /*#__PURE__*/(
|
|
55
|
+
toolbarAction: /*#__PURE__*/_jsx(Button, {
|
|
56
|
+
startIcon: /*#__PURE__*/_jsx(Select, {}),
|
|
63
57
|
onClick: function onClick() {
|
|
64
58
|
return setOpen(true);
|
|
65
59
|
},
|
|
66
60
|
variant: "primary",
|
|
67
|
-
children: /*#__PURE__*/(
|
|
61
|
+
children: /*#__PURE__*/_jsx(FormattedMessage, {
|
|
68
62
|
id: "comet.userPermissions.selectScopes",
|
|
69
63
|
defaultMessage: "Assign scopes"
|
|
70
64
|
})
|
|
71
65
|
})
|
|
72
66
|
};
|
|
73
|
-
return /*#__PURE__*/(
|
|
67
|
+
return /*#__PURE__*/_jsxs(FieldSet, {
|
|
74
68
|
title: intl.formatMessage({
|
|
75
69
|
id: "comet.userPermissions.assignedScopes",
|
|
76
70
|
defaultMessage: "Assigned Scopes"
|
|
77
71
|
}),
|
|
78
72
|
disablePadding: true,
|
|
79
|
-
children: [/*#__PURE__*/(
|
|
73
|
+
children: [/*#__PURE__*/_jsx(DataGrid, {
|
|
80
74
|
rows: data.userContentScopes,
|
|
81
75
|
columns: columns,
|
|
82
76
|
rowCount: (_data$userContentScop = data === null || data === void 0 ? void 0 : data.userContentScopes.length) !== null && _data$userContentScop !== void 0 ? _data$userContentScop : 0,
|
|
@@ -90,35 +84,35 @@ var ContentScopeGrid = exports.ContentScopeGrid = function ContentScopeGrid(_ref
|
|
|
90
84
|
slotProps: {
|
|
91
85
|
toolbar: toolbarSlotProps
|
|
92
86
|
}
|
|
93
|
-
}), /*#__PURE__*/(
|
|
87
|
+
}), /*#__PURE__*/_jsx(SaveBoundary, {
|
|
94
88
|
onAfterSave: function onAfterSave() {
|
|
95
89
|
setOpen(false);
|
|
96
90
|
},
|
|
97
|
-
children: /*#__PURE__*/(
|
|
91
|
+
children: /*#__PURE__*/_jsxs(Dialog, {
|
|
98
92
|
open: open,
|
|
99
93
|
maxWidth: "lg",
|
|
100
|
-
children: [/*#__PURE__*/(
|
|
101
|
-
children: /*#__PURE__*/(
|
|
94
|
+
children: [/*#__PURE__*/_jsx(DialogTitle, {
|
|
95
|
+
children: /*#__PURE__*/_jsx(FormattedMessage, {
|
|
102
96
|
id: "comet.userScopes.dialog.title",
|
|
103
97
|
defaultMessage: "Select scopes"
|
|
104
98
|
})
|
|
105
|
-
}), /*#__PURE__*/(
|
|
99
|
+
}), /*#__PURE__*/_jsx(SelectScopesDialogContent, {
|
|
106
100
|
userId: userId,
|
|
107
101
|
userContentScopes: data.userContentScopes,
|
|
108
102
|
userContentScopesSkipManual: data.userContentScopesSkipManual
|
|
109
|
-
}), /*#__PURE__*/(
|
|
110
|
-
children: [/*#__PURE__*/(
|
|
103
|
+
}), /*#__PURE__*/_jsxs(DialogActions, {
|
|
104
|
+
children: [/*#__PURE__*/_jsx(CancelButton, {
|
|
111
105
|
onClick: function onClick() {
|
|
112
106
|
return setOpen(false);
|
|
113
107
|
},
|
|
114
|
-
children: /*#__PURE__*/(
|
|
115
|
-
}), /*#__PURE__*/(
|
|
108
|
+
children: /*#__PURE__*/_jsx(FormattedMessage, _objectSpread({}, messages.close))
|
|
109
|
+
}), /*#__PURE__*/_jsx(SaveBoundarySaveButton, {})]
|
|
116
110
|
})]
|
|
117
111
|
})
|
|
118
112
|
})]
|
|
119
113
|
});
|
|
120
114
|
};
|
|
121
|
-
function generateGridColumnsFromContentScopeProperties(availableContentScopes) {
|
|
115
|
+
export function generateGridColumnsFromContentScopeProperties(availableContentScopes) {
|
|
122
116
|
var uniquePropertyNames = Array.from(new Set(availableContentScopes.flatMap(function (item) {
|
|
123
117
|
return Object.keys(item.scope);
|
|
124
118
|
})));
|
|
@@ -129,14 +123,14 @@ function generateGridColumnsFromContentScopeProperties(availableContentScopes) {
|
|
|
129
123
|
pinnable: false,
|
|
130
124
|
sortable: false,
|
|
131
125
|
filterable: true,
|
|
132
|
-
headerName:
|
|
126
|
+
headerName: camelCaseToHumanReadable(propertyName),
|
|
133
127
|
renderCell: function renderCell(_ref3) {
|
|
134
128
|
var row = _ref3.row;
|
|
135
129
|
var contentScopeWithLabel = availableContentScopes.find(function (availableContentScope) {
|
|
136
|
-
return (
|
|
130
|
+
return isEqual(availableContentScope.scope, row);
|
|
137
131
|
});
|
|
138
132
|
if (contentScopeWithLabel) {
|
|
139
|
-
return /*#__PURE__*/(
|
|
133
|
+
return /*#__PURE__*/_jsx(Typography, {
|
|
140
134
|
variant: index === 0 ? "subtitle2" : "body2",
|
|
141
135
|
children: contentScopeWithLabel.label[propertyName]
|
|
142
136
|
});
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.namedOperations = void 0;
|
|
7
|
-
var namedOperations = exports.namedOperations = {
|
|
1
|
+
export var namedOperations = {
|
|
8
2
|
Query: {
|
|
9
3
|
PermissionContentScopes: 'PermissionContentScopes'
|
|
10
4
|
},
|