@melodicdev/components 1.6.6 → 1.6.8

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.
@@ -197,7 +197,7 @@ async function Ks(e = {}) {
197
197
  function Ke(e, t) {
198
198
  e.renderInto(t);
199
199
  }
200
- const Pr = Symbol("melodic.signal"), na = (e) => typeof e == "function" && Pr in e;
200
+ const Mr = Symbol("melodic.signal"), na = (e) => typeof e == "function" && Mr in e;
201
201
  var Ue = "melodic-styles", da = `style[${Ue}], link[rel="stylesheet"][${Ue}]`, Ne = [], xe = null;
202
202
  const ca = (e) => {
203
203
  if (pa()) {
@@ -281,7 +281,7 @@ function O(e) {
281
281
  a.delete(s);
282
282
  }, o.destroy = () => {
283
283
  r || (r = !0, a.clear());
284
- }, Object.defineProperty(o, Pr, {
284
+ }, Object.defineProperty(o, Mr, {
285
285
  value: !0,
286
286
  enumerable: !1,
287
287
  configurable: !1
@@ -2619,7 +2619,7 @@ function dt(e, t, r, a) {
2619
2619
  isNew: !1
2620
2620
  });
2621
2621
  } else {
2622
- const w = Ma(b, u, x, r, a);
2622
+ const w = Pa(b, u, x, r, a);
2623
2623
  s.push({
2624
2624
  item: w,
2625
2625
  oldIndex: -1,
@@ -2636,11 +2636,11 @@ function dt(e, t, r, a) {
2636
2636
  let p = a.endMarker;
2637
2637
  for (let u = s.length - 1; u >= 0; u--) {
2638
2638
  const b = s[u];
2639
- b.isNew ? Pa(b.item, h, p) : m.has(u) || Oa(b.item, p), p = b.item.start;
2639
+ b.isNew ? Ma(b.item, h, p) : m.has(u) || Oa(b.item, p), p = b.item.start;
2640
2640
  }
2641
2641
  a.keyToIndex = o, a.items = s.map((u) => u.item);
2642
2642
  }
2643
- function Ma(e, t, r, a, l) {
2643
+ function Pa(e, t, r, a, l) {
2644
2644
  const o = a(e, t);
2645
2645
  let s, n;
2646
2646
  if (l.useCompiledPath && l.compiledTemplate) {
@@ -2657,7 +2657,7 @@ function Ma(e, t, r, a, l) {
2657
2657
  end: document.createComment("repeat-item-end")
2658
2658
  };
2659
2659
  }
2660
- function Pa(e, t, r) {
2660
+ function Ma(e, t, r) {
2661
2661
  const a = document.createDocumentFragment();
2662
2662
  a.appendChild(e.start);
2663
2663
  for (const l of e.nodes) a.appendChild(l);
@@ -3791,7 +3791,7 @@ const ml = {
3791
3791
  /* Default to light color scheme */
3792
3792
  color-scheme: light;
3793
3793
  }`;
3794
- var ve = "system", Me = /* @__PURE__ */ new Set(), ge = null;
3794
+ var ve = "system", Pe = /* @__PURE__ */ new Set(), ge = null;
3795
3795
  function Tn() {
3796
3796
  return ve;
3797
3797
  }
@@ -3811,10 +3811,10 @@ function hl(e) {
3811
3811
  document.documentElement.setAttribute("data-theme", e), $e(e, e);
3812
3812
  }
3813
3813
  function An(e) {
3814
- return Me.add(e), () => Me.delete(e);
3814
+ return Pe.add(e), () => Pe.delete(e);
3815
3815
  }
3816
3816
  function $e(e, t) {
3817
- Me.forEach((r) => r(e, t));
3817
+ Pe.forEach((r) => r(e, t));
3818
3818
  }
3819
3819
  function Dn() {
3820
3820
  hl(pl() === "light" ? "dark" : "light");
@@ -3831,7 +3831,7 @@ function In(e, t) {
3831
3831
  const l = document.getElementById(a.id);
3832
3832
  return l && l.remove(), document.head.appendChild(a), a;
3833
3833
  }
3834
- function Mn(e, t) {
3834
+ function Pn(e, t) {
3835
3835
  const r = {};
3836
3836
  return t.primary && (r["--ml-color-primary"] = t.primary), t.secondary && (r["--ml-color-secondary"] = t.secondary), t.success && (r["--ml-color-success"] = t.success), t.warning && (r["--ml-color-warning"] = t.warning), t.danger && (r["--ml-color-danger"] = t.danger), Xr(e, r);
3837
3837
  }
@@ -4156,7 +4156,7 @@ function _l(e) {
4156
4156
  const t = He(e);
4157
4157
  return t[t.length - 1] ?? null;
4158
4158
  }
4159
- function Pn(e) {
4159
+ function Mn(e) {
4160
4160
  const t = Qr(e);
4161
4161
  return t ? (t.focus(), !0) : !1;
4162
4162
  }
@@ -4227,9 +4227,9 @@ function Vn(e, t = "focus-visible") {
4227
4227
  e.removeEventListener("focus", r), e.removeEventListener("blur", a), e.classList.remove(t);
4228
4228
  };
4229
4229
  }
4230
- var M = null;
4230
+ var P = null;
4231
4231
  function yl() {
4232
- return M && document.body.contains(M) || (M = document.createElement("div"), M.id = "ml-live-region", M.setAttribute("aria-live", "polite"), M.setAttribute("aria-atomic", "true"), M.setAttribute("role", "status"), Object.assign(M.style, {
4232
+ return P && document.body.contains(P) || (P = document.createElement("div"), P.id = "ml-live-region", P.setAttribute("aria-live", "polite"), P.setAttribute("aria-atomic", "true"), P.setAttribute("role", "status"), Object.assign(P.style, {
4233
4233
  position: "absolute",
4234
4234
  width: "1px",
4235
4235
  height: "1px",
@@ -4239,7 +4239,7 @@ function yl() {
4239
4239
  clip: "rect(0, 0, 0, 0)",
4240
4240
  whiteSpace: "nowrap",
4241
4241
  border: "0"
4242
- }), document.body.appendChild(M)), M;
4242
+ }), document.body.appendChild(P)), P;
4243
4243
  }
4244
4244
  function qn(e, t = "polite") {
4245
4245
  const r = yl();
@@ -5173,7 +5173,7 @@ function Il(e) {
5173
5173
  </div>
5174
5174
  `;
5175
5175
  }
5176
- const Ml = () => _`
5176
+ const Pl = () => _`
5177
5177
  :host {
5178
5178
  display: block;
5179
5179
  width: 100%;
@@ -5400,7 +5400,7 @@ var wt = class {
5400
5400
  wt = v([f({
5401
5401
  selector: "ml-input",
5402
5402
  template: Il,
5403
- styles: Ml,
5403
+ styles: Pl,
5404
5404
  attributes: [
5405
5405
  "type",
5406
5406
  "value",
@@ -5415,7 +5415,7 @@ wt = v([f({
5415
5415
  "autocomplete"
5416
5416
  ]
5417
5417
  })], wt);
5418
- function Pl(e) {
5418
+ function Ml(e) {
5419
5419
  return i`
5420
5420
  <div
5421
5421
  class=${g({
@@ -5667,7 +5667,7 @@ var yt = class {
5667
5667
  };
5668
5668
  yt = v([f({
5669
5669
  selector: "ml-textarea",
5670
- template: Pl,
5670
+ template: Ml,
5671
5671
  styles: Ol,
5672
5672
  attributes: [
5673
5673
  "value",
@@ -9409,7 +9409,7 @@ I((e) => e.tagName === "ML-DATE-PICKER", {
9409
9409
  e.disabled = t;
9410
9410
  }
9411
9411
  });
9412
- var Mt = class {
9412
+ var Pt = class {
9413
9413
  constructor() {
9414
9414
  this.value = "", this.placeholder = "Select date", this.label = "", this.hint = "", this.error = "", this.size = "md", this.disabled = !1, this.required = !1, this.min = "", this.max = "", this.minYear = "", this.maxYear = "", this.isOpen = !1, this._cleanupAutoUpdate = null, this.toggleCalendar = () => {
9415
9415
  if (this.disabled) return;
@@ -9481,7 +9481,7 @@ var Mt = class {
9481
9481
  return this.elementRef.shadowRoot?.querySelector(".ml-date-picker__popover");
9482
9482
  }
9483
9483
  };
9484
- Mt = v([f({
9484
+ Pt = v([f({
9485
9485
  selector: "ml-date-picker",
9486
9486
  template: go,
9487
9487
  styles: vo,
@@ -9499,7 +9499,7 @@ Mt = v([f({
9499
9499
  "min-year",
9500
9500
  "max-year"
9501
9501
  ]
9502
- })], Mt);
9502
+ })], Pt);
9503
9503
  function bo(e) {
9504
9504
  return i`
9505
9505
  <div
@@ -9667,7 +9667,7 @@ const fo = () => _`
9667
9667
  opacity: var(--ml-alert-dismiss-hover-opacity);
9668
9668
  }
9669
9669
  `;
9670
- var Pt = class {
9670
+ var Mt = class {
9671
9671
  constructor() {
9672
9672
  this.variant = "info", this.title = "", this.dismissible = !1, this.handleDismiss = () => {
9673
9673
  this.elementRef.dispatchEvent(new CustomEvent("ml:dismiss", {
@@ -9682,7 +9682,7 @@ var Pt = class {
9682
9682
  }[this.variant]}"></ml-icon>`;
9683
9683
  }
9684
9684
  };
9685
- Pt = v([f({
9685
+ Mt = v([f({
9686
9686
  selector: "ml-alert",
9687
9687
  template: bo,
9688
9688
  styles: fo,
@@ -9691,7 +9691,7 @@ Pt = v([f({
9691
9691
  "title",
9692
9692
  "dismissible"
9693
9693
  ]
9694
- })], Pt);
9694
+ })], Mt);
9695
9695
  var Ot = class {
9696
9696
  constructor() {
9697
9697
  this._containerEl = null, this._position = "top-right";
@@ -10886,14 +10886,14 @@ Bt = v([f({
10886
10886
  "wrap"
10887
10887
  ]
10888
10888
  })], Bt);
10889
- function Mo(e) {
10889
+ function Po(e) {
10890
10890
  return i`
10891
10891
  <div class="ml-container" style=${J(e.getStyles())}>
10892
10892
  <slot></slot>
10893
10893
  </div>
10894
10894
  `;
10895
10895
  }
10896
- const Po = () => _`
10896
+ const Mo = () => _`
10897
10897
  :host {
10898
10898
  display: block;
10899
10899
  width: 100%;
@@ -10925,8 +10925,8 @@ var jt = class {
10925
10925
  };
10926
10926
  jt = v([f({
10927
10927
  selector: "ml-container",
10928
- template: Mo,
10929
- styles: Po,
10928
+ template: Po,
10929
+ styles: Mo,
10930
10930
  attributes: [
10931
10931
  "size",
10932
10932
  "padding",
@@ -12678,7 +12678,7 @@ EventTarget.prototype.addEventListener = function(e, t, r) {
12678
12678
  };
12679
12679
  var Qt = class {
12680
12680
  constructor() {
12681
- this._rowClickable = !1, this.hasFooter = !1, this.hasHeaderActions = !1, this.selectable = !1, this.striped = !1, this.hoverable = !0, this.stickyHeader = !1, this.size = "md", this.tableTitle = "", this.description = "", this.virtual = !1, this.columns = [], this.rows = [], this.sortKey = "", this.sortDirection = "asc", this.selectedIndices = [], this.startIndex = 0, this.endIndex = 50, this._scroller = new ea(), this._viewport = null, this.isRowSelected = (t) => this.selectedIndices.includes(t), this.handleSort = (t) => {
12681
+ this._rowClickable = !1, this.hasFooter = !1, this.hasHeaderActions = !1, this.selectable = !1, this.striped = !1, this.hoverable = !0, this.stickyHeader = !1, this.size = "md", this.tableTitle = "", this.description = "", this.virtual = !1, this.manualSort = !1, this.columns = [], this.rows = [], this.sortKey = "", this.sortDirection = "asc", this.selectedIndices = [], this.startIndex = 0, this.endIndex = 50, this._scroller = new ea(), this._viewport = null, this.isRowSelected = (t) => this.selectedIndices.includes(t), this.handleSort = (t) => {
12682
12682
  t.sortable && (this.sortKey === t.key ? this.sortDirection = this.sortDirection === "asc" ? "desc" : "asc" : (this.sortKey = t.key, this.sortDirection = "asc"), this.selectedIndices = [], this._scroller.invalidate(), this.elementRef.dispatchEvent(new CustomEvent("ml:sort", {
12683
12683
  bubbles: !0,
12684
12684
  composed: !0,
@@ -12747,7 +12747,7 @@ var Qt = class {
12747
12747
  }
12748
12748
  /** Rows sorted by current sort key/direction */
12749
12749
  get sortedRows() {
12750
- if (!this.sortKey) return this.rows;
12750
+ if (this.manualSort || !this.sortKey) return this.rows;
12751
12751
  const t = this.sortKey, r = this.sortDirection === "asc" ? 1 : -1;
12752
12752
  return [...this.rows].sort((a, l) => {
12753
12753
  const o = a[t], s = l[t];
@@ -12795,7 +12795,8 @@ Qt = v([f({
12795
12795
  "table-title",
12796
12796
  "description",
12797
12797
  "sticky-header",
12798
- "virtual"
12798
+ "virtual",
12799
+ "manual-sort"
12799
12800
  ]
12800
12801
  })], Qt);
12801
12802
  function ai(e, t, r) {
@@ -13789,7 +13790,7 @@ var ii = [
13789
13790
  "October",
13790
13791
  "November",
13791
13792
  "December"
13792
- ], Pe = [
13793
+ ], Me = [
13793
13794
  "Jan",
13794
13795
  "Feb",
13795
13796
  "Mar",
@@ -13858,7 +13859,7 @@ function rr(e) {
13858
13859
  return `${ii[e.getMonth()]} ${e.getFullYear()}`;
13859
13860
  }
13860
13861
  function di(e, t) {
13861
- const r = Pe[e.getMonth()], a = Pe[t.getMonth()];
13862
+ const r = Me[e.getMonth()], a = Me[t.getMonth()];
13862
13863
  return e.getMonth() === t.getMonth() && e.getFullYear() === t.getFullYear() ? `${r} ${e.getDate()} – ${t.getDate()}, ${e.getFullYear()}` : e.getFullYear() === t.getFullYear() ? `${r} ${e.getDate()} – ${a} ${t.getDate()}, ${e.getFullYear()}` : `${r} ${e.getDate()}, ${e.getFullYear()} – ${a} ${t.getDate()}, ${t.getFullYear()}`;
13863
13864
  }
13864
13865
  function ar(e, t, r = 0) {
@@ -13919,12 +13920,12 @@ function fe(e, t) {
13919
13920
  return e.filter((r) => r.start.split("T")[0] === t);
13920
13921
  }
13921
13922
  function mi(e) {
13922
- return Pe[e.getMonth()];
13923
+ return Me[e.getMonth()];
13923
13924
  }
13924
13925
  function pi(e) {
13925
13926
  return ra[e.getDay()];
13926
13927
  }
13927
- function P(e) {
13928
+ function M(e) {
13928
13929
  const t = new Date(e);
13929
13930
  return t.getHours() * 60 + t.getMinutes();
13930
13931
  }
@@ -13934,13 +13935,13 @@ function or(e) {
13934
13935
  function oa(e) {
13935
13936
  if (e.length === 0) return [];
13936
13937
  const t = [...e].sort((n, c) => {
13937
- const m = P(n.start), h = P(c.start);
13938
+ const m = M(n.start), h = M(c.start);
13938
13939
  if (m !== h) return m - h;
13939
- const p = P(n.end) - m;
13940
- return P(c.end) - h - p;
13940
+ const p = M(n.end) - m;
13941
+ return M(c.end) - h - p;
13941
13942
  }), r = [], a = /* @__PURE__ */ new Map();
13942
13943
  for (const n of t) {
13943
- const c = P(n.start), m = P(n.end);
13944
+ const c = M(n.start), m = M(n.end);
13944
13945
  let h = !1;
13945
13946
  for (let p = 0; p < r.length; p++) if (r[p][r[p].length - 1].end <= c) {
13946
13947
  r[p].push({ end: m }), a.set(n.id, p), h = !0;
@@ -13953,9 +13954,9 @@ function oa(e) {
13953
13954
  if (o.has(n.id)) continue;
13954
13955
  const c = [n];
13955
13956
  o.add(n.id);
13956
- let m = P(n.end), h = a.get(n.id) + 1;
13957
+ let m = M(n.end), h = a.get(n.id) + 1;
13957
13958
  for (const p of t)
13958
- o.has(p.id) || P(p.start) < m && (c.push(p), o.add(p.id), m = Math.max(m, P(p.end)), h = Math.max(h, a.get(p.id) + 1));
13959
+ o.has(p.id) || M(p.start) < m && (c.push(p), o.add(p.id), m = Math.max(m, M(p.end)), h = Math.max(h, a.get(p.id) + 1));
13959
13960
  l.push({
13960
13961
  events: c,
13961
13962
  totalColumns: h
@@ -13963,7 +13964,7 @@ function oa(e) {
13963
13964
  }
13964
13965
  const s = [];
13965
13966
  for (const n of l) for (const c of n.events) {
13966
- const m = P(c.start), h = P(c.end), p = a.get(c.id), u = n.totalColumns;
13967
+ const m = M(c.start), h = M(c.end), p = a.get(c.id), u = n.totalColumns;
13967
13968
  s.push({
13968
13969
  event: c,
13969
13970
  gridRowStart: or(m),
@@ -17017,7 +17018,7 @@ sr = v([f({
17017
17018
  "size"
17018
17019
  ]
17019
17020
  })], sr);
17020
- function Mi(e) {
17021
+ function Pi(e) {
17021
17022
  const t = e.tabs.length > 0;
17022
17023
  return i`
17023
17024
  <div
@@ -17034,7 +17035,7 @@ function Mi(e) {
17034
17035
  aria-orientation=${e.orientation}
17035
17036
  @keydown=${e.handleKeyDown}
17036
17037
  >
17037
- ${t ? k(e.tabs, (r) => `${r.value}-${e.value === r.value}`, (r) => Pi(e, r)) : i`<slot name="tab" @slotchange=${e.handleTabSlotChange}></slot>`}
17038
+ ${t ? k(e.tabs, (r) => `${r.value}-${e.value === r.value}`, (r) => Mi(e, r)) : i`<slot name="tab" @slotchange=${e.handleTabSlotChange}></slot>`}
17038
17039
  </div>
17039
17040
 
17040
17041
  <div class="ml-tabs__panels">
@@ -17043,7 +17044,7 @@ function Mi(e) {
17043
17044
  </div>
17044
17045
  `;
17045
17046
  }
17046
- function Pi(e, t) {
17047
+ function Mi(e, t) {
17047
17048
  const r = e.value === t.value;
17048
17049
  return i`
17049
17050
  <button
@@ -17477,7 +17478,7 @@ var nr = class {
17477
17478
  };
17478
17479
  nr = v([f({
17479
17480
  selector: "ml-tabs",
17480
- template: Mi,
17481
+ template: Pi,
17481
17482
  styles: Oi,
17482
17483
  attributes: [
17483
17484
  "value",
@@ -20896,7 +20897,7 @@ var _s = class {
20896
20897
  this._dialogEl.showModal(), this._afterOpenedCallback?.();
20897
20898
  }
20898
20899
  close(e) {
20899
- this._dialogEl.close(), this._afterClosedCallback?.(e);
20900
+ this._dismissDescendantPopovers(this._dialogEl), this._dialogEl.close(), this._afterClosedCallback?.(e);
20900
20901
  }
20901
20902
  afterOpened(e) {
20902
20903
  this._afterOpenedCallback = e;
@@ -20910,6 +20911,15 @@ var _s = class {
20910
20911
  onBackdropClick(e) {
20911
20912
  e.target === this._dialogEl && !this._disableClose && this.close();
20912
20913
  }
20914
+ _dismissDescendantPopovers(e) {
20915
+ e.querySelectorAll("*").forEach((t) => {
20916
+ if (t.hasAttribute("popover")) try {
20917
+ t.hidePopover();
20918
+ } catch {
20919
+ }
20920
+ t.shadowRoot && this._dismissDescendantPopovers(t.shadowRoot);
20921
+ });
20922
+ }
20913
20923
  }, le = class {
20914
20924
  constructor() {
20915
20925
  this._dialogs = /* @__PURE__ */ new Map();
@@ -22115,7 +22125,7 @@ Er = v([f({
22115
22125
  "arrow"
22116
22126
  ]
22117
22127
  })], Er);
22118
- function Ms(e) {
22128
+ function Ps(e) {
22119
22129
  const t = e["sidebar-position"] === "right", r = e["sidebar-collapsed"], a = e["header-fixed"], l = e.mobileOpen, o = e.mobile;
22120
22130
  return i`
22121
22131
  <div
@@ -22170,7 +22180,7 @@ function Ms(e) {
22170
22180
  </div>
22171
22181
  `;
22172
22182
  }
22173
- const Ps = () => _`
22183
+ const Ms = () => _`
22174
22184
  :host {
22175
22185
  display: block;
22176
22186
  height: 100%;
@@ -22409,8 +22419,8 @@ var Rr = class {
22409
22419
  };
22410
22420
  Rr = v([f({
22411
22421
  selector: "ml-app-shell",
22412
- template: Ms,
22413
- styles: Ps,
22422
+ template: Ps,
22423
+ styles: Ms,
22414
22424
  attributes: [
22415
22425
  "sidebar-position",
22416
22426
  "sidebar-collapsed",
@@ -23652,7 +23662,7 @@ const Ys = () => _`
23652
23662
  }
23653
23663
  }
23654
23664
  `;
23655
- var Mr = class {
23665
+ var Pr = class {
23656
23666
  constructor() {
23657
23667
  this.title = "", this.description = "", this.layout = "default";
23658
23668
  }
@@ -23669,7 +23679,7 @@ var Mr = class {
23669
23679
  return this.elementRef?.querySelector('[slot="header-actions"]') !== null;
23670
23680
  }
23671
23681
  };
23672
- Mr = v([f({
23682
+ Pr = v([f({
23673
23683
  selector: "ml-dashboard-page",
23674
23684
  template: Hs,
23675
23685
  styles: Ys,
@@ -23678,14 +23688,14 @@ Mr = v([f({
23678
23688
  "description",
23679
23689
  "layout"
23680
23690
  ]
23681
- })], Mr);
23691
+ })], Pr);
23682
23692
  export {
23683
23693
  fa as APP_CONFIG,
23684
23694
  wa as AbortError,
23685
23695
  se as AbstractControl,
23686
23696
  Xt as ActivityFeedComponent,
23687
23697
  Jt as ActivityFeedItemComponent,
23688
- Pt as AlertComponent,
23698
+ Mt as AlertComponent,
23689
23699
  Rr as AppShellComponent,
23690
23700
  Ht as AvatarComponent,
23691
23701
  Yt as BadgeComponent,
@@ -23703,8 +23713,8 @@ export {
23703
23713
  ga as ComponentBase,
23704
23714
  un as ComponentStateBaseService,
23705
23715
  jt as ContainerComponent,
23706
- Mr as DashboardPageComponent,
23707
- Mt as DatePickerComponent,
23716
+ Pr as DashboardPageComponent,
23717
+ Pt as DatePickerComponent,
23708
23718
  Oe as DialogComponent,
23709
23719
  _s as DialogRef,
23710
23720
  le as DialogService,
@@ -23754,7 +23764,7 @@ export {
23754
23764
  Re as RouterLinkComponent,
23755
23765
  Ee as RouterOutletComponent,
23756
23766
  q as RouterService,
23757
- Pr as SIGNAL_MARKER,
23767
+ Mr as SIGNAL_MARKER,
23758
23768
  Et as SelectComponent,
23759
23769
  G as Service,
23760
23770
  ur as SidebarComponent,
@@ -23789,8 +23799,8 @@ export {
23789
23799
  Uo as activityFeedTemplate,
23790
23800
  dl as allTokens,
23791
23801
  qn as announce,
23792
- Ps as appShellStyles,
23793
- Ms as appShellTemplate,
23802
+ Ms as appShellStyles,
23803
+ Ps as appShellTemplate,
23794
23804
  ca as applyGlobalStyles,
23795
23805
  hl as applyTheme,
23796
23806
  Jr as arrow,
@@ -23814,11 +23824,11 @@ export {
23814
23824
  Hn as componentBaseStyles,
23815
23825
  ne as computePosition,
23816
23826
  D as computed,
23817
- Po as containerStyles,
23818
- Mo as containerTemplate,
23827
+ Mo as containerStyles,
23828
+ Po as containerTemplate,
23819
23829
  cn as createAction,
23820
23830
  Cn as createAsyncValidator,
23821
- Mn as createBrandTheme,
23831
+ Pn as createBrandTheme,
23822
23832
  Qs as createDeactivateGuard,
23823
23833
  wl as createFocusTrap,
23824
23834
  xn as createFormArray,
@@ -23852,7 +23862,7 @@ export {
23852
23862
  ba as environment,
23853
23863
  ka as findRouteByName,
23854
23864
  ce as flip,
23855
- Pn as focusFirst,
23865
+ Mn as focusFirst,
23856
23866
  On as focusLast,
23857
23867
  Nn as focusTrap,
23858
23868
  Vn as focusVisible,
@@ -23948,7 +23958,7 @@ export {
23948
23958
  ti as tableStyles,
23949
23959
  ei as tableTemplate,
23950
23960
  Oi as tabsStyles,
23951
- Mi as tabsTemplate,
23961
+ Pi as tabsTemplate,
23952
23962
  Xa as textAdapter,
23953
23963
  xo as toastContainerStyles,
23954
23964
  yo as toastContainerTemplate,
@@ -6,6 +6,16 @@ import type { TableColumn, SortDirection } from './table.types.js';
6
6
  * @example
7
7
  * ```html
8
8
  * <ml-table .columns=${columns} .rows=${rows} striped hoverable></ml-table>
9
+ *
10
+ * <!-- Server-paginated: parent handles ordering -->
11
+ * <ml-table
12
+ * manual-sort
13
+ * .columns=${columns}
14
+ * .rows=${pageRows}
15
+ * .sortKey=${sortKey}
16
+ * .sortDirection=${sortDirection}
17
+ * @ml:sort=${handleSort}
18
+ * ></ml-table>
9
19
  * ```
10
20
  *
11
21
  * @fires ml:sort - Emitted when a sortable column header is clicked. Detail: { key, direction }
@@ -39,6 +49,13 @@ export declare class TableComponent implements IElementRef, OnCreate, OnDestroy,
39
49
  description: string;
40
50
  /** Enable virtual scrolling (renders only visible rows) */
41
51
  virtual: boolean;
52
+ /**
53
+ * Opt out of client-side row sorting. When true, `rows` is rendered in the
54
+ * order provided and `sortedRows` returns it untouched, but `sortKey` /
55
+ * `sortDirection` still update on header clicks and `ml:sort` still fires
56
+ * so the consumer can re-query the server with the new ordering.
57
+ */
58
+ manualSort: boolean;
42
59
  /** Column definitions */
43
60
  columns: TableColumn[];
44
61
  /** Row data */
@@ -1 +1 @@
1
- {"version":3,"file":"table.component.d.ts","sourceRoot":"","sources":["../../../../src/components/data-display/table/table.component.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACrG,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAiBnE;;;;;;;;;;;;;;GAcG;AACH,qBAMa,cAAe,YAAW,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,gBAAgB;IAC3F,UAAU,EAAG,WAAW,CAAC;IAEhC,+DAA+D;IACxD,aAAa,UAAS;IAE7B,0CAA0C;IACnC,SAAS,UAAS;IAEzB,kDAAkD;IAC3C,gBAAgB,UAAS;IAEhC,0CAA0C;IACnC,UAAU,UAAS;IAE1B,kCAAkC;IAC3B,OAAO,UAAS;IAEvB,8BAA8B;IACvB,SAAS,UAAQ;IAExB,0BAA0B;IACnB,YAAY,UAAS;IAE5B,iBAAiB;IACV,IAAI,EAAE,IAAI,GAAG,IAAI,CAAQ;IAEhC,yBAAyB;IAClB,UAAU,SAAM;IAEvB,+BAA+B;IACxB,WAAW,SAAM;IAExB,2DAA2D;IACpD,OAAO,UAAS;IAEvB,yBAAyB;IAClB,OAAO,EAAE,WAAW,EAAE,CAAM;IAEnC,eAAe;IACR,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAM;IAE5C,kCAAkC;IAC3B,OAAO,SAAM;IAEpB,6BAA6B;IACtB,aAAa,EAAE,aAAa,CAAS;IAE5C,+BAA+B;IACxB,eAAe,EAAE,MAAM,EAAE,CAAM;IAI/B,UAAU,SAAK;IACf,QAAQ,SAAM;IAIrB,OAAO,CAAC,SAAS,CAAyB;IAC1C,OAAO,CAAC,SAAS,CAA4B;IAI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AM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAcjD;IAED,IAAW,WAAW,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAGlD;IAED,IAAW,eAAe,IAAI,MAAM,CAEnC;IAED,IAAW,kBAAkB,IAAI,MAAM,CAGtC;IAED,IAAW,QAAQ,IAAI,MAAM,CAE5B;IAED,IAAW,WAAW,IAAI,OAAO,CAEhC;IAED,IAAW,YAAY,IAAI,OAAO,CAEjC;IAEM,aAAa,GAAI,OAAO,MAAM,KAAG,OAAO,CAE7C;IAIK,UAAU,GAAI,QAAQ,WAAW,KAAG,IAAI,CAiB7C;IAEK,eAAe,QAAO,IAAI,CAO/B;IAEK,eAAe,GAAI,OAAO,MAAM,EAAE,OAAO,KAAK,KAAG,IAAI,CAQ1D;IAEK,cAAc,GAAI,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,MAAM,KAAG,IAAI,CAQzE;IAEF,OAAO,CAAC,UAAU;CASlB"}
@@ -25,6 +25,16 @@ EventTarget.prototype.addEventListener = function (type, listener, options) {
25
25
  * @example
26
26
  * ```html
27
27
  * <ml-table .columns=${columns} .rows=${rows} striped hoverable></ml-table>
28
+ *
29
+ * <!-- Server-paginated: parent handles ordering -->
30
+ * <ml-table
31
+ * manual-sort
32
+ * .columns=${columns}
33
+ * .rows=${pageRows}
34
+ * .sortKey=${sortKey}
35
+ * .sortDirection=${sortDirection}
36
+ * @ml:sort=${handleSort}
37
+ * ></ml-table>
28
38
  * ```
29
39
  *
30
40
  * @fires ml:sort - Emitted when a sortable column header is clicked. Detail: { key, direction }
@@ -58,6 +68,13 @@ let TableComponent = class TableComponent {
58
68
  this.description = '';
59
69
  /** Enable virtual scrolling (renders only visible rows) */
60
70
  this.virtual = false;
71
+ /**
72
+ * Opt out of client-side row sorting. When true, `rows` is rendered in the
73
+ * order provided and `sortedRows` returns it untouched, but `sortKey` /
74
+ * `sortDirection` still update on header clicks and `ml:sort` still fires
75
+ * so the consumer can re-query the server with the new ordering.
76
+ */
77
+ this.manualSort = false;
61
78
  /** Column definitions */
62
79
  this.columns = [];
63
80
  /** Row data */
@@ -192,7 +209,7 @@ let TableComponent = class TableComponent {
192
209
  // ── Data ──────────────────────────────────────────────────────────────────────
193
210
  /** Rows sorted by current sort key/direction */
194
211
  get sortedRows() {
195
- if (!this.sortKey)
212
+ if (this.manualSort || !this.sortKey)
196
213
  return this.rows;
197
214
  const key = this.sortKey;
198
215
  const dir = this.sortDirection === 'asc' ? 1 : -1;
@@ -244,7 +261,7 @@ TableComponent = __decorate([
244
261
  selector: 'ml-table',
245
262
  template: tableTemplate,
246
263
  styles: tableStyles,
247
- attributes: ['selectable', 'striped', 'hoverable', 'size', 'table-title', 'description', 'sticky-header', 'virtual']
264
+ attributes: ['selectable', 'striped', 'hoverable', 'size', 'table-title', 'description', 'sticky-header', 'virtual', 'manual-sort']
248
265
  })
249
266
  ], TableComponent);
250
267
  export { TableComponent };
@@ -20,5 +20,6 @@ export declare class DialogRef<TResult = unknown, TData = unknown> {
20
20
  afterClosed(callback: (result: TResult | undefined) => void): void;
21
21
  private onCancel;
22
22
  private onBackdropClick;
23
+ private _dismissDescendantPopovers;
23
24
  }
24
25
  //# sourceMappingURL=dialog-ref.class.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-ref.class.d.ts","sourceRoot":"","sources":["../../../../src/components/overlays/dialog/dialog-ref.class.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,qBAAa,SAAS,CAAC,OAAO,GAAG,OAAO,EAAE,KAAK,GAAG,OAAO;IASvD,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAT3B,OAAO,CAAC,oBAAoB,CAA6B;IACzD,OAAO,CAAC,oBAAoB,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IAC1D,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAmC;gBAGtD,SAAS,EAAE,QAAQ,EACnB,SAAS,EAAE,iBAAiB;IAM9C,IAAW,QAAQ,IAAI,QAAQ,CAE9B;IAED,IAAW,IAAI,IAAI,KAAK,GAAG,SAAS,CAEnC;IAED,IAAW,YAAY,IAAI,OAAO,CAEjC;IAEM,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,KAAK,CAAC,GAAG,IAAI;IAyB/C,IAAI,IAAI,IAAI;IAKZ,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI;IAM7B,WAAW,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI;IAIvC,WAAW,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,KAAK,IAAI,GAAG,IAAI;IAIzE,OAAO,CAAC,QAAQ;IAMhB,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,0BAA0B;CAelC"}
@@ -43,6 +43,7 @@ export class DialogRef {
43
43
  this._afterOpenedCallback?.();
44
44
  }
45
45
  close(result) {
46
+ this._dismissDescendantPopovers(this._dialogEl);
46
47
  this._dialogEl.close();
47
48
  this._afterClosedCallback?.(result);
48
49
  }
@@ -62,4 +63,20 @@ export class DialogRef {
62
63
  this.close();
63
64
  }
64
65
  }
66
+ _dismissDescendantPopovers(root) {
67
+ const children = root.querySelectorAll('*');
68
+ children.forEach((el) => {
69
+ if (el.hasAttribute('popover')) {
70
+ try {
71
+ el.hidePopover();
72
+ }
73
+ catch {
74
+ // Not currently in the top layer — safe to ignore
75
+ }
76
+ }
77
+ if (el.shadowRoot) {
78
+ this._dismissDescendantPopovers(el.shadowRoot);
79
+ }
80
+ });
81
+ }
65
82
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@melodicdev/components",
3
- "version": "1.6.6",
3
+ "version": "1.6.8",
4
4
  "description": "Themeable UI component library built on the Melodic Framework",
5
5
  "license": "MIT",
6
6
  "author": "Melodic Development",