shared-ritm 1.2.73 → 1.2.75

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 (53) hide show
  1. package/README.md +103 -103
  2. package/dist/index.css +1 -1
  3. package/dist/shared-ritm.es.js +15 -15
  4. package/dist/shared-ritm.umd.js +8 -8
  5. package/dist/types/api/services/TasksService.d.ts +4 -3
  6. package/dist/types/api/types/Api_Tasks.d.ts +54 -23
  7. package/dist/types/api/types/Api_Users.d.ts +43 -0
  8. package/package.json +64 -64
  9. package/src/api/services/PhotoService.ts +137 -137
  10. package/src/api/services/RepairsService.ts +119 -119
  11. package/src/api/services/TasksService.ts +4 -4
  12. package/src/api/services/UserService.ts +19 -19
  13. package/src/api/types/Api_Controls.ts +72 -72
  14. package/src/api/types/Api_Files.ts +1 -1
  15. package/src/api/types/Api_Instruments.ts +98 -98
  16. package/src/api/types/Api_Projects.ts +55 -55
  17. package/src/api/types/Api_Repairs.ts +115 -115
  18. package/src/api/types/Api_Tasks.ts +59 -25
  19. package/src/api/types/Api_User.ts +44 -44
  20. package/src/common/app-checkbox/AppCheckbox.vue +26 -26
  21. package/src/common/app-datepicker/AppDatepicker.vue +165 -165
  22. package/src/common/app-dialogs/AppConfirmDialog.vue +99 -99
  23. package/src/common/app-dropdown/AppDropdown.vue +31 -31
  24. package/src/common/app-input/AppInput.vue +148 -148
  25. package/src/common/app-input-new/AppInputNew.vue +152 -152
  26. package/src/common/app-select/AppSelect.vue +157 -157
  27. package/src/common/app-sheet/AppSheet.vue +120 -120
  28. package/src/common/app-sidebar/components/SidebarMenuItem.vue +148 -148
  29. package/src/common/app-table/AppTable.vue +297 -297
  30. package/src/common/app-table/AppTableLayout.vue +111 -111
  31. package/src/common/app-table/components/ModalSelect.vue +270 -270
  32. package/src/common/app-table/components/TableModal.vue +329 -329
  33. package/src/common/app-table/components/TablePagination.vue +152 -152
  34. package/src/common/app-table/components/TableSearch.vue +76 -76
  35. package/src/common/app-table/controllers/useBaseTable.ts +42 -42
  36. package/src/common/app-table/controllers/useColumnSelector.ts +38 -38
  37. package/src/common/app-table/controllers/useTableModel.ts +93 -93
  38. package/src/common/app-toggle/AppToggle.vue +24 -24
  39. package/src/common/app-wrapper/AppWrapper.vue +28 -28
  40. package/src/icons/components/table-filter-icon.vue +30 -30
  41. package/src/icons/dialogs/RemoveIcon.vue +12 -12
  42. package/src/icons/dialogs/SafetyIcon.vue +12 -12
  43. package/src/icons/task/attention-icon.vue +13 -13
  44. package/src/icons/task/clock-icon.vue +10 -10
  45. package/src/icons/task/delete-icon.vue +10 -10
  46. package/src/icons/task/fire-icon.vue +16 -16
  47. package/src/index.ts +103 -103
  48. package/src/main.ts +28 -28
  49. package/src/shared/styles/general.css +125 -125
  50. package/src/styles/variables.sass +12 -12
  51. package/src/utils/confirm.ts +12 -12
  52. package/src/utils/helpers.ts +58 -58
  53. package/src/utils/notification.ts +9 -9
