@deskhero/dh_ui 1.43.6 → 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 CHANGED
@@ -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
43618
  setup(__props, { expose, emit }) {
43610
43619
  const props = __props;
43611
43620
  const jsonRes = ref(null);
43612
- const isEdit = ref(true);
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
- initialBlock: "paragraph",
43628
+ defaultBlock: "paragraph",
43621
43629
  readOnly: props.readOnly,
43622
43630
  onReady: () => {
43623
43631
  isReady.value = true;
@@ -43760,7 +43768,6 @@ const _sfc_main$1 = {
43760
43768
  }
43761
43769
  function edit() {
43762
43770
  editor.readOnly.toggle();
43763
- isEdit.value = !isEdit.value;
43764
43771
  }
43765
43772
  function save() {
43766
43773
  editor.save().then((savedData) => {
@@ -43768,7 +43775,6 @@ const _sfc_main$1 = {
43768
43775
  emit("saveData", savedData);
43769
43776
  });
43770
43777
  editor.readOnly.toggle();
43771
- isEdit.value = false;
43772
43778
  isSaved.value = true;
43773
43779
  }
43774
43780
  function clear() {
@@ -43784,7 +43790,6 @@ const _sfc_main$1 = {
43784
43790
  myEditor();
43785
43791
  }
43786
43792
  onMounted(() => {
43787
- isEdit.value = !props.readOnly;
43788
43793
  if (props.firstBlock) {
43789
43794
  myEditor();
43790
43795
  }