@nocobase/plugin-flow-engine 2.1.0-alpha.12 → 2.1.0-alpha.13
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/externalVersion.js +12 -11
- package/dist/node_modules/ajv/package.json +1 -1
- package/dist/node_modules/ses/package.json +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/flow-models/schema-contribution-collector.d.ts +2 -1
- package/dist/server/flow-models/schema-contribution-collector.js +26 -5
- package/dist/server/flow-schema-contributions/actions/aclCheck.d.ts +1 -1
- package/dist/server/flow-schema-contributions/actions/aclCheckRefresh.d.ts +1 -1
- package/dist/server/flow-schema-contributions/actions/actionLinkageRules.d.ts +1 -1
- package/dist/server/flow-schema-contributions/actions/confirm.d.ts +1 -1
- package/dist/server/flow-schema-contributions/actions/customVariable.d.ts +1 -1
- package/dist/server/flow-schema-contributions/actions/dataScope.d.ts +1 -1
- package/dist/server/flow-schema-contributions/actions/detailsFieldLinkageRules.d.ts +1 -1
- package/dist/server/flow-schema-contributions/actions/fieldLinkageRules.d.ts +1 -1
- package/dist/server/flow-schema-contributions/actions/filterFormDefaultValues.d.ts +1 -1
- package/dist/server/flow-schema-contributions/actions/formAssignRules.d.ts +1 -1
- package/dist/server/flow-schema-contributions/actions/index.d.ts +1 -1
- package/dist/server/flow-schema-contributions/actions/layout.d.ts +1 -1
- package/dist/server/flow-schema-contributions/actions/linkageRulesRefresh.d.ts +1 -1
- package/dist/server/flow-schema-contributions/actions/navigateToURL.d.ts +1 -1
- package/dist/server/flow-schema-contributions/actions/openView.d.ts +1 -1
- package/dist/server/flow-schema-contributions/actions/refreshTargetBlocks.d.ts +1 -1
- package/dist/server/flow-schema-contributions/actions/runjs.d.ts +1 -1
- package/dist/server/flow-schema-contributions/actions/setTargetDataScope.d.ts +1 -1
- package/dist/server/flow-schema-contributions/actions/showMessage.d.ts +1 -1
- package/dist/server/flow-schema-contributions/actions/showNotification.d.ts +1 -1
- package/dist/server/flow-schema-contributions/actions/sortingRule.d.ts +1 -1
- package/dist/server/flow-schema-contributions/field-models.d.ts +1 -1
- package/dist/server/flow-schema-contributions/index.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/ActionBulkEditModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/ActionBulkEditModel.js +382 -0
- package/dist/server/flow-schema-contributions/models/ActionBulkUpdateModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/ActionBulkUpdateModel.js +169 -0
- package/dist/server/flow-schema-contributions/models/ActionCustomRequestModel.d.ts +11 -0
- package/dist/server/flow-schema-contributions/models/ActionCustomRequestModel.js +115 -0
- package/dist/server/flow-schema-contributions/models/ActionDuplicateModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/ActionDuplicateModel.js +169 -0
- package/dist/server/flow-schema-contributions/models/ActionExportModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/ActionExportModel.js +141 -0
- package/dist/server/flow-schema-contributions/models/ActionImportModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/ActionImportModel.js +122 -0
- package/dist/server/flow-schema-contributions/models/ActionModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/AddChildActionModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/AddNewActionModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/AssignFormGridModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/AssignFormItemModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/AssignFormModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/BasePageTabModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/BlockGridCardModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/BlockGridCardModel.js +449 -0
- package/dist/server/flow-schema-contributions/models/BlockGridModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/BlockIframeModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/BlockIframeModel.js +143 -0
- package/dist/server/flow-schema-contributions/models/BlockListModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/BlockListModel.js +435 -0
- package/dist/server/flow-schema-contributions/models/BlockMarkdownModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/BlockMarkdownModel.js +108 -0
- package/dist/server/flow-schema-contributions/models/BlockWorkbenchModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/BlockWorkbenchModel.js +173 -0
- package/dist/server/flow-schema-contributions/models/BulkDeleteActionModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/ChildPageModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/ChildPageTabModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/CommentsModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/CommentsModel.js +255 -0
- package/dist/server/flow-schema-contributions/models/CreateFormModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/DataVisualizationModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/DataVisualizationModel.js +240 -0
- package/dist/server/flow-schema-contributions/models/DeleteActionModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/DetailsBlockModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/DetailsGridModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/DetailsItemModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/EditActionModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/EditFormModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/ExpandCollapseActionModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/FieldAttachmentUrlModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/FieldAttachmentUrlModel.js +87 -0
- package/dist/server/flow-schema-contributions/models/FieldCodeModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/FieldCodeModel.js +99 -0
- package/dist/server/flow-schema-contributions/models/FieldFormulaModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/FieldFormulaModel.js +152 -0
- package/dist/server/flow-schema-contributions/models/FieldMarkdownVditorModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/FieldMarkdownVditorModel.js +92 -0
- package/dist/server/flow-schema-contributions/models/FieldSequenceModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/FieldSequenceModel.js +60 -0
- package/dist/server/flow-schema-contributions/models/FieldSortModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/FieldSortModel.js +87 -0
- package/dist/server/flow-schema-contributions/models/FileManagerModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/FileManagerModel.js +115 -0
- package/dist/server/flow-schema-contributions/models/FilterActionModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/FilterFormBlockModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/FilterFormCollapseActionModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/FilterFormCustomFieldModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/FilterFormGridModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/FilterFormItemModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/FilterFormJSActionModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/FilterFormResetActionModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/FilterFormSubmitActionModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/FormAssociationItemModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/FormBlockModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/FormGridModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/FormItemModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/FormSubmitActionModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/JSActionModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/JSBlockModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/JSCollectionActionModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/JSColumnModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/JSFormActionModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/JSItemModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/JSRecordActionModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/LinkActionModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/MapModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/MapModel.js +427 -0
- package/dist/server/flow-schema-contributions/models/PageModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/PageTabModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/PopupActionModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/PopupCollectionActionModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/RefreshActionModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/RootPageModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/RootPageTabModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/RouteModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/TableActionsColumnModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/TableBlockModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/TableColumnModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/TableCustomColumnModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/UiTemplatesModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/UiTemplatesModel.js +130 -0
- package/dist/server/flow-schema-contributions/models/UpdateRecordActionModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/ViewActionModel.d.ts +1 -1
- package/dist/server/flow-schema-contributions/models/index.d.ts +6 -1
- package/dist/server/flow-schema-contributions/models/index.js +114 -0
- package/dist/server/flow-schema-contributions/shared.d.ts +1 -1
- package/dist/server/flow-schema-registry/FlowSchemaRegistry.d.ts +154 -0
- package/dist/server/flow-schema-registry/FlowSchemaRegistry.js +1424 -0
- package/dist/server/flow-schema-registry/flow-schema-registry/fieldBinding.d.ts +32 -0
- package/dist/server/flow-schema-registry/flow-schema-registry/fieldBinding.js +159 -0
- package/dist/server/flow-schema-registry/flow-schema-registry/modelPatches.d.ts +16 -0
- package/dist/server/flow-schema-registry/flow-schema-registry/modelPatches.js +226 -0
- package/dist/server/flow-schema-registry/flow-schema-registry/schemaInference.d.ts +17 -0
- package/dist/server/flow-schema-registry/flow-schema-registry/schemaInference.js +204 -0
- package/dist/server/flow-schema-registry/flow-schema-registry/utils.d.ts +25 -0
- package/dist/server/flow-schema-registry/flow-schema-registry/utils.js +278 -0
- package/dist/server/flow-schema-registry/index.d.ts +10 -0
- package/dist/server/flow-schema-registry/index.js +32 -0
- package/dist/server/flow-schema-registry/types.d.ts +244 -0
- package/dist/server/flow-schema-registry/types.js +24 -0
- package/dist/server/flow-schema-service.d.ts +1 -1
- package/dist/server/flow-schema-service.js +2 -2
- package/dist/server/plugin.d.ts +1 -1
- package/dist/server/repository.d.ts +1 -0
- package/dist/server/repository.js +3 -5
- package/dist/server/server.js +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var ActionBulkEditModel_exports = {};
|
|
28
|
+
__export(ActionBulkEditModel_exports, {
|
|
29
|
+
flowSchemaContribution: () => flowSchemaContribution
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(ActionBulkEditModel_exports);
|
|
32
|
+
const genericModelNodeSchema = {
|
|
33
|
+
type: "object",
|
|
34
|
+
required: ["uid", "use"],
|
|
35
|
+
properties: {
|
|
36
|
+
uid: { type: "string" },
|
|
37
|
+
use: { type: "string" }
|
|
38
|
+
},
|
|
39
|
+
additionalProperties: true
|
|
40
|
+
};
|
|
41
|
+
const gridRowsSchema = {
|
|
42
|
+
type: "object",
|
|
43
|
+
description: "Map of row ids to column definitions. Each row value is a string[][] where every inner array lists the child model UIDs rendered inside one column.",
|
|
44
|
+
additionalProperties: {
|
|
45
|
+
type: "array",
|
|
46
|
+
items: {
|
|
47
|
+
type: "array",
|
|
48
|
+
items: {
|
|
49
|
+
type: "string"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
const gridSizesSchema = {
|
|
55
|
+
type: "object",
|
|
56
|
+
description: "Map of row ids to column widths. Each width array uses the 24-column grid system, for example [12, 12] or [8, 8, 8].",
|
|
57
|
+
additionalProperties: {
|
|
58
|
+
type: "array",
|
|
59
|
+
items: {
|
|
60
|
+
type: "number"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
const gridRowOrderSchema = {
|
|
65
|
+
type: "array",
|
|
66
|
+
description: "Optional explicit row order. When omitted, the persisted row key order is used.",
|
|
67
|
+
items: {
|
|
68
|
+
type: "string"
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
const createGridLayoutStepParamsSchema = () => ({
|
|
72
|
+
type: "object",
|
|
73
|
+
properties: {
|
|
74
|
+
gridSettings: {
|
|
75
|
+
type: "object",
|
|
76
|
+
properties: {
|
|
77
|
+
grid: {
|
|
78
|
+
type: "object",
|
|
79
|
+
description: "Persisted multi-row, multi-column grid layout.",
|
|
80
|
+
properties: {
|
|
81
|
+
rows: gridRowsSchema,
|
|
82
|
+
sizes: gridSizesSchema,
|
|
83
|
+
rowOrder: gridRowOrderSchema
|
|
84
|
+
},
|
|
85
|
+
additionalProperties: false
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
additionalProperties: true
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
additionalProperties: true
|
|
92
|
+
});
|
|
93
|
+
const createGridLayoutStepParamsValue = (rows, sizes, rowOrder) => ({
|
|
94
|
+
gridSettings: {
|
|
95
|
+
grid: {
|
|
96
|
+
rows,
|
|
97
|
+
sizes,
|
|
98
|
+
rowOrder
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
const createGridLayoutItems = (itemUses, prefix, count) => Array.from({ length: count }, (_, index) => ({
|
|
103
|
+
uid: `${prefix}-item-${index + 1}`,
|
|
104
|
+
use: itemUses[index % itemUses.length]
|
|
105
|
+
}));
|
|
106
|
+
const createGridLayoutDocs = (options) => {
|
|
107
|
+
const minimalItems = createGridLayoutItems(options.itemUses, `${options.prefix}-minimal`, 1);
|
|
108
|
+
const standardItems = createGridLayoutItems(options.itemUses, `${options.prefix}-standard`, 5);
|
|
109
|
+
const customSizeItems = createGridLayoutItems(options.itemUses, `${options.prefix}-sizes`, 5);
|
|
110
|
+
return {
|
|
111
|
+
minimalExample: {
|
|
112
|
+
uid: `${options.prefix}-grid`,
|
|
113
|
+
use: options.use,
|
|
114
|
+
stepParams: createGridLayoutStepParamsValue({ rowMain: [[minimalItems[0].uid]] }, { rowMain: [24] }, ["rowMain"]),
|
|
115
|
+
subModels: {
|
|
116
|
+
items: minimalItems
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
commonPatterns: [
|
|
120
|
+
{
|
|
121
|
+
title: "Single row with one column",
|
|
122
|
+
description: "Use one row with a single 24-column slot when the grid only needs one child model.",
|
|
123
|
+
snippet: {
|
|
124
|
+
use: options.use,
|
|
125
|
+
stepParams: createGridLayoutStepParamsValue({ rowMain: [[minimalItems[0].uid]] }, { rowMain: [24] }, [
|
|
126
|
+
"rowMain"
|
|
127
|
+
]),
|
|
128
|
+
subModels: {
|
|
129
|
+
items: minimalItems
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
title: "Two rows with 2 + 3 columns",
|
|
135
|
+
description: "The first row has 2 columns and the second row has 3 columns with equal widths.",
|
|
136
|
+
snippet: {
|
|
137
|
+
use: options.use,
|
|
138
|
+
stepParams: createGridLayoutStepParamsValue(
|
|
139
|
+
{
|
|
140
|
+
rowTop: [[standardItems[0].uid], [standardItems[1].uid]],
|
|
141
|
+
rowBottom: [[standardItems[2].uid], [standardItems[3].uid], [standardItems[4].uid]]
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
rowTop: [12, 12],
|
|
145
|
+
rowBottom: [8, 8, 8]
|
|
146
|
+
},
|
|
147
|
+
["rowTop", "rowBottom"]
|
|
148
|
+
),
|
|
149
|
+
subModels: {
|
|
150
|
+
items: standardItems
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
title: "Two rows with custom column sizes",
|
|
156
|
+
description: "Use sizes to express non-equal column widths while keeping the rows definition stable.",
|
|
157
|
+
snippet: {
|
|
158
|
+
use: options.use,
|
|
159
|
+
stepParams: createGridLayoutStepParamsValue(
|
|
160
|
+
{
|
|
161
|
+
rowTop: [[customSizeItems[0].uid], [customSizeItems[1].uid]],
|
|
162
|
+
rowBottom: [[customSizeItems[2].uid], [customSizeItems[3].uid], [customSizeItems[4].uid]]
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
rowTop: [8, 16],
|
|
166
|
+
rowBottom: [6, 10, 8]
|
|
167
|
+
},
|
|
168
|
+
["rowTop", "rowBottom"]
|
|
169
|
+
),
|
|
170
|
+
subModels: {
|
|
171
|
+
items: customSizeItems
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
dynamicHints: options.dynamicHints || []
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
const bulkEditBlockGridModelInternalSchemaContribution = {
|
|
180
|
+
use: "BulkEditBlockGridModel",
|
|
181
|
+
title: "Bulk edit block grid",
|
|
182
|
+
source: "plugin",
|
|
183
|
+
strict: false,
|
|
184
|
+
exposure: "internal",
|
|
185
|
+
suggestedUses: ["BulkEditActionModel"],
|
|
186
|
+
stepParamsSchema: createGridLayoutStepParamsSchema(),
|
|
187
|
+
subModelSlots: {
|
|
188
|
+
items: {
|
|
189
|
+
type: "array",
|
|
190
|
+
dynamic: true,
|
|
191
|
+
schema: genericModelNodeSchema,
|
|
192
|
+
description: "Bulk edit grid items depend on runtime block registries."
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
skeleton: {
|
|
196
|
+
uid: "todo-bulk-edit-grid-uid",
|
|
197
|
+
use: "BulkEditBlockGridModel",
|
|
198
|
+
subModels: {
|
|
199
|
+
items: []
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
docs: createGridLayoutDocs({
|
|
203
|
+
use: "BulkEditBlockGridModel",
|
|
204
|
+
itemUses: ["TableBlockModel", "JSBlockModel", "MarkdownBlockModel"],
|
|
205
|
+
prefix: "bulk-edit-grid",
|
|
206
|
+
dynamicHints: [
|
|
207
|
+
{
|
|
208
|
+
kind: "dynamic-children",
|
|
209
|
+
path: "BulkEditBlockGridModel.subModels.items",
|
|
210
|
+
message: "Bulk edit page blocks depend on runtime block registries and collection context.",
|
|
211
|
+
"x-flow": {
|
|
212
|
+
slotRules: {
|
|
213
|
+
slotKey: "items",
|
|
214
|
+
type: "array"
|
|
215
|
+
},
|
|
216
|
+
contextRequirements: ["block registry", "collection context"],
|
|
217
|
+
unresolvedReason: "runtime-bulk-edit-grid-items"
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
]
|
|
221
|
+
})
|
|
222
|
+
};
|
|
223
|
+
const bulkEditChildPageTabModelInternalSchemaContribution = {
|
|
224
|
+
use: "BulkEditChildPageTabModel",
|
|
225
|
+
title: "Bulk edit child page tab",
|
|
226
|
+
source: "plugin",
|
|
227
|
+
strict: false,
|
|
228
|
+
exposure: "internal",
|
|
229
|
+
suggestedUses: ["BulkEditActionModel"],
|
|
230
|
+
subModelSlots: {
|
|
231
|
+
grid: {
|
|
232
|
+
type: "object",
|
|
233
|
+
use: "BulkEditBlockGridModel",
|
|
234
|
+
description: "Bulk edit tab content grid."
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
skeleton: {
|
|
238
|
+
uid: "todo-bulk-edit-tab-uid",
|
|
239
|
+
use: "BulkEditChildPageTabModel",
|
|
240
|
+
subModels: {
|
|
241
|
+
grid: {
|
|
242
|
+
uid: "todo-bulk-edit-tab-grid-uid",
|
|
243
|
+
use: "BulkEditBlockGridModel"
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
const bulkEditActionModelSchemaContribution = {
|
|
249
|
+
use: "BulkEditActionModel",
|
|
250
|
+
title: "Bulk edit action",
|
|
251
|
+
source: "plugin",
|
|
252
|
+
strict: false,
|
|
253
|
+
stepParamsSchema: {
|
|
254
|
+
type: "object",
|
|
255
|
+
properties: {
|
|
256
|
+
bulkEditSettings: {
|
|
257
|
+
type: "object",
|
|
258
|
+
properties: {
|
|
259
|
+
editMode: {
|
|
260
|
+
type: "object",
|
|
261
|
+
properties: {
|
|
262
|
+
value: {
|
|
263
|
+
type: "string",
|
|
264
|
+
enum: ["selected", "all"]
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
required: ["value"],
|
|
268
|
+
additionalProperties: false
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
additionalProperties: true
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
additionalProperties: true
|
|
275
|
+
},
|
|
276
|
+
subModelSlots: {
|
|
277
|
+
page: {
|
|
278
|
+
type: "object",
|
|
279
|
+
use: "ChildPageModel",
|
|
280
|
+
description: "Popup child page used to host bulk edit tabs.",
|
|
281
|
+
childSchemaPatch: {
|
|
282
|
+
subModelSlots: {
|
|
283
|
+
tabs: {
|
|
284
|
+
type: "array",
|
|
285
|
+
uses: ["BulkEditChildPageTabModel"],
|
|
286
|
+
description: "Bulk edit tabs."
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
skeleton: {
|
|
293
|
+
uid: "todo-bulk-edit-action-uid",
|
|
294
|
+
use: "BulkEditActionModel",
|
|
295
|
+
stepParams: {
|
|
296
|
+
bulkEditSettings: {
|
|
297
|
+
editMode: {
|
|
298
|
+
value: "selected"
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
subModels: {
|
|
303
|
+
page: {
|
|
304
|
+
uid: "todo-bulk-edit-page-uid",
|
|
305
|
+
use: "ChildPageModel",
|
|
306
|
+
stepParams: {
|
|
307
|
+
pageSettings: {
|
|
308
|
+
general: {
|
|
309
|
+
displayTitle: false,
|
|
310
|
+
enableTabs: true
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
subModels: {
|
|
315
|
+
tabs: [
|
|
316
|
+
{
|
|
317
|
+
uid: "todo-bulk-edit-tab-uid",
|
|
318
|
+
use: "BulkEditChildPageTabModel",
|
|
319
|
+
stepParams: {
|
|
320
|
+
pageTabSettings: {
|
|
321
|
+
tab: {
|
|
322
|
+
title: "Bulk edit"
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
subModels: {
|
|
327
|
+
grid: {
|
|
328
|
+
uid: "todo-bulk-edit-grid-uid",
|
|
329
|
+
use: "BulkEditBlockGridModel"
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
]
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
docs: {
|
|
339
|
+
minimalExample: {
|
|
340
|
+
uid: "bulk-edit-users",
|
|
341
|
+
use: "BulkEditActionModel",
|
|
342
|
+
stepParams: {
|
|
343
|
+
bulkEditSettings: {
|
|
344
|
+
editMode: {
|
|
345
|
+
value: "selected"
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
subModels: {
|
|
350
|
+
page: {
|
|
351
|
+
uid: "bulk-edit-users-page",
|
|
352
|
+
use: "ChildPageModel"
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
dynamicHints: [
|
|
357
|
+
{
|
|
358
|
+
kind: "dynamic-children",
|
|
359
|
+
path: "BulkEditActionModel.subModels.page.subModels.tabs[*].subModels.grid.subModels.items",
|
|
360
|
+
message: "Bulk edit blocks inside the popup grid depend on runtime block registries.",
|
|
361
|
+
"x-flow": {
|
|
362
|
+
contextRequirements: ["block registry", "collection context"],
|
|
363
|
+
unresolvedReason: "runtime-bulk-edit-grid-items"
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
]
|
|
367
|
+
}
|
|
368
|
+
};
|
|
369
|
+
const flowSchemaContribution = {
|
|
370
|
+
models: [
|
|
371
|
+
bulkEditBlockGridModelInternalSchemaContribution,
|
|
372
|
+
bulkEditChildPageTabModelInternalSchemaContribution,
|
|
373
|
+
bulkEditActionModelSchemaContribution
|
|
374
|
+
],
|
|
375
|
+
defaults: {
|
|
376
|
+
source: "plugin"
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
380
|
+
0 && (module.exports = {
|
|
381
|
+
flowSchemaContribution
|
|
382
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import type { FlowSchemaContribution } from '../../flow-schema-registry';
|
|
10
|
+
export declare const flowSchemaContribution: FlowSchemaContribution;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var ActionBulkUpdateModel_exports = {};
|
|
28
|
+
__export(ActionBulkUpdateModel_exports, {
|
|
29
|
+
flowSchemaContribution: () => flowSchemaContribution
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(ActionBulkUpdateModel_exports);
|
|
32
|
+
const confirmStepParamsSchema = {
|
|
33
|
+
type: "object",
|
|
34
|
+
properties: {
|
|
35
|
+
enable: { type: "boolean" },
|
|
36
|
+
title: { type: "string" },
|
|
37
|
+
content: { type: "string" }
|
|
38
|
+
},
|
|
39
|
+
additionalProperties: false
|
|
40
|
+
};
|
|
41
|
+
const bulkUpdateActionModelSchemaContribution = {
|
|
42
|
+
use: "BulkUpdateActionModel",
|
|
43
|
+
title: "Bulk update action",
|
|
44
|
+
source: "plugin",
|
|
45
|
+
strict: false,
|
|
46
|
+
stepParamsSchema: {
|
|
47
|
+
type: "object",
|
|
48
|
+
properties: {
|
|
49
|
+
assignSettings: {
|
|
50
|
+
type: "object",
|
|
51
|
+
properties: {
|
|
52
|
+
confirm: confirmStepParamsSchema,
|
|
53
|
+
updateMode: {
|
|
54
|
+
type: "object",
|
|
55
|
+
properties: {
|
|
56
|
+
value: {
|
|
57
|
+
type: "string",
|
|
58
|
+
enum: ["selected", "all"]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
required: ["value"],
|
|
62
|
+
additionalProperties: false
|
|
63
|
+
},
|
|
64
|
+
assignFieldValues: {
|
|
65
|
+
type: "object",
|
|
66
|
+
properties: {
|
|
67
|
+
assignedValues: {
|
|
68
|
+
type: "object",
|
|
69
|
+
additionalProperties: true
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
additionalProperties: false
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
additionalProperties: true
|
|
76
|
+
},
|
|
77
|
+
apply: {
|
|
78
|
+
type: "object",
|
|
79
|
+
properties: {
|
|
80
|
+
apply: {
|
|
81
|
+
type: "object",
|
|
82
|
+
properties: {
|
|
83
|
+
assignedValues: {
|
|
84
|
+
type: "object",
|
|
85
|
+
additionalProperties: true
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
additionalProperties: true
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
additionalProperties: true
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
additionalProperties: true
|
|
95
|
+
},
|
|
96
|
+
subModelSlots: {
|
|
97
|
+
assignForm: {
|
|
98
|
+
type: "object",
|
|
99
|
+
use: "AssignFormModel",
|
|
100
|
+
description: "Internal assignment form used to configure bulk update field/value pairs."
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
skeleton: {
|
|
104
|
+
uid: "todo-bulk-update-action-uid",
|
|
105
|
+
use: "BulkUpdateActionModel",
|
|
106
|
+
stepParams: {
|
|
107
|
+
assignSettings: {
|
|
108
|
+
confirm: {
|
|
109
|
+
enable: false,
|
|
110
|
+
title: "Bulk update",
|
|
111
|
+
content: "Are you sure you want to perform the Update record action?"
|
|
112
|
+
},
|
|
113
|
+
updateMode: {
|
|
114
|
+
value: "selected"
|
|
115
|
+
},
|
|
116
|
+
assignFieldValues: {
|
|
117
|
+
assignedValues: {}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
subModels: {
|
|
122
|
+
assignForm: {
|
|
123
|
+
uid: "todo-bulk-update-assign-form-uid",
|
|
124
|
+
use: "AssignFormModel"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
docs: {
|
|
129
|
+
minimalExample: {
|
|
130
|
+
uid: "bulk-update-users",
|
|
131
|
+
use: "BulkUpdateActionModel",
|
|
132
|
+
stepParams: {
|
|
133
|
+
assignSettings: {
|
|
134
|
+
updateMode: {
|
|
135
|
+
value: "selected"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
subModels: {
|
|
140
|
+
assignForm: {
|
|
141
|
+
uid: "bulk-update-users-assign-form",
|
|
142
|
+
use: "AssignFormModel"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
dynamicHints: [
|
|
147
|
+
{
|
|
148
|
+
kind: "dynamic-ui-schema",
|
|
149
|
+
path: "BulkUpdateActionModel.stepParams.assignSettings.assignFieldValues.assignedValues",
|
|
150
|
+
message: "Assigned field/value pairs depend on runtime collection fields and assign-form editors.",
|
|
151
|
+
"x-flow": {
|
|
152
|
+
contextRequirements: ["collection fields", "assign form child tree"],
|
|
153
|
+
unresolvedReason: "runtime-bulk-update-assigned-values",
|
|
154
|
+
recommendedFallback: {}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
const flowSchemaContribution = {
|
|
161
|
+
models: [bulkUpdateActionModelSchemaContribution],
|
|
162
|
+
defaults: {
|
|
163
|
+
source: "plugin"
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
167
|
+
0 && (module.exports = {
|
|
168
|
+
flowSchemaContribution
|
|
169
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import type { FlowActionSchemaContribution, FlowSchemaContribution } from '../../flow-schema-registry';
|
|
10
|
+
export declare const customRequestActionSchemaContribution: FlowActionSchemaContribution;
|
|
11
|
+
export declare const flowSchemaContribution: FlowSchemaContribution;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var ActionCustomRequestModel_exports = {};
|
|
28
|
+
__export(ActionCustomRequestModel_exports, {
|
|
29
|
+
customRequestActionSchemaContribution: () => customRequestActionSchemaContribution,
|
|
30
|
+
flowSchemaContribution: () => flowSchemaContribution
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(ActionCustomRequestModel_exports);
|
|
33
|
+
const requestNameValueSchema = {
|
|
34
|
+
type: "object",
|
|
35
|
+
properties: {
|
|
36
|
+
name: { type: "string" },
|
|
37
|
+
value: { type: "string" }
|
|
38
|
+
},
|
|
39
|
+
additionalProperties: false
|
|
40
|
+
};
|
|
41
|
+
const customRequestActionSchemaContribution = {
|
|
42
|
+
name: "customRequest",
|
|
43
|
+
title: "Custom request",
|
|
44
|
+
source: "plugin",
|
|
45
|
+
strict: false,
|
|
46
|
+
paramsSchema: {
|
|
47
|
+
type: "object",
|
|
48
|
+
properties: {
|
|
49
|
+
key: { type: "string" },
|
|
50
|
+
method: {
|
|
51
|
+
type: "string",
|
|
52
|
+
enum: ["GET", "POST", "PUT", "PATCH", "DELETE"]
|
|
53
|
+
},
|
|
54
|
+
url: { type: "string" },
|
|
55
|
+
headers: {
|
|
56
|
+
type: "array",
|
|
57
|
+
items: requestNameValueSchema
|
|
58
|
+
},
|
|
59
|
+
params: {
|
|
60
|
+
type: "array",
|
|
61
|
+
items: requestNameValueSchema
|
|
62
|
+
},
|
|
63
|
+
data: {},
|
|
64
|
+
timeout: { type: "number" },
|
|
65
|
+
responseType: {
|
|
66
|
+
type: "string",
|
|
67
|
+
enum: ["json", "stream"]
|
|
68
|
+
},
|
|
69
|
+
variablePaths: {
|
|
70
|
+
type: "array",
|
|
71
|
+
items: { type: "string" }
|
|
72
|
+
},
|
|
73
|
+
roles: {
|
|
74
|
+
type: "array",
|
|
75
|
+
items: { type: "string" }
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
additionalProperties: false
|
|
79
|
+
},
|
|
80
|
+
docs: {
|
|
81
|
+
minimalExample: {
|
|
82
|
+
key: "req_demo",
|
|
83
|
+
method: "POST",
|
|
84
|
+
url: "https://api.example.com/orders",
|
|
85
|
+
headers: [
|
|
86
|
+
{
|
|
87
|
+
name: "Authorization",
|
|
88
|
+
value: "Bearer {{ctx.token}}"
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
params: [
|
|
92
|
+
{
|
|
93
|
+
name: "id",
|
|
94
|
+
value: "{{ctx.record.id}}"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
data: {
|
|
98
|
+
status: "processed"
|
|
99
|
+
},
|
|
100
|
+
timeout: 5e3,
|
|
101
|
+
responseType: "json"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
const flowSchemaContribution = {
|
|
106
|
+
actions: [customRequestActionSchemaContribution],
|
|
107
|
+
defaults: {
|
|
108
|
+
source: "plugin"
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
112
|
+
0 && (module.exports = {
|
|
113
|
+
customRequestActionSchemaContribution,
|
|
114
|
+
flowSchemaContribution
|
|
115
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import type { FlowSchemaContribution } from '../../flow-schema-registry';
|
|
10
|
+
export declare const flowSchemaContribution: FlowSchemaContribution;
|