@akanjs/cli 0.0.42 → 0.0.44
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/index.js +126 -95
- package/package.json +1 -1
- package/src/templates/__scalar/__model__/__model__.constant.js +36 -0
- package/src/templates/__scalar/__model__/__model__.dictionary.js +47 -0
- package/src/templates/__scalar/__model__/__model__.document.js +34 -0
- package/src/templates/app/akan.config.ts.template +5 -0
- package/src/templates/app/app/[lang]/(__appName__)/(public)/forgotpassword/page.js +45 -0
- package/src/templates/app/app/[lang]/(__appName__)/(public)/page.js +46 -0
- package/src/templates/app/app/[lang]/(__appName__)/(public)/privacy/page.js +40 -0
- package/src/templates/app/app/[lang]/(__appName__)/(public)/signin/page.js +48 -0
- package/src/templates/app/app/[lang]/(__appName__)/(public)/termsofservice/page.js +39 -0
- package/src/templates/app/app/[lang]/(__appName__)/(user)/layout.js +41 -0
- package/src/templates/app/app/[lang]/(__appName__)/(user)/self/page.js +58 -0
- package/src/templates/app/app/[lang]/(__appName__)/layout.js +50 -0
- package/src/templates/app/app/[lang]/admin/layout.js +51 -0
- package/src/templates/app/app/[lang]/admin/page.js +61 -0
- package/src/templates/app/app/csr.js +32 -0
- package/src/templates/app/app/index.html.template +13 -0
- package/src/templates/app/app/layout.js +36 -0
- package/src/templates/app/app/robots.js +41 -0
- package/src/templates/app/app/sitemap.js +37 -0
- package/src/templates/app/base/baseLogic.js +36 -0
- package/src/templates/app/base/index.js +30 -0
- package/src/templates/app/capacitor.config.ts.template +8 -0
- package/src/templates/app/common/commonLogic.js +36 -0
- package/src/templates/app/common/index.js +30 -0
- package/src/templates/app/env/env.client.js +39 -0
- package/src/templates/app/env/env.client.type.js +36 -0
- package/src/templates/app/env/env.server.js +39 -0
- package/src/templates/app/jest.config.js +37 -0
- package/src/templates/app/lib/___appName__/__appName__.dictionary.js +32 -0
- package/src/templates/app/lib/___appName__/__appName__.service.js +43 -0
- package/src/templates/app/lib/___appName__/__appName__.store.js +37 -0
- package/src/templates/app/lib/___appName__/_server.js +35 -0
- package/src/templates/app/lib/option.js +43 -0
- package/src/templates/app/lib/setting/Setting.Template.js +55 -0
- package/src/templates/app/lib/setting/Setting.Unit.js +36 -0
- package/src/templates/app/lib/setting/Setting.Util.js +32 -0
- package/src/templates/app/lib/setting/Setting.View.js +49 -0
- package/src/templates/app/lib/setting/Setting.Zone.js +78 -0
- package/src/templates/app/lib/setting/_server.js +49 -0
- package/src/templates/app/lib/setting/index.js +59 -0
- package/src/templates/app/lib/setting/setting.constant.js +47 -0
- package/src/templates/app/lib/setting/setting.dictionary.js +47 -0
- package/src/templates/app/lib/setting/setting.document.js +49 -0
- package/src/templates/app/lib/setting/setting.service.js +38 -0
- package/src/templates/app/lib/setting/setting.signal.js +35 -0
- package/src/templates/app/lib/setting/setting.store.js +42 -0
- package/src/templates/app/lib/summary/Summary.Template.js +41 -0
- package/src/templates/app/lib/summary/Summary.Unit.js +36 -0
- package/src/templates/app/lib/summary/Summary.Util.js +31 -0
- package/src/templates/app/lib/summary/Summary.View.js +49 -0
- package/src/templates/app/lib/summary/Summary.Zone.js +60 -0
- package/src/templates/app/lib/summary/_server.js +49 -0
- package/src/templates/app/lib/summary/index.js +65 -0
- package/src/templates/app/lib/summary/summary.constant.js +45 -0
- package/src/templates/app/lib/summary/summary.dictionary.js +50 -0
- package/src/templates/app/lib/summary/summary.document.js +49 -0
- package/src/templates/app/lib/summary/summary.service.js +35 -0
- package/src/templates/app/lib/summary/summary.signal.js +35 -0
- package/src/templates/app/lib/summary/summary.store.js +42 -0
- package/src/templates/app/lib/user/User.Template.js +63 -0
- package/src/templates/app/lib/user/User.Unit.js +36 -0
- package/src/templates/app/lib/user/User.Util.js +92 -0
- package/src/templates/app/lib/user/User.View.js +64 -0
- package/src/templates/app/lib/user/User.Zone.js +72 -0
- package/src/templates/app/lib/user/_server.js +49 -0
- package/src/templates/app/lib/user/index.js +59 -0
- package/src/templates/app/lib/user/user.constant.js +68 -0
- package/src/templates/app/lib/user/user.dictionary.js +53 -0
- package/src/templates/app/lib/user/user.document.js +55 -0
- package/src/templates/app/lib/user/user.service.js +43 -0
- package/src/templates/app/lib/user/user.signal.js +35 -0
- package/src/templates/app/lib/user/user.signal.spec.js +38 -0
- package/src/templates/app/lib/user/user.signal.test.js +40 -0
- package/src/templates/app/lib/user/user.store.js +40 -0
- package/src/templates/app/main.js +41 -0
- package/src/templates/app/middleware.js +36 -0
- package/src/templates/app/nest/backendLogic.js +35 -0
- package/src/templates/app/nest/index.js +30 -0
- package/src/templates/app/next/frontendLogic.js +35 -0
- package/src/templates/app/next/index.js +30 -0
- package/src/templates/app/page.test.ts.template +10 -0
- package/src/templates/app/playwright.config.ts.template +6 -0
- package/src/templates/app/postcss.config.js.template +10 -0
- package/src/templates/app/public/favicon.ico +0 -0
- package/src/templates/app/public/icons/icon-128x128.png +0 -0
- package/src/templates/app/public/icons/icon-144x144.png +0 -0
- package/src/templates/app/public/icons/icon-152x152.png +0 -0
- package/src/templates/app/public/icons/icon-192x192.png +0 -0
- package/src/templates/app/public/icons/icon-256x256.png +0 -0
- package/src/templates/app/public/icons/icon-384x384.png +0 -0
- package/src/templates/app/public/icons/icon-48x48.png +0 -0
- package/src/templates/app/public/icons/icon-512x512.png +0 -0
- package/src/templates/app/public/icons/icon-72x72.png +0 -0
- package/src/templates/app/public/icons/icon-96x96.png +0 -0
- package/src/templates/app/public/logo.svg +70 -0
- package/src/templates/app/public/manifest.json.template +67 -0
- package/src/templates/app/tsconfig.json.template +22 -0
- package/src/templates/app/tsconfig.spec.json.template +7 -0
- package/src/templates/app/ui/Footer.js +65 -0
- package/src/templates/app/ui/MainHeader.js +129 -0
- package/src/templates/app/ui/index.js +31 -0
- package/src/templates/client.js +43 -0
- package/src/templates/crudPages/[__model__Id]/edit/page.js +71 -0
- package/src/templates/crudPages/[__model__Id]/page.js +81 -0
- package/src/templates/crudPages/new/page.js +68 -0
- package/src/templates/crudPages/page.js +69 -0
- package/src/templates/index.js +32 -0
- package/src/templates/lib/__lib/extends/summary.constant.js +44 -0
- package/src/templates/lib/__lib/lib.constant.js +54 -0
- package/src/templates/lib/__lib/lib.dictionary.js +43 -0
- package/src/templates/lib/__lib/lib.document.js +42 -0
- package/src/templates/lib/__lib/lib.service.js +84 -0
- package/src/templates/lib/__lib/lib.signal.js +37 -0
- package/src/templates/lib/__lib/lib.store.js +35 -0
- package/src/templates/lib/__scalar/_server.js +40 -0
- package/src/templates/lib/cnst.js +33 -0
- package/src/templates/lib/cnst_.js +52 -0
- package/src/templates/lib/db.js +54 -0
- package/src/templates/lib/dict.js +46 -0
- package/src/templates/lib/fetch.js +49 -0
- package/src/templates/lib/sig.js +38 -0
- package/src/templates/lib/srv.js +53 -0
- package/src/templates/lib/st.js +37 -0
- package/src/templates/lib/store.js +53 -0
- package/src/templates/lib/usePage.js +34 -0
- package/src/templates/libRoot/.gitignore.template +15 -0
- package/src/templates/libRoot/jest.config.js +37 -0
- package/src/templates/libRoot/package.json.template +5 -0
- package/src/templates/libRoot/tsconfig.json.template +11 -0
- package/src/templates/libRoot/tsconfig.spec.json.template +7 -0
- package/src/templates/module/__Model__.Template.js +52 -0
- package/src/templates/module/__Model__.Unit.js +40 -0
- package/src/templates/module/__Model__.Util.js +68 -0
- package/src/templates/module/__Model__.View.js +46 -0
- package/src/templates/module/__Model__.Zone.js +81 -0
- package/src/templates/module/__model__.constant.js +70 -0
- package/src/templates/module/__model__.dictionary.js +99 -0
- package/src/templates/module/__model__.document.js +54 -0
- package/src/templates/module/__model__.service.js +42 -0
- package/src/templates/module/__model__.signal.js +61 -0
- package/src/templates/module/__model__.signal.spec.js +40 -0
- package/src/templates/module/__model__.signal.test.js +49 -0
- package/src/templates/module/__model__.store.js +40 -0
- package/src/templates/module/_server.js +48 -0
- package/src/templates/module/index.js +59 -0
- package/src/templates/pkgRoot/tsconfig.json.template +12 -0
- package/src/templates/server.js +60 -0
- package/src/templates/workplaceRoot/.env.template +20 -0
- package/src/templates/workplaceRoot/.gitignore.template +195 -0
- package/src/templates/workplaceRoot/.prettierignore.template +10 -0
- package/src/templates/workplaceRoot/.prettierrc.json.template +5 -0
- package/src/templates/workplaceRoot/.swcrc.template +9 -0
- package/src/templates/workplaceRoot/README.md.template +37 -0
- package/src/templates/workplaceRoot/eslint.config.js.template +141 -0
- package/src/templates/workplaceRoot/tsconfig.json.template +29 -0
|
@@ -0,0 +1,40 @@
|
|
|
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/lib/__scalar/_server.ts
|
|
20
|
+
var server_exports = {};
|
|
21
|
+
__export(server_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(server_exports);
|
|
25
|
+
var capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
26
|
+
function getContent(scanResult, dict = {}) {
|
|
27
|
+
if (!scanResult)
|
|
28
|
+
return null;
|
|
29
|
+
const scalarModules = scanResult.files.constants.scalars;
|
|
30
|
+
return `
|
|
31
|
+
import { scalarModulesOf } from "@akanjs/server";
|
|
32
|
+
|
|
33
|
+
import type { ModulesOptions } from "../option";
|
|
34
|
+
import { allSrvs } from "../srv";
|
|
35
|
+
${scalarModules.map((module2) => `import { ${capitalize(module2)} } from "./${module2}/${module2}.constant";`).join("\n")}
|
|
36
|
+
|
|
37
|
+
export const registerScalarModule = (option: ModulesOptions) => scalarModulesOf({ constants: [${scalarModules.map((module2) => capitalize(module2)).join(", ")}] }, allSrvs);
|
|
38
|
+
`;
|
|
39
|
+
}
|
|
40
|
+
module.exports = module.exports.default;
|
|
@@ -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/lib/cnst.ts
|
|
20
|
+
var cnst_exports = {};
|
|
21
|
+
__export(cnst_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(cnst_exports);
|
|
25
|
+
function getContent(scanResult, dict = {}) {
|
|
26
|
+
return `
|
|
27
|
+
import type { AllSrvs } from "./srv";
|
|
28
|
+
|
|
29
|
+
export * as cnst from "./cnst_";
|
|
30
|
+
export const Srvs = {} as AllSrvs;
|
|
31
|
+
`;
|
|
32
|
+
}
|
|
33
|
+
module.exports = module.exports.default;
|
|
@@ -0,0 +1,52 @@
|
|
|
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/lib/cnst_.ts
|
|
20
|
+
var cnst_exports = {};
|
|
21
|
+
__export(cnst_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(cnst_exports);
|
|
25
|
+
function getContent(scanResult, dict = {}) {
|
|
26
|
+
if (!scanResult)
|
|
27
|
+
return null;
|
|
28
|
+
const databaseModules = scanResult.files.constants.databases;
|
|
29
|
+
const scalarModules = scanResult.files.constants.scalars;
|
|
30
|
+
const rootLib = scanResult.akanConfig.rootLib;
|
|
31
|
+
return `
|
|
32
|
+
import { cnstOf } from "@akanjs/constant";
|
|
33
|
+
|
|
34
|
+
${rootLib ? `import { root } from "./__lib/lib.constant";` : ""}
|
|
35
|
+
${databaseModules.map((module2) => `import * as ${module2} from "./${module2}/${module2}.constant";`).join("\n")}
|
|
36
|
+
|
|
37
|
+
export * from "./__lib/lib.constant";
|
|
38
|
+
${databaseModules.map((module2) => `export * from "./${module2}/${module2}.constant";`).join("\n")}
|
|
39
|
+
${scalarModules.map((module2) => `export * from "./__scalar/${module2}/${module2}.constant";`).join("\n")}
|
|
40
|
+
|
|
41
|
+
${databaseModules.map((module2) => {
|
|
42
|
+
const names = {
|
|
43
|
+
Module: module2.charAt(0).toUpperCase() + module2.slice(1)
|
|
44
|
+
};
|
|
45
|
+
if (module2 === "setting" || module2 === "summary")
|
|
46
|
+
return `export const ${module2}Cnst = cnstOf("${module2}" as const, ${module2}.${names.Module}Input, ${module2}.${names.Module}, ${module2}.Light${names.Module}, ${rootLib ? "root" : module2}.${names.Module}Insight, ${rootLib ? "root" : module2}.${names.Module}Filter);`;
|
|
47
|
+
else
|
|
48
|
+
return `export const ${module2}Cnst = cnstOf("${module2}" as const, ${module2}.${names.Module}Input, ${module2}.${names.Module}, ${module2}.Light${names.Module}, ${module2}.${names.Module}Insight, ${module2}.${names.Module}Filter, ${module2}.${names.Module}Summary);`;
|
|
49
|
+
}).join("\n")}
|
|
50
|
+
`;
|
|
51
|
+
}
|
|
52
|
+
module.exports = module.exports.default;
|
|
@@ -0,0 +1,54 @@
|
|
|
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/lib/db.ts
|
|
20
|
+
var db_exports = {};
|
|
21
|
+
__export(db_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(db_exports);
|
|
25
|
+
function getContent(scanResult, dict = {}) {
|
|
26
|
+
if (!scanResult)
|
|
27
|
+
return null;
|
|
28
|
+
const databaseModules = scanResult.files.constants.databases;
|
|
29
|
+
const scalarModules = scanResult.files.constants.scalars;
|
|
30
|
+
const rootLib = scanResult.akanConfig.rootLib;
|
|
31
|
+
return `
|
|
32
|
+
import { dbOf } from "@akanjs/document";
|
|
33
|
+
|
|
34
|
+
${rootLib ? `import { root } from "./__lib/lib.constant";` : ""}
|
|
35
|
+
import { cnst } from "./cnst";
|
|
36
|
+
|
|
37
|
+
${databaseModules.map((module2) => `import * as ${module2} from "./${module2}/${module2}.document";`).join("\n")}
|
|
38
|
+
|
|
39
|
+
export type * from "./__lib/lib.document";
|
|
40
|
+
${databaseModules.map((module2) => `export type * from "./${module2}/${module2}.document";`).join("\n")}
|
|
41
|
+
${scalarModules.map((module2) => `export type * from "./__scalar/${module2}/${module2}.document";`).join("\n")}
|
|
42
|
+
|
|
43
|
+
${databaseModules.map((module2) => {
|
|
44
|
+
const names = {
|
|
45
|
+
Module: module2.charAt(0).toUpperCase() + module2.slice(1)
|
|
46
|
+
};
|
|
47
|
+
if (module2 === "setting" || module2 === "summary")
|
|
48
|
+
return `export const ${module2}Db = dbOf("${module2}" as const, ${module2}.${names.Module}Input, ${module2}.${names.Module}, ${module2}.${names.Module}Model, ${module2}.${names.Module}Middleware, cnst.${names.Module}, cnst.${rootLib ? "root." : ""}${names.Module}Insight, cnst.${rootLib ? "root." : ""}${names.Module}Filter);`;
|
|
49
|
+
else
|
|
50
|
+
return `export const ${module2}Db = dbOf("${module2}" as const, ${module2}.${names.Module}Input, ${module2}.${names.Module}, ${module2}.${names.Module}Model, ${module2}.${names.Module}Middleware, cnst.${names.Module}, cnst.${names.Module}Insight, cnst.${names.Module}Filter, cnst.${names.Module}Summary);`;
|
|
51
|
+
}).join("\n")}
|
|
52
|
+
`;
|
|
53
|
+
}
|
|
54
|
+
module.exports = module.exports.default;
|
|
@@ -0,0 +1,46 @@
|
|
|
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/lib/dict.ts
|
|
20
|
+
var dict_exports = {};
|
|
21
|
+
__export(dict_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(dict_exports);
|
|
25
|
+
function getContent(scanResult, dict = {}) {
|
|
26
|
+
if (!scanResult)
|
|
27
|
+
return null;
|
|
28
|
+
const databaseModules = scanResult.files.dictionary.databases;
|
|
29
|
+
const scalarModules = scanResult.files.dictionary.scalars;
|
|
30
|
+
const serviceModules = scanResult.files.dictionary.services;
|
|
31
|
+
return `
|
|
32
|
+
import { makeDictionary, makeTrans } from "@akanjs/dictionary";
|
|
33
|
+
|
|
34
|
+
import { libDictionaries } from "./__lib/lib.dictionary";
|
|
35
|
+
${databaseModules.map((module2) => `import { ${module2}Dictionary } from "./${module2}/${module2}.dictionary";`).join("\n")}
|
|
36
|
+
${serviceModules.map((module2) => `import { ${module2}Dictionary } from "./_${module2}/${module2}.dictionary";`).join("\n")}
|
|
37
|
+
${scalarModules.map((module2) => `import { ${module2}Dictionary } from "./__scalar/${module2}/${module2}.dictionary";`).join("\n")}
|
|
38
|
+
|
|
39
|
+
export const dictionary = makeDictionary(...libDictionaries, {
|
|
40
|
+
${[...databaseModules, ...scalarModules, ...serviceModules].map((module2) => `${module2}: ${module2}Dictionary`).join(",\n ")}
|
|
41
|
+
} as const);
|
|
42
|
+
|
|
43
|
+
export const { Revert, translate, msg } = makeTrans(dictionary);
|
|
44
|
+
`;
|
|
45
|
+
}
|
|
46
|
+
module.exports = module.exports.default;
|
|
@@ -0,0 +1,49 @@
|
|
|
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/lib/fetch.ts
|
|
20
|
+
var fetch_exports = {};
|
|
21
|
+
__export(fetch_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(fetch_exports);
|
|
25
|
+
var capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
26
|
+
function getContent(scanResult, dict = {}) {
|
|
27
|
+
if (!scanResult)
|
|
28
|
+
return null;
|
|
29
|
+
const databaseModules = scanResult.files.signal.databases;
|
|
30
|
+
const scalarConstantModules = scanResult.files.constants.scalars;
|
|
31
|
+
const serviceModules = scanResult.files.signal.services;
|
|
32
|
+
return `
|
|
33
|
+
import { fetchOf, gqlOf, makeFetch, scalarUtilOf } from "@akanjs/signal";
|
|
34
|
+
|
|
35
|
+
import { root, libFetches } from "./__lib/lib.signal";
|
|
36
|
+
import { cnst } from "./cnst";
|
|
37
|
+
import * as sig from "./sig";
|
|
38
|
+
|
|
39
|
+
${databaseModules.map((module2) => `${["user", "setting", "summary"].includes(module2) ? "export " : ""}const ${module2}Gql = gqlOf(cnst.${module2}Cnst, sig.${capitalize(module2)}Signal${scanResult.name !== "shared" && ["user", "setting", "summary"].includes(module2) ? `, { overwrite: root.${module2}Gql }` : ""});`).join("\n")}
|
|
40
|
+
|
|
41
|
+
export const fetch = makeFetch(...libFetches, {
|
|
42
|
+
${databaseModules.map((module2) => `...${module2}Gql,`).join("\n")}
|
|
43
|
+
${scalarConstantModules.map((module2) => `...scalarUtilOf("${module2}" as const, cnst.${capitalize(module2)}),`).join("\n")}
|
|
44
|
+
${serviceModules.map((module2) => `...fetchOf(sig.${capitalize(module2)}Signal),`).join("\n")}
|
|
45
|
+
${databaseModules.map((module2) => `${module2}Gql,`).join("\n")}
|
|
46
|
+
});
|
|
47
|
+
`;
|
|
48
|
+
}
|
|
49
|
+
module.exports = module.exports.default;
|
|
@@ -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/lib/sig.ts
|
|
20
|
+
var sig_exports = {};
|
|
21
|
+
__export(sig_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(sig_exports);
|
|
25
|
+
var capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
26
|
+
function getContent(scanResult, dict = {}) {
|
|
27
|
+
if (!scanResult)
|
|
28
|
+
return null;
|
|
29
|
+
const databaseModules = scanResult.files.signal.databases;
|
|
30
|
+
const scalarModules = scanResult.files.signal.scalars;
|
|
31
|
+
const serviceModules = scanResult.files.signal.services;
|
|
32
|
+
return `
|
|
33
|
+
${databaseModules.map((module2) => `export { ${capitalize(module2)}Signal } from "./${module2}/${module2}.signal";`).join("\n")}
|
|
34
|
+
${serviceModules.map((module2) => `export { ${capitalize(module2)}Signal } from "./_${module2}/${module2}.signal";`).join("\n")}
|
|
35
|
+
${scalarModules.map((module2) => `export { ${capitalize(module2)}Signal } from "./__scalar/${module2}/${module2}.signal";`).join("\n")}
|
|
36
|
+
`;
|
|
37
|
+
}
|
|
38
|
+
module.exports = module.exports.default;
|
|
@@ -0,0 +1,53 @@
|
|
|
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/lib/srv.ts
|
|
20
|
+
var srv_exports = {};
|
|
21
|
+
__export(srv_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(srv_exports);
|
|
25
|
+
var capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
26
|
+
function getContent(scanResult, dict = {}) {
|
|
27
|
+
if (!scanResult)
|
|
28
|
+
return null;
|
|
29
|
+
const databaseModules = scanResult.files.services.databases;
|
|
30
|
+
const scalarModules = scanResult.files.services.scalars;
|
|
31
|
+
const serviceModules = scanResult.files.services.services;
|
|
32
|
+
return `
|
|
33
|
+
import { GetServices } from "@akanjs/service";
|
|
34
|
+
|
|
35
|
+
import { libAllSrvs } from "./__lib/lib.service";
|
|
36
|
+
${databaseModules.map((module2) => `import { ${capitalize(module2)}Service } from "./${module2}/${module2}.service";`).join("\n")}
|
|
37
|
+
${serviceModules.map((module2) => `import { ${capitalize(module2)}Service } from "./_${module2}/${module2}.service";`).join("\n")}
|
|
38
|
+
${scalarModules.map((module2) => `import { ${capitalize(module2)}Service } from "./${module2}/${module2}.service";`).join("\n")}
|
|
39
|
+
|
|
40
|
+
export * from "./__lib/lib.service";
|
|
41
|
+
${databaseModules.map((module2) => `export { ${capitalize(module2)}Service } from "./${module2}/${module2}.service";`).join("\n")}
|
|
42
|
+
${serviceModules.map((module2) => `export { ${capitalize(module2)}Service } from "./_${module2}/${module2}.service";`).join("\n")}
|
|
43
|
+
${scalarModules.map((module2) => `export { ${capitalize(module2)}Service } from "./${module2}/${module2}.service";`).join("\n")}
|
|
44
|
+
|
|
45
|
+
export const allSrvs = {
|
|
46
|
+
...libAllSrvs,
|
|
47
|
+
${[...databaseModules, ...scalarModules, ...serviceModules].map((module2) => `${capitalize(module2)}Service`).join(",\n ")}
|
|
48
|
+
} as const;
|
|
49
|
+
|
|
50
|
+
export type AllSrvs = GetServices<typeof allSrvs>;
|
|
51
|
+
`;
|
|
52
|
+
}
|
|
53
|
+
module.exports = module.exports.default;
|
|
@@ -0,0 +1,37 @@
|
|
|
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/lib/st.ts
|
|
20
|
+
var st_exports = {};
|
|
21
|
+
__export(st_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(st_exports);
|
|
25
|
+
function getContent(scanResult, dict = {}) {
|
|
26
|
+
if (!scanResult)
|
|
27
|
+
return null;
|
|
28
|
+
return `
|
|
29
|
+
"use client";
|
|
30
|
+
import { makeStore, st as baseSt } from "@akanjs/store";
|
|
31
|
+
|
|
32
|
+
import { store } from "./store";
|
|
33
|
+
|
|
34
|
+
export const st = makeStore(baseSt, store${scanResult.type === "lib" ? `, { library: true }` : ""});
|
|
35
|
+
`;
|
|
36
|
+
}
|
|
37
|
+
module.exports = module.exports.default;
|
|
@@ -0,0 +1,53 @@
|
|
|
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/lib/store.ts
|
|
20
|
+
var store_exports = {};
|
|
21
|
+
__export(store_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(store_exports);
|
|
25
|
+
var capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
26
|
+
function getContent(scanResult, dict = {}) {
|
|
27
|
+
if (!scanResult)
|
|
28
|
+
return null;
|
|
29
|
+
const names = {
|
|
30
|
+
name: scanResult.name,
|
|
31
|
+
Name: capitalize(scanResult.name)
|
|
32
|
+
};
|
|
33
|
+
const databaseModules = scanResult.files.store.databases;
|
|
34
|
+
const scalarModules = scanResult.files.store.scalars;
|
|
35
|
+
const serviceModules = scanResult.files.store.services;
|
|
36
|
+
return `
|
|
37
|
+
"use client";
|
|
38
|
+
import { MixStore, rootStoreOf } from "@akanjs/store";
|
|
39
|
+
|
|
40
|
+
import { libStores } from "./__lib/lib.store";
|
|
41
|
+
${databaseModules.map((module2) => `import { ${capitalize(module2)}Store } from "./${module2}/${module2}.store";`).join("\n")}
|
|
42
|
+
${serviceModules.map((module2) => `import { ${capitalize(module2)}Store } from "./_${module2}/${module2}.store";`).join("\n")}
|
|
43
|
+
${scalarModules.map((module2) => `import { ${capitalize(module2)}Store } from "./__scalar/${module2}/${module2}.store";`).join("\n")}
|
|
44
|
+
export class RootStore extends MixStore(
|
|
45
|
+
...libStores,
|
|
46
|
+
${names.Name}Store,
|
|
47
|
+
${[...databaseModules, ...scalarModules, ...serviceModules].map((module2) => `${capitalize(module2)}Store`).join(",\n ")}
|
|
48
|
+
) {}
|
|
49
|
+
|
|
50
|
+
export const store = rootStoreOf(RootStore);
|
|
51
|
+
`;
|
|
52
|
+
}
|
|
53
|
+
module.exports = module.exports.default;
|
|
@@ -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/lib/usePage.ts
|
|
20
|
+
var usePage_exports = {};
|
|
21
|
+
__export(usePage_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(usePage_exports);
|
|
25
|
+
function getContent(scanResult, dict = {}) {
|
|
26
|
+
return `
|
|
27
|
+
import { makePageProto } from "@akanjs/next";
|
|
28
|
+
|
|
29
|
+
import { dictionary } from "./dict";
|
|
30
|
+
|
|
31
|
+
export const usePage = makePageProto([dictionary]);
|
|
32
|
+
`;
|
|
33
|
+
}
|
|
34
|
+
module.exports = module.exports.default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
**/script.ts
|
|
2
|
+
**/script*.ts
|
|
3
|
+
**/.env
|
|
4
|
+
**/env.client.debug.ts*
|
|
5
|
+
**/env.client.develop.ts*
|
|
6
|
+
**/env.client.main.ts*
|
|
7
|
+
**/env.client.testing.ts*
|
|
8
|
+
**/env.server.debug.ts*
|
|
9
|
+
**/env.server.develop.ts*
|
|
10
|
+
**/env.server.main.ts*
|
|
11
|
+
**/env.server.testing.ts*
|
|
12
|
+
|
|
13
|
+
# System Files
|
|
14
|
+
.DS_Store
|
|
15
|
+
Thumbs.db
|
|
@@ -0,0 +1,37 @@
|
|
|
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/jest.config.ts
|
|
20
|
+
var jest_config_exports = {};
|
|
21
|
+
__export(jest_config_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(jest_config_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return `
|
|
27
|
+
//! will be replaced with akan.config.ts
|
|
28
|
+
import "tsconfig-paths/register";
|
|
29
|
+
|
|
30
|
+
import { withBase } from "@akanjs/test/src/jest.config.base";
|
|
31
|
+
|
|
32
|
+
const config = withBase("${dict.appName}");
|
|
33
|
+
|
|
34
|
+
export default config;
|
|
35
|
+
`;
|
|
36
|
+
}
|
|
37
|
+
module.exports = module.exports.default;
|
|
@@ -0,0 +1,52 @@
|
|
|
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/module/__Model__.Template.tsx
|
|
20
|
+
var Model_Template_exports = {};
|
|
21
|
+
__export(Model_Template_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(Model_Template_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return `
|
|
27
|
+
"use client";
|
|
28
|
+
import { cnst, st, usePage } from "@${dict.appName}/client";
|
|
29
|
+
import { Field } from "@shared/ui";
|
|
30
|
+
import { Layout } from "@util/ui";
|
|
31
|
+
|
|
32
|
+
interface ${dict.Model}EditProps {
|
|
33
|
+
${dict.model}Id?: string | null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const General = ({ ${dict.model}Id = undefined }: ${dict.Model}EditProps) => {
|
|
37
|
+
const ${dict.model}Form = st.use.${dict.model}Form();
|
|
38
|
+
const { l } = usePage();
|
|
39
|
+
return (
|
|
40
|
+
<Layout.Template>
|
|
41
|
+
<Field.Text
|
|
42
|
+
label={l.field("${dict.model}", "id")}
|
|
43
|
+
desc={l.desc("${dict.model}", "id")}
|
|
44
|
+
value={${dict.model}Form.id}
|
|
45
|
+
onChange={st.do.setIdOn${dict.Model}}
|
|
46
|
+
/>
|
|
47
|
+
</Layout.Template>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
`;
|
|
51
|
+
}
|
|
52
|
+
module.exports = module.exports.default;
|