@ibiz-template/vue3-util 0.7.24-alpha.0 → 0.7.24
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 +1 -1
- package/es/common/code-list/code-list.d.ts +23 -1
- package/es/common/code-list/code-list.d.ts.map +1 -1
- package/es/common/code-list/code-list.mjs +37 -1
- package/es/index.mjs +1 -0
- package/es/locale/en/index.d.ts +1 -0
- package/es/locale/en/index.d.ts.map +1 -1
- package/es/locale/en/index.mjs +6 -5
- package/es/locale/zh-CN/index.d.ts +1 -0
- package/es/locale/zh-CN/index.d.ts.map +1 -1
- package/es/locale/zh-CN/index.mjs +1 -0
- package/es/panel-component/multi-data-container/multi-data-container.controller.d.ts.map +1 -1
- package/es/panel-component/multi-data-container/multi-data-container.controller.mjs +33 -2
- package/es/panel-component/nav-pos/nav-pos.controller.d.ts +1 -1
- package/es/panel-component/nav-pos/nav-pos.controller.d.ts.map +1 -1
- package/es/panel-component/nav-pos/nav-pos.controller.mjs +4 -2
- package/es/panel-component/nav-pos/nav-pos.d.ts.map +1 -1
- package/es/panel-component/nav-pos/nav-pos.mjs +3 -3
- package/es/panel-component/nav-pos/nav-pos.state.d.ts +7 -0
- package/es/panel-component/nav-pos/nav-pos.state.d.ts.map +1 -1
- package/es/panel-component/nav-pos/nav-pos.state.mjs +7 -0
- package/es/panel-component/single-data-container/single-data-container.controller.d.ts.map +1 -1
- package/es/panel-component/single-data-container/single-data-container.controller.mjs +33 -2
- package/es/use/autofocus-blur/autofocus-blur.d.ts +18 -0
- package/es/use/autofocus-blur/autofocus-blur.d.ts.map +1 -0
- package/es/use/autofocus-blur/autofocus-blur.mjs +17 -0
- package/es/use/index.d.ts +1 -0
- package/es/use/index.d.ts.map +1 -1
- package/es/use/index.mjs +1 -0
- package/lib/common/code-list/code-list.cjs +37 -1
- package/lib/index.cjs +2 -0
- package/lib/locale/en/index.cjs +6 -5
- package/lib/locale/zh-CN/index.cjs +1 -0
- package/lib/panel-component/multi-data-container/multi-data-container.controller.cjs +32 -1
- package/lib/panel-component/nav-pos/nav-pos.cjs +2 -2
- package/lib/panel-component/nav-pos/nav-pos.controller.cjs +4 -2
- package/lib/panel-component/nav-pos/nav-pos.state.cjs +7 -0
- package/lib/panel-component/single-data-container/single-data-container.controller.cjs +32 -1
- package/lib/use/autofocus-blur/autofocus-blur.cjs +19 -0
- package/lib/use/index.cjs +2 -0
- package/package.json +5 -5
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, createVNode, resolveComponent } from 'vue';
|
|
2
|
+
import { calcThresholdRange } from '@ibiz-template/runtime';
|
|
2
3
|
import { isNil } from 'ramda';
|
|
4
|
+
import { isNumber } from 'lodash-es';
|
|
3
5
|
import './code-list.css';
|
|
4
6
|
import '../../use/index.mjs';
|
|
5
7
|
import { useNamespace } from '../../use/namespace/namespace.mjs';
|
|
@@ -17,6 +19,16 @@ const IBizCodeList = /* @__PURE__ */ defineComponent({
|
|
|
17
19
|
},
|
|
18
20
|
value: {
|
|
19
21
|
type: [String, Number]
|
|
22
|
+
},
|
|
23
|
+
convertToCodeItemText: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: true
|
|
26
|
+
},
|
|
27
|
+
valueFormat: {
|
|
28
|
+
type: String
|
|
29
|
+
},
|
|
30
|
+
unitName: {
|
|
31
|
+
type: String
|
|
20
32
|
}
|
|
21
33
|
},
|
|
22
34
|
emits: {
|
|
@@ -39,6 +51,15 @@ const IBizCodeList = /* @__PURE__ */ defineComponent({
|
|
|
39
51
|
});
|
|
40
52
|
const findCodeListItem = (codelist, value) => {
|
|
41
53
|
if (codelist) {
|
|
54
|
+
const {
|
|
55
|
+
thresholdGroup
|
|
56
|
+
} = props.codeList;
|
|
57
|
+
if (thresholdGroup && isNumber(Number(value))) {
|
|
58
|
+
const findItem2 = calcThresholdRange(codelist, Number(value));
|
|
59
|
+
if (findItem2) {
|
|
60
|
+
return findItem2;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
42
63
|
const findItem = codelist.find((item) => item.value == value);
|
|
43
64
|
if (findItem) {
|
|
44
65
|
return findItem;
|
|
@@ -58,8 +79,23 @@ const IBizCodeList = /* @__PURE__ */ defineComponent({
|
|
|
58
79
|
const values = typeof value === "string" ? value.split(valueSeparator) : [value];
|
|
59
80
|
items.value = values.map((val) => {
|
|
60
81
|
const findItem = findCodeListItem(codeListItems, val);
|
|
82
|
+
let codeValue = val;
|
|
83
|
+
if (props.convertToCodeItemText && (findItem == null ? void 0 : findItem.text)) {
|
|
84
|
+
codeValue = findItem.text;
|
|
85
|
+
} else {
|
|
86
|
+
const {
|
|
87
|
+
valueFormat,
|
|
88
|
+
unitName
|
|
89
|
+
} = props;
|
|
90
|
+
if (valueFormat) {
|
|
91
|
+
codeValue = ibiz.util.text.format("".concat(codeValue), valueFormat);
|
|
92
|
+
}
|
|
93
|
+
if (unitName) {
|
|
94
|
+
codeValue += unitName;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
61
97
|
return {
|
|
62
|
-
text:
|
|
98
|
+
text: codeValue,
|
|
63
99
|
color: findItem == null ? void 0 : findItem.color,
|
|
64
100
|
textCls: findItem == null ? void 0 : findItem.textCls,
|
|
65
101
|
sysImage: findItem == null ? void 0 : findItem.sysImage
|
package/es/index.mjs
CHANGED
|
@@ -74,6 +74,7 @@ export { useViewController } from './use/view/use-view-controller/use-view-contr
|
|
|
74
74
|
export { EmptyVNode, getOrigin, isEmptyVNode, useController, useForce, useForceTogether, useProps, usePropsWatch } from './use/vue/vue.mjs';
|
|
75
75
|
export { useCodeListListen } from './use/codeList-listen/codelist-listen.mjs';
|
|
76
76
|
export { useLocalCacheKey } from './use/storage/index.mjs';
|
|
77
|
+
export { useAutoFocusBlur } from './use/autofocus-blur/autofocus-blur.mjs';
|
|
77
78
|
export { OverlayContainer } from './util/overlay-container/overlay-container.mjs';
|
|
78
79
|
export { OverlayPopoverContainer } from './util/overlay-popover-container/overlay-popover-container.mjs';
|
|
79
80
|
export { routerCallback } from './util/router-callback/router-callback.mjs';
|
package/es/locale/en/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/locale/en/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/locale/en/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsEd,CAAC"}
|
package/es/locale/en/index.mjs
CHANGED
|
@@ -11,13 +11,14 @@ const en = {
|
|
|
11
11
|
unsupportedPanel: "Unsupported panel items: {id} - {itemType}"
|
|
12
12
|
},
|
|
13
13
|
panelComponent: {
|
|
14
|
-
noConfiguardDataObject: "No data object name
|
|
15
|
-
noSupportedDataSourceType: "The data source type {dataSourceType} is not supported
|
|
16
|
-
noConfiguredEntityLogic: "No entity logic
|
|
17
|
-
noConfiguredEntity: "No entity
|
|
14
|
+
noConfiguardDataObject: "No data object name config",
|
|
15
|
+
noSupportedDataSourceType: "The data source type {dataSourceType} is not supported",
|
|
16
|
+
noConfiguredEntityLogic: "No entity logic config",
|
|
17
|
+
noConfiguredEntity: "No entity config",
|
|
18
18
|
noReturnValue: "The entity logic {appDELogicId} has no return value",
|
|
19
19
|
noAttribute: "There is no {dataName} attribute in the global variable.",
|
|
20
|
-
|
|
20
|
+
noConfiguredScript: "No javaScript config",
|
|
21
|
+
noConfiguerdEntityBehanior: "No entity behavior config",
|
|
21
22
|
sessionView: "The session to which the view is bound does not exist {dataName}",
|
|
22
23
|
viewStateAttribute: "There is no {dataName} attribute in the view state",
|
|
23
24
|
noImplementMethod: "Method not implemented.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/locale/zh-CN/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/locale/zh-CN/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8DhB,CAAC"}
|
|
@@ -17,6 +17,7 @@ const zhCn = {
|
|
|
17
17
|
noConfiguredEntity: "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53",
|
|
18
18
|
noReturnValue: "\u5B9E\u4F53\u903B\u8F91{appDELogicId}\u6CA1\u6709\u8FD4\u56DE\u503C",
|
|
19
19
|
noAttribute: "\u5168\u5C40\u53D8\u91CF\u91CC\u6CA1\u6709{dataName}\u5C5E\u6027",
|
|
20
|
+
noConfiguredScript: "\u6CA1\u6709\u914D\u7F6E\u811A\u672C\u4EE3\u7801",
|
|
20
21
|
noConfiguerdEntityBehanior: "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u884C\u4E3A",
|
|
21
22
|
sessionView: "\u7ED1\u5B9A\u89C6\u56FE\u7684\u4F1A\u8BDD\u4E0D\u5B58\u5728{dataName}",
|
|
22
23
|
viewStateAttribute: "\u89C6\u56FEstate\u91CC\u6CA1\u6709{dataName}\u5C5E\u6027",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi-data-container.controller.d.ts","sourceRoot":"","sources":["../../../src/panel-component/multi-data-container/multi-data-container.controller.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,6BAA6B,EAC7B,kBAAkB,EAElB,eAAe,EAEf,mBAAmB,EACnB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"multi-data-container.controller.d.ts","sourceRoot":"","sources":["../../../src/panel-component/multi-data-container/multi-data-container.controller.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,6BAA6B,EAC7B,kBAAkB,EAElB,eAAe,EAEf,m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IA2BlD;;;;;;;OAOG;IACH,SAAS,CAAC,YAAY,CAAC,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IA2BrE,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3D,OAAO,IAAI,IAAI;CAMhB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModelError, RuntimeModelError, RuntimeError } from '@ibiz-template/core';
|
|
2
|
-
import { PanelItemController, getPanelItemProvider, isDataContainer, getAllPanelField, PanelData, PanelNotifyState, execDELogicById } from '@ibiz-template/runtime';
|
|
2
|
+
import { PanelItemController, getPanelItemProvider, isDataContainer, ScriptFactory, getAllPanelField, PanelData, PanelNotifyState, execDELogicById } from '@ibiz-template/runtime';
|
|
3
3
|
import { MultiDataContainerItemController } from './multi-data-container-item.controller.mjs';
|
|
4
4
|
import { MultiDataContainerState } from './multi-data-container.state.mjs';
|
|
5
5
|
|
|
@@ -87,7 +87,7 @@ class MultiDataContainerController extends PanelItemController {
|
|
|
87
87
|
* @protected
|
|
88
88
|
*/
|
|
89
89
|
initContainerData() {
|
|
90
|
-
const { dataSourceType, dataName } = this.model;
|
|
90
|
+
const { dataSourceType, dataName, scriptCode } = this.model;
|
|
91
91
|
switch (dataSourceType) {
|
|
92
92
|
case "DEACTION":
|
|
93
93
|
case "DEDATASET":
|
|
@@ -119,6 +119,37 @@ class MultiDataContainerController extends PanelItemController {
|
|
|
119
119
|
this.bindViewData(this.panel.view, dataName);
|
|
120
120
|
break;
|
|
121
121
|
}
|
|
122
|
+
case "ACTIVEDATAPARAM": {
|
|
123
|
+
if (!dataName) {
|
|
124
|
+
throw new RuntimeModelError(
|
|
125
|
+
this.model,
|
|
126
|
+
ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject")
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
this.setData(this.dataParent.data[dataName]);
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
case "CUSTOM": {
|
|
133
|
+
if (!scriptCode) {
|
|
134
|
+
throw new RuntimeModelError(
|
|
135
|
+
this.model,
|
|
136
|
+
ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript")
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
const computeData = ScriptFactory.execScriptFn(
|
|
140
|
+
{
|
|
141
|
+
...this.panel.getEventArgs(),
|
|
142
|
+
data: this.dataParent.data
|
|
143
|
+
},
|
|
144
|
+
scriptCode,
|
|
145
|
+
{
|
|
146
|
+
isAsync: false,
|
|
147
|
+
singleRowReturn: true
|
|
148
|
+
}
|
|
149
|
+
);
|
|
150
|
+
this.setData(computeData);
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
122
153
|
default:
|
|
123
154
|
throw new ModelError(
|
|
124
155
|
this.model,
|
|
@@ -159,7 +159,7 @@ export declare class NavPosController extends PanelItemController<IPanelRawItem>
|
|
|
159
159
|
* @param {INavViewMsg} openViewMsg
|
|
160
160
|
* @memberof NavPosController
|
|
161
161
|
*/
|
|
162
|
-
openViewByPath(openViewMsg: INavViewMsg): void
|
|
162
|
+
openViewByPath(openViewMsg: INavViewMsg): Promise<void>;
|
|
163
163
|
/**
|
|
164
164
|
* 通过模型绘制视图
|
|
165
165
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav-pos.controller.d.ts","sourceRoot":"","sources":["../../../src/panel-component/nav-pos/nav-pos.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,MAAM,EAGN,0BAA0B,EAE1B,WAAW,EAEX,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,6BAA6B,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGnE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAK9C;;;;;;GAMG;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G,IAAI;IAiBxC;;;;;OAKG;
|
|
1
|
+
{"version":3,"file":"nav-pos.controller.d.ts","sourceRoot":"","sources":["../../../src/panel-component/nav-pos/nav-pos.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,MAAM,EAGN,0BAA0B,EAE1B,WAAW,EAEX,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,6BAA6B,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGnE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAK9C;;;;;;GAMG;AACH,qBAAa,gBACX,SAAQ,mBAAmB,CAAC,aAAa,CACzC,YAAW,0BAA0B;IAErC;;;;;OAKG;IACK,KAAK,EAAE,WAAW,CAAC;IAE3B;;;;;OAKG;IACH,UAAU,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAM;IAE3C;;;;;OAKG;IACH,aAAa,EAAG,WAAW,CAAC;IAE5B;;;;;OAKG;IACH,MAAM,EAAG,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,WAAW,EAAE,MAAM,EAAE,CAAM;IAE3B;;;;;;;OAOG;IACH,aAAa,EAAE,KAAK,CAAM;IAE1B;;;;;OAKG;IACH,cAAc,EAAE,OAAO,CAAS;IAEhC;;;;;;;OAOG;IACH,IAAI,KAAK,IAAI,6BAA6B,CAEzC;IAED;;;;;;;;OAQG;IACH,iBAAiB,CAAC,UAAU,EAAE,WAAW,GAAG,OAAO;IAUnD;;;;;OAKG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;cAIf,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAoDvC;;;;;;OAMG;IACH,SAAS,CAAC,WAAW,IAAI,WAAW;IAIpC;;;;;;OAMG;IACH,IAAI,UAAU,IAAI,MAAM,GAAG,SAAS,CAEnC;IAED;;;;;;;;OAQG;IACH,SAAS,CAAC,YAAY,CAAC,GAAG,EAAE,WAAW,GAAG,MAAM;IAOhD;;;;OAIG;IACH,aAAa,CAAC,KAAK,EAAE,6BAA6B,GAAG,IAAI;IAazD;;;;;;;OAOG;IACH,cAAc,CAAC,UAAU,EAAE,WAAW,GAAG,IAAI;IAiC7C;;;;;OAKG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI1B;;;;;OAKG;IACH,aAAa,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAIrC,YAAY,IAAI,IAAI;IAKpB;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI;IAiBxC;;;;;OAKG;IACG,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAwE7D;;;;;OAKG;IACH,eAAe,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI;IAM/C;;;;;;;OAOG;IACH,SAAS,CAAC,mBAAmB,IAAI,IAAI;CAWtC"}
|
|
@@ -242,7 +242,7 @@ class NavPosController extends PanelItemController {
|
|
|
242
242
|
* @param {INavViewMsg} openViewMsg
|
|
243
243
|
* @memberof NavPosController
|
|
244
244
|
*/
|
|
245
|
-
openViewByPath(openViewMsg) {
|
|
245
|
+
async openViewByPath(openViewMsg) {
|
|
246
246
|
var _a, _b, _c;
|
|
247
247
|
const cacheKey = this.calcCacheKey(openViewMsg);
|
|
248
248
|
this.setNavViewMsgs(openViewMsg);
|
|
@@ -285,7 +285,8 @@ class NavPosController extends PanelItemController {
|
|
|
285
285
|
if (this.getExpItemIsCache(openViewMsg)) {
|
|
286
286
|
this.state.cacheKeys.push(cacheKey);
|
|
287
287
|
}
|
|
288
|
-
|
|
288
|
+
this.state.isLoading = true;
|
|
289
|
+
await ibiz.commands.execute(
|
|
289
290
|
OpenAppViewCommand.TAG,
|
|
290
291
|
openViewMsg.viewId,
|
|
291
292
|
tempContext,
|
|
@@ -296,6 +297,7 @@ class NavPosController extends PanelItemController {
|
|
|
296
297
|
...openViewMsg.modalOptions
|
|
297
298
|
}
|
|
298
299
|
);
|
|
300
|
+
this.state.isLoading = false;
|
|
299
301
|
}
|
|
300
302
|
}
|
|
301
303
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav-pos.d.ts","sourceRoot":"","sources":["../../../src/panel-component/nav-pos/nav-pos.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,QAAQ,EAKT,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,gBAAgB,CAAC;AAIxB,eAAO,MAAM,MAAM;;;;;;;;;;;;;2BAee,SAAS,KAAG,IAAI;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"nav-pos.d.ts","sourceRoot":"","sources":["../../../src/panel-component/nav-pos/nav-pos.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,QAAQ,EAKT,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,gBAAgB,CAAC;AAIxB,eAAO,MAAM,MAAM;;;;;;;;;;;;;2BAee,SAAS,KAAG,IAAI;;;;;;;;;;YAuGhD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isVNode, defineComponent, ref, watch, createVNode, resolveComponent, h } from 'vue';
|
|
1
|
+
import { isVNode, defineComponent, ref, watch, createVNode, resolveComponent, h, withDirectives, resolveDirective } from 'vue';
|
|
2
2
|
import { useRouter, useRoute, RouterView } from 'vue-router';
|
|
3
3
|
import { NavPosController } from './nav-pos.controller.mjs';
|
|
4
4
|
import './nav-pos.css';
|
|
@@ -107,9 +107,9 @@ const NavPos = /* @__PURE__ */ defineComponent({
|
|
|
107
107
|
default: () => [view]
|
|
108
108
|
}) : view;
|
|
109
109
|
}
|
|
110
|
-
return createVNode("div", {
|
|
110
|
+
return withDirectives(createVNode("div", {
|
|
111
111
|
"class": [this.ns.b(), this.ns.m(this.modelData.id), ...this.controller.containerClass]
|
|
112
|
-
}, [content]);
|
|
112
|
+
}, [content]), [[resolveDirective("loading"), this.c.state.isLoading]]);
|
|
113
113
|
}
|
|
114
114
|
});
|
|
115
115
|
|
|
@@ -46,5 +46,12 @@ export declare class NavPosState extends PanelItemState {
|
|
|
46
46
|
navViewMsgs: {
|
|
47
47
|
[p: string]: INavViewMsg;
|
|
48
48
|
};
|
|
49
|
+
/**
|
|
50
|
+
* 视图是否正在加载
|
|
51
|
+
*
|
|
52
|
+
* @type {boolean}
|
|
53
|
+
* @memberof NavPosState
|
|
54
|
+
*/
|
|
55
|
+
isLoading: boolean;
|
|
49
56
|
}
|
|
50
57
|
//# sourceMappingURL=nav-pos.state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav-pos.state.d.ts","sourceRoot":"","sources":["../../../src/panel-component/nav-pos/nav-pos.state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAErE;;;;;;GAMG;AACH,qBAAa,WAAY,SAAQ,cAAc;IAC7C;;;;;OAKG;IACH,KAAK,EAAE,OAAO,CAAQ;IAEtB;;;;;;;OAOG;IACH,SAAS,EAAE,OAAO,CAAQ;IAE1B;;;;;OAKG;IACH,UAAU,EAAE,MAAM,CAAM;IAExB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,EAAE,CAAmB;IAEtC;;;;;OAKG;IACH,WAAW,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,WAAW,CAAA;KAAE,CAAM;
|
|
1
|
+
{"version":3,"file":"nav-pos.state.d.ts","sourceRoot":"","sources":["../../../src/panel-component/nav-pos/nav-pos.state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAErE;;;;;;GAMG;AACH,qBAAa,WAAY,SAAQ,cAAc;IAC7C;;;;;OAKG;IACH,KAAK,EAAE,OAAO,CAAQ;IAEtB;;;;;;;OAOG;IACH,SAAS,EAAE,OAAO,CAAQ;IAE1B;;;;;OAKG;IACH,UAAU,EAAE,MAAM,CAAM;IAExB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,EAAE,CAAmB;IAEtC;;;;;OAKG;IACH,WAAW,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,WAAW,CAAA;KAAE,CAAM;IAE/C;;;;;OAKG;IACH,SAAS,EAAE,OAAO,CAAS;CAC5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"single-data-container.controller.d.ts","sourceRoot":"","sources":["../../../src/panel-component/single-data-container/single-data-container.controller.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,gBAAgB,EAChB,6BAA6B,EAC7B,6BAA6B,EAC7B,oBAAoB,EACpB,kBAAkB,EAElB,eAAe,EAEf,mBAAmB,EACnB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"single-data-container.controller.d.ts","sourceRoot":"","sources":["../../../src/panel-component/single-data-container/single-data-container.controller.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,gBAAgB,EAChB,6BAA6B,EAC7B,6BAA6B,EAC7B,oBAAoB,EACpB,kBAAkB,EAElB,eAAe,EAEf,mBAAmB,EACnB,gBAAgB,EAEjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAkB,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE;;;;;;GAMG;AACH,qBAAa,6BAC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M,EAAE,GAAG,IAAI;IAM5C;;;;;OAKG;IACG,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAa/D,OAAO,IAAI,IAAI;CAOhB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModelError, RuntimeModelError, RuntimeError } from '@ibiz-template/core';
|
|
2
|
-
import { PanelItemController, getPanelItemProvider, isDataContainer, getAllPanelField, PanelData, PanelNotifyState, execDELogicById } from '@ibiz-template/runtime';
|
|
2
|
+
import { PanelItemController, getPanelItemProvider, isDataContainer, ScriptFactory, getAllPanelField, PanelData, PanelNotifyState, execDELogicById } from '@ibiz-template/runtime';
|
|
3
3
|
import { SingleDataContainerState } from './single-data-container.state.mjs';
|
|
4
4
|
|
|
5
5
|
"use strict";
|
|
@@ -96,7 +96,7 @@ class SingleDataContainerController extends PanelItemController {
|
|
|
96
96
|
* @protected
|
|
97
97
|
*/
|
|
98
98
|
initContainerData() {
|
|
99
|
-
const { dataSourceType, dataName, dataRegionType } = this.model;
|
|
99
|
+
const { dataSourceType, dataName, dataRegionType, scriptCode } = this.model;
|
|
100
100
|
if (dataRegionType === "LOGINFORM") {
|
|
101
101
|
this.setLoginForm();
|
|
102
102
|
return;
|
|
@@ -132,6 +132,37 @@ class SingleDataContainerController extends PanelItemController {
|
|
|
132
132
|
this.bindViewData(this.panel.view, dataName);
|
|
133
133
|
break;
|
|
134
134
|
}
|
|
135
|
+
case "ACTIVEDATAPARAM": {
|
|
136
|
+
if (!dataName) {
|
|
137
|
+
throw new RuntimeModelError(
|
|
138
|
+
this.model,
|
|
139
|
+
ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject")
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
this.setData(this.dataParent.data[dataName]);
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
case "CUSTOM": {
|
|
146
|
+
if (!scriptCode) {
|
|
147
|
+
throw new RuntimeModelError(
|
|
148
|
+
this.model,
|
|
149
|
+
ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript")
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
const computeData = ScriptFactory.execScriptFn(
|
|
153
|
+
{
|
|
154
|
+
...this.panel.getEventArgs(),
|
|
155
|
+
data: this.dataParent.data
|
|
156
|
+
},
|
|
157
|
+
scriptCode,
|
|
158
|
+
{
|
|
159
|
+
isAsync: false,
|
|
160
|
+
singleRowReturn: true
|
|
161
|
+
}
|
|
162
|
+
);
|
|
163
|
+
this.setData(computeData);
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
135
166
|
default:
|
|
136
167
|
throw new ModelError(
|
|
137
168
|
this.model,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type MyComponentEmits = 'blur';
|
|
2
|
+
type EmitFn = <E extends MyComponentEmits>(event: E) => void;
|
|
3
|
+
/**
|
|
4
|
+
* 自动聚焦及改变值时失焦
|
|
5
|
+
*
|
|
6
|
+
* @author fangZhiHao
|
|
7
|
+
* @date 2024-06-12 18:06:40
|
|
8
|
+
* @export
|
|
9
|
+
* @param {IData} props
|
|
10
|
+
* @param {EmitFn} Fn
|
|
11
|
+
* @return {*} {{ useInFocusAndBlur: () => void; useInValueChange: () => void }}
|
|
12
|
+
*/
|
|
13
|
+
export declare function useAutoFocusBlur(props: IData, emit: EmitFn): {
|
|
14
|
+
useInFocusAndBlur: () => void;
|
|
15
|
+
useInValueChange: () => void;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=autofocus-blur.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autofocus-blur.d.ts","sourceRoot":"","sources":["../../../src/use/autofocus-blur/autofocus-blur.ts"],"names":[],"mappings":"AAAA,KAAK,gBAAgB,GAAG,MAAM,CAAC;AAE/B,KAAK,MAAM,GAAG,CAAC,CAAC,SAAS,gBAAgB,EAAE,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;AAE7D;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,MAAM,GACX;IAAE,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAAC,gBAAgB,EAAE,MAAM,IAAI,CAAA;CAAE,CAajE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function useAutoFocusBlur(props, emit) {
|
|
3
|
+
return {
|
|
4
|
+
useInFocusAndBlur: () => {
|
|
5
|
+
if (!props.autoFocus) {
|
|
6
|
+
emit("blur");
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
useInValueChange: () => {
|
|
10
|
+
if (props.autoFocus) {
|
|
11
|
+
emit("blur");
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { useAutoFocusBlur };
|
package/es/use/index.d.ts
CHANGED
package/es/use/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/use/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,mCAAmC,CAAC;AAClD,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/use/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,mCAAmC,CAAC;AAClD,cAAc,WAAW,CAAC;AAC1B,cAAc,iCAAiC,CAAC"}
|
package/es/use/index.mjs
CHANGED
|
@@ -9,6 +9,7 @@ import './view/index.mjs';
|
|
|
9
9
|
export { EmptyVNode, getOrigin, isEmptyVNode, useController, useForce, useForceTogether, useProps, usePropsWatch } from './vue/vue.mjs';
|
|
10
10
|
export { useCodeListListen } from './codeList-listen/codelist-listen.mjs';
|
|
11
11
|
export { useLocalCacheKey } from './storage/index.mjs';
|
|
12
|
+
export { useAutoFocusBlur } from './autofocus-blur/autofocus-blur.mjs';
|
|
12
13
|
export { useControlController } from './control/use-control-controller/use-control-controller.mjs';
|
|
13
14
|
export { useViewController } from './view/use-view-controller/use-view-controller.mjs';
|
|
14
15
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var vue = require('vue');
|
|
4
|
+
var runtime = require('@ibiz-template/runtime');
|
|
4
5
|
var ramda = require('ramda');
|
|
6
|
+
var lodashEs = require('lodash-es');
|
|
5
7
|
require('./code-list.css');
|
|
6
8
|
require('../../use/index.cjs');
|
|
7
9
|
var namespace = require('../../use/namespace/namespace.cjs');
|
|
@@ -19,6 +21,16 @@ const IBizCodeList = /* @__PURE__ */ vue.defineComponent({
|
|
|
19
21
|
},
|
|
20
22
|
value: {
|
|
21
23
|
type: [String, Number]
|
|
24
|
+
},
|
|
25
|
+
convertToCodeItemText: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: true
|
|
28
|
+
},
|
|
29
|
+
valueFormat: {
|
|
30
|
+
type: String
|
|
31
|
+
},
|
|
32
|
+
unitName: {
|
|
33
|
+
type: String
|
|
22
34
|
}
|
|
23
35
|
},
|
|
24
36
|
emits: {
|
|
@@ -41,6 +53,15 @@ const IBizCodeList = /* @__PURE__ */ vue.defineComponent({
|
|
|
41
53
|
});
|
|
42
54
|
const findCodeListItem = (codelist, value) => {
|
|
43
55
|
if (codelist) {
|
|
56
|
+
const {
|
|
57
|
+
thresholdGroup
|
|
58
|
+
} = props.codeList;
|
|
59
|
+
if (thresholdGroup && lodashEs.isNumber(Number(value))) {
|
|
60
|
+
const findItem2 = runtime.calcThresholdRange(codelist, Number(value));
|
|
61
|
+
if (findItem2) {
|
|
62
|
+
return findItem2;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
44
65
|
const findItem = codelist.find((item) => item.value == value);
|
|
45
66
|
if (findItem) {
|
|
46
67
|
return findItem;
|
|
@@ -60,8 +81,23 @@ const IBizCodeList = /* @__PURE__ */ vue.defineComponent({
|
|
|
60
81
|
const values = typeof value === "string" ? value.split(valueSeparator) : [value];
|
|
61
82
|
items.value = values.map((val) => {
|
|
62
83
|
const findItem = findCodeListItem(codeListItems, val);
|
|
84
|
+
let codeValue = val;
|
|
85
|
+
if (props.convertToCodeItemText && (findItem == null ? void 0 : findItem.text)) {
|
|
86
|
+
codeValue = findItem.text;
|
|
87
|
+
} else {
|
|
88
|
+
const {
|
|
89
|
+
valueFormat,
|
|
90
|
+
unitName
|
|
91
|
+
} = props;
|
|
92
|
+
if (valueFormat) {
|
|
93
|
+
codeValue = ibiz.util.text.format("".concat(codeValue), valueFormat);
|
|
94
|
+
}
|
|
95
|
+
if (unitName) {
|
|
96
|
+
codeValue += unitName;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
63
99
|
return {
|
|
64
|
-
text:
|
|
100
|
+
text: codeValue,
|
|
65
101
|
color: findItem == null ? void 0 : findItem.color,
|
|
66
102
|
textCls: findItem == null ? void 0 : findItem.textCls,
|
|
67
103
|
sysImage: findItem == null ? void 0 : findItem.sysImage
|
package/lib/index.cjs
CHANGED
|
@@ -76,6 +76,7 @@ var useViewController = require('./use/view/use-view-controller/use-view-control
|
|
|
76
76
|
var vue = require('./use/vue/vue.cjs');
|
|
77
77
|
var codelistListen = require('./use/codeList-listen/codelist-listen.cjs');
|
|
78
78
|
var index$l = require('./use/storage/index.cjs');
|
|
79
|
+
var autofocusBlur = require('./use/autofocus-blur/autofocus-blur.cjs');
|
|
79
80
|
var overlayContainer = require('./util/overlay-container/overlay-container.cjs');
|
|
80
81
|
var overlayPopoverContainer = require('./util/overlay-popover-container/overlay-popover-container.cjs');
|
|
81
82
|
var routerCallback = require('./util/router-callback/router-callback.cjs');
|
|
@@ -193,6 +194,7 @@ exports.useProps = vue.useProps;
|
|
|
193
194
|
exports.usePropsWatch = vue.usePropsWatch;
|
|
194
195
|
exports.useCodeListListen = codelistListen.useCodeListListen;
|
|
195
196
|
exports.useLocalCacheKey = index$l.useLocalCacheKey;
|
|
197
|
+
exports.useAutoFocusBlur = autofocusBlur.useAutoFocusBlur;
|
|
196
198
|
exports.OverlayContainer = overlayContainer.OverlayContainer;
|
|
197
199
|
exports.OverlayPopoverContainer = overlayPopoverContainer.OverlayPopoverContainer;
|
|
198
200
|
exports.routerCallback = routerCallback.routerCallback;
|
package/lib/locale/en/index.cjs
CHANGED
|
@@ -13,13 +13,14 @@ const en = {
|
|
|
13
13
|
unsupportedPanel: "Unsupported panel items: {id} - {itemType}"
|
|
14
14
|
},
|
|
15
15
|
panelComponent: {
|
|
16
|
-
noConfiguardDataObject: "No data object name
|
|
17
|
-
noSupportedDataSourceType: "The data source type {dataSourceType} is not supported
|
|
18
|
-
noConfiguredEntityLogic: "No entity logic
|
|
19
|
-
noConfiguredEntity: "No entity
|
|
16
|
+
noConfiguardDataObject: "No data object name config",
|
|
17
|
+
noSupportedDataSourceType: "The data source type {dataSourceType} is not supported",
|
|
18
|
+
noConfiguredEntityLogic: "No entity logic config",
|
|
19
|
+
noConfiguredEntity: "No entity config",
|
|
20
20
|
noReturnValue: "The entity logic {appDELogicId} has no return value",
|
|
21
21
|
noAttribute: "There is no {dataName} attribute in the global variable.",
|
|
22
|
-
|
|
22
|
+
noConfiguredScript: "No javaScript config",
|
|
23
|
+
noConfiguerdEntityBehanior: "No entity behavior config",
|
|
23
24
|
sessionView: "The session to which the view is bound does not exist {dataName}",
|
|
24
25
|
viewStateAttribute: "There is no {dataName} attribute in the view state",
|
|
25
26
|
noImplementMethod: "Method not implemented.",
|
|
@@ -19,6 +19,7 @@ const zhCn = {
|
|
|
19
19
|
noConfiguredEntity: "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53",
|
|
20
20
|
noReturnValue: "\u5B9E\u4F53\u903B\u8F91{appDELogicId}\u6CA1\u6709\u8FD4\u56DE\u503C",
|
|
21
21
|
noAttribute: "\u5168\u5C40\u53D8\u91CF\u91CC\u6CA1\u6709{dataName}\u5C5E\u6027",
|
|
22
|
+
noConfiguredScript: "\u6CA1\u6709\u914D\u7F6E\u811A\u672C\u4EE3\u7801",
|
|
22
23
|
noConfiguerdEntityBehanior: "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u884C\u4E3A",
|
|
23
24
|
sessionView: "\u7ED1\u5B9A\u89C6\u56FE\u7684\u4F1A\u8BDD\u4E0D\u5B58\u5728{dataName}",
|
|
24
25
|
viewStateAttribute: "\u89C6\u56FEstate\u91CC\u6CA1\u6709{dataName}\u5C5E\u6027",
|
|
@@ -89,7 +89,7 @@ class MultiDataContainerController extends runtime.PanelItemController {
|
|
|
89
89
|
* @protected
|
|
90
90
|
*/
|
|
91
91
|
initContainerData() {
|
|
92
|
-
const { dataSourceType, dataName } = this.model;
|
|
92
|
+
const { dataSourceType, dataName, scriptCode } = this.model;
|
|
93
93
|
switch (dataSourceType) {
|
|
94
94
|
case "DEACTION":
|
|
95
95
|
case "DEDATASET":
|
|
@@ -121,6 +121,37 @@ class MultiDataContainerController extends runtime.PanelItemController {
|
|
|
121
121
|
this.bindViewData(this.panel.view, dataName);
|
|
122
122
|
break;
|
|
123
123
|
}
|
|
124
|
+
case "ACTIVEDATAPARAM": {
|
|
125
|
+
if (!dataName) {
|
|
126
|
+
throw new core.RuntimeModelError(
|
|
127
|
+
this.model,
|
|
128
|
+
ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject")
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
this.setData(this.dataParent.data[dataName]);
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
case "CUSTOM": {
|
|
135
|
+
if (!scriptCode) {
|
|
136
|
+
throw new core.RuntimeModelError(
|
|
137
|
+
this.model,
|
|
138
|
+
ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript")
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
const computeData = runtime.ScriptFactory.execScriptFn(
|
|
142
|
+
{
|
|
143
|
+
...this.panel.getEventArgs(),
|
|
144
|
+
data: this.dataParent.data
|
|
145
|
+
},
|
|
146
|
+
scriptCode,
|
|
147
|
+
{
|
|
148
|
+
isAsync: false,
|
|
149
|
+
singleRowReturn: true
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
this.setData(computeData);
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
124
155
|
default:
|
|
125
156
|
throw new core.ModelError(
|
|
126
157
|
this.model,
|
|
@@ -109,9 +109,9 @@ const NavPos = /* @__PURE__ */ vue.defineComponent({
|
|
|
109
109
|
default: () => [view]
|
|
110
110
|
}) : view;
|
|
111
111
|
}
|
|
112
|
-
return vue.createVNode("div", {
|
|
112
|
+
return vue.withDirectives(vue.createVNode("div", {
|
|
113
113
|
"class": [this.ns.b(), this.ns.m(this.modelData.id), ...this.controller.containerClass]
|
|
114
|
-
}, [content]);
|
|
114
|
+
}, [content]), [[vue.resolveDirective("loading"), this.c.state.isLoading]]);
|
|
115
115
|
}
|
|
116
116
|
});
|
|
117
117
|
|
|
@@ -244,7 +244,7 @@ class NavPosController extends runtime.PanelItemController {
|
|
|
244
244
|
* @param {INavViewMsg} openViewMsg
|
|
245
245
|
* @memberof NavPosController
|
|
246
246
|
*/
|
|
247
|
-
openViewByPath(openViewMsg) {
|
|
247
|
+
async openViewByPath(openViewMsg) {
|
|
248
248
|
var _a, _b, _c;
|
|
249
249
|
const cacheKey = this.calcCacheKey(openViewMsg);
|
|
250
250
|
this.setNavViewMsgs(openViewMsg);
|
|
@@ -287,7 +287,8 @@ class NavPosController extends runtime.PanelItemController {
|
|
|
287
287
|
if (this.getExpItemIsCache(openViewMsg)) {
|
|
288
288
|
this.state.cacheKeys.push(cacheKey);
|
|
289
289
|
}
|
|
290
|
-
|
|
290
|
+
this.state.isLoading = true;
|
|
291
|
+
await ibiz.commands.execute(
|
|
291
292
|
runtime.OpenAppViewCommand.TAG,
|
|
292
293
|
openViewMsg.viewId,
|
|
293
294
|
tempContext,
|
|
@@ -298,6 +299,7 @@ class NavPosController extends runtime.PanelItemController {
|
|
|
298
299
|
...openViewMsg.modalOptions
|
|
299
300
|
}
|
|
300
301
|
);
|
|
302
|
+
this.state.isLoading = false;
|
|
301
303
|
}
|
|
302
304
|
}
|
|
303
305
|
/**
|