@ibiz-template/vue3-components 0.7.41-alpha.16 → 0.7.41-alpha.18
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/chart-q7pMKjYo.js +1 -0
- package/dist/ibiz-markdown-editor-e33m6ees.js +1 -0
- package/dist/{index-U4v1OOOD.js → index-AOFxMmyX.js} +1 -1
- package/dist/index-dXwgWAM8.js +11 -0
- package/dist/{index-lFGFvnYE.js → index-swminiXb.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/map-chart-user-NYROZ-6g.js +1 -0
- package/dist/wang-editor-4OlaBV3P.js +1 -0
- package/dist/{xlsx-util-FNiwKrqm.js → xlsx-util-Rg-AbK_G.js} +1 -1
- package/es/common/control-navigation/provider/calendar-navigation.provider.mjs +3 -1
- package/es/common/control-navigation/provider/index.mjs +1 -1
- package/es/common/control-navigation/provider/map-navigation.provider.d.ts +8 -2
- package/es/common/control-navigation/provider/map-navigation.provider.mjs +20 -1
- package/es/common/map-chart-user/map-chart-user.css +1 -1
- package/es/common/map-chart-user/map-chart-user.d.ts +11 -1
- package/es/common/map-chart-user/map-chart-user.mjs +82 -6
- package/es/common/map-chart-user/map-chart-user.util.d.ts +2 -0
- package/es/common/map-chart-user/map-chart-user.util.mjs +54 -3
- package/es/common/map-chart-user/map-user-manager.d.ts +2 -0
- package/es/common/map-chart-user/map-user-manager.mjs +46 -10
- package/es/control/calendar/components/calendar-daily/calendar-daily.css +1 -1
- package/es/control/calendar/components/calendar-daily/calendar-daily.mjs +30 -43
- package/es/control/calendar/components/calendar-daily/use-calendar-daily.d.ts +6 -2
- package/es/control/calendar/components/calendar-daily/use-calendar-daily.mjs +37 -4
- package/es/control/calendar/components/calendar-user/calendar-user.css +1 -1
- package/es/control/calendar/components/calendar-user/calendar-user.mjs +1 -0
- package/es/control/calendar/components/calendar-week/calendar-week.css +1 -1
- package/es/control/calendar/components/calendar-week/calendar-week.mjs +30 -45
- package/es/control/calendar/components/calendar-week/use-calendar-week.d.ts +6 -2
- package/es/control/calendar/components/calendar-week/use-calendar-week.mjs +37 -4
- package/es/control/calendar/components/custom-calendar/custom-calendar.css +1 -1
- package/es/control/calendar/components/custom-calendar/custom-calendar.mjs +25 -8
- package/es/control/calendar/components/custom-calendar/use-custom-calendar.d.ts +8 -0
- package/es/control/calendar/components/custom-calendar/use-custom-calendar.mjs +20 -1
- package/es/control/calendar/components/util/index.mjs +1 -1
- package/es/control/calendar/components/util/util.d.ts +30 -2
- package/es/control/calendar/components/util/util.mjs +32 -2
- package/es/control/chart/chart.mjs +1 -0
- package/es/control/data-view/data-view.css +1 -1
- package/es/control/data-view/data-view.d.ts +1 -1
- package/es/control/data-view/data-view.mjs +95 -29
- package/es/control/data-view/index.d.ts +1 -1
- package/es/control/drbar/drbar.css +1 -1
- package/es/control/drtab/drtab-control.util.mjs +1 -1
- package/es/control/drtab/drtab.controller.d.ts +29 -0
- package/es/control/drtab/drtab.controller.mjs +53 -0
- package/es/control/drtab/drtab.css +1 -1
- package/es/control/drtab/drtab.d.ts +2 -0
- package/es/control/drtab/drtab.mjs +5 -2
- package/es/control/drtab/flow-drtab.css +1 -1
- package/es/control/drtab/flow-drtab.d.ts +17 -2
- package/es/control/drtab/flow-drtab.mjs +194 -11
- package/es/control/drtab/index.d.ts +2 -0
- package/es/control/exp-bar/render-util.mjs +1 -12
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.css +1 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.mjs +59 -4
- package/es/control/form/form-detail/form-mdctrl/mdctrl-container/mdctrl-container.css +1 -1
- package/es/control/form/form-detail/form-mdctrl/mdctrl-container/mdctrl-container.mjs +11 -11
- package/es/control/form/form-detail/form-tab-panel/form-tab-panel.css +1 -1
- package/es/control/form/form-detail/form-tab-panel/form-tab-panel.mjs +2 -1
- package/es/control/gantt/gantt.css +1 -1
- package/es/control/gantt/gantt.d.ts +4 -2
- package/es/control/gantt/gantt.mjs +131 -5
- package/es/control/gantt/index.d.ts +4 -2
- package/es/control/grid/grid/grid-control.util.mjs +36 -14
- package/es/control/grid/grid/grid.css +1 -1
- package/es/control/grid/grid/grid.d.ts +1 -1
- package/es/control/grid/grid/grid.mjs +8 -3
- package/es/control/grid/grid/index.d.ts +1 -1
- package/es/control/grid/grid-column/grid-field-column/attachment-column/attachment-column.mjs +11 -2
- package/es/control/grid/grid-column/grid-field-column/attachment-column/file-util.d.ts +1 -1
- package/es/control/grid/grid-column/grid-field-column/attachment-column/file-util.mjs +39 -24
- package/es/control/grid/grid-column/grid-field-column/grid-field-column.css +1 -1
- package/es/control/grid/virtualized-table/index.d.ts +1 -1
- package/es/control/grid/virtualized-table/virtualized-table.d.ts +1 -1
- package/es/control/kanban/index.d.ts +5 -2
- package/es/control/kanban/kanban.css +1 -1
- package/es/control/kanban/kanban.d.ts +5 -2
- package/es/control/kanban/kanban.mjs +51 -15
- package/es/control/kanban/swimlane-kanban/swimlane-kanban.css +1 -1
- package/es/control/kanban/swimlane-kanban/swimlane-kanban.d.ts +2 -1
- package/es/control/kanban/swimlane-kanban/swimlane-kanban.mjs +52 -6
- package/es/control/list/index.d.ts +1 -1
- package/es/control/list/list.css +1 -1
- package/es/control/list/list.d.ts +2 -2
- package/es/control/list/list.mjs +84 -12
- package/es/control/map/map.mjs +1 -1
- package/es/control/medit-view-panel/medit-view-panel.css +1 -1
- package/es/control/medit-view-panel/medit-view-panel.mjs +37 -30
- package/es/control/tree/index.d.ts +1 -1
- package/es/control/tree/tree.d.ts +5 -5
- package/es/control/tree/tree.mjs +5 -13
- package/es/control/tree-grid/index.d.ts +7 -1
- package/es/control/tree-grid/tree-grid.d.ts +7 -1
- package/es/control/tree-grid/tree-grid.mjs +62 -55
- package/es/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-edit-column/all-edit.mjs +3 -1
- package/es/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.css +1 -1
- package/es/control/tree-grid-ex/tree-grid-ex.css +1 -1
- package/es/control/tree-grid-ex/tree-grid-ex.mjs +32 -28
- package/es/editor/carousel/ibiz-carousel/ibiz-carousel.d.ts +2 -75
- package/es/editor/carousel/ibiz-carousel/ibiz-carousel.mjs +24 -12
- package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.d.ts +1 -1
- package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.mjs +47 -8
- package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +17 -1
- package/es/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.mjs +4 -2
- package/es/editor/html/wang-editor/wang-editor.mjs +29 -7
- package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +36 -5
- package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.d.ts +1 -0
- package/es/editor/upload/ibiz-image-cropping/ibiz-image-cropping.d.ts +1 -0
- package/es/editor/upload/ibiz-image-upload/ibiz-image-upload.d.ts +1 -0
- package/es/editor/upload/upload-editor.controller.d.ts +25 -0
- package/es/editor/upload/upload-editor.controller.mjs +43 -1
- package/es/editor/upload/use/use-iview-upload.d.ts +0 -1
- package/es/editor/upload/use/use-iview-upload.mjs +59 -27
- package/es/locale/en/index.d.ts +14 -5
- package/es/locale/en/index.mjs +5 -2
- package/es/locale/zh-CN/index.d.ts +14 -5
- package/es/locale/zh-CN/index.mjs +5 -2
- package/es/node_modules/.pnpm/sortablejs@1.15.6/node_modules/sortablejs/modular/sortable.esm.mjs +3377 -0
- package/es/panel-component/app-extend-menu/bottom-side-menu/bottom-side-menu.d.ts +1 -1
- package/es/panel-component/app-extend-menu/left-side-menu/left-side-menu.d.ts +1 -1
- package/es/panel-component/app-extend-menu/right-side-menu/right-side-menu.d.ts +1 -1
- package/es/panel-component/app-extend-menu/top-side-menu/top-side-menu.d.ts +1 -1
- package/es/panel-component/nav-breadcrumb/index.d.ts +1 -0
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.controller.d.ts +8 -1
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.controller.mjs +64 -18
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.css +1 -1
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.d.ts +3 -1
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.mjs +14 -3
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.service.d.ts +1 -1
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.service.mjs +5 -6
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.state.d.ts +8 -0
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.state.mjs +6 -0
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.util.d.ts +26 -1
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.util.mjs +50 -6
- package/es/panel-component/panel-button/panel-button.mjs +1 -0
- package/es/panel-component/user-message/async-action/async-data-export/async-data-export.d.ts +1 -0
- package/es/panel-component/user-message/async-action/async-data-export/async-data-export.mjs +3 -1
- package/es/util/fullscreen/fullscreen-util.mjs +1 -1
- package/es/view-engine/calendar-exp-view.engine.d.ts +6 -7
- package/es/view-engine/calendar-exp-view.engine.mjs +6 -24
- package/es/view-engine/calendar-view.engine.d.ts +11 -1
- package/es/view-engine/calendar-view.engine.mjs +10 -0
- package/es/view-engine/chart-exp-view.engine.d.ts +6 -6
- package/es/view-engine/chart-exp-view.engine.mjs +6 -15
- package/es/view-engine/edit-view.engine.d.ts +11 -0
- package/es/view-engine/edit-view.engine.mjs +12 -0
- package/es/view-engine/gantt-view.engine.d.ts +3 -3
- package/es/view-engine/gantt-view.engine.mjs +3 -46
- package/es/view-engine/login-view.engine.d.ts +11 -1
- package/es/view-engine/login-view.engine.mjs +16 -5
- package/es/view-engine/mpickup-view-engine.d.ts +8 -1
- package/es/view-engine/mpickup-view-engine.mjs +14 -8
- package/es/view-engine/pickup-view.engine.d.ts +8 -1
- package/es/view-engine/pickup-view.engine.mjs +15 -0
- package/es/view-engine/tab-exp-view.engine.mjs +1 -1
- package/es/view-engine/tab-search-view.engine.mjs +4 -2
- package/es/view-engine/tree-view.engine.d.ts +12 -2
- package/es/view-engine/tree-view.engine.mjs +39 -11
- package/lib/common/control-navigation/provider/calendar-navigation.provider.cjs +3 -1
- package/lib/common/control-navigation/provider/index.cjs +1 -1
- package/lib/common/control-navigation/provider/map-navigation.provider.cjs +20 -1
- package/lib/common/map-chart-user/map-chart-user.cjs +81 -5
- package/lib/common/map-chart-user/map-chart-user.css +1 -1
- package/lib/common/map-chart-user/map-chart-user.util.cjs +54 -3
- package/lib/common/map-chart-user/map-user-manager.cjs +46 -10
- package/lib/control/calendar/components/calendar-daily/calendar-daily.cjs +29 -42
- package/lib/control/calendar/components/calendar-daily/calendar-daily.css +1 -1
- package/lib/control/calendar/components/calendar-daily/use-calendar-daily.cjs +35 -2
- package/lib/control/calendar/components/calendar-user/calendar-user.cjs +1 -0
- package/lib/control/calendar/components/calendar-user/calendar-user.css +1 -1
- package/lib/control/calendar/components/calendar-week/calendar-week.cjs +29 -44
- package/lib/control/calendar/components/calendar-week/calendar-week.css +1 -1
- package/lib/control/calendar/components/calendar-week/use-calendar-week.cjs +35 -2
- package/lib/control/calendar/components/custom-calendar/custom-calendar.cjs +23 -6
- package/lib/control/calendar/components/custom-calendar/custom-calendar.css +1 -1
- package/lib/control/calendar/components/custom-calendar/use-custom-calendar.cjs +20 -0
- package/lib/control/calendar/components/util/index.cjs +4 -0
- package/lib/control/calendar/components/util/util.cjs +34 -0
- package/lib/control/chart/chart.cjs +1 -0
- package/lib/control/data-view/data-view.cjs +95 -29
- package/lib/control/data-view/data-view.css +1 -1
- package/lib/control/drbar/drbar.css +1 -1
- package/lib/control/drtab/drtab-control.util.cjs +1 -1
- package/lib/control/drtab/drtab.cjs +5 -2
- package/lib/control/drtab/drtab.controller.cjs +53 -0
- package/lib/control/drtab/drtab.css +1 -1
- package/lib/control/drtab/flow-drtab.cjs +193 -10
- package/lib/control/drtab/flow-drtab.css +1 -1
- package/lib/control/exp-bar/render-util.cjs +1 -12
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.cjs +58 -3
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.css +1 -1
- package/lib/control/form/form-detail/form-mdctrl/mdctrl-container/mdctrl-container.cjs +11 -11
- package/lib/control/form/form-detail/form-mdctrl/mdctrl-container/mdctrl-container.css +1 -1
- package/lib/control/form/form-detail/form-tab-panel/form-tab-panel.cjs +2 -1
- package/lib/control/form/form-detail/form-tab-panel/form-tab-panel.css +1 -1
- package/lib/control/gantt/gantt.cjs +130 -4
- package/lib/control/gantt/gantt.css +1 -1
- package/lib/control/grid/grid/grid-control.util.cjs +36 -14
- package/lib/control/grid/grid/grid.cjs +8 -3
- package/lib/control/grid/grid/grid.css +1 -1
- package/lib/control/grid/grid-column/grid-field-column/attachment-column/attachment-column.cjs +11 -2
- package/lib/control/grid/grid-column/grid-field-column/attachment-column/file-util.cjs +39 -24
- package/lib/control/grid/grid-column/grid-field-column/grid-field-column.css +1 -1
- package/lib/control/kanban/kanban.cjs +50 -14
- package/lib/control/kanban/kanban.css +1 -1
- package/lib/control/kanban/swimlane-kanban/swimlane-kanban.cjs +50 -4
- package/lib/control/kanban/swimlane-kanban/swimlane-kanban.css +1 -1
- package/lib/control/list/list.cjs +84 -12
- package/lib/control/list/list.css +1 -1
- package/lib/control/map/map.cjs +1 -1
- package/lib/control/medit-view-panel/medit-view-panel.cjs +36 -29
- package/lib/control/medit-view-panel/medit-view-panel.css +1 -1
- package/lib/control/tree/tree.cjs +5 -13
- package/lib/control/tree-grid/tree-grid.cjs +62 -55
- package/lib/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-edit-column/all-edit.cjs +3 -1
- package/lib/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.css +1 -1
- package/lib/control/tree-grid-ex/tree-grid-ex.cjs +32 -28
- package/lib/control/tree-grid-ex/tree-grid-ex.css +1 -1
- package/lib/editor/carousel/ibiz-carousel/ibiz-carousel.cjs +24 -12
- package/lib/editor/data-picker/ibiz-mpicker/ibiz-mpicker.cjs +47 -8
- package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +17 -1
- package/lib/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.cjs +4 -2
- package/lib/editor/html/wang-editor/wang-editor.cjs +29 -7
- package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +36 -5
- package/lib/editor/upload/upload-editor.controller.cjs +43 -1
- package/lib/editor/upload/use/use-iview-upload.cjs +59 -27
- package/lib/locale/en/index.cjs +5 -2
- package/lib/locale/zh-CN/index.cjs +5 -2
- package/lib/node_modules/.pnpm/sortablejs@1.15.6/node_modules/sortablejs/modular/sortable.esm.cjs +3384 -0
- package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.cjs +14 -3
- package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.controller.cjs +63 -17
- package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.css +1 -1
- package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.service.cjs +4 -5
- package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.state.cjs +6 -0
- package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.util.cjs +52 -5
- package/lib/panel-component/panel-button/panel-button.cjs +1 -0
- package/lib/panel-component/user-message/async-action/async-data-export/async-data-export.cjs +3 -1
- package/lib/util/fullscreen/fullscreen-util.cjs +1 -1
- package/lib/view-engine/calendar-exp-view.engine.cjs +6 -24
- package/lib/view-engine/calendar-view.engine.cjs +10 -0
- package/lib/view-engine/chart-exp-view.engine.cjs +6 -15
- package/lib/view-engine/edit-view.engine.cjs +12 -0
- package/lib/view-engine/gantt-view.engine.cjs +2 -45
- package/lib/view-engine/login-view.engine.cjs +16 -5
- package/lib/view-engine/mpickup-view-engine.cjs +14 -8
- package/lib/view-engine/pickup-view.engine.cjs +15 -0
- package/lib/view-engine/tab-exp-view.engine.cjs +1 -1
- package/lib/view-engine/tab-search-view.engine.cjs +4 -2
- package/lib/view-engine/tree-view.engine.cjs +39 -11
- package/package.json +10 -8
- package/dist/chart-8QfxarWf.js +0 -1
- package/dist/ibiz-markdown-editor-0VHzFa2l.js +0 -1
- package/dist/index-m8q8r8br.js +0 -4
- package/dist/map-chart-user-xOSZGbF2.js +0 -1
- package/dist/wang-editor-_06OYPpu.js +0 -1
- package/es/editor/upload/use/use-ibiz-upload.d.ts +0 -95
- package/es/editor/upload/use/use-ibiz-upload.mjs +0 -170
- package/lib/editor/upload/use/use-ibiz-upload.cjs +0 -175
- /package/es/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.14_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.18_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.14_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.18_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
|
@@ -40,6 +40,10 @@ class UploadEditorController extends runtime.EditorController {
|
|
|
40
40
|
* 下载参数
|
|
41
41
|
*/
|
|
42
42
|
__publicField(this, "exportParams");
|
|
43
|
+
/**
|
|
44
|
+
* 上传文件信息的映射规则字符串,格式为"源键:目标键;源键2:目标键2"
|
|
45
|
+
*/
|
|
46
|
+
__publicField(this, "infoMap", "");
|
|
43
47
|
/**
|
|
44
48
|
* 自适应预览
|
|
45
49
|
* 只读状态下且配置了编辑器参数autoPreview ,加载完图片后自动调整大小达到预览态,且禁用图片hover工具栏
|
|
@@ -48,10 +52,44 @@ class UploadEditorController extends runtime.EditorController {
|
|
|
48
52
|
* @memberof UploadEditorController
|
|
49
53
|
*/
|
|
50
54
|
__publicField(this, "autoPreview", false);
|
|
55
|
+
/**
|
|
56
|
+
* 根据配置的映射关系转换对象属性
|
|
57
|
+
* 将源对象的指定属性,按照映射规则映射到新对象的目标属性
|
|
58
|
+
*
|
|
59
|
+
* @param {IData} [_data={}] - 源数据对象,包含需要被映射的原始属性
|
|
60
|
+
* @param {string} [infoMap=''] - 映射规则字符串,格式为"源键:目标键;源键2:目标键2"
|
|
61
|
+
* @param {boolean} [isEmit=false] - 是否为抛值时处理,抛值时将源键替换为目标键
|
|
62
|
+
* @returns {IData} 转换后的新对象,仅包含映射规则中定义的属性
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* // isEmit=false
|
|
66
|
+
* // 源对象:{ filesize:'10000', fileext:'.gif', folder:'file' };
|
|
67
|
+
* // 映射规则:'filesize:size;fileext:ext;folder:folder';
|
|
68
|
+
* // 转换结果: { size:'10000', ext:'.gif', folder:'file' }
|
|
69
|
+
*
|
|
70
|
+
* // isEmit=true
|
|
71
|
+
* // 源对象:{ filesize:'10000', fileext:'.gif', folder:'file' };
|
|
72
|
+
* // 映射规则:'filesize:size;fileext:ext;folder:folder';
|
|
73
|
+
* // 转换结果: { size:undefined, ext:undefined, folder:'file' }
|
|
74
|
+
*/
|
|
75
|
+
__publicField(this, "transformInfoMap", (_data = {}, infoMap = "", isEmit = false) => {
|
|
76
|
+
const result = {};
|
|
77
|
+
const mappings = infoMap.split(";");
|
|
78
|
+
mappings.forEach((mapping) => {
|
|
79
|
+
let [sourceKey, targetKey] = mapping.split(":");
|
|
80
|
+
if (isEmit)
|
|
81
|
+
sourceKey = targetKey;
|
|
82
|
+
if (sourceKey && targetKey) {
|
|
83
|
+
Object.assign(result, { [targetKey]: _data[sourceKey] });
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
return result;
|
|
87
|
+
});
|
|
51
88
|
}
|
|
52
89
|
async onInit() {
|
|
53
90
|
var _a;
|
|
54
91
|
await super.onInit();
|
|
92
|
+
this.infoMap = ibiz.config.uploadEditor.infoMap;
|
|
55
93
|
if ((_a = this.model.editorType) == null ? void 0 : _a.includes("PICTURE")) {
|
|
56
94
|
this.accept = "image/*";
|
|
57
95
|
}
|
|
@@ -76,7 +114,8 @@ class UploadEditorController extends runtime.EditorController {
|
|
|
76
114
|
isdrag,
|
|
77
115
|
uploadparams,
|
|
78
116
|
exportparams,
|
|
79
|
-
autopreview
|
|
117
|
+
autopreview,
|
|
118
|
+
infomap
|
|
80
119
|
} = this.editorParams;
|
|
81
120
|
if (isDrag) {
|
|
82
121
|
this.isDrag = Boolean(isDrag);
|
|
@@ -99,6 +138,9 @@ class UploadEditorController extends runtime.EditorController {
|
|
|
99
138
|
if (size) {
|
|
100
139
|
this.size = Number(size);
|
|
101
140
|
}
|
|
141
|
+
if (infomap) {
|
|
142
|
+
this.infoMap = infomap;
|
|
143
|
+
}
|
|
102
144
|
if (uploadParams) {
|
|
103
145
|
try {
|
|
104
146
|
this.uploadParams = JSON.parse(uploadParams);
|
|
@@ -9,7 +9,6 @@ function useIViewUpload(props, valueChange, c) {
|
|
|
9
9
|
const uploadHeaders = ibiz.util.file.getUploadHeaders();
|
|
10
10
|
const headers = vue.ref({ ...uploadHeaders });
|
|
11
11
|
const uploadUrl = vue.ref("");
|
|
12
|
-
const downloadUrl = vue.ref("");
|
|
13
12
|
const uploadCache = {
|
|
14
13
|
count: 0,
|
|
15
14
|
cacheFiles: []
|
|
@@ -23,6 +22,22 @@ function useIViewUpload(props, valueChange, c) {
|
|
|
23
22
|
},
|
|
24
23
|
{ immediate: true }
|
|
25
24
|
);
|
|
25
|
+
const getDownloadUrl = (data, file) => {
|
|
26
|
+
const editorParams = { ...c.editorParams };
|
|
27
|
+
if (editorParams.exportparams) {
|
|
28
|
+
editorParams.exportParams = JSON.parse(editorParams.exportparams);
|
|
29
|
+
}
|
|
30
|
+
if (file && file.folder) {
|
|
31
|
+
editorParams.osscat = file.folder;
|
|
32
|
+
}
|
|
33
|
+
const urls = ibiz.util.file.calcFileUpDownUrl(
|
|
34
|
+
c.context,
|
|
35
|
+
c.params,
|
|
36
|
+
data,
|
|
37
|
+
editorParams
|
|
38
|
+
);
|
|
39
|
+
return urls.downloadUrl;
|
|
40
|
+
};
|
|
26
41
|
vue.watch(
|
|
27
42
|
() => props.data,
|
|
28
43
|
(newVal) => {
|
|
@@ -31,9 +46,6 @@ function useIViewUpload(props, valueChange, c) {
|
|
|
31
46
|
if (editorParams.uploadparams) {
|
|
32
47
|
editorParams.uploadParams = JSON.parse(editorParams.uploadparams);
|
|
33
48
|
}
|
|
34
|
-
if (editorParams.exportparams) {
|
|
35
|
-
editorParams.exportParams = JSON.parse(editorParams.exportparams);
|
|
36
|
-
}
|
|
37
49
|
const urls = ibiz.util.file.calcFileUpDownUrl(
|
|
38
50
|
c.context,
|
|
39
51
|
c.params,
|
|
@@ -41,7 +53,6 @@ function useIViewUpload(props, valueChange, c) {
|
|
|
41
53
|
editorParams
|
|
42
54
|
);
|
|
43
55
|
uploadUrl.value = urls.uploadUrl;
|
|
44
|
-
downloadUrl.value = urls.downloadUrl;
|
|
45
56
|
}
|
|
46
57
|
},
|
|
47
58
|
{ immediate: true, deep: true }
|
|
@@ -86,24 +97,23 @@ function useIViewUpload(props, valueChange, c) {
|
|
|
86
97
|
vue.watch(
|
|
87
98
|
files,
|
|
88
99
|
(newVal) => {
|
|
89
|
-
if (
|
|
100
|
+
if (newVal == null ? void 0 : newVal.length) {
|
|
90
101
|
newVal.forEach((file) => {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
if (file.name.split(".").pop() === "svg") {
|
|
102
|
+
const downloadUrl = getDownloadUrl(props.data, file);
|
|
103
|
+
file.url = file.url || downloadUrl.replace("%fileId%", file.id);
|
|
104
|
+
if (ibiz.config.common.enableDownloadTicket) {
|
|
105
|
+
ibiz.util.file.getDownloadTicket(c.context, { fileId: file.id }).then((downloadTicket) => {
|
|
106
|
+
if (downloadTicket && downloadTicket.ticket) {
|
|
107
|
+
file.url = downloadUrl.replace(
|
|
108
|
+
"%fileId%",
|
|
109
|
+
downloadTicket.ticket
|
|
110
|
+
);
|
|
111
|
+
if (file.name.split(".").pop() === "svg") {
|
|
112
|
+
calcSvgPreview(file);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
} else if (file.name.split(".").pop() === "svg") {
|
|
107
117
|
calcSvgPreview(file);
|
|
108
118
|
}
|
|
109
119
|
});
|
|
@@ -113,7 +123,14 @@ function useIViewUpload(props, valueChange, c) {
|
|
|
113
123
|
);
|
|
114
124
|
const emitValue = () => {
|
|
115
125
|
const _files = [...files.value, ...uploadCache.cacheFiles];
|
|
116
|
-
const value = _files.length > 0 ? JSON.stringify(
|
|
126
|
+
const value = _files.length > 0 ? JSON.stringify(
|
|
127
|
+
_files.map((file) => ({
|
|
128
|
+
name: file.name,
|
|
129
|
+
id: file.id,
|
|
130
|
+
folder: file.folder,
|
|
131
|
+
...c.transformInfoMap(file, c.infoMap, true)
|
|
132
|
+
}))
|
|
133
|
+
) : null;
|
|
117
134
|
uploadCache.cacheFiles = [];
|
|
118
135
|
valueChange(value);
|
|
119
136
|
};
|
|
@@ -136,9 +153,14 @@ function useIViewUpload(props, valueChange, c) {
|
|
|
136
153
|
if (!response) {
|
|
137
154
|
return;
|
|
138
155
|
}
|
|
156
|
+
if (ibiz.config.common.enableDownloadTicket) {
|
|
157
|
+
ibiz.util.file.setDownloadTicket(response.id, response.ticket);
|
|
158
|
+
}
|
|
139
159
|
uploadCache.cacheFiles.push({
|
|
140
160
|
name: response.filename,
|
|
141
|
-
id: response.fileid
|
|
161
|
+
id: response.fileid,
|
|
162
|
+
folder: response.folder,
|
|
163
|
+
...c.transformInfoMap(response, c.infoMap)
|
|
142
164
|
});
|
|
143
165
|
if (response.name.split(".").pop() === "svg") {
|
|
144
166
|
const blob = svgBlob.get(response.name);
|
|
@@ -170,15 +192,25 @@ function useIViewUpload(props, valueChange, c) {
|
|
|
170
192
|
emitValue();
|
|
171
193
|
};
|
|
172
194
|
const onDownload = (file) => {
|
|
173
|
-
const
|
|
174
|
-
|
|
195
|
+
const downloadUrl = getDownloadUrl(props.data, file);
|
|
196
|
+
const url = file.url || downloadUrl.replace("%fileId%", file.id);
|
|
197
|
+
const editorParams = { ...c.editorParams };
|
|
198
|
+
if (editorParams.exportparams) {
|
|
199
|
+
editorParams.exportParams = JSON.parse(editorParams.exportparams);
|
|
200
|
+
}
|
|
201
|
+
ibiz.util.file.fileDownload(url, file.name, {
|
|
202
|
+
context: c.context,
|
|
203
|
+
params: c.params,
|
|
204
|
+
data: props.data,
|
|
205
|
+
file: { fileId: file.id, ...file },
|
|
206
|
+
extraParams: editorParams
|
|
207
|
+
});
|
|
175
208
|
};
|
|
176
209
|
const limit = vue.computed(() => {
|
|
177
210
|
return c.multiple ? 9999 : 1;
|
|
178
211
|
});
|
|
179
212
|
return {
|
|
180
213
|
uploadUrl,
|
|
181
|
-
downloadUrl,
|
|
182
214
|
headers,
|
|
183
215
|
files,
|
|
184
216
|
limit,
|
package/lib/locale/en/index.cjs
CHANGED
|
@@ -317,7 +317,8 @@ var index = {
|
|
|
317
317
|
tip: "All Day",
|
|
318
318
|
today: "Today",
|
|
319
319
|
tomorrow: "To Morrow",
|
|
320
|
-
nextweek: "Next Week"
|
|
320
|
+
nextweek: "Next Week",
|
|
321
|
+
selectdate: "Select Date"
|
|
321
322
|
},
|
|
322
323
|
calendarmonth: {
|
|
323
324
|
lastmonth: "Last Month",
|
|
@@ -355,7 +356,9 @@ var index = {
|
|
|
355
356
|
friday: "Fri",
|
|
356
357
|
saturday: "Sat",
|
|
357
358
|
sunday: "Sun"
|
|
358
|
-
}
|
|
359
|
+
},
|
|
360
|
+
selectWeekRange: "Select week range",
|
|
361
|
+
weekFormat: "ww [Week] of YYYY"
|
|
359
362
|
}
|
|
360
363
|
},
|
|
361
364
|
chart: {
|
|
@@ -318,7 +318,8 @@ var index = {
|
|
|
318
318
|
},
|
|
319
319
|
tip: "\u5168\u5929",
|
|
320
320
|
tomorrow: "\u660E\u5929",
|
|
321
|
-
nextweek: "\u4E0B\u5468"
|
|
321
|
+
nextweek: "\u4E0B\u5468",
|
|
322
|
+
selectdate: "\u9009\u62E9\u65E5\u671F"
|
|
322
323
|
},
|
|
323
324
|
calendarmonth: {
|
|
324
325
|
weeks: {
|
|
@@ -351,7 +352,9 @@ var index = {
|
|
|
351
352
|
friday: "\u5468\u4E94",
|
|
352
353
|
saturday: "\u5468\u516D",
|
|
353
354
|
sunday: "\u5468\u65E5"
|
|
354
|
-
}
|
|
355
|
+
},
|
|
356
|
+
selectWeekRange: "\u9009\u62E9\u5468\u8303\u56F4",
|
|
357
|
+
weekFormat: "YYYY\u5E74\u7B2Cww\u5468"
|
|
355
358
|
}
|
|
356
359
|
},
|
|
357
360
|
chart: {
|