@schemx/vue 0.2.2 → 0.2.4-beta.20260716174917.f6b485a
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 +61 -49
- package/dist/analyze.html +1 -1
- package/dist/components/FormGroup/index.d.ts +0 -1
- package/dist/components/FormGroup/index.d.ts.map +1 -1
- package/dist/components/FormItem/index.d.ts +0 -1
- package/dist/form.d.ts +0 -1
- package/dist/hocs/withRemoteOptions.d.ts +0 -1
- package/dist/hooks/provideFieldContext.d.ts +0 -1
- package/dist/hooks/provideFormConfigContext.d.ts +15 -1
- package/dist/hooks/provideFormConfigContext.d.ts.map +1 -1
- package/dist/hooks/provideFormContext.d.ts +0 -1
- package/dist/hooks/useDictionary.d.ts +8 -3
- package/dist/hooks/useDictionary.d.ts.map +1 -1
- package/dist/hooks/useEffect.d.ts +0 -1
- package/dist/hooks/useField.d.ts +0 -1
- package/dist/hooks/useForm.d.ts +0 -1
- package/dist/hooks/useStableRef.d.ts +0 -1
- package/dist/hooks/useViewSchemas.d.ts +14 -1
- package/dist/hooks/useViewSchemas.d.ts.map +1 -1
- package/dist/hooks/useWatch.d.ts +52 -7
- package/dist/hooks/useWatch.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.mjs +80 -28
- package/dist/index.mjs.map +1 -1
- package/dist/types/dictionary.d.ts +0 -1
- package/dist/types/field.d.ts +0 -1
- package/dist/types/form.d.ts +0 -1
- package/dist/types/index.d.ts +15 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/dynamic.d.ts +0 -1
- package/dist/utils/helpers.d.ts +4 -5
- package/dist/utils/helpers.d.ts.map +1 -1
- package/dist/utils/rendererProvider.d.ts +0 -1
- package/dist/utils/rulesProvider.d.ts +0 -1
- package/dist/utils/validation.d.ts +0 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -86,17 +86,17 @@ console.log(Schemx === schemxForm) // true
|
|
|
86
86
|
| `rendererRegistry` | `RendererRegistryType` | 全局 `rendererRegistry` | 当前表单使用的 Renderer Registry |
|
|
87
87
|
| `defaultRendererType` | `string` | `undefined` | 类型上用于设置默认 Renderer;当前 Vue 创建路径总会传入 Registry,因此该 Prop 实际不会设置 Registry 的默认类型,见下文 |
|
|
88
88
|
| `validatorRegistry` | `ValidatorsRegistryType` | 全局 `validatorRegistry` | 当前表单使用的校验规则 Registry |
|
|
89
|
-
| `required` | `boolean` | `undefined` |
|
|
90
|
-
| `readonly` | `boolean` | `undefined` |
|
|
91
|
-
| `disabled` | `boolean` | `undefined` |
|
|
92
|
-
| `visible` | `boolean` | `undefined` |
|
|
93
|
-
| `labelIcon` | `string` | `undefined` |
|
|
94
|
-
| `labelAlign` | `"left" \| "center" \| "right"` | `undefined` |
|
|
95
|
-
| `labelPosition` | `"left" \| "top" \| "right"` | `undefined` |
|
|
96
|
-
| `labelWidth` | `string` | `undefined` |
|
|
97
|
-
| `contentAlign` | `"left" \| "center" \| "right"` | `undefined` |
|
|
98
|
-
| `validationTrigger` | `ValidationTrigger \| ValidationTrigger[]` | `undefined` |
|
|
99
|
-
| `colon` | `boolean` | `undefined` |
|
|
89
|
+
| `required` | `boolean` | `undefined` | 字段未显式配置且没有非空 `rules` 时作为默认值;存在规则时优先推导为 `true` |
|
|
90
|
+
| `readonly` | `boolean` | `undefined` | 表单级只读默认值;字段自身配置优先 |
|
|
91
|
+
| `disabled` | `boolean` | `undefined` | 表单级禁用默认值;字段自身配置优先 |
|
|
92
|
+
| `visible` | `boolean` | `undefined` | 表单级可见性默认值;字段自身配置优先,均未配置时为 `true` |
|
|
93
|
+
| `labelIcon` | `string` | `undefined` | 表单级标签图标默认值;会进入字段 ViewSchema,具体是否渲染取决于适配组件 |
|
|
94
|
+
| `labelAlign` | `"left" \| "center" \| "right"` | `undefined` | 表单级标签对齐默认值;字段自身配置优先,均未配置时为 `"left"` |
|
|
95
|
+
| `labelPosition` | `"left" \| "top" \| "right"` | `undefined` | 表单级标签位置默认值;字段自身配置优先,均未配置时为 `"left"` |
|
|
96
|
+
| `labelWidth` | `string` | `undefined` | 表单级标签宽度默认值;字段自身配置优先,均未配置时为 `"auto"` |
|
|
97
|
+
| `contentAlign` | `"left" \| "center" \| "right"` | `undefined` | 表单级内容对齐默认值;用于解析 Renderer 的 `align`,字段自身配置优先 |
|
|
98
|
+
| `validationTrigger` | `ValidationTrigger \| ValidationTrigger[]` | `undefined` | 表单级校验触发方式默认值;字段自身配置优先,均未配置时为 `"blur"` |
|
|
99
|
+
| `colon` | `boolean` | `undefined` | 表单级标签冒号默认值;字段自身配置优先,均未配置时为 `true` |
|
|
100
100
|
| `onFinish` | `(values: Readonly<T>) => void \| Promise<void>` | `undefined` | `submit()` 校验通过后的回调 Prop |
|
|
101
101
|
| `onFinishFailed` | `(error: ValidateError<T>) => void` | `undefined` | `submit()` 校验失败后的回调 Prop |
|
|
102
102
|
| `onValuesChange` | `(changedValues, latestSnapshot) => void` | `undefined` | 字段值变化后的回调 Prop |
|
|
@@ -104,7 +104,7 @@ console.log(Schemx === schemxForm) // true
|
|
|
104
104
|
| `class` | `string` | `""` | 添加到根 `.schemx` 元素的类名 |
|
|
105
105
|
| `style` | `CSS.Properties` | `{}` | 类型已声明,但当前根元素没有绑定该值;不要依赖它产生内联样式 |
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
上述默认配置都会参与 core 的字段规范化,通常按字段配置 → 表单 Prop → core 固定默认值合并。`required` 是例外:字段未显式配置时,非空 `rules` 会先将其推导为 `true`,再回退到表单 Prop 和固定默认值。传入 `form` 时,`initialValues`、Registry 和所有表单回调都由外部实例的创建者配置;组件不会用同名 Props 重建或包装外部实例。
|
|
108
108
|
|
|
109
109
|
当前 `useForm()` 总会把显式传入的 `rendererRegistry` 或 Vue 包的全局 `rendererRegistry` 传给 core。core 只有在没有 Registry 时才用 `defaultRendererType` 创建新 Registry,因此 `<Schemx :default-renderer-type="...">` 和 Vue `useForm({ defaultRendererType: ... })` 中的该值当前实际被忽略。需要默认回退类型时,请创建已经设置默认类型的独立 Registry,例如 `createRendererRegistry("input")`,再通过 `rendererRegistry` 传入;外部 `form` 则应在创建实例时完成配置。
|
|
110
110
|
|
|
@@ -251,32 +251,34 @@ const schemas: SchemxField<Values>[] = [
|
|
|
251
251
|
|
|
252
252
|
普通字段的真实字段如下:
|
|
253
253
|
|
|
254
|
-
| 字段 | 必填 | 说明
|
|
255
|
-
| -------------------------------------------------------- | ---- |
|
|
256
|
-
| `name` | 是 | 字段路径,支持字符串和路径数组
|
|
257
|
-
| `label` | 是 | 标签文本
|
|
258
|
-
| `componentType` | 是 | Registry 中的 Renderer key
|
|
259
|
-
| `dependencies` | 否 | 基于其他字段动态覆盖展示属性的结构化依赖配置
|
|
260
|
-
| `componentProps` | 否 | 透传给 Renderer 的专属 Props;框架注入项会覆盖同名值
|
|
261
|
-
| `placeholder` | 否 | 占位提示
|
|
262
|
-
| `required`、`readonly`、`disabled`、`visible` | 否 | 字段展示和交互状态
|
|
263
|
-
| `initialValue` | 否 | 字段挂载时的初始值和 `reset()` 还原值
|
|
264
|
-
| `rules` | 否 | 单条或多条校验规则,支持 Standard Schema 与内置规则名
|
|
265
|
-
| `labelIcon`、`labelAlign`、`labelPosition`、`labelWidth` | 否 | 标签展示配置
|
|
266
|
-
| `contentAlign`、`colon` | 否 | 内容对齐和冒号配置
|
|
267
|
-
| `validationTrigger` | 否 | `change`、`blur` 等校验触发时机
|
|
268
|
-
| `onChange`、`onBlur` | 否 | 类型中存在的顶层回调;当前 Vue `FormItem` 不调用它们,Renderer 事件说明见后文
|
|
269
|
-
| `class`、`style` | 否 | Vue
|
|
270
|
-
| `key` | 否 | 框架字段;业务方通常不要设置
|
|
254
|
+
| 字段 | 必填 | 说明 |
|
|
255
|
+
| -------------------------------------------------------- | ---- | -------------------------------------------------------------------------------------------------------- |
|
|
256
|
+
| `name` | 是 | 字段路径,支持字符串和路径数组 |
|
|
257
|
+
| `label` | 是 | 标签文本 |
|
|
258
|
+
| `componentType` | 是 | Registry 中的 Renderer key |
|
|
259
|
+
| `dependencies` | 否 | 基于其他字段动态覆盖展示属性的结构化依赖配置 |
|
|
260
|
+
| `componentProps` | 否 | 透传给 Renderer 的专属 Props;框架注入项会覆盖同名值 |
|
|
261
|
+
| `placeholder` | 否 | 占位提示 |
|
|
262
|
+
| `required`、`readonly`、`disabled`、`visible` | 否 | 字段展示和交互状态 |
|
|
263
|
+
| `initialValue` | 否 | 字段挂载时的初始值和 `reset()` 还原值 |
|
|
264
|
+
| `rules` | 否 | 单条或多条校验规则,支持 Standard Schema 与内置规则名 |
|
|
265
|
+
| `labelIcon`、`labelAlign`、`labelPosition`、`labelWidth` | 否 | 标签展示配置 |
|
|
266
|
+
| `contentAlign`、`colon` | 否 | 内容对齐和冒号配置 |
|
|
267
|
+
| `validationTrigger` | 否 | `change`、`blur` 等校验触发时机 |
|
|
268
|
+
| `onChange`、`onBlur` | 否 | 类型中存在的顶层回调;当前 Vue `FormItem` 不调用它们,Renderer 事件说明见后文 |
|
|
269
|
+
| `class`、`style` | 否 | Vue 通过声明合并增加,运行时分别应用到字段容器的 class 和内联 style,发布根声明会自动带入该 augmentation |
|
|
270
|
+
| `key` | 否 | 框架字段;业务方通常不要设置 |
|
|
271
271
|
|
|
272
272
|
### 分组
|
|
273
273
|
|
|
274
274
|
```ts
|
|
275
275
|
const group: SchemxField<Values> = {
|
|
276
|
-
|
|
276
|
+
key: "basic-info",
|
|
277
277
|
label: "基本信息",
|
|
278
|
+
readonly: false,
|
|
278
279
|
collapsible: true,
|
|
279
280
|
defaultCollapsed: false,
|
|
281
|
+
destroyOnCollapse: false,
|
|
280
282
|
children: [
|
|
281
283
|
{
|
|
282
284
|
name: "nickname",
|
|
@@ -287,14 +289,19 @@ const group: SchemxField<Values> = {
|
|
|
287
289
|
}
|
|
288
290
|
```
|
|
289
291
|
|
|
290
|
-
|
|
292
|
+
分组字段支持 `visible`、`readonly`、`disabled` 和容器 `dependencies`。状态会递归传递给嵌套 Group、Dependency 和普通字段。它不是普通字段,没有 `name`、`componentProps` 或字段值。
|
|
293
|
+
|
|
294
|
+
折叠支持受控 `collapsed`、非受控 `defaultCollapsed`、`onCollapsedChange` 和 `destroyOnCollapse`。`destroyOnCollapse=false` 时仅隐藏 Body 并保留后代 Renderer 实例;默认值 `true` 保持原有卸载行为。折叠只影响展示,不改变字段可见性或校验状态。
|
|
291
295
|
|
|
292
296
|
### 动态依赖子树
|
|
293
297
|
|
|
294
298
|
```ts
|
|
295
299
|
const dependency: SchemxField<Values> = {
|
|
296
|
-
componentType: "dependency",
|
|
297
300
|
to: ["nickname"],
|
|
301
|
+
dependencies: {
|
|
302
|
+
triggerFields: ["editable"],
|
|
303
|
+
readonly: (values) => !values.editable,
|
|
304
|
+
},
|
|
298
305
|
renderer: async (values, form, { abortSignal }) => {
|
|
299
306
|
if (!values.nickname || abortSignal.aborted) return []
|
|
300
307
|
|
|
@@ -309,7 +316,9 @@ const dependency: SchemxField<Values> = {
|
|
|
309
316
|
}
|
|
310
317
|
```
|
|
311
318
|
|
|
312
|
-
|
|
319
|
+
动态依赖节点还支持 `visible`、`readonly`、`disabled` 和容器 `dependencies`。`to` 与 `renderer` 负责动态子树结构,容器 `dependencies` 独立控制整棵子树的呈现状态。隐藏 Dependency 不会暂停 renderer,恢复可见后会展示最新子树。
|
|
320
|
+
|
|
321
|
+
`renderer` 可以同步或异步返回新的 `SchemxField<T>[]`;`context.abortSignal` 用于取消已经过期的异步依赖计算。该 `AbortSignal` 属于 Core 的 Dependency renderer,和后文 `useDictionary` 的请求行为不同。
|
|
313
322
|
|
|
314
323
|
## Dictionary
|
|
315
324
|
|
|
@@ -331,19 +340,19 @@ interface SchemxDictionary<T extends Values = Values, R = any> {
|
|
|
331
340
|
}
|
|
332
341
|
```
|
|
333
342
|
|
|
334
|
-
| 字段 | 默认值 | 真实行为
|
|
335
|
-
| ------------------- | ------------------- |
|
|
336
|
-
| `api` | 必填 | 接收加载开始时的完整表单快照和实例;支持同步或异步返回
|
|
337
|
-
| `formatter` | 直接使用 `api` 结果 | 在请求成功后转换结果;支持异步,返回值应为数组
|
|
338
|
-
| `dependsOn` | `undefined` | 通过 `useWatchFields` 监听这些字段;变化时执行依赖回调、可选重置和重新加载
|
|
339
|
-
| `shouldFetch` | 总是加载 | 每次加载前判断;返回 `false` 时跳过 `api`、清空 `list` 并结束加载状态
|
|
340
|
-
| `immediate` | `true` | 组件 `onMounted` 时是否自动调用一次 `loadDict()`;不影响依赖变化或手动刷新
|
|
343
|
+
| 字段 | 默认值 | 真实行为 |
|
|
344
|
+
| ------------------- | ------------------- | -------------------------------------------------------------------------------------------------- |
|
|
345
|
+
| `api` | 必填 | 接收加载开始时的完整表单快照和实例;支持同步或异步返回 |
|
|
346
|
+
| `formatter` | 直接使用 `api` 结果 | 在请求成功后转换结果;支持异步,返回值应为数组 |
|
|
347
|
+
| `dependsOn` | `undefined` | 通过 `useWatchFields` 监听这些字段;变化时执行依赖回调、可选重置和重新加载 |
|
|
348
|
+
| `shouldFetch` | 总是加载 | 每次加载前判断;返回 `false` 时跳过 `api`、清空 `list` 并结束加载状态 |
|
|
349
|
+
| `immediate` | `true` | 组件 `onMounted` 时是否自动调用一次 `loadDict()`;不影响依赖变化或手动刷新 |
|
|
341
350
|
| `resetOnDepsChange` | `false` | 依赖变化时,如果 `useDictionary` 收到目标字段路径,调用 `form.setFieldValue(fieldName, undefined)` |
|
|
342
|
-
| `retryCount` | `0` | 失败后的额外重试次数;总尝试次数为 `retryCount + 1`
|
|
343
|
-
| `retryInterval` | `1000` | 两次尝试之间等待的毫秒数
|
|
344
|
-
| `onError` | 无 | 最终失败后接收规范化的 `Error` 和表单实例
|
|
345
|
-
| `onSuccess` | 无 | `formatter` 完成、`list` 写入后接收最终数组和表单实例
|
|
346
|
-
| `onDepsChange` | 无 | 依赖变化后、`shouldFetch` 判断前调用
|
|
351
|
+
| `retryCount` | `0` | 失败后的额外重试次数;总尝试次数为 `retryCount + 1` |
|
|
352
|
+
| `retryInterval` | `1000` | 两次尝试之间等待的毫秒数 |
|
|
353
|
+
| `onError` | 无 | 最终失败后接收规范化的 `Error` 和表单实例 |
|
|
354
|
+
| `onSuccess` | 无 | `formatter` 完成、`list` 写入后接收最终数组和表单实例 |
|
|
355
|
+
| `onDepsChange` | 无 | 依赖变化后、`shouldFetch` 判断前调用 |
|
|
347
356
|
|
|
348
357
|
当前类型没有 `data`、`list` 或 `options` 形式的静态数组字段。同步 `api` 可以表达静态来源:
|
|
349
358
|
|
|
@@ -946,7 +955,9 @@ console.log(viewSchemas.value)
|
|
|
946
955
|
| -------- | -------------------------- | --------------------------------------- |
|
|
947
956
|
| `schema` | `SchemxViewGroupSchema<T>` | 包含已解析 `children` 的分组 ViewSchema |
|
|
948
957
|
|
|
949
|
-
它会把收到的全部 Slots 原样传给子级 `FormItem`。`collapsible`
|
|
958
|
+
它会把收到的全部 Slots 原样传给子级 `FormItem`。`collapsible` 控制标题是否可点击和通过 Enter / Space 切换;`disabled` 状态禁止折叠交互,`readonly` 状态仍允许浏览和折叠。组件支持受控与非受控折叠;从受控切换为非受控时会延续最后一次受控值。`destroyOnCollapse` 控制子级是否卸载,ARIA 关联 ID 优先使用 Core RuntimeNode ID,直接挂载组件时回退到 Vue 实例 ID,避免规范化后相同 key 发生冲突。
|
|
959
|
+
|
|
960
|
+
`label` 为空时不渲染标题。Vue 源码的 `types/index.ts` 通过声明合并为分组 Schema 增加 `class` 和 `style`,发布声明入口会加载该增强;运行时将二者分别绑定到 `.schemx-group` 根元素。子级字段仍要求表单实例和展示配置上下文。
|
|
950
961
|
|
|
951
962
|
`FormItem` 和 `FormGroup` 是构建自定义 Vue adapter 或重排 ViewSchemas 时的底层组件。一般业务表单优先使用 `<Schemx>`;只有在需要自定义整体布局、分区或容器时才直接组合这两个组件。
|
|
952
963
|
|
|
@@ -1012,11 +1023,11 @@ Vue 根入口自有 5 个公开类型:
|
|
|
1012
1023
|
|
|
1013
1024
|
## Core API
|
|
1014
1025
|
|
|
1015
|
-
`@schemx/vue` 通过 `export * from "@schemx/core"` 完整传递 Core 的
|
|
1026
|
+
`@schemx/vue` 通过 `export * from "@schemx/core"` 完整传递 Core 的 82 个命名导出(20 个运行时值 + 62 个类型)。它们仍是 Core API,不是 Vue 自有 Composition API。签名与语义见 [Core README](../core),导出基线见 [Core 完整导出清单](../core#完整导出清单)。下节仍逐项列出名称,以便机械核对 Vue 根入口。
|
|
1016
1027
|
|
|
1017
1028
|
## 完整导出清单
|
|
1018
1029
|
|
|
1019
|
-
当前根入口共有
|
|
1030
|
+
当前根入口共有 110 项导出:109 个命名导出和 `default`。命名导出由 42 个运行时值与 67 个类型组成;若工具把 `default` 归入值,则显示为 43 个值 + 67 个类型。按来源是 Vue 自有 22 个命名运行时值 + 5 个类型 + `default`,以及 Core 传递的 82 个命名导出。
|
|
1020
1031
|
|
|
1021
1032
|
### Vue 自有导出
|
|
1022
1033
|
|
|
@@ -1078,7 +1089,7 @@ Vue 根入口自有 5 个公开类型:
|
|
|
1078
1089
|
| 路径 | `setByPath` | 写入嵌套路径。 |
|
|
1079
1090
|
| 路径 | `collectObjectPathsByLeaf` | 收集叶子路径。 |
|
|
1080
1091
|
|
|
1081
|
-
### Core 传递类型(
|
|
1092
|
+
### Core 传递类型(62 个)
|
|
1082
1093
|
|
|
1083
1094
|
| 分类 | 导出 | 用途 |
|
|
1084
1095
|
| ------------------ | ------------------------------- | ----------------------------------- |
|
|
@@ -1117,6 +1128,7 @@ Vue 根入口自有 5 个公开类型:
|
|
|
1117
1128
|
| 扩展 | `SchemxFieldDefinition` | 普通字段声明合并接口。 |
|
|
1118
1129
|
| 扩展 | `SchemxGroupFieldDefinition` | Group 声明合并接口。 |
|
|
1119
1130
|
| 依赖 | `SchemxDependencies` | 字段动态依赖配置。 |
|
|
1131
|
+
| 依赖 | `SchemxContainerDependencies` | Group/Dependency 容器动态状态配置。 |
|
|
1120
1132
|
| 依赖 | `SchemxConditionFn` | 动态属性条件函数。 |
|
|
1121
1133
|
| 依赖 | `SchemxDependenciesStaticProps` | 依赖函数静态返回值映射。 |
|
|
1122
1134
|
| ViewSchema | `SchemxViewDebugMeta` | ViewSchema 诊断元数据。 |
|
package/dist/analyze.html
CHANGED
|
@@ -4929,7 +4929,7 @@ var drawChart = (function (exports) {
|
|
|
4929
4929
|
</script>
|
|
4930
4930
|
<script>
|
|
4931
4931
|
/*<!--*/
|
|
4932
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.cjs","children":[{"name":"src","children":[{"name":"styles/index.css","uid":"abc5935a-1"},{"name":"utils","children":[{"uid":"abc5935a-3","name":"rendererProvider.ts"},{"uid":"abc5935a-5","name":"rulesProvider.ts"},{"uid":"abc5935a-23","name":"equal.ts"},{"uid":"abc5935a-29","name":"validation.ts"},{"uid":"abc5935a-31","name":"slot.ts"},{"uid":"abc5935a-37","name":"helpers.ts"}]},{"name":"hooks","children":[{"uid":"abc5935a-7","name":"useForm.ts"},{"uid":"abc5935a-9","name":"provideFormContext.ts"},{"uid":"abc5935a-11","name":"useField.ts"},{"uid":"abc5935a-13","name":"provideFieldContext.ts"},{"uid":"abc5935a-15","name":"useWatch.ts"},{"uid":"abc5935a-17","name":"useEffect.ts"},{"uid":"abc5935a-19","name":"useDictionary.ts"},{"uid":"abc5935a-21","name":"provideFormConfigContext.ts"},{"uid":"abc5935a-25","name":"useStableRef.ts"},{"uid":"abc5935a-27","name":"useViewSchemas.ts"}]},{"name":"components","children":[{"name":"FormGroup/index.tsx","uid":"abc5935a-33"},{"name":"FormItem/index.tsx","uid":"abc5935a-35"}]},{"uid":"abc5935a-39","name":"form.vue?vue&type=script&setup=true&lang.ts"},{"uid":"abc5935a-41","name":"form.ts"},{"name":"hocs/withRemoteOptions.ts","uid":"abc5935a-43"},{"uid":"abc5935a-45","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"abc5935a-1":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"abc5935a-0"},"abc5935a-3":{"renderedLength":62,"gzipLength":69,"brotliLength":49,"metaUid":"abc5935a-2"},"abc5935a-5":{"renderedLength":58,"gzipLength":65,"brotliLength":49,"metaUid":"abc5935a-4"},"abc5935a-7":{"renderedLength":348,"gzipLength":194,"brotliLength":159,"metaUid":"abc5935a-6"},"abc5935a-9":{"renderedLength":468,"gzipLength":280,"brotliLength":223,"metaUid":"abc5935a-8"},"abc5935a-11":{"renderedLength":1593,"gzipLength":561,"brotliLength":491,"metaUid":"abc5935a-10"},"abc5935a-13":{"renderedLength":410,"gzipLength":249,"brotliLength":198,"metaUid":"abc5935a-12"},"abc5935a-15":{"renderedLength":551,"gzipLength":219,"brotliLength":186,"metaUid":"abc5935a-14"},"abc5935a-17":{"renderedLength":125,"gzipLength":112,"brotliLength":90,"metaUid":"abc5935a-16"},"abc5935a-19":{"renderedLength":2696,"gzipLength":878,"brotliLength":752,"metaUid":"abc5935a-18"},"abc5935a-21":{"renderedLength":686,"gzipLength":371,"brotliLength":314,"metaUid":"abc5935a-20"},"abc5935a-23":{"renderedLength":202,"gzipLength":154,"brotliLength":120,"metaUid":"abc5935a-22"},"abc5935a-25":{"renderedLength":240,"gzipLength":168,"brotliLength":143,"metaUid":"abc5935a-24"},"abc5935a-27":{"renderedLength":261,"gzipLength":162,"brotliLength":143,"metaUid":"abc5935a-26"},"abc5935a-29":{"renderedLength":768,"gzipLength":322,"brotliLength":262,"metaUid":"abc5935a-28"},"abc5935a-31":{"renderedLength":1262,"gzipLength":486,"brotliLength":401,"metaUid":"abc5935a-30"},"abc5935a-33":{"renderedLength":1878,"gzipLength":806,"brotliLength":656,"metaUid":"abc5935a-32"},"abc5935a-35":{"renderedLength":7378,"gzipLength":2416,"brotliLength":1981,"metaUid":"abc5935a-34"},"abc5935a-37":{"renderedLength":976,"gzipLength":385,"brotliLength":326,"metaUid":"abc5935a-36"},"abc5935a-39":{"renderedLength":4079,"gzipLength":1328,"brotliLength":1163,"metaUid":"abc5935a-38"},"abc5935a-41":{"renderedLength":281,"gzipLength":228,"brotliLength":174,"metaUid":"abc5935a-40"},"abc5935a-43":{"renderedLength":923,"gzipLength":408,"brotliLength":349,"metaUid":"abc5935a-42"},"abc5935a-45":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"abc5935a-44"}},"nodeMetas":{"abc5935a-0":{"id":"/src/styles/index.css","moduleParts":{"index.cjs":"abc5935a-1"},"imported":[],"importedBy":[{"uid":"abc5935a-44"},{"uid":"abc5935a-38"}]},"abc5935a-2":{"id":"/src/utils/rendererProvider.ts","moduleParts":{"index.cjs":"abc5935a-3"},"imported":[{"uid":"abc5935a-48"}],"importedBy":[{"uid":"abc5935a-44"},{"uid":"abc5935a-6"}]},"abc5935a-4":{"id":"/src/utils/rulesProvider.ts","moduleParts":{"index.cjs":"abc5935a-5"},"imported":[{"uid":"abc5935a-48"}],"importedBy":[{"uid":"abc5935a-44"},{"uid":"abc5935a-6"}]},"abc5935a-6":{"id":"/src/hooks/useForm.ts","moduleParts":{"index.cjs":"abc5935a-7"},"imported":[{"uid":"abc5935a-51"},{"uid":"abc5935a-48"},{"uid":"abc5935a-2"},{"uid":"abc5935a-4"}],"importedBy":[{"uid":"abc5935a-46"}]},"abc5935a-8":{"id":"/src/hooks/provideFormContext.ts","moduleParts":{"index.cjs":"abc5935a-9"},"imported":[{"uid":"abc5935a-51"}],"importedBy":[{"uid":"abc5935a-46"},{"uid":"abc5935a-10"},{"uid":"abc5935a-14"},{"uid":"abc5935a-18"}]},"abc5935a-10":{"id":"/src/hooks/useField.ts","moduleParts":{"index.cjs":"abc5935a-11"},"imported":[{"uid":"abc5935a-51"},{"uid":"abc5935a-48"},{"uid":"abc5935a-8"}],"importedBy":[{"uid":"abc5935a-46"}]},"abc5935a-12":{"id":"/src/hooks/provideFieldContext.ts","moduleParts":{"index.cjs":"abc5935a-13"},"imported":[{"uid":"abc5935a-51"}],"importedBy":[{"uid":"abc5935a-46"},{"uid":"abc5935a-42"}]},"abc5935a-14":{"id":"/src/hooks/useWatch.ts","moduleParts":{"index.cjs":"abc5935a-15"},"imported":[{"uid":"abc5935a-51"},{"uid":"abc5935a-48"},{"uid":"abc5935a-8"}],"importedBy":[{"uid":"abc5935a-46"},{"uid":"abc5935a-18"}]},"abc5935a-16":{"id":"/src/hooks/useEffect.ts","moduleParts":{"index.cjs":"abc5935a-17"},"imported":[{"uid":"abc5935a-51"},{"uid":"abc5935a-48"}],"importedBy":[{"uid":"abc5935a-46"}]},"abc5935a-18":{"id":"/src/hooks/useDictionary.ts","moduleParts":{"index.cjs":"abc5935a-19"},"imported":[{"uid":"abc5935a-51"},{"uid":"abc5935a-8"},{"uid":"abc5935a-14"}],"importedBy":[{"uid":"abc5935a-46"},{"uid":"abc5935a-42"}]},"abc5935a-20":{"id":"/src/hooks/provideFormConfigContext.ts","moduleParts":{"index.cjs":"abc5935a-21"},"imported":[{"uid":"abc5935a-51"}],"importedBy":[{"uid":"abc5935a-46"}]},"abc5935a-22":{"id":"/src/utils/equal.ts","moduleParts":{"index.cjs":"abc5935a-23"},"imported":[],"importedBy":[{"uid":"abc5935a-24"}]},"abc5935a-24":{"id":"/src/hooks/useStableRef.ts","moduleParts":{"index.cjs":"abc5935a-25"},"imported":[{"uid":"abc5935a-51"},{"uid":"abc5935a-22"}],"importedBy":[{"uid":"abc5935a-46"}]},"abc5935a-26":{"id":"/src/hooks/useViewSchemas.ts","moduleParts":{"index.cjs":"abc5935a-27"},"imported":[{"uid":"abc5935a-51"}],"importedBy":[{"uid":"abc5935a-46"}]},"abc5935a-28":{"id":"/src/utils/validation.ts","moduleParts":{"index.cjs":"abc5935a-29"},"imported":[],"importedBy":[{"uid":"abc5935a-53"}]},"abc5935a-30":{"id":"/src/utils/slot.ts","moduleParts":{"index.cjs":"abc5935a-31"},"imported":[],"importedBy":[{"uid":"abc5935a-53"}]},"abc5935a-32":{"id":"/src/components/FormGroup/index.tsx","moduleParts":{"index.cjs":"abc5935a-33"},"imported":[{"uid":"abc5935a-51"},{"uid":"abc5935a-52"},{"uid":"abc5935a-34"}],"importedBy":[{"uid":"abc5935a-44"},{"uid":"abc5935a-34"}]},"abc5935a-34":{"id":"/src/components/FormItem/index.tsx","moduleParts":{"index.cjs":"abc5935a-35"},"imported":[{"uid":"abc5935a-51"},{"uid":"abc5935a-52"},{"uid":"abc5935a-46"},{"uid":"abc5935a-53"},{"uid":"abc5935a-32"}],"importedBy":[{"uid":"abc5935a-44"},{"uid":"abc5935a-40"},{"uid":"abc5935a-32"},{"uid":"abc5935a-38"}]},"abc5935a-36":{"id":"/src/utils/helpers.ts","moduleParts":{"index.cjs":"abc5935a-37"},"imported":[],"importedBy":[{"uid":"abc5935a-38"}]},"abc5935a-38":{"id":"/src/form.vue?vue&type=script&setup=true&lang.ts","moduleParts":{"index.cjs":"abc5935a-39"},"imported":[{"uid":"abc5935a-51"},{"uid":"abc5935a-60"},{"uid":"abc5935a-48"},{"uid":"abc5935a-34"},{"uid":"abc5935a-46"},{"uid":"abc5935a-36"},{"uid":"abc5935a-0"}],"importedBy":[{"uid":"abc5935a-57"}]},"abc5935a-40":{"id":"/src/form.ts","moduleParts":{"index.cjs":"abc5935a-41"},"imported":[{"uid":"abc5935a-34"},{"uid":"abc5935a-50"}],"importedBy":[{"uid":"abc5935a-44"}]},"abc5935a-42":{"id":"/src/hocs/withRemoteOptions.ts","moduleParts":{"index.cjs":"abc5935a-43"},"imported":[{"uid":"abc5935a-51"},{"uid":"abc5935a-18"},{"uid":"abc5935a-12"}],"importedBy":[{"uid":"abc5935a-47"}]},"abc5935a-44":{"id":"/src/index.ts","moduleParts":{"index.cjs":"abc5935a-45"},"imported":[{"uid":"abc5935a-0"},{"uid":"abc5935a-40"},{"uid":"abc5935a-2"},{"uid":"abc5935a-4"},{"uid":"abc5935a-46"},{"uid":"abc5935a-47"},{"uid":"abc5935a-34"},{"uid":"abc5935a-32"},{"uid":"abc5935a-48"},{"uid":"abc5935a-49"}],"importedBy":[],"isEntry":true},"abc5935a-46":{"id":"/src/hooks/index.ts","moduleParts":{},"imported":[{"uid":"abc5935a-6"},{"uid":"abc5935a-8"},{"uid":"abc5935a-10"},{"uid":"abc5935a-12"},{"uid":"abc5935a-14"},{"uid":"abc5935a-16"},{"uid":"abc5935a-18"},{"uid":"abc5935a-20"},{"uid":"abc5935a-24"},{"uid":"abc5935a-26"}],"importedBy":[{"uid":"abc5935a-44"},{"uid":"abc5935a-34"},{"uid":"abc5935a-38"}]},"abc5935a-47":{"id":"/src/hocs/index.ts","moduleParts":{},"imported":[{"uid":"abc5935a-42"}],"importedBy":[{"uid":"abc5935a-44"}]},"abc5935a-48":{"id":"@schemx/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"abc5935a-44"},{"uid":"abc5935a-2"},{"uid":"abc5935a-4"},{"uid":"abc5935a-6"},{"uid":"abc5935a-10"},{"uid":"abc5935a-14"},{"uid":"abc5935a-16"},{"uid":"abc5935a-38"}],"isExternal":true},"abc5935a-49":{"id":"/src/types/index.ts","moduleParts":{},"imported":[{"uid":"abc5935a-54"},{"uid":"abc5935a-55"},{"uid":"abc5935a-56"}],"importedBy":[{"uid":"abc5935a-44"}]},"abc5935a-50":{"id":"/src/formRuntime.js","moduleParts":{},"imported":[{"uid":"abc5935a-57"}],"importedBy":[{"uid":"abc5935a-40"}]},"abc5935a-51":{"id":"vue","moduleParts":{},"imported":[],"importedBy":[{"uid":"abc5935a-34"},{"uid":"abc5935a-32"},{"uid":"abc5935a-6"},{"uid":"abc5935a-8"},{"uid":"abc5935a-10"},{"uid":"abc5935a-12"},{"uid":"abc5935a-14"},{"uid":"abc5935a-16"},{"uid":"abc5935a-18"},{"uid":"abc5935a-20"},{"uid":"abc5935a-24"},{"uid":"abc5935a-26"},{"uid":"abc5935a-42"},{"uid":"abc5935a-38"}],"isExternal":true},"abc5935a-52":{"id":"classnames","moduleParts":{},"imported":[],"importedBy":[{"uid":"abc5935a-34"},{"uid":"abc5935a-32"}],"isExternal":true},"abc5935a-53":{"id":"/src/utils/index.ts","moduleParts":{},"imported":[{"uid":"abc5935a-58"},{"uid":"abc5935a-28"},{"uid":"abc5935a-30"},{"uid":"abc5935a-59"}],"importedBy":[{"uid":"abc5935a-34"}]},"abc5935a-54":{"id":"/src/types/dictionary.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"abc5935a-49"}]},"abc5935a-55":{"id":"/src/types/form.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"abc5935a-49"}]},"abc5935a-56":{"id":"/src/types/field.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"abc5935a-49"}]},"abc5935a-57":{"id":"/src/form.vue","moduleParts":{},"imported":[{"uid":"abc5935a-38"}],"importedBy":[{"uid":"abc5935a-50"}]},"abc5935a-58":{"id":"/src/utils/dynamic.ts","moduleParts":{},"imported":[{"uid":"abc5935a-60"}],"importedBy":[{"uid":"abc5935a-53"}]},"abc5935a-59":{"id":"/src/utils/diff.ts","moduleParts":{},"imported":[{"uid":"abc5935a-61"}],"importedBy":[{"uid":"abc5935a-53"}]},"abc5935a-60":{"id":"es-toolkit","moduleParts":{},"imported":[],"importedBy":[{"uid":"abc5935a-58"},{"uid":"abc5935a-38"}],"isExternal":true},"abc5935a-61":{"id":"es-toolkit/compat","moduleParts":{},"imported":[],"importedBy":[{"uid":"abc5935a-59"}],"isExternal":true}},"env":{"rollup":"4.62.2"},"options":{"gzip":true,"brotli":true,"sourcemap":false}};
|
|
4932
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.cjs","children":[{"name":"src","children":[{"name":"styles/index.css","uid":"70d8c44c-1"},{"name":"utils","children":[{"uid":"70d8c44c-3","name":"rendererProvider.ts"},{"uid":"70d8c44c-5","name":"rulesProvider.ts"},{"uid":"70d8c44c-23","name":"equal.ts"},{"uid":"70d8c44c-29","name":"validation.ts"},{"uid":"70d8c44c-31","name":"slot.ts"},{"uid":"70d8c44c-37","name":"helpers.ts"}]},{"name":"hooks","children":[{"uid":"70d8c44c-7","name":"useForm.ts"},{"uid":"70d8c44c-9","name":"provideFormContext.ts"},{"uid":"70d8c44c-11","name":"useField.ts"},{"uid":"70d8c44c-13","name":"provideFieldContext.ts"},{"uid":"70d8c44c-15","name":"useWatch.ts"},{"uid":"70d8c44c-17","name":"useEffect.ts"},{"uid":"70d8c44c-19","name":"useDictionary.ts"},{"uid":"70d8c44c-21","name":"provideFormConfigContext.ts"},{"uid":"70d8c44c-25","name":"useStableRef.ts"},{"uid":"70d8c44c-27","name":"useViewSchemas.ts"}]},{"name":"components","children":[{"name":"FormGroup/index.tsx","uid":"70d8c44c-33"},{"name":"FormItem/index.tsx","uid":"70d8c44c-35"}]},{"uid":"70d8c44c-39","name":"form.vue?vue&type=script&setup=true&lang.ts"},{"uid":"70d8c44c-41","name":"form.ts"},{"name":"hocs/withRemoteOptions.ts","uid":"70d8c44c-43"},{"uid":"70d8c44c-45","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"70d8c44c-1":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"70d8c44c-0"},"70d8c44c-3":{"renderedLength":62,"gzipLength":69,"brotliLength":49,"metaUid":"70d8c44c-2"},"70d8c44c-5":{"renderedLength":58,"gzipLength":65,"brotliLength":49,"metaUid":"70d8c44c-4"},"70d8c44c-7":{"renderedLength":348,"gzipLength":194,"brotliLength":159,"metaUid":"70d8c44c-6"},"70d8c44c-9":{"renderedLength":468,"gzipLength":280,"brotliLength":223,"metaUid":"70d8c44c-8"},"70d8c44c-11":{"renderedLength":1593,"gzipLength":561,"brotliLength":491,"metaUid":"70d8c44c-10"},"70d8c44c-13":{"renderedLength":410,"gzipLength":249,"brotliLength":198,"metaUid":"70d8c44c-12"},"70d8c44c-15":{"renderedLength":551,"gzipLength":219,"brotliLength":186,"metaUid":"70d8c44c-14"},"70d8c44c-17":{"renderedLength":125,"gzipLength":112,"brotliLength":90,"metaUid":"70d8c44c-16"},"70d8c44c-19":{"renderedLength":2696,"gzipLength":878,"brotliLength":752,"metaUid":"70d8c44c-18"},"70d8c44c-21":{"renderedLength":686,"gzipLength":371,"brotliLength":314,"metaUid":"70d8c44c-20"},"70d8c44c-23":{"renderedLength":202,"gzipLength":154,"brotliLength":120,"metaUid":"70d8c44c-22"},"70d8c44c-25":{"renderedLength":240,"gzipLength":168,"brotliLength":143,"metaUid":"70d8c44c-24"},"70d8c44c-27":{"renderedLength":261,"gzipLength":162,"brotliLength":143,"metaUid":"70d8c44c-26"},"70d8c44c-29":{"renderedLength":768,"gzipLength":322,"brotliLength":262,"metaUid":"70d8c44c-28"},"70d8c44c-31":{"renderedLength":1262,"gzipLength":486,"brotliLength":401,"metaUid":"70d8c44c-30"},"70d8c44c-33":{"renderedLength":3687,"gzipLength":1318,"brotliLength":1115,"metaUid":"70d8c44c-32"},"70d8c44c-35":{"renderedLength":7370,"gzipLength":2416,"brotliLength":1979,"metaUid":"70d8c44c-34"},"70d8c44c-37":{"renderedLength":1118,"gzipLength":397,"brotliLength":337,"metaUid":"70d8c44c-36"},"70d8c44c-39":{"renderedLength":4079,"gzipLength":1328,"brotliLength":1163,"metaUid":"70d8c44c-38"},"70d8c44c-41":{"renderedLength":281,"gzipLength":228,"brotliLength":174,"metaUid":"70d8c44c-40"},"70d8c44c-43":{"renderedLength":923,"gzipLength":408,"brotliLength":349,"metaUid":"70d8c44c-42"},"70d8c44c-45":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"70d8c44c-44"}},"nodeMetas":{"70d8c44c-0":{"id":"/src/styles/index.css","moduleParts":{"index.cjs":"70d8c44c-1"},"imported":[],"importedBy":[{"uid":"70d8c44c-44"},{"uid":"70d8c44c-38"}]},"70d8c44c-2":{"id":"/src/utils/rendererProvider.ts","moduleParts":{"index.cjs":"70d8c44c-3"},"imported":[{"uid":"70d8c44c-48"}],"importedBy":[{"uid":"70d8c44c-44"},{"uid":"70d8c44c-6"}]},"70d8c44c-4":{"id":"/src/utils/rulesProvider.ts","moduleParts":{"index.cjs":"70d8c44c-5"},"imported":[{"uid":"70d8c44c-48"}],"importedBy":[{"uid":"70d8c44c-44"},{"uid":"70d8c44c-6"}]},"70d8c44c-6":{"id":"/src/hooks/useForm.ts","moduleParts":{"index.cjs":"70d8c44c-7"},"imported":[{"uid":"70d8c44c-51"},{"uid":"70d8c44c-48"},{"uid":"70d8c44c-2"},{"uid":"70d8c44c-4"}],"importedBy":[{"uid":"70d8c44c-46"}]},"70d8c44c-8":{"id":"/src/hooks/provideFormContext.ts","moduleParts":{"index.cjs":"70d8c44c-9"},"imported":[{"uid":"70d8c44c-51"}],"importedBy":[{"uid":"70d8c44c-46"},{"uid":"70d8c44c-10"},{"uid":"70d8c44c-14"},{"uid":"70d8c44c-18"}]},"70d8c44c-10":{"id":"/src/hooks/useField.ts","moduleParts":{"index.cjs":"70d8c44c-11"},"imported":[{"uid":"70d8c44c-51"},{"uid":"70d8c44c-48"},{"uid":"70d8c44c-8"}],"importedBy":[{"uid":"70d8c44c-46"}]},"70d8c44c-12":{"id":"/src/hooks/provideFieldContext.ts","moduleParts":{"index.cjs":"70d8c44c-13"},"imported":[{"uid":"70d8c44c-51"}],"importedBy":[{"uid":"70d8c44c-46"},{"uid":"70d8c44c-42"}]},"70d8c44c-14":{"id":"/src/hooks/useWatch.ts","moduleParts":{"index.cjs":"70d8c44c-15"},"imported":[{"uid":"70d8c44c-51"},{"uid":"70d8c44c-48"},{"uid":"70d8c44c-8"}],"importedBy":[{"uid":"70d8c44c-46"},{"uid":"70d8c44c-18"}]},"70d8c44c-16":{"id":"/src/hooks/useEffect.ts","moduleParts":{"index.cjs":"70d8c44c-17"},"imported":[{"uid":"70d8c44c-51"},{"uid":"70d8c44c-48"}],"importedBy":[{"uid":"70d8c44c-46"}]},"70d8c44c-18":{"id":"/src/hooks/useDictionary.ts","moduleParts":{"index.cjs":"70d8c44c-19"},"imported":[{"uid":"70d8c44c-51"},{"uid":"70d8c44c-8"},{"uid":"70d8c44c-14"}],"importedBy":[{"uid":"70d8c44c-46"},{"uid":"70d8c44c-42"}]},"70d8c44c-20":{"id":"/src/hooks/provideFormConfigContext.ts","moduleParts":{"index.cjs":"70d8c44c-21"},"imported":[{"uid":"70d8c44c-51"}],"importedBy":[{"uid":"70d8c44c-46"}]},"70d8c44c-22":{"id":"/src/utils/equal.ts","moduleParts":{"index.cjs":"70d8c44c-23"},"imported":[],"importedBy":[{"uid":"70d8c44c-24"}]},"70d8c44c-24":{"id":"/src/hooks/useStableRef.ts","moduleParts":{"index.cjs":"70d8c44c-25"},"imported":[{"uid":"70d8c44c-51"},{"uid":"70d8c44c-22"}],"importedBy":[{"uid":"70d8c44c-46"}]},"70d8c44c-26":{"id":"/src/hooks/useViewSchemas.ts","moduleParts":{"index.cjs":"70d8c44c-27"},"imported":[{"uid":"70d8c44c-51"}],"importedBy":[{"uid":"70d8c44c-46"}]},"70d8c44c-28":{"id":"/src/utils/validation.ts","moduleParts":{"index.cjs":"70d8c44c-29"},"imported":[],"importedBy":[{"uid":"70d8c44c-53"}]},"70d8c44c-30":{"id":"/src/utils/slot.ts","moduleParts":{"index.cjs":"70d8c44c-31"},"imported":[],"importedBy":[{"uid":"70d8c44c-53"}]},"70d8c44c-32":{"id":"/src/components/FormGroup/index.tsx","moduleParts":{"index.cjs":"70d8c44c-33"},"imported":[{"uid":"70d8c44c-51"},{"uid":"70d8c44c-52"},{"uid":"70d8c44c-34"}],"importedBy":[{"uid":"70d8c44c-44"},{"uid":"70d8c44c-34"}]},"70d8c44c-34":{"id":"/src/components/FormItem/index.tsx","moduleParts":{"index.cjs":"70d8c44c-35"},"imported":[{"uid":"70d8c44c-51"},{"uid":"70d8c44c-52"},{"uid":"70d8c44c-46"},{"uid":"70d8c44c-53"},{"uid":"70d8c44c-32"}],"importedBy":[{"uid":"70d8c44c-44"},{"uid":"70d8c44c-40"},{"uid":"70d8c44c-32"},{"uid":"70d8c44c-38"}]},"70d8c44c-36":{"id":"/src/utils/helpers.ts","moduleParts":{"index.cjs":"70d8c44c-37"},"imported":[],"importedBy":[{"uid":"70d8c44c-38"}]},"70d8c44c-38":{"id":"/src/form.vue?vue&type=script&setup=true&lang.ts","moduleParts":{"index.cjs":"70d8c44c-39"},"imported":[{"uid":"70d8c44c-51"},{"uid":"70d8c44c-48"},{"uid":"70d8c44c-60"},{"uid":"70d8c44c-34"},{"uid":"70d8c44c-46"},{"uid":"70d8c44c-36"},{"uid":"70d8c44c-0"}],"importedBy":[{"uid":"70d8c44c-57"}]},"70d8c44c-40":{"id":"/src/form.ts","moduleParts":{"index.cjs":"70d8c44c-41"},"imported":[{"uid":"70d8c44c-34"},{"uid":"70d8c44c-50"}],"importedBy":[{"uid":"70d8c44c-44"}]},"70d8c44c-42":{"id":"/src/hocs/withRemoteOptions.ts","moduleParts":{"index.cjs":"70d8c44c-43"},"imported":[{"uid":"70d8c44c-51"},{"uid":"70d8c44c-18"},{"uid":"70d8c44c-12"}],"importedBy":[{"uid":"70d8c44c-47"}]},"70d8c44c-44":{"id":"/src/index.ts","moduleParts":{"index.cjs":"70d8c44c-45"},"imported":[{"uid":"70d8c44c-0"},{"uid":"70d8c44c-40"},{"uid":"70d8c44c-2"},{"uid":"70d8c44c-4"},{"uid":"70d8c44c-46"},{"uid":"70d8c44c-47"},{"uid":"70d8c44c-34"},{"uid":"70d8c44c-32"},{"uid":"70d8c44c-48"},{"uid":"70d8c44c-49"}],"importedBy":[],"isEntry":true},"70d8c44c-46":{"id":"/src/hooks/index.ts","moduleParts":{},"imported":[{"uid":"70d8c44c-6"},{"uid":"70d8c44c-8"},{"uid":"70d8c44c-10"},{"uid":"70d8c44c-12"},{"uid":"70d8c44c-14"},{"uid":"70d8c44c-16"},{"uid":"70d8c44c-18"},{"uid":"70d8c44c-20"},{"uid":"70d8c44c-24"},{"uid":"70d8c44c-26"}],"importedBy":[{"uid":"70d8c44c-44"},{"uid":"70d8c44c-34"},{"uid":"70d8c44c-38"}]},"70d8c44c-47":{"id":"/src/hocs/index.ts","moduleParts":{},"imported":[{"uid":"70d8c44c-42"}],"importedBy":[{"uid":"70d8c44c-44"}]},"70d8c44c-48":{"id":"@schemx/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"70d8c44c-44"},{"uid":"70d8c44c-2"},{"uid":"70d8c44c-4"},{"uid":"70d8c44c-6"},{"uid":"70d8c44c-10"},{"uid":"70d8c44c-14"},{"uid":"70d8c44c-16"},{"uid":"70d8c44c-38"}],"isExternal":true},"70d8c44c-49":{"id":"/src/types/index.ts","moduleParts":{},"imported":[{"uid":"70d8c44c-54"},{"uid":"70d8c44c-55"},{"uid":"70d8c44c-56"}],"importedBy":[{"uid":"70d8c44c-44"}]},"70d8c44c-50":{"id":"/src/formRuntime.js","moduleParts":{},"imported":[{"uid":"70d8c44c-57"}],"importedBy":[{"uid":"70d8c44c-40"}]},"70d8c44c-51":{"id":"vue","moduleParts":{},"imported":[],"importedBy":[{"uid":"70d8c44c-34"},{"uid":"70d8c44c-32"},{"uid":"70d8c44c-6"},{"uid":"70d8c44c-8"},{"uid":"70d8c44c-10"},{"uid":"70d8c44c-12"},{"uid":"70d8c44c-14"},{"uid":"70d8c44c-16"},{"uid":"70d8c44c-18"},{"uid":"70d8c44c-20"},{"uid":"70d8c44c-24"},{"uid":"70d8c44c-26"},{"uid":"70d8c44c-42"},{"uid":"70d8c44c-38"}],"isExternal":true},"70d8c44c-52":{"id":"classnames","moduleParts":{},"imported":[],"importedBy":[{"uid":"70d8c44c-34"},{"uid":"70d8c44c-32"}],"isExternal":true},"70d8c44c-53":{"id":"/src/utils/index.ts","moduleParts":{},"imported":[{"uid":"70d8c44c-58"},{"uid":"70d8c44c-28"},{"uid":"70d8c44c-30"},{"uid":"70d8c44c-59"}],"importedBy":[{"uid":"70d8c44c-34"}]},"70d8c44c-54":{"id":"/src/types/dictionary.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"70d8c44c-49"}]},"70d8c44c-55":{"id":"/src/types/form.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"70d8c44c-49"}]},"70d8c44c-56":{"id":"/src/types/field.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"70d8c44c-49"}]},"70d8c44c-57":{"id":"/src/form.vue","moduleParts":{},"imported":[{"uid":"70d8c44c-38"}],"importedBy":[{"uid":"70d8c44c-50"}]},"70d8c44c-58":{"id":"/src/utils/dynamic.ts","moduleParts":{},"imported":[{"uid":"70d8c44c-60"}],"importedBy":[{"uid":"70d8c44c-53"}]},"70d8c44c-59":{"id":"/src/utils/diff.ts","moduleParts":{},"imported":[{"uid":"70d8c44c-61"}],"importedBy":[{"uid":"70d8c44c-53"}]},"70d8c44c-60":{"id":"es-toolkit","moduleParts":{},"imported":[],"importedBy":[{"uid":"70d8c44c-58"},{"uid":"70d8c44c-38"}],"isExternal":true},"70d8c44c-61":{"id":"es-toolkit/compat","moduleParts":{},"imported":[],"importedBy":[{"uid":"70d8c44c-59"}],"isExternal":true}},"env":{"rollup":"4.62.2"},"options":{"gzip":true,"brotli":true,"sourcemap":false}};
|
|
4933
4933
|
|
|
4934
4934
|
const run = () => {
|
|
4935
4935
|
const width = window.innerWidth;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FormGroup/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AASH,OAAO,KAAK,EAAE,qBAAqB,EAAoB,MAAM,EAAE,MAAM,cAAc,CAAA;AAEnF;;;;GAIG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACzD,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAA;CACjC;AAED,QAAA,MAAM,SAAS;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FormGroup/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AASH,OAAO,KAAK,EAAE,qBAAqB,EAAoB,MAAM,EAAE,MAAM,cAAc,CAAA;AAEnF;;;;GAIG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACzD,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAA;CACjC;AAED,QAAA,MAAM,SAAS;;;;kCA2Hd,CAAA;AAED,eAAe,SAAS,CAAA"}
|
package/dist/form.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { InjectionKey } from 'vue';
|
|
2
2
|
import { SchemxFormProps } from '../types';
|
|
3
3
|
import { Values } from '@schemx/core';
|
|
4
|
-
|
|
5
4
|
/** 表单级展示配置在 Vue provide/inject 中使用的注入 key。 */
|
|
6
5
|
export declare const SCHEMX_FORM_CONFIG_KEY: InjectionKey<FormContextProps<Values>>;
|
|
7
6
|
/**
|
|
@@ -33,12 +32,22 @@ export interface FormContextProps<TValues extends Values = Values> extends Omit<
|
|
|
33
32
|
*
|
|
34
33
|
* @remarks
|
|
35
34
|
* 该函数只注册上下文,不创建或销毁表单实例,也不改变传入配置的所有权。
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* createFormConfigContext({ readonly: true, labelAlign: "right" })
|
|
39
|
+
* ```
|
|
36
40
|
*/
|
|
37
41
|
export declare const createFormConfigContext: <TValues extends Values = Values>(props: FormContextProps<TValues>) => void;
|
|
38
42
|
/**
|
|
39
43
|
* `createFormConfigContext` 的兼容别名。
|
|
40
44
|
*
|
|
41
45
|
* @deprecated 请使用 createFormConfigContext。
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* createContext({ disabled: true })
|
|
50
|
+
* ```
|
|
42
51
|
*/
|
|
43
52
|
export declare const createContext: <TValues extends Values = Values>(props: FormContextProps<TValues>) => void;
|
|
44
53
|
/**
|
|
@@ -62,6 +71,11 @@ export declare function useFormConfigContext(): FormContextProps;
|
|
|
62
71
|
* `useFormConfigContext` 的兼容别名。
|
|
63
72
|
*
|
|
64
73
|
* @deprecated 请使用 useFormConfigContext。
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```ts
|
|
77
|
+
* const context = useContext()
|
|
78
|
+
* ```
|
|
65
79
|
*/
|
|
66
80
|
export declare const useContext: typeof useFormConfigContext;
|
|
67
81
|
//# sourceMappingURL=provideFormConfigContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provideFormConfigContext.d.ts","sourceRoot":"","sources":["../../src/hooks/provideFormConfigContext.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAU,KAAK,YAAY,EAAW,MAAM,KAAK,CAAA;AAExD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1C,8CAA8C;AAC9C,eAAO,MAAM,sBAAsB,EAAmC,YAAY,CAChF,gBAAgB,CAAC,MAAM,CAAC,CACzB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,wBAAwB,mKAU3B,CAAA;AAEV;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEhF;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,IAAI,CAC7E,eAAe,CAAC,OAAO,CAAC,EACxB,wBAAwB,CACzB;CAAG;AAEJ
|
|
1
|
+
{"version":3,"file":"provideFormConfigContext.d.ts","sourceRoot":"","sources":["../../src/hooks/provideFormConfigContext.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAU,KAAK,YAAY,EAAW,MAAM,KAAK,CAAA;AAExD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1C,8CAA8C;AAC9C,eAAO,MAAM,sBAAsB,EAAmC,YAAY,CAChF,gBAAgB,CAAC,MAAM,CAAC,CACzB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,wBAAwB,mKAU3B,CAAA;AAEV;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEhF;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,IAAI,CAC7E,eAAe,CAAC,OAAO,CAAC,EACxB,wBAAwB,CACzB;CAAG;AAEJ;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,uBAAuB,GAAI,OAAO,SAAS,MAAM,GAAG,MAAM,EACrE,OAAO,gBAAgB,CAAC,OAAO,CAAC,KAC/B,IAEF,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,GAhBc,OAAO,SAAS,MAAM,kBACrD,gBAAgB,CAAC,OAAO,CAAC,KAC/B,IAciD,CAAA;AAEpD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,IAAI,gBAAgB,CAWvD;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,6BAAuB,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { SchemxDictionary } from '../types/dictionary';
|
|
3
3
|
import { NamePath, Values } from '@schemx/core';
|
|
4
|
-
|
|
5
4
|
export type { SchemxDictionary, SchemxWithDictionary } from '../types/dictionary';
|
|
6
5
|
/**
|
|
7
6
|
* useDictionary 返回值
|
|
@@ -43,18 +42,24 @@ export declare function normalizeError(err: unknown): Error;
|
|
|
43
42
|
* @typeParam TValues - 表单值类型
|
|
44
43
|
* @param options - 字典配置选项
|
|
45
44
|
* @param fieldName - 当前字段名,用于 resetOnDepsChange 时清空字段值
|
|
46
|
-
* @returns
|
|
45
|
+
* @returns `{ list, loading, error, loadDict, refresh, mutate }`:响应式选项、
|
|
46
|
+
* 加载与错误状态,以及加载、刷新和本地更新方法
|
|
47
47
|
*
|
|
48
48
|
* @example
|
|
49
49
|
* ```ts
|
|
50
50
|
* // 基础用法
|
|
51
|
-
* const { list } = useDictionary({
|
|
51
|
+
* const { list, loading, error, loadDict, refresh, mutate } = useDictionary({
|
|
52
52
|
* api: async () => {
|
|
53
53
|
* const res = await fetch('/api/options')
|
|
54
54
|
* return res.json()
|
|
55
55
|
* },
|
|
56
56
|
* })
|
|
57
57
|
*
|
|
58
|
+
* await loadDict() // 主动加载
|
|
59
|
+
* await refresh() // 使用当前配置重新加载
|
|
60
|
+
* mutate([{ label: "手动选项", value: "manual" }])
|
|
61
|
+
* console.log(list.value, loading.value, error.value)
|
|
62
|
+
*
|
|
58
63
|
* // 依赖联动(带泛型)
|
|
59
64
|
* const { list } = useDictionary<MyFormValues>({
|
|
60
65
|
* api: async (values) => fetchCities(values.province),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionary.d.ts","sourceRoot":"","sources":["../../src/hooks/useDictionary.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAa,GAAG,EAAO,MAAM,KAAK,CAAA;AAEzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAK1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAEpD,YAAY,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAEhF;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,uBAAuB;IACvB,IAAI,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC,CAAA;IAChB,kBAAkB;IAClB,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACrB,kBAAkB;IAClB,KAAK,EAAE,GAAG,CAAC,KAAK,GAAG,SAAS,CAAC,CAAA;IAC7B,eAAe;IACf,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC7B,qBAAqB;IACrB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5B,8BAA8B;IAC9B,MAAM,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;CAC9B;AAED;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,mBAAmB,CAAA;AAEtD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,KAAK,CAIlD;AAED
|
|
1
|
+
{"version":3,"file":"useDictionary.d.ts","sourceRoot":"","sources":["../../src/hooks/useDictionary.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAa,GAAG,EAAO,MAAM,KAAK,CAAA;AAEzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAK1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAEpD,YAAY,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAEhF;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,uBAAuB;IACvB,IAAI,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC,CAAA;IAChB,kBAAkB;IAClB,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACrB,kBAAkB;IAClB,KAAK,EAAE,GAAG,CAAC,KAAK,GAAG,SAAS,CAAC,CAAA;IAC7B,eAAe;IACf,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC7B,qBAAqB;IACrB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5B,8BAA8B;IAC9B,MAAM,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;CAC9B;AAED;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,mBAAmB,CAAA;AAEtD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,KAAK,CAIlD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,eAAO,MAAM,aAAa,GACxB,OAAO,SAAS,MAAM,GAAG,MAAM,EAC/B,KAAK,SAAS,QAAQ,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,EAEnD,SAAS,gBAAgB,CAAC,OAAO,CAAC,EAClC,YAAY,KAAK,KAChB,mBAmIF,CAAA;AAED,eAAe,aAAa,CAAA"}
|
package/dist/hooks/useField.d.ts
CHANGED
package/dist/hooks/useForm.d.ts
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { ShallowRef } from 'vue';
|
|
2
2
|
import { SchemxInstance, SchemxViewSchema, Values } from '@schemx/core';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* 将表单 ViewSchema 映射为 Vue 响应式引用,并在当前作用域销毁时自动取消订阅。
|
|
5
|
+
*
|
|
6
|
+
* @param form - 要订阅的表单实例。
|
|
7
|
+
* @returns 当前 ViewSchema 列表的只读浅引用。
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const form = useForm()
|
|
12
|
+
* const viewSchemas = useViewSchemas(form)
|
|
13
|
+
*
|
|
14
|
+
* watchEffect(() => console.log(viewSchemas.value))
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
4
17
|
export declare function useViewSchemas<T extends Values = Values>(form: SchemxInstance<T>): ShallowRef<readonly SchemxViewSchema<T>[]>;
|
|
5
18
|
export default useViewSchemas;
|
|
6
19
|
//# sourceMappingURL=useViewSchemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useViewSchemas.d.ts","sourceRoot":"","sources":["../../src/hooks/useViewSchemas.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAErC,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE5E,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EACtD,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,GACtB,UAAU,CAAC,SAAS,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAU5C;AAED,eAAe,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"useViewSchemas.d.ts","sourceRoot":"","sources":["../../src/hooks/useViewSchemas.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAErC,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE5E;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EACtD,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,GACtB,UAAU,CAAC,SAAS,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAU5C;AAED,eAAe,cAAc,CAAA"}
|