@dcodegroup-au/page-builder 0.6.8 → 0.7.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/page-builder.es.js
CHANGED
|
@@ -12037,6 +12037,8 @@ const _sfc_main$J = {
|
|
|
12037
12037
|
const type = useModel(__props, "type");
|
|
12038
12038
|
const url = useModel(__props, "url");
|
|
12039
12039
|
const openInNewTab = useModel(__props, "openInNewTab");
|
|
12040
|
+
const props = __props;
|
|
12041
|
+
console.log("LinkedTo", props);
|
|
12040
12042
|
const toReadableWords = (input) => {
|
|
12041
12043
|
return input.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
12042
12044
|
};
|
|
@@ -45240,13 +45242,18 @@ const _hoisted_18$2 = { key: 2 };
|
|
|
45240
45242
|
const _sfc_main$C = {
|
|
45241
45243
|
__name: "Links",
|
|
45242
45244
|
props: {
|
|
45243
|
-
...defaultProps
|
|
45245
|
+
...defaultProps,
|
|
45246
|
+
forms: {
|
|
45247
|
+
type: Array,
|
|
45248
|
+
default: () => []
|
|
45249
|
+
}
|
|
45244
45250
|
},
|
|
45245
45251
|
emits: ["update"],
|
|
45246
45252
|
setup(__props, { emit: __emit }) {
|
|
45247
45253
|
const VFileUpload = inject("VFileUpload", _sfc_main$O);
|
|
45248
45254
|
const emit = __emit;
|
|
45249
45255
|
const props = __props;
|
|
45256
|
+
console.log("Links", props);
|
|
45250
45257
|
const options = [{ value: "content", label: "Content" }, { value: "image_only", label: "Image Only" }];
|
|
45251
45258
|
const componentData = ref(props.data.component);
|
|
45252
45259
|
const modalRef = ref(null);
|
|
@@ -45281,6 +45288,7 @@ const _sfc_main$C = {
|
|
|
45281
45288
|
};
|
|
45282
45289
|
const deleteCallback = (index) => {
|
|
45283
45290
|
var _a;
|
|
45291
|
+
componentData.value.data[index] = {};
|
|
45284
45292
|
(_a = componentData.value.data) == null ? void 0 : _a.splice(index, 1);
|
|
45285
45293
|
emit("update", false);
|
|
45286
45294
|
};
|
|
@@ -45346,7 +45354,7 @@ const _sfc_main$C = {
|
|
|
45346
45354
|
var _a2, _b, _c;
|
|
45347
45355
|
return openBlock(), createElementBlock("div", {
|
|
45348
45356
|
class: "flex flex-col gap-4 rounded-xl px-6 py-4 bg-gray-200",
|
|
45349
|
-
key: index
|
|
45357
|
+
key: `${index}-${Date.now() + Math.random()}`,
|
|
45350
45358
|
ref_for: true,
|
|
45351
45359
|
ref: index === componentData.value.data.length - 1 ? (el) => lastItemRef.value = el : null
|
|
45352
45360
|
}, [
|
|
@@ -45428,8 +45436,9 @@ const _sfc_main$C = {
|
|
|
45428
45436
|
"onUpdate:url": ($event) => item.url = $event,
|
|
45429
45437
|
openInNewTab: item.open_in_new_tab,
|
|
45430
45438
|
"onUpdate:openInNewTab": ($event) => item.open_in_new_tab = $event,
|
|
45431
|
-
sites: _ctx.sites
|
|
45432
|
-
|
|
45439
|
+
sites: _ctx.sites,
|
|
45440
|
+
forms: __props.forms
|
|
45441
|
+
}, null, 8, ["name", "type", "onUpdate:type", "url", "onUpdate:url", "openInNewTab", "onUpdate:openInNewTab", "sites", "forms"])) : createCommentVNode("", true)
|
|
45433
45442
|
])) : (openBlock(), createElementBlock("div", _hoisted_18$2, [
|
|
45434
45443
|
createVNode(_sfc_main$P, {
|
|
45435
45444
|
"is-vertical": "",
|
package/dist/page-builder.umd.js
CHANGED
|
@@ -12040,6 +12040,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
12040
12040
|
const type = vue.useModel(__props, "type");
|
|
12041
12041
|
const url = vue.useModel(__props, "url");
|
|
12042
12042
|
const openInNewTab = vue.useModel(__props, "openInNewTab");
|
|
12043
|
+
const props = __props;
|
|
12044
|
+
console.log("LinkedTo", props);
|
|
12043
12045
|
const toReadableWords = (input) => {
|
|
12044
12046
|
return input.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
12045
12047
|
};
|
|
@@ -45243,13 +45245,18 @@ ${escapeText(this.code(index, length))}
|
|
|
45243
45245
|
const _sfc_main$C = {
|
|
45244
45246
|
__name: "Links",
|
|
45245
45247
|
props: {
|
|
45246
|
-
...defaultProps
|
|
45248
|
+
...defaultProps,
|
|
45249
|
+
forms: {
|
|
45250
|
+
type: Array,
|
|
45251
|
+
default: () => []
|
|
45252
|
+
}
|
|
45247
45253
|
},
|
|
45248
45254
|
emits: ["update"],
|
|
45249
45255
|
setup(__props, { emit: __emit }) {
|
|
45250
45256
|
const VFileUpload = vue.inject("VFileUpload", _sfc_main$O);
|
|
45251
45257
|
const emit = __emit;
|
|
45252
45258
|
const props = __props;
|
|
45259
|
+
console.log("Links", props);
|
|
45253
45260
|
const options = [{ value: "content", label: "Content" }, { value: "image_only", label: "Image Only" }];
|
|
45254
45261
|
const componentData = vue.ref(props.data.component);
|
|
45255
45262
|
const modalRef = vue.ref(null);
|
|
@@ -45284,6 +45291,7 @@ ${escapeText(this.code(index, length))}
|
|
|
45284
45291
|
};
|
|
45285
45292
|
const deleteCallback = (index) => {
|
|
45286
45293
|
var _a;
|
|
45294
|
+
componentData.value.data[index] = {};
|
|
45287
45295
|
(_a = componentData.value.data) == null ? void 0 : _a.splice(index, 1);
|
|
45288
45296
|
emit("update", false);
|
|
45289
45297
|
};
|
|
@@ -45349,7 +45357,7 @@ ${escapeText(this.code(index, length))}
|
|
|
45349
45357
|
var _a2, _b, _c;
|
|
45350
45358
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
45351
45359
|
class: "flex flex-col gap-4 rounded-xl px-6 py-4 bg-gray-200",
|
|
45352
|
-
key: index
|
|
45360
|
+
key: `${index}-${Date.now() + Math.random()}`,
|
|
45353
45361
|
ref_for: true,
|
|
45354
45362
|
ref: index === componentData.value.data.length - 1 ? (el) => lastItemRef.value = el : null
|
|
45355
45363
|
}, [
|
|
@@ -45431,8 +45439,9 @@ ${escapeText(this.code(index, length))}
|
|
|
45431
45439
|
"onUpdate:url": ($event) => item.url = $event,
|
|
45432
45440
|
openInNewTab: item.open_in_new_tab,
|
|
45433
45441
|
"onUpdate:openInNewTab": ($event) => item.open_in_new_tab = $event,
|
|
45434
|
-
sites: _ctx.sites
|
|
45435
|
-
|
|
45442
|
+
sites: _ctx.sites,
|
|
45443
|
+
forms: __props.forms
|
|
45444
|
+
}, null, 8, ["name", "type", "onUpdate:type", "url", "onUpdate:url", "openInNewTab", "onUpdate:openInNewTab", "sites", "forms"])) : vue.createCommentVNode("", true)
|
|
45436
45445
|
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_18$2, [
|
|
45437
45446
|
vue.createVNode(_sfc_main$P, {
|
|
45438
45447
|
"is-vertical": "",
|
package/package.json
CHANGED
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
<div
|
|
45
45
|
v-for="(item, index) in componentData.data"
|
|
46
46
|
class="flex flex-col gap-4 rounded-xl px-6 py-4 bg-gray-200"
|
|
47
|
-
:key="index"
|
|
47
|
+
:key="`${index}-${Date.now() + Math.random()}`"
|
|
48
48
|
:ref="index === componentData.data.length - 1 ? (el) => (lastItemRef = el) : null"
|
|
49
49
|
>
|
|
50
50
|
<div class="flex items-center justify-between">
|
|
@@ -107,6 +107,7 @@
|
|
|
107
107
|
v-model:url="item.url"
|
|
108
108
|
v-model:openInNewTab="item.open_in_new_tab"
|
|
109
109
|
:sites="sites"
|
|
110
|
+
:forms="forms"
|
|
110
111
|
/>
|
|
111
112
|
</div>
|
|
112
113
|
<div v-else>
|
|
@@ -144,8 +145,13 @@ const VFileUpload = inject("VFileUpload", DefaultFileUpload);
|
|
|
144
145
|
const emit = defineEmits(["update"]);
|
|
145
146
|
const props = defineProps({
|
|
146
147
|
...defaultProps,
|
|
148
|
+
forms: {
|
|
149
|
+
type: Array,
|
|
150
|
+
default: () => []
|
|
151
|
+
}
|
|
147
152
|
});
|
|
148
153
|
|
|
154
|
+
console.log('Links', props);
|
|
149
155
|
const options = [{value: 'content', label: 'Content'}, {value: 'image_only', label: 'Image Only'}];
|
|
150
156
|
|
|
151
157
|
const componentData = ref(props.data.component);
|
|
@@ -186,6 +192,7 @@ const handleDeleteItem = (index) => {
|
|
|
186
192
|
}
|
|
187
193
|
|
|
188
194
|
const deleteCallback = (index) => {
|
|
195
|
+
componentData.value.data[index] = {};
|
|
189
196
|
componentData.value.data?.splice(index, 1);
|
|
190
197
|
emit("update", false);
|
|
191
198
|
};
|
|
@@ -40,7 +40,7 @@ const type = defineModel("type", { default: "site-content" });
|
|
|
40
40
|
const url = defineModel("url");
|
|
41
41
|
const openInNewTab = defineModel("openInNewTab");
|
|
42
42
|
|
|
43
|
-
defineProps({
|
|
43
|
+
const props = defineProps({
|
|
44
44
|
label: { type: String, required: false },
|
|
45
45
|
sites: { type: Array, required: false, default: () => []}, // Todo refactor sites to items as generic usage
|
|
46
46
|
forms: { type: Array, required: false, default: () => []},
|
|
@@ -48,6 +48,8 @@ defineProps({
|
|
|
48
48
|
options: { type: Array, required: false, default: ["site-content", "external-page", 'download', 'form'] },
|
|
49
49
|
});
|
|
50
50
|
|
|
51
|
+
console.log('LinkedTo', props);
|
|
52
|
+
|
|
51
53
|
const toReadableWords = (input) => {
|
|
52
54
|
return input
|
|
53
55
|
.split('-') // Split the string by hyphens
|