shared-ritm 1.0.87 → 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.
@@ -1,14 +1,16 @@
1
1
  import AppButton from '@/common/app-button/AppButton.vue';
2
- import AppInputSearch from '@/common/app-input-search/AppInputSearch.vue';
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 AppToggle from '@/common/app-toggle/index.vue';
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';
@@ -16,8 +18,8 @@ import useRepairsService from '@/api/services/RepairsService';
16
18
  import useTasksService from '@/api/services/TasksService';
17
19
  import useAuthService from '@/api/services/AuthService';
18
20
  import ApiService from '@/api/settings/ApiService';
19
- export { AppButton, AppInput, AppToggle, AppInputSearch, AppLayout, AppSelect, AppWrapper, AppSidebar, AppLayoutHeader, AppLoader, AppSheet, };
20
- export { ApiService, useGanttService, useMetricsService, useProjectsService, useRepairsService, useTasksService, useAuthService, };
21
+ export { AppButton, AppCheckbox, AppDatePicker, AppInput, AppInputSearch, AppLayout, AppLayoutHeader, AppLoader, AppSelect, AppSheet, AppSidebar, AppToggle, AppWrapper, };
22
+ export { ApiService, useAuthService, useGanttService, useMetricsService, useProjectsService, useRepairsService, useTasksService, };
21
23
  export * from '@/api/types/Api_Tasks';
22
24
  export * from '@/api/types/Api_Repairs';
23
25
  export * from '@/api/types/Api_Projects';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shared-ritm",
3
- "version": "1.0.87",
3
+ "version": "1.0.88",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -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: 14px;
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 scoped lang="scss"></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
- <q-card>
11
- <div class="wrapper">
12
- <div class="sheet-header">
13
- <h2>{{ title }}</h2>
14
- <div class="close-button"></div>
15
- <q-btn v-close-popup dense flat icon="close" />
16
- </div>
17
- <div v-if="loading" class="loader">
18
- <q-spinner-audio v-if="loading" class="loader-spiner" size="md" :thickness="3" color="primary" />
19
- </div>
20
- <slot v-else />
21
- </div>
22
- </q-card>
23
- </q-dialog>
24
- </template>
25
-
26
- <script setup lang="ts">
27
- import { computed, defineEmits, defineProps, withDefaults } from 'vue'
28
-
29
- interface DialogProps {
30
- dialogRef: any
31
- loading: boolean
32
- title: string
33
- width?: string
34
- }
35
-
36
- const props = withDefaults(defineProps<DialogProps>(), {
37
- width: '976px',
38
- })
39
-
40
- const emit = defineEmits(['update:dialogRef'])
41
-
42
- const DialogRef = computed({
43
- get() {
44
- return props.dialogRef
45
- },
46
- set(value) {
47
- emit('update:dialogRef', value)
48
- },
49
- })
50
- </script>
51
-
52
- <style lang="scss" scoped>
53
- .wrapper {
54
- display: flex;
55
- flex-direction: column;
56
- gap: 1rem;
57
- width: v-bind(width);
58
- height: 100vh;
59
- min-height: 100vh;
60
- position: relative;
61
- padding: 2rem 2rem 4rem 2rem;
62
- background-color: #7991ad32;
63
- font-family: 'NunitoSansFont', sans-serif !important;
64
- }
65
- .sheet-header {
66
- display: flex;
67
- justify-content: space-between;
68
- h2 {
69
- font-size: 36px;
70
- }
71
- }
72
- .loader {
73
- min-width: 976px;
74
- &-spiner {
75
- position: absolute;
76
- top: 50%;
77
- left: 50%;
78
- z-index: 4;
79
- }
80
- }
81
- </style>
82
-
83
- <style lang="scss" module>
84
- .sheet-dialog {
85
- :global(.q-dialog__inner--minimized) {
86
- padding: 0;
87
- }
88
- }
89
- </style>
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,14 +1,16 @@
1
1
  import AppButton from '@/common/app-button/AppButton.vue'
2
- import AppInputSearch from '@/common/app-input-search/AppInputSearch.vue'
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 AppToggle from '@/common/app-toggle/index.vue'
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'
@@ -20,26 +22,28 @@ import ApiService from '@/api/settings/ApiService'
20
22
 
21
23
  export {
22
24
  AppButton,
25
+ AppCheckbox,
26
+ AppDatePicker,
23
27
  AppInput,
24
- AppToggle,
25
28
  AppInputSearch,
26
29
  AppLayout,
27
- AppSelect,
28
- AppWrapper,
29
- AppSidebar,
30
30
  AppLayoutHeader,
31
31
  AppLoader,
32
+ AppSelect,
32
33
  AppSheet,
34
+ AppSidebar,
35
+ AppToggle,
36
+ AppWrapper,
33
37
  }
34
38
 
35
39
  export {
36
40
  ApiService,
41
+ useAuthService,
37
42
  useGanttService,
38
43
  useMetricsService,
39
44
  useProjectsService,
40
45
  useRepairsService,
41
46
  useTasksService,
42
- useAuthService,
43
47
  }
44
48
 
45
49
  export * from '@/api/types/Api_Tasks'