r3ui-lib 1.3.20 → 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.
Files changed (321) hide show
  1. package/dist/login.es.js +14 -3148
  2. package/dist/modules/_virtual/___vite-browser-external.js +6 -0
  3. package/dist/modules/_virtual/__vite-browser-external.js +4 -0
  4. package/dist/modules/_virtual/_commonjsHelpers.js +33 -0
  5. package/dist/modules/_virtual/_plugin-vue_export-helper.js +9 -0
  6. package/dist/modules/_virtual/he.js +5 -0
  7. package/dist/modules/_virtual/he2.js +4 -0
  8. package/dist/modules/_virtual/index.js +7 -0
  9. package/dist/modules/_virtual/inputmask.js +7 -0
  10. package/dist/modules/_virtual/inputmask2.js +4 -0
  11. package/dist/modules/_virtual/ru.js +5 -0
  12. package/dist/modules/_virtual/ru2.js +4 -0
  13. package/dist/modules/assets/img/confirmation.png.js +4 -0
  14. package/dist/modules/assets/img/error.png.js +4 -0
  15. package/dist/modules/assets/img/preloader.gif.js +4 -0
  16. package/dist/modules/assets/img/regagro_logo.svg.js +4 -0
  17. package/dist/modules/assets/img/success.png.js +4 -0
  18. package/dist/modules/assets/img/warning.png.js +4 -0
  19. package/dist/modules/components/DefaultButton.vue.js +112 -0
  20. package/dist/modules/components/Divider.vue.js +33 -0
  21. package/dist/modules/components/Icon.vue.js +18 -0
  22. package/dist/modules/components/Slider.vue.js +7 -0
  23. package/dist/modules/components/Slider.vue2.js +127 -0
  24. package/dist/modules/components/Spinner.vue.js +19 -0
  25. package/dist/modules/components/SsoLoginPending.vue.js +7 -0
  26. package/dist/modules/components/SsoLoginPending.vue2.js +44 -0
  27. package/dist/modules/components/SsoLoginScreen.vue.js +57 -0
  28. package/dist/modules/components/SsoLoginScreen.vue2.js +4 -0
  29. package/dist/modules/components/accordions/DefaultAccordion.vue.js +7 -0
  30. package/dist/modules/components/accordions/DefaultAccordion.vue2.js +72 -0
  31. package/dist/modules/components/accordions/KindCheckboxesAccordion.vue.js +7 -0
  32. package/dist/modules/components/accordions/KindCheckboxesAccordion.vue2.js +152 -0
  33. package/dist/modules/components/buttons/AddButton.vue.js +7 -0
  34. package/dist/modules/components/buttons/AddButton.vue2.js +30 -0
  35. package/dist/modules/components/buttons/ClearFormButton.vue.js +7 -0
  36. package/dist/modules/components/buttons/ClearFormButton.vue2.js +28 -0
  37. package/dist/modules/components/buttons/CollapseButton.vue.js +7 -0
  38. package/dist/modules/components/buttons/CollapseButton.vue2.js +57 -0
  39. package/dist/modules/components/buttons/ExportButton.vue.js +7 -0
  40. package/dist/modules/components/buttons/ExportButton.vue2.js +28 -0
  41. package/dist/modules/components/buttons/PrintButton.vue.js +7 -0
  42. package/dist/modules/components/buttons/PrintButton.vue2.js +27 -0
  43. package/dist/modules/components/buttons/ToggleButtons.vue.js +7 -0
  44. package/dist/modules/components/buttons/ToggleButtons.vue2.js +30 -0
  45. package/dist/modules/components/cards/CardInfo.vue.js +7 -0
  46. package/dist/modules/components/cards/CardInfo.vue2.js +56 -0
  47. package/dist/modules/components/cards/PageCard.vue.js +7 -0
  48. package/dist/modules/components/cards/PageCard.vue2.js +117 -0
  49. package/dist/modules/components/dropdowns/DefaultDropDown.vue.js +102 -0
  50. package/dist/modules/components/export/ExportComponent.vue.js +7 -0
  51. package/dist/modules/components/export/ExportComponent.vue2.js +74 -0
  52. package/dist/modules/components/filters/MultipleQuickFilterComponent.vue.js +7 -0
  53. package/dist/modules/components/filters/MultipleQuickFilterComponent.vue2.js +34 -0
  54. package/dist/modules/components/form/Checkbox.vue.js +66 -0
  55. package/dist/modules/components/form/CustomInput.vue.js +161 -0
  56. package/dist/modules/components/form/FormError.vue.js +24 -0
  57. package/dist/modules/components/form/PasswordInput.vue.js +82 -0
  58. package/dist/modules/components/form/VSelect.vue.js +192 -0
  59. package/dist/modules/components/form/useWithPopper.js +29 -0
  60. package/dist/modules/components/forms/AddressForm.vue.js +7 -0
  61. package/dist/modules/components/forms/AddressForm.vue2.js +382 -0
  62. package/dist/modules/components/forms/AgeFromAgeTo.vue.js +7 -0
  63. package/dist/modules/components/forms/AgeFromAgeTo.vue2.js +207 -0
  64. package/dist/modules/components/forms/BooleanCheckbox.vue.js +7 -0
  65. package/dist/modules/components/forms/BooleanCheckbox.vue2.js +54 -0
  66. package/dist/modules/components/forms/Flatpickr.vue.js +7 -0
  67. package/dist/modules/components/forms/Flatpickr.vue2.js +273 -0
  68. package/dist/modules/components/forms/HeaderSearchForm.vue.js +7 -0
  69. package/dist/modules/components/forms/HeaderSearchForm.vue2.js +142 -0
  70. package/dist/modules/components/forms/MultiCheckbox.vue.js +7 -0
  71. package/dist/modules/components/forms/MultiCheckbox.vue2.js +64 -0
  72. package/dist/modules/components/forms/MultiInput.vue.js +7 -0
  73. package/dist/modules/components/forms/MultiInput.vue2.js +115 -0
  74. package/dist/modules/components/icons/QuestionIcon.vue.js +7 -0
  75. package/dist/modules/components/icons/QuestionIcon.vue2.js +56 -0
  76. package/dist/modules/components/layout/Breadcrumbs.vue.js +7 -0
  77. package/dist/modules/components/layout/Breadcrumbs.vue2.js +40 -0
  78. package/dist/modules/components/layout/Card.vue.js +31 -0
  79. package/dist/modules/components/layout/Footer.vue.js +15 -0
  80. package/dist/modules/components/layout/Footer.vue2.js +4 -0
  81. package/dist/modules/components/layout/Header.vue.js +7 -0
  82. package/dist/modules/components/layout/Header.vue2.js +68 -0
  83. package/dist/modules/components/layout/LanguageSelector.vue.js +32 -0
  84. package/dist/modules/components/layout/LanguageSelector.vue3.js +5 -0
  85. package/dist/modules/components/layout/LoginLayoutFrame.vue.js +48 -0
  86. package/dist/modules/components/layout/LoginLayoutFrame.vue2.js +4 -0
  87. package/dist/modules/components/layout/MainComponent.vue.js +50 -0
  88. package/dist/modules/components/layout/MainComponent.vue2.js +4 -0
  89. package/dist/modules/components/layout/PageTitle.vue.js +7 -0
  90. package/dist/modules/components/layout/PageTitle.vue2.js +40 -0
  91. package/dist/modules/components/logo/Logo.vue.js +7 -0
  92. package/dist/modules/components/logo/Logo.vue2.js +50 -0
  93. package/dist/modules/components/modals/ConfirmationModal.vue.js +7 -0
  94. package/dist/modules/components/modals/ConfirmationModal.vue2.js +154 -0
  95. package/dist/modules/components/modals/DefaultModal.vue.js +116 -0
  96. package/dist/modules/components/modals/DefaultModal.vue3.js +5 -0
  97. package/dist/modules/components/modals/EditTableColumnsModalComponent.vue.js +7 -0
  98. package/dist/modules/components/modals/EditTableColumnsModalComponent.vue2.js +41 -0
  99. package/dist/modules/components/modals/TableFilterModalComponent.vue.js +7 -0
  100. package/dist/modules/components/modals/TableFilterModalComponent.vue2.js +66 -0
  101. package/dist/modules/components/modals/TableFilterModalShell.vue.js +89 -0
  102. package/dist/modules/components/modals/TableFilterModalShell.vue2.js +4 -0
  103. package/dist/modules/components/notifications/ErrorMessageComponent.vue.js +7 -0
  104. package/dist/modules/components/notifications/ErrorMessageComponent.vue2.js +45 -0
  105. package/dist/modules/components/notifications/NotificationMessage.vue.js +55 -0
  106. package/dist/modules/components/notifications/NotificationMessage.vue2.js +4 -0
  107. package/dist/modules/components/notifications/Toast.vue.js +71 -0
  108. package/dist/modules/components/sidebar/CollapsedSidebarLink.vue.js +7 -0
  109. package/dist/modules/components/sidebar/CollapsedSidebarLink.vue2.js +90 -0
  110. package/dist/modules/components/sidebar/Sidebar.vue.js +59 -0
  111. package/dist/modules/components/sidebar/Sidebar.vue3.js +5 -0
  112. package/dist/modules/components/sidebar/SidebarLink.vue.js +7 -0
  113. package/dist/modules/components/sidebar/SidebarLink.vue2.js +93 -0
  114. package/dist/modules/components/tables/ColumnSubFilter.vue.js +7 -0
  115. package/dist/modules/components/tables/ColumnSubFilter.vue2.js +36 -0
  116. package/dist/modules/components/tables/EditTableColumns.vue.js +7 -0
  117. package/dist/modules/components/tables/EditTableColumns.vue2.js +125 -0
  118. package/dist/modules/components/tables/ManagedRemoteTable.vue.js +72 -0
  119. package/dist/modules/components/tables/ManagedRemoteTable.vue2.js +4 -0
  120. package/dist/modules/components/tables/SubFilterToggleBtn.vue.js +28 -0
  121. package/dist/modules/components/tables/Table.vue.js +416 -0
  122. package/dist/modules/components/tables/Table.vue3.js +5 -0
  123. package/dist/modules/components/tables/TableAppliedFiltersStorage.vue.js +7 -0
  124. package/dist/modules/components/tables/TableAppliedFiltersStorage.vue2.js +56 -0
  125. package/dist/modules/components/tables/TableColumnsButton.vue.js +27 -0
  126. package/dist/modules/components/tables/TableColumnsButton.vue2.js +4 -0
  127. package/dist/modules/components/tables/TableColumnsDialog.vue.js +67 -0
  128. package/dist/modules/components/tables/TableColumnsDialog.vue2.js +4 -0
  129. package/dist/modules/components/tables/TableColumnsModal.vue.js +27 -0
  130. package/dist/modules/components/tables/TableColumnsModal.vue2.js +4 -0
  131. package/dist/modules/components/tables/TableCount.vue.js +7 -0
  132. package/dist/modules/components/tables/TableCount.vue2.js +26 -0
  133. package/dist/modules/components/tables/TableQuickFilterComponent.vue.js +7 -0
  134. package/dist/modules/components/tables/TableQuickFilterComponent.vue2.js +29 -0
  135. package/dist/modules/components/tables/ToggleAllTableRowButtons.vue.js +7 -0
  136. package/dist/modules/components/tables/ToggleAllTableRowButtons.vue2.js +41 -0
  137. package/dist/modules/components/utilities/FilterValuesPanel.vue.js +7 -0
  138. package/dist/modules/components/utilities/FilterValuesPanel.vue2.js +95 -0
  139. package/dist/modules/composables/forms/useAddressForm.js +289 -0
  140. package/dist/modules/composables/forms/useFieldError.js +23 -0
  141. package/dist/modules/composables/forms/useSearchForm.js +52 -0
  142. package/dist/modules/composables/forms/useUnsavedChanges.js +84 -0
  143. package/dist/modules/composables/layout/useR3uiLayoutInject.js +32 -0
  144. package/dist/modules/composables/main/useBreadcrumbs.js +75 -0
  145. package/dist/modules/composables/main/useMain.js +38 -0
  146. package/dist/modules/composables/main/usePermissionChecker.js +15 -0
  147. package/dist/modules/composables/modals/useModalLayer.js +109 -0
  148. package/dist/modules/composables/sidebar/useSidebar.js +40 -0
  149. package/dist/modules/composables/table/createTableCommandScheduler.js +62 -0
  150. package/dist/modules/composables/table/createTableLifecycle.js +719 -0
  151. package/dist/modules/composables/table/createTableRebuildTransaction.js +61 -0
  152. package/dist/modules/composables/table/createTableSession.js +38 -0
  153. package/dist/modules/composables/table/createTableState.js +122 -0
  154. package/dist/modules/composables/table/createTabulatorAdapter.js +90 -0
  155. package/dist/modules/composables/table/tableQueryTransitions.js +82 -0
  156. package/dist/modules/composables/table/useManagedRemoteTable.js +179 -0
  157. package/dist/modules/composables/table/useR3uiTableDefaultInject.js +27 -0
  158. package/dist/modules/composables/table/useRemoteTable.js +96 -0
  159. package/dist/modules/composables/table/useTableColumnApply.js +38 -0
  160. package/dist/modules/composables/table/useTableColumns.js +70 -0
  161. package/dist/modules/composables/table/useTableColumnsEnhanced.js +155 -0
  162. package/dist/modules/composables/table/useTableColumnsIntegration.js +82 -0
  163. package/dist/modules/composables/table/useTableDefault.js +258 -0
  164. package/dist/modules/composables/table/useTableStorage.js +32 -0
  165. package/dist/modules/constants/authSidebar.js +36 -0
  166. package/dist/modules/services/AddressService.js +21 -0
  167. package/dist/modules/types/layoutInjectKeys.js +10 -0
  168. package/dist/modules/types/tableInjectKeys.js +21 -0
  169. package/dist/modules/types/tableInstance.js +32 -0
  170. package/dist/modules/utils/accordionLocalization.js +14 -0
  171. package/dist/modules/utils/addressFormTranslations.js +29 -0
  172. package/dist/modules/utils/auth/authUser.js +13 -0
  173. package/dist/modules/utils/auth/exchangePasswordToken.js +52 -0
  174. package/dist/modules/utils/auth/handlePkceCallback.js +88 -0
  175. package/dist/modules/utils/auth/logout.js +32 -0
  176. package/dist/modules/utils/auth/runLogoutHandler.js +60 -0
  177. package/dist/modules/utils/auth/sessionController.js +28 -0
  178. package/dist/modules/utils/auth/signInWithSSO.js +141 -0
  179. package/dist/modules/utils/authCookie.js +21 -0
  180. package/dist/modules/utils/constants.js +34 -0
  181. package/dist/modules/utils/createTabulatorLangsFromT.js +30 -0
  182. package/dist/modules/utils/createTabulatorTableProps.js +19 -0
  183. package/dist/modules/utils/helpers.js +537 -0
  184. package/dist/modules/utils/pkce.js +50 -0
  185. package/dist/modules/utils/table-columns-utils.js +59 -0
  186. package/dist/modules/utils/tableAdapter.js +156 -0
  187. package/dist/modules/utils/tableAjaxRequest.js +82 -0
  188. package/dist/modules/utils/tableCancellation.js +271 -0
  189. package/dist/modules/utils/tableColumnStorage.js +55 -0
  190. package/dist/modules/utils/tableData.js +118 -0
  191. package/dist/modules/utils/tableLoad.js +67 -0
  192. package/dist/modules/utils/tableLocalizations.js +6 -0
  193. package/dist/modules/utils/tableOperation.js +63 -0
  194. package/dist/modules/utils/tableProjection.js +137 -0
  195. package/dist/modules/utils/tableQueryParameters.js +46 -0
  196. package/dist/modules/utils/tableSnapshotValue.js +73 -0
  197. package/dist/modules/utils/tabulatorQueryAdapter.js +203 -0
  198. package/dist/modules/utils/tabulatorRuntime.js +131 -0
  199. package/dist/modules/utils/upstreamHttpStatus.js +32 -0
  200. package/dist/modules/vendor/@popperjs/core/lib/createPopper.js +122 -0
  201. package/dist/modules/vendor/@popperjs/core/lib/dom-utils/contains.js +18 -0
  202. package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getBoundingClientRect.js +23 -0
  203. package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getClippingRect.js +37 -0
  204. package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getCompositeRect.js +32 -0
  205. package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getComputedStyle.js +7 -0
  206. package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getDocumentElement.js +10 -0
  207. package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getDocumentRect.js +17 -0
  208. package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js +9 -0
  209. package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getLayoutRect.js +13 -0
  210. package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getNodeName.js +6 -0
  211. package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getNodeScroll.js +10 -0
  212. package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getOffsetParent.js +35 -0
  213. package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getParentNode.js +18 -0
  214. package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getScrollParent.js +10 -0
  215. package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getViewportRect.js +21 -0
  216. package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getWindow.js +12 -0
  217. package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getWindowScroll.js +11 -0
  218. package/dist/modules/vendor/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js +9 -0
  219. package/dist/modules/vendor/@popperjs/core/lib/dom-utils/instanceOf.js +20 -0
  220. package/dist/modules/vendor/@popperjs/core/lib/dom-utils/isLayoutViewport.js +7 -0
  221. package/dist/modules/vendor/@popperjs/core/lib/dom-utils/isScrollParent.js +8 -0
  222. package/dist/modules/vendor/@popperjs/core/lib/dom-utils/isTableElement.js +7 -0
  223. package/dist/modules/vendor/@popperjs/core/lib/dom-utils/listScrollParents.js +16 -0
  224. package/dist/modules/vendor/@popperjs/core/lib/enums.js +31 -0
  225. package/dist/modules/vendor/@popperjs/core/lib/modifiers/applyStyles.js +47 -0
  226. package/dist/modules/vendor/@popperjs/core/lib/modifiers/arrow.js +37 -0
  227. package/dist/modules/vendor/@popperjs/core/lib/modifiers/computeStyles.js +99 -0
  228. package/dist/modules/vendor/@popperjs/core/lib/modifiers/eventListeners.js +26 -0
  229. package/dist/modules/vendor/@popperjs/core/lib/modifiers/flip.js +74 -0
  230. package/dist/modules/vendor/@popperjs/core/lib/modifiers/hide.js +44 -0
  231. package/dist/modules/vendor/@popperjs/core/lib/modifiers/offset.js +31 -0
  232. package/dist/modules/vendor/@popperjs/core/lib/modifiers/popperOffsets.js +19 -0
  233. package/dist/modules/vendor/@popperjs/core/lib/modifiers/preventOverflow.js +54 -0
  234. package/dist/modules/vendor/@popperjs/core/lib/popper.js +27 -0
  235. package/dist/modules/vendor/@popperjs/core/lib/utils/computeAutoPlacement.js +27 -0
  236. package/dist/modules/vendor/@popperjs/core/lib/utils/computeOffsets.js +54 -0
  237. package/dist/modules/vendor/@popperjs/core/lib/utils/debounce.js +13 -0
  238. package/dist/modules/vendor/@popperjs/core/lib/utils/detectOverflow.js +33 -0
  239. package/dist/modules/vendor/@popperjs/core/lib/utils/expandToHashMap.js +8 -0
  240. package/dist/modules/vendor/@popperjs/core/lib/utils/getAltAxis.js +6 -0
  241. package/dist/modules/vendor/@popperjs/core/lib/utils/getBasePlacement.js +6 -0
  242. package/dist/modules/vendor/@popperjs/core/lib/utils/getFreshSideObject.js +11 -0
  243. package/dist/modules/vendor/@popperjs/core/lib/utils/getMainAxisFromPlacement.js +6 -0
  244. package/dist/modules/vendor/@popperjs/core/lib/utils/getOppositePlacement.js +14 -0
  245. package/dist/modules/vendor/@popperjs/core/lib/utils/getOppositeVariationPlacement.js +12 -0
  246. package/dist/modules/vendor/@popperjs/core/lib/utils/getVariation.js +6 -0
  247. package/dist/modules/vendor/@popperjs/core/lib/utils/math.js +6 -0
  248. package/dist/modules/vendor/@popperjs/core/lib/utils/mergeByName.js +15 -0
  249. package/dist/modules/vendor/@popperjs/core/lib/utils/mergePaddingObject.js +7 -0
  250. package/dist/modules/vendor/@popperjs/core/lib/utils/orderModifiers.js +31 -0
  251. package/dist/modules/vendor/@popperjs/core/lib/utils/rectToClientRect.js +11 -0
  252. package/dist/modules/vendor/@popperjs/core/lib/utils/userAgent.js +9 -0
  253. package/dist/modules/vendor/@popperjs/core/lib/utils/within.js +12 -0
  254. package/dist/modules/vendor/call-bind-apply-helpers/actualApply.js +14 -0
  255. package/dist/modules/vendor/call-bind-apply-helpers/functionApply.js +7 -0
  256. package/dist/modules/vendor/call-bind-apply-helpers/functionCall.js +7 -0
  257. package/dist/modules/vendor/call-bind-apply-helpers/index.js +18 -0
  258. package/dist/modules/vendor/call-bind-apply-helpers/reflectApply.js +7 -0
  259. package/dist/modules/vendor/call-bound/index.js +21 -0
  260. package/dist/modules/vendor/dompurify/dist/purify.es.js +1522 -0
  261. package/dist/modules/vendor/dunder-proto/get.js +29 -0
  262. package/dist/modules/vendor/es-define-property/index.js +16 -0
  263. package/dist/modules/vendor/es-errors/eval.js +7 -0
  264. package/dist/modules/vendor/es-errors/index.js +7 -0
  265. package/dist/modules/vendor/es-errors/range.js +7 -0
  266. package/dist/modules/vendor/es-errors/ref.js +7 -0
  267. package/dist/modules/vendor/es-errors/syntax.js +7 -0
  268. package/dist/modules/vendor/es-errors/type.js +7 -0
  269. package/dist/modules/vendor/es-errors/uri.js +7 -0
  270. package/dist/modules/vendor/es-object-atoms/index.js +7 -0
  271. package/dist/modules/vendor/flatpickr/dist/esm/index.js +942 -0
  272. package/dist/modules/vendor/flatpickr/dist/esm/l10n/default.js +75 -0
  273. package/dist/modules/vendor/flatpickr/dist/esm/types/options.js +80 -0
  274. package/dist/modules/vendor/flatpickr/dist/esm/utils/dates.js +89 -0
  275. package/dist/modules/vendor/flatpickr/dist/esm/utils/dom.js +45 -0
  276. package/dist/modules/vendor/flatpickr/dist/esm/utils/formatting.js +170 -0
  277. package/dist/modules/vendor/flatpickr/dist/esm/utils/index.js +23 -0
  278. package/dist/modules/vendor/flatpickr/dist/esm/utils/polyfills.js +15 -0
  279. package/dist/modules/vendor/flatpickr/dist/l10n/he.js +56 -0
  280. package/dist/modules/vendor/flatpickr/dist/l10n/ru.js +73 -0
  281. package/dist/modules/vendor/function-bind/implementation.js +48 -0
  282. package/dist/modules/vendor/function-bind/index.js +11 -0
  283. package/dist/modules/vendor/get-intrinsic/index.js +265 -0
  284. package/dist/modules/vendor/get-proto/Object.getPrototypeOf.js +11 -0
  285. package/dist/modules/vendor/get-proto/Reflect.getPrototypeOf.js +7 -0
  286. package/dist/modules/vendor/get-proto/index.js +21 -0
  287. package/dist/modules/vendor/gopd/gOPD.js +7 -0
  288. package/dist/modules/vendor/gopd/index.js +17 -0
  289. package/dist/modules/vendor/has-symbols/index.js +13 -0
  290. package/dist/modules/vendor/has-symbols/shams.js +33 -0
  291. package/dist/modules/vendor/hasown/index.js +11 -0
  292. package/dist/modules/vendor/inputmask/dist/inputmask.js +3517 -0
  293. package/dist/modules/vendor/math-intrinsics/abs.js +7 -0
  294. package/dist/modules/vendor/math-intrinsics/floor.js +7 -0
  295. package/dist/modules/vendor/math-intrinsics/isNaN.js +9 -0
  296. package/dist/modules/vendor/math-intrinsics/max.js +7 -0
  297. package/dist/modules/vendor/math-intrinsics/min.js +7 -0
  298. package/dist/modules/vendor/math-intrinsics/pow.js +7 -0
  299. package/dist/modules/vendor/math-intrinsics/round.js +7 -0
  300. package/dist/modules/vendor/math-intrinsics/sign.js +13 -0
  301. package/dist/modules/vendor/moment/dist/moment.js +2589 -0
  302. package/dist/modules/vendor/nouislider/dist/nouislider.js +1064 -0
  303. package/dist/modules/vendor/object-inspect/index.js +376 -0
  304. package/dist/modules/vendor/qs/lib/formats.js +25 -0
  305. package/dist/modules/vendor/qs/lib/index.js +17 -0
  306. package/dist/modules/vendor/qs/lib/parse.js +161 -0
  307. package/dist/modules/vendor/qs/lib/stringify.js +197 -0
  308. package/dist/modules/vendor/qs/lib/utils.js +129 -0
  309. package/dist/modules/vendor/seamless-scroll-polyfill/lib/common.js +21 -0
  310. package/dist/modules/vendor/seamless-scroll-polyfill/lib/scroll-end-event.js +12 -0
  311. package/dist/modules/vendor/seamless-scroll-polyfill/lib/scroll-step.js +21 -0
  312. package/dist/modules/vendor/seamless-scroll-polyfill/lib/scroll.js +58 -0
  313. package/dist/modules/vendor/seamless-scroll-polyfill/lib/scrollIntoView.js +168 -0
  314. package/dist/modules/vendor/side-channel/index.js +35 -0
  315. package/dist/modules/vendor/side-channel-list/index.js +64 -0
  316. package/dist/modules/vendor/side-channel-map/index.js +40 -0
  317. package/dist/modules/vendor/side-channel-weakmap/index.js +43 -0
  318. package/dist/modules/vendor/tabulator-tables/dist/js/tabulator_esm.js +11127 -0
  319. package/dist/modules/vendor/vue-select/dist/vue-select.es.js +769 -0
  320. package/dist/r3ui-lib.es.js +334 -35120
  321. package/package.json +7 -3
