shared-ritm 1.3.130 → 1.3.131

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 (85) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/shared-ritm.es.js +1625 -1649
  3. package/dist/shared-ritm.umd.js +135 -135
  4. package/dist/types/api/services/MetricsService.d.ts +2 -3
  5. package/dist/types/api/types/Api_Metrics.d.ts +0 -21
  6. package/dist/types/api/types/Api_Tasks.d.ts +0 -6
  7. package/package.json +70 -70
  8. package/src/App.vue +2461 -2461
  9. package/src/api/services/AuthService.ts +67 -67
  10. package/src/api/services/ControlsService.ts +100 -100
  11. package/src/api/services/EquipmentService.ts +68 -68
  12. package/src/api/services/GanttService.ts +58 -58
  13. package/src/api/services/InstrumentsService.ts +76 -76
  14. package/src/api/services/MetricsService.ts +3 -0
  15. package/src/api/services/RepairsService.ts +111 -111
  16. package/src/api/services/TasksService.ts +165 -165
  17. package/src/api/services/UserIssueService.ts +32 -32
  18. package/src/api/services/UserService.ts +129 -129
  19. package/src/api/services/VideoService.ts +118 -118
  20. package/src/api/settings/ApiService.ts +185 -185
  21. package/src/api/types/Api_Auth.ts +121 -121
  22. package/src/api/types/Api_Controls.ts +112 -112
  23. package/src/api/types/Api_Equipment.ts +54 -54
  24. package/src/api/types/Api_Instruments.ts +182 -182
  25. package/src/api/types/Api_Metrics.ts +112 -112
  26. package/src/api/types/Api_Repairs.ts +200 -200
  27. package/src/api/types/Api_Search.ts +81 -81
  28. package/src/api/types/Api_Tasks.ts +385 -385
  29. package/src/api/types/Api_User.ts +161 -161
  30. package/src/api/types/Api_User_Issue.ts +36 -36
  31. package/src/api/types/Api_Video.ts +244 -244
  32. package/src/common/app-button/Button.stories.ts +369 -369
  33. package/src/common/app-checkbox/AppCheckbox.vue +33 -33
  34. package/src/common/app-checkbox/Checkbox.stories.ts +252 -252
  35. package/src/common/app-date-picker/DatePicker.stories.ts +66 -66
  36. package/src/common/app-datepicker/AppDatepicker.vue +221 -221
  37. package/src/common/app-datepicker/Datepicker.stories.ts +145 -145
  38. package/src/common/app-dialogs/AppConfirmDialog.vue +109 -109
  39. package/src/common/app-dialogs/Confirm.stories.ts +93 -93
  40. package/src/common/app-dropdown/Dropdown.stories.ts +94 -94
  41. package/src/common/app-file/File.stories.ts +104 -104
  42. package/src/common/app-icon/AppIcon.vue +110 -110
  43. package/src/common/app-icon/Icon.stories.ts +91 -91
  44. package/src/common/app-input/AppInput.vue +150 -150
  45. package/src/common/app-input/Input.stories.ts +160 -160
  46. package/src/common/app-input-new/AppInputNew.vue +186 -186
  47. package/src/common/app-input-new/InputNew.stories.ts +240 -240
  48. package/src/common/app-input-search/InputSearch.stories.ts +149 -149
  49. package/src/common/app-layout/components/AppLayoutHeader.vue +289 -289
  50. package/src/common/app-loader/Loader.stories.ts +114 -114
  51. package/src/common/app-modal/index.vue +101 -101
  52. package/src/common/app-select/AppSelect.vue +167 -167
  53. package/src/common/app-select/Select.stories.ts +155 -155
  54. package/src/common/app-sheet-new/AppSheetNew.vue +254 -254
  55. package/src/common/app-sidebar/AppSidebar.vue +177 -177
  56. package/src/common/app-table/AppTable.vue +313 -313
  57. package/src/common/app-table/components/ModalSelect.stories.ts +323 -323
  58. package/src/common/app-table/components/ModalSelect.vue +311 -311
  59. package/src/common/app-table/components/TableModal.vue +369 -369
  60. package/src/common/app-table/controllers/useColumnSelector.ts +45 -45
  61. package/src/common/app-table/controllers/useTableModel.ts +98 -98
  62. package/src/common/app-toggle/AppToggle.vue +12 -12
  63. package/src/common/app-toggle/Toggle.stories.ts +245 -245
  64. package/src/common/app-wrapper/AppWrapper.vue +31 -31
  65. package/src/configs/storybook.ts +14 -14
  66. package/src/icons/sidebar/user-requests-icon.vue +23 -23
  67. package/src/index.ts +134 -134
  68. package/src/shared/styles/general.css +140 -140
  69. package/src/styles/variables.sass +12 -12
  70. package/src/utils/files.ts +38 -38
  71. package/src/utils/helpers.ts +59 -59
  72. package/dist/types/api/services/PhotoService.d.ts +0 -40
  73. package/dist/types/stories/Button.stories.d.ts +0 -13
  74. package/dist/types/stories/Checkbox.stories.d.ts +0 -7
  75. package/dist/types/stories/Confirm.stories.d.ts +0 -8
  76. package/dist/types/stories/DatePicker.stories.d.ts +0 -8
  77. package/dist/types/stories/Dropdown.stories.d.ts +0 -8
  78. package/dist/types/stories/File.stories.d.ts +0 -8
  79. package/dist/types/stories/Icon.stories.d.ts +0 -7
  80. package/dist/types/stories/Input.stories.d.ts +0 -11
  81. package/dist/types/stories/InputNew.stories.d.ts +0 -12
  82. package/dist/types/stories/InputSearch.stories.d.ts +0 -10
  83. package/dist/types/stories/Loader.stories.d.ts +0 -8
  84. package/dist/types/stories/Select.stories.d.ts +0 -7
  85. package/dist/types/stories/Toggle.stories.d.ts +0 -8
