aloha-vue 1.2.42 → 1.2.44

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 (34) hide show
  1. package/docs/src/components/TheMenu/TheMenu.js +8 -0
  2. package/docs/src/mainTranslation.js +9 -0
  3. package/docs/src/router/index.js +5 -0
  4. package/docs/src/views/PageFiltersRight/PageFiltersRight.js +43 -0
  5. package/docs/src/views/PageFiltersRight/PageFiltersRight.pug +28 -0
  6. package/docs/src/views/PageFiltersRight/PageFiltersRight.vue +2 -0
  7. package/docs/src/views/PageFiltersRight/PageFiltersRightExample/PageFiltersRightExample.js +58 -0
  8. package/docs/src/views/PageFiltersRight/PageFiltersRightExample/PageFiltersRightExample.pug +14 -0
  9. package/docs/src/views/PageFiltersRight/PageFiltersRightExample/PageFiltersRightExample.vue +2 -0
  10. package/docs/src/views/PageFiltersRight/PageFiltersRightExample/compositionAPI/HtmlAPI.js +12 -0
  11. package/docs/src/views/PageFiltersRight/PageFiltersRightExample/compositionAPI/JsAPI.js +49 -0
  12. package/docs/src/views/PageFiltersRight/compositionAPI/EventsAPI.js +13 -0
  13. package/docs/src/views/PageFiltersRight/compositionAPI/ExposesAPI.js +18 -0
  14. package/docs/src/views/PageFiltersRight/compositionAPI/PageTitleAPI.js +24 -0
  15. package/docs/src/views/PageFiltersRight/compositionAPI/PropsAPI.js +106 -0
  16. package/docs/src/views/PageFiltersRight/compositionAPI/SlotsAPI.js +12 -0
  17. package/docs/src/views/PageFiltersRight/i18n/PageFiltersRightI18n.js +19 -0
  18. package/docs/src/views/PageFiltersRight/i18n/ar.json +3 -0
  19. package/docs/src/views/PageFiltersRight/i18n/de.json +3 -0
  20. package/docs/src/views/PageFiltersRight/i18n/en.json +3 -0
  21. package/docs/src/views/PageFiltersRight/i18n/es.json +3 -0
  22. package/docs/src/views/PageFiltersRight/i18n/fr.json +3 -0
  23. package/docs/src/views/PageFiltersRight/i18n/hr.json +3 -0
  24. package/docs/src/views/PageFiltersRight/i18n/it.json +3 -0
  25. package/docs/src/views/PageFiltersRight/i18n/ru.json +3 -0
  26. package/package.json +1 -1
  27. package/src/AFilters/AFilersRight/AFilersRight.js +74 -0
  28. package/src/AFilters/AFilersRight/compositionAPI/IdAPI.js +16 -0
  29. package/src/AFilters/AFilters/AFilters.js +31 -1
  30. package/src/AFilters/AFilters/compositionAPI/FiltersAPI.js +5 -0
  31. package/src/ATable/ATable.js +1 -0
  32. package/src/styles/components/ATable.scss +6 -0
  33. package/src/ui/ARadio/ARadio.js +7 -2
  34. package/src/ui/ARadio/compositionAPI/ChangeAPI.js +58 -0
@@ -129,6 +129,14 @@ export default {
129
129
  },
130
130
  icon: "FilterCircleFill",
131
131
  },
