@everymatrix/helper-accordion 1.43.4 → 1.45.0

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.
Files changed (49) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/helper-accordion.cjs.entry.js +81 -115
  3. package/dist/cjs/helper-accordion.cjs.js +16 -10
  4. package/dist/cjs/index-a21d4625.js +1205 -0
  5. package/dist/cjs/loader.cjs.js +6 -12
  6. package/dist/collection/collection-manifest.json +3 -3
  7. package/dist/collection/components/helper-accordion/helper-accordion.js +315 -349
  8. package/dist/collection/components/helper-accordion/index.js +1 -0
  9. package/dist/collection/utils/locale.utils.js +17 -17
  10. package/dist/collection/utils/utils.js +1 -1
  11. package/dist/esm/app-globals-0f993ce5.js +3 -0
  12. package/dist/esm/helper-accordion.entry.js +81 -115
  13. package/dist/esm/helper-accordion.js +13 -10
  14. package/dist/esm/index-3a075c05.js +1178 -0
  15. package/dist/esm/loader.js +6 -12
  16. package/dist/helper-accordion/helper-accordion.esm.js +1 -1
  17. package/dist/helper-accordion/p-0ea524aa.js +2 -0
  18. package/dist/helper-accordion/p-9f0e8fda.entry.js +1 -0
  19. package/dist/helper-accordion/p-e1255160.js +1 -0
  20. package/dist/stencil.config.dev.js +17 -0
  21. package/dist/stencil.config.js +14 -19
  22. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/helper-accordion/.stencil/packages/stencil/helper-accordion/stencil.config.d.ts +2 -0
  23. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/helper-accordion/.stencil/packages/stencil/helper-accordion/stencil.config.dev.d.ts +2 -0
  24. package/dist/types/components/helper-accordion/helper-accordion.d.ts +62 -62
  25. package/dist/types/components/helper-accordion/index.d.ts +1 -0
  26. package/dist/types/components.d.ts +16 -1
  27. package/dist/types/stencil-public-runtime.d.ts +142 -33
  28. package/loader/cdn.js +1 -3
  29. package/loader/index.cjs.js +1 -3
  30. package/loader/index.d.ts +13 -1
  31. package/loader/index.es2017.js +1 -3
  32. package/loader/index.js +1 -3
  33. package/loader/package.json +1 -0
  34. package/package.json +8 -1
  35. package/dist/cjs/index-ed89de9c.js +0 -1191
  36. package/dist/components/helper-accordion.d.ts +0 -11
  37. package/dist/components/helper-accordion.js +0 -161
  38. package/dist/components/index.d.ts +0 -26
  39. package/dist/components/index.js +0 -1
  40. package/dist/esm/index-a87a3869.js +0 -1165
  41. package/dist/esm/polyfills/core-js.js +0 -11
  42. package/dist/esm/polyfills/css-shim.js +0 -1
  43. package/dist/esm/polyfills/dom.js +0 -79
  44. package/dist/esm/polyfills/es5-html-element.js +0 -1
  45. package/dist/esm/polyfills/index.js +0 -34
  46. package/dist/esm/polyfills/system.js +0 -6
  47. package/dist/helper-accordion/p-7391c647.entry.js +0 -1
  48. package/dist/helper-accordion/p-a8ce3eea.js +0 -1
  49. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/helper-accordion/.stencil/packages/helper-accordion/stencil.config.d.ts +0 -2
