shared-ritm 1.2.63 → 1.2.65

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 (48) hide show
  1. package/README.md +103 -103
  2. package/dist/index.css +1 -1
  3. package/dist/shared-ritm.es.js +4462 -4455
  4. package/dist/shared-ritm.umd.js +7 -7
  5. package/dist/types/common/app-table/controllers/useTableModel.d.ts +1 -1
  6. package/package.json +63 -63
  7. package/src/api/services/ControlsService.ts +64 -64
  8. package/src/api/services/GanttService.ts +17 -17
  9. package/src/api/services/InstrumentsService.ts +22 -22
  10. package/src/api/services/MetricsService.ts +109 -109
  11. package/src/api/services/ProjectsService.ts +67 -67
  12. package/src/api/services/RepairsService.ts +100 -100
  13. package/src/api/services/VideoService.ts +14 -14
  14. package/src/api/types/Api_Files.ts +1 -1
  15. package/src/api/types/Api_Instruments.ts +133 -133
  16. package/src/api/types/Api_Projects.ts +55 -55
  17. package/src/api/types/Api_Repairs.ts +93 -93
  18. package/src/api/types/Api_Tasks.ts +155 -155
  19. package/src/common/app-checkbox/AppCheckbox.vue +26 -26
  20. package/src/common/app-dialogs/AppConfirmDialog.vue +99 -99
  21. package/src/common/app-dropdown/AppDropdown.vue +31 -31
  22. package/src/common/app-select/AppSelect.vue +157 -157
  23. package/src/common/app-sheet/AppSheet.vue +120 -120
  24. package/src/common/app-sidebar/components/SidebarMenuItem.vue +148 -148
  25. package/src/common/app-table/AppTable.vue +250 -241
  26. package/src/common/app-table/AppTableLayout.vue +111 -102
  27. package/src/common/app-table/components/ModalSelect.vue +264 -264
  28. package/src/common/app-table/components/TableModal.vue +329 -329
  29. package/src/common/app-table/components/TablePagination.vue +152 -150
  30. package/src/common/app-table/components/TableSearch.vue +76 -76
  31. package/src/common/app-table/controllers/useBaseTable.ts +42 -42
  32. package/src/common/app-table/controllers/useColumnSelector.ts +38 -38
  33. package/src/common/app-table/controllers/useTableModel.ts +93 -93
  34. package/src/common/app-toggle/AppToggle.vue +23 -23
  35. package/src/common/app-wrapper/AppWrapper.vue +28 -28
  36. package/src/icons/components/table-filter-icon.vue +30 -30
  37. package/src/icons/dialogs/RemoveIcon.vue +12 -12
  38. package/src/icons/dialogs/SafetyIcon.vue +12 -12
  39. package/src/icons/task/attention-icon.vue +13 -13
  40. package/src/icons/task/clock-icon.vue +10 -10
  41. package/src/icons/task/delete-icon.vue +10 -10
  42. package/src/icons/task/fire-icon.vue +16 -16
  43. package/src/index.ts +89 -89
  44. package/src/shared/styles/general.css +125 -125
  45. package/src/styles/variables.sass +12 -12
  46. package/src/utils/confirm.ts +12 -12
  47. package/src/utils/helpers.ts +39 -39
  48. package/src/utils/notification.ts +9 -9
