shared-ritm 1.1.70 → 1.1.72

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 (87) hide show
  1. package/README.md +103 -103
  2. package/dist/index.css +1 -1
  3. package/dist/shared-ritm.es.js +252 -243
  4. package/dist/shared-ritm.umd.js +3 -3
  5. package/dist/types/api/services/TasksService.d.ts +6 -1
  6. package/dist/types/api/types/Api_Tasks.d.ts +4 -0
  7. package/package.json +57 -57
  8. package/src/api/services/AuthService.ts +41 -41
  9. package/src/api/services/FileService.ts +15 -15
  10. package/src/api/services/GanttService.ts +17 -17
  11. package/src/api/services/MetricsService.ts +101 -101
  12. package/src/api/services/ProjectsService.ts +61 -61
  13. package/src/api/services/TasksService.ts +12 -0
  14. package/src/api/settings/ApiService.ts +125 -125
  15. package/src/api/types/Api_Files.ts +1 -1
  16. package/src/api/types/Api_Projects.ts +55 -55
  17. package/src/api/types/Api_Tasks.ts +155 -150
  18. package/src/common/app-button/AppButton.vue +173 -173
  19. package/src/common/app-checkbox/AppCheckbox.vue +26 -26
  20. package/src/common/app-date-picker/AppDatePicker.vue +74 -74
  21. package/src/common/app-dialogs/AppConfirmDialog.vue +100 -100
  22. package/src/common/app-dropdown/AppDropdown.vue +31 -31
  23. package/src/common/app-icon/AppIcon.vue +104 -104
  24. package/src/common/app-input/AppInput.vue +147 -147
  25. package/src/common/app-input-search/AppInputSearch.vue +170 -170
  26. package/src/common/app-layout/AppLayout.vue +63 -63
  27. package/src/common/app-layout/components/AppLayoutHeader.vue +123 -123
  28. package/src/common/app-loader/index.vue +43 -43
  29. package/src/common/app-page-layout/AppPageLayout.vue +122 -122
  30. package/src/common/app-select/AppSelect.vue +157 -157
  31. package/src/common/app-sheet/AppSheet.vue +114 -114
  32. package/src/common/app-sidebar/AppSidebar.vue +168 -168
  33. package/src/common/app-sidebar/components/SidebarMenu.vue +37 -37
  34. package/src/common/app-sidebar/components/SidebarMenuItem.vue +139 -139
  35. package/src/common/app-wrapper/AppWrapper.vue +28 -28
  36. package/src/global.d.ts +1 -1
  37. package/src/icons/components/arrow-down-icon.vue +25 -25
  38. package/src/icons/components/arrow-frame-icon.vue +19 -19
  39. package/src/icons/components/arrow-square.vue +22 -22
  40. package/src/icons/dialogs/RemoveIcon.vue +12 -12
  41. package/src/icons/dialogs/SafetyIcon.vue +12 -12
  42. package/src/icons/header/flashIcon.vue +24 -24
  43. package/src/icons/header/notificationIcon.vue +18 -18
  44. package/src/icons/header/searchStatusIcon.vue +24 -24
  45. package/src/icons/header/smallCapsIcon.vue +34 -34
  46. package/src/icons/sidebar/assign-module-icon.vue +36 -36
  47. package/src/icons/sidebar/instrument-history-icon.vue +32 -32
  48. package/src/icons/sidebar/instrument-order-icon.vue +38 -38
  49. package/src/icons/sidebar/instrument-work-zone-icon.vue +18 -18
  50. package/src/icons/sidebar/instruments-icon.vue +45 -45
  51. package/src/icons/sidebar/logo-icon.vue +15 -15
  52. package/src/icons/sidebar/logout-icon.vue +13 -13
  53. package/src/icons/sidebar/modules-icon.vue +16 -16
  54. package/src/icons/sidebar/notifications-icon.vue +24 -24
  55. package/src/icons/sidebar/order-icon.vue +44 -44
  56. package/src/icons/sidebar/pass-icon.vue +38 -38
  57. package/src/icons/sidebar/positions-icon.vue +42 -42
  58. package/src/icons/sidebar/preorder-icon.vue +19 -19
  59. package/src/icons/sidebar/projects-icon.vue +31 -31
  60. package/src/icons/sidebar/repair-object-icon.vue +18 -18
  61. package/src/icons/sidebar/repairs-icon.vue +20 -20
  62. package/src/icons/sidebar/roles-icon.vue +26 -26
  63. package/src/icons/sidebar/status-history-icon.vue +24 -24
  64. package/src/icons/sidebar/tasks-icon.vue +28 -28
  65. package/src/icons/sidebar/tasks_tasks-icon.vue +39 -39
  66. package/src/icons/sidebar/tasks_today-icon.vue +27 -27
  67. package/src/icons/sidebar/teams-icon.vue +32 -32
  68. package/src/icons/sidebar/user-icon.vue +18 -18
  69. package/src/icons/sidebar/users-icon.vue +46 -46
  70. package/src/icons/sidebar/videosources-icon.vue +19 -19
  71. package/src/icons/sidebar/videowall-icon.vue +13 -13
  72. package/src/icons/sidebar/videozones-icon.vue +21 -21
  73. package/src/icons/sidebar/warehouses-icon.vue +43 -43
  74. package/src/icons/sidebar/workshop-icon.vue +100 -100
  75. package/src/icons/sidebar/workzones-icon.vue +22 -22
  76. package/src/icons/task/attention-icon.vue +13 -13
  77. package/src/icons/task/clock-icon.vue +10 -10
  78. package/src/icons/task/delete-icon.vue +10 -10
  79. package/src/icons/task/fire-icon.vue +16 -16
  80. package/src/index.ts +62 -62
  81. package/src/main.ts +18 -18
  82. package/src/quasar-user-options.ts +17 -17
  83. package/src/router/index.ts +10 -10
  84. package/src/shared/styles/general.css +96 -96
  85. package/src/shims-vue.d.ts +5 -5
  86. package/src/utils/confirm.ts +12 -12
  87. package/src/utils/notification.ts +9 -9
