@next-bricks/form 0.12.0 → 0.12.1

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 (103) hide show
  1. package/dist/bricks.json +1 -5
  2. package/dist/chunks/3494.dd24d739.js +2 -0
  3. package/dist/chunks/{3494.b32e021c.js.map → 3494.dd24d739.js.map} +1 -1
  4. package/dist/chunks/4131.48a216bd.js +2 -0
  5. package/dist/chunks/4131.48a216bd.js.map +1 -0
  6. package/dist/chunks/4795.90b6991e.js +2 -0
  7. package/dist/chunks/4795.90b6991e.js.map +1 -0
  8. package/dist/chunks/5202.e887583f.js +2 -0
  9. package/dist/chunks/{5202.2b219084.js.map → 5202.e887583f.js.map} +1 -1
  10. package/dist/chunks/6221.9d80956c.js +3 -0
  11. package/dist/chunks/6221.9d80956c.js.map +1 -0
  12. package/dist/chunks/7822.c8ee10ba.js +2 -0
  13. package/dist/chunks/{7822.4154a218.js.map → 7822.c8ee10ba.js.map} +1 -1
  14. package/dist/chunks/7884.e14a1509.js +2 -0
  15. package/dist/chunks/7884.e14a1509.js.map +1 -0
  16. package/dist/chunks/873.cc3010b0.js +2 -0
  17. package/dist/chunks/{873.2b11a4db.js.map → 873.cc3010b0.js.map} +1 -1
  18. package/dist/chunks/9549.de31aced.js +2 -0
  19. package/dist/chunks/{9549.2c5f5edd.js.map → 9549.de31aced.js.map} +1 -1
  20. package/dist/chunks/eo-checkbox.f9bc931d.js +2 -0
  21. package/dist/chunks/eo-checkbox.f9bc931d.js.map +1 -0
  22. package/dist/chunks/{eo-dynamic-form-item.68db88eb.js → eo-dynamic-form-item.4acd47a7.js} +2 -2
  23. package/dist/chunks/{eo-dynamic-form-item.68db88eb.js.map → eo-dynamic-form-item.4acd47a7.js.map} +1 -1
  24. package/dist/chunks/eo-form.d8d5e655.js +2 -0
  25. package/dist/chunks/{eo-form.dfefdd7d.js.map → eo-form.d8d5e655.js.map} +1 -1
  26. package/dist/chunks/eo-icon-select.c36f29bb.js +3 -0
  27. package/dist/chunks/{eo-icon-select.821c7b62.js.map → eo-icon-select.c36f29bb.js.map} +1 -1
  28. package/dist/chunks/eo-radio.ea667baf.js +2 -0
  29. package/dist/chunks/eo-radio.ea667baf.js.map +1 -0
  30. package/dist/chunks/eo-select.cd27e6c2.js +2 -0
  31. package/dist/chunks/eo-select.cd27e6c2.js.map +1 -0
  32. package/dist/chunks/eo-textarea.9a478e44.js +3 -0
  33. package/dist/chunks/{eo-textarea.7e65b425.js.map → eo-textarea.9a478e44.js.map} +1 -1
  34. package/dist/chunks/eo-upload-file.837872c4.js +3 -0
  35. package/dist/chunks/{eo-upload-file.b27f22ea.js.map → eo-upload-file.837872c4.js.map} +1 -1
  36. package/dist/chunks/eo-upload-image.e3a4fa7b.js +3 -0
  37. package/dist/chunks/{eo-upload-image.3245726f.js.map → eo-upload-image.e3a4fa7b.js.map} +1 -1
  38. package/dist/chunks/main.2fbe2cf6.js +2 -0
  39. package/dist/chunks/main.2fbe2cf6.js.map +1 -0
  40. package/dist/index.6f347e9d.js +2 -0
  41. package/dist/index.6f347e9d.js.map +1 -0
  42. package/dist/manifest.json +0 -181
  43. package/dist/types.json +0 -496
  44. package/dist-types/bootstrap.d.ts +0 -1
  45. package/package.json +2 -2
  46. package/dist/chunks/1970.6303d93c.js +0 -3
  47. package/dist/chunks/1970.6303d93c.js.LICENSE.txt +0 -46
  48. package/dist/chunks/1970.6303d93c.js.map +0 -1
  49. package/dist/chunks/3494.b32e021c.js +0 -2
  50. package/dist/chunks/4131.da9663d6.js +0 -2
  51. package/dist/chunks/4131.da9663d6.js.map +0 -1
  52. package/dist/chunks/5202.2b219084.js +0 -2
  53. package/dist/chunks/5218.33d94637.js +0 -2
  54. package/dist/chunks/5218.33d94637.js.map +0 -1
  55. package/dist/chunks/6389.d53428bf.js +0 -2
  56. package/dist/chunks/6389.d53428bf.js.map +0 -1
  57. package/dist/chunks/714.fbaa063b.js +0 -2
  58. package/dist/chunks/714.fbaa063b.js.map +0 -1
  59. package/dist/chunks/7822.4154a218.js +0 -2
  60. package/dist/chunks/873.2b11a4db.js +0 -2
  61. package/dist/chunks/9223.f5fd0ea1.js +0 -2
  62. package/dist/chunks/9223.f5fd0ea1.js.map +0 -1
  63. package/dist/chunks/9549.2c5f5edd.js +0 -2
  64. package/dist/chunks/code-editor.e3690b47.js +0 -2
  65. package/dist/chunks/code-editor.e3690b47.js.map +0 -1
  66. package/dist/chunks/eo-checkbox.c5010723.js +0 -3
  67. package/dist/chunks/eo-checkbox.c5010723.js.map +0 -1
  68. package/dist/chunks/eo-form.dfefdd7d.js +0 -2
  69. package/dist/chunks/eo-icon-select.821c7b62.js +0 -3
  70. package/dist/chunks/eo-radio.3c54b91c.js +0 -3
  71. package/dist/chunks/eo-radio.3c54b91c.js.map +0 -1
  72. package/dist/chunks/eo-select.5abf2d64.js +0 -3
  73. package/dist/chunks/eo-select.5abf2d64.js.map +0 -1
  74. package/dist/chunks/eo-textarea.7e65b425.js +0 -3
  75. package/dist/chunks/eo-upload-file.b27f22ea.js +0 -3
  76. package/dist/chunks/eo-upload-file.b27f22ea.js.LICENSE.txt +0 -5
  77. package/dist/chunks/eo-upload-image.3245726f.js +0 -3
  78. package/dist/chunks/eo-upload-image.3245726f.js.LICENSE.txt +0 -5
  79. package/dist/chunks/main.21bfa780.js +0 -2
  80. package/dist/chunks/main.21bfa780.js.map +0 -1
  81. package/dist/index.85b15450.js +0 -2
  82. package/dist/index.85b15450.js.map +0 -1
  83. package/dist-types/code-editor/aceBuilds/index.d.ts +0 -16
  84. package/dist-types/code-editor/codeEditor.d.ts +0 -5
  85. package/dist-types/code-editor/custom-mode/BrickNextMode.d.ts +0 -7
  86. package/dist-types/code-editor/custom-mode/BrickNextRules.d.ts +0 -170
  87. package/dist-types/code-editor/custom-mode/BrickNextYamlMode.d.ts +0 -7
  88. package/dist-types/code-editor/custom-mode/CommonExpressionLanguageMode.d.ts +0 -7
  89. package/dist-types/code-editor/custom-mode/CommonExpressionLanguageRules.d.ts +0 -19
  90. package/dist-types/code-editor/custom-mode/CommonExpressionLanguageRules.spec.d.ts +0 -1
  91. package/dist-types/code-editor/custom-mode/CommonExpressionLanguageYamlMode.d.ts +0 -7
  92. package/dist-types/code-editor/custom-mode/TerraformMode.d.ts +0 -7
  93. package/dist-types/code-editor/custom-mode/brickNextUtil.d.ts +0 -15
  94. package/dist-types/code-editor/getClickableMarker.d.ts +0 -2
  95. package/dist-types/code-editor/getHighlightMarkers.d.ts +0 -11
  96. package/dist-types/code-editor/index.d.ts +0 -166
  97. package/dist-types/code-editor/index.spec.d.ts +0 -1
  98. package/dist-types/code-editor/interfaces.d.ts +0 -76
  99. /package/dist/chunks/{eo-checkbox.c5010723.js.LICENSE.txt → 6221.9d80956c.js.LICENSE.txt} +0 -0
  100. /package/dist/chunks/{eo-icon-select.821c7b62.js.LICENSE.txt → eo-icon-select.c36f29bb.js.LICENSE.txt} +0 -0
  101. /package/dist/chunks/{eo-radio.3c54b91c.js.LICENSE.txt → eo-textarea.9a478e44.js.LICENSE.txt} +0 -0
  102. /package/dist/chunks/{eo-select.5abf2d64.js.LICENSE.txt → eo-upload-file.837872c4.js.LICENSE.txt} +0 -0
  103. /package/dist/chunks/{eo-textarea.7e65b425.js.LICENSE.txt → eo-upload-image.e3a4fa7b.js.LICENSE.txt} +0 -0
