@nocobase/plugin-ui-templates 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.
@@ -8,17 +8,17 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "2.1.0-alpha.11",
12
- "@nocobase/flow-engine": "2.1.0-alpha.11",
11
+ "@nocobase/client": "2.1.0-alpha.13",
12
+ "@nocobase/flow-engine": "2.1.0-alpha.13",
13
13
  "react": "18.2.0",
14
14
  "antd": "5.24.2",
15
15
  "@ant-design/icons": "5.6.1",
16
16
  "lodash": "4.17.21",
17
17
  "@formily/react": "2.3.7",
18
- "@nocobase/server": "2.1.0-alpha.11",
19
- "@nocobase/plugin-flow-engine": "2.1.0-alpha.11",
20
- "@nocobase/utils": "2.1.0-alpha.11",
18
+ "@nocobase/server": "2.1.0-alpha.13",
19
+ "@nocobase/plugin-flow-engine": "2.1.0-alpha.13",
20
+ "@nocobase/utils": "2.1.0-alpha.13",
21
21
  "@formily/core": "2.3.7",
22
- "@nocobase/database": "2.1.0-alpha.11",
23
- "@nocobase/actions": "2.1.0-alpha.11"
22
+ "@nocobase/database": "2.1.0-alpha.13",
23
+ "@nocobase/actions": "2.1.0-alpha.13"
24
24
  };
@@ -6,10 +6,8 @@
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 PluginBlockReferenceServer extends Plugin {
12
- getFlowSchemaContributions(): FlowSchemaContribution;
13
11
  load(): Promise<void>;
14
12
  install(options?: InstallOptions): Promise<void>;
15
13
  afterEnable(): Promise<void>;
@@ -46,11 +46,7 @@ var import_flowModelTemplates = __toESM(require("./resources/flowModelTemplates"
46
46
  var import_flowModelTemplateUsages = __toESM(require("./resources/flowModelTemplateUsages"));
47
47
  var import_plugin_flow_engine = require("@nocobase/plugin-flow-engine");
48
48
  var import_utils = require("@nocobase/utils");
49
- var import_flow_schema_contributions = require("./flow-schema-contributions");
50
49
  class PluginBlockReferenceServer extends import_server.Plugin {
51
- getFlowSchemaContributions() {
52
- return import_flow_schema_contributions.flowSchemaContribution;
53
- }
54
50
  async load() {
55
51
  var _a;
56
52
  this.app.resourceManager.define(import_flowModelTemplates.default);
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "UI 模板",
5
5
  "description": "Provides block templates and popup templates for UI reuse.",
6
6
  "description.zh-CN": "提供区块模板和弹窗模板复用的能力。",
7
- "version": "2.1.0-alpha.11",
7
+ "version": "2.1.0-alpha.13",
8
8
  "license": "Apache-2.0",
9
9
  "main": "./dist/server/index.js",
10
10
  "types": "./dist/index.d.ts",
@@ -33,5 +33,5 @@
33
33
  "block",
34
34
  "popup"
35
35
  ],
36
- "gitHead": "bb96d633a6371afb586072ff516bd0613c757db0"
36
+ "gitHead": "2807a8948412d9c235115a31a81a66f7c82dd173"
37
37
  }
@@ -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,130 +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 referenceBlockModelSchemaContribution = {
33
- use: "ReferenceBlockModel",
34
- title: "Block template",
35
- source: "plugin",
36
- strict: false,
37
- stepParamsSchema: {
38
- type: "object",
39
- properties: {
40
- referenceSettings: {
41
- type: "object",
42
- properties: {
43
- target: {
44
- type: "object",
45
- properties: {
46
- targetUid: { type: "string" },
47
- mode: {
48
- type: "string",
49
- enum: ["reference", "copy"]
50
- }
51
- },
52
- required: ["targetUid"],
53
- additionalProperties: true
54
- },
55
- useTemplate: {
56
- type: "object",
57
- properties: {
58
- templateUid: { type: "string" },
59
- templateName: { type: "string" },
60
- templateDescription: { type: "string" },
61
- targetUid: { type: "string" },
62
- mode: {
63
- type: "string",
64
- enum: ["reference", "copy"]
65
- }
66
- },
67
- additionalProperties: true
68
- }
69
- },
70
- required: ["target"],
71
- additionalProperties: true
72
- }
73
- },
74
- additionalProperties: true
75
- },
76
- skeleton: {
77
- uid: "todo-reference-block-uid",
78
- use: "ReferenceBlockModel",
79
- stepParams: {
80
- referenceSettings: {
81
- target: {
82
- targetUid: "todo-target-block-uid",
83
- mode: "reference"
84
- }
85
- }
86
- }
87
- },
88
- docs: {
89
- minimalExample: {
90
- uid: "reference-users-template",
91
- use: "ReferenceBlockModel",
92
- stepParams: {
93
- referenceSettings: {
94
- target: {
95
- targetUid: "users-details-template-block",
96
- mode: "reference"
97
- }
98
- }
99
- }
100
- },
101
- dynamicHints: [
102
- {
103
- kind: "dynamic-ui-schema",
104
- path: "ReferenceBlockModel.stepParams.referenceSettings.target.targetUid",
105
- message: "Reference targets must point to an existing block UID or a template-derived target block.",
106
- "x-flow": {
107
- contextRequirements: ["existing block uid", "template usage context"],
108
- unresolvedReason: "runtime-reference-target-resolution",
109
- recommendedFallback: {
110
- targetUid: "todo-target-block-uid",
111
- mode: "reference"
112
- }
113
- }
114
- }
115
- ]
116
- }
117
- };
118
- const flowSchemaContribution = {
119
- inventory: {
120
- publicTreeRoots: ["ReferenceBlockModel"]
121
- },
122
- models: [referenceBlockModelSchemaContribution],
123
- defaults: {
124
- source: "plugin"
125
- }
126
- };
127
- // Annotate the CommonJS export names for ESM import in node:
128
- 0 && (module.exports = {
129
- flowSchemaContribution
130
- });