@sysvale/show 0.2.0 → 1.0.0
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/README.md +6 -0
- package/dist/@sysvale/show.esm.js +401 -199
- package/dist/@sysvale/show.min.js +1 -1
- package/dist/@sysvale/show.ssr.js +395 -200
- package/package.json +156 -155
package/README.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+

|
2
|
+
|
3
|
+
Atenção: Se deseja utilizar o SHOW em projetos com Vue 2, utilize a versão `0.3.0` ou inferior.
|
4
|
+
|
1
5
|
## Instalando
|
2
6
|
|
3
7
|
- O SHOW pode ser instalado com o npm:
|
@@ -42,3 +46,5 @@ Vue.use(SHOW);
|
|
42
46
|
</div>
|
43
47
|
</show-request-provider>
|
44
48
|
```
|
49
|
+
|
50
|
+
**Para saber mais sobre a utilização do SHOW, consulte a [Wiki](https://github.com/Sysvale/sys-hand-on-wheel/wiki)**.
|
@@ -1,8 +1,10 @@
|
|
1
|
+
import { h } from 'vue';
|
1
2
|
import swal from 'sweetalert2';
|
2
3
|
import get from 'lodash.get';
|
3
4
|
import camelCase from 'lodash.camelcase';
|
4
5
|
import isObject from 'lodash.isobject';
|
5
6
|
import snakeCase from 'lodash.snakecase';
|
7
|
+
import keyBy from 'lodash.keyby';
|
6
8
|
|
7
9
|
var isArray = function (arg) { return Array.isArray(arg); };
|
8
10
|
|
@@ -50,6 +52,18 @@ var convertKeysToSnakeCase = function (data) {
|
|
50
52
|
return newData;
|
51
53
|
};
|
52
54
|
|
55
|
+
function generateKey(length) {
|
56
|
+
if ( length === void 0 ) length = 8;
|
57
|
+
|
58
|
+
var result = '';
|
59
|
+
var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
60
|
+
var charactersLength = characters.length;
|
61
|
+
for (var i = 0; i < length; i += 1) {
|
62
|
+
result += characters.charAt(Math.floor(Math.random() * charactersLength));
|
63
|
+
}
|
64
|
+
return result;
|
65
|
+
}
|
66
|
+
|
53
67
|
function getFirstErrorMessage(response, fallbackMsg) {
|
54
68
|
if ( fallbackMsg === void 0 ) fallbackMsg = 'Não conseguimos processar sua requisição. Tente novamente.';
|
55
69
|
|
@@ -60,193 +74,225 @@ function getFirstErrorMessage(response, fallbackMsg) {
|
|
60
74
|
return errors[firstKey][0] || fallbackMsg;
|
61
75
|
}
|
62
76
|
|
63
|
-
var SUCCESS_SWAL_DEFAULT_CONFIG = {
|
64
|
-
title: 'Informações salvas com sucesso!',
|
65
|
-
icon: 'success',
|
66
|
-
text: '',
|
67
|
-
showCloseButton: true,
|
68
|
-
confirmButtonText: 'Ok',
|
69
|
-
};
|
70
|
-
|
71
|
-
var ERROR_SWAL_DEFAULT_CONFIG = {
|
72
|
-
icon: 'error',
|
73
|
-
title: 'Erro',
|
74
|
-
text: 'mensagem de error',
|
75
|
-
showCancelButton: true,
|
76
|
-
showConfirmButton: false,
|
77
|
-
cancelButtonText: 'Fechar',
|
78
|
-
};
|
79
|
-
|
80
|
-
var script = {
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
77
|
+
var SUCCESS_SWAL_DEFAULT_CONFIG = {
|
78
|
+
title: 'Informações salvas com sucesso!',
|
79
|
+
icon: 'success',
|
80
|
+
text: '',
|
81
|
+
showCloseButton: true,
|
82
|
+
confirmButtonText: 'Ok',
|
83
|
+
};
|
84
|
+
|
85
|
+
var ERROR_SWAL_DEFAULT_CONFIG = {
|
86
|
+
icon: 'error',
|
87
|
+
title: 'Erro',
|
88
|
+
text: 'mensagem de error',
|
89
|
+
showCancelButton: true,
|
90
|
+
showConfirmButton: false,
|
91
|
+
cancelButtonText: 'Fechar',
|
92
|
+
};
|
93
|
+
|
94
|
+
var script = {
|
95
|
+
inject: ['$_requestObserver'],
|
96
|
+
emits: ['success', 'error', 'success-feedback-ok', 'error-feedback-ok', 'success-feedback-cancel', 'error-feedback-cancel'],
|
97
|
+
props: {
|
98
|
+
vid: {
|
99
|
+
type: String,
|
100
|
+
default: function () { return generateKey(); },
|
101
|
+
},
|
102
|
+
tag: {
|
103
|
+
type: String,
|
104
|
+
default: 'div',
|
105
|
+
},
|
106
|
+
service: {
|
107
|
+
type: Function,
|
108
|
+
required: true,
|
109
|
+
},
|
110
|
+
payload: {
|
111
|
+
type: Object,
|
112
|
+
default: function () { return ({}); },
|
113
|
+
},
|
114
|
+
payloadResolver: {
|
115
|
+
type: Function,
|
116
|
+
default: function (data) { return convertKeysToSnakeCase(data); },
|
117
|
+
},
|
118
|
+
dataResolver: {
|
119
|
+
type: Function,
|
120
|
+
default: function (data) { return convertKeysToCamelCase(data); },
|
121
|
+
},
|
122
|
+
successSwalConfig: {
|
123
|
+
type: Object,
|
124
|
+
default: function () { return SUCCESS_SWAL_DEFAULT_CONFIG; },
|
125
|
+
},
|
126
|
+
errorSwalConfig: {
|
127
|
+
type: Object,
|
128
|
+
default: function () { return ERROR_SWAL_DEFAULT_CONFIG; },
|
129
|
+
},
|
130
|
+
errorFeedbackResolver: {
|
131
|
+
type: Function,
|
132
|
+
default: null,
|
133
|
+
},
|
134
|
+
successFeedbackResolver: {
|
135
|
+
type: Function,
|
136
|
+
default: null,
|
137
|
+
},
|
138
|
+
showSuccessFeedback: {
|
139
|
+
type: Boolean,
|
140
|
+
default: false,
|
141
|
+
},
|
142
|
+
hideErrorFeedback: {
|
143
|
+
type: Boolean,
|
144
|
+
default: false,
|
145
|
+
},
|
146
|
+
immediate: {
|
147
|
+
type: Boolean,
|
148
|
+
default: false,
|
149
|
+
},
|
150
|
+
forceResetError: {
|
151
|
+
type: Boolean,
|
152
|
+
default: false,
|
153
|
+
},
|
154
|
+
initialData: {
|
155
|
+
default: null,
|
156
|
+
},
|
157
|
+
},
|
158
|
+
|
159
|
+
data: function data() {
|
160
|
+
return {
|
161
|
+
loading: false,
|
162
|
+
failed: false,
|
163
|
+
succeeded: false,
|
164
|
+
error: null,
|
165
|
+
data: this.initialData,
|
166
|
+
};
|
167
|
+
},
|
168
|
+
|
169
|
+
computed: {
|
170
|
+
requestState: function requestState() {
|
171
|
+
return {
|
172
|
+
loading: this.loading,
|
173
|
+
failed: this.failed,
|
174
|
+
succeeded: this.succeeded,
|
175
|
+
error: this.error,
|
176
|
+
data: this.data,
|
177
|
+
};
|
178
|
+
}
|
179
|
+
},
|
180
|
+
|
181
|
+
watch: {
|
182
|
+
forceResetError: function forceResetError(newValue) {
|
183
|
+
if (newValue) {
|
184
|
+
this.error = null;
|
185
|
+
}
|
186
|
+
},
|
187
|
+
},
|
188
|
+
|
189
|
+
mounted: function mounted() {
|
190
|
+
if (this.immediate) {
|
191
|
+
this.action();
|
192
|
+
}
|
193
|
+
},
|
194
|
+
|
195
|
+
created: function created() {
|
196
|
+
if(this.$_requestObserver) {
|
197
|
+
this.$_requestObserver.subscribe(this);
|
198
|
+
}
|
199
|
+
},
|
200
|
+
|
201
|
+
beforeDestroy: function beforeDestroy() {
|
202
|
+
if(this.$_requestObserver) {
|
203
|
+
this.$_requestObserver.unsubscribe(this);
|
204
|
+
}
|
205
|
+
},
|
206
|
+
|
207
|
+
methods: {
|
159
208
|
action: function action(payloadFromArgs) {
|
160
209
|
var this$1 = this;
|
161
|
-
|
162
|
-
this.startRequest();
|
163
|
-
var payload = payloadFromArgs || this.payload;
|
164
|
-
this.service(this.payloadResolver(payload))
|
165
|
-
.then(
|
210
|
+
|
211
|
+
this.startRequest();
|
212
|
+
var payload = payloadFromArgs || this.payload;
|
213
|
+
this.service(this.payloadResolver(payload))
|
214
|
+
.then(
|
166
215
|
function (ref) {
|
167
216
|
var data = ref.data;
|
168
|
-
|
169
|
-
this$1.data = this$1.dataResolver(data);
|
170
|
-
this$1
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
this$1
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
this$1.
|
187
|
-
this$1
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
217
|
+
|
218
|
+
this$1.data = this$1.dataResolver(data);
|
219
|
+
this$1.succeeded = true;
|
220
|
+
this$1.$emit('success', this$1.data);
|
221
|
+
|
222
|
+
if (this$1.showSuccessFeedback) {
|
223
|
+
if (this$1.successFeedbackResolver) {
|
224
|
+
this$1.successFeedbackResolver({ vm: this$1, data: this$1.data });
|
225
|
+
return;
|
226
|
+
}
|
227
|
+
swal.fire(Object.assign({}, SUCCESS_SWAL_DEFAULT_CONFIG,
|
228
|
+
this$1.successSwalConfig)).then(function () {
|
229
|
+
this$1.$emit('success-feedback-ok', this$1.data);
|
230
|
+
});
|
231
|
+
}
|
232
|
+
}
|
233
|
+
).catch(
|
234
|
+
function (error) {
|
235
|
+
this$1.failed = true;
|
236
|
+
this$1.error = error;
|
237
|
+
this$1.$emit('error', error);
|
238
|
+
|
239
|
+
if (!this$1.hideErrorFeedback) {
|
240
|
+
var errorMessage = getFirstErrorMessage(
|
241
|
+
get(error, 'response.data', null),
|
242
|
+
'Um erro aconteceu... por favor, tente novamente. Se o erro persistir, contate o suporte.'
|
243
|
+
);
|
244
|
+
|
245
|
+
if (this$1.errorFeedbackResolver) {
|
246
|
+
this$1.errorFeedbackResolver({ vm: this$1, error: error, errorMessage: errorMessage });
|
247
|
+
return;
|
248
|
+
}
|
249
|
+
|
250
|
+
swal.fire(Object.assign({}, ERROR_SWAL_DEFAULT_CONFIG,
|
251
|
+
this$1.errorSwalConfig,
|
252
|
+
{text: errorMessage})).then(function (result) {
|
253
|
+
if (result.isDismissed) {
|
254
|
+
this$1.$emit('error-feedback-cancel', error);
|
255
|
+
}
|
256
|
+
if (result.isConfirmed) {
|
257
|
+
this$1.$emit('error-feedback-ok', error);
|
258
|
+
}
|
259
|
+
});
|
260
|
+
}
|
261
|
+
}
|
262
|
+
).finally(function () {
|
263
|
+
this$1.loading = false;
|
264
|
+
});
|
265
|
+
},
|
266
|
+
|
267
|
+
loadingTextResolver: function loadingTextResolver(label, loadingLabel) {
|
218
268
|
if ( loadingLabel === void 0 ) loadingLabel = 'Carregando...';
|
219
|
-
|
220
|
-
if (this.loading) {
|
221
|
-
return loadingLabel;
|
222
|
-
}
|
223
|
-
return label;
|
224
|
-
},
|
225
|
-
|
226
|
-
startRequest: function startRequest() {
|
227
|
-
this.loading = true;
|
228
|
-
this.failed = false;
|
229
|
-
this.
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
var
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
});
|
247
|
-
|
248
|
-
return Array.isArray(slot) ? slot[0] : slot;
|
249
|
-
},
|
269
|
+
|
270
|
+
if (this.loading) {
|
271
|
+
return loadingLabel;
|
272
|
+
}
|
273
|
+
return label;
|
274
|
+
},
|
275
|
+
|
276
|
+
startRequest: function startRequest() {
|
277
|
+
this.loading = true;
|
278
|
+
this.failed = false;
|
279
|
+
this.succeeded = false;
|
280
|
+
this.error = null;
|
281
|
+
},
|
282
|
+
},
|
283
|
+
|
284
|
+
render: function render() {
|
285
|
+
var slotProvider = this.$slots;
|
286
|
+
var slot = slotProvider.default(Object.assign({}, this.requestState,
|
287
|
+
{action: this.action,
|
288
|
+
loadingTextResolver: this.loadingTextResolver,
|
289
|
+
errorMessage: getFirstErrorMessage(
|
290
|
+
get(this.error, 'response.data', null),
|
291
|
+
'Um erro aconteceu... por favor, tente novamente. Se o erro persistir, contate o suporte.'
|
292
|
+
)}));
|
293
|
+
|
294
|
+
return h(this.tag, slot);
|
295
|
+
},
|
250
296
|
};
|
251
297
|
|
252
298
|
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
|
@@ -358,11 +404,181 @@ var __vue_script__ = script;
|
|
358
404
|
undefined
|
359
405
|
);
|
360
406
|
|
407
|
+
var booleanReduceByProp = function (arr, prop, operator, defaultValue) {
|
408
|
+
if ( operator === void 0 ) operator = '||';
|
409
|
+
if ( defaultValue === void 0 ) defaultValue = false;
|
410
|
+
|
411
|
+
return arr.reduce(function (acc, item) {
|
412
|
+
if(operator === '||') {
|
413
|
+
return acc || item[prop];
|
414
|
+
} else if(operator === '&&') {
|
415
|
+
return acc && item[prop];
|
416
|
+
}
|
417
|
+
}, defaultValue);
|
418
|
+
};
|
419
|
+
|
420
|
+
var script$1 = {
|
421
|
+
emits: ['success', 'error'],
|
422
|
+
props: {
|
423
|
+
vid: {
|
424
|
+
type: String,
|
425
|
+
default: function () { return generateKey(); },
|
426
|
+
},
|
427
|
+
tag: {
|
428
|
+
type: String,
|
429
|
+
default: 'div',
|
430
|
+
},
|
431
|
+
},
|
432
|
+
data: function data() {
|
433
|
+
return {
|
434
|
+
providers: [],
|
435
|
+
providersVids: {},
|
436
|
+
};
|
437
|
+
},
|
438
|
+
provide: function provide() {
|
439
|
+
return {
|
440
|
+
$_requestObserver: this,
|
441
|
+
}
|
442
|
+
},
|
443
|
+
|
444
|
+
computed: {
|
445
|
+
context: function context() {
|
446
|
+
return {
|
447
|
+
vid: this.vid,
|
448
|
+
loading: booleanReduceByProp(this.providers, 'loading'),
|
449
|
+
failed: booleanReduceByProp(this.providers, 'failed'),
|
450
|
+
succeeded: booleanReduceByProp(this.providers, 'succeeded', '&&', true),
|
451
|
+
errors: keyBy(this.providers.filter(function (ref) {
|
452
|
+
var failed = ref.failed;
|
453
|
+
|
454
|
+
return failed;
|
455
|
+
}).map(function (ref) {
|
456
|
+
var error = ref.error;
|
457
|
+
var vid = ref.vid;
|
458
|
+
|
459
|
+
return ({ error: error, vid: vid });
|
460
|
+
}), 'vid'),
|
461
|
+
providerRequestState: this.providerRequestState,
|
462
|
+
loadingTextResolver: this.loadingTextResolver,
|
463
|
+
};
|
464
|
+
},
|
465
|
+
|
466
|
+
providerRequestState: function providerRequestState() {
|
467
|
+
var this$1 = this;
|
468
|
+
|
469
|
+
return function (vid) {
|
470
|
+
var element = this$1.providers.find(function (ref) {
|
471
|
+
var providerVid = ref.vid;
|
472
|
+
|
473
|
+
return providerVid === vid;
|
474
|
+
});
|
475
|
+
return element ? element.requestState : {
|
476
|
+
loading: false,
|
477
|
+
failed: false,
|
478
|
+
succeeded: false,
|
479
|
+
error: null,
|
480
|
+
data: null,
|
481
|
+
};
|
482
|
+
}
|
483
|
+
},
|
484
|
+
|
485
|
+
loadingTextResolver: function loadingTextResolver() {
|
486
|
+
var this$1 = this;
|
487
|
+
|
488
|
+
return function (label, loadingLabel) {
|
489
|
+
if ( loadingLabel === void 0 ) loadingLabel = 'Carregando...';
|
490
|
+
|
491
|
+
if (this$1.context.loading) {
|
492
|
+
return loadingLabel;
|
493
|
+
}
|
494
|
+
return label;
|
495
|
+
}
|
496
|
+
},
|
497
|
+
},
|
498
|
+
|
499
|
+
watch: {
|
500
|
+
'context.succeeded': {
|
501
|
+
handler: function handler(newValue) {
|
502
|
+
if (newValue) {
|
503
|
+
this.$emit('success', this.context);
|
504
|
+
}
|
505
|
+
},
|
506
|
+
},
|
507
|
+
'context.failed': {
|
508
|
+
handler: function handler(newValue) {
|
509
|
+
if (newValue) {
|
510
|
+
this.$emit('error', this.context);
|
511
|
+
}
|
512
|
+
},
|
513
|
+
},
|
514
|
+
},
|
515
|
+
|
516
|
+
render: function render() {
|
517
|
+
var slotProvider = this.$slots;
|
518
|
+
var slot = slotProvider.default(this.context);
|
519
|
+
return h(this.tag, slot);
|
520
|
+
},
|
521
|
+
|
522
|
+
methods: {
|
523
|
+
subscribe: function subscribe(provider) {
|
524
|
+
if(!this.providersVids[provider.vid]) {
|
525
|
+
this.providersVids[provider.vid] = true;
|
526
|
+
this.providers.push(provider);
|
527
|
+
} else {
|
528
|
+
throw new Error(("Provider não reigistrado no observer! Já existe um provider com o vid >> " + (provider.vid) + " <<"));
|
529
|
+
}
|
530
|
+
},
|
531
|
+
unsubscribe: function unsubscribe(provider) {
|
532
|
+
delete this.providersVids[provider.vid];
|
533
|
+
this.providers.filter(function (ref) {
|
534
|
+
var vid = ref.vid;
|
535
|
+
|
536
|
+
return vid !== provider.vid;
|
537
|
+
});
|
538
|
+
},
|
539
|
+
},
|
540
|
+
};
|
541
|
+
|
542
|
+
/* script */
|
543
|
+
var __vue_script__$1 = script$1;
|
544
|
+
|
545
|
+
/* template */
|
546
|
+
|
547
|
+
/* style */
|
548
|
+
var __vue_inject_styles__$1 = undefined;
|
549
|
+
/* scoped */
|
550
|
+
var __vue_scope_id__$1 = undefined;
|
551
|
+
/* module identifier */
|
552
|
+
var __vue_module_identifier__$1 = undefined;
|
553
|
+
/* functional template */
|
554
|
+
var __vue_is_functional_template__$1 = undefined;
|
555
|
+
/* style inject */
|
556
|
+
|
557
|
+
/* style inject SSR */
|
558
|
+
|
559
|
+
/* style inject shadow dom */
|
560
|
+
|
561
|
+
|
562
|
+
|
563
|
+
var __vue_component__$1 = /*#__PURE__*/normalizeComponent(
|
564
|
+
{},
|
565
|
+
__vue_inject_styles__$1,
|
566
|
+
__vue_script__$1,
|
567
|
+
__vue_scope_id__$1,
|
568
|
+
__vue_is_functional_template__$1,
|
569
|
+
__vue_module_identifier__$1,
|
570
|
+
false,
|
571
|
+
undefined,
|
572
|
+
undefined,
|
573
|
+
undefined
|
574
|
+
);
|
575
|
+
|
361
576
|
|
362
577
|
|
363
578
|
var components = /*#__PURE__*/Object.freeze({
|
364
579
|
__proto__: null,
|
365
|
-
RequestProvider: __vue_component__
|
580
|
+
RequestProvider: __vue_component__,
|
581
|
+
RequestObserver: __vue_component__$1
|
366
582
|
});
|
367
583
|
|
368
584
|
function removeAccents(str) {
|
@@ -389,18 +605,6 @@ function removeAccents(str) {
|
|
389
605
|
return newStr;
|
390
606
|
}
|
391
607
|
|
392
|
-
function generateKey(length) {
|
393
|
-
if ( length === void 0 ) length = 8;
|
394
|
-
|
395
|
-
var result = '';
|
396
|
-
var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
397
|
-
var charactersLength = characters.length;
|
398
|
-
for (var i = 0; i < length; i += 1) {
|
399
|
-
result += characters.charAt(Math.floor(Math.random() * charactersLength));
|
400
|
-
}
|
401
|
-
return result;
|
402
|
-
}
|
403
|
-
|
404
608
|
var utils = {
|
405
609
|
$showConvertKeysToCamelCase: convertKeysToCamelCase,
|
406
610
|
$showConvertKeysToSnakeCase: convertKeysToSnakeCase,
|
@@ -417,9 +621,7 @@ function install(app) {
|
|
417
621
|
var version = Number(app.version.split('.')[0]);
|
418
622
|
|
419
623
|
if (version <= 2) {
|
420
|
-
|
421
|
-
app.prototype[key] = utils[key];
|
422
|
-
});
|
624
|
+
throw new Error('Essa versão só é compatível com projetos que possuem o Vue 3. Para projetos com a Vue 2, utilize a versão 0.3.0 ou inferior');
|
423
625
|
}
|
424
626
|
|
425
627
|
if (version > 2) {
|
@@ -457,4 +659,4 @@ if (GlobalVue) {
|
|
457
659
|
}
|
458
660
|
|
459
661
|
export default plugin;
|
460
|
-
export { __vue_component__ as RequestProvider };
|
662
|
+
export { __vue_component__$1 as RequestObserver, __vue_component__ as RequestProvider };
|