@vc-shell/create-vc-app 1.0.341 → 1.1.0-alpha.10
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 +19 -1
- 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/custom.scss +2 -2
- package/dist/templates/base/src/styles/index.scss +2 -4
- 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
- package/dist/templates/base/src/styles/base.scss +0 -38
- package/dist/templates/base/src/styles/colors.scss +0 -10
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { computed, ref, Ref } from "vue";
|
|
2
|
-
import { DetailsBaseBladeScope, DetailsComposableArgs, UseDetails, useDetailsFactory } from "@vc-shell/framework";
|
|
3
|
-
import { addNewMockItem, loadMockItem, removeMockItem, updateMockItem } from "../../sample-data/methods";
|
|
4
|
-
import { currencyOptions, MockedItem } from "../../sample-data";
|
|
5
|
-
import { useI18n } from "vue-i18n";
|
|
6
|
-
|
|
7
|
-
export interface DynamicItemScope extends DetailsBaseBladeScope {
|
|
8
|
-
currencyOptions: typeof currencyOptions;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export default (args: DetailsComposableArgs): UseDetails<MockedItem, DynamicItemScope> => {
|
|
12
|
-
const factory = useDetailsFactory<MockedItem>({
|
|
13
|
-
load: loadMockItem,
|
|
14
|
-
saveChanges: (details) => {
|
|
15
|
-
return details.id ? updateMockItem(details) : addNewMockItem(details);
|
|
16
|
-
},
|
|
17
|
-
remove: removeMockItem,
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
const { load, saveChanges, remove, loading, item, validationState } = factory();
|
|
21
|
-
|
|
22
|
-
const scope: DynamicItemScope = {
|
|
23
|
-
currencyOptions,
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const { t } = useI18n({ useScope: "global" });
|
|
27
|
-
|
|
28
|
-
const bladeTitle = computed(() => {
|
|
29
|
-
return args.props.param
|
|
30
|
-
? item.value?.name
|
|
31
|
-
? item.value?.name + t("SAMPLE_APP.PAGES.DETAILS.TITLE.DETAILS")
|
|
32
|
-
: t("SAMPLE_APP.PAGES.DETAILS.TITLE.LOADING")
|
|
33
|
-
: "Test App" + t("SAMPLE_APP.PAGES.DETAILS.TITLE.DETAILS");
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
return {
|
|
37
|
-
load,
|
|
38
|
-
saveChanges,
|
|
39
|
-
remove,
|
|
40
|
-
loading,
|
|
41
|
-
item,
|
|
42
|
-
validationState,
|
|
43
|
-
bladeTitle,
|
|
44
|
-
scope,
|
|
45
|
-
};
|
|
46
|
-
};
|
|
1
|
+
import { computed, ref, Ref } from "vue";
|
|
2
|
+
import { DetailsBaseBladeScope, DetailsComposableArgs, UseDetails, useDetailsFactory } from "@vc-shell/framework";
|
|
3
|
+
import { addNewMockItem, loadMockItem, removeMockItem, updateMockItem } from "../../sample-data/methods";
|
|
4
|
+
import { currencyOptions, MockedItem } from "../../sample-data";
|
|
5
|
+
import { useI18n } from "vue-i18n";
|
|
6
|
+
|
|
7
|
+
export interface DynamicItemScope extends DetailsBaseBladeScope {
|
|
8
|
+
currencyOptions: typeof currencyOptions;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default (args: DetailsComposableArgs): UseDetails<MockedItem, DynamicItemScope> => {
|
|
12
|
+
const factory = useDetailsFactory<MockedItem>({
|
|
13
|
+
load: loadMockItem,
|
|
14
|
+
saveChanges: (details) => {
|
|
15
|
+
return details.id ? updateMockItem(details) : addNewMockItem(details);
|
|
16
|
+
},
|
|
17
|
+
remove: removeMockItem,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const { load, saveChanges, remove, loading, item, validationState } = factory();
|
|
21
|
+
|
|
22
|
+
const scope: DynamicItemScope = {
|
|
23
|
+
currencyOptions,
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const { t } = useI18n({ useScope: "global" });
|
|
27
|
+
|
|
28
|
+
const bladeTitle = computed(() => {
|
|
29
|
+
return args.props.param
|
|
30
|
+
? item.value?.name
|
|
31
|
+
? item.value?.name + t("SAMPLE_APP.PAGES.DETAILS.TITLE.DETAILS")
|
|
32
|
+
: t("SAMPLE_APP.PAGES.DETAILS.TITLE.LOADING")
|
|
33
|
+
: "Test App" + t("SAMPLE_APP.PAGES.DETAILS.TITLE.DETAILS");
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
return {
|
|
37
|
+
load,
|
|
38
|
+
saveChanges,
|
|
39
|
+
remove,
|
|
40
|
+
loading,
|
|
41
|
+
item,
|
|
42
|
+
validationState,
|
|
43
|
+
bladeTitle,
|
|
44
|
+
scope,
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -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 };
|