monobill-mintui 0.6.708 → 0.6.710
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/bin/component-dependencies.json +4 -3
- package/dist/components/chunks/{date-picker-Bqre6M4g.js → date-picker-C0U4312C.js} +24 -6
- package/dist/components/chunks/date-picker-MT1QYTbL.js +1 -0
- package/dist/components/chunks/{input-j6FCwb-x.js → input-BTRS6ggP.js} +89 -11
- package/dist/components/chunks/input-D9FDLgwb.js +1 -0
- package/dist/components/chunks/{popover-C1qiTAvR.js → popover-D5-jzS7p.js} +10 -2
- package/dist/components/chunks/{popover-6cborap6.js → popover-DFxM40QK.js} +1 -1
- package/dist/components/chunks/select-B1T9k1wp.js +615 -0
- package/dist/components/chunks/select-DYbwUtkq.js +1 -0
- package/dist/components/chunks/{time-picker-DY5emLWw.js → time-picker-BJY2sFyL.js} +22 -7
- package/dist/components/chunks/time-picker-DA-kUn8C.js +1 -0
- package/dist/components/date-picker/DatePicker.d.ts +6 -0
- package/dist/components/date-picker/DatePicker.d.ts.map +1 -1
- package/dist/components/date-picker/browser.js +1 -1
- package/dist/components/date-picker/index.cjs +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/datetime-picker/DateTimePicker.d.ts +4 -0
- package/dist/components/datetime-picker/DateTimePicker.d.ts.map +1 -1
- package/dist/components/datetime-picker/browser.js +21 -6
- package/dist/components/datetime-picker/index.cjs +1 -1
- package/dist/components/datetime-picker/index.js +21 -6
- package/dist/components/input/Input.d.ts +3 -0
- package/dist/components/input/Input.d.ts.map +1 -1
- package/dist/components/input/browser.js +1 -1
- package/dist/components/input/index.cjs +1 -1
- package/dist/components/input/index.js +1 -1
- package/dist/components/navigation/browser.js +1 -1
- package/dist/components/navigation/index.cjs +1 -1
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/off-canvas/OffCanvas.d.ts +2 -0
- package/dist/components/off-canvas/OffCanvas.d.ts.map +1 -1
- package/dist/components/off-canvas/browser.js +17 -12
- package/dist/components/off-canvas/index.cjs +1 -1
- package/dist/components/off-canvas/index.js +17 -12
- package/dist/components/page/browser.js +1 -1
- package/dist/components/page/index.cjs +1 -1
- package/dist/components/page/index.js +1 -1
- package/dist/components/popover/Popover.d.ts.map +1 -1
- package/dist/components/popover/browser.js +1 -1
- package/dist/components/popover/index.cjs +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/resource-table/ResourceTable.d.ts +7 -0
- package/dist/components/resource-table/ResourceTable.d.ts.map +1 -1
- package/dist/components/resource-table/browser.js +40 -14
- package/dist/components/resource-table/index.cjs +2 -2
- package/dist/components/resource-table/index.js +40 -14
- package/dist/components/search/browser.js +1 -1
- package/dist/components/search/index.cjs +1 -1
- package/dist/components/search/index.js +1 -1
- package/dist/components/select/NativeSelect.d.ts +4 -0
- package/dist/components/select/NativeSelect.d.ts.map +1 -1
- package/dist/components/select/Select.d.ts +4 -0
- package/dist/components/select/Select.d.ts.map +1 -1
- package/dist/components/select/browser.js +2 -578
- package/dist/components/select/index.cjs +1 -1
- package/dist/components/select/index.js +2 -578
- package/dist/components/side-navigation/browser.js +1 -1
- package/dist/components/side-navigation/index.cjs +1 -1
- package/dist/components/side-navigation/index.js +1 -1
- package/dist/components/sortable/browser.js +1 -1
- package/dist/components/sortable/index.cjs +1 -1
- package/dist/components/sortable/index.js +1 -1
- package/dist/components/tags/browser.js +1 -1
- package/dist/components/tags/index.cjs +1 -1
- package/dist/components/tags/index.js +1 -1
- package/dist/components/time-picker/TimePicker.d.ts +4 -0
- package/dist/components/time-picker/TimePicker.d.ts.map +1 -1
- package/dist/components/time-picker/browser.js +1 -1
- package/dist/components/time-picker/index.cjs +1 -1
- package/dist/components/time-picker/index.js +1 -1
- package/dist/components/tree/browser.js +2 -2
- package/dist/components/tree/index.cjs +1 -1
- package/dist/components/tree/index.js +2 -2
- package/dist/date-picker.css +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.css +5 -5
- package/dist/index.js +2469 -2269
- package/dist/input.css +1 -1
- package/dist/off-canvas.css +1 -1
- package/dist/resource-table.css +1 -1
- package/dist/select.css +1 -1
- package/package.json +1 -1
- package/dist/components/chunks/date-picker-CBucQNne.js +0 -1
- package/dist/components/chunks/input-Br2qLesW.js +0 -1
- package/dist/components/chunks/time-picker-CxdBZbER.js +0 -1
- /package/dist/components/chunks/{sortable-Dgk6LvmB.js → sortable-BSw58wy_.js} +0 -0
- /package/dist/components/chunks/{sortable-BAL3k9Se.js → sortable-D3et5wXB.js} +0 -0
|
@@ -36,10 +36,10 @@ var t = class extends HTMLElement {
|
|
|
36
36
|
];
|
|
37
37
|
}
|
|
38
38
|
constructor() {
|
|
39
|
-
super(), this._overlay = null, this._offCanvas = null, this._header = null, this._headingSlot = null, this._bodySlot = null, this._actionsSlot = null, this._closeButton = null, this._contentObserver = null, this._renderFrame = null, this._exitTimer = null, this._previousFocus = null, this._dialogWasOpen = !1, this._dialogKeydownHandler = null;
|
|
39
|
+
super(), this._overlay = null, this._offCanvas = null, this._header = null, this._headingSlot = null, this._bodySlot = null, this._actionsSlot = null, this._closeButton = null, this._contentObserver = null, this._renderFrame = null, this._exitTimer = null, this._enterPending = !1, this._exitPending = !1, this._previousFocus = null, this._dialogWasOpen = !1, this._dialogKeydownHandler = null;
|
|
40
40
|
}
|
|
41
41
|
connectedCallback() {
|
|
42
|
-
this.classList.add("mint-off-canvas-host"), this.isOpen() || this.classList.add("mint-off-canvas-hidden"), this.render(), this._observeContentMutations(), this._dialogKeydownHandler = (e) => {
|
|
42
|
+
this.classList.add("mint-off-canvas-host"), this.isOpen() || (this.classList.add("mint-off-canvas-hidden"), this.style.display = "none"), this.render(), this._observeContentMutations(), this._dialogKeydownHandler = (e) => {
|
|
43
43
|
if (!this.isOpen()) return;
|
|
44
44
|
if (e.key === "Escape") {
|
|
45
45
|
e.preventDefault(), e.stopPropagation(), this.close();
|
|
@@ -58,7 +58,7 @@ var t = class extends HTMLElement {
|
|
|
58
58
|
}, document.addEventListener("keydown", this._dialogKeydownHandler, !0);
|
|
59
59
|
}
|
|
60
60
|
disconnectedCallback() {
|
|
61
|
-
this._dialogKeydownHandler &&= (document.removeEventListener("keydown", this._dialogKeydownHandler, !0), null), this._contentObserver &&= (this._contentObserver.disconnect(), null), this._renderFrame !== null && (cancelAnimationFrame(this._renderFrame), this._renderFrame = null), this._exitTimer !== null && (clearTimeout(this._exitTimer), this._exitTimer = null);
|
|
61
|
+
this._dialogKeydownHandler &&= (document.removeEventListener("keydown", this._dialogKeydownHandler, !0), null), this._contentObserver &&= (this._contentObserver.disconnect(), null), this._renderFrame !== null && (cancelAnimationFrame(this._renderFrame), this._renderFrame = null), this._exitTimer !== null && (clearTimeout(this._exitTimer), this._exitTimer = null), this._enterPending = !1, this._exitPending = !1;
|
|
62
62
|
}
|
|
63
63
|
attributeChangedCallback(e, t, n) {
|
|
64
64
|
t !== n && this.isConnected && this.render();
|
|
@@ -157,34 +157,39 @@ var t = class extends HTMLElement {
|
|
|
157
157
|
}
|
|
158
158
|
_animateEnter() {
|
|
159
159
|
let e = this._offCanvas?.querySelector(".mint-off-canvas-panel");
|
|
160
|
-
if (!e) return;
|
|
161
|
-
this.
|
|
160
|
+
if (!e || (this._exitTimer !== null && (clearTimeout(this._exitTimer), this._exitTimer = null), this._exitPending = !1, this._enterPending || this.classList.contains("mint-off-canvas-open"))) return;
|
|
161
|
+
this._enterPending = !0;
|
|
162
162
|
let t = this.getPosition(), n = !this._dialogWasOpen;
|
|
163
163
|
if (n) {
|
|
164
164
|
this._dialogWasOpen = !0;
|
|
165
165
|
let e = document.activeElement;
|
|
166
166
|
this._previousFocus = e instanceof HTMLElement && e !== document.body ? e : null;
|
|
167
167
|
}
|
|
168
|
-
e.style.transform = this._getTransformValue(t, !1),
|
|
168
|
+
e.style.transition = "none", e.style.transform = this._getTransformValue(t, !1), this.style.display = "block", this.classList.remove("mint-off-canvas-hidden"), e.getBoundingClientRect(), e.style.transition = "transform 200ms ease-out", requestAnimationFrame(() => {
|
|
169
169
|
requestAnimationFrame(() => {
|
|
170
|
-
|
|
170
|
+
if (!this.isOpen()) {
|
|
171
|
+
this._enterPending = !1;
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
this.classList.add("mint-off-canvas-open"), e.style.transform = this._getTransformValue(t, !0), this._enterPending = !1, n && (this._getDialogFocusableElements(e)[0] ?? e).focus();
|
|
171
175
|
});
|
|
172
176
|
});
|
|
173
177
|
}
|
|
174
178
|
_animateExit() {
|
|
175
|
-
this.classList.
|
|
179
|
+
if (this.classList.contains("mint-off-canvas-hidden") || this._exitPending) return;
|
|
180
|
+
this._enterPending = !1, this._exitPending = !0, this.classList.remove("mint-off-canvas-open");
|
|
176
181
|
let e = this._offCanvas?.querySelector(".mint-off-canvas-panel");
|
|
177
182
|
if (!e) {
|
|
178
|
-
this.classList.add("mint-off-canvas-hidden"), this._dialogWasOpen = !1;
|
|
183
|
+
this.classList.add("mint-off-canvas-hidden"), this.style.display = "none", this._dialogWasOpen = !1, this._exitPending = !1;
|
|
179
184
|
return;
|
|
180
185
|
}
|
|
181
186
|
let t = this.getPosition();
|
|
182
|
-
e.style.transition = "transform
|
|
187
|
+
e.style.transition = "transform 200ms ease-in", e.style.transform = this._getTransformValue(t, !1), this._exitTimer !== null && clearTimeout(this._exitTimer), this._exitTimer = window.setTimeout(() => {
|
|
183
188
|
if (this._exitTimer = null, this.isOpen()) return;
|
|
184
|
-
this.classList.add("mint-off-canvas-hidden"), e.style.transform = "", e.style.transition = "";
|
|
189
|
+
this.classList.add("mint-off-canvas-hidden"), this.style.display = "none", e.style.transform = "", e.style.transition = "", this._exitPending = !1;
|
|
185
190
|
let t = this._previousFocus;
|
|
186
191
|
this._previousFocus = null, t?.isConnected && t.focus();
|
|
187
|
-
},
|
|
192
|
+
}, 200);
|
|
188
193
|
}
|
|
189
194
|
};
|
|
190
195
|
customElements.get("mint-off-canvas") || e("mint-off-canvas", t);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../chunks/icon-CWOP4Com.js`);const e=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/text-CfvRRKGZ.js`),require(`../chunks/button-B_yN18B-.js`),require(`../chunks/stack-DEIdHS0n.js`);var t=class extends HTMLElement{static get observedAttributes(){return[`id`,`heading`,`open`,`position`,`full-page`,`width`,`height`]}constructor(){super(),this._overlay=null,this._offCanvas=null,this._header=null,this._headingSlot=null,this._bodySlot=null,this._actionsSlot=null,this._closeButton=null,this._contentObserver=null,this._renderFrame=null,this._exitTimer=null,this._previousFocus=null,this._dialogWasOpen=!1,this._dialogKeydownHandler=null}connectedCallback(){this.classList.add(`mint-off-canvas-host`),this.isOpen()||this.classList.add(`mint-off-canvas-hidden`),this.render(),this._observeContentMutations(),this._dialogKeydownHandler=e=>{if(!this.isOpen())return;if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),this.close();return}if(e.key!==`Tab`)return;let t=this._offCanvas?.querySelector(`.mint-off-canvas-panel`);if(!t)return;let n=this._getDialogFocusableElements(t);if(!n.length){e.preventDefault(),t.focus();return}let r=n[0],i=n[n.length-1],a=document.activeElement;e.shiftKey&&(a===r||!t.contains(a))?(e.preventDefault(),i.focus()):!e.shiftKey&&(a===i||!t.contains(a))&&(e.preventDefault(),r.focus())},document.addEventListener(`keydown`,this._dialogKeydownHandler,!0)}disconnectedCallback(){this._dialogKeydownHandler&&=(document.removeEventListener(`keydown`,this._dialogKeydownHandler,!0),null),this._contentObserver&&=(this._contentObserver.disconnect(),null),this._renderFrame!==null&&(cancelAnimationFrame(this._renderFrame),this._renderFrame=null),this._exitTimer!==null&&(clearTimeout(this._exitTimer),this._exitTimer=null)}attributeChangedCallback(e,t,n){t!==n&&this.isConnected&&this.render()}_scheduleRender(){this._renderFrame===null&&(this._renderFrame=requestAnimationFrame(()=>{this._renderFrame=null,this.render()}))}getId(){return this.getAttribute(`id`)||``}getHeading(){return this.getAttribute(`heading`)||``}getPosition(){let e=this.getAttribute(`position`)?.toLowerCase();return e===`top`||e===`bottom`||e===`left`||e===`right`?e:`right`}isFullPage(){return this.getAttribute(`full-page`)===`true`}getWidth(){return this.getAttribute(`width`)||`320px`}getHeight(){return this.getAttribute(`height`)||``}_normalizeCssValue(e){return/^\d+(\.\d+)?$/.test(e.trim())?`${e.trim()}px`:e.trim()}isOpen(){return this.getAttribute(`open`)===`true`}open(){this.setAttribute(`open`,`true`)}close(){this.removeAttribute(`open`)}render(){let e=this.getId(),t=this.getHeading(),n=this.isOpen(),r=this.getPosition(),i=this.isFullPage(),a=this.getHeight();e&&(this.id=e),this._overlay||(this._overlay=document.createElement(`div`),this._overlay.className=`mint-off-canvas-overlay`,this._overlay.setAttribute(`aria-hidden`,`true`),this._overlay.addEventListener(`click`,()=>this.close()),this.appendChild(this._overlay)),this._offCanvas||(this._offCanvas=document.createElement(`div`),this.appendChild(this._offCanvas)),this._offCanvas.className=`mint-off-canvas-shell`,this._offCanvas.dataset.position=r,this._offCanvas.dataset.fullPage=String(i);let o=this._offCanvas.querySelector(`.mint-off-canvas-panel`);o||(o=document.createElement(`div`),o.className=`mint-off-canvas-panel`,o.style.transform=this._getTransformValue(r,!1),this._offCanvas.appendChild(o)),o.setAttribute(`role`,`dialog`),o.setAttribute(`aria-modal`,`true`),o.hasAttribute(`tabindex`)||(o.tabIndex=-1),n?this._animateEnter():this._animateExit(),o.style.removeProperty(`--off-canvas-width`),o.style.removeProperty(`--off-canvas-height`),r===`top`||r===`bottom`?a&&o.style.setProperty(`--off-canvas-height`,this._normalizeCssValue(a)):o.style.setProperty(`--off-canvas-width`,this._normalizeCssValue(this.getWidth())),this._header||(this._header=document.createElement(`div`),this._header.className=`mint-off-canvas-header`,o.appendChild(this._header)),this._headingSlot||(this._headingSlot=document.createElement(`div`),this._headingSlot.className=`mint-off-canvas-heading`,this._headingSlot.setAttribute(`slot`,`heading`),this._header.appendChild(this._headingSlot));let s=this._headingSlot.querySelector(`mint-text`);if(t?(s||(s=document.createElement(`mint-text`),s.setAttribute(`size`,`sub-heading`),s.setAttribute(`bold`,`true`),this._headingSlot.appendChild(s)),s.textContent=t,s.id=`${e||`mint-off-canvas`}-heading`,o.setAttribute(`aria-labelledby`,s.id),o.removeAttribute(`aria-label`)):s&&s.remove(),!t){let e=this.getAttribute(`aria-label`)?.trim();e?o.setAttribute(`aria-label`,e):o.hasAttribute(`aria-label`)||o.setAttribute(`aria-label`,`Dialog`)}Array.from(this.children).filter(e=>e!==this._overlay&&e!==this._offCanvas&&e!==this._headingSlot&&e.getAttribute(`slot`)===`heading`).forEach(e=>{this._headingSlot&&e.parentElement!==this._headingSlot&&this._headingSlot.appendChild(e)}),this._closeButton||(this._closeButton=document.createElement(`mint-button`),this._closeButton.setAttribute(`variant`,`ghost`),this._closeButton.setAttribute(`icon`,`close`),this._closeButton.setAttribute(`aria-label`,`Close panel`),this._closeButton.addEventListener(`click`,()=>this.close()),this._header.appendChild(this._closeButton)),this._bodySlot||(this._bodySlot=document.createElement(`div`),this._bodySlot.className=`mint-off-canvas-body`,this._bodySlot.setAttribute(`slot`,`body`),o.appendChild(this._bodySlot)),Array.from(this.children).filter(e=>e!==this._overlay&&e!==this._offCanvas&&e!==this._bodySlot&&e.getAttribute(`slot`)===`body`).forEach(e=>{this._bodySlot&&e.parentElement!==this._bodySlot&&this._bodySlot.appendChild(e)}),this._actionsSlot||(this._actionsSlot=document.createElement(`div`),this._actionsSlot.className=`mint-off-canvas-actions`,this._actionsSlot.setAttribute(`slot`,`actions`),o.appendChild(this._actionsSlot));let c=this._actionsSlot.querySelector(`mint-stack`);c||(c=document.createElement(`mint-stack`),c.setAttribute(`direction`,`horizontal`),c.className=`mint-off-canvas-actions-stack`,this._actionsSlot.appendChild(c)),Array.from(this.children).filter(e=>e!==this._overlay&&e!==this._offCanvas&&e!==this._actionsSlot&&e.getAttribute(`slot`)===`actions`).forEach(e=>{Array.from(e.children).forEach(e=>{e.parentElement!==c&&c.appendChild(e)}),e.parentElement&&e.remove()}),Array.from(this.children).forEach(e=>{e!==this._overlay&&e!==this._offCanvas&&e.getAttribute(`slot`)!==`heading`&&e.getAttribute(`slot`)!==`body`&&e.getAttribute(`slot`)!==`actions`&&e!==this._headingSlot&&e!==this._bodySlot&&e!==this._actionsSlot&&e.parentElement!==this._bodySlot&&this._bodySlot.appendChild(e)})}_getTransformValue(e,t){if(t)switch(e){case`top`:return`translateY(0)`;case`bottom`:return`translateY(0)`;case`left`:return`translateX(0)`;case`right`:return`translateX(0)`;default:return`translateX(0)`}else switch(e){case`top`:return`translateY(-100%)`;case`bottom`:return`translateY(100%)`;case`left`:return`translateX(-100%)`;case`right`:return`translateX(100%)`;default:return`translateX(100%)`}}_observeContentMutations(){this._contentObserver||=new MutationObserver(()=>{this._scheduleRender()}),this._contentObserver.disconnect(),this._contentObserver.observe(this,{childList:!0,attributes:!0,attributeFilter:[`slot`]})}_getDialogFocusableElements(e){return Array.from(e.querySelectorAll(`button:not([disabled]), [href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`)).filter(e=>{if(e.closest(`[hidden], [aria-hidden="true"]`))return!1;let t=window.getComputedStyle(e);return t.display!==`none`&&t.visibility!==`hidden`})}_animateEnter(){let e=this._offCanvas?.querySelector(`.mint-off-canvas-panel`);if(!e
|
|
1
|
+
require(`../chunks/icon-CWOP4Com.js`);const e=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/text-CfvRRKGZ.js`),require(`../chunks/button-B_yN18B-.js`),require(`../chunks/stack-DEIdHS0n.js`);var t=class extends HTMLElement{static get observedAttributes(){return[`id`,`heading`,`open`,`position`,`full-page`,`width`,`height`]}constructor(){super(),this._overlay=null,this._offCanvas=null,this._header=null,this._headingSlot=null,this._bodySlot=null,this._actionsSlot=null,this._closeButton=null,this._contentObserver=null,this._renderFrame=null,this._exitTimer=null,this._enterPending=!1,this._exitPending=!1,this._previousFocus=null,this._dialogWasOpen=!1,this._dialogKeydownHandler=null}connectedCallback(){this.classList.add(`mint-off-canvas-host`),this.isOpen()||(this.classList.add(`mint-off-canvas-hidden`),this.style.display=`none`),this.render(),this._observeContentMutations(),this._dialogKeydownHandler=e=>{if(!this.isOpen())return;if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),this.close();return}if(e.key!==`Tab`)return;let t=this._offCanvas?.querySelector(`.mint-off-canvas-panel`);if(!t)return;let n=this._getDialogFocusableElements(t);if(!n.length){e.preventDefault(),t.focus();return}let r=n[0],i=n[n.length-1],a=document.activeElement;e.shiftKey&&(a===r||!t.contains(a))?(e.preventDefault(),i.focus()):!e.shiftKey&&(a===i||!t.contains(a))&&(e.preventDefault(),r.focus())},document.addEventListener(`keydown`,this._dialogKeydownHandler,!0)}disconnectedCallback(){this._dialogKeydownHandler&&=(document.removeEventListener(`keydown`,this._dialogKeydownHandler,!0),null),this._contentObserver&&=(this._contentObserver.disconnect(),null),this._renderFrame!==null&&(cancelAnimationFrame(this._renderFrame),this._renderFrame=null),this._exitTimer!==null&&(clearTimeout(this._exitTimer),this._exitTimer=null),this._enterPending=!1,this._exitPending=!1}attributeChangedCallback(e,t,n){t!==n&&this.isConnected&&this.render()}_scheduleRender(){this._renderFrame===null&&(this._renderFrame=requestAnimationFrame(()=>{this._renderFrame=null,this.render()}))}getId(){return this.getAttribute(`id`)||``}getHeading(){return this.getAttribute(`heading`)||``}getPosition(){let e=this.getAttribute(`position`)?.toLowerCase();return e===`top`||e===`bottom`||e===`left`||e===`right`?e:`right`}isFullPage(){return this.getAttribute(`full-page`)===`true`}getWidth(){return this.getAttribute(`width`)||`320px`}getHeight(){return this.getAttribute(`height`)||``}_normalizeCssValue(e){return/^\d+(\.\d+)?$/.test(e.trim())?`${e.trim()}px`:e.trim()}isOpen(){return this.getAttribute(`open`)===`true`}open(){this.setAttribute(`open`,`true`)}close(){this.removeAttribute(`open`)}render(){let e=this.getId(),t=this.getHeading(),n=this.isOpen(),r=this.getPosition(),i=this.isFullPage(),a=this.getHeight();e&&(this.id=e),this._overlay||(this._overlay=document.createElement(`div`),this._overlay.className=`mint-off-canvas-overlay`,this._overlay.setAttribute(`aria-hidden`,`true`),this._overlay.addEventListener(`click`,()=>this.close()),this.appendChild(this._overlay)),this._offCanvas||(this._offCanvas=document.createElement(`div`),this.appendChild(this._offCanvas)),this._offCanvas.className=`mint-off-canvas-shell`,this._offCanvas.dataset.position=r,this._offCanvas.dataset.fullPage=String(i);let o=this._offCanvas.querySelector(`.mint-off-canvas-panel`);o||(o=document.createElement(`div`),o.className=`mint-off-canvas-panel`,o.style.transform=this._getTransformValue(r,!1),this._offCanvas.appendChild(o)),o.setAttribute(`role`,`dialog`),o.setAttribute(`aria-modal`,`true`),o.hasAttribute(`tabindex`)||(o.tabIndex=-1),n?this._animateEnter():this._animateExit(),o.style.removeProperty(`--off-canvas-width`),o.style.removeProperty(`--off-canvas-height`),r===`top`||r===`bottom`?a&&o.style.setProperty(`--off-canvas-height`,this._normalizeCssValue(a)):o.style.setProperty(`--off-canvas-width`,this._normalizeCssValue(this.getWidth())),this._header||(this._header=document.createElement(`div`),this._header.className=`mint-off-canvas-header`,o.appendChild(this._header)),this._headingSlot||(this._headingSlot=document.createElement(`div`),this._headingSlot.className=`mint-off-canvas-heading`,this._headingSlot.setAttribute(`slot`,`heading`),this._header.appendChild(this._headingSlot));let s=this._headingSlot.querySelector(`mint-text`);if(t?(s||(s=document.createElement(`mint-text`),s.setAttribute(`size`,`sub-heading`),s.setAttribute(`bold`,`true`),this._headingSlot.appendChild(s)),s.textContent=t,s.id=`${e||`mint-off-canvas`}-heading`,o.setAttribute(`aria-labelledby`,s.id),o.removeAttribute(`aria-label`)):s&&s.remove(),!t){let e=this.getAttribute(`aria-label`)?.trim();e?o.setAttribute(`aria-label`,e):o.hasAttribute(`aria-label`)||o.setAttribute(`aria-label`,`Dialog`)}Array.from(this.children).filter(e=>e!==this._overlay&&e!==this._offCanvas&&e!==this._headingSlot&&e.getAttribute(`slot`)===`heading`).forEach(e=>{this._headingSlot&&e.parentElement!==this._headingSlot&&this._headingSlot.appendChild(e)}),this._closeButton||(this._closeButton=document.createElement(`mint-button`),this._closeButton.setAttribute(`variant`,`ghost`),this._closeButton.setAttribute(`icon`,`close`),this._closeButton.setAttribute(`aria-label`,`Close panel`),this._closeButton.addEventListener(`click`,()=>this.close()),this._header.appendChild(this._closeButton)),this._bodySlot||(this._bodySlot=document.createElement(`div`),this._bodySlot.className=`mint-off-canvas-body`,this._bodySlot.setAttribute(`slot`,`body`),o.appendChild(this._bodySlot)),Array.from(this.children).filter(e=>e!==this._overlay&&e!==this._offCanvas&&e!==this._bodySlot&&e.getAttribute(`slot`)===`body`).forEach(e=>{this._bodySlot&&e.parentElement!==this._bodySlot&&this._bodySlot.appendChild(e)}),this._actionsSlot||(this._actionsSlot=document.createElement(`div`),this._actionsSlot.className=`mint-off-canvas-actions`,this._actionsSlot.setAttribute(`slot`,`actions`),o.appendChild(this._actionsSlot));let c=this._actionsSlot.querySelector(`mint-stack`);c||(c=document.createElement(`mint-stack`),c.setAttribute(`direction`,`horizontal`),c.className=`mint-off-canvas-actions-stack`,this._actionsSlot.appendChild(c)),Array.from(this.children).filter(e=>e!==this._overlay&&e!==this._offCanvas&&e!==this._actionsSlot&&e.getAttribute(`slot`)===`actions`).forEach(e=>{Array.from(e.children).forEach(e=>{e.parentElement!==c&&c.appendChild(e)}),e.parentElement&&e.remove()}),Array.from(this.children).forEach(e=>{e!==this._overlay&&e!==this._offCanvas&&e.getAttribute(`slot`)!==`heading`&&e.getAttribute(`slot`)!==`body`&&e.getAttribute(`slot`)!==`actions`&&e!==this._headingSlot&&e!==this._bodySlot&&e!==this._actionsSlot&&e.parentElement!==this._bodySlot&&this._bodySlot.appendChild(e)})}_getTransformValue(e,t){if(t)switch(e){case`top`:return`translateY(0)`;case`bottom`:return`translateY(0)`;case`left`:return`translateX(0)`;case`right`:return`translateX(0)`;default:return`translateX(0)`}else switch(e){case`top`:return`translateY(-100%)`;case`bottom`:return`translateY(100%)`;case`left`:return`translateX(-100%)`;case`right`:return`translateX(100%)`;default:return`translateX(100%)`}}_observeContentMutations(){this._contentObserver||=new MutationObserver(()=>{this._scheduleRender()}),this._contentObserver.disconnect(),this._contentObserver.observe(this,{childList:!0,attributes:!0,attributeFilter:[`slot`]})}_getDialogFocusableElements(e){return Array.from(e.querySelectorAll(`button:not([disabled]), [href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`)).filter(e=>{if(e.closest(`[hidden], [aria-hidden="true"]`))return!1;let t=window.getComputedStyle(e);return t.display!==`none`&&t.visibility!==`hidden`})}_animateEnter(){let e=this._offCanvas?.querySelector(`.mint-off-canvas-panel`);if(!e||(this._exitTimer!==null&&(clearTimeout(this._exitTimer),this._exitTimer=null),this._exitPending=!1,this._enterPending||this.classList.contains(`mint-off-canvas-open`)))return;this._enterPending=!0;let t=this.getPosition(),n=!this._dialogWasOpen;if(n){this._dialogWasOpen=!0;let e=document.activeElement;this._previousFocus=e instanceof HTMLElement&&e!==document.body?e:null}e.style.transition=`none`,e.style.transform=this._getTransformValue(t,!1),this.style.display=`block`,this.classList.remove(`mint-off-canvas-hidden`),e.getBoundingClientRect(),e.style.transition=`transform 200ms ease-out`,requestAnimationFrame(()=>{requestAnimationFrame(()=>{if(!this.isOpen()){this._enterPending=!1;return}this.classList.add(`mint-off-canvas-open`),e.style.transform=this._getTransformValue(t,!0),this._enterPending=!1,n&&(this._getDialogFocusableElements(e)[0]??e).focus()})})}_animateExit(){if(this.classList.contains(`mint-off-canvas-hidden`)||this._exitPending)return;this._enterPending=!1,this._exitPending=!0,this.classList.remove(`mint-off-canvas-open`);let e=this._offCanvas?.querySelector(`.mint-off-canvas-panel`);if(!e){this.classList.add(`mint-off-canvas-hidden`),this.style.display=`none`,this._dialogWasOpen=!1,this._exitPending=!1;return}let t=this.getPosition();e.style.transition=`transform 200ms ease-in`,e.style.transform=this._getTransformValue(t,!1),this._exitTimer!==null&&clearTimeout(this._exitTimer),this._exitTimer=window.setTimeout(()=>{if(this._exitTimer=null,this.isOpen())return;this.classList.add(`mint-off-canvas-hidden`),this.style.display=`none`,e.style.transform=``,e.style.transition=``,this._exitPending=!1;let t=this._previousFocus;this._previousFocus=null,t?.isConnected&&t.focus()},200)}};customElements.get(`mint-off-canvas`)||e.t(`mint-off-canvas`,t),module.exports=t;
|
|
@@ -24,10 +24,10 @@ var t = class extends HTMLElement {
|
|
|
24
24
|
];
|
|
25
25
|
}
|
|
26
26
|
constructor() {
|
|
27
|
-
super(), this._overlay = null, this._offCanvas = null, this._header = null, this._headingSlot = null, this._bodySlot = null, this._actionsSlot = null, this._closeButton = null, this._contentObserver = null, this._renderFrame = null, this._exitTimer = null, this._previousFocus = null, this._dialogWasOpen = !1, this._dialogKeydownHandler = null;
|
|
27
|
+
super(), this._overlay = null, this._offCanvas = null, this._header = null, this._headingSlot = null, this._bodySlot = null, this._actionsSlot = null, this._closeButton = null, this._contentObserver = null, this._renderFrame = null, this._exitTimer = null, this._enterPending = !1, this._exitPending = !1, this._previousFocus = null, this._dialogWasOpen = !1, this._dialogKeydownHandler = null;
|
|
28
28
|
}
|
|
29
29
|
connectedCallback() {
|
|
30
|
-
this.classList.add("mint-off-canvas-host"), this.isOpen() || this.classList.add("mint-off-canvas-hidden"), this.render(), this._observeContentMutations(), this._dialogKeydownHandler = (e) => {
|
|
30
|
+
this.classList.add("mint-off-canvas-host"), this.isOpen() || (this.classList.add("mint-off-canvas-hidden"), this.style.display = "none"), this.render(), this._observeContentMutations(), this._dialogKeydownHandler = (e) => {
|
|
31
31
|
if (!this.isOpen()) return;
|
|
32
32
|
if (e.key === "Escape") {
|
|
33
33
|
e.preventDefault(), e.stopPropagation(), this.close();
|
|
@@ -46,7 +46,7 @@ var t = class extends HTMLElement {
|
|
|
46
46
|
}, document.addEventListener("keydown", this._dialogKeydownHandler, !0);
|
|
47
47
|
}
|
|
48
48
|
disconnectedCallback() {
|
|
49
|
-
this._dialogKeydownHandler &&= (document.removeEventListener("keydown", this._dialogKeydownHandler, !0), null), this._contentObserver &&= (this._contentObserver.disconnect(), null), this._renderFrame !== null && (cancelAnimationFrame(this._renderFrame), this._renderFrame = null), this._exitTimer !== null && (clearTimeout(this._exitTimer), this._exitTimer = null);
|
|
49
|
+
this._dialogKeydownHandler &&= (document.removeEventListener("keydown", this._dialogKeydownHandler, !0), null), this._contentObserver &&= (this._contentObserver.disconnect(), null), this._renderFrame !== null && (cancelAnimationFrame(this._renderFrame), this._renderFrame = null), this._exitTimer !== null && (clearTimeout(this._exitTimer), this._exitTimer = null), this._enterPending = !1, this._exitPending = !1;
|
|
50
50
|
}
|
|
51
51
|
attributeChangedCallback(e, t, n) {
|
|
52
52
|
t !== n && this.isConnected && this.render();
|
|
@@ -145,34 +145,39 @@ var t = class extends HTMLElement {
|
|
|
145
145
|
}
|
|
146
146
|
_animateEnter() {
|
|
147
147
|
let e = this._offCanvas?.querySelector(".mint-off-canvas-panel");
|
|
148
|
-
if (!e) return;
|
|
149
|
-
this.
|
|
148
|
+
if (!e || (this._exitTimer !== null && (clearTimeout(this._exitTimer), this._exitTimer = null), this._exitPending = !1, this._enterPending || this.classList.contains("mint-off-canvas-open"))) return;
|
|
149
|
+
this._enterPending = !0;
|
|
150
150
|
let t = this.getPosition(), n = !this._dialogWasOpen;
|
|
151
151
|
if (n) {
|
|
152
152
|
this._dialogWasOpen = !0;
|
|
153
153
|
let e = document.activeElement;
|
|
154
154
|
this._previousFocus = e instanceof HTMLElement && e !== document.body ? e : null;
|
|
155
155
|
}
|
|
156
|
-
e.style.transform = this._getTransformValue(t, !1),
|
|
156
|
+
e.style.transition = "none", e.style.transform = this._getTransformValue(t, !1), this.style.display = "block", this.classList.remove("mint-off-canvas-hidden"), e.getBoundingClientRect(), e.style.transition = "transform 200ms ease-out", requestAnimationFrame(() => {
|
|
157
157
|
requestAnimationFrame(() => {
|
|
158
|
-
|
|
158
|
+
if (!this.isOpen()) {
|
|
159
|
+
this._enterPending = !1;
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
this.classList.add("mint-off-canvas-open"), e.style.transform = this._getTransformValue(t, !0), this._enterPending = !1, n && (this._getDialogFocusableElements(e)[0] ?? e).focus();
|
|
159
163
|
});
|
|
160
164
|
});
|
|
161
165
|
}
|
|
162
166
|
_animateExit() {
|
|
163
|
-
this.classList.
|
|
167
|
+
if (this.classList.contains("mint-off-canvas-hidden") || this._exitPending) return;
|
|
168
|
+
this._enterPending = !1, this._exitPending = !0, this.classList.remove("mint-off-canvas-open");
|
|
164
169
|
let e = this._offCanvas?.querySelector(".mint-off-canvas-panel");
|
|
165
170
|
if (!e) {
|
|
166
|
-
this.classList.add("mint-off-canvas-hidden"), this._dialogWasOpen = !1;
|
|
171
|
+
this.classList.add("mint-off-canvas-hidden"), this.style.display = "none", this._dialogWasOpen = !1, this._exitPending = !1;
|
|
167
172
|
return;
|
|
168
173
|
}
|
|
169
174
|
let t = this.getPosition();
|
|
170
|
-
e.style.transition = "transform
|
|
175
|
+
e.style.transition = "transform 200ms ease-in", e.style.transform = this._getTransformValue(t, !1), this._exitTimer !== null && clearTimeout(this._exitTimer), this._exitTimer = window.setTimeout(() => {
|
|
171
176
|
if (this._exitTimer = null, this.isOpen()) return;
|
|
172
|
-
this.classList.add("mint-off-canvas-hidden"), e.style.transform = "", e.style.transition = "";
|
|
177
|
+
this.classList.add("mint-off-canvas-hidden"), this.style.display = "none", e.style.transform = "", e.style.transition = "", this._exitPending = !1;
|
|
173
178
|
let t = this._previousFocus;
|
|
174
179
|
this._previousFocus = null, t?.isConnected && t.focus();
|
|
175
|
-
},
|
|
180
|
+
}, 200);
|
|
176
181
|
}
|
|
177
182
|
};
|
|
178
183
|
customElements.get("mint-off-canvas") || e("mint-off-canvas", t);
|
|
@@ -22,7 +22,7 @@ import "../chunks/icon-hyFz3uhh.js";
|
|
|
22
22
|
import { t as e } from "../chunks/register-element-BFYmIynH.js";
|
|
23
23
|
import "../chunks/back-button-By8eO_KR.js";
|
|
24
24
|
import "../chunks/button-JPTyQfRs.js";
|
|
25
|
-
import "../chunks/popover-
|
|
25
|
+
import "../chunks/popover-D5-jzS7p.js";
|
|
26
26
|
//#region src/components/page/Page.js
|
|
27
27
|
var t = class extends HTMLElement {
|
|
28
28
|
static get observedAttributes() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require(`../chunks/icon-CWOP4Com.js`);const e=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/back-button-BGzrOtpx.js`),require(`../chunks/button-B_yN18B-.js`),require(`../chunks/popover-
|
|
1
|
+
require(`../chunks/icon-CWOP4Com.js`);const e=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/back-button-BGzrOtpx.js`),require(`../chunks/button-B_yN18B-.js`),require(`../chunks/popover-DFxM40QK.js`);var t=class extends HTMLElement{static get observedAttributes(){return[`heading`,`fallback-href`,`show-back-button`,`containered`]}constructor(){super(),this._actionsResizeObserver=null,this._actionsMutationObserver=null,this._actionsFrame=null,this._groupingActions=!1,this._actionFullWidthOriginal=new WeakMap,this._autoGroupedActions=new WeakSet,this._explicitOverflowActions=new WeakSet,this._root=this.attachShadow({mode:`open`}),this._root.innerHTML=`
|
|
2
2
|
<style>
|
|
3
3
|
/* The built-in back button lives inside this component's shadow root,
|
|
4
4
|
so document-level button.css cannot reach its light-DOM button. */
|
|
@@ -10,7 +10,7 @@ import "../chunks/icon-hyFz3uhh.js";
|
|
|
10
10
|
import { t as e } from "../chunks/register-element-BFYmIynH.js";
|
|
11
11
|
import "../chunks/back-button-By8eO_KR.js";
|
|
12
12
|
import "../chunks/button-JPTyQfRs.js";
|
|
13
|
-
import "../chunks/popover-
|
|
13
|
+
import "../chunks/popover-D5-jzS7p.js";
|
|
14
14
|
//#region src/components/page/Page.js
|
|
15
15
|
var t = class extends HTMLElement {
|
|
16
16
|
static get observedAttributes() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/popover/Popover.ts"],"names":[],"mappings":"AAEA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B;IAuP1B,MAAM,IAAI,IAAI;IA+Od,OAAO,CAAC,sBAAsB;IAkC9B,OAAO,CAAC,gBAAgB;IAcxB,OAAO,CAAC,eAAe;IAwDvB,OAAO,CAAC,uBAAuB;IA+C/B,OAAO,CAAC,wBAAwB;IAWhC,OAAO,CAAC,mBAAmB;CAa5B;AAOD,eAAe,WAAW,CAAA"}
|
|
@@ -13,5 +13,5 @@ const __mintLoadStyle = (key, url) => {
|
|
|
13
13
|
__mintLoadStyle('theme', '../../theme.css')
|
|
14
14
|
__mintLoadStyle('stack', '../../stack.css')
|
|
15
15
|
__mintLoadStyle('popover', '../../popover.css')
|
|
16
|
-
import { t as e } from "../chunks/popover-
|
|
16
|
+
import { t as e } from "../chunks/popover-D5-jzS7p.js";
|
|
17
17
|
export { e as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../chunks/popover-
|
|
1
|
+
const e=require(`../chunks/popover-DFxM40QK.js`);module.exports=e.t;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '../table/index';
|
|
2
2
|
import '../input/index';
|
|
3
|
+
import '../select/index';
|
|
3
4
|
import '../button/index';
|
|
4
5
|
import '../popover/index';
|
|
5
6
|
import '../icon/index';
|
|
@@ -341,6 +342,12 @@ declare class MintResourceTable extends HTMLElement {
|
|
|
341
342
|
* Returns null if not found or invalid
|
|
342
343
|
*/
|
|
343
344
|
private _getPageFromUrl;
|
|
345
|
+
/** Query-string key for this table's search term, independent of other tables. */
|
|
346
|
+
private _getSearchUrlKey;
|
|
347
|
+
/** Restore this table's search term from its own URL parameter. */
|
|
348
|
+
private _loadSearchFromUrl;
|
|
349
|
+
/** Store the search term and reset this table to its first page. */
|
|
350
|
+
private _updateSearchInUrl;
|
|
344
351
|
/**
|
|
345
352
|
* Update URL query params with the current page number
|
|
346
353
|
* Preserves all other query params
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceTable.d.ts","sourceRoot":"","sources":["../../../src/components/resource-table/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AC/C,OAAO,CAAC,sBAAsB,CAAK;IACnC,OAAO,CAAC,oBAAoB,CAAK;IACjC,2GAA2G;IAC3G,OAAO,CAAC,yBAAyB,CAAK;IACtC,OAAO,CAAC,sBAAsB,CAA8B;IAC5D,OAAO,CAAC,2BAA2B,CAA4B;IAC/D,oFAAoF;IACpF,OAAO,CAAC,gBAAgB,CAA8B;IACtD,OAAO,CAAC,qBAAqB,CAAiB;IAC9C,OAAO,CAAC,cAAc,CAA8B;IACpD,OAAO,CAAC,2BAA2B,CAA4B;IAC/D,OAAO,CAAC,uBAAuB,CAAsB;IACrD,OAAO,CAAC,uBAAuB,CAAY;IAC3C,OAAO,CAAC,yBAAyB,CAAsB;IACvD,2FAA2F;IAC3F,OAAO,CAAC,0BAA0B,CAA8B;IAChE,OAAO,CAAC,qBAAqB,CAAgC;IAE7D,OAAO,CAAC,kBAAkB;;IAS1B,IAAI,UAAU,IAAI,OAAO,CAExB;IAGD,IAAI,aAAa,IAAI,kBAAkB,GAAG,IAAI,CAE7C;IAED,IAAI,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"ResourceTable.d.ts","sourceRoot":"","sources":["../../../src/components/resource-table/ResourceTable.ts"],"names":[],"mappings":"AAIA,OAAO,gBAAgB,CAAA;AACvB,OAAO,gBAAgB,CAAA;AACvB,OAAO,iBAAiB,CAAA;AACxB,OAAO,iBAAiB,CAAA;AACxB,OAAO,kBAAkB,CAAA;AACzB,OAAO,eAAe,CAAA;AACtB,OAAO,2BAA2B,CAAA;AAClC,OAAO,0BAA0B,CAAA;AACjC,OAAO,2BAA2B,CAAA;AAClC,OAAO,wBAAwB,CAAA;AAC/B,OAAO,0BAA0B,CAAA;AACjC,OAAO,sBAAsB,CAAA;AAC7B,OAAO,kBAAkB,CAAA;AAEzB,UAAU,YAAY;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,K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AAC,kBAAkB;IAM1B,oEAAoE;IACpE,OAAO,CAAC,kBAAkB;IAgB1B;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAmBxB;;;OAGG;IACH,OAAO,CAAC,gBAAgB;CAWzB;AAMD,eAAe,iBAAiB,CAAA"}
|
|
@@ -14,22 +14,24 @@ __mintLoadStyle('theme', '../../theme.css')
|
|
|
14
14
|
__mintLoadStyle('table', '../../table.css')
|
|
15
15
|
__mintLoadStyle('input', '../../input.css')
|
|
16
16
|
__mintLoadStyle('icon', '../../icon.css')
|
|
17
|
-
__mintLoadStyle('
|
|
18
|
-
__mintLoadStyle('spinner', '../../spinner.css')
|
|
17
|
+
__mintLoadStyle('select', '../../select.css')
|
|
19
18
|
__mintLoadStyle('popover', '../../popover.css')
|
|
20
19
|
__mintLoadStyle('stack', '../../stack.css')
|
|
20
|
+
__mintLoadStyle('button', '../../button.css')
|
|
21
|
+
__mintLoadStyle('spinner', '../../spinner.css')
|
|
21
22
|
__mintLoadStyle('resource-table', '../../resource-table.css')
|
|
22
23
|
import "../chunks/icon-hyFz3uhh.js";
|
|
23
24
|
import { t as e } from "../chunks/register-element-BFYmIynH.js";
|
|
24
25
|
import "../chunks/icon-l34kRIZg.js";
|
|
25
26
|
import "../chunks/spinner-B2sml0AG.js";
|
|
26
27
|
import "../chunks/button-JPTyQfRs.js";
|
|
27
|
-
import "../chunks/input-
|
|
28
|
+
import "../chunks/input-BTRS6ggP.js";
|
|
28
29
|
import "../chunks/caret-down-ZjQN2yKq.js";
|
|
29
|
-
import "../chunks/popover-
|
|
30
|
+
import "../chunks/popover-D5-jzS7p.js";
|
|
30
31
|
import { n as t } from "../chunks/ScrollFade-DvzPIk2A.js";
|
|
31
32
|
import "../chunks/search-BwjKBnv9.js";
|
|
32
33
|
import "../chunks/table-B_g7lNzN.js";
|
|
34
|
+
import "../chunks/select-B1T9k1wp.js";
|
|
33
35
|
//#region src/components/resource-table/utility-aliases.js
|
|
34
36
|
var n = {
|
|
35
37
|
"-mr-1": "rtu-8956a4275",
|
|
@@ -219,7 +221,7 @@ var n = {
|
|
|
219
221
|
return this._configuration;
|
|
220
222
|
}
|
|
221
223
|
set configuration(e) {
|
|
222
|
-
e && typeof e == "object" && !Array.isArray(e) ? (this._configuration = e, this._tableId = this._configuration.id || this._tableId || `mint-resource-table-${Date.now()}`, this._perPage = this._configuration.perPage || 15, this._type = typeof this._configuration.data == "string" ? "ajax" : "provided", this._loaded = !1, this._currentPage = 1, this._offset = 0, this._loadPageFromUrl(), this._type === "provided" && Array.isArray(this._configuration.data) && (this._rows = [...this._configuration.data], this._totalRows = this._configuration.data.length), this._initializeColumns(), this.isConnected && this.render()) : e == null ? this._configuration = null : this._parseConfiguration();
|
|
224
|
+
e && typeof e == "object" && !Array.isArray(e) ? (this._configuration = e, this._tableId = this._configuration.id || this._tableId || `mint-resource-table-${Date.now()}`, this._perPage = this._configuration.perPage || 15, this._type = typeof this._configuration.data == "string" ? "ajax" : "provided", this._loaded = !1, this._currentPage = 1, this._offset = 0, this._loadPageFromUrl(), this._loadSearchFromUrl(), this._type === "provided" && Array.isArray(this._configuration.data) && (this._rows = [...this._configuration.data], this._totalRows = this._configuration.data.length), this._initializeColumns(), this.isConnected && this.render()) : e == null ? this._configuration = null : this._parseConfiguration();
|
|
223
225
|
}
|
|
224
226
|
connectedCallback() {
|
|
225
227
|
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "block", "w-full"), this._utilityClassObserver = new MutationObserver(() => this._replaceUtilityClasses()), this._utilityClassObserver.observe(this, {
|
|
@@ -265,7 +267,7 @@ var n = {
|
|
|
265
267
|
return;
|
|
266
268
|
}
|
|
267
269
|
try {
|
|
268
|
-
this._configuration = JSON.parse(e), this._tableId = this._configuration.id || this._tableId || `mint-resource-table-${Date.now()}`, this._perPage = this._configuration.perPage || 15, this._type = typeof this._configuration.data == "string" ? "ajax" : "provided", this._loaded = !1, this._currentPage = this._getPageFromUrl() || 1, this._offset = (this._currentPage - 1) * this._perPage, this._type === "provided" && Array.isArray(this._configuration.data) && (this._rows = [...this._configuration.data], this._totalRows = this._configuration.data.length), this._initializeColumns();
|
|
270
|
+
this._configuration = JSON.parse(e), this._tableId = this._configuration.id || this._tableId || `mint-resource-table-${Date.now()}`, this._perPage = this._configuration.perPage || 15, this._type = typeof this._configuration.data == "string" ? "ajax" : "provided", this._loaded = !1, this._currentPage = this._getPageFromUrl() || 1, this._offset = (this._currentPage - 1) * this._perPage, this._loadSearchFromUrl(), this._type === "provided" && Array.isArray(this._configuration.data) && (this._rows = [...this._configuration.data], this._totalRows = this._configuration.data.length), this._initializeColumns();
|
|
269
271
|
} catch (e) {
|
|
270
272
|
console.error("mint-resource-table: Invalid configuration JSON", e);
|
|
271
273
|
}
|
|
@@ -537,10 +539,18 @@ var n = {
|
|
|
537
539
|
return t;
|
|
538
540
|
}
|
|
539
541
|
_buildPaginationNavMarkup(e) {
|
|
540
|
-
let t = this._currentPage === 1 || this._loading || this._fetching
|
|
541
|
-
|
|
542
|
+
let t = this._currentPage === 1 || this._loading || this._fetching;
|
|
543
|
+
if (this._useMobileListLayout()) {
|
|
544
|
+
let n = Array.from({ length: e }, (t, n) => {
|
|
545
|
+
let r = n + 1;
|
|
546
|
+
return `<option value="${r}" data-display-label="Page ${r} of ${e}"${r === this._currentPage ? " selected" : ""}>${r}</option>`;
|
|
547
|
+
}).join(""), r = this._currentPage >= e || this._loading || this._fetching, i = `Page ${this._currentPage} of ${e}`, a = this._loadingPage === this._currentPage, o = a ? "<mint-spinner class=\"mint-rt-page-spinner\" size=\"default\" aria-label=\"Loading page\"></mint-spinner>" : "";
|
|
548
|
+
return `<nav data-mint-rt-pagination-nav="" class="flex w-full justify-center" aria-label="Pagination"><div class="flex items-center justify-center gap-2"><mint-button variant="solid" size="sm" icon="caret-left" aria-label="Previous page" ${t ? "disabled=\"true\"" : ""} data-action="page-prev"></mint-button><mint-select class="mint-rt-page-select" data-action="page-select" aria-label="${i}" value="${this._currentPage}"${a ? " data-loading-page=\"true\"" : ""}${this._loading || this._fetching ? " disabled=\"true\"" : ""}>${n}${o}</mint-select><mint-button variant="solid" size="sm" icon="caret-right" aria-label="Next page" ${r ? "disabled=\"true\"" : ""} data-action="page-next"></mint-button></div></nav>`;
|
|
549
|
+
}
|
|
550
|
+
let n = "<nav data-mint-rt-pagination-nav=\"\" class=\"w-max max-w-none shrink-0\" aria-label=\"Pagination\">";
|
|
551
|
+
n += "<ul class=\"flex flex-nowrap items-center gap-1\">", n += `<li class="shrink-0"><mint-button variant="solid" size="sm" icon="caret-left" aria-label="Previous page" ${t ? "disabled=\"true\"" : ""} data-action="page-prev"></mint-button></li>`, n += this._paginationHtmlDesktopMiddle(e);
|
|
542
552
|
let r = this._currentPage >= e || this._loading || this._fetching;
|
|
543
|
-
return n += `<li class="shrink-0"><mint-button variant="solid" size="sm" icon="caret-right" ${r ? "disabled=\"true\"" : ""} data-action="page-next"></mint-button></li>`, n += "</ul></nav>", n;
|
|
553
|
+
return n += `<li class="shrink-0"><mint-button variant="solid" size="sm" icon="caret-right" aria-label="Next page" ${r ? "disabled=\"true\"" : ""} data-action="page-next"></mint-button></li>`, n += "</ul></nav>", n;
|
|
544
554
|
}
|
|
545
555
|
_hasSortableColumns() {
|
|
546
556
|
return !!this._configuration?.columns.some((e) => !e.hidden && e.sortable && e.data);
|
|
@@ -1208,11 +1218,11 @@ var n = {
|
|
|
1208
1218
|
}), a += "</tr>";
|
|
1209
1219
|
a += "</tbody>", a += "</table>", a += "</mint-table>", a += "</div>", a += this._paginationHostPlaceholderHtml();
|
|
1210
1220
|
} else {
|
|
1211
|
-
let e = this._virtualScrollActive() && (this._type === "provided" || this._type === "ajax" && this._loaded && !this._fetchError), t = e && this._virtualScrollRoot() === "table-body", n = this._escapeHtml(this._virtualMaxHeightCss()), o = t || this._fixedHeader(), s = this._fixedHeader() && this._fixedControls(), c = o ? " data-mint-rt-scroll-inner=\"\"" : "", l = "table-section" + (this._inMintCard ? " rounded-t-none" : ""), u = `mint-resource-table-mobile-list m-0 min-h-0 w-full list-none border-collapse overflow-x-hidden ${this._inMintCard ? "px-3.5 py-3.5" : "py-3"}
|
|
1221
|
+
let e = this._virtualScrollActive() && (this._type === "provided" || this._type === "ajax" && this._loaded && !this._fetchError), t = e && this._virtualScrollRoot() === "table-body", n = this._escapeHtml(this._virtualMaxHeightCss()), o = t || this._fixedHeader(), s = this._fixedHeader() && this._fixedControls(), c = o ? " data-mint-rt-scroll-inner=\"\"" : "", l = "table-section" + (this._inMintCard ? " rounded-t-none" : ""), u = `mint-resource-table-mobile-list m-0 min-h-0 w-full list-none border-collapse overflow-x-hidden ${this._inMintCard ? "px-3.5 py-3.5" : "py-3"}`, d = "";
|
|
1212
1222
|
if (t) {
|
|
1213
1223
|
let e = this._renderColgroupHtml();
|
|
1214
|
-
a += `<div id="mint-rt-vscroll-${this._tableId}" class="overflow-y-auto overflow-x-auto min-h-0 w-full" style="max-height: ${n}; scrollbar-gutter: stable; overscroll-behavior-x: contain; overscroll-behavior-y: none; overflow-anchor: none;">`, a += "<div class=\"
|
|
1215
|
-
} else a += "<div class=\"
|
|
1224
|
+
a += `<div id="mint-rt-vscroll-${this._tableId}" class="overflow-y-auto overflow-x-auto min-h-0 w-full" style="max-height: ${n}; scrollbar-gutter: stable; overscroll-behavior-x: contain; overscroll-behavior-y: none; overflow-anchor: none;">`, a += "<div class=\"mint-resource-table-desktop min-h-0 min-w-0\">", a += `<mint-table class="${l}"${c}>`, a += `<table id="${this._tableId}" class="w-full min-w-0 table-fixed">`, a += e, a += this._renderTheadHtml(!0, !0, !0, s);
|
|
1225
|
+
} else a += "<div class=\"mint-resource-table-desktop min-h-0 min-w-0\">", a += `<mint-table class="${l}"${c}>`, a += `<table id="${this._tableId}">`, e && (a += this._renderColgroupHtml()), a += this._renderTheadHtml(!0, !0, !!e, s);
|
|
1216
1226
|
if (a += "<tbody" + (e ? ` data-mint-rt-tbody="${this._tableId}"` : "") + ">", !this._fetching && !this._loading && !i && !e && r.forEach((e, t) => {
|
|
1217
1227
|
d += this._buildMobileListItemHtml(e, t, t === r.length - 1);
|
|
1218
1228
|
let n = typeof this._configuration.onRowClick == "function", i = n ? "cursor-pointer hover:bg-gray-50 dark:hover:bg-mint-elevated" : "";
|
|
@@ -1267,6 +1277,11 @@ var n = {
|
|
|
1267
1277
|
e.addEventListener("click", () => {
|
|
1268
1278
|
this._goToPage(this._currentPage + 1);
|
|
1269
1279
|
});
|
|
1280
|
+
}), this.querySelectorAll("mint-select[data-action=\"page-select\"]").forEach((e) => {
|
|
1281
|
+
e.addEventListener("change", (t) => {
|
|
1282
|
+
let n = parseInt(String(t.detail?.value ?? e.value), 10);
|
|
1283
|
+
Number.isFinite(n) && n !== this._currentPage && this._goToPage(n);
|
|
1284
|
+
});
|
|
1270
1285
|
});
|
|
1271
1286
|
}
|
|
1272
1287
|
_attachTableEventListeners() {
|
|
@@ -1287,9 +1302,9 @@ var n = {
|
|
|
1287
1302
|
if (e) {
|
|
1288
1303
|
let t = e.querySelector("input") || e._element;
|
|
1289
1304
|
t ? t.addEventListener("input", (e) => {
|
|
1290
|
-
this._search = e.target.value, this._triggerSearch();
|
|
1305
|
+
this._search = e.target.value, this._updateSearchInUrl(), this._triggerSearch();
|
|
1291
1306
|
}) : e.addEventListener("input", (t) => {
|
|
1292
|
-
this._search = e.value || t.target.value || "", this._triggerSearch();
|
|
1307
|
+
this._search = e.value || t.target.value || "", this._updateSearchInUrl(), this._triggerSearch();
|
|
1293
1308
|
});
|
|
1294
1309
|
}
|
|
1295
1310
|
this._attachTableEventListeners(), this._attachRowClickHandler(), this.querySelectorAll("th[data-column-key]").forEach((e) => {
|
|
@@ -1323,6 +1338,17 @@ var n = {
|
|
|
1323
1338
|
let t = parseInt(e, 10);
|
|
1324
1339
|
return isNaN(t) || t < 1 ? null : t;
|
|
1325
1340
|
}
|
|
1341
|
+
_getSearchUrlKey() {
|
|
1342
|
+
return `mui.${this._tableId}.search`;
|
|
1343
|
+
}
|
|
1344
|
+
_loadSearchFromUrl() {
|
|
1345
|
+
this._tableId && (this._search = new URLSearchParams(window.location.search).get(this._getSearchUrlKey()) ?? "");
|
|
1346
|
+
}
|
|
1347
|
+
_updateSearchInUrl() {
|
|
1348
|
+
if (!this._tableId) return;
|
|
1349
|
+
let e = new URL(window.location.href), t = e.searchParams, n = this._getSearchUrlKey(), r = `mui.${this._tableId}`;
|
|
1350
|
+
this._search ? t.set(n, this._search) : t.delete(n), t.set(r, "1"), this._currentPage = 1, this._offset = 0, window.history.replaceState(window.history.state, "", e.toString());
|
|
1351
|
+
}
|
|
1326
1352
|
_updatePageInUrl(e) {
|
|
1327
1353
|
if (!this._tableId) return;
|
|
1328
1354
|
let t = new URL(window.location.href), n = t.searchParams;
|