@vc-shell/create-vc-app 1.0.170 → 1.0.172

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 CHANGED
@@ -1,3 +1,16 @@
1
+ ## [1.0.172](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.171...v1.0.172) (2024-03-06)
2
+
3
+
4
+ ### Features
5
+
6
+ * **create-vc-app:** added table actions ([4545c92](https://github.com/VirtoCommerce/vc-shell/commit/4545c92b5c48da897ad9631ed06f058f1c448e6a))
7
+
8
+
9
+
10
+ ## [1.0.171](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.170...v1.0.171) (2024-03-06)
11
+
12
+
13
+
1
14
  ## [1.0.170](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.169...v1.0.170) (2024-02-27)
2
15
 
3
16
 
@@ -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.170",
28
- "@vc-shell/release-config": "^1.0.170",
29
- "@vc-shell/ts-config": "^1.0.170",
27
+ "@vc-shell/api-client-generator": "^1.0.172",
28
+ "@vc-shell/release-config": "^1.0.172",
29
+ "@vc-shell/ts-config": "^1.0.172",
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,8 +56,8 @@
56
56
  },
57
57
  "dependencies": {
58
58
  "@fortawesome/fontawesome-free": "^5.15.3",
59
- "@vc-shell/config-generator": "^1.0.170",
60
- "@vc-shell/framework": "^1.0.170",
59
+ "@vc-shell/config-generator": "^1.0.172",
60
+ "@vc-shell/framework": "^1.0.172",
61
61
  "@vueuse/core": "^10.7.1",
62
62
  "@vueuse/integrations": "^10.7.1",
63
63
  "moment": "^2.30.1",
@@ -86,6 +86,7 @@
86
86
  "OK": "OK",
87
87
  "CONFIRM": "Confirm",
88
88
  "CANCEL": "Cancel",
89
+ "CLOSE": "Close",
89
90
  "TITLE": {
90
91
  "CONFIRMATION": "Confirmation",
91
92
  "ERROR": "Error"
@@ -19,6 +19,7 @@
19
19
  :loading="loading"
20
20
  :columns="columns"
21
21
  :item-action-builder="actionBuilder"
22
+ enable-item-actions
22
23
  :sort="sort"
23
24
  :pages="pages"
24
25
  :total-count="totalCount"
@@ -248,13 +249,13 @@ const onHeaderClick = (item: ITableColumns) => {
248
249
  };
249
250
 
250
251
  const actionBuilder = (item: (typeof data.value)[number]): IActionBuilderResult[] => {
251
- const result = [];
252
+ const result: IActionBuilderResult[] = [];
252
253
 
253
254
  result.push({
254
255
  icon: "fas fa-trash",
255
256
  title: "Delete",
256
- variant: "danger",
257
- leftActions: true,
257
+ type: "danger",
258
+ position: "left",
258
259
  clickHandler() {
259
260
  throw new Error("Function is not implemented.");
260
261
  },
@@ -68,6 +68,9 @@ export default (args: {
68
68
 
69
69
  const scope = ref<DynamicItemsScope>({
70
70
  openDetailsBlade,
71
+ deleteItem: () => {
72
+ alert("Delete item");
73
+ },
71
74
  });
72
75
 
73
76
  return {
@@ -27,6 +27,16 @@ export const grid: DynamicGridSchema = {
27
27
  {
28
28
  id: "itemsGrid",
29
29
  component: "vc-table",
30
+ actions: [
31
+ {
32
+ id: "deleteAction",
33
+ icon: "fas fa-trash",
34
+ title: "Delete",
35
+ type: "danger",
36
+ position: "left",
37
+ method: "deleteItem",
38
+ },
39
+ ],
30
40
  mobileTemplate: {
31
41
  component: "DynamicItemsMobileGridView",
32
42
  },
@@ -19,6 +19,7 @@
19
19
  :loading="loading"
20
20
  :columns="columns"
21
21
  :item-action-builder="actionBuilder"
22
+ enable-item-actions
22
23
  :sort="sort"
23
24
  :pages="pages"
24
25
  :total-count="totalCount"
@@ -248,13 +249,13 @@ const onHeaderClick = (item: ITableColumns) => {
248
249
  };
249
250
 
250
251
  const actionBuilder = (item: (typeof data.value)[number]): IActionBuilderResult[] => {
251
- const result = [];
252
+ const result: IActionBuilderResult[] = [];
252
253
 
253
254
  result.push({
254
255
  icon: "fas fa-trash",
255
256
  title: "Delete",
256
- variant: "danger",
257
- leftActions: true,
257
+ type: "danger",
258
+ position: "left",
258
259
  clickHandler() {
259
260
  throw new Error("Function is not implemented.");
260
261
  },
@@ -68,6 +68,9 @@ export default (args: {
68
68
 
69
69
  const scope = ref<DynamicItemsScope>({
70
70
  openDetailsBlade,
71
+ deleteItem: () => {
72
+ alert("Delete item");
73
+ },
71
74
  });
72
75
 
73
76
  return {
@@ -27,6 +27,16 @@ export const grid: DynamicGridSchema = {
27
27
  {
28
28
  id: "itemsGrid",
29
29
  component: "vc-table",
30
+ actions: [
31
+ {
32
+ id: "deleteAction",
33
+ icon: "fas fa-trash",
34
+ title: "Delete",
35
+ type: "danger",
36
+ position: "left",
37
+ method: "deleteItem",
38
+ },
39
+ ],
30
40
  mobileTemplate: {
31
41
  component: "DynamicItemsMobileGridView",
32
42
  },
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.170",
4
+ "version": "1.0.172",
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.170",
16
+ "@vc-shell/ts-config": "^1.0.172",
17
17
  "copyfiles": "^2.4.1",
18
18
  "cross-env": "^7.0.3",
19
19
  "shx": "^0.3.4",