mediacube-ui-v2 0.0.7 → 0.0.9

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 (342) hide show
  1. package/dist/App.vue.js +54 -0
  2. package/dist/assets/tokens/json/animations.json +6 -0
  3. package/dist/assets/tokens/json/border-radius.json +24 -0
  4. package/dist/assets/tokens/json/box-shadows.json +24 -0
  5. package/dist/assets/tokens/json/colors.json +71 -0
  6. package/dist/assets/tokens/json/durations.json +10 -0
  7. package/dist/assets/tokens/json/easings.json +3 -0
  8. package/dist/assets/tokens/json/font-families.json +4 -0
  9. package/dist/assets/tokens/json/font-sizes.json +18 -0
  10. package/dist/assets/tokens/json/font-weights.json +12 -0
  11. package/dist/assets/tokens/json/gradients.json +13 -0
  12. package/dist/assets/tokens/json/index.js +18 -0
  13. package/dist/assets/tokens/json/letter-spacings.json +4 -0
  14. package/dist/assets/tokens/json/line-heights.json +18 -0
  15. package/dist/assets/tokens/json/media-queries.json +26 -0
  16. package/dist/assets/tokens/json/opacities.json +5 -0
  17. package/dist/assets/tokens/json/sizes.json +42 -0
  18. package/dist/assets/tokens/json/spacings.json +34 -0
  19. package/dist/assets/tokens/json/z-indexes.json +12 -0
  20. package/dist/components/elements/McAvatar/McAvatar.vue.js +412 -0
  21. package/dist/components/elements/McBadge/McBadge.vue.js +188 -0
  22. package/dist/components/elements/McBottomLoader/McBottomLoader.vue.js +83 -0
  23. package/dist/components/elements/McButton/McButton.vue.js +1037 -0
  24. package/dist/components/elements/McChip/McChip.vue.js +326 -0
  25. package/dist/components/elements/McCropper/McCropper.vue.js +98 -0
  26. package/dist/components/elements/McDatepicker/McDatepicker.vue.js +1255 -0
  27. package/dist/components/elements/McDraggable/McDraggable.vue.js +280 -0
  28. package/dist/components/elements/McFieldCheckbox/McFieldCheckbox.vue.js +542 -0
  29. package/dist/components/elements/McFieldRadio/McFieldRadio.vue.js +489 -0
  30. package/dist/components/elements/McFieldRadioGroup/McFieldRadioGroup.vue.js +471 -0
  31. package/dist/components/elements/McFieldRange/McFieldRange.vue.js +547 -0
  32. package/dist/components/elements/McFieldSelect/McFieldSelect.vue.js +1440 -0
  33. package/dist/components/elements/McFieldText/McFieldText.vue.js +1404 -0
  34. package/dist/components/elements/McFieldToggle/McFieldToggle.vue.js +408 -0
  35. package/dist/components/elements/McInfinityLoadingTrigger/McInfinityLoadingTrigger.vue.js +192 -0
  36. package/dist/components/elements/McNodata/McNoData.vue.js +319 -0
  37. package/dist/components/elements/McNotification/McNotification.vue.js +367 -0
  38. package/dist/components/elements/McProgress/McProgress.vue.js +361 -0
  39. package/dist/components/elements/McSeparator/McSeparator.vue.js +325 -0
  40. package/dist/components/elements/McSlideUpDown/McSlideUpDown.vue.js +271 -0
  41. package/dist/components/elements/McStack/McStack.vue.js +180 -0
  42. package/dist/components/elements/McSvgIcon/McSvgIcon.vue.js +289 -0
  43. package/dist/components/elements/McTitle/McTitle.vue.js +468 -0
  44. package/dist/components/elements/McTooltip/McTooltip.vue.js +246 -0
  45. package/dist/components/index.js +73 -0
  46. package/dist/components/patterns/McAccordion/McAccordion.vue.js +120 -0
  47. package/dist/components/patterns/McCell/McCell.vue.js +197 -0
  48. package/dist/components/patterns/McCollapse/McCollapse.vue.js +315 -0
  49. package/dist/components/patterns/McDropdown/McDropdown.vue.js +366 -0
  50. package/dist/components/patterns/McDropdown/McDropdownPanel.vue.js +83 -0
  51. package/dist/components/patterns/McFilter/McFilter.vue.js +1068 -0
  52. package/dist/components/patterns/McFilter/McFilterChip/McFilterChip.vue.js +211 -0
  53. package/dist/components/patterns/McFilter/McFilterTags/McFilterTags.vue.js +552 -0
  54. package/dist/components/patterns/McFilter/McFilterTypeDate/McFilterTypeDate.vue.js +188 -0
  55. package/dist/components/patterns/McFilter/McFilterTypeRange/McFilterTypeRange.vue.js +238 -0
  56. package/dist/components/patterns/McFilter/McFilterTypeRelation/McFilterTypeRelation.vue.js +359 -0
  57. package/dist/components/patterns/McFilter/McFilterTypeText/McFilterTypeText.vue.js +171 -0
  58. package/dist/components/patterns/McGridCol/McGridCol.vue.js +246 -0
  59. package/dist/components/patterns/McGridRow/McGridRow.vue.js +292 -0
  60. package/dist/components/patterns/McOverlay/McOverlay.vue.js +107 -0
  61. package/dist/components/patterns/McPreview/McPreview.vue.js +118 -0
  62. package/dist/components/patterns/McSideBar/McSideBar.vue.js +740 -0
  63. package/dist/components/patterns/McSideBar/McSideBarBottom/McSideBarBottom.vue.js +204 -0
  64. package/dist/components/patterns/McSideBar/McSideBarButton/McSideBarButton.vue.js +510 -0
  65. package/dist/components/patterns/McSideBar/McSideBarCenter/McSideBarCenter.vue.js +413 -0
  66. package/dist/components/patterns/McSideBar/McSideBarTop/McSideBarTop.vue.js +419 -0
  67. package/dist/components/patterns/McTab/McTab.vue.js +518 -0
  68. package/dist/components/patterns/McTabs/McTabs.vue.js +427 -0
  69. package/dist/components/patterns/McWrapScroll/McWrapScroll.vue.js +422 -0
  70. package/dist/components/templates/McDrawer/McDrawer.vue.js +304 -0
  71. package/dist/components/templates/McDrawer/McDrawerContainer.vue.js +133 -0
  72. package/dist/components/templates/McDrawer/McDrawerContentTemplate/McDrawerContentTemplate.vue.js +134 -0
  73. package/dist/components/templates/McModal/McModal.vue.js +664 -0
  74. package/dist/components/templates/McModal/McModalContainer.vue.js +119 -0
  75. package/dist/components/templates/McTable/McTable/McTable.vue.js +862 -0
  76. package/dist/components/templates/McTable/McTableCard/McTableCard.vue.js +339 -0
  77. package/dist/components/templates/McTable/McTableCard/McTableCardHeader/McTableCardHeader.vue.js +119 -0
  78. package/dist/components/templates/McTable/McTableSkeletonLoading/McTableSkeletonLoading.vue.js +118 -0
  79. package/dist/components/templates/McTable/McTableSort/McTableSort.vue.js +136 -0
  80. package/dist/components/templates/McTopBar/McTopBar.vue.js +309 -0
  81. package/dist/components/templates/McVirtualScroll/McVirtualScroll.vue.js +239 -0
  82. package/dist/composables/index.js +8 -0
  83. package/dist/composables/useDrawer.js +72 -0
  84. package/dist/composables/useEncodeDecode.js +25 -0
  85. package/dist/composables/useFieldErrors.js +20 -0
  86. package/dist/composables/useHelper.js +79 -0
  87. package/dist/composables/useModal.js +71 -0
  88. package/dist/composables/useRandomNumber.js +10 -0
  89. package/dist/composables/useTooltip.js +154 -0
  90. package/dist/consts/table.js +6 -0
  91. package/dist/enums/Cell.js +6 -0
  92. package/dist/enums/Chip.js +11 -0
  93. package/dist/enums/Datepicker.js +42 -0
  94. package/dist/enums/Drawer.js +5 -0
  95. package/dist/enums/Dropdown.js +12 -0
  96. package/dist/enums/Filter.js +14 -0
  97. package/dist/enums/Grid.js +24 -0
  98. package/dist/enums/Input.js +20 -0
  99. package/dist/enums/Modal.js +5 -0
  100. package/dist/enums/Preview.js +6 -0
  101. package/dist/enums/Radio.js +5 -0
  102. package/dist/enums/RadioGroup.js +5 -0
  103. package/dist/enums/Select.js +11 -0
  104. package/dist/enums/Sidebar.js +5 -0
  105. package/dist/enums/Tab.js +6 -0
  106. package/dist/enums/Title.js +21 -0
  107. package/dist/enums/Tooltip.js +15 -0
  108. package/dist/enums/index.js +22 -0
  109. package/dist/enums/ui/Alignment.js +6 -0
  110. package/dist/enums/ui/Button.js +24 -0
  111. package/dist/enums/ui/Directions.js +5 -0
  112. package/dist/enums/ui/Weights.js +7 -0
  113. package/dist/index.cjs +3 -3
  114. package/dist/index.js +13 -10584
  115. package/dist/main.js +6 -0
  116. package/dist/mocks/authUser.js +162 -0
  117. package/dist/mocks/categories.js +107 -0
  118. package/dist/mocks/filterMocks.js +128 -0
  119. package/dist/mocks/icons.json +1 -0
  120. package/dist/mocks/menuLangs.js +19 -0
  121. package/dist/mocks/sidebar.js +125 -0
  122. package/dist/mocks/tableData.js +8180 -0
  123. package/dist/style.css +1 -1
  124. package/dist/types/App.vue.d.ts +2 -0
  125. package/dist/types/IButton.js +1 -0
  126. package/dist/types/ICell.js +1 -0
  127. package/dist/types/IChip.js +1 -0
  128. package/dist/types/ICollapse.js +1 -0
  129. package/dist/types/IDatepicker.js +1 -0
  130. package/dist/types/IDirections.js +1 -0
  131. package/dist/types/IDrawer.js +1 -0
  132. package/dist/types/IDropdown.js +1 -0
  133. package/dist/types/IFilter.js +1 -0
  134. package/dist/types/IGrid.js +1 -0
  135. package/dist/types/IInput.js +1 -0
  136. package/dist/types/IModal.js +1 -0
  137. package/dist/types/IPreview.js +1 -0
  138. package/dist/types/IRadio.js +1 -0
  139. package/dist/types/IRadioGroup.js +1 -0
  140. package/dist/types/IRoute.js +1 -0
  141. package/dist/types/ISelect.js +1 -0
  142. package/dist/types/ISideBar.js +1 -0
  143. package/dist/types/ITable.js +1 -0
  144. package/dist/types/ITabs.js +1 -0
  145. package/dist/types/ITitle.js +1 -0
  146. package/dist/types/ITooltip.js +1 -0
  147. package/dist/types/assets/tokens/json/index.d.ts +18 -0
  148. package/dist/{components → types/components}/elements/McAvatar/McAvatar.vue.d.ts +5 -5
  149. package/dist/{components → types/components}/elements/McBadge/McBadge.vue.d.ts +3 -3
  150. package/dist/types/components/elements/McBottomLoader/McBottomLoader.vue.d.ts +14 -0
  151. package/dist/{components → types/components}/elements/McButton/McButton.vue.d.ts +13 -12
  152. package/dist/{components → types/components}/elements/McChip/McChip.vue.d.ts +7 -6
  153. package/dist/types/components/elements/McCropper/McCropper.vue.d.ts +2 -0
  154. package/dist/{components → types/components}/elements/McDatepicker/McDatepicker.vue.d.ts +2 -1
  155. package/dist/{components → types/components}/elements/McDraggable/McDraggable.vue.d.ts +4 -4
  156. package/dist/{components → types/components}/elements/McFieldCheckbox/McFieldCheckbox.vue.d.ts +1 -1
  157. package/dist/{components → types/components}/elements/McFieldRadio/McFieldRadio.vue.d.ts +8 -8
  158. package/dist/{components → types/components}/elements/McFieldRadioGroup/McFieldRadioGroup.vue.d.ts +1 -1
  159. package/dist/{components → types/components}/elements/McFieldRange/McFieldRange.vue.d.ts +6 -6
  160. package/dist/{components → types/components}/elements/McFieldSelect/McFieldSelect.vue.d.ts +12 -11
  161. package/dist/{components → types/components}/elements/McFieldText/McFieldText.vue.d.ts +9 -9
  162. package/dist/{components → types/components}/elements/McFieldToggle/McFieldToggle.vue.d.ts +6 -6
  163. package/dist/{components → types/components}/elements/McInfinityLoadingTrigger/McInfinityLoadingTrigger.vue.d.ts +4 -4
  164. package/dist/types/components/elements/McNodata/McNoData.vue.d.ts +110 -0
  165. package/dist/types/components/elements/McNotification/McNotification.vue.d.ts +124 -0
  166. package/dist/{components → types/components}/elements/McProgress/McProgress.vue.d.ts +5 -5
  167. package/dist/{components → types/components}/elements/McSeparator/McSeparator.vue.d.ts +4 -4
  168. package/dist/{components → types/components}/elements/McSlideUpDown/McSlideUpDown.vue.d.ts +5 -5
  169. package/dist/{components → types/components}/elements/McStack/McStack.vue.d.ts +4 -4
  170. package/dist/{components → types/components}/elements/McSvgIcon/McSvgIcon.vue.d.ts +9 -9
  171. package/dist/{components → types/components}/elements/McTitle/McTitle.vue.d.ts +7 -7
  172. package/dist/{components → types/components}/elements/McTooltip/McTooltip.vue.d.ts +6 -6
  173. package/dist/types/components/index.d.ts +70 -0
  174. package/dist/{components → types/components}/patterns/McAccordion/McAccordion.vue.d.ts +4 -4
  175. package/dist/{components → types/components}/patterns/McCell/McCell.vue.d.ts +6 -6
  176. package/dist/{components → types/components}/patterns/McCollapse/McCollapse.vue.d.ts +6 -6
  177. package/dist/{components → types/components}/patterns/McDropdown/McDropdown.vue.d.ts +7 -7
  178. package/dist/types/components/patterns/McDropdown/McDropdownPanel.vue.d.ts +22 -0
  179. package/dist/{components → types/components}/patterns/McFilter/McFilter.vue.d.ts +6 -6
  180. package/dist/{components → types/components}/patterns/McFilter/McFilterChip/McFilterChip.vue.d.ts +6 -6
  181. package/dist/{components → types/components}/patterns/McFilter/McFilterTags/McFilterTags.vue.d.ts +6 -6
  182. package/dist/{components → types/components}/patterns/McFilter/McFilterTypeDate/McFilterTypeDate.vue.d.ts +6 -6
  183. package/dist/{components → types/components}/patterns/McFilter/McFilterTypeRange/McFilterTypeRange.vue.d.ts +6 -6
  184. package/dist/{components → types/components}/patterns/McFilter/McFilterTypeRelation/McFilterTypeRelation.vue.d.ts +6 -6
  185. package/dist/{components → types/components}/patterns/McFilter/McFilterTypeText/McFilterTypeText.vue.d.ts +6 -6
  186. package/dist/{components → types/components}/patterns/McGridCol/McGridCol.vue.d.ts +4 -4
  187. package/dist/{components → types/components}/patterns/McGridRow/McGridRow.vue.d.ts +5 -5
  188. package/dist/{components → types/components}/patterns/McOverlay/McOverlay.vue.d.ts +4 -4
  189. package/dist/{components → types/components}/patterns/McPreview/McPreview.vue.d.ts +4 -4
  190. package/dist/types/components/patterns/McSideBar/McSideBar.vue.d.ts +292 -0
  191. package/dist/{components → types/components}/patterns/McSideBar/McSideBarBottom/McSideBarBottom.vue.d.ts +5 -5
  192. package/dist/{components → types/components}/patterns/McSideBar/McSideBarButton/McSideBarButton.vue.d.ts +6 -6
  193. package/dist/{components → types/components}/patterns/McSideBar/McSideBarCenter/McSideBarCenter.vue.d.ts +6 -6
  194. package/dist/types/components/patterns/McSideBar/McSideBarTop/McSideBarTop.vue.d.ts +123 -0
  195. package/dist/types/components/patterns/McTab/McTab.vue.d.ts +224 -0
  196. package/dist/{components → types/components}/patterns/McTabs/McTabs.vue.d.ts +8 -7
  197. package/dist/{components → types/components}/patterns/McWrapScroll/McWrapScroll.vue.d.ts +7 -7
  198. package/dist/types/components/templates/McDrawer/McDrawer.vue.d.ts +104 -0
  199. package/dist/{components → types/components}/templates/McDrawer/McDrawerContainer.vue.d.ts +5 -5
  200. package/dist/{components → types/components}/templates/McDrawer/McDrawerContentTemplate/McDrawerContentTemplate.vue.d.ts +4 -4
  201. package/dist/{components → types/components}/templates/McModal/McModal.vue.d.ts +7 -7
  202. package/dist/{components → types/components}/templates/McModal/McModalContainer.vue.d.ts +5 -5
  203. package/dist/types/components/templates/McTable/McTable/McTable.vue.d.ts +295 -0
  204. package/dist/{components → types/components}/templates/McTable/McTableCard/McTableCard.vue.d.ts +6 -6
  205. package/dist/{components → types/components}/templates/McTable/McTableCard/McTableCardHeader/McTableCardHeader.vue.d.ts +4 -4
  206. package/dist/types/components/templates/McTable/McTableSkeletonLoading/McTableSkeletonLoading.vue.d.ts +18 -0
  207. package/dist/{components → types/components}/templates/McTable/McTableSort/McTableSort.vue.d.ts +7 -7
  208. package/dist/{components → types/components}/templates/McTopBar/McTopBar.vue.d.ts +4 -4
  209. package/dist/{components → types/components}/templates/McVirtualScroll/McVirtualScroll.vue.d.ts +4 -4
  210. package/dist/{composables → types/composables}/index.d.ts +1 -1
  211. package/dist/{composables → types/composables}/useDrawer.d.ts +1 -1
  212. package/dist/types/composables/useFieldErrors.d.ts +5 -0
  213. package/dist/{composables → types/composables}/useTooltip.d.ts +1 -1
  214. package/dist/types/index.d.ts +9 -36
  215. package/dist/types/index.js +38 -0
  216. package/dist/types/main.d.ts +2 -0
  217. package/dist/{mocks → types/mocks}/filterMocks.d.ts +1 -1
  218. package/dist/{mocks → types/mocks}/sidebar.d.ts +1 -1
  219. package/dist/{mocks → types/mocks}/tableData.d.ts +1 -1
  220. package/dist/types/styles/Alignment.js +1 -0
  221. package/dist/types/styles/AvatarSizes.js +3 -0
  222. package/dist/types/styles/Colors.js +3 -0
  223. package/dist/types/styles/Durations.js +3 -0
  224. package/dist/types/styles/FontSizes.js +3 -0
  225. package/dist/types/styles/FontWeights.js +3 -0
  226. package/dist/types/styles/Grid.js +1 -0
  227. package/dist/types/styles/Icons.js +2 -0
  228. package/dist/types/styles/LineHeights.js +3 -0
  229. package/dist/types/styles/MediaQueries.js +3 -0
  230. package/dist/types/styles/Radiuses.js +3 -0
  231. package/dist/types/styles/Sizes.js +3 -0
  232. package/dist/types/styles/Spaces.js +3 -0
  233. package/dist/types/styles/Weights.js +1 -0
  234. package/dist/types/{IButton.d.ts → types/IButton.d.ts} +5 -5
  235. package/dist/types/{ICell.d.ts → types/ICell.d.ts} +1 -1
  236. package/dist/types/{IChip.d.ts → types/IChip.d.ts} +2 -2
  237. package/dist/types/{IDatepicker.d.ts → types/IDatepicker.d.ts} +1 -1
  238. package/dist/types/{IDirections.d.ts → types/IDirections.d.ts} +1 -1
  239. package/dist/types/{IDrawer.d.ts → types/IDrawer.d.ts} +2 -2
  240. package/dist/types/{IDropdown.d.ts → types/IDropdown.d.ts} +1 -1
  241. package/dist/types/{IFilter.d.ts → types/IFilter.d.ts} +1 -1
  242. package/dist/types/{IInput.d.ts → types/IInput.d.ts} +1 -1
  243. package/dist/types/{IModal.d.ts → types/IModal.d.ts} +2 -2
  244. package/dist/types/{IPreview.d.ts → types/IPreview.d.ts} +1 -1
  245. package/dist/types/{IRadio.d.ts → types/IRadio.d.ts} +1 -1
  246. package/dist/types/{IRadioGroup.d.ts → types/IRadioGroup.d.ts} +1 -1
  247. package/dist/types/{ISelect.d.ts → types/ISelect.d.ts} +1 -1
  248. package/dist/types/{ISideBar.d.ts → types/ISideBar.d.ts} +5 -5
  249. package/dist/types/{ITable.d.ts → types/ITable.d.ts} +2 -2
  250. package/dist/types/{ITabs.d.ts → types/ITabs.d.ts} +4 -4
  251. package/dist/types/{ITitle.d.ts → types/ITitle.d.ts} +1 -1
  252. package/dist/types/{ITooltip.d.ts → types/ITooltip.d.ts} +1 -1
  253. package/dist/types/types/index.d.ts +36 -0
  254. package/dist/types/{styles → types/styles}/Alignment.d.ts +1 -1
  255. package/dist/types/{styles → types/styles}/Grid.d.ts +1 -1
  256. package/dist/types/{styles → types/styles}/Weights.d.ts +1 -1
  257. package/dist/{utils → types/utils}/dayjs.d.ts +2 -1
  258. package/dist/{utils → types/utils}/mcGridColAdaptiveProps.d.ts +1 -1
  259. package/dist/{utils → types/utils}/mcTitleAdaptiveProps.d.ts +1 -1
  260. package/dist/utils/dayjs.js +18 -0
  261. package/dist/utils/mcGridColAdaptiveProps.js +10 -0
  262. package/dist/utils/mcTitleAdaptiveProps.js +10 -0
  263. package/package.json +7 -3
  264. package/dist/App.vue.d.ts +0 -2
  265. package/dist/assets/tokens/json/animations.json.d.ts +0 -8
  266. package/dist/assets/tokens/json/border-radius.json.d.ts +0 -26
  267. package/dist/assets/tokens/json/box-shadows.json.d.ts +0 -26
  268. package/dist/assets/tokens/json/colors.json.d.ts +0 -73
  269. package/dist/assets/tokens/json/durations.json.d.ts +0 -12
  270. package/dist/assets/tokens/json/easings.json.d.ts +0 -5
  271. package/dist/assets/tokens/json/font-families.json.d.ts +0 -6
  272. package/dist/assets/tokens/json/font-sizes.json.d.ts +0 -20
  273. package/dist/assets/tokens/json/font-weights.json.d.ts +0 -14
  274. package/dist/assets/tokens/json/gradients.json.d.ts +0 -15
  275. package/dist/assets/tokens/json/index.d.ts +0 -18
  276. package/dist/assets/tokens/json/letter-spacings.json.d.ts +0 -6
  277. package/dist/assets/tokens/json/line-heights.json.d.ts +0 -20
  278. package/dist/assets/tokens/json/media-queries.json.d.ts +0 -28
  279. package/dist/assets/tokens/json/opacities.json.d.ts +0 -7
  280. package/dist/assets/tokens/json/sizes.json.d.ts +0 -44
  281. package/dist/assets/tokens/json/spacings.json.d.ts +0 -36
  282. package/dist/assets/tokens/json/z-indexes.json.d.ts +0 -14
  283. package/dist/components/elements/McBottomLoader/McBottomLoader.vue.d.ts +0 -14
  284. package/dist/components/elements/McCropper/McCropper.vue.d.ts +0 -28
  285. package/dist/components/elements/McNodata/McNoData.vue.d.ts +0 -110
  286. package/dist/components/elements/McNotification/McNotification.vue.d.ts +0 -124
  287. package/dist/components/index.d.ts +0 -62
  288. package/dist/components/patterns/McDropdown/McDropdownPanel.vue.d.ts +0 -22
  289. package/dist/components/patterns/McSideBar/McSideBar.vue.d.ts +0 -292
  290. package/dist/components/patterns/McSideBar/McSideBarTop/McSideBarTop.vue.d.ts +0 -123
  291. package/dist/components/patterns/McTab/McTab.vue.d.ts +0 -224
  292. package/dist/components/templates/McDrawer/McDrawer.vue.d.ts +0 -104
  293. package/dist/components/templates/McTable/McTable/McTable.vue.d.ts +0 -295
  294. package/dist/components/templates/McTable/McTableSkeletonLoading/McTableSkeletonLoading.vue.d.ts +0 -18
  295. package/dist/composables/useFieldErrors.d.ts +0 -5
  296. package/dist/index.d.ts +0 -9
  297. package/dist/main.d.ts +0 -0
  298. package/dist/mocks/icons.json.d.ts +0 -3
  299. /package/dist/{composables → types/composables}/useEncodeDecode.d.ts +0 -0
  300. /package/dist/{composables → types/composables}/useHelper.d.ts +0 -0
  301. /package/dist/{composables → types/composables}/useModal.d.ts +0 -0
  302. /package/dist/{composables → types/composables}/useRandomNumber.d.ts +0 -0
  303. /package/dist/{consts → types/consts}/table.d.ts +0 -0
  304. /package/dist/{enums → types/enums}/Cell.d.ts +0 -0
  305. /package/dist/{enums → types/enums}/Chip.d.ts +0 -0
  306. /package/dist/{enums → types/enums}/Datepicker.d.ts +0 -0
  307. /package/dist/{enums → types/enums}/Drawer.d.ts +0 -0
  308. /package/dist/{enums → types/enums}/Dropdown.d.ts +0 -0
  309. /package/dist/{enums → types/enums}/Filter.d.ts +0 -0
  310. /package/dist/{enums → types/enums}/Grid.d.ts +0 -0
  311. /package/dist/{enums → types/enums}/Input.d.ts +0 -0
  312. /package/dist/{enums → types/enums}/Modal.d.ts +0 -0
  313. /package/dist/{enums → types/enums}/Preview.d.ts +0 -0
  314. /package/dist/{enums → types/enums}/Radio.d.ts +0 -0
  315. /package/dist/{enums → types/enums}/RadioGroup.d.ts +0 -0
  316. /package/dist/{enums → types/enums}/Select.d.ts +0 -0
  317. /package/dist/{enums → types/enums}/Sidebar.d.ts +0 -0
  318. /package/dist/{enums → types/enums}/Tab.d.ts +0 -0
  319. /package/dist/{enums → types/enums}/Title.d.ts +0 -0
  320. /package/dist/{enums → types/enums}/Tooltip.d.ts +0 -0
  321. /package/dist/{enums → types/enums}/index.d.ts +0 -0
  322. /package/dist/{enums → types/enums}/ui/Alignment.d.ts +0 -0
  323. /package/dist/{enums → types/enums}/ui/Button.d.ts +0 -0
  324. /package/dist/{enums → types/enums}/ui/Directions.d.ts +0 -0
  325. /package/dist/{enums → types/enums}/ui/Weights.d.ts +0 -0
  326. /package/dist/{mocks → types/mocks}/authUser.d.ts +0 -0
  327. /package/dist/{mocks → types/mocks}/categories.d.ts +0 -0
  328. /package/dist/{mocks → types/mocks}/menuLangs.d.ts +0 -0
  329. /package/dist/types/{ICollapse.d.ts → types/ICollapse.d.ts} +0 -0
  330. /package/dist/types/{IGrid.d.ts → types/IGrid.d.ts} +0 -0
  331. /package/dist/types/{IRoute.d.ts → types/IRoute.d.ts} +0 -0
  332. /package/dist/types/{styles → types/styles}/AvatarSizes.d.ts +0 -0
  333. /package/dist/types/{styles → types/styles}/Colors.d.ts +0 -0
  334. /package/dist/types/{styles → types/styles}/Durations.d.ts +0 -0
  335. /package/dist/types/{styles → types/styles}/FontSizes.d.ts +0 -0
  336. /package/dist/types/{styles → types/styles}/FontWeights.d.ts +0 -0
  337. /package/dist/types/{styles → types/styles}/Icons.d.ts +0 -0
  338. /package/dist/types/{styles → types/styles}/LineHeights.d.ts +0 -0
  339. /package/dist/types/{styles → types/styles}/MediaQueries.d.ts +0 -0
  340. /package/dist/types/{styles → types/styles}/Radiuses.d.ts +0 -0
  341. /package/dist/types/{styles → types/styles}/Sizes.d.ts +0 -0
  342. /package/dist/types/{styles → types/styles}/Spaces.d.ts +0 -0
