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

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 (64) hide show
  1. package/package.json +2 -1
  2. package/scss/qbo.scss +466 -24
  3. package/src/qbo/qbo-api.js +5 -7
  4. package/src/qbo/qbo-api.ts +2 -1
  5. package/src/qbo/qbo-card.js +5 -7
  6. package/src/qbo/qbo-card.ts +4 -2
  7. package/src/qbo/qbo-contextmenu.js +5 -7
  8. package/src/qbo/qbo-contextmenu.ts +3 -1
  9. package/src/qbo/qbo-datalist.js +5 -7
  10. package/src/qbo/qbo-datalist.ts +4 -2
  11. package/src/qbo/qbo-docviewer.js +5 -7
  12. package/src/qbo/qbo-docviewer.ts +3 -1
  13. package/src/qbo/qbo-fetch.js +4 -0
  14. package/src/qbo/qbo-fetch.ts +3 -0
  15. package/src/qbo/qbo-form-edit.js +5 -7
  16. package/src/qbo/qbo-form-edit.ts +3 -1
  17. package/src/qbo/qbo-form-element.js +7 -12
  18. package/src/qbo/qbo-form-element.ts +2 -1
  19. package/src/qbo/qbo-icon.js +7 -11
  20. package/src/qbo/qbo-icon.ts +3 -1
  21. package/src/qbo/qbo-menu.d.ts +17 -15
  22. package/src/qbo/qbo-menu.js +88 -115
  23. package/src/qbo/qbo-menu.ts +95 -120
  24. package/src/qbo/qbo-microphone.js +7 -11
  25. package/src/qbo/qbo-microphone.ts +3 -1
  26. package/src/qbo/qbo-paginate.js +5 -7
  27. package/src/qbo/qbo-paginate.ts +3 -1
  28. package/src/qbo/qbo-popover.d.ts +13 -17
  29. package/src/qbo/qbo-popover.js +67 -80
  30. package/src/qbo/qbo-popover.ts +82 -54
  31. package/src/qbo/qbo-popup-listener.js +5 -7
  32. package/src/qbo/qbo-popup-listener.ts +3 -1
  33. package/src/qbo/qbo-popup.js +5 -7
  34. package/src/qbo/qbo-popup.ts +3 -1
  35. package/src/qbo/qbo-resize.js +5 -7
  36. package/src/qbo/qbo-resize.ts +3 -2
  37. package/src/qbo/qbo-select.js +5 -7
  38. package/src/qbo/qbo-select.ts +3 -1
  39. package/src/qbo/qbo-selectable.js +5 -7
  40. package/src/qbo/qbo-selectable.ts +3 -1
  41. package/src/qbo/qbo-table.js +5 -7
  42. package/src/qbo/qbo-table.ts +2 -1
  43. package/src/qbo/qbo-user-preferences.js +5 -8
  44. package/src/qbo/qbo-user-preferences.ts +3 -1
  45. package/src/qbo/qbo-validate.js +5 -8
  46. package/src/qbo/qbo-validate.ts +3 -1
  47. package/src/qbo/styles.js +2 -2
  48. package/src/qbo/styles.ts +2 -2
  49. package/wwwroot/css/qbo.css +448 -21
  50. package/wwwroot/css/qbo.css.map +1 -1
  51. package/wwwroot/css/qbo.min.css +1 -1
  52. package/wwwroot/css/qboui.css +450 -21
  53. package/wwwroot/css/qboui.css.map +1 -1
  54. package/wwwroot/css/qboui.min.css +1 -1
  55. package/wwwroot/favicon.ico +0 -0
  56. package/wwwroot/images/qbo-logo-new.svg +25 -0
  57. package/wwwroot/js/esm/qbo4.ui.js +2672 -7986
  58. package/wwwroot/js/esm/qbo4.ui.min.js +35 -48
  59. package/wwwroot/js/esm/qbo4.ui.min.js.LICENSE.txt +0 -6
  60. package/wwwroot/js/esm/qbo4.ui.min.js.map +1 -1
  61. package/wwwroot/js/qbo4.ui.js +2679 -8047
  62. package/wwwroot/js/qbo4.ui.min.js +43 -56
  63. package/wwwroot/js/qbo4.ui.min.js.LICENSE.txt +0 -6
  64. package/wwwroot/js/qbo4.ui.min.js.map +1 -1
