shared-ritm 1.2.58 → 1.2.59
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.
- package/README.md +103 -103
- package/dist/index.css +1 -1
- package/dist/shared-ritm.es.js +4787 -4771
- package/dist/shared-ritm.umd.js +7 -7
- package/dist/types/api/services/VideoService.d.ts +6 -0
- package/dist/types/index.d.ts +2 -1
- package/package.json +63 -63
- package/src/api/services/ControlsService.ts +64 -64
- package/src/api/services/GanttService.ts +17 -17
- package/src/api/services/MetricsService.ts +109 -109
- package/src/api/services/ProjectsService.ts +67 -67
- package/src/api/services/RepairsService.ts +100 -100
- package/src/api/services/VideoService.ts +14 -0
- package/src/api/types/Api_Files.ts +1 -1
- package/src/api/types/Api_Projects.ts +55 -55
- package/src/api/types/Api_Repairs.ts +93 -93
- package/src/api/types/Api_Tasks.ts +155 -155
- package/src/common/app-checkbox/AppCheckbox.vue +26 -26
- package/src/common/app-dialogs/AppConfirmDialog.vue +99 -99
- package/src/common/app-dropdown/AppDropdown.vue +31 -31
- package/src/common/app-select/AppSelect.vue +157 -157
- package/src/common/app-sheet/AppSheet.vue +120 -120
- package/src/common/app-sidebar/components/SidebarMenuItem.vue +148 -148
- package/src/common/app-table/AppTable.vue +241 -241
- package/src/common/app-table/AppTableLayout.vue +102 -102
- package/src/common/app-table/components/ModalSelect.vue +264 -264
- package/src/common/app-table/components/TableModal.vue +329 -329
- package/src/common/app-table/components/TablePagination.vue +150 -150
- package/src/common/app-table/components/TableSearch.vue +76 -76
- package/src/common/app-table/controllers/useBaseTable.ts +42 -42
- package/src/common/app-table/controllers/useColumnSelector.ts +38 -38
- package/src/common/app-table/controllers/useTableModel.ts +93 -93
- package/src/common/app-toggle/AppToggle.vue +23 -23
- package/src/common/app-wrapper/AppWrapper.vue +28 -28
- package/src/icons/components/table-filter-icon.vue +30 -30
- package/src/icons/dialogs/RemoveIcon.vue +12 -12
- package/src/icons/dialogs/SafetyIcon.vue +12 -12
- package/src/icons/task/attention-icon.vue +13 -13
- package/src/icons/task/clock-icon.vue +10 -10
- package/src/icons/task/delete-icon.vue +10 -10
- package/src/icons/task/fire-icon.vue +16 -16
- package/src/index.ts +86 -84
- package/src/shared/fonts/Inter_18pt-Black.ttf +0 -0
- package/src/shared/fonts/Inter_18pt-Bold.ttf +0 -0
- package/src/shared/fonts/Inter_18pt-Regular.ttf +0 -0
- package/src/shared/fonts/Inter_18pt-SemiBold.ttf +0 -0
- package/src/shared/styles/general.css +125 -96
- package/src/styles/variables.sass +12 -12
- package/src/utils/confirm.ts +12 -12
- package/src/utils/helpers.ts +39 -39
- package/src/utils/notification.ts +9 -9
package/src/index.ts
CHANGED
|
@@ -1,84 +1,86 @@
|
|
|
1
|
-
import '@/shared/styles/general.css'
|
|
2
|
-
import AppButton from '@/common/app-button/AppButton.vue'
|
|
3
|
-
import AppCheckbox from '@/common/app-checkbox/AppCheckbox.vue'
|
|
4
|
-
import AppDatePicker from '@/common/app-date-picker/AppDatePicker.vue'
|
|
5
|
-
import AppInput from '@/common/app-input/AppInput.vue'
|
|
6
|
-
import AppInputSearch from '@/common/app-input-search/AppInputSearch.vue'
|
|
7
|
-
import AppLayout from '@/common/app-layout/AppLayout.vue'
|
|
8
|
-
import AppLayoutHeader from '@/common/app-layout/components/AppLayoutHeader.vue'
|
|
9
|
-
import AppLayoutPage from '@/common/app-layout/components/AppLayoutPage.vue'
|
|
10
|
-
import AppLoader from '@/common/app-loader/index.vue'
|
|
11
|
-
import AppSelect from '@/common/app-select/AppSelect.vue'
|
|
12
|
-
import AppSheet from '@/common/app-sheet/AppSheet.vue'
|
|
13
|
-
import AppSidebar from '@/common/app-sidebar/AppSidebar.vue'
|
|
14
|
-
import AppToggle from '@/common/app-toggle/AppToggle.vue'
|
|
15
|
-
import AppWrapper from '@/common/app-wrapper/AppWrapper.vue'
|
|
16
|
-
import AppConfirmDialog from '@/common/app-dialogs/AppConfirmDialog.vue'
|
|
17
|
-
import AppDropdown from '@/common/app-dropdown/AppDropdown.vue'
|
|
18
|
-
import AppTablePagination from '@/common/app-table/components/TablePagination.vue'
|
|
19
|
-
import AppTableSearch from '@/common/app-table/components/TableSearch.vue'
|
|
20
|
-
import AppTableModal from '@/common/app-table/components/TableModal.vue'
|
|
21
|
-
import AppTable from '@/common/app-table/AppTable.vue'
|
|
22
|
-
import AppTableLayout from '@/common/app-table/AppTableLayout.vue'
|
|
23
|
-
import AppModalSelect from '@/common/app-table/components/ModalSelect.vue'
|
|
24
|
-
|
|
25
|
-
import useGanttService from '@/api/services/GanttService'
|
|
26
|
-
import useMetricsService from '@/api/services/MetricsService'
|
|
27
|
-
import useProjectsService from '@/api/services/ProjectsService'
|
|
28
|
-
import useRepairsService from '@/api/services/RepairsService'
|
|
29
|
-
import useTasksService from '@/api/services/TasksService'
|
|
30
|
-
import useAuthService from '@/api/services/AuthService'
|
|
31
|
-
import useFileService from '@/api/services/FileService'
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
export {
|
|
74
|
-
|
|
75
|
-
export
|
|
76
|
-
|
|
77
|
-
export type {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
export
|
|
81
|
-
|
|
82
|
-
export * from './api/types/
|
|
83
|
-
export * from './api/types/
|
|
84
|
-
|
|
1
|
+
import '@/shared/styles/general.css'
|
|
2
|
+
import AppButton from '@/common/app-button/AppButton.vue'
|
|
3
|
+
import AppCheckbox from '@/common/app-checkbox/AppCheckbox.vue'
|
|
4
|
+
import AppDatePicker from '@/common/app-date-picker/AppDatePicker.vue'
|
|
5
|
+
import AppInput from '@/common/app-input/AppInput.vue'
|
|
6
|
+
import AppInputSearch from '@/common/app-input-search/AppInputSearch.vue'
|
|
7
|
+
import AppLayout from '@/common/app-layout/AppLayout.vue'
|
|
8
|
+
import AppLayoutHeader from '@/common/app-layout/components/AppLayoutHeader.vue'
|
|
9
|
+
import AppLayoutPage from '@/common/app-layout/components/AppLayoutPage.vue'
|
|
10
|
+
import AppLoader from '@/common/app-loader/index.vue'
|
|
11
|
+
import AppSelect from '@/common/app-select/AppSelect.vue'
|
|
12
|
+
import AppSheet from '@/common/app-sheet/AppSheet.vue'
|
|
13
|
+
import AppSidebar from '@/common/app-sidebar/AppSidebar.vue'
|
|
14
|
+
import AppToggle from '@/common/app-toggle/AppToggle.vue'
|
|
15
|
+
import AppWrapper from '@/common/app-wrapper/AppWrapper.vue'
|
|
16
|
+
import AppConfirmDialog from '@/common/app-dialogs/AppConfirmDialog.vue'
|
|
17
|
+
import AppDropdown from '@/common/app-dropdown/AppDropdown.vue'
|
|
18
|
+
import AppTablePagination from '@/common/app-table/components/TablePagination.vue'
|
|
19
|
+
import AppTableSearch from '@/common/app-table/components/TableSearch.vue'
|
|
20
|
+
import AppTableModal from '@/common/app-table/components/TableModal.vue'
|
|
21
|
+
import AppTable from '@/common/app-table/AppTable.vue'
|
|
22
|
+
import AppTableLayout from '@/common/app-table/AppTableLayout.vue'
|
|
23
|
+
import AppModalSelect from '@/common/app-table/components/ModalSelect.vue'
|
|
24
|
+
|
|
25
|
+
import useGanttService from '@/api/services/GanttService'
|
|
26
|
+
import useMetricsService from '@/api/services/MetricsService'
|
|
27
|
+
import useProjectsService from '@/api/services/ProjectsService'
|
|
28
|
+
import useRepairsService from '@/api/services/RepairsService'
|
|
29
|
+
import useTasksService from '@/api/services/TasksService'
|
|
30
|
+
import useAuthService from '@/api/services/AuthService'
|
|
31
|
+
import useFileService from '@/api/services/FileService'
|
|
32
|
+
import useVideoService from '@/api/services/VideoService'
|
|
33
|
+
import ApiService from '@/api/settings/ApiService'
|
|
34
|
+
import useControlsService from '@/api/services/ControlsService'
|
|
35
|
+
|
|
36
|
+
export {
|
|
37
|
+
AppButton,
|
|
38
|
+
AppCheckbox,
|
|
39
|
+
AppDatePicker,
|
|
40
|
+
AppInput,
|
|
41
|
+
AppInputSearch,
|
|
42
|
+
AppLayout,
|
|
43
|
+
AppLayoutHeader,
|
|
44
|
+
AppLayoutPage,
|
|
45
|
+
AppLoader,
|
|
46
|
+
AppSelect,
|
|
47
|
+
AppSheet,
|
|
48
|
+
AppSidebar,
|
|
49
|
+
AppToggle,
|
|
50
|
+
AppWrapper,
|
|
51
|
+
AppConfirmDialog,
|
|
52
|
+
AppDropdown,
|
|
53
|
+
AppTablePagination,
|
|
54
|
+
AppTableSearch,
|
|
55
|
+
AppTableModal,
|
|
56
|
+
AppTable,
|
|
57
|
+
AppTableLayout,
|
|
58
|
+
AppModalSelect,
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export {
|
|
62
|
+
ApiService,
|
|
63
|
+
useAuthService,
|
|
64
|
+
useGanttService,
|
|
65
|
+
useMetricsService,
|
|
66
|
+
useProjectsService,
|
|
67
|
+
useRepairsService,
|
|
68
|
+
useTasksService,
|
|
69
|
+
useFileService,
|
|
70
|
+
useControlsService,
|
|
71
|
+
useVideoService,
|
|
72
|
+
}
|
|
73
|
+
export { useBaseTable } from './common/app-table/controllers/useBaseTable'
|
|
74
|
+
export { useTableModel } from './common/app-table/controllers/useTableModel'
|
|
75
|
+
export { useColumnSelector } from './common/app-table/controllers/useColumnSelector'
|
|
76
|
+
|
|
77
|
+
export type { FilterOption, TableModel, TableColumn } from './common/app-table/controllers/useTableModel'
|
|
78
|
+
|
|
79
|
+
export type { NotificationType } from './utils/notification'
|
|
80
|
+
export { notificationSettings } from './utils/notification'
|
|
81
|
+
|
|
82
|
+
export * from './api/types/Api_Tasks'
|
|
83
|
+
export * from './api/types/Api_Repairs'
|
|
84
|
+
export * from './api/types/Api_Projects'
|
|
85
|
+
export * from './api/types/Api_Controls'
|
|
86
|
+
// export * from '@/api/types/Api_Metrics'
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,96 +1,125 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--main-header-height: 73px;
|
|
3
|
-
--main-footer-height: 66px;
|
|
4
|
-
--sidebar-width-max: 250px;
|
|
5
|
-
--sidebar-width-min: 66px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
/*border-radius*/
|
|
9
|
-
:root {
|
|
10
|
-
--border-radius-xxs: 4px;
|
|
11
|
-
--border-radius-xs: 8px;
|
|
12
|
-
--border-radius-s: 12px;
|
|
13
|
-
--border-radius-m: 16px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/*color*/
|
|
17
|
-
:root {
|
|
18
|
-
--g-blue: #3f8cff;
|
|
19
|
-
--g-blue-light: #e4efff;
|
|
20
|
-
--g-blue-dark: #1c75ff;
|
|
21
|
-
--g-green: #00d097;
|
|
22
|
-
--g-green-light: #e0f9f2;
|
|
23
|
-
--g-green-dark: #b8f8e7;
|
|
24
|
-
--g-red: #ff192d;
|
|
25
|
-
--g-red-light: #fdecee;
|
|
26
|
-
--g-red-dark: #ffdcde;
|
|
27
|
-
--g-grey-100: #d8e0f0;
|
|
28
|
-
|
|
29
|
-
--g-font-color: #0a1629;
|
|
30
|
-
--g-font-grey-color: #b9c0c7;
|
|
31
|
-
--g-font-secondary-color: #7d8592;
|
|
32
|
-
|
|
33
|
-
--g-grey-background: #ced5e0;
|
|
34
|
-
--g-grey-hover-background: #9fa5af;
|
|
35
|
-
--g-secondary-background: #f4f9fd;
|
|
36
|
-
--g-thirty-background: #c8cbcf;
|
|
37
|
-
|
|
38
|
-
--g-fire-color-1: #fee7e7;
|
|
39
|
-
--g-fire-color-2: #fed4d5;
|
|
40
|
-
--g-fire-color-3: #fcc0c0;
|
|
41
|
-
--g-fire-color-4: #f9a2a2;
|
|
42
|
-
--g-fire-color-5: #f97d7e;
|
|
43
|
-
--g-fire-color-6: #f65160;
|
|
44
|
-
--g-fire-color-7: #ff192d;
|
|
45
|
-
--g-fire-color-8: #ab0514;
|
|
46
|
-
--g-fire-color-9: #6e000a;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
* {
|
|
50
|
-
margin: 0;
|
|
51
|
-
padding: 0;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
button:active,
|
|
55
|
-
button:focus {
|
|
56
|
-
outline: none !important;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
html {
|
|
60
|
-
font-family: 'NunitoSansFont', sans-serif !important;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.ant-dropdown {
|
|
64
|
-
z-index: 10000;
|
|
65
|
-
.content {
|
|
66
|
-
z-index: 10000;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
@font-face {
|
|
71
|
-
font-family: 'NunitoSansFont';
|
|
72
|
-
src: local('NunitoSansFont-Regular'), url('../fonts/NunitoSansFont.ttf') format('truetype');
|
|
73
|
-
font-weight: 400;
|
|
74
|
-
font-style: normal;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
@font-face {
|
|
78
|
-
font-family: 'NunitoSansFont';
|
|
79
|
-
src: local('NunitoSansFont-Bold'), url('../fonts/NunitoSans_7pt-Bold.ttf') format('truetype');
|
|
80
|
-
font-weight: 700;
|
|
81
|
-
font-style: normal;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
@font-face {
|
|
85
|
-
font-family: 'Montserrat';
|
|
86
|
-
src: local('Montserrat-Regular'), url('../fonts/Montserrat.ttf') format('truetype');
|
|
87
|
-
font-weight: 400;
|
|
88
|
-
font-style: normal;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
@font-face {
|
|
92
|
-
font-family: 'Montserrat';
|
|
93
|
-
src: local('Montserrat-Bold'), url('../fonts/Montserrat-Bold.ttf') format('truetype');
|
|
94
|
-
font-weight: 700;
|
|
95
|
-
font-style: normal;
|
|
96
|
-
}
|
|
1
|
+
:root {
|
|
2
|
+
--main-header-height: 73px;
|
|
3
|
+
--main-footer-height: 66px;
|
|
4
|
+
--sidebar-width-max: 250px;
|
|
5
|
+
--sidebar-width-min: 66px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/*border-radius*/
|
|
9
|
+
:root {
|
|
10
|
+
--border-radius-xxs: 4px;
|
|
11
|
+
--border-radius-xs: 8px;
|
|
12
|
+
--border-radius-s: 12px;
|
|
13
|
+
--border-radius-m: 16px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/*color*/
|
|
17
|
+
:root {
|
|
18
|
+
--g-blue: #3f8cff;
|
|
19
|
+
--g-blue-light: #e4efff;
|
|
20
|
+
--g-blue-dark: #1c75ff;
|
|
21
|
+
--g-green: #00d097;
|
|
22
|
+
--g-green-light: #e0f9f2;
|
|
23
|
+
--g-green-dark: #b8f8e7;
|
|
24
|
+
--g-red: #ff192d;
|
|
25
|
+
--g-red-light: #fdecee;
|
|
26
|
+
--g-red-dark: #ffdcde;
|
|
27
|
+
--g-grey-100: #d8e0f0;
|
|
28
|
+
|
|
29
|
+
--g-font-color: #0a1629;
|
|
30
|
+
--g-font-grey-color: #b9c0c7;
|
|
31
|
+
--g-font-secondary-color: #7d8592;
|
|
32
|
+
|
|
33
|
+
--g-grey-background: #ced5e0;
|
|
34
|
+
--g-grey-hover-background: #9fa5af;
|
|
35
|
+
--g-secondary-background: #f4f9fd;
|
|
36
|
+
--g-thirty-background: #c8cbcf;
|
|
37
|
+
|
|
38
|
+
--g-fire-color-1: #fee7e7;
|
|
39
|
+
--g-fire-color-2: #fed4d5;
|
|
40
|
+
--g-fire-color-3: #fcc0c0;
|
|
41
|
+
--g-fire-color-4: #f9a2a2;
|
|
42
|
+
--g-fire-color-5: #f97d7e;
|
|
43
|
+
--g-fire-color-6: #f65160;
|
|
44
|
+
--g-fire-color-7: #ff192d;
|
|
45
|
+
--g-fire-color-8: #ab0514;
|
|
46
|
+
--g-fire-color-9: #6e000a;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
* {
|
|
50
|
+
margin: 0;
|
|
51
|
+
padding: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
button:active,
|
|
55
|
+
button:focus {
|
|
56
|
+
outline: none !important;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
html {
|
|
60
|
+
font-family: 'NunitoSansFont', sans-serif !important;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.ant-dropdown {
|
|
64
|
+
z-index: 10000;
|
|
65
|
+
.content {
|
|
66
|
+
z-index: 10000;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@font-face {
|
|
71
|
+
font-family: 'NunitoSansFont';
|
|
72
|
+
src: local('NunitoSansFont-Regular'), url('../fonts/NunitoSansFont.ttf') format('truetype');
|
|
73
|
+
font-weight: 400;
|
|
74
|
+
font-style: normal;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@font-face {
|
|
78
|
+
font-family: 'NunitoSansFont';
|
|
79
|
+
src: local('NunitoSansFont-Bold'), url('../fonts/NunitoSans_7pt-Bold.ttf') format('truetype');
|
|
80
|
+
font-weight: 700;
|
|
81
|
+
font-style: normal;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@font-face {
|
|
85
|
+
font-family: 'Montserrat';
|
|
86
|
+
src: local('Montserrat-Regular'), url('../fonts/Montserrat.ttf') format('truetype');
|
|
87
|
+
font-weight: 400;
|
|
88
|
+
font-style: normal;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@font-face {
|
|
92
|
+
font-family: 'Montserrat';
|
|
93
|
+
src: local('Montserrat-Bold'), url('../fonts/Montserrat-Bold.ttf') format('truetype');
|
|
94
|
+
font-weight: 700;
|
|
95
|
+
font-style: normal;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@font-face {
|
|
99
|
+
font-family: 'Inter';
|
|
100
|
+
src: local('Inter-Regular'), url('../fonts/Inter_18pt-Regular.ttf') format('truetype');
|
|
101
|
+
font-weight: 400;
|
|
102
|
+
font-style: normal;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@font-face {
|
|
106
|
+
font-family: 'Inter';
|
|
107
|
+
src: local('Inter-SemiBold'), url('../fonts/Inter_18pt-SemiBold.ttf') format('truetype');
|
|
108
|
+
font-weight: 600;
|
|
109
|
+
font-style: normal;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@font-face {
|
|
113
|
+
font-family: 'Inter';
|
|
114
|
+
src: local('Inter-Bold'), url('../fonts/Inter_18pt-Bold.ttf') format('truetype');
|
|
115
|
+
font-weight: 700;
|
|
116
|
+
font-style: normal;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@font-face {
|
|
120
|
+
font-family: 'Inter';
|
|
121
|
+
src: local('Inter-Black'), url('../fonts/Inter_18pt-Black.ttf') format('truetype');
|
|
122
|
+
font-weight: 900;
|
|
123
|
+
font-style: normal;
|
|
124
|
+
}
|
|
125
|
+
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
$primary : #1976D2
|
|
2
|
-
$secondary : #C4C4C4
|
|
3
|
-
$accent : #665BA6
|
|
4
|
-
$positive : #3B9F69
|
|
5
|
-
$negative : #C10015
|
|
6
|
-
$info : #31CCEC
|
|
7
|
-
$warning : #F2C037
|
|
8
|
-
|
|
9
|
-
$dark : #1D1D1D
|
|
10
|
-
$dark-page : #121212
|
|
11
|
-
|
|
12
|
-
$secondary: #1D1D1D
|
|
1
|
+
$primary : #1976D2
|
|
2
|
+
$secondary : #C4C4C4
|
|
3
|
+
$accent : #665BA6
|
|
4
|
+
$positive : #3B9F69
|
|
5
|
+
$negative : #C10015
|
|
6
|
+
$info : #31CCEC
|
|
7
|
+
$warning : #F2C037
|
|
8
|
+
|
|
9
|
+
$dark : #1D1D1D
|
|
10
|
+
$dark-page : #121212
|
|
11
|
+
|
|
12
|
+
$secondary: #1D1D1D
|
package/src/utils/confirm.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineAsyncComponent } from 'vue'
|
|
2
|
-
import { useQuasar } from 'quasar'
|
|
3
|
-
const $q = useQuasar()
|
|
4
|
-
|
|
5
|
-
const AppConfirmDialog = defineAsyncComponent(() => import('@/common/app-dialogs/AppConfirmDialog.vue'))
|
|
6
|
-
|
|
7
|
-
export const appConfirm = (content: string, type: 'delete' | 'edit') => {
|
|
8
|
-
return $q.dialog({
|
|
9
|
-
component: AppConfirmDialog,
|
|
10
|
-
componentProps: { content, type },
|
|
11
|
-
})
|
|
12
|
-
}
|
|
1
|
+
import { defineAsyncComponent } from 'vue'
|
|
2
|
+
import { useQuasar } from 'quasar'
|
|
3
|
+
const $q = useQuasar()
|
|
4
|
+
|
|
5
|
+
const AppConfirmDialog = defineAsyncComponent(() => import('@/common/app-dialogs/AppConfirmDialog.vue'))
|
|
6
|
+
|
|
7
|
+
export const appConfirm = (content: string, type: 'delete' | 'edit') => {
|
|
8
|
+
return $q.dialog({
|
|
9
|
+
component: AppConfirmDialog,
|
|
10
|
+
componentProps: { content, type },
|
|
11
|
+
})
|
|
12
|
+
}
|
package/src/utils/helpers.ts
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
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
|
-
}
|
|
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
|
+
}
|
|
@@ -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
|
+
})
|