@dile/crud 1.12.3 → 1.12.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.
- package/components/detail/src/DileCrudDetail.js +2 -8
- package/components/insert/src/DileCrudInsert.js +2 -0
- package/components/many-relation/src/DileManyRelation.js +10 -6
- package/components/update/src/DileCrudUpdate.js +2 -0
- package/package.json +3 -3
- package/styles/crud-styles.js +5 -2
- package/styles/form-styles.js +0 -4
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LitElement, html, css } from 'lit';
|
|
2
2
|
import { formStyles } from '../../../styles/form-styles.js';
|
|
3
|
+
import { crudStyles } from '../../../styles/crud-styles.js';
|
|
3
4
|
import { DileLoading, loadingStyles } from '../../../lib/DileLoading.js';
|
|
4
5
|
import '../../ajax/ajax.js';
|
|
5
6
|
import { ResponseApiAdapter } from '../../../lib/ResponseApiAdapter.js';
|
|
@@ -7,6 +8,7 @@ import { ResponseApiAdapter } from '../../../lib/ResponseApiAdapter.js';
|
|
|
7
8
|
export class DileCrudDetail extends DileLoading(LitElement) {
|
|
8
9
|
static styles = [
|
|
9
10
|
formStyles,
|
|
11
|
+
crudStyles,
|
|
10
12
|
loadingStyles,
|
|
11
13
|
css`
|
|
12
14
|
:host {
|
|
@@ -42,11 +44,6 @@ export class DileCrudDetail extends DileLoading(LitElement) {
|
|
|
42
44
|
padding: 0.25rem 0 0;
|
|
43
45
|
font-size: 0.85rem;
|
|
44
46
|
}
|
|
45
|
-
h1 {
|
|
46
|
-
font-size: 1.5rem;
|
|
47
|
-
margin-bottom: 0.5rem;
|
|
48
|
-
margin-top: 0;
|
|
49
|
-
}
|
|
50
47
|
aside {
|
|
51
48
|
padding: 1rem 0;
|
|
52
49
|
min-width: 32px;
|
|
@@ -61,9 +58,6 @@ export class DileCrudDetail extends DileLoading(LitElement) {
|
|
|
61
58
|
main {
|
|
62
59
|
--dile-icon-size: 64px;
|
|
63
60
|
}
|
|
64
|
-
h1 {
|
|
65
|
-
font-size: 1.8rem;
|
|
66
|
-
}
|
|
67
61
|
}
|
|
68
62
|
`
|
|
69
63
|
];
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { LitElement, html, css } from 'lit';
|
|
2
2
|
import '../../ajax-form/ajax-form.js'
|
|
3
3
|
import { formStyles } from '../../../styles/form-styles.js';
|
|
4
|
+
import { crudStyles } from '../../../styles/crud-styles.js';
|
|
4
5
|
import { ResponseApiAdapter } from '../../../lib/ResponseApiAdapter.js';
|
|
5
6
|
import { DileI18nMixin } from '../../../lib/DileI18nMixin.js';
|
|
6
7
|
|
|
7
8
|
export class DileCrudInsert extends DileI18nMixin(LitElement) {
|
|
8
9
|
static styles = [
|
|
9
10
|
formStyles,
|
|
11
|
+
crudStyles,
|
|
10
12
|
css`
|
|
11
13
|
|
|
12
14
|
`
|
|
@@ -257,7 +257,7 @@ export class DileManyRelation extends DileI18nMixin(LitElement) {
|
|
|
257
257
|
this._ajaxadd.generateRequest();
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
-
_onAddSuccess() {
|
|
260
|
+
_onAddSuccess(e) {
|
|
261
261
|
this._selectedId = null;
|
|
262
262
|
this._clearSelect();
|
|
263
263
|
this._refreshList();
|
|
@@ -265,11 +265,11 @@ export class DileManyRelation extends DileI18nMixin(LitElement) {
|
|
|
265
265
|
this.message = '';
|
|
266
266
|
this.errored = false;
|
|
267
267
|
}
|
|
268
|
-
this._dispatch('many-relation-add-success');
|
|
268
|
+
this._dispatch('many-relation-add-success', e.detail);
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
_onAddError() {
|
|
272
|
-
this._dispatch('many-relation-add-error');
|
|
271
|
+
_onAddError(e) {
|
|
272
|
+
this._dispatch('many-relation-add-error', e.detail);
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
_removeItem(item) {
|
|
@@ -312,8 +312,12 @@ export class DileManyRelation extends DileI18nMixin(LitElement) {
|
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
-
_dispatch(eventName) {
|
|
316
|
-
this.dispatchEvent(new CustomEvent(eventName, {
|
|
315
|
+
_dispatch(eventName, detail = null) {
|
|
316
|
+
this.dispatchEvent(new CustomEvent(eventName, {
|
|
317
|
+
bubbles: true,
|
|
318
|
+
composed: true,
|
|
319
|
+
detail
|
|
320
|
+
}));
|
|
317
321
|
}
|
|
318
322
|
|
|
319
323
|
addRelationLabelComputed(label, translations) {
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { LitElement, html, css } from 'lit';
|
|
2
2
|
import '../../ajax-form/ajax-form.js'
|
|
3
3
|
import { formStyles } from '../../../styles/form-styles.js';
|
|
4
|
+
import { crudStyles } from '../../../styles/crud-styles.js';
|
|
4
5
|
import { ResponseApiAdapter } from '../../../lib/ResponseApiAdapter.js';
|
|
5
6
|
import { DileI18nMixin } from '../../../lib/DileI18nMixin.js';
|
|
6
7
|
|
|
7
8
|
export class DileCrudUpdate extends DileI18nMixin(LitElement) {
|
|
8
9
|
static styles = [
|
|
9
10
|
formStyles,
|
|
11
|
+
crudStyles,
|
|
10
12
|
css`
|
|
11
13
|
|
|
12
14
|
`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dile/crud",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.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": {
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
},
|
|
25
25
|
"homepage": "https://dile-components.com/",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@dile/ui": "^2.
|
|
27
|
+
"@dile/ui": "^2.25.0",
|
|
28
28
|
"axios": "^1.16.0",
|
|
29
29
|
"lit": "^2.7.0 || ^3.0.0"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "f65c62d5678f82edf5c921058c7e25dfc6ee2922"
|
|
35
35
|
}
|
package/styles/crud-styles.js
CHANGED
package/styles/form-styles.js
CHANGED