@akanjs/cli 0.0.143 → 0.0.145
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/cjs/index.js +2310 -3101
- package/cjs/src/guidelines/___library/sharedUiStructureDescription.en.md +786 -0
- package/cjs/src/guidelines/___library/utilUiStructureDescription.en.md +395 -0
- package/cjs/src/guidelines/___lint/lintRuleDescription.en.md +64 -0
- package/cjs/src/guidelines/___module/moduleStructureDescription.en.md +80 -0
- package/cjs/src/guidelines/componentRule/componentRule.instruction.md +732 -0
- package/cjs/src/guidelines/databaseModule/databaseModule.instruction.md +691 -0
- package/cjs/src/guidelines/enumConstant/enumConstant.instruction.md +232 -0
- package/cjs/src/guidelines/fieldDecorator/fieldDecorator.instruction.md +611 -0
- package/cjs/src/guidelines/framework/framework.instruction.md +1112 -0
- package/cjs/src/guidelines/modelConstant/modelConstant.instruction.md +958 -0
- package/cjs/src/guidelines/modelDictionary/modelDictionary.instruction.md +583 -0
- package/cjs/src/guidelines/modelDocument/modelDocument.instruction.md +683 -0
- package/cjs/src/guidelines/modelService/modelService.instruction.md +935 -0
- package/cjs/src/guidelines/modelSignal/modelSignal.instruction.md +588 -0
- package/cjs/src/guidelines/modelStore/modelStore.instruction.md +591 -0
- package/cjs/src/guidelines/modelTemplate/modelTemplate.instruction.md +577 -0
- package/cjs/src/guidelines/modelUnit/modelUnit.instruction.md +833 -0
- package/cjs/src/guidelines/modelUtil/modelUtil.instruction.md +752 -0
- package/cjs/src/guidelines/modelView/modelView.instruction.md +1005 -0
- package/cjs/src/guidelines/modelZone/modelZone.instruction.md +528 -0
- package/cjs/src/guidelines/scalarConstant/scalarConstant.instruction.md +489 -0
- package/cjs/src/guidelines/scalarDictionary/scalarDictionary.instruction.md +347 -0
- package/cjs/src/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +318 -0
- package/cjs/src/guidelines/utilUiUsage/utilUiUsage.instruction.md +339 -0
- package/cjs/src/templates/module/__model__.dictionary.js +4 -5
- package/esm/index.js +2398 -3184
- package/esm/src/guidelines/___library/sharedUiStructureDescription.en.md +786 -0
- package/esm/src/guidelines/___library/utilUiStructureDescription.en.md +395 -0
- package/esm/src/guidelines/___lint/lintRuleDescription.en.md +64 -0
- package/esm/src/guidelines/___module/moduleStructureDescription.en.md +80 -0
- package/esm/src/guidelines/componentRule/componentRule.instruction.md +732 -0
- package/esm/src/guidelines/databaseModule/databaseModule.instruction.md +691 -0
- package/esm/src/guidelines/enumConstant/enumConstant.instruction.md +232 -0
- package/esm/src/guidelines/fieldDecorator/fieldDecorator.instruction.md +611 -0
- package/esm/src/guidelines/framework/framework.instruction.md +1112 -0
- package/esm/src/guidelines/modelConstant/modelConstant.instruction.md +958 -0
- package/esm/src/guidelines/modelDictionary/modelDictionary.instruction.md +583 -0
- package/esm/src/guidelines/modelDocument/modelDocument.instruction.md +683 -0
- package/esm/src/guidelines/modelService/modelService.instruction.md +935 -0
- package/esm/src/guidelines/modelSignal/modelSignal.instruction.md +588 -0
- package/esm/src/guidelines/modelStore/modelStore.instruction.md +591 -0
- package/esm/src/guidelines/modelTemplate/modelTemplate.instruction.md +577 -0
- package/esm/src/guidelines/modelUnit/modelUnit.instruction.md +833 -0
- package/esm/src/guidelines/modelUtil/modelUtil.instruction.md +752 -0
- package/esm/src/guidelines/modelView/modelView.instruction.md +1005 -0
- package/esm/src/guidelines/modelZone/modelZone.instruction.md +528 -0
- package/esm/src/guidelines/scalarConstant/scalarConstant.instruction.md +489 -0
- package/esm/src/guidelines/scalarDictionary/scalarDictionary.instruction.md +347 -0
- package/esm/src/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +318 -0
- package/esm/src/guidelines/utilUiUsage/utilUiUsage.instruction.md +339 -0
- package/esm/src/templates/module/__model__.dictionary.js +4 -5
- package/package.json +3 -1
- package/src/guideline/guideline.command.d.ts +7 -0
- package/src/guideline/guideline.prompt.d.ts +15 -0
- package/src/guideline/guideline.runner.d.ts +5 -0
- package/src/guideline/guideline.script.d.ts +6 -0
- package/src/guidelines/___library/sharedUiStructureDescription.en.md +786 -0
- package/src/guidelines/___library/utilUiStructureDescription.en.md +395 -0
- package/src/guidelines/___lint/lintRuleDescription.en.md +64 -0
- package/src/guidelines/___module/moduleStructureDescription.en.md +80 -0
- package/src/guidelines/componentRule/componentRule.instruction.md +732 -0
- package/src/guidelines/databaseModule/databaseModule.instruction.md +691 -0
- package/src/guidelines/enumConstant/enumConstant.instruction.md +232 -0
- package/src/guidelines/fieldDecorator/fieldDecorator.instruction.md +611 -0
- package/src/guidelines/framework/framework.instruction.md +1112 -0
- package/src/guidelines/modelConstant/modelConstant.instruction.md +958 -0
- package/src/guidelines/modelDictionary/modelDictionary.instruction.md +583 -0
- package/src/guidelines/modelDocument/modelDocument.instruction.md +683 -0
- package/src/guidelines/modelService/modelService.instruction.md +935 -0
- package/src/guidelines/modelSignal/modelSignal.instruction.md +588 -0
- package/src/guidelines/modelStore/modelStore.instruction.md +591 -0
- package/src/guidelines/modelTemplate/modelTemplate.instruction.md +577 -0
- package/src/guidelines/modelUnit/modelUnit.instruction.md +833 -0
- package/src/guidelines/modelUtil/modelUtil.instruction.md +752 -0
- package/src/guidelines/modelView/modelView.instruction.md +1005 -0
- package/src/guidelines/modelZone/modelZone.instruction.md +528 -0
- package/src/guidelines/scalarConstant/scalarConstant.instruction.md +489 -0
- package/src/guidelines/scalarDictionary/scalarDictionary.instruction.md +347 -0
- package/src/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +318 -0
- package/src/guidelines/utilUiUsage/utilUiUsage.instruction.md +339 -0
- package/src/module/module.command.d.ts +0 -1
- package/src/module/module.prompt.d.ts +2 -15
- package/src/module/module.request.d.ts +22 -18
- package/src/module/module.runner.d.ts +1 -17
- package/src/module/module.script.d.ts +0 -1
- package/src/scalar/scalar.command.d.ts +7 -0
- package/src/scalar/scalar.prompt.d.ts +23 -0
- package/src/scalar/scalar.runner.d.ts +13 -0
- package/src/scalar/scalar.script.d.ts +6 -0
- package/cjs/src/templates/app/app/[lang]/(__appName__)/(public)/forgotpassword/page.js +0 -47
- package/cjs/src/templates/app/app/[lang]/(__appName__)/(public)/page.js +0 -128
- package/cjs/src/templates/app/app/[lang]/(__appName__)/(public)/privacy/page.js +0 -42
- package/cjs/src/templates/app/app/[lang]/(__appName__)/(public)/signin/page.js +0 -50
- package/cjs/src/templates/app/app/[lang]/(__appName__)/(public)/termsofservice/page.js +0 -41
- package/cjs/src/templates/app/app/[lang]/(__appName__)/(public)/unknown/page.js +0 -51
- package/cjs/src/templates/app/app/[lang]/(__appName__)/(user)/layout.js +0 -43
- package/cjs/src/templates/app/app/[lang]/(__appName__)/(user)/self/page.js +0 -60
- package/cjs/src/templates/app/app/[lang]/(__appName__)/layout.js +0 -54
- package/cjs/src/templates/app/app/[lang]/(__appName__)/styles.css.template +0 -19
- package/cjs/src/templates/app/app/[lang]/admin/layout.js +0 -54
- package/cjs/src/templates/app/app/[lang]/admin/page.js +0 -63
- package/cjs/src/templates/app/app/csr.js +0 -34
- package/cjs/src/templates/app/app/index.html.template +0 -13
- package/cjs/src/templates/app/app/layout.js +0 -38
- package/cjs/src/templates/app/capacitor.config.ts.template +0 -8
- package/cjs/src/templates/app/env/env.client.debug.ts.template +0 -7
- package/cjs/src/templates/app/env/env.client.develop.ts.template +0 -7
- package/cjs/src/templates/app/env/env.client.local.ts.template +0 -7
- package/cjs/src/templates/app/env/env.client.main.ts.template +0 -7
- package/cjs/src/templates/app/env/env.client.testing.ts.template +0 -7
- package/cjs/src/templates/app/env/env.server.debug.ts.template +0 -15
- package/cjs/src/templates/app/env/env.server.develop.ts.template +0 -15
- package/cjs/src/templates/app/env/env.server.local.ts.template +0 -15
- package/cjs/src/templates/app/env/env.server.main.ts.template +0 -15
- package/cjs/src/templates/app/env/env.server.testing.ts.template +0 -7
- package/cjs/src/templates/app/lib/setting/Setting.Template.js +0 -57
- package/cjs/src/templates/app/lib/setting/Setting.Unit.js +0 -38
- package/cjs/src/templates/app/lib/setting/Setting.Util.js +0 -34
- package/cjs/src/templates/app/lib/setting/Setting.View.js +0 -51
- package/cjs/src/templates/app/lib/setting/Setting.Zone.js +0 -80
- package/cjs/src/templates/app/lib/setting/index.js +0 -61
- package/cjs/src/templates/app/lib/summary/Summary.Template.js +0 -43
- package/cjs/src/templates/app/lib/summary/Summary.Unit.js +0 -38
- package/cjs/src/templates/app/lib/summary/Summary.Util.js +0 -33
- package/cjs/src/templates/app/lib/summary/Summary.View.js +0 -51
- package/cjs/src/templates/app/lib/summary/Summary.Zone.js +0 -62
- package/cjs/src/templates/app/lib/summary/index.js +0 -67
- package/cjs/src/templates/app/lib/user/User.Template.js +0 -65
- package/cjs/src/templates/app/lib/user/User.Unit.js +0 -38
- package/cjs/src/templates/app/lib/user/User.Util.js +0 -94
- package/cjs/src/templates/app/lib/user/User.View.js +0 -66
- package/cjs/src/templates/app/lib/user/User.Zone.js +0 -74
- package/cjs/src/templates/app/lib/user/index.js +0 -61
- package/cjs/src/templates/app/page.test.ts.template +0 -10
- package/cjs/src/templates/app/playwright.config.ts.template +0 -6
- package/cjs/src/templates/app/postcss.config.js.template +0 -10
- package/cjs/src/templates/app/public/manifest.json.template +0 -67
- package/cjs/src/templates/app/tsconfig.json.template +0 -22
- package/cjs/src/templates/app/tsconfig.spec.json.template +0 -7
- package/cjs/src/templates/app/ui/Footer.js +0 -67
- package/cjs/src/templates/app/ui/MainHeader.js +0 -131
- package/cjs/src/templates/crudPages/[__model__Id]/edit/page.js +0 -73
- package/cjs/src/templates/crudPages/[__model__Id]/page.js +0 -83
- package/cjs/src/templates/crudPages/new/page.js +0 -70
- package/cjs/src/templates/crudPages/page.js +0 -71
- package/cjs/src/templates/libRoot/.gitignore.template +0 -15
- package/cjs/src/templates/libRoot/env/env.server.example.ts.template +0 -7
- package/cjs/src/templates/libRoot/env/env.server.testing.ts.template +0 -7
- package/cjs/src/templates/libRoot/lib/setting/Setting.Template.js +0 -57
- package/cjs/src/templates/libRoot/lib/setting/Setting.Unit.js +0 -38
- package/cjs/src/templates/libRoot/lib/setting/Setting.Util.js +0 -34
- package/cjs/src/templates/libRoot/lib/setting/Setting.View.js +0 -51
- package/cjs/src/templates/libRoot/lib/setting/Setting.Zone.js +0 -80
- package/cjs/src/templates/libRoot/lib/setting/index.js +0 -61
- package/cjs/src/templates/libRoot/lib/summary/Summary.Template.js +0 -43
- package/cjs/src/templates/libRoot/lib/summary/Summary.Unit.js +0 -38
- package/cjs/src/templates/libRoot/lib/summary/Summary.Util.js +0 -33
- package/cjs/src/templates/libRoot/lib/summary/Summary.View.js +0 -51
- package/cjs/src/templates/libRoot/lib/summary/Summary.Zone.js +0 -62
- package/cjs/src/templates/libRoot/lib/summary/index.js +0 -67
- package/cjs/src/templates/libRoot/lib/user/User.Template.js +0 -65
- package/cjs/src/templates/libRoot/lib/user/User.Unit.js +0 -38
- package/cjs/src/templates/libRoot/lib/user/User.Util.js +0 -94
- package/cjs/src/templates/libRoot/lib/user/User.View.js +0 -66
- package/cjs/src/templates/libRoot/lib/user/User.Zone.js +0 -74
- package/cjs/src/templates/libRoot/lib/user/index.js +0 -61
- package/cjs/src/templates/libRoot/package.json.template +0 -4
- package/cjs/src/templates/libRoot/tsconfig.json.template +0 -13
- package/cjs/src/templates/libRoot/tsconfig.spec.json.template +0 -7
- package/cjs/src/templates/localDev/docker-compose.yaml.template +0 -36
- package/cjs/src/templates/module/__Model__.Template.js +0 -54
- package/cjs/src/templates/module/__Model__.Unit.js +0 -42
- package/cjs/src/templates/module/__Model__.Util.js +0 -70
- package/cjs/src/templates/module/__Model__.View.js +0 -48
- package/cjs/src/templates/module/__Model__.Zone.js +0 -83
- package/cjs/src/templates/module/index.js +0 -61
- package/cjs/src/templates/pkgRoot/tsconfig.json.template +0 -15
- package/cjs/src/templates/workspaceRoot/.env.template +0 -20
- package/cjs/src/templates/workspaceRoot/.gitignore.template +0 -118
- package/cjs/src/templates/workspaceRoot/.prettierignore.template +0 -10
- package/cjs/src/templates/workspaceRoot/.prettierrc.json.template +0 -6
- package/cjs/src/templates/workspaceRoot/.swcrc.template +0 -9
- package/cjs/src/templates/workspaceRoot/.vscode/settings.json.template +0 -13
- package/cjs/src/templates/workspaceRoot/README.md.template +0 -37
- package/cjs/src/templates/workspaceRoot/eslint.config.ts.template +0 -3
- package/cjs/src/templates/workspaceRoot/package.json.template +0 -43
- package/cjs/src/templates/workspaceRoot/tsconfig.json.template +0 -29
- package/esm/src/templates/app/app/[lang]/(__appName__)/(public)/forgotpassword/page.js +0 -27
- package/esm/src/templates/app/app/[lang]/(__appName__)/(public)/page.js +0 -108
- package/esm/src/templates/app/app/[lang]/(__appName__)/(public)/privacy/page.js +0 -22
- package/esm/src/templates/app/app/[lang]/(__appName__)/(public)/signin/page.js +0 -30
- package/esm/src/templates/app/app/[lang]/(__appName__)/(public)/termsofservice/page.js +0 -21
- package/esm/src/templates/app/app/[lang]/(__appName__)/(public)/unknown/page.js +0 -31
- package/esm/src/templates/app/app/[lang]/(__appName__)/(user)/layout.js +0 -23
- package/esm/src/templates/app/app/[lang]/(__appName__)/(user)/self/page.js +0 -40
- package/esm/src/templates/app/app/[lang]/(__appName__)/layout.js +0 -34
- package/esm/src/templates/app/app/[lang]/(__appName__)/styles.css.template +0 -19
- package/esm/src/templates/app/app/[lang]/admin/layout.js +0 -34
- package/esm/src/templates/app/app/[lang]/admin/page.js +0 -43
- package/esm/src/templates/app/app/csr.js +0 -14
- package/esm/src/templates/app/app/index.html.template +0 -13
- package/esm/src/templates/app/app/layout.js +0 -18
- package/esm/src/templates/app/capacitor.config.ts.template +0 -8
- package/esm/src/templates/app/env/env.client.debug.ts.template +0 -7
- package/esm/src/templates/app/env/env.client.develop.ts.template +0 -7
- package/esm/src/templates/app/env/env.client.local.ts.template +0 -7
- package/esm/src/templates/app/env/env.client.main.ts.template +0 -7
- package/esm/src/templates/app/env/env.client.testing.ts.template +0 -7
- package/esm/src/templates/app/env/env.server.debug.ts.template +0 -15
- package/esm/src/templates/app/env/env.server.develop.ts.template +0 -15
- package/esm/src/templates/app/env/env.server.local.ts.template +0 -15
- package/esm/src/templates/app/env/env.server.main.ts.template +0 -15
- package/esm/src/templates/app/env/env.server.testing.ts.template +0 -7
- package/esm/src/templates/app/lib/setting/Setting.Template.js +0 -37
- package/esm/src/templates/app/lib/setting/Setting.Unit.js +0 -18
- package/esm/src/templates/app/lib/setting/Setting.Util.js +0 -14
- package/esm/src/templates/app/lib/setting/Setting.View.js +0 -31
- package/esm/src/templates/app/lib/setting/Setting.Zone.js +0 -60
- package/esm/src/templates/app/lib/setting/index.js +0 -41
- package/esm/src/templates/app/lib/summary/Summary.Template.js +0 -23
- package/esm/src/templates/app/lib/summary/Summary.Unit.js +0 -18
- package/esm/src/templates/app/lib/summary/Summary.Util.js +0 -13
- package/esm/src/templates/app/lib/summary/Summary.View.js +0 -31
- package/esm/src/templates/app/lib/summary/Summary.Zone.js +0 -42
- package/esm/src/templates/app/lib/summary/index.js +0 -47
- package/esm/src/templates/app/lib/user/User.Template.js +0 -45
- package/esm/src/templates/app/lib/user/User.Unit.js +0 -18
- package/esm/src/templates/app/lib/user/User.Util.js +0 -74
- package/esm/src/templates/app/lib/user/User.View.js +0 -46
- package/esm/src/templates/app/lib/user/User.Zone.js +0 -54
- package/esm/src/templates/app/lib/user/index.js +0 -41
- package/esm/src/templates/app/page.test.ts.template +0 -10
- package/esm/src/templates/app/playwright.config.ts.template +0 -6
- package/esm/src/templates/app/postcss.config.js.template +0 -10
- package/esm/src/templates/app/public/manifest.json.template +0 -67
- package/esm/src/templates/app/tsconfig.json.template +0 -22
- package/esm/src/templates/app/tsconfig.spec.json.template +0 -7
- package/esm/src/templates/app/ui/Footer.js +0 -47
- package/esm/src/templates/app/ui/MainHeader.js +0 -111
- package/esm/src/templates/crudPages/[__model__Id]/edit/page.js +0 -53
- package/esm/src/templates/crudPages/[__model__Id]/page.js +0 -63
- package/esm/src/templates/crudPages/new/page.js +0 -50
- package/esm/src/templates/crudPages/page.js +0 -51
- package/esm/src/templates/libRoot/.gitignore.template +0 -15
- package/esm/src/templates/libRoot/env/env.server.example.ts.template +0 -7
- package/esm/src/templates/libRoot/env/env.server.testing.ts.template +0 -7
- package/esm/src/templates/libRoot/lib/setting/Setting.Template.js +0 -37
- package/esm/src/templates/libRoot/lib/setting/Setting.Unit.js +0 -18
- package/esm/src/templates/libRoot/lib/setting/Setting.Util.js +0 -14
- package/esm/src/templates/libRoot/lib/setting/Setting.View.js +0 -31
- package/esm/src/templates/libRoot/lib/setting/Setting.Zone.js +0 -60
- package/esm/src/templates/libRoot/lib/setting/index.js +0 -41
- package/esm/src/templates/libRoot/lib/summary/Summary.Template.js +0 -23
- package/esm/src/templates/libRoot/lib/summary/Summary.Unit.js +0 -18
- package/esm/src/templates/libRoot/lib/summary/Summary.Util.js +0 -13
- package/esm/src/templates/libRoot/lib/summary/Summary.View.js +0 -31
- package/esm/src/templates/libRoot/lib/summary/Summary.Zone.js +0 -42
- package/esm/src/templates/libRoot/lib/summary/index.js +0 -47
- package/esm/src/templates/libRoot/lib/user/User.Template.js +0 -45
- package/esm/src/templates/libRoot/lib/user/User.Unit.js +0 -18
- package/esm/src/templates/libRoot/lib/user/User.Util.js +0 -74
- package/esm/src/templates/libRoot/lib/user/User.View.js +0 -46
- package/esm/src/templates/libRoot/lib/user/User.Zone.js +0 -54
- package/esm/src/templates/libRoot/lib/user/index.js +0 -41
- package/esm/src/templates/libRoot/package.json.template +0 -4
- package/esm/src/templates/libRoot/tsconfig.json.template +0 -13
- package/esm/src/templates/libRoot/tsconfig.spec.json.template +0 -7
- package/esm/src/templates/localDev/docker-compose.yaml.template +0 -36
- package/esm/src/templates/module/__Model__.Template.js +0 -34
- package/esm/src/templates/module/__Model__.Unit.js +0 -22
- package/esm/src/templates/module/__Model__.Util.js +0 -50
- package/esm/src/templates/module/__Model__.View.js +0 -28
- package/esm/src/templates/module/__Model__.Zone.js +0 -63
- package/esm/src/templates/module/index.js +0 -41
- package/esm/src/templates/pkgRoot/tsconfig.json.template +0 -15
- package/esm/src/templates/workspaceRoot/.env.template +0 -20
- package/esm/src/templates/workspaceRoot/.gitignore.template +0 -118
- package/esm/src/templates/workspaceRoot/.prettierignore.template +0 -10
- package/esm/src/templates/workspaceRoot/.prettierrc.json.template +0 -6
- package/esm/src/templates/workspaceRoot/.swcrc.template +0 -9
- package/esm/src/templates/workspaceRoot/.vscode/settings.json.template +0 -13
- package/esm/src/templates/workspaceRoot/README.md.template +0 -37
- package/esm/src/templates/workspaceRoot/eslint.config.ts.template +0 -3
- package/esm/src/templates/workspaceRoot/package.json.template +0 -43
- package/esm/src/templates/workspaceRoot/tsconfig.json.template +0 -29
- package/src/application/application.prompt.d.ts +0 -2
- package/src/templates/app/app/[lang]/(__appName__)/(public)/forgotpassword/page.d.ts +0 -9
- package/src/templates/app/app/[lang]/(__appName__)/(public)/page.d.ts +0 -9
- package/src/templates/app/app/[lang]/(__appName__)/(public)/privacy/page.d.ts +0 -9
- package/src/templates/app/app/[lang]/(__appName__)/(public)/signin/page.d.ts +0 -9
- package/src/templates/app/app/[lang]/(__appName__)/(public)/termsofservice/page.d.ts +0 -10
- package/src/templates/app/app/[lang]/(__appName__)/(public)/unknown/page.d.ts +0 -9
- package/src/templates/app/app/[lang]/(__appName__)/(user)/layout.d.ts +0 -9
- package/src/templates/app/app/[lang]/(__appName__)/(user)/self/page.d.ts +0 -9
- package/src/templates/app/app/[lang]/(__appName__)/layout.d.ts +0 -9
- package/src/templates/app/app/[lang]/admin/layout.d.ts +0 -9
- package/src/templates/app/app/[lang]/admin/page.d.ts +0 -9
- package/src/templates/app/app/csr.d.ts +0 -9
- package/src/templates/app/app/layout.d.ts +0 -9
- package/src/templates/app/lib/setting/Setting.Template.d.ts +0 -9
- package/src/templates/app/lib/setting/Setting.Unit.d.ts +0 -9
- package/src/templates/app/lib/setting/Setting.Util.d.ts +0 -9
- package/src/templates/app/lib/setting/Setting.View.d.ts +0 -9
- package/src/templates/app/lib/setting/Setting.Zone.d.ts +0 -9
- package/src/templates/app/lib/setting/index.d.ts +0 -9
- package/src/templates/app/lib/summary/Summary.Template.d.ts +0 -9
- package/src/templates/app/lib/summary/Summary.Unit.d.ts +0 -9
- package/src/templates/app/lib/summary/Summary.Util.d.ts +0 -9
- package/src/templates/app/lib/summary/Summary.View.d.ts +0 -9
- package/src/templates/app/lib/summary/Summary.Zone.d.ts +0 -9
- package/src/templates/app/lib/summary/index.d.ts +0 -9
- package/src/templates/app/lib/user/User.Template.d.ts +0 -9
- package/src/templates/app/lib/user/User.Unit.d.ts +0 -9
- package/src/templates/app/lib/user/User.Util.d.ts +0 -9
- package/src/templates/app/lib/user/User.View.d.ts +0 -9
- package/src/templates/app/lib/user/User.Zone.d.ts +0 -9
- package/src/templates/app/lib/user/index.d.ts +0 -9
- package/src/templates/app/ui/Footer.d.ts +0 -9
- package/src/templates/app/ui/MainHeader.d.ts +0 -10
- package/src/templates/crudPages/[__model__Id]/edit/page.d.ts +0 -11
- package/src/templates/crudPages/[__model__Id]/page.d.ts +0 -11
- package/src/templates/crudPages/new/page.d.ts +0 -11
- package/src/templates/crudPages/page.d.ts +0 -11
- package/src/templates/libRoot/lib/setting/Setting.Template.d.ts +0 -9
- package/src/templates/libRoot/lib/setting/Setting.Unit.d.ts +0 -9
- package/src/templates/libRoot/lib/setting/Setting.Util.d.ts +0 -9
- package/src/templates/libRoot/lib/setting/Setting.View.d.ts +0 -9
- package/src/templates/libRoot/lib/setting/Setting.Zone.d.ts +0 -9
- package/src/templates/libRoot/lib/setting/index.d.ts +0 -9
- package/src/templates/libRoot/lib/summary/Summary.Template.d.ts +0 -9
- package/src/templates/libRoot/lib/summary/Summary.Unit.d.ts +0 -9
- package/src/templates/libRoot/lib/summary/Summary.Util.d.ts +0 -9
- package/src/templates/libRoot/lib/summary/Summary.View.d.ts +0 -9
- package/src/templates/libRoot/lib/summary/Summary.Zone.d.ts +0 -9
- package/src/templates/libRoot/lib/summary/index.d.ts +0 -9
- package/src/templates/libRoot/lib/user/User.Template.d.ts +0 -9
- package/src/templates/libRoot/lib/user/User.Unit.d.ts +0 -9
- package/src/templates/libRoot/lib/user/User.Util.d.ts +0 -9
- package/src/templates/libRoot/lib/user/User.View.d.ts +0 -9
- package/src/templates/libRoot/lib/user/User.Zone.d.ts +0 -9
- package/src/templates/libRoot/lib/user/index.d.ts +0 -9
- package/src/templates/module/__Model__.Template.d.ts +0 -11
- package/src/templates/module/__Model__.Unit.d.ts +0 -11
- package/src/templates/module/__Model__.Util.d.ts +0 -11
- package/src/templates/module/__Model__.View.d.ts +0 -11
- package/src/templates/module/__Model__.Zone.d.ts +0 -11
- package/src/templates/module/index.d.ts +0 -11
|
@@ -0,0 +1,786 @@
|
|
|
1
|
+
Shared UI Library Analysis
|
|
2
|
+
|
|
3
|
+
Library Overview
|
|
4
|
+
|
|
5
|
+
The shared UI library in the akansoft project is a comprehensive React component collection designed for building data-driven
|
|
6
|
+
applications. It provides a complete toolkit with consistent patterns, extensive customization options, and deep integration with the
|
|
7
|
+
application's store system.
|
|
8
|
+
|
|
9
|
+
Key Characteristics
|
|
10
|
+
|
|
11
|
+
- Store-Centric Architecture: Deep integration with standardized store slices and naming conventions
|
|
12
|
+
- Type-Safe Components: Extensive TypeScript generic usage for compile-time safety
|
|
13
|
+
- Internationalization Ready: Built-in multi-language support throughout all components
|
|
14
|
+
- Responsive Design: Mobile-first approach with adaptive breakpoints
|
|
15
|
+
- Performance Optimized: Memoization, lazy loading, and efficient re-rendering
|
|
16
|
+
- Accessibility Compliant: Proper ARIA attributes and keyboard navigation
|
|
17
|
+
- Extensible Architecture: Plugin systems and customizable renderers
|
|
18
|
+
- Unidirectional Data Flow: Predictable state management patterns
|
|
19
|
+
|
|
20
|
+
Component Categories
|
|
21
|
+
|
|
22
|
+
1. Field Components (Field.tsx)
|
|
23
|
+
|
|
24
|
+
Field.tsx is a core form component library for the akansoft project, providing more than 25 specialized input fields.
|
|
25
|
+
|
|
26
|
+
## Basic Structure and Common Features
|
|
27
|
+
|
|
28
|
+
### Label Component
|
|
29
|
+
|
|
30
|
+
\`\`\`typescript
|
|
31
|
+
interface LabelProps {
|
|
32
|
+
className?: string;
|
|
33
|
+
label: string;
|
|
34
|
+
desc?: string;
|
|
35
|
+
unit?: string;
|
|
36
|
+
nullable?: boolean;
|
|
37
|
+
mode?: "view" | "edit";
|
|
38
|
+
}
|
|
39
|
+
\`\`\`
|
|
40
|
+
|
|
41
|
+
- Purpose: Consistent label display for all fields
|
|
42
|
+
- Features:
|
|
43
|
+
- Help tooltip support (desc)
|
|
44
|
+
- Unit display (unit)
|
|
45
|
+
- Optional field display (nullable)
|
|
46
|
+
- Required indicator is commented out (design decision)
|
|
47
|
+
|
|
48
|
+
## Text Input Components
|
|
49
|
+
|
|
50
|
+
### 1. Field.Text
|
|
51
|
+
|
|
52
|
+
\`\`\`typescript
|
|
53
|
+
interface TextProps {
|
|
54
|
+
label?: string;
|
|
55
|
+
desc?: string;
|
|
56
|
+
value: string | null;
|
|
57
|
+
onChange: (value: string) => void;
|
|
58
|
+
placeholder?: string;
|
|
59
|
+
nullable?: boolean;
|
|
60
|
+
disabled?: boolean;
|
|
61
|
+
minlength?: number; // Default: nullable ? 0 : 2
|
|
62
|
+
maxlength?: number; // Default: 200
|
|
63
|
+
transform?: (value: string) => string;
|
|
64
|
+
validate?: (text: string) => boolean | string;
|
|
65
|
+
cache?: boolean; // Form caching support
|
|
66
|
+
onPressEnter?: () => void;
|
|
67
|
+
inputStyleType?: "bordered" | "borderless" | "underline";
|
|
68
|
+
}
|
|
69
|
+
\`\`\`
|
|
70
|
+
Key features:
|
|
71
|
+
|
|
72
|
+
- Real-time transformation (transform)
|
|
73
|
+
- Automatic cache key generation: \${label}-\${desc}-text
|
|
74
|
+
- Length validation and custom validation
|
|
75
|
+
- Various input styles supported
|
|
76
|
+
|
|
77
|
+
### 2. Field.TextArea
|
|
78
|
+
|
|
79
|
+
\`\`\`typescript
|
|
80
|
+
interface TextAreaProps {
|
|
81
|
+
// Same basic props as Text +
|
|
82
|
+
rows?: number; // Default: 3
|
|
83
|
+
maxlength?: number; // Default: 1000
|
|
84
|
+
}
|
|
85
|
+
\`\`\`
|
|
86
|
+
Key features:
|
|
87
|
+
|
|
88
|
+
- Multi-line text input
|
|
89
|
+
- Adjustable height (rows)
|
|
90
|
+
- Longer maximum length than Text
|
|
91
|
+
|
|
92
|
+
### 3. Field.Price (to be deprecated)
|
|
93
|
+
|
|
94
|
+
\`\`\`typescript
|
|
95
|
+
interface PriceProps {
|
|
96
|
+
// Similar to Text but specialized for prices
|
|
97
|
+
maxlength?: number; // Default: 80
|
|
98
|
+
placeholder?: string; // Default: "~ \${l('shared.priceUnit')}"
|
|
99
|
+
}
|
|
100
|
+
\`\`\`
|
|
101
|
+
Key features:
|
|
102
|
+
|
|
103
|
+
- Automatic removal of commas and spaces
|
|
104
|
+
- Automatic price unit placeholder
|
|
105
|
+
- Marked as "delete" in comments - legacy component
|
|
106
|
+
|
|
107
|
+
## List Management Components
|
|
108
|
+
|
|
109
|
+
### 4. Field.List
|
|
110
|
+
|
|
111
|
+
\`\`\`typescript
|
|
112
|
+
interface ListProps<Item> {
|
|
113
|
+
label?: string;
|
|
114
|
+
value: Item[];
|
|
115
|
+
onChange: (value: Item[]) => void;
|
|
116
|
+
onAdd: () => void;
|
|
117
|
+
renderItem: (item: Item, idx: number) => ReactNode;
|
|
118
|
+
}
|
|
119
|
+
\`\`\`
|
|
120
|
+
Key features:
|
|
121
|
+
|
|
122
|
+
- Generic type supporting all item types
|
|
123
|
+
- Custom rendering for each item
|
|
124
|
+
- Automatic delete button addition
|
|
125
|
+
- Automatic divider insertion
|
|
126
|
+
|
|
127
|
+
### 5. Field.TextList
|
|
128
|
+
|
|
129
|
+
\`\`\`typescript
|
|
130
|
+
interface TextListProps {
|
|
131
|
+
value: string[];
|
|
132
|
+
onChange: (value: string[]) => void;
|
|
133
|
+
minlength?: number; // Minimum array length, Default: 0
|
|
134
|
+
maxlength?: number; // Maximum array length, Default: 50
|
|
135
|
+
minTextlength?: number; // Minimum individual text length, Default: 2
|
|
136
|
+
maxTextlength?: number; // Maximum individual text length, Default: 200
|
|
137
|
+
transform?: (value: string) => string;
|
|
138
|
+
validate?: (text: string) => boolean | string;
|
|
139
|
+
cache?: boolean;
|
|
140
|
+
}
|
|
141
|
+
\`\`\`
|
|
142
|
+
Key features:
|
|
143
|
+
|
|
144
|
+
- Drag and drop for order changes
|
|
145
|
+
- Individual text input validation
|
|
146
|
+
- Cache key: \${label}-\${desc}-textList-[\${idx}]
|
|
147
|
+
- Conditional "New" button display based on maximum length limit
|
|
148
|
+
|
|
149
|
+
### 6. Field.Tags
|
|
150
|
+
|
|
151
|
+
\`\`\`typescript
|
|
152
|
+
interface TagsProps {
|
|
153
|
+
value: string[];
|
|
154
|
+
onChange: (value: string[]) => void;
|
|
155
|
+
minlength?: number; // Default: 0
|
|
156
|
+
maxlength?: number; // Default: 50
|
|
157
|
+
minTextlength?: number; // Default: 2
|
|
158
|
+
maxTextlength?: number; // Default: 10 (tags are shorter)
|
|
159
|
+
transform?: (value: string) => string;
|
|
160
|
+
validate?: (text: string) => boolean | string;
|
|
161
|
+
}
|
|
162
|
+
\`\`\`
|
|
163
|
+
Key features:
|
|
164
|
+
|
|
165
|
+
- Tag style UI (includes # prefix)
|
|
166
|
+
- Inline editing mode
|
|
167
|
+
- Creates additional input field when clicked
|
|
168
|
+
- Cancel editing with ESC key
|
|
169
|
+
- Complete tag addition with Enter/Blur
|
|
170
|
+
|
|
171
|
+
## Numeric Input Components
|
|
172
|
+
|
|
173
|
+
### 7. Field.Number
|
|
174
|
+
|
|
175
|
+
\`\`\`typescript
|
|
176
|
+
interface NumberProps {
|
|
177
|
+
value: number | null;
|
|
178
|
+
onChange: (value: number) => void;
|
|
179
|
+
min?: number;
|
|
180
|
+
max?: number;
|
|
181
|
+
unit?: string;
|
|
182
|
+
transform?: (value: number) => number;
|
|
183
|
+
validate?: (text: number) => boolean | string;
|
|
184
|
+
formatter?: (value: string) => string; // Display format
|
|
185
|
+
parser?: (value: string) => string; // Parsing format
|
|
186
|
+
cache?: boolean;
|
|
187
|
+
}
|
|
188
|
+
\`\`\`
|
|
189
|
+
Key features:
|
|
190
|
+
|
|
191
|
+
- Automatic number validation and min/max checks
|
|
192
|
+
- Customizable display format with formatter/parser
|
|
193
|
+
- Unit display support
|
|
194
|
+
- Cache key: \${label}-\${desc}-number
|
|
195
|
+
|
|
196
|
+
### 8. Field.DoubleNumber
|
|
197
|
+
|
|
198
|
+
\`\`\`typescript
|
|
199
|
+
interface DoubleNumberProps {
|
|
200
|
+
value: [number, number] | null;
|
|
201
|
+
onChange: (value: [number, number]) => void;
|
|
202
|
+
min?: [number, number] | null;
|
|
203
|
+
max?: [number, number] | null;
|
|
204
|
+
separator?: ReactNode | string; // Separator between inputs
|
|
205
|
+
}
|
|
206
|
+
\`\`\`
|
|
207
|
+
Key features:
|
|
208
|
+
|
|
209
|
+
- Range input (start-end values)
|
|
210
|
+
- Independent min/max validation for each
|
|
211
|
+
- Custom separator (e.g., "~", "-")
|
|
212
|
+
- Cache keys: \${label}-\${desc}-number-[0], \${label}-\${desc}-number-[1]
|
|
213
|
+
|
|
214
|
+
## Selection Components
|
|
215
|
+
|
|
216
|
+
### 9. Field.Switch
|
|
217
|
+
|
|
218
|
+
\`\`\`typescript
|
|
219
|
+
interface SwitchProps {
|
|
220
|
+
value: boolean;
|
|
221
|
+
onChange: (value: boolean) => void;
|
|
222
|
+
onDesc?: string; // Description when true
|
|
223
|
+
offDesc?: string; // Description when false
|
|
224
|
+
disabled?: boolean;
|
|
225
|
+
}
|
|
226
|
+
\`\`\`
|
|
227
|
+
Key features:
|
|
228
|
+
|
|
229
|
+
- DaisyUI toggle style
|
|
230
|
+
- State-specific description text
|
|
231
|
+
- Uses toggle-accent class
|
|
232
|
+
|
|
233
|
+
### 10. Field.ToggleSelect
|
|
234
|
+
|
|
235
|
+
\`\`\`typescript
|
|
236
|
+
interface ToggleSelectProps<I> {
|
|
237
|
+
items: { label: string; value: I }[] | readonly I[] | I[] | Enum<I>;
|
|
238
|
+
value: I | null;
|
|
239
|
+
onChange: (value: I) => void;
|
|
240
|
+
model?: string; // Model name for internationalization
|
|
241
|
+
field?: string; // Field name for internationalization
|
|
242
|
+
validate?: (value: I) => boolean | string;
|
|
243
|
+
btnClassName?: string;
|
|
244
|
+
}
|
|
245
|
+
\`\`\`
|
|
246
|
+
Key features:
|
|
247
|
+
|
|
248
|
+
- Button-style single selection
|
|
249
|
+
- Direct Enum type support
|
|
250
|
+
- Automatic internationalization (l.enum(model, field, item))
|
|
251
|
+
- Custom button styling
|
|
252
|
+
|
|
253
|
+
### 11. Field.MultiToggleSelect
|
|
254
|
+
|
|
255
|
+
\`\`\`typescript
|
|
256
|
+
interface MultiToggleSelectProps<I> {
|
|
257
|
+
items: Enum<I> | { label: string; value: I }[] | readonly I[] | I[];
|
|
258
|
+
value: I[];
|
|
259
|
+
onChange: (value: I[]) => void;
|
|
260
|
+
minlength?: number;
|
|
261
|
+
maxlength?: number;
|
|
262
|
+
validate?: (value: I[]) => boolean | string;
|
|
263
|
+
}
|
|
264
|
+
\`\`\`
|
|
265
|
+
Key features:
|
|
266
|
+
|
|
267
|
+
- Multiple selection button UI
|
|
268
|
+
- Minimum/maximum selection limit
|
|
269
|
+
- Array length validation
|
|
270
|
+
|
|
271
|
+
## Relational Data Selection Components
|
|
272
|
+
|
|
273
|
+
### 12. Field.Parent & Field.ParentId
|
|
274
|
+
|
|
275
|
+
\`\`\`typescript
|
|
276
|
+
interface ParentProps<T, State, Input, Full, Light, Sort, QueryArgs> {
|
|
277
|
+
sliceName: string; // Target slice name
|
|
278
|
+
value: Light | null; // Parent returns object
|
|
279
|
+
onChange: (value?: Light | null) => void;
|
|
280
|
+
initArgs?: any[]; // Initialization arguments
|
|
281
|
+
sortOption?: (a: Light, b: Light) => number;
|
|
282
|
+
renderOption: (model: Light) => ReactNode; // Option renderer
|
|
283
|
+
renderSelected?: (value: Light) => ReactNode; // Selected item renderer
|
|
284
|
+
onSearch?: (text: string) => void; // Search handler
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
interface ParentIdProps extends ParentProps {
|
|
288
|
+
value: string | null; // ParentId returns only ID
|
|
289
|
+
onChange: (id?: string | null, model?: Light | null) => void;
|
|
290
|
+
}
|
|
291
|
+
\`\`\`
|
|
292
|
+
Key features:
|
|
293
|
+
|
|
294
|
+
- Dynamic store slice integration
|
|
295
|
+
- Automatic naming convention: \${modelName}List, init\${ModelName}, etc.
|
|
296
|
+
- Searchable dropdown
|
|
297
|
+
- Lazy loading (data fetched on onOpen)
|
|
298
|
+
- Parent: returns full object, ParentId: returns only ID
|
|
299
|
+
|
|
300
|
+
### 13. Field.Children & Field.ChildrenId
|
|
301
|
+
|
|
302
|
+
\`\`\`typescript
|
|
303
|
+
interface ChildrenProps extends ParentProps {
|
|
304
|
+
value: Light[]; // Multiple selection
|
|
305
|
+
onChange: (value?: Light[] | null) => void;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
interface ChildrenIdProps extends ChildrenProps {
|
|
309
|
+
value: string[]; // ID array
|
|
310
|
+
onChange: (value: string[]) => void;
|
|
311
|
+
}
|
|
312
|
+
\`\`\`
|
|
313
|
+
Key features:
|
|
314
|
+
|
|
315
|
+
- Multiple relationship selection
|
|
316
|
+
- Same store integration logic as Parent
|
|
317
|
+
- Automatic initialization (useEffect)
|
|
318
|
+
|
|
319
|
+
## Date/Time Components
|
|
320
|
+
|
|
321
|
+
### 14. Field.Date
|
|
322
|
+
|
|
323
|
+
\`\`\`typescript
|
|
324
|
+
interface DateProps<Nullable extends boolean> {
|
|
325
|
+
value: Nullable extends true ? Dayjs | null : Dayjs;
|
|
326
|
+
onChange: (value: Dayjs) => void;
|
|
327
|
+
min?: Dayjs;
|
|
328
|
+
max?: Dayjs;
|
|
329
|
+
showTime?: boolean; // datetime-local vs date
|
|
330
|
+
nullable?: boolean;
|
|
331
|
+
}
|
|
332
|
+
\`\`\`
|
|
333
|
+
Key features:
|
|
334
|
+
|
|
335
|
+
- Uses Dayjs objects
|
|
336
|
+
- Conditional nullable type (using TypeScript generics)
|
|
337
|
+
- Automatic format change based on showTime
|
|
338
|
+
- Uses HTML5 date/datetime-local inputs
|
|
339
|
+
- Includes comment about DaisyUI max value bug
|
|
340
|
+
|
|
341
|
+
### 15. Field.DateRange
|
|
342
|
+
|
|
343
|
+
\`\`\`typescript
|
|
344
|
+
interface DateRangeProps<Nullable extends boolean> {
|
|
345
|
+
from: Nullable extends true ? Dayjs | null : Dayjs;
|
|
346
|
+
to: Nullable extends true ? Dayjs | null : Dayjs;
|
|
347
|
+
onChangeFrom: (value: Dayjs) => void;
|
|
348
|
+
onChangeTo: (value: Dayjs) => void;
|
|
349
|
+
onChange?: (from: Dayjs, to: Dayjs) => void; // Optional unified handler
|
|
350
|
+
showTime?: boolean;
|
|
351
|
+
}
|
|
352
|
+
\`\`\`
|
|
353
|
+
Key features:
|
|
354
|
+
|
|
355
|
+
- Individual management of start/end dates
|
|
356
|
+
- Optional unified change handler
|
|
357
|
+
- Automatic "From"/"To" label display
|
|
358
|
+
- Responsive layout (vertical on mobile)
|
|
359
|
+
|
|
360
|
+
## File Upload Components
|
|
361
|
+
|
|
362
|
+
### 16. Field.Img
|
|
363
|
+
|
|
364
|
+
\`\`\`typescript
|
|
365
|
+
interface ImageProps {
|
|
366
|
+
sliceName: string; // Determines file upload API
|
|
367
|
+
value: cnst.File | null;
|
|
368
|
+
onChange: (file: cnst.File | null) => void;
|
|
369
|
+
styleType?: "circle" | "square"; // Default: "circle"
|
|
370
|
+
aspectRatio?: number[]; // Aspect ratio restriction
|
|
371
|
+
render?: (file: cnst.File) => ReactNode;
|
|
372
|
+
disabled?: boolean;
|
|
373
|
+
}
|
|
374
|
+
\`\`\`
|
|
375
|
+
Key features:
|
|
376
|
+
|
|
377
|
+
- Dynamic upload API: add\${capitalize(sliceName)}Files
|
|
378
|
+
- Upload status polling (1-second interval)
|
|
379
|
+
- Aspect ratio restriction support
|
|
380
|
+
- Circular/square preview
|
|
381
|
+
|
|
382
|
+
### 17. Field.Imgs
|
|
383
|
+
|
|
384
|
+
\`\`\`typescript
|
|
385
|
+
interface ImagesProps {
|
|
386
|
+
sliceName: string;
|
|
387
|
+
value: cnst.File[];
|
|
388
|
+
onChange: (files: cnst.File[]) => void;
|
|
389
|
+
minlength?: number; // Default: 1
|
|
390
|
+
maxlength?: number; // Default: 30
|
|
391
|
+
render?: (file: cnst.File) => ReactNode;
|
|
392
|
+
}
|
|
393
|
+
\`\`\`
|
|
394
|
+
Key features:
|
|
395
|
+
|
|
396
|
+
- Multiple image upload
|
|
397
|
+
- Batch polling of upload status
|
|
398
|
+
- Minimum/maximum file count limit
|
|
399
|
+
- Fixed square style
|
|
400
|
+
|
|
401
|
+
### 18. Field.File & Field.Files
|
|
402
|
+
|
|
403
|
+
\`\`\`typescript
|
|
404
|
+
interface FileProps {
|
|
405
|
+
sliceName: string;
|
|
406
|
+
value: cnst.File | null; // File is single
|
|
407
|
+
onChange: (file: cnst.File | null) => void;
|
|
408
|
+
render?: (file: cnst.File) => ReactNode;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
interface FilesProps {
|
|
412
|
+
sliceName: string;
|
|
413
|
+
value: cnst.File[]; // Files is multiple
|
|
414
|
+
onChange: (files: cnst.File[]) => void;
|
|
415
|
+
minlength?: number; // Default: 1
|
|
416
|
+
maxlength?: number; // Default: 30
|
|
417
|
+
}
|
|
418
|
+
\`\`\`
|
|
419
|
+
Key features:
|
|
420
|
+
|
|
421
|
+
- Support for all file types (beyond images)
|
|
422
|
+
- Same upload logic as Img/Imgs
|
|
423
|
+
- Custom file renderer support
|
|
424
|
+
|
|
425
|
+
## Rich Text Editor
|
|
426
|
+
|
|
427
|
+
### 19. Field.Slate
|
|
428
|
+
|
|
429
|
+
\`\`\`typescript
|
|
430
|
+
interface SlateProps {
|
|
431
|
+
sliceName: string; // Determines file upload API
|
|
432
|
+
valuePath: string; // Store path
|
|
433
|
+
onChange: (value: unknown) => void;
|
|
434
|
+
addFile: (file: cnst.File | cnst.File[], options?) => void;
|
|
435
|
+
placeholder?: string;
|
|
436
|
+
disabled?: boolean;
|
|
437
|
+
editorHeight?: string;
|
|
438
|
+
}
|
|
439
|
+
\`\`\`
|
|
440
|
+
Key features:
|
|
441
|
+
|
|
442
|
+
- Slate.js-based rich text editor
|
|
443
|
+
- File drag and drop support
|
|
444
|
+
- Dynamic store path access
|
|
445
|
+
- Adjustable height
|
|
446
|
+
|
|
447
|
+
### 20. Field.Yoopta
|
|
448
|
+
|
|
449
|
+
\`\`\`typescript
|
|
450
|
+
interface YooptaProps {
|
|
451
|
+
value: JSON;
|
|
452
|
+
onChange: (value: JSON) => void;
|
|
453
|
+
readonly?: boolean;
|
|
454
|
+
}
|
|
455
|
+
\`\`\`
|
|
456
|
+
Key features:
|
|
457
|
+
|
|
458
|
+
- Yoopta editor integration
|
|
459
|
+
- JSON data format
|
|
460
|
+
- Read-only mode support
|
|
461
|
+
|
|
462
|
+
## Authentication and Contact Components
|
|
463
|
+
|
|
464
|
+
### 21. Field.Email
|
|
465
|
+
|
|
466
|
+
\`\`\`typescript
|
|
467
|
+
interface EmailProps {
|
|
468
|
+
value: string | null;
|
|
469
|
+
onChange: (value: string) => void;
|
|
470
|
+
placeholder?: string; // Default: "example@email.com"
|
|
471
|
+
minlength?: number; // Default: nullable ? 0 : 2
|
|
472
|
+
maxlength?: number; // Default: 80
|
|
473
|
+
inputStyleType?: "bordered" | "borderless" | "underline";
|
|
474
|
+
cache?: boolean;
|
|
475
|
+
}
|
|
476
|
+
\`\`\`
|
|
477
|
+
Key features:
|
|
478
|
+
|
|
479
|
+
- Automatic email format validation
|
|
480
|
+
- Uses Input.Email component
|
|
481
|
+
- Cache key: \${label}-\${desc}-email
|
|
482
|
+
|
|
483
|
+
### 22. Field.Phone
|
|
484
|
+
|
|
485
|
+
\`\`\`typescript
|
|
486
|
+
interface PhoneProps {
|
|
487
|
+
value: string | null;
|
|
488
|
+
onChange: (value: string) => void;
|
|
489
|
+
maxlength?: number; // Default: 13
|
|
490
|
+
transform?: (value: string) => string; // Default: formatPhone
|
|
491
|
+
cache?: boolean;
|
|
492
|
+
}
|
|
493
|
+
\`\`\`
|
|
494
|
+
Key features:
|
|
495
|
+
|
|
496
|
+
- Automatic phone number formatting (formatPhone)
|
|
497
|
+
- isPhoneNumber validation
|
|
498
|
+
- Cache key: \${label}-\${desc}-phone
|
|
499
|
+
|
|
500
|
+
### 23. Field.Password
|
|
501
|
+
|
|
502
|
+
\`\`\`typescript
|
|
503
|
+
interface PasswordProps {
|
|
504
|
+
value: string | null;
|
|
505
|
+
onChange: (value: string) => void;
|
|
506
|
+
confirmValue?: string | null; // Confirmation input
|
|
507
|
+
onChangeConfirm?: (value: string) => void;
|
|
508
|
+
showConfirm?: boolean; // Show confirmation input
|
|
509
|
+
minlength?: number; // Default: nullable ? 0 : 8
|
|
510
|
+
maxlength?: number; // Default: 20
|
|
511
|
+
cache?: boolean;
|
|
512
|
+
}
|
|
513
|
+
\`\`\`
|
|
514
|
+
Key features:
|
|
515
|
+
|
|
516
|
+
- Optional password confirmation input
|
|
517
|
+
- Automatic match validation
|
|
518
|
+
- Secure input (masking)
|
|
519
|
+
- Cache key: \${label}-\${desc}-password
|
|
520
|
+
|
|
521
|
+
## Geographic Location Components
|
|
522
|
+
|
|
523
|
+
### 24. Field.Coordinate
|
|
524
|
+
|
|
525
|
+
\`\`\`typescript
|
|
526
|
+
interface CoordinateProps {
|
|
527
|
+
coordinate: cnst.util.Coordinate | null;
|
|
528
|
+
onChange: (coordinate: cnst.util.Coordinate) => void;
|
|
529
|
+
mapKey: string; // Google Maps API key
|
|
530
|
+
mapClassName?: string;
|
|
531
|
+
disabled?: boolean;
|
|
532
|
+
}
|
|
533
|
+
\`\`\`
|
|
534
|
+
Key features:
|
|
535
|
+
|
|
536
|
+
- Google Maps integration
|
|
537
|
+
- Coordinate selection by clicking
|
|
538
|
+
- Automatic marker display (AiTwotoneEnvironment icon)
|
|
539
|
+
- Default zoom level 3
|
|
540
|
+
|
|
541
|
+
### 25. Field.Postcode
|
|
542
|
+
|
|
543
|
+
\`\`\`typescript
|
|
544
|
+
interface PostcodeProps {
|
|
545
|
+
kakaoKey: string; // Kakao API key
|
|
546
|
+
address: string | null;
|
|
547
|
+
onChange: ({
|
|
548
|
+
address: string;
|
|
549
|
+
addressEn: string;
|
|
550
|
+
zipcode: string;
|
|
551
|
+
coordinate: cnst.util.Coordinate;
|
|
552
|
+
}) => void;
|
|
553
|
+
}
|
|
554
|
+
\`\`\`
|
|
555
|
+
Key features:
|
|
556
|
+
|
|
557
|
+
- Daum postcode service (react-daum-postcode)
|
|
558
|
+
- Coordinate conversion using Kakao Maps API
|
|
559
|
+
- Simultaneous Korean/English address provision
|
|
560
|
+
- Modal address search
|
|
561
|
+
|
|
562
|
+
### 26. Field.KoreanCityDistrict
|
|
563
|
+
|
|
564
|
+
\`\`\`typescript
|
|
565
|
+
interface KoreanCityDistrictProps {
|
|
566
|
+
city: string | null;
|
|
567
|
+
onChangeCity: (city: string | null) => void;
|
|
568
|
+
district: string | null;
|
|
569
|
+
onChangeDistrict: (district: string | null) => void;
|
|
570
|
+
disabled?: boolean;
|
|
571
|
+
}
|
|
572
|
+
\`\`\`
|
|
573
|
+
Key features:
|
|
574
|
+
|
|
575
|
+
- Hardcoded Korean region data
|
|
576
|
+
- Two-level selection (city/province → district/county)
|
|
577
|
+
- Includes detailed regions: 25 districts in Seoul, 16 in Busan, etc.
|
|
578
|
+
- Linked selection (district activates after city selection)
|
|
579
|
+
|
|
580
|
+
## Common Patterns and Features
|
|
581
|
+
|
|
582
|
+
### 1. Caching System
|
|
583
|
+
|
|
584
|
+
Most input components support form data persistence with the cache prop:
|
|
585
|
+
cacheKey={cache ? \`\${label}-\${desc}-\${componentType}\` : undefined}
|
|
586
|
+
|
|
587
|
+
### 2. Validation System
|
|
588
|
+
|
|
589
|
+
All components support multi-layer validation:
|
|
590
|
+
|
|
591
|
+
- Basic validation (length, type, format)
|
|
592
|
+
- Custom validation functions
|
|
593
|
+
- Internationalized error messages
|
|
594
|
+
|
|
595
|
+
### 3. Internationalization
|
|
596
|
+
|
|
597
|
+
- Labels, placeholders, error messages all use l() function
|
|
598
|
+
- Automatic translation for Enum types
|
|
599
|
+
- Multi-language error message templates
|
|
600
|
+
|
|
601
|
+
### 4. Store Integration
|
|
602
|
+
|
|
603
|
+
Relational components automatically connect to the store through naming conventions:
|
|
604
|
+
\`\`\`javascript
|
|
605
|
+
const names = {
|
|
606
|
+
model: modelName,
|
|
607
|
+
modelList: \`\${modelName}List\`,
|
|
608
|
+
initModel: \`init\${ModelName}\`,
|
|
609
|
+
};
|
|
610
|
+
\`\`\`
|
|
611
|
+
|
|
612
|
+
### 5. Type Safety
|
|
613
|
+
|
|
614
|
+
- Type safety ensured with TypeScript generics
|
|
615
|
+
- Conditional types for handling nullable properties
|
|
616
|
+
- Strict props interface definitions
|
|
617
|
+
|
|
618
|
+
This comprehensive field library provides a consistent user experience and developer convenience, designed to make complex form compositions simple and safe. 2. Data Components (/Data/)
|
|
619
|
+
|
|
620
|
+
Purpose: Complete data visualization and management interfaces
|
|
621
|
+
|
|
622
|
+
ListContainer
|
|
623
|
+
|
|
624
|
+
- type?: "card" | "list" - Display mode selection
|
|
625
|
+
- columns?: DataColumn<any>[] - Column configuration
|
|
626
|
+
- tools?: DataTool[] - Toolbar actions
|
|
627
|
+
- renderDashboard?: (props) => ReactNode - Dashboard customization
|
|
628
|
+
- renderItem?: (props) => ReactNode - Item renderer
|
|
629
|
+
|
|
630
|
+
CardList
|
|
631
|
+
|
|
632
|
+
- sliceName: string - Store slice identifier
|
|
633
|
+
- columns: DataColumn<any>[] - Data column definitions
|
|
634
|
+
- actions?: DataAction<Light>[] - Item actions
|
|
635
|
+
- renderItem: (args) => ReactNode - Card renderer
|
|
636
|
+
- renderLoading?: () => ReactNode - Loading state
|
|
637
|
+
|
|
638
|
+
Dashboard
|
|
639
|
+
|
|
640
|
+
- summary: { [key: string]: any } - Statistics data
|
|
641
|
+
- queryMap: { [key: string]: any } - Filter mappings
|
|
642
|
+
- columns?: string[] - Clickable statistics
|
|
643
|
+
- hidePresents?: boolean - Display control
|
|
644
|
+
|
|
645
|
+
3. Load Components (/Load/)
|
|
646
|
+
|
|
647
|
+
Purpose: Data loading and state management with SSR/CSR support
|
|
648
|
+
|
|
649
|
+
Page
|
|
650
|
+
|
|
651
|
+
- loader: () => Promise<Return> - Data fetching function
|
|
652
|
+
- render: (data: Return) => ReactNode - Content renderer
|
|
653
|
+
- loading?: () => ReactNode - Loading state
|
|
654
|
+
|
|
655
|
+
Edit
|
|
656
|
+
|
|
657
|
+
- edit: ClientEdit<T, Full> | Partial<Full> - Edit data
|
|
658
|
+
- type?: "modal" | "form" | "empty" - Display mode
|
|
659
|
+
- sliceName: string - Store slice
|
|
660
|
+
- onSubmit?: string | ((model: Full) => void) - Submit handler
|
|
661
|
+
|
|
662
|
+
Units
|
|
663
|
+
|
|
664
|
+
- init: ClientInit<T, L> - Initial data
|
|
665
|
+
- filter?: (item: L, idx: number) => boolean - Item filtering
|
|
666
|
+
- sort?: (a: L, b: L) => number - Sorting function
|
|
667
|
+
- renderItem?: (item: L, idx: number) => ReactNode - Item renderer
|
|
668
|
+
- pagination?: boolean - Pagination control
|
|
669
|
+
|
|
670
|
+
4. Model Components (/Model/)
|
|
671
|
+
|
|
672
|
+
Purpose: CRUD operations with modal and inline editing
|
|
673
|
+
|
|
674
|
+
EditModal
|
|
675
|
+
|
|
676
|
+
- sliceName: string - Store slice identifier
|
|
677
|
+
- id?: string - Model ID for editing
|
|
678
|
+
- renderTitle?: ((model: Full) => ReactNode) | string - Title customization
|
|
679
|
+
- onSubmit?: string | ((model: Full) => void) - Submit handler
|
|
680
|
+
- onCancel?: string | ((form?: any) => any) - Cancel handler
|
|
681
|
+
|
|
682
|
+
ViewModal
|
|
683
|
+
|
|
684
|
+
- id: string - Model identifier
|
|
685
|
+
- renderView: (model: any) => ReactNode - View content renderer
|
|
686
|
+
- renderAction?: (model: any) => ReactNode - Action buttons
|
|
687
|
+
|
|
688
|
+
NewWrapper
|
|
689
|
+
|
|
690
|
+
- sliceName: string - Store slice
|
|
691
|
+
- partial?: Partial<Full> - Default values
|
|
692
|
+
- modal?: string | null - Modal type
|
|
693
|
+
|
|
694
|
+
5. System Components (/System/)
|
|
695
|
+
|
|
696
|
+
Purpose: Application-level providers and system utilities
|
|
697
|
+
|
|
698
|
+
Provider (CSR)
|
|
699
|
+
|
|
700
|
+
- fonts: ReactFont[] - Font configurations
|
|
701
|
+
- gaTrackingId?: string - Analytics tracking
|
|
702
|
+
- layoutStyle?: "mobile" | "web" - Layout mode
|
|
703
|
+
|
|
704
|
+
Provider (SSR)
|
|
705
|
+
|
|
706
|
+
- fonts?: NextFont[] - Next.js font configurations
|
|
707
|
+
|
|
708
|
+
SelectLanguage
|
|
709
|
+
|
|
710
|
+
- languages?: string[] - Available languages
|
|
711
|
+
|
|
712
|
+
6. Only Components (/Only/)
|
|
713
|
+
|
|
714
|
+
Purpose: Conditional rendering based on user state and device
|
|
715
|
+
|
|
716
|
+
Admin
|
|
717
|
+
|
|
718
|
+
- roles?: cnst.AdminRole[] - Required admin roles
|
|
719
|
+
|
|
720
|
+
User
|
|
721
|
+
|
|
722
|
+
- roles?: cnst.UserRole[] - Required user roles
|
|
723
|
+
|
|
724
|
+
Show
|
|
725
|
+
|
|
726
|
+
- show?: boolean | cnst.util.Responsive[] - Show conditions
|
|
727
|
+
|
|
728
|
+
Mobile/Web
|
|
729
|
+
|
|
730
|
+
- No props - Device-based rendering
|
|
731
|
+
|
|
732
|
+
7. Editor Components (/Editor/)
|
|
733
|
+
|
|
734
|
+
Purpose: Rich text editing capabilities
|
|
735
|
+
|
|
736
|
+
Slate
|
|
737
|
+
|
|
738
|
+
- addFilesGql: (fileList: FileList, id?: string) => Promise<File[]> - File upload
|
|
739
|
+
- addFile: (file: cnst.File | cnst.File[], options?) => void - File management
|
|
740
|
+
- onChange: (value: unknown) => void - Content change handler
|
|
741
|
+
- defaultValue?: unknown - Initial content
|
|
742
|
+
- placeholder?: string - Placeholder text
|
|
743
|
+
- disabled?: boolean - Read-only mode
|
|
744
|
+
|
|
745
|
+
SlateContent
|
|
746
|
+
|
|
747
|
+
- content: unknown - Slate content to display
|
|
748
|
+
|
|
749
|
+
8. Property Component (Property.tsx)
|
|
750
|
+
|
|
751
|
+
Purpose: Metadata-driven property editing
|
|
752
|
+
|
|
753
|
+
- prop: string - Property name
|
|
754
|
+
- slice: StoreOf<any, any> - Store slice
|
|
755
|
+
- renderTemplate?: (form: any) => ReactNode - Custom edit renderer
|
|
756
|
+
- renderView?: (model: any) => ReactNode - Custom view renderer
|
|
757
|
+
- modelPath?: string - Model path in store
|
|
758
|
+
|
|
759
|
+
Integration Patterns
|
|
760
|
+
|
|
761
|
+
Store Integration
|
|
762
|
+
|
|
763
|
+
- Components use standardized naming conventions for store slices
|
|
764
|
+
- Automatic state management through slice integration
|
|
765
|
+
- Consistent error handling and loading states
|
|
766
|
+
|
|
767
|
+
Validation System
|
|
768
|
+
|
|
769
|
+
- Built-in validation for all field types
|
|
770
|
+
- Custom validation function support
|
|
771
|
+
- Internationalized error messages
|
|
772
|
+
|
|
773
|
+
File Management
|
|
774
|
+
|
|
775
|
+
- Integrated file upload system
|
|
776
|
+
- Progress tracking and status management
|
|
777
|
+
- Multiple file type support with preview
|
|
778
|
+
|
|
779
|
+
Responsive Behavior
|
|
780
|
+
|
|
781
|
+
- Mobile-first design approach
|
|
782
|
+
- Adaptive layouts based on screen size
|
|
783
|
+
- Touch-friendly interactions
|
|
784
|
+
|
|
785
|
+
This comprehensive UI library provides everything needed to build sophisticated data management interfaces with consistent user
|
|
786
|
+
experience and maintainable code architecture.
|