@qin-ui/element-plus-pro 1.0.7 → 1.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.
Files changed (131) hide show
  1. package/AI-CONTEXT.md +227 -23
  2. package/LICENSE +9 -0
  3. package/api.json +44 -27
  4. package/bin/init-ai.mjs +214 -52
  5. package/es/component-provider/{index-Bmx9Q9Q-.js → index-BGGIWSkO.js} +2 -1
  6. package/es/component-provider/index-BGGIWSkO.js.map +1 -0
  7. package/es/component-provider/index.js +2 -1
  8. package/es/component-provider/index.js.map +1 -0
  9. package/es/components/component-provider/components/index.vue.d.ts +27 -0
  10. package/es/components/component-provider/components/index.vue.d.ts.map +1 -0
  11. package/es/components/component-provider/constants/index.d.ts +16 -0
  12. package/es/components/component-provider/constants/index.d.ts.map +1 -0
  13. package/es/components/component-provider/index.d.ts +4 -0
  14. package/es/components/component-provider/index.d.ts.map +1 -0
  15. package/es/components/component-provider/types/index.d.ts +35 -0
  16. package/es/components/component-provider/types/index.d.ts.map +1 -0
  17. package/es/components/form/components/BaseField/index.vue.d.ts +13 -0
  18. package/es/components/form/components/BaseField/index.vue.d.ts.map +1 -0
  19. package/es/components/form/components/BaseField/utils/index.d.ts +3 -0
  20. package/es/components/form/components/BaseField/utils/index.d.ts.map +1 -0
  21. package/es/components/form/components/BaseFormItem/index.vue.d.ts +9 -0
  22. package/es/components/form/components/BaseFormItem/index.vue.d.ts.map +1 -0
  23. package/es/components/form/components/ContainerFragment/index.vue.d.ts +23 -0
  24. package/es/components/form/components/ContainerFragment/index.vue.d.ts.map +1 -0
  25. package/es/components/form/components/GroupedFieldAttrs/index.vue.d.ts +31 -0
  26. package/es/components/form/components/GroupedFieldAttrs/index.vue.d.ts.map +1 -0
  27. package/es/components/form/components/PathProvider/index.vue.d.ts +24 -0
  28. package/es/components/form/components/PathProvider/index.vue.d.ts.map +1 -0
  29. package/es/components/form/components/ProForm/index.vue.d.ts +36 -0
  30. package/es/components/form/components/ProForm/index.vue.d.ts.map +1 -0
  31. package/es/components/form/components/SlotComponent/index.vue.d.ts +7 -0
  32. package/es/components/form/components/SlotComponent/index.vue.d.ts.map +1 -0
  33. package/es/components/form/components/index.d.ts +12 -0
  34. package/es/components/form/components/index.d.ts.map +1 -0
  35. package/es/components/form/constants/index.d.ts +67 -0
  36. package/es/components/form/constants/index.d.ts.map +1 -0
  37. package/es/components/form/hooks/index.d.ts +5 -0
  38. package/es/components/form/hooks/index.d.ts.map +1 -0
  39. package/es/components/form/hooks/useFields.d.ts +57 -0
  40. package/es/components/form/hooks/useFields.d.ts.map +1 -0
  41. package/es/components/form/hooks/useForm.d.ts +93 -0
  42. package/es/components/form/hooks/useForm.d.ts.map +1 -0
  43. package/es/components/form/hooks/useFormRef.d.ts +30 -0
  44. package/es/components/form/hooks/useFormRef.d.ts.map +1 -0
  45. package/es/components/form/index.d.ts +7 -0
  46. package/es/components/form/index.d.ts.map +1 -0
  47. package/es/components/form/types/index.d.ts +234 -0
  48. package/es/components/form/types/index.d.ts.map +1 -0
  49. package/es/components/table/components/ColumnControl.vue.d.ts +9 -0
  50. package/es/components/table/components/ColumnControl.vue.d.ts.map +1 -0
  51. package/es/components/table/components/DefaultSearchFormContainer.vue.d.ts +18 -0
  52. package/es/components/table/components/DefaultSearchFormContainer.vue.d.ts.map +1 -0
  53. package/es/components/table/components/DefaultTableContainer.vue.d.ts +18 -0
  54. package/es/components/table/components/DefaultTableContainer.vue.d.ts.map +1 -0
  55. package/es/components/table/components/ProTable.vue.d.ts +47 -0
  56. package/es/components/table/components/ProTable.vue.d.ts.map +1 -0
  57. package/es/components/table/components/SearchForm.vue.d.ts +48 -0
  58. package/es/components/table/components/SearchForm.vue.d.ts.map +1 -0
  59. package/es/components/table/components/SizeControl.vue.d.ts +12 -0
  60. package/es/components/table/components/SizeControl.vue.d.ts.map +1 -0
  61. package/es/components/table/components/TableColumnRenderer.vue.d.ts +17 -0
  62. package/es/components/table/components/TableColumnRenderer.vue.d.ts.map +1 -0
  63. package/es/components/table/components/icons/ColumnHeightOutlined.vue.d.ts +3 -0
  64. package/es/components/table/components/icons/ColumnHeightOutlined.vue.d.ts.map +1 -0
  65. package/es/components/table/components/icons/DownOutlined.vue.d.ts +3 -0
  66. package/es/components/table/components/icons/DownOutlined.vue.d.ts.map +1 -0
  67. package/es/components/table/components/icons/FilterOutlined.vue.d.ts +3 -0
  68. package/es/components/table/components/icons/FilterOutlined.vue.d.ts.map +1 -0
  69. package/es/components/table/components/index.d.ts +5 -0
  70. package/es/components/table/components/index.d.ts.map +1 -0
  71. package/es/components/table/index.d.ts +33 -0
  72. package/es/components/table/index.d.ts.map +1 -0
  73. package/es/components/table/types/index.d.ts +67 -0
  74. package/es/components/table/types/index.d.ts.map +1 -0
  75. package/es/components/table/useTable.d.ts +111 -0
  76. package/es/components/table/useTable.d.ts.map +1 -0
  77. package/es/element-plus-pro.css +10 -10
  78. package/es/form/{index-D8btGgqa.js → index-oI6LGSpA.js} +13 -7
  79. package/es/form/index-oI6LGSpA.js.map +1 -0
  80. package/es/form/index.js +4 -3
  81. package/es/form/index.js.map +1 -0
  82. package/es/index.d.ts +76 -1472
  83. package/es/index.d.ts.map +1 -0
  84. package/es/index.js +14 -23
  85. package/es/index.js.map +1 -0
  86. package/es/shared/core/index.d.ts +6 -0
  87. package/es/shared/core/index.d.ts.map +1 -0
  88. package/es/shared/ui/index.d.ts +12 -0
  89. package/es/shared/ui/index.d.ts.map +1 -0
  90. package/es/table/index.js +10 -10
  91. package/es/table/index.js.map +1 -0
  92. package/package.json +10 -11
  93. package/src/components/component-provider/components/index.vue +67 -0
  94. package/src/components/component-provider/constants/index.ts +209 -0
  95. package/src/components/component-provider/index.ts +6 -0
  96. package/src/components/component-provider/types/index.ts +64 -0
  97. package/src/components/form/components/BaseField/index.vue +181 -0
  98. package/src/components/form/components/BaseField/utils/index.ts +15 -0
  99. package/src/components/form/components/BaseFormItem/index.vue +170 -0
  100. package/src/components/form/components/ContainerFragment/index.vue +24 -0
  101. package/src/components/form/components/GroupedFieldAttrs/index.vue +115 -0
  102. package/src/components/form/components/PathProvider/index.vue +19 -0
  103. package/src/components/form/components/ProForm/index.vue +106 -0
  104. package/src/components/form/components/SlotComponent/index.vue +26 -0
  105. package/src/components/form/components/index.ts +15 -0
  106. package/src/components/form/constants/index.ts +116 -0
  107. package/src/components/form/hooks/index.ts +5 -0
  108. package/src/components/form/hooks/useFields.ts +67 -0
  109. package/src/components/form/hooks/useForm.ts +110 -0
  110. package/src/components/form/hooks/useFormRef.ts +35 -0
  111. package/src/components/form/index.ts +29 -0
  112. package/src/components/form/types/index.ts +300 -0
  113. package/src/components/table/components/ColumnControl.vue +136 -0
  114. package/src/components/table/components/DefaultSearchFormContainer.vue +14 -0
  115. package/src/components/table/components/DefaultTableContainer.vue +14 -0
  116. package/src/components/table/components/ProTable.vue +420 -0
  117. package/src/components/table/components/SearchForm.vue +302 -0
  118. package/src/components/table/components/SizeControl.vue +55 -0
  119. package/src/components/table/components/TableColumnRenderer.vue +71 -0
  120. package/src/components/table/components/icons/ColumnHeightOutlined.vue +4 -0
  121. package/src/components/table/components/icons/DownOutlined.vue +4 -0
  122. package/src/components/table/components/icons/FilterOutlined.vue +4 -0
  123. package/src/components/table/components/index.ts +4 -0
  124. package/src/components/table/index.ts +38 -0
  125. package/src/components/table/types/index.ts +77 -0
  126. package/src/components/table/useTable.ts +144 -0
  127. package/src/index.ts +81 -0
  128. package/src/shared/core/index.ts +38 -0
  129. package/src/shared/ui/index.ts +106 -0
  130. package/es/core/index-C0Pbv44C.js +0 -360
  131. package/es/vendor/utils/lodash-es-p6jau26B.js +0 -1120
