@nocobase/plugin-flow-engine 2.1.0-alpha.11 → 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.
Files changed (152) hide show
  1. package/dist/externalVersion.js +12 -11
  2. package/dist/node_modules/ajv/package.json +1 -1
  3. package/dist/node_modules/ses/package.json +1 -1
  4. package/dist/node_modules/zod/package.json +1 -1
  5. package/dist/server/flow-models/schema-contribution-collector.d.ts +2 -1
  6. package/dist/server/flow-models/schema-contribution-collector.js +26 -5
  7. package/dist/server/flow-schema-contributions/actions/aclCheck.d.ts +1 -1
  8. package/dist/server/flow-schema-contributions/actions/aclCheckRefresh.d.ts +1 -1
  9. package/dist/server/flow-schema-contributions/actions/actionLinkageRules.d.ts +1 -1
  10. package/dist/server/flow-schema-contributions/actions/confirm.d.ts +1 -1
  11. package/dist/server/flow-schema-contributions/actions/customVariable.d.ts +1 -1
  12. package/dist/server/flow-schema-contributions/actions/dataScope.d.ts +1 -1
  13. package/dist/server/flow-schema-contributions/actions/detailsFieldLinkageRules.d.ts +1 -1
  14. package/dist/server/flow-schema-contributions/actions/fieldLinkageRules.d.ts +1 -1
  15. package/dist/server/flow-schema-contributions/actions/filterFormDefaultValues.d.ts +1 -1
  16. package/dist/server/flow-schema-contributions/actions/formAssignRules.d.ts +1 -1
  17. package/dist/server/flow-schema-contributions/actions/index.d.ts +1 -1
  18. package/dist/server/flow-schema-contributions/actions/layout.d.ts +1 -1
  19. package/dist/server/flow-schema-contributions/actions/linkageRulesRefresh.d.ts +1 -1
  20. package/dist/server/flow-schema-contributions/actions/navigateToURL.d.ts +1 -1
  21. package/dist/server/flow-schema-contributions/actions/openView.d.ts +1 -1
  22. package/dist/server/flow-schema-contributions/actions/refreshTargetBlocks.d.ts +1 -1
  23. package/dist/server/flow-schema-contributions/actions/runjs.d.ts +1 -1
  24. package/dist/server/flow-schema-contributions/actions/setTargetDataScope.d.ts +1 -1
  25. package/dist/server/flow-schema-contributions/actions/showMessage.d.ts +1 -1
  26. package/dist/server/flow-schema-contributions/actions/showNotification.d.ts +1 -1
  27. package/dist/server/flow-schema-contributions/actions/sortingRule.d.ts +1 -1
  28. package/dist/server/flow-schema-contributions/field-models.d.ts +1 -1
  29. package/dist/server/flow-schema-contributions/index.d.ts +1 -1
  30. package/dist/server/flow-schema-contributions/models/ActionBulkEditModel.d.ts +10 -0
  31. package/dist/server/flow-schema-contributions/models/ActionBulkEditModel.js +382 -0
  32. package/dist/server/flow-schema-contributions/models/ActionBulkUpdateModel.d.ts +10 -0
  33. package/dist/server/flow-schema-contributions/models/ActionBulkUpdateModel.js +169 -0
  34. package/dist/server/flow-schema-contributions/models/ActionCustomRequestModel.d.ts +11 -0
  35. package/dist/server/flow-schema-contributions/models/ActionCustomRequestModel.js +115 -0
  36. package/dist/server/flow-schema-contributions/models/ActionDuplicateModel.d.ts +10 -0
  37. package/dist/server/flow-schema-contributions/models/ActionDuplicateModel.js +169 -0
  38. package/dist/server/flow-schema-contributions/models/ActionExportModel.d.ts +10 -0
  39. package/dist/server/flow-schema-contributions/models/ActionExportModel.js +141 -0
  40. package/dist/server/flow-schema-contributions/models/ActionImportModel.d.ts +10 -0
  41. package/dist/server/flow-schema-contributions/models/ActionImportModel.js +122 -0
  42. package/dist/server/flow-schema-contributions/models/ActionModel.d.ts +1 -1
  43. package/dist/server/flow-schema-contributions/models/AddChildActionModel.d.ts +1 -1
  44. package/dist/server/flow-schema-contributions/models/AddNewActionModel.d.ts +1 -1
  45. package/dist/server/flow-schema-contributions/models/AssignFormGridModel.d.ts +1 -1
  46. package/dist/server/flow-schema-contributions/models/AssignFormItemModel.d.ts +1 -1
  47. package/dist/server/flow-schema-contributions/models/AssignFormModel.d.ts +1 -1
  48. package/dist/server/flow-schema-contributions/models/BasePageTabModel.d.ts +1 -1
  49. package/dist/server/flow-schema-contributions/models/BlockGridCardModel.d.ts +10 -0
  50. package/dist/server/flow-schema-contributions/models/BlockGridCardModel.js +449 -0
  51. package/dist/server/flow-schema-contributions/models/BlockGridModel.d.ts +1 -1
  52. package/dist/server/flow-schema-contributions/models/BlockIframeModel.d.ts +10 -0
  53. package/dist/server/flow-schema-contributions/models/BlockIframeModel.js +143 -0
  54. package/dist/server/flow-schema-contributions/models/BlockListModel.d.ts +10 -0
  55. package/dist/server/flow-schema-contributions/models/BlockListModel.js +435 -0
  56. package/dist/server/flow-schema-contributions/models/BlockMarkdownModel.d.ts +10 -0
  57. package/dist/server/flow-schema-contributions/models/BlockMarkdownModel.js +108 -0
  58. package/dist/server/flow-schema-contributions/models/BlockWorkbenchModel.d.ts +10 -0
  59. package/dist/server/flow-schema-contributions/models/BlockWorkbenchModel.js +173 -0
  60. package/dist/server/flow-schema-contributions/models/BulkDeleteActionModel.d.ts +1 -1
  61. package/dist/server/flow-schema-contributions/models/ChildPageModel.d.ts +1 -1
  62. package/dist/server/flow-schema-contributions/models/ChildPageTabModel.d.ts +1 -1
  63. package/dist/server/flow-schema-contributions/models/CommentsModel.d.ts +10 -0
  64. package/dist/server/flow-schema-contributions/models/CommentsModel.js +255 -0
  65. package/dist/server/flow-schema-contributions/models/CreateFormModel.d.ts +1 -1
  66. package/dist/server/flow-schema-contributions/models/DataVisualizationModel.d.ts +10 -0
  67. package/dist/server/flow-schema-contributions/models/DataVisualizationModel.js +240 -0
  68. package/dist/server/flow-schema-contributions/models/DeleteActionModel.d.ts +1 -1
  69. package/dist/server/flow-schema-contributions/models/DetailsBlockModel.d.ts +1 -1
  70. package/dist/server/flow-schema-contributions/models/DetailsGridModel.d.ts +1 -1
  71. package/dist/server/flow-schema-contributions/models/DetailsItemModel.d.ts +1 -1
  72. package/dist/server/flow-schema-contributions/models/EditActionModel.d.ts +1 -1
  73. package/dist/server/flow-schema-contributions/models/EditFormModel.d.ts +1 -1
  74. package/dist/server/flow-schema-contributions/models/ExpandCollapseActionModel.d.ts +1 -1
  75. package/dist/server/flow-schema-contributions/models/FieldAttachmentUrlModel.d.ts +10 -0
  76. package/dist/server/flow-schema-contributions/models/FieldAttachmentUrlModel.js +87 -0
  77. package/dist/server/flow-schema-contributions/models/FieldCodeModel.d.ts +10 -0
  78. package/dist/server/flow-schema-contributions/models/FieldCodeModel.js +99 -0
  79. package/dist/server/flow-schema-contributions/models/FieldFormulaModel.d.ts +10 -0
  80. package/dist/server/flow-schema-contributions/models/FieldFormulaModel.js +152 -0
  81. package/dist/server/flow-schema-contributions/models/FieldMarkdownVditorModel.d.ts +10 -0
  82. package/dist/server/flow-schema-contributions/models/FieldMarkdownVditorModel.js +92 -0
  83. package/dist/server/flow-schema-contributions/models/FieldSequenceModel.d.ts +10 -0
  84. package/dist/server/flow-schema-contributions/models/FieldSequenceModel.js +60 -0
  85. package/dist/server/flow-schema-contributions/models/FieldSortModel.d.ts +10 -0
  86. package/dist/server/flow-schema-contributions/models/FieldSortModel.js +87 -0
  87. package/dist/server/flow-schema-contributions/models/FileManagerModel.d.ts +10 -0
  88. package/dist/server/flow-schema-contributions/models/FileManagerModel.js +115 -0
  89. package/dist/server/flow-schema-contributions/models/FilterActionModel.d.ts +1 -1
  90. package/dist/server/flow-schema-contributions/models/FilterFormBlockModel.d.ts +1 -1
  91. package/dist/server/flow-schema-contributions/models/FilterFormCollapseActionModel.d.ts +1 -1
  92. package/dist/server/flow-schema-contributions/models/FilterFormCustomFieldModel.d.ts +1 -1
  93. package/dist/server/flow-schema-contributions/models/FilterFormGridModel.d.ts +1 -1
  94. package/dist/server/flow-schema-contributions/models/FilterFormItemModel.d.ts +1 -1
  95. package/dist/server/flow-schema-contributions/models/FilterFormJSActionModel.d.ts +1 -1
  96. package/dist/server/flow-schema-contributions/models/FilterFormResetActionModel.d.ts +1 -1
  97. package/dist/server/flow-schema-contributions/models/FilterFormSubmitActionModel.d.ts +1 -1
  98. package/dist/server/flow-schema-contributions/models/FormAssociationItemModel.d.ts +1 -1
  99. package/dist/server/flow-schema-contributions/models/FormBlockModel.d.ts +1 -1
  100. package/dist/server/flow-schema-contributions/models/FormGridModel.d.ts +1 -1
  101. package/dist/server/flow-schema-contributions/models/FormItemModel.d.ts +1 -1
  102. package/dist/server/flow-schema-contributions/models/FormSubmitActionModel.d.ts +1 -1
  103. package/dist/server/flow-schema-contributions/models/JSActionModel.d.ts +1 -1
  104. package/dist/server/flow-schema-contributions/models/JSBlockModel.d.ts +1 -1
  105. package/dist/server/flow-schema-contributions/models/JSCollectionActionModel.d.ts +1 -1
  106. package/dist/server/flow-schema-contributions/models/JSColumnModel.d.ts +1 -1
  107. package/dist/server/flow-schema-contributions/models/JSFormActionModel.d.ts +1 -1
  108. package/dist/server/flow-schema-contributions/models/JSItemModel.d.ts +1 -1
  109. package/dist/server/flow-schema-contributions/models/JSRecordActionModel.d.ts +1 -1
  110. package/dist/server/flow-schema-contributions/models/LinkActionModel.d.ts +1 -1
  111. package/dist/server/flow-schema-contributions/models/MapModel.d.ts +10 -0
  112. package/dist/server/flow-schema-contributions/models/MapModel.js +427 -0
  113. package/dist/server/flow-schema-contributions/models/PageModel.d.ts +1 -1
  114. package/dist/server/flow-schema-contributions/models/PageTabModel.d.ts +1 -1
  115. package/dist/server/flow-schema-contributions/models/PopupActionModel.d.ts +1 -1
  116. package/dist/server/flow-schema-contributions/models/PopupCollectionActionModel.d.ts +1 -1
  117. package/dist/server/flow-schema-contributions/models/RefreshActionModel.d.ts +1 -1
  118. package/dist/server/flow-schema-contributions/models/RootPageModel.d.ts +1 -1
  119. package/dist/server/flow-schema-contributions/models/RootPageTabModel.d.ts +1 -1
  120. package/dist/server/flow-schema-contributions/models/RouteModel.d.ts +1 -1
  121. package/dist/server/flow-schema-contributions/models/TableActionsColumnModel.d.ts +1 -1
  122. package/dist/server/flow-schema-contributions/models/TableBlockModel.d.ts +1 -1
  123. package/dist/server/flow-schema-contributions/models/TableColumnModel.d.ts +1 -1
  124. package/dist/server/flow-schema-contributions/models/TableCustomColumnModel.d.ts +1 -1
  125. package/dist/server/flow-schema-contributions/models/UiTemplatesModel.d.ts +10 -0
  126. package/dist/server/flow-schema-contributions/models/UiTemplatesModel.js +130 -0
  127. package/dist/server/flow-schema-contributions/models/UpdateRecordActionModel.d.ts +1 -1
  128. package/dist/server/flow-schema-contributions/models/ViewActionModel.d.ts +1 -1
  129. package/dist/server/flow-schema-contributions/models/index.d.ts +6 -1
  130. package/dist/server/flow-schema-contributions/models/index.js +114 -0
  131. package/dist/server/flow-schema-contributions/shared.d.ts +1 -1
  132. package/dist/server/flow-schema-registry/FlowSchemaRegistry.d.ts +154 -0
  133. package/dist/server/flow-schema-registry/FlowSchemaRegistry.js +1424 -0
  134. package/dist/server/flow-schema-registry/flow-schema-registry/fieldBinding.d.ts +32 -0
  135. package/dist/server/flow-schema-registry/flow-schema-registry/fieldBinding.js +159 -0
  136. package/dist/server/flow-schema-registry/flow-schema-registry/modelPatches.d.ts +16 -0
  137. package/dist/server/flow-schema-registry/flow-schema-registry/modelPatches.js +226 -0
  138. package/dist/server/flow-schema-registry/flow-schema-registry/schemaInference.d.ts +17 -0
  139. package/dist/server/flow-schema-registry/flow-schema-registry/schemaInference.js +204 -0
  140. package/dist/server/flow-schema-registry/flow-schema-registry/utils.d.ts +25 -0
  141. package/dist/server/flow-schema-registry/flow-schema-registry/utils.js +278 -0
  142. package/dist/server/flow-schema-registry/index.d.ts +10 -0
  143. package/dist/server/flow-schema-registry/index.js +32 -0
  144. package/dist/server/flow-schema-registry/types.d.ts +244 -0
  145. package/dist/server/flow-schema-registry/types.js +24 -0
  146. package/dist/server/flow-schema-service.d.ts +1 -1
  147. package/dist/server/flow-schema-service.js +2 -2
  148. package/dist/server/plugin.d.ts +1 -1
  149. package/dist/server/repository.d.ts +1 -0
  150. package/dist/server/repository.js +3 -5
  151. package/dist/server/server.js +1 -1
  152. package/package.json +2 -2
