@quandis/qbo4.ui 4.0.1-CI-20241024-193719 → 4.0.1-CI-20241025-205549

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-20241024-193719",
6
+ "version": "4.0.1-CI-20241025-205549",
7
7
  "workspaces": [
8
8
  "code"
9
9
  ],
package/scss/qboui.scss CHANGED
@@ -486,4 +486,34 @@ qbo-resize.vertical {
486
486
  .qbo-resize {
487
487
  flex: 0 0 auto; /* Reset flexbox properties */
488
488
  width: auto; /* Allow custom width */
489
- }
489
+ }
490
+
491
+ qbo-contextmenu, .qbo-context-menu {
492
+ position: absolute;
493
+
494
+ > menu {
495
+ @extend .dropdown-menu;
496
+ @extend .show;
497
+ }
498
+
499
+ > ul {
500
+ @extend .dropdown-menu;
501
+ }
502
+
503
+ li {
504
+ @extend .dropdown-item;
505
+ }
506
+ }
507
+
508
+ tr.qbo-select-on {
509
+ background-color: lightgray;
510
+
511
+ td {
512
+ background-color: lightgray;
513
+ }
514
+ }
515
+
516
+ li.qbo-select-on {
517
+ background-color: lightgray;
518
+ }
519
+
@@ -27,7 +27,18 @@ let ContextMenu = class ContextMenu extends LitElement {
27
27
  connectedCallback() {
28
28
  super.connectedCallback();
29
29
  if (this.target) {
30
+ const rootNode = this.getRootNode();
31
+ if (rootNode instanceof Document || rootNode instanceof ShadowRoot) {
32
+ const targetElement = rootNode.querySelector(this.target);
33
+ }
30
34
  this.parent = this.closest(this.target)
35
+ ?? ((() => {
36
+ const rootNode = this.getRootNode();
37
+ if (rootNode instanceof ShadowRoot || rootNode instanceof Document) {
38
+ return rootNode.querySelector(this.target);
39
+ }
40
+ return null;
41
+ })())
31
42
  ?? document.querySelector(this.target)
32
43
  ?? document;
33
44
  this.parent.addEventListener('contextmenu', this._handleContextMenu.bind(this));
@@ -23,7 +23,21 @@ export class ContextMenu extends LitElement {
23
23
  connectedCallback() {
24
24
  super.connectedCallback();
25
25
  if (this.target) {
26
+ const rootNode = this.getRootNode();
27
+
28
+ if (rootNode instanceof Document || rootNode instanceof ShadowRoot) {
29
+ const targetElement = rootNode.querySelector(this.target);
30
+ }
26
31
  this.parent = this.closest(this.target) as HTMLElement
32
+ ?? (
33
+ (() => {
34
+ const rootNode = this.getRootNode();
35
+ if (rootNode instanceof ShadowRoot || rootNode instanceof Document) {
36
+ return rootNode.querySelector(this.target);
37
+ }
38
+ return null;
39
+ })()
40
+ )
27
41
  ?? document.querySelector(this.target)
28
42
  ?? document;
29
43
  this.parent.addEventListener('contextmenu', this._handleContextMenu.bind(this));