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,184 +1,191 @@
1
- import {
2
- h,
3
- } from "vue";
4
-
5
- import AButton from "../../../AButton/AButton";
6
- import AIcon from "../../../AIcon/AIcon";
7
- import ATranslation from "../../../ATranslation/ATranslation";
8
-
9
- import AttributesComponentAPI from "./compositionAPI/AttributesComponentAPI";
10
- import ButtonVisibleAPI from "./compositionAPI/ButtonVisibleAPI";
11
- import DragAndDropChildAPI from "../../compositionAPI/DragAndDropChildAPI";
12
- import LabelAPI from "./compositionAPI/LabelAPI";
13
- import MoveColumnAPI from "./compositionAPI/MoveColumnAPI";
14
-
15
- import ChevronDown from "aloha-svg/dist/js/bootstrap/ChevronDown";
16
- import ChevronUp from "aloha-svg/dist/js/bootstrap/ChevronUp";
17
- import GripVertical from "aloha-svg/dist/js/bootstrap/GripVertical";
18
-
19
- export default {
20
- name: "ATableHeaderThActionItem",
21
- components: {
22
- AIcon,
23
- ATranslation,
24
- },
25
- props: {
26
- column: {
27
- type: Object,
28
- required: true,
29
- },
30
- columnIndex: {
31
- type: Number,
32
- required: true,
33
- },
34
- columnIndexDraggable: {
35
- type: Number,
36
- required: false,
37
- default: -1,
38
- },
39
- disabledOptions: {
40
- type: Boolean,
41
- required: false,
42
- },
43
- searchColumnModel: {
44
- type: String,
45
- required: true,
46
- },
47
- },
48
- emits: [
49
- "dragendParent",
50
- "dragstartParent",
51
- "dragenterParent",
52
- "dragleaveParent",
53
- ],
54
- inject: [
55
- "changeColumnsOrdering",
56
- "columnsOrdered",
57
- "isColumnsDnd",
58
- "isLoadingOptions",
59
- "isLoadingTable",
60
- "modelColumnsVisibleLocal",
61
- "tableId",
62
- ],
63
- setup(props, context) {
64
- const {
65
- attributesForRoot,
66
- isLocked,
67
- root,
68
- } = DragAndDropChildAPI(props, context, {
69
- classOverString: "a_table__th__dropdown__li_over",
70
- inDropdown: true,
71
- });
72
-
73
- const {
74
- labelLocal,
75
- labelTranslated,
76
- } = LabelAPI(props);
77
-
78
- const {
79
- buttonVisibleProps,
80
- isColumnVisible,
81
- } = ButtonVisibleAPI(props, {
82
- isLocked,
83
- });
84
-
85
- const {
86
- idButtonArrowDown,
87
- idButtonArrowUp,
88
- isButtonArrowDownVisible,
89
- isButtonArrowUpVisible,
90
- moveColumnDown,
91
- moveColumnUp,
92
- } = MoveColumnAPI(props);
93
-
94
- const {
95
- attributesComponent,
96
- } = AttributesComponentAPI(props, {
97
- attributesForRoot,
98
- isColumnVisible,
99
- isLocked,
100
- labelTranslated,
101
- });
102
-
103
- return {
104
- attributesComponent,
105
- attributesForRoot,
106
- buttonVisibleProps,
107
- idButtonArrowDown,
108
- idButtonArrowUp,
109
- isButtonArrowDownVisible,
110
- isButtonArrowUpVisible,
111
- isLocked,
112
- labelLocal,
113
- moveColumnDown,
114
- moveColumnUp,
115
- root,
116
- };
117
- },
118
- render() {
119
- if (this.column.isRender === false) {
120
- return null;
121
- }
122
- return h("li", this.attributesComponent, [
123
- h("div", {
124
- class: "a_dropdown__item_text a_table__th__dropdown_item",
125
- }, [
126
- h("div", {
127
- class: "a_table__th__dropdown_item__child",
128
- }, [
129
- h(AButton, this.buttonVisibleProps),
130
- h("span", {
131
- class: "a_position_relative",
132
- }, [
133
- this.column.icon && h(AIcon, {
134
- icon: this.column.icon,
135
- class: "a_table__th__icon",
136
- }),
137
- h(ATranslation, {
138
- tag: "span",
139
- class: "a_table__th__text",
140
- safeHtml: this.labelLocal,
141
- }),
142
- this.column.title && h(ATranslation, {
143
- title: this.column.title,
144
- ariaHidden: true,
145
- tag: "span",
146
- class: "a_position_absolute_all",
147
- }),
148
- this.column.title && h(ATranslation, {
149
- text: this.column.title,
150
- tag: "span",
151
- class: "a_sr_only",
152
- }),
153
- ]),
154
- (!this.isLocked && this.isColumnsDnd) ?
155
- [this.isButtonArrowUpVisible && h(AButton, {
156
- id: this.idButtonArrowUp,
157
- class: "a_sr_only_focusable a_btn a_btn_link a_p_0 a_table__th__dropdown_item__btn_arrow",
158
- disabled: this.disabledOptions,
159
- type: "button",
160
- iconLeft: ChevronUp,
161
- title: "_A_TABLE_OPTIONS_BTN_ARROW_UP_TITLE_",
162
- textScreenReader: "_A_TABLE_OPTIONS_BTN_ARROW_UP_TITLE_",
163
- onClick: this.moveColumnUp,
164
- }),
165
- this.isButtonArrowDownVisible && h(AButton, {
166
- id: this.idButtonArrowDown,
167
- class: "a_sr_only_focusable a_btn a_btn_link a_p_0 a_table__th__dropdown_item__btn_arrow",
168
- disabled: this.disabledOptions,
169
- type: "button",
170
- iconLeft: ChevronDown,
171
- title: "_A_TABLE_OPTIONS_BTN_ARROW_DOWN_TITLE_",
172
- textScreenReader: "_A_TABLE_OPTIONS_BTN_ARROW_DOWN_TITLE_",
173
- onClick: this.moveColumnDown,
174
- })] :
175
- "",
176
- ]),
177
- (!this.isLocked && this.isColumnsDnd) && h(AIcon, {
178
- icon: GripVertical,
179
- class: "a_table__th__dropdown_item__icon_dnd",
180
- }),
181
- ]),
182
- ]);
183
- },
184
- };
1
+ import {
2
+ h,
3
+ } from "vue";
4
+
5
+ import AButton from "../../../AButton/AButton";
6
+ import AIcon from "../../../AIcon/AIcon";
7
+ import ATranslation from "../../../ATranslation/ATranslation";
8
+
9
+ import AttributesComponentAPI from "./compositionAPI/AttributesComponentAPI";
10
+ import ButtonVisibleAPI from "./compositionAPI/ButtonVisibleAPI";
11
+ import DragAndDropChildAPI from "../../compositionAPI/DragAndDropChildAPI";
12
+ import LabelAPI from "./compositionAPI/LabelAPI";
13
+ import MoveColumnAPI from "./compositionAPI/MoveColumnAPI";
14
+
15
+ const ChevronDown = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16">
16
+ <path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708"/>
17
+ </svg>`;
18
+ const ChevronUp = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-up" viewBox="0 0 16 16">
19
+ <path fill-rule="evenodd" d="M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708z"/>
20
+ </svg>`;
21
+ const GripVertical = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-grip-vertical" viewBox="0 0 16 16">
22
+ <path d="M7 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0M7 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0M7 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0"/>
23
+ </svg>`;
24
+
25
+
26
+ export default {
27
+ name: "ATableHeaderThActionItem",
28
+ components: {
29
+ AIcon,
30
+ ATranslation,
31
+ },
32
+ props: {
33
+ column: {
34
+ type: Object,
35
+ required: true,
36
+ },
37
+ columnIndex: {
38
+ type: Number,
39
+ required: true,
40
+ },
41
+ columnIndexDraggable: {
42
+ type: Number,
43
+ required: false,
44
+ default: -1,
45
+ },
46
+ disabledOptions: {
47
+ type: Boolean,
48
+ required: false,
49
+ },
50
+ searchColumnModel: {
51
+ type: String,
52
+ required: true,
53
+ },
54
+ },
55
+ emits: [
56
+ "dragendParent",
57
+ "dragstartParent",
58
+ "dragenterParent",
59
+ "dragleaveParent",
60
+ ],
61
+ inject: [
62
+ "changeColumnsOrdering",
63
+ "columnsOrdered",
64
+ "isColumnsDnd",
65
+ "isLoadingOptions",
66
+ "isLoadingTable",
67
+ "modelColumnsVisibleLocal",
68
+ "tableId",
69
+ ],
70
+ setup(props, context) {
71
+ const {
72
+ attributesForRoot,
73
+ isLocked,
74
+ root,
75
+ } = DragAndDropChildAPI(props, context, {
76
+ classOverString: "a_table__th__dropdown__li_over",
77
+ inDropdown: true,
78
+ });
79
+
80
+ const {
81
+ labelLocal,
82
+ labelTranslated,
83
+ } = LabelAPI(props);
84
+
85
+ const {
86
+ buttonVisibleProps,
87
+ isColumnVisible,
88
+ } = ButtonVisibleAPI(props, {
89
+ isLocked,
90
+ });
91
+
92
+ const {
93
+ idButtonArrowDown,
94
+ idButtonArrowUp,
95
+ isButtonArrowDownVisible,
96
+ isButtonArrowUpVisible,
97
+ moveColumnDown,
98
+ moveColumnUp,
99
+ } = MoveColumnAPI(props);
100
+
101
+ const {
102
+ attributesComponent,
103
+ } = AttributesComponentAPI(props, {
104
+ attributesForRoot,
105
+ isColumnVisible,
106
+ isLocked,
107
+ labelTranslated,
108
+ });
109
+
110
+ return {
111
+ attributesComponent,
112
+ attributesForRoot,
113
+ buttonVisibleProps,
114
+ idButtonArrowDown,
115
+ idButtonArrowUp,
116
+ isButtonArrowDownVisible,
117
+ isButtonArrowUpVisible,
118
+ isLocked,
119
+ labelLocal,
120
+ moveColumnDown,
121
+ moveColumnUp,
122
+ root,
123
+ };
124
+ },
125
+ render() {
126
+ if (this.column.isRender === false) {
127
+ return null;
128
+ }
129
+ return h("li", this.attributesComponent, [
130
+ h("div", {
131
+ class: "a_dropdown__item_text a_table__th__dropdown_item",
132
+ }, [
133
+ h("div", {
134
+ class: "a_table__th__dropdown_item__child",
135
+ }, [
136
+ h(AButton, this.buttonVisibleProps),
137
+ h("span", {
138
+ class: "a_position_relative",
139
+ }, [
140
+ this.column.icon && h(AIcon, {
141
+ icon: this.column.icon,
142
+ class: "a_table__th__icon",
143
+ }),
144
+ h(ATranslation, {
145
+ tag: "span",
146
+ class: "a_table__th__text",
147
+ safeHtml: this.labelLocal,
148
+ }),
149
+ this.column.title && h(ATranslation, {
150
+ title: this.column.title,
151
+ ariaHidden: true,
152
+ tag: "span",
153
+ class: "a_position_absolute_all",
154
+ }),
155
+ this.column.title && h(ATranslation, {
156
+ text: this.column.title,
157
+ tag: "span",
158
+ class: "a_sr_only",
159
+ }),
160
+ ]),
161
+ (!this.isLocked && this.isColumnsDnd) ?
162
+ [this.isButtonArrowUpVisible && h(AButton, {
163
+ id: this.idButtonArrowUp,
164
+ class: "a_sr_only_focusable a_btn a_btn_link a_p_0 a_table__th__dropdown_item__btn_arrow",
165
+ disabled: this.disabledOptions,
166
+ type: "button",
167
+ iconLeft: ChevronUp,
168
+ title: "_A_TABLE_OPTIONS_BTN_ARROW_UP_TITLE_",
169
+ textScreenReader: "_A_TABLE_OPTIONS_BTN_ARROW_UP_TITLE_",
170
+ onClick: this.moveColumnUp,
171
+ }),
172
+ this.isButtonArrowDownVisible && h(AButton, {
173
+ id: this.idButtonArrowDown,
174
+ class: "a_sr_only_focusable a_btn a_btn_link a_p_0 a_table__th__dropdown_item__btn_arrow",
175
+ disabled: this.disabledOptions,
176
+ type: "button",
177
+ iconLeft: ChevronDown,
178
+ title: "_A_TABLE_OPTIONS_BTN_ARROW_DOWN_TITLE_",
179
+ textScreenReader: "_A_TABLE_OPTIONS_BTN_ARROW_DOWN_TITLE_",
180
+ onClick: this.moveColumnDown,
181
+ })] :
182
+ "",
183
+ ]),
184
+ (!this.isLocked && this.isColumnsDnd) && h(AIcon, {
185
+ icon: GripVertical,
186
+ class: "a_table__th__dropdown_item__icon_dnd",
187
+ }),
188
+ ]),
189
+ ]);
190
+ },
191
+ };
@@ -1,69 +1,72 @@
1
- import {
2
- h,
3
- onMounted,
4
- } from "vue";
5
-
6
- import AButton from "../../AButton/AButton";
7
- import ATranslation from "../../ATranslation/ATranslation";
8
-
9
- import FocusAPI from "./compositionAPI/FocusAPI";
10
-
11
- import XLg from "aloha-svg/dist/js/bootstrap/XLg";
12
-
13
- export default {
14
- name: "ATablePreviewDown",
15
- props: {
16
- row: {
17
- type: Object,
18
- required: true,
19
- },
20
- rowIndex: {
21
- type: Number,
22
- required: true,
23
- },
24
- },
25
- inject: [
26
- "onTogglePreview",
27
- ],
28
- setup() {
29
- const {
30
- componentRef,
31
- setFocusToComponent,
32
- } = FocusAPI();
33
-
34
- onMounted(() => {
35
- setFocusToComponent();
36
- });
37
-
38
- return {
39
- componentRef,
40
- };
41
- },
42
- render() {
43
- return h("div", {
44
- ref: "componentRef",
45
- class: "a_table__preview_down",
46
- tabindex: -1,
47
- }, [
48
- h(ATranslation, {
49
- class: "a_sr_only",
50
- text: "_A_TABLE_PREVIEW_DOWN_ARIA_LABEL_",
51
- }),
52
- this.$slots.preview && this.$slots.preview({
53
- row: this.row,
54
- rowIndex: this.rowIndex,
55
- }),
56
- h(AButton, {
57
- class: "a_btn a_btn_transparent_dark a_table__preview_down__btn_close",
58
- iconLeft: XLg,
59
- iconClass: "a_table__preview_down__btn_close__icon",
60
- title: "_A_TABLE_PREVIEW_DOWN_CLOSE_",
61
- textScreenReader: "_A_TABLE_PREVIEW_DOWN_CLOSE_",
62
- onClick: () => this.onTogglePreview({
63
- row: this.row,
64
- rowIndex: this.rowIndex,
65
- }),
66
- }),
67
- ]);
68
- },
69
- };
1
+ import {
2
+ h,
3
+ onMounted,
4
+ } from "vue";
5
+
6
+ import AButton from "../../AButton/AButton";
7
+ import ATranslation from "../../ATranslation/ATranslation";
8
+
9
+ import FocusAPI from "./compositionAPI/FocusAPI";
10
+
11
+ 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">
12
+ <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"/>
13
+ </svg>`;
14
+
15
+
16
+ export default {
17
+ name: "ATablePreviewDown",
18
+ props: {
19
+ row: {
20
+ type: Object,
21
+ required: true,
22
+ },
23
+ rowIndex: {
24
+ type: Number,
25
+ required: true,
26
+ },
27
+ },
28
+ inject: [
29
+ "onTogglePreview",
30
+ ],
31
+ setup() {
32
+ const {
33
+ componentRef,
34
+ setFocusToComponent,
35
+ } = FocusAPI();
36
+
37
+ onMounted(() => {
38
+ setFocusToComponent();
39
+ });
40
+
41
+ return {
42
+ componentRef,
43
+ };
44
+ },
45
+ render() {
46
+ return h("div", {
47
+ ref: "componentRef",
48
+ class: "a_table__preview_down",
49
+ tabindex: -1,
50
+ }, [
51
+ h(ATranslation, {
52
+ class: "a_sr_only",
53
+ text: "_A_TABLE_PREVIEW_DOWN_ARIA_LABEL_",
54
+ }),
55
+ this.$slots.preview && this.$slots.preview({
56
+ row: this.row,
57
+ rowIndex: this.rowIndex,
58
+ }),
59
+ h(AButton, {
60
+ class: "a_btn a_btn_transparent_dark a_table__preview_down__btn_close",
61
+ iconLeft: XLg,
62
+ iconClass: "a_table__preview_down__btn_close__icon",
63
+ title: "_A_TABLE_PREVIEW_DOWN_CLOSE_",
64
+ textScreenReader: "_A_TABLE_PREVIEW_DOWN_CLOSE_",
65
+ onClick: () => this.onTogglePreview({
66
+ row: this.row,
67
+ rowIndex: this.rowIndex,
68
+ }),
69
+ }),
70
+ ]);
71
+ },
72
+ };