@topvisor/ui 1.5.4 → 1.5.5

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 (161) hide show
  1. package/.chunks/{api-DQSboD9F.amd.js → api-D5wIZnrK.amd.js} +2 -2
  2. package/.chunks/{api-DQSboD9F.amd.js.map → api-D5wIZnrK.amd.js.map} +1 -1
  3. package/.chunks/{api-DQSboD9F.esm.js → api-D5wIZnrK.esm.js} +2 -2
  4. package/.chunks/api-D5wIZnrK.esm.js.map +1 -0
  5. package/.chunks/{app-DeBknp1Q.amd.js → app-0qVCkgOO.amd.js} +2 -2
  6. package/.chunks/{app-DeBknp1Q.amd.js.map → app-0qVCkgOO.amd.js.map} +1 -1
  7. package/.chunks/{app-DeBknp1Q.esm.js → app-0qVCkgOO.esm.js} +5 -5
  8. package/.chunks/{app-DeBknp1Q.esm.js.map → app-0qVCkgOO.esm.js.map} +1 -1
  9. package/.chunks/{datepicker-B2Km72Vg.amd.js → datepicker-CYAhR3K9.amd.js} +2 -2
  10. package/.chunks/{datepicker-B2Km72Vg.amd.js.map → datepicker-CYAhR3K9.amd.js.map} +1 -1
  11. package/.chunks/{datepicker-B2Km72Vg.esm.js → datepicker-CYAhR3K9.esm.js} +2 -2
  12. package/.chunks/{datepicker-B2Km72Vg.esm.js.map → datepicker-CYAhR3K9.esm.js.map} +1 -1
  13. package/.chunks/{dialog-DPTJ7VN5.amd.js → dialog-CdgC31H2.amd.js} +2 -2
  14. package/.chunks/{dialog-DPTJ7VN5.amd.js.map → dialog-CdgC31H2.amd.js.map} +1 -1
  15. package/.chunks/{dialog-DPTJ7VN5.esm.js → dialog-CdgC31H2.esm.js} +3 -3
  16. package/.chunks/{dialog-DPTJ7VN5.esm.js.map → dialog-CdgC31H2.esm.js.map} +1 -1
  17. package/.chunks/{dialog_regionSelectorRegions-ClRx55RP.amd.js → dialog_regionSelectorRegions-BFpuUEJM.amd.js} +2 -2
  18. package/.chunks/{dialog_regionSelectorRegions-ClRx55RP.amd.js.map → dialog_regionSelectorRegions-BFpuUEJM.amd.js.map} +1 -1
  19. package/.chunks/{dialog_regionSelectorRegions-ClRx55RP.esm.js → dialog_regionSelectorRegions-BFpuUEJM.esm.js} +4 -4
  20. package/.chunks/dialog_regionSelectorRegions-BFpuUEJM.esm.js.map +1 -0
  21. package/.chunks/{forms-DKVIpGnH.amd.js → forms-BiKUURH4.amd.js} +2 -2
  22. package/.chunks/forms-BiKUURH4.amd.js.map +1 -0
  23. package/.chunks/{forms-DKVIpGnH.esm.js → forms-BiKUURH4.esm.js} +82 -86
  24. package/.chunks/forms-BiKUURH4.esm.js.map +1 -0
  25. package/.chunks/{formsExt-B32m6XEQ.amd.js → formsExt-Bk_fn1Pg.amd.js} +2 -2
  26. package/.chunks/{formsExt-B32m6XEQ.amd.js.map → formsExt-Bk_fn1Pg.amd.js.map} +1 -1
  27. package/.chunks/{formsExt-B32m6XEQ.esm.js → formsExt-Bk_fn1Pg.esm.js} +4 -4
  28. package/.chunks/{formsExt-B32m6XEQ.esm.js.map → formsExt-Bk_fn1Pg.esm.js.map} +1 -1
  29. package/.chunks/{notice-C3_mXHCe.amd.js → notice-LFdPfo-5.amd.js} +2 -2
  30. package/.chunks/{notice-C3_mXHCe.amd.js.map → notice-LFdPfo-5.amd.js.map} +1 -1
  31. package/.chunks/{notice-C3_mXHCe.esm.js → notice-LFdPfo-5.esm.js} +2 -2
  32. package/.chunks/notice-LFdPfo-5.esm.js.map +1 -0
  33. package/.chunks/popup-DB5g_8kB.amd.js +2 -0
  34. package/.chunks/popup-DB5g_8kB.amd.js.map +1 -0
  35. package/.chunks/{popup-B8Us9xZO.esm.js → popup-DB5g_8kB.esm.js} +20 -18
  36. package/.chunks/popup-DB5g_8kB.esm.js.map +1 -0
  37. package/.chunks/{popup-CtiL5V44.amd.js → popup-KKfSSrM6.amd.js} +2 -2
  38. package/.chunks/{popup-CtiL5V44.amd.js.map → popup-KKfSSrM6.amd.js.map} +1 -1
  39. package/.chunks/{popup-CtiL5V44.esm.js → popup-KKfSSrM6.esm.js} +3 -3
  40. package/.chunks/{popup-CtiL5V44.esm.js.map → popup-KKfSSrM6.esm.js.map} +1 -1
  41. package/.chunks/{utils-C1xkXfK0.amd.js → utils-3uWRvFcX.amd.js} +2 -2
  42. package/.chunks/utils-3uWRvFcX.amd.js.map +1 -0
  43. package/.chunks/{utils-C1xkXfK0.esm.js → utils-3uWRvFcX.esm.js} +5 -5
  44. package/.chunks/utils-3uWRvFcX.esm.js.map +1 -0
  45. package/.chunks/{utils-Cj8CJ22r.amd.js → utils-BiOp5DHs.amd.js} +2 -2
  46. package/.chunks/{utils-Cj8CJ22r.amd.js.map → utils-BiOp5DHs.amd.js.map} +1 -1
  47. package/.chunks/{utils-Cj8CJ22r.esm.js → utils-BiOp5DHs.esm.js} +4 -4
  48. package/.chunks/{utils-Cj8CJ22r.esm.js.map → utils-BiOp5DHs.esm.js.map} +1 -1
  49. package/.chunks/{worker-DYTgdzGP.amd.js → worker-BufdAd-a.amd.js} +2 -2
  50. package/.chunks/{worker-DYTgdzGP.amd.js.map → worker-BufdAd-a.amd.js.map} +1 -1
  51. package/.chunks/{worker-DYTgdzGP.esm.js → worker-BufdAd-a.esm.js} +3 -3
  52. package/.chunks/{worker-DYTgdzGP.esm.js.map → worker-BufdAd-a.esm.js.map} +1 -1
  53. package/api/additional.amd.js +1 -1
  54. package/api/additional.amd.js.map +1 -1
  55. package/api/additional.js +1 -4
  56. package/api/additional.js.map +1 -1
  57. package/api/index.amd.js +1 -1
  58. package/api/index.amd.js.map +1 -1
  59. package/api/index.js +1 -1
  60. package/assets/forms.css +1 -1
  61. package/assets/schedule.css +1 -0
  62. package/assets/themes/dark-th.css +1 -1
  63. package/assets/themes/dark.css +1 -1
  64. package/assets/themes/light.css +1 -1
  65. package/autoload-css-manifest.amd.json +10 -4
  66. package/autoload-css-manifest.json +10 -4
  67. package/charts/charts.amd.js +1 -1
  68. package/charts/charts.amd.js.map +1 -1
  69. package/charts/charts.js +1 -1
  70. package/charts/charts.js.map +1 -1
  71. package/core/app.amd.js +1 -1
  72. package/core/app.amd.js.map +1 -1
  73. package/core/app.js +3 -3
  74. package/dialog/dialog.amd.js +1 -1
  75. package/dialog/dialog.amd.js.map +1 -1
  76. package/dialog/dialog.js +2 -2
  77. package/forms/forms.amd.js +1 -1
  78. package/forms/forms.amd.js.map +1 -1
  79. package/forms/forms.js +1 -1
  80. package/formsExt/formsExt.amd.js +1 -1
  81. package/formsExt/formsExt.amd.js.map +1 -1
  82. package/formsExt/formsExt.js +1 -1
  83. package/layout/layout.amd.js +1 -1
  84. package/layout/layout.amd.js.map +1 -1
  85. package/layout/layout.js +1 -1
  86. package/package.json +1 -1
  87. package/popup/popup.amd.js +1 -1
  88. package/popup/popup.amd.js.map +1 -1
  89. package/popup/popup.js +1 -1
  90. package/popup/worker.amd.js +1 -1
  91. package/popup/worker.amd.js.map +1 -1
  92. package/popup/worker.js +1 -1
  93. package/project/project.amd.js +1 -1
  94. package/project/project.amd.js.map +1 -1
  95. package/project/project.js +19 -25
  96. package/project/project.js.map +1 -1
  97. package/require/css.amd.js +2 -0
  98. package/schedule/schedule.amd.js +2 -0
  99. package/schedule/schedule.amd.js.map +1 -0
  100. package/schedule/schedule.d.ts +2 -0
  101. package/schedule/schedule.js +430 -0
  102. package/schedule/schedule.js.map +1 -0
  103. package/src/components/project/groupSelector/groups/types.d.ts +1 -1
  104. package/src/components/project/groupSelector/stories/play/apiEditorMulti.d.ts +2 -0
  105. package/src/components/project/groupSelector/types.d.ts +1 -1
  106. package/src/components/project/projectSelector/utils.d.ts +2 -1
  107. package/src/components/schedule/schedule/compoents/calendar/types.d.ts +19 -0
  108. package/src/components/schedule/schedule/compoents/calendar/utils.d.ts +10 -0
  109. package/src/components/schedule/schedule/compoents/email/selector/types.d.ts +13 -0
  110. package/src/components/schedule/schedule/compoents/email/types.d.ts +13 -0
  111. package/src/components/schedule/schedule/compoents/reportSend/types.d.ts +23 -0
  112. package/src/components/schedule/schedule/compoents/timeSelector/types.d.ts +14 -0
  113. package/src/components/schedule/schedule/compoents/timeSelectors/types.d.ts +7 -0
  114. package/src/components/schedule/schedule/types.d.ts +25 -0
  115. package/src/components/schedule/schedule.d.ts +8 -0
  116. package/tabsView/tabsView.amd.js +1 -1
  117. package/tabsView/tabsView.amd.js.map +1 -1
  118. package/tabsView/tabsView.js +3 -3
  119. package/tabsView/tabsView.js.map +1 -1
  120. package/utils/clipboard.amd.js +1 -1
  121. package/utils/clipboard.amd.js.map +1 -1
  122. package/utils/clipboard.js +1 -1
  123. package/utils/date.amd.js +1 -1
  124. package/utils/date.amd.js.map +1 -1
  125. package/utils/date.js +1 -1
  126. package/utils/device.amd.js +1 -1
  127. package/utils/device.amd.js.map +1 -1
  128. package/utils/device.js +1 -1
  129. package/utils/lodash.amd.js +1 -1
  130. package/utils/lodash.amd.js.map +1 -1
  131. package/utils/lodash.js +1 -1
  132. package/utils/number.amd.js.map +1 -1
  133. package/utils/number.js.map +1 -1
  134. package/utils/price.amd.js +1 -1
  135. package/utils/price.amd.js.map +1 -1
  136. package/utils/price.js +1 -1
  137. package/utils/route.amd.js.map +1 -1
  138. package/utils/route.js.map +1 -1
  139. package/utils/searchers.amd.js +1 -1
  140. package/utils/searchers.amd.js.map +1 -1
  141. package/utils/searchers.js +1 -1
  142. package/utils/string.amd.js +1 -1
  143. package/utils/string.amd.js.map +1 -1
  144. package/utils/string.js +3 -3
  145. package/utils/string.js.map +1 -1
  146. package/utils/url.amd.js +1 -1
  147. package/utils/url.amd.js.map +1 -1
  148. package/utils/url.js +11 -7
  149. package/utils/url.js.map +1 -1
  150. package/.chunks/api-DQSboD9F.esm.js.map +0 -1
  151. package/.chunks/dialog_regionSelectorRegions-ClRx55RP.esm.js.map +0 -1
  152. package/.chunks/forms-DKVIpGnH.amd.js.map +0 -1
  153. package/.chunks/forms-DKVIpGnH.esm.js.map +0 -1
  154. package/.chunks/notice-C3_mXHCe.esm.js.map +0 -1
  155. package/.chunks/popup-B8Us9xZO.amd.js +0 -2
  156. package/.chunks/popup-B8Us9xZO.amd.js.map +0 -1
  157. package/.chunks/popup-B8Us9xZO.esm.js.map +0 -1
  158. package/.chunks/utils-C1xkXfK0.amd.js.map +0 -1
  159. package/.chunks/utils-C1xkXfK0.esm.js.map +0 -1
  160. package/src/components/formsExt/selector2/composables/useAPI.d.ts +0 -2138
  161. package/src/components/formsExt/selector2/composables/useMenu.d.ts +0 -2142
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedule.js","names":["$emit","$slots","$i18n","$emit","$i18n","$i18n","$emit","$i18n","$emit","$emit","$emit"],"sources":["../../src/components/schedule/schedule/schedule.vue","../../src/components/schedule/schedule/schedule.vue","../../src/components/schedule/schedule/compoents/container/container.vue","../../src/components/schedule/schedule/compoents/calendar/utils.ts","../../src/components/schedule/schedule/compoents/calendar/calendar.vue","../../src/components/schedule/schedule/compoents/calendar/calendar.vue","../../src/components/schedule/schedule/compoents/email/selector/selector.vue","../../src/components/schedule/schedule/compoents/email/selector/selector.vue","../../src/components/schedule/schedule/compoents/email/email.vue","../../src/components/schedule/schedule/compoents/email/email.vue","../../src/components/schedule/schedule/compoents/reportSend/reportSend.vue","../../src/components/schedule/schedule/compoents/reportSend/reportSend.vue","../../src/components/schedule/schedule/compoents/timeSelector/timeSelector.vue","../../src/components/schedule/schedule/compoents/timeSelector/timeSelector.vue","../../src/components/schedule/schedule/compoents/timeSelectors/timeSelectors.vue","../../src/components/schedule/schedule/compoents/timeSelectors/timeSelectors.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport TopSelect from '@/components/forms/select/select.vue';\nimport type { Props, Emits, TriggerType } from '@/components/schedule/schedule/types';\nimport { useI18n } from '@/core/plugins/i18n';\n\ndefineOptions({\n\tname: 'TopSchedule',\n});\n\nconst props = withDefaults(defineProps<Props>(), {\n\ttriggerType: 'onDemand',\n});\n\ndefineEmits<Emits>();\n\nconst i18n = useI18n();\nconst labelByStyling = {\n\t'track': i18n.Projects.Checks,\n\t'report': i18n.Projects.Reports,\n\t'neutral': '',\n};\nconst title = props.title ?? labelByStyling[props.styling];\n\n</script>\n\n<template>\n\t<div\n\t\t:class=\"{\n\t\t\t'top-schedule': true,\n\t\t\t[`top-schedule-style_${styling}`]: true,\n\t\t}\"\n\t>\n\t\t<div class=\"top-schedule_header\">\n\t\t\t<div class=\"top-schedule_headerTitle\">\n\t\t\t\t{{ title }}\n\t\t\t</div>\n\n\t\t\t<TopSelect\n\t\t\t\tclass=\"top-schedule_headerTriggerType\"\n\t\t\t\t:modelValue=\"triggerType\"\n\t\t\t\t@update:modelValue=\"$emit('update:triggerType', $event as TriggerType)\"\n\t\t\t\t:options=\"triggerTypeOptions\"\n\t\t\t\tsize=\"s\"\n\t\t\t/>\n\t\t</div>\n\n\t\t<div\n\t\t\tv-if=\"triggerType !== 'onDemand' && $slots.body\"\n\t\t\tclass=\"top-schedule_body\"\n\t\t>\n\t\t\t<slot name=\"body\"></slot>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport TopSelect from '@/components/forms/select/select.vue';\nimport type { Props, Emits, TriggerType } from '@/components/schedule/schedule/types';\nimport { useI18n } from '@/core/plugins/i18n';\n\ndefineOptions({\n\tname: 'TopSchedule',\n});\n\nconst props = withDefaults(defineProps<Props>(), {\n\ttriggerType: 'onDemand',\n});\n\ndefineEmits<Emits>();\n\nconst i18n = useI18n();\nconst labelByStyling = {\n\t'track': i18n.Projects.Checks,\n\t'report': i18n.Projects.Reports,\n\t'neutral': '',\n};\nconst title = props.title ?? labelByStyling[props.styling];\n\n</script>\n\n<template>\n\t<div\n\t\t:class=\"{\n\t\t\t'top-schedule': true,\n\t\t\t[`top-schedule-style_${styling}`]: true,\n\t\t}\"\n\t>\n\t\t<div class=\"top-schedule_header\">\n\t\t\t<div class=\"top-schedule_headerTitle\">\n\t\t\t\t{{ title }}\n\t\t\t</div>\n\n\t\t\t<TopSelect\n\t\t\t\tclass=\"top-schedule_headerTriggerType\"\n\t\t\t\t:modelValue=\"triggerType\"\n\t\t\t\t@update:modelValue=\"$emit('update:triggerType', $event as TriggerType)\"\n\t\t\t\t:options=\"triggerTypeOptions\"\n\t\t\t\tsize=\"s\"\n\t\t\t/>\n\t\t</div>\n\n\t\t<div\n\t\t\tv-if=\"triggerType !== 'onDemand' && $slots.body\"\n\t\t\tclass=\"top-schedule_body\"\n\t\t>\n\t\t\t<slot name=\"body\"></slot>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<template>\n\t<div class=\"top-schedule_bodyContainer\">\n\t\t<slot></slot>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","import type { Day, Props } from '@/components/schedule/schedule/compoents/calendar/types';\nimport { useI18n } from '@/core/app';\n\n/**\n * Количество дней в месяце\n */\nexport const COUNT_DAYS_IN_MONTS = 27;\n\n/**\n * Количество дней в неделе\n */\nexport const COUNT_DAYS_IN_WEEK = 7;\n\nexport const genDaysByCalendarMode = (mode: Props['mode']): Day[] => {\n\tconst i18n = useI18n();\n\n\tswitch (mode) {\n\t\tcase 'dayOfMonth': {\n\t\t\tconst days: Day[] = Array.from({ length: COUNT_DAYS_IN_MONTS }, (_, i) => ({\n\t\t\t\tvalue: i + 1,\n\t\t\t\ttitle: String(i + 1),\n\t\t\t}));\n\n\t\t\tdays.push({\n\t\t\t\tvalue: 'LAST_OF_MONTH',\n\t\t\t\ttitle: '',\n\t\t\t\tisIcon: true,\n\t\t\t});\n\n\t\t\treturn days;\n\t\t}\n\n\t\tcase 'dayOfWeek': {\n\t\t\treturn [\n\t\t\t\t{ value: 'MONDAY', title: i18n.Calendar.Dw_1 },\n\t\t\t\t{ value: 'TUESDAY', title: i18n.Calendar.Dw_2 },\n\t\t\t\t{ value: 'WEDNESDAY', title: i18n.Calendar.Dw_3 },\n\t\t\t\t{ value: 'THURSDAY', title: i18n.Calendar.Dw_4 },\n\t\t\t\t{ value: 'FRIDAY', title: i18n.Calendar.Dw_5 },\n\t\t\t\t{ value: 'SATURDAY', title: i18n.Calendar.Dw_6 },\n\t\t\t\t{ value: 'SUNDAY', title: i18n.Calendar.Dw_7 },\n\t\t\t];\n\t\t}\n\t}\n};","<script setup lang=\"ts\">\nimport type { Props, Emits } from '@/components/schedule/schedule/compoents/calendar/types';\nimport { COUNT_DAYS_IN_MONTS, COUNT_DAYS_IN_WEEK, genDaysByCalendarMode } from '@/components/schedule/schedule/compoents/calendar/utils';\nimport { numberEnding } from '@/core/utils/string';\nimport { computed } from 'vue';\nimport { useI18n } from '@/core/app';\n\nconst i18n = useI18n();\nconst props = defineProps<Props>();\nconst emit = defineEmits<Emits>();\n\nconst selectedDays = computed<Props['modelValue']>({\n\tget: () => props.modelValue,\n\tset: value => emit('update:modelValue', value),\n});\n\nconst days = computed(() => genDaysByCalendarMode(props.mode));\n\nconst selectedCountLabel = computed(() => {\n\tconst daysCount = selectedDays.value.length;\n\tlet postfix = '';\n\n\tswitch (props.mode) {\n\t\tcase 'dayOfWeek': {\n\t\t\tif (daysCount === COUNT_DAYS_IN_WEEK) return i18n.Common.Every_day;\n\n\t\t\tpostfix = i18n.Common.a_week;\n\n\t\t\tbreak;\n\t\t}\n\t\tcase 'dayOfMonth': {\n\t\t\t// плюс \"последний день месяца\"\n\t\t\tif (daysCount === COUNT_DAYS_IN_MONTS + 1) return i18n.Common.Every_day;\n\n\t\t\tpostfix = i18n.Common.a_month;\n\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn `${daysCount} ${numberEnding(\n\t\tdaysCount,\n\t\ti18n.Common.time_a_0,\n\t\ti18n.Common.time_a_0,\n\t\ti18n.Common.time_a_2,\n\t)} ${postfix}`;\n});\n\nconst isClearAction = computed(() => selectedDays.value.length > 1);\n\nconst toggleAllDays = () => {\n\tselectedDays.value = isClearAction.value ? [] : days.value.map(day => day.value);\n};\n\n</script>\n\n<template>\n\t<div class=\"top-scheduleCalendar\">\n\t\t<div class=\"top-scheduleCalendar_header\">\n\t\t\t<slot name=\"header\"></slot>\n\n\t\t\t<TopButton\n\t\t\t\tclass=\"top-scheduleCalendar_headerButton\"\n\t\t\t\t@click=\"toggleAllDays\"\n\t\t\t\tcolor=\"theme\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t>\n\t\t\t\t{{ isClearAction ? $i18n.Common.Clear : $i18n.Common.Select_all}}\n\t\t\t</TopButton>\n\t\t</div>\n\n\t\t<div class=\"top-scheduleCalendar_calendar\">\n\t\t\t<label\n\t\t\t\tclass=\"top-scheduleCalendar_calendarDay\"\n\t\t\t\tv-for=\"day in days\"\n\t\t\t\t:key=\"day.value\"\n\t\t\t>\n\t\t\t\t<input\n\t\t\t\t\tclass=\"top-scheduleCalendar_calendarDayRadio\"\n\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t:value=\"day.value\"\n\t\t\t\t\tv-model=\"selectedDays\"\n\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t>\n\n\t\t\t\t<span\n\t\t\t\t\tclass=\"top-scheduleCalendar_calendarDayTitle\"\n\t\t\t\t\t:data-top-icon=\"day.isIcon ? day.title : undefined\"\n\t\t\t\t>\n\t\t\t\t\t<template v-if=\"!day.isIcon\">\n\t\t\t\t\t\t{{ day.title }}\n\t\t\t\t\t</template>\n\t\t\t\t</span>\n\t\t\t</label>\n\t\t</div>\n\n\t\t<div\n\t\t\t:class=\"{\n\t\t\t\t'top-scheduleCalendar_selectedCount': true,\n\t\t\t\t'top-error': !selectedDays.length\n\t\t\t}\"\n\t\t>\n\t\t\t{{ selectedCountLabel }}\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport type { Props, Emits } from '@/components/schedule/schedule/compoents/calendar/types';\nimport { COUNT_DAYS_IN_MONTS, COUNT_DAYS_IN_WEEK, genDaysByCalendarMode } from '@/components/schedule/schedule/compoents/calendar/utils';\nimport { numberEnding } from '@/core/utils/string';\nimport { computed } from 'vue';\nimport { useI18n } from '@/core/app';\n\nconst i18n = useI18n();\nconst props = defineProps<Props>();\nconst emit = defineEmits<Emits>();\n\nconst selectedDays = computed<Props['modelValue']>({\n\tget: () => props.modelValue,\n\tset: value => emit('update:modelValue', value),\n});\n\nconst days = computed(() => genDaysByCalendarMode(props.mode));\n\nconst selectedCountLabel = computed(() => {\n\tconst daysCount = selectedDays.value.length;\n\tlet postfix = '';\n\n\tswitch (props.mode) {\n\t\tcase 'dayOfWeek': {\n\t\t\tif (daysCount === COUNT_DAYS_IN_WEEK) return i18n.Common.Every_day;\n\n\t\t\tpostfix = i18n.Common.a_week;\n\n\t\t\tbreak;\n\t\t}\n\t\tcase 'dayOfMonth': {\n\t\t\t// плюс \"последний день месяца\"\n\t\t\tif (daysCount === COUNT_DAYS_IN_MONTS + 1) return i18n.Common.Every_day;\n\n\t\t\tpostfix = i18n.Common.a_month;\n\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn `${daysCount} ${numberEnding(\n\t\tdaysCount,\n\t\ti18n.Common.time_a_0,\n\t\ti18n.Common.time_a_0,\n\t\ti18n.Common.time_a_2,\n\t)} ${postfix}`;\n});\n\nconst isClearAction = computed(() => selectedDays.value.length > 1);\n\nconst toggleAllDays = () => {\n\tselectedDays.value = isClearAction.value ? [] : days.value.map(day => day.value);\n};\n\n</script>\n\n<template>\n\t<div class=\"top-scheduleCalendar\">\n\t\t<div class=\"top-scheduleCalendar_header\">\n\t\t\t<slot name=\"header\"></slot>\n\n\t\t\t<TopButton\n\t\t\t\tclass=\"top-scheduleCalendar_headerButton\"\n\t\t\t\t@click=\"toggleAllDays\"\n\t\t\t\tcolor=\"theme\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t>\n\t\t\t\t{{ isClearAction ? $i18n.Common.Clear : $i18n.Common.Select_all}}\n\t\t\t</TopButton>\n\t\t</div>\n\n\t\t<div class=\"top-scheduleCalendar_calendar\">\n\t\t\t<label\n\t\t\t\tclass=\"top-scheduleCalendar_calendarDay\"\n\t\t\t\tv-for=\"day in days\"\n\t\t\t\t:key=\"day.value\"\n\t\t\t>\n\t\t\t\t<input\n\t\t\t\t\tclass=\"top-scheduleCalendar_calendarDayRadio\"\n\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t:value=\"day.value\"\n\t\t\t\t\tv-model=\"selectedDays\"\n\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t>\n\n\t\t\t\t<span\n\t\t\t\t\tclass=\"top-scheduleCalendar_calendarDayTitle\"\n\t\t\t\t\t:data-top-icon=\"day.isIcon ? day.title : undefined\"\n\t\t\t\t>\n\t\t\t\t\t<template v-if=\"!day.isIcon\">\n\t\t\t\t\t\t{{ day.title }}\n\t\t\t\t\t</template>\n\t\t\t\t</span>\n\t\t\t</label>\n\t\t</div>\n\n\t\t<div\n\t\t\t:class=\"{\n\t\t\t\t'top-scheduleCalendar_selectedCount': true,\n\t\t\t\t'top-error': !selectedDays.length\n\t\t\t}\"\n\t\t>\n\t\t\t{{ selectedCountLabel }}\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport { nextTick, onBeforeUnmount, onMounted, ref } from 'vue';\nimport TopInput from '@/components/forms/input/input.vue';\nimport TopButton from '@/components/forms/button/button.vue';\nimport Core from '@/core/core/core';\nimport { isEmail } from '@/core/utils/check';\nimport { useI18n } from '@/core/plugins/i18n';\nimport type { Props, Emits } from '@/components/schedule/schedule/compoents/email/selector/types';\n\nconst props = withDefaults(defineProps<Props>(), {\n\temails: () => [],\n\tgetEmailSuggestions: () => [],\n});\n\nconst emit = defineEmits<Emits>();\nconst i18n = useI18n();\nconst $ = Core.$;\n\nconst elRootRef = ref<HTMLElement>();\nconst elInputRef = ref<InstanceType<typeof TopInput>>();\nlet elInput: HTMLInputElement | null = null;\nconst autocompleteCache: Record<string, string[]> = {};\n\nconst filterEmails = (emails: string[]) => emails.filter(email => !props.emails.includes(email));\n\nconst submit = (value: unknown = props.modelValue) => {\n\tconst email = String(value).trim();\n\tif (!email) return;\n\tif (!isEmail(email)) {\n\t\tvoid Core.notice(i18n.Common.Enter_valid_email_notice, 'error');\n\n\t\treturn;\n\t}\n\n\temit('submit', email);\n};\n\nconst initAutocomplete = async () => {\n\tawait nextTick();\n\n\telInput = elInputRef.value?.$el.querySelector('input') ?? null;\n\tif (!elInput) return;\n\n\tif (!$?.ui?.autocomplete) {\n\t\tconsole.info('Для работы autocomplete требуется глобальная загрузка jQuery UI Autocomplete');\n\n\t\treturn;\n\t}\n\n\t$(elInput).autocomplete({\n\t\tappendTo: elRootRef.value,\n\t\tminLength: 0,\n\t\tsource: async (request: { term: string }, response: (items: Array<{ label: string, value: string }>) => void) => {\n\t\t\tconst term = request.term;\n\t\t\tif (!(term in autocompleteCache)) {\n\t\t\t\tautocompleteCache[term] = await props.getEmailSuggestions(term);\n\t\t\t}\n\n\t\t\tresponse(filterEmails(autocompleteCache[term]).map(email => ({\n\t\t\t\tlabel: email,\n\t\t\t\tvalue: email,\n\t\t\t})));\n\t\t},\n\t\tselect: (event: Event, ui: { item?: { value: string } }) => {\n\t\t\tif (!ui.item || !elInput) return;\n\n\t\t\tevent.preventDefault();\n\t\t\tsubmit(ui.item.value);\n\t\t\temit('update:modelValue', '');\n\n\t\t\t$(elInput).trigger('focus');\n\t\t},\n\t});\n\n\t$(elInput).attr('autocomplete', 'disabled');\n\t$(elInput).on('focus.scheduleEmailSelector', () => {\n\t\tif (!elInput) return;\n\n\t\t$(elInput).trigger('input');\n\t});\n};\n\nonMounted(() => {\n\tvoid initAutocomplete();\n});\n\nonBeforeUnmount(() => {\n\tif (!$?.ui?.autocomplete || !elInput) return;\n\n\t$(elInput).off('focus.scheduleEmailSelector');\n\t$(elInput).autocomplete('destroy');\n});\n</script>\n\n<template>\n\t<div\n\t\tclass=\"top-scheduleEmailSelector\"\n\t\tref=\"elRootRef\"\n\t>\n\t\t<TopInput\n\t\t\tref=\"elInputRef\"\n\t\t\t:modelValue\n\t\t\t@update:modelValue=\"$emit('update:modelValue', $event)\"\n\t\t\t@keydown.enter.prevent=\"submit()\"\n\t\t\t:title=\"$i18n.Common.Enter_email\"\n\t\t\ttype=\"email\"\n\t\t\tsize=\"l\"\n\t\t>\n\t\t\t<TopButton\n\t\t\t\tclass=\"top-scheduleEmailSelector_submit\"\n\t\t\t\tcolor=\"theme\"\n\t\t\t\ticon=\"\"\n\t\t\t\t@click.prevent=\"submit()\"\n\t\t\t/>\n\t\t</TopInput>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport { nextTick, onBeforeUnmount, onMounted, ref } from 'vue';\nimport TopInput from '@/components/forms/input/input.vue';\nimport TopButton from '@/components/forms/button/button.vue';\nimport Core from '@/core/core/core';\nimport { isEmail } from '@/core/utils/check';\nimport { useI18n } from '@/core/plugins/i18n';\nimport type { Props, Emits } from '@/components/schedule/schedule/compoents/email/selector/types';\n\nconst props = withDefaults(defineProps<Props>(), {\n\temails: () => [],\n\tgetEmailSuggestions: () => [],\n});\n\nconst emit = defineEmits<Emits>();\nconst i18n = useI18n();\nconst $ = Core.$;\n\nconst elRootRef = ref<HTMLElement>();\nconst elInputRef = ref<InstanceType<typeof TopInput>>();\nlet elInput: HTMLInputElement | null = null;\nconst autocompleteCache: Record<string, string[]> = {};\n\nconst filterEmails = (emails: string[]) => emails.filter(email => !props.emails.includes(email));\n\nconst submit = (value: unknown = props.modelValue) => {\n\tconst email = String(value).trim();\n\tif (!email) return;\n\tif (!isEmail(email)) {\n\t\tvoid Core.notice(i18n.Common.Enter_valid_email_notice, 'error');\n\n\t\treturn;\n\t}\n\n\temit('submit', email);\n};\n\nconst initAutocomplete = async () => {\n\tawait nextTick();\n\n\telInput = elInputRef.value?.$el.querySelector('input') ?? null;\n\tif (!elInput) return;\n\n\tif (!$?.ui?.autocomplete) {\n\t\tconsole.info('Для работы autocomplete требуется глобальная загрузка jQuery UI Autocomplete');\n\n\t\treturn;\n\t}\n\n\t$(elInput).autocomplete({\n\t\tappendTo: elRootRef.value,\n\t\tminLength: 0,\n\t\tsource: async (request: { term: string }, response: (items: Array<{ label: string, value: string }>) => void) => {\n\t\t\tconst term = request.term;\n\t\t\tif (!(term in autocompleteCache)) {\n\t\t\t\tautocompleteCache[term] = await props.getEmailSuggestions(term);\n\t\t\t}\n\n\t\t\tresponse(filterEmails(autocompleteCache[term]).map(email => ({\n\t\t\t\tlabel: email,\n\t\t\t\tvalue: email,\n\t\t\t})));\n\t\t},\n\t\tselect: (event: Event, ui: { item?: { value: string } }) => {\n\t\t\tif (!ui.item || !elInput) return;\n\n\t\t\tevent.preventDefault();\n\t\t\tsubmit(ui.item.value);\n\t\t\temit('update:modelValue', '');\n\n\t\t\t$(elInput).trigger('focus');\n\t\t},\n\t});\n\n\t$(elInput).attr('autocomplete', 'disabled');\n\t$(elInput).on('focus.scheduleEmailSelector', () => {\n\t\tif (!elInput) return;\n\n\t\t$(elInput).trigger('input');\n\t});\n};\n\nonMounted(() => {\n\tvoid initAutocomplete();\n});\n\nonBeforeUnmount(() => {\n\tif (!$?.ui?.autocomplete || !elInput) return;\n\n\t$(elInput).off('focus.scheduleEmailSelector');\n\t$(elInput).autocomplete('destroy');\n});\n</script>\n\n<template>\n\t<div\n\t\tclass=\"top-scheduleEmailSelector\"\n\t\tref=\"elRootRef\"\n\t>\n\t\t<TopInput\n\t\t\tref=\"elInputRef\"\n\t\t\t:modelValue\n\t\t\t@update:modelValue=\"$emit('update:modelValue', $event)\"\n\t\t\t@keydown.enter.prevent=\"submit()\"\n\t\t\t:title=\"$i18n.Common.Enter_email\"\n\t\t\ttype=\"email\"\n\t\t\tsize=\"l\"\n\t\t>\n\t\t\t<TopButton\n\t\t\t\tclass=\"top-scheduleEmailSelector_submit\"\n\t\t\t\tcolor=\"theme\"\n\t\t\t\ticon=\"\"\n\t\t\t\t@click.prevent=\"submit()\"\n\t\t\t/>\n\t\t</TopInput>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport type { Props, Emits } from '@/components/schedule/schedule/compoents/email/types';\nimport ScheduleEmailSelector from '@/components/schedule/schedule/compoents/email/selector/selector.vue';\n\nconst props = withDefaults(defineProps<Props>(), {\n\temails: () => [],\n\tgetEmailSuggestions: () => [],\n\tmaxEmailsCount: -1,\n});\n\nconst emit = defineEmits<Emits>();\n\nconst value = ref('');\n\nconst addEmail = (email: string) => {\n\tconst preparedEmail = email.trim();\n\tif (!preparedEmail || props.emails.includes(preparedEmail)) {\n\t\tvalue.value = '';\n\n\t\treturn;\n\t}\n\n\temit('add:email', preparedEmail);\n\n\tvalue.value = '';\n};\n</script>\n\n<template>\n\t<div class=\"top-scheduleEmail\">\n\t\t<div class=\"top-scheduleEmail_title\">\n\t\t\t{{ $i18n.Projects.Reports_send_to_address }} E-mail:\n\t\t</div>\n\n\t\t<div\n\t\t\tv-if=\"!(maxEmailsCount && emails.length === maxEmailsCount)\"\n\t\t\tclass=\"top-scheduleEmail_selector\"\n\t\t>\n\t\t\t<ScheduleEmailSelector\n\t\t\t\tv-model=\"value\"\n\t\t\t\t:getEmailSuggestions=\"getEmailSuggestions\"\n\t\t\t\t:emails=\"emails\"\n\t\t\t\t@submit=\"addEmail\"\n\t\t\t/>\n\t\t</div>\n\n\t\t<div\n\t\t\tv-if=\"emails.length\"\n\t\t\tclass=\"top-scheduleEmail_emails\"\n\t\t>\n\t\t\t<div\n\t\t\t\tclass=\"top-scheduleEmail_emailsItem\"\n\t\t\t\tv-for=\"email in emails\"\n\t\t\t\t:key=\"email\"\n\t\t\t>\n\t\t\t\t{{ email }}\n\n\t\t\t\t<TopButton\n\t\t\t\t\t@click=\"$emit('remove:email', email)\"\n\t\t\t\t\tcolor=\"theme\"\n\t\t\t\t\ticon=\"\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport type { Props, Emits } from '@/components/schedule/schedule/compoents/email/types';\nimport ScheduleEmailSelector from '@/components/schedule/schedule/compoents/email/selector/selector.vue';\n\nconst props = withDefaults(defineProps<Props>(), {\n\temails: () => [],\n\tgetEmailSuggestions: () => [],\n\tmaxEmailsCount: -1,\n});\n\nconst emit = defineEmits<Emits>();\n\nconst value = ref('');\n\nconst addEmail = (email: string) => {\n\tconst preparedEmail = email.trim();\n\tif (!preparedEmail || props.emails.includes(preparedEmail)) {\n\t\tvalue.value = '';\n\n\t\treturn;\n\t}\n\n\temit('add:email', preparedEmail);\n\n\tvalue.value = '';\n};\n</script>\n\n<template>\n\t<div class=\"top-scheduleEmail\">\n\t\t<div class=\"top-scheduleEmail_title\">\n\t\t\t{{ $i18n.Projects.Reports_send_to_address }} E-mail:\n\t\t</div>\n\n\t\t<div\n\t\t\tv-if=\"!(maxEmailsCount && emails.length === maxEmailsCount)\"\n\t\t\tclass=\"top-scheduleEmail_selector\"\n\t\t>\n\t\t\t<ScheduleEmailSelector\n\t\t\t\tv-model=\"value\"\n\t\t\t\t:getEmailSuggestions=\"getEmailSuggestions\"\n\t\t\t\t:emails=\"emails\"\n\t\t\t\t@submit=\"addEmail\"\n\t\t\t/>\n\t\t</div>\n\n\t\t<div\n\t\t\tv-if=\"emails.length\"\n\t\t\tclass=\"top-scheduleEmail_emails\"\n\t\t>\n\t\t\t<div\n\t\t\t\tclass=\"top-scheduleEmail_emailsItem\"\n\t\t\t\tv-for=\"email in emails\"\n\t\t\t\t:key=\"email\"\n\t\t\t>\n\t\t\t\t{{ email }}\n\n\t\t\t\t<TopButton\n\t\t\t\t\t@click=\"$emit('remove:email', email)\"\n\t\t\t\t\tcolor=\"theme\"\n\t\t\t\t\ticon=\"\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport type { Emits, Props, ReportChannelSource } from '@/components/schedule/schedule/compoents/reportSend/types';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tconnectors: () => [],\n});\ndefineEmits<Emits>();\n\nconst hasChannel = (source: ReportChannelSource) => props.channels.some(channel => channel.source === source);\n\nconst sourceIconBySource: Record<ReportChannelSource, string> = {\n\tinformer: '',\n\ttelegram: '',\n};\n</script>\n\n<template>\n\t<div class=\"top-scheduleReportSend\">\n\t\t<div class=\"top-scheduleReportSend_title\">\n\t\t\t{{ $i18n.Projects.Reports_send }}\n\t\t</div>\n\n\t\t<div class=\"top-scheduleReportSend_channels\">\n\t\t\t<div\n\t\t\t\tclass=\"top-scheduleReportSend_channel\"\n\t\t\t\tv-for=\"channel in channels\"\n\t\t\t\t:key=\"`${channel.source}-${channel.id}`\"\n\t\t\t>\n\t\t\t\t<div class=\"top-scheduleReportSend_channelInfo\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass=\"top-scheduleReportSend_channelInfoIcon\"\n\t\t\t\t\t\t:data-top-icon=\"sourceIconBySource[channel.source]\"\n\t\t\t\t\t></div>\n\n\t\t\t\t\t<div class=\"top-scheduleReportSend_channelInfoLabel\">\n\t\t\t\t\t\t{{ channel.label }}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<TopButton\n\t\t\t\t\t\tv-if=\"channel.settingLink\"\n\t\t\t\t\t\tclass=\"top-scheduleReportSend_channelInfoSettings\"\n\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t:href=\"channel.settingLink\"\n\t\t\t\t\t\ticon=\"\"\n\t\t\t\t\t\tcolor=\"theme\"\n\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t></TopButton>\n\t\t\t\t</div>\n\n\t\t\t\t<TopSwitcher\n\t\t\t\t\t:modelValue=\"channel.selected\"\n\t\t\t\t\t@update:modelValue=\"$emit('update:channelSelected', {\n\t\t\t\t\t\tid: channel.id,\n\t\t\t\t\t\tsource: channel.source,\n\t\t\t\t\t\tselected: $event as boolean,\n\t\t\t\t\t})\"\n\t\t\t\t/>\n\t\t\t</div>\n\n\t\t\t<template\n\t\t\t\tv-for=\"connector in connectors\"\n\t\t\t\t:key=\"connector.source\"\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tv-if=\"!hasChannel(connector.source)\"\n\t\t\t\t\tclass=\"top-scheduleReportSend_channel\"\n\t\t\t\t>\n\t\t\t\t\t<div class=\"top-scheduleReportSend_channelInfo\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"top-scheduleReportSend_channelInfoIcon\"\n\t\t\t\t\t\t\t:data-top-icon=\"sourceIconBySource[connector.source]\"\n\t\t\t\t\t\t></div>\n\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tclass=\"top-scheduleReportSend_channelInfoLabel top-scheduleReportSend_channelInfoLink\"\n\t\t\t\t\t\t\t:href=\"connector.connectLink\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ connector.connectLabel }}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</template>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport type { Emits, Props, ReportChannelSource } from '@/components/schedule/schedule/compoents/reportSend/types';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tconnectors: () => [],\n});\ndefineEmits<Emits>();\n\nconst hasChannel = (source: ReportChannelSource) => props.channels.some(channel => channel.source === source);\n\nconst sourceIconBySource: Record<ReportChannelSource, string> = {\n\tinformer: '',\n\ttelegram: '',\n};\n</script>\n\n<template>\n\t<div class=\"top-scheduleReportSend\">\n\t\t<div class=\"top-scheduleReportSend_title\">\n\t\t\t{{ $i18n.Projects.Reports_send }}\n\t\t</div>\n\n\t\t<div class=\"top-scheduleReportSend_channels\">\n\t\t\t<div\n\t\t\t\tclass=\"top-scheduleReportSend_channel\"\n\t\t\t\tv-for=\"channel in channels\"\n\t\t\t\t:key=\"`${channel.source}-${channel.id}`\"\n\t\t\t>\n\t\t\t\t<div class=\"top-scheduleReportSend_channelInfo\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass=\"top-scheduleReportSend_channelInfoIcon\"\n\t\t\t\t\t\t:data-top-icon=\"sourceIconBySource[channel.source]\"\n\t\t\t\t\t></div>\n\n\t\t\t\t\t<div class=\"top-scheduleReportSend_channelInfoLabel\">\n\t\t\t\t\t\t{{ channel.label }}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<TopButton\n\t\t\t\t\t\tv-if=\"channel.settingLink\"\n\t\t\t\t\t\tclass=\"top-scheduleReportSend_channelInfoSettings\"\n\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t:href=\"channel.settingLink\"\n\t\t\t\t\t\ticon=\"\"\n\t\t\t\t\t\tcolor=\"theme\"\n\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t></TopButton>\n\t\t\t\t</div>\n\n\t\t\t\t<TopSwitcher\n\t\t\t\t\t:modelValue=\"channel.selected\"\n\t\t\t\t\t@update:modelValue=\"$emit('update:channelSelected', {\n\t\t\t\t\t\tid: channel.id,\n\t\t\t\t\t\tsource: channel.source,\n\t\t\t\t\t\tselected: $event as boolean,\n\t\t\t\t\t})\"\n\t\t\t\t/>\n\t\t\t</div>\n\n\t\t\t<template\n\t\t\t\tv-for=\"connector in connectors\"\n\t\t\t\t:key=\"connector.source\"\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tv-if=\"!hasChannel(connector.source)\"\n\t\t\t\t\tclass=\"top-scheduleReportSend_channel\"\n\t\t\t\t>\n\t\t\t\t\t<div class=\"top-scheduleReportSend_channelInfo\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"top-scheduleReportSend_channelInfoIcon\"\n\t\t\t\t\t\t\t:data-top-icon=\"sourceIconBySource[connector.source]\"\n\t\t\t\t\t\t></div>\n\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tclass=\"top-scheduleReportSend_channelInfoLabel top-scheduleReportSend_channelInfoLink\"\n\t\t\t\t\t\t\t:href=\"connector.connectLink\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ connector.connectLabel }}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</template>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport type { Props, Emits, Time } from '@/components/schedule/schedule/compoents/timeSelector/types';\n\ndefineProps<Props>();\ndefineEmits<Emits>();\n\nconst hourOptions = Array.from({ length: 24 }, (_, value) => ({\n\tvalue,\n\ttitle: String(value).padStart(2, '0'),\n}));\nconst minuteOptions = [\n\t{\n\t\tvalue: 0,\n\t\ttitle: '00',\n\t},\n\t{\n\t\tvalue: 15,\n\t\ttitle: '15',\n\t},\n\t{\n\t\tvalue: 30,\n\t\ttitle: '30',\n\t},\n\t{\n\t\tvalue: 45,\n\t\ttitle: '45',\n\t},\n];\n\n</script>\n\n<template>\n\t<div class=\"top-scheduleTimeSelector\">\n\t\t<TopSelect\n\t\t\tclass=\"top-scheduleTimeSelector_hour\"\n\t\t\t:modelValue=\"hour\"\n\t\t\t:options=\"hourOptions\"\n\t\t\t@update:modelValue=\"$emit('update:hour', $event as Time['hour'])\"\n\t\t/>\n\n\t\t<TopSelect\n\t\t\tclass=\"top-scheduleTimeSelector_minute\"\n\t\t\t:modelValue=\"minute\"\n\t\t\t:options=\"minuteOptions\"\n\t\t\t@update:modelValue=\"$emit('update:minute', $event as Time['minute'])\"\n\t\t/>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport type { Props, Emits, Time } from '@/components/schedule/schedule/compoents/timeSelector/types';\n\ndefineProps<Props>();\ndefineEmits<Emits>();\n\nconst hourOptions = Array.from({ length: 24 }, (_, value) => ({\n\tvalue,\n\ttitle: String(value).padStart(2, '0'),\n}));\nconst minuteOptions = [\n\t{\n\t\tvalue: 0,\n\t\ttitle: '00',\n\t},\n\t{\n\t\tvalue: 15,\n\t\ttitle: '15',\n\t},\n\t{\n\t\tvalue: 30,\n\t\ttitle: '30',\n\t},\n\t{\n\t\tvalue: 45,\n\t\ttitle: '45',\n\t},\n];\n\n</script>\n\n<template>\n\t<div class=\"top-scheduleTimeSelector\">\n\t\t<TopSelect\n\t\t\tclass=\"top-scheduleTimeSelector_hour\"\n\t\t\t:modelValue=\"hour\"\n\t\t\t:options=\"hourOptions\"\n\t\t\t@update:modelValue=\"$emit('update:hour', $event as Time['hour'])\"\n\t\t/>\n\n\t\t<TopSelect\n\t\t\tclass=\"top-scheduleTimeSelector_minute\"\n\t\t\t:modelValue=\"minute\"\n\t\t\t:options=\"minuteOptions\"\n\t\t\t@update:modelValue=\"$emit('update:minute', $event as Time['minute'])\"\n\t\t/>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport { toRaw } from 'vue';\nimport type { Props, Emits } from '@/components/schedule/schedule/compoents/timeSelectors/types';\nimport type { Time } from '@/components/schedule/schedule/compoents/timeSelector/types';\nimport TimeSelector from '@/components/schedule/schedule/compoents/timeSelector/timeSelector.vue';\n\nconst props = defineProps<Props>();\nconst emit = defineEmits<Emits>();\nconst timeKeys = new WeakMap<Time, number>();\nlet nextTimeKey = 0;\n\nconst getTimeKey = (rawOrProxyTime: Time) => {\n\t// time может быть proxy или обычным объектом\n\tconst time = toRaw(rawOrProxyTime);\n\n\tconst existingKey = timeKeys.get(time);\n\tif (existingKey !== undefined) return existingKey;\n\n\tconst key = nextTimeKey++;\n\ttimeKeys.set(time, key);\n\n\treturn key;\n};\n\nconst updateTime = (index: number, patch: Partial<Props['times'][number]>) => {\n\tconst updatedTimes = props.times.map((time, i) => {\n\t\tif (i !== index) return time;\n\n\t\tconst updatedTime = { ...time, ...patch };\n\t\ttimeKeys.set(updatedTime, getTimeKey(time));\n\n\t\treturn updatedTime;\n\t});\n\n\temit('update:times', updatedTimes);\n};\n\nconst addTime = () => {\n\tconst time: Time = { hour: 0, minute: 0 };\n\tconst updatedTimes = [\n\t\t...props.times,\n\t\ttime,\n\t];\n\n\temit('update:times', updatedTimes);\n};\n\n</script>\n\n<template>\n\t<div class=\"top-scheduleTimeSelectors\">\n\t\t<div\n\t\t\tclass=\"top-scheduleTimeSelectors_item\"\n\t\t\tv-for=\"(time, index) in times\"\n\t\t\t:key=\"getTimeKey(time)\"\n\t\t>\n\t\t\t<TimeSelector\n\t\t\t\t:hour=\"time.hour\"\n\t\t\t\t:minute=\"time.minute\"\n\t\t\t\t@update:hour=\"updateTime(index, { hour: $event as Time['hour'] })\"\n\t\t\t\t@update:minute=\"updateTime(index, { minute: $event as Time['minute'] })\"\n\t\t\t/>\n\n\t\t\t<TopButton\n\t\t\t\tv-if=\"index !== times.length - 1\"\n\t\t\t\t@click=\"$emit('update:times', times.filter((_, i) => i !== index))\"\n\t\t\t\tcolor=\"theme\"\n\t\t\t\ticon=\"\"\n\t\t\t/>\n\n\t\t\t<TopButton\n\t\t\t\tv-else\n\t\t\t\tclass=\"top-scheduleTimeSelectors_itemAdd\"\n\t\t\t\t@click=\"addTime\"\n\t\t\t\tcolor=\"theme\"\n\t\t\t\ticon=\"\"\n\t\t\t/>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport { toRaw } from 'vue';\nimport type { Props, Emits } from '@/components/schedule/schedule/compoents/timeSelectors/types';\nimport type { Time } from '@/components/schedule/schedule/compoents/timeSelector/types';\nimport TimeSelector from '@/components/schedule/schedule/compoents/timeSelector/timeSelector.vue';\n\nconst props = defineProps<Props>();\nconst emit = defineEmits<Emits>();\nconst timeKeys = new WeakMap<Time, number>();\nlet nextTimeKey = 0;\n\nconst getTimeKey = (rawOrProxyTime: Time) => {\n\t// time может быть proxy или обычным объектом\n\tconst time = toRaw(rawOrProxyTime);\n\n\tconst existingKey = timeKeys.get(time);\n\tif (existingKey !== undefined) return existingKey;\n\n\tconst key = nextTimeKey++;\n\ttimeKeys.set(time, key);\n\n\treturn key;\n};\n\nconst updateTime = (index: number, patch: Partial<Props['times'][number]>) => {\n\tconst updatedTimes = props.times.map((time, i) => {\n\t\tif (i !== index) return time;\n\n\t\tconst updatedTime = { ...time, ...patch };\n\t\ttimeKeys.set(updatedTime, getTimeKey(time));\n\n\t\treturn updatedTime;\n\t});\n\n\temit('update:times', updatedTimes);\n};\n\nconst addTime = () => {\n\tconst time: Time = { hour: 0, minute: 0 };\n\tconst updatedTimes = [\n\t\t...props.times,\n\t\ttime,\n\t];\n\n\temit('update:times', updatedTimes);\n};\n\n</script>\n\n<template>\n\t<div class=\"top-scheduleTimeSelectors\">\n\t\t<div\n\t\t\tclass=\"top-scheduleTimeSelectors_item\"\n\t\t\tv-for=\"(time, index) in times\"\n\t\t\t:key=\"getTimeKey(time)\"\n\t\t>\n\t\t\t<TimeSelector\n\t\t\t\t:hour=\"time.hour\"\n\t\t\t\t:minute=\"time.minute\"\n\t\t\t\t@update:hour=\"updateTime(index, { hour: $event as Time['hour'] })\"\n\t\t\t\t@update:minute=\"updateTime(index, { minute: $event as Time['minute'] })\"\n\t\t\t/>\n\n\t\t\t<TopButton\n\t\t\t\tv-if=\"index !== times.length - 1\"\n\t\t\t\t@click=\"$emit('update:times', times.filter((_, i) => i !== index))\"\n\t\t\t\tcolor=\"theme\"\n\t\t\t\ticon=\"\"\n\t\t\t/>\n\n\t\t\t<TopButton\n\t\t\t\tv-else\n\t\t\t\tclass=\"top-scheduleTimeSelectors_itemAdd\"\n\t\t\t\t@click=\"addTime\"\n\t\t\t\tcolor=\"theme\"\n\t\t\t\ticon=\"\"\n\t\t\t/>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EASA,IAAM,IAAQ,GAMR,IAAO,EAAQ,GACf,IAAiB;GACtB,OAAS,EAAK,SAAS;GACvB,QAAU,EAAK,SAAS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client<Api.TV.Paths, true>;
40
- service: 'keywords_2' | 'keywordsAi_2';
40
+ service?: 'keywords_2' | 'keywordsAi_2';
41
41
  }
