@ibiz-template/mob-vue3-components 0.7.41-alpha.17 → 0.7.41-alpha.19

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 (151) hide show
  1. package/dist/ibiz-markdown-editor-CpFrKPxk.js +2 -0
  2. package/dist/ibiz-markdown-editor-CpFrKPxk.js.map +1 -0
  3. package/dist/index-BsnCebyq.js +2 -0
  4. package/dist/index-BsnCebyq.js.map +1 -0
  5. package/dist/index-DL4fl2Xq.js +2 -0
  6. package/dist/index-DL4fl2Xq.js.map +1 -0
  7. package/dist/index-DwC1-gss.js +76 -0
  8. package/dist/index-DwC1-gss.js.map +1 -0
  9. package/dist/index.min.css +3 -3
  10. package/dist/index.system.min.js +1 -1
  11. package/dist/{quill-CG16aqds.js → quill-DcWdzP1t.js} +2 -2
  12. package/dist/{quill-CG16aqds.js.map → quill-DcWdzP1t.js.map} +1 -1
  13. package/dist/quill-editor-DlIyufAV.js +2 -0
  14. package/dist/quill-editor-DlIyufAV.js.map +1 -0
  15. package/dist/{quill-editor-preview-YXGzGLmQ.js → quill-editor-preview-Cf2qhphz.js} +2 -2
  16. package/dist/{quill-editor-preview-YXGzGLmQ.js.map → quill-editor-preview-Cf2qhphz.js.map} +1 -1
  17. package/dist/tree-CGwysqdR.js +2 -0
  18. package/dist/tree-CGwysqdR.js.map +1 -0
  19. package/es/_virtual/index12.mjs +2 -2
  20. package/es/_virtual/index13.mjs +2 -2
  21. package/es/_virtual/index14.mjs +2 -2
  22. package/es/_virtual/index15.mjs +3 -1
  23. package/es/_virtual/index16.mjs +1 -1
  24. package/es/_virtual/index17.mjs +1 -3
  25. package/es/_virtual/index18.mjs +2 -2
  26. package/es/_virtual/index19.mjs +3 -0
  27. package/es/control/calendar/calendar.mjs +2 -0
  28. package/es/control/dashboard/dashboard.css +1 -1
  29. package/es/control/dashboard/portlet/portlet-layout/portlet-layout.css +1 -1
  30. package/es/control/dashboard/portlet/portlet-layout/portlet-layout.mjs +68 -22
  31. package/es/control/drbar/drbar.controller.mjs +24 -1
  32. package/es/control/drtab/drtab.controller.mjs +20 -4
  33. package/es/control/list/list-render-util.mjs +1 -1
  34. package/es/control/list/md-ctrl/md-ctrl.css +1 -1
  35. package/es/control/tab-exp-panel/tab-exp-panel.css +1 -1
  36. package/es/control/tree/tree.mjs +8 -0
  37. package/es/editor/cascader/ibiz-cascader/ibiz-cascader.mjs +3 -0
  38. package/es/editor/check-box/ibiz-checkbox/ibiz-checkbox.mjs +8 -2
  39. package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.css +1 -1
  40. package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.mjs +5 -0
  41. package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +23 -3
  42. package/es/editor/data-picker/picker-editor.controller.mjs +1 -1
  43. package/es/editor/date-picker/date-picker-editor.controller.mjs +16 -0
  44. package/es/editor/date-picker/ibiz-date-picker/ibiz-date-picker.mjs +4 -1
  45. package/es/editor/date-range/date-range-editor.controller.mjs +20 -1
  46. package/es/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.mjs +23 -4
  47. package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +2 -2
  48. package/es/editor/html/html-editor.controller.mjs +59 -2
  49. package/es/editor/html/quill-editor/quill-editor.mjs +10 -1
  50. package/es/editor/index.mjs +18 -3
  51. package/es/editor/map-picker/ibiz-map-picker/ibiz-map-picker.css +1 -0
  52. package/es/editor/map-picker/ibiz-map-picker/ibiz-map-picker.mjs +337 -0
  53. package/es/editor/map-picker/index.mjs +5 -0
  54. package/es/editor/map-picker/map-picker-editor.controller.mjs +7 -0
  55. package/es/editor/map-picker/map-picker-editor.provider.mjs +22 -0
  56. package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +10 -1
  57. package/es/editor/slider/ibiz-slider/ibiz-slider.mjs +25 -0
  58. package/es/editor/text-box/signature/signature.css +1 -1
  59. package/es/editor/text-box/signature/signature.mjs +2 -0
  60. package/es/editor/upload/ibiz-image-select/ibiz-image-select.mjs +5 -2
  61. package/es/editor/upload/ibiz-image-upload/ibiz-image-upload.mjs +5 -2
  62. package/es/editor/upload/upload-editor.controller.mjs +29 -1
  63. package/es/editor/upload/use/use-van-upload.mjs +8 -1
  64. package/es/index.mjs +1 -0
  65. package/es/locale/en/index.mjs +3 -0
  66. package/es/locale/zh-CN/index.mjs +3 -0
  67. package/es/mob-app/router/index.mjs +6 -5
  68. 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
  69. package/es/node_modules/.pnpm/dingtalk-jsapi@3.2.0/node_modules/dingtalk-jsapi/lib/packages/frame-talk-client-pc/index.mjs +1 -1
  70. package/es/node_modules/.pnpm/dingtalk-jsapi@3.2.0/node_modules/dingtalk-jsapi/lib/sdk/middlewares/index.mjs +1 -1
  71. package/es/node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index2.mjs +1 -1
  72. package/es/node_modules/.pnpm/lodash.clonedeep@4.5.0/node_modules/lodash.clonedeep/index.mjs +1 -1
  73. package/es/node_modules/.pnpm/lodash.isequal@4.5.0/node_modules/lodash.isequal/index.mjs +1 -1
  74. package/es/node_modules/.pnpm/quill-delta@5.1.0/node_modules/quill-delta/dist/AttributeMap.mjs +1 -1
  75. package/es/node_modules/.pnpm/quill-delta@5.1.0/node_modules/quill-delta/dist/Delta.mjs +1 -1
  76. package/es/platform/ios-platform-provider.mjs +11 -0
  77. package/es/platform/wechat-official-platform-provider.mjs +11 -0
  78. package/es/view-engine/mob-mpickup-view-engine.mjs +6 -1
  79. package/lib/_virtual/index12.cjs +2 -2
  80. package/lib/_virtual/index13.cjs +2 -2
  81. package/lib/_virtual/index14.cjs +2 -2
  82. package/lib/_virtual/index15.cjs +2 -6
  83. package/lib/_virtual/index16.cjs +2 -2
  84. package/lib/_virtual/index17.cjs +6 -2
  85. package/lib/_virtual/index18.cjs +2 -2
  86. package/lib/_virtual/index19.cjs +5 -0
  87. package/lib/control/calendar/calendar.cjs +2 -0
  88. package/lib/control/dashboard/dashboard.css +1 -1
  89. package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.cjs +67 -21
  90. package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.css +1 -1
  91. package/lib/control/drbar/drbar.controller.cjs +24 -1
  92. package/lib/control/drtab/drtab.controller.cjs +20 -4
  93. package/lib/control/list/list-render-util.cjs +1 -1
  94. package/lib/control/list/md-ctrl/md-ctrl.css +1 -1
  95. package/lib/control/tab-exp-panel/tab-exp-panel.css +1 -1
  96. package/lib/control/tree/tree.cjs +8 -0
  97. package/lib/editor/cascader/ibiz-cascader/ibiz-cascader.cjs +3 -0
  98. package/lib/editor/check-box/ibiz-checkbox/ibiz-checkbox.cjs +8 -2
  99. package/lib/editor/data-picker/ibiz-mpicker/ibiz-mpicker.cjs +5 -0
  100. package/lib/editor/data-picker/ibiz-mpicker/ibiz-mpicker.css +1 -1
  101. package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +23 -3
  102. package/lib/editor/data-picker/picker-editor.controller.cjs +1 -1
  103. package/lib/editor/date-picker/date-picker-editor.controller.cjs +16 -0
  104. package/lib/editor/date-picker/ibiz-date-picker/ibiz-date-picker.cjs +3 -0
  105. package/lib/editor/date-range/date-range-editor.controller.cjs +20 -1
  106. package/lib/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.cjs +22 -3
  107. package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +2 -2
  108. package/lib/editor/html/html-editor.controller.cjs +59 -2
  109. package/lib/editor/html/quill-editor/quill-editor.cjs +10 -1
  110. package/lib/editor/index.cjs +19 -4
  111. package/lib/editor/map-picker/ibiz-map-picker/ibiz-map-picker.cjs +339 -0
  112. package/lib/editor/map-picker/ibiz-map-picker/ibiz-map-picker.css +1 -0
  113. package/lib/editor/map-picker/index.cjs +11 -0
  114. package/lib/editor/map-picker/map-picker-editor.controller.cjs +9 -0
  115. package/lib/editor/map-picker/map-picker-editor.provider.cjs +24 -0
  116. package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +10 -1
  117. package/lib/editor/slider/ibiz-slider/ibiz-slider.cjs +25 -0
  118. package/lib/editor/text-box/signature/signature.cjs +2 -0
  119. package/lib/editor/text-box/signature/signature.css +1 -1
  120. package/lib/editor/upload/ibiz-image-select/ibiz-image-select.cjs +5 -2
  121. package/lib/editor/upload/ibiz-image-upload/ibiz-image-upload.cjs +5 -2
  122. package/lib/editor/upload/upload-editor.controller.cjs +29 -1
  123. package/lib/editor/upload/use/use-van-upload.cjs +8 -1
  124. package/lib/index.cjs +2 -0
  125. package/lib/locale/en/index.cjs +3 -0
  126. package/lib/locale/zh-CN/index.cjs +3 -0
  127. package/lib/mob-app/router/index.cjs +6 -5
  128. 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
  129. package/lib/node_modules/.pnpm/dingtalk-jsapi@3.2.0/node_modules/dingtalk-jsapi/lib/packages/frame-talk-client-pc/index.cjs +1 -1
  130. package/lib/node_modules/.pnpm/dingtalk-jsapi@3.2.0/node_modules/dingtalk-jsapi/lib/sdk/middlewares/index.cjs +1 -1
  131. package/lib/node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index2.cjs +1 -1
  132. package/lib/node_modules/.pnpm/lodash.clonedeep@4.5.0/node_modules/lodash.clonedeep/index.cjs +1 -1
  133. package/lib/node_modules/.pnpm/lodash.isequal@4.5.0/node_modules/lodash.isequal/index.cjs +1 -1
  134. package/lib/node_modules/.pnpm/quill-delta@5.1.0/node_modules/quill-delta/dist/AttributeMap.cjs +1 -1
  135. package/lib/node_modules/.pnpm/quill-delta@5.1.0/node_modules/quill-delta/dist/Delta.cjs +1 -1
  136. package/lib/platform/ios-platform-provider.cjs +11 -0
  137. package/lib/platform/wechat-official-platform-provider.cjs +11 -0
  138. package/lib/view-engine/mob-mpickup-view-engine.cjs +6 -1
  139. package/package.json +14 -8
  140. package/dist/ibiz-markdown-editor-B7D3K0dJ.js +0 -2
  141. package/dist/ibiz-markdown-editor-B7D3K0dJ.js.map +0 -1
  142. package/dist/index-BcB2An4e.js +0 -2
  143. package/dist/index-BcB2An4e.js.map +0 -1
  144. package/dist/index-CLxzVzNz.js +0 -76
  145. package/dist/index-CLxzVzNz.js.map +0 -1
  146. package/dist/index-DuVHtH1z.js +0 -2
  147. package/dist/index-DuVHtH1z.js.map +0 -1
  148. package/dist/quill-editor-C7zYyQrk.js +0 -2
  149. package/dist/quill-editor-C7zYyQrk.js.map +0 -1
  150. package/dist/tree-Db38FIKx.js +0 -2
  151. package/dist/tree-Db38FIKx.js.map +0 -1
