aloha-vue 2.1.1 → 2.1.2

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 (173) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/package.json +7 -4
  3. package/src/AAccordion/AAccordion.js +2 -0
  4. package/src/AAccordion/AAccordionItem/AAccordionItem.js +3 -2
  5. package/src/AAccordion/compositionAPI/DataAPI.js +1 -1
  6. package/src/AAccordion/compositionAPI/ToggleAPI.js +6 -1
  7. package/src/AButton/AButton.js +1 -1
  8. package/src/ACloak/ACloak.js +1 -1
  9. package/src/ADisclosure/ADisclosure.js +3 -0
  10. package/src/ADisclosure/compositionAPI/IsOpenAPI.js +6 -1
  11. package/src/ADisclosure/compositionAPI/ToggleAPI.js +1 -1
  12. package/src/ADropdown/ADropdown.js +13 -8
  13. package/src/ADropdown/compositionAPI/PopoverAPI.js +1 -1
  14. package/src/ADropdown/compositionAPI/ToggleAPI.js +8 -5
  15. package/src/AElement/comositionAPI/ClickAPI.js +5 -5
  16. package/src/AFilters/AFilersRight/AFilersRight.js +1 -1
  17. package/src/AFilters/AFilterCenter/AFilterCenter.js +10 -8
  18. package/src/AFilters/AFilterCenter/AFilterCenterItem/compositionAPI/GoToAPI.js +1 -1
  19. package/src/AFilters/AFilters/compositionAPI/CloseFilterAPI.js +1 -1
  20. package/src/AFilters/AFilters/compositionAPI/DataKeyByKeyIdAPI.js +1 -1
  21. package/src/AFilters/AFilters/compositionAPI/StartSearchAPI.js +1 -1
  22. package/src/AFilters/AFilters/compositionAPI/ToggleAPI.js +1 -1
  23. package/src/AFilters/AFiltersHorizontal/AFiltersHorizontal.js +4 -2
  24. package/src/AFilters/AFiltersHorizontal/AFiltersHorizontalFilter/AFiltersHorizontalFilter.js +2 -2
  25. package/src/AFilters/AFiltersHorizontal/compositionAPI/EventBusAPI.js +6 -1
  26. package/src/AFilters/AFiltersHorizontal/compositionAPI/FiltersSaveAPI.js +6 -8
  27. package/src/AFilters/AFiltersHorizontal/compositionAPI/FormAPI.js +2 -2
  28. package/src/AFilters/AFiltersSaveModal/AFiltersSaveModal.js +1 -1
  29. package/src/AFilters/AFiltersSaveModal/compositionAPI/ModelAPI.js +1 -1
  30. package/src/AList/AListItem/AListItem.js +24 -20
  31. package/src/AList/compositionAPI/__tests__/TagAPI.test.js +1 -1
  32. package/src/ALoading/ALoading.js +1 -1
  33. package/src/AMenu/AMenu.js +13 -11
  34. package/src/AMenu/AMenuPanelLink/AMenuPanelLink.js +1 -1
  35. package/src/AMenu/compositionAPI/KeydownAPI.js +11 -15
  36. package/src/AMenu/compositionAPI/PanelsAPI.js +1 -1
  37. package/src/AMenu/compositionAPI/PopoverAPI.js +3 -3
  38. package/src/AMenu/compositionAPI/SearchBtnAPI.js +1 -1
  39. package/src/AModal/AModal.js +3 -3
  40. package/src/AModal/compositionAPI/FocusAPI.js +3 -5
  41. package/src/AModalForm/AModalForm.js +1 -1
  42. package/src/AModalWizard/AModalWizard.js +3 -3
  43. package/src/AModalWizard/compositionAPI/VisibleAPI.js +2 -2
  44. package/src/APagination/APagination.js +4 -2
  45. package/src/APagination/APaginationCountPerPage/APaginationCountPerPage.js +15 -11
  46. package/src/APagination/APaginationPages/APaginationPages.js +38 -34
  47. package/src/APagination/APaginationPages/compositionAPI/PaginationItemsAPI.js +4 -3
  48. package/src/ARate/ARate.js +13 -6
  49. package/src/ARate/ARateIcon/ARateIcon.js +2 -2
  50. package/src/AScale/AScaleBowl/AScaleBowl.js +2 -2
  51. package/src/AScale/compositionAPI/ClassAPI.js +2 -4
  52. package/src/AScale/compositionAPI/DegreeAPI.js +5 -2
  53. package/src/AShowMore/AShowMore.js +327 -327
  54. package/src/AShowMore/compositionAPI/IsOpenAPI.js +6 -1
  55. package/src/AShowMore/compositionAPI/ObservingAPI.js +1 -1
  56. package/src/AShowMore/compositionAPI/ToggleAPI.js +2 -2
  57. package/src/ASpinner/compositionAPI/ClassAPI.js +1 -1
  58. package/src/ATable/ATable.js +12 -6
  59. package/src/ATable/ATableHeader/compositionAPI/CheckboxAPI.js +2 -1
  60. package/src/ATable/ATableHeaderThAction/ATableHeaderThAction.js +1 -1
  61. package/src/ATable/ATableHeaderThAction/ATableHeaderThActionItem/ATableHeaderThActionItem.js +2 -2
  62. package/src/ATable/ATableHeaderThAction/ATableHeaderThActionItem/compositionAPI/LabelAPI.js +1 -1
  63. package/src/ATable/ATableHeaderThAction/ATableHeaderThActionItem/compositionAPI/MoveColumnAPI.js +1 -1
  64. package/src/ATable/ATableListItem/ATableListItem.js +3 -3
  65. package/src/ATable/ATablePreviewDown/compositionAPI/FocusAPI.js +5 -2
  66. package/src/ATable/ATablePreviewRight/ATablePreviewRight.js +12 -9
  67. package/src/ATable/ATableSortingAdditional/ATableSortingAdditional.js +2 -2
  68. package/src/ATable/ATableSortingAdditional/__tests__/ATableSortingAdditional.ColumnsAPI.test.js +1 -1
  69. package/src/ATable/ATableSortingAdditional/__tests__/ATableSortingAdditional.FormAPI.test.js +3 -3
  70. package/src/ATable/ATableSortingAdditional/__tests__/ATableSortingAdditional.ModelAPI.test.js +3 -2
  71. package/src/ATable/ATableTd/ATableTd.js +10 -8
  72. package/src/ATable/ATableTd/compositionAPI/LinkAPI.js +1 -1
  73. package/src/ATable/ATableTdAction/compositionAPI/ColumnsCountAPI.js +1 -1
  74. package/src/ATable/ATableTopPanel/ATableTopPanel.js +19 -16
  75. package/src/ATable/ATableTr/ATableTr.js +1 -1
  76. package/src/ATable/ATableTr/compositionAPI/AttributesAPI.js +1 -1
  77. package/src/ATable/compositionAPI/ColumnAdditionalSpaceAPI.js +5 -3
  78. package/src/ATable/compositionAPI/ColumnsGroupedAPI.js +6 -4
  79. package/src/ATable/compositionAPI/ColumnsOrderingAPI.js +2 -2
  80. package/src/ATable/compositionAPI/LimitOffsetAPI.js +8 -2
  81. package/src/ATable/compositionAPI/MultipleActionAPI.js +1 -1
  82. package/src/ATable/compositionAPI/PreviewRightResizeAPI.js +1 -1
  83. package/src/ATable/compositionAPI/ScrollControlAPI.js +1 -1
  84. package/src/ATable/compositionAPI/SimpleTableAPI.js +6 -1
  85. package/src/ATabs/ATabsTab/ATabsTab.js +1 -1
  86. package/src/ATooltip/ATooltip.js +8 -6
  87. package/src/ATooltip/compositionAPI/PopperAPI.js +2 -2
  88. package/src/ATranslation/compositionAPI/PlaceholderAPI.js +1 -1
  89. package/src/AVerticalScroll/AVerticalScroll.js +2 -2
  90. package/src/AVerticalScroll/compositionAPI/ObserverAPI.js +2 -2
  91. package/src/AWizard/AWizard.js +3 -3
  92. package/src/AWizard/AWizardStep/AWizardStep.js +5 -3
  93. package/src/AWizard/AWizardStep/compositionAPI/StatusTextAPI.js +1 -1
  94. package/src/compositionAPI/AConfirmAPI.js +15 -12
  95. package/src/compositionAPI/AHttpAPI.js +2 -2
  96. package/src/compositionAPI/APopupAPI.js +4 -6
  97. package/src/directives/AOnHooks.js +10 -5
  98. package/src/filters/__tests__/filterDate.test.js +1 -1
  99. package/src/filters/__tests__/filterList.test.js +2 -2
  100. package/src/filters/filterFloat.js +5 -5
  101. package/src/filters/filterList.js +3 -3
  102. package/src/index.js +16 -1
  103. package/src/plugins/AIconPlugin.js +1 -1
  104. package/src/plugins/AMobilePlugin.js +2 -4
  105. package/src/svg/compositionAPI/PointsAPI.js +1 -1
  106. package/src/ui/ACheckbox/ACheckbox.js +2 -2
  107. package/src/ui/ACheckbox/ACheckboxItem/ACheckboxItem.js +2 -1
  108. package/src/ui/ACheckboxRadioGroups/ACheckboxRadioGroups.js +1 -1
  109. package/src/ui/ADatepicker/ADatepicker.js +19 -12
  110. package/src/ui/ADatepicker/ADatepickerCalendarPanel/ADatepickerCalendarPanel.js +5 -3
  111. package/src/ui/ADatepicker/ADatepickerIcon/ADatepickerIcon.js +1 -0
  112. package/src/ui/ADatepicker/compositionAPI/AttributesAPI.js +1 -1
  113. package/src/ui/ADatepicker/compositionAPI/EventsAPI.js +27 -17
  114. package/src/ui/ADatepicker/compositionAPI/PopoverAPI.js +2 -2
  115. package/src/ui/ADatepicker/mixins/PanelMixin.js +2 -1
  116. package/src/ui/ADatepicker/panel/APanelDate/APanelDate.js +1 -0
  117. package/src/ui/ADatepicker/panel/APanelMonth/APanelMonth.js +1 -0
  118. package/src/ui/ADatepicker/panel/APanelTime/APanelTime.js +3 -2
  119. package/src/ui/ADatepicker/panel/APanelYear/APanelYear.js +1 -0
  120. package/src/ui/ADatepicker/panel/APanelYearItem/APanelYearItem.js +1 -0
  121. package/src/ui/ADatepicker/utils/index.js +1 -1
  122. package/src/ui/ADatepickerAlt/ADatepicker.js +18 -14
  123. package/src/ui/ADatepickerAlt/ADatepickerCalendarPanel/ADatepickerCalendarPanel.js +14 -9
  124. package/src/ui/ADatepickerAlt/ADatepickerIcon/ADatepickerIcon.js +1 -0
  125. package/src/ui/ADatepickerAlt/mixins/PanelMixin.js +2 -1
  126. package/src/ui/ADatepickerAlt/panel/APanelDate/APanelDate.js +1 -0
  127. package/src/ui/ADatepickerAlt/panel/APanelMonth/APanelMonth.js +1 -0
  128. package/src/ui/ADatepickerAlt/panel/APanelTime/APanelTime.js +3 -2
  129. package/src/ui/ADatepickerAlt/panel/APanelYear/APanelYear.js +1 -0
  130. package/src/ui/ADatepickerAlt/panel/APanelYearItem/APanelYearItem.js +1 -0
  131. package/src/ui/ADatepickerAlt/utils/index.js +1 -1
  132. package/src/ui/ADatepickerRange/ADatepickerRange.js +3 -3
  133. package/src/ui/ADatepickerRange/compositionAPI/FocusAPI.js +1 -1
  134. package/src/ui/AErrors/AErrors.js +2 -2
  135. package/src/ui/AErrors/AErrorsElement/AErrorsElement.js +16 -14
  136. package/src/ui/AForm/AForm.js +7 -5
  137. package/src/ui/AForm/compositionAPI/HideAPI.js +1 -1
  138. package/src/ui/AForm/compositionAPI/ModelAPI.js +1 -1
  139. package/src/ui/AInput/AInput.js +2 -2
  140. package/src/ui/AInputCurrency/AInputCurrency.js +3 -1
  141. package/src/ui/AInputCurrency/compositionAPI/IncreaseDecreaseAPI.js +1 -1
  142. package/src/ui/AInputCurrency/compositionAPI/InputEventsAPI.js +9 -6
  143. package/src/ui/AInputCurrency/compositionAPI/ModelAPI.js +9 -3
  144. package/src/ui/AInputFile/AInputFile.js +1 -1
  145. package/src/ui/AInputNumber/AInputNumber.js +5 -2
  146. package/src/ui/AInputNumber/compositionAPI/IncreaseDecreaseAPI.js +2 -2
  147. package/src/ui/AInputNumber/compositionAPI/InputEventsAPI.js +62 -55
  148. package/src/ui/AInputNumber/compositionAPI/ModelAPI.js +9 -4
  149. package/src/ui/AInputNumber/compositionAPI/VerifyAPI.js +1 -1
  150. package/src/ui/AInputNumberRange/AInputNumberRange.js +2 -2
  151. package/src/ui/AInputNumberRange/compositionAPI/FocusAPI.js +1 -1
  152. package/src/ui/AJson/compositionAPI/JsonAPI.js +2 -1
  153. package/src/ui/AOneCheckbox/AOneCheckbox.js +1 -1
  154. package/src/ui/AOneCheckbox/compositionAPI/TrueFalseValueAPI.js +1 -1
  155. package/src/ui/ARadio/ARadio.js +2 -2
  156. package/src/ui/ARadio/ARadioItem/ARadioItem.js +2 -1
  157. package/src/ui/ASelect/ASelect.js +2 -2
  158. package/src/ui/ASelect/ASelectLabelElement.js +1 -1
  159. package/src/ui/ASelect/ASelectValueCloseable.js +1 -1
  160. package/src/ui/ASelect/compositionAPI/ModelChangeAPI.js +6 -8
  161. package/src/ui/ASelect/compositionAPI/ToggleAPI.js +5 -7
  162. package/src/ui/ASwitch/ASwitch.js +1 -1
  163. package/src/ui/ATemplate/ATemplate.js +1 -1
  164. package/src/ui/ATextarea/ATextarea.js +1 -1
  165. package/src/ui/compositionApi/UiDataFromServerAPI.js +5 -5
  166. package/src/ui/compositionApi/UiSearchAPI.js +1 -1
  167. package/src/ui/compositionApi/__tests__/UIExcludeRenderAttributesAPI.test.js +3 -3
  168. package/src/utils/EventBus.js +1 -1
  169. package/src/utils/actions.js +2 -2
  170. package/src/utils/autosize.js +30 -23
  171. package/src/utils/utils.js +1 -0
  172. package/src/utils/utilsDOM.js +1 -1
  173. package/src/AWizard/AWizardStep/compositionAPI/IconAPI.js +0 -11