@@ -0,0 +1,435 @@
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 BlockListModel_exports = {};
28
+ __export(BlockListModel_exports, {
29
+ flowSchemaContribution: () => flowSchemaContribution
30
+ });
31
+ module.exports = __toCommonJS(BlockListModel_exports);
32
+ const genericFilterSchemaId = "urn:nocobase:schema:plugin-block-list: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 listItemModelInternalSchemaContribution = {
245
+ use: "ListItemModel",
246
+ title: "List item",
247
+ source: "plugin",
248
+ strict: false,
249
+ exposure: "internal",
250
+ subModelSlots: {
251
+ grid: {
252
+ type: "object",
253
+ use: "DetailsGridModel",
254
+ description: "Per-record details grid."
255
+ }
256
+ },
257
+ skeleton: {
258
+ uid: "todo-list-item-uid",
259
+ use: "ListItemModel",
260
+ subModels: {
261
+ grid: {
262
+ uid: "todo-list-item-grid-uid",
263
+ use: "DetailsGridModel"
264
+ }
265
+ }
266
+ }
267
+ };
268
+ const listBlockModelSchemaContribution = {
269
+ use: "ListBlockModel",
270
+ title: "List 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
+ listSettings: {
282
+ type: "object",
283
+ properties: {
284
+ pageSize: {
285
+ type: "object",
286
+ properties: {
287
+ pageSize: {
288
+ type: "number",
289
+ enum: [5, 10, 20, 50, 100, 200]
290
+ }
291
+ },
292
+ additionalProperties: false
293
+ },
294
+ dataScope: {
295
+ type: "object",
296
+ properties: {
297
+ filter: genericFilterSchema
298
+ },
299
+ additionalProperties: false
300
+ },
301
+ defaultSorting: sortingRuleParamsSchema,
302
+ layout: layoutParamsSchema
303
+ },
304
+ additionalProperties: true
305
+ },
306
+ paginationChange: {
307
+ type: "object",
308
+ properties: {
309
+ linkageRulesRefresh: {
310
+ type: "object",
311
+ properties: {
312
+ actionName: { type: "string" },
313
+ flowKey: { type: "string" },
314
+ stepKey: { type: "string" }
315
+ },
316
+ required: ["actionName", "flowKey"],
317
+ additionalProperties: false
318
+ }
319
+ },
320
+ additionalProperties: true
321
+ }
322
+ },
323
+ additionalProperties: true
324
+ },
325
+ subModelSlots: {
326
+ item: {
327
+ type: "object",
328
+ use: "ListItemModel",
329
+ description: "List item layout."
330
+ },
331
+ actions: {
332
+ type: "array",
333
+ dynamic: true,
334
+ schema: genericModelNodeSchema,
335
+ description: "List actions depend on runtime collection-action registries."
336
+ }
337
+ },
338
+ skeleton: {
339
+ uid: "todo-uid",
340
+ use: "ListBlockModel",
341
+ stepParams: createCollectionResourceStepParams(
342
+ {},
343
+ {
344
+ listSettings: {
345
+ pageSize: {
346
+ pageSize: 20
347
+ }
348
+ }
349
+ }
350
+ ),
351
+ subModels: {
352
+ item: {
353
+ uid: "todo-list-item-uid",
354
+ use: "ListItemModel"
355
+ },
356
+ actions: []
357
+ }
358
+ },
359
+ docs: {
360
+ minimalExample: {
361
+ uid: "list-users",
362
+ use: "ListBlockModel",
363
+ stepParams: createCollectionResourceStepParams(
364
+ {},
365
+ {
366
+ listSettings: {
367
+ pageSize: {
368
+ pageSize: 20
369
+ }
370
+ }
371
+ }
372
+ ),
373
+ subModels: {
374
+ item: {
375
+ uid: "list-item-users",
376
+ use: "ListItemModel"
377
+ },
378
+ actions: []
379
+ }
380
+ },
381
+ commonPatterns: [
382
+ {
383
+ title: "Basic list block",
384
+ snippet: {
385
+ use: "ListBlockModel",
386
+ stepParams: createCollectionResourceStepParams(
387
+ {},
388
+ {
389
+ listSettings: {
390
+ pageSize: {
391
+ pageSize: 20
392
+ }
393
+ }
394
+ }
395
+ )
396
+ }
397
+ },
398
+ createAssociatedCollectionPattern("ListBlockModel", {
399
+ listSettings: {
400
+ pageSize: {
401
+ pageSize: 20
402
+ }
403
+ }
404
+ })
405
+ ],
406
+ dynamicHints: [
407
+ {
408
+ kind: "dynamic-children",
409
+ path: "ListBlockModel.subModels.actions",
410
+ message: "List actions depend on runtime collection-action registries.",
411
+ "x-flow": {
412
+ slotRules: {
413
+ slotKey: "actions",
414
+ type: "array"
415
+ },
416
+ contextRequirements: ["collection action registry"],
417
+ unresolvedReason: "runtime-list-actions"
418
+ }
419
+ }
420
+ ]
421
+ }
422
+ };
423
+ const flowSchemaContribution = {
424
+ inventory: {
425
+ publicTreeRoots: ["ListBlockModel"]
426
+ },
427
+ models: [listItemModelInternalSchemaContribution, listBlockModelSchemaContribution],
428
+ defaults: {
429
+ source: "plugin"
430
+ }
431
+ };
432
+ // Annotate the CommonJS export names for ESM import in node:
433
+ 0 && (module.exports = {
434
+ flowSchemaContribution
435
+ });
@@ -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,108 @@
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 BlockMarkdownModel_exports = {};
28
+ __export(BlockMarkdownModel_exports, {
29
+ flowSchemaContribution: () => flowSchemaContribution
30
+ });
31
+ module.exports = __toCommonJS(BlockMarkdownModel_exports);
32
+ const markdownBlockModelSchemaContribution = {
33
+ use: "MarkdownBlockModel",
34
+ title: "Markdown block",
35
+ source: "plugin",
36
+ strict: false,
37
+ stepParamsSchema: {
38
+ type: "object",
39
+ properties: {
40
+ markdownBlockSettings: {
41
+ type: "object",
42
+ properties: {
43
+ editMarkdown: {
44
+ type: "object",
45
+ properties: {
46
+ content: {
47
+ type: "string"
48
+ }
49
+ },
50
+ required: ["content"],
51
+ additionalProperties: false
52
+ }
53
+ },
54
+ additionalProperties: true
55
+ }
56
+ },
57
+ additionalProperties: true
58
+ },
59
+ skeleton: {
60
+ uid: "todo-markdown-block-uid",
61
+ use: "MarkdownBlockModel",
62
+ stepParams: {
63
+ markdownBlockSettings: {
64
+ editMarkdown: {
65
+ content: "This is a demo text, **supports Markdown syntax**."
66
+ }
67
+ }
68
+ }
69
+ },
70
+ docs: {
71
+ minimalExample: {
72
+ uid: "markdown-intro",
73
+ use: "MarkdownBlockModel",
74
+ stepParams: {
75
+ markdownBlockSettings: {
76
+ editMarkdown: {
77
+ content: "# Welcome"
78
+ }
79
+ }
80
+ }
81
+ },
82
+ dynamicHints: [
83
+ {
84
+ kind: "dynamic-ui-schema",
85
+ path: "MarkdownBlockModel.stepParams.markdownBlockSettings.editMarkdown.content",
86
+ message: "Markdown content can contain liquid variables resolved against the runtime flow context.",
87
+ "x-flow": {
88
+ contextRequirements: ["liquid variables", "markdown renderer"],
89
+ unresolvedReason: "runtime-markdown-context",
90
+ recommendedFallback: "# Welcome"
91
+ }
92
+ }
93
+ ]
94
+ }
95
+ };
96
+ const flowSchemaContribution = {
97
+ inventory: {
98
+ publicTreeRoots: ["MarkdownBlockModel"]
99
+ },
100
+ models: [markdownBlockModelSchemaContribution],
101
+ defaults: {
102
+ source: "plugin"
103
+ }
104
+ };
105
+ // Annotate the CommonJS export names for ESM import in node:
106
+ 0 && (module.exports = {
107
+ flowSchemaContribution
108
+ });
@@ -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;