132
+ {
133
+ id: "filtersRight",
134
+ label: "filtersRight",
135
+ to: {
136
+ name: "PageFiltersRight",
137
+ },
138
+ icon: "FilterCircleFill",
139
+ },
132
140
  {
133
141
  id: "dropdown",
134
142
  label: "Dropdown",
@@ -40,6 +40,7 @@ import PageModalWizardI18n from "./views/PageModalWizard/i18n/PageModalWizardI18
40
40
  import PageWizardI18n from "./views/PageWizard/i18n/PageWizardI18n";
41
41
  import PageModalI18n from "./views/PageModal/i18n/PageModalI18n";
42
42
  import PageTablePreviewDownI18n from "./views/PageTable/PageTablePreviewDown/i18n/PageTablePreviewDownI18n";
43
+ import PageFiltersRightI18n from "./views/PageFiltersRight/i18n/PageFiltersRightI18n";
43
44
 
44
45
  export const mainTranslation = {
45
46
  ar: {
@@ -76,6 +77,7 @@ export const mainTranslation = {
76
77
  ...PageWizardI18n.ar,
77
78
  ...PageModalI18n.ar,
78
79
  ...PageTablePreviewDownI18n.ar,
80
+ ...PageFiltersRightI18n.ar,
79
81
  },
80
82
  de: {
81
83
  ...allLanguages.de,
@@ -111,6 +113,7 @@ export const mainTranslation = {
111
113
  ...PageWizardI18n.de,
112
114
  ...PageModalI18n.de,
113
115
  ...PageTablePreviewDownI18n.de,
116
+ ...PageFiltersRightI18n.de,
114
117
  },
115
118
  en: {
116
119
  ...allLanguages.en,
@@ -146,6 +149,7 @@ export const mainTranslation = {
146
149
  ...PageWizardI18n.en,
147
150
  ...PageModalI18n.en,
148
151
  ...PageTablePreviewDownI18n.en,
152
+ ...PageFiltersRightI18n.en,
149
153
  },
150
154
  es: {
151
155
  ...allLanguages.es,
@@ -181,6 +185,7 @@ export const mainTranslation = {
181
185
  ...PageWizardI18n.es,
182
186
  ...PageModalI18n.es,
183
187
  ...PageTablePreviewDownI18n.es,
188
+ ...PageFiltersRightI18n.es,
184
189
  },
185
190
  fr: {
186
191
  ...allLanguages.fr,
@@ -216,6 +221,7 @@ export const mainTranslation = {
216
221
  ...PageWizardI18n.fr,
217
222
  ...PageModalI18n.fr,
218
223
  ...PageTablePreviewDownI18n.fr,
224
+ ...PageFiltersRightI18n.fr,
219
225
  },
220
226
  hr: {
221
227
  ...allLanguages.hr,
@@ -251,6 +257,7 @@ export const mainTranslation = {
251
257
  ...PageWizardI18n.hr,
252
258
  ...PageModalI18n.hr,
253
259
  ...PageTablePreviewDownI18n.hr,
260
+ ...PageFiltersRightI18n.hr,
254
261
  },
255
262
  it: {
256
263
  ...allLanguages.it,
@@ -286,6 +293,7 @@ export const mainTranslation = {
286
293
  ...PageWizardI18n.it,
287
294
  ...PageModalI18n.it,
288
295
  ...PageTablePreviewDownI18n.it,
296
+ ...PageFiltersRightI18n.it,
289
297
  },
290
298
  ru: {
291
299
  ...allLanguages.ru,
@@ -321,5 +329,6 @@ export const mainTranslation = {
321
329
  ...PageWizardI18n.ru,
322
330
  ...PageModalI18n.ru,
323
331
  ...PageTablePreviewDownI18n.ru,
332
+ ...PageFiltersRightI18n.ru,
324
333
  },
325
334
  };
@@ -259,6 +259,11 @@ const ROUTES = [
259
259
  name: "PageFilters",
260
260
  component: () => import(/* webpackChunkName: "PageFilters" */ "../views/PageFilters/PageFilters.vue"),
261
261
  },
262
+ {
263
+ path: "/filters-right",
264
+ name: "PageFiltersRight",
265
+ component: () => import(/* webpackChunkName: "PageFiltersRight" */ "../views/PageFiltersRight/PageFiltersRight.vue"),
266
+ },
262
267
  {
263
268
  path: "/modal-wizard",
264
269
  name: "PageModalWizard",
@@ -0,0 +1,43 @@
1
+ import AlohaPage from "../../global/components/AlohaPage/AlohaPage.vue";
2
+ import AlohaTableProps from "../../global/components/AlohaTableProps/AlohaTableProps.vue";
3
+ import ATranslation from "../../../../src/ATranslation/ATranslation";
4
+ import PageFiltersRightExample from "./PageFiltersRightExample/PageFiltersRightExample.vue";
5
+
6
+ import EventsAPI from "./compositionAPI/EventsAPI";
7
+ import PageTitleAPI from "./compositionAPI/PageTitleAPI";
8
+ import PropsAPI from "./compositionAPI/PropsAPI";
9
+ import SlotsAPI from "./compositionAPI/SlotsAPI";
10
+
11
+ export default {
12
+ name: "PageFiltersRight",
13
+ components: {
14
+ AlohaPage,
15
+ AlohaTableProps,
16
+ ATranslation,
17
+ PageFiltersRightExample,
18
+ },
19
+ setup() {
20
+ const {
21
+ pageTitle,
22
+ } = PageTitleAPI();
23
+
24
+ const {
25
+ dataProps,
26
+ } = PropsAPI();
27
+
28
+ const {
29
+ dataSlots,
30
+ } = SlotsAPI();
31
+
32
+ const {
33
+ dataEvents,
34
+ } = EventsAPI();
35
+
36
+ return {
37
+ dataEvents,
38
+ dataProps,
39
+ dataSlots,
40
+ pageTitle,
41
+ };
42
+ },
43
+ };
@@ -0,0 +1,28 @@
1
+ aloha-page(
2
+ :page-title="pageTitle"
3
+ )
4
+ template(
5
+ v-slot:body
6
+ )
7
+ a-translation(
8
+ tag="p"
9
+ html="_A_FILTERS_RIGHT_COMPONENT_DESCRIPTION_"
10
+ )
11
+
12
+ page-filters-right-example
13
+
14
+ //aloha-table-props(
15
+ // :data="dataProps"
16
+ //)
17
+ //
18
+ //aloha-table-props(
19
+ // table-label="Slots"
20
+ // :data="dataSlots"
21
+ // :columns="['name', 'description']"
22
+ //)
23
+ //
24
+ //aloha-table-props(
25
+ // table-label="Events"
26
+ // :data="dataEvents"
27
+ // :columns="['name', 'type', 'description']"
28
+ //)
@@ -0,0 +1,2 @@
1
+ <template lang="pug" src="./PageFiltersRight.pug"></template>
2
+ <script src="./PageFiltersRight.js"></script>
@@ -0,0 +1,58 @@
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: "PageFiltersRightExample",
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_PAGE_FILTER_SEARCH_",
31
+ main: true,
32
+ },
33
+ {
34
+ type: "text",
35
+ id: "aloha",
36
+ label: "_A_PAGE_FILTER_TEXT_",
37
+ alwaysVisible: true,
38
+ },
39
+ {
40
+ type: "date",
41
+ id: "date",
42
+ label: "_A_PAGE_FILTER_DATE_",
43
+ alwaysVisible: true,
44
+ },
45
+ ];
46
+
47
+ const appliedModel = ref({});
48
+ const unappliedModel = ref({});
49
+
50
+ return {
51
+ appliedModel,
52
+ codeHtml,
53
+ codeJs,
54
+ filters,
55
+ unappliedModel,
56
+ };
57
+ },
58
+ };
@@ -0,0 +1,14 @@
1
+ aloha-example(
2
+ :code-html="codeHtml"
3
+ :code-js="codeJs"
4
+ header="_A_PAGE_FILTERS_HEADER_"
5
+ description="_A_PAGE_FILTERS_DESCRIPTION_"
6
+ :props="['view']"
7
+ )
8
+ div
9
+ a-filters(
10
+ :filters="filters"
11
+ view="right"
12
+ v-model:applied-model="appliedModel"
13
+ v-model:unapplied-model="unappliedModel"
14
+ )
@@ -0,0 +1,2 @@
1
+ <template lang="pug" src="./PageFiltersRightExample.pug"></template>
2
+ <script src="./PageFiltersRightExample.js"></script>
@@ -0,0 +1,12 @@
1
+ export default function HtmlAPI() {
2
+ const codeHtml = `<a-filters
3
+ :filters="filters"
4
+ v-model:applied-model="appliedModel"
5
+ v-model:unapplied-model="unappliedModel"
6
+ >
7
+ </a-filters>`;
8
+
9
+ return {
10
+ codeHtml,
11
+ };
12
+ }
@@ -0,0 +1,49 @@
1
+ export default function JsAPI() {
2
+ const codeJs = `import {
3
+ ref,
4
+ } from "vue";
5
+
6
+ import AFilters from "aloha-vue/src/AFilters/AFilters";
7
+
8
+ export default {
9
+ name: "PageFiltersExample",
10
+ components: {
11
+ AFilters,
12
+ },
13
+ setup() {
14
+ const filters = [
15
+ {
16
+ type: "text",
17
+ id: "search",
18
+ label: "_A_PAGE_FILTER_SEARCH_",
19
+ main: true,
20
+ },
21
+ {
22
+ type: "text",
23
+ id: "aloha",
24
+ label: "_A_PAGE_FILTER_TEXT_",
25
+ alwaysVisible: true,
26
+ },
27
+ {
28
+ type: "date",
29
+ id: "date",
30
+ label: "_A_PAGE_FILTER_DATE_",
31
+ alwaysVisible: true,
32
+ },
33
+ ];
34
+
35
+ const appliedModel = ref({});
36
+ const unappliedModel = ref({});
37
+
38
+ return {
39
+ appliedModel,
40
+ filters,
41
+ unappliedModel,
42
+ };
43
+ },
44
+ };`;
45
+
46
+ return {
47
+ codeJs,
48
+ };
49
+ }
@@ -0,0 +1,13 @@
1
+ export default function EventsAPI() {
2
+ const dataEvents = [
3
+ {
4
+ name: "close",
5
+ description: "_A_ALERT_EVENTS_CLOSE_DESCRIPTION_",
6
+ type: "Function",
7
+ },
8
+ ];
9
+
10
+ return {
11
+ dataEvents,
12
+ };
13
+ }
@@ -0,0 +1,18 @@
1
+ export default function ExposesAPI() {
2
+ const dataExposes = [
3
+ {
4
+ name: "close",
5
+ description: "_A_ALERT_EXPOSES_CLOSE_DESCRIPTION_",
6
+ type: "Function",
7
+ },
8
+ {
9
+ name: "isHidden",
10
+ description: "_A_ALERT_EXPOSES_IS_HIDDEN_DESCRIPTION_",
11
+ type: "Boolean",
12
+ },
13
+ ];
14
+
15
+ return {
16
+ dataExposes,
17
+ };
18
+ }
@@ -0,0 +1,24 @@
1
+ import {
2
+ computed,
3
+ } from "vue";
4
+
5
+ import {
6
+ getTranslatedText,
7
+ } from "../../../../../src/ATranslation/compositionAPI/UtilsAPI";
8
+
9
+
10
+ export default function PageTitleAPI() {
11
+ const componentNameTranslated = computed(() => {
12
+ return getTranslatedText({
13
+ placeholder: "_A_FILTERS_RIGHT_COMPONENT_NAME_",
14
+ });
15
+ });
16
+
17
+ const pageTitle = computed(() => {
18
+ return `AFilters${ componentNameTranslated.value ? ` (${ componentNameTranslated.value })` : "" }`;
19
+ });
20
+
21
+ return {
22
+ pageTitle,
23
+ };
24
+ }
@@ -0,0 +1,106 @@
1
+ export default function PropsAPI() {
2
+ const dataProps = [
3
+ {
4
+ name: "alert-class",
5
+ description: "_A_ALERT_PROPS_ALERT_CLASS_DESCRIPTION_",
6
+ type: "String / Object",
7
+ default: undefined,
8
+ required: false,
9
+ },
10
+ {
11
+ name: "alert-content-class",
12
+ description: "_A_ALERT_PROPS_ALERT_CONTENT_CLASS_DESCRIPTION_",
13
+ type: "String / Object",
14
+ default: undefined,
15
+ required: false,
16
+ },
17
+ {
18
+ name: "btn-close-attributes",
19
+ description: "_A_ALERT_PROPS_BTN_CLOSE_ATTRIBUTES_DESCRIPTION_",
20
+ type: "Object",
21
+ default: "{}",
22
+ required: false,
23
+ },
24
+ {
25
+ name: "closable",
26
+ description: "_A_ALERT_PROPS_CLOSABLE_DESCRIPTION_",
27
+ type: "Boolean",
28
+ default: false,
29
+ required: false,
30
+ },
31
+ {
32
+ name: "show-icon",
33
+ description: "_A_ALERT_PROPS_HAS_ICON_DESCRIPTION_",
34
+ type: "Boolean",
35
+ default: false,
36
+ required: false,
37
+ },
38
+ {
39
+ name: "html",
40
+ description: "_A_ALERT_PROPS_HTML_DESCRIPTION_",
41
+ type: "String",
42
+ default: undefined,
43
+ required: false,
44
+ },
45
+ {
46
+ name: "icon",
47
+ description: "_A_ALERT_PROPS_ICON_DESCRIPTION_",
48
+ type: "String",
49
+ default: undefined,
50
+ required: false,
51
+ },
52
+ {
53
+ name: "icon-class",
54
+ description: "_A_ALERT_PROPS_ICON_CLASS_DESCRIPTION_",
55
+ type: "String",
56
+ default: undefined,
57
+ required: false,
58
+ },
59
+ {
60
+ name: "is-visible",
61
+ description: "_A_ALERT_PROPS_IS_VISIBLE_DESCRIPTION_",
62
+ type: "Boolean",
63
+ default: false,
64
+ required: false,
65
+ },
66
+ {
67
+ name: "removeAlertOnClose",
68
+ description: "_A_ALERT_PROPS_REMOVE_ALERT_ON_CLOSE_DESCRIPTION_",
69
+ type: "Boolean",
70
+ default: false,
71
+ required: false,
72
+ },
73
+ {
74
+ name: "safe-html",
75
+ description: "_A_ALERT_PROPS_SAFE_HTML_DESCRIPTION_",
76
+ type: "String",
77
+ default: undefined,
78
+ required: false,
79
+ },
80
+ {
81
+ name: "text",
82
+ description: "_A_ALERT_PROPS_TEXT_DESCRIPTION_",
83
+ type: "String",
84
+ default: undefined,
85
+ required: false,
86
+ },
87
+ {
88
+ name: "text-close",
89
+ description: "_A_ALERT_PROPS_TEXT_CLOSE_DESCRIPTION_",
90
+ type: "String",
91
+ default: "_ALERT_CLOSE_",
92
+ required: false,
93
+ },
94
+ {
95
+ name: "type",
96
+ description: "_A_ALERT_PROPS_TYPE_DESCRIPTION_",
97
+ type: "String",
98
+ default: "danger",
99
+ required: false,
100
+ },
101
+ ];
102
+
103
+ return {
104
+ dataProps,
105
+ };
106
+ }
@@ -0,0 +1,12 @@
1
+ export default function SlotsAPI() {
2
+ const dataSlots = [
3
+ {
4
+ name: "default",
5
+ description: "_A_ALERT_SLOTS_DEFAULT_DESCRIPTION_",
6
+ },
7
+ ];
8
+
9
+ return {
10
+ dataSlots,
11
+ };
12
+ }
@@ -0,0 +1,19 @@
1
+ import ar from "./ar.json";
2
+ import de from "./de.json";
3
+ import en from "./en.json";
4
+ import es from "./es.json";
5
+ import fr from "./fr.json";
6
+ import hr from "./hr.json";
7
+ import it from "./it.json";
8
+ import ru from "./ru.json";
9
+
10
+ export default {
11
+ ar,
12
+ de,
13
+ en,
14
+ es,
15
+ fr,
16
+ hr,
17
+ it,
18
+ ru,
19
+ };
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.42",
17
+ "version": "1.2.44",
18
18
  "author": {
19
19
  "name": "Ilia Brykin",
20
20
  "email": "brykin.ilia@gmail.com"
@@ -0,0 +1,74 @@
1
+ import {
2
+ h,
3
+ } from "vue";
4
+
5
+ import AFiltersHorizontalFilterUi from "../AFiltersHorizontal/AFiltersHorizontalFilterUi/AFiltersHorizontalFilterUi";
6
+
7
+ import IdAPI from "./compositionAPI/IdAPI";
8
+
9
+ export default {
10
+ name: "AFilersRight",
11
+ props: {
12
+ disabled: {
13
+ type: Boolean,
14
+ required: false,
15
+ },
16
+ filters: {
17
+ type: Array,
18
+ required: false,
19
+ default: () => [],
20
+ },
21
+ filtersKeyById: {
22
+ type: Object,
23
+ required: true,
24
+ },
25
+ appliedModel: {
26
+ type: Object,
27
+ required: true,
28
+ },
29
+ onUpdateModelFilters: {
30
+ type: Function,
31
+ required: true,
32
+ },
33
+ id: {
34
+ type: String,
35
+ required: true,
36
+ },
37
+ updateDataKeyByIdFromFilter: {
38
+ type: Function,
39
+ required: true,
40
+ },
41
+ },
42
+ emits: [
43
+ "startSearch",
44
+ ],
45
+ setup(props) {
46
+ const {
47
+ idFilterRight,
48
+ } = IdAPI(props);
49
+
50
+ return {
51
+ idFilterRight,
52
+ };
53
+ },
54
+ render() {
55
+ return h("div", {
56
+ id: this.idFilterRight,
57
+ class: "a_filters_right",
58
+ }, [
59
+ h("form", {}, [
60
+ this.filters.map(filter => {
61
+ return h(AFiltersHorizontalFilterUi, {
62
+ class: "a_filters_right__filter_ui",
63
+ filter,
64
+ isLabelVisible: true,
65
+ unappliedModel: this.appliedModel,
66
+ updateDataKeyByIdFromFilter: this.updateDataKeyByIdFromFilter,
67
+ onUpdateModelFilters: this.onUpdateModelFilters,
68
+ id: this.id,
69
+ }, this.$slots);
70
+ })
71
+ ]),
72
+ ]);
73
+ },
74
+ };
@@ -0,0 +1,16 @@
1
+ import {
2
+ computed,
3
+ toRef,
4
+ } from "vue";
5
+
6
+ export default function IdAPI(props) {
7
+ const id = toRef(props, "id");
8
+
9
+ const idFilterRight = computed(() => {
10
+ return `${ id.value }_filter_right`;
11
+ });
12
+
13
+ return {
14
+ idFilterRight,
15
+ };
16
+ }
@@ -1,11 +1,13 @@
1
1
  import {
2
2
  h,
3
+ Teleport,
3
4
  toRef,
4
5
  watch,
5
6
  } from "vue";
6
7
 
7
8
  import AFilterCenter from "../AFilterCenter/AFilterCenter";
8
9
  import AFiltersHorizontal from "../AFiltersHorizontal/AFiltersHorizontal";
10
+ import AFilersRight from "../AFilersRight/AFilersRight";
9
11
 
10
12
  import CloseFilterAPI from "./compositionAPI/CloseFilterAPI";
11
13
  import DataKeyByKeyIdAPI from "./compositionAPI/DataKeyByKeyIdAPI";
@@ -59,6 +61,17 @@ export default {
59
61
  required: false,
60
62
  default: undefined,
61
63
  },
64
+ view: {
65
+ type: String,
66
+ required: false,
67
+ default: "top",
68
+ validator: value => ["top", "right"].indexOf(value) !== -1,
69
+ },
70
+ viewRightTeleportSelector: {
71
+ type: String,
72
+ required: false,
73
+ default: undefined,
74
+ },
62
75
  },
63
76
  emits: [
64
77
  "startSearch",
@@ -78,6 +91,7 @@ export default {
78
91
  hasFilters,
79
92
  onUpdateModelFilters,
80
93
  setFiltersVisibleIds,
94
+ updateAppliedModel,
81
95
  } = FiltersAPI(props, context);
82
96
 
83
97
  const {
@@ -136,6 +150,7 @@ export default {
136
150
  toggleFiltersVisible,
137
151
  updateDataKeyByIdFromFilter,
138
152
  updateFiltersSavedLocal,
153
+ updateAppliedModel,
139
154
  };
140
155
  },
141
156
  render() {
@@ -145,7 +160,7 @@ export default {
145
160
  return h(
146
161
  "div",
147
162
  [
148
- h(AFiltersHorizontal, {
163
+ this.view === "top" && h(AFiltersHorizontal, {
149
164
  id: this.id,
150
165
  canSave: this.canSave,
151
166
  disabled: this.disabled,
@@ -160,6 +175,21 @@ export default {
160
175
  onStartSearch: this.startSearch,
161
176
  onToggleFiltersVisible: this.toggleFiltersVisible,
162
177
  }, this.$slots),
178
+ this.view === "right" && h(Teleport, {
179
+ to: this.viewRightTeleportSelector,
180
+ disabled: !this.viewRightTeleportSelector,
181
+ }, [
182
+ h(AFilersRight, {
183
+ id: this.id,
184
+ disabled: this.disabled,
185
+ filters: this.filters,
186
+ filtersKeyById: this.filtersKeyById,
187
+ appliedModel: this.appliedModel,
188
+ onUpdateModelFilters: this.updateAppliedModel,
189
+ updateDataKeyByIdFromFilter: this.updateDataKeyByIdFromFilter,
190
+ onStartSearch: this.startSearch,
191
+ }, this.$slots),
192
+ ]),
163
193
  h(AFilterCenter, {
164
194
  id: this.id,
165
195
  appliedModel: this.appliedModel,
@@ -104,6 +104,10 @@ export default function FiltersAPI(props, { emit }) {
104
104
  }
105
105
  };
106
106
 
107
+ const updateAppliedModel = ({ model }) => {
108
+ emit("update:appliedModel", model);
109
+ };
110
+
107
111
  return {
108
112
  filtersDataKeyById,
109
113
  filtersGroup,
@@ -114,5 +118,6 @@ export default function FiltersAPI(props, { emit }) {
114
118
  hasFilters,
115
119
  onUpdateModelFilters,
116
120
  setFiltersVisibleIds,
121
+ updateAppliedModel,
117
122
  };
118
123
  }
@@ -831,6 +831,7 @@ export default {
831
831
  ]),
832
832
  (!this.isViewTableVisible && this.viewCurrent && this.$slots[this.viewCurrent.type]) &&
833
833
  this.$slots[this.viewCurrent.type]({
834
+ isLoading: this.isLoadingTable,
834
835
  rows: this.rowsLocalAll,
835
836
  }),
836
837
  (this.usePaginationLocal) &&
@@ -680,3 +680,9 @@
680
680
  top: .5rem;
681
681
  }
682
682
  }
683
+
684
+
685
+ // Filters
686
+ .a_filters_right__filter_ui {
687
+ margin-bottom: .5rem;
688
+ }
@@ -12,7 +12,7 @@ import AInput from "../AInput/AInput";
12
12
  import ARadioItem from "./ARadioItem/ARadioItem";
13
13
  import ATranslation from "../../ATranslation/ATranslation";
14
14
 
15
- import ChangeAPI from "../ACheckbox/compositionAPI/ChangeAPI";
15
+ import ChangeAPI from "./compositionAPI/ChangeAPI";
16
16
  import TextAfterLabelAPI from "../ACheckbox/compositionAPI/TextAfterLabelAPI";
17
17
  import UiAPI from "../compositionApi/UiAPI";
18
18
  import UiCollapseAPI from "../compositionApi/UiCollapseAPI";
@@ -148,6 +148,11 @@ export default {
148
148
  required: false,
149
149
  default: true,
150
150
  },
151
+ isModelArray: {
152
+ type: Boolean,
153
+ required: false,
154
+ default: false,
155
+ },
151
156
  isRender: {
152
157
  type: Boolean,
153
158
  required: false,
@@ -216,7 +221,7 @@ export default {
216
221
  default: null,
217
222
  },
218
223
  modelValue: {
219
- type: [String, Number, Boolean],
224
+ type: [String, Number, Boolean, Array],
220
225
  required: false,
221
226
  },
222
227
  options: {
@@ -0,0 +1,58 @@
1
+ import {
2
+ computed,
3
+ toRef,
4
+ } from "vue";
5
+
6
+ import {
7
+ forEach,
8
+ } from "lodash-es";
9
+
10
+ export default function ChangeAPI(props, {
11
+ changeModel = () => {},
12
+ dataKeyByKeyIdLocal = computed(() => ({})),
13
+ }) {
14
+ const disabled = toRef(props, "disabled");
15
+ const isModelArray = toRef(props, "isModelArray");
16
+ const modelValue = toRef(props, "modelValue");
17
+
18
+ const onChangeModelValue = ({ model, $event }) => {
19
+ if (disabled.value) {
20
+ return;
21
+ }
22
+ if (isModelArray.value) {
23
+ if (!modelValue.value || modelValue.value.length === 0) {
24
+ setTimeout(() => {
25
+ changeModel({
26
+ model: [model],
27
+ $event,
28
+ });
29
+ });
30
+ } else {
31
+ setTimeout(() => {
32
+ const MODEL = [];
33
+ forEach(modelValue.value, modelItem => {
34
+ if (!dataKeyByKeyIdLocal.value[modelItem]) {
35
+ MODEL.push(modelItem);
36
+ }
37
+ });
38
+ MODEL.push(model);
39
+ changeModel({
40
+ model: MODEL,
41
+ $event,
42
+ });
43
+ });
44
+ }
45
+ } else {
46
+ setTimeout(() => {
47
+ changeModel({
48
+ model,
49
+ $event,
50
+ });
51
+ });
52
+ }
53
+ };
54
+
55
+ return {
56
+ onChangeModelValue,
57
+ };
58
+ }