package/CHANGELOG.md CHANGED
@@ -7,6 +7,19 @@
7
7
  ---
8
8
  # Versions
9
9
 
10
+ ## 2.1.2
11
+
12
+ - Linting Enhancements:
13
+ - Implemented linting for Vue.js components and codebase using ESLint
14
+ - Documentation Updates:
15
+ - Updated configuration and import examples in the documentation.
16
+ - New Imports:
17
+ - Added imports for the following components, functions, and constants:
18
+ - Components: `AMenuButtonToggle`, `APlacements`.
19
+ - Functions: `getTranslatedText`, `isPlaceholderTranslate`, `setI18n`, `setLanguage`, `toggleTranslate`, `updateTranslation`
20
+ - Constants: `i18n`, `focusableList`, `focusableSelector`, `AKeyChildren`, `AKeyId`, `AKeyLabel`, `AKeyParent`, `AKeysCode`, `timeTranslationLastChanged`, `isTranslate`.
21
+ - Renamed `i18n` to `i18nAll` for better clarity.
22
+
10
23
  ## 2.1.1
11
24
 
12
25
  - `AOneCheckbox`: Fixed warnings related to the slot usage.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aloha-vue",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "Aloha-vue is a JavaScript library that provides a wide range of accessible components and directives for Vue.js. Accessibility is of paramount importance to us, and we have designed all our components to meet accessibility compliance criteria. This library is a valuable tool for frontend developers and has already been used in three projects, including two large-scale ones",
