shared-ritm 1.2.99 → 1.2.101

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 (128) hide show
  1. package/README.md +103 -103
  2. package/dist/index.css +1 -1
  3. package/dist/shared-ritm.es.js +6199 -6125
  4. package/dist/shared-ritm.umd.js +372 -372
  5. package/dist/types/api/services/EquipmentService.d.ts +15 -0
  6. package/dist/types/api/services/PhotoService.d.ts +40 -0
  7. package/dist/types/api/services/VideoService.d.ts +24 -0
  8. package/dist/types/api/types/Api_Equipment.d.ts +2 -0
  9. package/dist/types/api/types/Api_Tasks.d.ts +1 -1
  10. package/dist/types/api/types/Api_Video.d.ts +118 -0
  11. package/dist/types/index.d.ts +4 -1
  12. package/package.json +64 -64
  13. package/src/App.vue +2461 -2461
  14. package/src/api/services/AuthService.ts +64 -64
  15. package/src/api/services/CommentsService.ts +24 -24
  16. package/src/api/services/ControlsService.ts +65 -65
  17. package/src/api/services/EquipmentService.ts +29 -0
  18. package/src/api/services/FileService.ts +17 -17
  19. package/src/api/services/GanttService.ts +17 -17
  20. package/src/api/services/InstrumentsService.ts +22 -22
  21. package/src/api/services/MetricsService.ts +110 -110
  22. package/src/api/services/ProjectsService.ts +68 -68
  23. package/src/api/services/RepairsService.ts +119 -119
  24. package/src/api/services/SearchService.ts +16 -16
  25. package/src/api/services/TasksService.ts +145 -145
  26. package/src/api/services/VideoService.ts +62 -17
  27. package/src/api/settings/ApiService.ts +123 -123
  28. package/src/api/types/Api_Comment.ts +40 -40
  29. package/src/api/types/Api_Controls.ts +72 -72
  30. package/src/api/types/Api_Equipment.ts +3 -0
  31. package/src/api/types/Api_Files.ts +7 -7
  32. package/src/api/types/Api_Instruments.ts +98 -98
  33. package/src/api/types/Api_Projects.ts +55 -55
  34. package/src/api/types/Api_Repairs.ts +115 -115
  35. package/src/api/types/Api_Search.ts +48 -48
  36. package/src/api/types/Api_Service.ts +9 -9
  37. package/src/api/types/Api_Tasks.ts +315 -315
  38. package/src/api/types/Api_User.ts +117 -117
  39. package/src/api/types/Api_Video.ts +123 -0
  40. package/src/common/app-button/AppButton.vue +173 -173
  41. package/src/common/app-checkbox/AppCheckbox.vue +26 -26
  42. package/src/common/app-date-picker/AppDatePicker.vue +81 -81
  43. package/src/common/app-datepicker/AppDatepicker.vue +165 -165
  44. package/src/common/app-dialogs/AppConfirmDialog.vue +99 -99
  45. package/src/common/app-dropdown/AppDropdown.vue +31 -31
  46. package/src/common/app-icon/AppIcon.vue +108 -108
  47. package/src/common/app-input/AppInput.vue +148 -148
  48. package/src/common/app-input-new/AppInputNew.vue +167 -152
  49. package/src/common/app-input-search/AppInputSearch.vue +174 -174
  50. package/src/common/app-layout/AppLayout.vue +84 -84
  51. package/src/common/app-layout/components/AppLayoutHeader.vue +250 -251
  52. package/src/common/app-layout/components/AppLayoutPage.vue +16 -16
  53. package/src/common/app-loader/index.vue +43 -43
  54. package/src/common/app-page-layout/AppPageLayout.vue +122 -122
  55. package/src/common/app-select/AppSelect.vue +157 -157
  56. package/src/common/app-sheet/AppSheet.vue +120 -120
  57. package/src/common/app-sheet-new/AppSheetNew.vue +246 -246
  58. package/src/common/app-sidebar/AppSidebar.vue +168 -168
  59. package/src/common/app-sidebar/components/SidebarMenu.vue +37 -37
  60. package/src/common/app-sidebar/components/SidebarMenuItem.vue +148 -148
  61. package/src/common/app-table/AppTable.vue +312 -305
  62. package/src/common/app-table/AppTableLayout.vue +137 -136
  63. package/src/common/app-table/components/ModalSelect.vue +270 -270
  64. package/src/common/app-table/components/TableModal.vue +356 -331
  65. package/src/common/app-table/components/TablePagination.vue +152 -152
  66. package/src/common/app-table/controllers/useBaseTable.ts +45 -45
  67. package/src/common/app-table/controllers/useColumnSelector.ts +38 -38
  68. package/src/common/app-table/controllers/useTableModel.ts +93 -93
  69. package/src/common/app-toggle/AppToggle.vue +24 -24
  70. package/src/common/app-wrapper/AppWrapper.vue +28 -28
  71. package/src/global.d.ts +1 -1
  72. package/src/icons/components/arrow-down-icon.vue +25 -25
  73. package/src/icons/components/arrow-frame-icon.vue +19 -19
  74. package/src/icons/components/arrow-square.vue +22 -22
  75. package/src/icons/components/table-filter-icon.vue +30 -30
  76. package/src/icons/dialogs/RemoveIcon.vue +12 -12
  77. package/src/icons/dialogs/SafetyIcon.vue +12 -12
  78. package/src/icons/header/NotificationIcon.vue +18 -18
  79. package/src/icons/header/PersonIcon.vue +11 -11
  80. package/src/icons/header/SettingIcon.vue +14 -14
  81. package/src/icons/header/flashIcon.vue +24 -24
  82. package/src/icons/header/searchStatusIcon.vue +24 -24
  83. package/src/icons/header/smallCapsIcon.vue +34 -34
  84. package/src/icons/sidebar/assign-module-icon.vue +36 -36
  85. package/src/icons/sidebar/instrument-history-icon.vue +32 -32
  86. package/src/icons/sidebar/instrument-order-icon.vue +38 -38
  87. package/src/icons/sidebar/instrument-work-zone-icon.vue +18 -18
  88. package/src/icons/sidebar/instruments-icon.vue +45 -45
  89. package/src/icons/sidebar/logo-icon.vue +15 -15
  90. package/src/icons/sidebar/logout-icon.vue +13 -13
  91. package/src/icons/sidebar/modules-icon.vue +16 -16
  92. package/src/icons/sidebar/notifications-icon.vue +24 -24
  93. package/src/icons/sidebar/order-icon.vue +44 -44
  94. package/src/icons/sidebar/pass-icon.vue +38 -38
  95. package/src/icons/sidebar/positions-icon.vue +42 -42
  96. package/src/icons/sidebar/preorder-icon.vue +19 -19
  97. package/src/icons/sidebar/projects-icon.vue +31 -31
  98. package/src/icons/sidebar/repair-object-icon.vue +18 -18
  99. package/src/icons/sidebar/repairs-icon.vue +20 -20
  100. package/src/icons/sidebar/roles-icon.vue +26 -26
  101. package/src/icons/sidebar/status-history-icon.vue +24 -24
  102. package/src/icons/sidebar/tasks-icon.vue +28 -28
  103. package/src/icons/sidebar/tasks_tasks-icon.vue +39 -39
  104. package/src/icons/sidebar/tasks_today-icon.vue +27 -27
  105. package/src/icons/sidebar/teams-icon.vue +32 -32
  106. package/src/icons/sidebar/user-icon.vue +18 -18
  107. package/src/icons/sidebar/users-icon.vue +46 -46
  108. package/src/icons/sidebar/videosources-icon.vue +19 -19
  109. package/src/icons/sidebar/videowall-icon.vue +13 -13
  110. package/src/icons/sidebar/videozones-icon.vue +21 -21
  111. package/src/icons/sidebar/warehouses-icon.vue +43 -43
  112. package/src/icons/sidebar/workshop-icon.vue +100 -100
  113. package/src/icons/sidebar/workzones-icon.vue +22 -22
  114. package/src/icons/task/attention-icon.vue +13 -13
  115. package/src/icons/task/clock-icon.vue +10 -10
  116. package/src/icons/task/delete-icon.vue +10 -10
  117. package/src/icons/task/fire-icon.vue +16 -16
  118. package/src/index.ts +116 -112
  119. package/src/main.ts +28 -28
  120. package/src/quasar-user-options.ts +17 -17
  121. package/src/router/index.ts +10 -10
  122. package/src/shared/styles/general.css +124 -124
  123. package/src/shims-vue.d.ts +5 -5
  124. package/src/styles/variables.sass +12 -12
  125. package/src/utils/confirm.ts +12 -12
  126. package/src/utils/faceApiHelper.ts +137 -137
  127. package/src/utils/helpers.ts +59 -59
  128. package/src/utils/notification.ts +9 -9