@@ -1,186 +1,186 @@
1
- <template>
2
- <div class="app-input-new" :class="{ hideBottomSpace }">
3
- <label v-if="label" class="app-input-new__label">
4
- {{ label }}
5
- <span v-if="required" class="required">*</span>
6
- </label>
7
-
8
- <q-input
9
- v-model="model"
10
- filled
11
- :type="inputType"
12
- :rules="rules"
13
- :placeholder="placeholder"
14
- :disable="disable"
15
- :readonly="readonly"
16
- :class="inputClass"
17
- :error="error"
18
- :autocomplete="autocomplete"
19
- :debounce="debounce"
20
- :loading="loading"
21
- :maxlength="maxlength"
22
- :counter="counter"
23
- :hide-bottom-space="hideBottomSpace"
24
- @blur="emit('blur')"
25
- >
26
- <slot />
27
- <template #append>
28
- <slot name="append" />
29
- <q-icon
30
- v-if="type === 'password'"
31
- :name="isVisiblePass ? 'visibility' : 'visibility_off'"
32
- color="primary"
33
- class="cursor-pointer"
34
- @click="isVisiblePass = !isVisiblePass"
35
- />
36
- <q-icon
37
- v-if="clearable && (model || model === 0)"
38
- name="close"
39
- class="cursor-pointer clear-input"
40
- @click="model = null"
41
- />
42
- <q-btn
43
- v-if="uuid && !disable && !readonly"
44
- flat
45
- no-caps
46
- label="UUID"
47
- size="sm"
48
- class="q-ml-sm uuid-btn"
49
- @click="model = uuidv4()"
50
- />
51
- <q-icon
52
- v-if="copyable"
53
- name="content_copy"
54
- class="cursor-pointer q-ml-sm copy-icon"
55
- color="primary"
56
- :disable="!model"
57
- @click="copyToClipboard"
58
- />
59
- </template>
60
- </q-input>
61
- </div>
62
- </template>
63
-
64
- <script setup lang="ts">
65
- import { defineEmits, defineProps, computed, ref } from 'vue'
66
- import { uuidv4 } from '@/utils/helpers'
67
- import { notificationSettings } from '@/utils/notification'
68
- import { QInputProps, useQuasar } from 'quasar'
69
-
70
- const props = defineProps<
71
- QInputProps & {
72
- modelValue?: string | number | null
73
- label?: string
74
- placeholder?: string
75
- rules?: ((val: string | number | null | undefined) => boolean | string)[]
76
- inputClass?: string
77
- required?: boolean
78
- readonly?: boolean
79
- disable?: boolean
80
- uuid?: boolean
81
- clearable?: boolean
82
- copyable?: boolean
83
- error?: boolean
84
- autocomplete?: string
85
- debounce?: number
86
- loading?: boolean
87
- }
88
- >()
89
-
90
- const emit = defineEmits<{
91
- (e: 'update:modelValue', val?: string | number | null): void
92
- (e: 'blur', val?: string | number | null): void
93
- }>()
94
-
95
- const $q = useQuasar()
96
-
97
- const isVisiblePass = ref(false)
98
-
99
- const model = computed({
100
- get: () => getValue(props.modelValue),
101
- set: (newValue?: string | number | null) => emit('update:modelValue', getValue(newValue)),
102
- })
103
-
104
- const inputType = computed(() => (props.type === 'password' && isVisiblePass.value ? 'text' : props.type))
105
-
106
- const getValue = (value?: string | number | null) => {
107
- if (props.type === 'number') return value ? +value : value
108
-
109
- return value
110
- }
111
-
112
- const copyToClipboard = () => {
113
- if (!model.value && model.value !== 0) return
114
-
115
- navigator.clipboard.writeText(model.value.toString()).then(() => {
116
- $q.notify(notificationSettings('success', 'Данные скопированы'))
117
- })
118
- }
119
- </script>
120
-
121
- <style scoped lang="scss">
122
- .app-input-new {
123
- display: flex;
124
- flex-direction: column;
125
- margin-bottom: 15px;
126
-
127
- &.hideBottomSpace {
128
- margin-bottom: 0;
129
- }
130
-
131
- &__label {
132
- font-size: 14px;
133
- font-weight: 700;
134
- color: #7d8592;
135
- }
136
-
137
- .required {
138
- color: #f65160;
139
- font-weight: bold;
140
- }
141
-
142
- .clear-input {
143
- color: #d8e0f0;
144
- }
145
-
146
- .uuid-btn {
147
- height: 32px;
148
- padding: 0 10px;
149
- border: 1px solid #3f8cff;
150
- color: #3f8cff;
151
- font-weight: 700;
152
- font-size: 14px;
153
- background: white;
154
- border-radius: 6px;
155
-
156
- :deep(.block) {
157
- line-height: normal;
158
- }
159
- }
160
-
161
- :deep(.q-placeholder) {
162
- color: #7d8592;
163
- }
164
-
165
- :deep(.q-field__control) {
166
- min-height: 58px;
167
- border-radius: 8px;
168
- border: 1px solid #d8e0f0;
169
- background: #fff;
170
- box-shadow: 0 1px 2px 0 rgba(184, 200, 224, 0.22);
171
- }
172
-
173
- :deep(.q-field--filled .q-field__control:before) {
174
- background: #fff !important;
175
- border: none;
176
- }
177
-
178
- :deep(.q-field--with-bottom) {
179
- padding-bottom: 0;
180
- }
181
-
182
- :deep(.q-field__bottom) {
183
- padding: 0;
184
- }
185
- }
186
- </style>
1
+ <template>
2
+ <div class="app-input-new" :class="{ hideBottomSpace }">
3
+ <label v-if="label" class="app-input-new__label">
4
+ {{ label }}
5
+ <span v-if="required" class="required">*</span>
6
+ </label>
7
+
8
+ <q-input
9
+ v-model="model"
10
+ filled
11
+ :type="inputType"
12
+ :rules="rules"
13
+ :placeholder="placeholder"
14
+ :disable="disable"
15
+ :readonly="readonly"
16
+ :class="inputClass"
17
+ :error="error"
18
+ :autocomplete="autocomplete"
19
+ :debounce="debounce"
20
+ :loading="loading"
21
+ :maxlength="maxlength"
22
+ :counter="counter"
23
+ :hide-bottom-space="hideBottomSpace"
24
+ @blur="emit('blur')"
25
+ >
26
+ <slot />
27
+ <template #append>
28
+ <slot name="append" />
29
+ <q-icon
30
+ v-if="type === 'password'"
31
+ :name="isVisiblePass ? 'visibility' : 'visibility_off'"
32
+ color="primary"
33
+ class="cursor-pointer"
34
+ @click="isVisiblePass = !isVisiblePass"
35
+ />
36
+ <q-icon
37
+ v-if="clearable && (model || model === 0)"
38
+ name="close"
39
+ class="cursor-pointer clear-input"
40
+ @click="model = null"
41
+ />
42
+ <q-btn
43
+ v-if="uuid && !disable && !readonly"
44
+ flat
45
+ no-caps
46
+ label="UUID"
47
+ size="sm"
48
+ class="q-ml-sm uuid-btn"
49
+ @click="model = uuidv4()"
50
+ />
51
+ <q-icon
52
+ v-if="copyable"
53
+ name="content_copy"
54
+ class="cursor-pointer q-ml-sm copy-icon"
55
+ color="primary"
56
+ :disable="!model"
57
+ @click="copyToClipboard"
58
+ />
59
+ </template>
60
+ </q-input>
61
+ </div>
62
+ </template>
63
+
64
+ <script setup lang="ts">
65
+ import { defineEmits, defineProps, computed, ref } from 'vue'
66
+ import { uuidv4 } from '@/utils/helpers'
67
+ import { notificationSettings } from '@/utils/notification'
68
+ import { QInputProps, useQuasar } from 'quasar'
69
+
70
+ const props = defineProps<
71
+ QInputProps & {
72
+ modelValue?: string | number | null
73
+ label?: string
74
+ placeholder?: string
75
+ rules?: ((val: string | number | null | undefined) => boolean | string)[]
76
+ inputClass?: string
77
+ required?: boolean
78
+ readonly?: boolean
79
+ disable?: boolean
80
+ uuid?: boolean
81
+ clearable?: boolean
82
+ copyable?: boolean
83
+ error?: boolean
84
+ autocomplete?: string
85
+ debounce?: number
86
+ loading?: boolean
87
+ }
88
+ >()
89
+
90
+ const emit = defineEmits<{
91
+ (e: 'update:modelValue', val?: string | number | null): void
92
+ (e: 'blur', val?: string | number | null): void
93
+ }>()
94
+
95
+ const $q = useQuasar()
96
+
97
+ const isVisiblePass = ref(false)
98
+
99
+ const model = computed({
100
+ get: () => getValue(props.modelValue),
101
+ set: (newValue?: string | number | null) => emit('update:modelValue', getValue(newValue)),
102
+ })
103
+
104
+ const inputType = computed(() => (props.type === 'password' && isVisiblePass.value ? 'text' : props.type))
105
+
106
+ const getValue = (value?: string | number | null) => {
107
+ if (props.type === 'number') return value ? +value : value
108
+
109
+ return value
110
+ }
111
+
112
+ const copyToClipboard = () => {
113
+ if (!model.value && model.value !== 0) return
114
+
115
+ navigator.clipboard.writeText(model.value.toString()).then(() => {
116
+ $q.notify(notificationSettings('success', 'Данные скопированы'))
117
+ })
118
+ }
119
+ </script>
120
+
121
+ <style scoped lang="scss">
122
+ .app-input-new {
123
+ display: flex;
124
+ flex-direction: column;
125
+ margin-bottom: 15px;
126
+
127
+ &.hideBottomSpace {
128
+ margin-bottom: 0;
129
+ }
130
+
131
+ &__label {
132
+ font-size: 14px;
133
+ font-weight: 700;
134
+ color: #7d8592;
135
+ }
136
+
137
+ .required {
138
+ color: #f65160;
139
+ font-weight: bold;
140
+ }
141
+
142
+ .clear-input {
143
+ color: #d8e0f0;
144
+ }
145
+
146
+ .uuid-btn {
147
+ height: 32px;
148
+ padding: 0 10px;
149
+ border: 1px solid #3f8cff;
150
+ color: #3f8cff;
151
+ font-weight: 700;
152
+ font-size: 14px;
153
+ background: white;
154
+ border-radius: 6px;
155
+
156
+ :deep(.block) {
157
+ line-height: normal;
158
+ }
159
+ }
160
+
161
+ :deep(.q-placeholder) {
162
+ color: #7d8592;
163
+ }
164
+
165
+ :deep(.q-field__control) {
166
+ min-height: 58px;
167
+ border-radius: 8px;
168
+ border: 1px solid #d8e0f0;
169
+ background: #fff;
170
+ box-shadow: 0 1px 2px 0 rgba(184, 200, 224, 0.22);
171
+ }
172
+
173
+ :deep(.q-field--filled .q-field__control:before) {
174
+ background: #fff !important;
175
+ border: none;
176
+ }
177
+
178
+ :deep(.q-field--with-bottom) {
179
+ padding-bottom: 0;
180
+ }
181
+
182
+ :deep(.q-field__bottom) {
183
+ padding: 0;
184
+ }
185
+ }
186
+ </style>