shared-ritm 1.3.38 → 1.3.40

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 (64) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/shared-ritm.es.js +16 -10
  3. package/dist/shared-ritm.umd.js +150 -150
  4. package/dist/types/api/services/AuthService.d.ts +1 -0
  5. package/package.json +70 -64
  6. package/src/App.vue +2461 -2461
  7. package/src/api/services/AuthService.ts +10 -3
  8. package/src/api/services/ControlsService.ts +96 -96
  9. package/src/api/services/EquipmentService.ts +29 -29
  10. package/src/api/services/GanttService.ts +23 -23
  11. package/src/api/services/MetricsService.ts +123 -123
  12. package/src/api/services/RepairsService.ts +111 -111
  13. package/src/api/services/TasksService.ts +157 -157
  14. package/src/api/services/UserService.ts +123 -123
  15. package/src/api/services/VideoService.ts +118 -118
  16. package/src/api/types/Api_Metrics.ts +5 -5
  17. package/src/api/types/Api_Repairs.ts +186 -186
  18. package/src/api/types/Api_Tasks.ts +376 -376
  19. package/src/api/types/Api_Video.ts +244 -244
  20. package/src/common/app-button/Button.stories.ts +369 -0
  21. package/src/common/app-checkbox/Checkbox.stories.ts +60 -0
  22. package/src/common/app-date-picker/DatePicker.stories.ts +66 -0
  23. package/src/common/app-datepicker/Datepicker.stories.ts +145 -0
  24. package/src/common/app-dialogs/AppConfirmDialog.vue +109 -109
  25. package/src/common/app-dialogs/Confirm.stories.ts +93 -0
  26. package/src/common/app-dropdown/Dropdown.stories.ts +94 -0
  27. package/src/common/app-file/File.stories.ts +104 -0
  28. package/src/common/app-icon/AppIcon.vue +108 -108
  29. package/src/common/app-icon/Icon.stories.ts +91 -0
  30. package/src/common/app-input/Input.stories.ts +160 -0
  31. package/src/common/app-input-new/InputNew.stories.ts +240 -0
  32. package/src/common/app-input-search/InputSearch.stories.ts +149 -0
  33. package/src/common/app-layout/components/AppLayoutHeader.vue +289 -273
  34. package/src/common/app-loader/Loader.stories.ts +114 -0
  35. package/src/common/app-select/AppSelect.vue +159 -159
  36. package/src/common/app-select/Select.stories.ts +155 -0
  37. package/src/common/app-sidebar/AppSidebar.vue +174 -174
  38. package/src/common/app-table/AppTable.vue +313 -313
  39. package/src/common/app-table/components/ModalSelect.stories.ts +323 -0
  40. package/src/common/app-table/components/ModalSelect.vue +302 -302
  41. package/src/common/app-table/components/TableModal.vue +367 -367
  42. package/src/common/app-table/controllers/useColumnSelector.ts +45 -45
  43. package/src/common/app-table/controllers/useTableModel.ts +97 -102
  44. package/src/common/app-toggle/Toggle.stories.ts +69 -0
  45. package/src/common/app-wrapper/AppWrapper.vue +31 -28
  46. package/src/configs/storybook.ts +14 -0
  47. package/src/index.ts +131 -131
  48. package/src/shared/styles/general.css +140 -124
  49. package/src/styles/variables.sass +12 -12
  50. package/src/utils/helpers.ts +59 -59
  51. package/dist/types/api/services/PhotoService.d.ts +0 -40
  52. package/dist/types/stories/Button.stories.d.ts +0 -13
  53. package/dist/types/stories/Checkbox.stories.d.ts +0 -7
  54. package/dist/types/stories/Confirm.stories.d.ts +0 -8
  55. package/dist/types/stories/DatePicker.stories.d.ts +0 -8
  56. package/dist/types/stories/Dropdown.stories.d.ts +0 -8
  57. package/dist/types/stories/File.stories.d.ts +0 -8
  58. package/dist/types/stories/Icon.stories.d.ts +0 -7
  59. package/dist/types/stories/Input.stories.d.ts +0 -11
  60. package/dist/types/stories/InputNew.stories.d.ts +0 -12
  61. package/dist/types/stories/InputSearch.stories.d.ts +0 -10
  62. package/dist/types/stories/Loader.stories.d.ts +0 -8
  63. package/dist/types/stories/Select.stories.d.ts +0 -7
  64. package/dist/types/stories/Toggle.stories.d.ts +0 -8
