@quandis/qbo4.ui 4.0.1-CI-20240507-200005 → 4.0.1-CI-20240507-201707

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.
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-20240507-200005",
6
+ "version": "4.0.1-CI-20240507-201707",
7
7
  "workspaces": [
8
8
  "code"
9
9
  ],
@@ -1,6 +1,17 @@
1
1
  import { LitElement, PropertyValues } from 'lit';
2
2
  export declare class QboPopover extends LitElement {
3
+ contentAtt: string;
4
+ contentStyle: string;
5
+ containerAtt: string;
6
+ containerValue: string;
7
+ defaultContent: string;
8
+ htmlAtt: string;
9
+ htmlValue: string;
10
+ placementAtt: string;
11
+ placementValue: string;
3
12
  selector: string;
13
+ toggleAtt: string;
14
+ toggleValue: string;
4
15
  renderInHost: boolean;
5
16
  createRenderRoot(): HTMLElement | DocumentFragment;
6
17
  connectedCallback(): void;
@@ -13,7 +13,18 @@ import { Popover } from 'bootstrap';
13
13
  let QboPopover = class QboPopover extends LitElement {
14
14
  constructor() {
15
15
  super(...arguments);
16
- this.selector = `[data-bs-toggle="popover"]`;
16
+ this.contentAtt = 'data-bs-content';
17
+ this.contentStyle = 'none';
18
+ this.containerAtt = 'data-bs-container';
19
+ this.containerValue = 'body';
20
+ this.defaultContent = 'No content provided';
21
+ this.htmlAtt = 'data-bs-html';
22
+ this.htmlValue = 'true';
23
+ this.placementAtt = 'data-bs-placement';
24
+ this.placementValue = 'left';
25
+ this.selector = '*[slot=content]';
26
+ this.toggleAtt = 'data-bs-toggle';
27
+ this.toggleValue = 'popover';
17
28
  this.renderInHost = true;
18
29
  }
19
30
  createRenderRoot() {
@@ -21,27 +32,71 @@ let QboPopover = class QboPopover extends LitElement {
21
32
  }
22
33
  connectedCallback() {
23
34
  super.connectedCallback();
24
- this.setAttribute('data-bs-toggle', 'popover');
25
- this.setAttribute('data-bs-placement', 'left');
26
- this.setAttribute('data-bs-container', 'body');
27
- this.setAttribute('data-bs-html', 'true');
35
+ this.setAttribute(this.toggleAtt, this.toggleValue);
36
+ this.setAttribute(this.placementAtt, this.placementValue);
37
+ this.setAttribute(this.containerAtt, this.containerValue);
38
+ this.setAttribute(this.htmlAtt, this.htmlValue);
28
39
  }
29
40
  firstUpdated(changedProperties) {
30
41
  super.firstUpdated(changedProperties);
31
- const content = this.querySelector('*[slot=content]');
42
+ const content = this.querySelector(this.selector);
32
43
  if (content instanceof HTMLElement)
33
- content.style.display = 'none';
34
- this.setAttribute('data-bs-content', content?.innerHTML ?? 'no content provided');
44
+ content.style.display = this.contentStyle;
45
+ this.setAttribute(this.contentAtt, content?.innerHTML ?? this.defaultContent);
35
46
  new Popover(this);
36
47
  }
37
48
  render() {
38
49
  return html `<slot></slot>`;
39
50
  }
40
51
  };
52
+ __decorate([
53
+ property({ type: String }),
54
+ __metadata("design:type", Object)
55
+ ], QboPopover.prototype, "contentAtt", void 0);
56
+ __decorate([
57
+ property({ type: String }),
58
+ __metadata("design:type", Object)
59
+ ], QboPopover.prototype, "contentStyle", void 0);
60
+ __decorate([
61
+ property({ type: String }),
62
+ __metadata("design:type", Object)
63
+ ], QboPopover.prototype, "containerAtt", void 0);
64
+ __decorate([
65
+ property({ type: String }),
66
+ __metadata("design:type", Object)
67
+ ], QboPopover.prototype, "containerValue", void 0);
68
+ __decorate([
69
+ property({ type: String }),
70
+ __metadata("design:type", Object)
71
+ ], QboPopover.prototype, "defaultContent", void 0);
72
+ __decorate([
73
+ property({ type: String }),
74
+ __metadata("design:type", Object)
75
+ ], QboPopover.prototype, "htmlAtt", void 0);
76
+ __decorate([
77
+ property({ type: String }),
78
+ __metadata("design:type", Object)
79
+ ], QboPopover.prototype, "htmlValue", void 0);
80
+ __decorate([
81
+ property({ type: String }),
82
+ __metadata("design:type", Object)
83
+ ], QboPopover.prototype, "placementAtt", void 0);
84
+ __decorate([
85
+ property({ type: String }),
86
+ __metadata("design:type", Object)
87
+ ], QboPopover.prototype, "placementValue", void 0);
41
88
  __decorate([
42
89
  property({ type: String }),
43
90
  __metadata("design:type", Object)
44
91
  ], QboPopover.prototype, "selector", void 0);
92
+ __decorate([
93
+ property({ type: String }),
94
+ __metadata("design:type", Object)
95
+ ], QboPopover.prototype, "toggleAtt", void 0);
96
+ __decorate([
97
+ property({ type: String }),
98
+ __metadata("design:type", Object)
99
+ ], QboPopover.prototype, "toggleValue", void 0);
45
100
  __decorate([
46
101
  property({ type: Boolean }),
47
102
  __metadata("design:type", Object)
@@ -6,7 +6,40 @@ import { Popover } from 'bootstrap';
6
6
  export class QboPopover extends LitElement {
7
7
 
8
8
  @property({ type: String })
9
- selector = `[data-bs-toggle="popover"]`;
9
+ contentAtt = 'data-bs-content';
10
+
11
+ @property({ type: String })
12
+ contentStyle = 'none';
13
+
14
+ @property({ type: String })
15
+ containerAtt = 'data-bs-container';
16
+
17
+ @property({ type: String })
18
+ containerValue = 'body';
19
+
20
+ @property({ type: String })
21
+ defaultContent = 'No content provided';
22
+
23
+ @property({ type: String })
24
+ htmlAtt = 'data-bs-html';
25
+
26
+ @property({ type: String })
27
+ htmlValue = 'true';
28
+
29
+ @property({ type: String })
30
+ placementAtt = 'data-bs-placement';
31
+
32
+ @property({ type: String })
33
+ placementValue = 'left';
34
+
35
+ @property({ type: String })
36
+ selector = '*[slot=content]';
37
+
38
+ @property({ type: String })
39
+ toggleAtt = 'data-bs-toggle';
40
+
41
+ @property({ type: String })
42
+ toggleValue = 'popover';
10
43
 
11
44
  @property({ type: Boolean })
12
45
  renderInHost = true;
@@ -18,18 +51,18 @@ export class QboPopover extends LitElement {
18
51
  connectedCallback() {
19
52
  super.connectedCallback();
20
53
 
21
- this.setAttribute('data-bs-toggle', 'popover');
22
- this.setAttribute('data-bs-placement', 'left');
23
- this.setAttribute('data-bs-container', 'body');
24
- this.setAttribute('data-bs-html', 'true');
54
+ this.setAttribute(this.toggleAtt, this.toggleValue);
55
+ this.setAttribute(this.placementAtt, this.placementValue);
56
+ this.setAttribute(this.containerAtt, this.containerValue);
57
+ this.setAttribute(this.htmlAtt, this.htmlValue);
25
58
  }
26
59
 
27
60
  firstUpdated(changedProperties: PropertyValues) {
28
61
  super.firstUpdated(changedProperties);
29
62
 
30
- const content = this.querySelector('*[slot=content]');
31
- if (content instanceof HTMLElement) content.style.display = 'none';
32
- this.setAttribute('data-bs-content', content?.innerHTML ?? 'no content provided');
63
+ const content = this.querySelector(this.selector);
64
+ if (content instanceof HTMLElement) content.style.display = this.contentStyle;
65
+ this.setAttribute(this.contentAtt, content?.innerHTML ?? this.defaultContent);
33
66
 
34
67
  new Popover(this);
35
68
  }