shared-ritm 1.3.69 → 1.3.71

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 (72) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/shared-ritm.es.js +3565 -3544
  3. package/dist/shared-ritm.umd.js +144 -144
  4. package/dist/types/api/services/AuthService.d.ts +1 -0
  5. package/dist/types/api/services/UserService.d.ts +2 -1
  6. package/dist/types/api/settings/ApiService.d.ts +6 -2
  7. package/dist/types/api/types/Api_Auth.d.ts +15 -0
  8. package/dist/types/api/types/Api_User.d.ts +9 -0
  9. package/package.json +70 -70
  10. package/src/App.vue +2461 -2461
  11. package/src/api/services/AuthService.ts +67 -53
  12. package/src/api/services/ControlsService.ts +96 -96
  13. package/src/api/services/EquipmentService.ts +29 -29
  14. package/src/api/services/GanttService.ts +23 -23
  15. package/src/api/services/MetricsService.ts +127 -127
  16. package/src/api/services/RepairsService.ts +111 -111
  17. package/src/api/services/UserService.ts +129 -123
  18. package/src/api/services/VideoService.ts +118 -118
  19. package/src/api/settings/ApiService.ts +184 -124
  20. package/src/api/types/Api_Auth.ts +121 -105
  21. package/src/api/types/Api_Metrics.ts +26 -26
  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 -146
  25. package/src/api/types/Api_Video.ts +244 -244
  26. package/src/common/app-button/Button.stories.ts +369 -369
  27. package/src/common/app-checkbox/AppCheckbox.vue +31 -33
  28. package/src/common/app-checkbox/Checkbox.stories.ts +252 -252
  29. package/src/common/app-date-picker/DatePicker.stories.ts +66 -66
  30. package/src/common/app-datepicker/Datepicker.stories.ts +145 -145
  31. package/src/common/app-dialogs/AppConfirmDialog.vue +109 -109
  32. package/src/common/app-dialogs/Confirm.stories.ts +93 -93
  33. package/src/common/app-dropdown/Dropdown.stories.ts +94 -94
  34. package/src/common/app-file/File.stories.ts +104 -104
  35. package/src/common/app-icon/AppIcon.vue +108 -108
  36. package/src/common/app-icon/Icon.stories.ts +91 -91
  37. package/src/common/app-input/Input.stories.ts +160 -160
  38. package/src/common/app-input-new/InputNew.stories.ts +240 -240
  39. package/src/common/app-input-search/InputSearch.stories.ts +149 -149
  40. package/src/common/app-layout/components/AppLayoutHeader.vue +289 -289
  41. package/src/common/app-loader/Loader.stories.ts +114 -114
  42. package/src/common/app-select/AppSelect.vue +159 -159
  43. package/src/common/app-select/Select.stories.ts +155 -155
  44. package/src/common/app-sidebar/AppSidebar.vue +174 -174
  45. package/src/common/app-table/AppTable.vue +313 -313
  46. package/src/common/app-table/components/ModalSelect.stories.ts +323 -323
  47. package/src/common/app-table/components/ModalSelect.vue +302 -302
  48. package/src/common/app-table/components/TableModal.vue +367 -367
  49. package/src/common/app-table/controllers/useColumnSelector.ts +45 -45
  50. package/src/common/app-table/controllers/useTableModel.ts +97 -97
  51. package/src/common/app-toggle/AppToggle.vue +12 -14
  52. package/src/common/app-toggle/Toggle.stories.ts +245 -245
  53. package/src/common/app-wrapper/AppWrapper.vue +31 -31
  54. package/src/configs/storybook.ts +14 -14
  55. package/src/index.ts +131 -131
  56. package/src/shared/styles/general.css +140 -140
  57. package/src/styles/variables.sass +12 -12
  58. package/src/utils/helpers.ts +59 -59
  59. package/dist/types/api/services/PhotoService.d.ts +0 -40
  60. package/dist/types/stories/Button.stories.d.ts +0 -13
  61. package/dist/types/stories/Checkbox.stories.d.ts +0 -7
  62. package/dist/types/stories/Confirm.stories.d.ts +0 -8
  63. package/dist/types/stories/DatePicker.stories.d.ts +0 -8
  64. package/dist/types/stories/Dropdown.stories.d.ts +0 -8
  65. package/dist/types/stories/File.stories.d.ts +0 -8
  66. package/dist/types/stories/Icon.stories.d.ts +0 -7
  67. package/dist/types/stories/Input.stories.d.ts +0 -11
  68. package/dist/types/stories/InputNew.stories.d.ts +0 -12
  69. package/dist/types/stories/InputSearch.stories.d.ts +0 -10
  70. package/dist/types/stories/Loader.stories.d.ts +0 -8
  71. package/dist/types/stories/Select.stories.d.ts +0 -7
  72. package/dist/types/stories/Toggle.stories.d.ts +0 -8
