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,99 +1,99 @@
1
- <template>
2
- <q-dialog ref="dialogRef" persistent transition-show="slide-up" transition-hide="slide-down" :class="$style.dialog">
3
- <q-card :class="$style.modal">
4
- <q-card-section :class="$style['modal__content']">
5
- <div :class="$style['modal__content__header']">
6
- <safety-icon v-if="type === 'edit'" />
7
- <remove-icon v-if="type === 'delete'" />
8
- </div>
9
- <p>{{ content }}</p>
10
- </q-card-section>
11
- <q-card-section :class="$style.footer">
12
- <app-button :class="$style['footer__btn--ok']" label="Подтвердить" @click="onDialogOK" />
13
- <app-button :class="$style['footer__btn--cancel']" label="Отменить" @click="onDialogHide" />
14
- </q-card-section>
15
- </q-card>
16
- </q-dialog>
17
- </template>
18
-
19
- <script setup lang="ts">
20
- import { useDialogPluginComponent } from 'quasar'
21
- import AppButton from '@/common/app-button/AppButton.vue'
22
- import SafetyIcon from '@/icons/dialogs/SafetyIcon.vue'
23
- import RemoveIcon from '@/icons/dialogs/RemoveIcon.vue'
24
-
25
- const { onDialogHide, onDialogOK, dialogRef } = useDialogPluginComponent()
26
-
27
- interface Props {
28
- content: string
29
- type: 'delete' | 'edit'
30
- }
31
-
32
- const props = defineProps<Props>()
33
- </script>
34
-
35
- <style lang="scss" module>
36
- .modal {
37
- font-family: NunitoSansFont, sans-serif;
38
- display: flex;
39
- flex-direction: column;
40
- width: 400px;
41
- border-radius: 8px !important;
42
- justify-content: space-between;
43
- &__content {
44
- margin: 0 auto;
45
- padding: 0;
46
- flex-grow: 1;
47
- &__header {
48
- width: 100%;
49
- display: flex;
50
- align-items: center;
51
- justify-content: center;
52
- flex-direction: column;
53
- gap: 16px;
54
- padding-top: 18px;
55
- h4 {
56
- font-size: 24px;
57
- font-weight: 600;
58
- }
59
- }
60
- }
61
- p {
62
- margin: 0;
63
- font-size: 16px;
64
- text-align: center;
65
- padding: 18px;
66
- }
67
- }
68
-
69
- .footer {
70
- display: flex;
71
- gap: 12px;
72
- align-items: center;
73
- justify-content: center;
74
- border-radius: 0px 0px 2px 2px;
75
- background: #F4F9FD;
76
- padding: 18px 12px;
77
- &__btn--ok,
78
- &__btn--cancel {
79
- background-color: #3f8cff;
80
- border-radius: 4px;
81
- color: white;
82
- font-size: 16px;
83
- font-weight: bold;
84
- width: 165px;
85
- height: 48px;
86
- cursor: pointer;
87
- span {
88
- color: white;
89
- }
90
- }
91
- &__btn--cancel {
92
- background-color: white;
93
- border: 1px solid #3f8cff;
94
- span {
95
- color: #3f8cff;
96
- }
97
- }
98
- }
99
- </style>
1
+ <template>
2
+ <q-dialog ref="dialogRef" persistent transition-show="slide-up" transition-hide="slide-down" :class="$style.dialog">
3
+ <q-card :class="$style.modal">
4
+ <q-card-section :class="$style['modal__content']">
5
+ <div :class="$style['modal__content__header']">
6
+ <safety-icon v-if="type === 'edit'" />
7
+ <remove-icon v-if="type === 'delete'" />
8
+ </div>
9
+ <p>{{ content }}</p>
10
+ </q-card-section>
11
+ <q-card-section :class="$style.footer">
12
+ <app-button :class="$style['footer__btn--ok']" label="Подтвердить" @click="onDialogOK" />
13
+ <app-button :class="$style['footer__btn--cancel']" label="Отменить" @click="onDialogHide" />
14
+ </q-card-section>
15
+ </q-card>
16
+ </q-dialog>
17
+ </template>
18
+
19
+ <script setup lang="ts">
20
+ import { useDialogPluginComponent } from 'quasar'
21
+ import AppButton from '@/common/app-button/AppButton.vue'
22
+ import SafetyIcon from '@/icons/dialogs/SafetyIcon.vue'
23
+ import RemoveIcon from '@/icons/dialogs/RemoveIcon.vue'
24
+
25
+ const { onDialogHide, onDialogOK, dialogRef } = useDialogPluginComponent()
26
+
27
+ interface Props {
28
+ content: string
29
+ type: 'delete' | 'edit'
30
+ }
31
+
32
+ const props = defineProps<Props>()
33
+ </script>
34
+
35
+ <style lang="scss" module>
36
+ .modal {
37
+ font-family: NunitoSansFont, sans-serif;
38
+ display: flex;
39
+ flex-direction: column;
40
+ width: 400px;
41
+ border-radius: 8px !important;
42
+ justify-content: space-between;
43
+ &__content {
44
+ margin: 0 auto;
45
+ padding: 0;
46
+ flex-grow: 1;
47
+ &__header {
48
+ width: 100%;
49
+ display: flex;
50
+ align-items: center;
51
+ justify-content: center;
52
+ flex-direction: column;
53
+ gap: 16px;
54
+ padding-top: 18px;
55
+ h4 {
56
+ font-size: 24px;
57
+ font-weight: 600;
58
+ }
59
+ }
60
+ }
61
+ p {
62
+ margin: 0;
63
+ font-size: 16px;
64
+ text-align: center;
65
+ padding: 18px;
66
+ }
67
+ }
68
+
69
+ .footer {
70
+ display: flex;
71
+ gap: 12px;
72
+ align-items: center;
73
+ justify-content: center;
74
+ border-radius: 0px 0px 2px 2px;
75
+ background: #F4F9FD;
76
+ padding: 18px 12px;
77
+ &__btn--ok,
78
+ &__btn--cancel {
79
+ background-color: #3f8cff;
80
+ border-radius: 4px;
81
+ color: white;
82
+ font-size: 16px;
83
+ font-weight: bold;
84
+ width: 165px;
85
+ height: 48px;
86
+ cursor: pointer;
87
+ span {
88
+ color: white;
89
+ }
90
+ }
91
+ &__btn--cancel {
92
+ background-color: white;
93
+ border: 1px solid #3f8cff;
94
+ span {
95
+ color: #3f8cff;
96
+ }
97
+ }
98
+ }
99
+ </style>
@@ -1,31 +1,31 @@
1
- <template>
2
- <q-btn-dropdown :color="color" :content-style="{ width: width || '200px', minWidth: height || '200px' }">
3
- <template #label>
4
- <slot name="label">
5
- {{ label }}
6
- </slot>
7
- </template>
8
- <template #default>
9
- <slot name="content" />
10
- </template>
11
- </q-btn-dropdown>
12
- </template>
13
-
14
- <script setup lang="ts">
15
- interface Props {
16
- label?: string
17
- color?: string
18
- width?: number
19
- height?: number
20
- }
21
-
22
- const props = defineProps<Props>()
23
- </script>
24
-
25
- <style scoped lang="scss">
26
- .q-btn {
27
- &:before {
28
- box-shadow: none;
29
- }
30
- }
31
- </style>
1
+ <template>
2
+ <q-btn-dropdown :color="color" :content-style="{ width: width || '200px', minWidth: height || '200px' }">
3
+ <template #label>
4
+ <slot name="label">
5
+ {{ label }}
6
+ </slot>
7
+ </template>
8
+ <template #default>
9
+ <slot name="content" />
10
+ </template>
11
+ </q-btn-dropdown>
12
+ </template>
13
+
14
+ <script setup lang="ts">
15
+ interface Props {
16
+ label?: string
17
+ color?: string
18
+ width?: number
19
+ height?: number
20
+ }
21
+
22
+ const props = defineProps<Props>()
23
+ </script>
24
+
25
+ <style scoped lang="scss">
26
+ .q-btn {
27
+ &:before {
28
+ box-shadow: none;
29
+ }
30
+ }
31
+ </style>
@@ -1,157 +1,157 @@
1
- <template>
2
- <q-select
3
- ref="select"
4
- v-model="selected"
5
- :options="filteredOptions"
6
- :option-value="optionValue"
7
- :option-label="optionLabel"
8
- emit-value
9
- map-options
10
- :disable="isDisabled"
11
- :multiple="multiple"
12
- outlined
13
- stack-label
14
- :use-input="search"
15
- :class="[$style.select]"
16
- :label="label"
17
- input-debounce="100"
18
- :popup-content-class="$style['app-select__menu']"
19
- :clearable="clearable"
20
- rounded
21
- autocomplete=""
22
- @filter="filterFn"
23
- >
24
- <template v-if="multiple" #selected-item="scope">
25
- <q-chip
26
- v-if="scope.opt"
27
- removable
28
- class="q-ma-none"
29
- dense
30
- :tabindex="scope.tabindex"
31
- color="white"
32
- text-color="secondary"
33
- @remove="scope.removeAtIndex(scope.index)"
34
- >
35
- {{ scope.opt[`${optionLabel}`] }}
36
- </q-chip>
37
- </template>
38
- <template #no-option>
39
- <q-item>{{ emptyText }}</q-item>
40
- </template>
41
- <q-item v-if="!lcText && type()">{{ placeholder }}</q-item>
42
- </q-select>
43
- </template>
44
- <script setup lang="ts">
45
- import { computed, defineEmits, defineProps, ref, Ref } from 'vue'
46
-
47
- import { QSelect } from 'quasar'
48
-
49
- type Option = Record<string, any>
50
-
51
- interface AppQSelectProps {
52
- modelValue: any
53
- options: Option[]
54
- placeholder: string
55
- emptyText: string
56
- optionLabel?: string
57
- optionValue?: string
58
- label?: string
59
- multiple?: boolean
60
- borderColor: string
61
- isDisabled?: boolean
62
- clearable?: boolean
63
- search?: boolean
64
- }
65
-
66
- const props = defineProps<AppQSelectProps>()
67
- const select = ref({})
68
- const emit = defineEmits(['update:modelValue'])
69
- const selected = computed({
70
- get() {
71
- return props.modelValue
72
- },
73
- set(value) {
74
- emit('update:modelValue', value)
75
- },
76
- })
77
-
78
- const type = () => {
79
- if (Array.isArray(selected.value) && !selected.value.length) return true
80
- return typeof selected.value === 'string' && !selected.value
81
- }
82
-
83
- const lcText: Ref<string> = ref('')
84
- const filteredOptions = computed(() => {
85
- return props.options.filter(x => x[props?.optionLabel || 'label'].toLowerCase().includes(lcText.value))
86
- })
87
-
88
- function filterFn(val: string, update: (arg0: () => void) => void) {
89
- update(() => {
90
- lcText.value = val.toLowerCase()
91
- })
92
- }
93
- </script>
94
- <style module lang="scss">
95
- .wrap {
96
- position: relative;
97
-
98
- &:global(.--option-tree) {
99
- cursor: pointer;
100
- }
101
- }
102
-
103
- .select {
104
- &:global(.q-field--outlined.q-field--rounded .q-field__control) {
105
- border-radius: 14px;
106
- }
107
- &:global(.q-field--outlined .q-field__control:before) {
108
- border-color: v-bind(borderColor);
109
- }
110
- &:global(.q-select .q-field__input) {
111
- padding: 0 6px;
112
- }
113
- //&:global(.q-field--filled .q-field__control) {
114
- // //color: red;
115
- //}
116
- //&:global(.q-field--filled.q-field--focused .q-field__control) {
117
- //}
118
- //&:global(.q-field--filled .q-field__control:after) {
119
- // left: 8px;
120
- // right: 8px;
121
- //}
122
- &:global(.q-field--outlined .q-item) {
123
- color: #1d1d1d;
124
- position: absolute;
125
- padding: 0 4px;
126
- top: 18px;
127
- left: 0;
128
- }
129
- }
130
-
131
- .append-wrapper {
132
- display: flex;
133
- align-items: center;
134
- column-gap: 4px;
135
- }
136
-
137
- .menu-wrap {
138
- padding: 8px;
139
- }
140
-
141
- .search-wrapper {
142
- position: sticky;
143
- top: 0;
144
- padding: 4px;
145
- background: var(--main-bg);
146
- z-index: 1;
147
- }
148
- .app-select__menu {
149
- border-radius: 14px;
150
- .q-item__label {
151
- word-break: break-word;
152
- }
153
- &:global(.q-menu) {
154
- max-height: 200px !important;
155
- }
156
- }
157
- </style>
1
+ <template>
2
+ <q-select
3
+ ref="select"
4
+ v-model="selected"
5
+ :options="filteredOptions"
6
+ :option-value="optionValue"
7
+ :option-label="optionLabel"
8
+ emit-value
9
+ map-options
10
+ :disable="isDisabled"
11
+ :multiple="multiple"
12
+ outlined
13
+ stack-label
14
+ :use-input="search"
15
+ :class="[$style.select]"
16
+ :label="label"
17
+ input-debounce="100"
18
+ :popup-content-class="$style['app-select__menu']"
19
+ :clearable="clearable"
20
+ rounded
21
+ autocomplete=""
22
+ @filter="filterFn"
23
+ >
24
+ <template v-if="multiple" #selected-item="scope">
25
+ <q-chip
26
+ v-if="scope.opt"
27
+ removable
28
+ class="q-ma-none"
29
+ dense
30
+ :tabindex="scope.tabindex"
31
+ color="white"
32
+ text-color="secondary"
33
+ @remove="scope.removeAtIndex(scope.index)"
34
+ >
35
+ {{ scope.opt[`${optionLabel}`] }}
36
+ </q-chip>
37
+ </template>
38
+ <template #no-option>
39
+ <q-item>{{ emptyText }}</q-item>
40
+ </template>
41
+ <q-item v-if="!lcText && type()">{{ placeholder }}</q-item>
42
+ </q-select>
43
+ </template>
44
+ <script setup lang="ts">
45
+ import { computed, defineEmits, defineProps, ref, Ref } from 'vue'
46
+
47
+ import { QSelect } from 'quasar'
48
+
49
+ type Option = Record<string, any>
50
+
51
+ interface AppQSelectProps {
52
+ modelValue: any
53
+ options: Option[]
54
+ placeholder: string
55
+ emptyText: string
56
+ optionLabel?: string
57
+ optionValue?: string
58
+ label?: string
59
+ multiple?: boolean
60
+ borderColor: string
61
+ isDisabled?: boolean
62
+ clearable?: boolean
63
+ search?: boolean
64
+ }
65
+
66
+ const props = defineProps<AppQSelectProps>()
67
+ const select = ref({})
68
+ const emit = defineEmits(['update:modelValue'])
69
+ const selected = computed({
70
+ get() {
71
+ return props.modelValue
72
+ },
73
+ set(value) {
74
+ emit('update:modelValue', value)
75
+ },
76
+ })
77
+
78
+ const type = () => {
79
+ if (Array.isArray(selected.value) && !selected.value.length) return true
80
+ return typeof selected.value === 'string' && !selected.value
81
+ }
82
+
83
+ const lcText: Ref<string> = ref('')
84
+ const filteredOptions = computed(() => {
85
+ return props.options.filter(x => x[props?.optionLabel || 'label'].toLowerCase().includes(lcText.value))
86
+ })
87
+
88
+ function filterFn(val: string, update: (arg0: () => void) => void) {
89
+ update(() => {
90
+ lcText.value = val.toLowerCase()
91
+ })
92
+ }
93
+ </script>
94
+ <style module lang="scss">
95
+ .wrap {
96
+ position: relative;
97
+
98
+ &:global(.--option-tree) {
99
+ cursor: pointer;
100
+ }
101
+ }
102
+
103
+ .select {
104
+ &:global(.q-field--outlined.q-field--rounded .q-field__control) {
105
+ border-radius: 14px;
106
+ }
107
+ &:global(.q-field--outlined .q-field__control:before) {
108
+ border-color: v-bind(borderColor);
109
+ }
110
+ &:global(.q-select .q-field__input) {
111
+ padding: 0 6px;
112
+ }
113
+ //&:global(.q-field--filled .q-field__control) {
114
+ // //color: red;
115
+ //}
116
+ //&:global(.q-field--filled.q-field--focused .q-field__control) {
117
+ //}
118
+ //&:global(.q-field--filled .q-field__control:after) {
119
+ // left: 8px;
120
+ // right: 8px;
121
+ //}
122
+ &:global(.q-field--outlined .q-item) {
123
+ color: #1d1d1d;
124
+ position: absolute;
125
+ padding: 0 4px;
126
+ top: 18px;
127
+ left: 0;
128
+ }
129
+ }
130
+
131
+ .append-wrapper {
132
+ display: flex;
133
+ align-items: center;
134
+ column-gap: 4px;
135
+ }
136
+
137
+ .menu-wrap {
138
+ padding: 8px;
139
+ }
140
+
141
+ .search-wrapper {
142
+ position: sticky;
143
+ top: 0;
144
+ padding: 4px;
145
+ background: var(--main-bg);
146
+ z-index: 1;
147
+ }
148
+ .app-select__menu {
149
+ border-radius: 14px;
150
+ .q-item__label {
151
+ word-break: break-word;
152
+ }
153
+ &:global(.q-menu) {
154
+ max-height: 200px !important;
155
+ }
156
+ }
157
+ </style>