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,156 @@
|
|
|
1
|
+
import { trackTableLoad as p } from "./tableLoad.js";
|
|
2
|
+
function b(a) {
|
|
3
|
+
const e = /* @__PURE__ */ new Set();
|
|
4
|
+
return a.flatMap((t) => {
|
|
5
|
+
if (t.field === void 0) return [];
|
|
6
|
+
if (typeof t.field != "string" || !t.field.trim() || e.has(t.field) || t.title !== void 0 && typeof t.title != "string" || t.visible !== void 0 && typeof t.visible != "boolean")
|
|
7
|
+
throw new TypeError("Некорректная колонка редактора таблицы");
|
|
8
|
+
return e.add(t.field), [
|
|
9
|
+
{
|
|
10
|
+
...t,
|
|
11
|
+
field: t.field,
|
|
12
|
+
title: t.title ?? "",
|
|
13
|
+
visible: t.visible !== !1
|
|
14
|
+
}
|
|
15
|
+
];
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function n(a) {
|
|
19
|
+
return a.flatMap((e) => {
|
|
20
|
+
if (e.field === void 0) return [];
|
|
21
|
+
if (typeof e.field != "string" || !e.field.trim())
|
|
22
|
+
throw new TypeError("Некорректное поле колонки снимка таблицы");
|
|
23
|
+
if (e.width != null && (typeof e.width != "number" || !Number.isFinite(e.width) || e.width < 0))
|
|
24
|
+
throw new TypeError("Некорректная ширина колонки снимка таблицы");
|
|
25
|
+
if (e.visible !== void 0 && typeof e.visible != "boolean")
|
|
26
|
+
throw new TypeError("Некорректная видимость колонки снимка таблицы");
|
|
27
|
+
return [
|
|
28
|
+
{
|
|
29
|
+
field: e.field,
|
|
30
|
+
...e.width != null ? { width: e.width } : {},
|
|
31
|
+
...e.visible !== void 0 ? { visible: e.visible } : {}
|
|
32
|
+
}
|
|
33
|
+
];
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function g(a, {
|
|
37
|
+
resetContext: e = !1,
|
|
38
|
+
resetPage: t = !1,
|
|
39
|
+
includeSelection: f = !0,
|
|
40
|
+
layout: s
|
|
41
|
+
} = {}) {
|
|
42
|
+
const r = a.getPageSize();
|
|
43
|
+
if (typeof r != "number" || !Number.isSafeInteger(r) || r <= 0)
|
|
44
|
+
throw new TypeError("Некорректный размер страницы снимка таблицы");
|
|
45
|
+
const i = e || t ? !1 : a.getPage(), d = i === !1 ? 1 : i;
|
|
46
|
+
if (!Number.isSafeInteger(d) || d <= 0)
|
|
47
|
+
throw new TypeError("Некорректная страница снимка таблицы");
|
|
48
|
+
return {
|
|
49
|
+
page: d,
|
|
50
|
+
size: r,
|
|
51
|
+
filters: e ? [] : a.getHeaderFilters().map((o) => ({
|
|
52
|
+
field: o.field,
|
|
53
|
+
value: o.value
|
|
54
|
+
})),
|
|
55
|
+
sort: e ? [] : a.getSorters().map(({ field: o, dir: l }) => ({ column: o, dir: l })),
|
|
56
|
+
layout: e ? [] : n(s ?? a.getColumnLayout()),
|
|
57
|
+
selected: e || t || !f ? [] : (a.getSelectedData?.() ?? []).flatMap(
|
|
58
|
+
(o) => o.id == null ? [] : [o.id]
|
|
59
|
+
)
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function u(a, e = []) {
|
|
63
|
+
const t = /* @__PURE__ */ new Map();
|
|
64
|
+
for (const i of a)
|
|
65
|
+
if (i.field !== void 0) {
|
|
66
|
+
if (typeof i.field != "string" || !i.field.trim() || t.has(i.field))
|
|
67
|
+
throw new TypeError("Некорректное или повторное поле колонки таблицы");
|
|
68
|
+
t.set(i.field, i);
|
|
69
|
+
}
|
|
70
|
+
const f = /* @__PURE__ */ new Set(), s = e.flatMap(({ field: i, width: d, visible: o }) => {
|
|
71
|
+
if (typeof i != "string" || !i.trim() || f.has(i))
|
|
72
|
+
throw new TypeError("Некорректное или повторное поле layout таблицы");
|
|
73
|
+
f.add(i);
|
|
74
|
+
const l = t.get(i);
|
|
75
|
+
return l ? [
|
|
76
|
+
{
|
|
77
|
+
...l,
|
|
78
|
+
...d !== void 0 ? { width: d } : {},
|
|
79
|
+
...o !== void 0 ? { visible: o } : {}
|
|
80
|
+
}
|
|
81
|
+
] : [];
|
|
82
|
+
});
|
|
83
|
+
s.push(
|
|
84
|
+
...a.filter((i) => i.field !== void 0 && !f.has(i.field)).map((i) => ({ ...i }))
|
|
85
|
+
);
|
|
86
|
+
let r = 0;
|
|
87
|
+
return a.map(
|
|
88
|
+
(i) => i.field === void 0 ? { ...i } : s[r++]
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
function v(a, e, t = []) {
|
|
92
|
+
const f = new Set(a.map((r) => r.field)), s = /* @__PURE__ */ new Map();
|
|
93
|
+
for (const r of e) {
|
|
94
|
+
if (typeof r.field != "string" || !r.field.trim() || typeof r.visible != "boolean" || !f.has(r.field) || s.has(r.field))
|
|
95
|
+
throw new TypeError("Некорректный черновик видимости колонок");
|
|
96
|
+
s.set(r.field, r.visible);
|
|
97
|
+
}
|
|
98
|
+
return u(a, n(t)).map(
|
|
99
|
+
(r) => r.field !== void 0 && s.has(r.field) ? { ...r, visible: s.get(r.field) } : r
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
function h(a, e) {
|
|
103
|
+
let t;
|
|
104
|
+
return {
|
|
105
|
+
track(f, s, r) {
|
|
106
|
+
const i = { state: f, isSameContext: s, operation: r };
|
|
107
|
+
return t = i, () => {
|
|
108
|
+
t === i && (t = void 0);
|
|
109
|
+
};
|
|
110
|
+
},
|
|
111
|
+
cancelSuperseded() {
|
|
112
|
+
t && a() === t.state && t.isSameContext() && t.operation.isSupersededByRequest() && e();
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
async function w(a, e, t, f) {
|
|
117
|
+
async function s(i) {
|
|
118
|
+
const d = await p(
|
|
119
|
+
a,
|
|
120
|
+
i,
|
|
121
|
+
f.signal,
|
|
122
|
+
f.owner
|
|
123
|
+
);
|
|
124
|
+
if (d.status === "cancelled") return "cancelled";
|
|
125
|
+
if (!f.isCurrent() || d.status === "superseded")
|
|
126
|
+
return "superseded";
|
|
127
|
+
if (d.status === "failed") throw d.error;
|
|
128
|
+
return d.status;
|
|
129
|
+
}
|
|
130
|
+
if (!f.isCurrent()) return "superseded";
|
|
131
|
+
f.beforeRequest();
|
|
132
|
+
const r = await s(
|
|
133
|
+
() => a.replaceData(t, { ...e.params, per_page: e.size })
|
|
134
|
+
);
|
|
135
|
+
if (r !== "applied") return r;
|
|
136
|
+
if (e.page !== a.getPage()) {
|
|
137
|
+
f.beforeRequest();
|
|
138
|
+
const i = await s(() => a.setPage(e.page));
|
|
139
|
+
if (i !== "applied") return i;
|
|
140
|
+
}
|
|
141
|
+
return f.isCurrent() ? "restored" : "superseded";
|
|
142
|
+
}
|
|
143
|
+
async function T(...a) {
|
|
144
|
+
const e = await w(...a);
|
|
145
|
+
return { status: e === "restored" ? "applied" : e };
|
|
146
|
+
}
|
|
147
|
+
export {
|
|
148
|
+
v as applyColumnVisibility,
|
|
149
|
+
g as captureTableSnapshot,
|
|
150
|
+
h as createSnapshotOwner,
|
|
151
|
+
u as mergeColumnLayout,
|
|
152
|
+
n as normalizeTableColumnLayout,
|
|
153
|
+
w as restoreTableData,
|
|
154
|
+
T as restoreTableOperationData,
|
|
155
|
+
b as toTableEditorColumns
|
|
156
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
function j(t, n, u) {
|
|
2
|
+
return {
|
|
3
|
+
current_page: n,
|
|
4
|
+
data: [],
|
|
5
|
+
first_page_url: t,
|
|
6
|
+
from: 0,
|
|
7
|
+
last_page: 1,
|
|
8
|
+
last_page_url: t,
|
|
9
|
+
links: [],
|
|
10
|
+
next_page_url: null,
|
|
11
|
+
path: t,
|
|
12
|
+
per_page: u,
|
|
13
|
+
prev_page_url: null,
|
|
14
|
+
to: 0,
|
|
15
|
+
total: 0
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function p(t = {}) {
|
|
19
|
+
const n = (r, o) => r == null || r === "" ? [] : Array.isArray(r) ? r.flatMap(
|
|
20
|
+
(a, i) => n(a, o ? `${o}[${i}]` : String(i))
|
|
21
|
+
) : typeof r == "object" ? Object.entries(r).flatMap(
|
|
22
|
+
([a, i]) => n(i, o ? `${o}[${a}]` : a)
|
|
23
|
+
) : o ? [{ key: o, value: String(r) }] : [], u = (r) => r == null || r === "" ? !0 : Array.isArray(r) ? r.length === 0 : typeof r == "object" ? Object.keys(r).length === 0 : !1;
|
|
24
|
+
return async (r, o, a) => {
|
|
25
|
+
const i = (o.method || "GET").toUpperCase();
|
|
26
|
+
let f = r;
|
|
27
|
+
if (i === "GET" && a && typeof a == "object") {
|
|
28
|
+
const e = new URL(r, typeof window < "u" ? window.location.origin : "http://localhost");
|
|
29
|
+
Object.entries(a).forEach(([c, d]) => {
|
|
30
|
+
if (u(d)) return;
|
|
31
|
+
n(d, c).forEach(({ key: l, value: h }) => {
|
|
32
|
+
e.searchParams.set(l, h);
|
|
33
|
+
});
|
|
34
|
+
}), f = e.toString();
|
|
35
|
+
}
|
|
36
|
+
let s;
|
|
37
|
+
try {
|
|
38
|
+
s = await fetch(f, o);
|
|
39
|
+
} catch (e) {
|
|
40
|
+
throw t.onError?.(e), e;
|
|
41
|
+
}
|
|
42
|
+
if (s.status === 401)
|
|
43
|
+
throw t.onUnauthorized?.(s), s;
|
|
44
|
+
if (s.status === 404 && t.onNotFound)
|
|
45
|
+
return t.onNotFound({ url: f, params: a, response: s });
|
|
46
|
+
if (!s.ok) {
|
|
47
|
+
const e = await w(s);
|
|
48
|
+
throw t.onError?.(e), e;
|
|
49
|
+
}
|
|
50
|
+
try {
|
|
51
|
+
return await s.json();
|
|
52
|
+
} catch (e) {
|
|
53
|
+
const c = Object.assign(
|
|
54
|
+
e instanceof Error ? e : new Error("Malformed JSON"),
|
|
55
|
+
{ kind: "malformed", status: 502, statusCode: 502 }
|
|
56
|
+
);
|
|
57
|
+
throw t.onError?.(c), c;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
async function w(t) {
|
|
62
|
+
const n = await g(t);
|
|
63
|
+
return Object.assign(new Error(`HTTP ${t.status}`), {
|
|
64
|
+
status: t.status,
|
|
65
|
+
statusCode: t.status,
|
|
66
|
+
data: n,
|
|
67
|
+
headers: t.headers,
|
|
68
|
+
response: t
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
async function g(t) {
|
|
72
|
+
const n = t.clone();
|
|
73
|
+
try {
|
|
74
|
+
return await n.json();
|
|
75
|
+
} catch {
|
|
76
|
+
return await t.clone().text();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
export {
|
|
80
|
+
j as createEmptyRemotePageResponse,
|
|
81
|
+
p as createTableAjaxRequestFunc
|
|
82
|
+
};
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { getTabulatorRuntime as q, createTabulatorRuntime as A } from "./tabulatorRuntime.js";
|
|
2
|
+
import { withTableQueryParameters as g } from "./tableData.js";
|
|
3
|
+
import { installTabulatorQueryAdapter as k } from "./tabulatorQueryAdapter.js";
|
|
4
|
+
import { createTableLoadBoundary as M, withTableLoadBoundary as x, getTableRequestOperation as L, registerTableLoadTracker as j } from "./tableLoad.js";
|
|
5
|
+
function G(n, p, f) {
|
|
6
|
+
let o = 0;
|
|
7
|
+
const c = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap();
|
|
8
|
+
return {
|
|
9
|
+
request: async function(...y) {
|
|
10
|
+
const d = ++o, l = {};
|
|
11
|
+
try {
|
|
12
|
+
const b = await n.apply(this, y);
|
|
13
|
+
u.set(l, { request: d, value: b, failed: !1 });
|
|
14
|
+
} catch (b) {
|
|
15
|
+
u.set(l, { request: d, value: b, failed: !0 });
|
|
16
|
+
}
|
|
17
|
+
return l;
|
|
18
|
+
},
|
|
19
|
+
wrapResponse: (y) => function(d, l, b) {
|
|
20
|
+
const w = b && typeof b == "object" ? u.get(b) : void 0;
|
|
21
|
+
if (!w)
|
|
22
|
+
throw new TypeError("r3ui-lib: ответ не принадлежит запросу таблицы");
|
|
23
|
+
if (!p() || w.request !== o) return !1;
|
|
24
|
+
if (w.failed) throw w.value;
|
|
25
|
+
let v;
|
|
26
|
+
try {
|
|
27
|
+
v = y.call(this, d, l, w.value);
|
|
28
|
+
} catch (R) {
|
|
29
|
+
if (!p() || w.request !== o) return !1;
|
|
30
|
+
throw R;
|
|
31
|
+
}
|
|
32
|
+
return !p() || w.request !== o ? !1 : (v === !1 && f(), v && typeof v == "object" && c.set(v, w.request), v);
|
|
33
|
+
},
|
|
34
|
+
isCurrentResponse(y) {
|
|
35
|
+
const d = y && typeof y == "object" ? c.get(y) : void 0;
|
|
36
|
+
return p() && (d === void 0 || d === o);
|
|
37
|
+
},
|
|
38
|
+
trackMappedResponse(y, d) {
|
|
39
|
+
const l = c.get(y);
|
|
40
|
+
l !== void 0 && c.set(d, l);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function N(n, p) {
|
|
45
|
+
if (n && typeof n == "object") {
|
|
46
|
+
const c = q(n);
|
|
47
|
+
if (c) {
|
|
48
|
+
if (!c.isActive())
|
|
49
|
+
throw new DOMException("Runtime Tabulator завершён", "AbortError");
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
const f = A(n, !!p), o = f.loader;
|
|
54
|
+
try {
|
|
55
|
+
if (p) {
|
|
56
|
+
const u = o.mapParams;
|
|
57
|
+
f.patch(
|
|
58
|
+
o,
|
|
59
|
+
"mapParams",
|
|
60
|
+
function(...h) {
|
|
61
|
+
const i = u.apply(this, h);
|
|
62
|
+
return p.trackMappedResponse(h[0], i), i;
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
const c = o.chain;
|
|
67
|
+
if (f.patch(o, "chain", function(...u) {
|
|
68
|
+
const [h, i] = u;
|
|
69
|
+
return h === "data-loaded" && Array.isArray(i) && (i[0] === !1 || p && !p.isCurrentResponse(i[0])) ? !1 : c.apply(this, u);
|
|
70
|
+
}), p && D(f, p), typeof o.load == "function") {
|
|
71
|
+
const u = o.load;
|
|
72
|
+
f.patch(o, "load", function(...h) {
|
|
73
|
+
if (!f.isActive())
|
|
74
|
+
throw new DOMException("Runtime Tabulator завершён", "AbortError");
|
|
75
|
+
const i = f.retain();
|
|
76
|
+
try {
|
|
77
|
+
return Promise.resolve(u.apply(this, h)).finally(i);
|
|
78
|
+
} catch (y) {
|
|
79
|
+
throw i(), y;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
} catch (c) {
|
|
84
|
+
throw f.rollback(), c;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
function D(n, p) {
|
|
88
|
+
const { table: f, loader: o } = n, c = /* @__PURE__ */ new WeakMap();
|
|
89
|
+
let u, h;
|
|
90
|
+
const i = (r) => n.isActive() && r.order === o.requestOrder && !o.table.destroyed && p.isCurrentResponse(void 0), y = n.rowManager;
|
|
91
|
+
k(n);
|
|
92
|
+
const d = /* @__PURE__ */ new Set();
|
|
93
|
+
n.own(() => {
|
|
94
|
+
for (const r of d) r.boundary.finish({ status: "cancelled" });
|
|
95
|
+
d.clear();
|
|
96
|
+
});
|
|
97
|
+
let l;
|
|
98
|
+
const b = o.dispatchExternal;
|
|
99
|
+
n.patch(
|
|
100
|
+
o,
|
|
101
|
+
"dispatchExternal",
|
|
102
|
+
function(r, e) {
|
|
103
|
+
const t = r === "dataLoaded" ? l : void 0;
|
|
104
|
+
try {
|
|
105
|
+
return b.call(this, r, e);
|
|
106
|
+
} catch (a) {
|
|
107
|
+
if (t) {
|
|
108
|
+
t.outcome = { status: "failed", error: a };
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
throw a;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
const w = y.setData;
|
|
116
|
+
n.patch(
|
|
117
|
+
y,
|
|
118
|
+
"setData",
|
|
119
|
+
function(r, ...e) {
|
|
120
|
+
const t = l;
|
|
121
|
+
if (!t || t.rows !== r)
|
|
122
|
+
return w.call(this, r, ...e);
|
|
123
|
+
if (l = void 0, t.outcome.status === "failed") return Promise.resolve();
|
|
124
|
+
if (!i(t))
|
|
125
|
+
return t.outcome = { status: "superseded" }, Promise.resolve();
|
|
126
|
+
try {
|
|
127
|
+
t.applying = Promise.resolve(
|
|
128
|
+
w.call(this, r, ...e)
|
|
129
|
+
).then(
|
|
130
|
+
() => {
|
|
131
|
+
t.outcome = { status: "applied" };
|
|
132
|
+
},
|
|
133
|
+
(a) => {
|
|
134
|
+
t.outcome = { status: "failed", error: a };
|
|
135
|
+
}
|
|
136
|
+
);
|
|
137
|
+
} catch (a) {
|
|
138
|
+
t.outcome = { status: "failed", error: a }, t.applying = Promise.resolve();
|
|
139
|
+
}
|
|
140
|
+
return t.applying;
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
const v = o.load;
|
|
144
|
+
n.patch(o, "load", function(...r) {
|
|
145
|
+
const e = {
|
|
146
|
+
order: this.requestOrder + 1,
|
|
147
|
+
outcome: { status: "cancelled" },
|
|
148
|
+
boundary: M()
|
|
149
|
+
};
|
|
150
|
+
d.add(e), h?.(e);
|
|
151
|
+
const t = u;
|
|
152
|
+
u = e;
|
|
153
|
+
let a;
|
|
154
|
+
try {
|
|
155
|
+
a = x(
|
|
156
|
+
f,
|
|
157
|
+
e.boundary,
|
|
158
|
+
() => g(
|
|
159
|
+
f,
|
|
160
|
+
r[1],
|
|
161
|
+
() => v.apply(this, r),
|
|
162
|
+
L(f)
|
|
163
|
+
)
|
|
164
|
+
);
|
|
165
|
+
} catch (s) {
|
|
166
|
+
throw e.outcome = i(e) ? { status: "failed", error: s } : { status: "superseded" }, d.delete(e), e.boundary.finish(e.outcome), s;
|
|
167
|
+
} finally {
|
|
168
|
+
u = t;
|
|
169
|
+
}
|
|
170
|
+
return a.then(
|
|
171
|
+
async (s) => {
|
|
172
|
+
try {
|
|
173
|
+
if (await e.applying, i(e) || (e.outcome = { status: "superseded" }), e.outcome.status === "failed" && !e.errorNotified) {
|
|
174
|
+
const { error: m } = e.outcome;
|
|
175
|
+
e.errorNotified = !0, console.error("Data Load Error: ", m), this.dispatchExternal("dataLoadError", m), !r[4] && i(e) && (this.alertError(), n.timeout(() => {
|
|
176
|
+
i(e) && this.clearAlert();
|
|
177
|
+
}, this.table.options.dataLoaderErrorTimeout));
|
|
178
|
+
}
|
|
179
|
+
return s;
|
|
180
|
+
} finally {
|
|
181
|
+
l === e && (l = void 0), i(e) || (e.outcome = { status: "superseded" }), d.delete(e), e.boundary.finish(e.outcome);
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
(s) => {
|
|
185
|
+
throw e.outcome = i(e) ? { status: "failed", error: s } : { status: "superseded" }, l === e && (l = void 0), d.delete(e), e.boundary.finish(e.outcome), s;
|
|
186
|
+
}
|
|
187
|
+
);
|
|
188
|
+
});
|
|
189
|
+
const R = o.mapParams;
|
|
190
|
+
n.patch(
|
|
191
|
+
o,
|
|
192
|
+
"mapParams",
|
|
193
|
+
function(r, e) {
|
|
194
|
+
const t = c.get(r);
|
|
195
|
+
if (!t) return R.call(this, r, e);
|
|
196
|
+
const a = t.value;
|
|
197
|
+
return !t.failed && a !== null && typeof a == "object" && !Array.isArray(a) && (t.value = R.call(this, a, e)), r;
|
|
198
|
+
}
|
|
199
|
+
);
|
|
200
|
+
const P = o.chain;
|
|
201
|
+
n.patch(o, "chain", function(...r) {
|
|
202
|
+
const [e, t] = r;
|
|
203
|
+
if (e === "data-load" && u) {
|
|
204
|
+
const a = u;
|
|
205
|
+
let s;
|
|
206
|
+
try {
|
|
207
|
+
s = P.apply(this, r);
|
|
208
|
+
} catch (m) {
|
|
209
|
+
s = Promise.reject(m);
|
|
210
|
+
}
|
|
211
|
+
return Promise.resolve(s).then(
|
|
212
|
+
(m) => {
|
|
213
|
+
const T = {};
|
|
214
|
+
return c.set(T, { state: a, value: m, failed: !1 }), T;
|
|
215
|
+
},
|
|
216
|
+
(m) => {
|
|
217
|
+
const T = {};
|
|
218
|
+
return c.set(T, { state: a, value: m, failed: !0 }), T;
|
|
219
|
+
}
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
if (e === "data-loaded" && Array.isArray(t) && t[0] && typeof t[0] == "object") {
|
|
223
|
+
const a = c.get(t[0]);
|
|
224
|
+
if (a) {
|
|
225
|
+
const { state: s, value: m, failed: T } = a;
|
|
226
|
+
if (!i(s))
|
|
227
|
+
return s.outcome = { status: "superseded" }, !1;
|
|
228
|
+
if (T)
|
|
229
|
+
return s.outcome = { status: "failed", error: m }, !1;
|
|
230
|
+
try {
|
|
231
|
+
const E = P.call(this, e, [m], r[2], m);
|
|
232
|
+
if (E === !1) s.outcome = { status: "cancelled" };
|
|
233
|
+
else if (Array.isArray(E))
|
|
234
|
+
s.rows = E, l = s;
|
|
235
|
+
else
|
|
236
|
+
return s.outcome = {
|
|
237
|
+
status: "failed",
|
|
238
|
+
error: new TypeError(
|
|
239
|
+
"Некорректный результат загрузки: ожидался массив строк"
|
|
240
|
+
)
|
|
241
|
+
}, !1;
|
|
242
|
+
return E;
|
|
243
|
+
} catch (E) {
|
|
244
|
+
return s.outcome = { status: "failed", error: E }, !1;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
return P.apply(this, r);
|
|
249
|
+
}), n.own(
|
|
250
|
+
j(f, async (r) => {
|
|
251
|
+
let e;
|
|
252
|
+
const t = h;
|
|
253
|
+
h = (s) => {
|
|
254
|
+
e ??= s;
|
|
255
|
+
};
|
|
256
|
+
let a;
|
|
257
|
+
try {
|
|
258
|
+
a = r();
|
|
259
|
+
} finally {
|
|
260
|
+
h = t;
|
|
261
|
+
}
|
|
262
|
+
if (await a, !e)
|
|
263
|
+
throw new TypeError("r3ui-lib: операция не начала загрузку таблицы");
|
|
264
|
+
return e.outcome;
|
|
265
|
+
})
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
export {
|
|
269
|
+
G as createTableResponseGuard,
|
|
270
|
+
N as installTableCancellationGuard
|
|
271
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { mergeColumnLayout as f } from "./tableAdapter.js";
|
|
2
|
+
function s(r, o) {
|
|
3
|
+
if (r != null) {
|
|
4
|
+
if (typeof r == "number" && Number.isFinite(r) && r >= 0)
|
|
5
|
+
return r;
|
|
6
|
+
if (typeof r == "string") {
|
|
7
|
+
const t = /^(\d+(?:\.\d+)?)(px|%)?$/.exec(r.trim());
|
|
8
|
+
if (t && Number.isFinite(Number(t[1])) && (o || t[2] !== "%"))
|
|
9
|
+
return t[2] === "px" ? Number(t[1]) : r.trim();
|
|
10
|
+
}
|
|
11
|
+
throw new TypeError("r3ui.table.columns_storage_invalid_width");
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function l(r) {
|
|
15
|
+
if (!Array.isArray(r))
|
|
16
|
+
throw new TypeError("r3ui.table.columns_storage_invalid");
|
|
17
|
+
const o = /* @__PURE__ */ new Set();
|
|
18
|
+
return r.flatMap((t) => {
|
|
19
|
+
if (!t || typeof t != "object" || Array.isArray(t))
|
|
20
|
+
throw new TypeError("r3ui.table.columns_storage_invalid");
|
|
21
|
+
const i = t;
|
|
22
|
+
if (i.field === void 0) return [];
|
|
23
|
+
if (typeof i.field != "string" || !i.field.trim() || o.has(i.field))
|
|
24
|
+
throw new TypeError("r3ui.table.columns_storage_invalid_field");
|
|
25
|
+
if (o.add(i.field), i.visible !== void 0 && typeof i.visible != "boolean")
|
|
26
|
+
throw new TypeError("r3ui.table.columns_storage_invalid_visibility");
|
|
27
|
+
const d = s(i.width, !0), e = s(i.minWidth, !1);
|
|
28
|
+
return [
|
|
29
|
+
{
|
|
30
|
+
field: i.field,
|
|
31
|
+
...d !== void 0 ? { width: d } : {},
|
|
32
|
+
...e !== void 0 ? { minWidth: e } : {},
|
|
33
|
+
...i.visible !== void 0 ? { visible: i.visible } : {}
|
|
34
|
+
}
|
|
35
|
+
];
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function m(r, o) {
|
|
39
|
+
const t = l(o), i = new Map(t.map((e) => [e.field, e])), d = r.map((e) => {
|
|
40
|
+
const n = e.field === void 0 ? void 0 : i.get(e.field);
|
|
41
|
+
return {
|
|
42
|
+
...e,
|
|
43
|
+
...n?.width !== void 0 ? { width: n.width } : {},
|
|
44
|
+
...n?.minWidth !== void 0 ? { minWidth: n.minWidth } : {}
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
return f(
|
|
48
|
+
d,
|
|
49
|
+
t.map(({ field: e, visible: n }) => ({ field: e, visible: n }))
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
l as normalizeStoredColumnLayout,
|
|
54
|
+
m as restoreStoredTableColumns
|
|
55
|
+
};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { toRaw as o } from "vue";
|
|
2
|
+
import { cloneTableValue as p } from "./tableSnapshotValue.js";
|
|
3
|
+
function T(e, r, t, a) {
|
|
4
|
+
const i = e?.options.dataSendParams ?? {}, g = Number(t[i.page ?? "page"] ?? e?.getPage() ?? 1), l = Number(
|
|
5
|
+
t[i.per_page ?? "per_page"] ?? t[i.size ?? "size"] ?? e?.getPageSize() ?? 10
|
|
6
|
+
);
|
|
7
|
+
if (!Number.isSafeInteger(g) || g < 1 || !Number.isSafeInteger(l) || l < 1)
|
|
8
|
+
throw new TypeError("Некорректные параметры страницы таблицы");
|
|
9
|
+
const m = new Set(
|
|
10
|
+
["page", "size", "sort", "sorters", "filter", "per_page"].map(
|
|
11
|
+
(s) => i[s] ?? s
|
|
12
|
+
)
|
|
13
|
+
), d = Object.fromEntries(
|
|
14
|
+
Object.entries(t).filter(([s]) => !m.has(s))
|
|
15
|
+
), u = (e ? n.get(o(e))?.parameters?.() : void 0) ?? a, b = /* @__PURE__ */ new Set([
|
|
16
|
+
"page",
|
|
17
|
+
"size",
|
|
18
|
+
"sort",
|
|
19
|
+
"sorters",
|
|
20
|
+
"filter",
|
|
21
|
+
"per_page"
|
|
22
|
+
]), f = (s) => p(
|
|
23
|
+
Object.fromEntries(
|
|
24
|
+
Object.entries(s).filter(([c]) => !b.has(c))
|
|
25
|
+
)
|
|
26
|
+
);
|
|
27
|
+
return {
|
|
28
|
+
url: r,
|
|
29
|
+
...u ? {
|
|
30
|
+
parameterSources: {
|
|
31
|
+
configured: f(u.configured),
|
|
32
|
+
dynamic: f(u.dynamic),
|
|
33
|
+
explicit: f(u.explicit)
|
|
34
|
+
}
|
|
35
|
+
} : {},
|
|
36
|
+
extraParams: p(d),
|
|
37
|
+
programmaticFilters: p(e?.getFilters?.() ?? []),
|
|
38
|
+
params: p(t),
|
|
39
|
+
page: g,
|
|
40
|
+
size: l,
|
|
41
|
+
sort: (e?.getSorters() ?? []).map(({ field: s, dir: c }) => ({
|
|
42
|
+
column: s,
|
|
43
|
+
dir: c
|
|
44
|
+
})),
|
|
45
|
+
filters: (e?.getHeaderFilters() ?? []).map(({ field: s, value: c }) => ({
|
|
46
|
+
field: s,
|
|
47
|
+
value: p(c)
|
|
48
|
+
}))
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
const n = /* @__PURE__ */ new WeakMap();
|
|
52
|
+
function h(e, r) {
|
|
53
|
+
return n.set(o(e), r), () => {
|
|
54
|
+
n.get(o(e)) === r && n.delete(o(e));
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function P(e) {
|
|
58
|
+
return n.has(o(e));
|
|
59
|
+
}
|
|
60
|
+
function S(e, r, t) {
|
|
61
|
+
n.get(o(e))?.attachProjection(r, t);
|
|
62
|
+
}
|
|
63
|
+
function j(e, r, t = () => !0) {
|
|
64
|
+
const a = n.get(o(e));
|
|
65
|
+
return a ? a.prepare(r, t) : r();
|
|
66
|
+
}
|
|
67
|
+
function x(e, r) {
|
|
68
|
+
const t = n.get(o(e));
|
|
69
|
+
t ? t.configureParameters(r) : Object.assign(e.options, { ajaxParams: r });
|
|
70
|
+
}
|
|
71
|
+
function Q(e, r, t, a = !0) {
|
|
72
|
+
const i = n.get(o(e));
|
|
73
|
+
if (!i)
|
|
74
|
+
throw new TypeError("Движок не поддерживает восстановление выборки");
|
|
75
|
+
i.restoreSelection(r, t, a);
|
|
76
|
+
}
|
|
77
|
+
function z(e, r, t) {
|
|
78
|
+
const a = n.get(o(e));
|
|
79
|
+
if (!a)
|
|
80
|
+
throw new TypeError(
|
|
81
|
+
"Движок не поддерживает восстановление параметров таблицы"
|
|
82
|
+
);
|
|
83
|
+
a.restore(r, t);
|
|
84
|
+
}
|
|
85
|
+
function A(e, r, t) {
|
|
86
|
+
n.get(o(e))?.accept(r, t);
|
|
87
|
+
}
|
|
88
|
+
function E(e, r, t, a) {
|
|
89
|
+
if (r != null && (typeof r != "object" || Array.isArray(r)))
|
|
90
|
+
throw new TypeError("Некорректные параметры запроса таблицы");
|
|
91
|
+
const i = n.get(o(e));
|
|
92
|
+
return i?.withParameters ? i.withParameters(
|
|
93
|
+
r,
|
|
94
|
+
t,
|
|
95
|
+
a
|
|
96
|
+
) : t();
|
|
97
|
+
}
|
|
98
|
+
function O(e) {
|
|
99
|
+
return n.get(o(e))?.parameterSource?.();
|
|
100
|
+
}
|
|
101
|
+
function N(e, r, t, a) {
|
|
102
|
+
const i = n.get(o(e));
|
|
103
|
+
return r && t && i?.withReplay ? i.withReplay(t, r, a) : a();
|
|
104
|
+
}
|
|
105
|
+
export {
|
|
106
|
+
A as acceptTableDataQuery,
|
|
107
|
+
S as attachTableProjection,
|
|
108
|
+
T as captureTableDataQuery,
|
|
109
|
+
x as configureTableParameters,
|
|
110
|
+
O as getTableParameterSource,
|
|
111
|
+
P as hasTableQueryAdapter,
|
|
112
|
+
j as prepareTableProjection,
|
|
113
|
+
h as registerTableQueryAdapter,
|
|
114
|
+
z as restoreAppliedTableQuery,
|
|
115
|
+
Q as restoreAppliedTableSelection,
|
|
116
|
+
E as withTableQueryParameters,
|
|
117
|
+
N as withTableQueryReplay
|
|
118
|
+
};
|