@ibiz-template/vue3-components 0.7.41-alpha.11 → 0.7.41-alpha.13

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.
Files changed (182) hide show
  1. package/dist/ibiz-markdown-editor-0VHzFa2l.js +1 -0
  2. package/dist/{index-tjsobxd3.js → index-EYFbyMUF.js} +1 -1
  3. package/dist/index-LzKAcXeH.js +4 -0
  4. package/dist/{index-CsiyXR27.js → index-kNUznzXY.js} +1 -1
  5. package/dist/index.min.css +1 -1
  6. package/dist/index.system.min.js +1 -1
  7. package/dist/{wang-editor-kUY8Nlib.js → wang-editor-Iw-hqw1q.js} +1 -1
  8. package/dist/{xlsx-util-s4akItw_.js → xlsx-util-FnTIZeKq.js} +1 -1
  9. package/es/common/grid-setting/grid-setting.d.ts +2 -37
  10. package/es/common/grid-setting/grid-setting.mjs +8 -4
  11. package/es/control/calendar/components/calendar-user/calendar-user.css +1 -1
  12. package/es/control/calendar/components/calendar-user/calendar-user.mjs +76 -2
  13. package/es/control/data-view/data-view.d.ts +1 -1
  14. package/es/control/data-view/index.d.ts +1 -1
  15. package/es/control/drtab/drtab-control.util.mjs +1 -1
  16. package/es/control/form/form/index.mjs +2 -0
  17. package/es/control/form/form-detail/form-iframe/form-iframe.css +1 -0
  18. package/es/control/form/form-detail/form-iframe/form-iframe.d.ts +29 -0
  19. package/es/control/form/form-detail/form-iframe/form-iframe.mjs +53 -0
  20. package/es/control/form/form-detail/form-iframe/form-iframe.provider.d.ts +13 -0
  21. package/es/control/form/form-detail/form-iframe/form-iframe.provider.mjs +21 -0
  22. package/es/control/form/form-detail/form-iframe/index.d.ts +25 -0
  23. package/es/control/form/form-detail/form-iframe/index.mjs +12 -0
  24. package/es/control/form/form-detail/form-item/form-item.css +1 -1
  25. package/es/control/form/form-detail/form-item/form-item.mjs +6 -4
  26. package/es/control/form/form-detail/index.d.ts +1 -0
  27. package/es/control/form/form-detail/index.mjs +1 -0
  28. package/es/control/form/index.mjs +1 -0
  29. package/es/control/gantt/gantt.d.ts +1 -1
  30. package/es/control/gantt/gantt.mjs +1 -0
  31. package/es/control/gantt/index.d.ts +1 -1
  32. package/es/control/grid/grid/grid.css +1 -1
  33. package/es/control/grid/grid/grid.d.ts +1 -1
  34. package/es/control/grid/grid/index.d.ts +1 -1
  35. package/es/control/grid/grid/index.mjs +2 -0
  36. package/es/control/grid/grid-column/grid-field-column/grid-field-column.d.ts +4 -4
  37. package/es/control/grid/grid-column/grid-field-column/grid-field-column.mjs +5 -8
  38. package/es/control/grid/virtualized-table/index.d.ts +136 -0
  39. package/es/control/grid/virtualized-table/index.mjs +18 -0
  40. package/es/control/grid/virtualized-table/virtualized-table.css +1 -0
  41. package/es/control/grid/virtualized-table/virtualized-table.d.ts +200 -0
  42. package/es/control/grid/virtualized-table/virtualized-table.mjs +325 -0
  43. package/es/control/grid/virtualized-table/virtualized-table.provider.d.ts +10 -0
  44. package/es/control/grid/virtualized-table/virtualized-table.provider.mjs +14 -0
  45. package/es/control/grid/virtualized-table/virtualized-table.util.d.ts +95 -0
  46. package/es/control/grid/virtualized-table/virtualized-table.util.mjs +191 -0
  47. package/es/control/index.mjs +1 -0
  48. package/es/control/kanban/index.d.ts +44 -1
  49. package/es/control/kanban/kanban.d.ts +56 -1
  50. package/es/control/kanban/kanban.mjs +36 -2
  51. package/es/control/list/index.d.ts +1 -1
  52. package/es/control/list/list.d.ts +1 -1
  53. package/es/control/list/list.mjs +1 -1
  54. package/es/control/search-bar/search-bar.mjs +3 -0
  55. package/es/control/toolbar/toolbar.mjs +7 -7
  56. package/es/control/tree/index.d.ts +1 -1
  57. package/es/control/tree/tree.d.ts +1 -1
  58. package/es/control/tree-grid/index.d.ts +1 -1
  59. package/es/control/tree-grid/tree-grid.d.ts +1 -1
  60. package/es/editor/array/ibiz-array/ibiz-array.css +1 -1
  61. package/es/editor/array/ibiz-array/ibiz-array.d.ts +1 -0
  62. package/es/editor/array/ibiz-array/ibiz-array.mjs +4 -1
  63. package/es/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.d.ts +1 -0
  64. package/es/editor/cascader/ibiz-cascader/ibiz-cascader.d.ts +1 -0
  65. package/es/editor/check-box/ibiz-checkbox/ibiz-checkbox.d.ts +1 -0
  66. package/es/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.d.ts +2 -1
  67. package/es/editor/code/monaco-editor/monaco-editor.d.ts +1 -0
  68. package/es/editor/color-picker/ibiz-color-picker/ibiz-color-picker.d.ts +1 -0
  69. package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.d.ts +1 -0
  70. package/es/editor/data-picker/ibiz-picker/ibiz-picker.d.ts +5 -0
  71. package/es/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.d.ts +1 -0
  72. package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.d.ts +1 -0
  73. package/es/editor/data-picker/ibiz-transfer-picker/components/transfer/transfer.d.ts +1 -1
  74. package/es/editor/data-picker/ibiz-transfer-picker/ibiz-transfer-picker.d.ts +3 -2
  75. package/es/editor/date-picker/ibiz-date-picker/ibiz-date-picker.d.ts +1 -0
  76. package/es/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.d.ts +2 -1
  77. package/es/editor/date-range-select/date-range-select-picker/date-range-select.d.ts +5 -5
  78. package/es/editor/date-range-select/date-range-select.controller.mjs +9 -0
  79. package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.d.ts +2 -0
  80. package/es/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.d.ts +1 -0
  81. package/es/editor/dropdown-list/ibiz-tree-picker/ibiz-tree-picker.d.ts +4 -3
  82. package/es/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.css +1 -1
  83. package/es/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.d.ts +10 -7
  84. package/es/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.mjs +5 -5
  85. package/es/editor/html/wang-editor/wang-editor.d.ts +1 -0
  86. package/es/editor/list-box/ibiz-list-box/ibiz-list-box.d.ts +1 -0
  87. package/es/editor/map-picker/ibiz-map-picker/ibiz-map-picker.d.ts +1 -0
  88. package/es/editor/map-picker/ibiz-map-picker/ibiz-map-picker.mjs +1 -1
  89. package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.d.ts +1 -0
  90. package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +1 -1
  91. package/es/editor/number-range/ibiz-number-range-picker/ibiz-number-range-picker.d.ts +1 -0
  92. package/es/editor/radio-button-list/ibiz-radio/ibiz-radio.d.ts +1 -0
  93. package/es/editor/rate/ibiz-rate/ibiz-rate.d.ts +3 -0
  94. package/es/editor/slider/ibiz-slider/ibiz-slider.d.ts +4 -3
  95. package/es/editor/span/span/span.d.ts +3 -1
  96. package/es/editor/stepper/ibiz-stepper/ibiz-stepper.d.ts +1 -0
  97. package/es/editor/switch/ibiz-switch/ibiz-switch.d.ts +1 -0
  98. package/es/editor/text-box/ibiz-input-ip/ibiz-input-ip.css +1 -1
  99. package/es/editor/text-box/ibiz-input-ip/ibiz-input-ip.d.ts +4 -77
  100. package/es/editor/text-box/ibiz-input-ip/ibiz-input-ip.mjs +167 -108
  101. package/es/editor/text-box/ibiz-input-number/ibiz-input-number.d.ts +1 -0
  102. package/es/editor/text-box/input/input.d.ts +7 -4
  103. package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.d.ts +1 -0
  104. package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.mjs +1 -1
  105. package/es/index.mjs +1 -0
  106. package/es/locale/en/index.d.ts +6 -0
  107. package/es/locale/en/index.mjs +6 -0
  108. package/es/locale/zh-CN/index.d.ts +6 -0
  109. package/es/locale/zh-CN/index.mjs +6 -0
  110. package/es/node_modules/.pnpm/@amap_amap-jsapi-loader@1.0.1_patch_hash_73bpcwbs2m5ip4qppmz6a7epsa/node_modules/@amap/amap-jsapi-loader/dist/index.mjs +41 -0
  111. package/es/panel-component/panel-button/panel-button.controller.mjs +2 -1
  112. package/es/panel-component/panel-button/panel-button.mjs +1 -1
  113. package/es/panel-component/user-message/async-action/async-action/async-action.provider.mjs +14 -0
  114. package/es/panel-component/user-message/async-action/async-action-tab/async-action-tab.css +1 -1
  115. package/es/panel-component/user-message/async-action/async-data-export/async-data-export.css +1 -0
  116. package/es/panel-component/user-message/async-action/async-data-export/async-data-export.d.ts +34 -0
  117. package/es/panel-component/user-message/async-action/async-data-export/async-data-export.mjs +88 -0
  118. package/es/panel-component/user-message/index.d.ts +2 -32
  119. package/es/panel-component/user-message/index.mjs +21 -11
  120. package/es/util/app-util/app-util.d.ts +54 -2
  121. package/es/util/app-util/app-util.mjs +48 -1
  122. package/es/util/fullscreen/fullscreen-util.mjs +1 -1
  123. package/es/view-engine/md-custom-view.engine.d.ts +8 -2
  124. package/es/view-engine/md-custom-view.engine.mjs +14 -2
  125. package/lib/common/grid-setting/grid-setting.cjs +8 -4
  126. package/lib/control/calendar/components/calendar-user/calendar-user.cjs +76 -2
  127. package/lib/control/calendar/components/calendar-user/calendar-user.css +1 -1
  128. package/lib/control/drtab/drtab-control.util.cjs +1 -1
  129. package/lib/control/form/form/index.cjs +2 -0
  130. package/lib/control/form/form-detail/form-iframe/form-iframe.cjs +58 -0
  131. package/lib/control/form/form-detail/form-iframe/form-iframe.css +1 -0
  132. package/lib/control/form/form-detail/form-iframe/form-iframe.provider.cjs +23 -0
  133. package/lib/control/form/form-detail/form-iframe/index.cjs +17 -0
  134. package/lib/control/form/form-detail/form-item/form-item.cjs +5 -3
  135. package/lib/control/form/form-detail/form-item/form-item.css +1 -1
  136. package/lib/control/form/form-detail/index.cjs +2 -0
  137. package/lib/control/form/index.cjs +6 -4
  138. package/lib/control/gantt/gantt.cjs +1 -0
  139. package/lib/control/grid/grid/grid.css +1 -1
  140. package/lib/control/grid/grid/index.cjs +2 -0
  141. package/lib/control/grid/grid-column/grid-field-column/grid-field-column.cjs +3 -6
  142. package/lib/control/grid/virtualized-table/index.cjs +23 -0
  143. package/lib/control/grid/virtualized-table/virtualized-table.cjs +327 -0
  144. package/lib/control/grid/virtualized-table/virtualized-table.css +1 -0
  145. package/lib/control/grid/virtualized-table/virtualized-table.provider.cjs +16 -0
  146. package/lib/control/grid/virtualized-table/virtualized-table.util.cjs +193 -0
  147. package/lib/control/index.cjs +82 -80
  148. package/lib/control/kanban/kanban.cjs +34 -0
  149. package/lib/control/list/list.cjs +1 -1
  150. package/lib/control/search-bar/search-bar.cjs +3 -0
  151. package/lib/control/toolbar/toolbar.cjs +7 -7
  152. package/lib/editor/array/ibiz-array/ibiz-array.cjs +4 -1
  153. package/lib/editor/array/ibiz-array/ibiz-array.css +1 -1
  154. package/lib/editor/date-range-select/date-range-select.controller.cjs +9 -0
  155. package/lib/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.cjs +5 -5
  156. package/lib/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.css +1 -1
  157. package/lib/editor/map-picker/ibiz-map-picker/ibiz-map-picker.cjs +1 -1
  158. package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +1 -1
  159. package/lib/editor/text-box/ibiz-input-ip/ibiz-input-ip.cjs +166 -107
  160. package/lib/editor/text-box/ibiz-input-ip/ibiz-input-ip.css +1 -1
  161. package/lib/editor/upload/ibiz-file-upload/ibiz-file-upload.cjs +1 -1
  162. package/lib/index.cjs +112 -110
  163. package/lib/locale/en/index.cjs +6 -0
  164. package/lib/locale/zh-CN/index.cjs +6 -0
  165. package/lib/node_modules/.pnpm/@amap_amap-jsapi-loader@1.0.1_patch_hash_73bpcwbs2m5ip4qppmz6a7epsa/node_modules/@amap/amap-jsapi-loader/dist/index.cjs +45 -0
  166. package/lib/panel-component/panel-button/panel-button.cjs +1 -1
  167. package/lib/panel-component/panel-button/panel-button.controller.cjs +2 -1
  168. package/lib/panel-component/user-message/async-action/async-action/async-action.provider.cjs +14 -0
  169. package/lib/panel-component/user-message/async-action/async-action-tab/async-action-tab.css +1 -1
  170. package/lib/panel-component/user-message/async-action/async-data-export/async-data-export.cjs +90 -0
  171. package/lib/panel-component/user-message/async-action/async-data-export/async-data-export.css +1 -0
  172. package/lib/panel-component/user-message/index.cjs +21 -11
  173. package/lib/util/app-util/app-util.cjs +47 -0
  174. package/lib/util/fullscreen/fullscreen-util.cjs +1 -1
  175. package/lib/view-engine/md-custom-view.engine.cjs +14 -2
  176. package/package.json +11 -6
  177. package/dist/ibiz-markdown-editor-KyK5mBTS.js +0 -1
  178. package/dist/index-F_Yq1N9t.js +0 -4
  179. package/es/node_modules/.pnpm/@amap_amap-jsapi-loader@1.0.1/node_modules/@amap/amap-jsapi-loader/dist/index.mjs +0 -23
  180. package/lib/node_modules/.pnpm/@amap_amap-jsapi-loader@1.0.1/node_modules/@amap/amap-jsapi-loader/dist/index.cjs +0 -27
  181. /package/es/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.9_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.12_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs +0 -0
  182. /package/lib/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.9_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.12_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs +0 -0
