@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,240 @@
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 DataVisualizationModel_exports = {};
28
+ __export(DataVisualizationModel_exports, {
29
+ flowSchemaContribution: () => flowSchemaContribution
30
+ });
31
+ module.exports = __toCommonJS(DataVisualizationModel_exports);
32
+ const chartBlockModelSchemaContribution = {
33
+ use: "ChartBlockModel",
34
+ title: "Chart block",
35
+ source: "plugin",
36
+ strict: false,
37
+ stepParamsSchema: {
38
+ type: "object",
39
+ properties: {
40
+ chartSettings: {
41
+ type: "object",
42
+ properties: {
43
+ configure: {
44
+ type: "object",
45
+ properties: {
46
+ query: {
47
+ type: "object",
48
+ properties: {
49
+ mode: {
50
+ type: "string",
51
+ enum: ["builder", "sql"]
52
+ },
53
+ collectionPath: {
54
+ type: "array",
55
+ items: { type: "string" },
56
+ minItems: 2,
57
+ maxItems: 2
58
+ },
59
+ measures: {
60
+ type: "array",
61
+ items: {
62
+ type: "object",
63
+ properties: {
64
+ field: { type: "string" },
65
+ aggregation: { type: "string" },
66
+ alias: { type: "string" }
67
+ },
68
+ additionalProperties: true
69
+ }
70
+ },
71
+ dimensions: {
72
+ type: "array",
73
+ items: {
74
+ type: "object",
75
+ properties: {
76
+ field: { type: "string" },
77
+ alias: { type: "string" },
78
+ format: { type: "string" }
79
+ },
80
+ additionalProperties: true
81
+ }
82
+ },
83
+ sqlDatasource: { type: "string" },
84
+ sql: { type: "string" }
85
+ },
86
+ additionalProperties: true
87
+ },
88
+ chart: {
89
+ type: "object",
90
+ properties: {
91
+ option: {
92
+ type: "object",
93
+ properties: {
94
+ mode: {
95
+ type: "string",
96
+ enum: ["basic", "custom"]
97
+ },
98
+ builder: {
99
+ type: "object",
100
+ additionalProperties: true
101
+ },
102
+ raw: { type: "string" }
103
+ },
104
+ additionalProperties: true
105
+ },
106
+ events: {
107
+ type: "object",
108
+ properties: {
109
+ raw: { type: "string" }
110
+ },
111
+ additionalProperties: true
112
+ }
113
+ },
114
+ additionalProperties: true
115
+ }
116
+ },
117
+ additionalProperties: true
118
+ }
119
+ },
120
+ additionalProperties: true
121
+ }
122
+ },
123
+ additionalProperties: true
124
+ },
125
+ skeleton: {
126
+ uid: "todo-chart-block-uid",
127
+ use: "ChartBlockModel",
128
+ stepParams: {
129
+ chartSettings: {
130
+ configure: {
131
+ query: {
132
+ mode: "builder",
133
+ collectionPath: ["main", "orders"],
134
+ measures: [
135
+ {
136
+ field: "id",
137
+ aggregation: "count",
138
+ alias: "count_id"
139
+ }
140
+ ],
141
+ dimensions: [
142
+ {
143
+ field: "createdAt"
144
+ }
145
+ ]
146
+ },
147
+ chart: {
148
+ option: {
149
+ mode: "basic",
150
+ builder: {
151
+ type: "line",
152
+ xField: "createdAt",
153
+ yField: "count_id"
154
+ }
155
+ }
156
+ }
157
+ }
158
+ }
159
+ }
160
+ },
161
+ docs: {
162
+ minimalExample: {
163
+ uid: "chart-users",
164
+ use: "ChartBlockModel",
165
+ stepParams: {
166
+ chartSettings: {
167
+ configure: {
168
+ query: {
169
+ mode: "builder",
170
+ collectionPath: ["main", "orders"],
171
+ measures: [
172
+ {
173
+ field: "id",
174
+ aggregation: "count",
175
+ alias: "count_id"
176
+ }
177
+ ],
178
+ dimensions: [
179
+ {
180
+ field: "createdAt"
181
+ }
182
+ ]
183
+ },
184
+ chart: {
185
+ option: {
186
+ mode: "basic",
187
+ builder: {
188
+ type: "line",
189
+ xField: "createdAt",
190
+ yField: "count_id"
191
+ }
192
+ }
193
+ }
194
+ }
195
+ }
196
+ }
197
+ },
198
+ dynamicHints: [
199
+ {
200
+ kind: "dynamic-ui-schema",
201
+ path: "ChartBlockModel.stepParams.chartSettings.configure.query",
202
+ message: "Chart query configuration depends on runtime collections and query builders. Builder charts are renderable only when collectionPath includes datasource+collection and measures are present.",
203
+ "x-flow": {
204
+ contextRequirements: ["collection metadata", "query builder", "optional SQL resource"],
205
+ unresolvedReason: "runtime-chart-query-config",
206
+ recommendedFallback: {
207
+ mode: "builder"
208
+ }
209
+ }
210
+ },
211
+ {
212
+ kind: "dynamic-ui-schema",
213
+ path: "ChartBlockModel.stepParams.chartSettings.configure.chart",
214
+ message: "Chart option builders and event scripts depend on runtime chart builders and RunJS execution. Basic mode still needs option.builder; custom mode does not bypass query/dataSource requirements.",
215
+ "x-flow": {
216
+ contextRequirements: ["chart builder", "RunJS"],
217
+ unresolvedReason: "runtime-chart-option-builder",
218
+ recommendedFallback: {
219
+ option: {
220
+ mode: "basic"
221
+ }
222
+ }
223
+ }
224
+ }
225
+ ]
226
+ }
227
+ };
228
+ const flowSchemaContribution = {
229
+ inventory: {
230
+ publicTreeRoots: ["ChartBlockModel"]
231
+ },
232
+ models: [chartBlockModelSchemaContribution],
233
+ defaults: {
234
+ source: "plugin"
235
+ }
236
+ };
237
+ // Annotate the CommonJS export names for ESM import in node:
238
+ 0 && (module.exports = {
239
+ flowSchemaContribution
240
+ });
@@ -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 '@nocobase/flow-engine';
9
+ import type { FlowModelSchemaContribution } from '../../flow-schema-registry';
10
10
  export declare const deleteActionModelInternalSchemaContribution: FlowModelSchemaContribution;