@@ -0,0 +1,719 @@
1
+ import { createTableProjection as ot } from "../../utils/tableProjection.js";
2
+ import { cloneTableValue as Ie } from "../../utils/tableSnapshotValue.js";
3
+ import { createTableParameterSource as ct } from "../../utils/tableQueryParameters.js";
4
+ import { captureTableDataQuery as Qe } from "../../utils/tableData.js";
5
+ import { createTableState as dt } from "./createTableState.js";
6
+ import { createTableRebuildTransaction as ft } from "./createTableRebuildTransaction.js";
7
+ import { createTableSessionOwner as vt } from "./createTableSession.js";
8
+ import { createTableCommandScheduler as pt } from "./createTableCommandScheduler.js";
9
+ import { computed as D, readonly as re, nextTick as Ve, watch as gt, toRaw as O } from "vue";
10
+ import { assertR3uiTableInstance as mt } from "../../types/tableInstance.js";
11
+ import { createSnapshotOwner as bt, mergeColumnLayout as We, applyColumnVisibility as yt, normalizeTableColumnLayout as Ct } from "../../utils/tableAdapter.js";
12
+ import { waitForTableOperation as ae, tableOperationStopped as U, createTableOperation as ht } from "../../utils/tableOperation.js";
13
+ function Me(s, a, {
14
+ deferUntilRequest: ne = !1,
15
+ owner: Q
16
+ } = {}) {
17
+ let X = a(), n = 0, w = !ne;
18
+ const J = () => w && a() > X + n;
19
+ return {
20
+ signal: Q?.signal,
21
+ owner: Q,
22
+ isSupersededByRequest: J,
23
+ isCurrent: () => (Q?.isCurrent() ?? !0) && s() && !J(),
24
+ beforeRequest() {
25
+ X = a(), n = 1, w = !0;
26
+ }
27
+ };
28
+ }
29
+ async function wt(s, a) {
30
+ return (await ae(() => s, {
31
+ signal: a,
32
+ isCurrent: () => !a.aborted
33
+ })).status === "applied" ? "ready" : "superseded";
34
+ }
35
+ function Lt(s) {
36
+ const { remote: a } = s, ne = a.tableOptions.value.ajaxParams, Q = ot(ne), X = Ie(
37
+ a.tableOptions.value.initialFilter ?? []
38
+ ), n = dt(
39
+ s.initialContext
40
+ ), w = D(() => n.value.status), J = D(() => n.value.active), P = D(() => w.value === "disposed"), ie = D(
41
+ () => w.value === "disposed" ? "disposed" : w.value === "building" || w.value === "awaiting-instance" ? "building" : w.value === "restoring" ? "restoring" : "idle"
42
+ ), me = D(() => w.value === "preparing"), Se = D(() => w.value === "columns"), L = D(() => ie.value === "building"), v = D({
43
+ get: () => n.value.snapshot,
44
+ set: n.setSnapshot
45
+ }), K = D({
46
+ get: () => n.value.startedGeneration,
47
+ set: n.markStarted
48
+ }), V = D({
49
+ get: () => n.value.desired.intent,
50
+ set: n.setIntent
51
+ }), se = D({
52
+ get: () => n.value.requestedContext,
53
+ set: n.setRequestedContext
54
+ });
55
+ let c = 0, y = 0, _ = 0, Y = 0, be = !1, ye = new AbortController();
56
+ const W = pt(), z = vt(
57
+ () => g() && O(a.table.value) === z.current?.instance,
58
+ Q
59
+ );
60
+ a.table.value && z.attach(a.table.value);
61
+ let le, j, m, E, B, Z, q, H, T;
62
+ const Ce = Symbol("superseded table response"), $ = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), Oe = /* @__PURE__ */ new WeakMap(), ue = /* @__PURE__ */ new WeakSet(), Ae = /* @__PURE__ */ new WeakSet(), oe = bt(
63
+ () => v.value,
64
+ () => {
65
+ v.value = void 0;
66
+ }
67
+ ), Ge = a.tableDefault.applyFiltersOperation ?? a.tableDefault.applyFilters;
68
+ function ce(e, t) {
69
+ e && e.command.finish(t);
70
+ }
71
+ const g = () => J.value && !P.value;
72
+ function de() {
73
+ ye.abort("superseded"), ye = new AbortController();
74
+ }
75
+ function k(e = !1, t = "cancelled") {
76
+ e ? j?.release() : j?.cancel(t), z.detach(t), W.invalidate(t), T?.abort(t), T?.dispose(), T = void 0, de(), H = void 0, q = void 0, n.stop(
77
+ e,
78
+ e && ie.value === "building" ? "awaiting-instance" : "idle"
79
+ );
80
+ }
81
+ function R(e) {
82
+ return z.matches(e) ? z.current : (z.current && k(!0, "superseded"), z.attach(e));
83
+ }
84
+ function ee() {
85
+ c++, j?.cancel("superseded"), W.invalidate(), T?.abort("superseded"), T?.dispose(), H = void 0, de();
86
+ }
87
+ function Je(e, t, r, l, u) {
88
+ if (!g() || e !== c || t && (t.generation !== c || t.revision !== y || !t.isCurrent()))
89
+ return;
90
+ const i = u ? Qe(a.table.value, u.url, u.params) : void 0;
91
+ i && Q.requested(i), T?.abort("superseded"), T?.dispose();
92
+ const f = ++_, o = t ? t.context : n.queryContext(
93
+ v.value,
94
+ L.value || ie.value === "restoring"
95
+ );
96
+ i || (se.value = o), oe.cancelSuperseded();
97
+ const p = t?.revision ?? y, d = a.table.value ? R(a.table.value) : z.current, A = t ? void 0 : W.schedule({
98
+ kind: "request",
99
+ generation: e,
100
+ revision: p,
101
+ context: o,
102
+ signal: r ?? void 0,
103
+ signals: d ? [d.signal] : [],
104
+ isCurrent: () => g() && e === c && p === y && f === _ && (d?.isCurrent() ?? !0)
105
+ });
106
+ A?.start(), T = ht({
107
+ kind: "request",
108
+ generation: e,
109
+ revision: p,
110
+ context: o,
111
+ parent: t ?? A?.operation,
112
+ signal: r,
113
+ signals: [d?.signal],
114
+ isCurrent: () => g() && e === c && p === y && f === _ && (d?.isCurrent() ?? !0)
115
+ });
116
+ const b = T.operation, S = n.value.failure;
117
+ return A && Oe.set(b, {
118
+ owner: n.begin("loading"),
119
+ command: A,
120
+ snapshot: v.value,
121
+ failure: S
122
+ }), i && (he.set(b, i), n.requestData({ query: i, context: o })), l && (ue.add(b), l.subscribe((h) => fe(b, h))), b;
123
+ }
124
+ function fe(e, t) {
125
+ if (Ae.has(e)) return;
126
+ Ae.add(e);
127
+ const r = Oe.get(e);
128
+ let l = t;
129
+ const u = (i) => {
130
+ const f = a.table.value;
131
+ if (!e.isCurrent()) return;
132
+ const o = he.get(e), p = f ? {
133
+ ...we(f, !1, !1),
134
+ ...o ? {
135
+ page: o.page,
136
+ size: o.size,
137
+ filters: o.filters.map((d) => ({ ...d })),
138
+ sort: o.sort.map((d) => ({ ...d }))
139
+ } : {},
140
+ url: o?.url ?? R(f).engine.url(s.getAjaxUrl),
141
+ context: e.context,
142
+ query: o
143
+ } : v.value;
144
+ !r && p && n.setSnapshot(p), r && n.fail(
145
+ r.owner,
146
+ f ? "restore" : "filters",
147
+ i,
148
+ p
149
+ );
150
+ };
151
+ try {
152
+ if (t.status === "applied" && e.isCurrent()) {
153
+ const i = he.get(e), f = De.get(e);
154
+ if (i && f) {
155
+ const o = { query: i, context: e.context, ...f };
156
+ if (n.acceptData(o), !e.isCurrent() || (a.table.value && R(a.table.value).engine.acceptQuery(o, e), !e.isCurrent())) return;
157
+ s.onDataApplied?.(o);
158
+ }
159
+ if (!e.isCurrent() || (e.context !== void 0 && s.onContextApplied?.(e.context), !e.isCurrent())) return;
160
+ r ? n.applied(r.owner, r.snapshot, e.context) : n.setAppliedContext(e.context);
161
+ } else if (t.status === "failed" && e.isCurrent()) {
162
+ if (u(t.error), !e.isCurrent()) return;
163
+ const { restore: i } = n.transition({
164
+ type: "settled",
165
+ outcome: "failed"
166
+ });
167
+ e.isCurrent() && i && a.table.value && R(a.table.value).engine.canRestoreQuery && R(a.table.value).engine.restoreSelection(
168
+ i,
169
+ e
170
+ );
171
+ } else {
172
+ if (t.status === "cancelled" && e.isCurrent()) {
173
+ const { restore: i } = n.transition({
174
+ type: "settled",
175
+ outcome: "cancelled"
176
+ });
177
+ e.isCurrent() && i && a.table.value && R(a.table.value).engine.canRestoreQuery && R(a.table.value).engine.restoreSelection(
178
+ i,
179
+ e
180
+ );
181
+ }
182
+ r && n.cancelled(r.owner, r.snapshot, r.failure);
183
+ }
184
+ } catch (i) {
185
+ throw l = { status: "failed", error: i }, u(i), i;
186
+ } finally {
187
+ r && (e.isCurrent() ? l.status === "failed" ? r.command.fail(l.error) : r.command.finish({ status: l.status }) : r.command.finish(U(e)));
188
+ }
189
+ }
190
+ function Ke(e) {
191
+ ue.has(e) || fe(e, { status: "cancelled" });
192
+ }
193
+ function Pe(e, t) {
194
+ ue.has(e) || fe(e, { status: "failed", error: t });
195
+ }
196
+ function _e(e, t) {
197
+ return t.isCurrent() ? (e && typeof e == "object" && $.set(e, t), e) : Ce;
198
+ }
199
+ function Be(e) {
200
+ return g() && e !== Ce && !(e && typeof e == "object" && $.get(e)?.isCurrent() === !1);
201
+ }
202
+ function Te(e, t = !1, r) {
203
+ const l = e && typeof e == "object" ? $.get(e) : void 0;
204
+ l && r && De.set(l, r), l && !ue.has(l) && fe(l, { status: t ? "cancelled" : "applied" });
205
+ }
206
+ function He(e) {
207
+ Te(e);
208
+ }
209
+ const Fe = () => s.createRequest(c);
210
+ function we(e, t, r, l = "columns") {
211
+ const u = R(e).engine.capture({
212
+ resetContext: t,
213
+ resetPage: r,
214
+ includeSelection: s.includeSelection !== !1
215
+ }), { selection: i } = n.transition({
216
+ type: "preserve",
217
+ reason: l
218
+ }), f = e.options.dataSendParams ?? {}, o = !t && !r && i ? Qe(
219
+ e,
220
+ R(e).engine.url(s.getAjaxUrl),
221
+ {
222
+ ...i.query.params,
223
+ [f.page ?? "page"]: u.page,
224
+ [f.size ?? "size"]: u.size,
225
+ per_page: u.size
226
+ },
227
+ i.query.parameterSources
228
+ ) : void 0;
229
+ if (o && Q.requested(o), s.includeSelection === !1) {
230
+ const { selected: p, ...d } = u;
231
+ return { ...d, ...o ? { query: o } : {} };
232
+ }
233
+ return { ...u, ...o ? { query: o } : {} };
234
+ }
235
+ function je(e) {
236
+ j?.cancel("superseded");
237
+ const t = c, r = y, l = ft({
238
+ source: e,
239
+ generation: t,
240
+ revision: r,
241
+ isCurrent: () => j === l && g() && t === c && r === y
242
+ });
243
+ return j = l, l;
244
+ }
245
+ async function I() {
246
+ if (!g()) return;
247
+ const e = a.table.value;
248
+ if (!e || !a.isInitDone.value) return;
249
+ const t = R(e), r = je(t), l = n.begin("building");
250
+ K.value = -1;
251
+ const u = n.rebuildPolicy(), i = u.mode === "context", f = u.mode === "apply", o = m ?? E ?? B;
252
+ let p = !1;
253
+ try {
254
+ if ((i || f) && ((await r.wait(() => Ve())).status !== "applied" || (await r.wait(
255
+ () => a.tableDefault.fetchData(r.operation)
256
+ )).status !== "applied") || !r.operation.isCurrent()) return;
257
+ i && n.desire(
258
+ "context",
259
+ s.getAjaxUrl(),
260
+ s.captureContext?.()
261
+ );
262
+ const d = v.value ?? {
263
+ ...we(
264
+ e,
265
+ u.resetContext,
266
+ u.resetPage,
267
+ "locale"
268
+ ),
269
+ url: f && o?.url ? o.url : i ? n.value.desired.url ?? s.getAjaxUrl() : t.engine.url(s.getAjaxUrl),
270
+ context: f && o ? o.context : i ? n.value.desired.context ?? s.captureContext?.() : se.value
271
+ }, A = i ? a.tableOptions.value.columns : s.getColumns();
272
+ Q.configure(a.tableOptions.value.ajaxParams);
273
+ const b = {
274
+ ...a.tableOptions.value,
275
+ columns: We(A, d.layout),
276
+ ajaxURL: d.url ?? s.getAjaxUrl(),
277
+ paginationInitialPage: d.page,
278
+ paginationSize: d.size,
279
+ ajaxParams: ct(
280
+ i ? Q.configurationSource() : t.engine.parameterSource(
281
+ a.tableOptions.value.ajaxParams
282
+ ),
283
+ d.size,
284
+ d.query?.parameterSources?.explicit ?? (d.query?.parameterSources ? {} : d.query?.extraParams) ?? {}
285
+ ),
286
+ initialFilter: Ie(
287
+ d.query?.programmaticFilters ?? (u.programmatic === "initial" ? X : e.getFilters?.() ?? X)
288
+ ),
289
+ initialHeaderFilter: d.filters,
290
+ initialSort: d.sort,
291
+ ajaxRequestFunc: Fe()
292
+ };
293
+ if (!r.transfer(d)) return;
294
+ p = !0, v.value = r.snapshot, Y = c, m = void 0, V.value = void 0, a.tableOptions.value = b, k(!0, "superseded"), a.table.value = null, be = !0;
295
+ try {
296
+ a.tableKey.value++;
297
+ } finally {
298
+ be = !1;
299
+ }
300
+ } catch (d) {
301
+ if (!r.operation.isCurrent()) return;
302
+ throw r.fail(), n.fail(l, "rebuild", d), s.presentError(d), d;
303
+ } finally {
304
+ if (!p && j === r && (n.finish(l, !1), g() && t.isCurrent() && (r.generation !== c || r.revision !== y)))
305
+ return I();
306
+ }
307
+ }
308
+ function Ne() {
309
+ if (!P.value && ((m || E || B) && (V.value ??= "apply"), ee(), s.resetErrors?.(), g() && !L.value && !me.value))
310
+ return I();
311
+ }
312
+ function Xe() {
313
+ P.value || be || (ee(), y++, v.value = void 0, m = void 0, V.value = void 0, K.value = -1, k(!1, "superseded"), a.table.value = null, n.stop(!0, "awaiting-instance"), Y = c, a.tableOptions.value.ajaxRequestFunc = Fe());
314
+ }
315
+ function Ye() {
316
+ if (!P.value && (ee(), y++, v.value = void 0, m = void 0, n.desire("context", s.getAjaxUrl(), s.captureContext?.()), !L.value))
317
+ return I();
318
+ }
319
+ function xe() {
320
+ return Z || (Z = (async () => {
321
+ for (; m && g() && !L.value && a.isInitDone.value; ) {
322
+ const e = m;
323
+ m = void 0;
324
+ const t = () => g() && e.generation === c && e.revision === y && O(e.instance) === O(a.table.value) && (e.external?.isCurrent() ?? !0) && !e.external?.signal.aborted;
325
+ if (!t()) {
326
+ ce(e, { status: "superseded" });
327
+ continue;
328
+ }
329
+ B = e;
330
+ const r = e.command.operation, l = n.begin("loading");
331
+ let u = !1;
332
+ try {
333
+ if (e.session = R(e.instance), !e.command.start()) continue;
334
+ if (await wt(
335
+ le,
336
+ r.signal
337
+ ) === "superseded" || !t()) {
338
+ ce(e, U(r));
339
+ continue;
340
+ }
341
+ E = e;
342
+ const f = await ae(
343
+ () => Ge(e.instance, {
344
+ signal: r.signal,
345
+ isCurrent: r.isCurrent,
346
+ owner: r,
347
+ closeDialog: e.closeDialog
348
+ }),
349
+ r
350
+ ), o = f.status === "applied" ? f.value : f;
351
+ (!o || o.status === "applied") && r.isCurrent() && (se.value = e.context, u = !0, n.setAppliedContext(e.context)), ce(
352
+ e,
353
+ o ?? (r.isCurrent() ? { status: "applied" } : U(r))
354
+ );
355
+ } catch (i) {
356
+ t() && (e.command.fail(i), n.fail(l, "filters", i), s.presentError(i)), ce(e, U(r));
357
+ } finally {
358
+ n.finish(l, u && r.isCurrent()), B === e && (B = void 0), E === e && (E = void 0);
359
+ }
360
+ }
361
+ })().finally(() => {
362
+ if (Z = void 0, m && g() && !L.value && a.isInitDone.value)
363
+ return xe();
364
+ }), Z);
365
+ }
366
+ function Ue(e, t) {
367
+ const r = qe(e, t);
368
+ return r && J.value && e && a.table.value && !L.value && a.isInitDone.value ? r.command.result.then(() => {
369
+ }) : Promise.resolve();
370
+ }
371
+ function Ze(e, t) {
372
+ return P.value ? Promise.resolve({ status: "cancelled" }) : t && (!t.isCurrent() || t.signal.aborted) ? Promise.resolve(U(t)) : qe(e, void 0, t).command.result;
373
+ }
374
+ function Le(e) {
375
+ const t = { ...e }, r = e.instance && a.table.value && O(e.instance) === O(a.table.value) ? R(a.table.value) : void 0;
376
+ t.session = r;
377
+ const l = W.schedule({
378
+ kind: "filters",
379
+ generation: e.generation,
380
+ revision: e.revision,
381
+ context: e.context,
382
+ external: e.external,
383
+ signals: r ? [r.signal] : [],
384
+ isCurrent: () => g() && e.generation === c && e.revision === y && (t.session?.isCurrent() ?? !0)
385
+ });
386
+ return t.command = l, t;
387
+ }
388
+ function qe(e, t, r, l) {
389
+ if (P.value) return;
390
+ const u = t ?? s.getAjaxUrl(), i = l ? l.value : s.captureContext?.();
391
+ n.desire("apply", u, i);
392
+ const f = ++y;
393
+ j?.cancel("superseded"), de(), T?.abort("superseded"), H = void 0, v.value = void 0, m = Le({
394
+ external: r,
395
+ instance: e,
396
+ generation: c,
397
+ revision: f,
398
+ url: u,
399
+ context: i,
400
+ closeDialog: a.tableDefault.captureFilterDialogClose?.()
401
+ });
402
+ const o = m;
403
+ return !J.value || !e || !a.table.value || L.value || !a.isInitDone.value ? (V.value ??= "apply", o) : (V.value = void 0, xe(), o);
404
+ }
405
+ async function $e(e) {
406
+ if (!s.refreshLabels) return;
407
+ const t = s.refreshLabels(e.isCurrent);
408
+ le = t;
409
+ try {
410
+ await ae(() => t, e);
411
+ } finally {
412
+ le === t && (le = void 0);
413
+ }
414
+ }
415
+ async function ve() {
416
+ if (!g()) return;
417
+ const e = s.initializationFailure?.();
418
+ if (e) {
419
+ s.presentError(e.error);
420
+ return;
421
+ }
422
+ const t = a.table.value;
423
+ if (!(!t || !a.isInitDone.value || L.value)) {
424
+ if ((s.initialLoad !== "replace" || v.value || K.value !== -1) && Y !== c)
425
+ return I();
426
+ if (s.initialLoad === "replace") return Re(t);
427
+ if (!(v.value || K.value === c)) {
428
+ if (K.value = c, m) {
429
+ if (m.command.phase === "settled" && m.generation === c) {
430
+ m = void 0, V.value = void 0;
431
+ return;
432
+ }
433
+ return m.command.phase === "settled" ? m = Le({
434
+ ...m,
435
+ instance: t,
436
+ generation: c,
437
+ external: void 0
438
+ }) : m.instance = t, V.value = void 0, xe();
439
+ }
440
+ if (s.applyOnReady !== !1) return Ue(t);
441
+ }
442
+ }
443
+ }
444
+ function Re(e) {
445
+ if (q && q.generation === c && q.revision === y && O(q.instance) === O(e))
446
+ return q.promise;
447
+ if (!g() || K.value === c)
448
+ return Promise.resolve();
449
+ K.value = c;
450
+ const t = {
451
+ instance: e,
452
+ generation: c,
453
+ revision: y,
454
+ promise: Promise.resolve()
455
+ };
456
+ return q = t, t.promise = ke(e, t).finally(() => {
457
+ q === t && (q = void 0);
458
+ }), t.promise;
459
+ }
460
+ async function ke(e, t) {
461
+ const r = R(e), l = r.engine, u = v.value, i = n.value.failure?.kind === "columns", f = c, o = y;
462
+ let p = j;
463
+ if ((!p || p.generation !== f || p.revision !== o || !p.operation.isCurrent() || p.snapshot !== u) && (p = je(r), u && p.transfer(u)), !p.restore(r)) return;
464
+ const d = p;
465
+ let A;
466
+ const b = () => q === t && g() && f === c && o === y && r.isCurrent() && d.operation.isCurrent(), S = W.schedule({
467
+ kind: "restore",
468
+ generation: f,
469
+ revision: o,
470
+ context: u?.context ?? se.value,
471
+ signal: ye.signal,
472
+ signals: [r.signal, d.operation.signal],
473
+ isCurrent: b
474
+ });
475
+ S.start();
476
+ const h = Me(
477
+ b,
478
+ () => _,
479
+ {
480
+ deferUntilRequest: s.initialLoad === "replace",
481
+ owner: S.operation
482
+ }
483
+ ), pe = u ? oe.track(u, b, h) : void 0, { isCurrent: M } = h, F = n.begin(u ? "restoring" : "preparing");
484
+ try {
485
+ if (u) {
486
+ if ((s.initialLoad !== "replace" || s.refreshLabels) && (await ae(
487
+ () => $e(S.operation),
488
+ S.operation
489
+ )).status !== "applied" || !M()) return;
490
+ const C = u.url ?? s.getAjaxUrl();
491
+ l.setUrl(C, h);
492
+ const G = n.value.appliedData;
493
+ if (u.query && G && l.canRestoreQuery ? l.restoreQuery({ ...G, query: u.query }, h) : i && l.restoreView(u, h), await l.restore(u, C, h) !== "restored" || !M()) return;
494
+ l.select(u.selected, h), v.value === u && (v.value = void 0), A = { status: "applied" };
495
+ } else {
496
+ try {
497
+ if ((await ae(
498
+ () => a.tableDefault.fetchData(S.operation),
499
+ S.operation
500
+ )).status !== "applied")
501
+ return g() && f !== c && O(e) === O(a.table.value) ? I() : void 0;
502
+ } finally {
503
+ n.move(F, "loading");
504
+ }
505
+ if (!g() || O(e) !== O(a.table.value))
506
+ return;
507
+ if (l.setColumns(a.tableOptions.value.columns, h), Y !== c) return I();
508
+ const C = s.getAjaxUrl();
509
+ l.setUrl(C, h), h.beforeRequest();
510
+ const G = await l.load(
511
+ C,
512
+ a.tableOptions.value.paginationSize,
513
+ h
514
+ );
515
+ if (M() && G.status === "failed") throw G.error;
516
+ G.status !== "failed" && (A = G);
517
+ }
518
+ } catch (C) {
519
+ if (!M())
520
+ return !P.value && f !== c && O(e) === O(a.table.value) && s.initialLoad === "replace" ? I() : void 0;
521
+ throw S.fail(C), d.fail(), n.fail(F, "restore", C), s.presentError(C), C;
522
+ } finally {
523
+ S.finish(
524
+ h.isCurrent() ? { status: "applied" } : U(S.operation)
525
+ ), pe?.(), b() && v.value === u && !M() && (v.value = void 0), n.finish(F, A?.status === "applied"), q === t && j === d && d.finish(
526
+ A ?? U(S.operation)
527
+ );
528
+ }
529
+ }
530
+ async function et(e) {
531
+ if (P.value) return;
532
+ if (e === null) {
533
+ (z.current || T) && (k(), m = void 0), a.table.value = null;
534
+ return;
535
+ }
536
+ if (mt(e), q && q.generation === c && q.revision === y && O(q.instance) === O(e))
537
+ return q.promise;
538
+ const t = !z.matches(e);
539
+ if (R(e), a.table.value = e, t) {
540
+ K.value = -1;
541
+ const r = n.value.appliedData, l = R(e);
542
+ r && l.engine.canRestoreQuery && g() && l.engine.restoreSelection(
543
+ r,
544
+ {
545
+ isCurrent: () => g() && l.isCurrent()
546
+ },
547
+ !1
548
+ );
549
+ }
550
+ if (w.value === "awaiting-instance" && n.begin(v.value ? "restoring" : "loading"), !!g())
551
+ return s.initialLoad === "replace" ? ve() : Y !== c ? I() : v.value ? Re(e) : ve();
552
+ }
553
+ const ze = D(
554
+ () => g() && !!a.table.value && a.isInitDone.value && !L.value && !me.value && !v.value && !Se.value
555
+ );
556
+ async function tt(e, t, r) {
557
+ if (t?.signal.aborted || t?.isCurrent() === !1)
558
+ return U(t);
559
+ if (!ze.value)
560
+ throw new Error("Таблица ещё не готова к применению колонок");
561
+ if (!s.columns) throw new Error("Не настроено применение колонок");
562
+ const l = a.table.value, u = R(l), i = u.engine, f = c, o = we(l, !1, !1), p = We(
563
+ a.tableOptions.value.columns,
564
+ o.layout
565
+ ), d = new Set(
566
+ p.filter((x) => !s.columns?.titledOnly || x.title).map((x) => x.field)
567
+ ), A = yt(
568
+ p,
569
+ e.filter((x) => d.has(x.field))
570
+ ), b = {
571
+ ...o,
572
+ layout: Ct(
573
+ A.map(({ field: x, width: N, visible: ge }) => ({
574
+ field: x,
575
+ width: typeof N == "number" ? N : void 0,
576
+ visible: ge
577
+ }))
578
+ ),
579
+ url: i.url(s.getAjaxUrl),
580
+ context: n.queryContext()
581
+ };
582
+ s.columns.commit(A);
583
+ const S = ++y;
584
+ j?.cancel("superseded"), de(), T?.abort("superseded"), m = void 0, V.value = void 0, _++, v.value = b;
585
+ const h = {};
586
+ H = h;
587
+ const pe = n.begin("columns"), M = () => H === h && g() && c === f && y === S && u.isCurrent() && !t?.signal.aborted && (t?.isCurrent() ?? !0), F = W.schedule({
588
+ kind: "columns",
589
+ generation: f,
590
+ revision: S,
591
+ context: b.context,
592
+ signal: t?.signal,
593
+ signals: [u.signal],
594
+ isCurrent: M
595
+ });
596
+ F.start();
597
+ const C = Me(
598
+ M,
599
+ () => _,
600
+ { deferUntilRequest: !0, owner: F.operation }
601
+ ), G = oe.track(b, M, C);
602
+ try {
603
+ if (r?.(), s.columns.changed(), await Ve(), !C.isCurrent())
604
+ return U(F.operation);
605
+ const x = n.value.appliedData;
606
+ b.query && x && i.canRestoreQuery ? i.restoreQuery({ ...x, query: b.query }, C) : i.restoreView(b, C);
607
+ const N = await i.restore(b, b.url, C);
608
+ N === "restored" && C.isCurrent() && (i.select(b.selected, C), v.value === b && (v.value = void 0));
609
+ const ge = {
610
+ status: N === "restored" ? "applied" : N
611
+ };
612
+ return F.finish(ge), ge;
613
+ } catch (x) {
614
+ if (!C.isCurrent())
615
+ return U(F.operation);
616
+ throw n.fail(pe, "columns", x), F.fail(x), s.presentError(x), x;
617
+ } finally {
618
+ F.finish(
619
+ C.isCurrent() ? { status: "applied" } : U(F.operation)
620
+ ), G(), n.finish(pe, !v.value), H === h && (H = void 0, w.value !== "failed" && v.value === b && !C.isCurrent() && (v.value = void 0));
621
+ }
622
+ }
623
+ const rt = D(() => n.value.requestedData), at = D(() => n.value.appliedData), nt = D(() => n.value.failure), Ee = D(
624
+ () => w.value === "failed" && g() && !!a.table.value && a.isInitDone.value
625
+ );
626
+ let te;
627
+ function it() {
628
+ if (te) return te;
629
+ if (!Ee.value) return Promise.resolve({ status: "superseded" });
630
+ const e = n.value.failure;
631
+ s.resetErrors?.();
632
+ const t = a.table.value, r = e.kind === "rebuild" ? I() : e.kind === "filters" && !n.value.snapshot?.query ? qe(t, n.value.desired.url, void 0, {
633
+ value: n.value.desired.context
634
+ }).command.result : Re(t), l = c, u = y;
635
+ return te = (async () => (await r, new Promise((i, f) => {
636
+ let o = () => {
637
+ };
638
+ const p = () => {
639
+ !g() || l !== c || u !== y ? (o(), i({ status: P.value ? "cancelled" : "superseded" })) : w.value === "failed" ? (o(), f(n.value.failure.cause)) : (w.value === "ready" || w.value === "idle") && (o(), i({
640
+ status: w.value === "ready" ? "applied" : "superseded"
641
+ }));
642
+ };
643
+ o = gt(n.state, p, { flush: "sync" }), p();
644
+ })))().finally(() => {
645
+ te = void 0;
646
+ }), te;
647
+ }
648
+ function st() {
649
+ P.value || (n.setActive(!1), W.pause(), ee(), s.resetErrors?.(), (m || E || B) && (V.value ??= "apply", m ??= E ?? B));
650
+ }
651
+ function lt() {
652
+ return P.value || J.value ? Promise.resolve() : (n.setActive(!0), W.resume(), ve());
653
+ }
654
+ function ut() {
655
+ P.value || (n.dispose(), W.dispose(), k(), ee(), m = void 0, v.value = void 0, a.table.value = null, s.resetErrors?.());
656
+ }
657
+ return {
658
+ status: w,
659
+ error: nt,
660
+ canRetry: Ee,
661
+ retry: it,
662
+ canApplyColumns: ze,
663
+ columnsApplying: re(Se),
664
+ applyColumns: tt,
665
+ active: re(J),
666
+ disposed: re(P),
667
+ phase: re(ie),
668
+ preparing: re(me),
669
+ rebuilding: L,
670
+ pending: v,
671
+ superseded: Ce,
672
+ get generation() {
673
+ return c;
674
+ },
675
+ get revision() {
676
+ return y;
677
+ },
678
+ get requestSequence() {
679
+ return _;
680
+ },
681
+ get acceptedUrl() {
682
+ return E?.generation === c && E.revision === y ? E.url : void 0;
683
+ },
684
+ requestedData: rt,
685
+ appliedData: at,
686
+ beginRequest: Je,
687
+ requestFailed: Pe,
688
+ requestStopped: Ke,
689
+ acceptResponse: _e,
690
+ isResponseCurrent: Be,
691
+ responseApplied: He,
692
+ responseTransformed: Te,
693
+ responseFailed(e, t) {
694
+ const r = e && typeof e == "object" ? $.get(e) : void 0;
695
+ r && Pe(r, t);
696
+ },
697
+ isTrackedResponse: (e) => !!e && typeof e == "object" && $.has(e),
698
+ rebuild: I,
699
+ localeChanged: Ne,
700
+ quickFilterChanged: Ye,
701
+ tableKeyChanged: Xe,
702
+ startReady: ve,
703
+ tableReady: et,
704
+ apply: Ue,
705
+ executeFilters: Ze,
706
+ deactivate: st,
707
+ activate: lt,
708
+ dispose: ut,
709
+ trackRestore: oe.track,
710
+ invalidateRequests() {
711
+ _++;
712
+ }
713
+ };
714
+ }
715
+ export {
716
+ Lt as createTableLifecycle,
717
+ Me as createTableRestoreOperation,
718
+ wt as waitForTablePreparation
719
+ };