42
42
  export interface Emits {
43
43
  addGroup: [group: Group];
@@ -0,0 +1,2 @@
1
+ import { Story } from '../../groupSelector.stories';
2
+ export declare const playSelectGroup: NonNullable<Story['play']>;
@@ -137,7 +137,7 @@ export interface Props {
137
137
  *
138
138
  * Используется совместно с props.client
139
139
  */
140
- service?: 'keywords_2' | 'keywordsAi_2';
140
+ service?: GroupsProps['service'];
141
141
  }
142
142
  export type Emits = {
143
143
  /**
@@ -128,6 +128,7 @@ export declare const genApiGetProjects: (client: Api.Client<Api.TV.Paths, true>)
128
128
  ai_tracker_context_lang?: any;
129
129
  ai_tracker_context_location?: any;
130
130
  ai_tracker_summary_count_mentioned?: any;
131
+ ai_tracker_summary_visibility?: any;
131
132
  guest_link_right_summary?: number | null;
132
133
  guest_link_right_charts?: number | null;
133
134
  guest_link_right_competitors?: number | null;
@@ -141,7 +142,6 @@ export declare const genApiGetProjects: (client: Api.Client<Api.TV.Paths, true>)
141
142
  show_models?: boolean;
142
143
  include_positions_summary?: boolean | null;
143
144
  include_ai_tracker_summary?: boolean;
144
- include_positions_summary_params?: unknown[] | null;
145
145
  is_task?: boolean | null;
146
146
  fields?: unknown[];
147
147
  orders?: unknown[];
@@ -241,6 +241,7 @@ export declare const genApiGetProjects: (client: Api.Client<Api.TV.Paths, true>)
241
241
  ai_tracker_context_lang?: any;
242
242
  ai_tracker_context_location?: any;
243
243
  ai_tracker_summary_count_mentioned?: any;
244
+ ai_tracker_summary_visibility?: any;
244
245
  guest_link_right_summary?: number | null;
245
246
  guest_link_right_charts?: number | null;
246
247
  guest_link_right_competitors?: number | null;
@@ -0,0 +1,19 @@
1
+ import { TriggerType } from '../../types';
2
+ export interface Props {
3
+ modelValue: Array<string | number>;
4
+ /**
5
+ * Режим отображения календаря
6
+ */
7
+ mode: Extract<TriggerType, 'dayOfWeek' | 'dayOfMonth'>;
8
+ }
9
+ export interface Emits {
10
+ (e: 'update:modelValue', value: Props['modelValue']): void;
11
+ }
12
+ export type Day = {
13
+ value: number | string;
14
+ title: string;
15
+ /**
16
+ * Является ли title - иконкой
17
+ */
18
+ isIcon?: boolean;
19
+ };
@@ -0,0 +1,10 @@
1
+ import { Day, Props } from './types';
2
+ /**
3
+ * Количество дней в месяце
4
+ */
5
+ export declare const COUNT_DAYS_IN_MONTS = 27;
6
+ /**
7
+ * Количество дней в неделе
8
+ */
9
+ export declare const COUNT_DAYS_IN_WEEK = 7;
10
+ export declare const genDaysByCalendarMode: (mode: Props["mode"]) => Day[];
@@ -0,0 +1,13 @@
1
+ import { EmailSuggestionsGetter } from '../types';
2
+ export interface Props {
3
+ modelValue: string;
4
+ emails?: string[];
5
+ /**
6
+ * Получение поисковых подсказок при вводе Email
7
+ */
8
+ getEmailSuggestions?: EmailSuggestionsGetter;
9
+ }
10
+ export interface Emits {
11
+ (e: 'update:modelValue', value: string): void;
12
+ (e: 'submit', value: string): void;
13
+ }
@@ -0,0 +1,13 @@
1
+ export type EmailSuggestionsGetter = (search: string) => string[] | Promise<string[]>;
2
+ export interface Props {
3
+ emails: string[];
4
+ getEmailSuggestions?: EmailSuggestionsGetter;
5
+ /**
6
+ * Максимальное число email
7
+ */
8
+ maxEmailsCount?: number;
9
+ }
10
+ export interface Emits {
11
+ (e: 'add:email', value: string): void;
12
+ (e: 'remove:email', value: string): void;
13
+ }
@@ -0,0 +1,23 @@
1
+ export type ReportChannelSource = 'telegram' | 'informer' | (string & {});
2
+ export type Channel = {
3
+ id: string | number;
4
+ source: ReportChannelSource;
5
+ label: string;
6
+ selected: boolean;
7
+ settingLink?: string;
8
+ };
9
+ export type Connector = {
10
+ source: ReportChannelSource;
11
+ connectLabel: string;
12
+ connectLink: string;
13
+ };
14
+ export interface Props {
15
+ channels: Channel[];
16
+ connectors?: Connector[];
17
+ }
18
+ export type ChannelSelectedChange = Pick<Channel, 'id' | 'source'> & {
19
+ selected: boolean;
20
+ };
21
+ export interface Emits {
22
+ (e: 'update:channelSelected', value: ChannelSelectedChange): void;
23
+ }
@@ -0,0 +1,14 @@
1
+ export type Hour = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23;
2
+ export type Minute = 0 | 15 | 30 | 45;
3
+ export type Time = {
4
+ hour: Hour;
5
+ minute: Minute;
6
+ };
7
+ export interface Props {
8
+ hour: Time['hour'];
9
+ minute: Time['minute'];
10
+ }
11
+ export interface Emits {
12
+ (e: 'update:hour', value: Time['hour']): void;
13
+ (e: 'update:minute', value: Time['minute']): void;
14
+ }
@@ -0,0 +1,7 @@
1
+ import { Time } from '../timeSelector/types';
2
+ export interface Props {
3
+ times: Time[];
4
+ }
5
+ export interface Emits {
6
+ (e: 'update:times', value: Props['times']): void;
7
+ }
@@ -0,0 +1,25 @@
1
+ import { Option as TopSelectOption } from '../../forms/select/types';
2
+ export type TriggerType = 'onDemand' | 'dayOfWeek' | 'dayOfMonth' | 'afterYandexUpdated' | 'afterCheck';
3
+ export type TriggerTypeOption = Omit<TopSelectOption, 'value'> & {
4
+ value: TriggerType;
5
+ };
6
+ export interface Props {
7
+ styling: 'track' | 'report' | 'neutral';
8
+ /**
9
+ * Тип тригера
10
+ */
11
+ triggerType: TriggerType;
12
+ /**
13
+ * Типы тригера
14
+ */
15
+ triggerTypeOptions: TriggerTypeOption[];
16
+ /**
17
+ * Кастомный заголовок.
18
+ *
19
+ * Имеет приоритет над дефолтными заголовками
20
+ */
21
+ title?: string;
22
+ }
23
+ export interface Emits {
24
+ (e: 'update:triggerType', value: TriggerType): void;
25
+ }
@@ -0,0 +1,8 @@
1
+ export { default as TopSchedule } from './schedule/schedule.vue';
2
+ export { default as TopScheduleContainer } from './schedule/compoents/container/container.vue';
3
+ export { default as TopScheduleCalendar } from './schedule/compoents/calendar/calendar.vue';
4
+ export { default as TopScheduleEmail } from './schedule/compoents/email/email.vue';
5
+ export { default as TopScheduleEmailSelector } from './schedule/compoents/email/selector/selector.vue';
6
+ export { default as TopScheduleReportSend } from './schedule/compoents/reportSend/reportSend.vue';
7
+ export { default as TopScheduleTimeSelector } from './schedule/compoents/timeSelector/timeSelector.vue';
8
+ export { default as TopScheduleTimeSelectors } from './schedule/compoents/timeSelectors/timeSelectors.vue';
@@ -1,2 +1,2 @@
1
- define([`require`,`exports`,`../.chunks/forms-DKVIpGnH.amd`,`../utils/system.amd`,`../utils/route.amd`,`../.chunks/store-DjQAOnrn.amd`,`../.chunks/popup-CtiL5V44.amd`,`vue`,`../require/css.amd!../assets/tabsView.css`],function(e,t,n,r,i,a,o,s){"use strict";if(c===void 0)var c=window.Vue;Object.defineProperty(t,"__esModule",{value:!0}),t.TopTabsViewMenuTitle=t.TopTabsViewMenuItem=t.TopTabsView=void 0;var l=(e,t)=>`top:${String(e)}:${t}`,u={loadLocalStorge:(e,t)=>{if(!t.$id)return;let n=l(e,t.$id);try{let r=JSON.parse(localStorage.getItem(n));typeof r==typeof t[e]&&(t[e]=r)}catch{console.warn(Error(`В localStorage[${n}] не корректный json`))}},addSaverLocalStorge:(e,t)=>{if(!t.$id)return;let n=l(e,t.$id);(0,s.watch)(()=>t[e],()=>{localStorage.setItem(n,JSON.stringify(t[e]))},{immediate:!0})}},d=new Set;addEventListener(`popstate`,e=>{d.forEach(t=>t(e))});var f=Symbol(),p=(e,t)=>{let r=(0,a.t)(f,()=>({showMenuInPopup:(0,s.computed)(()=>e.showMenuInPopup??n.O.state.isMobile),pageMod:(0,s.computed)(()=>e.pageMod),isShort:(0,s.ref)(!1),activeItemName:t,component:(0,s.ref)(void 0),scrollable:(0,s.ref)(!0)}),e.idState);if(e.isShortable){let e=`isShort`;u.loadLocalStorge(e,r),u.addSaverLocalStorge(e,r)}return r.$id&&d.add(e=>{t.value=(0,i.getHash)(r.$id)}),r},m=()=>(0,a.r)(f),h={key:1,class:`top-ellipsis`},g=(0,s.defineComponent)({__name:`menuItem`,props:{name:{},href:{},icon:{},disabled:{type:Boolean},component:{default:void 0},scrollable:{type:Boolean,default:!0}},setup(e){let t=e,n=m(),r=(0,s.computed)(()=>t.name&&n.$id?(0,i.genHash)(n.$id,t.name):t.href),a=(0,s.computed)(()=>n.showMenuInPopup?o.o:r?`a`:`button`),c=e=>{!t.href&&r.value&&e.preventDefault(),t.name&&(n.activeItemName=t.name)};return(t,i)=>((0,s.openBlock)(),(0,s.createBlock)((0,s.resolveDynamicComponent)(a.value),{target:`_self`,class:(0,s.normalizeClass)({"top-tabsView_menuItem":!(0,s.unref)(n).showMenuInPopup,"top-active":e.name&&(0,s.unref)(n).activeItemName===e.name,"top-disabled":e.disabled,"top-spa-disabled":!0}),href:r.value,"data-top-icon":e.icon||void 0,disabled:e.disabled||void 0,onClick:c},{default:(0,s.withCtx)(()=>[(0,s.unref)(n).showMenuInPopup?(0,s.renderSlot)(t.$slots,`default`,{key:0}):t.$slots.default&&!(0,s.unref)(n).isShort?((0,s.openBlock)(),(0,s.createElementBlock)(`span`,h,[(0,s.renderSlot)(t.$slots,`default`)])):(0,s.createCommentVNode)(``,!0)]),_:3},8,[`class`,`href`,`data-top-icon`,`disabled`]))}}),_=e=>e?.name===`AsyncComponentWrapper`&&!e?.__asyncResolved,v=async(e,t)=>{e?.name===`AsyncComponentWrapper`&&(e?.__asyncResolved||(e.__asyncLoader(),await(0,r.sleepWhile)(()=>t()&&_(e),200)))},y={class:`top-tabsView_menuOpener`},b=[`data-top-icon`],x={class:`top-ellipsis`},S={class:`top-tabsView_menuList`},C={key:0,class:`top-tabsView_menuFooter`},w=(0,s.defineComponent)({__name:`menu`,props:(0,s.mergeModels)({isShortable:{type:Boolean},isLoading:{type:Boolean}},{isLoading:{},isLoadingModifiers:{}}),emits:[`update:isLoading`],setup(e){let t=(0,s.useModel)(e,`isLoading`),n=m(),r=(0,s.useSlots)(),a=new Map,c=()=>{if(!r.default)return;let e=r.default({}).find(e=>e.key===`_menu`);e&&l(e.children)},l=e=>{e.forEach(e=>{if(e.type.__name&&e.type.__name!==g.__name)return;if(!e.type.__name&&typeof e.children==`object`){l(e.children);return}if(!e.props?.name||e.props?.disabled)return;let t={title:(e.children.default?.()[0].children).trim(),icon:e.props.icon,component:e.props.component?(0,s.markRaw)(e.props.component):g.props.component.default,scrollable:e.props.scrollable??g.props.scrollable.default};a.set(e.props.name,t)})},u=(0,s.ref)(null),d=0;return(0,s.watch)(()=>n.activeItemName,async()=>{let e=++d;if(a.size===0&&c(),a.size===0){n.activeItemName=``;return}if(u.value=a.get(n.activeItemName)??null,!u.value&&n.$id){let e=(0,i.getHash)(n.$id);if(u.value=a.get(e)??null,u.value){n.activeItemName=e;return}}if(!u.value){n.activeItemName=a.keys().next().value;return}if(u.value.component===n.component){t.value=!1;return}n.$id&&(0,i.setHash)(n.$id,n.activeItemName,!1),t.value=!0,await v(u.value.component,()=>e===d),e===d&&(n.scrollable=u.value.scrollable,n.component=u.value.component,u.value&&!n.component&&console.warn(`Компонент вкладки ${n.activeItemName} не найден. Добавьте props.component для пункта меню ${n.activeItemName}.`))},{immediate:!0}),(t,r)=>((0,s.openBlock)(),(0,s.createElementBlock)(`div`,{class:(0,s.normalizeClass)({"top-tabsView_menu":!0,"top-tabsView_menu-inPopup_0":!(0,s.unref)(n).showMenuInPopup,"top-tabsView_menu-inPopup_1":(0,s.unref)(n).showMenuInPopup,"top-tabsView_menu-short":(0,s.unref)(n).isShort&&!(0,s.unref)(n).showMenuInPopup})},[(0,s.unref)(n).showMenuInPopup?((0,s.openBlock)(),(0,s.createBlock)((0,s.unref)(o.s),{key:0},{opener:(0,s.withCtx)(()=>[(0,s.createElementVNode)(`div`,y,[u.value?((0,s.openBlock)(),(0,s.createElementBlock)(`div`,{key:0,class:`top-tabsView_menuOpenerActiveItem`,"data-top-icon":u.value.icon},[(0,s.createElementVNode)(`span`,x,(0,s.toDisplayString)(u.value.title),1)],8,b)):(0,s.createCommentVNode)(``,!0),r[1]||=(0,s.createElementVNode)(`div`,{class:`top-tabsView_menuOpenerIcon`,"data-top-icon":``},null,-1)])]),contentList:(0,s.withCtx)(()=>[(0,s.renderSlot)(t.$slots,`default`)]),_:3})):((0,s.openBlock)(),(0,s.createElementBlock)(s.Fragment,{key:1},[(0,s.createElementVNode)(`div`,S,[(0,s.renderSlot)(t.$slots,`default`)]),e.isShortable?((0,s.openBlock)(),(0,s.createElementBlock)(`div`,C,[e.isShortable?((0,s.openBlock)(),(0,s.createBlock)(g,{key:0,icon:(0,s.unref)(n).isShort?``:``,onClick:r[0]||=e=>(0,s.unref)(n).isShort=!(0,s.unref)(n).isShort},{default:(0,s.withCtx)(()=>[(0,s.createTextVNode)((0,s.toDisplayString)((0,s.unref)(n).isShort?``:`Свернуть`),1)]),_:1},8,[`icon`])):(0,s.createCommentVNode)(``,!0)])):(0,s.createCommentVNode)(``,!0)],64))],2))}}),T=(0,s.defineComponent)({__name:`tabsView`,props:(0,s.mergeModels)({modelValue:{},pageMod:{type:Boolean},showMenuInPopup:{type:Boolean,default:void 0},isShortable:{type:Boolean,default:!1},idState:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,r=p(t,(0,s.useModel)(e,`modelValue`)),a=Math.random();t.pageMod&&n.O.state.documentClassModificators.set(a,`top-hasTabsViewPageMod`),(0,s.onUnmounted)(()=>{t.pageMod&&n.O.state.documentClassModificators.delete(a),r.$id&&(0,i.delHash)(r.$id,r.activeItemName,!0)});let o=(0,s.ref)(),c=(0,s.ref)(!1);return(0,s.watch)([o,()=>r.component],()=>{c.value=_(r.component)},{immediate:!0}),(i,a)=>((0,s.openBlock)(),(0,s.createElementBlock)(`div`,{class:(0,s.normalizeClass)({"top-tabsView":!0,"top-tabsView-pageMod":t.pageMod,"top-tabsView-inPopup":(0,s.unref)(r).showMenuInPopup})},[(0,s.createVNode)(w,{isShortable:e.isShortable,isLoading:c.value,"onUpdate:isLoading":a[0]||=e=>c.value=e},{default:(0,s.withCtx)(()=>[(0,s.renderSlot)(i.$slots,`menu`)]),_:3},8,[`isShortable`,`isLoading`]),(0,s.createElementVNode)(`div`,{class:(0,s.normalizeClass)({"top-tabsView_contents":!0,"top-tabsView_contents-isLoading":c.value,"top-tabsView_contents-noScrollable":!(0,s.unref)(r).scrollable})},[c.value?((0,s.openBlock)(),(0,s.createBlock)(n.l,{key:0})):(0,s.createCommentVNode)(``,!0),((0,s.openBlock)(),(0,s.createBlock)(s.KeepAlive,null,[((0,s.openBlock)(),(0,s.createBlock)((0,s.resolveDynamicComponent)((0,s.unref)(r).component),{ref_key:`componentRef`,ref:o},null,512))],1024))],2)],2))}}),E={},D={class:`top-tabsView_menuDelimeter`};t.TopTabsViewMenuItem=g,t.TopTabsView=T;function O(e,t){return(0,s.openBlock)(),(0,s.createElementBlock)(`div`,D)}var k=(0,n.u)(E,[[`render`,O]]);t.TopTabsViewMenuTitle=(0,s.defineComponent)({__name:`menuTitle`,props:{isSubtitle:{type:Boolean}},setup(e){let t=m();return(n,r)=>(0,s.unref)(t).showMenuInPopup?((0,s.openBlock)(),(0,s.createBlock)((0,s.unref)(o.o),{key:0,type:`title`},{default:(0,s.withCtx)(()=>[(0,s.renderSlot)(n.$slots,`default`)]),_:3})):(0,s.unref)(t).isShort?((0,s.openBlock)(),(0,s.createBlock)(k,{key:1})):((0,s.openBlock)(),(0,s.createElementBlock)(`div`,{key:2,class:(0,s.normalizeClass)({"top-tabsView_menuTitle":!0,"top-tabsView_menuTitle-subtitle":e.isSubtitle})},[(0,s.renderSlot)(n.$slots,`default`)],2))}})});
1
+ define([`require`,`exports`,`../.chunks/forms-BiKUURH4.amd`,`../utils/system.amd`,`../utils/route.amd`,`../.chunks/store-DjQAOnrn.amd`,`../.chunks/popup-KKfSSrM6.amd`,`vue`,`../require/css.amd!../assets/tabsView.css`],function(e,t,n,r,i,a,o,s){"use strict";if(c===void 0)var c=window.Vue;Object.defineProperty(t,"__esModule",{value:!0}),t.TopTabsViewMenuTitle=t.TopTabsViewMenuItem=t.TopTabsView=void 0;var l=(e,t)=>`top:${String(e)}:${t}`,u={loadLocalStorge:(e,t)=>{if(!t.$id)return;let n=l(e,t.$id);try{let r=JSON.parse(localStorage.getItem(n));typeof r==typeof t[e]&&(t[e]=r)}catch{console.warn(Error(`В localStorage[${n}] не корректный json`))}},addSaverLocalStorge:(e,t)=>{if(!t.$id)return;let n=l(e,t.$id);(0,s.watch)(()=>t[e],()=>{localStorage.setItem(n,JSON.stringify(t[e]))},{immediate:!0})}},d=new Set;addEventListener(`popstate`,e=>{d.forEach(t=>t(e))});var f=Symbol(),p=(e,t)=>{let r=(0,a.t)(f,()=>({showMenuInPopup:(0,s.computed)(()=>e.showMenuInPopup??n.O.state.isMobile),pageMod:(0,s.computed)(()=>e.pageMod),isShort:(0,s.ref)(!1),activeItemName:t,component:(0,s.ref)(void 0),scrollable:(0,s.ref)(!0)}),e.idState);if(e.isShortable){let e=`isShort`;u.loadLocalStorge(e,r),u.addSaverLocalStorge(e,r)}return r.$id&&d.add(e=>{t.value=(0,i.getHash)(r.$id)}),r},m=()=>(0,a.r)(f),h={key:1,class:`top-ellipsis`},g=(0,s.defineComponent)({__name:`menuItem`,props:{name:{},href:{},icon:{},disabled:{type:Boolean},component:{default:void 0},scrollable:{type:Boolean,default:!0}},setup(e){let t=e,n=m(),r=(0,s.computed)(()=>t.name&&n.$id?(0,i.genHash)(n.$id,t.name):t.href),a=(0,s.computed)(()=>n.showMenuInPopup?o.o:r.value?`a`:`button`),c=e=>{!t.href&&r.value&&e.preventDefault(),t.name&&(n.activeItemName=t.name)};return(t,i)=>((0,s.openBlock)(),(0,s.createBlock)((0,s.resolveDynamicComponent)(a.value),{target:`_self`,class:(0,s.normalizeClass)({"top-tabsView_menuItem":!(0,s.unref)(n).showMenuInPopup,"top-active":e.name&&(0,s.unref)(n).activeItemName===e.name,"top-disabled":e.disabled,"top-spa-disabled":!0}),href:r.value,"data-top-icon":e.icon||void 0,disabled:e.disabled||void 0,onClick:c},{default:(0,s.withCtx)(()=>[(0,s.unref)(n).showMenuInPopup?(0,s.renderSlot)(t.$slots,`default`,{key:0}):t.$slots.default&&!(0,s.unref)(n).isShort?((0,s.openBlock)(),(0,s.createElementBlock)(`span`,h,[(0,s.renderSlot)(t.$slots,`default`)])):(0,s.createCommentVNode)(``,!0)]),_:3},8,[`class`,`href`,`data-top-icon`,`disabled`]))}}),_=e=>e?.name===`AsyncComponentWrapper`&&!e?.__asyncResolved,v=async(e,t)=>{e?.name===`AsyncComponentWrapper`&&(e?.__asyncResolved||(e.__asyncLoader(),await(0,r.sleepWhile)(()=>t()&&_(e),200)))},y={class:`top-tabsView_menuOpener`},b=[`data-top-icon`],x={class:`top-ellipsis`},S={class:`top-tabsView_menuList`},C={key:0,class:`top-tabsView_menuFooter`},w=(0,s.defineComponent)({__name:`menu`,props:(0,s.mergeModels)({isShortable:{type:Boolean},isLoading:{type:Boolean}},{isLoading:{},isLoadingModifiers:{}}),emits:[`update:isLoading`],setup(e){let t=(0,s.useModel)(e,`isLoading`),n=m(),r=(0,s.useSlots)(),a=new Map,c=()=>{if(!r.default)return;let e=r.default({}).find(e=>e.key===`_menu`);e&&l(e.children)},l=e=>{e.forEach(e=>{if(e.type.__name&&e.type.__name!==g.__name)return;if(!e.type.__name&&typeof e.children==`object`){l(e.children);return}if(!e.props?.name||e.props?.disabled)return;let t={title:(e.children.default?.()[0].children).trim(),icon:e.props.icon,component:e.props.component?(0,s.markRaw)(e.props.component):g.props.component.default,scrollable:e.props.scrollable??g.props.scrollable.default};a.set(e.props.name,t)})},u=(0,s.ref)(null),d=0;return(0,s.watch)(()=>n.activeItemName,async()=>{let e=++d;if(a.size===0&&c(),a.size===0){n.activeItemName=``;return}if(u.value=a.get(n.activeItemName)??null,!u.value&&n.$id){let e=(0,i.getHash)(n.$id);if(u.value=a.get(e)??null,u.value){n.activeItemName=e;return}}if(!u.value){n.activeItemName=a.keys().next().value;return}if(u.value.component===n.component){t.value=!1;return}n.$id&&(0,i.setHash)(n.$id,n.activeItemName,!1),t.value=!0,await v(u.value.component,()=>e===d),e===d&&(n.scrollable=u.value.scrollable,n.component=u.value.component,u.value&&!n.component&&console.warn(`Компонент вкладки ${n.activeItemName} не найден. Добавьте props.component для пункта меню ${n.activeItemName}.`))},{immediate:!0}),(t,r)=>((0,s.openBlock)(),(0,s.createElementBlock)(`div`,{class:(0,s.normalizeClass)({"top-tabsView_menu":!0,"top-tabsView_menu-inPopup_0":!(0,s.unref)(n).showMenuInPopup,"top-tabsView_menu-inPopup_1":(0,s.unref)(n).showMenuInPopup,"top-tabsView_menu-short":(0,s.unref)(n).isShort&&!(0,s.unref)(n).showMenuInPopup})},[(0,s.unref)(n).showMenuInPopup?((0,s.openBlock)(),(0,s.createBlock)((0,s.unref)(o.s),{key:0},{opener:(0,s.withCtx)(()=>[(0,s.createElementVNode)(`div`,y,[u.value?((0,s.openBlock)(),(0,s.createElementBlock)(`div`,{key:0,class:`top-tabsView_menuOpenerActiveItem`,"data-top-icon":u.value.icon},[(0,s.createElementVNode)(`span`,x,(0,s.toDisplayString)(u.value.title),1)],8,b)):(0,s.createCommentVNode)(``,!0),r[1]||=(0,s.createElementVNode)(`div`,{class:`top-tabsView_menuOpenerIcon`,"data-top-icon":``},null,-1)])]),contentList:(0,s.withCtx)(()=>[(0,s.renderSlot)(t.$slots,`default`)]),_:3})):((0,s.openBlock)(),(0,s.createElementBlock)(s.Fragment,{key:1},[(0,s.createElementVNode)(`div`,S,[(0,s.renderSlot)(t.$slots,`default`)]),e.isShortable?((0,s.openBlock)(),(0,s.createElementBlock)(`div`,C,[e.isShortable?((0,s.openBlock)(),(0,s.createBlock)(g,{key:0,icon:(0,s.unref)(n).isShort?``:``,onClick:r[0]||=e=>(0,s.unref)(n).isShort=!(0,s.unref)(n).isShort},{default:(0,s.withCtx)(()=>[(0,s.createTextVNode)((0,s.toDisplayString)((0,s.unref)(n).isShort?``:`Свернуть`),1)]),_:1},8,[`icon`])):(0,s.createCommentVNode)(``,!0)])):(0,s.createCommentVNode)(``,!0)],64))],2))}}),T=(0,s.defineComponent)({__name:`tabsView`,props:(0,s.mergeModels)({modelValue:{},pageMod:{type:Boolean},showMenuInPopup:{type:Boolean,default:void 0},isShortable:{type:Boolean,default:!1},idState:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,r=p(t,(0,s.useModel)(e,`modelValue`)),a=Math.random();t.pageMod&&n.O.state.documentClassModificators.set(a,`top-hasTabsViewPageMod`),(0,s.onUnmounted)(()=>{t.pageMod&&n.O.state.documentClassModificators.delete(a),r.$id&&(0,i.delHash)(r.$id,r.activeItemName,!0)});let o=(0,s.ref)(),c=(0,s.ref)(!1);return(0,s.watch)([o,()=>r.component],()=>{c.value=_(r.component)},{immediate:!0}),(i,a)=>((0,s.openBlock)(),(0,s.createElementBlock)(`div`,{class:(0,s.normalizeClass)({"top-tabsView":!0,"top-tabsView-pageMod":t.pageMod,"top-tabsView-inPopup":(0,s.unref)(r).showMenuInPopup})},[(0,s.createVNode)(w,{isShortable:e.isShortable,isLoading:c.value,"onUpdate:isLoading":a[0]||=e=>c.value=e},{default:(0,s.withCtx)(()=>[(0,s.renderSlot)(i.$slots,`menu`)]),_:3},8,[`isShortable`,`isLoading`]),(0,s.createElementVNode)(`div`,{class:(0,s.normalizeClass)({"top-tabsView_contents":!0,"top-tabsView_contents-isLoading":c.value,"top-tabsView_contents-noScrollable":!(0,s.unref)(r).scrollable})},[c.value?((0,s.openBlock)(),(0,s.createBlock)(n.l,{key:0})):(0,s.createCommentVNode)(``,!0),((0,s.openBlock)(),(0,s.createBlock)(s.KeepAlive,null,[((0,s.openBlock)(),(0,s.createBlock)((0,s.resolveDynamicComponent)((0,s.unref)(r).component),{ref_key:`componentRef`,ref:o},null,512))],1024))],2)],2))}}),E={},D={class:`top-tabsView_menuDelimeter`};t.TopTabsViewMenuItem=g,t.TopTabsView=T;function O(e,t){return(0,s.openBlock)(),(0,s.createElementBlock)(`div`,D)}var k=(0,n.u)(E,[[`render`,O]]);t.TopTabsViewMenuTitle=(0,s.defineComponent)({__name:`menuTitle`,props:{isSubtitle:{type:Boolean}},setup(e){let t=m();return(n,r)=>(0,s.unref)(t).showMenuInPopup?((0,s.openBlock)(),(0,s.createBlock)((0,s.unref)(o.o),{key:0,type:`title`},{default:(0,s.withCtx)(()=>[(0,s.renderSlot)(n.$slots,`default`)]),_:3})):(0,s.unref)(t).isShort?((0,s.openBlock)(),(0,s.createBlock)(k,{key:1})):((0,s.openBlock)(),(0,s.createElementBlock)(`div`,{key:2,class:(0,s.normalizeClass)({"top-tabsView_menuTitle":!0,"top-tabsView_menuTitle-subtitle":e.isSubtitle})},[(0,s.renderSlot)(n.$slots,`default`)],2))}})});
2
2
  //# sourceMappingURL=tabsView.amd.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["tabsView/tabsView.js","../../src/core/utils/store/localStorage.ts","../../src/components/tabsView/tabsView/store.ts","../../src/components/tabsView/tabsView/menuItem.vue","../../src/components/tabsView/tabsView/utils.ts","../../src/components/tabsView/tabsView/menu.vue","../../src/components/tabsView/tabsView/tabsView.vue","../../src/components/tabsView/tabsView/menuDelimeter.vue","../../src/components/tabsView/tabsView/menuTitle.vue"],"names":["vue","exports","I","L","vue_1","R","z","B","store_DjQAOnrn_esm_js_1","t","forms_DKVIpGnH_esm_js_1","n","route_js_1","V","H","U","i","popup_CtiL5V44_esm_js_1","o","W","G","system_js_1","K","q","J","Y","X","Z","a","c","l","u","Q","r","s","e","$","ee","te","ne"],"mappings":"AAAA,OAAO,CAAC,UAAW,UAAW,gCAAoC,sBAAsB,qBAAqB,gCAAoC,gCAAoC,MAAK,2CAAA,EAAA,SAAa,EAAS,EAAS,EAAyB,EAAa,EAAY,EAAyB,EAAyB,EAAO,CAChU,aAAA,GAAAA,IAAA,OAAA,IAAAA,EAAA,OAAA,IACA,OAAO,eAAeC,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EAC5D,EAAQ,qBAAuB,EAAQ,oBAAsB,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A,CAAA,CAAA,ERuNrE,EAAG,CQlNJ,CAAA,IAAA,EAAAA,EAAA,MAAA,CAAA,CAAA,CAAA,CAAA,UAAA,EAAAA,EAAA,UAAA,CAAA,GAAA,EAAAA,EAAA,YAAA,CAAAmC,EAAA,CAAA,IAAA,CAAA,CAAA,KAAA,EAAAnC,EAAA,UAAA,CAAA,GAAA,EAAAA,EAAA,mBAAA,CAAA,MAAA,CRoNC,IAAK,EACL,OAAQ,EAAGA,EAAM,eAAc,CAAE,CAC7B,yBAA0B,CAAC,EAC3B,kCAAmC,EAAE,UACzC,CAAC,CACL,EAAG,EAAE,EAAGA,EAAM,WAAU,CAAE,EAAE,OAAQ,SAAS,CAAC,EAAG,CAAC,EACtD,CACJ,CACgC,CACpC,CAAC","sourcesContent":["define([\"require\", \"exports\", \"../.chunks/forms-DKVIpGnH.esm.js\", \"../utils/system.js\", \"../utils/route.js\", \"../.chunks/store-DjQAOnrn.esm.js\", \"../.chunks/popup-CtiL5V44.esm.js\", \"vue\"], function (require, exports, forms_DKVIpGnH_esm_js_1, system_js_1, route_js_1, store_DjQAOnrn_esm_js_1, popup_CtiL5V44_esm_js_1, vue_1) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.TopTabsViewMenuTitle = exports.TopTabsViewMenuItem = exports.TopTabsView = void 0;\n //#region src/core/utils/store/localStorage.ts\n var I = (e, t) => `top:${String(e)}:${t}`, L = {\n loadLocalStorge: (e, t) => {\n if (!t.$id)\n return;\n let n = I(e, t.$id);\n try {\n let r = JSON.parse(localStorage.getItem(n));\n typeof r == typeof t[e] && (t[e] = r);\n }\n catch {\n console.warn(/* @__PURE__ */ Error(`В localStorage[${n}] не корректный json`));\n }\n },\n addSaverLocalStorge: (e, t) => {\n if (!t.$id)\n return;\n let n = I(e, t.$id);\n (0, vue_1.watch)(() => t[e], () => {\n localStorage.setItem(n, JSON.stringify(t[e]));\n }, { immediate: !0 });\n }\n }, R = /* @__PURE__ */ new Set();\n addEventListener(\"popstate\", (e) => {\n R.forEach((t) => t(e));\n });\n var z = Symbol(), B = (t, n) => {\n let r = (0, store_DjQAOnrn_esm_js_1.t)(z, () => ({\n showMenuInPopup: (0, vue_1.computed)(() => t.showMenuInPopup ?? forms_DKVIpGnH_esm_js_1.O.state.isMobile),\n pageMod: (0, vue_1.computed)(() => t.pageMod),\n isShort: (0, vue_1.ref)(!1),\n activeItemName: n,\n component: (0, vue_1.ref)(void 0),\n scrollable: (0, vue_1.ref)(!0)\n }), t.idState);\n if (t.isShortable) {\n let e = \"isShort\";\n L.loadLocalStorge(e, r), L.addSaverLocalStorge(e, r);\n }\n return r.$id && R.add((e) => {\n n.value = (0, route_js_1.getHash)(r.$id);\n }), r;\n }, V = () => (0, store_DjQAOnrn_esm_js_1.r)(z), H = {\n key: 1,\n class: \"top-ellipsis\"\n }, U = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"menuItem\",\n props: {\n name: {},\n href: {},\n icon: {},\n disabled: { type: Boolean },\n component: { default: void 0 },\n scrollable: {\n type: Boolean,\n default: !0\n }\n },\n setup(e) {\n let t = e, n = V(), r = (0, vue_1.computed)(() => t.name && n.$id ? (0, route_js_1.genHash)(n.$id, t.name) : t.href), i = (0, vue_1.computed)(() => n.showMenuInPopup ? popup_CtiL5V44_esm_js_1.o : r ? \"a\" : \"button\"), o = (e) => {\n !t.href && r.value && e.preventDefault(), t.name && (n.activeItemName = t.name);\n };\n return (t, a) => ((0, vue_1.openBlock)(), (0, vue_1.createBlock)((0, vue_1.resolveDynamicComponent)(i.value), {\n target: \"_self\",\n class: (0, vue_1.normalizeClass)({\n \"top-tabsView_menuItem\": !(0, vue_1.unref)(n).showMenuInPopup,\n \"top-active\": e.name && (0, vue_1.unref)(n).activeItemName === e.name,\n \"top-disabled\": e.disabled,\n \"top-spa-disabled\": !0\n }),\n href: r.value,\n \"data-top-icon\": e.icon || void 0,\n disabled: e.disabled || void 0,\n onClick: o\n }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.unref)(n).showMenuInPopup ? (0, vue_1.renderSlot)(t.$slots, \"default\", { key: 0 }) : t.$slots.default && !(0, vue_1.unref)(n).isShort ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"span\", H, [(0, vue_1.renderSlot)(t.$slots, \"default\")])) : (0, vue_1.createCommentVNode)(\"\", !0)]),\n _: 3\n }, 8, [\n \"class\",\n \"href\",\n \"data-top-icon\",\n \"disabled\"\n ]));\n }\n }), W = (e) => e?.name === \"AsyncComponentWrapper\" && !e?.__asyncResolved, G = async (e, t) => {\n e?.name === \"AsyncComponentWrapper\" && (e?.__asyncResolved || (e.__asyncLoader(), await (0, system_js_1.sleepWhile)(() => t() && W(e), 200)));\n }, K = { class: \"top-tabsView_menuOpener\" }, q = [\"data-top-icon\"], J = { class: \"top-ellipsis\" }, Y = { class: \"top-tabsView_menuList\" }, X = {\n key: 0,\n class: \"top-tabsView_menuFooter\"\n }, Z = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"menu\",\n props: /*@__PURE__*/ (0, vue_1.mergeModels)({\n isShortable: { type: Boolean },\n isLoading: { type: Boolean }\n }, {\n isLoading: {},\n isLoadingModifiers: {}\n }),\n emits: [\"update:isLoading\"],\n setup(e) {\n let t = (0, vue_1.useModel)(e, \"isLoading\"), n = V(), r = (0, vue_1.useSlots)(), i = /* @__PURE__ */ new Map(), a = () => {\n if (!r.default)\n return;\n let e = r.default({}).find((e) => e.key === \"_menu\");\n e && c(e.children);\n }, c = (e) => {\n e.forEach((e) => {\n if (e.type.__name && e.type.__name !== U.__name)\n return;\n if (!e.type.__name && typeof e.children == \"object\") {\n c(e.children);\n return;\n }\n if (!e.props?.name || e.props?.disabled)\n return;\n let t = {\n title: (e.children.default?.()[0].children).trim(),\n icon: e.props.icon,\n component: e.props.component ? (0, vue_1.markRaw)(e.props.component) : U.props.component.default,\n scrollable: e.props.scrollable ?? U.props.scrollable.default\n };\n i.set(e.props.name, t);\n });\n }, l = (0, vue_1.ref)(null), u = 0;\n return (0, vue_1.watch)(() => n.activeItemName, async () => {\n let e = ++u;\n if (i.size === 0 && a(), i.size === 0) {\n n.activeItemName = \"\";\n return;\n }\n if (l.value = i.get(n.activeItemName) ?? null, !l.value && n.$id) {\n let e = (0, route_js_1.getHash)(n.$id);\n if (l.value = i.get(e) ?? null, l.value) {\n n.activeItemName = e;\n return;\n }\n }\n if (!l.value) {\n n.activeItemName = i.keys().next().value;\n return;\n }\n if (l.value.component === n.component) {\n t.value = !1;\n return;\n }\n n.$id && (0, route_js_1.setHash)(n.$id, n.activeItemName, !1), t.value = !0, await G(l.value.component, () => e === u), e === u && (n.scrollable = l.value.scrollable, n.component = l.value.component, l.value && !n.component && console.warn(`Компонент вкладки ${n.activeItemName} не найден. Добавьте props.component для пункта меню ${n.activeItemName}.`));\n }, { immediate: !0 }), (t, r) => ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", { class: (0, vue_1.normalizeClass)({\n \"top-tabsView_menu\": !0,\n \"top-tabsView_menu-inPopup_0\": !(0, vue_1.unref)(n).showMenuInPopup,\n \"top-tabsView_menu-inPopup_1\": (0, vue_1.unref)(n).showMenuInPopup,\n \"top-tabsView_menu-short\": (0, vue_1.unref)(n).isShort && !(0, vue_1.unref)(n).showMenuInPopup\n }) }, [(0, vue_1.unref)(n).showMenuInPopup ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)((0, vue_1.unref)(popup_CtiL5V44_esm_js_1.s), { key: 0 }, {\n opener: (0, vue_1.withCtx)(() => [(0, vue_1.createElementVNode)(\"div\", K, [l.value ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", {\n key: 0,\n class: \"top-tabsView_menuOpenerActiveItem\",\n \"data-top-icon\": l.value.icon\n }, [(0, vue_1.createElementVNode)(\"span\", J, (0, vue_1.toDisplayString)(l.value.title), 1)], 8, q)) : (0, vue_1.createCommentVNode)(\"\", !0), r[1] ||= (0, vue_1.createElementVNode)(\"div\", {\n class: \"top-tabsView_menuOpenerIcon\",\n \"data-top-icon\": \"\"\n }, null, -1)])]),\n contentList: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(t.$slots, \"default\")]),\n _: 3\n })) : ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(vue_1.Fragment, { key: 1 }, [(0, vue_1.createElementVNode)(\"div\", Y, [(0, vue_1.renderSlot)(t.$slots, \"default\")]), e.isShortable ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", X, [e.isShortable ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(U, {\n key: 0,\n icon: (0, vue_1.unref)(n).isShort ? \"\" : \"\",\n onClick: r[0] ||= (e) => (0, vue_1.unref)(n).isShort = !(0, vue_1.unref)(n).isShort\n }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.createTextVNode)((0, vue_1.toDisplayString)((0, vue_1.unref)(n).isShort ? \"\" : \"Свернуть\"), 1)]),\n _: 1\n }, 8, [\"icon\"])) : (0, vue_1.createCommentVNode)(\"\", !0)])) : (0, vue_1.createCommentVNode)(\"\", !0)], 64))], 2));\n }\n }), Q = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"tabsView\",\n props: /*@__PURE__*/ (0, vue_1.mergeModels)({\n modelValue: {},\n pageMod: { type: Boolean },\n showMenuInPopup: {\n type: Boolean,\n default: void 0\n },\n isShortable: {\n type: Boolean,\n default: !1\n },\n idState: {}\n }, {\n modelValue: {},\n modelModifiers: {}\n }),\n emits: [\"update:modelValue\"],\n setup(n) {\n let r = n, a = B(r, (0, vue_1.useModel)(n, \"modelValue\")), o = Math.random();\n r.pageMod && forms_DKVIpGnH_esm_js_1.O.state.documentClassModificators.set(o, \"top-hasTabsViewPageMod\"), (0, vue_1.onUnmounted)(() => {\n r.pageMod && forms_DKVIpGnH_esm_js_1.O.state.documentClassModificators.delete(o), a.$id && (0, route_js_1.delHash)(a.$id, a.activeItemName, !0);\n });\n let s = (0, vue_1.ref)(), c = (0, vue_1.ref)(!1);\n return (0, vue_1.watch)([s, () => a.component], () => {\n c.value = W(a.component);\n }, { immediate: !0 }), (e, i) => ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", { class: (0, vue_1.normalizeClass)({\n \"top-tabsView\": !0,\n \"top-tabsView-pageMod\": r.pageMod,\n \"top-tabsView-inPopup\": (0, vue_1.unref)(a).showMenuInPopup\n }) }, [(0, vue_1.createVNode)(Z, {\n isShortable: n.isShortable,\n isLoading: c.value,\n \"onUpdate:isLoading\": i[0] ||= (e) => c.value = e\n }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(e.$slots, \"menu\")]),\n _: 3\n }, 8, [\"isShortable\", \"isLoading\"]), (0, vue_1.createElementVNode)(\"div\", { class: (0, vue_1.normalizeClass)({\n \"top-tabsView_contents\": !0,\n \"top-tabsView_contents-isLoading\": c.value,\n \"top-tabsView_contents-noScrollable\": !(0, vue_1.unref)(a).scrollable\n }) }, [c.value ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(forms_DKVIpGnH_esm_js_1.l, { key: 0 })) : (0, vue_1.createCommentVNode)(\"\", !0), ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(vue_1.KeepAlive, null, [((0, vue_1.openBlock)(), (0, vue_1.createBlock)((0, vue_1.resolveDynamicComponent)((0, vue_1.unref)(a).component), {\n ref_key: \"componentRef\",\n ref: s\n }, null, 512))], 1024))], 2)], 2));\n }\n }), $ = {}, ee = { class: \"top-tabsView_menuDelimeter\" };\n exports.TopTabsViewMenuItem = U;\n exports.TopTabsView = Q;\n function te(e, t) {\n return (0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", ee);\n }\n var ne = /*#__PURE__*/ (0, forms_DKVIpGnH_esm_js_1.u)($, [[\"render\", te]]), re = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"menuTitle\",\n props: { isSubtitle: { type: Boolean } },\n setup(e) {\n let t = V();\n return (n, r) => (0, vue_1.unref)(t).showMenuInPopup ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)((0, vue_1.unref)(popup_CtiL5V44_esm_js_1.o), {\n key: 0,\n type: \"title\"\n }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(n.$slots, \"default\")]),\n _: 3\n })) : (0, vue_1.unref)(t).isShort ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(ne, { key: 1 })) : ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", {\n key: 2,\n class: (0, vue_1.normalizeClass)({\n \"top-tabsView_menuTitle\": !0,\n \"top-tabsView_menuTitle-subtitle\": e.isSubtitle\n })\n }, [(0, vue_1.renderSlot)(n.$slots, \"default\")], 2));\n }\n });\n exports.TopTabsViewMenuTitle = re;\n});\n//# sourceMappingURL=tabsView.js.map\n","import { watch } from 'vue';\nimport type { Store } from './store';\n\n/**\n * Сгенерировать имя для сохранения данных в localStorage\n * @param stateName - имя свойства состояния\n * @param stateKey - ключ состояния, разные компоненты могут использовать одинаковый ключ\n */\nconst genStorageKey = <T extends Store>(stateName: keyof T, stateKey: string): string => {\n\tconst stateNameString = String(stateName);\n\n\treturn `top:${stateNameString}:${stateKey}`;\n};\n\n/**\n * Загрузить состояние\n * @param stateName - имя свойства состояния\n * @param store\n */\nconst loadLocalStorge = <T extends Store>(stateName: keyof T, store: T) => {\n\t// если Store.key не знадан, значит сохранение состояния в компоненте отключено\n\tif (!store.$id) return;\n\n\tconst localStorageKey = genStorageKey(stateName, store.$id);\n\n\ttry {\n\t\tconst localStorageValue: typeof store[keyof typeof store] = JSON.parse(localStorage.getItem(localStorageKey) as string);\n\n\t\tif (typeof localStorageValue === typeof store[stateName]) {\n\t\t\tstore[stateName] = localStorageValue;\n\t\t}\n\t} catch (e) {\n\t\tconsole.warn(new Error(`В localStorage[${localStorageKey}] не корректный json`));\n\t}\n};\n\n/**\n * Добавить автосохранение состояние при его изменении\n * @param stateName - имя свойства состояния\n * @param store\n */\nconst addSaverLocalStorge = <T extends Store>(stateName: keyof T, store: T) => {\n\t// если store.$id не знадан, значит сохранение состояния в компоненте отключено\n\tif (!store.$id) return;\n\n\tconst localStorageKey = genStorageKey(stateName, store.$id);\n\n\twatch(() => store[stateName], () => {\n\t\tlocalStorage.setItem(localStorageKey, JSON.stringify(store[stateName]));\n\t}, { immediate: true });\n};\n\nexport default {\n\tloadLocalStorge,\n\taddSaverLocalStorge,\n};","import type { InjectionKey, ModelRef, UnwrapNestedRefs } from 'vue';\nimport { computed, ref } from 'vue';\nimport Core from '@/core/core/core';\nimport { defineStore, useStore, type Store as DefineStore } from '@/core/utils/store';\nimport StoreLocalStorage from '@/core/utils/store/localStorage';\nimport type { Props, Store } from './types';\nimport { getHash } from '@/core/utils/route';\n\nconst popstateCallbacks = new Set<(e: PopStateEvent) => void>();\n\naddEventListener('popstate', (e) => {\n\tpopstateCallbacks.forEach(popstateCallback => popstateCallback(e));\n});\n\nexport const injectionKey = Symbol() as InjectionKey<Store>;\n\n/**\n * Инициировать Store компонента\n */\nexport const defineTabsStore = (props: Props, model: ModelRef<string | undefined>): UnwrapNestedRefs<Store> & DefineStore => {\n\tconst store = defineStore(injectionKey, () => {\n\t\tconst showMenuInPopup = computed(() => props.showMenuInPopup ?? Core.state.isMobile);\n\t\tconst pageMod = computed(() => props.pageMod);\n\t\tconst isShort = ref(false);\n\n\t\tconst component = ref(undefined);\n\t\tconst scrollable = ref(true);\n\n\t\treturn {\n\t\t\tshowMenuInPopup,\n\t\t\tpageMod,\n\t\t\tisShort,\n\t\t\tactiveItemName: model,\n\t\t\tcomponent,\n\t\t\tscrollable,\n\t\t};\n\t}, props.idState);\n\n\tif (props.isShortable) {\n\t\tconst stateName = 'isShort';\n\n\t\tStoreLocalStorage.loadLocalStorge(stateName, store);\n\t\tStoreLocalStorage.addSaverLocalStorge(stateName, store);\n\t}\n\n\tif (store.$id) {\n\t\tconst popstateCallback = (_e: PopStateEvent) => {\n\t\t\tmodel.value = getHash(store.$id!);\n\t\t};\n\n\t\tpopstateCallbacks.add(popstateCallback);\n\t}\n\n\treturn store;\n};\n\n/**\n * Получить Store компонента\n */\nexport const useTabsStore = () => useStore(injectionKey);\n","<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { genHash } from '@/core/utils/route';\nimport { TopPopupListItem } from '@/components/popup/popup';\nimport { useTabsStore } from './store';\nimport type { PropsMenuItem } from './types';\n\nconst props = withDefaults(defineProps<PropsMenuItem>(), {\n\tscrollable: true,\n\tcomponent: undefined,\n});\n\nconst store = useTabsStore();\n\nconst href = computed(() => {\n\t// это внутренняя хеш навигация, ссылка на вкладку\n\tif (props.name && store.$id) {\n\t\treturn genHash(store.$id, props.name);\n\t}\n\n\treturn props.href;\n});\n\nconst tagName = computed(() => {\n\tif (store.showMenuInPopup) {\n\t\treturn TopPopupListItem;\n\t}\n\n\treturn href ? 'a' : 'button';\n});\n\n/**\n * Клик по элементу меню\n */\nconst onClick = (e: MouseEvent) => {\n\t// это внутренняя хеш навигация, ссылка на вкладку\n\tif (!props.href && href.value) {\n\t\te.preventDefault();\n\t}\n\n\tif (props.name) {\n\t\tstore.activeItemName = props.name;\n\t}\n};\n</script>\n\n<template>\n\t<component\n\t\t:is=\"tagName\"\n\t\ttarget=\"_self\"\n\t\t:class=\"{\n\t\t\t['top-tabsView_menuItem']: !store.showMenuInPopup,\n\t\t\t['top-active']: name && store.activeItemName === name,\n\t\t\t['top-disabled']: disabled,\n\t\t\t['top-spa-disabled']: true,\n\t\t}\"\n\t\t:href=\"href\"\n\t\t:data-top-icon=\"icon || undefined\"\n\t\t:disabled=\"disabled || undefined\"\n\t\t@click=\"onClick\"\n\t>\n\t\t<slot name=\"default\" v-if=\"store.showMenuInPopup\"></slot>\n\n\t\t<span\n\t\t\tv-else-if=\"$slots.default && !store.isShort\"\n\t\t\tclass=\"top-ellipsis\"\n\t\t>\n\t\t\t<slot name=\"default\"></slot>\n\t\t</span>\n\t</component>\n</template>\n\n<style>\n.top-tabsView_menuItem {\n\t--top-icon-color: var(--color-text-2);\n\t--top-icon-width: calc(var(--top-icon-size));\n\n\tcursor: pointer;\n\tbox-sizing: border-box;\n\n\tborder: none;\n\tborder-radius: var(--top-radius-2);\n\tpadding: var(--top-padding-2);\n\tbackground: transparent;\n\theight: 40px;\n\n\tcolor: var(--color-text-1);\n\ttext-decoration: none;\n\twhite-space: nowrap;\n\n\tdisplay: flex;\n\tgap: var(--top-gap-2);\n\talign-items: center;\n\tjustify-content: flex-start;\n\ttransition: background var(--transition);\n}\n\n.top-tabsView_menuItem:hover {\n\t--top-icon-color: var(--color-text-1);\n\n\tbackground: var(--color-bg-shading-1);\n\ttext-decoration: none;\n}\n\n.top-tabsView_menuItem.top-active {\n\t--top-icon-color: inherit;\n\n\tbackground: var(--color-layout-front-1);\n\tcolor: inherit;\n}\n\n.top-tabsView_menuItem:disabled:not(option):not(optgroup):not(.top-forms-option),\n.top-tabsView_menuItem:disabled ~ .top-formsCaption,\n.top-tabsView_menuItem.top-disabled[data-top-icon]:before,\n.top-tabsView_menuItem.top-disabled[data-top-icon2]:after {\n\topacity: unset;\n\tfilter: unset;\n}\n\n.top-tabsView_menuItem.top-disabled {\n\t--top-icon-color: var(--color-text-4);\n\n\tcolor: var(--color-text-4);\n}\n</style>\n","// TODO: Эту функцию можно вынести в глобальный utils\n\nimport { sleepWhile } from '@/core/utils/system';\n\n/**\n * Проверка нахождения компонента в состояние загрузки\n * @param component\n */\nexport const checkComponentIsLoading = (component: any) => {\n\treturn component?.name === 'AsyncComponentWrapper' && !component?.__asyncResolved;\n};\n\n/**\n * Презагрузить компонент\n *\n * Некоторое время ожидает загрузку компонента, прежде чем завершит работу\n */\nexport const preResolveComponent = async (component: any, condition: Function) => {\n\tif (component?.name !== 'AsyncComponentWrapper') return;\n\tif (component?.__asyncResolved) return;\n\n\tcomponent.__asyncLoader();\n\n\tawait sleepWhile(() => {\n\t\treturn condition() && checkComponentIsLoading(component);\n\t}, 200);\n};\n","<script setup lang=\"ts\">\nimport type { Ref, VNode } from 'vue';\nimport { markRaw, ref, useSlots, watch } from 'vue';\nimport { TopPopup } from '../../popup/popup';\nimport { getHash, setHash } from '@/core/utils/route';\n\nimport type { MenuItem, PropsMenu, PropsMenuItem } from './types';\nimport { useTabsStore } from './store';\nimport TabsViewMenuItem from './menuItem.vue';\nimport { preResolveComponent } from './utils';\n\ndefineProps<PropsMenu>();\n\nconst isLoading = defineModel('isLoading');\n\nconst store = useTabsStore();\n\nconst slots = useSlots();\n\n// словарь используется для оптимизации получения нужного menuItem\nconst menuItemByName: Map<PropsMenuItem['name'], MenuItem> = new Map();\n\n// заполнить словарь с menuItem, по элементам в slot default\nconst setMenuItemByName = () => {\n\tif (!slots.default) return;\n\n\tconst component: any = slots.default({}).find(item => item.key === '_menu');\n\tif (!component) return;\n\n\tsetMenuItemByNameFromItems(component.children);\n};\n\n// заполнить словарь с menuItem, по элементам\nconst setMenuItemByNameFromItems = (menuItems: VNode[]) => {\n\tmenuItems.forEach((subComponent: any) => {\n\t\t// это не компонент элемента меню\n\t\tif (subComponent.type.__name && subComponent.type.__name !== TabsViewMenuItem.__name) return;\n\n\t\t// это не компонент, например template\n\t\tif (!subComponent.type.__name && typeof subComponent.children === 'object') {\n\t\t\tsetMenuItemByNameFromItems(subComponent.children);\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (!subComponent.props?.name || subComponent.props?.disabled) return;\n\n\t\tconst menuItem: MenuItem = {\n\t\t\ttitle: (subComponent.children.default?.()[0].children as string).trim(),\n\t\t\ticon: subComponent.props.icon,\n\t\t\tcomponent: subComponent.props.component ? markRaw(subComponent.props.component) : TabsViewMenuItem.props.component.default,\n\t\t\tscrollable: subComponent.props.scrollable ?? TabsViewMenuItem.props.scrollable.default,\n\t\t};\n\n\t\tmenuItemByName.set(subComponent.props.name, menuItem);\n\t});\n};\n\n/**\n * activeMenuItem нужен:\n * - для вывода текста активной вкладки в меню с popup\n * - для вывода компонента активной вкладки (store.component)\n * - для установки store.scrollable\n */\nconst activeMenuItem: Ref<MenuItem | null> = ref(null);\n\n/**\n * Кол-во изменений активной вкладки\n */\nlet countChanged = 0;\n\n/**\n * Смена активной вкладки\n *\n * TODO: смена slot, например смена языка, требует повторного выполнения setMenuItemByName()\n */\nwatch(\n\t() => store.activeItemName,\n\tasync () => {\n\t\tconst numberChanged = ++countChanged; // порядковый номер текущего изменения\n\n\t\tif (menuItemByName.size === 0) {\n\t\t\tsetMenuItemByName();\n\t\t}\n\n\t\tif (menuItemByName.size === 0) {\n\t\t\tstore.activeItemName = '';\n\n\t\t\treturn;\n\t\t}\n\n\t\tactiveMenuItem.value = menuItemByName.get(store.activeItemName) ?? null;\n\n\t\t// элемент не найден, установить из хеша страницы\n\t\tif (!activeMenuItem.value && store.$id) {\n\t\t\tconst activeItemName = getHash(store.$id);\n\n\t\t\tactiveMenuItem.value = menuItemByName.get(activeItemName) ?? null;\n\n\t\t\tif (activeMenuItem.value) {\n\t\t\t\tstore.activeItemName = activeItemName;\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// элемент не найден, установить первый доступный\n\t\tif (!activeMenuItem.value) {\n\t\t\tstore.activeItemName = menuItemByName.keys().next().value!;\n\n\t\t\treturn;\n\t\t}\n\n\t\t// запрошена смена на уже активный элемент\n\t\tif (activeMenuItem.value.component === store.component) {\n\t\t\tisLoading.value = false;\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (store.$id) setHash(store.$id, store.activeItemName, false);\n\n\t\t// флаг загрузки будет сброшен при инициализации компонента\n\t\tisLoading.value = true;\n\n\t\t/**\n\t\t * Презагрузить компонент\n\t\t *\n\t\t * Нужно для того, чтобы минимизировать скачки интерфейса при ожидании загрузки асинхронного компонента\n\t\t */\n\t\tawait preResolveComponent(activeMenuItem.value.component, () => numberChanged === countChanged);\n\n\t\t// влкадка была сменена еще раз во время sleepWhile\n\t\tif (numberChanged !== countChanged) {\n\t\t\treturn;\n\t\t}\n\n\t\tstore.scrollable = activeMenuItem.value.scrollable;\n\t\tstore.component = activeMenuItem.value.component;\n\n\t\tif (activeMenuItem.value && !store.component) {\n\t\t\tconsole.warn(`Компонент вкладки ${store.activeItemName} не найден. Добавьте props.component для пункта меню ${store.activeItemName}.`);\n\t\t}\n\t},\n\t{ immediate: true },\n);\n\n</script>\n\n<template>\n\t<div\n\t\t:class=\"{\n\t\t\t'top-tabsView_menu': true,\n\t\t\t'top-tabsView_menu-inPopup_0': !store.showMenuInPopup,\n\t\t\t'top-tabsView_menu-inPopup_1': store.showMenuInPopup,\n\t\t\t'top-tabsView_menu-short': store.isShort && !store.showMenuInPopup,\n\t\t}\"\n\t>\n\t\t<!-- Спрятать меню под кнопку в popup -->\n\t\t<TopPopup v-if=\"store.showMenuInPopup\">\n\t\t\t<template #opener>\n\t\t\t\t<div class=\"top-tabsView_menuOpener\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-if=\"activeMenuItem\"\n\t\t\t\t\t\tclass=\"top-tabsView_menuOpenerActiveItem\"\n\t\t\t\t\t\t:data-top-icon=\"activeMenuItem.icon\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"top-ellipsis\">\n\t\t\t\t\t\t\t{{ activeMenuItem.title }}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"top-tabsView_menuOpenerIcon\" data-top-icon=\"\"></div>\n\t\t\t\t</div>\n\t\t\t</template>\n\n\t\t\t<template #contentList>\n\t\t\t\t<slot></slot>\n\t\t\t</template>\n\t\t</TopPopup>\n\n\t\t<!-- Отобразить меню на странице -->\n\t\t<template v-else>\n\t\t\t<div class=\"top-tabsView_menuList\">\n\t\t\t\t<slot></slot>\n\t\t\t</div>\n\n\t\t\t<div\n\t\t\t\tv-if=\"isShortable\"\n\t\t\t\tclass=\"top-tabsView_menuFooter\"\n\t\t\t>\n\t\t\t\t<TabsViewMenuItem\n\t\t\t\t\tv-if=\"isShortable\"\n\t\t\t\t\t:icon=\"store.isShort ? '' : ''\"\n\t\t\t\t\t@click=\"store.isShort = !store.isShort\"\n\t\t\t\t>\n\t\t\t\t\t{{ store.isShort ? '' : 'Свернуть' }} <!--TODO: translate-->\n\t\t\t\t</TabsViewMenuItem>\n\t\t\t</div>\n\t\t</template>\n\t</div>\n</template>\n\n<style>\n/* режим отображение табов в основной области документа */\n.top-tabsView-pageMod .top-tabsView_menu {\n\tbox-sizing: border-box;\n\tposition: sticky;\n\ttop: var(--top-tabsView-top);\n\tz-index: 10;\n}\n\n/* режим отображение табов в основной области документа без popup */\n.top-tabsView-pageMod .top-tabsView_menu-inPopup_0 {\n\theight: calc(var(--100vh) - var(--top-tabsView-top));\n}\n\n/* стантартный режим */\n.top-tabsView_menu-inPopup_0 {\n\tbox-sizing: border-box;\n\twidth: var(--top-tabsView-menu-width);\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\tflex-shrink: 0;\n}\n\n/* режим вывода в popup */\n.top-tabsView_menu-inPopup_1 {\n\tborder-bottom: var(--top-tabsView-menu-border-bottom-width) solid var(--color-line-2-opacity);\n}\n\n.top-tabsView_menu-short {\n\twidth: auto;\n}\n\n.top-tabsView_menu > .top-tabsView_menuOpener {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n}\n\n.top-tabsView_menu > .top-tabsView_menuOpener:hover {\n\tbackground: var(--color-layer-1);\n}\n\n.top-tabsView_menuOpenerIcon { display: flex; }\n\n.top-tabsView_menuOpenerActiveItem {\n\t--top-forms-padding: 0px;\n\n\tbox-sizing: border-box;\n\tpadding: var(--top-tabsView-menu-opener-padding);\n\tmax-width: calc(100% - var(--top-forms-base-height));\n\twhite-space: nowrap;\n\tflex-grow: 1;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: var(--top-padding-2);\n}\n\n.top-tabsView_menuList,\n.top-tabsView_menuFooter {\n\tpadding: var(--top-padding-2);\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: var(--top-gap-2);\n}\n\n.top-tabsView_menuList {\n\toverflow-y: auto;\n}\n\n.top-tabsView_menu-short .top-tabsView_menuFooter > .top-tabsView_menuItem {\n\t--top-icon-width: 100%;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { defineModel, onUnmounted, ref, watch } from 'vue';\nimport Core from '@/core/core/core';\nimport { delHash } from '@/core/utils/route';\nimport type { Props } from './types';\nimport { defineTabsStore } from './store';\nimport TabsViewMenu from './menu.vue';\nimport TopLoadbar from '@/components/forms/loadbar/loadbar.vue';\nimport { checkComponentIsLoading } from './utils';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tshowMenuInPopup: undefined,\n\tisShortable: false,\n});\n\nconst model = defineModel<string>();\n\nconst store = defineTabsStore(props, model);\n\nconst uid = Math.random();\n\nif (props.pageMod) Core.state.documentClassModificators.set(uid, 'top-hasTabsViewPageMod');\n\nonUnmounted(() => {\n\tif (props.pageMod) Core.state.documentClassModificators.delete(uid);\n\n\tif (store.$id) delHash(store.$id, store.activeItemName, true);\n});\n\nconst componentRef = ref();\nconst isLoading = ref(false);\n\nwatch([componentRef, () => store.component], () => {\n\tisLoading.value = checkComponentIsLoading(store.component);\n}, { immediate: true });\n</script>\n\n<template>\n\t<div\n\t\t:class=\"{\n\t\t\t'top-tabsView': true,\n\t\t\t'top-tabsView-pageMod': props.pageMod,\n\t\t\t'top-tabsView-inPopup': store.showMenuInPopup,\n\t\t}\"\n\t>\n\t\t<TabsViewMenu\n\t\t\t:isShortable=\"isShortable\"\n\t\t\tv-model:isLoading=\"isLoading\"\n\t\t>\n\t\t\t<!-- @slot Меню, ожидает передачу компонентов TabsViewMenuItem и TabsViewMenuTitle -->\n\t\t\t<slot name=\"menu\"></slot>\n\t\t</TabsViewMenu>\n\n\t\t<div\n\t\t\t:class=\"{\n\t\t\t\t'top-tabsView_contents': true,\n\t\t\t\t'top-tabsView_contents-isLoading': isLoading,\n\t\t\t\t'top-tabsView_contents-noScrollable': !store.scrollable,\n\t\t\t}\"\n\t\t>\n\t\t\t<TopLoadbar v-if=\"isLoading\"/>\n\n\t\t\t<keep-alive>\n\t\t\t\t<component\n\t\t\t\t\tref=\"componentRef\"\n\t\t\t\t\t:is=\"store.component\"\n\t\t\t\t/>\n\t\t\t</keep-alive>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n:root {\n\t--top-tabsView-top: 0px;\n\t--top-tabsView-menu-width: 220px;\n\t--top-tabsView-contents-offset-top: 0px;\n\t--top-tabsView-menu-border-bottom-width: 1px;\n\t--top-tabsView-menu-opener-padding: var(--top-padding-2);\n}\n\n.top-tabsView {\n\tbackground: var(--color-layout-middle);\n\twidth: 100%;\n\theight: 100%;\n\tdisplay: flex;\n\tflex-direction: row;\n}\n\n.top-tabsView_contents {\n\tborder-radius: var(--top-radius-4);\n\tbackground: var(--color-layout-front-1);\n\tpadding: var(--top-padding-4);\n\tflex-grow: 1;\n\toverflow: auto;\n\tposition: relative;\n}\n\n.top-tabsView_contents-isLoading {\n\tpointer-events: none;\n}\n\n.top-tabsView_contents-noScrollable {\n\twidth: calc(100% - var(--top-tabsView-menu-width));\n\tpadding: 0;\n\toverflow: visible;\n}\n\n/* top-tabsView-inPopup */\n.top-tabsView-inPopup {\n\tbackground: var(--color-layout-front-1);\n\tflex-direction: column;\n}\n\n.top-tabsView-inPopup > .top-tabsView_contents {\n\tborder-radius: 0;\n}\n\n.top-tabsView-inPopup > .top-tabsView_contents-noScrollable {\n\twidth: auto;\n}\n\n@media only screen and (max-width: 900px) {\n\t:root {\n\t\t/* Суммарно должна быть высота элемента \".top-tabsView_menu\" */\n\t\t--top-tabsView-contents-offset-top: calc(var(--top-icon-size) + var(--top-tabsView-menu-opener-padding) * 2 + var(--top-tabsView-menu-border-bottom-width));\n\t}\n}\n</style>\n","<script setup lang=\"ts\">\n\n</script>\n\n<template>\n\t<div class=\"top-tabsView_menuDelimeter\"></div>\n</template>\n\n<style>\n.top-tabsView_menuDelimeter {\n\tpadding: var(--top-padding-1) 0;\n\tdisplay: flex;\n}\n\n.top-tabsView_menuDelimeter:before {\n\tcontent: \"\";\n\theight: 2px;\n\tbackground: var(--color-line-2);\n\tflex-grow: 1;\n}\n\n.top-tabsView_menuDelimeter:first-child,\n.top-tabsView_menuDelimeter + .top-tabsView_menuDelimeter {\n\tdisplay: none;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { useTabsStore } from './store';\nimport type { PropsMenuTitle } from './types';\nimport TabsViewMenuDelimeter from './menuDelimeter.vue';\nimport { TopPopupListItem } from '../../popup/popup';\n\ndefineProps<PropsMenuTitle>();\n\nconst store = useTabsStore();\n</script>\n\n<template>\n\t<TopPopupListItem\n\t\tv-if=\"store.showMenuInPopup\"\n\t\ttype=\"title\"\n\t>\n\t\t<slot></slot>\n\t</TopPopupListItem>\n\n\t<TabsViewMenuDelimeter v-else-if=\"store.isShort\"/>\n\n\t<div\n\t\tv-else\n\t\t:class=\"{\n\t\t\t'top-tabsView_menuTitle': true,\n\t\t\t'top-tabsView_menuTitle-subtitle': isSubtitle,\n\t\t}\"\n\t>\n\t\t<slot></slot>\n\t</div>\n</template>\n\n<style>\n.top-tabsView_menuTitle {\n\tpadding: var(--top-padding-4) var(--top-padding-2) var(--top-padding-1);\n\tfont-weight: 600;\n\tcolor: var(--color-text-1);\n}\n\n.top-tabsView_menuTitle-subtitle {\n\tpadding-top: var(--top-padding-1);\n\tfont-size: 12px;\n\tfont-weight: 400;\n\tcolor: var(--color-text-2);\n}\n</style>\n"]}
1
+ {"version":3,"sources":["tabsView/tabsView.js","../../src/core/utils/store/localStorage.ts","../../src/components/tabsView/tabsView/store.ts","../../src/components/tabsView/tabsView/menuItem.vue","../../src/components/tabsView/tabsView/utils.ts","../../src/components/tabsView/tabsView/menu.vue","../../src/components/tabsView/tabsView/tabsView.vue","../../src/components/tabsView/tabsView/menuDelimeter.vue","../../src/components/tabsView/tabsView/menuTitle.vue"],"names":["vue","exports","I","L","vue_1","R","z","B","store_DjQAOnrn_esm_js_1","t","forms_BiKUURH4_esm_js_1","n","route_js_1","V","H","U","i","popup_KKfSSrM6_esm_js_1","o","W","G","system_js_1","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,CAAE,EACvC,MAAM,EAAG,CACL,IAAI,EAAIS,EAAE,EQrNa,OAAM,EAAA,KAAxC,EAAkDT,EAAA,MAAA,CAAA,CAAA,CAAA,CAAA,kBAU5C,EAAAA,EAAA,UAAA,CAAA,GAAA,EAAAA,EAAA,YAAA,EAAA,EAAAA,EAAA,MAAA,CAAAa,EAAA,CAAA,EAAA,CR6MS,IAAK,EQnNb,KAAA,ORqNI,EAAG,CACC,SAAU,EAAGb,EAAM,QQtNkD,KAAA,EAAA,EAAAA,EAAA,WAAA,CAAA,EAAA,OAAA,SAAA,CAAA,CAAA,ERuNrE,EAAG,CQlNJ,CAAA,IAAA,EAAAA,EAAA,MAAA,CAAA,CAAA,CAAA,CAAA,UAAA,EAAAA,EAAA,UAAA,CAAA,GAAA,EAAAA,EAAA,YAAA,CAAAmC,EAAA,CAAA,IAAA,CAAA,CAAA,KAAA,EAAAnC,EAAA,UAAA,CAAA,GAAA,EAAAA,EAAA,mBAAA,CAAA,MAAA,CRoNC,IAAK,EACL,OAAQ,EAAGA,EAAM,eAAc,CAAE,CAC7B,yBAA0B,CAAC,EAC3B,kCAAmC,EAAE,UACzC,CAAC,CACL,EAAG,EAAE,EAAGA,EAAM,WAAU,CAAE,EAAE,OAAQ,SAAS,CAAC,EAAG,CAAC,EACtD,CACJ,CACgC,CACpC,CAAC","sourcesContent":["define([\"require\", \"exports\", \"../.chunks/forms-BiKUURH4.esm.js\", \"../utils/system.js\", \"../utils/route.js\", \"../.chunks/store-DjQAOnrn.esm.js\", \"../.chunks/popup-KKfSSrM6.esm.js\", \"vue\"], function (require, exports, forms_BiKUURH4_esm_js_1, system_js_1, route_js_1, store_DjQAOnrn_esm_js_1, popup_KKfSSrM6_esm_js_1, vue_1) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.TopTabsViewMenuTitle = exports.TopTabsViewMenuItem = exports.TopTabsView = void 0;\n //#region src/core/utils/store/localStorage.ts\n var I = (e, t) => `top:${String(e)}:${t}`, L = {\n loadLocalStorge: (e, t) => {\n if (!t.$id)\n return;\n let n = I(e, t.$id);\n try {\n let r = JSON.parse(localStorage.getItem(n));\n typeof r == typeof t[e] && (t[e] = r);\n }\n catch {\n console.warn(/* @__PURE__ */ Error(`В localStorage[${n}] не корректный json`));\n }\n },\n addSaverLocalStorge: (e, t) => {\n if (!t.$id)\n return;\n let n = I(e, t.$id);\n (0, vue_1.watch)(() => t[e], () => {\n localStorage.setItem(n, JSON.stringify(t[e]));\n }, { immediate: !0 });\n }\n }, R = /* @__PURE__ */ new Set();\n addEventListener(\"popstate\", (e) => {\n R.forEach((t) => t(e));\n });\n var z = Symbol(), B = (t, n) => {\n let r = (0, store_DjQAOnrn_esm_js_1.t)(z, () => ({\n showMenuInPopup: (0, vue_1.computed)(() => t.showMenuInPopup ?? forms_BiKUURH4_esm_js_1.O.state.isMobile),\n pageMod: (0, vue_1.computed)(() => t.pageMod),\n isShort: (0, vue_1.ref)(!1),\n activeItemName: n,\n component: (0, vue_1.ref)(void 0),\n scrollable: (0, vue_1.ref)(!0)\n }), t.idState);\n if (t.isShortable) {\n let e = \"isShort\";\n L.loadLocalStorge(e, r), L.addSaverLocalStorge(e, r);\n }\n return r.$id && R.add((e) => {\n n.value = (0, route_js_1.getHash)(r.$id);\n }), r;\n }, V = () => (0, store_DjQAOnrn_esm_js_1.r)(z), H = {\n key: 1,\n class: \"top-ellipsis\"\n }, U = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"menuItem\",\n props: {\n name: {},\n href: {},\n icon: {},\n disabled: { type: Boolean },\n component: { default: void 0 },\n scrollable: {\n type: Boolean,\n default: !0\n }\n },\n setup(e) {\n let t = e, n = V(), r = (0, vue_1.computed)(() => t.name && n.$id ? (0, route_js_1.genHash)(n.$id, t.name) : t.href), i = (0, vue_1.computed)(() => n.showMenuInPopup ? popup_KKfSSrM6_esm_js_1.o : r.value ? \"a\" : \"button\"), o = (e) => {\n !t.href && r.value && e.preventDefault(), t.name && (n.activeItemName = t.name);\n };\n return (t, a) => ((0, vue_1.openBlock)(), (0, vue_1.createBlock)((0, vue_1.resolveDynamicComponent)(i.value), {\n target: \"_self\",\n class: (0, vue_1.normalizeClass)({\n \"top-tabsView_menuItem\": !(0, vue_1.unref)(n).showMenuInPopup,\n \"top-active\": e.name && (0, vue_1.unref)(n).activeItemName === e.name,\n \"top-disabled\": e.disabled,\n \"top-spa-disabled\": !0\n }),\n href: r.value,\n \"data-top-icon\": e.icon || void 0,\n disabled: e.disabled || void 0,\n onClick: o\n }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.unref)(n).showMenuInPopup ? (0, vue_1.renderSlot)(t.$slots, \"default\", { key: 0 }) : t.$slots.default && !(0, vue_1.unref)(n).isShort ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"span\", H, [(0, vue_1.renderSlot)(t.$slots, \"default\")])) : (0, vue_1.createCommentVNode)(\"\", !0)]),\n _: 3\n }, 8, [\n \"class\",\n \"href\",\n \"data-top-icon\",\n \"disabled\"\n ]));\n }\n }), W = (e) => e?.name === \"AsyncComponentWrapper\" && !e?.__asyncResolved, G = async (e, t) => {\n e?.name === \"AsyncComponentWrapper\" && (e?.__asyncResolved || (e.__asyncLoader(), await (0, system_js_1.sleepWhile)(() => t() && W(e), 200)));\n }, K = { class: \"top-tabsView_menuOpener\" }, q = [\"data-top-icon\"], J = { class: \"top-ellipsis\" }, Y = { class: \"top-tabsView_menuList\" }, X = {\n key: 0,\n class: \"top-tabsView_menuFooter\"\n }, Z = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"menu\",\n props: /*@__PURE__*/ (0, vue_1.mergeModels)({\n isShortable: { type: Boolean },\n isLoading: { type: Boolean }\n }, {\n isLoading: {},\n isLoadingModifiers: {}\n }),\n emits: [\"update:isLoading\"],\n setup(e) {\n let t = (0, vue_1.useModel)(e, \"isLoading\"), n = V(), r = (0, vue_1.useSlots)(), i = /* @__PURE__ */ new Map(), a = () => {\n if (!r.default)\n return;\n let e = r.default({}).find((e) => e.key === \"_menu\");\n e && c(e.children);\n }, c = (e) => {\n e.forEach((e) => {\n if (e.type.__name && e.type.__name !== U.__name)\n return;\n if (!e.type.__name && typeof e.children == \"object\") {\n c(e.children);\n return;\n }\n if (!e.props?.name || e.props?.disabled)\n return;\n let t = {\n title: (e.children.default?.()[0].children).trim(),\n icon: e.props.icon,\n component: e.props.component ? (0, vue_1.markRaw)(e.props.component) : U.props.component.default,\n scrollable: e.props.scrollable ?? U.props.scrollable.default\n };\n i.set(e.props.name, t);\n });\n }, l = (0, vue_1.ref)(null), u = 0;\n return (0, vue_1.watch)(() => n.activeItemName, async () => {\n let e = ++u;\n if (i.size === 0 && a(), i.size === 0) {\n n.activeItemName = \"\";\n return;\n }\n if (l.value = i.get(n.activeItemName) ?? null, !l.value && n.$id) {\n let e = (0, route_js_1.getHash)(n.$id);\n if (l.value = i.get(e) ?? null, l.value) {\n n.activeItemName = e;\n return;\n }\n }\n if (!l.value) {\n n.activeItemName = i.keys().next().value;\n return;\n }\n if (l.value.component === n.component) {\n t.value = !1;\n return;\n }\n n.$id && (0, route_js_1.setHash)(n.$id, n.activeItemName, !1), t.value = !0, await G(l.value.component, () => e === u), e === u && (n.scrollable = l.value.scrollable, n.component = l.value.component, l.value && !n.component && console.warn(`Компонент вкладки ${n.activeItemName} не найден. Добавьте props.component для пункта меню ${n.activeItemName}.`));\n }, { immediate: !0 }), (t, r) => ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", { class: (0, vue_1.normalizeClass)({\n \"top-tabsView_menu\": !0,\n \"top-tabsView_menu-inPopup_0\": !(0, vue_1.unref)(n).showMenuInPopup,\n \"top-tabsView_menu-inPopup_1\": (0, vue_1.unref)(n).showMenuInPopup,\n \"top-tabsView_menu-short\": (0, vue_1.unref)(n).isShort && !(0, vue_1.unref)(n).showMenuInPopup\n }) }, [(0, vue_1.unref)(n).showMenuInPopup ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)((0, vue_1.unref)(popup_KKfSSrM6_esm_js_1.s), { key: 0 }, {\n opener: (0, vue_1.withCtx)(() => [(0, vue_1.createElementVNode)(\"div\", K, [l.value ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", {\n key: 0,\n class: \"top-tabsView_menuOpenerActiveItem\",\n \"data-top-icon\": l.value.icon\n }, [(0, vue_1.createElementVNode)(\"span\", J, (0, vue_1.toDisplayString)(l.value.title), 1)], 8, q)) : (0, vue_1.createCommentVNode)(\"\", !0), r[1] ||= (0, vue_1.createElementVNode)(\"div\", {\n class: \"top-tabsView_menuOpenerIcon\",\n \"data-top-icon\": \"\"\n }, null, -1)])]),\n contentList: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(t.$slots, \"default\")]),\n _: 3\n })) : ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(vue_1.Fragment, { key: 1 }, [(0, vue_1.createElementVNode)(\"div\", Y, [(0, vue_1.renderSlot)(t.$slots, \"default\")]), e.isShortable ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", X, [e.isShortable ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(U, {\n key: 0,\n icon: (0, vue_1.unref)(n).isShort ? \"\" : \"\",\n onClick: r[0] ||= (e) => (0, vue_1.unref)(n).isShort = !(0, vue_1.unref)(n).isShort\n }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.createTextVNode)((0, vue_1.toDisplayString)((0, vue_1.unref)(n).isShort ? \"\" : \"Свернуть\"), 1)]),\n _: 1\n }, 8, [\"icon\"])) : (0, vue_1.createCommentVNode)(\"\", !0)])) : (0, vue_1.createCommentVNode)(\"\", !0)], 64))], 2));\n }\n }), Q = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"tabsView\",\n props: /*@__PURE__*/ (0, vue_1.mergeModels)({\n modelValue: {},\n pageMod: { type: Boolean },\n showMenuInPopup: {\n type: Boolean,\n default: void 0\n },\n isShortable: {\n type: Boolean,\n default: !1\n },\n idState: {}\n }, {\n modelValue: {},\n modelModifiers: {}\n }),\n emits: [\"update:modelValue\"],\n setup(n) {\n let r = n, a = B(r, (0, vue_1.useModel)(n, \"modelValue\")), o = Math.random();\n r.pageMod && forms_BiKUURH4_esm_js_1.O.state.documentClassModificators.set(o, \"top-hasTabsViewPageMod\"), (0, vue_1.onUnmounted)(() => {\n r.pageMod && forms_BiKUURH4_esm_js_1.O.state.documentClassModificators.delete(o), a.$id && (0, route_js_1.delHash)(a.$id, a.activeItemName, !0);\n });\n let s = (0, vue_1.ref)(), c = (0, vue_1.ref)(!1);\n return (0, vue_1.watch)([s, () => a.component], () => {\n c.value = W(a.component);\n }, { immediate: !0 }), (e, i) => ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", { class: (0, vue_1.normalizeClass)({\n \"top-tabsView\": !0,\n \"top-tabsView-pageMod\": r.pageMod,\n \"top-tabsView-inPopup\": (0, vue_1.unref)(a).showMenuInPopup\n }) }, [(0, vue_1.createVNode)(Z, {\n isShortable: n.isShortable,\n isLoading: c.value,\n \"onUpdate:isLoading\": i[0] ||= (e) => c.value = e\n }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(e.$slots, \"menu\")]),\n _: 3\n }, 8, [\"isShortable\", \"isLoading\"]), (0, vue_1.createElementVNode)(\"div\", { class: (0, vue_1.normalizeClass)({\n \"top-tabsView_contents\": !0,\n \"top-tabsView_contents-isLoading\": c.value,\n \"top-tabsView_contents-noScrollable\": !(0, vue_1.unref)(a).scrollable\n }) }, [c.value ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(forms_BiKUURH4_esm_js_1.l, { key: 0 })) : (0, vue_1.createCommentVNode)(\"\", !0), ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(vue_1.KeepAlive, null, [((0, vue_1.openBlock)(), (0, vue_1.createBlock)((0, vue_1.resolveDynamicComponent)((0, vue_1.unref)(a).component), {\n ref_key: \"componentRef\",\n ref: s\n }, null, 512))], 1024))], 2)], 2));\n }\n }), $ = {}, ee = { class: \"top-tabsView_menuDelimeter\" };\n exports.TopTabsViewMenuItem = U;\n exports.TopTabsView = Q;\n function te(e, t) {\n return (0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", ee);\n }\n var ne = /*#__PURE__*/ (0, forms_BiKUURH4_esm_js_1.u)($, [[\"render\", te]]), re = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"menuTitle\",\n props: { isSubtitle: { type: Boolean } },\n setup(e) {\n let t = V();\n return (n, r) => (0, vue_1.unref)(t).showMenuInPopup ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)((0, vue_1.unref)(popup_KKfSSrM6_esm_js_1.o), {\n key: 0,\n type: \"title\"\n }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(n.$slots, \"default\")]),\n _: 3\n })) : (0, vue_1.unref)(t).isShort ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(ne, { key: 1 })) : ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", {\n key: 2,\n class: (0, vue_1.normalizeClass)({\n \"top-tabsView_menuTitle\": !0,\n \"top-tabsView_menuTitle-subtitle\": e.isSubtitle\n })\n }, [(0, vue_1.renderSlot)(n.$slots, \"default\")], 2));\n }\n });\n exports.TopTabsViewMenuTitle = re;\n});\n//# sourceMappingURL=tabsView.js.map\n","import { watch } from 'vue';\nimport type { Store } from './store';\n\n/**\n * Сгенерировать имя для сохранения данных в localStorage\n * @param stateName - имя свойства состояния\n * @param stateKey - ключ состояния, разные компоненты могут использовать одинаковый ключ\n */\nconst genStorageKey = <T extends Store>(stateName: keyof T, stateKey: string): string => {\n\tconst stateNameString = String(stateName);\n\n\treturn `top:${stateNameString}:${stateKey}`;\n};\n\n/**\n * Загрузить состояние\n * @param stateName - имя свойства состояния\n * @param store\n */\nconst loadLocalStorge = <T extends Store>(stateName: keyof T, store: T) => {\n\t// если Store.key не знадан, значит сохранение состояния в компоненте отключено\n\tif (!store.$id) return;\n\n\tconst localStorageKey = genStorageKey(stateName, store.$id);\n\n\ttry {\n\t\tconst localStorageValue: typeof store[keyof typeof store] = JSON.parse(localStorage.getItem(localStorageKey) as string);\n\n\t\tif (typeof localStorageValue === typeof store[stateName]) {\n\t\t\tstore[stateName] = localStorageValue;\n\t\t}\n\t} catch (e) {\n\t\tconsole.warn(new Error(`В localStorage[${localStorageKey}] не корректный json`));\n\t}\n};\n\n/**\n * Добавить автосохранение состояние при его изменении\n * @param stateName - имя свойства состояния\n * @param store\n */\nconst addSaverLocalStorge = <T extends Store>(stateName: keyof T, store: T) => {\n\t// если store.$id не знадан, значит сохранение состояния в компоненте отключено\n\tif (!store.$id) return;\n\n\tconst localStorageKey = genStorageKey(stateName, store.$id);\n\n\twatch(() => store[stateName], () => {\n\t\tlocalStorage.setItem(localStorageKey, JSON.stringify(store[stateName]));\n\t}, { immediate: true });\n};\n\nexport default {\n\tloadLocalStorge,\n\taddSaverLocalStorge,\n};","import type { InjectionKey, ModelRef, UnwrapNestedRefs } from 'vue';\nimport { computed, ref } from 'vue';\nimport Core from '@/core/core/core';\nimport { defineStore, useStore, type Store as DefineStore } from '@/core/utils/store';\nimport StoreLocalStorage from '@/core/utils/store/localStorage';\nimport type { Props, Store } from './types';\nimport { getHash } from '@/core/utils/route';\n\nconst popstateCallbacks = new Set<(e: PopStateEvent) => void>();\n\naddEventListener('popstate', (e) => {\n\tpopstateCallbacks.forEach(popstateCallback => popstateCallback(e));\n});\n\nexport const injectionKey = Symbol() as InjectionKey<Store>;\n\n/**\n * Инициировать Store компонента\n */\nexport const defineTabsStore = (props: Props, model: ModelRef<string | undefined>): UnwrapNestedRefs<Store> & DefineStore => {\n\tconst store = defineStore(injectionKey, () => {\n\t\tconst showMenuInPopup = computed(() => props.showMenuInPopup ?? Core.state.isMobile);\n\t\tconst pageMod = computed(() => props.pageMod);\n\t\tconst isShort = ref(false);\n\n\t\tconst component = ref(undefined);\n\t\tconst scrollable = ref(true);\n\n\t\treturn {\n\t\t\tshowMenuInPopup,\n\t\t\tpageMod,\n\t\t\tisShort,\n\t\t\tactiveItemName: model,\n\t\t\tcomponent,\n\t\t\tscrollable,\n\t\t};\n\t}, props.idState);\n\n\tif (props.isShortable) {\n\t\tconst stateName = 'isShort';\n\n\t\tStoreLocalStorage.loadLocalStorge(stateName, store);\n\t\tStoreLocalStorage.addSaverLocalStorge(stateName, store);\n\t}\n\n\tif (store.$id) {\n\t\tconst popstateCallback = (_e: PopStateEvent) => {\n\t\t\tmodel.value = getHash(store.$id!);\n\t\t};\n\n\t\tpopstateCallbacks.add(popstateCallback);\n\t}\n\n\treturn store;\n};\n\n/**\n * Получить Store компонента\n */\nexport const useTabsStore = () => useStore(injectionKey);\n","<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { genHash } from '@/core/utils/route';\nimport { TopPopupListItem } from '@/components/popup/popup';\nimport { useTabsStore } from './store';\nimport type { PropsMenuItem } from './types';\n\nconst props = withDefaults(defineProps<PropsMenuItem>(), {\n\tscrollable: true,\n\tcomponent: undefined,\n});\n\nconst store = useTabsStore();\n\nconst href = computed(() => {\n\t// это внутренняя хеш навигация, ссылка на вкладку\n\tif (props.name && store.$id) {\n\t\treturn genHash(store.$id, props.name);\n\t}\n\n\treturn props.href;\n});\n\nconst tagName = computed(() => {\n\tif (store.showMenuInPopup) {\n\t\treturn TopPopupListItem;\n\t}\n\n\treturn href.value ? 'a' : 'button';\n});\n\n/**\n * Клик по элементу меню\n */\nconst onClick = (e: MouseEvent) => {\n\t// это внутренняя хеш навигация, ссылка на вкладку\n\tif (!props.href && href.value) {\n\t\te.preventDefault();\n\t}\n\n\tif (props.name) {\n\t\tstore.activeItemName = props.name;\n\t}\n};\n</script>\n\n<template>\n\t<component\n\t\t:is=\"tagName\"\n\t\ttarget=\"_self\"\n\t\t:class=\"{\n\t\t\t['top-tabsView_menuItem']: !store.showMenuInPopup,\n\t\t\t['top-active']: name && store.activeItemName === name,\n\t\t\t['top-disabled']: disabled,\n\t\t\t['top-spa-disabled']: true,\n\t\t}\"\n\t\t:href=\"href\"\n\t\t:data-top-icon=\"icon || undefined\"\n\t\t:disabled=\"disabled || undefined\"\n\t\t@click=\"onClick\"\n\t>\n\t\t<slot name=\"default\" v-if=\"store.showMenuInPopup\"></slot>\n\n\t\t<span\n\t\t\tv-else-if=\"$slots.default && !store.isShort\"\n\t\t\tclass=\"top-ellipsis\"\n\t\t>\n\t\t\t<slot name=\"default\"></slot>\n\t\t</span>\n\t</component>\n</template>\n\n<style>\n.top-tabsView_menuItem {\n\t--top-icon-color: var(--color-text-2);\n\t--top-icon-width: calc(var(--top-icon-size));\n\n\tcursor: pointer;\n\tbox-sizing: border-box;\n\n\tborder: none;\n\tborder-radius: var(--top-radius-2);\n\tpadding: var(--top-padding-2);\n\tbackground: transparent;\n\theight: 40px;\n\n\tcolor: var(--color-text-1);\n\ttext-decoration: none;\n\twhite-space: nowrap;\n\n\tdisplay: flex;\n\tgap: var(--top-gap-2);\n\talign-items: center;\n\tjustify-content: flex-start;\n\ttransition: background var(--transition);\n}\n\n.top-tabsView_menuItem:hover {\n\t--top-icon-color: var(--color-text-1);\n\n\tbackground: var(--color-bg-shading-1);\n\ttext-decoration: none;\n}\n\n.top-tabsView_menuItem.top-active {\n\t--top-icon-color: inherit;\n\n\tbackground: var(--color-layout-front-1);\n\tcolor: inherit;\n}\n\n.top-tabsView_menuItem:disabled:not(option):not(optgroup):not(.top-forms-option),\n.top-tabsView_menuItem:disabled ~ .top-formsCaption,\n.top-tabsView_menuItem.top-disabled[data-top-icon]:before,\n.top-tabsView_menuItem.top-disabled[data-top-icon2]:after {\n\topacity: unset;\n\tfilter: unset;\n}\n\n.top-tabsView_menuItem.top-disabled {\n\t--top-icon-color: var(--color-text-4);\n\n\tcolor: var(--color-text-4);\n}\n</style>\n","// TODO: Эту функцию можно вынести в глобальный utils\n\nimport { sleepWhile } from '@/core/utils/system';\n\n/**\n * Проверка нахождения компонента в состояние загрузки\n * @param component\n */\nexport const checkComponentIsLoading = (component: any) => {\n\treturn component?.name === 'AsyncComponentWrapper' && !component?.__asyncResolved;\n};\n\n/**\n * Презагрузить компонент\n *\n * Некоторое время ожидает загрузку компонента, прежде чем завершит работу\n */\nexport const preResolveComponent = async (component: any, condition: Function) => {\n\tif (component?.name !== 'AsyncComponentWrapper') return;\n\tif (component?.__asyncResolved) return;\n\n\tcomponent.__asyncLoader();\n\n\tawait sleepWhile(() => {\n\t\treturn condition() && checkComponentIsLoading(component);\n\t}, 200);\n};\n","<script setup lang=\"ts\">\nimport type { Ref, VNode } from 'vue';\nimport { markRaw, ref, useSlots, watch } from 'vue';\nimport { TopPopup } from '../../popup/popup';\nimport { getHash, setHash } from '@/core/utils/route';\n\nimport type { MenuItem, PropsMenu, PropsMenuItem } from './types';\nimport { useTabsStore } from './store';\nimport TabsViewMenuItem from './menuItem.vue';\nimport { preResolveComponent } from './utils';\n\ndefineProps<PropsMenu>();\n\nconst isLoading = defineModel('isLoading');\n\nconst store = useTabsStore();\n\nconst slots = useSlots();\n\n// словарь используется для оптимизации получения нужного menuItem\nconst menuItemByName: Map<PropsMenuItem['name'], MenuItem> = new Map();\n\n// заполнить словарь с menuItem, по элементам в slot default\nconst setMenuItemByName = () => {\n\tif (!slots.default) return;\n\n\tconst component: any = slots.default({}).find(item => item.key === '_menu');\n\tif (!component) return;\n\n\tsetMenuItemByNameFromItems(component.children);\n};\n\n// заполнить словарь с menuItem, по элементам\nconst setMenuItemByNameFromItems = (menuItems: VNode[]) => {\n\tmenuItems.forEach((subComponent: any) => {\n\t\t// это не компонент элемента меню\n\t\tif (subComponent.type.__name && subComponent.type.__name !== TabsViewMenuItem.__name) return;\n\n\t\t// это не компонент, например template\n\t\tif (!subComponent.type.__name && typeof subComponent.children === 'object') {\n\t\t\tsetMenuItemByNameFromItems(subComponent.children);\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (!subComponent.props?.name || subComponent.props?.disabled) return;\n\n\t\tconst menuItem: MenuItem = {\n\t\t\ttitle: (subComponent.children.default?.()[0].children as string).trim(),\n\t\t\ticon: subComponent.props.icon,\n\t\t\tcomponent: subComponent.props.component ? markRaw(subComponent.props.component) : TabsViewMenuItem.props.component.default,\n\t\t\tscrollable: subComponent.props.scrollable ?? TabsViewMenuItem.props.scrollable.default,\n\t\t};\n\n\t\tmenuItemByName.set(subComponent.props.name, menuItem);\n\t});\n};\n\n/**\n * activeMenuItem нужен:\n * - для вывода текста активной вкладки в меню с popup\n * - для вывода компонента активной вкладки (store.component)\n * - для установки store.scrollable\n */\nconst activeMenuItem: Ref<MenuItem | null> = ref(null);\n\n/**\n * Кол-во изменений активной вкладки\n */\nlet countChanged = 0;\n\n/**\n * Смена активной вкладки\n *\n * TODO: смена slot, например смена языка, требует повторного выполнения setMenuItemByName()\n */\nwatch(\n\t() => store.activeItemName,\n\tasync () => {\n\t\tconst numberChanged = ++countChanged; // порядковый номер текущего изменения\n\n\t\tif (menuItemByName.size === 0) {\n\t\t\tsetMenuItemByName();\n\t\t}\n\n\t\tif (menuItemByName.size === 0) {\n\t\t\tstore.activeItemName = '';\n\n\t\t\treturn;\n\t\t}\n\n\t\tactiveMenuItem.value = menuItemByName.get(store.activeItemName) ?? null;\n\n\t\t// элемент не найден, установить из хеша страницы\n\t\tif (!activeMenuItem.value && store.$id) {\n\t\t\tconst activeItemName = getHash(store.$id);\n\n\t\t\tactiveMenuItem.value = menuItemByName.get(activeItemName) ?? null;\n\n\t\t\tif (activeMenuItem.value) {\n\t\t\t\tstore.activeItemName = activeItemName;\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// элемент не найден, установить первый доступный\n\t\tif (!activeMenuItem.value) {\n\t\t\tstore.activeItemName = menuItemByName.keys().next().value!;\n\n\t\t\treturn;\n\t\t}\n\n\t\t// запрошена смена на уже активный элемент\n\t\tif (activeMenuItem.value.component === store.component) {\n\t\t\tisLoading.value = false;\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (store.$id) setHash(store.$id, store.activeItemName, false);\n\n\t\t// флаг загрузки будет сброшен при инициализации компонента\n\t\tisLoading.value = true;\n\n\t\t/**\n\t\t * Презагрузить компонент\n\t\t *\n\t\t * Нужно для того, чтобы минимизировать скачки интерфейса при ожидании загрузки асинхронного компонента\n\t\t */\n\t\tawait preResolveComponent(activeMenuItem.value.component, () => numberChanged === countChanged);\n\n\t\t// влкадка была сменена еще раз во время sleepWhile\n\t\tif (numberChanged !== countChanged) {\n\t\t\treturn;\n\t\t}\n\n\t\tstore.scrollable = activeMenuItem.value.scrollable;\n\t\tstore.component = activeMenuItem.value.component;\n\n\t\tif (activeMenuItem.value && !store.component) {\n\t\t\tconsole.warn(`Компонент вкладки ${store.activeItemName} не найден. Добавьте props.component для пункта меню ${store.activeItemName}.`);\n\t\t}\n\t},\n\t{ immediate: true },\n);\n\n</script>\n\n<template>\n\t<div\n\t\t:class=\"{\n\t\t\t'top-tabsView_menu': true,\n\t\t\t'top-tabsView_menu-inPopup_0': !store.showMenuInPopup,\n\t\t\t'top-tabsView_menu-inPopup_1': store.showMenuInPopup,\n\t\t\t'top-tabsView_menu-short': store.isShort && !store.showMenuInPopup,\n\t\t}\"\n\t>\n\t\t<!-- Спрятать меню под кнопку в popup -->\n\t\t<TopPopup v-if=\"store.showMenuInPopup\">\n\t\t\t<template #opener>\n\t\t\t\t<div class=\"top-tabsView_menuOpener\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-if=\"activeMenuItem\"\n\t\t\t\t\t\tclass=\"top-tabsView_menuOpenerActiveItem\"\n\t\t\t\t\t\t:data-top-icon=\"activeMenuItem.icon\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"top-ellipsis\">\n\t\t\t\t\t\t\t{{ activeMenuItem.title }}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"top-tabsView_menuOpenerIcon\" data-top-icon=\"\"></div>\n\t\t\t\t</div>\n\t\t\t</template>\n\n\t\t\t<template #contentList>\n\t\t\t\t<slot></slot>\n\t\t\t</template>\n\t\t</TopPopup>\n\n\t\t<!-- Отобразить меню на странице -->\n\t\t<template v-else>\n\t\t\t<div class=\"top-tabsView_menuList\">\n\t\t\t\t<slot></slot>\n\t\t\t</div>\n\n\t\t\t<div\n\t\t\t\tv-if=\"isShortable\"\n\t\t\t\tclass=\"top-tabsView_menuFooter\"\n\t\t\t>\n\t\t\t\t<TabsViewMenuItem\n\t\t\t\t\tv-if=\"isShortable\"\n\t\t\t\t\t:icon=\"store.isShort ? '' : ''\"\n\t\t\t\t\t@click=\"store.isShort = !store.isShort\"\n\t\t\t\t>\n\t\t\t\t\t{{ store.isShort ? '' : 'Свернуть' }} <!--TODO: translate-->\n\t\t\t\t</TabsViewMenuItem>\n\t\t\t</div>\n\t\t</template>\n\t</div>\n</template>\n\n<style>\n/* режим отображение табов в основной области документа */\n.top-tabsView-pageMod .top-tabsView_menu {\n\tbox-sizing: border-box;\n\tposition: sticky;\n\ttop: var(--top-tabsView-top);\n\tz-index: 10;\n}\n\n/* режим отображение табов в основной области документа без popup */\n.top-tabsView-pageMod .top-tabsView_menu-inPopup_0 {\n\theight: calc(var(--100vh) - var(--top-tabsView-top));\n}\n\n/* стантартный режим */\n.top-tabsView_menu-inPopup_0 {\n\tbox-sizing: border-box;\n\twidth: var(--top-tabsView-menu-width);\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\tflex-shrink: 0;\n}\n\n/* режим вывода в popup */\n.top-tabsView_menu-inPopup_1 {\n\tborder-bottom: var(--top-tabsView-menu-border-bottom-width) solid var(--color-line-2-opacity);\n}\n\n.top-tabsView_menu-short {\n\twidth: auto;\n}\n\n.top-tabsView_menu > .top-tabsView_menuOpener {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n}\n\n.top-tabsView_menu > .top-tabsView_menuOpener:hover {\n\tbackground: var(--color-layer-1);\n}\n\n.top-tabsView_menuOpenerIcon { display: flex; }\n\n.top-tabsView_menuOpenerActiveItem {\n\t--top-forms-padding: 0px;\n\n\tbox-sizing: border-box;\n\tpadding: var(--top-tabsView-menu-opener-padding);\n\tmax-width: calc(100% - var(--top-forms-base-height));\n\twhite-space: nowrap;\n\tflex-grow: 1;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: var(--top-padding-2);\n}\n\n.top-tabsView_menuList,\n.top-tabsView_menuFooter {\n\tpadding: var(--top-padding-2);\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: var(--top-gap-2);\n}\n\n.top-tabsView_menuList {\n\toverflow-y: auto;\n}\n\n.top-tabsView_menu-short .top-tabsView_menuFooter > .top-tabsView_menuItem {\n\t--top-icon-width: 100%;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { defineModel, onUnmounted, ref, watch } from 'vue';\nimport Core from '@/core/core/core';\nimport { delHash } from '@/core/utils/route';\nimport type { Props } from './types';\nimport { defineTabsStore } from './store';\nimport TabsViewMenu from './menu.vue';\nimport TopLoadbar from '@/components/forms/loadbar/loadbar.vue';\nimport { checkComponentIsLoading } from './utils';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tshowMenuInPopup: undefined,\n\tisShortable: false,\n});\n\nconst model = defineModel<string>();\n\nconst store = defineTabsStore(props, model);\n\nconst uid = Math.random();\n\nif (props.pageMod) Core.state.documentClassModificators.set(uid, 'top-hasTabsViewPageMod');\n\nonUnmounted(() => {\n\tif (props.pageMod) Core.state.documentClassModificators.delete(uid);\n\n\tif (store.$id) delHash(store.$id, store.activeItemName, true);\n});\n\nconst componentRef = ref();\nconst isLoading = ref(false);\n\nwatch([componentRef, () => store.component], () => {\n\tisLoading.value = checkComponentIsLoading(store.component);\n}, { immediate: true });\n</script>\n\n<template>\n\t<div\n\t\t:class=\"{\n\t\t\t'top-tabsView': true,\n\t\t\t'top-tabsView-pageMod': props.pageMod,\n\t\t\t'top-tabsView-inPopup': store.showMenuInPopup,\n\t\t}\"\n\t>\n\t\t<TabsViewMenu\n\t\t\t:isShortable=\"isShortable\"\n\t\t\tv-model:isLoading=\"isLoading\"\n\t\t>\n\t\t\t<!-- @slot Меню, ожидает передачу компонентов TabsViewMenuItem и TabsViewMenuTitle -->\n\t\t\t<slot name=\"menu\"></slot>\n\t\t</TabsViewMenu>\n\n\t\t<div\n\t\t\t:class=\"{\n\t\t\t\t'top-tabsView_contents': true,\n\t\t\t\t'top-tabsView_contents-isLoading': isLoading,\n\t\t\t\t'top-tabsView_contents-noScrollable': !store.scrollable,\n\t\t\t}\"\n\t\t>\n\t\t\t<TopLoadbar v-if=\"isLoading\"/>\n\n\t\t\t<keep-alive>\n\t\t\t\t<component\n\t\t\t\t\tref=\"componentRef\"\n\t\t\t\t\t:is=\"store.component\"\n\t\t\t\t/>\n\t\t\t</keep-alive>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n:root {\n\t--top-tabsView-top: 0px;\n\t--top-tabsView-menu-width: 220px;\n\t--top-tabsView-contents-offset-top: 0px;\n\t--top-tabsView-menu-border-bottom-width: 1px;\n\t--top-tabsView-menu-opener-padding: var(--top-padding-2);\n}\n\n.top-tabsView {\n\tbackground: var(--color-layout-middle);\n\twidth: 100%;\n\theight: 100%;\n\tdisplay: flex;\n\tflex-direction: row;\n}\n\n.top-tabsView_contents {\n\tborder-radius: var(--top-radius-4);\n\tbackground: var(--color-layout-front-1);\n\tpadding: var(--top-padding-4);\n\tflex-grow: 1;\n\toverflow: auto;\n\tposition: relative;\n}\n\n.top-tabsView_contents-isLoading {\n\tpointer-events: none;\n}\n\n.top-tabsView_contents-noScrollable {\n\twidth: calc(100% - var(--top-tabsView-menu-width));\n\tpadding: 0;\n\toverflow: visible;\n}\n\n/* top-tabsView-inPopup */\n.top-tabsView-inPopup {\n\tbackground: var(--color-layout-front-1);\n\tflex-direction: column;\n}\n\n.top-tabsView-inPopup > .top-tabsView_contents {\n\tborder-radius: 0;\n}\n\n.top-tabsView-inPopup > .top-tabsView_contents-noScrollable {\n\twidth: auto;\n}\n\n@media only screen and (max-width: 900px) {\n\t:root {\n\t\t/* Суммарно должна быть высота элемента \".top-tabsView_menu\" */\n\t\t--top-tabsView-contents-offset-top: calc(var(--top-icon-size) + var(--top-tabsView-menu-opener-padding) * 2 + var(--top-tabsView-menu-border-bottom-width));\n\t}\n}\n</style>\n","<script setup lang=\"ts\">\n\n</script>\n\n<template>\n\t<div class=\"top-tabsView_menuDelimeter\"></div>\n</template>\n\n<style>\n.top-tabsView_menuDelimeter {\n\tpadding: var(--top-padding-1) 0;\n\tdisplay: flex;\n}\n\n.top-tabsView_menuDelimeter:before {\n\tcontent: \"\";\n\theight: 2px;\n\tbackground: var(--color-line-2);\n\tflex-grow: 1;\n}\n\n.top-tabsView_menuDelimeter:first-child,\n.top-tabsView_menuDelimeter + .top-tabsView_menuDelimeter {\n\tdisplay: none;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { useTabsStore } from './store';\nimport type { PropsMenuTitle } from './types';\nimport TabsViewMenuDelimeter from './menuDelimeter.vue';\nimport { TopPopupListItem } from '../../popup/popup';\n\ndefineProps<PropsMenuTitle>();\n\nconst store = useTabsStore();\n</script>\n\n<template>\n\t<TopPopupListItem\n\t\tv-if=\"store.showMenuInPopup\"\n\t\ttype=\"title\"\n\t>\n\t\t<slot></slot>\n\t</TopPopupListItem>\n\n\t<TabsViewMenuDelimeter v-else-if=\"store.isShort\"/>\n\n\t<div\n\t\tv-else\n\t\t:class=\"{\n\t\t\t'top-tabsView_menuTitle': true,\n\t\t\t'top-tabsView_menuTitle-subtitle': isSubtitle,\n\t\t}\"\n\t>\n\t\t<slot></slot>\n\t</div>\n</template>\n\n<style>\n.top-tabsView_menuTitle {\n\tpadding: var(--top-padding-4) var(--top-padding-2) var(--top-padding-1);\n\tfont-weight: 600;\n\tcolor: var(--color-text-1);\n}\n\n.top-tabsView_menuTitle-subtitle {\n\tpadding-top: var(--top-padding-1);\n\tfont-size: 12px;\n\tfont-weight: 400;\n\tcolor: var(--color-text-2);\n}\n</style>\n"]}