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.
- package/docs/src/views/PageFilters/PageFiltersModelId/PageFiltersModelId.js +81 -83
- package/package.json +1 -1
- package/src/AFilters/AFilterCenter/AFilterCenter.js +2 -2
- package/src/AFilters/AFilterCenter/AFilterCenterItem/compositionAPI/IsDataLoadingAPI.js +2 -2
- package/src/AFilters/AFilters/AFilters.js +255 -254
- package/src/AFilters/AFilters/compositionAPI/CloseFilterAPI.js +124 -124
- package/src/AFilters/AFilters/compositionAPI/FiltersAPI.js +6 -24
- package/src/AFilters/AFilters/compositionAPI/ToggleAPI.js +47 -33
- package/src/AFilters/AFiltersHorizontal/AFiltersHorizontal.js +1 -0
- package/src/AFilters/AFiltersHorizontal/AFiltersHorizontalFilterUi/AFiltersHorizontalFilterUi.js +94 -94
- package/src/AFilters/AFiltersHorizontal/AFiltersHorizontalFilterUi/compositionAPI/ModelAPI.js +30 -30
- package/src/AFilters/AFiltersHorizontal/compositionAPI/FiltersHiddenAPI.js +54 -54
- package/src/ui/ACheckbox/ACheckbox.js +663 -668
- package/src/ui/AFieldset/AFieldset.js +254 -248
- package/src/ui/AForm/compositionAPI/ModelAPI.js +39 -42
- package/src/ui/AGroup/AGroup.js +213 -207
- package/src/ui/ALabel/compositionAPI/ClickAPI.js +2 -2
- package/src/ui/ARadio/ARadio.js +671 -676
- package/src/ui/ASelect/ASelect.js +936 -936
- package/src/ui/ASelect/compositionAPI/ModelAPI.js +55 -43
- package/src/ui/ASelect/compositionAPI/SelectedTitleAPI.js +52 -51
- package/src/utils/__tests__/utilsUi.isModelForFilterNotEmpty.test.js +59 -59
- package/src/utils/utilsUi.js +38 -36
- package/src/ui/AForm/utils/__test__/AForm.utils.getModelId.test.js +0 -24
- 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
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
@@ -90,13 +90,13 @@ export default {
|
|
|
90
90
|
]),
|
|
91
91
|
this.filtersVisibleAll.map(filter => {
|
|
92
92
|
return h(AFilterCenterItem, {
|
|
93
|
-
key: filter.
|
|
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.
|
|
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.
|
|
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.
|
|
32
|
+
id: filter.value.id,
|
|
33
33
|
isLoading: isFilterLoading.value,
|
|
34
34
|
});
|
|
35
35
|
}
|