@vc-shell/create-vc-app 2.0.0-alpha.15 → 2.0.0-alpha.17

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/commands/init.d.ts.map +1 -1
  3. package/dist/commands/init.test.d.ts +2 -0
  4. package/dist/commands/init.test.d.ts.map +1 -0
  5. package/dist/engine/codegen.d.ts.map +1 -1
  6. package/dist/engine/helpers.d.ts +1 -1
  7. package/dist/engine/helpers.d.ts.map +1 -1
  8. package/dist/engine/helpers.test.d.ts +2 -0
  9. package/dist/engine/helpers.test.d.ts.map +1 -0
  10. package/dist/engine/template.d.ts.map +1 -1
  11. package/dist/engine/template.test.d.ts +2 -0
  12. package/dist/engine/template.test.d.ts.map +1 -0
  13. package/dist/index.js +169 -165
  14. package/dist/output.d.ts.map +1 -1
  15. package/dist/templates/dynamic-module/_package.json.ejs +6 -6
  16. package/dist/templates/dynamic-module/src/modules/index.ts.ejs +8 -5
  17. package/dist/templates/dynamic-module/tsconfig.json +1 -1
  18. package/dist/templates/host-app/_package.json.ejs +7 -9
  19. package/dist/templates/host-app/src/main.ts.ejs +17 -15
  20. package/dist/templates/host-app/tsconfig.json +1 -0
  21. package/dist/templates/module/composables/useDetails.ts.ejs +41 -38
  22. package/dist/templates/module/index.ts.ejs +11 -8
  23. package/dist/templates/module/locales/en.json.ejs +33 -22
  24. package/dist/templates/module/pages/details.vue.ejs +10 -12
  25. package/dist/templates/module/pages/list.vue.ejs +11 -13
  26. package/dist/templates/sample-module/index.ts +11 -8
  27. package/dist/templates/sample-module/pages/details.vue +8 -4
  28. package/dist/templates/sample-module/pages/list.vue +103 -119
  29. package/dist/templates/standalone/_package.json.ejs +7 -9
  30. package/dist/templates/standalone/src/bootstrap.ts.ejs +5 -5
  31. package/dist/templates/standalone/src/main.ts.ejs +29 -23
  32. package/dist/templates/standalone/tsconfig.json +1 -0
  33. package/dist/types.d.ts +2 -2
  34. package/dist/types.d.ts.map +1 -1
  35. package/package.json +3 -2
  36. package/dist/templates/host-app/src/shims-vue.d.ts +0 -27
  37. package/dist/templates/host-app/src/vue-i18n.d.ts +0 -10
  38. package/dist/templates/standalone/src/shims-vue.d.ts +0 -27
  39. package/dist/templates/standalone/src/vue-i18n.d.ts +0 -10
@@ -6,54 +6,92 @@
6
6
  >
7
7
  <!-- Blade contents -->
8
8
  <!-- @vue-generic {MockedItem} -->
9
- <VcTable
10
- class="tw-grow tw-basis-0"
11
- multiselect
9
+ <VcDataTable
10
+ v-model:search-value="searchValue"
11
+ v-model:active-item-id="selectedItemId"
12
+ v-model:selection="selectedItems"
12
13
  :loading="loading"
13
- :columns="columns"
14
- :sort="sortExpression"
15
- :pages="pages"
16
- :total-count="totalCount"
17
- :search-value="searchValue"
18
- :current-page="currentPage"
19
- enable-item-actions
20
- :item-action-builder="actionBuilder"
21
- :empty="empty"
22
- :notfound="notfound"
14
+ class="tw-grow tw-basis-0"
15
+ selection-mode="multiple"
16
+ :items="data ?? []"
17
+ :row-actions="actionBuilder"
18
+ :pagination="{ currentPage, pages }"
19
+ :searchable="true"
23
20
  :search-placeholder="$t('SAMPLE_APP.PAGES.LIST.SEARCH.PLACEHOLDER')"
21
+ :empty-state="{
22
+ icon: 'lucide-file',
23
+ title: $t('SAMPLE_APP.PAGES.LIST.EMPTY.NO_ITEMS'),
24
+ actionLabel: $t('SAMPLE_APP.PAGES.LIST.EMPTY.ADD'),
25
+ actionHandler: addItem,
26
+ }"
27
+ :not-found-state="{
28
+ icon: 'lucide-file',
29
+ title: $t('SAMPLE_APP.PAGES.LIST.NOT_FOUND.EMPTY'),
30
+ actionLabel: $t('SAMPLE_APP.PAGES.LIST.NOT_FOUND.RESET'),
31
+ actionHandler: clearSearch,
32
+ }"
24
33
  :total-label="$t('SAMPLE_APP.PAGES.LIST.TABLE.TOTALS')"
