aloha-vue 1.0.252 → 1.0.253

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.
@@ -5,6 +5,7 @@ a-menu(
5
5
  :is-breadcrumbs-link-truncated="false"
6
6
  key-children="children"
7
7
  key-slot="slot"
8
+ :is-search-breadcrumbs-all="true"
8
9
  )
9
10
  template(
10
11
  v-slot:slotItem="{ item, label }"
@@ -191,7 +191,7 @@ export default {
191
191
  title: "Aloha1 Title",
192
192
  isHidden: false,
193
193
  callback: this.clickMe,
194
- disabled: true,
194
+ disabled: false,
195
195
  icon: "Plus",
196
196
  isConfirm: true,
197
197
  isAllRowsSelected: true,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aloha-vue",
3
3
  "description": "Project aloha",
4
- "version": "1.0.252",
4
+ "version": "1.0.253",
5
5
  "author": "Ilia Brykin",
6
6
  "scripts": {
7
7
  "build-icons": "node scriptsNode/iconsSvgToJs.js bootstrap3 && node scriptsNode/iconsSvgToJs.js bootstrap-1-9-1"
@@ -83,6 +83,11 @@ export default {
83
83
  required: false,
84
84
  default: true,
85
85
  },
86
+ isSearchBreadcrumbsAll: {
87
+ type: Boolean,
88
+ required: false,
89
+ default: false,
90
+ },
86
91
  keyChildren: {
87
92
  type: String,
88
93
  required: false,
@@ -283,6 +288,7 @@ export default {
283
288
  dataProParentList: this.dataProParentList,
284
289
  idsSearchVisible: this.idsSearchVisible,
285
290
  isSearchActive: this.isSearchActive,
291
+ isSearchBreadcrumbsAll: this.isSearchBreadcrumbsAll,
286
292
  modelSearch: this.modelSearch,
287
293
  }, this.$slots),
288
294
  ]),
@@ -59,12 +59,16 @@ export default {
59
59
  const isFirst = toRef(props, "isFirst");
60
60
  const panelParentsOpen = toRef(props, "panelParentsOpen");
61
61
  const parentId = toRef(props, "parentId");
62
+ const isSearchActive = toRef(props, "isSearchActive");
62
63
 
63
64
  const panelId = computed(() => {
64
65
  return `a_menu_panel_${ parentId.value || "" }`;
65
66
  });
66
67
 
67
68
  const isPanelOpen = computed(() => {
69
+ if (isSearchActive.value) {
70
+ return false;
71
+ }
68
72
  if (isFirst.value) {
69
73
  return panelParentsOpen.value.length === 0;
70
74
  }
@@ -6,9 +6,14 @@ import {
6
6
 
7
7
  export default function AttributesAPI(props) {
8
8
  const isPanelOpen = toRef(props, "isPanelOpen");
9
+ const isLinkInSearchPanel = toRef(props, "isLinkInSearchPanel");
10
+
9
11
  const isMenuOpen = inject("isMenuOpen");
10
12
 
11
13
  const tabindex = computed(() => {
14
+ if (isLinkInSearchPanel.value) {
15
+ return 0;
16
+ }
12
17
  return isPanelOpen.value && isMenuOpen.value ? 0 : -1;
13
18
  });
14
19
 
@@ -13,7 +13,7 @@ import AKeyParent from "../ui/const/AKeyParent";
13
13
  import AKeyLabel from "../ui/const/AKeyLabel";
14
14
 
15
15
  import {
16
- get,
16
+ get, isNil,
17
17
  } from "lodash-es";
18
18
 
19
19
  export default {
@@ -39,6 +39,11 @@ export default {
39
39
  type: Array,
40
40
  required: true,
41
41
  },
42
+ isSearchBreadcrumbsAll: {
43
+ type: Boolean,
44
+ required: false,
45
+ default: false,
46
+ },
42
47
  modelSearch: {
43
48
  type: String,
44
49
  required: false,
@@ -50,31 +55,62 @@ export default {
50
55
  const idsSearchVisible = toRef(props, "idsSearchVisible");
51
56
  const items = toRef(props, "items");
52
57
  const dataKeyById = toRef(props, "dataKeyById");
58
+ const isSearchBreadcrumbsAll = toRef(props, "isSearchBreadcrumbsAll");
53
59
 
54
60
  const isGroupVisible = computed(() => {
55
61
  return !!idsSearchVisible.value.main[groupIndex.value];
56
62
  });
57
63
 
58
- const labelGroup = computed(() => {
64
+ const getParentLabels = ({ labels = [], item }) => {
65
+ if (item[AKeyParent]) {
66
+ const PARENT = dataKeyById.value[item[AKeyParent]];
67
+ const LABEL = get(PARENT, AKeyLabel);
68
+ if (!isNil(LABEL)) {
69
+ labels.push(LABEL);
70
+ }
71
+ return getParentLabels({ labels, item: PARENT });
72
+ }
73
+ return labels;
74
+ };
75
+
76
+ const labelsGroup = computed(() => {
77
+ let labels = [];
59
78
  const itemFirst = items.value[0] || {};
60
- return get(dataKeyById.value, `${ itemFirst[AKeyParent] }.${ AKeyLabel }`);
79
+ if (isSearchBreadcrumbsAll.value) {
80
+ labels = getParentLabels({ labels, item: itemFirst });
81
+ } else {
82
+ const LABEL = get(dataKeyById.value, `${ itemFirst[AKeyParent] }.${ AKeyLabel }`);
83
+ if (!isNil(LABEL)) {
84
+ labels.push(LABEL);
85
+ }
86
+ }
87
+ return labels;
88
+ });
89
+
90
+ const hasLabelsGroup = computed(() => {
91
+ return labelsGroup.value.length > 0;
61
92
  });
62
93
 
63
94
  return {
95
+ hasLabelsGroup,
64
96
  isGroupVisible,
65
- labelGroup,
97
+ labelsGroup,
66
98
  };
67
99
  },
68
100
  render() {
69
101
  if (this.isGroupVisible) {
70
102
  return [
71
- h("dt", null, [
72
- this.labelGroup && withDirectives(h("div", {
73
- class: "a_menu__list_header",
74
- }), [
75
- [ASafeHtml, this.labelGroup],
76
- ]),
77
- ]),
103
+ this.hasLabelsGroup ?
104
+ this.labelsGroup.map(label => {
105
+ return h("dt", null, [
106
+ withDirectives(h("div", {
107
+ class: "a_menu__list_header a_menu__list_header_search",
108
+ }), [
109
+ [ASafeHtml, label],
110
+ ]),
111
+ ]);
112
+ }) :
113
+ h("dt"),
78
114
  this.items.map(item => {
79
115
  return h(AMenuPanelLink, {
80
116
  item,
@@ -33,6 +33,11 @@ export default {
33
33
  type: Boolean,
34
34
  required: true,
35
35
  },
36
+ isSearchBreadcrumbsAll: {
37
+ type: Boolean,
38
+ required: false,
39
+ default: false,
40
+ },
36
41
  modelSearch: {
37
42
  type: String,
38
43
  required: false,
@@ -72,6 +77,7 @@ export default {
72
77
  dataKeyById: this.dataKeyById,
73
78
  dataProParentChildren: this.dataProParentChildren,
74
79
  idsSearchVisible: this.idsSearchVisible,
80
+ isSearchBreadcrumbsAll: this.isSearchBreadcrumbsAll,
75
81
  modelSearch: this.modelSearch,
76
82
  }, this.$slots);
77
83
  }),
@@ -22,6 +22,7 @@ export default function ActionsAPI(props, { emit }) {
22
22
 
23
23
  const tableId = inject("tableId");
24
24
  const currentMultipleActions = inject("currentMultipleActions");
25
+ const rowsLocal = inject("rowsLocal");
25
26
 
26
27
  const {
27
28
  closeConfirm,
@@ -75,6 +76,7 @@ export default function ActionsAPI(props, { emit }) {
75
76
  const onStartModalMultipleActions = async() => {
76
77
  await currentMultipleActions.value.callback({
77
78
  rows: selectedRows.value,
79
+ rowsVisible: rowsLocal.value,
78
80
  id: buttonMultipleId.value,
79
81
  areAllRowsSelected: areAllRowsSelected.value,
80
82
  modelFilters: modelFilters.value,
@@ -95,6 +97,7 @@ export default function ActionsAPI(props, { emit }) {
95
97
  currentMultipleActions.value.callback({
96
98
  close: closeMultipleActionsActive.value,
97
99
  rows: selectedRows.value,
100
+ rowsVisible: rowsLocal.value,
98
101
  id: buttonMultipleId.value,
99
102
  areAllRowsSelected: areAllRowsSelected.value,
100
103
  modelFilters: modelFilters.value,
@@ -172,6 +172,10 @@ $a_menu_breakpoint_mobile: 991px;
172
172
  padding-top: .5rem;
173
173
  padding-bottom: .5rem;
174
174
  }
175
+ .a_menu__list_header_search {
176
+ padding-left: var(--a_menu_link_padding_x);
177
+ padding-right: var(--a_menu_link_padding_x);
178
+ }
175
179
  .a_menu__link {
176
180
  flex-grow: 1;
177
181
  flex-basis: 10%;