@nocobase/plugin-field-code 2.1.0-alpha.6 → 2.1.0-alpha.8

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.
@@ -57,5 +57,36 @@ export declare class CodeFieldInterface extends CollectionFieldInterface {
57
57
  description: string;
58
58
  };
59
59
  };
60
+ availableTypes: string[];
61
+ filterable: {
62
+ operators: ({
63
+ label: string;
64
+ value: string;
65
+ selected: boolean;
66
+ schema: {
67
+ type: string;
68
+ 'x-component': string;
69
+ };
70
+ noValue?: undefined;
71
+ } | {
72
+ label: string;
73
+ value: string;
74
+ schema: {
75
+ type: string;
76
+ 'x-component': string;
77
+ };
78
+ selected?: undefined;
79
+ noValue?: undefined;
80
+ } | {
81
+ label: string;
82
+ value: string;
83
+ noValue: boolean;
84
+ schema: {
85
+ type: string;
86
+ 'x-component': string;
87
+ };
88
+ selected?: undefined;
89
+ })[];
90
+ };
60
91
  titleUsable: boolean;
61
92
  }
@@ -0,0 +1,13 @@
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 React from 'react';
10
+ import { FieldModel } from '@nocobase/client';
11
+ export declare class CodeFieldModel extends FieldModel {
12
+ render(): React.JSX.Element;
13
+ }
@@ -0,0 +1,13 @@
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 React from 'react';
10
+ import { FieldModel } from '@nocobase/client';
11
+ export declare class DisplayCodeFieldModel extends FieldModel {
12
+ render(): React.JSX.Element;
13
+ }
@@ -0,0 +1,34 @@
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 React from 'react';
10
+ export declare const HEIGHT_VALUES: string[];
11
+ export declare const INDENT_UNIT_OPTIONS: {
12
+ label: number;
13
+ value: number;
14
+ }[];
15
+ export declare const normalizeHeight: (value?: string) => string;
16
+ export declare const normalizeIndentUnit: (value?: number) => number;
17
+ export declare const getHeightOptions: (ctx: any) => {
18
+ label: any;
19
+ value: string;
20
+ }[];
21
+ export declare const CustomHeight: ({ defaultValue, handleChange, setOpen, t }: {
22
+ defaultValue: any;
23
+ handleChange: any;
24
+ setOpen: any;
25
+ t: any;
26
+ }) => React.JSX.Element;
27
+ export declare const CustomIndentUnit: ({ defaultValue, handleChange, setOpen, t }: {
28
+ defaultValue: any;
29
+ handleChange: any;
30
+ setOpen: any;
31
+ t: any;
32
+ }) => React.JSX.Element;
33
+ export declare const renderHeightDropdown: (ctx: any, menu: any, setOpen: any, handleChange: any, currentHeight?: string) => React.JSX.Element;
34
+ export declare const renderIndentDropdown: (ctx: any, menu: any, setOpen: any, handleChange: any, currentIndentUnit?: number) => React.JSX.Element;
@@ -9,9 +9,10 @@
9
9
 
10
10
  module.exports = {
11
11
  "react": "18.2.0",
12
- "antd": "5.24.2",
13
12
  "antd-style": "3.7.1",
14
13
  "@formily/react": "2.3.7",
15
- "@nocobase/client": "2.1.0-alpha.6",
16
- "@nocobase/server": "2.1.0-alpha.6"
14
+ "@nocobase/client": "2.1.0-alpha.8",
15
+ "@nocobase/server": "2.1.0-alpha.8",
16
+ "@nocobase/flow-engine": "2.1.0-alpha.8",
17
+ "antd": "5.24.2"
17
18
  };
@@ -1,7 +1,15 @@
1
1
  {
2
+ "Auto": "Auto",
2
3
  "Code": "Code",
4
+ "Code editor": "Code editor",
5
+ "Choose language": "Choose language",
6
+ "Content settings": "Content settings",
3
7
  "Content height": "Content height",
8
+ "Custom height": "Custom height",
9
+ "Custom indent unit": "Custom indent unit",
10
+ "e.g. 300px or 50%": "e.g. 300px or 50%",
4
11
  "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.": "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.",
12
+ "Indent unit": "Indent unit",
5
13
  "Programming code editor with syntax highlighting.": "Programming code editor with syntax highlighting.",
6
14
  "Programming language": "Programming language"
7
15
  }
@@ -1,7 +1,15 @@
1
1
  {
2
+ "Auto": "自动",
2
3
  "Code": "代码",
4
+ "Code editor": "代码编辑器",
5
+ "Choose language": "选择语言",
6
+ "Content settings": "内容设置",
3
7
  "Content height": "内容高度",
8
+ "Custom height": "自定义高度",
9
+ "Custom indent unit": "自定义缩进单位",
10
+ "e.g. 300px or 50%": "例如 300px 或 50%",
4
11
  "Could use CSS values (e.g., \"300px\" or \"50%\"). Use \"auto\" for automatic height adjustment based on content.": "可以使用 CSS 值(例如,\"300px\" 或 \"50%\")。使用 \"auto\" 以根据内容自动调整高度。",
12
+ "Indent unit": "缩进单位",
5
13
  "Programming code editor with syntax highlighting.": "带语法高亮的编程代码编辑器。",
6
14
  "Programming language": "编程语言"
7
15
  }
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.6",
7
+ "version": "2.1.0-alpha.8",
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": "189dc0eb7683a8330db1e4c5fd46ee871b8b4e1f"
39
+ "gitHead": "eda3bfb9df40d4394905e178f1c5331adbec4e76"
40
40
  }