@@ -1,120 +1,120 @@
1
- <template>
2
- <q-dialog
3
- ref="DialogRef"
4
- :model-value="true"
5
- :position="'right'"
6
- :class="$style['sheet-dialog']"
7
- no-shake
8
- no-esc-dismiss
9
- full-height
10
- full-width
11
- >
12
- <template v-if="type === 'details'">
13
- <q-card>
14
- <div class="wrapper">
15
- <div class="sheet-header">
16
- <h2>{{ title }}</h2>
17
- <div class="close-button">
18
- <q-btn v-close-popup dense flat icon="close" />
19
- </div>
20
- </div>
21
- <div v-if="loading" class="loader">
22
- <q-spinner-audio v-if="loading" class="loader-spinner" size="md" :thickness="3" color="primary" />
23
- </div>
24
- <slot v-else />
25
- </div>
26
- </q-card>
27
- </template>
28
- <template v-if="type === 'custom'">
29
- <div v-if="loading" class="custom-wrapper">
30
- <div class="loader">
31
- <q-spinner-audio v-if="loading" class="loader-spinner" size="md" :thickness="3" color="primary" />
32
- </div>
33
- </div>
34
- <slot v-else />
35
- </template>
36
- </q-dialog>
37
- </template>
38
-
39
- <script setup lang="ts">
40
- import { computed, defineEmits, defineProps, withDefaults } from 'vue'
41
-
42
- interface DialogProps {
43
- dialogRef: any
44
- loading?: boolean
45
- title?: string
46
- width?: string
47
- type?: 'details' | 'custom'
48
- tabs?: any[]
49
- currentTabName?: string
50
- }
51
-
52
- const props = withDefaults(defineProps<DialogProps>(), {
53
- title: '',
54
- width: '976px',
55
- type: 'details',
56
- loading: false,
57
- tabs: () => [],
58
- currentTabName: '',
59
- })
60
-
61
- const emit = defineEmits(['update:dialogRef', 'update:currentTabName'])
62
-
63
- const DialogRef = computed({
64
- get() {
65
- return props.dialogRef
66
- },
67
- set(value) {
68
- emit('update:dialogRef', value)
69
- },
70
- })
71
- </script>
72
-
73
- <style lang="scss" scoped>
74
- .custom-wrapper {
75
- width: v-bind(width);
76
- background-color: white;
77
- }
78
-
79
- .wrapper {
80
- display: flex;
81
- flex-direction: column;
82
- gap: 1rem;
83
- width: v-bind(width);
84
- height: 100vh;
85
- min-height: 100vh;
86
- position: relative;
87
- padding: 2rem 2rem 4rem 2rem;
88
- background-color: #7991ad32;
89
- font-family: 'NunitoSansFont', sans-serif;
90
- }
91
-
92
- .sheet-header {
93
- display: flex;
94
- justify-content: space-between;
95
- align-items: center;
96
-
97
- h2 {
98
- font-size: 36px;
99
- }
100
- }
101
-
102
- .loader {
103
- min-width: 976px;
104
-
105
- &-spinner {
106
- position: absolute;
107
- top: 50%;
108
- left: 50%;
109
- z-index: 4;
110
- }
111
- }
112
- </style>
113
-
114
- <style lang="scss" module>
115
- .sheet-dialog {
116
- :global(.q-dialog__inner--minimized) {
117
- padding: 0;
118
- }
119
- }
120
- </style>
1
+ <template>
2
+ <q-dialog
3
+ ref="DialogRef"
4
+ :model-value="true"
5
+ :position="'right'"
6
+ :class="$style['sheet-dialog']"
7
+ no-shake
8
+ no-esc-dismiss
9
+ full-height
10
+ full-width
11
+ >
12
+ <template v-if="type === 'details'">
13
+ <q-card>
14
+ <div class="wrapper">
15
+ <div class="sheet-header">
16
+ <h2>{{ title }}</h2>
17
+ <div class="close-button">
18
+ <q-btn v-close-popup dense flat icon="close" />
19
+ </div>
20
+ </div>
21
+ <div v-if="loading" class="loader">
22
+ <q-spinner-audio v-if="loading" class="loader-spinner" size="md" :thickness="3" color="primary" />
23
+ </div>
24
+ <slot v-else />
25
+ </div>
26
+ </q-card>
27
+ </template>
28
+ <template v-if="type === 'custom'">
29
+ <div v-if="loading" class="custom-wrapper">
30
+ <div class="loader">
31
+ <q-spinner-audio v-if="loading" class="loader-spinner" size="md" :thickness="3" color="primary" />
32
+ </div>
33
+ </div>
34
+ <slot v-else />
35
+ </template>
36
+ </q-dialog>
37
+ </template>
38
+
39
+ <script setup lang="ts">
40
+ import { computed, defineEmits, defineProps, withDefaults } from 'vue'
41
+
42
+ interface DialogProps {
43
+ dialogRef: any
44
+ loading?: boolean
45
+ title?: string
46
+ width?: string
47
+ type?: 'details' | 'custom'
48
+ tabs?: any[]
49
+ currentTabName?: string
50
+ }
51
+
52
+ const props = withDefaults(defineProps<DialogProps>(), {
53
+ title: '',
54
+ width: '976px',
55
+ type: 'details',
56
+ loading: false,
57
+ tabs: () => [],
58
+ currentTabName: '',
59
+ })
60
+
61
+ const emit = defineEmits(['update:dialogRef', 'update:currentTabName'])
62
+
63
+ const DialogRef = computed({
64
+ get() {
65
+ return props.dialogRef
66
+ },
67
+ set(value) {
68
+ emit('update:dialogRef', value)
69
+ },
70
+ })
71
+ </script>
72
+
73
+ <style lang="scss" scoped>
74
+ .custom-wrapper {
75
+ width: v-bind(width);
76
+ background-color: white;
77
+ }
78
+
79
+ .wrapper {
80
+ display: flex;
81
+ flex-direction: column;
82
+ gap: 1rem;
83
+ width: v-bind(width);
84
+ height: 100vh;
85
+ min-height: 100vh;
86
+ position: relative;
87
+ padding: 2rem 2rem 4rem 2rem;
88
+ background-color: #7991ad32;
89
+ font-family: 'NunitoSansFont', sans-serif;
90
+ }
91
+
92
+ .sheet-header {
93
+ display: flex;
94
+ justify-content: space-between;
95
+ align-items: center;
96
+
97
+ h2 {
98
+ font-size: 36px;
99
+ }
100
+ }
101
+
102
+ .loader {
103
+ min-width: 976px;
104
+
105
+ &-spinner {
106
+ position: absolute;
107
+ top: 50%;
108
+ left: 50%;
109
+ z-index: 4;
110
+ }
111
+ }
112
+ </style>
113
+
114
+ <style lang="scss" module>
115
+ .sheet-dialog {
116
+ :global(.q-dialog__inner--minimized) {
117
+ padding: 0;
118
+ }
119
+ }
120
+ </style>
@@ -1,148 +1,148 @@
1
- <template>
2
- <q-expansion-item
3
- v-if="item.items"
4
- :model-value="isRouteActive(item) && expand"
5
- header-class="text-purple"
6
- :class="[$style['menu-item'], { 'expansion-item-active': isRouteActive(item) && minify }]"
7
- :data-test="`sidebar-expansion-item-${(item.name || 'unnamed').toLowerCase().replace(/\s+/g, '-')}`"
8
- @update:model-value="expand = $event"
9
- >
10
- <template #header>
11
- <q-tooltip
12
- v-if="minify"
13
- :delay="100"
14
- transition-show="jump-right"
15
- transition-hide="jump-left"
16
- anchor="center right"
17
- self="center left"
18
- >
19
- {{ item.label }}
20
- </q-tooltip>
21
-
22
- <q-item-section v-if="item.icon" avatar>
23
- <app-icon :name="item.icon" color="white" size="24px" />
24
- </q-item-section>
25
-
26
- <q-item-section :class="$style['menu-item__label']">{{ item.label }}</q-item-section>
27
- </template>
28
-
29
- <sidebar-menu-item
30
- v-for="(subItem, index) in item.items"
31
- :key="index"
32
- :item="subItem"
33
- :main="main"
34
- :is-route-active="isRouteActive"
35
- />
36
- </q-expansion-item>
37
- <q-item
38
- v-else-if="item.name !== 'sign-out'"
39
- v-ripple
40
- :class="$style['menu-item']"
41
- :active="isRouteActive(item)"
42
- active-class="menu-active"
43
- clickable
44
- :to="main ? item.to : ''"
45
- :data-test="`sidebar-item-${item.name.toLowerCase().replace(/\s+/g, '-')}`"
46
- @click="goToRoute(item.to)"
47
- >
48
- <q-item-section v-if="item.icon" avatar>
49
- <app-icon :name="item.icon" color="white" size="24px" />
50
- </q-item-section>
51
-
52
- <q-item-section :class="$style['menu-item__label']">
53
- <p>{{ item.label }}</p>
54
- </q-item-section>
55
- <q-tooltip
56
- :delay="100"
57
- transition-show="jump-right"
58
- transition-hide="jump-left"
59
- anchor="center right"
60
- self="center left"
61
- >
62
- {{ item.label }}
63
- </q-tooltip>
64
- </q-item>
65
- </template>
66
-
67
- <script lang="ts" setup>
68
- import { defineProps, ref } from 'vue'
69
- import AppIcon from '@/common/app-icon/AppIcon.vue'
70
-
71
- interface Props {
72
- minify?: boolean
73
- main: boolean
74
- isRouteActive: (item: any) => boolean
75
- item: {
76
- name: string
77
- label: string
78
- icon: string
79
- href: string
80
- to: string
81
- items: any[]
82
- }
83
- }
84
-
85
- const emits = defineEmits(['goToRoute'])
86
- const props = defineProps<Props>()
87
-
88
- const expand = ref(true)
89
-
90
- const goToRoute = (to: string) => {
91
- if (!props.main) window.location.href = to
92
- }
93
- </script>
94
-
95
- <style lang="scss" scoped>
96
- .expansion-item-active {
97
- background: rgba(243, 249, 253, 0.1);
98
- border-radius: 10px;
99
- }
100
- </style>
101
-
102
- <style lang="scss" module>
103
- .menu-item {
104
- margin: 0 8px;
105
- &:global(.menu-active) {
106
- border-radius: 10px;
107
- background: rgba(243, 249, 253, 0.1);
108
- }
109
- :global(.q-item__section--avatar) {
110
- min-width: 24px;
111
- padding-right: 14px;
112
- }
113
-
114
- :global(.q-expansion-item__content .q-item) {
115
- padding-left: 20px;
116
- }
117
- :global(.q-item__section--main ~ .q-item__section--side) {
118
- color: white;
119
- }
120
- &__label {
121
- color: #fff;
122
- font-family: 'Nunito Sans', sans-serif;
123
- font-size: 16px;
124
- font-weight: 300;
125
- p {
126
- display: inline-block;
127
- max-width: 160px;
128
- white-space: nowrap;
129
- overflow: hidden;
130
- text-overflow: ellipsis;
131
- margin: 0;
132
- }
133
- }
134
- }
135
-
136
- @media (max-width: 1440px) {
137
- .menu-item {
138
- margin: 0 4px;
139
- :global(.q-item__section--avatar) {
140
- min-width: 24px;
141
- padding-right: 10px;
142
- }
143
- &__label {
144
- font-size: 14px;
145
- }
146
- }
147
- }
148
- </style>
1
+ <template>
2
+ <q-expansion-item
3
+ v-if="item.items"
4
+ :model-value="isRouteActive(item) && expand"
5
+ header-class="text-purple"
6
+ :class="[$style['menu-item'], { 'expansion-item-active': isRouteActive(item) && minify }]"
7
+ :data-test="`sidebar-expansion-item-${(item.name || 'unnamed').toLowerCase().replace(/\s+/g, '-')}`"
8
+ @update:model-value="expand = $event"
9
+ >
10
+ <template #header>
11
+ <q-tooltip
12
+ v-if="minify"
13
+ :delay="100"
14
+ transition-show="jump-right"
15
+ transition-hide="jump-left"
16
+ anchor="center right"
17
+ self="center left"
18
+ >
19
+ {{ item.label }}
20
+ </q-tooltip>
21
+
22
+ <q-item-section v-if="item.icon" avatar>
23
+ <app-icon :name="item.icon" color="white" size="24px" />
24
+ </q-item-section>
25
+
26
+ <q-item-section :class="$style['menu-item__label']">{{ item.label }}</q-item-section>
27
+ </template>
28
+
29
+ <sidebar-menu-item
30
+ v-for="(subItem, index) in item.items"
31
+ :key="index"
32
+ :item="subItem"
33
+ :main="main"
34
+ :is-route-active="isRouteActive"
35
+ />
36
+ </q-expansion-item>
37
+ <q-item
38
+ v-else-if="item.name !== 'sign-out'"
39
+ v-ripple
40
+ :class="$style['menu-item']"
41
+ :active="isRouteActive(item)"
42
+ active-class="menu-active"
43
+ clickable
44
+ :to="main ? item.to : ''"
45
+ :data-test="`sidebar-item-${item.name.toLowerCase().replace(/\s+/g, '-')}`"
46
+ @click="goToRoute(item.to)"
47
+ >
48
+ <q-item-section v-if="item.icon" avatar>
49
+ <app-icon :name="item.icon" color="white" size="24px" />
50
+ </q-item-section>
51
+
52
+ <q-item-section :class="$style['menu-item__label']">
53
+ <p>{{ item.label }}</p>
54
+ </q-item-section>
55
+ <q-tooltip
56
+ :delay="100"
57
+ transition-show="jump-right"
58
+ transition-hide="jump-left"
59
+ anchor="center right"
60
+ self="center left"
61
+ >
62
+ {{ item.label }}
63
+ </q-tooltip>
64
+ </q-item>
65
+ </template>
66
+
67
+ <script lang="ts" setup>
68
+ import { defineProps, ref } from 'vue'
69
+ import AppIcon from '@/common/app-icon/AppIcon.vue'
70
+
71
+ interface Props {
72
+ minify?: boolean
73
+ main: boolean
74
+ isRouteActive: (item: any) => boolean
75
+ item: {
76
+ name: string
77
+ label: string
78
+ icon: string
79
+ href: string
80
+ to: string
81
+ items: any[]
82
+ }
83
+ }
84
+
85
+ const emits = defineEmits(['goToRoute'])
86
+ const props = defineProps<Props>()
87
+
88
+ const expand = ref(true)
89
+
90
+ const goToRoute = (to: string) => {
91
+ if (!props.main) window.location.href = to
92
+ }
93
+ </script>
94
+
95
+ <style lang="scss" scoped>
96
+ .expansion-item-active {
97
+ background: rgba(243, 249, 253, 0.1);
98
+ border-radius: 10px;
99
+ }
100
+ </style>
101
+
102
+ <style lang="scss" module>
103
+ .menu-item {
104
+ margin: 0 8px;
105
+ &:global(.menu-active) {
106
+ border-radius: 10px;
107
+ background: rgba(243, 249, 253, 0.1);
108
+ }
109
+ :global(.q-item__section--avatar) {
110
+ min-width: 24px;
111
+ padding-right: 14px;
112
+ }
113
+
114
+ :global(.q-expansion-item__content .q-item) {
115
+ padding-left: 20px;
116
+ }
117
+ :global(.q-item__section--main ~ .q-item__section--side) {
118
+ color: white;
119
+ }
120
+ &__label {
121
+ color: #fff;
122
+ font-family: 'Nunito Sans', sans-serif;
123
+ font-size: 16px;
124
+ font-weight: 300;
125
+ p {
126
+ display: inline-block;
127
+ max-width: 160px;
128
+ white-space: nowrap;
129
+ overflow: hidden;
130
+ text-overflow: ellipsis;
131
+ margin: 0;
132
+ }
133
+ }
134
+ }
135
+
136
+ @media (max-width: 1440px) {
137
+ .menu-item {
138
+ margin: 0 4px;
139
+ :global(.q-item__section--avatar) {
140
+ min-width: 24px;
141
+ padding-right: 10px;
142
+ }
143
+ &__label {
144
+ font-size: 14px;
145
+ }
146
+ }
147
+ }
148
+ </style>