@@ -1,58 +1,58 @@
1
- /**
2
- * Сравнивает два значения на глубокое равенство.
3
- * Поддерживает массивы, объекты и примитивы.
4
- */
5
- export function isEqual(a: any, b: any): boolean {
6
- if (Array.isArray(a) && Array.isArray(b)) {
7
- if (a.length !== b.length) return false
8
- return a.every((item, i) => isEqual(item, b[i]))
9
- }
10
- if (typeof a === 'object' && typeof b === 'object') {
11
- return JSON.stringify(a) === JSON.stringify(b)
12
- }
13
- return a === b
14
- }
15
-
16
- /**
17
- * Нормализует значение:
18
- * - Если передан массив объектов, возвращает массив `.value` или сам объект.
19
- * - Если передан объект, возвращает `.value` или сам объект.
20
- * - Если примитив — возвращает без изменений.
21
- */
22
- export function normalizeValue(val: any): any {
23
- if (Array.isArray(val)) {
24
- return val.map(v => (typeof v === 'object' && v !== null ? v.value ?? v : v))
25
- }
26
- return typeof val === 'object' && val !== null ? val.value ?? val : val
27
- }
28
-
29
- /**
30
- * Генерирует UUID v4.
31
- * Используется для идентификаторов временных сущностей.
32
- */
33
- export function uuidv4(): string {
34
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
35
- const r = (Math.random() * 16) | 0
36
- const v = c === 'x' ? r : (r & 0x3) | 0x8
37
- return v.toString(16)
38
- })
39
- }
40
-
41
- export function base64ToBlob(base64Data: string) {
42
- const parts = base64Data.split(';base64,')
43
- const contentType = parts[0].split(':')[1]
44
- const byteCharacters = atob(parts[1])
45
- const byteArrays: any[] = []
46
-
47
- for (let offset = 0; offset < byteCharacters.length; offset += 1024) {
48
- const slice = byteCharacters.slice(offset, offset + 1024)
49
- const byteNumbers = new Array(slice.length)
50
- for (let i = 0; i < slice.length; i++) {
51
- byteNumbers[i] = slice.charCodeAt(i)
52
- }
53
- const byteArray = new Uint8Array(byteNumbers)
54
- byteArrays.push(byteArray)
55
- }
56
-
57
- return new Blob(byteArrays, { type: contentType })
58
- }
1
+ /**
2
+ * Сравнивает два значения на глубокое равенство.
3
+ * Поддерживает массивы, объекты и примитивы.
4
+ */
5
+ export function isEqual(a: any, b: any): boolean {
6
+ if (Array.isArray(a) && Array.isArray(b)) {
7
+ if (a.length !== b.length) return false
8
+ return a.every((item, i) => isEqual(item, b[i]))
9
+ }
10
+ if (typeof a === 'object' && typeof b === 'object') {
11
+ return JSON.stringify(a) === JSON.stringify(b)
12
+ }
13
+ return a === b
14
+ }
15
+
16
+ /**
17
+ * Нормализует значение:
18
+ * - Если передан массив объектов, возвращает массив `.value` или сам объект.
19
+ * - Если передан объект, возвращает `.value` или сам объект.
20
+ * - Если примитив — возвращает без изменений.
21
+ */
22
+ export function normalizeValue(val: any): any {
23
+ if (Array.isArray(val)) {
24
+ return val.map(v => (typeof v === 'object' && v !== null ? v.value ?? v : v))
25
+ }
26
+ return typeof val === 'object' && val !== null ? val.value ?? val : val
27
+ }
28
+
29
+ /**
30
+ * Генерирует UUID v4.
31
+ * Используется для идентификаторов временных сущностей.
32
+ */
33
+ export function uuidv4(): string {
34
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
35
+ const r = (Math.random() * 16) | 0
36
+ const v = c === 'x' ? r : (r & 0x3) | 0x8
37
+ return v.toString(16)
38
+ })
39
+ }
40
+
41
+ export function base64ToBlob(base64Data: string) {
42
+ const parts = base64Data.split(';base64,')
43
+ const contentType = parts[0].split(':')[1]
44
+ const byteCharacters = atob(parts[1])
45
+ const byteArrays: any[] = []
46
+
47
+ for (let offset = 0; offset < byteCharacters.length; offset += 1024) {
48
+ const slice = byteCharacters.slice(offset, offset + 1024)
49
+ const byteNumbers = new Array(slice.length)
50
+ for (let i = 0; i < slice.length; i++) {
51
+ byteNumbers[i] = slice.charCodeAt(i)
52
+ }
53
+ const byteArray = new Uint8Array(byteNumbers)
54
+ byteArrays.push(byteArray)
55
+ }
56
+
57
+ return new Blob(byteArrays, { type: contentType })
58
+ }
@@ -1,9 +1,9 @@
1
- import { QNotifyCreateOptions } from 'quasar'
2
-
3
- export type NotificationType = 'danger' | 'success' | 'warning' | 'info' | 'default'
4
-
5
- export const notificationSettings = (type: NotificationType, message: string): QNotifyCreateOptions => ({
6
- message,
7
- color: type === 'danger' ? 'red' : type === 'success' ? 'green' : type === 'warning' ? 'orange' : 'white',
8
- position: 'top-right',
9
- })
1
+ import { QNotifyCreateOptions } from 'quasar'
2
+
3
+ export type NotificationType = 'danger' | 'success' | 'warning' | 'info' | 'default'
4
+
5
+ export const notificationSettings = (type: NotificationType, message: string): QNotifyCreateOptions => ({
6
+ message,
7
+ color: type === 'danger' ? 'red' : type === 'success' ? 'green' : type === 'warning' ? 'orange' : 'white',
8
+ position: 'top-right',
9
+ })