From 644ec4710b0d148d7ad4579a23f389e98e4cbff0 Mon Sep 17 00:00:00 2001 From: David Matejka Date: Tue, 11 Jun 2024 13:28:21 +0200 Subject: [PATCH 1/7] refactor: remove old ui / admin --- docker-compose.override.dist.yaml | 2 +- docker-compose.yaml | 12 - packages/admin-i18n/api-extractor.json | 3 - packages/admin-i18n/package.json | 44 - packages/admin-i18n/src/index.ts | 3 - packages/admin-i18n/src/messages/csCZ.ts | 146 - packages/admin-i18n/src/messages/index.ts | 1 - packages/admin-i18n/src/tsconfig.json | 7 - packages/admin-i18n/tsconfig.json | 7 - packages/admin-i18n/tsdoc.json | 6 - packages/admin-i18n/vite.config.js | 3 - packages/admin-sandbox/README.link-local.md | 44 - packages/admin-sandbox/README.md | 19 - packages/admin-sandbox/admin/.env.development | 3 - packages/admin-sandbox/admin/.env.production | 2 - .../admin-sandbox/admin/apple-touch-icon.png | Bin 11137 -> 0 bytes .../admin/components/AddContent.tsx | 66 - .../admin/components/AlertLogoutLink.tsx | 14 - .../admin/components/AnchorInsertHandler.ts | 18 - .../admin/components/AppHeaderTitle.tsx | 25 - .../admin/components/CategoryForm.tsx | 11 - .../admin/components/Constants.ts | 1 - .../admin/components/ContentField.tsx | 154 - .../admin/components/DataGridTile.tsx | 68 - .../admin/components/Directives.tsx | 31 - .../admin/components/EditOrCreateForm.tsx | 116 - .../admin/components/FocalPoint.css | 50 - .../admin/components/FocalPoint.tsx | 189 - .../HorizontalMenu/HorizontalMenu.css | 89 - .../HorizontalMenu/HorizontalMenu.tsx | 85 - .../HorizontalMenuContainer.tsx | 0 .../HorizontalMenu/HorizontalMenuItem.tsx | 128 - .../components/HorizontalMenu/contexts.ts | 13 - .../admin/components/HorizontalMenu/index.ts | 1 - .../admin/components/HorizontalMenu/types.ts | 29 - .../admin-sandbox/admin/components/Layout.tsx | 246 -- .../admin/components/LayoutComponent.tsx | 19 - .../components/LayoutComponent[bare].tsx | 24 - .../components/LayoutComponent[default].tsx | 93 - .../LayoutComponent[headless-cms].tsx | 134 - .../components/LayoutComponent[legacy].tsx | 60 - .../LayoutComponent[right-sidebar].tsx | 129 - .../components/LayoutComponent[tailwind].tsx | 110 - .../admin/components/Navigation.tsx | 151 - .../admin/components/PanelDivider.tsx | 14 - .../components/ScrollView/ScrollView.css | 53 - .../components/ScrollView/ScrollView.tsx | 72 - .../admin-sandbox/admin/components/Slots.tsx | 64 - .../admin/components/customLinks.tsx | 74 - .../admin/components/editorButton.css | 17 - .../admin/components/messages/types.ts | 17 - .../components/messages/ui/ChatsListItem.tsx | 73 - .../components/messages/ui/EmptyState.css | 4 - .../components/messages/ui/EmptyState.tsx | 17 - .../components/messages/ui/MessageItem.css | 17 - .../components/messages/ui/MessageItem.tsx | 79 - .../messages/ui/NewMessageInput.tsx | 57 - .../admin/components/messages/ui/index.css | 29 - packages/admin-sandbox/admin/favicon.png | Bin 11137 -> 0 bytes packages/admin-sandbox/admin/index.css | 11 - packages/admin-sandbox/admin/index.html | 13 - packages/admin-sandbox/admin/index.tsx | 36 - .../admin/pages/ContentBlocks.tsx | 16 - .../admin/pages/actionableBoxes.tsx | 19 - .../admin-sandbox/admin/pages/articles.tsx | 207 -- packages/admin-sandbox/admin/pages/auto.tsx | 107 - packages/admin-sandbox/admin/pages/boxes.tsx | 42 - packages/admin-sandbox/admin/pages/brand.tsx | 24 - .../admin-sandbox/admin/pages/buttons.tsx | 164 - packages/admin-sandbox/admin/pages/chat.tsx | 36 - .../admin-sandbox/admin/pages/examples.tsx | 11 - .../admin/pages/fieldContainers.tsx | 150 - .../admin-sandbox/admin/pages/homepage.tsx | 34 - packages/admin-sandbox/admin/pages/index.tsx | 412 --- packages/admin-sandbox/admin/pages/inputs.tsx | 126 - packages/admin-sandbox/admin/pages/lorem.tsx | 3 - .../admin-sandbox/admin/pages/messages.tsx | 57 - .../admin-sandbox/admin/pages/nested/path.tsx | 89 - packages/admin-sandbox/admin/pages/quiz.tsx | 23 - packages/admin-sandbox/admin/pages/random.tsx | 19 - packages/admin-sandbox/admin/pages/second.tsx | 13 - packages/admin-sandbox/admin/pages/seq.tsx | 58 - .../admin-sandbox/admin/pages/settings.tsx | 9 - .../admin/pages/settings/locales.tsx | 14 - packages/admin-sandbox/admin/pages/slots.tsx | 51 - packages/admin-sandbox/admin/pages/tenant.tsx | 19 - .../admin-sandbox/admin/pages/textareas.tsx | 25 - packages/admin-sandbox/admin/tsconfig.json | 13 - packages/admin-sandbox/admin/vite-env.d.ts | 6 - packages/admin-sandbox/api/index.ts | 32 - .../migrations/2021-03-31-191433-init.json | 19 - .../2021-06-16-140020-upload-showcase-1.json | 509 --- .../2021-06-17-131916-upload-showcase-2.json | 943 ----- .../2021-06-17-132344-upload-showcase-3.json | 44 - .../2021-06-17-141503-upload-showcase-4.json | 20 - .../2021-06-21-190833-upload-showcase-5.json | 235 -- ...2-sandbox-prepare-api-for-blockeditor.json | 60 - .../migrations/2021-09-10-121941-fields.json | 250 -- .../migrations/2021-09-13-080032-content.json | 364 -- .../2021-09-14-143228-articles.json | 237 -- .../2021-10-27-152749-homepage-fields.json | 88 - .../2021-11-05-094315-content-link.json | 45 - .../migrations/2021-11-25-142639-locale.json | 313 -- .../2022-01-03-090702-article-slug.json | 46 - .../2022-01-06-155631-image-errors.json | 117 - .../2022-01-11-143230-article-state.json | 45 - .../migrations/2022-01-17-164045-links.json | 273 -- ...2022-01-26-105400-add-blocks-repeater.json | 137 - .../2022-02-18-181217-add-number.json | 38 - .../2022-02-21-153039-add-time.json | 36 - ...-02-25-113348-add-not-null-text-value.json | 36 - .../2022-03-03-124525-add-email-value.json | 36 - .../2022-03-03-125601-add-search-value.json | 36 - .../2022-03-03-132725-add-uri-value.json | 36 - .../2022-03-11-094052-add-content-blocks.json | 315 -- ...-04-16-092713-add-order-to-categories.json | 36 - .../2022-04-22-093758-image-align.json | 45 - .../2022-05-05-112442-locale-label.json | 36 - .../2022-05-05-145615-locales-order.json | 36 - .../2022-05-11-080026-article-image.json | 39 - .../2022-05-23-090850-locale-dialect.json | 80 - ...24-092329-index-multiple-basic-images.json | 119 - .../api/migrations/2022-05-27-152026-seq.json | 156 - ...2022-06-01-093650-article-sorted-tags.json | 130 - .../migrations/2022-06-03-082836-quiz.json | 117 - .../migrations/2022-06-14-090735-gallery.json | 517 --- .../migrations/2022-07-01-134420-json.json | 36 - .../2022-07-19-131102-content-tags.json | 130 - .../2022-11-24-135530-s3-max-size.json | 17 - .../2023-08-21-152956-focal-point.json | 114 - .../migrations/2023-11-24-121513-tasks.json | 188 - .../2023-11-28-170731-user-order.json | 36 - packages/admin-sandbox/api/model/Article.ts | 52 - packages/admin-sandbox/api/model/Content.ts | 39 - .../api/model/ContentBlockPage.ts | 24 - packages/admin-sandbox/api/model/Files.ts | 105 - packages/admin-sandbox/api/model/Homepage.ts | 11 - .../admin-sandbox/api/model/InputShowcase.ts | 39 - packages/admin-sandbox/api/model/Link.ts | 10 - packages/admin-sandbox/api/model/Locale.ts | 11 - packages/admin-sandbox/api/model/One.ts | 3 - .../admin-sandbox/api/model/QuizResult.ts | 13 - packages/admin-sandbox/api/model/SeqEntity.ts | 13 - packages/admin-sandbox/api/model/Task.ts | 16 - .../admin-sandbox/api/model/UploadShowcase.ts | 35 - packages/admin-sandbox/api/model/Url.ts | 13 - packages/admin-sandbox/api/model/index.ts | 14 - packages/admin-sandbox/api/tsconfig.json | 10 - packages/admin-sandbox/package.json | 31 - packages/admin-sandbox/tests/pages.test.ts | 35 - packages/admin-sandbox/tests/tsconfig.json | 12 - packages/admin-sandbox/tsconfig.json | 9 - packages/admin-sandbox/vite.config.ts | 9 - packages/admin/api-extractor.json | 3 - packages/admin/package.json | 113 - packages/admin/playwright.config.js | 57 - packages/admin/src/acl/index.ts | 1 - .../admin/src/acl/useProjectUserRoles.tsx | 2 - packages/admin/src/adminDictionary.ts | 27 - packages/admin/src/ambient.d.ts | 7 - packages/admin/src/bootstrap/index.ts | 2 - packages/admin/src/bootstrap/render.ts | 7 - packages/admin/src/bootstrap/runReactApp.tsx | 21 - .../OutdatedApplicationChecker.tsx | 125 - .../outdatedApplicationDictionary.ts | 10 - .../src/components/ApplicationEntrypoint.tsx | 89 - .../DataViewPageNameKeyProvider.tsx | 13 - .../admin/src/components/Dev/ApiPanel.tsx | 50 - packages/admin/src/components/Dev/DevBar.tsx | 22 - .../src/components/Dev/DevErrorFallback.tsx | 11 - .../src/components/Dev/IdentityPanel.tsx | 206 -- .../Dev/ProjectUserRolesRevealer.tsx | 26 - packages/admin/src/components/Dev/index.ts | 3 - .../admin/src/components/Dev/isDevMode.ts | 4 - .../components/Identity/IdentityProvider.tsx | 50 - .../Identity/InvalidIdentityFallback.tsx | 15 - .../admin/src/components/Identity/index.ts | 12 - .../src/components/Identity/useIdentity.ts | 9 - .../src/components/Login/LoginEntrypoint.tsx | 209 -- packages/admin/src/components/Login/index.tsx | 3 - packages/admin/src/components/LogoutLink.tsx | 30 - .../admin/src/components/MiscPageLayout.tsx | 37 - .../NavigationProvider/NavigationProvider.tsx | 26 - .../components/NavigationProvider/index.ts | 1 - .../src/components/Project/ProjectList.tsx | 41 - .../admin/src/components/Project/index.ts | 1 - .../src/components/SwitchProjectLink.tsx | 18 - .../components/bindingFacade/blocks/Block.tsx | 35 - .../blocks/DiscriminatedBlocks.tsx | 70 - .../bindingFacade/blocks/blockAnalyzer.ts | 11 - .../blocks/getDiscriminatedBlock.ts | 6 - .../components/bindingFacade/blocks/index.ts | 6 - .../bindingFacade/blocks/useBlockProps.ts | 15 - .../blocks/useNormalizedBlocks.ts | 12 - .../ClearFieldButton/ClearFieldButton.tsx | 21 - .../ClearFieldButtonInner.tsx | 35 - .../buttons/ClearFieldButton/index.ts | 2 - .../bindingFacade/buttons/PersistButton.tsx | 47 - .../components/bindingFacade/buttons/index.ts | 2 - .../BlockRepeater/AddNewBlockButton.tsx | 56 - .../BlockRepeater/AddNewBlockButtonInner.tsx | 50 - .../BlockRepeater/BlockRepeater.tsx | 58 - .../collections/BlockRepeater/Dictionary.ts | 8 - .../BlockRepeater/SortableBlock.tsx | 34 - .../collections/BlockRepeater/index.ts | 5 - .../collections/Repeater/Repeater.tsx | 50 - .../Repeater/RepeaterFieldContainer.tsx | 76 - .../collections/Repeater/RepeaterHandle.tsx | 5 - .../collections/Repeater/RepeaterInner.tsx | 179 - .../collections/Repeater/RepeaterItem.tsx | 49 - .../Repeater/SortableRepeaterContainer.tsx | 18 - .../Repeater/SortableRepeaterItem.tsx | 9 - .../Repeater/SortableRepeaterItemHandle.tsx | 9 - .../collections/Repeater/index.ts | 9 - .../Repeater/repeaterDictionary.ts | 11 - .../bindingFacade/collections/index.ts | 2 - .../discrimination/DiscriminatedDatum.ts | 5 - .../NormalizedDiscriminatedData.ts | 4 - .../ResolvedDiscriminatedDatum.ts | 6 - .../discrimination/SugaredDiscriminateBy.ts | 3 - .../discrimination/getDiscriminatedDatum.ts | 12 - .../bindingFacade/discrimination/index.ts | 6 - .../discrimination/useDiscriminatedData.ts | 24 - .../displayFields/DisplayTextField.tsx | 63 - .../bindingFacade/displayFields/index.ts | 1 - .../DimensionsSwitcher/DimensionsRenderer.tsx | 197 -- .../DimensionsSwitcher/DimensionsSwitcher.tsx | 85 - .../environment/DimensionsSwitcher/index.ts | 4 - .../DimensionsSwitcher/renderByJoining.tsx | 16 - .../environment/DimensionsSwitcher/types.ts | 12 - .../environment/SideDimensions.tsx | 180 - .../bindingFacade/environment/index.ts | 2 - .../src/components/bindingFacade/index.ts | 10 - .../renderers/FeedbackRenderer.tsx | 33 - .../renderers/LayoutRenderer.tsx | 21 - .../bindingFacade/renderers/index.ts | 4 - .../ImmutableEntityListRenderer.tsx | 55 - .../MutableEntityListRenderer.tsx | 43 - .../renderers/listRenderers/index.ts | 2 - .../pageRenderers/DataGridPageRenderer.tsx | 34 - .../ImmutableEntityListPageRenderer.tsx | 35 - .../ImmutableEntityListTablePageRenderer.tsx | 94 - .../MutableEntityListPageRenderer.tsx | 36 - .../renderers/pageRenderers/index.ts | 4 - .../richText/ContemberEditor/index.ts | 46 - .../ContemberEditor/methods/addMarks.ts | 10 - .../ContemberEditor/methods/canToggleMark.ts | 9 - .../ContemberEditor/methods/closest.ts | 21 - .../methods/closestBlockEntry.ts | 14 - .../closestViableBlockContainerEntry.ts | 14 - .../ContemberEditor/methods/ejectElement.ts | 14 - .../methods/elementToSpecifics.ts | 8 - .../methods/getElementDataAttributes.ts | 22 - .../methods/getPreviousSibling.ts | 18 - .../ContemberEditor/methods/hasMarks.ts | 30 - .../methods/hasParentOfType.ts | 18 - .../richText/ContemberEditor/methods/index.ts | 19 - .../ContemberEditor/methods/isElementType.ts | 29 - .../methods/permissivelyDeserializeNodes.ts | 30 - .../ContemberEditor/methods/removeMarks.ts | 10 - .../ContemberEditor/methods/serializeNodes.ts | 18 - .../methods/strictlyDeserializeNodes.ts | 19 - .../methods/textToSpecifics.ts | 7 - .../ContemberEditor/methods/toLatestFormat.ts | 37 - .../ContemberEditor/methods/topLevelNodes.ts | 11 - .../bindingFacade/richText/RichEditor.ts | 69 - .../richText/RichTextField/RichTextField.tsx | 183 - .../richText/RichTextField/index.ts | 1 - .../RichTextField/useRichTextFieldNodes.ts | 38 - .../richText/baseEditor/BlockElement.tsx | 50 - .../baseEditor/CustomElementPlugin.ts | 15 - .../richText/baseEditor/CustomMarkPlugin.ts | 21 - .../richText/baseEditor/DefaultElement.tsx | 11 - .../richText/baseEditor/EditableCanvas.tsx | 55 - .../richText/baseEditor/EditorPasteUtils.ts | 53 - .../baseEditor/EditorWithEssentials.ts | 57 - .../bindingFacade/richText/baseEditor/Node.ts | 8 - .../baseEditor/createEditorWithEssentials.tsx | 230 -- .../richText/baseEditor/editorDictionary.ts | 9 - .../baseEditor/html/HtmlDeserializer.ts | 180 - .../baseEditor/html/HtmlDeserializerPlugin.ts | 33 - .../richText/baseEditor/html/index.ts | 2 - .../richText/baseEditor/index.ts | 11 - .../richText/baseEditor/overrides/index.ts | 2 - .../overrides/overrideDeleteBackward.ts | 32 - .../baseEditor/overrides/withPaste.ts | 25 - .../richText/blockEditor/BlockEditor.tsx | 425 --- .../BlockHoveringToolbarContents.tsx | 123 - .../blockEditor/FieldBackedElement.ts | 27 - .../blockEditor/editor/EditorWithBlocks.ts | 21 - .../richText/blockEditor/editor/index.ts | 5 - .../blockEditor/editor/initBlockEditor.ts | 80 - .../editor/overrideCreateElementReference.ts | 18 - .../blockEditor/editor/overrideInsertBreak.ts | 51 - .../blockEditor/editor/overrideInsertData.ts | 100 - .../overrideInsertElementWithReference.ts | 13 - .../blockEditor/editor/overrideInsertNode.ts | 19 - .../editor/overrideRenderElement.tsx | 46 - .../elements/ElementWithReference.ts | 11 - .../blockEditor/elements/ReferenceElement.tsx | 97 - .../richText/blockEditor/elements/index.ts | 2 - .../blockEditor/embed/core/EmbedHandler.ts | 21 - .../richText/blockEditor/embed/core/index.ts | 1 - .../embed/handlers/GoogleFormEmbedHandler.tsx | 95 - .../embed/handlers/SoundCloudEmbedHandler.tsx | 84 - .../embed/handlers/SpotifyEmbedHandler.tsx | 107 - .../embed/handlers/VimeoEmbedHandler.tsx | 89 - .../embed/handlers/YouTubeEmbedHandler.tsx | 89 - .../blockEditor/embed/handlers/index.ts | 5 - .../richText/blockEditor/embed/index.ts | 11 - .../richText/blockEditor/index.ts | 13 - .../references/ReferenceElementWrapper.tsx | 17 - .../references/ReferencesProvider.tsx | 21 - .../richText/blockEditor/references/index.ts | 2 - .../references/useCreateElementReference.ts | 63 - .../references/useGetReferenceEntityList.ts | 61 - .../references/useGetReferencedEntity.ts | 14 - .../useInsertElementWithReference.ts | 27 - .../references/useReferencedEntity.ts | 8 - .../renderers/ReferenceElementRenderer.tsx | 169 - .../richText/blockEditor/renderers/index.ts | 1 - .../blockEditor/state/SortedBlocksContext.tsx | 4 - .../state/useBlockEditorOnChange.ts | 94 - .../blockEditor/state/useBlockEditorState.ts | 42 - .../blockEditor/state/useBlockElementCache.ts | 65 - .../state/useBlockElementPathRefs.ts | 35 - .../blockEditor/state/useRefreshBlocks.ts | 172 - .../blockEditor/templating/BaseTextField.ts | 7 - .../blockEditor/templating/ContentOutlet.ts | 21 - .../blockEditor/templating/TextField.ts | 9 - .../templating/editorTemplateAnalyzer.ts | 25 - .../templating/getEditorTemplate.tsx | 52 - .../richText/blockEditor/templating/index.ts | 5 - .../templating/useEditorReferenceBlocks.ts | 29 - .../blockEditor/useBlockEditorSlateNodes.ts | 77 - .../blockEditor/useGetParentEntityRef.ts | 13 - .../richText/blockEditor/utils/index.ts | 2 - .../blockEditor/utils/isInReferenceElement.ts | 20 - .../utils/prepareElementForInsertion.ts | 94 - .../editorFactory/BuiltinEditorPlugins.ts | 3 - .../richText/editorFactory/createEditor.ts | 81 - .../richText/editorFactory/index.ts | 2 - .../richText/editorFactory/presets.ts | 19 - .../editorSelection/EditorSelectionAction.ts | 16 - .../editorSelection/EditorSelectionState.ts | 28 - .../editorSelection/editorSelectionReducer.ts | 95 - .../richText/editorSelection/index.ts | 3 - .../editorSelection/useEditorSelection.ts | 90 - .../editorSelection/useToolbarsState.ts | 97 - .../bindingFacade/richText/index.ts | 19 - ...atedEditorFormerlyKnownAsRichTextField.tsx | 128 - .../index.ts | 1 - .../useRichTextFieldNodes.ts | 34 - .../attributes/alignment/alignButton.ts | 48 - .../plugins/attributes/alignment/index.ts | 1 - .../richText/plugins/attributes/index.ts | 1 - .../plugins/element/anchors/AnchorElement.ts | 58 - .../element/anchors/AnchorHtmlDeserializer.ts | 18 - .../element/anchors/AnchorModifications.ts | 29 - .../element/anchors/AnchorRenderer.tsx | 31 - .../element/anchors/anchorToolbarButton.ts | 9 - .../richText/plugins/element/anchors/index.ts | 5 - .../plugins/element/anchors/withAnchors.ts | 22 - .../element/headings/HeadingElement.ts | 53 - .../headings/HeadingHtmlDeserializer.ts | 19 - .../element/headings/HeadingRenderer.tsx | 20 - .../element/headings/headingToolbarButtons.ts | 98 - .../plugins/element/headings/index.ts | 5 - .../plugins/element/headings/withHeadings.ts | 121 - .../horizonalRules/HorizontalRuleElement.ts | 56 - .../horizonalRules/HorizontalRuleRenderer.tsx | 28 - .../horizontalRuleToolbarButton.ts | 9 - .../plugins/element/horizonalRules/index.ts | 4 - .../horizonalRules/withHorizontalRules.ts | 94 - .../richText/plugins/element/index.ts | 7 - .../plugins/element/lists/ListElement.ts | 26 - .../element/lists/ListHtmlDeserializer.ts | 111 - .../plugins/element/lists/ListItemElement.ts | 61 - .../element/lists/ListItemRenderer.tsx | 13 - .../element/lists/OrderedListElement.ts | 32 - .../element/lists/OrderedListRenderer.tsx | 13 - .../element/lists/UnorderedListElement.ts | 32 - .../element/lists/UnorderedListRenderer.tsx | 13 - .../richText/plugins/element/lists/index.ts | 6 - .../element/lists/listToolbarButtons.ts | 17 - .../lists/transforms/dedentListItem.ts | 70 - .../lists/transforms/indentListItem.ts | 81 - .../plugins/element/lists/transforms/index.ts | 4 - .../lists/transforms/normalizeListElement.ts | 20 - .../lists/transforms/toggleListElement.ts | 113 - .../plugins/element/lists/withLists.ts | 197 -- .../element/paragraphs/ParagraphElement.ts | 60 - .../paragraphs/ParagraphHtmlDeserializer.ts | 9 - .../element/paragraphs/ParagraphRenderer.tsx | 16 - .../plugins/element/paragraphs/index.ts | 5 - .../paragraphs/paragraphToolbarButtons.ts | 18 - .../element/paragraphs/withParagraphs.ts | 69 - .../scrollTargets/ScrollTargetElement.ts | 69 - .../scrollTargets/ScrollTargetRenderer.tsx | 30 - .../plugins/element/scrollTargets/index.ts | 4 - .../scrollTargetToolbarButton.ts | 9 - .../scrollTargets/withScrollTargets.ts | 7 - .../element/tables/TableCellElement.ts | 46 - .../tables/TableCellElementRenderer.tsx | 19 - .../plugins/element/tables/TableElement.ts | 137 - .../element/tables/TableElementRenderer.tsx | 124 - .../element/tables/TableElementSelection.ts | 19 - .../element/tables/TableModifications.ts | 165 - .../plugins/element/tables/TableRowElement.ts | 48 - .../tables/TableRowElementRenderer.tsx | 16 - .../element/tables/gaugeTableColumnCount.ts | 35 - .../richText/plugins/element/tables/index.ts | 5 - .../element/tables/tableToolbarButtons.ts | 9 - .../plugins/element/tables/withTables.ts | 346 -- .../bindingFacade/richText/plugins/index.ts | 3 - .../richText/plugins/text/bold/boldMark.ts | 11 - .../plugins/text/bold/boldToolbarButton.ts | 9 - .../richText/plugins/text/bold/index.ts | 2 - .../richText/plugins/text/bold/withBold.ts | 17 - .../richText/plugins/text/code/codeMark.ts | 11 - .../plugins/text/code/codeToolbarButton.ts | 9 - .../richText/plugins/text/code/index.ts | 2 - .../richText/plugins/text/code/withCode.ts | 9 - .../plugins/text/highlight/highlightMark.ts | 11 - .../text/highlight/highlightToolbarButton.ts | 9 - .../richText/plugins/text/highlight/index.ts | 2 - .../plugins/text/highlight/withHighlight.ts | 9 - .../richText/plugins/text/index.ts | 7 - .../richText/plugins/text/italic/index.ts | 2 - .../plugins/text/italic/italicMark.ts | 11 - .../text/italic/italicToolbarButton.ts | 9 - .../plugins/text/italic/withItalic.ts | 17 - .../richText/plugins/text/newline/index.ts | 1 - .../plugins/text/newline/withNewline.ts | 17 - .../plugins/text/strikeThrough/index.ts | 2 - .../text/strikeThrough/strikeThroughMark.ts | 10 - .../strikeThroughToolbarButton.ts | 9 - .../text/strikeThrough/withStrikeThrough.ts | 17 - .../richText/plugins/text/underline/index.ts | 2 - .../plugins/text/underline/underlineMark.ts | 11 - .../text/underline/underlineToolbarButton.ts | 9 - .../plugins/text/underline/withUnderline.ts | 17 - .../bindingFacade/richText/slate-reexport.ts | 6 - .../bindingFacade/richText/slate-types.ts | 33 - .../toolbars/HoveringToolbarContents.tsx | 142 - .../richText/toolbars/HoveringToolbars.tsx | 48 - .../richText/toolbars/ToolbarButtonSpec.ts | 54 - .../bindingFacade/richText/toolbars/index.ts | 3 - .../bindingFacade/richText/utils/index.ts | 2 - .../richText/utils/parseIframeSrc.ts | 13 - .../bindingFacade/richText/utils/parseUrl.ts | 13 - .../bindingFacade/ui/ConcealableField.tsx | 71 - .../bindingFacade/ui/DerivedFieldLink.tsx | 26 - .../src/components/bindingFacade/ui/index.ts | 2 - .../bindingFacade/upload/defaultUploader.ts | 4 - .../fileDataExtractors/FileDataExtractor.ts | 43 - .../getAudioFileDataExtractor.tsx | 31 - .../getFileUrlDataExtractor.tsx | 27 - .../getGenericFileMetadataExtractor.tsx | 31 - .../getImageFileDataExtractor.tsx | 41 - .../getVideoFileDataExtractor.tsx | 45 - .../upload/fileDataExtractors/index.ts | 6 - .../upload/fileHandler/AcceptFileKindError.ts | 9 - .../fileHandler/DiscriminatedFileHandler.tsx | 162 - .../upload/fileHandler/FileHandler.ts | 39 - .../fileHandler/SingleKindFileHandler.tsx | 71 - .../bindingFacade/upload/fileHandler/index.ts | 6 - .../upload/fileHandler/useFileHandler.ts | 102 - .../fileHandler/useSingleKindFileHandler.ts | 19 - .../upload/fileHandler/utils/attrAccept.ts | 43 - .../utils/createEntityConnector.ts | 23 - .../fileHandler/utils/disconnectAtBase.ts | 6 - .../upload/fileHandler/utils/resolveAccept.ts | 18 - .../utils/resolveAllAcceptedMimes.ts | 10 - .../utils/staticRenderFileKind.tsx | 22 - .../upload/fileKinds/FileKind.tsx | 18 - .../upload/fileKinds/FullFileKind.ts | 40 - .../upload/fileKinds/HybridFileKind.ts | 23 - .../upload/fileKinds/components/AnyFiles.tsx | 32 - .../fileKinds/components/AudioFiles.tsx | 35 - .../fileKinds/components/ImageFiles.tsx | 34 - .../fileKinds/components/VideoFiles.tsx | 33 - .../factories/getStockAnyFileKind.tsx | 56 - .../factories/getStockAudioFileKind.tsx | 55 - .../factories/getStockImageFileKind.tsx | 56 - .../factories/getStockVideoFileKind.tsx | 56 - .../fileKinds/fileKindTemplateAnalyzer.ts | 18 - .../bindingFacade/upload/fileKinds/index.ts | 15 - .../bindingFacade/upload/fileKinds/types.ts | 11 - .../components/bindingFacade/upload/index.ts | 15 - .../internalComponents/BareFileRepeater.tsx | 41 - .../BareFileRepeaterContainer.tsx | 122 - .../internalComponents/BareUploadField.tsx | 103 - .../upload/internalComponents/FileInput.tsx | 87 - .../SingleFilePreview/ErrorFilePreview.tsx | 29 - .../InitializedFilePreview.tsx | 135 - .../InitializingFilePreview.tsx | 11 - .../SingleFilePreview/SingleFilePreview.tsx | 86 - .../SingleFilePreview/UploadedFilePreview.tsx | 10 - .../SingleFilePreview/index.ts | 1 - .../SingleKindFileRepeater.tsx | 51 - .../SingleKindUploadField.tsx | 45 - .../hooks/useConnectSelectedEntities.ts | 24 - .../hooks/useNormalizedUploadState.ts | 143 - .../upload/internalComponents/index.ts | 8 - .../DiscriminatedSelectFileDialog.tsx | 42 - .../selection/SelectFileDialog.tsx | 90 - .../selection/SelectFileInput.tsx | 92 - .../selection/SingleKindSelectFileDialog.tsx | 39 - .../internalComponents/selection/index.ts | 6 - .../selection/useResolvedFileSelection.ts | 94 - .../useResolvedSingleKindFileSelection.ts | 32 - .../bindingFacade/upload/uploadDictionary.ts | 24 - .../upload/wrappers/generic/FileRepeater.tsx | 33 - .../upload/wrappers/generic/UploadField.tsx | 29 - .../bindingFacade/upload/wrappers/index.ts | 10 - .../wrappers/withKind/AnyFileRepeater.tsx | 22 - .../wrappers/withKind/AnyUploadField.tsx | 22 - .../wrappers/withKind/AudioFileRepeater.tsx | 29 - .../wrappers/withKind/AudioUploadField.tsx | 24 - .../wrappers/withKind/ImageFileRepeater.tsx | 29 - .../wrappers/withKind/ImageUploadField.tsx | 24 - .../wrappers/withKind/VideoFileRepeater.tsx | 29 - .../wrappers/withKind/VideoUploadField.tsx | 24 - packages/admin/src/components/index.ts | 11 - .../pageRouting/PageErrorBoundary.tsx | 24 - .../src/components/pageRouting/Pages.tsx | 29 - .../pageRouting/Scopes/CreateScope.tsx | 46 - .../pageRouting/Scopes/DataGridScope.tsx | 30 - .../pageRouting/Scopes/DetailScope.tsx | 28 - .../pageRouting/Scopes/EditScope.tsx | 48 - .../pageRouting/Scopes/ListScope.tsx | 32 - .../pageRouting/Scopes/MultiEditScope.tsx | 40 - .../pageRouting/Scopes/NotFoundBoundary.tsx | 22 - .../components/pageRouting/Scopes/index.ts | 6 - .../pageRouting/Scopes/scopeComponent.ts | 8 - .../admin/src/components/pageRouting/index.ts | 5 - .../pageRouting/pageComponents/CreatePage.tsx | 52 - .../pageComponents/DataGridPage.tsx | 43 - .../pageRouting/pageComponents/DetailPage.tsx | 34 - .../pageRouting/pageComponents/EditPage.tsx | 56 - .../pageComponents/GenericPage.tsx | 27 - .../pageRouting/pageComponents/ListPage.tsx | 41 - .../pageComponents/MultiEditPage.tsx | 47 - .../pageRouting/pageComponents/TablePage.tsx | 41 - .../pageRouting/pageComponents/getPageName.ts | 6 - .../pageRouting/pageComponents/index.ts | 9 - .../pageComponents/pageComponent.ts | 15 - .../useEntityRedirectOnPersistSuccess.ts | 42 - .../pageRouting/useOnPersistSuccess.ts | 19 - packages/admin/src/components/ui/Avatar.tsx | 29 - .../admin/src/components/ui/DragHandle.tsx | 5 - .../admin/src/components/ui/FileInput.tsx | 17 - .../admin/src/components/ui/InputGroup.tsx | 22 - packages/admin/src/components/ui/Tile.tsx | 13 - packages/admin/src/components/ui/TileList.tsx | 8 - packages/admin/src/components/ui/index.tsx | 6 - packages/admin/src/deprecated/index.ts | 3 - packages/admin/src/index.css | 2 - packages/admin/src/index.ts | 20 - packages/admin/src/routing/Link.tsx | 21 - packages/admin/src/routing/LinkButton.tsx | 26 - .../admin/src/routing/NavigateBackButton.tsx | 15 - .../admin/src/routing/NavigateBackLink.tsx | 49 - packages/admin/src/routing/RoutingLink.tsx | 37 - packages/admin/src/routing/index.ts | 29 - packages/admin/src/styles/index.css | 35 - packages/admin/src/styles/libs/leaflet.css | 752 ---- packages/admin/src/styles/parts/avatar.css | 65 - .../admin/src/styles/parts/centerCard.css | 12 - .../src/styles/parts/concealableField.css | 62 - packages/admin/src/styles/parts/diffView.css | 9 - .../src/styles/parts/dimensionsSwitcher.css | 3 - packages/admin/src/styles/parts/editor.css | 40 - packages/admin/src/styles/parts/fileInput.css | 59 - packages/admin/src/styles/parts/hoverMenu.css | 27 - packages/admin/src/styles/parts/input.css | 3 - .../admin/src/styles/parts/inputGroup.css | 36 - packages/admin/src/styles/parts/link.css | 8 - .../admin/src/styles/parts/locationField.css | 48 - packages/admin/src/styles/parts/navbar.css | 39 - .../admin/src/styles/parts/projectsList.css | 17 - .../admin/src/styles/parts/repeaterItem.css | 19 - .../admin/src/styles/parts/selectField.css | 35 - packages/admin/src/styles/parts/shape.css | 52 - .../admin/src/styles/parts/sideDimensions.css | 27 - packages/admin/src/styles/parts/sortable.css | 3 - packages/admin/src/styles/parts/tile.css | 3 - packages/admin/src/styles/parts/tileList.css | 5 - packages/admin/src/styles/parts/toolbar.css | 8 - .../src/tenant/components/QueryLoader.tsx | 13 - .../tenant/components/apiKey/ApiKeyList.tsx | 22 - .../components/apiKey/CreateApiKeyForm.tsx | 77 - .../src/tenant/components/apiKey/index.ts | 2 - .../tenant/components/idp/IDPInitButton.tsx | 16 - .../components/idp/IDPResponseHandler.tsx | 38 - .../admin/src/tenant/components/idp/common.ts | 14 - .../admin/src/tenant/components/idp/index.ts | 6 - .../components/idp/useHandleIDPResponse.ts | 72 - .../tenant/components/idp/useIDPAutoInit.ts | 63 - .../tenant/components/idp/useIDPStateStore.ts | 19 - .../components/idp/useInitIDPRedirect.ts | 40 - packages/admin/src/tenant/components/index.ts | 9 - .../tenant/components/member/EditIdentity.tsx | 81 - .../components/member/EditMembership.tsx | 143 - .../components/member/IdentityMembership.tsx | 30 - .../tenant/components/member/MemberList.tsx | 69 - .../tenant/components/member/RoleRenderer.tsx | 36 - .../components/member/VariableSelector.tsx | 108 - .../src/tenant/components/member/index.ts | 7 - .../member/useRemoveMemberIntent.ts | 36 - .../tenant/components/otp/ConfirmOtpForm.tsx | 60 - .../tenant/components/otp/DisableOtpForm.tsx | 56 - .../tenant/components/otp/OtpManagement.tsx | 79 - .../tenant/components/otp/PrepareOtpForm.tsx | 62 - .../admin/src/tenant/components/otp/index.ts | 4 - .../tenant/components/pages/EditUserPage.tsx | 36 - .../components/pages/InviteUserPage.tsx | 38 - .../tenant/components/pages/UserListPage.tsx | 40 - .../src/tenant/components/pages/errors.tsx | 3 - .../src/tenant/components/pages/index.ts | 3 - .../components/password/ChangePassword.tsx | 75 - .../CreateResetPasswordRequestForm.tsx | 56 - .../password/FillResetPasswordTokenForm.tsx | 39 - .../components/password/ResetPasswordForm.tsx | 70 - .../src/tenant/components/password/index.ts | 4 - .../tenant/components/person/InviteUser.tsx | 89 - .../src/tenant/components/person/Login.tsx | 82 - .../tenant/components/person/UsersList.tsx | 46 - .../src/tenant/components/person/index.ts | 4 - .../person/useRedirectToBacklink.ts | 42 - .../components/project/CreateProjectForm.tsx | 128 - .../components/project/ProjectsGrid.tsx | 47 - .../src/tenant/components/project/index.ts | 2 - packages/admin/src/tenant/index.ts | 5 - packages/admin/src/tenant/lib/auth.ts | 24 - packages/admin/src/tenant/lib/index.ts | 8 - packages/admin/src/tenant/lib/requestState.ts | 32 - packages/admin/src/tenant/lib/useForm.ts | 61 - packages/admin/src/tenant/lib/useMutation.ts | 40 - packages/admin/src/tenant/lib/useQuery.ts | 45 - .../src/tenant/lib/useSingleTenantMutation.ts | 62 - packages/admin/src/tenant/lib/variables.ts | 37 - .../tenant/mutations/apiKey/createApiKey.ts | 33 - .../src/tenant/mutations/apiKey/index.ts | 1 - .../src/tenant/mutations/identity/index.ts | 2 - .../src/tenant/mutations/identity/signIn.ts | 55 - .../src/tenant/mutations/identity/signOut.ts | 35 - .../admin/src/tenant/mutations/idp/index.ts | 2 - .../src/tenant/mutations/idp/initSignInIDP.ts | 41 - .../src/tenant/mutations/idp/signInIDP.ts | 56 - packages/admin/src/tenant/mutations/index.ts | 8 - .../src/tenant/mutations/membership/index.ts | 2 - .../mutations/membership/removeMember.ts | 73 - .../mutations/membership/updateMembership.ts | 34 - .../src/tenant/mutations/otp/confirmOtp.ts | 26 - .../src/tenant/mutations/otp/disableOtp.ts | 23 - .../admin/src/tenant/mutations/otp/index.ts | 3 - .../src/tenant/mutations/otp/prepareOtp.ts | 28 - .../mutations/password/changePasswords.ts | 31 - .../password/createResetPasswordRequest.ts | 28 - .../src/tenant/mutations/password/index.ts | 3 - .../mutations/password/resetPassword.ts | 35 - .../src/tenant/mutations/person/index.ts | 1 - .../src/tenant/mutations/person/invite.ts | 38 - .../tenant/mutations/project/createProject.ts | 42 - .../src/tenant/mutations/project/index.ts | 1 - packages/admin/src/tenant/queries/index.ts | 4 - .../admin/src/tenant/queries/listUsers.ts | 69 - packages/admin/src/tenant/queries/me.ts | 68 - .../src/tenant/queries/projectMemberships.ts | 31 - packages/admin/src/tenant/queries/roles.ts | 53 - packages/admin/src/tenant/types.ts | 7 - packages/admin/src/tsconfig.json | 27 - packages/admin/src/typings/react-fix.d.ts | 12 - .../admin/tests/playwright/admin/ahem.ttf | Bin 12480 -> 0 bytes .../admin/tests/playwright/admin/index.css | 22 - .../admin/tests/playwright/admin/index.html | 9 - .../admin/tests/playwright/admin/index.tsx | 141 - .../admin/tests/playwright/admin/package.json | 7 - .../tests/playwright/admin/vite-env.d.ts | 1 - .../tests/playwright/admin/vite.config.js | 54 - .../playwright/cases/blockEditor.model.ts | 17 - .../playwright/cases/blockEditor.spec.ts | 120 - .../tests/playwright/cases/blockEditor.tsx | 71 - .../tests/playwright/cases/data/logo.png | Bin 5197 -> 0 bytes .../playwright/cases/errorHandling.model.ts | 6 - .../playwright/cases/errorHandling.spec.ts | 25 - .../tests/playwright/cases/errorHandling.tsx | 12 - .../playwright/cases/fieldContainer.spec.ts | 28 - .../tests/playwright/cases/fieldContainer.tsx | 55 - .../playwright/cases/fileSelection.model.ts | 14 - .../playwright/cases/fileSelection.spec.ts | 49 - .../tests/playwright/cases/fileSelection.tsx | 83 - .../tests/playwright/cases/layout.spec.ts | 24 - .../admin/tests/playwright/cases/layout.tsx | 19 - .../cases/layoutWithTitleBar.spec.ts | 24 - .../playwright/cases/layoutWithTitleBar.tsx | 43 - .../playwright/cases/lazySelect.model.ts | 11 - .../tests/playwright/cases/lazySelect.spec.ts | 47 - .../tests/playwright/cases/lazySelect.tsx | 21 - .../playwright/cases/radioInput.model.ts | 5 - .../tests/playwright/cases/radioInput.spec.ts | 34 - .../tests/playwright/cases/radioInput.tsx | 24 - .../cases/repeaterItemContainer.spec.ts | 31 - .../cases/repeaterItemContainer.tsx | 26 - .../repeaterItemContainerWithActions.tsx | 53 - .../tests/playwright/cases/select.model.ts | 5 - .../tests/playwright/cases/select.spec.ts | 37 - .../admin/tests/playwright/cases/select.tsx | 55 - .../playwright/cases/selectOrCreate.model.ts | 11 - .../playwright/cases/selectOrCreate.spec.ts | 36 - .../tests/playwright/cases/selectOrCreate.tsx | 17 - .../tests/playwright/cases/textInput.model.ts | 5 - .../tests/playwright/cases/textInput.spec.ts | 24 - .../tests/playwright/cases/textInput.tsx | 11 - .../filled-Desktop-Chrome-linux.png | Bin 11654 -> 0 bytes .../filled-Desktop-Firefox-Dark-linux.png | Bin 42236 -> 0 bytes .../filled-iPad-landscape-linux.png | Bin 17341 -> 0 bytes .../filled-iPhone-11-linux.png | Bin 10269 -> 0 bytes .../initial-Desktop-Chrome-linux.png | Bin 11017 -> 0 bytes .../initial-Desktop-Firefox-Dark-linux.png | Bin 41110 -> 0 bytes .../initial-iPad-landscape-linux.png | Bin 15696 -> 0 bytes .../initial-iPhone-11-linux.png | Bin 8623 -> 0 bytes ...list-clicked-Desktop-Chrome-Dark-linux.png | Bin 13718 -> 0 bytes ...ered-list-clicked-Desktop-Chrome-linux.png | Bin 13189 -> 0 bytes ...ist-clicked-Desktop-Firefox-Dark-linux.png | Bin 42716 -> 0 bytes ...ered-list-clicked-iPad-landscape-linux.png | Bin 15968 -> 0 bytes ...s-ordered-list-clicked-iPhone-11-linux.png | Bin 8977 -> 0 bytes ...d-list-first-Desktop-Chrome-Dark-linux.png | Bin 14213 -> 0 bytes ...rdered-list-first-Desktop-Chrome-linux.png | Bin 13612 -> 0 bytes ...-list-first-Desktop-Firefox-Dark-linux.png | Bin 45163 -> 0 bytes ...rdered-list-first-iPad-landscape-linux.png | Bin 20591 -> 0 bytes ...ons-ordered-list-first-iPhone-11-linux.png | Bin 13773 -> 0 bytes ...list-initial-Desktop-Chrome-Dark-linux.png | Bin 13686 -> 0 bytes ...ered-list-initial-Desktop-Chrome-linux.png | Bin 13126 -> 0 bytes ...ist-initial-Desktop-Firefox-Dark-linux.png | Bin 44724 -> 0 bytes ...ered-list-initial-iPad-landscape-linux.png | Bin 19798 -> 0 bytes ...s-ordered-list-initial-iPhone-11-linux.png | Bin 12809 -> 0 bytes ...-list-second-Desktop-Chrome-Dark-linux.png | Bin 13684 -> 0 bytes ...dered-list-second-Desktop-Chrome-linux.png | Bin 13126 -> 0 bytes ...list-second-Desktop-Firefox-Dark-linux.png | Bin 44724 -> 0 bytes ...dered-list-second-iPad-landscape-linux.png | Bin 19798 -> 0 bytes ...ns-ordered-list-second-iPhone-11-linux.png | Bin 12809 -> 0 bytes ...d-list-third-Desktop-Chrome-Dark-linux.png | Bin 14203 -> 0 bytes ...rdered-list-third-Desktop-Chrome-linux.png | Bin 13623 -> 0 bytes ...-list-third-Desktop-Firefox-Dark-linux.png | Bin 45230 -> 0 bytes ...rdered-list-third-iPad-landscape-linux.png | Bin 20635 -> 0 bytes ...ons-ordered-list-third-iPhone-11-linux.png | Bin 13818 -> 0 bytes ...list-clicked-Desktop-Chrome-Dark-linux.png | Bin 13874 -> 0 bytes ...ered-list-clicked-Desktop-Chrome-linux.png | Bin 13236 -> 0 bytes ...ist-clicked-Desktop-Firefox-Dark-linux.png | Bin 41409 -> 0 bytes ...ered-list-clicked-iPad-landscape-linux.png | Bin 16179 -> 0 bytes ...unordered-list-clicked-iPhone-11-linux.png | Bin 9210 -> 0 bytes ...d-list-first-Desktop-Chrome-Dark-linux.png | Bin 14375 -> 0 bytes ...rdered-list-first-Desktop-Chrome-linux.png | Bin 13674 -> 0 bytes ...-list-first-Desktop-Firefox-Dark-linux.png | Bin 45476 -> 0 bytes ...rdered-list-first-iPad-landscape-linux.png | Bin 21022 -> 0 bytes ...s-unordered-list-first-iPhone-11-linux.png | Bin 14225 -> 0 bytes ...list-initial-Desktop-Chrome-Dark-linux.png | Bin 13721 -> 0 bytes ...ered-list-initial-Desktop-Chrome-linux.png | Bin 13172 -> 0 bytes ...ist-initial-Desktop-Firefox-Dark-linux.png | Bin 44767 -> 0 bytes ...ered-list-initial-iPad-landscape-linux.png | Bin 19959 -> 0 bytes ...unordered-list-initial-iPhone-11-linux.png | Bin 12915 -> 0 bytes ...-list-second-Desktop-Chrome-Dark-linux.png | Bin 13761 -> 0 bytes ...dered-list-second-Desktop-Chrome-linux.png | Bin 13172 -> 0 bytes ...list-second-Desktop-Firefox-Dark-linux.png | Bin 44767 -> 0 bytes ...dered-list-second-iPad-landscape-linux.png | Bin 19959 -> 0 bytes ...-unordered-list-second-iPhone-11-linux.png | Bin 12915 -> 0 bytes ...d-list-third-Desktop-Chrome-Dark-linux.png | Bin 14348 -> 0 bytes ...rdered-list-third-Desktop-Chrome-linux.png | Bin 13645 -> 0 bytes ...-list-third-Desktop-Firefox-Dark-linux.png | Bin 45597 -> 0 bytes ...rdered-list-third-iPad-landscape-linux.png | Bin 21040 -> 0 bytes ...s-unordered-list-third-iPhone-11-linux.png | Bin 14253 -> 0 bytes .../selected-Desktop-Chrome-linux.png | Bin 14972 -> 0 bytes .../selected-Desktop-Firefox-Dark-linux.png | Bin 46553 -> 0 bytes .../selected-iPad-landscape-linux.png | Bin 23359 -> 0 bytes .../selected-iPhone-11-linux.png | Bin 16346 -> 0 bytes .../01-initial-Desktop-Chrome-linux.png | Bin 11488 -> 0 bytes .../01-initial-Desktop-Firefox-Dark-linux.png | Bin 39901 -> 0 bytes .../01-initial-iPad-landscape-linux.png | Bin 16992 -> 0 bytes .../01-initial-iPhone-11-linux.png | Bin 10139 -> 0 bytes .../02-error-Desktop-Chrome-linux.png | Bin 16235 -> 0 bytes .../02-error-Desktop-Firefox-Dark-linux.png | Bin 50691 -> 0 bytes .../02-error-iPad-landscape-linux.png | Bin 25301 -> 0 bytes .../02-error-iPhone-11-linux.png | Bin 17571 -> 0 bytes .../initial-Desktop-Chrome-linux.png | Bin 16782 -> 0 bytes .../initial-Desktop-Firefox-Dark-linux.png | Bin 62683 -> 0 bytes .../initial-iPad-landscape-linux.png | Bin 22869 -> 0 bytes .../initial-iPhone-11-linux.png | Bin 4701 -> 0 bytes .../01-initial-Desktop-Chrome-linux.png | Bin 11239 -> 0 bytes .../01-initial-Desktop-Firefox-Dark-linux.png | Bin 40552 -> 0 bytes .../01-initial-iPad-landscape-linux.png | Bin 15601 -> 0 bytes .../01-initial-iPhone-11-linux.png | Bin 9202 -> 0 bytes .../02-upload-Desktop-Chrome-linux.png | Bin 15710 -> 0 bytes .../02-upload-Desktop-Firefox-Dark-linux.png | Bin 47378 -> 0 bytes .../02-upload-iPad-landscape-linux.png | Bin 24641 -> 0 bytes .../02-upload-iPhone-11-linux.png | Bin 16155 -> 0 bytes .../03-select-Desktop-Chrome-linux.png | Bin 20887 -> 0 bytes .../03-select-Desktop-Firefox-Dark-linux.png | Bin 57298 -> 0 bytes .../03-select-iPad-landscape-linux.png | Bin 38086 -> 0 bytes .../03-select-iPhone-11-linux.png | Bin 50551 -> 0 bytes .../04-confirm-Desktop-Chrome-linux.png | Bin 15448 -> 0 bytes .../04-confirm-Desktop-Firefox-Dark-linux.png | Bin 47058 -> 0 bytes .../04-confirm-iPad-landscape-linux.png | Bin 23935 -> 0 bytes .../04-confirm-iPhone-11-linux.png | Bin 16001 -> 0 bytes .../initial-Desktop-Chrome-linux.png | Bin 63646 -> 0 bytes .../initial-Desktop-Firefox-Dark-linux.png | Bin 44524 -> 0 bytes .../initial-iPad-landscape-linux.png | Bin 14061 -> 0 bytes .../initial-iPhone-11-linux.png | Bin 6978 -> 0 bytes .../initial-Desktop-Chrome-linux.png | Bin 65025 -> 0 bytes .../initial-Desktop-Firefox-Dark-linux.png | Bin 65092 -> 0 bytes .../initial-iPad-landscape-linux.png | Bin 15123 -> 0 bytes .../initial-iPhone-11-linux.png | Bin 7672 -> 0 bytes .../01-initial-Desktop-Chrome-linux.png | Bin 11341 -> 0 bytes .../01-initial-Desktop-Firefox-Dark-linux.png | Bin 39739 -> 0 bytes .../01-initial-iPad-landscape-linux.png | Bin 16106 -> 0 bytes .../01-initial-iPhone-11-linux.png | Bin 9212 -> 0 bytes .../02-expanded-Desktop-Chrome-linux.png | Bin 12984 -> 0 bytes ...02-expanded-Desktop-Firefox-Dark-linux.png | Bin 41799 -> 0 bytes .../02-expanded-iPad-landscape-linux.png | Bin 20137 -> 0 bytes .../02-expanded-iPhone-11-linux.png | Bin 13032 -> 0 bytes .../03-loaded-Desktop-Chrome-linux.png | Bin 13007 -> 0 bytes .../03-loaded-Desktop-Firefox-Dark-linux.png | Bin 41977 -> 0 bytes .../03-loaded-iPad-landscape-linux.png | Bin 20164 -> 0 bytes .../03-loaded-iPhone-11-linux.png | Bin 13054 -> 0 bytes .../after-save-Desktop-Chrome-linux.png | Bin 17086 -> 0 bytes .../after-save-Desktop-Firefox-Dark-linux.png | Bin 46794 -> 0 bytes .../after-save-iPad-landscape-linux.png | Bin 27334 -> 0 bytes .../after-save-iPhone-11-linux.png | Bin 19809 -> 0 bytes .../initial-Desktop-Chrome-linux.png | Bin 12137 -> 0 bytes .../initial-Desktop-Firefox-Dark-linux.png | Bin 39475 -> 0 bytes .../initial-iPad-landscape-linux.png | Bin 18639 -> 0 bytes .../initial-iPhone-11-linux.png | Bin 11902 -> 0 bytes .../selected-draft-Desktop-Chrome-linux.png | Bin 12351 -> 0 bytes ...ected-draft-Desktop-Firefox-Dark-linux.png | Bin 39810 -> 0 bytes .../selected-draft-iPad-landscape-linux.png | Bin 19117 -> 0 bytes .../selected-draft-iPhone-11-linux.png | Bin 12348 -> 0 bytes ...elected-published-Desktop-Chrome-linux.png | Bin 12357 -> 0 bytes ...d-published-Desktop-Firefox-Dark-linux.png | Bin 39808 -> 0 bytes ...elected-published-iPad-landscape-linux.png | Bin 19061 -> 0 bytes .../selected-published-iPhone-11-linux.png | Bin 12277 -> 0 bytes .../selected-review-Desktop-Chrome-linux.png | Bin 12852 -> 0 bytes ...cted-review-Desktop-Firefox-Dark-linux.png | Bin 39813 -> 0 bytes .../selected-review-iPad-landscape-linux.png | Bin 19122 -> 0 bytes .../selected-review-iPhone-11-linux.png | Bin 12353 -> 0 bytes .../initial-Desktop-Chrome-linux.png | Bin 12265 -> 0 bytes .../initial-Desktop-Firefox-Dark-linux.png | Bin 42621 -> 0 bytes .../initial-iPad-landscape-linux.png | Bin 18618 -> 0 bytes .../initial-iPhone-11-linux.png | Bin 11545 -> 0 bytes .../with-actions-Desktop-Chrome-linux.png | Bin 46490 -> 0 bytes ...ith-actions-Desktop-Firefox-Dark-linux.png | Bin 92704 -> 0 bytes .../with-actions-iPad-landscape-linux.png | Bin 65570 -> 0 bytes .../with-actions-iPhone-11-linux.png | Bin 4701 -> 0 bytes .../01-initial-Desktop-Chrome-linux.png | Bin 11019 -> 0 bytes .../01-initial-Desktop-Firefox-Dark-linux.png | Bin 39267 -> 0 bytes .../01-initial-iPad-landscape-linux.png | Bin 15469 -> 0 bytes .../01-initial-iPhone-11-linux.png | Bin 8557 -> 0 bytes .../02-deselected-Desktop-Chrome-linux.png | Bin 11018 -> 0 bytes ...-deselected-Desktop-Firefox-Dark-linux.png | Bin 39810 -> 0 bytes .../02-deselected-iPad-landscape-linux.png | Bin 19312 -> 0 bytes .../02-deselected-iPhone-11-linux.png | Bin 8508 -> 0 bytes .../03-opened-dialog-Desktop-Chrome-linux.png | Bin 12865 -> 0 bytes ...ened-dialog-Desktop-Firefox-Dark-linux.png | Bin 43705 -> 0 bytes .../03-opened-dialog-iPad-landscape-linux.png | Bin 19592 -> 0 bytes .../03-opened-dialog-iPhone-11-linux.png | Bin 12557 -> 0 bytes .../04-selected-item-Desktop-Chrome-linux.png | Bin 11482 -> 0 bytes ...lected-item-Desktop-Firefox-Dark-linux.png | Bin 40243 -> 0 bytes .../04-selected-item-iPad-landscape-linux.png | Bin 16983 -> 0 bytes .../04-selected-item-iPhone-11-linux.png | Bin 10155 -> 0 bytes .../05-after-save-Desktop-Chrome-linux.png | Bin 15494 -> 0 bytes ...-after-save-Desktop-Firefox-Dark-linux.png | Bin 46607 -> 0 bytes .../05-after-save-iPad-landscape-linux.png | Bin 28511 -> 0 bytes .../05-after-save-iPhone-11-linux.png | Bin 16594 -> 0 bytes .../01-initial-Desktop-Chrome-linux.png | Bin 11836 -> 0 bytes .../01-initial-Desktop-Firefox-Dark-linux.png | Bin 39483 -> 0 bytes .../01-initial-iPad-landscape-linux.png | Bin 16908 -> 0 bytes .../01-initial-iPhone-11-linux.png | Bin 10063 -> 0 bytes .../02-opened-dialog-Desktop-Chrome-linux.png | Bin 13921 -> 0 bytes ...ened-dialog-Desktop-Firefox-Dark-linux.png | Bin 44286 -> 0 bytes .../02-opened-dialog-iPad-landscape-linux.png | Bin 21312 -> 0 bytes .../02-opened-dialog-iPhone-11-linux.png | Bin 14186 -> 0 bytes .../03-item-added-Desktop-Chrome-linux.png | Bin 11923 -> 0 bytes ...-item-added-Desktop-Firefox-Dark-linux.png | Bin 39544 -> 0 bytes .../03-item-added-iPad-landscape-linux.png | Bin 17083 -> 0 bytes .../03-item-added-iPhone-11-linux.png | Bin 10234 -> 0 bytes .../04-after-save-Desktop-Chrome-linux.png | Bin 16300 -> 0 bytes ...-after-save-Desktop-Firefox-Dark-linux.png | Bin 46802 -> 0 bytes .../04-after-save-iPad-landscape-linux.png | Bin 25573 -> 0 bytes .../04-after-save-iPhone-11-linux.png | Bin 18058 -> 0 bytes .../after-save-Desktop-Chrome-linux.png | Bin 15089 -> 0 bytes .../after-save-Desktop-Firefox-Dark-linux.png | Bin 45999 -> 0 bytes .../after-save-iPad-landscape-linux.png | Bin 23389 -> 0 bytes .../after-save-iPhone-11-linux.png | Bin 15837 -> 0 bytes .../initial-Desktop-Chrome-linux.png | Bin 10606 -> 0 bytes .../initial-Desktop-Firefox-Dark-linux.png | Bin 38718 -> 0 bytes .../initial-iPad-landscape-linux.png | Bin 14762 -> 0 bytes .../initial-iPhone-11-linux.png | Bin 7818 -> 0 bytes packages/admin/tests/playwright/tsconfig.json | 12 - packages/admin/tests/playwright/utils.ts | 139 - packages/admin/tests/tsconfig.json | 12 - .../htmlDeserializer/deserializer.spec.tsx | 173 - .../vitest/editor/htmlDeserializer/utils.ts | 11 - .../vitest/editor/plugins/heading.test.tsx | 240 -- packages/admin/tsconfig.json | 8 - packages/admin/tsdoc.json | 6 - packages/admin/vite.config.css.js | 3 - packages/admin/vite.config.js | 3 - packages/brand/api-extractor.json | 3 - packages/brand/package.json | 54 - packages/brand/src/2023/Contember.tsx | 34 - packages/brand/src/2023/Content.tsx | 39 - packages/brand/src/2023/Document.tsx | 35 - packages/brand/src/2023/Edit.tsx | 34 - packages/brand/src/2023/Ember.tsx | 37 - packages/brand/src/2023/GitHub.tsx | 33 - packages/brand/src/2023/Globe.tsx | 40 - packages/brand/src/2023/Lock.tsx | 38 - packages/brand/src/2023/LogoIcon.tsx | 40 - packages/brand/src/2023/LogoType.tsx | 51 - packages/brand/src/2023/WireFrame.tsx | 38 - packages/brand/src/2023/index.ts | 10 - packages/brand/src/Types.ts | 12 - packages/brand/src/index.css | 26 - packages/brand/src/index.ts | 3 - packages/brand/src/tsconfig.json | 10 - packages/brand/tsconfig.json | 7 - packages/brand/tsdoc.json | 6 - packages/brand/vite.config.css.js | 3 - packages/brand/vite.config.js | 5 - packages/interface-tester/api-extractor.json | 3 - packages/interface-tester/package.json | 51 - packages/interface-tester/readme.md | 37 - packages/interface-tester/src/config.ts | 22 - packages/interface-tester/src/environment.ts | 33 - packages/interface-tester/src/index.ts | 6 - packages/interface-tester/src/nodes.tsx | 52 - packages/interface-tester/src/schema.ts | 159 - packages/interface-tester/src/tests.ts | 120 - packages/interface-tester/src/tsconfig.json | 9 - packages/interface-tester/src/vitest.ts | 13 - packages/interface-tester/tsconfig.json | 7 - packages/interface-tester/tsdoc.json | 6 - packages/interface-tester/vite.config.js | 3 - packages/interface/package.json | 3 +- packages/layout/api-extractor.json | 3 - packages/layout/package.json | 66 - packages/layout/src/directives/Directive.tsx | 54 - packages/layout/src/directives/Provider.tsx | 114 - packages/layout/src/directives/contexts.tsx | 12 - packages/layout/src/directives/index.ts | 4 - packages/layout/src/directives/types.ts | 5 - .../layout/src/focus-scope/FocusScope.tsx | 145 - packages/layout/src/focus-scope/index.ts | 1 - packages/layout/src/index.css | 2 - packages/layout/src/index.ts | 13 - packages/layout/src/insets/Constants.ts | 4 - packages/layout/src/insets/Contexts.ts | 7 - packages/layout/src/insets/Helpers.ts | 98 - packages/layout/src/insets/InsetsConsumer.tsx | 56 - packages/layout/src/insets/InsetsProvider.tsx | 58 - .../src/insets/SafeAreaInsetsProvider.tsx | 78 - packages/layout/src/insets/Types.ts | 24 - packages/layout/src/insets/index.ts | 9 - .../insets/useElementInsetCustomProperties.ts | 15 - .../layout/src/insets/useElementInsets.ts | 193 - packages/layout/src/kit/Bars.css | 149 - packages/layout/src/kit/Frame.css | 90 - packages/layout/src/kit/Frame.tsx | 144 - packages/layout/src/kit/Panels.css | 17 - packages/layout/src/kit/Slots/index.ts | 41 - packages/layout/src/kit/ToggleMenuButton.tsx | 51 - .../layout/src/kit/ToggleSidebarButton.tsx | 56 - packages/layout/src/kit/Toggles.css | 28 - packages/layout/src/kit/Types.ts | 214 -- .../src/kit/createLayoutBarComponent.tsx | 83 - .../kit/createLayoutContentPanelComponent.tsx | 113 - .../src/kit/createLayoutSidebarComponent.tsx | 156 - packages/layout/src/kit/index.css | 4 - packages/layout/src/kit/index.ts | 45 - .../MenuAutoCloseProvider.tsx | 43 - .../src/menu-auto-close-provider/index.ts | 1 - packages/layout/src/primitives/Contexts.ts | 39 - packages/layout/src/primitives/Panel.css | 244 -- packages/layout/src/primitives/Panel.tsx | 202 -- packages/layout/src/primitives/PanelBody.tsx | 44 - .../layout/src/primitives/PanelFooter.tsx | 44 - .../layout/src/primitives/PanelHeader.tsx | 44 - .../src/primitives/PanelsStateProvider.tsx | 118 - .../src/primitives/ResponsiveContainer.css | 5 - .../src/primitives/ResponsiveContainer.tsx | 159 - packages/layout/src/primitives/Root.css | 12 - packages/layout/src/primitives/Root.tsx | 70 - packages/layout/src/primitives/Types.ts | 126 - packages/layout/src/primitives/getPanelId.ts | 3 - packages/layout/src/primitives/index.css | 3 - packages/layout/src/primitives/index.ts | 10 - .../primitives/panelsStateAsDataAttributes.ts | 16 - .../src/primitives/parseLayoutPanelProps.ts | 49 - .../layout/src/primitives/parsePanelsState.ts | 119 - .../src/primitives/useClosePanelOnEscape.ts | 36 - .../src/responsive-stack/ResponsiveStack.tsx | 38 - packages/layout/src/responsive-stack/index.ts | 1 - packages/layout/src/slots/index.ts | 32 - packages/layout/src/tsconfig.json | 13 - packages/layout/src/utils/isSlugString.ts | 3 - packages/layout/tests/insets/Helpers.test.ts | 105 - packages/layout/tests/tsconfig.json | 10 - packages/layout/tsconfig.json | 8 - packages/layout/tsdoc.json | 6 - packages/layout/vite.config.css.js | 3 - packages/layout/vite.config.js | 3 - .../playground/admin/app/components/icon.tsx | 13 + .../admin/app/components/layout.tsx | 4 +- .../lib-extra/auto}/components/AutoCell.tsx | 2 + .../lib-extra/auto}/components/AutoField.tsx | 2 + .../lib-extra/auto}/components/AutoFields.tsx | 2 + .../lib-extra/auto}/components/AutoForm.tsx | 2 + .../lib-extra/auto}/components/AutoGrid.tsx | 2 + .../lib-extra/auto}/components/AutoLabel.tsx | 2 + .../admin/lib-extra/auto}/components/index.ts | 0 .../admin/lib-extra/auto}/components/types.ts | 0 .../admin/lib-extra/auto}/index.ts | 0 .../lib-extra/auto}/utils/formatString.tsx | 0 .../auto}/utils/getHumanFriendlyField.tsx | 0 .../auto}/utils/resolveConnectingEntity.tsx | 0 .../auto}/utils/resolveSortableBy.tsx | 0 packages/playground/package.json | 3 +- packages/react-auto/api-extractor.json | 3 - packages/react-auto/package.json | 59 - packages/react-auto/src/tsconfig.json | 15 - packages/react-auto/tsconfig.json | 7 - packages/react-auto/tsdoc.json | 6 - packages/react-auto/vite.config.js | 3 - packages/react-binding-ui/api-extractor.json | 3 - packages/react-binding-ui/package.json | 58 - .../src/errors/AccessorErrors.tsx | 12 - .../src/errors/errorCodeDictionary.ts | 8 - packages/react-binding-ui/src/errors/index.ts | 4 - .../src/errors/useAccessorErrors.ts | 40 - .../src/fieldViews/BooleanFieldView.tsx | 46 - .../src/fieldViews/CoalesceFieldView.tsx | 54 - .../src/fieldViews/DateFieldView.tsx | 50 - .../src/fieldViews/FieldFallbackView.tsx | 37 - .../src/fieldViews/FileUrlFieldView.tsx | 32 - .../src/fieldViews/ImageFieldView.tsx | 55 - .../src/fieldViews/VideoFieldView.tsx | 52 - .../src/fieldViews/fieldViewDictionary.ts | 13 - .../react-binding-ui/src/fieldViews/index.ts | 8 - .../CreateNewEntityButton.tsx | 49 - .../helperComponents/DeleteEntityButton.tsx | 60 - .../src/helperComponents/EmptyMessage.tsx | 36 - .../src/helperComponents/NotFoundWrapper.tsx | 19 - .../src/helperComponents/index.ts | 4 - packages/react-binding-ui/src/hooks/index.ts | 2 - .../src/hooks/persistFeedbackDictionary.ts | 9 - .../src/hooks/usePersistWithFeedback.tsx | 82 - packages/react-binding-ui/src/index.ts | 4 - packages/react-binding-ui/src/tsconfig.json | 13 - packages/react-binding-ui/tsconfig.json | 7 - packages/react-binding-ui/tsdoc.json | 6 - packages/react-binding-ui/vite.config.js | 3 - .../react-choice-field-ui/api-extractor.json | 3 - packages/react-choice-field-ui/package.json | 60 - .../src/components/MultiSelectField.tsx | 11 - .../src/components/RadioField.tsx | 18 - .../src/components/SearchInput.tsx | 40 - .../src/components/SelectField.tsx | 18 - .../rendering/MultiSelectFieldRenderer.tsx | 165 - .../rendering/RadioFieldRenderer.tsx | 51 - .../rendering/SelectFieldRenderer.tsx | 116 - .../src/dict/choiceFieldDictionary.ts | 11 - .../src/hooks/useCommonReactSelectProps.ts | 45 - .../src/hooks/useOpenCreateNewDialog.tsx | 88 - packages/react-choice-field-ui/src/index.ts | 11 - .../react-choice-field-ui/src/tsconfig.json | 14 - packages/react-choice-field-ui/tsconfig.json | 7 - packages/react-choice-field-ui/tsdoc.json | 6 - packages/react-choice-field-ui/vite.config.js | 3 - .../react-choice-field/api-extractor.json | 3 - packages/react-choice-field/package.json | 55 - .../src/BaseDynamicChoiceField.tsx | 73 - .../react-choice-field/src/ChoiceField.tsx | 30 - .../react-choice-field/src/ChoiceFieldData.ts | 37 - .../src/ChoiceFieldOptions.ts | 11 - .../src/DynamicMultiChoiceField.tsx | 53 - .../src/DynamicSingleChoiceField.tsx | 33 - packages/react-choice-field/src/Renderers.ts | 26 - .../src/StaticSingleChoiceField.tsx | 45 - .../src/hooks/useCreateOptionsFilter.ts | 44 - .../src/hooks/useCurrentValues.ts | 16 - .../src/hooks/useCurrentlyChosenEntities.ts | 39 - .../src/hooks/useDesugaredOptionPath.ts | 71 - .../hooks/useDynamicMultipleChoiceField.ts | 52 - ...MultipleChoiceWithConnectingEntityField.ts | 76 - .../src/hooks/useDynamicSingleChoiceField.tsx | 77 - .../src/hooks/useFuseFilteredOptions.ts | 35 - .../src/hooks/useNormalizedOptions.tsx | 52 - .../src/hooks/useSearchFields.ts | 15 - .../src/hooks/useSelectOptions.ts | 187 - .../src/hooks/useStaticSingleChoiceField.ts | 52 - .../src/hooks/useTopLevelOptionAccessor.ts | 12 - packages/react-choice-field/src/index.ts | 19 - .../src/renderDynamicChoiceFieldStatic.tsx | 85 - packages/react-choice-field/src/tsconfig.json | 10 - packages/react-choice-field/tsconfig.json | 7 - packages/react-choice-field/tsdoc.json | 6 - packages/react-choice-field/vite.config.js | 3 - packages/react-datagrid-ui/api-extractor.json | 3 - packages/react-datagrid-ui/package.json | 63 - packages/react-datagrid-ui/src/DataGrid.tsx | 51 - .../src/cells/BooleanCell.tsx | 24 - .../src/cells/CoalesceTextCell.tsx | 26 - .../react-datagrid-ui/src/cells/DateCell.tsx | 76 - .../react-datagrid-ui/src/cells/EnumCell.tsx | 50 - .../src/cells/GenericCell.tsx | 17 - .../src/cells/HasManyAbsentCell.tsx | 12 - .../src/cells/HasManySelectCell.tsx | 21 - .../src/cells/HasOneSelectCell.tsx | 21 - .../src/cells/NumberCell.tsx | 43 - .../react-datagrid-ui/src/cells/TextCell.tsx | 43 - packages/react-datagrid-ui/src/cells/index.ts | 10 - .../src/dict/dataGridCellsDictionary.ts | 32 - .../src/dict/dataGridDictionary.ts | 44 - .../src/filters/BooleanCellFilter.tsx | 36 - .../src/filters/EnumCellFilter.tsx | 42 - .../src/filters/GenericTextCellFilter.tsx | 58 - .../src/filters/HasManyAbsentCellFilter.tsx | 10 - .../src/filters/NullConditionFilter.tsx | 51 - .../src/filters/NumberCellFilter.tsx | 54 - .../src/filters/SelectCellFilter.tsx | 65 - .../src/filters/TextCellFilter.tsx | 38 - .../react-datagrid-ui/src/filters/index.ts | 8 - packages/react-datagrid-ui/src/index.ts | 12 - .../src/rendering/DataGridColumnHiding.tsx | 66 - .../src/rendering/DataGridContainer.tsx | 24 - .../src/rendering/DataGridContent.tsx | 18 - .../src/rendering/DataGridFooter.tsx | 63 - .../src/rendering/DataGridFullFilters.tsx | 149 - .../src/rendering/DataGridHeader.tsx | 33 - .../src/rendering/DataGridHeaderCell.tsx | 124 - .../src/rendering/DataGridLayoutControl.tsx | 35 - .../src/rendering/DataGridPagingSummary.tsx | 24 - .../src/rendering/DataGridTable.tsx | 55 - .../src/rendering/DataGridTableHead.tsx | 24 - .../src/rendering/DataGridTableRow.tsx | 44 - .../src/rendering/DataGridTiles.tsx | 37 - .../react-datagrid-ui/src/rendering/index.ts | 13 - packages/react-datagrid-ui/src/tsconfig.json | 18 - packages/react-datagrid-ui/src/types.ts | 24 - packages/react-datagrid-ui/tsconfig.json | 7 - packages/react-datagrid-ui/tsdoc.json | 6 - packages/react-datagrid-ui/vite.config.js | 3 - packages/react-datagrid/api-extractor.json | 3 - packages/react-datagrid/package.json | 58 - .../react-datagrid/src/cells/BooleanCell.tsx | 37 - .../src/cells/CoalesceTextCell.tsx | 38 - .../react-datagrid/src/cells/DateCell.tsx | 37 - .../react-datagrid/src/cells/EnumCell.tsx | 38 - .../react-datagrid/src/cells/GenericCell.tsx | 14 - .../src/cells/HasManyAbsentCell.tsx | 48 - .../src/cells/HasManySelectCell.tsx | 128 - .../src/cells/HasOneSelectCell.tsx | 89 - .../react-datagrid/src/cells/NumberCell.tsx | 44 - .../react-datagrid/src/cells/TextCell.tsx | 36 - packages/react-datagrid/src/cells/common.ts | 3 - packages/react-datagrid/src/cells/index.ts | 11 - .../react-datagrid/src/grid/DataGridColumn.ts | 17 - .../src/grid/createControlledDataGrid.tsx | 19 - .../src/grid/createDataGrid.tsx | 83 - .../src/grid/createDataGridRenderer.tsx | 34 - packages/react-datagrid/src/grid/index.ts | 5 - .../react-datagrid/src/grid/useDataGrid.ts | 6 - packages/react-datagrid/src/hooks/index.ts | 7 - .../src/hooks/useDataGridHiddenColumns.ts | 14 - .../src/hooks/useDataGridLayout.ts | 5 - .../src/hooks/useDataGridSetColumnHidden.ts | 10 - .../src/hooks/useDataGridSetLayout.ts | 6 - packages/react-datagrid/src/index.ts | 4 - .../react-datagrid/src/internal/contexts.ts | 6 - .../react-datagrid/src/internal/filters.ts | 26 - .../src/internal/gridTemplateAnalyzer.ts | 44 - .../react-datagrid/src/internal/hiding.ts | 7 - .../react-datagrid/src/internal/sorting.ts | 11 - .../src/internal/useDataGridState.ts | 56 - packages/react-datagrid/src/tsconfig.json | 14 - packages/react-datagrid/src/types/column.ts | 47 - .../react-datagrid/src/types/gridState.ts | 8 - packages/react-datagrid/src/types/index.ts | 5 - packages/react-datagrid/tsconfig.json | 7 - packages/react-datagrid/tsdoc.json | 6 - packages/react-datagrid/vite.config.js | 3 - .../react-form-fields-ui/api-extractor.json | 3 - packages/react-form-fields-ui/package.json | 57 - .../SimpleRelativeFieldProxy.tsx | 134 - .../SimpleRelativeSingleField.tsx | 47 - .../SimpleRelativeSingleField/index.ts | 2 - .../src/auxiliary/index.ts | 1 - .../src/components/CheckboxField.tsx | 32 - .../src/components/ColorField.tsx | 30 - .../src/components/DateField.tsx | 30 - .../src/components/DateTimeField.tsx | 30 - .../src/components/EmailField.tsx | 30 - .../src/components/FloatField.tsx | 32 - .../src/components/HiddenField.tsx | 28 - .../src/components/NumberField.tsx | 31 - .../src/components/SearchField.tsx | 30 - .../src/components/SlugField.tsx | 94 - .../src/components/TextField.tsx | 38 - .../src/components/TextareaField.tsx | 44 - .../src/components/TimeField.tsx | 24 - .../src/components/UrlField.tsx | 33 - .../src/components/index.ts | 14 - .../src/hooks/useFieldControl.ts | 128 - packages/react-form-fields-ui/src/index.ts | 3 - .../react-form-fields-ui/src/tsconfig.json | 12 - packages/react-form-fields-ui/tsconfig.json | 7 - packages/react-form-fields-ui/tsdoc.json | 6 - packages/react-form-fields-ui/vite.config.js | 3 - packages/react-i18n/api-extractor.json | 3 - packages/react-i18n/package.json | 55 - packages/react-i18n/src/DictionaryCache.ts | 63 - packages/react-i18n/src/DictionaryResolver.ts | 49 - packages/react-i18n/src/I18nContext.ts | 4 - packages/react-i18n/src/I18nError.ts | 1 - packages/react-i18n/src/I18nMetadata.ts | 7 - packages/react-i18n/src/I18nProvider.tsx | 27 - packages/react-i18n/src/Locale.ts | 3 - packages/react-i18n/src/MessageDictionary.ts | 27 - packages/react-i18n/src/MessageFormatter.ts | 17 - packages/react-i18n/src/defaultLocale.ts | 5 - packages/react-i18n/src/index.ts | 5 - packages/react-i18n/src/readme.md | 44 - packages/react-i18n/src/tsconfig.json | 9 - packages/react-i18n/src/useI18n.ts | 12 - .../react-i18n/src/useMessageFormatter.ts | 123 - packages/react-i18n/tsconfig.json | 7 - packages/react-i18n/tsdoc.json | 6 - packages/react-i18n/vite.config.js | 3 - .../api-extractor.json | 3 - packages/react-leaflet-fields-ui/package.json | 56 - .../src/components/LocationField.tsx | 113 - packages/react-leaflet-fields-ui/src/index.ts | 1 - .../react-leaflet-fields-ui/src/tsconfig.json | 10 - .../react-leaflet-fields-ui/tsconfig.json | 7 - packages/react-leaflet-fields-ui/tsdoc.json | 6 - .../react-leaflet-fields-ui/vite.config.js | 3 - packages/ui/.storybook/index.css | 27 - packages/ui/.storybook/main.js | 17 - packages/ui/.storybook/preview.jsx | 108 - packages/ui/api-extractor.json | 3 - packages/ui/package.json | 72 - packages/ui/src/Navigation.tsx | 32 - packages/ui/src/assets/Inter/Inter-Black.woff | Bin 138764 -> 0 bytes .../ui/src/assets/Inter/Inter-Black.woff2 | Bin 102868 -> 0 bytes .../src/assets/Inter/Inter-BlackItalic.woff | Bin 146824 -> 0 bytes .../src/assets/Inter/Inter-BlackItalic.woff2 | Bin 108752 -> 0 bytes packages/ui/src/assets/Inter/Inter-Bold.woff | Bin 143208 -> 0 bytes packages/ui/src/assets/Inter/Inter-Bold.woff2 | Bin 106140 -> 0 bytes .../ui/src/assets/Inter/Inter-BoldItalic.woff | Bin 151052 -> 0 bytes .../src/assets/Inter/Inter-BoldItalic.woff2 | Bin 111808 -> 0 bytes .../ui/src/assets/Inter/Inter-ExtraBold.woff | Bin 142920 -> 0 bytes .../ui/src/assets/Inter/Inter-ExtraBold.woff2 | Bin 106108 -> 0 bytes .../assets/Inter/Inter-ExtraBoldItalic.woff | Bin 150628 -> 0 bytes .../assets/Inter/Inter-ExtraBoldItalic.woff2 | Bin 111708 -> 0 bytes .../ui/src/assets/Inter/Inter-ExtraLight.woff | Bin 140724 -> 0 bytes .../src/assets/Inter/Inter-ExtraLight.woff2 | Bin 104232 -> 0 bytes .../assets/Inter/Inter-ExtraLightItalic.woff | Bin 149996 -> 0 bytes .../assets/Inter/Inter-ExtraLightItalic.woff2 | Bin 111392 -> 0 bytes .../ui/src/assets/Inter/Inter-Italic.woff | Bin 144372 -> 0 bytes .../ui/src/assets/Inter/Inter-Italic.woff2 | Bin 106876 -> 0 bytes packages/ui/src/assets/Inter/Inter-Light.woff | Bin 140632 -> 0 bytes .../ui/src/assets/Inter/Inter-Light.woff2 | Bin 104332 -> 0 bytes .../src/assets/Inter/Inter-LightItalic.woff | Bin 150092 -> 0 bytes .../src/assets/Inter/Inter-LightItalic.woff2 | Bin 111332 -> 0 bytes .../ui/src/assets/Inter/Inter-Medium.woff | Bin 142552 -> 0 bytes .../ui/src/assets/Inter/Inter-Medium.woff2 | Bin 105924 -> 0 bytes .../src/assets/Inter/Inter-MediumItalic.woff | Bin 150988 -> 0 bytes .../src/assets/Inter/Inter-MediumItalic.woff2 | Bin 112184 -> 0 bytes .../ui/src/assets/Inter/Inter-Regular.woff | Bin 133844 -> 0 bytes .../ui/src/assets/Inter/Inter-Regular.woff2 | Bin 98868 -> 0 bytes .../ui/src/assets/Inter/Inter-SemiBold.woff | Bin 142932 -> 0 bytes .../ui/src/assets/Inter/Inter-SemiBold.woff2 | Bin 105804 -> 0 bytes .../assets/Inter/Inter-SemiBoldItalic.woff | Bin 151180 -> 0 bytes .../assets/Inter/Inter-SemiBoldItalic.woff2 | Bin 112048 -> 0 bytes packages/ui/src/assets/Inter/Inter-Thin.woff | Bin 135920 -> 0 bytes packages/ui/src/assets/Inter/Inter-Thin.woff2 | Bin 99632 -> 0 bytes .../ui/src/assets/Inter/Inter-ThinItalic.woff | Bin 145480 -> 0 bytes .../src/assets/Inter/Inter-ThinItalic.woff2 | Bin 106496 -> 0 bytes .../src/assets/Inter/Inter-italic.var.woff2 | Bin 245036 -> 0 bytes .../ui/src/assets/Inter/Inter-roman.var.woff2 | Bin 227180 -> 0 bytes packages/ui/src/assets/Inter/Inter.var.woff2 | Bin 324864 -> 0 bytes packages/ui/src/assets/Inter/LICENSE.txt | 92 - packages/ui/src/assets/Inter/index.css | 152 - packages/ui/src/assets/contember-logotype.svg | 21 - .../ui/src/assets/dimensionSwitcher-arrow.svg | 1 - packages/ui/src/assets/icons/clock.svg | 4 - .../ui/src/assets/icons/composedBlock.svg | 4 - packages/ui/src/assets/icons/contentLock.svg | 5 - packages/ui/src/assets/icons/download.svg | 5 - packages/ui/src/assets/icons/ellipsis.svg | 3 - packages/ui/src/assets/icons/gallery.svg | 6 - packages/ui/src/assets/icons/heading1.svg | 4 - .../ui/src/assets/icons/heading1Numbered.svg | 4 - packages/ui/src/assets/icons/heading2.svg | 4 - .../ui/src/assets/icons/heading2Numbered.svg | 6 - packages/ui/src/assets/icons/heading3.svg | 4 - .../ui/src/assets/icons/heading3Numbered.svg | 4 - packages/ui/src/assets/icons/heading4.svg | 4 - .../ui/src/assets/icons/heading4Numbered.svg | 6 - packages/ui/src/assets/icons/heading5.svg | 4 - .../ui/src/assets/icons/heading5Numbered.svg | 4 - packages/ui/src/assets/icons/heading6.svg | 4 - .../ui/src/assets/icons/heading6Numbered.svg | 6 - .../ui/src/assets/icons/horizontalLine.svg | 5 - .../ui/src/assets/icons/horizontalRule.svg | 3 - packages/ui/src/assets/icons/image.svg | 5 - packages/ui/src/assets/icons/megaphone.svg | 4 - packages/ui/src/assets/icons/newNote.svg | 4 - .../ui/src/assets/icons/paragraphNumbered.svg | 6 - packages/ui/src/assets/icons/pencil.svg | 4 - packages/ui/src/assets/icons/person.svg | 4 - .../ui/src/assets/icons/questionAnswer.svg | 4 - packages/ui/src/assets/icons/quote.svg | 4 - packages/ui/src/assets/icons/table.svg | 4 - packages/ui/src/assets/icons/tipBox.svg | 4 - packages/ui/src/assets/icons/tipLink.svg | 5 - .../assets/layout-collapseButton-arrow.svg | 1 - packages/ui/src/assets/saveControl-arrow.svg | 1 - .../ui/src/assets/userMiniControl-arrow.svg | 1 - .../ActionableBox/ActionableBox.tsx | 89 - .../ui/src/components/ActionableBox/index.css | 40 - .../ui/src/components/ActionableBox/index.ts | 1 - packages/ui/src/components/Aether/Aether.tsx | 15 - packages/ui/src/components/Aether/index.css | 8 - packages/ui/src/components/Aether/index.ts | 1 - packages/ui/src/components/Anchor/Anchor.tsx | 30 - packages/ui/src/components/Anchor/index.css | 37 - packages/ui/src/components/Anchor/index.ts | 1 - packages/ui/src/components/Box/Box.tsx | 168 - packages/ui/src/components/Box/index.css | 105 - packages/ui/src/components/Box/index.ts | 1 - .../components/Breadcrumbs/Breadcrumbs.tsx | 26 - .../ui/src/components/Breadcrumbs/index.css | 47 - .../ui/src/components/Breadcrumbs/index.ts | 1 - packages/ui/src/components/Card/Card.tsx | 116 - packages/ui/src/components/Card/index.css | 115 - packages/ui/src/components/Card/index.ts | 1 - .../components/Collapsible/Collapsible.tsx | 80 - .../ui/src/components/Collapsible/index.css | 81 - .../ui/src/components/Collapsible/index.ts | 1 - .../ContentStatus/ContentStatus.tsx | 21 - .../ui/src/components/ContentStatus/index.css | 15 - .../ui/src/components/ContentStatus/index.ts | 1 - packages/ui/src/components/Dialog/Dialog.css | 65 - packages/ui/src/components/Dialog/Dialog.tsx | 45 - .../ui/src/components/Dialog/DialogContext.ts | 4 - .../ui/src/components/Dialog/DialogModal.css | 121 - .../ui/src/components/Dialog/DialogModal.tsx | 86 - .../ui/src/components/Dialog/DialogOptions.ts | 7 - .../src/components/Dialog/DialogProvider.tsx | 52 - .../src/components/Dialog/DialogSettings.ts | 17 - .../ui/src/components/Dialog/dialogReducer.ts | 44 - packages/ui/src/components/Dialog/index.css | 2 - packages/ui/src/components/Dialog/index.ts | 5 - .../ui/src/components/Dialog/useDialog.ts | 12 - .../DimensionSwitcher/DimensionSwitcher.tsx | 40 - .../components/DimensionSwitcher/index.css | 40 - .../src/components/DimensionSwitcher/index.ts | 1 - .../ui/src/components/Divider/Divider.tsx | 58 - packages/ui/src/components/Divider/index.css | 38 - packages/ui/src/components/Divider/index.ts | 1 - .../ui/src/components/Dropdown/Dropdown.tsx | 175 - packages/ui/src/components/Dropdown/index.css | 23 - packages/ui/src/components/Dropdown/index.ts | 1 - .../ui/src/components/Editor/EditorBlock.css | 68 - .../ui/src/components/Editor/EditorBlock.tsx | 32 - .../components/Editor/EditorBlockBoundary.css | 93 - .../components/Editor/EditorBlockBoundary.tsx | 32 - .../ui/src/components/Editor/EditorCanvas.css | 149 - .../ui/src/components/Editor/EditorCanvas.tsx | 72 - .../src/components/Editor/EditorHeading.css | 57 - .../src/components/Editor/EditorHeading.tsx | 26 - .../components/Editor/EditorNonEditable.css | 8 - .../components/Editor/EditorNonEditable.tsx | 24 - .../src/components/Editor/EditorParagraph.css | 12 - .../src/components/Editor/EditorParagraph.tsx | 22 - .../components/Editor/EditorPlaceholder.css | 5 - .../components/Editor/EditorPlaceholder.tsx | 15 - .../EditorTable/EditorTableCellElement.tsx | 34 - .../Editor/EditorTable/EditorTableElement.tsx | 236 -- .../EditorTable/EditorTableRowElement.tsx | 30 - .../components/Editor/EditorTable/index.css | 187 - .../components/Editor/EditorTable/index.ts | 3 - .../src/components/Editor/EditorToolbar.css | 103 - .../src/components/Editor/EditorToolbar.tsx | 142 - .../components/Editor/EditorToolbarButton.css | 74 - .../components/Editor/EditorToolbarButton.tsx | 55 - .../src/components/Editor/HoveringToolbar.tsx | 39 - packages/ui/src/components/Editor/index.css | 10 - packages/ui/src/components/Editor/index.ts | 11 - .../EmptyStateContainer.css | 16 - .../EmptyStateContainer.tsx | 36 - .../components/EmptyStateContainer/index.css | 1 - .../components/EmptyStateContainer/index.ts | 1 - .../ui/src/components/ErrorList/ErrorList.tsx | 33 - .../ui/src/components/ErrorList/index.css | 13 - packages/ui/src/components/ErrorList/index.ts | 1 - .../ui/src/components/Forms/Button/Button.css | 504 --- .../ui/src/components/Forms/Button/Button.tsx | 167 - .../components/Forms/Button/ButtonGroup.tsx | 35 - .../components/Forms/Button/ButtonList.tsx | 33 - .../components/Forms/Button/SaveButton.css | 7 - .../components/Forms/Button/SaveButton.tsx | 43 - .../ui/src/components/Forms/Button/Types.ts | 61 - .../ui/src/components/Forms/Button/index.css | 2 - .../ui/src/components/Forms/Button/index.ts | 5 - .../components/Forms/Checkbox/Checkbox.tsx | 129 - .../Forms/Checkbox/CheckboxButton.tsx | 36 - .../src/components/Forms/Checkbox/index.css | 172 - .../ui/src/components/Forms/Checkbox/index.ts | 2 - .../Forms/FieldContainer/FieldContainer.tsx | 261 -- .../components/Forms/FieldContainer/Types.ts | 5 - .../components/Forms/FieldContainer/index.css | 115 - .../components/Forms/FieldContainer/index.ts | 2 - .../components/Forms/FieldSet/FieldSet.tsx | 46 - .../src/components/Forms/FieldSet/index.css | 9 - .../ui/src/components/Forms/FieldSet/index.ts | 1 - .../ui/src/components/Forms/Hooks/index.ts | 5 - .../Forms/Hooks/useCheckboxInput.ts | 23 - .../Forms/Hooks/useInputClassName.ts | 74 - .../components/Forms/Hooks/useInputValue.ts | 65 - .../components/Forms/Hooks/useNativeInput.ts | 151 - .../Forms/Hooks/useTextBasedInput.ts | 21 - .../components/Forms/Inputs/ColorInput.tsx | 32 - .../src/components/Forms/Inputs/DateInput.tsx | 33 - .../components/Forms/Inputs/DateTimeInput.tsx | 70 - .../Forms/Inputs/DateTimeInputFallback.tsx | 121 - .../components/Forms/Inputs/EmailInput.tsx | 29 - .../components/Forms/Inputs/FloatInput.tsx | 54 - .../components/Forms/Inputs/HiddenInput.tsx | 26 - .../components/Forms/Inputs/MonthInput.tsx | 34 - .../components/Forms/Inputs/NumberInput.tsx | 60 - .../components/Forms/Inputs/PasswordInput.tsx | 29 - .../components/Forms/Inputs/RangeInput.tsx | 28 - .../components/Forms/Inputs/SearchInput.tsx | 37 - .../src/components/Forms/Inputs/SlugInput.css | 91 - .../src/components/Forms/Inputs/SlugInput.tsx | 50 - .../src/components/Forms/Inputs/TelInput.tsx | 29 - .../src/components/Forms/Inputs/TextInput.css | 10 - .../src/components/Forms/Inputs/TextInput.tsx | 45 - .../components/Forms/Inputs/TextareaInput.css | 11 - .../components/Forms/Inputs/TextareaInput.tsx | 77 - .../src/components/Forms/Inputs/TimeInput.tsx | 35 - .../ui/src/components/Forms/Inputs/Types.ts | 36 - .../src/components/Forms/Inputs/UrlInput.tsx | 29 - .../src/components/Forms/Inputs/WeekInput.tsx | 34 - .../ui/src/components/Forms/Inputs/index.css | 3 - .../ui/src/components/Forms/Inputs/index.ts | 20 - .../ui/src/components/Forms/Radio/Radio.tsx | 77 - .../components/Forms/Radio/RadioButton.tsx | 42 - .../components/Forms/Radio/RadioContext.ts | 4 - .../components/Forms/Radio/RadioControl.tsx | 80 - .../ui/src/components/Forms/Radio/index.css | 101 - .../ui/src/components/Forms/Radio/index.ts | 3 - .../ui/src/components/Forms/Radio/types.ts | 7 - .../ui/src/components/Forms/Select/Select.tsx | 191 - .../Forms/Select/SelectCreateNewWrapper.tsx | 28 - .../ui/src/components/Forms/Select/index.css | 8 - .../ui/src/components/Forms/Select/index.ts | 3 - .../Select/useCommonReactSelectStyles.ts | 269 -- .../components/Forms/Types/ControlProps.ts | 71 - .../components/Forms/Types/ControlValues.ts | 56 - .../src/components/Forms/Types/Serializer.ts | 62 - .../ui/src/components/Forms/Types/index.ts | 3 - .../components/Forms/Upload/FileDropZone.css | 18 - .../components/Forms/Upload/FileDropZone.tsx | 41 - .../components/Forms/Upload/FilePreview.css | 59 - .../components/Forms/Upload/FilePreview.tsx | 26 - .../Forms/Upload/UploadProgress.css | 35 - .../Forms/Upload/UploadProgress.tsx | 53 - .../ui/src/components/Forms/Upload/index.css | 3 - .../ui/src/components/Forms/Upload/index.ts | 3 - packages/ui/src/components/Forms/index.css | 8 - packages/ui/src/components/Forms/index.ts | 10 - packages/ui/src/components/Grid/Grid.tsx | 43 - packages/ui/src/components/Grid/index.css | 33 - packages/ui/src/components/Grid/index.ts | 1 - .../src/components/HoveringToolbar/index.css | 49 - packages/ui/src/components/Link.css | 27 - .../ui/src/components/LucideIcons/index.ts | 62 - packages/ui/src/components/Menu/Contexts.ts | 30 - packages/ui/src/components/Menu/Menu.css | 10 - packages/ui/src/components/Menu/Menu.tsx | 91 - .../src/components/Menu/MenuExpandToggle.css | 27 - .../src/components/Menu/MenuExpandToggle.tsx | 49 - packages/ui/src/components/Menu/MenuItem.css | 42 - packages/ui/src/components/Menu/MenuItem.tsx | 174 - packages/ui/src/components/Menu/MenuLink.css | 37 - packages/ui/src/components/Menu/MenuLink.tsx | 62 - packages/ui/src/components/Menu/Types.ts | 42 - packages/ui/src/components/Menu/index.css | 4 - packages/ui/src/components/Menu/index.ts | 3 - .../src/components/Menu/useActiveMenuItem.tsx | 46 - .../src/components/Menu/useKeyNavigation.ts | 60 - packages/ui/src/components/Menu/useMenuId.tsx | 18 - .../ui/src/components/Message/Message.tsx | 142 - packages/ui/src/components/Message/index.css | 108 - packages/ui/src/components/Message/index.ts | 1 - packages/ui/src/components/Portal/Portal.tsx | 23 - .../src/components/Portal/PortalProvider.tsx | 54 - .../ui/src/components/Portal/constants.ts | 9 - packages/ui/src/components/Portal/contexts.ts | 49 - packages/ui/src/components/Portal/index.ts | 5 - packages/ui/src/components/Portal/types.ts | 13 - .../ui/src/components/PreventCloseContext.ts | 7 - .../components/ProgressBar/ProgressBar.tsx | 21 - .../ui/src/components/ProgressBar/index.css | 14 - .../ui/src/components/ProgressBar/index.ts | 1 - packages/ui/src/components/Providers.tsx | 30 - .../RepeaterItemContainer.tsx | 78 - .../RepeaterItemContainer/index.css | 54 - .../components/RepeaterItemContainer/index.ts | 1 - .../ui/src/components/Section/Section.tsx | 82 - packages/ui/src/components/Section/index.css | 47 - packages/ui/src/components/Section/index.ts | 1 - .../ui/src/components/SectionTabs/Context.ts | 23 - .../components/SectionTabs/SectionTabs.tsx | 138 - .../ui/src/components/SectionTabs/State.ts | 43 - .../ui/src/components/SectionTabs/Types.ts | 27 - .../ui/src/components/SectionTabs/index.css | 24 - .../ui/src/components/SectionTabs/index.ts | 3 - packages/ui/src/components/Spacer/Spacer.tsx | 25 - packages/ui/src/components/Spacer/index.css | 21 - packages/ui/src/components/Spacer/index.ts | 1 - .../ui/src/components/Spinner/Spinner.tsx | 8 - packages/ui/src/components/Spinner/index.css | 17 - packages/ui/src/components/Spinner/index.ts | 1 - .../SpinnerContainer/SpinnerContainer.tsx | 23 - .../SpinnerContainer/SpinnerOverlay.tsx | 18 - .../src/components/SpinnerContainer/index.css | 44 - .../src/components/SpinnerContainer/index.ts | 3 - .../src/components/SpinnerContainer/types.ts | 12 - packages/ui/src/components/Stack/Stack.tsx | 90 - packages/ui/src/components/Stack/index.css | 76 - packages/ui/src/components/Stack/index.ts | 1 - .../StyleProvider/StyleProvider.css | 117 - .../StyleProvider/StyleProvider.tsx | 37 - .../ui/src/components/StyleProvider/index.css | 1 - .../ui/src/components/StyleProvider/index.ts | 2 - .../ui/src/components/StyleProvider/types.ts | 11 - packages/ui/src/components/Table/Table.tsx | 56 - .../ui/src/components/Table/TableCell.tsx | 38 - .../src/components/Table/TableHeaderCell.tsx | 34 - packages/ui/src/components/Table/TableRow.tsx | 31 - packages/ui/src/components/Table/index.css | 157 - packages/ui/src/components/Table/index.ts | 4 - packages/ui/src/components/Tabs/TabButton.tsx | 53 - packages/ui/src/components/Tabs/Types.ts | 7 - packages/ui/src/components/Tabs/index.css | 60 - packages/ui/src/components/Tabs/index.ts | 2 - packages/ui/src/components/Tag/Tag.tsx | 26 - packages/ui/src/components/Tag/index.css | 27 - packages/ui/src/components/Tag/index.ts | 1 - .../ui/src/components/Toaster/Toaster.tsx | 67 - .../src/components/Toaster/ToasterContext.tsx | 46 - packages/ui/src/components/Toaster/index.css | 41 - packages/ui/src/components/Toaster/index.ts | 3 - .../ui/src/components/Toaster/useShowToast.ts | 31 - .../src/components/Typography/Description.css | 7 - .../src/components/Typography/Description.tsx | 17 - .../ui/src/components/Typography/Heading.css | 115 - .../ui/src/components/Typography/Heading.tsx | 40 - .../ui/src/components/Typography/Label.css | 34 - .../ui/src/components/Typography/Label.tsx | 51 - .../ui/src/components/Typography/Text.css | 56 - .../ui/src/components/Typography/Text.tsx | 47 - .../ui/src/components/Typography/index.css | 4 - .../ui/src/components/Typography/index.ts | 4 - .../VisuallyHidden/VisuallyHidden.tsx | 43 - .../src/components/VisuallyHidden/index.css | 12 - .../ui/src/components/VisuallyHidden/index.ts | 2 - .../VisuallyHidden/visuallyHiddenStyle.ts | 14 - packages/ui/src/components/index.css | 48 - packages/ui/src/components/index.ts | 38 - packages/ui/src/deprecated/BoxDistinction.ts | 4 - packages/ui/src/deprecated/Icon/Icon.tsx | 97 - .../deprecated/Icon/contemberIcons/clock.ts | 4 - .../Icon/contemberIcons/composedBlock.ts | 3 - .../Icon/contemberIcons/contentLock.ts | 3 - .../Icon/contemberIcons/download.ts | 4 - .../Icon/contemberIcons/ellipsis.ts | 3 - .../deprecated/Icon/contemberIcons/gallery.ts | 4 - .../Icon/contemberIcons/heading1.ts | 3 - .../Icon/contemberIcons/heading1Numbered.ts | 3 - .../Icon/contemberIcons/heading2.ts | 3 - .../Icon/contemberIcons/heading2Numbered.ts | 4 - .../Icon/contemberIcons/heading3.ts | 3 - .../Icon/contemberIcons/heading3Numbered.ts | 3 - .../Icon/contemberIcons/heading4.ts | 3 - .../Icon/contemberIcons/heading4Numbered.ts | 4 - .../Icon/contemberIcons/heading5.ts | 3 - .../Icon/contemberIcons/heading5Numbered.ts | 3 - .../Icon/contemberIcons/heading6.ts | 3 - .../Icon/contemberIcons/heading6Numbered.ts | 4 - .../Icon/contemberIcons/horizontalLine.ts | 3 - .../Icon/contemberIcons/horizontalRule.ts | 1 - .../deprecated/Icon/contemberIcons/image.ts | 4 - .../deprecated/Icon/contemberIcons/index.ts | 31 - .../Icon/contemberIcons/megaphone.ts | 3 - .../deprecated/Icon/contemberIcons/newNote.ts | 3 - .../Icon/contemberIcons/paragraphNumbered.ts | 4 - .../deprecated/Icon/contemberIcons/pencil.ts | 3 - .../deprecated/Icon/contemberIcons/person.ts | 3 - .../Icon/contemberIcons/questionAnswer.ts | 3 - .../deprecated/Icon/contemberIcons/quote.ts | 3 - .../deprecated/Icon/contemberIcons/table.ts | 3 - .../deprecated/Icon/contemberIcons/tipBox.ts | 3 - .../deprecated/Icon/contemberIcons/tipLink.ts | 3 - packages/ui/src/deprecated/Icon/index.css | 31 - packages/ui/src/deprecated/Icon/index.ts | 1 - packages/ui/src/deprecated/Layout/Layout.css | 86 - packages/ui/src/deprecated/Layout/Layout.tsx | 72 - .../ui/src/deprecated/Layout/LayoutChrome.css | 225 -- .../ui/src/deprecated/Layout/LayoutChrome.tsx | 240 -- .../ui/src/deprecated/Layout/LayoutPage.css | 32 - .../ui/src/deprecated/Layout/LayoutPage.tsx | 103 - .../src/deprecated/Layout/LayoutPageAside.css | 46 - .../src/deprecated/Layout/LayoutPageAside.tsx | 54 - .../deprecated/Layout/LayoutPageContent.css | 92 - .../deprecated/Layout/LayoutPageContent.tsx | 43 - .../Layout/LayoutPageStickyContainer.css | 10 - .../Layout/LayoutPageStickyContainer.tsx | 46 - .../deprecated/Layout/ThemeSchemeContext.ts | 41 - packages/ui/src/deprecated/Layout/Types.ts | 8 - packages/ui/src/deprecated/Layout/index.css | 6 - packages/ui/src/deprecated/Layout/index.ts | 8 - .../deprecated/Logo/ContemberLogoImage.tsx | 59 - packages/ui/src/deprecated/Logo/Logo.tsx | 28 - packages/ui/src/deprecated/Logo/LogoLabel.tsx | 29 - .../ui/src/deprecated/Logo/LogoSymbol.tsx | 34 - packages/ui/src/deprecated/Logo/index.css | 60 - packages/ui/src/deprecated/Logo/index.ts | 4 - .../ui/src/deprecated/MessageDistinction.ts | 4 - .../SeamlessDropdown/SeamlessDropdown.tsx | 69 - .../src/deprecated/SeamlessDropdown/index.css | 81 - .../src/deprecated/SeamlessDropdown/index.ts | 1 - .../ui/src/deprecated/TitleBar/TitleBar.tsx | 48 - packages/ui/src/deprecated/TitleBar/index.css | 68 - packages/ui/src/deprecated/TitleBar/index.ts | 1 - packages/ui/src/deprecated/Trio/Trio.tsx | 43 - packages/ui/src/deprecated/Trio/index.css | 23 - packages/ui/src/deprecated/Trio/index.ts | 1 - .../UserMiniControl/UserMiniControl.tsx | 34 - .../src/deprecated/UserMiniControl/index.css | 35 - .../src/deprecated/UserMiniControl/index.ts | 1 - packages/ui/src/deprecated/index.css | 8 - packages/ui/src/deprecated/index.ts | 17 - packages/ui/src/deprecated/randomId.ts | 7 - .../src/deprecated/useCloseOnClickOutside.ts | 8 - .../ui/src/deprecated/useCloseOnEscape.ts | 8 - packages/ui/src/deprecated/useFallbackRef.ts | 10 - packages/ui/src/deprecated/useMouseMove.tsx | 59 - .../ui/src/errors/IllegalChildrenError.ts | 1 - packages/ui/src/errors/index.ts | 1 - packages/ui/src/index.css | 8 - packages/ui/src/index.ts | 6 - packages/ui/src/styles/globals.css | 385 -- packages/ui/src/styles/is-loading.css | 19 - packages/ui/src/styles/schemes.css | 429 --- packages/ui/src/styles/tailwind-support.css | 7 - packages/ui/src/styles/themes.css | 1218 ------- packages/ui/src/tsconfig.json | 10 - packages/ui/src/types/Alignment.tsx | 3 - packages/ui/src/types/BoxDepth.ts | 1 - .../ui/src/types/CollapsibleTransition.ts | 3 - packages/ui/src/types/ControlDistinction.ts | 3 - packages/ui/src/types/Default.ts | 1 - packages/ui/src/types/DropdownAlignment.ts | 3 - .../ui/src/types/EditorCanvasDistinction.ts | 3 - packages/ui/src/types/EditorCanvasSize.ts | 3 - packages/ui/src/types/Errors.ts | 5 - packages/ui/src/types/HTMLProps.ts | 10 - packages/ui/src/types/HeadingDepth.ts | 1 - packages/ui/src/types/HeadingDistinction.ts | 3 - packages/ui/src/types/HoveringToolbarScope.ts | 3 - packages/ui/src/types/IconSize.ts | 3 - packages/ui/src/types/Intent.ts | 5 - packages/ui/src/types/Justification.tsx | 3 - packages/ui/src/types/Size.ts | 3 - packages/ui/src/types/ValidationState.ts | 3 - packages/ui/src/types/index.ts | 18 - packages/ui/src/utils/flipValue.ts | 3 - packages/ui/src/utils/forceReflow.ts | 6 - packages/ui/src/utils/index.ts | 9 - packages/ui/src/utils/noop.ts | 1 - packages/ui/src/utils/toEnumClass.ts | 9 - packages/ui/src/utils/toEnumStateClass.ts | 4 - packages/ui/src/utils/toEnumViewClass.ts | 4 - packages/ui/src/utils/toFeatureClass.ts | 6 - packages/ui/src/utils/toStateClass.ts | 1 - packages/ui/src/utils/toViewClass.ts | 1 - .../ui/stories/src/ActionableBox.stories.tsx | 36 - packages/ui/stories/src/Aether.stories.tsx | 26 - packages/ui/stories/src/Box.stories.tsx | 26 - .../ui/stories/src/Breadcrumbs.stories.tsx | 17 - packages/ui/stories/src/Button.stories.tsx | 73 - .../ui/stories/src/ButtonGroup.stories.tsx | 25 - .../ui/stories/src/ButtonList.stories.tsx | 22 - packages/ui/stories/src/Checkbox.stories.tsx | 40 - .../ui/stories/src/Collapsible.stories.tsx | 42 - packages/ui/stories/src/Divider.stories.tsx | 25 - .../ui/stories/src/FieldContainer.stories.tsx | 25 - packages/ui/stories/src/Grid.stories.tsx | 52 - packages/ui/stories/src/Helpers/ArgTypes.ts | 62 - packages/ui/stories/src/Helpers/Block.tsx | 17 - .../ui/stories/src/Helpers/DirectionStack.tsx | 19 - packages/ui/stories/src/Helpers/index.ts | 3 - packages/ui/stories/src/Menu.stories.tsx | 96 - packages/ui/stories/src/Radio.stories.tsx | 94 - .../src/RepeaterItemContainer.stories.tsx | 37 - .../ui/stories/src/SaveButton.stories.tsx | 48 - packages/ui/stories/src/Select.stories.tsx | 156 - packages/ui/stories/src/Spacer.stories.tsx | 24 - packages/ui/stories/src/Spinner.stories.tsx | 17 - packages/ui/stories/src/Stack.stories.tsx | 47 - packages/ui/stories/src/TabButton.stories.tsx | 25 - .../ui/stories/src/TextAreaInput.stories.tsx | 69 - packages/ui/stories/src/TextInput.stories.tsx | 68 - packages/ui/stories/src/Theme.stories.tsx | 175 - packages/ui/stories/tsconfig.json | 10 - packages/ui/stories/ui/Button.tsx | 16 - packages/ui/stories/ui/Radio.tsx | 31 - packages/ui/stories/ui/Select.tsx | 23 - packages/ui/tests/cases/useInputValue.test.ts | 88 - .../ui/tests/cases/useNativeInput.test.ts | 82 - packages/ui/tsconfig.json | 7 - packages/ui/tsdoc.json | 6 - packages/ui/vite.config.css.js | 3 - packages/ui/vite.config.js | 3 - tsconfig.json | 55 +- yarn.lock | 3133 +---------------- 1742 files changed, 193 insertions(+), 66025 deletions(-) delete mode 100644 packages/admin-i18n/api-extractor.json delete mode 100644 packages/admin-i18n/package.json delete mode 100644 packages/admin-i18n/src/index.ts delete mode 100644 packages/admin-i18n/src/messages/csCZ.ts delete mode 100644 packages/admin-i18n/src/messages/index.ts delete mode 100644 packages/admin-i18n/src/tsconfig.json delete mode 100644 packages/admin-i18n/tsconfig.json delete mode 100644 packages/admin-i18n/tsdoc.json delete mode 100644 packages/admin-i18n/vite.config.js delete mode 100644 packages/admin-sandbox/README.link-local.md delete mode 100644 packages/admin-sandbox/README.md delete mode 100644 packages/admin-sandbox/admin/.env.development delete mode 100644 packages/admin-sandbox/admin/.env.production delete mode 100644 packages/admin-sandbox/admin/apple-touch-icon.png delete mode 100644 packages/admin-sandbox/admin/components/AddContent.tsx delete mode 100644 packages/admin-sandbox/admin/components/AlertLogoutLink.tsx delete mode 100644 packages/admin-sandbox/admin/components/AnchorInsertHandler.ts delete mode 100644 packages/admin-sandbox/admin/components/AppHeaderTitle.tsx delete mode 100644 packages/admin-sandbox/admin/components/CategoryForm.tsx delete mode 100644 packages/admin-sandbox/admin/components/Constants.ts delete mode 100644 packages/admin-sandbox/admin/components/ContentField.tsx delete mode 100644 packages/admin-sandbox/admin/components/DataGridTile.tsx delete mode 100644 packages/admin-sandbox/admin/components/Directives.tsx delete mode 100644 packages/admin-sandbox/admin/components/EditOrCreateForm.tsx delete mode 100644 packages/admin-sandbox/admin/components/FocalPoint.css delete mode 100644 packages/admin-sandbox/admin/components/FocalPoint.tsx delete mode 100644 packages/admin-sandbox/admin/components/HorizontalMenu/HorizontalMenu.css delete mode 100644 packages/admin-sandbox/admin/components/HorizontalMenu/HorizontalMenu.tsx delete mode 100644 packages/admin-sandbox/admin/components/HorizontalMenu/HorizontalMenuContainer.tsx delete mode 100644 packages/admin-sandbox/admin/components/HorizontalMenu/HorizontalMenuItem.tsx delete mode 100644 packages/admin-sandbox/admin/components/HorizontalMenu/contexts.ts delete mode 100644 packages/admin-sandbox/admin/components/HorizontalMenu/index.ts delete mode 100644 packages/admin-sandbox/admin/components/HorizontalMenu/types.ts delete mode 100644 packages/admin-sandbox/admin/components/Layout.tsx delete mode 100644 packages/admin-sandbox/admin/components/LayoutComponent.tsx delete mode 100644 packages/admin-sandbox/admin/components/LayoutComponent[bare].tsx delete mode 100644 packages/admin-sandbox/admin/components/LayoutComponent[default].tsx delete mode 100644 packages/admin-sandbox/admin/components/LayoutComponent[headless-cms].tsx delete mode 100644 packages/admin-sandbox/admin/components/LayoutComponent[legacy].tsx delete mode 100644 packages/admin-sandbox/admin/components/LayoutComponent[right-sidebar].tsx delete mode 100644 packages/admin-sandbox/admin/components/LayoutComponent[tailwind].tsx delete mode 100644 packages/admin-sandbox/admin/components/Navigation.tsx delete mode 100644 packages/admin-sandbox/admin/components/PanelDivider.tsx delete mode 100644 packages/admin-sandbox/admin/components/ScrollView/ScrollView.css delete mode 100644 packages/admin-sandbox/admin/components/ScrollView/ScrollView.tsx delete mode 100644 packages/admin-sandbox/admin/components/Slots.tsx delete mode 100644 packages/admin-sandbox/admin/components/customLinks.tsx delete mode 100644 packages/admin-sandbox/admin/components/editorButton.css delete mode 100644 packages/admin-sandbox/admin/components/messages/types.ts delete mode 100644 packages/admin-sandbox/admin/components/messages/ui/ChatsListItem.tsx delete mode 100644 packages/admin-sandbox/admin/components/messages/ui/EmptyState.css delete mode 100644 packages/admin-sandbox/admin/components/messages/ui/EmptyState.tsx delete mode 100644 packages/admin-sandbox/admin/components/messages/ui/MessageItem.css delete mode 100644 packages/admin-sandbox/admin/components/messages/ui/MessageItem.tsx delete mode 100644 packages/admin-sandbox/admin/components/messages/ui/NewMessageInput.tsx delete mode 100644 packages/admin-sandbox/admin/components/messages/ui/index.css delete mode 100644 packages/admin-sandbox/admin/favicon.png delete mode 100644 packages/admin-sandbox/admin/index.css delete mode 100644 packages/admin-sandbox/admin/index.html delete mode 100644 packages/admin-sandbox/admin/index.tsx delete mode 100644 packages/admin-sandbox/admin/pages/ContentBlocks.tsx delete mode 100644 packages/admin-sandbox/admin/pages/actionableBoxes.tsx delete mode 100644 packages/admin-sandbox/admin/pages/articles.tsx delete mode 100644 packages/admin-sandbox/admin/pages/auto.tsx delete mode 100644 packages/admin-sandbox/admin/pages/boxes.tsx delete mode 100644 packages/admin-sandbox/admin/pages/brand.tsx delete mode 100644 packages/admin-sandbox/admin/pages/buttons.tsx delete mode 100644 packages/admin-sandbox/admin/pages/chat.tsx delete mode 100644 packages/admin-sandbox/admin/pages/examples.tsx delete mode 100644 packages/admin-sandbox/admin/pages/fieldContainers.tsx delete mode 100644 packages/admin-sandbox/admin/pages/homepage.tsx delete mode 100644 packages/admin-sandbox/admin/pages/index.tsx delete mode 100644 packages/admin-sandbox/admin/pages/inputs.tsx delete mode 100644 packages/admin-sandbox/admin/pages/lorem.tsx delete mode 100644 packages/admin-sandbox/admin/pages/messages.tsx delete mode 100644 packages/admin-sandbox/admin/pages/nested/path.tsx delete mode 100644 packages/admin-sandbox/admin/pages/quiz.tsx delete mode 100644 packages/admin-sandbox/admin/pages/random.tsx delete mode 100644 packages/admin-sandbox/admin/pages/second.tsx delete mode 100644 packages/admin-sandbox/admin/pages/seq.tsx delete mode 100644 packages/admin-sandbox/admin/pages/settings.tsx delete mode 100644 packages/admin-sandbox/admin/pages/settings/locales.tsx delete mode 100644 packages/admin-sandbox/admin/pages/slots.tsx delete mode 100644 packages/admin-sandbox/admin/pages/tenant.tsx delete mode 100644 packages/admin-sandbox/admin/pages/textareas.tsx delete mode 100644 packages/admin-sandbox/admin/tsconfig.json delete mode 100644 packages/admin-sandbox/admin/vite-env.d.ts delete mode 100644 packages/admin-sandbox/api/index.ts delete mode 100644 packages/admin-sandbox/api/migrations/2021-03-31-191433-init.json delete mode 100644 packages/admin-sandbox/api/migrations/2021-06-16-140020-upload-showcase-1.json delete mode 100644 packages/admin-sandbox/api/migrations/2021-06-17-131916-upload-showcase-2.json delete mode 100644 packages/admin-sandbox/api/migrations/2021-06-17-132344-upload-showcase-3.json delete mode 100644 packages/admin-sandbox/api/migrations/2021-06-17-141503-upload-showcase-4.json delete mode 100644 packages/admin-sandbox/api/migrations/2021-06-21-190833-upload-showcase-5.json delete mode 100644 packages/admin-sandbox/api/migrations/2021-06-29-111902-sandbox-prepare-api-for-blockeditor.json delete mode 100644 packages/admin-sandbox/api/migrations/2021-09-10-121941-fields.json delete mode 100644 packages/admin-sandbox/api/migrations/2021-09-13-080032-content.json delete mode 100644 packages/admin-sandbox/api/migrations/2021-09-14-143228-articles.json delete mode 100644 packages/admin-sandbox/api/migrations/2021-10-27-152749-homepage-fields.json delete mode 100644 packages/admin-sandbox/api/migrations/2021-11-05-094315-content-link.json delete mode 100644 packages/admin-sandbox/api/migrations/2021-11-25-142639-locale.json delete mode 100644 packages/admin-sandbox/api/migrations/2022-01-03-090702-article-slug.json delete mode 100644 packages/admin-sandbox/api/migrations/2022-01-06-155631-image-errors.json delete mode 100644 packages/admin-sandbox/api/migrations/2022-01-11-143230-article-state.json delete mode 100644 packages/admin-sandbox/api/migrations/2022-01-17-164045-links.json delete mode 100644 packages/admin-sandbox/api/migrations/2022-01-26-105400-add-blocks-repeater.json delete mode 100644 packages/admin-sandbox/api/migrations/2022-02-18-181217-add-number.json delete mode 100644 packages/admin-sandbox/api/migrations/2022-02-21-153039-add-time.json delete mode 100644 packages/admin-sandbox/api/migrations/2022-02-25-113348-add-not-null-text-value.json delete mode 100644 packages/admin-sandbox/api/migrations/2022-03-03-124525-add-email-value.json delete mode 100644 packages/admin-sandbox/api/migrations/2022-03-03-125601-add-search-value.json delete mode 100644 packages/admin-sandbox/api/migrations/2022-03-03-132725-add-uri-value.json delete mode 100644 packages/admin-sandbox/api/migrations/2022-03-11-094052-add-content-blocks.json delete mode 100644 packages/admin-sandbox/api/migrations/2022-04-16-092713-add-order-to-categories.json delete mode 100644 packages/admin-sandbox/api/migrations/2022-04-22-093758-image-align.json delete mode 100644 packages/admin-sandbox/api/migrations/2022-05-05-112442-locale-label.json delete mode 100644 packages/admin-sandbox/api/migrations/2022-05-05-145615-locales-order.json delete mode 100644 packages/admin-sandbox/api/migrations/2022-05-11-080026-article-image.json delete mode 100644 packages/admin-sandbox/api/migrations/2022-05-23-090850-locale-dialect.json delete mode 100644 packages/admin-sandbox/api/migrations/2022-05-24-092329-index-multiple-basic-images.json delete mode 100644 packages/admin-sandbox/api/migrations/2022-05-27-152026-seq.json delete mode 100644 packages/admin-sandbox/api/migrations/2022-06-01-093650-article-sorted-tags.json delete mode 100644 packages/admin-sandbox/api/migrations/2022-06-03-082836-quiz.json delete mode 100644 packages/admin-sandbox/api/migrations/2022-06-14-090735-gallery.json delete mode 100644 packages/admin-sandbox/api/migrations/2022-07-01-134420-json.json delete mode 100644 packages/admin-sandbox/api/migrations/2022-07-19-131102-content-tags.json delete mode 100644 packages/admin-sandbox/api/migrations/2022-11-24-135530-s3-max-size.json delete mode 100644 packages/admin-sandbox/api/migrations/2023-08-21-152956-focal-point.json delete mode 100644 packages/admin-sandbox/api/migrations/2023-11-24-121513-tasks.json delete mode 100644 packages/admin-sandbox/api/migrations/2023-11-28-170731-user-order.json delete mode 100644 packages/admin-sandbox/api/model/Article.ts delete mode 100644 packages/admin-sandbox/api/model/Content.ts delete mode 100644 packages/admin-sandbox/api/model/ContentBlockPage.ts delete mode 100644 packages/admin-sandbox/api/model/Files.ts delete mode 100644 packages/admin-sandbox/api/model/Homepage.ts delete mode 100644 packages/admin-sandbox/api/model/InputShowcase.ts delete mode 100644 packages/admin-sandbox/api/model/Link.ts delete mode 100644 packages/admin-sandbox/api/model/Locale.ts delete mode 100644 packages/admin-sandbox/api/model/One.ts delete mode 100644 packages/admin-sandbox/api/model/QuizResult.ts delete mode 100644 packages/admin-sandbox/api/model/SeqEntity.ts delete mode 100644 packages/admin-sandbox/api/model/Task.ts delete mode 100644 packages/admin-sandbox/api/model/UploadShowcase.ts delete mode 100644 packages/admin-sandbox/api/model/Url.ts delete mode 100644 packages/admin-sandbox/api/model/index.ts delete mode 100644 packages/admin-sandbox/api/tsconfig.json delete mode 100644 packages/admin-sandbox/package.json delete mode 100644 packages/admin-sandbox/tests/pages.test.ts delete mode 100644 packages/admin-sandbox/tests/tsconfig.json delete mode 100644 packages/admin-sandbox/tsconfig.json delete mode 100644 packages/admin-sandbox/vite.config.ts delete mode 100644 packages/admin/api-extractor.json delete mode 100644 packages/admin/package.json delete mode 100644 packages/admin/playwright.config.js delete mode 100644 packages/admin/src/acl/index.ts delete mode 100644 packages/admin/src/acl/useProjectUserRoles.tsx delete mode 100644 packages/admin/src/adminDictionary.ts delete mode 100644 packages/admin/src/ambient.d.ts delete mode 100644 packages/admin/src/bootstrap/index.ts delete mode 100644 packages/admin/src/bootstrap/render.ts delete mode 100644 packages/admin/src/bootstrap/runReactApp.tsx delete mode 100644 packages/admin/src/components/Application/OutdatedApplicationChecker.tsx delete mode 100644 packages/admin/src/components/Application/outdatedApplicationDictionary.ts delete mode 100644 packages/admin/src/components/ApplicationEntrypoint.tsx delete mode 100644 packages/admin/src/components/DataViewPageNameKeyProvider.tsx delete mode 100644 packages/admin/src/components/Dev/ApiPanel.tsx delete mode 100644 packages/admin/src/components/Dev/DevBar.tsx delete mode 100644 packages/admin/src/components/Dev/DevErrorFallback.tsx delete mode 100644 packages/admin/src/components/Dev/IdentityPanel.tsx delete mode 100644 packages/admin/src/components/Dev/ProjectUserRolesRevealer.tsx delete mode 100644 packages/admin/src/components/Dev/index.ts delete mode 100644 packages/admin/src/components/Dev/isDevMode.ts delete mode 100644 packages/admin/src/components/Identity/IdentityProvider.tsx delete mode 100644 packages/admin/src/components/Identity/InvalidIdentityFallback.tsx delete mode 100644 packages/admin/src/components/Identity/index.ts delete mode 100644 packages/admin/src/components/Identity/useIdentity.ts delete mode 100644 packages/admin/src/components/Login/LoginEntrypoint.tsx delete mode 100644 packages/admin/src/components/Login/index.tsx delete mode 100644 packages/admin/src/components/LogoutLink.tsx delete mode 100644 packages/admin/src/components/MiscPageLayout.tsx delete mode 100644 packages/admin/src/components/NavigationProvider/NavigationProvider.tsx delete mode 100644 packages/admin/src/components/NavigationProvider/index.ts delete mode 100644 packages/admin/src/components/Project/ProjectList.tsx delete mode 100644 packages/admin/src/components/Project/index.ts delete mode 100644 packages/admin/src/components/SwitchProjectLink.tsx delete mode 100644 packages/admin/src/components/bindingFacade/blocks/Block.tsx delete mode 100644 packages/admin/src/components/bindingFacade/blocks/DiscriminatedBlocks.tsx delete mode 100644 packages/admin/src/components/bindingFacade/blocks/blockAnalyzer.ts delete mode 100644 packages/admin/src/components/bindingFacade/blocks/getDiscriminatedBlock.ts delete mode 100644 packages/admin/src/components/bindingFacade/blocks/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/blocks/useBlockProps.ts delete mode 100644 packages/admin/src/components/bindingFacade/blocks/useNormalizedBlocks.ts delete mode 100644 packages/admin/src/components/bindingFacade/buttons/ClearFieldButton/ClearFieldButton.tsx delete mode 100644 packages/admin/src/components/bindingFacade/buttons/ClearFieldButton/ClearFieldButtonInner.tsx delete mode 100644 packages/admin/src/components/bindingFacade/buttons/ClearFieldButton/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/buttons/PersistButton.tsx delete mode 100644 packages/admin/src/components/bindingFacade/buttons/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/collections/BlockRepeater/AddNewBlockButton.tsx delete mode 100644 packages/admin/src/components/bindingFacade/collections/BlockRepeater/AddNewBlockButtonInner.tsx delete mode 100644 packages/admin/src/components/bindingFacade/collections/BlockRepeater/BlockRepeater.tsx delete mode 100644 packages/admin/src/components/bindingFacade/collections/BlockRepeater/Dictionary.ts delete mode 100644 packages/admin/src/components/bindingFacade/collections/BlockRepeater/SortableBlock.tsx delete mode 100644 packages/admin/src/components/bindingFacade/collections/BlockRepeater/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/collections/Repeater/Repeater.tsx delete mode 100644 packages/admin/src/components/bindingFacade/collections/Repeater/RepeaterFieldContainer.tsx delete mode 100644 packages/admin/src/components/bindingFacade/collections/Repeater/RepeaterHandle.tsx delete mode 100644 packages/admin/src/components/bindingFacade/collections/Repeater/RepeaterInner.tsx delete mode 100644 packages/admin/src/components/bindingFacade/collections/Repeater/RepeaterItem.tsx delete mode 100644 packages/admin/src/components/bindingFacade/collections/Repeater/SortableRepeaterContainer.tsx delete mode 100644 packages/admin/src/components/bindingFacade/collections/Repeater/SortableRepeaterItem.tsx delete mode 100644 packages/admin/src/components/bindingFacade/collections/Repeater/SortableRepeaterItemHandle.tsx delete mode 100644 packages/admin/src/components/bindingFacade/collections/Repeater/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/collections/Repeater/repeaterDictionary.ts delete mode 100644 packages/admin/src/components/bindingFacade/collections/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/discrimination/DiscriminatedDatum.ts delete mode 100644 packages/admin/src/components/bindingFacade/discrimination/NormalizedDiscriminatedData.ts delete mode 100644 packages/admin/src/components/bindingFacade/discrimination/ResolvedDiscriminatedDatum.ts delete mode 100644 packages/admin/src/components/bindingFacade/discrimination/SugaredDiscriminateBy.ts delete mode 100644 packages/admin/src/components/bindingFacade/discrimination/getDiscriminatedDatum.ts delete mode 100644 packages/admin/src/components/bindingFacade/discrimination/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/discrimination/useDiscriminatedData.ts delete mode 100644 packages/admin/src/components/bindingFacade/displayFields/DisplayTextField.tsx delete mode 100644 packages/admin/src/components/bindingFacade/displayFields/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/environment/DimensionsSwitcher/DimensionsRenderer.tsx delete mode 100644 packages/admin/src/components/bindingFacade/environment/DimensionsSwitcher/DimensionsSwitcher.tsx delete mode 100644 packages/admin/src/components/bindingFacade/environment/DimensionsSwitcher/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/environment/DimensionsSwitcher/renderByJoining.tsx delete mode 100644 packages/admin/src/components/bindingFacade/environment/DimensionsSwitcher/types.ts delete mode 100644 packages/admin/src/components/bindingFacade/environment/SideDimensions.tsx delete mode 100644 packages/admin/src/components/bindingFacade/environment/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/renderers/FeedbackRenderer.tsx delete mode 100644 packages/admin/src/components/bindingFacade/renderers/LayoutRenderer.tsx delete mode 100644 packages/admin/src/components/bindingFacade/renderers/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/renderers/listRenderers/ImmutableEntityListRenderer.tsx delete mode 100644 packages/admin/src/components/bindingFacade/renderers/listRenderers/MutableEntityListRenderer.tsx delete mode 100644 packages/admin/src/components/bindingFacade/renderers/listRenderers/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/renderers/pageRenderers/DataGridPageRenderer.tsx delete mode 100644 packages/admin/src/components/bindingFacade/renderers/pageRenderers/ImmutableEntityListPageRenderer.tsx delete mode 100644 packages/admin/src/components/bindingFacade/renderers/pageRenderers/ImmutableEntityListTablePageRenderer.tsx delete mode 100644 packages/admin/src/components/bindingFacade/renderers/pageRenderers/MutableEntityListPageRenderer.tsx delete mode 100644 packages/admin/src/components/bindingFacade/renderers/pageRenderers/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/ContemberEditor/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/addMarks.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/canToggleMark.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/closest.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/closestBlockEntry.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/closestViableBlockContainerEntry.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/ejectElement.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/elementToSpecifics.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/getElementDataAttributes.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/getPreviousSibling.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/hasMarks.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/hasParentOfType.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/isElementType.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/permissivelyDeserializeNodes.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/removeMarks.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/serializeNodes.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/strictlyDeserializeNodes.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/textToSpecifics.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/toLatestFormat.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/topLevelNodes.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/RichEditor.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/RichTextField/RichTextField.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/RichTextField/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/RichTextField/useRichTextFieldNodes.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/baseEditor/BlockElement.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/baseEditor/CustomElementPlugin.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/baseEditor/CustomMarkPlugin.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/baseEditor/DefaultElement.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/baseEditor/EditableCanvas.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/baseEditor/EditorPasteUtils.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/baseEditor/EditorWithEssentials.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/baseEditor/Node.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/baseEditor/createEditorWithEssentials.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/baseEditor/editorDictionary.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/baseEditor/html/HtmlDeserializer.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/baseEditor/html/HtmlDeserializerPlugin.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/baseEditor/html/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/baseEditor/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/baseEditor/overrides/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/baseEditor/overrides/overrideDeleteBackward.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/baseEditor/overrides/withPaste.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/BlockEditor.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/BlockHoveringToolbarContents.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/FieldBackedElement.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/editor/EditorWithBlocks.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/editor/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/editor/initBlockEditor.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/editor/overrideCreateElementReference.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/editor/overrideInsertBreak.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/editor/overrideInsertData.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/editor/overrideInsertElementWithReference.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/editor/overrideInsertNode.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/editor/overrideRenderElement.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/elements/ElementWithReference.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/elements/ReferenceElement.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/elements/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/embed/core/EmbedHandler.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/embed/core/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/embed/handlers/GoogleFormEmbedHandler.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/embed/handlers/SoundCloudEmbedHandler.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/embed/handlers/SpotifyEmbedHandler.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/embed/handlers/VimeoEmbedHandler.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/embed/handlers/YouTubeEmbedHandler.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/embed/handlers/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/embed/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/references/ReferenceElementWrapper.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/references/ReferencesProvider.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/references/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/references/useCreateElementReference.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/references/useGetReferenceEntityList.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/references/useGetReferencedEntity.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/references/useInsertElementWithReference.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/references/useReferencedEntity.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/renderers/ReferenceElementRenderer.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/renderers/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/state/SortedBlocksContext.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/state/useBlockEditorOnChange.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/state/useBlockEditorState.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/state/useBlockElementCache.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/state/useBlockElementPathRefs.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/state/useRefreshBlocks.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/templating/BaseTextField.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/templating/ContentOutlet.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/templating/TextField.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/templating/editorTemplateAnalyzer.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/templating/getEditorTemplate.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/templating/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/templating/useEditorReferenceBlocks.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/useBlockEditorSlateNodes.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/useGetParentEntityRef.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/utils/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/utils/isInReferenceElement.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/blockEditor/utils/prepareElementForInsertion.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/editorFactory/BuiltinEditorPlugins.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/editorFactory/createEditor.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/editorFactory/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/editorFactory/presets.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/editorSelection/EditorSelectionAction.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/editorSelection/EditorSelectionState.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/editorSelection/editorSelectionReducer.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/editorSelection/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/editorSelection/useEditorSelection.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/editorSelection/useToolbarsState.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/legacyDeprecatedEditorFormerlyKnownAsRichTextField/LegacyDeprecatedEditorFormerlyKnownAsRichTextField.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/legacyDeprecatedEditorFormerlyKnownAsRichTextField/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/legacyDeprecatedEditorFormerlyKnownAsRichTextField/useRichTextFieldNodes.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/attributes/alignment/alignButton.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/attributes/alignment/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/attributes/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/anchors/AnchorElement.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/anchors/AnchorHtmlDeserializer.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/anchors/AnchorModifications.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/anchors/AnchorRenderer.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/anchors/anchorToolbarButton.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/anchors/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/anchors/withAnchors.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/headings/HeadingElement.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/headings/HeadingHtmlDeserializer.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/headings/HeadingRenderer.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/headings/headingToolbarButtons.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/headings/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/headings/withHeadings.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/horizonalRules/HorizontalRuleElement.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/horizonalRules/HorizontalRuleRenderer.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/horizonalRules/horizontalRuleToolbarButton.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/horizonalRules/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/horizonalRules/withHorizontalRules.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/lists/ListElement.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/lists/ListHtmlDeserializer.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/lists/ListItemElement.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/lists/ListItemRenderer.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/lists/OrderedListElement.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/lists/OrderedListRenderer.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/lists/UnorderedListElement.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/lists/UnorderedListRenderer.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/lists/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/lists/listToolbarButtons.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/lists/transforms/dedentListItem.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/lists/transforms/indentListItem.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/lists/transforms/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/lists/transforms/normalizeListElement.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/lists/transforms/toggleListElement.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/lists/withLists.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/paragraphs/ParagraphElement.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/paragraphs/ParagraphHtmlDeserializer.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/paragraphs/ParagraphRenderer.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/paragraphs/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/paragraphs/paragraphToolbarButtons.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/paragraphs/withParagraphs.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/scrollTargets/ScrollTargetElement.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/scrollTargets/ScrollTargetRenderer.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/scrollTargets/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/scrollTargets/scrollTargetToolbarButton.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/scrollTargets/withScrollTargets.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/tables/TableCellElement.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/tables/TableCellElementRenderer.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/tables/TableElement.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/tables/TableElementRenderer.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/tables/TableElementSelection.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/tables/TableModifications.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/tables/TableRowElement.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/tables/TableRowElementRenderer.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/tables/gaugeTableColumnCount.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/tables/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/tables/tableToolbarButtons.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/element/tables/withTables.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/bold/boldMark.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/bold/boldToolbarButton.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/bold/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/bold/withBold.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/code/codeMark.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/code/codeToolbarButton.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/code/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/code/withCode.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/highlight/highlightMark.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/highlight/highlightToolbarButton.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/highlight/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/highlight/withHighlight.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/italic/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/italic/italicMark.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/italic/italicToolbarButton.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/italic/withItalic.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/newline/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/newline/withNewline.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/strikeThrough/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/strikeThrough/strikeThroughMark.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/strikeThrough/strikeThroughToolbarButton.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/strikeThrough/withStrikeThrough.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/underline/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/underline/underlineMark.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/underline/underlineToolbarButton.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/plugins/text/underline/withUnderline.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/slate-reexport.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/slate-types.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/toolbars/HoveringToolbarContents.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/toolbars/HoveringToolbars.tsx delete mode 100644 packages/admin/src/components/bindingFacade/richText/toolbars/ToolbarButtonSpec.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/toolbars/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/utils/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/utils/parseIframeSrc.ts delete mode 100644 packages/admin/src/components/bindingFacade/richText/utils/parseUrl.ts delete mode 100644 packages/admin/src/components/bindingFacade/ui/ConcealableField.tsx delete mode 100644 packages/admin/src/components/bindingFacade/ui/DerivedFieldLink.tsx delete mode 100644 packages/admin/src/components/bindingFacade/ui/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/defaultUploader.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileDataExtractors/FileDataExtractor.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileDataExtractors/getAudioFileDataExtractor.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileDataExtractors/getFileUrlDataExtractor.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileDataExtractors/getGenericFileMetadataExtractor.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileDataExtractors/getImageFileDataExtractor.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileDataExtractors/getVideoFileDataExtractor.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileDataExtractors/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileHandler/AcceptFileKindError.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileHandler/DiscriminatedFileHandler.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileHandler/FileHandler.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileHandler/SingleKindFileHandler.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileHandler/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileHandler/useFileHandler.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileHandler/useSingleKindFileHandler.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileHandler/utils/attrAccept.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileHandler/utils/createEntityConnector.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileHandler/utils/disconnectAtBase.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileHandler/utils/resolveAccept.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileHandler/utils/resolveAllAcceptedMimes.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileHandler/utils/staticRenderFileKind.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileKinds/FileKind.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileKinds/FullFileKind.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileKinds/HybridFileKind.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileKinds/components/AnyFiles.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileKinds/components/AudioFiles.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileKinds/components/ImageFiles.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileKinds/components/VideoFiles.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileKinds/factories/getStockAnyFileKind.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileKinds/factories/getStockAudioFileKind.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileKinds/factories/getStockImageFileKind.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileKinds/factories/getStockVideoFileKind.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileKinds/fileKindTemplateAnalyzer.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileKinds/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/fileKinds/types.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/internalComponents/BareFileRepeater.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/internalComponents/BareFileRepeaterContainer.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/internalComponents/BareUploadField.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/internalComponents/FileInput.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/internalComponents/SingleFilePreview/ErrorFilePreview.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/internalComponents/SingleFilePreview/InitializedFilePreview.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/internalComponents/SingleFilePreview/InitializingFilePreview.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/internalComponents/SingleFilePreview/SingleFilePreview.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/internalComponents/SingleFilePreview/UploadedFilePreview.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/internalComponents/SingleFilePreview/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/internalComponents/SingleKindFileRepeater.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/internalComponents/SingleKindUploadField.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/internalComponents/hooks/useConnectSelectedEntities.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/internalComponents/hooks/useNormalizedUploadState.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/internalComponents/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/internalComponents/selection/DiscriminatedSelectFileDialog.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/internalComponents/selection/SelectFileDialog.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/internalComponents/selection/SelectFileInput.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/internalComponents/selection/SingleKindSelectFileDialog.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/internalComponents/selection/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/internalComponents/selection/useResolvedFileSelection.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/internalComponents/selection/useResolvedSingleKindFileSelection.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/uploadDictionary.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/wrappers/generic/FileRepeater.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/wrappers/generic/UploadField.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/wrappers/index.ts delete mode 100644 packages/admin/src/components/bindingFacade/upload/wrappers/withKind/AnyFileRepeater.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/wrappers/withKind/AnyUploadField.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/wrappers/withKind/AudioFileRepeater.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/wrappers/withKind/AudioUploadField.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/wrappers/withKind/ImageFileRepeater.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/wrappers/withKind/ImageUploadField.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/wrappers/withKind/VideoFileRepeater.tsx delete mode 100644 packages/admin/src/components/bindingFacade/upload/wrappers/withKind/VideoUploadField.tsx delete mode 100644 packages/admin/src/components/index.ts delete mode 100644 packages/admin/src/components/pageRouting/PageErrorBoundary.tsx delete mode 100644 packages/admin/src/components/pageRouting/Pages.tsx delete mode 100644 packages/admin/src/components/pageRouting/Scopes/CreateScope.tsx delete mode 100644 packages/admin/src/components/pageRouting/Scopes/DataGridScope.tsx delete mode 100644 packages/admin/src/components/pageRouting/Scopes/DetailScope.tsx delete mode 100644 packages/admin/src/components/pageRouting/Scopes/EditScope.tsx delete mode 100644 packages/admin/src/components/pageRouting/Scopes/ListScope.tsx delete mode 100644 packages/admin/src/components/pageRouting/Scopes/MultiEditScope.tsx delete mode 100644 packages/admin/src/components/pageRouting/Scopes/NotFoundBoundary.tsx delete mode 100644 packages/admin/src/components/pageRouting/Scopes/index.ts delete mode 100644 packages/admin/src/components/pageRouting/Scopes/scopeComponent.ts delete mode 100644 packages/admin/src/components/pageRouting/index.ts delete mode 100644 packages/admin/src/components/pageRouting/pageComponents/CreatePage.tsx delete mode 100644 packages/admin/src/components/pageRouting/pageComponents/DataGridPage.tsx delete mode 100644 packages/admin/src/components/pageRouting/pageComponents/DetailPage.tsx delete mode 100644 packages/admin/src/components/pageRouting/pageComponents/EditPage.tsx delete mode 100644 packages/admin/src/components/pageRouting/pageComponents/GenericPage.tsx delete mode 100644 packages/admin/src/components/pageRouting/pageComponents/ListPage.tsx delete mode 100644 packages/admin/src/components/pageRouting/pageComponents/MultiEditPage.tsx delete mode 100644 packages/admin/src/components/pageRouting/pageComponents/TablePage.tsx delete mode 100644 packages/admin/src/components/pageRouting/pageComponents/getPageName.ts delete mode 100644 packages/admin/src/components/pageRouting/pageComponents/index.ts delete mode 100644 packages/admin/src/components/pageRouting/pageComponents/pageComponent.ts delete mode 100644 packages/admin/src/components/pageRouting/useEntityRedirectOnPersistSuccess.ts delete mode 100644 packages/admin/src/components/pageRouting/useOnPersistSuccess.ts delete mode 100644 packages/admin/src/components/ui/Avatar.tsx delete mode 100644 packages/admin/src/components/ui/DragHandle.tsx delete mode 100644 packages/admin/src/components/ui/FileInput.tsx delete mode 100644 packages/admin/src/components/ui/InputGroup.tsx delete mode 100644 packages/admin/src/components/ui/Tile.tsx delete mode 100644 packages/admin/src/components/ui/TileList.tsx delete mode 100644 packages/admin/src/components/ui/index.tsx delete mode 100644 packages/admin/src/deprecated/index.ts delete mode 100644 packages/admin/src/index.css delete mode 100644 packages/admin/src/index.ts delete mode 100644 packages/admin/src/routing/Link.tsx delete mode 100644 packages/admin/src/routing/LinkButton.tsx delete mode 100644 packages/admin/src/routing/NavigateBackButton.tsx delete mode 100644 packages/admin/src/routing/NavigateBackLink.tsx delete mode 100644 packages/admin/src/routing/RoutingLink.tsx delete mode 100644 packages/admin/src/routing/index.ts delete mode 100644 packages/admin/src/styles/index.css delete mode 100644 packages/admin/src/styles/libs/leaflet.css delete mode 100644 packages/admin/src/styles/parts/avatar.css delete mode 100644 packages/admin/src/styles/parts/centerCard.css delete mode 100644 packages/admin/src/styles/parts/concealableField.css delete mode 100644 packages/admin/src/styles/parts/diffView.css delete mode 100644 packages/admin/src/styles/parts/dimensionsSwitcher.css delete mode 100644 packages/admin/src/styles/parts/editor.css delete mode 100644 packages/admin/src/styles/parts/fileInput.css delete mode 100644 packages/admin/src/styles/parts/hoverMenu.css delete mode 100644 packages/admin/src/styles/parts/input.css delete mode 100644 packages/admin/src/styles/parts/inputGroup.css delete mode 100644 packages/admin/src/styles/parts/link.css delete mode 100644 packages/admin/src/styles/parts/locationField.css delete mode 100644 packages/admin/src/styles/parts/navbar.css delete mode 100644 packages/admin/src/styles/parts/projectsList.css delete mode 100644 packages/admin/src/styles/parts/repeaterItem.css delete mode 100644 packages/admin/src/styles/parts/selectField.css delete mode 100644 packages/admin/src/styles/parts/shape.css delete mode 100644 packages/admin/src/styles/parts/sideDimensions.css delete mode 100644 packages/admin/src/styles/parts/sortable.css delete mode 100644 packages/admin/src/styles/parts/tile.css delete mode 100644 packages/admin/src/styles/parts/tileList.css delete mode 100644 packages/admin/src/styles/parts/toolbar.css delete mode 100644 packages/admin/src/tenant/components/QueryLoader.tsx delete mode 100644 packages/admin/src/tenant/components/apiKey/ApiKeyList.tsx delete mode 100644 packages/admin/src/tenant/components/apiKey/CreateApiKeyForm.tsx delete mode 100644 packages/admin/src/tenant/components/apiKey/index.ts delete mode 100644 packages/admin/src/tenant/components/idp/IDPInitButton.tsx delete mode 100644 packages/admin/src/tenant/components/idp/IDPResponseHandler.tsx delete mode 100644 packages/admin/src/tenant/components/idp/common.ts delete mode 100644 packages/admin/src/tenant/components/idp/index.ts delete mode 100644 packages/admin/src/tenant/components/idp/useHandleIDPResponse.ts delete mode 100644 packages/admin/src/tenant/components/idp/useIDPAutoInit.ts delete mode 100644 packages/admin/src/tenant/components/idp/useIDPStateStore.ts delete mode 100644 packages/admin/src/tenant/components/idp/useInitIDPRedirect.ts delete mode 100644 packages/admin/src/tenant/components/index.ts delete mode 100644 packages/admin/src/tenant/components/member/EditIdentity.tsx delete mode 100644 packages/admin/src/tenant/components/member/EditMembership.tsx delete mode 100644 packages/admin/src/tenant/components/member/IdentityMembership.tsx delete mode 100644 packages/admin/src/tenant/components/member/MemberList.tsx delete mode 100644 packages/admin/src/tenant/components/member/RoleRenderer.tsx delete mode 100644 packages/admin/src/tenant/components/member/VariableSelector.tsx delete mode 100644 packages/admin/src/tenant/components/member/index.ts delete mode 100644 packages/admin/src/tenant/components/member/useRemoveMemberIntent.ts delete mode 100644 packages/admin/src/tenant/components/otp/ConfirmOtpForm.tsx delete mode 100644 packages/admin/src/tenant/components/otp/DisableOtpForm.tsx delete mode 100644 packages/admin/src/tenant/components/otp/OtpManagement.tsx delete mode 100644 packages/admin/src/tenant/components/otp/PrepareOtpForm.tsx delete mode 100644 packages/admin/src/tenant/components/otp/index.ts delete mode 100644 packages/admin/src/tenant/components/pages/EditUserPage.tsx delete mode 100644 packages/admin/src/tenant/components/pages/InviteUserPage.tsx delete mode 100644 packages/admin/src/tenant/components/pages/UserListPage.tsx delete mode 100644 packages/admin/src/tenant/components/pages/errors.tsx delete mode 100644 packages/admin/src/tenant/components/pages/index.ts delete mode 100644 packages/admin/src/tenant/components/password/ChangePassword.tsx delete mode 100644 packages/admin/src/tenant/components/password/CreateResetPasswordRequestForm.tsx delete mode 100644 packages/admin/src/tenant/components/password/FillResetPasswordTokenForm.tsx delete mode 100644 packages/admin/src/tenant/components/password/ResetPasswordForm.tsx delete mode 100644 packages/admin/src/tenant/components/password/index.ts delete mode 100644 packages/admin/src/tenant/components/person/InviteUser.tsx delete mode 100644 packages/admin/src/tenant/components/person/Login.tsx delete mode 100644 packages/admin/src/tenant/components/person/UsersList.tsx delete mode 100644 packages/admin/src/tenant/components/person/index.ts delete mode 100644 packages/admin/src/tenant/components/person/useRedirectToBacklink.ts delete mode 100644 packages/admin/src/tenant/components/project/CreateProjectForm.tsx delete mode 100644 packages/admin/src/tenant/components/project/ProjectsGrid.tsx delete mode 100644 packages/admin/src/tenant/components/project/index.ts delete mode 100644 packages/admin/src/tenant/index.ts delete mode 100644 packages/admin/src/tenant/lib/auth.ts delete mode 100644 packages/admin/src/tenant/lib/index.ts delete mode 100644 packages/admin/src/tenant/lib/requestState.ts delete mode 100644 packages/admin/src/tenant/lib/useForm.ts delete mode 100644 packages/admin/src/tenant/lib/useMutation.ts delete mode 100644 packages/admin/src/tenant/lib/useQuery.ts delete mode 100644 packages/admin/src/tenant/lib/useSingleTenantMutation.ts delete mode 100644 packages/admin/src/tenant/lib/variables.ts delete mode 100644 packages/admin/src/tenant/mutations/apiKey/createApiKey.ts delete mode 100644 packages/admin/src/tenant/mutations/apiKey/index.ts delete mode 100644 packages/admin/src/tenant/mutations/identity/index.ts delete mode 100644 packages/admin/src/tenant/mutations/identity/signIn.ts delete mode 100644 packages/admin/src/tenant/mutations/identity/signOut.ts delete mode 100644 packages/admin/src/tenant/mutations/idp/index.ts delete mode 100644 packages/admin/src/tenant/mutations/idp/initSignInIDP.ts delete mode 100644 packages/admin/src/tenant/mutations/idp/signInIDP.ts delete mode 100644 packages/admin/src/tenant/mutations/index.ts delete mode 100644 packages/admin/src/tenant/mutations/membership/index.ts delete mode 100644 packages/admin/src/tenant/mutations/membership/removeMember.ts delete mode 100644 packages/admin/src/tenant/mutations/membership/updateMembership.ts delete mode 100644 packages/admin/src/tenant/mutations/otp/confirmOtp.ts delete mode 100644 packages/admin/src/tenant/mutations/otp/disableOtp.ts delete mode 100644 packages/admin/src/tenant/mutations/otp/index.ts delete mode 100644 packages/admin/src/tenant/mutations/otp/prepareOtp.ts delete mode 100644 packages/admin/src/tenant/mutations/password/changePasswords.ts delete mode 100644 packages/admin/src/tenant/mutations/password/createResetPasswordRequest.ts delete mode 100644 packages/admin/src/tenant/mutations/password/index.ts delete mode 100644 packages/admin/src/tenant/mutations/password/resetPassword.ts delete mode 100644 packages/admin/src/tenant/mutations/person/index.ts delete mode 100644 packages/admin/src/tenant/mutations/person/invite.ts delete mode 100644 packages/admin/src/tenant/mutations/project/createProject.ts delete mode 100644 packages/admin/src/tenant/mutations/project/index.ts delete mode 100644 packages/admin/src/tenant/queries/index.ts delete mode 100644 packages/admin/src/tenant/queries/listUsers.ts delete mode 100644 packages/admin/src/tenant/queries/me.ts delete mode 100644 packages/admin/src/tenant/queries/projectMemberships.ts delete mode 100644 packages/admin/src/tenant/queries/roles.ts delete mode 100644 packages/admin/src/tenant/types.ts delete mode 100644 packages/admin/src/tsconfig.json delete mode 100644 packages/admin/src/typings/react-fix.d.ts delete mode 100644 packages/admin/tests/playwright/admin/ahem.ttf delete mode 100644 packages/admin/tests/playwright/admin/index.css delete mode 100644 packages/admin/tests/playwright/admin/index.html delete mode 100644 packages/admin/tests/playwright/admin/index.tsx delete mode 100644 packages/admin/tests/playwright/admin/package.json delete mode 100644 packages/admin/tests/playwright/admin/vite-env.d.ts delete mode 100644 packages/admin/tests/playwright/admin/vite.config.js delete mode 100644 packages/admin/tests/playwright/cases/blockEditor.model.ts delete mode 100644 packages/admin/tests/playwright/cases/blockEditor.spec.ts delete mode 100644 packages/admin/tests/playwright/cases/blockEditor.tsx delete mode 100644 packages/admin/tests/playwright/cases/data/logo.png delete mode 100644 packages/admin/tests/playwright/cases/errorHandling.model.ts delete mode 100644 packages/admin/tests/playwright/cases/errorHandling.spec.ts delete mode 100644 packages/admin/tests/playwright/cases/errorHandling.tsx delete mode 100644 packages/admin/tests/playwright/cases/fieldContainer.spec.ts delete mode 100644 packages/admin/tests/playwright/cases/fieldContainer.tsx delete mode 100644 packages/admin/tests/playwright/cases/fileSelection.model.ts delete mode 100644 packages/admin/tests/playwright/cases/fileSelection.spec.ts delete mode 100644 packages/admin/tests/playwright/cases/fileSelection.tsx delete mode 100644 packages/admin/tests/playwright/cases/layout.spec.ts delete mode 100644 packages/admin/tests/playwright/cases/layout.tsx delete mode 100644 packages/admin/tests/playwright/cases/layoutWithTitleBar.spec.ts delete mode 100644 packages/admin/tests/playwright/cases/layoutWithTitleBar.tsx delete mode 100644 packages/admin/tests/playwright/cases/lazySelect.model.ts delete mode 100644 packages/admin/tests/playwright/cases/lazySelect.spec.ts delete mode 100644 packages/admin/tests/playwright/cases/lazySelect.tsx delete mode 100644 packages/admin/tests/playwright/cases/radioInput.model.ts delete mode 100644 packages/admin/tests/playwright/cases/radioInput.spec.ts delete mode 100644 packages/admin/tests/playwright/cases/radioInput.tsx delete mode 100644 packages/admin/tests/playwright/cases/repeaterItemContainer.spec.ts delete mode 100644 packages/admin/tests/playwright/cases/repeaterItemContainer.tsx delete mode 100644 packages/admin/tests/playwright/cases/repeaterItemContainerWithActions.tsx delete mode 100644 packages/admin/tests/playwright/cases/select.model.ts delete mode 100644 packages/admin/tests/playwright/cases/select.spec.ts delete mode 100644 packages/admin/tests/playwright/cases/select.tsx delete mode 100644 packages/admin/tests/playwright/cases/selectOrCreate.model.ts delete mode 100644 packages/admin/tests/playwright/cases/selectOrCreate.spec.ts delete mode 100644 packages/admin/tests/playwright/cases/selectOrCreate.tsx delete mode 100644 packages/admin/tests/playwright/cases/textInput.model.ts delete mode 100644 packages/admin/tests/playwright/cases/textInput.spec.ts delete mode 100644 packages/admin/tests/playwright/cases/textInput.tsx delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/filled-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/filled-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/filled-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/filled-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/initial-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/initial-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/initial-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/initial-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-ordered-list-clicked-Desktop-Chrome-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-ordered-list-clicked-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-ordered-list-clicked-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-ordered-list-clicked-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-ordered-list-clicked-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-ordered-list-first-Desktop-Chrome-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-ordered-list-first-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-ordered-list-first-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-ordered-list-first-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-ordered-list-first-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-ordered-list-initial-Desktop-Chrome-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-ordered-list-initial-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-ordered-list-initial-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-ordered-list-initial-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-ordered-list-initial-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-ordered-list-second-Desktop-Chrome-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-ordered-list-second-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-ordered-list-second-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-ordered-list-second-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-ordered-list-second-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-ordered-list-third-Desktop-Chrome-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-ordered-list-third-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-ordered-list-third-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-ordered-list-third-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-ordered-list-third-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-unordered-list-clicked-Desktop-Chrome-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-unordered-list-clicked-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-unordered-list-clicked-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-unordered-list-clicked-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-unordered-list-clicked-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-unordered-list-first-Desktop-Chrome-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-unordered-list-first-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-unordered-list-first-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-unordered-list-first-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-unordered-list-first-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-unordered-list-initial-Desktop-Chrome-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-unordered-list-initial-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-unordered-list-initial-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-unordered-list-initial-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-unordered-list-initial-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-unordered-list-second-Desktop-Chrome-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-unordered-list-second-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-unordered-list-second-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-unordered-list-second-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-unordered-list-second-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-unordered-list-third-Desktop-Chrome-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-unordered-list-third-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-unordered-list-third-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-unordered-list-third-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/inline-buttons-unordered-list-third-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/selected-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/selected-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/selected-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/blockEditor.spec.ts-snapshots/selected-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/errorHandling.spec.ts-snapshots/01-initial-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/errorHandling.spec.ts-snapshots/01-initial-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/errorHandling.spec.ts-snapshots/01-initial-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/errorHandling.spec.ts-snapshots/01-initial-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/errorHandling.spec.ts-snapshots/02-error-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/errorHandling.spec.ts-snapshots/02-error-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/errorHandling.spec.ts-snapshots/02-error-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/errorHandling.spec.ts-snapshots/02-error-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/fieldContainer.spec.ts-snapshots/initial-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/fieldContainer.spec.ts-snapshots/initial-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/fieldContainer.spec.ts-snapshots/initial-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/fieldContainer.spec.ts-snapshots/initial-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/fileSelection.spec.ts-snapshots/01-initial-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/fileSelection.spec.ts-snapshots/01-initial-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/fileSelection.spec.ts-snapshots/01-initial-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/fileSelection.spec.ts-snapshots/01-initial-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/fileSelection.spec.ts-snapshots/02-upload-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/fileSelection.spec.ts-snapshots/02-upload-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/fileSelection.spec.ts-snapshots/02-upload-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/fileSelection.spec.ts-snapshots/02-upload-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/fileSelection.spec.ts-snapshots/03-select-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/fileSelection.spec.ts-snapshots/03-select-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/fileSelection.spec.ts-snapshots/03-select-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/fileSelection.spec.ts-snapshots/03-select-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/fileSelection.spec.ts-snapshots/04-confirm-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/fileSelection.spec.ts-snapshots/04-confirm-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/fileSelection.spec.ts-snapshots/04-confirm-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/fileSelection.spec.ts-snapshots/04-confirm-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/layout.spec.ts-snapshots/initial-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/layout.spec.ts-snapshots/initial-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/layout.spec.ts-snapshots/initial-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/layout.spec.ts-snapshots/initial-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/layoutWithTitleBar.spec.ts-snapshots/initial-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/layoutWithTitleBar.spec.ts-snapshots/initial-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/layoutWithTitleBar.spec.ts-snapshots/initial-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/layoutWithTitleBar.spec.ts-snapshots/initial-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/lazySelect.spec.ts-snapshots/01-initial-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/lazySelect.spec.ts-snapshots/01-initial-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/lazySelect.spec.ts-snapshots/01-initial-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/lazySelect.spec.ts-snapshots/01-initial-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/lazySelect.spec.ts-snapshots/02-expanded-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/lazySelect.spec.ts-snapshots/02-expanded-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/lazySelect.spec.ts-snapshots/02-expanded-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/lazySelect.spec.ts-snapshots/02-expanded-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/lazySelect.spec.ts-snapshots/03-loaded-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/lazySelect.spec.ts-snapshots/03-loaded-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/lazySelect.spec.ts-snapshots/03-loaded-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/lazySelect.spec.ts-snapshots/03-loaded-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/radioInput.spec.ts-snapshots/after-save-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/radioInput.spec.ts-snapshots/after-save-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/radioInput.spec.ts-snapshots/after-save-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/radioInput.spec.ts-snapshots/after-save-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/radioInput.spec.ts-snapshots/initial-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/radioInput.spec.ts-snapshots/initial-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/radioInput.spec.ts-snapshots/initial-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/radioInput.spec.ts-snapshots/initial-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/radioInput.spec.ts-snapshots/selected-draft-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/radioInput.spec.ts-snapshots/selected-draft-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/radioInput.spec.ts-snapshots/selected-draft-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/radioInput.spec.ts-snapshots/selected-draft-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/radioInput.spec.ts-snapshots/selected-published-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/radioInput.spec.ts-snapshots/selected-published-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/radioInput.spec.ts-snapshots/selected-published-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/radioInput.spec.ts-snapshots/selected-published-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/radioInput.spec.ts-snapshots/selected-review-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/radioInput.spec.ts-snapshots/selected-review-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/radioInput.spec.ts-snapshots/selected-review-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/radioInput.spec.ts-snapshots/selected-review-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/repeaterItemContainer.spec.ts-snapshots/initial-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/repeaterItemContainer.spec.ts-snapshots/initial-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/repeaterItemContainer.spec.ts-snapshots/initial-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/repeaterItemContainer.spec.ts-snapshots/initial-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/repeaterItemContainer.spec.ts-snapshots/with-actions-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/repeaterItemContainer.spec.ts-snapshots/with-actions-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/repeaterItemContainer.spec.ts-snapshots/with-actions-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/repeaterItemContainer.spec.ts-snapshots/with-actions-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/select.spec.ts-snapshots/01-initial-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/select.spec.ts-snapshots/01-initial-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/select.spec.ts-snapshots/01-initial-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/select.spec.ts-snapshots/01-initial-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/select.spec.ts-snapshots/02-deselected-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/select.spec.ts-snapshots/02-deselected-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/select.spec.ts-snapshots/02-deselected-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/select.spec.ts-snapshots/02-deselected-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/select.spec.ts-snapshots/03-opened-dialog-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/select.spec.ts-snapshots/03-opened-dialog-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/select.spec.ts-snapshots/03-opened-dialog-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/select.spec.ts-snapshots/03-opened-dialog-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/select.spec.ts-snapshots/04-selected-item-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/select.spec.ts-snapshots/04-selected-item-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/select.spec.ts-snapshots/04-selected-item-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/select.spec.ts-snapshots/04-selected-item-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/select.spec.ts-snapshots/05-after-save-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/select.spec.ts-snapshots/05-after-save-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/select.spec.ts-snapshots/05-after-save-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/select.spec.ts-snapshots/05-after-save-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/selectOrCreate.spec.ts-snapshots/01-initial-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/selectOrCreate.spec.ts-snapshots/01-initial-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/selectOrCreate.spec.ts-snapshots/01-initial-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/selectOrCreate.spec.ts-snapshots/01-initial-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/selectOrCreate.spec.ts-snapshots/02-opened-dialog-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/selectOrCreate.spec.ts-snapshots/02-opened-dialog-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/selectOrCreate.spec.ts-snapshots/02-opened-dialog-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/selectOrCreate.spec.ts-snapshots/02-opened-dialog-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/selectOrCreate.spec.ts-snapshots/03-item-added-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/selectOrCreate.spec.ts-snapshots/03-item-added-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/selectOrCreate.spec.ts-snapshots/03-item-added-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/selectOrCreate.spec.ts-snapshots/03-item-added-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/selectOrCreate.spec.ts-snapshots/04-after-save-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/selectOrCreate.spec.ts-snapshots/04-after-save-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/selectOrCreate.spec.ts-snapshots/04-after-save-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/selectOrCreate.spec.ts-snapshots/04-after-save-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/textInput.spec.ts-snapshots/after-save-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/textInput.spec.ts-snapshots/after-save-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/textInput.spec.ts-snapshots/after-save-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/textInput.spec.ts-snapshots/after-save-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/textInput.spec.ts-snapshots/initial-Desktop-Chrome-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/textInput.spec.ts-snapshots/initial-Desktop-Firefox-Dark-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/textInput.spec.ts-snapshots/initial-iPad-landscape-linux.png delete mode 100644 packages/admin/tests/playwright/snapshots/textInput.spec.ts-snapshots/initial-iPhone-11-linux.png delete mode 100644 packages/admin/tests/playwright/tsconfig.json delete mode 100644 packages/admin/tests/playwright/utils.ts delete mode 100644 packages/admin/tests/tsconfig.json delete mode 100644 packages/admin/tests/vitest/editor/htmlDeserializer/deserializer.spec.tsx delete mode 100644 packages/admin/tests/vitest/editor/htmlDeserializer/utils.ts delete mode 100644 packages/admin/tests/vitest/editor/plugins/heading.test.tsx delete mode 100644 packages/admin/tsconfig.json delete mode 100644 packages/admin/tsdoc.json delete mode 100644 packages/admin/vite.config.css.js delete mode 100644 packages/admin/vite.config.js delete mode 100644 packages/brand/api-extractor.json delete mode 100644 packages/brand/package.json delete mode 100644 packages/brand/src/2023/Contember.tsx delete mode 100644 packages/brand/src/2023/Content.tsx delete mode 100644 packages/brand/src/2023/Document.tsx delete mode 100644 packages/brand/src/2023/Edit.tsx delete mode 100644 packages/brand/src/2023/Ember.tsx delete mode 100644 packages/brand/src/2023/GitHub.tsx delete mode 100644 packages/brand/src/2023/Globe.tsx delete mode 100644 packages/brand/src/2023/Lock.tsx delete mode 100644 packages/brand/src/2023/LogoIcon.tsx delete mode 100644 packages/brand/src/2023/LogoType.tsx delete mode 100644 packages/brand/src/2023/WireFrame.tsx delete mode 100644 packages/brand/src/2023/index.ts delete mode 100644 packages/brand/src/Types.ts delete mode 100644 packages/brand/src/index.css delete mode 100644 packages/brand/src/index.ts delete mode 100644 packages/brand/src/tsconfig.json delete mode 100644 packages/brand/tsconfig.json delete mode 100644 packages/brand/tsdoc.json delete mode 100644 packages/brand/vite.config.css.js delete mode 100644 packages/brand/vite.config.js delete mode 100644 packages/interface-tester/api-extractor.json delete mode 100644 packages/interface-tester/package.json delete mode 100644 packages/interface-tester/readme.md delete mode 100644 packages/interface-tester/src/config.ts delete mode 100644 packages/interface-tester/src/environment.ts delete mode 100644 packages/interface-tester/src/index.ts delete mode 100644 packages/interface-tester/src/nodes.tsx delete mode 100644 packages/interface-tester/src/schema.ts delete mode 100644 packages/interface-tester/src/tests.ts delete mode 100644 packages/interface-tester/src/tsconfig.json delete mode 100644 packages/interface-tester/src/vitest.ts delete mode 100644 packages/interface-tester/tsconfig.json delete mode 100644 packages/interface-tester/tsdoc.json delete mode 100644 packages/interface-tester/vite.config.js delete mode 100644 packages/layout/api-extractor.json delete mode 100644 packages/layout/package.json delete mode 100644 packages/layout/src/directives/Directive.tsx delete mode 100644 packages/layout/src/directives/Provider.tsx delete mode 100644 packages/layout/src/directives/contexts.tsx delete mode 100644 packages/layout/src/directives/index.ts delete mode 100644 packages/layout/src/directives/types.ts delete mode 100644 packages/layout/src/focus-scope/FocusScope.tsx delete mode 100644 packages/layout/src/focus-scope/index.ts delete mode 100644 packages/layout/src/index.css delete mode 100644 packages/layout/src/index.ts delete mode 100644 packages/layout/src/insets/Constants.ts delete mode 100644 packages/layout/src/insets/Contexts.ts delete mode 100644 packages/layout/src/insets/Helpers.ts delete mode 100644 packages/layout/src/insets/InsetsConsumer.tsx delete mode 100644 packages/layout/src/insets/InsetsProvider.tsx delete mode 100644 packages/layout/src/insets/SafeAreaInsetsProvider.tsx delete mode 100644 packages/layout/src/insets/Types.ts delete mode 100644 packages/layout/src/insets/index.ts delete mode 100644 packages/layout/src/insets/useElementInsetCustomProperties.ts delete mode 100644 packages/layout/src/insets/useElementInsets.ts delete mode 100644 packages/layout/src/kit/Bars.css delete mode 100644 packages/layout/src/kit/Frame.css delete mode 100644 packages/layout/src/kit/Frame.tsx delete mode 100644 packages/layout/src/kit/Panels.css delete mode 100644 packages/layout/src/kit/Slots/index.ts delete mode 100644 packages/layout/src/kit/ToggleMenuButton.tsx delete mode 100644 packages/layout/src/kit/ToggleSidebarButton.tsx delete mode 100644 packages/layout/src/kit/Toggles.css delete mode 100644 packages/layout/src/kit/Types.ts delete mode 100644 packages/layout/src/kit/createLayoutBarComponent.tsx delete mode 100644 packages/layout/src/kit/createLayoutContentPanelComponent.tsx delete mode 100644 packages/layout/src/kit/createLayoutSidebarComponent.tsx delete mode 100644 packages/layout/src/kit/index.css delete mode 100644 packages/layout/src/kit/index.ts delete mode 100644 packages/layout/src/menu-auto-close-provider/MenuAutoCloseProvider.tsx delete mode 100644 packages/layout/src/menu-auto-close-provider/index.ts delete mode 100644 packages/layout/src/primitives/Contexts.ts delete mode 100644 packages/layout/src/primitives/Panel.css delete mode 100644 packages/layout/src/primitives/Panel.tsx delete mode 100644 packages/layout/src/primitives/PanelBody.tsx delete mode 100644 packages/layout/src/primitives/PanelFooter.tsx delete mode 100644 packages/layout/src/primitives/PanelHeader.tsx delete mode 100644 packages/layout/src/primitives/PanelsStateProvider.tsx delete mode 100644 packages/layout/src/primitives/ResponsiveContainer.css delete mode 100644 packages/layout/src/primitives/ResponsiveContainer.tsx delete mode 100644 packages/layout/src/primitives/Root.css delete mode 100644 packages/layout/src/primitives/Root.tsx delete mode 100644 packages/layout/src/primitives/Types.ts delete mode 100644 packages/layout/src/primitives/getPanelId.ts delete mode 100644 packages/layout/src/primitives/index.css delete mode 100644 packages/layout/src/primitives/index.ts delete mode 100644 packages/layout/src/primitives/panelsStateAsDataAttributes.ts delete mode 100644 packages/layout/src/primitives/parseLayoutPanelProps.ts delete mode 100644 packages/layout/src/primitives/parsePanelsState.ts delete mode 100644 packages/layout/src/primitives/useClosePanelOnEscape.ts delete mode 100644 packages/layout/src/responsive-stack/ResponsiveStack.tsx delete mode 100644 packages/layout/src/responsive-stack/index.ts delete mode 100644 packages/layout/src/slots/index.ts delete mode 100644 packages/layout/src/tsconfig.json delete mode 100644 packages/layout/src/utils/isSlugString.ts delete mode 100644 packages/layout/tests/insets/Helpers.test.ts delete mode 100644 packages/layout/tests/tsconfig.json delete mode 100644 packages/layout/tsconfig.json delete mode 100644 packages/layout/tsdoc.json delete mode 100644 packages/layout/vite.config.css.js delete mode 100644 packages/layout/vite.config.js create mode 100644 packages/playground/admin/app/components/icon.tsx rename packages/{react-auto/src => playground/admin/lib-extra/auto}/components/AutoCell.tsx (98%) rename packages/{react-auto/src => playground/admin/lib-extra/auto}/components/AutoField.tsx (98%) rename packages/{react-auto/src => playground/admin/lib-extra/auto}/components/AutoFields.tsx (92%) rename packages/{react-auto/src => playground/admin/lib-extra/auto}/components/AutoForm.tsx (92%) rename packages/{react-auto/src => playground/admin/lib-extra/auto}/components/AutoGrid.tsx (96%) rename packages/{react-auto/src => playground/admin/lib-extra/auto}/components/AutoLabel.tsx (92%) rename packages/{react-auto/src => playground/admin/lib-extra/auto}/components/index.ts (100%) rename packages/{react-auto/src => playground/admin/lib-extra/auto}/components/types.ts (100%) rename packages/{react-auto/src => playground/admin/lib-extra/auto}/index.ts (100%) rename packages/{react-auto/src => playground/admin/lib-extra/auto}/utils/formatString.tsx (100%) rename packages/{react-auto/src => playground/admin/lib-extra/auto}/utils/getHumanFriendlyField.tsx (100%) rename packages/{react-auto/src => playground/admin/lib-extra/auto}/utils/resolveConnectingEntity.tsx (100%) rename packages/{react-auto/src => playground/admin/lib-extra/auto}/utils/resolveSortableBy.tsx (100%) delete mode 100644 packages/react-auto/api-extractor.json delete mode 100644 packages/react-auto/package.json delete mode 100644 packages/react-auto/src/tsconfig.json delete mode 100644 packages/react-auto/tsconfig.json delete mode 100644 packages/react-auto/tsdoc.json delete mode 100644 packages/react-auto/vite.config.js delete mode 100644 packages/react-binding-ui/api-extractor.json delete mode 100644 packages/react-binding-ui/package.json delete mode 100644 packages/react-binding-ui/src/errors/AccessorErrors.tsx delete mode 100644 packages/react-binding-ui/src/errors/errorCodeDictionary.ts delete mode 100644 packages/react-binding-ui/src/errors/index.ts delete mode 100644 packages/react-binding-ui/src/errors/useAccessorErrors.ts delete mode 100644 packages/react-binding-ui/src/fieldViews/BooleanFieldView.tsx delete mode 100644 packages/react-binding-ui/src/fieldViews/CoalesceFieldView.tsx delete mode 100644 packages/react-binding-ui/src/fieldViews/DateFieldView.tsx delete mode 100644 packages/react-binding-ui/src/fieldViews/FieldFallbackView.tsx delete mode 100644 packages/react-binding-ui/src/fieldViews/FileUrlFieldView.tsx delete mode 100644 packages/react-binding-ui/src/fieldViews/ImageFieldView.tsx delete mode 100644 packages/react-binding-ui/src/fieldViews/VideoFieldView.tsx delete mode 100644 packages/react-binding-ui/src/fieldViews/fieldViewDictionary.ts delete mode 100644 packages/react-binding-ui/src/fieldViews/index.ts delete mode 100644 packages/react-binding-ui/src/helperComponents/CreateNewEntityButton.tsx delete mode 100644 packages/react-binding-ui/src/helperComponents/DeleteEntityButton.tsx delete mode 100644 packages/react-binding-ui/src/helperComponents/EmptyMessage.tsx delete mode 100644 packages/react-binding-ui/src/helperComponents/NotFoundWrapper.tsx delete mode 100644 packages/react-binding-ui/src/helperComponents/index.ts delete mode 100644 packages/react-binding-ui/src/hooks/index.ts delete mode 100644 packages/react-binding-ui/src/hooks/persistFeedbackDictionary.ts delete mode 100644 packages/react-binding-ui/src/hooks/usePersistWithFeedback.tsx delete mode 100644 packages/react-binding-ui/src/index.ts delete mode 100644 packages/react-binding-ui/src/tsconfig.json delete mode 100644 packages/react-binding-ui/tsconfig.json delete mode 100644 packages/react-binding-ui/tsdoc.json delete mode 100644 packages/react-binding-ui/vite.config.js delete mode 100644 packages/react-choice-field-ui/api-extractor.json delete mode 100644 packages/react-choice-field-ui/package.json delete mode 100644 packages/react-choice-field-ui/src/components/MultiSelectField.tsx delete mode 100644 packages/react-choice-field-ui/src/components/RadioField.tsx delete mode 100644 packages/react-choice-field-ui/src/components/SearchInput.tsx delete mode 100644 packages/react-choice-field-ui/src/components/SelectField.tsx delete mode 100644 packages/react-choice-field-ui/src/components/rendering/MultiSelectFieldRenderer.tsx delete mode 100644 packages/react-choice-field-ui/src/components/rendering/RadioFieldRenderer.tsx delete mode 100644 packages/react-choice-field-ui/src/components/rendering/SelectFieldRenderer.tsx delete mode 100644 packages/react-choice-field-ui/src/dict/choiceFieldDictionary.ts delete mode 100644 packages/react-choice-field-ui/src/hooks/useCommonReactSelectProps.ts delete mode 100644 packages/react-choice-field-ui/src/hooks/useOpenCreateNewDialog.tsx delete mode 100644 packages/react-choice-field-ui/src/index.ts delete mode 100644 packages/react-choice-field-ui/src/tsconfig.json delete mode 100644 packages/react-choice-field-ui/tsconfig.json delete mode 100644 packages/react-choice-field-ui/tsdoc.json delete mode 100644 packages/react-choice-field-ui/vite.config.js delete mode 100644 packages/react-choice-field/api-extractor.json delete mode 100644 packages/react-choice-field/package.json delete mode 100644 packages/react-choice-field/src/BaseDynamicChoiceField.tsx delete mode 100644 packages/react-choice-field/src/ChoiceField.tsx delete mode 100644 packages/react-choice-field/src/ChoiceFieldData.ts delete mode 100644 packages/react-choice-field/src/ChoiceFieldOptions.ts delete mode 100644 packages/react-choice-field/src/DynamicMultiChoiceField.tsx delete mode 100644 packages/react-choice-field/src/DynamicSingleChoiceField.tsx delete mode 100644 packages/react-choice-field/src/Renderers.ts delete mode 100644 packages/react-choice-field/src/StaticSingleChoiceField.tsx delete mode 100644 packages/react-choice-field/src/hooks/useCreateOptionsFilter.ts delete mode 100644 packages/react-choice-field/src/hooks/useCurrentValues.ts delete mode 100644 packages/react-choice-field/src/hooks/useCurrentlyChosenEntities.ts delete mode 100644 packages/react-choice-field/src/hooks/useDesugaredOptionPath.ts delete mode 100644 packages/react-choice-field/src/hooks/useDynamicMultipleChoiceField.ts delete mode 100644 packages/react-choice-field/src/hooks/useDynamicMultipleChoiceWithConnectingEntityField.ts delete mode 100644 packages/react-choice-field/src/hooks/useDynamicSingleChoiceField.tsx delete mode 100644 packages/react-choice-field/src/hooks/useFuseFilteredOptions.ts delete mode 100644 packages/react-choice-field/src/hooks/useNormalizedOptions.tsx delete mode 100644 packages/react-choice-field/src/hooks/useSearchFields.ts delete mode 100644 packages/react-choice-field/src/hooks/useSelectOptions.ts delete mode 100644 packages/react-choice-field/src/hooks/useStaticSingleChoiceField.ts delete mode 100644 packages/react-choice-field/src/hooks/useTopLevelOptionAccessor.ts delete mode 100644 packages/react-choice-field/src/index.ts delete mode 100644 packages/react-choice-field/src/renderDynamicChoiceFieldStatic.tsx delete mode 100644 packages/react-choice-field/src/tsconfig.json delete mode 100644 packages/react-choice-field/tsconfig.json delete mode 100644 packages/react-choice-field/tsdoc.json delete mode 100644 packages/react-choice-field/vite.config.js delete mode 100644 packages/react-datagrid-ui/api-extractor.json delete mode 100644 packages/react-datagrid-ui/package.json delete mode 100644 packages/react-datagrid-ui/src/DataGrid.tsx delete mode 100644 packages/react-datagrid-ui/src/cells/BooleanCell.tsx delete mode 100644 packages/react-datagrid-ui/src/cells/CoalesceTextCell.tsx delete mode 100644 packages/react-datagrid-ui/src/cells/DateCell.tsx delete mode 100644 packages/react-datagrid-ui/src/cells/EnumCell.tsx delete mode 100644 packages/react-datagrid-ui/src/cells/GenericCell.tsx delete mode 100644 packages/react-datagrid-ui/src/cells/HasManyAbsentCell.tsx delete mode 100644 packages/react-datagrid-ui/src/cells/HasManySelectCell.tsx delete mode 100644 packages/react-datagrid-ui/src/cells/HasOneSelectCell.tsx delete mode 100644 packages/react-datagrid-ui/src/cells/NumberCell.tsx delete mode 100644 packages/react-datagrid-ui/src/cells/TextCell.tsx delete mode 100644 packages/react-datagrid-ui/src/cells/index.ts delete mode 100644 packages/react-datagrid-ui/src/dict/dataGridCellsDictionary.ts delete mode 100644 packages/react-datagrid-ui/src/dict/dataGridDictionary.ts delete mode 100644 packages/react-datagrid-ui/src/filters/BooleanCellFilter.tsx delete mode 100644 packages/react-datagrid-ui/src/filters/EnumCellFilter.tsx delete mode 100644 packages/react-datagrid-ui/src/filters/GenericTextCellFilter.tsx delete mode 100644 packages/react-datagrid-ui/src/filters/HasManyAbsentCellFilter.tsx delete mode 100644 packages/react-datagrid-ui/src/filters/NullConditionFilter.tsx delete mode 100644 packages/react-datagrid-ui/src/filters/NumberCellFilter.tsx delete mode 100644 packages/react-datagrid-ui/src/filters/SelectCellFilter.tsx delete mode 100644 packages/react-datagrid-ui/src/filters/TextCellFilter.tsx delete mode 100644 packages/react-datagrid-ui/src/filters/index.ts delete mode 100644 packages/react-datagrid-ui/src/index.ts delete mode 100644 packages/react-datagrid-ui/src/rendering/DataGridColumnHiding.tsx delete mode 100644 packages/react-datagrid-ui/src/rendering/DataGridContainer.tsx delete mode 100644 packages/react-datagrid-ui/src/rendering/DataGridContent.tsx delete mode 100644 packages/react-datagrid-ui/src/rendering/DataGridFooter.tsx delete mode 100644 packages/react-datagrid-ui/src/rendering/DataGridFullFilters.tsx delete mode 100644 packages/react-datagrid-ui/src/rendering/DataGridHeader.tsx delete mode 100644 packages/react-datagrid-ui/src/rendering/DataGridHeaderCell.tsx delete mode 100644 packages/react-datagrid-ui/src/rendering/DataGridLayoutControl.tsx delete mode 100644 packages/react-datagrid-ui/src/rendering/DataGridPagingSummary.tsx delete mode 100644 packages/react-datagrid-ui/src/rendering/DataGridTable.tsx delete mode 100644 packages/react-datagrid-ui/src/rendering/DataGridTableHead.tsx delete mode 100644 packages/react-datagrid-ui/src/rendering/DataGridTableRow.tsx delete mode 100644 packages/react-datagrid-ui/src/rendering/DataGridTiles.tsx delete mode 100644 packages/react-datagrid-ui/src/rendering/index.ts delete mode 100644 packages/react-datagrid-ui/src/tsconfig.json delete mode 100644 packages/react-datagrid-ui/src/types.ts delete mode 100644 packages/react-datagrid-ui/tsconfig.json delete mode 100644 packages/react-datagrid-ui/tsdoc.json delete mode 100644 packages/react-datagrid-ui/vite.config.js delete mode 100644 packages/react-datagrid/api-extractor.json delete mode 100644 packages/react-datagrid/package.json delete mode 100644 packages/react-datagrid/src/cells/BooleanCell.tsx delete mode 100644 packages/react-datagrid/src/cells/CoalesceTextCell.tsx delete mode 100644 packages/react-datagrid/src/cells/DateCell.tsx delete mode 100644 packages/react-datagrid/src/cells/EnumCell.tsx delete mode 100644 packages/react-datagrid/src/cells/GenericCell.tsx delete mode 100644 packages/react-datagrid/src/cells/HasManyAbsentCell.tsx delete mode 100644 packages/react-datagrid/src/cells/HasManySelectCell.tsx delete mode 100644 packages/react-datagrid/src/cells/HasOneSelectCell.tsx delete mode 100644 packages/react-datagrid/src/cells/NumberCell.tsx delete mode 100644 packages/react-datagrid/src/cells/TextCell.tsx delete mode 100644 packages/react-datagrid/src/cells/common.ts delete mode 100644 packages/react-datagrid/src/cells/index.ts delete mode 100644 packages/react-datagrid/src/grid/DataGridColumn.ts delete mode 100644 packages/react-datagrid/src/grid/createControlledDataGrid.tsx delete mode 100644 packages/react-datagrid/src/grid/createDataGrid.tsx delete mode 100644 packages/react-datagrid/src/grid/createDataGridRenderer.tsx delete mode 100644 packages/react-datagrid/src/grid/index.ts delete mode 100644 packages/react-datagrid/src/grid/useDataGrid.ts delete mode 100644 packages/react-datagrid/src/hooks/index.ts delete mode 100644 packages/react-datagrid/src/hooks/useDataGridHiddenColumns.ts delete mode 100644 packages/react-datagrid/src/hooks/useDataGridLayout.ts delete mode 100644 packages/react-datagrid/src/hooks/useDataGridSetColumnHidden.ts delete mode 100644 packages/react-datagrid/src/hooks/useDataGridSetLayout.ts delete mode 100644 packages/react-datagrid/src/index.ts delete mode 100644 packages/react-datagrid/src/internal/contexts.ts delete mode 100644 packages/react-datagrid/src/internal/filters.ts delete mode 100644 packages/react-datagrid/src/internal/gridTemplateAnalyzer.ts delete mode 100644 packages/react-datagrid/src/internal/hiding.ts delete mode 100644 packages/react-datagrid/src/internal/sorting.ts delete mode 100644 packages/react-datagrid/src/internal/useDataGridState.ts delete mode 100644 packages/react-datagrid/src/tsconfig.json delete mode 100644 packages/react-datagrid/src/types/column.ts delete mode 100644 packages/react-datagrid/src/types/gridState.ts delete mode 100644 packages/react-datagrid/src/types/index.ts delete mode 100644 packages/react-datagrid/tsconfig.json delete mode 100644 packages/react-datagrid/tsdoc.json delete mode 100644 packages/react-datagrid/vite.config.js delete mode 100644 packages/react-form-fields-ui/api-extractor.json delete mode 100644 packages/react-form-fields-ui/package.json delete mode 100644 packages/react-form-fields-ui/src/auxiliary/SimpleRelativeSingleField/SimpleRelativeFieldProxy.tsx delete mode 100644 packages/react-form-fields-ui/src/auxiliary/SimpleRelativeSingleField/SimpleRelativeSingleField.tsx delete mode 100644 packages/react-form-fields-ui/src/auxiliary/SimpleRelativeSingleField/index.ts delete mode 100644 packages/react-form-fields-ui/src/auxiliary/index.ts delete mode 100644 packages/react-form-fields-ui/src/components/CheckboxField.tsx delete mode 100644 packages/react-form-fields-ui/src/components/ColorField.tsx delete mode 100644 packages/react-form-fields-ui/src/components/DateField.tsx delete mode 100644 packages/react-form-fields-ui/src/components/DateTimeField.tsx delete mode 100644 packages/react-form-fields-ui/src/components/EmailField.tsx delete mode 100644 packages/react-form-fields-ui/src/components/FloatField.tsx delete mode 100644 packages/react-form-fields-ui/src/components/HiddenField.tsx delete mode 100644 packages/react-form-fields-ui/src/components/NumberField.tsx delete mode 100644 packages/react-form-fields-ui/src/components/SearchField.tsx delete mode 100644 packages/react-form-fields-ui/src/components/SlugField.tsx delete mode 100644 packages/react-form-fields-ui/src/components/TextField.tsx delete mode 100644 packages/react-form-fields-ui/src/components/TextareaField.tsx delete mode 100644 packages/react-form-fields-ui/src/components/TimeField.tsx delete mode 100644 packages/react-form-fields-ui/src/components/UrlField.tsx delete mode 100644 packages/react-form-fields-ui/src/components/index.ts delete mode 100644 packages/react-form-fields-ui/src/hooks/useFieldControl.ts delete mode 100644 packages/react-form-fields-ui/src/index.ts delete mode 100644 packages/react-form-fields-ui/src/tsconfig.json delete mode 100644 packages/react-form-fields-ui/tsconfig.json delete mode 100644 packages/react-form-fields-ui/tsdoc.json delete mode 100644 packages/react-form-fields-ui/vite.config.js delete mode 100644 packages/react-i18n/api-extractor.json delete mode 100644 packages/react-i18n/package.json delete mode 100644 packages/react-i18n/src/DictionaryCache.ts delete mode 100644 packages/react-i18n/src/DictionaryResolver.ts delete mode 100644 packages/react-i18n/src/I18nContext.ts delete mode 100644 packages/react-i18n/src/I18nError.ts delete mode 100644 packages/react-i18n/src/I18nMetadata.ts delete mode 100644 packages/react-i18n/src/I18nProvider.tsx delete mode 100644 packages/react-i18n/src/Locale.ts delete mode 100644 packages/react-i18n/src/MessageDictionary.ts delete mode 100644 packages/react-i18n/src/MessageFormatter.ts delete mode 100644 packages/react-i18n/src/defaultLocale.ts delete mode 100644 packages/react-i18n/src/index.ts delete mode 100644 packages/react-i18n/src/readme.md delete mode 100644 packages/react-i18n/src/tsconfig.json delete mode 100644 packages/react-i18n/src/useI18n.ts delete mode 100644 packages/react-i18n/src/useMessageFormatter.ts delete mode 100644 packages/react-i18n/tsconfig.json delete mode 100644 packages/react-i18n/tsdoc.json delete mode 100644 packages/react-i18n/vite.config.js delete mode 100644 packages/react-leaflet-fields-ui/api-extractor.json delete mode 100644 packages/react-leaflet-fields-ui/package.json delete mode 100644 packages/react-leaflet-fields-ui/src/components/LocationField.tsx delete mode 100644 packages/react-leaflet-fields-ui/src/index.ts delete mode 100644 packages/react-leaflet-fields-ui/src/tsconfig.json delete mode 100644 packages/react-leaflet-fields-ui/tsconfig.json delete mode 100644 packages/react-leaflet-fields-ui/tsdoc.json delete mode 100644 packages/react-leaflet-fields-ui/vite.config.js delete mode 100644 packages/ui/.storybook/index.css delete mode 100644 packages/ui/.storybook/main.js delete mode 100644 packages/ui/.storybook/preview.jsx delete mode 100644 packages/ui/api-extractor.json delete mode 100644 packages/ui/package.json delete mode 100644 packages/ui/src/Navigation.tsx delete mode 100644 packages/ui/src/assets/Inter/Inter-Black.woff delete mode 100644 packages/ui/src/assets/Inter/Inter-Black.woff2 delete mode 100644 packages/ui/src/assets/Inter/Inter-BlackItalic.woff delete mode 100644 packages/ui/src/assets/Inter/Inter-BlackItalic.woff2 delete mode 100644 packages/ui/src/assets/Inter/Inter-Bold.woff delete mode 100644 packages/ui/src/assets/Inter/Inter-Bold.woff2 delete mode 100644 packages/ui/src/assets/Inter/Inter-BoldItalic.woff delete mode 100644 packages/ui/src/assets/Inter/Inter-BoldItalic.woff2 delete mode 100644 packages/ui/src/assets/Inter/Inter-ExtraBold.woff delete mode 100644 packages/ui/src/assets/Inter/Inter-ExtraBold.woff2 delete mode 100644 packages/ui/src/assets/Inter/Inter-ExtraBoldItalic.woff delete mode 100644 packages/ui/src/assets/Inter/Inter-ExtraBoldItalic.woff2 delete mode 100644 packages/ui/src/assets/Inter/Inter-ExtraLight.woff delete mode 100644 packages/ui/src/assets/Inter/Inter-ExtraLight.woff2 delete mode 100644 packages/ui/src/assets/Inter/Inter-ExtraLightItalic.woff delete mode 100644 packages/ui/src/assets/Inter/Inter-ExtraLightItalic.woff2 delete mode 100644 packages/ui/src/assets/Inter/Inter-Italic.woff delete mode 100644 packages/ui/src/assets/Inter/Inter-Italic.woff2 delete mode 100644 packages/ui/src/assets/Inter/Inter-Light.woff delete mode 100644 packages/ui/src/assets/Inter/Inter-Light.woff2 delete mode 100644 packages/ui/src/assets/Inter/Inter-LightItalic.woff delete mode 100644 packages/ui/src/assets/Inter/Inter-LightItalic.woff2 delete mode 100644 packages/ui/src/assets/Inter/Inter-Medium.woff delete mode 100644 packages/ui/src/assets/Inter/Inter-Medium.woff2 delete mode 100644 packages/ui/src/assets/Inter/Inter-MediumItalic.woff delete mode 100644 packages/ui/src/assets/Inter/Inter-MediumItalic.woff2 delete mode 100644 packages/ui/src/assets/Inter/Inter-Regular.woff delete mode 100644 packages/ui/src/assets/Inter/Inter-Regular.woff2 delete mode 100644 packages/ui/src/assets/Inter/Inter-SemiBold.woff delete mode 100644 packages/ui/src/assets/Inter/Inter-SemiBold.woff2 delete mode 100644 packages/ui/src/assets/Inter/Inter-SemiBoldItalic.woff delete mode 100644 packages/ui/src/assets/Inter/Inter-SemiBoldItalic.woff2 delete mode 100644 packages/ui/src/assets/Inter/Inter-Thin.woff delete mode 100644 packages/ui/src/assets/Inter/Inter-Thin.woff2 delete mode 100644 packages/ui/src/assets/Inter/Inter-ThinItalic.woff delete mode 100644 packages/ui/src/assets/Inter/Inter-ThinItalic.woff2 delete mode 100644 packages/ui/src/assets/Inter/Inter-italic.var.woff2 delete mode 100644 packages/ui/src/assets/Inter/Inter-roman.var.woff2 delete mode 100644 packages/ui/src/assets/Inter/Inter.var.woff2 delete mode 100644 packages/ui/src/assets/Inter/LICENSE.txt delete mode 100644 packages/ui/src/assets/Inter/index.css delete mode 100644 packages/ui/src/assets/contember-logotype.svg delete mode 100644 packages/ui/src/assets/dimensionSwitcher-arrow.svg delete mode 100644 packages/ui/src/assets/icons/clock.svg delete mode 100644 packages/ui/src/assets/icons/composedBlock.svg delete mode 100644 packages/ui/src/assets/icons/contentLock.svg delete mode 100644 packages/ui/src/assets/icons/download.svg delete mode 100644 packages/ui/src/assets/icons/ellipsis.svg delete mode 100644 packages/ui/src/assets/icons/gallery.svg delete mode 100644 packages/ui/src/assets/icons/heading1.svg delete mode 100644 packages/ui/src/assets/icons/heading1Numbered.svg delete mode 100644 packages/ui/src/assets/icons/heading2.svg delete mode 100644 packages/ui/src/assets/icons/heading2Numbered.svg delete mode 100644 packages/ui/src/assets/icons/heading3.svg delete mode 100644 packages/ui/src/assets/icons/heading3Numbered.svg delete mode 100644 packages/ui/src/assets/icons/heading4.svg delete mode 100644 packages/ui/src/assets/icons/heading4Numbered.svg delete mode 100644 packages/ui/src/assets/icons/heading5.svg delete mode 100644 packages/ui/src/assets/icons/heading5Numbered.svg delete mode 100644 packages/ui/src/assets/icons/heading6.svg delete mode 100644 packages/ui/src/assets/icons/heading6Numbered.svg delete mode 100644 packages/ui/src/assets/icons/horizontalLine.svg delete mode 100644 packages/ui/src/assets/icons/horizontalRule.svg delete mode 100644 packages/ui/src/assets/icons/image.svg delete mode 100644 packages/ui/src/assets/icons/megaphone.svg delete mode 100644 packages/ui/src/assets/icons/newNote.svg delete mode 100644 packages/ui/src/assets/icons/paragraphNumbered.svg delete mode 100644 packages/ui/src/assets/icons/pencil.svg delete mode 100644 packages/ui/src/assets/icons/person.svg delete mode 100644 packages/ui/src/assets/icons/questionAnswer.svg delete mode 100644 packages/ui/src/assets/icons/quote.svg delete mode 100644 packages/ui/src/assets/icons/table.svg delete mode 100644 packages/ui/src/assets/icons/tipBox.svg delete mode 100644 packages/ui/src/assets/icons/tipLink.svg delete mode 100644 packages/ui/src/assets/layout-collapseButton-arrow.svg delete mode 100644 packages/ui/src/assets/saveControl-arrow.svg delete mode 100644 packages/ui/src/assets/userMiniControl-arrow.svg delete mode 100644 packages/ui/src/components/ActionableBox/ActionableBox.tsx delete mode 100644 packages/ui/src/components/ActionableBox/index.css delete mode 100644 packages/ui/src/components/ActionableBox/index.ts delete mode 100644 packages/ui/src/components/Aether/Aether.tsx delete mode 100644 packages/ui/src/components/Aether/index.css delete mode 100644 packages/ui/src/components/Aether/index.ts delete mode 100644 packages/ui/src/components/Anchor/Anchor.tsx delete mode 100644 packages/ui/src/components/Anchor/index.css delete mode 100644 packages/ui/src/components/Anchor/index.ts delete mode 100644 packages/ui/src/components/Box/Box.tsx delete mode 100644 packages/ui/src/components/Box/index.css delete mode 100644 packages/ui/src/components/Box/index.ts delete mode 100644 packages/ui/src/components/Breadcrumbs/Breadcrumbs.tsx delete mode 100644 packages/ui/src/components/Breadcrumbs/index.css delete mode 100644 packages/ui/src/components/Breadcrumbs/index.ts delete mode 100644 packages/ui/src/components/Card/Card.tsx delete mode 100644 packages/ui/src/components/Card/index.css delete mode 100644 packages/ui/src/components/Card/index.ts delete mode 100644 packages/ui/src/components/Collapsible/Collapsible.tsx delete mode 100644 packages/ui/src/components/Collapsible/index.css delete mode 100644 packages/ui/src/components/Collapsible/index.ts delete mode 100644 packages/ui/src/components/ContentStatus/ContentStatus.tsx delete mode 100644 packages/ui/src/components/ContentStatus/index.css delete mode 100644 packages/ui/src/components/ContentStatus/index.ts delete mode 100644 packages/ui/src/components/Dialog/Dialog.css delete mode 100644 packages/ui/src/components/Dialog/Dialog.tsx delete mode 100644 packages/ui/src/components/Dialog/DialogContext.ts delete mode 100644 packages/ui/src/components/Dialog/DialogModal.css delete mode 100644 packages/ui/src/components/Dialog/DialogModal.tsx delete mode 100644 packages/ui/src/components/Dialog/DialogOptions.ts delete mode 100644 packages/ui/src/components/Dialog/DialogProvider.tsx delete mode 100644 packages/ui/src/components/Dialog/DialogSettings.ts delete mode 100644 packages/ui/src/components/Dialog/dialogReducer.ts delete mode 100644 packages/ui/src/components/Dialog/index.css delete mode 100644 packages/ui/src/components/Dialog/index.ts delete mode 100644 packages/ui/src/components/Dialog/useDialog.ts delete mode 100644 packages/ui/src/components/DimensionSwitcher/DimensionSwitcher.tsx delete mode 100644 packages/ui/src/components/DimensionSwitcher/index.css delete mode 100644 packages/ui/src/components/DimensionSwitcher/index.ts delete mode 100644 packages/ui/src/components/Divider/Divider.tsx delete mode 100644 packages/ui/src/components/Divider/index.css delete mode 100644 packages/ui/src/components/Divider/index.ts delete mode 100644 packages/ui/src/components/Dropdown/Dropdown.tsx delete mode 100644 packages/ui/src/components/Dropdown/index.css delete mode 100644 packages/ui/src/components/Dropdown/index.ts delete mode 100644 packages/ui/src/components/Editor/EditorBlock.css delete mode 100644 packages/ui/src/components/Editor/EditorBlock.tsx delete mode 100644 packages/ui/src/components/Editor/EditorBlockBoundary.css delete mode 100644 packages/ui/src/components/Editor/EditorBlockBoundary.tsx delete mode 100644 packages/ui/src/components/Editor/EditorCanvas.css delete mode 100644 packages/ui/src/components/Editor/EditorCanvas.tsx delete mode 100644 packages/ui/src/components/Editor/EditorHeading.css delete mode 100644 packages/ui/src/components/Editor/EditorHeading.tsx delete mode 100644 packages/ui/src/components/Editor/EditorNonEditable.css delete mode 100644 packages/ui/src/components/Editor/EditorNonEditable.tsx delete mode 100644 packages/ui/src/components/Editor/EditorParagraph.css delete mode 100644 packages/ui/src/components/Editor/EditorParagraph.tsx delete mode 100644 packages/ui/src/components/Editor/EditorPlaceholder.css delete mode 100644 packages/ui/src/components/Editor/EditorPlaceholder.tsx delete mode 100644 packages/ui/src/components/Editor/EditorTable/EditorTableCellElement.tsx delete mode 100644 packages/ui/src/components/Editor/EditorTable/EditorTableElement.tsx delete mode 100644 packages/ui/src/components/Editor/EditorTable/EditorTableRowElement.tsx delete mode 100644 packages/ui/src/components/Editor/EditorTable/index.css delete mode 100644 packages/ui/src/components/Editor/EditorTable/index.ts delete mode 100644 packages/ui/src/components/Editor/EditorToolbar.css delete mode 100644 packages/ui/src/components/Editor/EditorToolbar.tsx delete mode 100644 packages/ui/src/components/Editor/EditorToolbarButton.css delete mode 100644 packages/ui/src/components/Editor/EditorToolbarButton.tsx delete mode 100644 packages/ui/src/components/Editor/HoveringToolbar.tsx delete mode 100644 packages/ui/src/components/Editor/index.css delete mode 100644 packages/ui/src/components/Editor/index.ts delete mode 100644 packages/ui/src/components/EmptyStateContainer/EmptyStateContainer.css delete mode 100644 packages/ui/src/components/EmptyStateContainer/EmptyStateContainer.tsx delete mode 100644 packages/ui/src/components/EmptyStateContainer/index.css delete mode 100644 packages/ui/src/components/EmptyStateContainer/index.ts delete mode 100644 packages/ui/src/components/ErrorList/ErrorList.tsx delete mode 100644 packages/ui/src/components/ErrorList/index.css delete mode 100644 packages/ui/src/components/ErrorList/index.ts delete mode 100644 packages/ui/src/components/Forms/Button/Button.css delete mode 100644 packages/ui/src/components/Forms/Button/Button.tsx delete mode 100644 packages/ui/src/components/Forms/Button/ButtonGroup.tsx delete mode 100644 packages/ui/src/components/Forms/Button/ButtonList.tsx delete mode 100644 packages/ui/src/components/Forms/Button/SaveButton.css delete mode 100644 packages/ui/src/components/Forms/Button/SaveButton.tsx delete mode 100644 packages/ui/src/components/Forms/Button/Types.ts delete mode 100644 packages/ui/src/components/Forms/Button/index.css delete mode 100644 packages/ui/src/components/Forms/Button/index.ts delete mode 100644 packages/ui/src/components/Forms/Checkbox/Checkbox.tsx delete mode 100644 packages/ui/src/components/Forms/Checkbox/CheckboxButton.tsx delete mode 100644 packages/ui/src/components/Forms/Checkbox/index.css delete mode 100644 packages/ui/src/components/Forms/Checkbox/index.ts delete mode 100644 packages/ui/src/components/Forms/FieldContainer/FieldContainer.tsx delete mode 100644 packages/ui/src/components/Forms/FieldContainer/Types.ts delete mode 100644 packages/ui/src/components/Forms/FieldContainer/index.css delete mode 100644 packages/ui/src/components/Forms/FieldContainer/index.ts delete mode 100644 packages/ui/src/components/Forms/FieldSet/FieldSet.tsx delete mode 100644 packages/ui/src/components/Forms/FieldSet/index.css delete mode 100644 packages/ui/src/components/Forms/FieldSet/index.ts delete mode 100644 packages/ui/src/components/Forms/Hooks/index.ts delete mode 100644 packages/ui/src/components/Forms/Hooks/useCheckboxInput.ts delete mode 100644 packages/ui/src/components/Forms/Hooks/useInputClassName.ts delete mode 100644 packages/ui/src/components/Forms/Hooks/useInputValue.ts delete mode 100644 packages/ui/src/components/Forms/Hooks/useNativeInput.ts delete mode 100644 packages/ui/src/components/Forms/Hooks/useTextBasedInput.ts delete mode 100644 packages/ui/src/components/Forms/Inputs/ColorInput.tsx delete mode 100644 packages/ui/src/components/Forms/Inputs/DateInput.tsx delete mode 100644 packages/ui/src/components/Forms/Inputs/DateTimeInput.tsx delete mode 100644 packages/ui/src/components/Forms/Inputs/DateTimeInputFallback.tsx delete mode 100644 packages/ui/src/components/Forms/Inputs/EmailInput.tsx delete mode 100644 packages/ui/src/components/Forms/Inputs/FloatInput.tsx delete mode 100644 packages/ui/src/components/Forms/Inputs/HiddenInput.tsx delete mode 100644 packages/ui/src/components/Forms/Inputs/MonthInput.tsx delete mode 100644 packages/ui/src/components/Forms/Inputs/NumberInput.tsx delete mode 100644 packages/ui/src/components/Forms/Inputs/PasswordInput.tsx delete mode 100644 packages/ui/src/components/Forms/Inputs/RangeInput.tsx delete mode 100644 packages/ui/src/components/Forms/Inputs/SearchInput.tsx delete mode 100644 packages/ui/src/components/Forms/Inputs/SlugInput.css delete mode 100644 packages/ui/src/components/Forms/Inputs/SlugInput.tsx delete mode 100644 packages/ui/src/components/Forms/Inputs/TelInput.tsx delete mode 100644 packages/ui/src/components/Forms/Inputs/TextInput.css delete mode 100644 packages/ui/src/components/Forms/Inputs/TextInput.tsx delete mode 100644 packages/ui/src/components/Forms/Inputs/TextareaInput.css delete mode 100644 packages/ui/src/components/Forms/Inputs/TextareaInput.tsx delete mode 100644 packages/ui/src/components/Forms/Inputs/TimeInput.tsx delete mode 100644 packages/ui/src/components/Forms/Inputs/Types.ts delete mode 100644 packages/ui/src/components/Forms/Inputs/UrlInput.tsx delete mode 100644 packages/ui/src/components/Forms/Inputs/WeekInput.tsx delete mode 100644 packages/ui/src/components/Forms/Inputs/index.css delete mode 100644 packages/ui/src/components/Forms/Inputs/index.ts delete mode 100644 packages/ui/src/components/Forms/Radio/Radio.tsx delete mode 100644 packages/ui/src/components/Forms/Radio/RadioButton.tsx delete mode 100644 packages/ui/src/components/Forms/Radio/RadioContext.ts delete mode 100644 packages/ui/src/components/Forms/Radio/RadioControl.tsx delete mode 100644 packages/ui/src/components/Forms/Radio/index.css delete mode 100644 packages/ui/src/components/Forms/Radio/index.ts delete mode 100644 packages/ui/src/components/Forms/Radio/types.ts delete mode 100644 packages/ui/src/components/Forms/Select/Select.tsx delete mode 100644 packages/ui/src/components/Forms/Select/SelectCreateNewWrapper.tsx delete mode 100644 packages/ui/src/components/Forms/Select/index.css delete mode 100644 packages/ui/src/components/Forms/Select/index.ts delete mode 100644 packages/ui/src/components/Forms/Select/useCommonReactSelectStyles.ts delete mode 100644 packages/ui/src/components/Forms/Types/ControlProps.ts delete mode 100644 packages/ui/src/components/Forms/Types/ControlValues.ts delete mode 100644 packages/ui/src/components/Forms/Types/Serializer.ts delete mode 100644 packages/ui/src/components/Forms/Types/index.ts delete mode 100644 packages/ui/src/components/Forms/Upload/FileDropZone.css delete mode 100644 packages/ui/src/components/Forms/Upload/FileDropZone.tsx delete mode 100644 packages/ui/src/components/Forms/Upload/FilePreview.css delete mode 100644 packages/ui/src/components/Forms/Upload/FilePreview.tsx delete mode 100644 packages/ui/src/components/Forms/Upload/UploadProgress.css delete mode 100644 packages/ui/src/components/Forms/Upload/UploadProgress.tsx delete mode 100644 packages/ui/src/components/Forms/Upload/index.css delete mode 100644 packages/ui/src/components/Forms/Upload/index.ts delete mode 100644 packages/ui/src/components/Forms/index.css delete mode 100644 packages/ui/src/components/Forms/index.ts delete mode 100644 packages/ui/src/components/Grid/Grid.tsx delete mode 100644 packages/ui/src/components/Grid/index.css delete mode 100644 packages/ui/src/components/Grid/index.ts delete mode 100644 packages/ui/src/components/HoveringToolbar/index.css delete mode 100644 packages/ui/src/components/Link.css delete mode 100644 packages/ui/src/components/LucideIcons/index.ts delete mode 100644 packages/ui/src/components/Menu/Contexts.ts delete mode 100644 packages/ui/src/components/Menu/Menu.css delete mode 100644 packages/ui/src/components/Menu/Menu.tsx delete mode 100644 packages/ui/src/components/Menu/MenuExpandToggle.css delete mode 100644 packages/ui/src/components/Menu/MenuExpandToggle.tsx delete mode 100644 packages/ui/src/components/Menu/MenuItem.css delete mode 100644 packages/ui/src/components/Menu/MenuItem.tsx delete mode 100644 packages/ui/src/components/Menu/MenuLink.css delete mode 100644 packages/ui/src/components/Menu/MenuLink.tsx delete mode 100644 packages/ui/src/components/Menu/Types.ts delete mode 100644 packages/ui/src/components/Menu/index.css delete mode 100644 packages/ui/src/components/Menu/index.ts delete mode 100644 packages/ui/src/components/Menu/useActiveMenuItem.tsx delete mode 100644 packages/ui/src/components/Menu/useKeyNavigation.ts delete mode 100644 packages/ui/src/components/Menu/useMenuId.tsx delete mode 100644 packages/ui/src/components/Message/Message.tsx delete mode 100644 packages/ui/src/components/Message/index.css delete mode 100644 packages/ui/src/components/Message/index.ts delete mode 100644 packages/ui/src/components/Portal/Portal.tsx delete mode 100644 packages/ui/src/components/Portal/PortalProvider.tsx delete mode 100644 packages/ui/src/components/Portal/constants.ts delete mode 100644 packages/ui/src/components/Portal/contexts.ts delete mode 100644 packages/ui/src/components/Portal/index.ts delete mode 100644 packages/ui/src/components/Portal/types.ts delete mode 100644 packages/ui/src/components/PreventCloseContext.ts delete mode 100644 packages/ui/src/components/ProgressBar/ProgressBar.tsx delete mode 100644 packages/ui/src/components/ProgressBar/index.css delete mode 100644 packages/ui/src/components/ProgressBar/index.ts delete mode 100644 packages/ui/src/components/Providers.tsx delete mode 100644 packages/ui/src/components/RepeaterItemContainer/RepeaterItemContainer.tsx delete mode 100644 packages/ui/src/components/RepeaterItemContainer/index.css delete mode 100644 packages/ui/src/components/RepeaterItemContainer/index.ts delete mode 100644 packages/ui/src/components/Section/Section.tsx delete mode 100644 packages/ui/src/components/Section/index.css delete mode 100644 packages/ui/src/components/Section/index.ts delete mode 100644 packages/ui/src/components/SectionTabs/Context.ts delete mode 100644 packages/ui/src/components/SectionTabs/SectionTabs.tsx delete mode 100644 packages/ui/src/components/SectionTabs/State.ts delete mode 100644 packages/ui/src/components/SectionTabs/Types.ts delete mode 100644 packages/ui/src/components/SectionTabs/index.css delete mode 100644 packages/ui/src/components/SectionTabs/index.ts delete mode 100644 packages/ui/src/components/Spacer/Spacer.tsx delete mode 100644 packages/ui/src/components/Spacer/index.css delete mode 100644 packages/ui/src/components/Spacer/index.ts delete mode 100644 packages/ui/src/components/Spinner/Spinner.tsx delete mode 100644 packages/ui/src/components/Spinner/index.css delete mode 100644 packages/ui/src/components/Spinner/index.ts delete mode 100644 packages/ui/src/components/SpinnerContainer/SpinnerContainer.tsx delete mode 100644 packages/ui/src/components/SpinnerContainer/SpinnerOverlay.tsx delete mode 100644 packages/ui/src/components/SpinnerContainer/index.css delete mode 100644 packages/ui/src/components/SpinnerContainer/index.ts delete mode 100644 packages/ui/src/components/SpinnerContainer/types.ts delete mode 100644 packages/ui/src/components/Stack/Stack.tsx delete mode 100644 packages/ui/src/components/Stack/index.css delete mode 100644 packages/ui/src/components/Stack/index.ts delete mode 100644 packages/ui/src/components/StyleProvider/StyleProvider.css delete mode 100644 packages/ui/src/components/StyleProvider/StyleProvider.tsx delete mode 100644 packages/ui/src/components/StyleProvider/index.css delete mode 100644 packages/ui/src/components/StyleProvider/index.ts delete mode 100644 packages/ui/src/components/StyleProvider/types.ts delete mode 100644 packages/ui/src/components/Table/Table.tsx delete mode 100644 packages/ui/src/components/Table/TableCell.tsx delete mode 100644 packages/ui/src/components/Table/TableHeaderCell.tsx delete mode 100644 packages/ui/src/components/Table/TableRow.tsx delete mode 100644 packages/ui/src/components/Table/index.css delete mode 100644 packages/ui/src/components/Table/index.ts delete mode 100644 packages/ui/src/components/Tabs/TabButton.tsx delete mode 100644 packages/ui/src/components/Tabs/Types.ts delete mode 100644 packages/ui/src/components/Tabs/index.css delete mode 100644 packages/ui/src/components/Tabs/index.ts delete mode 100644 packages/ui/src/components/Tag/Tag.tsx delete mode 100644 packages/ui/src/components/Tag/index.css delete mode 100644 packages/ui/src/components/Tag/index.ts delete mode 100644 packages/ui/src/components/Toaster/Toaster.tsx delete mode 100644 packages/ui/src/components/Toaster/ToasterContext.tsx delete mode 100644 packages/ui/src/components/Toaster/index.css delete mode 100644 packages/ui/src/components/Toaster/index.ts delete mode 100644 packages/ui/src/components/Toaster/useShowToast.ts delete mode 100644 packages/ui/src/components/Typography/Description.css delete mode 100644 packages/ui/src/components/Typography/Description.tsx delete mode 100644 packages/ui/src/components/Typography/Heading.css delete mode 100644 packages/ui/src/components/Typography/Heading.tsx delete mode 100644 packages/ui/src/components/Typography/Label.css delete mode 100644 packages/ui/src/components/Typography/Label.tsx delete mode 100644 packages/ui/src/components/Typography/Text.css delete mode 100644 packages/ui/src/components/Typography/Text.tsx delete mode 100644 packages/ui/src/components/Typography/index.css delete mode 100644 packages/ui/src/components/Typography/index.ts delete mode 100644 packages/ui/src/components/VisuallyHidden/VisuallyHidden.tsx delete mode 100644 packages/ui/src/components/VisuallyHidden/index.css delete mode 100644 packages/ui/src/components/VisuallyHidden/index.ts delete mode 100644 packages/ui/src/components/VisuallyHidden/visuallyHiddenStyle.ts delete mode 100644 packages/ui/src/components/index.css delete mode 100644 packages/ui/src/components/index.ts delete mode 100644 packages/ui/src/deprecated/BoxDistinction.ts delete mode 100644 packages/ui/src/deprecated/Icon/Icon.tsx delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/clock.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/composedBlock.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/contentLock.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/download.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/ellipsis.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/gallery.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/heading1.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/heading1Numbered.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/heading2.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/heading2Numbered.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/heading3.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/heading3Numbered.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/heading4.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/heading4Numbered.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/heading5.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/heading5Numbered.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/heading6.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/heading6Numbered.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/horizontalLine.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/horizontalRule.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/image.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/index.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/megaphone.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/newNote.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/paragraphNumbered.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/pencil.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/person.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/questionAnswer.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/quote.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/table.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/tipBox.ts delete mode 100644 packages/ui/src/deprecated/Icon/contemberIcons/tipLink.ts delete mode 100644 packages/ui/src/deprecated/Icon/index.css delete mode 100644 packages/ui/src/deprecated/Icon/index.ts delete mode 100644 packages/ui/src/deprecated/Layout/Layout.css delete mode 100644 packages/ui/src/deprecated/Layout/Layout.tsx delete mode 100644 packages/ui/src/deprecated/Layout/LayoutChrome.css delete mode 100644 packages/ui/src/deprecated/Layout/LayoutChrome.tsx delete mode 100644 packages/ui/src/deprecated/Layout/LayoutPage.css delete mode 100644 packages/ui/src/deprecated/Layout/LayoutPage.tsx delete mode 100644 packages/ui/src/deprecated/Layout/LayoutPageAside.css delete mode 100644 packages/ui/src/deprecated/Layout/LayoutPageAside.tsx delete mode 100644 packages/ui/src/deprecated/Layout/LayoutPageContent.css delete mode 100644 packages/ui/src/deprecated/Layout/LayoutPageContent.tsx delete mode 100644 packages/ui/src/deprecated/Layout/LayoutPageStickyContainer.css delete mode 100644 packages/ui/src/deprecated/Layout/LayoutPageStickyContainer.tsx delete mode 100644 packages/ui/src/deprecated/Layout/ThemeSchemeContext.ts delete mode 100644 packages/ui/src/deprecated/Layout/Types.ts delete mode 100644 packages/ui/src/deprecated/Layout/index.css delete mode 100644 packages/ui/src/deprecated/Layout/index.ts delete mode 100644 packages/ui/src/deprecated/Logo/ContemberLogoImage.tsx delete mode 100644 packages/ui/src/deprecated/Logo/Logo.tsx delete mode 100644 packages/ui/src/deprecated/Logo/LogoLabel.tsx delete mode 100644 packages/ui/src/deprecated/Logo/LogoSymbol.tsx delete mode 100644 packages/ui/src/deprecated/Logo/index.css delete mode 100644 packages/ui/src/deprecated/Logo/index.ts delete mode 100644 packages/ui/src/deprecated/MessageDistinction.ts delete mode 100644 packages/ui/src/deprecated/SeamlessDropdown/SeamlessDropdown.tsx delete mode 100644 packages/ui/src/deprecated/SeamlessDropdown/index.css delete mode 100644 packages/ui/src/deprecated/SeamlessDropdown/index.ts delete mode 100644 packages/ui/src/deprecated/TitleBar/TitleBar.tsx delete mode 100644 packages/ui/src/deprecated/TitleBar/index.css delete mode 100644 packages/ui/src/deprecated/TitleBar/index.ts delete mode 100644 packages/ui/src/deprecated/Trio/Trio.tsx delete mode 100644 packages/ui/src/deprecated/Trio/index.css delete mode 100644 packages/ui/src/deprecated/Trio/index.ts delete mode 100644 packages/ui/src/deprecated/UserMiniControl/UserMiniControl.tsx delete mode 100644 packages/ui/src/deprecated/UserMiniControl/index.css delete mode 100644 packages/ui/src/deprecated/UserMiniControl/index.ts delete mode 100644 packages/ui/src/deprecated/index.css delete mode 100644 packages/ui/src/deprecated/index.ts delete mode 100644 packages/ui/src/deprecated/randomId.ts delete mode 100644 packages/ui/src/deprecated/useCloseOnClickOutside.ts delete mode 100644 packages/ui/src/deprecated/useCloseOnEscape.ts delete mode 100644 packages/ui/src/deprecated/useFallbackRef.ts delete mode 100644 packages/ui/src/deprecated/useMouseMove.tsx delete mode 100644 packages/ui/src/errors/IllegalChildrenError.ts delete mode 100644 packages/ui/src/errors/index.ts delete mode 100644 packages/ui/src/index.css delete mode 100644 packages/ui/src/index.ts delete mode 100644 packages/ui/src/styles/globals.css delete mode 100644 packages/ui/src/styles/is-loading.css delete mode 100644 packages/ui/src/styles/schemes.css delete mode 100644 packages/ui/src/styles/tailwind-support.css delete mode 100644 packages/ui/src/styles/themes.css delete mode 100644 packages/ui/src/tsconfig.json delete mode 100644 packages/ui/src/types/Alignment.tsx delete mode 100644 packages/ui/src/types/BoxDepth.ts delete mode 100644 packages/ui/src/types/CollapsibleTransition.ts delete mode 100644 packages/ui/src/types/ControlDistinction.ts delete mode 100644 packages/ui/src/types/Default.ts delete mode 100644 packages/ui/src/types/DropdownAlignment.ts delete mode 100644 packages/ui/src/types/EditorCanvasDistinction.ts delete mode 100644 packages/ui/src/types/EditorCanvasSize.ts delete mode 100644 packages/ui/src/types/Errors.ts delete mode 100644 packages/ui/src/types/HTMLProps.ts delete mode 100644 packages/ui/src/types/HeadingDepth.ts delete mode 100644 packages/ui/src/types/HeadingDistinction.ts delete mode 100644 packages/ui/src/types/HoveringToolbarScope.ts delete mode 100644 packages/ui/src/types/IconSize.ts delete mode 100644 packages/ui/src/types/Intent.ts delete mode 100644 packages/ui/src/types/Justification.tsx delete mode 100644 packages/ui/src/types/Size.ts delete mode 100644 packages/ui/src/types/ValidationState.ts delete mode 100644 packages/ui/src/types/index.ts delete mode 100644 packages/ui/src/utils/flipValue.ts delete mode 100644 packages/ui/src/utils/forceReflow.ts delete mode 100644 packages/ui/src/utils/index.ts delete mode 100644 packages/ui/src/utils/noop.ts delete mode 100644 packages/ui/src/utils/toEnumClass.ts delete mode 100644 packages/ui/src/utils/toEnumStateClass.ts delete mode 100644 packages/ui/src/utils/toEnumViewClass.ts delete mode 100644 packages/ui/src/utils/toFeatureClass.ts delete mode 100644 packages/ui/src/utils/toStateClass.ts delete mode 100644 packages/ui/src/utils/toViewClass.ts delete mode 100644 packages/ui/stories/src/ActionableBox.stories.tsx delete mode 100644 packages/ui/stories/src/Aether.stories.tsx delete mode 100644 packages/ui/stories/src/Box.stories.tsx delete mode 100644 packages/ui/stories/src/Breadcrumbs.stories.tsx delete mode 100644 packages/ui/stories/src/Button.stories.tsx delete mode 100644 packages/ui/stories/src/ButtonGroup.stories.tsx delete mode 100644 packages/ui/stories/src/ButtonList.stories.tsx delete mode 100644 packages/ui/stories/src/Checkbox.stories.tsx delete mode 100644 packages/ui/stories/src/Collapsible.stories.tsx delete mode 100644 packages/ui/stories/src/Divider.stories.tsx delete mode 100644 packages/ui/stories/src/FieldContainer.stories.tsx delete mode 100644 packages/ui/stories/src/Grid.stories.tsx delete mode 100644 packages/ui/stories/src/Helpers/ArgTypes.ts delete mode 100644 packages/ui/stories/src/Helpers/Block.tsx delete mode 100644 packages/ui/stories/src/Helpers/DirectionStack.tsx delete mode 100644 packages/ui/stories/src/Helpers/index.ts delete mode 100644 packages/ui/stories/src/Menu.stories.tsx delete mode 100644 packages/ui/stories/src/Radio.stories.tsx delete mode 100644 packages/ui/stories/src/RepeaterItemContainer.stories.tsx delete mode 100644 packages/ui/stories/src/SaveButton.stories.tsx delete mode 100644 packages/ui/stories/src/Select.stories.tsx delete mode 100644 packages/ui/stories/src/Spacer.stories.tsx delete mode 100644 packages/ui/stories/src/Spinner.stories.tsx delete mode 100644 packages/ui/stories/src/Stack.stories.tsx delete mode 100644 packages/ui/stories/src/TabButton.stories.tsx delete mode 100644 packages/ui/stories/src/TextAreaInput.stories.tsx delete mode 100644 packages/ui/stories/src/TextInput.stories.tsx delete mode 100644 packages/ui/stories/src/Theme.stories.tsx delete mode 100644 packages/ui/stories/tsconfig.json delete mode 100644 packages/ui/stories/ui/Button.tsx delete mode 100644 packages/ui/stories/ui/Radio.tsx delete mode 100644 packages/ui/stories/ui/Select.tsx delete mode 100644 packages/ui/tests/cases/useInputValue.test.ts delete mode 100644 packages/ui/tests/cases/useNativeInput.test.ts delete mode 100644 packages/ui/tsconfig.json delete mode 100644 packages/ui/tsdoc.json delete mode 100644 packages/ui/vite.config.css.js delete mode 100644 packages/ui/vite.config.js diff --git a/docker-compose.override.dist.yaml b/docker-compose.override.dist.yaml index 51ef2bc8f2..4d6cd404af 100644 --- a/docker-compose.override.dist.yaml +++ b/docker-compose.override.dist.yaml @@ -1,5 +1,5 @@ services: - sandbox-vite: + playground-vite: user: '1000:1000' ports: ['3000:3000'] diff --git a/docker-compose.yaml b/docker-compose.yaml index 52e377557c..49f22d5f44 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,16 +1,4 @@ services: - sandbox-vite: - image: node:20-alpine - command: 'npm run start' - - environment: - NODE_ENV: 'development' - VITE_CONTEMBER_ADMIN_API_BASE_URL: 'http://localhost:3001' - VITE_CONTEMBER_ADMIN_SESSION_TOKEN: '0000000000000000000000000000000000000000' - - working_dir: /src/packages/admin-sandbox - volumes: - - .:/src:cached playground-vite: image: node:20-alpine diff --git a/packages/admin-i18n/api-extractor.json b/packages/admin-i18n/api-extractor.json deleted file mode 100644 index 66c17dd719..0000000000 --- a/packages/admin-i18n/api-extractor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../build/api-extractor.json" -} diff --git a/packages/admin-i18n/package.json b/packages/admin-i18n/package.json deleted file mode 100644 index 7bc64a88f6..0000000000 --- a/packages/admin-i18n/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "@contember/admin-i18n", - "license": "Apache-2.0", - "version": "0.0.0", - "type": "module", - "sideEffects": false, - "main": "./dist/production/index.js", - "exports": { - ".": { - "import": { - "types": "./dist/types/index.d.ts", - "development": "./dist/development/index.js", - "production": "./dist/production/index.js", - "default": "./dist/production/index.js" - }, - "require": { - "types": "./dist/types/index.d.ts", - "development": "./dist/development/index.cjs", - "production": "./dist/production/index.cjs", - "default": "./dist/production/index.cjs" - } - } - }, - "files": [ - "dist/", - "src/" - ], - "typings": "./dist/types/index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/contember/admin.git", - "directory": "packages/admin-i18n" - }, - "scripts": { - "build": "yarn build:js:dev && yarn build:js:prod", - "build:js:dev": "NODE_ENV=development vite build --mode development", - "build:js:prod": "vite build --mode production", - "ae:build": "api-extractor run --local", - "ae:test": "api-extractor run" - }, - "dependencies": { - "@contember/admin": "workspace:*" - } -} diff --git a/packages/admin-i18n/src/index.ts b/packages/admin-i18n/src/index.ts deleted file mode 100644 index 8855073503..0000000000 --- a/packages/admin-i18n/src/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './messages' - -export type { AdminDictionary } from '@contember/admin' diff --git a/packages/admin-i18n/src/messages/csCZ.ts b/packages/admin-i18n/src/messages/csCZ.ts deleted file mode 100644 index ee4a69fdda..0000000000 --- a/packages/admin-i18n/src/messages/csCZ.ts +++ /dev/null @@ -1,146 +0,0 @@ -import type { AdminDictionary } from '@contember/admin' - -export const csCZ: AdminDictionary = { - blockRepeater: { - addNewBlockButton: { - addBlock: 'Přidat blok', - }, - }, - dataGrid: { - emptyMessage: { - text: 'Žádné položky.', - }, - columnFiltering: { - showMenuButton: { - text: 'Všechny filtry', - }, - heading: 'Všechny filtry', - emptyMessage: { - text: 'Žádné aktivní filtry.', - }, - columnColumn: { - text: 'Sloupec', - }, - filterColumn: { - text: 'Filtr', - }, - addFilterButton: { - text: 'Přidat filtr', - }, - }, - columnHiding: { - showMenuButton: { - text: 'Sloupce', - }, - heading: 'Sloupce', - }, - paging: { - first: 'První', - previous: 'Předchozí', - next: 'Následující', - last: 'Poslední', - - status: { - unknownPageTotal: 'Strana {pageNumber}', - knownPageTotal: 'Strana {pageNumber} z {totalPageCount}', - itemCount: '({itemCount, plural, =0 {Žádné položky} one {# položka} few {# položky} other {# položek}})', - }, - }, - }, - dataGridCells: { - includeNull: 'Zahrnout neznámé', - booleanCell: { - includeTrue: 'Ano', - includeFalse: 'Ne', - includeNull: 'Neznámé', - }, - dateCell: { - fromLabel: 'Od', - toLabel: 'Do', - }, - textCell: { - matches: 'Obsahuje', - doesNotMatch: 'Neobsahuje', - matchesExactly: 'Přesně odpovídá', - startsWith: 'Začíná na', - endsWith: 'Končí na', - - queryPlaceholder: 'Hledaný výraz', - - includeNull: 'Zahrnout prázdné', - excludeNull: 'Vynechat prázdné', - }, - numberCell: { - equals: 'Rovná se', - greaterThan: 'Větší než', - lessThan: 'Menší než', - }, - }, - errorCodes: { - fieldRequired: 'Vyplňte prosím toto pole.', - notUnique: 'Hodnota není unikátní.', - unknownExecutionError: 'Neznámá chyba.', - }, - fieldView: { - boolean: { - yes: 'Ano', - no: 'Ne', - }, - fallback: { - unknown: 'Neznámé', - notAvailable: 'Prázdné', - }, - }, - persistFeedback: { - successMessage: 'Úspěšně uloženo!', - errorMessage: 'Při ukládání došlo k chybě. Zkuste to prosím znovu.', - afterPersistErrorMessage: 'Po úspěšném uložení dat došlo k chybě. Obnovte, prosím, stránku.', - }, - repeater: { - addButton: { - text: 'Přidat další', - }, - emptyMessage: { - text: 'Nic tu není. Zkuste přidat novou položku.', - }, - }, - upload: { - addButton: { - text: 'Vyberte soubory z disku', - subText: 'nebo je sem přetáhněte', - }, - selectButton: { - text: 'Vyberte nahrané soubory', - }, - selectModal: { - maxLimitReached: 'Bylo dosaženo maximálního počtu položek', - }, - insertSelected: { - text: 'Vložit vybrané', - }, - fileState: { - inspectingFile: 'Zkoumám soubor…', - invalidFile: 'Chybný soubor', - failedUpload: 'Nahrávání selhalo', - finalizing: 'Dokončuji…', - }, - }, - editorBlock: { - editorBlockBoundary: { - newParagraph: 'Nový odstavec', - }, - }, - choiceField: { - createNew: { - confirmButtonText: 'OK', - cancelButtonText: 'Zrušit', - dialogTitle: 'Nová položka', - }, - }, - outdatedApplication: { - heading: 'Nová verze je k dispozici', - text: 'Prosím, obnovte stránku, abyste mohli využívat nejnovější funkce aplikace.', - reloadButton: 'Obnovit nyní', - postponeButton: 'Nechat na později', - }, -} diff --git a/packages/admin-i18n/src/messages/index.ts b/packages/admin-i18n/src/messages/index.ts deleted file mode 100644 index 265aa065a7..0000000000 --- a/packages/admin-i18n/src/messages/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './csCZ' diff --git a/packages/admin-i18n/src/tsconfig.json b/packages/admin-i18n/src/tsconfig.json deleted file mode 100644 index 32aeae1157..0000000000 --- a/packages/admin-i18n/src/tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../../tsconfig.settings.json", - "compilerOptions": { - "outDir": "../dist/types" - }, - "references": [{ "path": "../../admin/src" }] -} diff --git a/packages/admin-i18n/tsconfig.json b/packages/admin-i18n/tsconfig.json deleted file mode 100644 index 4c49c9388c..0000000000 --- a/packages/admin-i18n/tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "files": [], - "include": [], - "references": [ - { "path": "./src" } - ] -} diff --git a/packages/admin-i18n/tsdoc.json b/packages/admin-i18n/tsdoc.json deleted file mode 100644 index a46f62a20a..0000000000 --- a/packages/admin-i18n/tsdoc.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", - "extends": [ - "../../tsdoc.json" - ] -} diff --git a/packages/admin-i18n/vite.config.js b/packages/admin-i18n/vite.config.js deleted file mode 100644 index 0148e463e1..0000000000 --- a/packages/admin-i18n/vite.config.js +++ /dev/null @@ -1,3 +0,0 @@ -import { createViteConfig } from './../../build/createViteConfig.js' - -export default createViteConfig('admin-i18n') diff --git a/packages/admin-sandbox/README.link-local.md b/packages/admin-sandbox/README.link-local.md deleted file mode 100644 index c1a93ba282..0000000000 --- a/packages/admin-sandbox/README.link-local.md +++ /dev/null @@ -1,44 +0,0 @@ -# Linking Contember admin repository directly in you your project - -It is possible to alias `@contember/*` packages to your local admin repository -to debug Admin issues. Such setup is handy in cases when replication is hard or -the issue is tightly coupled with your project data. - -To debug with local version of Contember Admin: - -1. Add abs path as volume to `./docker-compose.yaml` `services` > `admin` > `volumes`: - ```yaml - services: - admin: - volumes: - # Add: - - /absolute/path/to/contember-admin:/absolute/path/to/contember-admin - ``` -2. Add `resolve` section to `./admin/vite.config.ts` - ```ts - export default defineConfig({ - // [...] - resolve: { - // React alias is required. - // You can add more sub-packes of `@contember/*` besides `admin` and `ui` - alias: [{ - find: '@contember/admin', - replacement: '/absolute/path/to/contember-admin/packages/admin/src/index.ts', - }, { - find: '@contember/ui', - replacement: '/absolute/path/to/contember-admin/packages/ui/src/index.ts', - }, { - find: 'react', - replacement: '/absolute/path/to/contember-admin/node_modules/react', - }], - }, - // [...] - }) - ``` -3. In your `index.css` - ```css - // Replace: - // @import '../node_modules/@contember/admin/dist/index.css' - // with: - @import "/absolute/path/to/contember-admin/packages/admin/src/index.css"; - ``` diff --git a/packages/admin-sandbox/README.md b/packages/admin-sandbox/README.md deleted file mode 100644 index f83b4c5218..0000000000 --- a/packages/admin-sandbox/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Contember Sandbox - -## While developing Admin locally outside the Docker - -1. Install yarn -1. Run `yarn instal` -1. Run `cp docker-compose.override.dev-admin.yaml docker-compose.override.yaml` -1. Run `docker-compose up --detach` -1. Run `docker-compose run contember-cli migrations:execute admin-sandbox` -1. Run `yarn run vite` - -## Linking local development folder in your project (for debugging only) - -> **IMPORTANT:** -> It is highly recommended to add as much test cases in the Admin Sandbox -> as possible before resorting to linking local version of Contember Admin. - -If you find hard to replicate issues in Sandbox, you might want to try to -[link Contember Admin](./README.link-local.md) diff --git a/packages/admin-sandbox/admin/.env.development b/packages/admin-sandbox/admin/.env.development deleted file mode 100644 index 55f7f24ccb..0000000000 --- a/packages/admin-sandbox/admin/.env.development +++ /dev/null @@ -1,3 +0,0 @@ -VITE_CONTEMBER_ADMIN_API_BASE_URL=http://localhost:3001 -VITE_CONTEMBER_ADMIN_SESSION_TOKEN=0000000000000000000000000000000000000000 - diff --git a/packages/admin-sandbox/admin/.env.production b/packages/admin-sandbox/admin/.env.production deleted file mode 100644 index c91bc3e887..0000000000 --- a/packages/admin-sandbox/admin/.env.production +++ /dev/null @@ -1,2 +0,0 @@ -VITE_CONTEMBER_ADMIN_API_BASE_URL=/_api -VITE_CONTEMBER_ADMIN_SESSION_TOKEN=__SESSION_TOKEN__ diff --git a/packages/admin-sandbox/admin/apple-touch-icon.png b/packages/admin-sandbox/admin/apple-touch-icon.png deleted file mode 100644 index 2d144c37750f249253ef4735f3ec5256da80fe76..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11137 zcmaL7c_38Z|37~2*!O+VVi%$8p)iBA*p;GWNee2wEMaD(l1AudSIneDRJNjo88Ik3 zEhI)GTS&4Ev;D63=dbTSzdvSso_o(Z_sluZWO@ALk(#LG|@t zCHb;F?83OZ$UjXpeU>u|3BBWS36`PZ>Z6;J^zo)Ia z^_e>eNvev#gv=z4-Z~tIqmYb~l$ppHtQhd5%nX(%kv}2Gp&^_r-$%ajfv8bCZDBu1$N%V7jF`JkgIu}{36yL|76vSSq5B?}Sq75ii^un@_gB=U#r7yldDKcy)5~v0= zH@MLI{zwxH9j^&}ZsyU8pC>)kVS}m{7br8q)pbSo#uYCSdgfm@t}H)iVbws!fqQo3 zO}EUm2y)dg&gJkTMNshCD?aU8wR%+~klW9$&lJFbD#6j`cf_mQfSl-B3dJWE1ztFv zGm4DQXYe3J0TK&5DoU)$))1K{23}T$^5-1_!W+!VJOV`#eATrk55&eHrVF_A2LJjm z^WmcI8gH&QPA1Ki18L4r{XUKh0({?72l*YEXw|}oO$n0!S`%ypK){pPzPLBPea`I# z!X1o)zkFaZ>ecVziF{8`zy`#VTE;x5pM$oS77YW6s%3JQYMw zMce}Diu*zQKir|e>tdiOB68`r)ua{}XG26ErzIBG`~Ul%yI#mY>Y$ex60?HSmOLK_DTjm`O?62d3b8H!b?@ zoCsz5xj>poj_OBv0TZGFVrWY(Nb&=2@XNPK#Dy0(BMCB+N@+fB04V8p(0oLt;~@QA z6S4xJlQQZ0zgfnb?EwId5w!)TSpfG)7(qS>w|;zl6u$ML#x-cW?FcZm6O)2B-}$6;ivm%0($Q#)SNwgd;#ONP0b5L; z|AfK@{Q8EDdne3)_DWR-r>Bn(zsa|}hUG9@miX}O(6EpSD>?ehbQC|21hQ!Bb7m4% zQ69td^(ep@<8QNj#i$8Yom9qLToR>eQHWV{B#HdM+0u-kPePKG4)sU@-`jq!=@hmG zmNh;RWQp-AktRI6KwzvAuY~@pkG^TeR4B`Z-P~U40(EoXeNz1v-D5#kHaoFQdKY7% zbm%0-JsaVX27qx2g*8nWQ)nFP_|}~J_uIZY(P9Jf#EBJ(dm@-t1>~DYsDJm-=iPa4 zO7-nhzz_6Xn&*7Brmr@v8LA3rXhXOc6wBs+mL&$l z<{ONTHR1j^1Qhz@7{TB6*|1!>8YyVan$Scz z-w8kLJULTeiJ6K8r$u+(c*DcPI!D2S0@evc6+gYDLILlT6P{30I%(In6mhKj1cObIJbu^ggbpV zCBeVfOKxGqCYUze65*2&CeH19iW_{@LNYz*_ZN8X-+Yk+$Y-+{OxHhrQHPehmm{bC zY1i=tWC8N0y&E>hvObuPb>O}P@Q|Ovw{^#%M^0xs`k=CN%1nV}{^b1v?38E=&iggZMjpZw*7h_5RGys7#oHZO(e ze7WDXU(RoTx|+vePkl(~6CcyS~Zzj5=p8z^)5sMyev z12Xx68|@k@(p`rg_TKl00lzwg%P)S<*)*IfTue@jc(3$i73iH>*f?4XyX6MmJCT$| zQB)td4A^szSB1gqM{Oba5r8qgl+4CcI6X_}jvuvLyQtz^2Zl?`sUgeB7(8L^i8Eo> zwUr0(a_|+8^lf4~yWaU#^zr{R7XZTN;wE!0qdMJ;_;&2bQnUcVgIIHbYot8FRXoh) zdva?I1t~=!vA%9bJVzpkQV5m?xTw?16*BfV8yqp)lgDQP9!4S1>1UYv>PYrm z)#k{B2tt&Pxs(9J@)IJKGKmIVuSJ*W<0|?|9?d(K)O_b7h`-bLAiQ#GQMt9c5tk@Q>d!$~{I?MT?Ea zg2WMg;3qqryyTb)SjA~4Jg5C`pSr!X?wnYcPW77H7nKGZF#Gmu$d4Mj;mJpf>4t3l zJqilJ?I2~6DhQ1&UzHU~ak|&W()HPTvdY1(MGNdnIghGjC1W4v$S6-tTu6VmG{!!E z^EjKS%Qo0;nvo;;=*68qWKM?`7Z+s3rbs9H(NhRS31{mYnT=OA=h)i$$#2O zpQIO+K_o5>TYis%{nAls#B<`y!Ddvx13b+(9+bkX?wW-vf^DGSQ?0(5C<$k*T-&N(o-~8^kR+&Q&C!nWSzWKbh!YoybgZazSrT4Pi*-YgcF^p>%E1-zDQ4~ zLK(bB8AR2d8(Z-1z@Dm>nYaithXp-EAYYLzc7Dmr3z+%O9lv?ks%84kVVmD-$sj5- zvT2f}70s*HwdqbO3P^J$Ya@j?Kl|eKTTH`xQAo<8Hi~-~Lp@bW!?*XheBdoX@;%B6 ztenQDpZasUCIdnllT?#0Z3&WE&w9kcY0Uz5ysDv-*(B2gb|U@Ri!4JeWc_>8+w)-+N}rn3dJVKN!L*s9 zw*z9efJpd4def+cxDSh+tH9I=%_+xS|zfgQgV39j!5Yd%L7ST|-3KUI^bo&%${ zQB)kIsE&fwe9rA4N3 z<95U{N-y?1*FGvEJ{7Dog@{MS*#b$7MUz6Wkb=O(EH?1NCWeUP5`|-eS(eb3}Ka8o3~EE7t_i+1lQbJrDEaI33hALsLE(+>RJV-@{j{ zQFo6ghAsRTAJqKk89BBLd?t@#n?F&gp#|%qA?Rk>%rc9!>}8=W^Bm~x-Qldm-nGUt|Z6ja;3}oEvwh+W%^yQ4^|7;^7=&Vdj8T z8h7tAL=`R$yH=EZ?8v$KQL$?AHVYBn15?Tfs_{mxgF4V5zkVKnSoYo31V(G;bmNcL zB6``N3LNG96UTFMt|r7C^?59V`g z{#nIQ@LmAO{MdX@%Sn)sV*kN#?obGJw{Vygv;B7v7HXhdyaa2bw$&2jgH+~T#mDX! z699(v%X55qRF^nn>q3|51|K(0J{aQ+W)I>~*I}EoRzn>W#Sc!lnWT(x#-i4>bbL}yY6r!;NIDgJ314eCzO@_+UKhl^W2CTEyuO8B7=?L<)X@%OzitfqwBT;F62M<4)dk5zXv!XKNSr`lboJs6hIP9|zCJcJY%}YV6)x|2I za}O)kzdHjLD6dohL9ph=`F-ryR&GSUo%hxwcDVq#uEyD5O<4|H_(a~U6Gt?tZe)5R z$a1LVb?S{UB;$`*u<0FJZCn1ge!RBxQ_UhuAoVz`L^2ySr$g0ejM_%^ey@A?S0AkgO-{s{DLBSy<_TfTTvyq^){o#9hBH?(ttJuF7an9;Je+GOTZ>thIy zxlSzuI_2?y1J;w)eqV_2-Habt_?EiBg_8$(Jj?Xxe?%`@kXhYi!>dPe6DOWd^MfNm z_vw%Hp;WF#snIYm_NI|pq;ZWHa01;L>x{(?D@L|V!>fJ8%kcvajXOs8fDNv^R*`Sa zU{;9Ua=+zxVx8d+|26mqQWcL&3JWv)%){ftY4k$|g7!|*ih|)>xuggzt9bM>;kM>F zQIQ%d$ubQxaE)!IVo<9#qjz{mmV9&_aa!Pl8C8t+`A#!n9bTM}o6ubY3#WQV>tN&S z-ez14p%cT|5tI)(3M>}W=Ejjr!0PsCQrcgl6La8?NS3A117b%?b1e;*@Zzy4!5 zC%_EVmgD!n4CHZ5@QYr2wICGW=j@GgjS~R*A&}`!u3P{1HTC{)ylFY#_FXN|dilHp z1P>n#pN>llfBl>D#$3ttmb4X?9hSEid*~pn(>ir^1 zB$RnxgD$p7?DF-lJ{42)!N`Smcr25JBqw5H)Yb}BP02NXSgTE|%-r7emj&%B6gScz z32;LJsN5%Q7HT(yCYDfWipokK(EZMzgW#%(3(a(?TVB^Cj_$`yzFF-}AK$IRwquW# z@DV%wewzH2D;u3mx43fmtXLViSj9us=PR?(+1fs8L1S-?=}r6EgHJ-U?}lp+ZQafc zgfR>OU)QN~xbS6N&hS8~g-?SWk5bY}P?GoeP1-yvG5GyTYxK~Hf3NdCM#o;9RtHa@ z7^L(Bh!?xbsvq)1pk3?&rIzJ!`0l&c&U^X-kLYE6v-v^qd+O31-oc|Irjb z1>G!@>&M&x1{bNKd6$1+IE|cfdusf?fnWr>U1fwoP#xo9$%ZTqm^NO^*1ODen5QMI zWnB^&)VsPt;f)d!!@A`+m)E_&74Me0#V=K)yZDq3U3)L#Q0EW0hCY>j^g-pmszP)v z43$=e@Wr0JOd^%@%a!7BKQ{;WYXO1_BzK7_`p@+n2778bKBelsJ#n`i8187^z3S6= z|JysNCY%EaC9mgQ57I5}>*zDOi|VzFa(`sBtmA6}_`(mAgV-fBgwFrxZ(FI7>m z9IuL&j%|XkcQ%E$al)b5=5P`z2-OiLZN{4!+x)_N9hwO91lhy&Nq^364|^o5@+fT6 zhixPENx^}wux;vYxMx~LCMyUxRootbjwP^ox@c+1@5}xo-O6U>e+n<}z~@9o8O8p! zv}bze%K3oO;hH#h_oh?dO6Z%=l}89o$!A&byATc`C!-|NLj<7<~mu`$h`?ZL5U(AS>k-A39- zCS87h2!5U--L;QwIp4P%?n@$e0iT!J3_FIt^mI9$MLRacHI#DYzJJ`e{^v^{+mK3beO6;cRpmX}U{q*v zQ2*ld`zpP3)CRE}0@iGnhj>Q6c=ZV_c`bjEl!=>DF~zR?Fe_GPu*hD!P- zeCoQTbabHcGPPmbC;(K`n021ex8o5?X5V$1mnM6B)~e4G=`yxk;!gk%lb*z1YU6f& zv4&pq{}(Bp6YM}hQn;=W#^Z7NrxxSo)1R)yHk+$~R8tl3x}BJ`5xBc?HGN2T-u({l z2SFDBPe}~TACNobuPe87JVeu~{;1peaBMR_hzsDpMwp$DLCiM9jJ~GV_kFz||Gz|m zU?N_Yt-{@glP(;Lbmbn78C_+KTAG<)g+N>$|FHLi&rMbX#shO9H9m1u%x+mYSFlek zmc>QYB-^=XT}ZgTRX=)C3#1P64+kH4HW)Rv5zx!%@_LLQ@7KUA#T1Wydg9jmZ}32G ze)Q2lp3QLn!;83XljTu3RpNNf^?FxzpCDL}cqN3E#? z2cj6!)32!E4D`Z2wwT=J3tu?5Sre5u( zM-Qd=H~ta;Qf-l%31H04N#xcZ`M*O!guX^d4^9k^-5ryeshn&$6<1@_f+Gau6GOHd zxpB{b2=xbrjg`0S{B~2YFrFwKUEnN}89=W!;y=F-eyF=^!-4bY z#?O&9QONhsEb_h>Ya-Fo*3s;eNEVseGb#^*Q8@N41xNwPK zdRgx)MTh7-OwKr#`H^a@wkM)`BW8oo#2j~eVS2QFJF;rLWw3V6b(R)6 zxIIC*NF7Cl{fS>I{vAI3;+^naTP9j>GM|T(04~L4u0)-zKpWyLz6Mmwv zS%w*aDZx_d5KgJ%C9k`{#qbn3l8^MLEGy4@*PlGeK~!vCUMKB>h)_9Lkhy=g5BqU^O-04DaLDDO!ob?nBGzmghC9xI zc70V}%QS|5N(86tBouJWe4_FkM!luXqcip8%XV6y+VXVBvQLp9x;4!*VQ^fR(T040 zGc6?S-V-+IvyG!fP5qZ_&agFkKbe?G2}9vglW&(R;S{*F*rCLYVmk0e!DOWR;UvaE zQi#;c*+zQcIjV(a7FzsCRuMP*)1g-C{de6*!vbhasyl`lr%H*vo(6PwjMw*k3#Pr7)Bj##(H%OS=v__yQfxmqYs`IXoon|J1H1sFOnUL_qwkPGrf$T|bUa&gmM z!GcC}=~`KAcY6>3c|zTianrd6nd`em?iaB0Z0E2r;E22%LWg+;DTkpi#}fxuXTD#! z?7HP+k%T+@Yjs3u?)%Pq$^SuigAbf7@*9+P$Q5q*BTf8XC4+vIYSfNzkF~N59NiUi zrkY7h{+Cmh{F_`VU?{@2SWIaPf?;Qu$@RuM!-ZrmKPr_*Qb3@)+Qh6M3F88bUyn~8 zPrSo&v30B7e^9XLKpi-%Wmo#@*rgnkN^g0G>}#2MzQeZ#dFHdbO5B5!v6K28Zb7oZGe3QM z&tOp_cowv&%dJ6WFO|USb4H!B8JBW~qkU#Fi1elL*@+C5(-r0)><$GW7QhNrc4ha> z^GSw5Gpc9PKj*-Km(vbBM6P1_zi=r$Al>OOkU;uG9IjK~{;pkTxR1T40z>DinCsW| zYG2$qmXUxhzk8b+%UPEI2i17Fw`%f9#pA@-K5p4AI zq2C~ZLV^qNv>gtDkp?(&)mR1)Rd&mC zBeBo!EmhFjHTy<(*MS=45A17S#rc(hoN_&kETYV(Ln z@IRJekI93f&ObFg{f1Kml`;LTYGJ$QN91KxbD4U03Tc!Zryz;QD|w`@KliBa{K;;E z`MA65wLJYc7`^gH15R`oy{Z6A%_#a>-F@FT#)g&MWUs`JynFa z-QcIL7+m4h9neLYvU$Yez$y+5Om6V*>hyfXeP;DjK*LesD~_P;u~PD>R-d(_Hk$Hw za)p`eO}9Rj0kJ7szK#4DFy-ncEPS)^@Y>Rk)QZP*FbkN#o7*Ox4Y-nsq)$WW>Lur* zRZ!J8!Ccx1iP6RtY4y=PnJasMo@*9wp*RfDDf=E|!GL<++;-rCx!ZnOu)B059cE0k z14M8AxyNF|XZk+ym-Pg0l2acxuuQK6s9#^d3uVVfV%JYVzQNm+S#I<4_lX9i9fn>SAX{G(K*v#Ta;{YWtr*t756B;i;TVN0;|Gi4>YQyZBNt^T0Ca-3!#0ea zJ?AAC?AytGtmfe)S;ELPq9kjkim}@QM zwF)RYg32jDpcg;oL*-C^YRqVQJqAV=T_B=sIpm@k!uot1_^Jzw-JELk#-^@(`RVM% z4NmVV2NH-n7`?(>iKGunL%3{16HuOFSpc)v1D>e+;=ltxEI3U6x@IK~qVV;sn0b?) z^gROLMRpJrqlsi{=lX<2C~7N%e!)7P&NEr`3#pais0uaEuXPi=GfVh4(&98Rr;QAT>=E`V?nDAZWFdSbqgz;B}~8{K!8GJ{(f5|=DQsrMsPz7 z=Z(6^Zwe?{8e^SfMD7ca!q&JU~huI zLVlwn+~!{9sk07KgI|AHZmS2reX>kEgu3B=3RkjsWk>_oD%@R6g!xIkXbe60W_kBq z>9$5eDjNrLePVTdZai`t$So-nHr{1=qt4k!09@Qx4qd7wCu131hsXV@v41wwN{6uY z7xf7@oB>Yxeo}1BY^F8@*8_Is9@Kk_JZ*6qM0O&(dNv6FLtER4mn!0>$NRmiI~6xS zXCf2ilmU6yHppRhYU1V6SX2RViuQsHBeSJ5_h9@UnK0}Ka6FW+WF=wgFNtxmbVO-a zm1Q;gXdq{Wz*;3HQ7>BNIRRWj+d8?4bi-N6 zYpXPt-oGD7zd-The1@559s2m+^JWM*MBlmOf08qu%iQ{#?@fWigl`L)+VeVfI6Um=^D{@dv9_`K-jp zi;yys4$Eu~dVHRof9xD@Zm|q2Z|HGC7B8{^*o{miK5`WIL1|)HwaHkW!yfd%PkjDt zZJer(ey|_wgW0X~k1~_;0Hr|in8;puJhrU?>Q{w@L$LPc|6d67|Eh%~fTaUKJ6TG@ z(jgQAmJS6RLXe{nphgm!NP=ZdzcjR98IhtV{PsAG?+=xPt)f$OVQCV+L(wdB0{sXv z>;%xFbr%+OHK689fZN4XW0wenjcwu6!)4v{R5mZHm1?o)B>s!uSfXM{^l(jBNF~GI zBu~mdsfU`g0nYOMNw%L680G~y%=^=98hKW6Umf%Z>64}gj;+EK2R7znAK|qK0IbNs zRg*Yvpf96W0Ez7ZL}yW18QkJO6Ij{R`W*L767*|$KEY#6t2Qb%%fSFws0ln+SWE~Q z9_120g_9Ex)qo9EON*#oavSc*Q#hNzQdt0I>slufWYtObr=LD=^8s%EPR6>TsKZvY zsRRIpb+E3^SrDYdzeSw6&)EUAtXIKndNNnwonpz*_w;ZbScMi=3MPycSAk*8=0}bI?HPo`bKYrTf0{!| zb)Z<09Fz$9E#C(-9$uP8q61^JCN^J3ynuU4U!+CE7h!Ft1kuM&!uf<<$um-umOHR( z<=mWX5PI7?ekbyG>#S{d#hSNupmx7H@V66eKTZrkD6MN_;Y z07`zYK3@4K0D&_57td!d+~3{%>p5l60!#`s5U=*s^CQRx+d9VUO>61pZxAj!f&~uy zkn^9K05E;3c}+3IZ&~cV8#p3T0mujVC#Q;qK1kn3Z_}S$h_E9zu z?mr~}#M(UBZ)mk|x?KpiFU;ZRvYPN%jy0B7;YNGI&ZUBW&B*IF;bIWv3k#^yWPF@t z34I#p;hpr|=@6dX<2OLc{Q5!$^8Nf5lSnr=VcyV$&>OHKG=W8UT4;+s^yb(+g6wUp zbQgc;lS?QpFEwVKT%J$*XnPpE=tx#2EW!u+@74G}FDhR9e4%n#Q}wacTS!Itn1SQA MPKRGv``-Nj0BKY4zyJUM diff --git a/packages/admin-sandbox/admin/components/AddContent.tsx b/packages/admin-sandbox/admin/components/AddContent.tsx deleted file mode 100644 index 7446b4d971..0000000000 --- a/packages/admin-sandbox/admin/components/AddContent.tsx +++ /dev/null @@ -1,66 +0,0 @@ -import { Button, Component, Field, HasMany, HasOne, useEntity } from '@contember/admin' -import { useCallback } from 'react' - -interface AddContentProps { - field: string -} - -export const AddContent = Component( - ({ field }) => { - const content = useEntity(field) - - const addContent = useCallback(() => { - const maxOrder = Array.from(content.getEntityList('blocks')).map(it => it.getField('order').value ?? 0).reduce((a, b) => Math.max(a, b), -1) - content.getEntityList('blocks').createNewEntity(getAccessor => { - getAccessor().getField('json').updateValue(JSON.stringify({ 'formatVersion': 1, 'children': [{ 'type': 'paragraph', 'children': [{ 'text': 'Hi!' }] }] })) - getAccessor().getField('order').updateValue(maxOrder + 1) - }) - }, [content]) - - const addQuote = useCallback(() => { - const maxOrder = Array.from(content.getEntityList('blocks')).map(it => it.getField('order').value ?? 0).reduce((a, b) => Math.max(a, b), -1) - content.getEntityList('blocks').createNewEntity(getAccessor => { - let refId: string|null = null - getAccessor().getEntityList('references').createNewEntity(getAccessor => { - getAccessor().getField('id').asUuid.setToUuid() - refId = getAccessor().getField('id').value! - getAccessor().getField('type').updateValue('quote') - getAccessor().getField('primaryText').updateValue('A') - getAccessor().getField('secondaryText').updateValue('B') - }) - getAccessor().getField('json').updateValue(JSON.stringify({ 'formatVersion': 1, 'children': [{ 'type': 'reference', 'children': [{ 'text': 'Quote!' }], 'referenceId': refId }] })) - getAccessor().getField('order').updateValue(maxOrder + 1) - }) - }, [content]) - - return ( - <> -
- JSON ({content.getEntityList('blocks').length} children) - - -

:

-
-
-
- - - - - ) - }, - ({ field }) => ( - - - - - - ), - 'AddContent', -) - - diff --git a/packages/admin-sandbox/admin/components/AlertLogoutLink.tsx b/packages/admin-sandbox/admin/components/AlertLogoutLink.tsx deleted file mode 100644 index 6261e08cc2..0000000000 --- a/packages/admin-sandbox/admin/components/AlertLogoutLink.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { LogoutLinkInnerProps } from '@contember/admin' -import { useCallback } from 'react' - -export function AlertLogoutLink({ children, onClick, ...rest }: LogoutLinkInnerProps) { - return ( - { - if (confirm('Do you really want to logout?')) { - onClick?.() - } - }, [onClick])}> - {children} - - ) -} diff --git a/packages/admin-sandbox/admin/components/AnchorInsertHandler.ts b/packages/admin-sandbox/admin/components/AnchorInsertHandler.ts deleted file mode 100644 index 70dd41a114..0000000000 --- a/packages/admin-sandbox/admin/components/AnchorInsertHandler.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { EditorTransforms, EditorWithBlocks, EntityAccessor } from '@contember/admin' - -export const withAnchorsAsReference = (editor: EditorWithBlocks, { elementType, referenceType = elementType, updateReference }: { - elementType: string, - updateReference: (url: string, getAccessor: () => EntityAccessor) => void - referenceType?: string, -}) => { - const { normalizeNode } = editor - editor.normalizeNode = ([element, path]) => { - if ('type' in element && element.type === 'anchor' && 'href' in element && typeof element.href === 'string') { - const referenceId = editor.createElementReference(path, referenceType, getAccessor => { - updateReference(element.href as string, getAccessor) - }).id - return EditorTransforms.setNodes(editor, { referenceId, href: null, type: elementType }, { at: path }) - } - normalizeNode([element, path]) - } -} diff --git a/packages/admin-sandbox/admin/components/AppHeaderTitle.tsx b/packages/admin-sandbox/admin/components/AppHeaderTitle.tsx deleted file mode 100644 index e16953d83e..0000000000 --- a/packages/admin-sandbox/admin/components/AppHeaderTitle.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { Slots } from '@contember/layout' -import { useClassName } from '@contember/react-utils' -import { forwardRef, memo } from 'react' -import ContentLoader from 'react-content-loader' - -const Fallback = memo(() => ( - - - -)) -Fallback.displayName = 'AppHeaderTitle.Fallback' - -const Root = memo(forwardRef((props, forwardRef) => ( -

-))) -Root.displayName = 'AppHeaderTitle' - -export const AppHeaderTitle = Object.assign(Root, { Fallback }) diff --git a/packages/admin-sandbox/admin/components/CategoryForm.tsx b/packages/admin-sandbox/admin/components/CategoryForm.tsx deleted file mode 100644 index cb65eb1bd2..0000000000 --- a/packages/admin-sandbox/admin/components/CategoryForm.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { Component, Repeater, SelectField, TextField } from '@contember/admin' - -const categoriesLocalesContainerProps = { gap: false } - -export const CategoryForm = Component(() => <> - - - } /> - - -) diff --git a/packages/admin-sandbox/admin/components/Constants.ts b/packages/admin-sandbox/admin/components/Constants.ts deleted file mode 100644 index dda4b280b8..0000000000 --- a/packages/admin-sandbox/admin/components/Constants.ts +++ /dev/null @@ -1 +0,0 @@ -export const LAYOUT_BREAKPOINT = 768 diff --git a/packages/admin-sandbox/admin/components/ContentField.tsx b/packages/admin-sandbox/admin/components/ContentField.tsx deleted file mode 100644 index a8f8999ddb..0000000000 --- a/packages/admin-sandbox/admin/components/ContentField.tsx +++ /dev/null @@ -1,154 +0,0 @@ -import { - Block, - BlockEditor, - BlockEditorProps, - Component, - horizontalRuleToolbarButton, - ImageUploadField, MultiSelectField, - paragraphNumberedToolbarButton, - paragraphToolbarButton, - RadioField, - RichEditor, - Scheme, - scrollTargetToolbarButton, - SelectField, - tableToolbarButton, - TextField, -} from '@contember/admin' -import { withAnchorsAsReference } from './AnchorInsertHandler' -import { InsertLink, LinkElement } from './customLinks' - - -const RB = RichEditor.buttons -export const fullEditorInlineButtons: BlockEditorProps['inlineButtons'] = [ - [RB.bold, RB.italic, RB.highlight, RB.underline, RB.anchor], - [RB.headingOne, RB.headingTwo, RB.headingThree, RB.headingFour, RB.unorderedList, RB.orderedList], - [RB.alignStart, RB.alignCenter, RB.alignEnd, RB.alignJustify], - [RB.strikeThrough, RB.code], - [ - { - discriminateBy: 'link', - referenceContent: InsertLink, - label: 'Insert link', - title: 'Insert link', - blueprintIcon: 'link', - }, - ], -] - -export interface ContentFieldProps { - field: string - toolbarScheme?: Scheme -} - -export const ContentField = Component( - ({ field, toolbarScheme }) => ( - { - - withAnchorsAsReference( - editor, - { - elementType: 'link', - updateReference: (url, getAccessor) => { - getAccessor().getField('link.type').updateValue('external') - getAccessor().getField('link.externalLink').updateValue(url) - }, - }, - ) - - editor.registerElement({ - type: 'link', - isInline: true, - render: LinkElement, - }) - }} - leadingFieldBackedElements={[ - { - element: , - }, - { - field: 'lead', - placeholder: 'Lead', - format: 'richText', - distinction: 'seamless-with-padding', - }, - ]} - trailingFieldBackedElements={[ - { - field: 'footer', - placeholder: 'Footer', - format: 'richText', - distinction: 'seamless-with-padding', - }, - ]} - referencesField="references" - referenceDiscriminationField="type" - field={`${field}.blocks`} - inlineButtons={fullEditorInlineButtons} - label="Content" - contentField="json" - sortableBy="order" - blockButtons={[ - { - blueprintIcon: 'media', - discriminateBy: 'image', - title: 'Image', - }, - { - blueprintIcon: 'citation', - discriminateBy: 'quote', - title: 'Quote', - }, - tableToolbarButton, - scrollTargetToolbarButton, - paragraphToolbarButton, - paragraphNumberedToolbarButton, - horizontalRuleToolbarButton, - ]} - toolbarScheme={toolbarScheme} - > - - }> - - - - - - - - - - - - - ), - 'ContentField', -) diff --git a/packages/admin-sandbox/admin/components/DataGridTile.tsx b/packages/admin-sandbox/admin/components/DataGridTile.tsx deleted file mode 100644 index b232112bff..0000000000 --- a/packages/admin-sandbox/admin/components/DataGridTile.tsx +++ /dev/null @@ -1,68 +0,0 @@ -import { - Card, - Component, - EntityAccessor, - EntityId, - Field, - Link, - LinkCard, - LinkCardProps, - LinkProps, - useEntity, -} from '@contember/admin' -import { useCallback, useMemo } from 'react' - -type DataGridTileProps = - & Omit - & Partial> - & { - thumbnailField?: string - titleField?: string - onClick?: (entity: EntityAccessor) => void - selectedEntityIds?: EntityId[] - } - -export const DataGridTile = Component((props: DataGridTileProps) => { - const entityAccessor = useEntity() - - const src = props.thumbnailField ? entityAccessor.getField(props.thumbnailField).value : null - const title = props.titleField ? entityAccessor.getField(props.titleField).value : props.children - const active = useMemo(() => props.selectedEntityIds?.includes(entityAccessor.id), [entityAccessor.id, props.selectedEntityIds]) - const componentProps = useMemo(() => ({ active, src }), [active, src]) - - const { - onClick, - thumbnailField, - titleField, - to, - ...rest - } = props - - const onEntityClick = useCallback(() => { - onClick?.(entityAccessor) - }, [entityAccessor, onClick]) - - return to - ? - : -}, ({ - thumbnailField, - titleField, -}) => <> - {thumbnailField && } - {titleField && } -, -) -DataGridTile.displayName = 'DataGridTile' diff --git a/packages/admin-sandbox/admin/components/Directives.tsx b/packages/admin-sandbox/admin/components/Directives.tsx deleted file mode 100644 index f74f957302..0000000000 --- a/packages/admin-sandbox/admin/components/Directives.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import { Directives } from '@contember/layout' -import { Intent } from '@contember/ui' -import { LAYOUT_BREAKPOINT } from './Constants' -import { LayoutType } from './LayoutComponent' - -export type DirectivesType = { - // TODO: - // 'brand-background-color': string | undefined; - // 'brand-text-color': string | undefined; - 'content-max-width': number | false | null | undefined; - 'layout': LayoutType | undefined; - 'layout.theme-content': Intent | null | undefined; - 'layout.theme-controls': Intent | null | undefined; - 'safe-area-insets': number | undefined; -} - -export const initialDirectives: DirectivesType = Object.freeze({ - // 'brand-background-color': undefined, - // 'brand-text-color': undefined, - 'content-max-width': LAYOUT_BREAKPOINT, - 'layout': 'default', - 'layout.theme-content': 'default', - 'layout.theme-controls': 'accent', - 'safe-area-insets': 20, -}) - -// Local export with current DirectivesType specific to the project -export const Directive = Directives.Directive as unknown as Directives.DirectiveComponentType - -// Local export with current DirectivesType specific to the project -export const useDirectives = Directives.useDirectives diff --git a/packages/admin-sandbox/admin/components/EditOrCreateForm.tsx b/packages/admin-sandbox/admin/components/EditOrCreateForm.tsx deleted file mode 100644 index 8fccbe9965..0000000000 --- a/packages/admin-sandbox/admin/components/EditOrCreateForm.tsx +++ /dev/null @@ -1,116 +0,0 @@ -import { - Component, - Field, - HasMany, - If, - ImageUploadField, - MultiSelectField, - PersistButton, - RichTextField, - SelectField, - SlugField, - TextField, -} from '@contember/admin' -import { SlotSources } from '../components/Slots' -import { CategoryForm } from './CategoryForm' - -const ArticleForm = Component(() => <> - - - - - - - - - - -, - 'ArticleForm', -) - -export const stateOptions = { - draft: 'Draft', - published: 'Published', - removed: 'Removed', -} - -const ArticleSidebarForm = Component(() => <> - ({ value, label }))} allowNull /> - {/*}*/} - {/*/>*/} - - } - - connectingEntityField={'tag'} - sortableBy={'order'} - lazy - /> - - } - searchByFields={'name'} - options={{ - entities: 'Category', - orderBy: 'name desc', - }} - optionLabel={} - lazy - /> -, - 'ArticleSidebarForm', -) - -const CategoryOptionItem = Component(() => { - return <> - , locales: - - - - -}) - -export const EditOrCreateForm = Component(() => ( - <> - - - - - - - -), 'EditOrCreateForm') diff --git a/packages/admin-sandbox/admin/components/FocalPoint.css b/packages/admin-sandbox/admin/components/FocalPoint.css deleted file mode 100644 index e29c80ad8d..0000000000 --- a/packages/admin-sandbox/admin/components/FocalPoint.css +++ /dev/null @@ -1,50 +0,0 @@ -:where(.cui-focal-point-marker) { - position: absolute; - cursor: default; - width: 8px; - height: 8px; - border-radius: 50%; - transform: translate(-50%, -50%); -} - -:where(.cui-focal-point-editor) { - width: calc(min(90vw, 90dvw) - 2 * var(--cui-padding)); - height: calc(min(90vh, 90dvh) - 2 * var(--cui-padding)); - min-height: 0px; -} -:where(.cui-focal-point-editor-body) { - flex: 1; - min-height: 0px; -} -:where(.cui-focal-point-editor-previews) { - max-width: fit-content; -} - -:where(.cui-focal-point-editor-photo) { - flex: 1 1 0%; -} -:where(.cui-focal-point-editor-photo-img-wrapper) { - display: flex; - position: relative; - max-width: 100%; - max-height: 100%; -} - -:where(.cui-focal-point-editor-photo-img-wrapper[data-photo-orientation="landscape"]) { - padding-top: var(--min-size); -} - -:where(.cui-focal-point-editor-photo img) { - cursor: crosshair; - display: block; - object-fit: contain; -} - -:where(.cui-focal-point-photo-holder) { - align-items: center; - background-color: rgba(0, 0, 0, 0.1); - border-radius: var(--cui-border-radius); - display: flex; - justify-content: center; - overflow: hidden; -} diff --git a/packages/admin-sandbox/admin/components/FocalPoint.tsx b/packages/admin-sandbox/admin/components/FocalPoint.tsx deleted file mode 100644 index 87ccb37546..0000000000 --- a/packages/admin-sandbox/admin/components/FocalPoint.tsx +++ /dev/null @@ -1,189 +0,0 @@ -import { - AccessorTree, - Box, - Button, - Component, - Description, - Entity, - Field, - Heading, - Radio, - Spacer, - Stack, - SugarableRelativeSingleField, - Text, - useAccessorTreeState, - useDialog, - useEntity, - useField, -} from '@contember/admin' -import { ResponsiveStack } from '@contember/layout' -import { useClassName, useElementSize } from '@contember/react-utils' -import { px } from '@contember/utilities' -import { CSSProperties, Fragment, useCallback, useMemo, useRef, useState } from 'react' -import './FocalPoint.css' - -type PointConfig = { - xField: string | SugarableRelativeSingleField - yField: string | SugarableRelativeSingleField - label?: string - color?: CSSProperties['background'] - size?: CSSProperties['width'] - -} - -type PreviewConfig = { - width: number - height: number - label?: string - pointPriority?: number[] -} - -interface FocalPointEditorProps { - urlField: string | SugarableRelativeSingleField - points: PointConfig[] - previews?: PreviewConfig[] -} - -const colors = ['red', 'green', 'blue', 'orange'] -const FocalPointMarker = ({ point, index }: { - point: PointConfig, - index: number -}) => { - const xField = useField(point.xField).value - const yField = useField(point.yField).value - const color = point.color ?? colors[index % colors.length] - const className = useClassName('focal-point-marker') - - if (xField === null || yField === null) { - return null - } - - return ( -
- ) -} - -const ImagePreview = ({ url, focalPoint, preview }: { url: string, focalPoint?: [number, number], preview: PreviewConfig }) => { - - return ( - - {preview.label} -
-
-
- - ) -} - - -const FocalPointEditor = Component(({ points, urlField, previews }) => { - const entity = useEntity() - const [activePoint, setActivePoint] = useState(0) - const urlFieldAccessor = useField(urlField) - const url = urlFieldAccessor.value - - const handleClick = useCallback((e: React.MouseEvent) => { - const point = points[activePoint] - const x = e.nativeEvent.offsetX / e.currentTarget.offsetWidth - const y = e.nativeEvent.offsetY / e.currentTarget.offsetHeight - entity.getField(point.xField).updateValue(x) - entity.getField(point.yField).updateValue(y) - }, [activePoint, entity, points]) - - const resolvedFocalPoints = useMemo(() => points.map((it): [number, number] | undefined => { - const xField = entity.getField(it.xField).value - const yField = entity.getField(it.yField).value - return xField !== null && yField !== null ? [xField, yField] : undefined - }), [entity, points]) - - const radioOptions = points.map((it, index) => ({ - label: it.label ?? `Point #${index + 1}`, - value: String(index), - })) - - if (!url) { - return null - } - - - return <> - width > 768 ? true : false} - className={useClassName('focal-point-editor')} - > - - {points.length > 1 && ( - setActivePoint(parseInt(it, 10))} - /> - )} -
-
- - {points.map((it, index) => )} -
-
-
- width > 768 ? false : true} - className={useClassName('focal-point-editor-previews')} - wrap={width => width > 768 ? false : true} - > - {previews?.map((it, index) => { - let resolvedPoint: [number, number] | undefined = undefined - for (const point of it.pointPriority ?? [0]) { - resolvedPoint = resolvedFocalPoints[point] ?? undefined - if (resolvedPoint !== undefined) { - break - } - } - return - })} - -
- -}, props => { - return <>{props.points.map((it, i) => ( - - - ))} -}) - -export const FocalPointDialogOpener = Component(props => { - const dialog = useDialog() - const entity = useEntity() - const accessorTreeState = useAccessorTreeState() - const openDialog = useCallback(async () => { - await dialog.openDialog({ - footer: ({ resolve }) => <>, - content: () => { - return ( - - - - ) - }, - }) - }, [accessorTreeState, dialog, entity, props]) - - return -}, props => ) diff --git a/packages/admin-sandbox/admin/components/HorizontalMenu/HorizontalMenu.css b/packages/admin-sandbox/admin/components/HorizontalMenu/HorizontalMenu.css deleted file mode 100644 index 5ceb9c6822..0000000000 --- a/packages/admin-sandbox/admin/components/HorizontalMenu/HorizontalMenu.css +++ /dev/null @@ -1,89 +0,0 @@ -:where(.cui-horizontal-menu) { - --cui-horizontal-menu--icons-scale: var(--cui-scale, 1); - min-width: 0px; - max-width: 100%; -} - -:where(.cui-horizontal-menu-item) { - align-items: stretch; - display: flex; - flex-direction: column; - position: relative; -} - -:where(.cui-horizontal-menu .cui-button) { - --cui-button--color-rgb: var(--cui-color--strong-rgb-50); -} -:where(.cui-horizontal-menu .cui-label) { - white-space: nowrap; -} - -:where(.cui-horizontal-menu > .cui-button > .cui-button-content) { - flex-direction: column; - overflow: hidden; -} -:where(.cui-horizontal-menu .cui-collapsible) { - align-items: start; - display: flex; - flex-direction: column; -} -:where(.cui-horizontal-menu .cui-collapsible .cui-collapsible), -:where(.cui-horizontal-menu:not([data-direction="horizontal"]) .cui-collapsible) { - position: static; -} - -:where(.cui-horizontal-menu[data-direction="horizontal"] .cui-horizontal-menu-item > .cui-collapsible) { - position: absolute; - top: 100%; - left: 0px; - right: 0px; - max-height: 90vh; - overflow-y: auto; - background-color: rgb(var(--cui-background-color--rgb-50)); - border-radius: var(--cui-border-radius); - border-color: rgba(var(--cui-color--rgb-50), var(--cui-opacity--low)); - border-style: solid; - border-width: var(--cui-border-width); - min-width: min-content; - max-width: min(100vw, 100dvw); -} - -:where(.cui-horizontal-menu[data-items-size-evenly] > .cui-button) { - flex: 1; - min-width: min-content; -} - -:where(.cui-horizontal-menu[data-items-content-horizontal] > .cui-button > .cui-button-content) { - flex-direction: row; -} - -:where(.cui-horizontal-menu-item .lucide) { - --cui-scale: var(--cui-horizontal-menu--icons-scale); -} - -:where(.cui-horizontal-menu svg.more-toggle-icon) { - --cui-scale: 1; - margin-left: auto; - transition-property: transform; - transition-duration: var(--cui-transition-duration); - transition-timing-function: ease-in-out; -} - -:where(.cui-horizontal-menu .cui-menu-expand-toggle) { - right: auto; - left: calc( - 100% - (1.5 * var(--cui-menu-expand-toggle--size)) - ); -} - -:where(.cui-horizontal-menu:not([data-direction="horizontal"]) .cui-horizontal-menu-item > .cui-collapsible) { - padding-left: calc(var(--cui-horizontal-menu--icons-scale) * 1em + var(--cui-gap)); -} - -:where(.cui-horizontal-menu:not([data-direction="horizontal"]) .cui-collapsible-content) { - border-width: 0px; -} - -:where(.cui-horizontal-menu:not([data-direction="horizontal"]) .cui-collapsible[aria-expanded="true"]) { - margin-bottom: var(--cui-gutter); -} diff --git a/packages/admin-sandbox/admin/components/HorizontalMenu/HorizontalMenu.tsx b/packages/admin-sandbox/admin/components/HorizontalMenu/HorizontalMenu.tsx deleted file mode 100644 index 9f130b0870..0000000000 --- a/packages/admin-sandbox/admin/components/HorizontalMenu/HorizontalMenu.tsx +++ /dev/null @@ -1,85 +0,0 @@ -import { useClassName, useComposeRef } from '@contember/react-utils' -import { Stack } from '@contember/ui' -import { stateDataAttributes } from '@contember/utilities' -import { forwardRef, memo, useLayoutEffect, useMemo, useRef, useState } from 'react' -import { HorizontalMenuItem } from './HorizontalMenuItem' -import { HorizontalMenuContext, defaultHorizontalMenuProps, useHorizontalMenuContext } from './contexts' -import { HorizontalMenuContainerProps } from './types' - -const HorizontalMenuContainer = memo(forwardRef((props, forwardedRef) => { - const horizontalMenuContext = useHorizontalMenuContext() - const innerRef = useRef(null) - const composeRef = useComposeRef(forwardedRef, innerRef) - - const [isInModal, setIsInModal] = useState(false) - - useLayoutEffect(() => { - if (innerRef.current) { - setIsInModal(isInModalPanel(innerRef.current)) - } - }, []) - - const mergedProps = { - ...defaultHorizontalMenuProps, - ...horizontalMenuContext, - ...(isInModal ? { horizontal: false, hover: false } : undefined), - ...props, - } - - const { - children, - className, - componentClassName, - horizontal, - itemsContentHorizontal, - itemsIconsScale, - itemsSizeEvenly, - compact, - style, - hover, - ...rest - } = mergedProps - - return ( - - ({ - ...style, - '--cui-horizontal-menu--icons-scale': itemsIconsScale, - }), [itemsIconsScale, style])} - {...rest} - > - {children} - - - ) -})) -HorizontalMenuContainer.displayName = 'Menu' - -export const Menu = Object.assign(HorizontalMenuContainer, { - Item: HorizontalMenuItem, -}) - - -function isInModalPanel(element: HTMLDivElement): boolean { - let parent: HTMLElement | null = element.parentElement - - while (parent !== null) { - if (parent.classList.contains('cui-layout-panel')) { - if (parent.dataset['behavior'] === 'modal') { - return true - } else { - return false - } - } - - parent = parent.parentElement - } - - return false -} diff --git a/packages/admin-sandbox/admin/components/HorizontalMenu/HorizontalMenuContainer.tsx b/packages/admin-sandbox/admin/components/HorizontalMenu/HorizontalMenuContainer.tsx deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/admin-sandbox/admin/components/HorizontalMenu/HorizontalMenuItem.tsx b/packages/admin-sandbox/admin/components/HorizontalMenu/HorizontalMenuItem.tsx deleted file mode 100644 index 580383df85..0000000000 --- a/packages/admin-sandbox/admin/components/HorizontalMenu/HorizontalMenuItem.tsx +++ /dev/null @@ -1,128 +0,0 @@ -import { LinkButton, LinkButtonProps, LinkProps } from '@contember/admin' -import { useClassName, useOnElementClickOutsideCallback, useOnElementMouseEnterDelayedCallback, useReferentiallyStableCallback } from '@contember/react-utils' -import { Button, Collapsible, Stack, Text } from '@contember/ui' -import { dataAttribute } from '@contember/utilities' -import { ChevronDownIcon } from 'lucide-react' -import { memo, useCallback, useEffect, useRef, useState } from 'react' -import { useHorizontalMenuContext } from './contexts' -import { HorizontalMenuItemProps } from './types' - -export const HorizontalMenuItem = memo(({ icon, className: classNameProp, componentClassName = 'horizontal-menu-item', title, ...props }: HorizontalMenuItemProps) => { - const { - horizontal, - hover, - } = useHorizontalMenuContext() - - const [expanded, setExpanded] = useState(horizontal ? false : true) - const mouseEnterTimeStampRef = useRef | undefined>(undefined) - - const handleButtonClick = useCallback(() => { - if (mouseEnterTimeStampRef.current && Date.now() < mouseEnterTimeStampRef.current) { - return - } else { - setExpanded(expanded => !expanded) - mouseEnterTimeStampRef.current = undefined - } - }, []) - const className = useClassName(componentClassName, classNameProp) - const submenuRef = useRef(null) - - useOnElementClickOutsideCallback(submenuRef, useCallback(() => { - if (hover) { - setExpanded(false) - } - }, [hover])) - - const closeTimeout = useRef | undefined>(undefined) - - useEffect(() => { - return () => clearTimeout(closeTimeout.current) - }, []) - - useOnElementMouseEnterDelayedCallback(submenuRef, useReferentiallyStableCallback(event => { - clearTimeout(closeTimeout.current) - }), 0) - - useOnElementMouseEnterDelayedCallback(submenuRef, useReferentiallyStableCallback(event => { - if (hover && event.type === 'mouseenter') { - mouseEnterTimeStampRef.current = Date.now() + 300 - setExpanded(true) - } - })) - - const onMouseLeave = useReferentiallyStableCallback(() => { - if (hover) { - closeTimeout.current = setTimeout(() => { - setExpanded(false) - }, 300) - } - }) - - if (props.to) { - if ('buttonProps' in props) { - throw new Error('HorizontalMenuItem: `buttonProps` are not supported when `to` is set') - } - if ('children' in props) { - throw new Error('HorizontalMenuItem: `children` are not supported when `to` is set. Move `to` prop onto children `` instead.`') - } - - return ( - - <> - {icon} - {title && {title}} - - - ) - } else { - if ('to' in props) { - throw new Error('HorizontalMenuItem: `to` is not supported when `buttonProps` are set') - } - - return ( -
- - -
- ) - } -}) -HorizontalMenuItem.displayName = 'Item' - -const defaultLinkProps: Omit = { - distinction: 'seamless', - inset: false, - padding: true, -} diff --git a/packages/admin-sandbox/admin/components/HorizontalMenu/contexts.ts b/packages/admin-sandbox/admin/components/HorizontalMenu/contexts.ts deleted file mode 100644 index a277148b83..0000000000 --- a/packages/admin-sandbox/admin/components/HorizontalMenu/contexts.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { createContext } from '@contember/react-utils' -import { HorizontalMenuContainerProps } from './types' - -export const defaultHorizontalMenuProps = { - componentClassName: 'horizontal-menu', - horizontal: true, - hover: true, - itemsContentHorizontal: true, - itemsIconsScale: 1.25, - itemsSizeEvenly: false, -} - -export const [HorizontalMenuContext, useHorizontalMenuContext] = createContext('HorizontalMenuContainer', defaultHorizontalMenuProps) diff --git a/packages/admin-sandbox/admin/components/HorizontalMenu/index.ts b/packages/admin-sandbox/admin/components/HorizontalMenu/index.ts deleted file mode 100644 index 2e20dc17ae..0000000000 --- a/packages/admin-sandbox/admin/components/HorizontalMenu/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './HorizontalMenu' diff --git a/packages/admin-sandbox/admin/components/HorizontalMenu/types.ts b/packages/admin-sandbox/admin/components/HorizontalMenu/types.ts deleted file mode 100644 index 3570c327bb..0000000000 --- a/packages/admin-sandbox/admin/components/HorizontalMenu/types.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { LinkButtonProps } from '@contember/admin' -import { CollapsibleProps, HTMLDivElementProps } from '@contember/ui' -import { ComponentClassNameProps } from '@contember/utilities' -import { PropsWithChildren } from 'react' - -export type HorizontalMenuContainerProps = - & ComponentClassNameProps - & HTMLDivElementProps - & PropsWithChildren<{ - compact?: boolean - itemsContentHorizontal?: boolean - itemsIconsScale?: number - itemsSizeEvenly?: boolean - horizontal?: boolean - hover?: boolean - }> - -export type HorizontalMenuItemProps = - & ComponentClassNameProps - & { - icon?: React.ReactNode - title: string - } & ( - | ( - & LinkButtonProps - & { children?: undefined } - ) - | Omit & { to?: undefined } - ) diff --git a/packages/admin-sandbox/admin/components/Layout.tsx b/packages/admin-sandbox/admin/components/Layout.tsx deleted file mode 100644 index 79f25cbf48..0000000000 --- a/packages/admin-sandbox/admin/components/Layout.tsx +++ /dev/null @@ -1,246 +0,0 @@ -import { Button, DevPanel, DimensionsSwitcher, Intent, Link, LogoutLink, PortalProvider, Radio, Scheme, Spacer, Stack, VisuallyHidden } from '@contember/admin' -import { Identity2023 } from '@contember/brand' -import { SafeAreaInsetsProvider } from '@contember/layout' -import { ColorSchemeProvider, useContainerWidth, useReferentiallyStableCallback, useSessionStorageState } from '@contember/react-utils' -import { colorSchemeClassName, contentThemeClassName, controlsThemeClassName, listClassName } from '@contember/utilities' -import { CircleDashedIcon, LayoutIcon, LogOutIcon, MoonIcon, PaintBucketIcon, SmartphoneIcon, SunIcon } from 'lucide-react' -import { PropsWithChildren, memo, useMemo, useRef, useState } from 'react' -import { AlertLogoutLink } from './AlertLogoutLink' -import { LAYOUT_BREAKPOINT } from './Constants' -import { Directive, DirectivesType, initialDirectives, useDirectives } from './Directives' -import { LayoutComponents, LayoutType } from './LayoutComponent' -import { HorizontalNavigation, Navigation } from './Navigation' -import { SlotSources } from './Slots' - -export const Layout = memo(({ children }: PropsWithChildren) => { - const directives = useDirectives() - - const LayoutComponent = LayoutComponents[directives?.layout ?? 'default'] ?? LayoutComponents.default - const width = useContainerWidth() - - const [scheme, setScheme] = useSessionStorageState( - ['', 'contember-admin-sandbox-scheme'], - scheme => scheme ?? 'system', - ) - - const safeAreaInsets = directives['safe-area-insets'] ?? 0 - - const colorSchemeTheme = listClassName([ - colorSchemeClassName(scheme), - contentThemeClassName(directives['layout.theme-content']), - controlsThemeClassName(directives['layout.theme-controls']), - ]) - - return ( - ({ top: safeAreaInsets, right: safeAreaInsets, left: safeAreaInsets, bottom: safeAreaInsets }), [safeAreaInsets])}> - - - - - - - - - - - - - - - - - - - {directives.layout === 'right-sidebar' - ? ( - - - - ) - : ( - - - - ) - } - - - - - Logout - - - - - -

Created with AI-assisted Contember Studio

-
- - {children} -
-
-
-
- ) -}) -Layout.displayName = 'Layout' - -export const LayoutDevPanel = () => { - const [typeState, setTypeState] = useState() - const { layout } = useDirectives() - - return layout - ? ( - <> - - } heading={`Layout: ${layout}`}> - {Object.keys(LayoutComponents).map(key => ( - - ))} - - - - - - - ) - : null -} -Layout.displayName = 'SandBox.Layout' - -const MAX_INSET = 90 -const MIN_INSET = 0 - -export const SafeAreasDevPanel = () => { - const [inset, setInset] = useState(initialDirectives['safe-area-insets'] ?? 0) - const shiftPressed = useRef(false) - - const handleSetInset = useReferentiallyStableCallback((inset: number) => { - setInset(Math.max(MIN_INSET, Math.min(MAX_INSET, inset))) - }) - - const handleKeyUp = useReferentiallyStableCallback((event: React.KeyboardEvent) => { - if (event.key === 'Shift') { - shiftPressed.current = false - } - - if (shiftPressed.current) { - if (event.key === 'ArrowDown' || event.key === 'ArrowUp') { - event.preventDefault() - event.stopPropagation() - - const direction = event.key === 'ArrowDown' ? -1 : 1 - - handleSetInset(inset + 10 * direction) - } - } - - }) - - const handleKeyDown = useReferentiallyStableCallback((event: React.KeyboardEvent) => { - if (event.key === 'Shift') { - shiftPressed.current = true - } - }) - - const onChange = useReferentiallyStableCallback((event: React.ChangeEvent) => { - if (shiftPressed.current) { - event.preventDefault() - event.stopPropagation() - } else { - handleSetInset(parseInt(event.target.value)) - } - }) - - return ( - typeof inset === 'number' - ? ( - <> - - } heading="Safe Area Insets"> - - - - ) - : null - ) -} - -export const ThemeDevPanel = () => { - const [contentTheme, setContentTheme] = useState>(undefined) - const [controlsTheme, setControlsTheme] = useState>(undefined) - - return ( - <> - - - - } heading="Theme"> - - -

Content

- value ? setContentTheme(value as Intent) : setContentTheme(undefined)} - /> -
- - -

Controls

- value ? setControlsTheme(value as Intent) : setControlsTheme(undefined)} - /> -
-
-
- - ) -} diff --git a/packages/admin-sandbox/admin/components/LayoutComponent.tsx b/packages/admin-sandbox/admin/components/LayoutComponent.tsx deleted file mode 100644 index 6a35c8131d..0000000000 --- a/packages/admin-sandbox/admin/components/LayoutComponent.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { LayoutComponent as bare } from './LayoutComponent[bare]' -import { LayoutComponent as _default } from './LayoutComponent[default]' -import { LayoutComponent as headlessCms } from './LayoutComponent[headless-cms]' -import { LayoutComponent as legacy } from './LayoutComponent[legacy]' -import { LayoutComponent as rightSidebar } from './LayoutComponent[right-sidebar]' -import { LayoutComponent as tailwind } from './LayoutComponent[tailwind]' - -export const LayoutComponents = { - 'default': _default, - 'headless-cms': headlessCms, - 'right-sidebar': rightSidebar, - legacy, - bare, - tailwind, -} as const - -export const layoutComponentTypeList = Object.keys(LayoutComponents) as ReadonlyArray - -export type LayoutType = typeof layoutComponentTypeList[number] diff --git a/packages/admin-sandbox/admin/components/LayoutComponent[bare].tsx b/packages/admin-sandbox/admin/components/LayoutComponent[bare].tsx deleted file mode 100644 index 5af6a32ef4..0000000000 --- a/packages/admin-sandbox/admin/components/LayoutComponent[bare].tsx +++ /dev/null @@ -1,24 +0,0 @@ -import { Slots } from '@contember/layout' -import { useClassNameFactory } from '@contember/react-utils' -import { ComponentClassNameProps } from '@contember/utilities' -import { PropsWithChildren } from 'react' -import { SlotTargets } from './Slots' - -const allSlotKeys = Object.keys(SlotTargets) as Array - -export const LayoutComponent = ({ children, className: classNameProp, ...rest }: PropsWithChildren) => { - const className = useClassNameFactory('test-layout') - const createSlotTargets = Slots.useSlotTargetsFactory(SlotTargets) - - return ( -
- {createSlotTargets(allSlotKeys)} - - {children} -
- ) -} diff --git a/packages/admin-sandbox/admin/components/LayoutComponent[default].tsx b/packages/admin-sandbox/admin/components/LayoutComponent[default].tsx deleted file mode 100644 index 2fd2258e8e..0000000000 --- a/packages/admin-sandbox/admin/components/LayoutComponent[default].tsx +++ /dev/null @@ -1,93 +0,0 @@ -import { LayoutKit, Slots, createLayoutBarComponent } from '@contember/layout' -import { Divider, Spacer, Stack } from '@contember/ui' -import { ComponentClassNameProps } from '@contember/utilities' -import { PropsWithChildren } from 'react' -import { AppHeaderTitle } from './AppHeaderTitle' -import { useDirectives } from './Directives' -import { PanelDivider } from './PanelDivider' -import { SlotTargets } from './Slots' - -const SubHeader = createLayoutBarComponent({ - defaultAs: 'div', - displayName: 'SubHeader', - name: 'sub-header', -}) - -export const LayoutComponent = ({ children, ...rest }: PropsWithChildren) => { - const directives = useDirectives() - const createSlotTargets = Slots.useSlotTargetsFactory(SlotTargets) - - return ( - - { - const targets = createSlotTargets(['HeaderEnd', 'Profile']) - const menuButton = state.panels.get(LayoutKit.SidebarLeft.NAME)?.behavior === 'modal' - ? < LayoutKit.ToggleMenuButton panelName={LayoutKit.SidebarLeft.NAME} /> - : null - - return (targets || menuButton) - ? ( - <> - {targets} - {menuButton} - - ) - : false - }} - /> - } />} - end={createSlotTargets(['Actions']) || false} - /> - - } - footer={( - - )} - {...rest} - > - behavior === 'modal' - ? ( - <> - - - - - ) - : createSlotTargets(['SidebarLeftHeader']) - ) || false} - body={createSlotTargets(['Navigation', 'SidebarLeftBody']) || false} - footer={createSlotTargets(['SidebarLeftFooter']) || false} - /> - - - - - {children} - - - - - )} - footer={createSlotTargets(['ContentFooter'])} - maxWidth={directives?.['content-max-width']} - /> - - ) -} -LayoutComponent.displayName = 'Layout(default)' diff --git a/packages/admin-sandbox/admin/components/LayoutComponent[headless-cms].tsx b/packages/admin-sandbox/admin/components/LayoutComponent[headless-cms].tsx deleted file mode 100644 index c5ea10bd58..0000000000 --- a/packages/admin-sandbox/admin/components/LayoutComponent[headless-cms].tsx +++ /dev/null @@ -1,134 +0,0 @@ -import { Spacer, Stack } from '@contember/admin' -import { LayoutKit, LayoutPrimitives, Slots } from '@contember/layout' -import { PropsWithChildren } from 'react' -import { useDirectives } from './Directives' -import { PanelDivider } from './PanelDivider' -import { SlotTargets } from './Slots' - -export const LayoutComponent = ({ children, ...rest }: PropsWithChildren) => { - const directives = useDirectives() - const createSlotTargets = Slots.useSlotTargetsFactory(SlotTargets) - - return ( - ( - panels.get(LayoutKit.SidebarLeft.NAME)?.behavior === 'modal' - ? false - : - )} - center={createSlotTargets(['HeaderCenter'])} - end={({ panels }) => ( - panels.get(LayoutKit.SidebarLeft.NAME)?.behavior !== 'modal' - ? createSlotTargets(['Actions', 'HeaderEnd']) || false - : createSlotTargets(['HeaderEnd']) || false - )} - endAfter={({ panels }) => ( - panels.get(LayoutKit.SidebarLeft.NAME)?.behavior === 'modal' - ? - : - )} - /> - } - footer={( - - )} - {...rest} - > - {createSlotTargets(['Navigation', 'SidebarLeftHeader', 'SidebarLeftBody', 'SidebarLeftFooter', 'Profile'], ( - behavior === 'modal' - ? ( - <> - - - - - ) - : createSlotTargets(['SidebarLeftHeader']) - ) || false} - body={createSlotTargets(['Navigation', 'SidebarLeftBody']) || false} - footer={createSlotTargets(['Profile', 'SidebarLeftFooter']) || false} - /> - ))} - - - - ( - panels.get(LayoutKit.SidebarLeft.NAME)?.behavior === 'modal' - ? createSlotTargets(['ContentHeader', 'Back', 'Title', 'Actions'], ( - <> - - - - - - {createSlotTargets(['ContentHeader', 'Actions'])} - - )) - : createSlotTargets(['ContentHeader', 'Back', 'Title'], ( - <> - - - - - {createSlotTargets(['ContentHeader'])} - - )) - )} - body={( - {({ panels }) => { - const leftPanel = panels.get(LayoutKit.SidebarLeft.NAME) - - return ( - <> - {children} - {leftPanel?.behavior === 'modal' && ( - <> - - - - - )} - - ) - }} - )} - footer={createSlotTargets(['ContentFooter']) || false} - maxWidth={directives['content-max-width']} - /> - - - - {createSlotTargets(['SidebarRightHeader', 'Sidebar', 'SidebarRightBody', 'SidebarRightFooter'], ( - {({ panels }) => { - const leftPanel = panels.get(LayoutKit.SidebarLeft.NAME) - - return ( - leftPanel?.behavior !== 'modal' - ? ( - - )) || false} - footer={createSlotTargets(['SidebarRightFooter']) || false} - /> - ) - : null - ) - }} - ))} - - ) -} -LayoutComponent.displayName = 'Layout(headless-cms)' diff --git a/packages/admin-sandbox/admin/components/LayoutComponent[legacy].tsx b/packages/admin-sandbox/admin/components/LayoutComponent[legacy].tsx deleted file mode 100644 index 3e6c1dd46d..0000000000 --- a/packages/admin-sandbox/admin/components/LayoutComponent[legacy].tsx +++ /dev/null @@ -1,60 +0,0 @@ -import { Slots } from '@contember/layout' -import { useClassName } from '@contember/react-utils' -import { Layout as DefaultLayout, LayoutPage, Spacer, Stack } from '@contember/ui' -import { NestedClassName } from '@contember/utilities' -import { PropsWithChildren } from 'react' -import { SlotTargets } from './Slots' - -export const LayoutComponent = ({ - children, - className, - ...rest -}: PropsWithChildren<{ - className?: NestedClassName; -}>) => { - const createSlotTargets = Slots.useSlotTargetsFactory(SlotTargets) - - return ( - - - {createSlotTargets(['HeaderStart'])} - {createSlotTargets(['Title', 'HeaderCenter'], ( - <> - - - - ))} - - ))} - afterTitle={createSlotTargets(['ContentHeader'])} - > - {children} - - {createSlotTargets(['ContentFooter'])} - {createSlotTargets(['FooterStart', 'FooterCenter', 'FooterEnd'], ( - - - - - - ))} - - - )} - sidebarFooter={createSlotTargets(['Profile', 'SidebarLeftFooter'])} - {...rest} - /> - ) -} -LayoutComponent.displayName = 'LayoutComponent' diff --git a/packages/admin-sandbox/admin/components/LayoutComponent[right-sidebar].tsx b/packages/admin-sandbox/admin/components/LayoutComponent[right-sidebar].tsx deleted file mode 100644 index b7d1a73962..0000000000 --- a/packages/admin-sandbox/admin/components/LayoutComponent[right-sidebar].tsx +++ /dev/null @@ -1,129 +0,0 @@ -import { LayoutKit, Slots, createLayoutBarComponent } from '@contember/layout' -import { Spacer } from '@contember/ui' -import { ComponentClassNameProps } from '@contember/utilities' -import { PropsWithChildren } from 'react' -import { AppHeaderTitle } from './AppHeaderTitle' -import { useDirectives } from './Directives' -import { PanelDivider } from './PanelDivider' -import { SlotTargets } from './Slots' - -const SubHeader = createLayoutBarComponent({ - defaultAs: 'div', - displayName: 'SubHeader', - name: 'sub-header', -}) - -export interface LayoutComponentProps extends ComponentClassNameProps { } - -export const LayoutComponent = ({ children, ...rest }: PropsWithChildren) => { - const directives = useDirectives() - const createSlotTargets = Slots.useSlotTargetsFactory(SlotTargets) - - return ( - - ( - state.panels.get(LayoutKit.SidebarLeft.NAME)?.behavior === 'modal' - ? createSlotTargets(['HeaderCenter']) - : createSlotTargets(['Navigation', 'HeaderCenter']) - ) || false} - centerAfter={state => state.panels.get(LayoutKit.SidebarLeft.NAME)?.behavior !== 'modal' && || false} - centerBefore={state => state.panels.get(LayoutKit.SidebarLeft.NAME)?.behavior !== 'modal' && || false} - end={state => { - const targets = createSlotTargets(['HeaderEnd', 'Profile']) - const menuButton = state.panels.get(LayoutKit.SidebarLeft.NAME)?.behavior === 'modal' - ? < LayoutKit.ToggleMenuButton panelName={LayoutKit.SidebarLeft.NAME} /> - : null - - return (targets || menuButton) - ? ( - <> - {targets} - {menuButton} - - ) - : false - }} - /> - } - end={createSlotTargets(['Actions']) || false} - /> - - } - footer={( - - )} - {...rest} - > - (behavior === 'modal' - ? ( - <> - - - - - ) - : createSlotTargets(['SidebarLeftHeader']) - ) || false} - body={({ behavior }) => (behavior === 'modal' - ? createSlotTargets(['Navigation', 'SidebarLeftBody']) - : createSlotTargets(['SidebarLeftBody']) - ) || false} - footer={createSlotTargets(['SidebarLeftFooter']) || false} - onBehaviorChange={state => { - if (state.behavior === 'static') { - return { visibility: 'hidden' } - } - }} - /> - - state.panels.get?.(LayoutKit.SidebarRight.NAME)?.visibility === 'hidden' - ? ( - <> - {createSlotTargets(['ContentHeader'])} - - - - ) - : createSlotTargets(['ContentHeader']) || false - } - body={( - <> - {children} - - )} - footer={createSlotTargets(['ContentFooter'])} - maxWidth={directives?.['content-max-width']} - priority={0} - /> - - {createSlotTargets(['SidebarRightHeader', 'Sidebar', 'SidebarRightBody', 'SidebarRightFooter'], ( - - {createSlotTargets(['SidebarRightHeader'])} - - - - )} - body={createSlotTargets(['Sidebar', 'SidebarRightBody']) || false} - footer={createSlotTargets(['SidebarRightFooter']) || false} - onBehaviorChange={() => ({ visibility: 'visible', passive: false })} - /> - ))} - - ) -} -LayoutComponent.displayName = 'LayoutComponent[default]' diff --git a/packages/admin-sandbox/admin/components/LayoutComponent[tailwind].tsx b/packages/admin-sandbox/admin/components/LayoutComponent[tailwind].tsx deleted file mode 100644 index 0e1443a9f3..0000000000 --- a/packages/admin-sandbox/admin/components/LayoutComponent[tailwind].tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { Stack } from '@contember/admin' -import { ComponentClassNameProps } from '@contember/utilities' -import { PropsWithChildren, useState } from 'react' -import { SlotTargets } from './Slots' -import { Slots } from '@contember/layout' -import { MenuIcon, PanelLeftCloseIcon, PanelLeftOpenIcon, PanelRightCloseIcon, PanelRightOpenIcon } from 'lucide-react' - -export const LayoutComponent = ({ children, ...rest }: PropsWithChildren) => { - const isActive = Slots.useHasActiveSlotsFactory() - - const [showLeftSidebar, setShowLeftSidebar] = useState(null) - const [showRightSidebar, setShowRightSidebar] = useState(true) - - const hasRightSidebar = isActive('SidebarRightHeader', 'SidebarRightBody', 'SidebarRightFooter', 'Sidebar') - return ( -
-
- -
- {showLeftSidebar === false && } - {hasRightSidebar && !showRightSidebar ? : null} -
- -
- -
-
- - -
-
- - -
-
-
-
- - - - - -
-
- {children} -
-
- -
-
- {hasRightSidebar ? -
- -
- -
-
- - -
-
- -
-
- : null} - -
- -
-
- -
-
- -
-
- - -
-
-
-
- ) -} -LayoutComponent.displayName = 'Layout(headless-cms)' diff --git a/packages/admin-sandbox/admin/components/Navigation.tsx b/packages/admin-sandbox/admin/components/Navigation.tsx deleted file mode 100644 index 03839b8c75..0000000000 --- a/packages/admin-sandbox/admin/components/Navigation.tsx +++ /dev/null @@ -1,151 +0,0 @@ -import { Menu } from '@contember/admin' -import { ComponentIcon, FileTextIcon, LayoutDashboardIcon, ListTreeIcon, NewspaperIcon } from 'lucide-react' -import { Menu as HorizontalMenu } from './HorizontalMenu' - -const articlesMenuItems = ( - <> - - - -) - -const componentsMenuItems = ( - <> - - - - - - - - - - - -) - -const examplesMenuItems = ( - <> - - - - - - - - - - - - - - - } title="Nesting"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -) - -const settingsMenuItems = ( - <> - - -) - -export const HorizontalNavigation = () => ( - - } title="Dashboard" to="index" /> - } title="Articles"> - - - {articlesMenuItems} - - - } title="Components"> - - {componentsMenuItems} - - - } title="Examples"> - - {examplesMenuItems} - - - - - {settingsMenuItems} - - - -) - -export const Navigation = () => ( - - } title="Dashboard" to="index" /> - } title="Articles" to="articles">{articlesMenuItems} - } title="Components">{componentsMenuItems} - } title="Examples">{examplesMenuItems} - {settingsMenuItems} - -) diff --git a/packages/admin-sandbox/admin/components/PanelDivider.tsx b/packages/admin-sandbox/admin/components/PanelDivider.tsx deleted file mode 100644 index 5ab3bd6c2d..0000000000 --- a/packages/admin-sandbox/admin/components/PanelDivider.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { LayoutPrimitives } from '@contember/layout' -import { Divider } from '@contember/ui' -import { memo } from 'react' - -export const PanelDivider = memo<{ name: string }>(({ name }) => ( - {({ panels }) => { - const panel = panels.get(name) - - return panel?.behavior === 'static' && panel?.visibility === 'visible' && ( - - ) - }} -)) -PanelDivider.displayName = 'PanelDivider' diff --git a/packages/admin-sandbox/admin/components/ScrollView/ScrollView.css b/packages/admin-sandbox/admin/components/ScrollView/ScrollView.css deleted file mode 100644 index f38149f9a5..0000000000 --- a/packages/admin-sandbox/admin/components/ScrollView/ScrollView.css +++ /dev/null @@ -1,53 +0,0 @@ -.cui-scroll-view { - overflow-y: auto; - overflow-x: hidden; - border-width: var(--cui-border-width, 1px); - border-color: transparent; - transform: translateZ(0px); /* Fixes Safari drawing scroll bar below */ - min-height: 0px; - min-width: 0px; - flex: 1 1 0px; - display: flex; - flex-direction: column; -} -.cui-scroll-view[data-direction="horizontal"] { - overflow-y: hidden; - overflow-x: auto; - flex-direction: row; -} -.cui-scroll-view[data-scrolled-bottom] { - border-bottom-color: rgba(var(--cui-color--rgb-50), var(--cui-opacity--lower)); -} -.cui-scroll-view[data-scrolled-top] { - border-top-color: rgba(var(--cui-color--rgb-50), var(--cui-opacity--lower)); -} -.cui-scroll-view[data-scrolled-left] { - border-left-color: rgba(var(--cui-color--rgb-50), var(--cui-opacity--lower)); -} -.cui-scroll-view[data-scrolled-right] { - border-right-color: rgba(var(--cui-color--rgb-50), var(--cui-opacity--lower)); -} - -.cui-scroll-view-content { - display: flex; - flex-direction: column; - flex: 1 1 auto; - gap: var(--cui-gutter); -} - -:where(.cui-layout-sidebar-body .cui-scroll-view) { - ----padding-bottom: max(var(--inset-bottom, 0px), var(--cui-padding--panel-vertical)); - ----padding-left: max(var(--inset-left, 0px), var(--cui-padding--panel-horizontal)); - ----padding-right: max(var(--inset-right, 0px), var(--cui-padding--panel-horizontal)); - ----padding-top: max(var(--inset-top, 0px), var(--cui-padding--panel-vertical)); - margin-bottom: calc(-1 * var(----padding-bottom)); - margin-left: calc(-1 * var(----padding-left)); - margin-right: calc(-1 * var(----padding-right)); - margin-top: calc(-1 * var(----padding-top)); -} -:where(.cui-layout-sidebar-body .cui-scroll-view-content) { - padding-bottom: var(----padding-bottom); - padding-left: var(----padding-left); - padding-right: var(----padding-right); - padding-top: var(----padding-top); -} diff --git a/packages/admin-sandbox/admin/components/ScrollView/ScrollView.tsx b/packages/admin-sandbox/admin/components/ScrollView/ScrollView.tsx deleted file mode 100644 index a16dfe3fca..0000000000 --- a/packages/admin-sandbox/admin/components/ScrollView/ScrollView.tsx +++ /dev/null @@ -1,72 +0,0 @@ -import { useClassNameFactory, useComposeRef, useOnElementResize, useScrollOffsets } from '@contember/react-utils' -import { HTMLDivElementProps } from '@contember/ui' -import { ComponentClassNameProps, dataAttribute } from '@contember/utilities' -import { forwardRef, memo, useCallback, useLayoutEffect, useRef } from 'react' - -export interface ScrollViewProps extends ComponentClassNameProps, Omit { - horizontal?: boolean - reverse?: boolean - 'data-scrolled-top'?: boolean - 'data-scrolled-left'?: boolean - 'data-scrolled-right'?: boolean - 'data-scrolled-bottom'?: boolean -} - -export const ScrollView = memo(forwardRef(({ - children, - className: classNameProp, - componentClassName = 'scroll-view', - horizontal = false, - reverse = false, - ...props -}, forwardedRef) => { - const className = useClassNameFactory(componentClassName) - const localRef = useRef(null) - const composeRef = useComposeRef(forwardedRef, localRef) - const scrollOffsets = useScrollOffsets(localRef) - - // const userHasScrolled = useRef(false) - // - // useEffect(() => { - // userHasScrolled.current = horizontal - // ? (reverse ? scrollOffsets.right : scrollOffsets.left) > 0 - // : (reverse ? scrollOffsets.bottom : scrollOffsets.top) > 0 - // }, [scrollOffsets, horizontal, reverse]) - - const initScrollTo = useCallback(() => { - // React Hook useCallback has an unnecessary dependency: 'children'. - // Either exclude it or remove the dependency array. - // react-hooks/exhaustive-deps: - children - - if (localRef.current) { - if (horizontal) { - localRef.current.scrollLeft = reverse ? localRef.current.scrollWidth : 0 - } else { - localRef.current.scrollTop = reverse ? localRef.current.scrollHeight : 0 - } - } - }, [horizontal, children, reverse]) - - useLayoutEffect(initScrollTo, [initScrollTo]) - useOnElementResize(localRef, initScrollTo) - - return ( -
0)} - data-scrolled-left={dataAttribute(props['data-scrolled-left'] ?? scrollOffsets.left > 0)} - data-scrolled-right={dataAttribute(props['data-scrolled-right'] ?? scrollOffsets.right > 0)} - data-scrolled-bottom={dataAttribute(props['data-scrolled-bottom'] ?? scrollOffsets.bottom > 0)} - data-reverse={dataAttribute(reverse)} - > -
- {children} -
-
- ) -})) -ScrollView.displayName = 'ScrollView' diff --git a/packages/admin-sandbox/admin/components/Slots.tsx b/packages/admin-sandbox/admin/components/Slots.tsx deleted file mode 100644 index 5e37a320c5..0000000000 --- a/packages/admin-sandbox/admin/components/Slots.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import { - CommonSlotSources, - CommonSlotTargets, - ContentSlotSources, - ContentSlotTargets, - FooterSlotSources, - FooterSlotTargets, - HeaderSlotSources, - HeaderSlotTargets, - SidebarLeftSlotSources, - SidebarLeftSlotTargets, - SidebarRightSlotSources, - SidebarRightSlotTargets, - commonSlots, - contentSlots, - footerSlots, - headerSlots, - sidebarLeftSlots, - sidebarRightSlots, -} from '@contember/layout' -import { useDocumentTitle } from '@contember/react-utils' -import { memo } from 'react' - -const Title = memo<{ children: string | null | undefined }>(({ children }) => { - useDocumentTitle(children) - - return ( - {children} - ) -}) - -export const slots = [ - ...commonSlots, - ...contentSlots, - ...headerSlots, - ...footerSlots, - ...sidebarLeftSlots, - ...sidebarRightSlots, - // Your custom slot names will come here, e.g: - // 'MySlot', -] - -export const SlotSources = { - ...CommonSlotSources, - ...ContentSlotSources, - ...HeaderSlotSources, - ...FooterSlotSources, - ...SidebarLeftSlotSources, - ...SidebarRightSlotSources, - Title, - // Your custom slots will come here, e.g: - // MySLot: Slots.createSlotSourceComponent(slotTargets.MySLot), -} - -export const SlotTargets = { - ...CommonSlotTargets, - ...ContentSlotTargets, - ...HeaderSlotTargets, - ...FooterSlotTargets, - ...SidebarLeftSlotTargets, - ...SidebarRightSlotTargets, - // Your custom slot targets will come here, e.g: - // MySLot: Slots.createSlotTargetComponent(slotTargets.MySLot), -} diff --git a/packages/admin-sandbox/admin/components/customLinks.tsx b/packages/admin-sandbox/admin/components/customLinks.tsx deleted file mode 100644 index 06b3995ca3..0000000000 --- a/packages/admin-sandbox/admin/components/customLinks.tsx +++ /dev/null @@ -1,74 +0,0 @@ -import { - Block, - Box, - Button, - Component, - DiscriminatedBlocks, - Dropdown, - EditorRenderElementProps, - EditorTransforms, - HasOne, - Icon, - InitializeReferenceContentProps, - SelectField, - TextField, - useEditor, -} from '@contember/admin' -import './editorButton.css' - -export const LinkTarget = Component(() => ( - - - - - - - - - - - ), -) - -export const InsertLink = Component( - ({ onSuccess, onCancel }) => ( - <> - -
- - -
- - ), - () => , -) - - -export const LinkElement = (props: EditorRenderElementProps) => { - const editor = useEditor() - return ( - - {props.children} - - ( - - )} - > - - - - - - - - ) -} diff --git a/packages/admin-sandbox/admin/components/editorButton.css b/packages/admin-sandbox/admin/components/editorButton.css deleted file mode 100644 index 416a2d8b9d..0000000000 --- a/packages/admin-sandbox/admin/components/editorButton.css +++ /dev/null @@ -1,17 +0,0 @@ -.editorButton { - border-radius: 50%; - width: 1.8em; - height: 1.8em; - background: white; - border: 1px solid #e2e2ea; - margin-left: 0.3em; - font-size: 0.7rem; - cursor: pointer; - display: inline-flex; - align-items: center; - justify-content: center; -} -.editorButton:focus { - outline: none; - background: #f2f2f2; -} diff --git a/packages/admin-sandbox/admin/components/messages/types.ts b/packages/admin-sandbox/admin/components/messages/types.ts deleted file mode 100644 index a6ca01aea4..0000000000 --- a/packages/admin-sandbox/admin/components/messages/types.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { ReactNode } from 'react' - -export interface MessagesListItemProps { - authorName: ReactNode - createdAt: ReactNode - message: ReactNode - mine: boolean -} - -export interface MessagesListItemLineProps { - children: ReactNode -} - -export interface NewMessageInputProps { - placeholder?: string - onSend: (message: string) => void -} diff --git a/packages/admin-sandbox/admin/components/messages/ui/ChatsListItem.tsx b/packages/admin-sandbox/admin/components/messages/ui/ChatsListItem.tsx deleted file mode 100644 index 8ab6fb4c9d..0000000000 --- a/packages/admin-sandbox/admin/components/messages/ui/ChatsListItem.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import { Button, ButtonProps, DeleteEntityButton, Dropdown, DropdownProps, EntityId, RepeaterItemContainer, RepeaterItemProps, Spacer, Text, useEntity } from '@contember/admin' -import { ChevronRightIcon, MoreVerticalIcon } from 'lucide-react' -import { MouseEventHandler, forwardRef, memo, useCallback } from 'react' - -export interface MessageListItemOwnProps { - selectedId?: EntityId | null - onClick?: (id: EntityId, event?: Parameters>[0]) => void -} - -export interface ChatsListItemProps extends Omit, MessageListItemOwnProps { -} - -export const ChatsListItem = memo(forwardRef(({ - createNewEntity, - dragHandleComponent, - index, - label, - removalType, - canBeRemoved, - children, - onClick: onClickProp, - onKeyPress: onKeyPressProp, - selectedId, - className, - ...rest -}, forwardedRef) => { - const entity = useEntity() - const id = entity.id - const name = entity.getField('createdBy.name').value - - const onClick: MouseEventHandler = useCallback(event => { - onClickProp?.(entity.id, event) - }, [entity.id, onClickProp]) - - return ( - - - {canBeRemoved && ( - - - - )} - - )} - padding="double" - > - {selectedId === id ? children : null} - - ) -})) - -const dropdownButtonProps: DropdownProps['buttonProps'] = { - distinction: 'seamless', - children: , - className: 'chat-list-more-button', - padding: 'gap', -} diff --git a/packages/admin-sandbox/admin/components/messages/ui/EmptyState.css b/packages/admin-sandbox/admin/components/messages/ui/EmptyState.css deleted file mode 100644 index 17af82d543..0000000000 --- a/packages/admin-sandbox/admin/components/messages/ui/EmptyState.css +++ /dev/null @@ -1,4 +0,0 @@ -.cui-messages-empty-state { - flex-grow: 1; - text-align: center; -} diff --git a/packages/admin-sandbox/admin/components/messages/ui/EmptyState.tsx b/packages/admin-sandbox/admin/components/messages/ui/EmptyState.tsx deleted file mode 100644 index bcd872a7b9..0000000000 --- a/packages/admin-sandbox/admin/components/messages/ui/EmptyState.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { useClassName } from '@contember/react-utils' -import { Stack } from '@contember/ui' -import { ComponentClassNameProps } from '@contember/utilities' -import { MessagesSquareIcon } from 'lucide-react' -import { memo } from 'react' - -export interface EmptyStateProps extends ComponentClassNameProps { } - -export const EmptyState = memo(({ - className, - componentClassName = 'messages-empty-state', -}) => ( - - -

There are no messages here yet. Start by sending a new message

-
-)) diff --git a/packages/admin-sandbox/admin/components/messages/ui/MessageItem.css b/packages/admin-sandbox/admin/components/messages/ui/MessageItem.css deleted file mode 100644 index c3ad5cb87d..0000000000 --- a/packages/admin-sandbox/admin/components/messages/ui/MessageItem.css +++ /dev/null @@ -1,17 +0,0 @@ -.cui-message-item { - align-self: start; - margin-inline-start: 0%; - margin-inline-end: 20%; -} -.cui-message-item[data-mine] { - align-self: end; - margin-inline-start: 20%; - margin-inline-end: 0; -} -.cui-message-item .cui-message-item-bubble { - align-self: flex-start; -} -.cui-message-item[data-mine] .cui-message-item-bubble { - align-self: flex-end; - background-color: rgba(var(--cui-background-color--toned-controls-rgb-50), var(--cui-opacity--lower)); -} diff --git a/packages/admin-sandbox/admin/components/messages/ui/MessageItem.tsx b/packages/admin-sandbox/admin/components/messages/ui/MessageItem.tsx deleted file mode 100644 index 641bd4e7a1..0000000000 --- a/packages/admin-sandbox/admin/components/messages/ui/MessageItem.tsx +++ /dev/null @@ -1,79 +0,0 @@ -import { useClassName, useClassNameFactory } from '@contember/react-utils' -import { Box, BoxHeaderProps, BoxProps, Description, HTMLDivElementProps, Stack } from '@contember/ui' -import { ComponentClassNameProps, contentThemeClassName, controlsThemeClassName, dataAttribute } from '@contember/utilities' -import { memo } from 'react' -import { MessagesListItemLineProps, MessagesListItemProps } from '../types' - -export interface MessageItemProps extends MessagesListItemProps, Omit { } - -const MessageItemComponent = memo(({ - actions, - label, - header, - authorName, - className: classNameProp, - componentClassName = 'message-item', - createdAt, - message, - mine, - ...rest -}) => { - const className = useClassNameFactory(componentClassName) - const boxHeaderProps: BoxHeaderProps = header ? { header } : { actions, label } - - return ( - - - - {message} - - - - - - {authorName} - - - {createdAt} - - - - - ) -}) -MessageItemComponent.displayName = 'MessageItemComponent' - -interface MessageBubbleLineProps extends - Omit, - Omit, - MessagesListItemLineProps { } - -const MessageBubbleLine = memo(({ - componentClassName = 'message-bubble-line', - className, - ...rest -}) => ( -
-)) - -export const MessageItem = Object.assign(MessageItemComponent, { Line: MessageBubbleLine }) diff --git a/packages/admin-sandbox/admin/components/messages/ui/NewMessageInput.tsx b/packages/admin-sandbox/admin/components/messages/ui/NewMessageInput.tsx deleted file mode 100644 index 3e19bd6f74..0000000000 --- a/packages/admin-sandbox/admin/components/messages/ui/NewMessageInput.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import { useClassName, useReferentiallyStableCallback } from '@contember/react-utils' -import { Box, Button, TextareaInput } from '@contember/ui' -import { ComponentClassNameProps } from '@contember/utilities' -import { SendHorizontalIcon } from 'lucide-react' -import { forwardRef, memo, useState } from 'react' -import { NewMessageInputProps } from '../types' - -export const NewMessageInput = memo(forwardRef(({ - className: classNameProp, - componentClassName = 'send-message-input', - placeholder = 'Send a message...', - onSend, - ...props -}, forwardedRef) => { - const [message, setMessage] = useState(null) - const trimmedMessage = message?.trim() - - return ( -
{ - if (trimmedMessage) { - event.preventDefault() - onSend(trimmedMessage) - setMessage(null) - } - })} - onKeyDown={useReferentiallyStableCallback(event => { - if (event.key === 'Enter' && (event.ctrlKey || event.metaKey)) { - if (trimmedMessage) { - event.preventDefault() - onSend(trimmedMessage) - setMessage(null) - } - } - })} - className={useClassName(componentClassName, classNameProp)} - {...props} - > - - setMessage(value)} - placeholder={placeholder} - value={message} - /> - - -
- ) -})) diff --git a/packages/admin-sandbox/admin/components/messages/ui/index.css b/packages/admin-sandbox/admin/components/messages/ui/index.css deleted file mode 100644 index 6dded0a779..0000000000 --- a/packages/admin-sandbox/admin/components/messages/ui/index.css +++ /dev/null @@ -1,29 +0,0 @@ -@import './MessageItem.css'; -@import './EmptyState.css'; - -:where(.cui-layout-sidebar .cui-send-message-input) { - flex-grow: 1; -} - -:where(.cui-layout-sidebar .cui-layout-sidebar-body) { - background: transparent; -} - -:where(.cui-layout-sidebar .cui-layout-sidebar-footer) { padding-top: 0px } - -:where(.cui-layout-sidebar .cui-scroll-view) { - ----padding-bottom: max(var(--inset-bottom, 0px), var(--cui-padding--panel-vertical)); - ----padding-left: max(var(--inset-left, 0px), var(--cui-padding--panel-horizontal)); - ----padding-right: max(var(--inset-right, 0px), var(--cui-padding--panel-horizontal)); - ----padding-top: max(var(--inset-top, 0px), var(--cui-padding--panel-vertical)); - margin-bottom: calc(-1 * var(----padding-bottom)); - margin-left: calc(-1 * var(----padding-left)); - margin-right: calc(-1 * var(----padding-right)); - margin-top: calc(-1 * var(----padding-top)); -} -:where(.cui-layout-sidebar .cui-scroll-view-content) { - padding-bottom: var(----padding-bottom); - padding-left: var(----padding-left); - padding-right: var(----padding-right); - padding-top: var(----padding-top); -} diff --git a/packages/admin-sandbox/admin/favicon.png b/packages/admin-sandbox/admin/favicon.png deleted file mode 100644 index 2d144c37750f249253ef4735f3ec5256da80fe76..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11137 zcmaL7c_38Z|37~2*!O+VVi%$8p)iBA*p;GWNee2wEMaD(l1AudSIneDRJNjo88Ik3 zEhI)GTS&4Ev;D63=dbTSzdvSso_o(Z_sluZWO@ALk(#LG|@t zCHb;F?83OZ$UjXpeU>u|3BBWS36`PZ>Z6;J^zo)Ia z^_e>eNvev#gv=z4-Z~tIqmYb~l$ppHtQhd5%nX(%kv}2Gp&^_r-$%ajfv8bCZDBu1$N%V7jF`JkgIu}{36yL|76vSSq5B?}Sq75ii^un@_gB=U#r7yldDKcy)5~v0= zH@MLI{zwxH9j^&}ZsyU8pC>)kVS}m{7br8q)pbSo#uYCSdgfm@t}H)iVbws!fqQo3 zO}EUm2y)dg&gJkTMNshCD?aU8wR%+~klW9$&lJFbD#6j`cf_mQfSl-B3dJWE1ztFv zGm4DQXYe3J0TK&5DoU)$))1K{23}T$^5-1_!W+!VJOV`#eATrk55&eHrVF_A2LJjm z^WmcI8gH&QPA1Ki18L4r{XUKh0({?72l*YEXw|}oO$n0!S`%ypK){pPzPLBPea`I# z!X1o)zkFaZ>ecVziF{8`zy`#VTE;x5pM$oS77YW6s%3JQYMw zMce}Diu*zQKir|e>tdiOB68`r)ua{}XG26ErzIBG`~Ul%yI#mY>Y$ex60?HSmOLK_DTjm`O?62d3b8H!b?@ zoCsz5xj>poj_OBv0TZGFVrWY(Nb&=2@XNPK#Dy0(BMCB+N@+fB04V8p(0oLt;~@QA z6S4xJlQQZ0zgfnb?EwId5w!)TSpfG)7(qS>w|;zl6u$ML#x-cW?FcZm6O)2B-}$6;ivm%0($Q#)SNwgd;#ONP0b5L; z|AfK@{Q8EDdne3)_DWR-r>Bn(zsa|}hUG9@miX}O(6EpSD>?ehbQC|21hQ!Bb7m4% zQ69td^(ep@<8QNj#i$8Yom9qLToR>eQHWV{B#HdM+0u-kPePKG4)sU@-`jq!=@hmG zmNh;RWQp-AktRI6KwzvAuY~@pkG^TeR4B`Z-P~U40(EoXeNz1v-D5#kHaoFQdKY7% zbm%0-JsaVX27qx2g*8nWQ)nFP_|}~J_uIZY(P9Jf#EBJ(dm@-t1>~DYsDJm-=iPa4 zO7-nhzz_6Xn&*7Brmr@v8LA3rXhXOc6wBs+mL&$l z<{ONTHR1j^1Qhz@7{TB6*|1!>8YyVan$Scz z-w8kLJULTeiJ6K8r$u+(c*DcPI!D2S0@evc6+gYDLILlT6P{30I%(In6mhKj1cObIJbu^ggbpV zCBeVfOKxGqCYUze65*2&CeH19iW_{@LNYz*_ZN8X-+Yk+$Y-+{OxHhrQHPehmm{bC zY1i=tWC8N0y&E>hvObuPb>O}P@Q|Ovw{^#%M^0xs`k=CN%1nV}{^b1v?38E=&iggZMjpZw*7h_5RGys7#oHZO(e ze7WDXU(RoTx|+vePkl(~6CcyS~Zzj5=p8z^)5sMyev z12Xx68|@k@(p`rg_TKl00lzwg%P)S<*)*IfTue@jc(3$i73iH>*f?4XyX6MmJCT$| zQB)td4A^szSB1gqM{Oba5r8qgl+4CcI6X_}jvuvLyQtz^2Zl?`sUgeB7(8L^i8Eo> zwUr0(a_|+8^lf4~yWaU#^zr{R7XZTN;wE!0qdMJ;_;&2bQnUcVgIIHbYot8FRXoh) zdva?I1t~=!vA%9bJVzpkQV5m?xTw?16*BfV8yqp)lgDQP9!4S1>1UYv>PYrm z)#k{B2tt&Pxs(9J@)IJKGKmIVuSJ*W<0|?|9?d(K)O_b7h`-bLAiQ#GQMt9c5tk@Q>d!$~{I?MT?Ea zg2WMg;3qqryyTb)SjA~4Jg5C`pSr!X?wnYcPW77H7nKGZF#Gmu$d4Mj;mJpf>4t3l zJqilJ?I2~6DhQ1&UzHU~ak|&W()HPTvdY1(MGNdnIghGjC1W4v$S6-tTu6VmG{!!E z^EjKS%Qo0;nvo;;=*68qWKM?`7Z+s3rbs9H(NhRS31{mYnT=OA=h)i$$#2O zpQIO+K_o5>TYis%{nAls#B<`y!Ddvx13b+(9+bkX?wW-vf^DGSQ?0(5C<$k*T-&N(o-~8^kR+&Q&C!nWSzWKbh!YoybgZazSrT4Pi*-YgcF^p>%E1-zDQ4~ zLK(bB8AR2d8(Z-1z@Dm>nYaithXp-EAYYLzc7Dmr3z+%O9lv?ks%84kVVmD-$sj5- zvT2f}70s*HwdqbO3P^J$Ya@j?Kl|eKTTH`xQAo<8Hi~-~Lp@bW!?*XheBdoX@;%B6 ztenQDpZasUCIdnllT?#0Z3&WE&w9kcY0Uz5ysDv-*(B2gb|U@Ri!4JeWc_>8+w)-+N}rn3dJVKN!L*s9 zw*z9efJpd4def+cxDSh+tH9I=%_+xS|zfgQgV39j!5Yd%L7ST|-3KUI^bo&%${ zQB)kIsE&fwe9rA4N3 z<95U{N-y?1*FGvEJ{7Dog@{MS*#b$7MUz6Wkb=O(EH?1NCWeUP5`|-eS(eb3}Ka8o3~EE7t_i+1lQbJrDEaI33hALsLE(+>RJV-@{j{ zQFo6ghAsRTAJqKk89BBLd?t@#n?F&gp#|%qA?Rk>%rc9!>}8=W^Bm~x-Qldm-nGUt|Z6ja;3}oEvwh+W%^yQ4^|7;^7=&Vdj8T z8h7tAL=`R$yH=EZ?8v$KQL$?AHVYBn15?Tfs_{mxgF4V5zkVKnSoYo31V(G;bmNcL zB6``N3LNG96UTFMt|r7C^?59V`g z{#nIQ@LmAO{MdX@%Sn)sV*kN#?obGJw{Vygv;B7v7HXhdyaa2bw$&2jgH+~T#mDX! z699(v%X55qRF^nn>q3|51|K(0J{aQ+W)I>~*I}EoRzn>W#Sc!lnWT(x#-i4>bbL}yY6r!;NIDgJ314eCzO@_+UKhl^W2CTEyuO8B7=?L<)X@%OzitfqwBT;F62M<4)dk5zXv!XKNSr`lboJs6hIP9|zCJcJY%}YV6)x|2I za}O)kzdHjLD6dohL9ph=`F-ryR&GSUo%hxwcDVq#uEyD5O<4|H_(a~U6Gt?tZe)5R z$a1LVb?S{UB;$`*u<0FJZCn1ge!RBxQ_UhuAoVz`L^2ySr$g0ejM_%^ey@A?S0AkgO-{s{DLBSy<_TfTTvyq^){o#9hBH?(ttJuF7an9;Je+GOTZ>thIy zxlSzuI_2?y1J;w)eqV_2-Habt_?EiBg_8$(Jj?Xxe?%`@kXhYi!>dPe6DOWd^MfNm z_vw%Hp;WF#snIYm_NI|pq;ZWHa01;L>x{(?D@L|V!>fJ8%kcvajXOs8fDNv^R*`Sa zU{;9Ua=+zxVx8d+|26mqQWcL&3JWv)%){ftY4k$|g7!|*ih|)>xuggzt9bM>;kM>F zQIQ%d$ubQxaE)!IVo<9#qjz{mmV9&_aa!Pl8C8t+`A#!n9bTM}o6ubY3#WQV>tN&S z-ez14p%cT|5tI)(3M>}W=Ejjr!0PsCQrcgl6La8?NS3A117b%?b1e;*@Zzy4!5 zC%_EVmgD!n4CHZ5@QYr2wICGW=j@GgjS~R*A&}`!u3P{1HTC{)ylFY#_FXN|dilHp z1P>n#pN>llfBl>D#$3ttmb4X?9hSEid*~pn(>ir^1 zB$RnxgD$p7?DF-lJ{42)!N`Smcr25JBqw5H)Yb}BP02NXSgTE|%-r7emj&%B6gScz z32;LJsN5%Q7HT(yCYDfWipokK(EZMzgW#%(3(a(?TVB^Cj_$`yzFF-}AK$IRwquW# z@DV%wewzH2D;u3mx43fmtXLViSj9us=PR?(+1fs8L1S-?=}r6EgHJ-U?}lp+ZQafc zgfR>OU)QN~xbS6N&hS8~g-?SWk5bY}P?GoeP1-yvG5GyTYxK~Hf3NdCM#o;9RtHa@ z7^L(Bh!?xbsvq)1pk3?&rIzJ!`0l&c&U^X-kLYE6v-v^qd+O31-oc|Irjb z1>G!@>&M&x1{bNKd6$1+IE|cfdusf?fnWr>U1fwoP#xo9$%ZTqm^NO^*1ODen5QMI zWnB^&)VsPt;f)d!!@A`+m)E_&74Me0#V=K)yZDq3U3)L#Q0EW0hCY>j^g-pmszP)v z43$=e@Wr0JOd^%@%a!7BKQ{;WYXO1_BzK7_`p@+n2778bKBelsJ#n`i8187^z3S6= z|JysNCY%EaC9mgQ57I5}>*zDOi|VzFa(`sBtmA6}_`(mAgV-fBgwFrxZ(FI7>m z9IuL&j%|XkcQ%E$al)b5=5P`z2-OiLZN{4!+x)_N9hwO91lhy&Nq^364|^o5@+fT6 zhixPENx^}wux;vYxMx~LCMyUxRootbjwP^ox@c+1@5}xo-O6U>e+n<}z~@9o8O8p! zv}bze%K3oO;hH#h_oh?dO6Z%=l}89o$!A&byATc`C!-|NLj<7<~mu`$h`?ZL5U(AS>k-A39- zCS87h2!5U--L;QwIp4P%?n@$e0iT!J3_FIt^mI9$MLRacHI#DYzJJ`e{^v^{+mK3beO6;cRpmX}U{q*v zQ2*ld`zpP3)CRE}0@iGnhj>Q6c=ZV_c`bjEl!=>DF~zR?Fe_GPu*hD!P- zeCoQTbabHcGPPmbC;(K`n021ex8o5?X5V$1mnM6B)~e4G=`yxk;!gk%lb*z1YU6f& zv4&pq{}(Bp6YM}hQn;=W#^Z7NrxxSo)1R)yHk+$~R8tl3x}BJ`5xBc?HGN2T-u({l z2SFDBPe}~TACNobuPe87JVeu~{;1peaBMR_hzsDpMwp$DLCiM9jJ~GV_kFz||Gz|m zU?N_Yt-{@glP(;Lbmbn78C_+KTAG<)g+N>$|FHLi&rMbX#shO9H9m1u%x+mYSFlek zmc>QYB-^=XT}ZgTRX=)C3#1P64+kH4HW)Rv5zx!%@_LLQ@7KUA#T1Wydg9jmZ}32G ze)Q2lp3QLn!;83XljTu3RpNNf^?FxzpCDL}cqN3E#? z2cj6!)32!E4D`Z2wwT=J3tu?5Sre5u( zM-Qd=H~ta;Qf-l%31H04N#xcZ`M*O!guX^d4^9k^-5ryeshn&$6<1@_f+Gau6GOHd zxpB{b2=xbrjg`0S{B~2YFrFwKUEnN}89=W!;y=F-eyF=^!-4bY z#?O&9QONhsEb_h>Ya-Fo*3s;eNEVseGb#^*Q8@N41xNwPK zdRgx)MTh7-OwKr#`H^a@wkM)`BW8oo#2j~eVS2QFJF;rLWw3V6b(R)6 zxIIC*NF7Cl{fS>I{vAI3;+^naTP9j>GM|T(04~L4u0)-zKpWyLz6Mmwv zS%w*aDZx_d5KgJ%C9k`{#qbn3l8^MLEGy4@*PlGeK~!vCUMKB>h)_9Lkhy=g5BqU^O-04DaLDDO!ob?nBGzmghC9xI zc70V}%QS|5N(86tBouJWe4_FkM!luXqcip8%XV6y+VXVBvQLp9x;4!*VQ^fR(T040 zGc6?S-V-+IvyG!fP5qZ_&agFkKbe?G2}9vglW&(R;S{*F*rCLYVmk0e!DOWR;UvaE zQi#;c*+zQcIjV(a7FzsCRuMP*)1g-C{de6*!vbhasyl`lr%H*vo(6PwjMw*k3#Pr7)Bj##(H%OS=v__yQfxmqYs`IXoon|J1H1sFOnUL_qwkPGrf$T|bUa&gmM z!GcC}=~`KAcY6>3c|zTianrd6nd`em?iaB0Z0E2r;E22%LWg+;DTkpi#}fxuXTD#! z?7HP+k%T+@Yjs3u?)%Pq$^SuigAbf7@*9+P$Q5q*BTf8XC4+vIYSfNzkF~N59NiUi zrkY7h{+Cmh{F_`VU?{@2SWIaPf?;Qu$@RuM!-ZrmKPr_*Qb3@)+Qh6M3F88bUyn~8 zPrSo&v30B7e^9XLKpi-%Wmo#@*rgnkN^g0G>}#2MzQeZ#dFHdbO5B5!v6K28Zb7oZGe3QM z&tOp_cowv&%dJ6WFO|USb4H!B8JBW~qkU#Fi1elL*@+C5(-r0)><$GW7QhNrc4ha> z^GSw5Gpc9PKj*-Km(vbBM6P1_zi=r$Al>OOkU;uG9IjK~{;pkTxR1T40z>DinCsW| zYG2$qmXUxhzk8b+%UPEI2i17Fw`%f9#pA@-K5p4AI zq2C~ZLV^qNv>gtDkp?(&)mR1)Rd&mC zBeBo!EmhFjHTy<(*MS=45A17S#rc(hoN_&kETYV(Ln z@IRJekI93f&ObFg{f1Kml`;LTYGJ$QN91KxbD4U03Tc!Zryz;QD|w`@KliBa{K;;E z`MA65wLJYc7`^gH15R`oy{Z6A%_#a>-F@FT#)g&MWUs`JynFa z-QcIL7+m4h9neLYvU$Yez$y+5Om6V*>hyfXeP;DjK*LesD~_P;u~PD>R-d(_Hk$Hw za)p`eO}9Rj0kJ7szK#4DFy-ncEPS)^@Y>Rk)QZP*FbkN#o7*Ox4Y-nsq)$WW>Lur* zRZ!J8!Ccx1iP6RtY4y=PnJasMo@*9wp*RfDDf=E|!GL<++;-rCx!ZnOu)B059cE0k z14M8AxyNF|XZk+ym-Pg0l2acxuuQK6s9#^d3uVVfV%JYVzQNm+S#I<4_lX9i9fn>SAX{G(K*v#Ta;{YWtr*t756B;i;TVN0;|Gi4>YQyZBNt^T0Ca-3!#0ea zJ?AAC?AytGtmfe)S;ELPq9kjkim}@QM zwF)RYg32jDpcg;oL*-C^YRqVQJqAV=T_B=sIpm@k!uot1_^Jzw-JELk#-^@(`RVM% z4NmVV2NH-n7`?(>iKGunL%3{16HuOFSpc)v1D>e+;=ltxEI3U6x@IK~qVV;sn0b?) z^gROLMRpJrqlsi{=lX<2C~7N%e!)7P&NEr`3#pais0uaEuXPi=GfVh4(&98Rr;QAT>=E`V?nDAZWFdSbqgz;B}~8{K!8GJ{(f5|=DQsrMsPz7 z=Z(6^Zwe?{8e^SfMD7ca!q&JU~huI zLVlwn+~!{9sk07KgI|AHZmS2reX>kEgu3B=3RkjsWk>_oD%@R6g!xIkXbe60W_kBq z>9$5eDjNrLePVTdZai`t$So-nHr{1=qt4k!09@Qx4qd7wCu131hsXV@v41wwN{6uY z7xf7@oB>Yxeo}1BY^F8@*8_Is9@Kk_JZ*6qM0O&(dNv6FLtER4mn!0>$NRmiI~6xS zXCf2ilmU6yHppRhYU1V6SX2RViuQsHBeSJ5_h9@UnK0}Ka6FW+WF=wgFNtxmbVO-a zm1Q;gXdq{Wz*;3HQ7>BNIRRWj+d8?4bi-N6 zYpXPt-oGD7zd-The1@559s2m+^JWM*MBlmOf08qu%iQ{#?@fWigl`L)+VeVfI6Um=^D{@dv9_`K-jp zi;yys4$Eu~dVHRof9xD@Zm|q2Z|HGC7B8{^*o{miK5`WIL1|)HwaHkW!yfd%PkjDt zZJer(ey|_wgW0X~k1~_;0Hr|in8;puJhrU?>Q{w@L$LPc|6d67|Eh%~fTaUKJ6TG@ z(jgQAmJS6RLXe{nphgm!NP=ZdzcjR98IhtV{PsAG?+=xPt)f$OVQCV+L(wdB0{sXv z>;%xFbr%+OHK689fZN4XW0wenjcwu6!)4v{R5mZHm1?o)B>s!uSfXM{^l(jBNF~GI zBu~mdsfU`g0nYOMNw%L680G~y%=^=98hKW6Umf%Z>64}gj;+EK2R7znAK|qK0IbNs zRg*Yvpf96W0Ez7ZL}yW18QkJO6Ij{R`W*L767*|$KEY#6t2Qb%%fSFws0ln+SWE~Q z9_120g_9Ex)qo9EON*#oavSc*Q#hNzQdt0I>slufWYtObr=LD=^8s%EPR6>TsKZvY zsRRIpb+E3^SrDYdzeSw6&)EUAtXIKndNNnwonpz*_w;ZbScMi=3MPycSAk*8=0}bI?HPo`bKYrTf0{!| zb)Z<09Fz$9E#C(-9$uP8q61^JCN^J3ynuU4U!+CE7h!Ft1kuM&!uf<<$um-umOHR( z<=mWX5PI7?ekbyG>#S{d#hSNupmx7H@V66eKTZrkD6MN_;Y z07`zYK3@4K0D&_57td!d+~3{%>p5l60!#`s5U=*s^CQRx+d9VUO>61pZxAj!f&~uy zkn^9K05E;3c}+3IZ&~cV8#p3T0mujVC#Q;qK1kn3Z_}S$h_E9zu z?mr~}#M(UBZ)mk|x?KpiFU;ZRvYPN%jy0B7;YNGI&ZUBW&B*IF;bIWv3k#^yWPF@t z34I#p;hpr|=@6dX<2OLc{Q5!$^8Nf5lSnr=VcyV$&>OHKG=W8UT4;+s^yb(+g6wUp zbQgc;lS?QpFEwVKT%J$*XnPpE=tx#2EW!u+@74G}FDhR9e4%n#Q}wacTS!Itn1SQA MPKRGv``-Nj0BKY4zyJUM diff --git a/packages/admin-sandbox/admin/index.css b/packages/admin-sandbox/admin/index.css deleted file mode 100644 index 646f08381d..0000000000 --- a/packages/admin-sandbox/admin/index.css +++ /dev/null @@ -1,11 +0,0 @@ -@import "@contember/admin/index.css"; -@import "@contember/react-devbar/index.css"; -@import "@contember/brand/index.css"; -@import "@contember/layout/index.css"; -@import "./components/ScrollView/ScrollView.css"; -@import "./components/messages/ui/EmptyState.css"; -@import "./components/messages/ui/MessageItem.css"; - -.whitespace-nowrap { - white-space: nowrap; -} diff --git a/packages/admin-sandbox/admin/index.html b/packages/admin-sandbox/admin/index.html deleted file mode 100644 index cc3d19226c..0000000000 --- a/packages/admin-sandbox/admin/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - Contember Admin Sandbox - - - - diff --git a/packages/admin-sandbox/admin/index.tsx b/packages/admin-sandbox/admin/index.tsx deleted file mode 100644 index 25c884e636..0000000000 --- a/packages/admin-sandbox/admin/index.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { ApplicationEntrypoint, PageModule, Pages, runReactApp } from '@contember/admin' -import { Directives, Slots } from '@contember/layout' -import { createRoot } from 'react-dom/client' -import { initialDirectives } from './components/Directives' -import { Layout, LayoutDevPanel, SafeAreasDevPanel, ThemeDevPanel } from './components/Layout' -import './index.css' - -runReactApp( - - - - - - - - } - children={( - './pages/**/*.tsx', - { eager: true }, - )} - />} - /> - - , - null, - (dom, react, onRecoverableError) => createRoot(dom, { onRecoverableError }).render(react), -) diff --git a/packages/admin-sandbox/admin/pages/ContentBlocks.tsx b/packages/admin-sandbox/admin/pages/ContentBlocks.tsx deleted file mode 100644 index 0af8c7ce27..0000000000 --- a/packages/admin-sandbox/admin/pages/ContentBlocks.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { Block, BlockRepeater, EditScope } from '@contember/admin' -import { SlotSources } from '../components/Slots' - -export const ContentBlockPage = ( - - Edit Content Block - - - - -) diff --git a/packages/admin-sandbox/admin/pages/actionableBoxes.tsx b/packages/admin-sandbox/admin/pages/actionableBoxes.tsx deleted file mode 100644 index 003c68ff52..0000000000 --- a/packages/admin-sandbox/admin/pages/actionableBoxes.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { ActionableBox, Card, Grid } from '@contember/ui' -import { useCallback } from 'react' -import { SlotSources } from '../components/Slots' - -export default () => ( - <> - Actionable Boxes - - - { - alert('Are you sure you want to remove this?') - }, [])} - > - - - - -) diff --git a/packages/admin-sandbox/admin/pages/articles.tsx b/packages/admin-sandbox/admin/pages/articles.tsx deleted file mode 100644 index 10158d11a6..0000000000 --- a/packages/admin-sandbox/admin/pages/articles.tsx +++ /dev/null @@ -1,207 +0,0 @@ -import { - AnchorButton, - Box, - CreateNewEntityButton, - CreateScope, - DataGridScope, - DeleteEntityButton, - Dropdown, - DropdownProps, - EditScope, - EnumCell, - Field, - FieldView, - GenericCell, - HasManySelectCell, - HasOneSelectCell, - LinkButton, - MultiEditScope, - NavigateBackLink, - noop, - NumberCell, - PersistButton, - RepeaterItem, - RepeaterItemProps, - SelectField, - Stack, - TextCell, - TextField, -} from '@contember/admin' -import { MoreVerticalIcon } from 'lucide-react' -import { CategoryForm } from '../components/CategoryForm' -import { Directive } from '../components/Directives' -import { EditOrCreateForm } from '../components/EditOrCreateForm' -import { SlotSources } from '../components/Slots' -import { - Repeater, - RepeaterSortable, - RepeaterSortableDragOverlay, - RepeaterSortableDropIndicator, - RepeaterSortableItemActivator, - RepeaterSortableItemNode, - RepeaterSortableEachItem, -} from '@contember/react-repeater-dnd-kit' - -import * as React from 'react' -import { DataGridTile } from '../components/DataGridTile' - - -const stateOptions = { - draft: 'Draft', - published: 'Published', - removed: 'Removed', -} - -export const list = () => ( - <> - Articles - - Add article - - - )} - tileSize={100} - > - - - - - - - - Edit - - - - - -) - -export const create = ( - <> - - Back to articles - - New Article - - - - -) - -const buttonProps: DropdownProps['buttonProps'] = { distinction: 'seamless', children: } - -export const edit = () => ( - <> - - Back to articles - - !entity.existsOnServer ? 'articles/list' : undefined} - > - ( - {`Edit ${title.getAccessor().value ? title.getAccessor().value : 'Article'}`} - )} /> - - - - - - - - - - -) - -export const categories = () => ( - <> - Categories - - , - }}> - - - -) - -const CustomRepeaterItem = (props: RepeaterItemProps) => { - return ( - - props.createNewEntity(undefined, props.index)}>Locales - - - ) -} - -const dropIndicatorEl =
- -export const tags = () => ( - <> - Tags - - }}> - - {/**/} - {/* */} - {/* */} - {/* */} - {/**/} - - - -
- - {dropIndicatorEl} - -
- - - -
handle
-
- } /> - -
-
-
- - {dropIndicatorEl} - -
-
- - - Dragging - - -
-
-
- -) - -export default list diff --git a/packages/admin-sandbox/admin/pages/auto.tsx b/packages/admin-sandbox/admin/pages/auto.tsx deleted file mode 100644 index 7b63e50f28..0000000000 --- a/packages/admin-sandbox/admin/pages/auto.tsx +++ /dev/null @@ -1,107 +0,0 @@ -import { - AutoForm, - AutoGrid, - DataBindingProvider, - EntityId, - FeedbackRenderer, - Link, - LinkButton, - NavigateBackLink, - PersistButton, - RoutingParameter, - useCurrentRequest, - useEnvironment, - LinkComponent, - useOnPersistSuccess, -} from '@contember/admin' -import { Directive } from '../components/Directives' -import { SlotSources } from '../components/Slots' - -const AutoGridList = () => { - const env = useEnvironment() - const schema = env.getSchema() - const entities = schema.getEntityNames().sort() - - return ( - <> - {entities.map(entity => ( - {entity} - ))} - - ) -} - -export default ( - <> - Auto Admin - - - - - -) - -const AutoLink: LinkComponent = ({ action, Component, children, entityId, entityName }) => ( - - {children} - -) - - -export function Grid() { - const request = useCurrentRequest()! - const entity = request.parameters.entity as string - const filter = request.parameters.id ? `[id = '${request.parameters.id}']` : '' - - const actions = ( - <> - Create - - - ) - - return ( - <> - - - - Back to Auto - - - {`List ${entity}`} - {actions} - - - - - ) -} - -export function Form() { - const request = useCurrentRequest()! - const entity = request.parameters.entity as string - const id = request.parameters.id as EntityId | undefined - const title = id ? `Edit ${entity}` : `Create ${entity}` - - const redirectOnSuccess = { pageName: 'auto/form', parameters: { entity, id: new RoutingParameter('entity.id') } } - const onCreateSuccess = useOnPersistSuccess({ redirectOnSuccess }) - const createEditLink = (entity: string) => ({ pageName: 'auto/form', parameters: { entity, id: new RoutingParameter('entity.id') } }) - - return ( - <> - {title} - - Back to Grid - - - - - - - - - - ) -} diff --git a/packages/admin-sandbox/admin/pages/boxes.tsx b/packages/admin-sandbox/admin/pages/boxes.tsx deleted file mode 100644 index 25f22a6ed8..0000000000 --- a/packages/admin-sandbox/admin/pages/boxes.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import { Box, Button, TextInput, TextareaInput } from '@contember/ui' -import { SendHorizontalIcon, TrashIcon } from 'lucide-react' -import { SlotSources } from '../components/Slots' - -export default () => ( - <> - Boxes - - A basic box with various paddings: - A box content - A box content - A box content - A box content - - Box with various paddings without borders: - A box content - A box content - A box content - A box content - - - Box with label and delete action: - }>A box content - - Box with a custom header, content and footer: - Header

} footer={}> - Lorem ipsum dolor sit amet - - - Box simulating a message input with a send button: - - - - - - - - - - - -) diff --git a/packages/admin-sandbox/admin/pages/brand.tsx b/packages/admin-sandbox/admin/pages/brand.tsx deleted file mode 100644 index 485c78b235..0000000000 --- a/packages/admin-sandbox/admin/pages/brand.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import { ContemberIdentitySvgProps, Identity2023 } from '@contember/brand' -import { Stack } from '@contember/ui' -import { FunctionComponent } from 'react' -import { SlotSources } from '../components/Slots' - -const list = Identity2023 as Record> - -export default ( - <> - Brand - - - {Object.keys(list).map(key => { - const Component = list[key] - return ( - - - {key} - - ) - })} - - -) diff --git a/packages/admin-sandbox/admin/pages/buttons.tsx b/packages/admin-sandbox/admin/pages/buttons.tsx deleted file mode 100644 index c0ba2b717b..0000000000 --- a/packages/admin-sandbox/admin/pages/buttons.tsx +++ /dev/null @@ -1,164 +0,0 @@ -import { Button, ButtonGroup, ButtonList, ButtonProps, Label, Select, Stack, Tag, TextInput, TextareaInput } from '@contember/admin' -import { ArrowLeftIcon, ArrowRightIcon } from 'lucide-react' -import { Fragment, useState } from 'react' -import { SlotSources } from '../components/Slots' - -export default () => { - const [accent, setAccent] = useState('theme') - const [size, setSize] = useState<'small' | 'medium' | 'large'>('medium') - - return ( - <> - Buttons - - - - - - setAccent(it ?? 'theme')} - /> - - - - - - - - hi - - {[ButtonList, ButtonGroup].map((Wrapper, index) => ( - -
- - - - - - - - - - - - - - - Lorem ipsum -
- -
- - - - - - - - - - - - - - - Lorem ipsum -
- -
- - - - - - - - - - - - - - - Lorem ipsum -
- -
- - - - - - - - - - - - - - - Lorem ipsum -
- -
- - - - - - - - - - - - - - - Lorem ipsum -
- -
- - - - - - - - - - - - - - - Lorem ipsum -
-
- ))} - - ) -} diff --git a/packages/admin-sandbox/admin/pages/chat.tsx b/packages/admin-sandbox/admin/pages/chat.tsx deleted file mode 100644 index b0ea125e1d..0000000000 --- a/packages/admin-sandbox/admin/pages/chat.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { useCallback, useState } from 'react' -import { ScrollView } from '../components/ScrollView/ScrollView' -import { SlotSources } from '../components/Slots' -import { MessageItem, MessageItemProps } from '../components/messages/ui/MessageItem' -import { NewMessageInput } from '../components/messages/ui/NewMessageInput' - -export default () => { - const [messages, setMessages] = useState([]) - - const onSend = useCallback((message: string) => { - setMessages(messages => [...messages, { message, mine: true, authorName: 'Jane Doe', createdAt: (new Date()).toISOString() }]) - }, []) - - return ( - <> - Chat - - - - {messages.map((message, index) => ( - - ))} - - - - - ) -} diff --git a/packages/admin-sandbox/admin/pages/examples.tsx b/packages/admin-sandbox/admin/pages/examples.tsx deleted file mode 100644 index b6073cd34f..0000000000 --- a/packages/admin-sandbox/admin/pages/examples.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { SlotSources } from '../components/Slots' - -export default () => { - return ( - <> - Examples - -

Say hi to examples

- - ) -} diff --git a/packages/admin-sandbox/admin/pages/fieldContainers.tsx b/packages/admin-sandbox/admin/pages/fieldContainers.tsx deleted file mode 100644 index de7902bb0f..0000000000 --- a/packages/admin-sandbox/admin/pages/fieldContainers.tsx +++ /dev/null @@ -1,150 +0,0 @@ -import { Button, ButtonGroup, Divider, FieldContainer, Label, Stack, TextInput } from '@contember/ui' -import { AlignCenterVerticalIcon, AlignEndVerticalIcon, AlignStartVerticalIcon, ColumnsIcon, RowsIcon, StretchHorizontalIcon } from 'lucide-react' -import { useState } from 'react' -import { SlotSources } from '../components/Slots' - -const errors = [{ message: 'Lorem ipsum error sit amet' }] - -export default () => { - const [direction, setDirection] = useState<'horizontal' | 'vertical'>('vertical') - const [align, setAlign] = useState<'start' | 'center' | 'end' | 'stretch'>('stretch') - - return ( - <> - FieldContainers - - - - - - - - - - - - - - - - - - - - - - - - - FieldContainer with various label positions: - Add} - errors={errors} - > - - - - - - Add} - errors={errors} - > - - - - - - Add} - > - - - - Add} - > - - - - Add} - - > - - - - Add} - > - - - - - - Add} - > - - - - Add} - > - - - - Add} - > - - - - Add} - > - - - - - ) -} diff --git a/packages/admin-sandbox/admin/pages/homepage.tsx b/packages/admin-sandbox/admin/pages/homepage.tsx deleted file mode 100644 index 1245a620a1..0000000000 --- a/packages/admin-sandbox/admin/pages/homepage.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { Button, EditScope, PersistButton, useEntity } from '@contember/admin' -import { AddContent } from '../components/AddContent' -import { ContentField } from '../components/ContentField' -import { SlotSources } from '../components/Slots' - -const DeleteBlocks = () => { - const entity = useEntity() - return -} - -export default ( - <> - Home Page - - - - - - - - - -) diff --git a/packages/admin-sandbox/admin/pages/index.tsx b/packages/admin-sandbox/admin/pages/index.tsx deleted file mode 100644 index e804e0492c..0000000000 --- a/packages/admin-sandbox/admin/pages/index.tsx +++ /dev/null @@ -1,412 +0,0 @@ -import { - Block, - Component, - DataGrid, - DiscriminatedBlocks, - EditScope, - EntityAccessor, - EntityId, - Field, - FileRepeater, - FileSelectionProps, - GenericCell, - HasOne, - ImageFileRepeater, - ImageFiles, - ImageUploadField, - Link, - PersistButton, - S3FileUploader, - StaticRender, - SugaredQualifiedEntityList, - TextCell, - TextField, - TextInput, - UploadField, - VideoFiles, -} from '@contember/admin' -import { DataGridTile } from '../components/DataGridTile' -import { FocalPointDialogOpener } from '../components/FocalPoint' -import { SlotSources } from '../components/Slots' - -const GalleryItemTile = Component(({ onClick, selectedEntityIds }: { - onClick?: (entity: EntityAccessor) => void - selectedEntityIds?: EntityId[] -}) => { - return - - - - - - - - - - - - - -}) -const GallerySelectForm = Component(( - { - onToggleSelect, - selectedEntityIds, - }: FileSelectionProps & {}) => ( - } - tileSize={260} - selectedEntityIds={selectedEntityIds} - onEntityClick={onToggleSelect} - > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -)) - -const ImageSelectForm = Component(( - { - entities, - onToggleSelect, - selectedEntityIds, - isComplex, - }: FileSelectionProps & { - entities: SugaredQualifiedEntityList['entities'] - isComplex: boolean - }) => ( - } - tileSize={260} - selectedEntityIds={selectedEntityIds} - onEntityClick={onToggleSelect} - > - - - - - - - - {isComplex && <> - - - - } - - - -)) - -const s3FileUploader = new S3FileUploader({ - getUploadOptions: file => ({ - fileSuffix: 'foobar', - fileName: file.name, - fileSize: file.size, - }), -}) - - -export default () => ( - - Welcome to Contember! - - - GO TO SECOND → - - - - - - - - - confirm - // Hide already attached entities (entityListAccessor) - - fileSelectionComponent={ImageSelectForm} - fileSelectionProps={{ - entities: 'BasicImage', - isComplex: false, - }} - - urlField="url" - widthField="width" - heightField="height" - fileSizeField="size" - fileTypeField="type" - > - - - - - - - - - - test test - - - - - - - - - - test test - - - - - - - - - - - - - - - - - - - - - - - - - - -) diff --git a/packages/admin-sandbox/admin/pages/inputs.tsx b/packages/admin-sandbox/admin/pages/inputs.tsx deleted file mode 100644 index d313095578..0000000000 --- a/packages/admin-sandbox/admin/pages/inputs.tsx +++ /dev/null @@ -1,126 +0,0 @@ -import { - Block, - BlockRepeater, - CheckboxField, - DateField, - DateTimeField, - DisplayTextField, - EditScope, - EmailField, - FieldContainer, - FloatField, - LocationField, - NumberField, - PasswordInput, - PersistButton, - RadioField, - SearchField, - SelectField, - SimpleRelativeSingleField, - SlugField, - Stack, - TextareaField, - TextareaFieldProps, - TextareaInput, - TextField, - TimeField, - UrlField, - useFieldControl, -} from '@contember/admin' -import { SlotSources } from '../components/Slots' - -export const JsonField = SimpleRelativeSingleField( - (fieldMetadata, { - style, - ...props - }) => { - const inputProps = useFieldControl({ - ...props, - fieldMetadata, - parse: val => val ? JSON.parse(val) : null, - format: val => val ? JSON.stringify(val) : null, - }) - - return - }, - 'JsonField', -) - -const SHOW_OVERRIDES = false - -const extraDebugProps = SHOW_OVERRIDES ? { - containerStyle: { outline: '1px solid red' }, - containerClassName: 'background-container', - style: { outline: '1px solid blue' }, - className: 'background-input', - onFocus: () => console.log('focus'), - onBlur: () => console.log('blur'), - onFocusChange: (state: boolean) => console.log(`focus change: ${state}`), -} : {} - -export default () => ( - - Inputs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -) diff --git a/packages/admin-sandbox/admin/pages/lorem.tsx b/packages/admin-sandbox/admin/pages/lorem.tsx deleted file mode 100644 index 75abe2a028..0000000000 --- a/packages/admin-sandbox/admin/pages/lorem.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import { SlotSources } from '../components/Slots' - -export default () => Hello from Lorem diff --git a/packages/admin-sandbox/admin/pages/messages.tsx b/packages/admin-sandbox/admin/pages/messages.tsx deleted file mode 100644 index ce4b1acf5e..0000000000 --- a/packages/admin-sandbox/admin/pages/messages.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import { Button, Message } from '@contember/ui' -import { CheckCircle2Icon } from 'lucide-react' -import { SlotSources } from '../components/Slots' - -export default () => ( - <> - Message - - Intent variants: - Default intent: positive - Intent: default - Intent: positive - Intent: negative - Intent: warn - Intent: danger - Intent: primary - Intent: secondary - - Elevated message with action and icon: - Click me} - icon={} - intent="success" - borderRadius="large" - > - Default - - - Important variant with semi-opaque background: - Important - - Border radius variants: - No border radius - Default - Border radius - Border radius: gap - Border radius: gutter - Border radius: padding - Border radius: large - Border radius: larger - - Size variants: - Small - Default - Large - - Padding variants: - Padding - No padding - Padding: gap - Padding: gutter - Padding: padding - Padding: large - Padding: larger - -) diff --git a/packages/admin-sandbox/admin/pages/nested/path.tsx b/packages/admin-sandbox/admin/pages/nested/path.tsx deleted file mode 100644 index b87be22e9b..0000000000 --- a/packages/admin-sandbox/admin/pages/nested/path.tsx +++ /dev/null @@ -1,89 +0,0 @@ -import { Section, SectionTabs, SectionTabsProvider, SelectFieldInner, Text } from '@contember/admin' -import { Directive } from '../../components/Directives' -import { SlotSources } from '../../components/Slots' - -export default function InnerFooPage() { - return ( - - Nested Path - - - - - - - - { }} - onClear={() => { }} - data={[ - { label: 'Option 1', value: '1', key: '1', searchKeywords: '1' }, - { label: 'Option 2', value: '2', key: '2', searchKeywords: '2' }, - { label: 'Option 3', value: '3', key: '3', searchKeywords: '3' }, - { label: 'Option 4', value: '4', key: '4', searchKeywords: '4' }, - { label: 'Option 5', value: '5', key: '5', searchKeywords: '5' }, - ]} - display="inline" - label="Select:" - labelPosition="left" - /> - - -

Hello from Inner Foo

-
- - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce arcu est, dignissim at varius vitae, egestas at enim. Cras at malesuada lacus. Sed pellentesque odio in sem malesuada, et feugiat tortor rutrum. Duis vel consectetur mi, sed vulputate quam. Suspendisse elementum sapien nec erat finibus rhoncus. Phasellus et enim et ante hendrerit tempor. In id venenatis felis. Nunc sed orci eu lectus euismod efficitur ornare at nisi. Sed egestas, eros eu dictum porta, enim nunc elementum nisl, et mollis dolor orci a tellus. Suspendisse potenti. Nunc sollicitudin id leo vitae aliquam. Nam efficitur nulla id tristique pulvinar. Nulla a efficitur ipsum, sit amet varius mi. Proin pulvinar dapibus tristique. - -
- -
- - Integer fermentum diam sed erat dictum, nec efficitur diam convallis. Duis sodales, tellus eget interdum lobortis, ex enim convallis ante, eget posuere purus leo quis mauris. Suspendisse iaculis, libero vel semper tempus, lectus nisi sodales purus, ut placerat magna augue eu mauris. Integer non sollicitudin augue. Praesent tempus non est ut semper. Fusce euismod leo at lorem gravida ornare. Vestibulum est metus, dapibus at ligula iaculis, euismod cursus nibh. Quisque vestibulum orci tortor, facilisis lacinia lacus placerat in. Morbi ornare libero vel urna ornare viverra. Fusce ac odio in arcu vehicula rhoncus vel eu enim. Curabitur feugiat porta pulvinar. Mauris in quam eleifend, aliquet arcu eget, blandit nisi. - -
- -
- - Etiam vel sapien sed leo consectetur maximus. Curabitur cursus, nisl gravida egestas porttitor, quam quam pulvinar velit, quis vulputate orci velit quis lorem. Maecenas at aliquet nibh. Proin non mi nisl. Nulla eget sapien vel nunc dapibus ornare eu luctus velit. Cras dictum maximus erat, eu sagittis eros tempus in. Quisque consectetur neque in felis luctus, a pharetra sapien aliquam. Etiam massa dui, volutpat eu faucibus sit amet, iaculis pulvinar sem. Aenean vitae hendrerit arcu. Donec nibh orci, sollicitudin quis maximus bibendum, egestas sed odio. Pellentesque vitae arcu fermentum purus accumsan convallis eget sit amet quam. Praesent elementum elementum massa, quis tempor elit porttitor congue. Fusce volutpat velit eget sapien interdum suscipit. Vestibulum ac malesuada nisi. Fusce non urna dictum, venenatis quam nec, dignissim lacus. Nulla gravida efficitur lectus, vel ultrices lacus placerat ac. - -
- -
- - Donec sit amet leo et massa ultricies pretium vitae tincidunt orci. Donec malesuada rhoncus iaculis. Nam sed aliquet sem. Vivamus vel congue leo. Pellentesque cursus enim quam, nec volutpat metus efficitur scelerisque. Proin sed leo ac dui commodo pulvinar ultrices eget augue. Donec sit amet mauris commodo, cursus orci non, bibendum risus. Cras a ante nisi. Suspendisse eu ligula at lacus semper posuere. Donec sodales lectus ut nisi consectetur consectetur. - -
- -
- - Duis eget nisi laoreet, hendrerit eros vel, molestie justo. Donec mollis orci et cursus dictum. Integer commodo posuere imperdiet. Duis eget vulputate neque, at porta tellus. Etiam vehicula euismod sem a sagittis. Fusce quis sem mattis, scelerisque est eget, posuere nunc. Aliquam erat volutpat. Quisque eget diam leo. Ut dapibus odio mi, vitae volutpat elit faucibus sed. Praesent eu faucibus dui. Quisque quis libero a sapien interdum egestas ut egestas enim. Etiam non ante orci. Etiam et condimentum sapien. Aenean fringilla urna imperdiet diam ornare dictum. Nullam at diam et est tincidunt placerat. Phasellus in magna vulputate, cursus tortor ac, laoreet massa. - -
- - - Hello Contember world from the sidebar! - - - - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce arcu est, dignissim at varius vitae, egestas at enim. Cras at malesuada lacus. Sed pellentesque odio in sem malesuada, et feugiat tortor rutrum. Duis vel consectetur mi, sed vulputate quam. Suspendisse elementum sapien nec erat finibus rhoncus. Phasellus et enim et ante hendrerit tempor. In id venenatis felis. Nunc sed orci eu lectus euismod efficitur ornare at nisi. Sed egestas, eros eu dictum porta, enim nunc elementum nisl, et mollis dolor orci a tellus. Suspendisse potenti. Nunc sollicitudin id leo vitae aliquam. Nam efficitur nulla id tristique pulvinar. Nulla a efficitur ipsum, sit amet varius mi. Proin pulvinar dapibus tristique. - - - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce arcu est, dignissim at varius vitae, egestas at enim. Cras at malesuada lacus. Sed pellentesque odio in sem malesuada, et feugiat tortor rutrum. Duis vel consectetur mi, sed vulputate quam. Suspendisse elementum sapien nec erat finibus rhoncus. Phasellus et enim et ante hendrerit tempor. In id venenatis felis. Nunc sed orci eu lectus euismod efficitur ornare at nisi. Sed egestas, eros eu dictum porta, enim nunc elementum nisl, et mollis dolor orci a tellus. Suspendisse potenti. Nunc sollicitudin id leo vitae aliquam. Nam efficitur nulla id tristique pulvinar. Nulla a efficitur ipsum, sit amet varius mi. Proin pulvinar dapibus tristique. - - - - - This should render is sidebar right body! - - - - I am in sidebarRight footer! - -
- ) -} diff --git a/packages/admin-sandbox/admin/pages/quiz.tsx b/packages/admin-sandbox/admin/pages/quiz.tsx deleted file mode 100644 index 5e26c1f3e2..0000000000 --- a/packages/admin-sandbox/admin/pages/quiz.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { Block, DiscriminatedBlocks, MultiEditScope, NumberField, PersistButton, TextField } from '@contember/admin' -import { SlotSources } from '../components/Slots' - -export default () => ( - <> - Quiz! - - , - }}> - - - - - - - - - - - - -) diff --git a/packages/admin-sandbox/admin/pages/random.tsx b/packages/admin-sandbox/admin/pages/random.tsx deleted file mode 100644 index 8dff1b7e49..0000000000 --- a/packages/admin-sandbox/admin/pages/random.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { SlotSources } from '../components/Slots' - -const { Title } = SlotSources - -export const foo = Hello from Foo -export const fooBar = Hello from Foo Bar -export const fooBar1 = Hello from Foo Bar 1 -export const fooBar2 = Hello from Foo Bar 2 -export const fooBar3 = Hello from Foo Bar 3 -export const fooBar4 = Hello from Foo Bar 4 -export const fooBarBaz = Hello from Foo Bar Baz -export const fooBarBaz1 = Hello from Foo Bar Baz 1 -export const fooBarBaz2 = Hello from Foo Bar Baz 2 -export const fooBarBaz3 = Hello from Foo Bar Baz 3 -export const fooBarBaz4 = Hello from Foo Bar Baz 4 -export const fooBarBaz5 = Hello from Foo Bar Baz 5 -export const fooBarBaz6 = Hello from Foo Bar Baz 6 -export const bar = Hello from Bar -export const lorem = Hello from Lorem diff --git a/packages/admin-sandbox/admin/pages/second.tsx b/packages/admin-sandbox/admin/pages/second.tsx deleted file mode 100644 index 95bcb0f52a..0000000000 --- a/packages/admin-sandbox/admin/pages/second.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { EditScope, NavigateBackLink } from '@contember/admin' -import { SlotSources } from '../components/Slots' - -export default () => ( - - - - - Second screen - - There is nothing here yet. - -) diff --git a/packages/admin-sandbox/admin/pages/seq.tsx b/packages/admin-sandbox/admin/pages/seq.tsx deleted file mode 100644 index 010c7c7956..0000000000 --- a/packages/admin-sandbox/admin/pages/seq.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import { - AnchorButton, - CreateScope, DataGridScope, - DeleteEntityButton, - EditScope, - FieldView, - GenericCell, - LinkButton, - PersistButton, - Repeater, - TextCell, - TextField, -} from '@contember/admin' -import { SlotSources } from '../components/Slots' - -export const list = ( - <> - List of Seqs - - New entity - - - - - - Edit - - - - -) - -export const create = ( - <> - Create a new Seq - - - - - -) - -export const edit = ( - <> - - ( - {`Edit ${title.getAccessor().value ? title.getAccessor().value : 'Article'}`} - )} /> - - - - - - - - - -) diff --git a/packages/admin-sandbox/admin/pages/settings.tsx b/packages/admin-sandbox/admin/pages/settings.tsx deleted file mode 100644 index 8fe24d58bc..0000000000 --- a/packages/admin-sandbox/admin/pages/settings.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { SlotSources } from '../components/Slots' - -export default ( - <> - Settings - -

Say hi to settings

- -) diff --git a/packages/admin-sandbox/admin/pages/settings/locales.tsx b/packages/admin-sandbox/admin/pages/settings/locales.tsx deleted file mode 100644 index 3903efb377..0000000000 --- a/packages/admin-sandbox/admin/pages/settings/locales.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { MultiEditScope, NavigateBackLink, PersistButton, TextField } from '@contember/admin' -import { SlotSources } from '../../components/Slots' - -export default () => ( - <> - Languages - Back - - }}> - - - - -) diff --git a/packages/admin-sandbox/admin/pages/slots.tsx b/packages/admin-sandbox/admin/pages/slots.tsx deleted file mode 100644 index f9a07dd33a..0000000000 --- a/packages/admin-sandbox/admin/pages/slots.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import { CommonSlotSources } from '@contember/layout' -import { omit } from '@contember/utilities' -import { SlotSources } from '../components/Slots' - -const style = - -export default () => { - return ( - <> - {style} -
- children -
- -
- Slot: title -
-
- {Object.entries(omit(SlotSources, ['Title'])).map(([key, Slot], index) => ( - -
-
Slot: {key}
-
-
- ))} - - ) -} - -export const fallback = () => ( - <> - -) diff --git a/packages/admin-sandbox/admin/pages/tenant.tsx b/packages/admin-sandbox/admin/pages/tenant.tsx deleted file mode 100644 index 35f707d1f3..0000000000 --- a/packages/admin-sandbox/admin/pages/tenant.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { EditUserPage, InviteUserPage, useEnvironment, UserListPage } from '@contember/admin' - -export const Users = () => { - return ( - - ) -} -export const Edit = () => { - const id = String(useEnvironment().getParameter('id')) - return ( - - ) -} - -export const Invite = () => { - return ( - - ) -} diff --git a/packages/admin-sandbox/admin/pages/textareas.tsx b/packages/admin-sandbox/admin/pages/textareas.tsx deleted file mode 100644 index 707ed43b7f..0000000000 --- a/packages/admin-sandbox/admin/pages/textareas.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { TextareaInput } from '@contember/ui' -import { range } from '@contember/utilities' -import { SlotSources } from '../components/Slots' - -const loremIpsumTexts = [ - 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce arcu est, dignissim at varius vitae, egestas at enim. Cras at malesuada lacus. Sed pellentesque odio in sem malesuada, et feugiat tortor rutrum. Duis vel consectetur mi, sed vulputate quam. Suspendisse elementum sapien nec erat finibus rhoncus. Phasellus et enim et ante hendrerit tempor. In id venenatis felis. Nunc sed orci eu lectus euismod efficitur ornare at nisi. Sed egestas, eros eu dictum porta, enim nunc elementum nisl, et mollis dolor orci a tellus. Suspendisse potenti. Nunc sollicitudin id leo vitae aliquam. Nam efficitur nulla id tristique pulvinar. Nulla a efficitur ipsum, sit amet varius mi. Proin pulvinar dapibus tristique.', - 'Integer fermentum diam sed erat dictum, nec efficitur diam convallis. Duis sodales, tellus eget interdum lobortis, ex enim convallis ante, eget posuere purus leo quis mauris. Suspendisse iaculis, libero vel semper tempus, lectus nisi sodales purus, ut placerat magna augue eu mauris. Integer non sollicitudin augue. Praesent tempus non est ut semper. Fusce euismod leo at lorem gravida ornare. Vestibulum est metus, dapibus at ligula iaculis, euismod cursus nibh. Quisque vestibulum orci tortor, facilisis lacinia lacus placerat in. Morbi ornare libero vel urna ornare viverra. Fusce ac odio in arcu vehicula rhoncus vel eu enim. Curabitur feugiat porta pulvinar. Mauris in quam eleifend, aliquet arcu eget, blandit nisi.', - 'Etiam vel sapien sed leo consectetur maximus. Curabitur cursus, nisl gravida egestas porttitor, quam quam pulvinar velit, quis vulputate orci velit quis lorem. Maecenas at aliquet nibh. Proin non mi nisl. Nulla eget sapien vel nunc dapibus ornare eu luctus velit. Cras dictum maximus erat, eu sagittis eros tempus in. Quisque consectetur neque in felis luctus, a pharetra sapien aliquam. Etiam massa dui, volutpat eu faucibus sit amet, iaculis pulvinar sem. Aenean vitae hendrerit arcu. Donec nibh orci, sollicitudin quis maximus bibendum, egestas sed odio. Pellentesque vitae arcu fermentum purus accumsan convallis eget sit amet quam. Praesent elementum elementum massa, quis tempor elit porttitor congue. Fusce volutpat velit eget sapien interdum suscipit. Vestibulum ac malesuada nisi. Fusce non urna dictum, venenatis quam nec, dignissim lacus. Nulla gravida efficitur lectus, vel ultrices lacus placerat ac.', - 'Donec sit amet leo et massa ultricies pretium vitae tincidunt orci. Donec malesuada rhoncus iaculis. Nam sed aliquet sem. Vivamus vel congue leo. Pellentesque cursus enim quam, nec volutpat metus efficitur scelerisque. Proin sed leo ac dui commodo pulvinar ultrices eget augue. Donec sit amet mauris commodo, cursus orci non, bibendum risus. Cras a ante nisi. Suspendisse eu ligula at lacus semper posuere. Donec sodales lectus ut nisi consectetur consectetur.', - 'Duis eget nisi laoreet, hendrerit eros vel, molestie justo. Donec mollis orci et cursus dictum. Integer commodo posuere imperdiet. Duis eget vulputate neque, at porta tellus. Etiam vehicula euismod sem a sagittis. Fusce quis sem mattis, scelerisque est eget, posuere nunc. Aliquam erat volutpat. Quisque eget diam leo. Ut dapibus odio mi, vitae volutpat elit faucibus sed. Praesent eu faucibus dui. Quisque quis libero a sapien interdum egestas ut egestas enim. Etiam non ante orci. Etiam et condimentum sapien. Aenean fringilla urna imperdiet diam ornare dictum. Nullam at diam et est tincidunt placerat. Phasellus in magna vulputate, cursus tortor ac, laoreet massa.', -] as const - -export default () => { - return ( - <> - Textareas - {range(1, 500).map(i => ( - - ))} - - ) -} diff --git a/packages/admin-sandbox/admin/tsconfig.json b/packages/admin-sandbox/admin/tsconfig.json deleted file mode 100644 index 17c30c5340..0000000000 --- a/packages/admin-sandbox/admin/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "../../../tsconfig.settings.json", - "compilerOptions": { - "noEmit": true, - "emitDeclarationOnly": false - }, - "references": [ - { "path": "../../admin/src" }, - { "path": "../../brand/src" }, - { "path": "../../layout/src" }, - { "path": "../../react-repeater-dnd-kit/src" }, - ] -} diff --git a/packages/admin-sandbox/admin/vite-env.d.ts b/packages/admin-sandbox/admin/vite-env.d.ts deleted file mode 100644 index 080ef2c8c7..0000000000 --- a/packages/admin-sandbox/admin/vite-env.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/// - -interface ImportMetaEnv { - VITE_CONTEMBER_ADMIN_API_BASE_URL: string - VITE_CONTEMBER_ADMIN_SESSION_TOKEN: string -} diff --git a/packages/admin-sandbox/api/index.ts b/packages/admin-sandbox/api/index.ts deleted file mode 100644 index 12374cde3b..0000000000 --- a/packages/admin-sandbox/api/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Schema } from '@contember/schema' -import { InputValidation, PermissionsBuilder, SchemaDefinition } from '@contember/schema-definition' -import * as modelDefinition from './model' -import { emptySchema } from '@contember/schema-utils' - -const model = SchemaDefinition.createModel(modelDefinition) - -const schema: Schema = { - ...emptySchema, - acl: { - roles: { - admin: { - variables: {}, - stages: '*', - entities: PermissionsBuilder.create(model).allowAll().allowCustomPrimary().permissions, - s3: { - '**': { - upload: { - maxSize: 1024 * 1024, - }, - read: true, - }, - - }, - }, - }, - }, - model: model, - validation: InputValidation.parseDefinition(modelDefinition), -} - -export default schema diff --git a/packages/admin-sandbox/api/migrations/2021-03-31-191433-init.json b/packages/admin-sandbox/api/migrations/2021-03-31-191433-init.json deleted file mode 100644 index 1d4a6f2d6c..0000000000 --- a/packages/admin-sandbox/api/migrations/2021-03-31-191433-init.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "formatVersion": 2, - "modifications": [ - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin", - "value": { - "variables": {}, - "stages": "*", - "entities": {} - } - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2021-06-16-140020-upload-showcase-1.json b/packages/admin-sandbox/api/migrations/2021-06-16-140020-upload-showcase-1.json deleted file mode 100644 index dd81eb1278..0000000000 --- a/packages/admin-sandbox/api/migrations/2021-06-16-140020-upload-showcase-1.json +++ /dev/null @@ -1,509 +0,0 @@ -{ - "formatVersion": 2, - "modifications": [ - { - "modification": "createEnum", - "enumName": "UploadShowcaseUnique", - "values": [ - "One" - ] - }, - { - "modification": "createEntity", - "entity": { - "name": "Image1", - "primary": "id", - "primaryColumn": "id", - "tableName": "image1", - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "unique": {} - } - }, - { - "modification": "createEntity", - "entity": { - "name": "Image2", - "primary": "id", - "primaryColumn": "id", - "tableName": "image2", - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "unique": {} - } - }, - { - "modification": "createEntity", - "entity": { - "name": "Image3", - "primary": "id", - "primaryColumn": "id", - "tableName": "image3", - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "unique": {} - } - }, - { - "modification": "createEntity", - "entity": { - "name": "UploadShowcase", - "primary": "id", - "primaryColumn": "id", - "tableName": "upload_showcase", - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "unique": {} - } - }, - { - "modification": "createColumn", - "entityName": "Image1", - "field": { - "name": "url", - "columnName": "url", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "Image2", - "field": { - "name": "url", - "columnName": "url", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "Image2", - "field": { - "name": "width", - "columnName": "width", - "nullable": true, - "type": "Integer", - "columnType": "integer" - } - }, - { - "modification": "createColumn", - "entityName": "Image2", - "field": { - "name": "height", - "columnName": "height", - "nullable": true, - "type": "Integer", - "columnType": "integer" - } - }, - { - "modification": "createColumn", - "entityName": "Image2", - "field": { - "name": "size", - "columnName": "size", - "nullable": true, - "type": "Integer", - "columnType": "integer" - } - }, - { - "modification": "createColumn", - "entityName": "Image2", - "field": { - "name": "type", - "columnName": "type", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "Image3", - "field": { - "name": "url", - "columnName": "url", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "Image3", - "field": { - "name": "width", - "columnName": "width", - "nullable": true, - "type": "Integer", - "columnType": "integer" - } - }, - { - "modification": "createColumn", - "entityName": "Image3", - "field": { - "name": "height", - "columnName": "height", - "nullable": true, - "type": "Integer", - "columnType": "integer" - } - }, - { - "modification": "createColumn", - "entityName": "Image3", - "field": { - "name": "size", - "columnName": "size", - "nullable": true, - "type": "Integer", - "columnType": "integer" - } - }, - { - "modification": "createColumn", - "entityName": "Image3", - "field": { - "name": "type", - "columnName": "type", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "Image3", - "field": { - "name": "fileName", - "columnName": "file_name", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "Image3", - "field": { - "name": "base64", - "columnName": "base64", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "Image3", - "field": { - "name": "alt", - "columnName": "alt", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "UploadShowcase", - "field": { - "name": "unique", - "columnName": "unique", - "nullable": false, - "type": "Enum", - "columnType": "UploadShowcaseUnique" - } - }, - { - "modification": "createRelation", - "entityName": "UploadShowcase", - "owningSide": { - "name": "single1", - "nullable": true, - "type": "OneHasOne", - "target": "Image1", - "joiningColumn": { - "columnName": "single1_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "createRelation", - "entityName": "UploadShowcase", - "owningSide": { - "name": "single2", - "nullable": true, - "type": "OneHasOne", - "target": "Image2", - "joiningColumn": { - "columnName": "single2_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "createRelation", - "entityName": "UploadShowcase", - "owningSide": { - "name": "single3", - "nullable": true, - "type": "OneHasOne", - "target": "Image3", - "joiningColumn": { - "columnName": "single3_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "createRelation", - "entityName": "UploadShowcase", - "owningSide": { - "type": "ManyHasMany", - "name": "multiple1", - "target": "Image1", - "joiningTable": { - "tableName": "upload_showcase_multiple1", - "joiningColumn": { - "columnName": "upload_showcase_id", - "onDelete": "cascade" - }, - "inverseJoiningColumn": { - "columnName": "image1_id", - "onDelete": "cascade" - } - } - } - }, - { - "modification": "createRelation", - "entityName": "UploadShowcase", - "owningSide": { - "type": "ManyHasMany", - "name": "multiple2", - "target": "Image2", - "joiningTable": { - "tableName": "upload_showcase_multiple2", - "joiningColumn": { - "columnName": "upload_showcase_id", - "onDelete": "cascade" - }, - "inverseJoiningColumn": { - "columnName": "image2_id", - "onDelete": "cascade" - } - } - } - }, - { - "modification": "createRelation", - "entityName": "UploadShowcase", - "owningSide": { - "type": "ManyHasMany", - "name": "multiple3", - "target": "Image3", - "joiningTable": { - "tableName": "upload_showcase_multiple3", - "joiningColumn": { - "columnName": "upload_showcase_id", - "onDelete": "cascade" - }, - "inverseJoiningColumn": { - "columnName": "image3_id", - "onDelete": "cascade" - } - } - } - }, - { - "modification": "createUniqueConstraint", - "entityName": "UploadShowcase", - "unique": { - "fields": [ - "unique" - ], - "name": "unique_UploadShowcase_unique_139768" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/Image1", - "value": { - "predicates": {}, - "operations": { - "read": { - "id": true, - "url": true - }, - "update": { - "id": true, - "url": true - }, - "create": { - "id": true, - "url": true - }, - "delete": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/Image2", - "value": { - "predicates": {}, - "operations": { - "read": { - "id": true, - "url": true, - "width": true, - "height": true, - "size": true, - "type": true - }, - "update": { - "id": true, - "url": true, - "width": true, - "height": true, - "size": true, - "type": true - }, - "create": { - "id": true, - "url": true, - "width": true, - "height": true, - "size": true, - "type": true - }, - "delete": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/Image3", - "value": { - "predicates": {}, - "operations": { - "read": { - "id": true, - "url": true, - "width": true, - "height": true, - "size": true, - "type": true, - "fileName": true, - "base64": true, - "alt": true - }, - "update": { - "id": true, - "url": true, - "width": true, - "height": true, - "size": true, - "type": true, - "fileName": true, - "base64": true, - "alt": true - }, - "create": { - "id": true, - "url": true, - "width": true, - "height": true, - "size": true, - "type": true, - "fileName": true, - "base64": true, - "alt": true - }, - "delete": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase", - "value": { - "predicates": {}, - "operations": { - "read": { - "id": true, - "unique": true, - "single1": true, - "single2": true, - "single3": true, - "multiple1": true, - "multiple2": true, - "multiple3": true - }, - "update": { - "id": true, - "unique": true, - "single1": true, - "single2": true, - "single3": true, - "multiple1": true, - "multiple2": true, - "multiple3": true - }, - "create": { - "id": true, - "unique": true, - "single1": true, - "single2": true, - "single3": true, - "multiple1": true, - "multiple2": true, - "multiple3": true - }, - "delete": true - } - } - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2021-06-17-131916-upload-showcase-2.json b/packages/admin-sandbox/api/migrations/2021-06-17-131916-upload-showcase-2.json deleted file mode 100644 index 5aef185f6c..0000000000 --- a/packages/admin-sandbox/api/migrations/2021-06-17-131916-upload-showcase-2.json +++ /dev/null @@ -1,943 +0,0 @@ -{ - "formatVersion": 2, - "modifications": [ - { - "modification": "removeField", - "entityName": "UploadShowcase", - "fieldName": "single1" - }, - { - "modification": "removeField", - "entityName": "UploadShowcase", - "fieldName": "single2" - }, - { - "modification": "removeField", - "entityName": "UploadShowcase", - "fieldName": "single3" - }, - { - "modification": "removeField", - "entityName": "UploadShowcase", - "fieldName": "multiple1" - }, - { - "modification": "removeField", - "entityName": "UploadShowcase", - "fieldName": "multiple2" - }, - { - "modification": "removeField", - "entityName": "UploadShowcase", - "fieldName": "multiple3" - }, - { - "modification": "removeEntity", - "entityName": "Image1" - }, - { - "modification": "removeEntity", - "entityName": "Image2" - }, - { - "modification": "removeEntity", - "entityName": "Image3" - }, - { - "modification": "createEnum", - "enumName": "ComplexFileListItemType", - "values": [ - "image", - "video" - ] - }, - { - "modification": "createEnum", - "enumName": "One", - "values": [ - "One" - ] - }, - { - "modification": "updateColumnDefinition", - "entityName": "UploadShowcase", - "fieldName": "unique", - "definition": { - "nullable": false, - "type": "Enum", - "columnType": "One" - } - }, - { - "modification": "createEntity", - "entity": { - "name": "TrivialImage", - "primary": "id", - "primaryColumn": "id", - "tableName": "trivial_image", - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "unique": {} - } - }, - { - "modification": "createEntity", - "entity": { - "name": "BasicImage", - "primary": "id", - "primaryColumn": "id", - "tableName": "basic_image", - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "unique": {} - } - }, - { - "modification": "createEntity", - "entity": { - "name": "ComplexImage", - "primary": "id", - "primaryColumn": "id", - "tableName": "complex_image", - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "unique": {} - } - }, - { - "modification": "createEntity", - "entity": { - "name": "BasicVideo", - "primary": "id", - "primaryColumn": "id", - "tableName": "basic_video", - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "unique": {} - } - }, - { - "modification": "createEntity", - "entity": { - "name": "ComplexImageList", - "primary": "id", - "primaryColumn": "id", - "tableName": "complex_image_list", - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "unique": {} - } - }, - { - "modification": "createEntity", - "entity": { - "name": "ComplexImageListItem", - "primary": "id", - "primaryColumn": "id", - "tableName": "complex_image_list_item", - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "unique": {} - } - }, - { - "modification": "createEntity", - "entity": { - "name": "ComplexFileList", - "primary": "id", - "primaryColumn": "id", - "tableName": "complex_file_list", - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "unique": {} - } - }, - { - "modification": "createEntity", - "entity": { - "name": "ComplexFileListItem", - "primary": "id", - "primaryColumn": "id", - "tableName": "complex_file_list_item", - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "unique": {} - } - }, - { - "modification": "createColumn", - "entityName": "TrivialImage", - "field": { - "name": "url", - "columnName": "url", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "BasicImage", - "field": { - "name": "url", - "columnName": "url", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "BasicImage", - "field": { - "name": "width", - "columnName": "width", - "nullable": true, - "type": "Integer", - "columnType": "integer" - } - }, - { - "modification": "createColumn", - "entityName": "BasicImage", - "field": { - "name": "height", - "columnName": "height", - "nullable": true, - "type": "Integer", - "columnType": "integer" - } - }, - { - "modification": "createColumn", - "entityName": "BasicImage", - "field": { - "name": "size", - "columnName": "size", - "nullable": true, - "type": "Integer", - "columnType": "integer" - } - }, - { - "modification": "createColumn", - "entityName": "BasicImage", - "field": { - "name": "type", - "columnName": "type", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "ComplexImage", - "field": { - "name": "url", - "columnName": "url", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "ComplexImage", - "field": { - "name": "width", - "columnName": "width", - "nullable": true, - "type": "Integer", - "columnType": "integer" - } - }, - { - "modification": "createColumn", - "entityName": "ComplexImage", - "field": { - "name": "height", - "columnName": "height", - "nullable": true, - "type": "Integer", - "columnType": "integer" - } - }, - { - "modification": "createColumn", - "entityName": "ComplexImage", - "field": { - "name": "size", - "columnName": "size", - "nullable": true, - "type": "Integer", - "columnType": "integer" - } - }, - { - "modification": "createColumn", - "entityName": "ComplexImage", - "field": { - "name": "type", - "columnName": "type", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "ComplexImage", - "field": { - "name": "fileName", - "columnName": "file_name", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "ComplexImage", - "field": { - "name": "base64", - "columnName": "base64", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "ComplexImage", - "field": { - "name": "alt", - "columnName": "alt", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "BasicVideo", - "field": { - "name": "url", - "columnName": "url", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "BasicVideo", - "field": { - "name": "width", - "columnName": "width", - "nullable": true, - "type": "Integer", - "columnType": "integer" - } - }, - { - "modification": "createColumn", - "entityName": "BasicVideo", - "field": { - "name": "height", - "columnName": "height", - "nullable": true, - "type": "Integer", - "columnType": "integer" - } - }, - { - "modification": "createColumn", - "entityName": "BasicVideo", - "field": { - "name": "size", - "columnName": "size", - "nullable": true, - "type": "Integer", - "columnType": "integer" - } - }, - { - "modification": "createColumn", - "entityName": "BasicVideo", - "field": { - "name": "type", - "columnName": "type", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "ComplexImageListItem", - "field": { - "name": "order", - "columnName": "order", - "nullable": false, - "type": "Integer", - "columnType": "integer" - } - }, - { - "modification": "createColumn", - "entityName": "ComplexFileListItem", - "field": { - "name": "order", - "columnName": "order", - "nullable": false, - "type": "Integer", - "columnType": "integer" - } - }, - { - "modification": "createColumn", - "entityName": "ComplexFileListItem", - "field": { - "name": "type", - "columnName": "type", - "nullable": false, - "type": "Enum", - "columnType": "ComplexFileListItemType" - } - }, - { - "modification": "createRelation", - "entityName": "ComplexImageListItem", - "owningSide": { - "name": "list", - "inversedBy": "items", - "nullable": false, - "type": "ManyHasOne", - "target": "ComplexImageList", - "joiningColumn": { - "columnName": "list_id", - "onDelete": "cascade" - } - }, - "inverseSide": { - "name": "items", - "ownedBy": "list", - "type": "OneHasMany", - "target": "ComplexImageListItem" - } - }, - { - "modification": "createRelation", - "entityName": "ComplexImageListItem", - "owningSide": { - "name": "image", - "nullable": true, - "type": "OneHasOne", - "target": "ComplexImage", - "joiningColumn": { - "columnName": "image_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "createRelation", - "entityName": "ComplexFileListItem", - "owningSide": { - "name": "list", - "inversedBy": "items", - "nullable": false, - "type": "ManyHasOne", - "target": "ComplexFileList", - "joiningColumn": { - "columnName": "list_id", - "onDelete": "cascade" - } - }, - "inverseSide": { - "name": "items", - "ownedBy": "list", - "type": "OneHasMany", - "target": "ComplexFileListItem" - } - }, - { - "modification": "createRelation", - "entityName": "ComplexFileListItem", - "owningSide": { - "name": "image", - "nullable": true, - "type": "OneHasOne", - "target": "ComplexImage", - "joiningColumn": { - "columnName": "image_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "createRelation", - "entityName": "ComplexFileListItem", - "owningSide": { - "name": "video", - "nullable": true, - "type": "OneHasOne", - "target": "BasicVideo", - "joiningColumn": { - "columnName": "video_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "createRelation", - "entityName": "UploadShowcase", - "owningSide": { - "name": "single1", - "nullable": true, - "type": "OneHasOne", - "target": "TrivialImage", - "joiningColumn": { - "columnName": "single1_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "createRelation", - "entityName": "UploadShowcase", - "owningSide": { - "name": "single2", - "nullable": true, - "type": "OneHasOne", - "target": "BasicImage", - "joiningColumn": { - "columnName": "single2_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "createRelation", - "entityName": "UploadShowcase", - "owningSide": { - "name": "single3", - "nullable": true, - "type": "OneHasOne", - "target": "ComplexImage", - "joiningColumn": { - "columnName": "single3_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "createRelation", - "entityName": "UploadShowcase", - "owningSide": { - "name": "imageList", - "nullable": true, - "type": "OneHasOne", - "target": "ComplexImageList", - "joiningColumn": { - "columnName": "image_list_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "createRelation", - "entityName": "UploadShowcase", - "owningSide": { - "name": "fileList", - "nullable": true, - "type": "OneHasOne", - "target": "ComplexImageList", - "joiningColumn": { - "columnName": "file_list_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "removeEnum", - "enumName": "UploadShowcaseUnique" - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/TrivialImage", - "value": { - "predicates": {}, - "operations": { - "read": { - "id": true, - "url": true - }, - "update": { - "id": true, - "url": true - }, - "create": { - "id": true, - "url": true - }, - "delete": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/BasicImage", - "value": { - "predicates": {}, - "operations": { - "read": { - "id": true, - "url": true, - "width": true, - "height": true, - "size": true, - "type": true - }, - "update": { - "id": true, - "url": true, - "width": true, - "height": true, - "size": true, - "type": true - }, - "create": { - "id": true, - "url": true, - "width": true, - "height": true, - "size": true, - "type": true - }, - "delete": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/ComplexImage", - "value": { - "predicates": {}, - "operations": { - "read": { - "id": true, - "url": true, - "width": true, - "height": true, - "size": true, - "type": true, - "fileName": true, - "base64": true, - "alt": true - }, - "update": { - "id": true, - "url": true, - "width": true, - "height": true, - "size": true, - "type": true, - "fileName": true, - "base64": true, - "alt": true - }, - "create": { - "id": true, - "url": true, - "width": true, - "height": true, - "size": true, - "type": true, - "fileName": true, - "base64": true, - "alt": true - }, - "delete": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/BasicVideo", - "value": { - "predicates": {}, - "operations": { - "read": { - "id": true, - "url": true, - "width": true, - "height": true, - "size": true, - "type": true - }, - "update": { - "id": true, - "url": true, - "width": true, - "height": true, - "size": true, - "type": true - }, - "create": { - "id": true, - "url": true, - "width": true, - "height": true, - "size": true, - "type": true - }, - "delete": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/ComplexImageList", - "value": { - "predicates": {}, - "operations": { - "read": { - "id": true, - "items": true - }, - "update": { - "id": true, - "items": true - }, - "create": { - "id": true, - "items": true - }, - "delete": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/ComplexImageListItem", - "value": { - "predicates": {}, - "operations": { - "read": { - "id": true, - "list": true, - "order": true, - "image": true - }, - "update": { - "id": true, - "list": true, - "order": true, - "image": true - }, - "create": { - "id": true, - "list": true, - "order": true, - "image": true - }, - "delete": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/ComplexFileList", - "value": { - "predicates": {}, - "operations": { - "read": { - "id": true, - "items": true - }, - "update": { - "id": true, - "items": true - }, - "create": { - "id": true, - "items": true - }, - "delete": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/ComplexFileListItem", - "value": { - "predicates": {}, - "operations": { - "read": { - "id": true, - "list": true, - "order": true, - "type": true, - "image": true, - "video": true - }, - "update": { - "id": true, - "list": true, - "order": true, - "type": true, - "image": true, - "video": true - }, - "create": { - "id": true, - "list": true, - "order": true, - "type": true, - "image": true, - "video": true - }, - "delete": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/create/single1", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/create/single2", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/create/single3", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/create/imageList", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/create/fileList", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/update/single1", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/update/single2", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/update/single3", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/update/imageList", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/update/fileList", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/read/single1", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/read/single2", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/read/single3", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/read/imageList", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/read/fileList", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2021-06-17-132344-upload-showcase-3.json b/packages/admin-sandbox/api/migrations/2021-06-17-132344-upload-showcase-3.json deleted file mode 100644 index 3714caed6a..0000000000 --- a/packages/admin-sandbox/api/migrations/2021-06-17-132344-upload-showcase-3.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "formatVersion": 2, - "modifications": [ - { - "modification": "removeField", - "entityName": "UploadShowcase", - "fieldName": "fileList" - }, - { - "modification": "createRelation", - "entityName": "UploadShowcase", - "owningSide": { - "name": "fileList", - "nullable": true, - "type": "OneHasOne", - "target": "ComplexFileList", - "joiningColumn": { - "columnName": "file_list_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/create/fileList", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/update/fileList", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/read/fileList", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2021-06-17-141503-upload-showcase-4.json b/packages/admin-sandbox/api/migrations/2021-06-17-141503-upload-showcase-4.json deleted file mode 100644 index 49fd22d9a0..0000000000 --- a/packages/admin-sandbox/api/migrations/2021-06-17-141503-upload-showcase-4.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "formatVersion": 2, - "modifications": [ - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/s3", - "value": { - "**": { - "upload": true, - "read": true - } - } - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2021-06-21-190833-upload-showcase-5.json b/packages/admin-sandbox/api/migrations/2021-06-21-190833-upload-showcase-5.json deleted file mode 100644 index b1f1650488..0000000000 --- a/packages/admin-sandbox/api/migrations/2021-06-21-190833-upload-showcase-5.json +++ /dev/null @@ -1,235 +0,0 @@ -{ - "formatVersion": 2, - "modifications": [ - { - "modification": "removeField", - "entityName": "UploadShowcase", - "fieldName": "single1" - }, - { - "modification": "removeField", - "entityName": "UploadShowcase", - "fieldName": "single2" - }, - { - "modification": "removeField", - "entityName": "UploadShowcase", - "fieldName": "single3" - }, - { - "modification": "createEnum", - "enumName": "DiscriminatedAttachmentType", - "values": [ - "image", - "video" - ] - }, - { - "modification": "createEntity", - "entity": { - "name": "DiscriminatedAttachment", - "primary": "id", - "primaryColumn": "id", - "tableName": "discriminated_attachment", - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "unique": {} - } - }, - { - "modification": "createColumn", - "entityName": "DiscriminatedAttachment", - "field": { - "name": "type", - "columnName": "type", - "nullable": true, - "type": "Enum", - "columnType": "DiscriminatedAttachmentType" - } - }, - { - "modification": "createRelation", - "entityName": "DiscriminatedAttachment", - "owningSide": { - "name": "image", - "nullable": true, - "type": "OneHasOne", - "target": "ComplexImage", - "joiningColumn": { - "columnName": "image_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "createRelation", - "entityName": "DiscriminatedAttachment", - "owningSide": { - "name": "video", - "nullable": true, - "type": "OneHasOne", - "target": "BasicVideo", - "joiningColumn": { - "columnName": "video_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "createRelation", - "entityName": "UploadShowcase", - "owningSide": { - "name": "singleTrivialImage", - "nullable": true, - "type": "OneHasOne", - "target": "TrivialImage", - "joiningColumn": { - "columnName": "single_trivial_image_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "createRelation", - "entityName": "UploadShowcase", - "owningSide": { - "name": "singleBasicImage", - "nullable": true, - "type": "OneHasOne", - "target": "BasicImage", - "joiningColumn": { - "columnName": "single_basic_image_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "createRelation", - "entityName": "UploadShowcase", - "owningSide": { - "name": "singleComplexImage", - "nullable": true, - "type": "OneHasOne", - "target": "ComplexImage", - "joiningColumn": { - "columnName": "single_complex_image_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "createRelation", - "entityName": "UploadShowcase", - "owningSide": { - "name": "discriminatedAttachment", - "nullable": true, - "type": "OneHasOne", - "target": "DiscriminatedAttachment", - "joiningColumn": { - "columnName": "discriminated_attachment_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/DiscriminatedAttachment", - "value": { - "predicates": {}, - "operations": { - "read": { - "id": true, - "type": true, - "image": true, - "video": true - }, - "update": { - "id": true, - "type": true, - "image": true, - "video": true - }, - "create": { - "id": true, - "type": true, - "image": true, - "video": true - }, - "delete": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/create/singleTrivialImage", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/create/singleBasicImage", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/create/singleComplexImage", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/create/discriminatedAttachment", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/update/singleTrivialImage", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/update/singleBasicImage", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/update/singleComplexImage", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/update/discriminatedAttachment", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/read/singleTrivialImage", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/read/singleBasicImage", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/read/singleComplexImage", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/read/discriminatedAttachment", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2021-06-29-111902-sandbox-prepare-api-for-blockeditor.json b/packages/admin-sandbox/api/migrations/2021-06-29-111902-sandbox-prepare-api-for-blockeditor.json deleted file mode 100644 index 99677b3e92..0000000000 --- a/packages/admin-sandbox/api/migrations/2021-06-29-111902-sandbox-prepare-api-for-blockeditor.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "formatVersion": 2, - "modifications": [ - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/customPrimary", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/TrivialImage/operations/customPrimary", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/BasicImage/operations/customPrimary", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/ComplexImage/operations/customPrimary", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/BasicVideo/operations/customPrimary", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/ComplexImageList/operations/customPrimary", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/ComplexImageListItem/operations/customPrimary", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/ComplexFileList/operations/customPrimary", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/ComplexFileListItem/operations/customPrimary", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/DiscriminatedAttachment/operations/customPrimary", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2021-09-10-121941-fields.json b/packages/admin-sandbox/api/migrations/2021-09-10-121941-fields.json deleted file mode 100644 index 0d0d01a8d2..0000000000 --- a/packages/admin-sandbox/api/migrations/2021-09-10-121941-fields.json +++ /dev/null @@ -1,250 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createEnum", - "enumName": "SomeEnum", - "values": [ - "a", - "b", - "c" - ] - }, - { - "modification": "createEntity", - "entity": { - "name": "InputShowcase", - "primary": "id", - "primaryColumn": "id", - "unique": {}, - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "tableName": "input_showcase" - } - }, - { - "modification": "createColumn", - "entityName": "InputShowcase", - "field": { - "name": "unique", - "columnName": "unique", - "nullable": false, - "type": "Enum", - "columnType": "One" - } - }, - { - "modification": "createColumn", - "entityName": "InputShowcase", - "field": { - "name": "textValue", - "columnName": "text_value", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "InputShowcase", - "field": { - "name": "slugValue", - "columnName": "slug_value", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "InputShowcase", - "field": { - "name": "multilineValue", - "columnName": "multiline_value", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "InputShowcase", - "field": { - "name": "boolValue", - "columnName": "bool_value", - "nullable": true, - "type": "Bool", - "columnType": "boolean" - } - }, - { - "modification": "createColumn", - "entityName": "InputShowcase", - "field": { - "name": "intValue", - "columnName": "int_value", - "nullable": true, - "type": "Integer", - "columnType": "integer" - } - }, - { - "modification": "createColumn", - "entityName": "InputShowcase", - "field": { - "name": "floatValue", - "columnName": "float_value", - "nullable": true, - "type": "Double", - "columnType": "double precision" - } - }, - { - "modification": "createColumn", - "entityName": "InputShowcase", - "field": { - "name": "dateValue", - "columnName": "date_value", - "nullable": true, - "type": "Date", - "columnType": "date" - } - }, - { - "modification": "createColumn", - "entityName": "InputShowcase", - "field": { - "name": "dateTimeValue", - "columnName": "date_time_value", - "nullable": true, - "type": "DateTime", - "columnType": "timestamptz" - } - }, - { - "modification": "createColumn", - "entityName": "InputShowcase", - "field": { - "name": "gpsLatValue", - "columnName": "gps_lat_value", - "nullable": true, - "type": "Double", - "columnType": "double precision" - } - }, - { - "modification": "createColumn", - "entityName": "InputShowcase", - "field": { - "name": "gpsLonValue", - "columnName": "gps_lon_value", - "nullable": true, - "type": "Double", - "columnType": "double precision" - } - }, - { - "modification": "createColumn", - "entityName": "InputShowcase", - "field": { - "name": "enumValue", - "columnName": "enum_value", - "nullable": true, - "type": "Enum", - "columnType": "SomeEnum" - } - }, - { - "modification": "createColumn", - "entityName": "InputShowcase", - "field": { - "name": "selectValue", - "columnName": "select_value", - "nullable": true, - "type": "Enum", - "columnType": "SomeEnum" - } - }, - { - "modification": "createUniqueConstraint", - "entityName": "InputShowcase", - "unique": { - "fields": [ - "unique" - ], - "name": "unique_InputShowcase_unique_e48fad" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/InputShowcase", - "value": { - "predicates": {}, - "operations": { - "create": { - "id": true, - "unique": true, - "textValue": true, - "slugValue": true, - "multilineValue": true, - "boolValue": true, - "intValue": true, - "floatValue": true, - "dateValue": true, - "dateTimeValue": true, - "gpsLatValue": true, - "gpsLonValue": true, - "enumValue": true, - "selectValue": true - }, - "read": { - "id": true, - "unique": true, - "textValue": true, - "slugValue": true, - "multilineValue": true, - "boolValue": true, - "intValue": true, - "floatValue": true, - "dateValue": true, - "dateTimeValue": true, - "gpsLatValue": true, - "gpsLonValue": true, - "enumValue": true, - "selectValue": true - }, - "update": { - "id": true, - "unique": true, - "textValue": true, - "slugValue": true, - "multilineValue": true, - "boolValue": true, - "intValue": true, - "floatValue": true, - "dateValue": true, - "dateTimeValue": true, - "gpsLatValue": true, - "gpsLonValue": true, - "enumValue": true, - "selectValue": true - }, - "delete": true, - "customPrimary": true - } - } - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2021-09-13-080032-content.json b/packages/admin-sandbox/api/migrations/2021-09-13-080032-content.json deleted file mode 100644 index 4ae70bf4e1..0000000000 --- a/packages/admin-sandbox/api/migrations/2021-09-13-080032-content.json +++ /dev/null @@ -1,364 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createEnum", - "enumName": "ContentReferenceType", - "values": [ - "image", - "quote" - ] - }, - { - "modification": "createEntity", - "entity": { - "name": "Content", - "primary": "id", - "primaryColumn": "id", - "unique": {}, - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "tableName": "content" - } - }, - { - "modification": "createEntity", - "entity": { - "name": "ContentBlock", - "primary": "id", - "primaryColumn": "id", - "unique": {}, - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "tableName": "content_block" - } - }, - { - "modification": "createEntity", - "entity": { - "name": "ContentReference", - "primary": "id", - "primaryColumn": "id", - "unique": {}, - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "tableName": "content_reference" - } - }, - { - "modification": "createEntity", - "entity": { - "name": "Homepage", - "primary": "id", - "primaryColumn": "id", - "unique": {}, - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "tableName": "homepage" - } - }, - { - "modification": "createColumn", - "entityName": "ContentBlock", - "field": { - "name": "order", - "columnName": "order", - "nullable": false, - "type": "Integer", - "columnType": "integer" - } - }, - { - "modification": "createColumn", - "entityName": "ContentBlock", - "field": { - "name": "json", - "columnName": "json", - "nullable": false, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "ContentReference", - "field": { - "name": "type", - "columnName": "type", - "nullable": false, - "type": "Enum", - "columnType": "ContentReferenceType" - } - }, - { - "modification": "createColumn", - "entityName": "ContentReference", - "field": { - "name": "primaryText", - "columnName": "primary_text", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "ContentReference", - "field": { - "name": "secondaryText", - "columnName": "secondary_text", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "Homepage", - "field": { - "name": "unique", - "columnName": "unique", - "nullable": false, - "type": "Enum", - "columnType": "One" - } - }, - { - "modification": "createRelation", - "entityName": "ContentBlock", - "owningSide": { - "name": "content", - "inversedBy": "blocks", - "nullable": false, - "type": "ManyHasOne", - "target": "Content", - "joiningColumn": { - "columnName": "content_id", - "onDelete": "cascade" - } - }, - "inverseSide": { - "name": "blocks", - "ownedBy": "content", - "type": "OneHasMany", - "target": "ContentBlock", - "orderBy": [ - { - "path": [ - "order" - ], - "direction": "asc" - } - ] - } - }, - { - "modification": "createRelation", - "entityName": "ContentReference", - "owningSide": { - "name": "block", - "inversedBy": "references", - "nullable": false, - "type": "ManyHasOne", - "target": "ContentBlock", - "joiningColumn": { - "columnName": "block_id", - "onDelete": "cascade" - } - }, - "inverseSide": { - "name": "references", - "ownedBy": "block", - "type": "OneHasMany", - "target": "ContentReference" - } - }, - { - "modification": "createRelation", - "entityName": "ContentReference", - "owningSide": { - "name": "image", - "nullable": true, - "type": "ManyHasOne", - "target": "BasicImage", - "joiningColumn": { - "columnName": "image_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "createRelation", - "entityName": "Homepage", - "owningSide": { - "name": "content", - "nullable": true, - "type": "OneHasOne", - "target": "Content", - "joiningColumn": { - "columnName": "content_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "createUniqueConstraint", - "entityName": "Homepage", - "unique": { - "fields": [ - "unique" - ], - "name": "unique_Homepage_unique_5b4e83" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/Content", - "value": { - "predicates": {}, - "operations": { - "create": { - "id": true, - "blocks": true - }, - "read": { - "id": true, - "blocks": true - }, - "update": { - "id": true, - "blocks": true - }, - "delete": true, - "customPrimary": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/ContentBlock", - "value": { - "predicates": {}, - "operations": { - "create": { - "id": true, - "content": true, - "order": true, - "json": true, - "references": true - }, - "read": { - "id": true, - "content": true, - "order": true, - "json": true, - "references": true - }, - "update": { - "id": true, - "content": true, - "order": true, - "json": true, - "references": true - }, - "delete": true, - "customPrimary": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/ContentReference", - "value": { - "predicates": {}, - "operations": { - "create": { - "id": true, - "block": true, - "type": true, - "primaryText": true, - "secondaryText": true, - "image": true - }, - "read": { - "id": true, - "block": true, - "type": true, - "primaryText": true, - "secondaryText": true, - "image": true - }, - "update": { - "id": true, - "block": true, - "type": true, - "primaryText": true, - "secondaryText": true, - "image": true - }, - "delete": true, - "customPrimary": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/Homepage", - "value": { - "predicates": {}, - "operations": { - "create": { - "id": true, - "unique": true, - "content": true - }, - "read": { - "id": true, - "unique": true, - "content": true - }, - "update": { - "id": true, - "unique": true, - "content": true - }, - "delete": true, - "customPrimary": true - } - } - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2021-09-14-143228-articles.json b/packages/admin-sandbox/api/migrations/2021-09-14-143228-articles.json deleted file mode 100644 index 60472d34b6..0000000000 --- a/packages/admin-sandbox/api/migrations/2021-09-14-143228-articles.json +++ /dev/null @@ -1,237 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createEntity", - "entity": { - "name": "Article", - "primary": "id", - "primaryColumn": "id", - "unique": {}, - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "tableName": "article" - } - }, - { - "modification": "createEntity", - "entity": { - "name": "Category", - "primary": "id", - "primaryColumn": "id", - "unique": {}, - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "tableName": "category" - } - }, - { - "modification": "createEntity", - "entity": { - "name": "Tag", - "primary": "id", - "primaryColumn": "id", - "unique": {}, - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "tableName": "tag" - } - }, - { - "modification": "createColumn", - "entityName": "Article", - "field": { - "name": "title", - "columnName": "title", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "Article", - "field": { - "name": "content", - "columnName": "content", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "Article", - "field": { - "name": "publishedAt", - "columnName": "published_at", - "nullable": true, - "type": "DateTime", - "columnType": "timestamptz" - } - }, - { - "modification": "createColumn", - "entityName": "Category", - "field": { - "name": "name", - "columnName": "name", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "Tag", - "field": { - "name": "name", - "columnName": "name", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createRelation", - "entityName": "Article", - "owningSide": { - "name": "category", - "nullable": true, - "type": "ManyHasOne", - "target": "Category", - "joiningColumn": { - "columnName": "category_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "createRelation", - "entityName": "Article", - "owningSide": { - "type": "ManyHasMany", - "name": "tags", - "target": "Tag", - "joiningTable": { - "tableName": "article_tags", - "joiningColumn": { - "columnName": "article_id", - "onDelete": "cascade" - }, - "inverseJoiningColumn": { - "columnName": "tag_id", - "onDelete": "cascade" - } - } - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/Article", - "value": { - "predicates": {}, - "operations": { - "create": { - "id": true, - "title": true, - "content": true, - "publishedAt": true, - "category": true, - "tags": true - }, - "read": { - "id": true, - "title": true, - "content": true, - "publishedAt": true, - "category": true, - "tags": true - }, - "update": { - "id": true, - "title": true, - "content": true, - "publishedAt": true, - "category": true, - "tags": true - }, - "delete": true, - "customPrimary": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/Category", - "value": { - "predicates": {}, - "operations": { - "create": { - "id": true, - "name": true - }, - "read": { - "id": true, - "name": true - }, - "update": { - "id": true, - "name": true - }, - "delete": true, - "customPrimary": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/Tag", - "value": { - "predicates": {}, - "operations": { - "create": { - "id": true, - "name": true - }, - "read": { - "id": true, - "name": true - }, - "update": { - "id": true, - "name": true - }, - "delete": true, - "customPrimary": true - } - } - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2021-10-27-152749-homepage-fields.json b/packages/admin-sandbox/api/migrations/2021-10-27-152749-homepage-fields.json deleted file mode 100644 index cd700f9458..0000000000 --- a/packages/admin-sandbox/api/migrations/2021-10-27-152749-homepage-fields.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createColumn", - "entityName": "Homepage", - "field": { - "name": "title", - "columnName": "title", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "Homepage", - "field": { - "name": "lead", - "columnName": "lead", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "Homepage", - "field": { - "name": "footer", - "columnName": "footer", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/Homepage/operations/create/title", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Homepage/operations/create/lead", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Homepage/operations/create/footer", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Homepage/operations/read/title", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Homepage/operations/read/lead", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Homepage/operations/read/footer", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Homepage/operations/update/title", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Homepage/operations/update/lead", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Homepage/operations/update/footer", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2021-11-05-094315-content-link.json b/packages/admin-sandbox/api/migrations/2021-11-05-094315-content-link.json deleted file mode 100644 index 072b337952..0000000000 --- a/packages/admin-sandbox/api/migrations/2021-11-05-094315-content-link.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "updateEnum", - "enumName": "ContentReferenceType", - "values": [ - "image", - "quote", - "link" - ] - }, - { - "modification": "createColumn", - "entityName": "ContentReference", - "field": { - "name": "url", - "columnName": "url", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/ContentReference/operations/create/url", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/ContentReference/operations/read/url", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/ContentReference/operations/update/url", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2021-11-25-142639-locale.json b/packages/admin-sandbox/api/migrations/2021-11-25-142639-locale.json deleted file mode 100644 index 531df25535..0000000000 --- a/packages/admin-sandbox/api/migrations/2021-11-25-142639-locale.json +++ /dev/null @@ -1,313 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createEntity", - "entity": { - "name": "CategoryLocale", - "primary": "id", - "primaryColumn": "id", - "unique": {}, - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "tableName": "category_locale" - } - }, - { - "modification": "createEntity", - "entity": { - "name": "TagLocale", - "primary": "id", - "primaryColumn": "id", - "unique": {}, - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "tableName": "tag_locale" - } - }, - { - "modification": "createEntity", - "entity": { - "name": "Locale", - "primary": "id", - "primaryColumn": "id", - "unique": {}, - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "tableName": "locale" - } - }, - { - "modification": "createColumn", - "entityName": "CategoryLocale", - "field": { - "name": "name", - "columnName": "name", - "nullable": false, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "TagLocale", - "field": { - "name": "name", - "columnName": "name", - "nullable": false, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "Locale", - "field": { - "name": "code", - "columnName": "code", - "nullable": false, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createRelation", - "entityName": "CategoryLocale", - "owningSide": { - "name": "category", - "inversedBy": "locales", - "nullable": true, - "type": "ManyHasOne", - "target": "Category", - "joiningColumn": { - "columnName": "category_id", - "onDelete": "restrict" - } - }, - "inverseSide": { - "name": "locales", - "ownedBy": "category", - "type": "OneHasMany", - "target": "CategoryLocale" - } - }, - { - "modification": "createRelation", - "entityName": "CategoryLocale", - "owningSide": { - "name": "locale", - "nullable": true, - "type": "ManyHasOne", - "target": "Locale", - "joiningColumn": { - "columnName": "locale_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "createRelation", - "entityName": "TagLocale", - "owningSide": { - "name": "tag", - "inversedBy": "locales", - "nullable": true, - "type": "ManyHasOne", - "target": "Tag", - "joiningColumn": { - "columnName": "tag_id", - "onDelete": "restrict" - } - }, - "inverseSide": { - "name": "locales", - "ownedBy": "tag", - "type": "OneHasMany", - "target": "TagLocale" - } - }, - { - "modification": "createRelation", - "entityName": "TagLocale", - "owningSide": { - "name": "locale", - "nullable": true, - "type": "ManyHasOne", - "target": "Locale", - "joiningColumn": { - "columnName": "locale_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "createUniqueConstraint", - "entityName": "CategoryLocale", - "unique": { - "fields": [ - "locale", - "category" - ], - "name": "unique_CategoryLocale_locale_category_75cac4" - } - }, - { - "modification": "createUniqueConstraint", - "entityName": "TagLocale", - "unique": { - "fields": [ - "locale", - "tag" - ], - "name": "unique_TagLocale_locale_tag_f74b63" - } - }, - { - "modification": "createUniqueConstraint", - "entityName": "Locale", - "unique": { - "fields": [ - "code" - ], - "name": "unique_Locale_code_1d8243" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/CategoryLocale", - "value": { - "predicates": {}, - "operations": { - "create": { - "id": true, - "category": true, - "locale": true, - "name": true - }, - "read": { - "id": true, - "category": true, - "locale": true, - "name": true - }, - "update": { - "id": true, - "category": true, - "locale": true, - "name": true - }, - "delete": true, - "customPrimary": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/TagLocale", - "value": { - "predicates": {}, - "operations": { - "create": { - "id": true, - "tag": true, - "locale": true, - "name": true - }, - "read": { - "id": true, - "tag": true, - "locale": true, - "name": true - }, - "update": { - "id": true, - "tag": true, - "locale": true, - "name": true - }, - "delete": true, - "customPrimary": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/Locale", - "value": { - "predicates": {}, - "operations": { - "create": { - "id": true, - "code": true - }, - "read": { - "id": true, - "code": true - }, - "update": { - "id": true, - "code": true - }, - "delete": true, - "customPrimary": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/Category/operations/create/locales", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Category/operations/read/locales", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Category/operations/update/locales", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Tag/operations/create/locales", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Tag/operations/read/locales", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Tag/operations/update/locales", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2022-01-03-090702-article-slug.json b/packages/admin-sandbox/api/migrations/2022-01-03-090702-article-slug.json deleted file mode 100644 index e135339b4e..0000000000 --- a/packages/admin-sandbox/api/migrations/2022-01-03-090702-article-slug.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createColumn", - "entityName": "Article", - "field": { - "name": "slug", - "columnName": "slug", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createUniqueConstraint", - "entityName": "Article", - "unique": { - "fields": [ - "slug" - ], - "name": "unique_Article_slug_39abc3" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/Article/operations/create/slug", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Article/operations/read/slug", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Article/operations/update/slug", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2022-01-06-155631-image-errors.json b/packages/admin-sandbox/api/migrations/2022-01-06-155631-image-errors.json deleted file mode 100644 index b3b04816d6..0000000000 --- a/packages/admin-sandbox/api/migrations/2022-01-06-155631-image-errors.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "patchValidationSchema", - "patch": [ - { - "op": "add", - "path": "/TrivialImage", - "value": { - "url": [ - { - "validator": { - "operation": "defined", - "args": [] - }, - "message": { - "text": "required TrivialImage - url" - } - } - ] - } - }, - { - "op": "add", - "path": "/BasicImage", - "value": { - "url": [ - { - "validator": { - "operation": "defined", - "args": [] - }, - "message": { - "text": "required BasicImage - url" - } - } - ] - } - }, - { - "op": "add", - "path": "/ComplexImage", - "value": { - "url": [ - { - "validator": { - "operation": "defined", - "args": [] - }, - "message": { - "text": "required ComplexImage - url" - } - } - ] - } - }, - { - "op": "add", - "path": "/BasicVideo", - "value": { - "url": [ - { - "validator": { - "operation": "defined", - "args": [] - }, - "message": { - "text": "required BasicVideo - url" - } - } - ] - } - }, - { - "op": "add", - "path": "/UploadShowcase", - "value": { - "singleTrivialImage": [ - { - "validator": { - "operation": "defined", - "args": [] - }, - "message": { - "text": "required UploadShowcase - singleTrivialImage" - } - } - ], - "singleBasicImage": [ - { - "validator": { - "operation": "defined", - "args": [] - }, - "message": { - "text": "required UploadShowcase - singleBasicImage" - } - } - ], - "discriminatedAttachment": [ - { - "validator": { - "operation": "defined", - "args": [] - }, - "message": { - "text": "required UploadShowcase - discriminatedAttachment" - } - } - ] - } - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2022-01-11-143230-article-state.json b/packages/admin-sandbox/api/migrations/2022-01-11-143230-article-state.json deleted file mode 100644 index d95ea6fb0f..0000000000 --- a/packages/admin-sandbox/api/migrations/2022-01-11-143230-article-state.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createEnum", - "enumName": "ArticleState", - "values": [ - "draft", - "published", - "removed" - ] - }, - { - "modification": "createColumn", - "entityName": "Article", - "field": { - "name": "state", - "columnName": "state", - "nullable": true, - "type": "Enum", - "columnType": "ArticleState" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/Article/operations/create/state", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Article/operations/read/state", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Article/operations/update/state", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2022-01-17-164045-links.json b/packages/admin-sandbox/api/migrations/2022-01-17-164045-links.json deleted file mode 100644 index 97b843e419..0000000000 --- a/packages/admin-sandbox/api/migrations/2022-01-17-164045-links.json +++ /dev/null @@ -1,273 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "removeField", - "entityName": "ContentReference", - "fieldName": "url" - }, - { - "modification": "createEnum", - "enumName": "LinkType", - "values": [ - "internal", - "external" - ] - }, - { - "modification": "createEnum", - "enumName": "UrlType", - "values": [ - "article", - "category", - "tag" - ] - }, - { - "modification": "createEntity", - "entity": { - "name": "Link", - "primary": "id", - "primaryColumn": "id", - "unique": {}, - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "tableName": "link" - } - }, - { - "modification": "createEntity", - "entity": { - "name": "Url", - "primary": "id", - "primaryColumn": "id", - "unique": {}, - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "tableName": "url" - } - }, - { - "modification": "createColumn", - "entityName": "Link", - "field": { - "name": "type", - "columnName": "type", - "nullable": false, - "type": "Enum", - "columnType": "LinkType" - } - }, - { - "modification": "createColumn", - "entityName": "Link", - "field": { - "name": "externalLink", - "columnName": "external_link", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "Url", - "field": { - "name": "url", - "columnName": "url", - "nullable": false, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "Url", - "field": { - "name": "type", - "columnName": "type", - "nullable": false, - "type": "Enum", - "columnType": "UrlType" - } - }, - { - "modification": "createRelation", - "entityName": "ContentReference", - "owningSide": { - "name": "link", - "nullable": true, - "type": "ManyHasOne", - "target": "Link", - "joiningColumn": { - "columnName": "link_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "createRelation", - "entityName": "Link", - "owningSide": { - "name": "internalLink", - "nullable": true, - "type": "ManyHasOne", - "target": "Url", - "joiningColumn": { - "columnName": "internal_link_id", - "onDelete": "set null" - } - } - }, - { - "modification": "createRelation", - "entityName": "Url", - "owningSide": { - "name": "article", - "nullable": true, - "type": "OneHasOne", - "target": "Article", - "joiningColumn": { - "columnName": "article_id", - "onDelete": "cascade" - } - } - }, - { - "modification": "createRelation", - "entityName": "Url", - "owningSide": { - "name": "category", - "nullable": true, - "type": "OneHasOne", - "target": "Category", - "joiningColumn": { - "columnName": "category_id", - "onDelete": "cascade" - } - } - }, - { - "modification": "createRelation", - "entityName": "Url", - "owningSide": { - "name": "tag", - "nullable": true, - "type": "OneHasOne", - "target": "Tag", - "joiningColumn": { - "columnName": "tag_id", - "onDelete": "cascade" - } - } - }, - { - "modification": "createUniqueConstraint", - "entityName": "Url", - "unique": { - "fields": [ - "url" - ], - "name": "unique_Url_url_a758c1" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/Link", - "value": { - "predicates": {}, - "operations": { - "create": { - "id": true, - "type": true, - "internalLink": true, - "externalLink": true - }, - "read": { - "id": true, - "type": true, - "internalLink": true, - "externalLink": true - }, - "update": { - "id": true, - "type": true, - "internalLink": true, - "externalLink": true - }, - "delete": true, - "customPrimary": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/Url", - "value": { - "predicates": {}, - "operations": { - "create": { - "id": true, - "url": true, - "type": true, - "article": true, - "category": true, - "tag": true - }, - "read": { - "id": true, - "url": true, - "type": true, - "article": true, - "category": true, - "tag": true - }, - "update": { - "id": true, - "url": true, - "type": true, - "article": true, - "category": true, - "tag": true - }, - "delete": true, - "customPrimary": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/ContentReference/operations/create/link", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/ContentReference/operations/update/link", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/ContentReference/operations/read/link", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2022-01-26-105400-add-blocks-repeater.json b/packages/admin-sandbox/api/migrations/2022-01-26-105400-add-blocks-repeater.json deleted file mode 100644 index 704721740b..0000000000 --- a/packages/admin-sandbox/api/migrations/2022-01-26-105400-add-blocks-repeater.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createEnum", - "enumName": "ContentBlockType", - "values": [ - "heroSection" - ] - }, - { - "modification": "createEntity", - "entity": { - "name": "RepeaterBlock", - "primary": "id", - "primaryColumn": "id", - "unique": {}, - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "tableName": "repeater_block" - } - }, - { - "modification": "createColumn", - "entityName": "RepeaterBlock", - "field": { - "name": "primaryText", - "columnName": "primary_text", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "RepeaterBlock", - "field": { - "name": "type", - "columnName": "type", - "nullable": false, - "type": "Enum", - "columnType": "ContentBlockType" - } - }, - { - "modification": "createColumn", - "entityName": "RepeaterBlock", - "field": { - "name": "order", - "columnName": "order", - "nullable": false, - "type": "Integer", - "columnType": "integer" - } - }, - { - "modification": "createRelation", - "entityName": "RepeaterBlock", - "owningSide": { - "name": "page", - "inversedBy": "blocks", - "nullable": true, - "type": "ManyHasOne", - "target": "InputShowcase", - "joiningColumn": { - "columnName": "page_id", - "onDelete": "set null" - } - }, - "inverseSide": { - "name": "blocks", - "ownedBy": "page", - "type": "OneHasMany", - "target": "RepeaterBlock" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/RepeaterBlock", - "value": { - "predicates": {}, - "operations": { - "create": { - "id": true, - "primaryText": true, - "type": true, - "order": true, - "page": true - }, - "read": { - "id": true, - "primaryText": true, - "type": true, - "order": true, - "page": true - }, - "update": { - "id": true, - "primaryText": true, - "type": true, - "order": true, - "page": true - }, - "delete": true, - "customPrimary": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/InputShowcase/operations/create/blocks", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/InputShowcase/operations/update/blocks", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/InputShowcase/operations/read/blocks", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2022-02-18-181217-add-number.json b/packages/admin-sandbox/api/migrations/2022-02-18-181217-add-number.json deleted file mode 100644 index c4bc5bf3eb..0000000000 --- a/packages/admin-sandbox/api/migrations/2022-02-18-181217-add-number.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createColumn", - "entityName": "Article", - "field": { - "name": "number", - "columnName": "number", - "nullable": true, - "default": 1, - "type": "Integer", - "columnType": "integer" - }, - "fillValue": 1 - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/Article/operations/create/number", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Article/operations/update/number", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Article/operations/read/number", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2022-02-21-153039-add-time.json b/packages/admin-sandbox/api/migrations/2022-02-21-153039-add-time.json deleted file mode 100644 index dc65b83b28..0000000000 --- a/packages/admin-sandbox/api/migrations/2022-02-21-153039-add-time.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createColumn", - "entityName": "InputShowcase", - "field": { - "name": "timeValue", - "columnName": "time_value", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/InputShowcase/operations/create/timeValue", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/InputShowcase/operations/update/timeValue", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/InputShowcase/operations/read/timeValue", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2022-02-25-113348-add-not-null-text-value.json b/packages/admin-sandbox/api/migrations/2022-02-25-113348-add-not-null-text-value.json deleted file mode 100644 index 93c1676ce7..0000000000 --- a/packages/admin-sandbox/api/migrations/2022-02-25-113348-add-not-null-text-value.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createColumn", - "entityName": "InputShowcase", - "field": { - "name": "notNullTextValue", - "columnName": "not_null_text_value", - "nullable": false, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/InputShowcase/operations/create/notNullTextValue", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/InputShowcase/operations/update/notNullTextValue", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/InputShowcase/operations/read/notNullTextValue", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2022-03-03-124525-add-email-value.json b/packages/admin-sandbox/api/migrations/2022-03-03-124525-add-email-value.json deleted file mode 100644 index 03d3d4c0f0..0000000000 --- a/packages/admin-sandbox/api/migrations/2022-03-03-124525-add-email-value.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createColumn", - "entityName": "InputShowcase", - "field": { - "name": "emailValue", - "columnName": "email_value", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/InputShowcase/operations/create/emailValue", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/InputShowcase/operations/update/emailValue", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/InputShowcase/operations/read/emailValue", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2022-03-03-125601-add-search-value.json b/packages/admin-sandbox/api/migrations/2022-03-03-125601-add-search-value.json deleted file mode 100644 index 349463ab26..0000000000 --- a/packages/admin-sandbox/api/migrations/2022-03-03-125601-add-search-value.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createColumn", - "entityName": "InputShowcase", - "field": { - "name": "searchValue", - "columnName": "search_value", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/InputShowcase/operations/create/searchValue", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/InputShowcase/operations/update/searchValue", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/InputShowcase/operations/read/searchValue", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2022-03-03-132725-add-uri-value.json b/packages/admin-sandbox/api/migrations/2022-03-03-132725-add-uri-value.json deleted file mode 100644 index 28187c4b4f..0000000000 --- a/packages/admin-sandbox/api/migrations/2022-03-03-132725-add-uri-value.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createColumn", - "entityName": "InputShowcase", - "field": { - "name": "urlValue", - "columnName": "url_value", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/InputShowcase/operations/create/urlValue", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/InputShowcase/operations/update/urlValue", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/InputShowcase/operations/read/urlValue", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2022-03-11-094052-add-content-blocks.json b/packages/admin-sandbox/api/migrations/2022-03-11-094052-add-content-blocks.json deleted file mode 100644 index 1b7a86f4a2..0000000000 --- a/packages/admin-sandbox/api/migrations/2022-03-11-094052-add-content-blocks.json +++ /dev/null @@ -1,315 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createEnum", - "enumName": "ContentBlockPageUnique", - "values": [ - "One" - ] - }, - { - "modification": "createEntity", - "entity": { - "name": "ContentBlockPage", - "primary": "id", - "primaryColumn": "id", - "unique": {}, - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "tableName": "content_block_page" - } - }, - { - "modification": "createEntity", - "entity": { - "name": "BlockRepeaterBlock", - "primary": "id", - "primaryColumn": "id", - "unique": {}, - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "tableName": "block_repeater_block" - } - }, - { - "modification": "createEntity", - "entity": { - "name": "RepeaterGallery", - "primary": "id", - "primaryColumn": "id", - "unique": {}, - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "tableName": "repeater_gallery" - } - }, - { - "modification": "createColumn", - "entityName": "ContentBlockPage", - "field": { - "name": "unique", - "columnName": "unique", - "nullable": true, - "type": "Enum", - "columnType": "ContentBlockPageUnique" - } - }, - { - "modification": "createColumn", - "entityName": "BlockRepeaterBlock", - "field": { - "name": "order", - "columnName": "order", - "nullable": false, - "type": "Integer", - "columnType": "integer" - } - }, - { - "modification": "createColumn", - "entityName": "BlockRepeaterBlock", - "field": { - "name": "type", - "columnName": "type", - "nullable": false, - "type": "Enum", - "columnType": "ContentBlockType" - } - }, - { - "modification": "createColumn", - "entityName": "BlockRepeaterBlock", - "field": { - "name": "content", - "columnName": "content", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "BlockRepeaterBlock", - "field": { - "name": "author", - "columnName": "author", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createColumn", - "entityName": "RepeaterGallery", - "field": { - "name": "order", - "columnName": "order", - "nullable": false, - "type": "Integer", - "columnType": "integer" - } - }, - { - "modification": "createRelation", - "entityName": "BlockRepeaterBlock", - "owningSide": { - "name": "blockRepeater", - "inversedBy": "blocks", - "nullable": true, - "type": "ManyHasOne", - "target": "ContentBlockPage", - "joiningColumn": { - "columnName": "block_repeater_id", - "onDelete": "restrict" - } - }, - "inverseSide": { - "name": "blocks", - "ownedBy": "blockRepeater", - "type": "OneHasMany", - "target": "BlockRepeaterBlock", - "orderBy": [ - { - "path": [ - "order" - ], - "direction": "asc" - } - ] - } - }, - { - "modification": "createRelation", - "entityName": "RepeaterGallery", - "owningSide": { - "name": "image", - "nullable": false, - "type": "ManyHasOne", - "target": "BasicImage", - "joiningColumn": { - "columnName": "image_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "createRelation", - "entityName": "RepeaterGallery", - "owningSide": { - "name": "repeaterReference", - "inversedBy": "images", - "nullable": true, - "type": "ManyHasOne", - "target": "BlockRepeaterBlock", - "joiningColumn": { - "columnName": "repeater_reference_id", - "onDelete": "cascade" - } - }, - "inverseSide": { - "name": "images", - "ownedBy": "repeaterReference", - "type": "OneHasMany", - "target": "RepeaterGallery", - "orderBy": [ - { - "path": [ - "order" - ], - "direction": "asc" - } - ] - } - }, - { - "modification": "createUniqueConstraint", - "entityName": "ContentBlockPage", - "unique": { - "fields": [ - "unique" - ], - "name": "unique_ContentBlockPage_unique_3a5c8c" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/ContentBlockPage", - "value": { - "predicates": {}, - "operations": { - "create": { - "id": true, - "unique": true, - "blocks": true - }, - "update": { - "id": true, - "unique": true, - "blocks": true - }, - "read": { - "id": true, - "unique": true, - "blocks": true - }, - "delete": true, - "customPrimary": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/BlockRepeaterBlock", - "value": { - "predicates": {}, - "operations": { - "create": { - "id": true, - "order": true, - "type": true, - "content": true, - "author": true, - "images": true, - "blockRepeater": true - }, - "update": { - "id": true, - "order": true, - "type": true, - "content": true, - "author": true, - "images": true, - "blockRepeater": true - }, - "read": { - "id": true, - "order": true, - "type": true, - "content": true, - "author": true, - "images": true, - "blockRepeater": true - }, - "delete": true, - "customPrimary": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/RepeaterGallery", - "value": { - "predicates": {}, - "operations": { - "create": { - "id": true, - "order": true, - "image": true, - "repeaterReference": true - }, - "update": { - "id": true, - "order": true, - "image": true, - "repeaterReference": true - }, - "read": { - "id": true, - "order": true, - "image": true, - "repeaterReference": true - }, - "delete": true, - "customPrimary": true - } - } - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2022-04-16-092713-add-order-to-categories.json b/packages/admin-sandbox/api/migrations/2022-04-16-092713-add-order-to-categories.json deleted file mode 100644 index a5fc2dab47..0000000000 --- a/packages/admin-sandbox/api/migrations/2022-04-16-092713-add-order-to-categories.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createColumn", - "entityName": "Category", - "field": { - "name": "order", - "columnName": "order", - "nullable": true, - "type": "Integer", - "columnType": "integer" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/Category/operations/create/order", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Category/operations/update/order", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Category/operations/read/order", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2022-04-22-093758-image-align.json b/packages/admin-sandbox/api/migrations/2022-04-22-093758-image-align.json deleted file mode 100644 index 97482408d0..0000000000 --- a/packages/admin-sandbox/api/migrations/2022-04-22-093758-image-align.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createEnum", - "enumName": "ContentReferenceAlign", - "values": [ - "left", - "right", - "center" - ] - }, - { - "modification": "createColumn", - "entityName": "ContentReference", - "field": { - "name": "align", - "columnName": "align", - "nullable": true, - "type": "Enum", - "columnType": "ContentReferenceAlign" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/ContentReference/operations/create/align", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/ContentReference/operations/update/align", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/ContentReference/operations/read/align", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2022-05-05-112442-locale-label.json b/packages/admin-sandbox/api/migrations/2022-05-05-112442-locale-label.json deleted file mode 100644 index efd22efc1d..0000000000 --- a/packages/admin-sandbox/api/migrations/2022-05-05-112442-locale-label.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createColumn", - "entityName": "Locale", - "field": { - "name": "label", - "columnName": "label", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/Locale/operations/create/label", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Locale/operations/update/label", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Locale/operations/read/label", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2022-05-05-145615-locales-order.json b/packages/admin-sandbox/api/migrations/2022-05-05-145615-locales-order.json deleted file mode 100644 index 4978210389..0000000000 --- a/packages/admin-sandbox/api/migrations/2022-05-05-145615-locales-order.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createColumn", - "entityName": "TagLocale", - "field": { - "name": "order", - "columnName": "order", - "nullable": true, - "type": "Integer", - "columnType": "integer" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/TagLocale/operations/create/order", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/TagLocale/operations/update/order", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/TagLocale/operations/read/order", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2022-05-11-080026-article-image.json b/packages/admin-sandbox/api/migrations/2022-05-11-080026-article-image.json deleted file mode 100644 index 2b9abbcc81..0000000000 --- a/packages/admin-sandbox/api/migrations/2022-05-11-080026-article-image.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createRelation", - "entityName": "Article", - "owningSide": { - "name": "image", - "nullable": true, - "type": "ManyHasOne", - "target": "BasicImage", - "joiningColumn": { - "columnName": "image_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/Article/operations/create/image", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Article/operations/update/image", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Article/operations/read/image", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2022-05-23-090850-locale-dialect.json b/packages/admin-sandbox/api/migrations/2022-05-23-090850-locale-dialect.json deleted file mode 100644 index 250eb2c1f3..0000000000 --- a/packages/admin-sandbox/api/migrations/2022-05-23-090850-locale-dialect.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createEntity", - "entity": { - "name": "LocaleDialect", - "primary": "id", - "primaryColumn": "id", - "unique": {}, - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "tableName": "locale_dialect" - } - }, - { - "modification": "createColumn", - "entityName": "LocaleDialect", - "field": { - "name": "label", - "columnName": "label", - "nullable": true, - "type": "String", - "columnType": "text" - } - }, - { - "modification": "createRelation", - "entityName": "LocaleDialect", - "owningSide": { - "name": "locale", - "nullable": true, - "type": "ManyHasOne", - "target": "Locale", - "joiningColumn": { - "columnName": "locale_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/LocaleDialect", - "value": { - "predicates": {}, - "operations": { - "create": { - "id": true, - "locale": true, - "label": true - }, - "read": { - "id": true, - "locale": true, - "label": true - }, - "update": { - "id": true, - "locale": true, - "label": true - }, - "delete": true, - "customPrimary": true - } - } - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2022-05-24-092329-index-multiple-basic-images.json b/packages/admin-sandbox/api/migrations/2022-05-24-092329-index-multiple-basic-images.json deleted file mode 100644 index 2d262abb4e..0000000000 --- a/packages/admin-sandbox/api/migrations/2022-05-24-092329-index-multiple-basic-images.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createEntity", - "entity": { - "name": "UploadShowcaseImage", - "primary": "id", - "primaryColumn": "id", - "unique": {}, - "fields": { - "id": { - "name": "id", - "columnName": "id", - "nullable": false, - "type": "Uuid", - "columnType": "uuid" - } - }, - "tableName": "upload_showcase_image" - } - }, - { - "modification": "createColumn", - "entityName": "UploadShowcaseImage", - "field": { - "name": "order", - "columnName": "order", - "nullable": true, - "type": "Integer", - "columnType": "integer" - } - }, - { - "modification": "createRelation", - "entityName": "UploadShowcaseImage", - "owningSide": { - "name": "page", - "inversedBy": "multipleBasicImageList", - "nullable": true, - "type": "ManyHasOne", - "target": "UploadShowcase", - "joiningColumn": { - "columnName": "page_id", - "onDelete": "restrict" - } - }, - "inverseSide": { - "name": "multipleBasicImageList", - "ownedBy": "page", - "type": "OneHasMany", - "target": "UploadShowcaseImage" - } - }, - { - "modification": "createRelation", - "entityName": "UploadShowcaseImage", - "owningSide": { - "name": "image", - "nullable": true, - "type": "ManyHasOne", - "target": "BasicImage", - "joiningColumn": { - "columnName": "image_id", - "onDelete": "restrict" - } - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcaseImage", - "value": { - "predicates": {}, - "operations": { - "create": { - "id": true, - "page": true, - "image": true, - "order": true - }, - "read": { - "id": true, - "page": true, - "image": true, - "order": true - }, - "update": { - "id": true, - "page": true, - "image": true, - "order": true - }, - "delete": true, - "customPrimary": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/create/multipleBasicImageList", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/update/multipleBasicImageList", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/read/multipleBasicImageList", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2022-05-27-152026-seq.json b/packages/admin-sandbox/api/migrations/2022-05-27-152026-seq.json deleted file mode 100644 index 4df47d81e1..0000000000 --- a/packages/admin-sandbox/api/migrations/2022-05-27-152026-seq.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createEntity", - "entity": { - "name": "SeqEntity", - "primary": "id", - "primaryColumn": "id", - "tableName": "seq_entity", - "fields": { - "id": { - "name": "id", - "columnName": "id", - "columnType": "integer", - "nullable": false, - "type": "Integer", - "sequence": { - "precedence": "BY DEFAULT" - } - } - }, - "unique": {}, - "eventLog": { - "enabled": true - } - } - }, - { - "modification": "createEntity", - "entity": { - "name": "SeqEntity2", - "primary": "id", - "primaryColumn": "id", - "tableName": "seq_entity2", - "fields": { - "id": { - "name": "id", - "columnName": "id", - "columnType": "integer", - "nullable": false, - "type": "Integer", - "sequence": { - "precedence": "ALWAYS", - "start": 100 - } - } - }, - "unique": {}, - "eventLog": { - "enabled": true - } - } - }, - { - "modification": "createColumn", - "entityName": "SeqEntity", - "field": { - "name": "value", - "columnName": "value", - "columnType": "text", - "nullable": true, - "type": "String" - } - }, - { - "modification": "createColumn", - "entityName": "SeqEntity2", - "field": { - "name": "value", - "columnName": "value", - "columnType": "text", - "nullable": true, - "type": "String" - } - }, - { - "modification": "createRelation", - "entityName": "SeqEntity2", - "owningSide": { - "type": "ManyHasOne", - "name": "parent", - "target": "SeqEntity", - "joiningColumn": { - "columnName": "parent_id", - "onDelete": "restrict" - }, - "nullable": true, - "inversedBy": "sub" - }, - "inverseSide": { - "type": "OneHasMany", - "name": "sub", - "target": "SeqEntity2", - "ownedBy": "parent" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/SeqEntity", - "value": { - "predicates": {}, - "operations": { - "read": { - "id": true, - "value": true, - "sub": true - }, - "create": { - "id": true, - "value": true, - "sub": true - }, - "update": { - "id": true, - "value": true, - "sub": true - }, - "delete": true, - "customPrimary": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/SeqEntity2", - "value": { - "predicates": {}, - "operations": { - "read": { - "id": true, - "value": true, - "parent": true - }, - "create": { - "id": true, - "value": true, - "parent": true - }, - "update": { - "id": true, - "value": true, - "parent": true - }, - "delete": true, - "customPrimary": true - } - } - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2022-06-01-093650-article-sorted-tags.json b/packages/admin-sandbox/api/migrations/2022-06-01-093650-article-sorted-tags.json deleted file mode 100644 index a582d60988..0000000000 --- a/packages/admin-sandbox/api/migrations/2022-06-01-093650-article-sorted-tags.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createEntity", - "entity": { - "name": "ArticleTag", - "primary": "id", - "primaryColumn": "id", - "tableName": "article_tag", - "fields": { - "id": { - "name": "id", - "columnName": "id", - "columnType": "uuid", - "nullable": false, - "type": "Uuid" - } - }, - "unique": {}, - "eventLog": { - "enabled": true - } - } - }, - { - "modification": "createColumn", - "entityName": "ArticleTag", - "field": { - "name": "order", - "columnName": "order", - "columnType": "integer", - "nullable": false, - "type": "Integer" - } - }, - { - "modification": "createRelation", - "entityName": "ArticleTag", - "owningSide": { - "type": "ManyHasOne", - "name": "article", - "target": "Article", - "joiningColumn": { - "columnName": "article_id", - "onDelete": "restrict" - }, - "nullable": false, - "inversedBy": "sortedTags" - }, - "inverseSide": { - "type": "OneHasMany", - "name": "sortedTags", - "target": "ArticleTag", - "ownedBy": "article", - "orderBy": [ - { - "path": [ - "order" - ], - "direction": "asc" - } - ] - } - }, - { - "modification": "createRelation", - "entityName": "ArticleTag", - "owningSide": { - "type": "ManyHasOne", - "name": "tag", - "target": "Tag", - "joiningColumn": { - "columnName": "tag_id", - "onDelete": "restrict" - }, - "nullable": false - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/ArticleTag", - "value": { - "predicates": {}, - "operations": { - "read": { - "id": true, - "article": true, - "tag": true, - "order": true - }, - "create": { - "id": true, - "article": true, - "tag": true, - "order": true - }, - "update": { - "id": true, - "article": true, - "tag": true, - "order": true - }, - "delete": true, - "customPrimary": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/Article/operations/create/sortedTags", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Article/operations/update/sortedTags", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/Article/operations/read/sortedTags", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2022-06-03-082836-quiz.json b/packages/admin-sandbox/api/migrations/2022-06-03-082836-quiz.json deleted file mode 100644 index d8a9c68d29..0000000000 --- a/packages/admin-sandbox/api/migrations/2022-06-03-082836-quiz.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createEnum", - "enumName": "QuizResultState", - "values": [ - "pending", - "failed", - "succeed" - ] - }, - { - "modification": "createEntity", - "entity": { - "name": "QuizResult", - "primary": "id", - "primaryColumn": "id", - "tableName": "quiz_result", - "fields": { - "id": { - "name": "id", - "columnName": "id", - "columnType": "uuid", - "nullable": false, - "type": "Uuid" - } - }, - "unique": {}, - "eventLog": { - "enabled": true - } - } - }, - { - "modification": "createColumn", - "entityName": "QuizResult", - "field": { - "name": "answer", - "columnName": "answer", - "columnType": "text", - "nullable": false, - "type": "String" - } - }, - { - "modification": "createColumn", - "entityName": "QuizResult", - "field": { - "name": "state", - "columnName": "state", - "columnType": "QuizResultState", - "nullable": false, - "type": "Enum" - } - }, - { - "modification": "createColumn", - "entityName": "QuizResult", - "field": { - "name": "failReason", - "columnName": "fail_reason", - "columnType": "text", - "nullable": true, - "type": "String" - } - }, - { - "modification": "createColumn", - "entityName": "QuizResult", - "field": { - "name": "successRating", - "columnName": "success_rating", - "columnType": "integer", - "nullable": true, - "type": "Integer" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/QuizResult", - "value": { - "predicates": {}, - "operations": { - "read": { - "id": true, - "answer": true, - "state": true, - "failReason": true, - "successRating": true - }, - "create": { - "id": true, - "answer": true, - "state": true, - "failReason": true, - "successRating": true - }, - "update": { - "id": true, - "answer": true, - "state": true, - "failReason": true, - "successRating": true - }, - "delete": true, - "customPrimary": true - } - } - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2022-06-14-090735-gallery.json b/packages/admin-sandbox/api/migrations/2022-06-14-090735-gallery.json deleted file mode 100644 index 6d81cddba3..0000000000 --- a/packages/admin-sandbox/api/migrations/2022-06-14-090735-gallery.json +++ /dev/null @@ -1,517 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createEnum", - "enumName": "GalleryItemType", - "values": [ - "image", - "basicImage", - "video" - ] - }, - { - "modification": "enableOrphanRemoval", - "entityName": "UploadShowcase", - "fieldName": "discriminatedAttachment" - }, - { - "modification": "updateEnum", - "enumName": "ComplexFileListItemType", - "values": [ - "image", - "basicImage", - "video" - ] - }, - { - "modification": "updateEnum", - "enumName": "DiscriminatedAttachmentType", - "values": [ - "image", - "basicImage", - "video" - ] - }, - { - "modification": "createEntity", - "entity": { - "eventLog": { - "enabled": true - }, - "name": "Gallery", - "primary": "id", - "primaryColumn": "id", - "tableName": "gallery", - "fields": { - "id": { - "name": "id", - "columnName": "id", - "columnType": "uuid", - "nullable": false, - "type": "Uuid" - } - }, - "unique": {} - } - }, - { - "modification": "createEntity", - "entity": { - "eventLog": { - "enabled": true - }, - "name": "GalleryItem", - "primary": "id", - "primaryColumn": "id", - "tableName": "gallery_item", - "fields": { - "id": { - "name": "id", - "columnName": "id", - "columnType": "uuid", - "nullable": false, - "type": "Uuid" - } - }, - "unique": {} - } - }, - { - "modification": "createEntity", - "entity": { - "eventLog": { - "enabled": true - }, - "name": "GalleryList", - "primary": "id", - "primaryColumn": "id", - "tableName": "gallery_list", - "fields": { - "id": { - "name": "id", - "columnName": "id", - "columnType": "uuid", - "nullable": false, - "type": "Uuid" - } - }, - "unique": {} - } - }, - { - "modification": "createEntity", - "entity": { - "eventLog": { - "enabled": true - }, - "name": "GalleryListItem", - "primary": "id", - "primaryColumn": "id", - "tableName": "gallery_list_item", - "fields": { - "id": { - "name": "id", - "columnName": "id", - "columnType": "uuid", - "nullable": false, - "type": "Uuid" - } - }, - "unique": {} - } - }, - { - "modification": "createColumn", - "entityName": "Gallery", - "field": { - "name": "unique", - "columnName": "unique", - "columnType": "One", - "nullable": false, - "type": "Enum" - } - }, - { - "modification": "createColumn", - "entityName": "GalleryItem", - "field": { - "name": "type", - "columnName": "type", - "columnType": "GalleryItemType", - "nullable": false, - "type": "Enum" - } - }, - { - "modification": "createColumn", - "entityName": "GalleryListItem", - "field": { - "name": "order", - "columnName": "order", - "columnType": "integer", - "nullable": false, - "type": "Integer" - } - }, - { - "modification": "createRelation", - "entityName": "UploadShowcase", - "owningSide": { - "type": "ManyHasOne", - "name": "galleryItem", - "target": "GalleryItem", - "joiningColumn": { - "columnName": "gallery_item_id", - "onDelete": "restrict" - }, - "nullable": true - } - }, - { - "modification": "createRelation", - "entityName": "UploadShowcase", - "owningSide": { - "type": "OneHasOne", - "name": "galleryList", - "target": "GalleryList", - "joiningColumn": { - "columnName": "gallery_list_id", - "onDelete": "restrict" - }, - "nullable": true - } - }, - { - "modification": "createRelation", - "entityName": "ComplexFileListItem", - "owningSide": { - "type": "OneHasOne", - "name": "basicImage", - "target": "BasicImage", - "joiningColumn": { - "columnName": "basic_image_id", - "onDelete": "restrict" - }, - "nullable": true - } - }, - { - "modification": "createRelation", - "entityName": "DiscriminatedAttachment", - "owningSide": { - "type": "OneHasOne", - "name": "basicImage", - "target": "BasicImage", - "joiningColumn": { - "columnName": "basic_image_id", - "onDelete": "restrict" - }, - "nullable": true - } - }, - { - "modification": "createRelation", - "entityName": "GalleryItem", - "owningSide": { - "type": "ManyHasOne", - "name": "gallery", - "target": "Gallery", - "joiningColumn": { - "columnName": "gallery_id", - "onDelete": "restrict" - }, - "nullable": true, - "inversedBy": "items" - }, - "inverseSide": { - "type": "OneHasMany", - "name": "items", - "target": "GalleryItem", - "ownedBy": "gallery" - } - }, - { - "modification": "createRelation", - "entityName": "GalleryItem", - "owningSide": { - "type": "OneHasOne", - "name": "image", - "target": "ComplexImage", - "joiningColumn": { - "columnName": "image_id", - "onDelete": "restrict" - }, - "nullable": true - } - }, - { - "modification": "createRelation", - "entityName": "GalleryItem", - "owningSide": { - "type": "OneHasOne", - "name": "basicImage", - "target": "BasicImage", - "joiningColumn": { - "columnName": "basic_image_id", - "onDelete": "restrict" - }, - "nullable": true - } - }, - { - "modification": "createRelation", - "entityName": "GalleryItem", - "owningSide": { - "type": "OneHasOne", - "name": "video", - "target": "BasicVideo", - "joiningColumn": { - "columnName": "video_id", - "onDelete": "restrict" - }, - "nullable": true - } - }, - { - "modification": "createRelation", - "entityName": "GalleryListItem", - "owningSide": { - "type": "ManyHasOne", - "name": "list", - "target": "GalleryList", - "joiningColumn": { - "columnName": "list_id", - "onDelete": "restrict" - }, - "nullable": true, - "inversedBy": "items" - }, - "inverseSide": { - "type": "OneHasMany", - "name": "items", - "target": "GalleryListItem", - "ownedBy": "list", - "orderBy": [ - { - "path": [ - "order" - ], - "direction": "asc" - } - ] - } - }, - { - "modification": "createRelation", - "entityName": "GalleryListItem", - "owningSide": { - "type": "ManyHasOne", - "name": "item", - "target": "GalleryItem", - "joiningColumn": { - "columnName": "item_id", - "onDelete": "cascade" - }, - "nullable": false - } - }, - { - "modification": "createUniqueConstraint", - "entityName": "Gallery", - "unique": { - "fields": [ - "unique" - ], - "name": "unique_Gallery_unique_99eaad" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/Gallery", - "value": { - "predicates": {}, - "operations": { - "read": { - "id": true, - "unique": true, - "items": true - }, - "create": { - "id": true, - "unique": true, - "items": true - }, - "update": { - "id": true, - "unique": true, - "items": true - }, - "delete": true, - "customPrimary": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/GalleryItem", - "value": { - "predicates": {}, - "operations": { - "read": { - "id": true, - "gallery": true, - "type": true, - "image": true, - "basicImage": true, - "video": true - }, - "create": { - "id": true, - "gallery": true, - "type": true, - "image": true, - "basicImage": true, - "video": true - }, - "update": { - "id": true, - "gallery": true, - "type": true, - "image": true, - "basicImage": true, - "video": true - }, - "delete": true, - "customPrimary": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/GalleryList", - "value": { - "predicates": {}, - "operations": { - "read": { - "id": true, - "items": true - }, - "create": { - "id": true, - "items": true - }, - "update": { - "id": true, - "items": true - }, - "delete": true, - "customPrimary": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/GalleryListItem", - "value": { - "predicates": {}, - "operations": { - "read": { - "id": true, - "list": true, - "order": true, - "item": true - }, - "create": { - "id": true, - "list": true, - "order": true, - "item": true - }, - "update": { - "id": true, - "list": true, - "order": true, - "item": true - }, - "delete": true, - "customPrimary": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/create/galleryItem", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/create/galleryList", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/update/galleryItem", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/update/galleryList", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/read/galleryItem", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/UploadShowcase/operations/read/galleryList", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/ComplexFileListItem/operations/create/basicImage", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/ComplexFileListItem/operations/update/basicImage", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/ComplexFileListItem/operations/read/basicImage", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/DiscriminatedAttachment/operations/create/basicImage", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/DiscriminatedAttachment/operations/update/basicImage", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/DiscriminatedAttachment/operations/read/basicImage", - "value": true - } - ] - }, - { - "modification": "patchValidationSchema", - "patch": [ - { - "op": "remove", - "path": "/UploadShowcase" - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2022-07-01-134420-json.json b/packages/admin-sandbox/api/migrations/2022-07-01-134420-json.json deleted file mode 100644 index 9d58d2177b..0000000000 --- a/packages/admin-sandbox/api/migrations/2022-07-01-134420-json.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createColumn", - "entityName": "InputShowcase", - "field": { - "name": "jsonValue", - "columnName": "json_value", - "columnType": "jsonb", - "nullable": true, - "type": "Json" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/InputShowcase/operations/create/jsonValue", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/InputShowcase/operations/update/jsonValue", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/InputShowcase/operations/read/jsonValue", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2022-07-19-131102-content-tags.json b/packages/admin-sandbox/api/migrations/2022-07-19-131102-content-tags.json deleted file mode 100644 index 39bf40c8e7..0000000000 --- a/packages/admin-sandbox/api/migrations/2022-07-19-131102-content-tags.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createEntity", - "entity": { - "name": "ContentReferenceTag", - "primary": "id", - "primaryColumn": "id", - "tableName": "content_reference_tag", - "fields": { - "id": { - "name": "id", - "columnName": "id", - "columnType": "uuid", - "nullable": false, - "type": "Uuid" - } - }, - "unique": {}, - "eventLog": { - "enabled": true - } - } - }, - { - "modification": "createColumn", - "entityName": "ContentReferenceTag", - "field": { - "name": "order", - "columnName": "order", - "columnType": "integer", - "nullable": false, - "type": "Integer" - } - }, - { - "modification": "createRelation", - "entityName": "ContentReferenceTag", - "owningSide": { - "type": "ManyHasOne", - "name": "reference", - "target": "ContentReference", - "joiningColumn": { - "columnName": "reference_id", - "onDelete": "restrict" - }, - "nullable": false, - "inversedBy": "tags" - }, - "inverseSide": { - "type": "OneHasMany", - "name": "tags", - "target": "ContentReferenceTag", - "ownedBy": "reference", - "orderBy": [ - { - "path": [ - "order" - ], - "direction": "asc" - } - ] - } - }, - { - "modification": "createRelation", - "entityName": "ContentReferenceTag", - "owningSide": { - "type": "ManyHasOne", - "name": "tag", - "target": "Tag", - "joiningColumn": { - "columnName": "tag_id", - "onDelete": "restrict" - }, - "nullable": false - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/ContentReferenceTag", - "value": { - "predicates": {}, - "operations": { - "read": { - "id": true, - "reference": true, - "tag": true, - "order": true - }, - "create": { - "id": true, - "reference": true, - "tag": true, - "order": true - }, - "update": { - "id": true, - "reference": true, - "tag": true, - "order": true - }, - "delete": true, - "customPrimary": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/ContentReference/operations/create/tags", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/ContentReference/operations/update/tags", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/ContentReference/operations/read/tags", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2022-11-24-135530-s3-max-size.json b/packages/admin-sandbox/api/migrations/2022-11-24-135530-s3-max-size.json deleted file mode 100644 index ac9953cb2e..0000000000 --- a/packages/admin-sandbox/api/migrations/2022-11-24-135530-s3-max-size.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "replace", - "path": "/roles/admin/s3/**/upload", - "value": { - "maxSize": 1048576 - } - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2023-08-21-152956-focal-point.json b/packages/admin-sandbox/api/migrations/2023-08-21-152956-focal-point.json deleted file mode 100644 index 5c7017f790..0000000000 --- a/packages/admin-sandbox/api/migrations/2023-08-21-152956-focal-point.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createColumn", - "entityName": "BasicImage", - "field": { - "name": "focalPointX", - "columnName": "focal_point_x", - "columnType": "double precision", - "nullable": true, - "type": "Double" - } - }, - { - "modification": "createColumn", - "entityName": "BasicImage", - "field": { - "name": "focalPointY", - "columnName": "focal_point_y", - "columnType": "double precision", - "nullable": true, - "type": "Double" - } - }, - { - "modification": "createColumn", - "entityName": "BasicImage", - "field": { - "name": "secondaryFocalPointX", - "columnName": "secondary_focal_point_x", - "columnType": "double precision", - "nullable": true, - "type": "Double" - } - }, - { - "modification": "createColumn", - "entityName": "BasicImage", - "field": { - "name": "secondaryFocalPointY", - "columnName": "secondary_focal_point_y", - "columnType": "double precision", - "nullable": true, - "type": "Double" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/BasicImage/operations/create/focalPointX", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/BasicImage/operations/create/focalPointY", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/BasicImage/operations/create/secondaryFocalPointX", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/BasicImage/operations/create/secondaryFocalPointY", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/BasicImage/operations/update/focalPointX", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/BasicImage/operations/update/focalPointY", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/BasicImage/operations/update/secondaryFocalPointX", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/BasicImage/operations/update/secondaryFocalPointY", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/BasicImage/operations/read/focalPointX", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/BasicImage/operations/read/focalPointY", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/BasicImage/operations/read/secondaryFocalPointX", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/BasicImage/operations/read/secondaryFocalPointY", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2023-11-24-121513-tasks.json b/packages/admin-sandbox/api/migrations/2023-11-24-121513-tasks.json deleted file mode 100644 index e7a7424d1d..0000000000 --- a/packages/admin-sandbox/api/migrations/2023-11-24-121513-tasks.json +++ /dev/null @@ -1,188 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createEnum", - "enumName": "TaskStatus", - "values": [ - "new", - "in_progress", - "done" - ] - }, - { - "modification": "createEntity", - "entity": { - "name": "Task", - "primary": "id", - "primaryColumn": "id", - "tableName": "task", - "fields": { - "id": { - "name": "id", - "columnName": "id", - "columnType": "uuid", - "nullable": false, - "type": "Uuid" - } - }, - "unique": {}, - "indexes": {}, - "eventLog": { - "enabled": true - } - } - }, - { - "modification": "createEntity", - "entity": { - "name": "User", - "primary": "id", - "primaryColumn": "id", - "tableName": "user", - "fields": { - "id": { - "name": "id", - "columnName": "id", - "columnType": "uuid", - "nullable": false, - "type": "Uuid" - } - }, - "unique": {}, - "indexes": {}, - "eventLog": { - "enabled": true - } - } - }, - { - "modification": "createColumn", - "entityName": "Task", - "field": { - "name": "title", - "columnName": "title", - "columnType": "text", - "nullable": false, - "type": "String" - } - }, - { - "modification": "createColumn", - "entityName": "Task", - "field": { - "name": "status", - "columnName": "status", - "columnType": "TaskStatus", - "nullable": false, - "type": "Enum" - } - }, - { - "modification": "createColumn", - "entityName": "Task", - "field": { - "name": "order", - "columnName": "order", - "columnType": "integer", - "nullable": true, - "type": "Integer" - } - }, - { - "modification": "createColumn", - "entityName": "User", - "field": { - "name": "name", - "columnName": "name", - "columnType": "text", - "nullable": false, - "type": "String" - } - }, - { - "modification": "createRelation", - "entityName": "Task", - "owningSide": { - "type": "ManyHasOne", - "name": "assignee", - "target": "User", - "joiningColumn": { - "columnName": "assignee_id", - "onDelete": "restrict" - }, - "nullable": true, - "inversedBy": "assignedTasks" - }, - "inverseSide": { - "type": "OneHasMany", - "name": "assignedTasks", - "target": "Task", - "ownedBy": "assignee" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/Task", - "value": { - "predicates": {}, - "operations": { - "read": { - "id": true, - "title": true, - "status": true, - "order": true, - "assignee": true - }, - "create": { - "id": true, - "title": true, - "status": true, - "order": true, - "assignee": true - }, - "update": { - "id": true, - "title": true, - "status": true, - "order": true, - "assignee": true - }, - "delete": true, - "customPrimary": true - } - } - }, - { - "op": "add", - "path": "/roles/admin/entities/User", - "value": { - "predicates": {}, - "operations": { - "read": { - "id": true, - "name": true, - "assignedTasks": true - }, - "create": { - "id": true, - "name": true, - "assignedTasks": true - }, - "update": { - "id": true, - "name": true, - "assignedTasks": true - }, - "delete": true, - "customPrimary": true - } - } - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/migrations/2023-11-28-170731-user-order.json b/packages/admin-sandbox/api/migrations/2023-11-28-170731-user-order.json deleted file mode 100644 index 7da9a1e363..0000000000 --- a/packages/admin-sandbox/api/migrations/2023-11-28-170731-user-order.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "formatVersion": 3, - "modifications": [ - { - "modification": "createColumn", - "entityName": "User", - "field": { - "name": "order", - "columnName": "order", - "columnType": "integer", - "nullable": true, - "type": "Integer" - } - }, - { - "modification": "patchAclSchema", - "patch": [ - { - "op": "add", - "path": "/roles/admin/entities/User/operations/read/order", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/User/operations/create/order", - "value": true - }, - { - "op": "add", - "path": "/roles/admin/entities/User/operations/update/order", - "value": true - } - ] - } - ] -} diff --git a/packages/admin-sandbox/api/model/Article.ts b/packages/admin-sandbox/api/model/Article.ts deleted file mode 100644 index 9d3812822f..0000000000 --- a/packages/admin-sandbox/api/model/Article.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { SchemaDefinition as d } from '@contember/schema-definition' -import { BasicImage } from './Files' -import { Locale } from './Locale' - -export const ArticleState = d.createEnum('draft', 'published', 'removed') -export class Article { - title = d.stringColumn() - slug = d.stringColumn().unique() - image = d.manyHasOne(BasicImage) - content = d.stringColumn() - publishedAt = d.dateTimeColumn() - category = d.manyHasOne(Category) - tags = d.manyHasMany(Tag) - state = d.enumColumn(ArticleState) - number = d.intColumn().default(1) // for testing NumberCell - sortedTags = d.oneHasMany(ArticleTag, 'article').orderBy('order') -} - -export class ArticleTag { - article = d.manyHasOne(Article, 'sortedTags').notNull() - tag = d.manyHasOne(Tag).notNull() - order = d.intColumn().notNull() -} - -export class Category { - name = d.stringColumn() - locales = d.oneHasMany(CategoryLocale, 'category') - order = d.intColumn() -} - - -@d.Unique('locale', 'category') -export class CategoryLocale { - category = d.manyHasOne(Category, 'locales') - locale = d.manyHasOne(Locale) - name = d.stringColumn().notNull() -} - - -export class Tag { - name = d.stringColumn() - locales = d.oneHasMany(TagLocale, 'tag') -} - - -@d.Unique('locale', 'tag') -export class TagLocale { - tag = d.manyHasOne(Tag, 'locales') - locale = d.manyHasOne(Locale) - name = d.stringColumn().notNull() - order = d.intColumn() -} diff --git a/packages/admin-sandbox/api/model/Content.ts b/packages/admin-sandbox/api/model/Content.ts deleted file mode 100644 index 0983e3cf96..0000000000 --- a/packages/admin-sandbox/api/model/Content.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { SchemaDefinition as d } from '@contember/schema-definition' -import { BasicImage } from './Files' -import { Link } from './Link' -import { Article, ArticleTag, Tag } from './Article' - -export class Content { - blocks = d.oneHasMany(ContentBlock, 'content').orderBy('order') -} - -export class ContentBlock { - content = d.manyHasOne(Content, 'blocks').cascadeOnDelete().notNull() - order = d.intColumn().notNull() - json = d.stringColumn().notNull() - references = d.oneHasMany(ContentReference, 'block') -} - -export const ContentReferenceType = d.createEnum( - 'image', // image - 'quote', // primaryText, secondaryText - 'link', // link -) - -export class ContentReference { - block = d.manyHasOne(ContentBlock, 'references').cascadeOnDelete().notNull() - type = d.enumColumn(ContentReferenceType).notNull() - primaryText = d.stringColumn() - secondaryText = d.stringColumn() - image = d.manyHasOne(BasicImage) - link = d.manyHasOne(Link) - align = d.enumColumn(d.createEnum('left', 'right', 'center')) - tags = d.oneHasMany(ContentReferenceTag, 'reference').orderBy('order') -} - - -export class ContentReferenceTag { - reference = d.manyHasOne(ContentReference, 'tags').notNull() - tag = d.manyHasOne(Tag).notNull() - order = d.intColumn().notNull() -} diff --git a/packages/admin-sandbox/api/model/ContentBlockPage.ts b/packages/admin-sandbox/api/model/ContentBlockPage.ts deleted file mode 100644 index 708eacf431..0000000000 --- a/packages/admin-sandbox/api/model/ContentBlockPage.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { SchemaDefinition as d } from '@contember/schema-definition' -import { BasicImage } from './Files' -import { ContentBlockType } from './InputShowcase' - -export class ContentBlockPage { - unique = d.enumColumn(d.createEnum('One')).unique() - blocks = d.oneHasMany(BlockRepeaterBlock, 'blockRepeater').orderBy('order') -} - -export class BlockRepeaterBlock { - order = d.intColumn().notNull() - type = d.enumColumn(ContentBlockType).notNull() - - content = d.stringColumn() - author = d.stringColumn() - images = d.oneHasMany(RepeaterGallery, 'repeaterReference').orderBy('order') - blockRepeater = d.manyHasOne(ContentBlockPage, 'blocks') -} - -export class RepeaterGallery { - order = d.intColumn().notNull() - image = d.manyHasOne(BasicImage).notNull() - repeaterReference = d.manyHasOne(BlockRepeaterBlock, 'images').cascadeOnDelete() -} diff --git a/packages/admin-sandbox/api/model/Files.ts b/packages/admin-sandbox/api/model/Files.ts deleted file mode 100644 index 5ecc37bfae..0000000000 --- a/packages/admin-sandbox/api/model/Files.ts +++ /dev/null @@ -1,105 +0,0 @@ -import { SchemaDefinition as d, InputValidation as val } from '@contember/schema-definition' -import { One } from './One' - -export class TrivialImage { - @val.required('required TrivialImage - url') - url = d.stringColumn() -} - -export class BasicImage { - @val.required('required BasicImage - url') - url = d.stringColumn() - - width = d.intColumn() - height = d.intColumn() - size = d.intColumn() - type = d.stringColumn() - - focalPointX = d.doubleColumn() - focalPointY = d.doubleColumn() - - secondaryFocalPointX = d.doubleColumn() - secondaryFocalPointY = d.doubleColumn() -} - -export class ComplexImage { - @val.required('required ComplexImage - url') - url = d.stringColumn() - - width = d.intColumn() - height = d.intColumn() - size = d.intColumn() - type = d.stringColumn() - fileName = d.stringColumn() - base64 = d.stringColumn() - - alt = d.stringColumn() -} - -export class BasicVideo { - @val.required('required BasicVideo - url') - url = d.stringColumn() - - width = d.intColumn() - height = d.intColumn() - size = d.intColumn() - type = d.stringColumn() -} - -export const DiscriminatedAttachmentType = d.createEnum('image', 'basicImage', 'video') -export class DiscriminatedAttachment { - type = d.enumColumn(DiscriminatedAttachmentType) - image = d.oneHasOne(ComplexImage) - basicImage = d.oneHasOne(BasicImage) - video = d.oneHasOne(BasicVideo) -} - -export class ComplexImageList { - items: d.OneHasManyDefinition = d.oneHasMany(ComplexImageListItem, 'list') -} - -export class ComplexImageListItem { - list = d.manyHasOne(ComplexImageList, 'items').cascadeOnDelete().notNull() - order = d.intColumn().notNull() - image = d.oneHasOne(ComplexImage) -} - -export class ComplexFileList { - items: d.OneHasManyDefinition = d.oneHasMany(ComplexFileListItem, 'list') -} - -export const ComplexFileListItemType = d.createEnum('image', 'basicImage', 'video') - -export class ComplexFileListItem { - list = d.manyHasOne(ComplexFileList, 'items').cascadeOnDelete().notNull() - order = d.intColumn().notNull() - type = d.enumColumn(ComplexFileListItemType).notNull() - - image = d.oneHasOne(ComplexImage) - basicImage = d.oneHasOne(BasicImage) - video = d.oneHasOne(BasicVideo) -} - -export class Gallery { - unique = d.enumColumn(One).notNull().unique() - items = d.oneHasMany(GalleryItem, 'gallery') -} - -export const GalleryItemType = d.createEnum('image', 'basicImage', 'video') -export class GalleryItem { - gallery = d.manyHasOne(Gallery, 'items') - type = d.enumColumn(GalleryItemType).notNull() - image = d.oneHasOne(ComplexImage) - basicImage = d.oneHasOne(BasicImage) - video = d.oneHasOne(BasicVideo) -} - -export class GalleryList { - items = d.oneHasMany(GalleryListItem, 'list').orderBy('order') -} - -export class GalleryListItem { - list = d.manyHasOne(GalleryList, 'items') - order = d.intColumn().notNull() - item = d.manyHasOne(GalleryItem).notNull().cascadeOnDelete() -} diff --git a/packages/admin-sandbox/api/model/Homepage.ts b/packages/admin-sandbox/api/model/Homepage.ts deleted file mode 100644 index c3c25c140b..0000000000 --- a/packages/admin-sandbox/api/model/Homepage.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { SchemaDefinition as d } from '@contember/schema-definition' -import { One } from './One' -import { Content } from './Content' - -export class Homepage { - unique = d.enumColumn(One).notNull().unique() - title = d.stringColumn() - lead = d.stringColumn() - content = d.oneHasOne(Content) - footer = d.stringColumn() -} diff --git a/packages/admin-sandbox/api/model/InputShowcase.ts b/packages/admin-sandbox/api/model/InputShowcase.ts deleted file mode 100644 index af3a909678..0000000000 --- a/packages/admin-sandbox/api/model/InputShowcase.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { SchemaDefinition as d } from '@contember/schema-definition' -import { One } from './One' - - -export const SomeEnum = d.createEnum('a', 'b', 'c') - -export class InputShowcase { - unique = d.enumColumn(One).notNull().unique() - textValue = d.stringColumn() - notNullTextValue = d.stringColumn().notNull() - slugValue = d.stringColumn() - emailValue = d.stringColumn() - searchValue = d.stringColumn() - urlValue = d.stringColumn() - multilineValue = d.stringColumn() - boolValue = d.boolColumn() - intValue = d.intColumn() - floatValue = d.doubleColumn() - timeValue = d.stringColumn() - dateValue = d.dateColumn() - dateTimeValue = d.dateTimeColumn() - gpsLatValue = d.doubleColumn() - gpsLonValue = d.doubleColumn() - enumValue = d.enumColumn(SomeEnum) - selectValue = d.enumColumn(SomeEnum) - blocks = d.oneHasMany(RepeaterBlock, 'page') - jsonValue = d.jsonColumn() -} - -export const ContentBlockType = d.createEnum( - 'heroSection', -) - -export class RepeaterBlock { - primaryText = d.stringColumn() - type = d.enumColumn(ContentBlockType).notNull() - order = d.intColumn().notNull() - page = d.manyHasOne(InputShowcase, 'blocks').setNullOnDelete() -} diff --git a/packages/admin-sandbox/api/model/Link.ts b/packages/admin-sandbox/api/model/Link.ts deleted file mode 100644 index 9ee7c5109f..0000000000 --- a/packages/admin-sandbox/api/model/Link.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { SchemaDefinition as d } from '@contember/schema-definition' -import { Url } from './Url' - -export const LinkType = d.createEnum('internal', 'external') - -export class Link { - type = d.enumColumn(LinkType).notNull() - internalLink = d.manyHasOne(Url).setNullOnDelete() - externalLink = d.stringColumn() -} diff --git a/packages/admin-sandbox/api/model/Locale.ts b/packages/admin-sandbox/api/model/Locale.ts deleted file mode 100644 index de9fa5584e..0000000000 --- a/packages/admin-sandbox/api/model/Locale.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { SchemaDefinition as d } from '@contember/schema-definition' - -export class Locale { - code = d.stringColumn().unique().notNull() - label = d.stringColumn() -} - -export class LocaleDialect { - locale = d.manyHasOne(Locale) - label = d.stringColumn() -} diff --git a/packages/admin-sandbox/api/model/One.ts b/packages/admin-sandbox/api/model/One.ts deleted file mode 100644 index 965ae277b5..0000000000 --- a/packages/admin-sandbox/api/model/One.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { SchemaDefinition as d } from '@contember/schema-definition' - -export const One = d.createEnum('One') diff --git a/packages/admin-sandbox/api/model/QuizResult.ts b/packages/admin-sandbox/api/model/QuizResult.ts deleted file mode 100644 index 6c6e64bc35..0000000000 --- a/packages/admin-sandbox/api/model/QuizResult.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { SchemaDefinition as d } from '@contember/schema-definition' - -export const QuizResultState = d.createEnum('pending', 'failed', 'succeed') - -/** - * Discriminated block example - */ -export class QuizResult { - answer = d.stringColumn().notNull() - state = d.enumColumn(QuizResultState).notNull() - failReason = d.stringColumn() - successRating = d.intColumn() -} diff --git a/packages/admin-sandbox/api/model/SeqEntity.ts b/packages/admin-sandbox/api/model/SeqEntity.ts deleted file mode 100644 index 829f0a82f6..0000000000 --- a/packages/admin-sandbox/api/model/SeqEntity.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { SchemaDefinition as d } from '@contember/schema-definition' - -export class SeqEntity { - id = d.intColumn().notNull().sequence() - value = d.stringColumn() - sub = d.oneHasMany(SeqEntity2, 'parent') -} - -export class SeqEntity2 { - id = d.intColumn().notNull().sequence({ precedence: 'ALWAYS', start: 100 }) - value = d.stringColumn() - parent = d.manyHasOne(SeqEntity, 'sub') -} diff --git a/packages/admin-sandbox/api/model/Task.ts b/packages/admin-sandbox/api/model/Task.ts deleted file mode 100644 index c09eba913d..0000000000 --- a/packages/admin-sandbox/api/model/Task.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { SchemaDefinition as def } from '@contember/schema-definition' - -export const TaskStatus = def.createEnum('new', 'in_progress', 'done') - -export class Task { - title = def.stringColumn().notNull() - status = def.enumColumn(TaskStatus).notNull() - order = def.intColumn() - assignee = def.manyHasOne(User, 'assignedTasks') -} - -export class User { - order = def.intColumn() - name = def.stringColumn().notNull() - assignedTasks = def.oneHasMany(Task, 'assignee') -} diff --git a/packages/admin-sandbox/api/model/UploadShowcase.ts b/packages/admin-sandbox/api/model/UploadShowcase.ts deleted file mode 100644 index d68ec61602..0000000000 --- a/packages/admin-sandbox/api/model/UploadShowcase.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { SchemaDefinition as d } from '@contember/schema-definition' -import { - BasicImage, - ComplexFileList, - ComplexImage, - ComplexImageList, - DiscriminatedAttachment, - GalleryItem, - GalleryList, - TrivialImage, -} from './Files' -import { One } from './One' - -export class UploadShowcase { - unique = d.enumColumn(One).notNull().unique() - - singleTrivialImage = d.oneHasOne(TrivialImage) - singleBasicImage = d.oneHasOne(BasicImage) - singleComplexImage = d.oneHasOne(ComplexImage) - multipleBasicImageList = d.oneHasMany(UploadShowcaseImage, 'page') - - discriminatedAttachment = d.oneHasOne(DiscriminatedAttachment).removeOrphan() - - imageList = d.oneHasOne(ComplexImageList) - fileList = d.oneHasOne(ComplexFileList) - - galleryItem = d.manyHasOne(GalleryItem) - galleryList = d.oneHasOne(GalleryList) -} - -export class UploadShowcaseImage { - page = d.manyHasOne(UploadShowcase, 'multipleBasicImageList') - image = d.manyHasOne(BasicImage) - order = d.intColumn() -} diff --git a/packages/admin-sandbox/api/model/Url.ts b/packages/admin-sandbox/api/model/Url.ts deleted file mode 100644 index 622565051e..0000000000 --- a/packages/admin-sandbox/api/model/Url.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { SchemaDefinition as d } from '@contember/schema-definition' -import { Article, Category, Tag } from './Article' - -export const UrlType = d.createEnum('article', 'category', 'tag') - -@d.Unique('url') -export class Url { - url = d.stringColumn().notNull() - type = d.enumColumn(UrlType).notNull() - article = d.oneHasOne(Article).cascadeOnDelete() - category = d.oneHasOne(Category).cascadeOnDelete() - tag = d.oneHasOne(Tag).cascadeOnDelete() -} diff --git a/packages/admin-sandbox/api/model/index.ts b/packages/admin-sandbox/api/model/index.ts deleted file mode 100644 index f963f5d490..0000000000 --- a/packages/admin-sandbox/api/model/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -export * from './Article' -export * from './Content' -export * from './ContentBlockPage' -export * from './Files' -export * from './Homepage' -export * from './InputShowcase' -export * from './Link' -export * from './Locale' -export * from './One' -export * from './QuizResult' -export * from './Task' -export * from './SeqEntity' -export * from './UploadShowcase' -export * from './Url' diff --git a/packages/admin-sandbox/api/tsconfig.json b/packages/admin-sandbox/api/tsconfig.json deleted file mode 100644 index da581e5b07..0000000000 --- a/packages/admin-sandbox/api/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../../tsconfig.settings.json", - "compilerOptions": { - "noEmit": true, - "emitDeclarationOnly": false - }, - "references": [ - { "path": "../../admin/src" } - ] -} diff --git a/packages/admin-sandbox/package.json b/packages/admin-sandbox/package.json deleted file mode 100644 index ab1135ffa8..0000000000 --- a/packages/admin-sandbox/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "@contember/admin-sandbox", - "version": "0.0.0", - "type": "module", - "private": true, - "scripts": { - "build": "vite build --config vite.config.ts --base /admin-sandbox/", - "contember": "docker-compose run contember-cli", - "deploy": "yarn -- contember deploy admin-sandbox --admin http://admin-server:4000 --yes", - "start": "vite --config vite.config.ts --port ${VITE_PORT:-3010} --host 0.0.0.0", - "test": "vitest --root ./ --environment jsdom" - }, - "devDependencies": { - "@contember/admin": "workspace:*", - "@contember/brand": "workspace:*", - "@contember/interface-tester": "workspace:*", - "@contember/layout": "workspace:*", - "@contember/react-dataview": "workspace:*", - "@contember/ui": "workspace:*", - "graphql": "^16.8.1" - }, - "dependencies": { - "@contember/schema": "^1.4.0-beta.1", - "@contember/schema-definition": "^1.4.0-beta.1", - "@contember/schema-utils": "^1.4.0-beta.1", - "lucide-react": "^0.302.0", - "react": "^18.3.1", - "react-content-loader": "^6.2.1", - "react-dom": "^18.3.1" - } -} diff --git a/packages/admin-sandbox/tests/pages.test.ts b/packages/admin-sandbox/tests/pages.test.ts deleted file mode 100644 index 074517e896..0000000000 --- a/packages/admin-sandbox/tests/pages.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { testInterface } from '@contember/interface-tester' -import schema from '../api' - -testInterface({ - schema, - exclude: [ - 'inputs.tsx/JsonField', - 'categories.tsx/CategoryForm', - 'article.tsx/EditOrCreateForm', - 'auto.tsx', - 'brand.tsx', - 'buttons.tsx', - 'actionableBoxes.tsx', - 'boxes.tsx', - 'slots.tsx', - 'chat.tsx', - 'textareas.tsx', - 'fieldContainers.tsx', - 'messages.tsx', - 'lorem.tsx', - 'examples.tsx', - 'settings.tsx', - 'nested/**', - 'random.tsx', - 'tenant**', - ], - pagesDir: 'admin/pages', - pages: { - '**/{edit.tsx,edit}': { - parameters: { - id: '4e68a6dd-6106-4306-8344-2aa5549e6b45', - }, - }, - }, -}) diff --git a/packages/admin-sandbox/tests/tsconfig.json b/packages/admin-sandbox/tests/tsconfig.json deleted file mode 100644 index 03416e8f85..0000000000 --- a/packages/admin-sandbox/tests/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../../../tsconfig.settings.json", - "include": ["../api", "./"], - "compilerOptions": { - "rootDir": "../", - "noEmit": true, - "emitDeclarationOnly": false - }, - "references": [ - { "path": "../../interface-tester/src" } - ] -} diff --git a/packages/admin-sandbox/tsconfig.json b/packages/admin-sandbox/tsconfig.json deleted file mode 100644 index 26d339f22e..0000000000 --- a/packages/admin-sandbox/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "files": [], - "include": [], - "references": [ - { "path": "./admin" }, - { "path": "./tests" }, - { "path": "./api" } - ] -} diff --git a/packages/admin-sandbox/vite.config.ts b/packages/admin-sandbox/vite.config.ts deleted file mode 100644 index 2b65b6ad20..0000000000 --- a/packages/admin-sandbox/vite.config.ts +++ /dev/null @@ -1,9 +0,0 @@ -import react from '@vitejs/plugin-react' -import { defineConfig } from 'vite' -import { resolveConfig } from '../../build' - -export default defineConfig({ - root: 'admin', - plugins: [react()], - resolve: resolveConfig, -}) diff --git a/packages/admin/api-extractor.json b/packages/admin/api-extractor.json deleted file mode 100644 index 66c17dd719..0000000000 --- a/packages/admin/api-extractor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../build/api-extractor.json" -} diff --git a/packages/admin/package.json b/packages/admin/package.json deleted file mode 100644 index 27d53b0b7b..0000000000 --- a/packages/admin/package.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "name": "@contember/admin", - "license": "Apache-2.0", - "version": "0.0.0", - "type": "module", - "sideEffects": [ - "*.css" - ], - "main": "./dist/production/index.js", - "exports": { - ".": { - "import": { - "types": "./dist/types/index.d.ts", - "development": "./dist/development/index.js", - "production": "./dist/production/index.js", - "default": "./dist/production/index.js" - }, - "require": { - "types": "./dist/types/index.d.ts", - "development": "./dist/development/index.cjs", - "production": "./dist/production/index.cjs", - "default": "./dist/production/index.cjs" - } - }, - "./index.css": { - "development": "./src/index.css", - "production": "./dist/assets/index.css", - "default": "./dist/assets/index.css" - }, - "./style.css": "./dist/assets/index.css" - }, - "files": [ - "dist/", - "src/" - ], - "typings": "./dist/types/index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/contember/admin.git", - "directory": "packages/admin" - }, - "scripts": { - "build": "yarn build:js:dev && yarn build:js:prod && yarn build:css", - "build:js:dev": "NODE_ENV=development vite build --mode development", - "build:js:prod": "vite build --mode production", - "build:css": "vite build --config vite.config.css.js", - "pw:build": "vite build tests/playwright/admin", - "pw:dev": "vite dev tests/playwright/admin", - "pw:preview": "vite preview tests/playwright/admin", - "pw:debug": "playwright test --debug --project='Desktop Chrome'", - "pw:report": "playwright show-report tests/playwright/report", - "pw:test": "playwright test", - "pw:update": "playwright test --update-snapshots", - "ae:build": "api-extractor run --local", - "ae:test": "api-extractor run", - "test": "vitest --environment jsdom tests/vitest" - }, - "dependencies": { - "@contember/brand": "workspace:*", - "@contember/client": "workspace:*", - "@contember/react-auto": "workspace:*", - "@contember/react-binding": "workspace:*", - "@contember/react-binding-ui": "workspace:*", - "@contember/react-choice-field-ui": "workspace:*", - "@contember/react-client": "workspace:*", - "@contember/react-datagrid-ui": "workspace:*", - "@contember/react-dataview": "workspace:*", - "@contember/react-devbar": "workspace:*", - "@contember/react-form-fields-ui": "workspace:*", - "@contember/react-i18n": "workspace:*", - "@contember/react-identity": "workspace:*", - "@contember/react-leaflet-fields-ui": "workspace:*", - "@contember/react-multipass-rendering": "workspace:*", - "@contember/react-routing": "workspace:*", - "@contember/react-utils": "workspace:*", - "@contember/ui": "workspace:*", - "@contember/utilities": "workspace:*", - "blueimp-md5": "2.19.0", - "is-hotkey": "0.2.0", - "lucide-react": "^0.302.0", - "qrcode-generator": "^1.4.4", - "react-dropzone": "^14.2.3", - "react-error-boundary": "^4.0.12", - "react-sortable-hoc": "2.0.0", - "slate": "0.73.1", - "slate-history": "0.66.0", - "slate-react": "0.74.2", - "stacktracey": "2.1.8" - }, - "peerDependencies": { - "react": "^18 || ^19", - "react-dom": "^18 || ^19" - }, - "devDependencies": { - "@contember/schema": "^1.3.7", - "@contember/schema-definition": "^1.3.7", - "@contember/schema-migrations": "^1.3.7", - "@contember/schema-utils": "^1.3.7", - "@playwright/test": "^1.44.0", - "@testing-library/react": "^14.3.1", - "@types/blueimp-md5": "2.18.2", - "@types/is-hotkey": "0.1.10", - "@types/leaflet": "^1.9.8", - "@types/node": "^20.10.5", - "@types/react": "^18.3.2", - "@types/react-dom": "^18.3.0", - "csstype": "^3.1.3", - "pg": "^8.11.5", - "playwright": "1.44.0", - "react": "^18.3.1", - "react-dom": "^18.3.1" - } -} diff --git a/packages/admin/playwright.config.js b/packages/admin/playwright.config.js deleted file mode 100644 index d8f9019e24..0000000000 --- a/packages/admin/playwright.config.js +++ /dev/null @@ -1,57 +0,0 @@ -// @ts-check -import { devices } from '@playwright/test' - -/** @type { import("@playwright/test").PlaywrightTestConfig } **/ -const config = { - timeout: 60000, - workers: process.env.CI ? 1 : undefined, - - expect: { - toMatchSnapshot: { - threshold: process.env.CI ? 0.03 : 0, - maxDiffPixelRatio: process.env.CI ? 0.0005 : 0, - }, - }, - - reporter: [ - [process.env.CI ? 'github' : 'list'], - ['html', { open: 'never', outputFolder: 'tests/playwright/report' }], - ], - - testDir: 'tests/playwright/cases', - outputDir: 'tests/playwright/output', - snapshotDir: 'tests/playwright/snapshots', - - use: { - screenshot: 'on', - trace: 'on', - video: 'on', - }, - - projects: [ - { - name: 'iPhone 11', - use: { ...devices['iPhone 11'] }, - }, - { - name: 'iPad landscape', - use: { ...devices['iPad (gen 7) landscape'] }, - }, - { - name: 'Desktop Chrome', - use: { ...devices['Desktop Chrome'], viewport: { width: 1903, height: 1009 } }, - }, - { - name: 'Desktop Firefox Dark', - use: { ...devices['Desktop Firefox'], viewport: { width: 1903, height: 1009 }, colorScheme: 'dark' }, - }, - ], - - webServer: { - command: 'npm run pw:preview', - port: 3333, - reuseExistingServer: true, - }, -} - -export default config diff --git a/packages/admin/src/acl/index.ts b/packages/admin/src/acl/index.ts deleted file mode 100644 index a08da035e0..0000000000 --- a/packages/admin/src/acl/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './useProjectUserRoles' diff --git a/packages/admin/src/acl/useProjectUserRoles.tsx b/packages/admin/src/acl/useProjectUserRoles.tsx deleted file mode 100644 index 854d4a7aaf..0000000000 --- a/packages/admin/src/acl/useProjectUserRoles.tsx +++ /dev/null @@ -1,2 +0,0 @@ -export { useProjectUserRoles } from '@contember/react-identity' -export type { ProjectUserRoles } from '@contember/react-identity' diff --git a/packages/admin/src/adminDictionary.ts b/packages/admin/src/adminDictionary.ts deleted file mode 100644 index 9a30ca49e3..0000000000 --- a/packages/admin/src/adminDictionary.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { - BlockRepeaterDictionary, - EditorDictionary, - OutdatedApplicationDictionary, - RepeaterDictionary, - UploadDictionary, -} from './components' -import { DataGridCellsDictionary, DataGridDictionary } from '@contember/react-datagrid-ui' -import { ErrorCodeDictionary, FieldViewDictionary, PersistFeedbackDictionary } from '@contember/react-binding-ui' -import { ChoiceFieldDictionary } from '@contember/react-choice-field-ui' - -// This isn't in i18n in order to avoid unnecessary circular imports. - -// This should ideally be a complete list of all individual dictionaries throughout the entire package. -// That way, translation packages can implement this and have TS warn them about missing messages. -export type AdminDictionary = - & BlockRepeaterDictionary - & DataGridCellsDictionary - & DataGridDictionary - & ErrorCodeDictionary - & EditorDictionary - & FieldViewDictionary - & PersistFeedbackDictionary - & RepeaterDictionary - & UploadDictionary - & ChoiceFieldDictionary - & OutdatedApplicationDictionary diff --git a/packages/admin/src/ambient.d.ts b/packages/admin/src/ambient.d.ts deleted file mode 100644 index 9ada8ad486..0000000000 --- a/packages/admin/src/ambient.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -interface Document { - caretPositionFromPoint?: (x: number, y: number) => { - offsetNode: Node - offset: number - getClientRect(): DOMRect - } -} diff --git a/packages/admin/src/bootstrap/index.ts b/packages/admin/src/bootstrap/index.ts deleted file mode 100644 index acf67565ed..0000000000 --- a/packages/admin/src/bootstrap/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './runReactApp' -export type { ReactRenderer } from './render' diff --git a/packages/admin/src/bootstrap/render.ts b/packages/admin/src/bootstrap/render.ts deleted file mode 100644 index eac3aa914f..0000000000 --- a/packages/admin/src/bootstrap/render.ts +++ /dev/null @@ -1,7 +0,0 @@ -import * as ReactDOM from 'react-dom' -import { ReactElement } from 'react' - -export type ReactRenderer = (domElement: Element, reactElement: ReactElement, onRecoverableError: (e: any) => void) => void - -// eslint-disable-next-line react/no-deprecated -export const legacyReactRenderer: ReactRenderer = (domElement, reactElement) => ReactDOM.render(reactElement, domElement) diff --git a/packages/admin/src/bootstrap/runReactApp.tsx b/packages/admin/src/bootstrap/runReactApp.tsx deleted file mode 100644 index 15006fb9a4..0000000000 --- a/packages/admin/src/bootstrap/runReactApp.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { ReactElement } from 'react' -import { legacyReactRenderer, ReactRenderer } from './render' -import { createErrorHandler } from '@contember/react-devbar' - -export const runReactApp = ( - reactElement: ReactElement, - domRoot?: HTMLElement | string | null, - render: ReactRenderer = legacyReactRenderer, -) => { - const rootEl = domRoot instanceof HTMLElement - ? domRoot - : typeof domRoot === 'string' - ? document.querySelector(domRoot) - : document.body.appendChild(document.createElement('div')) - - if (!rootEl) { - throw new Error(`Undefined react root element`) - } - const errorHandler = createErrorHandler(render) - errorHandler(onRecoverableError => render(rootEl, reactElement, onRecoverableError)) -} diff --git a/packages/admin/src/components/Application/OutdatedApplicationChecker.tsx b/packages/admin/src/components/Application/OutdatedApplicationChecker.tsx deleted file mode 100644 index 22b57b2579..0000000000 --- a/packages/admin/src/components/Application/OutdatedApplicationChecker.tsx +++ /dev/null @@ -1,125 +0,0 @@ -import { useIsMounted } from '@contember/react-utils' -import { Button, Heading, Stack, useDialog } from '@contember/ui' -import { ComponentType, useCallback, useEffect, useRef, useState } from 'react' -import { useMessageFormatter } from '@contember/react-i18n' -import { outdatedApplicationDictionary } from './outdatedApplicationDictionary' - -const postponeTimeoutMs = 60_000 * 5 -const checkIntervalMs = 30_000 - -/** - * @internal - */ -export const OutdatedApplicationChecker: ComponentType = () => { - const modal = useDialog() - const isOutdated = useIsOutdated() - const isOpen = useRef(false) - const isMounted = useIsMounted() - - const openDialog = useCallback(async () => { - if (isOpen.current || !isMounted.current) { - return - } - isOpen.current = true - - const result = await modal.openDialog({ - content: ({ resolve }) => ( - resolve(true)} onPostpone={() => resolve(false)} /> - ), - }) - isOpen.current = false - - if (!isMounted.current) { - return - } - if (result) { - window.location.reload() - } else { - setTimeout(openDialog, postponeTimeoutMs) - } - }, [isMounted, modal]) - - useEffect(() => { - if (!isOutdated) { - return - } - openDialog() - }, [isOutdated, openDialog]) - - return null -} - -const OutdatedApplicationDialog = ({ onReload, onPostpone }: { onReload: () => void, onPostpone: () => void }) => { - const formatMessage = useMessageFormatter(outdatedApplicationDictionary) - return ( - - {formatMessage('outdatedApplication.heading')} -

{formatMessage('outdatedApplication.text')}

- - - - -
- ) -} - - -const getVersionFromDocument = (node: ParentNode) => { - const meta = node.querySelector('meta[name=contember-build-version]') - return meta?.content -} - -const useFetchVersion = () => { - return useCallback(async () => { - try { - const result = await (await fetch(window.location.href)).text() - const html = document.createElement('html') - html.innerHTML = result - return getVersionFromDocument(html) - } catch (e) { - console.error(e) - return undefined - } - }, []) -} - -const useIsOutdated = () => { - const [initialVersion] = useState(() => { - return getVersionFromDocument(document.head) - }) - const [isOutdated, setIsOutdated] = useState(false) - const fetchVersion = useFetchVersion() - - const checkVersion = useCallback(async () => { - if (document.hidden) { - return - } - const version = await fetchVersion() - if (version !== initialVersion) { - setIsOutdated(true) - } - }, [fetchVersion, initialVersion]) - const shouldCheck = !!initialVersion && !isOutdated - - useEffect(() => { - if (!shouldCheck) { - return - } - const handle = setInterval(checkVersion, checkIntervalMs) - return () => clearInterval(handle) - }, [checkVersion, shouldCheck]) - - useEffect(() => { - if (!shouldCheck) { - return - } - document.addEventListener('visibilitychange', checkVersion) - return () => document.removeEventListener('visibilitychange', checkVersion) - }, [checkVersion, shouldCheck]) - - return isOutdated -} diff --git a/packages/admin/src/components/Application/outdatedApplicationDictionary.ts b/packages/admin/src/components/Application/outdatedApplicationDictionary.ts deleted file mode 100644 index fdc59c2ded..0000000000 --- a/packages/admin/src/components/Application/outdatedApplicationDictionary.ts +++ /dev/null @@ -1,10 +0,0 @@ -export const outdatedApplicationDictionary = { - outdatedApplication: { - heading: 'An updated version is available', - text: 'To access the latest features and improvements, kindly refresh your browser.', - reloadButton: 'Refresh now', - postponeButton: 'Snooze', - }, -} - -export type OutdatedApplicationDictionary = typeof outdatedApplicationDictionary diff --git a/packages/admin/src/components/ApplicationEntrypoint.tsx b/packages/admin/src/components/ApplicationEntrypoint.tsx deleted file mode 100644 index a6c866c9b5..0000000000 --- a/packages/admin/src/components/ApplicationEntrypoint.tsx +++ /dev/null @@ -1,89 +0,0 @@ -import { Environment, EnvironmentContext, EnvironmentExtensionProvider } from '@contember/react-binding' -import { ContemberClient, ContemberClientProps } from '@contember/react-client' -import { Providers as InterfaceProviders, ProvidersProps } from '@contember/ui' -import { ComponentType, PropsWithChildren, ReactNode } from 'react' -import { I18nProvider, MessageDictionaryByLocaleCode } from '@contember/react-i18n' -import { RequestProvider, RouteMap, RoutingContext, RoutingContextValue, SelectedDimension } from '../routing' -import { OutdatedApplicationChecker } from './Application/OutdatedApplicationChecker' -import { ApplicationDevBar } from './Dev/DevBar' -import { IdentityProvider } from './Identity' -import { NavigationProvider } from './NavigationProvider' -import { DataViewPageNameKeyProvider } from './DataViewPageNameKeyProvider' -import { projectEnvironmentExtension } from '@contember/react-identity' - -export interface ApplicationEntrypointProps extends ContemberClientProps, Omit { - basePath?: string - sessionToken?: string - routes?: RouteMap - defaultDimensions?: SelectedDimension - defaultLocale?: string - dictionaries?: MessageDictionaryByLocaleCode - envVariables?: Record - children: ReactNode - onInvalidIdentity?: () => void - devBarPanels?: ReactNode - providers?: ComponentType -} - -const validateProps = (props: Partial) => { - if (typeof props.apiBaseUrl !== 'string') { - throw new Error(`The ENV variables haven't been set. Check your \`.env.development.local\` file.`) // TODO: better message - } -} - -/** - * @group Entrypoints - */ -export const ApplicationEntrypoint = (props: ApplicationEntrypointProps) => { - validateProps(props) - const projectSlug = props.project === '__PROJECT_SLUG__' - ? window.location.pathname.split('/')[1] - : props.project - const basePath = props.basePath === './' - ? `/${projectSlug}/` - : (props.basePath ?? '/') - - const routing: RoutingContextValue = { - basePath, - routes: props.routes ?? { index: { path: '/' } }, - defaultDimensions: props.defaultDimensions, - } - - const rootEnv = Environment.create() - .withVariables(props.envVariables) - .withDimensions(props.defaultDimensions ?? {}) - - const Providers = props.providers ?? InterfaceProviders - - return ( - - - - - - - - - - - - {props.children} - - - - - - - - - - - - ) -} diff --git a/packages/admin/src/components/DataViewPageNameKeyProvider.tsx b/packages/admin/src/components/DataViewPageNameKeyProvider.tsx deleted file mode 100644 index 3c8ae92677..0000000000 --- a/packages/admin/src/components/DataViewPageNameKeyProvider.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { useCurrentRequest } from '../routing' -import { DataViewKeyProvider } from '@contember/react-dataview' -import { ReactNode } from 'react' - -export const DataViewPageNameKeyProvider = ({ children }: { children: ReactNode }) => { - const pageName = useCurrentRequest()?.pageName - - return ( - - {children} - - ) -} diff --git a/packages/admin/src/components/Dev/ApiPanel.tsx b/packages/admin/src/components/Dev/ApiPanel.tsx deleted file mode 100644 index e598b830e9..0000000000 --- a/packages/admin/src/components/Dev/ApiPanel.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import { - formatContentApiRelativeUrl, - tenantApiRelativeUrl, - useApiBaseUrl, - useProjectSlug, - useSessionTokenWithMeta, - useStageSlug, -} from '@contember/react-client' -import { Table, TableCell, TableHeaderCell, TableRow } from '@contember/ui' -import { DevPanel } from '@contember/react-devbar' -import { GlobeIcon } from 'lucide-react' - -export const ApiPanel = () => { - const apiBaseUrl = useApiBaseUrl() - const projectSlug = useProjectSlug() - const stageSlug = useStageSlug() - const sessionToken = useSessionTokenWithMeta() - if (!projectSlug || !stageSlug) { - return null - } - return ( - } heading="API URLs"> - - - Project - {projectSlug} - - - Base URL - {apiBaseUrl} - - - Content API URL - {apiBaseUrl}{formatContentApiRelativeUrl(projectSlug, stageSlug)} - - - - Tenant API URL - {apiBaseUrl}{tenantApiRelativeUrl} - - - Token - - {sessionToken.token} - - -
-
- ) -} diff --git a/packages/admin/src/components/Dev/DevBar.tsx b/packages/admin/src/components/Dev/DevBar.tsx deleted file mode 100644 index d8f2906918..0000000000 --- a/packages/admin/src/components/Dev/DevBar.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { ReactNode } from 'react' -import { DevBar } from '@contember/react-devbar' -import { IdentityPanel } from './IdentityPanel' -import { ApiPanel } from './ApiPanel' -import { Identity2023 } from '@contember/brand' - -export const ApplicationDevBar = ({ panels }: { panels?: ReactNode }) => { - if (!import.meta.env.DEV) { - return null - } - return ( - - - )} - > - - - {panels} - - ) -} diff --git a/packages/admin/src/components/Dev/DevErrorFallback.tsx b/packages/admin/src/components/Dev/DevErrorFallback.tsx deleted file mode 100644 index 667ebae0b3..0000000000 --- a/packages/admin/src/components/Dev/DevErrorFallback.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { Portal } from '@contember/ui' -import { FallbackProps } from 'react-error-boundary' -import { DevError, useProcessedError } from '@contember/react-devbar' - -export function DevErrorFallback({ error }: FallbackProps) { - return ( - - - - ) -} diff --git a/packages/admin/src/components/Dev/IdentityPanel.tsx b/packages/admin/src/components/Dev/IdentityPanel.tsx deleted file mode 100644 index 271afb192e..0000000000 --- a/packages/admin/src/components/Dev/IdentityPanel.tsx +++ /dev/null @@ -1,206 +0,0 @@ -import { useProjectSlug, useSessionTokenWithMeta, useSetSessionToken } from '@contember/react-client' -import { - Button, - ButtonGroup, - EmailInput, - FieldContainer, - Stack, - Table, - TableCell, - TableHeaderCell, - TableRow, - useDialog, - useShowToast, -} from '@contember/ui' -import { UserCircleIcon } from 'lucide-react' -import { FC, SyntheticEvent, useCallback, useState } from 'react' -import { EditMembership, GQLVariable, Membership, useCreateApiKey, useSingleTenantMutation } from '../../tenant' -import { useOptionalIdentity } from '../Identity' -import { LogoutLink } from '../LogoutLink' -import { DevPanel } from '@contember/react-devbar' - -export const IdentityPanel = () => { - const identity = useOptionalIdentity() - const sessionToken = useSessionTokenWithMeta() - - const dialog = useDialog() - const openSwitchRole = useCallback(() => { - dialog.openDialog({ - heading: 'Login as...', - content: () => , - }) - }, [dialog]) - const openLoginEmail = useCallback(() => { - dialog.openDialog({ - heading: 'Login by email', - content: () => , - }) - }, [dialog]) - - return ( - } heading="Identity"> - {identity ? <> - - - - - {sessionToken.source === 'localstorage' && Logout} - - - - Identity ID - {identity.id} - - - Person ID - {identity.person ? identity.person.id : Not a person} - - - Token - - {sessionToken.token}
- {sessionToken.source === 'props' ? 'stored in env' : 'stored in a local storage'} -
-
- - E-mail - {identity.person ? identity.person.email : Not a person} - - - Project access - -
    - {identity.projects.map(it =>
  • - {it.slug} ({it.roles.join(', ')}) -
  • )} -
-
-
-
- -
- : <> - Not logged in - } -
- ) -} - -const LoginAsRole: FC = ({ }) => { - const addToast = useShowToast() - const [isSubmitting, setSubmitting] = useState(false) - const [memberships, setMemberships] = useState<(Membership | undefined)[]>([undefined]) - const projectSlug = useProjectSlug()! - const createApiKey = useCreateApiKey() - const sessionToken = useSessionTokenWithMeta() - - const setSessionToken = useSetSessionToken() - const submit = useCallback( - async (e: SyntheticEvent) => { - e.preventDefault() - setSubmitting(true) - const membershipsToSave = memberships.filter((it: Membership | undefined): it is Membership => it !== undefined) - const response = await createApiKey({ - description: 'Created from panel', - memberships: membershipsToSave, - projectSlug: projectSlug!, - }, { - apiTokenOverride: sessionToken.propsToken, - }) - setSubmitting(false) - if (!response.ok) { - switch (response.error.code) { - case 'INVALID_MEMBERSHIP': - return addToast({ message: `Invalid membership definition`, type: 'error' }) - case 'PROJECT_NOT_FOUND': - return addToast({ message: `Project not found`, type: 'error' }) - } - } else { - setSessionToken(response.result.apiKey.token) - } - }, - [memberships, createApiKey, projectSlug, sessionToken.propsToken, addToast, setSessionToken], - ) - - const editUserMembershipProps = { project: projectSlug, memberships, setMemberships } - - return ( -
- - - - - -
- ) -} - - -const createSessionKeyVariables = { - email: GQLVariable.Required(GQLVariable.String), -} - -const useCreateSessionToken = () => { - return useSingleTenantMutation< - { token: string }, - 'UNKNOWN_EMAIL', - typeof createSessionKeyVariables - >(`createSessionToken(email: $email) { - ok - error { - code - } - result { - token - } - }`, createSessionKeyVariables) - -} - -const LoginWithEmail = () => { - const [email, setEmail] = useState('') - const sessionToken = useSessionTokenWithMeta() - const addToast = useShowToast() - const [isSubmitting, setSubmitting] = useState(false) - const setSessionToken = useSetSessionToken() - const createSessionToken = useCreateSessionToken() - - const submit = useCallback(async (e: SyntheticEvent) => { - e.preventDefault() - - setSubmitting(true) - const response = await createSessionToken({ - email, - }, { - apiTokenOverride: sessionToken.propsToken, - }) - setSubmitting(false) - - if (!response.ok) { - switch (response.error.code) { - case 'UNKNOWN_EMAIL': - return addToast({ message: 'Person with given email not found.', type: 'error' }) - } - } else { - setSessionToken(response.result.token) - } - }, [addToast, createSessionToken, email, sessionToken.propsToken, setSessionToken]) - - return <> -
- - - setEmail(e as string)} notNull /> - - - -
- -} diff --git a/packages/admin/src/components/Dev/ProjectUserRolesRevealer.tsx b/packages/admin/src/components/Dev/ProjectUserRolesRevealer.tsx deleted file mode 100644 index 5e30220c48..0000000000 --- a/packages/admin/src/components/Dev/ProjectUserRolesRevealer.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { memo } from 'react' -import { useProjectUserRoles } from '../../acl' -import { isDevMode } from './isDevMode' - -export const ProjectUserRolesRevealer = memo(() => { - const myRoles = useProjectUserRoles() - const hasRoles = myRoles.size !== 0 - - if (!isDevMode()) { - return null - } - - return ( -
- {hasRoles || 'User has no roles'} - {hasRoles && ( - <> - Roles:{' '} - {Array.from(myRoles).map(role => ( - {role} - ))} - - )} -
- ) -}) diff --git a/packages/admin/src/components/Dev/index.ts b/packages/admin/src/components/Dev/index.ts deleted file mode 100644 index 59ce530d95..0000000000 --- a/packages/admin/src/components/Dev/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './DevErrorFallback' -export * from './isDevMode' -export * from './ProjectUserRolesRevealer' diff --git a/packages/admin/src/components/Dev/isDevMode.ts b/packages/admin/src/components/Dev/isDevMode.ts deleted file mode 100644 index 53763386ff..0000000000 --- a/packages/admin/src/components/Dev/isDevMode.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const isDevMode = () => { - const hostname = location.hostname.toLowerCase() - return hostname === 'localhost' -} diff --git a/packages/admin/src/components/Identity/IdentityProvider.tsx b/packages/admin/src/components/Identity/IdentityProvider.tsx deleted file mode 100644 index 19783d8ebd..0000000000 --- a/packages/admin/src/components/Identity/IdentityProvider.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import { Message, SpinnerOverlay } from '@contember/ui' -import { ReactNode, useEffect } from 'react' -import { MiscPageLayout } from '../MiscPageLayout' -import { InvalidIdentityFallback } from './InvalidIdentityFallback' -import { IdentityProvider as BaseIdentityProvider, IdentityEnvironmentProvider, IdentityState } from '@contember/react-identity' - -export interface IdentityProviderProps { - children: ReactNode - onInvalidIdentity?: () => void - allowUnauthenticated?: boolean -} - -const ClearIdentityHandler = ({ onInvalidIdentity }: { - onInvalidIdentity?: () => void -}) => { - useEffect(() => { - if (onInvalidIdentity) { - onInvalidIdentity() - } else if (window.location.pathname !== '/') { - window.location.href = '/' // todo better redirect? - } - }, [onInvalidIdentity]) - - return null -} - - -export const IdentityProvider: React.FC = ({ children, onInvalidIdentity, allowUnauthenticated }) => { - return ( - - - - - - Logging out… - - - - - - - - - - {children} - - - - ) -} diff --git a/packages/admin/src/components/Identity/InvalidIdentityFallback.tsx b/packages/admin/src/components/Identity/InvalidIdentityFallback.tsx deleted file mode 100644 index c9a5fbcda4..0000000000 --- a/packages/admin/src/components/Identity/InvalidIdentityFallback.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { AnchorButton, Button, ButtonGroup, Message } from '@contember/ui' -import { LogoutLink } from '../LogoutLink' -import { MiscPageLayout } from '../MiscPageLayout' - -export const InvalidIdentityFallback = () => { - return ( - - Failed to fetch an identity - - Reload - Login again - - - ) -} diff --git a/packages/admin/src/components/Identity/index.ts b/packages/admin/src/components/Identity/index.ts deleted file mode 100644 index 020506a587..0000000000 --- a/packages/admin/src/components/Identity/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -export * from './IdentityProvider' -export * from './useIdentity' -export { - HasRole, - identityEnvironmentExtension, - useIdentity as useOptionalIdentity, - useLogout, -} from '@contember/react-identity' - -export type { - Identity, -} from '@contember/react-identity' diff --git a/packages/admin/src/components/Identity/useIdentity.ts b/packages/admin/src/components/Identity/useIdentity.ts deleted file mode 100644 index 2d8f4303c1..0000000000 --- a/packages/admin/src/components/Identity/useIdentity.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Identity, useIdentity as useOptionalIdentity } from '@contember/react-identity' - -export const useIdentity = (): Identity => { - const identity = useOptionalIdentity() - if (!identity) { - throw new Error('Identity context is not initialized') - } - return identity -} diff --git a/packages/admin/src/components/Login/LoginEntrypoint.tsx b/packages/admin/src/components/Login/LoginEntrypoint.tsx deleted file mode 100644 index bd1eac8f9d..0000000000 --- a/packages/admin/src/components/Login/LoginEntrypoint.tsx +++ /dev/null @@ -1,209 +0,0 @@ -import { ContemberClient } from '@contember/react-client' -import { Button, ErrorList, Icon, Providers, SpinnerOverlay, Stack } from '@contember/ui' -import { FC, ReactNode, useEffect, useMemo, useState } from 'react' -import { Link, RequestProvider, RoutingContext, RoutingContextValue } from '../../routing' -import { - CreateResetPasswordRequestForm, - FillResetPasswordTokenForm, - IDP, - IDPInitButton, - Login, - ResetPasswordForm, - useIDPAutoInit, useRedirectToBacklink, - useRedirectToBacklinkCallback, - useResponseHandlerFeedback, -} from '../../tenant' -import { IdentityProvider, useLogout, useOptionalIdentity } from '../Identity' -import { MiscPageLayout } from '../MiscPageLayout' -import { Project, ProjectListButtons } from '../Project' -import { Page, Pages } from '../pageRouting' - - -export interface LoginEntrypointProps { - apiBaseUrl: string - loginToken: string - sessionToken?: string - basePath?: string - projects: readonly string[] | (() => Promise) - identityProviders?: readonly IDP[] - formatProjectUrl: (project: Project) => string - heading?: string - projectsPageActions?: ReactNode - collapsedEmailLogin?: boolean -} - -const indexPageName = 'index' -const resetRequestPageName = 'resetRequest' -const redirectOnSuccessPageName = 'resetRequestSuccess' -const passwordResetPageName = 'passwordReset' - - -/** - * @group Entrypoints - */ -export const LoginEntrypoint = (props: LoginEntrypointProps) => { - const routing: RoutingContextValue = { - basePath: props.basePath ?? '/', - routes: {}, - defaultDimensions: {}, - pageInQuery: true, - } - - return ( - - - - - - - - - - - - - ← Back to login - }> - - - - - - ← Back to login - }> -

- Password reset request has been successfully created. Please check your inbox for the instructions. -

-

- Please follow the link in e-mail or copy the reset token here: -

- -
-
- - {({ token }: { token: string }) => ( - - ← Back to login - }> - - - )} - -
-
-
-
-
- ) -} - -const LoginEntrypointIndex: FC> = props => { - const logout = useLogout() - const identity = useOptionalIdentity() - const [projectSlugs, setProjectSlugs] = useState() - const projectsProvider = props.projects - useEffect(() => { - (async () => { - if (identity === undefined) { - return - } - setProjectSlugs(projectsProvider instanceof Function ? await projectsProvider() : projectsProvider) - })() - }, [identity, projectsProvider]) - - const projects = useMemo(() => { - return identity?.projects.filter(it => projectSlugs?.includes(it.slug)) - }, [identity?.projects, projectSlugs]) - - useRedirectToBacklink() - - if (identity === undefined) { - return ( - - - - ) - - } else if (projects === undefined) { - return ( - - {props.projectsPageActions} - - } - > - Loading projects... - - ) - - } else if (projects.length === 1) { - window.location.href = props.formatProjectUrl(projects[0]) - return null - - } else { - return ( - logout()} distinction="seamless" display="block">Sign out } - > - - - ) - } -} - -interface LoginContainerProps { - identityProviders?: readonly IDP[] - collapsedEmailLogin?: boolean -} - -const LoginContainer = ({ identityProviders = [], collapsedEmailLogin: initialCollapsedEmailLogin }: LoginContainerProps) => { - const [collapsedEmailLogin, setCollapsedEmailLogin] = useState(initialCollapsedEmailLogin ?? false) - const [error, setError] = useState() - - const redirectToBacklink = useRedirectToBacklinkCallback() - - const idpAutoInit = useIDPAutoInit({ providers: identityProviders }) - const idpHandlerFeedback = useResponseHandlerFeedback({ onLogin: redirectToBacklink }) - - const errors = useMemo(() => [ - ...(error ? [{ message: error }] : []), - ...(idpAutoInit.type === 'failed' ? [{ message: idpAutoInit.error }] : []), - ], [error, idpAutoInit]) - - if (idpHandlerFeedback !== null) { - return idpHandlerFeedback - } - if (idpAutoInit.type === 'processing') { - return - } - - const visibleIdentityProviders = identityProviders.filter(it => !it.hidden) - - const showAlternativeLoginButtons = visibleIdentityProviders.length > 0 || collapsedEmailLogin - - - return <> - - {!collapsedEmailLogin && } - {showAlternativeLoginButtons && ( - - {visibleIdentityProviders.map((it, i) => )} - {collapsedEmailLogin && } - - )} - -} diff --git a/packages/admin/src/components/Login/index.tsx b/packages/admin/src/components/Login/index.tsx deleted file mode 100644 index 86ad2f9247..0000000000 --- a/packages/admin/src/components/Login/index.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export * from '../../tenant/components/person/Login' -export * from './LoginEntrypoint' -export { projectEnvironmentExtension } from '@contember/react-identity' diff --git a/packages/admin/src/components/LogoutLink.tsx b/packages/admin/src/components/LogoutLink.tsx deleted file mode 100644 index 5d7b7bba68..0000000000 --- a/packages/admin/src/components/LogoutLink.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { ComponentType, FunctionComponent, memo, ReactNode } from 'react' -import { useLogout } from './Identity' - -export interface LogoutLinkInnerProps { - onClick: () => void - children?: ReactNode -} - -export interface LogoutLinkProps { - Component?: ComponentType - children?: ReactNode -} - - -const defaultComponent: FunctionComponent = ({ onClick, children }) => ( - - {children} - -) - -/** - * @group Tenant - */ -export const LogoutLink = memo(props => { - const onLogout = useLogout() - const Component = props.Component || defaultComponent - return -}) - -LogoutLink.displayName = 'LogoutLink' diff --git a/packages/admin/src/components/MiscPageLayout.tsx b/packages/admin/src/components/MiscPageLayout.tsx deleted file mode 100644 index 70439f8cf2..0000000000 --- a/packages/admin/src/components/MiscPageLayout.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import { Box, BoxOwnProps, Heading, Layout, Spacer, Stack } from '@contember/ui' -import { ReactNode, memo } from 'react' - -export type MiscPageLayoutProps = - & Omit - & { - footerActions?: ReactNode - heading?: ReactNode - } - -export const MiscPageLayout = memo(({ footerActions, heading, children, ...props }) => ( - -
-
- {heading} - : heading - )} - {...props} - > - - {children} - - - {footerActions &&
- - - {footerActions} - -
} -
-
-
-)) -MiscPageLayout.displayName = 'MiscPageLayout' diff --git a/packages/admin/src/components/NavigationProvider/NavigationProvider.tsx b/packages/admin/src/components/NavigationProvider/NavigationProvider.tsx deleted file mode 100644 index 61cc1222a1..0000000000 --- a/packages/admin/src/components/NavigationProvider/NavigationProvider.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { NavigationContext } from '@contember/ui' -import { ReactNode } from 'react' -import { isRoutingLinkTarget, PageNotFound, parseLinkTarget, useRoutingLinkFactory } from '../../routing' -import { useEnvironment } from '@contember/react-binding' - -export interface NavigationProviderProps { - children?: ReactNode -} - -export const NavigationProvider = (props: NavigationProviderProps) => { - const env = useEnvironment() - const linkFactory = useRoutingLinkFactory() - - return ( - { - if (!isRoutingLinkTarget(val)) { - throw new PageNotFound('Invalid request') - } - return linkFactory(parseLinkTarget(val, env)) - }} - > - {props.children} - - ) -} diff --git a/packages/admin/src/components/NavigationProvider/index.ts b/packages/admin/src/components/NavigationProvider/index.ts deleted file mode 100644 index 03ba4fbaf7..0000000000 --- a/packages/admin/src/components/NavigationProvider/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './NavigationProvider' diff --git a/packages/admin/src/components/Project/ProjectList.tsx b/packages/admin/src/components/Project/ProjectList.tsx deleted file mode 100644 index ec918b2d34..0000000000 --- a/packages/admin/src/components/Project/ProjectList.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import { AnchorButton, ButtonList } from '@contember/ui' -import { EmptyMessage } from '@contember/react-binding-ui' -import { MiscPageLayout } from '../MiscPageLayout' - -export interface Project { - slug: string - name: string -} - -export interface ProjectListProps { - projects: readonly Project[], - formatProjectUrl: (project: Project) => string -} - -export const ProjectList = (props: ProjectListProps) => { - return ( - - - - ) -} - -export const ProjectListButtons = (props: ProjectListProps) => { - if (props.projects.length === 0) { - return No projects found - } - - return - {props.projects.map(project => ( - - {project.name} - - ))} - -} diff --git a/packages/admin/src/components/Project/index.ts b/packages/admin/src/components/Project/index.ts deleted file mode 100644 index e1ba2bdf94..0000000000 --- a/packages/admin/src/components/Project/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './ProjectList' diff --git a/packages/admin/src/components/SwitchProjectLink.tsx b/packages/admin/src/components/SwitchProjectLink.tsx deleted file mode 100644 index 26c76a5be7..0000000000 --- a/packages/admin/src/components/SwitchProjectLink.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { AnchorHTMLAttributes, ComponentType } from 'react' -import { useIdentity } from './Identity' - -export type PublicAnchorProps = Omit, 'href'> - -interface SwitchProjectLinkProps { - Component: ComponentType> -} - -export const SwitchProjectLink = ({ Component, ...props }: SwitchProjectLinkProps & PublicAnchorProps) => { - const hasMoreProjects = useIdentity().projects.length > 1 - - if (!hasMoreProjects) { - return null - } - - return -} diff --git a/packages/admin/src/components/bindingFacade/blocks/Block.tsx b/packages/admin/src/components/bindingFacade/blocks/Block.tsx deleted file mode 100644 index f6a66fa332..0000000000 --- a/packages/admin/src/components/bindingFacade/blocks/Block.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import { Component } from '@contember/react-binding' -import type { FunctionComponent, ReactNode } from 'react' -import type { SugaredDiscriminateBy } from '../discrimination' - -export interface BlockProps { - /** - * Field to discriminate by. - */ - discriminateBy: SugaredDiscriminateBy - label?: ReactNode - description?: ReactNode - alternate?: ReactNode - children?: ReactNode -} - -/** - * The Block component is used for wrapping fields in {@link BlockRepeater}, {@link BlockEditor} or {@link DiscriminatedBlocks} components. - * - * @example - * ``` - * - * ``` - - * @group Blocks and repeaters - */ -export const Block: FunctionComponent = Component( - props => <>{props.children}, - props => ( - <> - {props.alternate} - {props.children} - - ), - 'Block', -) diff --git a/packages/admin/src/components/bindingFacade/blocks/DiscriminatedBlocks.tsx b/packages/admin/src/components/bindingFacade/blocks/DiscriminatedBlocks.tsx deleted file mode 100644 index 1dbbc52890..0000000000 --- a/packages/admin/src/components/bindingFacade/blocks/DiscriminatedBlocks.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import { Component, Field, SugaredRelativeSingleField } from '@contember/react-binding' -import type { FieldContainerProps } from '@contember/ui' -import { FunctionComponent, ReactNode, useMemo } from 'react' -import { useStaticSingleChoiceField, SingleChoiceFieldRendererProps, NormalizedStaticOption, SelectFieldInner } from '@contember/react-choice-field-ui' -import { useNormalizedBlocks } from './useNormalizedBlocks' - -export type DiscriminatedBlocksProps = - & { - children: ReactNode - allowBlockTypeChange?: boolean - } - & FieldContainerProps - & SugaredRelativeSingleField - -/** - * Renders different blocks based on a value in a discrimination field. - * - * @example - * ``` - * - * - * - * - * - * - * - * - * ``` - * - * @group Blocks and repeaters - */ -export const DiscriminatedBlocks: FunctionComponent = Component( - props => { - const normalizedBlocks = useNormalizedBlocks(props.children) - const blocksArray = useMemo(() => Array.from(normalizedBlocks.values()), [normalizedBlocks]) - const transformedBlockList = useMemo( - () => - blocksArray.map(item => ({ - ...item, - label: item.datum.label, - value: item.discriminateBy, - searchKeywords: typeof item.datum.label === 'string' ? item.datum.label : '', - })), - [blocksArray], - ) - const metadata: SingleChoiceFieldRendererProps = useStaticSingleChoiceField({ - ...props, - options: transformedBlockList, - }) - return ( - <> - {props.allowBlockTypeChange !== false && ( - - )} - {metadata.currentValue && normalizedBlocks.get(metadata.currentValue.value)?.datum.children} - - ) - }, - props => ( - <> - - {props.children} - - ), - 'DiscriminatedBlocks', -) diff --git a/packages/admin/src/components/bindingFacade/blocks/blockAnalyzer.ts b/packages/admin/src/components/bindingFacade/blocks/blockAnalyzer.ts deleted file mode 100644 index 57e76a4120..0000000000 --- a/packages/admin/src/components/bindingFacade/blocks/blockAnalyzer.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { Environment } from '@contember/react-binding' -import { ChildrenAnalyzer, Leaf } from '@contember/react-multipass-rendering' -import { Block, BlockProps } from './Block' - -const blockLeaf = new Leaf(node => node.props, Block) - -export const blockAnalyzer = new ChildrenAnalyzer([blockLeaf], { - ignoreUnhandledNodes: false, - staticRenderFactoryName: 'staticRender', - unhandledNodeErrorMessage: 'Only Block children are supported.', -}) diff --git a/packages/admin/src/components/bindingFacade/blocks/getDiscriminatedBlock.ts b/packages/admin/src/components/bindingFacade/blocks/getDiscriminatedBlock.ts deleted file mode 100644 index 536fa521fa..0000000000 --- a/packages/admin/src/components/bindingFacade/blocks/getDiscriminatedBlock.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { FieldAccessor, FieldValue } from '@contember/react-binding' -import { getDiscriminatedDatum } from '../discrimination' -import type { NormalizedBlocks } from './useNormalizedBlocks' - -export const getDiscriminatedBlock = (blocks: NormalizedBlocks, field: FieldAccessor | FieldValue) => - getDiscriminatedDatum(blocks, field) diff --git a/packages/admin/src/components/bindingFacade/blocks/index.ts b/packages/admin/src/components/bindingFacade/blocks/index.ts deleted file mode 100644 index d3e72361c2..0000000000 --- a/packages/admin/src/components/bindingFacade/blocks/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './Block' -export * from './blockAnalyzer' -export * from './DiscriminatedBlocks' -export * from './getDiscriminatedBlock' -export * from './useBlockProps' -export * from './useNormalizedBlocks' diff --git a/packages/admin/src/components/bindingFacade/blocks/useBlockProps.ts b/packages/admin/src/components/bindingFacade/blocks/useBlockProps.ts deleted file mode 100644 index f36b68b7b1..0000000000 --- a/packages/admin/src/components/bindingFacade/blocks/useBlockProps.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { useEnvironment } from '@contember/react-binding' -import { ReactNode, useMemo } from 'react' -import type { BlockProps } from './Block' -import { blockAnalyzer } from './blockAnalyzer' - -export const useBlockProps = (children: ReactNode): BlockProps[] => { - const environment = useEnvironment() - - return useMemo(() => { - if (children === undefined) { - return [] - } - return blockAnalyzer.processChildren(children, environment) - }, [children, environment]) -} diff --git a/packages/admin/src/components/bindingFacade/blocks/useNormalizedBlocks.ts b/packages/admin/src/components/bindingFacade/blocks/useNormalizedBlocks.ts deleted file mode 100644 index ee11fb9078..0000000000 --- a/packages/admin/src/components/bindingFacade/blocks/useNormalizedBlocks.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { ReactNode } from 'react' -import { NormalizedDiscriminatedData, useDiscriminatedData } from '../discrimination' -import type { BlockProps } from './Block' -import { useBlockProps } from './useBlockProps' - -export type NormalizedBlocks = NormalizedDiscriminatedData - -export const useNormalizedBlocks = (children: ReactNode): NormalizedBlocks => { - const propList = useBlockProps(children) - - return useDiscriminatedData(propList) -} diff --git a/packages/admin/src/components/bindingFacade/buttons/ClearFieldButton/ClearFieldButton.tsx b/packages/admin/src/components/bindingFacade/buttons/ClearFieldButton/ClearFieldButton.tsx deleted file mode 100644 index 2df2fd0182..0000000000 --- a/packages/admin/src/components/bindingFacade/buttons/ClearFieldButton/ClearFieldButton.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { SimpleRelativeSingleField, SimpleRelativeSingleFieldProps } from '@contember/react-form-fields-ui' -import { ClearFieldButtonInner, ClearFieldButtonInnerPublicProps } from './ClearFieldButtonInner' - -export type ClearFieldButtonProps = - & SimpleRelativeSingleFieldProps - & ClearFieldButtonInnerPublicProps - -/** - * Renders a button which clears the fields specified in a "field" prop on a click. - * - * @example - * ``` - * - * ``` - * - * @group Action buttons - */ -export const ClearFieldButton = SimpleRelativeSingleField( - (fieldMetadata, props) => , - 'ClearFieldButton', -) diff --git a/packages/admin/src/components/bindingFacade/buttons/ClearFieldButton/ClearFieldButtonInner.tsx b/packages/admin/src/components/bindingFacade/buttons/ClearFieldButton/ClearFieldButtonInner.tsx deleted file mode 100644 index 4d41c8f2cd..0000000000 --- a/packages/admin/src/components/bindingFacade/buttons/ClearFieldButton/ClearFieldButtonInner.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import type { FieldAccessor } from '@contember/react-binding' -import { Button, ButtonProps, Icon } from '@contember/ui' -import { useCallback } from 'react' - -export type ClearFieldButtonInnerPublicProps = ButtonProps - -export interface ClearFieldButtonInnerInternalProps { - field: FieldAccessor - isMutating: boolean -} - -export type ClearFieldButtonInnerProps = ClearFieldButtonInnerPublicProps & ClearFieldButtonInnerInternalProps - -/** - * @internal - */ -export const ClearFieldButtonInner = (props: ClearFieldButtonInnerProps) => { - const { field, isMutating, ...buttonProps } = props - const onClick = useCallback(() => { - field.updateValue(null) - }, [field]) - - return ( - - ) -} diff --git a/packages/admin/src/components/bindingFacade/buttons/ClearFieldButton/index.ts b/packages/admin/src/components/bindingFacade/buttons/ClearFieldButton/index.ts deleted file mode 100644 index 6fb896594d..0000000000 --- a/packages/admin/src/components/bindingFacade/buttons/ClearFieldButton/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './ClearFieldButton' -export * from './ClearFieldButtonInner' diff --git a/packages/admin/src/components/bindingFacade/buttons/PersistButton.tsx b/packages/admin/src/components/bindingFacade/buttons/PersistButton.tsx deleted file mode 100644 index b4876e8e9f..0000000000 --- a/packages/admin/src/components/bindingFacade/buttons/PersistButton.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import { useDirtinessState, useMutationState } from '@contember/react-binding' -import { useClassName } from '@contember/react-utils' -import { SaveButton, SaveButtonProps } from '@contember/ui' -import { forwardRef, memo, useCallback } from 'react' -import { usePersistWithFeedback } from '@contember/react-binding-ui' - -export type PersistButtonProps = Omit - -/** - * Renders a button which triggers persist on a click. - * - * @example - * ``` - * - * ``` - * - * @group Action buttons - */ -export const PersistButton = memo( - forwardRef((props, ref) => { - const isMutating = useMutationState() - const isDirty = useDirtinessState() - const triggerPersist = usePersistWithFeedback() - const onClick = useCallback(() => { - triggerPersist().catch(() => {}) - }, [triggerPersist]) - - const isDisabled = isMutating || !isDirty - const className = useClassName('persist-button', props.className) - - if (!triggerPersist) { - return null - } - return ( - - ) -})) -PersistButton.displayName = 'PersistButton' diff --git a/packages/admin/src/components/bindingFacade/buttons/index.ts b/packages/admin/src/components/bindingFacade/buttons/index.ts deleted file mode 100644 index c7714acd7b..0000000000 --- a/packages/admin/src/components/bindingFacade/buttons/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './ClearFieldButton' -export * from './PersistButton' diff --git a/packages/admin/src/components/bindingFacade/collections/BlockRepeater/AddNewBlockButton.tsx b/packages/admin/src/components/bindingFacade/collections/BlockRepeater/AddNewBlockButton.tsx deleted file mode 100644 index e703c907b4..0000000000 --- a/packages/admin/src/components/bindingFacade/collections/BlockRepeater/AddNewBlockButton.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import { Dropdown, DropdownProps, FieldContainer, Icon } from '@contember/ui' -import { memo, useMemo } from 'react' -import { useMessageFormatter } from '@contember/react-i18n' -import { AddNewBlockButtonInner, AddNewBlockButtonInnerProps } from './AddNewBlockButtonInner' -import { blockRepeaterDictionary } from './Dictionary' - -export interface AddNewBlockButtonProps extends Omit {} - -/** - * @internal - */ -export const AddNewBlockButton = memo(props => { - const formatter = useMessageFormatter(blockRepeaterDictionary) - - const buttonProps: DropdownProps['buttonProps'] = useMemo( - () => ({ - children: ( - <> - - {props.children ?? formatter('blockRepeater.addNewBlockButton.addBlock')} - - ), - disabled: props.isMutating, - distinction: 'seamless', - display: 'block', - justify: 'start', - }), - [formatter, props.isMutating, props.children], - ) - - return ( - - - {({ requestClose, forceUpdate, update }) => ( - - )} - - - ) -}) -AddNewBlockButton.displayName = 'AddNewBlockButton' diff --git a/packages/admin/src/components/bindingFacade/collections/BlockRepeater/AddNewBlockButtonInner.tsx b/packages/admin/src/components/bindingFacade/collections/BlockRepeater/AddNewBlockButtonInner.tsx deleted file mode 100644 index d92230746e..0000000000 --- a/packages/admin/src/components/bindingFacade/collections/BlockRepeater/AddNewBlockButtonInner.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import { SugaredRelativeSingleField, useDesugaredRelativeSingleField } from '@contember/react-binding' -import { Button, ButtonGroup, DropdownRenderProps } from '@contember/ui' -import { memo } from 'react' -import type { NormalizedBlocks } from '../../blocks' -import type { CreateNewEntityButtonProps } from '@contember/react-binding-ui' - -export interface AddNewBlockButtonInnerProps extends DropdownRenderProps, CreateNewEntityButtonProps { - normalizedBlocks: NormalizedBlocks - discriminationField: string | SugaredRelativeSingleField - isMutating: boolean -} - -/** - * @internal - */ -export const AddNewBlockButtonInner = memo(props => { - const desugaredDiscriminationField = useDesugaredRelativeSingleField(props.discriminationField) - return ( - - {Array.from(props.normalizedBlocks.values(), ({ discriminateBy, datum: blockProps }, i) => ( - - ))} - - ) -}) -AddNewBlockButtonInner.displayName = 'AddNewBlockButtonInner' diff --git a/packages/admin/src/components/bindingFacade/collections/BlockRepeater/BlockRepeater.tsx b/packages/admin/src/components/bindingFacade/collections/BlockRepeater/BlockRepeater.tsx deleted file mode 100644 index 1fa8bc7fdc..0000000000 --- a/packages/admin/src/components/bindingFacade/collections/BlockRepeater/BlockRepeater.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import { Component, SugaredFieldProps } from '@contember/react-binding' -import type { FunctionComponent } from 'react' -import { DiscriminatedBlocks, useNormalizedBlocks } from '../../blocks' -import { Repeater, RepeaterProps } from '../Repeater' -import { AddNewBlockButton } from './AddNewBlockButton' -import { SortableBlock } from './SortableBlock' - -export type BlockRepeaterProps = - & { - discriminationField: SugaredFieldProps['field'] - } - & Omit< - RepeaterProps, - 'containerComponent' | 'containerComponentExtraProps' | 'itemComponent' | 'itemComponentExtraProps' - > - -/** - * The `BlockRepeater` component is a simple way to repeat blocks of content. Use {@link Block} for wrapping fields. - * - * @group Blocks and repeaters - */ -export const BlockRepeater: FunctionComponent = Component( - ({ discriminationField, ...props }) => { - const normalizedBlocks = useNormalizedBlocks(props.children) - - const extraProps = { - normalizedBlocks: normalizedBlocks, - discriminationField, - } as const - - return ( - - <> - - ) - }, - props => ( - - {typeof props.discriminationField === 'string' && ( - - {props.children} - - )} - {typeof props.discriminationField === 'string' || ( - - {props.children} - - )} - - ), - 'SortableBlockRepeater', -) diff --git a/packages/admin/src/components/bindingFacade/collections/BlockRepeater/Dictionary.ts b/packages/admin/src/components/bindingFacade/collections/BlockRepeater/Dictionary.ts deleted file mode 100644 index 616c4c697c..0000000000 --- a/packages/admin/src/components/bindingFacade/collections/BlockRepeater/Dictionary.ts +++ /dev/null @@ -1,8 +0,0 @@ -export const blockRepeaterDictionary = { - blockRepeater: { - addNewBlockButton: { - addBlock: 'Add block', - }, - }, -} -export type BlockRepeaterDictionary = typeof blockRepeaterDictionary diff --git a/packages/admin/src/components/bindingFacade/collections/BlockRepeater/SortableBlock.tsx b/packages/admin/src/components/bindingFacade/collections/BlockRepeater/SortableBlock.tsx deleted file mode 100644 index 4b70215703..0000000000 --- a/packages/admin/src/components/bindingFacade/collections/BlockRepeater/SortableBlock.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { SugaredRelativeSingleField, useField } from '@contember/react-binding' -import { memo } from 'react' -import { getDiscriminatedBlock, NormalizedBlocks } from '../../blocks' -import { RepeaterItem, RepeaterItemProps } from '../Repeater' - -export interface SortableBlockOwnProps { - discriminationField: string | SugaredRelativeSingleField - normalizedBlocks: NormalizedBlocks -} - -export interface SortableBlockProps extends RepeaterItemProps, SortableBlockOwnProps {} - -/** - * @internal - */ -export const SortableBlock = memo(({ - discriminationField, - normalizedBlocks, - ...props -}) => { - const field = useField(discriminationField) - const selectedBlock = getDiscriminatedBlock(normalizedBlocks, field) - - if (!selectedBlock) { - return null - } - - return ( - - {selectedBlock.datum.children} - - ) -}) -SortableBlock.displayName = 'SortableBlock' diff --git a/packages/admin/src/components/bindingFacade/collections/BlockRepeater/index.ts b/packages/admin/src/components/bindingFacade/collections/BlockRepeater/index.ts deleted file mode 100644 index 346487ff71..0000000000 --- a/packages/admin/src/components/bindingFacade/collections/BlockRepeater/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './AddNewBlockButton' -export * from './AddNewBlockButtonInner' -export * from './BlockRepeater' -export * from './Dictionary' -export * from './SortableBlock' diff --git a/packages/admin/src/components/bindingFacade/collections/Repeater/Repeater.tsx b/packages/admin/src/components/bindingFacade/collections/Repeater/Repeater.tsx deleted file mode 100644 index 41b55852ae..0000000000 --- a/packages/admin/src/components/bindingFacade/collections/Repeater/Repeater.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import { BindingError, Component, HasMany, SugaredRelativeEntityList, useEntityList } from '@contember/react-binding' -import type { ReactElement } from 'react' -import { RepeaterInner, RepeaterInnerProps } from './RepeaterInner' - -export interface RepeaterProps - extends SugaredRelativeEntityList, - Omit, 'accessor'> {} - -/** - * The `Repeater` component renders a repeater with given child components. - * - * @group Blocks and repeaters - */ -export const Repeater = Component( - (props: RepeaterProps) => { - if (import.meta.env.DEV) { - if ( - 'sortableBy' in props && - props.sortableBy !== undefined && - 'orderBy' in props && - props.orderBy !== undefined - ) { - throw new BindingError( - `Incorrect use: cannot supply both the 'orderBy' and the 'sortableBy' properties.\n` + - `\tTo allow the user to interactively order the items, use 'sortableBy'.\n` + - `\tTo control the order in which the items are automatically displayed, use 'orderBy'.`, - ) - } - if (!('sortableBy' in props) && !('orderBy' in props)) { - throw new BindingError( - `Using a without either the 'orderBy' or the 'sortableBy' property. ` + - `This will currently result in bad user experience as the items may shuffle unpredictably over time.` + - `\tTo allow the user to interactively order the items, use 'sortableBy'.\n` + - `\tTo control the order in which the items are automatically displayed, use 'orderBy'.\n` + - `\tTo disable this warning, set either of these to undefined.`, - ) - } - } - - const entityList = useEntityList(props) - - return - }, - (props, environment) => ( - - {RepeaterInner.staticRender(props, environment)} - - ), - 'Repeater', -) as (props: RepeaterProps) => ReactElement diff --git a/packages/admin/src/components/bindingFacade/collections/Repeater/RepeaterFieldContainer.tsx b/packages/admin/src/components/bindingFacade/collections/Repeater/RepeaterFieldContainer.tsx deleted file mode 100644 index 9a8e0ffdce..0000000000 --- a/packages/admin/src/components/bindingFacade/collections/Repeater/RepeaterFieldContainer.tsx +++ /dev/null @@ -1,76 +0,0 @@ -import type { EntityAccessor, EntityListAccessor } from '@contember/react-binding' -import { - AccessorErrors, - AddEntityButtonProps, - CreateNewEntityButton, - EmptyMessage, - EmptyMessageOuterProps, -} from '@contember/react-binding-ui' -import type { MessageFormatter } from '@contember/react-i18n' -import { FieldContainer, FieldContainerOwnProps } from '@contember/ui' -import { memo } from 'react' -import type { RepeaterDictionary } from './repeaterDictionary' - -export type RepeaterFieldContainerPublicProps = - & EmptyMessageOuterProps - & AddEntityButtonProps - & { - enableAddingNew?: boolean - } - -export type RepeaterCreateNewEntity = (initialize?: EntityAccessor.BatchUpdatesHandler, index?: number) => void - -export interface RepeaterFieldContainerPrivateProps extends Omit { - accessor: EntityListAccessor - entities: EntityAccessor[] - formatMessage: MessageFormatter - isEmpty: boolean - createNewEntity: RepeaterCreateNewEntity -} - -export type RepeaterFieldContainerProps = - & RepeaterFieldContainerPublicProps - & RepeaterFieldContainerPrivateProps - -export const RepeaterFieldContainer = memo( - ({ - accessor, - addButtonText, - children, - createNewEntity, - addButtonComponent: AddButton = CreateNewEntityButton, - addButtonComponentExtraProps, - addButtonProps, - emptyMessage, - emptyMessageComponent, - enableAddingNew = true, - formatMessage, - isEmpty, - label, - ...rest - }: RepeaterFieldContainerProps) => { - return ( - - {addButtonText ?? label ?? formatMessage('repeater.addButton.text')} - - )} - > - - {isEmpty && ( - {formatMessage(emptyMessage, 'repeater.emptyMessage.text')} - )} - {isEmpty || children} - - ) - }, -) -RepeaterFieldContainer.displayName = 'RepeaterFieldContainer' diff --git a/packages/admin/src/components/bindingFacade/collections/Repeater/RepeaterHandle.tsx b/packages/admin/src/components/bindingFacade/collections/Repeater/RepeaterHandle.tsx deleted file mode 100644 index 0893744ebf..0000000000 --- a/packages/admin/src/components/bindingFacade/collections/Repeater/RepeaterHandle.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { memo } from 'react' -import { DragHandle } from '../../../ui' - -export const RepeaterHandle = memo(DragHandle) -RepeaterHandle.displayName = 'RepeaterHandle' diff --git a/packages/admin/src/components/bindingFacade/collections/Repeater/RepeaterInner.tsx b/packages/admin/src/components/bindingFacade/collections/Repeater/RepeaterInner.tsx deleted file mode 100644 index aff790d688..0000000000 --- a/packages/admin/src/components/bindingFacade/collections/Repeater/RepeaterInner.tsx +++ /dev/null @@ -1,179 +0,0 @@ -import { - Component, - Entity, - EntityAccessor, - EntityListAccessor, - RemovalType, - StaticRenderProvider, - StaticRenderProviderProps, - SugaredField, - SugaredFieldProps, - useMutationState, - useSortedEntities, -} from '@contember/react-binding' -import { RepeaterItemContainerProps } from '@contember/ui' -import { ComponentType, Fragment, ReactElement, ReactNode, useCallback } from 'react' -import type { SortEndHandler } from 'react-sortable-hoc' -import { useMessageFormatter } from '@contember/react-i18n' -import { - RepeaterCreateNewEntity, - RepeaterFieldContainer, - RepeaterFieldContainerProps, - RepeaterFieldContainerPublicProps, -} from './RepeaterFieldContainer' -import { RepeaterItem, RepeaterItemProps } from './RepeaterItem' -import { SortableRepeaterContainer } from './SortableRepeaterContainer' -import { SortableRepeaterItem } from './SortableRepeaterItem' -import { SortableRepeaterItemHandle } from './SortableRepeaterItemHandle' -import { repeaterDictionary } from './repeaterDictionary' -import { shouldCancelStart } from '@contember/utilities' - -// TODO alt content for collapsing -export interface RepeaterInnerProps - extends RepeaterFieldContainerPublicProps { - accessor: EntityListAccessor - label: ReactNode - children?: ReactNode - - sortableBy?: SugaredFieldProps['field'] - - enableRemoving?: boolean - removalType?: RemovalType - - containerComponent?: ComponentType - containerComponentExtraProps?: ContainerExtraProps - - itemComponent?: ComponentType - itemComponentExtraProps?: ItemExtraProps - - unstable__sortAxis?: 'x' | 'y' | 'xy' - useDragHandle?: boolean - dragHandleComponent?: RepeaterItemContainerProps['dragHandleComponent'] -} - -type NonStaticPropNames = 'accessor' - -export const RepeaterInner = Component, NonStaticPropNames>( - (props: RepeaterInnerProps) => { - const isMutating = useMutationState() - const { entities, moveEntity, addNewAtIndex } = useSortedEntities(props.accessor, props.sortableBy) - - const createNewEntity = useCallback((initialize?: EntityAccessor.BatchUpdatesHandler, index?: number) => { - addNewAtIndex(index, initialize) - }, [addNewAtIndex]) - - const onSortEnd = useCallback( - ({ oldIndex, newIndex }) => { - moveEntity(oldIndex, newIndex) - }, - [moveEntity], - ) - const formatMessage = useMessageFormatter(repeaterDictionary) - - const Handle: ComponentType<{ children: ReactNode }> = props.dragHandleComponent || Fragment - const Item: ComponentType = props.itemComponent || RepeaterItem - const Container: ComponentType = - props.containerComponent || RepeaterFieldContainer - - const isEmpty = entities.length === 0 - const itemRemovingEnabled = props.enableRemoving !== false - - const sortableHandle = useCallback>( - ({ children }) => ( - - {children} - - ), - [Handle], - ) - - const removalType: RemovalType = props.removalType ?? 'delete' - const label = props.label - - if (props.sortableBy === undefined) { - return ( - - {entities.map((entity, i) => ( - - - {props.children} - - - ))} - - ) - } - - const axis = props.unstable__sortAxis || 'y' - const useDragHandle = props.useDragHandle ?? true - - return ( - - - {entities.map((entity, i) => ( - - - - {props.children} - - - - ))} - - - ) - }, - ( - props: StaticRenderProviderProps, NonStaticPropNames>, // TODO emptyMessage, etc. - ) => ( - <> - {props.sortableBy && } - {props.children} - - ), - 'RepeaterInner', -) as any as (( - props: RepeaterInnerProps, -) => ReactElement) & - StaticRenderProvider, NonStaticPropNames> diff --git a/packages/admin/src/components/bindingFacade/collections/Repeater/RepeaterItem.tsx b/packages/admin/src/components/bindingFacade/collections/Repeater/RepeaterItem.tsx deleted file mode 100644 index b3a8b19896..0000000000 --- a/packages/admin/src/components/bindingFacade/collections/Repeater/RepeaterItem.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import { BindingError, RemovalType } from '@contember/react-binding' -import { DeleteEntityButton } from '@contember/react-binding-ui' -import { RepeaterItemContainer, RepeaterItemContainerProps } from '@contember/ui' -import { ReactNode, forwardRef, memo } from 'react' -import { RepeaterCreateNewEntity } from './RepeaterFieldContainer' - -export type RepeaterItemOwnProps = { - canBeRemoved?: boolean - children: ReactNode - createNewEntity: RepeaterCreateNewEntity - dragHandleComponent?: RepeaterItemContainerProps['dragHandleComponent'] - index: number - label: ReactNode - removalType: RemovalType -} - -export interface RepeaterItemProps extends Omit, RepeaterItemOwnProps { } - -export const RepeaterItem = memo(forwardRef(({ - canBeRemoved, - children, - createNewEntity: _INTENTIONALLY_OMITTED_createNewEntity, - dragHandleComponent, - index, - label, - removalType, - ...rest -}, forwardedRef) => { - if (removalType !== 'delete') { - throw new BindingError( - `As a temporary limitation, can currently only delete its items, not disconnect them. ` + - `This restriction is planned to be lifted sometime in future.`, - ) - } - - return ( - } - {...rest} - > - {children} - - ) -})) -RepeaterItem.displayName = 'RepeaterItem' diff --git a/packages/admin/src/components/bindingFacade/collections/Repeater/SortableRepeaterContainer.tsx b/packages/admin/src/components/bindingFacade/collections/Repeater/SortableRepeaterContainer.tsx deleted file mode 100644 index 618b40d751..0000000000 --- a/packages/admin/src/components/bindingFacade/collections/Repeater/SortableRepeaterContainer.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { useClassName } from '@contember/react-utils' -import { usePortalProvider } from '@contember/ui' -import { ReactNode } from 'react' -import { SortableContainer, SortableContainerProps } from 'react-sortable-hoc' -export interface SortableRepeaterContainerProps extends SortableContainerProps { - children: ReactNode -} - -const SortableRepeaterContainerInner = SortableContainer(({ children }: SortableRepeaterContainerProps) => <>{children}) - -export const SortableRepeaterContainer = ({ helperClass, ...props }: SortableRepeaterContainerProps) => ( - -) -SortableRepeaterContainer.displayName = 'SortableRepeaterContainer' diff --git a/packages/admin/src/components/bindingFacade/collections/Repeater/SortableRepeaterItem.tsx b/packages/admin/src/components/bindingFacade/collections/Repeater/SortableRepeaterItem.tsx deleted file mode 100644 index 6687a30515..0000000000 --- a/packages/admin/src/components/bindingFacade/collections/Repeater/SortableRepeaterItem.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { memo, ReactNode } from 'react' -import { SortableElement } from 'react-sortable-hoc' - -export interface SortableRepeaterItemProps { - children: ReactNode -} - -export const SortableRepeaterItem = memo(SortableElement(({ children }: SortableRepeaterItemProps) => <>{children})) -SortableRepeaterItem.displayName = 'SortableRepeaterItem' diff --git a/packages/admin/src/components/bindingFacade/collections/Repeater/SortableRepeaterItemHandle.tsx b/packages/admin/src/components/bindingFacade/collections/Repeater/SortableRepeaterItemHandle.tsx deleted file mode 100644 index 3cf92fda8b..0000000000 --- a/packages/admin/src/components/bindingFacade/collections/Repeater/SortableRepeaterItemHandle.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { memo, ReactNode } from 'react' -import { SortableHandle } from 'react-sortable-hoc' - -export interface SortableRepeaterItemHandleProps { - children: ReactNode -} - -export const SortableRepeaterItemHandle = memo(SortableHandle(({ children }: SortableRepeaterItemHandleProps) => <>{children})) -SortableRepeaterItemHandle.displayName = 'SortableRepeaterItemHandle' diff --git a/packages/admin/src/components/bindingFacade/collections/Repeater/index.ts b/packages/admin/src/components/bindingFacade/collections/Repeater/index.ts deleted file mode 100644 index 92ea7555e3..0000000000 --- a/packages/admin/src/components/bindingFacade/collections/Repeater/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -export * from './Repeater' -export * from './repeaterDictionary' -export * from './RepeaterFieldContainer' -export * from './RepeaterHandle' -export * from './RepeaterInner' -export * from './RepeaterItem' -export * from './SortableRepeaterContainer' -export * from './SortableRepeaterItem' -export * from './SortableRepeaterItemHandle' diff --git a/packages/admin/src/components/bindingFacade/collections/Repeater/repeaterDictionary.ts b/packages/admin/src/components/bindingFacade/collections/Repeater/repeaterDictionary.ts deleted file mode 100644 index d22a194d5b..0000000000 --- a/packages/admin/src/components/bindingFacade/collections/Repeater/repeaterDictionary.ts +++ /dev/null @@ -1,11 +0,0 @@ -export const repeaterDictionary = { - repeater: { - emptyMessage: { - text: 'There is nothing here. Try adding a new item.', - }, - addButton: { - text: 'Add', - }, - }, -} -export type RepeaterDictionary = typeof repeaterDictionary diff --git a/packages/admin/src/components/bindingFacade/collections/index.ts b/packages/admin/src/components/bindingFacade/collections/index.ts deleted file mode 100644 index 249cd94b53..0000000000 --- a/packages/admin/src/components/bindingFacade/collections/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './BlockRepeater' -export * from './Repeater' diff --git a/packages/admin/src/components/bindingFacade/discrimination/DiscriminatedDatum.ts b/packages/admin/src/components/bindingFacade/discrimination/DiscriminatedDatum.ts deleted file mode 100644 index 9a939c052d..0000000000 --- a/packages/admin/src/components/bindingFacade/discrimination/DiscriminatedDatum.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { SugaredDiscriminateBy } from './SugaredDiscriminateBy' - -export interface DiscriminatedDatum { - discriminateBy: SugaredDiscriminateBy -} diff --git a/packages/admin/src/components/bindingFacade/discrimination/NormalizedDiscriminatedData.ts b/packages/admin/src/components/bindingFacade/discrimination/NormalizedDiscriminatedData.ts deleted file mode 100644 index 9ad0e870be..0000000000 --- a/packages/admin/src/components/bindingFacade/discrimination/NormalizedDiscriminatedData.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { FieldValue } from '@contember/react-binding' -import type { ResolvedDiscriminatedDatum } from './ResolvedDiscriminatedDatum' - -export type NormalizedDiscriminatedData = Map> diff --git a/packages/admin/src/components/bindingFacade/discrimination/ResolvedDiscriminatedDatum.ts b/packages/admin/src/components/bindingFacade/discrimination/ResolvedDiscriminatedDatum.ts deleted file mode 100644 index 9981b7baba..0000000000 --- a/packages/admin/src/components/bindingFacade/discrimination/ResolvedDiscriminatedDatum.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { FieldValue } from '@contember/react-binding' - -export interface ResolvedDiscriminatedDatum { - discriminateBy: FieldValue - datum: Datum -} diff --git a/packages/admin/src/components/bindingFacade/discrimination/SugaredDiscriminateBy.ts b/packages/admin/src/components/bindingFacade/discrimination/SugaredDiscriminateBy.ts deleted file mode 100644 index e9a221b68a..0000000000 --- a/packages/admin/src/components/bindingFacade/discrimination/SugaredDiscriminateBy.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { OptionallyVariableFieldValue } from '@contember/react-binding' - -export type SugaredDiscriminateBy = OptionallyVariableFieldValue diff --git a/packages/admin/src/components/bindingFacade/discrimination/getDiscriminatedDatum.ts b/packages/admin/src/components/bindingFacade/discrimination/getDiscriminatedDatum.ts deleted file mode 100644 index e219e090a3..0000000000 --- a/packages/admin/src/components/bindingFacade/discrimination/getDiscriminatedDatum.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { FieldAccessor, FieldValue } from '@contember/react-binding' -import type { NormalizedDiscriminatedData } from './NormalizedDiscriminatedData' -import type { ResolvedDiscriminatedDatum } from './ResolvedDiscriminatedDatum' - -export const getDiscriminatedDatum = ( - data: NormalizedDiscriminatedData, - discriminant: FieldAccessor | FieldValue, -): ResolvedDiscriminatedDatum | undefined => { - const discriminantValue: FieldValue = discriminant instanceof FieldAccessor ? discriminant.value : discriminant - - return data.get(discriminantValue) -} diff --git a/packages/admin/src/components/bindingFacade/discrimination/index.ts b/packages/admin/src/components/bindingFacade/discrimination/index.ts deleted file mode 100644 index 99ec5332b4..0000000000 --- a/packages/admin/src/components/bindingFacade/discrimination/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './DiscriminatedDatum' -export * from './getDiscriminatedDatum' -export * from './NormalizedDiscriminatedData' -export * from './ResolvedDiscriminatedDatum' -export * from './SugaredDiscriminateBy' -export * from './useDiscriminatedData' diff --git a/packages/admin/src/components/bindingFacade/discrimination/useDiscriminatedData.ts b/packages/admin/src/components/bindingFacade/discrimination/useDiscriminatedData.ts deleted file mode 100644 index cac86e6d28..0000000000 --- a/packages/admin/src/components/bindingFacade/discrimination/useDiscriminatedData.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { useEnvironment, VariableInputTransformer } from '@contember/react-binding' -import { useMemo } from 'react' -import type { DiscriminatedDatum } from './DiscriminatedDatum' -import type { NormalizedDiscriminatedData } from './NormalizedDiscriminatedData' - -export const useDiscriminatedData = ( - source: Iterable, -): NormalizedDiscriminatedData => { - const environment = useEnvironment() - - return useMemo(() => { - const normalized: NormalizedDiscriminatedData = new Map() - - for (const datum of source) { - const value = VariableInputTransformer.transformValue(datum.discriminateBy, environment) - normalized.set(value, { - discriminateBy: value, - datum, - }) - } - - return normalized - }, [environment, source]) -} diff --git a/packages/admin/src/components/bindingFacade/displayFields/DisplayTextField.tsx b/packages/admin/src/components/bindingFacade/displayFields/DisplayTextField.tsx deleted file mode 100644 index d8c6461f48..0000000000 --- a/packages/admin/src/components/bindingFacade/displayFields/DisplayTextField.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import { NonOptionalUseInputClassNameProps, useInputClassName, VisuallyDependentControlProps } from '@contember/ui' -import { FieldValueFormatter, SimpleRelativeSingleField, SimpleRelativeSingleFieldProps } from '@contember/react-form-fields-ui' - -export type DisplayTextFieldProps = - & Omit - & VisuallyDependentControlProps - & { - format?: FieldValueFormatter; - } - -export const DisplayTextField = SimpleRelativeSingleField( - (fieldMetadata, { - field: fieldName, - // ControlStateProps: - active, disabled, loading, readOnly, required, focused, hovered, - // ControlDisplayProps: - className: outerClassName, distinction, intent, scheme, size, - // ValidationStateProps: - validationState, - // Rest: - errors, - format, - id, - name, - placeholder, - style, - type, - ...props - }) => { - if (import.meta.env.DEV) { - const exhaustiveCheck: Record = props - } - - const field = fieldMetadata.field - const value = format?.(field.value, field) ?? field.value - - const className = useInputClassName({ - active, disabled, loading, readOnly, required, focused, hovered, - className: outerClassName, distinction, intent, scheme, size, - validationState, - }) - - return ( -
- {value ?? placeholder} -
- ) - }, - 'DisplayTextField', - { suppressErrors: true }, -) diff --git a/packages/admin/src/components/bindingFacade/displayFields/index.ts b/packages/admin/src/components/bindingFacade/displayFields/index.ts deleted file mode 100644 index 8233181cc2..0000000000 --- a/packages/admin/src/components/bindingFacade/displayFields/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './DisplayTextField' diff --git a/packages/admin/src/components/bindingFacade/environment/DimensionsSwitcher/DimensionsRenderer.tsx b/packages/admin/src/components/bindingFacade/environment/DimensionsSwitcher/DimensionsRenderer.tsx deleted file mode 100644 index 4898754b7c..0000000000 --- a/packages/admin/src/components/bindingFacade/environment/DimensionsSwitcher/DimensionsRenderer.tsx +++ /dev/null @@ -1,197 +0,0 @@ -import { Entity, EntityAccessor, EntityListAccessor, useEnvironment } from '@contember/react-binding' -import { emptyArray } from '@contember/react-utils' -import { AnchorButton, Box, ButtonGroup, ButtonProps, Checkbox, Dropdown, DropdownProps, FieldContainer } from '@contember/ui' -import { ReactNode, useCallback, useEffect, useMemo } from 'react' -import type { RequestChange } from '../../../../routing' -import { RoutingLink, useRedirect } from '../../../../routing' -import { renderByJoining } from './renderByJoining' -import type { SelectedDimensionRenderer, StatefulDimensionDatum } from './types' - -export interface DimensionsRendererProps { - accessor: EntityListAccessor - buttonProps?: ButtonProps - dimension: string - labelFactory: ReactNode - maxItems: number - minItems: number - renderSelected?: SelectedDimensionRenderer - slugField: string -} - -export function DimensionsRenderer(props: DimensionsRendererProps) { - const environment = useEnvironment() - const redirect = useRedirect() - - const renderSelected = useCallback((selectedDimensions: StatefulDimensionDatum[]): ReactNode => { - const renderer = props.renderSelected || renderByJoining - - return renderer(selectedDimensions) - }, [props.renderSelected]) - - const renderContent = ( - dimensionData: StatefulDimensionDatum[], - selectedDimensions: StatefulDimensionDatum[], - ) => { - const canSelectJustOne = props.minItems === 1 && props.maxItems === 1 - const selectedDimensionsCount = selectedDimensions.length - const canSelectAnother = selectedDimensionsCount < props.maxItems - const canSelectLess = selectedDimensionsCount > props.minItems - const getRequestChangeCallback = - (dimension: StatefulDimensionDatum): RequestChange => - reqState => { - if (reqState === null) { - throw 'Cannot switch dimension of unmatched request' - } - - let updatedDimensions: StatefulDimensionDatum[] - - if (!dimension.isSelected && !canSelectAnother) { - // We're about to select another dimension but we have no more slots for it se we need to bump one off. - updatedDimensions = [...selectedDimensions.slice(1), dimension] // isSelected is technically wrong here but it doesn't matter - } else if (dimension.isSelected && !canSelectLess) { - // We're trying to unselect a dimension but our 'minItems' prop disallows it. Do nothing then. - updatedDimensions = selectedDimensions - } else { - updatedDimensions = dimensionData.filter(item => { - if (item.slug === dimension.slug) { - return !item.isSelected - } - return item.isSelected - }) - } - - return { - ...reqState, - dimensions: { - ...(reqState.dimensions || {}), - [props.dimension]: getUniqueDimensions(updatedDimensions.map(item => item.slug).slice(0, props.maxItems)), - }, - } - } - - const renderedDimensions = dimensionData.map(dimension => { - if (canSelectJustOne) { - return ( - ( - - {dimension.label} - - )} - /> - ) - } else { - return ( - - redirect(getRequestChangeCallback(dimension))} - /> - - ) - } - }) - - if (canSelectJustOne) { - return {renderedDimensions} - } - - return ( - - {renderedDimensions} - - ) - } - - const getNormalizedData = (currentDimensions: string[], accessor: EntityListAccessor): StatefulDimensionDatum[] => { - const entities = Array.from(accessor) - const normalized: StatefulDimensionDatum[] = [] - - for (const entity of entities) { - if (!(entity instanceof EntityAccessor)) { - continue - } - const slugField = entity.getField(props.slugField) - if (typeof slugField.value === 'string') { - const slugValue = slugField.value - normalized.push({ - slug: slugValue, - isSelected: currentDimensions.indexOf(slugValue) !== -1, - label: {props.labelFactory}, - }) - } - } - - return normalized - } - - const getUniqueDimensions = (selectedDimensions: string[]): string[] => { - return selectedDimensions.filter((item, i, array) => array.indexOf(item) === i) - } - - const uniqueDimensions = getUniqueDimensions(environment.getDimensionOrElse(props.dimension, [])) - const normalizedData = getNormalizedData(uniqueDimensions, props.accessor) - - const selectedDimensions = normalizedData - ? uniqueDimensions - .filter(slug => normalizedData.find(item => item.slug === slug) !== undefined) - .map(dimension => normalizedData.find(item => item.slug === dimension)) - .filter((item): item is StatefulDimensionDatum => !!item && item.isSelected) - : emptyArray - - useEffect(() => { - const redirectTarget = selectedDimensions.length === 0 ? normalizedData || [] : selectedDimensions - - if (normalizedData !== undefined && selectedDimensions.length === 0 && redirectTarget.length > 0) { - redirect(requestState => { - return { - ...requestState!, - dimensions: { - ...(requestState?.dimensions ?? {}), - [props.dimension]: getUniqueDimensions(redirectTarget.map(item => item.slug).slice(0, props.maxItems)), - }, - } - }) - } - }, [normalizedData, props.dimension, props.maxItems, redirect, selectedDimensions]) - - const buttonProps: DropdownProps['buttonProps'] = useMemo(() => ({ - distinction: 'seamless', - size: 'small', - ...props.buttonProps, - children: renderSelected(selectedDimensions), - }), [props.buttonProps, renderSelected, selectedDimensions]) - - if (normalizedData.length === 0) { - return null // What do we even do here…? - } - - if (normalizedData.length === 1) { - // If there is just one alternative to choose from, render no drop-downs - return ( -
-
{renderSelected(selectedDimensions)}
-
- ) - } - - return ( - - {renderContent(normalizedData, selectedDimensions)} - - ) -} diff --git a/packages/admin/src/components/bindingFacade/environment/DimensionsSwitcher/DimensionsSwitcher.tsx b/packages/admin/src/components/bindingFacade/environment/DimensionsSwitcher/DimensionsSwitcher.tsx deleted file mode 100644 index 60d9a077e6..0000000000 --- a/packages/admin/src/components/bindingFacade/environment/DimensionsSwitcher/DimensionsSwitcher.tsx +++ /dev/null @@ -1,85 +0,0 @@ -import { - BindingError, - DataBindingProvider, - DataBindingStateComponentProps, - EntityListSubTree, - Field, - QueryLanguage, - SugaredQualifiedFieldList, - useEnvironment, -} from '@contember/react-binding' -import { Spinner } from '@contember/ui' -import { memo, useMemo } from 'react' -import { DimensionsRenderer, DimensionsRendererProps } from './DimensionsRenderer' - -export interface DimensionsSwitcherBaseProps - extends Omit { - orderBy?: SugaredQualifiedFieldList['orderBy'] - optionEntities: SugaredQualifiedFieldList['fields'] - minItems?: number - maxItems?: number - labelField: string -} - -export interface DimensionsSwitcherProps extends DimensionsSwitcherBaseProps {} - -const DimensionsStateRenderer = (props: DataBindingStateComponentProps) => { - if (props.accessorTreeState.name === 'initialized') { - return <>{props.children} - } - return -} - -/** - * @group Dimensions - */ -export const DimensionsSwitcher = memo((props: DimensionsSwitcherProps) => { - const minItems = props.minItems === undefined ? 1 : props.minItems - const maxItems = props.maxItems === undefined ? 2 : props.maxItems - - if (minItems > maxItems) { - throw new BindingError( - `DimensionSwitcher: 'minItems' for dimension ${props.dimension} must be no greater than 'maxItems'.`, - ) - } - if (minItems < 1) { - throw new BindingError(`DimensionSwitcher: 'minItems' for dimension ${props.dimension} must be at least 1.`) - } - - const environment = useEnvironment() - const qualifiedEntityList = QueryLanguage.desugarQualifiedEntityList( - { - orderBy: props.orderBy, - entities: props.optionEntities, - }, - environment, - ) - const key = useMemo(() => JSON.stringify(qualifiedEntityList), [qualifiedEntityList]) - const labelFactory = - - return ( - - - {labelFactory} - - - - ) -}) - -DimensionsSwitcher.displayName = 'DimensionsSwitcher' diff --git a/packages/admin/src/components/bindingFacade/environment/DimensionsSwitcher/index.ts b/packages/admin/src/components/bindingFacade/environment/DimensionsSwitcher/index.ts deleted file mode 100644 index 776c9490e5..0000000000 --- a/packages/admin/src/components/bindingFacade/environment/DimensionsSwitcher/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './DimensionsRenderer' -export * from './DimensionsSwitcher' -export * from './renderByJoining' -export * from './types' diff --git a/packages/admin/src/components/bindingFacade/environment/DimensionsSwitcher/renderByJoining.tsx b/packages/admin/src/components/bindingFacade/environment/DimensionsSwitcher/renderByJoining.tsx deleted file mode 100644 index 4df322dcba..0000000000 --- a/packages/admin/src/components/bindingFacade/environment/DimensionsSwitcher/renderByJoining.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { Fragment, ReactNode } from 'react' -import type { SelectedDimensionRenderer } from './types' - -export const renderByJoining: SelectedDimensionRenderer = dimensionData => { - const output: ReactNode[] = [] - - for (const [i, dimension] of dimensionData.entries()) { - output.push({dimension.label}) - - if (i + 1 < dimensionData.length) { - output.push({', '}) - } - } - - return output -} diff --git a/packages/admin/src/components/bindingFacade/environment/DimensionsSwitcher/types.ts b/packages/admin/src/components/bindingFacade/environment/DimensionsSwitcher/types.ts deleted file mode 100644 index c342c4fa15..0000000000 --- a/packages/admin/src/components/bindingFacade/environment/DimensionsSwitcher/types.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { ReactNode } from 'react' - -export interface DimensionDatum { - slug: string - label: ReactNode -} - -export interface StatefulDimensionDatum extends DimensionDatum { - isSelected: IsSelected -} - -export type SelectedDimensionRenderer = (dimensionData: StatefulDimensionDatum[]) => ReactNode diff --git a/packages/admin/src/components/bindingFacade/environment/SideDimensions.tsx b/packages/admin/src/components/bindingFacade/environment/SideDimensions.tsx deleted file mode 100644 index 18be8ea04e..0000000000 --- a/packages/admin/src/components/bindingFacade/environment/SideDimensions.tsx +++ /dev/null @@ -1,180 +0,0 @@ -import { - BindingError, - Environment, - EnvironmentContext, - EnvironmentDeltaProvider, - HasOne, - StaticRenderProvider, - SugaredRelativeSingleEntity, -} from '@contember/react-binding' -import { PureComponent, ReactElement, ReactNode, ReactNodeArray } from 'react' -import { LabelMiddleware, LabelMiddlewareProvider } from '@contember/react-binding' - -type EnforceSubtypeRelation = never - -export interface SideDimensionsProps extends SideDimensions.CommonDimensionProps { - dimension?: string - staticOptions?: Array - children: ReactNode - alignChildren?: boolean -} - -class SideDimensions extends PureComponent { - static displayName = 'SideDimensions' - - public override render() { - return ( -
- - {oldEnvironment => SideDimensions.staticRender(this.props, oldEnvironment)} - -
- ) - } - - public static staticRender(props: SideDimensionsProps, environment: Environment): ReactElement | null { - if ((props.dimension === undefined) === (props.staticOptions === undefined)) { - throw new BindingError( - `The SideDimensions component needs to be passed exactly one of its 'dimension' or 'staticOptions' props.`, - ) - } - - let dimensions: Array - - if (props.dimension !== undefined) { - const selectedDimensions = environment.getAllDimensions() - - if (!(props.dimension in selectedDimensions)) { - console.error(new BindingError(`The '${props.dimension}' dimension in undefined`)) - return null - } - - dimensions = selectedDimensions[props.dimension] - } else if (props.staticOptions !== undefined) { - dimensions = props.staticOptions - } - - const alignChildren: boolean = props.alignChildren !== false - const children: ReactNodeArray = Array.isArray(props.children) && alignChildren ? props.children : [props.children] - - return ( -
- {children.map((child, i) => ( -
- {dimensions.map((item, j) => { - return ( - 1} - labelMiddleware={props.labelMiddleware} - > - {child} - - ) - })} -
- ))} -
- ) - } -} - -namespace SideDimensions { - type ValuesMapWithLegacyLabelMiddleware = Environment.ValuesMapWithFactory & { labelMiddleware?: LabelMiddleware} - - export interface CommonDimensionProps { - hasOneField?: string | SugaredRelativeSingleEntity - variableName?: Environment.Name - variables?: ValuesMapWithLegacyLabelMiddleware | ((dimensionValue: Environment.Value) => ValuesMapWithLegacyLabelMiddleware) - labelMiddleware?: LabelMiddleware - } - - export interface SingleDimensionProps extends CommonDimensionProps { - children: ReactNode - environment: Environment - dimensionValue: Environment.Value - renderDimensionValue: boolean - } - - export class SingleDimension extends PureComponent { - static displayName = 'SideDimension' - - public override render() { - const children = SingleDimension.staticRender(this.props, this.props.environment) - const newLabelMiddleware = this.getLabelMiddleware() - const inner = ( - -
- {this.props.renderDimensionValue && {this.props.dimensionValue as string}} - {children} -
-
- ) - if (newLabelMiddleware) { - return ( - - {inner} - - ) - } - return inner - } - - public getLabelMiddleware(): LabelMiddleware | undefined { - if (this.props.labelMiddleware) { - return this.props.labelMiddleware - } - if (!this.props.variables) { - return undefined - } - const variables = typeof this.props.variables === 'function' ? this.props.variables(this.props.dimensionValue) : this.props.variables - if ('labelMiddleware' in variables) { - return variables.labelMiddleware - } - return undefined - } - - public static staticRender(props: SingleDimensionProps, environment: Environment): ReactNode { - if (!props.hasOneField) { - return props.children - } - const hasOneProps: SugaredRelativeSingleEntity = - typeof props.hasOneField === 'string' - ? { - field: props.hasOneField, - } - : props.hasOneField - return {props.children} - } - - public static generateEnvironment(props: SingleDimensionProps, oldEnvironment: Environment): Environment { - const deltaFactory: ValuesMapWithLegacyLabelMiddleware = typeof props.variables === 'function' - ? props.variables(props.dimensionValue) - : props.variables ?? {} - - if (props.variableName) { - deltaFactory[props.variableName] = props.dimensionValue - } - - const { labelMiddleware, ...variables } = deltaFactory - return oldEnvironment.withVariables(variables) - } - } - - type EnforceDataBindingCompatibility = EnforceSubtypeRelation< - typeof SingleDimension, - EnvironmentDeltaProvider - > -} - -export { SideDimensions } - -type EnforceDataBindingCompatibility = EnforceSubtypeRelation< - typeof SideDimensions, - StaticRenderProvider -> diff --git a/packages/admin/src/components/bindingFacade/environment/index.ts b/packages/admin/src/components/bindingFacade/environment/index.ts deleted file mode 100644 index 66b91946d2..0000000000 --- a/packages/admin/src/components/bindingFacade/environment/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './SideDimensions' -export * from './DimensionsSwitcher' diff --git a/packages/admin/src/components/bindingFacade/index.ts b/packages/admin/src/components/bindingFacade/index.ts deleted file mode 100644 index 981fa30f8d..0000000000 --- a/packages/admin/src/components/bindingFacade/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from './blocks' -export * from './buttons' -export * from './collections' -export * from './discrimination' -export * from './displayFields' -export * from './environment' -export * from './renderers' -export * from './richText' -export * from './ui' -export * from './upload' diff --git a/packages/admin/src/components/bindingFacade/renderers/FeedbackRenderer.tsx b/packages/admin/src/components/bindingFacade/renderers/FeedbackRenderer.tsx deleted file mode 100644 index 168f0e6ef1..0000000000 --- a/packages/admin/src/components/bindingFacade/renderers/FeedbackRenderer.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import type { AccessorTreeState } from '@contember/react-binding' -import { Message, SpinnerOverlay } from '@contember/ui' -import { ReactNode, useEffect } from 'react' - -export interface FeedbackRendererProps { - accessorTreeState: AccessorTreeState - children?: ReactNode -} - -export function FeedbackRenderer({ accessorTreeState, children }: FeedbackRendererProps) { - useEffect(() => { - if (accessorTreeState.name === 'error' && accessorTreeState.error.type === 'unauthorized') { - window.location.href = '/' // redirect to login - } - }, [accessorTreeState]) - - if (accessorTreeState.name === 'initializing') { - return - } - - if (accessorTreeState.name === 'error') { - if (accessorTreeState.error.type === 'unauthorized') { - return null // This results in a redirect for now, and so the actual handling is in an effect - } - if (import.meta.env.DEV) { - throw accessorTreeState.error - } - - return {accessorTreeState.error.type} - } - - return <>{children} -} diff --git a/packages/admin/src/components/bindingFacade/renderers/LayoutRenderer.tsx b/packages/admin/src/components/bindingFacade/renderers/LayoutRenderer.tsx deleted file mode 100644 index 1c0635e1d8..0000000000 --- a/packages/admin/src/components/bindingFacade/renderers/LayoutRenderer.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { Component } from '@contember/react-binding' -import { LayoutPage, LayoutPageProps } from '@contember/ui' -import { FunctionComponent } from 'react' - -export interface LayoutRendererProps extends LayoutPageProps { -} - -export const LayoutRenderer: FunctionComponent = Component( - LayoutPage, - props => ( - <> - {props.title} - {props.afterTitle} - {props.children} - {props.side} - {props.actions} - {props.navigation} - - ), - 'LayoutRenderer', -) diff --git a/packages/admin/src/components/bindingFacade/renderers/index.ts b/packages/admin/src/components/bindingFacade/renderers/index.ts deleted file mode 100644 index 30b795cb60..0000000000 --- a/packages/admin/src/components/bindingFacade/renderers/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './FeedbackRenderer' -export * from './LayoutRenderer' -export * from './listRenderers' -export * from './pageRenderers' diff --git a/packages/admin/src/components/bindingFacade/renderers/listRenderers/ImmutableEntityListRenderer.tsx b/packages/admin/src/components/bindingFacade/renderers/listRenderers/ImmutableEntityListRenderer.tsx deleted file mode 100644 index da72960a88..0000000000 --- a/packages/admin/src/components/bindingFacade/renderers/listRenderers/ImmutableEntityListRenderer.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import { Component } from '@contember/react-binding' -import type { ReactElement, ReactNode } from 'react' -import { RepeaterInner, RepeaterInnerProps } from '../../collections' - -export type ImmutableEntityListRendererProps = - & Omit< - RepeaterInnerProps, - | 'entityList' - | 'label' - | 'sortableBy' - | 'unstable__sortAxis' - | 'addButtonComponentExtraProps' - | 'addButtonText' - | 'addButtonProps' - | 'addButtonComponent' - | 'enableAddingNew' - | 'enableRemoving' - | 'dragHandleComponent' - | 'useDragHandle' - > - & { - beforeContent?: ReactNode - afterContent?: ReactNode - } - -export const ImmutableEntityListRenderer = Component( - ( - props: ImmutableEntityListRendererProps, - ) => { - return ( - <> - {props.beforeContent} - - {props.afterContent} - - ) - }, - (props, environment) => ( - // Deliberately omitting emptyMessage ‒ it's not supposed to be data-dependent. - <> - {props.beforeContent} - {RepeaterInner.staticRender( - { - label: undefined, - ...props, - }, - environment, - )} - {props.afterContent} - - ), - 'ImmutableEntityListRenderer', -) as ( - props: ImmutableEntityListRendererProps, -) => ReactElement diff --git a/packages/admin/src/components/bindingFacade/renderers/listRenderers/MutableEntityListRenderer.tsx b/packages/admin/src/components/bindingFacade/renderers/listRenderers/MutableEntityListRenderer.tsx deleted file mode 100644 index 7d506d39a0..0000000000 --- a/packages/admin/src/components/bindingFacade/renderers/listRenderers/MutableEntityListRenderer.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import { Component } from '@contember/react-binding' -import type { ReactElement, ReactNode } from 'react' -import { RepeaterInner, RepeaterInnerProps } from '../../collections' - -// TODO properly unify with repeaters -export type MutableEntityListRendererProps = - & Omit, 'label'> - & { - beforeContent?: ReactNode - afterContent?: ReactNode - } - -export const MutableEntityListRenderer = Component( - ({ - beforeContent, - afterContent, - ...repeaterInnerProps - }: MutableEntityListRendererProps) => { - return ( - <> - {beforeContent} - - {afterContent} - - ) - }, - ({ beforeContent, afterContent, ...repeaterInnerProps }, environment) => ( - <> - {beforeContent} - {RepeaterInner.staticRender( - { - label: undefined, - ...repeaterInnerProps, - }, - environment, - )} - {afterContent} - - ), - 'MutableEntityListRenderer', -) as ( - props: MutableEntityListRendererProps, -) => ReactElement diff --git a/packages/admin/src/components/bindingFacade/renderers/listRenderers/index.ts b/packages/admin/src/components/bindingFacade/renderers/listRenderers/index.ts deleted file mode 100644 index 7298976243..0000000000 --- a/packages/admin/src/components/bindingFacade/renderers/listRenderers/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './ImmutableEntityListRenderer' -export * from './MutableEntityListRenderer' diff --git a/packages/admin/src/components/bindingFacade/renderers/pageRenderers/DataGridPageRenderer.tsx b/packages/admin/src/components/bindingFacade/renderers/pageRenderers/DataGridPageRenderer.tsx deleted file mode 100644 index d8f0b81ff7..0000000000 --- a/packages/admin/src/components/bindingFacade/renderers/pageRenderers/DataGridPageRenderer.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { Component } from '@contember/react-binding' -import { DataGridContainer, DataGridContainerProps } from '@contember/react-datagrid-ui' -import { LayoutRenderer, LayoutRendererProps } from '../LayoutRenderer' - -export type DataGridPageRendererProps = - & LayoutRendererProps - & DataGridContainerProps - -export const DataGridPageRenderer = Component( - ({ - children, - - side, - title, - navigation, - actions, - pageContentLayout, - afterTitle, - - ...entityListProps - }: DataGridPageRendererProps) => ( - - {children} - - ), - 'ListRenderer', -) diff --git a/packages/admin/src/components/bindingFacade/renderers/pageRenderers/ImmutableEntityListPageRenderer.tsx b/packages/admin/src/components/bindingFacade/renderers/pageRenderers/ImmutableEntityListPageRenderer.tsx deleted file mode 100644 index 83b56a252c..0000000000 --- a/packages/admin/src/components/bindingFacade/renderers/pageRenderers/ImmutableEntityListPageRenderer.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import { Component } from '@contember/react-binding' -import type { ReactElement } from 'react' -import { LayoutRenderer, LayoutRendererProps } from '../LayoutRenderer' -import { ImmutableEntityListRenderer, ImmutableEntityListRendererProps } from '../listRenderers' - -export type ImmutableEntityListPageRendererProps = - & LayoutRendererProps - & ImmutableEntityListRendererProps - -export const ImmutableEntityListPageRenderer = Component( - ({ - children, - - side, - title, - navigation, - actions, - pageContentLayout, - - ...entityListProps - }: ImmutableEntityListPageRendererProps) => ( - - {children} - - ), - 'ListRenderer', -) as ( - props: ImmutableEntityListPageRendererProps, -) => ReactElement diff --git a/packages/admin/src/components/bindingFacade/renderers/pageRenderers/ImmutableEntityListTablePageRenderer.tsx b/packages/admin/src/components/bindingFacade/renderers/pageRenderers/ImmutableEntityListTablePageRenderer.tsx deleted file mode 100644 index 5311555a20..0000000000 --- a/packages/admin/src/components/bindingFacade/renderers/pageRenderers/ImmutableEntityListTablePageRenderer.tsx +++ /dev/null @@ -1,94 +0,0 @@ -import { Component, Entity, EntityAccessor, EntityListAccessor } from '@contember/react-binding' -import { Table, TableCell, TableProps, TableRow, TableRowProps } from '@contember/ui' -import { ReactElement, ReactNode, memo } from 'react' -import { DeleteEntityButton, EmptyMessage, EmptyMessageOuterProps } from '@contember/react-binding-ui' -import { LayoutRenderer, LayoutRendererProps } from '../LayoutRenderer' - -export type ImmutableEntityListTablePageRendererProps = - & LayoutRendererProps - & EmptyMessageOuterProps - & { - accessor: EntityListAccessor - tableProps?: Omit - tableRowProps?: Omit - enableRemoving?: boolean - } - -export const ImmutableEntityListTablePageRenderer = Component( - ({ - enableRemoving = true, - children, - tableProps, - tableRowProps, - accessor, - emptyMessage, - emptyMessageComponent, - afterTitle, - ...layoutProps - }: ImmutableEntityListTablePageRendererProps) => { - return ( - - - {children} - - - ) - }, - 'ImmutableEntityListTablePageRenderer', -) as ( - props: ImmutableEntityListTablePageRendererProps, -) => ReactElement - - -export type TableContainerRendererProps = - & TableProps - & EmptyMessageOuterProps - & { - accessor: EntityListAccessor - children: ReactNode - } -export const TableRenderer = Component( - ({ accessor, children, ...props }: TableContainerRendererProps) => { - // TODO solve this via preferences - const isEmpty = !Array.from(accessor).some(entity => entity instanceof EntityAccessor && entity.existsOnServer) - - if (isEmpty) { - return ( - {props.emptyMessage ?? 'There are no items to display.'} - ) - } - - return ( - - {Array.from(accessor).map((it, i) => ( - - {children} - - ))} -
- ) - }, - ({ children }) => <>{children}, - 'TableContainerRenderer', -) - -type TableRowRendererProps = - & TableRowProps - & { - enableRemoving: boolean - children: ReactNode - } - -const TableRowRenderer = memo((props: TableRowRendererProps) => ( - - {props.children} - {props.enableRemoving && ( - - - - )} - -)) -TableRow.displayName = 'TableRowRenderer' diff --git a/packages/admin/src/components/bindingFacade/renderers/pageRenderers/MutableEntityListPageRenderer.tsx b/packages/admin/src/components/bindingFacade/renderers/pageRenderers/MutableEntityListPageRenderer.tsx deleted file mode 100644 index c49107c76b..0000000000 --- a/packages/admin/src/components/bindingFacade/renderers/pageRenderers/MutableEntityListPageRenderer.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { Component } from '@contember/react-binding' -import type { ReactElement } from 'react' -import { PersistButton } from '../../buttons' -import { LayoutRenderer, LayoutRendererProps } from '../LayoutRenderer' -import { MutableEntityListRenderer, MutableEntityListRendererProps } from '../listRenderers' - -export type MutableEntityListPageRendererProps = - & LayoutRendererProps - & MutableEntityListRendererProps - -export const MutableEntityListPageRenderer = Component( - ({ - actions, - children, - fit, - navigation, - pageContentLayout, - side, - title, - ...entityListProps - }: MutableEntityListPageRendererProps) => ( - } - fit={fit} - navigation={navigation} - pageContentLayout={pageContentLayout} - side={side} - title={title} - > - {children} - - ), - 'MutableEntityListPageRenderer', -) as ( - props: MutableEntityListPageRendererProps, -) => ReactElement diff --git a/packages/admin/src/components/bindingFacade/renderers/pageRenderers/index.ts b/packages/admin/src/components/bindingFacade/renderers/pageRenderers/index.ts deleted file mode 100644 index 52ac1deda3..0000000000 --- a/packages/admin/src/components/bindingFacade/renderers/pageRenderers/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './DataGridPageRenderer' -export * from './ImmutableEntityListPageRenderer' -export * from './ImmutableEntityListTablePageRenderer' -export * from './MutableEntityListPageRenderer' diff --git a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/index.ts b/packages/admin/src/components/bindingFacade/richText/ContemberEditor/index.ts deleted file mode 100644 index a207266ead..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/index.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { - addMarks, - canToggleMark, - closest, - closestBlockEntry, - closestViableBlockContainerEntry, - ejectElement, - elementToSpecifics, - getElementDataAttributes, - getPreviousSibling, - hasMarks, - hasParentOfType, - isElementType, - permissivelyDeserializeNodes, - removeMarks, - serializeNodes, - strictlyDeserializeNodes, - textToSpecifics, - toLatestFormat, - topLevelNodes, -} from './methods' - -export type { ElementDataAttributes } from './methods' - -// TODO use export * as ContemberEditor from './methods' once the tooling is ready. -export const ContemberEditor = { - addMarks, - canToggleMark, - closest, - closestBlockEntry, - closestViableBlockContainerEntry, - ejectElement, - elementToSpecifics, - getElementDataAttributes, - getPreviousSibling, - hasMarks, - hasParentOfType, - isElementType, - permissivelyDeserializeNodes, - removeMarks, - serializeNodes, - strictlyDeserializeNodes, - textToSpecifics, - toLatestFormat, - topLevelNodes, -} diff --git a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/addMarks.ts b/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/addMarks.ts deleted file mode 100644 index 6ad0eea467..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/addMarks.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Editor as SlateEditor, Editor, Text as SlateText } from 'slate' -import type { TextSpecifics } from '../../baseEditor' - -export const addMarks = (editor: E, marks: TextSpecifics) => { - Editor.withoutNormalizing(editor, () => { - for (const mark in marks) { - Editor.addMark(editor, mark, (marks as any)[mark]) - } - }) -} diff --git a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/canToggleMark.ts b/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/canToggleMark.ts deleted file mode 100644 index 783b445e98..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/canToggleMark.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Editor as SlateEditor, Text as SlateText } from 'slate' - -export const canToggleMark = ( - editor: E, - markName: string, - markValue: unknown = true, -) => { - return editor.canToggleMarks({ [markName]: markValue }) -} diff --git a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/closest.ts b/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/closest.ts deleted file mode 100644 index 60013d491f..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/closest.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Editor as SlateEditor, Editor, Element, Location, NodeEntry, Text } from 'slate' - -export const closest = ( - editor: E, - options: { - at?: Location - match: (node: Editor | Element) => boolean - }, -): NodeEntry | undefined => { - const entries = Editor.levels(editor, { - at: options.at, - match: node => { - return !Text.isText(node) && options.match(node) - }, - reverse: true, - }) - for (const entry of entries) { - return entry - } - return undefined -} diff --git a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/closestBlockEntry.ts b/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/closestBlockEntry.ts deleted file mode 100644 index a93f1fd28d..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/closestBlockEntry.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Editor as SlateEditor, Editor, Location, Element } from 'slate' -import { closest } from './closest' - -export const closestBlockEntry = ( - editor: E, - options?: { - at?: Location - match?: (node: Element) => boolean - }, -) => - closest(editor, { - at: options?.at, - match: node => Editor.isBlock(editor, node) && (options?.match ? options.match(node) : true), - }) diff --git a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/closestViableBlockContainerEntry.ts b/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/closestViableBlockContainerEntry.ts deleted file mode 100644 index e8051303f6..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/closestViableBlockContainerEntry.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { Location as SlateLocation, NodeEntry } from 'slate' -import { Editor as SlateEditor, Element as SlateElement } from 'slate' -import { closest } from './closest' - -export const closestViableBlockContainerEntry = ( - editor: E, - options?: { - at?: SlateLocation - }, -): NodeEntry | undefined => - closest(editor, { - at: options?.at, - match: node => editor.canContainAnyBlocks(node), - }) diff --git a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/ejectElement.ts b/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/ejectElement.ts deleted file mode 100644 index fa947cfac3..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/ejectElement.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Editor as SlateEditor, Element as SlateElement, Node as SlateNode, Path, Transforms } from 'slate' - -export const ejectElement = (editor: E, path: Path) => { - const element = SlateNode.get(editor, path) - - if (!SlateElement.isElement(element)) { - return - } - const { children, ...otherProperties } = element - - Transforms.unsetNodes(editor, Object.keys(otherProperties), { - at: path, - }) -} diff --git a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/elementToSpecifics.ts b/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/elementToSpecifics.ts deleted file mode 100644 index 9bb419dc01..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/elementToSpecifics.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Element as SlateElement } from 'slate' - -export const elementToSpecifics = ( - element: Element, -): Partial => { - const { type, children, referenceId, ...specifics } = element - return specifics as Partial -} diff --git a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/getElementDataAttributes.ts b/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/getElementDataAttributes.ts deleted file mode 100644 index 061352fd47..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/getElementDataAttributes.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { Scalar } from '@contember/react-binding' -import { Element as SlateElement } from 'slate' - -export interface ElementDataAttributes { - [dataAttribute: string]: Scalar -} - -export const getElementDataAttributes = ( - element: Element, - attributeNamePrefix: string = 'contember', -): ElementDataAttributes => { - const { children, ...extendedSpecifics } = element - - return Object.fromEntries( - Object.entries(extendedSpecifics) - .filter(([, value]) => { - const t = typeof value - return t === 'string' || t === 'number' || t === 'boolean' - }) - .map(([attribute, value]) => [`data-${attributeNamePrefix}-${attribute.toLowerCase()}`, value as Scalar]), - ) -} diff --git a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/getPreviousSibling.ts b/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/getPreviousSibling.ts deleted file mode 100644 index 9cf65779e6..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/getPreviousSibling.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Editor as SlateEditor, Node as SlateNode, NodeEntry, Path as SlatePath } from 'slate' - -export const getPreviousSibling = < - E extends SlateEditor = SlateEditor, - CurrentNode extends SlateNode = SlateNode, - PreviousNode extends SlateNode = CurrentNode, ->( - editor: E, - node: CurrentNode, - nodePath: SlatePath, -): NodeEntry | undefined => { - const lastPathIndex = nodePath[nodePath.length - 1] - if (lastPathIndex === 0) { - return undefined - } - const previousPath = nodePath.slice(0, -1).concat(lastPathIndex - 1) - return [SlateNode.get(editor, previousPath) as PreviousNode, previousPath] -} diff --git a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/hasMarks.ts b/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/hasMarks.ts deleted file mode 100644 index 738fd47cd7..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/hasMarks.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Editor as SlateEditor, Node as SlateNode, Path, Text as SlateText } from 'slate' -import type { TextSpecifics } from '../../baseEditor' - -export const hasMarks = ( - editor: E, - marks: TextSpecifics, - options: { - from?: Path - to?: Path - } = {}, -) => { - const from = options.from ?? editor.selection?.anchor.path - const to = options.to ?? editor.selection?.focus.path - - if (!from && !to) { - return false - } - - for (const [text] of SlateNode.texts(editor, { - from, - to, - })) { - for (const markName in marks) { - if (!(markName in text) || text[markName] !== (marks as any)[markName]) { - return false - } - } - } - return true -} diff --git a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/hasParentOfType.ts b/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/hasParentOfType.ts deleted file mode 100644 index aa0ff9f18f..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/hasParentOfType.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Editor as SlateEditor, Element as SlateElement, Node as SlateNode, NodeEntry, Path as SlatePath } from 'slate' -import { ContemberEditor } from '../index' - -export const hasParentOfType = ( - editor: Editor, - nodeEntry: NodeEntry, - type: Element['type'], - suchThat?: Partial, -): boolean => { - const [, path] = nodeEntry - if (path.length === 1) { - return false // Doesn't have a parent - } - const parentPath = SlatePath.parent(path) - const parent = SlateNode.get(editor, parentPath) - - return ContemberEditor.isElementType(parent, type, suchThat) -} diff --git a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/index.ts b/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/index.ts deleted file mode 100644 index 8bb9ccb3d1..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -export * from './addMarks' -export * from './canToggleMark' -export * from './closest' -export * from './closestBlockEntry' -export * from './closestViableBlockContainerEntry' -export * from './ejectElement' -export * from './elementToSpecifics' -export * from './getElementDataAttributes' -export * from './hasMarks' -export * from './hasParentOfType' -export * from './getPreviousSibling' -export * from './isElementType' -export * from './permissivelyDeserializeNodes' -export * from './removeMarks' -export * from './serializeNodes' -export * from './strictlyDeserializeNodes' -export * from './textToSpecifics' -export * from './toLatestFormat' -export * from './topLevelNodes' diff --git a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/isElementType.ts b/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/isElementType.ts deleted file mode 100644 index 50330cb262..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/isElementType.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Element as SlateElement, Node as SlateNode } from 'slate' - -export const isElementType = ( - element: SlateNode, - type: Element['type'], - suchThat?: Partial, -): boolean => { - if (!SlateElement.isElement(element) || element.type !== type) { - return false - } - if (suchThat === undefined) { - return true - } - - for (const prop in suchThat) { - const propValue = suchThat[prop] - const propPresent = prop in element - - if (!propValue && !propPresent) { - // Falsy values get special treatment. - continue - } - - if (!propPresent || (element as Element)[prop as keyof Element] !== propValue) { - return false - } - } - return true -} diff --git a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/permissivelyDeserializeNodes.ts b/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/permissivelyDeserializeNodes.ts deleted file mode 100644 index d710f2efad..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/permissivelyDeserializeNodes.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { SerializableEditorNode } from '../../baseEditor' -import { toLatestFormat } from './toLatestFormat' -import { Editor as SlateEditor, Element as SlateElement, Text as SlateText } from 'slate' - -export const permissivelyDeserializeNodes = ( - editor: E, - serializedElement: string, - errorMessage?: string, -): Array => { - let deserialized: SerializableEditorNode | SlateElement | null = null - try { - // It is important that only the JSON.parse call is inside the try block. - // We don't want to catch other exceptions from here. - deserialized = JSON.parse(serializedElement) - } catch (e) {} - - if (typeof deserialized !== 'object' || deserialized === null) { - return [editor.createDefaultElement([{ text: serializedElement }])] - } - - if ('formatVersion' in deserialized) { - return toLatestFormat(editor, deserialized as SerializableEditorNode).children - } - - // If no format version is specified, assume zero. - return toLatestFormat(editor, { - formatVersion: 0, - children: [deserialized], - }).children -} diff --git a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/removeMarks.ts b/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/removeMarks.ts deleted file mode 100644 index 9223b2e4b2..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/removeMarks.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Editor as SlateEditor, Editor, Text as SlateText } from 'slate' -import type { TextSpecifics } from '../../baseEditor' - -export const removeMarks = (editor: E, marks: TextSpecifics) => { - Editor.withoutNormalizing(editor, () => { - for (const mark in marks) { - Editor.removeMark(editor, mark) - } - }) -} diff --git a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/serializeNodes.ts b/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/serializeNodes.ts deleted file mode 100644 index 83e76584b4..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/serializeNodes.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { SerializableEditorNode } from '../../baseEditor' -import { Editor as SlateEditor, Element as SlateElement, Text as SlateText } from 'slate' - -export const serializeNodes = ( - editor: E, - elements: Array, - errorMessage?: string, -) => { - try { - const serialized: SerializableEditorNode = { - formatVersion: editor.formatVersion, - children: elements, - } - return JSON.stringify(serialized) - } catch (e) { - throw new Error(errorMessage || `Editor: serialization error`) - } -} diff --git a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/strictlyDeserializeNodes.ts b/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/strictlyDeserializeNodes.ts deleted file mode 100644 index a62d689c6b..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/strictlyDeserializeNodes.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { SerializableEditorNode } from '../../baseEditor' -import { toLatestFormat } from './toLatestFormat' -import { Editor as SlateEditor, Element as SlateElement, Text as SlateText } from 'slate' - -export const strictlyDeserializeNodes = ( - editor: E, - serializedElement: string, - errorMessage?: string, -): Array => { - let deserialized: SerializableEditorNode - try { - // It is important that only the JSON.parse call is inside the try block. - // We don't want to catch other exceptions from here. - deserialized = JSON.parse(serializedElement) - } catch (e) { - throw new Error(errorMessage || `Editor: deserialization error`) - } - return toLatestFormat(editor, deserialized).children -} diff --git a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/textToSpecifics.ts b/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/textToSpecifics.ts deleted file mode 100644 index 625ac31e2a..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/textToSpecifics.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { TextSpecifics } from '../../baseEditor' -import { Text as SlateText } from 'slate' - -export const textToSpecifics = (textNode: Text): TextSpecifics => { - const { text, ...specifics } = textNode - return specifics -} diff --git a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/toLatestFormat.ts b/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/toLatestFormat.ts deleted file mode 100644 index cbb7f1ea28..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/toLatestFormat.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { BindingError } from '@contember/react-binding' -import type { SerializableEditorNode } from '../../baseEditor' -import { Editor as SlateEditor, Element as SlateElement } from 'slate' - -export const toLatestFormat = ( - editor: E, - potentiallyOldNode: SerializableEditorNode, -): SerializableEditorNode => { - if (potentiallyOldNode.formatVersion === editor.formatVersion) { - return potentiallyOldNode - } - if (potentiallyOldNode.formatVersion > editor.formatVersion) { - // Boy oh boy, do we have a situation… - return potentiallyOldNode // Just hope it's at least somewhat backwards compatible. - } - let formatNumber = potentiallyOldNode.formatVersion - try { - for (; formatNumber < editor.formatVersion; formatNumber++) { - potentiallyOldNode = { - formatVersion: formatNumber + 1, - children: potentiallyOldNode.children.map(oldChild => - editor.upgradeFormatBySingleVersion(oldChild, formatNumber), - ) as SlateElement[], - } - } - return potentiallyOldNode - } catch (e) { - const genericMessage = `Failed to upgrade editor format from version ${formatNumber}.` - if (e instanceof RangeError) { - throw new BindingError( - `${genericMessage}\nDetected a stack overflow. ` + - `Perhaps you incorrectly implemented 'upgradeFormatBySingleVersion'?`, - ) - } - throw new BindingError(genericMessage) - } -} diff --git a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/topLevelNodes.ts b/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/topLevelNodes.ts deleted file mode 100644 index 13d4674fe7..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/ContemberEditor/methods/topLevelNodes.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Editor as SlateEditor, Element as SlateElement } from 'slate' - -export const topLevelNodes = (editor: E) => { - // We manually filter out void nodes because it appears that Slate doesn't respect the voids setting from here. - // The combination of isElement and mode: 'highest' is really just a roundabout way of excluding the Editor. - return SlateEditor.nodes(editor, { - match: node => SlateElement.isElement(node) && !editor.isVoid(node), - mode: 'highest', - voids: false, - }) -} diff --git a/packages/admin/src/components/bindingFacade/richText/RichEditor.ts b/packages/admin/src/components/bindingFacade/richText/RichEditor.ts deleted file mode 100644 index 893897ff27..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/RichEditor.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { - alignCenterButton, - alignEndButton, - alignJustifyButton, - alignStartButton, - anchorToolbarButton, - boldToolbarButton, - codeToolbarButton, - headingFiveNumberedToolbarButton, - headingFiveToolbarButton, - headingFourNumberedToolbarButton, - headingFourToolbarButton, - headingOneNumberedToolbarButton, - headingOneToolbarButton, - headingSixNumberedToolbarButton, - headingSixToolbarButton, - headingThreeNumberedToolbarButton, - headingThreeToolbarButton, - headingTwoNumberedToolbarButton, - headingTwoToolbarButton, - highlightToolbarButton, - horizontalRuleToolbarButton, - italicToolbarButton, - orderedListToolbarButton, - paragraphNumberedToolbarButton, - paragraphToolbarButton, - scrollTargetToolbarButton, - strikeThroughToolbarButton, - tableToolbarButton, - underlineToolbarButton, - unorderedListToolbarButton, -} from './plugins' - -export namespace RichEditor { - export const buttons = { - anchor: anchorToolbarButton, - headingOne: headingOneToolbarButton, - headingOneNumbered: headingOneNumberedToolbarButton, - headingTwo: headingTwoToolbarButton, - headingTwoNumbered: headingTwoNumberedToolbarButton, - headingThree: headingThreeToolbarButton, - headingThreeNumbered: headingThreeNumberedToolbarButton, - headingFour: headingFourToolbarButton, - headingFourNumbered: headingFourNumberedToolbarButton, - headingFive: headingFiveToolbarButton, - headingFiveNumbered: headingFiveNumberedToolbarButton, - headingSix: headingSixToolbarButton, - headingSixNumbered: headingSixNumberedToolbarButton, - horizontalRule: horizontalRuleToolbarButton, - orderedList: orderedListToolbarButton, - paragraph: paragraphToolbarButton, - paragraphNumbered: paragraphNumberedToolbarButton, - scrollTarget: scrollTargetToolbarButton, - unorderedList: unorderedListToolbarButton, - table: tableToolbarButton, - - bold: boldToolbarButton, - code: codeToolbarButton, - highlight: highlightToolbarButton, - italic: italicToolbarButton, - strikeThrough: strikeThroughToolbarButton, - underline: underlineToolbarButton, - - alignStart: alignStartButton, - alignEnd: alignEndButton, - alignCenter: alignCenterButton, - alignJustify: alignJustifyButton, - } -} diff --git a/packages/admin/src/components/bindingFacade/richText/RichTextField/RichTextField.tsx b/packages/admin/src/components/bindingFacade/richText/RichTextField/RichTextField.tsx deleted file mode 100644 index 6814e8415c..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/RichTextField/RichTextField.tsx +++ /dev/null @@ -1,183 +0,0 @@ -import { - Component, - Field, - FieldAccessor, - FieldBasicProps, - QueryLanguage, - useEntity, - useMutationState, -} from '@contember/react-binding' -import { EditorCanvas, EditorCanvasDistinction, FieldContainer, FieldContainerProps } from '@contember/ui' -import { FunctionComponent, useCallback, useMemo, useState } from 'react' -import { Descendant, Editor, Element as SlateElement, Node as SlateNode, NodeEntry, Transforms } from 'slate' -import { Editable, Slate } from 'slate-react' -import { useAccessorErrors } from '@contember/react-binding-ui' -import { createEditor, CreateEditorPublicOptions } from '../editorFactory' -import { paragraphElementType } from '../plugins' -import { RichEditor } from '../RichEditor' -import { HoveringToolbars, HoveringToolbarsProps } from '../toolbars' -import { useRichTextFieldNodes } from './useRichTextFieldNodes' - -export interface RichTextFieldProps - extends FieldBasicProps, - Omit, - CreateEditorPublicOptions, - HoveringToolbarsProps { - placeholder?: string - distinction?: EditorCanvasDistinction -} - -/** - * Rich text field supports more advanced formatting capabilities. Output of this field is a JSON. - * - * @group Form Fields - */ -export const RichTextField: FunctionComponent = Component( - props => { - const entity = useEntity() - const environment = entity.environment - const getParent = entity.getAccessor - - const desugaredField = useMemo( - () => QueryLanguage.desugarRelativeSingleField(props, environment), - [environment, props], - ) - const fieldAccessor = useMemo(() => entity.getRelativeSingleField(desugaredField), [entity, desugaredField]) - - // The cache is questionable, really. - const [contemberFieldElementCache] = useState(() => new WeakMap, SlateElement[]>()) - const isMutating = useMutationState() - - const [editor] = useState(() => { - const editor = createEditor({ - plugins: props.plugins ?? [ - 'code', - 'strikeThrough', - 'highlight', - 'underline', - 'italic', - 'bold', - 'scrollTarget', - 'anchor', - 'paragraph', - ], - augmentEditor: props.augmentEditor, - augmentEditorBuiltins: props.augmentEditorBuiltins, - defaultElementType: paragraphElementType, - addEditorBuiltins: editor => editor, - }) - - const { normalizeNode } = editor - Object.assign(editor, { - insertBreak: () => { - Transforms.insertText(editor, '\n') - }, - normalizeNode: (nodeEntry: NodeEntry) => { - const [node, path] = nodeEntry - if (path.length === 0 && SlateElement.isAncestor(node)) { - // Enforce that there's exactly one child and that it's - if (node.children.length > 1) { - return Editor.withoutNormalizing(editor, () => { - const targetPath = [0, (editor.children[0] as SlateElement).children.length] - Transforms.moveNodes(editor, { - at: [1], - to: targetPath, - }) - Transforms.unwrapNodes(editor, { at: targetPath }) - }) - } - if (SlateElement.isElement(node.children[0]) && !editor.isDefaultElement(node.children[0])) { - return Editor.withoutNormalizing(editor, () => { - Transforms.wrapNodes(editor, editor.createDefaultElement([{ text: '' }]), { - at: path, - }) - Transforms.unwrapNodes(editor, { at: [0, 0] }) - }) - } - } - if (Editor.isBlock(editor, node) && path.length > 1) { - return Transforms.unwrapNodes(editor, { at: path }) - } - normalizeNode(nodeEntry) - }, - }) - - return editor - }) - - const valueNodes = useRichTextFieldNodes({ - editor, - fieldAccessor, - contemberFieldElementCache, - }) - - const serialize = editor.serializeNodes - const onChange = useCallback( - (value: Descendant[]) => { - getParent().batchUpdates(getAccessor => { - const fieldAccessor = getAccessor().getRelativeSingleField(desugaredField) - - if (SlateNode.string({ type: 'dummy', children: value }) === '' && fieldAccessor.valueOnServer === null) { - fieldAccessor.updateValue(null) - return - } - - if (SlateElement.isElement(value[0])) { - fieldAccessor.updateValue(serialize(value[0].children)) - contemberFieldElementCache.set(getAccessor().getRelativeSingleField(desugaredField), value as SlateElement[]) - } - }) - }, - [getParent, contemberFieldElementCache, desugaredField, serialize], - ) - - return ( - - - - - - - - ) - }, - props => ( - <> - - {props.label} - {props.labelDescription} - {props.description} - - ), - 'RichTextField', -) - -const RB = RichEditor.buttons -const defaultInlineButtons: HoveringToolbarsProps['inlineButtons'] = [ - [RB.bold, RB.italic, RB.underline, RB.anchor], - [RB.strikeThrough, RB.code], -] diff --git a/packages/admin/src/components/bindingFacade/richText/RichTextField/index.ts b/packages/admin/src/components/bindingFacade/richText/RichTextField/index.ts deleted file mode 100644 index 2817462bf4..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/RichTextField/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './RichTextField' diff --git a/packages/admin/src/components/bindingFacade/richText/RichTextField/useRichTextFieldNodes.ts b/packages/admin/src/components/bindingFacade/richText/RichTextField/useRichTextFieldNodes.ts deleted file mode 100644 index 3069f4526e..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/RichTextField/useRichTextFieldNodes.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { BindingError, FieldAccessor } from '@contember/react-binding' -import { Descendant, Editor } from 'slate' - -export interface UseRichTextFieldEditorNodeOptions { - editor: Editor - fieldAccessor: FieldAccessor - contemberFieldElementCache: WeakMap, Descendant[]> -} - -export const useRichTextFieldNodes = ({ - editor, - fieldAccessor, - contemberFieldElementCache, -}: UseRichTextFieldEditorNodeOptions): Descendant[] => { - if (contemberFieldElementCache.has(fieldAccessor)) { - return contemberFieldElementCache.get(fieldAccessor)! - } - - const fieldValue = fieldAccessor.value - if (typeof fieldValue !== 'string' && fieldValue !== null) { - throw new BindingError(`RichTextField: the underlying field does not contain a string value.`) - } - - const elements: Descendant[] = - fieldValue === null || fieldValue === '' - ? [editor.createDefaultElement([{ text: '' }])] - : [ - editor.createDefaultElement( - editor.deserializeNodes( - fieldValue, - `RichTextField: the underlying field contains invalid JSON.`, - ) as Descendant[], - ), - ] - contemberFieldElementCache.set(fieldAccessor, elements) - - return elements -} diff --git a/packages/admin/src/components/bindingFacade/richText/baseEditor/BlockElement.tsx b/packages/admin/src/components/bindingFacade/richText/baseEditor/BlockElement.tsx deleted file mode 100644 index 097aeb1d0c..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/baseEditor/BlockElement.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import { EditorBlockBoundary } from '@contember/ui' -import { memo } from 'react' -import { ReactEditor, RenderElementProps, useSlateStatic } from 'slate-react' -import { useMessageFormatter } from '@contember/react-i18n' -import { ContemberEditor } from '../ContemberEditor' -import { editorDictionary } from './editorDictionary' - -export interface BlockElementProps extends RenderElementProps { - domElement?: keyof JSX.IntrinsicElements - withBoundaries?: boolean -} - -export const BlockElement = memo(function BlockElement({ - element, - children, - attributes, - domElement = 'div', - withBoundaries = false, -}: BlockElementProps) { - const editor = useSlateStatic() - const dataAttributes = ContemberEditor.getElementDataAttributes(element) - const El = domElement as 'div' - const formatter = useMessageFormatter(editorDictionary) - - return ( - - {withBoundaries && ( - { - const elementPath = ReactEditor.findPath(editor, element) - editor.insertBetweenBlocks([element, elementPath], 'before') - }} - /> - )} - {children} - {withBoundaries && ( - { - const elementPath = ReactEditor.findPath(editor, element) - editor.insertBetweenBlocks([element, elementPath], 'after') - }} - /> - )} - - ) -}) diff --git a/packages/admin/src/components/bindingFacade/richText/baseEditor/CustomElementPlugin.ts b/packages/admin/src/components/bindingFacade/richText/baseEditor/CustomElementPlugin.ts deleted file mode 100644 index 6ee4cf9a12..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/baseEditor/CustomElementPlugin.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Editor, Element, Path } from 'slate' -import { FunctionComponent } from 'react' -import { RenderElementProps } from 'slate-react' - -export interface CustomElementPlugin { - type: T['type'] - render: FunctionComponent & { element: T }> - normalizeNode?: (args: { element: T, path: Path, editor: Editor, preventDefault: () => void }) => void - isActive?: (args: { editor: Editor, suchThat?: Partial }) => boolean - isInline?: boolean - isVoid?: boolean | ((args: { element: T, editor: Editor }) => boolean) - canContainAnyBlocks?: boolean - toggleElement?: (args: { editor: Editor, suchThat?: Partial }) => void - acceptsAttributes?: (args: { editor: Editor, suchThat: Partial }) => boolean -} diff --git a/packages/admin/src/components/bindingFacade/richText/baseEditor/CustomMarkPlugin.ts b/packages/admin/src/components/bindingFacade/richText/baseEditor/CustomMarkPlugin.ts deleted file mode 100644 index 453c23607f..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/baseEditor/CustomMarkPlugin.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { FunctionComponent } from 'react' -import { RenderLeafProps } from 'slate-react' -import { HtmlDeserializerPlugin } from './html' - -export interface CustomMarkPlugin { - type: string - isHotKey: (e: KeyboardEvent) => boolean - render: FunctionComponent -} - -export const createMarkHtmlDeserializer = (markType: string, tagMatcher: (el: HTMLElement) => boolean, attributeMatcher: (el: HTMLElement) => boolean): HtmlDeserializerPlugin => ({ - processAttributesPaste: ({ element, cumulativeTextAttrs: cta }) => { - return attributeMatcher(element) ? { ...cta, [markType]: true } : cta - }, - processInlinePaste: ({ element, next, cumulativeTextAttrs }) => { - if (tagMatcher(element)) { - return next(element.childNodes, { ...cumulativeTextAttrs, [markType]: true }) - } - return null - }, -}) diff --git a/packages/admin/src/components/bindingFacade/richText/baseEditor/DefaultElement.tsx b/packages/admin/src/components/bindingFacade/richText/baseEditor/DefaultElement.tsx deleted file mode 100644 index 31ba98d4c3..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/baseEditor/DefaultElement.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { createElement, FunctionComponent } from 'react' -import { RenderElementProps, useSlateStatic } from 'slate-react' - -export interface DefaultElementProps extends RenderElementProps {} - -export const DefaultElement: FunctionComponent = ({ attributes, children, element }) => { - const editor = useSlateStatic() - - return createElement(editor.isInline(element) ? 'span' : 'div', attributes, children) -} -DefaultElement.displayName = 'DefaultElement' diff --git a/packages/admin/src/components/bindingFacade/richText/baseEditor/EditableCanvas.tsx b/packages/admin/src/components/bindingFacade/richText/baseEditor/EditableCanvas.tsx deleted file mode 100644 index 0d0065366c..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/baseEditor/EditableCanvas.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import { useClassName } from '@contember/react-utils' -import { EventHandler, KeyboardEvent, KeyboardEventHandler, MouseEvent, ReactElement, useCallback, useRef } from 'react' -import { Path, Transforms } from 'slate' -import { Editable, useSlate } from 'slate-react' -import { EditorWithBlocks } from '../blockEditor' - -type EditableProps = typeof Editable extends (p: infer P) => any ? P : never - -export interface EditableCanvasProps extends EditableProps { - leading?: ReactElement - trailing?: ReactElement -} - -export const EditableCanvas = ({ leading, trailing, className, ...editableProps }: EditableCanvasProps) => { - const editor = useSlate() as EditorWithBlocks - const pathRef = useRef(undefined) - - const handleSlateNodeChange: EventHandler | KeyboardEvent> = useCallback(event => { - pathRef.current = editor.selection?.anchor.path - }, [editor]) - - const handleCapturedMouseDown: EventHandler> = useCallback(event => { - if (event.target instanceof HTMLElement) { - const slateNode = event.target.dataset.slateNode - - if (slateNode === 'value' && pathRef.current) { - Transforms.deselect(editor) - event.stopPropagation() - event.preventDefault() - } - } - }, [editor]) - - const handleCapturedKeyDown: KeyboardEventHandler = useCallback(event => { - if (event.key === 'Escape') { - Transforms.deselect(editor) - event.stopPropagation() - event.preventDefault() - } - }, [editor]) - - return ( -
- {leading} - - {trailing} -
- ) -} diff --git a/packages/admin/src/components/bindingFacade/richText/baseEditor/EditorPasteUtils.ts b/packages/admin/src/components/bindingFacade/richText/baseEditor/EditorPasteUtils.ts deleted file mode 100644 index 13846a98de..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/baseEditor/EditorPasteUtils.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Element } from 'slate' -import { NodesWithType } from './html' -import { EditorDefaultElementFactory } from './EditorWithEssentials' - -export class EditorPasteUtils { - public static wordPasteListItemContent(allNodes: Iterable | ArrayLike): Node[] { - const nodes: Node[] = [] - let ignoring = false - let forProcessing = Array.from(allNodes) - if ( - (forProcessing.length === 1 && forProcessing[0].nodeName === 'SPAN') || - (forProcessing.length === 2 && forProcessing[0].nodeName === 'SPAN' && forProcessing[1].nodeName === 'O:P') - ) { - forProcessing = Array.from(forProcessing[0].childNodes) - } - - for (const node of forProcessing) { - const isStartIgnore = node.nodeType === Node.COMMENT_NODE && node.nodeValue === '[if !supportLists]' - if (isStartIgnore) { - ignoring = true - } else { - const isEndIgnore = node.nodeType === Node.COMMENT_NODE && node.nodeValue === '[endif]' - if (isEndIgnore) { - ignoring = false - } else { - if (!ignoring) { - nodes.push(node) - } - } - } - } - return nodes - } - - public static flattenNodesWithType(withType: NodesWithType[], defaultElementFactory: EditorDefaultElementFactory): NodesWithType { - const withTypeFiltered = withType.filter((item): item is Exclude => item !== null) - const containsBlock = withTypeFiltered.find(({ elements }) => elements !== undefined) !== undefined - - if (containsBlock) { - return { - elements: withTypeFiltered.flatMap(item => { - if (item.elements === undefined) { - return [defaultElementFactory(item.texts)] - } else { - return item.elements - } - }), - } - } else { - return { texts: withTypeFiltered.flatMap(item => item.texts!) } - } - } -} diff --git a/packages/admin/src/components/bindingFacade/richText/baseEditor/EditorWithEssentials.ts b/packages/admin/src/components/bindingFacade/richText/baseEditor/EditorWithEssentials.ts deleted file mode 100644 index 9e233a9e42..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/baseEditor/EditorWithEssentials.ts +++ /dev/null @@ -1,57 +0,0 @@ -import type { FocusEvent as ReactFocusEvent, KeyboardEvent as ReactKeyboardEvent, ReactElement } from 'react' -import type { - BaseEditor, - Descendant, - Editor, - Element as SlateElement, - Node as SlateNode, - NodeEntry, - Text as SlateText, -} from 'slate' -import type { RenderElementProps, RenderLeafProps } from 'slate-react' -import type { TextSpecifics } from './Node' -import { CustomElementPlugin } from './CustomElementPlugin' -import { CustomMarkPlugin } from './CustomMarkPlugin' -import { HtmlDeserializer } from './html' - -export type EditorDefaultElementFactory = (children: Descendant[]) => SlateElement; - -export interface WithEssentials { - formatVersion: number - defaultElementType: string - isDefaultElement: (element: SlateElement) => boolean - createDefaultElement: EditorDefaultElementFactory - insertBetweenBlocks: (blockEntry: NodeEntry, edge: 'before' | 'after') => void - - canToggleMarks: (marks: TextSpecifics) => boolean - hasMarks: (marks: TextSpecifics) => boolean - toggleMarks: (marks: TextSpecifics) => void - - canToggleElement: (elementType: E['type'], suchThat?: Partial) => boolean - isElementActive: (elementType: E['type'], suchThat?: Partial) => boolean - toggleElement: (elementType: E['type'], suchThat?: Partial) => void - acceptsAttributes: (elementType: E['type'], suchThat: Partial) => boolean - - canContainAnyBlocks: (element: SlateElement | Editor) => boolean - - serializeNodes: (nodes: Array, errorMessage?: string) => string - deserializeNodes: (serializedNodes: string, errorMessage?: string) => Array - - upgradeFormatBySingleVersion: (node: SlateNode, oldVersion: number) => SlateNode - - registerElement: (plugin: CustomElementPlugin) => void - registerMark: (plugin: CustomMarkPlugin) => void - - htmlDeserializer: HtmlDeserializer - - // props - renderElement: (props: RenderElementProps) => ReactElement - renderLeaf: (props: RenderLeafProps) => ReactElement - renderLeafChildren: (props: Omit) => ReactElement - onDOMBeforeInput: (event: Event) => void - onKeyDown: (event: ReactKeyboardEvent) => void - onFocus: (event: ReactFocusEvent) => void - onBlur: (event: ReactFocusEvent) => void -} - -export type EditorWithEssentials = WithEssentials & E diff --git a/packages/admin/src/components/bindingFacade/richText/baseEditor/Node.ts b/packages/admin/src/components/bindingFacade/richText/baseEditor/Node.ts deleted file mode 100644 index 3814acc52b..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/baseEditor/Node.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { Element as SlateElement, Text as SlateText } from 'slate' - -export interface SerializableEditorNode { - formatVersion: number - children: Array -} - -export type TextSpecifics = Omit diff --git a/packages/admin/src/components/bindingFacade/richText/baseEditor/createEditorWithEssentials.tsx b/packages/admin/src/components/bindingFacade/richText/baseEditor/createEditorWithEssentials.tsx deleted file mode 100644 index 8408af7324..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/baseEditor/createEditorWithEssentials.tsx +++ /dev/null @@ -1,230 +0,0 @@ -import { createElement, isValidElement, ReactElement } from 'react' -import { - createEditor, - Descendant, - Editor, - Element as SlateElement, - Path, - Range as SlateRange, - Text as SlateText, - Transforms, -} from 'slate' -import { withHistory } from 'slate-history' -import { ReactEditor, withReact } from 'slate-react' -import { ContemberEditor } from '../ContemberEditor' -import { DefaultElement } from './DefaultElement' -import type { TextSpecifics } from './Node' -import { overrideDeleteBackward, withPaste } from './overrides' -import { CustomElementPlugin } from './CustomElementPlugin' -import { CustomMarkPlugin } from './CustomMarkPlugin' - -export const createEditorWithEssentials = (defaultElementType: string): Editor => { - const underlyingEditor = withHistory(withReact(createEditor() as ReactEditor)) - - const editor = underlyingEditor as unknown as Editor - const { normalizeNode, isInline, isVoid } = editor - - const elements = new Map>() - const marks = new Map() - - Object.assign>(editor, { - formatVersion: 1, - defaultElementType, - isDefaultElement: element => 'type' in element && (element as any).type === defaultElementType, - createDefaultElement: children => ({ - type: defaultElementType, - children, - }), - insertBetweenBlocks: ([element, path], edge) => { - const edgeOffset = edge === 'before' ? 0 : 1 - const targetPath = path.slice(0, -1).concat(path[path.length - 1] + edgeOffset) - Transforms.insertNodes(editor, editor.createDefaultElement([{ text: '' }]), { - at: targetPath, - select: true, - }) - }, - - canToggleMarks: () => true, - canToggleElement: () => true, - - hasMarks: (marks: TextSpecifics) => ContemberEditor.hasMarks(editor, marks), - - // TODO in the following function, we need to conditionally trim the selection so that it doesn't potentially - // include empty strings at the edges of top-level elements. - isElementActive: (elementType: E['type'], suchThat?: Partial) => { - return ( - elements.get(elementType)?.isActive?.({ editor, suchThat }) - ?? Array.from(Editor.nodes(editor, { - match: node => SlateElement.isElement(node) && ContemberEditor.isElementType(node, elementType, suchThat), - voids: false, - })).length > 0 - ) - }, - - acceptsAttributes: (elementType: E['type'], suchThat: Partial) => { - return elements.get(elementType)?.acceptsAttributes?.({ editor, suchThat }) ?? false - }, - - toggleMarks: (marks: TextSpecifics) => { - if (!editor.canToggleMarks(marks)) { - return - } - const isActive = editor.hasMarks(marks) - if (isActive) { - ContemberEditor.removeMarks(editor, marks) - return false - } - ContemberEditor.addMarks(editor, marks) - return true - }, - toggleElement: (elementType: E['type'], suchThat?: Partial) => { - elements.get(elementType)?.toggleElement?.({ - editor, - suchThat, - }) - }, - - isInline: element => { - return elements.get(element.type)?.isInline ?? isInline(element) - }, - - isVoid: element => { - const elIsVoid = elements.get(element.type)?.isVoid - if (elIsVoid === undefined) { - return isVoid(element) - } - if (typeof elIsVoid === 'boolean') { - return elIsVoid - } - return elIsVoid({ editor, element }) - }, - - canContainAnyBlocks: element => { - if (Editor.isEditor(element)) { - return true - } - return !editor.isInline(element) - && !editor.isVoid(element) - && (elements.has(element.type) ? elements.get(element.type)!.canContainAnyBlocks ?? false : true) - }, - - serializeNodes: (nodes, errorMessage) => ContemberEditor.serializeNodes(editor, nodes, errorMessage), - deserializeNodes: (serializedNodes, errorMessage) => - ContemberEditor.permissivelyDeserializeNodes(editor, serializedNodes, errorMessage), - - upgradeFormatBySingleVersion: (node, oldVersion) => { - if (SlateElement.isElement(node)) { - return { - ...node, - children: node.children.map(child => editor.upgradeFormatBySingleVersion(child, oldVersion) as Descendant), - } - } - return node - }, - - renderElement: props => { - return createElement(elements.get(props.element.type)?.render ?? DefaultElement, props) - }, - - renderLeafChildren: props => props.children, - - renderLeaf: props => { - let el: ReactElement = createElement('span', props.attributes, editor.renderLeafChildren(props)) - for (const [, mark] of marks) { - if (props.leaf[mark.type] === true) { - const markerEl = mark.render({ ...props, children: el }) - if (markerEl !== null) { - if (!isValidElement(markerEl)) { - throw new Error(`Mark plugin ${mark.type} returned a non-React element`) - } - el = markerEl - } - } - } - return el - }, - - // Just noop functions so that other plugins can safely bubble-call - onDOMBeforeInput: () => {}, - onKeyDown: e => { - for (const [, mark] of marks) { - if (mark.isHotKey(e.nativeEvent)) { - editor.toggleMarks({ [mark.type]: true }) - e.preventDefault() - return - } - } - - - // Inline void nodes cannot be deleted by default: https://github.com/ianstormtaylor/slate/issues/3456 - // This is a hack to get around this issue. The problem is that when an inline void node is selected, Slate's - // beforeInput handler doesn't get triggered. However, when we put the caret right after the inline void - // and press Backspace (or the other way around with Delete), it works just fine. Furthermore, if we deleted the - // node directly, either we'd lose the selection state or Slate, not knowing about us deleting, would still - // try to delete things on its own so as to respond to the user interaction. So we take advantage of this and - // instead of deleting the void node, we just carefully move the selection and have Slate do the deleting. - if (e.key !== 'Delete' && e.key !== 'Backspace') { - return - } - const selection = editor.selection - - if (selection && SlateRange.isCollapsed(selection)) { - const voidEntry = Editor.void(editor, { - at: selection, - mode: 'lowest', - voids: true, - }) - if (!voidEntry) { - return - } - const [node, nodePath] = voidEntry - if (editor.isInline(node)) { - const adjacentPoint = - e.key === 'Backspace' - ? Editor.point(editor, Path.next(nodePath), { - edge: 'start', - }) - : Editor.point(editor, Path.previous(nodePath), { - edge: 'end', - }) - Transforms.select(editor, adjacentPoint) - } - } - }, - onFocus: () => {}, - onBlur: () => {}, - normalizeNode: ([node, path]) => { - if (Editor.isEditor(node) && node.children.length === 0) { - Transforms.insertNodes(editor, editor.createDefaultElement([{ text: '' }])) - } - if (!SlateElement.isElement(node)) { - normalizeNode([node, path]) - return - } - let defaultPrevented = false - elements.get(node.type)?.normalizeNode?.({ - element: node, - path, - editor, - preventDefault: () => { - defaultPrevented = true - }, - }) - if (!defaultPrevented) { - normalizeNode([node, path]) - } - }, - registerElement: plugin => { - elements.set(plugin.type, plugin) - }, - registerMark: plugin => { - marks.set(plugin.type, plugin) - }, - }) - - overrideDeleteBackward(editor) - - withPaste(editor) - - return editor -} diff --git a/packages/admin/src/components/bindingFacade/richText/baseEditor/editorDictionary.ts b/packages/admin/src/components/bindingFacade/richText/baseEditor/editorDictionary.ts deleted file mode 100644 index 85887af2f7..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/baseEditor/editorDictionary.ts +++ /dev/null @@ -1,9 +0,0 @@ -export const editorDictionary = { - editorBlock: { - editorBlockBoundary: { - newParagraph: 'New paragraph', - }, - }, -} - -export type EditorDictionary = typeof editorDictionary diff --git a/packages/admin/src/components/bindingFacade/richText/baseEditor/html/HtmlDeserializer.ts b/packages/admin/src/components/bindingFacade/richText/baseEditor/html/HtmlDeserializer.ts deleted file mode 100644 index 404cfb6191..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/baseEditor/html/HtmlDeserializer.ts +++ /dev/null @@ -1,180 +0,0 @@ -import { Descendant, Element as SlateElement, Text as SlateText } from 'slate' -import { HtmlDeserializerNextCallback, HtmlDeserializerPlugin } from './HtmlDeserializerPlugin' -import { EditorDefaultElementFactory } from '../EditorWithEssentials' - -const ignoredElements = ['SCRIPT', 'STYLE', 'TEMPLATE'] - -export interface TextAttrs { - [key: string]: any -} - -export type NodesWithTypeFiltered = - | { texts: Descendant[]; elements?: undefined } - | { elements: SlateElement[]; texts?: undefined } - -export type NodesWithType = NodesWithTypeFiltered | null - -export class HtmlDeserializer { - constructor( - public createDefaultElement: EditorDefaultElementFactory, - private plugins: HtmlDeserializerPlugin[], - ) { - } - - registerPlugin(plugin: HtmlDeserializerPlugin, prepend: boolean = true) { - prepend ? this.plugins.unshift(plugin) : this.plugins.push(plugin) - } - - public processNodeListPaste(nodeList: Node[], cumulativeTextAttrs: TextAttrs) { - for (const plugin of this.plugins) { - const result = plugin.processNodeListPaste?.({ nodeList, cumulativeTextAttrs, deserializer: this }) ?? null - if (result !== null) { - return result - } - } - const processed: ( - | { text: SlateText | SlateElement; element?: undefined; isWhiteSpace: boolean } - | { element: SlateElement; text?: undefined } - )[] = [] - - for (const childNode of nodeList) { - const isWhiteSpace = childNode.nodeType === Node.TEXT_NODE && childNode.textContent?.match(/^\s*$/) !== null - - // Block - const attrs = this.processWithAttributeProcessor(childNode, cumulativeTextAttrs) - const result = - childNode instanceof HTMLElement - ? this.processBlockPaste( - childNode, - cumulativeTextAttrs, - ) - : null - if (result !== null) { - processed.push(...(Array.isArray(result) ? result : [result]).map(element => ({ element }))) - } else { - // Inline - const result = this.deserializeTextNode(childNode, cumulativeTextAttrs) - if (result !== null) { - processed.push(...result.map(text => ({ text, isWhiteSpace }))) - } else { - // Unknown element - const deserializedChildren = this.processNodeListPaste( - Array.from(childNode.childNodes), - attrs, - ) - processed.push( - ...(deserializedChildren === null - ? [] - : deserializedChildren.texts !== undefined - ? deserializedChildren.texts.map(text => ({ text, isWhiteSpace })) - : deserializedChildren.elements.map(element => ({ element }))), - ) - } - } - } - - if (processed.length === 0) { - return null - } - - const containsBlock = processed.find(({ element }) => element !== undefined) !== undefined - - if (containsBlock) { - return { - elements: processed.flatMap(item => { - if (item.text !== undefined) { - return item.isWhiteSpace ? [] : [this.createDefaultElement([item.text])] - } else if (item.element !== undefined) { - return [item.element] - } - { - return [] - } - }), - } - } else { - return { texts: processed.map(item => item.text as SlateText) } - } - } - - deserializeInline(list: NodeList | Node[], cumulativeTextAttrs: TextAttrs): Descendant[] { - return Array.from(list).flatMap(childNode => { - const result = this.deserializeTextNode(childNode, cumulativeTextAttrs) - if (result !== null) { - return result - } else { - const attrs = this.processWithAttributeProcessor(childNode, cumulativeTextAttrs) - return this.deserializeInline(childNode.childNodes, attrs) - } - }) - } - - deserializeBlocks(list: Node[], cumulativeTextAttrs: TextAttrs): Descendant[] { - const result = this.processNodeListPaste(list, cumulativeTextAttrs) - return result?.texts ?? result?.elements ?? [] - } - - - private deserializeTextNode(node: Node, cumulativeTextAttrs: TextAttrs): Descendant[] | null { - if (node.nodeType === Node.TEXT_NODE) { - const text = node.textContent ?? '' - return [{ ...cumulativeTextAttrs, text: text.replace(/[ \t]*(?:\r?\n[ \t]*)+/g, ' ') }] - } else if (node instanceof HTMLElement) { - const result = this.processInlinePaste( - node, - cumulativeTextAttrs, - ) - if (result !== null) { - return Array.isArray(result) ? result : [result] - } - } - - return null - } - - private processInlinePaste(element: HTMLElement, cumulativeTextAttrs: TextAttrs): (SlateElement | SlateText)[] | SlateElement | SlateText | null { - if (ignoredElements.includes(element.tagName)) { - return [] - } - if (element.tagName === 'BR') { - return { ...cumulativeTextAttrs, text: ' ' } - } - const next: HtmlDeserializerNextCallback = (list, cta) => { - const attrs = this.processWithAttributeProcessor(element, cta) - return this.deserializeInline(list, attrs) - } - for (const plugin of this.plugins) { - const result = plugin.processInlinePaste?.({ element, next, cumulativeTextAttrs, deserializer: this }) ?? null - if (result !== null) { - return result - } - } - return null - } - - private processWithAttributeProcessor(element: Node, cumulativeTextAttrs: TextAttrs): TextAttrs { - if (!(element instanceof HTMLElement)) { - return {} - } - return this.plugins.reduce( - (cta, plugin) => plugin.processAttributesPaste?.({ element, cumulativeTextAttrs, deserializer: this }) ?? cta, - cumulativeTextAttrs, - ) - } - - private processBlockPaste(element: HTMLElement, cumulativeTextAttrs: TextAttrs): SlateElement[] | SlateElement | null { - if (ignoredElements.includes(element.tagName)) { - return [] - } - const next: HtmlDeserializerNextCallback = (list, cta) => - this.deserializeBlocks(Array.from(list), { ...cumulativeTextAttrs, ...cta }) - - for (const plugin of this.plugins) { - const result = plugin.processBlockPaste?.({ element, next, cumulativeTextAttrs, deserializer: this }) ?? null - if (result !== null) { - return result - } - } - return null - } -} diff --git a/packages/admin/src/components/bindingFacade/richText/baseEditor/html/HtmlDeserializerPlugin.ts b/packages/admin/src/components/bindingFacade/richText/baseEditor/html/HtmlDeserializerPlugin.ts deleted file mode 100644 index 8c03c60721..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/baseEditor/html/HtmlDeserializerPlugin.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Descendant, Element as SlateElement } from 'slate' -import { HtmlDeserializer, NodesWithType, TextAttrs } from './HtmlDeserializer' - -export type HtmlDeserializerNextCallback = (children: NodeList | Node[], cumulativeTextAttrs: TextAttrs) => Descendant[]; - -export interface HtmlDeserializerPlugin { - processBlockPaste?: ( - args: { - deserializer: HtmlDeserializer, - element: HTMLElement, - next: HtmlDeserializerNextCallback, - cumulativeTextAttrs: TextAttrs, - } - ) => SlateElement[] | SlateElement | null - processInlinePaste?: ( - args: { - deserializer: HtmlDeserializer, - element: HTMLElement, - next: HtmlDeserializerNextCallback, - cumulativeTextAttrs: TextAttrs - } - ) => Descendant[] | Descendant | null - processAttributesPaste?: (args: { - deserializer: HtmlDeserializer, - element: HTMLElement, - cumulativeTextAttrs: TextAttrs, - }) => TextAttrs - processNodeListPaste?: (args: { - deserializer: HtmlDeserializer, - nodeList: Node[], - cumulativeTextAttrs: TextAttrs, - }) => NodesWithType -} diff --git a/packages/admin/src/components/bindingFacade/richText/baseEditor/html/index.ts b/packages/admin/src/components/bindingFacade/richText/baseEditor/html/index.ts deleted file mode 100644 index 0fa5ec7b1f..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/baseEditor/html/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './HtmlDeserializerPlugin' -export * from './HtmlDeserializer' diff --git a/packages/admin/src/components/bindingFacade/richText/baseEditor/index.ts b/packages/admin/src/components/bindingFacade/richText/baseEditor/index.ts deleted file mode 100644 index b041d571ec..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/baseEditor/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -export * from './BlockElement' -export * from './createEditorWithEssentials' -export * from './CustomElementPlugin' -export * from './CustomMarkPlugin' -export * from './DefaultElement' -export * from './editorDictionary' -export * from './EditorPasteUtils' -export * from './EditorWithEssentials' -export * from './html' -export * from './Node' -export * from './overrides' diff --git a/packages/admin/src/components/bindingFacade/richText/baseEditor/overrides/index.ts b/packages/admin/src/components/bindingFacade/richText/baseEditor/overrides/index.ts deleted file mode 100644 index 800933dd32..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/baseEditor/overrides/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './overrideDeleteBackward' -export * from './withPaste' diff --git a/packages/admin/src/components/bindingFacade/richText/baseEditor/overrides/overrideDeleteBackward.ts b/packages/admin/src/components/bindingFacade/richText/baseEditor/overrides/overrideDeleteBackward.ts deleted file mode 100644 index b327e77144..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/baseEditor/overrides/overrideDeleteBackward.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Editor, Element as SlateElement, Node as SlateNode, Range as SlateRange } from 'slate' - -export const overrideDeleteBackward = (editor: E) => { - const { deleteBackward } = editor - - editor.deleteBackward = unit => { - const selection = editor.selection - - if (selection && SlateRange.isCollapsed(selection)) { - const [node, nodePath] = Editor.node(editor, [selection.focus.path[0]]) - if (SlateElement.isElement(node) && SlateNode.string(node) === '') { - const previous = Editor.previous(editor, { - at: nodePath, - voids: true, - }) - - if (previous) { - const [previousNode] = previous - if (SlateElement.isElement(previousNode) && editor.isVoid(previousNode)) { - editor.apply({ - type: 'remove_node', - path: nodePath, - node, - }) - return - } - } - } - } - deleteBackward(unit) - } -} diff --git a/packages/admin/src/components/bindingFacade/richText/baseEditor/overrides/withPaste.ts b/packages/admin/src/components/bindingFacade/richText/baseEditor/overrides/withPaste.ts deleted file mode 100644 index f8bbba01ed..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/baseEditor/overrides/withPaste.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Editor as SlateEditor, Transforms } from 'slate' -import { HtmlDeserializer } from '../html' - -const ignoredElements = ['SCRIPT', 'STYLE', 'TEMPLATE'] - -export const withPaste: ( - editor: E, -) => asserts editor is E = editor => { - const { insertData } = editor - const htmlDeserializer = new HtmlDeserializer(editor.createDefaultElement, []) - editor.htmlDeserializer = htmlDeserializer - editor.insertData = data => { - if (data.getData('application/x-slate-fragment')) { - return insertData(data) - } - const html = data.getData('text/html') - if (!html) { - return insertData(data) - } - const document = new DOMParser().parseFromString(html, 'text/html') - const nodes = Array.from(document.body.childNodes) - const result = htmlDeserializer.deserializeBlocks(nodes, {}) - Transforms.insertFragment(editor, result) - } -} diff --git a/packages/admin/src/components/bindingFacade/richText/blockEditor/BlockEditor.tsx b/packages/admin/src/components/bindingFacade/richText/blockEditor/BlockEditor.tsx deleted file mode 100644 index f02194042f..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/blockEditor/BlockEditor.tsx +++ /dev/null @@ -1,425 +0,0 @@ -import { - BindingError, - Component, - Environment, - FieldValue, - HasMany, - SugaredField, - SugaredFieldProps, - SugaredRelativeEntityList, - useDesugaredRelativeSingleField, - useEnvironment, - VariableInputTransformer, -} from '@contember/react-binding' -import { emptyArray, noop, useReferentiallyStableCallback } from '@contember/react-utils' -import { EditorCanvas, EditorCanvasSize, FieldContainer, Scheme } from '@contember/ui' -import { Fragment, FunctionComponent, ReactElement, ReactNode, useCallback, useLayoutEffect, useMemo, useState } from 'react' -import { SortEnd } from 'react-sortable-hoc' -import { Range as SlateRange, Transforms } from 'slate' -import { Slate } from 'slate-react' -import { getDiscriminatedBlock, useNormalizedBlocks } from '../../blocks' -import { Repeater, SortableRepeaterContainer } from '../../collections' -import { SugaredDiscriminateBy, useDiscriminatedData } from '../../discrimination' -import { TextareaField } from '@contember/react-form-fields-ui' -import { shouldCancelStart } from '@contember/utilities' -import { createEditorWithEssentials } from '../baseEditor' -import { EditableCanvas } from '../baseEditor/EditableCanvas' -import type { CreateEditorPublicOptions } from '../editorFactory' -import { paragraphElementType } from '../plugins' -import { RichEditor } from '../RichEditor' -import { RichTextField } from '../RichTextField' -import { - HoveringToolbars, - HoveringToolbarsProps, - InitializeReferenceToolbarButton, - ToolbarButtonSpec, -} from '../toolbars' -import { BlockHoveringToolbarContents, BlockHoveringToolbarContentsProps } from './BlockHoveringToolbarContents' -import { EditorWithBlocks, initBlockEditor } from './editor' -import type { EmbedHandler } from './embed' -import type { FieldBackedElement } from './FieldBackedElement' -import { useCreateElementReference } from './references' -import { ReferencesProvider } from './references/ReferencesProvider' -import { useGetReferencedEntity } from './references/useGetReferencedEntity' -import { useInsertElementWithReference } from './references/useInsertElementWithReference' -import { SortedBlocksContext } from './state/SortedBlocksContext' -import { useBlockEditorState } from './state/useBlockEditorState' -import { ContentOutlet, ContentOutletProps, useEditorReferenceBlocks } from './templating' - -export interface BlockEditorProps extends SugaredRelativeEntityList, CreateEditorPublicOptions { - label?: ReactNode - placeholder?: string - contentField: SugaredFieldProps['field'] - sortableBy: SugaredFieldProps['field'] - children?: ReactNode - size?: EditorCanvasSize - - leadingFieldBackedElements?: FieldBackedElement[] - trailingFieldBackedElements?: FieldBackedElement[] - - referencesField?: SugaredRelativeEntityList | string - referenceDiscriminationField?: SugaredFieldProps['field'] - monolithicReferencesMode?: boolean - - embedReferenceDiscriminateBy?: SugaredDiscriminateBy - embedContentDiscriminationField?: SugaredFieldProps['field'] - embedHandlers?: Iterable - - showToolbarLabels?: BlockHoveringToolbarContentsProps['showLabels'] - toolbarScheme?: Scheme - - // TODO - inlineButtons?: HoveringToolbarsProps['inlineButtons'] - blockButtons?: BlockHoveringToolbarContentsProps['blockButtons'] - otherBlockButtons?: BlockHoveringToolbarContentsProps['otherBlockButtons'] -} - -const BlockEditorComponent: FunctionComponent = Component( - props => { - const environment = useEnvironment() - - assertStaticBlockEditorInvariants(props, environment) - - const { - contentField, - label, - placeholder, - sortableBy, - children, - size, - - leadingFieldBackedElements = emptyArray, - trailingFieldBackedElements = emptyArray, - - referencesField, - referenceDiscriminationField, - monolithicReferencesMode = false, - - embedReferenceDiscriminateBy, - embedContentDiscriminationField, - embedHandlers = emptyArray, - - toolbarScheme, - - inlineButtons = defaultInlineButtons, - blockButtons, - otherBlockButtons, - showToolbarLabels, - - plugins, - augmentEditor, - augmentEditorBuiltins, - - ...blockListProps - } = props - // const desugaredReferenceList = useDesugaredRelativeEntityList(referencesField) - const desugaredReferenceDiscriminationField = useDesugaredRelativeSingleField(referenceDiscriminationField) - const desugaredEmbedContentDiscriminationField = useDesugaredRelativeSingleField(embedContentDiscriminationField) - - - const editorReferenceBlocks = useEditorReferenceBlocks(children) - - // - - const discriminatedEmbedHandlers = useDiscriminatedData(embedHandlers) - const embedReferenceDiscriminant = useMemo(() => { - if (embedReferenceDiscriminateBy !== undefined) { - return VariableInputTransformer.transformValue(embedReferenceDiscriminateBy, environment) - } - return undefined - }, [embedReferenceDiscriminateBy, environment]) - const embedSubBlocks = useNormalizedBlocks( - embedReferenceDiscriminant !== undefined - ? getDiscriminatedBlock(editorReferenceBlocks, embedReferenceDiscriminant)?.datum.children - : undefined, // TODO this may crash - ) - - const [baseEditor] = useState(() => createEditorWithEssentials(paragraphElementType)) - const { nodes, onChange, sortedBlocksRef, refreshBlocks } = useBlockEditorState({ - editor: baseEditor, - blockList: blockListProps, - contentField, - sortableBy, - monolithicReferencesMode, - referencesField, - }) - const getReferencedEntity = useGetReferencedEntity({ - monolithicReferencesMode, - referencesField, - sortedBlocksRef, - }) - const createElementReference = useCreateElementReference({ - sortedBlocksRef, - monolithicReferencesMode, - referenceDiscriminationField, - referencesField, - refreshBlocks, - }) - const stableCreateElementReference = useReferentiallyStableCallback(createElementReference) - - const insertElementWithReference = useInsertElementWithReference({ - editor: baseEditor, - createElementReference: stableCreateElementReference, - }) - - const stableGetReferencedEntity = useReferentiallyStableCallback(getReferencedEntity) - const [editor] = useState(() => - initBlockEditor({ - editor: baseEditor, - augmentEditor, - augmentEditorBuiltins, - editorReferenceBlocks, - embedContentDiscriminationField: desugaredEmbedContentDiscriminationField, - embedHandlers: discriminatedEmbedHandlers, - embedReferenceDiscriminateBy: embedReferenceDiscriminant, - embedSubBlocks, - plugins, - referenceDiscriminationField: desugaredReferenceDiscriminationField, - createElementReferences: stableCreateElementReference, - getReferencedEntity: stableGetReferencedEntity, - insertElementWithReference, - })) - - - const shouldDisplayInlineToolbar = useCallback(() => { - const selection = baseEditor.selection - return !(!selection || SlateRange.isCollapsed(selection)) - }, [baseEditor]) - - - const leadingElements = useFieldBackedElementFields(leadingFieldBackedElements) - const trailingElements = useFieldBackedElementFields(trailingFieldBackedElements) - - const [_, setMeaninglessState] = useState(0) - useLayoutEffect(() => { - if (editor.children !== nodes && JSON.stringify(editor.children) !== JSON.stringify(nodes)) { - editor.children = nodes - // Force a re-render - setMeaninglessState(meaninglessState => meaninglessState + 1) - } - }, [nodes, editor]) - - - return ( - - - - { - Transforms.moveNodes(editor, { - at: [data.oldIndex], - to: [data.newIndex], - }) - }, [editor])} - shouldCancelStart={shouldCancelStart} - > - - { - e.preventDefault() - }), - placeholder: placeholder, - leading: leadingElements, - trailing: trailingElements, - }} - size={size ?? 'large'} - - > - {useMemo( - () => ( - - } - /> - ), - [blockButtons, editorReferenceBlocks, inlineButtons, otherBlockButtons, shouldDisplayInlineToolbar, showToolbarLabels, toolbarScheme], - )} - - - - - - - ) - }, - (props, environment) => { - assertStaticBlockEditorInvariants(props, environment) - - const embedHandlers = Array.from(props.embedHandlers || []) - - const inlineButtons: ToolbarButtonSpec[] = props.inlineButtons - ? ( - (Array.isArray(props.inlineButtons[0]) ? props.inlineButtons : [props.inlineButtons]) as ToolbarButtonSpec[][] - ).flat() - : emptyArray - - const references = !!(props.referencesField && props.referenceDiscriminationField) && ( - - {inlineButtons - .filter((button): button is InitializeReferenceToolbarButton => 'referenceContent' in button) - .map(({ referenceContent: Content }, i) => { - return ( - - ) - })} - - {props.children} - {props.embedContentDiscriminationField && ( - <> - - {embedHandlers.map((handler, i) => ( - {handler.staticRender(environment)} - ))} - - )} - - ) - - return ( - <> - {props.leadingFieldBackedElements?.map((item, i) => ( - 'element' in item ? {item.element} : - ))} - {props.trailingFieldBackedElements?.map((item, i) => ( - 'element' in item ? {item.element} : - ))} - - - - {!props.monolithicReferencesMode && references} - - {props.monolithicReferencesMode && references} - - ) - }, - 'BlockEditor', -) - -/** - * The `BlockEditor` component is the main component of the editor. It is responsible for rendering the content editor. - * - * @group Blocks and repeaters - */ -export const BlockEditor = Object.assign< - typeof BlockEditorComponent, - { - ContentOutlet: (props: ContentOutletProps) => ReactElement | null - // TextField: (props: TextFieldProps) => ReactElement | null - } ->(BlockEditorComponent, { - ContentOutlet, -}) - -const useFieldBackedElementFields = (elements: FieldBackedElement[]) => { - return <> - {elements.map((el, i) => { - if ('element' in el) { - return {el.element} - } - if (el.format === 'plainText') { - return ( - - ) - } - return - })} - -} - -const assertStaticBlockEditorInvariants = (props: BlockEditorProps, environment: Environment) => { - if (import.meta.env.DEV) { - //referencesField?: SugaredRelativeEntityList | string - //referenceDiscriminationField?: SugaredFieldProps['field'] - // - //embedReferenceDiscriminateBy?: SugaredDiscriminateBy - //embedContentDiscriminationField?: SugaredFieldProps['field'] - //embedHandlers?: Iterable - - if (props.referencesField !== undefined && props.referenceDiscriminationField === undefined) { - throw new BindingError( - `BlockEditor: missing the 'referenceDiscriminationField' prop. ` + - `Without it the editor cannot tell different kinds of references apart!`, - ) - } - if (props.referencesField === undefined && props.referenceDiscriminationField !== undefined) { - throw new BindingError( - `BlockEditor: supplied the 'referenceDiscriminationField' prop but missing 'referencesField'. ` + - `Either remove 'referenceDiscriminationField' to get rid of this error ` + - `or provide 'referencesField' to enable content references.`, - ) - } - if ( - props.referencesField !== undefined && - (props.embedReferenceDiscriminateBy === undefined || - props.embedContentDiscriminationField === undefined || - props.embedHandlers === undefined) && - (props.embedReferenceDiscriminateBy !== undefined || - props.embedContentDiscriminationField !== undefined || - props.embedHandlers !== undefined) - ) { - throw new BindingError( - `BlockEditor: trying to enable embeds without content references being enabled. In order to use embeds, ` + - `provide both the 'referenceDiscriminationField' as well as the 'referencesField' prop`, - ) - } - - if (props.embedReferenceDiscriminateBy !== undefined) { - if (props.embedContentDiscriminationField === undefined) { - throw new BindingError( - `BlockEditor: You enabled embed blocks by supplying the 'embedReferenceDiscriminateBy' prop but then ` + - `failed to also supply the 'embedContentDiscriminationField'. Without it, the editor would not be ` + - `able to distinguish between the kinds of embedded content.`, - ) - } - if (!props.embedHandlers || Array.from(props.embedHandlers).length === 0) { - throw new BindingError( - `BlockEditor: You enabled embed blocks by supplying the 'embedReferenceDiscriminateBy' prop but then ` + - `failed to also supply any embed handlers. Without them, the editor would not be able to ` + - `recognize any embedded content.`, - ) - } - } - } -} - -const RB = RichEditor.buttons -const defaultInlineButtons: HoveringToolbarsProps['inlineButtons'] = [ - [RB.bold, RB.italic, RB.underline, RB.anchor], - [RB.headingOne, RB.headingTwo], - [RB.strikeThrough, RB.code], -] diff --git a/packages/admin/src/components/bindingFacade/richText/blockEditor/BlockHoveringToolbarContents.tsx b/packages/admin/src/components/bindingFacade/richText/blockEditor/BlockHoveringToolbarContents.tsx deleted file mode 100644 index 35815b913c..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/blockEditor/BlockHoveringToolbarContents.tsx +++ /dev/null @@ -1,123 +0,0 @@ -import { BindingError, Environment, useEnvironment, VariableInputTransformer } from '@contember/react-binding' -import { EditorToolbar, EditorToolbarProps, IconSourceSpecification, ToolbarGroup } from '@contember/ui' -import { memo, MouseEvent as ReactMouseEvent, useMemo } from 'react' -import { useSlateStatic } from 'slate-react' -import { getDiscriminatedDatum, SugaredDiscriminateBy } from '../../discrimination' -import type { ElementSpecificToolbarButton } from '../toolbars' -import type { EditorWithBlocks } from './editor' -import { ReferenceElement, referenceElementType } from './elements' -import type { EditorReferenceBlocks } from './templating' - -export type BlockHoveringToolbarConfig = - & IconSourceSpecification - & { - title?: string - } - & ( - | { - discriminateBy: SugaredDiscriminateBy - } - | ElementSpecificToolbarButton - ) - -export interface BlockHoveringToolbarContentsProps { - editorReferenceBlocks: EditorReferenceBlocks - blockButtons?: BlockHoveringToolbarConfig[] | BlockHoveringToolbarConfig[][] - otherBlockButtons?: BlockHoveringToolbarConfig[] - showLabels?: EditorToolbarProps['showLabels'] -} - -function toToolbarGroups( - editorReferenceBlocks: EditorReferenceBlocks, - buttons: BlockHoveringToolbarContentsProps['blockButtons'], - environment: Environment, - editor: EditorWithBlocks, -): ToolbarGroup[] { - if (!buttons) { - return [] - } - - const sections = (Array.isArray(buttons[0]) ? buttons : [buttons]) as BlockHoveringToolbarConfig[][] - - return sections.map(section => { - return { - buttons: section.map(buttonProps => { - const { title, ...rest } = buttonProps - return { - label: title, - ...rest, - onClick: (e: ReactMouseEvent) => { - e.nativeEvent.preventDefault() - e.nativeEvent.stopPropagation() - - if ('discriminateBy' in buttonProps) { - const discriminateBy = VariableInputTransformer.transformValue(buttonProps.discriminateBy, environment) - const targetBlock = getDiscriminatedDatum(editorReferenceBlocks, discriminateBy) - - if (targetBlock === undefined) { - throw new BindingError( - `BlockEditor: Trying to insert a block discriminated by '${discriminateBy}' but no such block has been found!`, - ) - } - let insertedElement: Omit - - if (targetBlock.datum.template === undefined) { - insertedElement = { - type: referenceElementType, - children: [{ text: '' }], - } - } else { - insertedElement = { - type: referenceElementType, - children: [editor.createDefaultElement([{ text: '' }])], - } - } - - editor.insertElementWithReference(insertedElement, discriminateBy) - } else { - editor.toggleElement(buttonProps.elementType, buttonProps.suchThat) - } - }, - } - }), - } - }) -} - -export const BlockHoveringToolbarContents = memo(({ - editorReferenceBlocks, - blockButtons, - otherBlockButtons, - showLabels, - ...props -}: BlockHoveringToolbarContentsProps) => { - if (import.meta.env.DEV) { - const __exhaustiveCheck: Record = props - } - - const editor = useSlateStatic() as EditorWithBlocks - const environment = useEnvironment() - - const groups = useMemo(() => { - return toToolbarGroups(editorReferenceBlocks, blockButtons, environment, editor) - }, [editorReferenceBlocks, blockButtons, environment, editor]) - - const restGroups = useMemo(() => { - return otherBlockButtons - ? toToolbarGroups(editorReferenceBlocks, otherBlockButtons, environment, editor) - : undefined - }, [otherBlockButtons, editorReferenceBlocks, environment, editor]) - - if (!blockButtons || !blockButtons.length) { - return null - } - - return ( - - ) -}) -BlockHoveringToolbarContents.displayName = 'BlockHoveringToolbarContents' diff --git a/packages/admin/src/components/bindingFacade/richText/blockEditor/FieldBackedElement.ts b/packages/admin/src/components/bindingFacade/richText/blockEditor/FieldBackedElement.ts deleted file mode 100644 index 0a70bf330a..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/blockEditor/FieldBackedElement.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { SugarableRelativeSingleField } from '@contember/react-binding' -import { EditorCanvasDistinction, Size } from '@contember/ui' -import { ReactNode } from 'react' - -export interface RichTextFieldBackedElement { - field: string | SugarableRelativeSingleField - placeholder: string - format: 'richText' - distinction?: EditorCanvasDistinction -} - -export interface PlainTextFieldBackedElement { - field: string | SugarableRelativeSingleField - placeholder: string - format: 'plainText' - distinction?: EditorCanvasDistinction - size?: Size -} - -export interface CustomFieldBackedElement { - element: ReactNode -} - -export type FieldBackedElement = - | RichTextFieldBackedElement - | PlainTextFieldBackedElement - | CustomFieldBackedElement diff --git a/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/EditorWithBlocks.ts b/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/EditorWithBlocks.ts deleted file mode 100644 index db40f8aedc..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/EditorWithBlocks.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { EntityAccessor, FieldValue } from '@contember/react-binding' -import type * as Slate from 'slate' -import { Editor } from 'slate' - -export interface WithBlockElements { - slate: typeof Slate - - getReferencedEntity: (referenceId: string) => EntityAccessor - createElementReference: ( - targetPath: Slate.Path, - referenceDiscriminant: FieldValue, - initialize?: EntityAccessor.BatchUpdatesHandler, - ) => EntityAccessor - insertElementWithReference: ( - element: Omit, - referenceDiscriminant: FieldValue, - initialize?: EntityAccessor.BatchUpdatesHandler, - ) => void -} - -export type EditorWithBlocks = Editor & WithBlockElements diff --git a/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/index.ts b/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/index.ts deleted file mode 100644 index 04b3355f0b..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './EditorWithBlocks' -export * from './initBlockEditor' -export type { OverrideCreateElementReferenceOptions } from './overrideCreateElementReference' -export type { OverrideInsertDataOptions } from './overrideInsertData' -export type { OverrideInsertElementWithReferenceOptions } from './overrideInsertElementWithReference' diff --git a/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/initBlockEditor.ts b/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/initBlockEditor.ts deleted file mode 100644 index b6ffc9eb6a..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/initBlockEditor.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { BindingError } from '@contember/react-binding' -import * as Slate from 'slate' -import { Descendant, Editor, Element as SlateElement, Node as SlateNode } from 'slate' -import { CreateEditorPublicOptions, initializeEditor } from '../../editorFactory' -import { paragraphElementType } from '../../plugins' -import { createReferenceElementPlugin, ReferenceElementOptions } from '../elements' -import type { EditorWithBlocks } from './EditorWithBlocks' -import { overrideCreateElementReference, OverrideCreateElementReferenceOptions } from './overrideCreateElementReference' -import { overrideInsertBreak } from './overrideInsertBreak' -import { overrideInsertData, OverrideInsertDataOptions } from './overrideInsertData' -import { - overrideInsertElementWithReference, - OverrideInsertElementWithReferenceOptions, -} from './overrideInsertElementWithReference' -import { overrideInsertNode } from './overrideInsertNode' -import { overrideRenderElement } from './overrideRenderElement' - -export interface CreateEditorOptions - extends OverrideCreateElementReferenceOptions, - ReferenceElementOptions, - OverrideInsertDataOptions, - OverrideInsertElementWithReferenceOptions, - CreateEditorPublicOptions {} - -export const initBlockEditor = ({ editor, ...options }: CreateEditorOptions & { editor: Editor }) => { - if (options.plugins && options.plugins.indexOf(paragraphElementType) === -1) { - // TODO make this configurable and remove this? - throw new BindingError(`The block editor plugin set must include the paragraph plugin!`) - } - - return initializeEditor({ - editor, - plugins: options.plugins, - augmentEditor: options.augmentEditor, - augmentEditorBuiltins: options.augmentEditorBuiltins, - - addEditorBuiltins: editor => { - const e = editor as EditorWithBlocks - e.registerElement(createReferenceElementPlugin(options)) - - e.insertElementWithReference = () => { - throw new BindingError( - `BlockEditor: trying to insert a referenced element but referencing has not been correctly set up. ` + - `Check the BlockEditor props.`, - ) - } - e.getReferencedEntity = () => { - throw new BindingError( - `BlockEditor: trying to access a referenced entity but referencing has not been correctly set up. ` + - `Check the BlockEditor props.`, - ) - } - - const { upgradeFormatBySingleVersion } = e - e.upgradeFormatBySingleVersion = (node, oldVersion): SlateNode => { - if (oldVersion !== 0 || !SlateElement.isElement(node)) { - return upgradeFormatBySingleVersion(node, oldVersion) - } - if (node.type === 'embed' || node.type === 'blockReference' || node.type === 'blockVoidReference') { - return { - ...node, - type: 'reference', - children: node.children.map((child: any) => editor.upgradeFormatBySingleVersion(child, oldVersion) as Descendant), - } - } - return upgradeFormatBySingleVersion(node, oldVersion) - } - e.slate = Slate - - overrideCreateElementReference(e, options) - overrideInsertBreak(e, options) - overrideInsertData(e, options) - overrideInsertElementWithReference(e, options) - overrideInsertNode(e) - overrideRenderElement(e) - - return e - }, - }) -} diff --git a/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/overrideCreateElementReference.ts b/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/overrideCreateElementReference.ts deleted file mode 100644 index 4f60b6c370..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/overrideCreateElementReference.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { EditorWithBlocks } from './EditorWithBlocks' -import { CreateElementReferences } from '../references' - -export interface OverrideCreateElementReferenceOptions { - createElementReferences: CreateElementReferences -} - -export const overrideCreateElementReference = ( - editor: E, - options: OverrideCreateElementReferenceOptions, -) => { - const { - createElementReferences, - } = options - editor.createElementReference = (targetPath, referenceDiscriminant, initialize) => { - return createElementReferences(editor, targetPath, referenceDiscriminant, initialize) - } -} diff --git a/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/overrideInsertBreak.ts b/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/overrideInsertBreak.ts deleted file mode 100644 index 1acc426f09..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/overrideInsertBreak.ts +++ /dev/null @@ -1,51 +0,0 @@ -import type { EditorWithBlocks } from './EditorWithBlocks' -import { isInReferenceElement } from '../utils' -import { ContemberEditor } from '../../ContemberEditor' -import { isElementWithReference } from '../elements' -import { Editor, Transforms, Text, Element, Path as SlatePath } from 'slate' - -export interface OverrideInsertBreakOptions {} - -export const overrideInsertBreak = (editor: E, options: OverrideInsertBreakOptions) => { - const { insertBreak } = editor - - editor.insertBreak = () => { - const closestBlockEntry = ContemberEditor.closestBlockEntry(editor) - if (closestBlockEntry && isElementWithReference(closestBlockEntry[0])) { - const selection = editor.selection - const [, closestBlockPath] = closestBlockEntry - const [referenceStart, referenceEnd] = Editor.edges(editor, closestBlockPath) - - if (!selection) { - return - } - - return Editor.withoutNormalizing(editor, () => { - Transforms.wrapNodes(editor, editor.createDefaultElement([]), { - at: { - anchor: referenceStart, - focus: referenceEnd, - }, - match: node => Text.isText(node) || (Element.isElement(node) && editor.isInline(node)), - }) - - const relative = SlatePath.relative(selection.focus.path, closestBlockPath) - Transforms.splitNodes(editor, { - // The zero should be the newly created default element. - at: { - path: [...closestBlockPath, 0, ...relative], - offset: selection.focus.offset, - }, - always: true, - }) - }) - } - - // Do not split reference nodes - if (isInReferenceElement(editor)) { - return - } - - return insertBreak() - } -} diff --git a/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/overrideInsertData.ts b/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/overrideInsertData.ts deleted file mode 100644 index 19c81f68b9..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/overrideInsertData.ts +++ /dev/null @@ -1,100 +0,0 @@ -import type { FieldValue, RelativeSingleField } from '@contember/react-binding' -import { Descendant, Element as SlateElement, Node as SlateNode, Text } from 'slate' -import type { ResolvedDiscriminatedDatum } from '../../../discrimination' -import { ReferenceElement, referenceElementType } from '../elements' -import type { EmbedHandler, NormalizedEmbedHandlers } from '../embed' -import type { EditorWithBlocks } from './EditorWithBlocks' -import { parseUrl } from '../../utils' -import { EditorTransforms } from '../../slate-reexport' -import { isInReferenceElement } from '../utils' - -export interface OverrideInsertDataOptions { - embedHandlers: NormalizedEmbedHandlers | undefined - embedReferenceDiscriminateBy: FieldValue | undefined - embedContentDiscriminationField: RelativeSingleField | undefined -} - -export const overrideInsertData = (editor: E, options: OverrideInsertDataOptions) => { - let { insertData, insertFragment } = editor - - const stripNodeReferences = (nodes: SlateNode[]): SlateNode[] => - nodes.flatMap(node => { - if (Text.isText(node)) { - return node as SlateNode - } - if (SlateElement.isElement(node) && 'referenceId' in node) { - // Essentially unwrapping the node. - return stripNodeReferences((node as SlateElement).children) - } - return { - ...node, - children: stripNodeReferences(node.children), - } as Descendant - }) - - editor.insertFragment = fragment => { - insertFragment(stripNodeReferences(fragment)) - } - - editor.insertData = data => { - if (editor.selection && isInReferenceElement(editor)) { - const text = data.getData('text/plain').trim() - EditorTransforms.insertText(editor, text) - return // No splitting of references. We'd have to clone the reference and we don't know how to do that yet. - } - return insertData(data) - } - - const { embedReferenceDiscriminateBy, embedHandlers, embedContentDiscriminationField } = options - - if ( - embedReferenceDiscriminateBy === undefined || - embedHandlers === undefined || - embedContentDiscriminationField === undefined - ) { - return - } - - const insertEmbed = (embedHandler: ResolvedDiscriminatedDatum>, embedArtifacts: T, source: string) => { - const partialEmbedReference: Omit = { - type: referenceElementType, - children: [{ text: '' }], - } - - return editor.insertElementWithReference(partialEmbedReference, embedReferenceDiscriminateBy, getEmbedReference => { - getEmbedReference() - .getRelativeSingleField(embedContentDiscriminationField) - .updateValue(embedHandler!.discriminateBy) - const reference = getEmbedReference() - embedHandler!.datum.populateEmbedData({ - embedArtifacts, - source, - entity: reference, - }) - }) - } - - const insertDataEmbed = editor.insertData - editor.insertData = data => { - if (data.getData('application/x-slate-fragment')) { - return insertDataEmbed(data) - } - - const text = data.getData('text/plain').trim() - if (!text) { - return insertDataEmbed(data) - } - - const url = parseUrl(text) - - ;(async () => { - for (const [, handler] of options.embedHandlers!) { - const result = await handler.datum.handleSource(text, url) - if (result !== undefined) { - return insertEmbed(handler, result, text) - } - } - insertDataEmbed(data) - })() - } -} diff --git a/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/overrideInsertElementWithReference.ts b/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/overrideInsertElementWithReference.ts deleted file mode 100644 index 35aaa2c1ea..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/overrideInsertElementWithReference.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { EditorWithBlocks } from './EditorWithBlocks' -import { InsertElementWithReference } from '../references/useInsertElementWithReference' - -export interface OverrideInsertElementWithReferenceOptions { - insertElementWithReference: InsertElementWithReference -} - -export const overrideInsertElementWithReference = ( - editor: E, - { insertElementWithReference }: OverrideInsertElementWithReferenceOptions, -) => { - editor.insertElementWithReference = insertElementWithReference -} diff --git a/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/overrideInsertNode.ts b/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/overrideInsertNode.ts deleted file mode 100644 index 1a3d8ad0b6..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/overrideInsertNode.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Editor, Element as SlateElement, Transforms } from 'slate' -import type { EditorWithBlocks } from './EditorWithBlocks' -import { prepareElementForInsertion } from '../utils' - -export const overrideInsertNode = (editor: E) => { - const { insertNode } = editor - - editor.insertNode = node => { - if (!SlateElement.isElement(node)) { - return insertNode(node) - } - Editor.withoutNormalizing(editor, () => { - const preppedPath = prepareElementForInsertion(editor, node) - Transforms.insertNodes(editor, node, { - at: preppedPath, - }) - }) - } -} diff --git a/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/overrideRenderElement.tsx b/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/overrideRenderElement.tsx deleted file mode 100644 index 85c8f0833c..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/blockEditor/editor/overrideRenderElement.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import { Editor, Element } from 'slate' -import { ReferenceElementWrapper } from '../references/ReferenceElementWrapper' -import { isElementWithReference } from '../elements' -import { ErrorBoundary } from 'react-error-boundary' -import { ReactEditor, useSlateStatic } from 'slate-react' -import { SortableRepeaterItem, SortableRepeaterItemHandle } from '../../../collections' -import { DragHandle } from '../../../../ui' -import { EditorBlock } from '@contember/ui' -import { ReactNode, useContext } from 'react' -import { SortedBlocksContext } from '../state/SortedBlocksContext' - - -export const overrideRenderElement = (editor: Editor) => { - const { renderElement } = editor - - editor.renderElement = props => { - let children = renderElement(props) - const path = ReactEditor.findPath(editor, props.element) - if (isElementWithReference(props.element)) { - children = ( - Invalid element}> - {children} - - ) - } - if (path.length === 1) { - return {children} - } - return children - } -} - -const SortableBlock = ({ children, element }: { children: ReactNode, element: Element }) => { - const editor = useSlateStatic() - // intentionally passing through the context, so it redraws on order change - const sortedBlocks = useContext(SortedBlocksContext) - // intentionally finding path again and not passing from renderElement, because it might have changed - const [index] = ReactEditor.findPath(editor, element) - return ( - - }> - {children} - - - ) -} diff --git a/packages/admin/src/components/bindingFacade/richText/blockEditor/elements/ElementWithReference.ts b/packages/admin/src/components/bindingFacade/richText/blockEditor/elements/ElementWithReference.ts deleted file mode 100644 index 82ff300088..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/blockEditor/elements/ElementWithReference.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Element, Node, Text } from 'slate' -import { EntityId } from '@contember/react-binding' - -// This isn't necessarily meant to represent an actual element that will appear in the editor. -export interface ElementWithReference extends Element { - referenceId: EntityId -} - -export const isElementWithReference = (candidate: Node): candidate is ElementWithReference => { - return !Text.isText(candidate) && 'referenceId' in candidate && !!candidate.referenceId -} diff --git a/packages/admin/src/components/bindingFacade/richText/blockEditor/elements/ReferenceElement.tsx b/packages/admin/src/components/bindingFacade/richText/blockEditor/elements/ReferenceElement.tsx deleted file mode 100644 index 2e3a44b468..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/blockEditor/elements/ReferenceElement.tsx +++ /dev/null @@ -1,97 +0,0 @@ -import { Ancestor, Element, Node, Path } from 'slate' -import type { ElementWithReference } from './ElementWithReference' -import { CustomElementPlugin } from '../../baseEditor' -import { ReferenceElementRenderer } from '../renderers' -import { BindingError, EntityAccessor, EntityId, FieldValue, RelativeSingleField } from '@contember/react-binding' -import { getDiscriminatedDatum } from '../../../discrimination' -import { EditorReferenceBlocks } from '../templating' -import { NormalizedEmbedHandlers } from '../embed' -import { NormalizedBlocks } from '../../../blocks' -import { ReactEditor } from 'slate-react' - -export const referenceElementType = 'reference' as const - -export interface ReferenceElement extends ElementWithReference { - type: typeof referenceElementType -} - -export const isReferenceElement = (node: Node): node is ReferenceElement => - Element.isElement(node) && node.type === referenceElementType - -export interface ReferenceElementOptions { - referenceDiscriminationField: RelativeSingleField | undefined - editorReferenceBlocks: EditorReferenceBlocks - - embedHandlers: NormalizedEmbedHandlers | undefined - embedReferenceDiscriminateBy: FieldValue | undefined - embedContentDiscriminationField: RelativeSingleField | undefined - embedSubBlocks: NormalizedBlocks | undefined - getReferencedEntity: (path: Path, referenceId: EntityId) => EntityAccessor -} - -const findElementPathFallback = (parent: Ancestor, element: ReferenceElement): Path | undefined => { - for (const i in parent.children) { - const child = parent.children[i] - if (element === child) { - return [Number(i)] - } - if (Element.isAncestor(child)) { - const result = findElementPathFallback(child, element) - if (result !== undefined) { - return [Number(i), ...result] - } - } - } - return undefined -} - -export const createReferenceElementPlugin = (args: ReferenceElementOptions): CustomElementPlugin => { - return ({ - type: referenceElementType, - render: props => { - if (!args.referenceDiscriminationField) { - throw new Error() - } - return - }, - canContainAnyBlocks: true, - isVoid: ({ element, editor }) => { - if (args.referenceDiscriminationField === undefined) { - throw new BindingError() - } - const path = (() => { - try { - return ReactEditor.findPath(editor, element) - } catch (e) { - return findElementPathFallback(editor, element) - } - })() - if (!path) { - return false - } - let referencedEntity: EntityAccessor | undefined - try { - referencedEntity = args.getReferencedEntity(path, element.referenceId) - } catch (e) { - return false - } - const discriminationField = referencedEntity.getRelativeSingleField(args.referenceDiscriminationField) - const selectedReference = getDiscriminatedDatum(args.editorReferenceBlocks, discriminationField)?.datum - - if (selectedReference === undefined) { - throw new BindingError() - } - - return selectedReference.template === undefined - }, - // normalizeNode: ({ editor, element, path }) => { - // const referenceId = element.referenceId - // try { - // args.getReferencedEntity(path, referenceId) - // } catch { - // console.warn(`Removing a node linking a non-existent reference id '${referenceId}'.`) - // Transforms.delete(editor, { at: path }) - // } - // }, - }) -} diff --git a/packages/admin/src/components/bindingFacade/richText/blockEditor/elements/index.ts b/packages/admin/src/components/bindingFacade/richText/blockEditor/elements/index.ts deleted file mode 100644 index a09b6beef4..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/blockEditor/elements/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './ElementWithReference' -export * from './ReferenceElement' diff --git a/packages/admin/src/components/bindingFacade/richText/blockEditor/embed/core/EmbedHandler.ts b/packages/admin/src/components/bindingFacade/richText/blockEditor/embed/core/EmbedHandler.ts deleted file mode 100644 index 849df2c0aa..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/blockEditor/embed/core/EmbedHandler.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { EntityAccessor, Environment } from '@contember/react-binding' -import type { ReactNode } from 'react' -import type { NormalizedDiscriminatedData, SugaredDiscriminateBy } from '../../../../discrimination' - -export interface PopulateEmbedDataOptions { - source: string - embedArtifacts: EmbedArtifacts - entity: EntityAccessor -} - -export interface EmbedHandler { - debugName: string // Optional for error messages - - staticRender: (environment: Environment) => ReactNode - handleSource: (source: string, url: URL | undefined) => undefined | EmbedArtifacts | Promise - renderEmbed: () => ReactNode - populateEmbedData: (options: PopulateEmbedDataOptions) => void - discriminateBy: SugaredDiscriminateBy -} - -export type NormalizedEmbedHandlers = NormalizedDiscriminatedData diff --git a/packages/admin/src/components/bindingFacade/richText/blockEditor/embed/core/index.ts b/packages/admin/src/components/bindingFacade/richText/blockEditor/embed/core/index.ts deleted file mode 100644 index df921295ba..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/blockEditor/embed/core/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './EmbedHandler' diff --git a/packages/admin/src/components/bindingFacade/richText/blockEditor/embed/handlers/GoogleFormEmbedHandler.tsx b/packages/admin/src/components/bindingFacade/richText/blockEditor/embed/handlers/GoogleFormEmbedHandler.tsx deleted file mode 100644 index fea2c6745f..0000000000 --- a/packages/admin/src/components/bindingFacade/richText/blockEditor/embed/handlers/GoogleFormEmbedHandler.tsx +++ /dev/null @@ -1,95 +0,0 @@ -import { SugaredField, SugaredFieldProps, useField } from '@contember/react-binding' -import { memo, ReactNode } from 'react' -import type { SugaredDiscriminateBy } from '../../../../discrimination' -import type { EmbedHandler, PopulateEmbedDataOptions } from '../core' -import { parseIframeSrc, parseUrl } from '../../../utils' - -class GoogleFormEmbedHandler implements EmbedHandler { - public readonly debugName = 'GoogleForm' - public readonly discriminateBy: SugaredDiscriminateBy - - public constructor(private readonly options: GoogleFormEmbedHandler.Options) { - this.discriminateBy = options.discriminateBy - } - - public staticRender() { - return - } - - public handleSource(source: string, url: URL | undefined): undefined | string { - // This method deliberately biases towards the liberal and permissive. - if (!url) { - source = parseIframeSrc(source) ?? source - if (source.startsWith('docs.google.com')) { - source = `https://${source}` - } - url = parseUrl(source) - if (!url) { - return undefined - } - } - - if (!url.host.endsWith('docs.google.com')) { - return undefined - } - const matches = url.pathname.match(/^\/forms\/d(\/e)?\/([^\/]+).*$/) - - if (!matches) { - return undefined - } - if (matches[1] === undefined) { - alert( - this.options.nonEmbedLinkWarning ?? - 'Detected a Google Form but the link supplied cannot be reliably embedded.\n\n' + - "If you wish to embed the form, please return to Google Forms and use the 'Send' button in the top right corner to get a correct link.", - ) - return undefined - } - return matches[2] - - } - - public renderEmbed() { - if (this.options.render) { - return this.options.render() - } - return - } - - public populateEmbedData({ entity, embedArtifacts }: PopulateEmbedDataOptions) { - entity.getField(this.options.googleFormIdField).updateValue(embedArtifacts) - } -} - -namespace GoogleFormEmbedHandler { - export interface Options { - nonEmbedLinkWarning?: string - render?: () => ReactNode - googleFormIdField: SugaredFieldProps['field'] - discriminateBy: SugaredDiscriminateBy - } - - export interface RendererOptions { - googleFormIdField: SugaredFieldProps['field'] - } - - export const Renderer = memo(function GoogleFormRenderer(props: RendererOptions) { - const googleFormId = useField(props.googleFormIdField).value - - if (googleFormId === null) { - return null - } - return ( -