shared-ritm 1.3.72 → 1.3.73

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