hoeditor-web 3.3.4-beta.1 → 3.3.4-beta.3

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/lib/hoeditor.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import "vue";
2
- import { H as i, d as r, b as e, a as l, e as t, T as H, f as d, i as f } from "./index-BgreI8th.mjs";
2
+ import { H as i, d as r, b as e, a as l, e as t, T as H, f as d, i as f } from "./index-Y_tXfIds.mjs";
3
3
  export {
4
4
  i as HoDocs,
5
5
  r as HoEditorProvide,
@@ -7643,7 +7643,10 @@ const isDate = (a) => a == null ? !1 : typeof a == "string" ? !isNaN(new Date(a)
7643
7643
  "yyyy-MM-dd",
7644
7644
  "yyyy-MM-dd HH:mm",
7645
7645
  "MM-dd HH:mm",
7646
- "yyyy-MM-dd HH:mm:ss"
7646
+ "yyyy-MM-dd HH:mm:ss",
7647
+ "YYYY/MM",
7648
+ "YYYY-MM",
7649
+ "YYYY年-MM月"
7647
7650
  ], dateFormatValueList = [
7648
7651
  { value: "HH:mm" },
7649
7652
  { value: "HH:mm:ss" },
@@ -7658,21 +7661,25 @@ const isDate = (a) => a == null ? !1 : typeof a == "string" ? !isNaN(new Date(a)
7658
7661
  { value: "MM-dd" },
7659
7662
  { value: "yyyy-MM-dd" },
7660
7663
  { value: "yyyy-MM-dd HH:mm" },
7661
- { value: "yyyy-MM-dd HH:mm:ss" }
7664
+ { value: "yyyy-MM-dd HH:mm:ss" },
7665
+ { value: "YYYY/MM" },
7666
+ { value: "YYYY-MM" },
7667
+ { value: "YYYY年-MM月" }
7662
7668
  ], dateFormat = (a, t) => {
7669
+ var u;
7663
7670
  let r;
7664
7671
  if (a && typeof a == "string")
7665
7672
  if (!isNaN(Number(a)))
7666
7673
  r = toDate(Number(a));
7667
7674
  else {
7668
- let u = a.replace(/[年|月|-]/g, "/");
7669
- if (u = u.replace(/[点|时|分]/g, ":"), u = u.replace(/[日|秒]/g, ""), isNaN(new Date(u).getTime())) {
7670
- if (t && t.includes("MM") && !t.includes("yyyy") && (u = (/* @__PURE__ */ new Date()).getFullYear() + "/" + u), t && t.includes("HH") && !t.includes("ss") && (u = u + ":00", u = u.replace("::", ":")), !u.includes("/")) {
7671
- let f = /* @__PURE__ */ new Date();
7672
- u = `${f.getFullYear()}/${f.getMonth() + 1}/${f.getDate()} ` + u;
7675
+ let f = a.replace(/[年|月|-]/g, "/").replace(/\/{2,}/g, "/");
7676
+ if (f = f.replace(/[点|时|分]/g, ":"), f = f.replace(/[日|秒]/g, ""), isNaN(new Date(f).getTime())) {
7677
+ if (t && t.includes("MM") && !t.includes("yyyy") && !t.includes("YYYY") && (f = (/* @__PURE__ */ new Date()).getFullYear() + "/" + f), t && t.includes("HH") && !t.includes("ss") && (f = f + ":00", f = f.replace("::", ":")), !f.includes("/")) {
7678
+ let p = /* @__PURE__ */ new Date();
7679
+ f = `${p.getFullYear()}/${p.getMonth() + 1}/${p.getDate()} ` + f;
7673
7680
  }
7674
- } else t && t.includes("MM") && !t.toLocaleLowerCase().includes("yyyy") && u.split("/")[1] == "29" && (u = "2024/" + u);
7675
- r = toDate(u);
7681
+ } else t && t.includes("MM") && !t.toLocaleLowerCase().includes("yyyy") && ((u = f.split("/")[1]) == null ? void 0 : u.split(" ")[0]) === "29" && (f = "2024/" + f);
7682
+ r = toDate(f);
7676
7683
  }
7677
7684
  else
7678
7685
  r = toDate(a);
@@ -15203,7 +15210,7 @@ class DrawSignNode extends DrawCombineNode {
15203
15210
  }
15204
15211
  }
15205
15212
  }
15206
- const version = "3.3.4-beta.1";
15213
+ const version = "3.3.4-beta.3";
15207
15214
  var FingerPosition = /* @__PURE__ */ ((a) => (a[a.left = 0] = "left", a[a.center = 1] = "center", a[a.right = 2] = "right", a))(FingerPosition || {});
15208
15215
  class SignNode extends BaseNode {
15209
15216
  constructor(hoEditorFactoryID, rootNodes, pNode, nodeType, number, type, name, signType, signFormat, signor, signTime, signTimeFormat, imgSrc, imgWidth, imgHeight, customProperty, isTemplate, styleIndex, connectMode, isFront, allowEditSignTime, fingerPrintSrc, fingerPosition, attribute, connectChar, otherProperties, dataId, associatedElement, isTemp, innerIdentifier) {
@@ -36698,7 +36705,7 @@ const columns$1 = [
36698
36705
  // }
36699
36706
  // },
36700
36707
  datePoperStyle() {
36701
- return this.dateTimeStyle.includes("yyyy") || this.dateTimeStyle.includes("MM") || this.dateTimeStyle.includes("dd") ? {
36708
+ return this.dateTimeStyle.includes("yyyy") || this.dateTimeStyle.includes("YYYY") || this.dateTimeStyle.includes("MM") || this.dateTimeStyle.includes("dd") ? {
36702
36709
  width: "100px",
36703
36710
  height: "0",
36704
36711
  border: "0"
@@ -36725,7 +36732,7 @@ const columns$1 = [
36725
36732
  if (t instanceof DateTimeNode) {
36726
36733
  this.notSelectTime = t.notSelectTime ? t.notSelectTime : !1, this.dateTimeStyle = t.controlStyle;
36727
36734
  let n = t.text;
36728
- (!n || n === t.name) && (n = moment$2().format(this.dateTimeStyle.replace(/dd/g, "DD"))), n = n.split(" "), this.date = n[0] ? n[0] : "", this.time = n[1] ? n[1] : "", !this.dateTimeStyle.includes("yyyy") && !this.dateTimeStyle.includes("MM") && !this.dateTimeStyle.includes("dd") && (this.time = n[0]);
36735
+ (!n || n === t.name) && (n = moment$2().format(this.dateTimeStyle.replace(/dd/g, "DD"))), n = n.split(" "), this.date = n[0] ? n[0] : "", this.time = n[1] ? n[1] : "", !this.dateTimeStyle.includes("yyyy") && !this.dateTimeStyle.includes("YYYY") && !this.dateTimeStyle.includes("MM") && !this.dateTimeStyle.includes("dd") && (this.time = n[0]);
36729
36736
  }
36730
36737
  } else {
36731
36738
  let n = [];
@@ -37078,7 +37085,7 @@ var _sfc_render$1g = function a() {
37078
37085
  return r("a-radio", { key: o.id + Math.random(), style: { display: "block", whiteSpace: "break-spaces", marginRight: "0px" }, attrs: { value: o.id }, nativeOn: { "~click": function(n) {
37079
37086
  return t.selectItemsChange(o);
37080
37087
  } } }, [t._v(" " + t._s(o.showText) + " ")]);
37081
- }), 1)]] : t._e()] : t._e(), t.selectedList.length > 0 && t.isAllowMultiSelect && !t.insCheckSyncUpdateList && !t.mutexSelect && t.isCanSearch ? r("transition-group", { staticClass: "list", attrs: { name: "drag", tag: "ul" } }, [r("li", { key: i18nHelper("04-001-009-EMR.3.3.515", null, "已选择"), staticStyle: { width: "270px", position: "absolute", top: "0px", "z-index": "111", background: "#fff" } }, [t._v(` ${i18nHelper("04-001-009-EMR.3.3.515", null, "已选择")}` + t._s(t.currentListNameText))]), t._l(t.selectedList, function(o, n) {
37088
+ }), 1)]] : t._e()] : t._e(), t.selectedList.length > 0 && t.isAllowMultiSelect && !t.insCheckSyncUpdateList && !t.mutexSelect && t.isCanSearch ? r("transition-group", { staticClass: "list", attrs: { name: "drag", tag: "ul" } }, [r("li", { key: i18nHelper("04-001-009-EMR.3.3.515", null, "已选择"), staticStyle: { width: "270px", position: "absolute", top: "0px", "z-index": "111", background: "#fff" } }, [t._v(i18nHelper("04-001-009-EMR.3.3.515", null, "已选择") + t._s(t.currentListNameText))]), t._l(t.selectedList, function(o, n) {
37082
37089
  return [r("li", { key: o.id + Math.random(), staticClass: "drag-item selected", attrs: { draggable: "" }, on: { dragenter: function(s) {
37083
37090
  return t.dragenter(s, n);
37084
37091
  }, dragover: function(s) {
@@ -37094,7 +37101,7 @@ var _sfc_render$1g = function a() {
37094
37101
  } } })], 1)];
37095
37102
  })], 2) : t._e()], 2)]) : t._e(), t.poperType === "selectPoper" && !t.isAllowMultiSelect ? r("footer", { staticClass: "select-poper-footer" }, [r("a-button", { on: { click: t.cancelSelectClose } }, [t._v(i18nHelper("04-001-009-EMR.3.3.533", null, "清空"))]), r("a-button", { on: { click: t.handleClose } }, [t._v(i18nHelper("04-001-009-EMR.3.3.348", null, "关闭"))])], 1) : t._e(), t.poperType === "selectPoper" && t.isAllowMultiSelect ? r("footer", { staticClass: "select-poper-footer" }, [t.mutexSelect ? t._e() : r("a-button", { on: { click: t.allSelect } }, [t._v(i18nHelper("04-001-009-EMR.3.3.201", null, "全选"))]), r("a-button", { on: { click: t.cancelSelect } }, [t._v(i18nHelper("04-001-009-EMR.3.3.533", null, "清空"))]), r("a-button", { on: { click: t.handleClose } }, [t._v(i18nHelper("04-001-009-EMR.3.3.346", null, "取消"))]), r("a-button", { attrs: { type: "primary" }, on: { click: function(o) {
37096
37103
  return t.sureSelect();
37097
- } } }, [t._v(i18nHelper("04-001-009-EMR.3.3.347", null, "确定"))])], 1) : t._e(), t.poperType === "datePoper" ? r("div", { staticClass: "date-poper", style: t.datePoperStyle }, [t.dateTimeStyle.includes("yyyy") || t.dateTimeStyle.includes("MM") || t.dateTimeStyle.includes("dd") ? r("a-date-picker", { ref: "datePicker", attrs: { size: "small", type: "datetime", placeholder: i18nHelper("04-001-009-EMR.3.3.69", null, "日期"), open: !0, locale: t.locale, showToday: !1, "disabled-date": t.disabledEndDate, format: t.dateTimeStyle.replace(/dd/g, "DD").split(" ")[0], valueFormat: t.dateTimeStyle.replace(/dd/g, "DD").split(" ")[0] }, scopedSlots: t._u([{ key: "dateRender", fn: function(o) {
37104
+ } } }, [t._v(i18nHelper("04-001-009-EMR.3.3.347", null, "确定"))])], 1) : t._e(), t.poperType === "datePoper" ? r("div", { staticClass: "date-poper", style: t.datePoperStyle }, [t.dateTimeStyle.includes("yyyy") || t.dateTimeStyle.includes("YYYY") || t.dateTimeStyle.includes("MM") || t.dateTimeStyle.includes("dd") ? r("a-date-picker", { ref: "datePicker", attrs: { size: "small", type: "datetime", placeholder: i18nHelper("04-001-009-EMR.3.3.69", null, "日期"), open: !0, locale: t.locale, showToday: !1, "disabled-date": t.disabledEndDate, format: t.dateTimeStyle.replace(/dd/g, "DD").split(" ")[0], valueFormat: t.dateTimeStyle.replace(/dd/g, "DD").split(" ")[0] }, scopedSlots: t._u([{ key: "dateRender", fn: function(o) {
37098
37105
  return [r("div", { staticClass: "ant-calendar-date", on: { dblclick: t.getTime } }, [t._v(" " + t._s(o.date()) + " ")])];
37099
37106
  } }], null, !1, 213485314), model: { value: t.date, callback: function(o) {
37100
37107
  t.date = o;
@@ -65128,7 +65135,7 @@ WebPDecoder.prototype.getData = function() {
65128
65135
  (function(a) {
65129
65136
  function t() {
65130
65137
  return function() {
65131
- return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-CHD3_MpM.mjs");
65138
+ return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-CXT3zq8_.mjs");
65132
65139
  }().catch(function(r) {
65133
65140
  return Promise.reject(new Error("Could not load canvg: " + r));
65134
65141
  }).then(function(r) {
@@ -66687,6 +66694,14 @@ class PrintController {
66687
66694
  value: 0
66688
66695
  };
66689
66696
  const y = async () => {
66697
+ var v;
66698
+ if (o != null && o.duplex && g.value > 0 && g.value % 2 !== 0) {
66699
+ if (s.isUseImagePrint) {
66700
+ const C = s.unitConvert.mmConversionPx(s.pageProperty.widthMm, !0), _ = s.unitConvert.mmConversionPx(s.pageProperty.heightMm, !0), D = C > _ ? "l" : "p";
66701
+ (v = this.PDF) == null || v.addPage([C, _], D);
66702
+ }
66703
+ g.value++;
66704
+ }
66690
66705
  o && p && Array.isArray(o.notPrintDocId) && o.notPrintDocId.length > 0 && o.notPrintDocId.includes(p) ? await Print.printAllNew(this._hoEditorFactoryID, w, this.PDF, f, !0, g) : await Print.printAllNew(this._hoEditorFactoryID, w, this.PDF, f, !1, g);
66691
66706
  }, w = async () => {
66692
66707
  var v, C;
@@ -75678,7 +75693,7 @@ var _sfc_render$$ = function a() {
75678
75693
  t.controlStyle = o;
75679
75694
  }, expression: "controlStyle" } }, t._l(t.dateFormatList, function(o) {
75680
75695
  return r("a-select-option", { key: o, attrs: { value: o } }, [t._v(t._s(o))]);
75681
- }), 1)], 1)]), r("li", { staticClass: "control-item" }, [r("span", { staticClass: "label" }, [t._v(i18nHelper("04-001-009-EMR.3.3.117", null, "日期时间"))]), t.controlStyle.includes("yyyy") || t.controlStyle.includes("MM") || t.controlStyle.includes("dd") ? r("a-date-picker", { attrs: { size: "small", type: "date", placeholder: i18nHelper("04-001-009-EMR.3.3.69", null, "日期"), locale: t.locale, showTime: t.controlStyle.includes("mm"), format: t.controlStyle.replace(/dd/g, "DD"), valueFormat: t.controlStyle.replace(/dd/g, "DD") }, model: { value: t.text, callback: function(o) {
75696
+ }), 1)], 1)]), r("li", { staticClass: "control-item" }, [r("span", { staticClass: "label" }, [t._v(i18nHelper("04-001-009-EMR.3.3.117", null, "日期时间"))]), t.controlStyle.includes("yyyy") || t.controlStyle.includes("YYYY") || t.controlStyle.includes("MM") || t.controlStyle.includes("dd") ? r("a-date-picker", { attrs: { size: "small", type: "date", placeholder: i18nHelper("04-001-009-EMR.3.3.69", null, "日期"), locale: t.locale, showTime: t.controlStyle.includes("mm"), format: t.controlStyle.replace(/dd/g, "DD"), valueFormat: t.controlStyle.replace(/dd/g, "DD") }, model: { value: t.text, callback: function(o) {
75682
75697
  t.text = o;
75683
75698
  }, expression: "text" } }) : r("a-time-picker", { attrs: { size: "small", type: "time", placeholder: i18nHelper("04-001-009-EMR.3.3.69", null, "日期"), locale: t.locale, format: t.controlStyle, valueFormat: t.controlStyle }, model: { value: t.text, callback: function(o) {
75684
75699
  t.text = o;
@@ -76257,9 +76272,9 @@ var _sfc_render$Z = function a() {
76257
76272
  t.groupName = o;
76258
76273
  }, expression: "groupName" } })], 1) : t._e(), t.boxGroup === 1 ? r("li", { staticClass: "control-item" }, [r("span", { staticClass: "label", staticStyle: { width: "130px" } }), t.controlType === "RadioBox" ? r("span", [t._v(i18nHelper("04-001-009-EMR.3.3.147", null, "设置名称属性时为同组单选,同组属性正常生效,名称为空时批量生成的单选元素非同组,同组属性不生效"))]) : r("span", [t._v(i18nHelper("04-001-009-EMR.3.3.514", null, "设置名称属性时为同组复选,同组属性正常生效,名称为空时批量生成的复选元素非同组,同组属性不生效"))])]) : t._e(), t.boxGroup === 1 ? r("li", { staticClass: "control-item" }, [r("a-checkbox", { model: { value: t.groupHasOptions, callback: function(o) {
76259
76274
  t.groupHasOptions = o;
76260
- }, expression: "groupHasOptions" } }), r("span", { staticClass: "label", staticStyle: { width: "450px", margin: "0 0 0 2px" } }, [t._v(i18nHelper("04-001-009-EMR.3.3.146", null, "同组时选项不能为空"))]), t.controlType === "CheckBox" ? r("a-checkbox", { staticStyle: { margin: "0 0 0 20px" }, model: { value: t.isMutualExclusion, callback: function(o) {
76275
+ }, expression: "groupHasOptions" } }), r("span", { staticClass: "label", staticStyle: { width: "450px", margin: "0 0 0 2px" } }, [t._v(i18nHelper("04-001-009-EMR.3.3.146", null, "同组时选项不能为空"))]), r("a-checkbox", { staticStyle: { margin: "0 0 0 20px" }, model: { value: t.isMutualExclusion, callback: function(o) {
76261
76276
  t.isMutualExclusion = o;
76262
- }, expression: "isMutualExclusion" } }) : t._e(), t.controlType === "CheckBox" ? r("span", { staticClass: "label", staticStyle: { width: "450px", margin: "0 0 0 2px" } }, [t._v(i18nHelper("04-001-009-EMR.3.3.136", null, "同组时选项互斥"))]) : t._e()], 1) : t._e(), t.boxGroup === 1 ? r("li", { staticClass: "control-item", staticStyle: { padding: "0" } }, [r("a-table", { staticStyle: { width: "1060px", height: "300px" }, attrs: { rowKey: (o, n) => n, scroll: { x: 1460, y: 270 }, "data-source": t.radioCheckBoxGroup, bordered: !0, pagination: !1 } }, [r("a-table-column", { key: "rowIndexs", attrs: { title: "", width: 30 }, scopedSlots: t._u([{ key: "default", fn: function(o, n, s) {
76277
+ }, expression: "isMutualExclusion" } }), r("span", { staticClass: "label", staticStyle: { width: "450px", margin: "0 0 0 2px" } }, [t._v(i18nHelper("04-001-009-EMR.3.3.136", null, "同组时选项互斥"))])], 1) : t._e(), t.boxGroup === 1 ? r("li", { staticClass: "control-item", staticStyle: { padding: "0" } }, [r("a-table", { staticStyle: { width: "1060px", height: "300px" }, attrs: { rowKey: (o, n) => n, scroll: { x: 1460, y: 270 }, "data-source": t.radioCheckBoxGroup, bordered: !0, pagination: !1 } }, [r("a-table-column", { key: "rowIndexs", attrs: { title: "", width: 30 }, scopedSlots: t._u([{ key: "default", fn: function(o, n, s) {
76263
76278
  return [r("p", { staticStyle: { "text-align": "center" } }, [t._v(t._s(s + 1))])];
76264
76279
  } }], null, !1, 546783599) }), r("a-table-column", { key: "text", attrs: { title: i18nHelper("04-001-009-EMR.3.3.176", null, "文本") }, scopedSlots: t._u([{ key: "default", fn: function(o, n) {
76265
76280
  return [r("a-input", { attrs: { type: "text", size: "small", placeholder: i18nHelper("04-001-009-EMR.3.3.176", null, "文本") }, on: { input: t.addNewItem }, model: { value: n.text, callback: function(s) {
@@ -85262,7 +85277,7 @@ const HoMedicalExpression = __component__$j.exports, _sfc_main$i = defineCompone
85262
85277
  }
85263
85278
  },
85264
85279
  setup(a, { emit: t }) {
85265
- const r = ["yyyy/MM/dd", "yyyy/MM/dd HH:mm", "yyyy年MM月dd日", "yyyy年MM月dd日 HH时mm分", "yyyy-MM-dd", "yyyy-MM-dd HH:mm"], o = ref([]);
85280
+ const r = ["yyyy/MM/dd", "yyyy/MM/dd HH:mm", "yyyy年MM月dd日", "yyyy年MM月dd日 HH时mm分", "yyyy-MM-dd", "yyyy-MM-dd HH:mm", "YYYY/MM", "YYYY-MM", "YYYY年-MM月"], o = ref([]);
85266
85281
  inject("hoEditorProvider", {});
85267
85282
  const n = inject("setHoModal");
85268
85283
  return (() => {
@@ -1,4 +1,4 @@
1
- import { c as Da, _ as Va, g as il } from "./index-BgreI8th.mjs";
1
+ import { c as Da, _ as Va, g as il } from "./index-Y_tXfIds.mjs";
2
2
  var fn = {}, cn = {}, cr, vn;
3
3
  function Q() {
4
4
  if (vn) return cr;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hoeditor-web",
3
- "version": "3.3.4-beta.1",
3
+ "version": "3.3.4-beta.3",
4
4
  "private": false,
5
5
  "main": "lib/hoeditor.mjs",
6
6
  "typings": "types/index.d.ts",