aloha-vue 1.2.175 → 1.2.176

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.
Files changed (25) hide show
  1. package/docs/src/views/PageFilters/PageFiltersModelId/PageFiltersModelId.js +81 -83
  2. package/package.json +1 -1
  3. package/src/AFilters/AFilterCenter/AFilterCenter.js +2 -2
  4. package/src/AFilters/AFilterCenter/AFilterCenterItem/compositionAPI/IsDataLoadingAPI.js +2 -2
  5. package/src/AFilters/AFilters/AFilters.js +255 -254
  6. package/src/AFilters/AFilters/compositionAPI/CloseFilterAPI.js +124 -124
  7. package/src/AFilters/AFilters/compositionAPI/FiltersAPI.js +6 -24
  8. package/src/AFilters/AFilters/compositionAPI/ToggleAPI.js +47 -33
  9. package/src/AFilters/AFiltersHorizontal/AFiltersHorizontal.js +1 -0
  10. package/src/AFilters/AFiltersHorizontal/AFiltersHorizontalFilterUi/AFiltersHorizontalFilterUi.js +94 -94
  11. package/src/AFilters/AFiltersHorizontal/AFiltersHorizontalFilterUi/compositionAPI/ModelAPI.js +30 -30
  12. package/src/AFilters/AFiltersHorizontal/compositionAPI/FiltersHiddenAPI.js +54 -54
  13. package/src/ui/ACheckbox/ACheckbox.js +663 -668
  14. package/src/ui/AFieldset/AFieldset.js +254 -248
  15. package/src/ui/AForm/compositionAPI/ModelAPI.js +39 -42
  16. package/src/ui/AGroup/AGroup.js +213 -207
  17. package/src/ui/ALabel/compositionAPI/ClickAPI.js +2 -2
  18. package/src/ui/ARadio/ARadio.js +671 -676
  19. package/src/ui/ASelect/ASelect.js +936 -936
  20. package/src/ui/ASelect/compositionAPI/ModelAPI.js +55 -43
  21. package/src/ui/ASelect/compositionAPI/SelectedTitleAPI.js +52 -51
  22. package/src/utils/__tests__/utilsUi.isModelForFilterNotEmpty.test.js +59 -59
  23. package/src/utils/utilsUi.js +38 -36
  24. package/src/ui/AForm/utils/__test__/AForm.utils.getModelId.test.js +0 -24
  25. package/src/ui/AForm/utils/utils.js +0 -11