package/bin/init-ai.mjs CHANGED
@@ -1,10 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  /**
4
- * @qin-ui/* AI 上下文初始化 CLI 工具
4
+ * @qin-ui/element-plus-pro AI 上下文初始化 CLI 工具
5
5
  *
6
- * 遵循 Agentic Collaboration Standard (ACS),
7
- * 在消费方项目中自动生成统一的 .agents 规范配置文件。
6
+ * 在消费方项目中生成分层 AI 上下文文件,使 AI 工具能够:
7
+ * 1. 理解 @qin-ui/element-plus-pro 的 Schema 驱动架构
8
+ * 2. 掌握属性透传规则(何时查阅 element-plus 文档)
9
+ * 3. 快速获取完整 API 参考
8
10
  *
9
11
  * 用法:
10
12
  * npx @qin-ui/element-plus-pro init-ai
@@ -28,46 +30,174 @@ const PKG_SHORT = PKG_NAME.replace(/^@qin-ui\//, '');
28
30
 
29
31
  // ==================== 终端颜色 ====================
30
32
 
31
- const green = (s) => `\x1b[32m${s}\x1b[0m`;
32
- const cyan = (s) => `\x1b[36m${s}\x1b[0m`;
33
- const bold = (s) => `\x1b[1m${s}\x1b[0m`;
34
- const red = (s) => `\x1b[31m${s}\x1b[0m`;
33
+ const green = s => `\x1b[32m${s}\x1b[0m`;
34
+ const cyan = s => `\x1b[36m${s}\x1b[0m`;
35
+ const bold = s => `\x1b[1m${s}\x1b[0m`;
36
+ const yellow = s => `\x1b[33m${s}\x1b[0m`;
37
+ const dim = s => `\x1b[2m${s}\x1b[0m`;
35
38
 
36
- // ==================== 内容生成 ====================
39
+ // ==================== 内容读取 ====================
37
40
 
38
- function getAiContextContent() {
39
- const filePath = path.join(PKG_ROOT, 'AI-CONTEXT.md');
41
+ function readPackageFile(filename) {
42
+ const filePath = path.join(PKG_ROOT, filename);
40
43
  if (fs.existsSync(filePath)) {
41
44
  return fs.readFileSync(filePath, 'utf-8').trim();
42
45
  }
43
- return `# ${PKG_NAME}\n\n> 基于 Vue 3 的配置驱动组件库。`;
46
+ return null;
47
+ }
48
+
49
+ function getAiContextContent() {
50
+ return readPackageFile('AI-CONTEXT.md') || `# ${PKG_NAME}\n\n> 基于 Vue 3 的配置驱动组件库。`;
51
+ }
52
+
53
+ function getReadmeContent() {
54
+ return readPackageFile('README.md') || '';
44
55
  }
45
56
 
46
- function getUnifiedAgentContent() {
57
+ function getApiJsonContent() {
58
+ try {
59
+ const raw = readPackageFile('api.json');
60
+ if (!raw) return null;
61
+ return JSON.parse(raw);
62
+ } catch {
63
+ return null;
64
+ }
65
+ }
66
+
67
+ // ==================== 内容生成 ====================
68
+
69
+ /**
70
+ * 生成 rules 文件内容(Instructions 层)
71
+ * 包含:架构关系、透传规则、反模式、element-plus 资源链接
72
+ */
73
+ function getRulesContent() {
47
74
  const aiContext = getAiContextContent();
48
- const core = [
49
- aiContext,
50
- '',
51
- '## 完整 API 参考',
52
- '',
53
- `使用 \`${PKG_NAME}\` 时,请阅读以下文件获取完整的 API 定义、类型签名和使用示例:`,
54
- `- \`node_modules/${PKG_NAME}/README.md\` — 详细使用文档和代码示例`,
55
- `- \`node_modules/${PKG_NAME}/api.json\` — 结构化 API 元数据(组件、Hook、类型的签名和 JSDoc 示例)`,
56
- '',
57
- ].join('\n');
58
75
 
59
- // 包含兼容性的 Frontmatter(如 Cursor 支持的 globs 等)
60
76
  return [
61
77
  '---',
62
- `description: "${PKG_NAME} 组件库使用规范"`,
78
+ `description: "${PKG_NAME} 组件库使用规范 — Schema 驱动、属性透传规则"`,
63
79
  'globs: ["**/*.vue", "**/*.ts", "**/*.tsx"]',
64
80
  'alwaysApply: false',
65
81
  '---',
66
82
  '',
67
- core,
83
+ aiContext,
84
+ '',
85
+ '---',
86
+ '',
87
+ '## 本地参考文件',
88
+ '',
89
+ '本规则文件提供了核心架构和用法指南。需要完整 API 参考时,请阅读以下文件:',
90
+ '',
91
+ `- **\`.agents/docs/${PKG_SHORT}-api.md\`** — 完整 API 文档(组件、Hooks、类型、Field 配置参考)`,
92
+ `- **\`node_modules/${PKG_NAME}/api.json\`** — 结构化 API 元数据(函数签名、类型定义)`,
93
+ '',
94
+ '## element-plus 文档资源',
95
+ '',
96
+ '所有在 Field 配置中编写的非保留属性,最终会透传给 element-plus 组件。编写前务必查阅文档确认属性名:',
97
+ '',
98
+ '| 资源 | URL | 说明 |',
99
+ '|:--|:--|:--|',
100
+ '| element-plus 官网 | https://element-plus.org/ | 官方文档首页(中文/英文) |',
101
+ '| 组件文档 | https://element-plus.org/zh-CN/component/button | 组件 API 参考入口(中文) |',
102
+ '',
68
103
  ].join('\n');
69
104
  }
