@vc-shell/create-vc-app 1.0.327 → 1.0.328-0
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 +1216 -1147
- package/README.md +30 -30
- package/dist/index.js +154 -186
- package/dist/templates/base/LICENSE +12 -12
- package/dist/templates/base/README.md +54 -54
- package/dist/templates/base/_browserslistrc +3 -3
- package/dist/templates/base/_commitlintrc.json +3 -3
- package/dist/templates/base/_editorconfig +22 -22
- package/dist/templates/base/_env +3 -3
- package/dist/templates/base/_env.local +1 -1
- package/dist/templates/base/_eslintignore +3 -3
- package/dist/templates/base/_eslintrc.js +41 -41
- package/dist/templates/base/_github/COMMIT_CONVENTION.md +91 -91
- package/dist/templates/base/_github/PULL_REQUEST_TEMPLATE.md +8 -8
- package/dist/templates/base/_gitignore +71 -71
- package/dist/templates/base/_husky/commit-msg +4 -4
- package/dist/templates/base/_husky/pre-commit +4 -4
- package/dist/templates/base/_package.json +5 -6
- package/dist/templates/base/_prettierignore +4 -4
- package/dist/templates/base/_prettierrc +4 -4
- package/dist/templates/base/_vscode/extensions.json +14 -14
- package/dist/templates/base/_vscode/settings.json +14 -14
- package/dist/templates/base/_yarn/releases/yarn-4.0.2.cjs +893 -893
- package/dist/templates/base/_yarnrc.yml +7 -7
- package/dist/templates/base/index.html +26 -26
- package/dist/templates/base/postcss.config.cjs +6 -6
- package/dist/templates/base/public/assets/app-select.svg +11 -11
- package/dist/templates/base/public/assets/logo-white.svg +21 -21
- package/dist/templates/base/public/assets/logo.svg +8 -8
- package/dist/templates/base/public/img/icons/safari-pinned-tab.svg +32 -32
- package/dist/templates/base/scripts/release.ts +18 -18
- package/dist/templates/base/src/api_client/README.md +78 -78
- package/dist/templates/base/src/composables/index.ts +1 -1
- package/dist/templates/base/src/env.d.ts +9 -9
- package/dist/templates/base/src/locales/en.json +3 -3
- package/dist/templates/base/src/locales/index.ts +2 -2
- package/dist/templates/base/src/router/index.ts +10 -10
- package/dist/templates/base/src/router/routes.ts +78 -78
- package/dist/templates/base/src/shims-vue.d.ts +63 -63
- package/dist/templates/base/src/styles/base.scss +38 -38
- package/dist/templates/base/src/styles/colors.scss +10 -10
- package/dist/templates/base/src/styles/custom.scss +2 -2
- package/dist/templates/base/tailwind.config.ts +7 -7
- package/dist/templates/base/tsconfig.json +16 -16
- package/dist/templates/base/vite.config.mts +5 -5
- package/dist/templates/mocks/sample-data/constants.ts +86 -86
- package/dist/templates/mocks/sample-data/index.ts +2 -2
- package/dist/templates/mocks/sample-data/methods.ts +65 -65
- package/dist/templates/modules/classic-module/composables/index.ts +2 -2
- package/dist/templates/modules/classic-module/composables/use{{ModuleNamePascalCase}}Details/index.ts +19 -19
- package/dist/templates/modules/classic-module/composables/use{{ModuleNamePascalCase}}List/index.ts +23 -23
- package/dist/templates/modules/classic-module/index.ts +8 -8
- package/dist/templates/modules/classic-module/locales/en.json +28 -28
- package/dist/templates/modules/classic-module/locales/index.ts +2 -2
- package/dist/templates/modules/classic-module/pages/details.vue +61 -61
- package/dist/templates/modules/classic-module/pages/index.ts +2 -2
- package/dist/templates/modules/classic-module/pages/list.vue +162 -162
- package/dist/templates/modules/dynamic-module/composables/index.ts +2 -2
- package/dist/templates/modules/dynamic-module/composables/use{{ModuleNamePascalCase}}Details/index.ts +37 -37
- package/dist/templates/modules/dynamic-module/composables/use{{ModuleNamePascalCase}}List/index.ts +49 -49
- package/dist/templates/modules/dynamic-module/index.ts +8 -8
- package/dist/templates/modules/dynamic-module/locales/en.json +35 -35
- package/dist/templates/modules/dynamic-module/locales/index.ts +2 -2
- package/dist/templates/modules/dynamic-module/pages/details.ts +20 -20
- package/dist/templates/modules/dynamic-module/pages/index.ts +4 -4
- package/dist/templates/modules/dynamic-module/pages/list.ts +35 -35
- package/dist/templates/sample/classic-module/composables/index.ts +2 -2
- package/dist/templates/sample/classic-module/composables/useDetails/index.ts +41 -41
- package/dist/templates/sample/classic-module/composables/useList/index.ts +41 -41
- package/dist/templates/sample/classic-module/index.ts +8 -8
- package/dist/templates/sample/classic-module/locales/en.json +59 -59
- package/dist/templates/sample/classic-module/locales/index.ts +2 -2
- package/dist/templates/sample/classic-module/pages/details.vue +257 -257
- package/dist/templates/sample/classic-module/pages/index.ts +2 -2
- package/dist/templates/sample/dynamic-module/composables/index.ts +2 -2
- package/dist/templates/sample/dynamic-module/composables/useDetails/index.ts +46 -46
- package/dist/templates/sample/dynamic-module/composables/useList/index.ts +50 -50
- package/dist/templates/sample/dynamic-module/index.ts +8 -8
- package/dist/templates/sample/dynamic-module/locales/en.json +69 -69
- package/dist/templates/sample/dynamic-module/locales/index.ts +2 -2
- package/dist/templates/sample/dynamic-module/pages/details.ts +100 -100
- package/dist/templates/sample/dynamic-module/pages/index.ts +4 -4
- package/dist/templates/sample/dynamic-module/pages/list.ts +81 -81
- package/package.json +4 -3
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { computed, ref, Ref } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
ListComposableArgs,
|
|
4
|
-
ListBaseBladeScope,
|
|
5
|
-
useBladeNavigation,
|
|
6
|
-
useListFactory,
|
|
7
|
-
type TOpenBladeArgs,
|
|
8
|
-
UseList,
|
|
9
|
-
} from "@vc-shell/framework";
|
|
10
|
-
import { loadMockItemsList, removeMockItem } from "../../sample-data/methods";
|
|
11
|
-
import { MockedItem, MockedQuery } from "../../sample-data";
|
|
12
|
-
|
|
13
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
14
|
-
export interface DynamicItemsScope extends ListBaseBladeScope {}
|
|
15
|
-
|
|
16
|
-
export default (args: ListComposableArgs): UseList<MockedItem[], MockedQuery, DynamicItemsScope> => {
|
|
17
|
-
const factory = useListFactory<MockedItem[], MockedQuery>({
|
|
18
|
-
load: loadMockItemsList,
|
|
19
|
-
remove: async (query, customQuery) => {
|
|
20
|
-
if (customQuery?.ids === null) return;
|
|
21
|
-
for (const id of customQuery.ids) {
|
|
22
|
-
await removeMockItem({ id });
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
const { load, remove, items, pagination, loading, query } = factory();
|
|
28
|
-
const { openBlade, resolveBladeByName } = useBladeNavigation();
|
|
29
|
-
|
|
30
|
-
async function openDetailsBlade(data?: TOpenBladeArgs) {
|
|
31
|
-
await openBlade({
|
|
32
|
-
blade: resolveBladeByName("SampleDetails"),
|
|
33
|
-
...data,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const scope: DynamicItemsScope = {
|
|
38
|
-
openDetailsBlade,
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
return {
|
|
42
|
-
items,
|
|
43
|
-
load,
|
|
44
|
-
remove,
|
|
45
|
-
loading,
|
|
46
|
-
pagination,
|
|
47
|
-
query,
|
|
48
|
-
scope,
|
|
49
|
-
};
|
|
50
|
-
};
|
|
1
|
+
import { computed, ref, Ref } from "vue";
|
|
2
|
+
import {
|
|
3
|
+
ListComposableArgs,
|
|
4
|
+
ListBaseBladeScope,
|
|
5
|
+
useBladeNavigation,
|
|
6
|
+
useListFactory,
|
|
7
|
+
type TOpenBladeArgs,
|
|
8
|
+
UseList,
|
|
9
|
+
} from "@vc-shell/framework";
|
|
10
|
+
import { loadMockItemsList, removeMockItem } from "../../sample-data/methods";
|
|
11
|
+
import { MockedItem, MockedQuery } from "../../sample-data";
|
|
12
|
+
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
14
|
+
export interface DynamicItemsScope extends ListBaseBladeScope {}
|
|
15
|
+
|
|
16
|
+
export default (args: ListComposableArgs): UseList<MockedItem[], MockedQuery, DynamicItemsScope> => {
|
|
17
|
+
const factory = useListFactory<MockedItem[], MockedQuery>({
|
|
18
|
+
load: loadMockItemsList,
|
|
19
|
+
remove: async (query, customQuery) => {
|
|
20
|
+
if (customQuery?.ids === null) return;
|
|
21
|
+
for (const id of customQuery.ids) {
|
|
22
|
+
await removeMockItem({ id });
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const { load, remove, items, pagination, loading, query } = factory();
|
|
28
|
+
const { openBlade, resolveBladeByName } = useBladeNavigation();
|
|
29
|
+
|
|
30
|
+
async function openDetailsBlade(data?: TOpenBladeArgs) {
|
|
31
|
+
await openBlade({
|
|
32
|
+
blade: resolveBladeByName("SampleDetails"),
|
|
33
|
+
...data,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const scope: DynamicItemsScope = {
|
|
38
|
+
openDetailsBlade,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return {
|
|
42
|
+
items,
|
|
43
|
+
load,
|
|
44
|
+
remove,
|
|
45
|
+
loading,
|
|
46
|
+
pagination,
|
|
47
|
+
query,
|
|
48
|
+
scope,
|
|
49
|
+
};
|
|
50
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as schema from "./pages";
|
|
2
|
-
import * as locales from "./locales";
|
|
3
|
-
import * as composables from "./composables";
|
|
4
|
-
import { createDynamicAppModule } from "@vc-shell/framework";
|
|
5
|
-
|
|
6
|
-
export default createDynamicAppModule({ schema, locales, composables });
|
|
7
|
-
|
|
8
|
-
export { schema, composables, locales };
|
|
1
|
+
import * as schema from "./pages";
|
|
2
|
+
import * as locales from "./locales";
|
|
3
|
+
import * as composables from "./composables";
|
|
4
|
+
import { createDynamicAppModule } from "@vc-shell/framework";
|
|
5
|
+
|
|
6
|
+
export default createDynamicAppModule({ schema, locales, composables });
|
|
7
|
+
|
|
8
|
+
export { schema, composables, locales };
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
{
|
|
2
|
-
"SAMPLE_APP": {
|
|
3
|
-
"MENU": {
|
|
4
|
-
"TITLE": "Sample"
|
|
5
|
-
},
|
|
6
|
-
"PAGES": {
|
|
7
|
-
"LIST": {
|
|
8
|
-
"TOOLBAR": {
|
|
9
|
-
"REFRESH": "Refresh",
|
|
10
|
-
"REMOVE": "Remove"
|
|
11
|
-
},
|
|
12
|
-
"SEARCH": {
|
|
13
|
-
"PLACEHOLDER": "Search keywords"
|
|
14
|
-
},
|
|
15
|
-
"TABLE": {
|
|
16
|
-
"TOTALS": "Count:",
|
|
17
|
-
"HEADER": {
|
|
18
|
-
"IMAGE": "Img",
|
|
19
|
-
"PRODUCT_NAME": "Product name",
|
|
20
|
-
"DESCRIPTION": "Description",
|
|
21
|
-
"PRICE": "Price",
|
|
22
|
-
"SALE_PRICE": "Sale price",
|
|
23
|
-
"CURRENCY": "Currency"
|
|
24
|
-
},
|
|
25
|
-
"EMPTY": {
|
|
26
|
-
"TITLE": "There are no content yet",
|
|
27
|
-
"ACTION": "Add content"
|
|
28
|
-
},
|
|
29
|
-
"NOT_FOUND": {
|
|
30
|
-
"TITLE": "No content found.",
|
|
31
|
-
"ACTION": "Reset search"
|
|
32
|
-
},
|
|
33
|
-
"ACTIONS": {
|
|
34
|
-
"DELETE": "Delete"
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
"EMPTY": {
|
|
38
|
-
"NO_ITEMS": "There are no items yet"
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
"DETAILS": {
|
|
42
|
-
"TITLE": {
|
|
43
|
-
"DETAILS": " details",
|
|
44
|
-
"LOADING": "Loading..."
|
|
45
|
-
},
|
|
46
|
-
"TOOLBAR": {
|
|
47
|
-
"SAVE": "Save",
|
|
48
|
-
"DELETE": "Delete"
|
|
49
|
-
},
|
|
50
|
-
"FIELDS": {
|
|
51
|
-
"NAME": "Name",
|
|
52
|
-
"CONTENT": "Content",
|
|
53
|
-
"GUID": "GUID",
|
|
54
|
-
"DESCRIPTION": "Description",
|
|
55
|
-
"PRICE": "Price",
|
|
56
|
-
"SALE_PRICE": "Sale price"
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
"ALERTS": {
|
|
60
|
-
"CLOSE_CONFIRMATION": "You have unsaved changes. Close anyway?",
|
|
61
|
-
"DELETE": "Are you sure you want to delete this item?",
|
|
62
|
-
"DELETE_SELECTED_CONFIRMATION": {
|
|
63
|
-
"MESSAGE": "Are you sure you want to delete {count} selected items?",
|
|
64
|
-
"ALL": "all {totalCount}"
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"SAMPLE_APP": {
|
|
3
|
+
"MENU": {
|
|
4
|
+
"TITLE": "Sample"
|
|
5
|
+
},
|
|
6
|
+
"PAGES": {
|
|
7
|
+
"LIST": {
|
|
8
|
+
"TOOLBAR": {
|
|
9
|
+
"REFRESH": "Refresh",
|
|
10
|
+
"REMOVE": "Remove"
|
|
11
|
+
},
|
|
12
|
+
"SEARCH": {
|
|
13
|
+
"PLACEHOLDER": "Search keywords"
|
|
14
|
+
},
|
|
15
|
+
"TABLE": {
|
|
16
|
+
"TOTALS": "Count:",
|
|
17
|
+
"HEADER": {
|
|
18
|
+
"IMAGE": "Img",
|
|
19
|
+
"PRODUCT_NAME": "Product name",
|
|
20
|
+
"DESCRIPTION": "Description",
|
|
21
|
+
"PRICE": "Price",
|
|
22
|
+
"SALE_PRICE": "Sale price",
|
|
23
|
+
"CURRENCY": "Currency"
|
|
24
|
+
},
|
|
25
|
+
"EMPTY": {
|
|
26
|
+
"TITLE": "There are no content yet",
|
|
27
|
+
"ACTION": "Add content"
|
|
28
|
+
},
|
|
29
|
+
"NOT_FOUND": {
|
|
30
|
+
"TITLE": "No content found.",
|
|
31
|
+
"ACTION": "Reset search"
|
|
32
|
+
},
|
|
33
|
+
"ACTIONS": {
|
|
34
|
+
"DELETE": "Delete"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"EMPTY": {
|
|
38
|
+
"NO_ITEMS": "There are no items yet"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"DETAILS": {
|
|
42
|
+
"TITLE": {
|
|
43
|
+
"DETAILS": " details",
|
|
44
|
+
"LOADING": "Loading..."
|
|
45
|
+
},
|
|
46
|
+
"TOOLBAR": {
|
|
47
|
+
"SAVE": "Save",
|
|
48
|
+
"DELETE": "Delete"
|
|
49
|
+
},
|
|
50
|
+
"FIELDS": {
|
|
51
|
+
"NAME": "Name",
|
|
52
|
+
"CONTENT": "Content",
|
|
53
|
+
"GUID": "GUID",
|
|
54
|
+
"DESCRIPTION": "Description",
|
|
55
|
+
"PRICE": "Price",
|
|
56
|
+
"SALE_PRICE": "Sale price"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"ALERTS": {
|
|
60
|
+
"CLOSE_CONFIRMATION": "You have unsaved changes. Close anyway?",
|
|
61
|
+
"DELETE": "Are you sure you want to delete this item?",
|
|
62
|
+
"DELETE_SELECTED_CONFIRMATION": {
|
|
63
|
+
"MESSAGE": "Are you sure you want to delete {count} selected items?",
|
|
64
|
+
"ALL": "all {totalCount}"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import * as en from "./en.json";
|
|
2
|
-
export { en };
|
|
1
|
+
import * as en from "./en.json";
|
|
2
|
+
export { en };
|
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
import { DynamicDetailsSchema } from "@vc-shell/framework";
|
|
2
|
-
|
|
3
|
-
export const details: DynamicDetailsSchema = {
|
|
4
|
-
settings: {
|
|
5
|
-
url: "/sample-details",
|
|
6
|
-
id: "SampleDetails",
|
|
7
|
-
localizationPrefix: "SAMPLE_APP",
|
|
8
|
-
composable: "useDetails",
|
|
9
|
-
component: "DynamicBladeForm",
|
|
10
|
-
toolbar: [
|
|
11
|
-
{
|
|
12
|
-
id: "save",
|
|
13
|
-
icon: "fas fa-save",
|
|
14
|
-
title: "SAMPLE_APP.PAGES.DETAILS.TOOLBAR.SAVE",
|
|
15
|
-
method: "saveChanges",
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
id: "delete",
|
|
19
|
-
icon: "fas fa-trash",
|
|
20
|
-
title: "SAMPLE_APP.PAGES.DETAILS.TOOLBAR.DELETE",
|
|
21
|
-
method: "remove",
|
|
22
|
-
},
|
|
23
|
-
],
|
|
24
|
-
},
|
|
25
|
-
content: [
|
|
26
|
-
{
|
|
27
|
-
id: "dynamicItemForm",
|
|
28
|
-
component: "vc-form",
|
|
29
|
-
children: [
|
|
30
|
-
{
|
|
31
|
-
id: "name",
|
|
32
|
-
component: "vc-input",
|
|
33
|
-
label: "SAMPLE_APP.PAGES.DETAILS.FIELDS.NAME",
|
|
34
|
-
rules: { required: true },
|
|
35
|
-
property: "name",
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
id: "contentCard",
|
|
39
|
-
component: "vc-card",
|
|
40
|
-
label: "SAMPLE_APP.PAGES.DETAILS.FIELDS.CONTENT",
|
|
41
|
-
fields: [
|
|
42
|
-
{
|
|
43
|
-
id: "guid",
|
|
44
|
-
component: "vc-input",
|
|
45
|
-
label: "SAMPLE_APP.PAGES.DETAILS.FIELDS.GUID",
|
|
46
|
-
property: "guid",
|
|
47
|
-
rules: {
|
|
48
|
-
required: true,
|
|
49
|
-
regex: /[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}/,
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
id: "description",
|
|
54
|
-
component: "vc-textarea",
|
|
55
|
-
label: "SAMPLE_APP.PAGES.DETAILS.FIELDS.DESCRIPTION",
|
|
56
|
-
property: "description",
|
|
57
|
-
rules: { required: true },
|
|
58
|
-
},
|
|
59
|
-
],
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
id: "prices",
|
|
63
|
-
component: "vc-card",
|
|
64
|
-
label: "SAMPLE_APP.PAGES.DETAILS.FIELDS.PRICE",
|
|
65
|
-
fields: [
|
|
66
|
-
{
|
|
67
|
-
id: "price-fieldset",
|
|
68
|
-
component: "vc-fieldset",
|
|
69
|
-
columns: 2,
|
|
70
|
-
fields: [
|
|
71
|
-
{
|
|
72
|
-
id: "price",
|
|
73
|
-
component: "vc-input-currency",
|
|
74
|
-
label: "SAMPLE_APP.PAGES.DETAILS.FIELDS.PRICE",
|
|
75
|
-
property: "price",
|
|
76
|
-
rules: { required: true },
|
|
77
|
-
options: "currencyOptions",
|
|
78
|
-
optionProperty: "currency",
|
|
79
|
-
optionValue: "value",
|
|
80
|
-
optionLabel: "label",
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
id: "salePrice",
|
|
84
|
-
component: "vc-input-currency",
|
|
85
|
-
label: "SAMPLE_APP.PAGES.DETAILS.FIELDS.SALE_PRICE",
|
|
86
|
-
property: "salePrice",
|
|
87
|
-
rules: { required: true },
|
|
88
|
-
options: "currencyOptions",
|
|
89
|
-
optionProperty: "currency",
|
|
90
|
-
optionValue: "value",
|
|
91
|
-
optionLabel: "label",
|
|
92
|
-
},
|
|
93
|
-
],
|
|
94
|
-
},
|
|
95
|
-
],
|
|
96
|
-
},
|
|
97
|
-
],
|
|
98
|
-
},
|
|
99
|
-
],
|
|
100
|
-
};
|
|
1
|
+
import { DynamicDetailsSchema } from "@vc-shell/framework";
|
|
2
|
+
|
|
3
|
+
export const details: DynamicDetailsSchema = {
|
|
4
|
+
settings: {
|
|
5
|
+
url: "/sample-details",
|
|
6
|
+
id: "SampleDetails",
|
|
7
|
+
localizationPrefix: "SAMPLE_APP",
|
|
8
|
+
composable: "useDetails",
|
|
9
|
+
component: "DynamicBladeForm",
|
|
10
|
+
toolbar: [
|
|
11
|
+
{
|
|
12
|
+
id: "save",
|
|
13
|
+
icon: "fas fa-save",
|
|
14
|
+
title: "SAMPLE_APP.PAGES.DETAILS.TOOLBAR.SAVE",
|
|
15
|
+
method: "saveChanges",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: "delete",
|
|
19
|
+
icon: "fas fa-trash",
|
|
20
|
+
title: "SAMPLE_APP.PAGES.DETAILS.TOOLBAR.DELETE",
|
|
21
|
+
method: "remove",
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
content: [
|
|
26
|
+
{
|
|
27
|
+
id: "dynamicItemForm",
|
|
28
|
+
component: "vc-form",
|
|
29
|
+
children: [
|
|
30
|
+
{
|
|
31
|
+
id: "name",
|
|
32
|
+
component: "vc-input",
|
|
33
|
+
label: "SAMPLE_APP.PAGES.DETAILS.FIELDS.NAME",
|
|
34
|
+
rules: { required: true },
|
|
35
|
+
property: "name",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: "contentCard",
|
|
39
|
+
component: "vc-card",
|
|
40
|
+
label: "SAMPLE_APP.PAGES.DETAILS.FIELDS.CONTENT",
|
|
41
|
+
fields: [
|
|
42
|
+
{
|
|
43
|
+
id: "guid",
|
|
44
|
+
component: "vc-input",
|
|
45
|
+
label: "SAMPLE_APP.PAGES.DETAILS.FIELDS.GUID",
|
|
46
|
+
property: "guid",
|
|
47
|
+
rules: {
|
|
48
|
+
required: true,
|
|
49
|
+
regex: /[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}/,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: "description",
|
|
54
|
+
component: "vc-textarea",
|
|
55
|
+
label: "SAMPLE_APP.PAGES.DETAILS.FIELDS.DESCRIPTION",
|
|
56
|
+
property: "description",
|
|
57
|
+
rules: { required: true },
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: "prices",
|
|
63
|
+
component: "vc-card",
|
|
64
|
+
label: "SAMPLE_APP.PAGES.DETAILS.FIELDS.PRICE",
|
|
65
|
+
fields: [
|
|
66
|
+
{
|
|
67
|
+
id: "price-fieldset",
|
|
68
|
+
component: "vc-fieldset",
|
|
69
|
+
columns: 2,
|
|
70
|
+
fields: [
|
|
71
|
+
{
|
|
72
|
+
id: "price",
|
|
73
|
+
component: "vc-input-currency",
|
|
74
|
+
label: "SAMPLE_APP.PAGES.DETAILS.FIELDS.PRICE",
|
|
75
|
+
property: "price",
|
|
76
|
+
rules: { required: true },
|
|
77
|
+
options: "currencyOptions",
|
|
78
|
+
optionProperty: "currency",
|
|
79
|
+
optionValue: "value",
|
|
80
|
+
optionLabel: "label",
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: "salePrice",
|
|
84
|
+
component: "vc-input-currency",
|
|
85
|
+
label: "SAMPLE_APP.PAGES.DETAILS.FIELDS.SALE_PRICE",
|
|
86
|
+
property: "salePrice",
|
|
87
|
+
rules: { required: true },
|
|
88
|
+
options: "currencyOptions",
|
|
89
|
+
optionProperty: "currency",
|
|
90
|
+
optionValue: "value",
|
|
91
|
+
optionLabel: "label",
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { grid as testAppList } from "./list";
|
|
2
|
-
import { details as testAppDetails } from "./details";
|
|
3
|
-
|
|
4
|
-
export { testAppList, testAppDetails };
|
|
1
|
+
import { grid as testAppList } from "./list";
|
|
2
|
+
import { details as testAppDetails } from "./details";
|
|
3
|
+
|
|
4
|
+
export { testAppList, testAppDetails };
|
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import { DynamicGridSchema } from "@vc-shell/framework";
|
|
2
|
-
|
|
3
|
-
export const grid: DynamicGridSchema = {
|
|
4
|
-
settings: {
|
|
5
|
-
url: "/sample-list",
|
|
6
|
-
id: "SampleList",
|
|
7
|
-
titleTemplate: "Sample list",
|
|
8
|
-
localizationPrefix: "SAMPLE_APP",
|
|
9
|
-
isWorkspace: true,
|
|
10
|
-
composable: "useList",
|
|
11
|
-
component: "DynamicBladeList",
|
|
12
|
-
toolbar: [
|
|
13
|
-
{
|
|
14
|
-
id: "refresh",
|
|
15
|
-
icon: "fas fa-sync-alt",
|
|
16
|
-
title: "SAMPLE_APP.PAGES.LIST.TOOLBAR.REFRESH",
|
|
17
|
-
method: "refresh",
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
id: "remove",
|
|
21
|
-
icon: "fas fa-trash",
|
|
22
|
-
title: "SAMPLE_APP.PAGES.LIST.TOOLBAR.REMOVE",
|
|
23
|
-
method: "removeItems",
|
|
24
|
-
},
|
|
25
|
-
],
|
|
26
|
-
menuItem: {
|
|
27
|
-
title: "SAMPLE_APP.MENU.TITLE",
|
|
28
|
-
icon: "fas fa-file-alt",
|
|
29
|
-
priority: 1,
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
content: [
|
|
33
|
-
{
|
|
34
|
-
id: "itemsGrid",
|
|
35
|
-
component: "vc-table",
|
|
36
|
-
multiselect: true,
|
|
37
|
-
actions: [
|
|
38
|
-
{
|
|
39
|
-
id: "delete",
|
|
40
|
-
icon: "fas fa-trash",
|
|
41
|
-
title: "SAMPLE_APP.PAGES.LIST.TABLE.ACTIONS.DELETE",
|
|
42
|
-
method: "removeItems",
|
|
43
|
-
position: "left",
|
|
44
|
-
type: "danger",
|
|
45
|
-
},
|
|
46
|
-
],
|
|
47
|
-
columns: [
|
|
48
|
-
{
|
|
49
|
-
id: "imgSrc",
|
|
50
|
-
title: "SAMPLE_APP.PAGES.LIST.TABLE.HEADER.IMAGE",
|
|
51
|
-
type: "image",
|
|
52
|
-
width: "70px",
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
id: "name",
|
|
56
|
-
title: "SAMPLE_APP.PAGES.LIST.TABLE.HEADER.PRODUCT_NAME",
|
|
57
|
-
alwaysVisible: true,
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
id: "description",
|
|
61
|
-
title: "SAMPLE_APP.PAGES.LIST.TABLE.HEADER.DESCRIPTION",
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
id: "price",
|
|
65
|
-
title: "SAMPLE_APP.PAGES.LIST.TABLE.HEADER.PRICE",
|
|
66
|
-
type: "money",
|
|
67
|
-
alwaysVisible: true,
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
id: "salePrice",
|
|
71
|
-
title: "SAMPLE_APP.PAGES.LIST.TABLE.HEADER.SALE_PRICE",
|
|
72
|
-
type: "money",
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
id: "currency.name",
|
|
76
|
-
title: "SAMPLE_APP.PAGES.LIST.TABLE.HEADER.CURRENCY",
|
|
77
|
-
},
|
|
78
|
-
],
|
|
79
|
-
},
|
|
80
|
-
],
|
|
81
|
-
};
|
|
1
|
+
import { DynamicGridSchema } from "@vc-shell/framework";
|
|
2
|
+
|
|
3
|
+
export const grid: DynamicGridSchema = {
|
|
4
|
+
settings: {
|
|
5
|
+
url: "/sample-list",
|
|
6
|
+
id: "SampleList",
|
|
7
|
+
titleTemplate: "Sample list",
|
|
8
|
+
localizationPrefix: "SAMPLE_APP",
|
|
9
|
+
isWorkspace: true,
|
|
10
|
+
composable: "useList",
|
|
11
|
+
component: "DynamicBladeList",
|
|
12
|
+
toolbar: [
|
|
13
|
+
{
|
|
14
|
+
id: "refresh",
|
|
15
|
+
icon: "fas fa-sync-alt",
|
|
16
|
+
title: "SAMPLE_APP.PAGES.LIST.TOOLBAR.REFRESH",
|
|
17
|
+
method: "refresh",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: "remove",
|
|
21
|
+
icon: "fas fa-trash",
|
|
22
|
+
title: "SAMPLE_APP.PAGES.LIST.TOOLBAR.REMOVE",
|
|
23
|
+
method: "removeItems",
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
menuItem: {
|
|
27
|
+
title: "SAMPLE_APP.MENU.TITLE",
|
|
28
|
+
icon: "fas fa-file-alt",
|
|
29
|
+
priority: 1,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
content: [
|
|
33
|
+
{
|
|
34
|
+
id: "itemsGrid",
|
|
35
|
+
component: "vc-table",
|
|
36
|
+
multiselect: true,
|
|
37
|
+
actions: [
|
|
38
|
+
{
|
|
39
|
+
id: "delete",
|
|
40
|
+
icon: "fas fa-trash",
|
|
41
|
+
title: "SAMPLE_APP.PAGES.LIST.TABLE.ACTIONS.DELETE",
|
|
42
|
+
method: "removeItems",
|
|
43
|
+
position: "left",
|
|
44
|
+
type: "danger",
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
columns: [
|
|
48
|
+
{
|
|
49
|
+
id: "imgSrc",
|
|
50
|
+
title: "SAMPLE_APP.PAGES.LIST.TABLE.HEADER.IMAGE",
|
|
51
|
+
type: "image",
|
|
52
|
+
width: "70px",
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: "name",
|
|
56
|
+
title: "SAMPLE_APP.PAGES.LIST.TABLE.HEADER.PRODUCT_NAME",
|
|
57
|
+
alwaysVisible: true,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: "description",
|
|
61
|
+
title: "SAMPLE_APP.PAGES.LIST.TABLE.HEADER.DESCRIPTION",
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: "price",
|
|
65
|
+
title: "SAMPLE_APP.PAGES.LIST.TABLE.HEADER.PRICE",
|
|
66
|
+
type: "money",
|
|
67
|
+
alwaysVisible: true,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: "salePrice",
|
|
71
|
+
title: "SAMPLE_APP.PAGES.LIST.TABLE.HEADER.SALE_PRICE",
|
|
72
|
+
type: "money",
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: "currency.name",
|
|
76
|
+
title: "SAMPLE_APP.PAGES.LIST.TABLE.HEADER.CURRENCY",
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
};
|
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.328-0",
|
|
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.328-0",
|
|
17
17
|
"copyfiles": "^2.4.1",
|
|
18
18
|
"cross-env": "^7.0.3",
|
|
19
19
|
"shx": "^0.3.4",
|
|
@@ -31,5 +31,6 @@
|
|
|
31
31
|
"access": "public",
|
|
32
32
|
"registry": "https://registry.npmjs.org/"
|
|
33
33
|
},
|
|
34
|
-
"packageManager": "yarn@4.0.2"
|
|
34
|
+
"packageManager": "yarn@4.0.2",
|
|
35
|
+
"stableVersion": "1.0.327"
|
|
35
36
|
}
|