@@ -1,59 +1,59 @@
1
- // Эти все функции есть в квазаре, меняйте на них
2
- /**
3
- * Сравнивает два значения на глубокое равенство.
4
- * Поддерживает массивы, объекты и примитивы.
5
- */
6
- export function isEqual(a: any, b: any): boolean {
7
- if (Array.isArray(a) && Array.isArray(b)) {
8
- if (a.length !== b.length) return false
9
- return a.every((item, i) => isEqual(item, b[i]))
10
- }
11
- if (typeof a === 'object' && typeof b === 'object') {
12
- return JSON.stringify(a) === JSON.stringify(b)
13
- }
14
- return a === b
15
- }
16
-
17
- /**
18
- * Нормализует значение:
19
- * - Если передан массив объектов, возвращает массив `.value` или сам объект.
20
- * - Если передан объект, возвращает `.value` или сам объект.
21
- * - Если примитив — возвращает без изменений.
22
- */
23
- export function normalizeValue(val: any): any {
24
- if (Array.isArray(val)) {
25
- return val.map(v => (typeof v === 'object' && v !== null ? (v.value ?? v) : v))
26
- }
27
- return typeof val === 'object' && val !== null ? (val.value ?? val) : val
28
- }
29
-
30
- /**
31
- * Генерирует UUID v4.
32
- * Используется для идентификаторов временных сущностей.
33
- */
34
- export function uuidv4(): string {
35
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
36
- const r = (Math.random() * 16) | 0
37
- const v = c === 'x' ? r : (r & 0x3) | 0x8
38
- return v.toString(16)
39
- })
40
- }
41
-
42
- export function base64ToBlob(base64Data: string) {
43
- const parts = base64Data.split(';base64,')
44
- const contentType = parts[0].split(':')[1]
45
- const byteCharacters = atob(parts[1])
46
- const byteArrays: any[] = []
47
-
48
- for (let offset = 0; offset < byteCharacters.length; offset += 1024) {
49
- const slice = byteCharacters.slice(offset, offset + 1024)
50
- const byteNumbers = new Array(slice.length)
51
- for (let i = 0; i < slice.length; i++) {
52
- byteNumbers[i] = slice.charCodeAt(i)
53
- }
54
- const byteArray = new Uint8Array(byteNumbers)
55
- byteArrays.push(byteArray)
56
- }
57
-
58
- return new Blob(byteArrays, { type: contentType })
59
- }
1
+ // Эти все функции есть в квазаре, меняйте на них
2
+ /**
3
+ * Сравнивает два значения на глубокое равенство.
4
+ * Поддерживает массивы, объекты и примитивы.
5
+ */
6
+ export function isEqual(a: any, b: any): boolean {
7
+ if (Array.isArray(a) && Array.isArray(b)) {
8
+ if (a.length !== b.length) return false
9
+ return a.every((item, i) => isEqual(item, b[i]))
10
+ }
11
+ if (typeof a === 'object' && typeof b === 'object') {
12
+ return JSON.stringify(a) === JSON.stringify(b)
13
+ }
14
+ return a === b
15
+ }
16
+
17
+ /**
18
+ * Нормализует значение:
19
+ * - Если передан массив объектов, возвращает массив `.value` или сам объект.
20
+ * - Если передан объект, возвращает `.value` или сам объект.
21
+ * - Если примитив — возвращает без изменений.
22
+ */
23
+ export function normalizeValue(val: any): any {
24
+ if (Array.isArray(val)) {
25
+ return val.map(v => (typeof v === 'object' && v !== null ? (v.value ?? v) : v))
26
+ }
27
+ return typeof val === 'object' && val !== null ? (val.value ?? val) : val
28
+ }
29
+
30
+ /**
31
+ * Генерирует UUID v4.
32
+ * Используется для идентификаторов временных сущностей.
33
+ */
34
+ export function uuidv4(): string {
35
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
36
+ const r = (Math.random() * 16) | 0
37
+ const v = c === 'x' ? r : (r & 0x3) | 0x8
38
+ return v.toString(16)
39
+ })
40
+ }
41
+
42
+ export function base64ToBlob(base64Data: string) {
43
+ const parts = base64Data.split(';base64,')
44
+ const contentType = parts[0].split(':')[1]
45
+ const byteCharacters = atob(parts[1])
46
+ const byteArrays: any[] = []
47
+
48
+ for (let offset = 0; offset < byteCharacters.length; offset += 1024) {
49
+ const slice = byteCharacters.slice(offset, offset + 1024)
50
+ const byteNumbers = new Array(slice.length)
51
+ for (let i = 0; i < slice.length; i++) {
52
+ byteNumbers[i] = slice.charCodeAt(i)
53
+ }
54
+ const byteArray = new Uint8Array(byteNumbers)
55
+ byteArrays.push(byteArray)
56
+ }
57
+
58
+ return new Blob(byteArrays, { type: contentType })
59
+ }
@@ -1,40 +0,0 @@
1
- import * as faceapi from 'face-api.js';
2
- declare class PhotoService {
3
- getVideoStreamConfig(width: number, height: number): {
4
- audio: boolean;
5
- video: {
6
- width: {
7
- min: number;
8
- ideal: number;
9
- };
10
- height: {
11
- min: number;
12
- ideal: number;
13
- };
14
- facingMode: string;
15
- };
16
- };
17
- getContourCoordinate(width: number, height: number): {
18
- x: number;
19
- y: number;
20
- width: number;
21
- height: number;
22
- };
23
- getBoxData(box: any): {
24
- x: any;
25
- y: any;
26
- width: any;
27
- height: any;
28
- } | null;
29
- setStylesForCanvas(canvasContainer: any): void;
30
- checkFaceInclusion(frame: any, face: any): boolean;
31
- getFaceDetections(videoRef: any): Promise<faceapi.WithFaceExpressions<faceapi.WithFaceLandmarks<{
32
- detection: faceapi.FaceDetection;
33
- }, faceapi.FaceLandmarks68>>[]>;
34
- getCanvas(videoRef: any): HTMLCanvasElement;
35
- getResizedAndDetection(canvas: any, detections: any, ctx: any, videoWidth: number, videoHeight: number): void;
36
- getFaceSnapshot(inputImage: any, box: any): Promise<string | null>;
37
- initModels(): Promise<void>;
38
- }
39
- export default function usePhotoService(): PhotoService;
40
- export {};
@@ -1,13 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3';
2
- import AppButton from '@/common/app-button/AppButton.vue';
3
- declare const meta: Meta<typeof AppButton>;
4
- export default meta;
5
- type Story = StoryObj<typeof AppButton>;
6
- export declare const Primary: Story;
7
- export declare const Size: Story;
8
- export declare const Icon: Story;
9
- export declare const Badge: Story;
10
- export declare const Align: Story;
11
- export declare const Spacing: Story;
12
- export declare const Rounding: Story;
13
- export declare const Other: Story;
@@ -1,7 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3';
2
- import AppCheckbox from '@/common/app-checkbox/AppCheckbox.vue';
3
- declare const meta: Meta<typeof AppCheckbox>;
4
- export default meta;
5
- type Story = StoryObj<typeof AppCheckbox>;
6
- export declare const Default: Story;
7
- export declare const States: Story;
@@ -1,8 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3';
2
- import AppDialog from '@/common/app-dialogs/AppConfirmDialog.vue';
3
- declare const meta: Meta<typeof AppDialog>;
4
- export default meta;
5
- type Story = StoryObj<typeof AppDialog>;
6
- export declare const Edit: Story;
7
- export declare const Delete: Story;
8
- export declare const CustomMessage: Story;
@@ -1,8 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3';
2
- import DatePicker from '@/common/app-date-picker/AppDatePicker.vue';
3
- declare const meta: Meta<typeof DatePicker>;
4
- export default meta;
5
- type Story = StoryObj<typeof DatePicker>;
6
- export declare const Default: Story;
7
- export declare const States: Story;
8
- export declare const DateRestrictions: Story;
@@ -1,8 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3';
2
- import AppDropdown from '@/common/app-dropdown/AppDropdown.vue';
3
- declare const meta: Meta<typeof AppDropdown>;
4
- export default meta;
5
- type Story = StoryObj<typeof AppDropdown>;
6
- export declare const Default: Story;
7
- export declare const WithSlots: Story;
8
- export declare const ContentSize: Story;
@@ -1,8 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3';
2
- import AppFile from '@/common/app-file/AppFile.vue';
3
- declare const meta: Meta<typeof AppFile>;
4
- export default meta;
5
- type Story = StoryObj<typeof AppFile>;
6
- export declare const SingleFile: Story;
7
- export declare const MultipleFiles: Story;
8
- export declare const Disabled: Story;
@@ -1,7 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3';
2
- import AppIcon from '@/common/app-icon/AppIcon.vue';
3
- declare const meta: Meta<typeof AppIcon>;
4
- export default meta;
5
- type Story = StoryObj<typeof AppIcon>;
6
- export declare const Default: Story;
7
- export declare const Sizes: Story;
@@ -1,11 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3';
2
- import AppInput from '@/common/app-input/AppInput.vue';
3
- declare const meta: Meta<typeof AppInput>;
4
- export default meta;
5
- type Story = StoryObj<typeof AppInput>;
6
- export declare const Default: Story;
7
- export declare const InputTypes: Story;
8
- export declare const States: Story;
9
- export declare const Sizes: Story;
10
- export declare const Password: Story;
11
- export declare const WithMask: Story;
@@ -1,12 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3';
2
- import AppInputNew from '@/common/app-input-new/AppInputNew.vue';
3
- declare const meta: Meta<typeof AppInputNew>;
4
- export default meta;
5
- type Story = StoryObj<typeof AppInputNew>;
6
- export declare const Default: Story;
7
- export declare const InputTypes: Story;
8
- export declare const Features: Story;
9
- export declare const States: Story;
10
- export declare const WithLabel: Story;
11
- export declare const Password: Story;
12
- export declare const WithAppendSlot: Story;
@@ -1,10 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3';
2
- import AppInputSearch from '@/common/app-input-search/AppInputSearch.vue';
3
- declare const meta: Meta<typeof AppInputSearch>;
4
- export default meta;
5
- type Story = StoryObj<typeof AppInputSearch>;
6
- export declare const Default: Story;
7
- export declare const InputTypes: Story;
8
- export declare const States: Story;
9
- export declare const SizesAndStyles: Story;
10
- export declare const WithMask: Story;
@@ -1,8 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3';
2
- import AppLoader from '@/common/app-loader/index.vue';
3
- declare const meta: Meta<typeof AppLoader>;
4
- export default meta;
5
- type Story = StoryObj<typeof AppLoader>;
6
- export declare const GlobalLoader: Story;
7
- export declare const Size: Story;
8
- export declare const Thickness: Story;
@@ -1,7 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3';
2
- import AppSelect from '@/common/app-select/AppSelect.vue';
3
- declare const meta: Meta<typeof AppSelect>;
4
- export default meta;
5
- type Story = StoryObj<typeof AppSelect>;
6
- export declare const Default: Story;
7
- export declare const States: Story;
@@ -1,8 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3';
2
- import AppToggle from '@/common/app-toggle/AppToggle.vue';
3
- declare const meta: Meta<typeof AppToggle>;
4
- export default meta;
5
- type Story = StoryObj<typeof AppToggle>;
6
- export declare const Default: Story;
7
- export declare const States: Story;
8
- export declare const WithBinding: Story;