70
105
 
106
+ /**
107
+ * 生成 API 文档内容(Resources 层)
108
+ * 从 README.md + api.json 合并提取完整 API 参考
109
+ */
110
+ function getApiDocContent() {
111
+ const readme = getReadmeContent();
112
+ const apiJson = getApiJsonContent();
113
+
114
+ const sections = [];
115
+
116
+ sections.push(`# ${PKG_NAME} — 完整 API 参考`, '');
117
+ sections.push(`> 自动生成自 README.md 和 api.json。版本: ${PKG_JSON.version}`, '');
118
+
119
+ // README 内容(已包含完整的使用文档)
120
+ if (readme) {
121
+ sections.push(readme);
122
+ sections.push('');
123
+ }
124
+
125
+ // 结构化 API 元数据
126
+ if (apiJson && apiJson.api && apiJson.api.length > 0) {
127
+ sections.push('---');
128
+ sections.push('');
129
+ sections.push('## 结构化 API 元数据(自动提取自源码 JSDoc)');
130
+ sections.push('');
131
+
132
+ for (const item of apiJson.api) {
133
+ const typeLabel = {
134
+ component: '组件',
135
+ function: '函数/Hook',
136
+ type: '类型',
137
+ interface: '接口',
138
+ constant: '常量',
139
+ }[item.type] || '';
140
+
141
+ sections.push(`### ${typeLabel} \`${item.name}\``);
142
+ sections.push('');
143
+ sections.push(`**类型:** ${item.type}`);
144
+ if (item.signature) {
145
+ sections.push('');
146
+ sections.push('```typescript');
147
+ sections.push(item.signature);
148
+ sections.push('```');
149
+ }
150
+ if (item.description) {
151
+ sections.push('');
152
+ sections.push(item.description);
153
+ }
154
+
155
+ if (item.typeParams && item.typeParams.length > 0) {
156
+ sections.push('');
157
+ sections.push('**泛型参数:**');
158
+ for (const tp of item.typeParams) {
159
+ const extras = [];
160
+ if (tp.extends) extras.push(`extends ${tp.extends}`);
161
+ if (tp.default) extras.push(`默认 ${tp.default}`);
162
+ const extra = extras.length ? ` (${extras.join(', ')})` : '';
163
+ sections.push(`- \`${tp.name}\`${extra}`);
164
+ }
165
+ }
166
+
167
+ if (item.params && item.params.length > 0) {
168
+ sections.push('');
169
+ sections.push('**参数:**');
170
+ sections.push('');
171
+ sections.push('| 参数名 | 类型 | 可选 | 描述 |');
172
+ sections.push('| :--- | :--- | :--- | :--- |');
173
+ for (const p of item.params) {
174
+ sections.push(`| \`${p.name}\` | \`${p.type}\` | ${p.optional ? '是' : '否'} | ${p.description} |`);
175
+ }
176
+ }
177
+
178
+ if (item.returns) {
179
+ sections.push('');
180
+ sections.push(`**返回值:** ${item.returns}`);
181
+ }
182
+
183
+ if (item.examples && item.examples.length > 0) {
184
+ sections.push('');
185
+ sections.push('**示例:**');
186
+ for (const ex of item.examples) {
187
+ sections.push('');
188
+ sections.push(ex);
189
+ }
190
+ }
191
+
192
+ sections.push('');
193
+ sections.push('---');
194
+ sections.push('');
195
+ }
196
+ }
197
+
198
+ return sections.join('\n');
199
+ }
200
+
71
201
  // ==================== 文件写入 ====================
