aloha-vue 2.74.0 → 2.75.0

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 (166) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE +22 -21
  3. package/dist/aloha-vue.css +13594 -13594
  4. package/dist/aloha-vue.css.map +1 -1
  5. package/dist/aloha-vue.es.js +59266 -64918
  6. package/dist/aloha-vue.umd.js +338 -211
  7. package/package.json +27 -34
  8. package/scss/components/ATable.scss +2 -2
  9. package/scss/utils/button.scss +362 -362
  10. package/scss/utils/funktions.scss +162 -162
  11. package/src/AAccordion/AAccordionItem/AAccordionItem.js +235 -230
  12. package/src/ACarousel/ACarousel.js +7 -2
  13. package/src/ADropdown/ADropdown.js +4 -1
  14. package/src/AFilters/AFilterCenter/AFilterCenter.js +5 -1
  15. package/src/AFilters/AFilterCenter/AFilterCenterItem/AFilterCenterItem.js +7 -2
  16. package/src/AFilters/AFiltersHorizontal/AFiltersHorizontal.js +412 -396
  17. package/src/AFilters/AFiltersHorizontal/AFiltersHorizontalFilter/AFiltersHorizontalFilter.js +102 -99
  18. package/src/AFilters/AFiltersHorizontal/compositionAPI/FiltersSavedDeleteAPI.js +108 -108
  19. package/src/AFilters/AFiltersMain/AFiltersMain.js +114 -111
  20. package/src/AFilters/AFiltersSaveModal/compositionAPI/SaveAPI.js +65 -65
  21. package/src/ALinkCopy/ALinkCopy.js +98 -95
  22. package/src/ALinkCopy/compositionAPI/CopyAPI.js +48 -48
  23. package/src/AList/__tests__/AList.test.js +33 -33
  24. package/src/AList/compositionAPI/__tests__/TagAPI.test.js +43 -43
  25. package/src/AMenu/AMenu.js +4 -1
  26. package/src/AMenu/AMenuBreadcrumbs/AMenuBreadcrumbs.js +240 -237
  27. package/src/AMenu/AMenuPanelLink/AMenuPanelLink.js +4 -1
  28. package/src/AMenu/AMenuSearchPanelBreadcrumbs/AMenuSearchPanelBreadcrumbs.js +122 -119
  29. package/src/AModalWizard/AModalWizard.js +58 -53
  30. package/src/AModalWizard/compositionAPI/__tests__/ScrollAPI.test.js +46 -46
  31. package/src/APagination/APaginationPages/APaginationPages.js +15 -4
  32. package/src/ARate/ARate.js +254 -249
  33. package/src/ARate/ARateIcon/ADecimalIcon/ADecimalIcon.js +53 -50
  34. package/src/ARate/ARateIcon/ARateIcon.js +109 -104
  35. package/src/AResizer/AResizer.js +167 -162
  36. package/src/ATable/ATableHeaderTh/compositionAPI/SortAPI.js +172 -167
  37. package/src/ATable/ATableHeaderThAction/ATableHeaderThAction.js +14 -4
  38. package/src/ATable/ATableHeaderThAction/ATableHeaderThActionItem/ATableHeaderThActionItem.js +191 -184
  39. package/src/ATable/ATablePreviewDown/ATablePreviewDown.js +72 -69
  40. package/src/ATable/ATablePreviewRight/ATablePreviewRight.js +265 -258
  41. package/src/ATable/ATableSortingAdditional/ATableSortingAdditional.js +224 -219
  42. package/src/ATable/ATableSortingAdditional/__tests__/ATableSortingAdditional.AttributesAPI.test.js +39 -39
  43. package/src/ATable/ATableSortingAdditional/__tests__/ATableSortingAdditional.ColumnsAPI.test.js +68 -68
  44. package/src/ATable/ATableSortingAdditional/__tests__/ATableSortingAdditional.DropdownAPI.test.js +45 -45
  45. package/src/ATable/ATableSortingAdditional/__tests__/ATableSortingAdditional.FormAPI.test.js +95 -95
  46. package/src/ATable/ATableSortingAdditional/__tests__/ATableSortingAdditional.ModelAPI.test.js +1 -1
  47. package/src/ATable/ATableTd/ATableTd.js +4 -1
  48. package/src/ATable/ATableTdAction/ATableTdAction.js +19 -12
  49. package/src/ATable/ATableTopPanel/ATableTopPanel.js +11 -3
  50. package/src/ATable/ATableTr/ATableTr.js +408 -405
  51. package/src/ATable/__tests__/ATable.HeaderSlot.test.js +102 -97
  52. package/src/ATable/__tests__/ATable.RowIdsAPI.test.js +66 -66
  53. package/src/ATableForm/ATableForm.js +88 -85
  54. package/src/ATableForm/ATableFormCellAction/ATableFormCellAction.js +14 -4
  55. package/src/ATableForm/ATableFormCellDnd/ATableFormCellDnd.js +196 -187
  56. package/src/ATableForm/ATableFormRow/compositionAPI/EditAPI.js +104 -104
  57. package/src/ATableForm/__tests__/ATableForm.DragAndDropAPI.test.js +200 -212
  58. package/src/ATableForm/__tests__/ATableForm.ListView.test.js +134 -174
  59. package/src/ATableForm/compositionAPI/IconsAPI.js +24 -21
  60. package/src/AVerticalScroll/AVerticalScroll.js +182 -177
  61. package/src/AWizard/AWizard.js +26 -21
  62. package/src/AWizard/AWizardStep/AWizardStep.js +275 -270
  63. package/src/AWizard/compositionAPI/__tests__/ChangeStepAPI.test.js +32 -32
  64. package/src/AWizard/compositionAPI/__tests__/LocalAPI.test.js +55 -55
  65. package/src/PuxDatepicker/PuxDatepickerCalendarPanel/PuxDatepickerCalendarPanel.js +646 -648
  66. package/src/PuxDatepicker/panel/PanelDate/PanelDate.js +300 -301
  67. package/src/PuxDatepicker/panel/PanelMonth/PanelMonth.js +148 -149
  68. package/src/PuxDatepicker/panel/PanelTime/PanelTime.js +256 -257
  69. package/src/PuxDatepicker/panel/PanelYear/PanelYear.js +136 -137
  70. package/src/PuxDatepicker/utils/index.js +100 -100
  71. package/src/compositionAPI/AHttpAPI.js +593 -593
  72. package/src/compositionAPI/__tests__/AHttpAPI.test.js +42 -42
  73. package/src/filters/__tests__/filterBoolean.test.js +38 -38
  74. package/src/filters/__tests__/filterCapitalize.test.js +38 -38
  75. package/src/filters/__tests__/filterCurrency.test.js +21 -21
  76. package/src/filters/__tests__/filterDate.test.js +42 -42
  77. package/src/filters/__tests__/filterDefaultForEmpty.test.js +24 -24
  78. package/src/filters/__tests__/filterEmail.test.js +42 -42
  79. package/src/filters/__tests__/filterEscapeHtml.test.js +45 -45
  80. package/src/filters/__tests__/filterFileSize.test.js +45 -45
  81. package/src/filters/__tests__/filterFloat.test.js +74 -74
  82. package/src/filters/__tests__/filterJson.test.js +74 -74
  83. package/src/filters/__tests__/filterKeyValue.test.js +50 -50
  84. package/src/filters/__tests__/filterLimitTo.test.js +39 -39
  85. package/src/filters/__tests__/filterLink.test.js +41 -41
  86. package/src/filters/__tests__/filterList.test.js +149 -149
  87. package/src/filters/__tests__/filterLowerCase.test.js +38 -38
  88. package/src/filters/__tests__/filterMask.test.js +80 -80
  89. package/src/filters/__tests__/filterPropertyByValue.test.js +27 -27
  90. package/src/filters/__tests__/filterSearchHighlight.test.js +129 -129
  91. package/src/filters/__tests__/filterUpperCase.test.js +38 -38
  92. package/src/filters/__tests__/filterValueByCondition.test.js +3 -3
  93. package/src/filters/filterJson.js +39 -39
  94. package/src/filters/filterValueByCondition.js +2 -2
  95. package/src/plugins/AAlertPlugin.js +16 -5
  96. package/src/plugins/AMultiselectOrderedPlugin.js +88 -81
  97. package/src/plugins/ASelectPlugin.js +12 -10
  98. package/src/ui/ACheckbox/ACheckbox.js +82 -79
  99. package/src/ui/ADatepicker/compositionAPI/EventsAPI.js +297 -297
  100. package/src/ui/ADatepicker/utils/index.js +76 -76
  101. package/src/ui/ADatepickerAlt/ADatepicker.js +912 -912
  102. package/src/ui/ADatepickerAlt/utils/index.js +98 -98
  103. package/src/ui/AFieldset/__tests__/AFieldset.ClassColumn.test.js +113 -114
  104. package/src/ui/AFormElementBtnClear/AFormElementBtnClear.js +4 -1
  105. package/src/ui/AInputCurrency/AInputCurrency.js +20 -15
  106. package/src/ui/AInputCurrency/__tests__/AInputCurrency.ModelAPI.test.js +73 -73
  107. package/src/ui/AInputNumber/AInputNumber.js +17 -12
  108. package/src/ui/AJson/AJson.js +12 -3
  109. package/src/ui/AJson/compositionAPI/JsonAPI.js +116 -116
  110. package/src/ui/ALabel/__tests__/ALabel.IdAPI.test.js +42 -42
  111. package/src/ui/ALabel/__tests__/ALabel.LabelAPI.test.js +33 -33
  112. package/src/ui/ARadio/ARadio.js +80 -77
  113. package/src/ui/ASelect/ASelect.js +390 -383
  114. package/src/ui/ASelect/ASelectElement/ASelectElement.js +179 -176
  115. package/src/ui/ASelect/ASelectValueCloseable/ASelectValueCloseable.js +143 -141
  116. package/src/ui/ASelect/__tests__/SelectedFirstAPI.test.js +101 -101
  117. package/src/ui/ASelect/__tests__/SelectedVisibleAPI.test.js +98 -98
  118. package/src/ui/ASlider/compositionAPI/SliderAPI.js +23 -23
  119. package/src/ui/AValidatedJson/AValidatedJson.js +4 -1
  120. package/src/ui/AValidatedJson/AValidatedJsonItem/AValidatedJsonItem.js +308 -298
  121. package/src/ui/compositionApi/UiCollapseAPI.js +68 -63
  122. package/src/ui/compositionApi/UiInputAutofillAPI.js +41 -41
  123. package/src/ui/compositionApi/__tests__/UIDataGroupAPI.test.js +106 -106
  124. package/src/ui/compositionApi/__tests__/UIExcludeRenderAttributesAPI.test.js +39 -39
  125. package/src/ui/compositionApi/__tests__/UiDataWithKeyIdAndLabelAPI.test.js +128 -128
  126. package/src/ui/compositionApi/__tests__/UiSearchAPI.test.js +71 -71
  127. package/src/utils/EventBus.js +51 -8
  128. package/src/utils/__tests__/EventBus.test.js +138 -0
  129. package/src/utils/__tests__/utils.aOrderBy.test.js +1 -1
  130. package/src/utils/__tests__/utils.aSortBy.test.js +1 -1
  131. package/src/utils/__tests__/utils.getTotalNestedCount.test.js +56 -56
  132. package/src/utils/__tests__/utils.isArrayOfArrays.test.js +44 -44
  133. package/src/utils/__tests__/utils.isArrayOfStrings.test.js +36 -36
  134. package/src/utils/__tests__/utilsArray.aFirst.test.js +1 -1
  135. package/src/utils/__tests__/utilsArray.aLast.test.js +1 -1
  136. package/src/utils/__tests__/utilsLang.isArguments.test.js +1 -1
  137. package/src/utils/__tests__/utilsLang.isArray.test.js +1 -1
  138. package/src/utils/__tests__/utilsLang.isArrayBuffer.test.js +1 -1
  139. package/src/utils/__tests__/utilsLang.isBoolean.test.js +1 -1
  140. package/src/utils/__tests__/utilsLang.isBuffer.test.js +1 -1
  141. package/src/utils/__tests__/utilsLang.isDate.test.js +1 -1
  142. package/src/utils/__tests__/utilsLang.isElement.test.js +5 -3
  143. package/src/utils/__tests__/utilsLang.isError.test.js +1 -1
  144. package/src/utils/__tests__/utilsLang.isFinite.test.js +1 -1
  145. package/src/utils/__tests__/utilsLang.isFunction.test.js +1 -1
  146. package/src/utils/__tests__/utilsLang.isInteger.test.js +1 -1
  147. package/src/utils/__tests__/utilsLang.isMap.test.js +1 -1
  148. package/src/utils/__tests__/utilsLang.isNaN.test.js +1 -1
  149. package/src/utils/__tests__/utilsLang.isNil.test.js +1 -1
  150. package/src/utils/__tests__/utilsLang.isNull.test.js +1 -1
  151. package/src/utils/__tests__/utilsLang.isNumber.test.js +1 -1
  152. package/src/utils/__tests__/utilsLang.isObject.test.js +1 -1
  153. package/src/utils/__tests__/utilsLang.isObjectLike.test.js +5 -3
  154. package/src/utils/__tests__/utilsLang.isPlainObject.test.js +3 -2
  155. package/src/utils/__tests__/utilsLang.isPromise.test.js +5 -2
  156. package/src/utils/__tests__/utilsLang.isRegExp.test.js +1 -1
  157. package/src/utils/__tests__/utilsLang.isSet.test.js +1 -1
  158. package/src/utils/__tests__/utilsLang.isString.test.js +1 -1
  159. package/src/utils/__tests__/utilsLang.isSymbol.test.js +5 -3
  160. package/src/utils/__tests__/utilsLang.isUndefined.test.js +1 -1
  161. package/src/utils/__tests__/utilsLang.isWeakMap.test.js +1 -1
  162. package/src/utils/__tests__/utilsLang.isWeakSet.test.js +1 -1
  163. package/src/utils/__tests__/utilsMath.isEven.test.js +43 -43
  164. package/src/utils/__tests__/utilsMath.isOdd.test.js +43 -43
  165. package/src/utils/__tests__/utilsUi.isModelForFilterNotEmpty.test.js +65 -65
  166. package/src/utils/autosize.js +1 -1
