@schukai/monster 4.42.0 → 4.42.1

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.
@@ -209,7 +209,7 @@ class DataTable extends CustomElement {
209
209
 
210
210
  datasource: {
211
211
  selector: null,
212
- orderDelimiter: ",", // look at initOptionsFromArguments()
212
+ orderDelimiter: ",", // see initOptionsFromArguments()
213
213
  },
214
214
 
215
215
  mapping: {
@@ -765,9 +765,9 @@ function initEventHandler() {
765
765
  let startX = 0;
766
766
  let startWidth = 0;
767
767
 
768
- // --- Pointer-based resize handlers (robust für Maus/Touch/Stylus) ---
768
+ // --- Pointer-based resize handlers (robust for mouse/touch/stylus) ---
769
769
  const onPointerDown = (event) => {
770
- // Wichtig: Helper mit (attrName, value) aufrufen nicht mit CSS-Selector
770
+ // Important: Call helper with (attrName, value) – not with CSS selector
771
771
  const resizeHandle = findTargetElementFromEvent(
772
772
  event,
773
773
  "data-monster-role",
@@ -786,13 +786,13 @@ function initEventHandler() {
786
786
  startX = event.clientX;
787
787
  startWidth = headerCell.offsetWidth;
788
788
 
789
- // Capture, damit Events beim schnellen Ziehen nicht “verloren gehen”
789
+ // Capture to prevent losing events during fast dragging
790
790
  event.target.setPointerCapture?.(event.pointerId);
791
791
 
792
792
  getWindow().addEventListener("pointermove", onPointerMove);
793
793
  getWindow().addEventListener("pointerup", onPointerUp);
794
794
 
795
- // Globales Cursor-Styling während des Resizings
795
+ // Global cursor styling during resizing
796
796
  self.shadowRoot.host.classList.add("is-resizing");
797
797
  };
798
798
 
@@ -805,7 +805,7 @@ function initEventHandler() {
805
805
  const headers = self.getOption("headers");
806
806
  const resizingHeader = headers[resizingColumnIndex];
807
807
 
808
- const minWidth = 50; // Fallback auf 50px
808
+ const minWidth = 50;
809
809
 
810
810
  const visibleHeaders = headers.filter(
811
811
  (h) => h.getInternal("mode") !== ATTRIBUTE_DATATABLE_MODE_HIDDEN,
@@ -834,16 +834,16 @@ function initEventHandler() {
834
834
  self.shadowRoot.host.classList.remove("is-resizing");
835
835
  };
836
836
 
837
- // Pointer statt Maus: resilienter
837
+ // Use pointer events instead of mouse: more resilient
838
838
  this[gridHeadersElementSymbol].addEventListener("pointerdown", onPointerDown);
839
839
 
840
- // --- Copy-Konfiguration ---
840
+ // --- Copy configuration ---
841
841
  const quoteOpenChar = this.getOption("copy.quoteOpen");
842
842
  const quoteCloseChar = this.getOption("copy.quoteClose");
843
843
  const delimiterChar = this.getOption("copy.delimiter");
844
844
  const rowBreak = this.getOption("copy.rowBreak");
845
845
 
846
- // --- Column-Bar -> Header Sichtbarkeit & Persistenz ---
846
+ // --- Column-Bar -> Header visibility & persistence ---
847
847
  if (self[columnBarElementSymbol]) {
848
848
  self[columnBarElementSymbol].attachObserver(
849
849
  new Observer(() => {
@@ -854,7 +854,7 @@ function initEventHandler() {
854
854
  );
855
855
  }
856
856
 
857
- // --- Sortierung (Klick auf Header-Link) ---
857
+ // --- Sorting (click on header link) ---
858
858
  self[gridHeadersElementSymbol].addEventListener("click", function (event) {
859
859
  const datasource = self[datasourceLinkedElementSymbol];
860
860
  if (!datasource) return;
@@ -879,7 +879,7 @@ function initEventHandler() {
879
879
  }
880
880
  });
881
881
 
882
- // --- Double-Click Copy (Spalte oder ganze Zeile mit Shift) ---
882
+ // --- Double-Click Copy (column or entire row with Shift) ---
883
883
  const eventHandlerDoubleClickCopyToClipboard = (event) => {
884
884
  const headCell = findTargetElementFromEvent(event, "data-monster-head");
885
885
  if (!headCell) return;
@@ -997,7 +997,7 @@ function initEventHandler() {
997
997
  });
998
998
  }
999
999
 
1000
- // --- Row Selection (einzeln) ---
1000
+ // --- Row Selection (single) ---
1001
1001
  const selectRowCallback = (event) => {
1002
1002
  const checkbox = findTargetElementFromEvent(
1003
1003
  event,
@@ -1033,7 +1033,7 @@ function initEventHandler() {
1033
1033
  `[data-monster-role="select-all"]`,
1034
1034
  );
1035
1035
 
1036
- // Row-Action-Buttons je nach Selection sichtbar/unsichtbar
1036
+ // Row-Action-Buttons visible/invisible depending on selection
1037
1037
  getSlottedElements
1038
1038
  .call(this, "[data-monster-role=row-action-button]", "bar")
1039
1039
  .forEach((i, e) => {
@@ -1048,7 +1048,7 @@ function initEventHandler() {
1048
1048
  this[gridElementSymbol].addEventListener("click", selectRowCallback);
1049
1049
  this[gridElementSymbol].addEventListener("touch", selectRowCallback);
1050
1050
 
1051
- // --- Row Selection (alle) ---
1051
+ // --- Row Selection (all) ---
1052
1052
  const selectAllCallback = (event) => {
1053
1053
  const toggle = findTargetElementFromEvent(
1054
1054
  event,
@@ -327,7 +327,6 @@ monster-state[data-monster-role=empty-without-action]::part(action) {
327
327
 
328
328
  @for $i from 0 to 500 {
329
329
  &:has([data-monster-insert-reference=row-$(i)]:hover) [data-monster-insert-reference=row-$(i)] {
330
- /*background-color: var(--monster-bg-color-selection-2);*/
331
330
  box-sizing: border-box;
332
331
  }
333
332
  }