@@ -1,147 +1,147 @@
1
- <template>
2
- <q-input
3
- v-model="value"
4
- :class="[inputClasses, $style['app-input']]"
5
- standout
6
- outlined
7
- dense
8
- :type="inputType"
9
- autocomplete="h87h58g7h8hd"
10
- :readonly="readonly || field"
11
- :disable="disabled"
12
- :placeholder="placeholder"
13
- >
14
- </q-input>
15
- </template>
16
-
17
- <script lang="ts" setup>
18
- import { defineProps, defineEmits, computed, ref, withDefaults } from 'vue'
19
-
20
- interface AppQInputProps {
21
- name?: string | undefined
22
- mask?: string | undefined
23
- fillMask?: boolean | string | undefined
24
- reverseFillMask?: boolean | undefined
25
- unmaskedValue?: boolean | undefined
26
- modelValue: string | number | null | undefined
27
- error?: boolean | undefined
28
- errorMessage?: string | undefined
29
- noErrorIcon?: boolean | undefined
30
- rules?: any | undefined
31
- reactiveRules?: boolean | undefined
32
- lazyRules?: boolean | 'ondemand' | undefined
33
- label?: string | undefined
34
- stackLabel?: boolean | undefined
35
- hint?: string | undefined
36
- hideHint?: boolean | undefined
37
- prefix?: string | undefined
38
- suffix?: string | undefined
39
- labelColor?: string | undefined
40
- color?: string | undefined
41
- bgColor?: string | undefined
42
- dark?: boolean | undefined
43
- loading?: boolean | undefined
44
- clearable?: boolean | undefined
45
- clearIcon?: string | undefined
46
- filled?: boolean | undefined
47
- outlined?: boolean | undefined
48
- borderless?: boolean | undefined
49
- standout?: boolean | string | undefined
50
- labelSlot?: boolean | undefined
51
- bottomSlots?: boolean | undefined
52
- hideBottomSpace?: boolean | undefined
53
- counter?: boolean | undefined
54
- rounded?: boolean | undefined
55
- square?: boolean | undefined
56
- dense?: boolean | undefined
57
- itemAligned?: boolean | undefined
58
- disable?: boolean | undefined
59
- readonly?: boolean | undefined
60
- autofocus?: boolean | undefined
61
- for?: string | undefined
62
- shadowText?: string | undefined
63
- type?:
64
- | 'text'
65
- | 'password'
66
- | 'textarea'
67
- | 'email'
68
- | 'search'
69
- | 'tel'
70
- | 'file'
71
- | 'number'
72
- | 'url'
73
- | 'time'
74
- | 'date'
75
- | undefined
76
- debounce?: string | number | undefined
77
- disabled?: boolean | undefined
78
- maxlength?: string | number | undefined
79
- autogrow?: boolean | undefined
80
- inputClass?: any | undefined
81
- inputStyle?: any | undefined
82
- onClear?: (value: any) => void
83
- 'onUpdate:modelValue'?: (value: string | number | null) => void
84
- onFocus?: (evt: Event) => void
85
- onBlur?: (evt: Event) => void
86
- onClick?: (evt: Event) => void
87
- placeholder?: string | undefined
88
- }
89
-
90
- interface AppInputProps extends AppQInputProps {
91
- field?: boolean
92
- required?: boolean
93
- datePicker?: boolean
94
- timePicker?: boolean
95
- withIcon?: boolean
96
- withButton?: boolean
97
- withArrow?: boolean
98
- borderColor?: string
99
- borderRadius?: string
100
- borderWidth?: string
101
- width?: string
102
- height?: string
103
- }
104
-
105
- const props = withDefaults(defineProps<AppInputProps>(), {
106
- dense: true,
107
- outlined: true,
108
- error: undefined,
109
- modelValue: '',
110
- borderRadius: '8px',
111
- borderWidth: '1px',
112
- width: 'auto',
113
- height: 'auto',
114
- })
115
-
116
- const emit = defineEmits(['update:modelValue', 'button-click', 'clear', 'focus', 'blur', 'click'])
117
- const passwordVisibility = ref(false)
118
- const inputType = computed(() => {
119
- if (props.type === 'password') return passwordVisibility.value ? 'text' : 'password'
120
- return props.type || 'text'
121
- })
122
-
123
- const value = computed({
124
- get: () =>
125
- props.modelValue !== null && props.modelValue !== undefined && props.type === 'number'
126
- ? +props.modelValue
127
- : props.modelValue,
128
- set: (newValue: any) => emit('update:modelValue', props.type === 'number' ? +newValue : newValue),
129
- })
130
-
131
- const inputClasses = computed(() => {
132
- return {
133
- 'app-input': true,
134
- '--required': props.required,
135
- '--field': props.field,
136
- 'input-number-without-arrow': inputType.value === 'number' && !props.withArrow,
137
- }
138
- })
139
- </script>
140
-
141
- <style module lang="scss">
142
- .app-input {
143
- &:global(.q-field--dense .q-field__control) {
144
- height: v-bind(height);
145
- }
146
- }
147
- </style>
1
+ <template>
2
+ <q-input
3
+ v-model="value"
4
+ :class="[inputClasses, $style['app-input']]"
5
+ standout
6
+ outlined
7
+ dense
8
+ :type="inputType"
9
+ autocomplete="h87h58g7h8hd"
10
+ :readonly="readonly || field"
11
+ :disable="disabled"
12
+ :placeholder="placeholder"
13
+ >
14
+ </q-input>
15
+ </template>
16
+
17
+ <script lang="ts" setup>
18
+ import { defineProps, defineEmits, computed, ref, withDefaults } from 'vue'
19
+
20
+ interface AppQInputProps {
21
+ name?: string | undefined
22
+ mask?: string | undefined
23
+ fillMask?: boolean | string | undefined
24
+ reverseFillMask?: boolean | undefined
25
+ unmaskedValue?: boolean | undefined
26
+ modelValue: string | number | null | undefined
27
+ error?: boolean | undefined
28
+ errorMessage?: string | undefined
29
+ noErrorIcon?: boolean | undefined
30
+ rules?: any | undefined
31
+ reactiveRules?: boolean | undefined
32
+ lazyRules?: boolean | 'ondemand' | undefined
33
+ label?: string | undefined
34
+ stackLabel?: boolean | undefined
35
+ hint?: string | undefined
36
+ hideHint?: boolean | undefined
37
+ prefix?: string | undefined
38
+ suffix?: string | undefined
39
+ labelColor?: string | undefined
40
+ color?: string | undefined
41
+ bgColor?: string | undefined
42
+ dark?: boolean | undefined
43
+ loading?: boolean | undefined
44
+ clearable?: boolean | undefined
45
+ clearIcon?: string | undefined
46
+ filled?: boolean | undefined
47
+ outlined?: boolean | undefined
48
+ borderless?: boolean | undefined
49
+ standout?: boolean | string | undefined
50
+ labelSlot?: boolean | undefined
51
+ bottomSlots?: boolean | undefined
52
+ hideBottomSpace?: boolean | undefined
53
+ counter?: boolean | undefined
54
+ rounded?: boolean | undefined
55
+ square?: boolean | undefined
56
+ dense?: boolean | undefined
57
+ itemAligned?: boolean | undefined
58
+ disable?: boolean | undefined
59
+ readonly?: boolean | undefined
60
+ autofocus?: boolean | undefined
61
+ for?: string | undefined
62
+ shadowText?: string | undefined
63
+ type?:
64
+ | 'text'
65
+ | 'password'
66
+ | 'textarea'
67
+ | 'email'
68
+ | 'search'
69
+ | 'tel'
70
+ | 'file'
71
+ | 'number'
72
+ | 'url'
73
+ | 'time'
74
+ | 'date'
75
+ | undefined
76
+ debounce?: string | number | undefined
77
+ disabled?: boolean | undefined
78
+ maxlength?: string | number | undefined
79
+ autogrow?: boolean | undefined
80
+ inputClass?: any | undefined
81
+ inputStyle?: any | undefined
82
+ onClear?: (value: any) => void
83
+ 'onUpdate:modelValue'?: (value: string | number | null) => void
84
+ onFocus?: (evt: Event) => void
85
+ onBlur?: (evt: Event) => void
86
+ onClick?: (evt: Event) => void
87
+ placeholder?: string | undefined
88
+ }
89
+
90
+ interface AppInputProps extends AppQInputProps {
91
+ field?: boolean
92
+ required?: boolean
93
+ datePicker?: boolean
94
+ timePicker?: boolean
95
+ withIcon?: boolean
96
+ withButton?: boolean
97
+ withArrow?: boolean
98
+ borderColor?: string
99
+ borderRadius?: string
100
+ borderWidth?: string
101
+ width?: string
102
+ height?: string
103
+ }
104
+
105
+ const props = withDefaults(defineProps<AppInputProps>(), {
106
+ dense: true,
107
+ outlined: true,
108
+ error: undefined,
109
+ modelValue: '',
110
+ borderRadius: '8px',
111
+ borderWidth: '1px',
112
+ width: 'auto',
113
+ height: 'auto',
114
+ })
115
+
116
+ const emit = defineEmits(['update:modelValue', 'button-click', 'clear', 'focus', 'blur', 'click'])
117
+ const passwordVisibility = ref(false)
118
+ const inputType = computed(() => {
119
+ if (props.type === 'password') return passwordVisibility.value ? 'text' : 'password'
120
+ return props.type || 'text'
121
+ })
122
+
123
+ const value = computed({
124
+ get: () =>
125
+ props.modelValue !== null && props.modelValue !== undefined && props.type === 'number'
126
+ ? +props.modelValue
127
+ : props.modelValue,
128
+ set: (newValue: any) => emit('update:modelValue', props.type === 'number' ? +newValue : newValue),
129
+ })
130
+
131
+ const inputClasses = computed(() => {
132
+ return {
133
+ 'app-input': true,
134
+ '--required': props.required,
135
+ '--field': props.field,
136
+ 'input-number-without-arrow': inputType.value === 'number' && !props.withArrow,
137
+ }
138
+ })
139
+ </script>
140
+
141
+ <style module lang="scss">
142
+ .app-input {
143
+ &:global(.q-field--dense .q-field__control) {
144
+ height: v-bind(height);
145
+ }
146
+ }
147
+ </style>
@@ -1,170 +1,170 @@
1
- <template>
2
- <q-input
3
- v-model="value"
4
- standout
5
- outlined
6
- clearable
7
- dense
8
- bg-color="white"
9
- :class="[$style['app-input'], itemClasses]"
10
- :type="type"
11
- :readonly="readonly || field"
12
- :placeholder="label"
13
- >
14
- <template #prepend>
15
- <q-icon>
16
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
17
- <path
18
- d="M11.5 21C16.7467 21 21 16.7467 21 11.5C21 6.25329 16.7467 2 11.5 2C6.25329 2 2 6.25329 2 11.5C2 16.7467 6.25329 21 11.5 21Z"
19
- stroke="#404650"
20
- stroke-width="1.5"
21
- stroke-linecap="round"
22
- stroke-linejoin="round"
23
- />
24
- <path d="M22 22L20 20" stroke="#3F8CFF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
25
- </svg>
26
- </q-icon>
27
- </template>
28
- </q-input>
29
- </template>
30
-
31
- <script lang="ts" setup>
32
- import { defineProps, defineEmits, computed, withDefaults } from 'vue'
33
-
34
- import { ValidationRule, VueClassProp, VueStyleProp } from 'quasar/dist/types/api'
35
-
36
- interface AppQInputProps {
37
- height?: string
38
- name?: string | undefined
39
- mask?: string | undefined
40
- fillMask?: boolean | string | undefined
41
- reverseFillMask?: boolean | undefined
42
- unmaskedValue?: boolean | undefined
43
- modelValue: string | number | null | undefined
44
- error?: boolean | undefined
45
- errorMessage?: string | undefined
46
- noErrorIcon?: boolean | undefined
47
- rules?: ValidationRule[] | undefined
48
- reactiveRules?: boolean | undefined
49
- lazyRules?: boolean | 'ondemand' | undefined
50
- label?: string | undefined
51
- stackLabel?: boolean | undefined
52
- hint?: string | undefined
53
- hideHint?: boolean | undefined
54
- prefix?: string | undefined
55
- suffix?: string | undefined
56
- labelColor?: string | undefined
57
- color?: string | undefined
58
- bgColor?: string | undefined
59
- dark?: boolean | undefined
60
- loading?: boolean | undefined
61
- clearable?: boolean | undefined
62
- clearIcon?: string | undefined
63
- filled?: boolean | undefined
64
- outlined?: boolean | undefined
65
- borderless?: boolean | undefined
66
- bordered?: boolean | undefined
67
- standout?: boolean | string | undefined
68
- labelSlot?: boolean | undefined
69
- bottomSlots?: boolean | undefined
70
- hideBottomSpace?: boolean | undefined
71
- counter?: boolean | undefined
72
- rounded?: boolean | undefined
73
- square?: boolean | undefined
74
- dense?: boolean | undefined
75
- itemAligned?: boolean | undefined
76
- disable?: boolean | undefined
77
- readonly?: boolean | undefined
78
- autofocus?: boolean | undefined
79
- for?: string | undefined
80
- shadowText?: string | undefined
81
- type?:
82
- | 'text'
83
- | 'password'
84
- | 'textarea'
85
- | 'email'
86
- | 'search'
87
- | 'tel'
88
- | 'file'
89
- | 'number'
90
- | 'url'
91
- | 'time'
92
- | 'date'
93
- | undefined
94
- debounce?: string | number | undefined
95
- maxlength?: string | number | undefined
96
- autogrow?: boolean | undefined
97
- inputClass?: VueClassProp | undefined
98
- inputStyle?: VueStyleProp | undefined
99
- onClear?: (value: any) => void
100
- 'onUpdate:modelValue'?: (value: string | number | null) => void
101
- onFocus?: (evt: Event) => void
102
- onBlur?: (evt: Event) => void
103
- onClick?: (evt: Event) => void
104
- }
105
-
106
- interface AppInputProps extends AppQInputProps {
107
- field?: boolean
108
- required?: boolean
109
- datePicker?: boolean
110
- timePicker?: boolean
111
- dateLocale?: any
112
- withIcon?: boolean
113
- iconName?: string
114
- iconColor?: string
115
- withButton?: boolean
116
- buttonIcon?: string
117
- buttonTooltip?: string
118
- clearTooltip?: string
119
- withArrow?: boolean
120
- }
121
-
122
- const props = withDefaults(defineProps<AppInputProps>(), {
123
- dense: true,
124
- height: '48px',
125
- outlined: true,
126
- error: undefined,
127
- modelValue: '',
128
- })
129
-
130
- const emit = defineEmits(['update:modelValue', 'button-click', 'clear', 'focus', 'blur', 'click'])
131
-
132
- const value = computed({
133
- get: () =>
134
- props.modelValue !== null && props.modelValue !== undefined && props.type === 'number'
135
- ? +props.modelValue
136
- : props.modelValue,
137
- set: (newValue: any) => emit('update:modelValue', props.type === 'number' ? +newValue : newValue),
138
- })
139
-
140
- const itemClasses = computed(() => ({
141
- '--dense': props.dense,
142
- '--bordered': props.bordered,
143
- }))
144
- </script>
145
-
146
- <style lang="scss" module>
147
- .app-input {
148
- &:global(.q-field--outlined .q-field__control) {
149
- border-radius: 14px;
150
- height: v-bind(height);
151
- align-items: center;
152
- padding: 0 16px;
153
- color: #87caff;
154
- }
155
- :global(.q-field__control-container) {
156
- margin-left: 8px;
157
- }
158
- }
159
- @media (max-width: 1440px) {
160
- .app-input {
161
- &:global(.q-field--outlined .q-field__control) {
162
- height: 40px;
163
- padding: 0 12px;
164
- }
165
- :global(.q-field__control-container) {
166
- margin-left: 6px;
167
- }
168
- }
169
- }
170
- </style>
1
+ <template>
2
+ <q-input
3
+ v-model="value"
4
+ standout
5
+ outlined
6
+ clearable
7
+ dense
8
+ bg-color="white"
9
+ :class="[$style['app-input'], itemClasses]"
10
+ :type="type"
11
+ :readonly="readonly || field"
12
+ :placeholder="label"
13
+ >
14
+ <template #prepend>
15
+ <q-icon>
16
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
17
+ <path
18
+ d="M11.5 21C16.7467 21 21 16.7467 21 11.5C21 6.25329 16.7467 2 11.5 2C6.25329 2 2 6.25329 2 11.5C2 16.7467 6.25329 21 11.5 21Z"
19
+ stroke="#404650"
20
+ stroke-width="1.5"
21
+ stroke-linecap="round"
22
+ stroke-linejoin="round"
23
+ />
24
+ <path d="M22 22L20 20" stroke="#3F8CFF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
25
+ </svg>
26
+ </q-icon>
27
+ </template>
28
+ </q-input>
29
+ </template>
30
+
31
+ <script lang="ts" setup>
32
+ import { defineProps, defineEmits, computed, withDefaults } from 'vue'
33
+
34
+ import { ValidationRule, VueClassProp, VueStyleProp } from 'quasar/dist/types/api'
35
+
36
+ interface AppQInputProps {
37
+ height?: string
38
+ name?: string | undefined
39
+ mask?: string | undefined
40
+ fillMask?: boolean | string | undefined
41
+ reverseFillMask?: boolean | undefined
42
+ unmaskedValue?: boolean | undefined
43
+ modelValue: string | number | null | undefined
44
+ error?: boolean | undefined
45
+ errorMessage?: string | undefined
46
+ noErrorIcon?: boolean | undefined
47
+ rules?: ValidationRule[] | undefined
48
+ reactiveRules?: boolean | undefined
49
+ lazyRules?: boolean | 'ondemand' | undefined
50
+ label?: string | undefined
51
+ stackLabel?: boolean | undefined
52
+ hint?: string | undefined
53
+ hideHint?: boolean | undefined
54
+ prefix?: string | undefined
55
+ suffix?: string | undefined
56
+ labelColor?: string | undefined
57
+ color?: string | undefined
58
+ bgColor?: string | undefined
59
+ dark?: boolean | undefined
60
+ loading?: boolean | undefined
61
+ clearable?: boolean | undefined
62
+ clearIcon?: string | undefined
63
+ filled?: boolean | undefined
64
+ outlined?: boolean | undefined
65
+ borderless?: boolean | undefined
66
+ bordered?: boolean | undefined
67
+ standout?: boolean | string | undefined
68
+ labelSlot?: boolean | undefined
69
+ bottomSlots?: boolean | undefined
70
+ hideBottomSpace?: boolean | undefined
71
+ counter?: boolean | undefined
72
+ rounded?: boolean | undefined
73
+ square?: boolean | undefined
74
+ dense?: boolean | undefined
75
+ itemAligned?: boolean | undefined
76
+ disable?: boolean | undefined
77
+ readonly?: boolean | undefined
78
+ autofocus?: boolean | undefined
79
+ for?: string | undefined
80
+ shadowText?: string | undefined
81
+ type?:
82
+ | 'text'
83
+ | 'password'
84
+ | 'textarea'
85
+ | 'email'
86
+ | 'search'
87
+ | 'tel'
88
+ | 'file'
89
+ | 'number'
90
+ | 'url'
91
+ | 'time'
92
+ | 'date'
93
+ | undefined
94
+ debounce?: string | number | undefined
95
+ maxlength?: string | number | undefined
96
+ autogrow?: boolean | undefined
97
+ inputClass?: VueClassProp | undefined
98
+ inputStyle?: VueStyleProp | undefined
99
+ onClear?: (value: any) => void
100
+ 'onUpdate:modelValue'?: (value: string | number | null) => void
101
+ onFocus?: (evt: Event) => void
102
+ onBlur?: (evt: Event) => void
103
+ onClick?: (evt: Event) => void
104
+ }
105
+
106
+ interface AppInputProps extends AppQInputProps {
107
+ field?: boolean
108
+ required?: boolean
109
+ datePicker?: boolean
110
+ timePicker?: boolean
111
+ dateLocale?: any
112
+ withIcon?: boolean
113
+ iconName?: string
114
+ iconColor?: string
115
+ withButton?: boolean
116
+ buttonIcon?: string
117
+ buttonTooltip?: string
118
+ clearTooltip?: string
119
+ withArrow?: boolean
120
+ }
121
+
122
+ const props = withDefaults(defineProps<AppInputProps>(), {
123
+ dense: true,
124
+ height: '48px',
125
+ outlined: true,
126
+ error: undefined,
127
+ modelValue: '',
128
+ })
129
+
130
+ const emit = defineEmits(['update:modelValue', 'button-click', 'clear', 'focus', 'blur', 'click'])
131
+
132
+ const value = computed({
133
+ get: () =>
134
+ props.modelValue !== null && props.modelValue !== undefined && props.type === 'number'
135
+ ? +props.modelValue
136
+ : props.modelValue,
137
+ set: (newValue: any) => emit('update:modelValue', props.type === 'number' ? +newValue : newValue),
138
+ })
139
+
140
+ const itemClasses = computed(() => ({
141
+ '--dense': props.dense,
142
+ '--bordered': props.bordered,
143
+ }))
144
+ </script>
145
+
146
+ <style lang="scss" module>
147
+ .app-input {
148
+ &:global(.q-field--outlined .q-field__control) {
149
+ border-radius: 14px;
150
+ height: v-bind(height);
151
+ align-items: center;
152
+ padding: 0 16px;
153
+ color: #87caff;
154
+ }
155
+ :global(.q-field__control-container) {
156
+ margin-left: 8px;
157
+ }
158
+ }
159
+ @media (max-width: 1440px) {
160
+ .app-input {
161
+ &:global(.q-field--outlined .q-field__control) {
162
+ height: 40px;
163
+ padding: 0 12px;
164
+ }
165
+ :global(.q-field__control-container) {
166
+ margin-left: 6px;
167
+ }
168
+ }
169
+ }
170
+ </style>