shared-ritm 1.0.50 → 1.0.52

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 (39) hide show
  1. package/README.md +93 -0
  2. package/dist/index.css +1 -1
  3. package/dist/shared-ritm.es.js +1104 -1135
  4. package/dist/shared-ritm.umd.js +7 -7
  5. package/dist/types/api/services/ProjectsService.d.ts +0 -10
  6. package/dist/types/index.d.ts +1 -2
  7. package/package.json +56 -56
  8. package/src/App.vue +2404 -2404
  9. package/src/api/services/AuthService.ts +37 -37
  10. package/src/api/services/GanttService.ts +17 -17
  11. package/src/api/services/MetricsService.ts +74 -74
  12. package/src/api/services/ProjectsService.ts +15 -56
  13. package/src/api/services/RepairsService.ts +82 -82
  14. package/src/api/services/TasksService.ts +15 -15
  15. package/src/api/settings/ApiService.ts +124 -124
  16. package/src/api/types/Api_Repairs.ts +57 -57
  17. package/src/api/types/Api_Tasks.ts +99 -99
  18. package/src/common/app-icon/AppIcon.vue +104 -104
  19. package/src/common/app-input/AppInput.vue +128 -128
  20. package/src/common/app-input-search/AppInputSearch.vue +168 -170
  21. package/src/common/app-layout/AppLayout.vue +61 -62
  22. package/src/common/app-layout/components/AppLayoutHeader.vue +119 -119
  23. package/src/common/app-loader/index.vue +41 -43
  24. package/src/common/app-page-layout/AppPageLayout.vue +122 -122
  25. package/src/common/app-select/AppSelect.vue +154 -154
  26. package/src/common/app-sidebar/AppSidebar.vue +163 -163
  27. package/src/common/app-sidebar/components/SidebarMenu.vue +27 -27
  28. package/src/common/app-sidebar/components/SidebarMenuItem.vue +134 -134
  29. package/src/common/app-toggle/index.vue +23 -23
  30. package/src/common/app-wrapper/AppWrapper.vue +25 -25
  31. package/src/global.d.ts +1 -1
  32. package/src/icons/sidebar/projects-icon.vue +31 -31
  33. package/src/icons/sidebar/tasks_tasks-icon.vue +39 -39
  34. package/src/icons/sidebar/tasks_today-icon.vue +27 -27
  35. package/src/index.ts +34 -35
  36. package/src/main.ts +15 -15
  37. package/src/quasar-user-options.ts +17 -17
  38. package/src/shared/styles/general.css +77 -77
  39. package/src/shims-vue.d.ts +5 -5
