@myparcel-dev/vue-form-builder 1.0.0-beta.53
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/CHANGELOG.md +301 -0
- package/dist/components/FormElement.vue.d.ts +22 -0
- package/dist/components/FormElementWrapper.d.ts +24 -0
- package/dist/components/Fragment.vue.d.ts +17 -0
- package/dist/components/MagicForm.vue.d.ts +67 -0
- package/dist/components/RenderedFormContent.vue.d.ts +2 -0
- package/dist/composables/createFieldHooks.d.ts +5 -0
- package/dist/composables/useElement.d.ts +3 -0
- package/dist/composables/useForm.d.ts +3 -0
- package/dist/composables/useFormBuilder.d.ts +3 -0
- package/dist/composables/useLifecycleHooks.d.ts +10 -0
- package/dist/composables/useTestAttributes.d.ts +3 -0
- package/dist/data/hooks.d.ts +14 -0
- package/dist/deprecated.d.ts +8 -0
- package/dist/form/Field.d.ts +55 -0
- package/dist/form/Form.d.ts +36 -0
- package/dist/hooks/HookManager.d.ts +27 -0
- package/dist/hooks/createHookManager.d.ts +4 -0
- package/dist/hooks/filterMatchingHooks.d.ts +3 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +683 -0
- package/dist/plugin/MyParcelFormBuilderPlugin.d.ts +10 -0
- package/dist/plugin/devtools/createFieldsNodes.d.ts +5 -0
- package/dist/plugin/devtools/createFormNode.d.ts +5 -0
- package/dist/plugin/devtools/getComponentName.d.ts +3 -0
- package/dist/plugin/devtools/setupDevtools.d.ts +3 -0
- package/dist/plugin/devtools/types.d.ts +7 -0
- package/dist/symbols.d.ts +6 -0
- package/dist/types/common.types.d.ts +6 -0
- package/dist/types/component.types.d.ts +17 -0
- package/dist/types/deprecated.types.d.ts +35 -0
- package/dist/types/element.types.d.ts +0 -0
- package/dist/types/field.types.d.ts +199 -0
- package/dist/types/form-builder.types.d.ts +27 -0
- package/dist/types/form.types.d.ts +202 -0
- package/dist/types/hooks.types.d.ts +11 -0
- package/dist/types/other.types.d.ts +0 -0
- package/dist/types/plain-element.types.d.ts +0 -0
- package/dist/types/utils.types.d.ts +14 -0
- package/dist/types/validator.types.d.ts +21 -0
- package/dist/utils/createField.d.ts +3 -0
- package/dist/utils/createForm.d.ts +3 -0
- package/dist/utils/defineField.d.ts +8 -0
- package/dist/utils/defineForm.d.ts +3 -0
- package/dist/utils/generateFieldName.d.ts +4 -0
- package/dist/utils/getDefaultFormConfiguration.d.ts +3 -0
- package/dist/utils/markComponentAsRaw.d.ts +4 -0
- package/dist/utils/normalizeFieldConfiguration.d.ts +12 -0
- package/dist/utils/normalizeFormConfiguration.d.ts +3 -0
- package/dist/utils/toPromise.d.ts +3 -0
- package/dist/utils/useDynamicWatcher.d.ts +4 -0
- package/dist/validators/isRequired.d.ts +4 -0
- package/package.json +51 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
<!-- MONODEPLOY:BELOW -->
|
|
4
|
+
|
|
5
|
+
## [1.0.0-beta.53](https://github/myparcelnl/vue-form-builder/compare/@myparcel-dev/vue-form-builder@1.0.0-beta.52...@myparcel-dev/vue-form-builder@1.0.0-beta.53) "@myparcel-dev/vue-form-builder" (2025-12-02)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* migrate to [@myparcel-dev](https://github/myparcel-dev) scope ([#261](https://github/myparcelnl/vue-form-builder/issues/261)) ([7b43075](https://github/myparcelnl/vue-form-builder/commit/7b43075df4dab75bd124f33f5ce48d46ef0b63df))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [1.0.0-beta.52](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-beta.51...@myparcel/vue-form-builder@1.0.0-beta.52) "@myparcel/vue-form-builder" (2025-01-27)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* only set the element prop when elementProp is true ([#259](https://github/myparcelnl/vue-form-builder/issues/259)) ([63c37a5](https://github/myparcelnl/vue-form-builder/commit/63c37a512ae12011a2bc1015dce976cb7442125f))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [1.0.0-beta.51](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-beta.50...@myparcel/vue-form-builder@1.0.0-beta.51) "@myparcel/vue-form-builder" (2025-01-16)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* make the FieldInstanceProps parseble in build steps ([#258](https://github/myparcelnl/vue-form-builder/issues/258)) ([b83d142](https://github/myparcelnl/vue-form-builder/commit/b83d142f0a69ee70fa99a01795d3567b2fa578ae))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
## [1.0.0-beta.50](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-beta.49...@myparcel/vue-form-builder@1.0.0-beta.50) "@myparcel/vue-form-builder" (2025-01-15)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Features
|
|
39
|
+
|
|
40
|
+
* add option to spread element props to the component ([#257](https://github/myparcelnl/vue-form-builder/issues/257)) ([a2e0210](https://github/myparcelnl/vue-form-builder/commit/a2e0210f1e1b06efa5eeac140845f5cacfbbc3c4))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
## [1.0.0-beta.49](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-beta.48...@myparcel/vue-form-builder@1.0.0-beta.49) "@myparcel/vue-form-builder" (2024-10-09)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Bug Fixes
|
|
49
|
+
|
|
50
|
+
* update field configuration type ([#253](https://github/myparcelnl/vue-form-builder/issues/253)) ([19e82a8](https://github/myparcelnl/vue-form-builder/commit/19e82a83218c969be04f2caa97042906f8fc69d6))
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
## [1.0.0-beta.48](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-beta.47...@myparcel/vue-form-builder@1.0.0-beta.48) "@myparcel/vue-form-builder" (2024-10-03)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### Bug Fixes
|
|
59
|
+
|
|
60
|
+
* import vue helpers as type ([#252](https://github/myparcelnl/vue-form-builder/issues/252)) ([9934177](https://github/myparcelnl/vue-form-builder/commit/9934177e87872de00c8cd80d094f012869a5c159))
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
## [1.0.0-beta.47](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-beta.46...@myparcel/vue-form-builder@1.0.0-beta.47) "@myparcel/vue-form-builder" (2024-10-03)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
## [1.0.0-beta.46](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-beta.45...@myparcel/vue-form-builder@1.0.0-beta.46) "@myparcel/vue-form-builder" (2024-10-03)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
## [1.0.0-beta.44](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-beta.43...@myparcel/vue-form-builder@1.0.0-beta.44) "@myparcel/vue-form-builder" (2024-09-27)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
### ⚠ BREAKING CHANGES
|
|
79
|
+
|
|
80
|
+
* simplify forms (#238)
|
|
81
|
+
|
|
82
|
+
### Code Refactoring
|
|
83
|
+
|
|
84
|
+
* simplify forms ([#238](https://github/myparcelnl/vue-form-builder/issues/238)) ([1b5225e](https://github/myparcelnl/vue-form-builder/commit/1b5225eeb26b9126be0f7fe39197f35ea7929b4b))
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
## [1.0.0-beta.43](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-beta.42...@myparcel/vue-form-builder@1.0.0-beta.43) "@myparcel/vue-form-builder" (2024-07-12)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
## [1.0.0-beta.42](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-beta.41...@myparcel/vue-form-builder@1.0.0-beta.42) "@myparcel/vue-form-builder" (2024-03-13)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
### ⚠ BREAKING CHANGES
|
|
98
|
+
|
|
99
|
+
* **npm:** may break imports and/or cause new build errors
|
|
100
|
+
|
|
101
|
+
### Bug Fixes
|
|
102
|
+
|
|
103
|
+
* **npm:** fix builds and exports ([3aa81f2](https://github/myparcelnl/vue-form-builder/commit/3aa81f2d3fc0017693e8b279af7211d45cd5b479))
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
## [1.0.0-beta.40](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-beta.39...@myparcel/vue-form-builder@1.0.0-beta.40) "@myparcel/vue-form-builder" (2024-01-26)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
### Performance Improvements
|
|
112
|
+
|
|
113
|
+
* **bundle:** do not bundle @vueuse/core ([84ed058](https://github/myparcelnl/vue-form-builder/commit/84ed058bb420733daecf03bcc3cd2603cfd028b6))
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
## [1.0.0-beta.39](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-beta.38...@myparcel/vue-form-builder@1.0.0-beta.39) "@myparcel/vue-form-builder" (2024-01-25)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
### Bug Fixes
|
|
122
|
+
|
|
123
|
+
* **bundle:** improve tree-shaking ([be1ae30](https://github/myparcelnl/vue-form-builder/commit/be1ae3089cdad141a6b7f65fa0dfc4dcc0720876))
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
## [1.0.0-beta.36](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-beta.35...@myparcel/vue-form-builder@1.0.0-beta.36) "@myparcel/vue-form-builder" (2024-01-10)
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
## [1.0.0-beta.35](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-beta.34...@myparcel/vue-form-builder@1.0.0-beta.35) "@myparcel/vue-form-builder" (2024-01-05)
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
### Features
|
|
137
|
+
|
|
138
|
+
* **types:** export ComponentProps type ([02e27f4](https://github/myparcelnl/vue-form-builder/commit/02e27f4f9cf6921d2d5489b638bbaf9b7dd7a8d3))
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
## [1.0.0-beta.29](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-beta.28...@myparcel/vue-form-builder@1.0.0-beta.29) "@myparcel/vue-form-builder" (2023-12-07)
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
## [1.0.0-beta.28](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-beta.27...@myparcel/vue-form-builder@1.0.0-beta.28) "@myparcel/vue-form-builder" (2023-12-07)
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
### ⚠ BREAKING CHANGES
|
|
152
|
+
|
|
153
|
+
* `vue-form-builder-js` is removed. `vue-form-builder` is now compiled JavaScript instead of TypeScript. Import `@myparcel/vue-form-builder/ts` to get TypeScript
|
|
154
|
+
|
|
155
|
+
### Build System
|
|
156
|
+
|
|
157
|
+
* merge vue-form-builder-js into vue-form-builder ([e10c874](https://github/myparcelnl/vue-form-builder/commit/e10c874a3fc6bb5ddeef4ec68c28c322cc04d191))
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
## [1.0.0-beta.27](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-beta.26...@myparcel/vue-form-builder@1.0.0-beta.27) "@myparcel/vue-form-builder" (2023-12-06)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
### Bug Fixes
|
|
166
|
+
|
|
167
|
+
* fix circular imports ([0d4a4d4](https://github/myparcelnl/vue-form-builder/commit/0d4a4d43d4bd62b922dedeab4b965bd27105c693))
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
## [1.0.0-beta.18](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-beta.17...@myparcel/vue-form-builder@1.0.0-beta.18) "@myparcel/vue-form-builder" (2023-11-21)
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
### Features
|
|
176
|
+
|
|
177
|
+
* add new way of declaring forms ([#218](https://github/myparcelnl/vue-form-builder/issues/218)) ([9546c82](https://github/myparcelnl/vue-form-builder/commit/9546c82d29716cc269fe6731ff682f0670beec7a))
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
## [1.0.0-beta.8](///compare/@myparcel/vue-form-builder@1.0.0-beta.7...@myparcel/vue-form-builder@1.0.0-beta.8) "@myparcel/vue-form-builder" (2023-06-05)
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
## [1.0.0-beta.7](///compare/@myparcel/vue-form-builder@1.0.0-beta.6...@myparcel/vue-form-builder@1.0.0-beta.7) "@myparcel/vue-form-builder" (2023-05-31)
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
### ⚠ BREAKING CHANGES
|
|
191
|
+
|
|
192
|
+
* **meta:** fix having to use /src in vfb imports (#208)
|
|
193
|
+
|
|
194
|
+
### Bug Fixes
|
|
195
|
+
|
|
196
|
+
* **meta:** fix having to use /src in vfb imports ([#208](///issues/208)) 2e52261
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
## [1.0.0-beta.5](///compare/@myparcel/vue-form-builder@1.0.0-beta.4...@myparcel/vue-form-builder@1.0.0-beta.5) "@myparcel/vue-form-builder" (2023-05-30)
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
### Bug Fixes
|
|
205
|
+
|
|
206
|
+
* include .d.ts files in final package 12a9b7b
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
## [1.0.0-beta.4](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-beta.3...@myparcel/vue-form-builder@1.0.0-beta.4) "@myparcel/vue-form-builder" (2023-05-30)
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
### Bug Fixes
|
|
215
|
+
|
|
216
|
+
* add FormHook enum to exports ([364732d](https://github/myparcelnl/vue-form-builder/commit/364732d580518d77304b393d03ab37f47cf64c68))
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
## [1.0.0-beta.3](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-beta.2...@myparcel/vue-form-builder@1.0.0-beta.3) "@myparcel/vue-form-builder" (2023-05-23)
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
## [1.0.0-beta.1](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-beta.0...@myparcel/vue-form-builder@1.0.0-beta.1) "@myparcel/vue-form-builder" (2023-05-04)
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
## [1.0.0-beta.0](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-alpha.1...@myparcel/vue-form-builder@1.0.0-beta.0) "@myparcel/vue-form-builder" (2023-04-06)
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
### Features
|
|
235
|
+
|
|
236
|
+
* add src to module files ([c14626a](https://github/myparcelnl/vue-form-builder/commit/c14626a2ab1c98464611f83978575a2ce84c53a2))
|
|
237
|
+
* expose useForm and useElement ([a9df264](https://github/myparcelnl/vue-form-builder/commit/a9df2643ead2bd9ca976f1a158761acb4c34cf83))
|
|
238
|
+
* **plugin:** add createMyParcelFormBuilderPlugin ([af207cd](https://github/myparcelnl/vue-form-builder/commit/af207cd1cc1810484b08386ce259f3fd9dce5d2e))
|
|
239
|
+
* separate apps and libs ([1bc04c7](https://github/myparcelnl/vue-form-builder/commit/1bc04c7625e0036bb3d72c40f471902e8232ce71))
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
### Bug Fixes
|
|
243
|
+
|
|
244
|
+
* export vue injections ([b95dfc6](https://github/myparcelnl/vue-form-builder/commit/b95dfc6a7a12eb654d7ef8d976689ee56862cc9e))
|
|
245
|
+
* remove reactive ([9edf168](https://github/myparcelnl/vue-form-builder/commit/9edf168e5499a6d129e5dcaac818c4e3fc1bce99))
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
## [1.0.0-alpha.44](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-alpha.43...@myparcel/vue-form-builder@1.0.0-alpha.44) "@myparcel/vue-form-builder" (2023-03-28)
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
## [1.0.0-alpha.44](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-alpha.43...@myparcel/vue-form-builder@1.0.0-alpha.44) "@myparcel/vue-form-builder" (2023-03-17)
|
|
256
|
+
|
|
257
|
+
## [1.0.0-alpha.38](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-alpha.37...@myparcel/vue-form-builder@1.0.0-alpha.38) "@myparcel/vue-form-builder" (2023-02-22)
|
|
258
|
+
|
|
259
|
+
### Features
|
|
260
|
+
|
|
261
|
+
- expose useForm and useElement ([a9df264](https://github/myparcelnl/vue-form-builder/commit/a9df2643ead2bd9ca976f1a158761acb4c34cf83))
|
|
262
|
+
|
|
263
|
+
## [1.0.0-alpha.35](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-alpha.34...@myparcel/vue-form-builder@1.0.0-alpha.35) "@myparcel/vue-form-builder" (2023-02-17)
|
|
264
|
+
|
|
265
|
+
## [1.0.0-alpha.34](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-alpha.33...@myparcel/vue-form-builder@1.0.0-alpha.34) "@myparcel/vue-form-builder" (2023-02-16)
|
|
266
|
+
|
|
267
|
+
## [1.0.0-alpha.33](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-alpha.32...@myparcel/vue-form-builder@1.0.0-alpha.33) "@myparcel/vue-form-builder" (2023-02-07)
|
|
268
|
+
|
|
269
|
+
### Features
|
|
270
|
+
|
|
271
|
+
- add src to module files ([c14626a](https://github/myparcelnl/vue-form-builder/commit/c14626a2ab1c98464611f83978575a2ce84c53a2))
|
|
272
|
+
|
|
273
|
+
## [1.0.0-alpha.32](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-alpha.31...@myparcel/vue-form-builder@1.0.0-alpha.32) "@myparcel/vue-form-builder" (2023-01-31)
|
|
274
|
+
|
|
275
|
+
## [1.0.0-alpha.30](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-alpha.29...@myparcel/vue-form-builder@1.0.0-alpha.30) "@myparcel/vue-form-builder" (2023-01-19)
|
|
276
|
+
|
|
277
|
+
## [1.0.0-alpha.29](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-alpha.28...@myparcel/vue-form-builder@1.0.0-alpha.29) "@myparcel/vue-form-builder" (2023-01-09)
|
|
278
|
+
|
|
279
|
+
### Features
|
|
280
|
+
|
|
281
|
+
- **plugin:** add createMyParcelFormBuilderPlugin ([af207cd](https://github/myparcelnl/vue-form-builder/commit/af207cd1cc1810484b08386ce259f3fd9dce5d2e))
|
|
282
|
+
|
|
283
|
+
## [1.0.0-alpha.27](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-alpha.26...@myparcel/vue-form-builder@1.0.0-alpha.27) "@myparcel/vue-form-builder" (2023-01-05)
|
|
284
|
+
|
|
285
|
+
### Bug Fixes
|
|
286
|
+
|
|
287
|
+
- remove reactive ([9edf168](https://github/myparcelnl/vue-form-builder/commit/9edf168e5499a6d129e5dcaac818c4e3fc1bce99))
|
|
288
|
+
|
|
289
|
+
## [1.0.0-alpha.26](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-alpha.25...@myparcel/vue-form-builder@1.0.0-alpha.26) "@myparcel/vue-form-builder" (2023-01-04)
|
|
290
|
+
|
|
291
|
+
## [1.0.0-alpha.24](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-alpha.23...@myparcel/vue-form-builder@1.0.0-alpha.24) "@myparcel/vue-form-builder" (2022-12-20)
|
|
292
|
+
|
|
293
|
+
### Bug Fixes
|
|
294
|
+
|
|
295
|
+
- export vue injections ([b95dfc6](https://github/myparcelnl/vue-form-builder/commit/b95dfc6a7a12eb654d7ef8d976689ee56862cc9e))
|
|
296
|
+
|
|
297
|
+
## [1.0.0-alpha.23](https://github/myparcelnl/vue-form-builder/compare/@myparcel/vue-form-builder@1.0.0-alpha.22...@myparcel/vue-form-builder@1.0.0-alpha.23) "@myparcel/vue-form-builder" (2022-12-19)
|
|
298
|
+
|
|
299
|
+
### Features
|
|
300
|
+
|
|
301
|
+
- separate apps and libs ([1bc04c7](https://github/myparcelnl/vue-form-builder/commit/1bc04c7625e0036bb3d72c40f471902e8232ce71))
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FieldInstance } from '../types/field.types';
|
|
2
|
+
|
|
3
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
element: FieldInstance<unknown, any>;
|
|
5
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
6
|
+
element: FieldInstance<unknown, any>;
|
|
7
|
+
}>>>, {}, {}>, Partial<Record<string, (_: any) => any>>>;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
11
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
12
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
13
|
+
} : {
|
|
14
|
+
type: import('vue').PropType<T[K]>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { FormInstance } from '../types/form.types';
|
|
3
|
+
import { FieldInstance } from '../types/field.types';
|
|
4
|
+
|
|
5
|
+
declare const _default: import('vue').DefineComponent<{
|
|
6
|
+
form: {
|
|
7
|
+
type: PropType<FormInstance>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
element: {
|
|
11
|
+
type: PropType<FieldInstance<unknown, any>>;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
}, void, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
15
|
+
form: {
|
|
16
|
+
type: PropType<FormInstance>;
|
|
17
|
+
required: true;
|
|
18
|
+
};
|
|
19
|
+
element: {
|
|
20
|
+
type: PropType<FieldInstance<unknown, any>>;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
}>>, {}, {}>;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { ComponentOrHtmlElement } from '../types/component.types';
|
|
3
|
+
|
|
4
|
+
declare const _default: import('vue').DefineComponent<{
|
|
5
|
+
component: {
|
|
6
|
+
type: PropType<ComponentOrHtmlElement>;
|
|
7
|
+
default: null;
|
|
8
|
+
};
|
|
9
|
+
}, unknown, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
10
|
+
component: {
|
|
11
|
+
type: PropType<ComponentOrHtmlElement>;
|
|
12
|
+
default: null;
|
|
13
|
+
};
|
|
14
|
+
}>>, {
|
|
15
|
+
component: ComponentOrHtmlElement;
|
|
16
|
+
}, {}>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { FormInstance, FormValues } from '../types/form.types';
|
|
2
|
+
import { FormHook } from '../data/hooks';
|
|
3
|
+
|
|
4
|
+
declare const _default: <V extends FormValues = FormValues>(__VLS_props: {
|
|
5
|
+
form: FormInstance;
|
|
6
|
+
onBeforeValidate?: ((form: FormInstance) => any) | undefined;
|
|
7
|
+
onAfterValidate?: ((form: FormInstance) => any) | undefined;
|
|
8
|
+
onBeforeSubmit?: ((form: FormInstance) => any) | undefined;
|
|
9
|
+
onAfterSubmit?: ((form: FormInstance) => any) | undefined;
|
|
10
|
+
onBeforeReset?: ((form: FormInstance) => any) | undefined;
|
|
11
|
+
onAfterReset?: ((form: FormInstance) => any) | undefined;
|
|
12
|
+
onBeforeAddElement?: ((form: FormInstance) => any) | undefined;
|
|
13
|
+
onAfterAddElement?: ((form: FormInstance) => any) | undefined;
|
|
14
|
+
onAfterElementChange?: ((form: FormInstance) => any) | undefined;
|
|
15
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, __VLS_ctx?: {
|
|
16
|
+
slots: {
|
|
17
|
+
default?(_: {}): any;
|
|
18
|
+
loader?(_: {}): any;
|
|
19
|
+
};
|
|
20
|
+
attrs: any;
|
|
21
|
+
emit: (event: FormHook, form: FormInstance) => void;
|
|
22
|
+
} | undefined, __VLS_expose?: ((exposed: import('vue').ShallowUnwrapRef<{}>) => void) | undefined, __VLS_setup?: Promise<{
|
|
23
|
+
props: {
|
|
24
|
+
form: FormInstance;
|
|
25
|
+
onBeforeValidate?: ((form: FormInstance) => any) | undefined;
|
|
26
|
+
onAfterValidate?: ((form: FormInstance) => any) | undefined;
|
|
27
|
+
onBeforeSubmit?: ((form: FormInstance) => any) | undefined;
|
|
28
|
+
onAfterSubmit?: ((form: FormInstance) => any) | undefined;
|
|
29
|
+
onBeforeReset?: ((form: FormInstance) => any) | undefined;
|
|
30
|
+
onAfterReset?: ((form: FormInstance) => any) | undefined;
|
|
31
|
+
onBeforeAddElement?: ((form: FormInstance) => any) | undefined;
|
|
32
|
+
onAfterAddElement?: ((form: FormInstance) => any) | undefined;
|
|
33
|
+
onAfterElementChange?: ((form: FormInstance) => any) | undefined;
|
|
34
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
35
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
36
|
+
attrs: any;
|
|
37
|
+
slots: {
|
|
38
|
+
default?(_: {}): any;
|
|
39
|
+
loader?(_: {}): any;
|
|
40
|
+
};
|
|
41
|
+
emit: (event: FormHook, form: FormInstance) => void;
|
|
42
|
+
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
43
|
+
[key: string]: any;
|
|
44
|
+
}> & {
|
|
45
|
+
__ctx?: {
|
|
46
|
+
props: {
|
|
47
|
+
form: FormInstance;
|
|
48
|
+
onBeforeValidate?: ((form: FormInstance) => any) | undefined;
|
|
49
|
+
onAfterValidate?: ((form: FormInstance) => any) | undefined;
|
|
50
|
+
onBeforeSubmit?: ((form: FormInstance) => any) | undefined;
|
|
51
|
+
onAfterSubmit?: ((form: FormInstance) => any) | undefined;
|
|
52
|
+
onBeforeReset?: ((form: FormInstance) => any) | undefined;
|
|
53
|
+
onAfterReset?: ((form: FormInstance) => any) | undefined;
|
|
54
|
+
onBeforeAddElement?: ((form: FormInstance) => any) | undefined;
|
|
55
|
+
onAfterAddElement?: ((form: FormInstance) => any) | undefined;
|
|
56
|
+
onAfterElementChange?: ((form: FormInstance) => any) | undefined;
|
|
57
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
58
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
59
|
+
attrs: any;
|
|
60
|
+
slots: {
|
|
61
|
+
default?(_: {}): any;
|
|
62
|
+
loader?(_: {}): any;
|
|
63
|
+
};
|
|
64
|
+
emit: (event: FormHook, form: FormInstance) => void;
|
|
65
|
+
} | undefined;
|
|
66
|
+
};
|
|
67
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentLifecycleHooks } from '../types/component.types';
|
|
2
|
+
import { HookManagerInstance } from '../hooks/HookManager';
|
|
3
|
+
import { COMPONENT_LIFECYCLE_HOOKS } from '../data/hooks';
|
|
4
|
+
|
|
5
|
+
type UseLifeCycleHooks = () => {
|
|
6
|
+
hooks: typeof COMPONENT_LIFECYCLE_HOOKS;
|
|
7
|
+
register(hookManager: HookManagerInstance<Partial<ComponentLifecycleHooks>> & Record<string, unknown>, ...args: unknown[]): void;
|
|
8
|
+
};
|
|
9
|
+
export declare const useLifecycleHooks: UseLifeCycleHooks;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum FormHook {
|
|
2
|
+
BeforeValidate = "beforeValidate",
|
|
3
|
+
AfterValidate = "afterValidate",
|
|
4
|
+
BeforeSubmit = "beforeSubmit",
|
|
5
|
+
AfterSubmit = "afterSubmit",
|
|
6
|
+
BeforeReset = "beforeReset",
|
|
7
|
+
AfterReset = "afterReset",
|
|
8
|
+
ElementChange = "afterElementChange",
|
|
9
|
+
BeforeAddElement = "beforeAddElement",
|
|
10
|
+
AfterAddElement = "afterAddElement"
|
|
11
|
+
}
|
|
12
|
+
export declare const FORM_HOOKS: readonly FormHook[];
|
|
13
|
+
export declare const COMPONENT_LIFECYCLE_HOOKS: readonly ["onCreated", "onActivated", "onBeforeMount", "onBeforeUnmount", "onBeforeUpdate", "onDeactivated", "onMounted", "onUnmounted", "onUpdated"];
|
|
14
|
+
export declare const FIELD_HOOKS: readonly ["onCreated", "onActivated", "onBeforeMount", "onBeforeUnmount", "onBeforeUpdate", "onDeactivated", "onMounted", "onUnmounted", "onUpdated", "blur", "click", "focus", "focus", "sanitize", "update", "validate"];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** @deprecated use Field */
|
|
2
|
+
export { Field as InteractiveElement } from './form/Field';
|
|
3
|
+
/** @deprecated use Field */
|
|
4
|
+
export { Field as PlainElement } from './form/Field';
|
|
5
|
+
/** @deprecated use FIELD_HOOKS */
|
|
6
|
+
export { FIELD_HOOKS as PLAIN_ELEMENT_HOOKS } from './data/hooks';
|
|
7
|
+
/** @deprecated use FIELD_HOOKS */
|
|
8
|
+
export { FIELD_HOOKS as INTERACTIVE_ELEMENT_HOOKS } from './data/hooks';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { FormInstance } from '../types/form.types';
|
|
3
|
+
import { FieldConfiguration, FieldInstance } from '../types/field.types';
|
|
4
|
+
import { ComponentProps } from '../types/component.types';
|
|
5
|
+
import { ToRecord } from '../types/common.types';
|
|
6
|
+
|
|
7
|
+
export declare class Field<Type = unknown, Props extends ComponentProps = ComponentProps> {
|
|
8
|
+
readonly attributes: FieldInstance<Type, Props>['attributes'];
|
|
9
|
+
readonly component: FieldInstance<Type, Props>['component'];
|
|
10
|
+
readonly config: FieldConfiguration<Type, Props>;
|
|
11
|
+
readonly errors: FieldInstance<Type, Props>['errors'];
|
|
12
|
+
readonly errorsTarget?: FieldInstance<Type, Props>['errorsTarget'];
|
|
13
|
+
readonly form: FieldInstance<Type, Props>['form'];
|
|
14
|
+
readonly formattedErrors: FieldInstance<Type, Props>['formattedErrors'];
|
|
15
|
+
readonly hooks: FieldInstance<Type, Props>['hooks'];
|
|
16
|
+
readonly isDirty: FieldInstance<Type, Props>['isDirty'];
|
|
17
|
+
readonly isDisabled: FieldInstance<Type, Props>['isDisabled'];
|
|
18
|
+
readonly isOptional: FieldInstance<Type, Props>['isOptional'];
|
|
19
|
+
readonly isReadOnly: FieldInstance<Type, Props>['isReadOnly'];
|
|
20
|
+
readonly isSuspended: FieldInstance<Type, Props>['isSuspended'];
|
|
21
|
+
readonly isTouched: FieldInstance<Type, Props>['isTouched'];
|
|
22
|
+
readonly isValid: FieldInstance<Type, Props>['isValid'];
|
|
23
|
+
readonly isVisible: FieldInstance<Props>['isVisible'];
|
|
24
|
+
readonly label?: FieldInstance<Type, Props>['label'];
|
|
25
|
+
readonly lazy: FieldInstance<Type, Props>['lazy'];
|
|
26
|
+
readonly name: FieldInstance<Type, Props>['name'];
|
|
27
|
+
readonly props: FieldInstance<Type, Props>['props'];
|
|
28
|
+
readonly ref: FieldInstance<Type, Props>['ref'];
|
|
29
|
+
readonly validators: FieldInstance<Type, Props>['validators'];
|
|
30
|
+
readonly wrapper: FieldInstance<Type, Props>['wrapper'];
|
|
31
|
+
protected readonly destroyHandles: Ref<(() => void)[]>;
|
|
32
|
+
protected readonly initialValue: Type;
|
|
33
|
+
constructor(form: FormInstance, config: ToRecord<FieldConfiguration<Type, Props>>);
|
|
34
|
+
addError(error: string): void;
|
|
35
|
+
blur: () => Promise<void>;
|
|
36
|
+
destroy(): Promise<void>;
|
|
37
|
+
focus: FieldConfiguration<Type, Props>['focus'];
|
|
38
|
+
reset: () => void;
|
|
39
|
+
resetValidation(): void;
|
|
40
|
+
setDisabled(value: boolean): void;
|
|
41
|
+
setInvalid(): void;
|
|
42
|
+
setOptional(value: boolean): void;
|
|
43
|
+
setReadOnly(value: boolean): void;
|
|
44
|
+
setValue(value: Type): void;
|
|
45
|
+
setVisible(value: boolean): void;
|
|
46
|
+
validate: () => Promise<boolean>;
|
|
47
|
+
private createValidators;
|
|
48
|
+
private initializeWatchers;
|
|
49
|
+
private setErrors;
|
|
50
|
+
private setIsDirty;
|
|
51
|
+
private setIsSuspended;
|
|
52
|
+
private setIsTouched;
|
|
53
|
+
private setValid;
|
|
54
|
+
private setValidators;
|
|
55
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { StringKey } from '../types/utils.types';
|
|
3
|
+
import { FormInstance, FormValues, InstanceFormConfiguration } from '../types/form.types';
|
|
4
|
+
import { FieldConfiguration, FieldInstance } from '../types/field.types';
|
|
5
|
+
import { ToRecord } from '../types/common.types';
|
|
6
|
+
|
|
7
|
+
export declare class Form<Values extends FormValues = FormValues> {
|
|
8
|
+
readonly config: FormInstance<Values>['config'];
|
|
9
|
+
readonly fields: FormInstance<Values>['fields'];
|
|
10
|
+
readonly hooks: FormInstance<Values>['hooks'];
|
|
11
|
+
readonly isDirty: FormInstance<Values>['isDirty'];
|
|
12
|
+
readonly isValid: FormInstance<Values>['isValid'];
|
|
13
|
+
readonly model: import('../types/form.types').FieldsToModel<Values>;
|
|
14
|
+
readonly name: FormInstance<Values>['name'];
|
|
15
|
+
readonly off: FormInstance<Values>['off'];
|
|
16
|
+
readonly on: FormInstance<Values>['on'];
|
|
17
|
+
readonly values: FormInstance<Values>['values'];
|
|
18
|
+
protected readonly stopHandles: Ref<(() => void)[]>;
|
|
19
|
+
private getFieldMemoized;
|
|
20
|
+
destroy(): Promise<void>;
|
|
21
|
+
constructor(name: FormInstance<Values>['name'], formConfig: ToRecord<InstanceFormConfiguration<Values>>);
|
|
22
|
+
addElement<EC extends FieldConfiguration = FieldConfiguration, S extends string | undefined = undefined>(element: EC): Promise<S extends string ? undefined | FieldInstance : FieldInstance>;
|
|
23
|
+
getField<F extends FieldInstance | null = FieldInstance | null>(name: string): F;
|
|
24
|
+
/** @deprecated use computed values */
|
|
25
|
+
getValue<T = unknown>(fieldName: string): T;
|
|
26
|
+
/** @deprecated use computed values */
|
|
27
|
+
getValues(): Values;
|
|
28
|
+
reset(): Promise<void>;
|
|
29
|
+
setValue<Type = unknown, Key extends StringKey<Values> | string = StringKey<Values>>(fieldName: Key, value: Key extends keyof Values ? Values[Key] : Type): void;
|
|
30
|
+
setValues<T extends FormValues = Values>(values: T): void;
|
|
31
|
+
submit(): Promise<void>;
|
|
32
|
+
validate(): Promise<void>;
|
|
33
|
+
removeElement(name: string): void;
|
|
34
|
+
protected ensureGetField<I extends FieldInstance>(name: string): I;
|
|
35
|
+
private addFieldInstance;
|
|
36
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ReadonlyOr, ResolvePromise } from '@myparcel-dev/ts-utils';
|
|
2
|
+
import { CustomHookItem, HookCallback, HookManagerConfiguration } from '../types/hooks.types';
|
|
3
|
+
|
|
4
|
+
type GetParameters<T> = T extends (...args: any[]) => any ? Parameters<T> : any[];
|
|
5
|
+
type GetReturnType<T> = ResolvePromise<T extends (...args: any[]) => any ? ReturnType<T> : Promise<any>>;
|
|
6
|
+
export type HookUnregisterHandler = () => void;
|
|
7
|
+
export type HookManagerInstance<HC extends HookManagerConfiguration = HookManagerConfiguration, HN extends string = string> = {
|
|
8
|
+
execute<N extends HN>(name: N, ...args: any[]): Promise<GetReturnType<HC[N]>>;
|
|
9
|
+
getAvailableHooks(): ReadonlyOr<HN[]>;
|
|
10
|
+
getRegisteredHooks(): CustomHookItem[];
|
|
11
|
+
has(name: HN, predicate?: (hook: CustomHookItem) => boolean): boolean;
|
|
12
|
+
register(name: HN, callback: HookCallback): HookUnregisterHandler;
|
|
13
|
+
unregister(name: HN, callback?: HookCallback): void;
|
|
14
|
+
};
|
|
15
|
+
export declare class HookManager<HC extends HookManagerConfiguration = HookManagerConfiguration, HN extends string = string> {
|
|
16
|
+
protected readonly availableHooks: ReadonlyOr<(HN | string)[]>;
|
|
17
|
+
protected readonly registeredHooks: CustomHookItem[];
|
|
18
|
+
constructor(config: HC);
|
|
19
|
+
getAvailableHooks(): ReadonlyOr<string[]>;
|
|
20
|
+
getRegisteredHooks(): CustomHookItem[];
|
|
21
|
+
execute<N extends HN>(name: N, ...args: GetParameters<HC[N]>): Promise<GetReturnType<HC[N]>>;
|
|
22
|
+
has(name: HN | string, predicate?: (hook: CustomHookItem) => boolean): boolean;
|
|
23
|
+
register(name: HN | string, callback: HookCallback): HookUnregisterHandler;
|
|
24
|
+
unregister(name: HN | string, callback?: HookCallback): void;
|
|
25
|
+
private callbackMatches;
|
|
26
|
+
}
|
|
27
|
+
export {};
|