shared-ritm 1.2.42 → 1.2.44
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/dist/index.css +1 -1
- package/dist/shared-ritm.es.js +349 -349
- package/dist/shared-ritm.umd.js +2 -2
- package/package.json +1 -1
- package/src/common/app-dialogs/AppConfirmDialog.vue +9 -10
- package/src/common/app-sidebar/components/SidebarMenuItem.vue +147 -146
- package/src/icons/dialogs/RemoveIcon.vue +1 -1
- package/src/icons/dialogs/SafetyIcon.vue +1 -1
package/package.json
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
<div :class="$style['modal__content__header']">
|
|
6
6
|
<safety-icon v-if="type === 'edit'" />
|
|
7
7
|
<remove-icon v-if="type === 'delete'" />
|
|
8
|
-
<h4>Подтвердить ?</h4>
|
|
9
8
|
</div>
|
|
10
9
|
<p>{{ content }}</p>
|
|
11
10
|
</q-card-section>
|
|
@@ -39,9 +38,8 @@ const props = defineProps<Props>()
|
|
|
39
38
|
display: flex;
|
|
40
39
|
flex-direction: column;
|
|
41
40
|
width: 400px;
|
|
42
|
-
border-radius:
|
|
41
|
+
border-radius: 8px !important;
|
|
43
42
|
justify-content: space-between;
|
|
44
|
-
padding: 40px;
|
|
45
43
|
&__content {
|
|
46
44
|
margin: 0 auto;
|
|
47
45
|
padding: 0;
|
|
@@ -53,6 +51,7 @@ const props = defineProps<Props>()
|
|
|
53
51
|
justify-content: center;
|
|
54
52
|
flex-direction: column;
|
|
55
53
|
gap: 16px;
|
|
54
|
+
padding-top: 18px;
|
|
56
55
|
h4 {
|
|
57
56
|
font-size: 24px;
|
|
58
57
|
font-weight: 600;
|
|
@@ -60,29 +59,29 @@ const props = defineProps<Props>()
|
|
|
60
59
|
}
|
|
61
60
|
}
|
|
62
61
|
p {
|
|
63
|
-
margin
|
|
64
|
-
margin-bottom: 30px;
|
|
62
|
+
margin: 0;
|
|
65
63
|
font-size: 16px;
|
|
66
64
|
text-align: center;
|
|
65
|
+
padding: 18px;
|
|
67
66
|
}
|
|
68
67
|
}
|
|
69
68
|
|
|
70
69
|
.footer {
|
|
71
70
|
display: flex;
|
|
72
|
-
flex-direction: column;
|
|
73
71
|
gap: 12px;
|
|
74
72
|
align-items: center;
|
|
75
73
|
justify-content: center;
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
border-radius: 0px 0px 2px 2px;
|
|
75
|
+
background: #F4F9FD;
|
|
76
|
+
padding: 18px 12px;
|
|
78
77
|
&__btn--ok,
|
|
79
78
|
&__btn--cancel {
|
|
80
79
|
background-color: #3f8cff;
|
|
81
|
-
border-radius:
|
|
80
|
+
border-radius: 4px;
|
|
82
81
|
color: white;
|
|
83
82
|
font-size: 16px;
|
|
84
83
|
font-weight: bold;
|
|
85
|
-
width:
|
|
84
|
+
width: 165px;
|
|
86
85
|
height: 48px;
|
|
87
86
|
cursor: pointer;
|
|
88
87
|
span {
|
|
@@ -1,146 +1,147 @@
|
|
|
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
|
-
@update:model-value="expand = $event"
|
|
8
|
-
>
|
|
9
|
-
<template #header>
|
|
10
|
-
<q-tooltip
|
|
11
|
-
v-if="minify"
|
|
12
|
-
:delay="100"
|
|
13
|
-
transition-show="jump-right"
|
|
14
|
-
transition-hide="jump-left"
|
|
15
|
-
anchor="center right"
|
|
16
|
-
self="center left"
|
|
17
|
-
>
|
|
18
|
-
{{ item.label }}
|
|
19
|
-
</q-tooltip>
|
|
20
|
-
|
|
21
|
-
<q-item-section v-if="item.icon" avatar>
|
|
22
|
-
<app-icon :name="item.icon" color="white" size="24px" />
|
|
23
|
-
</q-item-section>
|
|
24
|
-
|
|
25
|
-
<q-item-section :class="$style['menu-item__label']">{{ item.label }}</q-item-section>
|
|
26
|
-
</template>
|
|
27
|
-
|
|
28
|
-
<sidebar-menu-item
|
|
29
|
-
v-for="(subItem, index) in item.items"
|
|
30
|
-
:key="index"
|
|
31
|
-
:item="subItem"
|
|
32
|
-
:main="main"
|
|
33
|
-
:is-route-active="isRouteActive"
|
|
34
|
-
/>
|
|
35
|
-
</q-expansion-item>
|
|
36
|
-
<q-item
|
|
37
|
-
v-else-if="item.name !== 'sign-out'"
|
|
38
|
-
v-ripple
|
|
39
|
-
:class="$style['menu-item']"
|
|
40
|
-
:active="isRouteActive(item)"
|
|
41
|
-
active-class="menu-active"
|
|
42
|
-
clickable
|
|
43
|
-
:to="main ? item.to : ''"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
transition-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
</
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
import
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
item:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
font-
|
|
122
|
-
font-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
:
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}
|
|
146
|
-
|
|
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
|
+
@update:model-value="expand = $event"
|
|
8
|
+
>
|
|
9
|
+
<template #header>
|
|
10
|
+
<q-tooltip
|
|
11
|
+
v-if="minify"
|
|
12
|
+
:delay="100"
|
|
13
|
+
transition-show="jump-right"
|
|
14
|
+
transition-hide="jump-left"
|
|
15
|
+
anchor="center right"
|
|
16
|
+
self="center left"
|
|
17
|
+
>
|
|
18
|
+
{{ item.label }}
|
|
19
|
+
</q-tooltip>
|
|
20
|
+
|
|
21
|
+
<q-item-section v-if="item.icon" avatar>
|
|
22
|
+
<app-icon :name="item.icon" color="white" size="24px" />
|
|
23
|
+
</q-item-section>
|
|
24
|
+
|
|
25
|
+
<q-item-section :class="$style['menu-item__label']">{{ item.label }}</q-item-section>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<sidebar-menu-item
|
|
29
|
+
v-for="(subItem, index) in item.items"
|
|
30
|
+
:key="index"
|
|
31
|
+
:item="subItem"
|
|
32
|
+
:main="main"
|
|
33
|
+
:is-route-active="isRouteActive"
|
|
34
|
+
/>
|
|
35
|
+
</q-expansion-item>
|
|
36
|
+
<q-item
|
|
37
|
+
v-else-if="item.name !== 'sign-out'"
|
|
38
|
+
v-ripple
|
|
39
|
+
:class="$style['menu-item']"
|
|
40
|
+
:active="isRouteActive(item)"
|
|
41
|
+
active-class="menu-active"
|
|
42
|
+
clickable
|
|
43
|
+
:to="main ? item.to : ''"
|
|
44
|
+
:data-test="`sidebar-item-${item.label.toLowerCase().replace(/\s+/g, '-')}`"
|
|
45
|
+
@click="goToRoute(item.to)"
|
|
46
|
+
>
|
|
47
|
+
<q-item-section v-if="item.icon" avatar>
|
|
48
|
+
<app-icon :name="item.icon" color="white" size="24px" />
|
|
49
|
+
</q-item-section>
|
|
50
|
+
|
|
51
|
+
<q-item-section :class="$style['menu-item__label']">
|
|
52
|
+
<p>{{ item.label }}</p>
|
|
53
|
+
</q-item-section>
|
|
54
|
+
<q-tooltip
|
|
55
|
+
:delay="100"
|
|
56
|
+
transition-show="jump-right"
|
|
57
|
+
transition-hide="jump-left"
|
|
58
|
+
anchor="center right"
|
|
59
|
+
self="center left"
|
|
60
|
+
>
|
|
61
|
+
{{ item.label }}
|
|
62
|
+
</q-tooltip>
|
|
63
|
+
</q-item>
|
|
64
|
+
</template>
|
|
65
|
+
|
|
66
|
+
<script lang="ts" setup>
|
|
67
|
+
import { defineProps, ref } from 'vue'
|
|
68
|
+
import AppIcon from '@/common/app-icon/AppIcon.vue'
|
|
69
|
+
|
|
70
|
+
interface Props {
|
|
71
|
+
minify?: boolean
|
|
72
|
+
main: boolean
|
|
73
|
+
isRouteActive: (item: any) => boolean
|
|
74
|
+
item: {
|
|
75
|
+
name: string
|
|
76
|
+
label: string
|
|
77
|
+
icon: string
|
|
78
|
+
href: string
|
|
79
|
+
to: string
|
|
80
|
+
items: any[]
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const emits = defineEmits(['goToRoute'])
|
|
85
|
+
const props = defineProps<Props>()
|
|
86
|
+
|
|
87
|
+
const expand = ref(true)
|
|
88
|
+
|
|
89
|
+
const goToRoute = (to: string) => {
|
|
90
|
+
if (!props.main) window.location.href = to
|
|
91
|
+
}
|
|
92
|
+
</script>
|
|
93
|
+
|
|
94
|
+
<style lang="scss" scoped>
|
|
95
|
+
.expansion-item-active {
|
|
96
|
+
background: rgba(243, 249, 253, 0.1);
|
|
97
|
+
border-radius: 10px;
|
|
98
|
+
}
|
|
99
|
+
</style>
|
|
100
|
+
|
|
101
|
+
<style lang="scss" module>
|
|
102
|
+
.menu-item {
|
|
103
|
+
margin: 0 8px;
|
|
104
|
+
&:global(.menu-active) {
|
|
105
|
+
border-radius: 10px;
|
|
106
|
+
background: rgba(243, 249, 253, 0.1);
|
|
107
|
+
}
|
|
108
|
+
:global(.q-item__section--avatar) {
|
|
109
|
+
min-width: 24px;
|
|
110
|
+
padding-right: 14px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
:global(.q-expansion-item__content .q-item) {
|
|
114
|
+
padding-left: 20px;
|
|
115
|
+
}
|
|
116
|
+
:global(.q-item__section--main ~ .q-item__section--side) {
|
|
117
|
+
color: white;
|
|
118
|
+
}
|
|
119
|
+
&__label {
|
|
120
|
+
color: #fff;
|
|
121
|
+
font-family: 'Nunito Sans', sans-serif;
|
|
122
|
+
font-size: 16px;
|
|
123
|
+
font-weight: 300;
|
|
124
|
+
p {
|
|
125
|
+
display: inline-block;
|
|
126
|
+
max-width: 160px;
|
|
127
|
+
white-space: nowrap;
|
|
128
|
+
overflow: hidden;
|
|
129
|
+
text-overflow: ellipsis;
|
|
130
|
+
margin: 0;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@media (max-width: 1440px) {
|
|
136
|
+
.menu-item {
|
|
137
|
+
margin: 0 4px;
|
|
138
|
+
:global(.q-item__section--avatar) {
|
|
139
|
+
min-width: 24px;
|
|
140
|
+
padding-right: 10px;
|
|
141
|
+
}
|
|
142
|
+
&__label {
|
|
143
|
+
font-size: 14px;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
</style>
|