@nocobase/flow-engine 2.1.0-alpha.45 → 2.1.0-alpha.47
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/lib/components/settings/wrappers/contextual/DefaultSettingsIcon.js +76 -31
- package/lib/components/subModel/LazyDropdown.js +17 -9
- package/lib/components/subModel/utils.d.ts +1 -0
- package/lib/components/subModel/utils.js +6 -2
- package/lib/executor/FlowExecutor.js +0 -3
- package/lib/flowContext.d.ts +6 -1
- package/lib/flowContext.js +35 -6
- package/lib/flowEngine.d.ts +4 -3
- package/lib/flowEngine.js +69 -37
- package/lib/models/flowModel.js +45 -13
- package/lib/runjs-context/contexts/FormJSFieldItemRunJSContext.js +4 -3
- package/lib/runjs-context/contexts/JSBlockRunJSContext.js +4 -15
- package/lib/runjs-context/contexts/JSColumnRunJSContext.js +5 -2
- package/lib/runjs-context/contexts/JSEditableFieldRunJSContext.js +5 -8
- package/lib/runjs-context/contexts/JSFieldRunJSContext.js +4 -3
- package/lib/runjs-context/contexts/JSItemRunJSContext.js +4 -3
- package/lib/runjs-context/contexts/base.js +464 -29
- package/lib/runjs-context/contexts/elementDoc.d.ts +11 -0
- package/lib/runjs-context/contexts/elementDoc.js +152 -0
- package/lib/utils/loadedPageCache.d.ts +24 -0
- package/lib/utils/loadedPageCache.js +139 -0
- package/package.json +4 -4
- package/src/__tests__/flowContext.test.ts +23 -0
- package/src/__tests__/flowEngine.moveModel.test.ts +81 -1
- package/src/__tests__/runjsContext.test.ts +18 -0
- package/src/__tests__/runjsContextImplementations.test.ts +9 -2
- package/src/__tests__/runjsLocales.test.ts +6 -5
- package/src/__tests__/viewScopedFlowEngine.test.ts +133 -0
- package/src/components/settings/wrappers/contextual/DefaultSettingsIcon.tsx +79 -37
- package/src/components/settings/wrappers/contextual/__tests__/DefaultSettingsIcon.test.tsx +150 -3
- package/src/components/subModel/LazyDropdown.tsx +16 -7
- package/src/components/subModel/__tests__/AddSubModelButton.test.tsx +51 -0
- package/src/components/subModel/utils.ts +6 -1
- package/src/executor/FlowExecutor.ts +0 -3
- package/src/executor/__tests__/flowExecutor.test.ts +2 -4
- package/src/flowContext.ts +40 -6
- package/src/flowEngine.ts +71 -35
- package/src/models/__tests__/flowModel.test.ts +13 -28
- package/src/models/flowModel.tsx +62 -29
- package/src/runjs-context/contexts/FormJSFieldItemRunJSContext.ts +4 -3
- package/src/runjs-context/contexts/JSBlockRunJSContext.ts +4 -15
- package/src/runjs-context/contexts/JSColumnRunJSContext.ts +4 -2
- package/src/runjs-context/contexts/JSEditableFieldRunJSContext.ts +5 -9
- package/src/runjs-context/contexts/JSFieldRunJSContext.ts +4 -3
- package/src/runjs-context/contexts/JSItemRunJSContext.ts +4 -3
- package/src/runjs-context/contexts/base.ts +467 -31
- package/src/runjs-context/contexts/elementDoc.ts +130 -0
- package/src/utils/loadedPageCache.ts +147 -0
package/lib/models/flowModel.js
CHANGED
|
@@ -71,6 +71,18 @@ var _flowContext;
|
|
|
71
71
|
const classActionRegistries = /* @__PURE__ */ new WeakMap();
|
|
72
72
|
const classEventRegistries = /* @__PURE__ */ new WeakMap();
|
|
73
73
|
const modelMetas = /* @__PURE__ */ new WeakMap();
|
|
74
|
+
function getStableSortIndex(item, fallbackIndex) {
|
|
75
|
+
return typeof (item == null ? void 0 : item.sortIndex) === "number" && Number.isFinite(item.sortIndex) ? item.sortIndex : fallbackIndex + 1;
|
|
76
|
+
}
|
|
77
|
+
__name(getStableSortIndex, "getStableSortIndex");
|
|
78
|
+
function sortByStableSortIndex(items) {
|
|
79
|
+
return items.map((item, index) => ({
|
|
80
|
+
item,
|
|
81
|
+
index,
|
|
82
|
+
sortIndex: getStableSortIndex(item, index)
|
|
83
|
+
})).sort((a, b) => a.sortIndex - b.sortIndex || a.index - b.index).map(({ item }) => item);
|
|
84
|
+
}
|
|
85
|
+
__name(sortByStableSortIndex, "sortByStableSortIndex");
|
|
74
86
|
const modelGlobalRegistries = /* @__PURE__ */ new WeakMap();
|
|
75
87
|
const classMenuExtensions = /* @__PURE__ */ new WeakMap();
|
|
76
88
|
const sortExtraMenuItems = /* @__PURE__ */ __name((items) => {
|
|
@@ -204,7 +216,7 @@ const _FlowModel = class _FlowModel {
|
|
|
204
216
|
};
|
|
205
217
|
this.stepParams = options.stepParams || {};
|
|
206
218
|
this.subModels = {};
|
|
207
|
-
this.sortIndex = options.sortIndex
|
|
219
|
+
this.sortIndex = getStableSortIndex({ sortIndex: options.sortIndex }, -1);
|
|
208
220
|
this._options = options;
|
|
209
221
|
this._title = "";
|
|
210
222
|
this._extraTitle = "";
|
|
@@ -416,7 +428,7 @@ const _FlowModel = class _FlowModel {
|
|
|
416
428
|
}
|
|
417
429
|
Object.entries(mergedSubModels || {}).forEach(([key, value]) => {
|
|
418
430
|
if (Array.isArray(value)) {
|
|
419
|
-
value
|
|
431
|
+
sortByStableSortIndex(value).forEach((item) => {
|
|
420
432
|
this.addSubModel(key, item);
|
|
421
433
|
});
|
|
422
434
|
} else {
|
|
@@ -628,26 +640,43 @@ const _FlowModel = class _FlowModel {
|
|
|
628
640
|
return this.props;
|
|
629
641
|
}
|
|
630
642
|
setStepParams(flowKeyOrAllParams, stepKeyOrStepsParams, params) {
|
|
643
|
+
var _a;
|
|
644
|
+
let hasChanged = false;
|
|
631
645
|
if (typeof flowKeyOrAllParams === "string") {
|
|
632
646
|
const flowKey = flowKeyOrAllParams;
|
|
633
647
|
if (typeof stepKeyOrStepsParams === "string" && params !== void 0) {
|
|
634
|
-
|
|
635
|
-
|
|
648
|
+
const currentStepParams = ((_a = this.stepParams[flowKey]) == null ? void 0 : _a[stepKeyOrStepsParams]) || {};
|
|
649
|
+
const nextStepParams = { ...currentStepParams, ...params };
|
|
650
|
+
if (!import_lodash.default.isEqual(currentStepParams, nextStepParams)) {
|
|
651
|
+
if (!this.stepParams[flowKey]) {
|
|
652
|
+
this.stepParams[flowKey] = {};
|
|
653
|
+
}
|
|
654
|
+
this.stepParams[flowKey][stepKeyOrStepsParams] = nextStepParams;
|
|
655
|
+
hasChanged = true;
|
|
636
656
|
}
|
|
637
|
-
this.stepParams[flowKey][stepKeyOrStepsParams] = {
|
|
638
|
-
...this.stepParams[flowKey][stepKeyOrStepsParams],
|
|
639
|
-
...params
|
|
640
|
-
};
|
|
641
657
|
} else if (typeof stepKeyOrStepsParams === "object" && stepKeyOrStepsParams !== null) {
|
|
642
|
-
|
|
658
|
+
const currentFlowParams = this.stepParams[flowKey] || {};
|
|
659
|
+
const nextFlowParams = { ...currentFlowParams, ...stepKeyOrStepsParams };
|
|
660
|
+
if (!import_lodash.default.isEqual(currentFlowParams, nextFlowParams)) {
|
|
661
|
+
this.stepParams[flowKey] = nextFlowParams;
|
|
662
|
+
hasChanged = true;
|
|
663
|
+
}
|
|
643
664
|
}
|
|
644
665
|
} else if (typeof flowKeyOrAllParams === "object" && flowKeyOrAllParams !== null) {
|
|
645
666
|
for (const fk in flowKeyOrAllParams) {
|
|
646
667
|
if (Object.prototype.hasOwnProperty.call(flowKeyOrAllParams, fk)) {
|
|
647
|
-
|
|
668
|
+
const currentFlowParams = this.stepParams[fk] || {};
|
|
669
|
+
const nextFlowParams = { ...currentFlowParams, ...flowKeyOrAllParams[fk] };
|
|
670
|
+
if (!import_lodash.default.isEqual(currentFlowParams, nextFlowParams)) {
|
|
671
|
+
this.stepParams[fk] = nextFlowParams;
|
|
672
|
+
hasChanged = true;
|
|
673
|
+
}
|
|
648
674
|
}
|
|
649
675
|
}
|
|
650
676
|
}
|
|
677
|
+
if (!hasChanged) {
|
|
678
|
+
return;
|
|
679
|
+
}
|
|
651
680
|
this.emitter.emit("onStepParamsChanged");
|
|
652
681
|
}
|
|
653
682
|
getStepParams(flowKey, stepKey) {
|
|
@@ -933,7 +962,10 @@ const _FlowModel = class _FlowModel {
|
|
|
933
962
|
if (!Array.isArray(subModels[subKey])) {
|
|
934
963
|
subModels[subKey] = import_reactive.observable.shallow([]);
|
|
935
964
|
}
|
|
936
|
-
const maxSortIndex = Math.max(
|
|
965
|
+
const maxSortIndex = Math.max(
|
|
966
|
+
...subModels[subKey].map((item, index) => getStableSortIndex(item, index)),
|
|
967
|
+
0
|
|
968
|
+
);
|
|
937
969
|
model.sortIndex = maxSortIndex + 1;
|
|
938
970
|
subModels[subKey].push(model);
|
|
939
971
|
actualParent.emitter.emit("onSubModelAdded", model);
|
|
@@ -981,7 +1013,7 @@ const _FlowModel = class _FlowModel {
|
|
|
981
1013
|
return [];
|
|
982
1014
|
}
|
|
983
1015
|
const results = [];
|
|
984
|
-
import_lodash.default.castArray(model)
|
|
1016
|
+
sortByStableSortIndex(import_lodash.default.castArray(model)).forEach((item, index) => {
|
|
985
1017
|
const result = callback(item, index);
|
|
986
1018
|
if (result) {
|
|
987
1019
|
results.push(item);
|
|
@@ -995,7 +1027,7 @@ const _FlowModel = class _FlowModel {
|
|
|
995
1027
|
return [];
|
|
996
1028
|
}
|
|
997
1029
|
const results = [];
|
|
998
|
-
import_lodash.default.castArray(model)
|
|
1030
|
+
sortByStableSortIndex(import_lodash.default.castArray(model)).forEach((item, index) => {
|
|
999
1031
|
const result = callback(item, index);
|
|
1000
1032
|
results.push(result);
|
|
1001
1033
|
});
|
|
@@ -31,6 +31,7 @@ __export(FormJSFieldItemRunJSContext_exports, {
|
|
|
31
31
|
});
|
|
32
32
|
module.exports = __toCommonJS(FormJSFieldItemRunJSContext_exports);
|
|
33
33
|
var import_flowContext = require("../../flowContext");
|
|
34
|
+
var import_elementDoc = require("./elementDoc");
|
|
34
35
|
const _FormJSFieldItemRunJSContext = class _FormJSFieldItemRunJSContext extends import_flowContext.FlowRunJSContext {
|
|
35
36
|
};
|
|
36
37
|
__name(_FormJSFieldItemRunJSContext, "FormJSFieldItemRunJSContext");
|
|
@@ -38,8 +39,8 @@ let FormJSFieldItemRunJSContext = _FormJSFieldItemRunJSContext;
|
|
|
38
39
|
FormJSFieldItemRunJSContext.define({
|
|
39
40
|
label: "FormJSFieldItem RunJS context",
|
|
40
41
|
properties: {
|
|
41
|
-
element: `ElementProxy instance providing a safe DOM container for form field rendering.
|
|
42
|
-
Supports innerHTML, append, and other DOM manipulation methods
|
|
42
|
+
element: (0, import_elementDoc.createElementPropertyDoc)(`ElementProxy instance providing a safe DOM container for form field rendering.
|
|
43
|
+
Supports innerHTML, append, and other DOM manipulation methods.`),
|
|
43
44
|
value: `Current field value (read-only in display mode; in controlled scenarios, use setProps to modify).`,
|
|
44
45
|
record: `Current record data object (read-only).
|
|
45
46
|
Contains all field values of the parent record.`,
|
|
@@ -61,7 +62,7 @@ FormJSFieldItemRunJSContext.define(
|
|
|
61
62
|
{
|
|
62
63
|
label: "\u8868\u5355 JS \u5B57\u6BB5\u9879 RunJS \u4E0A\u4E0B\u6587",
|
|
63
64
|
properties: {
|
|
64
|
-
element: "ElementProxy\uFF0C\u8868\u5355\u5B57\u6BB5\u5BB9\u5668",
|
|
65
|
+
element: (0, import_elementDoc.createZhCNElementPropertyDoc)("ElementProxy\uFF0C\u8868\u5355\u5B57\u6BB5\u5BB9\u5668"),
|
|
65
66
|
value: "\u5B57\u6BB5\u503C\uFF08\u5C55\u793A\u6A21\u5F0F\u4E3A\u53EA\u8BFB\uFF1B\u53D7\u63A7\u573A\u666F\u7528 setProps \u4FEE\u6539\uFF09",
|
|
66
67
|
record: "\u5F53\u524D\u8BB0\u5F55\uFF08\u53EA\u8BFB\uFF09",
|
|
67
68
|
formValues: {
|
|
@@ -31,6 +31,7 @@ __export(JSBlockRunJSContext_exports, {
|
|
|
31
31
|
});
|
|
32
32
|
module.exports = __toCommonJS(JSBlockRunJSContext_exports);
|
|
33
33
|
var import_flowContext = require("../../flowContext");
|
|
34
|
+
var import_elementDoc = require("./elementDoc");
|
|
34
35
|
const _JSBlockRunJSContext = class _JSBlockRunJSContext extends import_flowContext.FlowRunJSContext {
|
|
35
36
|
};
|
|
36
37
|
__name(_JSBlockRunJSContext, "JSBlockRunJSContext");
|
|
@@ -38,15 +39,9 @@ let JSBlockRunJSContext = _JSBlockRunJSContext;
|
|
|
38
39
|
JSBlockRunJSContext.define({
|
|
39
40
|
label: "RunJS context",
|
|
40
41
|
properties: {
|
|
41
|
-
element:
|
|
42
|
-
description: `ElementProxy instance providing a safe DOM container.
|
|
42
|
+
element: (0, import_elementDoc.createElementPropertyDoc)(`ElementProxy instance providing a safe DOM container.
|
|
43
43
|
Supports innerHTML, append, and other DOM manipulation methods.
|
|
44
|
-
Use this to render content in the JS block
|
|
45
|
-
detail: "ElementProxy",
|
|
46
|
-
properties: {
|
|
47
|
-
innerHTML: "Set or read the HTML content of the container element."
|
|
48
|
-
}
|
|
49
|
-
},
|
|
44
|
+
Use this to render content in the JS block.`),
|
|
50
45
|
record: `Current record data object (read-only).
|
|
51
46
|
Available when the JS block is within a data block or detail view context.`,
|
|
52
47
|
value: "Current value of the field or component, if available in the current context.",
|
|
@@ -65,13 +60,7 @@ JSBlockRunJSContext.define(
|
|
|
65
60
|
{
|
|
66
61
|
label: "RunJS \u4E0A\u4E0B\u6587",
|
|
67
62
|
properties: {
|
|
68
|
-
element:
|
|
69
|
-
description: "ElementProxy\uFF0C\u5B89\u5168\u7684 DOM \u5BB9\u5668\uFF0C\u652F\u6301 innerHTML/append \u7B49",
|
|
70
|
-
detail: "ElementProxy",
|
|
71
|
-
properties: {
|
|
72
|
-
innerHTML: "\u8BFB\u53D6\u6216\u8BBE\u7F6E\u5BB9\u5668\u7684 HTML \u5185\u5BB9"
|
|
73
|
-
}
|
|
74
|
-
},
|
|
63
|
+
element: (0, import_elementDoc.createZhCNElementPropertyDoc)("ElementProxy\uFF0C\u5B89\u5168\u7684 DOM \u5BB9\u5668\uFF0C\u652F\u6301 innerHTML/append \u7B49"),
|
|
75
64
|
record: "\u5F53\u524D\u8BB0\u5F55\uFF08\u53EA\u8BFB\uFF0C\u7528\u4E8E\u6570\u636E\u533A\u5757/\u8BE6\u60C5\u7B49\u573A\u666F\uFF09",
|
|
76
65
|
value: "\u5F53\u524D\u503C\uFF08\u82E5\u5B58\u5728\uFF09",
|
|
77
66
|
React: "React \u5E93",
|
|
@@ -31,6 +31,7 @@ __export(JSColumnRunJSContext_exports, {
|
|
|
31
31
|
});
|
|
32
32
|
module.exports = __toCommonJS(JSColumnRunJSContext_exports);
|
|
33
33
|
var import_flowContext = require("../../flowContext");
|
|
34
|
+
var import_elementDoc = require("./elementDoc");
|
|
34
35
|
const _JSColumnRunJSContext = class _JSColumnRunJSContext extends import_flowContext.FlowRunJSContext {
|
|
35
36
|
};
|
|
36
37
|
__name(_JSColumnRunJSContext, "JSColumnRunJSContext");
|
|
@@ -38,7 +39,9 @@ let JSColumnRunJSContext = _JSColumnRunJSContext;
|
|
|
38
39
|
JSColumnRunJSContext.define({
|
|
39
40
|
label: "JSColumn RunJS context",
|
|
40
41
|
properties: {
|
|
41
|
-
element:
|
|
42
|
+
element: (0, import_elementDoc.createElementPropertyDoc)(
|
|
43
|
+
"ElementProxy instance providing a safe DOM container for the current table cell. Supports innerHTML/append and basic DOM APIs."
|
|
44
|
+
),
|
|
42
45
|
record: "Current row record object (read-only).",
|
|
43
46
|
recordIndex: "Index of the current row in the page (0-based).",
|
|
44
47
|
collection: "Collection definition metadata (read-only).",
|
|
@@ -56,7 +59,7 @@ JSColumnRunJSContext.define(
|
|
|
56
59
|
{
|
|
57
60
|
label: "JS \u5217 RunJS \u4E0A\u4E0B\u6587",
|
|
58
61
|
properties: {
|
|
59
|
-
element: "ElementProxy\uFF0C\u8868\u683C\u5355\u5143\u683C\u7684\u5B89\u5168 DOM \u5BB9\u5668\uFF0C\u652F\u6301 innerHTML/append \u7B49",
|
|
62
|
+
element: (0, import_elementDoc.createZhCNElementPropertyDoc)("ElementProxy\uFF0C\u8868\u683C\u5355\u5143\u683C\u7684\u5B89\u5168 DOM \u5BB9\u5668\uFF0C\u652F\u6301 innerHTML/append \u7B49"),
|
|
60
63
|
record: "\u5F53\u524D\u884C\u8BB0\u5F55\u5BF9\u8C61\uFF08\u53EA\u8BFB\uFF09",
|
|
61
64
|
recordIndex: "\u5F53\u524D\u884C\u7D22\u5F15\uFF08\u4ECE 0 \u5F00\u59CB\uFF09",
|
|
62
65
|
collection: "\u96C6\u5408\u5B9A\u4E49\u5143\u6570\u636E\uFF08\u53EA\u8BFB\uFF09",
|
|
@@ -31,6 +31,7 @@ __export(JSEditableFieldRunJSContext_exports, {
|
|
|
31
31
|
});
|
|
32
32
|
module.exports = __toCommonJS(JSEditableFieldRunJSContext_exports);
|
|
33
33
|
var import_flowContext = require("../../flowContext");
|
|
34
|
+
var import_elementDoc = require("./elementDoc");
|
|
34
35
|
const _JSEditableFieldRunJSContext = class _JSEditableFieldRunJSContext extends import_flowContext.FlowRunJSContext {
|
|
35
36
|
};
|
|
36
37
|
__name(_JSEditableFieldRunJSContext, "JSEditableFieldRunJSContext");
|
|
@@ -38,10 +39,9 @@ let JSEditableFieldRunJSContext = _JSEditableFieldRunJSContext;
|
|
|
38
39
|
JSEditableFieldRunJSContext.define({
|
|
39
40
|
label: "JSEditableField RunJS context",
|
|
40
41
|
properties: {
|
|
41
|
-
element:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
},
|
|
42
|
+
element: (0, import_elementDoc.createElementPropertyDoc)(
|
|
43
|
+
"ElementProxy instance providing a safe DOM container for field rendering. In editable mode this container is typically a <span> element."
|
|
44
|
+
),
|
|
45
45
|
value: {
|
|
46
46
|
description: "Current field value (read-only snapshot). In editable scenarios, prefer ctx.getValue()/ctx.setValue(v) for two-way binding.",
|
|
47
47
|
detail: "any",
|
|
@@ -84,10 +84,7 @@ JSEditableFieldRunJSContext.define(
|
|
|
84
84
|
{
|
|
85
85
|
label: "JS \u53EF\u7F16\u8F91\u5B57\u6BB5 RunJS \u4E0A\u4E0B\u6587",
|
|
86
86
|
properties: {
|
|
87
|
-
element:
|
|
88
|
-
description: "ElementProxy\uFF0C\u5B57\u6BB5\u6E32\u67D3\u7684\u5B89\u5168\u5BB9\u5668\uFF08\u901A\u5E38\u4E3A <span> \u5BB9\u5668\uFF09\u3002",
|
|
89
|
-
detail: "ElementProxy"
|
|
90
|
-
},
|
|
87
|
+
element: (0, import_elementDoc.createZhCNElementPropertyDoc)("ElementProxy\uFF0C\u5B57\u6BB5\u6E32\u67D3\u7684\u5B89\u5168\u5BB9\u5668\uFF08\u901A\u5E38\u4E3A <span> \u5BB9\u5668\uFF09\u3002"),
|
|
91
88
|
value: {
|
|
92
89
|
description: "\u5B57\u6BB5\u5F53\u524D\u503C\uFF08\u53EA\u8BFB\u5FEB\u7167\uFF09\u3002\u53EF\u7F16\u8F91\u573A\u666F\u5EFA\u8BAE\u4F7F\u7528 ctx.getValue()/ctx.setValue(v) \u505A\u53CC\u5411\u7ED1\u5B9A\u3002",
|
|
93
90
|
detail: "any",
|
|
@@ -31,6 +31,7 @@ __export(JSFieldRunJSContext_exports, {
|
|
|
31
31
|
});
|
|
32
32
|
module.exports = __toCommonJS(JSFieldRunJSContext_exports);
|
|
33
33
|
var import_flowContext = require("../../flowContext");
|
|
34
|
+
var import_elementDoc = require("./elementDoc");
|
|
34
35
|
const _JSFieldRunJSContext = class _JSFieldRunJSContext extends import_flowContext.FlowRunJSContext {
|
|
35
36
|
};
|
|
36
37
|
__name(_JSFieldRunJSContext, "JSFieldRunJSContext");
|
|
@@ -38,8 +39,8 @@ let JSFieldRunJSContext = _JSFieldRunJSContext;
|
|
|
38
39
|
JSFieldRunJSContext.define({
|
|
39
40
|
label: "JSField RunJS context",
|
|
40
41
|
properties: {
|
|
41
|
-
element: `ElementProxy instance providing a safe DOM container for field rendering.
|
|
42
|
-
Supports innerHTML, append, and other DOM manipulation methods
|
|
42
|
+
element: (0, import_elementDoc.createElementPropertyDoc)(`ElementProxy instance providing a safe DOM container for field rendering.
|
|
43
|
+
Supports innerHTML, append, and other DOM manipulation methods.`),
|
|
43
44
|
value: `Current value of the field (read-only).
|
|
44
45
|
Contains the data value stored in this field.`,
|
|
45
46
|
record: `Current record data object (read-only).
|
|
@@ -57,7 +58,7 @@ JSFieldRunJSContext.define(
|
|
|
57
58
|
{
|
|
58
59
|
label: "JS \u5B57\u6BB5 RunJS \u4E0A\u4E0B\u6587",
|
|
59
60
|
properties: {
|
|
60
|
-
element: "ElementProxy\uFF0C\u5B57\u6BB5\u6E32\u67D3\u5BB9\u5668\uFF0C\u652F\u6301 innerHTML/append \u7B49 DOM \u64CD\u4F5C",
|
|
61
|
+
element: (0, import_elementDoc.createZhCNElementPropertyDoc)("ElementProxy\uFF0C\u5B57\u6BB5\u6E32\u67D3\u5BB9\u5668\uFF0C\u652F\u6301 innerHTML/append \u7B49 DOM \u64CD\u4F5C"),
|
|
61
62
|
value: "\u5B57\u6BB5\u5F53\u524D\u503C\uFF08\u53EA\u8BFB\uFF09",
|
|
62
63
|
record: "\u5F53\u524D\u8BB0\u5F55\u5BF9\u8C61\uFF08\u53EA\u8BFB\uFF0C\u5305\u542B\u7236\u8BB0\u5F55\u5168\u90E8\u5B57\u6BB5\u503C\uFF09",
|
|
63
64
|
collection: "\u96C6\u5408\u5B9A\u4E49\u5143\u6570\u636E\uFF08\u53EA\u8BFB\uFF0C\u63CF\u8FF0\u5B57\u6BB5\u6240\u5C5E\u96C6\u5408\u7684 Schema\uFF09"
|
|
@@ -31,6 +31,7 @@ __export(JSItemRunJSContext_exports, {
|
|
|
31
31
|
});
|
|
32
32
|
module.exports = __toCommonJS(JSItemRunJSContext_exports);
|
|
33
33
|
var import_flowContext = require("../../flowContext");
|
|
34
|
+
var import_elementDoc = require("./elementDoc");
|
|
34
35
|
const _JSItemRunJSContext = class _JSItemRunJSContext extends import_flowContext.FlowRunJSContext {
|
|
35
36
|
};
|
|
36
37
|
__name(_JSItemRunJSContext, "JSItemRunJSContext");
|
|
@@ -38,8 +39,8 @@ let JSItemRunJSContext = _JSItemRunJSContext;
|
|
|
38
39
|
JSItemRunJSContext.define({
|
|
39
40
|
label: "JSItem RunJS context",
|
|
40
41
|
properties: {
|
|
41
|
-
element: `ElementProxy instance providing a safe DOM container for form item rendering.
|
|
42
|
-
Supports innerHTML, append, and other DOM manipulation methods
|
|
42
|
+
element: (0, import_elementDoc.createElementPropertyDoc)(`ElementProxy instance providing a safe DOM container for form item rendering.
|
|
43
|
+
Supports innerHTML, append, and other DOM manipulation methods.`),
|
|
43
44
|
resource: `Current resource instance (read-only).
|
|
44
45
|
Provides access to the data resource associated with the current form context.`,
|
|
45
46
|
record: `Current record data object (read-only).
|
|
@@ -59,7 +60,7 @@ JSItemRunJSContext.define(
|
|
|
59
60
|
{
|
|
60
61
|
label: "JS \u8868\u5355\u9879 RunJS \u4E0A\u4E0B\u6587",
|
|
61
62
|
properties: {
|
|
62
|
-
element: "ElementProxy\uFF0C\u8868\u5355\u9879\u6E32\u67D3\u5BB9\u5668\uFF0C\u652F\u6301 innerHTML/append \u7B49 DOM \u64CD\u4F5C",
|
|
63
|
+
element: (0, import_elementDoc.createZhCNElementPropertyDoc)("ElementProxy\uFF0C\u8868\u5355\u9879\u6E32\u67D3\u5BB9\u5668\uFF0C\u652F\u6301 innerHTML/append \u7B49 DOM \u64CD\u4F5C"),
|
|
63
64
|
resource: "\u5F53\u524D\u8D44\u6E90\uFF08\u53EA\u8BFB\uFF09",
|
|
64
65
|
record: "\u5F53\u524D\u8BB0\u5F55\uFF08\u53EA\u8BFB\uFF09",
|
|
65
66
|
formValues: {
|