@@ -1,154 +1,154 @@
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
15
- :class="[$style.select]"
16
- :label="label"
17
- input-debounce="100"
18
- :popup-content-class="$style['app-select__menu']"
19
- rounded
20
- autocomplete=""
21
- @filter="filterFn"
22
- >
23
- <template v-if="multiple" #selected-item="scope">
24
- <q-chip
25
- v-if="scope.opt"
26
- removable
27
- class="q-ma-none"
28
- dense
29
- :tabindex="scope.tabindex"
30
- color="white"
31
- text-color="secondary"
32
- @remove="scope.removeAtIndex(scope.index)"
33
- >
34
- {{ scope.opt[`${optionLabel}`] }}
35
- </q-chip>
36
- </template>
37
- <template #no-option>
38
- <q-item>{{ emptyText }}</q-item>
39
- </template>
40
- <q-item v-if="!lcText && type()">{{ placeholder }}</q-item>
41
- </q-select>
42
- </template>
43
- <script setup lang="ts">
44
- import { computed, defineEmits, defineProps, ref, Ref } from 'vue'
45
-
46
- import { QSelect } from 'quasar'
47
-
48
- type Option = Record<string, any>
49
-
50
- interface AppQSelectProps {
51
- modelValue: any
52
- options: Option[]
53
- placeholder: string
54
- emptyText: string
55
- optionLabel?: string
56
- optionValue?: string
57
- label?: string
58
- multiple?: boolean
59
- borderColor: string
60
- isDisabled?: boolean
61
- }
62
-
63
- const props = defineProps<AppQSelectProps>()
64
- const select = ref({})
65
- const emit = defineEmits(['update:modelValue'])
66
- const selected = computed({
67
- get() {
68
- return props.modelValue
69
- },
70
- set(value) {
71
- emit('update:modelValue', value)
72
- },
73
- })
74
-
75
- const type = () => {
76
- if (Array.isArray(selected.value) && !selected.value.length) return true
77
- return typeof selected.value === 'string' && !selected.value
78
- }
79
-
80
- const lcText: Ref<string> = ref('')
81
- const filteredOptions = computed(() => {
82
- return props.options.filter(x => x[props?.optionLabel || 'label'].toLowerCase().includes(lcText.value))
83
- })
84
-
85
- function filterFn(val: string, update: (arg0: () => void) => void) {
86
- update(() => {
87
- lcText.value = val.toLowerCase()
88
- })
89
- }
90
- </script>
91
- <style module lang="scss">
92
- .wrap {
93
- position: relative;
94
-
95
- &:global(.--option-tree) {
96
- cursor: pointer;
97
- }
98
- }
99
-
100
- .select {
101
- &:global(.q-field--outlined.q-field--rounded .q-field__control) {
102
- border-radius: 14px;
103
- }
104
- &:global(.q-field--outlined .q-field__control:before) {
105
- border-color: v-bind(borderColor);
106
- }
107
- &:global(.q-select .q-field__input) {
108
- padding: 0 6px;
109
- }
110
- //&:global(.q-field--filled .q-field__control) {
111
- // //color: red;
112
- //}
113
- //&:global(.q-field--filled.q-field--focused .q-field__control) {
114
- //}
115
- //&:global(.q-field--filled .q-field__control:after) {
116
- // left: 8px;
117
- // right: 8px;
118
- //}
119
- &:global(.q-field--outlined .q-item) {
120
- color: #1d1d1d;
121
- position: absolute;
122
- padding: 0 4px;
123
- top: 18px;
124
- left: 0;
125
- }
126
- }
127
-
128
- .append-wrapper {
129
- display: flex;
130
- align-items: center;
131
- column-gap: 4px;
132
- }
133
-
134
- .menu-wrap {
135
- padding: 8px;
136
- }
137
-
138
- .search-wrapper {
139
- position: sticky;
140
- top: 0;
141
- padding: 4px;
142
- background: var(--main-bg);
143
- z-index: 1;
144
- }
145
- .app-select__menu {
146
- border-radius: 14px;
147
- .q-item__label {
148
- word-break: break-word;
149
- }
150
- &:global(.q-menu) {
151
- max-height: 200px !important;
152
- }
153
- }
154
- </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
15
+ :class="[$style.select]"
16
+ :label="label"
17
+ input-debounce="100"
18
+ :popup-content-class="$style['app-select__menu']"
19
+ rounded
20
+ autocomplete=""
21
+ @filter="filterFn"
22
+ >
23
+ <template v-if="multiple" #selected-item="scope">
24
+ <q-chip
25
+ v-if="scope.opt"
26
+ removable
27
+ class="q-ma-none"
28
+ dense
29
+ :tabindex="scope.tabindex"
30
+ color="white"
31
+ text-color="secondary"
32
+ @remove="scope.removeAtIndex(scope.index)"
33
+ >
34
+ {{ scope.opt[`${optionLabel}`] }}
35
+ </q-chip>
36
+ </template>
37
+ <template #no-option>
38
+ <q-item>{{ emptyText }}</q-item>
39
+ </template>
40
+ <q-item v-if="!lcText && type()">{{ placeholder }}</q-item>
41
+ </q-select>
42
+ </template>
43
+ <script setup lang="ts">
44
+ import { computed, defineEmits, defineProps, ref, Ref } from 'vue'
45
+
46
+ import { QSelect } from 'quasar'
47
+
48
+ type Option = Record<string, any>
49
+
50
+ interface AppQSelectProps {
51
+ modelValue: any
52
+ options: Option[]
53
+ placeholder: string
54
+ emptyText: string
55
+ optionLabel?: string
56
+ optionValue?: string
57
+ label?: string
58
+ multiple?: boolean
59
+ borderColor: string
60
+ isDisabled?: boolean
61
+ }
62
+
63
+ const props = defineProps<AppQSelectProps>()
64
+ const select = ref({})
65
+ const emit = defineEmits(['update:modelValue'])
66
+ const selected = computed({
67
+ get() {
68
+ return props.modelValue
69
+ },
70
+ set(value) {
71
+ emit('update:modelValue', value)
72
+ },
73
+ })
74
+
75
+ const type = () => {
76
+ if (Array.isArray(selected.value) && !selected.value.length) return true
77
+ return typeof selected.value === 'string' && !selected.value
78
+ }
79
+
80
+ const lcText: Ref<string> = ref('')
81
+ const filteredOptions = computed(() => {
82
+ return props.options.filter(x => x[props?.optionLabel || 'label'].toLowerCase().includes(lcText.value))
83
+ })
84
+
85
+ function filterFn(val: string, update: (arg0: () => void) => void) {
86
+ update(() => {
87
+ lcText.value = val.toLowerCase()
88
+ })
89
+ }
90
+ </script>
91
+ <style module lang="scss">
92
+ .wrap {
93
+ position: relative;
94
+
95
+ &:global(.--option-tree) {
96
+ cursor: pointer;
97
+ }
98
+ }
99
+
100
+ .select {
101
+ &:global(.q-field--outlined.q-field--rounded .q-field__control) {
102
+ border-radius: 14px;
103
+ }
104
+ &:global(.q-field--outlined .q-field__control:before) {
105
+ border-color: v-bind(borderColor);
106
+ }
107
+ &:global(.q-select .q-field__input) {
108
+ padding: 0 6px;
109
+ }
110
+ //&:global(.q-field--filled .q-field__control) {
111
+ // //color: red;
112
+ //}
113
+ //&:global(.q-field--filled.q-field--focused .q-field__control) {
114
+ //}
115
+ //&:global(.q-field--filled .q-field__control:after) {
116
+ // left: 8px;
117
+ // right: 8px;
118
+ //}
119
+ &:global(.q-field--outlined .q-item) {
120
+ color: #1d1d1d;
121
+ position: absolute;
122
+ padding: 0 4px;
123
+ top: 18px;
124
+ left: 0;
125
+ }
126
+ }
127
+
128
+ .append-wrapper {
129
+ display: flex;
130
+ align-items: center;
131
+ column-gap: 4px;
132
+ }
133
+
134
+ .menu-wrap {
135
+ padding: 8px;
136
+ }
137
+
138
+ .search-wrapper {
139
+ position: sticky;
140
+ top: 0;
141
+ padding: 4px;
142
+ background: var(--main-bg);
143
+ z-index: 1;
144
+ }
145
+ .app-select__menu {
146
+ border-radius: 14px;
147
+ .q-item__label {
148
+ word-break: break-word;
149
+ }
150
+ &:global(.q-menu) {
151
+ max-height: 200px !important;
152
+ }
153
+ }
154
+ </style>
@@ -1,163 +1,163 @@
1
- <template>
2
- <q-drawer
3
- :key="`${drawer}`"
4
- v-model="drawer"
5
- :class="$style.drawer"
6
- :mini="isSidebarMini"
7
- :overlay="!isFixSidebar"
8
- :width="drawerWidth"
9
- :mini-width="drawerMiniWidth"
10
- :breakpoint="960"
11
- show-if-above
12
- @mouseover="toggleSidebarMini(false)"
13
- @mouseout="toggleSidebarMini(true)"
14
- >
15
- <template v-if="isTablet">
16
- <q-item :class="$style['tablet-logo']">
17
- <q-item-section avatar>
18
- <q-btn
19
- round
20
- unelevated
21
- :class="$style['tablet-logo__btn']"
22
- :icon="tabletLogoBtn"
23
- @click="openDrawerIsTablet()"
24
- />
25
- </q-item-section>
26
- <q-item-section :class="$style['logo__text']">РИТМ</q-item-section>
27
- </q-item>
28
- </template>
29
- <template v-else>
30
- <q-item :class="$style.logo">
31
- <q-item-section avatar>
32
- <app-icon name="logo-icon" />
33
- </q-item-section>
34
- <q-item-section :class="$style['logo__text']">РИТМ</q-item-section>
35
- </q-item>
36
- <q-btn
37
- dense
38
- round
39
- unelevated
40
- class="q-mini-drawer-hide"
41
- :class="$style['minify-btn']"
42
- icon="chevron_left"
43
- @click="isFixSidebar = !isFixSidebar"
44
- >
45
- <q-tooltip>Закрепить сайдбар</q-tooltip>
46
- </q-btn>
47
- </template>
48
- <sidebar-menu :menu-items="menuItems" :minify="isSidebarMini" />
49
- <q-item v-ripple :class="$style['menu-exit']" clickable @click="logout()">
50
- <q-item-section avatar>
51
- <app-icon :name="'logout-icon'" color="white" size="24px" />
52
- </q-item-section>
53
- <q-item-section :class="$style['menu-exit__label']">Выход</q-item-section>
54
- </q-item>
55
- </q-drawer>
56
- </template>
57
-
58
- <script setup lang="ts">
59
- import { computed, defineProps, defineEmits, ref, watch } from 'vue'
60
- import SidebarMenu from './components/SidebarMenu.vue'
61
-
62
- import { useQuasar } from 'quasar'
63
- import AppIcon from '@/common/app-icon/AppIcon.vue'
64
-
65
- interface Props {
66
- isDrawer: boolean
67
- minify?: boolean
68
- menuItems?: any[]
69
- }
70
- const emits = defineEmits(['logout'])
71
- const props = defineProps<Props>()
72
- const $q = useQuasar()
73
-
74
- const drawer = ref(true)
75
- const isSidebarMini = ref(true)
76
- const isFixSidebar = ref(false)
77
-
78
- const isTablet = computed(() => $q.screen.lt.lg)
79
- const tabletLogoBtn = computed(() => (isSidebarMini.value ? 'menu' : 'close'))
80
- const drawerWidth = computed(() => (isTablet.value ? 250 : 275))
81
- const drawerMiniWidth = computed(() => (isTablet.value ? 47 : 72))
82
-
83
- function toggleSidebarMini(value: boolean): void {
84
- if (!isFixSidebar.value && !isTablet.value) isSidebarMini.value = value
85
- }
86
-
87
- function openDrawerIsTablet() {
88
- isFixSidebar.value = !isFixSidebar.value
89
- isSidebarMini.value = !isSidebarMini.value
90
- }
91
-
92
- function logout(): void {
93
- emits('logout')
94
- }
95
-
96
- watch(
97
- () => isTablet.value,
98
- (value: boolean) => {
99
- isFixSidebar.value = value
100
- },
101
- )
102
- </script>
103
-
104
- <style lang="scss" module>
105
- .drawer {
106
- display: flex;
107
- flex-direction: column;
108
- height: 100vh;
109
- background: linear-gradient(184deg, #0b3f8e 9.62%, #5386d3 59.23%, #5386d3 91.63%);
110
- border-right: 1px solid #e4e6e8;
111
- &::-webkit-scrollbar {
112
- height: 4px;
113
- width: 4px;
114
- }
115
- &::-webkit-scrollbar-thumb {
116
- width: 4px;
117
- height: 4px;
118
- }
119
- }
120
- .logo {
121
- display: flex;
122
- justify-content: center;
123
- margin: 24px 0;
124
- &__text {
125
- color: white;
126
- font-size: 20px;
127
- font-weight: 700;
128
- }
129
- }
130
- .tablet-logo {
131
- border-bottom: 1px solid white;
132
- &__btn {
133
- color: white;
134
- }
135
- }
136
-
137
- .minify-btn {
138
- background: #0b3f8e;
139
- color: white;
140
- position: absolute;
141
- top: 25px;
142
- right: -17px;
143
-
144
- &:global(.--mini) {
145
- :global(.q-icon) {
146
- transform: rotate(180deg);
147
- }
148
- }
149
- }
150
-
151
- .menu-exit {
152
- border-top: 1px solid white;
153
- :global(.q-item__section--avatar) {
154
- min-width: 24px;
155
- }
156
- &__label {
157
- color: #fff;
158
- font-family: 'Nunito Sans', sans-serif;
159
- font-size: 16px;
160
- font-weight: 300;
161
- }
162
- }
163
- </style>
1
+ <template>
2
+ <q-drawer
3
+ :key="`${drawer}`"
4
+ v-model="drawer"
5
+ :class="$style.drawer"
6
+ :mini="isSidebarMini"
7
+ :overlay="!isFixSidebar"
8
+ :width="drawerWidth"
9
+ :mini-width="drawerMiniWidth"
10
+ :breakpoint="960"
11
+ show-if-above
12
+ @mouseover="toggleSidebarMini(false)"
13
+ @mouseout="toggleSidebarMini(true)"
14
+ >
15
+ <template v-if="isTablet">
16
+ <q-item :class="$style['tablet-logo']">
17
+ <q-item-section avatar>
18
+ <q-btn
19
+ round
20
+ unelevated
21
+ :class="$style['tablet-logo__btn']"
22
+ :icon="tabletLogoBtn"
23
+ @click="openDrawerIsTablet()"
24
+ />
25
+ </q-item-section>
26
+ <q-item-section :class="$style['logo__text']">РИТМ</q-item-section>
27
+ </q-item>
28
+ </template>
29
+ <template v-else>
30
+ <q-item :class="$style.logo">
31
+ <q-item-section avatar>
32
+ <app-icon name="logo-icon" />
33
+ </q-item-section>
34
+ <q-item-section :class="$style['logo__text']">РИТМ</q-item-section>
35
+ </q-item>
36
+ <q-btn
37
+ dense
38
+ round
39
+ unelevated
40
+ class="q-mini-drawer-hide"
41
+ :class="$style['minify-btn']"
42
+ icon="chevron_left"
43
+ @click="isFixSidebar = !isFixSidebar"
44
+ >
45
+ <q-tooltip>Закрепить сайдбар</q-tooltip>
46
+ </q-btn>
47
+ </template>
48
+ <sidebar-menu :menu-items="menuItems" :minify="isSidebarMini" />
49
+ <q-item v-ripple :class="$style['menu-exit']" clickable @click="logout()">
50
+ <q-item-section avatar>
51
+ <app-icon :name="'logout-icon'" color="white" size="24px" />
52
+ </q-item-section>
53
+ <q-item-section :class="$style['menu-exit__label']">Выход</q-item-section>
54
+ </q-item>
55
+ </q-drawer>
56
+ </template>
57
+
58
+ <script setup lang="ts">
59
+ import { computed, defineProps, defineEmits, ref, watch } from 'vue'
60
+ import SidebarMenu from './components/SidebarMenu.vue'
61
+
62
+ import { useQuasar } from 'quasar'
63
+ import AppIcon from '@/common/app-icon/AppIcon.vue'
64
+
65
+ interface Props {
66
+ isDrawer: boolean
67
+ minify?: boolean
68
+ menuItems?: any[]
69
+ }
70
+ const emits = defineEmits(['logout'])
71
+ const props = defineProps<Props>()
72
+ const $q = useQuasar()
73
+
74
+ const drawer = ref(true)
75
+ const isSidebarMini = ref(true)
76
+ const isFixSidebar = ref(false)
77
+
78
+ const isTablet = computed(() => $q.screen.lt.lg)
79
+ const tabletLogoBtn = computed(() => (isSidebarMini.value ? 'menu' : 'close'))
80
+ const drawerWidth = computed(() => (isTablet.value ? 250 : 275))
81
+ const drawerMiniWidth = computed(() => (isTablet.value ? 47 : 72))
82
+
83
+ function toggleSidebarMini(value: boolean): void {
84
+ if (!isFixSidebar.value && !isTablet.value) isSidebarMini.value = value
85
+ }
86
+
87
+ function openDrawerIsTablet() {
88
+ isFixSidebar.value = !isFixSidebar.value
89
+ isSidebarMini.value = !isSidebarMini.value
90
+ }
91
+
92
+ function logout(): void {
93
+ emits('logout')
94
+ }
95
+
96
+ watch(
97
+ () => isTablet.value,
98
+ (value: boolean) => {
99
+ isFixSidebar.value = value
100
+ },
101
+ )
102
+ </script>
103
+
104
+ <style lang="scss" module>
105
+ .drawer {
106
+ display: flex;
107
+ flex-direction: column;
108
+ height: 100vh;
109
+ background: linear-gradient(184deg, #0b3f8e 9.62%, #5386d3 59.23%, #5386d3 91.63%);
110
+ border-right: 1px solid #e4e6e8;
111
+ &::-webkit-scrollbar {
112
+ height: 4px;
113
+ width: 4px;
114
+ }
115
+ &::-webkit-scrollbar-thumb {
116
+ width: 4px;
117
+ height: 4px;
118
+ }
119
+ }
120
+ .logo {
121
+ display: flex;
122
+ justify-content: center;
123
+ margin: 24px 0;
124
+ &__text {
125
+ color: white;
126
+ font-size: 20px;
127
+ font-weight: 700;
128
+ }
129
+ }
130
+ .tablet-logo {
131
+ border-bottom: 1px solid white;
132
+ &__btn {
133
+ color: white;
134
+ }
135
+ }
136
+
137
+ .minify-btn {
138
+ background: #0b3f8e;
139
+ color: white;
140
+ position: absolute;
141
+ top: 25px;
142
+ right: -17px;
143
+
144
+ &:global(.--mini) {
145
+ :global(.q-icon) {
146
+ transform: rotate(180deg);
147
+ }
148
+ }
149
+ }
150
+
151
+ .menu-exit {
152
+ border-top: 1px solid white;
153
+ :global(.q-item__section--avatar) {
154
+ min-width: 24px;
155
+ }
156
+ &__label {
157
+ color: #fff;
158
+ font-family: 'Nunito Sans', sans-serif;
159
+ font-size: 16px;
160
+ font-weight: 300;
161
+ }
162
+ }
163
+ </style>