@strapi/content-manager 0.0.0-experimental.00b482b8dcda6164537baf70d52b4b2535560c36 → 0.0.0-experimental.04ef75fd65eee34386f1b1ce6b18736ba7b4ac0b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin/components/ConfigurationForm/Fields.js +4 -1
- package/dist/admin/components/ConfigurationForm/Fields.js.map +1 -1
- package/dist/admin/components/ConfigurationForm/Fields.mjs +5 -2
- package/dist/admin/components/ConfigurationForm/Fields.mjs.map +1 -1
- package/dist/admin/components/ConfigurationForm/Form.js +1 -1
- package/dist/admin/components/ConfigurationForm/Form.js.map +1 -1
- package/dist/admin/components/ConfigurationForm/Form.mjs +3 -3
- package/dist/admin/components/ConfigurationForm/Form.mjs.map +1 -1
- package/dist/admin/components/DragPreviews/CardDragPreview.js +3 -1
- package/dist/admin/components/DragPreviews/CardDragPreview.js.map +1 -1
- package/dist/admin/components/DragPreviews/CardDragPreview.mjs +3 -1
- package/dist/admin/components/DragPreviews/CardDragPreview.mjs.map +1 -1
- package/dist/admin/components/DragPreviews/ComponentDragPreview.js +3 -1
- package/dist/admin/components/DragPreviews/ComponentDragPreview.js.map +1 -1
- package/dist/admin/components/DragPreviews/ComponentDragPreview.mjs +3 -1
- package/dist/admin/components/DragPreviews/ComponentDragPreview.mjs.map +1 -1
- package/dist/admin/components/DragPreviews/RelationDragPreview.js +3 -1
- package/dist/admin/components/DragPreviews/RelationDragPreview.js.map +1 -1
- package/dist/admin/components/DragPreviews/RelationDragPreview.mjs +3 -1
- package/dist/admin/components/DragPreviews/RelationDragPreview.mjs.map +1 -1
- package/dist/admin/components/LeftMenu.js +87 -45
- package/dist/admin/components/LeftMenu.js.map +1 -1
- package/dist/admin/components/LeftMenu.mjs +89 -47
- package/dist/admin/components/LeftMenu.mjs.map +1 -1
- package/dist/admin/history/components/VersionHeader.js +1 -0
- package/dist/admin/history/components/VersionHeader.js.map +1 -1
- package/dist/admin/history/components/VersionHeader.mjs +1 -0
- package/dist/admin/history/components/VersionHeader.mjs.map +1 -1
- package/dist/admin/history/components/VersionsList.js +1 -1
- package/dist/admin/history/components/VersionsList.js.map +1 -1
- package/dist/admin/history/components/VersionsList.mjs +1 -1
- package/dist/admin/history/components/VersionsList.mjs.map +1 -1
- package/dist/admin/history/pages/History.js +7 -7
- package/dist/admin/history/pages/History.js.map +1 -1
- package/dist/admin/history/pages/History.mjs +7 -7
- package/dist/admin/history/pages/History.mjs.map +1 -1
- package/dist/admin/layout.js +27 -6
- package/dist/admin/layout.js.map +1 -1
- package/dist/admin/layout.mjs +28 -7
- package/dist/admin/layout.mjs.map +1 -1
- package/dist/admin/pages/EditView/EditViewPage.js +7 -3
- package/dist/admin/pages/EditView/EditViewPage.js.map +1 -1
- package/dist/admin/pages/EditView/EditViewPage.mjs +8 -4
- package/dist/admin/pages/EditView/EditViewPage.mjs.map +1 -1
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/EditorLayout.js +2 -2
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/EditorLayout.js.map +1 -1
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/EditorLayout.mjs +2 -2
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/EditorLayout.mjs.map +1 -1
- package/dist/admin/pages/EditView/components/FormInputs/Component/Repeatable.js +2 -1
- package/dist/admin/pages/EditView/components/FormInputs/Component/Repeatable.js.map +1 -1
- package/dist/admin/pages/EditView/components/FormInputs/Component/Repeatable.mjs +3 -2
- package/dist/admin/pages/EditView/components/FormInputs/Component/Repeatable.mjs.map +1 -1
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/ComponentCategory.js +1 -2
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/ComponentCategory.js.map +1 -1
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/ComponentCategory.mjs +1 -2
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/ComponentCategory.mjs.map +1 -1
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.js +2 -1
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.js.map +1 -1
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.mjs +3 -2
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.mjs.map +1 -1
- package/dist/admin/pages/EditView/components/FormInputs/Relations/Relations.js +2 -1
- package/dist/admin/pages/EditView/components/FormInputs/Relations/Relations.js.map +1 -1
- package/dist/admin/pages/EditView/components/FormInputs/Relations/Relations.mjs +3 -2
- package/dist/admin/pages/EditView/components/FormInputs/Relations/Relations.mjs.map +1 -1
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.js +2 -2
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.js.map +1 -1
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.mjs +2 -2
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.mjs.map +1 -1
- package/dist/admin/pages/EditView/components/FormLayout.js +13 -8
- package/dist/admin/pages/EditView/components/FormLayout.js.map +1 -1
- package/dist/admin/pages/EditView/components/FormLayout.mjs +14 -8
- package/dist/admin/pages/EditView/components/FormLayout.mjs.map +1 -1
- package/dist/admin/pages/EditView/components/Header.js +22 -7
- package/dist/admin/pages/EditView/components/Header.js.map +1 -1
- package/dist/admin/pages/EditView/components/Header.mjs +23 -8
- package/dist/admin/pages/EditView/components/Header.mjs.map +1 -1
- package/dist/admin/pages/ListConfiguration/ListConfigurationPage.js +1 -0
- package/dist/admin/pages/ListConfiguration/ListConfigurationPage.js.map +1 -1
- package/dist/admin/pages/ListConfiguration/ListConfigurationPage.mjs +1 -0
- package/dist/admin/pages/ListConfiguration/ListConfigurationPage.mjs.map +1 -1
- package/dist/admin/preview/components/InputPopover.js +29 -9
- package/dist/admin/preview/components/InputPopover.js.map +1 -1
- package/dist/admin/preview/components/InputPopover.mjs +31 -11
- package/dist/admin/preview/components/InputPopover.mjs.map +1 -1
- package/dist/admin/preview/pages/Preview.js +6 -6
- package/dist/admin/preview/pages/Preview.js.map +1 -1
- package/dist/admin/preview/pages/Preview.mjs +6 -6
- package/dist/admin/preview/pages/Preview.mjs.map +1 -1
- package/dist/admin/preview/utils/constants.js +34 -0
- package/dist/admin/preview/utils/constants.js.map +1 -1
- package/dist/admin/preview/utils/constants.mjs +34 -1
- package/dist/admin/preview/utils/constants.mjs.map +1 -1
- package/dist/admin/preview/utils/fieldUtils.js +13 -4
- package/dist/admin/preview/utils/fieldUtils.js.map +1 -1
- package/dist/admin/preview/utils/fieldUtils.mjs +13 -5
- package/dist/admin/preview/utils/fieldUtils.mjs.map +1 -1
- package/dist/admin/preview/utils/previewScript.js +120 -44
- package/dist/admin/preview/utils/previewScript.js.map +1 -1
- package/dist/admin/preview/utils/previewScript.mjs +120 -44
- package/dist/admin/preview/utils/previewScript.mjs.map +1 -1
- package/dist/admin/src/components/LeftMenu.d.ts +3 -1
- package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
- package/dist/admin/src/pages/EditView/components/FormLayout.d.ts +0 -3
- package/dist/admin/src/preview/services/preview.d.ts +1 -1
- package/dist/admin/src/preview/utils/constants.d.ts +35 -0
- package/dist/admin/src/preview/utils/fieldUtils.d.ts +6 -0
- package/dist/admin/src/preview/utils/previewScript.d.ts +1 -0
- package/dist/admin/src/services/api.d.ts +1 -1
- package/dist/admin/src/services/components.d.ts +2 -2
- package/dist/admin/src/services/contentTypes.d.ts +3 -3
- package/dist/admin/src/services/documents.d.ts +16 -16
- package/dist/admin/src/services/homepage.d.ts +1 -1
- package/dist/admin/src/services/init.d.ts +1 -1
- package/dist/admin/src/services/relations.d.ts +2 -2
- package/dist/admin/src/services/uid.d.ts +3 -3
- package/dist/admin/translations/en.json.js +5 -0
- package/dist/admin/translations/en.json.js.map +1 -1
- package/dist/admin/translations/en.json.mjs +5 -0
- package/dist/admin/translations/en.json.mjs.map +1 -1
- package/dist/server/controllers/relations.js +6 -4
- package/dist/server/controllers/relations.js.map +1 -1
- package/dist/server/controllers/relations.mjs +6 -4
- package/dist/server/controllers/relations.mjs.map +1 -1
- package/dist/server/src/controllers/relations.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"previewScript.mjs","sources":["../../../../admin/src/preview/utils/previewScript.ts"],"sourcesContent":["// NOTE: This override is for the properties on _user's site_, it's not about Strapi Admin.\ndeclare global {\n interface Window {\n __strapi_previewCleanup?: () => void;\n STRAPI_HIGHLIGHT_HOVER_COLOR?: string;\n STRAPI_HIGHLIGHT_ACTIVE_COLOR?: string;\n STRAPI_DISABLE_STEGA_DECODING?: boolean;\n }\n}\n\n/**\n * previewScript will be injected into the preview iframe after being stringified.\n * Therefore it CANNOT use any imports, or refer to any variables outside of its own scope.\n * It's why many functions are defined within previewScript, it's the only way to avoid going full spaghetti.\n * To get a better overview of everything previewScript does, go to the orchestration part at its end.\n */\nconst previewScript = (shouldRun = true) => {\n /* -----------------------------------------------------------------------------------------------\n * Params\n * ---------------------------------------------------------------------------------------------*/\n const HIGHLIGHT_PADDING = 2; // in pixels\n const HIGHLIGHT_HOVER_COLOR = window.STRAPI_HIGHLIGHT_HOVER_COLOR ?? '#4945ff'; // dark primary500\n const HIGHLIGHT_ACTIVE_COLOR = window.STRAPI_HIGHLIGHT_ACTIVE_COLOR ?? '#7b79ff'; // dark primary600\n\n const DISABLE_STEGA_DECODING = window.STRAPI_DISABLE_STEGA_DECODING ?? false;\n const SOURCE_ATTRIBUTE = 'data-strapi-source';\n const OVERLAY_ID = 'strapi-preview-overlay';\n const INTERNAL_EVENTS = {\n STRAPI_FIELD_FOCUS: 'strapiFieldFocus',\n STRAPI_FIELD_BLUR: 'strapiFieldBlur',\n STRAPI_FIELD_CHANGE: 'strapiFieldChange',\n STRAPI_FIELD_FOCUS_INTENT: 'strapiFieldFocusIntent',\n } as const;\n\n /**\n * Calling the function in no-run mode lets us retrieve the constants from other files and keep\n * a single source of truth for them. It's the only way to do this because this script can't\n * refer to any variables outside of its own scope, because it's stringified before it's run.\n */\n if (!shouldRun) {\n return { INTERNAL_EVENTS };\n }\n\n /* -----------------------------------------------------------------------------------------------\n * Utils\n * ---------------------------------------------------------------------------------------------*/\n\n const sendMessage = (\n type: (typeof INTERNAL_EVENTS)[keyof typeof INTERNAL_EVENTS],\n payload: unknown\n ) => {\n window.parent.postMessage({ type, payload }, '*');\n };\n\n const getElementsByPath = (path: string) => {\n return document.querySelectorAll(`[${SOURCE_ATTRIBUTE}*=\"path=${path}\"]`);\n };\n\n /* -----------------------------------------------------------------------------------------------\n * Functionality pieces\n * ---------------------------------------------------------------------------------------------*/\n\n const setupStegaDOMObserver = async () => {\n if (DISABLE_STEGA_DECODING) {\n return;\n }\n\n const { vercelStegaDecode: stegaDecode, vercelStegaClean: stegaClean } = await import(\n // @ts-expect-error it's not a local dependency\n // eslint-disable-next-line import/no-unresolved\n 'https://cdn.jsdelivr.net/npm/@vercel/stega@0.1.2/+esm'\n );\n\n const applyStegaToElement = (element: Element) => {\n const directTextNodes = Array.from(element.childNodes).filter(\n (node) => node.nodeType === Node.TEXT_NODE\n );\n\n const directTextContent = directTextNodes.map((node) => node.textContent || '').join('');\n\n if (directTextContent) {\n try {\n // TODO: check if we can call split instead of decode+clean\n const result = stegaDecode(directTextContent);\n if (result && 'strapiSource' in result) {\n element.setAttribute(SOURCE_ATTRIBUTE, result.strapiSource);\n\n // Remove encoded part from DOM text content (to avoid breaking links for example)\n directTextNodes.forEach((node) => {\n if (node.textContent) {\n const cleanedText = stegaClean(node.textContent);\n if (cleanedText !== node.textContent) {\n node.textContent = cleanedText;\n }\n }\n });\n }\n } catch (error) {}\n }\n };\n\n // Process all existing elements\n const allElements = document.querySelectorAll('*');\n Array.from(allElements).forEach(applyStegaToElement);\n\n // Create observer for new elements and text changes\n const observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n // Handle added nodes\n if (mutation.type === 'childList') {\n mutation.addedNodes.forEach((node) => {\n if (node.nodeType === Node.ELEMENT_NODE) {\n const element = node as Element;\n // Process the added element\n applyStegaToElement(element);\n // Process all child elements\n const childElements = element.querySelectorAll('*');\n Array.from(childElements).forEach(applyStegaToElement);\n }\n });\n }\n\n // Handle text content changes\n if (mutation.type === 'characterData' && mutation.target.parentElement) {\n applyStegaToElement(mutation.target.parentElement);\n }\n });\n });\n\n observer.observe(document, {\n childList: true,\n subtree: true,\n characterData: true,\n });\n\n return observer;\n };\n\n const createOverlaySystem = () => {\n // Clean up before creating a new overlay so we can safely call previewScript multiple times\n window.__strapi_previewCleanup?.();\n document.getElementById(OVERLAY_ID)?.remove();\n\n const overlay = document.createElement('div');\n overlay.id = OVERLAY_ID;\n overlay.style.cssText = `\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n z-index: 9999;\n `;\n\n window.document.body.appendChild(overlay);\n return overlay;\n };\n\n type EventListenersList = Array<{\n element: HTMLElement | Window;\n type: keyof HTMLElementEventMap | 'message';\n handler: EventListener;\n }>;\n\n const createHighlightManager = (overlay: HTMLElement) => {\n const elementsToHighlight = new Map<Element, HTMLElement>();\n const eventListeners: EventListenersList = [];\n const focusedHighlights: HTMLElement[] = [];\n let focusedField: string | null = null;\n\n const drawHighlight = (target: Element, highlight: HTMLElement) => {\n if (!highlight) return;\n\n const rect = target.getBoundingClientRect();\n highlight.style.width = `${rect.width + HIGHLIGHT_PADDING * 2}px`;\n highlight.style.height = `${rect.height + HIGHLIGHT_PADDING * 2}px`;\n highlight.style.transform = `translate(${rect.left - HIGHLIGHT_PADDING}px, ${rect.top - HIGHLIGHT_PADDING}px)`;\n };\n\n const updateAllHighlights = () => {\n elementsToHighlight.forEach((highlight, element) => {\n drawHighlight(element, highlight);\n });\n };\n\n const createHighlightForElement = (element: HTMLElement) => {\n if (elementsToHighlight.has(element)) {\n // Already has a highlight\n return;\n }\n\n const highlight = document.createElement('div');\n highlight.style.cssText = `\n position: absolute;\n outline: 2px solid transparent;\n pointer-events: none;\n border-radius: 2px;\n background-color: transparent;\n will-change: transform;\n transition: outline-color 0.1s ease-in-out;\n `;\n\n // Move hover detection to the underlying element\n const mouseEnterHandler = () => {\n if (!focusedHighlights.includes(highlight)) {\n highlight.style.outlineColor = HIGHLIGHT_HOVER_COLOR;\n }\n };\n const mouseLeaveHandler = () => {\n if (!focusedHighlights.includes(highlight)) {\n highlight.style.outlineColor = 'transparent';\n }\n };\n const doubleClickHandler = () => {\n const sourceAttribute = element.getAttribute(SOURCE_ATTRIBUTE);\n if (sourceAttribute) {\n const rect = element.getBoundingClientRect();\n sendMessage(INTERNAL_EVENTS.STRAPI_FIELD_FOCUS_INTENT, {\n path: sourceAttribute,\n position: {\n top: rect.top,\n left: rect.left,\n right: rect.right,\n bottom: rect.bottom,\n width: rect.width,\n height: rect.height,\n },\n });\n }\n };\n const mouseDownHandler = (event: MouseEvent) => {\n // Prevent default multi click to select behavior\n if (event.detail >= 2) {\n event.preventDefault();\n }\n };\n\n element.addEventListener('mouseenter', mouseEnterHandler);\n element.addEventListener('mouseleave', mouseLeaveHandler);\n element.addEventListener('dblclick', doubleClickHandler);\n element.addEventListener('mousedown', mouseDownHandler);\n\n // Store event listeners for cleanup\n eventListeners.push(\n { element, type: 'mouseenter', handler: mouseEnterHandler },\n { element, type: 'mouseleave', handler: mouseLeaveHandler },\n { element, type: 'dblclick', handler: doubleClickHandler },\n { element, type: 'mousedown', handler: mouseDownHandler as EventListener }\n );\n\n elementsToHighlight.set(element, highlight);\n overlay.appendChild(highlight);\n drawHighlight(element, highlight);\n };\n\n const removeHighlightForElement = (element: Element) => {\n const highlight = elementsToHighlight.get(element);\n\n if (!highlight) return;\n\n highlight.remove();\n elementsToHighlight.delete(element);\n\n // Remove event listeners for this element\n const listenersToRemove = eventListeners.filter((listener) => listener.element === element);\n listenersToRemove.forEach(({ element, type, handler }) => {\n element.removeEventListener(type, handler);\n });\n\n // Mutate eventListeners to remove listeners for this element\n eventListeners.splice(\n 0,\n eventListeners.length,\n ...eventListeners.filter((listener) => listener.element !== element)\n );\n };\n\n // Process all existing elements with source attributes\n const initialElements = window.document.querySelectorAll(`[${SOURCE_ATTRIBUTE}]`);\n Array.from(initialElements).forEach((element) => {\n if (element instanceof HTMLElement) {\n createHighlightForElement(element);\n }\n });\n\n return {\n get elements() {\n return Array.from(elementsToHighlight.keys());\n },\n get highlights() {\n return Array.from(elementsToHighlight.values());\n },\n updateAllHighlights,\n eventListeners,\n focusedHighlights,\n createHighlightForElement,\n removeHighlightForElement,\n setFocusedField: (field: string | null) => {\n focusedField = field;\n },\n getFocusedField: () => focusedField,\n };\n };\n\n type HighlightManager = ReturnType<typeof createHighlightManager>;\n\n /**\n * We need to track scroll in all the element parents in order to keep the highlight position\n * in sync with the element position. Listening to window scroll is not enough because the\n * element can be inside one or more scrollable containers.\n */\n const setupScrollManagement = (highlightManager: HighlightManager) => {\n const updateOnScroll = () => {\n highlightManager.updateAllHighlights();\n };\n\n const scrollableElements = new Set<Element | Window>();\n scrollableElements.add(window);\n\n // Find all scrollable ancestors for all tracked elements and set up scroll listeners\n highlightManager.elements.forEach((element) => {\n let parent = element.parentElement;\n while (parent) {\n const computedStyle = window.getComputedStyle(parent);\n const overflow = computedStyle.overflow + computedStyle.overflowX + computedStyle.overflowY;\n\n if (overflow.includes('scroll') || overflow.includes('auto')) {\n scrollableElements.add(parent);\n }\n\n parent = parent.parentElement;\n }\n });\n\n // Add scroll listeners to all scrollable elements\n scrollableElements.forEach((element) => {\n if (element === window) {\n window.addEventListener('scroll', updateOnScroll);\n window.addEventListener('resize', updateOnScroll);\n } else {\n element.addEventListener('scroll', updateOnScroll);\n }\n });\n\n const cleanup = () => {\n scrollableElements.forEach((element) => {\n if (element === window) {\n window.removeEventListener('scroll', updateOnScroll);\n window.removeEventListener('resize', updateOnScroll);\n } else {\n (element as Element).removeEventListener('scroll', updateOnScroll);\n }\n });\n };\n\n return { cleanup };\n };\n\n const setupObservers = (\n highlightManager: HighlightManager,\n stegaObserver: MutationObserver | undefined\n ) => {\n const resizeObserver = new ResizeObserver(() => {\n highlightManager.updateAllHighlights();\n });\n\n const observeElementForResize = (element: Element) => {\n resizeObserver.observe(element);\n };\n\n // Observe existing elements\n highlightManager.elements.forEach(observeElementForResize);\n resizeObserver.observe(document.documentElement);\n\n // Create highlight observer to watch for new elements with source attributes\n const highlightObserver = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.type === 'attributes' && mutation.attributeName === SOURCE_ATTRIBUTE) {\n const target = mutation.target as HTMLElement;\n if (target.hasAttribute(SOURCE_ATTRIBUTE)) {\n highlightManager.createHighlightForElement(target);\n observeElementForResize(target);\n } else {\n highlightManager.removeHighlightForElement(target);\n }\n }\n\n if (mutation.type === 'childList') {\n mutation.addedNodes.forEach((node) => {\n if (node.nodeType === Node.ELEMENT_NODE) {\n const element = node as Element;\n // Check if the added element has source attribute\n if (element.hasAttribute(SOURCE_ATTRIBUTE) && element instanceof HTMLElement) {\n highlightManager.createHighlightForElement(element);\n observeElementForResize(element);\n }\n // Check all child elements for source attributes\n const elementsWithSource = element.querySelectorAll(`[${SOURCE_ATTRIBUTE}]`);\n Array.from(elementsWithSource).forEach((childElement) => {\n if (childElement instanceof HTMLElement) {\n highlightManager.createHighlightForElement(childElement);\n observeElementForResize(childElement);\n }\n });\n }\n });\n\n mutation.removedNodes.forEach((node) => {\n if (node.nodeType === Node.ELEMENT_NODE) {\n const element = node as Element;\n highlightManager.removeHighlightForElement(element);\n }\n });\n }\n });\n });\n\n highlightObserver.observe(document, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: [SOURCE_ATTRIBUTE],\n });\n\n return {\n resizeObserver,\n highlightObserver,\n stegaObserver,\n };\n };\n\n const setupEventHandlers = (highlightManager: HighlightManager) => {\n const handleMessage = (event: MessageEvent) => {\n if (!event.data?.type) return;\n\n // The user typed in an input, reflect the change in the preview\n if (event.data.type === INTERNAL_EVENTS.STRAPI_FIELD_CHANGE) {\n const { field, value } = event.data.payload;\n if (!field) return;\n\n getElementsByPath(field).forEach((element) => {\n if (element instanceof HTMLElement) {\n element.textContent = value || '';\n }\n });\n\n // Update highlight dimensions since the new text content may affect them\n highlightManager.updateAllHighlights();\n return;\n }\n\n // The user focused a new input, update the highlights in the preview\n if (event.data.type === INTERNAL_EVENTS.STRAPI_FIELD_FOCUS) {\n const { field } = event.data.payload;\n if (!field) return;\n\n // Clear existing focused highlights\n highlightManager.focusedHighlights.forEach((highlight: HTMLElement) => {\n highlight.style.outlineColor = 'transparent';\n });\n highlightManager.focusedHighlights.length = 0;\n\n // Set new focused field and highlight matching elements\n highlightManager.setFocusedField(field);\n getElementsByPath(field).forEach((element, index) => {\n if (index === 0) {\n element.scrollIntoView({ behavior: 'smooth', block: 'center' });\n }\n const highlight =\n highlightManager.highlights[Array.from(highlightManager.elements).indexOf(element)];\n if (highlight) {\n highlight.style.outlineColor = HIGHLIGHT_ACTIVE_COLOR;\n highlight.style.outlineWidth = '3px';\n highlightManager.focusedHighlights.push(highlight);\n }\n });\n return;\n }\n\n // The user is no longer focusing an input, remove the highlights\n if (event.data.type === INTERNAL_EVENTS.STRAPI_FIELD_BLUR) {\n const { field } = event.data.payload;\n if (field !== highlightManager.getFocusedField()) return;\n\n highlightManager.focusedHighlights.forEach((highlight: HTMLElement) => {\n highlight.style.outlineColor = 'transparent';\n highlight.style.outlineWidth = '2px';\n });\n highlightManager.focusedHighlights.length = 0;\n highlightManager.setFocusedField(null);\n }\n };\n\n window.addEventListener('message', handleMessage);\n\n // Add the message handler to the cleanup list\n const messageEventListener = {\n element: window,\n type: 'message' as keyof HTMLElementEventMap,\n handler: handleMessage as EventListener,\n };\n\n return [...highlightManager.eventListeners, messageEventListener];\n };\n\n const createCleanupSystem = (\n overlay: HTMLElement,\n observers: ReturnType<typeof setupObservers>,\n scrollManager: ReturnType<typeof setupScrollManagement>,\n eventHandlers: EventListenersList\n ) => {\n window.__strapi_previewCleanup = () => {\n observers.resizeObserver.disconnect();\n observers.highlightObserver.disconnect();\n observers.stegaObserver?.disconnect();\n\n // Clean up scroll listeners\n scrollManager.cleanup();\n\n // Remove highlight event listeners\n eventHandlers.forEach(({ element, type, handler }) => {\n element.removeEventListener(type, handler);\n });\n\n overlay.remove();\n };\n };\n\n /* -----------------------------------------------------------------------------------------------\n * Orchestration\n * ---------------------------------------------------------------------------------------------*/\n\n setupStegaDOMObserver().then((stegaObserver) => {\n const overlay = createOverlaySystem();\n const highlightManager = createHighlightManager(overlay);\n const observers = setupObservers(highlightManager, stegaObserver);\n const scrollManager = setupScrollManagement(highlightManager);\n const eventHandlers = setupEventHandlers(highlightManager);\n createCleanupSystem(overlay, observers, scrollManager, eventHandlers);\n });\n};\n\nexport { previewScript };\n"],"names":["previewScript","shouldRun","HIGHLIGHT_PADDING","HIGHLIGHT_HOVER_COLOR","window","STRAPI_HIGHLIGHT_HOVER_COLOR","HIGHLIGHT_ACTIVE_COLOR","STRAPI_HIGHLIGHT_ACTIVE_COLOR","DISABLE_STEGA_DECODING","STRAPI_DISABLE_STEGA_DECODING","SOURCE_ATTRIBUTE","OVERLAY_ID","INTERNAL_EVENTS","STRAPI_FIELD_FOCUS","STRAPI_FIELD_BLUR","STRAPI_FIELD_CHANGE","STRAPI_FIELD_FOCUS_INTENT","sendMessage","type","payload","parent","postMessage","getElementsByPath","path","document","querySelectorAll","setupStegaDOMObserver","vercelStegaDecode","stegaDecode","vercelStegaClean","stegaClean","applyStegaToElement","element","directTextNodes","Array","from","childNodes","filter","node","nodeType","Node","TEXT_NODE","directTextContent","map","textContent","join","result","setAttribute","strapiSource","forEach","cleanedText","error","allElements","observer","MutationObserver","mutations","mutation","addedNodes","ELEMENT_NODE","childElements","target","parentElement","observe","childList","subtree","characterData","createOverlaySystem","__strapi_previewCleanup","getElementById","remove","overlay","createElement","id","style","cssText","body","appendChild","createHighlightManager","elementsToHighlight","Map","eventListeners","focusedHighlights","focusedField","drawHighlight","highlight","rect","getBoundingClientRect","width","height","transform","left","top","updateAllHighlights","createHighlightForElement","has","mouseEnterHandler","includes","outlineColor","mouseLeaveHandler","doubleClickHandler","sourceAttribute","getAttribute","position","right","bottom","mouseDownHandler","event","detail","preventDefault","addEventListener","push","handler","set","removeHighlightForElement","get","delete","listenersToRemove","listener","removeEventListener","splice","length","initialElements","HTMLElement","elements","keys","highlights","values","setFocusedField","field","getFocusedField","setupScrollManagement","highlightManager","updateOnScroll","scrollableElements","Set","add","computedStyle","getComputedStyle","overflow","overflowX","overflowY","cleanup","setupObservers","stegaObserver","resizeObserver","ResizeObserver","observeElementForResize","documentElement","highlightObserver","attributeName","hasAttribute","elementsWithSource","childElement","removedNodes","attributes","attributeFilter","setupEventHandlers","handleMessage","data","value","index","scrollIntoView","behavior","block","indexOf","outlineWidth","messageEventListener","createCleanupSystem","observers","scrollManager","eventHandlers","disconnect","then"],"mappings":"AAAA;AAUA;;;;;AAKC,IACKA,MAAAA,aAAAA,GAAgB,CAACC,SAAAA,GAAY,IAAI,GAAA;AACrC;;qGAGA,MAAMC,iBAAoB,GAAA,CAAA,CAAA;AAC1B,IAAA,MAAMC,qBAAwBC,GAAAA,MAAAA,CAAOC,4BAA4B,IAAI;AACrE,IAAA,MAAMC,sBAAyBF,GAAAA,MAAAA,CAAOG,6BAA6B,IAAI;IAEvE,MAAMC,sBAAAA,GAAyBJ,MAAOK,CAAAA,6BAA6B,IAAI,KAAA;AACvE,IAAA,MAAMC,gBAAmB,GAAA,oBAAA;AACzB,IAAA,MAAMC,UAAa,GAAA,wBAAA;AACnB,IAAA,MAAMC,eAAkB,GAAA;QACtBC,kBAAoB,EAAA,kBAAA;QACpBC,iBAAmB,EAAA,iBAAA;QACnBC,mBAAqB,EAAA,mBAAA;QACrBC,yBAA2B,EAAA;AAC7B,KAAA;AAEA;;;;MAKA,IAAI,CAACf,SAAW,EAAA;QACd,OAAO;AAAEW,YAAAA;AAAgB,SAAA;AAC3B;AAEA;;qGAIA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AAeC,EAAAA,aAAAA,CAAAA;AACzD,KAAA,CAAA;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"previewScript.mjs","sources":["../../../../admin/src/preview/utils/previewScript.ts"],"sourcesContent":["// NOTE: This override is for the properties on _user's site_, it's not about Strapi Admin.\ndeclare global {\n interface Window {\n __strapi_previewCleanup?: () => void;\n STRAPI_HIGHLIGHT_HOVER_COLOR?: string;\n STRAPI_HIGHLIGHT_ACTIVE_COLOR?: string;\n STRAPI_DISABLE_STEGA_DECODING?: boolean;\n }\n}\n\n/**\n * previewScript will be injected into the preview iframe after being stringified.\n * Therefore it CANNOT use any imports, or refer to any variables outside of its own scope.\n * It's why many functions are defined within previewScript, it's the only way to avoid going full spaghetti.\n * To get a better overview of everything previewScript does, go to the orchestration part at its end.\n */\nconst previewScript = (shouldRun = true) => {\n /* -----------------------------------------------------------------------------------------------\n * Params\n * ---------------------------------------------------------------------------------------------*/\n const HIGHLIGHT_PADDING = 2; // in pixels\n const HIGHLIGHT_HOVER_COLOR = window.STRAPI_HIGHLIGHT_HOVER_COLOR ?? '#4945ff'; // dark primary500\n const HIGHLIGHT_ACTIVE_COLOR = window.STRAPI_HIGHLIGHT_ACTIVE_COLOR ?? '#7b79ff'; // dark primary600\n const HIGHLIGHT_STYLES_ID = 'strapi-preview-highlight-styles';\n const DOUBLE_CLICK_TIMEOUT = 300; // milliseconds to wait for potential double-click\n\n const DISABLE_STEGA_DECODING = window.STRAPI_DISABLE_STEGA_DECODING ?? false;\n const SOURCE_ATTRIBUTE = 'data-strapi-source';\n const OVERLAY_ID = 'strapi-preview-overlay';\n const INTERNAL_EVENTS = {\n STRAPI_FIELD_FOCUS: 'strapiFieldFocus',\n STRAPI_FIELD_BLUR: 'strapiFieldBlur',\n STRAPI_FIELD_CHANGE: 'strapiFieldChange',\n STRAPI_FIELD_FOCUS_INTENT: 'strapiFieldFocusIntent',\n STRAPI_FIELD_SINGLE_CLICK_HINT: 'strapiFieldSingleClickHint',\n } as const;\n\n /**\n * Calling the function in no-run mode lets us retrieve the constants from other files and keep\n * a single source of truth for them. It's the only way to do this because this script can't\n * refer to any variables outside of its own scope, because it's stringified before it's run.\n */\n if (!shouldRun) {\n return { INTERNAL_EVENTS };\n }\n\n /* -----------------------------------------------------------------------------------------------\n * Utils\n * ---------------------------------------------------------------------------------------------*/\n\n const sendMessage = (\n type: (typeof INTERNAL_EVENTS)[keyof typeof INTERNAL_EVENTS],\n payload: unknown\n ) => {\n window.parent.postMessage({ type, payload }, '*');\n };\n\n const getElementsByPath = (path: string) => {\n return document.querySelectorAll(`[${SOURCE_ATTRIBUTE}*=\"path=${path}\"]`);\n };\n\n /* -----------------------------------------------------------------------------------------------\n * Functionality pieces\n * ---------------------------------------------------------------------------------------------*/\n\n const setupStegaDOMObserver = async () => {\n if (DISABLE_STEGA_DECODING) {\n return;\n }\n\n const { vercelStegaDecode: stegaDecode, vercelStegaClean: stegaClean } = await import(\n // @ts-expect-error it's not a local dependency\n // eslint-disable-next-line import/no-unresolved\n 'https://cdn.jsdelivr.net/npm/@vercel/stega@0.1.2/+esm'\n );\n\n const applyStegaToElement = (element: Element) => {\n const directTextNodes = Array.from(element.childNodes).filter(\n (node) => node.nodeType === Node.TEXT_NODE\n );\n\n const directTextContent = directTextNodes.map((node) => node.textContent || '').join('');\n\n if (directTextContent) {\n try {\n // TODO: check if we can call split instead of decode+clean\n const result = stegaDecode(directTextContent);\n if (result && 'strapiSource' in result) {\n element.setAttribute(SOURCE_ATTRIBUTE, result.strapiSource);\n\n // Remove encoded part from DOM text content (to avoid breaking links for example)\n directTextNodes.forEach((node) => {\n if (node.textContent) {\n const cleanedText = stegaClean(node.textContent);\n if (cleanedText !== node.textContent) {\n node.textContent = cleanedText;\n }\n }\n });\n }\n } catch (error) {}\n }\n };\n\n // Process all existing elements\n const allElements = document.querySelectorAll('*');\n Array.from(allElements).forEach(applyStegaToElement);\n\n // Create observer for new elements and text changes\n const observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n // Handle added nodes\n if (mutation.type === 'childList') {\n mutation.addedNodes.forEach((node) => {\n if (node.nodeType === Node.ELEMENT_NODE) {\n const element = node as Element;\n // Process the added element\n applyStegaToElement(element);\n // Process all child elements\n const childElements = element.querySelectorAll('*');\n Array.from(childElements).forEach(applyStegaToElement);\n }\n });\n }\n\n // Handle text content changes\n if (mutation.type === 'characterData' && mutation.target.parentElement) {\n applyStegaToElement(mutation.target.parentElement);\n }\n });\n });\n\n observer.observe(document, {\n childList: true,\n subtree: true,\n characterData: true,\n });\n\n return observer;\n };\n\n const createHighlightStyles = () => {\n const existingStyles = document.getElementById(HIGHLIGHT_STYLES_ID);\n // Remove existing styles to avoid duplicates\n if (existingStyles) {\n existingStyles.remove();\n }\n\n const styleElement = document.createElement('style');\n styleElement.id = HIGHLIGHT_STYLES_ID;\n styleElement.textContent = `\n .strapi-highlight {\n position: absolute;\n outline: 2px solid transparent;\n pointer-events: auto;\n border-radius: 2px;\n background-color: transparent;\n will-change: transform;\n transition: outline-color 0.1s ease-in-out;\n }\n\n .strapi-highlight:hover {\n outline-color: ${HIGHLIGHT_HOVER_COLOR} !important;\n }\n\n .strapi-highlight.strapi-highlight-focused {\n outline-color: ${HIGHLIGHT_ACTIVE_COLOR} !important;\n outline-width: 3px !important;\n }\n `;\n\n document.head.appendChild(styleElement);\n return styleElement;\n };\n\n const createOverlaySystem = () => {\n // Clean up before creating a new overlay so we can safely call previewScript multiple times\n window.__strapi_previewCleanup?.();\n document.getElementById(OVERLAY_ID)?.remove();\n\n const overlay = document.createElement('div');\n overlay.id = OVERLAY_ID;\n overlay.style.cssText = `\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n z-index: 9999;\n `;\n\n window.document.body.appendChild(overlay);\n return overlay;\n };\n\n type EventListenersList = Array<{\n element: HTMLElement | Window;\n type: keyof HTMLElementEventMap | 'message';\n handler: EventListener;\n }>;\n\n const createHighlightManager = (overlay: HTMLElement) => {\n const elementsToHighlight = new Map<Element, HTMLElement>();\n const eventListeners: EventListenersList = [];\n const focusedHighlights: HTMLElement[] = [];\n const pendingClicks = new Map<Element, number>(); // number is timeout id\n let focusedField: string | null = null;\n\n const drawHighlight = (target: Element, highlight: HTMLElement) => {\n if (!highlight) return;\n\n const rect = target.getBoundingClientRect();\n highlight.style.width = `${rect.width + HIGHLIGHT_PADDING * 2}px`;\n highlight.style.height = `${rect.height + HIGHLIGHT_PADDING * 2}px`;\n highlight.style.transform = `translate(${rect.left - HIGHLIGHT_PADDING}px, ${rect.top - HIGHLIGHT_PADDING}px)`;\n };\n\n const updateAllHighlights = () => {\n elementsToHighlight.forEach((highlight, element) => {\n drawHighlight(element, highlight);\n });\n };\n\n const createHighlightForElement = (element: HTMLElement) => {\n if (elementsToHighlight.has(element)) {\n // Already has a highlight\n return;\n }\n\n const highlight = document.createElement('div');\n highlight.className = 'strapi-highlight';\n const clickHandler = (event: MouseEvent) => {\n // Skip if this is a re-dispatched event from our delayed handler to avoid infinite loops\n if ((event as any).__strapi_redispatched) {\n return;\n }\n\n // Prevent the immediate action for interactive elements\n event.preventDefault();\n event.stopPropagation();\n\n // Clear any existing timeout for this element\n const existingTimeout = pendingClicks.get(element);\n if (existingTimeout) {\n window.clearTimeout(existingTimeout);\n pendingClicks.delete(element);\n }\n\n // Set up a delayed single-click handler\n const timeout = window.setTimeout(() => {\n pendingClicks.delete(element);\n\n // Send single-click hint notification\n sendMessage(INTERNAL_EVENTS.STRAPI_FIELD_SINGLE_CLICK_HINT, null);\n\n // Re-trigger the click on the underlying element after the double-click timeout\n // Create a new event to dispatch with a marker to prevent re-handling\n const newEvent = new MouseEvent('click', {\n bubbles: true,\n cancelable: true,\n view: window,\n detail: 1,\n button: event.button,\n buttons: event.buttons,\n clientX: event.clientX,\n clientY: event.clientY,\n ctrlKey: event.ctrlKey,\n altKey: event.altKey,\n shiftKey: event.shiftKey,\n metaKey: event.metaKey,\n });\n (newEvent as any).__strapi_redispatched = true;\n element.dispatchEvent(newEvent);\n }, DOUBLE_CLICK_TIMEOUT);\n\n pendingClicks.set(element, timeout);\n };\n\n const doubleClickHandler = (event: MouseEvent) => {\n // Prevent the default behavior on double-click\n event.preventDefault();\n event.stopPropagation();\n\n // Clear any pending single-click action\n const existingTimeout = pendingClicks.get(element);\n if (existingTimeout) {\n clearTimeout(existingTimeout);\n pendingClicks.delete(element);\n }\n\n const sourceAttribute = element.getAttribute(SOURCE_ATTRIBUTE);\n if (sourceAttribute) {\n const rect = element.getBoundingClientRect();\n sendMessage(INTERNAL_EVENTS.STRAPI_FIELD_FOCUS_INTENT, {\n path: sourceAttribute,\n position: {\n top: rect.top,\n left: rect.left,\n right: rect.right,\n bottom: rect.bottom,\n width: rect.width,\n height: rect.height,\n },\n });\n }\n };\n\n const mouseDownHandler = (event: MouseEvent) => {\n // Prevent default multi click to select behavior\n if (event.detail >= 2) {\n event.preventDefault();\n }\n };\n\n highlight.addEventListener('click', clickHandler);\n highlight.addEventListener('dblclick', doubleClickHandler);\n highlight.addEventListener('mousedown', mouseDownHandler);\n\n // Store event listeners for cleanup\n eventListeners.push(\n { element: highlight, type: 'click', handler: clickHandler as EventListener },\n { element: highlight, type: 'dblclick', handler: doubleClickHandler as EventListener },\n { element: highlight, type: 'mousedown', handler: mouseDownHandler as EventListener }\n );\n\n elementsToHighlight.set(element, highlight);\n overlay.appendChild(highlight);\n drawHighlight(element, highlight);\n };\n\n const removeHighlightForElement = (element: Element) => {\n const highlight = elementsToHighlight.get(element);\n\n if (!highlight) return;\n\n // Clear any pending click timeout for this element\n const pendingTimeout = pendingClicks.get(element);\n if (pendingTimeout) {\n window.clearTimeout(pendingTimeout);\n pendingClicks.delete(element);\n }\n\n highlight.remove();\n elementsToHighlight.delete(element);\n\n // Remove event listeners for this highlight\n const listenersToRemove = eventListeners.filter((listener) => listener.element === highlight);\n listenersToRemove.forEach(({ element, type, handler }) => {\n element.removeEventListener(type, handler);\n });\n\n // Mutate eventListeners to remove listeners for this highlight\n eventListeners.splice(\n 0,\n eventListeners.length,\n ...eventListeners.filter((listener) => listener.element !== highlight)\n );\n };\n\n // Process all existing elements with source attributes\n const initialElements = window.document.querySelectorAll(`[${SOURCE_ATTRIBUTE}]`);\n Array.from(initialElements).forEach((element) => {\n if (element instanceof HTMLElement) {\n createHighlightForElement(element);\n }\n });\n\n return {\n get elements() {\n return Array.from(elementsToHighlight.keys());\n },\n get highlights() {\n return Array.from(elementsToHighlight.values());\n },\n updateAllHighlights,\n eventListeners,\n focusedHighlights,\n createHighlightForElement,\n removeHighlightForElement,\n setFocusedField: (field: string | null) => {\n focusedField = field;\n },\n getFocusedField: () => focusedField,\n clearAllPendingClicks: () => {\n pendingClicks.forEach((timeout) => clearTimeout(timeout));\n pendingClicks.clear();\n },\n };\n };\n\n type HighlightManager = ReturnType<typeof createHighlightManager>;\n\n /**\n * We need to track scroll in all the element parents in order to keep the highlight position\n * in sync with the element position. Listening to window scroll is not enough because the\n * element can be inside one or more scrollable containers.\n */\n const setupScrollManagement = (highlightManager: HighlightManager) => {\n const updateOnScroll = () => {\n highlightManager.updateAllHighlights();\n };\n\n const scrollableElements = new Set<Element | Window>();\n scrollableElements.add(window);\n\n // Find all scrollable ancestors for all tracked elements and set up scroll listeners\n highlightManager.elements.forEach((element) => {\n let parent = element.parentElement;\n while (parent) {\n const computedStyle = window.getComputedStyle(parent);\n const overflow = computedStyle.overflow + computedStyle.overflowX + computedStyle.overflowY;\n\n if (overflow.includes('scroll') || overflow.includes('auto')) {\n scrollableElements.add(parent);\n }\n\n parent = parent.parentElement;\n }\n });\n\n // Add scroll listeners to all scrollable elements\n scrollableElements.forEach((element) => {\n if (element === window) {\n window.addEventListener('scroll', updateOnScroll);\n window.addEventListener('resize', updateOnScroll);\n } else {\n element.addEventListener('scroll', updateOnScroll);\n }\n });\n\n const cleanup = () => {\n scrollableElements.forEach((element) => {\n if (element === window) {\n window.removeEventListener('scroll', updateOnScroll);\n window.removeEventListener('resize', updateOnScroll);\n } else {\n (element as Element).removeEventListener('scroll', updateOnScroll);\n }\n });\n };\n\n return { cleanup };\n };\n\n const setupObservers = (\n highlightManager: HighlightManager,\n stegaObserver: MutationObserver | undefined\n ) => {\n const resizeObserver = new ResizeObserver(() => {\n highlightManager.updateAllHighlights();\n });\n\n const observeElementForResize = (element: Element) => {\n resizeObserver.observe(element);\n };\n\n // Observe existing elements\n highlightManager.elements.forEach(observeElementForResize);\n resizeObserver.observe(document.documentElement);\n\n // Create highlight observer to watch for new elements with source attributes\n const highlightObserver = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.type === 'attributes' && mutation.attributeName === SOURCE_ATTRIBUTE) {\n const target = mutation.target as HTMLElement;\n if (target.hasAttribute(SOURCE_ATTRIBUTE)) {\n highlightManager.createHighlightForElement(target);\n observeElementForResize(target);\n } else {\n highlightManager.removeHighlightForElement(target);\n }\n }\n\n if (mutation.type === 'childList') {\n mutation.addedNodes.forEach((node) => {\n if (node.nodeType === Node.ELEMENT_NODE) {\n const element = node as Element;\n // Check if the added element has source attribute\n if (element.hasAttribute(SOURCE_ATTRIBUTE) && element instanceof HTMLElement) {\n highlightManager.createHighlightForElement(element);\n observeElementForResize(element);\n }\n // Check all child elements for source attributes\n const elementsWithSource = element.querySelectorAll(`[${SOURCE_ATTRIBUTE}]`);\n Array.from(elementsWithSource).forEach((childElement) => {\n if (childElement instanceof HTMLElement) {\n highlightManager.createHighlightForElement(childElement);\n observeElementForResize(childElement);\n }\n });\n }\n });\n\n mutation.removedNodes.forEach((node) => {\n if (node.nodeType === Node.ELEMENT_NODE) {\n const element = node as Element;\n highlightManager.removeHighlightForElement(element);\n }\n });\n }\n });\n });\n\n highlightObserver.observe(document, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: [SOURCE_ATTRIBUTE],\n });\n\n return {\n resizeObserver,\n highlightObserver,\n stegaObserver,\n };\n };\n\n const setupEventHandlers = (highlightManager: HighlightManager) => {\n const handleMessage = (event: MessageEvent) => {\n if (!event.data?.type) return;\n\n // The user typed in an input, reflect the change in the preview\n if (event.data.type === INTERNAL_EVENTS.STRAPI_FIELD_CHANGE) {\n const { field, value } = event.data.payload;\n if (!field) return;\n\n getElementsByPath(field).forEach((element) => {\n if (element instanceof HTMLElement) {\n element.textContent = value || '';\n }\n });\n\n // Update highlight dimensions since the new text content may affect them\n highlightManager.updateAllHighlights();\n return;\n }\n\n // The user focused a new input, update the highlights in the preview\n if (event.data.type === INTERNAL_EVENTS.STRAPI_FIELD_FOCUS) {\n const { field } = event.data.payload;\n if (!field) return;\n\n // Clear existing focused highlights\n highlightManager.focusedHighlights.forEach((highlight: HTMLElement) => {\n highlight.classList.remove('strapi-highlight-focused');\n });\n highlightManager.focusedHighlights.length = 0;\n\n // Set new focused field and highlight matching elements\n highlightManager.setFocusedField(field);\n getElementsByPath(field).forEach((element, index) => {\n if (index === 0) {\n element.scrollIntoView({ behavior: 'smooth', block: 'center' });\n }\n const highlight =\n highlightManager.highlights[Array.from(highlightManager.elements).indexOf(element)];\n if (highlight) {\n highlight.classList.add('strapi-highlight-focused');\n highlightManager.focusedHighlights.push(highlight);\n }\n });\n return;\n }\n\n // The user is no longer focusing an input, remove the highlights\n if (event.data.type === INTERNAL_EVENTS.STRAPI_FIELD_BLUR) {\n const { field } = event.data.payload;\n if (field !== highlightManager.getFocusedField()) return;\n\n highlightManager.focusedHighlights.forEach((highlight: HTMLElement) => {\n highlight.classList.remove('strapi-highlight-focused');\n });\n highlightManager.focusedHighlights.length = 0;\n highlightManager.setFocusedField(null);\n }\n };\n\n window.addEventListener('message', handleMessage);\n\n // Add the message handler to the cleanup list\n const messageEventListener = {\n element: window,\n type: 'message' as keyof HTMLElementEventMap,\n handler: handleMessage as EventListener,\n };\n\n return [...highlightManager.eventListeners, messageEventListener];\n };\n\n const createCleanupSystem = (\n overlay: HTMLElement,\n observers: ReturnType<typeof setupObservers>,\n scrollManager: ReturnType<typeof setupScrollManagement>,\n eventHandlers: EventListenersList,\n highlightManager: HighlightManager\n ) => {\n window.__strapi_previewCleanup = () => {\n observers.resizeObserver.disconnect();\n observers.highlightObserver.disconnect();\n observers.stegaObserver?.disconnect();\n\n // Clean up scroll listeners\n scrollManager.cleanup();\n\n // Clear all pending click timeouts\n highlightManager.clearAllPendingClicks();\n\n // Remove highlight event listeners\n eventHandlers.forEach(({ element, type, handler }) => {\n element.removeEventListener(type, handler);\n });\n\n // Clean up CSS styles\n const existingStyles = document.getElementById(HIGHLIGHT_STYLES_ID);\n if (existingStyles) {\n existingStyles.remove();\n }\n\n overlay.remove();\n };\n };\n\n /* -----------------------------------------------------------------------------------------------\n * Orchestration\n * ---------------------------------------------------------------------------------------------*/\n\n setupStegaDOMObserver().then((stegaObserver) => {\n createHighlightStyles();\n const overlay = createOverlaySystem();\n const highlightManager = createHighlightManager(overlay);\n const observers = setupObservers(highlightManager, stegaObserver);\n const scrollManager = setupScrollManagement(highlightManager);\n const eventHandlers = setupEventHandlers(highlightManager);\n createCleanupSystem(overlay, observers, scrollManager, eventHandlers, highlightManager);\n });\n};\n\nexport { previewScript };\n"],"names":["previewScript","shouldRun","HIGHLIGHT_PADDING","HIGHLIGHT_HOVER_COLOR","window","STRAPI_HIGHLIGHT_HOVER_COLOR","HIGHLIGHT_ACTIVE_COLOR","STRAPI_HIGHLIGHT_ACTIVE_COLOR","HIGHLIGHT_STYLES_ID","DOUBLE_CLICK_TIMEOUT","DISABLE_STEGA_DECODING","STRAPI_DISABLE_STEGA_DECODING","SOURCE_ATTRIBUTE","OVERLAY_ID","INTERNAL_EVENTS","STRAPI_FIELD_FOCUS","STRAPI_FIELD_BLUR","STRAPI_FIELD_CHANGE","STRAPI_FIELD_FOCUS_INTENT","STRAPI_FIELD_SINGLE_CLICK_HINT","sendMessage","type","payload","parent","postMessage","getElementsByPath","path","document","querySelectorAll","setupStegaDOMObserver","vercelStegaDecode","stegaDecode","vercelStegaClean","stegaClean","applyStegaToElement","element","directTextNodes","Array","from","childNodes","filter","node","nodeType","Node","TEXT_NODE","directTextContent","map","textContent","join","result","setAttribute","strapiSource","forEach","cleanedText","error","allElements","observer","MutationObserver","mutations","mutation","addedNodes","ELEMENT_NODE","childElements","target","parentElement","observe","childList","subtree","characterData","createHighlightStyles","existingStyles","getElementById","remove","styleElement","createElement","id","head","appendChild","createOverlaySystem","__strapi_previewCleanup","overlay","style","cssText","body","createHighlightManager","elementsToHighlight","Map","eventListeners","focusedHighlights","pendingClicks","focusedField","drawHighlight","highlight","rect","getBoundingClientRect","width","height","transform","left","top","updateAllHighlights","createHighlightForElement","has","className","clickHandler","event","__strapi_redispatched","preventDefault","stopPropagation","existingTimeout","get","clearTimeout","delete","timeout","setTimeout","newEvent","MouseEvent","bubbles","cancelable","view","detail","button","buttons","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","dispatchEvent","set","doubleClickHandler","sourceAttribute","getAttribute","position","right","bottom","mouseDownHandler","addEventListener","push","handler","removeHighlightForElement","pendingTimeout","listenersToRemove","listener","removeEventListener","splice","length","initialElements","HTMLElement","elements","keys","highlights","values","setFocusedField","field","getFocusedField","clearAllPendingClicks","clear","setupScrollManagement","highlightManager","updateOnScroll","scrollableElements","Set","add","computedStyle","getComputedStyle","overflow","overflowX","overflowY","includes","cleanup","setupObservers","stegaObserver","resizeObserver","ResizeObserver","observeElementForResize","documentElement","highlightObserver","attributeName","hasAttribute","elementsWithSource","childElement","removedNodes","attributes","attributeFilter","setupEventHandlers","handleMessage","data","value","classList","index","scrollIntoView","behavior","block","indexOf","messageEventListener","createCleanupSystem","observers","scrollManager","eventHandlers","disconnect","then"],"mappings":"AAAA;AAUA;;;;;AAKC,IACKA,MAAAA,aAAAA,GAAgB,CAACC,SAAAA,GAAY,IAAI,GAAA;AACrC;;qGAGA,MAAMC,iBAAoB,GAAA,CAAA,CAAA;AAC1B,IAAA,MAAMC,qBAAwBC,GAAAA,MAAAA,CAAOC,4BAA4B,IAAI;AACrE,IAAA,MAAMC,sBAAyBF,GAAAA,MAAAA,CAAOG,6BAA6B,IAAI;AACv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CAAwB6K,IAAI,CAAC,CAAC7B,aAAAA,GAAAA;AAC5BxG,QAAAA,qBAAAA,EAAAA;AACA,QAAA,MAAMW,OAAUF,GAAAA,mBAAAA,EAAAA;AAChB,QAAA,MAAMkF,mBAAmB5E,sBAAuBJ,CAAAA,OAAAA,CAAAA;QAChD,MAAMsH,SAAAA,GAAY1B,eAAeZ,gBAAkBa,EAAAA,aAAAA,CAAAA;AACnD,QAAA,MAAM0B,gBAAgBxC,qBAAsBC,CAAAA,gBAAAA,CAAAA;AAC5C,QAAA,MAAMwC,gBAAgBd,kBAAmB1B,CAAAA,gBAAAA,CAAAA;QACzCqC,mBAAoBrH,CAAAA,OAAAA,EAASsH,SAAWC,EAAAA,aAAAA,EAAeC,aAAexC,EAAAA,gBAAAA,CAAAA;AACxE,KAAA,CAAA;AACF;;;;"}
|
|
@@ -8,5 +8,5 @@ declare const useGetHistoryVersionsQuery: import("@reduxjs/toolkit/dist/query/re
|
|
|
8
8
|
contentType: import("@strapi/types/dist/uid").ContentType;
|
|
9
9
|
documentId?: Data.ID | undefined;
|
|
10
10
|
locale?: string | undefined;
|
|
11
|
-
} & Partial<Pick<import("../../../../shared/contracts/history-versions").Pagination, "page" | "pageSize">>, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", GetHistoryVersions.Response, "adminApi">>, useRestoreVersionMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<RestoreVersion, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", RestoreHistoryVersion.Response, "adminApi">>;
|
|
11
|
+
} & Partial<Pick<import("../../../../shared/contracts/history-versions").Pagination, "page" | "pageSize">>, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", GetHistoryVersions.Response, "adminApi">>, useRestoreVersionMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<RestoreVersion, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", RestoreHistoryVersion.Response, "adminApi">>;
|
|
12
12
|
export { useGetHistoryVersionsQuery, useRestoreVersionMutation };
|
|
@@ -2,9 +2,6 @@ import * as React from 'react';
|
|
|
2
2
|
import { Grid } from '@strapi/design-system';
|
|
3
3
|
import { EditLayout } from '../../../hooks/useDocumentLayout';
|
|
4
4
|
import type { UseDocument } from '../../../hooks/useDocument';
|
|
5
|
-
export declare const RESPONSIVE_CONTAINER_BREAKPOINTS: {
|
|
6
|
-
sm: string;
|
|
7
|
-
};
|
|
8
5
|
export declare const ResponsiveGridRoot: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<Omit<import("@strapi/design-system").TransientBoxProps & {
|
|
9
6
|
children?: React.ReactNode;
|
|
10
7
|
} & import("@strapi/design-system/dist/types").AsProp<React.ElementType<any, keyof React.JSX.IntrinsicElements>> & Omit<Omit<any, "ref">, "children" | keyof import("@strapi/design-system/dist/types").AsProp<C> | keyof import("@strapi/design-system").TransientBoxProps> & {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { GetPreviewUrl } from '../../../../shared/contracts/preview';
|
|
2
|
-
declare const useGetPreviewUrlQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<GetPreviewUrl.Request, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", GetPreviewUrl.Response, "adminApi">>;
|
|
2
|
+
declare const useGetPreviewUrlQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<GetPreviewUrl.Request, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", GetPreviewUrl.Response, "adminApi">>;
|
|
3
3
|
export { useGetPreviewUrlQuery };
|
|
@@ -8,6 +8,7 @@ export declare const INTERNAL_EVENTS: {
|
|
|
8
8
|
readonly STRAPI_FIELD_BLUR: "strapiFieldBlur";
|
|
9
9
|
readonly STRAPI_FIELD_CHANGE: "strapiFieldChange";
|
|
10
10
|
readonly STRAPI_FIELD_FOCUS_INTENT: "strapiFieldFocusIntent";
|
|
11
|
+
readonly STRAPI_FIELD_SINGLE_CLICK_HINT: "strapiFieldSingleClickHint";
|
|
11
12
|
};
|
|
12
13
|
/**
|
|
13
14
|
* These events are documented to users, and will be hardcoded in their frontends.
|
|
@@ -18,3 +19,37 @@ export declare const PUBLIC_EVENTS: {
|
|
|
18
19
|
readonly STRAPI_UPDATE: "strapiUpdate";
|
|
19
20
|
readonly STRAPI_SCRIPT: "strapiScript";
|
|
20
21
|
};
|
|
22
|
+
/**
|
|
23
|
+
* Error messages for preview field operations.
|
|
24
|
+
* This information is used to trigger notifications.
|
|
25
|
+
*/
|
|
26
|
+
export declare const PREVIEW_ERROR_MESSAGES: {
|
|
27
|
+
readonly INVALID_FIELD_PATH: {
|
|
28
|
+
readonly type: "danger";
|
|
29
|
+
readonly message: {
|
|
30
|
+
readonly id: "content-manager.preview.error.invalid-field-path";
|
|
31
|
+
readonly defaultMessage: "Could not locate this field in the current document";
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
readonly RELATIONS_NOT_HANDLED: {
|
|
35
|
+
readonly type: "info";
|
|
36
|
+
readonly message: {
|
|
37
|
+
readonly id: "content-manager.preview.error.relations-not-handled";
|
|
38
|
+
readonly defaultMessage: "Inline editing for relations is not currently supported.";
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
readonly INCOMPLETE_STRAPI_SOURCE: {
|
|
42
|
+
readonly type: "danger";
|
|
43
|
+
readonly message: {
|
|
44
|
+
readonly id: "content-manager.preview.error.incomplete-strapi-source";
|
|
45
|
+
readonly defaultMessage: "This field is missing some required preview information";
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
readonly DIFFERENT_DOCUMENT: {
|
|
49
|
+
readonly type: "info";
|
|
50
|
+
readonly message: {
|
|
51
|
+
readonly id: "content-manager.preview.error.different-document";
|
|
52
|
+
readonly defaultMessage: "This field comes from a different document";
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { type FieldContentSourceMap } from '@strapi/admin/strapi-admin';
|
|
2
|
+
import type { PREVIEW_ERROR_MESSAGES } from './constants';
|
|
2
3
|
import type { PreviewContextValue } from '../pages/Preview';
|
|
3
4
|
import type { Modules, Schema } from '@strapi/types';
|
|
5
|
+
type PreviewErrorMessage = keyof typeof PREVIEW_ERROR_MESSAGES;
|
|
6
|
+
export declare class PreviewFieldError extends Error {
|
|
7
|
+
readonly messageKey: PreviewErrorMessage;
|
|
8
|
+
constructor(messageKey: PreviewErrorMessage);
|
|
9
|
+
}
|
|
4
10
|
type PathPart = {
|
|
5
11
|
name: string;
|
|
6
12
|
index?: number;
|
|
@@ -18,6 +18,7 @@ declare const previewScript: (shouldRun?: boolean) => {
|
|
|
18
18
|
readonly STRAPI_FIELD_BLUR: "strapiFieldBlur";
|
|
19
19
|
readonly STRAPI_FIELD_CHANGE: "strapiFieldChange";
|
|
20
20
|
readonly STRAPI_FIELD_FOCUS_INTENT: "strapiFieldFocusIntent";
|
|
21
|
+
readonly STRAPI_FIELD_SINGLE_CLICK_HINT: "strapiFieldSingleClickHint";
|
|
21
22
|
};
|
|
22
23
|
} | undefined;
|
|
23
24
|
export { previewScript };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const contentManagerApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, import("@reduxjs/toolkit/dist/query/endpointDefinitions").UpdateDefinitions<{}, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", never>, "adminApi", "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/dist/query/react").reactHooksModuleName>;
|
|
1
|
+
declare const contentManagerApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, import("@reduxjs/toolkit/dist/query/endpointDefinitions").UpdateDefinitions<{}, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", never>, "adminApi", "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/dist/query/react").reactHooksModuleName>;
|
|
2
2
|
export { contentManagerApi };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare const useGetComponentConfigurationQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<string, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", {
|
|
1
|
+
declare const useGetComponentConfigurationQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<string, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", {
|
|
2
2
|
component: import("../../../shared/contracts/components").ComponentConfiguration;
|
|
3
3
|
components: Record<string, import("../../../shared/contracts/components").ComponentConfiguration>;
|
|
4
|
-
}, "adminApi">>, useUpdateComponentConfigurationMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", import("../../../shared/contracts/components").ComponentConfiguration, "adminApi">>;
|
|
4
|
+
}, "adminApi">>, useUpdateComponentConfigurationMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", import("../../../shared/contracts/components").ComponentConfiguration, "adminApi">>;
|
|
5
5
|
export { useGetComponentConfigurationQuery, useUpdateComponentConfigurationMutation };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
declare const useGetContentTypeConfigurationQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<string, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", {
|
|
1
|
+
declare const useGetContentTypeConfigurationQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<string, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", {
|
|
2
2
|
contentType: import("../../../shared/contracts/content-types").Configuration;
|
|
3
3
|
components: Record<string, import("../../../shared/contracts/components").ComponentConfiguration>;
|
|
4
|
-
}, "adminApi">>, useGetAllContentTypeSettingsQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", {
|
|
4
|
+
}, "adminApi">>, useGetAllContentTypeSettingsQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", {
|
|
5
5
|
uid: string;
|
|
6
6
|
settings: import("../../../shared/contracts/content-types").Settings;
|
|
7
7
|
}[], "adminApi">>, useUpdateContentTypeConfigurationMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<{
|
|
@@ -10,7 +10,7 @@ declare const useGetContentTypeConfigurationQuery: import("@reduxjs/toolkit/dist
|
|
|
10
10
|
settings: import("../../../shared/contracts/content-types").Settings;
|
|
11
11
|
} & {
|
|
12
12
|
uid: string;
|
|
13
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", {
|
|
13
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", {
|
|
14
14
|
contentType: import("../../../shared/contracts/content-types").Configuration;
|
|
15
15
|
components: Record<string, import("../../../shared/contracts/components").ComponentConfiguration>;
|
|
16
16
|
}, "adminApi">>;
|
|
@@ -7,22 +7,22 @@ declare const useAutoCloneDocumentMutation: import("@reduxjs/toolkit/dist/query/
|
|
|
7
7
|
} & {
|
|
8
8
|
locale?: string | null | undefined;
|
|
9
9
|
}) | undefined;
|
|
10
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", Clone.Response, "adminApi">>, useCloneDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Clone.Params & {
|
|
10
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", Clone.Response, "adminApi">>, useCloneDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Clone.Params & {
|
|
11
11
|
data: Clone.Request['body'];
|
|
12
12
|
params?: {
|
|
13
13
|
locale?: string | null | undefined;
|
|
14
14
|
} | undefined;
|
|
15
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", Clone.Response, "adminApi">>, useCreateDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Create.Params & {
|
|
15
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", Clone.Response, "adminApi">>, useCreateDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Create.Params & {
|
|
16
16
|
data: Create.Request['body'];
|
|
17
17
|
params?: {} | undefined;
|
|
18
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", Create.Response, "adminApi">>, useDeleteDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Delete.Params, "model"> & Pick<Partial<Delete.Params>, "documentId"> & {
|
|
18
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", Create.Response, "adminApi">>, useDeleteDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Delete.Params, "model"> & Pick<Partial<Delete.Params>, "documentId"> & {
|
|
19
19
|
collectionType: string;
|
|
20
20
|
params?: {
|
|
21
21
|
page?: string | undefined;
|
|
22
22
|
pageSize?: string | undefined;
|
|
23
23
|
sort?: string | undefined;
|
|
24
24
|
} | undefined;
|
|
25
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", Delete.Response, "adminApi">>, useDeleteManyDocumentsMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<BulkDelete.Params & {
|
|
25
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", Delete.Response, "adminApi">>, useDeleteManyDocumentsMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<BulkDelete.Params & {
|
|
26
26
|
documentIds: string[];
|
|
27
27
|
} & {
|
|
28
28
|
params?: {
|
|
@@ -30,7 +30,7 @@ declare const useAutoCloneDocumentMutation: import("@reduxjs/toolkit/dist/query/
|
|
|
30
30
|
pageSize?: string | undefined;
|
|
31
31
|
sort?: string | undefined;
|
|
32
32
|
} | undefined;
|
|
33
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", BulkDelete.Response, "adminApi">>, useDiscardDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Discard.Params, "model"> & Partial<Pick<Discard.Params, "documentId">> & {
|
|
33
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", BulkDelete.Response, "adminApi">>, useDiscardDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Discard.Params, "model"> & Partial<Pick<Discard.Params, "documentId">> & {
|
|
34
34
|
collectionType: string;
|
|
35
35
|
params?: ({
|
|
36
36
|
page?: string | undefined;
|
|
@@ -39,7 +39,7 @@ declare const useAutoCloneDocumentMutation: import("@reduxjs/toolkit/dist/query/
|
|
|
39
39
|
} & {
|
|
40
40
|
[key: string]: any;
|
|
41
41
|
}) | undefined;
|
|
42
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", Discard.Response, "adminApi">>, useGetAllDocumentsQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<Find.Params & {
|
|
42
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", Discard.Response, "adminApi">>, useGetAllDocumentsQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<Find.Params & {
|
|
43
43
|
params?: ({
|
|
44
44
|
page?: string | undefined;
|
|
45
45
|
pageSize?: string | undefined;
|
|
@@ -47,17 +47,17 @@ declare const useAutoCloneDocumentMutation: import("@reduxjs/toolkit/dist/query/
|
|
|
47
47
|
} & {
|
|
48
48
|
[key: string]: any;
|
|
49
49
|
}) | undefined;
|
|
50
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", Find.Response, "adminApi">>, useLazyGetDocumentQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query").QueryDefinition<Pick<FindOne.Params, "model"> & Partial<Pick<FindOne.Params, "documentId">> & {
|
|
50
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", Find.Response, "adminApi">>, useLazyGetDocumentQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query").QueryDefinition<Pick<FindOne.Params, "model"> & Partial<Pick<FindOne.Params, "documentId">> & {
|
|
51
51
|
collectionType: string;
|
|
52
52
|
params?: {
|
|
53
53
|
locale?: string | null | undefined;
|
|
54
54
|
} | undefined;
|
|
55
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", FindOne.Response, "adminApi">>, useGetDocumentQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<Pick<FindOne.Params, "model"> & Partial<Pick<FindOne.Params, "documentId">> & {
|
|
55
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", FindOne.Response, "adminApi">>, useGetDocumentQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<Pick<FindOne.Params, "model"> & Partial<Pick<FindOne.Params, "documentId">> & {
|
|
56
56
|
collectionType: string;
|
|
57
57
|
params?: {
|
|
58
58
|
locale?: string | null | undefined;
|
|
59
59
|
} | undefined;
|
|
60
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", FindOne.Response, "adminApi">>, useLazyGetDraftRelationCountQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query").QueryDefinition<{
|
|
60
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", FindOne.Response, "adminApi">>, useLazyGetDraftRelationCountQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query").QueryDefinition<{
|
|
61
61
|
collectionType: string;
|
|
62
62
|
model: string;
|
|
63
63
|
/**
|
|
@@ -67,40 +67,40 @@ declare const useAutoCloneDocumentMutation: import("@reduxjs/toolkit/dist/query/
|
|
|
67
67
|
params?: {
|
|
68
68
|
locale?: string | null | undefined;
|
|
69
69
|
} | undefined;
|
|
70
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", CountDraftRelations.Response, "adminApi">>, useGetManyDraftRelationCountQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<{
|
|
70
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", CountDraftRelations.Response, "adminApi">>, useGetManyDraftRelationCountQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<{
|
|
71
71
|
documentIds?: string[] | undefined;
|
|
72
72
|
locale?: string | string[] | null | undefined;
|
|
73
73
|
} & {
|
|
74
74
|
model: string;
|
|
75
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", number, "adminApi">>, usePublishDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Publish.Params, "model"> & Partial<Pick<Publish.Params, "documentId">> & {
|
|
75
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", number, "adminApi">>, usePublishDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Publish.Params, "model"> & Partial<Pick<Publish.Params, "documentId">> & {
|
|
76
76
|
collectionType: string;
|
|
77
77
|
data: Publish.Request['body'];
|
|
78
78
|
params?: {
|
|
79
79
|
locale?: string | null | undefined;
|
|
80
80
|
} | undefined;
|
|
81
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", Publish.Response, "adminApi">>, usePublishManyDocumentsMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<BulkPublish.Params & {
|
|
81
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", Publish.Response, "adminApi">>, usePublishManyDocumentsMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<BulkPublish.Params & {
|
|
82
82
|
documentIds: string[];
|
|
83
83
|
} & {
|
|
84
84
|
params?: {
|
|
85
85
|
locale?: string | string[] | null | undefined;
|
|
86
86
|
} | undefined;
|
|
87
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", BulkPublish.Response, "adminApi">>, useUpdateDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Update.Params, "model"> & Partial<Pick<Update.Params, "documentId">> & {
|
|
87
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", BulkPublish.Response, "adminApi">>, useUpdateDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Update.Params, "model"> & Partial<Pick<Update.Params, "documentId">> & {
|
|
88
88
|
collectionType: string;
|
|
89
89
|
data: Update.Request['body'];
|
|
90
90
|
params?: {
|
|
91
91
|
locale?: string | null | undefined;
|
|
92
92
|
} | undefined;
|
|
93
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", Update.Response, "adminApi">>, useUnpublishDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Unpublish.Params, "model"> & Partial<Pick<Unpublish.Params, "documentId">> & {
|
|
93
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", Update.Response, "adminApi">>, useUnpublishDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Unpublish.Params, "model"> & Partial<Pick<Unpublish.Params, "documentId">> & {
|
|
94
94
|
collectionType: string;
|
|
95
95
|
params?: {
|
|
96
96
|
locale?: string | null | undefined;
|
|
97
97
|
} | undefined;
|
|
98
98
|
data: Unpublish.Request['body'];
|
|
99
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", Unpublish.Response, "adminApi">>, useUnpublishManyDocumentsMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<BulkUnpublish.Params, "model"> & {
|
|
99
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", Unpublish.Response, "adminApi">>, useUnpublishManyDocumentsMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<BulkUnpublish.Params, "model"> & {
|
|
100
100
|
documentIds: string[];
|
|
101
101
|
} & {
|
|
102
102
|
params?: {
|
|
103
103
|
locale?: string | string[] | null | undefined;
|
|
104
104
|
} | undefined;
|
|
105
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", BulkUnpublish.Response, "adminApi">>;
|
|
105
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", BulkUnpublish.Response, "adminApi">>;
|
|
106
106
|
export { useAutoCloneDocumentMutation, useCloneDocumentMutation, useCreateDocumentMutation, useDeleteDocumentMutation, useDeleteManyDocumentsMutation, useDiscardDocumentMutation, useGetAllDocumentsQuery, useLazyGetDocumentQuery, useGetDocumentQuery, useLazyGetDraftRelationCountQuery as useGetDraftRelationCountQuery, useGetManyDraftRelationCountQuery, usePublishDocumentMutation, usePublishManyDocumentsMutation, useUpdateDocumentMutation, useUnpublishDocumentMutation, useUnpublishManyDocumentsMutation, };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Homepage from '../../../shared/contracts/homepage';
|
|
2
2
|
declare const useGetRecentDocumentsQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<{
|
|
3
3
|
action: "update" | "publish";
|
|
4
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", Homepage.RecentDocument[], "adminApi">>;
|
|
4
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", Homepage.RecentDocument[], "adminApi">>;
|
|
5
5
|
export { useGetRecentDocumentsQuery };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const useGetInitialDataQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", {
|
|
1
|
+
declare const useGetInitialDataQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", {
|
|
2
2
|
fieldSizes: Record<string, {
|
|
3
3
|
default: number;
|
|
4
4
|
isResizable: boolean;
|
|
@@ -27,7 +27,7 @@ declare const useGetRelationsQuery: import("@reduxjs/toolkit/dist/query/react/bu
|
|
|
27
27
|
idsToOmit?: string[] | undefined;
|
|
28
28
|
idsToInclude?: string[] | undefined;
|
|
29
29
|
}) | undefined;
|
|
30
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", GetRelationsResponse, "adminApi">>, useLazySearchRelationsQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query").QueryDefinition<FindAvailable.Params & {
|
|
30
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", GetRelationsResponse, "adminApi">>, useLazySearchRelationsQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query").QueryDefinition<FindAvailable.Params & {
|
|
31
31
|
params?: (Partial<Pick<import("../../../shared/contracts/relations").Pagination, "page" | "pageSize">> & {
|
|
32
32
|
id?: import("@strapi/types/dist/data").ID | undefined;
|
|
33
33
|
locale?: string | undefined;
|
|
@@ -36,7 +36,7 @@ declare const useGetRelationsQuery: import("@reduxjs/toolkit/dist/query/react/bu
|
|
|
36
36
|
idsToOmit?: string[] | undefined;
|
|
37
37
|
idsToInclude?: string[] | undefined;
|
|
38
38
|
}) | undefined;
|
|
39
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", {
|
|
39
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability" | "RecentDocumentList" | "CountDocuments" | "UpcomingReleasesList", {
|
|
40
40
|
results: RelResult[];
|
|
41
41
|
pagination: import("../../../shared/contracts/relations").Pagination;
|
|
42
42
|
error?: undefined;
|