@aithe/aithe-ui 26.3.1 → 26.3.2
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 +8 -5
- package/dist/apps/api/i18n/de-DE.d.ts.map +1 -1
- package/dist/apps/api/i18n/de-DE.js +1 -0
- package/dist/apps/api/i18n/en-US.d.ts.map +1 -1
- package/dist/apps/api/i18n/en-US.js +1 -0
- package/dist/apps/api/i18n/es-ES.d.ts.map +1 -1
- package/dist/apps/api/i18n/es-ES.js +1 -0
- package/dist/apps/api/i18n/fr-FR.d.ts.map +1 -1
- package/dist/apps/api/i18n/fr-FR.js +1 -0
- package/dist/apps/api/i18n/ja-JP.d.ts.map +1 -1
- package/dist/apps/api/i18n/ja-JP.js +1 -0
- package/dist/apps/api/i18n/ko-KR.d.ts.map +1 -1
- package/dist/apps/api/i18n/ko-KR.js +1 -0
- package/dist/apps/api/i18n/pt-BR.d.ts.map +1 -1
- package/dist/apps/api/i18n/pt-BR.js +1 -0
- package/dist/apps/api/i18n/zh-CN.d.ts.map +1 -1
- package/dist/apps/api/i18n/zh-CN.js +1 -0
- package/dist/apps/api/i18n/zh-HK.d.ts.map +1 -1
- package/dist/apps/api/i18n/zh-HK.js +1 -0
- package/dist/apps/api/i18n/zh-TW.d.ts.map +1 -1
- package/dist/apps/api/i18n/zh-TW.js +1 -0
- package/dist/apps/api/pages/docs.d.ts.map +1 -1
- package/dist/apps/api/pages/docs.js +2 -0
- package/dist/apps/demo/app.d.ts.map +1 -1
- package/dist/apps/demo/app.js +2 -0
- package/dist/apps/demo/i18n/de-DE.d.ts.map +1 -1
- package/dist/apps/demo/i18n/de-DE.js +20 -0
- package/dist/apps/demo/i18n/en-US.d.ts.map +1 -1
- package/dist/apps/demo/i18n/en-US.js +20 -0
- package/dist/apps/demo/i18n/es-ES.d.ts.map +1 -1
- package/dist/apps/demo/i18n/es-ES.js +20 -0
- package/dist/apps/demo/i18n/fr-FR.d.ts.map +1 -1
- package/dist/apps/demo/i18n/fr-FR.js +20 -0
- package/dist/apps/demo/i18n/ja-JP.d.ts.map +1 -1
- package/dist/apps/demo/i18n/ja-JP.js +20 -0
- package/dist/apps/demo/i18n/ko-KR.d.ts.map +1 -1
- package/dist/apps/demo/i18n/ko-KR.js +20 -0
- package/dist/apps/demo/i18n/pt-BR.d.ts.map +1 -1
- package/dist/apps/demo/i18n/pt-BR.js +20 -0
- package/dist/apps/demo/i18n/zh-CN.d.ts.map +1 -1
- package/dist/apps/demo/i18n/zh-CN.js +20 -0
- package/dist/apps/demo/i18n/zh-HK.d.ts.map +1 -1
- package/dist/apps/demo/i18n/zh-HK.js +20 -0
- package/dist/apps/demo/i18n/zh-TW.d.ts.map +1 -1
- package/dist/apps/demo/i18n/zh-TW.js +20 -0
- package/dist/apps/demo/pages/autoform.d.ts.map +1 -1
- package/dist/apps/demo/pages/autoform.js +10 -0
- package/dist/apps/demo/pages/autoview.d.ts +3 -0
- package/dist/apps/demo/pages/autoview.d.ts.map +1 -0
- package/dist/apps/demo/pages/autoview.js +310 -0
- package/dist/apps/demo/pages/form.d.ts.map +1 -1
- package/dist/apps/demo/pages/form.js +20 -0
- package/dist/components/data/tree-menu.js +1 -1
- package/dist/components/display/autoview.d.ts +139 -0
- package/dist/components/display/autoview.d.ts.map +1 -0
- package/dist/components/display/autoview.js +460 -0
- package/dist/components/display/desc.d.ts +4 -0
- package/dist/components/display/desc.d.ts.map +1 -1
- package/dist/components/display/desc.js +45 -3
- package/dist/components/form/autoform-item.d.ts +6 -0
- package/dist/components/form/autoform-item.d.ts.map +1 -1
- package/dist/components/form/autoform-item.js +34 -4
- package/dist/components/form/combobox.d.ts +4 -0
- package/dist/components/form/combobox.d.ts.map +1 -1
- package/dist/components/form/combobox.js +56 -13
- package/dist/components/form/select.d.ts +4 -0
- package/dist/components/form/select.d.ts.map +1 -1
- package/dist/components/form/select.js +84 -40
- package/dist/components/navigation/sub-menu.d.ts.map +1 -1
- package/dist/components/navigation/sub-menu.js +0 -1
- package/dist/core/autoform/autoview.d.ts +86 -0
- package/dist/core/autoform/autoview.d.ts.map +1 -0
- package/dist/core/autoform/autoview.js +37 -0
- package/dist/core/autoform/index.d.ts +2 -0
- package/dist/core/autoform/index.d.ts.map +1 -1
- package/dist/core/autoform/index.js +1 -0
- package/dist/core/datahub/__tests__/force-options.test.d.ts +8 -0
- package/dist/core/datahub/__tests__/force-options.test.d.ts.map +1 -0
- package/dist/core/datahub/__tests__/force-options.test.js +161 -0
- package/dist/core/datahub/core/api-styles.d.ts.map +1 -1
- package/dist/core/datahub/core/api-styles.js +5 -0
- package/dist/core/datahub/core/datahub-core.d.ts +50 -0
- package/dist/core/datahub/core/datahub-core.d.ts.map +1 -1
- package/dist/core/datahub/core/datahub-core.js +160 -81
- package/dist/core/datahub/types.d.ts +18 -0
- package/dist/core/datahub/types.d.ts.map +1 -1
- package/dist/core/markdown/plugins.d.ts +2 -1
- package/dist/core/markdown/plugins.d.ts.map +1 -1
- package/dist/core/markdown/plugins.js +168 -21
- package/dist/core/types.d.ts +2 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1267 -753
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +282 -138
- package/dist/index.umd.js.map +1 -1
- package/dist/styles/i18n/locales/de-DE.d.ts.map +1 -1
- package/dist/styles/i18n/locales/de-DE.js +3 -0
- package/dist/styles/i18n/locales/en-US.d.ts.map +1 -1
- package/dist/styles/i18n/locales/en-US.js +3 -0
- package/dist/styles/i18n/locales/es-ES.d.ts.map +1 -1
- package/dist/styles/i18n/locales/es-ES.js +3 -0
- package/dist/styles/i18n/locales/fr-FR.d.ts.map +1 -1
- package/dist/styles/i18n/locales/fr-FR.js +3 -0
- package/dist/styles/i18n/locales/ja-JP.d.ts.map +1 -1
- package/dist/styles/i18n/locales/ja-JP.js +3 -0
- package/dist/styles/i18n/locales/ko-KR.d.ts.map +1 -1
- package/dist/styles/i18n/locales/ko-KR.js +3 -0
- package/dist/styles/i18n/locales/pt-BR.d.ts.map +1 -1
- package/dist/styles/i18n/locales/pt-BR.js +3 -0
- package/dist/styles/i18n/locales/zh-CN.d.ts.map +1 -1
- package/dist/styles/i18n/locales/zh-CN.js +3 -0
- package/dist/styles/i18n/locales/zh-HK.d.ts.map +1 -1
- package/dist/styles/i18n/locales/zh-HK.js +3 -0
- package/dist/styles/i18n/locales/zh-TW.d.ts.map +1 -1
- package/dist/styles/i18n/locales/zh-TW.js +3 -0
- package/docs/api/display/autoview.md +277 -0
- package/docs/api/display/desc.md +56 -14
- package/docs/api/form/autoform-item.md +16 -1
- package/docs/api/form/autoform.md +3 -2
- package/docs/api/form/combobox.md +27 -7
- package/docs/api/form/select.md +30 -8
- package/docs/api/summary.md +1 -0
- package/docs/autoform.md +1 -32
- package/docs/changelog/CHANGELOG.md +76 -1
- package/docs/changelog/VERSION_26.3.1.md +5 -5
- package/docs/changelog/VERSION_26.3.2.md +852 -0
- package/docs/datahub.md +3 -0
- package/docs/framework-integration.md +1 -1
- package/docs/guide.md +7 -6
- package/docs/i18n.md +1 -3
- package/docs/issue/26.3.2/issue_26.3.2.1.md +46 -0
- package/docs/issue/26.3.2/issue_26.3.2.2.md +82 -0
- package/docs/issue/26.3.2/issue_26.3.2.3.md +57 -0
- package/docs/issue/26.3.2/issue_26.3.2.4.md +43 -0
- package/docs/issue/AGENTS.md +24 -3
- package/docs/markdown.md +2 -2
- package/docs/quickstart.md +3 -3
- package/docs/theming.md +5 -4
- package/package.json +1 -1
- package/dist/components/navigation/dropdown.d.ts +0 -56
- package/dist/components/navigation/dropdown.d.ts.map +0 -1
- /package/docs/issue/{issue_26.2.2.1.md → 26.2.2/issue_26.2.2.1.md} +0 -0
- /package/docs/issue/{issue_26.2.2.2.md → 26.2.2/issue_26.2.2.2.md} +0 -0
- /package/docs/issue/{issue_26.2.2.3.md → 26.2.2/issue_26.2.2.3.md} +0 -0
- /package/docs/issue/{issue_26.2.2.4.md → 26.2.2/issue_26.2.2.4.md} +0 -0
- /package/docs/issue/{issue_26.2.3.1.md → 26.2.3/issue_26.2.3.1.md} +0 -0
- /package/docs/issue/{issue_26.2.3.10.md → 26.2.3/issue_26.2.3.10.md} +0 -0
- /package/docs/issue/{issue_26.2.3.11.md → 26.2.3/issue_26.2.3.11.md} +0 -0
- /package/docs/issue/{issue_26.2.3.12.md → 26.2.3/issue_26.2.3.12.md} +0 -0
- /package/docs/issue/{issue_26.2.3.13.md → 26.2.3/issue_26.2.3.13.md} +0 -0
- /package/docs/issue/{issue_26.2.3.14.md → 26.2.3/issue_26.2.3.14.md} +0 -0
- /package/docs/issue/{issue_26.2.3.15.md → 26.2.3/issue_26.2.3.15.md} +0 -0
- /package/docs/issue/{issue_26.2.3.16.md → 26.2.3/issue_26.2.3.16.md} +0 -0
- /package/docs/issue/{issue_26.2.3.2.md → 26.2.3/issue_26.2.3.2.md} +0 -0
- /package/docs/issue/{issue_26.2.3.3.md → 26.2.3/issue_26.2.3.3.md} +0 -0
- /package/docs/issue/{issue_26.2.3.4.md → 26.2.3/issue_26.2.3.4.md} +0 -0
- /package/docs/issue/{issue_26.2.3.5.md → 26.2.3/issue_26.2.3.5.md} +0 -0
- /package/docs/issue/{issue_26.2.3.6.md → 26.2.3/issue_26.2.3.6.md} +0 -0
- /package/docs/issue/{issue_26.2.3.7.md → 26.2.3/issue_26.2.3.7.md} +0 -0
- /package/docs/issue/{issue_26.2.3.8.md → 26.2.3/issue_26.2.3.8.md} +0 -0
- /package/docs/issue/{issue_26.2.3.9.md → 26.2.3/issue_26.2.3.9.md} +0 -0
- /package/docs/issue/{issue_26.3.1.0.md → 26.3.1/issue_26.3.1.0.md} +0 -0
- /package/docs/issue/{issue_26.3.1.1.md → 26.3.1/issue_26.3.1.1.md} +0 -0
- /package/docs/issue/{issue_26.3.1.2.md → 26.3.1/issue_26.3.1.2.md} +0 -0
- /package/docs/issue/{issue_26.3.1.3.md → 26.3.1/issue_26.3.1.3.md} +0 -0
- /package/docs/issue/{issue_26.3.1.4.md → 26.3.1/issue_26.3.1.4.md} +0 -0
- /package/docs/issue/{issue_26.3.1.5.md → 26.3.1/issue_26.3.1.5.md} +0 -0
- /package/docs/issue/{issue_26.3.1.6.md → 26.3.1/issue_26.3.1.6.md} +0 -0
- /package/docs/issue/{issue_26.3.1.7.md → 26.3.1/issue_26.3.1.7.md} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"de-DE.d.ts","sourceRoot":"","sources":["../../../../src/styles/i18n/locales/de-DE.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"de-DE.d.ts","sourceRoot":"","sources":["../../../../src/styles/i18n/locales/de-DE.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAkJrC,CAAC"}
|
|
@@ -27,6 +27,9 @@ export const de = {
|
|
|
27
27
|
'form.formItem.requiredField': 'Feld',
|
|
28
28
|
'form.autoform.submit': 'Absenden',
|
|
29
29
|
'form.autoform.patternMismatch': 'Format stimmt nicht überein',
|
|
30
|
+
'form.autoView.empty': '--',
|
|
31
|
+
'form.autoView.yes': 'Ja',
|
|
32
|
+
'form.autoView.no': 'Nein',
|
|
30
33
|
'feedback.modal.closeAriaLabel': 'Modal schließen',
|
|
31
34
|
'feedback.drawer.closeAriaLabel': 'Drawer schließen',
|
|
32
35
|
'data.tabs.removeTabAriaLabel': 'Tab entfernen',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en-US.d.ts","sourceRoot":"","sources":["../../../../src/styles/i18n/locales/en-US.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"en-US.d.ts","sourceRoot":"","sources":["../../../../src/styles/i18n/locales/en-US.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA2JrC,CAAC"}
|
|
@@ -27,6 +27,9 @@ export const en = {
|
|
|
27
27
|
'form.formItem.requiredField': 'Field',
|
|
28
28
|
'form.autoform.submit': 'Submit',
|
|
29
29
|
'form.autoform.patternMismatch': 'Format mismatch',
|
|
30
|
+
'form.autoView.empty': '--',
|
|
31
|
+
'form.autoView.yes': 'Yes',
|
|
32
|
+
'form.autoView.no': 'No',
|
|
30
33
|
'feedback.modal.closeAriaLabel': 'Close modal',
|
|
31
34
|
'feedback.drawer.closeAriaLabel': 'Close drawer',
|
|
32
35
|
'data.tabs.removeTabAriaLabel': 'Remove tab',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"es-ES.d.ts","sourceRoot":"","sources":["../../../../src/styles/i18n/locales/es-ES.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"es-ES.d.ts","sourceRoot":"","sources":["../../../../src/styles/i18n/locales/es-ES.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAkJrC,CAAC"}
|
|
@@ -27,6 +27,9 @@ export const es = {
|
|
|
27
27
|
'form.formItem.requiredField': 'Campo',
|
|
28
28
|
'form.autoform.submit': 'Enviar',
|
|
29
29
|
'form.autoform.patternMismatch': 'El formato no coincide',
|
|
30
|
+
'form.autoView.empty': '--',
|
|
31
|
+
'form.autoView.yes': 'Sí',
|
|
32
|
+
'form.autoView.no': 'No',
|
|
30
33
|
'feedback.modal.closeAriaLabel': 'Cerrar modal',
|
|
31
34
|
'feedback.drawer.closeAriaLabel': 'Cerrar panel',
|
|
32
35
|
'data.tabs.removeTabAriaLabel': 'Eliminar pestaña',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fr-FR.d.ts","sourceRoot":"","sources":["../../../../src/styles/i18n/locales/fr-FR.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"fr-FR.d.ts","sourceRoot":"","sources":["../../../../src/styles/i18n/locales/fr-FR.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAkJrC,CAAC"}
|
|
@@ -27,6 +27,9 @@ export const fr = {
|
|
|
27
27
|
'form.formItem.requiredField': 'Champ',
|
|
28
28
|
'form.autoform.submit': 'Soumettre',
|
|
29
29
|
'form.autoform.patternMismatch': 'Le format ne correspond pas',
|
|
30
|
+
'form.autoView.empty': '--',
|
|
31
|
+
'form.autoView.yes': 'Oui',
|
|
32
|
+
'form.autoView.no': 'Non',
|
|
30
33
|
'feedback.modal.closeAriaLabel': 'Fermer la modale',
|
|
31
34
|
'feedback.drawer.closeAriaLabel': 'Fermer le tiroir',
|
|
32
35
|
'data.tabs.removeTabAriaLabel': "Supprimer l'onglet",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ja-JP.d.ts","sourceRoot":"","sources":["../../../../src/styles/i18n/locales/ja-JP.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ja-JP.d.ts","sourceRoot":"","sources":["../../../../src/styles/i18n/locales/ja-JP.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAkJrC,CAAC"}
|
|
@@ -27,6 +27,9 @@ export const ja = {
|
|
|
27
27
|
'form.formItem.requiredField': 'フィールド',
|
|
28
28
|
'form.autoform.submit': '送信',
|
|
29
29
|
'form.autoform.patternMismatch': 'フォーマットが一致しません',
|
|
30
|
+
'form.autoView.empty': '--',
|
|
31
|
+
'form.autoView.yes': 'はい',
|
|
32
|
+
'form.autoView.no': 'いいえ',
|
|
30
33
|
'feedback.modal.closeAriaLabel': 'モーダルを閉じる',
|
|
31
34
|
'feedback.drawer.closeAriaLabel': 'ドロワーを閉じる',
|
|
32
35
|
'data.tabs.removeTabAriaLabel': 'タブを削除',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ko-KR.d.ts","sourceRoot":"","sources":["../../../../src/styles/i18n/locales/ko-KR.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ko-KR.d.ts","sourceRoot":"","sources":["../../../../src/styles/i18n/locales/ko-KR.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAkJrC,CAAC"}
|
|
@@ -27,6 +27,9 @@ export const ko = {
|
|
|
27
27
|
'form.formItem.requiredField': '필드',
|
|
28
28
|
'form.autoform.submit': '제출',
|
|
29
29
|
'form.autoform.patternMismatch': '형식이 일치하지 않습니다',
|
|
30
|
+
'form.autoView.empty': '--',
|
|
31
|
+
'form.autoView.yes': '예',
|
|
32
|
+
'form.autoView.no': '아니오',
|
|
30
33
|
'feedback.modal.closeAriaLabel': '모달 닫기',
|
|
31
34
|
'feedback.drawer.closeAriaLabel': '서랍 닫기',
|
|
32
35
|
'data.tabs.removeTabAriaLabel': '탭 제거',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pt-BR.d.ts","sourceRoot":"","sources":["../../../../src/styles/i18n/locales/pt-BR.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"pt-BR.d.ts","sourceRoot":"","sources":["../../../../src/styles/i18n/locales/pt-BR.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAkJvC,CAAC"}
|
|
@@ -27,6 +27,9 @@ export const ptBr = {
|
|
|
27
27
|
'form.formItem.requiredField': 'Campo',
|
|
28
28
|
'form.autoform.submit': 'Enviar',
|
|
29
29
|
'form.autoform.patternMismatch': 'O formato não corresponde',
|
|
30
|
+
'form.autoView.empty': '--',
|
|
31
|
+
'form.autoView.yes': 'Sim',
|
|
32
|
+
'form.autoView.no': 'Não',
|
|
30
33
|
'feedback.modal.closeAriaLabel': 'Fechar modal',
|
|
31
34
|
'feedback.drawer.closeAriaLabel': 'Fechar painel',
|
|
32
35
|
'data.tabs.removeTabAriaLabel': 'Remover aba',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zh-CN.d.ts","sourceRoot":"","sources":["../../../../src/styles/i18n/locales/zh-CN.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"zh-CN.d.ts","sourceRoot":"","sources":["../../../../src/styles/i18n/locales/zh-CN.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA2JrC,CAAC"}
|
|
@@ -27,6 +27,9 @@ export const zh = {
|
|
|
27
27
|
'form.formItem.requiredField': '字段',
|
|
28
28
|
'form.autoform.submit': '提交',
|
|
29
29
|
'form.autoform.patternMismatch': '格式不匹配',
|
|
30
|
+
'form.autoView.empty': '--',
|
|
31
|
+
'form.autoView.yes': '是',
|
|
32
|
+
'form.autoView.no': '否',
|
|
30
33
|
'feedback.modal.closeAriaLabel': '关闭弹窗',
|
|
31
34
|
'feedback.drawer.closeAriaLabel': '关闭抽屉',
|
|
32
35
|
'data.tabs.removeTabAriaLabel': '移除标签页',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zh-HK.d.ts","sourceRoot":"","sources":["../../../../src/styles/i18n/locales/zh-HK.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"zh-HK.d.ts","sourceRoot":"","sources":["../../../../src/styles/i18n/locales/zh-HK.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAkJvC,CAAC"}
|
|
@@ -27,6 +27,9 @@ export const zhHk = {
|
|
|
27
27
|
'form.formItem.requiredField': '欄位',
|
|
28
28
|
'form.autoform.submit': '提交',
|
|
29
29
|
'form.autoform.patternMismatch': '格式不符',
|
|
30
|
+
'form.autoView.empty': '--',
|
|
31
|
+
'form.autoView.yes': '是',
|
|
32
|
+
'form.autoView.no': '否',
|
|
30
33
|
'feedback.modal.closeAriaLabel': '關閉彈窗',
|
|
31
34
|
'feedback.drawer.closeAriaLabel': '關閉抽屜',
|
|
32
35
|
'data.tabs.removeTabAriaLabel': '移除標籤頁',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zh-TW.d.ts","sourceRoot":"","sources":["../../../../src/styles/i18n/locales/zh-TW.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"zh-TW.d.ts","sourceRoot":"","sources":["../../../../src/styles/i18n/locales/zh-TW.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAkJvC,CAAC"}
|
|
@@ -27,6 +27,9 @@ export const zhTw = {
|
|
|
27
27
|
'form.formItem.requiredField': '欄位',
|
|
28
28
|
'form.autoform.submit': '提交',
|
|
29
29
|
'form.autoform.patternMismatch': '格式不符',
|
|
30
|
+
'form.autoView.empty': '--',
|
|
31
|
+
'form.autoView.yes': '是',
|
|
32
|
+
'form.autoView.no': '否',
|
|
30
33
|
'feedback.modal.closeAriaLabel': '關閉彈窗',
|
|
31
34
|
'feedback.drawer.closeAriaLabel': '關閉抽屜',
|
|
32
35
|
'data.tabs.removeTabAriaLabel': '移除標籤頁',
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
# AitheAutoView / AitheAutoView 自动视图
|
|
2
|
+
|
|
3
|
+
> JSON-driven read-only detail view, the display-only counterpart of `<aithe-autoform>`. Shares the same `FormFieldConfig` model, rendering field values as a structured description list with type-aware read-only renderers.
|
|
4
|
+
> JSON 驱动的只读详情视图,`<aithe-autoform>` 的只读镜像。共用同一份 `FormFieldConfig` 模型,将字段值渲染为结构化描述列表,内置类型感知的只读渲染器。
|
|
5
|
+
|
|
6
|
+
## Import / 引入
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
import '@aithe/aithe-ui/components/display/autoview';
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Description / 描述
|
|
13
|
+
|
|
14
|
+
`AitheAutoView` is a thin adapter built on top of `<aithe-desc>`. It parses a `fields` JSON array (same model as autoform) and a `data` object, resolves dependency-based show/hide rules, transforms values per control type, and injects type-aware read-only content into `<aithe-desc-item>` slots.
|
|
15
|
+
|
|
16
|
+
Built-in renderers cover common control types: `input`/`textarea` (plain text), `select`/`radio` (label lookup), `checkbox` (tag list), `switch` (yes/no badge), `date-picker`/`time-picker` (formatted date), `color-picker` (color chip + hex), `rate`/`slider` (plain number). Custom renderers can be registered via `ViewRegistry`.
|
|
17
|
+
|
|
18
|
+
`AitheAutoView` 是基于 `<aithe-desc>` 的轻量适配器。解析 `fields` JSON 数组(与 autoform 同模型)和 `data` 对象,解析依赖联动显隐规则,按控件类型转换值,将类型感知的只读内容注入 `<aithe-desc-item>` 的 slot。
|
|
19
|
+
|
|
20
|
+
内置渲染器覆盖常见控件类型:`input`/`textarea`(纯文本)、`select`/`radio`(label 反查)、`checkbox`(标签组)、`switch`(是/否徽章)、`date-picker`/`time-picker`(格式化日期)、`color-picker`(色块+色值)、`rate`/`slider`(纯数值)。可通过 `ViewRegistry` 注册自定义渲染器。
|
|
21
|
+
|
|
22
|
+
## Slots / 插槽
|
|
23
|
+
|
|
24
|
+
| Name | Description (EN) | Description (CN) |
|
|
25
|
+
| --------- | ------------------------------------------------------------- | ----------------------------------------- |
|
|
26
|
+
| title | Custom title content (passed through to desc). | 自定义标题内容(透传给 desc)。 |
|
|
27
|
+
| extra | Extra action content in the header (passed through to desc). | 头部额外操作内容(透传给 desc)。 |
|
|
28
|
+
|
|
29
|
+
## Properties / 属性
|
|
30
|
+
|
|
31
|
+
| Name | Type | Default | Attribute | Description (EN) | Description (CN) |
|
|
32
|
+
| ---------------- | --------------------------------- | ---------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
|
|
33
|
+
| fields | `string` | `'[]'` | `fields` | JSON string of field configurations. Same model as autoform's `fields`. | 字段配置的 JSON 字符串,与 autoform 的 `fields` 模型一致。 |
|
|
34
|
+
| data | `Object \| string` | `{}` | `.data` | Display data object keyed by field name. Supports object or JSON string. | 展示数据对象,按字段名取值。支持对象或 JSON 字符串。 |
|
|
35
|
+
| column | `number` | `1` | `column` | Number of columns in the grid layout. Passed to desc. | 网格列数,透传给 desc。 |
|
|
36
|
+
| border | `boolean` | `true` | `border` | Whether to show full borders (outer frame + cell separators). Equivalent to `border-style="full"`. | 是否显示完整边框(外框+单元格分隔线),等同 `border-style="full"`。 |
|
|
37
|
+
| border-style | `'none' \| 'full' \| 'row'` | `'none'` | `border-style` | Border style: `none` (no borders), `full` (outer + all cell separators), `row` (row separators only). Passed to desc. | 边框样式:`none`(无边框)、`full`(外框+所有单元格分隔线)、`row`(仅行分隔线),透传给 desc。 |
|
|
38
|
+
| label-background | `'filled' \| 'none'` | `'filled'` | `label-background` | Label background style: `filled` (default gray) or `none` (transparent). Passed to desc. | 标签背景样式:`filled`(默认灰底)或 `none`(透明),透传给 desc。 |
|
|
39
|
+
| direction | `'horizontal' \| 'vertical'` | `'horizontal'` | `direction` | Layout direction. Passed to desc. | 布局方向,透传给 desc。 |
|
|
40
|
+
| label-width | `string` | `'150px'` | `label-width` | Label cell width. Passed to desc. | 标签单元格宽度,透传给 desc。 |
|
|
41
|
+
| size | `'sm' \| 'md' \| 'lg'` | `'md'` | `size` | Size preset. Passed to desc. | 尺寸规格,透传给 desc。 |
|
|
42
|
+
| title | `string` | `''` | `title` | Title text in the header. Passed to desc. | 头部标题文本,透传给 desc。 |
|
|
43
|
+
| show-title | `boolean` | `true` | `show-title` | Whether to show the title header. When false, the header row is hidden even if title or extra slot is set. Passed to desc. | 是否显示标题头。为 false 时隐藏标题行,即使设置了 title 或 extra slot 也不显示,透传给 desc。 |
|
|
44
|
+
| max-rows | `number` | `0` | `max-rows` | Max visible rows. 0 means no limit. Passed to desc. | 最大可见行数,0 表示不限制,透传给 desc。 |
|
|
45
|
+
| empty-text | `string` | `''` | `empty-text` | Global empty value placeholder. Falls back to i18n key `form.autoView.empty` (default `--`). | 全局空值占位文本,回退到 i18n 键 `form.autoView.empty`(默认 `--`)。 |
|
|
46
|
+
|
|
47
|
+
## Methods / 方法
|
|
48
|
+
|
|
49
|
+
| Name | Parameters | Return | Description (EN) | Description (CN) |
|
|
50
|
+
| --------- | ---------- | ----------------------- | --------------------------------------------------------- | ----------------------------------------- |
|
|
51
|
+
| getValues | — | `Record<string, unknown>` | Returns the values of all visible fields from `data`. | 返回所有可见字段在 `data` 中的值。 |
|
|
52
|
+
|
|
53
|
+
## Events / 事件
|
|
54
|
+
|
|
55
|
+
| Name | Detail | Cancelable | Description (EN) | Description (CN) |
|
|
56
|
+
| ---------------- | ----------------------------- | ---------- | --------------------------------------------------------------------- | ------------------------------------------------- |
|
|
57
|
+
| `aithe-view-ready` | `{ values }` | No | Emitted after initial render with current visible field values. | 初始渲染完成后触发,携带当前可见字段值。 |
|
|
58
|
+
|
|
59
|
+
## Supported Field Types / 支持的字段类型
|
|
60
|
+
|
|
61
|
+
| Type | Read-only Rendering (EN) | 只读渲染方式 (CN) |
|
|
62
|
+
| -------------- | ----------------------------------------------------------- | -------------------------------- |
|
|
63
|
+
| input | Plain text. | 纯文本。 |
|
|
64
|
+
| textarea | Plain text. | 纯文本。 |
|
|
65
|
+
| number | Plain text (supports `filter`). | 纯文本(支持 `filter`)。 |
|
|
66
|
+
| select | Label lookup from `options` by value. | 从 `options` 中按值反查 label。 |
|
|
67
|
+
| radio | Label lookup from `options` by value. | 从 `options` 中按值反查 label。 |
|
|
68
|
+
| checkbox | Tag list (`<aithe-tag>`) from `options` by value array. | 标签组(`<aithe-tag>`),按值数组反查。 |
|
|
69
|
+
| switch | Yes/No badge (`<aithe-tag>` with success/default variant). | 是/否徽章(`<aithe-tag>`,success/default 变体)。 |
|
|
70
|
+
| date-picker | Formatted date (`date yyyy-MM-dd` filter). | 格式化日期(`date yyyy-MM-dd` 过滤器)。 |
|
|
71
|
+
| time-picker | Formatted date. | 格式化日期。 |
|
|
72
|
+
| color-picker | Color chip + hex text. | 色块 + 色值文本。 |
|
|
73
|
+
| rate | Plain number. | 纯数值。 |
|
|
74
|
+
| slider | Plain number. | 纯数值。 |
|
|
75
|
+
| _(custom)_ | Any type registered via `ViewRegistry`. | 通过 `ViewRegistry` 注册的类型。 |
|
|
76
|
+
|
|
77
|
+
## Field Configuration / 字段配置
|
|
78
|
+
|
|
79
|
+
Each field in the `fields` JSON array supports the following properties (all extending `FormFieldConfig`):
|
|
80
|
+
|
|
81
|
+
`fields` JSON 数组中每个字段支持以下属性(均扩展自 `FormFieldConfig`):
|
|
82
|
+
|
|
83
|
+
| Property | Type | Required | Description (EN) | Description (CN) |
|
|
84
|
+
| ------------ | ---------- | -------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------- |
|
|
85
|
+
| name | `string` | yes | Field name, used to look up value in `data`. | 字段名称,用于在 `data` 中取值。 |
|
|
86
|
+
| type | `string` | yes | Field control type (see table above). | 字段控件类型(见上表)。 |
|
|
87
|
+
| label | `string` | no | Label text displayed in the label cell. | 标签单元格中显示的文本。 |
|
|
88
|
+
| options | `array` | no | Options for select/radio/checkbox. Each: `{ label, id }`. | 选择类控件选项,每项:`{ label, id }`。 |
|
|
89
|
+
| dft | `string` | no | Default value when field is absent in `data`. | 字段在 `data` 中缺失时的缺省值。 |
|
|
90
|
+
| filter | `string` | no | Filter expression for value formatting (e.g. `"date yyyy-MM-dd"`, `"amount"`). | 值过滤器表达式(如 `"date yyyy-MM-dd"`、`"amount"`)。 |
|
|
91
|
+
| emptyText | `string` | no | Per-field empty placeholder; falls back to component's `empty-text`. | 单字段空值占位文本,回退到组件的 `empty-text`。 |
|
|
92
|
+
| span | `number` | no | Column span in the grid. Default 1. | 网格中占用的列数,默认 1。 |
|
|
93
|
+
| rowspan | `number` | no | Row span in the grid. Default 1. | 网格中占用的行数,默认 1。 |
|
|
94
|
+
| align | `string` | no | Content text alignment: `'left'` / `'center'` / `'right'`. | 内容文本对齐方式:`'left'` / `'center'` / `'right'`。 |
|
|
95
|
+
| hideLabel | `boolean` | no | Whether to hide the label cell. | 是否隐藏标签单元格。 |
|
|
96
|
+
| dependencies | `string[]` | no | Names of fields this field depends on (for show/hide rules). | 当前字段依赖的字段名称列表(用于显隐规则)。 |
|
|
97
|
+
| rules | `FormRule[]` | no | Dependency rules. Only `show`/`hide` types are honored in read-only mode. | 依赖联动规则。只读模式下仅生效 `show`/`hide`。 |
|
|
98
|
+
|
|
99
|
+
## Custom View Registry / 自定义视图注册表
|
|
100
|
+
|
|
101
|
+
The autoview supports registering custom read-only renderers via the `ViewRegistry` class, mirroring `FormRegistry`. This allows extending the view with any custom rendering logic without modifying the autoview source.
|
|
102
|
+
|
|
103
|
+
autoview 支持通过 `ViewRegistry` 类注册自定义只读渲染器,与 `FormRegistry` 对称。无需修改 autoview 源码即可扩展视图。
|
|
104
|
+
|
|
105
|
+
### ViewRegistry Static Methods / ViewRegistry 静态方法
|
|
106
|
+
|
|
107
|
+
| Method | Description (EN) | Description (CN) |
|
|
108
|
+
| ----------------------------- | -------------------------------------- | ------------------------------ |
|
|
109
|
+
| `ViewRegistry.register(def)` | Register a custom view renderer. | 注册自定义只读渲染器。 |
|
|
110
|
+
| `ViewRegistry.unregister(type)` | Unregister a view type. | 注销视图类型。 |
|
|
111
|
+
| `ViewRegistry.get(type)` | Get a registered view definition. | 获取已注册的视图定义。 |
|
|
112
|
+
| `ViewRegistry.has(type)` | Check if a view type is registered. | 检查视图类型是否已注册。 |
|
|
113
|
+
| `ViewRegistry.types()` | Get all registered view type names. | 获取所有已注册的视图类型名。 |
|
|
114
|
+
|
|
115
|
+
### ViewControlDefinition / 视图控件定义
|
|
116
|
+
|
|
117
|
+
| Property | Type | Required | Description (EN) | Description (CN) |
|
|
118
|
+
| -------- | -------------------------- | -------- | ---------------------------------------------------- | --------------------------------------- |
|
|
119
|
+
| type | `string` | yes | Unique type name matching the `type` in field config. | 唯一类型名称,匹配字段配置中的 type。 |
|
|
120
|
+
| render | `(ctx) => TemplateResult` | yes | Renderer function returning the read-only template. | 返回只读模板的渲染函数。 |
|
|
121
|
+
|
|
122
|
+
### ViewRenderContext / 渲染上下文
|
|
123
|
+
|
|
124
|
+
| Property | Type | Description (EN) | Description (CN) |
|
|
125
|
+
| ---------- | ---------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------- |
|
|
126
|
+
| value | `unknown` | Transformed value (boolean for switch, number for number, string[] for checkbox). | 转换后的值(switch 为布尔、number 为数值、checkbox 为字符串数组)。 |
|
|
127
|
+
| rawValue | `string` | Raw string value as stored in `data`. | `data` 中的原始字符串值。 |
|
|
128
|
+
| options | `FormItemOption[]` | Options for select/radio/checkbox controls. | 选择类控件的选项。 |
|
|
129
|
+
| field | `ViewFieldConfig` | Full field configuration. | 完整字段配置。 |
|
|
130
|
+
| emptyText | `string` | Resolved empty placeholder text. | 解析后的空值占位文本。 |
|
|
131
|
+
|
|
132
|
+
### Register Example / 注册示例
|
|
133
|
+
|
|
134
|
+
```ts
|
|
135
|
+
import { ViewRegistry } from '@aithe/aithe-ui';
|
|
136
|
+
import { html } from 'lit';
|
|
137
|
+
|
|
138
|
+
ViewRegistry.register({
|
|
139
|
+
type: 'status-badge',
|
|
140
|
+
render: (ctx) => html`
|
|
141
|
+
<aithe-tag variant=${ctx.value === 'active' ? 'success' : 'default'} size="sm">
|
|
142
|
+
${ctx.rawValue || ctx.emptyText}
|
|
143
|
+
</aithe-tag>
|
|
144
|
+
`,
|
|
145
|
+
});
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Then use it in the fields JSON:
|
|
149
|
+
|
|
150
|
+
```json
|
|
151
|
+
{
|
|
152
|
+
"name": "status",
|
|
153
|
+
"type": "status-badge",
|
|
154
|
+
"label": "Status"
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Dependency & Visibility / 依赖联动与显隐
|
|
159
|
+
|
|
160
|
+
The autoview supports field dependency linkage through the same JSON configuration as autoform. When a dependency field's value changes, the dependent field re-evaluates its `show`/`hide` rules to determine visibility.
|
|
161
|
+
|
|
162
|
+
autoview 支持与 autoform 相同的 JSON 配置实现字段依赖联动。当被依赖字段的值变化时,依赖字段重新计算 `show`/`hide` 规则决定可见性。
|
|
163
|
+
|
|
164
|
+
> **Note / 注意**: In read-only mode, only `show` and `hide` rule types are honored. `disable`/`enable`/`clear`/`update` rules are ignored.
|
|
165
|
+
> 只读模式下仅生效 `show`/`hide` 规则,`disable`/`enable`/`clear`/`update` 规则被忽略。
|
|
166
|
+
|
|
167
|
+
### Show/Hide Example / 显隐示例
|
|
168
|
+
|
|
169
|
+
```json
|
|
170
|
+
[
|
|
171
|
+
{
|
|
172
|
+
"name": "hasCar",
|
|
173
|
+
"label": "Has a car?",
|
|
174
|
+
"type": "switch"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "carModel",
|
|
178
|
+
"label": "Car Model",
|
|
179
|
+
"type": "input",
|
|
180
|
+
"dependencies": ["hasCar"],
|
|
181
|
+
"rules": [{ "type": "show", "condition": "hasCar === true" }]
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Examples / 示例
|
|
187
|
+
|
|
188
|
+
### Basic Usage / 基础用法
|
|
189
|
+
|
|
190
|
+
```html
|
|
191
|
+
<aithe-autoview
|
|
192
|
+
fields='[
|
|
193
|
+
{"name":"username","type":"input","label":"Username"},
|
|
194
|
+
{"name":"email","type":"input","label":"Email","inputType":"email"},
|
|
195
|
+
{"name":"bio","type":"textarea","label":"Bio","span":2}
|
|
196
|
+
]'
|
|
197
|
+
.data=${{username:"John Doe",email:"john@example.com",bio:"Frontend engineer."}}
|
|
198
|
+
column="2"
|
|
199
|
+
border
|
|
200
|
+
></aithe-autoview>
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### Selection Display / 选择类展示
|
|
204
|
+
|
|
205
|
+
```html
|
|
206
|
+
<aithe-autoview
|
|
207
|
+
fields='[
|
|
208
|
+
{"name":"role","type":"select","label":"Role","options":[{"label":"Admin","id":"admin"},{"label":"Editor","id":"editor"}]},
|
|
209
|
+
{"name":"skills","type":"checkbox","label":"Skills","options":[{"label":"TypeScript","id":"ts"},{"label":"Go","id":"go"}]},
|
|
210
|
+
{"name":"notifications","type":"switch","label":"Notifications"}
|
|
211
|
+
]'
|
|
212
|
+
.data=${{role:"editor",skills:["ts","go"],notifications:true}}
|
|
213
|
+
column="2"
|
|
214
|
+
border
|
|
215
|
+
></aithe-autoview>
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### Border Styles / 边框样式
|
|
219
|
+
|
|
220
|
+
```html
|
|
221
|
+
<!-- No border, no label background: clean style -->
|
|
222
|
+
<aithe-autoview border-style="none" label-background="none" column="2"></aithe-autoview>
|
|
223
|
+
|
|
224
|
+
<!-- Full border with filled labels -->
|
|
225
|
+
<aithe-autoview border-style="full" label-background="filled" column="2"></aithe-autoview>
|
|
226
|
+
|
|
227
|
+
<!-- Row separators only, no outer frame -->
|
|
228
|
+
<aithe-autoview border-style="row" label-background="none" column="2"></aithe-autoview>
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Hidden Title / 隐藏标题头
|
|
232
|
+
|
|
233
|
+
Set `show-title="false"` to hide the header row entirely, even when `title` or the `extra` slot is provided. Useful for embedding autoview inside another container that already provides a heading.
|
|
234
|
+
|
|
235
|
+
设置 `show-title="false"` 可彻底隐藏标题行,即使设置了 `title` 或 `extra` slot 也不显示。适用于将 autoview 嵌入已有标题的容器中。
|
|
236
|
+
|
|
237
|
+
```html
|
|
238
|
+
<!-- Header row is hidden, title and extra slot are ignored -->
|
|
239
|
+
<aithe-autoview
|
|
240
|
+
title="Employee Profile"
|
|
241
|
+
show-title="false"
|
|
242
|
+
column="2"
|
|
243
|
+
border
|
|
244
|
+
></aithe-autoview>
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### Dependency Visibility / 联动显隐
|
|
248
|
+
|
|
249
|
+
```html
|
|
250
|
+
<aithe-autoview
|
|
251
|
+
fields='[
|
|
252
|
+
{"name":"province","type":"select","label":"Province","options":[{"label":"Beijing","id":"BJ"},{"label":"Shanghai","id":"SH"}]},
|
|
253
|
+
{"name":"city","type":"select","label":"City","dependencies":["province"],"rules":[{"type":"show","condition":"province !== ''"}]},
|
|
254
|
+
{"name":"hasCar","type":"switch","label":"Has a car?"},
|
|
255
|
+
{"name":"carModel","type":"input","label":"Car Model","dependencies":["hasCar"],"rules":[{"type":"show","condition":"hasCar === true"}]}
|
|
256
|
+
]'
|
|
257
|
+
.data=${{province:"BJ",city:"Haidian",hasCar:true,carModel:"Tesla Model 3"}}
|
|
258
|
+
column="2"
|
|
259
|
+
border
|
|
260
|
+
></aithe-autoview>
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
### Empty Values / 空值展示
|
|
264
|
+
|
|
265
|
+
```html
|
|
266
|
+
<aithe-autoview
|
|
267
|
+
fields='[
|
|
268
|
+
{"name":"username","type":"input","label":"Username"},
|
|
269
|
+
{"name":"role","type":"select","label":"Role","options":[{"label":"Admin","id":"admin"}]},
|
|
270
|
+
{"name":"active","type":"switch","label":"Active"}
|
|
271
|
+
]'
|
|
272
|
+
.data=${{username:"",role:"",active:false}}
|
|
273
|
+
column="2"
|
|
274
|
+
border
|
|
275
|
+
empty-text="—"
|
|
276
|
+
></aithe-autoview>
|
|
277
|
+
```
|
package/docs/api/display/desc.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# AitheDesc / AitheDesc 描述列表
|
|
2
2
|
|
|
3
|
-
> A description list component that displays key-value pairs in a structured table-like layout. Supports border
|
|
4
|
-
>
|
|
3
|
+
> A description list component that displays key-value pairs in a structured table-like layout. Supports border styles, label background, column count, title, extra actions, direction control, colspan, and rowspan.
|
|
4
|
+
> 描述列表组件,以结构化的类表格布局展示键值对。支持边框样式、标签背景、列数、标题、额外操作、方向控制、列合并和行合并。
|
|
5
5
|
|
|
6
6
|
## Import / 引入
|
|
7
7
|
|
|
@@ -12,22 +12,24 @@ import '@aithe/aithe-ui/components/display/desc-item';
|
|
|
12
12
|
|
|
13
13
|
## Description / 描述
|
|
14
14
|
|
|
15
|
-
`AitheDesc` renders a structured key-value list using CSS Grid layout. It places `<aithe-desc-item>` children into a grid based on the `column` property and each item's `span` and `rowspan`. Supports border
|
|
15
|
+
`AitheDesc` renders a structured key-value list using CSS Grid layout. It places `<aithe-desc-item>` children into a grid based on the `column` property and each item's `span` and `rowspan`. Supports border styles (`none`/`full`/`row`), label background (`filled`/`none`), vertical/horizontal direction, title, extra slot, and size variants.
|
|
16
16
|
|
|
17
|
-
`AitheDesc` 使用 CSS Grid 布局渲染结构化的键值列表。根据 `column` 属性和每个条目的 `span`/`rowspan` 将 `<aithe-desc-item>`
|
|
17
|
+
`AitheDesc` 使用 CSS Grid 布局渲染结构化的键值列表。根据 `column` 属性和每个条目的 `span`/`rowspan` 将 `<aithe-desc-item>` 子元素放置到网格中。支持边框样式(`none`/`full`/`row`)、标签背景(`filled`/`none`)、垂直/水平方向、标题、额外插槽和尺寸变体。
|
|
18
18
|
|
|
19
19
|
## AitheDesc Properties / AitheDesc 属性
|
|
20
20
|
|
|
21
|
-
| Name
|
|
22
|
-
|
|
|
23
|
-
| title
|
|
24
|
-
| column
|
|
25
|
-
| border
|
|
26
|
-
|
|
|
27
|
-
|
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
|
|
|
21
|
+
| Name | Type | Default | Attribute | Description (EN) | Description (CN) |
|
|
22
|
+
| ---------------- | --------------------------------- | -------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
|
|
23
|
+
| title | `string` | `''` | `title` | Title text displayed in the header. | 头部标题文本。 |
|
|
24
|
+
| column | `number` | `1` | `column` | Number of columns for the description layout. | 描述布局的列数。 |
|
|
25
|
+
| border | `boolean` | `false` | `border` | Whether to show full borders (outer frame + cell separators). Equivalent to `border-style="full"`. | 是否显示完整边框(外框+单元格分隔线),等同 `border-style="full"`。 |
|
|
26
|
+
| border-style | `'none' \| 'full' \| 'row'` | `'none'` | `border-style` | Border style: `none` (no borders), `full` (outer + all cell separators), `row` (row separators only, no outer frame or column separators). | 边框样式:`none`(无边框)、`full`(外框+所有单元格分隔线)、`row`(仅行分隔线,无外框和列分隔线)。 |
|
|
27
|
+
| label-background | `'filled' \| 'none'` | `'filled'` | `label-background` | Label background style: `filled` (default gray) or `none` (transparent). | 标签背景样式:`filled`(默认灰底)或 `none`(透明)。 |
|
|
28
|
+
| direction | `'horizontal' \| 'vertical'` | `'horizontal'` | `direction` | Layout direction: label left of content or label above content. | 布局方向:标签在内容左侧或上方。 |
|
|
29
|
+
| size | `'sm' \| 'md' \| 'lg'` | `'md'` | `size` | Size of the description list. | 描述列表的尺寸。 |
|
|
30
|
+
| labelWidth | `string` | `'150px'` | `label-width` | Global label width. Falls back to individual item's label-width. | 全局标签宽度,item 单独设置时优先。 |
|
|
31
|
+
| showTitle | `boolean` | `true` | `show-title` | Whether to show the title header. | 是否显示标题头。 |
|
|
32
|
+
| maxRows | `number` | `0` | `max-rows` | Maximum visible rows. 0 means no limit. | 最大可见行数,0 表示不限制。 |
|
|
31
33
|
|
|
32
34
|
## AitheDescItem Properties / AitheDescItem 属性
|
|
33
35
|
|
|
@@ -102,6 +104,46 @@ import '@aithe/aithe-ui/components/display/desc-item';
|
|
|
102
104
|
</aithe-desc>
|
|
103
105
|
```
|
|
104
106
|
|
|
107
|
+
### Border Styles / 边框样式
|
|
108
|
+
|
|
109
|
+
`border-style` provides three modes: `none` (no borders), `full` (outer frame + all cell separators), `row` (row separators only).
|
|
110
|
+
|
|
111
|
+
`border-style` 提供三种模式:`none`(无边框)、`full`(外框+所有单元格分隔线)、`row`(仅行分隔线)。
|
|
112
|
+
|
|
113
|
+
```html
|
|
114
|
+
<!-- Full border (equivalent to `border`) -->
|
|
115
|
+
<aithe-desc title="Full Border" border-style="full" column="2">
|
|
116
|
+
<aithe-desc-item label="Name">John Doe</aithe-desc-item>
|
|
117
|
+
<aithe-desc-item label="Age">30</aithe-desc-item>
|
|
118
|
+
<aithe-desc-item label="Email">john@example.com</aithe-desc-item>
|
|
119
|
+
<aithe-desc-item label="Phone">+1 234 5678</aithe-desc-item>
|
|
120
|
+
</aithe-desc>
|
|
121
|
+
|
|
122
|
+
<!-- Row separators only, no outer frame -->
|
|
123
|
+
<aithe-desc title="Row Separators" border-style="row" column="2">
|
|
124
|
+
<aithe-desc-item label="Name">John Doe</aithe-desc-item>
|
|
125
|
+
<aithe-desc-item label="Age">30</aithe-desc-item>
|
|
126
|
+
<aithe-desc-item label="Email">john@example.com</aithe-desc-item>
|
|
127
|
+
<aithe-desc-item label="Phone">+1 234 5678</aithe-desc-item>
|
|
128
|
+
</aithe-desc>
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Label Background / 标签背景
|
|
132
|
+
|
|
133
|
+
`label-background` controls whether the label cell has a gray background (`filled`, default) or is transparent (`none`). Combine with `border-style="row"` for a clean, minimal style.
|
|
134
|
+
|
|
135
|
+
`label-background` 控制标签单元格是否为灰底(`filled`,默认)或透明(`none`)。配合 `border-style="row"` 可实现简洁风格。
|
|
136
|
+
|
|
137
|
+
```html
|
|
138
|
+
<!-- No label background + row separators: minimal style -->
|
|
139
|
+
<aithe-desc title="Minimal" border-style="row" label-background="none" column="2">
|
|
140
|
+
<aithe-desc-item label="Name">John Doe</aithe-desc-item>
|
|
141
|
+
<aithe-desc-item label="Age">30</aithe-desc-item>
|
|
142
|
+
<aithe-desc-item label="Email">john@example.com</aithe-desc-item>
|
|
143
|
+
<aithe-desc-item label="Phone">+1 234 5678</aithe-desc-item>
|
|
144
|
+
</aithe-desc>
|
|
145
|
+
```
|
|
146
|
+
|
|
105
147
|
### Column Span / 列合并
|
|
106
148
|
|
|
107
149
|
```html
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
| message | `string` | `''` | Validation failure message. | 校验失败提示语。 |
|
|
28
28
|
| options | `FormItemOption[]` | `[]` | Options for select/radio/checkbox. | 选择类控件的选项。 |
|
|
29
29
|
| value | `string` | `''` | Current field value. | 当前字段值。 |
|
|
30
|
-
| inputType | `string` | `'text'` | Input type attribute for type="input".
|
|
30
|
+
| inputType | `string` | `'text'` | Input type attribute for type="input". When set to `password`, a suffix icon button (`eye`/`eyeOff`) is rendered to toggle between masked and plaintext display. | input 控件的 type 属性。设为 `password` 时,后缀渲染图标按钮(`eye`/`eyeOff`)用于在密文与明文之间切换。 |
|
|
31
31
|
| min | `string` | `''` | Minimum value for number/slider. | 数字/滑块最小值。 |
|
|
32
32
|
| max | `string` | `''` | Maximum value for number/slider. | 数字/滑块最大值。 |
|
|
33
33
|
| step | `string` | `''` | Step value for number/slider/rate. | 数字/滑块/评分步长。 |
|
|
@@ -98,3 +98,18 @@
|
|
|
98
98
|
message="Please enter a valid phone number"
|
|
99
99
|
></aithe-autoform-item>
|
|
100
100
|
```
|
|
101
|
+
|
|
102
|
+
### 密码输入(带明文切换)
|
|
103
|
+
|
|
104
|
+
```html
|
|
105
|
+
<aithe-autoform-item
|
|
106
|
+
name="password"
|
|
107
|
+
type="input"
|
|
108
|
+
inputType="password"
|
|
109
|
+
label="Password"
|
|
110
|
+
icon="lock"
|
|
111
|
+
required
|
|
112
|
+
placeholder="Enter your password"
|
|
113
|
+
message="Password is required"
|
|
114
|
+
></aithe-autoform-item>
|
|
115
|
+
```
|