@akanjs/cli 0.0.149 → 0.0.151
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 +28 -20
- package/cjs/src/guidelines/componentRule/componentRule.generate.json +131 -0
- package/cjs/src/guidelines/componentRule/componentRule.instruction.md +7 -6
- package/cjs/src/guidelines/cssRule/cssRule.generate.json +93 -0
- package/cjs/src/guidelines/databaseModule/databaseModule.generate.json +51 -0
- package/cjs/src/guidelines/databaseModule/databaseModule.instruction.md +4 -17
- package/cjs/src/guidelines/docPageRule/docPageRule.generate.json +72 -0
- package/cjs/src/guidelines/enumConstant/enumConstant.generate.json +24 -0
- package/cjs/src/guidelines/fieldDecorator/fieldDecorator.generate.json +135 -0
- package/cjs/src/guidelines/framework/framework.generate.json +119 -0
- package/cjs/src/guidelines/howToUseStore/howToUseStore.generate.json +0 -0
- package/cjs/src/guidelines/modelConstant/modelConstant.generate.json +135 -0
- package/cjs/src/guidelines/modelConstant/modelConstant.instruction.md +1 -1
- package/cjs/src/guidelines/modelDictionary/modelDictionary.generate.json +115 -0
- package/cjs/src/guidelines/modelDocument/modelDocument.generate.json +129 -0
- package/cjs/src/guidelines/modelService/modelService.generate.json +179 -0
- package/cjs/src/guidelines/modelSignal/modelSignal.generate.json +202 -0
- package/cjs/src/guidelines/modelStore/modelStore.generate.json +130 -0
- package/cjs/src/guidelines/modelTemplate/modelTemplate.generate.json +104 -0
- package/cjs/src/guidelines/modelUnit/modelUnit.generate.json +92 -0
- package/cjs/src/guidelines/modelUnit/modelUnit.instruction.md +2 -2
- package/cjs/src/guidelines/modelUtil/modelUtil.generate.json +93 -0
- package/cjs/src/guidelines/modelView/modelView.generate.json +80 -0
- package/cjs/src/guidelines/modelView/modelView.instruction.md +1 -1
- package/cjs/src/guidelines/modelZone/modelZone.generate.json +126 -0
- package/cjs/src/guidelines/modelZone/modelZone.instruction.md +3 -3
- package/cjs/src/guidelines/scalarConstant/scalarConstant.generate.json +102 -0
- package/cjs/src/guidelines/scalarDictionary/scalarDictionary.generate.json +83 -0
- package/cjs/src/guidelines/scalarModule/scalarModule.generate.json +35 -0
- package/cjs/src/guidelines/sharedUiUsage/sharedUiUsage.generate.json +115 -0
- package/cjs/src/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +5 -10
- package/cjs/src/guidelines/utilUiUsage/utilUiUsage.generate.json +140 -0
- package/cjs/src/guidelines/utilUiUsage/utilUiUsage.instruction.md +1 -1
- package/cjs/src/templates/app/app/[lang]/(__appName__)/(public)/forgotpassword/page.js +47 -0
- package/cjs/src/templates/app/app/[lang]/(__appName__)/(public)/page.js +128 -0
- package/cjs/src/templates/app/app/[lang]/(__appName__)/(public)/privacy/page.js +42 -0
- package/cjs/src/templates/app/app/[lang]/(__appName__)/(public)/signin/page.js +50 -0
- package/cjs/src/templates/app/app/[lang]/(__appName__)/(public)/termsofservice/page.js +41 -0
- package/cjs/src/templates/app/app/[lang]/(__appName__)/(public)/unknown/page.js +51 -0
- package/cjs/src/templates/app/app/[lang]/(__appName__)/(user)/layout.js +43 -0
- package/cjs/src/templates/app/app/[lang]/(__appName__)/(user)/self/page.js +60 -0
- package/cjs/src/templates/app/app/[lang]/(__appName__)/layout.js +54 -0
- package/cjs/src/templates/app/app/[lang]/admin/layout.js +54 -0
- package/cjs/src/templates/app/app/[lang]/admin/page.js +63 -0
- package/cjs/src/templates/app/app/csr.js +34 -0
- package/cjs/src/templates/app/app/layout.js +38 -0
- package/cjs/src/templates/app/lib/setting/Setting.Template.js +57 -0
- package/cjs/src/templates/app/lib/setting/Setting.Unit.js +38 -0
- package/cjs/src/templates/app/lib/setting/Setting.Util.js +34 -0
- package/cjs/src/templates/app/lib/setting/Setting.View.js +51 -0
- package/cjs/src/templates/app/lib/setting/Setting.Zone.js +80 -0
- package/cjs/src/templates/app/lib/setting/index.js +61 -0
- package/cjs/src/templates/app/lib/summary/Summary.Template.js +43 -0
- package/cjs/src/templates/app/lib/summary/Summary.Unit.js +38 -0
- package/cjs/src/templates/app/lib/summary/Summary.Util.js +33 -0
- package/cjs/src/templates/app/lib/summary/Summary.View.js +51 -0
- package/cjs/src/templates/app/lib/summary/Summary.Zone.js +62 -0
- package/cjs/src/templates/app/lib/summary/index.js +67 -0
- package/cjs/src/templates/app/lib/user/User.Template.js +65 -0
- package/cjs/src/templates/app/lib/user/User.Unit.js +38 -0
- package/cjs/src/templates/app/lib/user/User.Util.js +94 -0
- package/cjs/src/templates/app/lib/user/User.View.js +66 -0
- package/cjs/src/templates/app/lib/user/User.Zone.js +74 -0
- package/cjs/src/templates/app/lib/user/index.js +61 -0
- package/cjs/src/templates/app/main.js +1 -2
- package/cjs/src/templates/app/public/favicon.ico +0 -0
- package/cjs/src/templates/app/public/icons/icon-128x128.png +0 -0
- package/cjs/src/templates/app/public/icons/icon-144x144.png +0 -0
- package/cjs/src/templates/app/public/icons/icon-152x152.png +0 -0
- package/cjs/src/templates/app/public/icons/icon-192x192.png +0 -0
- package/cjs/src/templates/app/public/icons/icon-256x256.png +0 -0
- package/cjs/src/templates/app/public/icons/icon-384x384.png +0 -0
- package/cjs/src/templates/app/public/icons/icon-48x48.png +0 -0
- package/cjs/src/templates/app/public/icons/icon-512x512.png +0 -0
- package/cjs/src/templates/app/public/icons/icon-72x72.png +0 -0
- package/cjs/src/templates/app/public/icons/icon-96x96.png +0 -0
- package/cjs/src/templates/app/public/logo.svg +70 -0
- package/cjs/src/templates/app/ui/Footer.js +67 -0
- package/cjs/src/templates/app/ui/MainHeader.js +131 -0
- package/cjs/src/templates/crudPages/[__model__Id]/edit/page.js +73 -0
- package/cjs/src/templates/crudPages/[__model__Id]/page.js +83 -0
- package/cjs/src/templates/crudPages/new/page.js +70 -0
- package/cjs/src/templates/crudPages/page.js +71 -0
- package/cjs/src/templates/lib/__lib/lib.dictionary.js +2 -2
- package/cjs/src/templates/lib/__lib/lib.signal.js +3 -3
- package/cjs/src/templates/lib/__lib/lib.store.js +2 -1
- package/cjs/src/templates/libRoot/lib/setting/Setting.Template.js +57 -0
- package/cjs/src/templates/libRoot/lib/setting/Setting.Unit.js +38 -0
- package/cjs/src/templates/libRoot/lib/setting/Setting.Util.js +34 -0
- package/cjs/src/templates/libRoot/lib/setting/Setting.View.js +51 -0
- package/cjs/src/templates/libRoot/lib/setting/Setting.Zone.js +80 -0
- package/cjs/src/templates/libRoot/lib/setting/index.js +61 -0
- package/cjs/src/templates/libRoot/lib/summary/Summary.Template.js +43 -0
- package/cjs/src/templates/libRoot/lib/summary/Summary.Unit.js +38 -0
- package/cjs/src/templates/libRoot/lib/summary/Summary.Util.js +33 -0
- package/cjs/src/templates/libRoot/lib/summary/Summary.View.js +51 -0
- package/cjs/src/templates/libRoot/lib/summary/Summary.Zone.js +62 -0
- package/cjs/src/templates/libRoot/lib/summary/index.js +67 -0
- package/cjs/src/templates/libRoot/lib/user/User.Template.js +65 -0
- package/cjs/src/templates/libRoot/lib/user/User.Unit.js +38 -0
- package/cjs/src/templates/libRoot/lib/user/User.Util.js +94 -0
- package/cjs/src/templates/libRoot/lib/user/User.View.js +66 -0
- package/cjs/src/templates/libRoot/lib/user/User.Zone.js +74 -0
- package/cjs/src/templates/libRoot/lib/user/index.js +61 -0
- package/cjs/src/templates/module/__Model__.Template.js +54 -0
- package/cjs/src/templates/module/__Model__.Unit.js +42 -0
- package/cjs/src/templates/module/__Model__.Util.js +70 -0
- package/cjs/src/templates/module/__Model__.View.js +48 -0
- package/cjs/src/templates/module/__Model__.Zone.js +83 -0
- package/cjs/src/templates/module/index.js +61 -0
- package/esm/index.js +28 -20
- package/esm/src/guidelines/componentRule/componentRule.generate.json +131 -0
- package/esm/src/guidelines/componentRule/componentRule.instruction.md +7 -6
- package/esm/src/guidelines/cssRule/cssRule.generate.json +93 -0
- package/esm/src/guidelines/databaseModule/databaseModule.generate.json +51 -0
- package/esm/src/guidelines/databaseModule/databaseModule.instruction.md +4 -17
- package/esm/src/guidelines/docPageRule/docPageRule.generate.json +72 -0
- package/esm/src/guidelines/enumConstant/enumConstant.generate.json +24 -0
- package/esm/src/guidelines/fieldDecorator/fieldDecorator.generate.json +135 -0
- package/esm/src/guidelines/framework/framework.generate.json +119 -0
- package/esm/src/guidelines/howToUseStore/howToUseStore.generate.json +0 -0
- package/esm/src/guidelines/modelConstant/modelConstant.generate.json +135 -0
- package/esm/src/guidelines/modelConstant/modelConstant.instruction.md +1 -1
- package/esm/src/guidelines/modelDictionary/modelDictionary.generate.json +115 -0
- package/esm/src/guidelines/modelDocument/modelDocument.generate.json +129 -0
- package/esm/src/guidelines/modelService/modelService.generate.json +179 -0
- package/esm/src/guidelines/modelSignal/modelSignal.generate.json +202 -0
- package/esm/src/guidelines/modelStore/modelStore.generate.json +130 -0
- package/esm/src/guidelines/modelTemplate/modelTemplate.generate.json +104 -0
- package/esm/src/guidelines/modelUnit/modelUnit.generate.json +92 -0
- package/esm/src/guidelines/modelUnit/modelUnit.instruction.md +2 -2
- package/esm/src/guidelines/modelUtil/modelUtil.generate.json +93 -0
- package/esm/src/guidelines/modelView/modelView.generate.json +80 -0
- package/esm/src/guidelines/modelView/modelView.instruction.md +1 -1
- package/esm/src/guidelines/modelZone/modelZone.generate.json +126 -0
- package/esm/src/guidelines/modelZone/modelZone.instruction.md +3 -3
- package/esm/src/guidelines/scalarConstant/scalarConstant.generate.json +102 -0
- package/esm/src/guidelines/scalarDictionary/scalarDictionary.generate.json +83 -0
- package/esm/src/guidelines/scalarModule/scalarModule.generate.json +35 -0
- package/esm/src/guidelines/sharedUiUsage/sharedUiUsage.generate.json +115 -0
- package/esm/src/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +5 -10
- package/esm/src/guidelines/utilUiUsage/utilUiUsage.generate.json +140 -0
- package/esm/src/guidelines/utilUiUsage/utilUiUsage.instruction.md +1 -1
- package/esm/src/templates/app/app/[lang]/(__appName__)/(public)/forgotpassword/page.js +27 -0
- package/esm/src/templates/app/app/[lang]/(__appName__)/(public)/page.js +108 -0
- package/esm/src/templates/app/app/[lang]/(__appName__)/(public)/privacy/page.js +22 -0
- package/esm/src/templates/app/app/[lang]/(__appName__)/(public)/signin/page.js +30 -0
- package/esm/src/templates/app/app/[lang]/(__appName__)/(public)/termsofservice/page.js +21 -0
- package/esm/src/templates/app/app/[lang]/(__appName__)/(public)/unknown/page.js +31 -0
- package/esm/src/templates/app/app/[lang]/(__appName__)/(user)/layout.js +23 -0
- package/esm/src/templates/app/app/[lang]/(__appName__)/(user)/self/page.js +40 -0
- package/esm/src/templates/app/app/[lang]/(__appName__)/layout.js +34 -0
- package/esm/src/templates/app/app/[lang]/admin/layout.js +34 -0
- package/esm/src/templates/app/app/[lang]/admin/page.js +43 -0
- package/esm/src/templates/app/app/csr.js +14 -0
- package/esm/src/templates/app/app/layout.js +18 -0
- package/esm/src/templates/app/lib/setting/Setting.Template.js +37 -0
- package/esm/src/templates/app/lib/setting/Setting.Unit.js +18 -0
- package/esm/src/templates/app/lib/setting/Setting.Util.js +14 -0
- package/esm/src/templates/app/lib/setting/Setting.View.js +31 -0
- package/esm/src/templates/app/lib/setting/Setting.Zone.js +60 -0
- package/esm/src/templates/app/lib/setting/index.js +41 -0
- package/esm/src/templates/app/lib/summary/Summary.Template.js +23 -0
- package/esm/src/templates/app/lib/summary/Summary.Unit.js +18 -0
- package/esm/src/templates/app/lib/summary/Summary.Util.js +13 -0
- package/esm/src/templates/app/lib/summary/Summary.View.js +31 -0
- package/esm/src/templates/app/lib/summary/Summary.Zone.js +42 -0
- package/esm/src/templates/app/lib/summary/index.js +47 -0
- package/esm/src/templates/app/lib/user/User.Template.js +45 -0
- package/esm/src/templates/app/lib/user/User.Unit.js +18 -0
- package/esm/src/templates/app/lib/user/User.Util.js +74 -0
- package/esm/src/templates/app/lib/user/User.View.js +46 -0
- package/esm/src/templates/app/lib/user/User.Zone.js +54 -0
- package/esm/src/templates/app/lib/user/index.js +41 -0
- package/esm/src/templates/app/main.js +1 -2
- package/esm/src/templates/app/public/favicon.ico +0 -0
- package/esm/src/templates/app/public/icons/icon-128x128.png +0 -0
- package/esm/src/templates/app/public/icons/icon-144x144.png +0 -0
- package/esm/src/templates/app/public/icons/icon-152x152.png +0 -0
- package/esm/src/templates/app/public/icons/icon-192x192.png +0 -0
- package/esm/src/templates/app/public/icons/icon-256x256.png +0 -0
- package/esm/src/templates/app/public/icons/icon-384x384.png +0 -0
- package/esm/src/templates/app/public/icons/icon-48x48.png +0 -0
- package/esm/src/templates/app/public/icons/icon-512x512.png +0 -0
- package/esm/src/templates/app/public/icons/icon-72x72.png +0 -0
- package/esm/src/templates/app/public/icons/icon-96x96.png +0 -0
- package/esm/src/templates/app/public/logo.svg +70 -0
- package/esm/src/templates/app/ui/Footer.js +47 -0
- package/esm/src/templates/app/ui/MainHeader.js +111 -0
- package/esm/src/templates/crudPages/[__model__Id]/edit/page.js +53 -0
- package/esm/src/templates/crudPages/[__model__Id]/page.js +63 -0
- package/esm/src/templates/crudPages/new/page.js +50 -0
- package/esm/src/templates/crudPages/page.js +51 -0
- package/esm/src/templates/lib/__lib/lib.dictionary.js +2 -2
- package/esm/src/templates/lib/__lib/lib.signal.js +3 -3
- package/esm/src/templates/lib/__lib/lib.store.js +2 -1
- package/esm/src/templates/libRoot/lib/setting/Setting.Template.js +37 -0
- package/esm/src/templates/libRoot/lib/setting/Setting.Unit.js +18 -0
- package/esm/src/templates/libRoot/lib/setting/Setting.Util.js +14 -0
- package/esm/src/templates/libRoot/lib/setting/Setting.View.js +31 -0
- package/esm/src/templates/libRoot/lib/setting/Setting.Zone.js +60 -0
- package/esm/src/templates/libRoot/lib/setting/index.js +41 -0
- package/esm/src/templates/libRoot/lib/summary/Summary.Template.js +23 -0
- package/esm/src/templates/libRoot/lib/summary/Summary.Unit.js +18 -0
- package/esm/src/templates/libRoot/lib/summary/Summary.Util.js +13 -0
- package/esm/src/templates/libRoot/lib/summary/Summary.View.js +31 -0
- package/esm/src/templates/libRoot/lib/summary/Summary.Zone.js +42 -0
- package/esm/src/templates/libRoot/lib/summary/index.js +47 -0
- package/esm/src/templates/libRoot/lib/user/User.Template.js +45 -0
- package/esm/src/templates/libRoot/lib/user/User.Unit.js +18 -0
- package/esm/src/templates/libRoot/lib/user/User.Util.js +74 -0
- package/esm/src/templates/libRoot/lib/user/User.View.js +46 -0
- package/esm/src/templates/libRoot/lib/user/User.Zone.js +54 -0
- package/esm/src/templates/libRoot/lib/user/index.js +41 -0
- package/esm/src/templates/module/__Model__.Template.js +34 -0
- package/esm/src/templates/module/__Model__.Unit.js +22 -0
- package/esm/src/templates/module/__Model__.Util.js +50 -0
- package/esm/src/templates/module/__Model__.View.js +28 -0
- package/esm/src/templates/module/__Model__.Zone.js +63 -0
- package/esm/src/templates/module/index.js +41 -0
- package/package.json +1 -1
- package/src/guidelines/componentRule/componentRule.instruction.md +7 -6
- package/src/guidelines/databaseModule/databaseModule.instruction.md +4 -17
- package/src/guidelines/modelConstant/modelConstant.instruction.md +1 -1
- package/src/guidelines/modelUnit/modelUnit.instruction.md +2 -2
- package/src/guidelines/modelView/modelView.instruction.md +1 -1
- package/src/guidelines/modelZone/modelZone.instruction.md +3 -3
- package/src/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +5 -10
- package/src/guidelines/utilUiUsage/utilUiUsage.instruction.md +1 -1
- package/src/templates/app/app/[lang]/(__appName__)/(public)/forgotpassword/page.d.ts +9 -0
- package/src/templates/app/app/[lang]/(__appName__)/(public)/page.d.ts +9 -0
- package/src/templates/app/app/[lang]/(__appName__)/(public)/privacy/page.d.ts +9 -0
- package/src/templates/app/app/[lang]/(__appName__)/(public)/signin/page.d.ts +9 -0
- package/src/templates/app/app/[lang]/(__appName__)/(public)/termsofservice/page.d.ts +10 -0
- package/src/templates/app/app/[lang]/(__appName__)/(public)/unknown/page.d.ts +9 -0
- package/src/templates/app/app/[lang]/(__appName__)/(user)/layout.d.ts +9 -0
- package/src/templates/app/app/[lang]/(__appName__)/(user)/self/page.d.ts +9 -0
- package/src/templates/app/app/[lang]/(__appName__)/layout.d.ts +9 -0
- package/src/templates/app/app/[lang]/admin/layout.d.ts +9 -0
- package/src/templates/app/app/[lang]/admin/page.d.ts +9 -0
- package/src/templates/app/app/csr.d.ts +9 -0
- package/src/templates/app/app/layout.d.ts +9 -0
- package/src/templates/app/lib/setting/Setting.Template.d.ts +9 -0
- package/src/templates/app/lib/setting/Setting.Unit.d.ts +9 -0
- package/src/templates/app/lib/setting/Setting.Util.d.ts +9 -0
- package/src/templates/app/lib/setting/Setting.View.d.ts +9 -0
- package/src/templates/app/lib/setting/Setting.Zone.d.ts +9 -0
- package/src/templates/app/lib/setting/index.d.ts +9 -0
- package/src/templates/app/lib/summary/Summary.Template.d.ts +9 -0
- package/src/templates/app/lib/summary/Summary.Unit.d.ts +9 -0
- package/src/templates/app/lib/summary/Summary.Util.d.ts +9 -0
- package/src/templates/app/lib/summary/Summary.View.d.ts +9 -0
- package/src/templates/app/lib/summary/Summary.Zone.d.ts +9 -0
- package/src/templates/app/lib/summary/index.d.ts +9 -0
- package/src/templates/app/lib/user/User.Template.d.ts +9 -0
- package/src/templates/app/lib/user/User.Unit.d.ts +9 -0
- package/src/templates/app/lib/user/User.Util.d.ts +9 -0
- package/src/templates/app/lib/user/User.View.d.ts +9 -0
- package/src/templates/app/lib/user/User.Zone.d.ts +9 -0
- package/src/templates/app/lib/user/index.d.ts +9 -0
- package/src/templates/app/ui/Footer.d.ts +9 -0
- package/src/templates/app/ui/MainHeader.d.ts +10 -0
- package/src/templates/crudPages/[__model__Id]/edit/page.d.ts +11 -0
- package/src/templates/crudPages/[__model__Id]/page.d.ts +11 -0
- package/src/templates/crudPages/new/page.d.ts +11 -0
- package/src/templates/crudPages/page.d.ts +11 -0
- package/src/templates/libRoot/lib/setting/Setting.Template.d.ts +9 -0
- package/src/templates/libRoot/lib/setting/Setting.Unit.d.ts +9 -0
- package/src/templates/libRoot/lib/setting/Setting.Util.d.ts +9 -0
- package/src/templates/libRoot/lib/setting/Setting.View.d.ts +9 -0
- package/src/templates/libRoot/lib/setting/Setting.Zone.d.ts +9 -0
- package/src/templates/libRoot/lib/setting/index.d.ts +9 -0
- package/src/templates/libRoot/lib/summary/Summary.Template.d.ts +9 -0
- package/src/templates/libRoot/lib/summary/Summary.Unit.d.ts +9 -0
- package/src/templates/libRoot/lib/summary/Summary.Util.d.ts +9 -0
- package/src/templates/libRoot/lib/summary/Summary.View.d.ts +9 -0
- package/src/templates/libRoot/lib/summary/Summary.Zone.d.ts +9 -0
- package/src/templates/libRoot/lib/summary/index.d.ts +9 -0
- package/src/templates/libRoot/lib/user/User.Template.d.ts +9 -0
- package/src/templates/libRoot/lib/user/User.Unit.d.ts +9 -0
- package/src/templates/libRoot/lib/user/User.Util.d.ts +9 -0
- package/src/templates/libRoot/lib/user/User.View.d.ts +9 -0
- package/src/templates/libRoot/lib/user/User.Zone.d.ts +9 -0
- package/src/templates/libRoot/lib/user/index.d.ts +9 -0
- package/src/templates/module/__Model__.Template.d.ts +11 -0
- package/src/templates/module/__Model__.Unit.d.ts +11 -0
- package/src/templates/module/__Model__.Util.d.ts +11 -0
- package/src/templates/module/__Model__.View.d.ts +11 -0
- package/src/templates/module/__Model__.Zone.d.ts +11 -0
- package/src/templates/module/index.d.ts +11 -0
|
@@ -30,12 +30,12 @@ function getContent(scanResult, dict = {}) {
|
|
|
30
30
|
(module2) => module2 !== "summary" && module2 !== "setting"
|
|
31
31
|
);
|
|
32
32
|
return `
|
|
33
|
-
${libs.length === 0 ? `import {
|
|
33
|
+
${libs.length === 0 ? `import { dictionary as base } from "@akanjs/dictionary";` : ""}
|
|
34
34
|
${libs.map((lib) => `import { dictionary as ${lib} } from "@${lib}";`).join("\n")}
|
|
35
35
|
|
|
36
36
|
${moduleDictionaries.map((module2) => `import { ${module2}SummaryDictionary } from "../${module2}/${module2}.dictionary";`).join("\n")}
|
|
37
37
|
|
|
38
|
-
export const libDictionaries = [${libs.length === 0 ? "
|
|
38
|
+
export const libDictionaries = [${libs.length === 0 ? "base" : libs.join(", ")}] as const;
|
|
39
39
|
|
|
40
40
|
export const libSummaryDictionary = { ${moduleDictionaries.map((module2) => `...${module2}SummaryDictionary`).join(", ")} };
|
|
41
41
|
`;
|
|
@@ -27,10 +27,10 @@ function getContent(scanResult, dict = {}) {
|
|
|
27
27
|
return null;
|
|
28
28
|
const libs = scanResult.akanConfig.libs;
|
|
29
29
|
return `
|
|
30
|
-
${libs.length > 0 ? "" : `import {
|
|
30
|
+
${libs.length > 0 ? "" : `import { fetch as base } from "@akanjs/signal";`}
|
|
31
31
|
${libs.map((lib) => `import { fetch as ${lib} } from "@${lib}";`).join("\n")}
|
|
32
32
|
|
|
33
|
-
export const root = ${libs.length ? scanResult.akanConfig.rootLib ?? libs[0] : "
|
|
34
|
-
export const libFetches = [${libs.length ? libs.join(", ") : "
|
|
33
|
+
export const root = ${libs.length ? scanResult.akanConfig.rootLib ?? libs[0] : "base"};
|
|
34
|
+
export const libFetches = [${libs.length ? libs.join(", ") : "base"}] as const;
|
|
35
35
|
`;
|
|
36
36
|
}
|
|
@@ -27,8 +27,9 @@ function getContent(scanResult, dict = {}) {
|
|
|
27
27
|
return null;
|
|
28
28
|
const libs = scanResult.akanConfig.libs;
|
|
29
29
|
return `
|
|
30
|
+
import { store as base } from "@akanjs/store";
|
|
30
31
|
${libs.map((lib) => `import { store as ${lib} } from "@${lib}/client";`).join("\n")}
|
|
31
32
|
|
|
32
|
-
export const libStores = [${libs.join(", ")}] as const;
|
|
33
|
+
export const libStores = [${[...libs, "base"].join(", ")}] as const;
|
|
33
34
|
`;
|
|
34
35
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/libRoot/lib/setting/Setting.Template.tsx
|
|
20
|
+
var Setting_Template_exports = {};
|
|
21
|
+
__export(Setting_Template_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(Setting_Template_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return {
|
|
27
|
+
filename: "Setting.Template.tsx",
|
|
28
|
+
content: `
|
|
29
|
+
"use client";
|
|
30
|
+
import { st, usePage } from "@${dict.libName}/client";
|
|
31
|
+
|
|
32
|
+
interface GeneralProps {
|
|
33
|
+
settingId?: string | null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const General = ({ settingId = undefined }: GeneralProps) => {
|
|
37
|
+
const settingForm = st.use.settingForm();
|
|
38
|
+
const { l } = usePage();
|
|
39
|
+
return (
|
|
40
|
+
<div className="mb-4 flex items-center">
|
|
41
|
+
<div className="flex items-center gap-2">
|
|
42
|
+
<div className="w-32">{l("setting.resignupDays")}</div>
|
|
43
|
+
<input
|
|
44
|
+
type="number"
|
|
45
|
+
className="input"
|
|
46
|
+
value={settingForm.resignupDays}
|
|
47
|
+
onChange={(e) => {
|
|
48
|
+
st.do.setResignupDaysOnSetting(e.target.valueAsNumber);
|
|
49
|
+
}}
|
|
50
|
+
/>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
`
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/libRoot/lib/setting/Setting.Unit.tsx
|
|
20
|
+
var Setting_Unit_exports = {};
|
|
21
|
+
__export(Setting_Unit_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(Setting_Unit_exports);
|
|
25
|
+
function getContent(scanResult, dict = {}) {
|
|
26
|
+
return {
|
|
27
|
+
filename: "Setting.Unit.tsx",
|
|
28
|
+
content: `
|
|
29
|
+
import { ModelProps } from "@akanjs/client";
|
|
30
|
+
|
|
31
|
+
import { cnst } from "../cnst";
|
|
32
|
+
|
|
33
|
+
export const Card = ({ className, setting }: ModelProps<"setting", cnst.LightSetting>) => {
|
|
34
|
+
return <div>{setting.id}</div>;
|
|
35
|
+
};
|
|
36
|
+
`
|
|
37
|
+
};
|
|
38
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/libRoot/lib/setting/Setting.Util.tsx
|
|
20
|
+
var Setting_Util_exports = {};
|
|
21
|
+
__export(Setting_Util_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(Setting_Util_exports);
|
|
25
|
+
function getContent(scanResult, dict = {}) {
|
|
26
|
+
return {
|
|
27
|
+
filename: "Setting.Util.tsx",
|
|
28
|
+
content: `
|
|
29
|
+
"use client";
|
|
30
|
+
|
|
31
|
+
export const aaa = 1;
|
|
32
|
+
`
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/libRoot/lib/setting/Setting.View.tsx
|
|
20
|
+
var Setting_View_exports = {};
|
|
21
|
+
__export(Setting_View_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(Setting_View_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return {
|
|
27
|
+
filename: "Setting.View.tsx",
|
|
28
|
+
content: `
|
|
29
|
+
import { clsx } from "@akanjs/client";
|
|
30
|
+
import { usePage } from "@${dict.libName}/client";
|
|
31
|
+
|
|
32
|
+
import { cnst } from "../cnst";
|
|
33
|
+
|
|
34
|
+
interface SettingViewProps {
|
|
35
|
+
className?: string;
|
|
36
|
+
setting: cnst.Setting;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const General = ({ className, setting }: SettingViewProps) => {
|
|
40
|
+
const { l } = usePage();
|
|
41
|
+
return (
|
|
42
|
+
<div className={clsx(className, "mr-12")}>
|
|
43
|
+
<div>
|
|
44
|
+
{l("setting.resignupDays")}: {setting.resignupDays}
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
`
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/libRoot/lib/setting/Setting.Zone.tsx
|
|
20
|
+
var Setting_Zone_exports = {};
|
|
21
|
+
__export(Setting_Zone_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(Setting_Zone_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return {
|
|
27
|
+
filename: "Setting.Zone.tsx",
|
|
28
|
+
content: `
|
|
29
|
+
"use client";
|
|
30
|
+
import { ModelsProps } from "@akanjs/client";
|
|
31
|
+
import { Setting, st, usePage } from "@${dict.libName}/client";
|
|
32
|
+
import { Model } from "@akanjs/ui";
|
|
33
|
+
import { Loading } from "@akanjs/ui";
|
|
34
|
+
import { useEffect } from "react";
|
|
35
|
+
import { AiOutlineEdit } from "react-icons/ai";
|
|
36
|
+
|
|
37
|
+
import { cnst } from "../cnst";
|
|
38
|
+
import { msg } from "../dict";
|
|
39
|
+
|
|
40
|
+
export const Admin = ({ sliceName = "setting" }: ModelsProps<cnst.Setting>) => {
|
|
41
|
+
const { l } = usePage();
|
|
42
|
+
const setting = st.use.setting();
|
|
43
|
+
const settingModal = st.use.settingModal();
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
void st.do.getActiveSetting();
|
|
46
|
+
}, []);
|
|
47
|
+
if (!setting) return <Loading.Skeleton active />;
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<div>
|
|
51
|
+
<div className="my-2 flex items-center gap-4 text-3xl">
|
|
52
|
+
{l("setting.modelName")}
|
|
53
|
+
{settingModal ? null : (
|
|
54
|
+
<button className="btn btn-sm" onClick={() => st.do.editSetting(setting.id)}>
|
|
55
|
+
<AiOutlineEdit /> {l("shared.edit")}
|
|
56
|
+
</button>
|
|
57
|
+
)}
|
|
58
|
+
</div>
|
|
59
|
+
{settingModal === "edit" ? (
|
|
60
|
+
<Model.EditModal
|
|
61
|
+
sliceName="setting"
|
|
62
|
+
type="form"
|
|
63
|
+
onSubmit={() => {
|
|
64
|
+
msg.success("setting.updateSuccessMsg");
|
|
65
|
+
}}
|
|
66
|
+
onCancel={() => {
|
|
67
|
+
st.do.resetSetting(setting);
|
|
68
|
+
}}
|
|
69
|
+
>
|
|
70
|
+
<Setting.Template.General />
|
|
71
|
+
</Model.EditModal>
|
|
72
|
+
) : (
|
|
73
|
+
<Setting.View.General setting={setting} />
|
|
74
|
+
)}
|
|
75
|
+
</div>
|
|
76
|
+
);
|
|
77
|
+
};
|
|
78
|
+
`
|
|
79
|
+
};
|
|
80
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/libRoot/lib/setting/index.tsx
|
|
20
|
+
var setting_exports = {};
|
|
21
|
+
__export(setting_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(setting_exports);
|
|
25
|
+
function getContent(scanResult, dict = {}) {
|
|
26
|
+
return {
|
|
27
|
+
filename: "index.tsx",
|
|
28
|
+
content: `
|
|
29
|
+
import { Signal } from "@akanjs/ui";
|
|
30
|
+
import { AiOutlineSetting } from "react-icons/ai";
|
|
31
|
+
|
|
32
|
+
import * as Template from "./Setting.Template";
|
|
33
|
+
import * as Unit from "./Setting.Unit";
|
|
34
|
+
import * as Util from "./Setting.Util";
|
|
35
|
+
import * as View from "./Setting.View";
|
|
36
|
+
import * as Zone from "./Setting.Zone";
|
|
37
|
+
|
|
38
|
+
export const Setting = {
|
|
39
|
+
Menu: {
|
|
40
|
+
Admin: {
|
|
41
|
+
key: "setting",
|
|
42
|
+
label: "Setting",
|
|
43
|
+
icon: <AiOutlineSetting />,
|
|
44
|
+
render: () => <Zone.Admin />,
|
|
45
|
+
},
|
|
46
|
+
Doc: {
|
|
47
|
+
key: "setting",
|
|
48
|
+
label: "Setting",
|
|
49
|
+
icon: <AiOutlineSetting />,
|
|
50
|
+
render: () => <Signal.Doc.Zone refName="setting" />,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
Template,
|
|
54
|
+
Unit,
|
|
55
|
+
Util,
|
|
56
|
+
View,
|
|
57
|
+
Zone,
|
|
58
|
+
};
|
|
59
|
+
`
|
|
60
|
+
};
|
|
61
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/libRoot/lib/summary/Summary.Template.tsx
|
|
20
|
+
var Summary_Template_exports = {};
|
|
21
|
+
__export(Summary_Template_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(Summary_Template_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return {
|
|
27
|
+
filename: "Summary.Template.tsx",
|
|
28
|
+
content: `
|
|
29
|
+
"use client";
|
|
30
|
+
import { st, usePage } from "@${dict.appName}/client";
|
|
31
|
+
|
|
32
|
+
interface SummaryEditProps {
|
|
33
|
+
summaryId?: string | null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const General = ({ summaryId = undefined }: SummaryEditProps) => {
|
|
37
|
+
const summaryForm = st.use.summaryForm();
|
|
38
|
+
const { l } = usePage();
|
|
39
|
+
return <div className="flex items-center mb-4"></div>;
|
|
40
|
+
};
|
|
41
|
+
`
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/libRoot/lib/summary/Summary.Unit.tsx
|
|
20
|
+
var Summary_Unit_exports = {};
|
|
21
|
+
__export(Summary_Unit_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(Summary_Unit_exports);
|
|
25
|
+
function getContent(scanResult, dict = {}) {
|
|
26
|
+
return {
|
|
27
|
+
filename: "Summary.Unit.tsx",
|
|
28
|
+
content: `
|
|
29
|
+
import { ModelProps } from "@akanjs/client";
|
|
30
|
+
|
|
31
|
+
import { cnst } from "../cnst";
|
|
32
|
+
|
|
33
|
+
export const Card = ({ className, summary }: ModelProps<"summary", cnst.LightSummary>) => {
|
|
34
|
+
return <div>{summary.id}</div>;
|
|
35
|
+
};
|
|
36
|
+
`
|
|
37
|
+
};
|
|
38
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/libRoot/lib/summary/Summary.Util.tsx
|
|
20
|
+
var Summary_Util_exports = {};
|
|
21
|
+
__export(Summary_Util_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(Summary_Util_exports);
|
|
25
|
+
function getContent(scanResult, dict = {}) {
|
|
26
|
+
return {
|
|
27
|
+
filename: "Summary.Util.tsx",
|
|
28
|
+
content: `
|
|
29
|
+
"use client";
|
|
30
|
+
export const noData = 1;
|
|
31
|
+
`
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/libRoot/lib/summary/Summary.View.tsx
|
|
20
|
+
var Summary_View_exports = {};
|
|
21
|
+
__export(Summary_View_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(Summary_View_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return {
|
|
27
|
+
filename: "Summary.View.tsx",
|
|
28
|
+
content: `
|
|
29
|
+
import { User, usePage } from "@${dict.libName}/client";
|
|
30
|
+
import { clsx } from "@akanjs/client";
|
|
31
|
+
|
|
32
|
+
import { cnst } from "../cnst";
|
|
33
|
+
|
|
34
|
+
interface SummaryViewProps {
|
|
35
|
+
className?: string;
|
|
36
|
+
summary: cnst.Summary;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const General = ({ className, summary }: SummaryViewProps) => {
|
|
40
|
+
const { l } = usePage();
|
|
41
|
+
return (
|
|
42
|
+
<div className={clsx(className, "mr-12")}>
|
|
43
|
+
<div className="grid grid-cols-5 gap-4">
|
|
44
|
+
<User.Util.Stat className="col-span-2 " summary={summary} />
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
`
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/libRoot/lib/summary/Summary.Zone.tsx
|
|
20
|
+
var Summary_Zone_exports = {};
|
|
21
|
+
__export(Summary_Zone_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(Summary_Zone_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return {
|
|
27
|
+
filename: "Summary.Zone.tsx",
|
|
28
|
+
content: `
|
|
29
|
+
"use client";
|
|
30
|
+
import { ModelsProps } from "@akanjs/client";
|
|
31
|
+
import { DefaultOf } from "@akanjs/signal";
|
|
32
|
+
import { st, Summary } from "@${dict.libName}/client";
|
|
33
|
+
import { Data } from "@akanjs/ui";
|
|
34
|
+
import { Loading } from "@akanjs/ui";
|
|
35
|
+
|
|
36
|
+
import { cnst } from "../cnst";
|
|
37
|
+
|
|
38
|
+
export const Admin = ({ sliceName = "summary", init, query }: ModelsProps<cnst.Summary>) => {
|
|
39
|
+
return (
|
|
40
|
+
<Data.ListContainer
|
|
41
|
+
init={init}
|
|
42
|
+
query={query}
|
|
43
|
+
sliceName={sliceName}
|
|
44
|
+
renderItem={Summary.Unit.Card}
|
|
45
|
+
renderTemplate={Summary.Template.General}
|
|
46
|
+
renderTitle={(summary: DefaultOf<cnst.Summary>) => \`\${summary.at}\`}
|
|
47
|
+
renderView={(summary: cnst.Summary) => <Summary.View.General summary={summary} />}
|
|
48
|
+
type="list"
|
|
49
|
+
columns={["type", "status", "createdAt"]}
|
|
50
|
+
actions={(summary: cnst.LightSummary, idx) => ["remove", "edit"]}
|
|
51
|
+
/>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export const Dashboard = () => {
|
|
56
|
+
const summary = st.use.summary();
|
|
57
|
+
if (!summary) return <Loading.Skeleton active />;
|
|
58
|
+
return <Summary.View.General summary={summary} />;
|
|
59
|
+
};
|
|
60
|
+
`
|
|
61
|
+
};
|
|
62
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/libRoot/lib/summary/index.tsx
|
|
20
|
+
var summary_exports = {};
|
|
21
|
+
__export(summary_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(summary_exports);
|
|
25
|
+
function getContent(scanResult, dict = {}) {
|
|
26
|
+
return {
|
|
27
|
+
filename: "index.tsx",
|
|
28
|
+
content: `
|
|
29
|
+
import { Signal } from "@akanjs/ui";
|
|
30
|
+
import { AiOutlineLineChart } from "react-icons/ai";
|
|
31
|
+
|
|
32
|
+
import * as Template from "./Summary.Template";
|
|
33
|
+
import * as Unit from "./Summary.Unit";
|
|
34
|
+
import * as Util from "./Summary.Util";
|
|
35
|
+
import * as View from "./Summary.View";
|
|
36
|
+
import * as Zone from "./Summary.Zone";
|
|
37
|
+
|
|
38
|
+
export const Summary = {
|
|
39
|
+
Menu: {
|
|
40
|
+
Admin: {
|
|
41
|
+
key: "summary",
|
|
42
|
+
label: "Summary",
|
|
43
|
+
icon: <AiOutlineLineChart />,
|
|
44
|
+
render: () => <Zone.Admin />,
|
|
45
|
+
},
|
|
46
|
+
Doc: {
|
|
47
|
+
key: "summary",
|
|
48
|
+
label: "Summary",
|
|
49
|
+
icon: <AiOutlineLineChart />,
|
|
50
|
+
render: () => <Signal.Doc.Zone refName="summary" />,
|
|
51
|
+
},
|
|
52
|
+
Dashboard: {
|
|
53
|
+
key: "summary",
|
|
54
|
+
label: "Summary",
|
|
55
|
+
icon: <AiOutlineLineChart />,
|
|
56
|
+
render: () => <Zone.Dashboard />,
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
Template,
|
|
60
|
+
Unit,
|
|
61
|
+
Util,
|
|
62
|
+
View,
|
|
63
|
+
Zone,
|
|
64
|
+
};
|
|
65
|
+
`
|
|
66
|
+
};
|
|
67
|
+
}
|