@@ -0,0 +1,15 @@
1
+ import ApiService from '../settings/ApiService';
2
+ import { ResponseApi } from '../types/Api_Service';
3
+ import { Api_Equipment_Full_Dto } from '@/api/types/Api_Repairs';
4
+ import { Api_Equipment_Create } from '@/api/types/Api_Equipment';
5
+ declare class EquipmentService extends ApiService {
6
+ fetchEquipment(params: any): Promise<ResponseApi<Api_Equipment_Full_Dto[]>>;
7
+ createEquipment(body: Api_Equipment_Create): Promise<Api_Equipment_Full_Dto>;
8
+ editEquipment(id: string, body: Partial<Api_Equipment_Create>): Promise<Api_Equipment_Full_Dto>;
9
+ deleteEquipment(id: string): Promise<{
10
+ data: boolean;
11
+ status: number;
12
+ }>;
13
+ }
14
+ export default function useEquipmentService(): EquipmentService;
15
+ export {};
@@ -0,0 +1,40 @@
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,7 +1,31 @@
1
1
  import ApiService from '../settings/ApiService';
2
+ import { ResponseApi } from '@/api/types/Api_Service';
3
+ import { Api_Video_Source_Create, Api_Video_Source_Search, Api_Work_Zone, Api_Work_Zone_Search } from '@/api/types/Api_Video';
2
4
  declare class VideoService extends ApiService {
3
5
  startVideoAnalytics(): Promise<boolean>;
4
6
  reloadVideoAnalytics(ids: string[]): Promise<any>;
7
+ fetchWorkZones(params?: any): Promise<ResponseApi<Api_Work_Zone_Search[]>>;
8
+ fetchWorkZone(id: string): Promise<ResponseApi<Api_Work_Zone>>;
9
+ editWorkZone(id: string, body: {
10
+ title: string;
11
+ }): Promise<{
12
+ data: Api_Work_Zone;
13
+ status: number;
14
+ }>;
15
+ deleteWorkZone(id: string): Promise<{
16
+ data: boolean;
17
+ status: number;
18
+ }>;
19
+ fetchVideoSources(params?: any): Promise<ResponseApi<Api_Video_Source_Search[]>>;
20
+ createVideoSource(body: Api_Video_Source_Create): Promise<{
21
+ data: Api_Video_Source_Search;
22
+ status: number;
23
+ }>;
24
+ editVideoSource(id: string, body: Partial<Api_Video_Source_Create>): Promise<{
25
+ data: Api_Video_Source_Search;
26
+ status: number;
27
+ }>;
28
+ deleteVideoSource(id: string): Promise<void>;
5
29
  }
