@nocobase/plugin-map 2.1.0-alpha.12 → 2.1.0-alpha.14

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.
@@ -8,11 +8,10 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "2.1.0-alpha.12",
11
+ "@nocobase/client": "2.1.0-alpha.14",
12
12
  "react": "18.2.0",
13
- "@nocobase/flow-engine": "2.1.0-alpha.12",
14
- "@nocobase/server": "2.1.0-alpha.12",
15
- "@nocobase/test": "2.1.0-alpha.12",
13
+ "@nocobase/server": "2.1.0-alpha.14",
14
+ "@nocobase/test": "2.1.0-alpha.14",
16
15
  "@formily/react": "2.3.7",
17
16
  "lodash": "4.17.21",
18
17
  "react-i18next": "11.18.6",
@@ -22,8 +21,9 @@ module.exports = {
22
21
  "antd": "5.24.2",
23
22
  "@formily/shared": "2.3.7",
24
23
  "@formily/core": "2.3.7",
25
- "@nocobase/plugin-action-bulk-update": "2.1.0-alpha.12",
26
- "@nocobase/actions": "2.1.0-alpha.12",
27
- "@nocobase/database": "2.1.0-alpha.12",
24
+ "@nocobase/flow-engine": "2.1.0-alpha.14",
25
+ "@nocobase/plugin-action-bulk-update": "2.1.0-alpha.14",
26
+ "@nocobase/actions": "2.1.0-alpha.14",
27
+ "@nocobase/database": "2.1.0-alpha.14",
28
28
  "ahooks": "3.7.8"
29
29
  };
@@ -6,11 +6,9 @@
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 { FlowSchemaContribution } from '@nocobase/flow-engine';
10
9
  import { InstallOptions, Plugin } from '@nocobase/server';
