@ibiz-template/runtime 0.4.4 → 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 +115 -63
- package/dist/index.system.min.js +2 -3
- 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 +10 -2
- package/out/controller/control/toolbar/toolbar.controllerr.d.ts.map +1 -1
- package/out/controller/control/toolbar/toolbar.controllerr.js +3 -0
- package/out/model/utils/util.d.ts +4 -2
- package/out/model/utils/util.d.ts.map +1 -1
- 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/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/theme-util/theme-util.d.ts +11 -0
- package/out/utils/theme-util/theme-util.d.ts.map +1 -1
- package/out/utils/theme-util/theme-util.js +36 -2
- package/package.json +5 -5
- package/src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts +10 -2
- package/src/controller/control/toolbar/toolbar.controllerr.ts +3 -0
- package/src/model/utils/util.ts +4 -1
- package/src/service/utils/dynamic-code-list/dynamic-code-list.ts +9 -3
- package/src/ui-action/provider/index.ts +2 -0
- package/src/utils/theme-util/theme-util.ts +40 -2
- package/dist/index.system.min.js.map +0 -1
package/dist/index.esm.js
CHANGED
|
@@ -2580,6 +2580,7 @@ var TextUtil = class {
|
|
|
2580
2580
|
};
|
|
2581
2581
|
|
|
2582
2582
|
// src/utils/theme-util/theme-util.ts
|
|
2583
|
+
import { clone as clone2 } from "ramda";
|
|
2583
2584
|
var ThemeUtil = class {
|
|
2584
2585
|
constructor() {
|
|
2585
2586
|
/**
|
|
@@ -2601,14 +2602,47 @@ var ThemeUtil = class {
|
|
|
2601
2602
|
* @return {*} {Promise<void>}
|
|
2602
2603
|
*/
|
|
2603
2604
|
async loadTheme(theme) {
|
|
2604
|
-
const data = theme.themeParams || {};
|
|
2605
|
+
const data = clone2(theme.themeParams || {});
|
|
2606
|
+
const path2 = data["theme-package-path"];
|
|
2607
|
+
delete data.appId;
|
|
2608
|
+
delete data["theme-package-path"];
|
|
2605
2609
|
await ibiz.plugin.loadPlugin({
|
|
2606
2610
|
runtimeObject: true,
|
|
2607
2611
|
rtobjectName: theme.name,
|
|
2608
|
-
rtobjectRepo:
|
|
2612
|
+
rtobjectRepo: path2
|
|
2609
2613
|
});
|
|
2614
|
+
this.setThemeParams(theme, data);
|
|
2610
2615
|
this.setTheme(theme.themeTag);
|
|
2611
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
|
+
}
|
|
2612
2646
|
/**
|
|
2613
2647
|
* 设置主题
|
|
2614
2648
|
*
|
|
@@ -2689,7 +2723,7 @@ async function handleAllSettled(values, isThrow = true) {
|
|
|
2689
2723
|
|
|
2690
2724
|
// src/command/app/open-app-view/open-app-view.ts
|
|
2691
2725
|
import { ModelError as ModelError14, RuntimeError as RuntimeError21 } from "@ibiz-template/core";
|
|
2692
|
-
import { clone as
|
|
2726
|
+
import { clone as clone14 } from "ramda";
|
|
2693
2727
|
|
|
2694
2728
|
// src/service/utils/de-dq-cond/ps-de-dq-cond-engine.ts
|
|
2695
2729
|
import { isEmpty as isEmpty3 } from "ramda";
|
|
@@ -3650,7 +3684,7 @@ async function getDEMethodProvider(model) {
|
|
|
3650
3684
|
// src/service/utils/app-counter/app-counter.ts
|
|
3651
3685
|
import { IBizContext, RuntimeError as RuntimeError11 } from "@ibiz-template/core";
|
|
3652
3686
|
import { notNilEmpty as notNilEmpty5, QXEvent } from "qx-util";
|
|
3653
|
-
import { clone as
|
|
3687
|
+
import { clone as clone3 } from "ramda";
|
|
3654
3688
|
var AppCounter = class {
|
|
3655
3689
|
/**
|
|
3656
3690
|
* Creates an instance of AppCounter.
|
|
@@ -3710,10 +3744,10 @@ var AppCounter = class {
|
|
|
3710
3744
|
*/
|
|
3711
3745
|
setParams(context, params) {
|
|
3712
3746
|
if (context) {
|
|
3713
|
-
this.context =
|
|
3747
|
+
this.context = clone3(context);
|
|
3714
3748
|
}
|
|
3715
3749
|
if (params) {
|
|
3716
|
-
this.params =
|
|
3750
|
+
this.params = clone3(params);
|
|
3717
3751
|
}
|
|
3718
3752
|
}
|
|
3719
3753
|
/**
|
|
@@ -4041,9 +4075,15 @@ var DynamicCodeListCache = class {
|
|
|
4041
4075
|
result.disableSelect = data[disableAppDEFieldId];
|
|
4042
4076
|
}
|
|
4043
4077
|
if (dataAppDEFieldId && data[dataAppDEFieldId]) {
|
|
4044
|
-
|
|
4045
|
-
data
|
|
4046
|
-
|
|
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
|
+
}
|
|
4047
4087
|
}
|
|
4048
4088
|
return result;
|
|
4049
4089
|
}
|
|
@@ -4182,7 +4222,7 @@ var DynamicCodeListCache = class {
|
|
|
4182
4222
|
};
|
|
4183
4223
|
|
|
4184
4224
|
// src/service/utils/de-cache/de-cache.ts
|
|
4185
|
-
import { where, equals, clone as
|
|
4225
|
+
import { where, equals, clone as clone4, isNil as isNil5, isEmpty as isEmpty5 } from "ramda";
|
|
4186
4226
|
import { createUUID } from "qx-util";
|
|
4187
4227
|
|
|
4188
4228
|
// src/service/utils/service-exist-util/service-exist-util.ts
|
|
@@ -4243,7 +4283,7 @@ var DECache = class {
|
|
|
4243
4283
|
*/
|
|
4244
4284
|
forceUpdate(context, entity) {
|
|
4245
4285
|
const map = this.getCacheByTag(context);
|
|
4246
|
-
map.set(entity.srfkey,
|
|
4286
|
+
map.set(entity.srfkey, clone4(entity));
|
|
4247
4287
|
ibiz.log.warn("forceUpdate", entity.srfkey, entity);
|
|
4248
4288
|
}
|
|
4249
4289
|
/**
|
|
@@ -4275,7 +4315,7 @@ var DECache = class {
|
|
|
4275
4315
|
}
|
|
4276
4316
|
entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
4277
4317
|
const map = this.getCacheByTag(context);
|
|
4278
|
-
map.set(entity.srfkey,
|
|
4318
|
+
map.set(entity.srfkey, clone4(entity));
|
|
4279
4319
|
ibiz.log.warn("add", entity.srfkey, entity);
|
|
4280
4320
|
return entity;
|
|
4281
4321
|
} catch (err) {
|
|
@@ -4297,7 +4337,7 @@ var DECache = class {
|
|
|
4297
4337
|
const map = this.getCacheByTag(context);
|
|
4298
4338
|
const data = map.get(srfKey);
|
|
4299
4339
|
ibiz.log.warn("get", srfKey, data);
|
|
4300
|
-
return
|
|
4340
|
+
return clone4(data);
|
|
4301
4341
|
} catch (err) {
|
|
4302
4342
|
ibiz.log.error(err);
|
|
4303
4343
|
return null;
|
|
@@ -4322,7 +4362,7 @@ var DECache = class {
|
|
|
4322
4362
|
data.assign(entity);
|
|
4323
4363
|
map.set(entity.srfkey, data);
|
|
4324
4364
|
ibiz.log.warn("update", entity.srfkey, entity);
|
|
4325
|
-
return
|
|
4365
|
+
return clone4(data);
|
|
4326
4366
|
}
|
|
4327
4367
|
throw new Error("\u6570\u636E\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u66F4\u65B0!");
|
|
4328
4368
|
} catch (err) {
|
|
@@ -4375,7 +4415,7 @@ var DECache = class {
|
|
|
4375
4415
|
entity.srfkey = createUUID();
|
|
4376
4416
|
}
|
|
4377
4417
|
entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
4378
|
-
const data =
|
|
4418
|
+
const data = clone4(entity);
|
|
4379
4419
|
map.set(entity.srfkey, data);
|
|
4380
4420
|
entities[i] = data;
|
|
4381
4421
|
ibiz.log.warn("add", entity.srfkey, entity);
|
|
@@ -4408,7 +4448,7 @@ var DECache = class {
|
|
|
4408
4448
|
data.assign(entity);
|
|
4409
4449
|
map.set(entity.srfkey, data);
|
|
4410
4450
|
ibiz.log.warn("update", entity.srfkey, entity);
|
|
4411
|
-
entities[i] =
|
|
4451
|
+
entities[i] = clone4(data);
|
|
4412
4452
|
} else {
|
|
4413
4453
|
throw new Error(
|
|
4414
4454
|
"\u6570\u636E[".concat(entity.srfdename, "-").concat(entity.srfmajortext, "(").concat(entity.srfkey, ")]\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u66F4\u65B0!")
|
|
@@ -5512,11 +5552,11 @@ var DEService = class {
|
|
|
5512
5552
|
};
|
|
5513
5553
|
|
|
5514
5554
|
// src/service/service/control/control.service.ts
|
|
5515
|
-
import { clone as
|
|
5555
|
+
import { clone as clone6 } from "@ibiz-template/core";
|
|
5516
5556
|
|
|
5517
5557
|
// src/service/vo/control.vo.ts
|
|
5518
5558
|
import { createUUID as createUUID2 } from "qx-util";
|
|
5519
|
-
import { clone as
|
|
5559
|
+
import { clone as clone5, isNil as isNil7 } from "ramda";
|
|
5520
5560
|
|
|
5521
5561
|
// src/service/constant/srfuf.ts
|
|
5522
5562
|
var Srfuf = /* @__PURE__ */ ((Srfuf2) => {
|
|
@@ -5713,7 +5753,7 @@ var ControlVO = class _ControlVO {
|
|
|
5713
5753
|
* @return {*} {ControlVO}
|
|
5714
5754
|
*/
|
|
5715
5755
|
clone() {
|
|
5716
|
-
const cloneOrigin =
|
|
5756
|
+
const cloneOrigin = clone5(this.$origin);
|
|
5717
5757
|
const newVal = new _ControlVO(cloneOrigin, this.$dataUIMap);
|
|
5718
5758
|
Object.keys(this).forEach((key) => {
|
|
5719
5759
|
newVal[key] = this[key];
|
|
@@ -5790,7 +5830,7 @@ var ControlService = class {
|
|
|
5790
5830
|
* @returns {*} {IHttpResponse}
|
|
5791
5831
|
*/
|
|
5792
5832
|
handleResponse(res) {
|
|
5793
|
-
return
|
|
5833
|
+
return clone6(res);
|
|
5794
5834
|
}
|
|
5795
5835
|
/**
|
|
5796
5836
|
* 实体数据转ui数据
|
|
@@ -6238,7 +6278,7 @@ import { RuntimeModelError as RuntimeModelError8 } from "@ibiz-template/core";
|
|
|
6238
6278
|
import { isArray as isArray4 } from "lodash-es";
|
|
6239
6279
|
|
|
6240
6280
|
// src/service/app-data-entity/app-data-entity.ts
|
|
6241
|
-
import { clone as
|
|
6281
|
+
import { clone as clone7, isNil as isNil9 } from "ramda";
|
|
6242
6282
|
import { DataTypes } from "@ibiz-template/core";
|
|
6243
6283
|
import { createUUID as createUUID3 } from "qx-util";
|
|
6244
6284
|
var AppDataEntity = class _AppDataEntity {
|
|
@@ -6262,7 +6302,7 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
6262
6302
|
Object.defineProperty(this, "_data", {
|
|
6263
6303
|
enumerable: false,
|
|
6264
6304
|
configurable: true,
|
|
6265
|
-
value: data instanceof _AppDataEntity ?
|
|
6305
|
+
value: data instanceof _AppDataEntity ? clone7(data._data) : clone7(data)
|
|
6266
6306
|
});
|
|
6267
6307
|
Object.defineProperty(this, "srfdeid", {
|
|
6268
6308
|
get() {
|
|
@@ -6824,7 +6864,7 @@ var Method = class {
|
|
|
6824
6864
|
// src/de-logic/index.ts
|
|
6825
6865
|
import { HttpError as HttpError3, HttpResponse as HttpResponse2, RuntimeError as RuntimeError18 } from "@ibiz-template/core";
|
|
6826
6866
|
import { isArray as isArray6 } from "lodash-es";
|
|
6827
|
-
import { clone as
|
|
6867
|
+
import { clone as clone12 } from "ramda";
|
|
6828
6868
|
|
|
6829
6869
|
// src/de-logic/de-logic.ts
|
|
6830
6870
|
import { ModelError as ModelError12, RuntimeModelError as RuntimeModelError18 } from "@ibiz-template/core";
|
|
@@ -7253,11 +7293,11 @@ var EndNode = class extends DELogicNode {
|
|
|
7253
7293
|
|
|
7254
7294
|
// src/de-logic/de-logic-node/prepare-param-node/prepare-param-node.ts
|
|
7255
7295
|
import { ModelError as ModelError10 } from "@ibiz-template/core";
|
|
7256
|
-
import { clone as
|
|
7296
|
+
import { clone as clone9 } from "ramda";
|
|
7257
7297
|
|
|
7258
7298
|
// src/de-logic/utils/handle-src-val.ts
|
|
7259
7299
|
import { ModelError as ModelError9 } from "@ibiz-template/core";
|
|
7260
|
-
import { clone as
|
|
7300
|
+
import { clone as clone8 } from "ramda";
|
|
7261
7301
|
function handleSrcVal(ctx, srcValParams) {
|
|
7262
7302
|
const { srcDELogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
7263
7303
|
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
@@ -7287,7 +7327,7 @@ function handleSrcVal(ctx, srcValParams) {
|
|
|
7287
7327
|
value = ctx.parameters.context;
|
|
7288
7328
|
break;
|
|
7289
7329
|
case "ENVPARAM":
|
|
7290
|
-
value =
|
|
7330
|
+
value = clone8(ibiz.env);
|
|
7291
7331
|
break;
|
|
7292
7332
|
default:
|
|
7293
7333
|
throw new ModelError9(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
@@ -7358,7 +7398,7 @@ var PrepareParamNode = class extends DELogicNode {
|
|
|
7358
7398
|
copyParam(nodeParam, ctx) {
|
|
7359
7399
|
const { dstDELogicParamId } = nodeParam;
|
|
7360
7400
|
const srcVal = handleSrcVal(ctx, nodeParam);
|
|
7361
|
-
ctx.params[dstDELogicParamId] =
|
|
7401
|
+
ctx.params[dstDELogicParamId] = clone9(srcVal);
|
|
7362
7402
|
}
|
|
7363
7403
|
/**
|
|
7364
7404
|
* 绑定参数
|
|
@@ -7520,7 +7560,7 @@ var RenewParamNode = class extends DELogicNode {
|
|
|
7520
7560
|
|
|
7521
7561
|
// src/de-logic/de-logic-node/copy-param-node/copy-param-node.ts
|
|
7522
7562
|
import { RuntimeModelError as RuntimeModelError15 } from "@ibiz-template/core";
|
|
7523
|
-
import { clone as
|
|
7563
|
+
import { clone as clone10 } from "ramda";
|
|
7524
7564
|
var CopyParamNode = class extends DELogicNode {
|
|
7525
7565
|
async exec(ctx) {
|
|
7526
7566
|
const { dstDELogicParamId, srcDELogicParamId } = this.model;
|
|
@@ -7531,7 +7571,7 @@ var CopyParamNode = class extends DELogicNode {
|
|
|
7531
7571
|
);
|
|
7532
7572
|
}
|
|
7533
7573
|
const srcVal = handleSrcVal(ctx, this.model);
|
|
7534
|
-
ctx.params[dstDELogicParamId] =
|
|
7574
|
+
ctx.params[dstDELogicParamId] = clone10(srcVal);
|
|
7535
7575
|
}
|
|
7536
7576
|
};
|
|
7537
7577
|
|
|
@@ -7597,7 +7637,7 @@ var ThrowExceptionNode = class extends DELogicNode {
|
|
|
7597
7637
|
|
|
7598
7638
|
// src/de-logic/de-logic-param/de-logic-param.ts
|
|
7599
7639
|
import { ModelError as ModelError11 } from "@ibiz-template/core";
|
|
7600
|
-
import { clone as
|
|
7640
|
+
import { clone as clone11 } from "ramda";
|
|
7601
7641
|
var DELogicParam = class {
|
|
7602
7642
|
/**
|
|
7603
7643
|
* Creates an instance of DELogicParam.
|
|
@@ -7629,7 +7669,7 @@ var DELogicParam = class {
|
|
|
7629
7669
|
ctx.params[tag] = ctx.data[0] || {};
|
|
7630
7670
|
}
|
|
7631
7671
|
} else if (m.appGlobalParam) {
|
|
7632
|
-
ctx.params[tag] =
|
|
7672
|
+
ctx.params[tag] = clone11(ibiz.env);
|
|
7633
7673
|
} else if (m.entityListParam) {
|
|
7634
7674
|
ctx.params[tag] = [];
|
|
7635
7675
|
} else if (m.entityPageParam) {
|
|
@@ -7645,7 +7685,7 @@ var DELogicParam = class {
|
|
|
7645
7685
|
} else if (m.simpleParam) {
|
|
7646
7686
|
ctx.params[tag] = {};
|
|
7647
7687
|
} else if (m.cloneParam) {
|
|
7648
|
-
ctx.params[tag] =
|
|
7688
|
+
ctx.params[tag] = clone11(ctx.data || {});
|
|
7649
7689
|
} else if (m.envParam) {
|
|
7650
7690
|
throw new ModelError11(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u7CFB\u7EDF\u73AF\u5883\u53D8\u91CF");
|
|
7651
7691
|
} else if (m.fileListParam) {
|
|
@@ -7880,9 +7920,9 @@ async function execDELogicById(deDELogicId, dataEntityId, context, data, params)
|
|
|
7880
7920
|
return execDELogic(deLogic, context, data, params);
|
|
7881
7921
|
}
|
|
7882
7922
|
async function execDELogicAction(deDELogic, context, data, params) {
|
|
7883
|
-
const _context =
|
|
7884
|
-
const _data = data ?
|
|
7885
|
-
const _params = params ?
|
|
7923
|
+
const _context = clone12(context);
|
|
7924
|
+
const _data = data ? clone12(data) : data;
|
|
7925
|
+
const _params = params ? clone12(params) : params;
|
|
7886
7926
|
try {
|
|
7887
7927
|
const result = await execDELogic(deDELogic, _context, _data, _params);
|
|
7888
7928
|
return new HttpResponse2(result);
|
|
@@ -8284,7 +8324,7 @@ import {
|
|
|
8284
8324
|
RuntimeModelError as RuntimeModelError20
|
|
8285
8325
|
} from "@ibiz-template/core";
|
|
8286
8326
|
import { ascSort, descSort } from "qx-util";
|
|
8287
|
-
import { clone as
|
|
8327
|
+
import { clone as clone13, equals as equals2, isEmpty as isEmpty7, isNil as isNil11, where as where2 } from "ramda";
|
|
8288
8328
|
import { isArray as isArray8 } from "lodash-es";
|
|
8289
8329
|
var FetchMethod = class extends Method {
|
|
8290
8330
|
get isLocalMode() {
|
|
@@ -8428,7 +8468,7 @@ var FetchMethod = class extends Method {
|
|
|
8428
8468
|
const { page, size } = filter;
|
|
8429
8469
|
const start = page * size;
|
|
8430
8470
|
const end = (page + 1) * size - 1;
|
|
8431
|
-
const items = list.slice(start, end).map((item) =>
|
|
8471
|
+
const items = list.slice(start, end).map((item) => clone13(item));
|
|
8432
8472
|
return items;
|
|
8433
8473
|
}
|
|
8434
8474
|
/**
|
|
@@ -9187,7 +9227,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
9187
9227
|
* @return {*} {(Promise<IModalData | void>)}
|
|
9188
9228
|
*/
|
|
9189
9229
|
async exec(appViewId, _context, params = {}, opts = {}) {
|
|
9190
|
-
const context =
|
|
9230
|
+
const context = clone14(_context);
|
|
9191
9231
|
const appView = await ibiz.hub.config.view.get(appViewId);
|
|
9192
9232
|
if (!appView) {
|
|
9193
9233
|
throw new RuntimeError21("\u5E94\u7528\u89C6\u56FE[".concat(appViewId, "]\u4E0D\u5B58\u5728"));
|
|
@@ -11612,7 +11652,7 @@ var CodeListEditorController = class extends EditorController {
|
|
|
11612
11652
|
|
|
11613
11653
|
// src/controller/common/control/control.controller.ts
|
|
11614
11654
|
import { IBizContext as IBizContext3, IBizParams, NoticeError } from "@ibiz-template/core";
|
|
11615
|
-
import { clone as
|
|
11655
|
+
import { clone as clone15, isNil as isNil19 } from "ramda";
|
|
11616
11656
|
import { notNilEmpty as notNilEmpty7 } from "qx-util";
|
|
11617
11657
|
var ControlController = class extends BaseController {
|
|
11618
11658
|
/**
|
|
@@ -11654,7 +11694,7 @@ var ControlController = class extends BaseController {
|
|
|
11654
11694
|
"".concat(model.controlType, "_DEFAULT")
|
|
11655
11695
|
);
|
|
11656
11696
|
if (panelModel) {
|
|
11657
|
-
this.controlPanel =
|
|
11697
|
+
this.controlPanel = clone15(panelModel);
|
|
11658
11698
|
}
|
|
11659
11699
|
}
|
|
11660
11700
|
this.updateContextParams({});
|
|
@@ -12733,7 +12773,7 @@ import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
|
12733
12773
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
12734
12774
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
12735
12775
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
12736
|
-
import { clone as
|
|
12776
|
+
import { clone as clone16, isNil as isNil20, mergeDeepRight } from "ramda";
|
|
12737
12777
|
dayjs3.extend(minMax);
|
|
12738
12778
|
dayjs3.extend(isSameOrBefore);
|
|
12739
12779
|
dayjs3.extend(quarterOfYear);
|
|
@@ -13008,7 +13048,7 @@ var BaseSeriesGenerator = class {
|
|
|
13008
13048
|
dataPreprocess(data) {
|
|
13009
13049
|
const tempData = [];
|
|
13010
13050
|
data.forEach((singleData) => {
|
|
13011
|
-
tempData.push(
|
|
13051
|
+
tempData.push(clone16(singleData));
|
|
13012
13052
|
});
|
|
13013
13053
|
const { groupMode } = this.model;
|
|
13014
13054
|
if (groupMode) {
|
|
@@ -14063,7 +14103,7 @@ import { ModelError as ModelError18, RuntimeModelError as RuntimeModelError29 }
|
|
|
14063
14103
|
|
|
14064
14104
|
// src/ui-logic/utils/handle-src-val.ts
|
|
14065
14105
|
import { ModelError as ModelError17 } from "@ibiz-template/core";
|
|
14066
|
-
import { clone as
|
|
14106
|
+
import { clone as clone17 } from "ramda";
|
|
14067
14107
|
function handleSrcVal2(ctx, srcValParams) {
|
|
14068
14108
|
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
14069
14109
|
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
@@ -14090,7 +14130,7 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
14090
14130
|
value = ctx.parameters.context;
|
|
14091
14131
|
break;
|
|
14092
14132
|
case "ENVPARAM":
|
|
14093
|
-
value =
|
|
14133
|
+
value = clone17(ibiz.env);
|
|
14094
14134
|
break;
|
|
14095
14135
|
default:
|
|
14096
14136
|
throw new ModelError17(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
@@ -14445,7 +14485,7 @@ var EndNode2 = class extends UILogicNode {
|
|
|
14445
14485
|
|
|
14446
14486
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
14447
14487
|
import { ModelError as ModelError21, RuntimeError as RuntimeError37 } from "@ibiz-template/core";
|
|
14448
|
-
import { clone as
|
|
14488
|
+
import { clone as clone18 } from "ramda";
|
|
14449
14489
|
var PrepareJSParamNode = class extends UILogicNode {
|
|
14450
14490
|
async exec(ctx) {
|
|
14451
14491
|
const nodeParams = this.model.deuilogicNodeParams;
|
|
@@ -14534,7 +14574,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
14534
14574
|
copyParam(nodeParam, ctx) {
|
|
14535
14575
|
const { dstDEUILogicParamId } = nodeParam;
|
|
14536
14576
|
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
14537
|
-
ctx.params[dstDEUILogicParamId] =
|
|
14577
|
+
ctx.params[dstDEUILogicParamId] = clone18(srcVal);
|
|
14538
14578
|
}
|
|
14539
14579
|
/**
|
|
14540
14580
|
* 绑定参数
|
|
@@ -14761,7 +14801,7 @@ var ResetParamNode2 = class extends UILogicNode {
|
|
|
14761
14801
|
|
|
14762
14802
|
// src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
|
|
14763
14803
|
import { RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
|
|
14764
|
-
import { clone as
|
|
14804
|
+
import { clone as clone19 } from "ramda";
|
|
14765
14805
|
var CopyParamNode2 = class extends UILogicNode {
|
|
14766
14806
|
async exec(ctx) {
|
|
14767
14807
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
@@ -14772,7 +14812,7 @@ var CopyParamNode2 = class extends UILogicNode {
|
|
|
14772
14812
|
);
|
|
14773
14813
|
}
|
|
14774
14814
|
const srcVal = handleSrcVal2(ctx, this.model);
|
|
14775
|
-
ctx.params[dstDEUILogicParamId] =
|
|
14815
|
+
ctx.params[dstDEUILogicParamId] = clone19(srcVal);
|
|
14776
14816
|
}
|
|
14777
14817
|
};
|
|
14778
14818
|
|
|
@@ -16060,6 +16100,9 @@ var ToolbarController = class extends ControlController {
|
|
|
16060
16100
|
this.model,
|
|
16061
16101
|
(item) => {
|
|
16062
16102
|
const itemState = this.state.buttonsState[item.id];
|
|
16103
|
+
if (!itemState) {
|
|
16104
|
+
return;
|
|
16105
|
+
}
|
|
16063
16106
|
if (itemState.visible) {
|
|
16064
16107
|
const dynaVisible = this.scheduler.triggerItemVisible(
|
|
16065
16108
|
item.id,
|
|
@@ -19692,7 +19735,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
19692
19735
|
|
|
19693
19736
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts
|
|
19694
19737
|
import { ModelError as ModelError27 } from "@ibiz-template/core";
|
|
19695
|
-
import { clone as
|
|
19738
|
+
import { clone as clone20 } from "ramda";
|
|
19696
19739
|
var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
19697
19740
|
constructor() {
|
|
19698
19741
|
super(...arguments);
|
|
@@ -19784,7 +19827,7 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
19784
19827
|
copyFields.forEach((key) => {
|
|
19785
19828
|
tempForm[key] = this.form.model[key];
|
|
19786
19829
|
});
|
|
19787
|
-
this.repeatedForm =
|
|
19830
|
+
this.repeatedForm = clone20(tempForm);
|
|
19788
19831
|
}
|
|
19789
19832
|
/**
|
|
19790
19833
|
* 设置重复器数据(修改主表单里重复器对应属性)
|
|
@@ -19915,7 +19958,7 @@ import {
|
|
|
19915
19958
|
} from "@ibiz-template/core";
|
|
19916
19959
|
import { debounce as debounce2 } from "lodash-es";
|
|
19917
19960
|
import { createUUID as createUUID10 } from "qx-util";
|
|
19918
|
-
import { clone as
|
|
19961
|
+
import { clone as clone21 } from "ramda";
|
|
19919
19962
|
|
|
19920
19963
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
19921
19964
|
import {
|
|
@@ -20262,8 +20305,8 @@ var EditFormController = class extends FormController {
|
|
|
20262
20305
|
* @return {*} {Promise<IData>}
|
|
20263
20306
|
*/
|
|
20264
20307
|
async copy() {
|
|
20265
|
-
const context =
|
|
20266
|
-
const queryParams =
|
|
20308
|
+
const context = clone21(this.context);
|
|
20309
|
+
const queryParams = clone21(this.params);
|
|
20267
20310
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
20268
20311
|
this.model.appDataEntityId
|
|
20269
20312
|
);
|
|
@@ -20319,7 +20362,7 @@ var EditFormController = class extends FormController {
|
|
|
20319
20362
|
return this.loadDraft();
|
|
20320
20363
|
}
|
|
20321
20364
|
const { context, params } = this.handlerAbilityParams(args);
|
|
20322
|
-
const queryParams =
|
|
20365
|
+
const queryParams = clone21(params);
|
|
20323
20366
|
let res;
|
|
20324
20367
|
try {
|
|
20325
20368
|
await this.startLoading();
|
|
@@ -20839,7 +20882,7 @@ import {
|
|
|
20839
20882
|
RuntimeError as RuntimeError51,
|
|
20840
20883
|
RuntimeModelError as RuntimeModelError56
|
|
20841
20884
|
} from "@ibiz-template/core";
|
|
20842
|
-
import { clone as
|
|
20885
|
+
import { clone as clone22 } from "ramda";
|
|
20843
20886
|
|
|
20844
20887
|
// src/controller/control/grid/grid/grid.service.ts
|
|
20845
20888
|
var GridService = class extends MDControlService {
|
|
@@ -21506,7 +21549,7 @@ var GridController = class extends MDControlController {
|
|
|
21506
21549
|
throw new RuntimeError51("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
21507
21550
|
}
|
|
21508
21551
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
21509
|
-
row.cacheData =
|
|
21552
|
+
row.cacheData = clone22(row.data);
|
|
21510
21553
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
21511
21554
|
Object.assign(row.data, defaultVal);
|
|
21512
21555
|
}
|
|
@@ -21669,7 +21712,7 @@ var GridController = class extends MDControlController {
|
|
|
21669
21712
|
}
|
|
21670
21713
|
});
|
|
21671
21714
|
}
|
|
21672
|
-
const cloneData =
|
|
21715
|
+
const cloneData = clone22(
|
|
21673
21716
|
data2.map((item) => {
|
|
21674
21717
|
return item.getOrigin();
|
|
21675
21718
|
})
|
|
@@ -21813,7 +21856,7 @@ var GridController = class extends MDControlController {
|
|
|
21813
21856
|
import { DataTypes as DataTypes3, ModelError as ModelError28, plus as plus2 } from "@ibiz-template/core";
|
|
21814
21857
|
import dayjs4 from "dayjs";
|
|
21815
21858
|
import { debounce as debounce3 } from "lodash-es";
|
|
21816
|
-
import { clone as
|
|
21859
|
+
import { clone as clone23, isNil as isNil22 } from "ramda";
|
|
21817
21860
|
var GridFieldColumnController = class extends GridColumnController {
|
|
21818
21861
|
constructor() {
|
|
21819
21862
|
super(...arguments);
|
|
@@ -21917,7 +21960,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
21917
21960
|
srfkey: value,
|
|
21918
21961
|
...wfContext
|
|
21919
21962
|
});
|
|
21920
|
-
const tempParams =
|
|
21963
|
+
const tempParams = clone23(this.params);
|
|
21921
21964
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
21922
21965
|
row.data,
|
|
21923
21966
|
tempContext,
|
|
@@ -22243,8 +22286,16 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
22243
22286
|
* @param {string[]} names 变更属性名称
|
|
22244
22287
|
*/
|
|
22245
22288
|
async dataChangeNotify(row, names) {
|
|
22246
|
-
const {
|
|
22247
|
-
|
|
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) {
|
|
22248
22299
|
this.setRowValue(row, null);
|
|
22249
22300
|
}
|
|
22250
22301
|
this.calcColumnDisabled(row);
|
|
@@ -26978,7 +27029,7 @@ var ViewEngineBase = class {
|
|
|
26978
27029
|
|
|
26979
27030
|
// src/engine/md-view.engine.ts
|
|
26980
27031
|
import { RuntimeModelError as RuntimeModelError61 } from "@ibiz-template/core";
|
|
26981
|
-
import { clone as
|
|
27032
|
+
import { clone as clone24 } from "ramda";
|
|
26982
27033
|
var MDViewEngine = class extends ViewEngineBase {
|
|
26983
27034
|
/**
|
|
26984
27035
|
* 多数据部件名称
|
|
@@ -27186,7 +27237,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
27186
27237
|
if (!openAppViewLogic) {
|
|
27187
27238
|
throw new RuntimeModelError61(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
27188
27239
|
}
|
|
27189
|
-
const params =
|
|
27240
|
+
const params = clone24(this.view.params);
|
|
27190
27241
|
if (copyMode) {
|
|
27191
27242
|
params.srfcopymode = copyMode;
|
|
27192
27243
|
}
|
|
@@ -28781,6 +28832,7 @@ export {
|
|
|
28781
28832
|
TreeStaticNodeData,
|
|
28782
28833
|
UIACTION_PROVIDER_PREFIX,
|
|
28783
28834
|
UIActionButtonState,
|
|
28835
|
+
UIActionProviderBase,
|
|
28784
28836
|
UIActionUtil,
|
|
28785
28837
|
UILOGINNODE_PROVIDER_PREFIX,
|
|
28786
28838
|
UIMapField,
|