@@ -0,0 +1,337 @@
1
+ import { isVNode, defineComponent, createVNode, resolveComponent, withDirectives, resolveDirective, ref, computed, nextTick, onUnmounted } from 'vue';
2
+ import { useNamespace, getEditorEmits, getMapPickerProps } from '@ibiz-template/vue3-util';
3
+ import AMapLoader from '../../../node_modules/.pnpm/@amap_amap-jsapi-loader@1.0.1_patch_hash_73bpcwbs2m5ip4qppmz6a7epsa/node_modules/@amap/amap-jsapi-loader/dist/index.mjs';
4
+ import './ibiz-map-picker.css';
5
+
6
+ "use strict";
7
+ function _isSlot(s) {
8
+ return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
9
+ }
10
+ const IBizMapPicker = /* @__PURE__ */ defineComponent({
11
+ name: "IBizMapPicker",
12
+ props: getMapPickerProps(),
13
+ emits: getEditorEmits(),
14
+ setup(props, {
15
+ emit
16
+ }) {
17
+ const ns = useNamespace("map-picker");
18
+ const c = props.controller;
19
+ const {
20
+ editorItems
21
+ } = c.model;
22
+ let longitudeName = "";
23
+ let latitudeName = "";
24
+ if (editorItems) {
25
+ const [longitude, latitude] = editorItems;
26
+ longitudeName = longitude.id || "";
27
+ latitudeName = latitude.id || "";
28
+ }
29
+ const inputRef = ref();
30
+ const searchRef = ref();
31
+ const searchInputRef = computed(() => {
32
+ var _a, _b, _c;
33
+ return (_c = (_a = searchRef.value) == null ? void 0 : (_b = _a.$el).querySelector) == null ? void 0 : _c.call(_b, "input");
34
+ });
35
+ const mapContainerRef = ref();
36
+ const searchResultContainerRef = ref();
37
+ const dialogVisible = ref(false);
38
+ const isLoading = ref(false);
39
+ const searchValue = ref("");
40
+ let map;
41
+ let marker;
42
+ let poiPicker;
43
+ const addressInfo = {
44
+ address: "",
45
+ longitude: null,
46
+ latitude: null
47
+ };
48
+ const clearMarker = () => {
49
+ if (marker) {
50
+ marker.setMap(null);
51
+ marker = void 0;
52
+ }
53
+ };
54
+ const addMarker = (lng, lat) => {
55
+ const AMap = window.AMap;
56
+ if (!AMap) {
57
+ return;
58
+ }
59
+ clearMarker();
60
+ marker = new AMap.Marker({
61
+ position: [lng, lat]
62
+ });
63
+ };
64
+ const getAddress = (lng, lat) => {
65
+ const AMap = window.AMap;
66
+ if (!AMap) {
67
+ return;
68
+ }
69
+ if (!marker) {
70
+ return;
71
+ }
72
+ const geocoder = new AMap.Geocoder({});
73
+ const currentMarker = marker;
74
+ geocoder.getAddress([lng, lat], (status, result) => {
75
+ if (!marker || marker !== currentMarker) {
76
+ return;
77
+ }
78
+ if (status === "complete" && result.info === "OK" && result.regeocode) {
79
+ const regeocode = result.regeocode;
80
+ const address = regeocode.formattedAddress;
81
+ const markerContent = document.createElement("div");
82
+ const markerImg = document.createElement("img");
83
+ markerImg.style.width = "25px";
84
+ markerImg.src = "//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png";
85
+ markerContent.appendChild(markerImg);
86
+ const markerText = document.createElement("span");
87
+ markerText.className = ns.b("popup-map-marker-text");
88
+ markerText.textContent = address;
89
+ markerContent.appendChild(markerText);
90
+ marker.setContent(markerContent);
91
+ marker.setMap(map);
92
+ addressInfo.address = address;
93
+ addressInfo.longitude = lng;
94
+ addressInfo.latitude = lat;
95
+ searchValue.value = address;
96
+ }
97
+ });
98
+ };
99
+ const loadMap = async () => {
100
+ try {
101
+ isLoading.value = true;
102
+ window._AMapSecurityConfig = {
103
+ securityJsCode: ibiz.env.aMapSecurityJsCode
104
+ };
105
+ await AMapLoader.load({
106
+ key: ibiz.env.aMapKey,
107
+ version: "2.0",
108
+ plugins: ["AMap.PlaceSearch", "AMap.Geocoder"],
109
+ AMapUI: {
110
+ version: "1.1",
111
+ plugins: ["misc/PoiPicker"]
112
+ }
113
+ });
114
+ } finally {
115
+ isLoading.value = false;
116
+ }
117
+ };
118
+ const initMap = () => {
119
+ const AMap = window.AMap;
120
+ if (!AMap) {
121
+ return;
122
+ }
123
+ if (!mapContainerRef.value) {
124
+ return;
125
+ }
126
+ map = new AMap.Map(mapContainerRef.value, {
127
+ viewMode: "3D",
128
+ zoom: 11
129
+ });
130
+ map == null ? void 0 : map.on("click", (e) => {
131
+ const lnglat = e.lnglat;
132
+ const lng = lnglat.lng;
133
+ const lat = lnglat.lat;
134
+ if (lng != null && lat != null) {
135
+ addMarker(lng, lat);
136
+ getAddress(lng, lat);
137
+ }
138
+ });
139
+ const AMapUI = window.AMapUI;
140
+ if (!AMapUI) {
141
+ return;
142
+ }
143
+ if (!searchInputRef.value || !searchResultContainerRef.value) {
144
+ return;
145
+ }
146
+ AMapUI.loadUI(["misc/PoiPicker"], function(PoiPicker) {
147
+ if (!searchInputRef.value || !searchResultContainerRef.value || !PoiPicker) {
148
+ return;
149
+ }
150
+ poiPicker = new PoiPicker({
151
+ input: searchInputRef.value,
152
+ placeSearchOptions: {
153
+ map
154
+ },
155
+ searchResultsContainer: searchResultContainerRef.value
156
+ });
157
+ poiPicker == null ? void 0 : poiPicker.on("poiPicked", function(poiResult) {
158
+ var _a, _b;
159
+ clearMarker();
160
+ const item = poiResult.item;
161
+ if (item) {
162
+ addressInfo.address = item.name;
163
+ addressInfo.longitude = (_a = item.location) == null ? void 0 : _a.lng;
164
+ addressInfo.latitude = (_b = item.location) == null ? void 0 : _b.lat;
165
+ searchValue.value = item.name;
166
+ if (poiResult.source !== "search") {
167
+ poiPicker == null ? void 0 : poiPicker.searchByKeyword(item.name);
168
+ }
169
+ }
170
+ });
171
+ });
172
+ };
173
+ const handleShow = () => {
174
+ var _a;
175
+ dialogVisible.value = true;
176
+ (_a = inputRef.value) == null ? void 0 : _a.blur();
177
+ nextTick(async () => {
178
+ var _a2;
179
+ if (!window.AMap) {
180
+ await loadMap();
181
+ }
182
+ if (!map || !((_a2 = mapContainerRef.value) == null ? void 0 : _a2.children.length)) {
183
+ map == null ? void 0 : map.destroy();
184
+ initMap();
185
+ }
186
+ searchValue.value = props.value || "";
187
+ if (props.data && longitudeName && latitudeName) {
188
+ const longitude = props.data[longitudeName];
189
+ const latitude = props.data[latitudeName];
190
+ if (longitude && latitude) {
191
+ map == null ? void 0 : map.setCenter([longitude, latitude], true);
192
+ addMarker(longitude, latitude);
193
+ getAddress(longitude, latitude);
194
+ }
195
+ }
196
+ });
197
+ };
198
+ const handleConfirm = () => {
199
+ dialogVisible.value = false;
200
+ if (longitudeName) {
201
+ emit("change", addressInfo.longitude != null ? addressInfo.longitude : null, longitudeName);
202
+ }
203
+ if (latitudeName) {
204
+ emit("change", addressInfo.latitude != null ? addressInfo.latitude : null, latitudeName);
205
+ }
206
+ emit("change", addressInfo.address || "");
207
+ handleClose();
208
+ };
209
+ const handleClose = () => {
210
+ dialogVisible.value = false;
211
+ if (poiPicker) {
212
+ poiPicker.clearSuggest();
213
+ poiPicker.clearSearchResults();
214
+ }
215
+ searchValue.value = "";
216
+ addressInfo.address = "";
217
+ addressInfo.longitude = null;
218
+ addressInfo.latitude = null;
219
+ clearMarker();
220
+ };
221
+ const handleClear = (_e) => {
222
+ _e.stopPropagation();
223
+ if (longitudeName) {
224
+ emit("change", null, longitudeName);
225
+ }
226
+ if (latitudeName) {
227
+ emit("change", null, latitudeName);
228
+ }
229
+ emit("change", "");
230
+ handleClose();
231
+ };
232
+ const handleSearchClear = () => {
233
+ searchValue.value = "";
234
+ addressInfo.address = "";
235
+ addressInfo.longitude = null;
236
+ addressInfo.latitude = null;
237
+ clearMarker();
238
+ };
239
+ onUnmounted(() => {
240
+ map == null ? void 0 : map.destroy();
241
+ });
242
+ return {
243
+ ns,
244
+ c,
245
+ inputRef,
246
+ searchRef,
247
+ mapContainerRef,
248
+ searchResultContainerRef,
249
+ dialogVisible,
250
+ isLoading,
251
+ searchValue,
252
+ handleShow,
253
+ handleConfirm,
254
+ handleClose,
255
+ handleClear,
256
+ handleSearchClear
257
+ };
258
+ },
259
+ render() {
260
+ let content;
261
+ if (this.readonly) {
262
+ content = this.value;
263
+ } else {
264
+ content = [createVNode(resolveComponent("van-field"), {
265
+ "class": this.ns.b("input"),
266
+ "ref": "inputRef",
267
+ "modelValue": this.value,
268
+ "onUpdate:modelValue": ($event) => this.value = $event,
269
+ "readonly": true,
270
+ "placeholder": this.c.placeHolder,
271
+ "disabled": this.disabled,
272
+ "onClick": this.handleShow
273
+ }, {
274
+ button: () => {
275
+ if (this.readonly || !this.value)
276
+ return;
277
+ return createVNode(resolveComponent("van-button"), {
278
+ "icon": "clear",
279
+ "onClick": this.handleClear
280
+ }, null);
281
+ }
282
+ }), createVNode(resolveComponent("van-popup"), {
283
+ "class": this.ns.b("popup"),
284
+ "show": this.dialogVisible,
285
+ "onUpdate:show": ($event) => this.dialogVisible = $event,
286
+ "round": true,
287
+ "position": "bottom",
288
+ "teleport": "body",
289
+ "close-on-popstate": true
290
+ }, {
291
+ default: () => {
292
+ let _slot, _slot2;
293
+ return createVNode("div", {
294
+ "class": this.ns.b("popup-wrapper")
295
+ }, [createVNode("div", {
296
+ "class": this.ns.b("popup-wrapper-content")
297
+ }, [createVNode("div", {
298
+ "class": this.ns.b("popup-content-search")
299
+ }, [createVNode(resolveComponent("van-search"), {
300
+ "ref": "searchRef",
301
+ "modelValue": this.searchValue,
302
+ "onUpdate:modelValue": ($event) => this.searchValue = $event,
303
+ "placeholder": ibiz.i18n.t("editor.mapPicker.searchPlaceholder"),
304
+ "disabled": this.isLoading
305
+ }, null)]), withDirectives(createVNode("div", {
306
+ "class": this.ns.b("popup-map-content")
307
+ }, [createVNode("div", {
308
+ "class": this.ns.b("popup-map-container"),
309
+ "ref": "mapContainerRef"
310
+ }, null), createVNode("div", {
311
+ "class": this.ns.b("popup-search-result-container"),
312
+ "ref": "searchResultContainerRef"
313
+ }, null)]), [[resolveDirective("loading"), this.isLoading]])]), createVNode("div", {
314
+ "class": this.ns.b("popup-wrapper-footer")
315
+ }, [createVNode(resolveComponent("van-button"), {
316
+ "class": this.ns.b("popup-confirm"),
317
+ "onClick": this.handleClose
318
+ }, _isSlot(_slot = ibiz.i18n.t("editor.common.cancel")) ? _slot : {
319
+ default: () => [_slot]
320
+ }), createVNode(resolveComponent("van-button"), {
321
+ "class": this.ns.b("popup-footer-button"),
322
+ "type": "primary",
323
+ "disabled": this.isLoading,
324
+ "onClick": this.handleConfirm
325
+ }, _isSlot(_slot2 = ibiz.i18n.t("editor.common.confirm")) ? _slot2 : {
326
+ default: () => [_slot2]
327
+ })])]);
328
+ }
329
+ })];
330
+ }
331
+ return createVNode("div", {
332
+ "class": [this.ns.b(), this.disabled ? this.ns.m("disabled") : "", this.readonly ? this.ns.m("readonly") : ""]
333
+ }, [content]);
334
+ }
335
+ });
336
+
337
+ export { IBizMapPicker };
@@ -0,0 +1,5 @@
1
+ export { IBizMapPicker } from './ibiz-map-picker/ibiz-map-picker.mjs';
2
+ export { MapPickerEditorController } from './map-picker-editor.controller.mjs';
3
+ export { MapPickerEditorProvider } from './map-picker-editor.provider.mjs';
4
+
5
+ "use strict";
@@ -0,0 +1,7 @@
1
+ import { EditorController } from '@ibiz-template/runtime';
2
+
3
+ "use strict";
4
+ class MapPickerEditorController extends EditorController {
5
+ }
6
+
7
+ export { MapPickerEditorController };
@@ -0,0 +1,22 @@
1
+ import { MapPickerEditorController } from './map-picker-editor.controller.mjs';
2
+
3
+ "use strict";
4
+ var __defProp = Object.defineProperty;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __publicField = (obj, key, value) => {
7
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
8
+ return value;
9
+ };
10
+ class MapPickerEditorProvider {
11
+ constructor() {
12
+ __publicField(this, "formEditor", "IBizMapPicker");
13
+ __publicField(this, "gridEditor", "IBizMapPicker");
14
+ }
15
+ async createController(editorModel, parentController) {
16
+ const c = new MapPickerEditorController(editorModel, parentController);
17
+ await c.init();
18
+ return c;
19
+ }
20
+ }
21
+
22
+ export { MapPickerEditorProvider };
@@ -34,7 +34,16 @@ const IBizMarkDown = /* @__PURE__ */ defineComponent({
34
34
  const cssVars = ref({});
35
35
  watch(() => props.data, (newVal) => {
36
36
  if (newVal) {
37
- const urls = ibiz.util.file.calcFileUpDownUrl(c.context, c.params, newVal, c.editorParams);
37
+ const editorParams = {
38
+ ...c.editorParams
39
+ };
40
+ if (editorParams.uploadparams) {
41
+ editorParams.uploadParams = JSON.parse(editorParams.uploadparams);
42
+ }
43
+ if (editorParams.exportparams) {
44
+ editorParams.exportParams = JSON.parse(editorParams.exportparams);
45
+ }
46
+ const urls = ibiz.util.file.calcFileUpDownUrl(c.context, c.params, newVal, editorParams);
38
47
  uploadUrl.value = urls.uploadUrl;
39
48
  downloadUrl.value = urls.downloadUrl;
40
49
  }
@@ -31,12 +31,21 @@ const IBizSlider = /* @__PURE__ */ defineComponent({
31
31
  if (editorModel.editorParams.stepValue) {
32
32
  step = toNumber(editorModel.editorParams.stepValue);
33
33
  }
34
+ if (editorModel.editorParams.stepvalue) {
35
+ step = toNumber(editorModel.editorParams.stepvalue);
36
+ }
34
37
  if (editorModel.editorParams.maxValue) {
35
38
  max = toNumber(editorModel.editorParams.maxValue);
36
39
  }
40
+ if (editorModel.editorParams.maxvalue) {
41
+ max = toNumber(editorModel.editorParams.maxvalue);
42
+ }
37
43
  if (editorModel.editorParams.minValue) {
38
44
  min = toNumber(editorModel.editorParams.minValue);
39
45
  }
46
+ if (editorModel.editorParams.minvalue) {
47
+ min = toNumber(editorModel.editorParams.minvalue);
48
+ }
40
49
  if (editorModel.editorParams.range) {
41
50
  range = c.toBoolean(editorModel.editorParams.range);
42
51
  }
@@ -46,9 +55,15 @@ const IBizSlider = /* @__PURE__ */ defineComponent({
46
55
  if (editorModel.editorParams.textItem) {
47
56
  textItem = editorModel.editorParams.textItem;
48
57
  }
58
+ if (editorModel.editorParams.textitem) {
59
+ textItem = editorModel.editorParams.textitem;
60
+ }
49
61
  if (editorModel.editorParams.showText) {
50
62
  showText = c.toBoolean(editorModel.editorParams.showText);
51
63
  }
64
+ if (editorModel.editorParams.showtext) {
65
+ showText = c.toBoolean(editorModel.editorParams.showtext);
66
+ }
52
67
  if (editorModel.editorParams.format) {
53
68
  format = editorModel.editorParams.format;
54
69
  }
@@ -139,6 +154,16 @@ const IBizSlider = /* @__PURE__ */ defineComponent({
139
154
  return createVNode("div", {
140
155
  "class": this.ns.b("button")
141
156
  }, [this.currentVal]);
157
+ },
158
+ "left-button": () => {
159
+ return createVNode("div", {
160
+ "class": this.ns.b("button")
161
+ }, [Array.isArray(this.currentVal) ? this.currentVal[0] : this.currentVal]);
162
+ },
163
+ "right-button": () => {
164
+ return createVNode("div", {
165
+ "class": this.ns.b("button")
166
+ }, [Array.isArray(this.currentVal) ? this.currentVal[1] : this.currentVal]);
142
167
  }
143
168
  });
144
169
  }
@@ -1 +1 @@
1
- .ibiz-signature{--ibiz-signature-min-height:120px;position:relative;width:100%;height:100%;min-height:var(--ibiz-signature-min-height);overflow:hidden;border:none;border-radius:var(--ibiz-border-radius-large)}.ibiz-signature__modal{position:absolute;z-index:6;display:flex;align-items:center;justify-content:center;width:100%;height:100%}.ibiz-signature__modal--background{width:100%;height:100%;background-color:var(--ibiz-color-black);opacity:.1}.ibiz-signature__modal--caption{position:absolute;color:var(--ibiz-color-text-2)}.ibiz-signature__modal--toolbar{position:absolute;top:var(--ibiz-spacing-tight);right:var(--ibiz-spacing-tight)}.ibiz-signature__modal--toolbar .van-button{width:var(--ibiz-spacing-loose);height:auto;height:var(--ibiz-spacing-loose);background-color:var(--van-uploader-delete-background);border:var(--van-uploader-delete-background);opacity:.6}.ibiz-signature__modal--toolbar .van-button+.van-button{margin-left:var(--ibiz-spacing-loose)}.ibiz-signature__content{width:100%;height:100%;background-repeat:no-repeat;background-position:center center;background-size:contain}.ibiz-signature__readonly .ibiz-signature__modal--toolbar{display:none}.ibiz-signature-overlay{--ibiz-signature-overlay-padding-bottom:0px;position:absolute;z-index:1;width:0;height:0;background-color:var(--ibiz-color-bg-1);opacity:0}.ibiz-signature-overlay.is-full-screen{position:fixed;inset:0;z-index:9999;width:100vw;height:100vh;opacity:1}.ibiz-signature-overlay.is-full-screen .ibiz-signature-overlay__container{position:absolute;top:0;left:0;width:calc(100vh - var(--ibiz-signature-overlay-padding-bottom));height:100vw;transform:rotate(90deg) translateY(-100%);transform-origin:top left}.ibiz-signature-overlay.is-full-screen .ibiz-signature-overlay__header{position:absolute;z-index:6;padding:var(--ibiz-spacing-extra-tight);text-align:left}.ibiz-signature-overlay.is-full-screen .ibiz-signature-overlay__footer{position:absolute;right:var(--ibiz-spacing-tight);bottom:var(--ibiz-spacing-base);z-index:6}.ibiz-signature-overlay.is-full-screen .ibiz-signature-overlay__footer .van-button{height:auto;padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-loose);font-size:var(--ibiz-font-size-header-6)}.ibiz-signature-overlay.is-full-screen .ibiz-signature-overlay__footer .van-button+.van-button{margin-left:var(--ibiz-spacing-loose)}.ibiz-signature-overlay.is-full-screen .ibiz-signature-overlay__pad{position:absolute;top:0;left:0;width:100vw;height:calc(100vh - var(--ibiz-signature-overlay-padding-bottom));transform:rotate(-90deg) translateX(-100%);transform-origin:top left}.ibiz-signature-overlay.is-readonly .ibiz-signature-overlay__footer,.ibiz-signature-overlay.is-readonly .ibiz-signature-overlay__header{display:none}.ibiz-signature-overlay.is-readonly .ibiz-signature-pad{pointer-events:none}.ibiz-signature-overlay.is-disabled .ibiz-signature-pad{pointer-events:none}
1
+ .ibiz-signature{--ibiz-signature-min-height:120px;position:relative;width:100%;height:100%;min-height:var(--ibiz-signature-min-height);overflow:hidden;border:none;border-radius:var(--ibiz-border-radius-large)}.ibiz-signature__modal{position:absolute;z-index:6;display:flex;align-items:center;justify-content:center;width:100%;height:100%}.ibiz-signature__modal--background{width:100%;height:100%;background-color:var(--ibiz-color-black);opacity:.1}.ibiz-signature__modal--caption{position:absolute;color:var(--ibiz-color-text-2)}.ibiz-signature__modal--toolbar{position:absolute;top:var(--ibiz-spacing-tight);right:var(--ibiz-spacing-tight)}.ibiz-signature__modal--toolbar .van-button{width:var(--ibiz-spacing-loose);height:auto;height:var(--ibiz-spacing-loose);background-color:var(--van-uploader-delete-background);border:var(--van-uploader-delete-background);opacity:.6}.ibiz-signature__modal--toolbar .van-button+.van-button{margin-left:var(--ibiz-spacing-loose)}.ibiz-signature__content{width:100%;height:100%;min-height:var(--ibiz-signature-min-height);background-repeat:no-repeat;background-position:center center;background-size:contain}.ibiz-signature__readonly .ibiz-signature__modal--toolbar{display:none}.ibiz-signature-overlay{--ibiz-signature-overlay-padding-bottom:0px;position:absolute;z-index:1;width:0;height:0;background-color:var(--ibiz-color-bg-1);opacity:0}.ibiz-signature-overlay.is-full-screen{position:fixed;inset:0;z-index:9999;width:100vw;height:100vh;opacity:1}.ibiz-signature-overlay.is-full-screen .ibiz-signature-overlay__container{position:absolute;top:0;left:0;width:calc(100vh - var(--ibiz-signature-overlay-padding-bottom));height:100vw;transform:rotate(90deg) translateY(-100%);transform-origin:top left}.ibiz-signature-overlay.is-full-screen .ibiz-signature-overlay__header{position:absolute;z-index:6;padding:var(--ibiz-spacing-extra-tight);text-align:left}.ibiz-signature-overlay.is-full-screen .ibiz-signature-overlay__footer{position:absolute;right:var(--ibiz-spacing-tight);bottom:var(--ibiz-spacing-base);z-index:6}.ibiz-signature-overlay.is-full-screen .ibiz-signature-overlay__footer .van-button{height:auto;padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-loose);font-size:var(--ibiz-font-size-header-6)}.ibiz-signature-overlay.is-full-screen .ibiz-signature-overlay__footer .van-button+.van-button{margin-left:var(--ibiz-spacing-loose)}.ibiz-signature-overlay.is-full-screen .ibiz-signature-overlay__pad{position:absolute;top:0;left:0;width:100vw;height:calc(100vh - var(--ibiz-signature-overlay-padding-bottom));transform:rotate(-90deg) translateX(-100%);transform-origin:top left}.ibiz-signature-overlay.is-readonly .ibiz-signature-overlay__footer,.ibiz-signature-overlay.is-readonly .ibiz-signature-overlay__header{display:none}.ibiz-signature-overlay.is-readonly .ibiz-signature-pad{pointer-events:none}.ibiz-signature-overlay.is-disabled .ibiz-signature-pad{pointer-events:none}
@@ -141,6 +141,8 @@ const IBizSignature = /* @__PURE__ */ defineComponent({
141
141
  return fileInfo;
142
142
  };
143
143
  const handleModalClick = () => {
144
+ if ((props.disabled || props.readonly) && !currentDataURL.value)
145
+ return;
144
146
  fullScreen.value = true;
145
147
  restCavans();
146
148
  };
@@ -12,10 +12,13 @@ const IBizImageSelect = /* @__PURE__ */ defineComponent({
12
12
  setup(props, {
13
13
  emit
14
14
  }) {
15
- var _a;
15
+ var _a, _b;
16
16
  const ns = useNamespace("image-select");
17
17
  const c = props.controller;
18
- const result = ((_a = c.editorParams) == null ? void 0 : _a.STOPPROPAGATION) !== "false";
18
+ let result = ((_a = c.editorParams) == null ? void 0 : _a.STOPPROPAGATION) !== "false";
19
+ if ((_b = c.editorParams) == null ? void 0 : _b.stoppropagation) {
20
+ result = c.editorParams.stoppropagation !== "false";
21
+ }
19
22
  const svg = ref("");
20
23
  const {
21
24
  files
@@ -12,10 +12,13 @@ const IBizImageUpload = /* @__PURE__ */ defineComponent({
12
12
  setup(props, {
13
13
  emit
14
14
  }) {
15
- var _a;
15
+ var _a, _b;
16
16
  const ns = useNamespace("image-upload");
17
17
  const c = props.controller;
18
- const result = ((_a = c.editorParams) == null ? void 0 : _a.STOPPROPAGATION) !== "false";
18
+ let result = ((_a = c.editorParams) == null ? void 0 : _a.STOPPROPAGATION) !== "false";
19
+ if ((_b = c.editorParams) == null ? void 0 : _b.stoppropagation) {
20
+ result = c.editorParams.stoppropagation !== "false";
21
+ }
19
22
  const {
20
23
  uploadUrl,
21
24
  headers,
@@ -144,7 +144,15 @@ class UploadEditorController extends EditorController {
144
144
  this.multiple = false;
145
145
  }
146
146
  if (this.editorParams) {
147
- const { isDrag, multiple, accept, uploadParams, exportParams } = this.editorParams;
147
+ const {
148
+ isDrag,
149
+ multiple,
150
+ accept,
151
+ uploadParams,
152
+ exportParams,
153
+ uploadparams,
154
+ exportparams
155
+ } = this.editorParams;
148
156
  if (isDrag) {
149
157
  this.isDrag = Boolean(isDrag);
150
158
  }
@@ -164,6 +172,16 @@ class UploadEditorController extends EditorController {
164
172
  );
165
173
  }
166
174
  }
175
+ if (uploadparams) {
176
+ try {
177
+ this.uploadParams = JSON.parse(uploadparams);
178
+ } catch (error) {
179
+ throw new RuntimeModelError(
180
+ uploadparams,
181
+ ibiz.i18n.t("editor.upload.uploadJsonFormatErr")
182
+ );
183
+ }
184
+ }
167
185
  if (exportParams) {
168
186
  try {
169
187
  this.exportParams = JSON.parse(exportParams);
@@ -174,6 +192,16 @@ class UploadEditorController extends EditorController {
174
192
  );
175
193
  }
176
194
  }
195
+ if (exportparams) {
196
+ try {
197
+ this.exportParams = JSON.parse(exportparams);
198
+ } catch (error) {
199
+ throw new RuntimeModelError(
200
+ exportparams,
201
+ ibiz.i18n.t("editor.upload.exportJsonFormatErr")
202
+ );
203
+ }
204
+ }
177
205
  }
178
206
  }
179
207
  /**
@@ -21,11 +21,18 @@ function useVanUpload(props, valueChange, c) {
21
21
  () => props.data,
22
22
  (newVal) => {
23
23
  if (newVal) {
24
+ const editorParams = { ...c.editorParams };
25
+ if (editorParams.uploadparams) {
26
+ editorParams.uploadParams = JSON.parse(editorParams.uploadparams);
27
+ }
28
+ if (editorParams.exportparams) {
29
+ editorParams.exportParams = JSON.parse(editorParams.exportparams);
30
+ }
24
31
  const urls = ibiz.util.file.calcFileUpDownUrl(
25
32
  c.context,
26
33
  c.params,
27
34
  newVal,
28
- c.editorParams
35
+ editorParams
29
36
  );
30
37
  uploadUrl.value = urls.uploadUrl;
31
38
  downloadUrl.value = urls.downloadUrl;
package/es/index.mjs CHANGED
@@ -7,6 +7,7 @@ export { IBizViewEngine } from './view-engine/index.mjs';
7
7
  import './util/index.mjs';
8
8
  export { i18n } from './locale/index.mjs';
9
9
  import './mob-app/index.mjs';
10
+ export { default as IBizVue3 } from './ibiz-vue3.mjs';
10
11
  export { IBizCol } from './common/col/col.mjs';
11
12
  export { IBizRow } from './common/row/row.mjs';
12
13
  export { IBizKeepAlive, MoveType, ShapeFlags, devtoolsComponentAdded, invokeArrayFns, invokeVNodeHook, isAsyncWrapper, isKeepAlive, queuePostRenderEffect, setTransitionHooks } from './common/keep-alive/keep-alive.mjs';
@@ -187,6 +187,9 @@ var index = {
187
187
  noSupportTreePicker: "Drop-down tree selection is not supported",
188
188
  confirm: "confirm"
189
189
  },
190
+ mapPicker: {
191
+ searchPlaceholder: "Please enter a keyword to select a location"
192
+ },
190
193
  markdown: {
191
194
  uploadJsonFormatErr: "The configuration of uploadparams did not follow the standard JSON format",
192
195
  exportJsonFormatErr: "The configuration of exportparams did not follow the standard JSON format",
@@ -172,6 +172,9 @@ var index = {
172
172
  noSupportTreePicker: "\u6682\u672A\u652F\u6301\u6811\u5F62\u4E0B\u62C9\u9009\u62E9",
173
173
  confirm: "\u786E\u5B9A"
174
174
  },
175
+ mapPicker: {
176
+ searchPlaceholder: "\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u9009\u62E9\u5730\u70B9"
177
+ },
175
178
  markdown: {
176
179
  uploadJsonFormatErr: "\u914D\u7F6Euploadparams\u6CA1\u6709\u6309\u6807\u51C6JSON\u683C\u5F0F",
177
180
  exportJsonFormatErr: "\u914D\u7F6Eexportparams\u6CA1\u6709\u6309\u6807\u51C6JSON\u683C\u5F0F",
@@ -58,12 +58,13 @@ class AppRouter {
58
58
  const beforeEnter = async (_to, _from, next) => {
59
59
  if (!isNilOrEmpty(ibiz.appData)) {
60
60
  next();
61
- }
62
- const authority = await AuthGuard(this.getAppContext(_to));
63
- if (authority) {
64
- next();
65
61
  } else {
66
- next(false);
62
+ const authority = await AuthGuard(this.getAppContext(_to));
63
+ if (authority) {
64
+ next();
65
+ } else {
66
+ next(false);
67
+ }
67
68
  }
68
69
  };
69
70
  const placeholder = ibiz.env.routePlaceholder;