11
10
  export declare class PluginMapServer extends Plugin {
12
11
  afterAdd(): void;
13
- getFlowSchemaContributions(): FlowSchemaContribution;
14
12
  beforeLoad(): void;
15
13
  load(): Promise<void>;
16
14
  install(options?: InstallOptions): Promise<void>;
@@ -35,13 +35,9 @@ var import_actions = require("./actions");
35
35
  var import_fields = require("./fields");
36
36
  var import_interfaces = require("./interfaces");
37
37
  var import_value_parsers = require("./value-parsers");
38
- var import_flow_schema_contributions = require("./flow-schema-contributions");
39
38
  class PluginMapServer extends import_server.Plugin {
40
39
  afterAdd() {
41
40
  }
42
- getFlowSchemaContributions() {
43
- return import_flow_schema_contributions.flowSchemaContribution;
44
- }
45
41
  beforeLoad() {
46
42
  const fields = {
47
43
  point: import_fields.PointField,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "displayName": "Block: Map",
4
4
  "displayName.ru-RU": "Блок: Карта",
5
5
  "displayName.zh-CN": "区块:地图",
6
- "version": "2.1.0-alpha.12",
6
+ "version": "2.1.0-alpha.14",
7
7
  "description": "Map block, support Gaode map and Google map, you can also extend more map types.",
8
8
  "description.ru-RU": "Блок карты, поддерживает карты Gaode и Google, можно расширить поддержку других типов карт.",
9
9
  "description.zh-CN": "地图区块,支持高德地图和 Google 地图,你也可以扩展更多地图类型。",
@@ -35,11 +35,12 @@
35
35
  "@nocobase/actions": "2.x",
36
36
  "@nocobase/client": "2.x",
37
37
  "@nocobase/database": "2.x",
38
+ "@nocobase/plugin-action-bulk-update": "2.x",
38
39
  "@nocobase/server": "2.x",
39
40
  "@nocobase/test": "2.x",
40
41
  "@nocobase/utils": "2.x"
41
42
  },
42
- "gitHead": "f12c4a75470590b1670ce54510b96ef94c2cd7a2",
43
+ "gitHead": "d8735b541de0ff9557bba704de49c799b4962672",
43
44
  "keywords": [
44
45
  "Blocks"
45
46
  ]
@@ -1,10 +0,0 @@
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 '@nocobase/flow-engine';
10
- export declare const flowSchemaContribution: FlowSchemaContribution;
@@ -1,427 +0,0 @@
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 flow_schema_contributions_exports = {};
28
- __export(flow_schema_contributions_exports, {
29
- flowSchemaContribution: () => flowSchemaContribution
30
- });
31
- module.exports = __toCommonJS(flow_schema_contributions_exports);
32
- const genericFilterSchemaId = "urn:nocobase:schema:plugin-map: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 genericModelNodeSchema = {
168
- type: "object",
169
- required: ["uid", "use"],
170
- properties: {
171
- uid: { type: "string" },
172
- use: { type: "string" }
173
- },
174
- additionalProperties: true
175
- };
176
- const mapBlockModelSchemaContribution = {
177
- use: "MapBlockModel",
178
- title: "Map block",
179
- source: "plugin",
180
- strict: false,
181
- stepParamsSchema: {
182
- type: "object",
183
- properties: {
184
- createMapBlock: {
185
- type: "object",
186
- properties: {
187
- init: {
188
- type: "object",
189
- properties: {
190
- mapField: {
191
- type: "array",
192
- items: { type: "string" }
193
- },
194
- marker: { type: "string" }
195
- },
196
- additionalProperties: false
197
- },
198
- addAppends: {
199
- type: "object",
200
- additionalProperties: true
201
- },
202
- dataScope: {
203
- type: "object",
204
- properties: {
205
- filter: genericFilterSchema
206
- },
207
- additionalProperties: false
208
- },
209
- lineSort: sortingRuleParamsSchema,
210
- mapZoom: {
211
- type: "object",
212
- properties: {
213
- zoom: { type: "number" }
214
- },
215
- additionalProperties: false
216
- }
217
- },
218
- additionalProperties: true
219
- }
220
- },
221
- additionalProperties: true
222
- },
223
- flowRegistrySchema: {
224
- type: "object",
225
- properties: {
226
- popupSettings: {
227
- type: "object",
228
- properties: {
229
- key: { const: "popupSettings" },
230
- steps: {
231
- type: "object",
232
- properties: {
233
- openView: {
234
- type: "object",
235
- properties: {
236
- use: { const: "openView" }
237
- },
238
- additionalProperties: true
239
- }
240
- },
241
- additionalProperties: false
242
- }
243
- },
244
- additionalProperties: true
245
- }
246
- },
247
- additionalProperties: true
248
- },
249
- subModelSlots: {
250
- actions: {
251
- type: "array",
252
- dynamic: true,
253
- schema: genericModelNodeSchema,
254
- description: "Map actions depend on runtime action registries."
255
- }
256
- },
257
- skeleton: {
258
- uid: "todo-uid",
259
- use: "MapBlockModel",
260
- stepParams: {
261
- createMapBlock: {
262
- init: {
263
- mapField: []
264
- },
265
- mapZoom: {
266
- zoom: 13
267
- }
268
- }
269
- },
270
- subModels: {
271
- actions: []
272
- }
273
- },
274
- docs: {
275
- minimalExample: {
276
- uid: "map-users",
277
- use: "MapBlockModel",
278
- stepParams: {
279
- createMapBlock: {
280
- init: {
281
- mapField: []
282
- },
283
- mapZoom: {
284
- zoom: 13
285
- }
286
- }
287
- },
288
- subModels: {
289
- actions: []
290
- }
291
- },
292
- dynamicHints: [
293
- {
294
- kind: "dynamic-ui-schema",
295
- path: "MapBlockModel.stepParams.createMapBlock.init.mapField",
296
- message: "Map field and marker options depend on collection field interfaces and association traversal.",
297
- "x-flow": {
298
- contextRequirements: ["collection fields", "association traversal"],
299
- unresolvedReason: "runtime-map-field-options",
300
- recommendedFallback: {
301
- mapField: []
302
- }
303
- }
304
- },
305
- {
306
- kind: "dynamic-children",
307
- path: "MapBlockModel.subModels.actions",
308
- message: "Map actions depend on runtime action registries.",
309
- "x-flow": {
310
- slotRules: {
311
- slotKey: "actions",
312
- type: "array"
313
- },
314
- contextRequirements: ["collection action registry"],
315
- unresolvedReason: "runtime-map-actions"
316
- }
317
- }
318
- ]
319
- }
320
- };
321
- function createFieldContribution(use, title) {
322
- return {
323
- use,
324
- title,
325
- source: "plugin",
326
- strict: false,
327
- exposure: "internal",
328
- stepParamsSchema: {
329
- type: "object",
330
- properties: {
331
- fieldSettings: {
332
- type: "object",
333
- properties: {
334
- init: {
335
- type: "object",
336
- properties: {
337
- dataSourceKey: { type: "string" },
338
- collectionName: { type: "string" },
339
- fieldPath: { type: "string" }
340
- },
341
- additionalProperties: true
342
- }
343
- },
344
- additionalProperties: true
345
- }
346
- },
347
- additionalProperties: true
348
- },
349
- skeleton: {
350
- uid: `todo-${use}`.replace(/[^a-zA-Z0-9]+/g, "-").toLowerCase(),
351
- use
352
- }
353
- };
354
- }
355
- const flowSchemaContribution = {
356
- inventory: {
357
- publicTreeRoots: ["MapBlockModel"]
358
- },
359
- models: [
360
- mapBlockModelSchemaContribution,
361
- createFieldContribution("PointFieldModel", "Point"),
362
- createFieldContribution("CircleFieldModel", "Circle"),
363
- createFieldContribution("PolygonFieldModel", "Polygon"),
364
- createFieldContribution("LineStringFieldModel", "Line string"),
365
- createFieldContribution("DisplayPointFieldModel", "Display point"),
366
- createFieldContribution("DisplayCircleFieldModel", "Display circle"),
367
- createFieldContribution("DisplayPolygonFieldModel", "Display polygon"),
368
- createFieldContribution("DisplayLineStringFieldModel", "Display line string")
369
- ],
370
- fieldBindings: [
371
- {
372
- context: "editable-field",
373
- use: "PointFieldModel",
374
- interfaces: ["point"],
375
- isDefault: true
376
- },
377
- {
378
- context: "editable-field",
379
- use: "CircleFieldModel",
380
- interfaces: ["circle"],
381
- isDefault: true
382
- },
383
- {
384
- context: "editable-field",
385
- use: "PolygonFieldModel",
386
- interfaces: ["polygon"],
387
- isDefault: true
388
- },
389
- {
390
- context: "editable-field",
391
- use: "LineStringFieldModel",
392
- interfaces: ["lineString"],
393
- isDefault: true
394
- },
395
- {
396
- context: "display-field",
397
- use: "DisplayPointFieldModel",
398
- interfaces: ["point"],
399
- isDefault: true
400
- },
401
- {
402
- context: "display-field",
403
- use: "DisplayCircleFieldModel",
404
- interfaces: ["circle"],
405
- isDefault: true
406
- },
407
- {
408
- context: "display-field",
409
- use: "DisplayPolygonFieldModel",
410
- interfaces: ["polygon"],
411
- isDefault: true
412
- },
413
- {
414
- context: "display-field",
415
- use: "DisplayLineStringFieldModel",
416
- interfaces: ["lineString"],
417
- isDefault: true
418
- }
419
- ],
420
- defaults: {
421
- source: "plugin"
422
- }
423
- };
424
- // Annotate the CommonJS export names for ESM import in node:
425
- 0 && (module.exports = {
426
- flowSchemaContribution
427
- });