@dile/crud 0.6.3 → 0.6.5
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.
|
@@ -96,9 +96,12 @@ export class DileAjax extends DileAxios(DileI18nMixin(LitElement)) {
|
|
|
96
96
|
case 401:
|
|
97
97
|
this.dispatchError(this.translations.http_401, res.data);
|
|
98
98
|
break;
|
|
99
|
+
case 403:
|
|
100
|
+
this.dispatchError(this.translations.http_403, res.data);
|
|
101
|
+
break;
|
|
99
102
|
case 405:
|
|
100
|
-
|
|
101
|
-
|
|
103
|
+
this.dispatchError(this.translations.http_405, res.data);
|
|
104
|
+
break;
|
|
102
105
|
case 413:
|
|
103
106
|
this.dispatchError(this.translations.http_413, res.data);
|
|
104
107
|
break;
|
|
@@ -70,6 +70,7 @@ export class DileAjaxForm extends DileI18nMixin(LitElement) {
|
|
|
70
70
|
inline: { type: Boolean, reflect: true },
|
|
71
71
|
actionIcon: { type: Object },
|
|
72
72
|
cancelIcon: { type: Object },
|
|
73
|
+
disableClearAfterInsert: { type: Boolean },
|
|
73
74
|
};
|
|
74
75
|
}
|
|
75
76
|
|
|
@@ -248,7 +249,7 @@ export class DileAjaxForm extends DileI18nMixin(LitElement) {
|
|
|
248
249
|
let data = this.responseAdapter.getData();
|
|
249
250
|
let msg = this._customSuccessMessage();
|
|
250
251
|
this.feedback.positiveFeedbackWithDelay(msg, 5000);
|
|
251
|
-
if(this.operation == 'insert') {
|
|
252
|
+
if(this.operation == 'insert' && !this.disableClearAfterInsert) {
|
|
252
253
|
this.clearForm();
|
|
253
254
|
}
|
|
254
255
|
this.dispatchEvent(new CustomEvent('save-success', {
|
package/lib/i18n/en.js
CHANGED
|
@@ -4,6 +4,7 @@ export const translations = {
|
|
|
4
4
|
http_400: "Bad Request",
|
|
5
5
|
http_422: "Unprocessable Entity",
|
|
6
6
|
http_401: "Unauthorized",
|
|
7
|
+
http_403: "You do not have permission to access this resource",
|
|
7
8
|
http_405: "Method Not Allowed",
|
|
8
9
|
http_413: "Content Too Large",
|
|
9
10
|
http_419: "Your session has expired. Please refresh the page",
|
package/lib/i18n/es.js
CHANGED
|
@@ -4,6 +4,7 @@ export const translations = {
|
|
|
4
4
|
http_400: "Solicitud incorrecta",
|
|
5
5
|
http_422: "Validación de la solicitud incorrecta",
|
|
6
6
|
http_401: "No autorizado",
|
|
7
|
+
http_403: "Acceso prohibido para el usuario autenticado",
|
|
7
8
|
http_405: "Método HTTP no permitido",
|
|
8
9
|
http_413: "Contenido enviado al servidor demasiado largo",
|
|
9
10
|
http_419: "La sesión ha expirado. Refresca la página.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dile/crud",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.5",
|
|
4
4
|
"description": "Components to create a generic crud system based on Web Components and Lit",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "0109255225e86bad9a23fc314f929e3c7e199ef5"
|
|
35
35
|
}
|