@ozdao/martyrs 0.2.564 → 0.2.566

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 (366) hide show
  1. package/dist/abac-BPl9Bmf9.js +1527 -0
  2. package/dist/builder.js +51 -39
  3. package/dist/{common.schema-GFSlNJo7.js → common.schema-DswiUXKB.js} +1 -1
  4. package/dist/community.server.js +48 -9
  5. package/dist/core.server.js +6 -4
  6. package/dist/{crud-C7FSTUes.js → crud-q1ye5IhV.js} +7 -7
  7. package/dist/events.server.js +3 -3
  8. package/dist/gallery.server.js +2 -2
  9. package/dist/inventory.server.js +4 -6
  10. package/dist/{main-CmjWiDVF.js → main-B9o1iBAZ.js} +1279 -1287
  11. package/dist/marketplace.server.js +1 -1
  12. package/dist/martyrs/dist/main-B9o1iBAZ.js +943 -0
  13. package/dist/martyrs/dist/main-B9o1iBAZ.js.map +1 -0
  14. package/dist/martyrs/dist/web-BF3ijvEr.js +55 -0
  15. package/dist/martyrs/dist/web-BF3ijvEr.js.map +1 -0
  16. package/dist/martyrs/src/components/BottomSheet/BottomSheet.vue.js +96 -0
  17. package/dist/martyrs/src/components/BottomSheet/BottomSheet.vue.js.map +1 -0
  18. package/dist/martyrs/src/components/Button/{Button.vue.js → Button.vue2.js} +36 -45
  19. package/dist/martyrs/src/components/Button/Button.vue2.js.map +1 -0
  20. package/dist/martyrs/src/components/Feed/Carousel.vue.js +1 -1
  21. package/dist/martyrs/src/components/Feed/Feed.vue.js +1 -1
  22. package/dist/martyrs/src/components/Field/{Field.vue2.js → Field.vue.js} +2 -2
  23. package/dist/martyrs/src/components/Field/Field.vue.js.map +1 -0
  24. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +2 -2
  25. package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.js +1 -1
  26. package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.js.map +1 -1
  27. package/dist/martyrs/src/components/Loader/{Loader.vue2.js → Loader.vue.js} +3 -4
  28. package/dist/martyrs/src/components/Loader/Loader.vue.js.map +1 -0
  29. package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue.js +1 -1
  30. package/dist/martyrs/src/components/Media/Media.vue.js +1 -1
  31. package/dist/martyrs/src/components/Menu/{Menu.vue.js → Menu.vue2.js} +2 -2
  32. package/dist/martyrs/src/components/Menu/Menu.vue2.js.map +1 -0
  33. package/dist/martyrs/src/components/Select/{Select.vue2.js → Select.vue.js} +2 -2
  34. package/dist/martyrs/src/components/Select/Select.vue.js.map +1 -0
  35. package/dist/martyrs/src/components/SelectMulti/{SelectMulti.vue.js → SelectMulti.vue2.js} +2 -2
  36. package/dist/martyrs/src/components/SelectMulti/SelectMulti.vue2.js.map +1 -0
  37. package/dist/martyrs/src/components/Tree/Tree.vue.js +6 -3
  38. package/dist/martyrs/src/components/Tree/Tree.vue.js.map +1 -1
  39. package/dist/martyrs/src/components/UploadImage/UploadImage.vue.js +1 -1
  40. package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
  41. package/dist/martyrs/src/modules/auth/auth.client.js +10 -7
  42. package/dist/martyrs/src/modules/auth/auth.client.js.map +1 -1
  43. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
  44. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +2 -2
  45. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +2 -2
  46. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +3 -3
  47. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +1 -1
  48. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +1 -1
  49. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +2 -2
  50. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +2 -2
  51. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +13 -13
  52. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js.map +1 -1
  53. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +2 -2
  54. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +2 -2
  55. package/dist/martyrs/src/modules/auth/views/router/auth.router.js +116 -0
  56. package/dist/martyrs/src/modules/auth/views/router/auth.router.js.map +1 -0
  57. package/dist/martyrs/src/modules/auth/views/router/users.router.js +180 -0
  58. package/dist/martyrs/src/modules/auth/views/router/users.router.js.map +1 -0
  59. package/dist/martyrs/src/modules/backoffice/components/partials/Sidebar.vue.js +4 -4
  60. package/dist/martyrs/src/modules/backoffice/components/partials/Sidebar.vue.js.map +1 -1
  61. package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js +1 -1
  62. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +2 -2
  63. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  64. package/dist/martyrs/src/modules/constructor/components/elements/Card.vue.js +1 -1
  65. package/dist/martyrs/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  66. package/dist/martyrs/src/modules/core/locales/en.js +45 -0
  67. package/dist/martyrs/src/modules/core/locales/en.js.map +1 -1
  68. package/dist/martyrs/src/modules/core/locales/ru.js +45 -0
  69. package/dist/martyrs/src/modules/core/locales/ru.js.map +1 -1
  70. package/dist/martyrs/src/modules/core/views/classes/i18n.manager.js +9 -0
  71. package/dist/martyrs/src/modules/core/views/classes/i18n.manager.js.map +1 -1
  72. package/dist/martyrs/src/modules/core/views/components/blocks/BlockSearch.vue.js +1 -1
  73. package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js +1 -1
  74. package/dist/martyrs/src/modules/core/views/components/blocks/PopupAuth.vue.js +1 -1
  75. package/dist/martyrs/src/modules/core/views/components/blocks/PopupDateSelector.vue.js +2 -2
  76. package/dist/martyrs/src/modules/core/views/components/layouts/App.vue.js +1 -1
  77. package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js +3 -2
  78. package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js.map +1 -1
  79. package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js +2 -2
  80. package/dist/martyrs/src/modules/core/views/components/partials/NavigationBar.vue.js +1 -1
  81. package/dist/martyrs/src/modules/core/views/components/sections/Walkthrough.vue.js +1 -1
  82. package/dist/martyrs/src/modules/core/views/components/sections/filters/FilterRange.vue.js +1 -1
  83. package/dist/martyrs/src/modules/core/views/mixins/mixins.js +1 -2
  84. package/dist/martyrs/src/modules/core/views/mixins/mixins.js.map +1 -1
  85. package/dist/martyrs/src/modules/core/views/router/addRoutes.js +6 -1
  86. package/dist/martyrs/src/modules/core/views/router/addRoutes.js.map +1 -1
  87. package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.js +2 -2
  88. package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  89. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +4 -4
  90. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
  91. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +2 -2
  92. package/dist/martyrs/src/modules/events/components/sections/EditTickets.vue.js +2 -2
  93. package/dist/martyrs/src/modules/events/components/sections/Feed.vue.js +1 -1
  94. package/dist/martyrs/src/modules/events/components/sections/List.vue.js +1 -1
  95. package/dist/martyrs/src/modules/events/events.client.js +15 -12
  96. package/dist/martyrs/src/modules/events/events.client.js.map +1 -1
  97. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +4 -4
  98. package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +3 -3
  99. package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.js +1 -1
  100. package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.js +1 -1
  101. package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +3 -3
  102. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +5 -5
  103. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js.map +1 -1
  104. package/dist/martyrs/src/modules/marketplace/views/components/pages/Marketplace.vue.js +1 -1
  105. package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.js +1 -1
  106. package/dist/martyrs/src/modules/music/components/blocks/ActionButtons.vue.js +95 -0
  107. package/dist/martyrs/src/modules/music/components/blocks/ActionButtons.vue.js.map +1 -0
  108. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +6 -3
  109. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js.map +1 -1
  110. package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js +25 -25
  111. package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js.map +1 -1
  112. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +1 -1
  113. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +1 -1
  114. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +3 -3
  115. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +4 -4
  116. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +2 -2
  117. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +1 -1
  118. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +3 -3
  119. package/dist/martyrs/src/modules/music/components/layouts/MusicBottomPlayer.vue.js +31 -6
  120. package/dist/martyrs/src/modules/music/components/layouts/MusicBottomPlayer.vue.js.map +1 -1
  121. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +121 -206
  122. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js.map +1 -1
  123. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +2 -2
  124. package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.js +9 -13
  125. package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.js.map +1 -1
  126. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +1 -1
  127. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +167 -246
  128. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js.map +1 -1
  129. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +2 -2
  130. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +136 -221
  131. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js.map +1 -1
  132. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +1 -1
  133. package/dist/martyrs/src/modules/music/components/player/FullscreenPlayer.vue.js +171 -0
  134. package/dist/martyrs/src/modules/music/components/player/FullscreenPlayer.vue.js.map +1 -0
  135. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +32 -154
  136. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js.map +1 -1
  137. package/dist/martyrs/src/modules/music/components/player/PlayerControls.vue.js +96 -0
  138. package/dist/martyrs/src/modules/music/components/player/PlayerControls.vue.js.map +1 -0
  139. package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.js +55 -27
  140. package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.js.map +1 -1
  141. package/dist/martyrs/src/modules/music/components/player/tonar.png.js +5 -0
  142. package/dist/martyrs/src/modules/music/components/player/tonar.png.js.map +1 -0
  143. package/dist/martyrs/src/modules/music/store/albums.js +8 -2
  144. package/dist/martyrs/src/modules/music/store/albums.js.map +1 -1
  145. package/dist/martyrs/src/modules/music/store/player.js +83 -65
  146. package/dist/martyrs/src/modules/music/store/player.js.map +1 -1
  147. package/dist/martyrs/src/modules/music/store/tracks.js +4 -13
  148. package/dist/martyrs/src/modules/music/store/tracks.js.map +1 -1
  149. package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.js +4 -4
  150. package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.js.map +1 -1
  151. package/dist/martyrs/src/modules/notifications/notifications.client.js +2 -2
  152. package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.js +3 -0
  153. package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.js.map +1 -1
  154. package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +3 -3
  155. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +3 -3
  156. package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +2 -2
  157. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +2 -2
  158. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
  159. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
  160. package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js +1 -1
  161. package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js +1 -1
  162. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +2 -2
  163. package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  164. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  165. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js.map +1 -1
  166. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  167. package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.js +1 -1
  168. package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js +2 -2
  169. package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js +2 -2
  170. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  171. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +2 -2
  172. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +5 -5
  173. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js.map +1 -1
  174. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +3 -3
  175. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
  176. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  177. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +2 -2
  178. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +2 -2
  179. package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
  180. package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.js +1 -1
  181. package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.js.map +1 -1
  182. package/dist/martyrs/src/modules/products/components/blocks/CardProduct.vue.js +15 -2
  183. package/dist/martyrs/src/modules/products/components/blocks/CardProduct.vue.js.map +1 -1
  184. package/dist/martyrs/src/modules/products/components/elements/Image360.vue.js +1 -1
  185. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +10 -7
  186. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js.map +1 -1
  187. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +7 -6
  188. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js.map +1 -1
  189. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +11 -2
  190. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js.map +1 -1
  191. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +4 -4
  192. package/dist/martyrs/src/modules/products/components/pages/ProductRecommmendation.vue.js +1 -1
  193. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +1 -1
  194. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +2 -2
  195. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +3 -3
  196. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +3 -3
  197. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
  198. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +1 -1
  199. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +11 -8
  200. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js.map +1 -1
  201. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +1 -1
  202. package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +211 -61
  203. package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js.map +1 -1
  204. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  205. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js +2 -2
  206. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  207. package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +4 -4
  208. package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js.map +1 -1
  209. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +3 -3
  210. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +3 -3
  211. package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
  212. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +2 -2
  213. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
  214. package/dist/martyrs.css +1 -1
  215. package/dist/martyrs.es.js +1 -1
  216. package/dist/music.server.js +44 -18
  217. package/dist/node_modules/.pnpm/{@capacitor-mlkit_barcode-scanning@7.1.0_@capacitor_core@7.0.1 → @capacitor-mlkit_barcode-scanning@7.3.0_@capacitor_core@7.4.4}/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.js +1 -0
  218. package/dist/node_modules/.pnpm/@capacitor-mlkit_barcode-scanning@7.3.0_@capacitor_core@7.4.4/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.js.map +1 -0
  219. package/dist/node_modules/.pnpm/{@capacitor-mlkit_barcode-scanning@7.1.0_@capacitor_core@7.0.1 → @capacitor-mlkit_barcode-scanning@7.3.0_@capacitor_core@7.4.4}/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.js +1 -1
  220. package/dist/node_modules/.pnpm/{@capacitor-mlkit_barcode-scanning@7.1.0_@capacitor_core@7.0.1 → @capacitor-mlkit_barcode-scanning@7.3.0_@capacitor_core@7.4.4}/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.js.map +1 -1
  221. package/dist/node_modules/.pnpm/{@capacitor-mlkit_barcode-scanning@7.1.0_@capacitor_core@7.0.1 → @capacitor-mlkit_barcode-scanning@7.3.0_@capacitor_core@7.4.4}/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.js +16 -1
  222. package/dist/node_modules/.pnpm/@capacitor-mlkit_barcode-scanning@7.3.0_@capacitor_core@7.4.4/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.js.map +1 -0
  223. package/dist/node_modules/.pnpm/{@capacitor_core@7.0.1 → @capacitor_core@7.4.4}/node_modules/@capacitor/core/dist/index.js +2 -1
  224. package/dist/node_modules/.pnpm/@capacitor_core@7.4.4/node_modules/@capacitor/core/dist/index.js.map +1 -0
  225. package/dist/node_modules/.pnpm/{@capacitor_device@7.0.0_@capacitor_core@7.0.1 → @capacitor_device@7.0.1_@capacitor_core@7.4.4}/node_modules/@capacitor/device/dist/esm/index.js +1 -1
  226. package/dist/node_modules/.pnpm/{@capacitor_device@7.0.0_@capacitor_core@7.0.1 → @capacitor_device@7.0.1_@capacitor_core@7.4.4}/node_modules/@capacitor/device/dist/esm/index.js.map +1 -1
  227. package/dist/node_modules/.pnpm/{@capacitor_device@7.0.0_@capacitor_core@7.0.1 → @capacitor_device@7.0.1_@capacitor_core@7.4.4}/node_modules/@capacitor/device/dist/esm/web.js +1 -1
  228. package/dist/node_modules/.pnpm/{@capacitor_device@7.0.0_@capacitor_core@7.0.1 → @capacitor_device@7.0.1_@capacitor_core@7.4.4}/node_modules/@capacitor/device/dist/esm/web.js.map +1 -1
  229. package/dist/node_modules/.pnpm/{@capacitor_keyboard@7.0.0_@capacitor_core@7.0.1 → @capacitor_keyboard@7.0.1_@capacitor_core@7.4.4}/node_modules/@capacitor/keyboard/dist/esm/definitions.js.map +1 -1
  230. package/dist/node_modules/.pnpm/{@capacitor_keyboard@7.0.0_@capacitor_core@7.0.1 → @capacitor_keyboard@7.0.1_@capacitor_core@7.4.4}/node_modules/@capacitor/keyboard/dist/esm/index.js +1 -1
  231. package/dist/node_modules/.pnpm/{@capacitor_keyboard@7.0.0_@capacitor_core@7.0.1 → @capacitor_keyboard@7.0.1_@capacitor_core@7.4.4}/node_modules/@capacitor/keyboard/dist/esm/index.js.map +1 -1
  232. package/dist/node_modules/.pnpm/{@capacitor_push-notifications@7.0.0_@capacitor_core@7.0.1 → @capacitor_push-notifications@7.0.3_@capacitor_core@7.4.4}/node_modules/@capacitor/push-notifications/dist/esm/index.js +1 -1
  233. package/dist/node_modules/.pnpm/{@capacitor_push-notifications@7.0.0_@capacitor_core@7.0.1 → @capacitor_push-notifications@7.0.3_@capacitor_core@7.4.4}/node_modules/@capacitor/push-notifications/dist/esm/index.js.map +1 -1
  234. package/dist/node_modules/.pnpm/{capacitor-plugin-app-tracking-transparency@2.0.5_@capacitor_core@7.0.1 → capacitor-plugin-app-tracking-transparency@2.0.5_@capacitor_core@7.4.4}/node_modules/capacitor-plugin-app-tracking-transparency/dist/esm/index.js +1 -1
  235. package/dist/node_modules/.pnpm/{capacitor-plugin-app-tracking-transparency@2.0.5_@capacitor_core@7.0.1 → capacitor-plugin-app-tracking-transparency@2.0.5_@capacitor_core@7.4.4}/node_modules/capacitor-plugin-app-tracking-transparency/dist/esm/index.js.map +1 -1
  236. package/dist/node_modules/.pnpm/{capacitor-plugin-app-tracking-transparency@2.0.5_@capacitor_core@7.0.1 → capacitor-plugin-app-tracking-transparency@2.0.5_@capacitor_core@7.4.4}/node_modules/capacitor-plugin-app-tracking-transparency/dist/esm/web.js +1 -1
  237. package/dist/node_modules/.pnpm/{capacitor-plugin-app-tracking-transparency@2.0.5_@capacitor_core@7.0.1 → capacitor-plugin-app-tracking-transparency@2.0.5_@capacitor_core@7.4.4}/node_modules/capacitor-plugin-app-tracking-transparency/dist/esm/web.js.map +1 -1
  238. package/dist/notifications.server.js +0 -3
  239. package/dist/orders.server.js +5 -6
  240. package/dist/organizations.server.js +9 -10
  241. package/dist/products.server.js +27 -26
  242. package/dist/{queryProcessor-CBQgZycY.js → queryProcessor-C_5Iipam.js} +4 -1
  243. package/dist/rents.server.js +2 -3
  244. package/dist/spots.server.js +1 -1
  245. package/dist/style.css +252 -161
  246. package/dist/{web-cNKIl_cL.js → web-BF3ijvEr.js} +1 -1
  247. package/package.json +1 -1
  248. package/src/builder/modes/ssr.rspack.dev.js +4 -3
  249. package/src/builder/rspack/rspack.config.api.js +15 -4
  250. package/src/builder/rspack/rspack.config.base.js +3 -3
  251. package/src/builder/rspack/rspack.config.ssr.client.js +28 -28
  252. package/src/builder/templates/page.js +2 -2
  253. package/src/components/BottomSheet/BottomSheet.vue +4 -4
  254. package/src/components/Button/Button.vue +50 -37
  255. package/src/components/FieldPhone/FieldPhone.vue +1 -1
  256. package/src/components/Loader/Loader.vue +1 -1
  257. package/src/components/Tree/Tree.vue +6 -3
  258. package/src/modules/LAYOUT.MD +767 -0
  259. package/src/modules/PROCESS.md +0 -0
  260. package/src/modules/TASKS.MD +17 -0
  261. package/src/modules/auth/auth.client.js +11 -7
  262. package/src/modules/auth/views/components/pages/SignIn.vue +1 -1
  263. package/src/modules/auth/views/router/auth.router.js +94 -0
  264. package/src/modules/auth/views/router/users.router.js +153 -0
  265. package/src/modules/backoffice/components/partials/Sidebar.vue +7 -7
  266. package/src/modules/community/community.server.js +8 -0
  267. package/src/modules/community/policies/blog.policies.js +55 -0
  268. package/src/modules/community/routes/blog.routes.js +1 -1
  269. package/src/modules/community/routes/comments.routes.js +1 -1
  270. package/src/modules/community/routes/reactions.routes.js +1 -4
  271. package/src/modules/core/controllers/classes/abac/abac.adapter.express.js +206 -124
  272. package/src/modules/core/controllers/classes/abac/abac.adapter.ws.js +203 -50
  273. package/src/modules/core/controllers/classes/abac/abac.core.js +127 -36
  274. package/src/modules/core/controllers/classes/abac/abac.fields.js +144 -179
  275. package/src/modules/core/controllers/classes/abac/abac.js +201 -10
  276. package/src/modules/core/controllers/classes/abac/abac.policies.js +147 -57
  277. package/src/modules/core/controllers/classes/crud/crud.policies.js +5 -5
  278. package/src/modules/core/controllers/policies/core.policies.js +5 -2
  279. package/src/modules/core/controllers/utils/queryProcessor.js +4 -1
  280. package/src/modules/core/core.server.js +1 -0
  281. package/src/modules/core/locales/en.js +45 -0
  282. package/src/modules/core/locales/ru.js +45 -0
  283. package/src/modules/core/models/schemas/common.schema.js +1 -1
  284. package/src/modules/core/views/classes/i18n.manager.js +13 -0
  285. package/src/modules/core/views/components/layouts/Client.vue +1 -1
  286. package/src/modules/core/views/components/sections/filters/FilterPrice.vue +81 -0
  287. package/src/modules/core/views/mixins/mixins.js +1 -2
  288. package/src/modules/core/views/router/addRoutes.js +6 -1
  289. package/src/modules/events/events.client.js +3 -0
  290. package/src/modules/events/routes/events.routes.js +1 -1
  291. package/src/modules/inventory/components/pages/InventoryEdit.vue +3 -3
  292. package/src/modules/inventory/policies/inventory.policies.js +1 -1
  293. package/src/modules/inventory/routes/inventory.routes.js +1 -1
  294. package/src/modules/marketplace/marketplace.router.js +66 -0
  295. package/src/modules/marketplace/views/components/layouts/Marketplace.vue +363 -0
  296. package/src/modules/marketplace/views/components/pages/Catalog.vue +73 -0
  297. package/src/modules/music/components/blocks/ActionButtons.vue +74 -0
  298. package/src/modules/music/components/cards/AlbumCard.vue +1 -1
  299. package/src/modules/music/components/cards/ArtistCardSmall.vue +8 -6
  300. package/src/modules/music/components/layouts/MusicBottomPlayer.vue +94 -4
  301. package/src/modules/music/components/pages/Album.vue +55 -67
  302. package/src/modules/music/components/pages/MusicHome.vue +4 -6
  303. package/src/modules/music/components/pages/Playlist.vue +61 -70
  304. package/src/modules/music/components/pages/Track.vue +54 -71
  305. package/src/modules/music/components/player/FullscreenPlayer.vue +248 -0
  306. package/src/modules/music/components/player/MusicPlayer.vue +21 -216
  307. package/src/modules/music/components/player/PlayerControls.vue +112 -0
  308. package/src/modules/music/components/player/Visualizer.vue +151 -0
  309. package/src/modules/music/components/player/VolumeControl.vue +75 -23
  310. package/src/modules/music/components/player/tonar.png +0 -0
  311. package/src/modules/music/controllers/stream.controller.js +1 -1
  312. package/src/modules/music/music.server.js +1 -1
  313. package/src/modules/music/policies/music.policies.js +3 -2
  314. package/src/modules/music/router/library.router.js +26 -0
  315. package/src/modules/music/router/music.router.js +176 -0
  316. package/src/modules/music/routes/albums.routes.js +13 -12
  317. package/src/modules/music/routes/tracks.routes.js +39 -0
  318. package/src/modules/music/store/albums.js +10 -2
  319. package/src/modules/music/store/player.js +101 -89
  320. package/src/modules/music/store/tracks.js +5 -21
  321. package/src/modules/notifications/components/elements/NotificationBadge.vue +5 -6
  322. package/src/modules/notifications/notifications.server.js +1 -3
  323. package/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue +5 -0
  324. package/src/modules/orders/orders.server.js +0 -1
  325. package/src/modules/organizations/components/blocks/CardOrganization.vue +2 -2
  326. package/src/modules/organizations/components/pages/DepartmentEdit.vue +2 -2
  327. package/src/modules/organizations/components/pages/OrganizationEdit.vue +2 -2
  328. package/src/modules/organizations/policies/organizations.policies.js +12 -6
  329. package/src/modules/organizations/routes/organizations.routes.js +1 -3
  330. package/src/modules/products/components/blocks/CardCategory.vue +1 -1
  331. package/src/modules/products/components/blocks/CardProduct.vue +16 -2
  332. package/src/modules/products/components/pages/Categories.vue +9 -6
  333. package/src/modules/products/components/pages/CategoryEdit.vue +8 -4
  334. package/src/modules/products/components/pages/Product.vue +11 -5
  335. package/src/modules/products/components/sections/SectionProduct.vue +11 -7
  336. package/src/modules/products/controllers/categories.controller.js +32 -27
  337. package/src/modules/products/routes/categories.routes.js +1 -1
  338. package/src/modules/rents/controllers/routes/rents.routes.js +1 -1
  339. package/src/modules/rents/views/components/pages/RentsEdit.vue +208 -49
  340. package/src/modules/spots/components/pages/Map.vue +2 -2
  341. package/src/styles/config.scss +6 -6
  342. package/dist/abac-DYoheWuc.js +0 -1031
  343. package/dist/core.abac-DUPBnlk6.js +0 -298
  344. package/dist/core.logger-C3q8A9dl.js +0 -51
  345. package/dist/martyrs/src/components/Button/Button.vue.js.map +0 -1
  346. package/dist/martyrs/src/components/Field/Field.vue2.js.map +0 -1
  347. package/dist/martyrs/src/components/Loader/Loader.vue2.js.map +0 -1
  348. package/dist/martyrs/src/components/Menu/Menu.vue.js.map +0 -1
  349. package/dist/martyrs/src/components/Select/Select.vue2.js.map +0 -1
  350. package/dist/martyrs/src/components/SelectMulti/SelectMulti.vue.js.map +0 -1
  351. package/dist/martyrs/src/modules/auth/auth.router.js +0 -342
  352. package/dist/martyrs/src/modules/auth/auth.router.js.map +0 -1
  353. package/dist/node_modules/.pnpm/@capacitor-mlkit_barcode-scanning@7.1.0_@capacitor_core@7.0.1/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.js.map +0 -1
  354. package/dist/node_modules/.pnpm/@capacitor-mlkit_barcode-scanning@7.1.0_@capacitor_core@7.0.1/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.js.map +0 -1
  355. package/dist/node_modules/.pnpm/@capacitor_core@7.0.1/node_modules/@capacitor/core/dist/index.js.map +0 -1
  356. package/src/modules/auth/auth.router.js +0 -262
  357. package/src/modules/core/controllers/classes/abac/v2/abac-core-fixed.js +0 -313
  358. package/src/modules/core/controllers/classes/abac/v2/abac-express-fixed.js +0 -276
  359. package/src/modules/core/controllers/classes/abac/v2/abac-fields-fixed.js +0 -425
  360. package/src/modules/core/controllers/classes/abac/v2/abac-main-fixed.js +0 -295
  361. package/src/modules/core/controllers/classes/abac/v2/abac-policies-fixed.js +0 -316
  362. package/src/modules/core/controllers/classes/abac/v2/abac-ws-fixed.js +0 -237
  363. package/src/modules/core/controllers/classes/core.abac.js +0 -310
  364. package/src/modules/core/controllers/classes/core.crud.js +0 -89
  365. package/src/modules/governance/reactcode/eslint.config.js +0 -28
  366. /package/dist/node_modules/.pnpm/{@capacitor_keyboard@7.0.0_@capacitor_core@7.0.1 → @capacitor_keyboard@7.0.1_@capacitor_core@7.4.4}/node_modules/@capacitor/keyboard/dist/esm/definitions.js +0 -0