@@ -0,0 +1,1068 @@
1
+ import { Teleport } from 'vue';
2
+ import McSvgIcon from '@/components/elements/McSvgIcon/McSvgIcon.vue';
3
+ import McButton from '@/components/elements/McButton/McButton.vue';
4
+ import McTitle from '@/components/elements/McTitle/McTitle.vue';
5
+ import McFieldSelect from '@/components/elements/McFieldSelect/McFieldSelect.vue';
6
+ import McFieldText from '@/components/elements/McFieldText/McFieldText.vue';
7
+ import McTooltip from '@/components/elements/McTooltip/McTooltip.vue';
8
+ import McFilterTags from '@/components/patterns/McFilter/McFilterTags/McFilterTags.vue';
9
+ import McFilterTypeRange from '@/components/patterns/McFilter/McFilterTypeRange/McFilterTypeRange.vue';
10
+ import McFilterTypeDate from '@/components/patterns/McFilter/McFilterTypeDate/McFilterTypeDate.vue';
11
+ import McFilterTypeText from '@/components/patterns/McFilter/McFilterTypeText/McFilterTypeText.vue';
12
+ import McFilterTypeRelation from '@/components/patterns/McFilter/McFilterTypeRelation/McFilterTypeRelation.vue';
13
+ import McChip from '@/components/elements/McChip/McChip.vue';
14
+ import { defaultPlaceholders } from '@/mocks/filterMocks';
15
+ import { computed, onBeforeUnmount, onMounted, reactive, ref, watch, nextTick } from 'vue';
16
+ import { useHelper } from '@/composables/useHelper';
17
+ import { ButtonSize, ChipSize, FilterRelations, FilterTypes, TooltipPositions, TooltipSizes } from '@/enums';
18
+ import { useLocalStorage } from '@vueuse/core';
19
+ import { UseEncodeDecode } from '@/composables/useEncodeDecode';
20
+ const { defineProps, defineSlots, defineEmits, defineExpose, defineModel, defineOptions, withDefaults, } = await import('vue');
21
+ const helper = useHelper();
22
+ const emit = defineEmits();
23
+ const props = defineProps({
24
+ /**
25
+ * Имя фильтра
26
+ * (для записи данных в стор)
27
+ */
28
+ name: {
29
+ type: String,
30
+ required: true
31
+ },
32
+ /**
33
+ * Значение фильтра
34
+ */
35
+ modelValue: {
36
+ type: Object,
37
+ required: true,
38
+ default: () => ({ filter: null, filter_name: null })
39
+ },
40
+ /**
41
+ * Типы фильтров
42
+ */
43
+ filters: {
44
+ type: Array,
45
+ required: true,
46
+ default: () => []
47
+ },
48
+ /**
49
+ * Лоадинг кнопки применить фильтр
50
+ */
51
+ buttonConfirmIsLoading: {
52
+ type: Boolean,
53
+ default: false
54
+ },
55
+ /**
56
+ * Использовать ли teleport (для рендеринга вне компонента)
57
+ * Если да то необходимо создать блок с id="filterTeleportTarget" в который будет рендериться тело фильтра
58
+ */
59
+ useTeleport: {
60
+ type: Boolean,
61
+ default: false
62
+ },
63
+ /**
64
+ * Доступен ли фильтр для открытия
65
+ */
66
+ disabledOpen: {
67
+ type: Boolean,
68
+ default: false
69
+ },
70
+ /**
71
+ * Нужно ли учитывать часовой пояс при работе с фильтром типа Date
72
+ * */
73
+ useTimezone: {
74
+ type: Boolean,
75
+ default: false
76
+ },
77
+ /**
78
+ * Переводы плейсхолеров и текстов
79
+ */
80
+ placeholders: {
81
+ type: Object,
82
+ default: () => ({})
83
+ }
84
+ });
85
+ const isOpen = ref(false);
86
+ // текущие значения фильтра filter / filter_name
87
+ const currentValues = ref({});
88
+ const currentValuesName = ref({});
89
+ //временные значения, до нажатия на кнопку применить фильтр
90
+ const temporaryFilter = ref({});
91
+ const temporaryFilterName = ref({});
92
+ // текущие выбранные значения в типе фильтра
93
+ const currentCondition = ref({});
94
+ const currentConditionName = ref({});
95
+ // значение выбранного фильтра из списка фильтров
96
+ const selectedOptionFilter = ref(null);
97
+ const activeTag = ref(null);
98
+ const placeholders = reactive(helper.deepMerge(defaultPlaceholders, props.placeholders));
99
+ const isDisableConfirmButton = computed(() => {
100
+ return helper.isEqual(computedModelValue.value.filter, currentValues.value);
101
+ });
102
+ const newPresetName = ref('');
103
+ const activePreset = ref(null);
104
+ const temporaryActivePreset = ref(null);
105
+ const filterLocalStorage = useLocalStorage('mcFilterPresets', {});
106
+ const presets = ref([]);
107
+ const computedModelValue = computed({
108
+ get() {
109
+ const { filter = null, filter_name = null } = props.modelValue || {};
110
+ return {
111
+ filter: filter,
112
+ filter_name: UseEncodeDecode.decode(filter_name)
113
+ };
114
+ },
115
+ set(val) {
116
+ const { filter = null, filter_name = {} } = val || {};
117
+ const payload = {
118
+ filter: filter,
119
+ filter_name: UseEncodeDecode.encode(filter_name)
120
+ };
121
+ emit('update:modelValue', payload);
122
+ }
123
+ });
124
+ // выбранный фильтр из списка фильтров
125
+ const currentFilter = computed(() => {
126
+ return props.filters.find((f) => String(f.value) === String(selectedOptionFilter.value)) || {};
127
+ });
128
+ const isCurrentComponentIsRelation = computed(() => {
129
+ return currentFilter.value?.type === FilterTypes.Relation;
130
+ });
131
+ const isCurrentComponentIsDate = computed(() => {
132
+ return currentFilter.value?.type === FilterTypes.Date;
133
+ });
134
+ const isCurrentComponentIsText = computed(() => {
135
+ return currentFilter.value?.type === FilterTypes.Text;
136
+ });
137
+ const isCurrentComponentIsRange = computed(() => {
138
+ return currentFilter.value?.type === FilterTypes.Range;
139
+ });
140
+ // отфильтрованные быстрые фильтры
141
+ const fastFilters = computed(() => {
142
+ const selected = (currentValues.value && Object.keys(currentValues.value)) || [];
143
+ return props.filters.filter((f) => f.type === FilterTypes.Fast && !selected.includes(f.value));
144
+ });
145
+ // отфильтрованные фильтры кроме быстрых
146
+ const regularFilters = computed(() => {
147
+ return props.filters.filter((f) => f.type !== FilterTypes.Fast);
148
+ });
149
+ const visibilityToggleVariation = computed(() => {
150
+ return isOpen.value || !isDisableConfirmButton.value ? 'purple-invert' : 'black-flat';
151
+ });
152
+ // видна ли кнопка добавить фильтр
153
+ const hasButtonAdd = computed(() => {
154
+ return (!helper.isEmpty(currentCondition.value) && !!currentFilter.value && currentFilter.value.type !== FilterTypes.Fast);
155
+ });
156
+ // задизэйблена ли кнопка создать, для пресетов
157
+ const buttonCreateIsDisable = computed(() => {
158
+ return !newPresetName.value.trim();
159
+ });
160
+ const init = () => {
161
+ temporaryFilter.value = computedModelValue.value.filter;
162
+ temporaryFilterName.value = computedModelValue.value.filter_name;
163
+ currentValues.value = computedModelValue.value.filter;
164
+ currentValuesName.value = computedModelValue.value.filter_name;
165
+ };
166
+ onMounted(() => {
167
+ updatePresets();
168
+ window.addEventListener('storage', updatePresets);
169
+ init();
170
+ });
171
+ onBeforeUnmount(() => {
172
+ window.removeEventListener('storage', updatePresets);
173
+ });
174
+ const updatePresets = () => {
175
+ presets.value = filterLocalStorage.value[props.name] || [];
176
+ };
177
+ const handlerSetFastFilter = (tag) => {
178
+ const { relation, value } = tag;
179
+ const filterValue = relation ? { [relation]: tag.default } : tag.default;
180
+ selectedOptionFilter.value = value;
181
+ handleConditionChange({ value: filterValue, valueName: tag.name });
182
+ handleStoreTag();
183
+ };
184
+ const handleConditionChange = ({ value, valueName }) => {
185
+ currentCondition.value = value;
186
+ currentConditionName.value = valueName || '';
187
+ };
188
+ const handleStoreTag = () => {
189
+ activeTag.value ? editTag() : addTag();
190
+ };
191
+ const editTag = () => {
192
+ switch (currentFilter.value?.type) {
193
+ case FilterTypes.Relation: {
194
+ editRelationValue();
195
+ break;
196
+ }
197
+ default: {
198
+ addSimpleValue();
199
+ break;
200
+ }
201
+ }
202
+ activeTag.value = null;
203
+ };
204
+ const addTag = () => {
205
+ switch (currentFilter.value?.type) {
206
+ case FilterTypes.Relation: {
207
+ addRelationValue();
208
+ break;
209
+ }
210
+ default: {
211
+ addSimpleValue();
212
+ break;
213
+ }
214
+ }
215
+ activeTag.value = null;
216
+ };
217
+ const editRelationValue = () => {
218
+ if (activeTag.value) {
219
+ const tagRelationValue = activeTag.value.relationKey === FilterRelations.Exists ? [0] : [activeTag.value.value];
220
+ const tagRelation = {
221
+ [activeTag.value.category]: {
222
+ [activeTag.value.relationKey]: tagRelationValue
223
+ }
224
+ };
225
+ const selectedRelation = {
226
+ [selectedOptionFilter.value]: helper.cloneDeep(currentCondition.value)
227
+ };
228
+ if (helper.isEqual(selectedRelation, tagRelation)) {
229
+ /**
230
+ * Событие по возникшей ошибке
231
+ */
232
+ emit('error', placeholders.messages.same_filter);
233
+ return;
234
+ }
235
+ }
236
+ const { category, categoryName } = getCategoriesWithNewRelation();
237
+ if (activeTag.value) {
238
+ if (activeTag.value.relationKey === FilterRelations.Exists) {
239
+ delete category[activeTag.value.relationKey];
240
+ delete categoryName[activeTag.value.relationKey];
241
+ }
242
+ else {
243
+ const numerableValues = category[activeTag.value.relationKey];
244
+ const index = numerableValues?.indexOf(String(activeTag.value.value)) ?? -1;
245
+ if (index !== -1) {
246
+ category?.[activeTag.value.relationKey]?.splice(index, 1);
247
+ helper.isEmpty(category[activeTag.value.relationKey]) && delete category[activeTag.value.relationKey];
248
+ delete categoryName?.[activeTag.value.relationKey]?.[activeTag.value.value];
249
+ helper.isEmpty(categoryName[activeTag.value.relationKey]) && delete categoryName[activeTag.value.relationKey];
250
+ }
251
+ }
252
+ }
253
+ setFilterValues(category, categoryName);
254
+ };
255
+ const addRelationValue = () => {
256
+ const { category, categoryName } = getCategoriesWithNewRelation();
257
+ setFilterValues(category, categoryName);
258
+ };
259
+ const getCategoriesWithNewRelation = () => {
260
+ const relationKeys = Object.keys(currentCondition.value);
261
+ const values = helper.cloneDeep(currentValues.value);
262
+ const valuesName = helper.cloneDeep(currentValuesName.value);
263
+ const selectedCategory = values[selectedOptionFilter.value];
264
+ const selectedCategoryName = valuesName[selectedOptionFilter.value];
265
+ selectedCategory &&
266
+ relationKeys.forEach((k) => {
267
+ if (k === FilterRelations.Exists) {
268
+ selectedCategory[FilterRelations.Exists] = 0;
269
+ selectedCategoryName[FilterRelations.Exists] = null;
270
+ }
271
+ else {
272
+ //@ts-ignore
273
+ const conditionValue = currentCondition.value[k];
274
+ //@ts-ignore
275
+ const conditionName = currentConditionName.value[k];
276
+ if (k in selectedCategory) {
277
+ //@ts-ignore
278
+ selectedCategory[k] = helper.uniqWith([...selectedCategory[k], ...conditionValue], helper.isEqual);
279
+ selectedCategoryName[k] = {
280
+ ...selectedCategoryName[k],
281
+ ...conditionName
282
+ };
283
+ }
284
+ else {
285
+ selectedCategory[k] = conditionValue;
286
+ selectedCategoryName[k] = conditionName;
287
+ }
288
+ }
289
+ });
290
+ return { category: selectedCategory, categoryName: selectedCategoryName };
291
+ };
292
+ const setFilterValues = (val, valName) => {
293
+ const newVal = {
294
+ ...currentValues.value,
295
+ [selectedOptionFilter.value]: val || currentCondition.value
296
+ };
297
+ if (helper.isEqual(currentValues.value, newVal)) {
298
+ /**
299
+ * Событие по возникшей ошибке
300
+ */
301
+ emit('error', placeholders.messages.same_filter);
302
+ return;
303
+ }
304
+ currentValues.value = newVal;
305
+ currentValuesName.value = {
306
+ ...currentValuesName.value,
307
+ [selectedOptionFilter.value]: valName || currentConditionName.value
308
+ };
309
+ setEmptyCondition();
310
+ };
311
+ const setEmptyCondition = () => {
312
+ switch (currentFilter.value?.type) {
313
+ case FilterTypes.Text:
314
+ case FilterTypes.Relation:
315
+ handleConditionChange({ value: '' });
316
+ break;
317
+ case FilterTypes.Range:
318
+ case FilterTypes.Date:
319
+ handleConditionChange({ value: {} });
320
+ break;
321
+ default:
322
+ break;
323
+ }
324
+ };
325
+ const addSimpleValue = () => {
326
+ if (currentFilter.value?.type === FilterTypes.Range && Object.keys(currentCondition.value || {}).length === 2) {
327
+ const _currentCondition = currentCondition.value;
328
+ if (_currentCondition.more && _currentCondition.less && _currentCondition.more > _currentCondition.less) {
329
+ /**
330
+ * Событие по возникшей ошибке
331
+ */
332
+ emit('error', placeholders.messages.more_than);
333
+ return;
334
+ }
335
+ }
336
+ setFilterValues(currentCondition.value, currentCondition.value);
337
+ };
338
+ const onTagsChange = (val) => {
339
+ activeTag.value = null;
340
+ if (helper.isEmpty(val)) {
341
+ currentValues.value = {};
342
+ currentValuesName.value = {};
343
+ return;
344
+ }
345
+ currentValuesName.value = helper.cloneDeep(val);
346
+ setRelationsToArrayFormat(val);
347
+ };
348
+ const handleClearAllTags = () => {
349
+ temporaryFilter.value = {};
350
+ temporaryFilterName.value = {};
351
+ currentValues.value = {};
352
+ currentValuesName.value = {};
353
+ /**
354
+ * Событие по очистке выбранных фильтров из поля
355
+ */
356
+ emit('clear', placeholders.messages.accidentally_cleared);
357
+ };
358
+ const setRelationsToArrayFormat = (obj) => {
359
+ const newObj = helper.cloneDeep(obj);
360
+ const relationKeys = [FilterRelations.Is, FilterRelations.IsNot];
361
+ for (let [categoryKey, categoryVal] of Object.entries(obj)) {
362
+ if (categoryVal.constructor === Object) {
363
+ for (let [key, val] of Object.entries(categoryVal)) {
364
+ if (relationKeys.includes(key) && val?.constructor === Object) {
365
+ newObj[categoryKey][key] = [...Object.keys(val)];
366
+ }
367
+ }
368
+ }
369
+ }
370
+ currentValues.value = newObj;
371
+ };
372
+ const onTagClick = (tag) => {
373
+ activeTag.value = (helper.isEqual(activeTag.value, tag) ? null : tag);
374
+ if (!activeTag.value) {
375
+ setEmptyCondition();
376
+ return;
377
+ }
378
+ let condition = null;
379
+ let conditionName = null;
380
+ if (tag.relationKey) {
381
+ condition = {
382
+ [tag.relationKey]: tag.relationKey === FilterRelations.Exists ? [0] : [String(tag.value)]
383
+ };
384
+ conditionName = {
385
+ [tag.relationKey]: tag.relationKey === FilterRelations.Exists ? [0] : { [tag.value]: tag.title }
386
+ };
387
+ }
388
+ else {
389
+ condition = tag.value?.constructor === Object ? tag.value : String(tag.value);
390
+ conditionName = tag.value;
391
+ }
392
+ selectedOptionFilter.value = tag.category;
393
+ nextTick(() => {
394
+ currentCondition.value = condition;
395
+ currentConditionName.value = conditionName;
396
+ });
397
+ };
398
+ const handleConfirm = () => {
399
+ /**
400
+ * Событие по изменению значения фильтра
401
+ */
402
+ computedModelValue.value = {
403
+ filter: currentValues.value,
404
+ filter_name: currentValuesName.value
405
+ };
406
+ const payload = {
407
+ filter: currentValues.value,
408
+ filter_name: UseEncodeDecode.encode(currentValuesName.value)
409
+ };
410
+ emit('confirm', payload);
411
+ };
412
+ /**
413
+ * PRESETS BELOW
414
+ * */
415
+ const handlePresetMouseUp = (preset) => {
416
+ if (activePreset.value && activePreset.value.name === preset.name) {
417
+ activePreset.value = null;
418
+ currentValues.value = {};
419
+ currentValuesName.value = {};
420
+ }
421
+ else {
422
+ activePreset.value = preset;
423
+ currentValues.value = helper.cloneDeep(preset.filter);
424
+ currentValuesName.value = helper.cloneDeep(preset.filter_name);
425
+ }
426
+ if (!isOpen.value) {
427
+ handleConfirm();
428
+ }
429
+ };
430
+ const handleDeletePreset = (preset) => {
431
+ const filteredPresets = filterLocalStorage.value[props.name]?.filter((p) => preset && p.name !== preset.name);
432
+ filterLocalStorage.value[props.name] = [...filteredPresets];
433
+ temporaryActivePreset.value = helper.cloneDeep(activePreset.value);
434
+ activePreset.value = null;
435
+ currentValues.value = {};
436
+ currentValuesName.value = {};
437
+ /**
438
+ * Событие по удалению пресета
439
+ */
440
+ emit('delete-preset', placeholders.messages.accidentally_deleted);
441
+ };
442
+ const handleCreatePreset = () => {
443
+ if (filterLocalStorage.value[props.name] &&
444
+ filterLocalStorage.value[props.name].find((p) => p.name?.trim() === newPresetName.value?.trim())) {
445
+ emit('error', placeholders.messages.same_preset_name);
446
+ return;
447
+ }
448
+ const preset = {
449
+ name: newPresetName.value?.trim(),
450
+ filter: helper.cloneDeep(currentValues.value),
451
+ filter_name: helper.cloneDeep(currentValuesName.value)
452
+ };
453
+ const currentPreset = filterLocalStorage.value[props.name];
454
+ if (currentPreset) {
455
+ filterLocalStorage.value[props.name] = [preset, ...currentPreset];
456
+ }
457
+ else {
458
+ filterLocalStorage.value[props.name] = [preset];
459
+ }
460
+ newPresetName.value = '';
461
+ activePreset.value = { ...preset };
462
+ };
463
+ const getPresetButtonVariation = (preset) => {
464
+ return activePreset.value && activePreset.value.name === preset.name ? 'purple-invert' : 'gray-outline';
465
+ };
466
+ watch(() => props.modelValue, (val) => {
467
+ const filter_value = val || {
468
+ filter: null,
469
+ filter_name: null
470
+ };
471
+ currentValues.value = { ...filter_value.filter };
472
+ if (filter_value.filter_name) {
473
+ try {
474
+ currentValuesName.value = UseEncodeDecode.decode(filter_value.filter_name);
475
+ }
476
+ catch (e) {
477
+ console.error(`Can't parse filters`);
478
+ }
479
+ }
480
+ }, { deep: true });
481
+ watch(() => currentFilter.value, () => {
482
+ handleConditionChange({ value: '' });
483
+ }, { deep: true });
484
+ watch(() => currentValues.value, () => {
485
+ if (activePreset.value) {
486
+ const mappedPresets = filterLocalStorage.value[props.name].map((p) => {
487
+ if (activePreset.value && p.name === activePreset.value.name) {
488
+ return {
489
+ name: p.name,
490
+ filter: helper.cloneDeep(currentValues.value),
491
+ filter_name: helper.cloneDeep(currentValuesName.value)
492
+ };
493
+ }
494
+ return p;
495
+ });
496
+ filterLocalStorage.value[props.name] = [...mappedPresets];
497
+ }
498
+ }); /* PartiallyEnd: #3632/scriptSetup.vue */
499
+ const __VLS_fnComponent = (await import('vue')).defineComponent({
500
+ props: {
501
+ /**
502
+ * Имя фильтра
503
+ * (для записи данных в стор)
504
+ */
505
+ name: {
506
+ type: String,
507
+ required: true
508
+ },
509
+ /**
510
+ * Значение фильтра
511
+ */
512
+ modelValue: {
513
+ type: Object,
514
+ required: true,
515
+ default: () => ({ filter: null, filter_name: null })
516
+ },
517
+ /**
518
+ * Типы фильтров
519
+ */
520
+ filters: {
521
+ type: Array,
522
+ required: true,
523
+ default: () => []
524
+ },
525
+ /**
526
+ * Лоадинг кнопки применить фильтр
527
+ */
528
+ buttonConfirmIsLoading: {
529
+ type: Boolean,
530
+ default: false
531
+ },
532
+ /**
533
+ * Использовать ли teleport (для рендеринга вне компонента)
534
+ * Если да то необходимо создать блок с id="filterTeleportTarget" в который будет рендериться тело фильтра
535
+ */
536
+ useTeleport: {
537
+ type: Boolean,
538
+ default: false
539
+ },
540
+ /**
541
+ * Доступен ли фильтр для открытия
542
+ */
543
+ disabledOpen: {
544
+ type: Boolean,
545
+ default: false
546
+ },
547
+ /**
548
+ * Нужно ли учитывать часовой пояс при работе с фильтром типа Date
549
+ * */
550
+ useTimezone: {
551
+ type: Boolean,
552
+ default: false
553
+ },
554
+ /**
555
+ * Переводы плейсхолеров и текстов
556
+ */
557
+ placeholders: {
558
+ type: Object,
559
+ default: () => ({})
560
+ }
561
+ },
562
+ __typeEmits: {},
563
+ });
564
+ ;
565
+ let __VLS_functionalComponentProps;
566
+ function __VLS_template() {
567
+ const __VLS_ctx = {};
568
+ const __VLS_localComponents = {
569
+ ...{},
570
+ ...{},
571
+ ...__VLS_ctx,
572
+ };
573
+ let __VLS_components;
574
+ const __VLS_localDirectives = {
575
+ ...{},
576
+ ...__VLS_ctx,
577
+ };
578
+ let __VLS_directives;
579
+ let __VLS_styleScopedClasses;
580
+ // CSS variable injection
581
+ // CSS variable injection end
582
+ let __VLS_resolvedLocalAndGlobalComponents;
583
+ __VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-filter") }, });
584
+ __VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-filter__header") }, });
585
+ // @ts-ignore
586
+ [McTooltip, McTooltip,];
587
+ // @ts-ignore
588
+ const __VLS_0 = __VLS_asFunctionalComponent(McTooltip, new McTooltip({ content: ((__VLS_ctx.placeholders.main_tooltip)), placement: ((__VLS_ctx.TooltipPositions.Top)), size: ((__VLS_ctx.TooltipSizes.S)), }));
589
+ const __VLS_1 = __VLS_0({ content: ((__VLS_ctx.placeholders.main_tooltip)), placement: ((__VLS_ctx.TooltipPositions.Top)), size: ((__VLS_ctx.TooltipSizes.S)), }, ...__VLS_functionalComponentArgsRest(__VLS_0));
590
+ // @ts-ignore
591
+ [McButton, McButton,];
592
+ // @ts-ignore
593
+ const __VLS_5 = __VLS_asFunctionalComponent(McButton, new McButton({ ...{ 'onClick': {} }, variation: ((__VLS_ctx.visibilityToggleVariation)), disabled: ((__VLS_ctx.disabledOpen)), bgFlat: ((__VLS_ctx.isOpen)), size: ((__VLS_ctx.ButtonSize.MCompact)), }));
594
+ const __VLS_6 = __VLS_5({ ...{ 'onClick': {} }, variation: ((__VLS_ctx.visibilityToggleVariation)), disabled: ((__VLS_ctx.disabledOpen)), bgFlat: ((__VLS_ctx.isOpen)), size: ((__VLS_ctx.ButtonSize.MCompact)), }, ...__VLS_functionalComponentArgsRest(__VLS_5));
595
+ let __VLS_10;
596
+ const __VLS_11 = {
597
+ onClick: (...[$event]) => {
598
+ __VLS_ctx.isOpen = !__VLS_ctx.isOpen;
599
+ }
600
+ };
601
+ let __VLS_7;
602
+ let __VLS_8;
603
+ __VLS_elementAsFunction(__VLS_intrinsicElements.template, __VLS_intrinsicElements.template)({});
604
+ {
605
+ const { "icon-prepend": __VLS_thisSlot } = __VLS_nonNullable(__VLS_9.slots);
606
+ // @ts-ignore
607
+ [McSvgIcon,];
608
+ // @ts-ignore
609
+ const __VLS_12 = __VLS_asFunctionalComponent(McSvgIcon, new McSvgIcon({ name: ("filter_list"), }));
610
+ const __VLS_13 = __VLS_12({ name: ("filter_list"), }, ...__VLS_functionalComponentArgsRest(__VLS_12));
611
+ }
612
+ var __VLS_9;
613
+ __VLS_nonNullable(__VLS_4.slots).default;
614
+ var __VLS_4;
615
+ if (__VLS_ctx.presets) {
616
+ __VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-filter__presets") }, });
617
+ __VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-filter__presets-inner") }, });
618
+ for (const [preset] of __VLS_getVForSourceType((__VLS_ctx.presets))) {
619
+ // @ts-ignore
620
+ [McButton, McButton,];
621
+ // @ts-ignore
622
+ const __VLS_17 = __VLS_asFunctionalComponent(McButton, new McButton({ ...{ 'onMouseup': {} }, key: ((preset.name)), variation: ((__VLS_ctx.getPresetButtonVariation(preset))), secondaryColor: ("purple"), }));
623
+ const __VLS_18 = __VLS_17({ ...{ 'onMouseup': {} }, key: ((preset.name)), variation: ((__VLS_ctx.getPresetButtonVariation(preset))), secondaryColor: ("purple"), }, ...__VLS_functionalComponentArgsRest(__VLS_17));
624
+ let __VLS_22;
625
+ const __VLS_23 = {
626
+ onMouseup: (() => __VLS_ctx.handlePresetMouseUp(preset))
627
+ };
628
+ let __VLS_19;
629
+ let __VLS_20;
630
+ (preset.name);
631
+ __VLS_nonNullable(__VLS_21.slots).default;
632
+ var __VLS_21;
633
+ }
634
+ }
635
+ if (__VLS_ctx.isOpen) {
636
+ const __VLS_24 = ((__VLS_ctx.useTeleport ? __VLS_ctx.Teleport : 'div'));
637
+ // @ts-ignore
638
+ const __VLS_25 = __VLS_asFunctionalComponent(__VLS_24, new __VLS_24({ to: ("#filterTeleportTarget"), }));
639
+ const __VLS_26 = __VLS_25({ to: ("#filterTeleportTarget"), }, ...__VLS_functionalComponentArgsRest(__VLS_25));
640
+ __VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-filter__body") }, });
641
+ __VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-filter__body-top") }, });
642
+ __VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-filter__body-top-left") }, });
643
+ // @ts-ignore
644
+ [McFieldSelect,];
645
+ // @ts-ignore
646
+ const __VLS_30 = __VLS_asFunctionalComponent(McFieldSelect, new McFieldSelect({ modelValue: ((__VLS_ctx.selectedOptionFilter)), title: ((__VLS_ctx.placeholders.value)), options: ((__VLS_ctx.regularFilters)), placeholder: ((__VLS_ctx.placeholders.choose)), hideSelected: ((false)), ...{ class: ("mc-filter__main-select") }, name: ("filter_value_name"), }));
647
+ const __VLS_31 = __VLS_30({ modelValue: ((__VLS_ctx.selectedOptionFilter)), title: ((__VLS_ctx.placeholders.value)), options: ((__VLS_ctx.regularFilters)), placeholder: ((__VLS_ctx.placeholders.choose)), hideSelected: ((false)), ...{ class: ("mc-filter__main-select") }, name: ("filter_value_name"), }, ...__VLS_functionalComponentArgsRest(__VLS_30));
648
+ if (__VLS_ctx.currentFilter) {
649
+ if (__VLS_ctx.isCurrentComponentIsRelation) {
650
+ // @ts-ignore
651
+ [McFilterTypeRelation,];
652
+ // @ts-ignore
653
+ const __VLS_35 = __VLS_asFunctionalComponent(McFilterTypeRelation, new McFilterTypeRelation({ ...{ 'onUpdate:modelValue': {} }, modelValue: __VLS_ctx.currentCondition, filter: __VLS_ctx.currentFilter, placeholders: ((__VLS_ctx.placeholders)), currentValues: ((!__VLS_ctx.activeTag ? __VLS_ctx.currentValues : {})), useTimezone: ((props.useTimezone)), }));
654
+ const __VLS_36 = __VLS_35({ ...{ 'onUpdate:modelValue': {} }, modelValue: __VLS_ctx.currentCondition, filter: __VLS_ctx.currentFilter, placeholders: ((__VLS_ctx.placeholders)), currentValues: ((!__VLS_ctx.activeTag ? __VLS_ctx.currentValues : {})), useTimezone: ((props.useTimezone)), }, ...__VLS_functionalComponentArgsRest(__VLS_35));
655
+ let __VLS_40;
656
+ const __VLS_41 = {
657
+ 'onUpdate:modelValue': (__VLS_ctx.handleConditionChange)
658
+ };
659
+ let __VLS_37;
660
+ let __VLS_38;
661
+ var __VLS_39;
662
+ }
663
+ else if (__VLS_ctx.isCurrentComponentIsDate) {
664
+ // @ts-ignore
665
+ [McFilterTypeDate,];
666
+ // @ts-ignore
667
+ const __VLS_42 = __VLS_asFunctionalComponent(McFilterTypeDate, new McFilterTypeDate({ ...{ 'onUpdate:modelValue': {} }, modelValue: __VLS_ctx.currentCondition, filter: __VLS_ctx.currentFilter, placeholders: ((__VLS_ctx.placeholders)), currentValues: ((!__VLS_ctx.activeTag ? __VLS_ctx.currentValues : {})), useTimezone: ((props.useTimezone)), }));
668
+ const __VLS_43 = __VLS_42({ ...{ 'onUpdate:modelValue': {} }, modelValue: __VLS_ctx.currentCondition, filter: __VLS_ctx.currentFilter, placeholders: ((__VLS_ctx.placeholders)), currentValues: ((!__VLS_ctx.activeTag ? __VLS_ctx.currentValues : {})), useTimezone: ((props.useTimezone)), }, ...__VLS_functionalComponentArgsRest(__VLS_42));
669
+ let __VLS_47;
670
+ const __VLS_48 = {
671
+ 'onUpdate:modelValue': (__VLS_ctx.handleConditionChange)
672
+ };
673
+ let __VLS_44;
674
+ let __VLS_45;
675
+ var __VLS_46;
676
+ }
677
+ else if (__VLS_ctx.isCurrentComponentIsText) {
678
+ // @ts-ignore
679
+ [McFilterTypeText,];
680
+ // @ts-ignore
681
+ const __VLS_49 = __VLS_asFunctionalComponent(McFilterTypeText, new McFilterTypeText({ ...{ 'onUpdate:modelValue': {} }, modelValue: __VLS_ctx.currentCondition, filter: __VLS_ctx.currentFilter, placeholders: ((__VLS_ctx.placeholders)), currentValues: ((!__VLS_ctx.activeTag ? __VLS_ctx.currentValues : {})), useTimezone: ((props.useTimezone)), }));
682
+ const __VLS_50 = __VLS_49({ ...{ 'onUpdate:modelValue': {} }, modelValue: __VLS_ctx.currentCondition, filter: __VLS_ctx.currentFilter, placeholders: ((__VLS_ctx.placeholders)), currentValues: ((!__VLS_ctx.activeTag ? __VLS_ctx.currentValues : {})), useTimezone: ((props.useTimezone)), }, ...__VLS_functionalComponentArgsRest(__VLS_49));
683
+ let __VLS_54;
684
+ const __VLS_55 = {
685
+ 'onUpdate:modelValue': (__VLS_ctx.handleConditionChange)
686
+ };
687
+ let __VLS_51;
688
+ let __VLS_52;
689
+ var __VLS_53;
690
+ }
691
+ else if (__VLS_ctx.isCurrentComponentIsRange) {
692
+ // @ts-ignore
693
+ [McFilterTypeRange,];
694
+ // @ts-ignore
695
+ const __VLS_56 = __VLS_asFunctionalComponent(McFilterTypeRange, new McFilterTypeRange({ ...{ 'onUpdate:modelValue': {} }, modelValue: __VLS_ctx.currentCondition, filter: __VLS_ctx.currentFilter, placeholders: ((__VLS_ctx.placeholders)), currentValues: ((!__VLS_ctx.activeTag ? __VLS_ctx.currentValues : {})), useTimezone: ((props.useTimezone)), }));
696
+ const __VLS_57 = __VLS_56({ ...{ 'onUpdate:modelValue': {} }, modelValue: __VLS_ctx.currentCondition, filter: __VLS_ctx.currentFilter, placeholders: ((__VLS_ctx.placeholders)), currentValues: ((!__VLS_ctx.activeTag ? __VLS_ctx.currentValues : {})), useTimezone: ((props.useTimezone)), }, ...__VLS_functionalComponentArgsRest(__VLS_56));
697
+ let __VLS_61;
698
+ const __VLS_62 = {
699
+ 'onUpdate:modelValue': (__VLS_ctx.handleConditionChange)
700
+ };
701
+ let __VLS_58;
702
+ let __VLS_59;
703
+ var __VLS_60;
704
+ }
705
+ if (__VLS_ctx.hasButtonAdd) {
706
+ // @ts-ignore
707
+ [McButton, McButton,];
708
+ // @ts-ignore
709
+ const __VLS_63 = __VLS_asFunctionalComponent(McButton, new McButton({ ...{ 'onClick': {} }, variation: ("purple-outline"), }));
710
+ const __VLS_64 = __VLS_63({ ...{ 'onClick': {} }, variation: ("purple-outline"), }, ...__VLS_functionalComponentArgsRest(__VLS_63));
711
+ let __VLS_68;
712
+ const __VLS_69 = {
713
+ onClick: (__VLS_ctx.handleStoreTag)
714
+ };
715
+ let __VLS_65;
716
+ let __VLS_66;
717
+ (__VLS_ctx.placeholders.actions[__VLS_ctx.activeTag ? 'save' : 'add']);
718
+ __VLS_nonNullable(__VLS_67.slots).default;
719
+ var __VLS_67;
720
+ }
721
+ }
722
+ // @ts-ignore
723
+ [McFilterTags,];
724
+ // @ts-ignore
725
+ const __VLS_70 = __VLS_asFunctionalComponent(McFilterTags, new McFilterTags({ ...{ 'onTagChange': {} }, ...{ 'onTagClick': {} }, ...{ 'onClear': {} }, modelValue: ((__VLS_ctx.currentValuesName)), filters: ((__VLS_ctx.filters)), placeholders: ((__VLS_ctx.placeholders)), activeTag: ((__VLS_ctx.activeTag)), useTimezone: ((props.useTimezone)), }));
726
+ const __VLS_71 = __VLS_70({ ...{ 'onTagChange': {} }, ...{ 'onTagClick': {} }, ...{ 'onClear': {} }, modelValue: ((__VLS_ctx.currentValuesName)), filters: ((__VLS_ctx.filters)), placeholders: ((__VLS_ctx.placeholders)), activeTag: ((__VLS_ctx.activeTag)), useTimezone: ((props.useTimezone)), }, ...__VLS_functionalComponentArgsRest(__VLS_70));
727
+ let __VLS_75;
728
+ const __VLS_76 = {
729
+ onTagChange: ((payload) => __VLS_ctx.onTagsChange(payload))
730
+ };
731
+ const __VLS_77 = {
732
+ onTagClick: ((payload) => __VLS_ctx.onTagClick(payload))
733
+ };
734
+ const __VLS_78 = {
735
+ onClear: (__VLS_ctx.handleClearAllTags)
736
+ };
737
+ let __VLS_72;
738
+ let __VLS_73;
739
+ var __VLS_74;
740
+ __VLS_elementAsFunction(__VLS_intrinsicElements.section, __VLS_intrinsicElements.section)({ ...{ class: ("mc-filter__body-fast-tags-wrapper") }, });
741
+ for (const [tag, i] of __VLS_getVForSourceType((__VLS_ctx.fastFilters))) {
742
+ // @ts-ignore
743
+ [McTooltip, McTooltip,];
744
+ // @ts-ignore
745
+ const __VLS_79 = __VLS_asFunctionalComponent(McTooltip, new McTooltip({ key: ((i)), content: ((tag.description || '')), placement: ((__VLS_ctx.TooltipPositions.Top)), size: ((__VLS_ctx.TooltipSizes.S)), }));
746
+ const __VLS_80 = __VLS_79({ key: ((i)), content: ((tag.description || '')), placement: ((__VLS_ctx.TooltipPositions.Top)), size: ((__VLS_ctx.TooltipSizes.S)), }, ...__VLS_functionalComponentArgsRest(__VLS_79));
747
+ // @ts-ignore
748
+ [McChip, McChip,];
749
+ // @ts-ignore
750
+ const __VLS_84 = __VLS_asFunctionalComponent(McChip, new McChip({ ...{ 'onClick': {} }, variation: ("gray-outline"), textColor: ("black"), size: ((__VLS_ctx.ChipSize.S)), }));
751
+ const __VLS_85 = __VLS_84({ ...{ 'onClick': {} }, variation: ("gray-outline"), textColor: ("black"), size: ((__VLS_ctx.ChipSize.S)), }, ...__VLS_functionalComponentArgsRest(__VLS_84));
752
+ let __VLS_89;
753
+ const __VLS_90 = {
754
+ onClick: (...[$event]) => {
755
+ if (!((__VLS_ctx.isOpen)))
756
+ return;
757
+ __VLS_ctx.handlerSetFastFilter(tag);
758
+ }
759
+ };
760
+ let __VLS_86;
761
+ let __VLS_87;
762
+ (tag.name);
763
+ __VLS_nonNullable(__VLS_88.slots).default;
764
+ var __VLS_88;
765
+ __VLS_nonNullable(__VLS_83.slots).default;
766
+ var __VLS_83;
767
+ }
768
+ __VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-filter__body-bottom") }, });
769
+ __VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-filter__body-bottom-left") }, });
770
+ // @ts-ignore
771
+ [McButton, McButton,];
772
+ // @ts-ignore
773
+ const __VLS_91 = __VLS_asFunctionalComponent(McButton, new McButton({ ...{ 'onClick': {} }, disabled: ((__VLS_ctx.isDisableConfirmButton)), loading: ((__VLS_ctx.buttonConfirmIsLoading)), size: ((__VLS_ctx.ButtonSize.S)), }));
774
+ const __VLS_92 = __VLS_91({ ...{ 'onClick': {} }, disabled: ((__VLS_ctx.isDisableConfirmButton)), loading: ((__VLS_ctx.buttonConfirmIsLoading)), size: ((__VLS_ctx.ButtonSize.S)), }, ...__VLS_functionalComponentArgsRest(__VLS_91));
775
+ let __VLS_96;
776
+ const __VLS_97 = {
777
+ onClick: (__VLS_ctx.handleConfirm)
778
+ };
779
+ let __VLS_93;
780
+ let __VLS_94;
781
+ (__VLS_ctx.placeholders.actions.confirm);
782
+ __VLS_nonNullable(__VLS_95.slots).default;
783
+ var __VLS_95;
784
+ if (__VLS_ctx.activePreset) {
785
+ // @ts-ignore
786
+ [McButton, McButton,];
787
+ // @ts-ignore
788
+ const __VLS_98 = __VLS_asFunctionalComponent(McButton, new McButton({ ...{ 'onClick': {} }, variation: ("red-outline"), size: ((__VLS_ctx.ButtonSize.S)), }));
789
+ const __VLS_99 = __VLS_98({ ...{ 'onClick': {} }, variation: ("red-outline"), size: ((__VLS_ctx.ButtonSize.S)), }, ...__VLS_functionalComponentArgsRest(__VLS_98));
790
+ let __VLS_103;
791
+ const __VLS_104 = {
792
+ onClick: (() => __VLS_ctx.handleDeletePreset(__VLS_ctx.activePreset))
793
+ };
794
+ let __VLS_100;
795
+ let __VLS_101;
796
+ (__VLS_ctx.placeholders.actions.delete_preset);
797
+ __VLS_elementAsFunction(__VLS_intrinsicElements.template, __VLS_intrinsicElements.template)({});
798
+ {
799
+ const { "icon-append": __VLS_thisSlot } = __VLS_nonNullable(__VLS_102.slots);
800
+ // @ts-ignore
801
+ [McSvgIcon,];
802
+ // @ts-ignore
803
+ const __VLS_105 = __VLS_asFunctionalComponent(McSvgIcon, new McSvgIcon({ name: ("delete"), size: ("250"), color: ("red"), }));
804
+ const __VLS_106 = __VLS_105({ name: ("delete"), size: ("250"), color: ("red"), }, ...__VLS_functionalComponentArgsRest(__VLS_105));
805
+ }
806
+ var __VLS_102;
807
+ }
808
+ __VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-filter__body-bottom-right") }, });
809
+ // @ts-ignore
810
+ [McTitle, McTitle,];
811
+ // @ts-ignore
812
+ const __VLS_110 = __VLS_asFunctionalComponent(McTitle, new McTitle({ ...{ class: ("mc-filter__preset-input-title") }, }));
813
+ const __VLS_111 = __VLS_110({ ...{ class: ("mc-filter__preset-input-title") }, }, ...__VLS_functionalComponentArgsRest(__VLS_110));
814
+ (__VLS_ctx.placeholders.create_preset);
815
+ __VLS_elementAsFunction(__VLS_intrinsicElements.template, __VLS_intrinsicElements.template)({});
816
+ {
817
+ const { "icon-append": __VLS_thisSlot } = __VLS_nonNullable(__VLS_114.slots);
818
+ // @ts-ignore
819
+ [McTooltip, McTooltip,];
820
+ // @ts-ignore
821
+ const __VLS_115 = __VLS_asFunctionalComponent(McTooltip, new McTooltip({ content: ((__VLS_ctx.placeholders.enter_preset_tooltip)), placement: ((__VLS_ctx.TooltipPositions.Top)), size: ((__VLS_ctx.TooltipSizes.S)), }));
822
+ const __VLS_116 = __VLS_115({ content: ((__VLS_ctx.placeholders.enter_preset_tooltip)), placement: ((__VLS_ctx.TooltipPositions.Top)), size: ((__VLS_ctx.TooltipSizes.S)), }, ...__VLS_functionalComponentArgsRest(__VLS_115));
823
+ // @ts-ignore
824
+ [McSvgIcon,];
825
+ // @ts-ignore
826
+ const __VLS_120 = __VLS_asFunctionalComponent(McSvgIcon, new McSvgIcon({ name: ("help_solid"), size: ("250"), color: ("outline-gray"), }));
827
+ const __VLS_121 = __VLS_120({ name: ("help_solid"), size: ("250"), color: ("outline-gray"), }, ...__VLS_functionalComponentArgsRest(__VLS_120));
828
+ __VLS_nonNullable(__VLS_119.slots).default;
829
+ var __VLS_119;
830
+ }
831
+ var __VLS_114;
832
+ // @ts-ignore
833
+ [McFieldText,];
834
+ // @ts-ignore
835
+ const __VLS_125 = __VLS_asFunctionalComponent(McFieldText, new McFieldText({ modelValue: ((__VLS_ctx.newPresetName)), placeholder: ((__VLS_ctx.placeholders.enter_preset_name)), maxLength: ((20)), ...{ class: ("mc-filter__preset-input") }, name: ("preset_name"), }));
836
+ const __VLS_126 = __VLS_125({ modelValue: ((__VLS_ctx.newPresetName)), placeholder: ((__VLS_ctx.placeholders.enter_preset_name)), maxLength: ((20)), ...{ class: ("mc-filter__preset-input") }, name: ("preset_name"), }, ...__VLS_functionalComponentArgsRest(__VLS_125));
837
+ // @ts-ignore
838
+ [McButton, McButton,];
839
+ // @ts-ignore
840
+ const __VLS_130 = __VLS_asFunctionalComponent(McButton, new McButton({ ...{ 'onClick': {} }, disabled: ((__VLS_ctx.buttonCreateIsDisable)), variation: ("purple-outline"), size: ((__VLS_ctx.ButtonSize.S)), }));
841
+ const __VLS_131 = __VLS_130({ ...{ 'onClick': {} }, disabled: ((__VLS_ctx.buttonCreateIsDisable)), variation: ("purple-outline"), size: ((__VLS_ctx.ButtonSize.S)), }, ...__VLS_functionalComponentArgsRest(__VLS_130));
842
+ let __VLS_135;
843
+ const __VLS_136 = {
844
+ onClick: (__VLS_ctx.handleCreatePreset)
845
+ };
846
+ let __VLS_132;
847
+ let __VLS_133;
848
+ (__VLS_ctx.placeholders.actions.create);
849
+ __VLS_nonNullable(__VLS_134.slots).default;
850
+ var __VLS_134;
851
+ __VLS_nonNullable(__VLS_29.slots).default;
852
+ var __VLS_29;
853
+ }
854
+ __VLS_styleScopedClasses['mc-filter'];
855
+ __VLS_styleScopedClasses['mc-filter__header'];
856
+ __VLS_styleScopedClasses['mc-filter__presets'];
857
+ __VLS_styleScopedClasses['mc-filter__presets-inner'];
858
+ __VLS_styleScopedClasses['mc-filter__body'];
859
+ __VLS_styleScopedClasses['mc-filter__body-top'];
860
+ __VLS_styleScopedClasses['mc-filter__body-top-left'];
861
+ __VLS_styleScopedClasses['mc-filter__main-select'];
862
+ __VLS_styleScopedClasses['mc-filter__body-fast-tags-wrapper'];
863
+ __VLS_styleScopedClasses['mc-filter__body-bottom'];
864
+ __VLS_styleScopedClasses['mc-filter__body-bottom-left'];
865
+ __VLS_styleScopedClasses['mc-filter__body-bottom-right'];
866
+ __VLS_styleScopedClasses['mc-filter__preset-input-title'];
867
+ __VLS_styleScopedClasses['mc-filter__preset-input'];
868
+ var __VLS_slots;
869
+ var __VLS_inheritedAttrs;
870
+ const __VLS_refs = {};
871
+ var $refs;
872
+ var $el;
873
+ return {
874
+ attrs: {},
875
+ slots: __VLS_slots,
876
+ refs: $refs,
877
+ rootEl: $el,
878
+ };
879
+ }
880
+ ;
881
+ const __VLS_self = (await import('vue')).defineComponent({
882
+ setup() {
883
+ return {
884
+ Teleport: Teleport,
885
+ McSvgIcon: McSvgIcon,
886
+ McButton: McButton,
887
+ McTitle: McTitle,
888
+ McFieldSelect: McFieldSelect,
889
+ McFieldText: McFieldText,
890
+ McTooltip: McTooltip,
891
+ McFilterTags: McFilterTags,
892
+ McFilterTypeRange: McFilterTypeRange,
893
+ McFilterTypeDate: McFilterTypeDate,
894
+ McFilterTypeText: McFilterTypeText,
895
+ McFilterTypeRelation: McFilterTypeRelation,
896
+ McChip: McChip,
897
+ ButtonSize: ButtonSize,
898
+ ChipSize: ChipSize,
899
+ TooltipPositions: TooltipPositions,
900
+ TooltipSizes: TooltipSizes,
901
+ isOpen: isOpen,
902
+ currentValues: currentValues,
903
+ currentValuesName: currentValuesName,
904
+ currentCondition: currentCondition,
905
+ selectedOptionFilter: selectedOptionFilter,
906
+ activeTag: activeTag,
907
+ placeholders: placeholders,
908
+ isDisableConfirmButton: isDisableConfirmButton,
909
+ newPresetName: newPresetName,
910
+ activePreset: activePreset,
911
+ presets: presets,
912
+ currentFilter: currentFilter,
913
+ isCurrentComponentIsRelation: isCurrentComponentIsRelation,
914
+ isCurrentComponentIsDate: isCurrentComponentIsDate,
915
+ isCurrentComponentIsText: isCurrentComponentIsText,
916
+ isCurrentComponentIsRange: isCurrentComponentIsRange,
917
+ fastFilters: fastFilters,
918
+ regularFilters: regularFilters,
919
+ visibilityToggleVariation: visibilityToggleVariation,
920
+ hasButtonAdd: hasButtonAdd,
921
+ buttonCreateIsDisable: buttonCreateIsDisable,
922
+ handlerSetFastFilter: handlerSetFastFilter,
923
+ handleConditionChange: handleConditionChange,
924
+ handleStoreTag: handleStoreTag,
925
+ onTagsChange: onTagsChange,
926
+ handleClearAllTags: handleClearAllTags,
927
+ onTagClick: onTagClick,
928
+ handleConfirm: handleConfirm,
929
+ handlePresetMouseUp: handlePresetMouseUp,
930
+ handleDeletePreset: handleDeletePreset,
931
+ handleCreatePreset: handleCreatePreset,
932
+ getPresetButtonVariation: getPresetButtonVariation,
933
+ };
934
+ },
935
+ __typeEmits: {},
936
+ props: {
937
+ /**
938
+ * Имя фильтра
939
+ * (для записи данных в стор)
940
+ */
941
+ name: {
942
+ type: String,
943
+ required: true
944
+ },
945
+ /**
946
+ * Значение фильтра
947
+ */
948
+ modelValue: {
949
+ type: Object,
950
+ required: true,
951
+ default: () => ({ filter: null, filter_name: null })
952
+ },
953
+ /**
954
+ * Типы фильтров
955
+ */
956
+ filters: {
957
+ type: Array,
958
+ required: true,
959
+ default: () => []
960
+ },
961
+ /**
962
+ * Лоадинг кнопки применить фильтр
963
+ */
964
+ buttonConfirmIsLoading: {
965
+ type: Boolean,
966
+ default: false
967
+ },
968
+ /**
969
+ * Использовать ли teleport (для рендеринга вне компонента)
970
+ * Если да то необходимо создать блок с id="filterTeleportTarget" в который будет рендериться тело фильтра
971
+ */
972
+ useTeleport: {
973
+ type: Boolean,
974
+ default: false
975
+ },
976
+ /**
977
+ * Доступен ли фильтр для открытия
978
+ */
979
+ disabledOpen: {
980
+ type: Boolean,
981
+ default: false
982
+ },
983
+ /**
984
+ * Нужно ли учитывать часовой пояс при работе с фильтром типа Date
985
+ * */
986
+ useTimezone: {
987
+ type: Boolean,
988
+ default: false
989
+ },
990
+ /**
991
+ * Переводы плейсхолеров и текстов
992
+ */
993
+ placeholders: {
994
+ type: Object,
995
+ default: () => ({})
996
+ }
997
+ },
998
+ });
999
+ export default (await import('vue')).defineComponent({
1000
+ setup() {
1001
+ return {};
1002
+ },
1003
+ __typeEmits: {},
1004
+ props: {
1005
+ /**
1006
+ * Имя фильтра
1007
+ * (для записи данных в стор)
1008
+ */
1009
+ name: {
1010
+ type: String,
1011
+ required: true
1012
+ },
1013
+ /**
1014
+ * Значение фильтра
1015
+ */
1016
+ modelValue: {
1017
+ type: Object,
1018
+ required: true,
1019
+ default: () => ({ filter: null, filter_name: null })
1020
+ },
1021
+ /**
1022
+ * Типы фильтров
1023
+ */
1024
+ filters: {
1025
+ type: Array,
1026
+ required: true,
1027
+ default: () => []
1028
+ },
1029
+ /**
1030
+ * Лоадинг кнопки применить фильтр
1031
+ */
1032
+ buttonConfirmIsLoading: {
1033
+ type: Boolean,
1034
+ default: false
1035
+ },
1036
+ /**
1037
+ * Использовать ли teleport (для рендеринга вне компонента)
1038
+ * Если да то необходимо создать блок с id="filterTeleportTarget" в который будет рендериться тело фильтра
1039
+ */
1040
+ useTeleport: {
1041
+ type: Boolean,
1042
+ default: false
1043
+ },
1044
+ /**
1045
+ * Доступен ли фильтр для открытия
1046
+ */
1047
+ disabledOpen: {
1048
+ type: Boolean,
1049
+ default: false
1050
+ },
1051
+ /**
1052
+ * Нужно ли учитывать часовой пояс при работе с фильтром типа Date
1053
+ * */
1054
+ useTimezone: {
1055
+ type: Boolean,
1056
+ default: false
1057
+ },
1058
+ /**
1059
+ * Переводы плейсхолеров и текстов
1060
+ */
1061
+ placeholders: {
1062
+ type: Object,
1063
+ default: () => ({})
1064
+ }
1065
+ },
1066
+ __typeEl: {},
1067
+ });
1068
+ ; /* PartiallyEnd: #4569/main.vue */