6
30
  export default function useVideoService(): VideoService;
7
31
  export {};
@@ -0,0 +1,2 @@
1
+ import { Api_Equipment_Full_Dto } from '@/api/types/Api_Repairs';
2
+ export type Api_Equipment_Create = Omit<Api_Equipment_Full_Dto, 'id'>;
@@ -174,7 +174,7 @@ export type Api_Tasks_Task_Dto = {
174
174
  position_assigned: Api_Tasks_Position_Assigned_Dto[];
175
175
  comments: Api_Comment_Dto[];
176
176
  teams: Api_Tasks_Teams_Dto[];
177
- equipment: Api_Tasks_Equipment_Dto[];
177
+ equipment: Api_Tasks_Equipment_Dto;
178
178
  instrument_types: Api_Task_Instrument_From_Warehouse[];
179
179
  quality_metrics: Api_Task_QualityMetric_Dto[];
180
180
  video_source: Api_Task_VideoSource_Dto;
@@ -0,0 +1,118 @@
1
+ import { Api_Status_DTO } from '@/api/types/Api_Tasks';
2
+ export type Api_Video_Source = {
3
+ id: string;
4
+ name: string;
5
+ login: string;
6
+ password: string;
7
+ camera_id: string | null;
8
+ comment: string | null;
9
+ data: unknown | null;
10
+ snapshot_path: string | null;
11
+ url: string;
12
+ updated_at: string;
13
+ created_at: string;
14
+ fps: string;
15
+ domed: boolean;
16
+ height: number;
17
+ width: number;
18
+ };
19
+ export type Api_Work_Zone_Search = {
20
+ id: string;
21
+ name: string;
22
+ title: string;
23
+ type: number;
24
+ parent_id: string | null;
25
+ created_at: string;
26
+ deleted_at: string | null;
27
+ updated_at: string;
28
+ description: string;
29
+ detect_face: boolean;
30
+ detect_helmet: boolean;
31
+ detect_mask: boolean;
32
+ detect_work_time: boolean;
33
+ detect_work_zone: boolean;
34
+ has_tasks: boolean;
35
+ is_parent: boolean;
36
+ x0: number;
37
+ x1: number;
38
+ y0: number;
39
+ y1: number;
40
+ video_source: Api_Video_Source;
41
+ video_source_id: string;
42
+ warehouse_by_work_zone_instruments: unknown[];
43
+ };
44
+ export type Api_Work_Zone_Usage_User = {
45
+ id: string;
46
+ user_id: string;
47
+ user_full_name: string;
48
+ work_zone_id: string;
49
+ start_interval: string;
50
+ end_interval: string;
51
+ minutes: number;
52
+ };
53
+ export type Api_Work_Zone_Task = {
54
+ id: string;
55
+ name: string;
56
+ plan_date: string;
57
+ planned_start: null | string;
58
+ planned_end: null | string;
59
+ deadline: string;
60
+ is_critical_path: boolean | null;
61
+ is_expired: boolean;
62
+ power_output_MWh: number;
63
+ cost_per_MWh: number | null;
64
+ fact_start_date: null | string;
65
+ fact_end_date: null | string;
66
+ time_to_complete_sec: number | null;
67
+ status: Api_Status_DTO[];
68
+ usage_users: Api_Work_Zone_Usage_User[];
69
+ };
70
+ export type Api_Work_Zone_Coords = {
71
+ x0: number;
72
+ x1: number;
73
+ y0: number;
74
+ y1: number;
75
+ };
76
+ export type Api_Work_Zone = {
77
+ id: string;
78
+ title: string;
79
+ created_at: string;
80
+ video_source: {
81
+ id: string;
82
+ name: string;
83
+ };
84
+ coordinates: Api_Work_Zone_Coords;
85
+ warehouse_by_work_zone_instruments: unknown[];
86
+ tasks: Api_Work_Zone_Task[];
87
+ };
88
+ export type Api_Video_Source_Search = {
89
+ comment: string;
90
+ domed: boolean;
91
+ fps: string;
92
+ height: number;
93
+ id: string;
94
+ interactive_zones: unknown;
95
+ login: string;
96
+ name: string;
97
+ password: string;
98
+ related_video_sources: unknown[];
99
+ shapes: unknown[];
100
+ snapshot_path: string;
101
+ url: string;
102
+ video_source: Api_Video_Source_Search[];
103
+ width: number;
104
+ work_zones: unknown[];
105
+ };
106
+ export type Api_Video_Source_Create = {
107
+ fps: string;
108
+ height: number;
109
+ login: string;
110
+ name: string;
111
+ password: string;
112
+ url: string;
113
+ width: number;
114
+ comment?: string;
115
+ domed?: boolean;
116
+ video_source_ids?: string[];
117
+ snapshot?: string;
118
+ };
@@ -38,9 +38,10 @@ import useInstrumentsService from './api/services/InstrumentsService';
38
38
  import useControlsService from './api/services/ControlsService';
39
39
  import useSearchService from './api/services/SearchService';
40
40
  import useCommentsService from './api/services/CommentsService';
41
+ import useEquipmentService from './api/services/EquipmentService';
41
42
  import useFaceApiHelper from './utils/faceApiHelper';
42
43
  export { AppButton, AppCheckbox, AppDatepicker, AppDatePicker, AppInput, AppInputNew, AppInputSearch, AppLayout, AppLayoutHeader, AppLayoutPage, AppLoader, AppSelect, AppSheet, AppSheetNew, AppSidebar, AppToggle, AppWrapper, AppConfirmDialog, AppDropdown, AppTablePagination, AppTableSearch, AppTableModal, AppTable, AppTableLayout, AppModalSelect, };
43
- export { ApiService, useAuthService, useGanttService, useMetricsService, useProjectsService, useRepairsService, useTasksService, useFileService, useControlsService, useVideoService, useUserService, useInstrumentsService, useSearchService, useCommentsService, useFaceApiHelper, };
44
+ export { ApiService, useAuthService, useGanttService, useMetricsService, useProjectsService, useRepairsService, useTasksService, useFileService, useControlsService, useVideoService, useUserService, useInstrumentsService, useSearchService, useCommentsService, useFaceApiHelper, useEquipmentService, };
44
45
  export { useBaseTable } from './common/app-table/controllers/useBaseTable';
45
46
  export { useTableModel } from './common/app-table/controllers/useTableModel';
46
47
  export { useColumnSelector } from './common/app-table/controllers/useColumnSelector';
@@ -58,3 +59,5 @@ export * from './api/types/Api_Search';
58
59
  export * from './api/types/Api_User';
59
60
  export * from './api/types/Api_Comment';
60
61
  export * from './api/types/Api_Files';
62
+ export * from './api/types/Api_Video';
63
+ export * from './api/types/Api_Equipment';
package/package.json CHANGED
@@ -1,64 +1,64 @@
1
- {
2
- "name": "shared-ritm",
3
- "version": "1.2.99",
4
- "private": false,
5
- "files": [
6
- "dist",
7
- "src"
8
- ],
9
- "main": "dist/shared-ritm.umd.js",
10
- "type": "module",
11
- "module": "./dist/shared-ritm.es.js",
12
- "types": "./dist/types/index.d.ts",
13
- "exports": {
14
- ".": {
15
- "import": "./dist/shared-ritm.es.js",
16
- "require": "./dist/shared-ritm.umd.js",
17
- "default": "./dist/shared-ritm.es.js",
18
- "types": "./dist/types/index.d.ts"
19
- },
20
- "./style": "./dist/index.css"
21
- },
22
- "scripts": {
23
- "dev": "vite",
24
- "build": "vite build && tsc --emitDeclarationOnly",
25
- "typecheck": "vue-tsc --noEmit",
26
- "lint": "eslint --fix",
27
- "format": "prettier -w -u ."
28
- },
29
- "dependencies": {
30
- "@quasar/extras": "^1.16.17",
31
- "@vueuse/core": "^10.1.2",
32
- "face-api.js": "^0.22.2",
33
- "axios": "^1.7.7",
34
- "vue": "^3.5.12",
35
- "vue-router": "^4.0.3"
36
- },
37
- "peerDependencies": {
38
- "quasar": "^2.18.1"
39
- },
40
- "devDependencies": {
41
- "@quasar/vite-plugin": "^1.9.0",
42
- "@rollup/pluginutils": "^5.1.3",
43
- "@types/node": "^22.7.9",
44
- "@typescript-eslint/eslint-plugin": "^4.25.0",
45
- "@typescript-eslint/parser": "^4.25.0",
46
- "@vitejs/plugin-vue": "^5.1.4",
47
- "@vue/compiler-sfc": "^3.0.5",
48
- "@vue/eslint-config-prettier": "^6.0.0",
49
- "@vue/eslint-config-typescript": "^7.0.0",
50
- "eslint": "^7.27.0",
51
- "eslint-plugin-prettier": "^3.4.0",
52
- "eslint-plugin-vue": "^7.10.0",
53
- "install": "^0.13.0",
54
- "npm": "^11.4.0",
55
- "prettier": "^2.3.0",
56
- "quasar": "^2.18.1",
57
- "rollup-plugin-visualizer": "^5.14.0",
58
- "sass": "^1.80.4",
59
- "typescript": "^5.6.3",
60
- "vite": "^5.4.9",
61
- "vite-plugin-css-modules": "^0.0.1",
62
- "vue-tsc": "^2.1.6"
63
- }
64
- }
1
+ {
2
+ "name": "shared-ritm",
3
+ "version": "1.2.101",
4
+ "private": false,
5
+ "files": [
6
+ "dist",
7
+ "src"
8
+ ],
9
+ "main": "dist/shared-ritm.umd.js",
10
+ "type": "module",
11
+ "module": "./dist/shared-ritm.es.js",
12
+ "types": "./dist/types/index.d.ts",
13
+ "exports": {
14
+ ".": {
15
+ "import": "./dist/shared-ritm.es.js",
16
+ "require": "./dist/shared-ritm.umd.js",
17
+ "default": "./dist/shared-ritm.es.js",
18
+ "types": "./dist/types/index.d.ts"
19
+ },
20
+ "./style": "./dist/index.css"
21
+ },
22
+ "scripts": {
23
+ "dev": "vite",
24
+ "build": "vite build && tsc --emitDeclarationOnly",
25
+ "typecheck": "vue-tsc --noEmit",
26
+ "lint": "eslint --fix",
27
+ "format": "prettier -w -u ."
28
+ },
29
+ "dependencies": {
30
+ "@quasar/extras": "^1.16.17",
31
+ "@vueuse/core": "^10.1.2",
32
+ "face-api.js": "^0.22.2",
33
+ "axios": "^1.7.7",
34
+ "vue": "^3.5.12",
35
+ "vue-router": "^4.0.3"
36
+ },
37
+ "peerDependencies": {
38
+ "quasar": "^2.18.1"
39
+ },
40
+ "devDependencies": {
41
+ "@quasar/vite-plugin": "^1.9.0",
42
+ "@rollup/pluginutils": "^5.1.3",
43
+ "@types/node": "^22.7.9",
44
+ "@typescript-eslint/eslint-plugin": "^4.25.0",
45
+ "@typescript-eslint/parser": "^4.25.0",
46
+ "@vitejs/plugin-vue": "^5.1.4",
47
+ "@vue/compiler-sfc": "^3.0.5",
48
+ "@vue/eslint-config-prettier": "^6.0.0",
49
+ "@vue/eslint-config-typescript": "^7.0.0",
50
+ "eslint": "^7.27.0",
51
+ "eslint-plugin-prettier": "^3.4.0",
52
+ "eslint-plugin-vue": "^7.10.0",
53
+ "install": "^0.13.0",
54
+ "npm": "^11.4.0",
55
+ "prettier": "^2.3.0",
56
+ "quasar": "^2.18.1",
57
+ "rollup-plugin-visualizer": "^5.14.0",
58
+ "sass": "^1.80.4",
59
+ "typescript": "^5.6.3",
60
+ "vite": "^5.4.9",
61
+ "vite-plugin-css-modules": "^0.0.1",
62
+ "vue-tsc": "^2.1.6"
63
+ }
64
+ }