UNPKG

@dynamicforms/vuetify-inputs

Version:

Visual components for data entry using @dynamicforms/vue-forms

1 lines 120 kB
{"version":3,"file":"dynamicforms-vuetify-inputs.umd.cjs","sources":["../node_modules/@ckeditor/ckeditor5-integrations-common/dist/index.js","../node_modules/@ckeditor/ckeditor5-vue/dist/ckeditor.js","../src/helpers/settings.ts","../src/helpers/input-base.ts","../src/helpers/input-base.vue","../src/helpers/translations.ts","../src/helpers/action/action-display-style.ts","../src/helpers/action/responsive-render-options.ts","../src/helpers/action/action-render-options.ts","../src/helpers/action/action.ts","../src/df-actions.vue","../src/df-checkbox.vue","../src/df-color.vue","../src/df-datetime.vue","../src/df-file.vue","../src/df-input.vue","../src/helpers/ck-editor-custom.vue","../src/df-rtf-editor.vue","../src/helpers/df-select.helper.ts","../src/df-select.vue","../src/df-text-area.vue","../src/index.ts"],"sourcesContent":["/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction createDefer() {\n const deferred = {\n resolve: null,\n promise: null\n };\n deferred.promise = new Promise((resolve) => {\n deferred.resolve = resolve;\n });\n return deferred;\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction waitFor(callback, {\n timeOutAfter = 500,\n retryAfter = 100\n} = {}) {\n return new Promise((resolve, reject) => {\n const startTime = Date.now();\n let lastError = null;\n const timeoutTimerId = setTimeout(() => {\n reject(lastError ?? new Error(\"Timeout\"));\n }, timeOutAfter);\n const tick = async () => {\n try {\n const result = await callback();\n clearTimeout(timeoutTimerId);\n resolve(result);\n } catch (err) {\n lastError = err;\n if (Date.now() - startTime > timeOutAfter) {\n reject(err);\n } else {\n setTimeout(tick, retryAfter);\n }\n }\n };\n tick();\n });\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nconst INJECTED_SCRIPTS = /* @__PURE__ */ new Map();\nfunction injectScript(src, { attributes } = {}) {\n if (INJECTED_SCRIPTS.has(src)) {\n return INJECTED_SCRIPTS.get(src);\n }\n const maybePrevScript = document.querySelector(`script[src=\"${src}\"]`);\n if (maybePrevScript) {\n console.warn(`Script with \"${src}\" src is already present in DOM!`);\n maybePrevScript.remove();\n }\n const promise = new Promise((resolve, reject) => {\n const script = document.createElement(\"script\");\n script.onerror = reject;\n script.onload = () => {\n resolve();\n };\n for (const [key, value] of Object.entries(attributes || {})) {\n script.setAttribute(key, value);\n }\n script.setAttribute(\"data-injected-by\", \"ckeditor-integration\");\n script.type = \"text/javascript\";\n script.async = true;\n script.src = src;\n document.head.appendChild(script);\n const observer = new MutationObserver((mutations) => {\n const removedNodes = mutations.flatMap((mutation) => Array.from(mutation.removedNodes));\n if (removedNodes.includes(script)) {\n INJECTED_SCRIPTS.delete(src);\n observer.disconnect();\n }\n });\n observer.observe(document.head, {\n childList: true,\n subtree: true\n });\n });\n INJECTED_SCRIPTS.set(src, promise);\n return promise;\n}\nasync function injectScriptsInParallel(sources, props) {\n await Promise.all(\n sources.map((src) => injectScript(src, props))\n );\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nconst INJECTED_STYLESHEETS = /* @__PURE__ */ new Map();\nfunction injectStylesheet({\n href,\n placementInHead = \"start\",\n attributes = {}\n}) {\n if (INJECTED_STYLESHEETS.has(href)) {\n return INJECTED_STYLESHEETS.get(href);\n }\n const maybePrevStylesheet = document.querySelector(`link[href=\"${href}\"][rel=\"stylesheet\"]`);\n if (maybePrevStylesheet) {\n console.warn(`Stylesheet with \"${href}\" href is already present in DOM!`);\n maybePrevStylesheet.remove();\n }\n const appendLinkTagToHead = (link) => {\n const previouslyInjectedLinks = Array.from(\n document.head.querySelectorAll('link[data-injected-by=\"ckeditor-integration\"]')\n );\n switch (placementInHead) {\n case \"start\":\n if (previouslyInjectedLinks.length) {\n previouslyInjectedLinks.slice(-1)[0].after(link);\n } else {\n document.head.insertBefore(link, document.head.firstChild);\n }\n break;\n case \"end\":\n document.head.appendChild(link);\n break;\n }\n };\n const promise = new Promise((resolve, reject) => {\n const link = document.createElement(\"link\");\n for (const [key, value] of Object.entries(attributes || {})) {\n link.setAttribute(key, value);\n }\n link.setAttribute(\"data-injected-by\", \"ckeditor-integration\");\n link.rel = \"stylesheet\";\n link.href = href;\n link.onerror = reject;\n link.onload = () => {\n resolve();\n };\n appendLinkTagToHead(link);\n const observer = new MutationObserver((mutations) => {\n const removedNodes = mutations.flatMap((mutation) => Array.from(mutation.removedNodes));\n if (removedNodes.includes(link)) {\n INJECTED_STYLESHEETS.delete(href);\n observer.disconnect();\n }\n });\n observer.observe(document.head, {\n childList: true,\n subtree: true\n });\n });\n INJECTED_STYLESHEETS.set(href, promise);\n return promise;\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction isSSR() {\n return typeof window === \"undefined\";\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction once(fn) {\n let lastResult = null;\n return (...args) => {\n if (!lastResult) {\n lastResult = {\n current: fn(...args)\n };\n }\n return lastResult.current;\n };\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction overwriteArray(source, destination) {\n destination.length = 0;\n destination.push(...source);\n return destination;\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction overwriteObject(source, destination) {\n for (const prop of Object.getOwnPropertyNames(destination)) {\n delete destination[prop];\n }\n for (const [key, value] of Object.entries(source)) {\n if (value !== destination && key !== \"prototype\" && key !== \"__proto__\") {\n destination[key] = value;\n }\n }\n return destination;\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction preloadResource(url, { attributes } = {}) {\n if (document.head.querySelector(`link[href=\"${url}\"][rel=\"preload\"]`)) {\n return;\n }\n const link = document.createElement(\"link\");\n for (const [key, value] of Object.entries(attributes || {})) {\n link.setAttribute(key, value);\n }\n link.setAttribute(\"data-injected-by\", \"ckeditor-integration\");\n link.rel = \"preload\";\n link.as = detectTypeOfResource(url);\n link.href = url;\n document.head.insertBefore(link, document.head.firstChild);\n}\nfunction detectTypeOfResource(url) {\n switch (true) {\n case /\\.css$/.test(url):\n return \"style\";\n case /\\.js$/.test(url):\n return \"script\";\n default:\n return \"fetch\";\n }\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction shallowCompareArrays(a, b) {\n if (a === b) {\n return true;\n }\n if (!a || !b) {\n return false;\n }\n for (let i = 0; i < a.length; ++i) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nconst HEX_NUMBERS = new Array(256).fill(\"\").map((_, index) => (\"0\" + index.toString(16)).slice(-2));\nfunction uid() {\n const [r1, r2, r3, r4] = crypto.getRandomValues(new Uint32Array(4));\n return \"e\" + HEX_NUMBERS[r1 >> 0 & 255] + HEX_NUMBERS[r1 >> 8 & 255] + HEX_NUMBERS[r1 >> 16 & 255] + HEX_NUMBERS[r1 >> 24 & 255] + HEX_NUMBERS[r2 >> 0 & 255] + HEX_NUMBERS[r2 >> 8 & 255] + HEX_NUMBERS[r2 >> 16 & 255] + HEX_NUMBERS[r2 >> 24 & 255] + HEX_NUMBERS[r3 >> 0 & 255] + HEX_NUMBERS[r3 >> 8 & 255] + HEX_NUMBERS[r3 >> 16 & 255] + HEX_NUMBERS[r3 >> 24 & 255] + HEX_NUMBERS[r4 >> 0 & 255] + HEX_NUMBERS[r4 >> 8 & 255] + HEX_NUMBERS[r4 >> 16 & 255] + HEX_NUMBERS[r4 >> 24 & 255];\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction uniq(source) {\n return Array.from(new Set(source));\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nasync function waitForWindowEntry(entryNames, config) {\n const tryPickBundle = () => entryNames.map((name) => window[name]).filter(Boolean)[0];\n return waitFor(\n () => {\n const result = tryPickBundle();\n if (!result) {\n throw new Error(`Window entry \"${entryNames.join(\",\")}\" not found.`);\n }\n return result;\n },\n config\n );\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction filterObjectValues(obj, filter) {\n const filteredEntries = Object.entries(obj).filter(([key, value]) => filter(value, key));\n return Object.fromEntries(filteredEntries);\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction filterBlankObjectValues(obj) {\n return filterObjectValues(\n obj,\n (value) => value !== null && value !== void 0\n );\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction mapObjectValues(obj, mapper) {\n const mappedEntries = Object.entries(obj).map(([key, value]) => [key, mapper(value, key)]);\n return Object.fromEntries(mappedEntries);\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction without(itemsToRemove, items) {\n return items.filter((item) => !itemsToRemove.includes(item));\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction appendExtraPluginsToEditorConfig(config, plugins) {\n const extraPlugins = config.extraPlugins || [];\n return {\n ...config,\n extraPlugins: [\n ...extraPlugins,\n ...plugins.filter((item) => !extraPlugins.includes(item))\n ]\n };\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction isSemanticVersion(version) {\n return !!version && /^\\d+\\.\\d+\\.\\d+/.test(version);\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction isCKCdnTestingVersion(version) {\n if (!version) {\n return false;\n }\n return [\"nightly\", \"alpha\", \"internal\", \"nightly-\", \"staging\"].some((testVersion) => version.includes(testVersion));\n}\nfunction isCKCdnVersion(version) {\n return isSemanticVersion(version) || isCKCdnTestingVersion(version);\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction destructureSemanticVersion(version) {\n if (!isSemanticVersion(version)) {\n throw new Error(`Invalid semantic version: ${version || \"<blank>\"}.`);\n }\n const [major, minor, patch] = version.split(\".\");\n return {\n major: Number.parseInt(major, 10),\n minor: Number.parseInt(minor, 10),\n patch: Number.parseInt(patch, 10)\n };\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction getLicenseVersionFromEditorVersion(version) {\n if (isCKCdnTestingVersion(version)) {\n return 3;\n }\n const { major } = destructureSemanticVersion(version);\n switch (true) {\n case major >= 44:\n return 3;\n case major >= 38:\n return 2;\n default:\n return 1;\n }\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction getCKBaseBundleInstallationInfo() {\n const { CKEDITOR_VERSION, CKEDITOR } = window;\n if (!isCKCdnVersion(CKEDITOR_VERSION)) {\n return null;\n }\n return {\n source: CKEDITOR ? \"cdn\" : \"npm\",\n version: CKEDITOR_VERSION\n };\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction getSupportedLicenseVersionInstallationInfo() {\n const installationInfo = getCKBaseBundleInstallationInfo();\n if (!installationInfo) {\n return null;\n }\n return getLicenseVersionFromEditorVersion(installationInfo.version);\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction isCKEditorFreeLicense(licenseKey, licenseVersion) {\n licenseVersion ||= getSupportedLicenseVersionInstallationInfo() || void 0;\n switch (licenseVersion) {\n case 1:\n case 2:\n return licenseKey === void 0;\n case 3:\n return licenseKey === \"GPL\";\n default: {\n return false;\n }\n }\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction createIntegrationUsageDataPlugin(integrationName, usageData) {\n return function IntegrationUsageDataPlugin(editor) {\n if (isCKEditorFreeLicense(editor.config.get(\"licenseKey\"))) {\n return;\n }\n editor.on(\"collectUsageData\", (source, { setUsageData }) => {\n setUsageData(`integration.${integrationName}`, usageData);\n });\n };\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nconst CK_CDN_URL = \"https://cdn.ckeditor.com\";\nfunction createCKCdnUrl(bundle, file, version) {\n return `${CK_CDN_URL}/${bundle}/${version}/${file}`;\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nconst CKBOX_CDN_URL = \"https://cdn.ckbox.io\";\nfunction createCKBoxCdnUrl(bundle, file, version) {\n return `${CKBOX_CDN_URL}/${bundle}/${version}/${file}`;\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nconst CK_DOCS_URL = \"https://ckeditor.com/docs/ckeditor5\";\nfunction createCKDocsUrl(path, version = \"latest\") {\n return `${CK_DOCS_URL}/${version}/${path}`;\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction createCKCdnBaseBundlePack({\n version,\n translations,\n createCustomCdnUrl = createCKCdnUrl\n}) {\n const urls = {\n scripts: [\n // Load the main script of the base features.\n createCustomCdnUrl(\"ckeditor5\", \"ckeditor5.umd.js\", version),\n // Load all JavaScript files from the base features.\n // EN bundle is prebuilt into the main script, so we don't need to load it separately.\n ...without([\"en\"], translations || []).map(\n (translation) => createCustomCdnUrl(\"ckeditor5\", `translations/${translation}.umd.js`, version)\n )\n ],\n stylesheets: [\n createCustomCdnUrl(\"ckeditor5\", \"ckeditor5.css\", version)\n ]\n };\n return {\n // Preload resources specified in the pack, before loading the main script.\n preload: [\n ...urls.stylesheets,\n ...urls.scripts\n ],\n scripts: [\n // It's safe to load translations and the main script in parallel.\n async (attributes) => injectScriptsInParallel(urls.scripts, attributes)\n ],\n // Load all stylesheets of the base features.\n stylesheets: urls.stylesheets,\n // Pick the exported global variables from the window object.\n checkPluginLoaded: async () => waitForWindowEntry([\"CKEDITOR\"]),\n // Check if the CKEditor base bundle is already loaded and throw an error if it is.\n beforeInject: () => {\n const installationInfo = getCKBaseBundleInstallationInfo();\n switch (installationInfo?.source) {\n case \"npm\":\n throw new Error(\n \"CKEditor 5 is already loaded from npm. Check the migration guide for more details: \" + createCKDocsUrl(\"updating/migration-to-cdn/vanilla-js.html\")\n );\n case \"cdn\":\n if (installationInfo.version !== version) {\n throw new Error(\n `CKEditor 5 is already loaded from CDN in version ${installationInfo.version}. Remove the old <script> and <link> tags loading CKEditor 5 to allow loading the ${version} version.`\n );\n }\n break;\n }\n }\n };\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction createCKCdnPremiumBundlePack({\n version,\n translations,\n createCustomCdnUrl = createCKCdnUrl\n}) {\n const urls = {\n scripts: [\n // Load the main script of the premium features.\n createCustomCdnUrl(\"ckeditor5-premium-features\", \"ckeditor5-premium-features.umd.js\", version),\n // Load all JavaScript files from the premium features.\n // EN bundle is prebuilt into the main script, so we don't need to load it separately.\n ...without([\"en\"], translations || []).map(\n (translation) => createCustomCdnUrl(\"ckeditor5-premium-features\", `translations/${translation}.umd.js`, version)\n )\n ],\n stylesheets: [\n createCustomCdnUrl(\"ckeditor5-premium-features\", \"ckeditor5-premium-features.css\", version)\n ]\n };\n return {\n // Preload resources specified in the pack, before loading the main script.\n preload: [\n ...urls.stylesheets,\n ...urls.scripts\n ],\n scripts: [\n // It's safe to load translations and the main script in parallel.\n async (attributes) => injectScriptsInParallel(urls.scripts, attributes)\n ],\n // Load all stylesheets of the premium features.\n stylesheets: urls.stylesheets,\n // Pick the exported global variables from the window object.\n checkPluginLoaded: async () => waitForWindowEntry([\"CKEDITOR_PREMIUM_FEATURES\"])\n };\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nasync function loadCKCdnResourcesPack(pack) {\n let {\n htmlAttributes = {},\n scripts = [],\n stylesheets = [],\n preload,\n beforeInject,\n checkPluginLoaded\n } = normalizeCKCdnResourcesPack(pack);\n beforeInject?.();\n if (!preload) {\n preload = uniq([\n ...stylesheets.filter((item) => typeof item === \"string\"),\n ...scripts.filter((item) => typeof item === \"string\")\n ]);\n }\n for (const url of preload) {\n preloadResource(url, {\n attributes: htmlAttributes\n });\n }\n await Promise.all(\n uniq(stylesheets).map((href) => injectStylesheet({\n href,\n attributes: htmlAttributes,\n placementInHead: \"start\"\n }))\n );\n for (const script of uniq(scripts)) {\n const injectorProps = {\n attributes: htmlAttributes\n };\n if (typeof script === \"string\") {\n await injectScript(script, injectorProps);\n } else {\n await script(injectorProps);\n }\n }\n return checkPluginLoaded?.();\n}\nfunction normalizeCKCdnResourcesPack(pack) {\n if (Array.isArray(pack)) {\n return {\n scripts: pack.filter(\n (item) => typeof item === \"function\" || item.endsWith(\".js\")\n ),\n stylesheets: pack.filter(\n (item) => item.endsWith(\".css\")\n )\n };\n }\n if (typeof pack === \"function\") {\n return {\n checkPluginLoaded: pack\n };\n }\n return pack;\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction combineCKCdnBundlesPacks(packs) {\n const normalizedPacks = mapObjectValues(\n filterBlankObjectValues(packs),\n normalizeCKCdnResourcesPack\n );\n const mergedPacks = Object.values(normalizedPacks).reduce(\n (acc, pack) => {\n acc.scripts.push(...pack.scripts ?? []);\n acc.stylesheets.push(...pack.stylesheets ?? []);\n acc.preload.push(...pack.preload ?? []);\n return acc;\n },\n {\n preload: [],\n scripts: [],\n stylesheets: []\n }\n );\n const checkPluginLoaded = async () => {\n const exportedGlobalVariables = /* @__PURE__ */ Object.create(null);\n for (const [name, pack] of Object.entries(normalizedPacks)) {\n exportedGlobalVariables[name] = await pack?.checkPluginLoaded?.();\n }\n return exportedGlobalVariables;\n };\n const beforeInject = () => {\n for (const pack of Object.values(normalizedPacks)) {\n pack.beforeInject?.();\n }\n };\n return {\n ...mergedPacks,\n beforeInject,\n checkPluginLoaded\n };\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction getCKBoxInstallationInfo() {\n const version = window.CKBox?.version;\n if (!isSemanticVersion(version)) {\n return null;\n }\n return {\n source: \"cdn\",\n version\n };\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction createCKBoxBundlePack({\n version,\n theme = \"lark\",\n translations,\n createCustomCdnUrl = createCKBoxCdnUrl\n}) {\n return {\n // Load the main script of the base features.\n scripts: [\n createCustomCdnUrl(\"ckbox\", \"ckbox.js\", version),\n // EN bundle is prebuilt into the main script, so we don't need to load it separately.\n ...without([\"en\"], translations || []).map(\n (translation) => createCustomCdnUrl(\"ckbox\", `translations/${translation}.js`, version)\n )\n ],\n // Load optional theme, if provided. It's not required but recommended because it improves the look and feel.\n ...theme && {\n stylesheets: [\n createCustomCdnUrl(\"ckbox\", `styles/themes/${theme}.css`, version)\n ]\n },\n // Pick the exported global variables from the window object.\n checkPluginLoaded: async () => waitForWindowEntry([\"CKBox\"]),\n // Check if the CKBox bundle is already loaded and throw an error if it is.\n beforeInject: () => {\n const installationInfo = getCKBoxInstallationInfo();\n if (installationInfo && installationInfo.version !== version) {\n throw new Error(\n `CKBox is already loaded from CDN in version ${installationInfo.version}. Remove the old <script> and <link> tags loading CKBox to allow loading the ${version} version.`\n );\n }\n }\n };\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction isCKCdnSupportedByEditorVersion(version) {\n if (isCKCdnTestingVersion(version)) {\n return true;\n }\n const { major } = destructureSemanticVersion(version);\n const licenseVersion = getLicenseVersionFromEditorVersion(version);\n switch (licenseVersion) {\n case 3:\n return true;\n default:\n return major === 43;\n }\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction combineCdnPluginsPacks(pluginsPacks) {\n const normalizedPluginsPacks = mapObjectValues(pluginsPacks, (pluginPack, pluginName) => {\n if (!pluginPack) {\n return void 0;\n }\n const normalizedPluginPack = normalizeCKCdnResourcesPack(pluginPack);\n return {\n // Provide default window accessor object if the plugin pack does not define it.\n checkPluginLoaded: async () => waitForWindowEntry([pluginName]),\n // Transform the plugin pack to a normalized advanced pack.\n ...normalizedPluginPack\n };\n });\n return combineCKCdnBundlesPacks(\n normalizedPluginsPacks\n );\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction loadCKEditorCloud(config) {\n const {\n version,\n translations,\n plugins,\n premium,\n ckbox,\n createCustomCdnUrl,\n injectedHtmlElementsAttributes = {\n crossorigin: \"anonymous\"\n }\n } = config;\n validateCKEditorVersion(version);\n const pack = combineCKCdnBundlesPacks({\n CKEditor: createCKCdnBaseBundlePack({\n version,\n translations,\n createCustomCdnUrl\n }),\n ...premium && {\n CKEditorPremiumFeatures: createCKCdnPremiumBundlePack({\n version,\n translations,\n createCustomCdnUrl\n })\n },\n ...ckbox && {\n CKBox: createCKBoxBundlePack(ckbox)\n },\n loadedPlugins: combineCdnPluginsPacks(plugins ?? {})\n });\n return loadCKCdnResourcesPack(\n {\n ...pack,\n htmlAttributes: injectedHtmlElementsAttributes\n }\n );\n}\nfunction validateCKEditorVersion(version) {\n if (isCKCdnTestingVersion(version)) {\n console.warn(\n \"You are using a testing version of CKEditor 5. Please remember that it is not suitable for production environments.\"\n );\n }\n if (!isCKCdnSupportedByEditorVersion(version)) {\n throw new Error(\n `The CKEditor 5 CDN can't be used with the given editor version: ${version}. Please make sure you are using at least the CKEditor 5 version 44.`\n );\n }\n}\n\nexport { CKBOX_CDN_URL, CK_CDN_URL, INJECTED_SCRIPTS, INJECTED_STYLESHEETS, appendExtraPluginsToEditorConfig, createCKBoxCdnUrl, createCKCdnUrl, createDefer, createIntegrationUsageDataPlugin, filterBlankObjectValues, filterObjectValues, injectScript, injectScriptsInParallel, injectStylesheet, isCKEditorFreeLicense, isSSR, loadCKEditorCloud, mapObjectValues, once, overwriteArray, overwriteObject, preloadResource, shallowCompareArrays, uid, uniq, waitFor, waitForWindowEntry, without };\n//# sourceMappingURL=index.js.map\n","import * as Vue from \"vue\";\nimport { version, defineComponent, mergeModels, useModel, ref, watch, onMounted, markRaw, onBeforeUnmount, openBlock, createBlock, resolveDynamicComponent, computed, watchEffect, shallowReadonly, toValue } from \"vue\";\nimport { debounce } from \"lodash-es\";\nimport { createIntegrationUsageDataPlugin, isCKEditorFreeLicense, appendExtraPluginsToEditorConfig, uid, loadCKEditorCloud } from \"@ckeditor/ckeditor5-integrations-common\";\nimport { loadCKEditorCloud as loadCKEditorCloud2 } from \"@ckeditor/ckeditor5-integrations-common\";\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md.\n */\nconst VueIntegrationUsageDataPlugin = createIntegrationUsageDataPlugin(\n \"vue\",\n {\n version: \"7.3.0\",\n frameworkVersion: version\n }\n);\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md.\n */\nfunction appendAllIntegrationPluginsToConfig(editorConfig) {\n if (isCKEditorFreeLicense(editorConfig.licenseKey)) {\n return editorConfig;\n }\n return appendExtraPluginsToEditorConfig(editorConfig, [\n /**\n * This part of the code is not executed in open-source implementations using a GPL key.\n * It only runs when a specific license key is provided. If you are uncertain whether\n * this applies to your installation, please contact our support team.\n */\n VueIntegrationUsageDataPlugin\n ]);\n}\nconst VUE_INTEGRATION_READ_ONLY_LOCK_ID = \"Lock from Vue integration (@ckeditor/ckeditor5-vue)\";\nconst INPUT_EVENT_DEBOUNCE_WAIT = 300;\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...{\n name: \"CKEditor\"\n },\n __name: \"ckeditor\",\n props: /* @__PURE__ */ mergeModels({\n editor: {},\n config: { default: () => ({}) },\n tagName: { default: \"div\" },\n disabled: { type: Boolean, default: false },\n disableTwoWayDataBinding: { type: Boolean, default: false }\n }, {\n \"modelValue\": { type: String, default: \"\" },\n \"modelModifiers\": {}\n }),\n emits: /* @__PURE__ */ mergeModels([\"ready\", \"destroy\", \"blur\", \"focus\", \"input\", \"update:modelValue\"], [\"update:modelValue\"]),\n setup(__props, { expose: __expose, emit: __emit }) {\n const model = useModel(__props, \"modelValue\");\n const props = __props;\n const emit = __emit;\n const element = ref();\n const instance = ref();\n const lastEditorData = ref();\n __expose({\n instance,\n lastEditorData\n });\n watch(model, (newModel) => {\n if (instance.value && newModel !== lastEditorData.value) {\n instance.value.data.set(newModel);\n }\n });\n watch(() => props.disabled, (readOnlyMode) => {\n if (readOnlyMode) {\n instance.value.enableReadOnlyMode(VUE_INTEGRATION_READ_ONLY_LOCK_ID);\n } else {\n instance.value.disableReadOnlyMode(VUE_INTEGRATION_READ_ONLY_LOCK_ID);\n }\n });\n function checkVersion() {\n const version2 = window.CKEDITOR_VERSION;\n if (!version2) {\n return console.warn('Cannot find the \"CKEDITOR_VERSION\" in the \"window\" scope.');\n }\n const [major] = version2.split(\".\").map(Number);\n if (major >= 42 || version2.startsWith(\"0.0.0\")) {\n return;\n }\n console.warn(\"The <CKEditor> component requires using CKEditor 5 in version 42+ or nightly build.\");\n }\n function setUpEditorEvents(editor) {\n const emitDebouncedInputEvent = debounce((evt) => {\n if (props.disableTwoWayDataBinding) {\n return;\n }\n const data = lastEditorData.value = editor.data.get();\n emit(\"update:modelValue\", data, evt, editor);\n emit(\"input\", data, evt, editor);\n }, INPUT_EVENT_DEBOUNCE_WAIT, { leading: true });\n editor.model.document.on(\"change:data\", emitDebouncedInputEvent);\n editor.editing.view.document.on(\"focus\", (evt) => {\n emit(\"focus\", evt, editor);\n });\n editor.editing.view.document.on(\"blur\", (evt) => {\n emit(\"blur\", evt, editor);\n });\n }\n checkVersion();\n onMounted(() => {\n const editorConfig = appendAllIntegrationPluginsToConfig(\n Object.assign({}, props.config)\n );\n if (model.value) {\n editorConfig.initialData = model.value;\n }\n props.editor.create(element.value, editorConfig).then((editor) => {\n instance.value = markRaw(editor);\n setUpEditorEvents(editor);\n if (model.value !== editorConfig.initialData) {\n editor.data.set(model.value);\n }\n if (props.disabled) {\n editor.enableReadOnlyMode(VUE_INTEGRATION_READ_ONLY_LOCK_ID);\n }\n emit(\"ready\", editor);\n }).catch((error) => {\n console.error(error);\n });\n });\n onBeforeUnmount(() => {\n if (instance.value) {\n instance.value.destroy();\n instance.value = void 0;\n }\n emit(\"destroy\");\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(resolveDynamicComponent(_ctx.tagName), {\n ref_key: \"element\",\n ref: element\n }, null, 512);\n };\n }\n});\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md.\n */\nconst useAsync = (asyncFunc) => {\n const lastQueryUUID = ref(null);\n const error = ref(null);\n const data = ref(null);\n const loading = computed(() => lastQueryUUID.value !== null);\n watchEffect(async () => {\n const currentQueryUID = uid();\n lastQueryUUID.value = currentQueryUID;\n data.value = null;\n error.value = null;\n const shouldDiscardQuery = () => lastQueryUUID.value !== currentQueryUID;\n try {\n const result = await asyncFunc();\n if (!shouldDiscardQuery()) {\n data.value = result;\n }\n } catch (err) {\n if (!shouldDiscardQuery()) {\n error.value = err;\n }\n } finally {\n if (!shouldDiscardQuery()) {\n lastQueryUUID.value = null;\n }\n }\n });\n return {\n loading: shallowReadonly(loading),\n data: shallowReadonly(data),\n error: shallowReadonly(error)\n };\n};\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md.\n */\nfunction useCKEditorCloud(config) {\n return useAsync(\n () => loadCKEditorCloud(\n toValue(config)\n )\n );\n}\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n/* istanbul ignore if -- @preserve */\nif (!Vue.version || !Vue.version.startsWith(\"3.\")) {\n throw new Error(\n \"The CKEditor plugin works only with Vue 3+. For more information, please refer to https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/frameworks/vuejs-v3.html\"\n );\n}\nconst CkeditorPlugin = {\n /**\n * Installs the plugin, registering the `<ckeditor>` component.\n *\n * @param app The application instance.\n */\n install(app) {\n app.component(\"Ckeditor\", _sfc_main);\n }\n};\nexport {\n _sfc_main as Ckeditor,\n CkeditorPlugin,\n loadCKEditorCloud2 as loadCKEditorCloud,\n useCKEditorCloud\n};\n//# sourceMappingURL=ckeditor.js.map\n","export interface VuetifyInputsSettings {\n defaultVariant?: 'outlined' | 'plain' | 'underlined' | 'filled' | 'solo' | 'solo-inverted' | 'solo-filled',\n}\n\nexport const vuetifyInputsSettingsKey = Symbol('vuetifyInputsSettingsKey');\n","import Form, { ValidationErrorRenderContent } from '@dynamicforms/vue-forms';\nimport { isEmpty, isString } from 'lodash-es';\nimport { computed, inject, ref } from 'vue';\n\nimport { VuetifyInputsSettings, vuetifyInputsSettingsKey } from './settings';\n\nexport class Label {\n constructor(public text: string, public icon?: string, public iconComponent: string = 'v-icon') {}\n}\n\nexport interface BaseProps<T = any> {\n control?: Form.IField<T>,\n modelValue?: T;\n label?: string | Label;\n errors?: string[];\n placeholder?: string;\n helpText?: string;\n hint?: string,\n enabled?: boolean,\n visibility?: Form.DisplayMode,\n cssClass?: string;\n clearable?: boolean;\n}\n\nexport const defaultBaseProps = { enabled: undefined, clearable: true };\n\nexport interface BaseEmits<T = any> {\n (e: 'update:modelValue', value: T): void;\n (e: 'click:clear'): void;\n}\n\nexport function useInputBase<T = any>(props: BaseProps<T>, emit: BaseEmits<T>) {\n const settings = inject<VuetifyInputsSettings>(vuetifyInputsSettingsKey, { });\n const internalValue = ref<T | null>(null);\n\n const value = computed({\n get(): T {\n if (props.control) return props.control.value as T;\n if (props.modelValue === undefined) return internalValue.value as T;\n return props.modelValue as T;\n },\n set(newValue: T) {\n if (props.control) props.control.value = newValue;\n if (props.modelValue === undefined) internalValue.value = newValue;\n emit('update:modelValue', newValue);\n },\n });\n\n if (props.control && !(props.control instanceof Form.FieldBase)) {\n throw new Error('control prop is not a vue-form control instance');\n }\n\n const touched = ref(false);\n const valid = computed(() => (props.control ? props.control.valid : true));\n const errors = computed(\n () => (props.control ?\n props.control.errors :\n (props.errors || []).map((error) => new ValidationErrorRenderContent(error))),\n );\n const anyErrors = computed(() => (touched.value && errors.value.length > 0 ? ' ' : undefined));\n const enabled = computed(() => (props.control ? props.control.enabled : (props.enabled !== false)));\n const visibility = computed(\n () => (props.control ? props.control.visibility : (props.visibility || Form.DisplayMode.FULL)),\n );\n const label = computed(\n (): Label => (isString(props.label || '') ? new Label((<string>props.label) || '') : <Label> props.label),\n );\n const placeholder = computed(() => (props.placeholder || ''));\n const helpText = computed(() => props.helpText || '');\n const hint = computed(() => props.hint || '');\n const cssClass = computed(() => props.cssClass || '');\n\n return {\n value,\n valid,\n enabled,\n errors,\n visibility,\n label,\n touched,\n\n vuetifyBindings: computed(() => ({\n name: props.control?.fieldName,\n class: cssClass.value,\n\n density: 'default' as 'default',\n variant: (settings.defaultVariant ?? 'underlined') as 'underlined',\n\n label: label.value.text,\n messages: anyErrors.value,\n errorMessages: anyErrors.value,\n // 'error-count': errors?.value.length || 0,\n readonly: !enabled.value,\n disabled: !enabled.value,\n\n placeholder: placeholder.value,\n 'persistent-placeholder': !isEmpty(placeholder.value),\n\n hint: hint.value,\n persistentHint: true, // we want persistent hint always\n hideDetails: <boolean | 'auto' | undefined>'auto', // we want to hide the hint element when hint isn't there\n helpText: helpText.value,\n })),\n };\n}\n","<template>\n <v-input\n v-if=\"visibility !== DisplayMode.SUPPRESS\"\n :name=\"vuetifyBindings.name\"\n :hint=\"vuetifyBindings.hint\"\n :persistent-hint=\"vuetifyBindings.persistentHint\"\n :hide-details=\"vuetifyBindings.hideDetails\"\n :error-messages=\"vuetifyBindings.errorMessages\"\n :class=\"[\n cssClass,\n {\n 'd-none': visibility === DisplayMode.HIDDEN,\n invisible: visibility === DisplayMode.INVISIBLE,\n },\n ]\"\n >\n <v-field\n :variant=\"vuetifyBindings.variant\"\n :label=\"vuetifyBindings.label\"\n :disabled=\"vuetifyBindings.disabled\"\n :clearable=\"isClearable\"\n :persistent-clear=\"true\"\n :dirty=\"!!value\"\n :active=\"focused\"\n :loading=\"loading\"\n @click:clear=\"emits('click:clear')\"\n @update:focused=\"(isFocused) => setFocused(isFocused)\"\n >\n <template v-if=\"label.icon\" #label=\"labelData\"><df-label :data=\"labelData\" :label=\"label\"/></template>\n <template #default=\"slotProps\">\n <div class=\"d-flex w-100 style-resetting\"><slot v-bind=\"slotProps\"/></div>\n </template>\n <template #loader=\"loaderProps\"><slot name=\"loader\" v-bind=\"loaderProps\"/></template>\n <template v-if=\"$slots['prepend-inner']\" #prepend-inner=\"prependInnerProps\">\n <slot name=\"prepend-inner\" v-bind=\"prependInnerProps\"/>\n </template>\n </v-field>\n <template #message=\"{ message }\">\n <messages-widget :message=\"message\" :errors=\"errors\"/>\n </template>\n <template v-if=\"$slots.prepend\" #prepend=\"prependProps\"><slot name=\"prepend\" v-bind=\"prependProps\"/></template>\n </v-input>\n</template>\n\n<script setup lang=\"ts\">\nimport { DisplayMode } from '@dynamicforms/vue-forms';\nimport { computed, ref, unref } from 'vue';\n\nimport DfLabel from './df-label.vue';\nimport { BaseEmits, BaseProps, useInputBase } from './input-base';\nimport MessagesWidget from './messages-widget.vue';\n\nconst props = defineProps<BaseProps & { loading?: boolean }>();\nconst emits = defineEmits<BaseEmits & { (e: 'blur'): void; }>();\n\nconst { errors, label, value, touched, visibility, vuetifyBindings } = useInputBase(props, emits);\n\nconst isClearable = computed(() => !!(unref(props.clearable) && unref(value)));\nconst focused = ref<boolean>(false);\n\nfunction setFocused(isFocused: boolean) {\n focused.value = isFocused;\n if (!isFocused) {\n touched.value = true;\n emits('blur');\n }\n}\n</script>\n\n<style scoped>\n:deep(.style-resetting .v-field__overlay) {\n background-color: transparent;\n}\n:deep(.style-resetting .v-field__outline::before),\n:deep(.style-resetting .v-field__outline::after) {\n content: none !important;\n}\n</style>\n","export const translatableStrings = {\n Yes: 'Yes',\n No: 'No',\n Close: 'Close',\n};\n\nexport function translateStrings(translationCallback: (s: string) => string) {\n Object.keys(translatableStrings).forEach((key) => {\n translatableStrings[key as keyof typeof translatableStrings] = translationCallback(key);\n });\n}\n","/**\n * DisplayMode enum provides an enumeration for supported ways of rendering a particular object in the DOM\n */\nenum ActionDisplayStyle {\n // This enum is actually declared in dynamicforms.action.py\n BUTTON = 0, // action should render as a button\n TEXT = 1, // action should render as a link text\n}\n\nexport const defaultDisplayStyle = ActionDisplayStyle.BUTTON;\n\nnamespace ActionDisplayStyle {\n export function fromString(mode: string): ActionDisplayStyle {\n if (mode.toUpperCase() === 'BUTTON') return ActionDisplayStyle.BUTTON;\n if (mode.toUpperCase() === 'TEXT') return ActionDisplayStyle.TEXT;\n return defaultDisplayStyle;\n }\n\n export function fromAny(mode: any): ActionDisplayStyle {\n const input = (typeof mode === 'number') ? mode : ActionDisplayStyle.fromString(mode as string);\n if (Object.values(ActionDisplayStyle).includes(input)) return input;\n return defaultDisplayStyle;\n }\n\n export function isDefined(mode: number | string): boolean {\n const check = (typeof mode === 'number') ? mode : ActionDisplayStyle.fromString(mode as string);\n return Object.values(ActionDisplayStyle).includes(check);\n }\n}\n\nObject.freeze(ActionDisplayStyle);\n\nexport { ActionDisplayStyle };\n","// eslint-disable-next-line max-classes-per-file\nimport { computed } from 'vue';\nimport { useDisplay } from 'vuetify';\n\nexport const responsiveBreakpoints = ['xs', 'sm', 'md', 'lg', 'xl'] as const;\nexport type BreakpointNames = typeof responsiveBreakpoints[number];\nexport type BreakpointsJSON<T extends Record<string, any>> = T & Partial<Record<BreakpointNames, T>>;\n\nexport abstract class ResponsiveRenderOptions<T extends Record<string, any>> {\n protected readonly _value: BreakpointsJSON<T>;\n\n constructor(data?: BreakpointsJSON<T>) {\n this._value = this.cleanBreakpoint(data as T, true)!;\n if (data) {\n responsiveBreakpoints.forEach((bp) => {\n const options = this.cleanBreakpoint(data[bp]);\n if (options) this._value[bp] = options;\n });\n }\n }\n\n getOptionsForBreakpoint(breakpoint: BreakpointNames): T {\n const result = this.cleanBreakpoint(this._value as T) as BreakpointsJSON<T>;\n const fields = Object.keys(result);\n for (const bp of responsiveBreakpoints) {\n const bpData = this._value[bp];\n for (const field of fields) {\n if (bpData?.[field] != null) (<any> result)[field] = bpData[field];\n }\n if (bp === breakpoint) break;\n }\n return result;\n }\n\n protected abstract cleanBreakpoint(bp?: T, defaultIfEmpty?: boolean): T | null;\n}\n\nexport function getBreakpointName(dp: ReturnType<typeof useDisplay>): BreakpointNames {\n if (dp.xlAndUp.value) return 'xl';\n if (dp.lgAndUp.value) return 'lg';\n if (dp.mdAndUp.value) return 'md';\n if (dp.smAndUp.value) return 'sm';\n return 'xs';\n}\n\nexport function useBreakpoint() {\n const display = useDisplay();\n\n return computed<BreakpointNames>(() => getBreakpointName(display));\n}\n","import { ActionValue } from '@dynamicforms/vue-forms';\nimport { isBoolean, isObjectLike, isString } from 'lodash-es';\n\nimport { ActionDisplayStyle } from './action-display-style';\nimport { BreakpointsJSON, ResponsiveRenderOptions } from './responsive-render-options';\n\nexport interface ActionRenderOptions extends ActionValue {\n name?: string;\n renderAs?: ActionDisplayStyle;\n showLabel?: boolean;\n showIcon?: boolean;\n}\nexport type ActionBreakpointOptions = BreakpointsJSON<ActionRenderOptions>;\n\nexport class ResponsiveActionRenderOptions extends ResponsiveRenderOptions<ActionRenderOptions> {\n // eslint-disable-next-line class-methods-use-this\n protected cleanBreakpoint(bp?: ActionRenderOptions, defaultIfEmpty: boolean = false): ActionRenderOptions | null {\n if ((!bp || !isObjectLike(bp)) && !defaultIfEmpty) return null;\n\n const result: ActionRenderOptions = {};\n if (defaultIfEmpty) {\n result.renderAs = ActionDisplayStyle.BUTTON;\n result.showLabel = true;\n result.showIcon = true;\n }\n\n if (bp) {\n if (bp.renderAs != null) result.renderAs = ActionDisplayStyle.fromAny(bp.renderAs);\n if (isString(bp.label)) result.label = bp.label;\n if (isString(bp.icon)) result.icon = bp.icon;\n if (isBoolean(bp.showLabel)) result.showLabel = bp.showLabel;\n if (isBoolean(bp.showIcon)) result.showIcon = bp.showIcon;\n }\n\n return Object.keys(result).length ? result : null;\n }\n}\n","import { Action as FormAction, IField, IFieldConstructorParams } from '@dynamicforms/vue-forms';\nimport { isEmpty, isString } from 'lodash-es';\nimport { computed, Ref } from 'vue';\n\nimport { translatableStrings } from '../translations';\n\nimport { ActionDisplayStyle } from './action-display-style';\nimport { ActionBreakpointOptions, ActionRenderOptions, ResponsiveActionRenderOptions } from './action-render-options';\nimport { BreakpointNames } from './responsive-render-options';\n\n// @ts-ignore: prevent TS from complaining how create method is not ok because its declaration differs from Field's\nclass Action extends FormAction<ActionBreakpointOptions> {\n static create<T extends ActionBreakpointOptions = ActionBreakpointOptions>(\n params?: Partial<IFieldConstructorParams<T>>,\n ): Action {\n return super.create<T>(params) as any as Action;\n }\n\n getBreakpointValue(breakpoint: Ref<BreakpointNames>) {\n return computed(() => {\n const responsiveValue = new ResponsiveActionRenderOptions(this.value);\n const partial = responsiveValue.getOptionsForBreakpoint(breakpoint.value);\n return {\n name: partial.name,\n label: partial.showLabel ? partial.label : undefined,\n icon: partial.showIcon ? partial.icon : undefined,\n renderAs: partial.renderAs,\n showLabel: isString(partial.label) && !isEmpty(partial.label) ? partial.showLabel : false,\n showIcon: isString(partial.icon) && !isEmpty(partial.icon) ? partial.showIcon : false,\n } as ActionRenderOptions;\n });\n }\n\n get name() { return this.value.name;