@zeng-alt/formkit-form-builder 0.1.0
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.
- package/README.md +139 -0
- package/dist/index.cjs +422 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +10939 -0
- package/dist/src/builder/BuilderDropArea.d.ts +4 -0
- package/dist/src/builder/BuilderHeader.d.ts +17 -0
- package/dist/src/builder/BuilderMain.d.ts +68 -0
- package/dist/src/builder/BuilderPreview.d.ts +5 -0
- package/dist/src/builder/BuilderProvider.d.ts +21 -0
- package/dist/src/builder/ImportExportModal.d.ts +9 -0
- package/dist/src/components/ai-prompt/AiPrompt.d.ts +2 -0
- package/dist/src/components/sidebar-left/DraggableList.d.ts +8 -0
- package/dist/src/components/sidebar-left/NavMain.d.ts +2 -0
- package/dist/src/components/sidebar-left/SidebarLeft.d.ts +2 -0
- package/dist/src/components/sidebar-right/FormEditMain.d.ts +2 -0
- package/dist/src/components/sidebar-right/SidebarRight.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/EditsSection.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/ExpressionEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/common/EditsLayout.d.ts +21 -0
- package/dist/src/components/sidebar-right/edits/common/JsonTextarea.d.ts +14 -0
- package/dist/src/components/sidebar-right/edits/common/LabelHelpSection.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/common/NaiveBasicSection.d.ts +7 -0
- package/dist/src/components/sidebar-right/edits/common/NameInput.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/common/OptionsTagsSection.d.ts +5 -0
- package/dist/src/components/sidebar-right/edits/common/PlaceholderSection.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/common/RangeInputs.d.ts +16 -0
- package/dist/src/components/sidebar-right/edits/common/SelectInput.d.ts +15 -0
- package/dist/src/components/sidebar-right/edits/common/SelectSwitchesSection.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/common/SwitchInput.d.ts +12 -0
- package/dist/src/components/sidebar-right/edits/common/TagsInput.d.ts +11 -0
- package/dist/src/components/sidebar-right/edits/common/TextInput.d.ts +14 -0
- package/dist/src/components/sidebar-right/edits/common/ToggleInput.d.ts +15 -0
- package/dist/src/components/sidebar-right/edits/common/TreeOptionsJsonSection.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/CheckboxEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/ColorEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/DateLikeEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/DateTimeEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/FileEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/GroupEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/NaiveAvatarEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/NaiveBlockquoteEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/NaiveButtonEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/NaiveCascaderEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/NaiveCheckboxEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/NaiveDividerEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/NaiveH1Editor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/NaiveH2Editor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/NaiveH3Editor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/NaiveH4Editor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/NaiveH5Editor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/NaiveH6Editor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/NaiveHeaderEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/NaiveLiEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/NaiveLinkEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/NaiveMentionEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/NaiveOlEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/NaiveParagraphEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/NaiveRateEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/NaiveSwitchEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/NaiveTextEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/NaiveTreeSelectEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/NaiveUlEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/NumberEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/RadioEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/RangeEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/SelectEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/SubmitEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/edits/editors/TextLikeEditor.d.ts +2 -0
- package/dist/src/components/sidebar-right/validations/DoubleParamValidation.d.ts +11 -0
- package/dist/src/components/sidebar-right/validations/SingleParamValidation.d.ts +8 -0
- package/dist/src/components/sidebar-right/validations/SingleValueValidation.d.ts +7 -0
- package/dist/src/components/sidebar-right/validations/ValidationSection.d.ts +2 -0
- package/dist/src/components/sidebar-right/validations/index.d.ts +3 -0
- package/dist/src/components/ui/sonner/Sonner.d.ts +3 -0
- package/dist/src/components/ui/sonner/index.d.ts +1 -0
- package/dist/src/components/ui/theme-switcher/ThemeSwitcher.d.ts +2 -0
- package/dist/src/components/ui/validation-card/ValidationCard.d.ts +21 -0
- package/dist/src/components/ui/validation-card/ValidationSwitch.d.ts +14 -0
- package/dist/src/components/ui/validation-card/index.d.ts +2 -0
- package/dist/src/composables/form-fields.d.ts +808 -0
- package/dist/src/composables/schema-history.d.ts +12 -0
- package/dist/src/composables/use-config.d.ts +5 -0
- package/dist/src/i18n/context.d.ts +12 -0
- package/dist/src/i18n/messages.d.ts +332 -0
- package/dist/src/index.d.ts +7 -0
- package/dist/src/style-entry.d.ts +1 -0
- package/dist/src/types/env.d.ts +5 -0
- package/dist/src/utils/custom-insert-plugin.d.ts +17 -0
- package/dist/src/utils/default-form-elements.d.ts +1558 -0
- package/dist/src/utils/expression-eval.d.ts +10 -0
- package/dist/src/utils/field-props.d.ts +8 -0
- package/dist/src/utils/format-schema.d.ts +3 -0
- package/dist/src/utils/utils.d.ts +10 -0
- package/dist/style.cjs +0 -0
- package/dist/style.css +3 -0
- package/dist/style.d.ts +1 -0
- package/dist/style.mjs +0 -0
- package/package.json +100 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FormKitSchemaFormKit } from '@formkit/core';
|
|
2
|
+
type SchemaSnapshot = FormKitSchemaFormKit[];
|
|
3
|
+
export declare const canUndo: import('vue').ComputedRef<boolean>;
|
|
4
|
+
export declare const canRedo: import('vue').ComputedRef<boolean>;
|
|
5
|
+
export declare function commitSchema(nextSchema: SchemaSnapshot, options?: {
|
|
6
|
+
reason?: string;
|
|
7
|
+
merge?: boolean;
|
|
8
|
+
}): void;
|
|
9
|
+
export declare function undo(): void;
|
|
10
|
+
export declare function redo(): void;
|
|
11
|
+
export declare function resetHistory(): void;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { InjectionKey } from 'vue';
|
|
2
|
+
import { FormBuilderConfig } from '../types/env';
|
|
3
|
+
export declare const CONFIG_KEY: InjectionKey<FormBuilderConfig>;
|
|
4
|
+
export declare function provideFormBuilderConfig(config: FormBuilderConfig): void;
|
|
5
|
+
export declare function useFormBuilderConfig(): FormBuilderConfig;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
type AnyMessages = Record<string, any>;
|
|
3
|
+
type I18nContext = {
|
|
4
|
+
locale: ComputedRef<string>;
|
|
5
|
+
t: (key: string, params?: Record<string, string | number>) => string;
|
|
6
|
+
};
|
|
7
|
+
export declare function provideFormBuilderI18n(options: {
|
|
8
|
+
locale: ComputedRef<string | undefined>;
|
|
9
|
+
messages?: ComputedRef<AnyMessages | undefined>;
|
|
10
|
+
}): I18nContext;
|
|
11
|
+
export declare function useFormBuilderI18n(): I18nContext;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
export declare const messages: {
|
|
2
|
+
readonly 'zh-CN': {
|
|
3
|
+
readonly common: {
|
|
4
|
+
readonly selectFieldToEdit: "请选择一个字段来编辑属性";
|
|
5
|
+
readonly cancel: "取消";
|
|
6
|
+
readonly confirm: "确认";
|
|
7
|
+
};
|
|
8
|
+
readonly sidebar: {
|
|
9
|
+
readonly search: "搜索...";
|
|
10
|
+
};
|
|
11
|
+
readonly builder: {
|
|
12
|
+
readonly clearForm: "清空表单";
|
|
13
|
+
readonly previewForm: "预览表单";
|
|
14
|
+
readonly undo: "撤销";
|
|
15
|
+
readonly redo: "重做";
|
|
16
|
+
readonly clearConfirm: "确定要清空吗?这会永久删除你创建的表单。";
|
|
17
|
+
readonly creatingForm: "正在生成新表单...";
|
|
18
|
+
readonly desktopView: "桌面视图";
|
|
19
|
+
readonly tabletView: "平板视图";
|
|
20
|
+
readonly mobileView: "手机视图";
|
|
21
|
+
readonly importExportSchema: "导入 / 导出 Schema";
|
|
22
|
+
readonly previewTitle: "表单预览";
|
|
23
|
+
readonly previewDescription: "预览表单并测试其功能。";
|
|
24
|
+
readonly formDataTitle: "表单数据:";
|
|
25
|
+
readonly formSubmitted: "表单已提交!";
|
|
26
|
+
};
|
|
27
|
+
readonly importExport: {
|
|
28
|
+
readonly title: "导入 / 导出 Schema";
|
|
29
|
+
readonly placeholder: "在这里粘贴表单 schema 的 JSON...";
|
|
30
|
+
readonly downloadJson: "下载 JSON";
|
|
31
|
+
readonly saveAndImport: "保存并导入";
|
|
32
|
+
readonly schemaMustBeArray: "Schema 必须是数组";
|
|
33
|
+
readonly importSuccess: "Schema 导入成功";
|
|
34
|
+
readonly downloadedSuccess: "Schema 下载成功";
|
|
35
|
+
readonly failedParseJson: "解析 JSON 失败:{message}";
|
|
36
|
+
readonly failedGenerateDownload: "生成下载失败:JSON 无效";
|
|
37
|
+
readonly unknownError: "未知错误";
|
|
38
|
+
};
|
|
39
|
+
readonly expression: {
|
|
40
|
+
readonly useExpressionValue: "使用表达式值";
|
|
41
|
+
readonly placeholder: "例如:$my_variable + 1";
|
|
42
|
+
readonly variablesNotFound: "未找到变量:{vars}";
|
|
43
|
+
};
|
|
44
|
+
readonly ai: {
|
|
45
|
+
readonly tooltip: "AI 助手";
|
|
46
|
+
readonly placeholder: "AI 助手";
|
|
47
|
+
readonly promptPlaceholder: "让 AI 生成表单";
|
|
48
|
+
readonly emptyPrompt: "提示为空!";
|
|
49
|
+
readonly emptyPromptDescription: "请输入提示词以生成表单。";
|
|
50
|
+
readonly close: "关闭";
|
|
51
|
+
readonly defaultInstructions: "根据用户描述生成 FormKit schema";
|
|
52
|
+
};
|
|
53
|
+
readonly validation: {
|
|
54
|
+
readonly rulesTitle: "校验规则";
|
|
55
|
+
readonly bothValuesMustBeSet: "两个值都必须填写";
|
|
56
|
+
readonly required: {
|
|
57
|
+
readonly label: "必填";
|
|
58
|
+
readonly tooltip: "必须填写该字段才能提交";
|
|
59
|
+
};
|
|
60
|
+
readonly email: {
|
|
61
|
+
readonly label: "邮箱";
|
|
62
|
+
readonly tooltip: "必须是合法的邮箱地址";
|
|
63
|
+
};
|
|
64
|
+
readonly number: {
|
|
65
|
+
readonly label: "数字";
|
|
66
|
+
readonly tooltip: "必须是合法的数字";
|
|
67
|
+
};
|
|
68
|
+
readonly lowercase: {
|
|
69
|
+
readonly label: "小写";
|
|
70
|
+
readonly tooltip: "必须全为小写字母";
|
|
71
|
+
};
|
|
72
|
+
readonly uppercase: {
|
|
73
|
+
readonly label: "大写";
|
|
74
|
+
readonly tooltip: "必须全为大写字母";
|
|
75
|
+
};
|
|
76
|
+
readonly url: {
|
|
77
|
+
readonly label: "URL";
|
|
78
|
+
readonly tooltip: "必须是合法的 URL";
|
|
79
|
+
};
|
|
80
|
+
readonly alpha: {
|
|
81
|
+
readonly label: "仅字母";
|
|
82
|
+
readonly tooltip: "只能包含字母";
|
|
83
|
+
};
|
|
84
|
+
readonly alphanumeric: {
|
|
85
|
+
readonly label: "字母数字";
|
|
86
|
+
readonly tooltip: "只能包含字母和数字";
|
|
87
|
+
};
|
|
88
|
+
readonly contains_symbol: {
|
|
89
|
+
readonly label: "包含符号";
|
|
90
|
+
readonly tooltip: "必须包含一个符号";
|
|
91
|
+
};
|
|
92
|
+
readonly contains_uppercase: {
|
|
93
|
+
readonly label: "包含大写";
|
|
94
|
+
readonly tooltip: "必须包含一个大写字母";
|
|
95
|
+
};
|
|
96
|
+
readonly contains_lowercase: {
|
|
97
|
+
readonly label: "包含小写";
|
|
98
|
+
readonly tooltip: "必须包含一个小写字母";
|
|
99
|
+
};
|
|
100
|
+
readonly contains_numeric: {
|
|
101
|
+
readonly label: "包含数字";
|
|
102
|
+
readonly tooltip: "必须包含一个数字";
|
|
103
|
+
};
|
|
104
|
+
readonly min: {
|
|
105
|
+
readonly label: "最小值";
|
|
106
|
+
readonly tooltip: "数字必须大于等于指定值";
|
|
107
|
+
readonly placeholder: "0";
|
|
108
|
+
};
|
|
109
|
+
readonly max: {
|
|
110
|
+
readonly label: "最大值";
|
|
111
|
+
readonly tooltip: "数字必须小于等于指定值";
|
|
112
|
+
readonly placeholder: "10";
|
|
113
|
+
};
|
|
114
|
+
readonly matches: {
|
|
115
|
+
readonly label: "匹配";
|
|
116
|
+
readonly tooltip: "输入必须匹配指定的值或正则;多个参数时将逐个尝试直到匹配";
|
|
117
|
+
readonly placeholder: "值";
|
|
118
|
+
};
|
|
119
|
+
readonly starts_with: {
|
|
120
|
+
readonly label: "前缀";
|
|
121
|
+
readonly tooltip: "必须以指定字符串开头";
|
|
122
|
+
readonly placeholder: "值";
|
|
123
|
+
};
|
|
124
|
+
readonly ends_with: {
|
|
125
|
+
readonly label: "后缀";
|
|
126
|
+
readonly tooltip: "必须以指定字符串结尾";
|
|
127
|
+
readonly placeholder: "值";
|
|
128
|
+
};
|
|
129
|
+
readonly date_after: {
|
|
130
|
+
readonly label: "日期晚于";
|
|
131
|
+
readonly tooltip: "必须晚于指定日期";
|
|
132
|
+
readonly placeholder: "YYYY-MM-DD";
|
|
133
|
+
};
|
|
134
|
+
readonly date_before: {
|
|
135
|
+
readonly label: "日期早于";
|
|
136
|
+
readonly tooltip: "必须早于指定日期";
|
|
137
|
+
readonly placeholder: "YYYY-MM-DD";
|
|
138
|
+
};
|
|
139
|
+
readonly date_between: {
|
|
140
|
+
readonly label: "日期区间";
|
|
141
|
+
readonly tooltip: "必须在指定日期区间内";
|
|
142
|
+
};
|
|
143
|
+
readonly length: {
|
|
144
|
+
readonly label: "长度区间";
|
|
145
|
+
readonly tooltip: "文本长度必须在最小值与最大值之间";
|
|
146
|
+
};
|
|
147
|
+
readonly between: {
|
|
148
|
+
readonly label: "区间";
|
|
149
|
+
readonly tooltip: "数字必须在两个数值之间(包含边界)";
|
|
150
|
+
};
|
|
151
|
+
readonly minLabel: "最小值";
|
|
152
|
+
readonly maxLabel: "最大值";
|
|
153
|
+
};
|
|
154
|
+
readonly edits: {
|
|
155
|
+
readonly placeholder: {
|
|
156
|
+
readonly label: "请输入 Label";
|
|
157
|
+
readonly help: "请输入帮助文本";
|
|
158
|
+
readonly placeholder: "请输入占位文本";
|
|
159
|
+
readonly text: "请输入文本";
|
|
160
|
+
readonly dividerTitle: "请输入分割线标题";
|
|
161
|
+
readonly addItems: "添加条目...";
|
|
162
|
+
readonly fieldName: "字段名";
|
|
163
|
+
};
|
|
164
|
+
readonly optionsLabel: "添加选项";
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
readonly en: {
|
|
168
|
+
readonly common: {
|
|
169
|
+
readonly selectFieldToEdit: "Select a field to edit its properties";
|
|
170
|
+
readonly cancel: "Cancel";
|
|
171
|
+
readonly confirm: "Confirm";
|
|
172
|
+
};
|
|
173
|
+
readonly sidebar: {
|
|
174
|
+
readonly search: "Search...";
|
|
175
|
+
};
|
|
176
|
+
readonly builder: {
|
|
177
|
+
readonly clearForm: "Clear form";
|
|
178
|
+
readonly previewForm: "Preview Form";
|
|
179
|
+
readonly undo: "Undo";
|
|
180
|
+
readonly redo: "Redo";
|
|
181
|
+
readonly clearConfirm: "Are you absolutely sure? This will permanently delete the form you have created.";
|
|
182
|
+
readonly creatingForm: "Creating your new form...";
|
|
183
|
+
readonly desktopView: "Desktop View";
|
|
184
|
+
readonly tabletView: "Tablet View";
|
|
185
|
+
readonly mobileView: "Mobile View";
|
|
186
|
+
readonly importExportSchema: "Import / Export Schema";
|
|
187
|
+
readonly previewTitle: "Form Preview";
|
|
188
|
+
readonly previewDescription: "Preview your form and test its functionality.";
|
|
189
|
+
readonly formDataTitle: "Form Data:";
|
|
190
|
+
readonly formSubmitted: "Form submitted!";
|
|
191
|
+
};
|
|
192
|
+
readonly importExport: {
|
|
193
|
+
readonly title: "Import / Export Schema";
|
|
194
|
+
readonly placeholder: "Paste your form schema JSON here...";
|
|
195
|
+
readonly downloadJson: "Download JSON";
|
|
196
|
+
readonly saveAndImport: "Save & Import";
|
|
197
|
+
readonly schemaMustBeArray: "Schema must be an array";
|
|
198
|
+
readonly importSuccess: "Schema imported successfully";
|
|
199
|
+
readonly downloadedSuccess: "Schema downloaded successfully";
|
|
200
|
+
readonly failedParseJson: "Failed to parse JSON: {message}";
|
|
201
|
+
readonly failedGenerateDownload: "Failed to generate download: Invalid JSON";
|
|
202
|
+
readonly unknownError: "Unknown error";
|
|
203
|
+
};
|
|
204
|
+
readonly expression: {
|
|
205
|
+
readonly useExpressionValue: "Use expression value";
|
|
206
|
+
readonly placeholder: "e.g. $my_variable + 1";
|
|
207
|
+
readonly variablesNotFound: "Variables not found: {vars}";
|
|
208
|
+
};
|
|
209
|
+
readonly ai: {
|
|
210
|
+
readonly tooltip: "AI Assistant";
|
|
211
|
+
readonly placeholder: "AI Assistant";
|
|
212
|
+
readonly promptPlaceholder: "Prompt AI";
|
|
213
|
+
readonly emptyPrompt: "Empty chat prompt!";
|
|
214
|
+
readonly emptyPromptDescription: "Please enter a prompt to generate a form.";
|
|
215
|
+
readonly close: "Close";
|
|
216
|
+
readonly defaultInstructions: "Generate a FormKit schema based on the user's description";
|
|
217
|
+
};
|
|
218
|
+
readonly validation: {
|
|
219
|
+
readonly rulesTitle: "Validation Rules";
|
|
220
|
+
readonly bothValuesMustBeSet: "Both values must be set";
|
|
221
|
+
readonly required: {
|
|
222
|
+
readonly label: "Required";
|
|
223
|
+
readonly tooltip: "Value is required for completion";
|
|
224
|
+
};
|
|
225
|
+
readonly email: {
|
|
226
|
+
readonly label: "Email";
|
|
227
|
+
readonly tooltip: "Input must be a valid email address";
|
|
228
|
+
};
|
|
229
|
+
readonly number: {
|
|
230
|
+
readonly label: "Number";
|
|
231
|
+
readonly tooltip: "Input must be a valid numeric value";
|
|
232
|
+
};
|
|
233
|
+
readonly lowercase: {
|
|
234
|
+
readonly label: "Lowercase";
|
|
235
|
+
readonly tooltip: "Input must be all lowercase letters";
|
|
236
|
+
};
|
|
237
|
+
readonly uppercase: {
|
|
238
|
+
readonly label: "Uppercase";
|
|
239
|
+
readonly tooltip: "Input must be all uppercase letters";
|
|
240
|
+
};
|
|
241
|
+
readonly url: {
|
|
242
|
+
readonly label: "URL";
|
|
243
|
+
readonly tooltip: "Input must be a valid URL";
|
|
244
|
+
};
|
|
245
|
+
readonly alpha: {
|
|
246
|
+
readonly label: "Alpha";
|
|
247
|
+
readonly tooltip: "Input must only contain letters";
|
|
248
|
+
};
|
|
249
|
+
readonly alphanumeric: {
|
|
250
|
+
readonly label: "Alphanumeric";
|
|
251
|
+
readonly tooltip: "Input must only contain letters and numbers";
|
|
252
|
+
};
|
|
253
|
+
readonly contains_symbol: {
|
|
254
|
+
readonly label: "Contains symbol";
|
|
255
|
+
readonly tooltip: "Input must contain a symbol";
|
|
256
|
+
};
|
|
257
|
+
readonly contains_uppercase: {
|
|
258
|
+
readonly label: "Contains uppercase";
|
|
259
|
+
readonly tooltip: "Input must contain an uppercase letter";
|
|
260
|
+
};
|
|
261
|
+
readonly contains_lowercase: {
|
|
262
|
+
readonly label: "Contains lowercase";
|
|
263
|
+
readonly tooltip: "Input must contain a lowercase letter";
|
|
264
|
+
};
|
|
265
|
+
readonly contains_numeric: {
|
|
266
|
+
readonly label: "Contains numeric";
|
|
267
|
+
readonly tooltip: "Input must contain a number";
|
|
268
|
+
};
|
|
269
|
+
readonly min: {
|
|
270
|
+
readonly label: "Minimum";
|
|
271
|
+
readonly tooltip: "Number must be greater or equal to the given value";
|
|
272
|
+
readonly placeholder: "0";
|
|
273
|
+
};
|
|
274
|
+
readonly max: {
|
|
275
|
+
readonly label: "Maximum";
|
|
276
|
+
readonly tooltip: "Number must be less than or equal to the given value";
|
|
277
|
+
readonly placeholder: "10";
|
|
278
|
+
};
|
|
279
|
+
readonly matches: {
|
|
280
|
+
readonly label: "Matches";
|
|
281
|
+
readonly tooltip: "Input must match a particular value or pattern. If you pass multiple arguments, it checks each until a match is found";
|
|
282
|
+
readonly placeholder: "Value";
|
|
283
|
+
};
|
|
284
|
+
readonly starts_with: {
|
|
285
|
+
readonly label: "Starts with";
|
|
286
|
+
readonly tooltip: "Value must start with given string";
|
|
287
|
+
readonly placeholder: "Value";
|
|
288
|
+
};
|
|
289
|
+
readonly ends_with: {
|
|
290
|
+
readonly label: "Ends with";
|
|
291
|
+
readonly tooltip: "Value must end with given string";
|
|
292
|
+
readonly placeholder: "Value";
|
|
293
|
+
};
|
|
294
|
+
readonly date_after: {
|
|
295
|
+
readonly label: "Date after";
|
|
296
|
+
readonly tooltip: "Input must be after the given date";
|
|
297
|
+
readonly placeholder: "YYYY-MM-DD";
|
|
298
|
+
};
|
|
299
|
+
readonly date_before: {
|
|
300
|
+
readonly label: "Date before";
|
|
301
|
+
readonly tooltip: "Input must be before the given date";
|
|
302
|
+
readonly placeholder: "YYYY-MM-DD";
|
|
303
|
+
};
|
|
304
|
+
readonly date_between: {
|
|
305
|
+
readonly label: "Date between";
|
|
306
|
+
readonly tooltip: "Date must be between the given dates";
|
|
307
|
+
};
|
|
308
|
+
readonly length: {
|
|
309
|
+
readonly label: "Length";
|
|
310
|
+
readonly tooltip: "Sentence length must be between min and max.";
|
|
311
|
+
};
|
|
312
|
+
readonly between: {
|
|
313
|
+
readonly label: "Between";
|
|
314
|
+
readonly tooltip: "Number is (inclusively) between two other numbers";
|
|
315
|
+
};
|
|
316
|
+
readonly minLabel: "Min";
|
|
317
|
+
readonly maxLabel: "Max";
|
|
318
|
+
};
|
|
319
|
+
readonly edits: {
|
|
320
|
+
readonly placeholder: {
|
|
321
|
+
readonly label: "Enter label";
|
|
322
|
+
readonly help: "Enter help text";
|
|
323
|
+
readonly placeholder: "Enter placeholder";
|
|
324
|
+
readonly text: "Enter text";
|
|
325
|
+
readonly dividerTitle: "Divider title";
|
|
326
|
+
readonly addItems: "Add Items...";
|
|
327
|
+
readonly fieldName: "field_name";
|
|
328
|
+
};
|
|
329
|
+
readonly optionsLabel: "Add Items to List";
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as FormBuilder } from './builder/BuilderMain';
|
|
2
|
+
import { default as BuilderProvider } from './builder/BuilderProvider';
|
|
3
|
+
export { useFormBuilderConfig, provideFormBuilderConfig } from './composables/use-config';
|
|
4
|
+
export type { FormBuilderConfig } from './types/env';
|
|
5
|
+
export { FormBuilder, BuilderProvider };
|
|
6
|
+
export { FormBuilder as FormKitFormBuilder };
|
|
7
|
+
export { BuilderProvider as FormBuilderProvider };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DragState, NodeDragEventData, ParentEventData, PointeroverParentEvent, ParentRecord, SynthDragState, BaseDragState, InsertConfig, InsertState } from '@formkit/drag-and-drop';
|
|
2
|
+
export declare const insertState: InsertState<unknown> & {
|
|
3
|
+
verticalInsert?: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare function customInsertPlugin<T>(insertConfig: InsertConfig<T>): (parent: HTMLElement) => {
|
|
6
|
+
setup(): void;
|
|
7
|
+
} | undefined;
|
|
8
|
+
export declare function handleNodeDragover<T>(data: NodeDragEventData<T>): void;
|
|
9
|
+
export declare function handleParentDragover<T>(data: ParentEventData<T>, state: DragState<T>): void;
|
|
10
|
+
export declare function handleParentPointerover<T>(data: PointeroverParentEvent<T>): void;
|
|
11
|
+
export declare function moveBetween<T>(data: ParentRecord<T>, state: DragState<T>): void;
|
|
12
|
+
/**
|
|
13
|
+
* Performs the actual insertion of the dragged nodes into the target parent.
|
|
14
|
+
*
|
|
15
|
+
* @param state - The current drag state.
|
|
16
|
+
*/
|
|
17
|
+
export declare function handleEnd<T>(state: DragState<T> | SynthDragState<T> | BaseDragState<T>): void;
|