@nocobase/plugin-field-code 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.
@@ -11,8 +11,8 @@ module.exports = {
11
11
  "react": "18.2.0",
12
12
  "antd-style": "3.7.1",
13
13
  "@formily/react": "2.3.7",
14
- "@nocobase/client": "2.1.0-alpha.12",
15
- "@nocobase/flow-engine": "2.1.0-alpha.12",
16
- "@nocobase/server": "2.1.0-alpha.12",
14
+ "@nocobase/client": "2.1.0-alpha.13",
15
+ "@nocobase/server": "2.1.0-alpha.13",
16
+ "@nocobase/flow-engine": "2.1.0-alpha.13",
17
17
  "antd": "5.24.2"
18
18
  };
@@ -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 { Plugin } from '@nocobase/server';
11
10
  export declare class PluginFieldCodeServer extends Plugin {
12
11
  afterAdd(): Promise<void>;
13
- getFlowSchemaContributions(): FlowSchemaContribution;
14
12
  beforeLoad(): Promise<void>;
15
13
  load(): Promise<void>;
16
14
  install(): Promise<void>;
@@ -31,13 +31,9 @@ __export(plugin_exports, {
31
31
  });
32
32
  module.exports = __toCommonJS(plugin_exports);
33
33
  var import_server = require("@nocobase/server");
34
- var import_flow_schema_contributions = require("./flow-schema-contributions");
35
34
  class PluginFieldCodeServer extends import_server.Plugin {
36
35
  async afterAdd() {
37
36
  }
38
- getFlowSchemaContributions() {
39
- return import_flow_schema_contributions.flowSchemaContribution;
40
- }
41
37
  async beforeLoad() {
42
38
  }
43
39
  async load() {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "数据表字段:代码",
5
5
  "description": "For code editing and highlighting, supporting Java, JavaScript, Python, SQL and other languages.",
6
6
  "description.zh-CN": "用于代码编辑和高亮显示,支持 Java、JavaScript、Python、SQL 等语言。",
7
- "version": "2.1.0-alpha.12",
7
+ "version": "2.1.0-alpha.13",
8
8
  "main": "dist/server/index.js",
9
9
  "nocobase": {
10
10
  "supportedVersions": [
@@ -36,5 +36,5 @@
36
36
  "Collection fields"
37
37
  ],
38
38
  "license": "Apache-2.0",
39
- "gitHead": "f12c4a75470590b1670ce54510b96ef94c2cd7a2"
39
+ "gitHead": "2807a8948412d9c235115a31a81a66f7c82dd173"
40
40
  }
@@ -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,99 +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
- 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
- });