25
- :selected-item-id="selectedItemId"
34
+ :total-count="totalCount"
26
35
  state-key="SAMPLE_APP"
27
- :items="data ?? []"
28
- @item-click="onItemClick"
29
- @header-click="onHeaderClick"
30
- @selection-changed="onSelectionChanged"
31
- @search:change="onSearchList"
36
+ @search="onSearchList"
37
+ @row-click="onItemClick"
32
38
  @pagination-click="onPaginationClick"
33
39
  >
34
- </VcTable>
40
+ <VcColumn
41
+ id="imgSrc"
42
+ :title="$t('SAMPLE_APP.PAGES.LIST.TABLE.HEADER.IMAGE')"
43
+ type="image"
44
+ width="70px"
45
+ />
46
+ <VcColumn
47
+ id="name"
48
+ :title="$t('SAMPLE_APP.PAGES.LIST.TABLE.HEADER.PRODUCT_NAME')"
49
+ :sortable="true"
50
+ :always-visible="true"
51
+ />
52
+ <VcColumn
53
+ id="description"
54
+ :title="$t('SAMPLE_APP.PAGES.LIST.TABLE.HEADER.DESCRIPTION')"
55
+ />
56
+ <VcColumn
57
+ id="price"
58
+ :title="$t('SAMPLE_APP.PAGES.LIST.TABLE.HEADER.PRICE')"
59
+ type="money"
60
+ :sortable="true"
61
+ :always-visible="true"
62
+ />
63
+ <VcColumn
64
+ id="salePrice"
65
+ :title="$t('SAMPLE_APP.PAGES.LIST.TABLE.HEADER.SALE_PRICE')"
66
+ type="money"
67
+ />
68
+ <VcColumn
69
+ id="currency.name"
70
+ :title="$t('SAMPLE_APP.PAGES.LIST.TABLE.HEADER.CURRENCY')"
71
+ />
72
+ </VcDataTable>
35
73
  </VcBlade>
36
74
  </template>
37
75
 
38
76
  <script lang="ts" setup>
39
- import { computed, ref, markRaw, onMounted, watch } from "vue";
77
+ import { computed, ref, onMounted, watch } from "vue";
40
78
  import {
41
- IActionBuilderResult,
42
79
  IBladeToolbar,
43
- ITableColumns,
44
80
  useBlade,
45
81
  usePopup,
46
82
  useTableSort,
47
83
  useFunctions,
84
+ VcColumn,
85
+ VcDataTable,
48
86
  } from "@vc-shell/framework";
87
+ import type { TableAction } from "@vc-shell/framework";
49
88
  import { useI18n } from "vue-i18n";
50
89
  import { useList } from "./../composables";
51
- import Details from "./details.vue";
52
90
  import { MockedItem } from "./../composables/useList";
53
91
 
