@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.
- package/dist/ibiz-markdown-editor-0VHzFa2l.js +1 -0
- package/dist/{index-tjsobxd3.js → index-EYFbyMUF.js} +1 -1
- package/dist/index-LzKAcXeH.js +4 -0
- package/dist/{index-CsiyXR27.js → index-kNUznzXY.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{wang-editor-kUY8Nlib.js → wang-editor-Iw-hqw1q.js} +1 -1
- package/dist/{xlsx-util-s4akItw_.js → xlsx-util-FnTIZeKq.js} +1 -1
- package/es/common/grid-setting/grid-setting.d.ts +2 -37
- package/es/common/grid-setting/grid-setting.mjs +8 -4
- package/es/control/calendar/components/calendar-user/calendar-user.css +1 -1
- package/es/control/calendar/components/calendar-user/calendar-user.mjs +76 -2
- package/es/control/data-view/data-view.d.ts +1 -1
- package/es/control/data-view/index.d.ts +1 -1
- package/es/control/drtab/drtab-control.util.mjs +1 -1
- package/es/control/form/form/index.mjs +2 -0
- package/es/control/form/form-detail/form-iframe/form-iframe.css +1 -0
- package/es/control/form/form-detail/form-iframe/form-iframe.d.ts +29 -0
- package/es/control/form/form-detail/form-iframe/form-iframe.mjs +53 -0
- package/es/control/form/form-detail/form-iframe/form-iframe.provider.d.ts +13 -0
- package/es/control/form/form-detail/form-iframe/form-iframe.provider.mjs +21 -0
- package/es/control/form/form-detail/form-iframe/index.d.ts +25 -0
- package/es/control/form/form-detail/form-iframe/index.mjs +12 -0
- package/es/control/form/form-detail/form-item/form-item.css +1 -1
- package/es/control/form/form-detail/form-item/form-item.mjs +6 -4
- package/es/control/form/form-detail/index.d.ts +1 -0
- package/es/control/form/form-detail/index.mjs +1 -0
- package/es/control/form/index.mjs +1 -0
- package/es/control/gantt/gantt.d.ts +1 -1
- package/es/control/gantt/gantt.mjs +1 -0
- package/es/control/gantt/index.d.ts +1 -1
- package/es/control/grid/grid/grid.css +1 -1
- package/es/control/grid/grid/grid.d.ts +1 -1
- package/es/control/grid/grid/index.d.ts +1 -1
- package/es/control/grid/grid/index.mjs +2 -0
- package/es/control/grid/grid-column/grid-field-column/grid-field-column.d.ts +4 -4
- package/es/control/grid/grid-column/grid-field-column/grid-field-column.mjs +5 -8
- package/es/control/grid/virtualized-table/index.d.ts +136 -0
- package/es/control/grid/virtualized-table/index.mjs +18 -0
- package/es/control/grid/virtualized-table/virtualized-table.css +1 -0
- package/es/control/grid/virtualized-table/virtualized-table.d.ts +200 -0
- package/es/control/grid/virtualized-table/virtualized-table.mjs +325 -0
- package/es/control/grid/virtualized-table/virtualized-table.provider.d.ts +10 -0
- package/es/control/grid/virtualized-table/virtualized-table.provider.mjs +14 -0
- package/es/control/grid/virtualized-table/virtualized-table.util.d.ts +95 -0
- package/es/control/grid/virtualized-table/virtualized-table.util.mjs +191 -0
- package/es/control/index.mjs +1 -0
- package/es/control/kanban/index.d.ts +44 -1
- package/es/control/kanban/kanban.d.ts +56 -1
- package/es/control/kanban/kanban.mjs +36 -2
- package/es/control/list/index.d.ts +1 -1
- package/es/control/list/list.d.ts +1 -1
- package/es/control/list/list.mjs +1 -1
- package/es/control/search-bar/search-bar.mjs +3 -0
- package/es/control/toolbar/toolbar.mjs +7 -7
- package/es/control/tree/index.d.ts +1 -1
- package/es/control/tree/tree.d.ts +1 -1
- package/es/control/tree-grid/index.d.ts +1 -1
- package/es/control/tree-grid/tree-grid.d.ts +1 -1
- package/es/editor/array/ibiz-array/ibiz-array.css +1 -1
- package/es/editor/array/ibiz-array/ibiz-array.d.ts +1 -0
- package/es/editor/array/ibiz-array/ibiz-array.mjs +4 -1
- package/es/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.d.ts +1 -0
- package/es/editor/cascader/ibiz-cascader/ibiz-cascader.d.ts +1 -0
- package/es/editor/check-box/ibiz-checkbox/ibiz-checkbox.d.ts +1 -0
- package/es/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.d.ts +2 -1
- package/es/editor/code/monaco-editor/monaco-editor.d.ts +1 -0
- package/es/editor/color-picker/ibiz-color-picker/ibiz-color-picker.d.ts +1 -0
- package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.d.ts +1 -0
- package/es/editor/data-picker/ibiz-picker/ibiz-picker.d.ts +5 -0
- package/es/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.d.ts +1 -0
- package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.d.ts +1 -0
- package/es/editor/data-picker/ibiz-transfer-picker/components/transfer/transfer.d.ts +1 -1
- package/es/editor/data-picker/ibiz-transfer-picker/ibiz-transfer-picker.d.ts +3 -2
- package/es/editor/date-picker/ibiz-date-picker/ibiz-date-picker.d.ts +1 -0
- package/es/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.d.ts +2 -1
- package/es/editor/date-range-select/date-range-select-picker/date-range-select.d.ts +5 -5
- package/es/editor/date-range-select/date-range-select.controller.mjs +9 -0
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.d.ts +2 -0
- package/es/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.d.ts +1 -0
- package/es/editor/dropdown-list/ibiz-tree-picker/ibiz-tree-picker.d.ts +4 -3
- package/es/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.css +1 -1
- package/es/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.d.ts +10 -7
- package/es/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.mjs +5 -5
- package/es/editor/html/wang-editor/wang-editor.d.ts +1 -0
- package/es/editor/list-box/ibiz-list-box/ibiz-list-box.d.ts +1 -0
- package/es/editor/map-picker/ibiz-map-picker/ibiz-map-picker.d.ts +1 -0
- package/es/editor/map-picker/ibiz-map-picker/ibiz-map-picker.mjs +1 -1
- package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.d.ts +1 -0
- package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +1 -1
- package/es/editor/number-range/ibiz-number-range-picker/ibiz-number-range-picker.d.ts +1 -0
- package/es/editor/radio-button-list/ibiz-radio/ibiz-radio.d.ts +1 -0
- package/es/editor/rate/ibiz-rate/ibiz-rate.d.ts +3 -0
- package/es/editor/slider/ibiz-slider/ibiz-slider.d.ts +4 -3
- package/es/editor/span/span/span.d.ts +3 -1
- package/es/editor/stepper/ibiz-stepper/ibiz-stepper.d.ts +1 -0
- package/es/editor/switch/ibiz-switch/ibiz-switch.d.ts +1 -0
- package/es/editor/text-box/ibiz-input-ip/ibiz-input-ip.css +1 -1
- package/es/editor/text-box/ibiz-input-ip/ibiz-input-ip.d.ts +4 -77
- package/es/editor/text-box/ibiz-input-ip/ibiz-input-ip.mjs +167 -108
- package/es/editor/text-box/ibiz-input-number/ibiz-input-number.d.ts +1 -0
- package/es/editor/text-box/input/input.d.ts +7 -4
- package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.d.ts +1 -0
- package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.mjs +1 -1
- package/es/index.mjs +1 -0
- package/es/locale/en/index.d.ts +6 -0
- package/es/locale/en/index.mjs +6 -0
- package/es/locale/zh-CN/index.d.ts +6 -0
- package/es/locale/zh-CN/index.mjs +6 -0
- 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
- package/es/panel-component/panel-button/panel-button.controller.mjs +2 -1
- package/es/panel-component/panel-button/panel-button.mjs +1 -1
- package/es/panel-component/user-message/async-action/async-action/async-action.provider.mjs +14 -0
- package/es/panel-component/user-message/async-action/async-action-tab/async-action-tab.css +1 -1
- package/es/panel-component/user-message/async-action/async-data-export/async-data-export.css +1 -0
- package/es/panel-component/user-message/async-action/async-data-export/async-data-export.d.ts +34 -0
- package/es/panel-component/user-message/async-action/async-data-export/async-data-export.mjs +88 -0
- package/es/panel-component/user-message/index.d.ts +2 -32
- package/es/panel-component/user-message/index.mjs +21 -11
- package/es/util/app-util/app-util.d.ts +54 -2
- package/es/util/app-util/app-util.mjs +48 -1
- package/es/util/fullscreen/fullscreen-util.mjs +1 -1
- package/es/view-engine/md-custom-view.engine.d.ts +8 -2
- package/es/view-engine/md-custom-view.engine.mjs +14 -2
- package/lib/common/grid-setting/grid-setting.cjs +8 -4
- package/lib/control/calendar/components/calendar-user/calendar-user.cjs +76 -2
- package/lib/control/calendar/components/calendar-user/calendar-user.css +1 -1
- package/lib/control/drtab/drtab-control.util.cjs +1 -1
- package/lib/control/form/form/index.cjs +2 -0
- package/lib/control/form/form-detail/form-iframe/form-iframe.cjs +58 -0
- package/lib/control/form/form-detail/form-iframe/form-iframe.css +1 -0
- package/lib/control/form/form-detail/form-iframe/form-iframe.provider.cjs +23 -0
- package/lib/control/form/form-detail/form-iframe/index.cjs +17 -0
- package/lib/control/form/form-detail/form-item/form-item.cjs +5 -3
- package/lib/control/form/form-detail/form-item/form-item.css +1 -1
- package/lib/control/form/form-detail/index.cjs +2 -0
- package/lib/control/form/index.cjs +6 -4
- package/lib/control/gantt/gantt.cjs +1 -0
- package/lib/control/grid/grid/grid.css +1 -1
- package/lib/control/grid/grid/index.cjs +2 -0
- package/lib/control/grid/grid-column/grid-field-column/grid-field-column.cjs +3 -6
- package/lib/control/grid/virtualized-table/index.cjs +23 -0
- package/lib/control/grid/virtualized-table/virtualized-table.cjs +327 -0
- package/lib/control/grid/virtualized-table/virtualized-table.css +1 -0
- package/lib/control/grid/virtualized-table/virtualized-table.provider.cjs +16 -0
- package/lib/control/grid/virtualized-table/virtualized-table.util.cjs +193 -0
- package/lib/control/index.cjs +82 -80
- package/lib/control/kanban/kanban.cjs +34 -0
- package/lib/control/list/list.cjs +1 -1
- package/lib/control/search-bar/search-bar.cjs +3 -0
- package/lib/control/toolbar/toolbar.cjs +7 -7
- package/lib/editor/array/ibiz-array/ibiz-array.cjs +4 -1
- package/lib/editor/array/ibiz-array/ibiz-array.css +1 -1
- package/lib/editor/date-range-select/date-range-select.controller.cjs +9 -0
- package/lib/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.cjs +5 -5
- package/lib/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.css +1 -1
- package/lib/editor/map-picker/ibiz-map-picker/ibiz-map-picker.cjs +1 -1
- package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +1 -1
- package/lib/editor/text-box/ibiz-input-ip/ibiz-input-ip.cjs +166 -107
- package/lib/editor/text-box/ibiz-input-ip/ibiz-input-ip.css +1 -1
- package/lib/editor/upload/ibiz-file-upload/ibiz-file-upload.cjs +1 -1
- package/lib/index.cjs +112 -110
- package/lib/locale/en/index.cjs +6 -0
- package/lib/locale/zh-CN/index.cjs +6 -0
- 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
- package/lib/panel-component/panel-button/panel-button.cjs +1 -1
- package/lib/panel-component/panel-button/panel-button.controller.cjs +2 -1
- package/lib/panel-component/user-message/async-action/async-action/async-action.provider.cjs +14 -0
- package/lib/panel-component/user-message/async-action/async-action-tab/async-action-tab.css +1 -1
- package/lib/panel-component/user-message/async-action/async-data-export/async-data-export.cjs +90 -0
- package/lib/panel-component/user-message/async-action/async-data-export/async-data-export.css +1 -0
- package/lib/panel-component/user-message/index.cjs +21 -11
- package/lib/util/app-util/app-util.cjs +47 -0
- package/lib/util/fullscreen/fullscreen-util.cjs +1 -1
- package/lib/view-engine/md-custom-view.engine.cjs +14 -2
- package/package.json +11 -6
- package/dist/ibiz-markdown-editor-KyK5mBTS.js +0 -1
- package/dist/index-F_Yq1N9t.js +0 -4
- package/es/node_modules/.pnpm/@amap_amap-jsapi-loader@1.0.1/node_modules/@amap/amap-jsapi-loader/dist/index.mjs +0 -23
- package/lib/node_modules/.pnpm/@amap_amap-jsapi-loader@1.0.1/node_modules/@amap/amap-jsapi-loader/dist/index.cjs +0 -27
- /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
- /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
|
@@ -7,6 +7,12 @@ var vue3Util = require('@ibiz-template/vue3-util');
|
|
|
7
7
|
var aiUtil = require('../ai-util/ai-util.cjs');
|
|
8
8
|
|
|
9
9
|
"use strict";
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __publicField = (obj, key, value) => {
|
|
13
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
14
|
+
return value;
|
|
15
|
+
};
|
|
10
16
|
class AppUtil {
|
|
11
17
|
/**
|
|
12
18
|
* Creates an instance of AppUtil.
|
|
@@ -16,6 +22,12 @@ class AppUtil {
|
|
|
16
22
|
*/
|
|
17
23
|
constructor(router) {
|
|
18
24
|
this.router = router;
|
|
25
|
+
/**
|
|
26
|
+
* @description 视图缓存中心
|
|
27
|
+
* @type {Map<string, IApiViewController>}
|
|
28
|
+
* @memberof AppUtil
|
|
29
|
+
*/
|
|
30
|
+
__publicField(this, "viewCacheCenter", /* @__PURE__ */ new Map());
|
|
19
31
|
}
|
|
20
32
|
/**
|
|
21
33
|
* @description 路由是否初始化构建完成
|
|
@@ -443,6 +455,41 @@ class AppUtil {
|
|
|
443
455
|
});
|
|
444
456
|
});
|
|
445
457
|
}
|
|
458
|
+
/**
|
|
459
|
+
* @description 当前路由转换成路由路径对象
|
|
460
|
+
* @param {boolean} [isRouteModal]
|
|
461
|
+
* @returns {*} {{
|
|
462
|
+
* appContext?: IParams;
|
|
463
|
+
* pathNodes: {
|
|
464
|
+
* viewName: string;
|
|
465
|
+
* context?: IParams;
|
|
466
|
+
* params?: IParams;
|
|
467
|
+
* srfnav?: string;
|
|
468
|
+
* }[];
|
|
469
|
+
* }}
|
|
470
|
+
* @memberof AppUtil
|
|
471
|
+
*/
|
|
472
|
+
route2routeObject(isRouteModal) {
|
|
473
|
+
const routePath = vue3Util.route2routePath(this.router.currentRoute.value);
|
|
474
|
+
return routePath;
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* @description 路由路径对象转化为路由路径
|
|
478
|
+
* @param {{
|
|
479
|
+
* appContext?: IParams;
|
|
480
|
+
* pathNodes: {
|
|
481
|
+
* viewName: string;
|
|
482
|
+
* context?: IParams;
|
|
483
|
+
* params?: IParams;
|
|
484
|
+
* srfnav?: string;
|
|
485
|
+
* }[];
|
|
486
|
+
* }} routePath
|
|
487
|
+
* @returns {*} {string}
|
|
488
|
+
* @memberof AppUtil
|
|
489
|
+
*/
|
|
490
|
+
routeObject2String(routePath) {
|
|
491
|
+
return vue3Util.routePath2string(routePath);
|
|
492
|
+
}
|
|
446
493
|
}
|
|
447
494
|
|
|
448
495
|
exports.AppUtil = AppUtil;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var vue = require('vue');
|
|
4
4
|
var ElementPlus = require('element-plus');
|
|
5
|
-
var namespace = require('../../node_modules/.pnpm/@ibiz-template_core@0.7.41-alpha.
|
|
5
|
+
var namespace = require('../../node_modules/.pnpm/@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');
|
|
6
6
|
var fullscreenToolbar = require('../../common/fullscreen-toolbar/fullscreen-toolbar.cjs');
|
|
7
7
|
|
|
8
8
|
"use strict";
|
|
@@ -96,9 +96,8 @@ class MDCustomViewEngine extends runtime.ViewEngineBase {
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
async call(key, args) {
|
|
99
|
-
var _a;
|
|
100
99
|
if (key === runtime.SysUIActionTag.REFRESH) {
|
|
101
|
-
await
|
|
100
|
+
await this.refresh();
|
|
102
101
|
return null;
|
|
103
102
|
}
|
|
104
103
|
if (key === runtime.SysUIActionTag.EDIT || key === runtime.SysUIActionTag.VIEW) {
|
|
@@ -109,6 +108,19 @@ class MDCustomViewEngine extends runtime.ViewEngineBase {
|
|
|
109
108
|
}
|
|
110
109
|
return super.call(key, args);
|
|
111
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* @description 刷新数据
|
|
113
|
+
* @returns {*} {Promise<void>}
|
|
114
|
+
* @memberof MDCustomViewEngine
|
|
115
|
+
*/
|
|
116
|
+
async refresh() {
|
|
117
|
+
if (this.view.state.xdatacontrolname) {
|
|
118
|
+
const xDataCtrl = this.view.getController(
|
|
119
|
+
this.view.state.xdatacontrolname
|
|
120
|
+
);
|
|
121
|
+
await (xDataCtrl == null ? void 0 : xDataCtrl.refresh());
|
|
122
|
+
}
|
|
123
|
+
}
|
|
112
124
|
/**
|
|
113
125
|
* @description 打开编辑数据视图
|
|
114
126
|
* @protected
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/vue3-components",
|
|
3
|
-
"version": "0.7.41-alpha.
|
|
3
|
+
"version": "0.7.41-alpha.13",
|
|
4
4
|
"description": "web端组件库(vue3)",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -31,15 +31,15 @@
|
|
|
31
31
|
"@amap/amap-jsapi-loader": "^1.0.1",
|
|
32
32
|
"@floating-ui/dom": "^1.5.3",
|
|
33
33
|
"@ibiz-template-plugin/ai-chat": "^0.0.28",
|
|
34
|
-
"@ibiz-template-plugin/gantt": "0.1.8-alpha.
|
|
34
|
+
"@ibiz-template-plugin/gantt": "0.1.8-alpha.270",
|
|
35
35
|
"@ibiz-template-plugin/bi-report": "0.0.26",
|
|
36
36
|
"@ibiz-template-plugin/data-view": "0.0.4",
|
|
37
|
-
"@ibiz-template/core": "0.7.41-alpha.
|
|
37
|
+
"@ibiz-template/core": "0.7.41-alpha.12",
|
|
38
38
|
"@ibiz-template/devtool": "0.0.11",
|
|
39
|
-
"@ibiz-template/model-helper": "0.7.41-alpha.
|
|
40
|
-
"@ibiz-template/runtime": "0.7.41-alpha.
|
|
39
|
+
"@ibiz-template/model-helper": "0.7.41-alpha.13",
|
|
40
|
+
"@ibiz-template/runtime": "0.7.41-alpha.13",
|
|
41
41
|
"@ibiz-template/theme": "0.7.39",
|
|
42
|
-
"@ibiz-template/vue3-util": "0.7.41-alpha.
|
|
42
|
+
"@ibiz-template/vue3-util": "0.7.41-alpha.13",
|
|
43
43
|
"@ibiz-template/web-theme": "3.5.0",
|
|
44
44
|
"@ibiz/model-core": "^0.1.79",
|
|
45
45
|
"@imengyu/vue3-context-menu": "^1.3.5",
|
|
@@ -130,5 +130,10 @@
|
|
|
130
130
|
"lint-staged": {
|
|
131
131
|
"*.ts": "eslint --fix",
|
|
132
132
|
"*.scss": "stylelint --custom-syntax=postcss-scss"
|
|
133
|
+
},
|
|
134
|
+
"pnpm": {
|
|
135
|
+
"patchedDependencies": {
|
|
136
|
+
"@amap/amap-jsapi-loader@1.0.1": "patches/@amap__amap-jsapi-loader@1.0.1.patch"
|
|
137
|
+
}
|
|
133
138
|
}
|
|
134
139
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["vue","@ibiz-template/vue3-util","qx-util","cherry-markdown"],(function(e){"use strict";var t,l,n,o,i,r,a,s,c,d,u,h,m,v;return{setters:[function(e){t=e.defineComponent,l=e.ref,n=e.watch,o=e.onMounted,i=e.onBeforeUnmount,r=e.onUnmounted,a=e.createVNode,s=e.nextTick},function(e){c=e.getMarkDownProps,d=e.getEditorEmits,u=e.useNamespace,h=e.useUIStore},function(e){m=e.createUUID},function(e){v=e.default}],execute:function(){e("default",t({name:"IBizMarkDown",props:c(),emits:d(),setup(e,{emit:t}){var a,c;const d=u("markdown"),b=e.controller,f=l("");let p=null;const g=m(),w=ibiz.util.file.getUploadHeaders(),y=l({...w}),k=l(""),C=l(""),x=(null==(a=null==b?void 0:b.editorParams)?void 0:a.customTheme)||(null==(c=null==b?void 0:b.editorParams)?void 0:c.customtheme),{UIStore:U}=h(),z=l(x||U.theme),E=l("editOnly");let B=null,T=0;const D=l({});let M=!1;n((()=>e.data),(e=>{if(e&&b){const t=ibiz.util.file.calcFileUpDownUrl(b.context,b.params,e,b.editorParams);k.value=t.uploadUrl,C.value=t.downloadUrl}}),{immediate:!0,deep:!0});const P=l(),S=async(e,t)=>{const l=await ibiz.util.file.fileUpload(k.value,e,y.value);t(C.value.replace("%fileId%",l.fileid))},I=()=>null==p?void 0:p.getMarkdown(),N=e=>{M=!0,null==p||p.setMarkdown(e,!1)};n((()=>e.value),((e,t)=>{e!==t&&(f.value=e||"")}),{immediate:!0}),n(f,((e,t)=>{const l=I();e!==t&&l!==e&&N(e)}));const O=e=>{t("change",I(),null==b?void 0:b.model.id,M),M=!1},V=(e,t)=>({[e]:t}),q=(e,t="")=>{const l=document.createElement(e);return l.className=t,l},R=e=>q("i","ch-icon ch-icon-".concat(e)),j=d.e("fullscreen"),H=e=>{for(;e.firstChild;)e.removeChild(e.firstChild)},L=()=>{if(p&&P.value){const e=p.editor.options.editorDom.parentElement;if(!e)return{};const t=e.classList,l=P.value.querySelector(".".concat(j));return l?{parentElement:e,cherryClass:t,fullscreenNode:l}:{}}return{}},A=()=>{const{parentElement:e,cherryClass:t,fullscreenNode:l}=L();e&&t&&l&&(H(l),l.appendChild(R("fullscreen")),l.title=ibiz.i18n.t("editor.common.fullscreen"),t.remove("fullscreen"),null==e||e.blur(),e.setAttribute("tabindex","-1"))},W=()=>{const{cherryClass:e}=L();return null==e?void 0:e.contains("fullscreen")},F=()=>{p&&P.value&&(W()?A():(()=>{const{parentElement:e,cherryClass:t,fullscreenNode:l}=L();e&&t&&l&&(H(l),l.appendChild(R("minscreen")),t.add("fullscreen"),l.title=ibiz.i18n.t("editor.common.minimize"),e.setAttribute("tabindex","-1"),s((()=>null==e?void 0:e.focus())))})())},G=e=>{e.stopPropagation(),"Escape"===e.key&&W()&&A()};n((()=>U.theme),(e=>{z.value=x||e,null==p||p.setTheme(z.value),null==p||p.setCodeBlockTheme(z.value)}));return o((()=>{var t;e.disabled&&(E.value="previewOnly"),s((()=>{var t;p=new v({id:g,value:f.value,previewer:{enablePreviewerBubble:!(e.disabled||e.readonly)},themeSettings:{mainTheme:z.value,codeBlockTheme:z.value},fileUpload:S,emoji:{useUnicode:!0},header:{anchorStyle:"autonumber"},editor:{height:"100%",defaultModel:E.value,codemirror:{autofocus:!1}},toolbars:{toolbar:["bold","italic","underline","strikethrough","|","color","header","|","list","image",{insert:["link","hr","br","code","formula","toc","table","line-table","bar-table"]},"settings","togglePreview"],bubble:["bold","italic","underline","strikethrough","sub","sup","|","size","color"],float:["h1","h2","h3","|","checklist","quote","quickTable","code"],customMenu:[],sidebar:[]},callback:{afterChange:O,beforeImageMounted:V},engine:{syntax:{table:{enableChart:!1,externals:["echarts"]}}}}),p.setTheme(z.value),x&&(p.setTheme(x),p.setCodeBlockTheme(x));const l=q("span","".concat(j," cherry-toolbar-button"));l.title=ibiz.i18n.t("editor.common.fullscreen"),l.onclick=F,l.appendChild(R("fullscreen"));const n=e.disabled?p.editor.options.editorDom.parentElement:null==(t=p.editor.options.editorDom.parentElement)?void 0:t.querySelector(".cherry-toolbar>.toolbar-right");null==n||n.appendChild(l)})),(()=>{if(window.ResizeObserver&&P.value){const e={width:P.value.offsetWidth?"".concat(P.value.offsetWidth,"px"):"100%"};b&&"number"==typeof b.parent.model.height&&Object.assign(e,{height:"".concat(b.parent.model.height,"px")}),D.value=d.cssVarBlock(e),B=new ResizeObserver((e=>{const t=e[0].contentRect.width;if(t!==T){const l={width:"".concat(e[0].contentRect.width,"px")};b&&"number"==typeof b.parent.model.height&&Object.assign(l,{height:"".concat(b.parent.model.height,"px")}),D.value=d.cssVarBlock(l),T=t}})),B.observe(P.value)}})(),null==(t=P.value)||t.addEventListener("keydown",G.bind(this))})),i((()=>{var e;null==(e=P.value)||e.removeEventListener("keydown",G.bind(this))})),r((()=>{p=null,B&&B.disconnect()})),{ns:d,currentVal:f,id:g,editor:p,markDownBox:P,headers:y,theme:z,defaultModel:E,cssVars:D,getCherryHtml:()=>null==p?void 0:p.getHtml(),getCherryContent:I,setCherryContent:N}},render(){return a("div",{ref:"markDownBox",class:[this.ns.b(),this.ns.is("disabled",this.disabled)]},[a("div",{id:this.id,style:this.cssVars,class:this.ns.b("cherry")},null)])}}))}}}));
|