@quandis/qbo4.ui 4.0.1-CI-20241108-002603 → 4.0.1-CI-20241108-204652

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 (56) hide show
  1. package/package.json +1 -1
  2. package/scss/qbo.scss +10 -88
  3. package/src/qbo/qbo-api.js +7 -5
  4. package/src/qbo/qbo-api.ts +1 -2
  5. package/src/qbo/qbo-card.js +7 -5
  6. package/src/qbo/qbo-card.ts +2 -4
  7. package/src/qbo/qbo-contextmenu.js +7 -5
  8. package/src/qbo/qbo-contextmenu.ts +1 -3
  9. package/src/qbo/qbo-datalist.js +7 -5
  10. package/src/qbo/qbo-datalist.ts +2 -4
  11. package/src/qbo/qbo-docviewer.js +7 -5
  12. package/src/qbo/qbo-docviewer.ts +1 -3
  13. package/src/qbo/qbo-fetch.js +0 -4
  14. package/src/qbo/qbo-fetch.ts +0 -3
  15. package/src/qbo/qbo-form-edit.js +7 -5
  16. package/src/qbo/qbo-form-edit.ts +1 -3
  17. package/src/qbo/qbo-form-element.js +12 -7
  18. package/src/qbo/qbo-form-element.ts +1 -2
  19. package/src/qbo/qbo-icon.js +11 -7
  20. package/src/qbo/qbo-icon.ts +1 -3
  21. package/src/qbo/qbo-microphone.js +11 -7
  22. package/src/qbo/qbo-microphone.ts +1 -3
  23. package/src/qbo/qbo-paginate.js +7 -5
  24. package/src/qbo/qbo-paginate.ts +1 -3
  25. package/src/qbo/qbo-popover.js +7 -5
  26. package/src/qbo/qbo-popover.ts +2 -4
  27. package/src/qbo/qbo-popup-listener.js +7 -5
  28. package/src/qbo/qbo-popup-listener.ts +1 -3
  29. package/src/qbo/qbo-popup.js +7 -5
  30. package/src/qbo/qbo-popup.ts +1 -3
  31. package/src/qbo/qbo-resize.js +7 -5
  32. package/src/qbo/qbo-resize.ts +2 -3
  33. package/src/qbo/qbo-select.js +7 -5
  34. package/src/qbo/qbo-select.ts +1 -3
  35. package/src/qbo/qbo-selectable.js +7 -5
  36. package/src/qbo/qbo-selectable.ts +1 -3
  37. package/src/qbo/qbo-table.js +7 -5
  38. package/src/qbo/qbo-table.ts +1 -2
  39. package/src/qbo/qbo-user-preferences.js +8 -5
  40. package/src/qbo/qbo-user-preferences.ts +1 -3
  41. package/src/qbo/qbo-validate.js +8 -5
  42. package/src/qbo/qbo-validate.ts +1 -3
  43. package/src/qbo/styles.js +2 -2
  44. package/src/qbo/styles.ts +2 -2
  45. package/wwwroot/css/qbo.css +9 -90
  46. package/wwwroot/css/qbo.css.map +1 -1
  47. package/wwwroot/css/qbo.min.css +1 -1
  48. package/wwwroot/css/qboui.css +9 -90
  49. package/wwwroot/css/qboui.css.map +1 -1
  50. package/wwwroot/css/qboui.min.css +1 -1
  51. package/wwwroot/js/esm/qbo4.ui.js +132 -89
  52. package/wwwroot/js/esm/qbo4.ui.min.js +25 -25
  53. package/wwwroot/js/esm/qbo4.ui.min.js.map +1 -1
  54. package/wwwroot/js/qbo4.ui.js +132 -89
  55. package/wwwroot/js/qbo4.ui.min.js +24 -24
  56. package/wwwroot/js/qbo4.ui.min.js.map +1 -1
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "author": "Quandis, Inc.",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
- "version": "4.0.1-CI-20241108-002603",
6
+ "version": "4.0.1-CI-20241108-204652",
7
7
  "workspaces": [
8
8
  "code"
9
9
  ],
