@dile/crud 1.1.16 → 1.2.1

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.
@@ -72,6 +72,7 @@ export class DileAjaxForm extends DileI18nMixin(LitElement) {
72
72
  actionIcon: { type: Object },
73
73
  cancelIcon: { type: Object },
74
74
  disableClearAfterInsert: { type: Boolean },
75
+ hideActions: { type: Boolean },
75
76
  };
76
77
  }
77
78
 
@@ -139,20 +140,24 @@ export class DileAjaxForm extends DileI18nMixin(LitElement) {
139
140
  }
140
141
 
141
142
  get actionsTemplate() {
142
- return html`
143
- <div class="actions">
144
- ${this.actionIcon
145
- ? html`<a href="#" @click=${this.doActionHandler}><dile-icon .icon=${this.actionIcon} class="actionIcon"></dile-icon></a>`
146
- : html`<dile-button @click=${this.doActionHandler}>${this.actionLabelComputed(this.actionLabel, this.translations, this.operation)}</dile-button>`
147
- }
148
- ${this.showCancelButton ?
149
- this.cancelIcon
150
- ? html`<a href="#" @click=${this.doCancel}><dile-icon @click=${this.doActionHandler} .icon=${this.cancelIcon} class="cancelIcon"></dile-icon></a>`
151
- : html`<dile-button class="cancel_button" @click=${this.doCancel}>${this.cancelLabelComputed(this.cancelLabel, this.translations)}</dile-button>`
152
- : ''
153
- }
154
- </div>
155
- `
143
+ if(! this.hideActions) {
144
+ return html`
145
+ <div class="actions">
146
+ ${this.actionIcon
147
+ ? html`<a href="#" @click=${this.doActionHandler}><dile-icon .icon=${this.actionIcon} class="actionIcon"></dile-icon></a>`
148
+ : html`<dile-button @click=${this.doActionHandler}>${this.actionLabelComputed(this.actionLabel, this.translations, this.operation)}</dile-button>`
149
+ }
150
+ ${this.showCancelButton ?
151
+ this.cancelIcon
152
+ ? html`<a href="#" @click=${this.doCancel}><dile-icon @click=${this.doActionHandler} .icon=${this.cancelIcon} class="cancelIcon"></dile-icon></a>`
153
+ : html`<dile-button class="cancel_button" @click=${this.doCancel}>${this.cancelLabelComputed(this.cancelLabel, this.translations)}</dile-button>`
154
+ : ''
155
+ }
156
+ </div>
157
+ `
158
+ } else {
159
+ return '';
160
+ }
156
161
  }
157
162
 
158
163
  get ajaxComponents() {
package/lib/DileAxios.js CHANGED
@@ -9,6 +9,6 @@ export const DileAxios = (superclass) => class extends superclass {
9
9
  return window.axios;
10
10
  }
11
11
  new AxiosInstanceBuilder()
12
- return window.axiosInstance;
12
+ return window.axios;
13
13
  }
14
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dile/crud",
3
- "version": "1.1.16",
3
+ "version": "1.2.1",
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": "31777823912710d0021be2c8fb015e775949ace0"
34
+ "gitHead": "854729a2ca7983da202b88965dbb19e5ac1a73c4"
35
35
  }