@@ -177,7 +177,7 @@ const IBizMarkDown = /* @__PURE__ */ vue.defineComponent({
177
177
  }
178
178
  };
179
179
  const editorInit = () => {
180
- if (props.disabled) {
180
+ if (props.disabled || props.readonly) {
181
181
  defaultModel.value = "previewOnly";
182
182
  }
183
183
  vue.nextTick(() => {
@@ -14,71 +14,139 @@ const IBizInputIP = /* @__PURE__ */ vue.defineComponent({
14
14
  }) {
15
15
  const ns = vue3Util.useNamespace("input-ip");
16
16
  const c = props.controller;
17
- const editorRef = vue.ref();
18
17
  const showFormDefaultContent = vue.computed(() => {
19
18
  if (props.controlParams && props.controlParams.editmode === "hover" && !props.readonly) {
20
19
  return true;
21
20
  }
22
21
  return false;
23
22
  });
24
- const currentVal = vue.ref([]);
25
23
  const activeElement = vue.ref(false);
26
24
  const isAllBlur = vue.ref(false);
27
- const firstIp = vue.ref("");
28
- const secIp = vue.ref("");
29
- const thirdIp = vue.ref("");
30
- const forIp = vue.ref("");
31
- if (props.value) {
32
- const ipArr = props.value.split(".");
33
- currentVal.value = ipArr;
34
- firstIp.value = currentVal.value[0];
35
- secIp.value = currentVal.value[1];
36
- thirdIp.value = currentVal.value[2];
37
- forIp.value = currentVal.value[3];
38
- }
39
- const checkIpVal = (newVal, oldVal, ip, index) => {
40
- if (newVal === "")
41
- return;
42
- const reg = /^(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))))$/g;
43
- if (reg.test(newVal)) {
44
- currentVal.value[index] = newVal;
45
- } else if (ip) {
46
- ibiz.message.warning(ibiz.i18n.t("editor.textBox.warningMessage", {
47
- num: index + 1
48
- }));
49
- ip.value = oldVal;
50
- currentVal.value[index] = oldVal;
25
+ const splitIp = (ip) => {
26
+ const parts = ip.split(".");
27
+ return [parts[0] || "", parts[1] || "", parts[2] || "", parts[3] || ""];
28
+ };
29
+ const joinIp = (parts) => {
30
+ return parts.join(".");
31
+ };
32
+ const isValidIp = (parts) => {
33
+ return parts.every((part) => {
34
+ if (!part) {
35
+ return false;
36
+ }
37
+ return /^(0|[1-9]\d?|1\d\d|2[0-4]\d|25[0-5])$/.test(part);
38
+ });
39
+ };
40
+ const ipSegments = vue.ref(splitIp(props.value || ""));
41
+ const ipInputs = vue.ref([]);
42
+ const handleInput = (value, index) => {
43
+ var _a;
44
+ value = value.replace(/[^0-9]/g, "").slice(0, 3);
45
+ if (value) {
46
+ const num = parseInt(value, 10);
47
+ if (num > 255) {
48
+ value = "255";
49
+ } else {
50
+ value = "".concat(num);
51
+ }
52
+ }
53
+ ipSegments.value[index] = value;
54
+ const target = ipInputs.value[index];
55
+ const input = target == null ? void 0 : target.input;
56
+ if (ipSegments.value[index].length === 3 && index < 3 && input && input.selectionStart === ipSegments.value[index].length && input.selectionEnd === ipSegments.value[index].length) {
57
+ const ipInput = ipInputs.value[index + 1];
58
+ if (ipInput) {
59
+ ipInput.focus();
60
+ (_a = ipInput.input) == null ? void 0 : _a.setSelectionRange(0, ipSegments.value[index + 1].length);
61
+ }
51
62
  }
52
- if (firstIp.value && secIp.value && thirdIp.value && forIp.value) {
53
- emit("change", "".concat(firstIp.value, ".").concat(secIp.value, ".").concat(thirdIp.value, ".").concat(forIp.value));
63
+ if (isValidIp(ipSegments.value)) {
64
+ emit("change", joinIp(ipSegments.value));
54
65
  }
55
66
  };
56
- vue.watch(firstIp, (newVal, oldVal) => {
57
- checkIpVal(newVal, oldVal, firstIp, 0);
58
- });
59
- vue.watch(secIp, (newVal, oldVal) => {
60
- checkIpVal(newVal, oldVal, secIp, 1);
61
- });
62
- vue.watch(thirdIp, (newVal, oldVal) => {
63
- checkIpVal(newVal, oldVal, thirdIp, 2);
64
- });
65
- vue.watch(forIp, (newVal, oldVal) => {
66
- checkIpVal(newVal, oldVal, forIp, 3);
67
- });
68
- vue.watch(editorRef, (newVal) => {
69
- if (props.autoFocus && newVal) {
70
- const input = newVal.$el.getElementsByTagName("input")[0];
71
- input.focus();
67
+ const handleKeydown = (event, index) => {
68
+ var _a, _b, _c, _d, _e;
69
+ if (event.key === "Enter") {
70
+ emit("enter", event);
71
+ return;
72
72
  }
73
- });
74
- const getFocus = () => {
73
+ if (/^[0-9]$/.test(event.key)) {
74
+ const input = event.target;
75
+ if (input && ipSegments.value[index].length === 3 && input.selectionStart === input.selectionEnd) {
76
+ event.preventDefault();
77
+ if (index < 3 && input.selectionEnd === ipSegments.value[index].length) {
78
+ const nextIndex = index + 1;
79
+ const nextInput = ipInputs.value[nextIndex];
80
+ if (nextInput) {
81
+ nextInput.focus();
82
+ (_a = nextInput.input) == null ? void 0 : _a.setSelectionRange(0, ipSegments.value[nextIndex].length);
83
+ }
84
+ }
85
+ }
86
+ return;
87
+ }
88
+ if (event.key === ".") {
89
+ event.preventDefault();
90
+ const input = event.target;
91
+ if (input && index < 3 && input.selectionStart === input.selectionEnd && input.selectionEnd !== 0 && ipSegments.value[index].length) {
92
+ const nextIndex = index + 1;
93
+ const nextInput = ipInputs.value[nextIndex];
94
+ if (nextInput) {
95
+ nextInput.focus();
96
+ (_b = nextInput.input) == null ? void 0 : _b.setSelectionRange(0, ipSegments.value[nextIndex].length);
97
+ }
98
+ }
99
+ return;
100
+ }
101
+ if (event.key === "Backspace") {
102
+ const input = event.target;
103
+ if (input && index > 0 && input.selectionStart === 0 && input.selectionEnd === 0) {
104
+ event.preventDefault();
105
+ const prevIndex = index - 1;
106
+ const prevValue = ipSegments.value[prevIndex];
107
+ const prevInput = ipInputs.value[prevIndex];
108
+ if (prevValue.length > 0) {
109
+ ipSegments.value[prevIndex] = prevValue.slice(0, -1);
110
+ }
111
+ if (prevInput) {
112
+ prevInput.focus();
113
+ (_c = prevInput.input) == null ? void 0 : _c.setSelectionRange(ipSegments.value[prevIndex].length, ipSegments.value[prevIndex].length);
114
+ }
115
+ }
116
+ }
117
+ if (event.key === "ArrowLeft") {
118
+ const input = event.target;
119
+ if (input && index > 0 && input.selectionStart === 0 && input.selectionEnd === 0) {
120
+ event.preventDefault();
121
+ const prevIndex = index - 1;
122
+ const prevInput = ipInputs.value[prevIndex];
123
+ if (prevInput) {
124
+ prevInput.focus();
125
+ (_d = prevInput.input) == null ? void 0 : _d.setSelectionRange(ipSegments.value[prevIndex].length, ipSegments.value[prevIndex].length);
126
+ }
127
+ }
128
+ }
129
+ if (event.key === "ArrowRight") {
130
+ const input = event.target;
131
+ if (input && index < 3 && input.selectionStart === ipSegments.value[index].length && input.selectionEnd === ipSegments.value[index].length) {
132
+ event.preventDefault();
133
+ const nextIndex = index + 1;
134
+ const nextInput = ipInputs.value[nextIndex];
135
+ if (nextInput) {
136
+ nextInput.focus();
137
+ (_e = nextInput.input) == null ? void 0 : _e.setSelectionRange(0, 0);
138
+ }
139
+ }
140
+ }
141
+ };
142
+ const handleFocus = () => {
75
143
  activeElement.value = true;
76
144
  if (isAllBlur.value) {
77
145
  isAllBlur.value = false;
78
146
  emit("focus");
79
147
  }
80
148
  };
81
- const blur = () => {
149
+ const handleBlur = () => {
82
150
  activeElement.value = false;
83
151
  setTimeout(() => {
84
152
  if (!activeElement.value) {
@@ -87,75 +155,66 @@ const IBizInputIP = /* @__PURE__ */ vue.defineComponent({
87
155
  }
88
156
  }, 0);
89
157
  };
90
- const handleKeyUp = (e) => {
91
- if (e && e.code === "Enter") {
92
- emit("enter", e);
158
+ vue.watch(() => props.value, (newVal) => {
159
+ ipSegments.value = splitIp(newVal || "");
160
+ });
161
+ vue.watch(() => ipInputs.value[0], (input) => {
162
+ if (props.autoFocus && input) {
163
+ input.focus();
93
164
  }
94
- };
165
+ });
95
166
  return {
96
167
  ns,
97
168
  c,
98
- editorRef,
99
- currentVal,
100
- getFocus,
101
- blur,
102
- firstIp,
103
- secIp,
104
- thirdIp,
105
- forIp,
106
169
  showFormDefaultContent,
107
- handleKeyUp
170
+ activeElement,
171
+ ipSegments,
172
+ ipInputs,
173
+ joinIp,
174
+ handleInput,
175
+ handleKeydown,
176
+ handleFocus,
177
+ handleBlur
108
178
  };
109
179
  },
110
180
  render() {
111
- return vue.createVNode("div", {
112
- "class": [this.ns.b(), this.disabled ? this.ns.m("disabled") : "", this.readonly ? this.ns.m("readonly") : "", this.ns.is("show-default", this.showFormDefaultContent)]
113
- }, [vue.createVNode(vue.resolveComponent("el-input"), {
114
- "ref": "editorRef",
115
- "type": "text",
116
- "size": "small",
117
- "disabled": this.disabled,
118
- "readonly": this.readonly,
119
- "onFocus": this.getFocus,
120
- "onBlur": this.blur,
121
- "onKeyup": this.handleKeyUp,
122
- "maxlength": 3,
123
- "modelValue": this.firstIp,
124
- "onUpdate:modelValue": ($event) => this.firstIp = $event
125
- }, null), vue.createTextVNode("."), vue.createVNode(vue.resolveComponent("el-input"), {
126
- "type": "text",
127
- "size": "small",
128
- "disabled": this.disabled,
129
- "readonly": this.readonly,
130
- "onFocus": this.getFocus,
131
- "onBlur": this.blur,
132
- "onKeyup": this.handleKeyUp,
133
- "maxlength": 3,
134
- "modelValue": this.secIp,
135
- "onUpdate:modelValue": ($event) => this.secIp = $event
136
- }, null), vue.createTextVNode("."), vue.createVNode(vue.resolveComponent("el-input"), {
137
- "type": "text",
138
- "size": "small",
139
- "disabled": this.disabled,
140
- "readonly": this.readonly,
141
- "onFocus": this.getFocus,
142
- "onBlur": this.blur,
143
- "onKeyup": this.handleKeyUp,
144
- "maxlength": 3,
145
- "modelValue": this.thirdIp,
146
- "onUpdate:modelValue": ($event) => this.thirdIp = $event
147
- }, null), vue.createTextVNode("."), vue.createVNode(vue.resolveComponent("el-input"), {
148
- "type": "text",
149
- "size": "small",
150
- "disabled": this.disabled,
151
- "readonly": this.readonly,
152
- "onFocus": this.getFocus,
153
- "onBlur": this.blur,
154
- "onKeyup": this.handleKeyUp,
155
- "maxlength": 3,
156
- "modelValue": this.forIp,
157
- "onUpdate:modelValue": ($event) => this.forIp = $event
181
+ let content = null;
182
+ if (this.readonly) {
183
+ content = this.value;
184
+ } else {
185
+ content = vue.createVNode("div", {
186
+ "class": this.ns.b("content")
187
+ }, [this.ipSegments.map((segment, index) => {
188
+ return [vue.createVNode(vue.resolveComponent("el-input"), {
189
+ "model-value": segment,
190
+ "maxlength": 4,
191
+ "disabled": this.disabled,
192
+ "readonly": this.readonly,
193
+ "ref": (el) => {
194
+ if (el) {
195
+ this.ipInputs[index] = el;
196
+ } else {
197
+ this.ipInputs[index] = void 0;
198
+ }
199
+ },
200
+ "onInput": (value) => this.handleInput(value, index),
201
+ "onKeydown": (e) => this.handleKeydown(e, index),
202
+ "onFocus": this.handleFocus,
203
+ "onBlur": this.handleBlur
204
+ }, null), index < 3 && vue.createVNode("span", {
205
+ "class": this.ns.b("dot")
206
+ }, [vue.createTextVNode(".")])];
207
+ })]);
208
+ }
209
+ const formDefaultContent = vue.createVNode("div", {
210
+ "class": this.ns.b("form-default-content")
211
+ }, [this.ipSegments.some((segment) => segment) ? this.joinIp(this.ipSegments) : vue.createVNode(vue.resolveComponent("iBizEditorEmptyText"), {
212
+ "showPlaceholder": this.c.emptyShowPlaceholder,
213
+ "placeHolder": this.c.placeHolder
158
214
  }, null)]);
215
+ return vue.createVNode("div", {
216
+ "class": [this.ns.b(), this.disabled ? this.ns.m("disabled") : "", this.readonly ? this.ns.m("readonly") : "", this.ns.is("show-default", this.showFormDefaultContent), this.ns.is("focus", this.activeElement && !this.disabled && !this.readonly)]
217
+ }, [this.showFormDefaultContent && formDefaultContent, content]);
159
218
  }
160
219
  });
161
220
 
@@ -1 +1 @@
1
- .ibiz-input-ip{display:flex;flex-wrap:nowrap;height:100%;line-height:var(--ibiz-form-item-line-height)}.ibiz-form-item .ibiz-input-ip.is-show-default{padding:var(--ibiz-form-item-hover-edit-padding)}
1
+ .ibiz-input-ip{display:flex;flex-wrap:nowrap;height:100%;font-size:var(--ibiz-form-item-font-size);line-height:var(--ibiz-form-item-line-height);color:var(--ibiz-form-item-text-color)}.ibiz-input-ip .el-input .el-input__wrapper{background-color:transparent;box-shadow:none}.ibiz-input-ip .el-input.is-disabled .el-input__wrapper{background-color:transparent}.ibiz-input-ip:hover:not(.ibiz-input-ip--disabled) .ibiz-input-ip-content{box-shadow:0 0 0 1px var(--ibiz-editor-hover-border-color) inset}.ibiz-input-ip--disabled .ibiz-input-ip-content{color:var(--el-disabled-text-color);cursor:not-allowed;background-color:var(--el-disabled-bg-color);box-shadow:0 0 0 1px var(--el-disabled-border-color) inset}.ibiz-input-ip--readonly{color:var(--ibiz-form-item-readonly-color)}.ibiz-input-ip.is-focus .ibiz-input-ip-content{box-shadow:0 0 0 1px var(--ibiz-color-primary) inset}.ibiz-input-ip-content{display:flex;flex-wrap:nowrap;align-items:center;width:100%;height:100%;color:var(--ibiz-editor-default-text-color);border-radius:var(--ibiz-border-radius-small);box-shadow:0 0 0 1px var(--ibiz-editor-default-border-color) inset}.ibiz-form-item .ibiz-input-ip.is-show-default .ibiz-input-ip-form-default-content{display:block;padding:var(--ibiz-form-item-hover-edit-padding)}.ibiz-form-item .ibiz-input-ip.is-show-default .ibiz-input-ip-content{display:none}.ibiz-form-item .ibiz-input-ip.is-show-default:hover .ibiz-input-ip-form-default-content{display:none}.ibiz-form-item .ibiz-input-ip.is-show-default:hover .ibiz-input-ip-content{display:flex}.ibiz-form-item .ibiz-input-ip.is-show-default.is-focus .ibiz-input-ip-form-default-content{display:none}.ibiz-form-item .ibiz-input-ip.is-show-default.is-focus .ibiz-input-ip-content{display:flex}
@@ -80,7 +80,7 @@ const IBizFileUpload = /* @__PURE__ */ vue.defineComponent({
80
80
  "file-list": this.files,
81
81
  "action": this.uploadUrl,
82
82
  "headers": this.headers,
83
- "disabled": this.disabled,
83
+ "disabled": this.disabled || this.readonly,
84
84
  "multiple": this.c.multiple,
85
85
  "limit": this.limit,
86
86
  "drag": !!this.c.isDrag,