package/scss/qbo.scss CHANGED
@@ -12,6 +12,7 @@
12
12
  --qbo-margin-vertical: 0.5rem;
13
13
  --qbo-focus-border-color: #80bdff;
14
14
  --qbo-focus-box-shadow: rgba(0, 123, 255, 0.25);
15
+
15
16
  --qbo-button-bg: #007bff;
16
17
  --qbo-button-border: #007bff;
17
18
  --qbo-button-bg-hover: #0056b3;
@@ -19,6 +20,7 @@
19
20
  --qbo-button-color: #ffffff;
20
21
  --qbo-button-padding: var(--qbo-padding); //0.375rem 0.75rem;
21
22
  --qbo-button-border-radius: var(--qbo-border-radius);
23
+
22
24
  --qbo-nav-color: #333;
23
25
  --qbo-nav-background-color: #999;
24
26
  --qbo-nav-background-hover: #81181d;
@@ -65,14 +67,6 @@
65
67
  --qbo-dark-border: #343a40;
66
68
  --qbo-dark-hover-bg: #23272b;
67
69
  --qbo-dark-hover-border: #1d2124;
68
- /* Button */
69
- --qbo-button-bg: #007bff;
70
- --qbo-button-color: #ffffff;
71
- --qbo-button-border: #007bff;
72
- --qbo-button-bg-hover: #0056b3;
73
- --qbo-button-border-hover: #004085;
74
- --qbo-button-padding: var(--qbo-padding); //0.375rem 0.75rem;
75
- --qbo-button-border-radius: var(--qbo-border-radius);
76
70
  }
77
71
 
78
72
  .qbo-theme-dark {
@@ -99,91 +93,23 @@
99
93
  }
100
94
 
101
95
  /* Default column styling */