@@ -1,74 +1,102 @@
1
- import { html, PropertyValues } from 'lit';
2
- import { customElement, property } from 'lit/decorators.js';
3
- import { Popover } from 'bootstrap';
4
- import { QboFormElement } from './qbo-form-element.js';
1
+ import { LitElement, PropertyValues, html } from "lit";
2
+ import { customElement, property, state } from "lit/decorators.js";
3
+ import { computePosition, Placement, shift, flip } from "@floating-ui/dom";
5
4
 
6
- @customElement('qbo-popover')
7
- export class QboPopover extends QboFormElement {
5
+ export class QboPopover extends LitElement {
8
6
 
9
7
  @property({ type: String })
10
- contentAtt = 'data-bs-content';
8
+ placement: Placement = "bottom";
11
9
 
12
10
  @property({ type: String })
13
- contentStyle = 'none';
14
-
15
- @property({ type: String })
16
- containerAtt = 'data-bs-container';
17
-
18
- @property({ type: String })
19
- containerValue = 'body';
20
-
21
- @property({ type: String })
22
- defaultContent = 'No content provided';
23
-
24
- @property({ type: String })
25
- htmlAtt = 'data-bs-html';
26
-
27
- @property({ type: String })
28
- htmlValue = 'true';
29
-
30
- @property({ type: String })
31
- placementAtt = 'data-bs-placement';
32
-
33
- @property({ type: String })
34
- placementValue = 'left';
11
+ selector = '*[data-popover-trigger]';
12
+
13
+ // Internal state to control menu visibility
14
+ @state() private isOpen = false;
15
+
16
+ private triggerElement!: HTMLElement;
17
+ private middleware = [flip(), shift()];
18
+
19
+ private async setPosition() {
20
+ const { x, y } = await computePosition(
21
+ this.triggerElement,
22
+ this,
23
+ {
24
+ placement: this.placement as Placement | undefined,
25
+ middleware: this.middleware,
26
+ }
27
+ );
28
+
29
+ Object.assign(
30
+ this.style, {
31
+ left: `${x}px`,
32
+ top: `${y}px`,
33
+ });
34
+ }
35
35
 
36
- @property({ type: String })
37
- selector = '*[slot=content]';
36
+ connectedCallback() {
37
+ super.connectedCallback();
38
38
 
39
- @property({ type: String })
40
- toggleAtt = 'data-bs-toggle';
39
+ document.addEventListener("qbo-popover-open", this.handleMenuOpen);
40
+ }
41
41
 
42
- @property({ type: String })
43
- toggleValue = 'popover';
42
+ disconnectedCallback() {
43
+ super.disconnectedCallback();
44
44
 
45
- @property({ type: Boolean })
46
- renderInHost = true;
45
+ document.removeEventListener("qbo-popover-open", this.handleMenuOpen);
47
46
 
48
- createRenderRoot() {
49
- return this.renderInHost ? this : super.createRenderRoot();
47
+ if (this.triggerElement != null) {
48
+ this.triggerElement.removeEventListener("mouseover", this.toggleMenu);
49
+ this.triggerElement.removeEventListener("mouseout", this.toggleMenu);
50
+ }
50
51
  }
51
52
 
52
- connectedCallback() {
53
- super.connectedCallback();
54
-
55
- this.setAttribute(this.toggleAtt, this.toggleValue);
56
- this.setAttribute(this.placementAtt, this.placementValue);
57
- this.setAttribute(this.containerAtt, this.containerValue);
58
- this.setAttribute(this.htmlAtt, this.htmlValue);
59
- }
53
+ firstUpdated(changes: PropertyValues) {
54
+ super.firstUpdated(changes);
60
55
 
61
- firstUpdated(changedProperties: PropertyValues) {
62
- super.firstUpdated(changedProperties);
56
+ this.triggerElement =
57
+ this.parentElement?.querySelector(this.selector) ||
58
+ this.shadowRoot?.querySelector(this.selector) ||
59
+ document.querySelector(this.selector) ||
60
+ this.parentElement as HTMLElement;
63
61
 
64
- const content = this.querySelector(this.selector);
65
- if (content instanceof HTMLElement) content.style.display = this.contentStyle;
66
- this.setAttribute(this.contentAtt, content?.innerHTML ?? this.defaultContent);
62
+ if (this.triggerElement != null) {
63
+ this.triggerElement.addEventListener("mouseover", this.toggleMenu);
64
+ this.triggerElement.addEventListener("mouseout", this.toggleMenu);
65
+ }
66
+ }
67
67
 
68
- new Popover(this);
68
+ handleMenuOpen = (event: Event) => {
69
+ event.preventDefault();
70
+ event.stopPropagation();
71
+
72
+ if ((event as CustomEvent).detail.menu !== this && this.isOpen) this.closeMenu();
73
+ };
74
+
75
+ toggleMenu = (event: Event) => {
76
+ this.isOpen = !this.isOpen;
77
+ this.classList.toggle("open", this.isOpen);
78
+
79
+ if (this.isOpen) {
80
+ this.setPosition();
81
+ document.dispatchEvent(
82
+ new CustomEvent("qbo-popover-open", {
83
+ bubbles: true,
84
+ composed: true,
85
+ detail: { menu: this },
86
+ })
87
+ );
88
+ }
89
+ };
90
+
91
+ closeMenu() {
92
+ this.isOpen = false;
93
+ this.classList.remove("open");
69
94
  }
70
95
 
71
96
  render() {
72
97
  return html`<slot></slot>`;
73
98
  }
74
- }
99
+ }
100
+
101
+ if (!customElements.get('qbo-popover'))
102
+ customElements.define('qbo-popover', QboPopover)
@@ -8,11 +8,11 @@ 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 { customElement, property } from 'lit/decorators.js';
11
+ import { property } from 'lit/decorators.js';
12
12
  /**
13
13
  * Listens for a popup event, and renders popup with the content.
14
14
  */
15
- let QboPopupListener = class QboPopupListener extends LitElement {
15
+ export class QboPopupListener extends LitElement {
16
16
  constructor() {
17
17
  super(...arguments);
18
18
  this.open = false;
@@ -102,7 +102,7 @@ let QboPopupListener = class QboPopupListener extends LitElement {
102
102
  </slot>
103
103
  `;
104
104
  }
105
- };
105
+ }
106
106
  __decorate([
107
107
  property({ type: Boolean }),
108
108
  __metadata("design:type", Object)
@@ -139,7 +139,5 @@ __decorate([
139
139
  property({ type: Boolean }),
140
140
  __metadata("design:type", Object)
141
141
  ], QboPopupListener.prototype, "listen", void 0);
142
- QboPopupListener = __decorate([
143
- customElement('qbo-popup-listener')
144
- ], QboPopupListener);
145
- export { QboPopupListener };
142
+ if (!customElements.get('qbo-popup-listener'))
143
+ customElements.define('qbo-popup-listener', QboPopupListener);
@@ -4,7 +4,6 @@ import { customElement, property } from 'lit/decorators.js';
4
4
  /**
5
5
  * Listens for a popup event, and renders popup with the content.
6
6
  */
7
- @customElement('qbo-popup-listener')
8
7
  export class QboPopupListener extends LitElement {
9
8
  @property({ type: Boolean })
10
9
  open = false;
@@ -127,3 +126,6 @@ export class QboPopupListener extends LitElement {
127
126
  `;
128
127
  }
129
128
  }
129
+
130
+ if (!customElements.get('qbo-popup-listener'))
131
+ customElements.define('qbo-popup-listener', QboPopupListener)
@@ -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 { customElement, property } from 'lit/decorators.js';
11
+ import { property } from 'lit/decorators.js';
12
12
  import { QboFetch } from './qbo-fetch.js';
13
13
  import { unsafeHTML } from 'lit/directives/unsafe-html.js';
14
14
  /**
@@ -17,7 +17,7 @@ import { unsafeHTML } from 'lit/directives/unsafe-html.js';
17
17
  * @remarks
18
18
  * This element is a thin wrapper around {@link QboFetch} that renders a <select> element with options populated from a JSON array.
19
19
  */
20
- let QboPopup = class QboPopup extends QboFetch {
20
+ export class QboPopup extends QboFetch {
21
21
  constructor() {
22
22
  super(...arguments);
23
23
  this.open = false;
@@ -76,7 +76,7 @@ let QboPopup = class QboPopup extends QboFetch {
76
76
  <slot name="content" @click="${this.hide}" style="display:${this.open ? 'flex' : 'none'}">${unsafeHTML(this.html)}</slot>
77
77
  `;
78
78
  }
79
- };
79
+ }
80
80
  __decorate([
81
81
  property({ type: Boolean }),
82
82
  __metadata("design:type", Object)
@@ -89,7 +89,5 @@ __decorate([
89
89
  property({ type: Boolean }),
90
90
  __metadata("design:type", Object)
91
91
  ], QboPopup.prototype, "renderInHost", void 0);
92
- QboPopup = __decorate([
93
- customElement('qbo-popup')
94
- ], QboPopup);
95
- export { QboPopup };
92
+ if (!customElements.get('qbo-popup'))
93
+ customElements.define('qbo-popup', QboPopup);
@@ -9,7 +9,6 @@ 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-popup')
13
12
  export class QboPopup extends QboFetch {
14
13
  @property({ type: Boolean })
15
14
  open = false;
@@ -82,3 +81,6 @@ export class QboPopup extends QboFetch {
82
81
  `;
83
82
  }
84
83
  }
84
+
85
+ if (!customElements.get('qbo-popup'))
86
+ customElements.define('qbo-popup', QboPopup)
@@ -8,13 +8,13 @@ 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, css } from 'lit';
11
- import { customElement, property, state } from 'lit/decorators.js';
11
+ import { property, state } from 'lit/decorators.js';
12
12
  export var ResizeType;
13
13
  (function (ResizeType) {
14
14
  ResizeType["Horizontal"] = "horizontal";
15
15
  ResizeType["Vertical"] = "vertical";
16
16
  })(ResizeType || (ResizeType = {}));
17
- let QboResize = class QboResize extends LitElement {
17
+ export class QboResize extends LitElement {
18
18
  constructor() {
19
19
  super(...arguments);
20
20
  this.isResizing = false;
@@ -93,7 +93,7 @@ let QboResize = class QboResize extends LitElement {
93
93
  render() {
94
94
  return html `<slot><span></span></slot>`;
95
95
  }
96
- };
96
+ }
97
97
  __decorate([
98
98
  state(),
99
99
  __metadata("design:type", Object)
@@ -102,7 +102,5 @@ __decorate([
102
102
  property(),
103
103
  __metadata("design:type", String)
104
104
  ], QboResize.prototype, "type", void 0);
105
- QboResize = __decorate([
106
- customElement('qbo-resize')
107
- ], QboResize);
108
- export { QboResize };
105
+ if (!customElements.get('qbo-resize'))
106
+ customElements.define('qbo-resize', QboResize);
@@ -6,8 +6,6 @@ export enum ResizeType {
6
6
  Vertical = 'vertical'
7
7
  }
8
8
 
9
-
10
- @customElement('qbo-resize')
11
9
  export class QboResize extends LitElement {
12
10
  static styles = css`
13
11
  `;
@@ -101,3 +99,6 @@ export class QboResize extends LitElement {
101
99
  return html`<slot><span></span></slot>`;
102
100
  }
103
101
  }
102
+
103
+ if (!customElements.get('qbo-resize'))
104
+ customElements.define('qbo-resize', QboResize)
@@ -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 { customElement, property } from 'lit/decorators.js';
11
+ import { property } from 'lit/decorators.js';
12
12
  import { getArray } from './qbo-json.js';
13
13
  import { QboFormElement, getApiService } from './Program.js';
14
14
  /**
@@ -17,7 +17,7 @@ import { QboFormElement, getApiService } from './Program.js';
17
17
  * @remarks
18
18
  * This element is a thin wrapper around {@link QboFetch} that renders a <select> element with options populated from a JSON array.
19
19
  */
20
- let QboSelect = class QboSelect extends QboFormElement {
20
+ export class QboSelect extends QboFormElement {
21
21
  constructor() {
22
22
  super(...arguments);
23
23
  this.apiEndpoint = 'default';
@@ -59,7 +59,7 @@ let QboSelect = class QboSelect extends QboFormElement {
59
59
  ${this.options.map(option => html `<option value="${option[this.optionValue]}" ?selected="${option[this.optionValue] == this.defaultValue}">${option[this.optionText]}</option>`)}
60
60
  </select>`;
61
61
  }
62
- };
62
+ }
63
63
  __decorate([
64
64
  property({ type: String }),
65
65
  __metadata("design:type", Object)
@@ -100,7 +100,5 @@ __decorate([
100
100
  property({ type: Boolean }),
101
101
  __metadata("design:type", Object)
102
102
  ], QboSelect.prototype, "renderInHost", void 0);
103
- QboSelect = __decorate([
104
- customElement('qbo-select')
105
- ], QboSelect);
106
- export { QboSelect };
103
+ if (!customElements.get('qbo-select'))
104
+ customElements.define('qbo-select', QboSelect);
@@ -10,7 +10,6 @@ import { IApiService, QboFormElement, getApiService } from './Program.js';
10
10
  * @remarks
11
11
  * This element is a thin wrapper around {@link QboFetch} that renders a <select> element with options populated from a JSON array.
12
12
  */
13
- @customElement('qbo-select')
14
13
  export class QboSelect extends QboFormElement
15
14
  {
16
15
  @property({ type: String })
@@ -77,3 +76,6 @@ export class QboSelect extends QboFormElement
77
76
  </select>`;
78
77
  }
79
78
  }
79
+
80
+ if (!customElements.get('qbo-select'))
81
+ customElements.define('qbo-select', QboSelect)
@@ -8,14 +8,14 @@ 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 { customElement, property } from "lit/decorators.js";
11
+ import { property } from "lit/decorators.js";
12
12
  import { qboui } from "./styles.js";
13
13
  export var Mode;
14
14
  (function (Mode) {
15
15
  Mode["Single"] = "single";
16
16
  Mode["Multi"] = "multi";
17
17
  })(Mode || (Mode = {}));
18
- let QboSelectable = class QboSelectable extends LitElement {
18
+ export class QboSelectable extends LitElement {
19
19
  constructor() {
20
20
  super(...arguments);
21
21
  this.classSelected = 'qbo-select-on';
@@ -129,7 +129,7 @@ let QboSelectable = class QboSelectable extends LitElement {
129
129
  });
130
130
  this.dispatchEvent(event);
131
131
  }
132
- };
132
+ }
133
133
  __decorate([
134
134
  property(),
135
135
  __metadata("design:type", String)
@@ -166,7 +166,5 @@ __decorate([
166
166
  property({ attribute: false }),
167
167
  __metadata("design:type", Object)
168
168
  ], QboSelectable.prototype, "target", void 0);
169
- QboSelectable = __decorate([
170
- customElement('qbo-selectable')
171
- ], QboSelectable);
172
- export { QboSelectable };
169
+ if (!customElements.get('qbo-selectable'))
170
+ customElements.define('qbo-selectable', QboSelectable);
@@ -7,7 +7,6 @@ export enum Mode {
7
7
  Multi = 'multi'
8
8
  }
9
9
 
10
- @customElement('qbo-selectable')
11
10
  export class QboSelectable extends LitElement {
12
11
 
13
12
  @property()
@@ -154,3 +153,6 @@ export class QboSelectable extends LitElement {
154
153
  this.dispatchEvent(event);
155
154
  }
156
155
  }
156
+
157
+ if (!customElements.get('qbo-selectable'))
158
+ customElements.define('qbo-selectable', QboSelectable)
@@ -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 } from 'lit';
11
- import { customElement, property } from 'lit/decorators.js';
11
+ import { property } from 'lit/decorators.js';
12
12
  import { getArray, replicate } from './qbo-json.js';
13
13
  import { QboFetch } from './qbo-fetch.js';
14
14
  /**
@@ -18,7 +18,7 @@ import { QboFetch } from './qbo-fetch.js';
18
18
  * This element is a thin wrapper around {@link QboFetch} that renders a <table> element with options populated from a JSON array.
19
19
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template#examples
20
20
  */
21
- let QboTable = class QboTable extends QboFetch {
21
+ export class QboTable extends QboFetch {
22
22
  constructor() {
23
23
  super(...arguments);
24
24
  this.loading = false;
@@ -67,7 +67,7 @@ let QboTable = class QboTable extends QboFetch {
67
67
  }
68
68
  return null;
69
69
  }
70
- };
70
+ }
71
71
  __decorate([
72
72
  property({ type: Boolean }),
73
73
  __metadata("design:type", Object)
@@ -88,7 +88,5 @@ __decorate([
88
88
  property(),
89
89
  __metadata("design:type", Object)
90
90
  ], QboTable.prototype, "options", void 0);
91
- QboTable = __decorate([
92
- customElement('qbo-table')
93
- ], QboTable);
94
- export { QboTable };
91
+ if (!customElements.get('qbo-table'))
92
+ customElements.define('qbo-table', QboTable);
@@ -10,7 +10,6 @@ import { QboFetch } from './qbo-fetch.js';
10
10
  * This element is a thin wrapper around {@link QboFetch} that renders a <table> element with options populated from a JSON array.
11
11
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template#examples
12
12
  */
13
- @customElement('qbo-table')
14
13
  export class QboTable extends QboFetch {
15
14
  @property({ type: Boolean })
16
15
  loading = false;
@@ -78,3 +77,5 @@ export class QboTable extends QboFetch {
78
77
 
79
78
  }
80
79
 
80
+ if (!customElements.get('qbo-table'))
81
+ customElements.define('qbo-table', QboTable)
@@ -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, css } from 'lit';
11
- import { customElement, property, state } from 'lit/decorators.js';
11
+ import { property, state } from 'lit/decorators.js';
12
12
  import { qboui } from './styles.js';
13
- let QboUserPreferences = class QboUserPreferences extends LitElement {
13
+ export class QboUserPreferences extends LitElement {
14
14
  static { this.styles = [qboui, css `
15
15
  :host {
16
16
  display: block;
@@ -89,7 +89,7 @@ let QboUserPreferences = class QboUserPreferences extends LitElement {
89
89
  </dialog>
90
90
  ` : html ``}`;
91
91
  }
92
- };
92
+ }
93
93
  __decorate([
94
94
  property({ type: Object }),
95
95
  __metadata("design:type", Object)
@@ -102,11 +102,6 @@ __decorate([
102
102
  state(),
103
103
  __metadata("design:type", Object)
104
104
  ], QboUserPreferences.prototype, "isEditing", void 0);
105
- QboUserPreferences = __decorate([
106
- customElement('qbo-user-preferences'),
107
- __metadata("design:paramtypes", [])
108
- ], QboUserPreferences);
109
- export { QboUserPreferences };
110
105
  export function setUserPreference(preference, value, storageKey = 'qbo4.ui.preferences') {
111
106
  // Get the current stored preferences
112
107
  const storedPreferences = localStorage.getItem(storageKey);
@@ -176,3 +171,5 @@ export function formatDate(dateString, format = null) {
176
171
  const formattedDate = new Intl.DateTimeFormat(undefined, options).format(new Date(dateString));
177
172
  return formattedDate;
178
173
  }
174
+ if (!customElements.get('qbo-user-preferences'))
175
+ customElements.define('qbo-user-preferences', QboUserPreferences);
@@ -2,7 +2,6 @@
2
2
  import { customElement, property, state } from 'lit/decorators.js';
3
3
  import { qboui } from './styles.js';
4
4
 
5
- @customElement('qbo-user-preferences')
6
5
  export class QboUserPreferences extends LitElement {
7
6
  @property({ type: Object }) preferences = {};
8
7
 
@@ -165,3 +164,6 @@ export function formatDate(dateString: string | Date | undefined | null, format:
165
164
 
166
165
  return formattedDate;
167
166
  }
167
+
168
+ if (!customElements.get('qbo-user-preferences'))
169
+ customElements.define('qbo-user-preferences', QboUserPreferences)
@@ -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 { LitElement, html } from 'lit';
11
- import { customElement, property } from 'lit/decorators.js';
11
+ import { property } from 'lit/decorators.js';
12
12
  import { ValidateToken } from './IValidate.js';
13
13
  import { services } from './Services.js';
14
14
  /**
@@ -34,7 +34,7 @@ import { services } from './Services.js';
34
34
  * });
35
35
  * ```
36
36
  */
37
- let QboValidate = class QboValidate extends LitElement {
37
+ export class QboValidate extends LitElement {
38
38
  constructor() {
39
39
  super();
40
40
  this.renderInHost = false;
@@ -120,7 +120,7 @@ let QboValidate = class QboValidate extends LitElement {
120
120
  render() {
121
121
  return html ``;
122
122
  }
123
- };
123
+ }
124
124
  __decorate([
125
125
  property({ type: Boolean }),
126
126
  __metadata("design:type", Object)
@@ -142,8 +142,5 @@ __decorate([
142
142
  }),
143
143
  __metadata("design:type", Object)
144
144
  ], QboValidate.prototype, "workingClass", void 0);
145
- QboValidate = __decorate([
146
- customElement('qbo-validate'),
147
- __metadata("design:paramtypes", [])
148
- ], QboValidate);
149
- export { QboValidate };
145
+ if (!customElements.get('qbo-validate'))
146
+ customElements.define('qbo-validate', QboValidate);
@@ -27,7 +27,6 @@ import { DependencyContainer } from 'tsyringe';
27
27
  * });
28
28
  * ```
29
29
  */
30
- @customElement('qbo-validate')
31
30
  export class QboValidate extends LitElement {
32
31
 
33
32
  @property({ type: Boolean })
@@ -139,3 +138,6 @@ export class QboValidate extends LitElement {
139
138
  }
140
139
 
141
140
  }
141
+
142
+ if (!customElements.get('qbo-validate'))
143
+ customElements.define('qbo-validate', QboValidate)