@@ -1,83 +1,81 @@
1
- import {
2
- ref,
3
- } from "vue";
4
-
5
- import AlohaExample from "../../../global/components/AlohaExample/AlohaExample.vue";
6
- import AFilters from "../../../../../src/AFilters/AFilters/AFilters";
7
-
8
- import HtmlAPI from "./compositionAPI/HtmlAPI";
9
- import JsAPI from "./compositionAPI/JsAPI";
10
-
11
- export default {
12
- name: "PageFiltersModelId",
13
- components: {
14
- AlohaExample,
15
- AFilters,
16
- },
17
- setup() {
18
- const {
19
- codeHtml,
20
- } = HtmlAPI();
21
-
22
- const {
23
- codeJs,
24
- } = JsAPI();
25
-
26
- const filters = [
27
- {
28
- type: "text",
29
- id: "search",
30
- label: "_A_TABLE_FILTER_SEARCH_",
31
- },
32
- {
33
- type: "checkbox",
34
- id: "aloha1",
35
- modelId: "aloha",
36
- label: "Aloha 1",
37
- alwaysVisible: true,
38
- keyLabel: "label",
39
- keyId: "id",
40
- data: [
41
- {
42
- label: "Aloha 0",
43
- id: "aloha_0",
44
- },
45
- {
46
- label: "Aloha 1",
47
- id: "aloha_1",
48
- },
49
- ],
50
- },
51
- {
52
- type: "checkbox",
53
- id: "aloha2",
54
- modelId: "aloha",
55
- label: "Aloha 2",
56
- alwaysVisible: true,
57
- keyLabel: "label",
58
- keyId: "id",
59
- data: [
60
- {
61
- label: "Aloha 2",
62
- id: "aloha_2",
63
- },
64
- {
65
- label: "Aloha 3",
66
- id: "aloha_3",
67
- },
68
- ],
69
- },
70
- ];
71
-
72
- const appliedModel = ref({});
73
- const unappliedModel = ref({});
74
-
75
- return {
76
- appliedModel,
77
- codeHtml,
78
- codeJs,
79
- filters,
80
- unappliedModel,
81
- };
82
- },
83
- };
1
+ import {
2
+ ref,
3
+ } from "vue";
4
+
5
+ import AlohaExample from "../../../global/components/AlohaExample/AlohaExample.vue";
6
+ import AFilters from "../../../../../src/AFilters/AFilters/AFilters";
7
+
8
+ import HtmlAPI from "./compositionAPI/HtmlAPI";
9
+ import JsAPI from "./compositionAPI/JsAPI";
10
+
11
+ export default {
12
+ name: "PageFiltersModelId",
13
+ components: {
14
+ AlohaExample,
15
+ AFilters,
16
+ },
17
+ setup() {
18
+ const {
19
+ codeHtml,
20
+ } = HtmlAPI();
21
+
22
+ const {
23
+ codeJs,
24
+ } = JsAPI();
25
+
26
+ const filters = [
27
+ {
28
+ type: "text",
29
+ id: "search",
30
+ label: "_A_TABLE_FILTER_SEARCH_",
31
+ },
32
+ {
33
+ type: "checkbox",
34
+ id: "aloha1",
35
+ label: "Aloha 1",
36
+ alwaysVisible: true,
37
+ keyLabel: "label",
38
+ keyId: "id",
39
+ data: [
40
+ {
41
+ label: "Aloha 0",
42
+ id: "aloha_0",
43
+ },
44
+ {
45
+ label: "Aloha 1",
46
+ id: "aloha_1",
47
+ },
48
+ ],
49
+ },
50
+ {
51
+ type: "checkbox",
52
+ id: "aloha2",
53
+ label: "Aloha 2",
54
+ alwaysVisible: true,
55
+ keyLabel: "label",
56
+ keyId: "id",
57
+ data: [
58
+ {
59
+ label: "Aloha 2",
60
+ id: "aloha_2",
61
+ },
62
+ {
63
+ label: "Aloha 3",
64
+ id: "aloha_3",
65
+ },
66
+ ],
67
+ },
68
+ ];
69
+
70
+ const appliedModel = ref({});
71
+ const unappliedModel = ref({});
72
+
73
+ return {
74
+ appliedModel,
75
+ codeHtml,
76
+ codeJs,
77
+ filters,
78
+ unappliedModel,
79
+ };
80
+ },
81
+ };
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.175",
17
+ "version": "1.2.176",
18
18
  "author": {
19
19
  "name": "Ilia Brykin",
20
20
  "email": "brykin.ilia@gmail.com"
@@ -90,13 +90,13 @@ export default {
90
90
  ]),
91
91
  this.filtersVisibleAll.map(filter => {
92
92
  return h(AFilterCenterItem, {
93
- key: filter.modelId || filter.id,
93
+ key: filter.id,
94
94
  id: this.id,
95
95
  disabled: this.disabled,
96
96
  filter,
97
97
  closeFilterValue: this.closeFilterValue,
98
98
  dataKeyByKeyIdPerFilter: this.dataKeyByKeyIdPerFilter,
99
- model: this.appliedModel[filter.modelId || filter.id],
99
+ model: this.appliedModel[filter.id],
100
100
  onUpdateVisibleChildFilters: this.updateVisibleChildFilters,
101
101
  onUpdateLoadingChildFilters: this.updateLoadingChildFilters,
102
102
  }, this.$slots);
@@ -21,7 +21,7 @@ export default function IsDataLoadingAPI(props, { emit }, {
21
21
  return false;
22
22
  }
23
23
  if (typesWithData.value[filter.value.type]) {
24
- return isEmpty(dataKeyByKeyIdPerFilter.value[filter.value.modelId || filter.value.id]);
24
+ return isEmpty(dataKeyByKeyIdPerFilter.value[filter.value.id]);
25
25
  }
26
26
  return false;
27
27
  });
@@ -29,7 +29,7 @@ export default function IsDataLoadingAPI(props, { emit }, {
29
29
  const updateLoadingChildFilters = (newValue, altValue) => {
30
30
  if (newValue !== altValue) {
31
31
  emit("updateLoadingChildFilters", {
32
- id: filter.value.modelId || filter.value.id,
32
+ id: filter.value.id,
33
33
  isLoading: isFilterLoading.value,
34
34
  });
35
35
  }