@@ -1,276 +0,0 @@
1
- // @martyrs/src/modules/core/controllers/classes/abac/abac.adapter.express.js
2
- export default class ABACExpressAdapter {
3
- constructor(abac) {
4
- this.abac = abac;
5
- }
6
-
7
- /**
8
- * Основной middleware - разделен на составные части
9
- */
10
- middleware(resource, action, options = {}) {
11
- const middlewares = [];
12
-
13
- // 1. Access control
14
- middlewares.push(this._accessMiddleware(resource, action, options));
15
-
16
- // 2. Field validation (если включена)
17
- if (options.checkFields) {
18
- middlewares.push(this._fieldsValidationMiddleware(resource, action, options));
19
- }
20
-
21
- return middlewares;
22
- }
23
-
24
- /**
25
- * Middleware проверки доступа
26
- * @private
27
- */
28
- _accessMiddleware(resource, action, options = {}) {
29
- return async (req, res, next) => {
30
- try {
31
- const context = this._buildContext(req, resource, action, options);
32
- const accessResult = await this.abac.checkAccess(context, context.customPolicies);
33
-
34
- if (!accessResult.allow) {
35
- return this._sendAccessDenied(res, accessResult.reason);
36
- }
37
-
38
- // Сохраняем результат для последующих middleware
39
- req.abacContext = context;
40
- req.abacAccessResult = accessResult;
41
- next();
42
- } catch (error) {
43
- this.abac.logger?.error('ABAC middleware error', {
44
- resource,
45
- action,
46
- error: error.message,
47
- stack: error.stack
48
- });
49
- return this._sendError(res);
50
- }
51
- };
52
- }
53
-
54
- /**
55
- * Middleware проверки полей
56
- * @private
57
- */
58
- _fieldsValidationMiddleware(resource, action, options = {}) {
59
- return async (req, res, next) => {
60
- try {
61
- const context = req.abacContext || this._buildContext(req, resource, action, options);
62
- const fieldsResult = await this.abac.checkFields(context, req.body, action);
63
-
64
- if (fieldsResult.errors.length > 0 && options.strictFieldsMode) {
65
- return this._sendFieldError(res, fieldsResult.errors);
66
- }
67
-
68
- // Заменяем body отфильтрованными данными
69
- req.body = fieldsResult.allowed;
70
- req.abacFieldsResult = fieldsResult;
71
-
72
- next();
73
- } catch (error) {
74
- this.abac.logger?.error('Fields middleware error', {
75
- resource,
76
- action,
77
- error: error.message
78
- });
79
-
80
- if (options.passErrors) {
81
- next(error);
82
- } else {
83
- return this._sendError(res);
84
- }
85
- }
86
- };
87
- }
88
-
89
- /**
90
- * Построение контекста
91
- * @private
92
- */
93
- _buildContext(req, resource, action, options = {}) {
94
- return {
95
- user: req.userId,
96
- resource,
97
- action,
98
- req,
99
- // НЕ смешиваем body и query - передаем структурированно
100
- data: {
101
- body: req.body || {},
102
- query: req.query || {},
103
- params: req.params || {}
104
- },
105
- params: req.params,
106
- customPolicies: options.policies || {},
107
- options
108
- };
109
- }
110
-
111
- /**
112
- * Policy middleware
113
- */
114
- policyMiddleware(policyNames = [], customPolicies = {}, options = {}) {
115
- return async (req, res, next) => {
116
- try {
117
- const context = this._buildContext(
118
- req,
119
- options.resource || 'custom',
120
- options.action || 'access',
121
- options
122
- );
123
-
124
- const result = await this.abac.checkPolicies(context, policyNames, customPolicies);
125
-
126
- if (!result.allow) {
127
- return this._sendPolicyDenied(res, result.reason);
128
- }
129
-
130
- req.abacPolicyResult = result;
131
- next();
132
- } catch (error) {
133
- this.abac.logger?.error('Policy middleware error', {
134
- policies: policyNames,
135
- error: error.message
136
- });
137
- return this._sendError(res);
138
- }
139
- };
140
- }
141
-
142
- /**
143
- * Fields middleware для проверки/трансформации полей
144
- */
145
- fieldsMiddleware(resource, options = {}) {
146
- return async (req, res, next) => {
147
- try {
148
- // Определяем action из метода запроса
149
- const action = options.action || this._getActionFromMethod(req.method);
150
- const context = this._buildContext(req, resource, action, options);
151
-
152
- // Определяем какие данные проверять
153
- let dataToCheck = this._getDataToCheck(req, res, options);
154
-
155
- const fieldsResult = await this.abac.checkFields(context, dataToCheck, action);
156
-
157
- // Обработка ошибок
158
- if (fieldsResult.errors.length > 0) {
159
- if (options.strictMode) {
160
- return this._sendFieldError(res, fieldsResult.errors);
161
- }
162
- // В нестрогом режиме логируем ошибки
163
- this.abac.logger?.warn('Field validation errors', {
164
- resource,
165
- action,
166
- errors: fieldsResult.errors
167
- });
168
- }
169
-
170
- // Применяем результаты
171
- this._applyFieldsResult(req, res, options, fieldsResult);
172
-
173
- // Сохраняем результат
174
- req.abacFieldsResult = fieldsResult;
175
-
176
- next();
177
- } catch (error) {
178
- this.abac.logger?.error('Fields middleware error', {
179
- resource,
180
- error: error.message
181
- });
182
-
183
- if (options.passErrors) {
184
- next(error);
185
- } else {
186
- return this._sendError(res);
187
- }
188
- }
189
- };
190
- }
191
-
192
- /**
193
- * Получение action из HTTP метода
194
- * @private
195
- */
196
- _getActionFromMethod(method) {
197
- const methodActionMap = {
198
- 'GET': 'read',
199
- 'POST': 'create',
200
- 'PUT': 'update',
201
- 'PATCH': 'update',
202
- 'DELETE': 'delete'
203
- };
204
- return methodActionMap[method] || 'access';
205
- }
206
-
207
- /**
208
- * Определение данных для проверки
209
- * @private
210
- */
211
- _getDataToCheck(req, res, options) {
212
- if (req.method === 'GET' && options.checkQuery) {
213
- return req.query;
214
- }
215
-
216
- if (options.checkResponse && res.locals.data) {
217
- return res.locals.data;
218
- }
219
-
220
- return req.body;
221
- }
222
-
223
- /**
224
- * Применение результатов проверки полей
225
- * @private
226
- */
227
- _applyFieldsResult(req, res, options, fieldsResult) {
228
- if (req.method === 'GET' && options.checkQuery) {
229
- req.query = fieldsResult.allowed;
230
- } else if (options.checkResponse && res.locals.data) {
231
- res.locals.data = fieldsResult.transformed || fieldsResult.allowed;
232
- } else {
233
- req.body = fieldsResult.allowed;
234
- }
235
- }
236
-
237
- /**
238
- * Отправка ошибок - унифицированные методы
239
- * @private
240
- */
241
- _sendAccessDenied(res, reason) {
242
- return res.status(403).json({
243
- error: {
244
- code: 'ACCESS_DENIED',
245
- message: reason
246
- }
247
- });
248
- }
249
-
250
- _sendPolicyDenied(res, reason) {
251
- return res.status(403).json({
252
- error: {
253
- code: 'POLICY_DENIED',
254
- message: reason
255
- }
256
- });
257
- }
258
-
259
- _sendFieldError(res, errors) {
260
- return res.status(400).json({
261
- error: {
262
- code: 'FIELD_VALIDATION_ERROR',
263
- fields: errors
264
- }
265
- });
266
- }
267
-
268
- _sendError(res) {
269
- return res.status(500).json({
270
- error: {
271
- code: 'INTERNAL_ERROR',
272
- message: 'Access control error'
273
- }
274
- });
275
- }
276
- }
@@ -1,425 +0,0 @@
1
- // @martyrs/src/modules/core/controllers/classes/abac/abac.fields.js
2
- import set from 'lodash/set';
3
- import get from 'lodash/get';
4
- import unset from 'lodash/unset';
5
- import cloneDeep from 'lodash/cloneDeep';
6
-
7
- export default class ABACFields {
8
- constructor(abac) {
9
- this.abac = abac;
10
- this.configs = new Map();
11
- this.compiledPatterns = new Map(); // Кэш скомпилированных паттернов
12
- }
13
-
14
- /**
15
- * Регистрация field policies
16
- */
17
- registerFieldsPolicy(resourceName, config) {
18
- const normalized = {};
19
-
20
- for (const [pattern, conf] of Object.entries(config)) {
21
- const { actions, ...baseSettings } = conf;
22
-
23
- const base = {
24
- actions: baseSettings.actions || '*',
25
- access: baseSettings.access || 'allow',
26
- validator: baseSettings.validator || null,
27
- transform: baseSettings.transform || null,
28
- rule: baseSettings.rule || 'remove',
29
- force: baseSettings.force || false,
30
- pattern
31
- };
32
-
33
- if (actions && typeof actions === 'object') {
34
- normalized[pattern] = {
35
- base,
36
- actions: Object.entries(actions).reduce((acc, [action, override]) => {
37
- acc[action] = { ...base, ...override };
38
- return acc;
39
- }, {})
40
- };
41
- } else {
42
- normalized[pattern] = { base };
43
- }
44
- }
45
-
46
- this.configs.set(resourceName, normalized);
47
- // Очищаем кэш паттернов при изменении конфига
48
- this.compiledPatterns.delete(resourceName);
49
- return this;
50
- }
51
-
52
- /**
53
- * Проверка доступа к полям
54
- */
55
- async checkFields(context, data, action = null) {
56
- const normalizedContext = this.abac.core.normalizeContext(context);
57
-
58
- if (normalizedContext.skipFieldPolicies) {
59
- return {
60
- allowed: data,
61
- denied: [],
62
- errors: [],
63
- transformed: data
64
- };
65
- }
66
-
67
- const { resource } = normalizedContext;
68
- const fieldAction = action || normalizedContext.action;
69
- const config = normalizedContext.options?.fieldsConfig || this.configs.get(resource);
70
-
71
- if (!config) {
72
- return { allowed: data, denied: [], errors: [], transformed: data };
73
- }
74
-
75
- // Применяем расширения
76
- await this._applyExtensions(normalizedContext);
77
-
78
- // Используем structuredClone или lodash для безопасного клонирования
79
- const result = {
80
- allowed: this._deepClone(data),
81
- denied: [],
82
- errors: [],
83
- transformed: null
84
- };
85
-
86
- // Собираем правила с учетом force
87
- const rules = this._collectRulesOptimized(data, config, fieldAction, resource);
88
- const forced = rules.filter(r => r.rule.force);
89
- const regular = rules.filter(r => !r.rule.force);
90
-
91
- // Set для отслеживания обработанных путей (БЫЛ БАГ!)
92
- const processed = new Set();
93
-
94
- // Применяем правила (сначала forced, потом обычные)
95
- for (const { path, value, rule } of [...forced, ...regular]) {
96
- // Пропускаем уже обработанные пути
97
- if (processed.has(path)) continue;
98
- processed.add(path);
99
-
100
- // Проверка доступа
101
- const hasAccess = await this._checkFieldAccess(
102
- rule.access,
103
- normalizedContext,
104
- path,
105
- value
106
- );
107
-
108
- if (!hasAccess) {
109
- await this._handleDenied(result, path, rule.rule);
110
- continue;
111
- }
112
-
113
- // Валидация
114
- if (rule.validator && rule.access !== 'optional') {
115
- const validation = await this._validateField(
116
- rule.validator,
117
- value,
118
- normalizedContext,
119
- path
120
- );
121
-
122
- if (!validation.isValid) {
123
- result.errors.push({ path, errors: validation.errors });
124
-
125
- if (rule.rule === 'error') {
126
- throw new Error(`Validation failed: ${path}`);
127
- }
128
- await this._handleDenied(result, path, rule.rule);
129
- }
130
- }
131
- }
132
-
133
- // Трансформация
134
- result.transformed = this._deepClone(result.allowed);
135
-
136
- for (const { path, value, rule } of [...forced, ...regular]) {
137
- if (!rule.transform) continue;
138
-
139
- const isDenied = result.denied.some(d => d.path === path);
140
- if (isDenied) continue;
141
-
142
- const transformed = await this._transformField(
143
- rule.transform,
144
- value,
145
- normalizedContext,
146
- path,
147
- result.transformed
148
- );
149
- set(result.transformed, path, transformed);
150
- }
151
-
152
- return result;
153
- }
154
-
155
- /**
156
- * Применение расширений
157
- * @private
158
- */
159
- async _applyExtensions(context) {
160
- if (!this.abac.policies || !this.abac.policies.priorities.extensions.length) {
161
- return;
162
- }
163
-
164
- for (const [name, extensionFn] of this.abac.policies.priorities.extensions) {
165
- try {
166
- await extensionFn(context);
167
- } catch (error) {
168
- this.abac.logger?.error('Extension error', { name, error });
169
- }
170
- }
171
- }
172
-
173
- /**
174
- * Безопасное клонирование
175
- * @private
176
- */
177
- _deepClone(obj) {
178
- // Используем structuredClone если доступен (Node 17+)
179
- if (typeof structuredClone === 'function') {
180
- try {
181
- return structuredClone(obj);
182
- } catch (e) {
183
- // Fallback для циклических ссылок
184
- }
185
- }
186
- // Fallback на lodash
187
- return cloneDeep(obj);
188
- }
189
-
190
- /**
191
- * Оптимизированный сбор правил
192
- * @private
193
- */
194
- _collectRulesOptimized(data, config, action, resource) {
195
- const rules = [];
196
-
197
- // Компилируем паттерны если нужно
198
- const compiledPatterns = this._getCompiledPatterns(resource, config);
199
-
200
- // Проверяем есть ли паттерн "*" - если да, применяем его ко всем полям
201
- const hasWildcard = compiledPatterns.has('*');
202
-
203
- // Оптимизация: сначала собираем все пути
204
- const dataPaths = this._extractPathsOptimized(data);
205
-
206
- // Если есть wildcard, сразу добавляем правило для всех путей
207
- if (hasWildcard) {
208
- const wildcardConfig = config['*'];
209
- const rule = this._getRuleForAction(wildcardConfig, action);
210
-
211
- if (this._matchesAction(rule.actions, action)) {
212
- for (const path of dataPaths) {
213
- rules.push({
214
- path,
215
- value: get(data, path),
216
- rule
217
- });
218
- }
219
- // Если применили wildcard, можем не проверять другие паттерны
220
- return rules;
221
- }
222
- }
223
-
224
- // Проверяем остальные паттерны
225
- for (const path of dataPaths) {
226
- for (const [pattern, matcher] of compiledPatterns) {
227
- if (pattern === '*') continue; // Уже обработали
228
-
229
- if (matcher(path)) {
230
- const fieldConfig = config[pattern];
231
- const rule = this._getRuleForAction(fieldConfig, action);
232
-
233
- if (this._matchesAction(rule.actions, action)) {
234
- rules.push({
235
- path,
236
- value: get(data, path),
237
- rule
238
- });
239
- break; // Берем первое совпадение
240
- }
241
- }
242
- }
243
- }
244
-
245
- return rules;
246
- }
247
-
248
- /**
249
- * Получение скомпилированных паттернов
250
- * @private
251
- */
252
- _getCompiledPatterns(resource, config) {
253
- if (!this.compiledPatterns.has(resource)) {
254
- const compiled = new Map();
255
-
256
- for (const pattern of Object.keys(config)) {
257
- compiled.set(pattern, this._compilePattern(pattern));
258
- }
259
-
260
- this.compiledPatterns.set(resource, compiled);
261
- }
262
-
263
- return this.compiledPatterns.get(resource);
264
- }
265
-
266
- /**
267
- * Компиляция паттерна в функцию проверки
268
- * @private
269
- */
270
- _compilePattern(pattern) {
271
- if (pattern === '*') return () => true;
272
-
273
- // Преобразуем паттерн в регулярку
274
- const escaped = pattern
275
- .replace(/\./g, '\\.')
276
- .replace(/\*\*/g, '.*')
277
- .replace(/\*/g, '[^.]+')
278
- .replace(/\[\*\]/g, '\\[\\d+\\]');
279
-
280
- const regex = new RegExp(`^${escaped}$`);
281
-
282
- return (path) => regex.test(path);
283
- }
284
-
285
- /**
286
- * Оптимизированное извлечение путей
287
- * @private
288
- */
289
- _extractPathsOptimized(obj, prefix = '', paths = []) {
290
- if (!obj || typeof obj !== 'object') return paths;
291
-
292
- if (Array.isArray(obj)) {
293
- obj.forEach((item, i) => {
294
- const path = prefix ? `${prefix}[${i}]` : `[${i}]`;
295
- paths.push(path);
296
- this._extractPathsOptimized(item, path, paths);
297
- });
298
- } else {
299
- for (const key in obj) {
300
- if (obj.hasOwnProperty(key)) {
301
- const path = prefix ? `${prefix}.${key}` : key;
302
- paths.push(path);
303
-
304
- if (obj[key] && typeof obj[key] === 'object') {
305
- this._extractPathsOptimized(obj[key], path, paths);
306
- }
307
- }
308
- }
309
- }
310
-
311
- return paths;
312
- }
313
-
314
- /**
315
- * Получение правила для действия
316
- * @private
317
- */
318
- _getRuleForAction(fieldConfig, action) {
319
- if (fieldConfig.actions && fieldConfig.actions[action]) {
320
- return fieldConfig.actions[action];
321
- }
322
- return fieldConfig.base;
323
- }
324
-
325
- /**
326
- * Проверка доступа к полю
327
- * @private
328
- */
329
- async _checkFieldAccess(access, context, fieldPath, fieldValue) {
330
- if (access === 'allow') return true;
331
- if (access === 'deny') return false;
332
- if (access === 'optional') return true;
333
-
334
- if (typeof access === 'function') {
335
- try {
336
- return !!(await access(context, fieldPath, fieldValue));
337
- } catch (e) {
338
- this.abac.logger?.error('Field access check error', {
339
- field: fieldPath,
340
- error: e.message
341
- });
342
- return false;
343
- }
344
- }
345
-
346
- return true;
347
- }
348
-
349
- /**
350
- * Валидация поля
351
- * @private
352
- */
353
- async _validateField(validator, value, context, fieldPath) {
354
- if (typeof validator === 'function') {
355
- try {
356
- const result = await validator(value, context, fieldPath);
357
- if (typeof result === 'boolean') {
358
- return { isValid: result, errors: result ? [] : ['Validation failed'] };
359
- }
360
- return result;
361
- } catch (e) {
362
- return { isValid: false, errors: [e.message] };
363
- }
364
- }
365
-
366
- if (validator && validator.validate) {
367
- return validator.validate(value);
368
- }
369
-
370
- return { isValid: true, errors: [] };
371
- }
372
-
373
- /**
374
- * Трансформация поля
375
- * @private
376
- */
377
- async _transformField(transform, value, context, fieldPath, currentData) {
378
- try {
379
- return await transform(value, context, fieldPath, currentData);
380
- } catch (error) {
381
- this.abac.logger?.error('Field transform error', {
382
- field: fieldPath,
383
- error: error.message
384
- });
385
- return value;
386
- }
387
- }
388
-
389
- /**
390
- * Обработка отказа
391
- * @private
392
- */
393
- async _handleDenied(result, path, rule) {
394
- result.denied.push({ path, reason: rule });
395
-
396
- if (rule === 'remove') {
397
- unset(result.allowed, path);
398
- } else if (rule === 'error') {
399
- throw new Error(`Access denied: ${path}`);
400
- }
401
- }
402
-
403
- /**
404
- * Проверка действия
405
- * @private
406
- */
407
- _matchesAction(actions, action) {
408
- if (actions === '*') return true;
409
- return Array.isArray(actions) ? actions.includes(action) : actions === action;
410
- }
411
-
412
- // Публичные методы для управления конфигами
413
- getConfig(resourceName) {
414
- return this.configs.get(resourceName);
415
- }
416
-
417
- hasConfig(resourceName) {
418
- return this.configs.has(resourceName);
419
- }
420
-
421
- removeConfig(resourceName) {
422
- this.compiledPatterns.delete(resourceName);
423
- return this.configs.delete(resourceName);
424
- }
425
- }