@dile/crud 0.0.50 → 0.0.52
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/components/action/src/DileCrudActions.js +5 -1
- package/components/action/src/DileCrudSingleActions.js +4 -1
- package/components/ajax/src/DileAjax.js +6 -1
- package/components/detail/src/DileCrudDetail.js +1 -1
- package/components/single/src/DileCrudSingle.js +1 -0
- package/lib/i18n/en.js +1 -0
- package/lib/i18n/es.js +1 -0
- package/package.json +3 -3
|
@@ -131,12 +131,16 @@ export class DileCrudActions extends DileI18nMixin(LitElement) {
|
|
|
131
131
|
@dile-confirm-accepted=${this.doAction}
|
|
132
132
|
>
|
|
133
133
|
<div class="modalcontainer">
|
|
134
|
-
${this.
|
|
134
|
+
${this.actionsTemplateRunner}
|
|
135
135
|
</div>
|
|
136
136
|
</dile-confirm>
|
|
137
137
|
`;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
+
get actionsTemplateRunner() {
|
|
141
|
+
return this.formActionsTemplate(this.selection, this.actionIds);
|
|
142
|
+
}
|
|
143
|
+
|
|
140
144
|
setActionIds(items) {
|
|
141
145
|
this.actionIds = items;
|
|
142
146
|
}
|
|
@@ -37,6 +37,7 @@ export class DileCrudSingleActions extends DileCrudActions {
|
|
|
37
37
|
static get properties() {
|
|
38
38
|
return {
|
|
39
39
|
actions: { type: Array },
|
|
40
|
+
element: { type: Object },
|
|
40
41
|
};
|
|
41
42
|
}
|
|
42
43
|
|
|
@@ -69,7 +70,9 @@ export class DileCrudSingleActions extends DileCrudActions {
|
|
|
69
70
|
`;
|
|
70
71
|
}
|
|
71
72
|
|
|
72
|
-
|
|
73
|
+
get actionsTemplateRunner() {
|
|
74
|
+
return html`${this.formActionsTemplate(this.selection, this.element)}`;
|
|
75
|
+
}
|
|
73
76
|
|
|
74
77
|
onActionSelected(e) {
|
|
75
78
|
this.selection = e.detail.selected;
|
|
@@ -98,6 +98,9 @@ export class DileAjax extends DileAxios(DileI18nMixin(LitElement)) {
|
|
|
98
98
|
case 405:
|
|
99
99
|
this.dispatchError(this.translations.http_405);
|
|
100
100
|
break;
|
|
101
|
+
case 413:
|
|
102
|
+
this.dispatchError(this.translations.http_413);
|
|
103
|
+
break;
|
|
101
104
|
case 419:
|
|
102
105
|
this.dispatchError(this.translations.http_419);
|
|
103
106
|
break;
|
|
@@ -138,7 +141,9 @@ export class DileAjax extends DileAxios(DileI18nMixin(LitElement)) {
|
|
|
138
141
|
this.createFormData();
|
|
139
142
|
}
|
|
140
143
|
for (const key in data) {
|
|
141
|
-
|
|
144
|
+
if (data[key] !== null && data[key] !== undefined) {
|
|
145
|
+
this.formData.append(key, data[key]);
|
|
146
|
+
}
|
|
142
147
|
}
|
|
143
148
|
}
|
|
144
149
|
}
|
|
@@ -14,7 +14,7 @@ export class DileCrudDetail extends DileLoading(LitElement) {
|
|
|
14
14
|
margin-bottom: 0;
|
|
15
15
|
}
|
|
16
16
|
.detail-data {
|
|
17
|
-
background-color: #f5f5f5;
|
|
17
|
+
background-color: var(--dile-crud-detail-data-background-color, #f5f5f5);
|
|
18
18
|
padding: 1rem;
|
|
19
19
|
border-top-left-radius: 0.6rem;
|
|
20
20
|
border-top-right-radius: 0.6rem;
|
|
@@ -115,6 +115,7 @@ export class DileCrudSingle extends DileI18nMixin(DileCrudMixin(LitElement)) {
|
|
|
115
115
|
endpoint=${this.config.endpoint}
|
|
116
116
|
@crud-action-success=${this.actionSuccess}
|
|
117
117
|
language="${this.language}"
|
|
118
|
+
.element=${this.element}
|
|
118
119
|
></dile-crud-single-actions>
|
|
119
120
|
`
|
|
120
121
|
}
|
package/lib/i18n/en.js
CHANGED
|
@@ -3,6 +3,7 @@ export const translations = {
|
|
|
3
3
|
http_404: "Not found error",
|
|
4
4
|
http_401: "Unauthorized",
|
|
5
5
|
http_405: "Method Not Allowed",
|
|
6
|
+
http_413: "Content Too Large",
|
|
6
7
|
http_419: "Your session has expired. Please refresh the page",
|
|
7
8
|
http_502: "Connection error, invalid gateway",
|
|
8
9
|
http_504: "Connection timeout with the gateway",
|
package/lib/i18n/es.js
CHANGED
|
@@ -3,6 +3,7 @@ export const translations = {
|
|
|
3
3
|
http_404: "Recurso inexistente",
|
|
4
4
|
http_401: "No autorizado",
|
|
5
5
|
http_405: "Método HTTP no permitido",
|
|
6
|
+
http_413: "Contenido enviado al servidor demasiado largo",
|
|
6
7
|
http_419: "La sesión ha expirado. Refresca la página.",
|
|
7
8
|
http_502: "Error de conexión, gateway no válido",
|
|
8
9
|
http_504: "Error de timeout con el gateway",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dile/crud",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.52",
|
|
4
4
|
"description": "Components to create a generic crud system based on Web Components and Lit",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
},
|
|
25
25
|
"homepage": "https://dile-components.polydile.com/",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@dile/ui": "^2.1.
|
|
27
|
+
"@dile/ui": "^2.1.28",
|
|
28
28
|
"axios": "^1.7.2",
|
|
29
29
|
"lit": "^2.7.0 || ^3.0.0"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "2ff303719dd914f0beeee873b285466e3c8eadf5"
|
|
35
35
|
}
|