72
202
 
73
203
  function ensureDir(dirPath) {
@@ -76,31 +206,43 @@ function ensureDir(dirPath) {
76
206
  }
77
207
  }
78
208
 
209
+ function writeFileWithLog(filePath, content, label) {
210
+ const dir = path.dirname(filePath);
211
+ ensureDir(dir);
212
+ const existed = fs.existsSync(filePath);
213
+ fs.writeFileSync(filePath, content, 'utf-8');
214
+ const status = existed ? yellow('[更新]') : green('[创建]');
215
+ console.log(` ${status} ${cyan(label)}`);
216
+ }
217
+
79
218
  // ==================== CLI 入口 ====================
80
219
 
81
220
  function printHelp() {
82
221
  console.log(`
83
- ${bold(`${PKG_NAME} CLI`)}
222
+ ${bold(`${PKG_NAME} CLI — AI 上下文初始化`)}
84
223
 
85
224
  ${bold('用法:')}
86
225
  npx ${PKG_NAME} init-ai
87
226
 
88
- ${bold('命令:')}
89
- init-ai 在当前项目中生成统一的 .agents 规范配置文件
227
+ ${bold('说明:')}
228
+ 在项目中生成分层 AI 上下文文件,使 AI 工具能够深度理解和规范使用 ${PKG_NAME}。
229
+
230
+ 生成的文件结构:
231
+ .agents/
232
+ rules/
233
+ ${PKG_SHORT}.md 规则文件(架构、透传规则、反模式)
234
+ docs/
235
+ ${PKG_SHORT}-api.md API 参考(完整文档 + 结构化元数据)
90
236
 
91
237
  ${bold('选项:')}
92
238
  --help 显示帮助信息
93
-
94
- ${bold('说明:')}
95
- 该命令将采用统一的 Agentic 标准,在项目的 .agents/rules/ 目录下
96
- 生成上下文文件。兼容支持读取 .agents 的主流 AI IDE 和 CLI 工具。
97
239
  `);
98
240
  }
99
241
 
