aloha-vue 2.62.0 → 2.63.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.
- package/CHANGELOG.md +1070 -1061
- package/dist/aloha-vue.css +14 -6
- package/dist/aloha-vue.css.map +1 -1
- package/dist/aloha-vue.es.js +17124 -16970
- package/dist/aloha-vue.umd.js +69 -69
- package/package.json +99 -99
- package/scss/_base.scss +62 -62
- package/scss/aloha-vue.scss +68 -68
- package/scss/components/AFilters.scss +304 -304
- package/scss/components/AFormElement/AValidatedJson.scss +6 -6
- package/scss/components/AMenu.scss +627 -627
- package/scss/components/AModal.scss +44 -44
- package/scss/components/APagination.scss +167 -167
- package/scss/components/ARate.scss +78 -78
- package/scss/components/AResizer.scss +63 -63
- package/scss/components/ATable.scss +819 -819
- package/scss/components/ATableForm.scss +309 -288
- package/scss/components/AVerticalScroll.scss +47 -47
- package/scss/components/AWizard.scss +669 -669
- package/scss/components/ui/ADatepicker.scss +342 -342
- package/scss/components/ui/ADatepickerRange.scss +45 -45
- package/scss/components/ui/AFieldset.scss +78 -78
- package/scss/components/ui/AInputNumber.scss +62 -62
- package/scss/components/ui/AInputNumberRange.scss +30 -30
- package/scss/components/ui/ASelect.scss +236 -236
- package/scss/components/ui/ASlider.scss +186 -186
- package/scss/components/ui/ASwitch.scss +148 -148
- package/scss/components/ui/ui.scss +254 -254
- package/scss/text/text_alignment.scss +39 -39
- package/scss/text/text_transform.scss +51 -51
- package/scss/text/text_wrapping.scss +40 -40
- package/scss/utils/badge.scss +45 -45
- package/scss/utils/checkbox_radio.scss +134 -134
- package/scss/utils/color.scss +46 -46
- package/scss/utils/dropdown.scss +185 -185
- package/scss/utils/list.scss +75 -75
- package/scss/utils/modal.scss +173 -173
- package/scss/utils/sizing.scss +137 -137
- package/scss/utils/spacing.scss +63 -63
- package/scss/utils/tooltip.scss +63 -63
- package/src/AAccordion/AAccordion.js +206 -206
- package/src/AAccordion/compositionAPI/IndexesForOpenAPI.js +63 -63
- package/src/AAccordion/compositionAPI/ToggleAPI.js +85 -85
- package/src/AAlert/AAlert.js +216 -216
- package/src/AAlert/compositionAPI/ClassAPI.js +21 -21
- package/src/AAlert/i18n/AAlertI18n.js +19 -19
- package/src/AAlert/i18n/ar.json +2 -2
- package/src/AAlert/i18n/de.json +2 -2
- package/src/AAlert/i18n/en.json +2 -2
- package/src/AAlert/i18n/es.json +2 -2
- package/src/AAlert/i18n/fr.json +2 -2
- package/src/AAlert/i18n/hr.json +2 -2
- package/src/AAlert/i18n/it.json +2 -2
- package/src/AAlert/i18n/ru.json +2 -2
- package/src/AButton/AButton.js +275 -275
- package/src/ACarousel/ACarousel.js +361 -361
- package/src/ACarousel/ACarouselBtn/ACarouselBtn.js +75 -75
- package/src/ACarousel/ACarouselBtn/compositionAPI/ClassAPI.js +16 -16
- package/src/ACarousel/ACarouselBtn/compositionAPI/TextAPI.js +25 -25
- package/src/ACarousel/ACarouselControls/ACarouselControls.js +114 -114
- package/src/ACarousel/ACarouselControls/ACarouselControlsIndicator/ACarouselControlsIndicator.js +146 -146
- package/src/ACarousel/ACarouselControls/ACarouselControlsIndicator/compositionAPI/ActiveAPI.js +33 -33
- package/src/ACarousel/ACarouselControls/ACarouselControlsIndicator/compositionAPI/AttributesAPI.js +40 -40
- package/src/ACarousel/ACarouselControls/ACarouselControlsIndicator/compositionAPI/EventsAPI.js +25 -25
- package/src/ACarousel/ACarouselControls/ACarouselControlsIndicator/compositionAPI/IconAPI.js +20 -20
- package/src/ACarousel/ACarouselControls/compositionAPI/AriaLabelAPI.js +20 -20
- package/src/ACarousel/ACarouselItem/ACarouselItem.js +83 -83
- package/src/ACarousel/ACarouselItem/compositionAPI/AttributesAPI.js +39 -39
- package/src/ACarousel/ACarouselItem/compositionAPI/IsActiveAPI.js +21 -21
- package/src/ACarousel/compositionAPI/ActiveAPI.js +111 -111
- package/src/ACarousel/compositionAPI/AriaLabelAPI.js +25 -25
- package/src/ACarousel/compositionAPI/ArrowsAPI.js +17 -17
- package/src/ACarousel/compositionAPI/ClassAPI.js +44 -44
- package/src/ACarousel/compositionAPI/DataAPI.js +41 -41
- package/src/ACarousel/compositionAPI/IndicatorsAPI.js +148 -148
- package/src/ACarousel/compositionAPI/TextsAPI.js +25 -25
- package/src/ACarousel/i18n/ACarouselI18n.js +19 -19
- package/src/ACarousel/i18n/ar.json +8 -8
- package/src/ACarousel/i18n/de.json +8 -8
- package/src/ACarousel/i18n/en.json +8 -8
- package/src/ACarousel/i18n/es.json +8 -8
- package/src/ACarousel/i18n/fr.json +8 -8
- package/src/ACarousel/i18n/hr.json +8 -8
- package/src/ACarousel/i18n/it.json +8 -8
- package/src/ACarousel/i18n/ru.json +8 -8
- package/src/ACollapse/ACollapse.js +103 -103
- package/src/ADropdown/ADropdown.js +544 -544
- package/src/ADropdown/ADropdownGroup.js +85 -85
- package/src/ADropdown/compositionAPI/ActionsAPI.js +147 -147
- package/src/ADropdown/compositionAPI/AttributesAPI.js +100 -100
- package/src/AElement/AElement.js +518 -518
- package/src/AElement/compositionAPI/AttributesAPI.js +51 -51
- package/src/AElement/compositionAPI/ClickAPI.js +30 -30
- package/src/AElement/compositionAPI/ComponentLocalAPI.js +23 -23
- package/src/AElement/compositionAPI/DisabledAPI.js +22 -22
- package/src/AElement/compositionAPI/HtmlTitleAPI.js +33 -33
- package/src/AElement/compositionAPI/KeydownAPI.js +35 -35
- package/src/AElement/compositionAPI/LoadingAPI.js +22 -22
- package/src/AElement/compositionAPI/RouterLinkAPI.js +20 -20
- package/src/AElement/compositionAPI/SwitchAPI.js +33 -33
- package/src/AElement/compositionAPI/TagAPI.js +34 -34
- package/src/AElement/compositionAPI/TextAPI.js +78 -78
- package/src/AElement/compositionAPI/TitleAPI.js +29 -29
- package/src/AFilters/AFilterCenter/AFilterCenter.js +154 -154
- package/src/AFilters/AFilterCenter/AFilterCenterItem/AFilterCenterItem.js +207 -207
- package/src/AFilters/AFilters/AFilters.js +282 -282
- package/src/AFilters/i18n/ar.json +30 -30
- package/src/AFilters/i18n/en.json +30 -30
- package/src/AFilters/i18n/es.json +30 -30
- package/src/AFilters/i18n/fr.json +30 -30
- package/src/AFilters/i18n/hr.json +30 -30
- package/src/AFilters/i18n/it.json +30 -30
- package/src/AFilters/i18n/ru.json +30 -30
- package/src/AGroupButtonDropdown/compositionAPI/ActionsAPI.js +143 -143
- package/src/ALink/ALink.js +253 -253
- package/src/AMenu/AMenu.js +578 -578
- package/src/AMenu/AMenuBreadcrumbs/compositionAPI/RenderTruncatedAPI.js +74 -74
- package/src/AMenu/AMenuButtonToggle/AMenuButtonToggle.js +94 -94
- package/src/AMenu/AMenuButtonToggle/compositionAPI/ToggleAPI.js +95 -95
- package/src/AMenu/AMenuPanelLink/AMenuPanelLink.js +250 -250
- package/src/AMenu/compositionAPI/BackdropAPI.js +42 -42
- package/src/AMenu/compositionAPI/KeydownAPI.js +197 -197
- package/src/AMenu/compositionAPI/LinkClickAPI.js +48 -48
- package/src/AMenu/compositionAPI/MenuAttributesAPI.js +51 -51
- package/src/AMenu/compositionAPI/PanelsAPI.js +78 -78
- package/src/AMenu/compositionAPI/ResizeAPI.js +74 -74
- package/src/AModal/AModal.js +530 -530
- package/src/AModalForm/AModalForm.js +383 -383
- package/src/AModalWizard/AModalWizard.js +563 -563
- package/src/ANotification/ANotification.js +60 -60
- package/src/APagination/APagination.js +111 -111
- package/src/APagination/APaginationCountPerPage/APaginationCountPerPage.js +209 -209
- package/src/APagination/APaginationCountPerPage/compositionAPI/MainAPI.js +40 -40
- package/src/APagination/APaginationCountPerPage/compositionAPI/TextsAPI.js +54 -54
- package/src/APagination/APaginationPages/APaginationPages.js +282 -282
- package/src/APagination/APaginationPages/compositionAPI/PaginationItemsAPI.js +102 -102
- package/src/APagination/APaginationPages/compositionAPI/TextsAPI.js +74 -74
- package/src/APagination/compositionAPI/ComponentsAPI.js +79 -79
- package/src/APagination/i18n/ar.json +12 -12
- package/src/APagination/i18n/es.json +12 -12
- package/src/APagination/i18n/fr.json +12 -12
- package/src/APagination/i18n/hr.json +12 -12
- package/src/APagination/i18n/it.json +12 -12
- package/src/APagination/i18n/ru.json +12 -12
- package/src/APopup/APopup.js +115 -115
- package/src/ATable/ATable.js +1163 -1163
- package/src/ATable/ATableHeaderThAction/ATableHeaderThAction.js +241 -241
- package/src/ATable/ATableSortingAdditional/__tests__/ATableSortingAdditional.ModelAPI.test.js +200 -200
- package/src/ATable/ATableSortingAdditional/compositionAPI/ModelAPI.js +152 -152
- package/src/ATable/ATableTd/ATableTd.js +145 -145
- package/src/ATable/ATableTdAction/ATableTdAction.js +223 -223
- package/src/ATable/ATableTopPanel/ATableTopPanel.js +433 -433
- package/src/ATable/compositionAPI/ColumnActionAPI.js +105 -105
- package/src/ATable/compositionAPI/ColumnStylesAPI.js +50 -50
- package/src/ATable/compositionAPI/ColumnsGroupedAPI.js +187 -187
- package/src/ATable/compositionAPI/PaginationModesAPI.js +44 -44
- package/src/ATable/compositionAPI/PreviewAPI.js +201 -201
- package/src/ATable/compositionAPI/PreviewRightResizeAPI.js +135 -135
- package/src/ATable/compositionAPI/ScrollControlAPI.js +249 -249
- package/src/ATable/compositionAPI/SortAPI.js +86 -86
- package/src/ATable/compositionAPI/WidthAPI.js +73 -73
- package/src/ATableForm/ATableForm.js +610 -602
- package/src/ATableForm/ATableFormCell/ATableFormCell.js +183 -183
- package/src/ATableForm/ATableFormCell/compositionAPI/DisabledAPI.js +20 -20
- package/src/ATableForm/ATableFormCell/compositionAPI/ReadonlyAPI.js +28 -28
- package/src/ATableForm/ATableFormCellAction/ATableFormCellAction.js +282 -282
- package/src/ATableForm/ATableFormCellAction/compositionAPI/DeleteAPI.js +80 -80
- package/src/ATableForm/ATableFormCellAction/compositionAPI/DisabledAPI.js +60 -60
- package/src/ATableForm/ATableFormCellAction/compositionAPI/HiddenAPI.js +46 -46
- package/src/ATableForm/ATableFormCellAction/compositionAPI/IdsAPI.js +31 -31
- package/src/ATableForm/ATableFormCellAction/compositionAPI/StylesAPI.js +29 -28
- package/src/ATableForm/ATableFormCellAction/compositionAPI/TitleAPI.js +47 -47
- package/src/ATableForm/ATableFormCellDnd/ATableFormCellDnd.js +6 -1
- package/src/ATableForm/ATableFormCellDnd/compositionAPI/IdAPI.js +21 -21
- package/src/ATableForm/ATableFormCellList/compositionAPI/DataAPI.js +61 -61
- package/src/ATableForm/ATableFormRow/ATableFormRow.js +580 -574
- package/src/ATableForm/ATableFormRow/compositionAPI/ErrorsAPI.js +40 -40
- package/src/ATableForm/ATableFormRow/compositionAPI/FocusAPI.js +55 -55
- package/src/ATableForm/ATableFormRow/compositionAPI/IdAPI.js +19 -19
- package/src/ATableForm/__tests__/ATableForm.DragAndDropAPI.test.js +48 -0
- package/src/ATableForm/__tests__/ATableForm.ListView.test.js +672 -460
- package/src/ATableForm/compositionAPI/ClassesAPI.js +23 -23
- package/src/ATableForm/compositionAPI/ColumnsAPI.js +4 -2
- package/src/ATableForm/compositionAPI/ColumnsGrowAPI.js +191 -190
- package/src/ATableForm/compositionAPI/DeleteAPI.js +9 -9
- package/src/ATableForm/compositionAPI/DragAndDropAPI.js +6 -5
- package/src/ATableForm/compositionAPI/EditAPI.js +127 -128
- package/src/ATableForm/compositionAPI/RowsAPI.js +42 -42
- package/src/ATableForm/compositionAPI/StylesAPI.js +62 -62
- package/src/ATableForm/compositionAPI/WidthsAPI.js +21 -21
- package/src/ATableForm/i18n/ATableFormI18n.js +19 -19
- package/src/ATabs/ATabsContent/ATabsContent.js +102 -102
- package/src/ATabs/ATabsTab/ATabsTab.js +185 -185
- package/src/ATooltip/ATooltip.js +221 -221
- package/src/ATranslation/compositionAPI/UtilsAPI.js +187 -187
- package/src/AVerticalScroll/compositionAPI/ScrollAPI.js +55 -55
- package/src/AWizard/AWizard.js +467 -467
- package/src/compositionAPI/AEventOutsideAPI.js +46 -46
- package/src/compositionAPI/AMobileAPI.js +32 -32
- package/src/compositionAPI/APageTabTitleAPI.js +84 -84
- package/src/compositionAPI/ARemPxAPI.js +47 -47
- package/src/compositionAPI/FocusByDestroyAPI.js +67 -67
- package/src/const/AKeys.js +9 -9
- package/src/directives/AOnHooks.js +0 -0
- package/src/i18n/allLanguages.js +377 -377
- package/src/i18n/ar.json +4 -4
- package/src/i18n/de.json +4 -4
- package/src/i18n/en.json +4 -4
- package/src/i18n/es.json +4 -4
- package/src/i18n/fr.json +4 -4
- package/src/i18n/hr.json +4 -4
- package/src/i18n/it.json +4 -4
- package/src/i18n/ru.json +4 -4
- package/src/index.js +402 -402
- package/src/plugins/AAlertPlugin.js +53 -53
- package/src/plugins/ACarouselPlugin.js +34 -34
- package/src/plugins/ADatepickerPlugin.js +57 -57
- package/src/plugins/AFiltersPlugin.js +102 -102
- package/src/plugins/AInputCurrencyPlugin.js +31 -31
- package/src/plugins/AMobilePlugin.js +32 -32
- package/src/plugins/ARemPxPlugin.js +37 -37
- package/src/plugins/ASelectPlugin.js +54 -54
- package/src/plugins/ASelectStylesPlugin.js +2376 -2376
- package/src/temp/px_to_rem_mapping_1_to_800.md +802 -802
- package/src/ui/ACheckbox/ACheckbox.js +929 -929
- package/src/ui/ACheckbox/ACheckboxItem/ACheckboxItem.js +0 -0
- package/src/ui/ACheckboxRadioGroups/ACheckboxRadioGroups.js +0 -0
- package/src/ui/ADatepicker/ADatepicker.js +807 -807
- package/src/ui/ADatepicker/ADatepickerCalendarPanel/ADatepickerCalendarPanel.js +796 -796
- package/src/ui/ADatepicker/ADatepickerCalendarPanel/compositionAPI/CalendarAPI.js +51 -51
- package/src/ui/ADatepicker/compositionAPI/LanguagesAPI.js +92 -92
- package/src/ui/ADatepicker/compositionAPI/PlaceholderAPI.js +55 -55
- package/src/ui/ADatepicker/i18n/ADatepickerI18n.js +19 -19
- package/src/ui/ADatepicker/i18n/ar.json +47 -47
- package/src/ui/ADatepicker/i18n/de.json +48 -48
- package/src/ui/ADatepicker/i18n/en.json +48 -48
- package/src/ui/ADatepicker/i18n/es.json +47 -47
- package/src/ui/ADatepicker/i18n/fr.json +47 -47
- package/src/ui/ADatepicker/i18n/hr.json +47 -47
- package/src/ui/ADatepicker/i18n/it.json +47 -47
- package/src/ui/ADatepicker/i18n/ru.json +48 -48
- package/src/ui/ADatepicker/panel/APanelDate/APanelDate.js +196 -196
- package/src/ui/ADatepicker/panel/APanelDate/compositionAPI/DatesAPI.js +66 -66
- package/src/ui/ADatepicker/panel/APanelDate/compositionAPI/FocusAPI.js +96 -96
- package/src/ui/ADatepicker/panel/APanelDate/compositionAPI/FocusActiveAPI.js +27 -27
- package/src/ui/ADatepicker/panel/APanelDate/compositionAPI/SelectAPI.js +21 -21
- package/src/ui/ADatepicker/panel/APanelDate/compositionAPI/TableAPI.js +128 -128
- package/src/ui/ADatepicker/panel/APanelMonth/APanelMonth.js +129 -129
- package/src/ui/ADatepicker/panel/APanelMonth/compositionAPI/FocusAPI.js +94 -94
- package/src/ui/ADatepicker/panel/APanelMonth/compositionAPI/FocusActiveAPI.js +21 -21
- package/src/ui/ADatepicker/panel/APanelMonth/compositionAPI/MonthsAPI.js +51 -51
- package/src/ui/ADatepicker/panel/APanelMonth/compositionAPI/SelectAPI.js +29 -29
- package/src/ui/ADatepicker/panel/APanelYearItem/APanelYearItem.js +75 -75
- package/src/ui/ADatepicker/panel/APanelYearItem/compositionAPI/AttributesAPI.js +35 -35
- package/src/ui/ADatepicker/panel/APanelYearItem/compositionAPI/SelectAPI.js +35 -35
- package/src/ui/ADatepickerRange/ADatepickerRange.js +537 -537
- package/src/ui/AErrors/AErrors.js +149 -149
- package/src/ui/AErrors/AErrorsElement/AErrorsElement.js +0 -0
- package/src/ui/AErrors/i18n/AErrorsI18n.js +19 -19
- package/src/ui/AErrors/i18n/ar.json +3 -3
- package/src/ui/AErrors/i18n/de.json +2 -2
- package/src/ui/AErrors/i18n/en.json +3 -3
- package/src/ui/AErrors/i18n/es.json +3 -3
- package/src/ui/AErrors/i18n/fr.json +3 -3
- package/src/ui/AErrors/i18n/hr.json +3 -3
- package/src/ui/AErrors/i18n/it.json +3 -3
- package/src/ui/AErrors/i18n/ru.json +3 -3
- package/src/ui/AErrorsText/AErrorsText.js +62 -62
- package/src/ui/AFieldset/AFieldset.js +535 -535
- package/src/ui/AFieldset/compositionAPI/ModelAPI.js +54 -54
- package/src/ui/AForm/AForm.js +252 -252
- package/src/ui/AFormElement/AFormElement.js +160 -160
- package/src/ui/AFormElementBtnClear/AFormElementBtnClear.js +86 -86
- package/src/ui/AFormElementBtnClear/i18n/AFormElementBtnClearI18n.js +19 -19
- package/src/ui/AFormElementBtnClear/i18n/ar.json +2 -2
- package/src/ui/AFormElementBtnClear/i18n/de.json +2 -2
- package/src/ui/AFormElementBtnClear/i18n/en.json +2 -2
- package/src/ui/AFormElementBtnClear/i18n/es.json +2 -2
- package/src/ui/AFormElementBtnClear/i18n/fr.json +2 -2
- package/src/ui/AFormElementBtnClear/i18n/hr.json +2 -2
- package/src/ui/AFormElementBtnClear/i18n/it.json +2 -2
- package/src/ui/AFormElementBtnClear/i18n/ru.json +2 -2
- package/src/ui/AFormHelpText/AFormHelpText.js +37 -37
- package/src/ui/AFormLabelDescription/AFormLabelDescription.js +43 -43
- package/src/ui/AFormReadonly/AFormReadonly.js +193 -193
- package/src/ui/AGroup/AGroup.js +427 -427
- package/src/ui/AInput/AInput.js +516 -516
- package/src/ui/AInput/compositionAPI/ClassAPI.js +43 -43
- package/src/ui/AInputCurrency/AInputCurrency.js +620 -620
- package/src/ui/AInputCurrency/compositionAPI/IncreaseDecreaseAPI.js +76 -76
- package/src/ui/AInputCurrency/compositionAPI/InputEventsAPI.js +751 -751
- package/src/ui/AInputCurrency/compositionAPI/ModelAPI.js +88 -88
- package/src/ui/AInputCurrency/compositionAPI/UtilsAPI.js +54 -54
- package/src/ui/AInputFile/AInputFile.js +247 -247
- package/src/ui/AInputNumber/AInputNumber.js +497 -497
- package/src/ui/AInputNumber/compositionAPI/InputEventsAPI.js +196 -196
- package/src/ui/AInputNumber/compositionAPI/ModelAPI.js +72 -72
- package/src/ui/AInputNumberRange/AInputNumberRange.js +517 -517
- package/src/ui/AJson/AJson.js +434 -434
- package/src/ui/ALabel/ALabel.js +0 -0
- package/src/ui/AMultiselectOrdered/AMultiselectOrdered.js +935 -935
- package/src/ui/AOneCheckbox/AOneCheckbox.js +366 -366
- package/src/ui/ARadio/ARadio.js +924 -924
- package/src/ui/ARadio/ARadioItem/ARadioItem.js +0 -0
- package/src/ui/ARequired/ARequired.js +0 -0
- package/src/ui/ARouterLinkConfig/ARouterLinkConfig.js +391 -391
- package/src/ui/ARouterLinkConfig/compositionAPI/DataFormAPI.js +102 -102
- package/src/ui/ARouterLinkConfig/compositionAPI/ModelLocalAPI.js +96 -96
- package/src/ui/ARouterLinkConfig/compositionAPI/RouteAPI.js +51 -51
- package/src/ui/ASelect/ASelect.js +1339 -1339
- package/src/ui/ASelect/ASelectElement/ASelectElement.js +0 -0
- package/src/ui/ASelect/ASelectValueCloseable/ASelectValueCloseable.js +1 -1
- package/src/ui/ASelect/ASelectValueCloseable/compositionAPI/CloseAPI.js +28 -28
- package/src/ui/ASelect/compositionAPI/ToggleAPI.js +255 -255
- package/src/ui/ASelect/i18n/ar.json +6 -6
- package/src/ui/ASelect/i18n/de.json +7 -7
- package/src/ui/ASelect/i18n/en.json +6 -6
- package/src/ui/ASelect/i18n/es.json +6 -6
- package/src/ui/ASelect/i18n/fr.json +6 -6
- package/src/ui/ASelect/i18n/hr.json +6 -6
- package/src/ui/ASelect/i18n/it.json +6 -6
- package/src/ui/ASelect/i18n/ru.json +6 -6
- package/src/ui/ASelectIcon/ASelectIcon.js +386 -386
- package/src/ui/ASelectStyle/ASelectStyle.js +391 -391
- package/src/ui/ASelectStyle/compositionAPI/DataAPI.js +68 -68
- package/src/ui/ASelectStyle/compositionAPI/EventsAPI.js +24 -24
- package/src/ui/ASelectStyle/compositionAPI/KeyLabelCallbackAPI.js +15 -15
- package/src/ui/ASelectStyle/compositionAPI/TypeAPI.js +24 -24
- package/src/ui/ASelectStyle/i18n/ASelectStyleI18n.js +19 -19
- package/src/ui/ASelectStyle/i18n/ar.json +277 -277
- package/src/ui/ASelectStyle/i18n/de.json +277 -277
- package/src/ui/ASelectStyle/i18n/en.json +277 -277
- package/src/ui/ASelectStyle/i18n/es.json +277 -277
- package/src/ui/ASelectStyle/i18n/fr.json +277 -277
- package/src/ui/ASelectStyle/i18n/hr.json +277 -277
- package/src/ui/ASelectStyle/i18n/it.json +277 -277
- package/src/ui/ASelectStyle/i18n/ru.json +277 -277
- package/src/ui/ASlider/ASlider.js +672 -672
- package/src/ui/ASlider/compositionAPI/AriaAttributesAPI.js +121 -121
- package/src/ui/ASlider/compositionAPI/AttributesAPI.js +15 -15
- package/src/ui/ASlider/compositionAPI/DataAPI.js +115 -115
- package/src/ui/ASlider/compositionAPI/DragAndDropAPI.js +198 -198
- package/src/ui/ASlider/compositionAPI/LabelAPI.js +13 -13
- package/src/ui/ASlider/compositionAPI/MarksAPI.js +32 -32
- package/src/ui/ASlider/compositionAPI/SliderAPI.js +289 -289
- package/src/ui/ASlider/compositionAPI/StopsAPI.js +47 -47
- package/src/ui/ASlider/compositionAPI/StylesAPI.js +79 -79
- package/src/ui/ASlider/compositionAPI/TitleAPI.js +42 -42
- package/src/ui/ASlider/i18n/ASliderI18n.js +19 -19
- package/src/ui/ASlider/i18n/en.json +4 -4
- package/src/ui/ASwitch/ASwitch.js +442 -442
- package/src/ui/ATemplate/ATemplate.js +0 -0
- package/src/ui/ATextarea/ATextarea.js +437 -437
- package/src/ui/AUiComponents.js +59 -59
- package/src/ui/AUiContainerComponents.js +12 -12
- package/src/ui/AValidatedJson/AValidatedJson.js +594 -594
- package/src/ui/AValidatedJson/AValidatedJsonItem/compositionAPI/DeleteAPI.js +63 -63
- package/src/ui/AValidatedJson/AValidatedJsonItem/compositionAPI/DetailsAPI.js +59 -59
- package/src/ui/AValidatedJson/AValidatedJsonItem/compositionAPI/MoveAPI.js +50 -50
- package/src/ui/AValidatedJson/AValidatedJsonItem/compositionAPI/UpdateAPI.js +48 -48
- package/src/ui/AValidatedJson/AValidatedJsonModalCreateOrUpdate/composiitionAPI/DataFormAPI.js +69 -69
- package/src/ui/AValidatedJson/AValidatedJsonModalCreateOrUpdate/composiitionAPI/DisabledAPI.js +35 -35
- package/src/ui/AValidatedJson/AValidatedJsonModalCreateOrUpdate/composiitionAPI/ModelAPI.js +31 -31
- package/src/ui/AValidatedJson/AValidatedJsonModalCreateOrUpdate/composiitionAPI/SaveAPI.js +115 -115
- package/src/ui/AValidatedJson/AValidatedJsonModalCreateOrUpdate/composiitionAPI/TextAPI.js +25 -25
- package/src/ui/AValidatedJson/compositionAPI/AValidatedJsonErrorLabelsAPI.js +18 -18
- package/src/ui/AValidatedJson/compositionAPI/AttributesAPI.js +15 -15
- package/src/ui/AValidatedJson/compositionAPI/ChildrenAPI.js +70 -70
- package/src/ui/AValidatedJson/compositionAPI/EventsAPI.js +19 -19
- package/src/ui/AValidatedJson/compositionAPI/JsonModeAPI.js +119 -119
- package/src/ui/AValidatedJson/compositionAPI/ListModeAPI.js +144 -144
- package/src/ui/AValidatedJson/compositionAPI/ModelAPI.js +38 -38
- package/src/ui/AValidatedJson/compositionAPI/SingleModeAPI.js +112 -112
- package/src/ui/AValidatedJson/compositionAPI/TranslateAPI.js +22 -22
- package/src/ui/AValidatedJson/i18n/AValidatedJsonI18n.js +19 -19
- package/src/ui/AValidatedJson/i18n/ar.json +3 -3
- package/src/ui/AValidatedJson/i18n/de.json +22 -22
- package/src/ui/AValidatedJson/i18n/en.json +3 -3
- package/src/ui/AValidatedJson/i18n/es.json +3 -3
- package/src/ui/AValidatedJson/i18n/fr.json +3 -3
- package/src/ui/AValidatedJson/i18n/hr.json +3 -3
- package/src/ui/AValidatedJson/i18n/it.json +3 -3
- package/src/ui/AValidatedJson/i18n/ru.json +6 -6
- package/src/ui/compositionApi/UIDataGroupAPI.js +94 -94
- package/src/ui/compositionApi/UiAPI.js +185 -185
- package/src/ui/compositionApi/UiClearButtonAPI.js +19 -19
- package/src/ui/compositionApi/UiDataSortAPI.js +29 -29
- package/src/ui/compositionApi/UiDataWithKeyIdAndLabelAPI.js +155 -155
- package/src/ui/const/AUiTypes.js +69 -69
- package/src/ui/mixins/UiMixinProps.js +129 -129
- package/src/ui/utils/utils.js +79 -79
- package/src/utils/__tests__/utils.aOrderBy.test.js +237 -237
- package/src/utils/__tests__/utils.aSortBy.test.js +331 -331
- package/src/utils/__tests__/utilsArray.aFirst.test.js +54 -54
- package/src/utils/__tests__/utilsArray.aLast.test.js +54 -54
- package/src/utils/__tests__/utilsLang.isArguments.test.js +52 -52
- package/src/utils/__tests__/utilsLang.isArray.test.js +50 -50
- package/src/utils/__tests__/utilsLang.isArrayBuffer.test.js +48 -48
- package/src/utils/__tests__/utilsLang.isBoolean.test.js +56 -56
- package/src/utils/__tests__/utilsLang.isBuffer.test.js +47 -47
- package/src/utils/__tests__/utilsLang.isDate.test.js +54 -54
- package/src/utils/__tests__/utilsLang.isElement.test.js +53 -53
- package/src/utils/__tests__/utilsLang.isError.test.js +52 -52
- package/src/utils/__tests__/utilsLang.isFinite.test.js +57 -57
- package/src/utils/__tests__/utilsLang.isFunction.test.js +46 -46
- package/src/utils/__tests__/utilsLang.isInteger.test.js +58 -58
- package/src/utils/__tests__/utilsLang.isMap.test.js +50 -50
- package/src/utils/__tests__/utilsLang.isNaN.test.js +55 -55
- package/src/utils/__tests__/utilsLang.isNil.test.js +57 -57
- package/src/utils/__tests__/utilsLang.isNull.test.js +53 -53
- package/src/utils/__tests__/utilsLang.isNumber.test.js +54 -54
- package/src/utils/__tests__/utilsLang.isObject.test.js +49 -49
- package/src/utils/__tests__/utilsLang.isObjectLike.test.js +45 -45
- package/src/utils/__tests__/utilsLang.isPlainObject.test.js +60 -60
- package/src/utils/__tests__/utilsLang.isPromise.test.js +93 -93
- package/src/utils/__tests__/utilsLang.isRegExp.test.js +46 -46
- package/src/utils/__tests__/utilsLang.isSet.test.js +50 -50
- package/src/utils/__tests__/utilsLang.isString.test.js +50 -50
- package/src/utils/__tests__/utilsLang.isSymbol.test.js +45 -45
- package/src/utils/__tests__/utilsLang.isUndefined.test.js +57 -57
- package/src/utils/__tests__/utilsLang.isWeakMap.test.js +49 -49
- package/src/utils/__tests__/utilsLang.isWeakSet.test.js +49 -49
- package/src/utils/actions.js +67 -67
- package/src/utils/autosize.js +277 -277
- package/src/utils/isBrowser.js +12 -12
- package/src/utils/utils.js +253 -253
- package/src/utils/utilsArray.js +29 -29
- package/src/utils/utilsDOM.js +188 -188
- package/src/utils/utilsLang.js +346 -346
|
@@ -1,544 +1,544 @@
|
|
|
1
|
-
import {
|
|
2
|
-
h,
|
|
3
|
-
onBeforeUnmount,
|
|
4
|
-
onMounted,
|
|
5
|
-
ref,
|
|
6
|
-
Teleport,
|
|
7
|
-
toRef,
|
|
8
|
-
withDirectives,
|
|
9
|
-
} from "vue";
|
|
10
|
-
import {
|
|
11
|
-
AElement,
|
|
12
|
-
AIcon,
|
|
13
|
-
AOnHooks,
|
|
14
|
-
APlacements,
|
|
15
|
-
focusableSelector,
|
|
16
|
-
} from "../index";
|
|
17
|
-
|
|
18
|
-
import APopupAPI from "../compositionAPI/APopupAPI";
|
|
19
|
-
import ActionsAPI from "./compositionAPI/ActionsAPI";
|
|
20
|
-
import AttributesAPI from "./compositionAPI/AttributesAPI";
|
|
21
|
-
import ClassAPI from "./compositionAPI/ClassAPI";
|
|
22
|
-
import EventsAPI from "./compositionAPI/EventsAPI";
|
|
23
|
-
import FocusAPI from "./compositionAPI/FocusAPI";
|
|
24
|
-
import PopoverAPI from "./compositionAPI/PopoverAPI";
|
|
25
|
-
import PopperContainerAPI from "../ATooltip/compositionAPI/PopperContainerAPI";
|
|
26
|
-
import RefsAPI from "./compositionAPI/RefsAPI";
|
|
27
|
-
import ToggleAPI from "./compositionAPI/ToggleAPI";
|
|
28
|
-
|
|
29
|
-
import ADropdownGroup from "./ADropdownGroup";
|
|
30
|
-
import ChevronDown from "aloha-svg/dist/js/bootstrap/ChevronDown";
|
|
31
|
-
import {
|
|
32
|
-
difference,
|
|
33
|
-
uniqueId,
|
|
34
|
-
} from "lodash-es";
|
|
35
|
-
|
|
36
|
-
export default {
|
|
37
|
-
name: "ADropdown",
|
|
38
|
-
inheritAttrs: false,
|
|
39
|
-
props: {
|
|
40
|
-
actions: {
|
|
41
|
-
type: Array,
|
|
42
|
-
required: false,
|
|
43
|
-
default: () => [],
|
|
44
|
-
},
|
|
45
|
-
alwaysTranslate: {
|
|
46
|
-
type: Boolean,
|
|
47
|
-
required: false,
|
|
48
|
-
},
|
|
49
|
-
buttonAttributes: {
|
|
50
|
-
type: Object,
|
|
51
|
-
required: false,
|
|
52
|
-
default: () => ({}),
|
|
53
|
-
},
|
|
54
|
-
buttonClass: {
|
|
55
|
-
type: [String, Object],
|
|
56
|
-
required: false,
|
|
57
|
-
default: "a_btn a_btn_secondary",
|
|
58
|
-
},
|
|
59
|
-
buttonIconAttributes: {
|
|
60
|
-
type: Object,
|
|
61
|
-
required: false,
|
|
62
|
-
default: () => ({}),
|
|
63
|
-
},
|
|
64
|
-
buttonIconClass: {
|
|
65
|
-
type: String,
|
|
66
|
-
required: false,
|
|
67
|
-
default: undefined,
|
|
68
|
-
},
|
|
69
|
-
buttonIconLeft: {
|
|
70
|
-
type: [String, Object],
|
|
71
|
-
required: false,
|
|
72
|
-
default: undefined,
|
|
73
|
-
},
|
|
74
|
-
buttonIconRight: {
|
|
75
|
-
type: [String, Object],
|
|
76
|
-
required: false,
|
|
77
|
-
default: undefined,
|
|
78
|
-
},
|
|
79
|
-
buttonIconTag: {
|
|
80
|
-
type: String,
|
|
81
|
-
required: false,
|
|
82
|
-
default: undefined,
|
|
83
|
-
},
|
|
84
|
-
buttonIsTitleHtml: {
|
|
85
|
-
type: Boolean,
|
|
86
|
-
required: false,
|
|
87
|
-
},
|
|
88
|
-
buttonLoading: {
|
|
89
|
-
type: Boolean,
|
|
90
|
-
required: false,
|
|
91
|
-
default: false,
|
|
92
|
-
},
|
|
93
|
-
buttonLoadingAlign: {
|
|
94
|
-
type: String,
|
|
95
|
-
required: false,
|
|
96
|
-
default: "right",
|
|
97
|
-
validator: value => ["right", "left"].indexOf(value) !== -1,
|
|
98
|
-
},
|
|
99
|
-
buttonLoadingClass: {
|
|
100
|
-
type: [String, Object],
|
|
101
|
-
required: false,
|
|
102
|
-
default: "a_spinner_small",
|
|
103
|
-
},
|
|
104
|
-
buttonPrevent: {
|
|
105
|
-
type: Boolean,
|
|
106
|
-
required: false,
|
|
107
|
-
},
|
|
108
|
-
buttonStop: {
|
|
109
|
-
type: Boolean,
|
|
110
|
-
required: false,
|
|
111
|
-
},
|
|
112
|
-
buttonTag: {
|
|
113
|
-
type: String,
|
|
114
|
-
required: false,
|
|
115
|
-
default: "button",
|
|
116
|
-
},
|
|
117
|
-
buttonText: {
|
|
118
|
-
type: [String, Number, Object, Array],
|
|
119
|
-
required: false,
|
|
120
|
-
default: undefined,
|
|
121
|
-
},
|
|
122
|
-
buttonTextAriaHidden: {
|
|
123
|
-
type: Boolean,
|
|
124
|
-
required: false,
|
|
125
|
-
default: false,
|
|
126
|
-
},
|
|
127
|
-
buttonTextClass: {
|
|
128
|
-
type: String,
|
|
129
|
-
required: false,
|
|
130
|
-
default: undefined,
|
|
131
|
-
},
|
|
132
|
-
buttonTextScreenReader: {
|
|
133
|
-
type: [String, Number, Object, Array],
|
|
134
|
-
required: false,
|
|
135
|
-
default: undefined,
|
|
136
|
-
},
|
|
137
|
-
buttonTitle: {
|
|
138
|
-
type: [String, Number, Object, Array],
|
|
139
|
-
required: false,
|
|
140
|
-
default: undefined,
|
|
141
|
-
},
|
|
142
|
-
buttonTitlePlacement: {
|
|
143
|
-
type: String,
|
|
144
|
-
required: false,
|
|
145
|
-
default: "top",
|
|
146
|
-
validator: value => ["top", "left", "bottom", "right"].indexOf(value) !== -1,
|
|
147
|
-
},
|
|
148
|
-
caretIcon: {
|
|
149
|
-
type: String,
|
|
150
|
-
required: false,
|
|
151
|
-
default: ChevronDown,
|
|
152
|
-
},
|
|
153
|
-
class: {
|
|
154
|
-
type: [String, Object],
|
|
155
|
-
required: false,
|
|
156
|
-
default: undefined,
|
|
157
|
-
},
|
|
158
|
-
disabled: {
|
|
159
|
-
type: Boolean,
|
|
160
|
-
required: false,
|
|
161
|
-
},
|
|
162
|
-
dropdownAttributes: {
|
|
163
|
-
type: Object,
|
|
164
|
-
required: false,
|
|
165
|
-
default: () => ({}),
|
|
166
|
-
},
|
|
167
|
-
dropdownClass: {
|
|
168
|
-
type: String,
|
|
169
|
-
required: false,
|
|
170
|
-
default: undefined,
|
|
171
|
-
},
|
|
172
|
-
dropdownRenderDefault: {
|
|
173
|
-
type: Boolean,
|
|
174
|
-
required: false,
|
|
175
|
-
},
|
|
176
|
-
dropdownTag: {
|
|
177
|
-
type: String,
|
|
178
|
-
required: false,
|
|
179
|
-
default: "ul",
|
|
180
|
-
},
|
|
181
|
-
elementsForArrows: {
|
|
182
|
-
type: String,
|
|
183
|
-
required: false,
|
|
184
|
-
default: focusableSelector,
|
|
185
|
-
},
|
|
186
|
-
extra: {
|
|
187
|
-
type: Object,
|
|
188
|
-
required: false,
|
|
189
|
-
default: undefined,
|
|
190
|
-
},
|
|
191
|
-
keyGroup: {
|
|
192
|
-
type: [String, Number, Array],
|
|
193
|
-
required: false,
|
|
194
|
-
default: undefined,
|
|
195
|
-
},
|
|
196
|
-
keyGroupLabelCallback: {
|
|
197
|
-
type: Function,
|
|
198
|
-
required: false,
|
|
199
|
-
default: undefined,
|
|
200
|
-
},
|
|
201
|
-
floatingFlip: {
|
|
202
|
-
type: Object,
|
|
203
|
-
required: false,
|
|
204
|
-
|
|
205
|
-
/*
|
|
206
|
-
* mainAxis?: boolean;
|
|
207
|
-
* crossAxis?: boolean;
|
|
208
|
-
* fallbackAxisSideDirection?: 'none' | 'start' | 'end';
|
|
209
|
-
* flipAlignment?: boolean;
|
|
210
|
-
* fallbackPlacements?: Array<Placement>;
|
|
211
|
-
* fallbackStrategy?: 'bestFit' | 'initialPlacement';
|
|
212
|
-
*/
|
|
213
|
-
default: () => ({}),
|
|
214
|
-
},
|
|
215
|
-
floatingShift: {
|
|
216
|
-
type: Object,
|
|
217
|
-
required: false,
|
|
218
|
-
default: () => ({
|
|
219
|
-
use: true,
|
|
220
|
-
crossAxis: true,
|
|
221
|
-
padding: 20,
|
|
222
|
-
}),
|
|
223
|
-
},
|
|
224
|
-
hasCaret: {
|
|
225
|
-
type: Boolean,
|
|
226
|
-
required: false,
|
|
227
|
-
default: true,
|
|
228
|
-
},
|
|
229
|
-
id: {
|
|
230
|
-
type: String,
|
|
231
|
-
required: false,
|
|
232
|
-
default: () => uniqueId("a_dropdown_"),
|
|
233
|
-
},
|
|
234
|
-
inBody: {
|
|
235
|
-
type: Boolean,
|
|
236
|
-
required: false,
|
|
237
|
-
default: false,
|
|
238
|
-
},
|
|
239
|
-
isCloseByClickInside: {
|
|
240
|
-
type: Boolean,
|
|
241
|
-
required: false,
|
|
242
|
-
default: true,
|
|
243
|
-
},
|
|
244
|
-
isCloseByClickOutside: {
|
|
245
|
-
type: Boolean,
|
|
246
|
-
required: false,
|
|
247
|
-
default: true,
|
|
248
|
-
},
|
|
249
|
-
isCloseByButtonInvisibleInViewport: {
|
|
250
|
-
type: Boolean,
|
|
251
|
-
required: false,
|
|
252
|
-
default: true,
|
|
253
|
-
},
|
|
254
|
-
isHideWithoutActionAndSlot: {
|
|
255
|
-
type: Boolean,
|
|
256
|
-
required: false,
|
|
257
|
-
default: true,
|
|
258
|
-
},
|
|
259
|
-
isListWidthSameWithButton: {
|
|
260
|
-
type: Boolean,
|
|
261
|
-
required: false,
|
|
262
|
-
},
|
|
263
|
-
lockArrowsNavigation: {
|
|
264
|
-
type: Boolean,
|
|
265
|
-
required: false,
|
|
266
|
-
default: true,
|
|
267
|
-
},
|
|
268
|
-
lockTabNavigation: {
|
|
269
|
-
type: Boolean,
|
|
270
|
-
required: false,
|
|
271
|
-
default: true,
|
|
272
|
-
},
|
|
273
|
-
menuWidth: {
|
|
274
|
-
type: Number,
|
|
275
|
-
required: false,
|
|
276
|
-
default: undefined,
|
|
277
|
-
},
|
|
278
|
-
persist: {
|
|
279
|
-
type: Boolean,
|
|
280
|
-
required: false,
|
|
281
|
-
default: true,
|
|
282
|
-
},
|
|
283
|
-
placement: {
|
|
284
|
-
type: String,
|
|
285
|
-
required: false,
|
|
286
|
-
default: "bottom-start",
|
|
287
|
-
validator: placement => APlacements.indexOf(placement) !== -1,
|
|
288
|
-
},
|
|
289
|
-
popperContainerId: {
|
|
290
|
-
type: String,
|
|
291
|
-
required: false,
|
|
292
|
-
default: "a_tooltip_container",
|
|
293
|
-
},
|
|
294
|
-
readonly: {
|
|
295
|
-
type: Boolean,
|
|
296
|
-
required: false,
|
|
297
|
-
default: false,
|
|
298
|
-
},
|
|
299
|
-
sortOrderGroup: {
|
|
300
|
-
type: String,
|
|
301
|
-
required: false,
|
|
302
|
-
default: undefined,
|
|
303
|
-
validator: value => ["asc", "desc"].indexOf(value) !== -1,
|
|
304
|
-
},
|
|
305
|
-
triggers: {
|
|
306
|
-
type: Array,
|
|
307
|
-
required: false,
|
|
308
|
-
default: () => ["click"],
|
|
309
|
-
validator: value => difference(value, ["click", "hover", "focus"]).length === 0,
|
|
310
|
-
},
|
|
311
|
-
useEscape: {
|
|
312
|
-
type: Boolean,
|
|
313
|
-
required: false,
|
|
314
|
-
default: true,
|
|
315
|
-
},
|
|
316
|
-
useRem: {
|
|
317
|
-
type: Boolean,
|
|
318
|
-
required: false,
|
|
319
|
-
default: true,
|
|
320
|
-
},
|
|
321
|
-
},
|
|
322
|
-
emits: [
|
|
323
|
-
"open",
|
|
324
|
-
"close",
|
|
325
|
-
],
|
|
326
|
-
setup(props, context) {
|
|
327
|
-
const id = toRef(props, "id");
|
|
328
|
-
|
|
329
|
-
const isMounted = ref(false);
|
|
330
|
-
|
|
331
|
-
const {
|
|
332
|
-
closePopup,
|
|
333
|
-
openPopup,
|
|
334
|
-
} = APopupAPI();
|
|
335
|
-
|
|
336
|
-
const {
|
|
337
|
-
dropdownButtonRef,
|
|
338
|
-
dropdownRef,
|
|
339
|
-
} = RefsAPI();
|
|
340
|
-
|
|
341
|
-
const {
|
|
342
|
-
setFocusToFirstElement,
|
|
343
|
-
} = FocusAPI(props, {
|
|
344
|
-
dropdownRef,
|
|
345
|
-
});
|
|
346
|
-
|
|
347
|
-
const {
|
|
348
|
-
destroyPopover,
|
|
349
|
-
startPopper,
|
|
350
|
-
} = PopoverAPI(props, {
|
|
351
|
-
dropdownButtonRef,
|
|
352
|
-
dropdownRef,
|
|
353
|
-
onReferenceHidden,
|
|
354
|
-
});
|
|
355
|
-
|
|
356
|
-
const {
|
|
357
|
-
buttonWidth,
|
|
358
|
-
destroyEventCloseClick,
|
|
359
|
-
destroyEventPressArrows,
|
|
360
|
-
initWasOpened,
|
|
361
|
-
onClose,
|
|
362
|
-
onKeydown,
|
|
363
|
-
onOpen,
|
|
364
|
-
onToggle,
|
|
365
|
-
statusExpanded,
|
|
366
|
-
timerCloseHover,
|
|
367
|
-
triggerOpen,
|
|
368
|
-
wasOpened,
|
|
369
|
-
} = ToggleAPI(props, context, {
|
|
370
|
-
closePopup,
|
|
371
|
-
destroyPopover,
|
|
372
|
-
dropdownButtonRef,
|
|
373
|
-
dropdownRef,
|
|
374
|
-
openPopup,
|
|
375
|
-
setFocusToFirstElement,
|
|
376
|
-
startPopper,
|
|
377
|
-
});
|
|
378
|
-
|
|
379
|
-
const {
|
|
380
|
-
eventsLocal,
|
|
381
|
-
eventsMenu,
|
|
382
|
-
} = EventsAPI(props, {
|
|
383
|
-
onToggle,
|
|
384
|
-
onKeydown,
|
|
385
|
-
onOpen,
|
|
386
|
-
onClose,
|
|
387
|
-
timerCloseHover,
|
|
388
|
-
triggerOpen,
|
|
389
|
-
});
|
|
390
|
-
|
|
391
|
-
const {
|
|
392
|
-
idLocal,
|
|
393
|
-
buttonAttributesDisabled,
|
|
394
|
-
buttonAttributesLocal,
|
|
395
|
-
buttonTagLocal,
|
|
396
|
-
dropdownAttributesLocal,
|
|
397
|
-
isMenuRendered,
|
|
398
|
-
} = AttributesAPI(props, {
|
|
399
|
-
eventsMenu,
|
|
400
|
-
statusExpanded,
|
|
401
|
-
wasOpened,
|
|
402
|
-
});
|
|
403
|
-
|
|
404
|
-
const {
|
|
405
|
-
actionsFiltered,
|
|
406
|
-
hasActions,
|
|
407
|
-
} = ActionsAPI(props);
|
|
408
|
-
|
|
409
|
-
const {
|
|
410
|
-
addPopperContainerInBody,
|
|
411
|
-
popperContainerIdSelector,
|
|
412
|
-
} = PopperContainerAPI(props);
|
|
413
|
-
|
|
414
|
-
const {
|
|
415
|
-
buttonClassLocal,
|
|
416
|
-
} = ClassAPI(props);
|
|
417
|
-
|
|
418
|
-
function onReferenceHidden() {
|
|
419
|
-
onClose({
|
|
420
|
-
isFocusButton: false,
|
|
421
|
-
trigger: "referenceHidden",
|
|
422
|
-
});
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
initWasOpened();
|
|
426
|
-
|
|
427
|
-
onMounted(() => {
|
|
428
|
-
isMounted.value = true;
|
|
429
|
-
addPopperContainerInBody();
|
|
430
|
-
});
|
|
431
|
-
|
|
432
|
-
onBeforeUnmount(() => {
|
|
433
|
-
destroyEventCloseClick();
|
|
434
|
-
destroyEventPressArrows();
|
|
435
|
-
destroyPopover();
|
|
436
|
-
closePopup({
|
|
437
|
-
id: id.value,
|
|
438
|
-
});
|
|
439
|
-
});
|
|
440
|
-
|
|
441
|
-
return {
|
|
442
|
-
actionsFiltered,
|
|
443
|
-
buttonAttributesDisabled,
|
|
444
|
-
buttonAttributesLocal,
|
|
445
|
-
buttonClassLocal,
|
|
446
|
-
buttonTagLocal,
|
|
447
|
-
buttonWidth,
|
|
448
|
-
dropdownAttributesLocal,
|
|
449
|
-
dropdownButtonRef,
|
|
450
|
-
dropdownRef,
|
|
451
|
-
eventsLocal,
|
|
452
|
-
hasActions,
|
|
453
|
-
idLocal,
|
|
454
|
-
isMenuRendered,
|
|
455
|
-
isMounted,
|
|
456
|
-
onClose,
|
|
457
|
-
onOpen,
|
|
458
|
-
popperContainerIdSelector,
|
|
459
|
-
startPopper,
|
|
460
|
-
statusExpanded,
|
|
461
|
-
};
|
|
462
|
-
},
|
|
463
|
-
render() {
|
|
464
|
-
if (!this.isMounted) {
|
|
465
|
-
return null;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
if (this.isHideWithoutActionAndSlot &&
|
|
469
|
-
!this.hasActions &&
|
|
470
|
-
!this.$slots.dropdown) {
|
|
471
|
-
return null;
|
|
472
|
-
}
|
|
473
|
-
return [
|
|
474
|
-
h(AElement, {
|
|
475
|
-
ref: "dropdownButtonRef",
|
|
476
|
-
...this.$attrs,
|
|
477
|
-
id: this.idLocal,
|
|
478
|
-
alwaysTranslate: this.alwaysTranslate,
|
|
479
|
-
tag: this.buttonTagLocal,
|
|
480
|
-
class: this.buttonClassLocal,
|
|
481
|
-
text: this.buttonText,
|
|
482
|
-
textScreenReader: this.buttonTextScreenReader,
|
|
483
|
-
textAriaHidden: this.buttonTextAriaHidden,
|
|
484
|
-
textClass: this.buttonTextClass,
|
|
485
|
-
title: this.buttonTitle,
|
|
486
|
-
isTitleHtml: this.buttonIsTitleHtml,
|
|
487
|
-
titlePlacement: this.buttonTitlePlacement,
|
|
488
|
-
loading: this.buttonLoading,
|
|
489
|
-
loadingClass: this.buttonLoadingClass,
|
|
490
|
-
loadingAlign: this.buttonLoadingAlign,
|
|
491
|
-
iconLeft: this.buttonIconLeft,
|
|
492
|
-
iconRight: this.buttonIconRight,
|
|
493
|
-
iconClass: this.buttonIconClass,
|
|
494
|
-
iconAttributes: this.buttonIconAttributes,
|
|
495
|
-
iconTag: this.buttonIconTag,
|
|
496
|
-
prevent: this.buttonPrevent,
|
|
497
|
-
stop: this.buttonStop,
|
|
498
|
-
extra: this.extra,
|
|
499
|
-
type: "button",
|
|
500
|
-
attributes: this.buttonAttributesLocal,
|
|
501
|
-
...this.buttonAttributesDisabled,
|
|
502
|
-
...this.eventsLocal,
|
|
503
|
-
}, {
|
|
504
|
-
default: () => {
|
|
505
|
-
return this.$slots.button && this.$slots.button();
|
|
506
|
-
},
|
|
507
|
-
buttonAppend: () => {
|
|
508
|
-
return this.hasCaret && !this.readonly && h(AIcon, {
|
|
509
|
-
class: "a_dropdown__caret",
|
|
510
|
-
icon: this.caretIcon,
|
|
511
|
-
});
|
|
512
|
-
},
|
|
513
|
-
}),
|
|
514
|
-
h(Teleport, {
|
|
515
|
-
to: this.popperContainerIdSelector,
|
|
516
|
-
disabled: !this.inBody,
|
|
517
|
-
}, [
|
|
518
|
-
this.isMenuRendered && withDirectives(h(
|
|
519
|
-
"div",
|
|
520
|
-
{
|
|
521
|
-
ref: "dropdownRef",
|
|
522
|
-
"aria-labelledby": this.idLocal,
|
|
523
|
-
ariaHidden: !this.statusExpanded,
|
|
524
|
-
...this.dropdownAttributesLocal,
|
|
525
|
-
},
|
|
526
|
-
[
|
|
527
|
-
h(this.dropdownTag, {}, [
|
|
528
|
-
this.$slots.dropdown && this.$slots.dropdown(),
|
|
529
|
-
this.hasActions && h(ADropdownGroup, {
|
|
530
|
-
actions: this.actionsFiltered,
|
|
531
|
-
alwaysTranslate: this.alwaysTranslate,
|
|
532
|
-
dropdownId: this.idLocal,
|
|
533
|
-
}, this.$slots),
|
|
534
|
-
]),
|
|
535
|
-
],
|
|
536
|
-
), [
|
|
537
|
-
[AOnHooks, {
|
|
538
|
-
mounted: this.startPopper,
|
|
539
|
-
}],
|
|
540
|
-
]),
|
|
541
|
-
]),
|
|
542
|
-
];
|
|
543
|
-
},
|
|
544
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
h,
|
|
3
|
+
onBeforeUnmount,
|
|
4
|
+
onMounted,
|
|
5
|
+
ref,
|
|
6
|
+
Teleport,
|
|
7
|
+
toRef,
|
|
8
|
+
withDirectives,
|
|
9
|
+
} from "vue";
|
|
10
|
+
import {
|
|
11
|
+
AElement,
|
|
12
|
+
AIcon,
|
|
13
|
+
AOnHooks,
|
|
14
|
+
APlacements,
|
|
15
|
+
focusableSelector,
|
|
16
|
+
} from "../index";
|
|
17
|
+
|
|
18
|
+
import APopupAPI from "../compositionAPI/APopupAPI";
|
|
19
|
+
import ActionsAPI from "./compositionAPI/ActionsAPI";
|
|
20
|
+
import AttributesAPI from "./compositionAPI/AttributesAPI";
|
|
21
|
+
import ClassAPI from "./compositionAPI/ClassAPI";
|
|
22
|
+
import EventsAPI from "./compositionAPI/EventsAPI";
|
|
23
|
+
import FocusAPI from "./compositionAPI/FocusAPI";
|
|
24
|
+
import PopoverAPI from "./compositionAPI/PopoverAPI";
|
|
25
|
+
import PopperContainerAPI from "../ATooltip/compositionAPI/PopperContainerAPI";
|
|
26
|
+
import RefsAPI from "./compositionAPI/RefsAPI";
|
|
27
|
+
import ToggleAPI from "./compositionAPI/ToggleAPI";
|
|
28
|
+
|
|
29
|
+
import ADropdownGroup from "./ADropdownGroup";
|
|
30
|
+
import ChevronDown from "aloha-svg/dist/js/bootstrap/ChevronDown";
|
|
31
|
+
import {
|
|
32
|
+
difference,
|
|
33
|
+
uniqueId,
|
|
34
|
+
} from "lodash-es";
|
|
35
|
+
|
|
36
|
+
export default {
|
|
37
|
+
name: "ADropdown",
|
|
38
|
+
inheritAttrs: false,
|
|
39
|
+
props: {
|
|
40
|
+
actions: {
|
|
41
|
+
type: Array,
|
|
42
|
+
required: false,
|
|
43
|
+
default: () => [],
|
|
44
|
+
},
|
|
45
|
+
alwaysTranslate: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
required: false,
|
|
48
|
+
},
|
|
49
|
+
buttonAttributes: {
|
|
50
|
+
type: Object,
|
|
51
|
+
required: false,
|
|
52
|
+
default: () => ({}),
|
|
53
|
+
},
|
|
54
|
+
buttonClass: {
|
|
55
|
+
type: [String, Object],
|
|
56
|
+
required: false,
|
|
57
|
+
default: "a_btn a_btn_secondary",
|
|
58
|
+
},
|
|
59
|
+
buttonIconAttributes: {
|
|
60
|
+
type: Object,
|
|
61
|
+
required: false,
|
|
62
|
+
default: () => ({}),
|
|
63
|
+
},
|
|
64
|
+
buttonIconClass: {
|
|
65
|
+
type: String,
|
|
66
|
+
required: false,
|
|
67
|
+
default: undefined,
|
|
68
|
+
},
|
|
69
|
+
buttonIconLeft: {
|
|
70
|
+
type: [String, Object],
|
|
71
|
+
required: false,
|
|
72
|
+
default: undefined,
|
|
73
|
+
},
|
|
74
|
+
buttonIconRight: {
|
|
75
|
+
type: [String, Object],
|
|
76
|
+
required: false,
|
|
77
|
+
default: undefined,
|
|
78
|
+
},
|
|
79
|
+
buttonIconTag: {
|
|
80
|
+
type: String,
|
|
81
|
+
required: false,
|
|
82
|
+
default: undefined,
|
|
83
|
+
},
|
|
84
|
+
buttonIsTitleHtml: {
|
|
85
|
+
type: Boolean,
|
|
86
|
+
required: false,
|
|
87
|
+
},
|
|
88
|
+
buttonLoading: {
|
|
89
|
+
type: Boolean,
|
|
90
|
+
required: false,
|
|
91
|
+
default: false,
|
|
92
|
+
},
|
|
93
|
+
buttonLoadingAlign: {
|
|
94
|
+
type: String,
|
|
95
|
+
required: false,
|
|
96
|
+
default: "right",
|
|
97
|
+
validator: value => ["right", "left"].indexOf(value) !== -1,
|
|
98
|
+
},
|
|
99
|
+
buttonLoadingClass: {
|
|
100
|
+
type: [String, Object],
|
|
101
|
+
required: false,
|
|
102
|
+
default: "a_spinner_small",
|
|
103
|
+
},
|
|
104
|
+
buttonPrevent: {
|
|
105
|
+
type: Boolean,
|
|
106
|
+
required: false,
|
|
107
|
+
},
|
|
108
|
+
buttonStop: {
|
|
109
|
+
type: Boolean,
|
|
110
|
+
required: false,
|
|
111
|
+
},
|
|
112
|
+
buttonTag: {
|
|
113
|
+
type: String,
|
|
114
|
+
required: false,
|
|
115
|
+
default: "button",
|
|
116
|
+
},
|
|
117
|
+
buttonText: {
|
|
118
|
+
type: [String, Number, Object, Array],
|
|
119
|
+
required: false,
|
|
120
|
+
default: undefined,
|
|
121
|
+
},
|
|
122
|
+
buttonTextAriaHidden: {
|
|
123
|
+
type: Boolean,
|
|
124
|
+
required: false,
|
|
125
|
+
default: false,
|
|
126
|
+
},
|
|
127
|
+
buttonTextClass: {
|
|
128
|
+
type: String,
|
|
129
|
+
required: false,
|
|
130
|
+
default: undefined,
|
|
131
|
+
},
|
|
132
|
+
buttonTextScreenReader: {
|
|
133
|
+
type: [String, Number, Object, Array],
|
|
134
|
+
required: false,
|
|
135
|
+
default: undefined,
|
|
136
|
+
},
|
|
137
|
+
buttonTitle: {
|
|
138
|
+
type: [String, Number, Object, Array],
|
|
139
|
+
required: false,
|
|
140
|
+
default: undefined,
|
|
141
|
+
},
|
|
142
|
+
buttonTitlePlacement: {
|
|
143
|
+
type: String,
|
|
144
|
+
required: false,
|
|
145
|
+
default: "top",
|
|
146
|
+
validator: value => ["top", "left", "bottom", "right"].indexOf(value) !== -1,
|
|
147
|
+
},
|
|
148
|
+
caretIcon: {
|
|
149
|
+
type: String,
|
|
150
|
+
required: false,
|
|
151
|
+
default: ChevronDown,
|
|
152
|
+
},
|
|
153
|
+
class: {
|
|
154
|
+
type: [String, Object],
|
|
155
|
+
required: false,
|
|
156
|
+
default: undefined,
|
|
157
|
+
},
|
|
158
|
+
disabled: {
|
|
159
|
+
type: Boolean,
|
|
160
|
+
required: false,
|
|
161
|
+
},
|
|
162
|
+
dropdownAttributes: {
|
|
163
|
+
type: Object,
|
|
164
|
+
required: false,
|
|
165
|
+
default: () => ({}),
|
|
166
|
+
},
|
|
167
|
+
dropdownClass: {
|
|
168
|
+
type: String,
|
|
169
|
+
required: false,
|
|
170
|
+
default: undefined,
|
|
171
|
+
},
|
|
172
|
+
dropdownRenderDefault: {
|
|
173
|
+
type: Boolean,
|
|
174
|
+
required: false,
|
|
175
|
+
},
|
|
176
|
+
dropdownTag: {
|
|
177
|
+
type: String,
|
|
178
|
+
required: false,
|
|
179
|
+
default: "ul",
|
|
180
|
+
},
|
|
181
|
+
elementsForArrows: {
|
|
182
|
+
type: String,
|
|
183
|
+
required: false,
|
|
184
|
+
default: focusableSelector,
|
|
185
|
+
},
|
|
186
|
+
extra: {
|
|
187
|
+
type: Object,
|
|
188
|
+
required: false,
|
|
189
|
+
default: undefined,
|
|
190
|
+
},
|
|
191
|
+
keyGroup: {
|
|
192
|
+
type: [String, Number, Array],
|
|
193
|
+
required: false,
|
|
194
|
+
default: undefined,
|
|
195
|
+
},
|
|
196
|
+
keyGroupLabelCallback: {
|
|
197
|
+
type: Function,
|
|
198
|
+
required: false,
|
|
199
|
+
default: undefined,
|
|
200
|
+
},
|
|
201
|
+
floatingFlip: {
|
|
202
|
+
type: Object,
|
|
203
|
+
required: false,
|
|
204
|
+
|
|
205
|
+
/*
|
|
206
|
+
* mainAxis?: boolean;
|
|
207
|
+
* crossAxis?: boolean;
|
|
208
|
+
* fallbackAxisSideDirection?: 'none' | 'start' | 'end';
|
|
209
|
+
* flipAlignment?: boolean;
|
|
210
|
+
* fallbackPlacements?: Array<Placement>;
|
|
211
|
+
* fallbackStrategy?: 'bestFit' | 'initialPlacement';
|
|
212
|
+
*/
|
|
213
|
+
default: () => ({}),
|
|
214
|
+
},
|
|
215
|
+
floatingShift: {
|
|
216
|
+
type: Object,
|
|
217
|
+
required: false,
|
|
218
|
+
default: () => ({
|
|
219
|
+
use: true,
|
|
220
|
+
crossAxis: true,
|
|
221
|
+
padding: 20,
|
|
222
|
+
}),
|
|
223
|
+
},
|
|
224
|
+
hasCaret: {
|
|
225
|
+
type: Boolean,
|
|
226
|
+
required: false,
|
|
227
|
+
default: true,
|
|
228
|
+
},
|
|
229
|
+
id: {
|
|
230
|
+
type: String,
|
|
231
|
+
required: false,
|
|
232
|
+
default: () => uniqueId("a_dropdown_"),
|
|
233
|
+
},
|
|
234
|
+
inBody: {
|
|
235
|
+
type: Boolean,
|
|
236
|
+
required: false,
|
|
237
|
+
default: false,
|
|
238
|
+
},
|
|
239
|
+
isCloseByClickInside: {
|
|
240
|
+
type: Boolean,
|
|
241
|
+
required: false,
|
|
242
|
+
default: true,
|
|
243
|
+
},
|
|
244
|
+
isCloseByClickOutside: {
|
|
245
|
+
type: Boolean,
|
|
246
|
+
required: false,
|
|
247
|
+
default: true,
|
|
248
|
+
},
|
|
249
|
+
isCloseByButtonInvisibleInViewport: {
|
|
250
|
+
type: Boolean,
|
|
251
|
+
required: false,
|
|
252
|
+
default: true,
|
|
253
|
+
},
|
|
254
|
+
isHideWithoutActionAndSlot: {
|
|
255
|
+
type: Boolean,
|
|
256
|
+
required: false,
|
|
257
|
+
default: true,
|
|
258
|
+
},
|
|
259
|
+
isListWidthSameWithButton: {
|
|
260
|
+
type: Boolean,
|
|
261
|
+
required: false,
|
|
262
|
+
},
|
|
263
|
+
lockArrowsNavigation: {
|
|
264
|
+
type: Boolean,
|
|
265
|
+
required: false,
|
|
266
|
+
default: true,
|
|
267
|
+
},
|
|
268
|
+
lockTabNavigation: {
|
|
269
|
+
type: Boolean,
|
|
270
|
+
required: false,
|
|
271
|
+
default: true,
|
|
272
|
+
},
|
|
273
|
+
menuWidth: {
|
|
274
|
+
type: Number,
|
|
275
|
+
required: false,
|
|
276
|
+
default: undefined,
|
|
277
|
+
},
|
|
278
|
+
persist: {
|
|
279
|
+
type: Boolean,
|
|
280
|
+
required: false,
|
|
281
|
+
default: true,
|
|
282
|
+
},
|
|
283
|
+
placement: {
|
|
284
|
+
type: String,
|
|
285
|
+
required: false,
|
|
286
|
+
default: "bottom-start",
|
|
287
|
+
validator: placement => APlacements.indexOf(placement) !== -1,
|
|
288
|
+
},
|
|
289
|
+
popperContainerId: {
|
|
290
|
+
type: String,
|
|
291
|
+
required: false,
|
|
292
|
+
default: "a_tooltip_container",
|
|
293
|
+
},
|
|
294
|
+
readonly: {
|
|
295
|
+
type: Boolean,
|
|
296
|
+
required: false,
|
|
297
|
+
default: false,
|
|
298
|
+
},
|
|
299
|
+
sortOrderGroup: {
|
|
300
|
+
type: String,
|
|
301
|
+
required: false,
|
|
302
|
+
default: undefined,
|
|
303
|
+
validator: value => ["asc", "desc"].indexOf(value) !== -1,
|
|
304
|
+
},
|
|
305
|
+
triggers: {
|
|
306
|
+
type: Array,
|
|
307
|
+
required: false,
|
|
308
|
+
default: () => ["click"],
|
|
309
|
+
validator: value => difference(value, ["click", "hover", "focus"]).length === 0,
|
|
310
|
+
},
|
|
311
|
+
useEscape: {
|
|
312
|
+
type: Boolean,
|
|
313
|
+
required: false,
|
|
314
|
+
default: true,
|
|
315
|
+
},
|
|
316
|
+
useRem: {
|
|
317
|
+
type: Boolean,
|
|
318
|
+
required: false,
|
|
319
|
+
default: true,
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
emits: [
|
|
323
|
+
"open",
|
|
324
|
+
"close",
|
|
325
|
+
],
|
|
326
|
+
setup(props, context) {
|
|
327
|
+
const id = toRef(props, "id");
|
|
328
|
+
|
|
329
|
+
const isMounted = ref(false);
|
|
330
|
+
|
|
331
|
+
const {
|
|
332
|
+
closePopup,
|
|
333
|
+
openPopup,
|
|
334
|
+
} = APopupAPI();
|
|
335
|
+
|
|
336
|
+
const {
|
|
337
|
+
dropdownButtonRef,
|
|
338
|
+
dropdownRef,
|
|
339
|
+
} = RefsAPI();
|
|
340
|
+
|
|
341
|
+
const {
|
|
342
|
+
setFocusToFirstElement,
|
|
343
|
+
} = FocusAPI(props, {
|
|
344
|
+
dropdownRef,
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
const {
|
|
348
|
+
destroyPopover,
|
|
349
|
+
startPopper,
|
|
350
|
+
} = PopoverAPI(props, {
|
|
351
|
+
dropdownButtonRef,
|
|
352
|
+
dropdownRef,
|
|
353
|
+
onReferenceHidden,
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
const {
|
|
357
|
+
buttonWidth,
|
|
358
|
+
destroyEventCloseClick,
|
|
359
|
+
destroyEventPressArrows,
|
|
360
|
+
initWasOpened,
|
|
361
|
+
onClose,
|
|
362
|
+
onKeydown,
|
|
363
|
+
onOpen,
|
|
364
|
+
onToggle,
|
|
365
|
+
statusExpanded,
|
|
366
|
+
timerCloseHover,
|
|
367
|
+
triggerOpen,
|
|
368
|
+
wasOpened,
|
|
369
|
+
} = ToggleAPI(props, context, {
|
|
370
|
+
closePopup,
|
|
371
|
+
destroyPopover,
|
|
372
|
+
dropdownButtonRef,
|
|
373
|
+
dropdownRef,
|
|
374
|
+
openPopup,
|
|
375
|
+
setFocusToFirstElement,
|
|
376
|
+
startPopper,
|
|
377
|
+
});
|
|
378
|
+
|
|
379
|
+
const {
|
|
380
|
+
eventsLocal,
|
|
381
|
+
eventsMenu,
|
|
382
|
+
} = EventsAPI(props, {
|
|
383
|
+
onToggle,
|
|
384
|
+
onKeydown,
|
|
385
|
+
onOpen,
|
|
386
|
+
onClose,
|
|
387
|
+
timerCloseHover,
|
|
388
|
+
triggerOpen,
|
|
389
|
+
});
|
|
390
|
+
|
|
391
|
+
const {
|
|
392
|
+
idLocal,
|
|
393
|
+
buttonAttributesDisabled,
|
|
394
|
+
buttonAttributesLocal,
|
|
395
|
+
buttonTagLocal,
|
|
396
|
+
dropdownAttributesLocal,
|
|
397
|
+
isMenuRendered,
|
|
398
|
+
} = AttributesAPI(props, {
|
|
399
|
+
eventsMenu,
|
|
400
|
+
statusExpanded,
|
|
401
|
+
wasOpened,
|
|
402
|
+
});
|
|
403
|
+
|
|
404
|
+
const {
|
|
405
|
+
actionsFiltered,
|
|
406
|
+
hasActions,
|
|
407
|
+
} = ActionsAPI(props);
|
|
408
|
+
|
|
409
|
+
const {
|
|
410
|
+
addPopperContainerInBody,
|
|
411
|
+
popperContainerIdSelector,
|
|
412
|
+
} = PopperContainerAPI(props);
|
|
413
|
+
|
|
414
|
+
const {
|
|
415
|
+
buttonClassLocal,
|
|
416
|
+
} = ClassAPI(props);
|
|
417
|
+
|
|
418
|
+
function onReferenceHidden() {
|
|
419
|
+
onClose({
|
|
420
|
+
isFocusButton: false,
|
|
421
|
+
trigger: "referenceHidden",
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
initWasOpened();
|
|
426
|
+
|
|
427
|
+
onMounted(() => {
|
|
428
|
+
isMounted.value = true;
|
|
429
|
+
addPopperContainerInBody();
|
|
430
|
+
});
|
|
431
|
+
|
|
432
|
+
onBeforeUnmount(() => {
|
|
433
|
+
destroyEventCloseClick();
|
|
434
|
+
destroyEventPressArrows();
|
|
435
|
+
destroyPopover();
|
|
436
|
+
closePopup({
|
|
437
|
+
id: id.value,
|
|
438
|
+
});
|
|
439
|
+
});
|
|
440
|
+
|
|
441
|
+
return {
|
|
442
|
+
actionsFiltered,
|
|
443
|
+
buttonAttributesDisabled,
|
|
444
|
+
buttonAttributesLocal,
|
|
445
|
+
buttonClassLocal,
|
|
446
|
+
buttonTagLocal,
|
|
447
|
+
buttonWidth,
|
|
448
|
+
dropdownAttributesLocal,
|
|
449
|
+
dropdownButtonRef,
|
|
450
|
+
dropdownRef,
|
|
451
|
+
eventsLocal,
|
|
452
|
+
hasActions,
|
|
453
|
+
idLocal,
|
|
454
|
+
isMenuRendered,
|
|
455
|
+
isMounted,
|
|
456
|
+
onClose,
|
|
457
|
+
onOpen,
|
|
458
|
+
popperContainerIdSelector,
|
|
459
|
+
startPopper,
|
|
460
|
+
statusExpanded,
|
|
461
|
+
};
|
|
462
|
+
},
|
|
463
|
+
render() {
|
|
464
|
+
if (!this.isMounted) {
|
|
465
|
+
return null;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
if (this.isHideWithoutActionAndSlot &&
|
|
469
|
+
!this.hasActions &&
|
|
470
|
+
!this.$slots.dropdown) {
|
|
471
|
+
return null;
|
|
472
|
+
}
|
|
473
|
+
return [
|
|
474
|
+
h(AElement, {
|
|
475
|
+
ref: "dropdownButtonRef",
|
|
476
|
+
...this.$attrs,
|
|
477
|
+
id: this.idLocal,
|
|
478
|
+
alwaysTranslate: this.alwaysTranslate,
|
|
479
|
+
tag: this.buttonTagLocal,
|
|
480
|
+
class: this.buttonClassLocal,
|
|
481
|
+
text: this.buttonText,
|
|
482
|
+
textScreenReader: this.buttonTextScreenReader,
|
|
483
|
+
textAriaHidden: this.buttonTextAriaHidden,
|
|
484
|
+
textClass: this.buttonTextClass,
|
|
485
|
+
title: this.buttonTitle,
|
|
486
|
+
isTitleHtml: this.buttonIsTitleHtml,
|
|
487
|
+
titlePlacement: this.buttonTitlePlacement,
|
|
488
|
+
loading: this.buttonLoading,
|
|
489
|
+
loadingClass: this.buttonLoadingClass,
|
|
490
|
+
loadingAlign: this.buttonLoadingAlign,
|
|
491
|
+
iconLeft: this.buttonIconLeft,
|
|
492
|
+
iconRight: this.buttonIconRight,
|
|
493
|
+
iconClass: this.buttonIconClass,
|
|
494
|
+
iconAttributes: this.buttonIconAttributes,
|
|
495
|
+
iconTag: this.buttonIconTag,
|
|
496
|
+
prevent: this.buttonPrevent,
|
|
497
|
+
stop: this.buttonStop,
|
|
498
|
+
extra: this.extra,
|
|
499
|
+
type: "button",
|
|
500
|
+
attributes: this.buttonAttributesLocal,
|
|
501
|
+
...this.buttonAttributesDisabled,
|
|
502
|
+
...this.eventsLocal,
|
|
503
|
+
}, {
|
|
504
|
+
default: () => {
|
|
505
|
+
return this.$slots.button && this.$slots.button();
|
|
506
|
+
},
|
|
507
|
+
buttonAppend: () => {
|
|
508
|
+
return this.hasCaret && !this.readonly && h(AIcon, {
|
|
509
|
+
class: "a_dropdown__caret",
|
|
510
|
+
icon: this.caretIcon,
|
|
511
|
+
});
|
|
512
|
+
},
|
|
513
|
+
}),
|
|
514
|
+
h(Teleport, {
|
|
515
|
+
to: this.popperContainerIdSelector,
|
|
516
|
+
disabled: !this.inBody,
|
|
517
|
+
}, [
|
|
518
|
+
this.isMenuRendered && withDirectives(h(
|
|
519
|
+
"div",
|
|
520
|
+
{
|
|
521
|
+
ref: "dropdownRef",
|
|
522
|
+
"aria-labelledby": this.idLocal,
|
|
523
|
+
ariaHidden: !this.statusExpanded,
|
|
524
|
+
...this.dropdownAttributesLocal,
|
|
525
|
+
},
|
|
526
|
+
[
|
|
527
|
+
h(this.dropdownTag, {}, [
|
|
528
|
+
this.$slots.dropdown && this.$slots.dropdown(),
|
|
529
|
+
this.hasActions && h(ADropdownGroup, {
|
|
530
|
+
actions: this.actionsFiltered,
|
|
531
|
+
alwaysTranslate: this.alwaysTranslate,
|
|
532
|
+
dropdownId: this.idLocal,
|
|
533
|
+
}, this.$slots),
|
|
534
|
+
]),
|
|
535
|
+
],
|
|
536
|
+
), [
|
|
537
|
+
[AOnHooks, {
|
|
538
|
+
mounted: this.startPopper,
|
|
539
|
+
}],
|
|
540
|
+
]),
|
|
541
|
+
]),
|
|
542
|
+
];
|
|
543
|
+
},
|
|
544
|
+
};
|