@tailor-cms/ce-modal-edit 0.1.0 → 0.1.1
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/index.cjs +8 -8
- package/dist/index.css +1 -1
- package/dist/index.js +9 -9
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -949,19 +949,19 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
949
949
|
const emit = __emit;
|
|
950
950
|
const props = __props;
|
|
951
951
|
const elementBus = vue.inject("$elementBus");
|
|
952
|
-
const elementData = vue.reactive(cloneDeep(props.element.data));
|
|
953
952
|
const saveEmbed = (embeds) => {
|
|
954
|
-
|
|
955
|
-
|
|
953
|
+
const data = cloneDeep(props.element.data);
|
|
954
|
+
data.embeds = embeds;
|
|
955
|
+
emit("save", data);
|
|
956
956
|
};
|
|
957
957
|
const deleteEmbed = (embed) => {
|
|
958
|
-
|
|
959
|
-
|
|
958
|
+
const data = cloneDeep(props.element.data);
|
|
959
|
+
delete data.embeds[embed.id];
|
|
960
|
+
emit("save", data);
|
|
960
961
|
};
|
|
961
962
|
const hasElements = vue.computed(() => !isEmpty(props.element.data.embeds));
|
|
962
963
|
elementBus.on("title", (title) => {
|
|
963
|
-
|
|
964
|
-
emit("save", elementData);
|
|
964
|
+
emit("save", { ...props.element.data, title });
|
|
965
965
|
});
|
|
966
966
|
return (_ctx, _cache) => {
|
|
967
967
|
const _component_VIcon = vue.resolveComponent("VIcon");
|
|
@@ -1025,7 +1025,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
1025
1025
|
}
|
|
1026
1026
|
return target;
|
|
1027
1027
|
};
|
|
1028
|
-
const Edit = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
1028
|
+
const Edit = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-1878976d"]]);
|
|
1029
1029
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
1030
1030
|
__name: "TopToolbar",
|
|
1031
1031
|
props: {
|
package/dist/index.css
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./index.css";
|
|
2
|
-
import { defineComponent, inject,
|
|
2
|
+
import { defineComponent, inject, computed, resolveComponent, createBlock, openBlock, withCtx, createVNode, createElementVNode, unref, toDisplayString, createCommentVNode, createTextVNode, ref, watch } from "vue";
|
|
3
3
|
const byteToHex = [];
|
|
4
4
|
for (let i = 0; i < 256; ++i) {
|
|
5
5
|
byteToHex.push((i + 256).toString(16).slice(1));
|
|
@@ -947,19 +947,19 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
947
947
|
const emit = __emit;
|
|
948
948
|
const props = __props;
|
|
949
949
|
const elementBus = inject("$elementBus");
|
|
950
|
-
const elementData = reactive(cloneDeep(props.element.data));
|
|
951
950
|
const saveEmbed = (embeds) => {
|
|
952
|
-
|
|
953
|
-
|
|
951
|
+
const data = cloneDeep(props.element.data);
|
|
952
|
+
data.embeds = embeds;
|
|
953
|
+
emit("save", data);
|
|
954
954
|
};
|
|
955
955
|
const deleteEmbed = (embed) => {
|
|
956
|
-
|
|
957
|
-
|
|
956
|
+
const data = cloneDeep(props.element.data);
|
|
957
|
+
delete data.embeds[embed.id];
|
|
958
|
+
emit("save", data);
|
|
958
959
|
};
|
|
959
960
|
const hasElements = computed(() => !isEmpty(props.element.data.embeds));
|
|
960
961
|
elementBus.on("title", (title) => {
|
|
961
|
-
|
|
962
|
-
emit("save", elementData);
|
|
962
|
+
emit("save", { ...props.element.data, title });
|
|
963
963
|
});
|
|
964
964
|
return (_ctx, _cache) => {
|
|
965
965
|
const _component_VIcon = resolveComponent("VIcon");
|
|
@@ -1023,7 +1023,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
1023
1023
|
}
|
|
1024
1024
|
return target;
|
|
1025
1025
|
};
|
|
1026
|
-
const Edit = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
1026
|
+
const Edit = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-1878976d"]]);
|
|
1027
1027
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1028
1028
|
__name: "TopToolbar",
|
|
1029
1029
|
props: {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Tailor CMS modal authoring component",
|
|
4
4
|
"author": "Studion <info@gostudion.com> (https://github.com/tailor-cms)",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"version": "0.1.
|
|
6
|
+
"version": "0.1.1",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
9
|
"import": "./dist/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"typescript": "^5.8.3",
|
|
26
26
|
"vite": "^7.0.3",
|
|
27
27
|
"vue-tsc": "^3.0.1",
|
|
28
|
-
"@tailor-cms/ce-modal-manifest": "0.1.
|
|
28
|
+
"@tailor-cms/ce-modal-manifest": "0.1.1"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"lodash-es": "^4.17.21"
|