5
5
  "keywords": [
6
6
  "accessibility compliance criteria",
@@ -67,20 +67,23 @@
67
67
  "@babel/core": "7.26.0",
68
68
  "@babel/preset-env": "7.26.0",
69
69
  "@eslint/js": "^9.17.0",
70
+ "@stylistic/eslint-plugin": "^2.13.0",
70
71
  "@vitejs/plugin-vue": "5.2.1",
71
72
  "@vue/test-utils": "2.4.6",
72
73
  "babel-core": "^7.0.0-bridge.0",
73
74
  "babel-jest": "29.7.0",
74
75
  "babel-plugin-module-resolver": "5.0.2",
75
- "eslint": "9.17.0",
76
- "eslint-plugin-jest": "28.10.0",
76
+ "eslint": "^9.19.0",
77
+ "eslint-plugin-import": "^2.31.0",
78
+ "eslint-plugin-jest": "28.11.0",
77
79
  "eslint-plugin-vue": "^9.32.0",
80
+ "eslint-plugin-vue-pug": "^0.6.2",
78
81
  "globals": "^15.14.0",
79
82
  "jest": "29.7.0",
80
83
  "jest-environment-jsdom": "29.7.0",
81
84
  "lodash": "4.17.21",
82
85
  "sass": "1.83.0",
83
- "vite": "6.0.4"
86
+ "vite": "^6.0.11"
84
87
  },
