@ibiz-template/runtime 0.4.3 → 0.4.5
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.esm.js +269 -70
- package/dist/index.system.min.js +2 -3
- package/out/controller/control/exp-bar/tree-exp-bar.controller.d.ts +8 -0
- package/out/controller/control/exp-bar/tree-exp-bar.controller.d.ts.map +1 -1
- package/out/controller/control/exp-bar/tree-exp-bar.controller.js +17 -0
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.d.ts +1 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.js +9 -3
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.d.ts +1 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.js +7 -2
- package/out/controller/control/grid/grid/grid.controller.d.ts +8 -0
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +15 -0
- package/out/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.js +13 -0
- package/out/controller/control/toolbar/toolbar.controllerr.d.ts.map +1 -1
- package/out/controller/control/toolbar/toolbar.controllerr.js +3 -0
- package/out/controller/control/tree/tree.controller.d.ts +8 -0
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +38 -0
- package/out/controller/control/tree/tree.service.js +1 -1
- package/out/global/global-util/global-util.d.ts +8 -1
- package/out/global/global-util/global-util.d.ts.map +1 -1
- package/out/global/global-util/global-util.js +8 -1
- package/out/interface/common/i-plugin-factory/i-plugin-factory.d.ts +4 -5
- package/out/interface/common/i-plugin-factory/i-plugin-factory.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-tree.state.d.ts +14 -0
- package/out/interface/controller/state/control/i-tree.state.d.ts.map +1 -1
- package/out/model/utils/util.d.ts +4 -2
- package/out/model/utils/util.d.ts.map +1 -1
- package/out/platform/provider/platform-provider-base.d.ts.map +1 -1
- package/out/platform/provider/platform-provider-base.js +1 -0
- package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts.map +1 -1
- package/out/service/utils/dynamic-code-list/dynamic-code-list.js +6 -1
- package/out/ui-action/provider/front-ui-action-provider.js +2 -2
- package/out/ui-action/provider/index.d.ts +2 -1
- package/out/ui-action/provider/index.d.ts.map +1 -1
- package/out/ui-action/provider/index.js +2 -1
- package/out/utils/index.d.ts +1 -0
- package/out/utils/index.d.ts.map +1 -1
- package/out/utils/index.js +1 -0
- package/out/utils/theme-util/theme-util.d.ts +57 -0
- package/out/utils/theme-util/theme-util.d.ts.map +1 -0
- package/out/utils/theme-util/theme-util.js +95 -0
- package/package.json +5 -5
- package/src/controller/control/exp-bar/tree-exp-bar.controller.ts +18 -0
- package/src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts +8 -3
- package/src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts +6 -2
- package/src/controller/control/grid/grid/grid.controller.ts +17 -0
- package/src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts +14 -0
- package/src/controller/control/toolbar/toolbar.controllerr.ts +3 -0
- package/src/controller/control/tree/tree.controller.ts +45 -0
- package/src/controller/control/tree/tree.service.ts +1 -1
- package/src/global/global-util/global-util.ts +9 -0
- package/src/interface/common/i-plugin-factory/i-plugin-factory.ts +4 -5
- package/src/interface/controller/state/control/i-tree.state.ts +16 -0
- package/src/model/utils/util.ts +4 -1
- package/src/platform/provider/platform-provider-base.ts +1 -0
- package/src/service/utils/dynamic-code-list/dynamic-code-list.ts +9 -3
- package/src/ui-action/provider/front-ui-action-provider.ts +2 -2
- package/src/ui-action/provider/index.ts +2 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/theme-util/theme-util.ts +102 -0
- package/dist/index.system.min.js.map +0 -1
package/dist/index.esm.js
CHANGED
|
@@ -2579,6 +2579,95 @@ var TextUtil = class {
|
|
|
2579
2579
|
}
|
|
2580
2580
|
};
|
|
2581
2581
|
|
|
2582
|
+
// src/utils/theme-util/theme-util.ts
|
|
2583
|
+
import { clone as clone2 } from "ramda";
|
|
2584
|
+
var ThemeUtil = class {
|
|
2585
|
+
constructor() {
|
|
2586
|
+
/**
|
|
2587
|
+
* 主题设置元素 html
|
|
2588
|
+
*
|
|
2589
|
+
* @author chitanda
|
|
2590
|
+
* @date 2023-12-02 23:12:26
|
|
2591
|
+
* @protected
|
|
2592
|
+
* @type {HTMLElement}
|
|
2593
|
+
*/
|
|
2594
|
+
this.html = document.getElementsByTagName("html")[0];
|
|
2595
|
+
}
|
|
2596
|
+
/**
|
|
2597
|
+
* 加载主题插件
|
|
2598
|
+
*
|
|
2599
|
+
* @author chitanda
|
|
2600
|
+
* @date 2023-12-03 01:12:44
|
|
2601
|
+
* @param {IAppUITheme} theme
|
|
2602
|
+
* @return {*} {Promise<void>}
|
|
2603
|
+
*/
|
|
2604
|
+
async loadTheme(theme) {
|
|
2605
|
+
const data = clone2(theme.themeParams || {});
|
|
2606
|
+
const path2 = data["theme-package-path"];
|
|
2607
|
+
delete data.appId;
|
|
2608
|
+
delete data["theme-package-path"];
|
|
2609
|
+
await ibiz.plugin.loadPlugin({
|
|
2610
|
+
runtimeObject: true,
|
|
2611
|
+
rtobjectName: theme.name,
|
|
2612
|
+
rtobjectRepo: path2
|
|
2613
|
+
});
|
|
2614
|
+
this.setThemeParams(theme, data);
|
|
2615
|
+
this.setTheme(theme.themeTag);
|
|
2616
|
+
}
|
|
2617
|
+
/**
|
|
2618
|
+
* 设置额外修改的主题参数
|
|
2619
|
+
*
|
|
2620
|
+
* @author chitanda
|
|
2621
|
+
* @date 2023-12-05 11:12:00
|
|
2622
|
+
* @protected
|
|
2623
|
+
* @param {IAppUITheme} theme
|
|
2624
|
+
* @param {Record<string, string>} params
|
|
2625
|
+
* @return {*} {void}
|
|
2626
|
+
*/
|
|
2627
|
+
setThemeParams(theme, params) {
|
|
2628
|
+
const themeStyle = document.getElementById(theme.themeTag);
|
|
2629
|
+
if (themeStyle) {
|
|
2630
|
+
return;
|
|
2631
|
+
}
|
|
2632
|
+
let content = ":root.".concat(theme.themeTag, "{");
|
|
2633
|
+
for (const key in params) {
|
|
2634
|
+
if (Object.prototype.hasOwnProperty.call(params, key)) {
|
|
2635
|
+
const val = params[key];
|
|
2636
|
+
content += "".concat(key, ": ").concat(val).concat(val.endsWith(";") ? "" : ";");
|
|
2637
|
+
}
|
|
2638
|
+
}
|
|
2639
|
+
content += "}";
|
|
2640
|
+
const script = document.createElement("style");
|
|
2641
|
+
script.id = theme.themeTag;
|
|
2642
|
+
script.type = "text/css";
|
|
2643
|
+
script.innerHTML = content;
|
|
2644
|
+
document.head.appendChild(script);
|
|
2645
|
+
}
|
|
2646
|
+
/**
|
|
2647
|
+
* 设置主题
|
|
2648
|
+
*
|
|
2649
|
+
* @author chitanda
|
|
2650
|
+
* @date 2023-12-02 23:12:37
|
|
2651
|
+
* @param {string} tag
|
|
2652
|
+
*/
|
|
2653
|
+
setTheme(tag) {
|
|
2654
|
+
const theme = this.getTheme();
|
|
2655
|
+
this.html.classList.remove(theme);
|
|
2656
|
+
this.html.setAttribute("theme", tag);
|
|
2657
|
+
this.html.classList.add(tag);
|
|
2658
|
+
}
|
|
2659
|
+
/**
|
|
2660
|
+
* 获取当前主题
|
|
2661
|
+
*
|
|
2662
|
+
* @author chitanda
|
|
2663
|
+
* @date 2023-12-02 23:12:10
|
|
2664
|
+
* @return {*} {string}
|
|
2665
|
+
*/
|
|
2666
|
+
getTheme() {
|
|
2667
|
+
return this.html.getAttribute("theme");
|
|
2668
|
+
}
|
|
2669
|
+
};
|
|
2670
|
+
|
|
2582
2671
|
// src/utils/raw-value-util/raw-value-util.ts
|
|
2583
2672
|
var RawValueUtil = class {
|
|
2584
2673
|
/**
|
|
@@ -2634,7 +2723,7 @@ async function handleAllSettled(values, isThrow = true) {
|
|
|
2634
2723
|
|
|
2635
2724
|
// src/command/app/open-app-view/open-app-view.ts
|
|
2636
2725
|
import { ModelError as ModelError14, RuntimeError as RuntimeError21 } from "@ibiz-template/core";
|
|
2637
|
-
import { clone as
|
|
2726
|
+
import { clone as clone14 } from "ramda";
|
|
2638
2727
|
|
|
2639
2728
|
// src/service/utils/de-dq-cond/ps-de-dq-cond-engine.ts
|
|
2640
2729
|
import { isEmpty as isEmpty3 } from "ramda";
|
|
@@ -3478,7 +3567,8 @@ var PlatformProviderBase = class {
|
|
|
3478
3567
|
async download(url, name) {
|
|
3479
3568
|
const response = await ibiz.net.request(url, {
|
|
3480
3569
|
method: "get",
|
|
3481
|
-
responseType: "blob"
|
|
3570
|
+
responseType: "blob",
|
|
3571
|
+
baseURL: ""
|
|
3482
3572
|
});
|
|
3483
3573
|
if (response.status !== 200) {
|
|
3484
3574
|
throw new RuntimeError9("\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25");
|
|
@@ -3594,7 +3684,7 @@ async function getDEMethodProvider(model) {
|
|
|
3594
3684
|
// src/service/utils/app-counter/app-counter.ts
|
|
3595
3685
|
import { IBizContext, RuntimeError as RuntimeError11 } from "@ibiz-template/core";
|
|
3596
3686
|
import { notNilEmpty as notNilEmpty5, QXEvent } from "qx-util";
|
|
3597
|
-
import { clone as
|
|
3687
|
+
import { clone as clone3 } from "ramda";
|
|
3598
3688
|
var AppCounter = class {
|
|
3599
3689
|
/**
|
|
3600
3690
|
* Creates an instance of AppCounter.
|
|
@@ -3654,10 +3744,10 @@ var AppCounter = class {
|
|
|
3654
3744
|
*/
|
|
3655
3745
|
setParams(context, params) {
|
|
3656
3746
|
if (context) {
|
|
3657
|
-
this.context =
|
|
3747
|
+
this.context = clone3(context);
|
|
3658
3748
|
}
|
|
3659
3749
|
if (params) {
|
|
3660
|
-
this.params =
|
|
3750
|
+
this.params = clone3(params);
|
|
3661
3751
|
}
|
|
3662
3752
|
}
|
|
3663
3753
|
/**
|
|
@@ -3985,9 +4075,15 @@ var DynamicCodeListCache = class {
|
|
|
3985
4075
|
result.disableSelect = data[disableAppDEFieldId];
|
|
3986
4076
|
}
|
|
3987
4077
|
if (dataAppDEFieldId && data[dataAppDEFieldId]) {
|
|
3988
|
-
|
|
3989
|
-
data
|
|
3990
|
-
|
|
4078
|
+
try {
|
|
4079
|
+
result.data = ScriptFactory.execSingleLine(
|
|
4080
|
+
data[dataAppDEFieldId]
|
|
4081
|
+
);
|
|
4082
|
+
} catch (error) {
|
|
4083
|
+
ibiz.log.error(
|
|
4084
|
+
"\u52A8\u6001\u4EE3\u7801\u8868\u6570\u636E\u5C5E\u6027\u8FD4\u56DE\u503C\u4E0D\u4E3A\u5BF9\u8C61\u683C\u5F0F\u7684\u5B57\u7B26\u4E32\uFF0C\u65E0\u6CD5\u8F6C\u6362\uFF01"
|
|
4085
|
+
);
|
|
4086
|
+
}
|
|
3991
4087
|
}
|
|
3992
4088
|
return result;
|
|
3993
4089
|
}
|
|
@@ -4126,7 +4222,7 @@ var DynamicCodeListCache = class {
|
|
|
4126
4222
|
};
|
|
4127
4223
|
|
|
4128
4224
|
// src/service/utils/de-cache/de-cache.ts
|
|
4129
|
-
import { where, equals, clone as
|
|
4225
|
+
import { where, equals, clone as clone4, isNil as isNil5, isEmpty as isEmpty5 } from "ramda";
|
|
4130
4226
|
import { createUUID } from "qx-util";
|
|
4131
4227
|
|
|
4132
4228
|
// src/service/utils/service-exist-util/service-exist-util.ts
|
|
@@ -4187,7 +4283,7 @@ var DECache = class {
|
|
|
4187
4283
|
*/
|
|
4188
4284
|
forceUpdate(context, entity) {
|
|
4189
4285
|
const map = this.getCacheByTag(context);
|
|
4190
|
-
map.set(entity.srfkey,
|
|
4286
|
+
map.set(entity.srfkey, clone4(entity));
|
|
4191
4287
|
ibiz.log.warn("forceUpdate", entity.srfkey, entity);
|
|
4192
4288
|
}
|
|
4193
4289
|
/**
|
|
@@ -4219,7 +4315,7 @@ var DECache = class {
|
|
|
4219
4315
|
}
|
|
4220
4316
|
entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
4221
4317
|
const map = this.getCacheByTag(context);
|
|
4222
|
-
map.set(entity.srfkey,
|
|
4318
|
+
map.set(entity.srfkey, clone4(entity));
|
|
4223
4319
|
ibiz.log.warn("add", entity.srfkey, entity);
|
|
4224
4320
|
return entity;
|
|
4225
4321
|
} catch (err) {
|
|
@@ -4241,7 +4337,7 @@ var DECache = class {
|
|
|
4241
4337
|
const map = this.getCacheByTag(context);
|
|
4242
4338
|
const data = map.get(srfKey);
|
|
4243
4339
|
ibiz.log.warn("get", srfKey, data);
|
|
4244
|
-
return
|
|
4340
|
+
return clone4(data);
|
|
4245
4341
|
} catch (err) {
|
|
4246
4342
|
ibiz.log.error(err);
|
|
4247
4343
|
return null;
|
|
@@ -4266,7 +4362,7 @@ var DECache = class {
|
|
|
4266
4362
|
data.assign(entity);
|
|
4267
4363
|
map.set(entity.srfkey, data);
|
|
4268
4364
|
ibiz.log.warn("update", entity.srfkey, entity);
|
|
4269
|
-
return
|
|
4365
|
+
return clone4(data);
|
|
4270
4366
|
}
|
|
4271
4367
|
throw new Error("\u6570\u636E\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u66F4\u65B0!");
|
|
4272
4368
|
} catch (err) {
|
|
@@ -4319,7 +4415,7 @@ var DECache = class {
|
|
|
4319
4415
|
entity.srfkey = createUUID();
|
|
4320
4416
|
}
|
|
4321
4417
|
entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
4322
|
-
const data =
|
|
4418
|
+
const data = clone4(entity);
|
|
4323
4419
|
map.set(entity.srfkey, data);
|
|
4324
4420
|
entities[i] = data;
|
|
4325
4421
|
ibiz.log.warn("add", entity.srfkey, entity);
|
|
@@ -4352,7 +4448,7 @@ var DECache = class {
|
|
|
4352
4448
|
data.assign(entity);
|
|
4353
4449
|
map.set(entity.srfkey, data);
|
|
4354
4450
|
ibiz.log.warn("update", entity.srfkey, entity);
|
|
4355
|
-
entities[i] =
|
|
4451
|
+
entities[i] = clone4(data);
|
|
4356
4452
|
} else {
|
|
4357
4453
|
throw new Error(
|
|
4358
4454
|
"\u6570\u636E[".concat(entity.srfdename, "-").concat(entity.srfmajortext, "(").concat(entity.srfkey, ")]\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u66F4\u65B0!")
|
|
@@ -5456,11 +5552,11 @@ var DEService = class {
|
|
|
5456
5552
|
};
|
|
5457
5553
|
|
|
5458
5554
|
// src/service/service/control/control.service.ts
|
|
5459
|
-
import { clone as
|
|
5555
|
+
import { clone as clone6 } from "@ibiz-template/core";
|
|
5460
5556
|
|
|
5461
5557
|
// src/service/vo/control.vo.ts
|
|
5462
5558
|
import { createUUID as createUUID2 } from "qx-util";
|
|
5463
|
-
import { clone as
|
|
5559
|
+
import { clone as clone5, isNil as isNil7 } from "ramda";
|
|
5464
5560
|
|
|
5465
5561
|
// src/service/constant/srfuf.ts
|
|
5466
5562
|
var Srfuf = /* @__PURE__ */ ((Srfuf2) => {
|
|
@@ -5657,7 +5753,7 @@ var ControlVO = class _ControlVO {
|
|
|
5657
5753
|
* @return {*} {ControlVO}
|
|
5658
5754
|
*/
|
|
5659
5755
|
clone() {
|
|
5660
|
-
const cloneOrigin =
|
|
5756
|
+
const cloneOrigin = clone5(this.$origin);
|
|
5661
5757
|
const newVal = new _ControlVO(cloneOrigin, this.$dataUIMap);
|
|
5662
5758
|
Object.keys(this).forEach((key) => {
|
|
5663
5759
|
newVal[key] = this[key];
|
|
@@ -5734,7 +5830,7 @@ var ControlService = class {
|
|
|
5734
5830
|
* @returns {*} {IHttpResponse}
|
|
5735
5831
|
*/
|
|
5736
5832
|
handleResponse(res) {
|
|
5737
|
-
return
|
|
5833
|
+
return clone6(res);
|
|
5738
5834
|
}
|
|
5739
5835
|
/**
|
|
5740
5836
|
* 实体数据转ui数据
|
|
@@ -6182,7 +6278,7 @@ import { RuntimeModelError as RuntimeModelError8 } from "@ibiz-template/core";
|
|
|
6182
6278
|
import { isArray as isArray4 } from "lodash-es";
|
|
6183
6279
|
|
|
6184
6280
|
// src/service/app-data-entity/app-data-entity.ts
|
|
6185
|
-
import { clone as
|
|
6281
|
+
import { clone as clone7, isNil as isNil9 } from "ramda";
|
|
6186
6282
|
import { DataTypes } from "@ibiz-template/core";
|
|
6187
6283
|
import { createUUID as createUUID3 } from "qx-util";
|
|
6188
6284
|
var AppDataEntity = class _AppDataEntity {
|
|
@@ -6206,7 +6302,7 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
6206
6302
|
Object.defineProperty(this, "_data", {
|
|
6207
6303
|
enumerable: false,
|
|
6208
6304
|
configurable: true,
|
|
6209
|
-
value: data instanceof _AppDataEntity ?
|
|
6305
|
+
value: data instanceof _AppDataEntity ? clone7(data._data) : clone7(data)
|
|
6210
6306
|
});
|
|
6211
6307
|
Object.defineProperty(this, "srfdeid", {
|
|
6212
6308
|
get() {
|
|
@@ -6768,7 +6864,7 @@ var Method = class {
|
|
|
6768
6864
|
// src/de-logic/index.ts
|
|
6769
6865
|
import { HttpError as HttpError3, HttpResponse as HttpResponse2, RuntimeError as RuntimeError18 } from "@ibiz-template/core";
|
|
6770
6866
|
import { isArray as isArray6 } from "lodash-es";
|
|
6771
|
-
import { clone as
|
|
6867
|
+
import { clone as clone12 } from "ramda";
|
|
6772
6868
|
|
|
6773
6869
|
// src/de-logic/de-logic.ts
|
|
6774
6870
|
import { ModelError as ModelError12, RuntimeModelError as RuntimeModelError18 } from "@ibiz-template/core";
|
|
@@ -7197,11 +7293,11 @@ var EndNode = class extends DELogicNode {
|
|
|
7197
7293
|
|
|
7198
7294
|
// src/de-logic/de-logic-node/prepare-param-node/prepare-param-node.ts
|
|
7199
7295
|
import { ModelError as ModelError10 } from "@ibiz-template/core";
|
|
7200
|
-
import { clone as
|
|
7296
|
+
import { clone as clone9 } from "ramda";
|
|
7201
7297
|
|
|
7202
7298
|
// src/de-logic/utils/handle-src-val.ts
|
|
7203
7299
|
import { ModelError as ModelError9 } from "@ibiz-template/core";
|
|
7204
|
-
import { clone as
|
|
7300
|
+
import { clone as clone8 } from "ramda";
|
|
7205
7301
|
function handleSrcVal(ctx, srcValParams) {
|
|
7206
7302
|
const { srcDELogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
7207
7303
|
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
@@ -7231,7 +7327,7 @@ function handleSrcVal(ctx, srcValParams) {
|
|
|
7231
7327
|
value = ctx.parameters.context;
|
|
7232
7328
|
break;
|
|
7233
7329
|
case "ENVPARAM":
|
|
7234
|
-
value =
|
|
7330
|
+
value = clone8(ibiz.env);
|
|
7235
7331
|
break;
|
|
7236
7332
|
default:
|
|
7237
7333
|
throw new ModelError9(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
@@ -7302,7 +7398,7 @@ var PrepareParamNode = class extends DELogicNode {
|
|
|
7302
7398
|
copyParam(nodeParam, ctx) {
|
|
7303
7399
|
const { dstDELogicParamId } = nodeParam;
|
|
7304
7400
|
const srcVal = handleSrcVal(ctx, nodeParam);
|
|
7305
|
-
ctx.params[dstDELogicParamId] =
|
|
7401
|
+
ctx.params[dstDELogicParamId] = clone9(srcVal);
|
|
7306
7402
|
}
|
|
7307
7403
|
/**
|
|
7308
7404
|
* 绑定参数
|
|
@@ -7464,7 +7560,7 @@ var RenewParamNode = class extends DELogicNode {
|
|
|
7464
7560
|
|
|
7465
7561
|
// src/de-logic/de-logic-node/copy-param-node/copy-param-node.ts
|
|
7466
7562
|
import { RuntimeModelError as RuntimeModelError15 } from "@ibiz-template/core";
|
|
7467
|
-
import { clone as
|
|
7563
|
+
import { clone as clone10 } from "ramda";
|
|
7468
7564
|
var CopyParamNode = class extends DELogicNode {
|
|
7469
7565
|
async exec(ctx) {
|
|
7470
7566
|
const { dstDELogicParamId, srcDELogicParamId } = this.model;
|
|
@@ -7475,7 +7571,7 @@ var CopyParamNode = class extends DELogicNode {
|
|
|
7475
7571
|
);
|
|
7476
7572
|
}
|
|
7477
7573
|
const srcVal = handleSrcVal(ctx, this.model);
|
|
7478
|
-
ctx.params[dstDELogicParamId] =
|
|
7574
|
+
ctx.params[dstDELogicParamId] = clone10(srcVal);
|
|
7479
7575
|
}
|
|
7480
7576
|
};
|
|
7481
7577
|
|
|
@@ -7541,7 +7637,7 @@ var ThrowExceptionNode = class extends DELogicNode {
|
|
|
7541
7637
|
|
|
7542
7638
|
// src/de-logic/de-logic-param/de-logic-param.ts
|
|
7543
7639
|
import { ModelError as ModelError11 } from "@ibiz-template/core";
|
|
7544
|
-
import { clone as
|
|
7640
|
+
import { clone as clone11 } from "ramda";
|
|
7545
7641
|
var DELogicParam = class {
|
|
7546
7642
|
/**
|
|
7547
7643
|
* Creates an instance of DELogicParam.
|
|
@@ -7573,7 +7669,7 @@ var DELogicParam = class {
|
|
|
7573
7669
|
ctx.params[tag] = ctx.data[0] || {};
|
|
7574
7670
|
}
|
|
7575
7671
|
} else if (m.appGlobalParam) {
|
|
7576
|
-
ctx.params[tag] =
|
|
7672
|
+
ctx.params[tag] = clone11(ibiz.env);
|
|
7577
7673
|
} else if (m.entityListParam) {
|
|
7578
7674
|
ctx.params[tag] = [];
|
|
7579
7675
|
} else if (m.entityPageParam) {
|
|
@@ -7589,7 +7685,7 @@ var DELogicParam = class {
|
|
|
7589
7685
|
} else if (m.simpleParam) {
|
|
7590
7686
|
ctx.params[tag] = {};
|
|
7591
7687
|
} else if (m.cloneParam) {
|
|
7592
|
-
ctx.params[tag] =
|
|
7688
|
+
ctx.params[tag] = clone11(ctx.data || {});
|
|
7593
7689
|
} else if (m.envParam) {
|
|
7594
7690
|
throw new ModelError11(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u7CFB\u7EDF\u73AF\u5883\u53D8\u91CF");
|
|
7595
7691
|
} else if (m.fileListParam) {
|
|
@@ -7824,9 +7920,9 @@ async function execDELogicById(deDELogicId, dataEntityId, context, data, params)
|
|
|
7824
7920
|
return execDELogic(deLogic, context, data, params);
|
|
7825
7921
|
}
|
|
7826
7922
|
async function execDELogicAction(deDELogic, context, data, params) {
|
|
7827
|
-
const _context =
|
|
7828
|
-
const _data = data ?
|
|
7829
|
-
const _params = params ?
|
|
7923
|
+
const _context = clone12(context);
|
|
7924
|
+
const _data = data ? clone12(data) : data;
|
|
7925
|
+
const _params = params ? clone12(params) : params;
|
|
7830
7926
|
try {
|
|
7831
7927
|
const result = await execDELogic(deDELogic, _context, _data, _params);
|
|
7832
7928
|
return new HttpResponse2(result);
|
|
@@ -8228,7 +8324,7 @@ import {
|
|
|
8228
8324
|
RuntimeModelError as RuntimeModelError20
|
|
8229
8325
|
} from "@ibiz-template/core";
|
|
8230
8326
|
import { ascSort, descSort } from "qx-util";
|
|
8231
|
-
import { clone as
|
|
8327
|
+
import { clone as clone13, equals as equals2, isEmpty as isEmpty7, isNil as isNil11, where as where2 } from "ramda";
|
|
8232
8328
|
import { isArray as isArray8 } from "lodash-es";
|
|
8233
8329
|
var FetchMethod = class extends Method {
|
|
8234
8330
|
get isLocalMode() {
|
|
@@ -8372,7 +8468,7 @@ var FetchMethod = class extends Method {
|
|
|
8372
8468
|
const { page, size } = filter;
|
|
8373
8469
|
const start = page * size;
|
|
8374
8470
|
const end = (page + 1) * size - 1;
|
|
8375
|
-
const items = list.slice(start, end).map((item) =>
|
|
8471
|
+
const items = list.slice(start, end).map((item) => clone13(item));
|
|
8376
8472
|
return items;
|
|
8377
8473
|
}
|
|
8378
8474
|
/**
|
|
@@ -9131,7 +9227,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
9131
9227
|
* @return {*} {(Promise<IModalData | void>)}
|
|
9132
9228
|
*/
|
|
9133
9229
|
async exec(appViewId, _context, params = {}, opts = {}) {
|
|
9134
|
-
const context =
|
|
9230
|
+
const context = clone14(_context);
|
|
9135
9231
|
const appView = await ibiz.hub.config.view.get(appViewId);
|
|
9136
9232
|
if (!appView) {
|
|
9137
9233
|
throw new RuntimeError21("\u5E94\u7528\u89C6\u56FE[".concat(appViewId, "]\u4E0D\u5B58\u5728"));
|
|
@@ -11556,7 +11652,7 @@ var CodeListEditorController = class extends EditorController {
|
|
|
11556
11652
|
|
|
11557
11653
|
// src/controller/common/control/control.controller.ts
|
|
11558
11654
|
import { IBizContext as IBizContext3, IBizParams, NoticeError } from "@ibiz-template/core";
|
|
11559
|
-
import { clone as
|
|
11655
|
+
import { clone as clone15, isNil as isNil19 } from "ramda";
|
|
11560
11656
|
import { notNilEmpty as notNilEmpty7 } from "qx-util";
|
|
11561
11657
|
var ControlController = class extends BaseController {
|
|
11562
11658
|
/**
|
|
@@ -11598,7 +11694,7 @@ var ControlController = class extends BaseController {
|
|
|
11598
11694
|
"".concat(model.controlType, "_DEFAULT")
|
|
11599
11695
|
);
|
|
11600
11696
|
if (panelModel) {
|
|
11601
|
-
this.controlPanel =
|
|
11697
|
+
this.controlPanel = clone15(panelModel);
|
|
11602
11698
|
}
|
|
11603
11699
|
}
|
|
11604
11700
|
this.updateContextParams({});
|
|
@@ -12677,7 +12773,7 @@ import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
|
12677
12773
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
12678
12774
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
12679
12775
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
12680
|
-
import { clone as
|
|
12776
|
+
import { clone as clone16, isNil as isNil20, mergeDeepRight } from "ramda";
|
|
12681
12777
|
dayjs3.extend(minMax);
|
|
12682
12778
|
dayjs3.extend(isSameOrBefore);
|
|
12683
12779
|
dayjs3.extend(quarterOfYear);
|
|
@@ -12952,7 +13048,7 @@ var BaseSeriesGenerator = class {
|
|
|
12952
13048
|
dataPreprocess(data) {
|
|
12953
13049
|
const tempData = [];
|
|
12954
13050
|
data.forEach((singleData) => {
|
|
12955
|
-
tempData.push(
|
|
13051
|
+
tempData.push(clone16(singleData));
|
|
12956
13052
|
});
|
|
12957
13053
|
const { groupMode } = this.model;
|
|
12958
13054
|
if (groupMode) {
|
|
@@ -14007,7 +14103,7 @@ import { ModelError as ModelError18, RuntimeModelError as RuntimeModelError29 }
|
|
|
14007
14103
|
|
|
14008
14104
|
// src/ui-logic/utils/handle-src-val.ts
|
|
14009
14105
|
import { ModelError as ModelError17 } from "@ibiz-template/core";
|
|
14010
|
-
import { clone as
|
|
14106
|
+
import { clone as clone17 } from "ramda";
|
|
14011
14107
|
function handleSrcVal2(ctx, srcValParams) {
|
|
14012
14108
|
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
14013
14109
|
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
@@ -14034,7 +14130,7 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
14034
14130
|
value = ctx.parameters.context;
|
|
14035
14131
|
break;
|
|
14036
14132
|
case "ENVPARAM":
|
|
14037
|
-
value =
|
|
14133
|
+
value = clone17(ibiz.env);
|
|
14038
14134
|
break;
|
|
14039
14135
|
default:
|
|
14040
14136
|
throw new ModelError17(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
@@ -14389,7 +14485,7 @@ var EndNode2 = class extends UILogicNode {
|
|
|
14389
14485
|
|
|
14390
14486
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
14391
14487
|
import { ModelError as ModelError21, RuntimeError as RuntimeError37 } from "@ibiz-template/core";
|
|
14392
|
-
import { clone as
|
|
14488
|
+
import { clone as clone18 } from "ramda";
|
|
14393
14489
|
var PrepareJSParamNode = class extends UILogicNode {
|
|
14394
14490
|
async exec(ctx) {
|
|
14395
14491
|
const nodeParams = this.model.deuilogicNodeParams;
|
|
@@ -14478,7 +14574,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
14478
14574
|
copyParam(nodeParam, ctx) {
|
|
14479
14575
|
const { dstDEUILogicParamId } = nodeParam;
|
|
14480
14576
|
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
14481
|
-
ctx.params[dstDEUILogicParamId] =
|
|
14577
|
+
ctx.params[dstDEUILogicParamId] = clone18(srcVal);
|
|
14482
14578
|
}
|
|
14483
14579
|
/**
|
|
14484
14580
|
* 绑定参数
|
|
@@ -14705,7 +14801,7 @@ var ResetParamNode2 = class extends UILogicNode {
|
|
|
14705
14801
|
|
|
14706
14802
|
// src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
|
|
14707
14803
|
import { RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
|
|
14708
|
-
import { clone as
|
|
14804
|
+
import { clone as clone19 } from "ramda";
|
|
14709
14805
|
var CopyParamNode2 = class extends UILogicNode {
|
|
14710
14806
|
async exec(ctx) {
|
|
14711
14807
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
@@ -14716,7 +14812,7 @@ var CopyParamNode2 = class extends UILogicNode {
|
|
|
14716
14812
|
);
|
|
14717
14813
|
}
|
|
14718
14814
|
const srcVal = handleSrcVal2(ctx, this.model);
|
|
14719
|
-
ctx.params[dstDEUILogicParamId] =
|
|
14815
|
+
ctx.params[dstDEUILogicParamId] = clone19(srcVal);
|
|
14720
14816
|
}
|
|
14721
14817
|
};
|
|
14722
14818
|
|
|
@@ -15695,10 +15791,10 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
15695
15791
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15696
15792
|
doOther(action, args) {
|
|
15697
15793
|
const { scriptCode } = action;
|
|
15698
|
-
const { context, params, data, event } = args;
|
|
15794
|
+
const { context, params, data, event, view } = args;
|
|
15699
15795
|
if (scriptCode) {
|
|
15700
15796
|
const result = ScriptFactory.execScriptFn(
|
|
15701
|
-
{ context, params, data, el: event == null ? void 0 : event.target },
|
|
15797
|
+
{ context, params, data, el: event == null ? void 0 : event.target, view },
|
|
15702
15798
|
scriptCode
|
|
15703
15799
|
);
|
|
15704
15800
|
return result || {};
|
|
@@ -16004,6 +16100,9 @@ var ToolbarController = class extends ControlController {
|
|
|
16004
16100
|
this.model,
|
|
16005
16101
|
(item) => {
|
|
16006
16102
|
const itemState = this.state.buttonsState[item.id];
|
|
16103
|
+
if (!itemState) {
|
|
16104
|
+
return;
|
|
16105
|
+
}
|
|
16007
16106
|
if (itemState.visible) {
|
|
16008
16107
|
const dynaVisible = this.scheduler.triggerItemVisible(
|
|
16009
16108
|
item.id,
|
|
@@ -17556,6 +17655,23 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
17556
17655
|
}
|
|
17557
17656
|
await super.onRouterChange(info);
|
|
17558
17657
|
}
|
|
17658
|
+
/**
|
|
17659
|
+
* 是否显示部件头部
|
|
17660
|
+
* @author lxm
|
|
17661
|
+
* @date 2023-08-02 07:54:18
|
|
17662
|
+
* @protected
|
|
17663
|
+
* @return {*} {boolean}
|
|
17664
|
+
*/
|
|
17665
|
+
calcControlHeaderVisible() {
|
|
17666
|
+
const hasToolbar = !!this.toolbarController;
|
|
17667
|
+
if (!hasToolbar && this.layoutPanel) {
|
|
17668
|
+
const controller = this.layoutPanel.panelItems.control_toolbar;
|
|
17669
|
+
if (controller) {
|
|
17670
|
+
controller.state.visible = false;
|
|
17671
|
+
}
|
|
17672
|
+
}
|
|
17673
|
+
return hasToolbar || !!(this.model.showTitleBar && this.model.title);
|
|
17674
|
+
}
|
|
17559
17675
|
};
|
|
17560
17676
|
|
|
17561
17677
|
// src/controller/control/exp-bar/chart-exp-bar.controller.ts
|
|
@@ -19589,17 +19705,22 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
19589
19705
|
* @author lxm
|
|
19590
19706
|
* @date 2023-11-11 08:01:49
|
|
19591
19707
|
*/
|
|
19592
|
-
create() {
|
|
19708
|
+
create(index) {
|
|
19593
19709
|
const context = this.context.clone();
|
|
19594
19710
|
const params = { ...this.params };
|
|
19595
19711
|
if (!this.state.items) {
|
|
19596
19712
|
this.state.items = [];
|
|
19597
19713
|
}
|
|
19598
|
-
|
|
19714
|
+
const item = {
|
|
19599
19715
|
id: createUUID9(),
|
|
19600
19716
|
context,
|
|
19601
19717
|
params
|
|
19602
|
-
}
|
|
19718
|
+
};
|
|
19719
|
+
if (index !== void 0) {
|
|
19720
|
+
this.state.items.splice(index, 0, item);
|
|
19721
|
+
} else {
|
|
19722
|
+
this.state.items.push(item);
|
|
19723
|
+
}
|
|
19603
19724
|
}
|
|
19604
19725
|
refresh() {
|
|
19605
19726
|
this.fetchData();
|
|
@@ -19614,7 +19735,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
19614
19735
|
|
|
19615
19736
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts
|
|
19616
19737
|
import { ModelError as ModelError27 } from "@ibiz-template/core";
|
|
19617
|
-
import { clone as
|
|
19738
|
+
import { clone as clone20 } from "ramda";
|
|
19618
19739
|
var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
19619
19740
|
constructor() {
|
|
19620
19741
|
super(...arguments);
|
|
@@ -19706,7 +19827,7 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
19706
19827
|
copyFields.forEach((key) => {
|
|
19707
19828
|
tempForm[key] = this.form.model[key];
|
|
19708
19829
|
});
|
|
19709
|
-
this.repeatedForm =
|
|
19830
|
+
this.repeatedForm = clone20(tempForm);
|
|
19710
19831
|
}
|
|
19711
19832
|
/**
|
|
19712
19833
|
* 设置重复器数据(修改主表单里重复器对应属性)
|
|
@@ -19722,13 +19843,17 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
19722
19843
|
* @author lxm
|
|
19723
19844
|
* @date 2023-11-22 04:50:19
|
|
19724
19845
|
*/
|
|
19725
|
-
create() {
|
|
19846
|
+
create(index) {
|
|
19726
19847
|
if (this.isSingleData) {
|
|
19727
19848
|
this.setValue({});
|
|
19728
19849
|
} else {
|
|
19729
19850
|
let tempValue = this.value;
|
|
19730
19851
|
tempValue = tempValue ? [...tempValue] : [];
|
|
19731
|
-
|
|
19852
|
+
if (index !== void 0) {
|
|
19853
|
+
tempValue.splice(index, 0, {});
|
|
19854
|
+
} else {
|
|
19855
|
+
tempValue.push({});
|
|
19856
|
+
}
|
|
19732
19857
|
this.setValue(tempValue);
|
|
19733
19858
|
}
|
|
19734
19859
|
}
|
|
@@ -19833,7 +19958,7 @@ import {
|
|
|
19833
19958
|
} from "@ibiz-template/core";
|
|
19834
19959
|
import { debounce as debounce2 } from "lodash-es";
|
|
19835
19960
|
import { createUUID as createUUID10 } from "qx-util";
|
|
19836
|
-
import { clone as
|
|
19961
|
+
import { clone as clone21 } from "ramda";
|
|
19837
19962
|
|
|
19838
19963
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
19839
19964
|
import {
|
|
@@ -20180,8 +20305,8 @@ var EditFormController = class extends FormController {
|
|
|
20180
20305
|
* @return {*} {Promise<IData>}
|
|
20181
20306
|
*/
|
|
20182
20307
|
async copy() {
|
|
20183
|
-
const context =
|
|
20184
|
-
const queryParams =
|
|
20308
|
+
const context = clone21(this.context);
|
|
20309
|
+
const queryParams = clone21(this.params);
|
|
20185
20310
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
20186
20311
|
this.model.appDataEntityId
|
|
20187
20312
|
);
|
|
@@ -20237,7 +20362,7 @@ var EditFormController = class extends FormController {
|
|
|
20237
20362
|
return this.loadDraft();
|
|
20238
20363
|
}
|
|
20239
20364
|
const { context, params } = this.handlerAbilityParams(args);
|
|
20240
|
-
const queryParams =
|
|
20365
|
+
const queryParams = clone21(params);
|
|
20241
20366
|
let res;
|
|
20242
20367
|
try {
|
|
20243
20368
|
await this.startLoading();
|
|
@@ -20757,7 +20882,7 @@ import {
|
|
|
20757
20882
|
RuntimeError as RuntimeError51,
|
|
20758
20883
|
RuntimeModelError as RuntimeModelError56
|
|
20759
20884
|
} from "@ibiz-template/core";
|
|
20760
|
-
import { clone as
|
|
20885
|
+
import { clone as clone22 } from "ramda";
|
|
20761
20886
|
|
|
20762
20887
|
// src/controller/control/grid/grid/grid.service.ts
|
|
20763
20888
|
var GridService = class extends MDControlService {
|
|
@@ -21424,7 +21549,7 @@ var GridController = class extends MDControlController {
|
|
|
21424
21549
|
throw new RuntimeError51("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
21425
21550
|
}
|
|
21426
21551
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
21427
|
-
row.cacheData =
|
|
21552
|
+
row.cacheData = clone22(row.data);
|
|
21428
21553
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
21429
21554
|
Object.assign(row.data, defaultVal);
|
|
21430
21555
|
}
|
|
@@ -21587,7 +21712,7 @@ var GridController = class extends MDControlController {
|
|
|
21587
21712
|
}
|
|
21588
21713
|
});
|
|
21589
21714
|
}
|
|
21590
|
-
const cloneData =
|
|
21715
|
+
const cloneData = clone22(
|
|
21591
21716
|
data2.map((item) => {
|
|
21592
21717
|
return item.getOrigin();
|
|
21593
21718
|
})
|
|
@@ -21712,13 +21837,26 @@ var GridController = class extends MDControlController {
|
|
|
21712
21837
|
const index = this.findRowStateIndex(data);
|
|
21713
21838
|
return index !== -1 ? this.state.rows[index] : void 0;
|
|
21714
21839
|
}
|
|
21840
|
+
/**
|
|
21841
|
+
* 行单击事件
|
|
21842
|
+
*
|
|
21843
|
+
* @author lxm
|
|
21844
|
+
* @date 2022-08-18 22:08:16
|
|
21845
|
+
* @param {IData} data 选中的单条数据
|
|
21846
|
+
*/
|
|
21847
|
+
async onRowClick(data) {
|
|
21848
|
+
this.setSelection([data]);
|
|
21849
|
+
if (this.state.mdctrlActiveMode === 1) {
|
|
21850
|
+
await this.setActive(data);
|
|
21851
|
+
}
|
|
21852
|
+
}
|
|
21715
21853
|
};
|
|
21716
21854
|
|
|
21717
21855
|
// src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
|
|
21718
21856
|
import { DataTypes as DataTypes3, ModelError as ModelError28, plus as plus2 } from "@ibiz-template/core";
|
|
21719
21857
|
import dayjs4 from "dayjs";
|
|
21720
21858
|
import { debounce as debounce3 } from "lodash-es";
|
|
21721
|
-
import { clone as
|
|
21859
|
+
import { clone as clone23, isNil as isNil22 } from "ramda";
|
|
21722
21860
|
var GridFieldColumnController = class extends GridColumnController {
|
|
21723
21861
|
constructor() {
|
|
21724
21862
|
super(...arguments);
|
|
@@ -21822,7 +21960,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
21822
21960
|
srfkey: value,
|
|
21823
21961
|
...wfContext
|
|
21824
21962
|
});
|
|
21825
|
-
const tempParams =
|
|
21963
|
+
const tempParams = clone23(this.params);
|
|
21826
21964
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
21827
21965
|
row.data,
|
|
21828
21966
|
tempContext,
|
|
@@ -22148,6 +22286,18 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
22148
22286
|
* @param {string[]} names 变更属性名称
|
|
22149
22287
|
*/
|
|
22150
22288
|
async dataChangeNotify(row, names) {
|
|
22289
|
+
const { resetItemNames } = this.editItem;
|
|
22290
|
+
let isReset = false;
|
|
22291
|
+
if (resetItemNames && resetItemNames.length > 0) {
|
|
22292
|
+
resetItemNames.forEach((resetItemName) => {
|
|
22293
|
+
if (names.includes(resetItemName)) {
|
|
22294
|
+
isReset = true;
|
|
22295
|
+
}
|
|
22296
|
+
});
|
|
22297
|
+
}
|
|
22298
|
+
if (isReset) {
|
|
22299
|
+
this.setRowValue(row, null);
|
|
22300
|
+
}
|
|
22151
22301
|
this.calcColumnDisabled(row);
|
|
22152
22302
|
const oldRequired = row.editColStates[this.fieldName].required;
|
|
22153
22303
|
this.calcColumnRequired(row);
|
|
@@ -23897,7 +24047,7 @@ var TreeService = class extends MDControlService {
|
|
|
23897
24047
|
const { resultContext, resultParams } = calcNavParams(
|
|
23898
24048
|
{
|
|
23899
24049
|
deName,
|
|
23900
|
-
navFilter: navFilter ? "n_".concat(navFilter, "_eq") : void 0,
|
|
24050
|
+
navFilter: navFilter ? "n_".concat(navFilter.toLowerCase(), "_eq") : void 0,
|
|
23901
24051
|
pickupDEFName,
|
|
23902
24052
|
navParams,
|
|
23903
24053
|
navContexts
|
|
@@ -24001,6 +24151,13 @@ var TreeController = class extends MDControlController {
|
|
|
24001
24151
|
* @type {{ [p: string]: ContextMenuController }}
|
|
24002
24152
|
*/
|
|
24003
24153
|
this.contextMenus = {};
|
|
24154
|
+
/**
|
|
24155
|
+
* 是否启用快速搜索
|
|
24156
|
+
* @author lxm
|
|
24157
|
+
* @date 2023-12-04 03:33:32
|
|
24158
|
+
* @type {boolean}
|
|
24159
|
+
*/
|
|
24160
|
+
this.enableQuickSearch = false;
|
|
24004
24161
|
}
|
|
24005
24162
|
initState() {
|
|
24006
24163
|
super.initState();
|
|
@@ -24008,15 +24165,41 @@ var TreeController = class extends MDControlController {
|
|
|
24008
24165
|
this.state.expandedKeys = [];
|
|
24009
24166
|
this.state.navigational = false;
|
|
24010
24167
|
this.state.size = 0;
|
|
24168
|
+
this.state.query = "";
|
|
24011
24169
|
}
|
|
24012
24170
|
async onCreated() {
|
|
24171
|
+
var _a, _b;
|
|
24013
24172
|
await super.onCreated();
|
|
24014
24173
|
this.state.expandedKeys = [...this.state.defaultExpandedKeys];
|
|
24174
|
+
if ((_a = this.model.detreeNodes) == null ? void 0 : _a[0].enableQuickSearch) {
|
|
24175
|
+
this.enableQuickSearch = true;
|
|
24176
|
+
}
|
|
24177
|
+
if (this.dataEntity) {
|
|
24178
|
+
const searchFields = (_b = this.dataEntity.appDEFields) == null ? void 0 : _b.filter((field) => {
|
|
24179
|
+
return field.enableQuickSearch;
|
|
24180
|
+
});
|
|
24181
|
+
const placeHolders = [];
|
|
24182
|
+
searchFields == null ? void 0 : searchFields.forEach((searchField) => {
|
|
24183
|
+
if ((searchField == null ? void 0 : searchField.lnlanguageRes) && searchField.lnlanguageRes.lanResTag) {
|
|
24184
|
+
placeHolders.push(
|
|
24185
|
+
ibiz.i18n.t(
|
|
24186
|
+
searchField.lnlanguageRes.lanResTag,
|
|
24187
|
+
searchField.logicName
|
|
24188
|
+
)
|
|
24189
|
+
);
|
|
24190
|
+
} else if (searchField == null ? void 0 : searchField.logicName) {
|
|
24191
|
+
placeHolders.push(searchField.logicName);
|
|
24192
|
+
}
|
|
24193
|
+
});
|
|
24194
|
+
if (placeHolders.length > 0) {
|
|
24195
|
+
this.state.placeHolder = placeHolders.join("\u3001");
|
|
24196
|
+
}
|
|
24197
|
+
}
|
|
24015
24198
|
this.service = new TreeService(this.model);
|
|
24016
24199
|
await this.service.init(this.context);
|
|
24017
24200
|
this.model.detreeNodes.forEach((node) => {
|
|
24018
|
-
var
|
|
24019
|
-
if ((
|
|
24201
|
+
var _a2, _b2;
|
|
24202
|
+
if ((_b2 = (_a2 = node.decontextMenu) == null ? void 0 : _a2.detoolbarItems) == null ? void 0 : _b2.length) {
|
|
24020
24203
|
this.contextMenus[node.decontextMenu.id] = new ContextMenuController(
|
|
24021
24204
|
node.decontextMenu,
|
|
24022
24205
|
this.context,
|
|
@@ -24055,6 +24238,13 @@ var TreeController = class extends MDControlController {
|
|
|
24055
24238
|
});
|
|
24056
24239
|
return nodes;
|
|
24057
24240
|
}
|
|
24241
|
+
async getFetchParams(extraParams) {
|
|
24242
|
+
const params = await super.getFetchParams(extraParams);
|
|
24243
|
+
if (this.state.query) {
|
|
24244
|
+
params.query = this.state.query;
|
|
24245
|
+
}
|
|
24246
|
+
return params;
|
|
24247
|
+
}
|
|
24058
24248
|
/**
|
|
24059
24249
|
* 加载子节点数据
|
|
24060
24250
|
*
|
|
@@ -26839,7 +27029,7 @@ var ViewEngineBase = class {
|
|
|
26839
27029
|
|
|
26840
27030
|
// src/engine/md-view.engine.ts
|
|
26841
27031
|
import { RuntimeModelError as RuntimeModelError61 } from "@ibiz-template/core";
|
|
26842
|
-
import { clone as
|
|
27032
|
+
import { clone as clone24 } from "ramda";
|
|
26843
27033
|
var MDViewEngine = class extends ViewEngineBase {
|
|
26844
27034
|
/**
|
|
26845
27035
|
* 多数据部件名称
|
|
@@ -27047,7 +27237,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
27047
27237
|
if (!openAppViewLogic) {
|
|
27048
27238
|
throw new RuntimeModelError61(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
27049
27239
|
}
|
|
27050
|
-
const params =
|
|
27240
|
+
const params = clone24(this.view.params);
|
|
27051
27241
|
if (copyMode) {
|
|
27052
27242
|
params.srfcopymode = copyMode;
|
|
27053
27243
|
}
|
|
@@ -27270,6 +27460,13 @@ var GlobalUtil = class {
|
|
|
27270
27460
|
* @date 2023-04-27 21:04:46
|
|
27271
27461
|
*/
|
|
27272
27462
|
this.layoutPanel = new LayoutPanelUtil();
|
|
27463
|
+
/**
|
|
27464
|
+
* 主题设置工具
|
|
27465
|
+
*
|
|
27466
|
+
* @author chitanda
|
|
27467
|
+
* @date 2023-12-02 23:12:27
|
|
27468
|
+
*/
|
|
27469
|
+
this.theme = new ThemeUtil();
|
|
27273
27470
|
/**
|
|
27274
27471
|
* 文本工具
|
|
27275
27472
|
*
|
|
@@ -28620,6 +28817,7 @@ export {
|
|
|
28620
28817
|
SysUIActionTag,
|
|
28621
28818
|
TabExpPanelController,
|
|
28622
28819
|
TextUtil,
|
|
28820
|
+
ThemeUtil,
|
|
28623
28821
|
ToolbarController,
|
|
28624
28822
|
TreeCodeListNodeData,
|
|
28625
28823
|
TreeController,
|
|
@@ -28634,6 +28832,7 @@ export {
|
|
|
28634
28832
|
TreeStaticNodeData,
|
|
28635
28833
|
UIACTION_PROVIDER_PREFIX,
|
|
28636
28834
|
UIActionButtonState,
|
|
28835
|
+
UIActionProviderBase,
|
|
28637
28836
|
UIActionUtil,
|
|
28638
28837
|
UILOGINNODE_PROVIDER_PREFIX,
|
|
28639
28838
|
UIMapField,
|