@prismicio/vue 5.1.0 → 5.2.0
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/PrismicRichText/DeprecatedPrismicRichText.vue.cjs +8 -8
- package/dist/PrismicRichText/DeprecatedPrismicRichText.vue.cjs.map +1 -1
- package/dist/PrismicRichText/DeprecatedPrismicRichText.vue.js +9 -9
- package/dist/PrismicRichText/DeprecatedPrismicRichText.vue.js.map +1 -1
- package/dist/PrismicTable/PrismicTable.vue.cjs +2 -2
- package/dist/PrismicTable/PrismicTable.vue.cjs.map +1 -1
- package/dist/PrismicTable/PrismicTable.vue.js +2 -2
- package/dist/PrismicTable/PrismicTable.vue.js.map +1 -1
- package/dist/PrismicTable/PrismicTableRow.vue.cjs +1 -1
- package/dist/PrismicTable/PrismicTableRow.vue.cjs.map +1 -1
- package/dist/PrismicTable/PrismicTableRow.vue.js +1 -1
- package/dist/PrismicTable/PrismicTableRow.vue.js.map +1 -1
- package/dist/package.json.cjs +1 -1
- package/dist/package.json.js +1 -1
- package/package.json +2 -2
- package/src/PrismicRichText/DeprecatedPrismicRichText.vue +9 -8
- package/src/PrismicTable/PrismicTable.vue +2 -2
- package/src/PrismicTable/PrismicTableRow.vue +1 -1
|
@@ -65,14 +65,14 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
65
65
|
);
|
|
66
66
|
links = [];
|
|
67
67
|
};
|
|
68
|
-
vue.
|
|
69
|
-
|
|
70
|
-
()
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
);
|
|
68
|
+
vue.onMounted(() => {
|
|
69
|
+
removeListeners();
|
|
70
|
+
vue.nextTick(addListeners);
|
|
71
|
+
});
|
|
72
|
+
vue.watch(html, () => {
|
|
73
|
+
removeListeners();
|
|
74
|
+
vue.nextTick(addListeners);
|
|
75
|
+
});
|
|
76
76
|
vue.onBeforeUnmount(() => {
|
|
77
77
|
removeListeners();
|
|
78
78
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeprecatedPrismicRichText.vue.cjs","sources":["../../src/PrismicRichText/DeprecatedPrismicRichText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n// TODO: Remove in v6\nimport { asHTML, isFilled } from \"@prismicio/client\"\nimport { DEV } from \"esm-env\"\nimport type { Component } from \"vue\"\nimport {\n\tcomputed,\n\tinject,\n\tnextTick,\n\tonBeforeUnmount,\n\tonMounted,\n\tref,\n\twatch,\n} from \"vue\"\nimport { routerKey } from \"vue-router\"\n\nimport { devMsg } from \"../lib/devMsg\"\nimport { isInternalURL } from \"../lib/isInternalURL\"\n\nimport { usePrismic } from \"../usePrismic\"\n\nimport type { PrismicRichTextProps } from \"./PrismicRichText.vue\"\n\n/**\n * The default component rendered to wrap the HTML output.\n */\nconst defaultWrapper = \"div\"\n\nconst props = defineProps<\n\tPick<\n\t\tPrismicRichTextProps,\n\t\t\"field\" | \"linkResolver\" | \"serializer\" | \"wrapper\"\n\t> & { fallback?: string }\n>()\ndefineOptions({ name: \"DeprecatedPrismicRichText\" })\n\nconst { options } = usePrismic()\n\nif (DEV) {\n\tonMounted(() => {\n\t\tconsole.warn(\n\t\t\t`[PrismicRichText] You're using the deprecated version of \\`<PrismicRichText>\\` because either the \\`serializer\\` prop or the plugin \\`richTextSerializer\\` option were provided. This API will be removed in a future major. For more details, see ${devMsg(\n\t\t\t\t\"html-serialization-is-deprecated-with-prismic-rich-text\",\n\t\t\t)}`,\n\t\t)\n\t})\n}\n\nconst html = computed(() => {\n\tif (!isFilled.richText(props.field)) {\n\t\treturn props.fallback ?? \"\"\n\t}\n\n\tconst linkResolver = props.linkResolver ?? options.linkResolver\n\tconst serializer = props.serializer ?? options.richTextSerializer\n\n\treturn asHTML(props.field, { linkResolver, serializer })\n})\n\n// Internal links handling\nconst root = ref<HTMLElement | Comment | Component | null>(null)\n\nconst maybeRouter = inject(routerKey, null)\n\ntype InternalLink = {\n\telement: HTMLAnchorElement\n\tlistener: EventListener\n}\n\nlet links: InternalLink[] = []\n\nconst navigate: EventListener = function (\n\tthis: { href: string },\n\tevent: Event,\n) {\n\tevent.preventDefault()\n\tmaybeRouter?.push(this.href)\n}\n\nconst addListeners = () => {\n\tconst node: HTMLElement | Comment | null =\n\t\troot.value && \"$el\" in root.value ? root.value.$el : root.value\n\tif (node && \"querySelectorAll\" in node) {\n\t\t// Get all internal link tags and add listeners on them\n\t\tlinks = Array.from(node.querySelectorAll(\"a\"))\n\t\t\t.map((element) => {\n\t\t\t\tconst href = element.getAttribute(\"href\")\n\n\t\t\t\tif (href && isInternalURL(href)) {\n\t\t\t\t\tconst listener = navigate.bind({ href })\n\t\t\t\t\telement.addEventListener(\"click\", listener)\n\n\t\t\t\t\treturn { element, listener }\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t})\n\t\t\t.filter((link): link is InternalLink => link as boolean)\n\t}\n}\n\nconst removeListeners = () => {\n\tlinks.forEach(({ element, listener }) =>\n\t\telement.removeEventListener(\"click\", listener),\n\t)\n\tlinks = []\n}\n\
|
|
1
|
+
{"version":3,"file":"DeprecatedPrismicRichText.vue.cjs","sources":["../../src/PrismicRichText/DeprecatedPrismicRichText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n// TODO: Remove in v6\nimport { asHTML, isFilled } from \"@prismicio/client\"\nimport { DEV } from \"esm-env\"\nimport type { Component } from \"vue\"\nimport {\n\tcomputed,\n\tinject,\n\tnextTick,\n\tonBeforeUnmount,\n\tonMounted,\n\tref,\n\twatch,\n} from \"vue\"\nimport { routerKey } from \"vue-router\"\n\nimport { devMsg } from \"../lib/devMsg\"\nimport { isInternalURL } from \"../lib/isInternalURL\"\n\nimport { usePrismic } from \"../usePrismic\"\n\nimport type { PrismicRichTextProps } from \"./PrismicRichText.vue\"\n\n/**\n * The default component rendered to wrap the HTML output.\n */\nconst defaultWrapper = \"div\"\n\nconst props = defineProps<\n\tPick<\n\t\tPrismicRichTextProps,\n\t\t\"field\" | \"linkResolver\" | \"serializer\" | \"wrapper\"\n\t> & { fallback?: string }\n>()\ndefineOptions({ name: \"DeprecatedPrismicRichText\" })\n\nconst { options } = usePrismic()\n\nif (DEV) {\n\tonMounted(() => {\n\t\tconsole.warn(\n\t\t\t`[PrismicRichText] You're using the deprecated version of \\`<PrismicRichText>\\` because either the \\`serializer\\` prop or the plugin \\`richTextSerializer\\` option were provided. This API will be removed in a future major. For more details, see ${devMsg(\n\t\t\t\t\"html-serialization-is-deprecated-with-prismic-rich-text\",\n\t\t\t)}`,\n\t\t)\n\t})\n}\n\nconst html = computed(() => {\n\tif (!isFilled.richText(props.field)) {\n\t\treturn props.fallback ?? \"\"\n\t}\n\n\tconst linkResolver = props.linkResolver ?? options.linkResolver\n\tconst serializer = props.serializer ?? options.richTextSerializer\n\n\treturn asHTML(props.field, { linkResolver, serializer })\n})\n\n// Internal links handling\nconst root = ref<HTMLElement | Comment | Component | null>(null)\n\nconst maybeRouter = inject(routerKey, null)\n\ntype InternalLink = {\n\telement: HTMLAnchorElement\n\tlistener: EventListener\n}\n\nlet links: InternalLink[] = []\n\nconst navigate: EventListener = function (\n\tthis: { href: string },\n\tevent: Event,\n) {\n\tevent.preventDefault()\n\tmaybeRouter?.push(this.href)\n}\n\nconst addListeners = () => {\n\tconst node: HTMLElement | Comment | null =\n\t\troot.value && \"$el\" in root.value ? root.value.$el : root.value\n\tif (node && \"querySelectorAll\" in node) {\n\t\t// Get all internal link tags and add listeners on them\n\t\tlinks = Array.from(node.querySelectorAll(\"a\"))\n\t\t\t.map((element) => {\n\t\t\t\tconst href = element.getAttribute(\"href\")\n\n\t\t\t\tif (href && isInternalURL(href)) {\n\t\t\t\t\tconst listener = navigate.bind({ href })\n\t\t\t\t\telement.addEventListener(\"click\", listener)\n\n\t\t\t\t\treturn { element, listener }\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t})\n\t\t\t.filter((link): link is InternalLink => link as boolean)\n\t}\n}\n\nconst removeListeners = () => {\n\tlinks.forEach(({ element, listener }) =>\n\t\telement.removeEventListener(\"click\", listener),\n\t)\n\tlinks = []\n}\n\nonMounted(() => {\n\tremoveListeners()\n\tnextTick(addListeners)\n})\n\nwatch(html, () => {\n\tremoveListeners()\n\tnextTick(addListeners)\n})\n\nonBeforeUnmount(() => {\n\tremoveListeners()\n})\n</script>\n\n<template>\n\t<component\n\t\tv-if=\"isFilled.richText(field) || fallback\"\n\t\tref=\"root\"\n\t\t:is=\"wrapper || defaultWrapper\"\n\t\tv-html=\"html\"\n\t/>\n</template>\n"],"names":["usePrismic","DEV","onMounted","devMsg","computed","isFilled","asHTML","ref","inject","routerKey","isInternalURL","nextTick","watch","onBeforeUnmount"],"mappings":";;;;;;;;AA0BA,MAAM,iBAAiB;;;;;;;;;;;;AAEvB,UAAM,QAAQ;AAQR,UAAA,EAAE,QAAQ,IAAIA,sBAAW;AAE/B,QAAIC,YAAK;AACRC,UAAAA,UAAU,MAAM;AACP,gBAAA;AAAA,UACP,sPAAsPC,OAAA;AAAA,YACrP;AAAA,UAAA,CACA;AAAA,QACF;AAAA,MAAA,CACA;AAAA,IAAA;AAGI,UAAA,OAAOC,IAAAA,SAAS,MAAM;AAC3B,UAAI,CAACC,OAAAA,SAAS,SAAS,MAAM,KAAK,GAAG;AACpC,eAAO,MAAM,YAAY;AAAA,MAAA;AAGpB,YAAA,eAAe,MAAM,gBAAgB,QAAQ;AAC7C,YAAA,aAAa,MAAM,cAAc,QAAQ;AAE/C,aAAOC,OAAAA,OAAO,MAAM,OAAO,EAAE,cAAc,YAAY;AAAA,IAAA,CACvD;AAGK,UAAA,OAAOC,QAA8C,IAAI;AAEzD,UAAA,cAAcC,IAAAA,OAAOC,UAAA,WAAW,IAAI;AAO1C,QAAI,QAAwB,CAAC;AAEvB,UAAA,WAA0B,SAE/B,OACC;AACD,YAAM,eAAe;AACR,iDAAA,KAAK,KAAK;AAAA,IACxB;AAEA,UAAM,eAAe,MAAM;AACpB,YAAA,OACL,KAAK,SAAS,SAAS,KAAK,QAAQ,KAAK,MAAM,MAAM,KAAK;AACvD,UAAA,QAAQ,sBAAsB,MAAM;AAE/B,gBAAA,MAAM,KAAK,KAAK,iBAAiB,GAAG,CAAC,EAC3C,IAAI,CAAC,YAAY;AACX,gBAAA,OAAO,QAAQ,aAAa,MAAM;AAEpC,cAAA,QAAQC,4BAAc,IAAI,GAAG;AAChC,kBAAM,WAAW,SAAS,KAAK,EAAE,MAAM;AAC/B,oBAAA,iBAAiB,SAAS,QAAQ;AAEnC,mBAAA,EAAE,SAAS,SAAS;AAAA,UAAA,OACrB;AACC,mBAAA;AAAA,UAAA;AAAA,QAER,CAAA,EACA,OAAO,CAAC,SAA+B,IAAe;AAAA,MAAA;AAAA,IAE1D;AAEA,UAAM,kBAAkB,MAAM;AACvB,YAAA;AAAA,QAAQ,CAAC,EAAE,SAAS,SAAA,MACzB,QAAQ,oBAAoB,SAAS,QAAQ;AAAA,MAC9C;AACA,cAAQ,CAAC;AAAA,IACV;AAEAR,QAAAA,UAAU,MAAM;AACC,sBAAA;AAChBS,UAAAA,SAAS,YAAY;AAAA,IAAA,CACrB;AAEDC,QAAA,MAAM,MAAM,MAAM;AACD,sBAAA;AAChBD,UAAAA,SAAS,YAAY;AAAA,IAAA,CACrB;AAEDE,QAAAA,gBAAgB,MAAM;AACL,sBAAA;AAAA,IAAA,CAChB;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, onMounted, computed, ref, inject,
|
|
1
|
+
import { defineComponent, onMounted, computed, ref, inject, nextTick, watch, onBeforeUnmount, unref, openBlock, createBlock, resolveDynamicComponent, createCommentVNode } from "vue";
|
|
2
2
|
import { isFilled, asHTML } from "@prismicio/client";
|
|
3
3
|
import { DEV } from "esm-env";
|
|
4
4
|
import { routerKey } from "vue-router";
|
|
@@ -64,14 +64,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
64
64
|
);
|
|
65
65
|
links = [];
|
|
66
66
|
};
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
()
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
);
|
|
67
|
+
onMounted(() => {
|
|
68
|
+
removeListeners();
|
|
69
|
+
nextTick(addListeners);
|
|
70
|
+
});
|
|
71
|
+
watch(html, () => {
|
|
72
|
+
removeListeners();
|
|
73
|
+
nextTick(addListeners);
|
|
74
|
+
});
|
|
75
75
|
onBeforeUnmount(() => {
|
|
76
76
|
removeListeners();
|
|
77
77
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeprecatedPrismicRichText.vue.js","sources":["../../src/PrismicRichText/DeprecatedPrismicRichText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n// TODO: Remove in v6\nimport { asHTML, isFilled } from \"@prismicio/client\"\nimport { DEV } from \"esm-env\"\nimport type { Component } from \"vue\"\nimport {\n\tcomputed,\n\tinject,\n\tnextTick,\n\tonBeforeUnmount,\n\tonMounted,\n\tref,\n\twatch,\n} from \"vue\"\nimport { routerKey } from \"vue-router\"\n\nimport { devMsg } from \"../lib/devMsg\"\nimport { isInternalURL } from \"../lib/isInternalURL\"\n\nimport { usePrismic } from \"../usePrismic\"\n\nimport type { PrismicRichTextProps } from \"./PrismicRichText.vue\"\n\n/**\n * The default component rendered to wrap the HTML output.\n */\nconst defaultWrapper = \"div\"\n\nconst props = defineProps<\n\tPick<\n\t\tPrismicRichTextProps,\n\t\t\"field\" | \"linkResolver\" | \"serializer\" | \"wrapper\"\n\t> & { fallback?: string }\n>()\ndefineOptions({ name: \"DeprecatedPrismicRichText\" })\n\nconst { options } = usePrismic()\n\nif (DEV) {\n\tonMounted(() => {\n\t\tconsole.warn(\n\t\t\t`[PrismicRichText] You're using the deprecated version of \\`<PrismicRichText>\\` because either the \\`serializer\\` prop or the plugin \\`richTextSerializer\\` option were provided. This API will be removed in a future major. For more details, see ${devMsg(\n\t\t\t\t\"html-serialization-is-deprecated-with-prismic-rich-text\",\n\t\t\t)}`,\n\t\t)\n\t})\n}\n\nconst html = computed(() => {\n\tif (!isFilled.richText(props.field)) {\n\t\treturn props.fallback ?? \"\"\n\t}\n\n\tconst linkResolver = props.linkResolver ?? options.linkResolver\n\tconst serializer = props.serializer ?? options.richTextSerializer\n\n\treturn asHTML(props.field, { linkResolver, serializer })\n})\n\n// Internal links handling\nconst root = ref<HTMLElement | Comment | Component | null>(null)\n\nconst maybeRouter = inject(routerKey, null)\n\ntype InternalLink = {\n\telement: HTMLAnchorElement\n\tlistener: EventListener\n}\n\nlet links: InternalLink[] = []\n\nconst navigate: EventListener = function (\n\tthis: { href: string },\n\tevent: Event,\n) {\n\tevent.preventDefault()\n\tmaybeRouter?.push(this.href)\n}\n\nconst addListeners = () => {\n\tconst node: HTMLElement | Comment | null =\n\t\troot.value && \"$el\" in root.value ? root.value.$el : root.value\n\tif (node && \"querySelectorAll\" in node) {\n\t\t// Get all internal link tags and add listeners on them\n\t\tlinks = Array.from(node.querySelectorAll(\"a\"))\n\t\t\t.map((element) => {\n\t\t\t\tconst href = element.getAttribute(\"href\")\n\n\t\t\t\tif (href && isInternalURL(href)) {\n\t\t\t\t\tconst listener = navigate.bind({ href })\n\t\t\t\t\telement.addEventListener(\"click\", listener)\n\n\t\t\t\t\treturn { element, listener }\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t})\n\t\t\t.filter((link): link is InternalLink => link as boolean)\n\t}\n}\n\nconst removeListeners = () => {\n\tlinks.forEach(({ element, listener }) =>\n\t\telement.removeEventListener(\"click\", listener),\n\t)\n\tlinks = []\n}\n\
|
|
1
|
+
{"version":3,"file":"DeprecatedPrismicRichText.vue.js","sources":["../../src/PrismicRichText/DeprecatedPrismicRichText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n// TODO: Remove in v6\nimport { asHTML, isFilled } from \"@prismicio/client\"\nimport { DEV } from \"esm-env\"\nimport type { Component } from \"vue\"\nimport {\n\tcomputed,\n\tinject,\n\tnextTick,\n\tonBeforeUnmount,\n\tonMounted,\n\tref,\n\twatch,\n} from \"vue\"\nimport { routerKey } from \"vue-router\"\n\nimport { devMsg } from \"../lib/devMsg\"\nimport { isInternalURL } from \"../lib/isInternalURL\"\n\nimport { usePrismic } from \"../usePrismic\"\n\nimport type { PrismicRichTextProps } from \"./PrismicRichText.vue\"\n\n/**\n * The default component rendered to wrap the HTML output.\n */\nconst defaultWrapper = \"div\"\n\nconst props = defineProps<\n\tPick<\n\t\tPrismicRichTextProps,\n\t\t\"field\" | \"linkResolver\" | \"serializer\" | \"wrapper\"\n\t> & { fallback?: string }\n>()\ndefineOptions({ name: \"DeprecatedPrismicRichText\" })\n\nconst { options } = usePrismic()\n\nif (DEV) {\n\tonMounted(() => {\n\t\tconsole.warn(\n\t\t\t`[PrismicRichText] You're using the deprecated version of \\`<PrismicRichText>\\` because either the \\`serializer\\` prop or the plugin \\`richTextSerializer\\` option were provided. This API will be removed in a future major. For more details, see ${devMsg(\n\t\t\t\t\"html-serialization-is-deprecated-with-prismic-rich-text\",\n\t\t\t)}`,\n\t\t)\n\t})\n}\n\nconst html = computed(() => {\n\tif (!isFilled.richText(props.field)) {\n\t\treturn props.fallback ?? \"\"\n\t}\n\n\tconst linkResolver = props.linkResolver ?? options.linkResolver\n\tconst serializer = props.serializer ?? options.richTextSerializer\n\n\treturn asHTML(props.field, { linkResolver, serializer })\n})\n\n// Internal links handling\nconst root = ref<HTMLElement | Comment | Component | null>(null)\n\nconst maybeRouter = inject(routerKey, null)\n\ntype InternalLink = {\n\telement: HTMLAnchorElement\n\tlistener: EventListener\n}\n\nlet links: InternalLink[] = []\n\nconst navigate: EventListener = function (\n\tthis: { href: string },\n\tevent: Event,\n) {\n\tevent.preventDefault()\n\tmaybeRouter?.push(this.href)\n}\n\nconst addListeners = () => {\n\tconst node: HTMLElement | Comment | null =\n\t\troot.value && \"$el\" in root.value ? root.value.$el : root.value\n\tif (node && \"querySelectorAll\" in node) {\n\t\t// Get all internal link tags and add listeners on them\n\t\tlinks = Array.from(node.querySelectorAll(\"a\"))\n\t\t\t.map((element) => {\n\t\t\t\tconst href = element.getAttribute(\"href\")\n\n\t\t\t\tif (href && isInternalURL(href)) {\n\t\t\t\t\tconst listener = navigate.bind({ href })\n\t\t\t\t\telement.addEventListener(\"click\", listener)\n\n\t\t\t\t\treturn { element, listener }\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t})\n\t\t\t.filter((link): link is InternalLink => link as boolean)\n\t}\n}\n\nconst removeListeners = () => {\n\tlinks.forEach(({ element, listener }) =>\n\t\telement.removeEventListener(\"click\", listener),\n\t)\n\tlinks = []\n}\n\nonMounted(() => {\n\tremoveListeners()\n\tnextTick(addListeners)\n})\n\nwatch(html, () => {\n\tremoveListeners()\n\tnextTick(addListeners)\n})\n\nonBeforeUnmount(() => {\n\tremoveListeners()\n})\n</script>\n\n<template>\n\t<component\n\t\tv-if=\"isFilled.richText(field) || fallback\"\n\t\tref=\"root\"\n\t\t:is=\"wrapper || defaultWrapper\"\n\t\tv-html=\"html\"\n\t/>\n</template>\n"],"names":[],"mappings":";;;;;;;AA0BA,MAAM,iBAAiB;;;;;;;;;;;;AAEvB,UAAM,QAAQ;AAQR,UAAA,EAAE,QAAQ,IAAI,WAAW;AAE/B,QAAI,KAAK;AACR,gBAAU,MAAM;AACP,gBAAA;AAAA,UACP,sPAAsP;AAAA,YACrP;AAAA,UAAA,CACA;AAAA,QACF;AAAA,MAAA,CACA;AAAA,IAAA;AAGI,UAAA,OAAO,SAAS,MAAM;AAC3B,UAAI,CAAC,SAAS,SAAS,MAAM,KAAK,GAAG;AACpC,eAAO,MAAM,YAAY;AAAA,MAAA;AAGpB,YAAA,eAAe,MAAM,gBAAgB,QAAQ;AAC7C,YAAA,aAAa,MAAM,cAAc,QAAQ;AAE/C,aAAO,OAAO,MAAM,OAAO,EAAE,cAAc,YAAY;AAAA,IAAA,CACvD;AAGK,UAAA,OAAO,IAA8C,IAAI;AAEzD,UAAA,cAAc,OAAO,WAAW,IAAI;AAO1C,QAAI,QAAwB,CAAC;AAEvB,UAAA,WAA0B,SAE/B,OACC;AACD,YAAM,eAAe;AACR,iDAAA,KAAK,KAAK;AAAA,IACxB;AAEA,UAAM,eAAe,MAAM;AACpB,YAAA,OACL,KAAK,SAAS,SAAS,KAAK,QAAQ,KAAK,MAAM,MAAM,KAAK;AACvD,UAAA,QAAQ,sBAAsB,MAAM;AAE/B,gBAAA,MAAM,KAAK,KAAK,iBAAiB,GAAG,CAAC,EAC3C,IAAI,CAAC,YAAY;AACX,gBAAA,OAAO,QAAQ,aAAa,MAAM;AAEpC,cAAA,QAAQ,cAAc,IAAI,GAAG;AAChC,kBAAM,WAAW,SAAS,KAAK,EAAE,MAAM;AAC/B,oBAAA,iBAAiB,SAAS,QAAQ;AAEnC,mBAAA,EAAE,SAAS,SAAS;AAAA,UAAA,OACrB;AACC,mBAAA;AAAA,UAAA;AAAA,QAER,CAAA,EACA,OAAO,CAAC,SAA+B,IAAe;AAAA,MAAA;AAAA,IAE1D;AAEA,UAAM,kBAAkB,MAAM;AACvB,YAAA;AAAA,QAAQ,CAAC,EAAE,SAAS,SAAA,MACzB,QAAQ,oBAAoB,SAAS,QAAQ;AAAA,MAC9C;AACA,cAAQ,CAAC;AAAA,IACV;AAEA,cAAU,MAAM;AACC,sBAAA;AAChB,eAAS,YAAY;AAAA,IAAA,CACrB;AAED,UAAM,MAAM,MAAM;AACD,sBAAA;AAChB,eAAS,YAAY;AAAA,IAAA,CACrB;AAED,oBAAgB,MAAM;AACL,sBAAA;AAAA,IAAA,CAChB;;;;;;;;;;;"}
|
|
@@ -30,7 +30,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
30
30
|
default: vue.withCtx(() => [
|
|
31
31
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.field.head.rows, (row) => {
|
|
32
32
|
return vue.openBlock(), vue.createBlock(PrismicTableRow_vue_vue_type_script_setup_true_lang, {
|
|
33
|
-
key:
|
|
33
|
+
key: row.key,
|
|
34
34
|
row,
|
|
35
35
|
components: mergedComponents.value
|
|
36
36
|
}, null, 8, ["row", "components"]);
|
|
@@ -44,7 +44,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
44
44
|
default: vue.withCtx(() => [
|
|
45
45
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.field.body.rows, (row) => {
|
|
46
46
|
return vue.openBlock(), vue.createBlock(PrismicTableRow_vue_vue_type_script_setup_true_lang, {
|
|
47
|
-
key:
|
|
47
|
+
key: row.key,
|
|
48
48
|
row,
|
|
49
49
|
components: mergedComponents.value
|
|
50
50
|
}, null, 8, ["row", "components"]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrismicTable.vue.cjs","sources":["../../src/PrismicTable/PrismicTable.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { type TableField, isFilled } from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport type { ComponentOrTagName } from \"../types\"\nimport type { VueTableComponents } from \"./types\"\n\nimport type { VueRichTextSerializer } from \"../PrismicRichText\"\n\nimport { defaultTableComponents } from \"./PrismicTableDefaultComponents\"\nimport PrismicTableRow from \"./PrismicTableRow.vue\"\n\n/**\n * Props for `<PrismicTable />`.\n */\nexport type PrismicTableProps = {\n\t/**\n\t * The Prismic table field to render.\n\t */\n\tfield: TableField | undefined\n\n\t/**\n\t * The value to be rendered when the field is empty. If a fallback is not\n\t * given, `null` (nothing) will be rendered.\n\t */\n\tfallback?: ComponentOrTagName\n\n\t/**\n\t * An object that maps a table block type to a Vue component.\n\t *\n\t * @example\n\t *\n\t * ```javascript\n\t * {\n\t * table: Table,\n\t * }\n\t * ```\n\t */\n\tcomponents?: VueTableComponents & VueRichTextSerializer\n}\n\nconst props = defineProps<PrismicTableProps>()\ndefineOptions({ name: \"PrismicTable\" })\n\nconst mergedComponents = computed(() => ({\n\t...defaultTableComponents,\n\t...props.components,\n}))\n</script>\n\n<template>\n\t<component\n\t\tv-if=\"isFilled.table(field)\"\n\t\t:is=\"mergedComponents.table\"\n\t\t:table=\"field\"\n\t\tv-bind=\"$attrs\"\n\t>\n\t\t<component\n\t\t\tv-if=\"field.head\"\n\t\t\t:is=\"mergedComponents.thead\"\n\t\t\t:head=\"field.head\"\n\t\t>\n\t\t\t<PrismicTableRow\n\t\t\t\tv-for=\"row in field.head.rows\"\n\t\t\t\t:key=\"
|
|
1
|
+
{"version":3,"file":"PrismicTable.vue.cjs","sources":["../../src/PrismicTable/PrismicTable.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { type TableField, isFilled } from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport type { ComponentOrTagName } from \"../types\"\nimport type { VueTableComponents } from \"./types\"\n\nimport type { VueRichTextSerializer } from \"../PrismicRichText\"\n\nimport { defaultTableComponents } from \"./PrismicTableDefaultComponents\"\nimport PrismicTableRow from \"./PrismicTableRow.vue\"\n\n/**\n * Props for `<PrismicTable />`.\n */\nexport type PrismicTableProps = {\n\t/**\n\t * The Prismic table field to render.\n\t */\n\tfield: TableField | undefined\n\n\t/**\n\t * The value to be rendered when the field is empty. If a fallback is not\n\t * given, `null` (nothing) will be rendered.\n\t */\n\tfallback?: ComponentOrTagName\n\n\t/**\n\t * An object that maps a table block type to a Vue component.\n\t *\n\t * @example\n\t *\n\t * ```javascript\n\t * {\n\t * table: Table,\n\t * }\n\t * ```\n\t */\n\tcomponents?: VueTableComponents & VueRichTextSerializer\n}\n\nconst props = defineProps<PrismicTableProps>()\ndefineOptions({ name: \"PrismicTable\" })\n\nconst mergedComponents = computed(() => ({\n\t...defaultTableComponents,\n\t...props.components,\n}))\n</script>\n\n<template>\n\t<component\n\t\tv-if=\"isFilled.table(field)\"\n\t\t:is=\"mergedComponents.table\"\n\t\t:table=\"field\"\n\t\tv-bind=\"$attrs\"\n\t>\n\t\t<component\n\t\t\tv-if=\"field.head\"\n\t\t\t:is=\"mergedComponents.thead\"\n\t\t\t:head=\"field.head\"\n\t\t>\n\t\t\t<PrismicTableRow\n\t\t\t\tv-for=\"row in field.head.rows\"\n\t\t\t\t:key=\"row.key\"\n\t\t\t\t:row=\"row\"\n\t\t\t\t:components=\"mergedComponents\"\n\t\t\t/>\n\t\t</component>\n\t\t<component :is=\"mergedComponents.tbody\" :body=\"field.body\">\n\t\t\t<PrismicTableRow\n\t\t\t\tv-for=\"row in field.body.rows\"\n\t\t\t\t:key=\"row.key\"\n\t\t\t\t:row=\"row\"\n\t\t\t\t:components=\"mergedComponents\"\n\t\t\t/>\n\t\t</component>\n\t</component>\n\t<component v-else :is=\"fallback\" />\n</template>\n"],"names":["computed","defaultTableComponents"],"mappings":";;;;;;;;;;;;;;AAyCA,UAAM,QAAQ;AAGR,UAAA,mBAAmBA,IAAAA,SAAS,OAAO;AAAA,MACxC,GAAGC,8BAAA;AAAA,MACH,GAAG,MAAM;AAAA,IAAA,EACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -29,7 +29,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
29
29
|
default: withCtx(() => [
|
|
30
30
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.field.head.rows, (row) => {
|
|
31
31
|
return openBlock(), createBlock(_sfc_main$1, {
|
|
32
|
-
key:
|
|
32
|
+
key: row.key,
|
|
33
33
|
row,
|
|
34
34
|
components: mergedComponents.value
|
|
35
35
|
}, null, 8, ["row", "components"]);
|
|
@@ -43,7 +43,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
43
43
|
default: withCtx(() => [
|
|
44
44
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.field.body.rows, (row) => {
|
|
45
45
|
return openBlock(), createBlock(_sfc_main$1, {
|
|
46
|
-
key:
|
|
46
|
+
key: row.key,
|
|
47
47
|
row,
|
|
48
48
|
components: mergedComponents.value
|
|
49
49
|
}, null, 8, ["row", "components"]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrismicTable.vue.js","sources":["../../src/PrismicTable/PrismicTable.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { type TableField, isFilled } from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport type { ComponentOrTagName } from \"../types\"\nimport type { VueTableComponents } from \"./types\"\n\nimport type { VueRichTextSerializer } from \"../PrismicRichText\"\n\nimport { defaultTableComponents } from \"./PrismicTableDefaultComponents\"\nimport PrismicTableRow from \"./PrismicTableRow.vue\"\n\n/**\n * Props for `<PrismicTable />`.\n */\nexport type PrismicTableProps = {\n\t/**\n\t * The Prismic table field to render.\n\t */\n\tfield: TableField | undefined\n\n\t/**\n\t * The value to be rendered when the field is empty. If a fallback is not\n\t * given, `null` (nothing) will be rendered.\n\t */\n\tfallback?: ComponentOrTagName\n\n\t/**\n\t * An object that maps a table block type to a Vue component.\n\t *\n\t * @example\n\t *\n\t * ```javascript\n\t * {\n\t * table: Table,\n\t * }\n\t * ```\n\t */\n\tcomponents?: VueTableComponents & VueRichTextSerializer\n}\n\nconst props = defineProps<PrismicTableProps>()\ndefineOptions({ name: \"PrismicTable\" })\n\nconst mergedComponents = computed(() => ({\n\t...defaultTableComponents,\n\t...props.components,\n}))\n</script>\n\n<template>\n\t<component\n\t\tv-if=\"isFilled.table(field)\"\n\t\t:is=\"mergedComponents.table\"\n\t\t:table=\"field\"\n\t\tv-bind=\"$attrs\"\n\t>\n\t\t<component\n\t\t\tv-if=\"field.head\"\n\t\t\t:is=\"mergedComponents.thead\"\n\t\t\t:head=\"field.head\"\n\t\t>\n\t\t\t<PrismicTableRow\n\t\t\t\tv-for=\"row in field.head.rows\"\n\t\t\t\t:key=\"
|
|
1
|
+
{"version":3,"file":"PrismicTable.vue.js","sources":["../../src/PrismicTable/PrismicTable.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { type TableField, isFilled } from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport type { ComponentOrTagName } from \"../types\"\nimport type { VueTableComponents } from \"./types\"\n\nimport type { VueRichTextSerializer } from \"../PrismicRichText\"\n\nimport { defaultTableComponents } from \"./PrismicTableDefaultComponents\"\nimport PrismicTableRow from \"./PrismicTableRow.vue\"\n\n/**\n * Props for `<PrismicTable />`.\n */\nexport type PrismicTableProps = {\n\t/**\n\t * The Prismic table field to render.\n\t */\n\tfield: TableField | undefined\n\n\t/**\n\t * The value to be rendered when the field is empty. If a fallback is not\n\t * given, `null` (nothing) will be rendered.\n\t */\n\tfallback?: ComponentOrTagName\n\n\t/**\n\t * An object that maps a table block type to a Vue component.\n\t *\n\t * @example\n\t *\n\t * ```javascript\n\t * {\n\t * table: Table,\n\t * }\n\t * ```\n\t */\n\tcomponents?: VueTableComponents & VueRichTextSerializer\n}\n\nconst props = defineProps<PrismicTableProps>()\ndefineOptions({ name: \"PrismicTable\" })\n\nconst mergedComponents = computed(() => ({\n\t...defaultTableComponents,\n\t...props.components,\n}))\n</script>\n\n<template>\n\t<component\n\t\tv-if=\"isFilled.table(field)\"\n\t\t:is=\"mergedComponents.table\"\n\t\t:table=\"field\"\n\t\tv-bind=\"$attrs\"\n\t>\n\t\t<component\n\t\t\tv-if=\"field.head\"\n\t\t\t:is=\"mergedComponents.thead\"\n\t\t\t:head=\"field.head\"\n\t\t>\n\t\t\t<PrismicTableRow\n\t\t\t\tv-for=\"row in field.head.rows\"\n\t\t\t\t:key=\"row.key\"\n\t\t\t\t:row=\"row\"\n\t\t\t\t:components=\"mergedComponents\"\n\t\t\t/>\n\t\t</component>\n\t\t<component :is=\"mergedComponents.tbody\" :body=\"field.body\">\n\t\t\t<PrismicTableRow\n\t\t\t\tv-for=\"row in field.body.rows\"\n\t\t\t\t:key=\"row.key\"\n\t\t\t\t:row=\"row\"\n\t\t\t\t:components=\"mergedComponents\"\n\t\t\t/>\n\t\t</component>\n\t</component>\n\t<component v-else :is=\"fallback\" />\n</template>\n"],"names":[],"mappings":";;;;;;;;;;;;;AAyCA,UAAM,QAAQ;AAGR,UAAA,mBAAmB,SAAS,OAAO;AAAA,MACxC,GAAG;AAAA,MACH,GAAG,MAAM;AAAA,IAAA,EACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -15,7 +15,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
15
15
|
default: vue.withCtx(() => [
|
|
16
16
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.row.cells, (cell) => {
|
|
17
17
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
18
|
-
key:
|
|
18
|
+
key: cell.key
|
|
19
19
|
}, [
|
|
20
20
|
cell.type === "header" ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(props.components.th), {
|
|
21
21
|
key: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrismicTableRow.vue.cjs","sources":["../../src/PrismicTable/PrismicTableRow.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { TableFieldBodyRow, TableFieldHeadRow } from \"@prismicio/client\"\n\nimport type { VueTableComponents } from \"./types\"\n\nimport type { VueRichTextSerializer } from \"../PrismicRichText\"\nimport PrismicRichText from \"../PrismicRichText/PrismicRichText.vue\"\n\n/**\n * Props for `<PrismicRowTable />`.\n */\nexport type PrismicTableRowProps = {\n\t/**\n\t * The Prismic table row to render.\n\t */\n\trow: TableFieldHeadRow | TableFieldBodyRow\n\n\t/**\n\t * An object that maps a table block type to a Vue component.\n\t *\n\t * @example\n\t *\n\t * ```javascript\n\t * {\n\t * tr: TableRow,\n\t * }\n\t * ```\n\t */\n\tcomponents: VueTableComponents & VueRichTextSerializer\n}\n\nconst props = defineProps<PrismicTableRowProps>()\ndefineOptions({ name: \"PrismicTableRow\" })\n</script>\n\n<template>\n\t<component :is=\"props.components.tr\" :row=\"row\">\n\t\t<template v-for=\"cell in row.cells\" :key=\"
|
|
1
|
+
{"version":3,"file":"PrismicTableRow.vue.cjs","sources":["../../src/PrismicTable/PrismicTableRow.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { TableFieldBodyRow, TableFieldHeadRow } from \"@prismicio/client\"\n\nimport type { VueTableComponents } from \"./types\"\n\nimport type { VueRichTextSerializer } from \"../PrismicRichText\"\nimport PrismicRichText from \"../PrismicRichText/PrismicRichText.vue\"\n\n/**\n * Props for `<PrismicRowTable />`.\n */\nexport type PrismicTableRowProps = {\n\t/**\n\t * The Prismic table row to render.\n\t */\n\trow: TableFieldHeadRow | TableFieldBodyRow\n\n\t/**\n\t * An object that maps a table block type to a Vue component.\n\t *\n\t * @example\n\t *\n\t * ```javascript\n\t * {\n\t * tr: TableRow,\n\t * }\n\t * ```\n\t */\n\tcomponents: VueTableComponents & VueRichTextSerializer\n}\n\nconst props = defineProps<PrismicTableRowProps>()\ndefineOptions({ name: \"PrismicTableRow\" })\n</script>\n\n<template>\n\t<component :is=\"props.components.tr\" :row=\"row\">\n\t\t<template v-for=\"cell in row.cells\" :key=\"cell.key\">\n\t\t\t<component\n\t\t\t\tv-if=\"cell.type === 'header'\"\n\t\t\t\t:is=\"props.components.th\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t\t<component v-else :is=\"props.components.td\" :cell=\"cell\">\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"props.components\" />\n\t\t\t</component>\n\t\t</template>\n\t</component>\n</template>\n"],"names":[],"mappings":";;;;;;;;;;;AA+BA,UAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -14,7 +14,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14
14
|
default: withCtx(() => [
|
|
15
15
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.row.cells, (cell) => {
|
|
16
16
|
return openBlock(), createElementBlock(Fragment, {
|
|
17
|
-
key:
|
|
17
|
+
key: cell.key
|
|
18
18
|
}, [
|
|
19
19
|
cell.type === "header" ? (openBlock(), createBlock(resolveDynamicComponent(props.components.th), {
|
|
20
20
|
key: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrismicTableRow.vue.js","sources":["../../src/PrismicTable/PrismicTableRow.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { TableFieldBodyRow, TableFieldHeadRow } from \"@prismicio/client\"\n\nimport type { VueTableComponents } from \"./types\"\n\nimport type { VueRichTextSerializer } from \"../PrismicRichText\"\nimport PrismicRichText from \"../PrismicRichText/PrismicRichText.vue\"\n\n/**\n * Props for `<PrismicRowTable />`.\n */\nexport type PrismicTableRowProps = {\n\t/**\n\t * The Prismic table row to render.\n\t */\n\trow: TableFieldHeadRow | TableFieldBodyRow\n\n\t/**\n\t * An object that maps a table block type to a Vue component.\n\t *\n\t * @example\n\t *\n\t * ```javascript\n\t * {\n\t * tr: TableRow,\n\t * }\n\t * ```\n\t */\n\tcomponents: VueTableComponents & VueRichTextSerializer\n}\n\nconst props = defineProps<PrismicTableRowProps>()\ndefineOptions({ name: \"PrismicTableRow\" })\n</script>\n\n<template>\n\t<component :is=\"props.components.tr\" :row=\"row\">\n\t\t<template v-for=\"cell in row.cells\" :key=\"
|
|
1
|
+
{"version":3,"file":"PrismicTableRow.vue.js","sources":["../../src/PrismicTable/PrismicTableRow.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { TableFieldBodyRow, TableFieldHeadRow } from \"@prismicio/client\"\n\nimport type { VueTableComponents } from \"./types\"\n\nimport type { VueRichTextSerializer } from \"../PrismicRichText\"\nimport PrismicRichText from \"../PrismicRichText/PrismicRichText.vue\"\n\n/**\n * Props for `<PrismicRowTable />`.\n */\nexport type PrismicTableRowProps = {\n\t/**\n\t * The Prismic table row to render.\n\t */\n\trow: TableFieldHeadRow | TableFieldBodyRow\n\n\t/**\n\t * An object that maps a table block type to a Vue component.\n\t *\n\t * @example\n\t *\n\t * ```javascript\n\t * {\n\t * tr: TableRow,\n\t * }\n\t * ```\n\t */\n\tcomponents: VueTableComponents & VueRichTextSerializer\n}\n\nconst props = defineProps<PrismicTableRowProps>()\ndefineOptions({ name: \"PrismicTableRow\" })\n</script>\n\n<template>\n\t<component :is=\"props.components.tr\" :row=\"row\">\n\t\t<template v-for=\"cell in row.cells\" :key=\"cell.key\">\n\t\t\t<component\n\t\t\t\tv-if=\"cell.type === 'header'\"\n\t\t\t\t:is=\"props.components.th\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t\t<component v-else :is=\"props.components.td\" :cell=\"cell\">\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"props.components\" />\n\t\t\t</component>\n\t\t</template>\n\t</component>\n</template>\n"],"names":[],"mappings":";;;;;;;;;;AA+BA,UAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/package.json.cjs
CHANGED
package/dist/package.json.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prismicio/vue",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "Vue plugin, components, and composables to fetch and present Prismic content",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"test": "npm run lint && npm run types && npm run unit && npm run build && npm run size"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@prismicio/client": "^7.
|
|
60
|
+
"@prismicio/client": "^7.17.0",
|
|
61
61
|
"esm-env": "^1.2.2",
|
|
62
62
|
"vue-router": "^4.5.0"
|
|
63
63
|
},
|
|
@@ -106,14 +106,15 @@ const removeListeners = () => {
|
|
|
106
106
|
links = []
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
()
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
)
|
|
109
|
+
onMounted(() => {
|
|
110
|
+
removeListeners()
|
|
111
|
+
nextTick(addListeners)
|
|
112
|
+
})
|
|
113
|
+
|
|
114
|
+
watch(html, () => {
|
|
115
|
+
removeListeners()
|
|
116
|
+
nextTick(addListeners)
|
|
117
|
+
})
|
|
117
118
|
|
|
118
119
|
onBeforeUnmount(() => {
|
|
119
120
|
removeListeners()
|
|
@@ -62,7 +62,7 @@ const mergedComponents = computed(() => ({
|
|
|
62
62
|
>
|
|
63
63
|
<PrismicTableRow
|
|
64
64
|
v-for="row in field.head.rows"
|
|
65
|
-
:key="
|
|
65
|
+
:key="row.key"
|
|
66
66
|
:row="row"
|
|
67
67
|
:components="mergedComponents"
|
|
68
68
|
/>
|
|
@@ -70,7 +70,7 @@ const mergedComponents = computed(() => ({
|
|
|
70
70
|
<component :is="mergedComponents.tbody" :body="field.body">
|
|
71
71
|
<PrismicTableRow
|
|
72
72
|
v-for="row in field.body.rows"
|
|
73
|
-
:key="
|
|
73
|
+
:key="row.key"
|
|
74
74
|
:row="row"
|
|
75
75
|
:components="mergedComponents"
|
|
76
76
|
/>
|
|
@@ -35,7 +35,7 @@ defineOptions({ name: "PrismicTableRow" })
|
|
|
35
35
|
|
|
36
36
|
<template>
|
|
37
37
|
<component :is="props.components.tr" :row="row">
|
|
38
|
-
<template v-for="cell in row.cells" :key="
|
|
38
|
+
<template v-for="cell in row.cells" :key="cell.key">
|
|
39
39
|
<component
|
|
40
40
|
v-if="cell.type === 'header'"
|
|
41
41
|
:is="props.components.th"
|