aloha-vue 1.2.112 → 1.2.113

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.
@@ -43,7 +43,7 @@ export default {
43
43
  modelColumnsOrdering: ["sdf", "ddsadsa", "aloha"],
44
44
  columns: [
45
45
  {
46
- label: "Aloha",
46
+ label: "_A_TABLE_COLUMN_1_",
47
47
  id: "aloha",
48
48
  keyLabel: "aloha",
49
49
  sortId: "aloha",
@@ -56,7 +56,7 @@ export default {
56
56
  title: "Aloha",
57
57
  },
58
58
  {
59
- label: "Slot",
59
+ label: "_A_TABLE_COLUMN_2_",
60
60
  id: "slot",
61
61
  slot: "slot1",
62
62
  title: "bbbbbbbbbb",
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "Vue.js"
15
15
  ],
16
16
  "homepage": "https://github.com/ilia-brykin/aloha/#README.md",
17
- "version": "1.2.112",
17
+ "version": "1.2.113",
18
18
  "author": {
19
19
  "name": "Ilia Brykin",
20
20
  "email": "brykin.ilia@gmail.com"
@@ -399,7 +399,6 @@ export default {
399
399
  columnsDefaultValue: computed(() => this.columnsDefaultValue),
400
400
  columnActionsWidthLocal: computed(() => this.columnActionsWidth),
401
401
  columnWidthDefault: computed(() => this.columnWidthDefault),
402
- isActionColumnVisible: computed(() => this.isActionColumnVisible),
403
402
  isLoadingOptions: computed(() => this.isLoadingOptions),
404
403
  isLoadingTable: computed(() => this.isLoadingTable),
405
404
  rowActions: computed(() => this.rowActions),
@@ -409,6 +408,7 @@ export default {
409
408
  },
410
409
  setup(props, context) {
411
410
  const {
411
+ isActionColumnVisibleLocal,
412
412
  isActionIconVisibleLocal,
413
413
  isColumnsDndLocal,
414
414
  isMobile,
@@ -630,6 +630,7 @@ export default {
630
630
  provide("currentMultipleActions", currentMultipleActions);
631
631
  provide("hasPreview", hasPreview);
632
632
  provide("indexFirstScrollInvisibleColumn", indexFirstScrollInvisibleColumn);
633
+ provide("isActionColumnVisible", isActionColumnVisibleLocal);
633
634
  provide("isActionIconVisible", isActionIconVisibleLocal);
634
635
  provide("isColumnsDnd", isColumnsDndLocal);
635
636
  provide("isMobile", isMobile);
@@ -66,6 +66,11 @@ export default {
66
66
  inDropdown: true,
67
67
  });
68
68
 
69
+ const {
70
+ labelLocal,
71
+ labelTranslated,
72
+ } = LabelAPI(props);
73
+
69
74
  const {
70
75
  buttonVisibleProps,
71
76
  isColumnVisible,
@@ -88,12 +93,9 @@ export default {
88
93
  attributesForRoot,
89
94
  isColumnVisible,
90
95
  isLocked,
96
+ labelTranslated,
91
97
  });
92
98
 
93
- const {
94
- labelLocal,
95
- } = LabelAPI(props);
96
-
97
99
  return {
98
100
  attributesComponent,
99
101
  attributesForRoot,
@@ -7,8 +7,8 @@ export default function AttributesComponentAPI(props, {
7
7
  attributesForRoot = computed(() => ({})),
8
8
  isColumnVisible = computed(() => false),
9
9
  isLocked = computed(() => false),
10
+ labelTranslated = computed(() => ""),
10
11
  }) {
11
- const column = toRef(props, "column");
12
12
  const searchColumnModel = toRef(props, "searchColumnModel");
13
13
 
14
14
  const isComponentVisible = computed(() => {
@@ -16,7 +16,7 @@ export default function AttributesComponentAPI(props, {
16
16
  return true;
17
17
  }
18
18
  const RE = new RegExp(searchColumnModel.value, "gi");
19
- return `${ column.value.label }`.search(RE) !== -1;
19
+ return `${ labelTranslated.value }`.search(RE) !== -1;
20
20
  });
21
21
 
22
22
  const attributesComponent = computed(() => {
@@ -5,6 +5,11 @@ import {
5
5
 
6
6
  import AFiltersAPI from "../../../../compositionAPI/AFiltersAPI";
7
7
 
8
+ import {
9
+ isPlaceholderTranslate,
10
+ getTranslatedText,
11
+ } from "../../../../ATranslation/compositionAPI/UtilsAPI";
12
+
8
13
  export default function LabelAPI(props) {
9
14
  const column = toRef(props, "column");
10
15
  const searchColumnModel = toRef(props, "searchColumnModel");
@@ -13,11 +18,22 @@ export default function LabelAPI(props) {
13
18
  filterSearchHighlight,
14
19
  } = AFiltersAPI();
15
20
 
21
+ const labelTranslated = computed(() => {
22
+ if (isPlaceholderTranslate(column.value.label)) {
23
+ return getTranslatedText({
24
+ placeholder: column.value.label,
25
+ });
26
+ }
27
+
28
+ return column.value.label;
29
+ });
30
+
16
31
  const labelLocal = computed(() => {
17
- return filterSearchHighlight(column.value.label, { searchModel: searchColumnModel.value });
32
+ return filterSearchHighlight(labelTranslated.value, { searchModel: searchColumnModel.value });
18
33
  });
19
34
 
20
35
  return {
21
36
  labelLocal,
37
+ labelTranslated,
22
38
  };
23
39
  }
@@ -6,15 +6,24 @@ import {
6
6
  import AMobileAPI from "../../compositionAPI/AMobileAPI";
7
7
 
8
8
  export default function SimpleTableAPI(props) {
9
+ const isActionColumnVisible = toRef(props, "isActionColumnVisible");
9
10
  const isActionIconVisible = toRef(props, "isActionColumnVisible");
10
11
  const isColumnsDnd = toRef(props, "isColumnsDnd");
11
12
  const isSimpleTable = toRef(props, "isSimpleTable");
12
13
  const modelIsTableWithoutScrollStart = toRef(props, "modelIsTableWithoutScrollStart");
14
+ const rowActions = toRef(props, "rowActions");
13
15
 
14
16
  const {
15
17
  isMobileWidth,
16
18
  } = AMobileAPI();
17
19
 
20
+ const isActionColumnVisibleLocal = computed(() => {
21
+ if (isSimpleTable.value) {
22
+ return rowActions.value && !!rowActions.value.length && isActionColumnVisible.value;
23
+ }
24
+
25
+ return isActionIconVisible.value;
26
+ });
18
27
  const isActionIconVisibleLocal = computed(() => {
19
28
  return !!(isActionIconVisible.value && !isSimpleTable.value);
20
29
  });
@@ -29,6 +38,7 @@ export default function SimpleTableAPI(props) {
29
38
  });
30
39
 
31
40
  return {
41
+ isActionColumnVisibleLocal,
32
42
  isActionIconVisibleLocal,
33
43
  isColumnsDndLocal,
34
44
  isMobile,