aloha-vue 2.78.0 → 2.79.1

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aloha-vue",
3
- "version": "2.78.0",
3
+ "version": "2.79.1",
4
4
  "description": "Aloha-vue is a JavaScript library that provides a wide range of accessible components and directives for Vue.js. Accessibility is of paramount importance to us, and we have designed all our components to meet accessibility compliance criteria. This library is a valuable tool for frontend developers and has already been used in three projects, including two large-scale ones",
5
5
  "keywords": [
6
6
  "accessibility compliance criteria",
@@ -11,11 +11,9 @@ import {
11
11
  AKeyIndex,
12
12
  } from "../../const/AKeys";
13
13
  import {
14
+ cloneDeep,
14
15
  floor,
15
16
  forEach,
16
- } from "lodash";
17
- import {
18
- cloneDeep,
19
17
  isNil,
20
18
  min,
21
19
  round,
@@ -89,6 +89,11 @@ export default {
89
89
  type: Object,
90
90
  required: false,
91
91
  },
92
+ showAddFilterButtonWhenEmpty: {
93
+ type: Boolean,
94
+ required: false,
95
+ default: true,
96
+ },
92
97
  unappliedModel: {
93
98
  type: Object,
94
99
  required: false,
@@ -266,6 +271,7 @@ export default {
266
271
  filtersKeyById: this.filtersKeyById,
267
272
  filtersSaved: this.filtersSavedLocal,
268
273
  filtersVisible: this.filtersVisible,
274
+ showAddFilterButtonWhenEmpty: this.showAddFilterButtonWhenEmpty,
269
275
  onUpdateModelFilters: this.onUpdateModelFilters,
270
276
  unappliedModel: this.unappliedModel,
271
277
  updateDataKeyByIdFromFilter: this.updateDataKeyByIdFromFilter,
@@ -89,6 +89,11 @@ export default {
89
89
  type: Object,
90
90
  required: false,
91
91
  },
92
+ showAddFilterButtonWhenEmpty: {
93
+ type: Boolean,
94
+ required: false,
95
+ default: true,
96
+ },
92
97
  onUpdateModelFilters: {
93
98
  type: Function,
94
99
  required: true,
@@ -305,41 +310,43 @@ export default {
305
310
  stop: true,
306
311
  onClick: () => this.deleteFiltersVisible({ filter: item }),
307
312
  }),
308
- formDataAppend: () => h("div", {
309
- class: "a_filter_horizontal__add_filter__wrapper",
310
- }, [
311
- h(ASelect, {
312
- buttonClassDefault: "a_btn a_btn_primary a_filter_horizontal__add_filter",
313
- change: this.addFiltersVisible,
314
- data: this.filtersHidden,
315
- hasCaret: false,
316
- disabled: !this.filtersHidden.length,
317
- isLabelFloat: false,
318
- keyGroup: "group",
319
- keyId: "id",
320
- keyLabel: "label",
321
- label: "_A_FILTERS_ADD_FILTER_",
322
- labelClass: "a_sr_only",
323
- menuWidthType: "by_content",
324
- sortOrderGroup: "asc",
325
- placement: "bottom-start",
326
- search: true,
327
- translateData: true,
328
- type: "select",
329
- }, {
330
- fixedPlaceholder: () => [
331
- h(ATranslation, {
332
- tag: "span",
333
- ariaHidden: true,
334
- class: "a_position_absolute_all",
335
- title: "_A_FILTERS_ADD_FILTER_",
336
- }),
337
- h(AIcon, {
338
- icon: PlusLg,
339
- }),
340
- ],
341
- }),
342
- ]),
313
+ formDataAppend: () => this.filtersHidden.length || this.showAddFilterButtonWhenEmpty ?
314
+ h("div", {
315
+ class: "a_filter_horizontal__add_filter__wrapper",
316
+ }, [
317
+ h(ASelect, {
318
+ buttonClassDefault: "a_btn a_btn_primary a_filter_horizontal__add_filter",
319
+ change: this.addFiltersVisible,
320
+ data: this.filtersHidden,
321
+ hasCaret: false,
322
+ disabled: !this.filtersHidden.length,
323
+ isLabelFloat: false,
324
+ keyGroup: "group",
325
+ keyId: "id",
326
+ keyLabel: "label",
327
+ label: "_A_FILTERS_ADD_FILTER_",
328
+ labelClass: "a_sr_only",
329
+ menuWidthType: "by_content",
330
+ sortOrderGroup: "asc",
331
+ placement: "bottom-start",
332
+ search: true,
333
+ translateData: true,
334
+ type: "select",
335
+ }, {
336
+ fixedPlaceholder: () => [
337
+ h(ATranslation, {
338
+ tag: "span",
339
+ ariaHidden: true,
340
+ class: "a_position_absolute_all",
341
+ title: "_A_FILTERS_ADD_FILTER_",
342
+ }),
343
+ h(AIcon, {
344
+ icon: PlusLg,
345
+ }),
346
+ ],
347
+ }),
348
+ ]) :
349
+ "",
343
350
  formAppend: () => this.canSave ?
344
351
  h("div", {
345
352
  class: "a_filter_horizontal__save_actions",
@@ -5,7 +5,7 @@ import {
5
5
 
6
6
  import {
7
7
  snakeCase,
8
- } from "lodash";
8
+ } from "lodash-es";
9
9
 
10
10
  export default function ClassAPI(props, {
11
11
  subTypeLocal = computed(() => undefined),
@@ -6,12 +6,10 @@ import {
6
6
  AKeyId,
7
7
  } from "../../../index";
8
8
 
9
- import {
10
- forEach,
11
- } from "lodash";
12
9
  import {
13
10
  cloneDeep,
14
11
  filter,
12
+ forEach,
15
13
  } from "lodash-es";
16
14
 
17
15
  export default function AllAPI(props, {
@@ -5,7 +5,7 @@ import {
5
5
 
6
6
  import {
7
7
  forEach,
8
- } from "lodash";
8
+ } from "lodash-es";
9
9
 
10
10
  export default function ReadonlyAPI(props, {
11
11
  dataKeyByKeyIdLocal = computed(() => ({})),
@@ -1,6 +1,3 @@
1
- import {
2
- isArray,
3
- } from "lodash";
4
1
  import {
5
2
  typesContainer,
6
3
  typesModelArray,
@@ -10,6 +7,7 @@ import {
10
7
  filter,
11
8
  forEach,
12
9
  get,
10
+ isArray,
13
11
  isEmpty,
14
12
  isNil,
15
13
  } from "lodash-es";