@@ -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 '@nocobase/flow-engine';
9
+ import type { FlowModelSchemaContribution } from '../../flow-schema-registry';
10
10
  export declare const detailsBlockModelSchemaContribution: FlowModelSchemaContribution;
@@ -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 '@nocobase/flow-engine';
9
+ import type { FlowModelSchemaContribution } from '../../flow-schema-registry';
10
10
  export declare const detailsGridModelInternalSchemaContribution: FlowModelSchemaContribution;
@@ -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 '@nocobase/flow-engine';
9
+ import type { FlowModelSchemaContribution } from '../../flow-schema-registry';
10
10
  export declare const detailsItemModelInternalSchemaContribution: FlowModelSchemaContribution;
@@ -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 '@nocobase/flow-engine';
9
+ import type { FlowModelSchemaContribution } from '../../flow-schema-registry';
10
10
  export declare const editActionModelInternalSchemaContribution: FlowModelSchemaContribution;
@@ -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 '@nocobase/flow-engine';
9
+ import type { FlowModelSchemaContribution } from '../../flow-schema-registry';
10
10
  export declare const editFormModelSchemaContribution: FlowModelSchemaContribution;
@@ -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 '@nocobase/flow-engine';
9
+ import type { FlowModelSchemaContribution } from '../../flow-schema-registry';
10
10
  export declare const expandCollapseActionModelInternalSchemaContribution: 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,87 @@
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 FieldAttachmentUrlModel_exports = {};
28
+ __export(FieldAttachmentUrlModel_exports, {
29
+ flowSchemaContribution: () => flowSchemaContribution
30
+ });
31
+ module.exports = __toCommonJS(FieldAttachmentUrlModel_exports);
32
+ const attachmentUrlFieldModelSchemaContribution = {
33
+ use: "AttachmentURLFieldModel",
34
+ title: "Attachment URL",
35
+ source: "plugin",
36
+ strict: false,
37
+ exposure: "internal",
38
+ stepParamsSchema: {
39
+ type: "object",
40
+ properties: {
41
+ fieldSettings: {
42
+ type: "object",
43
+ properties: {
44
+ init: {
45
+ type: "object",
46
+ properties: {
47
+ dataSourceKey: { type: "string" },
48
+ collectionName: { type: "string" },
49
+ fieldPath: { type: "string" }
50
+ },
51
+ additionalProperties: true
52
+ }
53
+ },
54
+ additionalProperties: true
55
+ }
56
+ },
57
+ additionalProperties: true
58
+ },
59
+ skeleton: {
60
+ uid: "todo-attachment-url-field-model",
61
+ use: "AttachmentURLFieldModel"
62
+ }
63
+ };
64
+ const flowSchemaContribution = {
65
+ models: [attachmentUrlFieldModelSchemaContribution],
66
+ fieldBindings: [
67
+ {
68
+ context: "editable-field",
69
+ use: "AttachmentURLFieldModel",
70
+ interfaces: ["attachmentURL"],
71
+ isDefault: true
72
+ },
73
+ {
74
+ context: "display-field",
75
+ use: "DisplayTextFieldModel",
76
+ interfaces: ["attachmentURL"],
77
+ isDefault: true
78
+ }
79
+ ],
80
+ defaults: {
81
+ source: "plugin"
82
+ }
83
+ };
84
+ // Annotate the CommonJS export names for ESM import in node:
85
+ 0 && (module.exports = {
86
+ flowSchemaContribution
87
+ });
@@ -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,99 @@
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 FieldCodeModel_exports = {};
28
+ __export(FieldCodeModel_exports, {
29
+ flowSchemaContribution: () => flowSchemaContribution
30
+ });
31
+ module.exports = __toCommonJS(FieldCodeModel_exports);
32
+ function createFieldContribution(use, title) {
33
+ return {
34
+ use,
35
+ title,
36
+ source: "plugin",
37
+ strict: false,
38
+ exposure: "internal",
39
+ stepParamsSchema: {
40
+ type: "object",
41
+ properties: {
42
+ fieldSettings: {
43
+ type: "object",
44
+ properties: {
45
+ init: {
46
+ type: "object",
47
+ properties: {
48
+ dataSourceKey: { type: "string" },
49
+ collectionName: { type: "string" },
50
+ fieldPath: { type: "string" },
51
+ associationPathName: { type: "string" }
52
+ },
53
+ additionalProperties: true
54
+ }
55
+ },
56
+ additionalProperties: true
57
+ }
58
+ },
59
+ additionalProperties: true
60
+ },
61
+ skeleton: {
62
+ uid: `todo-${use}`.replace(/[^a-zA-Z0-9]+/g, "-").toLowerCase(),
63
+ use
64
+ }
65
+ };
66
+ }
67
+ const flowSchemaContribution = {
68
+ models: [
69
+ createFieldContribution("CodeFieldModel", "Code"),
70
+ createFieldContribution("DisplayCodeFieldModel", "Display code")
71
+ ],
72
+ fieldBindings: [
73
+ {
74
+ context: "editable-field",
75
+ use: "CodeFieldModel",
76
+ interfaces: ["code"],
77
+ isDefault: true
78
+ },
79
+ {
80
+ context: "display-field",
81
+ use: "DisplayCodeFieldModel",
82
+ interfaces: ["code"],
83
+ isDefault: true
84
+ },
85
+ {
86
+ context: "filter-field",
87
+ use: "InputFieldModel",
88
+ interfaces: ["code"],
89
+ isDefault: true
90
+ }
91
+ ],
92
+ defaults: {
93
+ source: "plugin"
94
+ }
95
+ };
96
+ // Annotate the CommonJS export names for ESM import in node:
97
+ 0 && (module.exports = {
98
+ flowSchemaContribution
99
+ });
@@ -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,152 @@
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 FieldFormulaModel_exports = {};
28
+ __export(FieldFormulaModel_exports, {
29
+ flowSchemaContribution: () => flowSchemaContribution
30
+ });
31
+ module.exports = __toCommonJS(FieldFormulaModel_exports);
32
+ function createFieldContribution(use, title) {
33
+ return {
34
+ use,
35
+ title,
36
+ source: "plugin",
37
+ strict: false,
38
+ exposure: "internal",
39
+ stepParamsSchema: {
40
+ type: "object",
41
+ properties: {
42
+ fieldSettings: {
43
+ type: "object",
44
+ properties: {
45
+ init: {
46
+ type: "object",
47
+ properties: {
48
+ dataSourceKey: { type: "string" },
49
+ collectionName: { type: "string" },
50
+ fieldPath: { type: "string" },
51
+ associationPathName: { type: "string" }
52
+ },
53
+ additionalProperties: true
54
+ }
55
+ },
56
+ additionalProperties: true
57
+ }
58
+ },
59
+ additionalProperties: true
60
+ },
61
+ skeleton: {
62
+ uid: `todo-${use}`.replace(/[^a-zA-Z0-9]+/g, "-").toLowerCase(),
63
+ use
64
+ }
65
+ };
66
+ }
67
+ const flowSchemaContribution = {
68
+ models: [createFieldContribution("FormulaFieldModel", "Formula")],
69
+ fieldBindings: [
70
+ {
71
+ context: "editable-field",
72
+ use: "FormulaFieldModel",
73
+ interfaces: ["formula"],
74
+ isDefault: true
75
+ },
76
+ {
77
+ context: "display-field",
78
+ use: "DisplayCheckboxFieldModel",
79
+ interfaces: ["formula"],
80
+ isDefault: true,
81
+ conditions: {
82
+ fieldTypes: ["boolean"]
83
+ }
84
+ },
85
+ {
86
+ context: "display-field",
87
+ use: "DisplayDateTimeFieldModel",
88
+ interfaces: ["formula"],
89
+ isDefault: true,
90
+ conditions: {
91
+ fieldTypes: ["date"]
92
+ }
93
+ },
94
+ {
95
+ context: "display-field",
96
+ use: "DisplayTextFieldModel",
97
+ interfaces: ["formula"],
98
+ isDefault: true,
99
+ conditions: {
100
+ fieldTypes: ["string"]
101
+ }
102
+ },
103
+ {
104
+ context: "display-field",
105
+ use: "DisplayNumberFieldModel",
106
+ interfaces: ["formula"],
107
+ isDefault: true,
108
+ conditions: {
109
+ fieldTypes: ["double", "bigInt", "integer"]
110
+ }
111
+ },
112
+ {
113
+ context: "filter-field",
114
+ use: "InputFieldModel",
115
+ interfaces: ["formula"],
116
+ conditions: {
117
+ fieldTypes: ["string", "text", "url", "uuid", "email", "phone", "nanoid"]
118
+ }
119
+ },
120
+ {
121
+ context: "filter-field",
122
+ use: "DateTimeFilterFieldModel",
123
+ interfaces: ["formula"],
124
+ conditions: {
125
+ fieldTypes: ["date"]
126
+ }
127
+ },
128
+ {
129
+ context: "filter-field",
130
+ use: "CheckboxFieldModel",
131
+ interfaces: ["formula"],
132
+ conditions: {
133
+ fieldTypes: ["boolean"]
134
+ }
135
+ },
136
+ {
137
+ context: "filter-field",
138
+ use: "NumberFieldModel",
139
+ interfaces: ["formula"],
140
+ conditions: {
141
+ fieldTypes: ["integer", "bigInt", "double", "decimal", "number"]
142
+ }
143
+ }
144
+ ],
145
+ defaults: {
146
+ source: "plugin"
147
+ }
148
+ };
149
+ // Annotate the CommonJS export names for ESM import in node:
150
+ 0 && (module.exports = {
151
+ flowSchemaContribution
152
+ });
@@ -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;