85
88
  "files": [
86
89
  "dist",
@@ -154,6 +154,7 @@ export default {
154
154
  setup(props, context) {
155
155
  const {
156
156
  idsForOpen,
157
+ initIdsForOpen,
157
158
  toggleLocal,
158
159
  } = ToggleAPI(props, context);
159
160
 
@@ -168,6 +169,7 @@ export default {
168
169
  dataWithIds,
169
170
  });
170
171
 
172
+ initIdsForOpen();
171
173
  initIdsFromIndexesForOpen();
172
174
 
173
175
  return {
@@ -134,7 +134,8 @@ export default {
134
134
  parentIndexes: this.parentIndexes,
135
135
  id: this.id,
136
136
  currentId: this.currentId,
137
- }) : this.$slots.accordionContent ?
137
+ })
138
+ : this.$slots.accordionContent ?
138
139
  this.$slots.accordionContent({
139
140
  item: this.item,
140
141
  itemIndex: this.itemIndex,
@@ -208,7 +209,7 @@ export default {
208
209
  h("div", {
209
210
  class: ["a_accordion__body", this.classBody, this.classBodyLocal],
210
211
  }, body),
211
- ])
212
+ ]),
212
213
  ]);
213
214
  },
214
215
  };
@@ -20,7 +20,7 @@ export default function DataAPI(props) {
20
20
  const setIdForItems = ({ items, parentIds = "" }) => {
21
21
  forEach(items, (item, itemIndex) => {
22
22
  const ID_FROM_KEY_ID = get(item, keyId.value);
23
- let id = "";
23
+ let id;
24
24
  if (isNil(ID_FROM_KEY_ID)) {
25
25
  id = `${ parentIds }${ itemIndex }`;
26
26
  } else {
@@ -19,7 +19,11 @@ export default function ToggleAPI(props, { emit }) {
19
19
  const prevent = toRef(props, "prevent");
20
20
  const stop = toRef(props, "stop");
21
21
 
22
- const idsForOpen = ref(idsForOpenDefault.value);
22
+ const idsForOpen = ref(undefined);
23
+
24
+ const initIdsForOpen = () => {
25
+ idsForOpen.value = idsForOpenDefault.value;
26
+ };
23
27
 
24
28
  const toggleWithAlwaysOpen = ({ currentId, isOpen }) => {
25
29
  if (isOpen) {
@@ -69,6 +73,7 @@ export default function ToggleAPI(props, { emit }) {
69
73
 
70
74
  return {
71
75
  idsForOpen,
76
+ initIdsForOpen,
72
77
  toggleLocal,
73
78
  };
74
79
  }
@@ -254,7 +254,7 @@ export default {
254
254
  clickEmit,
255
255
  } = EmitsAPI(props, context);
256
256
 
257
-
257
+
258
258
  return {
259
259
  clickEmit,
260
260
  };
@@ -108,7 +108,7 @@ export default {
108
108
  },
109
109
  [
110
110
  h("div", {
111
- class: ["a_cloak__box", this.classForBox]
111
+ class: ["a_cloak__box", this.classForBox],
112
112
  }, [
113
113
  IS_TEXT_LEFT ?
114
114
  BOX_TEXT :
@@ -152,6 +152,7 @@ export default {
152
152
  } = context;
153
153
 
154
154
  const {
155
+ initIsOpen,
155
156
  isOpen,
156
157
  } = IsOpenAPI(props);
157
158
 
@@ -182,6 +183,8 @@ export default {
182
183
  isOpen,
183
184
  });
184
185
 
186
+ initIsOpen();
187
+
185
188
  expose({
186
189
  buttonRef,
187
190
  containerRef,
@@ -6,9 +6,14 @@ import {
6
6
  export default function IsOpenAPI(props) {
7
7
  const isOpenDefault = toRef(props, "isOpenDefault");
8
8
 
9
- const isOpen = ref(isOpenDefault.value);
9
+ const isOpen = ref(undefined);
10
+
11
+ const initIsOpen = () => {
12
+ isOpen.value = isOpenDefault.value;
13
+ };
10
14
 
11
15
  return {
16
+ initIsOpen,
12
17
  isOpen,
13
18
  };
14
19
  }
@@ -21,7 +21,7 @@ export default function ToggleAPI(props, { emit }, {
21
21
  nextTick().then(
22
22
  () => setFocusToElement({
23
23
  element: containerRef.value,
24
- })
24
+ }),
25
25
  );
26
26
  }
27
27
  };
@@ -189,12 +189,15 @@ export default {
189
189
  floatingFlip: {
190
190
  type: Object,
191
191
  required: false,
192
- // mainAxis?: boolean;
193
- // crossAxis?: boolean;
194
- // fallbackAxisSideDirection?: 'none' | 'start' | 'end';
195
- // flipAlignment?: boolean;
196
- // fallbackPlacements?: Array<Placement>;
197
- // fallbackStrategy?: 'bestFit' | 'initialPlacement';
192
+
193
+ /*
194
+ * mainAxis?: boolean;
195
+ * crossAxis?: boolean;
196
+ * fallbackAxisSideDirection?: 'none' | 'start' | 'end';
197
+ * flipAlignment?: boolean;
198
+ * fallbackPlacements?: Array<Placement>;
199
+ * fallbackStrategy?: 'bestFit' | 'initialPlacement';
200
+ */
198
201
  default: () => ({}),
199
202
  },
200
203
  floatingShift: {
@@ -311,6 +314,7 @@ export default {
311
314
  buttonWidth,
312
315
  destroyEventCloseClick,
313
316
  destroyEventPressArrows,
317
+ initWasOpened,
314
318
  onClose,
315
319
  onKeydown,
316
320
  onOpen,
@@ -365,6 +369,7 @@ export default {
365
369
  buttonClassLocal,
366
370
  } = ClassAPI(props);
367
371
 
372
+ initWasOpened();
368
373
  addPopperContainerInBody();
369
374
 
370
375
  onBeforeUnmount(() => {
@@ -395,7 +400,7 @@ export default {
395
400
  },
396
401
  render() {
397
402
  if (this.isHideWithoutActionAndSlot &&
398
- !this.hasActions &&
403
+ !this.hasActions &&
399
404
  !this.$slots.dropdown) {
400
405
  return null;
401
406
  }
@@ -445,7 +450,7 @@ export default {
445
450
  disabled: !this.inBody,
446
451
  }, [
447
452
  this.isMenuRendered && withDirectives(h(
448
- "div",
453
+ "div",
449
454
  {
450
455
  ref: "dropdownRef",
451
456
  role: "application",
@@ -63,7 +63,7 @@ export default function PopoverAPI(props, {
63
63
  top: `${ y }px`,
64
64
  });
65
65
  });
66
- }
66
+ },
67
67
  );
68
68
  }
69
69
  };
@@ -37,13 +37,17 @@ export default function ToggleAPI(props, { emit }, {
37
37
  const statusExpanded = ref(false);
38
38
  const timerCloseHover = ref(undefined);
39
39
  const triggerOpen = ref(undefined);
40
- const wasOpened = ref(dropdownRenderDefault.value || false);
40
+ const wasOpened = ref(false);
41
41
 
42
42
  const {
43
43
  closeDropdownGlobal,
44
44
  openDropdownGlobal,
45
45
  } = ADropdownGlobalAPI();
46
46
 
47
+ const initWasOpened = () => {
48
+ wasOpened.value = dropdownRenderDefault.value || false;
49
+ };
50
+
47
51
  const pressArrows = ({ down }) => {
48
52
  const ELEMENTS = dropdownRef.value.querySelectorAll(elementsForArrows.value);
49
53
  if (ELEMENTS.length === 0) {
@@ -63,10 +67,8 @@ export default function ToggleAPI(props, { emit }, {
63
67
  if (index < ELEMENTS.length - 1) {
64
68
  ELEMENTS[index + 1].focus();
65
69
  }
66
- } else {
67
- if (index > 0) {
68
- ELEMENTS[index - 1].focus();
69
- }
70
+ } else if (index > 0) {
71
+ ELEMENTS[index - 1].focus();
70
72
  }
71
73
  return false;
72
74
  }
@@ -260,6 +262,7 @@ export default function ToggleAPI(props, { emit }, {
260
262
  buttonWidth,
261
263
  destroyEventCloseClick,
262
264
  destroyEventPressArrows,
265
+ initWasOpened,
263
266
  onClose,
264
267
  onKeydown,
265
268
  onOpen,
@@ -3,12 +3,12 @@ import {
3
3
  } from "vue";
4
4
 
5
5
  export default function ClickAPI(props, { emit }) {
6
- const onClick = $event => {
7
- const prevent = toRef(props, "prevent");
8
- const stop = toRef(props, "stop");
9
- const disabled = toRef(props, "disabled");
10
- const ariaDisabled = toRef(props, "ariaDisabled");
6
+ const prevent = toRef(props, "prevent");
7
+ const stop = toRef(props, "stop");
8
+ const disabled = toRef(props, "disabled");
9
+ const ariaDisabled = toRef(props, "ariaDisabled");
11
10
 
11
+ const onClick = $event => {
12
12
  if (prevent.value) {
13
13
  $event.preventDefault();
14
14
  }
@@ -73,7 +73,7 @@ export default {
73
73
  unappliedModel: this.appliedModel,
74
74
  updateDataKeyByIdFromFilter: this.updateDataKeyByIdFromFilter,
75
75
  }, this.$slots);
76
- })
76
+ }),
77
77
  ]),
78
78
  ]);
79
79
  },
@@ -103,14 +103,16 @@ export default {
103
103
  onUpdateLoadingChildFilters: this.updateLoadingChildFilters,
104
104
  }, this.$slots);
105
105
  }),
106
- this.isLeastOneChildFilterLoading ? h("div", {
107
- style: this.styleHide,
108
- class: "a_filters_center__item",
109
- }, [
110
- h(ASpinner, {
111
- class: "a_spinner_small",
112
- }),
113
- ]) : "",
106
+ this.isLeastOneChildFilterLoading
107
+ ? h("div", {
108
+ style: this.styleHide,
109
+ class: "a_filters_center__item",
110
+ }, [
111
+ h(ASpinner, {
112
+ class: "a_spinner_small",
113
+ }),
114
+ ])
115
+ : "",
114
116
  h("div", {
115
117
  class: "a_filters_center__item",
116
118
  style: this.styleHide,
@@ -11,7 +11,7 @@ import {
11
11
  export default function GoToAPI(props) {
12
12
  const filter = toRef(props, "filter");
13
13
  const id = toRef(props, "id");
14
-
14
+
15
15
  const eventName = computed(() => {
16
16
  return `eventATableFilterTopOnOpen_${ id.value }`;
17
17
  });
@@ -9,8 +9,8 @@ import {
9
9
  typesModelObject,
10
10
  } from "../../../ui/const/AUiTypes";
11
11
  import {
12
- cloneDeep,
13
12
  filter as _filter,
13
+ cloneDeep,
14
14
  forEach,
15
15
  isPlainObject,
16
16
  } from "lodash-es";
@@ -9,7 +9,7 @@ import {
9
9
  export default function DataKeyByKeyIdAPI() {
10
10
  const dataKeyByKeyIdPerFilter = ref({});
11
11
 
12
- const updateDataKeyByIdFromFilter = ({ dataKeyByKeyId, filterId, }) => {
12
+ const updateDataKeyByIdFromFilter = ({ dataKeyByKeyId, filterId }) => {
13
13
  dataKeyByKeyIdPerFilter.value[filterId] = cloneDeep(dataKeyByKeyId);
14
14
  };
15
15
 
@@ -15,7 +15,7 @@ export default function StartSearchAPI(props, { emit }, {
15
15
  onUpdateModelFilters({ model: appliedModel.value });
16
16
  });
17
17
  };
18
-
18
+
19
19
  return {
20
20
  startSearch,
21
21
  };
@@ -4,8 +4,8 @@ import {
4
4
  } from "vue";
5
5
 
6
6
  import {
7
- cloneDeep,
8
7
  filter as _filter,
8
+ cloneDeep,
9
9
  } from "lodash-es";
10
10
 
11
11
  export default function ToggleAPI(props, {
@@ -117,6 +117,7 @@ export default {
117
117
  const {
118
118
  destroyEventBus,
119
119
  initEventBus,
120
+ initEventName,
120
121
  } = EventBusAPI(props, {
121
122
  openDropdown,
122
123
  });
@@ -156,6 +157,7 @@ export default {
156
157
  modelFiltersSaved,
157
158
  });
158
159
 
160
+ initEventName();
159
161
  initModelFiltersSaved();
160
162
  initEventBus();
161
163
 
@@ -229,7 +231,7 @@ export default {
229
231
  h(ATranslation, {
230
232
  class: "a_filter_horizontal__header__texts__filter",
231
233
  tag: "span",
232
- text: "_A_FILTERS_HOR_FILTER_HEADER_"
234
+ text: "_A_FILTERS_HOR_FILTER_HEADER_",
233
235
  }),
234
236
  this.isModelFilterSavedNew ?
235
237
  h(ATranslation, {
@@ -386,7 +388,7 @@ export default {
386
388
  updateFiltersSaved: this.updateFiltersSaved,
387
389
  onClose: this.closeModalSave,
388
390
  }) :
389
- ""
391
+ "",
390
392
  ];
391
393
  },
392
394
  };
@@ -70,7 +70,7 @@ export default {
70
70
  },
71
71
  render() {
72
72
  return this.isFilter && h("div", {
73
- class: "a_filters_top__filter_ui_group"
73
+ class: "a_filters_top__filter_ui_group",
74
74
  }, [
75
75
  h("div", {
76
76
  class: "a_filters_top__filter_ui_subgroup",
@@ -91,7 +91,7 @@ export default {
91
91
  iconLeft: XLg,
92
92
  onClick: () => this.$emit("deleteFiltersVisible", { filter: this.filter }),
93
93
  }),
94
- ])
94
+ ]),
95
95
  ]);
96
96
  },
97
97
  };
@@ -9,7 +9,11 @@ export default function EventBusAPI(props, {
9
9
  }) {
10
10
  const id = toRef(props, "id");
11
11
 
12
- const eventName = `eventATableFilterTopOnOpen_${ id.value }`;
12
+ let eventName;
13
+
14
+ const initEventName = () => {
15
+ eventName = `eventATableFilterTopOnOpen_${ id.value }`;
16
+ };
13
17
 
14
18
  const initEventBus = () => {
15
19
  EventBus.$on(eventName, openDropdown);
@@ -22,5 +26,6 @@ export default function EventBusAPI(props, {
22
26
  return {
23
27
  destroyEventBus,
24
28
  initEventBus,
29
+ initEventName,
25
30
  };
26
31
  }
@@ -74,14 +74,12 @@ export default function FiltersSaveAPI(props, {
74
74
  });
75
75
  openDropdown();
76
76
  }
77
- } else {
78
- if (item) {
79
- onUpdateModelFilters.value({
80
- model: item.data || {},
81
- isUpdateFiltersVisible: true,
82
- });
83
- openDropdown();
84
- }
77
+ } else if (item) {
78
+ onUpdateModelFilters.value({
79
+ model: item.data || {},
80
+ isUpdateFiltersVisible: true,
81
+ });
82
+ openDropdown();
85
83
  }
86
84
  };
87
85
 
@@ -44,7 +44,7 @@ export default function FormAPI(props) {
44
44
  id: `group_${ filter.id }`,
45
45
  classColumns: CLASS_COLUMNS,
46
46
  children: [
47
- FILTER
47
+ FILTER,
48
48
  ],
49
49
  });
50
50
  });
@@ -64,7 +64,7 @@ export default function FormAPI(props) {
64
64
  id: `group_${ filter.id }`,
65
65
  classColumns: CLASS_COLUMNS,
66
66
  children: [
67
- FILTER
67
+ FILTER,
68
68
  ],
69
69
  });
70
70
  });
@@ -100,7 +100,7 @@ export default {
100
100
  type: "info",
101
101
  isVisible: true,
102
102
  safeHtml: "_A_FILTERS_SAVE_MODAL_BODY_PREPEND_",
103
- })
103
+ }),
104
104
  ],
105
105
  });
106
106
  },