@@ -1,108 +1,108 @@
1
- <template>
2
- <component :is="sideBarIcon" :tag="tag" :class="[$style['app-icon']]" />
3
- </template>
4
-
5
- <script setup lang="ts">
6
- import ProjectsIcon from '@/icons/sidebar/projects-icon.vue'
7
- import RepairsIcon from '@/icons/sidebar/repairs-icon.vue'
8
- import InstrumentHistoryIcon from '@/icons/sidebar/instrument-history-icon.vue'
9
- import RepairObjectIcon from '@/icons/sidebar/repair-object-icon.vue'
10
- import StatusHistoryIcon from '@/icons/sidebar/status-history-icon.vue'
11
- import SettingIcon from '@/icons/header/SettingIcon.vue'
12
- import PassIcon from '@/icons/sidebar/pass-icon.vue'
13
- import AssignModuleIcon from '@/icons/sidebar/assign-module-icon.vue'
14
- import UsersIcon from '@/icons/sidebar/users-icon.vue'
15
- import UserIcon from '@/icons/sidebar/user-icon.vue'
16
- import WorkzonesIcon from '@/icons/sidebar/workzones-icon.vue'
17
- import LogoutIcon from '@/icons/sidebar/logout-icon.vue'
18
- import LogoIcon from '@/icons/sidebar/logo-icon.vue'
19
- import TasksIcon from '@/icons/sidebar/tasks-icon.vue'
20
- import InstrumentsIcon from '@/icons/sidebar/instruments-icon.vue'
21
- import OrderIcon from '@/icons/sidebar/order-icon.vue'
22
- import ModulesIcon from '@/icons/sidebar/modules-icon.vue'
23
- import NotificationsIcon from '@/icons/sidebar/notifications-icon.vue'
24
- import VideozonesIcon from '@/icons/sidebar/videozones-icon.vue'
25
- import InstrumentWorkZoneIcon from '@/icons/sidebar/instrument-work-zone-icon.vue'
26
- import WorkshopIcon from '@/icons/sidebar/workshop-icon.vue'
27
- import WarehousesIcon from '@/icons/sidebar/warehouses-icon.vue'
28
- import TeamsIcon from '@/icons/sidebar/teams-icon.vue'
29
- import RolesIcon from '@/icons/sidebar/roles-icon.vue'
30
- import PositionsIcon from '@/icons/sidebar/positions-icon.vue'
31
- import PersonIcon from '@/icons/header/PersonIcon.vue'
32
- import InstrumentOrderIcon from '@/icons/sidebar/instrument-order-icon.vue'
33
- import PreorderIcon from '@/icons/sidebar/preorder-icon.vue'
34
- import VideowallIcon from '@/icons/sidebar/videowall-icon.vue'
35
- import VideosourcesIcon from '@/icons/sidebar/videosources-icon.vue'
36
- import Tasks_tasksIcon from '@/icons/sidebar/tasks_tasks-icon.vue'
37
- import Tasks_todayIcon from '@/icons/sidebar/tasks_today-icon.vue'
38
- import ArrowFrameIcon from '@/icons/components/arrow-frame-icon.vue'
39
-
40
- import { computed, defineProps } from 'vue'
41
-
42
- interface Props {
43
- size?: string | undefined
44
- tag?: string | undefined
45
- name: string
46
- color?: string | undefined
47
- }
48
-
49
- const props = withDefaults(defineProps<Props>(), {
50
- tag: '',
51
- name: '',
52
- })
53
-
54
- function toPascalCase(str: string): string {
55
- if (!str) return ''
56
- return str
57
- .split('-')
58
- .map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
59
- .join('')
60
- }
61
- const sideBarIcon = computed(
62
- () =>
63
- ({
64
- ProjectsIcon,
65
- RepairsIcon,
66
- RepairObjectIcon,
67
- InstrumentHistoryIcon,
68
- StatusHistoryIcon,
69
- SettingIcon,
70
- PassIcon,
71
- AssignModuleIcon,
72
- UsersIcon,
73
- UserIcon,
74
- WorkzonesIcon,
75
- LogoutIcon,
76
- LogoIcon,
77
- TasksIcon,
78
- InstrumentsIcon,
79
- OrderIcon,
80
- ModulesIcon,
81
- NotificationsIcon,
82
- VideozonesIcon,
83
- InstrumentWorkZoneIcon,
84
- WorkshopIcon,
85
- WarehousesIcon,
86
- TeamsIcon,
87
- RolesIcon,
88
- PositionsIcon,
89
- PersonIcon,
90
- InstrumentOrderIcon,
91
- PreorderIcon,
92
- VideowallIcon,
93
- VideosourcesIcon,
94
- Tasks_tasksIcon,
95
- Tasks_todayIcon,
96
- ArrowFrameIcon,
97
- }[toPascalCase(props.name)]),
98
- )
99
- </script>
100
-
101
- <style module lang="scss">
102
- .app-icon {
103
- stroke: v-bind(color);
104
- fill: none;
105
- width: v-bind(size);
106
- height: v-bind(size);
107
- }
108
- </style>
1
+ <template>
2
+ <component :is="sideBarIcon" :tag="tag" :class="[$style['app-icon']]" />
3
+ </template>
4
+
5
+ <script setup lang="ts">
6
+ import ProjectsIcon from '@/icons/sidebar/projects-icon.vue'
7
+ import RepairsIcon from '@/icons/sidebar/repairs-icon.vue'
8
+ import InstrumentHistoryIcon from '@/icons/sidebar/instrument-history-icon.vue'
9
+ import RepairObjectIcon from '@/icons/sidebar/repair-object-icon.vue'
10
+ import StatusHistoryIcon from '@/icons/sidebar/status-history-icon.vue'
11
+ import SettingIcon from '@/icons/header/SettingIcon.vue'
12
+ import PassIcon from '@/icons/sidebar/pass-icon.vue'
13
+ import AssignModuleIcon from '@/icons/sidebar/assign-module-icon.vue'
14
+ import UsersIcon from '@/icons/sidebar/users-icon.vue'
15
+ import UserIcon from '@/icons/sidebar/user-icon.vue'
16
+ import WorkzonesIcon from '@/icons/sidebar/workzones-icon.vue'
17
+ import LogoutIcon from '@/icons/sidebar/logout-icon.vue'
18
+ import LogoIcon from '@/icons/sidebar/logo-icon.vue'
19
+ import TasksIcon from '@/icons/sidebar/tasks-icon.vue'
20
+ import InstrumentsIcon from '@/icons/sidebar/instruments-icon.vue'
21
+ import OrderIcon from '@/icons/sidebar/order-icon.vue'
22
+ import ModulesIcon from '@/icons/sidebar/modules-icon.vue'
23
+ import NotificationsIcon from '@/icons/sidebar/notifications-icon.vue'
24
+ import VideozonesIcon from '@/icons/sidebar/videozones-icon.vue'
25
+ import InstrumentWorkZoneIcon from '@/icons/sidebar/instrument-work-zone-icon.vue'
26
+ import WorkshopIcon from '@/icons/sidebar/workshop-icon.vue'
27
+ import WarehousesIcon from '@/icons/sidebar/warehouses-icon.vue'
28
+ import TeamsIcon from '@/icons/sidebar/teams-icon.vue'
29
+ import RolesIcon from '@/icons/sidebar/roles-icon.vue'
30
+ import PositionsIcon from '@/icons/sidebar/positions-icon.vue'
31
+ import PersonIcon from '@/icons/header/PersonIcon.vue'
32
+ import InstrumentOrderIcon from '@/icons/sidebar/instrument-order-icon.vue'
33
+ import PreorderIcon from '@/icons/sidebar/preorder-icon.vue'
34
+ import VideowallIcon from '@/icons/sidebar/videowall-icon.vue'
35
+ import VideosourcesIcon from '@/icons/sidebar/videosources-icon.vue'
36
+ import Tasks_tasksIcon from '@/icons/sidebar/tasks_tasks-icon.vue'
37
+ import Tasks_todayIcon from '@/icons/sidebar/tasks_today-icon.vue'
38
+ import ArrowFrameIcon from '@/icons/components/arrow-frame-icon.vue'
39
+
40
+ import { computed, defineProps } from 'vue'
41
+
42
+ interface Props {
43
+ size?: string | undefined
44
+ tag?: string | undefined
45
+ name: string
46
+ color?: string | undefined
47
+ }
48
+
49
+ const props = withDefaults(defineProps<Props>(), {
50
+ tag: '',
51
+ name: '',
52
+ })
53
+
54
+ function toPascalCase(str: string): string {
55
+ if (!str) return ''
56
+ return str
57
+ .split('-')
58
+ .map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
59
+ .join('')
60
+ }
61
+ const sideBarIcon = computed(
62
+ () =>
63
+ ({
64
+ ProjectsIcon,
65
+ RepairsIcon,
66
+ RepairObjectIcon,
67
+ InstrumentHistoryIcon,
68
+ StatusHistoryIcon,
69
+ SettingIcon,
70
+ PassIcon,
71
+ AssignModuleIcon,
72
+ UsersIcon,
73
+ UserIcon,
74
+ WorkzonesIcon,
75
+ LogoutIcon,
76
+ LogoIcon,
77
+ TasksIcon,
78
+ InstrumentsIcon,
79
+ OrderIcon,
80
+ ModulesIcon,
81
+ NotificationsIcon,
82
+ VideozonesIcon,
83
+ InstrumentWorkZoneIcon,
84
+ WorkshopIcon,
85
+ WarehousesIcon,
86
+ TeamsIcon,
87
+ RolesIcon,
88
+ PositionsIcon,
89
+ PersonIcon,
90
+ InstrumentOrderIcon,
91
+ PreorderIcon,
92
+ VideowallIcon,
93
+ VideosourcesIcon,
94
+ Tasks_tasksIcon,
95
+ Tasks_todayIcon,
96
+ ArrowFrameIcon,
97
+ })[toPascalCase(props.name)],
98
+ )
99
+ </script>
100
+
101
+ <style module lang="scss">
102
+ .app-icon {
103
+ stroke: v-bind(color);
104
+ fill: none;
105
+ width: v-bind(size);
106
+ height: v-bind(size);
107
+ }
108
+ </style>
@@ -0,0 +1,91 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3'
2
+ import AppIcon from '@/common/app-icon/AppIcon.vue'
3
+ import { quasarColorOpts } from '@/configs/storybook'
4
+
5
+ const ICON_NAMES = [
6
+ 'projects',
7
+ 'repairs',
8
+ 'instrument-history',
9
+ 'repair-object',
10
+ 'status-history',
11
+ 'setting',
12
+ 'pass',
13
+ 'assign-module',
14
+ 'users',
15
+ 'user',
16
+ 'workzones',
17
+ 'logout',
18
+ 'logo',
19
+ 'tasks',
20
+ 'instruments',
21
+ 'order',
22
+ 'modules',
23
+ 'notifications',
24
+ 'videozones',
25
+ 'instrument-work-zone',
26
+ 'workshop',
27
+ 'warehouses',
28
+ 'teams',
29
+ 'roles',
30
+ 'positions',
31
+ 'person',
32
+ 'instrument-order',
33
+ 'preorder',
34
+ 'videowall',
35
+ 'videosources',
36
+ 'tasks-tasks',
37
+ 'tasks-today',
38
+ 'arrow-frame',
39
+ ] as const
40
+
41
+ const meta: Meta<typeof AppIcon> = {
42
+ title: 'Components/AppIcon',
43
+ component: AppIcon,
44
+ tags: ['autodocs'],
45
+ argTypes: {
46
+ name: {
47
+ control: 'select',
48
+ options: ICON_NAMES,
49
+ description: 'Название иконки.',
50
+ },
51
+ size: {
52
+ control: 'text',
53
+ description: 'Размер иконки (CSS-значение: например, "24px", "1.5em", "100%").',
54
+ },
55
+ color: {
56
+ control: 'select',
57
+ options: quasarColorOpts,
58
+ description: 'Цвет иконки из палитры Quasar.',
59
+ },
60
+ tag: {
61
+ control: 'text',
62
+ description: 'HTML-тег, в который будет обёрнута иконка (например, "span", "div").',
63
+ },
64
+ },
65
+ args: {
66
+ name: 'user',
67
+ size: '24px',
68
+ color: 'primary',
69
+ tag: '',
70
+ },
71
+ }
72
+
73
+ export default meta
74
+
75
+ type Story = StoryObj<typeof AppIcon>
76
+
77
+ export const Default: Story = { args: { name: 'person-icon' } }
78
+
79
+ export const Sizes: Story = {
80
+ render: () => ({
81
+ components: { AppIcon },
82
+ template: `
83
+ <div style="display: flex; gap: 24px; align-items: center; flex-wrap: wrap;">
84
+ <AppIcon name="person-icon" size="16px" color="primary" />
85
+ <AppIcon name="person-icon" size="24px" color="primary" />
86
+ <AppIcon name="person-icon" size="32px" color="primary" />
87
+ <AppIcon name="person-icon" size="48px" color="primary" />
88
+ </div>
89
+ `,
90
+ }),
91
+ }
@@ -0,0 +1,160 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3'
2
+ import AppInput from '@/common/app-input/AppInput.vue'
3
+
4
+ const meta: Meta<typeof AppInput> = {
5
+ title: 'Components/AppInput',
6
+ component: AppInput,
7
+ tags: ['autodocs'],
8
+ argTypes: {
9
+ modelValue: {
10
+ control: 'text',
11
+ table: { category: 'Используется' },
12
+ },
13
+ placeholder: {
14
+ control: 'text',
15
+ description: 'Текст-подсказка внутри поля.',
16
+ table: { category: 'Используется' },
17
+ },
18
+ type: {
19
+ control: 'select',
20
+ options: ['text', 'password', 'number', 'email', 'search', 'tel', 'date', 'url'],
21
+ description: 'Тип HTML-инпута.',
22
+ table: { category: 'Используется' },
23
+ },
24
+
25
+ width: {
26
+ control: 'text',
27
+ description: 'Ширина поля (CSS-значение, например "300px", "100%").',
28
+ table: { disable: true },
29
+ },
30
+ height: {
31
+ control: 'text',
32
+ description: 'Высота поля (например, "48px").',
33
+ table: { category: 'Используется' },
34
+ },
35
+ borderRadius: {
36
+ control: 'text',
37
+ description: 'Скругление углов (например, "8px").',
38
+ table: { disable: true },
39
+ },
40
+ borderWidth: {
41
+ control: 'text',
42
+ description: 'Толщина границы (например, "1px").',
43
+ table: { disable: true },
44
+ },
45
+
46
+ disabled: {
47
+ control: 'boolean',
48
+ description: 'Отключает поле ввода.',
49
+ table: { category: 'Используется' },
50
+ },
51
+ readonly: {
52
+ control: 'boolean',
53
+ description: 'Делает поле доступным только для чтения.',
54
+ table: { category: 'Используется' },
55
+ },
56
+ field: {
57
+ control: 'boolean',
58
+ description: 'Делает поле доступным только для чтения.',
59
+ table: { category: 'Используется' },
60
+ },
61
+ required: {
62
+ control: 'boolean',
63
+ description: 'Добавляет визуальный признак обязательного поля (стиль --required).',
64
+ table: { disable: true },
65
+ },
66
+
67
+ withArrow: {
68
+ control: 'boolean',
69
+ description: 'Для type="number": показывать ли стрелки вверх/вниз.',
70
+ table: { disable: true },
71
+ },
72
+ mask: { control: 'text', table: { disable: true } },
73
+ debounce: { control: 'number', table: { disable: true } },
74
+ datePicker: { table: { disable: true } },
75
+ timePicker: { table: { disable: true } },
76
+ withIcon: { table: { disable: true } },
77
+ withButton: { table: { disable: true } },
78
+ rules: { description: 'Правила для валидации.', table: { category: 'Используется' } },
79
+ borderColor: { table: { disable: true } },
80
+ name: { table: { disable: true } },
81
+ label: { table: { disable: true } },
82
+ hint: { table: { disable: true } },
83
+ },
84
+ args: {
85
+ modelValue: '',
86
+ placeholder: 'Введите значение...',
87
+ type: 'text',
88
+ height: '48px',
89
+ },
90
+ }
91
+
92
+ export default meta
93
+
94
+ type Story = StoryObj<typeof AppInput>
95
+
96
+ export const Default: Story = {}
97
+
98
+ export const InputTypes: Story = {
99
+ render: () => ({
100
+ components: { AppInput },
101
+ template: `
102
+ <div style="display: flex; flex-direction: column; gap: 16px;">
103
+ <AppInput v-model="textValue" placeholder="Текст" type="text" />
104
+ <AppInput v-model="passwordValue" placeholder="Пароль" type="password" />
105
+ <AppInput v-model="emailValue" placeholder="Email" type="email" />
106
+ <AppInput v-model="telValue" placeholder="Телефон" type="tel" />
107
+ <AppInput v-model="numValue" placeholder="Число" type="number"/>
108
+ </div>
109
+ `,
110
+ data() {
111
+ return {
112
+ textValue: '',
113
+ passwordValue: '',
114
+ emailValue: '',
115
+ telValue: '',
116
+ numValue: 0,
117
+ }
118
+ },
119
+ }),
120
+ }
121
+
122
+ export const States: Story = {
123
+ render: () => ({
124
+ components: { AppInput },
125
+ template: `
126
+ <div style="display: flex; flex-direction: column; gap: 16px;">
127
+ <AppInput v-model="activeValue" placeholder="Активное" />
128
+ <AppInput v-model="disabledValue" :disabled="true" />
129
+ <AppInput v-model="readonlyValue" :readonly="true" />
130
+ </div>
131
+ `,
132
+ data() {
133
+ return {
134
+ activeValue: '',
135
+ disabledValue: 'недоступно',
136
+ readonlyValue: 'только чтение',
137
+ }
138
+ },
139
+ }),
140
+ }
141
+
142
+ export const Sizes: Story = {
143
+ render: () => ({
144
+ components: { AppInput },
145
+ template: `
146
+ <div style="display: flex; gap: 16px; flex-wrap: wrap; align-items: end;">
147
+ <AppInput v-model="val1" placeholder="40px" height="40px" width="180px" />
148
+ <AppInput v-model="val2" placeholder="48px" height="48px" width="200px" />
149
+ <AppInput v-model="val3" placeholder="60px" height="60px" width="220px" border-radius="12px" />
150
+ </div>
151
+ `,
152
+ data() {
153
+ return {
154
+ val1: '',
155
+ val2: '',
156
+ val3: '',
157
+ }
158
+ },
159
+ }),
160
+ }