@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,449 @@
|
|
|
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 BlockGridCardModel_exports = {};
|
|
28
|
+
__export(BlockGridCardModel_exports, {
|
|
29
|
+
flowSchemaContribution: () => flowSchemaContribution
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(BlockGridCardModel_exports);
|
|
32
|
+
const genericFilterSchemaId = "urn:nocobase:schema:plugin-block-grid-card:generic-filter";
|
|
33
|
+
const genericFilterSchema = {
|
|
34
|
+
$id: genericFilterSchemaId,
|
|
35
|
+
definitions: {
|
|
36
|
+
filterCondition: {
|
|
37
|
+
type: "object",
|
|
38
|
+
properties: {
|
|
39
|
+
path: {
|
|
40
|
+
type: "string"
|
|
41
|
+
},
|
|
42
|
+
operator: {
|
|
43
|
+
type: "string"
|
|
44
|
+
},
|
|
45
|
+
value: {},
|
|
46
|
+
noValue: {
|
|
47
|
+
type: "boolean"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
required: ["path"],
|
|
51
|
+
additionalProperties: true,
|
|
52
|
+
allOf: [
|
|
53
|
+
{
|
|
54
|
+
not: {
|
|
55
|
+
required: ["logic"]
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
not: {
|
|
60
|
+
required: ["items"]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
filterGroup: {
|
|
66
|
+
type: "object",
|
|
67
|
+
properties: {
|
|
68
|
+
logic: {
|
|
69
|
+
type: "string",
|
|
70
|
+
enum: ["$and", "$or"]
|
|
71
|
+
},
|
|
72
|
+
items: {
|
|
73
|
+
type: "array",
|
|
74
|
+
items: {
|
|
75
|
+
oneOf: [
|
|
76
|
+
{ $ref: `${genericFilterSchemaId}#/definitions/filterCondition` },
|
|
77
|
+
{ $ref: `${genericFilterSchemaId}#/definitions/filterGroup` }
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
required: ["logic", "items"],
|
|
83
|
+
additionalProperties: true,
|
|
84
|
+
allOf: [
|
|
85
|
+
{
|
|
86
|
+
not: {
|
|
87
|
+
required: ["path"]
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
not: {
|
|
92
|
+
required: ["operator"]
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
not: {
|
|
97
|
+
required: ["value"]
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
not: {
|
|
102
|
+
required: ["noValue"]
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
type: "object",
|
|
109
|
+
properties: {
|
|
110
|
+
logic: {
|
|
111
|
+
type: "string",
|
|
112
|
+
enum: ["$and", "$or"]
|
|
113
|
+
},
|
|
114
|
+
items: {
|
|
115
|
+
type: "array",
|
|
116
|
+
items: {
|
|
117
|
+
oneOf: [
|
|
118
|
+
{ $ref: `${genericFilterSchemaId}#/definitions/filterCondition` },
|
|
119
|
+
{ $ref: `${genericFilterSchemaId}#/definitions/filterGroup` }
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
required: ["logic", "items"],
|
|
125
|
+
additionalProperties: true,
|
|
126
|
+
allOf: [
|
|
127
|
+
{
|
|
128
|
+
not: {
|
|
129
|
+
required: ["path"]
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
not: {
|
|
134
|
+
required: ["operator"]
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
not: {
|
|
139
|
+
required: ["value"]
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
not: {
|
|
144
|
+
required: ["noValue"]
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
};
|
|
149
|
+
const sortingRuleParamsSchema = {
|
|
150
|
+
type: "object",
|
|
151
|
+
properties: {
|
|
152
|
+
sort: {
|
|
153
|
+
type: "array",
|
|
154
|
+
items: {
|
|
155
|
+
type: "object",
|
|
156
|
+
properties: {
|
|
157
|
+
field: { type: "string" },
|
|
158
|
+
direction: { type: "string", enum: ["asc", "desc"] }
|
|
159
|
+
},
|
|
160
|
+
required: ["field", "direction"],
|
|
161
|
+
additionalProperties: false
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
additionalProperties: false
|
|
166
|
+
};
|
|
167
|
+
const layoutParamsSchema = {
|
|
168
|
+
type: "object",
|
|
169
|
+
properties: {
|
|
170
|
+
layout: {
|
|
171
|
+
type: "string",
|
|
172
|
+
enum: ["vertical", "horizontal"]
|
|
173
|
+
},
|
|
174
|
+
labelAlign: {
|
|
175
|
+
type: "string",
|
|
176
|
+
enum: ["left", "right"]
|
|
177
|
+
},
|
|
178
|
+
labelWidth: { type: ["number", "string", "null"] },
|
|
179
|
+
labelWrap: { type: "boolean" },
|
|
180
|
+
colon: { type: "boolean" }
|
|
181
|
+
},
|
|
182
|
+
required: ["layout"],
|
|
183
|
+
additionalProperties: false
|
|
184
|
+
};
|
|
185
|
+
const genericModelNodeSchema = {
|
|
186
|
+
type: "object",
|
|
187
|
+
required: ["uid", "use"],
|
|
188
|
+
properties: {
|
|
189
|
+
uid: { type: "string" },
|
|
190
|
+
use: { type: "string" }
|
|
191
|
+
},
|
|
192
|
+
additionalProperties: true
|
|
193
|
+
};
|
|
194
|
+
const collectionResourceInitSchema = {
|
|
195
|
+
type: "object",
|
|
196
|
+
properties: {
|
|
197
|
+
dataSourceKey: { type: "string" },
|
|
198
|
+
collectionName: { type: "string" },
|
|
199
|
+
associationName: { type: "string" },
|
|
200
|
+
sourceId: { type: ["string", "number"] },
|
|
201
|
+
filterByTk: { type: ["string", "number"] }
|
|
202
|
+
},
|
|
203
|
+
required: ["dataSourceKey", "collectionName"],
|
|
204
|
+
additionalProperties: true
|
|
205
|
+
};
|
|
206
|
+
const collectionResourceSettingsStepParamsSchema = {
|
|
207
|
+
type: "object",
|
|
208
|
+
properties: {
|
|
209
|
+
resourceSettings: {
|
|
210
|
+
type: "object",
|
|
211
|
+
properties: {
|
|
212
|
+
init: collectionResourceInitSchema
|
|
213
|
+
},
|
|
214
|
+
additionalProperties: true
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
additionalProperties: true
|
|
218
|
+
};
|
|
219
|
+
const createCollectionResourceStepParams = (init = {}, extraStepParams = {}) => ({
|
|
220
|
+
resourceSettings: {
|
|
221
|
+
init: {
|
|
222
|
+
dataSourceKey: "main",
|
|
223
|
+
collectionName: "users",
|
|
224
|
+
...init
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
...extraStepParams
|
|
228
|
+
});
|
|
229
|
+
const createAssociatedCollectionPattern = (use, extraStepParams = {}) => ({
|
|
230
|
+
title: "Associated records in popup/new scene",
|
|
231
|
+
description: "Use associationName + sourceId when the block should load records through a parent relation.",
|
|
232
|
+
snippet: {
|
|
233
|
+
use,
|
|
234
|
+
stepParams: createCollectionResourceStepParams(
|
|
235
|
+
{
|
|
236
|
+
collectionName: "roles",
|
|
237
|
+
associationName: "users.roles",
|
|
238
|
+
sourceId: "{{ctx.view.inputArgs.sourceId}}"
|
|
239
|
+
},
|
|
240
|
+
extraStepParams
|
|
241
|
+
)
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
const gridCardItemModelInternalSchemaContribution = {
|
|
245
|
+
use: "GridCardItemModel",
|
|
246
|
+
title: "Grid card item",
|
|
247
|
+
source: "plugin",
|
|
248
|
+
strict: false,
|
|
249
|
+
exposure: "internal",
|
|
250
|
+
subModelSlots: {
|
|
251
|
+
grid: {
|
|
252
|
+
type: "object",
|
|
253
|
+
use: "DetailsGridModel",
|
|
254
|
+
description: "Grid card details grid."
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
skeleton: {
|
|
258
|
+
uid: "todo-grid-card-item-uid",
|
|
259
|
+
use: "GridCardItemModel",
|
|
260
|
+
subModels: {
|
|
261
|
+
grid: {
|
|
262
|
+
uid: "todo-grid-card-item-grid-uid",
|
|
263
|
+
use: "DetailsGridModel"
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
const gridCardBlockModelSchemaContribution = {
|
|
269
|
+
use: "GridCardBlockModel",
|
|
270
|
+
title: "Grid card block",
|
|
271
|
+
source: "plugin",
|
|
272
|
+
strict: false,
|
|
273
|
+
stepParamsSchema: {
|
|
274
|
+
type: "object",
|
|
275
|
+
properties: {
|
|
276
|
+
...collectionResourceSettingsStepParamsSchema.properties || {},
|
|
277
|
+
resourceSettings2: {
|
|
278
|
+
type: "object",
|
|
279
|
+
additionalProperties: true
|
|
280
|
+
},
|
|
281
|
+
GridCardSettings: {
|
|
282
|
+
type: "object",
|
|
283
|
+
properties: {
|
|
284
|
+
columnCount: {
|
|
285
|
+
type: "object",
|
|
286
|
+
properties: {
|
|
287
|
+
xs: { type: "number" },
|
|
288
|
+
sm: { type: "number" },
|
|
289
|
+
md: { type: "number" },
|
|
290
|
+
lg: { type: "number" },
|
|
291
|
+
xl: { type: "number" },
|
|
292
|
+
xxl: { type: "number" }
|
|
293
|
+
},
|
|
294
|
+
additionalProperties: false
|
|
295
|
+
},
|
|
296
|
+
rowCount: {
|
|
297
|
+
type: "object",
|
|
298
|
+
properties: {
|
|
299
|
+
rowCount: { type: "number" }
|
|
300
|
+
},
|
|
301
|
+
additionalProperties: false
|
|
302
|
+
},
|
|
303
|
+
dataScope: {
|
|
304
|
+
type: "object",
|
|
305
|
+
properties: {
|
|
306
|
+
filter: genericFilterSchema
|
|
307
|
+
},
|
|
308
|
+
additionalProperties: false
|
|
309
|
+
},
|
|
310
|
+
defaultSorting: sortingRuleParamsSchema,
|
|
311
|
+
layout: layoutParamsSchema
|
|
312
|
+
},
|
|
313
|
+
additionalProperties: true
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
additionalProperties: true
|
|
317
|
+
},
|
|
318
|
+
subModelSlots: {
|
|
319
|
+
item: {
|
|
320
|
+
type: "object",
|
|
321
|
+
use: "GridCardItemModel",
|
|
322
|
+
description: "Grid card item layout."
|
|
323
|
+
},
|
|
324
|
+
actions: {
|
|
325
|
+
type: "array",
|
|
326
|
+
dynamic: true,
|
|
327
|
+
schema: genericModelNodeSchema,
|
|
328
|
+
description: "Grid card actions depend on runtime collection-action registries."
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
skeleton: {
|
|
332
|
+
uid: "todo-uid",
|
|
333
|
+
use: "GridCardBlockModel",
|
|
334
|
+
stepParams: createCollectionResourceStepParams(
|
|
335
|
+
{},
|
|
336
|
+
{
|
|
337
|
+
GridCardSettings: {
|
|
338
|
+
columnCount: {
|
|
339
|
+
xs: 1,
|
|
340
|
+
md: 2,
|
|
341
|
+
lg: 3,
|
|
342
|
+
xxl: 4
|
|
343
|
+
},
|
|
344
|
+
rowCount: {
|
|
345
|
+
rowCount: 3
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
),
|
|
350
|
+
subModels: {
|
|
351
|
+
item: {
|
|
352
|
+
uid: "todo-grid-card-item-uid",
|
|
353
|
+
use: "GridCardItemModel"
|
|
354
|
+
},
|
|
355
|
+
actions: []
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
docs: {
|
|
359
|
+
minimalExample: {
|
|
360
|
+
uid: "grid-card-users",
|
|
361
|
+
use: "GridCardBlockModel",
|
|
362
|
+
stepParams: createCollectionResourceStepParams(
|
|
363
|
+
{},
|
|
364
|
+
{
|
|
365
|
+
GridCardSettings: {
|
|
366
|
+
columnCount: {
|
|
367
|
+
xs: 1,
|
|
368
|
+
md: 2,
|
|
369
|
+
lg: 3,
|
|
370
|
+
xxl: 4
|
|
371
|
+
},
|
|
372
|
+
rowCount: {
|
|
373
|
+
rowCount: 3
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
),
|
|
378
|
+
subModels: {
|
|
379
|
+
item: {
|
|
380
|
+
uid: "grid-card-item-users",
|
|
381
|
+
use: "GridCardItemModel"
|
|
382
|
+
},
|
|
383
|
+
actions: []
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
commonPatterns: [
|
|
387
|
+
{
|
|
388
|
+
title: "Basic grid card block",
|
|
389
|
+
snippet: {
|
|
390
|
+
use: "GridCardBlockModel",
|
|
391
|
+
stepParams: createCollectionResourceStepParams(
|
|
392
|
+
{},
|
|
393
|
+
{
|
|
394
|
+
GridCardSettings: {
|
|
395
|
+
columnCount: {
|
|
396
|
+
xs: 1,
|
|
397
|
+
md: 2,
|
|
398
|
+
lg: 3,
|
|
399
|
+
xxl: 4
|
|
400
|
+
},
|
|
401
|
+
rowCount: {
|
|
402
|
+
rowCount: 3
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
)
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
createAssociatedCollectionPattern("GridCardBlockModel", {
|
|
410
|
+
GridCardSettings: {
|
|
411
|
+
columnCount: {
|
|
412
|
+
xs: 1,
|
|
413
|
+
md: 2,
|
|
414
|
+
lg: 3,
|
|
415
|
+
xxl: 4
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
})
|
|
419
|
+
],
|
|
420
|
+
dynamicHints: [
|
|
421
|
+
{
|
|
422
|
+
kind: "dynamic-children",
|
|
423
|
+
path: "GridCardBlockModel.subModels.actions",
|
|
424
|
+
message: "Grid card actions depend on runtime collection-action registries.",
|
|
425
|
+
"x-flow": {
|
|
426
|
+
slotRules: {
|
|
427
|
+
slotKey: "actions",
|
|
428
|
+
type: "array"
|
|
429
|
+
},
|
|
430
|
+
contextRequirements: ["collection action registry"],
|
|
431
|
+
unresolvedReason: "runtime-grid-card-actions"
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
]
|
|
435
|
+
}
|
|
436
|
+
};
|
|
437
|
+
const flowSchemaContribution = {
|
|
438
|
+
inventory: {
|
|
439
|
+
publicTreeRoots: ["GridCardBlockModel"]
|
|
440
|
+
},
|
|
441
|
+
models: [gridCardItemModelInternalSchemaContribution, gridCardBlockModelSchemaContribution],
|
|
442
|
+
defaults: {
|
|
443
|
+
source: "plugin"
|
|
444
|
+
}
|
|
445
|
+
};
|
|
446
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
447
|
+
0 && (module.exports = {
|
|
448
|
+
flowSchemaContribution
|
|
449
|
+
});
|
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
import type { FlowModelSchemaContribution } from '
|
|
9
|
+
import type { FlowModelSchemaContribution } from '../../flow-schema-registry';
|
|
10
10
|
export declare const blockGridModelInternalSchemaContribution: FlowModelSchemaContribution;
|
|
@@ -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,143 @@
|
|
|
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 BlockIframeModel_exports = {};
|
|
28
|
+
__export(BlockIframeModel_exports, {
|
|
29
|
+
flowSchemaContribution: () => flowSchemaContribution
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(BlockIframeModel_exports);
|
|
32
|
+
const iframeParamSchema = {
|
|
33
|
+
type: "object",
|
|
34
|
+
properties: {
|
|
35
|
+
name: { type: "string" },
|
|
36
|
+
value: { type: "string" }
|
|
37
|
+
},
|
|
38
|
+
additionalProperties: false
|
|
39
|
+
};
|
|
40
|
+
const iframeBlockModelSchemaContribution = {
|
|
41
|
+
use: "IframeBlockModel",
|
|
42
|
+
title: "Iframe block",
|
|
43
|
+
source: "plugin",
|
|
44
|
+
strict: false,
|
|
45
|
+
stepParamsSchema: {
|
|
46
|
+
type: "object",
|
|
47
|
+
properties: {
|
|
48
|
+
iframeBlockSettings: {
|
|
49
|
+
type: "object",
|
|
50
|
+
properties: {
|
|
51
|
+
editIframe: {
|
|
52
|
+
type: "object",
|
|
53
|
+
properties: {
|
|
54
|
+
mode: {
|
|
55
|
+
type: "string",
|
|
56
|
+
enum: ["url", "html"]
|
|
57
|
+
},
|
|
58
|
+
url: { type: "string" },
|
|
59
|
+
allow: {
|
|
60
|
+
type: "string",
|
|
61
|
+
enum: [
|
|
62
|
+
"autoplay",
|
|
63
|
+
"camera",
|
|
64
|
+
"document-domain",
|
|
65
|
+
"encrypted-media",
|
|
66
|
+
"fullscreen",
|
|
67
|
+
"geolocation",
|
|
68
|
+
"microphone",
|
|
69
|
+
"midi",
|
|
70
|
+
"payment"
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
params: {
|
|
74
|
+
type: "array",
|
|
75
|
+
items: iframeParamSchema
|
|
76
|
+
},
|
|
77
|
+
html: { type: "string" },
|
|
78
|
+
htmlId: { type: ["string", "number", "null"] },
|
|
79
|
+
height: { type: ["number", "string", "null"] }
|
|
80
|
+
},
|
|
81
|
+
required: ["mode"],
|
|
82
|
+
additionalProperties: true
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
additionalProperties: true
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
additionalProperties: true
|
|
89
|
+
},
|
|
90
|
+
skeleton: {
|
|
91
|
+
uid: "todo-iframe-block-uid",
|
|
92
|
+
use: "IframeBlockModel",
|
|
93
|
+
stepParams: {
|
|
94
|
+
iframeBlockSettings: {
|
|
95
|
+
editIframe: {
|
|
96
|
+
mode: "url",
|
|
97
|
+
url: "https://www.nocobase.com",
|
|
98
|
+
params: []
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
docs: {
|
|
104
|
+
minimalExample: {
|
|
105
|
+
uid: "iframe-homepage",
|
|
106
|
+
use: "IframeBlockModel",
|
|
107
|
+
stepParams: {
|
|
108
|
+
iframeBlockSettings: {
|
|
109
|
+
editIframe: {
|
|
110
|
+
mode: "url",
|
|
111
|
+
url: "https://www.nocobase.com",
|
|
112
|
+
params: []
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
dynamicHints: [
|
|
118
|
+
{
|
|
119
|
+
kind: "dynamic-ui-schema",
|
|
120
|
+
path: "IframeBlockModel.stepParams.iframeBlockSettings.editIframe.htmlId",
|
|
121
|
+
message: "HTML mode persists raw HTML to the iframeHtml resource and stores the returned htmlId.",
|
|
122
|
+
"x-flow": {
|
|
123
|
+
contextRequirements: ["iframeHtml resource"],
|
|
124
|
+
unresolvedReason: "runtime-iframe-html-storage",
|
|
125
|
+
recommendedFallback: null
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
const flowSchemaContribution = {
|
|
132
|
+
inventory: {
|
|
133
|
+
publicTreeRoots: ["IframeBlockModel"]
|
|
134
|
+
},
|
|
135
|
+
models: [iframeBlockModelSchemaContribution],
|
|
136
|
+
defaults: {
|
|
137
|
+
source: "plugin"
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
141
|
+
0 && (module.exports = {
|
|
142
|
+
flowSchemaContribution
|
|
143
|
+
});
|
|
@@ -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;
|