aloha-vue 1.2.39 → 1.2.40

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/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.39",
17
+ "version": "1.2.40",
18
18
  "author": {
19
19
  "name": "Ilia Brykin",
20
20
  "email": "brykin.ilia@gmail.com"
@@ -332,6 +332,10 @@ export default {
332
332
  required: false,
333
333
  default: 0,
334
334
  },
335
+ useViewSlot: {
336
+ type: Boolean,
337
+ required: false,
338
+ },
335
339
  valuesForColumnDefault: {
336
340
  type: Array,
337
341
  required: false,
@@ -721,6 +725,7 @@ export default {
721
725
  modelView: this.modelView,
722
726
  tableActionsIndexFirstDropdownAction: this.tableActionsIndexFirstDropdownAction,
723
727
  tableActionsIndexFirstDropdownActionMobile: this.tableActionsIndexFirstDropdownActionMobile,
728
+ useViewSlot: this.useViewSlot,
724
729
  onUpdateViewCurrent: this.updateViewCurrent,
725
730
  onUpdateModelQuickSearch: this.updateModelQuickSearch,
726
731
  onToggleMultipleActionsActive: this.toggleMultipleActionsActive,
@@ -105,6 +105,10 @@ export default {
105
105
  required: false,
106
106
  default: 0,
107
107
  },
108
+ useViewSlot: {
109
+ type: Boolean,
110
+ required: false,
111
+ },
108
112
  viewCurrent: {
109
113
  type: Object,
110
114
  required: false,
@@ -150,6 +154,7 @@ export default {
150
154
 
151
155
  const {
152
156
  updateViewCurrentLocal,
157
+ viewSlotLocal,
153
158
  } = ViewsAPI(props, context);
154
159
 
155
160
  return {
@@ -166,6 +171,7 @@ export default {
166
171
  textMultipleSelectedTranslateExtra,
167
172
  toggleBtnAllRows,
168
173
  updateViewCurrentLocal,
174
+ viewSlotLocal,
169
175
  };
170
176
  },
171
177
  computed: {
@@ -251,7 +257,7 @@ export default {
251
257
  class: "a_d_inline_block",
252
258
  isButtonGroup: true,
253
259
  disabled: this.disabledViews,
254
- slotName: undefined, // TODO: "buttonGroup" AIcon
260
+ slotName: this.viewSlotLocal,
255
261
  data: this.views,
256
262
  keyId: "id",
257
263
  keyLabel: "label",
@@ -259,9 +265,9 @@ export default {
259
265
  classFieldset: "a_p_0",
260
266
  "onUpdate:modelValue": this.updateViewCurrentLocal,
261
267
  }, {
262
- buttonGroup: () => [ // TODO: AIcon
263
- h("span", "aloha"),
264
- ],
268
+ viewSlot: arg => this.$slots.viewSlot && this.$slots.viewSlot({
269
+ ...arg,
270
+ }),
265
271
  }),
266
272
  this.$slots.tableActionsAppend && this.$slots.tableActionsAppend({
267
273
  isMultipleActionsActive: this.isMultipleActionsActive,
@@ -1,9 +1,21 @@
1
+ import {
2
+ computed,
3
+ toRef,
4
+ } from "vue";
5
+
1
6
  export default function ViewsAPI(props, { emit }) {
7
+ const useViewSlot = toRef(props, "useViewSlot");
8
+
2
9
  const updateViewCurrentLocal = model => {
3
10
  emit("updateViewCurrent", model);
4
11
  };
5
12
 
13
+ const viewSlotLocal = computed(() => {
14
+ return useViewSlot.value ? "viewSlot" : undefined;
15
+ });
16
+
6
17
  return {
7
18
  updateViewCurrentLocal,
19
+ viewSlotLocal,
8
20
  };
9
21
  }