@@ -1,166 +0,0 @@
1
- /// <reference types="react" />
2
- import { CodeEditorProps, HighlightTokenSettings, Annotation } from "./interfaces.js";
3
- import { FormItemElementBase } from "@next-shared/form";
4
- export interface Error {
5
- err: Annotation[];
6
- hasError: boolean;
7
- }
8
- /**
9
- * @id form.code-editor
10
- * @name form.code-editor
11
- * @docKind brick
12
- * @description 通用输入框构件
13
- * @author sailor
14
- * @noInheritDoc
15
- */
16
- declare class CodeEditor extends FormItemElementBase {
17
- #private;
18
- /**
19
- * @description
20
- * @required -
21
- * @group basic
22
- */
23
- accessor name: string | undefined;
24
- /**
25
- * @description
26
- * @required -
27
- * @group basic
28
- */
29
- accessor label: string | undefined;
30
- /**
31
- * @description 代码内容
32
- * @group basic
33
- */
34
- accessor value: string;
35
- /**
36
- * @required false
37
- * @description 选择框占位说明
38
- * @group basic
39
- */
40
- accessor placeholder: string | undefined;
41
- /**
42
- * @default "monokai"
43
- * @description 主题,支持 tomorrow、monokai、github
44
- * @group basic
45
- */
46
- accessor theme: string | undefined;
47
- /**
48
- * @default "text"
49
- * @description 语言模式,支持语言如下
50
- * @group basic
51
- */
52
- accessor mode: string;
53
- /**
54
- * @default false
55
- * @description 是否必填
56
- * @group basic
57
- */
58
- accessor required: boolean | undefined;
59
- /**
60
- * @default false
61
- * @description 是否只能读,不能编辑。如果一个页面同时需要编辑和查看,可以使用该属性,以保证代码构件的一致性。而如果一个页面只有查看的功能,建议直接使用轻量级[代码展示构件 code-bricks.code-display](developers/brick-book/brick/code-bricks.code-display),避免代码内容过多的时候页面卡顿。
62
- * @group basic
63
- */
64
- accessor readOnly: boolean | undefined;
65
- /**
66
- * @description 是否显示行号
67
- * @group ui
68
- */
69
- accessor showLineNumbers: boolean;
70
- /**
71
- * @description 最大行号,超出就显示滚动条,注意应该为正数或者无穷大
72
- * @group ui
73
- */
74
- accessor maxLines: number | "Infinity" | undefined;
75
- /**
76
- * @description 最小行号,即最小高度为多少行
77
- * @group ui
78
- */
79
- accessor minLines: number;
80
- /**
81
- * @description 一个 tab 代表多少个空格
82
- * @group other
83
- */
84
- accessor tabSize: number;
85
- /**
86
- * @required false
87
- * @description 显示打印边距
88
- * @group ui
89
- */
90
- accessor printMargin: boolean | undefined;
91
- /**
92
- * @description 高亮激活的行
93
- * @group other
94
- */
95
- accessor highlightActiveLine: boolean;
96
- /**
97
- * @default false
98
- * @description 是否显示导出按钮
99
- * @group ui
100
- */
101
- accessor showExportButton: boolean | undefined;
102
- /**
103
- * @description 是否显示复制按钮
104
- * @group ui
105
- */
106
- accessor showCopyButton: boolean;
107
- /**
108
- * @description 是否显示展开按钮
109
- * @group ui
110
- */
111
- accessor showExpandButton: boolean | undefined;
112
- /**
113
- * @default "download.txt"
114
- * @description 当 `showExportButton = true` 时, 配置导出的文件名称, 默认为 download.txt
115
- * @group other
116
- */
117
- accessor exportFileName: string | undefined;
118
- /**
119
- * @description json schema,当 mode 为 json,yaml,brick_next,brick_next_yaml 时会根据该 json schema 进行校验
120
- * @group other
121
- */
122
- accessor jsonSchema: Record<string, any> | undefined;
123
- /**
124
- * @description 校验 Json Schema 的模式,warning 为告警模式,仅作告警提示,不影响表单提交;error 为错误模式,将会阻止表单提交错误内容。
125
- * @group other
126
- */
127
- accessor validateJsonSchemaMode: "warning" | "error";
128
- /**
129
- * @description json schema $ref,设置该属性后会验证 json schema 中对应 $ref 指向的部分片段,以 # 开头代表根节点,例如可以设置成 `#/definitions/BrickConf`
130
- * @group other
131
- */
132
- accessor schemaRef: string | undefined;
133
- /**
134
- * @default false
135
- * @description 是否开启自动补全
136
- * @group other
137
- */
138
- accessor enableLiveAutocompletion: boolean | undefined;
139
- /**
140
- * @description 自定义自动补全,注意当`enableLiveAutocompletion:true`时才能生效
141
- * @group other
142
- */
143
- accessor customCompleters: string[] | {
144
- caption?: string;
145
- value: string;
146
- meta?: string;
147
- score?: number;
148
- }[] | undefined;
149
- /**
150
- * @description 是否与JSON解析行为一致,如果设为`true`,有重复key时取最后一个的value,如果设为`false`,有重复key时会抛出错误
151
- * @group other
152
- */
153
- accessor loadYamlInJsonMode: boolean;
154
- /**
155
- * @description 高亮标记设置。
156
- * @group other
157
- */
158
- accessor highlightTokens: HighlightTokenSettings[] | undefined;
159
- private _handleChange;
160
- private _handleBlur;
161
- private _handleErrorChange;
162
- private _handleHighlightTokenClick;
163
- render(): JSX.Element;
164
- }
165
- export declare function CodeEditorComponent(props: CodeEditorProps): JSX.Element;
166
- export { CodeEditor };
@@ -1 +0,0 @@
1
- import "./index.js";
@@ -1,76 +0,0 @@
1
- import { IMarker } from "react-ace";
2
- import type { FormItemProps } from "../form-item/index.js";
3
- export interface Error {
4
- err: Annotation[];
5
- hasError: boolean;
6
- }
7
- export interface ExtendedMarker extends IMarker {
8
- highlightType: HighlightTokenType;
9
- identifier: string;
10
- }
11
- export interface CodeEditorProps extends FormItemProps {
12
- placeholder?: string;
13
- label?: string;
14
- name?: string;
15
- value: string;
16
- onChange?: (value: string) => void;
17
- onBlur?: () => void;
18
- onErrorChange?: (error: Error) => void;
19
- disabled?: boolean;
20
- theme?: string;
21
- mode: string;
22
- readOnly?: boolean;
23
- showLineNumbers?: boolean;
24
- maxLines?: number | "Infinity";
25
- minLines: number;
26
- tabSize?: number;
27
- showGutter?: boolean;
28
- printMargin?: boolean;
29
- highlightActiveLine?: boolean;
30
- onValidate?: (error: Annotation[]) => void;
31
- showExportButton?: boolean;
32
- showCopyButton?: boolean;
33
- showExpandButton?: boolean;
34
- exportFileName?: string;
35
- jsonSchema?: Record<string, any>;
36
- validateJsonSchemaMode?: "warning" | "error";
37
- schemaRef?: string;
38
- enableLiveAutocompletion?: boolean;
39
- customCompleters?: string[] | {
40
- caption?: string;
41
- value: string;
42
- meta?: string;
43
- score?: number;
44
- }[];
45
- loadYamlInJsonMode?: boolean;
46
- showPrintMargin?: boolean;
47
- highlightTokens?: HighlightTokenSettings[];
48
- onClickHighlightToken?: (token: {
49
- type: HighlightTokenType;
50
- value: string;
51
- }) => void;
52
- }
53
- export interface HighlightTokenSettings {
54
- type: HighlightTokenType;
55
- clickable?: boolean;
56
- level?: "default" | "warn" | "error";
57
- }
58
- export type HighlightTokenType = "storyboard-function" | "storyboard-context" | "storyboard-context-action" | "storyboard-state" | "storyboard-state-action" | "storyboard-tpl-var" | "storyboard-tag-name-as-target" | "storyboard-route-var" | "dashboard-DS";
59
- export interface AceLanguageRules {
60
- [className: string]: AceLanguageRule[];
61
- }
62
- export interface AceLanguageRule {
63
- token?: string | string[] | AceTokenFunction;
64
- regex?: string | RegExp;
65
- next?: string;
66
- defaultToken?: string;
67
- consumeLineEnd?: boolean;
68
- onMatch?: (val?: string, state?: unknown, stack?: [string, number], line?: string) => string;
69
- }
70
- export type AceTokenFunction = (value: string) => string;
71
- export interface Annotation {
72
- row: number;
73
- column: number;
74
- text: string;
75
- type: string;
76
- }