@ibiz-template/mob-vue3-components 0.0.6 → 0.0.8
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/index.min.css +1 -1
- package/dist/index.system.min.js +5 -5
- package/dist/index.system.min.js.map +1 -1
- package/dist/tree-xaVRfp-8.js +2 -0
- package/dist/tree-xaVRfp-8.js.map +1 -0
- package/es/control/app-menu-icon-view/app-menu-icon-view.css +1 -1
- package/es/control/app-menu-list-view/app-menu-list-view.css +1 -1
- package/es/control/calendar/calendar.d.ts +2 -3
- package/es/control/calendar/calendar.mjs +38 -67
- package/es/control/calendar/date-util.d.ts +20 -0
- package/es/control/calendar/date-util.mjs +32 -0
- package/es/control/calendar/index.d.ts +2 -3
- package/es/control/caption-bar/caption-bar.css +1 -1
- package/es/control/caption-bar/caption-bar.mjs +5 -2
- package/es/control/toolbar/index.d.ts +1 -1
- package/es/control/toolbar/toolbar.css +1 -1
- package/es/control/toolbar/toolbar.d.ts +1 -1
- package/es/control/toolbar/toolbar.mjs +8 -4
- package/es/control/tree/tree.d.ts +4 -4
- package/es/control/tree/tree.mjs +2 -2
- package/es/editor/common/data-mpicker/ibiz-data-mpicker.mjs +6 -2
- package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.css +1 -1
- package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.mjs +11 -7
- package/es/editor/data-picker/ibiz-picker/ibiz-picker.css +1 -1
- package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.d.ts +1 -5
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +5 -1
- package/es/editor/dropdown-list/ibiz-dropdown-list/ibiz-dropdown-list.css +1 -1
- package/es/editor/dropdown-list/ibiz-dropdown-list/ibiz-dropdown-list.mjs +28 -19
- package/es/editor/radio-button-list/ibiz-radio/ibiz-radio.mjs +5 -4
- package/es/editor/span/span/span.mjs +2 -2
- package/es/editor/text-box/ibiz-input-number/ibiz-input-number.css +1 -1
- package/es/view-engine/mob-edit-view.engine.mjs +2 -0
- package/es/view-engine/mob-wf-dyna-edit-view.engine.mjs +2 -1
- package/es/view-engine/wf-step-trace-view.engine.mjs +4 -1
- package/lib/control/app-menu-icon-view/app-menu-icon-view.css +1 -1
- package/lib/control/app-menu-list-view/app-menu-list-view.css +1 -1
- package/lib/control/calendar/calendar.cjs +37 -66
- package/lib/control/calendar/date-util.cjs +35 -0
- package/lib/control/caption-bar/caption-bar.cjs +5 -2
- package/lib/control/caption-bar/caption-bar.css +1 -1
- package/lib/control/toolbar/toolbar.cjs +8 -4
- package/lib/control/toolbar/toolbar.css +1 -1
- package/lib/control/tree/tree.cjs +2 -2
- package/lib/editor/common/data-mpicker/ibiz-data-mpicker.cjs +6 -2
- package/lib/editor/data-picker/ibiz-mpicker/ibiz-mpicker.cjs +11 -7
- package/lib/editor/data-picker/ibiz-mpicker/ibiz-mpicker.css +1 -1
- package/lib/editor/data-picker/ibiz-picker/ibiz-picker.css +1 -1
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +5 -1
- package/lib/editor/dropdown-list/ibiz-dropdown-list/ibiz-dropdown-list.cjs +28 -19
- package/lib/editor/dropdown-list/ibiz-dropdown-list/ibiz-dropdown-list.css +1 -1
- package/lib/editor/radio-button-list/ibiz-radio/ibiz-radio.cjs +4 -3
- package/lib/editor/span/span/span.cjs +2 -2
- package/lib/editor/text-box/ibiz-input-number/ibiz-input-number.css +1 -1
- package/lib/view-engine/mob-edit-view.engine.cjs +2 -0
- package/lib/view-engine/mob-wf-dyna-edit-view.engine.cjs +2 -1
- package/lib/view-engine/wf-step-trace-view.engine.cjs +4 -1
- package/package.json +6 -6
- package/dist/tree-SFO3fWSy.js +0 -2
- package/dist/tree-SFO3fWSy.js.map +0 -1
|
@@ -162,6 +162,7 @@ class MobEditViewEngine extends runtime.ViewEngineBase {
|
|
|
162
162
|
await this.save();
|
|
163
163
|
const app = ibiz.hub.getApp(this.view.context.srfappid);
|
|
164
164
|
const entityService = await app.deService.getService(
|
|
165
|
+
this.view.context,
|
|
165
166
|
this.view.model.appDataEntityId
|
|
166
167
|
);
|
|
167
168
|
const res = await entityService.wf.getWFVersion();
|
|
@@ -214,6 +215,7 @@ class MobEditViewEngine extends runtime.ViewEngineBase {
|
|
|
214
215
|
const app = ibiz.hub.getApp(this.view.context.srfappid);
|
|
215
216
|
const data = this.form.state.data;
|
|
216
217
|
const entityService = await app.deService.getService(
|
|
218
|
+
this.view.context,
|
|
217
219
|
this.view.model.appDataEntityId
|
|
218
220
|
);
|
|
219
221
|
await entityService.wf.wfWithdraw(
|
|
@@ -92,6 +92,7 @@ class MobWFDynaEditViewEngine extends mobEditView_engine.MobEditViewEngine {
|
|
|
92
92
|
await super.onCreated();
|
|
93
93
|
const app = ibiz.hub.getApp(this.view.context.srfappid);
|
|
94
94
|
this.entityService = await app.deService.getService(
|
|
95
|
+
this.view.context,
|
|
95
96
|
this.view.model.appDataEntityId
|
|
96
97
|
);
|
|
97
98
|
await this.calcProcessForm();
|
|
@@ -135,7 +136,7 @@ class MobWFDynaEditViewEngine extends mobEditView_engine.MobEditViewEngine {
|
|
|
135
136
|
* @return {*} {Promise<string>}
|
|
136
137
|
*/
|
|
137
138
|
async calcProcessFormName() {
|
|
138
|
-
const res = await this.entityService.wf.getWFStep(this.view.
|
|
139
|
+
const res = await this.entityService.wf.getWFStep(this.view.context);
|
|
139
140
|
this.isEditable = res.data.isEditable === "true";
|
|
140
141
|
const processForm = res.data["process-mobform"] ? `wfform_${res.data["process-mobform"]}` : "form";
|
|
141
142
|
return processForm;
|
|
@@ -50,7 +50,10 @@ class WFStepTraceViewEngine extends runtime.ViewEngineBase {
|
|
|
50
50
|
throw new core.RuntimeError("\u6CA1\u6709\u63A5\u6536\u5230appDataEntityId");
|
|
51
51
|
}
|
|
52
52
|
const app = ibiz.hub.getApp(this.view.context.srfappid);
|
|
53
|
-
this.entityService = await app.deService.getService(
|
|
53
|
+
this.entityService = await app.deService.getService(
|
|
54
|
+
this.view.context,
|
|
55
|
+
appDataEntityId
|
|
56
|
+
);
|
|
54
57
|
await this.load();
|
|
55
58
|
}
|
|
56
59
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/mob-vue3-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "使用 rollup 编译 vue 组件或者 jsx",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@ibiz-template-package/vs-tree-ex": "^0.1.1",
|
|
27
|
-
"@ibiz-template/core": "^0.
|
|
28
|
-
"@ibiz-template/model-helper": "^0.
|
|
29
|
-
"@ibiz-template/runtime": "^0.
|
|
27
|
+
"@ibiz-template/core": "^0.5.0-beta.0",
|
|
28
|
+
"@ibiz-template/model-helper": "^0.5.0-beta.0",
|
|
29
|
+
"@ibiz-template/runtime": "^0.5.0-beta.0",
|
|
30
30
|
"@ibiz-template/theme": "^0.4.0",
|
|
31
|
-
"@ibiz-template/vue3-util": "^0.
|
|
32
|
-
"@ibiz/model-core": "^0.0.
|
|
31
|
+
"@ibiz-template/vue3-util": "^0.5.0-beta.0",
|
|
32
|
+
"@ibiz/model-core": "^0.0.29",
|
|
33
33
|
"async-validator": "^4.2.5",
|
|
34
34
|
"cherry-markdown": "^0.8.26",
|
|
35
35
|
"dayjs": "^1.11.10",
|
package/dist/tree-SFO3fWSy.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
System.register(["vue","@ibiz-template/vue3-util","@ibiz-template/runtime","qx-util","@ibiz-template-package/vs-tree-ex"],function(g){"use strict";var l,a,u,s,c,d,h,m,f,p;return{setters:[function(t){l=t.defineComponent,a=t.computed,u=t.ref,s=t.createVNode,c=t.resolveComponent},function(t){d=t.useControlController,h=t.useNamespace},function(t){m=t.TreeController},function(t){f=t.createUUID},function(t){p=t.VsTreeComponent}],execute:function(){const t=l({name:"IBizTreeControl",components:{"vs-tree":p},props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},mdctrlActiveMode:{type:Number,default:2},singleSelect:{type:Boolean,default:!0}},setup(){var C,b;const o=d((...e)=>new m(...e)),D=h(`control-${o.model.controlType.toLowerCase()}`),T=a(()=>o.state.selectedData.map(e=>e.srfkey)),k=f(),N=u(!0),x=a(()=>o.state.isLoaded?o.model.rootVisible?o.state.rootNodes:o.state.rootNodes.reduce((e,r)=>r.children?e.concat(r.children):e,[]):[]),z=async(e,r)=>{if(!o.state.isLoaded)return;const n=await o.loadNodes(e.data);r(n)},L=(e,r)=>{const{originData:n}=r;o.onTreeNodeClick(n)},v=(e,r)=>{e.stopPropagation();const{originData:n}=r;n.leaf&&o.onTreeNodeClick(n)},w=e=>({id:e.srfkey,name:e.text,children:e.children,isLeaf:e.leaf}),B=(e,r)=>{const{originData:n}=r;if(!n.leaf)return e("div",{text:"\u4E0B\u7EA7",className:"tree-button",click:(j,i)=>{i.store.breadcrumb.list.push(i),i.setExpand(!0)}})},V=(e,r)=>{const{checked:n}=r;r.setChecked(!n),v(e,r)},y={maxHeight:"100%",checkInherit:!1,nocheckParent:!0,rootName:(b=(C=o.model.detreeNodes)==null?void 0:C.find(e=>e.rootNode))==null?void 0:b.name,renderContent:B,customNodeClick:V};return N.value&&Object.assign(y,{breadcrumb:{el:`#breadcrumb${k}`,link:(e,r)=>r.name}}),{c:o,ns:D,treeData:x,options:y,breadcrumb:N,checkedKeys:T,uuid:k,onNodeCheck:L,onNodeClick:v,loadData:z,treeDataFormat:w}},render(){return s(c("iBizControlBase"),{controller:this.c},{default:()=>[this.breadcrumb&&s(c("van-sticky"),null,{default:()=>[s("div",{id:`breadcrumb${this.uuid}`,class:[this.ns.b("header")]},null)]}),this.c.state.isCreated&&this.c.state.isLoaded&&s(c("vs-tree"),{"show-line":!0,class:[this.ns.b("content")],lazy:!0,strictLeaf:!0,options:this.options,"show-checkbox":!this.c.state.singleSelect,data:this.treeData,highlightCurrent:!0,checkedKeys:this.checkedKeys,format:this.treeDataFormat,load:this.loadData,onCheck:this.onNodeCheck},null)]})}});g({TreeControl:t,default:t})}}});
|
|
2
|
-
//# sourceMappingURL=tree-SFO3fWSy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tree-SFO3fWSy.js","sources":["../src/control/tree/tree.tsx"],"sourcesContent":["import { useControlController, useNamespace } from '@ibiz-template/vue3-util';\nimport { computed, defineComponent, PropType, ref, VNode } from 'vue';\nimport { IDETree } from '@ibiz/model-core';\nimport { ITreeNodeData, TreeController } from '@ibiz-template/runtime';\nimport { createUUID } from 'qx-util';\nimport { VsTreeComponent } from '@ibiz-template-package/vs-tree-ex';\nimport './tree.scss';\n\nexport const TreeControl = defineComponent({\n name: 'IBizTreeControl',\n components: {\n 'vs-tree': VsTreeComponent,\n },\n props: {\n modelData: { type: Object as PropType<IDETree>, required: true },\n context: { type: Object as PropType<IContext>, required: true },\n params: { type: Object as PropType<IParams>, default: () => ({}) },\n /**\n * 部件行数据默认激活模式\n * - 0 不激活\n * - 1 单击激活\n * - 2 双击激活(默认值)\n *\n * @type {(number | 0 | 1 | 2)}\n */\n mdctrlActiveMode: { type: Number, default: 2 },\n\n /**\n * 是否为单选\n * - true 单选\n * - false 多选\n *\n * @type {(Boolean)}\n */\n singleSelect: { type: Boolean, default: true },\n },\n setup() {\n const c = useControlController((...args) => new TreeController(...args));\n const ns = useNamespace(`control-${c.model.controlType!.toLowerCase()}`);\n // 默认选中项\n const checkedKeys = computed(() => {\n return c.state.selectedData.map(item => item.srfkey);\n });\n\n const uuid = createUUID();\n\n // 启用面包屑功能\n const breadcrumb = ref(true);\n // 节点单击\n\n /** 树展示数据 */\n const treeData = computed(() => {\n if (!c.state.isLoaded) {\n return [];\n }\n return c.model.rootVisible\n ? c.state.rootNodes\n : c.state.rootNodes.reduce<ITreeNodeData[]>((result, nodeData) => {\n if (nodeData.children) {\n return result.concat(nodeData.children);\n }\n return result;\n }, []);\n });\n\n /**\n * 触发节点加载数据\n * @author zk\n * @date 2023-05-29 09:16:07\n * @param {IData} item\n * @param {(nodes: IData[]) => void} callback\n */\n const loadData = async (\n item: IData,\n callback: (nodes: IData[]) => void,\n ) => {\n // 没加载前拦截\n if (!c.state.isLoaded) {\n return;\n }\n // 加载时拦截点击事件\n const nodes = await c.loadNodes(item.data);\n callback(nodes);\n };\n\n /**\n * 多选时选中节点变更\n *\n * @param {ITreeNodeData} nodeData\n */\n const onNodeCheck = (event: Event, opts: IData) => {\n const { originData } = opts;\n c.onTreeNodeClick(originData);\n };\n\n const onNodeClick = (event: Event, opts: IData) => {\n event.stopPropagation();\n const { originData } = opts;\n if (!originData.leaf) {\n return;\n }\n c.onTreeNodeClick(originData);\n };\n\n /**\n * 树数据格式化\n *\n * @author zk\n * @date 2023-07-03 11:07:59\n * @param {ITreeNodeData} data\n * @return {*}\n */\n const treeDataFormat = (data: ITreeNodeData) => {\n return {\n id: data.srfkey,\n name: data.text,\n children: data.children,\n isLeaf: data.leaf,\n };\n };\n\n const renderContent = (\n h: (tag: string, opt: IData) => VNode,\n opts: IData,\n ) => {\n const { originData } = opts;\n if (!originData.leaf) {\n return h('div', {\n text: '下级',\n className: 'tree-button',\n click: (e: Event, _opts: IData) => {\n _opts.store.breadcrumb.list.push(_opts);\n _opts.setExpand(true);\n },\n });\n }\n };\n\n const customNodeClick = (event: Event, opts: IData) => {\n const { checked } = opts;\n opts.setChecked(!checked);\n onNodeClick(event, opts);\n };\n\n // vs树配置项\n const options = {\n maxHeight: '100%',\n // 继承父状态\n checkInherit: false,\n // 不能选择父节点\n nocheckParent: true,\n rootName: c.model.detreeNodes?.find(item => item.rootNode)?.name,\n renderContent,\n customNodeClick,\n };\n\n if (breadcrumb.value) {\n Object.assign(options, {\n breadcrumb: {\n el: `#breadcrumb${uuid}`,\n link: (node: IData, data: IData) => {\n return data.name;\n },\n },\n });\n }\n return {\n c,\n ns,\n treeData,\n options,\n breadcrumb,\n checkedKeys,\n uuid,\n onNodeCheck,\n onNodeClick,\n loadData,\n treeDataFormat,\n };\n },\n render() {\n return (\n <iBizControlBase controller={this.c}>\n {this.breadcrumb && (\n <van-sticky>\n <div\n id={`breadcrumb${this.uuid}`}\n class={[this.ns.b('header')]}\n ></div>\n </van-sticky>\n )}\n {this.c.state.isCreated && this.c.state.isLoaded && (\n <vs-tree\n show-line\n class={[this.ns.b('content')]}\n lazy={true}\n strictLeaf={true}\n options={this.options}\n show-checkbox={!this.c.state.singleSelect}\n data={this.treeData}\n highlightCurrent={true}\n checkedKeys={this.checkedKeys}\n format={this.treeDataFormat}\n load={this.loadData}\n onCheck={this.onNodeCheck}\n ></vs-tree>\n )}\n </iBizControlBase>\n );\n },\n});\n\nexport default TreeControl;\n"],"names":["TreeControl","defineComponent","components","VsTreeComponent","props","modelData","type","required","context","params","Object","default","setup","c","_a","_b","useControlController","args","TreeController","checkedKeys","useNamespace","computed","item","breadcrumb","ref","result","nodeData","model","loadData","callback","nodes","onNodeCheck","event","opts","originData","onNodeClick","treeDataFormat","data","onTreeNodeClick","e","_opts","customNodeClick","checked","options","srfkey","renderContent","text","uuid","className","ns","treeData","maxHeight","checkInherit","_createVNode","_resolveComponent","nocheckParent","rootName","value","assign","link","node"],"mappings":"8bASyB,MAAAA,EAAAC,EAAA,CACvBC,KAAAA,kBACE,WAAWC,CACZ,UAAAA,CACDC,EACEC,MAAAA,CAAaC,UAAiC,CAAEC,KAAAA,OAAgB,SAAA,EAChEC,EAAWF,QAAkC,CAAEC,KAAAA,OAAgB,SAAA,EAC/DE,EAAUH,OAAMI,CAA6BC,KAAAA,OAAqB,QAAA,KAAA,CAAA,EAClE,EAQoBL,iBAAY,CAAEK,KAAAA,OAAY,QAAA,CAE9C,EAOgBL,aAAa,CAAEK,KAAAA,QAAc,QAAA,EA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