102
- .qbo-col {
96
+ .qbo-card {
97
+ @extend .qbo-col;
103
98
  border: 1px solid var(--qbo-border-color);
104
- border-radius: .5em;
99
+ border-radius: var(--qbo-border-radius);
105
100
  box-shadow: 2px 2px 3px var(--qbo-border-color);
106
- box-sizing: border-box;
107
- flex: 1 0 0;
108
- min-width: 15rem;
109
- max-width: 100%;
110
101
  padding: .5em;
102
+ overflow: auto;
111
103
  }
112
104
 
113
- .qbo-col-left {
105
+ .qbo-card-left {
114
106
  margin-left: .5em;
115
107
  }
116
108
 
117
- .qbo-col-right {
109
+ .qbo-card-right {
118
110
  margin-right: .5em;
119
111
  }
120
112
 
121
- .qbo-row {
122
- display: flex;
123
- flex-wrap: wrap;
124
- gap: var(--qbo-margin); /* Use --qbo-margin as the gap */
125
- }
126
-
127
- .qbo-col-1 {
128
- flex: 0 0 calc(8.33% - (var(--qbo-margin) / 2));
129
- max-width: calc(8.33% - (var(--qbo-margin) / 2));
130
- }
131
-
132
- .qbo-col-2 {
133
- flex: 0 0 calc(16.66% - (var(--qbo-margin) / 2));
134
- max-width: calc(16.66% - (var(--qbo-margin) / 2));
135
- }
136
-
137
- .qbo-col-3 {
138
- flex: 0 0 calc(25% - (var(--qbo-margin) / 2));
139
- max-width: calc(25% - (var(--qbo-margin) / 2));
140
- }
141
-
142
- .qbo-col-4 {
143
- flex: 0 0 calc(33.33% - (var(--qbo-margin) / 2));
144
- max-width: calc(33.33% - (var(--qbo-margin) / 2));
145
- }
146
-
147
- .qbo-col-5 {
148
- flex: 0 0 calc(41.66% - (var(--qbo-margin) / 2));
149
- max-width: calc(41.66% - (var(--qbo-margin) / 2));
150
- }
151
-
152
- .qbo-col-6 {
153
- flex: 0 0 calc(50% - (var(--qbo-margin) / 2));
154
- max-width: calc(50% - (var(--qbo-margin) / 2));
155
- }
156
-
157
- .qbo-col-7 {
158
- flex: 0 0 calc(58.33% - (var(--qbo-margin) / 2));
159
- max-width: calc(58.33% - (var(--qbo-margin) / 2));
160
- }
161
-
162
- .qbo-col-8 {
163
- flex: 0 0 calc(66.66% - (var(--qbo-margin) / 2));
164
- max-width: calc(66.66% - (var(--qbo-margin) / 2));
165
- }
166
-
167
- .qbo-col-9 {
168
- flex: 0 0 calc(75% - (var(--qbo-margin) / 2));
169
- max-width: calc(75% - (var(--qbo-margin) / 2));
170
- }
171
-
172
- .qbo-col-10 {
173
- flex: 0 0 calc(83.33% - (var(--qbo-margin) / 2));
174
- max-width: calc(83.33% - (var(--qbo-margin) / 2));
175
- }
176
-
177
- .qbo-col-11 {
178
- flex: 0 0 calc(91.66% - (var(--qbo-margin) / 2));
179
- max-width: calc(91.66% - (var(--qbo-margin) / 2));
180
- }
181
-
182
- .qbo-col-12 {
183
- flex: 0 0 calc(100% - (var(--qbo-margin) / 2));
184
- max-width: calc(100% - (var(--qbo-margin) / 2));
185
- }
186
-
187
113
  svg {
188
114
  height: 1rem;
189
115
  width: 1rem;
@@ -198,7 +124,6 @@ svg {
198
124
  /* Default column styling */
199
125
  .qbo-col {
200
126
  flex: 1 0 0;
201
- xborder: 1px solid var(--qbo-border-color);
202
127
  max-width: 100%;
203
128
  box-sizing: border-box;
204
129
  }
@@ -333,7 +258,6 @@ svg {
333
258
  .qbo-form input[disabled],
334
259
  .qbo-form textarea[disabled],
335
260
  .qbo-form select[disabled] {
336
- xbackground-color: color-mix(in oklab, 15%, --qbo-color);
337
261
  color: color-mix( in oklab, var(--qbo-color) 50%, var(--qbo-background-color) );
338
262
  cursor: not-allowed;
339
263
  opacity: 1;
@@ -352,7 +276,7 @@ svg {
352
276
  padding: 0.375rem 0.75rem;
353
277
  font-size: 1rem;
354
278
  text-align: center;
355
- text-wrap-mode: nowrap;
279
+ white-space: nowrap;
356
280
  border-right: none;
357
281
  border-radius: 0.25rem 0 0 0.25rem;
358
282
  }
@@ -365,7 +289,6 @@ svg {
365
289
  font-size: 1rem;
366
290
  background-clip: padding-box;
367
291
  margin: 0;
368
- xborder-radius: 0 0;
369
292
  }
370
293
 
371
294
  .qbo-form .form-group {
@@ -485,7 +408,7 @@ button:disabled,
485
408
  /* Default column styling */
486
409
  .qbo-col {
487
410
  flex: 1 0 0;
488
- xborder: 1px solid var(--qbo-border-color);
411
+ min-width: calc(8.33% - (var(--qbo-margin) / 2));
489
412
  max-width: 100%;
490
413
  box-sizing: border-box;
491
414
  }
@@ -658,7 +581,6 @@ menu.qbo-toolbar {
658
581
  background-color: var(--qbo-border-color);
659
582
  text-decoration: none;
660
583
  line-height: 1.5;
661
- xborder-radius: 0; //var(--qbo-border-radius);
662
584
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
663
585
  }
664
586
  }
@@ -8,9 +8,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { LitElement, html } from 'lit';
11
- import { property } from 'lit/decorators.js';
11
+ import { customElement, property } from 'lit/decorators.js';
12
12
  import { registerRestApi } from './RestApiService.js';
13
- export class QboApiElement extends LitElement {
13
+ let QboApiElement = class QboApiElement extends LitElement {
14
14
  constructor() {
15
15
  super(...arguments);
16
16
  this.name = null;
@@ -46,7 +46,7 @@ export class QboApiElement extends LitElement {
46
46
  // Render nothing, as this component is for configuration purposes only
47
47
  return html ``;
48
48
  }
49
- }
49
+ };
50
50
  __decorate([
51
51
  property({ type: String }),
52
52
  __metadata("design:type", Object)
@@ -59,5 +59,7 @@ __decorate([
59
59
  property(),
60
60
  __metadata("design:type", Object)
61
61
  ], QboApiElement.prototype, "method", void 0);
62
- if (!customElements.get('qbo-api'))
63
- customElements.define('qbo-api', QboApiElement);
62
+ QboApiElement = __decorate([
63
+ customElement('qbo-api')
64
+ ], QboApiElement);
65
+ export { QboApiElement };
@@ -2,6 +2,7 @@
2
2
  import { customElement, property } from 'lit/decorators.js';
3
3
  import { registerRestApi } from './RestApiService.js';
4
4
 
5
+ @customElement('qbo-api')
5
6
  export class QboApiElement extends LitElement {
6
7
  @property({ type: String })
7
8
  name: string | null = null;
@@ -51,5 +52,3 @@ export class QboApiElement extends LitElement {
51
52
  }
52
53
  }
53
54
 
54
- if (!customElements.get('qbo-api'))
55
- customElements.define('qbo-api', QboApiElement)
@@ -8,8 +8,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { LitElement, css, html } from "lit";
11
- import { property } from "lit/decorators.js";
12
- export class QboCard extends LitElement {
11
+ import { customElement, property } from "lit/decorators.js";
12
+ let QboCard = class QboCard extends LitElement {
13
13
  constructor() {
14
14
  super(...arguments);
15
15
  this.display = 'normal';
@@ -95,7 +95,7 @@ export class QboCard extends LitElement {
95
95
  render() {
96
96
  return html `<slot></slot>`;
97
97
  }
98
- }
98
+ };
99
99
  __decorate([
100
100
  property({ reflect: true }),
101
101
  __metadata("design:type", String)
@@ -112,5 +112,7 @@ __decorate([
112
112
  property(),
113
113
  __metadata("design:type", Object)
114
114
  ], QboCard.prototype, "columns", void 0);
115
- if (!customElements.get('qbo-card'))
116
- customElements.define('qbo-card', QboCard);
115
+ QboCard = __decorate([
116
+ customElement('qbo-card')
117
+ ], QboCard);
118
+ export { QboCard };
@@ -4,6 +4,7 @@ import { QboIcon } from "./qbo-icon.js";
4
4
 
5
5
  export type DisplayState = 'normal' | 'minimize' | 'maximize';
6
6
 
7
+ @customElement('qbo-card')
7
8
  export class QboCard extends LitElement {
8
9
 
9
10
  static styles = [
@@ -111,7 +112,4 @@ export class QboCard extends LitElement {
111
112
  render() {
112
113
  return html`<slot></slot>`;
113
114
  }
114
- }
115
-
116
- if (!customElements.get('qbo-card'))
117
- customElements.define('qbo-card', QboCard)
115
+ }
@@ -8,9 +8,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { LitElement, html } from 'lit';
11
- import { property, state } from 'lit/decorators.js';
11
+ import { customElement, property, state } from 'lit/decorators.js';
12
12
  import { qboui } from './styles.js';
13
- export class ContextMenu extends LitElement {
13
+ let ContextMenu = class ContextMenu extends LitElement {
14
14
  constructor() {
15
15
  super(...arguments);
16
16
  this._open = false;
@@ -85,7 +85,7 @@ export class ContextMenu extends LitElement {
85
85
  render() {
86
86
  return html `${this._open ? html `<slot></slot>` : ''}`;
87
87
  }
88
- }
88
+ };
89
89
  __decorate([
90
90
  state(),
91
91
  __metadata("design:type", Object)
@@ -94,5 +94,7 @@ __decorate([
94
94
  property({ type: String }),
95
95
  __metadata("design:type", Object)
96
96
  ], ContextMenu.prototype, "target", void 0);
97
- if (!customElements.get('qbo-contextmenu'))
98
- customElements.define('qbo-contextmenu', ContextMenu);
97
+ ContextMenu = __decorate([
98
+ customElement('qbo-contextmenu')
99
+ ], ContextMenu);
100
+ export { ContextMenu };
@@ -2,6 +2,7 @@
2
2
  import { customElement, property, state } from 'lit/decorators.js';
3
3
  import { qboui } from './styles.js';
4
4
 
5
+ @customElement('qbo-contextmenu')
5
6
  export class ContextMenu extends LitElement {
6
7
  static styles = [
7
8
  qboui
@@ -97,6 +98,3 @@ export class ContextMenu extends LitElement {
97
98
  return html`${this._open ? html`<slot></slot>` : ''}`;
98
99
  }
99
100
  }
100
-
101
- if (!customElements.get('qbo-contextmenu'))
102
- customElements.define('qbo-contextmenu', ContextMenu)
@@ -8,10 +8,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { html } from 'lit';
11
- import { property } from 'lit/decorators.js';
11
+ import { customElement, property } from 'lit/decorators.js';
12
12
  import { getArray } from './qbo-json.js';
13
13
  import { QboFetch } from './qbo-fetch.js';
14
- export class QboDataList extends QboFetch {
14
+ let QboDataList = class QboDataList extends QboFetch {
15
15
  constructor() {
16
16
  super(...arguments);
17
17
  this.listId = null;
@@ -91,7 +91,7 @@ export class QboDataList extends QboFetch {
91
91
  ${this.options.map(option => html `<option value="${option[this.text]}" data-value="${option[this.value]}"/>`)}
92
92
  </datalist>`;
93
93
  }
94
- }
94
+ };
95
95
  __decorate([
96
96
  property({ type: String }),
97
97
  __metadata("design:type", Object)
@@ -120,5 +120,7 @@ __decorate([
120
120
  property({ type: Boolean }),
121
121
  __metadata("design:type", Object)
122
122
  ], QboDataList.prototype, "fetchOnLoad", void 0);
123
- if (!customElements.get('qbo-datalist'))
124
- customElements.define('qbo-datalist', QboDataList);
123
+ QboDataList = __decorate([
124
+ customElement('qbo-datalist')
125
+ ], QboDataList);
126
+ export { QboDataList };
@@ -3,6 +3,7 @@ import { customElement, property } from 'lit/decorators.js';
3
3
  import { getArray } from './qbo-json.js';
4
4
  import { QboFetch } from './qbo-fetch.js';
5
5
 
6
+ @customElement('qbo-datalist')
6
7
  export class QboDataList extends QboFetch {
7
8
 
8
9
  @property({ type: String })
@@ -100,7 +101,4 @@ export class QboDataList extends QboFetch {
100
101
  ${this.options.map(option => html`<option value="${option[this.text!]}" data-value="${option[this.value!]}"/>`)}
101
102
  </datalist>`;
102
103
  }
103
- }
104
-
105
- if (!customElements.get('qbo-datalist'))
106
- customElements.define('qbo-datalist', QboDataList)
104
+ }
@@ -8,7 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { html, css } from 'lit';
11
- import { property } from 'lit/decorators.js';
11
+ import { customElement, property } from 'lit/decorators.js';
12
12
  import { QboFetch } from './qbo-fetch.js';
13
13
  /**
14
14
  * Renders a <select> element with options populated from a JSON array.
@@ -16,7 +16,7 @@ import { QboFetch } from './qbo-fetch.js';
16
16
  * @remarks
17
17
  * This element is a thin wrapper around {@link QboFetch} that renders a <select> element with options populated from a JSON array.
18
18
  */
19
- export class QboDocViewer extends QboFetch {
19
+ let QboDocViewer = class QboDocViewer extends QboFetch {
20
20
  constructor() {
21
21
  super(...arguments);
22
22
  this.open = false;
@@ -36,7 +36,7 @@ export class QboDocViewer extends QboFetch {
36
36
  render() {
37
37
  return html `<iframe src='sample.pdf' width='100%' height='800px' frameborder='0'></iframe>`;
38
38
  }
39
- }
39
+ };
40
40
  __decorate([
41
41
  property({ type: Boolean }),
42
42
  __metadata("design:type", Object)
@@ -49,5 +49,7 @@ __decorate([
49
49
  property({ type: Boolean }),
50
50
  __metadata("design:type", Object)
51
51
  ], QboDocViewer.prototype, "renderInHost", void 0);
52
- if (!customElements.get('qbo-docviewer'))
53
- customElements.define('qbo-docviewer', QboDocViewer);
52
+ QboDocViewer = __decorate([
53
+ customElement('qbo-docviewer')
54
+ ], QboDocViewer);
55
+ export { QboDocViewer };
@@ -9,6 +9,7 @@ import { unsafeHTML } from 'lit/directives/unsafe-html.js';
9
9
  * @remarks
10
10
  * This element is a thin wrapper around {@link QboFetch} that renders a <select> element with options populated from a JSON array.
11
11
  */
12
+ @customElement('qbo-docviewer')
12
13
  export class QboDocViewer extends QboFetch {
13
14
  @property({ type: Boolean })
14
15
  open = false;
@@ -36,6 +37,3 @@ export class QboDocViewer extends QboFetch {
36
37
  return html`<iframe src='sample.pdf' width='100%' height='800px' frameborder='0'></iframe>`;
37
38
  }
38
39
  }
39
-
40
- if (!customElements.get('qbo-docviewer'))
41
- customElements.define('qbo-docviewer', QboDocViewer)
@@ -59,10 +59,6 @@ export const QboFetchMixin = (superClass) => {
59
59
  console.error('Error parsing payload JSON:', error);
60
60
  }
61
61
  }
62
- else {
63
- if (Object.keys(this.dataset).length > 0)
64
- payload = { ...this.dataset };
65
- }
66
62
  return payload;
67
63
  }
68
64
  /* @description Fetch data from an api, and set @see {@link html} or @see {@link jsonData} with the result. */
@@ -88,9 +88,6 @@ export const QboFetchMixin = <T extends Constructor<LitElement>>(superClass: T)
88
88
  } catch (error) {
89
89
  console.error('Error parsing payload JSON:', error);
90
90
  }
91
- } else {
92
- if (Object.keys(this.dataset).length > 0)
93
- payload = { ...this.dataset } as Record<string, string>;
94
91
  }
95
92
  return payload;
96
93
  }
@@ -8,7 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { html, LitElement } from 'lit';
11
- import { property } from 'lit/decorators.js';
11
+ import { customElement, property } from 'lit/decorators.js';
12
12
  import { elementDateTime } from './Program.js';
13
13
  const formEditMap = new Map();
14
14
  formEditMap.set('defaultLayout', (component) => {
@@ -44,7 +44,7 @@ formEditMap.set('updatedLayout', (component) => {
44
44
  <span>${component.UpdatedPerson}</span>
45
45
  </div>`;
46
46
  });
47
- export class QboFormEdit extends LitElement {
47
+ let QboFormEdit = class QboFormEdit extends LitElement {
48
48
  constructor() {
49
49
  super(...arguments);
50
50
  this.aDropdownClass = 'dropdown-item qbo-pointer';
@@ -111,7 +111,7 @@ export class QboFormEdit extends LitElement {
111
111
  </div>
112
112
  </slot>`;
113
113
  }
114
- }
114
+ };
115
115
  __decorate([
116
116
  property({ type: String }),
117
117
  __metadata("design:type", Object)
@@ -200,5 +200,7 @@ __decorate([
200
200
  property({ type: Boolean }),
201
201
  __metadata("design:type", Object)
202
202
  ], QboFormEdit.prototype, "renderInHost", void 0);
203
- if (!customElements.get('qbo-form-edit'))
204
- customElements.define('qbo-form-edit', QboFormEdit);
203
+ QboFormEdit = __decorate([
204
+ customElement('qbo-form-edit')
205
+ ], QboFormEdit);
206
+ export { QboFormEdit };
@@ -38,6 +38,7 @@ formEditMap.set('updatedLayout', (component: any) => {
38
38
  </div>`;
39
39
  });
40
40
 
41
+ @customElement('qbo-form-edit')
41
42
  export class QboFormEdit extends LitElement {
42
43
 
43
44
  @property({ type: String })
@@ -149,6 +150,3 @@ export class QboFormEdit extends LitElement {
149
150
  </slot>`;
150
151
  }
151
152
  }
152
-
153
- if (!customElements.get('qbo-form-edit'))
154
- customElements.define('qbo-form-edit', QboFormEdit)
@@ -7,10 +7,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
+ var QboFormElement_1;
10
11
  import { html, LitElement } from 'lit';
11
- import { property } from 'lit/decorators.js';
12
+ import { customElement, property } from 'lit/decorators.js';
12
13
  import { substitute } from './qbo-json.js';
13
- export class QboFormElement extends LitElement {
14
+ let QboFormElement = class QboFormElement extends LitElement {
15
+ static { QboFormElement_1 = this; }
14
16
  static { this.formAssociated = true; }
15
17
  constructor() {
16
18
  super();
@@ -74,7 +76,7 @@ export class QboFormElement extends LitElement {
74
76
  && (e instanceof HTMLInputElement
75
77
  || e instanceof HTMLSelectElement
76
78
  || e instanceof HTMLTextAreaElement
77
- || e instanceof QboFormElement) && e.name);
79
+ || e instanceof QboFormElement_1) && e.name);
78
80
  inputs.forEach(element => {
79
81
  const input = element;
80
82
  if (input instanceof HTMLSelectElement) {
@@ -83,7 +85,7 @@ export class QboFormElement extends LitElement {
83
85
  else if (input instanceof HTMLTextAreaElement) {
84
86
  this.value.set(`${this.name}${input.name}`, input.value);
85
87
  }
86
- else if (input instanceof QboFormElement) {
88
+ else if (input instanceof QboFormElement_1) {
87
89
  for (let [key, value] of input.value.entries()) {
88
90
  this.value.set(`${this.name}${key}`, value);
89
91
  }
@@ -102,7 +104,7 @@ export class QboFormElement extends LitElement {
102
104
  this.internals.setFormValue(this.value);
103
105
  console.trace(`Set ${this.name} values to `, this.value);
104
106
  }
105
- }
107
+ };
106
108
  __decorate([
107
109
  property({ type: FormData }),
108
110
  __metadata("design:type", FormData)
@@ -119,5 +121,8 @@ __decorate([
119
121
  property({ type: Object }),
120
122
  __metadata("design:type", Object)
121
123
  ], QboFormElement.prototype, "data", void 0);
122
- if (!customElements.get('qbo-form-element'))
123
- customElements.define('qbo-form-element', QboFormElement);
124
+ QboFormElement = QboFormElement_1 = __decorate([
125
+ customElement('qbo-form-element'),
126
+ __metadata("design:paramtypes", [])
127
+ ], QboFormElement);
128
+ export { QboFormElement };
@@ -3,6 +3,7 @@ import { html, css, LitElement, PropertyValues } from 'lit';
3
3
  import { customElement, property } from 'lit/decorators.js';
4
4
  import { substitute } from './qbo-json.js';
5
5
 
6
+ @customElement('qbo-form-element')
6
7
  export class QboFormElement extends LitElement {
7
8
  static formAssociated = true;
8
9
 
@@ -117,5 +118,3 @@ export class QboFormElement extends LitElement {
117
118
  }
118
119
  }
119
120
 
120
- if (!customElements.get('qbo-form-element'))
121
- customElements.define('qbo-form-element', QboFormElement)
@@ -7,8 +7,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
+ var QboIcon_1;
10
11
  import { LitElement, html } from "lit";
11
- import { property } from "lit/decorators.js";
12
+ import { customElement, property } from "lit/decorators.js";
12
13
  import { until } from "lit/directives/until.js";
13
14
  const iconMap = new Map();
14
15
  // qbo modules
@@ -47,7 +48,7 @@ iconMap.set('video', 'camera-video');
47
48
  iconMap.set('headset', 'headphones');
48
49
  iconMap.set('warning', 'exclamation-triangle');
49
50
  // Renders an SVG icon based on the type attribute.
50
- export class QboIcon extends LitElement {
51
+ let QboIcon = class QboIcon extends LitElement {
51
52
  constructor() {
52
53
  super(...arguments);
53
54
  this.type = 'icon';
@@ -62,6 +63,7 @@ export class QboIcon extends LitElement {
62
63
  this.selected = false;
63
64
  this.allIcons = undefined;
64
65
  }
66
+ static { QboIcon_1 = this; }
65
67
  static { this.map = iconMap; }
66
68
  // = '/ui/images/icons.svg';
67
69
  // Getter to retrieve the `qbo4-basepath` meta tag value
@@ -99,7 +101,7 @@ export class QboIcon extends LitElement {
99
101
  return this.allIcons;
100
102
  try {
101
103
  // Adjust this path to point to the correct location of bootstrap-icons.svg
102
- const response = await fetch(this.sprite ?? QboIcon.spriteUrl);
104
+ const response = await fetch(this.sprite ?? QboIcon_1.spriteUrl);
103
105
  const svgText = await response.text();
104
106
  // Parse the SVG file
105
107
  const parser = new DOMParser();
@@ -156,7 +158,7 @@ ${Array.from(iconMap.keys()).map(k => html `<div class="col-3">
156
158
  component.icon = 'warning';
157
159
  }
158
160
  const id = iconMap.has(component.icon) ? iconMap.get(component.icon) : component.icon;
159
- return html `<svg width="${component.width}" height="${component.width}" fill="${component.fill}" ?class=${component.getAttribute('class')}><use href="${component.sprite ?? QboIcon.spriteUrl}#${id}"></use></svg>`;
161
+ return html `<svg width="${component.width}" height="${component.width}" fill="${component.fill}" ?class=${component.getAttribute('class')}><use href="${component.sprite ?? QboIcon_1.spriteUrl}#${id}"></use></svg>`;
160
162
  }
161
163
  //renderButton(component: any) {
162
164
  // return html`<button type="button" ?disabled=${component.disabled}>${component.renderIcon(component)}</button>`;
@@ -171,7 +173,7 @@ ${Array.from(iconMap.keys()).map(k => html `<div class="col-3">
171
173
  default: return this.renderIcon(this);
172
174
  }
173
175
  }
174
- }
176
+ };
175
177
  __decorate([
176
178
  property(),
177
179
  __metadata("design:type", String)
@@ -216,5 +218,7 @@ __decorate([
216
218
  property({ type: Boolean, reflect: true }),
217
219
  __metadata("design:type", Boolean)
218
220
  ], QboIcon.prototype, "selected", void 0);
219
- if (!customElements.get('qbo-icon'))
220
- customElements.define('qbo-icon', QboIcon);
221
+ QboIcon = QboIcon_1 = __decorate([
222
+ customElement('qbo-icon')
223
+ ], QboIcon);
224
+ export { QboIcon };
@@ -44,6 +44,7 @@ iconMap.set('warning', 'exclamation-triangle');
44
44
 
45
45
 
46
46
  // Renders an SVG icon based on the type attribute.
47
+ @customElement('qbo-icon')
47
48
  export class QboIcon extends LitElement {
48
49
 
49
50
  static map: Map<string, string> = iconMap;
@@ -207,6 +208,3 @@ ${Array.from(iconMap.keys()).map(k => html`<div class="col-3">
207
208
  }
208
209
 
209
210
  }
210
-
211
- if (!customElements.get('qbo-icon'))
212
- customElements.define('qbo-icon', QboIcon)