@tylertech/forge 3.0.0-next.3 → 3.0.0-next.4
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/custom-elements.json +233 -83
- package/dist/esm/accordion/index.js +1 -1
- package/dist/esm/autocomplete/index.js +1 -1
- package/dist/esm/chip-field/index.js +1 -1
- package/dist/esm/chunks/chunk.3VZGVF2G.js +7 -0
- package/dist/esm/chunks/chunk.3VZGVF2G.js.map +7 -0
- package/dist/esm/chunks/{chunk.XX5QEV5W.js → chunk.6TTJYO62.js} +2 -2
- package/dist/esm/chunks/chunk.6TTJYO62.js.map +7 -0
- package/dist/esm/chunks/chunk.A6RLV2QU.js +7 -0
- package/dist/esm/chunks/chunk.A6RLV2QU.js.map +7 -0
- package/dist/esm/chunks/{chunk.ZJXVI6A7.js → chunk.BBNRKEP4.js} +2 -2
- package/dist/esm/chunks/chunk.BBNRKEP4.js.map +7 -0
- package/dist/esm/chunks/{chunk.C66IQMR6.js → chunk.FXUXL3D2.js} +2 -2
- package/dist/esm/chunks/{chunk.C66IQMR6.js.map → chunk.FXUXL3D2.js.map} +1 -1
- package/dist/esm/chunks/{chunk.EASEKF35.js → chunk.KWD5EK54.js} +2 -2
- package/dist/esm/chunks/chunk.L3N7P4YQ.js +7 -0
- package/dist/esm/chunks/chunk.L3N7P4YQ.js.map +7 -0
- package/dist/esm/chunks/chunk.N2XJHAD4.js +7 -0
- package/dist/esm/chunks/chunk.N2XJHAD4.js.map +7 -0
- package/dist/esm/chunks/chunk.NSTCCETU.js +7 -0
- package/dist/esm/chunks/chunk.NSTCCETU.js.map +7 -0
- package/dist/esm/chunks/{chunk.UVQIUEXO.js → chunk.Q6ELPSPD.js} +2 -2
- package/dist/esm/chunks/{chunk.L6DKEDFM.js → chunk.QMYJCNVD.js} +2 -2
- package/dist/esm/chunks/chunk.RHZ35R2V.js +7 -0
- package/dist/esm/chunks/chunk.RHZ35R2V.js.map +7 -0
- package/dist/esm/chunks/chunk.RMPS2I2P.js +7 -0
- package/dist/esm/chunks/chunk.RMPS2I2P.js.map +7 -0
- package/dist/esm/chunks/chunk.SA7OL5US.js +7 -0
- package/dist/esm/chunks/chunk.SA7OL5US.js.map +7 -0
- package/dist/esm/chunks/{chunk.I4347LUX.js → chunk.VXOI3G7C.js} +2 -2
- package/dist/esm/chunks/{chunk.VOGCDMLL.js → chunk.YHDUES7I.js} +2 -2
- package/dist/esm/date-picker/index.js +1 -1
- package/dist/esm/date-range-picker/index.js +1 -1
- package/dist/esm/expansion-panel/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view-panel/index.js +1 -1
- package/dist/esm/stepper/index.js +1 -1
- package/dist/esm/stepper/step/index.js +1 -1
- package/dist/esm/stepper/stepper/index.js +1 -1
- package/dist/esm/table/index.js +1 -1
- package/dist/esm/text-field/index.js +1 -1
- package/dist/esm/time-picker/index.js +1 -1
- package/esm/autocomplete/autocomplete-constants.d.ts +1 -0
- package/esm/autocomplete/autocomplete-constants.js +1 -0
- package/esm/autocomplete/autocomplete-foundation.d.ts +5 -0
- package/esm/autocomplete/autocomplete-foundation.js +12 -1
- package/esm/autocomplete/autocomplete.d.ts +3 -0
- package/esm/autocomplete/autocomplete.js +7 -0
- package/esm/chip-field/chip-field-foundation.d.ts +1 -1
- package/esm/date-picker/base/base-date-picker-adapter.d.ts +2 -2
- package/esm/date-picker/base/base-date-picker-foundation.d.ts +2 -2
- package/esm/date-picker/base/base-date-picker-foundation.js +8 -5
- package/esm/date-picker/date-picker-adapter.js +5 -7
- package/esm/date-range-picker/date-range-picker-adapter.d.ts +4 -2
- package/esm/date-range-picker/date-range-picker-adapter.js +20 -18
- package/esm/date-range-picker/date-range-picker-foundation.d.ts +4 -1
- package/esm/date-range-picker/date-range-picker-foundation.js +48 -14
- package/esm/expansion-panel/expansion-panel-constants.d.ts +2 -0
- package/esm/expansion-panel/expansion-panel-constants.js +3 -1
- package/esm/expansion-panel/expansion-panel-foundation.js +4 -1
- package/esm/expansion-panel/expansion-panel.js +1 -1
- package/esm/field/field-adapter.d.ts +4 -2
- package/esm/field/field-adapter.js +5 -2
- package/esm/field/field-foundation.d.ts +2 -2
- package/esm/field/field-foundation.js +7 -9
- package/esm/split-view/split-view/split-view-adapter.js +3 -1
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/esm/text-field/text-field-adapter.d.ts +1 -1
- package/esm/text-field/text-field-adapter.js +4 -3
- package/esm/time-picker/time-picker-adapter.js +4 -7
- package/esm/time-picker/time-picker-foundation.js +9 -6
- package/package.json +1 -1
- package/dist/esm/chunks/chunk.5XY7WBMA.js +0 -7
- package/dist/esm/chunks/chunk.5XY7WBMA.js.map +0 -7
- package/dist/esm/chunks/chunk.6DWTTNEC.js +0 -7
- package/dist/esm/chunks/chunk.6DWTTNEC.js.map +0 -7
- package/dist/esm/chunks/chunk.F6CILMKB.js +0 -7
- package/dist/esm/chunks/chunk.F6CILMKB.js.map +0 -7
- package/dist/esm/chunks/chunk.HZYRCFVC.js +0 -7
- package/dist/esm/chunks/chunk.HZYRCFVC.js.map +0 -7
- package/dist/esm/chunks/chunk.IOYABCVW.js +0 -7
- package/dist/esm/chunks/chunk.IOYABCVW.js.map +0 -7
- package/dist/esm/chunks/chunk.NTLWWOZJ.js +0 -7
- package/dist/esm/chunks/chunk.NTLWWOZJ.js.map +0 -7
- package/dist/esm/chunks/chunk.RWPPN4XB.js +0 -7
- package/dist/esm/chunks/chunk.RWPPN4XB.js.map +0 -7
- package/dist/esm/chunks/chunk.XX5QEV5W.js.map +0 -7
- package/dist/esm/chunks/chunk.YMG4QDOY.js +0 -7
- package/dist/esm/chunks/chunk.YMG4QDOY.js.map +0 -7
- package/dist/esm/chunks/chunk.ZJXVI6A7.js.map +0 -7
- /package/dist/esm/chunks/{chunk.EASEKF35.js.map → chunk.KWD5EK54.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.UVQIUEXO.js.map → chunk.Q6ELPSPD.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.L6DKEDFM.js.map → chunk.QMYJCNVD.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.I4347LUX.js.map → chunk.VXOI3G7C.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.VOGCDMLL.js.map → chunk.YHDUES7I.js.map} +0 -0
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{c as re,f as ce}from"./chunk.JUIFPTRV.js";import{a as M,d as ae}from"./chunk.F6CILMKB.js";import{a as ne}from"./chunk.QUJL4A23.js";import{a as $,b as x,c as v,d as K}from"./chunk.UV3WIHCM.js";import{a as H}from"./chunk.LEVFMI2Q.js";import{b as te}from"./chunk.MZLPUI6R.js";import{a as ie,d as se,l as oe}from"./chunk.T64UW37U.js";import{a as X}from"./chunk.G4IN6Y46.js";import{a as le}from"./chunk.RFLASSCI.js";import{a as T}from"./chunk.NVUMRW44.js";import{a as Q}from"./chunk.TKDMM2ZZ.js";import{a as j,b as ee}from"./chunk.55FCNVG5.js";import{a as q,l as J}from"./chunk.QH2GB3PD.js";import{d as R,e as F,f as p,g as D,i as W,j as U,t as Z}from"./chunk.CFDK4RCW.js";import{b as f,c as Y,d as I,h as y,j as g,k as L,l as G,o as V}from"./chunk.J2M2MXP2.js";import{a as h,d as _}from"./chunk.M3QDAYD2.js";var w=class{constructor(e){this._key=e,this._items=[]}getItems(){return[...this._items]}count(){return this._items.length}setKey(e){this._key=e}add(e){return e instanceof Array||(e=[e]),e.forEach(t=>{this.exists(t)||this._items.push(t)}),this}remove(e){e instanceof Array||(e=[e]);for(let t=e.length-1;t>=0;t--)this.exists(e[t])&&this._items.splice(this._items.indexOf(this._getItem(e[t])),1);return this}clear(){return this._items=[],this}exists(e){return this._getItem(e)!==null}_getItem(e){return this._key?x(this._items,v(this._key,e))||null:this._items.find(t=>t===e)||null}};var S=`${ee}table`,de={TABLE:"forge-table",TABLE_DENSE:"forge-table--dense",TABLE_ROOMY:"forge-table--roomy",TABLE_RESIZABLE:"forge-table--resizable",TABLE_RESIZING:"forge-table--resizing",TABLE_RESIZE_HANDLE:"forge-table__resize-handle",TABLE_NO_WRAP_CONTENT:"forge-table--no-wrap-content",TABLE_LAYOUT_FIXED:"forge-table--layout-fixed",TABLE_FILTER_VISIBLE:"forge-table--filter-visible",TABLE_FIXED:"forge-table--fixed",TABLE_HEAD:"forge-table-head",TABLE_HEAD_ROW:"forge-table-head__row",TABLE_HEAD_ROW_FILTER:"forge-table-head__row__filter",TABLE_HEAD_CELL:"forge-table-head__cell",TABLE_HEAD_CELL_CONTAINER:"forge-table-head__cell-container",TABLE_HEAD_CELL_SORTABLE:"forge-table-head__cell--sortable",TABLE_HEAD_CELL_SORT_ICON:"forge-table-head__cell-sort-icon",TABLE_HEAD_CELL_TEXT:"forge-table-head__cell-text",TABLE_HEAD_CELL_SORT_ICON_ACTIVE:"forge-table-head__cell-sort-icon--active",TABLE_HEAD_CELL_SORTED_ASCENDING:"forge-table-head__cell--sorted-ascending",TABLE_HEAD_CELL_SORTED_DESCENDING:"forge-table-head__cell--sorted-descending",TABLE_HEAD_CELL_SORT_ORDER:"forge-table-head__cell__sort-order",TABLE_HEAD_CELL_SORT_ORDER_HIDDEN:"forge-table-head__cell__sort-order--hidden",TABLE_BODY:"forge-table-body",TABLE_BODY_ROW:"forge-table-body__row",TABLE_BODY_ROW_SELECTED:"forge-table-body__row--selected",TABLE_BODY_ROW_CLICKABLE:"forge-table-body__row--clickable",TABLE_BODY_CELL:"forge-table-body__cell",TABLE_ROW:"forge-table-row",TABLE_ROW_EXPANDED:"forge-table-row--expanded",TABLE_ROW_EXPANDABLE_CONTENT:"forge-table-row__expandable-content",TABLE_ROW_EXPANDABLE_CONTENT_CELL:"forge-table-row__expandable-content-cell",TABLE_CELL:"forge-table-cell",TABLE_CELL_SELECT:"forge-table-cell__select",TABLE_CELL_SELECT_CHECKBOX:"forge-table-cell__select-checkbox",TABLE_CELL_SELECT_CHECKBOX_CONTAINER:"forge-table-cell__select-checkbox-container",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_RIGHT:"forge-table-cell__select-checkbox-container--align-right",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_LEFT:"forge-table-cell__select-checkbox-container--align-left",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_CENTER:"forge-table-cell__select-checkbox-container--align-center",TABLE_CELL_CONTAINER:"forge-table-cell__container",TABLE_CELL_CONTAINER_TEXT:"forge-table-cell__container-text",TABLE_CELL_CENTER:"forge-table-cell--center",TABLE_CELL_RIGHT:"forge-table-cell--right",TABLE_CELL_RESIZABLE:"forge-table-cell--resizing"},Ee={TABLE:".forge-table",CHECKBOX_INPUT:"forge-checkbox > input[type=checkbox]:not([forge-ignore])",SELECT_ALL_TEMPLATE_CHECKBOX_INPUT:"input[type=checkbox]:not([forge-ignore])",ROW_SELECTED:`.${de.TABLE_BODY_ROW_SELECTED}`},_e={SELECT:"select",MULTISELECT:"multiselect",SELECT_KEY:"select-key",DENSE:"dense",ROOMY:"roomy",FILTER:"filter",FIXED_HEADERS:"fixed-headers",LAYOUT_TYPE:"layout-type",WRAP_CONTENT:"wrap-content",RESIZABLE:"resizable",MIN_RESIZE_WIDTH:"min-resize-width",ALLOW_ROW_CLICK:"allow-row-click",MULTI_COLUMN_SORT:"multi-column-sort",SELECT_CHECKBOX_ALIGNMENT:"select-checkbox-alignment",TOOLTIP_SELECT:"tooltip-select",TOOLTIP_SELECT_ALL:"tooltip-select-all",CHECKBOX_TYPE:"forge-checkbox-type",CUSTOM_CELL_TEMPLATE:"data-cell-template",CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION:"data-cell-template-stop-propagation"},Te={ROW_CLICK:`${S}-row-click`,SELECT:`${S}-select`,SELECT_DOUBLE:`${S}-select-double`,SELECT_ALL:`${S}-select-all`,SORT:`${S}-sort`,FILTER:`${S}-filter`,INITIALIZED:`${S}-initialized`,COLUMN_RESIZE:`${S}-column-resize`},pe={SELECT_ALL:"select-all",SELECT_ROW:"select-row",DEFAULT_LAYOUT_TYPE:"auto"},Ce={SORT_DOWN:"arrow_downward"},he={DEFAULT_FILTER_DEBOUNCE_TIME:750,MIN_RESIZE_WIDTH:100,RESIZE_HOVER_DURATION:150},s={elementName:S,classes:de,selectors:Ee,attributes:_e,events:Te,strings:pe,icons:Ce,numbers:he};var B=(l=>(l.Left="left",l.Right="right",l.Center="center",l))(B||{}),O=(l=>(l.Ascending="ASC",l.Descending="DESC",l.Unset="UNSET",l))(O||{}),Le=(a=>(a.InputText="text",a.InputNumber="number",a.Select="select",a.SelectMultiple="select-multiple",a.Date="date",a.DateRange="date-range",a))(Le||{});function me(n){return n&&typeof n=="object"&&"content"in n}var b=class n{static createTable(e){n._resetTable(e.tableElement);let t=n._createTableHead(e),l=n._createTableBody(e);e.clickListener&&(n._attachRowClickListeners(l,e.clickListener,e.doubleClickListener),n._addRowClickAttributes(l)),e.fixedHeaders&&n.setFixedHeaders(e),e.resizable&&n.setResizable(e),e.dense&&n.setDenseState(e.tableElement,e.dense),e.wrapContent&&n.setWrapContentState(e.tableElement,e.wrapContent),e.selectListener&&n._addSelectColumn(t,l,e.selectListener,e.selectAllListener,e.selectAllTemplate,e.selectCheckboxAlignment,e.data,e.tooltipSelect,e.tooltipSelectAll),(e.resizable||e.columnConfigurations.some(i=>!!i.sortable))&&(n._attachHeadRowMouseDownListener(t,e.headRowMouseDownListener),n._isMac()&&n._attachHeadRowContextMenuListener(t,e.headRowContextMenuListener)),n.setLayoutType(e),n._setTableHead(e.tableElement,t),e.filter&&n.setFilterRow(e),n._setTableBody(e.tableElement,l)}static _setTableHead(e,t){e.tHead?F(t,e.tHead):e.appendChild(t)}static _setTableBody(e,t){e.tBodies.length?F(t,e.tBodies[0]):e.appendChild(t)}static recreateTableBody(e){let t=n._createTableBody(e);e.clickListener&&(n._attachRowClickListeners(t,e.clickListener,e.doubleClickListener),n._addRowClickAttributes(t)),e.selectListener&&(n._createBodySelectColumn(t,e.selectCheckboxAlignment,e.data,e.tooltipSelect,e.tooltipSelectAll),n._attachRowSelectListeners(t,e.selectListener)),n._setTableBody(e.tableElement,t)}static _resetTable(e){R(e)}static _createMultisortTooltip(){let e=document.createElement(ne.elementName);return e.textContent="Ctrl + click to sort multiple columns",e.position="bottom",e.delay=0,e}static _createTableHead(e){let t=document.createElement("thead"),l=t.insertRow();p([s.classes.TABLE_ROW,s.classes.TABLE_HEAD_ROW],l);let i=!1;for(let o=0;o<e.columnConfigurations.length;o++){let a=e.columnConfigurations[o],r=document.createElement("th");r.scope="col",p([s.classes.TABLE_CELL,s.classes.TABLE_HEAD_CELL],r);let c=document.createElement("div");if(c.classList.add(s.classes.TABLE_HEAD_CELL_CONTAINER),e.multiColumnSort){let d=n._createMultisortTooltip();c.appendChild(d)}if(a.align&&n._setCellAlignmentClass(c,a.align),f(a.width)){let d=U(a.width);d&&(r.style.width=d)}if(e.resizable&&a.resizable!==!1){let d=document.createElement("div");d.classList.add(s.classes.TABLE_RESIZE_HANDLE),r.appendChild(d)}f(a.headerCellStyle)&&g(a.headerCellStyle)&&(Object.assign(r.style,a.headerCellStyle),Object.assign(c.style,a.headerCellStyle));let m=document.createElement("span");if(m.classList.add(s.classes.TABLE_HEAD_CELL_TEXT),m.textContent=a.header&&typeof a.header=="string"?a.header.trim():"",a.sortable){r.classList.add(s.classes.TABLE_HEAD_CELL_SORTABLE);let d=document.createElement("span");p([s.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN,s.classes.TABLE_HEAD_CELL_SORT_ORDER],d);let u=document.createElement(ie.elementName);u.name=s.icons.SORT_DOWN,p([s.classes.TABLE_HEAD_CELL_SORT_ICON],u),e.multiColumnSort?typeof a.initialSort=="object"&&a.initialSort.sortOrder&&(d.textContent=a.initialSort.sortOrder.toString(),e.columnConfigurations.filter(C=>typeof C.initialSort=="object").length>1&&D(s.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN,d),r.classList.add(s.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),u.classList.add(s.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),n._setColumnSortDirection(r,a.initialSort.direction)):e.sortedColumn===o&&!i&&!e.multiColumnSort&&(r.classList.add(s.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),u.classList.add(s.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),n._setColumnSortDirection(r,e.sortDirection),i=!0),c.appendChild(u),c.appendChild(d)}typeof a.headerTemplate=="function"?Promise.resolve(a.headerTemplate(o,c,a)).then(d=>{if(d){let u=document.createElement("div");p(s.classes.TABLE_CELL_CONTAINER,u),typeof d=="string"?u.innerHTML=d:n._prepend(d,u),u.setAttribute(s.attributes.CUSTOM_CELL_TEMPLATE,""),n._prepend(u,c)}}):n._prepend(m,c),r.appendChild(c),l.appendChild(r)}return t}static setSortDirection(e,t,l){let i=n._getHeaderCellByIndex(e,t);n._setColumnSortDirection(i,l)}static _setColumnSortDirection(e,t){e.classList.contains(s.classes.TABLE_HEAD_CELL_SORTED_ASCENDING)&&e.classList.remove(s.classes.TABLE_HEAD_CELL_SORTED_ASCENDING),e.classList.contains(s.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)&&e.classList.remove(s.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),!t||t==="DESC"?e.classList.add(s.classes.TABLE_HEAD_CELL_SORTED_DESCENDING):e.classList.add(s.classes.TABLE_HEAD_CELL_SORTED_ASCENDING)}static _createTableBody(e){let t=document.createElement("tbody");return n._getOrderedRowData(e.columnConfigurations,e.data).forEach((i,o)=>{let a=t.insertRow();p([s.classes.TABLE_ROW,s.classes.TABLE_BODY_ROW],a),n._populateRowCells(e,a,i,o),typeof e.rowCreatedCallback=="function"&&e.rowCreatedCallback(a,o,h({},e.data[o].data))}),t}static _populateRowCells(e,t,l,i){for(let o=0;o<l.length;o++){let a=e.columnConfigurations[o],r=t.insertCell();if(p([s.classes.TABLE_CELL,s.classes.TABLE_BODY_CELL],r),f(a.width)){let m=U(a.width);m&&(r.style.width=m)}let c=document.createElement("div");if(c.classList.add(s.classes.TABLE_CELL_CONTAINER),f(a.cellStyle)&&g(a.cellStyle)&&(Object.assign(r.style,a.cellStyle),Object.assign(c.style,a.cellStyle)),a.template&&typeof a.template=="function"){let m=e.data[i]?e.data[i].data:void 0;Promise.resolve(a.template(i,c,m,o)).then(d=>{let u=me(d)?d:{content:d,stopClickPropagation:a.stopCellTemplateClickPropagation};u.content&&(typeof u.content=="string"?c.innerHTML=u.content:c.appendChild(u.content),c.setAttribute(s.attributes.CUSTOM_CELL_TEMPLATE,""),u.stopClickPropagation&&c.setAttribute(s.attributes.CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION,""))})}else if(a.property){let m=document.createElement("span");m.classList.add(s.classes.TABLE_CELL_CONTAINER_TEXT),c.appendChild(m),a.transform&&typeof a.transform=="function"?Promise.resolve(a.transform(l[o])).then(d=>m.textContent=d):l[o]==null?m.textContent="":m.textContent=l[o].toString()}if(a.align&&n._setCellAlignmentClass(c,a.align),r.appendChild(c),f(a.columnSpan)){if(a.columnSpan==="all"){r.colSpan=l.length-o;break}else if(typeof a.columnSpan=="number"&&a.columnSpan>0){let m=a.columnSpan;a.columnSpan>l.length-o&&(m=l.length),r.colSpan=m,o=o+(m-1)}}typeof e.cellCreatedCallback=="function"&&e.cellCreatedCallback(r,i,o)}}static _setCellAlignmentClass(e,t){switch(t){case"center":e.classList.add(s.classes.TABLE_CELL_CENTER);break;case"right":e.classList.add(s.classes.TABLE_CELL_RIGHT);break}}static _getNonExpandedRows(e){return Array.from(e).filter(t=>!t.classList.contains(s.classes.TABLE_ROW_EXPANDABLE_CONTENT))}static _getExpandedRows(e){return Array.from(e).filter(t=>t.classList.contains(s.classes.TABLE_ROW_EXPANDABLE_CONTENT))}static _createColumnDataMap(e,t){return e.map(l=>({config:l,data:t.map(i=>{if(l.property){let o=$(i.data,l.property);return f(o)?o:null}return null})}))}static _getOrderedRowData(e,t){let l=n._createColumnDataMap(e,t),i=[];for(let o of l)for(let a=0;a<o.data.length;a++)i[a]||(i[a]=[]),i[a].push(o.data[a]);return i}static _attachRowClickListeners(e,t,l){n._getNonExpandedRows(e.rows).forEach(o=>{o.addEventListener("click",t),l&&o.addEventListener("dblclick",l)})}static _addRowClickAttributes(e){n._getNonExpandedRows(e.rows).forEach(l=>{l.classList.add(s.classes.TABLE_BODY_ROW_CLICKABLE)})}static _removeRowClickAttributes(e){n._getNonExpandedRows(e.rows).forEach(l=>{l.classList.remove(s.classes.TABLE_BODY_ROW_CLICKABLE)})}static _attachRowSelectListeners(e,t){n._getNonExpandedRows(e.rows).forEach(i=>n._attachRowSelectListener(i,t))}static _attachRowSelectListener(e,t){let l=n._getCheckboxElement(e);l==null||l.addEventListener("click",t)}static _detachRowSelectListeners(e,t){Array.from(e.rows).forEach(l=>{let i=n._getCheckboxElement(l);i==null||i.removeEventListener("click",t)})}static _detachRowClickListeners(e,t,l){Array.from(e.rows).forEach(i=>{i.removeEventListener("click",t),i.removeEventListener("dblclick",l)})}static _attachSelectAllListener(e,t){let l=e.rows[e.rows.length-1],i=n._getCheckboxElement(l);if(!i)throw new Error("Checkbox element not found.");i.addEventListener("change",t)}static _tryAttachSelectAllTemplateListener(e,t){let l=e.rows[e.rows.length-1],i=n._tryGetSelectAllCheckboxElement(l);i&&i.addEventListener("change",t)}static _detachSelectAllListener(e,t){let l=e.rows[e.rows.length-1],i=n._tryGetSelectAllCheckboxElement(l);i&&i.removeEventListener("change",t)}static _attachHeadRowMouseDownListener(e,t){let l=e.rows[0];if(!l)throw new Error("Missing table header row. Unable to attach sort listener.");l.addEventListener("mousedown",t)}static _attachHeadRowContextMenuListener(e,t){let l=e.rows[0];if(!l)throw new Error("Missing table header row. Unable to attach sort listener.");l.addEventListener("contextmenu",t)}static _createSelectColumn(e,t,l,i,o,a,r,c,m){e&&n._createHeadSelectColumn(e,l,i,o,a,m),t&&n._createBodySelectColumn(t,a,r,c,m)}static _createHeadSelectColumn(e,t,l,i,o,a){var r;if(Array.from(e.rows).forEach(c=>{let m=document.createElement("th");p([s.classes.TABLE_CELL,s.classes.TABLE_HEAD_CELL],m),c.insertBefore(m,c.cells.item(0))}),t){let c=(r=e.rows.item(e.rows.length-1))==null?void 0:r.cells.item(0);c.classList.add(s.classes.TABLE_CELL_SELECT),typeof l=="function"?n._renderSelectAllTemplate(l,e).then(()=>{typeof i=="function"&&i()}):c==null||c.appendChild(n._createCheckboxElement(!0,o,null,null,null,a))}}static _createBodySelectColumn(e,t,l,i,o){if(n._getNonExpandedRows(e.rows).forEach((r,c)=>n._addRowSelectColumn(r,t,c,l[c],i,o)),e.rows.length){let r=e.rows.item(0);r&&n._updateExpandedRowColspan(e.rows,r.cells.length)}}static _addRowSelectColumn(e,t,l,i,o,a){let r=e.insertCell(0);p([s.classes.TABLE_CELL,s.classes.TABLE_BODY_CELL,s.classes.TABLE_CELL_SELECT],r),r.appendChild(n._createCheckboxElement(!1,t,l,i,o,a))}static _destroySelectColumn(e,t){let l=n._getNonExpandedRows(t.rows);if(Array.from(e.rows).forEach(i=>i.removeChild(i.cells.item(0))),Array.from(l).forEach(i=>i.removeChild(i.cells.item(0))),t.rows.length){let i=t.rows.item(0);i&&n._updateExpandedRowColspan(t.rows,i.cells.length)}}static _hasSelectColumn(e,t){return[...Array.from(e.rows),...Array.from(t.rows)].some(i=>i.cells.item(0).classList.contains(s.classes.TABLE_CELL_SELECT))}static _createCheckboxElement(e,t,l,i,o,a){let r=document.createElement("div");if(r.classList.add(s.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER),t)switch(t){case"center":r.classList.add(s.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_CENTER);break;case"left":r.classList.add(s.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_LEFT);break;case"right":r.classList.add(s.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_RIGHT);break}let c=document.createElement(re.elementName),m=document.createElement("input");m.type="checkbox";let d=o||"";i&&typeof o=="function"&&(d=o.call(null,l,i.data));let u=document.createElement("forge-tooltip");return u.position="left",e?u.textContent=a||"":u.textContent=d,m.setAttribute("aria-label","Select row"),c.appendChild(m),r.appendChild(u),r.appendChild(c),r}static _getCheckboxElement(e){let t=e.querySelector(`.${s.classes.TABLE_CELL_SELECT}`);return t?t.querySelector(s.selectors.CHECKBOX_INPUT):null}static _tryGetSelectAllCheckboxElement(e){let t=e.querySelector(`.${s.classes.TABLE_CELL_SELECT}`);return t?t.querySelector(s.selectors.CHECKBOX_INPUT)||t.querySelector(s.selectors.SELECT_ALL_TEMPLATE_CHECKBOX_INPUT):null}static _setSelectedCheckboxState(e,t){e&&(e.checked=t)}static _setIndeterminateCheckboxState(e,t){e&&(e.indeterminate=t)}static _setRowSelectedState(e,t){t?e.classList.contains(s.classes.TABLE_BODY_ROW_SELECTED)||e.classList.add(s.classes.TABLE_BODY_ROW_SELECTED):e.classList.remove(s.classes.TABLE_BODY_ROW_SELECTED)}static _updateExpandedRowColspan(e,t){n._getExpandedRows(e).forEach(i=>{let o=i.cells.item(0);o&&(o.colSpan=t)})}static updateSelectedState(e,t){n._setRowSelectedState(e,t);let l=n._getCheckboxElement(e);l&&n._setSelectedCheckboxState(l,t)}static getRowByIndex(e,t){return n._getNonExpandedRows(e.tBodies[0].rows)[t]}static updateSelectAllState(e,t,l){if(!e.tHead)return;let i=e.tHead.rows[e.tHead.rows.length-1],o=n._tryGetSelectAllCheckboxElement(i);o&&(n._setSelectedCheckboxState(o,t),n._setIndeterminateCheckboxState(o,!!l))}static setSelectedRows(e,t,l,i,o=!1){if(!e.tBodies.length)return;o||n.clearSelectedRows(e);let a=e.tBodies[0].rows,r=0;i.length&&Array.from(a).forEach((c,m)=>{let d=l[m];if(x(i,v(t,d))){n._setRowSelectedState(c,!0);let C=n._getCheckboxElement(c);C&&n._setSelectedCheckboxState(C,!0),r++}}),n.updateSelectAllState(e,r>0&&a.length===r)}static clearSelectedRows(e){if(!e.tBodies.length)return;n._getNonExpandedRows(e.tBodies[0].rows).forEach(l=>{n._setRowSelectedState(l,!1);let i=n._getCheckboxElement(l);i&&n._setSelectedCheckboxState(i,!1)})}static setSortedColumn(e,t,l){let i=n._getHeaderCellByIndex(e,t);n._getSortIconElementFromHeaderCell(i).classList.add(s.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),n._setColumnSortDirection(i,l)}static setMultiSortColumnSortNumber(e,t,l,i){let r=n._getHeaderCellByIndex(e,l).querySelector(`.${s.classes.TABLE_HEAD_CELL_CONTAINER}`).querySelector(`.${s.classes.TABLE_HEAD_CELL_SORT_ORDER}`);r&&(Z(r,typeof i!="number"||!t,s.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN),i&&(r.textContent=i.toString()))}static removeColumnSort(e,t){let l=n._getHeaderCellByIndex(e,t);l.classList.contains(s.classes.TABLE_HEAD_CELL_SORTED_ASCENDING)&&l.classList.remove(s.classes.TABLE_HEAD_CELL_SORTED_ASCENDING),l.classList.contains(s.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)&&l.classList.remove(s.classes.TABLE_HEAD_CELL_SORTED_DESCENDING);let i=n._getSortIconElementFromHeaderCell(l);i&&i.classList.contains(s.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE)&&i.classList.remove(s.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE)}static _getHeaderCellByIndex(e,t){if(!e.tHead)throw new Error("Table head element cannot be null.");return e.tHead.rows.item(0).cells.item(t)}static _getSortIconElementFromHeaderCell(e){return e.querySelector(`.${s.classes.TABLE_HEAD_CELL_SORT_ICON}`)}static setSelectColumnVisibility(e,t,l,i,o,a,r,c,m){let d=e.tHead,u=e.tBodies[0];!d||!u||(t?n._addSelectColumn(d,u,l,i,o,a,r,c,m):n._hasSelectColumn(d,u)&&(l&&n._detachRowSelectListeners(u,l),i&&n._detachSelectAllListener(d,i),n._destroySelectColumn(d,u)))}static _addSelectColumn(e,t,l,i,o,a,r,c,m){n._createSelectColumn(e,t,!!i,o,()=>{i&&n._tryAttachSelectAllTemplateListener(e,i)},a,r,c,m),l&&n._attachRowSelectListeners(t,l),i&&!o&&n._tryAttachSelectAllTemplateListener(e,i)}static setDenseState(e,t){e.classList.contains(s.classes.TABLE_DENSE)&&e.classList.remove(s.classes.TABLE_DENSE),t&&e.classList.add(s.classes.TABLE_DENSE)}static setRoomyState(e,t){e.classList.contains(s.classes.TABLE_ROOMY)&&e.classList.remove(s.classes.TABLE_ROOMY),t&&e.classList.add(s.classes.TABLE_ROOMY)}static setResizable(e){let t=e.tableElement.tHead;e.resizable?(e.tableElement.classList.add(s.classes.TABLE_RESIZABLE),n._addResizeHandles(t,e)):(e.tableElement.classList.remove(s.classes.TABLE_RESIZABLE),n._removeResizeHandles(t,e))}static _addResizeHandles(e,t){if(!e)return;let l=e.rows.item(0);if(l){let i=Array.from(l.cells);t.selectListener&&(i=i.slice(1));for(let o of i){let a=i.indexOf(o);if(t.columnConfigurations[a].resizable!==!1){let c=document.createElement("div");c.classList.add(s.classes.TABLE_RESIZE_HANDLE),o.appendChild(c)}}}}static _removeResizeHandles(e,t){if(!e)return;let l=e.rows.item(0);if(l){let i=Array.from(l.cells);t.selectListener&&(i=i.slice(1));for(let o of i){let a=document.querySelector(`.${s.classes.TABLE_RESIZE_HANDLE}`);a&&o.removeChild(a)}}}static setWrapContentState(e,t){t?e.classList.remove(s.classes.TABLE_NO_WRAP_CONTENT):e.classList.add(s.classes.TABLE_NO_WRAP_CONTENT)}static setSelectAllVisibility(e,t,l,i,o,a){let r=e.tHead;if(!r)return;!t&&l&&n._detachSelectAllListener(r,l);let m=r.rows[r.rows.length-1].cells.item(0);t?m.childElementCount||(m.classList.add(s.classes.TABLE_CELL_SELECT),i?n._renderSelectAllTemplate(i,r).then(()=>{l&&n._tryAttachSelectAllTemplateListener(r,l)}):m.appendChild(n._createCheckboxElement(!0,o||null,null,null,null,a)),l&&!i&&n._attachSelectAllListener(r,l)):(l&&n._detachSelectAllListener(r,l),R(m))}static setFilterRow(e){if(!e.tableElement.tHead)return;let t=n._getFilterRowElement(e.tableElement.tHead),l;if(e.filter?e.tableElement.classList.add(s.classes.TABLE_FILTER_VISIBLE):e.tableElement.classList.remove(s.classes.TABLE_FILTER_VISIBLE),e.filter&&!t){if(e.columnConfigurations.every(o=>!o.filter))return;e.selectListener&&e.selectAllListener&&(l=e.tableElement.tHead.rows[e.tableElement.tHead.rows.length-1].cells.item(0));let i=n._createFilterRowElement(e);i&&l&&Array.from(l.children).forEach(o=>{var a;(a=i.cells.item(0))==null||a.appendChild(o)})}else if(!e.filter&&t){if(e.selectListener&&e.selectAllListener){l=t.cells.item(0);let i=Array.from(e.tableElement.tHead.rows).indexOf(t)-1,o=e.tableElement.tHead.rows.item(i);o&&Array.from(l.children).forEach(a=>{var r;(r=o.cells.item(0))==null||r.appendChild(a)})}W(t)}}static _createFilterRowElement(e){if(!e.tableElement.tHead)throw new Error("Table head element cannot be null.");let t=e.tableElement.tHead.insertRow();if(p([s.classes.TABLE_ROW,s.classes.TABLE_HEAD_ROW_FILTER],t),e.selectListener){let l=document.createElement("th");p([s.classes.TABLE_CELL,s.classes.TABLE_HEAD_CELL],l),t.insertBefore(l,t.cells[0]),l.classList.add(s.classes.TABLE_CELL_SELECT)}return e.columnConfigurations.forEach((l,i)=>{let o=document.createElement("th");if(p([s.classes.TABLE_CELL,s.classes.TABLE_HEAD_CELL],o),l.filter&&f(l.filterDelegate)){let a=document.createElement("div");a.classList.add(s.classes.TABLE_HEAD_CELL_CONTAINER),l.align&&n._setCellAlignmentClass(a,l.align);let r=n._createFilterElement(l,i,e.filterListener);a.appendChild(r),o.appendChild(a)}t.appendChild(o)}),t}static _createFilterElement(e,t,l){let i;if(y(e.filterDelegate))i=e.filterDelegate();else if(e.filterDelegate instanceof X||e.filterDelegate instanceof le)i=e.filterDelegate;else throw new Error("Invalid filter delegate.");if(l&&i instanceof X&&y(i.onChange))if(!f(e.filterDebounceTime)||I(e.filterDebounceTime)){let o=f(e.filterDebounceTime)?e.filterDebounceTime:s.numbers.DEFAULT_FILTER_DEBOUNCE_TIME;i.onChange(V(a=>l(a,t),o))}else i.onChange(o=>l(o,t));return i.element}static _getFilterRowElement(e){if(e)return Array.from(e.rows).find(t=>t.classList.contains(s.classes.TABLE_HEAD_ROW_FILTER))}static async expandRow(e,t,l){let i=e.tableElement.tBodies[0],a=n._getNonExpandedRows(i.rows)[t];a.classList.add(s.classes.TABLE_ROW_EXPANDED);let r=Array.from(i.rows).indexOf(a),c=i.insertRow(r+1);p([s.classes.TABLE_ROW,s.classes.TABLE_BODY_ROW,s.classes.TABLE_ROW_EXPANDABLE_CONTENT],c);let m=c.insertCell();m.setAttribute("colspan",a.cells.length.toString()),m.classList.add(s.classes.TABLE_ROW_EXPANDABLE_CONTENT_CELL);let d=document.createElement("div"),u=document.createElement(M.elementName);u.appendChild(d),m.appendChild(u);let C=l;if(y(l)){let ue=e.data[t]?e.data[t].data:void 0,be=l(t,d,ue);try{let A=await Promise.resolve(be);C=me(A)?A.content:A}catch(A){console.error("Failed to load row template "+A.message),C=""}}C&&n._setRowTemplate(d,C),window.requestAnimationFrame(()=>u.open=!0)}static _setRowTemplate(e,t){Y(t)?e.innerHTML=t:e.appendChild(t)}static collapseRow(e,t){if(!e.tableElement||!e.tableElement.tBodies.length||!e.tableElement.tBodies[0].rows.length)return Promise.resolve();let l=e.tableElement.tBodies[0],o=n._getNonExpandedRows(l.rows)[t],a=Array.from(l.rows).indexOf(o);if(o&&o.classList.contains(s.classes.TABLE_ROW_EXPANDED)){let r=l.rows[a+1],c=r.querySelector(M.elementName);if(c&&c.open)return c.open=!1,new Promise(m=>{setTimeout(()=>{o.classList.remove(s.classes.TABLE_ROW_EXPANDED),W(r),m()},M.numbers.COLLAPSE_ANIMATION_DURATION)})}return Promise.resolve()}static isRowExpanded(e,t){let l=e.tableElement.tBodies[0],o=n._getNonExpandedRows(l.rows)[t];return o&&o.classList.contains(s.classes.TABLE_ROW_EXPANDED)}static setFixedHeaders(e){e.fixedHeaders?e.tableElement.classList.add(s.classes.TABLE_FIXED):e.tableElement.classList.remove(s.classes.TABLE_FIXED)}static setLayoutType(e){e.layoutType==="fixed"?e.tableElement.classList.add(s.classes.TABLE_LAYOUT_FIXED):e.tableElement.classList.remove(s.classes.TABLE_LAYOUT_FIXED)}static normalizeColumnWidths(e){let t=e.tableElement;if(t.tHead&&t.tHead.rows.length){let l=Array.from(t.tHead.rows[0].cells);for(let i of l){let o=getComputedStyle(i).width;i.style.width&&i.style.width!==o&&(i.style.width=o)}}}static setColumnResizeIndicatorVisibility(e,t,l){let i=e.tableElement;if(i.tHead&&i.tHead.rows.length){let o=Array.from(i.tHead.rows);for(let a of o){let r=a.cells[t];r&&(l?r.classList.add(s.classes.TABLE_CELL_RESIZABLE):r.classList.remove(s.classes.TABLE_CELL_RESIZABLE))}}if(i.tBodies.length){let o=Array.from(i.tBodies[0].rows);for(let a of o){let r=a.cells[t];r&&(l?r.classList.add(s.classes.TABLE_CELL_RESIZABLE):r.classList.remove(s.classes.TABLE_CELL_RESIZABLE))}}}static setRowClickListeners(e,t,l,i){let o=e.tBodies[0];o&&(t?n._attachRowClickListeners(o,l,i):n._detachRowClickListeners(o,l,i))}static setRowClickAttributes(e,t){let l=e.tBodies[0];l&&(t?n._addRowClickAttributes(l):n._removeRowClickAttributes(l))}static getOwnerDocument(e){return e.ownerDocument||document}static _prepend(e,t){let l=t.childNodes.item(0);l?t.insertBefore(e,l):t.appendChild(e)}static _isMac(){return!!(navigator&&navigator.platform&&navigator.platform.substr(0,3)==="Mac")}static _renderSelectAllTemplate(e,t){return Promise.resolve(e()).then(l=>{let i=t.rows.item(t.rows.length-1);if(!i)return;let o=i.cells.item(0);l&&o&&(typeof l=="string"?o.innerHTML=l:l instanceof HTMLElement&&o.appendChild(l),o.setAttribute(s.attributes.CUSTOM_CELL_TEMPLATE,""))})}};var N=class extends Q{constructor(t){super(t)}initialize(){this._tableElement||(this._tableElement=document.createElement("table"),this._tableElement.classList.add(s.classes.TABLE),this._component.children.length&&R(this._component),this._component.appendChild(this._tableElement))}getTableElement(){return this._tableElement||this.initialize(),this._tableElement}createTable(t){return b.createTable(t)}recreateTableBody(t){b.recreateTableBody(t)}setSelectedRows(t,l,i,o,a=!1){b.setSelectedRows(t,l,i,o,a)}clearSelectedRows(t){b.clearSelectedRows(t)}updateSelectedState(t,l){b.updateSelectedState(t,l)}updateSelectAllState(t,l,i){b.updateSelectAllState(t,l,i)}setSortedColumn(t,l,i){b.setSortedColumn(t,l,i)}removeColumnSort(t,l){b.removeColumnSort(t,l)}setSortDirection(t,l,i){b.setSortDirection(t,l,i)}setSelectColumnVisibility(t,l,i,o,a,r,c,m,d){b.setSelectColumnVisibility(t,l,i,o||null,a||null,r||null,c||[],m||null,d||null)}setDense(t,l){b.setDenseState(t,l)}setRoomy(t,l){b.setRoomyState(t,l)}setResizable(t){b.setResizable(t)}setSelectAllVisibility(t,l,i,o,a,r=null){b.setSelectAllVisibility(t,l,i,o,a||null,r||null)}setFilterRow(t){b.setFilterRow(t)}expandRow(t,l,i){return b.expandRow(t,l,i)}collapseRow(t,l){return b.collapseRow(t,l)}isRowExpanded(t,l){return b.isRowExpanded(t,l)}setFixedHeaders(t){b.setFixedHeaders(t)}setTableLayoutType(t){b.setLayoutType(t)}setWrapContentState(t){b.setWrapContentState(t.tableElement,t.wrapContent)}addDocumentListener(t,l){b.getOwnerDocument(this._component).addEventListener(t,l)}removeDocumentListener(t,l){b.getOwnerDocument(this._component).removeEventListener(t,l)}normalizeColumnWidths(t){b.normalizeColumnWidths(t)}setResizeColumnVisibility(t,l,i){b.setColumnResizeIndicatorVisibility(t,l,i)}addTableClass(t){p(t,this._tableElement)}removeTableClass(t){D(t,this._tableElement)}setRowClickListeners(t,l,i,o){b.setRowClickListeners(t,l,i,o)}setRowClickAttributes(t,l){b.setRowClickAttributes(t,l)}};var k=class{constructor(){this._sortedColumns=[]}get sortedColumns(){return[...this._sortedColumns.map(e=>h({},e))]}addSortColumn(e){this._sortedColumns.push(h({},e)),this._updateSortNumbers()}updateSortColumn(e){let t=this._sortedColumns.find(l=>l.columnIndex===e.columnIndex);if(t)switch(t.direction){case"ASC":this.removeSortColumn(e);break;case"DESC":t.direction="ASC";break;case"UNSET":t.direction="DESC";break}}setSortColumns(e){this._sortedColumns=[...e.map(t=>h({},t))]}removeSortColumn(e){typeof e=="number"?this._sortedColumns.splice(e,1):this._sortedColumns.splice(this._sortedColumns.indexOf(e),1),this._updateSortNumbers()}isSortColumn(e){return typeof e=="number"?this._sortedColumns.some(t=>t.columnIndex===e):this._sortedColumns.includes(e)}clearMultiSort(){this._sortedColumns=[]}getSortColumn(e){return this._sortedColumns.find(t=>t.columnIndex===e)}_updateSortNumbers(){this._sortedColumns.every(e=>typeof e.sortOrder=="number")&&this._sortedColumns.sort((e,t)=>e.sortOrder-t.sortOrder),this._sortedColumns.forEach((e,t)=>e.sortOrder=t+1)}};var P=class{constructor(e,t=!1){this.data=e;this.selected=t}};var z=class{constructor(e){this._adapter=e;this._tableRows=[];this._data=[];this._columnConfigurations=[];this._select=!1;this._multiselect=!0;this._dense=!1;this._roomy=!1;this._filter=!1;this._fixedHeaders=!1;this._layoutType=s.strings.DEFAULT_LAYOUT_TYPE;this._wrapContent=!0;this._resizable=!1;this._minResizeWidth=s.numbers.MIN_RESIZE_WIDTH;this._multiColumnSort=!1;this._selectCheckboxAlignment="center";this._isAllSelected=!1;this._sortedColumnIndex=-1;this._rendered=!1;this._allowRowClick=!1;this._multiSortManager=new k;this._rowClickListener=t=>this._onRowClick(t),this._rowDoubleClickListener=t=>this._onRowDoubleClick(t),this._selectRowListener=t=>this._onRowSelected(t),this._selectAllListener=t=>this._onSelectAll(t),this._headRowMouseDownListener=t=>this._onHeadRowMouseDown(t),this._headRowContextMenuListener=t=>this._onHeadRowContextMenu(t),this._documentMouseMoveListener=t=>this._onMouseMove(t),this._documentMouseUpListener=t=>this._onMouseUp(t),this._filterListener=(t,l)=>this._onFilter(t,l),this._selectionManager=new w(this._selectKey),this._hiddenColumnManager=new w}initialize(){this.connect(),this._adapter.setHostAttribute(s.attributes.SELECT,this._select.toString()),this._adapter.setHostAttribute(s.attributes.MULTISELECT,this._multiselect.toString()),this._adapter.setHostAttribute(s.attributes.DENSE,this._dense.toString()),this._adapter.setHostAttribute(s.attributes.ROOMY,this._roomy.toString()),this._adapter.setHostAttribute(s.attributes.FILTER,this._filter.toString()),this._adapter.emitHostEvent(s.events.INITIALIZED,void 0,!1)}connect(){this._adapter.initialize()}disconnect(){this._resizeDescriptor=void 0,this._adapter.removeDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.removeDocumentListener("mouseup",this._documentMouseUpListener)}set data(e){Array.isArray(e)&&e.length>0?g(e[0])?this._data=e.map(t=>h({},t)):this._data=[...e]:this._data=[],this._tableRows=this._data.map(t=>new P(t,this._selectionManager.exists(t))),this._renderBody()}get data(){return JSON.parse(JSON.stringify(this._data))}set columnConfigurations(e){this._columnConfigurations=e.map(t=>h({},t)),this._hiddenColumnManager.clear(),this._columnConfigurations.forEach(t=>{t.hidden&&this._hiddenColumnManager.add(t)}),this._refreshTableSort(),this.render()}get columnConfigurations(){return this._columnConfigurations.map(e=>h({},e))}get _visibleColumnConfigurations(){return this._columnConfigurations.filter(e=>!this._hiddenColumnManager.exists(e))}get _tableConfiguration(){return{tableElement:this._adapter.getTableElement(),columnConfigurations:this._visibleColumnConfigurations,data:this._tableRows,clickListener:this._allowRowClick?this._rowClickListener:null,doubleClickListener:this._allowRowClick?this._rowDoubleClickListener:null,selectListener:this._select?this._selectRowListener:null,selectAllListener:this._multiselect?this._selectAllListener:null,headRowMouseDownListener:this._headRowMouseDownListener,headRowContextMenuListener:this._headRowContextMenuListener,filterListener:this._filter?this._filterListener:null,sortDirection:this._sortDirection,sortedColumn:this._sortedColumnIndex,multiColumnSort:this._multiColumnSort,filter:this._filter,wrapContent:this._wrapContent,fixedHeaders:this._fixedHeaders,layoutType:this._layoutType,dense:this._dense,resizable:this._resizable,rowCreatedCallback:this._rowCreatedCallback,cellCreatedCallback:this._cellCreatedCallback,selectAllTemplate:this._selectAllTemplate,selectCheckboxAlignment:this._selectCheckboxAlignment,tooltipSelect:this._tooltipSelect,tooltipSelectAll:this._tooltipSelectAll}}set select(e){this._select!==e&&(this._select=e,this._adapter.setSelectColumnVisibility(this._adapter.getTableElement(),this._select,this._selectRowListener,this._multiselect?this._selectAllListener:void 0,this._multiselect?this._selectAllTemplate:null,this._selectCheckboxAlignment,this._tableRows,this._tooltipSelect,this._tooltipSelectAll),this._updateSelections(!0),this._select?this._adapter.setHostAttribute(s.attributes.SELECT,this._select.toString()):this._adapter.removeHostAttribute(s.attributes.SELECT))}get select(){return this._select}set multiselect(e){this._multiselect!==e&&(this._multiselect=e,this._select&&(this._adapter.setSelectAllVisibility(this._adapter.getTableElement(),this._multiselect,this._multiselect?this._selectAllListener:null,this._multiselect?this.selectAllTemplate:null,this._selectCheckboxAlignment,this._tooltipSelectAll),this._updateSelections(!0)),this._adapter.setHostAttribute(s.attributes.MULTISELECT,this._multiselect.toString()))}get multiselect(){return this._multiselect}get selectKey(){return Array.isArray(this._selectKey)?[...this._selectKey]:this._selectKey}set selectKey(e){this._originalSelectKey!==e&&(Array.isArray(e)?(this._originalSelectKey=[...e],this._selectKey=[...e]):(this._originalSelectKey=e,this._selectKey=[e]),this._selectionManager.setKey(this._selectKey),this._updateSelections(!1))}get dense(){return this._dense}set dense(e){this._dense!==e&&(this._dense=e,this._adapter.setDense(this._adapter.getTableElement(),this._dense),this._adapter.setHostAttribute(s.attributes.DENSE,this._dense.toString()))}get roomy(){return this._roomy}set roomy(e){e!==this._roomy&&(this._roomy=e,this._applyRoomy())}set filter(e){this._filter!==e&&(this._filter=e,this._adapter.setFilterRow(this._tableConfiguration),this._adapter.setHostAttribute(s.attributes.FILTER,this._filter.toString()))}get filter(){return this._filter}set fixedHeaders(e){this._fixedHeaders!==e&&(this._fixedHeaders=e,this._adapter.setFixedHeaders(this._tableConfiguration))}get fixedHeaders(){return this._fixedHeaders}get layoutType(){return this._layoutType}set layoutType(e){this._layoutType!==e&&(this._layoutType=e,this._adapter.setTableLayoutType(this._tableConfiguration))}get wrapContent(){return this._wrapContent}set wrapContent(e){this._wrapContent!==e&&(this._wrapContent=e,this._adapter.setWrapContentState(this._tableConfiguration))}get resizable(){return this._resizable}set resizable(e){this._resizable!==e&&(this._resizable=e,this._adapter.setResizable(this._tableConfiguration))}get minResizeWidth(){return this._minResizeWidth}set minResizeWidth(e){this._minResizeWidth!==e&&(this._minResizeWidth=e,I(this._minResizeWidth)?this._minResizeWidth<0&&(this._minResizeWidth=0):this._minResizeWidth=s.numbers.MIN_RESIZE_WIDTH)}get allowRowClick(){return this._allowRowClick}set allowRowClick(e){this._allowRowClick!==e&&(this._allowRowClick=e,this._rendered&&(this._adapter.setRowClickListeners(this._adapter.getTableElement(),this._allowRowClick,this._rowClickListener,this._rowDoubleClickListener),this._adapter.setRowClickAttributes(this._adapter.getTableElement(),this._allowRowClick)))}get multiColumnSort(){return this._multiColumnSort}set multiColumnSort(e){e!==this._multiColumnSort&&(this._multiColumnSort=e,this._refreshTableSort(),this.render())}get selectCheckboxAlignment(){return this._selectCheckboxAlignment}set selectCheckboxAlignment(e){e!==this._selectCheckboxAlignment&&(this._selectCheckboxAlignment=e,this._adapter.setHostAttribute(s.attributes.SELECT_CHECKBOX_ALIGNMENT,e),this.render())}get tooltipSelect(){return this._tooltipSelect}set tooltipSelect(e){e!==this._tooltipSelect&&(this._tooltipSelect=e,typeof e=="string"&&this._adapter.setHostAttribute(s.attributes.TOOLTIP_SELECT,e),this.render())}get tooltipSelectAll(){return this._tooltipSelectAll}set tooltipSelectAll(e){e!==this._tooltipSelectAll&&(this._tooltipSelectAll=e,this._adapter.setHostAttribute(s.attributes.TOOLTIP_SELECT_ALL,e),this.render())}get selectAllTemplate(){return this._selectAllTemplate}set selectAllTemplate(e){e!==this._selectAllTemplate&&(this._selectAllTemplate=e,this.render())}get rowCreated(){return this._rowCreatedCallback}set rowCreated(e){this._rowCreatedCallback=e}get cellCreated(){return this._cellCreatedCallback}set cellCreated(e){this._cellCreatedCallback=e}isRowSelected(e){let t=v(Array.isArray(this._selectKey)?this._selectKey:[this._selectKey],e);return this.selectKey?!!this._selectionManager.getItems().find(l=>K(l,t)):this._selectionManager.exists(e)}getSelectedRows(){return this._selectionManager.getItems()}selectRows(e,t){if(!this._selectKey)throw new Error("You must set a selectKey to select rows.");(!this._multiselect||t)&&this.clearSelections(),e&&e.length&&(this._selectionManager.add(e),this._updateSelections(!t))}deselectRows(e){e&&e.length&&(this._selectionManager.remove(e),this._updateSelections(!1))}clearSelections(){let e=this._adapter.getTableElement();this._selectionManager.clear(),this._tableRows.forEach(t=>t.selected=!1),this._isAllSelected=!1,this._adapter.clearSelectedRows(e),this._select&&this._multiselect&&this._adapter.updateSelectAllState(e,!1)}hideColumn(e){let t=this._columnConfigurations[e];this._sortedColumnIndex===e&&(this._sortedColumnIndex=-1),this._hiddenColumnManager.exists(t)||(this._hiddenColumnManager.add(t),this.render())}showColumn(e){let t=this._columnConfigurations[e];this._hiddenColumnManager.exists(t)&&(this._hiddenColumnManager.remove(t),this.render())}isColumnHidden(e){let t=this._columnConfigurations[e];return!!t&&this._hiddenColumnManager.exists(t)}render(){this._adapter.createTable(this._tableConfiguration),this._renderSelections(),this._rendered=!0}_renderBody(){this._rendered&&(this._adapter.recreateTableBody(this._tableConfiguration),this._renderSelections())}_renderSelections(){this.select&&(this._isAllSelected=this._getSelectAllState(),this._multiselect&&this._adapter.updateSelectAllState(this._adapter.getTableElement(),this._isAllSelected,this._isIndeterminate(this._isAllSelected)));let e=this._selectionManager.getItems();e.length&&this._adapter.setSelectedRows(this._adapter.getTableElement(),this._selectKey,this._data,e,!1)}expandRow(e,t){if(!this._rendered)throw new Error("Cannot expand a row before the table has rendered.");if(e<0||e>this._tableRows.length)throw new Error(`Invalid row index: ${e}.`);return this._adapter.expandRow(this._tableConfiguration,e,t)}collapseRow(e){return!this._rendered||e<0||e>this._tableRows.length?Promise.resolve():this._adapter.collapseRow(this._tableConfiguration,e)}isRowExpanded(e){return this._adapter.isRowExpanded(this._tableConfiguration,e)}selectRowsByIndex(e,t){let l=e.map(i=>this._data[i]).filter(i=>!!i);this.selectRows(l,!t)}deselectRowsByIndex(e){let t=e.map(l=>this._data[l]).filter(l=>!!l);this.deselectRows(t)}_getSelectAllState(){return this._tableRows.length>0&&this._tableRows.every(e=>e.selected)}_updateSelections(e){this._tableRows.forEach(l=>l.selected=this._selectionManager.exists(l.data));let t=this._getSelectAllState();this._adapter.setSelectedRows(this._adapter.getTableElement(),this._selectKey,this._data,this._selectionManager.getItems(),e),(t!==this._isAllSelected||this._isIndeterminate(t))&&(this._isAllSelected=t,this._multiselect&&this._adapter.updateSelectAllState(this._adapter.getTableElement(),this._isAllSelected,this._isIndeterminate(this._isAllSelected)))}_onRowClick(e){if(e.stopImmediatePropagation(),e.target.tagName==="INPUT"&&e.target.type==="checkbox")return;let i=H(e).filter(m=>m.nodeType===1).find(m=>m.hasAttribute(s.attributes.CUSTOM_CELL_TEMPLATE));if(i&&i.hasAttribute(s.attributes.CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION))return;let{index:a,data:r}=this._getSelectedRowFromEvent(e),c={index:a,data:r};this._adapter.emitHostEvent(s.events.ROW_CLICK,c,!0,!1)}_onRowDoubleClick(e){if(e.stopPropagation(),e.target.tagName==="INPUT"&&e.target.type==="checkbox")return;let t=this._getSelectedRowFromEvent(e),l={index:t.index,data:t.data};this._adapter.emitHostEvent(s.events.SELECT_DOUBLE,l,!0,!1)}_onRowSelected(e){let t=this._getSelectedRowFromEvent(e);this._multiselect||this._tableRows.filter(r=>r.selected).forEach(r=>{K(r.data,v(this._selectKey,t.data))||this.deselectRows([r.data])});let l=!this._selectionManager.exists(t.data);this._adapter.updateSelectedState(t.rowElement,l),l?this._selectionManager.add(t.data):this._selectionManager.remove(t.data),this._tableRows[t.index].selected=l;let i=[t.index],o=!1;if(this._multiselect){if(e.shiftKey&&this._previouslyClickedRow&&(i=this._shiftSelectRows(t),i.includes(this._previouslyClickedRow.index))){let r=i.indexOf(this._previouslyClickedRow.index);i.splice(r,1)}o=this._getSelectAllState(),this._adapter.updateSelectAllState(this._adapter.getTableElement(),o,this._isIndeterminate(o))}for(let a of i){let r=this._tableRows[a].data,m={selected:this._selectionManager.exists(r),index:a,data:r};this._adapter.emitHostEvent(s.events.SELECT,m,!0,!1)}if(this._isAllSelected!==o){this._isAllSelected=o;let a={status:this._isAllSelected,count:this._tableRows.filter(r=>r.selected).length,data:[...this._data],targetType:"row"};this._adapter.emitHostEvent(s.events.SELECT_ALL,a,!0,!1)}this._previouslyClickedRow=h({},t)}_getSelectedRowFromEvent(e){let l=H(e).find(r=>r.tagName==="TR"),i=l.parentElement,o=this._getNonExpandedRows(i).findIndex(r=>r===l),a=this._tableRows[o].data;return{rowElement:l,index:o,data:a}}_getNonExpandedRows(e){return Array.from(e.rows).filter(t=>!t.classList.contains(s.classes.TABLE_ROW_EXPANDABLE_CONTENT))}_onSelectAll(e){e.stopPropagation(),this._isAllSelected=!this._isAllSelected;let t=this._adapter.getTableElement();this._adapter.updateSelectAllState(t,this._isAllSelected),this._tableRows.forEach((i,o)=>{i.selected=this._isAllSelected,this._isAllSelected?this._selectionManager.add(i.data):this._selectionManager.remove(i.data);let a=b.getRowByIndex(t,o);a&&this._adapter.updateSelectedState(a,this._isAllSelected)});let l={status:this._isAllSelected,count:this._tableRows.filter(i=>i.selected).length,data:[...this._data],targetType:"select-all"};this._adapter.emitHostEvent(s.events.SELECT_ALL,l,!0,!1)}_onHeadRowContextMenu(e){e.preventDefault()}_onHeadRowMouseDown(e){if(e.button!==0)return;let t=H(e),l=e.target,i=t.find(r=>r.tagName==="TR"),o=t.find(r=>r.tagName==="TH"),a=Array.from(i.cells).findIndex(r=>r===o);this._headCellMouseDownIndex=a,l!==o&&l.classList.contains(s.classes.TABLE_RESIZE_HANDLE)&&(this._resizeDescriptor={element:o,startWidth:o.offsetWidth,startX:e.pageX,width:o.offsetWidth,index:this._select?a-1:a},this._adapter.addDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.setResizeColumnVisibility(this._tableConfiguration,a,!0)),this._adapter.addDocumentListener("mouseup",this._documentMouseUpListener)}_onMouseMove(e){if(this._resizeDescriptor){let t=this._resizeDescriptor.startWidth+(e.pageX-this._resizeDescriptor.startX);t<this._minResizeWidth&&(t=this._minResizeWidth),this._resizeDescriptor.width=t,this._resizeDescriptor.element.style.width=`${t}px`,this._adapter.addTableClass(s.classes.TABLE_RESIZING)}}_onMouseUp(e){if(this._adapter.removeDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.removeDocumentListener("mouseup",this._documentMouseUpListener),this._adapter.removeTableClass(s.classes.TABLE_RESIZING),this._headCellMouseDownIndex!==void 0){if(this._resizeDescriptor){this._adapter.normalizeColumnWidths(this._tableConfiguration),this._adapter.setResizeColumnVisibility(this._tableConfiguration,this._headCellMouseDownIndex,!1);let t={index:this._resizeDescriptor.index,width:this._resizeDescriptor.width};this._adapter.emitHostEvent(s.events.COLUMN_RESIZE,t),this._resizeDescriptor=void 0}else this._tableConfiguration.tableElement.tHead.contains(e.target)&&(this._multiColumnSort?this._onMultiSort(this._headCellMouseDownIndex,e.ctrlKey):this._onSort(this._headCellMouseDownIndex));this._headCellMouseDownIndex=void 0}}_onSort(e){let t=this._select?e-1:e,l=t>=0?this._visibleColumnConfigurations[t]:null;if(!l||!l.sortable)return;let i="ASC",o=t===this._sortedColumnIndex,a=this._sortDirection==="ASC"||this._sortDirection===void 0,r=o&&this._sortDirection==="DESC";o&&a&&(i="DESC"),r&&!l.preventUnsort&&(i="UNSET");let c={direction:i,columnIndex:t};if(this._adapter.emitHostEvent(s.events.SORT,c,!0,!0)){if(o&&this._sortDirection==="DESC"&&!l.preventUnsort){this._adapter.removeColumnSort(this._adapter.getTableElement(),this._select?this._sortedColumnIndex+1:this._sortedColumnIndex),this._sortedColumnIndex=-1;return}this._sortDirection=i,t===this._sortedColumnIndex?this._adapter.setSortDirection(this._adapter.getTableElement(),e,this._sortDirection):(this._sortedColumnIndex>=0&&this._adapter.removeColumnSort(this._adapter.getTableElement(),this._select?this._sortedColumnIndex+1:this._sortedColumnIndex),this._sortedColumnIndex=t,this._adapter.setSortedColumn(this._adapter.getTableElement(),e,this._sortDirection))}}_onMultiSort(e,t){let l=this._select?e-1:e,i=l>=0?this._visibleColumnConfigurations[l]:null;if(!i||!i.sortable)return;let o=this._multiSortManager.sortedColumns,a=this._multiSortManager.getSortColumn(l);a?this._multiSortManager.updateSortColumn(a):t?this._multiSortManager.addSortColumn({direction:"DESC",columnIndex:l,propertyName:i.property}):(this._multiSortManager.clearMultiSort(),this._multiSortManager.addSortColumn({direction:"DESC",columnIndex:l,propertyName:i.property}));let r=this._multiSortManager.sortedColumns.map(d=>h({},d));if(!this._adapter.emitHostEvent(s.events.SORT,r,!0,!0)){this._multiSortManager.setSortColumns(o);return}let m=this._multiSortManager.sortedColumns.length>1;for(let d=0;d<this._visibleColumnConfigurations.length;d++){let u=this._select?d+1:d;if(!this._multiSortManager.isSortColumn(d))this._adapter.removeColumnSort(this._adapter.getTableElement(),u),b.setMultiSortColumnSortNumber(this._adapter.getTableElement(),m,u,null);else{let C=this._multiSortManager.getSortColumn(d);C&&(this._adapter.setSortedColumn(this._adapter.getTableElement(),u,C.direction),b.setMultiSortColumnSortNumber(this._adapter.getTableElement(),m,u,C.sortOrder||null))}}}_onFilter(e,t){let l={value:e,columnIndex:t};this._adapter.emitHostEvent(s.events.FILTER,l,!0,!1)}_shiftSelectRows(e){let t=[];if(this._previouslyClickedRow){let l=this._previouslyClickedRow.index,i=e.index,o=i>=l?l:i,a=i>=l?i:l;a+=a>o?1:0,o+=o>a?1:0;let r=d=>this.selectRows(d,!1),c=this._tableRows.find(d=>d.selected&&d.data===e.data),m=this._tableRows.find(d=>{var u;return d.data===((u=this._previouslyClickedRow)==null?void 0:u.data)&&!d.selected});(!c||m)&&(r=d=>this.deselectRows(d));for(let d=o;d<a;d++)t.push(d);r(this.data.filter((d,u)=>t.includes(u)))}return t}_isIndeterminate(e){return!e&&this.getSelectedRows().length>0&&this._data.length!==this.getSelectedRows().length}_applyRoomy(){this._adapter.setRoomy(this._adapter.getTableElement(),this._roomy),this._adapter.setHostAttribute(s.attributes.ROOMY,this._roomy.toString())}_refreshTableSort(){if(this._sortedColumnIndex=this._visibleColumnConfigurations.findIndex(e=>e.initialSort),this._sortDirection=this._sortedColumnIndex>=0?this._visibleColumnConfigurations[this._sortedColumnIndex].sortDirection:void 0,this._multiColumnSort){let e=[];this._visibleColumnConfigurations.forEach((t,l)=>{typeof t.initialSort=="object"&&e.push({columnIndex:l,direction:t.initialSort.direction,sortOrder:t.initialSort.sortOrder,propertyName:t.property})}),this._multiSortManager.setSortColumns(e)}}};var E=class extends J{constructor(){super();se.define(te),this._foundation=new z(new N(this))}static get observedAttributes(){return[s.attributes.SELECT,s.attributes.MULTISELECT,s.attributes.SELECT_KEY,s.attributes.DENSE,s.attributes.ROOMY,s.attributes.FILTER,s.attributes.FIXED_HEADERS,s.attributes.LAYOUT_TYPE,s.attributes.WRAP_CONTENT,s.attributes.RESIZABLE,s.attributes.MIN_RESIZE_WIDTH,s.attributes.ALLOW_ROW_CLICK,s.attributes.MULTI_COLUMN_SORT,s.attributes.SELECT_CHECKBOX_ALIGNMENT,s.attributes.TOOLTIP_SELECT,s.attributes.TOOLTIP_SELECT_ALL]}initializedCallback(){this._foundation.initialize()}connectedCallback(){this._foundation.connect()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,l,i){switch(t){case s.attributes.SELECT:this.select=L(i);break;case s.attributes.MULTISELECT:this.multiselect=L(i);break;case s.attributes.SELECT_KEY:this.selectKey=i;break;case s.attributes.DENSE:this.dense=L(i);break;case s.attributes.ROOMY:this.roomy=L(i);break;case s.attributes.FILTER:this.filter=L(i);break;case s.attributes.FIXED_HEADERS:this.fixedHeaders=L(i);break;case s.attributes.LAYOUT_TYPE:this.layoutType=i;break;case s.attributes.WRAP_CONTENT:this.wrapContent=L(i);break;case s.attributes.RESIZABLE:this.resizable=L(i);break;case s.attributes.MIN_RESIZE_WIDTH:this.minResizeWidth=G(i);break;case s.attributes.ALLOW_ROW_CLICK:this.allowRowClick=L(i);break;case s.attributes.MULTI_COLUMN_SORT:this.multiColumnSort=L(i);break;case s.attributes.SELECT_CHECKBOX_ALIGNMENT:this.selectCheckboxAlignment=this.getAttribute(s.attributes.SELECT_CHECKBOX_ALIGNMENT)||"center";break;case s.attributes.TOOLTIP_SELECT:this.tooltipSelect=i;break;case s.attributes.TOOLTIP_SELECT_ALL:this.tooltipSelectAll=i;break}}hideColumn(t){this._foundation.hideColumn(t)}showColumn(t){this._foundation.showColumn(t)}isColumnHidden(t){return this._foundation.isColumnHidden(t)}getSelectedRows(){return this._foundation.getSelectedRows()}selectRow(t){this._foundation.selectRows([t],!1)}selectRows(t,l=!1){this._foundation.selectRows(t,!l)}deselectRow(t){this._foundation.deselectRows([t])}deselectRows(t){this._foundation.deselectRows(t)}clearSelections(){this._foundation.clearSelections()}render(){this._foundation.render()}expandRow(t,l){return this._foundation.expandRow(t,l)}collapseRow(t){return this._foundation.collapseRow(t)}isRowExpanded(t){return this._foundation.isRowExpanded(t)}selectRowsByIndex(t,l){typeof t=="number"?this._foundation.selectRowsByIndex([t],l):Array.isArray(t)&&this._foundation.selectRowsByIndex(t,l)}deselectRowsByIndex(t){typeof t=="number"?this._foundation.deselectRowsByIndex([t]):Array.isArray(t)&&this._foundation.deselectRowsByIndex(t)}isRowSelected(t){return this._foundation.isRowSelected(t)}};_([T()],E.prototype,"data",2),_([T()],E.prototype,"columnConfigurations",2),_([T()],E.prototype,"select",2),_([T()],E.prototype,"multiselect",2),_([T()],E.prototype,"selectKey",2),_([T()],E.prototype,"tooltipSelect",2),_([T()],E.prototype,"tooltipSelectAll",2),_([T()],E.prototype,"dense",2),_([T()],E.prototype,"roomy",2),_([T()],E.prototype,"filter",2),_([T()],E.prototype,"fixedHeaders",2),_([T()],E.prototype,"layoutType",2),_([T()],E.prototype,"wrapContent",2),_([T()],E.prototype,"resizable",2),_([T()],E.prototype,"minResizeWidth",2),_([T()],E.prototype,"allowRowClick",2),_([T()],E.prototype,"multiColumnSort",2),_([T()],E.prototype,"rowCreated",2),_([T()],E.prototype,"cellCreated",2),_([T()],E.prototype,"selectAllTemplate",2),_([T()],E.prototype,"selectCheckboxAlignment",2),E=_([j({name:s.elementName,dependencies:[ae,oe,ce]})],E);function pl(){q(E)}export{s as a,B as b,O as c,Le as d,N as e,P as f,z as g,E as h,pl as i};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{c as re,f as ce}from"./chunk.JUIFPTRV.js";import{a as M,d as ae}from"./chunk.NSTCCETU.js";import{a as ne}from"./chunk.QUJL4A23.js";import{a as $,b as x,c as v,d as K}from"./chunk.UV3WIHCM.js";import{a as H}from"./chunk.LEVFMI2Q.js";import{b as te}from"./chunk.MZLPUI6R.js";import{a as ie,d as se,l as oe}from"./chunk.T64UW37U.js";import{a as X}from"./chunk.G4IN6Y46.js";import{a as le}from"./chunk.RFLASSCI.js";import{a as T}from"./chunk.NVUMRW44.js";import{a as Q}from"./chunk.TKDMM2ZZ.js";import{a as j,b as ee}from"./chunk.55FCNVG5.js";import{a as q,l as J}from"./chunk.QH2GB3PD.js";import{d as R,e as F,f as p,g as D,i as W,j as U,t as Z}from"./chunk.CFDK4RCW.js";import{b as f,c as Y,d as I,h as y,j as g,k as L,l as G,o as V}from"./chunk.J2M2MXP2.js";import{a as h,d as _}from"./chunk.M3QDAYD2.js";var w=class{constructor(e){this._key=e,this._items=[]}getItems(){return[...this._items]}count(){return this._items.length}setKey(e){this._key=e}add(e){return e instanceof Array||(e=[e]),e.forEach(t=>{this.exists(t)||this._items.push(t)}),this}remove(e){e instanceof Array||(e=[e]);for(let t=e.length-1;t>=0;t--)this.exists(e[t])&&this._items.splice(this._items.indexOf(this._getItem(e[t])),1);return this}clear(){return this._items=[],this}exists(e){return this._getItem(e)!==null}_getItem(e){return this._key?x(this._items,v(this._key,e))||null:this._items.find(t=>t===e)||null}};var S=`${ee}table`,de={TABLE:"forge-table",TABLE_DENSE:"forge-table--dense",TABLE_ROOMY:"forge-table--roomy",TABLE_RESIZABLE:"forge-table--resizable",TABLE_RESIZING:"forge-table--resizing",TABLE_RESIZE_HANDLE:"forge-table__resize-handle",TABLE_NO_WRAP_CONTENT:"forge-table--no-wrap-content",TABLE_LAYOUT_FIXED:"forge-table--layout-fixed",TABLE_FILTER_VISIBLE:"forge-table--filter-visible",TABLE_FIXED:"forge-table--fixed",TABLE_HEAD:"forge-table-head",TABLE_HEAD_ROW:"forge-table-head__row",TABLE_HEAD_ROW_FILTER:"forge-table-head__row__filter",TABLE_HEAD_CELL:"forge-table-head__cell",TABLE_HEAD_CELL_CONTAINER:"forge-table-head__cell-container",TABLE_HEAD_CELL_SORTABLE:"forge-table-head__cell--sortable",TABLE_HEAD_CELL_SORT_ICON:"forge-table-head__cell-sort-icon",TABLE_HEAD_CELL_TEXT:"forge-table-head__cell-text",TABLE_HEAD_CELL_SORT_ICON_ACTIVE:"forge-table-head__cell-sort-icon--active",TABLE_HEAD_CELL_SORTED_ASCENDING:"forge-table-head__cell--sorted-ascending",TABLE_HEAD_CELL_SORTED_DESCENDING:"forge-table-head__cell--sorted-descending",TABLE_HEAD_CELL_SORT_ORDER:"forge-table-head__cell__sort-order",TABLE_HEAD_CELL_SORT_ORDER_HIDDEN:"forge-table-head__cell__sort-order--hidden",TABLE_BODY:"forge-table-body",TABLE_BODY_ROW:"forge-table-body__row",TABLE_BODY_ROW_SELECTED:"forge-table-body__row--selected",TABLE_BODY_ROW_CLICKABLE:"forge-table-body__row--clickable",TABLE_BODY_CELL:"forge-table-body__cell",TABLE_ROW:"forge-table-row",TABLE_ROW_EXPANDED:"forge-table-row--expanded",TABLE_ROW_EXPANDABLE_CONTENT:"forge-table-row__expandable-content",TABLE_ROW_EXPANDABLE_CONTENT_CELL:"forge-table-row__expandable-content-cell",TABLE_CELL:"forge-table-cell",TABLE_CELL_SELECT:"forge-table-cell__select",TABLE_CELL_SELECT_CHECKBOX:"forge-table-cell__select-checkbox",TABLE_CELL_SELECT_CHECKBOX_CONTAINER:"forge-table-cell__select-checkbox-container",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_RIGHT:"forge-table-cell__select-checkbox-container--align-right",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_LEFT:"forge-table-cell__select-checkbox-container--align-left",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_CENTER:"forge-table-cell__select-checkbox-container--align-center",TABLE_CELL_CONTAINER:"forge-table-cell__container",TABLE_CELL_CONTAINER_TEXT:"forge-table-cell__container-text",TABLE_CELL_CENTER:"forge-table-cell--center",TABLE_CELL_RIGHT:"forge-table-cell--right",TABLE_CELL_RESIZABLE:"forge-table-cell--resizing"},Ee={TABLE:".forge-table",CHECKBOX_INPUT:"forge-checkbox > input[type=checkbox]:not([forge-ignore])",SELECT_ALL_TEMPLATE_CHECKBOX_INPUT:"input[type=checkbox]:not([forge-ignore])",ROW_SELECTED:`.${de.TABLE_BODY_ROW_SELECTED}`},_e={SELECT:"select",MULTISELECT:"multiselect",SELECT_KEY:"select-key",DENSE:"dense",ROOMY:"roomy",FILTER:"filter",FIXED_HEADERS:"fixed-headers",LAYOUT_TYPE:"layout-type",WRAP_CONTENT:"wrap-content",RESIZABLE:"resizable",MIN_RESIZE_WIDTH:"min-resize-width",ALLOW_ROW_CLICK:"allow-row-click",MULTI_COLUMN_SORT:"multi-column-sort",SELECT_CHECKBOX_ALIGNMENT:"select-checkbox-alignment",TOOLTIP_SELECT:"tooltip-select",TOOLTIP_SELECT_ALL:"tooltip-select-all",CHECKBOX_TYPE:"forge-checkbox-type",CUSTOM_CELL_TEMPLATE:"data-cell-template",CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION:"data-cell-template-stop-propagation"},Te={ROW_CLICK:`${S}-row-click`,SELECT:`${S}-select`,SELECT_DOUBLE:`${S}-select-double`,SELECT_ALL:`${S}-select-all`,SORT:`${S}-sort`,FILTER:`${S}-filter`,INITIALIZED:`${S}-initialized`,COLUMN_RESIZE:`${S}-column-resize`},pe={SELECT_ALL:"select-all",SELECT_ROW:"select-row",DEFAULT_LAYOUT_TYPE:"auto"},Ce={SORT_DOWN:"arrow_downward"},he={DEFAULT_FILTER_DEBOUNCE_TIME:750,MIN_RESIZE_WIDTH:100,RESIZE_HOVER_DURATION:150},s={elementName:S,classes:de,selectors:Ee,attributes:_e,events:Te,strings:pe,icons:Ce,numbers:he};var B=(l=>(l.Left="left",l.Right="right",l.Center="center",l))(B||{}),O=(l=>(l.Ascending="ASC",l.Descending="DESC",l.Unset="UNSET",l))(O||{}),Le=(a=>(a.InputText="text",a.InputNumber="number",a.Select="select",a.SelectMultiple="select-multiple",a.Date="date",a.DateRange="date-range",a))(Le||{});function me(n){return n&&typeof n=="object"&&"content"in n}var b=class n{static createTable(e){n._resetTable(e.tableElement);let t=n._createTableHead(e),l=n._createTableBody(e);e.clickListener&&(n._attachRowClickListeners(l,e.clickListener,e.doubleClickListener),n._addRowClickAttributes(l)),e.fixedHeaders&&n.setFixedHeaders(e),e.resizable&&n.setResizable(e),e.dense&&n.setDenseState(e.tableElement,e.dense),e.wrapContent&&n.setWrapContentState(e.tableElement,e.wrapContent),e.selectListener&&n._addSelectColumn(t,l,e.selectListener,e.selectAllListener,e.selectAllTemplate,e.selectCheckboxAlignment,e.data,e.tooltipSelect,e.tooltipSelectAll),(e.resizable||e.columnConfigurations.some(i=>!!i.sortable))&&(n._attachHeadRowMouseDownListener(t,e.headRowMouseDownListener),n._isMac()&&n._attachHeadRowContextMenuListener(t,e.headRowContextMenuListener)),n.setLayoutType(e),n._setTableHead(e.tableElement,t),e.filter&&n.setFilterRow(e),n._setTableBody(e.tableElement,l)}static _setTableHead(e,t){e.tHead?F(t,e.tHead):e.appendChild(t)}static _setTableBody(e,t){e.tBodies.length?F(t,e.tBodies[0]):e.appendChild(t)}static recreateTableBody(e){let t=n._createTableBody(e);e.clickListener&&(n._attachRowClickListeners(t,e.clickListener,e.doubleClickListener),n._addRowClickAttributes(t)),e.selectListener&&(n._createBodySelectColumn(t,e.selectCheckboxAlignment,e.data,e.tooltipSelect,e.tooltipSelectAll),n._attachRowSelectListeners(t,e.selectListener)),n._setTableBody(e.tableElement,t)}static _resetTable(e){R(e)}static _createMultisortTooltip(){let e=document.createElement(ne.elementName);return e.textContent="Ctrl + click to sort multiple columns",e.position="bottom",e.delay=0,e}static _createTableHead(e){let t=document.createElement("thead"),l=t.insertRow();p([s.classes.TABLE_ROW,s.classes.TABLE_HEAD_ROW],l);let i=!1;for(let o=0;o<e.columnConfigurations.length;o++){let a=e.columnConfigurations[o],r=document.createElement("th");r.scope="col",p([s.classes.TABLE_CELL,s.classes.TABLE_HEAD_CELL],r);let c=document.createElement("div");if(c.classList.add(s.classes.TABLE_HEAD_CELL_CONTAINER),e.multiColumnSort){let d=n._createMultisortTooltip();c.appendChild(d)}if(a.align&&n._setCellAlignmentClass(c,a.align),f(a.width)){let d=U(a.width);d&&(r.style.width=d)}if(e.resizable&&a.resizable!==!1){let d=document.createElement("div");d.classList.add(s.classes.TABLE_RESIZE_HANDLE),r.appendChild(d)}f(a.headerCellStyle)&&g(a.headerCellStyle)&&(Object.assign(r.style,a.headerCellStyle),Object.assign(c.style,a.headerCellStyle));let m=document.createElement("span");if(m.classList.add(s.classes.TABLE_HEAD_CELL_TEXT),m.textContent=a.header&&typeof a.header=="string"?a.header.trim():"",a.sortable){r.classList.add(s.classes.TABLE_HEAD_CELL_SORTABLE);let d=document.createElement("span");p([s.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN,s.classes.TABLE_HEAD_CELL_SORT_ORDER],d);let u=document.createElement(ie.elementName);u.name=s.icons.SORT_DOWN,p([s.classes.TABLE_HEAD_CELL_SORT_ICON],u),e.multiColumnSort?typeof a.initialSort=="object"&&a.initialSort.sortOrder&&(d.textContent=a.initialSort.sortOrder.toString(),e.columnConfigurations.filter(C=>typeof C.initialSort=="object").length>1&&D(s.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN,d),r.classList.add(s.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),u.classList.add(s.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),n._setColumnSortDirection(r,a.initialSort.direction)):e.sortedColumn===o&&!i&&!e.multiColumnSort&&(r.classList.add(s.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),u.classList.add(s.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),n._setColumnSortDirection(r,e.sortDirection),i=!0),c.appendChild(u),c.appendChild(d)}typeof a.headerTemplate=="function"?Promise.resolve(a.headerTemplate(o,c,a)).then(d=>{if(d){let u=document.createElement("div");p(s.classes.TABLE_CELL_CONTAINER,u),typeof d=="string"?u.innerHTML=d:n._prepend(d,u),u.setAttribute(s.attributes.CUSTOM_CELL_TEMPLATE,""),n._prepend(u,c)}}):n._prepend(m,c),r.appendChild(c),l.appendChild(r)}return t}static setSortDirection(e,t,l){let i=n._getHeaderCellByIndex(e,t);n._setColumnSortDirection(i,l)}static _setColumnSortDirection(e,t){e.classList.contains(s.classes.TABLE_HEAD_CELL_SORTED_ASCENDING)&&e.classList.remove(s.classes.TABLE_HEAD_CELL_SORTED_ASCENDING),e.classList.contains(s.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)&&e.classList.remove(s.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),!t||t==="DESC"?e.classList.add(s.classes.TABLE_HEAD_CELL_SORTED_DESCENDING):e.classList.add(s.classes.TABLE_HEAD_CELL_SORTED_ASCENDING)}static _createTableBody(e){let t=document.createElement("tbody");return n._getOrderedRowData(e.columnConfigurations,e.data).forEach((i,o)=>{let a=t.insertRow();p([s.classes.TABLE_ROW,s.classes.TABLE_BODY_ROW],a),n._populateRowCells(e,a,i,o),typeof e.rowCreatedCallback=="function"&&e.rowCreatedCallback(a,o,h({},e.data[o].data))}),t}static _populateRowCells(e,t,l,i){for(let o=0;o<l.length;o++){let a=e.columnConfigurations[o],r=t.insertCell();if(p([s.classes.TABLE_CELL,s.classes.TABLE_BODY_CELL],r),f(a.width)){let m=U(a.width);m&&(r.style.width=m)}let c=document.createElement("div");if(c.classList.add(s.classes.TABLE_CELL_CONTAINER),f(a.cellStyle)&&g(a.cellStyle)&&(Object.assign(r.style,a.cellStyle),Object.assign(c.style,a.cellStyle)),a.template&&typeof a.template=="function"){let m=e.data[i]?e.data[i].data:void 0;Promise.resolve(a.template(i,c,m,o)).then(d=>{let u=me(d)?d:{content:d,stopClickPropagation:a.stopCellTemplateClickPropagation};u.content&&(typeof u.content=="string"?c.innerHTML=u.content:c.appendChild(u.content),c.setAttribute(s.attributes.CUSTOM_CELL_TEMPLATE,""),u.stopClickPropagation&&c.setAttribute(s.attributes.CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION,""))})}else if(a.property){let m=document.createElement("span");m.classList.add(s.classes.TABLE_CELL_CONTAINER_TEXT),c.appendChild(m),a.transform&&typeof a.transform=="function"?Promise.resolve(a.transform(l[o])).then(d=>m.textContent=d):l[o]==null?m.textContent="":m.textContent=l[o].toString()}if(a.align&&n._setCellAlignmentClass(c,a.align),r.appendChild(c),f(a.columnSpan)){if(a.columnSpan==="all"){r.colSpan=l.length-o;break}else if(typeof a.columnSpan=="number"&&a.columnSpan>0){let m=a.columnSpan;a.columnSpan>l.length-o&&(m=l.length),r.colSpan=m,o=o+(m-1)}}typeof e.cellCreatedCallback=="function"&&e.cellCreatedCallback(r,i,o)}}static _setCellAlignmentClass(e,t){switch(t){case"center":e.classList.add(s.classes.TABLE_CELL_CENTER);break;case"right":e.classList.add(s.classes.TABLE_CELL_RIGHT);break}}static _getNonExpandedRows(e){return Array.from(e).filter(t=>!t.classList.contains(s.classes.TABLE_ROW_EXPANDABLE_CONTENT))}static _getExpandedRows(e){return Array.from(e).filter(t=>t.classList.contains(s.classes.TABLE_ROW_EXPANDABLE_CONTENT))}static _createColumnDataMap(e,t){return e.map(l=>({config:l,data:t.map(i=>{if(l.property){let o=$(i.data,l.property);return f(o)?o:null}return null})}))}static _getOrderedRowData(e,t){let l=n._createColumnDataMap(e,t),i=[];for(let o of l)for(let a=0;a<o.data.length;a++)i[a]||(i[a]=[]),i[a].push(o.data[a]);return i}static _attachRowClickListeners(e,t,l){n._getNonExpandedRows(e.rows).forEach(o=>{o.addEventListener("click",t),l&&o.addEventListener("dblclick",l)})}static _addRowClickAttributes(e){n._getNonExpandedRows(e.rows).forEach(l=>{l.classList.add(s.classes.TABLE_BODY_ROW_CLICKABLE)})}static _removeRowClickAttributes(e){n._getNonExpandedRows(e.rows).forEach(l=>{l.classList.remove(s.classes.TABLE_BODY_ROW_CLICKABLE)})}static _attachRowSelectListeners(e,t){n._getNonExpandedRows(e.rows).forEach(i=>n._attachRowSelectListener(i,t))}static _attachRowSelectListener(e,t){let l=n._getCheckboxElement(e);l==null||l.addEventListener("click",t)}static _detachRowSelectListeners(e,t){Array.from(e.rows).forEach(l=>{let i=n._getCheckboxElement(l);i==null||i.removeEventListener("click",t)})}static _detachRowClickListeners(e,t,l){Array.from(e.rows).forEach(i=>{i.removeEventListener("click",t),i.removeEventListener("dblclick",l)})}static _attachSelectAllListener(e,t){let l=e.rows[e.rows.length-1],i=n._getCheckboxElement(l);if(!i)throw new Error("Checkbox element not found.");i.addEventListener("change",t)}static _tryAttachSelectAllTemplateListener(e,t){let l=e.rows[e.rows.length-1],i=n._tryGetSelectAllCheckboxElement(l);i&&i.addEventListener("change",t)}static _detachSelectAllListener(e,t){let l=e.rows[e.rows.length-1],i=n._tryGetSelectAllCheckboxElement(l);i&&i.removeEventListener("change",t)}static _attachHeadRowMouseDownListener(e,t){let l=e.rows[0];if(!l)throw new Error("Missing table header row. Unable to attach sort listener.");l.addEventListener("mousedown",t)}static _attachHeadRowContextMenuListener(e,t){let l=e.rows[0];if(!l)throw new Error("Missing table header row. Unable to attach sort listener.");l.addEventListener("contextmenu",t)}static _createSelectColumn(e,t,l,i,o,a,r,c,m){e&&n._createHeadSelectColumn(e,l,i,o,a,m),t&&n._createBodySelectColumn(t,a,r,c,m)}static _createHeadSelectColumn(e,t,l,i,o,a){var r;if(Array.from(e.rows).forEach(c=>{let m=document.createElement("th");p([s.classes.TABLE_CELL,s.classes.TABLE_HEAD_CELL],m),c.insertBefore(m,c.cells.item(0))}),t){let c=(r=e.rows.item(e.rows.length-1))==null?void 0:r.cells.item(0);c.classList.add(s.classes.TABLE_CELL_SELECT),typeof l=="function"?n._renderSelectAllTemplate(l,e).then(()=>{typeof i=="function"&&i()}):c==null||c.appendChild(n._createCheckboxElement(!0,o,null,null,null,a))}}static _createBodySelectColumn(e,t,l,i,o){if(n._getNonExpandedRows(e.rows).forEach((r,c)=>n._addRowSelectColumn(r,t,c,l[c],i,o)),e.rows.length){let r=e.rows.item(0);r&&n._updateExpandedRowColspan(e.rows,r.cells.length)}}static _addRowSelectColumn(e,t,l,i,o,a){let r=e.insertCell(0);p([s.classes.TABLE_CELL,s.classes.TABLE_BODY_CELL,s.classes.TABLE_CELL_SELECT],r),r.appendChild(n._createCheckboxElement(!1,t,l,i,o,a))}static _destroySelectColumn(e,t){let l=n._getNonExpandedRows(t.rows);if(Array.from(e.rows).forEach(i=>i.removeChild(i.cells.item(0))),Array.from(l).forEach(i=>i.removeChild(i.cells.item(0))),t.rows.length){let i=t.rows.item(0);i&&n._updateExpandedRowColspan(t.rows,i.cells.length)}}static _hasSelectColumn(e,t){return[...Array.from(e.rows),...Array.from(t.rows)].some(i=>i.cells.item(0).classList.contains(s.classes.TABLE_CELL_SELECT))}static _createCheckboxElement(e,t,l,i,o,a){let r=document.createElement("div");if(r.classList.add(s.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER),t)switch(t){case"center":r.classList.add(s.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_CENTER);break;case"left":r.classList.add(s.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_LEFT);break;case"right":r.classList.add(s.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_RIGHT);break}let c=document.createElement(re.elementName),m=document.createElement("input");m.type="checkbox";let d=o||"";i&&typeof o=="function"&&(d=o.call(null,l,i.data));let u=document.createElement("forge-tooltip");return u.position="left",e?u.textContent=a||"":u.textContent=d,m.setAttribute("aria-label","Select row"),c.appendChild(m),r.appendChild(u),r.appendChild(c),r}static _getCheckboxElement(e){let t=e.querySelector(`.${s.classes.TABLE_CELL_SELECT}`);return t?t.querySelector(s.selectors.CHECKBOX_INPUT):null}static _tryGetSelectAllCheckboxElement(e){let t=e.querySelector(`.${s.classes.TABLE_CELL_SELECT}`);return t?t.querySelector(s.selectors.CHECKBOX_INPUT)||t.querySelector(s.selectors.SELECT_ALL_TEMPLATE_CHECKBOX_INPUT):null}static _setSelectedCheckboxState(e,t){e&&(e.checked=t)}static _setIndeterminateCheckboxState(e,t){e&&(e.indeterminate=t)}static _setRowSelectedState(e,t){t?e.classList.contains(s.classes.TABLE_BODY_ROW_SELECTED)||e.classList.add(s.classes.TABLE_BODY_ROW_SELECTED):e.classList.remove(s.classes.TABLE_BODY_ROW_SELECTED)}static _updateExpandedRowColspan(e,t){n._getExpandedRows(e).forEach(i=>{let o=i.cells.item(0);o&&(o.colSpan=t)})}static updateSelectedState(e,t){n._setRowSelectedState(e,t);let l=n._getCheckboxElement(e);l&&n._setSelectedCheckboxState(l,t)}static getRowByIndex(e,t){return n._getNonExpandedRows(e.tBodies[0].rows)[t]}static updateSelectAllState(e,t,l){if(!e.tHead)return;let i=e.tHead.rows[e.tHead.rows.length-1],o=n._tryGetSelectAllCheckboxElement(i);o&&(n._setSelectedCheckboxState(o,t),n._setIndeterminateCheckboxState(o,!!l))}static setSelectedRows(e,t,l,i,o=!1){if(!e.tBodies.length)return;o||n.clearSelectedRows(e);let a=e.tBodies[0].rows,r=0;i.length&&Array.from(a).forEach((c,m)=>{let d=l[m];if(x(i,v(t,d))){n._setRowSelectedState(c,!0);let C=n._getCheckboxElement(c);C&&n._setSelectedCheckboxState(C,!0),r++}}),n.updateSelectAllState(e,r>0&&a.length===r)}static clearSelectedRows(e){if(!e.tBodies.length)return;n._getNonExpandedRows(e.tBodies[0].rows).forEach(l=>{n._setRowSelectedState(l,!1);let i=n._getCheckboxElement(l);i&&n._setSelectedCheckboxState(i,!1)})}static setSortedColumn(e,t,l){let i=n._getHeaderCellByIndex(e,t);n._getSortIconElementFromHeaderCell(i).classList.add(s.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),n._setColumnSortDirection(i,l)}static setMultiSortColumnSortNumber(e,t,l,i){let r=n._getHeaderCellByIndex(e,l).querySelector(`.${s.classes.TABLE_HEAD_CELL_CONTAINER}`).querySelector(`.${s.classes.TABLE_HEAD_CELL_SORT_ORDER}`);r&&(Z(r,typeof i!="number"||!t,s.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN),i&&(r.textContent=i.toString()))}static removeColumnSort(e,t){let l=n._getHeaderCellByIndex(e,t);l.classList.contains(s.classes.TABLE_HEAD_CELL_SORTED_ASCENDING)&&l.classList.remove(s.classes.TABLE_HEAD_CELL_SORTED_ASCENDING),l.classList.contains(s.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)&&l.classList.remove(s.classes.TABLE_HEAD_CELL_SORTED_DESCENDING);let i=n._getSortIconElementFromHeaderCell(l);i&&i.classList.contains(s.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE)&&i.classList.remove(s.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE)}static _getHeaderCellByIndex(e,t){if(!e.tHead)throw new Error("Table head element cannot be null.");return e.tHead.rows.item(0).cells.item(t)}static _getSortIconElementFromHeaderCell(e){return e.querySelector(`.${s.classes.TABLE_HEAD_CELL_SORT_ICON}`)}static setSelectColumnVisibility(e,t,l,i,o,a,r,c,m){let d=e.tHead,u=e.tBodies[0];!d||!u||(t?n._addSelectColumn(d,u,l,i,o,a,r,c,m):n._hasSelectColumn(d,u)&&(l&&n._detachRowSelectListeners(u,l),i&&n._detachSelectAllListener(d,i),n._destroySelectColumn(d,u)))}static _addSelectColumn(e,t,l,i,o,a,r,c,m){n._createSelectColumn(e,t,!!i,o,()=>{i&&n._tryAttachSelectAllTemplateListener(e,i)},a,r,c,m),l&&n._attachRowSelectListeners(t,l),i&&!o&&n._tryAttachSelectAllTemplateListener(e,i)}static setDenseState(e,t){e.classList.contains(s.classes.TABLE_DENSE)&&e.classList.remove(s.classes.TABLE_DENSE),t&&e.classList.add(s.classes.TABLE_DENSE)}static setRoomyState(e,t){e.classList.contains(s.classes.TABLE_ROOMY)&&e.classList.remove(s.classes.TABLE_ROOMY),t&&e.classList.add(s.classes.TABLE_ROOMY)}static setResizable(e){let t=e.tableElement.tHead;e.resizable?(e.tableElement.classList.add(s.classes.TABLE_RESIZABLE),n._addResizeHandles(t,e)):(e.tableElement.classList.remove(s.classes.TABLE_RESIZABLE),n._removeResizeHandles(t,e))}static _addResizeHandles(e,t){if(!e)return;let l=e.rows.item(0);if(l){let i=Array.from(l.cells);t.selectListener&&(i=i.slice(1));for(let o of i){let a=i.indexOf(o);if(t.columnConfigurations[a].resizable!==!1){let c=document.createElement("div");c.classList.add(s.classes.TABLE_RESIZE_HANDLE),o.appendChild(c)}}}}static _removeResizeHandles(e,t){if(!e)return;let l=e.rows.item(0);if(l){let i=Array.from(l.cells);t.selectListener&&(i=i.slice(1));for(let o of i){let a=document.querySelector(`.${s.classes.TABLE_RESIZE_HANDLE}`);a&&o.removeChild(a)}}}static setWrapContentState(e,t){t?e.classList.remove(s.classes.TABLE_NO_WRAP_CONTENT):e.classList.add(s.classes.TABLE_NO_WRAP_CONTENT)}static setSelectAllVisibility(e,t,l,i,o,a){let r=e.tHead;if(!r)return;!t&&l&&n._detachSelectAllListener(r,l);let m=r.rows[r.rows.length-1].cells.item(0);t?m.childElementCount||(m.classList.add(s.classes.TABLE_CELL_SELECT),i?n._renderSelectAllTemplate(i,r).then(()=>{l&&n._tryAttachSelectAllTemplateListener(r,l)}):m.appendChild(n._createCheckboxElement(!0,o||null,null,null,null,a)),l&&!i&&n._attachSelectAllListener(r,l)):(l&&n._detachSelectAllListener(r,l),R(m))}static setFilterRow(e){if(!e.tableElement.tHead)return;let t=n._getFilterRowElement(e.tableElement.tHead),l;if(e.filter?e.tableElement.classList.add(s.classes.TABLE_FILTER_VISIBLE):e.tableElement.classList.remove(s.classes.TABLE_FILTER_VISIBLE),e.filter&&!t){if(e.columnConfigurations.every(o=>!o.filter))return;e.selectListener&&e.selectAllListener&&(l=e.tableElement.tHead.rows[e.tableElement.tHead.rows.length-1].cells.item(0));let i=n._createFilterRowElement(e);i&&l&&Array.from(l.children).forEach(o=>{var a;(a=i.cells.item(0))==null||a.appendChild(o)})}else if(!e.filter&&t){if(e.selectListener&&e.selectAllListener){l=t.cells.item(0);let i=Array.from(e.tableElement.tHead.rows).indexOf(t)-1,o=e.tableElement.tHead.rows.item(i);o&&Array.from(l.children).forEach(a=>{var r;(r=o.cells.item(0))==null||r.appendChild(a)})}W(t)}}static _createFilterRowElement(e){if(!e.tableElement.tHead)throw new Error("Table head element cannot be null.");let t=e.tableElement.tHead.insertRow();if(p([s.classes.TABLE_ROW,s.classes.TABLE_HEAD_ROW_FILTER],t),e.selectListener){let l=document.createElement("th");p([s.classes.TABLE_CELL,s.classes.TABLE_HEAD_CELL],l),t.insertBefore(l,t.cells[0]),l.classList.add(s.classes.TABLE_CELL_SELECT)}return e.columnConfigurations.forEach((l,i)=>{let o=document.createElement("th");if(p([s.classes.TABLE_CELL,s.classes.TABLE_HEAD_CELL],o),l.filter&&f(l.filterDelegate)){let a=document.createElement("div");a.classList.add(s.classes.TABLE_HEAD_CELL_CONTAINER),l.align&&n._setCellAlignmentClass(a,l.align);let r=n._createFilterElement(l,i,e.filterListener);a.appendChild(r),o.appendChild(a)}t.appendChild(o)}),t}static _createFilterElement(e,t,l){let i;if(y(e.filterDelegate))i=e.filterDelegate();else if(e.filterDelegate instanceof X||e.filterDelegate instanceof le)i=e.filterDelegate;else throw new Error("Invalid filter delegate.");if(l&&i instanceof X&&y(i.onChange))if(!f(e.filterDebounceTime)||I(e.filterDebounceTime)){let o=f(e.filterDebounceTime)?e.filterDebounceTime:s.numbers.DEFAULT_FILTER_DEBOUNCE_TIME;i.onChange(V(a=>l(a,t),o))}else i.onChange(o=>l(o,t));return i.element}static _getFilterRowElement(e){if(e)return Array.from(e.rows).find(t=>t.classList.contains(s.classes.TABLE_HEAD_ROW_FILTER))}static async expandRow(e,t,l){let i=e.tableElement.tBodies[0],a=n._getNonExpandedRows(i.rows)[t];a.classList.add(s.classes.TABLE_ROW_EXPANDED);let r=Array.from(i.rows).indexOf(a),c=i.insertRow(r+1);p([s.classes.TABLE_ROW,s.classes.TABLE_BODY_ROW,s.classes.TABLE_ROW_EXPANDABLE_CONTENT],c);let m=c.insertCell();m.setAttribute("colspan",a.cells.length.toString()),m.classList.add(s.classes.TABLE_ROW_EXPANDABLE_CONTENT_CELL);let d=document.createElement("div"),u=document.createElement(M.elementName);u.appendChild(d),m.appendChild(u);let C=l;if(y(l)){let ue=e.data[t]?e.data[t].data:void 0,be=l(t,d,ue);try{let A=await Promise.resolve(be);C=me(A)?A.content:A}catch(A){console.error("Failed to load row template "+A.message),C=""}}C&&n._setRowTemplate(d,C),window.requestAnimationFrame(()=>u.open=!0)}static _setRowTemplate(e,t){Y(t)?e.innerHTML=t:e.appendChild(t)}static collapseRow(e,t){if(!e.tableElement||!e.tableElement.tBodies.length||!e.tableElement.tBodies[0].rows.length)return Promise.resolve();let l=e.tableElement.tBodies[0],o=n._getNonExpandedRows(l.rows)[t],a=Array.from(l.rows).indexOf(o);if(o&&o.classList.contains(s.classes.TABLE_ROW_EXPANDED)){let r=l.rows[a+1],c=r.querySelector(M.elementName);if(c&&c.open)return c.open=!1,new Promise(m=>{setTimeout(()=>{o.classList.remove(s.classes.TABLE_ROW_EXPANDED),W(r),m()},M.numbers.COLLAPSE_ANIMATION_DURATION)})}return Promise.resolve()}static isRowExpanded(e,t){let l=e.tableElement.tBodies[0],o=n._getNonExpandedRows(l.rows)[t];return o&&o.classList.contains(s.classes.TABLE_ROW_EXPANDED)}static setFixedHeaders(e){e.fixedHeaders?e.tableElement.classList.add(s.classes.TABLE_FIXED):e.tableElement.classList.remove(s.classes.TABLE_FIXED)}static setLayoutType(e){e.layoutType==="fixed"?e.tableElement.classList.add(s.classes.TABLE_LAYOUT_FIXED):e.tableElement.classList.remove(s.classes.TABLE_LAYOUT_FIXED)}static normalizeColumnWidths(e){let t=e.tableElement;if(t.tHead&&t.tHead.rows.length){let l=Array.from(t.tHead.rows[0].cells);for(let i of l){let o=getComputedStyle(i).width;i.style.width&&i.style.width!==o&&(i.style.width=o)}}}static setColumnResizeIndicatorVisibility(e,t,l){let i=e.tableElement;if(i.tHead&&i.tHead.rows.length){let o=Array.from(i.tHead.rows);for(let a of o){let r=a.cells[t];r&&(l?r.classList.add(s.classes.TABLE_CELL_RESIZABLE):r.classList.remove(s.classes.TABLE_CELL_RESIZABLE))}}if(i.tBodies.length){let o=Array.from(i.tBodies[0].rows);for(let a of o){let r=a.cells[t];r&&(l?r.classList.add(s.classes.TABLE_CELL_RESIZABLE):r.classList.remove(s.classes.TABLE_CELL_RESIZABLE))}}}static setRowClickListeners(e,t,l,i){let o=e.tBodies[0];o&&(t?n._attachRowClickListeners(o,l,i):n._detachRowClickListeners(o,l,i))}static setRowClickAttributes(e,t){let l=e.tBodies[0];l&&(t?n._addRowClickAttributes(l):n._removeRowClickAttributes(l))}static getOwnerDocument(e){return e.ownerDocument||document}static _prepend(e,t){let l=t.childNodes.item(0);l?t.insertBefore(e,l):t.appendChild(e)}static _isMac(){return!!(navigator&&navigator.platform&&navigator.platform.substr(0,3)==="Mac")}static _renderSelectAllTemplate(e,t){return Promise.resolve(e()).then(l=>{let i=t.rows.item(t.rows.length-1);if(!i)return;let o=i.cells.item(0);l&&o&&(typeof l=="string"?o.innerHTML=l:l instanceof HTMLElement&&o.appendChild(l),o.setAttribute(s.attributes.CUSTOM_CELL_TEMPLATE,""))})}};var N=class extends Q{constructor(t){super(t)}initialize(){this._tableElement||(this._tableElement=document.createElement("table"),this._tableElement.classList.add(s.classes.TABLE),this._component.children.length&&R(this._component),this._component.appendChild(this._tableElement))}getTableElement(){return this._tableElement||this.initialize(),this._tableElement}createTable(t){return b.createTable(t)}recreateTableBody(t){b.recreateTableBody(t)}setSelectedRows(t,l,i,o,a=!1){b.setSelectedRows(t,l,i,o,a)}clearSelectedRows(t){b.clearSelectedRows(t)}updateSelectedState(t,l){b.updateSelectedState(t,l)}updateSelectAllState(t,l,i){b.updateSelectAllState(t,l,i)}setSortedColumn(t,l,i){b.setSortedColumn(t,l,i)}removeColumnSort(t,l){b.removeColumnSort(t,l)}setSortDirection(t,l,i){b.setSortDirection(t,l,i)}setSelectColumnVisibility(t,l,i,o,a,r,c,m,d){b.setSelectColumnVisibility(t,l,i,o||null,a||null,r||null,c||[],m||null,d||null)}setDense(t,l){b.setDenseState(t,l)}setRoomy(t,l){b.setRoomyState(t,l)}setResizable(t){b.setResizable(t)}setSelectAllVisibility(t,l,i,o,a,r=null){b.setSelectAllVisibility(t,l,i,o,a||null,r||null)}setFilterRow(t){b.setFilterRow(t)}expandRow(t,l,i){return b.expandRow(t,l,i)}collapseRow(t,l){return b.collapseRow(t,l)}isRowExpanded(t,l){return b.isRowExpanded(t,l)}setFixedHeaders(t){b.setFixedHeaders(t)}setTableLayoutType(t){b.setLayoutType(t)}setWrapContentState(t){b.setWrapContentState(t.tableElement,t.wrapContent)}addDocumentListener(t,l){b.getOwnerDocument(this._component).addEventListener(t,l)}removeDocumentListener(t,l){b.getOwnerDocument(this._component).removeEventListener(t,l)}normalizeColumnWidths(t){b.normalizeColumnWidths(t)}setResizeColumnVisibility(t,l,i){b.setColumnResizeIndicatorVisibility(t,l,i)}addTableClass(t){p(t,this._tableElement)}removeTableClass(t){D(t,this._tableElement)}setRowClickListeners(t,l,i,o){b.setRowClickListeners(t,l,i,o)}setRowClickAttributes(t,l){b.setRowClickAttributes(t,l)}};var k=class{constructor(){this._sortedColumns=[]}get sortedColumns(){return[...this._sortedColumns.map(e=>h({},e))]}addSortColumn(e){this._sortedColumns.push(h({},e)),this._updateSortNumbers()}updateSortColumn(e){let t=this._sortedColumns.find(l=>l.columnIndex===e.columnIndex);if(t)switch(t.direction){case"ASC":this.removeSortColumn(e);break;case"DESC":t.direction="ASC";break;case"UNSET":t.direction="DESC";break}}setSortColumns(e){this._sortedColumns=[...e.map(t=>h({},t))]}removeSortColumn(e){typeof e=="number"?this._sortedColumns.splice(e,1):this._sortedColumns.splice(this._sortedColumns.indexOf(e),1),this._updateSortNumbers()}isSortColumn(e){return typeof e=="number"?this._sortedColumns.some(t=>t.columnIndex===e):this._sortedColumns.includes(e)}clearMultiSort(){this._sortedColumns=[]}getSortColumn(e){return this._sortedColumns.find(t=>t.columnIndex===e)}_updateSortNumbers(){this._sortedColumns.every(e=>typeof e.sortOrder=="number")&&this._sortedColumns.sort((e,t)=>e.sortOrder-t.sortOrder),this._sortedColumns.forEach((e,t)=>e.sortOrder=t+1)}};var P=class{constructor(e,t=!1){this.data=e;this.selected=t}};var z=class{constructor(e){this._adapter=e;this._tableRows=[];this._data=[];this._columnConfigurations=[];this._select=!1;this._multiselect=!0;this._dense=!1;this._roomy=!1;this._filter=!1;this._fixedHeaders=!1;this._layoutType=s.strings.DEFAULT_LAYOUT_TYPE;this._wrapContent=!0;this._resizable=!1;this._minResizeWidth=s.numbers.MIN_RESIZE_WIDTH;this._multiColumnSort=!1;this._selectCheckboxAlignment="center";this._isAllSelected=!1;this._sortedColumnIndex=-1;this._rendered=!1;this._allowRowClick=!1;this._multiSortManager=new k;this._rowClickListener=t=>this._onRowClick(t),this._rowDoubleClickListener=t=>this._onRowDoubleClick(t),this._selectRowListener=t=>this._onRowSelected(t),this._selectAllListener=t=>this._onSelectAll(t),this._headRowMouseDownListener=t=>this._onHeadRowMouseDown(t),this._headRowContextMenuListener=t=>this._onHeadRowContextMenu(t),this._documentMouseMoveListener=t=>this._onMouseMove(t),this._documentMouseUpListener=t=>this._onMouseUp(t),this._filterListener=(t,l)=>this._onFilter(t,l),this._selectionManager=new w(this._selectKey),this._hiddenColumnManager=new w}initialize(){this.connect(),this._adapter.setHostAttribute(s.attributes.SELECT,this._select.toString()),this._adapter.setHostAttribute(s.attributes.MULTISELECT,this._multiselect.toString()),this._adapter.setHostAttribute(s.attributes.DENSE,this._dense.toString()),this._adapter.setHostAttribute(s.attributes.ROOMY,this._roomy.toString()),this._adapter.setHostAttribute(s.attributes.FILTER,this._filter.toString()),this._adapter.emitHostEvent(s.events.INITIALIZED,void 0,!1)}connect(){this._adapter.initialize()}disconnect(){this._resizeDescriptor=void 0,this._adapter.removeDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.removeDocumentListener("mouseup",this._documentMouseUpListener)}set data(e){Array.isArray(e)&&e.length>0?g(e[0])?this._data=e.map(t=>h({},t)):this._data=[...e]:this._data=[],this._tableRows=this._data.map(t=>new P(t,this._selectionManager.exists(t))),this._renderBody()}get data(){return JSON.parse(JSON.stringify(this._data))}set columnConfigurations(e){this._columnConfigurations=e.map(t=>h({},t)),this._hiddenColumnManager.clear(),this._columnConfigurations.forEach(t=>{t.hidden&&this._hiddenColumnManager.add(t)}),this._refreshTableSort(),this.render()}get columnConfigurations(){return this._columnConfigurations.map(e=>h({},e))}get _visibleColumnConfigurations(){return this._columnConfigurations.filter(e=>!this._hiddenColumnManager.exists(e))}get _tableConfiguration(){return{tableElement:this._adapter.getTableElement(),columnConfigurations:this._visibleColumnConfigurations,data:this._tableRows,clickListener:this._allowRowClick?this._rowClickListener:null,doubleClickListener:this._allowRowClick?this._rowDoubleClickListener:null,selectListener:this._select?this._selectRowListener:null,selectAllListener:this._multiselect?this._selectAllListener:null,headRowMouseDownListener:this._headRowMouseDownListener,headRowContextMenuListener:this._headRowContextMenuListener,filterListener:this._filter?this._filterListener:null,sortDirection:this._sortDirection,sortedColumn:this._sortedColumnIndex,multiColumnSort:this._multiColumnSort,filter:this._filter,wrapContent:this._wrapContent,fixedHeaders:this._fixedHeaders,layoutType:this._layoutType,dense:this._dense,resizable:this._resizable,rowCreatedCallback:this._rowCreatedCallback,cellCreatedCallback:this._cellCreatedCallback,selectAllTemplate:this._selectAllTemplate,selectCheckboxAlignment:this._selectCheckboxAlignment,tooltipSelect:this._tooltipSelect,tooltipSelectAll:this._tooltipSelectAll}}set select(e){this._select!==e&&(this._select=e,this._adapter.setSelectColumnVisibility(this._adapter.getTableElement(),this._select,this._selectRowListener,this._multiselect?this._selectAllListener:void 0,this._multiselect?this._selectAllTemplate:null,this._selectCheckboxAlignment,this._tableRows,this._tooltipSelect,this._tooltipSelectAll),this._updateSelections(!0),this._select?this._adapter.setHostAttribute(s.attributes.SELECT,this._select.toString()):this._adapter.removeHostAttribute(s.attributes.SELECT))}get select(){return this._select}set multiselect(e){this._multiselect!==e&&(this._multiselect=e,this._select&&(this._adapter.setSelectAllVisibility(this._adapter.getTableElement(),this._multiselect,this._multiselect?this._selectAllListener:null,this._multiselect?this.selectAllTemplate:null,this._selectCheckboxAlignment,this._tooltipSelectAll),this._updateSelections(!0)),this._adapter.setHostAttribute(s.attributes.MULTISELECT,this._multiselect.toString()))}get multiselect(){return this._multiselect}get selectKey(){return Array.isArray(this._selectKey)?[...this._selectKey]:this._selectKey}set selectKey(e){this._originalSelectKey!==e&&(Array.isArray(e)?(this._originalSelectKey=[...e],this._selectKey=[...e]):(this._originalSelectKey=e,this._selectKey=[e]),this._selectionManager.setKey(this._selectKey),this._updateSelections(!1))}get dense(){return this._dense}set dense(e){this._dense!==e&&(this._dense=e,this._adapter.setDense(this._adapter.getTableElement(),this._dense),this._adapter.setHostAttribute(s.attributes.DENSE,this._dense.toString()))}get roomy(){return this._roomy}set roomy(e){e!==this._roomy&&(this._roomy=e,this._applyRoomy())}set filter(e){this._filter!==e&&(this._filter=e,this._adapter.setFilterRow(this._tableConfiguration),this._adapter.setHostAttribute(s.attributes.FILTER,this._filter.toString()))}get filter(){return this._filter}set fixedHeaders(e){this._fixedHeaders!==e&&(this._fixedHeaders=e,this._adapter.setFixedHeaders(this._tableConfiguration))}get fixedHeaders(){return this._fixedHeaders}get layoutType(){return this._layoutType}set layoutType(e){this._layoutType!==e&&(this._layoutType=e,this._adapter.setTableLayoutType(this._tableConfiguration))}get wrapContent(){return this._wrapContent}set wrapContent(e){this._wrapContent!==e&&(this._wrapContent=e,this._adapter.setWrapContentState(this._tableConfiguration))}get resizable(){return this._resizable}set resizable(e){this._resizable!==e&&(this._resizable=e,this._adapter.setResizable(this._tableConfiguration))}get minResizeWidth(){return this._minResizeWidth}set minResizeWidth(e){this._minResizeWidth!==e&&(this._minResizeWidth=e,I(this._minResizeWidth)?this._minResizeWidth<0&&(this._minResizeWidth=0):this._minResizeWidth=s.numbers.MIN_RESIZE_WIDTH)}get allowRowClick(){return this._allowRowClick}set allowRowClick(e){this._allowRowClick!==e&&(this._allowRowClick=e,this._rendered&&(this._adapter.setRowClickListeners(this._adapter.getTableElement(),this._allowRowClick,this._rowClickListener,this._rowDoubleClickListener),this._adapter.setRowClickAttributes(this._adapter.getTableElement(),this._allowRowClick)))}get multiColumnSort(){return this._multiColumnSort}set multiColumnSort(e){e!==this._multiColumnSort&&(this._multiColumnSort=e,this._refreshTableSort(),this.render())}get selectCheckboxAlignment(){return this._selectCheckboxAlignment}set selectCheckboxAlignment(e){e!==this._selectCheckboxAlignment&&(this._selectCheckboxAlignment=e,this._adapter.setHostAttribute(s.attributes.SELECT_CHECKBOX_ALIGNMENT,e),this.render())}get tooltipSelect(){return this._tooltipSelect}set tooltipSelect(e){e!==this._tooltipSelect&&(this._tooltipSelect=e,typeof e=="string"&&this._adapter.setHostAttribute(s.attributes.TOOLTIP_SELECT,e),this.render())}get tooltipSelectAll(){return this._tooltipSelectAll}set tooltipSelectAll(e){e!==this._tooltipSelectAll&&(this._tooltipSelectAll=e,this._adapter.setHostAttribute(s.attributes.TOOLTIP_SELECT_ALL,e),this.render())}get selectAllTemplate(){return this._selectAllTemplate}set selectAllTemplate(e){e!==this._selectAllTemplate&&(this._selectAllTemplate=e,this.render())}get rowCreated(){return this._rowCreatedCallback}set rowCreated(e){this._rowCreatedCallback=e}get cellCreated(){return this._cellCreatedCallback}set cellCreated(e){this._cellCreatedCallback=e}isRowSelected(e){let t=v(Array.isArray(this._selectKey)?this._selectKey:[this._selectKey],e);return this.selectKey?!!this._selectionManager.getItems().find(l=>K(l,t)):this._selectionManager.exists(e)}getSelectedRows(){return this._selectionManager.getItems()}selectRows(e,t){if(!this._selectKey)throw new Error("You must set a selectKey to select rows.");(!this._multiselect||t)&&this.clearSelections(),e&&e.length&&(this._selectionManager.add(e),this._updateSelections(!t))}deselectRows(e){e&&e.length&&(this._selectionManager.remove(e),this._updateSelections(!1))}clearSelections(){let e=this._adapter.getTableElement();this._selectionManager.clear(),this._tableRows.forEach(t=>t.selected=!1),this._isAllSelected=!1,this._adapter.clearSelectedRows(e),this._select&&this._multiselect&&this._adapter.updateSelectAllState(e,!1)}hideColumn(e){let t=this._columnConfigurations[e];this._sortedColumnIndex===e&&(this._sortedColumnIndex=-1),this._hiddenColumnManager.exists(t)||(this._hiddenColumnManager.add(t),this.render())}showColumn(e){let t=this._columnConfigurations[e];this._hiddenColumnManager.exists(t)&&(this._hiddenColumnManager.remove(t),this.render())}isColumnHidden(e){let t=this._columnConfigurations[e];return!!t&&this._hiddenColumnManager.exists(t)}render(){this._adapter.createTable(this._tableConfiguration),this._renderSelections(),this._rendered=!0}_renderBody(){this._rendered&&(this._adapter.recreateTableBody(this._tableConfiguration),this._renderSelections())}_renderSelections(){this.select&&(this._isAllSelected=this._getSelectAllState(),this._multiselect&&this._adapter.updateSelectAllState(this._adapter.getTableElement(),this._isAllSelected,this._isIndeterminate(this._isAllSelected)));let e=this._selectionManager.getItems();e.length&&this._adapter.setSelectedRows(this._adapter.getTableElement(),this._selectKey,this._data,e,!1)}expandRow(e,t){if(!this._rendered)throw new Error("Cannot expand a row before the table has rendered.");if(e<0||e>this._tableRows.length)throw new Error(`Invalid row index: ${e}.`);return this._adapter.expandRow(this._tableConfiguration,e,t)}collapseRow(e){return!this._rendered||e<0||e>this._tableRows.length?Promise.resolve():this._adapter.collapseRow(this._tableConfiguration,e)}isRowExpanded(e){return this._adapter.isRowExpanded(this._tableConfiguration,e)}selectRowsByIndex(e,t){let l=e.map(i=>this._data[i]).filter(i=>!!i);this.selectRows(l,!t)}deselectRowsByIndex(e){let t=e.map(l=>this._data[l]).filter(l=>!!l);this.deselectRows(t)}_getSelectAllState(){return this._tableRows.length>0&&this._tableRows.every(e=>e.selected)}_updateSelections(e){this._tableRows.forEach(l=>l.selected=this._selectionManager.exists(l.data));let t=this._getSelectAllState();this._adapter.setSelectedRows(this._adapter.getTableElement(),this._selectKey,this._data,this._selectionManager.getItems(),e),(t!==this._isAllSelected||this._isIndeterminate(t))&&(this._isAllSelected=t,this._multiselect&&this._adapter.updateSelectAllState(this._adapter.getTableElement(),this._isAllSelected,this._isIndeterminate(this._isAllSelected)))}_onRowClick(e){if(e.stopImmediatePropagation(),e.target.tagName==="INPUT"&&e.target.type==="checkbox")return;let i=H(e).filter(m=>m.nodeType===1).find(m=>m.hasAttribute(s.attributes.CUSTOM_CELL_TEMPLATE));if(i&&i.hasAttribute(s.attributes.CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION))return;let{index:a,data:r}=this._getSelectedRowFromEvent(e),c={index:a,data:r};this._adapter.emitHostEvent(s.events.ROW_CLICK,c,!0,!1)}_onRowDoubleClick(e){if(e.stopPropagation(),e.target.tagName==="INPUT"&&e.target.type==="checkbox")return;let t=this._getSelectedRowFromEvent(e),l={index:t.index,data:t.data};this._adapter.emitHostEvent(s.events.SELECT_DOUBLE,l,!0,!1)}_onRowSelected(e){let t=this._getSelectedRowFromEvent(e);this._multiselect||this._tableRows.filter(r=>r.selected).forEach(r=>{K(r.data,v(this._selectKey,t.data))||this.deselectRows([r.data])});let l=!this._selectionManager.exists(t.data);this._adapter.updateSelectedState(t.rowElement,l),l?this._selectionManager.add(t.data):this._selectionManager.remove(t.data),this._tableRows[t.index].selected=l;let i=[t.index],o=!1;if(this._multiselect){if(e.shiftKey&&this._previouslyClickedRow&&(i=this._shiftSelectRows(t),i.includes(this._previouslyClickedRow.index))){let r=i.indexOf(this._previouslyClickedRow.index);i.splice(r,1)}o=this._getSelectAllState(),this._adapter.updateSelectAllState(this._adapter.getTableElement(),o,this._isIndeterminate(o))}for(let a of i){let r=this._tableRows[a].data,m={selected:this._selectionManager.exists(r),index:a,data:r};this._adapter.emitHostEvent(s.events.SELECT,m,!0,!1)}if(this._isAllSelected!==o){this._isAllSelected=o;let a={status:this._isAllSelected,count:this._tableRows.filter(r=>r.selected).length,data:[...this._data],targetType:"row"};this._adapter.emitHostEvent(s.events.SELECT_ALL,a,!0,!1)}this._previouslyClickedRow=h({},t)}_getSelectedRowFromEvent(e){let l=H(e).find(r=>r.tagName==="TR"),i=l.parentElement,o=this._getNonExpandedRows(i).findIndex(r=>r===l),a=this._tableRows[o].data;return{rowElement:l,index:o,data:a}}_getNonExpandedRows(e){return Array.from(e.rows).filter(t=>!t.classList.contains(s.classes.TABLE_ROW_EXPANDABLE_CONTENT))}_onSelectAll(e){e.stopPropagation(),this._isAllSelected=!this._isAllSelected;let t=this._adapter.getTableElement();this._adapter.updateSelectAllState(t,this._isAllSelected),this._tableRows.forEach((i,o)=>{i.selected=this._isAllSelected,this._isAllSelected?this._selectionManager.add(i.data):this._selectionManager.remove(i.data);let a=b.getRowByIndex(t,o);a&&this._adapter.updateSelectedState(a,this._isAllSelected)});let l={status:this._isAllSelected,count:this._tableRows.filter(i=>i.selected).length,data:[...this._data],targetType:"select-all"};this._adapter.emitHostEvent(s.events.SELECT_ALL,l,!0,!1)}_onHeadRowContextMenu(e){e.preventDefault()}_onHeadRowMouseDown(e){if(e.button!==0)return;let t=H(e),l=e.target,i=t.find(r=>r.tagName==="TR"),o=t.find(r=>r.tagName==="TH"),a=Array.from(i.cells).findIndex(r=>r===o);this._headCellMouseDownIndex=a,l!==o&&l.classList.contains(s.classes.TABLE_RESIZE_HANDLE)&&(this._resizeDescriptor={element:o,startWidth:o.offsetWidth,startX:e.pageX,width:o.offsetWidth,index:this._select?a-1:a},this._adapter.addDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.setResizeColumnVisibility(this._tableConfiguration,a,!0)),this._adapter.addDocumentListener("mouseup",this._documentMouseUpListener)}_onMouseMove(e){if(this._resizeDescriptor){let t=this._resizeDescriptor.startWidth+(e.pageX-this._resizeDescriptor.startX);t<this._minResizeWidth&&(t=this._minResizeWidth),this._resizeDescriptor.width=t,this._resizeDescriptor.element.style.width=`${t}px`,this._adapter.addTableClass(s.classes.TABLE_RESIZING)}}_onMouseUp(e){if(this._adapter.removeDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.removeDocumentListener("mouseup",this._documentMouseUpListener),this._adapter.removeTableClass(s.classes.TABLE_RESIZING),this._headCellMouseDownIndex!==void 0){if(this._resizeDescriptor){this._adapter.normalizeColumnWidths(this._tableConfiguration),this._adapter.setResizeColumnVisibility(this._tableConfiguration,this._headCellMouseDownIndex,!1);let t={index:this._resizeDescriptor.index,width:this._resizeDescriptor.width};this._adapter.emitHostEvent(s.events.COLUMN_RESIZE,t),this._resizeDescriptor=void 0}else this._tableConfiguration.tableElement.tHead.contains(e.target)&&(this._multiColumnSort?this._onMultiSort(this._headCellMouseDownIndex,e.ctrlKey):this._onSort(this._headCellMouseDownIndex));this._headCellMouseDownIndex=void 0}}_onSort(e){let t=this._select?e-1:e,l=t>=0?this._visibleColumnConfigurations[t]:null;if(!l||!l.sortable)return;let i="ASC",o=t===this._sortedColumnIndex,a=this._sortDirection==="ASC"||this._sortDirection===void 0,r=o&&this._sortDirection==="DESC";o&&a&&(i="DESC"),r&&!l.preventUnsort&&(i="UNSET");let c={direction:i,columnIndex:t};if(this._adapter.emitHostEvent(s.events.SORT,c,!0,!0)){if(o&&this._sortDirection==="DESC"&&!l.preventUnsort){this._adapter.removeColumnSort(this._adapter.getTableElement(),this._select?this._sortedColumnIndex+1:this._sortedColumnIndex),this._sortedColumnIndex=-1;return}this._sortDirection=i,t===this._sortedColumnIndex?this._adapter.setSortDirection(this._adapter.getTableElement(),e,this._sortDirection):(this._sortedColumnIndex>=0&&this._adapter.removeColumnSort(this._adapter.getTableElement(),this._select?this._sortedColumnIndex+1:this._sortedColumnIndex),this._sortedColumnIndex=t,this._adapter.setSortedColumn(this._adapter.getTableElement(),e,this._sortDirection))}}_onMultiSort(e,t){let l=this._select?e-1:e,i=l>=0?this._visibleColumnConfigurations[l]:null;if(!i||!i.sortable)return;let o=this._multiSortManager.sortedColumns,a=this._multiSortManager.getSortColumn(l);a?this._multiSortManager.updateSortColumn(a):t?this._multiSortManager.addSortColumn({direction:"DESC",columnIndex:l,propertyName:i.property}):(this._multiSortManager.clearMultiSort(),this._multiSortManager.addSortColumn({direction:"DESC",columnIndex:l,propertyName:i.property}));let r=this._multiSortManager.sortedColumns.map(d=>h({},d));if(!this._adapter.emitHostEvent(s.events.SORT,r,!0,!0)){this._multiSortManager.setSortColumns(o);return}let m=this._multiSortManager.sortedColumns.length>1;for(let d=0;d<this._visibleColumnConfigurations.length;d++){let u=this._select?d+1:d;if(!this._multiSortManager.isSortColumn(d))this._adapter.removeColumnSort(this._adapter.getTableElement(),u),b.setMultiSortColumnSortNumber(this._adapter.getTableElement(),m,u,null);else{let C=this._multiSortManager.getSortColumn(d);C&&(this._adapter.setSortedColumn(this._adapter.getTableElement(),u,C.direction),b.setMultiSortColumnSortNumber(this._adapter.getTableElement(),m,u,C.sortOrder||null))}}}_onFilter(e,t){let l={value:e,columnIndex:t};this._adapter.emitHostEvent(s.events.FILTER,l,!0,!1)}_shiftSelectRows(e){let t=[];if(this._previouslyClickedRow){let l=this._previouslyClickedRow.index,i=e.index,o=i>=l?l:i,a=i>=l?i:l;a+=a>o?1:0,o+=o>a?1:0;let r=d=>this.selectRows(d,!1),c=this._tableRows.find(d=>d.selected&&d.data===e.data),m=this._tableRows.find(d=>{var u;return d.data===((u=this._previouslyClickedRow)==null?void 0:u.data)&&!d.selected});(!c||m)&&(r=d=>this.deselectRows(d));for(let d=o;d<a;d++)t.push(d);r(this.data.filter((d,u)=>t.includes(u)))}return t}_isIndeterminate(e){return!e&&this.getSelectedRows().length>0&&this._data.length!==this.getSelectedRows().length}_applyRoomy(){this._adapter.setRoomy(this._adapter.getTableElement(),this._roomy),this._adapter.setHostAttribute(s.attributes.ROOMY,this._roomy.toString())}_refreshTableSort(){if(this._sortedColumnIndex=this._visibleColumnConfigurations.findIndex(e=>e.initialSort),this._sortDirection=this._sortedColumnIndex>=0?this._visibleColumnConfigurations[this._sortedColumnIndex].sortDirection:void 0,this._multiColumnSort){let e=[];this._visibleColumnConfigurations.forEach((t,l)=>{typeof t.initialSort=="object"&&e.push({columnIndex:l,direction:t.initialSort.direction,sortOrder:t.initialSort.sortOrder,propertyName:t.property})}),this._multiSortManager.setSortColumns(e)}}};var E=class extends J{constructor(){super();se.define(te),this._foundation=new z(new N(this))}static get observedAttributes(){return[s.attributes.SELECT,s.attributes.MULTISELECT,s.attributes.SELECT_KEY,s.attributes.DENSE,s.attributes.ROOMY,s.attributes.FILTER,s.attributes.FIXED_HEADERS,s.attributes.LAYOUT_TYPE,s.attributes.WRAP_CONTENT,s.attributes.RESIZABLE,s.attributes.MIN_RESIZE_WIDTH,s.attributes.ALLOW_ROW_CLICK,s.attributes.MULTI_COLUMN_SORT,s.attributes.SELECT_CHECKBOX_ALIGNMENT,s.attributes.TOOLTIP_SELECT,s.attributes.TOOLTIP_SELECT_ALL]}initializedCallback(){this._foundation.initialize()}connectedCallback(){this._foundation.connect()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,l,i){switch(t){case s.attributes.SELECT:this.select=L(i);break;case s.attributes.MULTISELECT:this.multiselect=L(i);break;case s.attributes.SELECT_KEY:this.selectKey=i;break;case s.attributes.DENSE:this.dense=L(i);break;case s.attributes.ROOMY:this.roomy=L(i);break;case s.attributes.FILTER:this.filter=L(i);break;case s.attributes.FIXED_HEADERS:this.fixedHeaders=L(i);break;case s.attributes.LAYOUT_TYPE:this.layoutType=i;break;case s.attributes.WRAP_CONTENT:this.wrapContent=L(i);break;case s.attributes.RESIZABLE:this.resizable=L(i);break;case s.attributes.MIN_RESIZE_WIDTH:this.minResizeWidth=G(i);break;case s.attributes.ALLOW_ROW_CLICK:this.allowRowClick=L(i);break;case s.attributes.MULTI_COLUMN_SORT:this.multiColumnSort=L(i);break;case s.attributes.SELECT_CHECKBOX_ALIGNMENT:this.selectCheckboxAlignment=this.getAttribute(s.attributes.SELECT_CHECKBOX_ALIGNMENT)||"center";break;case s.attributes.TOOLTIP_SELECT:this.tooltipSelect=i;break;case s.attributes.TOOLTIP_SELECT_ALL:this.tooltipSelectAll=i;break}}hideColumn(t){this._foundation.hideColumn(t)}showColumn(t){this._foundation.showColumn(t)}isColumnHidden(t){return this._foundation.isColumnHidden(t)}getSelectedRows(){return this._foundation.getSelectedRows()}selectRow(t){this._foundation.selectRows([t],!1)}selectRows(t,l=!1){this._foundation.selectRows(t,!l)}deselectRow(t){this._foundation.deselectRows([t])}deselectRows(t){this._foundation.deselectRows(t)}clearSelections(){this._foundation.clearSelections()}render(){this._foundation.render()}expandRow(t,l){return this._foundation.expandRow(t,l)}collapseRow(t){return this._foundation.collapseRow(t)}isRowExpanded(t){return this._foundation.isRowExpanded(t)}selectRowsByIndex(t,l){typeof t=="number"?this._foundation.selectRowsByIndex([t],l):Array.isArray(t)&&this._foundation.selectRowsByIndex(t,l)}deselectRowsByIndex(t){typeof t=="number"?this._foundation.deselectRowsByIndex([t]):Array.isArray(t)&&this._foundation.deselectRowsByIndex(t)}isRowSelected(t){return this._foundation.isRowSelected(t)}};_([T()],E.prototype,"data",2),_([T()],E.prototype,"columnConfigurations",2),_([T()],E.prototype,"select",2),_([T()],E.prototype,"multiselect",2),_([T()],E.prototype,"selectKey",2),_([T()],E.prototype,"tooltipSelect",2),_([T()],E.prototype,"tooltipSelectAll",2),_([T()],E.prototype,"dense",2),_([T()],E.prototype,"roomy",2),_([T()],E.prototype,"filter",2),_([T()],E.prototype,"fixedHeaders",2),_([T()],E.prototype,"layoutType",2),_([T()],E.prototype,"wrapContent",2),_([T()],E.prototype,"resizable",2),_([T()],E.prototype,"minResizeWidth",2),_([T()],E.prototype,"allowRowClick",2),_([T()],E.prototype,"multiColumnSort",2),_([T()],E.prototype,"rowCreated",2),_([T()],E.prototype,"cellCreated",2),_([T()],E.prototype,"selectAllTemplate",2),_([T()],E.prototype,"selectCheckboxAlignment",2),E=_([j({name:s.elementName,dependencies:[ae,oe,ce]})],E);function pl(){q(E)}export{s as a,B as b,O as c,Le as d,N as e,P as f,z as g,E as h,pl as i};
|
|
7
|
+
//# sourceMappingURL=chunk.Q6ELPSPD.js.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{d as z}from"./chunk.F6CILMKB.js";import{C as R,e as S,i as L,q as T,x as P}from"./chunk.MZLPUI6R.js";import{d as O,l as D}from"./chunk.T64UW37U.js";import{b as v,c as X}from"./chunk.ELENDYRJ.js";import{a as s}from"./chunk.NVUMRW44.js";import{a as A}from"./chunk.TKDMM2ZZ.js";import{a as C,b as w}from"./chunk.55FCNVG5.js";import{a as I,e as k,g as h,l as N}from"./chunk.QH2GB3PD.js";import{f as d,t as c,u}from"./chunk.CFDK4RCW.js";import{k as p,l as y}from"./chunk.J2M2MXP2.js";import{a as x,b as E,d as n}from"./chunk.M3QDAYD2.js";var f=`${w}step`,l={STEP:"forge-step",STEP_CONTAINER:"forge-step__container",ERROR:"forge-step--error",SELECTED:"forge-step--selected",COMPLETED:"forge-step--completed",EDITABLE:"forge-step--editable",ALTERNATIVE:"forge-step--alternative",ICON_CONTENT:"forge-step-icon-content",ICON:"forge-step-icon",LABEL_CONTAINER:"forge-step-label-container",LABEL:"forge-step-label",OPTIONAL_LABEL:"forge-step-optional-label",INDEX:"forge-step-index",CLUSTERED:"forge-step--clustered",DISABLED:"forge-step--disabled",VERTICAL:"forge-step--vertical",EXPANDED:"forge-step--expanded",EXPANDABLE:"forge-step--expandable",EXPANSION_PANEL:"forge-step__expansion-panel",EXPANSION_ICON:"forge-step__expanded-icon",EXPANSION_ICON_EXPANDED:"forge-step__expanded-icon--expanded",EXPANSION_CONTENT:"forge-step__expansion-content"},F={SELECTED:"selected",INDEX:"index",EDITABLE:"editable",COMPLETED:"completed",ERROR:"error",ALTERNATIVE:"alternative",FIRST:"first",LAST:"last",ARIA_SELECTED:"aria-selected",CLUSTERED:"clustered",DISABLED:"disabled",VERTICAL:"vertical",EXPANDED:"expanded",EXPANDABLE:"expandable",IGNORE_USER_EXPANSION:"ignore-user-expansion"},M={STEP:`.${l.STEP}`,STEP_CONTAINER:`.${l.STEP_CONTAINER}`,INDEX:`.${l.INDEX}`,ICON:`.${l.ICON}`,ICON_CONTENT:`.${l.ICON_CONTENT}`,EXPANSION_SLOT:'slot[name="expansion-content"]',EXPANSION_PANEL:`.${l.EXPANSION_PANEL}`,EXPANSION_ICON:`.${l.EXPANSION_ICON}`},H={ARROW_LEFT_KEY:"ArrowLeft",ARROW_RIGHT_KEY:"ArrowRight",ARROW_UP_KEY:"ArrowUp",ARROW_DOWN_KEY:"ArrowDown",END_KEY:"End",ENTER_KEY:"Enter",HOME_KEY:"Home",SPACE_KEY:"Space",EXPANSION_CONTENT_SLOT_NAME:"expansion-content"},B={SELECT:`${f}-select`,EXPANDED_CONTENT_FOCUSIN:`${f}-expanded-content-focusin`,EXPANDED_CONTENT_FOCUSOUT:`${f}-expanded-content-focusout`},t={elementName:f,classes:l,selectors:M,attributes:F,events:B,strings:H};var m=class extends A{constructor(e){super(e);this.unbounded=!1;this._buttonElement=h(e,t.selectors.STEP),this._container=h(e,t.selectors.STEP_CONTAINER)}get root(){return this._buttonElement}get disabled(){return this._buttonElement.disabled}get component(){return this._component}setRootTabIndex(e){this._buttonElement.tabIndex=e}initialize(){this._component.setAttribute("role","tab")}attachRipple(){this._rippleInstance=this.initializeRipple()}detatchRipple(){this._rippleInstance&&this._rippleInstance.destroy()}initializeRipple(){return this._createRipple()}setIndex(e){this._buttonElement.querySelector(t.selectors.INDEX).innerHTML=(e+1||"").toString()}toggleRootClass(e,r){c(this._buttonElement,r,e)}setRootAttribute(e,r){this._buttonElement.setAttribute(e,r)}focusButton(){this._buttonElement.focus()}toggleDisabled(e){c(this._buttonElement,e,t.classes.DISABLED),u(this._buttonElement,e,"aria-disabled"),this._buttonElement.disabled=e}toggleIcon(e,r){let a=this._buttonElement.querySelector(t.selectors.INDEX),g=this._buttonElement.querySelector(t.selectors.ICON);if(!r){a.style.display="inherit",g.style.display="none";return}a.style.display="none",g.style.display="inherit",g.name=e}slotHasContent(){return this._expansionSlot.assignedElements({flatten:!0}).length>0}setClickListener(e){this._buttonElement.addEventListener("click",e)}removeClickListener(e){this._buttonElement.removeEventListener("click",e)}setSlotListener(e){this._expansionSlot.addEventListener("slotchange",e)}removeSlotListener(e){this._expansionSlot&&this._expansionSlot.removeEventListener("slotchange",e)}setExpanded(e){this._expansionPanel&&(this._expansionPanel.open=e,u(this._expansionPanel,!e,"tabindex","-1")),c(this._buttonElement,e,t.classes.EXPANDED)}setExpansionPanelAnimations(e){this._expansionPanel.useAnimations=e}addExpansionPanel(){this._container.querySelector(t.selectors.EXPANSION_PANEL)||(this._expansionPanel=this._container.appendChild(this._createExpansionPanel()),this._expansionSlot=this._expansionPanel.querySelector(t.selectors.EXPANSION_SLOT))}removeExpansionPanel(){let e=this._container.querySelector(t.selectors.EXPANSION_PANEL);e&&this._container.removeChild(e)}addExpansionIcon(){this._buttonElement.querySelector(t.selectors.EXPANSION_ICON)||this._buttonElement.appendChild(this._createExpansionIcon())}removeExpansionIcon(){let e=this._buttonElement.querySelector(t.selectors.EXPANSION_ICON);e&&this._buttonElement.removeChild(e)}addExpansionPanelListener(e,r){this._expansionPanel.addEventListener(e,r)}removeExpansionPanelListener(e,r){this._expansionPanel&&this._expansionPanel.removeEventListener(e,r)}isExpandedContentInFocus(e){return this._expansionSlot.assignedElements().some(r=>r.contains(e||document.activeElement))}_createRipple(){let e=E(x({},v.createAdapter(this)),{isSurfaceDisabled:()=>this._buttonElement.disabled});return new v(this._buttonElement,new X(e))}_createExpansionPanel(){let e=document.createElement("forge-expansion-panel");e.useAnimations=!1,e.setAttribute("part","expansion-panel"),d(t.classes.EXPANSION_PANEL,e);let r=document.createElement("slot");return r.setAttribute("name","expansion-content"),d(t.classes.EXPANSION_CONTENT,r),e.appendChild(r),e}_createExpansionIcon(){let e=document.createElement("forge-icon");return d(t.classes.EXPANSION_ICON,e),e.name="keyboard_arrow_down",e.setAttribute("part","expanded-icon"),e}};var b=class{constructor(o){this._adapter=o;this._clickListener=()=>this._onClickListener(),this._expansionContentSlotChangeListener=e=>this._onExpansionContentSlotChange(e),this._expansionContentFocusInListener=e=>this._onExpansionContentFocusIn(e),this._expansionContentFocusOutListener=e=>this._onExpansionContentFocusOut(e)}initialize(){this._adapter.initialize(),this._adapter.attachRipple(),this._applySelected(),this._toggleIcon(),this._vertical&&(this._adapter.addExpansionPanel(),this._adapter.addExpansionIcon(),this._adapter.setClickListener(this._clickListener),this._adapter.setSlotListener(this._expansionContentSlotChangeListener),this._adapter.addExpansionPanelListener("focusin",this._expansionContentFocusInListener),this._adapter.addExpansionPanelListener("focusout",this._expansionContentFocusOutListener)),this._initialized=!0}disconnect(){this._adapter.detatchRipple(),this._adapter.removeClickListener(this._clickListener),this._adapter.removeSlotListener(this._expansionContentSlotChangeListener),this._adapter.removeExpansionPanelListener("focusin",this._onExpansionContentFocusIn),this._adapter.removeExpansionPanelListener("focusout",this._onExpansionContentFocusOut)}get index(){return this._index}set index(o){this._index!==o&&(this._index=o,this._applyIndex(),this._adapter.setHostAttribute(t.attributes.INDEX,o.toString()))}get editable(){return this._editable}set editable(o){this._editable!==o&&(this._editable=o,this._adapter.toggleHostAttribute(t.attributes.EDITABLE,o),this._applyEditable())}get completed(){return this._completed}set completed(o){this._completed!==o&&(this._completed=o,this._adapter.toggleHostAttribute(t.attributes.COMPLETED,o),this._applyCompleted())}get error(){return this._error}set error(o){this._error!==o&&(this._error=o,this._adapter.toggleHostAttribute(t.attributes.ERROR,o),this._applyError())}get selected(){return this._selected}set selected(o){this._selected!==o&&(this._selected=o,this._adapter.toggleHostAttribute(t.attributes.SELECTED,o),this._applySelected())}get alternative(){return this._alternative}set alternative(o){this._alternative!==o&&(this._alternative=o,this._adapter.toggleHostAttribute(t.attributes.ALTERNATIVE,o),this._applyAlternative())}get disabled(){return this._disabled}set disabled(o){this._disabled=o,this._applyDisabled()}get vertical(){return this._vertical}set vertical(o){o!==this._vertical&&(this._vertical=o,this._applyVertical(),this._initialized&&(this._vertical?(this._adapter.addExpansionPanel(),this._adapter.addExpansionIcon(),this._adapter.setClickListener(this._clickListener),this._adapter.setSlotListener(this._expansionContentSlotChangeListener)):(this._adapter.removeClickListener(this._clickListener),this._adapter.removeSlotListener(this._expansionContentSlotChangeListener),this._adapter.removeExpansionPanel(),this._adapter.removeExpansionIcon())))}get expanded(){return this._expanded}set expanded(o){o!==this._expanded&&(this._expanded=o,this._adapter.toggleHostAttribute(t.attributes.EXPANDED,this._expanded),this._initialized&&this._applyExpanded())}get ignoreUserExpansion(){return this._ignoreUserExpansion}set ignoreUserExpansion(o){o!==this._ignoreUserExpansion&&(this._ignoreUserExpansion=o)}setStepTabIndex(o){this._adapter.setRootTabIndex(o)}_applyExpanded(){this._adapter.setExpanded(this._expanded)}_applyVertical(){this._adapter.toggleHostAttribute(t.attributes.VERTICAL,this._vertical),this._adapter.toggleRootClass(t.classes.VERTICAL,this._vertical)}focus(){this._adapter.focusButton()}_applyAlternative(){this._adapter.toggleRootClass(t.classes.ALTERNATIVE,this._alternative)}_applySelected(){this._adapter.toggleRootClass(t.classes.SELECTED,this._selected),this._adapter.setHostAttribute(t.attributes.ARIA_SELECTED,(this._selected||!1).toString()),this._adapter.setRootTabIndex(this._selected?0:-1),this._toggleIcon()}_applyIndex(){this._adapter.setIndex(this._index)}_applyEditable(){this._adapter.toggleRootClass(t.classes.EDITABLE,this._editable),this._toggleIcon()}_applyCompleted(){this._adapter.toggleRootClass(t.classes.COMPLETED,this._completed),this._toggleIcon()}_applyError(){this._adapter.toggleRootClass(t.classes.ERROR,this._error),this._toggleIcon()}_applyDisabled(){this._adapter.toggleDisabled(this._disabled),this._toggleIcon()}_getIconState(){return this._error?"warning":this._completed?this._editable?"mode_edit":"check":this._editable&&this._selected&&!this._disabled?"mode_edit":this._disabled?"block":""}_toggleIcon(){this._iconState=this._getIconState(),this._adapter.toggleIcon(this._iconState,this._iconState!=="")}_toggleExpanded(){this._adapter.slotHasContent()&&(this._expanded=!this._expanded,this._applyExpanded(),this._adapter.toggleHostAttribute(t.attributes.EXPANDED,this._expanded))}_onClickListener(){this._vertical&&!this._ignoreUserExpansion&&this._toggleExpanded()}_onExpansionContentSlotChange(o){let e=this._adapter.slotHasContent();e?(this._adapter.setHostAttribute(t.attributes.EXPANDABLE),this._applyExpanded(),this._adapter.setExpansionPanelAnimations(!0)):(this._adapter.removeHostAttribute(t.attributes.EXPANDABLE),this._adapter.setExpansionPanelAnimations(!1)),this._adapter.toggleRootClass(t.classes.EXPANDABLE,e)}_onExpansionContentFocusIn(o){!this._expandedContentFocused&&this._adapter.isExpandedContentInFocus(o.target)&&(this._adapter.emitHostEvent(t.events.EXPANDED_CONTENT_FOCUSIN,this._adapter.component),this._expandedContentFocused=!0)}_onExpansionContentFocusOut(o){o.relatedTarget&&!this._adapter.isExpandedContentInFocus(o.relatedTarget)&&(this._adapter.emitHostEvent(t.events.EXPANDED_CONTENT_FOCUSOUT,this._adapter.component),this._expandedContentFocused=!1)}};var U='<template><div class="forge-step__container" part="root"><button class="forge-step" type="button" part="button"><div class="before" part="before"></div><div class="forge-step__icon-container" part="icon-container"><div class="forge-step-icon-content" part="icon-content"><span class="forge-step-index" part="index"></span><forge-icon class="forge-step-icon" part="icon"></forge-icon></div></div><div class="forge-step__text-container" part="text-container"><div class="forge-step__title" part="title-container"><slot></slot></div><div class="forge-step__subtitle" part="subtitle-container"><slot name="optional"></slot></div></div><div class="after" part="after"></div></button></div></template>',$='@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-step{padding:12px 16px;outline:0;background:0 0;border:none;border-radius:14px;position:relative;display:-webkit-box;display:flex;overflow:hidden;-webkit-box-align:center;align-items:center;z-index:1;--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;cursor:pointer}.forge-step:focus{outline:0}.forge-step::-moz-focus-inner,.forge-step::-moz-focus-outer{padding:0;border:0}.forge-step::after,.forge-step::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.forge-step::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-step::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-step.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-step.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-step.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-step.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-step.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-step::after,.forge-step::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.forge-step.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-step::after,.forge-step::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.forge-step.mdc-ripple-surface--hover::before,.forge-step:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-step.mdc-ripple-upgraded--background-focused::before,.forge-step:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-step:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-step:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-step.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-step--selected::before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity, .08)}.forge-step--selected::after,.forge-step--selected::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-step--selected.mdc-ripple-surface--hover::before,.forge-step--selected:hover::before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity, .12)}.forge-step--selected.mdc-ripple-upgraded--background-focused::before,.forge-step--selected:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-focus-opacity, .2)}.forge-step--selected:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-step--selected:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-press-opacity, .2)}.forge-step--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.forge-step.forge-step--error.forge-step--selected::before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity, .08)}.forge-step.forge-step--error.forge-step--selected::after,.forge-step.forge-step--error.forge-step--selected::before{background-color:#b00020;background-color:var(--mdc-ripple-color,var(--mdc-theme-error,#b00020))}.forge-step.forge-step--error.forge-step--selected.mdc-ripple-surface--hover::before,.forge-step.forge-step--error.forge-step--selected:hover::before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity, .12)}.forge-step.forge-step--error.forge-step--selected.mdc-ripple-upgraded--background-focused::before,.forge-step.forge-step--error.forge-step--selected:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-focus-opacity, .2)}.forge-step.forge-step--error.forge-step--selected:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-step.forge-step--error.forge-step--selected:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-press-opacity, .2)}.forge-step.forge-step--error.forge-step--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.forge-step--selected{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-step--disabled::after,.forge-step--disabled::before{background-color:transparent}.forge-step__container{display:contents}.forge-step__expansion-panel{display:none}.forge-step__expanded-icon{color:#757575;color:var(--forge-theme-icon-color,#757575);display:none;margin-left:auto}.forge-step__title{color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);text-align:left;overflow:hidden;text-overflow:ellipsis}.forge-step__subtitle{text-align:left;overflow:hidden;text-overflow:ellipsis}.forge-step__subtitle ::slotted(*){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit)}.forge-step__icon-container .forge-step-icon-content{border-style:solid;border-width:2px;border-color:transparent;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;border-radius:50%;height:24px;width:24px;font-size:14px;-webkit-transition:background-color .4s cubic-bezier(.25, .8, .25, 1);transition:background-color .4s cubic-bezier(.25, .8, .25, 1);margin:0 8px 0 0;-webkit-box-flex:0;flex:none}.forge-step__icon-container .forge-step-icon-content forge-icon{font-size:14px}.forge-step:not(.forge-step--disabled) .forge-step-icon-content{color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.forge-step--disabled{cursor:not-allowed;color:rgba(0,0,0,.6);color:var(--forge-theme-form-field-text-disabled-on-background,rgba(0,0,0,.6))}.forge-step--disabled.forge-step .forge-step__icon-container .forge-step-icon-content{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));background-color:#f5f5f5;background-color:var(--forge-theme-form-field-disabled-on-background,#f5f5f5)}.forge-step--disabled .forge-step__text-container .forge-step__title{color:rgba(0,0,0,.6);color:var(--forge-theme-form-field-text-disabled-on-background,rgba(0,0,0,.6))}.forge-step--disabled .forge-step__text-container .forge-step__subtitle ::slotted(*){color:rgba(0,0,0,.6);color:var(--forge-theme-form-field-text-disabled-on-background,rgba(0,0,0,.6))}.forge-step--alternative{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.forge-step--alternative .forge-step__icon-container .forge-step-icon-content{margin:0}.forge-step--alternative .forge-step__text-container{margin-top:8px;place-items:center}.forge-step:not(.forge-step--selected):not(.forge-step--disabled).forge-step--editable:not(.forge-step--completed):not(.forge-step--error) .forge-step-icon-content,.forge-step:not(.forge-step--selected):not(.forge-step--disabled):not(.forge-step--editable):not(.forge-step--completed):not(.forge-step--error) .forge-step-icon-content{border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5)}.forge-step:not(.forge-step--selected):not(.forge-step--disabled).forge-step--editable:not(.forge-step--completed):not(.forge-step--error) .forge-step-icon-content .forge-step-index,.forge-step:not(.forge-step--selected):not(.forge-step--disabled):not(.forge-step--editable):not(.forge-step--completed):not(.forge-step--error) .forge-step-icon-content .forge-step-index{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-step--selected.forge-step--disabled .forge-step-icon-content{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));background-color:#f5f5f5;background-color:var(--forge-theme-form-field-disabled-on-background,#f5f5f5)}.forge-step--selected:not(.forge-step--disabled) .forge-step__icon-container .forge-step-icon-content{background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5);color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-step--selected:not(.forge-step--disabled) .forge-step__title{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5);font-weight:500}.forge-step--selected:not(.forge-step--disabled) .forge-step__subtitle ::slotted(*){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5);font-weight:500}.forge-step--error:not(.forge-step--disabled) .forge-step__title{color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-step--error:not(.forge-step--disabled) .forge-step__subtitle ::slotted(*){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-step--error:not(.forge-step--disabled) .forge-step__icon-container .forge-step-icon-content{background-color:#b00020;background-color:var(--mdc-theme-error,#b00020);color:#fff;color:var(--mdc-theme-on-error,#fff)}.forge-step--completed:not(.forge-step--disabled):not(.forge-step--error):not(.forge-step--editable) .forge-step-icon-content{background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5);color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-step--completed:not(.forge-step--disabled):not(.forge-step--error).forge-step--editable .forge-step-icon-content{background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5);color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-step--expandable .forge-step__expanded-icon{display:inline-block;-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.forge-step--expandable.forge-step--expanded .forge-step__expanded-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.forge-step--expandable .forge-step__icon-container .forge-step-icon-content{margin:0 16px 0 0}.forge-step__text-container{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host(:first-child[alternative])::after{align-self:flex-start;top:22px;margin:0}:host(:last-child[alternative])::before{align-self:flex-start;top:22px;margin:0}:host(:not(:first-child):not(:last-child)[alternative])::after,:host(:not(:first-child):not(:last-child)[alternative])::before{align-self:flex-start;top:22px;min-width:7px;margin:0}:host(:not(:last-child)[alternative]) .after{align-self:flex-start;top:22px;position:absolute;width:calc(50% - 18px);left:calc(50% + 18px);height:0;right:0}:host(:not(:last-child)[alternative]) .after::after{content:"";-webkit-box-flex:1;flex:1;flex-basis:0.000000001px;position:absolute;right:0;left:0;min-width:0;width:100%;border-top-color:#e0e0e0;border-top-color:var(--forge-theme-border-color,#e0e0e0);border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px}:host(:not(:first-child)[alternative]) .before{align-self:flex-start;top:22px;position:absolute;left:0;width:calc(50% - 18px);height:0}:host(:not(:first-child)[alternative]) .before::before{content:"";left:0;min-width:0;width:100%;-webkit-box-flex:1;flex:1;flex-basis:0.000000001px;position:absolute;border-top-color:#e0e0e0;border-top-color:var(--forge-theme-border-color,#e0e0e0);border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px}:host(:not(:first-child):not(:last-child)):host(:not([vertical]))::after,:host(:not(:first-child):not(:last-child)):host(:not([vertical]))::before{border-top-color:#e0e0e0;border-top-color:var(--forge-theme-border-color,#e0e0e0);content:"";position:relative;height:0;min-width:10px;-webkit-box-flex:1;flex:1;flex-basis:0.000000001px;border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px;margin:0 -10px}:host(:last-child):host(:not([vertical]))::before{border-top-color:#e0e0e0;border-top-color:var(--forge-theme-border-color,#e0e0e0);content:"";position:relative;height:0;min-width:10px;-webkit-box-flex:1;flex:1;flex-basis:0.000000001px;border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px;margin:0 -10px 0 0}:host(:not(:last-child)):host(:not([vertical]))::after{border-top-color:#e0e0e0;border-top-color:var(--forge-theme-border-color,#e0e0e0);content:"";position:relative;height:0;min-width:10px;-webkit-box-flex:1;flex:1;flex-basis:0.000000001px;border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px;margin:0 0 0 -10px}:host(:focus){outline:0}:host([vertical]){-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}:host([vertical])::after{content:none}:host([vertical])::before{content:none}:host([vertical]) .forge-step{width:100%;border-radius:4px;min-height:52px}:host([vertical]) .forge-step__text-container{white-space:normal}:host([vertical]) .forge-step__icon-container .forge-step-icon-content{margin:0 16px 0 0}:host([vertical][expandable]) .forge-step__expansion-panel{display:block}:host([ignore-user-expansion]) .forge-step__expanded-icon{display:none}forge-expansion-panel::part(root){border-left-style:solid;border-color:#e0e0e0;border-color:var(--forge-theme-border-color,#e0e0e0);border-left-width:1px;border-left-width:var(--forge-step-expansion-panel-border-left-width,1px);margin-left:60px;margin-left:var(--forge-step-expansion-panel-margin-left,60px);margin-top:4px;margin-top:var(--forge-step-expansion-panel-margin-top,4px);margin-bottom:4px;margin-bottom:var(--forge-step-expansion-panel-margin-bottom,4px)}:host(:not(:last-child)[clustered])::after{min-width:25px}:host(:last-child[clustered])::before{min-width:25px}:host(:not(:first-child):not(:last-child)[clustered])::after,:host(:not(:first-child):not(:last-child)[clustered])::before{min-width:25px}:host(:not(:last-child)[safari][alternative])::after{top:24px;margin:0 -5px}:host(:last-child[safari][alternative])::before{top:24px;margin:0 -5px}:host(:not(:first-child):not(:last-child)[safari][alternative])::after,:host(:not(:first-child):not(:last-child)[safari][alternative])::before{top:24px;margin:0 -5px}',i=class extends N{constructor(){super();O.define([P,L,R,S,T]),k(this,U,$),this._foundation=new b(new m(this))}static get observedAttributes(){return[t.attributes.COMPLETED,t.attributes.EDITABLE,t.attributes.ERROR,t.attributes.INDEX,t.attributes.SELECTED,t.attributes.ALTERNATIVE,t.attributes.DISABLED,t.attributes.VERTICAL,t.attributes.EXPANDED,t.attributes.IGNORE_USER_EXPANSION]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,r,a){switch(e){case t.attributes.INDEX:this.index=y(a);break;case t.attributes.COMPLETED:this.completed=p(a);break;case t.attributes.EDITABLE:this.editable=p(a);break;case t.attributes.ERROR:this.error=p(a);break;case t.attributes.SELECTED:this.selected=p(a);break;case t.attributes.ALTERNATIVE:this.alternative=p(a);break;case t.attributes.DISABLED:this.disabled=p(a);break;case t.attributes.VERTICAL:this.vertical=p(a);break;case t.attributes.EXPANDED:this.expanded=p(a);break;case t.attributes.IGNORE_USER_EXPANSION:this.ignoreUserExpansion=p(a);break}}focus(){this._foundation.focus()}setStepTabIndex(e){this._foundation.setStepTabIndex(e)}};n([s()],i.prototype,"alternative",2),n([s()],i.prototype,"index",2),n([s()],i.prototype,"editable",2),n([s()],i.prototype,"completed",2),n([s()],i.prototype,"error",2),n([s()],i.prototype,"selected",2),n([s()],i.prototype,"disabled",2),n([s()],i.prototype,"vertical",2),n([s()],i.prototype,"expanded",2),n([s()],i.prototype,"ignoreUserExpansion",2),i=n([C({name:t.elementName,dependencies:[D,z]})],i);function ve(){I(i)}export{t as a,m as b,b as c,i as d,ve as e};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{d as z}from"./chunk.NSTCCETU.js";import{C as R,e as S,i as L,q as T,x as P}from"./chunk.MZLPUI6R.js";import{d as O,l as D}from"./chunk.T64UW37U.js";import{b as v,c as X}from"./chunk.ELENDYRJ.js";import{a as s}from"./chunk.NVUMRW44.js";import{a as A}from"./chunk.TKDMM2ZZ.js";import{a as C,b as w}from"./chunk.55FCNVG5.js";import{a as I,e as k,g as h,l as N}from"./chunk.QH2GB3PD.js";import{f as d,t as c,u}from"./chunk.CFDK4RCW.js";import{k as p,l as y}from"./chunk.J2M2MXP2.js";import{a as x,b as E,d as n}from"./chunk.M3QDAYD2.js";var f=`${w}step`,l={STEP:"forge-step",STEP_CONTAINER:"forge-step__container",ERROR:"forge-step--error",SELECTED:"forge-step--selected",COMPLETED:"forge-step--completed",EDITABLE:"forge-step--editable",ALTERNATIVE:"forge-step--alternative",ICON_CONTENT:"forge-step-icon-content",ICON:"forge-step-icon",LABEL_CONTAINER:"forge-step-label-container",LABEL:"forge-step-label",OPTIONAL_LABEL:"forge-step-optional-label",INDEX:"forge-step-index",CLUSTERED:"forge-step--clustered",DISABLED:"forge-step--disabled",VERTICAL:"forge-step--vertical",EXPANDED:"forge-step--expanded",EXPANDABLE:"forge-step--expandable",EXPANSION_PANEL:"forge-step__expansion-panel",EXPANSION_ICON:"forge-step__expanded-icon",EXPANSION_ICON_EXPANDED:"forge-step__expanded-icon--expanded",EXPANSION_CONTENT:"forge-step__expansion-content"},F={SELECTED:"selected",INDEX:"index",EDITABLE:"editable",COMPLETED:"completed",ERROR:"error",ALTERNATIVE:"alternative",FIRST:"first",LAST:"last",ARIA_SELECTED:"aria-selected",CLUSTERED:"clustered",DISABLED:"disabled",VERTICAL:"vertical",EXPANDED:"expanded",EXPANDABLE:"expandable",IGNORE_USER_EXPANSION:"ignore-user-expansion"},M={STEP:`.${l.STEP}`,STEP_CONTAINER:`.${l.STEP_CONTAINER}`,INDEX:`.${l.INDEX}`,ICON:`.${l.ICON}`,ICON_CONTENT:`.${l.ICON_CONTENT}`,EXPANSION_SLOT:'slot[name="expansion-content"]',EXPANSION_PANEL:`.${l.EXPANSION_PANEL}`,EXPANSION_ICON:`.${l.EXPANSION_ICON}`},H={ARROW_LEFT_KEY:"ArrowLeft",ARROW_RIGHT_KEY:"ArrowRight",ARROW_UP_KEY:"ArrowUp",ARROW_DOWN_KEY:"ArrowDown",END_KEY:"End",ENTER_KEY:"Enter",HOME_KEY:"Home",SPACE_KEY:"Space",EXPANSION_CONTENT_SLOT_NAME:"expansion-content"},B={SELECT:`${f}-select`,EXPANDED_CONTENT_FOCUSIN:`${f}-expanded-content-focusin`,EXPANDED_CONTENT_FOCUSOUT:`${f}-expanded-content-focusout`},t={elementName:f,classes:l,selectors:M,attributes:F,events:B,strings:H};var m=class extends A{constructor(e){super(e);this.unbounded=!1;this._buttonElement=h(e,t.selectors.STEP),this._container=h(e,t.selectors.STEP_CONTAINER)}get root(){return this._buttonElement}get disabled(){return this._buttonElement.disabled}get component(){return this._component}setRootTabIndex(e){this._buttonElement.tabIndex=e}initialize(){this._component.setAttribute("role","tab")}attachRipple(){this._rippleInstance=this.initializeRipple()}detatchRipple(){this._rippleInstance&&this._rippleInstance.destroy()}initializeRipple(){return this._createRipple()}setIndex(e){this._buttonElement.querySelector(t.selectors.INDEX).innerHTML=(e+1||"").toString()}toggleRootClass(e,r){c(this._buttonElement,r,e)}setRootAttribute(e,r){this._buttonElement.setAttribute(e,r)}focusButton(){this._buttonElement.focus()}toggleDisabled(e){c(this._buttonElement,e,t.classes.DISABLED),u(this._buttonElement,e,"aria-disabled"),this._buttonElement.disabled=e}toggleIcon(e,r){let a=this._buttonElement.querySelector(t.selectors.INDEX),g=this._buttonElement.querySelector(t.selectors.ICON);if(!r){a.style.display="inherit",g.style.display="none";return}a.style.display="none",g.style.display="inherit",g.name=e}slotHasContent(){return this._expansionSlot.assignedElements({flatten:!0}).length>0}setClickListener(e){this._buttonElement.addEventListener("click",e)}removeClickListener(e){this._buttonElement.removeEventListener("click",e)}setSlotListener(e){this._expansionSlot.addEventListener("slotchange",e)}removeSlotListener(e){this._expansionSlot&&this._expansionSlot.removeEventListener("slotchange",e)}setExpanded(e){this._expansionPanel&&(this._expansionPanel.open=e,u(this._expansionPanel,!e,"tabindex","-1")),c(this._buttonElement,e,t.classes.EXPANDED)}setExpansionPanelAnimations(e){this._expansionPanel.useAnimations=e}addExpansionPanel(){this._container.querySelector(t.selectors.EXPANSION_PANEL)||(this._expansionPanel=this._container.appendChild(this._createExpansionPanel()),this._expansionSlot=this._expansionPanel.querySelector(t.selectors.EXPANSION_SLOT))}removeExpansionPanel(){let e=this._container.querySelector(t.selectors.EXPANSION_PANEL);e&&this._container.removeChild(e)}addExpansionIcon(){this._buttonElement.querySelector(t.selectors.EXPANSION_ICON)||this._buttonElement.appendChild(this._createExpansionIcon())}removeExpansionIcon(){let e=this._buttonElement.querySelector(t.selectors.EXPANSION_ICON);e&&this._buttonElement.removeChild(e)}addExpansionPanelListener(e,r){this._expansionPanel.addEventListener(e,r)}removeExpansionPanelListener(e,r){this._expansionPanel&&this._expansionPanel.removeEventListener(e,r)}isExpandedContentInFocus(e){return this._expansionSlot.assignedElements().some(r=>r.contains(e||document.activeElement))}_createRipple(){let e=E(x({},v.createAdapter(this)),{isSurfaceDisabled:()=>this._buttonElement.disabled});return new v(this._buttonElement,new X(e))}_createExpansionPanel(){let e=document.createElement("forge-expansion-panel");e.useAnimations=!1,e.setAttribute("part","expansion-panel"),d(t.classes.EXPANSION_PANEL,e);let r=document.createElement("slot");return r.setAttribute("name","expansion-content"),d(t.classes.EXPANSION_CONTENT,r),e.appendChild(r),e}_createExpansionIcon(){let e=document.createElement("forge-icon");return d(t.classes.EXPANSION_ICON,e),e.name="keyboard_arrow_down",e.setAttribute("part","expanded-icon"),e}};var b=class{constructor(o){this._adapter=o;this._clickListener=()=>this._onClickListener(),this._expansionContentSlotChangeListener=e=>this._onExpansionContentSlotChange(e),this._expansionContentFocusInListener=e=>this._onExpansionContentFocusIn(e),this._expansionContentFocusOutListener=e=>this._onExpansionContentFocusOut(e)}initialize(){this._adapter.initialize(),this._adapter.attachRipple(),this._applySelected(),this._toggleIcon(),this._vertical&&(this._adapter.addExpansionPanel(),this._adapter.addExpansionIcon(),this._adapter.setClickListener(this._clickListener),this._adapter.setSlotListener(this._expansionContentSlotChangeListener),this._adapter.addExpansionPanelListener("focusin",this._expansionContentFocusInListener),this._adapter.addExpansionPanelListener("focusout",this._expansionContentFocusOutListener)),this._initialized=!0}disconnect(){this._adapter.detatchRipple(),this._adapter.removeClickListener(this._clickListener),this._adapter.removeSlotListener(this._expansionContentSlotChangeListener),this._adapter.removeExpansionPanelListener("focusin",this._onExpansionContentFocusIn),this._adapter.removeExpansionPanelListener("focusout",this._onExpansionContentFocusOut)}get index(){return this._index}set index(o){this._index!==o&&(this._index=o,this._applyIndex(),this._adapter.setHostAttribute(t.attributes.INDEX,o.toString()))}get editable(){return this._editable}set editable(o){this._editable!==o&&(this._editable=o,this._adapter.toggleHostAttribute(t.attributes.EDITABLE,o),this._applyEditable())}get completed(){return this._completed}set completed(o){this._completed!==o&&(this._completed=o,this._adapter.toggleHostAttribute(t.attributes.COMPLETED,o),this._applyCompleted())}get error(){return this._error}set error(o){this._error!==o&&(this._error=o,this._adapter.toggleHostAttribute(t.attributes.ERROR,o),this._applyError())}get selected(){return this._selected}set selected(o){this._selected!==o&&(this._selected=o,this._adapter.toggleHostAttribute(t.attributes.SELECTED,o),this._applySelected())}get alternative(){return this._alternative}set alternative(o){this._alternative!==o&&(this._alternative=o,this._adapter.toggleHostAttribute(t.attributes.ALTERNATIVE,o),this._applyAlternative())}get disabled(){return this._disabled}set disabled(o){this._disabled=o,this._applyDisabled()}get vertical(){return this._vertical}set vertical(o){o!==this._vertical&&(this._vertical=o,this._applyVertical(),this._initialized&&(this._vertical?(this._adapter.addExpansionPanel(),this._adapter.addExpansionIcon(),this._adapter.setClickListener(this._clickListener),this._adapter.setSlotListener(this._expansionContentSlotChangeListener)):(this._adapter.removeClickListener(this._clickListener),this._adapter.removeSlotListener(this._expansionContentSlotChangeListener),this._adapter.removeExpansionPanel(),this._adapter.removeExpansionIcon())))}get expanded(){return this._expanded}set expanded(o){o!==this._expanded&&(this._expanded=o,this._adapter.toggleHostAttribute(t.attributes.EXPANDED,this._expanded),this._initialized&&this._applyExpanded())}get ignoreUserExpansion(){return this._ignoreUserExpansion}set ignoreUserExpansion(o){o!==this._ignoreUserExpansion&&(this._ignoreUserExpansion=o)}setStepTabIndex(o){this._adapter.setRootTabIndex(o)}_applyExpanded(){this._adapter.setExpanded(this._expanded)}_applyVertical(){this._adapter.toggleHostAttribute(t.attributes.VERTICAL,this._vertical),this._adapter.toggleRootClass(t.classes.VERTICAL,this._vertical)}focus(){this._adapter.focusButton()}_applyAlternative(){this._adapter.toggleRootClass(t.classes.ALTERNATIVE,this._alternative)}_applySelected(){this._adapter.toggleRootClass(t.classes.SELECTED,this._selected),this._adapter.setHostAttribute(t.attributes.ARIA_SELECTED,(this._selected||!1).toString()),this._adapter.setRootTabIndex(this._selected?0:-1),this._toggleIcon()}_applyIndex(){this._adapter.setIndex(this._index)}_applyEditable(){this._adapter.toggleRootClass(t.classes.EDITABLE,this._editable),this._toggleIcon()}_applyCompleted(){this._adapter.toggleRootClass(t.classes.COMPLETED,this._completed),this._toggleIcon()}_applyError(){this._adapter.toggleRootClass(t.classes.ERROR,this._error),this._toggleIcon()}_applyDisabled(){this._adapter.toggleDisabled(this._disabled),this._toggleIcon()}_getIconState(){return this._error?"warning":this._completed?this._editable?"mode_edit":"check":this._editable&&this._selected&&!this._disabled?"mode_edit":this._disabled?"block":""}_toggleIcon(){this._iconState=this._getIconState(),this._adapter.toggleIcon(this._iconState,this._iconState!=="")}_toggleExpanded(){this._adapter.slotHasContent()&&(this._expanded=!this._expanded,this._applyExpanded(),this._adapter.toggleHostAttribute(t.attributes.EXPANDED,this._expanded))}_onClickListener(){this._vertical&&!this._ignoreUserExpansion&&this._toggleExpanded()}_onExpansionContentSlotChange(o){let e=this._adapter.slotHasContent();e?(this._adapter.setHostAttribute(t.attributes.EXPANDABLE),this._applyExpanded(),this._adapter.setExpansionPanelAnimations(!0)):(this._adapter.removeHostAttribute(t.attributes.EXPANDABLE),this._adapter.setExpansionPanelAnimations(!1)),this._adapter.toggleRootClass(t.classes.EXPANDABLE,e)}_onExpansionContentFocusIn(o){!this._expandedContentFocused&&this._adapter.isExpandedContentInFocus(o.target)&&(this._adapter.emitHostEvent(t.events.EXPANDED_CONTENT_FOCUSIN,this._adapter.component),this._expandedContentFocused=!0)}_onExpansionContentFocusOut(o){o.relatedTarget&&!this._adapter.isExpandedContentInFocus(o.relatedTarget)&&(this._adapter.emitHostEvent(t.events.EXPANDED_CONTENT_FOCUSOUT,this._adapter.component),this._expandedContentFocused=!1)}};var U='<template><div class="forge-step__container" part="root"><button class="forge-step" type="button" part="button"><div class="before" part="before"></div><div class="forge-step__icon-container" part="icon-container"><div class="forge-step-icon-content" part="icon-content"><span class="forge-step-index" part="index"></span><forge-icon class="forge-step-icon" part="icon"></forge-icon></div></div><div class="forge-step__text-container" part="text-container"><div class="forge-step__title" part="title-container"><slot></slot></div><div class="forge-step__subtitle" part="subtitle-container"><slot name="optional"></slot></div></div><div class="after" part="after"></div></button></div></template>',$='@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-step{padding:12px 16px;outline:0;background:0 0;border:none;border-radius:14px;position:relative;display:-webkit-box;display:flex;overflow:hidden;-webkit-box-align:center;align-items:center;z-index:1;--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;cursor:pointer}.forge-step:focus{outline:0}.forge-step::-moz-focus-inner,.forge-step::-moz-focus-outer{padding:0;border:0}.forge-step::after,.forge-step::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.forge-step::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-step::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-step.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-step.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-step.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-step.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-step.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-step::after,.forge-step::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.forge-step.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-step::after,.forge-step::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.forge-step.mdc-ripple-surface--hover::before,.forge-step:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-step.mdc-ripple-upgraded--background-focused::before,.forge-step:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-step:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-step:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-step.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-step--selected::before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity, .08)}.forge-step--selected::after,.forge-step--selected::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-step--selected.mdc-ripple-surface--hover::before,.forge-step--selected:hover::before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity, .12)}.forge-step--selected.mdc-ripple-upgraded--background-focused::before,.forge-step--selected:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-focus-opacity, .2)}.forge-step--selected:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-step--selected:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-press-opacity, .2)}.forge-step--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.forge-step.forge-step--error.forge-step--selected::before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity, .08)}.forge-step.forge-step--error.forge-step--selected::after,.forge-step.forge-step--error.forge-step--selected::before{background-color:#b00020;background-color:var(--mdc-ripple-color,var(--mdc-theme-error,#b00020))}.forge-step.forge-step--error.forge-step--selected.mdc-ripple-surface--hover::before,.forge-step.forge-step--error.forge-step--selected:hover::before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity, .12)}.forge-step.forge-step--error.forge-step--selected.mdc-ripple-upgraded--background-focused::before,.forge-step.forge-step--error.forge-step--selected:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-focus-opacity, .2)}.forge-step.forge-step--error.forge-step--selected:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-step.forge-step--error.forge-step--selected:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-press-opacity, .2)}.forge-step.forge-step--error.forge-step--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.forge-step--selected{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-step--disabled::after,.forge-step--disabled::before{background-color:transparent}.forge-step__container{display:contents}.forge-step__expansion-panel{display:none}.forge-step__expanded-icon{color:#757575;color:var(--forge-theme-icon-color,#757575);display:none;margin-left:auto}.forge-step__title{color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);text-align:left;overflow:hidden;text-overflow:ellipsis}.forge-step__subtitle{text-align:left;overflow:hidden;text-overflow:ellipsis}.forge-step__subtitle ::slotted(*){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit)}.forge-step__icon-container .forge-step-icon-content{border-style:solid;border-width:2px;border-color:transparent;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;border-radius:50%;height:24px;width:24px;font-size:14px;-webkit-transition:background-color .4s cubic-bezier(.25, .8, .25, 1);transition:background-color .4s cubic-bezier(.25, .8, .25, 1);margin:0 8px 0 0;-webkit-box-flex:0;flex:none}.forge-step__icon-container .forge-step-icon-content forge-icon{font-size:14px}.forge-step:not(.forge-step--disabled) .forge-step-icon-content{color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.forge-step--disabled{cursor:not-allowed;color:rgba(0,0,0,.6);color:var(--forge-theme-form-field-text-disabled-on-background,rgba(0,0,0,.6))}.forge-step--disabled.forge-step .forge-step__icon-container .forge-step-icon-content{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));background-color:#f5f5f5;background-color:var(--forge-theme-form-field-disabled-on-background,#f5f5f5)}.forge-step--disabled .forge-step__text-container .forge-step__title{color:rgba(0,0,0,.6);color:var(--forge-theme-form-field-text-disabled-on-background,rgba(0,0,0,.6))}.forge-step--disabled .forge-step__text-container .forge-step__subtitle ::slotted(*){color:rgba(0,0,0,.6);color:var(--forge-theme-form-field-text-disabled-on-background,rgba(0,0,0,.6))}.forge-step--alternative{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.forge-step--alternative .forge-step__icon-container .forge-step-icon-content{margin:0}.forge-step--alternative .forge-step__text-container{margin-top:8px;place-items:center}.forge-step:not(.forge-step--selected):not(.forge-step--disabled).forge-step--editable:not(.forge-step--completed):not(.forge-step--error) .forge-step-icon-content,.forge-step:not(.forge-step--selected):not(.forge-step--disabled):not(.forge-step--editable):not(.forge-step--completed):not(.forge-step--error) .forge-step-icon-content{border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5)}.forge-step:not(.forge-step--selected):not(.forge-step--disabled).forge-step--editable:not(.forge-step--completed):not(.forge-step--error) .forge-step-icon-content .forge-step-index,.forge-step:not(.forge-step--selected):not(.forge-step--disabled):not(.forge-step--editable):not(.forge-step--completed):not(.forge-step--error) .forge-step-icon-content .forge-step-index{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-step--selected.forge-step--disabled .forge-step-icon-content{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));background-color:#f5f5f5;background-color:var(--forge-theme-form-field-disabled-on-background,#f5f5f5)}.forge-step--selected:not(.forge-step--disabled) .forge-step__icon-container .forge-step-icon-content{background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5);color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-step--selected:not(.forge-step--disabled) .forge-step__title{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5);font-weight:500}.forge-step--selected:not(.forge-step--disabled) .forge-step__subtitle ::slotted(*){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5);font-weight:500}.forge-step--error:not(.forge-step--disabled) .forge-step__title{color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-step--error:not(.forge-step--disabled) .forge-step__subtitle ::slotted(*){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-step--error:not(.forge-step--disabled) .forge-step__icon-container .forge-step-icon-content{background-color:#b00020;background-color:var(--mdc-theme-error,#b00020);color:#fff;color:var(--mdc-theme-on-error,#fff)}.forge-step--completed:not(.forge-step--disabled):not(.forge-step--error):not(.forge-step--editable) .forge-step-icon-content{background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5);color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-step--completed:not(.forge-step--disabled):not(.forge-step--error).forge-step--editable .forge-step-icon-content{background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5);color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-step--expandable .forge-step__expanded-icon{display:inline-block;-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.forge-step--expandable.forge-step--expanded .forge-step__expanded-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.forge-step--expandable .forge-step__icon-container .forge-step-icon-content{margin:0 16px 0 0}.forge-step__text-container{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host(:first-child[alternative])::after{align-self:flex-start;top:22px;margin:0}:host(:last-child[alternative])::before{align-self:flex-start;top:22px;margin:0}:host(:not(:first-child):not(:last-child)[alternative])::after,:host(:not(:first-child):not(:last-child)[alternative])::before{align-self:flex-start;top:22px;min-width:7px;margin:0}:host(:not(:last-child)[alternative]) .after{align-self:flex-start;top:22px;position:absolute;width:calc(50% - 18px);left:calc(50% + 18px);height:0;right:0}:host(:not(:last-child)[alternative]) .after::after{content:"";-webkit-box-flex:1;flex:1;flex-basis:0.000000001px;position:absolute;right:0;left:0;min-width:0;width:100%;border-top-color:#e0e0e0;border-top-color:var(--forge-theme-border-color,#e0e0e0);border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px}:host(:not(:first-child)[alternative]) .before{align-self:flex-start;top:22px;position:absolute;left:0;width:calc(50% - 18px);height:0}:host(:not(:first-child)[alternative]) .before::before{content:"";left:0;min-width:0;width:100%;-webkit-box-flex:1;flex:1;flex-basis:0.000000001px;position:absolute;border-top-color:#e0e0e0;border-top-color:var(--forge-theme-border-color,#e0e0e0);border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px}:host(:not(:first-child):not(:last-child)):host(:not([vertical]))::after,:host(:not(:first-child):not(:last-child)):host(:not([vertical]))::before{border-top-color:#e0e0e0;border-top-color:var(--forge-theme-border-color,#e0e0e0);content:"";position:relative;height:0;min-width:10px;-webkit-box-flex:1;flex:1;flex-basis:0.000000001px;border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px;margin:0 -10px}:host(:last-child):host(:not([vertical]))::before{border-top-color:#e0e0e0;border-top-color:var(--forge-theme-border-color,#e0e0e0);content:"";position:relative;height:0;min-width:10px;-webkit-box-flex:1;flex:1;flex-basis:0.000000001px;border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px;margin:0 -10px 0 0}:host(:not(:last-child)):host(:not([vertical]))::after{border-top-color:#e0e0e0;border-top-color:var(--forge-theme-border-color,#e0e0e0);content:"";position:relative;height:0;min-width:10px;-webkit-box-flex:1;flex:1;flex-basis:0.000000001px;border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px;margin:0 0 0 -10px}:host(:focus){outline:0}:host([vertical]){-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}:host([vertical])::after{content:none}:host([vertical])::before{content:none}:host([vertical]) .forge-step{width:100%;border-radius:4px;min-height:52px}:host([vertical]) .forge-step__text-container{white-space:normal}:host([vertical]) .forge-step__icon-container .forge-step-icon-content{margin:0 16px 0 0}:host([vertical][expandable]) .forge-step__expansion-panel{display:block}:host([ignore-user-expansion]) .forge-step__expanded-icon{display:none}forge-expansion-panel::part(root){border-left-style:solid;border-color:#e0e0e0;border-color:var(--forge-theme-border-color,#e0e0e0);border-left-width:1px;border-left-width:var(--forge-step-expansion-panel-border-left-width,1px);margin-left:60px;margin-left:var(--forge-step-expansion-panel-margin-left,60px);margin-top:4px;margin-top:var(--forge-step-expansion-panel-margin-top,4px);margin-bottom:4px;margin-bottom:var(--forge-step-expansion-panel-margin-bottom,4px)}:host(:not(:last-child)[clustered])::after{min-width:25px}:host(:last-child[clustered])::before{min-width:25px}:host(:not(:first-child):not(:last-child)[clustered])::after,:host(:not(:first-child):not(:last-child)[clustered])::before{min-width:25px}:host(:not(:last-child)[safari][alternative])::after{top:24px;margin:0 -5px}:host(:last-child[safari][alternative])::before{top:24px;margin:0 -5px}:host(:not(:first-child):not(:last-child)[safari][alternative])::after,:host(:not(:first-child):not(:last-child)[safari][alternative])::before{top:24px;margin:0 -5px}',i=class extends N{constructor(){super();O.define([P,L,R,S,T]),k(this,U,$),this._foundation=new b(new m(this))}static get observedAttributes(){return[t.attributes.COMPLETED,t.attributes.EDITABLE,t.attributes.ERROR,t.attributes.INDEX,t.attributes.SELECTED,t.attributes.ALTERNATIVE,t.attributes.DISABLED,t.attributes.VERTICAL,t.attributes.EXPANDED,t.attributes.IGNORE_USER_EXPANSION]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,r,a){switch(e){case t.attributes.INDEX:this.index=y(a);break;case t.attributes.COMPLETED:this.completed=p(a);break;case t.attributes.EDITABLE:this.editable=p(a);break;case t.attributes.ERROR:this.error=p(a);break;case t.attributes.SELECTED:this.selected=p(a);break;case t.attributes.ALTERNATIVE:this.alternative=p(a);break;case t.attributes.DISABLED:this.disabled=p(a);break;case t.attributes.VERTICAL:this.vertical=p(a);break;case t.attributes.EXPANDED:this.expanded=p(a);break;case t.attributes.IGNORE_USER_EXPANSION:this.ignoreUserExpansion=p(a);break}}focus(){this._foundation.focus()}setStepTabIndex(e){this._foundation.setStepTabIndex(e)}};n([s()],i.prototype,"alternative",2),n([s()],i.prototype,"index",2),n([s()],i.prototype,"editable",2),n([s()],i.prototype,"completed",2),n([s()],i.prototype,"error",2),n([s()],i.prototype,"selected",2),n([s()],i.prototype,"disabled",2),n([s()],i.prototype,"vertical",2),n([s()],i.prototype,"expanded",2),n([s()],i.prototype,"ignoreUserExpansion",2),i=n([C({name:t.elementName,dependencies:[D,z]})],i);function ve(){I(i)}export{t as a,m as b,b as c,i as d,ve as e};
|
|
7
|
+
//# sourceMappingURL=chunk.QMYJCNVD.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{a as w,b as L,d as O,e as B}from"./chunk.BBNRKEP4.js";import{E as N}from"./chunk.3QD73Z4F.js";import{F as S}from"./chunk.2R72ZTIK.js";import{e as V}from"./chunk.FHW6LV4A.js";import{b as y}from"./chunk.YTOYNJMD.js";import{e as g}from"./chunk.UV3WIHCM.js";import{a as D}from"./chunk.MGLWXAZO.js";import{b as M}from"./chunk.NRXPO3SY.js";import{p as P}from"./chunk.MZLPUI6R.js";import{d as T,l as F}from"./chunk.T64UW37U.js";import{b as A}from"./chunk.XIQFHO5R.js";import{e as m}from"./chunk.DMCBAYQX.js";import{a as x}from"./chunk.G4IN6Y46.js";import{a as b,b as k}from"./chunk.55FCNVG5.js";import{a as E,e as C,i as I}from"./chunk.QH2GB3PD.js";import{s as f}from"./chunk.CFDK4RCW.js";import{f as v}from"./chunk.J2M2MXP2.js";import{a as d,d as _}from"./chunk.M3QDAYD2.js";var r=`${k}date-picker`,z={VALUE:"value"},U={INPUT:"input,input[forge-date-picker-input]"},R={CHANGE:`${r}-change`,OPEN:`${r}-open`,CLOSE:`${r}-close`,INPUT:`${r}-input`},n={elementName:r,selectors:U,events:R,observedAttributes:z};var l=class extends O{constructor(e){super(e);this._dropdownIdentifier=`forge-date-picker-${this._identifier}`}_initializeInput(){this._inputElement=this._component.querySelector(n.selectors.INPUT)}_initializeCalendarDropdown(){let e=this._getDefaultTargetElement();this._calendarDropdown=new S(e,this._dropdownIdentifier)}initializeMask(e){var t;(t=this._inputMask)==null||t.destroy(),this._inputMask=new A(this._inputElement,e)}destroyMask(){var e;(e=this._inputMask)==null||e.destroy(),this._inputMask=void 0}initializeAccessibility(){this._inputElement.setAttribute("autocomplete","off"),this._inputElement.setAttribute("autocorrect","off"),this._inputElement.setAttribute("autocapitalize","off"),this._inputElement.setAttribute("spellcheck","false"),this._inputElement.setAttribute("role","combobox"),this._inputElement.setAttribute("aria-live","assertive"),this._inputElement.setAttribute("aria-atomic","true"),this._inputElement.setAttribute("aria-haspopup","true"),this._inputElement.setAttribute("aria-expanded","false"),this._inputElement.setAttribute("aria-owns",this._dropdownIdentifier)}addInputListener(e,t,i){var a;(a=this._inputElement)==null||a.addEventListener(e,t,{capture:i})}removeInputListener(e,t,i){var a;(a=this._inputElement)==null||a.removeEventListener(e,t,{capture:i})}setInputValueChangedListener(e,t){this.destroyValueChangeListener();let i=g(e,this._inputElement,"value",t);this._valueChangeListeners.push(i)}hasInputElement(){return!!this._inputElement}attachCalendar(e,t){super.attachCalendar(e,t),this._inputElement.setAttribute("aria-expanded","true")}detachCalendar(){super.detachCalendar(),this._inputElement&&(this._inputElement.setAttribute("aria-expanded","false"),this._inputElement.removeAttribute("aria-activedescendant"))}setActiveDescendant(e){this._inputElement.setAttribute("aria-activedescendant",e)}setInputValue(e,t){this._inputElement.value!==e&&(this._inputElement.value=e,this._inputMask&&this._inputMask.updateMask(),t&&(this._inputElement.dispatchEvent(new Event("change")),this._inputElement.dispatchEvent(new Event("input"))))}isInputDisabled(){return this._inputElement.disabled}isInputFocused(){return f()===this._inputElement}getInputValue(){return this._inputMask?this._inputMask.maskedValue:this._inputElement.value}setDisabled(e){this._inputElement.disabled=e,this._inputElement.setAttribute("aria-disabled",e.toString()),this._toggleElement&&(this._toggleElement.setAttribute("aria-disabled",e.toString()),this._toggleElement.hasOwnProperty("disabled")&&(this._toggleElement.disabled=e))}tryFocusInput(){this._inputElement.focus()}tryBlurInput(){this._inputElement.blur()}selectInputText(){this._inputElement.select()}emitInputEvent(e,t){I(this._inputElement,e,t)}};var p=class extends B{constructor(e){super(e);this._mode="single"}_initializeState(){this._value||(this._value=this._coerceDateValue(this._adapter.getInputValue()))}_emitChangeEvent(e,t){let i=this._getTypedValue(e);return this._adapter.emitHostEvent(n.events.CHANGE,i,!0,!t)?(this._setValue(e),!0):!1}_emitOpenEvent(){this._adapter.emitHostEvent(n.events.OPEN,void 0,!1)}_emitCloseEvent(){this._adapter.emitHostEvent(n.events.CLOSE,void 0,!1)}_onToday(){let e=new Date;e.setHours(0,0,0,0),this._onDateSelected({date:e,selected:!0,type:"date"})}_onClear(){this._onDateSelected({date:null,selected:!1,type:"date"})}_getCurrentValue(){return this._value}_setFormattedInputValue(e){let t=this._formatDate(this._value);t?this._adapter.setInputValue(t,e?!1:this._notifyInputValueChanges):this._allowInvalidDate||this._adapter.setInputValue("",e?!1:this._notifyInputValueChanges)}_setValue(e){(!e||this._isDateValueAcceptable(e))&&(this._value=e)}_onDateSelected(e){let t=e.date;if(e.type==="date"&&this._closeCalendar(!0),!this._emitChangeEvent(t))return;let i=this._formatDate(t);this._adapter.setInputValue(i,this._notifyInputValueChanges),this._formatInputValue(),D.isMobile||this._adapter.selectInputText()}_openCalendar(e){super._openCalendar(e);let t=this._getCurrentValue();t&&this._adapter.goToCalendarDate(new Date(t))}_applyMin(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),super._applyMin()}_applyMax(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),super._applyMax()}_applyDisabledDates(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue())}_applyDisabledDaysOfWeek(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue())}_handleInput(e){let t=this._getSanitizedDateString(e),i=this._coerceDateValue(t);this._masked&&this._adapter.emitInputEvent(n.events.INPUT,t),!m(i,this._value)&&this._isDateValueAcceptable(i)&&this._emitChangeEvent(i)}_onInputValueChanged(e){let t=this._getSanitizedDateString(e);if(this._masked&&t)return;let i=this._coerceDateValue(t);!m(i,this._value)&&this._isDateValueAcceptable(i)&&(this.value=i,this._emitChangeEvent(this._value))}_applyValue(){this._setFormattedInputValue(),this._open&&this._adapter.setCalendarValue(this._value)}get value(){let e=this._getTypedValue(this._value);return e?v(e)?new Date(e.getTime()):e:null}set value(e){this._value!==e&&(this._setValue(this._coerceDateValue(e)),this._isInitialized&&this._applyValue())}};var K="<template><slot></slot></template>",$=":host{display:block}:host([hidden]){display:none}",o=class extends L{static get observedAttributes(){return[...Object.values(w.observedAttributes),n.observedAttributes.VALUE]}constructor(){super(),T.define(P),C(this,K,$),this._foundation=new p(new l(this))}attributeChangedCallback(s,e,t){switch(s){case n.observedAttributes.VALUE:this.value=t;return}super.attributeChangedCallback(s,e,t)}};o=_([b({name:n.elementName,dependencies:[V,N,M,F]})],o);var H=class extends x{constructor(e){super(e)}_build(){let e=document.createElement(n.elementName);return this._attachTextField(e),e}getInputElement(){return this._textFieldDelegate.inputElement}getTextFieldElement(){return this._textFieldDelegate.element}get value(){return this._element.value}set value(e){this._element.value=e}get disabled(){return this._element.disabled}set disabled(e){this._element.disabled=e}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(e){this._textFieldDelegate.invalid=e}onChange(e){this._element.masked?this._element.addEventListener(n.events.INPUT,t=>e(t.target.value)):this.getInputElement().addEventListener("input",t=>e(t.target.value))}onInput(e){this._element.masked?this._element.addEventListener(n.events.INPUT,t=>e(t.detail)):this._textFieldDelegate.inputElement.addEventListener("input",t=>e(t.target.value))}onFocus(e){this._textFieldDelegate.inputElement.addEventListener("focus",t=>e(t))}onBlur(e){this._textFieldDelegate.inputElement.addEventListener("blur",t=>e(t))}_attachTextField(e){var i,a,c,h;let t={props:d({},(a=(i=this._config.options)==null?void 0:i.textFieldDelegateConfig)==null?void 0:a.props),options:d({},(h=(c=this._config.options)==null?void 0:c.textFieldDelegateConfig)==null?void 0:h.options)};this._textFieldDelegate=new y(t),e.appendChild(this._textFieldDelegate.element)}};function ye(){E(o)}export{n as a,l as b,p as c,o as d,H as e,ye as f};
|
|
7
|
+
//# sourceMappingURL=chunk.RHZ35R2V.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/date-picker/date-picker-constants.ts", "../../src/date-picker/date-picker-adapter.ts", "../../src/date-picker/date-picker-foundation.ts", "../../src/date-picker/date-picker.ts", "../../src/date-picker/date-picker-component-delegate.ts", "../../src/date-picker/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}date-picker`;\n\nconst observedAttributes = {\n VALUE: 'value'\n};\n\nconst selectors = {\n INPUT: 'input,input[forge-date-picker-input]'\n};\n\nconst events = {\n CHANGE: `${elementName}-change`,\n OPEN: `${elementName}-open`,\n CLOSE: `${elementName}-close`,\n INPUT: `${elementName}-input`\n};\n\nexport const DATE_PICKER_CONSTANTS = {\n elementName,\n selectors,\n events,\n observedAttributes\n};\n", "import { emitEvent, listenOwnProperty, getActiveElement } from '@tylertech/forge-core';\nimport { ICalendarDropdownPopupConfig } from '../calendar/calendar-dropdown';\nimport { CalendarDropdown } from '../calendar/calendar-dropdown/calendar-dropdown';\nimport { DateInputMask, IDateInputMaskOptions } from '../core/mask/date-input-mask';\nimport { BaseDatePickerAdapter, IBaseDatePickerAdapter } from './base/base-date-picker-adapter';\nimport { IDatePickerCalendarDropdownConfig } from './base/base-date-picker-constants';\nimport { IDatePickerComponent } from './date-picker';\nimport { DATE_PICKER_CONSTANTS } from './date-picker-constants';\n\nexport interface IDatePickerAdapter extends IBaseDatePickerAdapter {}\n\nexport class DatePickerAdapter extends BaseDatePickerAdapter<IDatePickerComponent> implements IDatePickerAdapter {\n private _inputElement: HTMLInputElement;\n private _inputMask: DateInputMask | undefined;\n private _dropdownIdentifier: string;\n\n constructor(component: IDatePickerComponent) {\n super(component);\n this._dropdownIdentifier = `forge-date-picker-${this._identifier}`;\n }\n\n protected _initializeInput(): void {\n this._inputElement = this._component.querySelector(DATE_PICKER_CONSTANTS.selectors.INPUT) as HTMLInputElement;\n }\n\n protected _initializeCalendarDropdown(): void {\n const targetElement = this._getDefaultTargetElement();\n this._calendarDropdown = new CalendarDropdown(targetElement, this._dropdownIdentifier);\n }\n\n public initializeMask(options: IDateInputMaskOptions): void {\n this._inputMask?.destroy();\n this._inputMask = new DateInputMask(this._inputElement, options);\n }\n\n public destroyMask(): void {\n this._inputMask?.destroy();\n this._inputMask = undefined;\n }\n\n public initializeAccessibility(): void {\n this._inputElement.setAttribute('autocomplete', 'off');\n this._inputElement.setAttribute('autocorrect', 'off');\n this._inputElement.setAttribute('autocapitalize', 'off');\n this._inputElement.setAttribute('spellcheck', 'false');\n this._inputElement.setAttribute('role', 'combobox');\n this._inputElement.setAttribute('aria-live', 'assertive');\n this._inputElement.setAttribute('aria-atomic', 'true');\n this._inputElement.setAttribute('aria-haspopup', 'true');\n this._inputElement.setAttribute('aria-expanded', 'false');\n this._inputElement.setAttribute('aria-owns', this._dropdownIdentifier);\n }\n\n public addInputListener(type: string, listener: (event: Event) => void, capture?: boolean): void {\n this._inputElement?.addEventListener(type, listener, { capture });\n }\n\n public removeInputListener(type: string, listener: (event: Event) => void, capture?: boolean): void {\n this._inputElement?.removeEventListener(type, listener, { capture });\n }\n\n public setInputValueChangedListener(context: any, listener: (value: any) => void): void {\n this.destroyValueChangeListener();\n const destroyListenerCb = listenOwnProperty(context, this._inputElement, 'value', listener);\n this._valueChangeListeners.push(destroyListenerCb);\n }\n\n public hasInputElement(): boolean {\n return !!this._inputElement;\n }\n\n public override attachCalendar(calendarConfig: IDatePickerCalendarDropdownConfig<Date | null>, dropdownConfig?: ICalendarDropdownPopupConfig): void {\n super.attachCalendar(calendarConfig, dropdownConfig);\n this._inputElement.setAttribute('aria-expanded', 'true');\n }\n\n public override detachCalendar(): void {\n super.detachCalendar();\n if (this._inputElement) {\n this._inputElement.setAttribute('aria-expanded', 'false');\n this._inputElement.removeAttribute('aria-activedescendant');\n }\n }\n\n public setActiveDescendant(id: string): void {\n this._inputElement.setAttribute('aria-activedescendant', id);\n }\n\n public setInputValue(value: string, emitEvents: boolean): void {\n if (this._inputElement.value === value) {\n return;\n }\n\n this._inputElement.value = value;\n \n if (this._inputMask) {\n this._inputMask.updateMask();\n }\n\n if (emitEvents) {\n this._inputElement.dispatchEvent(new Event('change'));\n this._inputElement.dispatchEvent(new Event('input'));\n }\n }\n\n public isInputDisabled(): boolean {\n return this._inputElement.disabled;\n }\n\n public isInputFocused(): boolean {\n return getActiveElement() === this._inputElement;\n }\n\n public getInputValue(): string {\n return this._inputMask ? this._inputMask.maskedValue : this._inputElement.value;\n }\n\n public setDisabled(value: boolean): void {\n this._inputElement.disabled = value;\n this._inputElement.setAttribute('aria-disabled', value.toString());\n if (this._toggleElement) {\n this._toggleElement.setAttribute('aria-disabled', value.toString());\n if (this._toggleElement.hasOwnProperty('disabled')) {\n (this._toggleElement as HTMLButtonElement).disabled = value;\n }\n }\n }\n\n public tryFocusInput(): void {\n this._inputElement.focus();\n }\n\n public tryBlurInput(): void {\n this._inputElement.blur();\n }\n\n public selectInputText(): void {\n this._inputElement.select();\n }\n\n public emitInputEvent(type: string, data?: any): void {\n emitEvent(this._inputElement, type, data);\n }\n}\n", "import { isDate, Platform } from '@tylertech/forge-core';\nimport { CalendarMode, ICalendarDateSelectEventData } from '../calendar';\nimport { isSameDate } from '../core';\nimport { BaseDatePickerFoundation, IBaseDatePickerFoundation } from './base/base-date-picker-foundation';\nimport { IDatePickerAdapter } from './date-picker-adapter';\nimport { DATE_PICKER_CONSTANTS } from './date-picker-constants';\n\nexport interface IDatePickerFoundation extends IBaseDatePickerFoundation<Date | string> {}\n\nexport class DatePickerFoundation extends BaseDatePickerFoundation<IDatePickerAdapter, Date | string | null | undefined, Date> implements IDatePickerFoundation {\n protected _mode: CalendarMode = 'single';\n\n constructor(adapter: IDatePickerAdapter) {\n super(adapter);\n }\n\n protected _initializeState(): void {\n if (!this._value) {\n this._value = this._coerceDateValue(this._adapter.getInputValue());\n }\n }\n\n protected _emitChangeEvent(value: Date | null | undefined, force?: boolean): boolean {\n const typedValue = this._getTypedValue(value);\n const wasCancelled = !this._adapter.emitHostEvent(DATE_PICKER_CONSTANTS.events.CHANGE, typedValue, true, !force);\n if (!wasCancelled) {\n this._setValue(value);\n return true;\n }\n return false;\n }\n\n protected _emitOpenEvent(): void {\n this._adapter.emitHostEvent(DATE_PICKER_CONSTANTS.events.OPEN, undefined, false);\n }\n\n protected _emitCloseEvent(): void {\n this._adapter.emitHostEvent(DATE_PICKER_CONSTANTS.events.CLOSE, undefined, false);\n }\n\n protected _onToday(): void {\n const today = new Date();\n today.setHours(0, 0, 0, 0);\n this._onDateSelected({ date: today, selected: true, type: 'date' });\n }\n\n protected _onClear(): void {\n this._onDateSelected({ date: null, selected: false, type: 'date' });\n }\n\n protected _getCurrentValue(): Date | null | undefined {\n return this._value;\n }\n\n protected _setFormattedInputValue(suppressValueChanges?: boolean): void {\n const formattedDate = this._formatDate(this._value);\n if (formattedDate) {\n this._adapter.setInputValue(formattedDate, suppressValueChanges ? false : this._notifyInputValueChanges);\n } else {\n if (!this._allowInvalidDate) {\n this._adapter.setInputValue('', suppressValueChanges ? false : this._notifyInputValueChanges);\n }\n }\n }\n\n protected _setValue(value?: Date | null): void {\n if (!value || this._isDateValueAcceptable(value)) {\n this._value = value;\n }\n }\n\n protected _onDateSelected(event: ICalendarDateSelectEventData): void {\n const value = event.date;\n\n if (event.type === 'date') {\n this._closeCalendar(true);\n }\n \n if (!this._emitChangeEvent(value)) {\n return;\n }\n\n const formattedValue = this._formatDate(value);\n\n this._adapter.setInputValue(formattedValue, this._notifyInputValueChanges);\n this._formatInputValue();\n\n if (!Platform.isMobile) {\n this._adapter.selectInputText();\n }\n }\n\n protected override _openCalendar(emitOpenEvent?: boolean): void {\n super._openCalendar(emitOpenEvent);\n\n const currentValue = this._getCurrentValue();\n if (!!currentValue) {\n this._adapter.goToCalendarDate(new Date(currentValue));\n }\n }\n\n protected override _applyMin(): void {\n if (this._value && !this._isDateValueAcceptable(this._value)) {\n this._emitChangeEvent(null, true);\n this._setFormattedInputValue();\n }\n super._applyMin();\n }\n\n protected override _applyMax(): void {\n if (this._value && !this._isDateValueAcceptable(this._value)) {\n this._emitChangeEvent(null, true);\n this._setFormattedInputValue();\n }\n super._applyMax();\n }\n\n protected _applyDisabledDates(): void {\n if (this._value && !this._isDateValueAcceptable(this._value)) {\n this._emitChangeEvent(null, true);\n this._setFormattedInputValue();\n }\n }\n\n protected _applyDisabledDaysOfWeek(): void {\n if (this._value && !this._isDateValueAcceptable(this._value)) {\n this._emitChangeEvent(null, true);\n this._setFormattedInputValue();\n }\n }\n\n protected _handleInput(value: string): void {\n const sanitizedValue = this._getSanitizedDateString(value);\n const date = this._coerceDateValue(sanitizedValue);\n if (this._masked) {\n this._adapter.emitInputEvent(DATE_PICKER_CONSTANTS.events.INPUT, sanitizedValue);\n }\n if (!isSameDate(date, this._value) && this._isDateValueAcceptable(date)) {\n this._emitChangeEvent(date);\n }\n }\n\n protected _onInputValueChanged(value: string): void {\n const sanitizedValue = this._getSanitizedDateString(value);\n if (this._masked && sanitizedValue) {\n // If masked, allow clearing value by setting input.value directly\n // To set a date value, dispatch `input` event and mask will handle it.\n return;\n }\n const date = this._coerceDateValue(sanitizedValue);\n if (!isSameDate(date, this._value) && this._isDateValueAcceptable(date)) {\n this.value = date;\n this._emitChangeEvent(this._value);\n }\n }\n\n private _applyValue(): void {\n this._setFormattedInputValue();\n if (this._open) {\n this._adapter.setCalendarValue(this._value);\n }\n }\n\n public get value(): Date | string | null | undefined {\n const date = this._getTypedValue(this._value);\n\n if (!date) {\n return null;\n }\n\n if (isDate(date)) {\n return new Date(date.getTime());\n }\n\n return date;\n }\n\n public set value(value: Date | string | null | undefined) {\n if (this._value !== value) {\n this._setValue(this._coerceDateValue(value));\n if (this._isInitialized) {\n this._applyValue();\n }\n }\n }\n}\n", "import { attachShadowTemplate, CustomElement } from '@tylertech/forge-core';\nimport { tylIconInsertInvitation } from '@tylertech/tyler-icons/standard';\nimport { CalendarComponent } from '../calendar';\nimport { IconComponent, IconRegistry } from '../icon';\nimport { IconButtonComponent } from '../icon-button';\nimport { PopupComponent } from '../popup';\nimport { BaseDatePickerComponent, IBaseDatePickerComponent } from './base/base-date-picker';\nimport { BASE_DATE_PICKER_CONSTANTS } from './base/base-date-picker-constants';\nimport { DatePickerAdapter } from './date-picker-adapter';\nimport { DATE_PICKER_CONSTANTS } from './date-picker-constants';\nimport { DatePickerFoundation } from './date-picker-foundation';\n\nconst template = '<template><slot></slot></template>';\nconst styles = ':host{display:block}:host([hidden]){display:none}';\n\nexport interface IDatePickerComponent extends IBaseDatePickerComponent<Date | string | null> {}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-date-picker': IDatePickerComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-date-picker-change': CustomEvent<Date | string | null>;\n 'forge-date-picker-open': CustomEvent<void>;\n 'forge-date-picker-close': CustomEvent<void>;\n 'forge-date-picker-input': CustomEvent<string>;\n }\n}\n\n/**\n * The custom element class behind the `<forge-date-picker>` element.\n * \n * @tag forge-date-picker\n */\n@CustomElement({\n name: DATE_PICKER_CONSTANTS.elementName,\n dependencies: [\n PopupComponent,\n CalendarComponent,\n IconButtonComponent,\n IconComponent\n ]\n})\nexport class DatePickerComponent extends BaseDatePickerComponent<Date | string | undefined, Date, DatePickerFoundation> implements IDatePickerComponent {\n public static get observedAttributes(): string[] {\n return [\n ...Object.values(BASE_DATE_PICKER_CONSTANTS.observedAttributes),\n DATE_PICKER_CONSTANTS.observedAttributes.VALUE\n ];\n }\n\n constructor() {\n super();\n IconRegistry.define(tylIconInsertInvitation);\n attachShadowTemplate(this, template, styles);\n this._foundation = new DatePickerFoundation(new DatePickerAdapter(this));\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case DATE_PICKER_CONSTANTS.observedAttributes.VALUE:\n this.value = newValue;\n return;\n }\n super.attributeChangedCallback(name, oldValue, newValue);\n }\n}\n", "import { IBaseComponentDelegateConfig } from '../core/delegates/base-component-delegate';\nimport { FormFieldComponentDelegate, IFormFieldComponentDelegateOptions } from '../core/delegates/form-field-component-delegate';\nimport { ITextFieldComponent, ITextFieldComponentDelegateConfig, TextFieldComponentDelegate } from '../text-field';\nimport { IDatePickerComponent } from './date-picker';\nimport { DATE_PICKER_CONSTANTS } from './date-picker-constants';\n\nexport type DatePickerComponentDelegateProps = Partial<IDatePickerComponent>;\nexport interface IDatePickerComponentDelegateOptions extends IFormFieldComponentDelegateOptions {\n useDropdownIcon?: boolean;\n textFieldDelegateConfig?: ITextFieldComponentDelegateConfig;\n}\nexport interface IDatePickerComponentDelegateConfig extends IBaseComponentDelegateConfig<IDatePickerComponent, IDatePickerComponentDelegateOptions> {}\n\nexport class DatePickerComponentDelegate extends FormFieldComponentDelegate<IDatePickerComponent, IDatePickerComponentDelegateOptions> {\n private _textFieldDelegate: TextFieldComponentDelegate;\n\n constructor(config?: IDatePickerComponentDelegateConfig) {\n super(config);\n }\n\n protected _build(): IDatePickerComponent {\n const datePicker = document.createElement(DATE_PICKER_CONSTANTS.elementName);\n this._attachTextField(datePicker);\n return datePicker;\n }\n\n public getInputElement(): HTMLInputElement {\n return this._textFieldDelegate.inputElement;\n }\n\n public getTextFieldElement(): ITextFieldComponent {\n return this._textFieldDelegate.element;\n }\n\n public get value(): any {\n return this._element.value;\n }\n public set value(value: any) {\n this._element.value = value;\n }\n\n public get disabled(): boolean {\n return this._element.disabled;\n }\n public set disabled(value: boolean) {\n this._element.disabled = value;\n }\n\n public get invalid(): boolean {\n return this._textFieldDelegate.invalid || false;\n }\n public set invalid(value: boolean) {\n this._textFieldDelegate.invalid = value;\n }\n\n public onChange(listener: (value: string) => void): void {\n if (this._element.masked) {\n this._element.addEventListener(DATE_PICKER_CONSTANTS.events.INPUT, evt => listener((evt.target as HTMLInputElement).value));\n } else {\n this.getInputElement().addEventListener('input', evt => listener((evt.target as HTMLInputElement).value));\n }\n }\n\n public onInput(listener: (value: string) => void): void {\n if (this._element.masked) {\n this._element.addEventListener(DATE_PICKER_CONSTANTS.events.INPUT, (evt: CustomEvent) => listener(evt.detail));\n } else {\n this._textFieldDelegate.inputElement.addEventListener('input', evt => listener((evt.target as HTMLInputElement).value));\n }\n }\n\n public onFocus(listener: (evt: FocusEvent) => void): void {\n this._textFieldDelegate.inputElement.addEventListener('focus', (evt: FocusEvent) => listener(evt));\n }\n\n public onBlur(listener: (evt: FocusEvent) => void): void {\n this._textFieldDelegate.inputElement.addEventListener('blur', (evt: FocusEvent) => listener(evt));\n }\n\n private _attachTextField(datePicker: IDatePickerComponent): void {\n const textFieldConfig: ITextFieldComponentDelegateConfig = {\n props: { ...this._config.options?.textFieldDelegateConfig?.props },\n options: { ...this._config.options?.textFieldDelegateConfig?.options }\n };\n this._textFieldDelegate = new TextFieldComponentDelegate(textFieldConfig);\n datePicker.appendChild(this._textFieldDelegate.element);\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\nimport { DatePickerComponent } from './date-picker';\n\nexport * from './date-picker';\nexport * from './date-picker-adapter';\nexport * from './date-picker-component-delegate';\nexport * from './date-picker-constants';\nexport * from './date-picker-foundation';\n\nexport function defineDatePickerComponent(): void {\n defineCustomElement(DatePickerComponent);\n}\n"],
|
|
5
|
+
"mappings": "wwBAEA,IAAMA,EAA2C,GAAGC,eAE9CC,EAAqB,CACzB,MAAO,OACT,EAEMC,EAAY,CAChB,MAAO,sCACT,EAEMC,EAAS,CACb,OAAQ,GAAGJ,WACX,KAAM,GAAGA,SACT,MAAO,GAAGA,UACV,MAAO,GAAGA,SACZ,EAEaK,EAAwB,CACnC,YAAAL,EACA,UAAAG,EACA,OAAAC,EACA,mBAAAF,CACF,ECbO,IAAMI,EAAN,cAAgCC,CAA0E,CAK/G,YAAYC,EAAiC,CAC3C,MAAMA,CAAS,EACf,KAAK,oBAAsB,qBAAqB,KAAK,aACvD,CAEU,kBAAyB,CACjC,KAAK,cAAgB,KAAK,WAAW,cAAcC,EAAsB,UAAU,KAAK,CAC1F,CAEU,6BAAoC,CAC5C,IAAMC,EAAgB,KAAK,yBAAyB,EACpD,KAAK,kBAAoB,IAAIC,EAAiBD,EAAe,KAAK,mBAAmB,CACvF,CAEO,eAAeE,EAAsC,CA9B9D,IAAAC,GA+BIA,EAAA,KAAK,aAAL,MAAAA,EAAiB,UACjB,KAAK,WAAa,IAAIC,EAAc,KAAK,cAAeF,CAAO,CACjE,CAEO,aAAoB,CAnC7B,IAAAC,GAoCIA,EAAA,KAAK,aAAL,MAAAA,EAAiB,UACjB,KAAK,WAAa,MACpB,CAEO,yBAAgC,CACrC,KAAK,cAAc,aAAa,eAAgB,KAAK,EACrD,KAAK,cAAc,aAAa,cAAe,KAAK,EACpD,KAAK,cAAc,aAAa,iBAAkB,KAAK,EACvD,KAAK,cAAc,aAAa,aAAc,OAAO,EACrD,KAAK,cAAc,aAAa,OAAQ,UAAU,EAClD,KAAK,cAAc,aAAa,YAAa,WAAW,EACxD,KAAK,cAAc,aAAa,cAAe,MAAM,EACrD,KAAK,cAAc,aAAa,gBAAiB,MAAM,EACvD,KAAK,cAAc,aAAa,gBAAiB,OAAO,EACxD,KAAK,cAAc,aAAa,YAAa,KAAK,mBAAmB,CACvE,CAEO,iBAAiBE,EAAcC,EAAkCC,EAAyB,CArDnG,IAAAJ,GAsDIA,EAAA,KAAK,gBAAL,MAAAA,EAAoB,iBAAiBE,EAAMC,EAAU,CAAE,QAAAC,CAAQ,EACjE,CAEO,oBAAoBF,EAAcC,EAAkCC,EAAyB,CAzDtG,IAAAJ,GA0DIA,EAAA,KAAK,gBAAL,MAAAA,EAAoB,oBAAoBE,EAAMC,EAAU,CAAE,QAAAC,CAAQ,EACpE,CAEO,6BAA6BC,EAAcF,EAAsC,CACtF,KAAK,2BAA2B,EAChC,IAAMG,EAAoBC,EAAkBF,EAAS,KAAK,cAAe,QAASF,CAAQ,EAC1F,KAAK,sBAAsB,KAAKG,CAAiB,CACnD,CAEO,iBAA2B,CAChC,MAAO,CAAC,CAAC,KAAK,aAChB,CAEgB,eAAeE,EAAgEC,EAAqD,CAClJ,MAAM,eAAeD,EAAgBC,CAAc,EACnD,KAAK,cAAc,aAAa,gBAAiB,MAAM,CACzD,CAEgB,gBAAuB,CACrC,MAAM,eAAe,EACjB,KAAK,gBACP,KAAK,cAAc,aAAa,gBAAiB,OAAO,EACxD,KAAK,cAAc,gBAAgB,uBAAuB,EAE9D,CAEO,oBAAoBC,EAAkB,CAC3C,KAAK,cAAc,aAAa,wBAAyBA,CAAE,CAC7D,CAEO,cAAcC,EAAeC,EAA2B,CACzD,KAAK,cAAc,QAAUD,IAIjC,KAAK,cAAc,MAAQA,EAEvB,KAAK,YACP,KAAK,WAAW,WAAW,EAGzBC,IACF,KAAK,cAAc,cAAc,IAAI,MAAM,QAAQ,CAAC,EACpD,KAAK,cAAc,cAAc,IAAI,MAAM,OAAO,CAAC,GAEvD,CAEO,iBAA2B,CAChC,OAAO,KAAK,cAAc,QAC5B,CAEO,gBAA0B,CAC/B,OAAOC,EAAiB,IAAM,KAAK,aACrC,CAEO,eAAwB,CAC7B,OAAO,KAAK,WAAa,KAAK,WAAW,YAAc,KAAK,cAAc,KAC5E,CAEO,YAAYF,EAAsB,CACvC,KAAK,cAAc,SAAWA,EAC9B,KAAK,cAAc,aAAa,gBAAiBA,EAAM,SAAS,CAAC,EAC7D,KAAK,iBACP,KAAK,eAAe,aAAa,gBAAiBA,EAAM,SAAS,CAAC,EAC9D,KAAK,eAAe,eAAe,UAAU,IAC9C,KAAK,eAAqC,SAAWA,GAG5D,CAEO,eAAsB,CAC3B,KAAK,cAAc,MAAM,CAC3B,CAEO,cAAqB,CAC1B,KAAK,cAAc,KAAK,CAC1B,CAEO,iBAAwB,CAC7B,KAAK,cAAc,OAAO,CAC5B,CAEO,eAAeT,EAAcY,EAAkB,CACpDC,EAAU,KAAK,cAAeb,EAAMY,CAAI,CAC1C,CACF,ECtIO,IAAME,EAAN,cAAmCC,CAAsH,CAG9J,YAAYC,EAA6B,CACvC,MAAMA,CAAO,EAHf,KAAU,MAAsB,QAIhC,CAEU,kBAAyB,CAC5B,KAAK,SACR,KAAK,OAAS,KAAK,iBAAiB,KAAK,SAAS,cAAc,CAAC,EAErE,CAEU,iBAAiBC,EAAgCC,EAA0B,CACnF,IAAMC,EAAa,KAAK,eAAeF,CAAK,EAE5C,OADsB,KAAK,SAAS,cAAcG,EAAsB,OAAO,OAAQD,EAAY,GAAM,CAACD,CAAK,GAE7G,KAAK,UAAUD,CAAK,EACb,IAEF,EACT,CAEU,gBAAuB,CAC/B,KAAK,SAAS,cAAcG,EAAsB,OAAO,KAAM,OAAW,EAAK,CACjF,CAEU,iBAAwB,CAChC,KAAK,SAAS,cAAcA,EAAsB,OAAO,MAAO,OAAW,EAAK,CAClF,CAEU,UAAiB,CACzB,IAAMC,EAAQ,IAAI,KAClBA,EAAM,SAAS,EAAG,EAAG,EAAG,CAAC,EACzB,KAAK,gBAAgB,CAAE,KAAMA,EAAO,SAAU,GAAM,KAAM,MAAO,CAAC,CACpE,CAEU,UAAiB,CACzB,KAAK,gBAAgB,CAAE,KAAM,KAAM,SAAU,GAAO,KAAM,MAAO,CAAC,CACpE,CAEU,kBAA4C,CACpD,OAAO,KAAK,MACd,CAEU,wBAAwBC,EAAsC,CACtE,IAAMC,EAAgB,KAAK,YAAY,KAAK,MAAM,EAC9CA,EACF,KAAK,SAAS,cAAcA,EAAeD,EAAuB,GAAQ,KAAK,wBAAwB,EAElG,KAAK,mBACR,KAAK,SAAS,cAAc,GAAIA,EAAuB,GAAQ,KAAK,wBAAwB,CAGlG,CAEU,UAAUL,EAA2B,EACzC,CAACA,GAAS,KAAK,uBAAuBA,CAAK,KAC7C,KAAK,OAASA,EAElB,CAEU,gBAAgBO,EAA2C,CACnE,IAAMP,EAAQO,EAAM,KAMpB,GAJIA,EAAM,OAAS,QACjB,KAAK,eAAe,EAAI,EAGtB,CAAC,KAAK,iBAAiBP,CAAK,EAC9B,OAGF,IAAMQ,EAAiB,KAAK,YAAYR,CAAK,EAE7C,KAAK,SAAS,cAAcQ,EAAgB,KAAK,wBAAwB,EACzE,KAAK,kBAAkB,EAElBC,EAAS,UACZ,KAAK,SAAS,gBAAgB,CAElC,CAEmB,cAAcC,EAA+B,CAC9D,MAAM,cAAcA,CAAa,EAEjC,IAAMC,EAAe,KAAK,iBAAiB,EACrCA,GACJ,KAAK,SAAS,iBAAiB,IAAI,KAAKA,CAAY,CAAC,CAEzD,CAEmB,WAAkB,CAC/B,KAAK,QAAU,CAAC,KAAK,uBAAuB,KAAK,MAAM,IACzD,KAAK,iBAAiB,KAAM,EAAI,EAChC,KAAK,wBAAwB,GAE/B,MAAM,UAAU,CAClB,CAEmB,WAAkB,CAC/B,KAAK,QAAU,CAAC,KAAK,uBAAuB,KAAK,MAAM,IACzD,KAAK,iBAAiB,KAAM,EAAI,EAChC,KAAK,wBAAwB,GAE/B,MAAM,UAAU,CAClB,CAEU,qBAA4B,CAChC,KAAK,QAAU,CAAC,KAAK,uBAAuB,KAAK,MAAM,IACzD,KAAK,iBAAiB,KAAM,EAAI,EAChC,KAAK,wBAAwB,EAEjC,CAEU,0BAAiC,CACrC,KAAK,QAAU,CAAC,KAAK,uBAAuB,KAAK,MAAM,IACzD,KAAK,iBAAiB,KAAM,EAAI,EAChC,KAAK,wBAAwB,EAEjC,CAEU,aAAaX,EAAqB,CAC1C,IAAMY,EAAiB,KAAK,wBAAwBZ,CAAK,EACnDa,EAAO,KAAK,iBAAiBD,CAAc,EAC7C,KAAK,SACP,KAAK,SAAS,eAAeT,EAAsB,OAAO,MAAOS,CAAc,EAE7E,CAACE,EAAWD,EAAM,KAAK,MAAM,GAAK,KAAK,uBAAuBA,CAAI,GACpE,KAAK,iBAAiBA,CAAI,CAE9B,CAEU,qBAAqBb,EAAqB,CAClD,IAAMY,EAAiB,KAAK,wBAAwBZ,CAAK,EACzD,GAAI,KAAK,SAAWY,EAGlB,OAEF,IAAMC,EAAO,KAAK,iBAAiBD,CAAc,EAC7C,CAACE,EAAWD,EAAM,KAAK,MAAM,GAAK,KAAK,uBAAuBA,CAAI,IACpE,KAAK,MAAQA,EACb,KAAK,iBAAiB,KAAK,MAAM,EAErC,CAEQ,aAAoB,CAC1B,KAAK,wBAAwB,EACzB,KAAK,OACP,KAAK,SAAS,iBAAiB,KAAK,MAAM,CAE9C,CAEA,IAAW,OAA0C,CACnD,IAAMA,EAAO,KAAK,eAAe,KAAK,MAAM,EAE5C,OAAKA,EAIDE,EAAOF,CAAI,EACN,IAAI,KAAKA,EAAK,QAAQ,CAAC,EAGzBA,EAPE,IAQX,CAEA,IAAW,MAAMb,EAAyC,CACpD,KAAK,SAAWA,IAClB,KAAK,UAAU,KAAK,iBAAiBA,CAAK,CAAC,EACvC,KAAK,gBACP,KAAK,YAAY,EAGvB,CACF,EC7KA,IAAMgB,EAAW,qCACXC,EAAS,oDA+BFC,EAAN,cAAkCC,CAA+G,CACtJ,WAAkB,oBAA+B,CAC/C,MAAO,CACL,GAAG,OAAO,OAAOC,EAA2B,kBAAkB,EAC9DC,EAAsB,mBAAmB,KAC3C,CACF,CAEA,aAAc,CACZ,MAAM,EACNC,EAAa,OAAOC,CAAuB,EAC3CC,EAAqB,KAAMR,EAAUC,CAAM,EAC3C,KAAK,YAAc,IAAIQ,EAAqB,IAAIC,EAAkB,IAAI,CAAC,CACzE,CAEO,yBAAyBC,EAAcC,EAAkBC,EAAwB,CACtF,OAAQF,EAAM,CACZ,KAAKN,EAAsB,mBAAmB,MAC5C,KAAK,MAAQQ,EACb,MACJ,CACA,MAAM,yBAAyBF,EAAMC,EAAUC,CAAQ,CACzD,CACF,EAvBaX,EAANY,EAAA,CATNC,EAAc,CACb,KAAMV,EAAsB,YAC5B,aAAc,CACZW,EACAC,EACAC,EACAC,CACF,CACF,CAAC,GACYjB,GC/BN,IAAMkB,EAAN,cAA0CC,CAAsF,CAGrI,YAAYC,EAA6C,CACvD,MAAMA,CAAM,CACd,CAEU,QAA+B,CACvC,IAAMC,EAAa,SAAS,cAAcC,EAAsB,WAAW,EAC3E,YAAK,iBAAiBD,CAAU,EACzBA,CACT,CAEO,iBAAoC,CACzC,OAAO,KAAK,mBAAmB,YACjC,CAEO,qBAA2C,CAChD,OAAO,KAAK,mBAAmB,OACjC,CAEA,IAAW,OAAa,CACtB,OAAO,KAAK,SAAS,KACvB,CACA,IAAW,MAAME,EAAY,CAC3B,KAAK,SAAS,MAAQA,CACxB,CAEA,IAAW,UAAoB,CAC7B,OAAO,KAAK,SAAS,QACvB,CACA,IAAW,SAASA,EAAgB,CAClC,KAAK,SAAS,SAAWA,CAC3B,CAEA,IAAW,SAAmB,CAC5B,OAAO,KAAK,mBAAmB,SAAW,EAC5C,CACA,IAAW,QAAQA,EAAgB,CACjC,KAAK,mBAAmB,QAAUA,CACpC,CAEO,SAASC,EAAyC,CACnD,KAAK,SAAS,OAChB,KAAK,SAAS,iBAAiBF,EAAsB,OAAO,MAAOG,GAAOD,EAAUC,EAAI,OAA4B,KAAK,CAAC,EAE1H,KAAK,gBAAgB,EAAE,iBAAiB,QAASA,GAAOD,EAAUC,EAAI,OAA4B,KAAK,CAAC,CAE5G,CAEO,QAAQD,EAAyC,CAClD,KAAK,SAAS,OAChB,KAAK,SAAS,iBAAiBF,EAAsB,OAAO,MAAQG,GAAqBD,EAASC,EAAI,MAAM,CAAC,EAE7G,KAAK,mBAAmB,aAAa,iBAAiB,QAASA,GAAOD,EAAUC,EAAI,OAA4B,KAAK,CAAC,CAE1H,CAEO,QAAQD,EAA2C,CACxD,KAAK,mBAAmB,aAAa,iBAAiB,QAAUC,GAAoBD,EAASC,CAAG,CAAC,CACnG,CAEO,OAAOD,EAA2C,CACvD,KAAK,mBAAmB,aAAa,iBAAiB,OAASC,GAAoBD,EAASC,CAAG,CAAC,CAClG,CAEQ,iBAAiBJ,EAAwC,CA/EnE,IAAAK,EAAAC,EAAAC,EAAAC,EAgFI,IAAMC,EAAqD,CACzD,MAAOC,EAAA,IAAKJ,GAAAD,EAAA,KAAK,QAAQ,UAAb,YAAAA,EAAsB,0BAAtB,YAAAC,EAA+C,OAC3D,QAASI,EAAA,IAAKF,GAAAD,EAAA,KAAK,QAAQ,UAAb,YAAAA,EAAsB,0BAAtB,YAAAC,EAA+C,QAC/D,EACA,KAAK,mBAAqB,IAAIG,EAA2BF,CAAe,EACxET,EAAW,YAAY,KAAK,mBAAmB,OAAO,CACxD,CACF,EC9EO,SAASY,IAAkC,CAChDC,EAAoBC,CAAmB,CACzC",
|
|
6
|
+
"names": ["elementName", "COMPONENT_NAME_PREFIX", "observedAttributes", "selectors", "events", "DATE_PICKER_CONSTANTS", "DatePickerAdapter", "BaseDatePickerAdapter", "component", "DATE_PICKER_CONSTANTS", "targetElement", "CalendarDropdown", "options", "_a", "DateInputMask", "type", "listener", "capture", "context", "destroyListenerCb", "listenOwnProperty", "calendarConfig", "dropdownConfig", "id", "value", "emitEvents", "getActiveElement", "data", "emitEvent", "DatePickerFoundation", "BaseDatePickerFoundation", "adapter", "value", "force", "typedValue", "DATE_PICKER_CONSTANTS", "today", "suppressValueChanges", "formattedDate", "event", "formattedValue", "Platform", "emitOpenEvent", "currentValue", "sanitizedValue", "date", "isSameDate", "isDate", "template", "styles", "DatePickerComponent", "BaseDatePickerComponent", "BASE_DATE_PICKER_CONSTANTS", "DATE_PICKER_CONSTANTS", "IconRegistry", "tylIconInsertInvitation", "attachShadowTemplate", "DatePickerFoundation", "DatePickerAdapter", "name", "oldValue", "newValue", "__decorateClass", "CustomElement", "PopupComponent", "CalendarComponent", "IconButtonComponent", "IconComponent", "DatePickerComponentDelegate", "FormFieldComponentDelegate", "config", "datePicker", "DATE_PICKER_CONSTANTS", "value", "listener", "evt", "_a", "_b", "_c", "_d", "textFieldConfig", "__spreadValues", "TextFieldComponentDelegate", "defineDatePickerComponent", "defineCustomElement", "DatePickerComponent"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{d as f}from"./chunk.OAHA3QOH.js";import{a as t}from"./chunk.GO5A4GKZ.js";import{e as E}from"./chunk.UV3WIHCM.js";import{a as r}from"./chunk.NVUMRW44.js";import{a as m}from"./chunk.TKDMM2ZZ.js";import{g as n,l as g}from"./chunk.QH2GB3PD.js";import{f as _,g as b,m as u,o as L,s as c,t as h,z as v}from"./chunk.CFDK4RCW.js";import{k as d}from"./chunk.J2M2MXP2.js";import{d as o}from"./chunk.M3QDAYD2.js";var S=class extends m{constructor(e){super(e);this._valueChangeListeners=[]}initialize(e){this._rootElement=n(this._component,e),this._labelSlot=n(this._component,"slot[name=label]"),this._leadingSlot=n(this._component,"slot[name=leading]"),this._trailingSlot=n(this._component,"slot[name=trailing]"),this._addonEndSlot=n(this._component,"slot[name=addon-end]"),this._inputElement=this._component.querySelector("input:not([type=checkbox]):not([type=radio])"),this.detectLabel()}destroy(){this._inputMutationObserver&&this._inputMutationObserver.disconnect()}hasLabel(){return!!this._labelElement}ensureSlottedLabel(){this._labelElement.slot="label"}ensureLabelOrder(){if(this._labelElement){let e=Array.from(this._component.children);e.length>1&&e.indexOf(this._labelElement)<e.indexOf(this._inputElement)&&this._component.appendChild(this._labelElement)}}addLabelSlotListener(e){this._labelSlot.addEventListener("slotchange",e)}removeLabelSlotListener(e){this._labelSlot&&this._labelSlot.removeEventListener("slotchange",e)}addLeadingSlotListener(e){this._leadingSlot.addEventListener("slotchange",e)}removeLeadingSlotListener(e){this._leadingSlot&&this._leadingSlot.removeEventListener("slotchange",e)}addTrailingSlotListener(e){this._trailingSlot.addEventListener("slotchange",e)}removeTrailingSlotListener(e){this._trailingSlot&&this._trailingSlot.removeEventListener("slotchange",e)}addAddonEndSlotListener(e){this._addonEndSlot.addEventListener("slotchange",e)}removeAddonEndSlotListener(e){this._addonEndSlot&&this._addonEndSlot.removeEventListener("slotchange",e)}addInputListener(e,s){this._inputElement.addEventListener(e,s)}removeInputListener(e,s){this._inputElement&&this._inputElement.removeEventListener(e,s)}setValueChangedListener(e,s){this.destroyValueChangeListener();let a=E(e,this._inputElement,"value",s);this._valueChangeListeners.push(a)}destroyValueChangeListener(){this._valueChangeListeners.forEach(e=>e())}detectLabel(){this._labelElement=this._component.querySelector("label")}initializeFloatingLabel(){return new f(this._labelElement)}inputHasValue(){return this._inputElement.value?this._inputElement.value.trim().length>0:!1}fieldHasValue(){return this.inputHasValue()}hasPlaceholder(){return this._inputElement.placeholder?this._inputElement.placeholder.trim().length>0:!1}inputHasFocus(e){return this._inputElement===e||this._inputElement===c()}setLabelClass(e){this._labelElement&&this._labelElement.classList.add(e)}removeLabelClass(e){this._labelElement&&this._labelElement.classList.remove(e)}isLabelFloating(){return this._component.hasAttribute(t.attributes.HOST_LABEL_FLOATING)}setRoomy(e){h(this._rootElement,e,t.classes.ROOMY)}setDense(e){h(this._rootElement,e,t.classes.DENSE)}hasLeadingNodes(){return this._leadingSlot?this._leadingSlot.assignedNodes().length>0:!1}hasTrailingNodes(){return this._trailingSlot?this._trailingSlot.assignedNodes().length>0:!1}hasAddonEndNodes(){return this._addonEndSlot?this._addonEndSlot.assignedNodes().length>0:!1}setInputClass(e){this._inputElement.classList.add(e)}removeInputClass(e){this._inputElement.classList.remove(e)}setRootClass(e){_(e,this._rootElement)}removeRootClass(e){b(e,this._rootElement)}setInputAttributeObserver(e){this._inputMutationObserver=v(this._inputElement,e,t.observedInputAttributes)}isDisabled(){return this._inputElement.hasAttribute("disabled")}isReadonly(){return this._inputElement.hasAttribute("readonly")}getLabelWidth(e,s){return L(this._labelElement.innerText,{fontSize:e,fontFamily:s})}getLabelFontMetrics(){let e=getComputedStyle(this._labelElement);return{fontSize:parseInt(e.fontSize||"16",10),fontFamily:e.fontFamily||"Roboto"}}};var y=class{constructor(i){this._adapter=i;this._density="default";this._shape="default";this._invalid=!1;this._required=!1;this._floatLabelType="auto";this._isInitialized=!1;this._labelSlotListener=e=>this._onLabelSlotChanged(e),this._leadingSlotListener=e=>this._onLeadingSlotChanged(e),this._trailingSlotListener=e=>this._onTrailingSlotChanged(e),this._addonEndSlotListener=e=>this._onAddonEndSlotChanged(e),this._focusListener=e=>this._onFocus(e),this._blurListener=e=>this._onBlur(e),this._valueChangedListener=e=>this._onValueChanged(e),this._inputAttributeChangedListener=(e,s)=>this._onInputAttributeChanged(e,s)}initialize(){this._adapter.initialize(""),this._adapter.hasLabel()&&this._adapter.ensureSlottedLabel(),this._initializeLabel(),this._adapter.hasPlaceholder()&&(this._floatLabelType="always"),this._detectSlottedContent(),this._adapter.addLabelSlotListener(this._labelSlotListener),this._adapter.addLeadingSlotListener(this._leadingSlotListener),this._adapter.addTrailingSlotListener(this._trailingSlotListener),this._adapter.addAddonEndSlotListener(this._addonEndSlotListener),this._adapter.setValueChangedListener(this,this._valueChangedListener),this._adapter.addInputListener("focus",this._focusListener),this._adapter.addInputListener("blur",this._blurListener),this._adapter.setInputAttributeObserver(this._inputAttributeChangedListener),this._applyDensity(),this._setShapeType(),this._setValidity(),this._adapter.isDisabled()?this._adapter.setRootClass(t.classes.DISABLED):this._adapter.removeRootClass(t.classes.DISABLED),this._adapter.isReadonly()?this._adapter.setRootClass(t.classes.READONLY):this._adapter.removeRootClass(t.classes.READONLY),this._floatLabelType==="always"&&this.floatLabel(!0),this._isInitialized=!0}disconnect(){this._isInitialized=!1,this._adapter.destroy(),this._floatingLabel&&(this._floatingLabel.destroy(),this._floatingLabel=void 0),this._adapter.removeLabelSlotListener(this._labelSlotListener),this._adapter.removeLeadingSlotListener(this._leadingSlotListener),this._adapter.removeTrailingSlotListener(this._trailingSlotListener),this._adapter.removeAddonEndSlotListener(this._addonEndSlotListener),this._adapter.removeInputListener("focus",this._focusListener),this._adapter.removeInputListener("blur",this._blurListener),this._adapter.destroyValueChangeListener()}get density(){return this._density}set density(i){this._density!==i&&(this._density=i,this._isInitialized&&(this._applyDensity(),this._initializeLabel()),this._adapter.setHostAttribute(t.attributes.DENSITY,this._density.toString()))}get floatLabelType(){return this._floatLabelType}set floatLabelType(i){this._floatLabelType!==i&&(this._floatLabelType=i,this._isInitialized&&this.floatLabel(this._floatLabelType==="always"),this._adapter.setHostAttribute(t.attributes.FLOAT_LABEL_TYPE,this._floatLabelType))}get shape(){return this._shape}set shape(i){this._shape!==i&&(this._shape=i,this._isInitialized&&this._setShapeType(),this._adapter.setHostAttribute(t.attributes.SHAPE,this._shape))}get invalid(){return this._invalid}set invalid(i){this._invalid!==i&&(this._invalid=i,this._isInitialized&&this._setValidity())}get required(){return this._required}set required(i){this._required!==i&&(this._required=i,this._isInitialized&&this._setValidity(),this._required?this._adapter.setHostAttribute(t.attributes.REQUIRED):this._adapter.removeHostAttribute(t.attributes.REQUIRED))}floatLabel(i){var e,s;if(!(((e=this._floatingLabel)==null?void 0:e.isFloating)===i||this._adapter.isLabelFloating()===i)){if(!i&&this._floatLabelType==="always"){(s=this._floatingLabel)==null||s.float(!0,!0),this._adapter.setHostAttribute(t.attributes.HOST_LABEL_FLOATING,"");return}this._floatingLabel&&(this._floatingLabel.float(i,this._floatLabelType==="always"),i?(this._adapter.setInputClass(t.classes.INPUT_FOCUSED),this._adapter.setHostAttribute(t.attributes.HOST_LABEL_FLOATING,"")):(this._adapter.removeInputClass(t.classes.INPUT_FOCUSED),this._adapter.removeHostAttribute(t.attributes.HOST_LABEL_FLOATING)))}}_onLabelSlotChanged(i){this._initializeLabel()}_onLeadingSlotChanged(i){this._detectLeadingContent()}_onTrailingSlotChanged(i){this._detectTrailingContent()}_onAddonEndSlotChanged(i){this._detectAddonEndContent()}_initializeLabel(){this._floatingLabel&&this._floatingLabel.destroy(),this._adapter.detectLabel(),this._adapter.hasLabel()&&this._density!=="dense"?(this._floatingLabel=this._adapter.initializeFloatingLabel(),this._adapter.ensureLabelOrder(),this.floatLabel(this._floatLabelType==="always"||this._adapter.fieldHasValue()||this._adapter.hasPlaceholder()),this._adapter.setRootClass(t.classes.LABEL)):(this._adapter.removeHostAttribute(t.attributes.HOST_LABEL_FLOATING),this._adapter.removeRootClass(t.classes.LABEL),this._floatingLabel=void 0)}_detectLeadingContent(){this._adapter.hasLeadingNodes()?this._adapter.setRootClass(t.classes.LEADING):this._adapter.removeRootClass(t.classes.LEADING)}_detectTrailingContent(){this._adapter.hasTrailingNodes()?this._adapter.setRootClass(t.classes.TRAILING):this._adapter.removeRootClass(t.classes.TRAILING)}_detectAddonEndContent(){this._adapter.hasAddonEndNodes()?this._adapter.setRootClass(t.classes.ADDON_END):this._adapter.removeRootClass(t.classes.ADDON_END)}_detectSlottedContent(){this._detectLeadingContent(),this._detectTrailingContent(),this._detectAddonEndContent()}_onFocus(i){this._adapter.setRootClass(t.classes.FOCUSED),this._adapter.setLabelClass(t.classes.LABEL_FOCUSED),this.floatLabel(!0)}_onBlur(i){this._adapter.inputHasFocus(i.relatedTarget)||(this._adapter.removeRootClass(t.classes.FOCUSED),this._adapter.removeLabelClass(t.classes.LABEL_FOCUSED),!this._adapter.fieldHasValue()&&!this._adapter.hasPlaceholder()&&(this.floatLabel(!1),this._adapter.removeHostAttribute(t.attributes.HOST_LABEL_FLOATING)))}_onValueChanged(i){this._adapter.fieldHasValue()?this.floatLabel(!0):!this._adapter.inputHasFocus()&&!this._adapter.hasPlaceholder()&&this.floatLabel(!1)}_onInputAttributeChanged(i,e){switch(this._adapter.isDisabled()?(this._adapter.setRootClass(t.classes.DISABLED),this._adapter.removeRootClass(t.classes.FOCUSED),this._adapter.removeInputClass(t.classes.INPUT_FOCUSED),this._adapter.removeLabelClass(t.classes.LABEL_FOCUSED),!this._adapter.fieldHasValue()&&!this._adapter.hasPlaceholder()&&this._floatingLabel&&this.floatLabel(!1)):this._adapter.removeRootClass(t.classes.DISABLED),this._adapter.isReadonly()?this._adapter.setRootClass(t.classes.READONLY):(this._adapter.removeRootClass(t.classes.READONLY),this._adapter.removeRootClass(t.classes.FOCUSED),this._adapter.removeInputClass(t.classes.INPUT_FOCUSED)),i){case"readonly":case"disabled":this._adapter.inputHasFocus()&&(this._adapter.setRootClass(t.classes.FOCUSED),this._adapter.setInputClass(t.classes.INPUT_FOCUSED),this._adapter.setLabelClass(t.classes.LABEL_FOCUSED));break;case"value":this._floatingLabel&&this.floatLabel(this._adapter.fieldHasValue());break;case"placeholder":if(this._floatingLabel){let s=!!e&&!!e.trim()||this._adapter.fieldHasValue();s!==this._floatingLabel.isFloating&&this.floatLabel(s)}break}}_setShapeType(){this._shape==="rounded"?this._adapter.setRootClass(t.classes.SHAPE_ROUNDED):this._adapter.removeRootClass(t.classes.SHAPE_ROUNDED)}_setValidity(){this._invalid?this._adapter.setRootClass(t.classes.INVALID):this._adapter.removeRootClass(t.classes.INVALID),this._required?this._adapter.setRootClass(t.classes.REQUIRED):this._adapter.removeRootClass(t.classes.REQUIRED)}_applyDensity(){this._adapter.setRoomy(this._density==="roomy"),this._adapter.setDense(this._density==="dense")}};var l=class extends g{constructor(){super()}static get observedAttributes(){return[t.attributes.DENSITY,t.attributes.FLOAT_LABEL_TYPE,t.attributes.SHAPE,t.attributes.INVALID,t.attributes.REQUIRED]}connectedCallback(){this.querySelector(t.selectors.INPUT)?this._initialize():u(this,t.selectors.INPUT).then(()=>this._initialize())}_initialize(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,s,a){switch(e){case t.attributes.DENSITY:this.density=a;break;case t.attributes.FLOAT_LABEL_TYPE:this.floatLabelType=a;break;case t.attributes.SHAPE:this.shape=a;break;case t.attributes.INVALID:this.invalid=d(a);break;case t.attributes.REQUIRED:this.required=d(a);break}}floatLabel(e){this._foundation.floatLabel(e)}};o([r()],l.prototype,"density",2),o([r()],l.prototype,"floatLabelType",2),o([r()],l.prototype,"shape",2),o([r()],l.prototype,"invalid",2),o([r()],l.prototype,"required",2);export{S as a,y as b,l as c};
|
|
7
|
+
//# sourceMappingURL=chunk.RMPS2I2P.js.map
|