@vc-shell/create-vc-app 1.0.148 → 1.0.150
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/CHANGELOG.md +14 -0
- package/dist/templates/base/_env +2 -0
- package/dist/templates/base/package.json +7 -7
- package/dist/templates/base/src/bootstrap.ts +19 -0
- package/dist/templates/base/src/locales/en.json +40 -0
- package/dist/templates/variants/both/src/main.ts +7 -0
- package/dist/templates/variants/both/src/modules/dynamic-module/composables/useList/index.ts +5 -1
- package/dist/templates/variants/both/src/modules/dynamic-module/pages/details.ts +0 -1
- package/dist/templates/variants/classic/src/main.ts +7 -0
- package/dist/templates/variants/dynamic/src/main.ts +7 -0
- package/dist/templates/variants/dynamic/src/modules/dynamic-module/composables/useList/index.ts +5 -1
- package/dist/templates/variants/dynamic/src/modules/dynamic-module/pages/details.ts +0 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.0.150](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.149...v1.0.150) (2024-01-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## [1.0.149](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.148...v1.0.149) (2024-01-24)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **create-vc-app:** update package.json and useList composable ([f1ccde1](https://github.com/VirtoCommerce/vc-shell/commit/f1ccde11a9e1e2f91af1a4b82e2c4a072996e008))
|
|
11
|
+
* **framework:** updated localization setup, i18n locales config, dynamic modules localization ([209b92f](https://github.com/VirtoCommerce/vc-shell/commit/209b92fe2bf95379d908064d553ab59e16928569))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
1
15
|
## [1.0.148](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.147...v1.0.148) (2024-01-16)
|
|
2
16
|
|
|
3
17
|
|
package/dist/templates/base/_env
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"type-check": "vue-tsc --noEmit",
|
|
13
13
|
"lint-staged": "lint-staged",
|
|
14
14
|
"lint": "eslint --fix --cache '**/*.{ts,vue}'",
|
|
15
|
-
"generate
|
|
15
|
+
"generate-api-client": "cross-env api-client-generator --APP_PLATFORM_MODULES='[]' --APP_API_CLIENT_DIRECTORY=./src/api_client/",
|
|
16
16
|
"release": "tsx scripts/release.ts --dry"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"@types/node": "^20.10.5",
|
|
25
25
|
"@typescript-eslint/eslint-plugin": "^6.16.0",
|
|
26
26
|
"@typescript-eslint/parser": "^6.16.0",
|
|
27
|
-
"@vc-shell/api-client-generator": "^1.0.
|
|
28
|
-
"@vc-shell/release-config": "^1.0.
|
|
29
|
-
"@vc-shell/ts-config": "^1.0.
|
|
27
|
+
"@vc-shell/api-client-generator": "^1.0.150",
|
|
28
|
+
"@vc-shell/release-config": "^1.0.150",
|
|
29
|
+
"@vc-shell/ts-config": "^1.0.150",
|
|
30
30
|
"@vitejs/plugin-vue": "^5.0.3",
|
|
31
31
|
"@vue/eslint-config-prettier": "^9.0.0",
|
|
32
32
|
"@vue/eslint-config-typescript": "^12.0.0",
|
|
@@ -56,14 +56,14 @@
|
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@fortawesome/fontawesome-free": "^5.15.3",
|
|
59
|
-
"@vc-shell/config-generator": "^1.0.
|
|
60
|
-
"@vc-shell/framework": "^1.0.
|
|
59
|
+
"@vc-shell/config-generator": "^1.0.150",
|
|
60
|
+
"@vc-shell/framework": "^1.0.150",
|
|
61
61
|
"@vueuse/core": "^10.7.1",
|
|
62
62
|
"@vueuse/integrations": "^10.7.1",
|
|
63
63
|
"moment": "^2.30.1",
|
|
64
64
|
"roboto-fontface": "^0.10.0",
|
|
65
65
|
"vee-validate": "^4.12.4",
|
|
66
|
-
"vue": "^3.4.
|
|
66
|
+
"vue": "^3.4.14",
|
|
67
67
|
"vue-router": "^4.2.5"
|
|
68
68
|
},
|
|
69
69
|
"lint-staged": {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useMenuService, useLanguages } from "@vc-shell/framework";
|
|
2
|
+
import { App } from "vue";
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5
|
+
export function bootstrap(app: App) {
|
|
6
|
+
const { addMenuItem } = useMenuService();
|
|
7
|
+
|
|
8
|
+
const { setLocale, currentLocale } = useLanguages();
|
|
9
|
+
|
|
10
|
+
setLocale(currentLocale.value);
|
|
11
|
+
|
|
12
|
+
// Add Dashboard to main menu item
|
|
13
|
+
addMenuItem({
|
|
14
|
+
title: "SHELL.MENU.DASHBOARD",
|
|
15
|
+
icon: "fas fa-home",
|
|
16
|
+
priority: 0,
|
|
17
|
+
url: "/",
|
|
18
|
+
});
|
|
19
|
+
}
|
|
@@ -202,5 +202,45 @@
|
|
|
202
202
|
"PasswordRequiresNonAlphanumeric": "Passwords must have at least one non alphanumeric character",
|
|
203
203
|
"recentPasswordUsed": "You have used this password in the past. Choose another one."
|
|
204
204
|
}
|
|
205
|
+
},
|
|
206
|
+
"messages": {
|
|
207
|
+
"_default": "The {field} is not valid",
|
|
208
|
+
"alpha": "The {field} field may only contain alphabetic characters",
|
|
209
|
+
"alpha_num": "The {field} field may only contain alpha-numeric characters",
|
|
210
|
+
"alpha_dash": "The {field} field may contain alpha-numeric characters as well as dashes and underscores",
|
|
211
|
+
"alpha_spaces": "The {field} field may only contain alphabetic characters as well as spaces",
|
|
212
|
+
"between": "The {field} field must be between 0:{min} and 1:{max}",
|
|
213
|
+
"confirmed": "The {field} field confirmation does not match",
|
|
214
|
+
"digits": "The {field} field must be numeric and exactly contain 0:{length} digits",
|
|
215
|
+
"dimensions": "The {field} field must be 0:{width} pixels by 1:{height} pixels",
|
|
216
|
+
"email": "The {field} field must be a valid email",
|
|
217
|
+
"not_one_of": "The {field} field is not a valid value",
|
|
218
|
+
"ext": "The {field} field is not a valid file",
|
|
219
|
+
"image": "The {field} field must be an image",
|
|
220
|
+
"integer": "The {field} field must be an integer",
|
|
221
|
+
"length": "The {field} field must be 0:{length} long",
|
|
222
|
+
"max_value": "The {field} field must be 0:{max} or less",
|
|
223
|
+
"max": "The {field} field may not be greater than 0:{length} characters",
|
|
224
|
+
"mimes": "The {field} field must have a valid file type",
|
|
225
|
+
"min_value": "The {field} field must be 0:{min} or more",
|
|
226
|
+
"min": "The {field} field must be at least 0:{length} characters",
|
|
227
|
+
"numeric": "The {field} field may only contain numeric characters",
|
|
228
|
+
"one_of": "The {field} field is not a valid value",
|
|
229
|
+
"regex": "The {field} field format is invalid",
|
|
230
|
+
"required_if": "The {field} field is required",
|
|
231
|
+
"required": "The {field} field is required",
|
|
232
|
+
"size": "The {field} field size must be less than 0:{size}KB",
|
|
233
|
+
"url": "The {field} field is not a valid URL",
|
|
234
|
+
"min_dimensions": {
|
|
235
|
+
"error": "Image dimensions must be greater than {height}*{width}",
|
|
236
|
+
"not_image_error": "Not image file"
|
|
237
|
+
},
|
|
238
|
+
"file_weight": "File size must be maximum {size} kb",
|
|
239
|
+
"before": "End date must be earlier than start date",
|
|
240
|
+
"after": "End date must be later than start date",
|
|
241
|
+
"bigint": "Unsupported number"
|
|
242
|
+
},
|
|
243
|
+
"PERMISSION_MESSAGES": {
|
|
244
|
+
"ACCESS_RESTRICTED": "Access restricted"
|
|
205
245
|
}
|
|
206
246
|
}
|
|
@@ -5,6 +5,7 @@ import * as locales from "./locales";
|
|
|
5
5
|
import { RouterView } from "vue-router";
|
|
6
6
|
import ClassicModule from "./modules/classic-module";
|
|
7
7
|
import DynamicModule from "./modules/dynamic-module";
|
|
8
|
+
import { bootstrap } from "./bootstrap";
|
|
8
9
|
|
|
9
10
|
// Load required CSS
|
|
10
11
|
import "./styles/index.scss";
|
|
@@ -21,6 +22,10 @@ async function startApp() {
|
|
|
21
22
|
.use(VirtoShellFramework, {
|
|
22
23
|
router,
|
|
23
24
|
platformUrl: import.meta.env.APP_PLATFORM_URL,
|
|
25
|
+
i18n: {
|
|
26
|
+
locale: import.meta.env.APP_I18N_LOCALE,
|
|
27
|
+
fallbackLocale: import.meta.env.APP_I18N_FALLBACK_LOCALE,
|
|
28
|
+
},
|
|
24
29
|
})
|
|
25
30
|
// Classic module based on composables, pages and components
|
|
26
31
|
.use(ClassicModule, { router })
|
|
@@ -28,6 +33,8 @@ async function startApp() {
|
|
|
28
33
|
.use(DynamicModule, { router })
|
|
29
34
|
.use(router);
|
|
30
35
|
|
|
36
|
+
bootstrap(app);
|
|
37
|
+
|
|
31
38
|
Object.entries(locales).forEach(([key, message]) => {
|
|
32
39
|
app.config.globalProperties.$mergeLocaleMessage(key, message);
|
|
33
40
|
});
|
package/dist/templates/variants/both/src/modules/dynamic-module/composables/useList/index.ts
CHANGED
|
@@ -51,9 +51,12 @@ export default (args: {
|
|
|
51
51
|
return { results: res, totalCount: res.length };
|
|
52
52
|
});
|
|
53
53
|
},
|
|
54
|
+
remove: () => {
|
|
55
|
+
throw new Error("Function not implemented.");
|
|
56
|
+
}
|
|
54
57
|
});
|
|
55
58
|
|
|
56
|
-
const { load, items, pagination, loading, query } = factory();
|
|
59
|
+
const { load, remove, items, pagination, loading, query } = factory();
|
|
57
60
|
const { openBlade, resolveBladeByName } = useBladeNavigation();
|
|
58
61
|
|
|
59
62
|
async function openDetailsBlade(data?: Omit<Parameters<typeof openBlade>["0"], "blade">) {
|
|
@@ -70,6 +73,7 @@ export default (args: {
|
|
|
70
73
|
return {
|
|
71
74
|
items,
|
|
72
75
|
load,
|
|
76
|
+
remove,
|
|
73
77
|
loading,
|
|
74
78
|
pagination,
|
|
75
79
|
query,
|
|
@@ -4,6 +4,7 @@ import { router } from "./router";
|
|
|
4
4
|
import * as locales from "./locales";
|
|
5
5
|
import { RouterView } from "vue-router";
|
|
6
6
|
import ClassicModule from "./modules/classic-module";
|
|
7
|
+
import { bootstrap } from "./bootstrap";
|
|
7
8
|
|
|
8
9
|
// Load required CSS
|
|
9
10
|
import "./styles/index.scss";
|
|
@@ -20,11 +21,17 @@ async function startApp() {
|
|
|
20
21
|
.use(VirtoShellFramework, {
|
|
21
22
|
router,
|
|
22
23
|
platformUrl: import.meta.env.APP_PLATFORM_URL,
|
|
24
|
+
i18n: {
|
|
25
|
+
locale: import.meta.env.APP_I18N_LOCALE,
|
|
26
|
+
fallbackLocale: import.meta.env.APP_I18N_FALLBACK_LOCALE,
|
|
27
|
+
},
|
|
23
28
|
})
|
|
24
29
|
// Classic module based on composables, pages and components
|
|
25
30
|
.use(ClassicModule, { router })
|
|
26
31
|
.use(router);
|
|
27
32
|
|
|
33
|
+
bootstrap(app);
|
|
34
|
+
|
|
28
35
|
Object.entries(locales).forEach(([key, message]) => {
|
|
29
36
|
app.config.globalProperties.$mergeLocaleMessage(key, message);
|
|
30
37
|
});
|
|
@@ -4,6 +4,7 @@ import { router } from "./router";
|
|
|
4
4
|
import * as locales from "./locales";
|
|
5
5
|
import { RouterView } from "vue-router";
|
|
6
6
|
import DynamicModule from "./modules/dynamic-module";
|
|
7
|
+
import { bootstrap } from "./bootstrap";
|
|
7
8
|
|
|
8
9
|
// Load required CSS
|
|
9
10
|
import "./styles/index.scss";
|
|
@@ -20,11 +21,17 @@ async function startApp() {
|
|
|
20
21
|
.use(VirtoShellFramework, {
|
|
21
22
|
router,
|
|
22
23
|
platformUrl: import.meta.env.APP_PLATFORM_URL,
|
|
24
|
+
i18n: {
|
|
25
|
+
locale: import.meta.env.APP_I18N_LOCALE,
|
|
26
|
+
fallbackLocale: import.meta.env.APP_I18N_FALLBACK_LOCALE,
|
|
27
|
+
},
|
|
23
28
|
})
|
|
24
29
|
// Dynamic module based on page schemas
|
|
25
30
|
.use(DynamicModule, { router })
|
|
26
31
|
.use(router);
|
|
27
32
|
|
|
33
|
+
bootstrap(app);
|
|
34
|
+
|
|
28
35
|
Object.entries(locales).forEach(([key, message]) => {
|
|
29
36
|
app.config.globalProperties.$mergeLocaleMessage(key, message);
|
|
30
37
|
});
|
package/dist/templates/variants/dynamic/src/modules/dynamic-module/composables/useList/index.ts
CHANGED
|
@@ -51,9 +51,12 @@ export default (args: {
|
|
|
51
51
|
return { results: res, totalCount: res.length };
|
|
52
52
|
});
|
|
53
53
|
},
|
|
54
|
+
remove: () => {
|
|
55
|
+
throw new Error("Function not implemented.");
|
|
56
|
+
}
|
|
54
57
|
});
|
|
55
58
|
|
|
56
|
-
const { load, items, pagination, loading, query } = factory();
|
|
59
|
+
const { load, remove, items, pagination, loading, query } = factory();
|
|
57
60
|
const { openBlade, resolveBladeByName } = useBladeNavigation();
|
|
58
61
|
|
|
59
62
|
async function openDetailsBlade(data?: Omit<Parameters<typeof openBlade>["0"], "blade">) {
|
|
@@ -70,6 +73,7 @@ export default (args: {
|
|
|
70
73
|
return {
|
|
71
74
|
items,
|
|
72
75
|
load,
|
|
76
|
+
remove,
|
|
73
77
|
loading,
|
|
74
78
|
pagination,
|
|
75
79
|
query,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vc-shell/create-vc-app",
|
|
3
3
|
"description": "Application scaffolding",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.150",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": "./dist/index.js",
|
|
7
7
|
"files": [
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@types/prompts": "^2.4.4",
|
|
16
|
-
"@vc-shell/ts-config": "^1.0.
|
|
16
|
+
"@vc-shell/ts-config": "^1.0.150",
|
|
17
17
|
"copyfiles": "^2.4.1",
|
|
18
18
|
"cross-env": "^7.0.3",
|
|
19
19
|
"shx": "^0.3.4",
|