@agile-team/mach-table 0.34.2 → 0.35.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -1
- package/dist/adapter.cjs +1 -1
- package/dist/adapter.d.cts +6 -6
- package/dist/adapter.d.ts +6 -6
- package/dist/adapter.js +1 -1
- package/dist/analysis.d.cts +2 -2
- package/dist/analysis.d.ts +2 -2
- package/dist/{api-CUQtfQR4.d.cts → api-Di5SQHAP.d.cts} +13 -1
- package/dist/{api-CUQtfQR4.d.ts → api-Di5SQHAP.d.ts} +13 -1
- package/dist/business.d.cts +1 -1
- package/dist/business.d.ts +1 -1
- package/dist/{configuration-BNK9jzn2.d.cts → configuration-DlRW86iR.d.cts} +1 -1
- package/dist/{configuration-D4gQ2s21.d.ts → configuration-nh5lvWDe.d.ts} +1 -1
- package/dist/import.d.cts +1 -1
- package/dist/import.d.ts +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +5 -5
- package/dist/mach-table.css +1 -1
- package/dist/multi-range.d.cts +1 -1
- package/dist/multi-range.d.ts +1 -1
- package/dist/ordering.cjs +1 -1
- package/dist/ordering.d.cts +1 -1
- package/dist/ordering.d.ts +1 -1
- package/dist/ordering.js +1 -1
- package/dist/preferences.d.cts +1 -1
- package/dist/preferences.d.ts +1 -1
- package/dist/server-side.cjs +1 -1
- package/dist/server-side.d.cts +1 -1
- package/dist/server-side.d.ts +1 -1
- package/dist/server-side.js +1 -1
- package/dist/{shared-h73PMB5p.d.ts → shared-BusgJSf4.d.ts} +1 -1
- package/dist/{shared-BgBZ4-2C.d.cts → shared-O6pPO8H8.d.cts} +1 -1
- package/dist/workbench.d.cts +3 -3
- package/dist/workbench.d.ts +3 -3
- package/dist/worker.d.cts +2 -2
- package/dist/worker.d.ts +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# @agile-team/mach-table
|
|
6
6
|
|
|
7
|
-
MachTable 0.
|
|
7
|
+
MachTable 0.35.1 的框架无关 TypeScript Core:零运行时依赖,提供行列双虚拟化、领域化 API、单元格/整行编辑、树与分组、随机访问远程数据、区段隔离状态持久化和可诊断扩展系统。本版统一完整表头宽度下限,覆盖初始布局、fit、状态恢复及交互缩列,内置插画空态与亮暗主题继续保留;可选 `/business` 的字典列策略、本地语义合计及字典缓存隔离继续兼容;普通根入口 API 和既有默认行为保持兼容。
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
pnpm add @agile-team/mach-table
|
|
@@ -144,3 +144,26 @@ const statusColumn = {
|
|
|
144
144
|
`sum` / `avg` / `min` / `max` 只聚合有限数,空数值集合返回 null,sum/avg 溢出返回 null;`count` 计全部记录,空集合为 0。自定义聚合保留原始输入。分组 ID 区分数字/文本/空值,旧展开路径仅在唯一时迁移,歧义报告错误。超大远程滚动使用有界物理坐标,API、滚轮和交互共用逻辑偏移;应用默认配置的 `dataProcessor` 使用每表工厂。完整边界与升级说明见[升级指南](https://github.com/ChenyCHENYU/MachTable/blob/main/docs/guide/upgrading.md)。
|
|
145
145
|
|
|
146
146
|
冻结区由正文视口统一管理滚动,原生焦点恢复和 `scrollIntoView` 不会单独改变其滚动位置。业务定位继续使用 `api.view.scrollToRow()`,无需页面补丁。
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
## 内容列宽与状态颜色(0.35)
|
|
150
|
+
|
|
151
|
+
未声明 `width` 的列默认按表头和已加载数据的显示文本测宽:每列均匀抽样最多 100 行,默认 80–360px,`minWidth/maxWidth` 可覆盖。长内容在单元格内省略,表格保留内部横向滚动;不为测宽请求远程数据或执行自定义渲染器。格式化、字典及状态标签文字都参与测量。图形/操作等特殊列请指定宽度。
|
|
152
|
+
|
|
153
|
+
```ts
|
|
154
|
+
const columns = [
|
|
155
|
+
{ field: "customer", headerName: "客户", maxWidth: 280 },
|
|
156
|
+
{ field: "status", headerName: "状态", status: true },
|
|
157
|
+
{ field: "planStatus", headerName: "计划状态", status: {
|
|
158
|
+
S1B: { label: "待复核", color: "danger" },
|
|
159
|
+
S1C: { label: "已完成", color: "success" },
|
|
160
|
+
special: { label: "特殊处理", color: "#8b5cf6" }
|
|
161
|
+
} }
|
|
162
|
+
];
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
`status` 复用主题标签,支持 `success/warning/danger/info/neutral` 及 CSS 颜色;未知代码保持中性,`0/false` 保留。字典/formatter 的文字可参与默认语义匹配;显式 renderer 优先。状态配置只控制展示,导出继续遵循原有列值政策。
|
|
166
|
+
|
|
167
|
+
普通布局尊重显式 `width` 和拖动后的宽度;`autoWidth: false` 保留原默认 150px。显式选择 `columnLayout: "fit"` 时仍按首选宽度比例铺满,360px 限制的是内容首选宽度,实际铺满仍遵循显式 minWidth/maxWidth;配置 `flex` 则主动允许本列吸收余量。手动调宽、列状态恢复及主动 `columns.fit()` 不受自动默认上限限制。更新数据或刷新单元格会重新测量,普通布局刷新复用结果。
|
|
168
|
+
|
|
169
|
+
表头默认完整展示,不省略。初始布局、fit、列宽恢复、API、鼠标和 Alt+方向键统一以完整标题及排序/筛选/列工具控件为最小宽度;显式 width/minWidth/maxWidth 不能把标题压窄,空间不足时表格内部横向滚动。360px 上限仅作用于数据内容的首选宽度,不截断表头。复杂自定义表头请显式提供 minWidth。
|
package/dist/adapter.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var P=Object.defineProperty;var de=Object.getOwnPropertyDescriptor;var ue=Object.getOwnPropertyNames;var pe=Object.prototype.hasOwnProperty;var fe=(e,t)=>{for(var n in t)P(e,n,{get:t[n],enumerable:!0})},me=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ue(t))!pe.call(e,r)&&r!==n&&P(e,r,{get:()=>t[r],enumerable:!(o=de(t,r))||o.enumerable});return e};var ge=e=>me(P({},"__esModule",{value:!0}),e);var Ee={};fe(Ee,{GRID_OPTION_KEYS:()=>re,GRID_OPTION_META:()=>oe,beginGridInput:()=>te,canReplaceGridData:()=>ee,createSelectControl:()=>Y,equivalentConfigValue:()=>O,equivalentGridOption:()=>F,mergeMachTableConfig:()=>ie,normalizeMachTableConfig:()=>S,readGridCell:()=>Q,resolveMachTableGridOptions:()=>se,resumeGrid:()=>Z,suspendGrid:()=>J,writeGridInput:()=>X});module.exports=ge(Ee);function O(e,t,n=2){if(Object.is(e,t))return!0;if(n<=0)return!1;if(Array.isArray(e)||Array.isArray(t))return!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length||e.length>100?!1:e.every((r,d)=>O(r,t[d],n-1));if(!K(e)||!K(t))return!1;let o=Object.keys(e);return o.length!==Object.keys(t).length||o.length>100?!1:o.every(r=>Object.prototype.hasOwnProperty.call(t,r)&&O(e[r],t[r],n-1))}function K(e){if(!e||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}var be=new Set(["defaultColDef","locale","components","columnTypes","aggFuncs","pagination","statusBar","watermark"]);function F(e,t,n){return Object.is(t,n)||be.has(e)&&O(t,n,3)}function h(e,t,n){let o=document.createElement(e);if(t&&(o.className=t),n)for(let r of Object.keys(n))o.setAttribute(r,n[r]);return o}function W(e,t){if(e.classList.add("mach-portal"),!t)return;let n=window.getComputedStyle(t);for(let o=0;o<n.length;o++){let r=n.item(o);if(!r.startsWith("--mach-"))continue;let d=n.getPropertyValue(r).trim();d&&e.style.setProperty(r,d)}e.style.colorScheme=n.colorScheme}function V(e,t,n){return e<t?t:e>n?n:e}var _=0;function B(e="rg"){return _++,`${e}-${_}`}var p=null;function z(e){p?.owner&&(e===p.owner||e.contains(p.owner))&&p.close()}function U(e){let t=e.target;p?.contains(t)||p?.close()}function E(){p?.reposition()}function q(e){e.key!=="Escape"||!p||(e.preventDefault(),e.stopImmediatePropagation(),p.close(!0))}function ye(e){p?.close!==e.close&&p?.close(),!p&&(p=e,document.addEventListener("mousedown",U,!0),document.addEventListener("keydown",q,!0),window.addEventListener("resize",E),window.addEventListener("scroll",E,!0))}function he(e){p?.close===e&&(p=null,document.removeEventListener("mousedown",U,!0),document.removeEventListener("keydown",q,!0),window.removeEventListener("resize",E),window.removeEventListener("scroll",E,!0))}function w(e,t){return t?`${e} ${t}`:e}function R(e){let t=[];return e.forEach((n,o)=>{n.disabled||t.push(o)}),t}function $(e,t,n){let o=R(e);if(o.length===0)return-1;let r=o.indexOf(t);return r<0?n>0?o[0]:o[o.length-1]:o[Math.max(0,Math.min(o.length-1,r+n))]}function G(e,t){return e.findIndex(n=>n.value===t&&!n.disabled)}function Y(e){let t=h("div",w("mach-select-control",e.classNames?.root)),n=h("select",w("mach-select-native",e.classNames?.native));n.hidden=!0,n.tabIndex=-1,n.setAttribute("aria-hidden","true");let o=h("button",w("mach-select-trigger",e.classNames?.trigger));o.type="button",o.setAttribute("role","combobox"),o.setAttribute("aria-haspopup","listbox"),o.setAttribute("aria-expanded","false"),o.setAttribute("aria-label",e.ariaLabel);let r=h("span",w("mach-select-value",e.classNames?.value)),d=h("span",w("mach-select-caret",e.classNames?.caret));d.setAttribute("aria-hidden","true"),o.append(r,d);let i=h("div",w("mach-select-listbox",e.classNames?.listbox));i.id=B("mach-select-listbox"),i.setAttribute("role","listbox"),i.setAttribute("aria-hidden","true"),o.setAttribute("aria-controls",i.id),t.append(n,o);let s=[...e.options],m=[],c=-1,g=!1,I=()=>e.themeSource??t.closest(".mach-root")??t,v=()=>{let a=s.find(l=>l.value===n.value);r.textContent=a?.label??n.value,m.forEach((l,b)=>{let u=s[b]?.value===n.value;l.setAttribute("aria-selected",u?"true":"false"),l.classList.toggle("mach-select-option--selected",u),l.classList.toggle("mach-select-option--active",b===c)}),o.setAttribute("aria-activedescendant",c>=0?m[c]?.id??"":"")},k=()=>{let a=o.getBoundingClientRect(),l=i.getBoundingClientRect(),b=Math.max(a.width,l.width),u=V(a.left,8,Math.max(8,window.innerWidth-b-8)),C=window.innerHeight-a.bottom-8,T=C<Math.min(l.height,240)&&a.top>C,f=T?Math.max(8,a.top-l.height-5):Math.min(window.innerHeight-l.height-8,a.bottom+5);i.style.minWidth=`${a.width}px`,i.style.left=`${u}px`,i.style.top=`${Math.max(8,f)}px`,i.classList.toggle("mach-select-listbox--above",T)},y=(a=!1)=>i.classList.contains("mach-select-listbox--open")?(i.classList.remove("mach-select-listbox--open","mach-select-listbox--above"),i.setAttribute("aria-hidden","true"),o.setAttribute("aria-expanded","false"),o.removeAttribute("aria-activedescendant"),i.remove(),he(y),a&&!g&&o.focus({preventScroll:!0}),!0):!1,le=(a,l=!0)=>{!s[a]||s[a].disabled||(c=a,v(),l&&m[a]?.scrollIntoView?.({block:"nearest"}))},M=()=>{g||o.disabled||i.classList.contains("mach-select-listbox--open")||(ye({owner:I(),close:y,contains:a=>t.contains(a)||i.contains(a),reposition:k}),c=G(s,n.value),c<0&&(c=R(s)[0]??-1),W(i,I()),document.body.appendChild(i),i.classList.add("mach-select-listbox--open"),i.setAttribute("aria-hidden","false"),o.setAttribute("aria-expanded","true"),k(),v(),m[c]?.scrollIntoView?.({block:"nearest"}))},L=a=>{let l=s[a];!l||l.disabled||(n.value=l.value,c=a,v(),y(!0),n.dispatchEvent(new Event("input",{bubbles:!0})),n.dispatchEvent(new Event("change",{bubbles:!0})))},N=(a,l)=>{s=[...a],n.replaceChildren(),i.replaceChildren(),m=s.map((u,C)=>{let T=document.createElement("option");T.value=u.value,T.textContent=u.label,T.disabled=u.disabled===!0,n.appendChild(T);let f=h("button",w("mach-select-option",e.classNames?.option));return f.id=`${i.id}-option-${C}`,f.type="button",f.tabIndex=-1,f.dataset.value=u.value,f.disabled=u.disabled===!0,f.setAttribute("role","option"),f.textContent=u.label,f.addEventListener("mousedown",ce=>ce.preventDefault()),f.addEventListener("click",()=>L(C)),i.appendChild(f),f});let b=s.find(u=>!u.disabled)?.value??"";n.value=l!=null&&s.some(u=>u.value===l)?l:b,c=G(s,n.value),v()},j=a=>{if(a.key==="Tab"){y();return}if(a.key==="Escape"){if(!y(!0))return;a.preventDefault(),a.stopPropagation();return}if(a.key==="Enter"||a.key===" "){a.preventDefault(),a.stopPropagation(),i.classList.contains("mach-select-listbox--open")?L(c):M();return}let l=c;if(a.key==="ArrowDown")l=$(s,c,1);else if(a.key==="ArrowUp")l=$(s,c,-1);else if(a.key==="Home")l=R(s)[0]??-1;else if(a.key==="End"){let b=R(s);l=b[b.length-1]??-1}else return;a.preventDefault(),a.stopPropagation(),i.classList.contains("mach-select-listbox--open")||M(),le(l)},H=()=>{c=G(s,n.value),v(),e.onChange?.(n.value)};return o.addEventListener("click",()=>{y()||M()}),o.addEventListener("keydown",j),n.addEventListener("change",H),N(s,e.value),{el:t,native:n,trigger:o,listbox:i,contains:a=>t.contains(a)||i.contains(a),isOpen:()=>i.classList.contains("mach-select-listbox--open"),open:M,close:y,focus:()=>o.focus({preventScroll:!0}),getValue:()=>n.value,setValue:a=>{n.value=a,c=G(s,a),v()},setOptions:N,destroy:()=>{g||(g=!0,y(),o.removeEventListener("keydown",j),n.removeEventListener("change",H),t.remove())}}}var x=Symbol.for("mach-table.adapter.lifecycle.v1");function J(e){if(e.isDestroyed())return;let t=e.view.getRoot();t&&z(t),e[x]?.suspend()}function Z(e){e.isDestroyed()||e[x]?.resume()}function Q(e,t,n){return e.isDestroyed()?"":e[x]?.readCell(t,n)??""}function X(e,t){e.isDestroyed()||e[x]?.writeInput(t)}function ee(e){return!e.isDestroyed()&&(e[x]?.canReplaceData()??!1)}var Te=Symbol.for("mach-table.import.v1");function we(e){let t=e[Te];if(!t)throw new TypeError("Import plans require a MachTable GridApi");return t}function te(e){return e.isDestroyed()?()=>!1:we(e).begin()}var ne={columnDefs:"array",rowData:"array",defaultColDef:"object",columnTypes:"object",rowKey:"unknown",rowHeight:"number",headerHeight:"number",rowBuffer:"number",columnLayout:"string",enableColumnResize:"boolean",domLayout:"string",rowSelection:"string",multiSort:"boolean",size:"string",stripedRows:"boolean",rowStyleRules:"array",showCellBorders:"boolean",theme:"string",quickFilterText:"string",advancedFilterModel:"object",masterDetail:"boolean",detailRowHeight:"number",detailRowRenderer:"function",isRowExpandable:"function",detailToggleColumn:"boolean",columnMenu:"boolean",aggFuncs:"object",components:"object",actionPolicy:"object",features:"array",initialState:"object",persistence:"boolean-object",locale:"object",editType:"string",editableIndicator:"string",rowEditValidator:"function",singleClickEdit:"boolean",manualSorting:"boolean",manualFiltering:"boolean",showSummary:"boolean",summaryMethod:"function",treeData:"boolean",childrenKey:"string",isTreeRowExpandable:"function",loadTreeChildren:"function",autoCheckedChildren:"boolean",defaultExpandAll:"boolean",indexOffset:"number",applyRowDrag:"boolean",rowDragPolicy:"object",undoStackSize:"number",asyncTransactionWaitMillis:"number",getRowHeight:"function",pinnedTopRowData:"array",pinnedBottomRowData:"array",pagination:"boolean-object",watermark:"boolean-object",suppressWarnings:"boolean",enableRangeSelection:"boolean",suppressClipboard:"boolean",contextMenu:"boolean",getContextMenuItems:"function",tooltipComponent:"function",tooltipShowDelay:"number",flashCells:"boolean",fillHandle:"boolean",statusBar:"boolean-object",datasource:"object",datasourceMode:"string",blockSize:"number",infiniteBufferRows:"number",maxBlocksInCache:"number",datasourceMaxConcurrentRequests:"number",blockPrefetch:"number",datasourceRowCount:"number",dataProcessor:"object-function",dataProcessorMinRows:"number",datasourceRetryCount:"number",datasourceRetryDelay:"number",datasourceRetryJitter:"number",suppressCellFocus:"boolean",suppressRowHoverHighlight:"boolean",suppressNoRowsOverlay:"boolean",suppressHeaderFocus:"boolean",ariaLabel:"string",ariaLabelledBy:"string",ariaDescribedBy:"string",loading:"boolean",error:"unknown",overlayNoRowsTemplate:"unknown",overlayLoadingTemplate:"unknown",overlayErrorTemplate:"unknown",allowUnsafeOverlayHtml:"boolean",className:"string"};function ve(){return Object.fromEntries(Object.entries(ne).map(([e,t])=>[e,{kind:t,update:e==="columnDefs"||e==="rowData"?e:e==="quickFilterText"?"quickFilter":"options"}]))}var oe=ve(),re=Object.freeze(Object.keys(ne));function A(e,t){return t===void 0?e:typeof t!="object"||t===null||typeof e!="object"||e===null?t:{...e,...t}}function De(e,t){return typeof e!="function"?t:typeof t!="function"?e:(...n)=>{let o;try{e(...n)}catch(r){o=r}try{t(...n)}catch(r){o??(o=r)}if(o!==void 0)throw o}}function Ce(e,t){if(!(!e.components&&!t.components))return{cellRenderers:{...e.components?.cellRenderers,...t.components?.cellRenderers},cellEditors:{...e.components?.cellEditors,...t.components?.cellEditors}}}function Oe(e,t){if(!e.columnTypes&&!t.columnTypes)return;let n={},o=new Set([...Object.keys(e.columnTypes??{}),...Object.keys(t.columnTypes??{})]);for(let r of o)n[r]={...e.columnTypes?.[r],...t.columnTypes?.[r]};return n}function xe(e,t,n){for(let o of new Set([...Object.keys(t),...Object.keys(n)])){if(!/^on[A-Z]/.test(o))continue;let r=t[o],d=n[o];typeof r!="function"||typeof d!="function"||(e[o]=De(r,d))}}function Me(e,t){let n={...e,...t,features:t.features??e.features};(e.defaultColDef||t.defaultColDef)&&(n.defaultColDef={...e.defaultColDef,...t.defaultColDef}),(e.locale||t.locale)&&(n.locale={...e.locale,...t.locale});let o=Ce(e,t);o&&(n.components=o);let r=Oe(e,t);return r&&(n.columnTypes=r),(e.aggFuncs||t.aggFuncs)&&(n.aggFuncs={...e.aggFuncs,...t.aggFuncs}),n.pagination=A(e.pagination,t.pagination),n.statusBar=A(e.statusBar,t.statusBar),n.watermark=A(e.watermark,t.watermark),xe(n,e,t),n}function D(...e){return e.reduce(Me,{})}function Ge(e){return e?(Array.isArray(e)?e:[e]).filter(t=>typeof t=="string"&&t.trim().length>0):[]}var Re=new Set(["rowData","columnDefs","datasource","loading","error","initialState","persistence","components","columnTypes","stateKey","stateStore","stateSaveDebounceMs","columnStateKey","columnStateStore"]);function ae(e,t,n){if(!t||typeof t!="object"||Array.isArray(t))return{};let o={};for(let[r,d]of Object.entries(t)){if(!Re.has(r)&&(r!=="dataProcessor"||d==null||typeof d=="function")){o[r]=d;continue}let i={code:n==="defaults"?"INVALID_DEFAULT_OPTION":"INVALID_PRESET_OPTION",option:r,layer:n,message:r==="dataProcessor"?`[MachTable] "dataProcessor" in config ${n} must be a factory returning a fresh per-grid instance.`:`[MachTable] "${r}" is instance-only and cannot be declared in config ${n}.`};if(e.onConfigWarning?.(i),e.strict!==!1)throw new TypeError(i.message)}return o}function S(e={}){let t=ae(e,e.defaults,"defaults");return{defaults:D({columnTypes:e.columnTypes,components:e.components},t),presets:Object.fromEntries(Object.entries(e.presets??{}).map(([n,o])=>[n,D(ae(e,o,`preset:${n}`))])),defaultPreset:e.defaultPreset??!1,strict:e.strict!==!1,...e.onConfigWarning?{onConfigWarning:e.onConfigWarning}:{}}}function ie(e,t){let n=S({...t,strict:t.strict??e.strict,onConfigWarning:t.onConfigWarning??e.onConfigWarning}),o={...e.presets};for(let[r,d]of Object.entries(n.presets))o[r]=D(e.presets[r]??{},d);return{defaults:D(e.defaults,n.defaults),presets:o,defaultPreset:t.defaultPreset===void 0?e.defaultPreset:t.defaultPreset,strict:t.strict??e.strict,...t.onConfigWarning??e.onConfigWarning?{onConfigWarning:t.onConfigWarning??e.onConfigWarning}:{}}}function se(e,t,n,o){let r=t===void 0?e.defaultPreset:t,d=[{name:"application defaults",options:e.defaults}];for(let s of Ge(r)){let m=e.presets[s];if(!m){let c={code:"UNKNOWN_PRESET",preset:s,message:`[MachTable] Unknown preset "${s}". Register it in mach-table.config.ts or remove the preset.`};o?o(c):e.onConfigWarning?e.onConfigWarning(c):console.warn(c.message);continue}d.push({name:`preset:${s}`,options:m})}d.push({name:"table props",options:n});let i=D(...d.map(s=>s.options));return{options:i,explain(s){let m=d.filter(g=>Object.prototype.hasOwnProperty.call(g.options,s)).map(g=>({name:g.name,value:g.options[s]})),c=m[m.length-1];return{key:s,value:i[s],source:c?.name??"MachTable built-in",layers:m}}}}0&&(module.exports={GRID_OPTION_KEYS,GRID_OPTION_META,beginGridInput,canReplaceGridData,createSelectControl,equivalentConfigValue,equivalentGridOption,mergeMachTableConfig,normalizeMachTableConfig,readGridCell,resolveMachTableGridOptions,resumeGrid,suspendGrid,writeGridInput});
|
|
1
|
+
"use strict";var P=Object.defineProperty;var de=Object.getOwnPropertyDescriptor;var ue=Object.getOwnPropertyNames;var pe=Object.prototype.hasOwnProperty;var fe=(e,t)=>{for(var n in t)P(e,n,{get:t[n],enumerable:!0})},me=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ue(t))!pe.call(e,r)&&r!==n&&P(e,r,{get:()=>t[r],enumerable:!(o=de(t,r))||o.enumerable});return e};var ge=e=>me(P({},"__esModule",{value:!0}),e);var Ee={};fe(Ee,{GRID_OPTION_KEYS:()=>re,GRID_OPTION_META:()=>oe,beginGridInput:()=>te,canReplaceGridData:()=>ee,createSelectControl:()=>Y,equivalentConfigValue:()=>O,equivalentGridOption:()=>F,mergeMachTableConfig:()=>ie,normalizeMachTableConfig:()=>S,readGridCell:()=>Q,resolveMachTableGridOptions:()=>se,resumeGrid:()=>Z,suspendGrid:()=>J,writeGridInput:()=>X});module.exports=ge(Ee);function O(e,t,n=2){if(Object.is(e,t))return!0;if(n<=0)return!1;if(Array.isArray(e)||Array.isArray(t))return!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length||e.length>100?!1:e.every((r,d)=>O(r,t[d],n-1));if(!K(e)||!K(t))return!1;let o=Object.keys(e);return o.length!==Object.keys(t).length||o.length>100?!1:o.every(r=>Object.prototype.hasOwnProperty.call(t,r)&&O(e[r],t[r],n-1))}function K(e){if(!e||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}var be=new Set(["defaultColDef","locale","components","columnTypes","aggFuncs","pagination","statusBar","watermark"]);function F(e,t,n){return Object.is(t,n)||be.has(e)&&O(t,n,3)}function h(e,t,n){let o=document.createElement(e);if(t&&(o.className=t),n)for(let r of Object.keys(n))o.setAttribute(r,n[r]);return o}function W(e,t){if(e.classList.add("mach-portal"),!t)return;let n=window.getComputedStyle(t);for(let o=0;o<n.length;o++){let r=n.item(o);if(!r.startsWith("--mach-"))continue;let d=n.getPropertyValue(r).trim();d&&e.style.setProperty(r,d)}e.style.colorScheme=n.colorScheme}function V(e,t,n){return e<t?t:e>n?n:e}var _=0;function B(e="rg"){return _++,`${e}-${_}`}var p=null;function z(e){p?.owner&&(e===p.owner||e.contains(p.owner))&&p.close()}function U(e){let t=e.target;p?.contains(t)||p?.close()}function E(){p?.reposition()}function q(e){e.key!=="Escape"||!p||(e.preventDefault(),e.stopImmediatePropagation(),p.close(!0))}function ye(e){p?.close!==e.close&&p?.close(),!p&&(p=e,document.addEventListener("mousedown",U,!0),document.addEventListener("keydown",q,!0),window.addEventListener("resize",E),window.addEventListener("scroll",E,!0))}function he(e){p?.close===e&&(p=null,document.removeEventListener("mousedown",U,!0),document.removeEventListener("keydown",q,!0),window.removeEventListener("resize",E),window.removeEventListener("scroll",E,!0))}function w(e,t){return t?`${e} ${t}`:e}function R(e){let t=[];return e.forEach((n,o)=>{n.disabled||t.push(o)}),t}function $(e,t,n){let o=R(e);if(o.length===0)return-1;let r=o.indexOf(t);return r<0?n>0?o[0]:o[o.length-1]:o[Math.max(0,Math.min(o.length-1,r+n))]}function G(e,t){return e.findIndex(n=>n.value===t&&!n.disabled)}function Y(e){let t=h("div",w("mach-select-control",e.classNames?.root)),n=h("select",w("mach-select-native",e.classNames?.native));n.hidden=!0,n.tabIndex=-1,n.setAttribute("aria-hidden","true");let o=h("button",w("mach-select-trigger",e.classNames?.trigger));o.type="button",o.setAttribute("role","combobox"),o.setAttribute("aria-haspopup","listbox"),o.setAttribute("aria-expanded","false"),o.setAttribute("aria-label",e.ariaLabel);let r=h("span",w("mach-select-value",e.classNames?.value)),d=h("span",w("mach-select-caret",e.classNames?.caret));d.setAttribute("aria-hidden","true"),o.append(r,d);let i=h("div",w("mach-select-listbox",e.classNames?.listbox));i.id=B("mach-select-listbox"),i.setAttribute("role","listbox"),i.setAttribute("aria-hidden","true"),o.setAttribute("aria-controls",i.id),t.append(n,o);let s=[...e.options],m=[],c=-1,g=!1,I=()=>e.themeSource??t.closest(".mach-root")??t,v=()=>{let a=s.find(l=>l.value===n.value);r.textContent=a?.label??n.value,m.forEach((l,b)=>{let u=s[b]?.value===n.value;l.setAttribute("aria-selected",u?"true":"false"),l.classList.toggle("mach-select-option--selected",u),l.classList.toggle("mach-select-option--active",b===c)}),o.setAttribute("aria-activedescendant",c>=0?m[c]?.id??"":"")},k=()=>{let a=o.getBoundingClientRect(),l=i.getBoundingClientRect(),b=Math.max(a.width,l.width),u=V(a.left,8,Math.max(8,window.innerWidth-b-8)),C=window.innerHeight-a.bottom-8,T=C<Math.min(l.height,240)&&a.top>C,f=T?Math.max(8,a.top-l.height-5):Math.min(window.innerHeight-l.height-8,a.bottom+5);i.style.minWidth=`${a.width}px`,i.style.left=`${u}px`,i.style.top=`${Math.max(8,f)}px`,i.classList.toggle("mach-select-listbox--above",T)},y=(a=!1)=>i.classList.contains("mach-select-listbox--open")?(i.classList.remove("mach-select-listbox--open","mach-select-listbox--above"),i.setAttribute("aria-hidden","true"),o.setAttribute("aria-expanded","false"),o.removeAttribute("aria-activedescendant"),i.remove(),he(y),a&&!g&&o.focus({preventScroll:!0}),!0):!1,le=(a,l=!0)=>{!s[a]||s[a].disabled||(c=a,v(),l&&m[a]?.scrollIntoView?.({block:"nearest"}))},M=()=>{g||o.disabled||i.classList.contains("mach-select-listbox--open")||(ye({owner:I(),close:y,contains:a=>t.contains(a)||i.contains(a),reposition:k}),c=G(s,n.value),c<0&&(c=R(s)[0]??-1),W(i,I()),document.body.appendChild(i),i.classList.add("mach-select-listbox--open"),i.setAttribute("aria-hidden","false"),o.setAttribute("aria-expanded","true"),k(),v(),m[c]?.scrollIntoView?.({block:"nearest"}))},L=a=>{let l=s[a];!l||l.disabled||(n.value=l.value,c=a,v(),y(!0),n.dispatchEvent(new Event("input",{bubbles:!0})),n.dispatchEvent(new Event("change",{bubbles:!0})))},N=(a,l)=>{s=[...a],n.replaceChildren(),i.replaceChildren(),m=s.map((u,C)=>{let T=document.createElement("option");T.value=u.value,T.textContent=u.label,T.disabled=u.disabled===!0,n.appendChild(T);let f=h("button",w("mach-select-option",e.classNames?.option));return f.id=`${i.id}-option-${C}`,f.type="button",f.tabIndex=-1,f.dataset.value=u.value,f.disabled=u.disabled===!0,f.setAttribute("role","option"),f.textContent=u.label,f.addEventListener("mousedown",ce=>ce.preventDefault()),f.addEventListener("click",()=>L(C)),i.appendChild(f),f});let b=s.find(u=>!u.disabled)?.value??"";n.value=l!=null&&s.some(u=>u.value===l)?l:b,c=G(s,n.value),v()},j=a=>{if(a.key==="Tab"){y();return}if(a.key==="Escape"){if(!y(!0))return;a.preventDefault(),a.stopPropagation();return}if(a.key==="Enter"||a.key===" "){a.preventDefault(),a.stopPropagation(),i.classList.contains("mach-select-listbox--open")?L(c):M();return}let l=c;if(a.key==="ArrowDown")l=$(s,c,1);else if(a.key==="ArrowUp")l=$(s,c,-1);else if(a.key==="Home")l=R(s)[0]??-1;else if(a.key==="End"){let b=R(s);l=b[b.length-1]??-1}else return;a.preventDefault(),a.stopPropagation(),i.classList.contains("mach-select-listbox--open")||M(),le(l)},H=()=>{c=G(s,n.value),v(),e.onChange?.(n.value)};return o.addEventListener("click",()=>{y()||M()}),o.addEventListener("keydown",j),n.addEventListener("change",H),N(s,e.value),{el:t,native:n,trigger:o,listbox:i,contains:a=>t.contains(a)||i.contains(a),isOpen:()=>i.classList.contains("mach-select-listbox--open"),open:M,close:y,focus:()=>o.focus({preventScroll:!0}),getValue:()=>n.value,setValue:a=>{n.value=a,c=G(s,a),v()},setOptions:N,destroy:()=>{g||(g=!0,y(),o.removeEventListener("keydown",j),n.removeEventListener("change",H),t.remove())}}}var x=Symbol.for("mach-table.adapter.lifecycle.v1");function J(e){if(e.isDestroyed())return;let t=e.view.getRoot();t&&z(t),e[x]?.suspend()}function Z(e){e.isDestroyed()||e[x]?.resume()}function Q(e,t,n){return e.isDestroyed()?"":e[x]?.readCell(t,n)??""}function X(e,t){e.isDestroyed()||e[x]?.writeInput(t)}function ee(e){return!e.isDestroyed()&&(e[x]?.canReplaceData()??!1)}var Te=Symbol.for("mach-table.import.v1");function we(e){let t=e[Te];if(!t)throw new TypeError("Import plans require a MachTable GridApi");return t}function te(e){return e.isDestroyed()?()=>!1:we(e).begin()}var ne={columnDefs:"array",rowData:"array",defaultColDef:"object",columnTypes:"object",rowKey:"unknown",rowHeight:"number",headerHeight:"number",rowBuffer:"number",columnLayout:"string",enableColumnResize:"boolean",domLayout:"string",rowSelection:"string",multiSort:"boolean",size:"string",stripedRows:"boolean",rowStyleRules:"array",showCellBorders:"boolean",theme:"string",quickFilterText:"string",advancedFilterModel:"object",masterDetail:"boolean",detailRowHeight:"number",detailRowRenderer:"function",isRowExpandable:"function",detailToggleColumn:"boolean",columnMenu:"boolean",aggFuncs:"object",components:"object",actionPolicy:"object",features:"array",initialState:"object",persistence:"boolean-object",locale:"object",editType:"string",editableIndicator:"string",rowEditValidator:"function",singleClickEdit:"boolean",manualSorting:"boolean",manualFiltering:"boolean",showSummary:"boolean",summaryMethod:"function",treeData:"boolean",childrenKey:"string",isTreeRowExpandable:"function",loadTreeChildren:"function",autoCheckedChildren:"boolean",defaultExpandAll:"boolean",indexOffset:"number",applyRowDrag:"boolean",rowDragPolicy:"object",undoStackSize:"number",asyncTransactionWaitMillis:"number",getRowHeight:"function",pinnedTopRowData:"array",pinnedBottomRowData:"array",pagination:"boolean-object",watermark:"boolean-object",suppressWarnings:"boolean",enableRangeSelection:"boolean",suppressClipboard:"boolean",contextMenu:"boolean",getContextMenuItems:"function",tooltipComponent:"function",tooltipShowDelay:"number",flashCells:"boolean",fillHandle:"boolean",statusBar:"boolean-object",datasource:"object",datasourceMode:"string",blockSize:"number",infiniteBufferRows:"number",maxBlocksInCache:"number",datasourceMaxConcurrentRequests:"number",blockPrefetch:"number",datasourceRowCount:"number",dataProcessor:"object-function",dataProcessorMinRows:"number",datasourceRetryCount:"number",datasourceRetryDelay:"number",datasourceRetryJitter:"number",suppressCellFocus:"boolean",suppressRowHoverHighlight:"boolean",suppressNoRowsOverlay:"boolean",suppressHeaderFocus:"boolean",ariaLabel:"string",ariaLabelledBy:"string",ariaDescribedBy:"string",loading:"boolean",error:"unknown",overlayNoRowsTemplate:"unknown",overlayLoadingTemplate:"unknown",overlayErrorTemplate:"unknown",allowUnsafeOverlayHtml:"boolean",className:"string"};function ve(){return Object.fromEntries(Object.entries(ne).map(([e,t])=>[e,{kind:t,update:e==="columnDefs"||e==="rowData"?e:e==="quickFilterText"?"quickFilter":"options"}]))}var oe=ve(),re=Object.freeze(Object.keys(ne));function A(e,t){return t===void 0?e:typeof t!="object"||t===null||typeof e!="object"||e===null?t:{...e,...t}}function De(e,t){return typeof e!="function"?t:typeof t!="function"?e:(...n)=>{let o;try{e(...n)}catch(r){o=r}try{t(...n)}catch(r){o??(o=r)}if(o!==void 0)throw o}}function Ce(e,t){if(!(!e.components&&!t.components))return{cellRenderers:{...e.components?.cellRenderers,...t.components?.cellRenderers},cellEditors:{...e.components?.cellEditors,...t.components?.cellEditors}}}function Oe(e,t){if(!e.columnTypes&&!t.columnTypes)return;let n={},o=new Set([...Object.keys(e.columnTypes??{}),...Object.keys(t.columnTypes??{})]);for(let r of o)n[r]={...e.columnTypes?.[r],...t.columnTypes?.[r]};return n}function xe(e,t,n){for(let o of new Set([...Object.keys(t),...Object.keys(n)])){if(!/^on[A-Z]/.test(o))continue;let r=t[o],d=n[o];typeof r!="function"||typeof d!="function"||(e[o]=De(r,d))}}function Me(e,t){let n={...e,...t,features:t.features??e.features};(e.defaultColDef||t.defaultColDef)&&(n.defaultColDef={...e.defaultColDef,...t.defaultColDef}),(e.locale||t.locale)&&(n.locale={...e.locale,...t.locale});let o=Ce(e,t);o&&(n.components=o);let r=Oe(e,t);return r&&(n.columnTypes=r),(e.aggFuncs||t.aggFuncs)&&(n.aggFuncs={...e.aggFuncs,...t.aggFuncs}),n.pagination=A(e.pagination,t.pagination),n.statusBar=A(e.statusBar,t.statusBar),n.watermark=A(e.watermark,t.watermark),xe(n,e,t),n}function D(...e){return e.reduce(Me,{})}function Ge(e){return e?(Array.isArray(e)?e:[e]).filter(t=>typeof t=="string"&&t.trim().length>0):[]}var Re=["rowData","columnDefs","datasource","loading","error","initialState","persistence","components","columnTypes","stateKey","stateStore","stateSaveDebounceMs","columnStateKey","columnStateStore"];function ae(e,t,n){if(!t||typeof t!="object"||Array.isArray(t))return{};let o={};for(let[r,d]of Object.entries(t)){if(!Re.includes(r)&&(r!=="dataProcessor"||d==null||typeof d=="function")){o[r]=d;continue}let i={code:n==="defaults"?"INVALID_DEFAULT_OPTION":"INVALID_PRESET_OPTION",option:r,layer:n,message:r==="dataProcessor"?`[MachTable] "dataProcessor" in config ${n} must be a factory returning a fresh per-grid instance.`:`[MachTable] "${r}" is instance-only and cannot be declared in config ${n}.`};if(e.onConfigWarning?.(i),e.strict!==!1)throw new TypeError(i.message)}return o}function S(e={}){let t=ae(e,e.defaults,"defaults");return{defaults:D({columnTypes:e.columnTypes,components:e.components},t),presets:Object.fromEntries(Object.entries(e.presets??{}).map(([n,o])=>[n,D(ae(e,o,`preset:${n}`))])),defaultPreset:e.defaultPreset??!1,strict:e.strict!==!1,...e.onConfigWarning?{onConfigWarning:e.onConfigWarning}:{}}}function ie(e,t){let n=S({...t,strict:t.strict??e.strict,onConfigWarning:t.onConfigWarning??e.onConfigWarning}),o={...e.presets};for(let[r,d]of Object.entries(n.presets))o[r]=D(e.presets[r]??{},d);return{defaults:D(e.defaults,n.defaults),presets:o,defaultPreset:t.defaultPreset===void 0?e.defaultPreset:t.defaultPreset,strict:t.strict??e.strict,...t.onConfigWarning??e.onConfigWarning?{onConfigWarning:t.onConfigWarning??e.onConfigWarning}:{}}}function se(e,t,n,o){let r=t===void 0?e.defaultPreset:t,d=[{name:"application defaults",options:e.defaults}];for(let s of Ge(r)){let m=e.presets[s];if(!m){let c={code:"UNKNOWN_PRESET",preset:s,message:`[MachTable] Unknown preset "${s}". Register it in mach-table.config.ts or remove the preset.`};o?o(c):e.onConfigWarning?e.onConfigWarning(c):console.warn(c.message);continue}d.push({name:`preset:${s}`,options:m})}d.push({name:"table props",options:n});let i=D(...d.map(s=>s.options));return{options:i,explain(s){let m=d.filter(g=>Object.prototype.hasOwnProperty.call(g.options,s)).map(g=>({name:g.name,value:g.options[s]})),c=m[m.length-1];return{key:s,value:i[s],source:c?.name??"MachTable built-in",layers:m}}}}0&&(module.exports={GRID_OPTION_KEYS,GRID_OPTION_META,beginGridInput,canReplaceGridData,createSelectControl,equivalentConfigValue,equivalentGridOption,mergeMachTableConfig,normalizeMachTableConfig,readGridCell,resolveMachTableGridOptions,resumeGrid,suspendGrid,writeGridInput});
|
package/dist/adapter.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as GridApi, c as GridOptions, j as GridEventType } from './api-
|
|
2
|
-
export { M as MachTableOptionExplanation, R as ResolvedMachTableConfig, a as ResolvedMachTableGridOptions, m as mergeMachTableConfig, n as normalizeMachTableConfig, r as resolveMachTableGridOptions } from './configuration-
|
|
1
|
+
import { b as GridApi, c as GridOptions, j as GridEventType } from './api-Di5SQHAP.cjs';
|
|
2
|
+
export { M as MachTableOptionExplanation, R as ResolvedMachTableConfig, a as ResolvedMachTableGridOptions, m as mergeMachTableConfig, n as normalizeMachTableConfig, r as resolveMachTableGridOptions } from './configuration-DlRW86iR.cjs';
|
|
3
3
|
|
|
4
4
|
/** Bounded structural comparison for small immutable config values, never row data. */
|
|
5
5
|
declare function equivalentConfigValue(left: unknown, right: unknown, depth?: number): boolean;
|
|
@@ -25,10 +25,6 @@ declare function beginGridInput(api: GridApi): () => boolean;
|
|
|
25
25
|
type EventOptionKey = `on${Capitalize<GridEventType>}`;
|
|
26
26
|
type GridOptionKey = Exclude<keyof GridOptions<any>, EventOptionKey>;
|
|
27
27
|
declare const GRID_OPTION_META: {
|
|
28
|
-
readonly blockSize: {
|
|
29
|
-
readonly kind: "number";
|
|
30
|
-
readonly update: "options";
|
|
31
|
-
};
|
|
32
28
|
readonly pagination: {
|
|
33
29
|
readonly kind: "boolean-object";
|
|
34
30
|
readonly update: "options";
|
|
@@ -313,6 +309,10 @@ declare const GRID_OPTION_META: {
|
|
|
313
309
|
readonly kind: "string";
|
|
314
310
|
readonly update: "options";
|
|
315
311
|
};
|
|
312
|
+
readonly blockSize: {
|
|
313
|
+
readonly kind: "number";
|
|
314
|
+
readonly update: "options";
|
|
315
|
+
};
|
|
316
316
|
readonly infiniteBufferRows: {
|
|
317
317
|
readonly kind: "number";
|
|
318
318
|
readonly update: "options";
|
package/dist/adapter.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as GridApi, c as GridOptions, j as GridEventType } from './api-
|
|
2
|
-
export { M as MachTableOptionExplanation, R as ResolvedMachTableConfig, a as ResolvedMachTableGridOptions, m as mergeMachTableConfig, n as normalizeMachTableConfig, r as resolveMachTableGridOptions } from './configuration-
|
|
1
|
+
import { b as GridApi, c as GridOptions, j as GridEventType } from './api-Di5SQHAP.js';
|
|
2
|
+
export { M as MachTableOptionExplanation, R as ResolvedMachTableConfig, a as ResolvedMachTableGridOptions, m as mergeMachTableConfig, n as normalizeMachTableConfig, r as resolveMachTableGridOptions } from './configuration-nh5lvWDe.js';
|
|
3
3
|
|
|
4
4
|
/** Bounded structural comparison for small immutable config values, never row data. */
|
|
5
5
|
declare function equivalentConfigValue(left: unknown, right: unknown, depth?: number): boolean;
|
|
@@ -25,10 +25,6 @@ declare function beginGridInput(api: GridApi): () => boolean;
|
|
|
25
25
|
type EventOptionKey = `on${Capitalize<GridEventType>}`;
|
|
26
26
|
type GridOptionKey = Exclude<keyof GridOptions<any>, EventOptionKey>;
|
|
27
27
|
declare const GRID_OPTION_META: {
|
|
28
|
-
readonly blockSize: {
|
|
29
|
-
readonly kind: "number";
|
|
30
|
-
readonly update: "options";
|
|
31
|
-
};
|
|
32
28
|
readonly pagination: {
|
|
33
29
|
readonly kind: "boolean-object";
|
|
34
30
|
readonly update: "options";
|
|
@@ -313,6 +309,10 @@ declare const GRID_OPTION_META: {
|
|
|
313
309
|
readonly kind: "string";
|
|
314
310
|
readonly update: "options";
|
|
315
311
|
};
|
|
312
|
+
readonly blockSize: {
|
|
313
|
+
readonly kind: "number";
|
|
314
|
+
readonly update: "options";
|
|
315
|
+
};
|
|
316
316
|
readonly infiniteBufferRows: {
|
|
317
317
|
readonly kind: "number";
|
|
318
318
|
readonly update: "options";
|
package/dist/adapter.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function M(e,t,n=2){if(Object.is(e,t))return!0;if(n<=0)return!1;if(Array.isArray(e)||Array.isArray(t))return!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length||e.length>100?!1:e.every((a,d)=>M(a,t[d],n-1));if(!j(e)||!j(t))return!1;let o=Object.keys(e);return o.length!==Object.keys(t).length||o.length>100?!1:o.every(a=>Object.prototype.hasOwnProperty.call(t,a)&&M(e[a],t[a],n-1))}function j(e){if(!e||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}var Z=new Set(["defaultColDef","locale","components","columnTypes","aggFuncs","pagination","statusBar","watermark"]);function Q(e,t,n){return Object.is(t,n)||Z.has(e)&&M(t,n,3)}function h(e,t,n){let o=document.createElement(e);if(t&&(o.className=t),n)for(let a of Object.keys(n))o.setAttribute(a,n[a]);return o}function K(e,t){if(e.classList.add("mach-portal"),!t)return;let n=window.getComputedStyle(t);for(let o=0;o<n.length;o++){let a=n.item(o);if(!a.startsWith("--mach-"))continue;let d=n.getPropertyValue(a).trim();d&&e.style.setProperty(a,d)}e.style.colorScheme=n.colorScheme}function F(e,t,n){return e<t?t:e>n?n:e}var H=0;function _(e="rg"){return H++,`${e}-${H}`}var p=null;function V(e){p?.owner&&(e===p.owner||e.contains(p.owner))&&p.close()}function B(e){let t=e.target;p?.contains(t)||p?.close()}function E(){p?.reposition()}function $(e){e.key!=="Escape"||!p||(e.preventDefault(),e.stopImmediatePropagation(),p.close(!0))}function X(e){p?.close!==e.close&&p?.close(),!p&&(p=e,document.addEventListener("mousedown",B,!0),document.addEventListener("keydown",$,!0),window.addEventListener("resize",E),window.addEventListener("scroll",E,!0))}function ee(e){p?.close===e&&(p=null,document.removeEventListener("mousedown",B,!0),document.removeEventListener("keydown",$,!0),window.removeEventListener("resize",E),window.removeEventListener("scroll",E,!0))}function w(e,t){return t?`${e} ${t}`:e}function R(e){let t=[];return e.forEach((n,o)=>{n.disabled||t.push(o)}),t}function W(e,t,n){let o=R(e);if(o.length===0)return-1;let a=o.indexOf(t);return a<0?n>0?o[0]:o[o.length-1]:o[Math.max(0,Math.min(o.length-1,a+n))]}function G(e,t){return e.findIndex(n=>n.value===t&&!n.disabled)}function te(e){let t=h("div",w("mach-select-control",e.classNames?.root)),n=h("select",w("mach-select-native",e.classNames?.native));n.hidden=!0,n.tabIndex=-1,n.setAttribute("aria-hidden","true");let o=h("button",w("mach-select-trigger",e.classNames?.trigger));o.type="button",o.setAttribute("role","combobox"),o.setAttribute("aria-haspopup","listbox"),o.setAttribute("aria-expanded","false"),o.setAttribute("aria-label",e.ariaLabel);let a=h("span",w("mach-select-value",e.classNames?.value)),d=h("span",w("mach-select-caret",e.classNames?.caret));d.setAttribute("aria-hidden","true"),o.append(a,d);let i=h("div",w("mach-select-listbox",e.classNames?.listbox));i.id=_("mach-select-listbox"),i.setAttribute("role","listbox"),i.setAttribute("aria-hidden","true"),o.setAttribute("aria-controls",i.id),t.append(n,o);let s=[...e.options],m=[],c=-1,g=!1,A=()=>e.themeSource??t.closest(".mach-root")??t,v=()=>{let r=s.find(l=>l.value===n.value);a.textContent=r?.label??n.value,m.forEach((l,b)=>{let u=s[b]?.value===n.value;l.setAttribute("aria-selected",u?"true":"false"),l.classList.toggle("mach-select-option--selected",u),l.classList.toggle("mach-select-option--active",b===c)}),o.setAttribute("aria-activedescendant",c>=0?m[c]?.id??"":"")},S=()=>{let r=o.getBoundingClientRect(),l=i.getBoundingClientRect(),b=Math.max(r.width,l.width),u=F(r.left,8,Math.max(8,window.innerWidth-b-8)),C=window.innerHeight-r.bottom-8,T=C<Math.min(l.height,240)&&r.top>C,f=T?Math.max(8,r.top-l.height-5):Math.min(window.innerHeight-l.height-8,r.bottom+5);i.style.minWidth=`${r.width}px`,i.style.left=`${u}px`,i.style.top=`${Math.max(8,f)}px`,i.classList.toggle("mach-select-listbox--above",T)},y=(r=!1)=>i.classList.contains("mach-select-listbox--open")?(i.classList.remove("mach-select-listbox--open","mach-select-listbox--above"),i.setAttribute("aria-hidden","true"),o.setAttribute("aria-expanded","false"),o.removeAttribute("aria-activedescendant"),i.remove(),ee(y),r&&!g&&o.focus({preventScroll:!0}),!0):!1,Y=(r,l=!0)=>{!s[r]||s[r].disabled||(c=r,v(),l&&m[r]?.scrollIntoView?.({block:"nearest"}))},x=()=>{g||o.disabled||i.classList.contains("mach-select-listbox--open")||(X({owner:A(),close:y,contains:r=>t.contains(r)||i.contains(r),reposition:S}),c=G(s,n.value),c<0&&(c=R(s)[0]??-1),K(i,A()),document.body.appendChild(i),i.classList.add("mach-select-listbox--open"),i.setAttribute("aria-hidden","false"),o.setAttribute("aria-expanded","true"),S(),v(),m[c]?.scrollIntoView?.({block:"nearest"}))},I=r=>{let l=s[r];!l||l.disabled||(n.value=l.value,c=r,v(),y(!0),n.dispatchEvent(new Event("input",{bubbles:!0})),n.dispatchEvent(new Event("change",{bubbles:!0})))},k=(r,l)=>{s=[...r],n.replaceChildren(),i.replaceChildren(),m=s.map((u,C)=>{let T=document.createElement("option");T.value=u.value,T.textContent=u.label,T.disabled=u.disabled===!0,n.appendChild(T);let f=h("button",w("mach-select-option",e.classNames?.option));return f.id=`${i.id}-option-${C}`,f.type="button",f.tabIndex=-1,f.dataset.value=u.value,f.disabled=u.disabled===!0,f.setAttribute("role","option"),f.textContent=u.label,f.addEventListener("mousedown",J=>J.preventDefault()),f.addEventListener("click",()=>I(C)),i.appendChild(f),f});let b=s.find(u=>!u.disabled)?.value??"";n.value=l!=null&&s.some(u=>u.value===l)?l:b,c=G(s,n.value),v()},L=r=>{if(r.key==="Tab"){y();return}if(r.key==="Escape"){if(!y(!0))return;r.preventDefault(),r.stopPropagation();return}if(r.key==="Enter"||r.key===" "){r.preventDefault(),r.stopPropagation(),i.classList.contains("mach-select-listbox--open")?I(c):x();return}let l=c;if(r.key==="ArrowDown")l=W(s,c,1);else if(r.key==="ArrowUp")l=W(s,c,-1);else if(r.key==="Home")l=R(s)[0]??-1;else if(r.key==="End"){let b=R(s);l=b[b.length-1]??-1}else return;r.preventDefault(),r.stopPropagation(),i.classList.contains("mach-select-listbox--open")||x(),Y(l)},N=()=>{c=G(s,n.value),v(),e.onChange?.(n.value)};return o.addEventListener("click",()=>{y()||x()}),o.addEventListener("keydown",L),n.addEventListener("change",N),k(s,e.value),{el:t,native:n,trigger:o,listbox:i,contains:r=>t.contains(r)||i.contains(r),isOpen:()=>i.classList.contains("mach-select-listbox--open"),open:x,close:y,focus:()=>o.focus({preventScroll:!0}),getValue:()=>n.value,setValue:r=>{n.value=r,c=G(s,r),v()},setOptions:k,destroy:()=>{g||(g=!0,y(),o.removeEventListener("keydown",L),n.removeEventListener("change",N),t.remove())}}}var O=Symbol.for("mach-table.adapter.lifecycle.v1");function ne(e){if(e.isDestroyed())return;let t=e.view.getRoot();t&&V(t),e[O]?.suspend()}function oe(e){e.isDestroyed()||e[O]?.resume()}function re(e,t,n){return e.isDestroyed()?"":e[O]?.readCell(t,n)??""}function ae(e,t){e.isDestroyed()||e[O]?.writeInput(t)}function ie(e){return!e.isDestroyed()&&(e[O]?.canReplaceData()??!1)}var se=Symbol.for("mach-table.import.v1");function le(e){let t=e[se];if(!t)throw new TypeError("Import plans require a MachTable GridApi");return t}function ce(e){return e.isDestroyed()?()=>!1:le(e).begin()}var z={columnDefs:"array",rowData:"array",defaultColDef:"object",columnTypes:"object",rowKey:"unknown",rowHeight:"number",headerHeight:"number",rowBuffer:"number",columnLayout:"string",enableColumnResize:"boolean",domLayout:"string",rowSelection:"string",multiSort:"boolean",size:"string",stripedRows:"boolean",rowStyleRules:"array",showCellBorders:"boolean",theme:"string",quickFilterText:"string",advancedFilterModel:"object",masterDetail:"boolean",detailRowHeight:"number",detailRowRenderer:"function",isRowExpandable:"function",detailToggleColumn:"boolean",columnMenu:"boolean",aggFuncs:"object",components:"object",actionPolicy:"object",features:"array",initialState:"object",persistence:"boolean-object",locale:"object",editType:"string",editableIndicator:"string",rowEditValidator:"function",singleClickEdit:"boolean",manualSorting:"boolean",manualFiltering:"boolean",showSummary:"boolean",summaryMethod:"function",treeData:"boolean",childrenKey:"string",isTreeRowExpandable:"function",loadTreeChildren:"function",autoCheckedChildren:"boolean",defaultExpandAll:"boolean",indexOffset:"number",applyRowDrag:"boolean",rowDragPolicy:"object",undoStackSize:"number",asyncTransactionWaitMillis:"number",getRowHeight:"function",pinnedTopRowData:"array",pinnedBottomRowData:"array",pagination:"boolean-object",watermark:"boolean-object",suppressWarnings:"boolean",enableRangeSelection:"boolean",suppressClipboard:"boolean",contextMenu:"boolean",getContextMenuItems:"function",tooltipComponent:"function",tooltipShowDelay:"number",flashCells:"boolean",fillHandle:"boolean",statusBar:"boolean-object",datasource:"object",datasourceMode:"string",blockSize:"number",infiniteBufferRows:"number",maxBlocksInCache:"number",datasourceMaxConcurrentRequests:"number",blockPrefetch:"number",datasourceRowCount:"number",dataProcessor:"object-function",dataProcessorMinRows:"number",datasourceRetryCount:"number",datasourceRetryDelay:"number",datasourceRetryJitter:"number",suppressCellFocus:"boolean",suppressRowHoverHighlight:"boolean",suppressNoRowsOverlay:"boolean",suppressHeaderFocus:"boolean",ariaLabel:"string",ariaLabelledBy:"string",ariaDescribedBy:"string",loading:"boolean",error:"unknown",overlayNoRowsTemplate:"unknown",overlayLoadingTemplate:"unknown",overlayErrorTemplate:"unknown",allowUnsafeOverlayHtml:"boolean",className:"string"};function de(){return Object.fromEntries(Object.entries(z).map(([e,t])=>[e,{kind:t,update:e==="columnDefs"||e==="rowData"?e:e==="quickFilterText"?"quickFilter":"options"}]))}var ue=de(),pe=Object.freeze(Object.keys(z));function P(e,t){return t===void 0?e:typeof t!="object"||t===null||typeof e!="object"||e===null?t:{...e,...t}}function fe(e,t){return typeof e!="function"?t:typeof t!="function"?e:(...n)=>{let o;try{e(...n)}catch(a){o=a}try{t(...n)}catch(a){o??(o=a)}if(o!==void 0)throw o}}function me(e,t){if(!(!e.components&&!t.components))return{cellRenderers:{...e.components?.cellRenderers,...t.components?.cellRenderers},cellEditors:{...e.components?.cellEditors,...t.components?.cellEditors}}}function ge(e,t){if(!e.columnTypes&&!t.columnTypes)return;let n={},o=new Set([...Object.keys(e.columnTypes??{}),...Object.keys(t.columnTypes??{})]);for(let a of o)n[a]={...e.columnTypes?.[a],...t.columnTypes?.[a]};return n}function be(e,t,n){for(let o of new Set([...Object.keys(t),...Object.keys(n)])){if(!/^on[A-Z]/.test(o))continue;let a=t[o],d=n[o];typeof a!="function"||typeof d!="function"||(e[o]=fe(a,d))}}function ye(e,t){let n={...e,...t,features:t.features??e.features};(e.defaultColDef||t.defaultColDef)&&(n.defaultColDef={...e.defaultColDef,...t.defaultColDef}),(e.locale||t.locale)&&(n.locale={...e.locale,...t.locale});let o=me(e,t);o&&(n.components=o);let a=ge(e,t);return a&&(n.columnTypes=a),(e.aggFuncs||t.aggFuncs)&&(n.aggFuncs={...e.aggFuncs,...t.aggFuncs}),n.pagination=P(e.pagination,t.pagination),n.statusBar=P(e.statusBar,t.statusBar),n.watermark=P(e.watermark,t.watermark),be(n,e,t),n}function D(...e){return e.reduce(ye,{})}function he(e){return e?(Array.isArray(e)?e:[e]).filter(t=>typeof t=="string"&&t.trim().length>0):[]}var Te=new Set(["rowData","columnDefs","datasource","loading","error","initialState","persistence","components","columnTypes","stateKey","stateStore","stateSaveDebounceMs","columnStateKey","columnStateStore"]);function U(e,t,n){if(!t||typeof t!="object"||Array.isArray(t))return{};let o={};for(let[a,d]of Object.entries(t)){if(!Te.has(a)&&(a!=="dataProcessor"||d==null||typeof d=="function")){o[a]=d;continue}let i={code:n==="defaults"?"INVALID_DEFAULT_OPTION":"INVALID_PRESET_OPTION",option:a,layer:n,message:a==="dataProcessor"?`[MachTable] "dataProcessor" in config ${n} must be a factory returning a fresh per-grid instance.`:`[MachTable] "${a}" is instance-only and cannot be declared in config ${n}.`};if(e.onConfigWarning?.(i),e.strict!==!1)throw new TypeError(i.message)}return o}function q(e={}){let t=U(e,e.defaults,"defaults");return{defaults:D({columnTypes:e.columnTypes,components:e.components},t),presets:Object.fromEntries(Object.entries(e.presets??{}).map(([n,o])=>[n,D(U(e,o,`preset:${n}`))])),defaultPreset:e.defaultPreset??!1,strict:e.strict!==!1,...e.onConfigWarning?{onConfigWarning:e.onConfigWarning}:{}}}function we(e,t){let n=q({...t,strict:t.strict??e.strict,onConfigWarning:t.onConfigWarning??e.onConfigWarning}),o={...e.presets};for(let[a,d]of Object.entries(n.presets))o[a]=D(e.presets[a]??{},d);return{defaults:D(e.defaults,n.defaults),presets:o,defaultPreset:t.defaultPreset===void 0?e.defaultPreset:t.defaultPreset,strict:t.strict??e.strict,...t.onConfigWarning??e.onConfigWarning?{onConfigWarning:t.onConfigWarning??e.onConfigWarning}:{}}}function ve(e,t,n,o){let a=t===void 0?e.defaultPreset:t,d=[{name:"application defaults",options:e.defaults}];for(let s of he(a)){let m=e.presets[s];if(!m){let c={code:"UNKNOWN_PRESET",preset:s,message:`[MachTable] Unknown preset "${s}". Register it in mach-table.config.ts or remove the preset.`};o?o(c):e.onConfigWarning?e.onConfigWarning(c):console.warn(c.message);continue}d.push({name:`preset:${s}`,options:m})}d.push({name:"table props",options:n});let i=D(...d.map(s=>s.options));return{options:i,explain(s){let m=d.filter(g=>Object.prototype.hasOwnProperty.call(g.options,s)).map(g=>({name:g.name,value:g.options[s]})),c=m[m.length-1];return{key:s,value:i[s],source:c?.name??"MachTable built-in",layers:m}}}}export{pe as GRID_OPTION_KEYS,ue as GRID_OPTION_META,ce as beginGridInput,ie as canReplaceGridData,te as createSelectControl,M as equivalentConfigValue,Q as equivalentGridOption,we as mergeMachTableConfig,q as normalizeMachTableConfig,re as readGridCell,ve as resolveMachTableGridOptions,oe as resumeGrid,ne as suspendGrid,ae as writeGridInput};
|
|
1
|
+
function M(e,t,n=2){if(Object.is(e,t))return!0;if(n<=0)return!1;if(Array.isArray(e)||Array.isArray(t))return!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length||e.length>100?!1:e.every((a,d)=>M(a,t[d],n-1));if(!j(e)||!j(t))return!1;let o=Object.keys(e);return o.length!==Object.keys(t).length||o.length>100?!1:o.every(a=>Object.prototype.hasOwnProperty.call(t,a)&&M(e[a],t[a],n-1))}function j(e){if(!e||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}var Z=new Set(["defaultColDef","locale","components","columnTypes","aggFuncs","pagination","statusBar","watermark"]);function Q(e,t,n){return Object.is(t,n)||Z.has(e)&&M(t,n,3)}function h(e,t,n){let o=document.createElement(e);if(t&&(o.className=t),n)for(let a of Object.keys(n))o.setAttribute(a,n[a]);return o}function K(e,t){if(e.classList.add("mach-portal"),!t)return;let n=window.getComputedStyle(t);for(let o=0;o<n.length;o++){let a=n.item(o);if(!a.startsWith("--mach-"))continue;let d=n.getPropertyValue(a).trim();d&&e.style.setProperty(a,d)}e.style.colorScheme=n.colorScheme}function F(e,t,n){return e<t?t:e>n?n:e}var H=0;function _(e="rg"){return H++,`${e}-${H}`}var p=null;function V(e){p?.owner&&(e===p.owner||e.contains(p.owner))&&p.close()}function B(e){let t=e.target;p?.contains(t)||p?.close()}function E(){p?.reposition()}function $(e){e.key!=="Escape"||!p||(e.preventDefault(),e.stopImmediatePropagation(),p.close(!0))}function X(e){p?.close!==e.close&&p?.close(),!p&&(p=e,document.addEventListener("mousedown",B,!0),document.addEventListener("keydown",$,!0),window.addEventListener("resize",E),window.addEventListener("scroll",E,!0))}function ee(e){p?.close===e&&(p=null,document.removeEventListener("mousedown",B,!0),document.removeEventListener("keydown",$,!0),window.removeEventListener("resize",E),window.removeEventListener("scroll",E,!0))}function w(e,t){return t?`${e} ${t}`:e}function R(e){let t=[];return e.forEach((n,o)=>{n.disabled||t.push(o)}),t}function W(e,t,n){let o=R(e);if(o.length===0)return-1;let a=o.indexOf(t);return a<0?n>0?o[0]:o[o.length-1]:o[Math.max(0,Math.min(o.length-1,a+n))]}function G(e,t){return e.findIndex(n=>n.value===t&&!n.disabled)}function te(e){let t=h("div",w("mach-select-control",e.classNames?.root)),n=h("select",w("mach-select-native",e.classNames?.native));n.hidden=!0,n.tabIndex=-1,n.setAttribute("aria-hidden","true");let o=h("button",w("mach-select-trigger",e.classNames?.trigger));o.type="button",o.setAttribute("role","combobox"),o.setAttribute("aria-haspopup","listbox"),o.setAttribute("aria-expanded","false"),o.setAttribute("aria-label",e.ariaLabel);let a=h("span",w("mach-select-value",e.classNames?.value)),d=h("span",w("mach-select-caret",e.classNames?.caret));d.setAttribute("aria-hidden","true"),o.append(a,d);let i=h("div",w("mach-select-listbox",e.classNames?.listbox));i.id=_("mach-select-listbox"),i.setAttribute("role","listbox"),i.setAttribute("aria-hidden","true"),o.setAttribute("aria-controls",i.id),t.append(n,o);let s=[...e.options],m=[],c=-1,g=!1,A=()=>e.themeSource??t.closest(".mach-root")??t,v=()=>{let r=s.find(l=>l.value===n.value);a.textContent=r?.label??n.value,m.forEach((l,b)=>{let u=s[b]?.value===n.value;l.setAttribute("aria-selected",u?"true":"false"),l.classList.toggle("mach-select-option--selected",u),l.classList.toggle("mach-select-option--active",b===c)}),o.setAttribute("aria-activedescendant",c>=0?m[c]?.id??"":"")},S=()=>{let r=o.getBoundingClientRect(),l=i.getBoundingClientRect(),b=Math.max(r.width,l.width),u=F(r.left,8,Math.max(8,window.innerWidth-b-8)),C=window.innerHeight-r.bottom-8,T=C<Math.min(l.height,240)&&r.top>C,f=T?Math.max(8,r.top-l.height-5):Math.min(window.innerHeight-l.height-8,r.bottom+5);i.style.minWidth=`${r.width}px`,i.style.left=`${u}px`,i.style.top=`${Math.max(8,f)}px`,i.classList.toggle("mach-select-listbox--above",T)},y=(r=!1)=>i.classList.contains("mach-select-listbox--open")?(i.classList.remove("mach-select-listbox--open","mach-select-listbox--above"),i.setAttribute("aria-hidden","true"),o.setAttribute("aria-expanded","false"),o.removeAttribute("aria-activedescendant"),i.remove(),ee(y),r&&!g&&o.focus({preventScroll:!0}),!0):!1,Y=(r,l=!0)=>{!s[r]||s[r].disabled||(c=r,v(),l&&m[r]?.scrollIntoView?.({block:"nearest"}))},x=()=>{g||o.disabled||i.classList.contains("mach-select-listbox--open")||(X({owner:A(),close:y,contains:r=>t.contains(r)||i.contains(r),reposition:S}),c=G(s,n.value),c<0&&(c=R(s)[0]??-1),K(i,A()),document.body.appendChild(i),i.classList.add("mach-select-listbox--open"),i.setAttribute("aria-hidden","false"),o.setAttribute("aria-expanded","true"),S(),v(),m[c]?.scrollIntoView?.({block:"nearest"}))},I=r=>{let l=s[r];!l||l.disabled||(n.value=l.value,c=r,v(),y(!0),n.dispatchEvent(new Event("input",{bubbles:!0})),n.dispatchEvent(new Event("change",{bubbles:!0})))},k=(r,l)=>{s=[...r],n.replaceChildren(),i.replaceChildren(),m=s.map((u,C)=>{let T=document.createElement("option");T.value=u.value,T.textContent=u.label,T.disabled=u.disabled===!0,n.appendChild(T);let f=h("button",w("mach-select-option",e.classNames?.option));return f.id=`${i.id}-option-${C}`,f.type="button",f.tabIndex=-1,f.dataset.value=u.value,f.disabled=u.disabled===!0,f.setAttribute("role","option"),f.textContent=u.label,f.addEventListener("mousedown",J=>J.preventDefault()),f.addEventListener("click",()=>I(C)),i.appendChild(f),f});let b=s.find(u=>!u.disabled)?.value??"";n.value=l!=null&&s.some(u=>u.value===l)?l:b,c=G(s,n.value),v()},L=r=>{if(r.key==="Tab"){y();return}if(r.key==="Escape"){if(!y(!0))return;r.preventDefault(),r.stopPropagation();return}if(r.key==="Enter"||r.key===" "){r.preventDefault(),r.stopPropagation(),i.classList.contains("mach-select-listbox--open")?I(c):x();return}let l=c;if(r.key==="ArrowDown")l=W(s,c,1);else if(r.key==="ArrowUp")l=W(s,c,-1);else if(r.key==="Home")l=R(s)[0]??-1;else if(r.key==="End"){let b=R(s);l=b[b.length-1]??-1}else return;r.preventDefault(),r.stopPropagation(),i.classList.contains("mach-select-listbox--open")||x(),Y(l)},N=()=>{c=G(s,n.value),v(),e.onChange?.(n.value)};return o.addEventListener("click",()=>{y()||x()}),o.addEventListener("keydown",L),n.addEventListener("change",N),k(s,e.value),{el:t,native:n,trigger:o,listbox:i,contains:r=>t.contains(r)||i.contains(r),isOpen:()=>i.classList.contains("mach-select-listbox--open"),open:x,close:y,focus:()=>o.focus({preventScroll:!0}),getValue:()=>n.value,setValue:r=>{n.value=r,c=G(s,r),v()},setOptions:k,destroy:()=>{g||(g=!0,y(),o.removeEventListener("keydown",L),n.removeEventListener("change",N),t.remove())}}}var O=Symbol.for("mach-table.adapter.lifecycle.v1");function ne(e){if(e.isDestroyed())return;let t=e.view.getRoot();t&&V(t),e[O]?.suspend()}function oe(e){e.isDestroyed()||e[O]?.resume()}function re(e,t,n){return e.isDestroyed()?"":e[O]?.readCell(t,n)??""}function ae(e,t){e.isDestroyed()||e[O]?.writeInput(t)}function ie(e){return!e.isDestroyed()&&(e[O]?.canReplaceData()??!1)}var se=Symbol.for("mach-table.import.v1");function le(e){let t=e[se];if(!t)throw new TypeError("Import plans require a MachTable GridApi");return t}function ce(e){return e.isDestroyed()?()=>!1:le(e).begin()}var z={columnDefs:"array",rowData:"array",defaultColDef:"object",columnTypes:"object",rowKey:"unknown",rowHeight:"number",headerHeight:"number",rowBuffer:"number",columnLayout:"string",enableColumnResize:"boolean",domLayout:"string",rowSelection:"string",multiSort:"boolean",size:"string",stripedRows:"boolean",rowStyleRules:"array",showCellBorders:"boolean",theme:"string",quickFilterText:"string",advancedFilterModel:"object",masterDetail:"boolean",detailRowHeight:"number",detailRowRenderer:"function",isRowExpandable:"function",detailToggleColumn:"boolean",columnMenu:"boolean",aggFuncs:"object",components:"object",actionPolicy:"object",features:"array",initialState:"object",persistence:"boolean-object",locale:"object",editType:"string",editableIndicator:"string",rowEditValidator:"function",singleClickEdit:"boolean",manualSorting:"boolean",manualFiltering:"boolean",showSummary:"boolean",summaryMethod:"function",treeData:"boolean",childrenKey:"string",isTreeRowExpandable:"function",loadTreeChildren:"function",autoCheckedChildren:"boolean",defaultExpandAll:"boolean",indexOffset:"number",applyRowDrag:"boolean",rowDragPolicy:"object",undoStackSize:"number",asyncTransactionWaitMillis:"number",getRowHeight:"function",pinnedTopRowData:"array",pinnedBottomRowData:"array",pagination:"boolean-object",watermark:"boolean-object",suppressWarnings:"boolean",enableRangeSelection:"boolean",suppressClipboard:"boolean",contextMenu:"boolean",getContextMenuItems:"function",tooltipComponent:"function",tooltipShowDelay:"number",flashCells:"boolean",fillHandle:"boolean",statusBar:"boolean-object",datasource:"object",datasourceMode:"string",blockSize:"number",infiniteBufferRows:"number",maxBlocksInCache:"number",datasourceMaxConcurrentRequests:"number",blockPrefetch:"number",datasourceRowCount:"number",dataProcessor:"object-function",dataProcessorMinRows:"number",datasourceRetryCount:"number",datasourceRetryDelay:"number",datasourceRetryJitter:"number",suppressCellFocus:"boolean",suppressRowHoverHighlight:"boolean",suppressNoRowsOverlay:"boolean",suppressHeaderFocus:"boolean",ariaLabel:"string",ariaLabelledBy:"string",ariaDescribedBy:"string",loading:"boolean",error:"unknown",overlayNoRowsTemplate:"unknown",overlayLoadingTemplate:"unknown",overlayErrorTemplate:"unknown",allowUnsafeOverlayHtml:"boolean",className:"string"};function de(){return Object.fromEntries(Object.entries(z).map(([e,t])=>[e,{kind:t,update:e==="columnDefs"||e==="rowData"?e:e==="quickFilterText"?"quickFilter":"options"}]))}var ue=de(),pe=Object.freeze(Object.keys(z));function P(e,t){return t===void 0?e:typeof t!="object"||t===null||typeof e!="object"||e===null?t:{...e,...t}}function fe(e,t){return typeof e!="function"?t:typeof t!="function"?e:(...n)=>{let o;try{e(...n)}catch(a){o=a}try{t(...n)}catch(a){o??(o=a)}if(o!==void 0)throw o}}function me(e,t){if(!(!e.components&&!t.components))return{cellRenderers:{...e.components?.cellRenderers,...t.components?.cellRenderers},cellEditors:{...e.components?.cellEditors,...t.components?.cellEditors}}}function ge(e,t){if(!e.columnTypes&&!t.columnTypes)return;let n={},o=new Set([...Object.keys(e.columnTypes??{}),...Object.keys(t.columnTypes??{})]);for(let a of o)n[a]={...e.columnTypes?.[a],...t.columnTypes?.[a]};return n}function be(e,t,n){for(let o of new Set([...Object.keys(t),...Object.keys(n)])){if(!/^on[A-Z]/.test(o))continue;let a=t[o],d=n[o];typeof a!="function"||typeof d!="function"||(e[o]=fe(a,d))}}function ye(e,t){let n={...e,...t,features:t.features??e.features};(e.defaultColDef||t.defaultColDef)&&(n.defaultColDef={...e.defaultColDef,...t.defaultColDef}),(e.locale||t.locale)&&(n.locale={...e.locale,...t.locale});let o=me(e,t);o&&(n.components=o);let a=ge(e,t);return a&&(n.columnTypes=a),(e.aggFuncs||t.aggFuncs)&&(n.aggFuncs={...e.aggFuncs,...t.aggFuncs}),n.pagination=P(e.pagination,t.pagination),n.statusBar=P(e.statusBar,t.statusBar),n.watermark=P(e.watermark,t.watermark),be(n,e,t),n}function D(...e){return e.reduce(ye,{})}function he(e){return e?(Array.isArray(e)?e:[e]).filter(t=>typeof t=="string"&&t.trim().length>0):[]}var Te=["rowData","columnDefs","datasource","loading","error","initialState","persistence","components","columnTypes","stateKey","stateStore","stateSaveDebounceMs","columnStateKey","columnStateStore"];function U(e,t,n){if(!t||typeof t!="object"||Array.isArray(t))return{};let o={};for(let[a,d]of Object.entries(t)){if(!Te.includes(a)&&(a!=="dataProcessor"||d==null||typeof d=="function")){o[a]=d;continue}let i={code:n==="defaults"?"INVALID_DEFAULT_OPTION":"INVALID_PRESET_OPTION",option:a,layer:n,message:a==="dataProcessor"?`[MachTable] "dataProcessor" in config ${n} must be a factory returning a fresh per-grid instance.`:`[MachTable] "${a}" is instance-only and cannot be declared in config ${n}.`};if(e.onConfigWarning?.(i),e.strict!==!1)throw new TypeError(i.message)}return o}function q(e={}){let t=U(e,e.defaults,"defaults");return{defaults:D({columnTypes:e.columnTypes,components:e.components},t),presets:Object.fromEntries(Object.entries(e.presets??{}).map(([n,o])=>[n,D(U(e,o,`preset:${n}`))])),defaultPreset:e.defaultPreset??!1,strict:e.strict!==!1,...e.onConfigWarning?{onConfigWarning:e.onConfigWarning}:{}}}function we(e,t){let n=q({...t,strict:t.strict??e.strict,onConfigWarning:t.onConfigWarning??e.onConfigWarning}),o={...e.presets};for(let[a,d]of Object.entries(n.presets))o[a]=D(e.presets[a]??{},d);return{defaults:D(e.defaults,n.defaults),presets:o,defaultPreset:t.defaultPreset===void 0?e.defaultPreset:t.defaultPreset,strict:t.strict??e.strict,...t.onConfigWarning??e.onConfigWarning?{onConfigWarning:t.onConfigWarning??e.onConfigWarning}:{}}}function ve(e,t,n,o){let a=t===void 0?e.defaultPreset:t,d=[{name:"application defaults",options:e.defaults}];for(let s of he(a)){let m=e.presets[s];if(!m){let c={code:"UNKNOWN_PRESET",preset:s,message:`[MachTable] Unknown preset "${s}". Register it in mach-table.config.ts or remove the preset.`};o?o(c):e.onConfigWarning?e.onConfigWarning(c):console.warn(c.message);continue}d.push({name:`preset:${s}`,options:m})}d.push({name:"table props",options:n});let i=D(...d.map(s=>s.options));return{options:i,explain(s){let m=d.filter(g=>Object.prototype.hasOwnProperty.call(g.options,s)).map(g=>({name:g.name,value:g.options[s]})),c=m[m.length-1];return{key:s,value:i[s],source:c?.name??"MachTable built-in",layers:m}}}}export{pe as GRID_OPTION_KEYS,ue as GRID_OPTION_META,ce as beginGridInput,ie as canReplaceGridData,te as createSelectControl,M as equivalentConfigValue,Q as equivalentGridOption,we as mergeMachTableConfig,q as normalizeMachTableConfig,re as readGridCell,ve as resolveMachTableGridOptions,oe as resumeGrid,ne as suspendGrid,ae as writeGridInput};
|
package/dist/analysis.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WorkbenchOptions, a as WorkbenchHandle } from './shared-
|
|
2
|
-
import './api-
|
|
1
|
+
import { W as WorkbenchOptions, a as WorkbenchHandle } from './shared-O6pPO8H8.cjs';
|
|
2
|
+
import './api-Di5SQHAP.cjs';
|
|
3
3
|
|
|
4
4
|
type PivotAggregate = "sum" | "count" | "avg" | "min" | "max";
|
|
5
5
|
type PivotDimension = string | number | boolean | null;
|
package/dist/analysis.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WorkbenchOptions, a as WorkbenchHandle } from './shared-
|
|
2
|
-
import './api-
|
|
1
|
+
import { W as WorkbenchOptions, a as WorkbenchHandle } from './shared-BusgJSf4.js';
|
|
2
|
+
import './api-Di5SQHAP.js';
|
|
3
3
|
|
|
4
4
|
type PivotAggregate = "sum" | "count" | "avg" | "min" | "max";
|
|
5
5
|
type PivotDimension = string | number | boolean | null;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/** 状态列只影响显示;不会改写原值、排序、筛选或导出。 */
|
|
2
|
+
type ColumnStatus = boolean | Readonly<Record<string, string | {
|
|
3
|
+
label?: string;
|
|
4
|
+
color?: string;
|
|
5
|
+
}>>;
|
|
6
|
+
|
|
1
7
|
declare class ColumnGroup<TData = any> {
|
|
2
8
|
readonly groupId: string;
|
|
3
9
|
readonly def: ColDefGroup<TData>;
|
|
@@ -15,6 +21,8 @@ declare class Column<TData = any> {
|
|
|
15
21
|
pinned: PinnedDirection | null;
|
|
16
22
|
manualWidth: number | null;
|
|
17
23
|
contentWidth: number | null;
|
|
24
|
+
/** 布局统一保护完整表头;原始列定义保持只读。 */
|
|
25
|
+
minWidth?: number;
|
|
18
26
|
flex: number | null;
|
|
19
27
|
currentWidth: number;
|
|
20
28
|
parentGroup: ColumnGroup<TData> | null;
|
|
@@ -231,6 +239,8 @@ interface ColDef<TData = any, TValue = any> {
|
|
|
231
239
|
headerClass?: string | string[];
|
|
232
240
|
headerTooltip?: string;
|
|
233
241
|
headerComponent?: (params: HeaderComponentParams<TData>) => string | HTMLElement | ICellRendererResult | null | undefined;
|
|
242
|
+
/** 未声明 width 时默认按内容测宽;false 保留默认宽度。maxWidth 可覆盖自动测宽的 360px 上限。 */
|
|
243
|
+
autoWidth?: boolean;
|
|
234
244
|
width?: number;
|
|
235
245
|
minWidth?: number;
|
|
236
246
|
maxWidth?: number;
|
|
@@ -270,6 +280,8 @@ interface ColDef<TData = any, TValue = any> {
|
|
|
270
280
|
/** Clipboard/file output; display formatting and sort/filter continue to use stored values. */
|
|
271
281
|
valueSerializer?: (params: ValueSerializerParams<TData, TValue>) => unknown;
|
|
272
282
|
valueFormatter?: (params: ValueFormatterParams<TData, TValue>) => any;
|
|
283
|
+
/** true 使用默认状态色;映射值为颜色,或 { label, color }。自定义 renderer 优先。 */
|
|
284
|
+
status?: ColumnStatus;
|
|
273
285
|
cellRenderer?: CellRendererFn | string;
|
|
274
286
|
cellRendererParams?: Record<string, any>;
|
|
275
287
|
cellClass?: CellClassRule;
|
|
@@ -1423,4 +1435,4 @@ interface GridApi<TData = any> {
|
|
|
1423
1435
|
isDestroyed(): boolean;
|
|
1424
1436
|
}
|
|
1425
1437
|
|
|
1426
|
-
export { type
|
|
1438
|
+
export { type ColumnWorkbenchItem as $, type AdvancedFilterModel as A, type ApplyGridStateOptions as B, type ColDef as C, type CellAlign as D, type CellClassParams as E, type FilterType as F, type GridFeature as G, type CellClassRule as H, type ImportMatrixOptions as I, type CellClickEvent as J, type CellContextMenuEvent as K, type CellDoubleClickEvent as L, type CellEditingStartedEvent as M, type CellEditingStoppedEvent as N, type CellEditorFactory as O, type CellEditorParams as P, type CellRendererOutput as Q, type CellStyleRule as R, type SortModel as S, type CellValueChangedEvent as T, type ColDefOrGroup as U, type ValueOutputTarget as V, type ColumnLayoutMode as W, type ColumnMovedEvent as X, type ColumnResizedEvent as Y, type ColumnStatus as Z, type ColumnVisibilityChangedEvent as _, type GridCellRange as a, type OverlayTemplate as a$, type ContextMenuItem as a0, type ContextMenuParams as a1, type CsvExportParams as a2, DEFAULT_LOCALE as a3, type DatasourceMode as a4, type DateFilterCondition as a5, type DateFilterMatch as a6, type DetailRowRendererParams as a7, type DetailToggledEvent as a8, type DirtyStateChangedEvent as a9, type GridFilteringApi as aA, type GridHierarchyApi as aB, type GridIoApi as aC, type GridPaginationApi as aD, type GridPerformanceSnapshot as aE, type GridPersistenceOptions as aF, type GridReadyEvent as aG, type GridRowsApi as aH, type GridSelectionApi as aI, type GridSortingApi as aJ, type GridStateApi as aK, type GridStateSection as aL, type GridUpdateSchedulerSnapshot as aM, type GridViewApi as aN, type HeaderComponentParams as aO, type ICellEditor as aP, type ICellRendererResult as aQ, type ImportCsvOptions as aR, type InfiniteGetRowsParams as aS, LOCALE_EN as aT, type MachTableLocale as aU, type MachTableLocaleKey as aV, type MatrixExportParams as aW, type ModelUpdatedEvent as aX, type NumberFilterCondition as aY, type NumberFilterMatch as aZ, type OverlayContent as a_, type DomLayoutMode as aa, EVENT_TYPES as ab, type EditableIndicator as ac, type EditableParams as ad, type EventHandlers as ae, type FilterChangedEvent as af, type GetRowHeightParams as ag, type GridAsyncOptions as ah, type GridBatchSaveResult as ai, type GridCellChange as aj, type GridColumnsApi as ak, type GridDataProcessorColumn as al, type GridDataProcessorRequest as am, type GridDataProcessorResult as an, type GridDataProcessorRow as ao, type GridDatasource as ap, type GridDiagnosticError as aq, type GridDiagnostics as ar, type GridDiagnosticsApi as as, type GridEditType as at, type GridEditingApi as au, type GridErrorCode as av, type GridErrorEvent as aw, type GridEventBase as ax, type GridEventMap as ay, type GridFeatureContext as az, type GridApi as b, type PaginationChangedEvent as b0, type PaginationConfig as b1, type PinnedDirection as b2, type PrintOptions as b3, type RangeSelectionChangedEvent as b4, type RefreshCellsParams as b5, type RemoteBlockCacheSnapshot as b6, type ResolvedGridOptions as b7, type RowClickEvent as b8, type RowDragEndEvent as b9, type TextFilterMatch as bA, type ThemeMode as bB, type TooltipParams as bC, type TreeChildrenLoadFailedEvent as bD, type TreeChildrenLoadedEvent as bE, type TreeDataLoadParams as bF, type ValueFormatterParams as bG, type ValueGetterParams as bH, type ValueInputSource as bI, type ValueParserParams as bJ, type ValueSerializerParams as bK, type ValueSetterParams as bL, type WatermarkConfig as bM, formatText as bN, formatTwo as bO, isColDefGroup as bP, matchLocaleKey as bQ, type RowDragIntent as ba, type RowDragPolicy as bb, type RowEditChange as bc, type RowEditValidationParams as bd, type RowEditValidationResult as be, type RowEditingStartedEvent as bf, type RowEditingStoppedEvent as bg, type RowNode as bh, type RowSelectionMode as bi, type RowStyleParams as bj, type RowStyleRule as bk, type RowTone as bl, type RowTransaction as bm, type SaveChangeIssue as bn, type SaveChangesResult as bo, type SelectEditorOption as bp, type SelectEditorParams as bq, type SelectionChangedEvent as br, type SetFilterCondition as bs, type SetFilterParams as bt, type SortChangedEvent as bu, type SortDirection as bv, type SortModelItem as bw, type StatusBarConfig as bx, type StatusBarPanel as by, type TextFilterCondition as bz, type GridOptions as c, type GridDataProcessor as d, type GridComponents as e, type GridState as f, type GridStateStore as g, type FilterModel as h, type FieldPath as i, type GridEventType as j, type SaveChangesHandler as k, type ColumnFilter as l, type AdvancedFilterCondition as m, type AdvancedFilterNode as n, type AdvancedFilterGroup as o, type ColDefGroup as p, type GridStateInput as q, type GridSize as r, type CellRendererParams as s, type GridChange as t, type CellRendererFn as u, type FieldPathValue as v, type SaveChangeConflict as w, type ColumnState as x, type ActionPolicy as y, type ActionPolicyContext as z };
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/** 状态列只影响显示;不会改写原值、排序、筛选或导出。 */
|
|
2
|
+
type ColumnStatus = boolean | Readonly<Record<string, string | {
|
|
3
|
+
label?: string;
|
|
4
|
+
color?: string;
|
|
5
|
+
}>>;
|
|
6
|
+
|
|
1
7
|
declare class ColumnGroup<TData = any> {
|
|
2
8
|
readonly groupId: string;
|
|
3
9
|
readonly def: ColDefGroup<TData>;
|
|
@@ -15,6 +21,8 @@ declare class Column<TData = any> {
|
|
|
15
21
|
pinned: PinnedDirection | null;
|
|
16
22
|
manualWidth: number | null;
|
|
17
23
|
contentWidth: number | null;
|
|
24
|
+
/** 布局统一保护完整表头;原始列定义保持只读。 */
|
|
25
|
+
minWidth?: number;
|
|
18
26
|
flex: number | null;
|
|
19
27
|
currentWidth: number;
|
|
20
28
|
parentGroup: ColumnGroup<TData> | null;
|
|
@@ -231,6 +239,8 @@ interface ColDef<TData = any, TValue = any> {
|
|
|
231
239
|
headerClass?: string | string[];
|
|
232
240
|
headerTooltip?: string;
|
|
233
241
|
headerComponent?: (params: HeaderComponentParams<TData>) => string | HTMLElement | ICellRendererResult | null | undefined;
|
|
242
|
+
/** 未声明 width 时默认按内容测宽;false 保留默认宽度。maxWidth 可覆盖自动测宽的 360px 上限。 */
|
|
243
|
+
autoWidth?: boolean;
|
|
234
244
|
width?: number;
|
|
235
245
|
minWidth?: number;
|
|
236
246
|
maxWidth?: number;
|
|
@@ -270,6 +280,8 @@ interface ColDef<TData = any, TValue = any> {
|
|
|
270
280
|
/** Clipboard/file output; display formatting and sort/filter continue to use stored values. */
|
|
271
281
|
valueSerializer?: (params: ValueSerializerParams<TData, TValue>) => unknown;
|
|
272
282
|
valueFormatter?: (params: ValueFormatterParams<TData, TValue>) => any;
|
|
283
|
+
/** true 使用默认状态色;映射值为颜色,或 { label, color }。自定义 renderer 优先。 */
|
|
284
|
+
status?: ColumnStatus;
|
|
273
285
|
cellRenderer?: CellRendererFn | string;
|
|
274
286
|
cellRendererParams?: Record<string, any>;
|
|
275
287
|
cellClass?: CellClassRule;
|
|
@@ -1423,4 +1435,4 @@ interface GridApi<TData = any> {
|
|
|
1423
1435
|
isDestroyed(): boolean;
|
|
1424
1436
|
}
|
|
1425
1437
|
|
|
1426
|
-
export { type
|
|
1438
|
+
export { type ColumnWorkbenchItem as $, type AdvancedFilterModel as A, type ApplyGridStateOptions as B, type ColDef as C, type CellAlign as D, type CellClassParams as E, type FilterType as F, type GridFeature as G, type CellClassRule as H, type ImportMatrixOptions as I, type CellClickEvent as J, type CellContextMenuEvent as K, type CellDoubleClickEvent as L, type CellEditingStartedEvent as M, type CellEditingStoppedEvent as N, type CellEditorFactory as O, type CellEditorParams as P, type CellRendererOutput as Q, type CellStyleRule as R, type SortModel as S, type CellValueChangedEvent as T, type ColDefOrGroup as U, type ValueOutputTarget as V, type ColumnLayoutMode as W, type ColumnMovedEvent as X, type ColumnResizedEvent as Y, type ColumnStatus as Z, type ColumnVisibilityChangedEvent as _, type GridCellRange as a, type OverlayTemplate as a$, type ContextMenuItem as a0, type ContextMenuParams as a1, type CsvExportParams as a2, DEFAULT_LOCALE as a3, type DatasourceMode as a4, type DateFilterCondition as a5, type DateFilterMatch as a6, type DetailRowRendererParams as a7, type DetailToggledEvent as a8, type DirtyStateChangedEvent as a9, type GridFilteringApi as aA, type GridHierarchyApi as aB, type GridIoApi as aC, type GridPaginationApi as aD, type GridPerformanceSnapshot as aE, type GridPersistenceOptions as aF, type GridReadyEvent as aG, type GridRowsApi as aH, type GridSelectionApi as aI, type GridSortingApi as aJ, type GridStateApi as aK, type GridStateSection as aL, type GridUpdateSchedulerSnapshot as aM, type GridViewApi as aN, type HeaderComponentParams as aO, type ICellEditor as aP, type ICellRendererResult as aQ, type ImportCsvOptions as aR, type InfiniteGetRowsParams as aS, LOCALE_EN as aT, type MachTableLocale as aU, type MachTableLocaleKey as aV, type MatrixExportParams as aW, type ModelUpdatedEvent as aX, type NumberFilterCondition as aY, type NumberFilterMatch as aZ, type OverlayContent as a_, type DomLayoutMode as aa, EVENT_TYPES as ab, type EditableIndicator as ac, type EditableParams as ad, type EventHandlers as ae, type FilterChangedEvent as af, type GetRowHeightParams as ag, type GridAsyncOptions as ah, type GridBatchSaveResult as ai, type GridCellChange as aj, type GridColumnsApi as ak, type GridDataProcessorColumn as al, type GridDataProcessorRequest as am, type GridDataProcessorResult as an, type GridDataProcessorRow as ao, type GridDatasource as ap, type GridDiagnosticError as aq, type GridDiagnostics as ar, type GridDiagnosticsApi as as, type GridEditType as at, type GridEditingApi as au, type GridErrorCode as av, type GridErrorEvent as aw, type GridEventBase as ax, type GridEventMap as ay, type GridFeatureContext as az, type GridApi as b, type PaginationChangedEvent as b0, type PaginationConfig as b1, type PinnedDirection as b2, type PrintOptions as b3, type RangeSelectionChangedEvent as b4, type RefreshCellsParams as b5, type RemoteBlockCacheSnapshot as b6, type ResolvedGridOptions as b7, type RowClickEvent as b8, type RowDragEndEvent as b9, type TextFilterMatch as bA, type ThemeMode as bB, type TooltipParams as bC, type TreeChildrenLoadFailedEvent as bD, type TreeChildrenLoadedEvent as bE, type TreeDataLoadParams as bF, type ValueFormatterParams as bG, type ValueGetterParams as bH, type ValueInputSource as bI, type ValueParserParams as bJ, type ValueSerializerParams as bK, type ValueSetterParams as bL, type WatermarkConfig as bM, formatText as bN, formatTwo as bO, isColDefGroup as bP, matchLocaleKey as bQ, type RowDragIntent as ba, type RowDragPolicy as bb, type RowEditChange as bc, type RowEditValidationParams as bd, type RowEditValidationResult as be, type RowEditingStartedEvent as bf, type RowEditingStoppedEvent as bg, type RowNode as bh, type RowSelectionMode as bi, type RowStyleParams as bj, type RowStyleRule as bk, type RowTone as bl, type RowTransaction as bm, type SaveChangeIssue as bn, type SaveChangesResult as bo, type SelectEditorOption as bp, type SelectEditorParams as bq, type SelectionChangedEvent as br, type SetFilterCondition as bs, type SetFilterParams as bt, type SortChangedEvent as bu, type SortDirection as bv, type SortModelItem as bw, type StatusBarConfig as bx, type StatusBarPanel as by, type TextFilterCondition as bz, type GridOptions as c, type GridDataProcessor as d, type GridComponents as e, type GridState as f, type GridStateStore as g, type FilterModel as h, type FieldPath as i, type GridEventType as j, type SaveChangesHandler as k, type ColumnFilter as l, type AdvancedFilterCondition as m, type AdvancedFilterNode as n, type AdvancedFilterGroup as o, type ColDefGroup as p, type GridStateInput as q, type GridSize as r, type CellRendererParams as s, type GridChange as t, type CellRendererFn as u, type FieldPathValue as v, type SaveChangeConflict as w, type ColumnState as x, type ActionPolicy as y, type ActionPolicyContext as z };
|
package/dist/business.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as ValueOutputTarget, C as ColDef } from './api-
|
|
1
|
+
import { V as ValueOutputTarget, C as ColDef } from './api-Di5SQHAP.cjs';
|
|
2
2
|
import { D as DictionaryKey, a as DictionaryEntry } from './cachedDictionary-HXvqrDI0.cjs';
|
|
3
3
|
|
|
4
4
|
type DictionaryDisplay = "code" | "label" | "code-label";
|
package/dist/business.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as ValueOutputTarget, C as ColDef } from './api-
|
|
1
|
+
import { V as ValueOutputTarget, C as ColDef } from './api-Di5SQHAP.js';
|
|
2
2
|
import { D as DictionaryKey, a as DictionaryEntry } from './cachedDictionary-HXvqrDI0.js';
|
|
3
3
|
|
|
4
4
|
type DictionaryDisplay = "code" | "label" | "code-label";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as GridOptions, d as GridDataProcessor, C as ColDef, e as GridComponents } from './api-
|
|
1
|
+
import { c as GridOptions, d as GridDataProcessor, C as ColDef, e as GridComponents } from './api-Di5SQHAP.cjs';
|
|
2
2
|
|
|
3
3
|
type MachTablePresetSelection = string | readonly string[] | false;
|
|
4
4
|
type MachTableInstanceOptionKey = "rowData" | "columnDefs" | "datasource" | "loading" | "error" | "initialState" | "persistence" | "components" | "columnTypes";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as GridOptions, d as GridDataProcessor, C as ColDef, e as GridComponents } from './api-
|
|
1
|
+
import { c as GridOptions, d as GridDataProcessor, C as ColDef, e as GridComponents } from './api-Di5SQHAP.js';
|
|
2
2
|
|
|
3
3
|
type MachTablePresetSelection = string | readonly string[] | false;
|
|
4
4
|
type MachTableInstanceOptionKey = "rowData" | "columnDefs" | "datasource" | "loading" | "error" | "initialState" | "persistence" | "components" | "columnTypes";
|
package/dist/import.d.cts
CHANGED
package/dist/import.d.ts
CHANGED