@tailor-cms/ce-sequence-edit 0.0.1 → 0.0.2
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 +145 -116
- package/dist/index.css +4 -9
- package/dist/index.js +146 -117
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -37,30 +37,32 @@ function _v4(options, buf, offset) {
|
|
|
37
37
|
}
|
|
38
38
|
//#endregion
|
|
39
39
|
//#region ../manifest/dist/index.mjs
|
|
40
|
-
var id1 = v4();
|
|
41
|
-
var id2 = v4();
|
|
42
40
|
var type = "SEQUENCE";
|
|
43
41
|
var name = "Sequence";
|
|
44
|
-
var initState = () =>
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
42
|
+
var initState = () => {
|
|
43
|
+
const id1 = v4();
|
|
44
|
+
const id2 = v4();
|
|
45
|
+
return {
|
|
46
|
+
mode: "steps",
|
|
47
|
+
embeds: {},
|
|
48
|
+
items: {
|
|
49
|
+
[id1]: {
|
|
50
|
+
id: id1,
|
|
51
|
+
marker: "",
|
|
52
|
+
title: "",
|
|
53
|
+
body: {},
|
|
54
|
+
position: 1
|
|
55
|
+
},
|
|
56
|
+
[id2]: {
|
|
57
|
+
id: id2,
|
|
58
|
+
marker: "",
|
|
59
|
+
title: "",
|
|
60
|
+
body: {},
|
|
61
|
+
position: 2
|
|
62
|
+
}
|
|
61
63
|
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
+
};
|
|
65
|
+
};
|
|
64
66
|
var ui = {
|
|
65
67
|
icon: "mdi-timeline-text",
|
|
66
68
|
forceFullWidth: true
|
|
@@ -3690,6 +3692,39 @@ function isEmpty(value) {
|
|
|
3690
3692
|
return true;
|
|
3691
3693
|
}
|
|
3692
3694
|
//#endregion
|
|
3695
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js
|
|
3696
|
+
/**
|
|
3697
|
+
* Performs a deep comparison between two values to determine if they are
|
|
3698
|
+
* equivalent.
|
|
3699
|
+
*
|
|
3700
|
+
* **Note:** This method supports comparing arrays, array buffers, booleans,
|
|
3701
|
+
* date objects, error objects, maps, numbers, `Object` objects, regexes,
|
|
3702
|
+
* sets, strings, symbols, and typed arrays. `Object` objects are compared
|
|
3703
|
+
* by their own, not inherited, enumerable properties. Functions and DOM
|
|
3704
|
+
* nodes are compared by strict equality, i.e. `===`.
|
|
3705
|
+
*
|
|
3706
|
+
* @static
|
|
3707
|
+
* @memberOf _
|
|
3708
|
+
* @since 0.1.0
|
|
3709
|
+
* @category Lang
|
|
3710
|
+
* @param {*} value The value to compare.
|
|
3711
|
+
* @param {*} other The other value to compare.
|
|
3712
|
+
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
3713
|
+
* @example
|
|
3714
|
+
*
|
|
3715
|
+
* var object = { 'a': 1 };
|
|
3716
|
+
* var other = { 'a': 1 };
|
|
3717
|
+
*
|
|
3718
|
+
* _.isEqual(object, other);
|
|
3719
|
+
* // => true
|
|
3720
|
+
*
|
|
3721
|
+
* object === other;
|
|
3722
|
+
* // => false
|
|
3723
|
+
*/
|
|
3724
|
+
function isEqual(value, other) {
|
|
3725
|
+
return baseIsEqual(value, other);
|
|
3726
|
+
}
|
|
3727
|
+
//#endregion
|
|
3693
3728
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isNumber.js
|
|
3694
3729
|
/** `Object#toString` result references. */
|
|
3695
3730
|
var numberTag = "[object Number]";
|
|
@@ -5558,7 +5593,8 @@ Bt.mounted, Bt.unmounted;
|
|
|
5558
5593
|
//#endregion
|
|
5559
5594
|
//#region src/components/SequenceItem.vue?vue&type=script&setup=true&lang.ts
|
|
5560
5595
|
var _hoisted_1$1 = { class: "d-flex align-center w-100 ga-2" };
|
|
5561
|
-
var _hoisted_2
|
|
5596
|
+
var _hoisted_2 = { class: "text-label-large" };
|
|
5597
|
+
var SAVE_DEBOUNCE = 3e3;
|
|
5562
5598
|
var SequenceItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
5563
5599
|
__name: "SequenceItem",
|
|
5564
5600
|
props: {
|
|
@@ -5596,7 +5632,7 @@ var SequenceItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0,
|
|
|
5596
5632
|
item: currentItem(),
|
|
5597
5633
|
embeds: props.embeds
|
|
5598
5634
|
});
|
|
5599
|
-
},
|
|
5635
|
+
}, SAVE_DEBOUNCE);
|
|
5600
5636
|
const saveEmbed = (embeds) => {
|
|
5601
5637
|
const item = currentItem();
|
|
5602
5638
|
forEach(embeds, (it) => item.body[it.id] = true);
|
|
@@ -5626,6 +5662,7 @@ var SequenceItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0,
|
|
|
5626
5662
|
const _component_VIcon = (0, vue.resolveComponent)("VIcon");
|
|
5627
5663
|
const _component_VAvatar = (0, vue.resolveComponent)("VAvatar");
|
|
5628
5664
|
const _component_VTextField = (0, vue.resolveComponent)("VTextField");
|
|
5665
|
+
const _component_VDivider = (0, vue.resolveComponent)("VDivider");
|
|
5629
5666
|
const _component_VBtn = (0, vue.resolveComponent)("VBtn");
|
|
5630
5667
|
const _component_VFadeTransition = (0, vue.resolveComponent)("VFadeTransition");
|
|
5631
5668
|
const _component_VExpansionPanelTitle = (0, vue.resolveComponent)("VExpansionPanelTitle");
|
|
@@ -5635,11 +5672,13 @@ var SequenceItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0,
|
|
|
5635
5672
|
const _component_VExpansionPanelText = (0, vue.resolveComponent)("VExpansionPanelText");
|
|
5636
5673
|
const _component_VExpansionPanel = (0, vue.resolveComponent)("VExpansionPanel");
|
|
5637
5674
|
const _directive_tooltip = (0, vue.resolveDirective)("tooltip");
|
|
5638
|
-
return (0, vue.openBlock)(), (0, vue.createBlock)(_component_VExpansionPanel, {
|
|
5675
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)(_component_VExpansionPanel, {
|
|
5676
|
+
value: __props.item.id,
|
|
5677
|
+
class: "border sm"
|
|
5678
|
+
}, {
|
|
5639
5679
|
default: (0, vue.withCtx)(() => [(0, vue.createVNode)(_component_VHover, null, {
|
|
5640
5680
|
default: (0, vue.withCtx)(({ isHovering, props: hoverProps }) => [(0, vue.createVNode)(_component_VExpansionPanelTitle, (0, vue.mergeProps)(hoverProps, {
|
|
5641
5681
|
class: "pa-2 pr-4",
|
|
5642
|
-
color: "primary-lighten-5",
|
|
5643
5682
|
"min-height": "56"
|
|
5644
5683
|
}), {
|
|
5645
5684
|
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", _hoisted_1$1, [
|
|
@@ -5650,45 +5689,48 @@ var SequenceItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0,
|
|
|
5650
5689
|
}, [(0, vue.createVNode)(_component_VIcon, { icon: "mdi-drag-vertical" })], 32)) : (0, vue.createCommentVNode)("", true),
|
|
5651
5690
|
__props.mode === "steps" ? ((0, vue.openBlock)(), (0, vue.createBlock)(_component_VAvatar, {
|
|
5652
5691
|
key: 1,
|
|
5653
|
-
color: "
|
|
5654
|
-
size: "
|
|
5692
|
+
color: "surface-container",
|
|
5693
|
+
size: "26",
|
|
5655
5694
|
start: ""
|
|
5656
5695
|
}, {
|
|
5657
|
-
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("span", _hoisted_2
|
|
5696
|
+
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("span", _hoisted_2, (0, vue.toDisplayString)(__props.position), 1)]),
|
|
5658
5697
|
_: 1
|
|
5659
|
-
})) : (0, vue.
|
|
5660
|
-
__props.mode === "timeline" ? ((0, vue.openBlock)(), (0, vue.createBlock)(_component_VTextField, {
|
|
5661
|
-
key: 2,
|
|
5698
|
+
})) : ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 2 }, [(0, vue.createVNode)(_component_VTextField, {
|
|
5662
5699
|
modelValue: draft.marker,
|
|
5663
5700
|
"onUpdate:modelValue": [_cache[1] || (_cache[1] = ($event) => draft.marker = $event), (0, vue.unref)(save)],
|
|
5664
5701
|
readonly: __props.isReadonly,
|
|
5665
|
-
|
|
5666
|
-
"
|
|
5667
|
-
class: "sequence-item-marker flex-grow-0 mr-2",
|
|
5702
|
+
"bg-color": "transparent",
|
|
5703
|
+
class: "sequence-item-marker flex-grow-0",
|
|
5668
5704
|
density: "compact",
|
|
5669
5705
|
placeholder: "Date",
|
|
5670
|
-
variant: "
|
|
5671
|
-
width: "
|
|
5706
|
+
variant: "plain",
|
|
5707
|
+
width: "120",
|
|
5672
5708
|
"hide-details": "",
|
|
5673
|
-
|
|
5709
|
+
onBlur: _cache[2] || (_cache[2] = ($event) => (0, vue.unref)(save).flush()),
|
|
5710
|
+
onClick: _cache[3] || (_cache[3] = (0, vue.withModifiers)(() => {}, ["stop"])),
|
|
5711
|
+
onKeyup: _cache[4] || (_cache[4] = (0, vue.withKeys)((0, vue.withModifiers)(() => {}, ["prevent"]), ["space"]))
|
|
5674
5712
|
}, null, 8, [
|
|
5675
5713
|
"modelValue",
|
|
5676
5714
|
"readonly",
|
|
5677
5715
|
"onUpdate:modelValue"
|
|
5678
|
-
])
|
|
5716
|
+
]), (0, vue.createVNode)(_component_VDivider, {
|
|
5717
|
+
class: "mx-2 my-1",
|
|
5718
|
+
opacity: "0.5",
|
|
5719
|
+
vertical: ""
|
|
5720
|
+
})], 64)),
|
|
5679
5721
|
(0, vue.createVNode)(_component_VTextField, {
|
|
5680
5722
|
modelValue: draft.title,
|
|
5681
|
-
"onUpdate:modelValue": [_cache[
|
|
5723
|
+
"onUpdate:modelValue": [_cache[5] || (_cache[5] = ($event) => draft.title = $event), (0, vue.unref)(save)],
|
|
5682
5724
|
readonly: __props.isReadonly,
|
|
5683
|
-
autocomplete: "off",
|
|
5684
5725
|
"bg-color": "transparent",
|
|
5685
5726
|
class: "sequence-item-title",
|
|
5686
5727
|
density: "compact",
|
|
5687
5728
|
placeholder: "Title",
|
|
5688
5729
|
variant: "plain",
|
|
5689
|
-
flat: "",
|
|
5690
5730
|
"hide-details": "",
|
|
5691
|
-
|
|
5731
|
+
onBlur: _cache[6] || (_cache[6] = ($event) => (0, vue.unref)(save).flush()),
|
|
5732
|
+
onClick: _cache[7] || (_cache[7] = (0, vue.withModifiers)(() => {}, ["stop"])),
|
|
5733
|
+
onKeyup: _cache[8] || (_cache[8] = (0, vue.withKeys)((0, vue.withModifiers)(() => {}, ["prevent"]), ["space"]))
|
|
5692
5734
|
}, null, 8, [
|
|
5693
5735
|
"modelValue",
|
|
5694
5736
|
"readonly",
|
|
@@ -5723,9 +5765,9 @@ var SequenceItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0,
|
|
|
5723
5765
|
default: (0, vue.withCtx)(() => [!hasElements.value ? ((0, vue.openBlock)(), (0, vue.createBlock)(_component_VAlert, {
|
|
5724
5766
|
key: 0,
|
|
5725
5767
|
class: "mx-6 mt-4",
|
|
5726
|
-
color: "primary-darken-1",
|
|
5727
5768
|
icon: "mdi-information-outline",
|
|
5728
|
-
variant: "tonal"
|
|
5769
|
+
variant: "tonal",
|
|
5770
|
+
prominent: ""
|
|
5729
5771
|
}, {
|
|
5730
5772
|
default: (0, vue.withCtx)(() => [__props.isReadonly ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 0 }, [(0, vue.createTextVNode)(" No content elements added to this entry. ")], 64)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 1 }, [(0, vue.createTextVNode)(" Click the button below to add a content element. ")], 64))]),
|
|
5731
5773
|
_: 1
|
|
@@ -5735,7 +5777,7 @@ var SequenceItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0,
|
|
|
5735
5777
|
"is-readonly": __props.isReadonly,
|
|
5736
5778
|
class: "text-center",
|
|
5737
5779
|
onDelete: deleteEmbed,
|
|
5738
|
-
onSave: _cache[
|
|
5780
|
+
onSave: _cache[9] || (_cache[9] = ($event) => saveEmbed($event.embeds))
|
|
5739
5781
|
}, null, 8, [
|
|
5740
5782
|
"allowed-element-config",
|
|
5741
5783
|
"container",
|
|
@@ -5757,11 +5799,10 @@ var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
|
5757
5799
|
};
|
|
5758
5800
|
//#endregion
|
|
5759
5801
|
//#region src/components/SequenceItem.vue
|
|
5760
|
-
var SequenceItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(SequenceItem_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5802
|
+
var SequenceItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(SequenceItem_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-8056cb4a"]]);
|
|
5761
5803
|
//#endregion
|
|
5762
5804
|
//#region src/components/Edit.vue?vue&type=script&setup=true&lang.ts
|
|
5763
|
-
var _hoisted_1 = { class: "text-
|
|
5764
|
-
var _hoisted_2 = { class: "pa-6 text-center" };
|
|
5805
|
+
var _hoisted_1 = { class: "tce-sequence text-center" };
|
|
5765
5806
|
//#endregion
|
|
5766
5807
|
//#region src/components/Edit.vue
|
|
5767
5808
|
var Edit_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -5833,84 +5874,67 @@ var Edit_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__
|
|
|
5833
5874
|
emit("save", elementData);
|
|
5834
5875
|
}
|
|
5835
5876
|
});
|
|
5877
|
+
(0, vue.watch)(() => props.element.data, (data) => {
|
|
5878
|
+
if (isEqual(data, elementData)) return;
|
|
5879
|
+
Object.assign(elementData, cloneDeep(data));
|
|
5880
|
+
});
|
|
5836
5881
|
return (_ctx, _cache) => {
|
|
5837
|
-
const _component_VIcon = (0, vue.resolveComponent)("VIcon");
|
|
5838
|
-
const _component_VToolbar = (0, vue.resolveComponent)("VToolbar");
|
|
5839
5882
|
const _component_VExpandTransition = (0, vue.resolveComponent)("VExpandTransition");
|
|
5840
5883
|
const _component_VExpansionPanels = (0, vue.resolveComponent)("VExpansionPanels");
|
|
5841
5884
|
const _component_VBtn = (0, vue.resolveComponent)("VBtn");
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
5885
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1, [(0, vue.createVNode)(_component_VExpansionPanels, {
|
|
5886
|
+
ref_key: "panels",
|
|
5887
|
+
ref: panels,
|
|
5888
|
+
modelValue: expanded.value,
|
|
5889
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => expanded.value = $event),
|
|
5890
|
+
rounded: "lg",
|
|
5891
|
+
flat: "",
|
|
5892
|
+
multiple: ""
|
|
5846
5893
|
}, {
|
|
5847
|
-
default: (0, vue.withCtx)(() => [(0, vue.
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
height: "36"
|
|
5851
|
-
}, {
|
|
5852
|
-
default: (0, vue.withCtx)(() => [(0, vue.createVNode)(_component_VIcon, {
|
|
5853
|
-
icon: (0, vue.unref)(manifest$1).ui.icon,
|
|
5854
|
-
color: "secondary-lighten-2",
|
|
5855
|
-
size: "18",
|
|
5856
|
-
start: ""
|
|
5857
|
-
}, null, 8, ["icon"]), (0, vue.createElementVNode)("span", _hoisted_1, (0, vue.toDisplayString)((0, vue.unref)(manifest$1).name), 1)]),
|
|
5858
|
-
_: 1
|
|
5859
|
-
}), (0, vue.createElementVNode)("div", _hoisted_2, [(0, vue.createVNode)(_component_VExpansionPanels, {
|
|
5860
|
-
ref_key: "panels",
|
|
5861
|
-
ref: panels,
|
|
5862
|
-
modelValue: expanded.value,
|
|
5863
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => expanded.value = $event),
|
|
5864
|
-
rounded: "lg",
|
|
5865
|
-
flat: "",
|
|
5866
|
-
multiple: ""
|
|
5894
|
+
default: (0, vue.withCtx)(() => [!!itemCount.value ? ((0, vue.openBlock)(), (0, vue.createBlock)(_component_VExpandTransition, {
|
|
5895
|
+
key: 0,
|
|
5896
|
+
group: ""
|
|
5867
5897
|
}, {
|
|
5868
|
-
default: (0, vue.withCtx)(() => [
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
"onDelete"
|
|
5895
|
-
]);
|
|
5896
|
-
}), 128))]),
|
|
5897
|
-
_: 1
|
|
5898
|
-
})) : (0, vue.createCommentVNode)("", true)]),
|
|
5898
|
+
default: (0, vue.withCtx)(() => [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(items.value, (item, index) => {
|
|
5899
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)(SequenceItem_default, {
|
|
5900
|
+
key: item.id,
|
|
5901
|
+
"allow-deletion": itemCount.value > 1,
|
|
5902
|
+
"embed-element-config": __props.embedElementConfig,
|
|
5903
|
+
embeds: embedsByItem.value[item.id],
|
|
5904
|
+
"is-expanded": expanded.value.includes(item.id),
|
|
5905
|
+
"is-readonly": __props.isReadonly,
|
|
5906
|
+
item,
|
|
5907
|
+
mode: elementData.mode,
|
|
5908
|
+
position: index + 1,
|
|
5909
|
+
class: "text-left",
|
|
5910
|
+
onDelete: ($event) => deleteItem(item.id),
|
|
5911
|
+
onSave: _cache[0] || (_cache[0] = ($event) => saveItem($event))
|
|
5912
|
+
}, null, 8, [
|
|
5913
|
+
"allow-deletion",
|
|
5914
|
+
"embed-element-config",
|
|
5915
|
+
"embeds",
|
|
5916
|
+
"is-expanded",
|
|
5917
|
+
"is-readonly",
|
|
5918
|
+
"item",
|
|
5919
|
+
"mode",
|
|
5920
|
+
"position",
|
|
5921
|
+
"onDelete"
|
|
5922
|
+
]);
|
|
5923
|
+
}), 128))]),
|
|
5899
5924
|
_: 1
|
|
5900
|
-
}
|
|
5901
|
-
key: 0,
|
|
5902
|
-
class: "mt-6",
|
|
5903
|
-
color: "primary-darken-4",
|
|
5904
|
-
"prepend-icon": "mdi-plus",
|
|
5905
|
-
text: "Add Entry",
|
|
5906
|
-
variant: "text",
|
|
5907
|
-
onClick: addItem
|
|
5908
|
-
})) : (0, vue.createCommentVNode)("", true)])]),
|
|
5925
|
+
})) : (0, vue.createCommentVNode)("", true)]),
|
|
5909
5926
|
_: 1
|
|
5910
|
-
})
|
|
5927
|
+
}, 8, ["modelValue"]), !__props.isReadonly ? ((0, vue.openBlock)(), (0, vue.createBlock)(_component_VBtn, {
|
|
5928
|
+
key: 0,
|
|
5929
|
+
class: "mt-4",
|
|
5930
|
+
"prepend-icon": "mdi-plus",
|
|
5931
|
+
text: "Add Entry",
|
|
5932
|
+
variant: "text",
|
|
5933
|
+
onClick: addItem
|
|
5934
|
+
})) : (0, vue.createCommentVNode)("", true)]);
|
|
5911
5935
|
};
|
|
5912
5936
|
}
|
|
5913
|
-
}), [["__scopeId", "data-v-
|
|
5937
|
+
}), [["__scopeId", "data-v-7ccd7f10"]]);
|
|
5914
5938
|
//#endregion
|
|
5915
5939
|
//#region src/components/SideToolbar.vue
|
|
5916
5940
|
var SideToolbar_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -5920,6 +5944,11 @@ var SideToolbar_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5920
5944
|
const props = __props;
|
|
5921
5945
|
const elementBus = (0, vue.inject)("$elementBus");
|
|
5922
5946
|
const mode = (0, vue.ref)(props.element.data.mode ?? "steps");
|
|
5947
|
+
(0, vue.watch)(() => props.element.data.mode, (value) => {
|
|
5948
|
+
const next = value ?? "steps";
|
|
5949
|
+
if (next === mode.value) return;
|
|
5950
|
+
mode.value = next;
|
|
5951
|
+
});
|
|
5923
5952
|
const onChange = (value) => {
|
|
5924
5953
|
if (!value) return;
|
|
5925
5954
|
mode.value = value;
|
package/dist/index.css
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
.
|
|
2
|
-
border: thin solid rgba(0, 0, 0, 0.12);
|
|
3
|
-
}
|
|
4
|
-
.sequence-drag-handle[data-v-ac126efa] {
|
|
1
|
+
.sequence-drag-handle[data-v-8056cb4a] {
|
|
5
2
|
cursor: pointer;
|
|
6
3
|
}
|
|
7
|
-
.sequence-item-title[data-v-
|
|
4
|
+
.sequence-item-title[data-v-8056cb4a] .v-field,
|
|
5
|
+
.sequence-item-marker[data-v-8056cb4a] .v-field {
|
|
8
6
|
--v-field-input-padding-top: 0;
|
|
9
|
-
}
|
|
10
|
-
text-align: left;
|
|
11
|
-
}
|
|
12
|
-
[data-v-abd59587] .sortable-ghost > * {
|
|
7
|
+
}[data-v-7ccd7f10] .sortable-ghost > * {
|
|
13
8
|
visibility: hidden;
|
|
14
9
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, h, inject, isRef, mergeProps, nextTick, onMounted, onUnmounted, openBlock, reactive, ref, renderList, resolveComponent, resolveDirective, toDisplayString, toRefs, unref, watch, withCtx, withDirectives, withModifiers } from "vue";
|
|
1
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, h, inject, isRef, mergeProps, nextTick, onMounted, onUnmounted, openBlock, reactive, ref, renderList, resolveComponent, resolveDirective, toDisplayString, toRefs, unref, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
2
2
|
import './index.css';//#region ../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/stringify.js
|
|
3
3
|
var byteToHex = [];
|
|
4
4
|
for (let i = 0; i < 256; ++i) byteToHex.push((i + 256).toString(16).slice(1));
|
|
@@ -33,30 +33,32 @@ function _v4(options, buf, offset) {
|
|
|
33
33
|
}
|
|
34
34
|
//#endregion
|
|
35
35
|
//#region ../manifest/dist/index.mjs
|
|
36
|
-
var id1 = v4();
|
|
37
|
-
var id2 = v4();
|
|
38
36
|
var type = "SEQUENCE";
|
|
39
37
|
var name = "Sequence";
|
|
40
|
-
var initState = () =>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
38
|
+
var initState = () => {
|
|
39
|
+
const id1 = v4();
|
|
40
|
+
const id2 = v4();
|
|
41
|
+
return {
|
|
42
|
+
mode: "steps",
|
|
43
|
+
embeds: {},
|
|
44
|
+
items: {
|
|
45
|
+
[id1]: {
|
|
46
|
+
id: id1,
|
|
47
|
+
marker: "",
|
|
48
|
+
title: "",
|
|
49
|
+
body: {},
|
|
50
|
+
position: 1
|
|
51
|
+
},
|
|
52
|
+
[id2]: {
|
|
53
|
+
id: id2,
|
|
54
|
+
marker: "",
|
|
55
|
+
title: "",
|
|
56
|
+
body: {},
|
|
57
|
+
position: 2
|
|
58
|
+
}
|
|
57
59
|
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
+
};
|
|
61
|
+
};
|
|
60
62
|
var ui = {
|
|
61
63
|
icon: "mdi-timeline-text",
|
|
62
64
|
forceFullWidth: true
|
|
@@ -3686,6 +3688,39 @@ function isEmpty(value) {
|
|
|
3686
3688
|
return true;
|
|
3687
3689
|
}
|
|
3688
3690
|
//#endregion
|
|
3691
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js
|
|
3692
|
+
/**
|
|
3693
|
+
* Performs a deep comparison between two values to determine if they are
|
|
3694
|
+
* equivalent.
|
|
3695
|
+
*
|
|
3696
|
+
* **Note:** This method supports comparing arrays, array buffers, booleans,
|
|
3697
|
+
* date objects, error objects, maps, numbers, `Object` objects, regexes,
|
|
3698
|
+
* sets, strings, symbols, and typed arrays. `Object` objects are compared
|
|
3699
|
+
* by their own, not inherited, enumerable properties. Functions and DOM
|
|
3700
|
+
* nodes are compared by strict equality, i.e. `===`.
|
|
3701
|
+
*
|
|
3702
|
+
* @static
|
|
3703
|
+
* @memberOf _
|
|
3704
|
+
* @since 0.1.0
|
|
3705
|
+
* @category Lang
|
|
3706
|
+
* @param {*} value The value to compare.
|
|
3707
|
+
* @param {*} other The other value to compare.
|
|
3708
|
+
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
3709
|
+
* @example
|
|
3710
|
+
*
|
|
3711
|
+
* var object = { 'a': 1 };
|
|
3712
|
+
* var other = { 'a': 1 };
|
|
3713
|
+
*
|
|
3714
|
+
* _.isEqual(object, other);
|
|
3715
|
+
* // => true
|
|
3716
|
+
*
|
|
3717
|
+
* object === other;
|
|
3718
|
+
* // => false
|
|
3719
|
+
*/
|
|
3720
|
+
function isEqual(value, other) {
|
|
3721
|
+
return baseIsEqual(value, other);
|
|
3722
|
+
}
|
|
3723
|
+
//#endregion
|
|
3689
3724
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isNumber.js
|
|
3690
3725
|
/** `Object#toString` result references. */
|
|
3691
3726
|
var numberTag = "[object Number]";
|
|
@@ -5554,7 +5589,8 @@ Bt.mounted, Bt.unmounted;
|
|
|
5554
5589
|
//#endregion
|
|
5555
5590
|
//#region src/components/SequenceItem.vue?vue&type=script&setup=true&lang.ts
|
|
5556
5591
|
var _hoisted_1$1 = { class: "d-flex align-center w-100 ga-2" };
|
|
5557
|
-
var _hoisted_2
|
|
5592
|
+
var _hoisted_2 = { class: "text-label-large" };
|
|
5593
|
+
var SAVE_DEBOUNCE = 3e3;
|
|
5558
5594
|
var SequenceItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
5559
5595
|
__name: "SequenceItem",
|
|
5560
5596
|
props: {
|
|
@@ -5592,7 +5628,7 @@ var SequenceItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
5592
5628
|
item: currentItem(),
|
|
5593
5629
|
embeds: props.embeds
|
|
5594
5630
|
});
|
|
5595
|
-
},
|
|
5631
|
+
}, SAVE_DEBOUNCE);
|
|
5596
5632
|
const saveEmbed = (embeds) => {
|
|
5597
5633
|
const item = currentItem();
|
|
5598
5634
|
forEach(embeds, (it) => item.body[it.id] = true);
|
|
@@ -5622,6 +5658,7 @@ var SequenceItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
5622
5658
|
const _component_VIcon = resolveComponent("VIcon");
|
|
5623
5659
|
const _component_VAvatar = resolveComponent("VAvatar");
|
|
5624
5660
|
const _component_VTextField = resolveComponent("VTextField");
|
|
5661
|
+
const _component_VDivider = resolveComponent("VDivider");
|
|
5625
5662
|
const _component_VBtn = resolveComponent("VBtn");
|
|
5626
5663
|
const _component_VFadeTransition = resolveComponent("VFadeTransition");
|
|
5627
5664
|
const _component_VExpansionPanelTitle = resolveComponent("VExpansionPanelTitle");
|
|
@@ -5631,11 +5668,13 @@ var SequenceItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
5631
5668
|
const _component_VExpansionPanelText = resolveComponent("VExpansionPanelText");
|
|
5632
5669
|
const _component_VExpansionPanel = resolveComponent("VExpansionPanel");
|
|
5633
5670
|
const _directive_tooltip = resolveDirective("tooltip");
|
|
5634
|
-
return openBlock(), createBlock(_component_VExpansionPanel, {
|
|
5671
|
+
return openBlock(), createBlock(_component_VExpansionPanel, {
|
|
5672
|
+
value: __props.item.id,
|
|
5673
|
+
class: "border sm"
|
|
5674
|
+
}, {
|
|
5635
5675
|
default: withCtx(() => [createVNode(_component_VHover, null, {
|
|
5636
5676
|
default: withCtx(({ isHovering, props: hoverProps }) => [createVNode(_component_VExpansionPanelTitle, mergeProps(hoverProps, {
|
|
5637
5677
|
class: "pa-2 pr-4",
|
|
5638
|
-
color: "primary-lighten-5",
|
|
5639
5678
|
"min-height": "56"
|
|
5640
5679
|
}), {
|
|
5641
5680
|
default: withCtx(() => [createElementVNode("div", _hoisted_1$1, [
|
|
@@ -5646,45 +5685,48 @@ var SequenceItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
5646
5685
|
}, [createVNode(_component_VIcon, { icon: "mdi-drag-vertical" })], 32)) : createCommentVNode("", true),
|
|
5647
5686
|
__props.mode === "steps" ? (openBlock(), createBlock(_component_VAvatar, {
|
|
5648
5687
|
key: 1,
|
|
5649
|
-
color: "
|
|
5650
|
-
size: "
|
|
5688
|
+
color: "surface-container",
|
|
5689
|
+
size: "26",
|
|
5651
5690
|
start: ""
|
|
5652
5691
|
}, {
|
|
5653
|
-
default: withCtx(() => [createElementVNode("span", _hoisted_2
|
|
5692
|
+
default: withCtx(() => [createElementVNode("span", _hoisted_2, toDisplayString(__props.position), 1)]),
|
|
5654
5693
|
_: 1
|
|
5655
|
-
})) :
|
|
5656
|
-
__props.mode === "timeline" ? (openBlock(), createBlock(_component_VTextField, {
|
|
5657
|
-
key: 2,
|
|
5694
|
+
})) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [createVNode(_component_VTextField, {
|
|
5658
5695
|
modelValue: draft.marker,
|
|
5659
5696
|
"onUpdate:modelValue": [_cache[1] || (_cache[1] = ($event) => draft.marker = $event), unref(save)],
|
|
5660
5697
|
readonly: __props.isReadonly,
|
|
5661
|
-
|
|
5662
|
-
"
|
|
5663
|
-
class: "sequence-item-marker flex-grow-0 mr-2",
|
|
5698
|
+
"bg-color": "transparent",
|
|
5699
|
+
class: "sequence-item-marker flex-grow-0",
|
|
5664
5700
|
density: "compact",
|
|
5665
5701
|
placeholder: "Date",
|
|
5666
|
-
variant: "
|
|
5667
|
-
width: "
|
|
5702
|
+
variant: "plain",
|
|
5703
|
+
width: "120",
|
|
5668
5704
|
"hide-details": "",
|
|
5669
|
-
|
|
5705
|
+
onBlur: _cache[2] || (_cache[2] = ($event) => unref(save).flush()),
|
|
5706
|
+
onClick: _cache[3] || (_cache[3] = withModifiers(() => {}, ["stop"])),
|
|
5707
|
+
onKeyup: _cache[4] || (_cache[4] = withKeys(withModifiers(() => {}, ["prevent"]), ["space"]))
|
|
5670
5708
|
}, null, 8, [
|
|
5671
5709
|
"modelValue",
|
|
5672
5710
|
"readonly",
|
|
5673
5711
|
"onUpdate:modelValue"
|
|
5674
|
-
])
|
|
5712
|
+
]), createVNode(_component_VDivider, {
|
|
5713
|
+
class: "mx-2 my-1",
|
|
5714
|
+
opacity: "0.5",
|
|
5715
|
+
vertical: ""
|
|
5716
|
+
})], 64)),
|
|
5675
5717
|
createVNode(_component_VTextField, {
|
|
5676
5718
|
modelValue: draft.title,
|
|
5677
|
-
"onUpdate:modelValue": [_cache[
|
|
5719
|
+
"onUpdate:modelValue": [_cache[5] || (_cache[5] = ($event) => draft.title = $event), unref(save)],
|
|
5678
5720
|
readonly: __props.isReadonly,
|
|
5679
|
-
autocomplete: "off",
|
|
5680
5721
|
"bg-color": "transparent",
|
|
5681
5722
|
class: "sequence-item-title",
|
|
5682
5723
|
density: "compact",
|
|
5683
5724
|
placeholder: "Title",
|
|
5684
5725
|
variant: "plain",
|
|
5685
|
-
flat: "",
|
|
5686
5726
|
"hide-details": "",
|
|
5687
|
-
|
|
5727
|
+
onBlur: _cache[6] || (_cache[6] = ($event) => unref(save).flush()),
|
|
5728
|
+
onClick: _cache[7] || (_cache[7] = withModifiers(() => {}, ["stop"])),
|
|
5729
|
+
onKeyup: _cache[8] || (_cache[8] = withKeys(withModifiers(() => {}, ["prevent"]), ["space"]))
|
|
5688
5730
|
}, null, 8, [
|
|
5689
5731
|
"modelValue",
|
|
5690
5732
|
"readonly",
|
|
@@ -5719,9 +5761,9 @@ var SequenceItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
5719
5761
|
default: withCtx(() => [!hasElements.value ? (openBlock(), createBlock(_component_VAlert, {
|
|
5720
5762
|
key: 0,
|
|
5721
5763
|
class: "mx-6 mt-4",
|
|
5722
|
-
color: "primary-darken-1",
|
|
5723
5764
|
icon: "mdi-information-outline",
|
|
5724
|
-
variant: "tonal"
|
|
5765
|
+
variant: "tonal",
|
|
5766
|
+
prominent: ""
|
|
5725
5767
|
}, {
|
|
5726
5768
|
default: withCtx(() => [__props.isReadonly ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(" No content elements added to this entry. ")], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(" Click the button below to add a content element. ")], 64))]),
|
|
5727
5769
|
_: 1
|
|
@@ -5731,7 +5773,7 @@ var SequenceItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
5731
5773
|
"is-readonly": __props.isReadonly,
|
|
5732
5774
|
class: "text-center",
|
|
5733
5775
|
onDelete: deleteEmbed,
|
|
5734
|
-
onSave: _cache[
|
|
5776
|
+
onSave: _cache[9] || (_cache[9] = ($event) => saveEmbed($event.embeds))
|
|
5735
5777
|
}, null, 8, [
|
|
5736
5778
|
"allowed-element-config",
|
|
5737
5779
|
"container",
|
|
@@ -5753,11 +5795,10 @@ var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
|
5753
5795
|
};
|
|
5754
5796
|
//#endregion
|
|
5755
5797
|
//#region src/components/SequenceItem.vue
|
|
5756
|
-
var SequenceItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(SequenceItem_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5798
|
+
var SequenceItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(SequenceItem_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-8056cb4a"]]);
|
|
5757
5799
|
//#endregion
|
|
5758
5800
|
//#region src/components/Edit.vue?vue&type=script&setup=true&lang.ts
|
|
5759
|
-
var _hoisted_1 = { class: "text-
|
|
5760
|
-
var _hoisted_2 = { class: "pa-6 text-center" };
|
|
5801
|
+
var _hoisted_1 = { class: "tce-sequence text-center" };
|
|
5761
5802
|
//#endregion
|
|
5762
5803
|
//#region src/components/Edit.vue
|
|
5763
5804
|
var Edit_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
@@ -5829,84 +5870,67 @@ var Edit_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__
|
|
|
5829
5870
|
emit("save", elementData);
|
|
5830
5871
|
}
|
|
5831
5872
|
});
|
|
5873
|
+
watch(() => props.element.data, (data) => {
|
|
5874
|
+
if (isEqual(data, elementData)) return;
|
|
5875
|
+
Object.assign(elementData, cloneDeep(data));
|
|
5876
|
+
});
|
|
5832
5877
|
return (_ctx, _cache) => {
|
|
5833
|
-
const _component_VIcon = resolveComponent("VIcon");
|
|
5834
|
-
const _component_VToolbar = resolveComponent("VToolbar");
|
|
5835
5878
|
const _component_VExpandTransition = resolveComponent("VExpandTransition");
|
|
5836
5879
|
const _component_VExpansionPanels = resolveComponent("VExpansionPanels");
|
|
5837
5880
|
const _component_VBtn = resolveComponent("VBtn");
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5881
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [createVNode(_component_VExpansionPanels, {
|
|
5882
|
+
ref_key: "panels",
|
|
5883
|
+
ref: panels,
|
|
5884
|
+
modelValue: expanded.value,
|
|
5885
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => expanded.value = $event),
|
|
5886
|
+
rounded: "lg",
|
|
5887
|
+
flat: "",
|
|
5888
|
+
multiple: ""
|
|
5842
5889
|
}, {
|
|
5843
|
-
default: withCtx(() => [
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
height: "36"
|
|
5847
|
-
}, {
|
|
5848
|
-
default: withCtx(() => [createVNode(_component_VIcon, {
|
|
5849
|
-
icon: unref(manifest$1).ui.icon,
|
|
5850
|
-
color: "secondary-lighten-2",
|
|
5851
|
-
size: "18",
|
|
5852
|
-
start: ""
|
|
5853
|
-
}, null, 8, ["icon"]), createElementVNode("span", _hoisted_1, toDisplayString(unref(manifest$1).name), 1)]),
|
|
5854
|
-
_: 1
|
|
5855
|
-
}), createElementVNode("div", _hoisted_2, [createVNode(_component_VExpansionPanels, {
|
|
5856
|
-
ref_key: "panels",
|
|
5857
|
-
ref: panels,
|
|
5858
|
-
modelValue: expanded.value,
|
|
5859
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => expanded.value = $event),
|
|
5860
|
-
rounded: "lg",
|
|
5861
|
-
flat: "",
|
|
5862
|
-
multiple: ""
|
|
5890
|
+
default: withCtx(() => [!!itemCount.value ? (openBlock(), createBlock(_component_VExpandTransition, {
|
|
5891
|
+
key: 0,
|
|
5892
|
+
group: ""
|
|
5863
5893
|
}, {
|
|
5864
|
-
default: withCtx(() => [
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
"onDelete"
|
|
5891
|
-
]);
|
|
5892
|
-
}), 128))]),
|
|
5893
|
-
_: 1
|
|
5894
|
-
})) : createCommentVNode("", true)]),
|
|
5894
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
|
|
5895
|
+
return openBlock(), createBlock(SequenceItem_default, {
|
|
5896
|
+
key: item.id,
|
|
5897
|
+
"allow-deletion": itemCount.value > 1,
|
|
5898
|
+
"embed-element-config": __props.embedElementConfig,
|
|
5899
|
+
embeds: embedsByItem.value[item.id],
|
|
5900
|
+
"is-expanded": expanded.value.includes(item.id),
|
|
5901
|
+
"is-readonly": __props.isReadonly,
|
|
5902
|
+
item,
|
|
5903
|
+
mode: elementData.mode,
|
|
5904
|
+
position: index + 1,
|
|
5905
|
+
class: "text-left",
|
|
5906
|
+
onDelete: ($event) => deleteItem(item.id),
|
|
5907
|
+
onSave: _cache[0] || (_cache[0] = ($event) => saveItem($event))
|
|
5908
|
+
}, null, 8, [
|
|
5909
|
+
"allow-deletion",
|
|
5910
|
+
"embed-element-config",
|
|
5911
|
+
"embeds",
|
|
5912
|
+
"is-expanded",
|
|
5913
|
+
"is-readonly",
|
|
5914
|
+
"item",
|
|
5915
|
+
"mode",
|
|
5916
|
+
"position",
|
|
5917
|
+
"onDelete"
|
|
5918
|
+
]);
|
|
5919
|
+
}), 128))]),
|
|
5895
5920
|
_: 1
|
|
5896
|
-
}
|
|
5897
|
-
key: 0,
|
|
5898
|
-
class: "mt-6",
|
|
5899
|
-
color: "primary-darken-4",
|
|
5900
|
-
"prepend-icon": "mdi-plus",
|
|
5901
|
-
text: "Add Entry",
|
|
5902
|
-
variant: "text",
|
|
5903
|
-
onClick: addItem
|
|
5904
|
-
})) : createCommentVNode("", true)])]),
|
|
5921
|
+
})) : createCommentVNode("", true)]),
|
|
5905
5922
|
_: 1
|
|
5906
|
-
})
|
|
5923
|
+
}, 8, ["modelValue"]), !__props.isReadonly ? (openBlock(), createBlock(_component_VBtn, {
|
|
5924
|
+
key: 0,
|
|
5925
|
+
class: "mt-4",
|
|
5926
|
+
"prepend-icon": "mdi-plus",
|
|
5927
|
+
text: "Add Entry",
|
|
5928
|
+
variant: "text",
|
|
5929
|
+
onClick: addItem
|
|
5930
|
+
})) : createCommentVNode("", true)]);
|
|
5907
5931
|
};
|
|
5908
5932
|
}
|
|
5909
|
-
}), [["__scopeId", "data-v-
|
|
5933
|
+
}), [["__scopeId", "data-v-7ccd7f10"]]);
|
|
5910
5934
|
//#endregion
|
|
5911
5935
|
//#region src/components/SideToolbar.vue
|
|
5912
5936
|
var SideToolbar_default = /* @__PURE__ */ defineComponent({
|
|
@@ -5916,6 +5940,11 @@ var SideToolbar_default = /* @__PURE__ */ defineComponent({
|
|
|
5916
5940
|
const props = __props;
|
|
5917
5941
|
const elementBus = inject("$elementBus");
|
|
5918
5942
|
const mode = ref(props.element.data.mode ?? "steps");
|
|
5943
|
+
watch(() => props.element.data.mode, (value) => {
|
|
5944
|
+
const next = value ?? "steps";
|
|
5945
|
+
if (next === mode.value) return;
|
|
5946
|
+
mode.value = next;
|
|
5947
|
+
});
|
|
5919
5948
|
const onChange = (value) => {
|
|
5920
5949
|
if (!value) return;
|
|
5921
5950
|
mode.value = value;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Tailor CMS sequence element authoring component",
|
|
4
4
|
"author": "Studion <info@gostudion.com> (https://github.com/tailor-cms)",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"version": "0.0.
|
|
6
|
+
"version": "0.0.2",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
9
|
"import": "./dist/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
33
33
|
"vue-tsc": "^3.2.7",
|
|
34
34
|
"vuetify": "^4.0.6",
|
|
35
|
-
"@tailor-cms/ce-sequence-manifest": "0.0.
|
|
35
|
+
"@tailor-cms/ce-sequence-manifest": "0.0.2"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|