@@ -12,7 +12,7 @@ export default function ModelAPI(props) {
12
12
  const initModel = () => {
13
13
  if (modelFiltersSaved.value && !isModelFilterSavedNew.value) {
14
14
  model.value = {
15
- name: modelFiltersSaved.value
15
+ name: modelFiltersSaved.value,
16
16
  };
17
17
  }
18
18
  };
@@ -98,7 +98,7 @@ export default {
98
98
  },
99
99
  render() {
100
100
  return h(this.listItemTag, {
101
- class: this.classItem
101
+ class: this.classItem,
102
102
  }, [
103
103
  this.$slots.listItem ?
104
104
  this.$slots.listItem({
@@ -106,29 +106,33 @@ export default {
106
106
  itemIndex: this.itemIndex,
107
107
  }) :
108
108
  withDirectives(h(this.labelTag), [
109
- [ASafeHtml, this.label]
109
+ [ASafeHtml, this.label],
110
110
  ]),
111
111
  this.separator ?
112
112
  h("span", {}, this.separator) :
113
113
  "",
114
- this.hasChildren ? h(AList, {
115
- classItem: this.classItem,
116
- classMain: this.classMain,
117
- data: this.children,
118
- isDataSimpleArray: this.isDataSimpleArray,
119
- keyChildren: this.keyChildren,
120
- keyId: this.keyId,
121
- keyLabel: this.keyLabel,
122
- keyLabelCallback: this.keyLabelCallback,
123
- labelTag: this.labelTag,
124
- listItemTag: this.listItemTag,
125
- separator: this.separator,
126
- separatorHtml: this.separatorHtml,
127
- tag: this.tag,
128
- }, this.$slots) : "",
129
- this.separatorHtml ? withDirectives(h("div"), [
130
- [ASafeHtml, this.separatorHtml]
131
- ]) : "",
114
+ this.hasChildren
115
+ ? h(AList, {
116
+ classItem: this.classItem,
117
+ classMain: this.classMain,
118
+ data: this.children,
119
+ isDataSimpleArray: this.isDataSimpleArray,
120
+ keyChildren: this.keyChildren,
121
+ keyId: this.keyId,
122
+ keyLabel: this.keyLabel,
123
+ keyLabelCallback: this.keyLabelCallback,
124
+ labelTag: this.labelTag,
125
+ listItemTag: this.listItemTag,
126
+ separator: this.separator,
127
+ separatorHtml: this.separatorHtml,
128
+ tag: this.tag,
129
+ }, this.$slots)
130
+ : "",
131
+ this.separatorHtml
132
+ ? withDirectives(h("div"), [
133
+ [ASafeHtml, this.separatorHtml],
134
+ ])
135
+ : "",
132
136
  ]);
133
137
  },
134
138
  };
@@ -6,7 +6,7 @@ describe("TagAPI", () => {
6
6
  beforeEach(() => {
7
7
  props = {
8
8
  tag: "ul",
9
- isHtml: false
9
+ isHtml: false,
10
10
  };
11
11
  });
12
12
 
@@ -119,7 +119,7 @@ export default {
119
119
  [
120
120
 
121
121
  h("div", {
122
- class: ["a_cloak__box", this.classForBox]
122
+ class: ["a_cloak__box", this.classForBox],
123
123
  }, [
124
124
  IS_TEXT_LEFT ?
125
125
  BOX_TEXT :
@@ -218,7 +218,7 @@ export default {
218
218
  isSubMenuOpen,
219
219
  panelParentsOpen,
220
220
  setDefaultMenu,
221
- togglePanel
221
+ togglePanel,
222
222
  } = PanelsAPI(props, {
223
223
  dataKeyById,
224
224
  resetSearch,
@@ -478,7 +478,7 @@ export default {
478
478
  ]),
479
479
  h(AVerticalScroll, {
480
480
  class: {
481
- a_menu__vertical_scroll_hidden: this.isLeastOnePanelOpenAndMenuClosed
481
+ a_menu__vertical_scroll_hidden: this.isLeastOnePanelOpenAndMenuClosed,
482
482
  },
483
483
  disabled: this.isMenuOpen || this.isLeastOnePanelOpenAndMenuClosed,
484
484
  }, () => [
@@ -532,15 +532,17 @@ export default {
532
532
  modelSearch: this.modelSearch,
533
533
  }, this.$slots),
534
534
 
535
- this.isBackdropVisible ? h(Teleport, {
536
- to: "body",
537
- }, [
538
- h("div", {
539
- class: "a_menu__backdrop a_backdrop a_backdrop_fade",
540
- "aria-hidden": true,
541
- ...this.clickAttributesBackdrop,
542
- }),
543
- ]) : "",
535
+ this.isBackdropVisible
536
+ ? h(Teleport, {
537
+ to: "body",
538
+ }, [
539
+ h("div", {
540
+ class: "a_menu__backdrop a_backdrop a_backdrop_fade",
541
+ "aria-hidden": true,
542
+ ...this.clickAttributesBackdrop,
543
+ }),
544
+ ])
545
+ : "",
544
546
  ]);
545
547
  },
546
548
  };