@@ -1,353 +1,319 @@
1
- import { Component, Prop, h, State, Event } from '@stencil/core';
2
- import { translate } from '../../utils/locale.utils';
3
- export class Accordion {
4
- constructor() {
5
- /**
6
- * Flag for ticket history
7
- */
8
- this.ticketHistoryFlag = false;
9
- /**
10
- * Title (top header)
11
- */
12
- this.headerTitle = '';
13
- /**
14
- * SubTitle (top header)
15
- */
16
- this.headerSubtitle = '';
17
- /**
18
- * Description
19
- */
20
- this.description = '';
21
- /**
22
- * Enables footer content
23
- */
24
- this.footer = false;
25
- /**
26
- * Enables footer button for tab deletion
27
- */
28
- this.deleteTab = false;
29
- /**
30
- * Activates postMessages as events for actions from the widget
31
- */
32
- this.postMessage = false;
33
- /**
34
- * Name of the event emitter by the action button
35
- */
36
- this.eventName = 'helperAccordionAction';
37
- /**
38
- * Collapsed
39
- */
40
- this.collapsed = true;
41
- /**
42
- * Language
43
- */
44
- this.language = 'en';
45
- /**
46
- * Client custom styling via string
47
- */
48
- this.clientStyling = '';
49
- /**
50
- * Client custom styling via url content
51
- */
52
- this.clientStylingUrlContent = '';
53
- this.limitStylingAppends = false;
54
- this.setClientStyling = () => {
55
- let sheet = document.createElement('style');
56
- sheet.innerHTML = this.clientStyling;
57
- this.stylingContainer.prepend(sheet);
58
- };
59
- this.setClientStylingURL = () => {
60
- let cssFile = document.createElement('style');
61
- setTimeout(() => {
62
- cssFile.innerHTML = this.clientStylingUrlContent;
63
- this.stylingContainer.prepend(cssFile);
64
- }, 1);
65
- };
66
- }
67
- // @TODO fix the `any` type :)
68
- connectedCallback() {
69
- this.showContent = !this.collapsed;
70
- }
71
- componentDidRender() {
72
- // start custom styling area
73
- if (!this.limitStylingAppends && this.stylingContainer) {
74
- if (this.clientStyling)
75
- this.setClientStyling();
76
- if (this.clientStylingUrlContent)
77
- this.setClientStylingURL();
78
- this.limitStylingAppends = true;
1
+ import { h } from "@stencil/core";
2
+ import { translate } from "../../utils/locale.utils";
3
+ export class HelperAccordion {
4
+ constructor() {
5
+ this.setClientStyling = () => {
6
+ let sheet = document.createElement('style');
7
+ sheet.innerHTML = this.clientStyling;
8
+ this.stylingContainer.prepend(sheet);
9
+ };
10
+ this.setClientStylingURL = () => {
11
+ let cssFile = document.createElement('style');
12
+ setTimeout(() => {
13
+ cssFile.innerHTML = this.clientStylingUrlContent;
14
+ this.stylingContainer.prepend(cssFile);
15
+ }, 1);
16
+ };
17
+ this.ticketHistoryFlag = false;
18
+ this.headerTitle = '';
19
+ this.headerSubtitle = '';
20
+ this.description = '';
21
+ this.footer = false;
22
+ this.deleteTab = false;
23
+ this.postMessage = false;
24
+ this.eventName = 'helperAccordionAction';
25
+ this.collapsed = true;
26
+ this.language = 'en';
27
+ this.clientStyling = '';
28
+ this.clientStylingUrlContent = '';
29
+ this.showContent = undefined;
30
+ this.limitStylingAppends = false;
79
31
  }
80
- // end custom styling area
81
- }
82
- toggleContent() {
83
- this.showContent = !this.showContent;
84
- }
85
- deleteAction() {
86
- if (this.postMessage) {
87
- // @TODO maybe change the name type, this one sucks
88
- window.postMessage({ type: this.eventName }, window.location.href);
32
+ // @TODO fix the `any` type :)
33
+ connectedCallback() {
34
+ this.showContent = !this.collapsed;
89
35
  }
90
- this.accordionEvent.emit();
91
- }
92
- render() {
93
- return (h("div", { class: "Wrapper", ref: el => this.stylingContainer = el },
94
- h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header', onClick: () => this.toggleContent() },
95
- h("p", { class: "Title" }, this.headerTitle),
96
- h("p", { class: "Subtitle" }, this.headerSubtitle),
97
- h("p", { class: "Subtitle Description" }, this.description),
98
- h("span", { class: "Expand" }, this.showContent ? '<' : '>')),
99
- this.showContent &&
100
- h("div", null,
101
- h("div", { class: "Content" },
102
- h("slot", { name: 'accordionContent' }),
103
- this.footer && this.showContent &&
104
- h("div", null, this.deleteTab &&
105
- h("span", { class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
106
- }
107
- static get is() { return "helper-accordion"; }
108
- static get encapsulation() { return "shadow"; }
109
- static get originalStyleUrls() { return {
110
- "$": ["helper-accordion.scss"]
111
- }; }
112
- static get styleUrls() { return {
113
- "$": ["helper-accordion.css"]
114
- }; }
115
- static get properties() { return {
116
- "ticketHistoryFlag": {
117
- "type": "boolean",
118
- "mutable": false,
119
- "complexType": {
120
- "original": "boolean",
121
- "resolved": "boolean",
122
- "references": {}
123
- },
124
- "required": false,
125
- "optional": false,
126
- "docs": {
127
- "tags": [],
128
- "text": "Flag for ticket history"
129
- },
130
- "attribute": "ticket-history-flag",
131
- "reflect": true,
132
- "defaultValue": "false"
133
- },
134
- "headerTitle": {
135
- "type": "string",
136
- "mutable": false,
137
- "complexType": {
138
- "original": "string",
139
- "resolved": "string",
140
- "references": {}
141
- },
142
- "required": false,
143
- "optional": false,
144
- "docs": {
145
- "tags": [],
146
- "text": "Title (top header)"
147
- },
148
- "attribute": "header-title",
149
- "reflect": true,
150
- "defaultValue": "''"
151
- },
152
- "headerSubtitle": {
153
- "type": "string",
154
- "mutable": false,
155
- "complexType": {
156
- "original": "string",
157
- "resolved": "string",
158
- "references": {}
159
- },
160
- "required": false,
161
- "optional": false,
162
- "docs": {
163
- "tags": [],
164
- "text": "SubTitle (top header)"
165
- },
166
- "attribute": "header-subtitle",
167
- "reflect": true,
168
- "defaultValue": "''"
169
- },
170
- "description": {
171
- "type": "string",
172
- "mutable": false,
173
- "complexType": {
174
- "original": "string",
175
- "resolved": "string",
176
- "references": {}
177
- },
178
- "required": false,
179
- "optional": false,
180
- "docs": {
181
- "tags": [],
182
- "text": "Description"
183
- },
184
- "attribute": "description",
185
- "reflect": true,
186
- "defaultValue": "''"
187
- },
188
- "footer": {
189
- "type": "boolean",
190
- "mutable": false,
191
- "complexType": {
192
- "original": "boolean",
193
- "resolved": "boolean",
194
- "references": {}
195
- },
196
- "required": false,
197
- "optional": false,
198
- "docs": {
199
- "tags": [],
200
- "text": "Enables footer content"
201
- },
202
- "attribute": "footer",
203
- "reflect": true,
204
- "defaultValue": "false"
205
- },
206
- "deleteTab": {
207
- "type": "boolean",
208
- "mutable": false,
209
- "complexType": {
210
- "original": "boolean",
211
- "resolved": "boolean",
212
- "references": {}
213
- },
214
- "required": false,
215
- "optional": false,
216
- "docs": {
217
- "tags": [],
218
- "text": "Enables footer button for tab deletion"
219
- },
220
- "attribute": "delete-tab",
221
- "reflect": true,
222
- "defaultValue": "false"
223
- },
224
- "postMessage": {
225
- "type": "boolean",
226
- "mutable": false,
227
- "complexType": {
228
- "original": "boolean",
229
- "resolved": "boolean",
230
- "references": {}
231
- },
232
- "required": false,
233
- "optional": false,
234
- "docs": {
235
- "tags": [],
236
- "text": "Activates postMessages as events for actions from the widget"
237
- },
238
- "attribute": "post-message",
239
- "reflect": true,
240
- "defaultValue": "false"
241
- },
242
- "eventName": {
243
- "type": "string",
244
- "mutable": false,
245
- "complexType": {
246
- "original": "string",
247
- "resolved": "string",
248
- "references": {}
249
- },
250
- "required": false,
251
- "optional": false,
252
- "docs": {
253
- "tags": [],
254
- "text": "Name of the event emitter by the action button"
255
- },
256
- "attribute": "event-name",
257
- "reflect": true,
258
- "defaultValue": "'helperAccordionAction'"
259
- },
260
- "collapsed": {
261
- "type": "boolean",
262
- "mutable": false,
263
- "complexType": {
264
- "original": "boolean",
265
- "resolved": "boolean",
266
- "references": {}
267
- },
268
- "required": false,
269
- "optional": false,
270
- "docs": {
271
- "tags": [],
272
- "text": "Collapsed"
273
- },
274
- "attribute": "collapsed",
275
- "reflect": true,
276
- "defaultValue": "true"
277
- },
278
- "language": {
279
- "type": "string",
280
- "mutable": false,
281
- "complexType": {
282
- "original": "string",
283
- "resolved": "string",
284
- "references": {}
285
- },
286
- "required": false,
287
- "optional": false,
288
- "docs": {
289
- "tags": [],
290
- "text": "Language"
291
- },
292
- "attribute": "language",
293
- "reflect": true,
294
- "defaultValue": "'en'"
295
- },
296
- "clientStyling": {
297
- "type": "string",
298
- "mutable": false,
299
- "complexType": {
300
- "original": "string",
301
- "resolved": "string",
302
- "references": {}
303
- },
304
- "required": false,
305
- "optional": false,
306
- "docs": {
307
- "tags": [],
308
- "text": "Client custom styling via string"
309
- },
310
- "attribute": "client-styling",
311
- "reflect": true,
312
- "defaultValue": "''"
313
- },
314
- "clientStylingUrlContent": {
315
- "type": "string",
316
- "mutable": false,
317
- "complexType": {
318
- "original": "string",
319
- "resolved": "string",
320
- "references": {}
321
- },
322
- "required": false,
323
- "optional": false,
324
- "docs": {
325
- "tags": [],
326
- "text": "Client custom styling via url content"
327
- },
328
- "attribute": "client-styling-url-content",
329
- "reflect": true,
330
- "defaultValue": "''"
36
+ componentDidRender() {
37
+ // start custom styling area
38
+ if (!this.limitStylingAppends && this.stylingContainer) {
39
+ if (this.clientStyling)
40
+ this.setClientStyling();
41
+ if (this.clientStylingUrlContent)
42
+ this.setClientStylingURL();
43
+ this.limitStylingAppends = true;
44
+ }
45
+ // end custom styling area
46
+ }
47
+ toggleContent() {
48
+ this.showContent = !this.showContent;
49
+ }
50
+ deleteAction() {
51
+ if (this.postMessage) {
52
+ // @TODO maybe change the name type, this one sucks
53
+ window.postMessage({ type: this.eventName }, window.location.href);
54
+ }
55
+ this.accordionEvent.emit();
56
+ }
57
+ render() {
58
+ return (h("div", { key: 'ad26faefd6e3dd089171c7e2bff13faa5a26d972', class: "Wrapper", ref: el => this.stylingContainer = el }, h("div", { key: 'bb7045653ec12a2526029589744f7ef014ec6a6a', class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header', onClick: () => this.toggleContent() }, h("p", { key: 'ae30943582063e368e942124d8d5acadc1732629', class: "Title" }, this.headerTitle), h("p", { key: '7c35076cb768de784177988900c61fe40a71594c', class: "Subtitle" }, this.headerSubtitle), h("p", { key: 'daff2b456a427f45b00efc32ba33a68cdc2228f0', class: "Subtitle Description" }, this.description), h("span", { key: '0c4f942642da6e8b1ac3d2aeac46034963965d8f', class: "Expand" }, this.showContent ? '<' : '>')), this.showContent &&
59
+ h("div", { key: 'c688ab7cc629a3974b905a2fdc43063e996a3b90' }, h("div", { key: 'aaa3ad7d9f1503b8e1baaa2c756376a580ffe261', class: "Content" }, h("slot", { key: '8c5c8ff70857da9414c7284b052a3fbc5f503f4a', name: 'accordionContent' }), this.footer && this.showContent &&
60
+ h("div", { key: '917191f55a45647d708a5e3ff5e188c7e565a0c0' }, this.deleteTab &&
61
+ h("span", { key: 'e7fdd5b4f18cacaceda206b36ce9576cc3fc1472', class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
62
+ }
63
+ static get is() { return "helper-accordion"; }
64
+ static get encapsulation() { return "shadow"; }
65
+ static get originalStyleUrls() {
66
+ return {
67
+ "$": ["helper-accordion.scss"]
68
+ };
69
+ }
70
+ static get styleUrls() {
71
+ return {
72
+ "$": ["helper-accordion.css"]
73
+ };
74
+ }
75
+ static get properties() {
76
+ return {
77
+ "ticketHistoryFlag": {
78
+ "type": "boolean",
79
+ "mutable": false,
80
+ "complexType": {
81
+ "original": "boolean",
82
+ "resolved": "boolean",
83
+ "references": {}
84
+ },
85
+ "required": false,
86
+ "optional": false,
87
+ "docs": {
88
+ "tags": [],
89
+ "text": "Flag for ticket history"
90
+ },
91
+ "attribute": "ticket-history-flag",
92
+ "reflect": true,
93
+ "defaultValue": "false"
94
+ },
95
+ "headerTitle": {
96
+ "type": "string",
97
+ "mutable": false,
98
+ "complexType": {
99
+ "original": "string",
100
+ "resolved": "string",
101
+ "references": {}
102
+ },
103
+ "required": false,
104
+ "optional": false,
105
+ "docs": {
106
+ "tags": [],
107
+ "text": "Title (top header)"
108
+ },
109
+ "attribute": "header-title",
110
+ "reflect": true,
111
+ "defaultValue": "''"
112
+ },
113
+ "headerSubtitle": {
114
+ "type": "string",
115
+ "mutable": false,
116
+ "complexType": {
117
+ "original": "string",
118
+ "resolved": "string",
119
+ "references": {}
120
+ },
121
+ "required": false,
122
+ "optional": false,
123
+ "docs": {
124
+ "tags": [],
125
+ "text": "SubTitle (top header)"
126
+ },
127
+ "attribute": "header-subtitle",
128
+ "reflect": true,
129
+ "defaultValue": "''"
130
+ },
131
+ "description": {
132
+ "type": "string",
133
+ "mutable": false,
134
+ "complexType": {
135
+ "original": "string",
136
+ "resolved": "string",
137
+ "references": {}
138
+ },
139
+ "required": false,
140
+ "optional": false,
141
+ "docs": {
142
+ "tags": [],
143
+ "text": "Description"
144
+ },
145
+ "attribute": "description",
146
+ "reflect": true,
147
+ "defaultValue": "''"
148
+ },
149
+ "footer": {
150
+ "type": "boolean",
151
+ "mutable": false,
152
+ "complexType": {
153
+ "original": "boolean",
154
+ "resolved": "boolean",
155
+ "references": {}
156
+ },
157
+ "required": false,
158
+ "optional": false,
159
+ "docs": {
160
+ "tags": [],
161
+ "text": "Enables footer content"
162
+ },
163
+ "attribute": "footer",
164
+ "reflect": true,
165
+ "defaultValue": "false"
166
+ },
167
+ "deleteTab": {
168
+ "type": "boolean",
169
+ "mutable": false,
170
+ "complexType": {
171
+ "original": "boolean",
172
+ "resolved": "boolean",
173
+ "references": {}
174
+ },
175
+ "required": false,
176
+ "optional": false,
177
+ "docs": {
178
+ "tags": [],
179
+ "text": "Enables footer button for tab deletion"
180
+ },
181
+ "attribute": "delete-tab",
182
+ "reflect": true,
183
+ "defaultValue": "false"
184
+ },
185
+ "postMessage": {
186
+ "type": "boolean",
187
+ "mutable": false,
188
+ "complexType": {
189
+ "original": "boolean",
190
+ "resolved": "boolean",
191
+ "references": {}
192
+ },
193
+ "required": false,
194
+ "optional": false,
195
+ "docs": {
196
+ "tags": [],
197
+ "text": "Activates postMessages as events for actions from the widget"
198
+ },
199
+ "attribute": "post-message",
200
+ "reflect": true,
201
+ "defaultValue": "false"
202
+ },
203
+ "eventName": {
204
+ "type": "string",
205
+ "mutable": false,
206
+ "complexType": {
207
+ "original": "string",
208
+ "resolved": "string",
209
+ "references": {}
210
+ },
211
+ "required": false,
212
+ "optional": false,
213
+ "docs": {
214
+ "tags": [],
215
+ "text": "Name of the event emitter by the action button"
216
+ },
217
+ "attribute": "event-name",
218
+ "reflect": true,
219
+ "defaultValue": "'helperAccordionAction'"
220
+ },
221
+ "collapsed": {
222
+ "type": "boolean",
223
+ "mutable": false,
224
+ "complexType": {
225
+ "original": "boolean",
226
+ "resolved": "boolean",
227
+ "references": {}
228
+ },
229
+ "required": false,
230
+ "optional": false,
231
+ "docs": {
232
+ "tags": [],
233
+ "text": "Collapsed"
234
+ },
235
+ "attribute": "collapsed",
236
+ "reflect": true,
237
+ "defaultValue": "true"
238
+ },
239
+ "language": {
240
+ "type": "string",
241
+ "mutable": false,
242
+ "complexType": {
243
+ "original": "string",
244
+ "resolved": "string",
245
+ "references": {}
246
+ },
247
+ "required": false,
248
+ "optional": false,
249
+ "docs": {
250
+ "tags": [],
251
+ "text": "Language"
252
+ },
253
+ "attribute": "language",
254
+ "reflect": true,
255
+ "defaultValue": "'en'"
256
+ },
257
+ "clientStyling": {
258
+ "type": "string",
259
+ "mutable": false,
260
+ "complexType": {
261
+ "original": "string",
262
+ "resolved": "string",
263
+ "references": {}
264
+ },
265
+ "required": false,
266
+ "optional": false,
267
+ "docs": {
268
+ "tags": [],
269
+ "text": "Client custom styling via string"
270
+ },
271
+ "attribute": "client-styling",
272
+ "reflect": true,
273
+ "defaultValue": "''"
274
+ },
275
+ "clientStylingUrlContent": {
276
+ "type": "string",
277
+ "mutable": false,
278
+ "complexType": {
279
+ "original": "string",
280
+ "resolved": "string",
281
+ "references": {}
282
+ },
283
+ "required": false,
284
+ "optional": false,
285
+ "docs": {
286
+ "tags": [],
287
+ "text": "Client custom styling via url content"
288
+ },
289
+ "attribute": "client-styling-url-content",
290
+ "reflect": true,
291
+ "defaultValue": "''"
292
+ }
293
+ };
294
+ }
295
+ static get states() {
296
+ return {
297
+ "showContent": {},
298
+ "limitStylingAppends": {}
299
+ };
300
+ }
301
+ static get events() {
302
+ return [{
303
+ "method": "accordionEvent",
304
+ "name": "helperAccordionAction",
305
+ "bubbles": true,
306
+ "cancelable": true,
307
+ "composed": true,
308
+ "docs": {
309
+ "tags": [],
310
+ "text": "Action event"
311
+ },
312
+ "complexType": {
313
+ "original": "any",
314
+ "resolved": "any",
315
+ "references": {}
316
+ }
317
+ }];
331
318
  }
332
- }; }
333
- static get states() { return {
334
- "showContent": {},
335
- "limitStylingAppends": {}
336
- }; }
337
- static get events() { return [{
338
- "method": "accordionEvent",
339
- "name": "helperAccordionAction",
340
- "bubbles": true,
341
- "cancelable": true,
342
- "composed": true,
343
- "docs": {
344
- "tags": [],
345
- "text": "Action event"
346
- },
347
- "complexType": {
348
- "original": "any",
349
- "resolved": "any",
350
- "references": {}
351
- }
352
- }]; }
353
319
  }