shared-ritm 1.0.86 → 1.0.88
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 +7284 -5456
- package/dist/shared-ritm.umd.js +7 -7
- package/dist/types/api/services/ProjectsService.d.ts +1 -2
- package/dist/types/index.d.ts +10 -7
- package/package.json +1 -1
- package/src/api/services/ProjectsService.ts +2 -2
- package/src/common/app-button/AppButton.vue +18 -2
- package/src/common/app-checkbox/AppCheckbox.vue +26 -0
- package/src/common/app-date-picker/AppDatePicker.vue +66 -0
- package/src/common/app-input/AppInput.vue +17 -2
- package/src/common/app-sheet/AppSheet.vue +111 -89
- package/src/index.ts +23 -10
- /package/src/common/app-toggle/{index.vue → AppToggle.vue} +0 -0
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import ApiService, { ResponseApi } from '@/api/settings/ApiService';
|
|
2
|
-
import { Api_Tasks_Task_Dto } from '@/api/types/Api_Tasks';
|
|
3
2
|
import { Api_Project_Dto } from '@/api/types/Api_Projects';
|
|
4
3
|
declare class ProjectsService extends ApiService {
|
|
5
|
-
fetchProjectById(id: string): Promise<ResponseApi<
|
|
4
|
+
fetchProjectById(id: string): Promise<ResponseApi<Api_Project_Dto>>;
|
|
6
5
|
createProject(params: any): Promise<ResponseApi<any>>;
|
|
7
6
|
editProject(id: string, params: any): Promise<ResponseApi<any>>;
|
|
8
7
|
fetchProjects(params: any): Promise<ResponseApi<Api_Project_Dto[]>>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import AppButton from '@/common/app-button/AppButton.vue';
|
|
2
|
-
import
|
|
2
|
+
import AppCheckbox from '@/common/app-checkbox/AppCheckbox.vue';
|
|
3
|
+
import AppDatePicker from '@/common/app-date-picker/AppDatePicker.vue';
|
|
3
4
|
import AppInput from '@/common/app-input/AppInput.vue';
|
|
4
|
-
import
|
|
5
|
+
import AppInputSearch from '@/common/app-input-search/AppInputSearch.vue';
|
|
5
6
|
import AppLayout from '@/common/app-layout/AppLayout.vue';
|
|
6
|
-
import AppSelect from '@/common/app-select/AppSelect.vue';
|
|
7
|
-
import AppWrapper from '@/common/app-wrapper/AppWrapper.vue';
|
|
8
|
-
import AppSidebar from '@/common/app-sidebar/AppSidebar.vue';
|
|
9
7
|
import AppLayoutHeader from '@/common/app-layout/components/AppLayoutHeader.vue';
|
|
10
8
|
import AppLoader from '@/common/app-loader/index.vue';
|
|
9
|
+
import AppSelect from '@/common/app-select/AppSelect.vue';
|
|
11
10
|
import AppSheet from '@/common/app-sheet/AppSheet.vue';
|
|
11
|
+
import AppSidebar from '@/common/app-sidebar/AppSidebar.vue';
|
|
12
|
+
import AppToggle from '@/common/app-toggle/AppToggle.vue';
|
|
13
|
+
import AppWrapper from '@/common/app-wrapper/AppWrapper.vue';
|
|
12
14
|
import useGanttService from '@/api/services/GanttService';
|
|
13
15
|
import useMetricsService from '@/api/services/MetricsService';
|
|
14
16
|
import useProjectsService from '@/api/services/ProjectsService';
|
|
15
17
|
import useRepairsService from '@/api/services/RepairsService';
|
|
16
18
|
import useTasksService from '@/api/services/TasksService';
|
|
19
|
+
import useAuthService from '@/api/services/AuthService';
|
|
17
20
|
import ApiService from '@/api/settings/ApiService';
|
|
18
|
-
export { AppButton,
|
|
19
|
-
export { ApiService, useGanttService, useMetricsService, useProjectsService, useRepairsService, useTasksService };
|
|
21
|
+
export { AppButton, AppCheckbox, AppDatePicker, AppInput, AppInputSearch, AppLayout, AppLayoutHeader, AppLoader, AppSelect, AppSheet, AppSidebar, AppToggle, AppWrapper, };
|
|
22
|
+
export { ApiService, useAuthService, useGanttService, useMetricsService, useProjectsService, useRepairsService, useTasksService, };
|
|
20
23
|
export * from '@/api/types/Api_Tasks';
|
|
21
24
|
export * from '@/api/types/Api_Repairs';
|
|
22
25
|
export * from '@/api/types/Api_Projects';
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import ApiService, { ResponseApi } from '@/api/settings/ApiService'
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
import { Api_Project_Dto } from '@/api/types/Api_Projects'
|
|
4
4
|
|
|
5
5
|
class ProjectsService extends ApiService {
|
|
6
|
-
public async fetchProjectById(id: string): Promise<ResponseApi<
|
|
6
|
+
public async fetchProjectById(id: string): Promise<ResponseApi<Api_Project_Dto>> {
|
|
7
7
|
return this.get(`/projects/${id}`)
|
|
8
8
|
}
|
|
9
9
|
|
|
@@ -75,9 +75,19 @@ interface Props extends QBtnProps {
|
|
|
75
75
|
badgeColor?: string
|
|
76
76
|
badgeInline?: boolean
|
|
77
77
|
link?: boolean
|
|
78
|
+
borderColor?: string
|
|
79
|
+
borderRadius?: string
|
|
80
|
+
borderWidth?: string
|
|
81
|
+
width?: string
|
|
82
|
+
height?: string
|
|
78
83
|
}
|
|
79
84
|
|
|
80
|
-
const props = defineProps<Props>()
|
|
85
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
86
|
+
borderRadius: '16px',
|
|
87
|
+
borderWidth: '1px',
|
|
88
|
+
width: 'auto',
|
|
89
|
+
height: 'auto',
|
|
90
|
+
})
|
|
81
91
|
|
|
82
92
|
const emit = defineEmits(['update:modelValue', 'click'])
|
|
83
93
|
|
|
@@ -117,14 +127,20 @@ const isDisabled = computed(() => {
|
|
|
117
127
|
<style lang="scss" module>
|
|
118
128
|
.wrapper {
|
|
119
129
|
flex: 0 0 auto;
|
|
130
|
+
width: v-bind(width);
|
|
131
|
+
height: v-bind(height);
|
|
120
132
|
&:global(.q-btn--rounded) {
|
|
121
|
-
border-radius:
|
|
133
|
+
border-radius: v-bind(borderRadius);
|
|
134
|
+
}
|
|
135
|
+
&:global(.q-btn--outline:before) {
|
|
136
|
+
border-width: v-bind(borderWidth);
|
|
122
137
|
}
|
|
123
138
|
&:global(.q-btn) {
|
|
124
139
|
color: #0a1629;
|
|
125
140
|
font-size: 16px;
|
|
126
141
|
font-style: normal;
|
|
127
142
|
font-weight: 700;
|
|
143
|
+
font-family: NunitoSansFont, sans-serif;
|
|
128
144
|
}
|
|
129
145
|
|
|
130
146
|
&:global(.--loading) {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<q-checkbox :class="$style['app-checkbox']" v-model="value" />
|
|
3
|
+
</template>
|
|
4
|
+
<script setup lang="ts">
|
|
5
|
+
import { computed } from 'vue'
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
modelValue: any
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const props = defineProps<Props>()
|
|
12
|
+
const emit = defineEmits(['update:modelValue', 'number'])
|
|
13
|
+
|
|
14
|
+
const value = computed({
|
|
15
|
+
get: () => props.modelValue,
|
|
16
|
+
set: (newValue: any) => emit('update:modelValue', newValue),
|
|
17
|
+
})
|
|
18
|
+
</script>
|
|
19
|
+
<style module lang="scss">
|
|
20
|
+
.app-checkbox {
|
|
21
|
+
:global(.q-checkbox__bg) {
|
|
22
|
+
border-radius: 6px;
|
|
23
|
+
border-color: white;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
</style>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="date-picker">
|
|
3
|
+
<app-button
|
|
4
|
+
class="button"
|
|
5
|
+
outline
|
|
6
|
+
size="20px"
|
|
7
|
+
padding="10px"
|
|
8
|
+
border-radius="8px"
|
|
9
|
+
border-width="2px"
|
|
10
|
+
rounded
|
|
11
|
+
text-color="primary"
|
|
12
|
+
icon="event"
|
|
13
|
+
>
|
|
14
|
+
<q-popup-proxy anchor="top left" self="top left" transition-show="scale-up" transition-hide="scale-down">
|
|
15
|
+
<q-date mask="YYYY-MM-DD" v-model="model" minimal />
|
|
16
|
+
</q-popup-proxy>
|
|
17
|
+
</app-button>
|
|
18
|
+
<div class="date-picker__content">
|
|
19
|
+
<p>{{ label }}<span> * </span></p>
|
|
20
|
+
<span>{{ model || 'Выберите дату' }}</span>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script setup lang="ts">
|
|
26
|
+
import { computed } from 'vue'
|
|
27
|
+
import AppButton from '@/common/app-button/AppButton.vue'
|
|
28
|
+
|
|
29
|
+
interface Props {
|
|
30
|
+
label: string
|
|
31
|
+
modelValue: string
|
|
32
|
+
}
|
|
33
|
+
const emits = defineEmits(['update:modelValue'])
|
|
34
|
+
const props = defineProps<Props>()
|
|
35
|
+
|
|
36
|
+
const model = computed({
|
|
37
|
+
get() {
|
|
38
|
+
return props.modelValue
|
|
39
|
+
},
|
|
40
|
+
set(value: string) {
|
|
41
|
+
emits('update:modelValue', value)
|
|
42
|
+
},
|
|
43
|
+
})
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<style scoped lang="scss">
|
|
47
|
+
.date-picker {
|
|
48
|
+
display: flex;
|
|
49
|
+
gap: 14px;
|
|
50
|
+
&__content {
|
|
51
|
+
color: #7d8592;
|
|
52
|
+
font-weight: 500;
|
|
53
|
+
p {
|
|
54
|
+
margin: 0;
|
|
55
|
+
font-weight: 700;
|
|
56
|
+
span {
|
|
57
|
+
color: red;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
span {
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
.button {
|
|
65
|
+
}
|
|
66
|
+
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<q-input
|
|
3
3
|
v-model="value"
|
|
4
|
-
:class="inputClasses"
|
|
4
|
+
:class="[inputClasses, $style['app-input']]"
|
|
5
5
|
standout
|
|
6
6
|
outlined
|
|
7
7
|
dense
|
|
@@ -91,6 +91,11 @@ interface AppInputProps extends AppQInputProps {
|
|
|
91
91
|
withIcon?: boolean
|
|
92
92
|
withButton?: boolean
|
|
93
93
|
withArrow?: boolean
|
|
94
|
+
borderColor?: string
|
|
95
|
+
borderRadius?: string
|
|
96
|
+
borderWidth?: string
|
|
97
|
+
width?: string
|
|
98
|
+
height?: string
|
|
94
99
|
}
|
|
95
100
|
|
|
96
101
|
const props = withDefaults(defineProps<AppInputProps>(), {
|
|
@@ -98,6 +103,10 @@ const props = withDefaults(defineProps<AppInputProps>(), {
|
|
|
98
103
|
outlined: true,
|
|
99
104
|
error: undefined,
|
|
100
105
|
modelValue: '',
|
|
106
|
+
borderRadius: '8px',
|
|
107
|
+
borderWidth: '1px',
|
|
108
|
+
width: 'auto',
|
|
109
|
+
height: 'auto',
|
|
101
110
|
})
|
|
102
111
|
|
|
103
112
|
const emit = defineEmits(['update:modelValue', 'button-click', 'clear', 'focus', 'blur', 'click'])
|
|
@@ -125,4 +134,10 @@ const inputClasses = computed(() => {
|
|
|
125
134
|
})
|
|
126
135
|
</script>
|
|
127
136
|
|
|
128
|
-
<style
|
|
137
|
+
<style module lang="scss">
|
|
138
|
+
.app-input {
|
|
139
|
+
&:global(.q-field--dense .q-field__control) {
|
|
140
|
+
height: v-bind(height);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
</style>
|
|
@@ -1,89 +1,111 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<q-dialog
|
|
3
|
-
ref="DialogRef"
|
|
4
|
-
:model-value="true"
|
|
5
|
-
:position="'right'"
|
|
6
|
-
:class="$style['sheet-dialog']"
|
|
7
|
-
full-height
|
|
8
|
-
full-width
|
|
9
|
-
>
|
|
10
|
-
<
|
|
11
|
-
<
|
|
12
|
-
<div class="
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
</
|
|
25
|
-
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<q-dialog
|
|
3
|
+
ref="DialogRef"
|
|
4
|
+
:model-value="true"
|
|
5
|
+
:position="'right'"
|
|
6
|
+
:class="$style['sheet-dialog']"
|
|
7
|
+
full-height
|
|
8
|
+
full-width
|
|
9
|
+
>
|
|
10
|
+
<template v-if="type === 'details'">
|
|
11
|
+
<q-card>
|
|
12
|
+
<div class="wrapper">
|
|
13
|
+
<div class="sheet-header">
|
|
14
|
+
<h2>{{ title }}</h2>
|
|
15
|
+
<div class="close-button">
|
|
16
|
+
<q-btn v-close-popup dense flat icon="close" />
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
<div v-if="loading" class="loader">
|
|
20
|
+
<q-spinner-audio v-if="loading" class="loader-spinner" size="md" :thickness="3" color="primary" />
|
|
21
|
+
</div>
|
|
22
|
+
<slot v-else />
|
|
23
|
+
</div>
|
|
24
|
+
</q-card>
|
|
25
|
+
</template>
|
|
26
|
+
<template v-if="type === 'custom'">
|
|
27
|
+
<div class="custom-wrapper" v-if="loading">
|
|
28
|
+
<div class="loader">
|
|
29
|
+
<q-spinner-audio v-if="loading" class="loader-spinner" size="md" :thickness="3" color="primary" />
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
<slot v-else />
|
|
33
|
+
</template>
|
|
34
|
+
</q-dialog>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<script setup lang="ts">
|
|
38
|
+
import { computed, defineEmits, defineProps, ref, withDefaults } from 'vue'
|
|
39
|
+
|
|
40
|
+
interface DialogProps {
|
|
41
|
+
dialogRef: any
|
|
42
|
+
loading?: boolean
|
|
43
|
+
title?: string
|
|
44
|
+
width?: string
|
|
45
|
+
type?: 'details' | 'custom'
|
|
46
|
+
tabs?: any[]
|
|
47
|
+
currentTabName?: string
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const props = withDefaults(defineProps<DialogProps>(), {
|
|
51
|
+
width: '976px',
|
|
52
|
+
type: 'details',
|
|
53
|
+
loading: false,
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
const emit = defineEmits(['update:dialogRef', 'update:currentTabName'])
|
|
57
|
+
|
|
58
|
+
const DialogRef = computed({
|
|
59
|
+
get() {
|
|
60
|
+
return props.dialogRef
|
|
61
|
+
},
|
|
62
|
+
set(value) {
|
|
63
|
+
emit('update:dialogRef', value)
|
|
64
|
+
},
|
|
65
|
+
})
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<style lang="scss" scoped>
|
|
69
|
+
.custom-wrapper {
|
|
70
|
+
width: v-bind(width);
|
|
71
|
+
background-color: white;
|
|
72
|
+
}
|
|
73
|
+
.wrapper {
|
|
74
|
+
display: flex;
|
|
75
|
+
flex-direction: column;
|
|
76
|
+
gap: 1rem;
|
|
77
|
+
width: v-bind(width);
|
|
78
|
+
height: 100vh;
|
|
79
|
+
min-height: 100vh;
|
|
80
|
+
position: relative;
|
|
81
|
+
padding: 2rem 2rem 4rem 2rem;
|
|
82
|
+
background-color: #7991ad32;
|
|
83
|
+
font-family: 'NunitoSansFont', sans-serif;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.sheet-header {
|
|
87
|
+
display: flex;
|
|
88
|
+
justify-content: space-between;
|
|
89
|
+
align-items: center;
|
|
90
|
+
h2 {
|
|
91
|
+
font-size: 36px;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
.loader {
|
|
95
|
+
min-width: 976px;
|
|
96
|
+
&-spinner {
|
|
97
|
+
position: absolute;
|
|
98
|
+
top: 50%;
|
|
99
|
+
left: 50%;
|
|
100
|
+
z-index: 4;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
</style>
|
|
104
|
+
|
|
105
|
+
<style lang="scss" module>
|
|
106
|
+
.sheet-dialog {
|
|
107
|
+
:global(.q-dialog__inner--minimized) {
|
|
108
|
+
padding: 0;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
</style>
|
package/src/index.ts
CHANGED
|
@@ -1,37 +1,50 @@
|
|
|
1
1
|
import AppButton from '@/common/app-button/AppButton.vue'
|
|
2
|
-
import
|
|
2
|
+
import AppCheckbox from '@/common/app-checkbox/AppCheckbox.vue'
|
|
3
|
+
import AppDatePicker from '@/common/app-date-picker/AppDatePicker.vue'
|
|
3
4
|
import AppInput from '@/common/app-input/AppInput.vue'
|
|
4
|
-
import
|
|
5
|
+
import AppInputSearch from '@/common/app-input-search/AppInputSearch.vue'
|
|
5
6
|
import AppLayout from '@/common/app-layout/AppLayout.vue'
|
|
6
|
-
import AppSelect from '@/common/app-select/AppSelect.vue'
|
|
7
|
-
import AppWrapper from '@/common/app-wrapper/AppWrapper.vue'
|
|
8
|
-
import AppSidebar from '@/common/app-sidebar/AppSidebar.vue'
|
|
9
7
|
import AppLayoutHeader from '@/common/app-layout/components/AppLayoutHeader.vue'
|
|
10
8
|
import AppLoader from '@/common/app-loader/index.vue'
|
|
9
|
+
import AppSelect from '@/common/app-select/AppSelect.vue'
|
|
11
10
|
import AppSheet from '@/common/app-sheet/AppSheet.vue'
|
|
11
|
+
import AppSidebar from '@/common/app-sidebar/AppSidebar.vue'
|
|
12
|
+
import AppToggle from '@/common/app-toggle/AppToggle.vue'
|
|
13
|
+
import AppWrapper from '@/common/app-wrapper/AppWrapper.vue'
|
|
12
14
|
|
|
13
15
|
import useGanttService from '@/api/services/GanttService'
|
|
14
16
|
import useMetricsService from '@/api/services/MetricsService'
|
|
15
17
|
import useProjectsService from '@/api/services/ProjectsService'
|
|
16
18
|
import useRepairsService from '@/api/services/RepairsService'
|
|
17
19
|
import useTasksService from '@/api/services/TasksService'
|
|
20
|
+
import useAuthService from '@/api/services/AuthService'
|
|
18
21
|
import ApiService from '@/api/settings/ApiService'
|
|
19
22
|
|
|
20
23
|
export {
|
|
21
24
|
AppButton,
|
|
25
|
+
AppCheckbox,
|
|
26
|
+
AppDatePicker,
|
|
22
27
|
AppInput,
|
|
23
|
-
AppToggle,
|
|
24
28
|
AppInputSearch,
|
|
25
29
|
AppLayout,
|
|
26
|
-
AppSelect,
|
|
27
|
-
AppWrapper,
|
|
28
|
-
AppSidebar,
|
|
29
30
|
AppLayoutHeader,
|
|
30
31
|
AppLoader,
|
|
32
|
+
AppSelect,
|
|
31
33
|
AppSheet,
|
|
34
|
+
AppSidebar,
|
|
35
|
+
AppToggle,
|
|
36
|
+
AppWrapper,
|
|
32
37
|
}
|
|
33
38
|
|
|
34
|
-
export {
|
|
39
|
+
export {
|
|
40
|
+
ApiService,
|
|
41
|
+
useAuthService,
|
|
42
|
+
useGanttService,
|
|
43
|
+
useMetricsService,
|
|
44
|
+
useProjectsService,
|
|
45
|
+
useRepairsService,
|
|
46
|
+
useTasksService,
|
|
47
|
+
}
|
|
35
48
|
|
|
36
49
|
export * from '@/api/types/Api_Tasks'
|
|
37
50
|
export * from '@/api/types/Api_Repairs'
|
|
File without changes
|