r3ui-lib 1.3.19 → 1.3.21
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/dist/login.es.js +14 -3148
- package/dist/modules/_virtual/___vite-browser-external.js +6 -0
- package/dist/modules/_virtual/__vite-browser-external.js +4 -0
- package/dist/modules/_virtual/_commonjsHelpers.js +33 -0
- package/dist/modules/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/modules/_virtual/he.js +5 -0
- package/dist/modules/_virtual/he2.js +4 -0
- package/dist/modules/_virtual/index.js +7 -0
- package/dist/modules/_virtual/inputmask.js +7 -0
- package/dist/modules/_virtual/inputmask2.js +4 -0
- package/dist/modules/_virtual/ru.js +5 -0
- package/dist/modules/_virtual/ru2.js +4 -0
- package/dist/modules/assets/img/confirmation.png.js +4 -0
- package/dist/modules/assets/img/error.png.js +4 -0
- package/dist/modules/assets/img/preloader.gif.js +4 -0
- package/dist/modules/assets/img/regagro_logo.svg.js +4 -0
- package/dist/modules/assets/img/success.png.js +4 -0
- package/dist/modules/assets/img/warning.png.js +4 -0
- package/dist/modules/components/DefaultButton.vue.js +112 -0
- package/dist/modules/components/Divider.vue.js +33 -0
- package/dist/modules/components/Icon.vue.js +18 -0
- package/dist/modules/components/Slider.vue.js +7 -0
- package/dist/modules/components/Slider.vue2.js +127 -0
- package/dist/modules/components/Spinner.vue.js +19 -0
- package/dist/modules/components/SsoLoginPending.vue.js +7 -0
- package/dist/modules/components/SsoLoginPending.vue2.js +44 -0
- package/dist/modules/components/SsoLoginScreen.vue.js +57 -0
- package/dist/modules/components/SsoLoginScreen.vue2.js +4 -0
- package/dist/modules/components/accordions/DefaultAccordion.vue.js +7 -0
- package/dist/modules/components/accordions/DefaultAccordion.vue2.js +72 -0
- package/dist/modules/components/accordions/KindCheckboxesAccordion.vue.js +7 -0
- package/dist/modules/components/accordions/KindCheckboxesAccordion.vue2.js +152 -0
- package/dist/modules/components/buttons/AddButton.vue.js +7 -0
- package/dist/modules/components/buttons/AddButton.vue2.js +30 -0
- package/dist/modules/components/buttons/ClearFormButton.vue.js +7 -0
- package/dist/modules/components/buttons/ClearFormButton.vue2.js +28 -0
- package/dist/modules/components/buttons/CollapseButton.vue.js +7 -0
- package/dist/modules/components/buttons/CollapseButton.vue2.js +57 -0
- package/dist/modules/components/buttons/ExportButton.vue.js +7 -0
- package/dist/modules/components/buttons/ExportButton.vue2.js +28 -0
- package/dist/modules/components/buttons/PrintButton.vue.js +7 -0
- package/dist/modules/components/buttons/PrintButton.vue2.js +27 -0
- package/dist/modules/components/buttons/ToggleButtons.vue.js +7 -0
- package/dist/modules/components/buttons/ToggleButtons.vue2.js +30 -0
- package/dist/modules/components/cards/CardInfo.vue.js +7 -0
- package/dist/modules/components/cards/CardInfo.vue2.js +56 -0
- package/dist/modules/components/cards/PageCard.vue.js +7 -0
- package/dist/modules/components/cards/PageCard.vue2.js +117 -0
- package/dist/modules/components/dropdowns/DefaultDropDown.vue.js +102 -0
- package/dist/modules/components/export/ExportComponent.vue.js +7 -0
- package/dist/modules/components/export/ExportComponent.vue2.js +74 -0
- package/dist/modules/components/filters/MultipleQuickFilterComponent.vue.js +7 -0
- package/dist/modules/components/filters/MultipleQuickFilterComponent.vue2.js +34 -0
- package/dist/modules/components/form/Checkbox.vue.js +66 -0
- package/dist/modules/components/form/CustomInput.vue.js +161 -0
- package/dist/modules/components/form/FormError.vue.js +24 -0
- package/dist/modules/components/form/PasswordInput.vue.js +82 -0
- package/dist/modules/components/form/VSelect.vue.js +192 -0
- package/dist/modules/components/form/useWithPopper.js +29 -0
- package/dist/modules/components/forms/AddressForm.vue.js +7 -0
- package/dist/modules/components/forms/AddressForm.vue2.js +382 -0
- package/dist/modules/components/forms/AgeFromAgeTo.vue.js +7 -0
- package/dist/modules/components/forms/AgeFromAgeTo.vue2.js +207 -0
- package/dist/modules/components/forms/BooleanCheckbox.vue.js +7 -0
- package/dist/modules/components/forms/BooleanCheckbox.vue2.js +54 -0
- package/dist/modules/components/forms/Flatpickr.vue.js +7 -0
- package/dist/modules/components/forms/Flatpickr.vue2.js +273 -0
- package/dist/modules/components/forms/HeaderSearchForm.vue.js +7 -0
- package/dist/modules/components/forms/HeaderSearchForm.vue2.js +142 -0
- package/dist/modules/components/forms/MultiCheckbox.vue.js +7 -0
- package/dist/modules/components/forms/MultiCheckbox.vue2.js +64 -0
- package/dist/modules/components/forms/MultiInput.vue.js +7 -0
- package/dist/modules/components/forms/MultiInput.vue2.js +115 -0
- package/dist/modules/components/icons/QuestionIcon.vue.js +7 -0
- package/dist/modules/components/icons/QuestionIcon.vue2.js +56 -0
- package/dist/modules/components/layout/Breadcrumbs.vue.js +7 -0
- package/dist/modules/components/layout/Breadcrumbs.vue2.js +40 -0
- package/dist/modules/components/layout/Card.vue.js +31 -0
- package/dist/modules/components/layout/Footer.vue.js +15 -0
- package/dist/modules/components/layout/Footer.vue2.js +4 -0
- package/dist/modules/components/layout/Header.vue.js +7 -0
- package/dist/modules/components/layout/Header.vue2.js +68 -0
- package/dist/modules/components/layout/LanguageSelector.vue.js +32 -0
- package/dist/modules/components/layout/LanguageSelector.vue3.js +5 -0
- package/dist/modules/components/layout/LoginLayoutFrame.vue.js +48 -0
- package/dist/modules/components/layout/LoginLayoutFrame.vue2.js +4 -0
- package/dist/modules/components/layout/MainComponent.vue.js +50 -0
- package/dist/modules/components/layout/MainComponent.vue2.js +4 -0
- package/dist/modules/components/layout/PageTitle.vue.js +7 -0
- package/dist/modules/components/layout/PageTitle.vue2.js +40 -0
- package/dist/modules/components/logo/Logo.vue.js +7 -0
- package/dist/modules/components/logo/Logo.vue2.js +50 -0
- package/dist/modules/components/modals/ConfirmationModal.vue.js +7 -0
- package/dist/modules/components/modals/ConfirmationModal.vue2.js +154 -0
- package/dist/modules/components/modals/DefaultModal.vue.js +116 -0
- package/dist/modules/components/modals/DefaultModal.vue3.js +5 -0
- package/dist/modules/components/modals/EditTableColumnsModalComponent.vue.js +7 -0
- package/dist/modules/components/modals/EditTableColumnsModalComponent.vue2.js +41 -0
- package/dist/modules/components/modals/TableFilterModalComponent.vue.js +7 -0
- package/dist/modules/components/modals/TableFilterModalComponent.vue2.js +66 -0
- package/dist/modules/components/modals/TableFilterModalShell.vue.js +89 -0
- package/dist/modules/components/modals/TableFilterModalShell.vue2.js +4 -0
- package/dist/modules/components/notifications/ErrorMessageComponent.vue.js +7 -0
- package/dist/modules/components/notifications/ErrorMessageComponent.vue2.js +45 -0
- package/dist/modules/components/notifications/NotificationMessage.vue.js +55 -0
- package/dist/modules/components/notifications/NotificationMessage.vue2.js +4 -0
- package/dist/modules/components/notifications/Toast.vue.js +71 -0
- package/dist/modules/components/sidebar/CollapsedSidebarLink.vue.js +7 -0
- package/dist/modules/components/sidebar/CollapsedSidebarLink.vue2.js +90 -0
- package/dist/modules/components/sidebar/Sidebar.vue.js +59 -0
- package/dist/modules/components/sidebar/Sidebar.vue3.js +5 -0
- package/dist/modules/components/sidebar/SidebarLink.vue.js +7 -0
- package/dist/modules/components/sidebar/SidebarLink.vue2.js +93 -0
- package/dist/modules/components/tables/ColumnSubFilter.vue.js +7 -0
- package/dist/modules/components/tables/ColumnSubFilter.vue2.js +36 -0
- package/dist/modules/components/tables/EditTableColumns.vue.js +7 -0
- package/dist/modules/components/tables/EditTableColumns.vue2.js +125 -0
- package/dist/modules/components/tables/ManagedRemoteTable.vue.js +72 -0
- package/dist/modules/components/tables/ManagedRemoteTable.vue2.js +4 -0
- package/dist/modules/components/tables/SubFilterToggleBtn.vue.js +28 -0
- package/dist/modules/components/tables/Table.vue.js +416 -0
- package/dist/modules/components/tables/Table.vue3.js +5 -0
- package/dist/modules/components/tables/TableAppliedFiltersStorage.vue.js +7 -0
- package/dist/modules/components/tables/TableAppliedFiltersStorage.vue2.js +56 -0
- package/dist/modules/components/tables/TableColumnsButton.vue.js +27 -0
- package/dist/modules/components/tables/TableColumnsButton.vue2.js +4 -0
- package/dist/modules/components/tables/TableColumnsDialog.vue.js +67 -0
- package/dist/modules/components/tables/TableColumnsDialog.vue2.js +4 -0
- package/dist/modules/components/tables/TableColumnsModal.vue.js +27 -0
- package/dist/modules/components/tables/TableColumnsModal.vue2.js +4 -0
- package/dist/modules/components/tables/TableCount.vue.js +7 -0
- package/dist/modules/components/tables/TableCount.vue2.js +26 -0
- package/dist/modules/components/tables/TableQuickFilterComponent.vue.js +7 -0
- package/dist/modules/components/tables/TableQuickFilterComponent.vue2.js +29 -0
- package/dist/modules/components/tables/ToggleAllTableRowButtons.vue.js +7 -0
- package/dist/modules/components/tables/ToggleAllTableRowButtons.vue2.js +41 -0
- package/dist/modules/components/utilities/FilterValuesPanel.vue.js +7 -0
- package/dist/modules/components/utilities/FilterValuesPanel.vue2.js +95 -0
- package/dist/modules/composables/forms/useAddressForm.js +289 -0
- package/dist/modules/composables/forms/useFieldError.js +23 -0
- package/dist/modules/composables/forms/useSearchForm.js +52 -0
- package/dist/modules/composables/forms/useUnsavedChanges.js +84 -0
- package/dist/modules/composables/layout/useR3uiLayoutInject.js +32 -0
- package/dist/modules/composables/main/useBreadcrumbs.js +75 -0
- package/dist/modules/composables/main/useMain.js +38 -0
- package/dist/modules/composables/main/usePermissionChecker.js +15 -0
- package/dist/modules/composables/modals/useModalLayer.js +109 -0
- package/dist/modules/composables/sidebar/useSidebar.js +40 -0
- package/dist/modules/composables/table/createTableCommandScheduler.js +62 -0
- package/dist/modules/composables/table/createTableLifecycle.js +719 -0
- package/dist/modules/composables/table/createTableRebuildTransaction.js +61 -0
- package/dist/modules/composables/table/createTableSession.js +38 -0
- package/dist/modules/composables/table/createTableState.js +122 -0
- package/dist/modules/composables/table/createTabulatorAdapter.js +90 -0
- package/dist/modules/composables/table/tableQueryTransitions.js +82 -0
- package/dist/modules/composables/table/useManagedRemoteTable.js +179 -0
- package/dist/modules/composables/table/useR3uiTableDefaultInject.js +27 -0
- package/dist/modules/composables/table/useRemoteTable.js +96 -0
- package/dist/modules/composables/table/useTableColumnApply.js +38 -0
- package/dist/modules/composables/table/useTableColumns.js +70 -0
- package/dist/modules/composables/table/useTableColumnsEnhanced.js +155 -0
- package/dist/modules/composables/table/useTableColumnsIntegration.js +82 -0
- package/dist/modules/composables/table/useTableDefault.js +258 -0
- package/dist/modules/composables/table/useTableStorage.js +32 -0
- package/dist/modules/constants/authSidebar.js +36 -0
- package/dist/modules/services/AddressService.js +21 -0
- package/dist/modules/types/layoutInjectKeys.js +10 -0
- package/dist/modules/types/tableInjectKeys.js +21 -0
- package/dist/modules/types/tableInstance.js +32 -0
- package/dist/modules/utils/accordionLocalization.js +14 -0
- package/dist/modules/utils/addressFormTranslations.js +29 -0
- package/dist/modules/utils/auth/authUser.js +13 -0
- package/dist/modules/utils/auth/exchangePasswordToken.js +52 -0
- package/dist/modules/utils/auth/handlePkceCallback.js +88 -0
- package/dist/modules/utils/auth/logout.js +32 -0
- package/dist/modules/utils/auth/runLogoutHandler.js +60 -0
- package/dist/modules/utils/auth/sessionController.js +28 -0
- package/dist/modules/utils/auth/signInWithSSO.js +141 -0
- package/dist/modules/utils/authCookie.js +21 -0
- package/dist/modules/utils/constants.js +34 -0
- package/dist/modules/utils/createTabulatorLangsFromT.js +30 -0
- package/dist/modules/utils/createTabulatorTableProps.js +19 -0
- package/dist/modules/utils/helpers.js +537 -0
- package/dist/modules/utils/pkce.js +50 -0
- package/dist/modules/utils/table-columns-utils.js +59 -0
- package/dist/modules/utils/tableAdapter.js +156 -0
- package/dist/modules/utils/tableAjaxRequest.js +82 -0
- package/dist/modules/utils/tableCancellation.js +271 -0
- package/dist/modules/utils/tableColumnStorage.js +55 -0
- package/dist/modules/utils/tableData.js +118 -0
- package/dist/modules/utils/tableLoad.js +67 -0
- package/dist/modules/utils/tableLocalizations.js +6 -0
- package/dist/modules/utils/tableOperation.js +63 -0
- package/dist/modules/utils/tableProjection.js +137 -0
- package/dist/modules/utils/tableQueryParameters.js +46 -0
- package/dist/modules/utils/tableSnapshotValue.js +73 -0
- package/dist/modules/utils/tabulatorQueryAdapter.js +203 -0
- package/dist/modules/utils/tabulatorRuntime.js +131 -0
- package/dist/modules/utils/upstreamHttpStatus.js +32 -0
- package/dist/modules/vendor/@popperjs/core/lib/createPopper.js +122 -0
- package/dist/modules/vendor/@popperjs/core/lib/dom-utils/contains.js +18 -0
- package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getBoundingClientRect.js +23 -0
- package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getClippingRect.js +37 -0
- package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getCompositeRect.js +32 -0
- package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getComputedStyle.js +7 -0
- package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getDocumentElement.js +10 -0
- package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getDocumentRect.js +17 -0
- package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js +9 -0
- package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getLayoutRect.js +13 -0
- package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getNodeName.js +6 -0
- package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getNodeScroll.js +10 -0
- package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getOffsetParent.js +35 -0
- package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getParentNode.js +18 -0
- package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getScrollParent.js +10 -0
- package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getViewportRect.js +21 -0
- package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getWindow.js +12 -0
- package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getWindowScroll.js +11 -0
- package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js +9 -0
- package/dist/modules/vendor/@popperjs/core/lib/dom-utils/instanceOf.js +20 -0
- package/dist/modules/vendor/@popperjs/core/lib/dom-utils/isLayoutViewport.js +7 -0
- package/dist/modules/vendor/@popperjs/core/lib/dom-utils/isScrollParent.js +8 -0
- package/dist/modules/vendor/@popperjs/core/lib/dom-utils/isTableElement.js +7 -0
- package/dist/modules/vendor/@popperjs/core/lib/dom-utils/listScrollParents.js +16 -0
- package/dist/modules/vendor/@popperjs/core/lib/enums.js +31 -0
- package/dist/modules/vendor/@popperjs/core/lib/modifiers/applyStyles.js +47 -0
- package/dist/modules/vendor/@popperjs/core/lib/modifiers/arrow.js +37 -0
- package/dist/modules/vendor/@popperjs/core/lib/modifiers/computeStyles.js +99 -0
- package/dist/modules/vendor/@popperjs/core/lib/modifiers/eventListeners.js +26 -0
- package/dist/modules/vendor/@popperjs/core/lib/modifiers/flip.js +74 -0
- package/dist/modules/vendor/@popperjs/core/lib/modifiers/hide.js +44 -0
- package/dist/modules/vendor/@popperjs/core/lib/modifiers/offset.js +31 -0
- package/dist/modules/vendor/@popperjs/core/lib/modifiers/popperOffsets.js +19 -0
- package/dist/modules/vendor/@popperjs/core/lib/modifiers/preventOverflow.js +54 -0
- package/dist/modules/vendor/@popperjs/core/lib/popper.js +27 -0
- package/dist/modules/vendor/@popperjs/core/lib/utils/computeAutoPlacement.js +27 -0
- package/dist/modules/vendor/@popperjs/core/lib/utils/computeOffsets.js +54 -0
- package/dist/modules/vendor/@popperjs/core/lib/utils/debounce.js +13 -0
- package/dist/modules/vendor/@popperjs/core/lib/utils/detectOverflow.js +33 -0
- package/dist/modules/vendor/@popperjs/core/lib/utils/expandToHashMap.js +8 -0
- package/dist/modules/vendor/@popperjs/core/lib/utils/getAltAxis.js +6 -0
- package/dist/modules/vendor/@popperjs/core/lib/utils/getBasePlacement.js +6 -0
- package/dist/modules/vendor/@popperjs/core/lib/utils/getFreshSideObject.js +11 -0
- package/dist/modules/vendor/@popperjs/core/lib/utils/getMainAxisFromPlacement.js +6 -0
- package/dist/modules/vendor/@popperjs/core/lib/utils/getOppositePlacement.js +14 -0
- package/dist/modules/vendor/@popperjs/core/lib/utils/getOppositeVariationPlacement.js +12 -0
- package/dist/modules/vendor/@popperjs/core/lib/utils/getVariation.js +6 -0
- package/dist/modules/vendor/@popperjs/core/lib/utils/math.js +6 -0
- package/dist/modules/vendor/@popperjs/core/lib/utils/mergeByName.js +15 -0
- package/dist/modules/vendor/@popperjs/core/lib/utils/mergePaddingObject.js +7 -0
- package/dist/modules/vendor/@popperjs/core/lib/utils/orderModifiers.js +31 -0
- package/dist/modules/vendor/@popperjs/core/lib/utils/rectToClientRect.js +11 -0
- package/dist/modules/vendor/@popperjs/core/lib/utils/userAgent.js +9 -0
- package/dist/modules/vendor/@popperjs/core/lib/utils/within.js +12 -0
- package/dist/modules/vendor/call-bind-apply-helpers/actualApply.js +14 -0
- package/dist/modules/vendor/call-bind-apply-helpers/functionApply.js +7 -0
- package/dist/modules/vendor/call-bind-apply-helpers/functionCall.js +7 -0
- package/dist/modules/vendor/call-bind-apply-helpers/index.js +18 -0
- package/dist/modules/vendor/call-bind-apply-helpers/reflectApply.js +7 -0
- package/dist/modules/vendor/call-bound/index.js +21 -0
- package/dist/modules/vendor/dompurify/dist/purify.es.js +1522 -0
- package/dist/modules/vendor/dunder-proto/get.js +29 -0
- package/dist/modules/vendor/es-define-property/index.js +16 -0
- package/dist/modules/vendor/es-errors/eval.js +7 -0
- package/dist/modules/vendor/es-errors/index.js +7 -0
- package/dist/modules/vendor/es-errors/range.js +7 -0
- package/dist/modules/vendor/es-errors/ref.js +7 -0
- package/dist/modules/vendor/es-errors/syntax.js +7 -0
- package/dist/modules/vendor/es-errors/type.js +7 -0
- package/dist/modules/vendor/es-errors/uri.js +7 -0
- package/dist/modules/vendor/es-object-atoms/index.js +7 -0
- package/dist/modules/vendor/flatpickr/dist/esm/index.js +942 -0
- package/dist/modules/vendor/flatpickr/dist/esm/l10n/default.js +75 -0
- package/dist/modules/vendor/flatpickr/dist/esm/types/options.js +80 -0
- package/dist/modules/vendor/flatpickr/dist/esm/utils/dates.js +89 -0
- package/dist/modules/vendor/flatpickr/dist/esm/utils/dom.js +45 -0
- package/dist/modules/vendor/flatpickr/dist/esm/utils/formatting.js +170 -0
- package/dist/modules/vendor/flatpickr/dist/esm/utils/index.js +23 -0
- package/dist/modules/vendor/flatpickr/dist/esm/utils/polyfills.js +15 -0
- package/dist/modules/vendor/flatpickr/dist/l10n/he.js +56 -0
- package/dist/modules/vendor/flatpickr/dist/l10n/ru.js +73 -0
- package/dist/modules/vendor/function-bind/implementation.js +48 -0
- package/dist/modules/vendor/function-bind/index.js +11 -0
- package/dist/modules/vendor/get-intrinsic/index.js +265 -0
- package/dist/modules/vendor/get-proto/Object.getPrototypeOf.js +11 -0
- package/dist/modules/vendor/get-proto/Reflect.getPrototypeOf.js +7 -0
- package/dist/modules/vendor/get-proto/index.js +21 -0
- package/dist/modules/vendor/gopd/gOPD.js +7 -0
- package/dist/modules/vendor/gopd/index.js +17 -0
- package/dist/modules/vendor/has-symbols/index.js +13 -0
- package/dist/modules/vendor/has-symbols/shams.js +33 -0
- package/dist/modules/vendor/hasown/index.js +11 -0
- package/dist/modules/vendor/inputmask/dist/inputmask.js +3517 -0
- package/dist/modules/vendor/math-intrinsics/abs.js +7 -0
- package/dist/modules/vendor/math-intrinsics/floor.js +7 -0
- package/dist/modules/vendor/math-intrinsics/isNaN.js +9 -0
- package/dist/modules/vendor/math-intrinsics/max.js +7 -0
- package/dist/modules/vendor/math-intrinsics/min.js +7 -0
- package/dist/modules/vendor/math-intrinsics/pow.js +7 -0
- package/dist/modules/vendor/math-intrinsics/round.js +7 -0
- package/dist/modules/vendor/math-intrinsics/sign.js +13 -0
- package/dist/modules/vendor/moment/dist/moment.js +2589 -0
- package/dist/modules/vendor/nouislider/dist/nouislider.js +1064 -0
- package/dist/modules/vendor/object-inspect/index.js +376 -0
- package/dist/modules/vendor/qs/lib/formats.js +25 -0
- package/dist/modules/vendor/qs/lib/index.js +17 -0
- package/dist/modules/vendor/qs/lib/parse.js +161 -0
- package/dist/modules/vendor/qs/lib/stringify.js +197 -0
- package/dist/modules/vendor/qs/lib/utils.js +129 -0
- package/dist/modules/vendor/seamless-scroll-polyfill/lib/common.js +21 -0
- package/dist/modules/vendor/seamless-scroll-polyfill/lib/scroll-end-event.js +12 -0
- package/dist/modules/vendor/seamless-scroll-polyfill/lib/scroll-step.js +21 -0
- package/dist/modules/vendor/seamless-scroll-polyfill/lib/scroll.js +58 -0
- package/dist/modules/vendor/seamless-scroll-polyfill/lib/scrollIntoView.js +168 -0
- package/dist/modules/vendor/side-channel/index.js +35 -0
- package/dist/modules/vendor/side-channel-list/index.js +64 -0
- package/dist/modules/vendor/side-channel-map/index.js +40 -0
- package/dist/modules/vendor/side-channel-weakmap/index.js +43 -0
- package/dist/modules/vendor/tabulator-tables/dist/js/tabulator_esm.js +11127 -0
- package/dist/modules/vendor/vue-select/dist/vue-select.es.js +769 -0
- package/dist/r3ui-lib.css +1 -1
- package/dist/r3ui-lib.es.js +334 -35110
- package/dist/r3ui-lib.umd.js +12 -12
- package/dist/types/components/forms/AddressForm.vue.d.ts.map +1 -1
- package/package.json +7 -3
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { defineComponent as f, ref as d, createElementBlock as x, openBlock as v, createVNode as u, unref as o } from "vue";
|
|
2
|
+
import b from "../DefaultButton.vue.js";
|
|
3
|
+
import C from "./EditTableColumns.vue.js";
|
|
4
|
+
import { useTableColumnApply as T } from "../../composables/table/useTableColumnApply.js";
|
|
5
|
+
const B = /* @__PURE__ */ f({
|
|
6
|
+
__name: "TableColumnsDialog",
|
|
7
|
+
props: {
|
|
8
|
+
columns: {},
|
|
9
|
+
applyColumns: { type: Function },
|
|
10
|
+
applyContext: {},
|
|
11
|
+
applyErrorText: {},
|
|
12
|
+
title: {},
|
|
13
|
+
applyText: {},
|
|
14
|
+
selectAllText: {},
|
|
15
|
+
unselectAllText: {}
|
|
16
|
+
},
|
|
17
|
+
emits: ["columns-changed", "apply", "apply-error"],
|
|
18
|
+
setup(r, { emit: s }) {
|
|
19
|
+
const p = r, t = s, e = d(!1);
|
|
20
|
+
function m() {
|
|
21
|
+
a.value || (n.value = !1, e.value = !0);
|
|
22
|
+
}
|
|
23
|
+
const {
|
|
24
|
+
applying: a,
|
|
25
|
+
applyFailed: n,
|
|
26
|
+
apply: y
|
|
27
|
+
} = T(
|
|
28
|
+
(l, i) => p.applyColumns(l, i),
|
|
29
|
+
(l) => {
|
|
30
|
+
e.value = !1, t("columns-changed", l), t("apply");
|
|
31
|
+
},
|
|
32
|
+
(l) => t("apply-error", l),
|
|
33
|
+
{
|
|
34
|
+
context: () => p.applyContext,
|
|
35
|
+
invalidated: () => {
|
|
36
|
+
e.value = !1;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
function c(l) {
|
|
41
|
+
a.value || (n.value = !1, e.value = l);
|
|
42
|
+
}
|
|
43
|
+
return (l, i) => (v(), x("div", null, [
|
|
44
|
+
u(b, {
|
|
45
|
+
styles: "light",
|
|
46
|
+
icon: "gear-fill",
|
|
47
|
+
ariaLabel: l.title,
|
|
48
|
+
onSubmit: m
|
|
49
|
+
}, null, 8, ["ariaLabel"]),
|
|
50
|
+
u(C, {
|
|
51
|
+
title: l.title,
|
|
52
|
+
"modal-visibility": e.value,
|
|
53
|
+
columns: l.columns,
|
|
54
|
+
"apply-text": l.applyText,
|
|
55
|
+
applying: o(a),
|
|
56
|
+
"error-text": o(n) ? l.applyErrorText : "",
|
|
57
|
+
"select-all-text": l.selectAllText,
|
|
58
|
+
"unselect-all-text": l.unselectAllText,
|
|
59
|
+
onEmitModalVisibility: c,
|
|
60
|
+
onApply: o(y)
|
|
61
|
+
}, null, 8, ["title", "modal-visibility", "columns", "apply-text", "applying", "error-text", "select-all-text", "unselect-all-text", "onApply"])
|
|
62
|
+
]));
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
export {
|
|
66
|
+
B as default
|
|
67
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { defineComponent as r, createBlock as a, openBlock as s, mergeProps as m } from "vue";
|
|
2
|
+
import u from "./TableColumnsDialog.vue.js";
|
|
3
|
+
const i = /* @__PURE__ */ r({
|
|
4
|
+
__name: "TableColumnsModal",
|
|
5
|
+
props: {
|
|
6
|
+
columns: {},
|
|
7
|
+
applyColumns: {},
|
|
8
|
+
applyContext: {},
|
|
9
|
+
applyErrorText: { default: "Не удалось применить настройки колонок. Повторите попытку." },
|
|
10
|
+
title: { default: "Настройка колонок таблицы" },
|
|
11
|
+
applyText: { default: "Применить" },
|
|
12
|
+
selectAllText: { default: "Выбрать все" },
|
|
13
|
+
unselectAllText: { default: "Снять все" }
|
|
14
|
+
},
|
|
15
|
+
emits: ["columns-changed", "apply", "apply-error"],
|
|
16
|
+
setup(o, { emit: p }) {
|
|
17
|
+
const n = o, t = p;
|
|
18
|
+
return (d, e) => (s(), a(u, m(n, {
|
|
19
|
+
onColumnsChanged: e[0] || (e[0] = (l) => t("columns-changed", l)),
|
|
20
|
+
onApply: e[1] || (e[1] = (l) => t("apply")),
|
|
21
|
+
onApplyError: e[2] || (e[2] = (l) => t("apply-error", l))
|
|
22
|
+
}), null, 16));
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
export {
|
|
26
|
+
i as default
|
|
27
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { defineComponent as c, computed as a, createElementBlock as r, openBlock as d, normalizeClass as p, createElementVNode as t, toDisplayString as l } from "vue";
|
|
2
|
+
const i = { class: "r3-table-count__wrapper px-3" }, _ = { class: "r3-table-count__label pe-2" }, f = { class: "r3-table-count__value" }, v = /* @__PURE__ */ c({
|
|
3
|
+
__name: "TableCount",
|
|
4
|
+
props: {
|
|
5
|
+
label: { default: "" },
|
|
6
|
+
count: { default: 0 },
|
|
7
|
+
defaultLabel: { default: "-" },
|
|
8
|
+
defaultCount: { default: "-" },
|
|
9
|
+
size: { default: "medium" },
|
|
10
|
+
showSeparator: { type: Boolean, default: !0 }
|
|
11
|
+
},
|
|
12
|
+
setup(o) {
|
|
13
|
+
const e = o, n = a(() => e.label || e.defaultLabel), u = a(() => e.count === null || e.count === void 0 || e.count === "" ? e.defaultCount : e.count);
|
|
14
|
+
return (s, b) => (d(), r("div", {
|
|
15
|
+
class: p(["r3-table-count", [`r3-table-count--${s.size}`]])
|
|
16
|
+
}, [
|
|
17
|
+
t("div", i, [
|
|
18
|
+
t("span", _, l(n.value) + ":", 1),
|
|
19
|
+
t("span", f, l(u.value), 1)
|
|
20
|
+
])
|
|
21
|
+
], 2));
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
export {
|
|
25
|
+
v as default
|
|
26
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { defineComponent as a, createElementBlock as n, openBlock as l, createElementVNode as r, Fragment as d, renderList as m, normalizeClass as p, toDisplayString as u } from "vue";
|
|
2
|
+
const _ = { class: "row pt-3" }, f = { class: "col-12" }, k = ["onClick"], v = /* @__PURE__ */ a({
|
|
3
|
+
__name: "TableQuickFilterComponent",
|
|
4
|
+
props: {
|
|
5
|
+
filterList: {},
|
|
6
|
+
defaultSelected: { default: "" }
|
|
7
|
+
},
|
|
8
|
+
emits: ["emitSelected"],
|
|
9
|
+
setup(C, { emit: i }) {
|
|
10
|
+
const o = i, s = (e) => {
|
|
11
|
+
o("emitSelected", e);
|
|
12
|
+
};
|
|
13
|
+
return (e, b) => (l(), n("div", _, [
|
|
14
|
+
r("div", f, [
|
|
15
|
+
(l(!0), n(d, null, m(e.filterList, (t, c) => (l(), n("button", {
|
|
16
|
+
onClick: (h) => s(t.name),
|
|
17
|
+
class: p(["btn filter-item", {
|
|
18
|
+
active: e.defaultSelected === t.name,
|
|
19
|
+
disabled: t.disabled
|
|
20
|
+
}]),
|
|
21
|
+
key: c
|
|
22
|
+
}, u(t.title), 11, k))), 128))
|
|
23
|
+
])
|
|
24
|
+
]));
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
export {
|
|
28
|
+
v as default
|
|
29
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { defineComponent as d, createElementBlock as t, openBlock as l, createCommentVNode as o, toDisplayString as s } from "vue";
|
|
2
|
+
const r = {
|
|
3
|
+
"data-test": "ToggleAllTableRowButtons",
|
|
4
|
+
class: "toggle-all-rows-controls"
|
|
5
|
+
}, i = {
|
|
6
|
+
key: 2,
|
|
7
|
+
class: "selected-count"
|
|
8
|
+
}, g = /* @__PURE__ */ d({
|
|
9
|
+
__name: "ToggleAllTableRowButtons",
|
|
10
|
+
props: {
|
|
11
|
+
selectedRows: { default: () => [] },
|
|
12
|
+
selectAllText: { default: "Выбрать все" },
|
|
13
|
+
unselectAllText: { default: "Снять все" },
|
|
14
|
+
selectedText: { default: "Выбрано" },
|
|
15
|
+
showCount: { type: Boolean, default: !0 }
|
|
16
|
+
},
|
|
17
|
+
emits: ["selectAll", "unselectAll"],
|
|
18
|
+
setup(m, { emit: c }) {
|
|
19
|
+
const n = c, a = () => {
|
|
20
|
+
n("selectAll");
|
|
21
|
+
}, u = () => {
|
|
22
|
+
n("unselectAll");
|
|
23
|
+
};
|
|
24
|
+
return (e, p) => (l(), t("div", r, [
|
|
25
|
+
e.selectedRows.length > 0 ? (l(), t("button", {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: "btn btn-light me-3",
|
|
28
|
+
onClick: u
|
|
29
|
+
}, s(e.unselectAllText), 1)) : o("", !0),
|
|
30
|
+
e.selectedRows.length === 0 ? (l(), t("button", {
|
|
31
|
+
key: 1,
|
|
32
|
+
class: "btn btn-primary me-3",
|
|
33
|
+
onClick: a
|
|
34
|
+
}, s(e.selectAllText), 1)) : o("", !0),
|
|
35
|
+
e.showCount ? (l(), t("div", i, s(e.selectedText) + ": " + s(e.selectedRows.length), 1)) : o("", !0)
|
|
36
|
+
]));
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
export {
|
|
40
|
+
g as default
|
|
41
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { defineComponent as b, ref as c, computed as _, watch as g, isRef as x, createElementBlock as r, openBlock as a, createElementVNode as t, normalizeStyle as w, Fragment as m, renderList as p, normalizeClass as v, toDisplayString as u } from "vue";
|
|
2
|
+
const y = { class: "container-fluid rounded overflow-hidden bg-light" }, k = { class: "row w-100" }, C = { class: "text-secondary" }, F = { class: "d-flex py-3 px-2 onlyPrint" }, S = { class: "row w-100" }, V = { class: "text-secondary" }, z = { class: "row" }, $ = /* @__PURE__ */ b({
|
|
3
|
+
__name: "FilterValuesPanel",
|
|
4
|
+
props: {
|
|
5
|
+
filterValues: { default: null },
|
|
6
|
+
filterTitles: {}
|
|
7
|
+
},
|
|
8
|
+
emits: ["showFilter"],
|
|
9
|
+
setup(f, { emit: P }) {
|
|
10
|
+
const s = f, o = c(!1), i = c([]);
|
|
11
|
+
_(() => s.filterValues ? Object.entries(s.filterValues).filter(([l, e]) => e).map(([l, e]) => ({
|
|
12
|
+
name: s.filterTitles[l] || l,
|
|
13
|
+
value: String(e),
|
|
14
|
+
key: l
|
|
15
|
+
})) : []);
|
|
16
|
+
function h(l) {
|
|
17
|
+
if (!l) {
|
|
18
|
+
i.value = [];
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
i.value = Object.entries(l).filter(([e, n]) => n).map(([e, n]) => ({
|
|
22
|
+
name: s.filterTitles[e] || e,
|
|
23
|
+
value: String(n),
|
|
24
|
+
key: e
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
27
|
+
return g(
|
|
28
|
+
() => s.filterValues,
|
|
29
|
+
(l) => {
|
|
30
|
+
const e = x(l) ? l.value : l;
|
|
31
|
+
h(
|
|
32
|
+
e
|
|
33
|
+
);
|
|
34
|
+
},
|
|
35
|
+
{ deep: !0, immediate: !0 }
|
|
36
|
+
), (l, e) => (a(), r("div", y, [
|
|
37
|
+
t("div", {
|
|
38
|
+
style: w({ overflow: "hidden", maxHeight: o.value ? "initial" : "83px" }),
|
|
39
|
+
class: "d-flex py-3 px-2 noPrint"
|
|
40
|
+
}, [
|
|
41
|
+
t("div", k, [
|
|
42
|
+
(a(!0), r(m, null, p(i.value, (n, d) => (a(), r("div", {
|
|
43
|
+
class: v(["mb-2", d === i.value.length - 1 ? "col" : "col-auto"]),
|
|
44
|
+
key: n.key
|
|
45
|
+
}, [
|
|
46
|
+
t("div", C, u(n.name) + ":", 1),
|
|
47
|
+
t("div", null, [
|
|
48
|
+
t("strong", null, u(n.value), 1)
|
|
49
|
+
])
|
|
50
|
+
], 2))), 128))
|
|
51
|
+
]),
|
|
52
|
+
t("div", null, [
|
|
53
|
+
t("div", {
|
|
54
|
+
role: "button",
|
|
55
|
+
class: "expand-btn expand-btn-right rounded",
|
|
56
|
+
onClick: e[0] || (e[0] = (n) => l.$emit("showFilter"))
|
|
57
|
+
}, [...e[2] || (e[2] = [
|
|
58
|
+
t("i", { class: "bi bi-chevron-right i-hidden" }, null, -1)
|
|
59
|
+
])])
|
|
60
|
+
])
|
|
61
|
+
], 4),
|
|
62
|
+
t("div", F, [
|
|
63
|
+
t("div", S, [
|
|
64
|
+
(a(!0), r(m, null, p(i.value, (n, d) => (a(), r("div", {
|
|
65
|
+
class: v(["mb-2", d === i.value.length - 1 ? "col" : "col-auto"]),
|
|
66
|
+
key: n.key
|
|
67
|
+
}, [
|
|
68
|
+
t("div", V, u(n.name) + ":", 1),
|
|
69
|
+
t("div", null, [
|
|
70
|
+
t("strong", null, u(n.value), 1)
|
|
71
|
+
])
|
|
72
|
+
], 2))), 128))
|
|
73
|
+
])
|
|
74
|
+
]),
|
|
75
|
+
t("div", z, [
|
|
76
|
+
t("div", {
|
|
77
|
+
role: "button",
|
|
78
|
+
class: "expand-btn expand-btn-bottom hide-to-print",
|
|
79
|
+
onClick: e[1] || (e[1] = (n) => o.value = !o.value)
|
|
80
|
+
}, [
|
|
81
|
+
t("i", {
|
|
82
|
+
class: v({
|
|
83
|
+
"bi lh-normal": !0,
|
|
84
|
+
"bi-chevron-down": !o.value,
|
|
85
|
+
"bi-chevron-up": o.value
|
|
86
|
+
})
|
|
87
|
+
}, null, 2)
|
|
88
|
+
])
|
|
89
|
+
])
|
|
90
|
+
]));
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
export {
|
|
94
|
+
$ as default
|
|
95
|
+
};
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import { ref as u, computed as r, onScopeDispose as nt } from "vue";
|
|
2
|
+
function lt(c = {}) {
|
|
3
|
+
const {
|
|
4
|
+
loadCountries: z,
|
|
5
|
+
loadRegions: ue,
|
|
6
|
+
loadDistricts: ce,
|
|
7
|
+
loadLocalities: fe,
|
|
8
|
+
loadStreets: ve,
|
|
9
|
+
countryKey: de = "country_id",
|
|
10
|
+
regionKey: ye = "region_id",
|
|
11
|
+
districtKey: be = "district_id",
|
|
12
|
+
localityKey: pe = "locality_id",
|
|
13
|
+
streetKey: ge = "street_id",
|
|
14
|
+
houseKey: Le = "house",
|
|
15
|
+
buildingKey: Se = "building",
|
|
16
|
+
apartmentKey: me = "apartment",
|
|
17
|
+
countryLabel: he = "Страна",
|
|
18
|
+
regionLabel: $e = "Регион",
|
|
19
|
+
districtLabel: Ae = "Район",
|
|
20
|
+
localityLabel: we = "Населенный пункт",
|
|
21
|
+
streetLabel: Ke = "Улица",
|
|
22
|
+
houseLabel: Fe = "Дом",
|
|
23
|
+
buildingLabel: Oe = "Корпус",
|
|
24
|
+
apartmentLabel: Ee = "Квартира",
|
|
25
|
+
prefix: v = "",
|
|
26
|
+
multiStreets: Be = !1,
|
|
27
|
+
showHouseFields: De = !0
|
|
28
|
+
} = c, a = u({}), m = u(null), q = u(!1), G = u(!1), J = u(!1), N = u(!1), Q = u(!1), R = u([]), P = u([]), C = u([]), j = u([]), H = u([]), _ = [
|
|
29
|
+
q,
|
|
30
|
+
G,
|
|
31
|
+
J,
|
|
32
|
+
N,
|
|
33
|
+
Q
|
|
34
|
+
], y = [
|
|
35
|
+
R,
|
|
36
|
+
P,
|
|
37
|
+
C,
|
|
38
|
+
j,
|
|
39
|
+
H
|
|
40
|
+
], Re = [
|
|
41
|
+
z,
|
|
42
|
+
ue,
|
|
43
|
+
ce,
|
|
44
|
+
fe,
|
|
45
|
+
ve
|
|
46
|
+
], I = u(!1), Pe = r(() => I.value);
|
|
47
|
+
let k = 0, M = !1, U = !1, h;
|
|
48
|
+
const d = r(() => `${v}${de}`), b = r(() => `${v}${ye}`), $ = r(() => `${v}${be}`), p = r(() => `${v}${pe}`), x = r(() => `${v}${ge}`), A = r(() => `${v}${Le}`), w = r(() => `${v}${Se}`), K = r(() => `${v}${me}`), F = r(() => ({
|
|
49
|
+
country: c.countryLabel ?? he,
|
|
50
|
+
region: c.regionLabel ?? $e,
|
|
51
|
+
district: c.districtLabel ?? Ae,
|
|
52
|
+
locality: c.localityLabel ?? we,
|
|
53
|
+
street: c.streetLabel ?? Ke,
|
|
54
|
+
house: c.houseLabel ?? Fe,
|
|
55
|
+
building: c.buildingLabel ?? Oe,
|
|
56
|
+
apartment: c.apartmentLabel ?? Ee
|
|
57
|
+
})), O = [
|
|
58
|
+
d,
|
|
59
|
+
b,
|
|
60
|
+
$,
|
|
61
|
+
p,
|
|
62
|
+
x,
|
|
63
|
+
A,
|
|
64
|
+
w,
|
|
65
|
+
K
|
|
66
|
+
];
|
|
67
|
+
function E(e = !1) {
|
|
68
|
+
k += 1, I.value = e, _.forEach((t) => {
|
|
69
|
+
t.value = !1;
|
|
70
|
+
}), m.value = null, h = void 0;
|
|
71
|
+
}
|
|
72
|
+
nt(() => {
|
|
73
|
+
M = !0, E();
|
|
74
|
+
});
|
|
75
|
+
async function f(e) {
|
|
76
|
+
if (M) return !1;
|
|
77
|
+
E(!0);
|
|
78
|
+
const t = k, n = () => !M && t === k;
|
|
79
|
+
try {
|
|
80
|
+
return await e(n), n();
|
|
81
|
+
} catch (s) {
|
|
82
|
+
if (!n()) return !1;
|
|
83
|
+
throw m.value = s instanceof Error ? s : new Error("Не удалось загрузить адрес", { cause: s }), h = e, m.value;
|
|
84
|
+
} finally {
|
|
85
|
+
n() && (I.value = !1);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
async function i(e, t, n) {
|
|
89
|
+
const s = Re[e];
|
|
90
|
+
if (!(!s || !n())) {
|
|
91
|
+
_[e].value = !0;
|
|
92
|
+
try {
|
|
93
|
+
const l = await s(t);
|
|
94
|
+
if (!n()) return;
|
|
95
|
+
if (!Array.isArray(l) || l.some(
|
|
96
|
+
(o) => !o || !["string", "number"].includes(typeof o.id) || typeof o.label != "string"
|
|
97
|
+
))
|
|
98
|
+
throw new TypeError("Некорректный ответ справочника адресов");
|
|
99
|
+
y[e].value = l;
|
|
100
|
+
} finally {
|
|
101
|
+
n() && (_[e].value = !1);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
const Ce = () => f((e) => i(0, void 0, e)), je = (e) => f((t) => i(1, e, t)), He = (e) => f((t) => i(2, e, t)), _e = (e) => f((t) => i(3, e, t)), Ie = (e) => f((t) => i(4, e, t));
|
|
106
|
+
function B() {
|
|
107
|
+
c.onChange?.(g(a.value));
|
|
108
|
+
}
|
|
109
|
+
function g(e) {
|
|
110
|
+
return Object.fromEntries(
|
|
111
|
+
Object.entries(e).map(([t, n]) => [
|
|
112
|
+
t,
|
|
113
|
+
Array.isArray(n) ? [...n] : n
|
|
114
|
+
])
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
function L(e, t, n = !1) {
|
|
118
|
+
E();
|
|
119
|
+
const s = { ...a.value, [O[e].value]: t };
|
|
120
|
+
n || (O.slice(e + 1).forEach((l) => {
|
|
121
|
+
s[l.value] = null;
|
|
122
|
+
}), y.slice(e + 1).forEach((l) => {
|
|
123
|
+
l.value = [];
|
|
124
|
+
})), a.value = g(s), B();
|
|
125
|
+
}
|
|
126
|
+
const W = (e, t = !1) => L(0, e, t), X = (e, t = !1) => L(1, e, t), Y = (e, t = !1) => L(2, e, t), Z = (e, t = !1) => L(3, e, t), ee = (e) => Array.isArray(e) ? e.length === 1 ? e[0] : void 0 : e;
|
|
127
|
+
function S(e, t) {
|
|
128
|
+
const n = a.value[O[e].value], s = (l, o) => l == null || o == null ? l == null && o == null : String(l) === String(o);
|
|
129
|
+
return Array.isArray(n) && Array.isArray(t) ? n.length === t.length && n.every((l, o) => s(l, t[o])) : s(n, t);
|
|
130
|
+
}
|
|
131
|
+
const ke = (e) => S(0, e) ? Promise.resolve(!1) : (W(e), f(async (t) => {
|
|
132
|
+
e && await i(1, e, t);
|
|
133
|
+
})), Me = (e) => S(1, e) ? Promise.resolve(!1) : (X(e), f(async (t) => {
|
|
134
|
+
e && (await i(2, e, t), await i(3, e, t));
|
|
135
|
+
})), xe = (e) => {
|
|
136
|
+
if (S(2, e)) return Promise.resolve(!1);
|
|
137
|
+
Y(e);
|
|
138
|
+
const t = e || a.value[b.value];
|
|
139
|
+
return f(async (n) => {
|
|
140
|
+
t && await i(3, t, n);
|
|
141
|
+
});
|
|
142
|
+
}, Te = (e) => S(3, e) ? Promise.resolve(!1) : (Z(e), f(async (t) => {
|
|
143
|
+
const n = ee(e);
|
|
144
|
+
n && await i(4, n, t);
|
|
145
|
+
})), Ve = (e, t = !1) => {
|
|
146
|
+
S(4, e) || L(4, e, t);
|
|
147
|
+
};
|
|
148
|
+
function T(e, t) {
|
|
149
|
+
a.value = {
|
|
150
|
+
...a.value,
|
|
151
|
+
[e]: t.target.value
|
|
152
|
+
}, B();
|
|
153
|
+
}
|
|
154
|
+
const ze = (e) => T(A.value, e), qe = (e) => T(w.value, e), Ge = (e) => T(K.value, e);
|
|
155
|
+
function V(e, t) {
|
|
156
|
+
return f(async (n) => {
|
|
157
|
+
const s = z ? e[d.value] ?? t : t ?? e[d.value], l = e[b.value], o = e[$.value], D = ee(e[p.value]);
|
|
158
|
+
await i(0, void 0, n), (s || l) && await i(1, s, n), l && await i(2, l, n), (o || l) && await i(3, o || l, n), D && await i(4, D, n);
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
const Je = async (e) => {
|
|
162
|
+
E(), a.value = g({ ...a.value, ...e });
|
|
163
|
+
}, Ne = (e, t = c.countryId) => (a.value = g({ ...a.value, ...e }), y.slice(1).forEach((n) => {
|
|
164
|
+
n.value = [];
|
|
165
|
+
}), V({ ...a.value }, t));
|
|
166
|
+
function Qe(e, t) {
|
|
167
|
+
const n = Object.keys(e);
|
|
168
|
+
return n.length === Object.keys(t).length && n.every((s) => {
|
|
169
|
+
const l = e[s], o = t[s];
|
|
170
|
+
return Array.isArray(l) && Array.isArray(o) ? l.length === o.length && l.every((D, tt) => D === o[tt]) : l === o;
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
const Ue = (e, t, n = !1) => {
|
|
174
|
+
const s = Qe(e, a.value);
|
|
175
|
+
if (!(U && s && !n))
|
|
176
|
+
return U = !0, a.value = g(e), n && s && (a.value[d.value] = t ?? null, O.slice(1).forEach((l) => {
|
|
177
|
+
a.value[l.value] = null;
|
|
178
|
+
}), B()), y.slice(1).forEach((l) => {
|
|
179
|
+
l.value = [];
|
|
180
|
+
}), V({ ...a.value }, t);
|
|
181
|
+
}, We = () => h ? f(h) : Promise.resolve(!1), Xe = () => (a.value = {}, y.forEach((e) => {
|
|
182
|
+
e.value = [];
|
|
183
|
+
}), B(), V({}, c.countryId)), te = r(() => {
|
|
184
|
+
const e = a.value[d.value];
|
|
185
|
+
return e && R.value.find(
|
|
186
|
+
(n) => String(n.id) === String(e)
|
|
187
|
+
)?.label || "";
|
|
188
|
+
}), ne = r(() => {
|
|
189
|
+
const e = a.value[b.value];
|
|
190
|
+
return e && P.value.find(
|
|
191
|
+
(n) => String(n.id) === String(e)
|
|
192
|
+
)?.label || "";
|
|
193
|
+
}), ae = r(() => {
|
|
194
|
+
const e = a.value[$.value];
|
|
195
|
+
return e && C.value.find((t) => String(t.id) === String(e))?.label || "";
|
|
196
|
+
}), le = r(() => {
|
|
197
|
+
const e = a.value[p.value];
|
|
198
|
+
return e && j.value.find((t) => String(t.id) === String(e))?.label || "";
|
|
199
|
+
}), se = r(() => {
|
|
200
|
+
const e = a.value[x.value];
|
|
201
|
+
return e && H.value.find(
|
|
202
|
+
(n) => String(n.id) === String(e)
|
|
203
|
+
)?.label || "";
|
|
204
|
+
}), re = r(() => {
|
|
205
|
+
const e = a.value[A.value];
|
|
206
|
+
return e ? `${F.value.house} ${e}` : "";
|
|
207
|
+
}), oe = r(() => {
|
|
208
|
+
const e = a.value[w.value];
|
|
209
|
+
return e ? `${F.value.building} ${e}` : "";
|
|
210
|
+
}), ie = r(() => {
|
|
211
|
+
const e = a.value[K.value];
|
|
212
|
+
return e ? `${F.value.apartment} ${e}` : "";
|
|
213
|
+
}), Ye = r(() => [
|
|
214
|
+
te.value,
|
|
215
|
+
ne.value,
|
|
216
|
+
ae.value,
|
|
217
|
+
le.value,
|
|
218
|
+
se.value,
|
|
219
|
+
re.value,
|
|
220
|
+
oe.value,
|
|
221
|
+
ie.value
|
|
222
|
+
].filter(Boolean).join(", ")), Ze = r(() => {
|
|
223
|
+
const e = a.value[p.value];
|
|
224
|
+
return Array.isArray(e) ? e.length > 1 : !1;
|
|
225
|
+
}), et = r(() => Be ? !1 : De);
|
|
226
|
+
return {
|
|
227
|
+
// State
|
|
228
|
+
modelValue: a,
|
|
229
|
+
isLoading: Pe,
|
|
230
|
+
error: m,
|
|
231
|
+
retry: We,
|
|
232
|
+
syncFromProps: Ue,
|
|
233
|
+
resetForm: Xe,
|
|
234
|
+
isCountryLoading: q,
|
|
235
|
+
isRegionLoading: G,
|
|
236
|
+
isDistrictLoading: J,
|
|
237
|
+
isLocalityLoading: N,
|
|
238
|
+
isStreetLoading: Q,
|
|
239
|
+
countryOptions: R,
|
|
240
|
+
regionOptions: P,
|
|
241
|
+
districtOptions: C,
|
|
242
|
+
localityOptions: j,
|
|
243
|
+
streetOptions: H,
|
|
244
|
+
// Computed
|
|
245
|
+
finalCountryKey: d,
|
|
246
|
+
finalRegionKey: b,
|
|
247
|
+
finalDistrictKey: $,
|
|
248
|
+
finalLocalityKey: p,
|
|
249
|
+
finalStreetKey: x,
|
|
250
|
+
finalHouseKey: A,
|
|
251
|
+
finalBuildingKey: w,
|
|
252
|
+
finalApartmentKey: K,
|
|
253
|
+
labels: F,
|
|
254
|
+
selectedCountryLabel: te,
|
|
255
|
+
selectedRegionLabel: ne,
|
|
256
|
+
selectedDistrictLabel: ae,
|
|
257
|
+
selectedLocalityLabel: le,
|
|
258
|
+
selectedStreetLabel: se,
|
|
259
|
+
selectedHouseLabel: re,
|
|
260
|
+
selectedBuildingLabel: oe,
|
|
261
|
+
selectedApartmentLabel: ie,
|
|
262
|
+
fullAddress: Ye,
|
|
263
|
+
isMultiLocalitiesSelected: Ze,
|
|
264
|
+
shouldShowHouseFields: et,
|
|
265
|
+
// Methods
|
|
266
|
+
loadCountryOptions: Ce,
|
|
267
|
+
loadRegionOptions: je,
|
|
268
|
+
loadDistrictOptions: He,
|
|
269
|
+
loadLocalityOptions: _e,
|
|
270
|
+
loadStreetOptions: Ie,
|
|
271
|
+
onCountrySelect: ke,
|
|
272
|
+
onRegionSelect: Me,
|
|
273
|
+
onDistrictSelect: xe,
|
|
274
|
+
onLocalitySelect: Te,
|
|
275
|
+
onStreetSelect: Ve,
|
|
276
|
+
onHouseInput: ze,
|
|
277
|
+
onBuildingInput: qe,
|
|
278
|
+
onApartmentInput: Ge,
|
|
279
|
+
resetFieldsByCountry: W,
|
|
280
|
+
resetFieldsByRegion: X,
|
|
281
|
+
resetFieldsByDistrict: Y,
|
|
282
|
+
resetFieldsByLocality: Z,
|
|
283
|
+
autoFillForm: Je,
|
|
284
|
+
autoFillFormSkipReset: Ne
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
export {
|
|
288
|
+
lt as useAddressForm
|
|
289
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useId as a, computed as l } from "vue";
|
|
2
|
+
function d(o) {
|
|
3
|
+
const t = `${a()}-error`, i = l(() => {
|
|
4
|
+
const r = o();
|
|
5
|
+
return (Array.isArray(r) ? r : [r]).filter(
|
|
6
|
+
(e) => typeof e == "string" && !!e.trim()
|
|
7
|
+
);
|
|
8
|
+
});
|
|
9
|
+
function n(r) {
|
|
10
|
+
const e = [
|
|
11
|
+
r["aria-describedby"],
|
|
12
|
+
i.value.length ? t : null
|
|
13
|
+
].filter((s) => typeof s == "string").join(" ").split(/\s+/).filter(Boolean);
|
|
14
|
+
return {
|
|
15
|
+
"aria-invalid": i.value.length ? "true" : r["aria-invalid"],
|
|
16
|
+
"aria-describedby": [...new Set(e)].join(" ") || void 0
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
return { errorId: t, errorMessages: i, errorAttributes: n };
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
d as useFieldError
|
|
23
|
+
};
|