54
- defineOptions({
55
- url: "/sample-list",
92
+ defineBlade({
56
93
  name: "SampleList",
94
+ url: "/sample-list",
57
95
  isWorkspace: true,
58
96
  menuItem: {
59
97
  title: "SAMPLE_APP.MENU.TITLE",
@@ -67,9 +105,9 @@ const { param, openBlade, exposeToChildren } = useBlade();
67
105
  const { showConfirmation } = usePopup();
68
106
  const { debounce } = useFunctions();
69
107
 
70
- const { sortExpression, handleSortChange: tableSortHandler } = useTableSort({
71
- initialDirection: "DESC",
108
+ const { sortExpression } = useTableSort({
72
109
  initialProperty: "createdDate",
110
+ initialDirection: "DESC",
73
111
  });
74
112
 
75
113
  const { getItems, removeItems, data, loading, totalCount, pages, currentPage, searchQuery } = useList({
@@ -79,29 +117,9 @@ const { getItems, removeItems, data, loading, totalCount, pages, currentPage, se
79
117
 
80
118
  const searchValue = ref();
81
119
  const selectedItemId = ref<string>();
82
- const selectedIds = ref<string[]>([]);
120
+ const selectedItems = ref<MockedItem[]>([]);
83
121
 
84
- const empty = {
85
- icon: "lucide-file",
86
- text: computed(() => t("SAMPLE_APP.PAGES.LIST.EMPTY.NO_ITEMS")),
87
- action: computed(() => t("SAMPLE_APP.PAGES.LIST.EMPTY.ADD")),
88
- clickHandler: () => {
89
- addItem();
90
- },
91
- };
92
-
93
- const notfound = {
94
- icon: "lucide-file",
95
- text: computed(() => t("SAMPLE_APP.PAGES.LIST.NOT_FOUND.EMPTY")),
96
- action: computed(() => t("SAMPLE_APP.PAGES.LIST.NOT_FOUND.RESET")),
97
- clickHandler: async () => {
98
- searchValue.value = "";
99
- await getItems({
100
- ...searchQuery.value,
101
- keyword: "",
102
- });
103
- },
104
- };
122
+ const selectedIds = computed(() => selectedItems.value.map((item) => item.id).filter(Boolean) as string[]);
105
123
 
106
124
  watch(
107
125
  param,
@@ -118,6 +136,13 @@ onMounted(async () => {
118
136
  });
119
137
  });
120
138
 
139
+ watch(sortExpression, async (value) => {
140
+ await getItems({
141
+ ...searchQuery.value,
142
+ sort: value,
143
+ });
144
+ });
145
+
121
146
  const onSearchList = debounce(async (keyword: string) => {
122
147
  searchValue.value = keyword;
123
148
  await getItems({
@@ -126,9 +151,17 @@ const onSearchList = debounce(async (keyword: string) => {
126
151
  });
127
152
  }, 1000);
128
153
 
154
+ const clearSearch = async () => {
155
+ searchValue.value = "";
156
+ await getItems({
157
+ ...searchQuery.value,
158
+ keyword: "",
159
+ });
160
+ };
161
+
129
162
  const addItem = () => {
130
163
  openBlade({
131
- blade: markRaw(Details),
164
+ name: "SampleDetails",
132
165
  });
133
166
  };
134
167
 
@@ -159,42 +192,10 @@ const bladeToolbar = ref<IBladeToolbar[]>([
159
192
  },
160
193
  ]);
161
194
 
162
- const columns = ref<ITableColumns[]>([
163
- {
164
- id: "imgSrc",
165
- title: computed(() => t("SAMPLE_APP.PAGES.LIST.TABLE.HEADER.IMAGE")),
166
- type: "image",
167
- width: "70px",
168
- },
169
- {
170
- id: "name",
171
- title: computed(() => t("SAMPLE_APP.PAGES.LIST.TABLE.HEADER.PRODUCT_NAME")),
172
- alwaysVisible: true,
173
- },
174
- {
175
- id: "description",
176
- title: computed(() => t("SAMPLE_APP.PAGES.LIST.TABLE.HEADER.DESCRIPTION")),
177
- },
178
- {
179
- id: "price",
180
- title: computed(() => t("SAMPLE_APP.PAGES.LIST.TABLE.HEADER.PRICE")),
181
- type: "money",
182
- alwaysVisible: true,
183
- },
184
- {
185
- id: "salePrice",
186
- title: computed(() => t("SAMPLE_APP.PAGES.LIST.TABLE.HEADER.SALE_PRICE")),
187
- type: "money",
188
- },
189
- {
190
- id: "currency.name",
191
- title: computed(() => t("SAMPLE_APP.PAGES.LIST.TABLE.HEADER.CURRENCY")),
192
- },
193
- ]);
194
-
195
195
  const title = computed(() => t("SAMPLE_APP.PAGES.LIST.TITLE"));
196
196
 
197
197
  const reload = async () => {
198
+ selectedItems.value = [];
198
199
  await getItems({
199
200
  ...searchQuery.value,
200
201
  skip: (currentPage.value - 1) * (searchQuery.value.take ?? 10),
@@ -202,9 +203,10 @@ const reload = async () => {
202
203
  });
203
204
  };
204
205
 
205
- const onItemClick = (item: { id: string }) => {
206
+ const onItemClick = (event: { data: MockedItem; index: number; originalEvent: Event }) => {
207
+ const item = event.data;
206
208
  openBlade({
207
- blade: markRaw(Details),
209
+ name: "SampleDetails",
208
210
  param: item.id,
209
211
  onOpen() {
210
212
  selectedItemId.value = item.id;
@@ -215,32 +217,23 @@ const onItemClick = (item: { id: string }) => {
215
217
  });
216
218
  };
217
219
 
218
- const onHeaderClick = (item: ITableColumns) => {
219
- tableSortHandler(item.id);
220
- };
221
-
222
- const onSelectionChanged = (items: MockedItem[]) => {
223
- selectedIds.value = items.map((item) => item.id!);
224
- };
225
-
226
- const actionBuilder = (): IActionBuilderResult[] => {
227
- const result: IActionBuilderResult[] = [];
228
- result.push({
229
- icon: "lucide-trash-2",
230
- title: computed(() => t("SAMPLE_APP.PAGES.LIST.TABLE.ACTIONS.DELETE")),
231
- type: "danger",
232
- async clickHandler(_item: MockedItem) {
233
- if (_item.id) {
234
- if (!selectedIds.value.includes(_item.id)) {
235
- selectedIds.value.push(_item.id);
220
+ const actionBuilder = (item: MockedItem): TableAction[] => {
221
+ return [
222
+ {
223
+ icon: "lucide-trash-2",
224
+ title: computed(() => t("SAMPLE_APP.PAGES.LIST.TABLE.ACTIONS.DELETE")),
225
+ type: "danger",
226
+ async clickHandler() {
227
+ if (item.id) {
228
+ if (!selectedIds.value.includes(item.id)) {
229
+ selectedItems.value = [...selectedItems.value, item];
230
+ }
231
+ await remove(selectedIds.value);
232
+ selectedItems.value = [];
236
233
  }
237
- await remove(selectedIds.value);
238
- selectedIds.value = [];
239
- }
234
+ },
240
235
  },
241
- });
242
-
243
- return result;
236
+ ];
244
237
  };
245
238
 
246
239
  async function remove(ids: string[]) {
@@ -256,14 +249,5 @@ async function remove(ids: string[]) {
256
249
  }
257
250
  }
258
251
 
259
- watch(
260
- () => sortExpression.value,
261
- async (newVal) => {
262
- await getItems({
263
- sort: newVal,
264
- });
265
- },
266
- );
267
-
268
252
  exposeToChildren({ reload });
269
253
  </script>
@@ -22,8 +22,8 @@
22
22
  "@types/node": "^20.10.5",
23
23
  "@typescript-eslint/eslint-plugin": "^7.4.0",
24
24
  "@typescript-eslint/parser": "^7.4.0",
25
- "@vc-shell/api-client-generator": "^2.0.0-alpha.15",
26
- "@vc-shell/ts-config": "^2.0.0-alpha.15",
25
+ "@vc-shell/api-client-generator": "^2.0.0-alpha.17",
26
+ "@vc-shell/ts-config": "^2.0.0-alpha.17",
27
27
  "@vitejs/plugin-vue": "^5.2.3",
28
28
  "@vue/eslint-config-prettier": "^9.0.0",
29
29
  "@vue/eslint-config-typescript": "^13.0.0",
@@ -48,18 +48,16 @@
48
48
  "vite-plugin-checker": "^0.9.1",
49
49
  "vite-plugin-mkcert": "^1.17.1",
50
50
  "vue-eslint-parser": "^9.3.2",
51
- "vue-tsc": "^2.2.10"
51
+ "vue-tsc": "^3.2.5"
52
52
  },
53
53
  "dependencies": {
54
- "@vc-shell/config-generator": "^2.0.0-alpha.15",
55
- "@vc-shell/framework": "^2.0.0-alpha.15",
54
+ "@vc-shell/config-generator": "^2.0.0-alpha.17",
55
+ "@vc-shell/framework": "^2.0.0-alpha.17",
56
56
  "@vueuse/core": "^10.7.1",
57
57
  "@vueuse/integrations": "^10.7.1",
58
- "cross-spawn": "^7.0.3",
59
- "moment": "^2.30.1",
60
58
  "vee-validate": "^4.12.4",
61
- "vue": "^3.5.13",
62
- "vue-router": "^4.2.5"
59
+ "vue": "^3.5.30",
60
+ "vue-router": "^5.0.3"
63
61
  },
64
62
  "lint-staged": {
65
63
  "*.{js,ts,html,css}": "prettier --write '**/*.{ts,vue}'",
@@ -1,13 +1,13 @@
1
1
  import { App } from "vue";
2
- import { addMenuItem<% if (dashboard) { %>, registerDashboardWidget<% } %> } from "@vc-shell/framework";
3
- <% if (dashboard) { %>
2
+ <% if (dashboard) { -%>
3
+ import { addMenuItem, registerDashboardWidget } from "@vc-shell/framework";
4
4
  import { markRaw } from "vue";
5
5
  import Welcome from "./components/dashboard-widgets/Welcome.vue";
6
- <% } %>
6
+ <% } -%>
7
7
 
8
8
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
9
9
  export function bootstrap(app: App) {
10
- <% if (dashboard) { %>
10
+ <% if (dashboard) { -%>
11
11
  addMenuItem({
12
12
  title: "SHELL.MENU.DASHBOARD",
13
13
  icon: "lucide-home",
@@ -22,5 +22,5 @@ export function bootstrap(app: App) {
22
22
  size: { width: 6, height: 6 },
23
23
  position: { x: 0, y: 0 },
24
24
  });
25
- <% } %>
25
+ <% } -%>
26
26
  }
@@ -3,10 +3,12 @@ import { createApp } from "vue";
3
3
  import { router } from "./router";
4
4
  import * as locales from "./locales";
5
5
  import { RouterView } from "vue-router";
6
+ <% if (hasModule) { -%>
6
7
  import <%- ModuleNamePascalCase %> from "./modules/<%- ModuleName %>";
7
- <% if (mocks) { %>
8
+ <% } -%>
9
+ <% if (mocks) { -%>
8
10
  import Sample from "./modules/sample";
9
- <% } %>
11
+ <% } -%>
10
12
  import { bootstrap } from "./bootstrap";
11
13
 
12
14
  import "@vc-shell/framework/dist/index.css";
@@ -20,28 +22,32 @@ async function startApp() {
20
22
  console.log(e);
21
23
  }
22
24
 
23
- const app = createApp(RouterView)
24
- .use(VirtoShellFramework, {
25
- router,
26
- i18n: {
27
- locale: import.meta.env.APP_I18N_LOCALE,
28
- fallbackLocale: import.meta.env.APP_I18N_FALLBACK_LOCALE,
29
- },
30
- <% if (aiAgent) { %>
31
- aiAgent: {
32
- config: {
33
- url: import.meta.env.APP_AI_AGENT_URL,
34
- },
25
+ const { currentLocale, setLocale } = useLanguages();
26
+
27
+ const app = createApp(RouterView);
28
+
29
+ app.use(VirtoShellFramework, {
30
+ router,
31
+ i18n: {
32
+ locale: import.meta.env.APP_I18N_LOCALE,
33
+ fallbackLocale: import.meta.env.APP_I18N_FALLBACK_LOCALE,
34
+ },
35
+ <% if (aiAgent) { -%>
36
+ aiAgent: {
37
+ config: {
38
+ url: import.meta.env.APP_AI_AGENT_URL,
35
39
  },
36
- <% } %>
37
- })
38
- .use(<%- ModuleNamePascalCase %>, { router })
39
- <% if (mocks) { %>
40
- .use(Sample, { router })
41
- <% } %>
42
- .use(router);
40
+ },
41
+ <% } -%>
42
+ });
43
43
 
44
- const { currentLocale, setLocale } = app.runWithContext(() => useLanguages());
44
+ <% if (hasModule) { -%>
45
+ app.use(<%- ModuleNamePascalCase %>);
46
+ <% } -%>
47
+ <% if (mocks) { -%>
48
+ app.use(Sample);
49
+ <% } -%>
50
+ app.use(router);
45
51
 
46
52
  bootstrap(app);
47
53
 
@@ -51,7 +57,7 @@ async function startApp() {
51
57
 
52
58
  setLocale(currentLocale.value);
53
59
 
54
- app.config.errorHandler = (err) => {
60
+ app.config.errorHandler = (err: unknown) => {
55
61
  notification.error((err as Error).toString(), {
56
62
  timeout: 5000,
57
63
  });
@@ -6,6 +6,7 @@
6
6
  "rootDir": "src",
7
7
  "types": [
8
8
  "vite/client",
9
+ "@vc-shell/framework/globals"
9
10
  ]
10
11
  },
11
12
  "include": [
package/dist/types.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- export type ProjectType = "standalone" | "dynamic-module" | "host-app";
1
+ export type ProjectType = "standalone" | "dynamic-module";
2
2
  export interface ProjectOptions {
3
3
  projectName: string;
4
4
  packageName: string;
5
5
  projectType: ProjectType;
6
- moduleName: string;
6
+ moduleName?: string;
7
7
  basePath: string;
8
8
  tenantRoutes: boolean;
9
9
  aiAgent: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,gBAAgB,GAAG,UAAU,CAAC;AAEvE,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,cAAc,CAAC;IACxB,cAAc,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACnG,SAAS,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CAC7F"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,gBAAgB,CAAC;AAE1D,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,cAAc,CAAC;IACxB,cAAc,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACnG,SAAS,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CAC7F"}
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": "2.0.0-alpha.15",
4
+ "version": "2.0.0-alpha.17",
5
5
  "type": "module",
6
6
  "bin": "./dist/index.js",
7
7
  "files": [
@@ -9,13 +9,14 @@
9
9
  ],
10
10
  "scripts": {
11
11
  "build": "vite build && yarn postbuild",
12
+ "test": "vitest run --config vitest.config.ts",
12
13
  "type-check": "vue-tsc --noEmit",
13
14
  "postbuild": "shx cp -R src/templates dist/"
14
15
  },
15
16
  "devDependencies": {
16
17
  "@types/ejs": "^3.1.5",
17
18
  "@types/prompts": "^2.4.4",
18
- "@vc-shell/ts-config": "2.0.0-alpha.15",
19
+ "@vc-shell/ts-config": "2.0.0-alpha.17",
19
20
  "copyfiles": "^2.4.1",
20
21
  "cross-env": "^7.0.3",
21
22
  "shx": "^0.3.4",
@@ -1,27 +0,0 @@
1
- /* eslint-disable */
2
-
3
- import { CoreBladeAdditionalSettings } from "@vc-shell/framework";
4
- import type { Ref } from "vue";
5
- import type { Composer } from "vue-i18n";
6
-
7
- declare module "*.vue" {
8
- import type { DefineComponent } from "vue";
9
- const component: DefineComponent<{}, {}, any>;
10
- export default component;
11
- }
12
-
13
- declare module "@vue/runtime-core" {
14
- interface ComponentCustomProperties extends _ComponentCustomProperties {
15
- $mergeLocaleMessage: Composer<{}, {}, {}, string, never, string>["mergeLocaleMessage"];
16
- $hasAccess: (permissions: string | string[] | undefined) => boolean;
17
- $isPhone: Ref<boolean>;
18
- $isTablet: Ref<boolean>;
19
- $isMobile: Ref<boolean>;
20
- $isDesktop: Ref<boolean>;
21
- $isTouch: boolean;
22
- }
23
-
24
- interface ComponentOptionsBase extends CoreBladeAdditionalSettings {}
25
- }
26
-
27
- export {};
@@ -1,10 +0,0 @@
1
- import type { ComponentCustomProperties } from '@vue/runtime-core';
2
-
3
- declare module "@vue/runtime-core" {
4
- interface ComponentCustomProperties {
5
- $t: (key: string, ...args: any[]) => string;
6
- $d: (key: string, ...args: any[]) => string;
7
- $tm: (key: string, ...args: any[]) => string;
8
- $rt: (key: string, ...args: any[]) => string;
9
- }
10
- }
@@ -1,27 +0,0 @@
1
- /* eslint-disable */
2
-
3
- import { CoreBladeAdditionalSettings } from "@vc-shell/framework";
4
- import type { Ref } from "vue";
5
- import type { Composer } from "vue-i18n";
6
-
7
- declare module "*.vue" {
8
- import type { DefineComponent } from "vue";
9
- const component: DefineComponent<{}, {}, any>;
10
- export default component;
11
- }
12
-
13
- declare module "@vue/runtime-core" {
14
- interface ComponentCustomProperties extends _ComponentCustomProperties {
15
- $mergeLocaleMessage: Composer<{}, {}, {}, string, never, string>["mergeLocaleMessage"];
16
- $hasAccess: (permissions: string | string[] | undefined) => boolean;
17
- $isPhone: Ref<boolean>;
18
- $isTablet: Ref<boolean>;
19
- $isMobile: Ref<boolean>;
20
- $isDesktop: Ref<boolean>;
21
- $isTouch: boolean;
22
- }
23
-
24
- interface ComponentOptionsBase extends CoreBladeAdditionalSettings {}
25
- }
26
-
27
- export {};
@@ -1,10 +0,0 @@
1
- import type { ComponentCustomProperties } from '@vue/runtime-core';
2
-
3
- declare module "@vue/runtime-core" {
4
- interface ComponentCustomProperties {
5
- $t: (key: string, ...args: any[]) => string;
6
- $d: (key: string, ...args: any[]) => string;
7
- $tm: (key: string, ...args: any[]) => string;
8
- $rt: (key: string, ...args: any[]) => string;
9
- }
10
- }