@dile/crud 0.2.2 → 0.2.4

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.
@@ -341,6 +341,10 @@ export class DileCrud extends DileI18nMixin(DileCrudMixin(LitElement)) {
341
341
  this.removeActionItems(e.detail.data.delete_elems);
342
342
  }
343
343
  this.refresh();
344
+ if(this.config.onActionListSuccess) {
345
+ const handler = this.config.onActionListSuccess.bind(this);
346
+ handler(e.detail);
347
+ }
344
348
  }
345
349
 
346
350
  removeActionItems(idsArray) {
@@ -137,6 +137,10 @@ export class DileCrudSingle extends DileI18nMixin(DileCrudMixin(LitElement)) {
137
137
  if(e.detail.action != "DeleteAction") {
138
138
  this.refresh();
139
139
  }
140
+ if(this.config.onActionSingleSuccess) {
141
+ const handler = this.config.onActionSingleSuccess.bind(this);
142
+ handler(e.detail);
143
+ }
140
144
  }
141
145
 
142
146
  edit() {
@@ -68,16 +68,12 @@ export const defaultConfig = {
68
68
  formSingleActions: () => '',
69
69
  },
70
70
  labels: {
71
- // insertAction: 'Create',
72
- // updateAction: 'Save',
73
- // startUpdateAction: 'Edit',
74
- // insertWindowTitle: 'Create an item',
75
- // updateWindowTitle: 'Update an item',
76
- // helpTitle: 'Help',
77
- // helpButtonLabel: 'Help',
71
+
78
72
  },
79
73
  formIds: {
80
74
  insertForm: 'insertform',
81
75
  updateForm: 'updateform',
82
76
  },
77
+ onActionListSuccess(actionSuccessDetail) {},
78
+ onActionSingleSuccess(actionSuccessDetail) {},
83
79
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dile/crud",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
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": "631d93271645e9b413490ab0a9576c5f80026826"
34
+ "gitHead": "288f042877f824f3bbc38861ccca9ebd7e713f3d"
35
35
  }