100
242
  function main() {
101
243
  const args = process.argv.slice(2);
102
- const subcommand = args.find((a) => !a.startsWith('-'));
103
- const flags = args.filter((a) => a.startsWith('-'));
244
+ const subcommand = args.find(a => !a.startsWith('-'));
245
+ const flags = args.filter(a => a.startsWith('-'));
104
246
 
105
247
  if (!subcommand || flags.includes('--help') || flags.includes('-h')) {
106
248
  printHelp();
@@ -108,35 +250,55 @@ function main() {
108
250
  }
109
251
 
110
252
  if (subcommand !== 'init-ai') {
111
- console.error(red(`\n 未知命令: ${subcommand}\n`));
253
+ console.error(`\n 未知命令: ${subcommand}\n`);
112
254
  printHelp();
113
255
  process.exit(1);
114
256
  }
115
257
 
116
258
  console.log('');
117
- console.log(bold(`📦 ${PKG_NAME} — AI 上下文初始化 (ACS 标准)`));
259
+ console.log(bold(`📦 ${PKG_NAME} — AI 上下文初始化 v${PKG_JSON.version}`));
260
+ console.log(dim(` 基于 element-plus 的 Schema 驱动组件库`));
118
261
  console.log('');
119
-
120
- const content = getUnifiedAgentContent();
121
- const dirPath = '.agents/rules';
122
- const fileName = `${PKG_SHORT}.md`;
123
-
124
- const fullDir = path.join(process.cwd(), dirPath);
125
- const fullPath = path.join(fullDir, fileName);
126
262
 
127
- ensureDir(fullDir);
128
- fs.writeFileSync(fullPath, content, 'utf-8');
263
+ // 1. 生成 Rules 文件
264
+ console.log(bold('📋 规则层 (Rules)'));
265
+ const rulesContent = getRulesContent();
266
+ writeFileWithLog(
267
+ path.join(process.cwd(), '.agents/rules', `${PKG_SHORT}.md`),
268
+ rulesContent,
269
+ `.agents/rules/${PKG_SHORT}.md`
270
+ );
271
+ console.log(dim(' → 架构概览、属性透传决策树、渐进用法、反模式'));
272
+ console.log('');
129
273
 
130
- const relPath = path.join(dirPath, fileName);
131
- console.log(` ${green('✔')} ${cyan(relPath)} ${green('[created/updated]')}`);
274
+ // 2. 生成 API 文档
275
+ console.log(bold('📖 参考层 (Docs)'));
276
+ const apiDocContent = getApiDocContent();
277
+ writeFileWithLog(
278
+ path.join(process.cwd(), '.agents/docs', `${PKG_SHORT}-api.md`),
279
+ apiDocContent,
280
+ `.agents/docs/${PKG_SHORT}-api.md`
281
+ );
282
+ console.log(dim(' → 完整 README 文档 + 结构化 API 元数据'));
283
+ console.log('');
132
284
 
285
+ // 3. 完成提示
286
+ console.log(green('✅ 完成!已生成分层 AI 上下文文件。'));
133
287
  console.log('');
134
- console.log(green(' 完成!已生成统一标准规则文件。'));
288
+ console.log(`${bold('📂 生成的文件:')}`);
289
+ console.log(` ${cyan('.agents/')}`);
290
+ console.log(` ├── ${cyan('rules/')}`);
291
+ console.log(` │ └── ${cyan(PKG_SHORT + '.md')} ${dim('← 核心规则(AI 优先读取)')}`);
292
+ console.log(` └── ${cyan('docs/')}`);
293
+ console.log(` └── ${cyan(PKG_SHORT + '-api.md')} ${dim('← 完整 API 参考')}`);
294
+ console.log('');
295
+
296
+ console.log(`${bold('🔄 建议的下一步:')}`);
297
+ console.log(` 1. 提交 ${cyan('.agents/')} 目录到 Git 仓库,团队共享`);
298
+ console.log(` 2. 查阅 element-plus 官方文档确认组件属性:`);
299
+ console.log(` ${cyan('https://element-plus.org/')}`);
300
+ console.log(` 3. ${dim('(可选)将 element-plus 常用组件 API 速查加入项目文档')}`);
135
301
  console.log('');
136
- console.log(`${bold('下一步:')}`);
137
- console.log(
138
- ` 将 ${cyan(dirPath)} 目录提交到 Git,团队即可自动享受 AI 增强\n`
139
- );
140
302
  }
141
303
 
142
304
  main();
@@ -1,5 +1,5 @@
1
+ import { getObject } from "@qin-ui/pro-components-core";
1
2
  import { defineComponent, provide, renderSlot } from "vue";
2
- import { g as getObject } from "../core/index-C0Pbv44C.js";
3
3
  const INJECT_CONFIG = {
4
4
  "pro-table": {
5
5
  injectionKey: Symbol(""),
@@ -218,3 +218,4 @@ export {
218
218
  INJECT_COMPONENTS as a,
219
219
  getInjectConfig as g
220
220
  };
221
+ //# sourceMappingURL=index-BGGIWSkO.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-BGGIWSkO.js","sources":["../../src/components/component-provider/constants/index.ts","../../src/components/component-provider/components/index.vue"],"sourcesContent":["import { RequiredComponentVars } from '../types';\nimport { InjectionKey, Component } from 'vue';\n\nexport type InjectConfigEntry<T = any> = {\n injectionKey: InjectionKey<T>;\n default: T;\n};\n\nexport const INJECT_CONFIG: {\n [key in keyof RequiredComponentVars]: {\n injectionKey: InjectionKey<RequiredComponentVars[key]>;\n default: RequiredComponentVars[key];\n };\n} = {\n 'pro-table': {\n injectionKey: Symbol(''),\n default: {\n pagination: {\n layout: 'total, sizes, prev, pager, next, jumper',\n pageSizes: [10, 20, 30, 40, 50, 100],\n background: true,\n },\n searchFormConfig: {\n layout: 'grid',\n expand: { minExpandRows: 2, expandStatus: false },\n },\n control: true,\n addIndexColumn: true,\n },\n },\n 'pro-form': {\n injectionKey: Symbol(''),\n default: { grid: { gutter: 24 } } as any,\n },\n 'pro-form-item': {\n injectionKey: Symbol(''),\n default: { span: 8 } as any,\n },\n input: {\n injectionKey: Symbol(''),\n default: { maxlength: 100, clearable: true, placeholder: '请输入' },\n },\n 'input.textarea': {\n injectionKey: Symbol(''),\n default: {\n maxlength: 200,\n autosize: { minRows: 3, maxRows: 6 },\n showWordLimit: true,\n clearable: true,\n placeholder: '请输入',\n },\n },\n 'input.password': {\n injectionKey: Symbol(''),\n default: {\n showPassword: true,\n maxlength: 100,\n clearable: true,\n placeholder: '请输入',\n },\n },\n 'input-number': {\n injectionKey: Symbol(''),\n default: {\n max: 10 ** 15 - 1,\n min: -(10 ** 15 + 1),\n controls: false,\n placeholder: '请输入',\n style: { width: '100%' },\n },\n },\n autocomplete: {\n injectionKey: Symbol(''),\n default: { clearable: true, placeholder: '请输入' },\n },\n select: {\n injectionKey: Symbol(''),\n default: { clearable: true, placeholder: '请选择' },\n },\n cascader: {\n injectionKey: Symbol(''),\n default: { clearable: true, placeholder: '请选择' },\n },\n 'date-picker': {\n injectionKey: Symbol(''),\n default: { style: { width: '100%' }, placeholder: '请选择' },\n },\n 'date-picker.date': {\n injectionKey: Symbol(''),\n default: { style: { width: '100%' }, placeholder: '请选择' },\n },\n 'date-picker.dates': {\n injectionKey: Symbol(''),\n default: { style: { width: '100%' }, placeholder: '请选择' },\n },\n 'date-picker.daterange': {\n injectionKey: Symbol(''),\n default: {\n style: { width: '100%' },\n startPlaceholder: '开始日期',\n endPlaceholder: '结束日期',\n },\n },\n 'date-picker.week': {\n injectionKey: Symbol(''),\n default: { style: { width: '100%' }, placeholder: '请选择' },\n },\n 'date-picker.month': {\n injectionKey: Symbol(''),\n default: { style: { width: '100%' }, placeholder: '请选择' },\n },\n 'date-picker.monthrange': {\n injectionKey: Symbol(''),\n default: {\n style: { width: '100%' },\n startPlaceholder: '开始月份',\n endPlaceholder: '结束月份',\n },\n },\n 'date-picker.months': {\n injectionKey: Symbol(''),\n default: { style: { width: '100%' }, placeholder: '请选择' },\n },\n 'date-picker.yearrange': {\n injectionKey: Symbol(''),\n default: {\n style: { width: '100%' },\n startPlaceholder: '开始年份',\n endPlaceholder: '结束年份',\n },\n },\n 'date-picker.year': {\n injectionKey: Symbol(''),\n default: { style: { width: '100%' }, placeholder: '请选择' },\n },\n 'date-picker.years': {\n injectionKey: Symbol(''),\n default: { style: { width: '100%' }, placeholder: '请选择' },\n },\n 'date-picker.datetime': {\n injectionKey: Symbol(''),\n default: { style: { width: '100%' }, placeholder: '请选择' },\n },\n 'date-picker.datetimerange': {\n injectionKey: Symbol(''),\n default: {\n style: { width: '100%' },\n startPlaceholder: '开始时间',\n endPlaceholder: '结束时间',\n },\n },\n 'time-picker': {\n injectionKey: Symbol(''),\n default: { style: { width: '100%' }, placeholder: '请选择' },\n },\n 'time-select': {\n injectionKey: Symbol(''),\n default: { style: { width: '100%' }, placeholder: '请选择' },\n },\n 'checkbox-group': {\n injectionKey: Symbol(''),\n default: {},\n },\n 'radio-group': {\n injectionKey: Symbol(''),\n default: {},\n },\n switch: {\n injectionKey: Symbol(''),\n default: { modelProp: 'modelValue' },\n },\n slider: {\n injectionKey: Symbol(''),\n default: {},\n },\n 'tree-select': {\n injectionKey: Symbol(''),\n default: { clearable: true, placeholder: '请选择' },\n },\n transfer: {\n injectionKey: Symbol(''),\n default: {},\n },\n};\n\nexport const INJECT_COMPONENTS: InjectionKey<\n Partial<Record<string, Component>>\n> = Symbol('INJECT_COMPONENTS');\n\nconst DYNAMIC_INJECT_CONFIG: Record<string, InjectConfigEntry> =\n Object.create(null);\n\nexport const getInjectConfig = (key: string): InjectConfigEntry | undefined => {\n return (\n (INJECT_CONFIG as Record<string, InjectConfigEntry>)[key] ||\n DYNAMIC_INJECT_CONFIG[key]\n );\n};\n\nexport const ensureInjectConfig = (key: string): InjectConfigEntry => {\n const existing = getInjectConfig(key);\n if (existing) return existing;\n const created: InjectConfigEntry = {\n injectionKey: Symbol(`dynamic:${key}`),\n default: {},\n };\n DYNAMIC_INJECT_CONFIG[key] = created;\n return created;\n};\n","<script lang=\"ts\" setup>\n/**\n * @component ProComponentProvider\n * @description @qin-ui/element-plus-pro 全局配置提供者组件\n *\n * 用于在组件树的顶层配置所有子组件的全局默认属性。\n *\n * @param {ComponentVars} [componentVars] - 组件全局配置变量\n * @param {Record<ComponentName, any>} [componentMap] - 自定义组件映射\n *\n * @slot default - 子组件内容\n *\n * @example\n * ```vue\n * <ProComponentProvider\n * :componentVars=\"{ 'input': { placeholder: '请输入' } }\"\n * >\n * <ProForm :form=\"form\" :fields=\"fields\" />\n * </ProComponentProvider>\n * ```\n \n * @public\n */\nimport { ComponentVars } from '../types';\nimport { INJECT_COMPONENTS, ensureInjectConfig } from '../constants';\nimport { provide } from 'vue';\nimport { getObject } from '../../../shared/core';\nimport { ComponentName } from '../../form/constants';\n\ntype ComponentMap = Partial<Record<ComponentName, any>>;\n\ndefineOptions({\n name: 'ProComponentProvider',\n inheritAttrs: false,\n});\n\ntype Props = {\n /** 组件全局配置,可配置所有内置组件的默认属性 */\n componentVars?: ComponentVars;\n /** 自定义组件映射,用于替换或扩展内置组件 */\n componentMap?: ComponentMap;\n};\n\nconst props = defineProps<Props>();\n\n/*\n * 遍历 componentVars 的每个 key,获取或创建对应的 inject 配置\n * 将用户提供的值合并到默认值上,通过 provide 注入到子组件树\n * 子组件通过 inject(config.injectionKey) 获取合并后的配置\n */\nif (props.componentVars) {\n Object.entries(props.componentVars).forEach(([key, val]) => {\n const config = ensureInjectConfig(key);\n // 用户配置覆盖默认值\n provide(config.injectionKey, { ...config.default, ...getObject(val) });\n });\n}\n\n// 注入自定义组件映射,BaseField 在解析组件时会优先使用此映射\nif (props.componentMap) {\n provide(INJECT_COMPONENTS, props.componentMap);\n}\n</script>\n\n<template>\n <slot />\n</template>\n"],"names":["_renderSlot"],"mappings":";;AAQO,MAAM,gBAKT;AAAA,EACF,aAAa;AAAA,IACX,cAAc,OAAO,EAAE;AAAA,IACvB,SAAS;AAAA,MACP,YAAY;AAAA,QACV,QAAQ;AAAA,QACR,WAAW,CAAC,IAAI,IAAI,IAAI,IAAI,IAAI,GAAG;AAAA,QACnC,YAAY;AAAA,MAAA;AAAA,MAEd,kBAAkB;AAAA,QAChB,QAAQ;AAAA,QACR,QAAQ,EAAE,eAAe,GAAG,cAAc,MAAA;AAAA,MAAM;AAAA,MAElD,SAAS;AAAA,MACT,gBAAgB;AAAA,IAAA;AAAA,EAClB;AAAA,EAEF,YAAY;AAAA,IACV,cAAc,OAAO,EAAE;AAAA,IACvB,SAAS,EAAE,MAAM,EAAE,QAAQ,KAAG;AAAA,EAAE;AAAA,EAElC,iBAAiB;AAAA,IAC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,IACvB,SAAS,CAAA;AAAA,EAAC;AAEd;AAEO,MAAM,oBAET,OAAO,mBAAmB;AAE9B,MAAM,wBACJ,uBAAO,OAAO,IAAI;AAEb,MAAM,kBAAkB,CAAC,QAA+C;AAC7E,SACG,cAAoD,GAAG,KACxD,sBAAsB,GAAG;AAE7B;AAEO,MAAM,qBAAqB,CAAC,QAAmC;AACpE,QAAM,WAAW,gBAAgB,GAAG;AACpC,MAAI,SAAU,QAAO;AACrB,QAAM,UAA6B;AAAA,IACjC,cAAc,OAAO,WAAW,GAAG,EAAE;AAAA,IACrC,SAAS,CAAA;AAAA,EAAC;AAEZ,wBAAsB,GAAG,IAAI;AAC7B,SAAO;AACT;;;;;;;;;;;;ACrKA,UAAM,QAAQ;AAOd,QAAI,MAAM,eAAe;AACvB,aAAO,QAAQ,MAAM,aAAa,EAAE,QAAQ,CAAC,CAAC,KAAK,GAAG,MAAM;AAC1D,cAAM,SAAS,mBAAmB,GAAG;AAErC,gBAAQ,OAAO,cAAc,EAAE,GAAG,OAAO,SAAS,GAAG,UAAU,GAAG,GAAG;AAAA,MACvE,CAAC;AAAA,IACH;AAGA,QAAI,MAAM,cAAc;AACtB,cAAQ,mBAAmB,MAAM,YAAY;AAAA,IAC/C;;aAIEA,WAAQ,KAAA,QAAA,SAAA;AAAA;;;"}
@@ -1,4 +1,5 @@
1
- import { _ } from "./index-Bmx9Q9Q-.js";
1
+ import { _ } from "./index-BGGIWSkO.js";
2
2
  export {
3
3
  _ as default
4
4
  };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,27 @@
1
+ import { ComponentVars } from '../types';
2
+ import { ComponentName } from '../../form/constants';
3
+ type ComponentMap = Partial<Record<ComponentName, any>>;
4
+ type Props = {
5
+ /** 组件全局配置,可配置所有内置组件的默认属性 */
6
+ componentVars?: ComponentVars;
7
+ /** 自定义组件映射,用于替换或扩展内置组件 */
8
+ componentMap?: ComponentMap;
9
+ };
10
+ declare function __VLS_template(): {
11
+ attrs: Partial<{}>;
12
+ slots: {
13
+ default?(_: {}): any;
14
+ };
15
+ refs: {};
16
+ rootEl: any;
17
+ };
18
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
+ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
20
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
21
+ export default _default;
22
+ type __VLS_WithTemplateSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
27
+ //# sourceMappingURL=index.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/component-provider/components/index.vue"],"names":[],"mappings":"AAqEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIzC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,KAAK,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC,CAAC;AAOxD,KAAK,KAAK,GAAG;IACX,4BAA4B;IAC5B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,0BAA0B;IAC1B,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC;AAyBF,iBAAS,cAAc;WAoBT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAQD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,sRAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { RequiredComponentVars } from '../types';
2
+ import { InjectionKey, Component } from 'vue';
3
+ export type InjectConfigEntry<T = any> = {
4
+ injectionKey: InjectionKey<T>;
5
+ default: T;
6
+ };
7
+ export declare const INJECT_CONFIG: {
8
+ [key in keyof RequiredComponentVars]: {
9
+ injectionKey: InjectionKey<RequiredComponentVars[key]>;
10
+ default: RequiredComponentVars[key];
11
+ };
12
+ };
13
+ export declare const INJECT_COMPONENTS: InjectionKey<Partial<Record<string, Component>>>;
14
+ export declare const getInjectConfig: (key: string) => InjectConfigEntry | undefined;
15
+ export declare const ensureInjectConfig: (key: string) => InjectConfigEntry;
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/component-provider/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAE9C,MAAM,MAAM,iBAAiB,CAAC,CAAC,GAAG,GAAG,IAAI;IACvC,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IAC9B,OAAO,EAAE,CAAC,CAAC;CACZ,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE;KACzB,GAAG,IAAI,MAAM,qBAAqB,GAAG;QACpC,YAAY,EAAE,YAAY,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAC;QACvD,OAAO,EAAE,qBAAqB,CAAC,GAAG,CAAC,CAAC;KACrC;CA2KF,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAC1C,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CACL,CAAC;AAKhC,eAAO,MAAM,eAAe,GAAI,KAAK,MAAM,KAAG,iBAAiB,GAAG,SAKjE,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,KAAK,MAAM,KAAG,iBAShD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { default as ComponentProvider } from './components/index.vue';
2
+ export { type ComponentVars } from './types';
3
+ export default ComponentProvider;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/component-provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AAGvD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { GridItemProps, FormItemProps, TableProps, PaginationProps, DatePicker } from '../../../shared/ui';
2
+ import { ComponentName, GetComponentType } from '../../form/constants';
3
+ import { Base, Grid } from '../../form/types';
4
+ import { ProFormProps } from '../../form';
5
+ import { AllowedComponentProps } from 'vue';
6
+ import { ComponentProps } from 'vue-component-type-helpers';
7
+ type PP<T extends Record<string, any>> = Partial<T & AllowedComponentProps>;
8
+ type FP<T extends Record<string, any>> = Partial<T & Pick<Base, 'valueFormatter' | 'componentContainer' | 'modelProp' | 'componentClass' | 'componentStyle'> & AllowedComponentProps>;
9
+ type DatePickerType = NonNullable<ComponentProps<typeof DatePicker>['type']>;
10
+ export type RequiredComponentVars = {
11
+ 'pro-table': PP<TableProps & {
12
+ pagination?: Partial<PaginationProps>;
13
+ control?: boolean | {
14
+ sizeControl?: boolean;
15
+ columnControl?: boolean;
16
+ };
17
+ searchFormConfig?: any;
18
+ immediateSearch?: boolean;
19
+ addIndexColumn?: boolean;
20
+ tableContainer?: any;
21
+ }>;
22
+ 'pro-form': PP<Omit<ProFormProps, 'form' | 'grid'> & {
23
+ grid: Exclude<Grid, undefined | boolean>;
24
+ }>;
25
+ 'pro-form-item': PP<FormItemProps & Pick<GridItemProps, 'span' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'> & Pick<Base, 'formItemContainer'>>;
26
+ 'input.password': FP<ComponentProps<GetComponentType<'input'>>>;
27
+ 'input.textarea': FP<ComponentProps<GetComponentType<'input'>>>;
28
+ } & {
29
+ [K in DatePickerType as `date-picker.${K}`]: FP<ComponentProps<GetComponentType<'date-picker'>>>;
30
+ } & {
31
+ [K in Exclude<ComponentName, 'custom'>]: FP<ComponentProps<GetComponentType<K>>>;
32
+ };
33
+ export type ComponentVars = Partial<RequiredComponentVars>;
34
+ export {};
35
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/component-provider/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,aAAa,EACb,UAAU,EACV,eAAe,EACf,UAAU,EACX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,KAAK,EAAE,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,OAAO,CAAC,CAAC,GAAG,qBAAqB,CAAC,CAAC;AAE5E,KAAK,EAAE,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,OAAO,CAC9C,CAAC,GACC,IAAI,CACF,IAAI,EACF,gBAAgB,GAChB,oBAAoB,GACpB,WAAW,GACX,gBAAgB,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GAAG;KACD,CAAC,IAAI,OAAO,CAAC,aAAa,EAAE,QAAQ,CAAC,GAAG,EAAE,CACzC,cAAc,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CACpC;CACF,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { Component } from 'vue';
2
+ type Props = {
3
+ component?: string | Component;
4
+ path?: string;
5
+ };
6
+ declare const _default: import('vue').DefineComponent<Props, {
7
+ getComponentRef: () => any;
8
+ getComponentComputedProps: () => any;
9
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
10
+ componentRef: unknown;
11
+ }, any>;
12
+ export default _default;
13
+ //# sourceMappingURL=index.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/BaseField/index.vue"],"names":[],"mappings":"AAuLA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,KAAK,CAAC;AAYb,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;;;qCA4G6D,GAAG;;;;AAsGlE,wBAQG"}
@@ -0,0 +1,3 @@
1
+ import { Field } from '../../../types';
2
+ export declare const getInitProps: (field: Field) => Record<string, any>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/components/BaseField/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAIvC,eAAO,MAAM,YAAY,GAAI,OAAO,KAAK,KAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAU7D,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { Fields, Grid } from '../../types';
2
+ type Props = {
3
+ grid?: Grid;
4
+ fields?: Fields;
5
+ disabled?: boolean;
6
+ };
7
+ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
8
+ export default _default;
9
+ //# sourceMappingURL=index.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/BaseFormItem/index.vue"],"names":[],"mappings":"AAgNA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAQhD,KAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;;AA8QF,wBAMG"}
@@ -0,0 +1,23 @@
1
+ import { ContainerComponent } from '../../types';
2
+ type Props = {
3
+ component?: ContainerComponent;
4
+ };
5
+ declare function __VLS_template(): {
6
+ attrs: Partial<{}>;
7
+ slots: {
8
+ default?(_: {}): any;
9
+ default?(_: {}): any;
10
+ };
11
+ refs: {};
12
+ rootEl: any;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
17
+ export default _default;
18
+ type __VLS_WithTemplateSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
23
+ //# sourceMappingURL=index.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/ContainerFragment/index.vue"],"names":[],"mappings":"AA0BA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,kBAAkB,CAAC;CAChC,CAAC;AASF,iBAAS,cAAc;WAoCT,OAAO,IAA6B;;yBAZrB,GAAG;yBACH,GAAG;;;;EAgB/B;AAQD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,sRAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { GridItemProps, FormItemProps } from '../../../../shared/ui';
2
+ import { Base, Field } from '../../types';
3
+ import { FORM_ITEM_SLOT_KEYS } from '../../constants';
4
+ type Props = {
5
+ field: Field;
6
+ };
7
+ declare function __VLS_template(): {
8
+ attrs: Partial<{}>;
9
+ slots: {
10
+ default?(_: {
11
+ gridItemProps: GridItemProps;
12
+ formItemProps: FormItemProps & {
13
+ container?: Base["formItemContainer"];
14
+ };
15
+ formItemSlots: Record<(typeof FORM_ITEM_SLOT_KEYS)[number], any>;
16
+ componentProps: Record<string, any>;
17
+ }): any;
18
+ };
19
+ refs: {};
20
+ rootEl: any;
21
+ };
22
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
23
+ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
24
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
25
+ export default _default;
26
+ type __VLS_WithTemplateSlots<T, S> = T & {
27
+ new (): {
28
+ $slots: S;
29
+ };
30
+ };
31
+ //# sourceMappingURL=index.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/GroupedFieldAttrs/index.vue"],"names":[],"mappings":"AA0IA,OAAO,EACL,aAAa,EACb,aAAa,EAGd,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAMtD,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AA4EF,iBAAS,cAAc;WAqBT,OAAO,IAA6B;;;2BAzFjC,aAAa;2BACb,aAAa,GAAG;gBAAE,SAAS,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAA;aAAE;2BACzD,MAAM,CAAC,CAAC,OAAO,mBAAmB,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC;4BAChD,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;YA4ER,GAAG;;;;EAe/B;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,sRAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { NamePath } from '../../../../shared/ui';
2
+ type __VLS_Props = {
3
+ path?: NamePath;
4
+ };
5
+ declare function __VLS_template(): {
6
+ attrs: Partial<{}>;
7
+ slots: {
8
+ default?(_: {
9
+ path: string | undefined;
10
+ }): any;
11
+ };
12
+ refs: {};
13
+ rootEl: any;
14
+ };
15
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
17
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
18
+ export default _default;
19
+ type __VLS_WithTemplateSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
24
+ //# sourceMappingURL=index.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/PathProvider/index.vue"],"names":[],"mappings":"AAuBA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,KAAK,WAAW,GAAG;IAAE,IAAI,CAAC,EAAE,QAAQ,CAAA;CAAE,CAAC;AAavC,iBAAS,cAAc;WAqBT,OAAO,IAA6B;;;;YAVrB,GAAG;;;;EAe/B;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}