@@ -1,176 +1,179 @@
1
- import {
2
- h,
3
- withDirectives,
4
- } from "vue";
5
-
6
- import AIcon from "../../../AIcon/AIcon";
7
-
8
- import CheckedAPI from "./compositionAPI/CheckedAPI";
9
- import EventsAPI from "./compositionAPI/EventsAPI";
10
- import UiCheckboxRadioItemAPI from "../../compositionApi/UiCheckboxRadioItemAPI";
11
- import UiDisabledElementAPI from "../../compositionApi/UiDisabledElementAPI";
12
- import UiVisibleElementWithSearchAPI from "../../compositionApi/UiVisibleElementWithSearchAPI";
13
-
14
- import ASafeHtml from "../../../directives/ASafeHtml";
15
- import CheckLg from "aloha-svg/dist/js/bootstrap/CheckLg";
16
-
17
- export default {
18
- name: "ASelectElement",
19
- props: {
20
- alwaysTranslate: {
21
- type: Boolean,
22
- required: false,
23
- },
24
- dataItem: {
25
- type: Object,
26
- required: true,
27
- },
28
- disabled: {
29
- type: Boolean,
30
- required: false,
31
- },
32
- id: {
33
- type: String,
34
- required: true,
35
- },
36
- isHiddenWithSearch: {
37
- type: Boolean,
38
- required: false,
39
- },
40
- itemIndex: {
41
- type: Number,
42
- required: true,
43
- },
44
- keyDisabled: {
45
- type: String,
46
- required: false,
47
- default: undefined,
48
- },
49
- keyDisabledCallback: {
50
- type: Function,
51
- required: false,
52
- default: undefined,
53
- },
54
- modelSearch: {
55
- type: String,
56
- required: false,
57
- default: undefined,
58
- },
59
- modelValue: {
60
- type: [String, Number, Boolean, Array],
61
- required: false,
62
- },
63
- searching: {
64
- type: Boolean,
65
- required: false,
66
- },
67
- searchingElements: {
68
- type: Object,
69
- required: true,
70
- },
71
- searchTextInHtml: {
72
- type: Boolean,
73
- required: false,
74
- },
75
- showElementWennGroupFound: {
76
- type: Boolean,
77
- required: false,
78
- },
79
- slotName: {
80
- type: String,
81
- required: false,
82
- default: undefined,
83
- },
84
- type: {
85
- type: String,
86
- required: true,
87
- },
88
- },
89
- emits: [
90
- "changeModelValue",
91
- ],
92
- setup(props, context) {
93
- const {
94
- idLocal,
95
- labelLocal,
96
- valueLocal,
97
- } = UiCheckboxRadioItemAPI(props);
98
-
99
- const {
100
- isChecked,
101
- } = CheckedAPI(props, {
102
- valueLocal,
103
- });
104
-
105
- const {
106
- disabledElement,
107
- } = UiDisabledElementAPI(props);
108
-
109
- const {
110
- onClick,
111
- onKeydown,
112
- } = EventsAPI(props, context, {
113
- disabledElement,
114
- isChecked,
115
- valueLocal,
116
- });
117
-
118
- const {
119
- currentLabelFiltered,
120
- dataHideWithSearch,
121
- styleWithSearch,
122
- } = UiVisibleElementWithSearchAPI(props, {
123
- labelLocal,
124
- valueLocal,
125
- });
126
-
127
- return {
128
- currentLabelFiltered,
129
- dataHideWithSearch,
130
- disabledElement,
131
- idLocal,
132
- isChecked,
133
- labelLocal,
134
- onClick,
135
- onKeydown,
136
- styleWithSearch,
137
- };
138
- },
139
- render() {
140
- return h("div", {
141
- ariaSelected: this.isChecked,
142
- class: ["a_select__menu__link a_select__element_clickable", {
143
- a_select__menu__link_invalid: this.dataItem.__invalidEntry__,
144
- a_select__menu__link_selected: this.isChecked,
145
- a_select__menu__link_disabled: this.disabledElement,
146
- }],
147
- "data-hide": this.dataHideWithSearch,
148
- disabled: this.disabledElement,
149
- role: "option",
150
- style: this.styleWithSearch,
151
- tabindex: "-1",
152
- onClick: this.onClick,
153
- onKeydown: this.onKeydown,
154
- }, [
155
- h("span", {
156
- class: "a_select__menu__link__icon_box",
157
- }, [
158
- this.isChecked && h(AIcon, {
159
- icon: CheckLg,
160
- }),
161
- ]),
162
- this.slotName && this.$slots[this.slotName] ?
163
- this.$slots[this.slotName]({
164
- id: this.id,
165
- item: this.dataItem,
166
- itemIndex: this.itemIndex,
167
- label: this.labelLocal,
168
- labelFiltered: this.currentLabelFiltered,
169
- inDropdown: true,
170
- }) :
171
- withDirectives(h("span"), [
172
- [ASafeHtml, this.currentLabelFiltered],
173
- ]),
174
- ]);
175
- },
176
- };
1
+ import {
2
+ h,
3
+ withDirectives,
4
+ } from "vue";
5
+
6
+ import AIcon from "../../../AIcon/AIcon";
7
+
8
+ import CheckedAPI from "./compositionAPI/CheckedAPI";
9
+ import EventsAPI from "./compositionAPI/EventsAPI";
10
+ import UiCheckboxRadioItemAPI from "../../compositionApi/UiCheckboxRadioItemAPI";
11
+ import UiDisabledElementAPI from "../../compositionApi/UiDisabledElementAPI";
12
+ import UiVisibleElementWithSearchAPI from "../../compositionApi/UiVisibleElementWithSearchAPI";
13
+
14
+ import ASafeHtml from "../../../directives/ASafeHtml";
15
+
16
+ const CheckLg = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-check-lg" viewBox="0 0 16 16">
17
+ <path d="M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06.733.733 0 0 1 1.047 0l3.052 3.093 5.4-6.425z"/>
18
+ </svg>`;
19
+
20
+ export default {
21
+ name: "ASelectElement",
22
+ props: {
23
+ alwaysTranslate: {
24
+ type: Boolean,
25
+ required: false,
26
+ },
27
+ dataItem: {
28
+ type: Object,
29
+ required: true,
30
+ },
31
+ disabled: {
32
+ type: Boolean,
33
+ required: false,
34
+ },
35
+ id: {
36
+ type: String,
37
+ required: true,
38
+ },
39
+ isHiddenWithSearch: {
40
+ type: Boolean,
41
+ required: false,
42
+ },
43
+ itemIndex: {
44
+ type: Number,
45
+ required: true,
46
+ },
47
+ keyDisabled: {
48
+ type: String,
49
+ required: false,
50
+ default: undefined,
51
+ },
52
+ keyDisabledCallback: {
53
+ type: Function,
54
+ required: false,
55
+ default: undefined,
56
+ },
57
+ modelSearch: {
58
+ type: String,
59
+ required: false,
60
+ default: undefined,
61
+ },
62
+ modelValue: {
63
+ type: [String, Number, Boolean, Array],
64
+ required: false,
65
+ },
66
+ searching: {
67
+ type: Boolean,
68
+ required: false,
69
+ },
70
+ searchingElements: {
71
+ type: Object,
72
+ required: true,
73
+ },
74
+ searchTextInHtml: {
75
+ type: Boolean,
76
+ required: false,
77
+ },
78
+ showElementWennGroupFound: {
79
+ type: Boolean,
80
+ required: false,
81
+ },
82
+ slotName: {
83
+ type: String,
84
+ required: false,
85
+ default: undefined,
86
+ },
87
+ type: {
88
+ type: String,
89
+ required: true,
90
+ },
91
+ },
92
+ emits: [
93
+ "changeModelValue",
94
+ ],
95
+ setup(props, context) {
96
+ const {
97
+ idLocal,
98
+ labelLocal,
99
+ valueLocal,
100
+ } = UiCheckboxRadioItemAPI(props);
101
+
102
+ const {
103
+ isChecked,
104
+ } = CheckedAPI(props, {
105
+ valueLocal,
106
+ });
107
+
108
+ const {
109
+ disabledElement,
110
+ } = UiDisabledElementAPI(props);
111
+
112
+ const {
113
+ onClick,
114
+ onKeydown,
115
+ } = EventsAPI(props, context, {
116
+ disabledElement,
117
+ isChecked,
118
+ valueLocal,
119
+ });
120
+
121
+ const {
122
+ currentLabelFiltered,
123
+ dataHideWithSearch,
124
+ styleWithSearch,
125
+ } = UiVisibleElementWithSearchAPI(props, {
126
+ labelLocal,
127
+ valueLocal,
128
+ });
129
+
130
+ return {
131
+ currentLabelFiltered,
132
+ dataHideWithSearch,
133
+ disabledElement,
134
+ idLocal,
135
+ isChecked,
136
+ labelLocal,
137
+ onClick,
138
+ onKeydown,
139
+ styleWithSearch,
140
+ };
141
+ },
142
+ render() {
143
+ return h("div", {
144
+ ariaSelected: this.isChecked,
145
+ class: ["a_select__menu__link a_select__element_clickable", {
146
+ a_select__menu__link_invalid: this.dataItem.__invalidEntry__,
147
+ a_select__menu__link_selected: this.isChecked,
148
+ a_select__menu__link_disabled: this.disabledElement,
149
+ }],
150
+ "data-hide": this.dataHideWithSearch,
151
+ disabled: this.disabledElement,
152
+ role: "option",
153
+ style: this.styleWithSearch,
154
+ tabindex: "-1",
155
+ onClick: this.onClick,
156
+ onKeydown: this.onKeydown,
157
+ }, [
158
+ h("span", {
159
+ class: "a_select__menu__link__icon_box",
160
+ }, [
161
+ this.isChecked && h(AIcon, {
162
+ icon: CheckLg,
163
+ }),
164
+ ]),
165
+ this.slotName && this.$slots[this.slotName] ?
166
+ this.$slots[this.slotName]({
167
+ id: this.id,
168
+ item: this.dataItem,
169
+ itemIndex: this.itemIndex,
170
+ label: this.labelLocal,
171
+ labelFiltered: this.currentLabelFiltered,
172
+ inDropdown: true,
173
+ }) :
174
+ withDirectives(h("span"), [
175
+ [ASafeHtml, this.currentLabelFiltered],
176
+ ]),
177
+ ]);
178
+ },
179
+ };
@@ -1,141 +1,143 @@
1
- import {
2
- h,
3
- } from "vue";
4
- import {
5
- AElement,
6
- ATranslation,
7
- } from "../../../index";
8
-
9
- import CloseAPI from "./compositionAPI/CloseAPI";
10
- import GroupAPI from "./compositionAPI/GroupAPI";
11
- import LabelAPI from "./compositionAPI/LabelAPI";
12
-
13
- import XLg from "aloha-svg/dist/js/bootstrap/XLg";
14
-
15
-
16
- export default {
17
- name: "ASelectValueCloseable",
18
- props: {
19
- alwaysTranslate: {
20
- type: Boolean,
21
- required: false,
22
- },
23
- data: {
24
- type: Object,
25
- required: true,
26
- },
27
- disabled: {
28
- type: Boolean,
29
- required: false,
30
- },
31
- hideDeleteButton: {
32
- type: Boolean,
33
- required: false,
34
- default: false,
35
- },
36
- keyGroup: {
37
- type: [String, Number, Array],
38
- required: false,
39
- default: undefined,
40
- },
41
- keyGroupLabelCallback: {
42
- type: Function,
43
- required: false,
44
- default: undefined,
45
- },
46
- labelNotFound: {
47
- type: String,
48
- required: false,
49
- default: undefined,
50
- },
51
- mode: {
52
- type: String,
53
- default: "default",
54
- validator: value => ["default", "one_per_group"].includes(value),
55
- },
56
- showNotFound: {
57
- type: Boolean,
58
- required: false,
59
- default: false,
60
- },
61
- slotName: {
62
- type: String,
63
- required: false,
64
- default: undefined,
65
- },
66
- translateGroup: {
67
- type: Boolean,
68
- required: false,
69
- default: false,
70
- },
71
- },
72
- emits: [
73
- "changeModelValue",
74
- ],
75
- setup(props, context) {
76
- const {
77
- currentLabel,
78
- } = LabelAPI(props);
79
-
80
- const {
81
- closeModel,
82
- } = CloseAPI(props, context);
83
-
84
- const {
85
- groupLabel,
86
- } = GroupAPI(props);
87
-
88
- return {
89
- closeModel,
90
- currentLabel,
91
- groupLabel,
92
- };
93
- },
94
- render() {
95
- return h("li", {
96
- class: [
97
- "a_select__ul_closeable__item",
98
- {
99
- a_select__ul_closeable__item_invalid: this.data.__invalidEntry__,
100
- },
101
- ],
102
- }, [
103
- this.slotName && this.$slots[this.slotName] ?
104
- this.$slots[this.slotName]({
105
- item: this.data,
106
- label: this.currentLabel,
107
- inDropdown: false,
108
- }) :
109
- h("span", [
110
- this.groupLabel ?
111
- h(ATranslation, {
112
- alwaysTranslate: this.alwaysTranslate,
113
- tag: "span",
114
- html: this.groupLabel,
115
- extra: this.data.extra,
116
- textAfter: ":&nbsp;",
117
- }) :
118
- "",
119
- h(ATranslation, {
120
- alwaysTranslate: this.alwaysTranslate,
121
- tag: "span",
122
- html: this.currentLabel,
123
- extra: this.data.extra,
124
- }),
125
- ]),
126
-
127
- !this.hideDeleteButton && !this.disabled ?
128
- h(AElement, {
129
- class: "a_btn a_btn_link a_select__ul_closeable__item__btn",
130
- disabled: this.disabled,
131
- iconLeft: XLg,
132
- prevent: true,
133
- stop: true,
134
- tabindex: -1,
135
- type: "button",
136
- onClick: this.closeModel,
137
- }) :
138
- "",
139
- ]);
140
- },
141
- };
1
+ import {
2
+ h,
3
+ } from "vue";
4
+ import {
5
+ AElement,
6
+ ATranslation,
7
+ } from "../../../index";
8
+
9
+ import CloseAPI from "./compositionAPI/CloseAPI";
10
+ import GroupAPI from "./compositionAPI/GroupAPI";
11
+ import LabelAPI from "./compositionAPI/LabelAPI";
12
+
13
+ const XLg = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16">
14
+ <path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8z"/>
15
+ </svg>`;
16
+
17
+
18
+ export default {
19
+ name: "ASelectValueCloseable",
20
+ props: {
21
+ alwaysTranslate: {
22
+ type: Boolean,
23
+ required: false,
24
+ },
25
+ data: {
26
+ type: Object,
27
+ required: true,
28
+ },
29
+ disabled: {
30
+ type: Boolean,
31
+ required: false,
32
+ },
33
+ hideDeleteButton: {
34
+ type: Boolean,
35
+ required: false,
36
+ default: false,
37
+ },
38
+ keyGroup: {
39
+ type: [String, Number, Array],
40
+ required: false,
41
+ default: undefined,
42
+ },
43
+ keyGroupLabelCallback: {
44
+ type: Function,
45
+ required: false,
46
+ default: undefined,
47
+ },
48
+ labelNotFound: {
49
+ type: String,
50
+ required: false,
51
+ default: undefined,
52
+ },
53
+ mode: {
54
+ type: String,
55
+ default: "default",
56
+ validator: value => ["default", "one_per_group"].includes(value),
57
+ },
58
+ showNotFound: {
59
+ type: Boolean,
60
+ required: false,
61
+ default: false,
62
+ },
63
+ slotName: {
64
+ type: String,
65
+ required: false,
66
+ default: undefined,
67
+ },
68
+ translateGroup: {
69
+ type: Boolean,
70
+ required: false,
71
+ default: false,
72
+ },
73
+ },
74
+ emits: [
75
+ "changeModelValue",
76
+ ],
77
+ setup(props, context) {
78
+ const {
79
+ currentLabel,
80
+ } = LabelAPI(props);
81
+
82
+ const {
83
+ closeModel,
84
+ } = CloseAPI(props, context);
85
+
86
+ const {
87
+ groupLabel,
88
+ } = GroupAPI(props);
89
+
90
+ return {
91
+ closeModel,
92
+ currentLabel,
93
+ groupLabel,
94
+ };
95
+ },
96
+ render() {
97
+ return h("li", {
98
+ class: [
99
+ "a_select__ul_closeable__item",
100
+ {
101
+ a_select__ul_closeable__item_invalid: this.data.__invalidEntry__,
102
+ },
103
+ ],
104
+ }, [
105
+ this.slotName && this.$slots[this.slotName] ?
106
+ this.$slots[this.slotName]({
107
+ item: this.data,
108
+ label: this.currentLabel,
109
+ inDropdown: false,
110
+ }) :
111
+ h("span", [
112
+ this.groupLabel ?
113
+ h(ATranslation, {
114
+ alwaysTranslate: this.alwaysTranslate,
115
+ tag: "span",
116
+ html: this.groupLabel,
117
+ extra: this.data.extra,
118
+ textAfter: ":&nbsp;",
119
+ }) :
120
+ "",
121
+ h(ATranslation, {
122
+ alwaysTranslate: this.alwaysTranslate,
123
+ tag: "span",
124
+ html: this.currentLabel,
125
+ extra: this.data.extra,
126
+ }),
127
+ ]),
128
+
129
+ !this.hideDeleteButton && !this.disabled ?
130
+ h(AElement, {
131
+ class: "a_btn a_btn_link a_select__ul_closeable__item__btn",
132
+ disabled: this.disabled,
133
+ iconLeft: XLg,
134
+ prevent: true,
135
+ stop: true,
136
+ tabindex: -1,
137
+ type: "button",
138
+ onClick: this.closeModel,
139
+ }) :
140
+ "",
141
+ ]);
142
+ },
143
+ };