@deskhero/dh_ui 1.43.5 → 1.43.7
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/dh_ui.es.js +43 -17
- package/dist/dh_ui.umd.js +65 -65
- package/dist/src/components/TextEditor.vue.d.ts +12 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/dh_ui.es.js
CHANGED
|
@@ -27712,7 +27712,7 @@ var Stepper = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-02
|
|
|
27712
27712
|
function getDefaultExportFromCjs(x2) {
|
|
27713
27713
|
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
27714
27714
|
}
|
|
27715
|
-
var editor = { exports: {} };
|
|
27715
|
+
var editor$1 = { exports: {} };
|
|
27716
27716
|
/*! For license information please see editor.js.LICENSE.txt */
|
|
27717
27717
|
(function(module, exports) {
|
|
27718
27718
|
!function(e2, t2) {
|
|
@@ -39368,8 +39368,8 @@ var editor = { exports: {} };
|
|
|
39368
39368
|
};
|
|
39369
39369
|
}]);
|
|
39370
39370
|
});
|
|
39371
|
-
})(editor);
|
|
39372
|
-
var EditorJS = /* @__PURE__ */ getDefaultExportFromCjs(editor.exports);
|
|
39371
|
+
})(editor$1);
|
|
39372
|
+
var EditorJS = /* @__PURE__ */ getDefaultExportFromCjs(editor$1.exports);
|
|
39373
39373
|
var bundle$a = { exports: {} };
|
|
39374
39374
|
(function(module, exports) {
|
|
39375
39375
|
!function(t2, e2) {
|
|
@@ -43570,46 +43570,54 @@ const _sfc_main$1 = {
|
|
|
43570
43570
|
type: Object,
|
|
43571
43571
|
default: () => {
|
|
43572
43572
|
return { blocks: [] };
|
|
43573
|
-
}
|
|
43573
|
+
},
|
|
43574
|
+
required: false
|
|
43574
43575
|
},
|
|
43575
43576
|
readOnly: {
|
|
43576
43577
|
type: Boolean,
|
|
43577
|
-
default: true
|
|
43578
|
+
default: true,
|
|
43579
|
+
required: false
|
|
43578
43580
|
},
|
|
43579
43581
|
featureSet: {
|
|
43580
43582
|
type: String,
|
|
43581
|
-
default: "Default"
|
|
43583
|
+
default: "Default",
|
|
43584
|
+
required: false
|
|
43582
43585
|
},
|
|
43583
43586
|
firstBlock: {
|
|
43584
43587
|
type: Boolean,
|
|
43585
|
-
default: true
|
|
43588
|
+
default: true,
|
|
43589
|
+
required: false
|
|
43586
43590
|
},
|
|
43587
43591
|
firstBlockText: {
|
|
43588
43592
|
type: String,
|
|
43589
|
-
default: "add your first block"
|
|
43593
|
+
default: "add your first block",
|
|
43594
|
+
required: false
|
|
43590
43595
|
},
|
|
43591
43596
|
learnMoreText: {
|
|
43592
43597
|
type: String,
|
|
43593
|
-
default: "Learn more about the text editor"
|
|
43598
|
+
default: "Learn more about the text editor",
|
|
43599
|
+
required: false
|
|
43594
43600
|
},
|
|
43595
43601
|
placeholder: {
|
|
43596
43602
|
type: String,
|
|
43597
|
-
default: "Start typing..."
|
|
43603
|
+
default: "Start typing...",
|
|
43604
|
+
required: false
|
|
43598
43605
|
},
|
|
43599
43606
|
wordCount: {
|
|
43600
43607
|
type: Boolean,
|
|
43601
|
-
default: false
|
|
43608
|
+
default: false,
|
|
43609
|
+
required: false
|
|
43602
43610
|
},
|
|
43603
43611
|
minHeight: {
|
|
43604
43612
|
type: Number,
|
|
43605
|
-
default: 50
|
|
43613
|
+
default: 50,
|
|
43614
|
+
required: false
|
|
43606
43615
|
}
|
|
43607
43616
|
},
|
|
43608
43617
|
emits: ["saveData", "toggleEdit"],
|
|
43609
|
-
setup(__props, { emit }) {
|
|
43618
|
+
setup(__props, { expose, emit }) {
|
|
43610
43619
|
const props = __props;
|
|
43611
|
-
ref(null);
|
|
43612
|
-
const isEdit = ref(true);
|
|
43620
|
+
const jsonRes = ref(null);
|
|
43613
43621
|
const isSaved = ref(false);
|
|
43614
43622
|
const isReady = ref(false);
|
|
43615
43623
|
const words = ref(0);
|
|
@@ -43617,7 +43625,7 @@ const _sfc_main$1 = {
|
|
|
43617
43625
|
holder: "codex-editor",
|
|
43618
43626
|
autofocus: true,
|
|
43619
43627
|
minHeight: 0,
|
|
43620
|
-
|
|
43628
|
+
defaultBlock: "paragraph",
|
|
43621
43629
|
readOnly: props.readOnly,
|
|
43622
43630
|
onReady: () => {
|
|
43623
43631
|
isReady.value = true;
|
|
@@ -43758,12 +43766,30 @@ const _sfc_main$1 = {
|
|
|
43758
43766
|
});
|
|
43759
43767
|
}
|
|
43760
43768
|
}
|
|
43769
|
+
function edit() {
|
|
43770
|
+
editor.readOnly.toggle();
|
|
43771
|
+
}
|
|
43772
|
+
function save() {
|
|
43773
|
+
editor.save().then((savedData) => {
|
|
43774
|
+
jsonRes.value = savedData;
|
|
43775
|
+
emit("saveData", savedData);
|
|
43776
|
+
});
|
|
43777
|
+
editor.readOnly.toggle();
|
|
43778
|
+
isSaved.value = true;
|
|
43779
|
+
}
|
|
43780
|
+
function clear() {
|
|
43781
|
+
editor.clear();
|
|
43782
|
+
}
|
|
43783
|
+
expose({
|
|
43784
|
+
edit,
|
|
43785
|
+
save,
|
|
43786
|
+
clear
|
|
43787
|
+
});
|
|
43761
43788
|
function toggleEditor() {
|
|
43762
43789
|
emit("toggleEdit");
|
|
43763
43790
|
myEditor();
|
|
43764
43791
|
}
|
|
43765
43792
|
onMounted(() => {
|
|
43766
|
-
isEdit.value = !props.readOnly;
|
|
43767
43793
|
if (props.firstBlock) {
|
|
43768
43794
|
myEditor();
|
|
43769
43795
|
}
|