itube-specs 0.0.271 → 0.0.272

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.
@@ -111,7 +111,7 @@
111
111
  <script setup lang="ts">
112
112
  import { reportFormsScheme } from '../../lib/report-forms-scheme';
113
113
  import { EReportFormsSubjects, validateEmail, validatePhone } from '../../runtime';
114
- import type { InputTypes, IReportForm } from '../../types';
114
+ import type { InputTypes, IReportForm, IReportRequest } from '../../types';
115
115
 
116
116
  const reasonValue = ref('');
117
117
  const errorRadio = ref(false);
@@ -151,6 +151,10 @@ function resetForm() {
151
151
  errorRadio.value = false
152
152
  }
153
153
 
154
+ const emit = defineEmits<{
155
+ (eventName: 'submit', eventValue: IReportRequest): IReportRequest
156
+ }>()
157
+
154
158
  async function submit() {
155
159
  resetSnackbar();
156
160
  errorRadio.value = false;
@@ -196,7 +200,10 @@ async function submit() {
196
200
  if (reasonValue.value) {
197
201
  form.value.data[ 'reason' ] = reasonValue.value;
198
202
  }
199
- await useFetchVideoAbuse(form.value, videoGuid.value);
203
+ emit('submit', {
204
+ form: form.value,
205
+ guid: videoGuid.value
206
+ })
200
207
  closeReportPopup();
201
208
  resetForm();
202
209
  snackbarText.value = 'email_send';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "itube-specs",
3
3
  "type": "module",
4
- "version": "0.0.271",
4
+ "version": "0.0.272",
5
5
  "main": "./nuxt.config.ts",
6
6
  "types": "./types/index.d.ts",
7
7
  "scripts": {
package/types/index.d.ts CHANGED
@@ -57,3 +57,4 @@ export * from './change-email-form.d.ts';
57
57
  export * from './css-breakpoints.d.ts';
58
58
  export * from './button-sizes.d.ts';
59
59
  export * from './button-themes.d.ts';
60
+ export * from './report-request.d.ts';
@@ -0,0 +1,6 @@
1
+ import { IReportForm } from '~/types/report-form';
2
+
3
+ export interface IReportRequest {
4
+ form: IReportForm,
5
+ guid: string
6
+ }