bfg-common 1.2.54 → 1.2.56
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.
|
@@ -26,17 +26,18 @@
|
|
|
26
26
|
/>
|
|
27
27
|
<div class="modal-body">
|
|
28
28
|
<common-feedback-message
|
|
29
|
-
v-show="selectedTab !==
|
|
30
|
-
v-model:description
|
|
29
|
+
v-show="selectedTab !== 2"
|
|
30
|
+
v-model:description="description"
|
|
31
|
+
v-model:email="email"
|
|
31
32
|
:selected-tab="selectedTab"
|
|
32
33
|
@screen-shot="onScreenShot"
|
|
33
34
|
/>
|
|
34
|
-
<common-feedback-visit-portal v-show="selectedTab ===
|
|
35
|
+
<common-feedback-visit-portal v-show="selectedTab === 2" />
|
|
35
36
|
</div>
|
|
36
37
|
<div
|
|
37
38
|
:class="{
|
|
38
|
-
'modal-footer': selectedTab !==
|
|
39
|
-
'modal-no-footer': selectedTab ===
|
|
39
|
+
'modal-footer': selectedTab !== 2,
|
|
40
|
+
'modal-no-footer': selectedTab === 2,
|
|
40
41
|
}"
|
|
41
42
|
>
|
|
42
43
|
<button id="feedback-modal-cancel-button" class="btn btn-outline" @click="hide">
|
|
@@ -45,7 +46,7 @@
|
|
|
45
46
|
<button
|
|
46
47
|
class="btn btn-outline"
|
|
47
48
|
:class="props.loading && 'modal-dialog__loader'"
|
|
48
|
-
:disabled="!
|
|
49
|
+
:disabled="!description"
|
|
49
50
|
@click="submit"
|
|
50
51
|
>
|
|
51
52
|
<atoms-loader-pre-loader
|
|
@@ -83,7 +84,7 @@ const props = defineProps<{
|
|
|
83
84
|
isHideCloseIcon?: boolean
|
|
84
85
|
}>()
|
|
85
86
|
const emits = defineEmits<{
|
|
86
|
-
(event: 'submit'): void
|
|
87
|
+
(event: 'submit', value: any): void
|
|
87
88
|
(event: 'hide'): void
|
|
88
89
|
}>()
|
|
89
90
|
|
|
@@ -94,31 +95,41 @@ const tabsItems = computed<UI_I_FeedbackButtonsItem[]>(() =>
|
|
|
94
95
|
)
|
|
95
96
|
const hide = (): void => {
|
|
96
97
|
emits('hide')
|
|
97
|
-
|
|
98
|
+
|
|
99
|
+
email.value = ''
|
|
100
|
+
description.value = ''
|
|
98
101
|
selectedTab.value = null
|
|
99
102
|
}
|
|
100
103
|
|
|
101
104
|
const submit = (): void => {
|
|
102
|
-
|
|
103
|
-
|
|
105
|
+
const canvas = document.getElementById('feedbackImg') as HTMLCanvasElement
|
|
106
|
+
|
|
107
|
+
emits('submit', {
|
|
108
|
+
type: selectedTab.value,
|
|
109
|
+
description: description.value,
|
|
110
|
+
email: email.value,
|
|
111
|
+
image: canvas?.toDataURL() || ''
|
|
112
|
+
})
|
|
113
|
+
description.value = ''
|
|
104
114
|
selectedTab.value = null
|
|
105
115
|
}
|
|
106
116
|
const computeWidth = computed<string | undefined>(() =>
|
|
107
|
-
isFeedbackImageDrawn.value && selectedTab.value !==
|
|
117
|
+
isFeedbackImageDrawn.value && selectedTab.value !== 2
|
|
108
118
|
? feedbackImageDrawnWidth.value
|
|
109
119
|
: props.width
|
|
110
120
|
)
|
|
111
121
|
const computeHeight = computed<string>(() =>
|
|
112
|
-
!isFeedbackImageDrawn.value && selectedTab.value !==
|
|
122
|
+
!isFeedbackImageDrawn.value && selectedTab.value !== 2
|
|
113
123
|
? ''
|
|
114
|
-
: selectedTab.value !==
|
|
124
|
+
: selectedTab.value !== 2
|
|
115
125
|
? '100%'
|
|
116
126
|
: '420px'
|
|
117
127
|
)
|
|
118
128
|
const isFeedbackImageDrawn = ref<boolean>(false)
|
|
119
129
|
const feedbackImageDrawnWidth = ref<string>('')
|
|
120
130
|
const selectedTab = ref<number | null>(null)
|
|
121
|
-
const
|
|
131
|
+
const description = ref<string>('')
|
|
132
|
+
const email = ref<string>('')
|
|
122
133
|
|
|
123
134
|
const onScreenShot = (value: UI_I_MessageImg): void => {
|
|
124
135
|
isFeedbackImageDrawn.value = value.hasTakeScreenshot
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<span class="text">{{ localization.description }}</span>
|
|
5
5
|
<textarea
|
|
6
6
|
id="feedback-message-textarea"
|
|
7
|
-
v-model="
|
|
7
|
+
v-model="descriptionLocal"
|
|
8
8
|
:disabled="!props.selectedTab"
|
|
9
9
|
class="clr-textarea ng-pristine ng-invalid ng-touched textarea"
|
|
10
10
|
:placeholder="descriptionTextPlaceholder"
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
<span class="text">{{ localization.emailAddress }} </span>
|
|
15
15
|
<input
|
|
16
16
|
id="feedback-email-input"
|
|
17
|
+
v-model="email"
|
|
17
18
|
type="email"
|
|
18
19
|
class="email"
|
|
19
20
|
:placeholder="localization.optionalInCaseWeNeed"
|
|
@@ -136,27 +137,37 @@ import { UI_I_MessageImg } from '~/components/common/feedback/models/interfaces'
|
|
|
136
137
|
|
|
137
138
|
const props = defineProps<{
|
|
138
139
|
selectedTab: number | null
|
|
139
|
-
|
|
140
|
+
description: string
|
|
141
|
+
email: string
|
|
140
142
|
}>()
|
|
141
143
|
const emits = defineEmits<{
|
|
142
144
|
(event: 'screen-shot', value: UI_I_MessageImg): void
|
|
143
|
-
(event: 'update:description
|
|
145
|
+
(event: 'update:description', value: string): void
|
|
146
|
+
(event: 'update:email', value: string): void
|
|
144
147
|
}>()
|
|
145
148
|
|
|
146
|
-
const
|
|
149
|
+
const descriptionLocal = computed<string>({
|
|
147
150
|
get() {
|
|
148
|
-
return props.
|
|
151
|
+
return props.description
|
|
149
152
|
},
|
|
150
153
|
set(value) {
|
|
151
|
-
emits('update:description
|
|
154
|
+
emits('update:description', value)
|
|
155
|
+
},
|
|
156
|
+
})
|
|
157
|
+
const email = computed<string>({
|
|
158
|
+
get() {
|
|
159
|
+
return props.email
|
|
160
|
+
},
|
|
161
|
+
set(value) {
|
|
162
|
+
emits('update:email', value)
|
|
152
163
|
},
|
|
153
164
|
})
|
|
154
165
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
155
166
|
// const drawingPanel = computed(() => drawingPanelFunc(localization.value))
|
|
156
167
|
|
|
157
168
|
const descriptionTextPlaceholder = computed<string>(() => {
|
|
158
|
-
if (props.selectedTab ===
|
|
159
|
-
if (props.selectedTab ===
|
|
169
|
+
if (props.selectedTab === 0) return localization.value.whatIsTheProblemHowCan
|
|
170
|
+
if (props.selectedTab === 1) return localization.value.tellUsWhatYouEnjoyedSo
|
|
160
171
|
return localization.value.selectFeedbackType
|
|
161
172
|
})
|
|
162
173
|
const hasTakeScreenshot = ref<boolean>(false)
|
|
@@ -7,17 +7,17 @@ export const feedbackTabs = (
|
|
|
7
7
|
return [
|
|
8
8
|
{
|
|
9
9
|
text: `${localization.problem}`,
|
|
10
|
-
key:
|
|
10
|
+
key: 0,
|
|
11
11
|
iconName: 'warning-standart',
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
text: `${localization.complement}`,
|
|
15
|
-
key:
|
|
15
|
+
key: 1,
|
|
16
16
|
iconName: 'heart',
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
text: `${localization.idea}`,
|
|
20
|
-
key:
|
|
20
|
+
key: 2,
|
|
21
21
|
iconName: 'lightbulb',
|
|
22
22
|
},
|
|
23
23
|
]
|