@evotecit/canopyx 0.3.11 → 0.3.15
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/CanopyX.Html/Assets/canopyx-calendar-edit.js +36 -18
- package/CanopyX.Html/Assets/canopyx-calendar-ics.js +7 -5
- package/CanopyX.Html/Assets/canopyx-calendar.css +124 -116
- package/CanopyX.Html/Assets/canopyx-calendar.js +74 -54
- package/CanopyX.Html/Assets/canopyx-cell-range.css +8 -8
- package/CanopyX.Html/Assets/canopyx-cell-range.js +1 -1
- package/CanopyX.Html/Assets/canopyx-changes.css +113 -113
- package/CanopyX.Html/Assets/canopyx-changes.js +7 -10
- package/CanopyX.Html/Assets/canopyx-column-groups.css +5 -5
- package/CanopyX.Html/Assets/canopyx-column-groups.js +1 -1
- package/CanopyX.Html/Assets/canopyx-data.js +2 -2
- package/CanopyX.Html/Assets/canopyx-detail-rows.css +9 -9
- package/CanopyX.Html/Assets/canopyx-detail-rows.js +2 -2
- package/CanopyX.Html/Assets/canopyx-editing.css +18 -18
- package/CanopyX.Html/Assets/canopyx-editing.js +1 -1
- package/CanopyX.Html/Assets/canopyx-enhance.js +2 -2
- package/CanopyX.Html/Assets/canopyx-export.js +8 -4
- package/CanopyX.Html/Assets/canopyx-facets.css +33 -33
- package/CanopyX.Html/Assets/canopyx-facets.js +10 -11
- package/CanopyX.Html/Assets/canopyx-filter-editor.css +57 -57
- package/CanopyX.Html/Assets/canopyx-filter-editor.js +15 -11
- package/CanopyX.Html/Assets/canopyx-flow-checks.css +11 -11
- package/CanopyX.Html/Assets/canopyx-flow-checks.js +1 -1
- package/CanopyX.Html/Assets/canopyx-flow-command.css +7 -7
- package/CanopyX.Html/Assets/canopyx-flow-command.js +1 -1
- package/CanopyX.Html/Assets/canopyx-flow-dialog.css +7 -7
- package/CanopyX.Html/Assets/canopyx-flow-dialog.js +1 -1
- package/CanopyX.Html/Assets/canopyx-flow-drafts.css +7 -7
- package/CanopyX.Html/Assets/canopyx-flow-drafts.js +1 -1
- package/CanopyX.Html/Assets/canopyx-flow-entry.css +17 -76
- package/CanopyX.Html/Assets/canopyx-flow-entry.js +9 -3
- package/CanopyX.Html/Assets/canopyx-flow-host.css +4 -4
- package/CanopyX.Html/Assets/canopyx-flow-host.js +1 -1
- package/CanopyX.Html/Assets/canopyx-flow-module.mjs +9 -3
- package/CanopyX.Html/Assets/canopyx-flow-pick.css +4 -4
- package/CanopyX.Html/Assets/canopyx-flow-pick.js +1 -1
- package/CanopyX.Html/Assets/canopyx-flow-preview.css +6 -6
- package/CanopyX.Html/Assets/canopyx-flow-preview.js +1 -1
- package/CanopyX.Html/Assets/canopyx-flow-records.css +3 -3
- package/CanopyX.Html/Assets/canopyx-flow-records.js +1 -1
- package/CanopyX.Html/Assets/canopyx-flow-tasks.css +17 -17
- package/CanopyX.Html/Assets/canopyx-flow-tasks.js +1 -1
- package/CanopyX.Html/Assets/canopyx-flow.css +79 -79
- package/CanopyX.Html/Assets/canopyx-flow.js +1 -1
- package/CanopyX.Html/Assets/canopyx-format-editor.css +23 -23
- package/CanopyX.Html/Assets/canopyx-format-editor.js +2 -3
- package/CanopyX.Html/Assets/canopyx-formatting.css +17 -17
- package/CanopyX.Html/Assets/canopyx-formatting.js +5 -5
- package/CanopyX.Html/Assets/canopyx-forms.css +5 -5
- package/CanopyX.Html/Assets/canopyx-forms.js +1 -1
- package/CanopyX.Html/Assets/canopyx-grid-module.mjs +134 -77
- package/CanopyX.Html/Assets/canopyx-grid-options.css +10 -0
- package/CanopyX.Html/Assets/canopyx-grid-options.js +47 -0
- package/CanopyX.Html/Assets/canopyx-grid.css +199 -261
- package/CanopyX.Html/Assets/canopyx-grid.js +134 -77
- package/CanopyX.Html/Assets/canopyx-grouping.css +17 -17
- package/CanopyX.Html/Assets/canopyx-grouping.js +12 -9
- package/CanopyX.Html/Assets/canopyx-highlight.css +14 -14
- package/CanopyX.Html/Assets/canopyx-highlight.js +2 -2
- package/CanopyX.Html/Assets/canopyx-interactive.css +94 -155
- package/CanopyX.Html/Assets/canopyx-interactive.js +58 -24
- package/CanopyX.Html/Assets/canopyx-labels-de.js +5 -0
- package/CanopyX.Html/Assets/canopyx-labels-es.js +5 -0
- package/CanopyX.Html/Assets/canopyx-labels-fr.js +5 -0
- package/CanopyX.Html/Assets/canopyx-labels-it.js +5 -0
- package/CanopyX.Html/Assets/canopyx-labels-pl.js +5 -0
- package/CanopyX.Html/Assets/canopyx-layouts.css +17 -17
- package/CanopyX.Html/Assets/canopyx-layouts.js +4 -12
- package/CanopyX.Html/Assets/canopyx-link.css +7 -7
- package/CanopyX.Html/Assets/canopyx-link.js +1 -1
- package/CanopyX.Html/Assets/canopyx-live.css +9 -9
- package/CanopyX.Html/Assets/canopyx-live.js +2 -2
- package/CanopyX.Html/Assets/canopyx-matrix.css +74 -74
- package/CanopyX.Html/Assets/canopyx-matrix.js +3 -4
- package/CanopyX.Html/Assets/canopyx-module.mjs +58 -24
- package/CanopyX.Html/Assets/canopyx-pager.css +2 -2
- package/CanopyX.Html/Assets/canopyx-pager.js +1 -1
- package/CanopyX.Html/Assets/canopyx-presenters.js +11 -0
- package/CanopyX.Html/Assets/canopyx-record-panel.css +49 -49
- package/CanopyX.Html/Assets/canopyx-record-panel.js +13 -11
- package/CanopyX.Html/Assets/canopyx-reporting-module.mjs +142 -84
- package/CanopyX.Html/Assets/canopyx-reporting.css +214 -276
- package/CanopyX.Html/Assets/canopyx-reporting.js +142 -84
- package/CanopyX.Html/Assets/canopyx-timeline.css +28 -28
- package/CanopyX.Html/Assets/canopyx-timeline.js +11 -10
- package/CanopyX.Html/Assets/canopyx-tree-tools.css +47 -46
- package/CanopyX.Html/Assets/canopyx-tree-tools.js +5 -4
- package/CanopyX.Html/Assets/canopyx.css +81 -142
- package/CanopyX.Html/Assets/canopyx.js +58 -24
- package/JavaScript/calendar.d.ts +15 -0
- package/JavaScript/grid.d.ts +29 -4
- package/JavaScript/hosts.d.ts +11 -0
- package/JavaScript/locales/de.mjs +5 -0
- package/JavaScript/locales/es.mjs +5 -0
- package/JavaScript/locales/fr.mjs +5 -0
- package/JavaScript/locales/it.mjs +5 -0
- package/JavaScript/locales/pl.mjs +5 -0
- package/JavaScript/plugins.d.ts +4 -0
- package/JavaScript/protocol.d.ts +14 -1
- package/JavaScript/records.d.ts +2 -0
- package/README.md +6 -2
- package/package.json +7 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
/* Live data: the order prompt sits in the toolbar (over the rows without one);changed cells flash (a still outline with reduced motion). */
|
|
2
2
|
.cx-data-grid.cx-live-grid{position:relative;}
|
|
3
|
-
.cx-data-grid .cx-live-bar{display:inline-flex;align-items:center;gap:var(--cx-size-6px);flex:none;max-width:100%;height:var(--
|
|
3
|
+
.cx-data-grid .cx-live-bar{display:inline-flex;align-items:center;gap:var(--cx-size-6px);flex:none;max-width:100%;height:var(--hfx-control-height-md,calc(36px - var(--cx-compact,0) * 8px));padding:0 var(--cx-size-2px) 0 var(--cx-size-10px);border-radius:var(--hfx-radius-control,var(--hfx-radius-md,6px));background:var(--hfx-color-accent-subtle,light-dark(#e7f1f1,#1b3435));color:var(--hfx-color-text,light-dark(#16181c,#f2f3f5));font-size:var(--cx-size-13d5px);white-space:nowrap;}
|
|
4
4
|
.cx-data-grid .cx-live-bar[hidden]{display:none;}
|
|
5
|
-
.cx-data-grid .cx-live-bar.cx-live-float{position:absolute;left:50%;z-index:4;transform:translateX(-50%);max-width:calc(100% - var(--cx-size-24px));border:var(--cx-size-1px) solid var(--
|
|
6
|
-
.cx-data-grid .cx-live-bar .cx-ico{flex:none;width:var(--cx-size-16px);height:var(--cx-size-16px);color:var(--
|
|
5
|
+
.cx-data-grid .cx-live-bar.cx-live-float{position:absolute;left:50%;z-index:4;transform:translateX(-50%);max-width:calc(100% - var(--cx-size-24px));border:var(--cx-size-1px) solid var(--hfx-color-border-strong,light-dark(#cdd0d5,#363a42));background:var(--hfx-color-surface,light-dark(#ffffff,#16181c));box-shadow:var(--hfx-elevation-2,0 1px 2px rgba(22,24,28,.05),0 6px 18px -10px rgba(22,24,28,.18));}
|
|
6
|
+
.cx-data-grid .cx-live-bar .cx-ico{flex:none;width:var(--cx-size-16px);height:var(--cx-size-16px);color:var(--hfx-color-accent,light-dark(#11776f,#37c9b8));}
|
|
7
7
|
.cx-data-grid .cx-live-bar-text{overflow:hidden;text-overflow:ellipsis;}
|
|
8
|
-
.cx-data-grid .cx-live-bar .cx-button{height:var(--cx-size-28px);min-height:var(--cx-size-28px);padding:0 var(--cx-size-10px);border:var(--cx-size-1px) solid color-mix(in srgb,var(--
|
|
9
|
-
.cx-data-grid .cx-live-bar .cx-button:hover{background:color-mix(in srgb,var(--
|
|
10
|
-
.cx-data-grid .cx-live-bar .cx-button:focus-visible{outline:var(--
|
|
8
|
+
.cx-data-grid .cx-live-bar .cx-button{height:var(--cx-size-28px);min-height:var(--cx-size-28px);padding:0 var(--cx-size-10px);border:var(--cx-size-1px) solid color-mix(in srgb,var(--hfx-color-accent,light-dark(#11776f,#37c9b8)) 45%,var(--hfx-color-surface,light-dark(#ffffff,#16181c)));border-radius:var(--hfx-radius-sm,4px);background:var(--hfx-color-surface,light-dark(#ffffff,#16181c));color:var(--hfx-color-text,light-dark(#16181c,#f2f3f5));font:inherit;font-size:var(--cx-size-13px);font-weight:600;cursor:pointer;}
|
|
9
|
+
.cx-data-grid .cx-live-bar .cx-button:hover{background:color-mix(in srgb,var(--hfx-color-accent,light-dark(#11776f,#37c9b8)) 10%,var(--hfx-color-surface,light-dark(#ffffff,#16181c)));}
|
|
10
|
+
.cx-data-grid .cx-live-bar .cx-button:focus-visible{outline:var(--hfx-focus-width,2px) solid var(--hfx-color-focus-ring,light-dark(#02726a,#37c9b8));outline-offset:var(--hfx-focus-offset,2px);}
|
|
11
11
|
.cx-data-grid.cx-phone .cx-live-bar{height:var(--cx-size-44px);padding:0 0 0 var(--cx-size-8px);background:transparent;}
|
|
12
12
|
.cx-data-grid.cx-phone .cx-live-bar:not(.cx-live-float) .cx-live-bar-text{position:absolute;width:var(--cx-size-1px);height:var(--cx-size-1px);overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
|
|
13
|
-
.cx-data-grid.cx-phone .cx-live-bar .cx-button{height:var(--cx-size-44px);min-height:var(--cx-size-44px);min-width:var(--cx-size-44px);background:var(--
|
|
14
|
-
@keyframes cx-live-flash{from{box-shadow:inset 0 0 0 var(--cx-size-999px) color-mix(in srgb,var(--
|
|
13
|
+
.cx-data-grid.cx-phone .cx-live-bar .cx-button{height:var(--cx-size-44px);min-height:var(--cx-size-44px);min-width:var(--cx-size-44px);background:var(--hfx-color-accent-subtle,light-dark(#e7f1f1,#1b3435));}
|
|
14
|
+
@keyframes cx-live-flash{from{box-shadow:inset 0 0 0 var(--cx-size-999px) color-mix(in srgb,var(--hfx-color-accent,light-dark(#11776f,#37c9b8)) 28%,transparent);}to{box-shadow:inset 0 0 0 var(--cx-size-999px) transparent;}}
|
|
15
15
|
.cx-data-grid .cx-cell.cx-live-flash{animation:cx-live-flash var(--cx-live-flash-ms,1200ms) ease-out both;}
|
|
16
16
|
@media (prefers-reduced-motion:reduce){
|
|
17
|
-
.cx-data-grid .cx-cell.cx-live-flash{box-shadow:inset 0 0 0 var(--cx-size-2px) color-mix(in srgb,var(--
|
|
17
|
+
.cx-data-grid .cx-cell.cx-live-flash{box-shadow:inset 0 0 0 var(--cx-size-2px) color-mix(in srgb,var(--hfx-color-accent,light-dark(#11776f,#37c9b8)) 60%,transparent);}
|
|
18
18
|
}
|
|
19
19
|
@media (forced-colors:active){
|
|
20
20
|
.cx-data-grid .cx-live-bar{border:var(--cx-size-1px) solid CanvasText;background:Canvas;color:CanvasText;}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(global){"use strict";const installed=new WeakSet();const part={version:"
|
|
1
|
+
(function(global){"use strict";const installed=new WeakSet();const part={version:"42ad4b814f47bd00",install(context){if(installed.has(context.DataGrid.prototype))return;const{DataGrid,h,setText,fill,gridButton,gridIcon,gridQuery,gridResultShape,gridQueryRows,gridCompare,gridOrder,gridIdOrder,validateGridRows,validateGridPage,validateGridCursorPage,gridFreeze,requireIdentifier,checkDocument,cellValue,PROTOCOL,GRID_REPORTING,VIEW_MODES,inlineGridSource}=context;const LIVE_KEYS=new Set(["stableOrder","flash","batchMs","pollMs","load","announce","pauseWhenHidden"]);const LIVE_MAX_ROWS=100000;function liveOptions(view,options){const read=value=>{if(value===undefined||value===true||value===false)return{};if(!value||typeof value!=="object"||Array.isArray(value)||Object.keys(value).some(key=>!LIVE_KEYS.has(key)))
|
|
2
2
|
throw new Error("CanopyX: live takes stableOrder, flash, batchMs, pollMs, load, announce and pauseWhenHidden.");return value};const merged=options.live===false?{}:{...read(view.live),...read(options.live)},flash=merged.flash;const integer=(value,min,max)=>value===undefined||Number.isInteger(value)&&value>=min&&value<=max;if(["stableOrder","announce","pauseWhenHidden"].some(key=>merged[key]!==undefined&&typeof merged[key]!=="boolean")||
|
|
3
3
|
!(flash===undefined||typeof flash==="boolean"||flash&&typeof flash==="object"&&Object.keys(flash).every(key=>key==="durationMs")&&integer(flash.durationMs,100,10000))||
|
|
4
4
|
!integer(merged.batchMs,0,60000)||!(merged.pollMs===undefined||merged.pollMs===0||integer(merged.pollMs,250,86400000))||
|
|
@@ -33,7 +33,7 @@ let dirty=order.dirty;const neighbour=(index,step)=>{for(let at=index+step;at>=0
|
|
|
33
33
|
let ids=leave.size?order.ids.filter(id=>!leave.has(id)):order.ids;if(enter.length){enter.sort(compare);const merged=[];let i=0,j=0;while(i<ids.length&&j<enter.length)merged.push(compare(rows.get(ids[i]),enter[j])<=0?ids[i++]:enter[j++].id);while(i<ids.length)merged.push(ids[i++]);while(j<enter.length)merged.push(enter[j++].id);ids=merged}
|
|
34
34
|
this.liveOrder=liveIndexOrder({shape:order.shape,ids,dirty:stable&&dirty});this.view.rows=this.liveRowsOf=[...rows.values()];return{result,changed}}});function liveMerged(before,change){const after={...before,cells:{...before.cells}};Object.assign(after.cells,change.cells||{});for(const name of["tone","className","fields","detail"])if(change[name]!==undefined){if(change[name]===null)delete after[name];else after[name]=change[name]}
|
|
35
35
|
return after}
|
|
36
|
-
const LIVE_REQUEST=DataGrid.prototype.requestPage;DataGrid.prototype.requestPage=function(query,signal){const order=this.liveOrder;if(order&&this.liveOrderSource!==this.source)this.liveOrder=null;if(!this.liveOrder||!this.liveInline()||gridResultShape(query)!==order.shape)return LIVE_REQUEST.call(this,query,signal);const rows=this.liveRows(),items=order.ids.slice(query.offset,query.offset+query.limit).map(id=>rows.get(id));return Promise.resolve({protocol:PROTOCOL,type:"gridPage",view:this.view.id,revision:query.revision||"inline",offset:query.offset,total:rows.size,matched:order.ids.length,items})};Object.assign(DataGrid.prototype,{liveInline(){return this.view.source.kind==="inline"&&!this.opts.source},liveProjected(){const reporting=this.view.reporting;return!!(reporting&&(reporting.grouping||this.acceptedQuery?.groupBy?.length||reporting.aggregates?.length||reporting.detail)||this.opts.detail)},liveAnchor(){const top=this.logicalTop(),index=this.rowAt(top),row=this.rowCache.get(index);return{top,index,id:row&&!row.status?row.key:null,delta:top-this.rowTop(index)}},liveSwap(snapshot,pagesFor,positionOf,changed,removed,shifted=true){const hadFocus=this.canvas.contains(document.activeElement),anchor=this.liveAnchor(),old=new Map();const focused=this.focused,focusIndex=focused?focused._ri:-1,focusId=focused&&!focused.status?focused.key:null;for(const row of this.rowCache.values())old.set(row.key,row);const length=this.pageLength;if(this.paged&&!this.cursor&&this.pageOffset>0&&this.pageOffset>=snapshot.matched)
|
|
36
|
+
const LIVE_REQUEST=DataGrid.prototype.requestPage;DataGrid.prototype.requestPage=function(query,signal){const order=this.liveOrder;if(order&&this.liveOrderSource!==this.source)this.liveOrder=null;if(!this.liveOrder||!this.liveInline()||gridResultShape(query)!==order.shape)return LIVE_REQUEST.call(this,query,signal);const rows=this.liveRows(),items=order.ids.slice(query.offset,query.offset+query.limit).map(id=>rows.get(id));return Promise.resolve({protocol:PROTOCOL,type:"gridPage",view:this.view.id,revision:query.revision||"inline",offset:query.offset,total:rows.size,matched:order.ids.length,items})};Object.assign(DataGrid.prototype,{liveInline(){return this.view.source.kind==="inline"&&!this.opts.source},liveProjected(){const reporting=this.view.reporting;return!!(this.view.footers?.length||reporting&&(reporting.grouping||this.acceptedQuery?.groupBy?.length||reporting.aggregates?.length||reporting.detail)||this.opts.detail)},liveAnchor(){const top=this.logicalTop(),index=this.rowAt(top),row=this.rowCache.get(index);return{top,index,id:row&&!row.status?row.key:null,delta:top-this.rowTop(index)}},liveSwap(snapshot,pagesFor,positionOf,changed,removed,shifted=true){const hadFocus=this.canvas.contains(document.activeElement),anchor=this.liveAnchor(),old=new Map();const focused=this.focused,focusIndex=focused?focused._ri:-1,focusId=focused&&!focused.status?focused.key:null;for(const row of this.rowCache.values())old.set(row.key,row);const length=this.pageLength;if(this.paged&&!this.cursor&&this.pageOffset>0&&this.pageOffset>=snapshot.matched)
|
|
37
37
|
this.pageOffset=Math.max(0,Math.floor((snapshot.matched-1)/ length) * length);
|
|
38
38
|
const anchorIndex=anchor.id===null?-1:positionOf(anchor.id),newFocus=focusId===null?-1:positionOf(focusId);const pages=pagesFor(anchorIndex>=0?anchorIndex:anchor.index,newFocus);if(this.pendingPages.size||this.pendingNavigation){this.queryEpoch++;this.pendingPages.clear();this.pendingNavigation=null}
|
|
39
39
|
this.pages.clear();this.rowCache.clear();this.placeholders.clear();this.snapshot={revision:snapshot.revision,total:snapshot.total,matched:snapshot.matched};const heights=this.autoRows?new Map():null;for(const[offset,items]of[...pages].sort((a,b)=>a[0]- b[0])){items.forEach((item,index)=>{const row=old.get(item.id);if(!row)return;if(heights&&this.rowHeights.has(row._ri))heights.set(offset+index,this.rowHeights.get(row._ri));row.h=item;row._ri=offset+index;row.hpx=this.rowH;this.rowCache.set(row._ri,row)});this.storePage({protocol:PROTOCOL,type:"gridPage",view:this.view.id,revision:snapshot.revision,offset,items})}
|
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
/* The matrix view: a sticky header with column labels written upwards,sticky row headers and totals,windowed cells. */
|
|
2
2
|
.cx-matrix-host{display:block;}
|
|
3
3
|
.cx-matrix [hidden]{display:none !important;}
|
|
4
|
-
.cx-matrix{display:flex;flex-direction:column;gap:var(--cx-size-8px);box-sizing:border-box;max-height:100%;font:var(--
|
|
5
|
-
--mx-line:color-mix(in srgb,var(--
|
|
6
|
-
--mx-raised:color-mix(in srgb,var(--
|
|
4
|
+
.cx-matrix{display:flex;flex-direction:column;gap:var(--cx-size-8px);box-sizing:border-box;max-height:100%;font:var(--hfx-control-font-size,calc(var(--hfx-type-body-size,0.875rem) - var(--cx-compact,0) * .0625rem))/1.35 var(--hfx-font-sans,"Segoe UI Variable Text","Segoe UI",system-ui,-apple-system,"Helvetica Neue",Arial,sans-serif);color:var(--hfx-color-text,light-dark(#16181c,#f2f3f5));
|
|
5
|
+
--mx-line:color-mix(in srgb,var(--hfx-color-border,light-dark(#e2e4e7,#272a30)) 70%,var(--hfx-color-surface,light-dark(#ffffff,#16181c)));--mx-none:color-mix(in srgb,var(--hfx-color-text-muted,light-dark(#626770,#8f949d)) 42%,var(--hfx-color-surface,light-dark(#ffffff,#16181c)));
|
|
6
|
+
--mx-raised:color-mix(in srgb,var(--hfx-color-text,light-dark(#16181c,#f2f3f5)) 18%,transparent);}
|
|
7
7
|
.cx-mx-bar{position:relative;display:flex;flex-wrap:wrap;align-items:center;gap:var(--cx-size-8px);}
|
|
8
|
-
.cx-mx-input{box-sizing:border-box;height:var(--cx-size-32px);padding:0 var(--cx-size-10px);font:inherit;color:var(--
|
|
9
|
-
border:var(--cx-size-1px) solid var(--
|
|
8
|
+
.cx-mx-input{box-sizing:border-box;height:var(--cx-size-32px);padding:0 var(--cx-size-10px);font:inherit;color:var(--hfx-color-text,light-dark(#16181c,#f2f3f5));background:var(--hfx-color-surface,light-dark(#ffffff,#16181c));
|
|
9
|
+
border:var(--cx-size-1px) solid var(--hfx-color-border-control,light-dark(#8a8f98,#6e737c));border-radius:var(--hfx-radius-sm,4px);color-scheme:inherit;}
|
|
10
10
|
.cx-mx-search{flex:1 1 var(--cx-size-180px);max-width:var(--cx-size-320px);}
|
|
11
|
-
.cx-mx-button{box-sizing:border-box;min-height:var(--cx-size-32px);padding:0 var(--cx-size-12px);font:inherit;color:var(--
|
|
12
|
-
border:var(--cx-size-1px) solid var(--
|
|
13
|
-
.cx-mx-button:hover{background:var(--
|
|
14
|
-
.cx-mx-button.cx-mx-active{border-color:var(--
|
|
11
|
+
.cx-mx-button{box-sizing:border-box;min-height:var(--cx-size-32px);padding:0 var(--cx-size-12px);font:inherit;color:var(--hfx-color-text,light-dark(#16181c,#f2f3f5));background:var(--hfx-color-surface,light-dark(#ffffff,#16181c));
|
|
12
|
+
border:var(--cx-size-1px) solid var(--hfx-color-border-control,light-dark(#8a8f98,#6e737c));border-radius:var(--hfx-radius-sm,4px);cursor:pointer;}
|
|
13
|
+
.cx-mx-button:hover{background:var(--hfx-color-hover,light-dark(#f5f5f5,#232529));}
|
|
14
|
+
.cx-mx-button.cx-mx-active{border-color:var(--hfx-color-accent,light-dark(#11776f,#37c9b8));color:var(--hfx-color-accent-text,light-dark(#02726a,#37c9b8));}
|
|
15
15
|
.cx-mx-switch{display:inline-flex;align-items:center;gap:var(--cx-size-6px);min-height:var(--cx-size-24px);cursor:pointer;}
|
|
16
|
-
.cx-mx-check{width:var(--cx-size-16px);height:var(--cx-size-16px);margin:0;accent-color:var(--
|
|
17
|
-
.cx-mx-summary{margin-inline-start:auto;color:var(--
|
|
16
|
+
.cx-mx-check{width:var(--cx-size-16px);height:var(--cx-size-16px);margin:0;accent-color:var(--hfx-color-accent,light-dark(#11776f,#37c9b8));}
|
|
17
|
+
.cx-mx-summary{margin-inline-start:auto;color:var(--hfx-color-text-muted,light-dark(#626770,#8f949d));font-size:var(--cx-size-13px);font-variant-numeric:tabular-nums;}
|
|
18
18
|
.cx-mx-panel{position:absolute;top:calc(100% + var(--cx-size-4px));inset-inline-start:0;z-index:30;box-sizing:border-box;width:min(var(--cx-size-340px),100%);max-height:var(--cx-size-60vh);
|
|
19
|
-
overflow:auto;display:grid;gap:var(--cx-size-10px);padding:var(--cx-size-12px);background:var(--
|
|
20
|
-
border-radius:var(--
|
|
21
|
-
.cx-mx-field{display:grid;gap:var(--cx-size-4px);font-size:var(--cx-size-13px);color:var(--
|
|
22
|
-
.cx-mx-field .cx-mx-input{color:var(--
|
|
19
|
+
overflow:auto;display:grid;gap:var(--cx-size-10px);padding:var(--cx-size-12px);background:var(--hfx-color-surface,light-dark(#ffffff,#16181c));border:var(--cx-size-1px) solid var(--hfx-color-border-strong,light-dark(#cdd0d5,#363a42));
|
|
20
|
+
border-radius:var(--hfx-radius-control,var(--hfx-radius-md,6px));box-shadow:var(--hfx-elevation-2,0 1px 2px rgba(22,24,28,.05),0 6px 18px -10px rgba(22,24,28,.18));}
|
|
21
|
+
.cx-mx-field{display:grid;gap:var(--cx-size-4px);font-size:var(--cx-size-13px);color:var(--hfx-color-text-muted,light-dark(#626770,#8f949d));}
|
|
22
|
+
.cx-mx-field .cx-mx-input{color:var(--hfx-color-text,light-dark(#16181c,#f2f3f5));}
|
|
23
23
|
.cx-mx-facet{display:grid;gap:var(--cx-size-4px);margin:0;padding:0;border:0;min-width:0;}
|
|
24
|
-
.cx-mx-facet legend{padding:0 0 var(--cx-size-4px);font-size:var(--cx-size-13px);color:var(--
|
|
25
|
-
.cx-mx-keycount{color:var(--
|
|
24
|
+
.cx-mx-facet legend{padding:0 0 var(--cx-size-4px);font-size:var(--cx-size-13px);color:var(--hfx-color-text-muted,light-dark(#626770,#8f949d));}
|
|
25
|
+
.cx-mx-keycount{color:var(--hfx-color-text-muted,light-dark(#626770,#8f949d));font-variant-numeric:tabular-nums;margin-inline-start:var(--cx-size-4px);}
|
|
26
26
|
.cx-mx-legend{display:flex;flex-wrap:wrap;gap:var(--cx-size-6px) var(--cx-size-16px);font-size:var(--cx-size-13px);}
|
|
27
27
|
.cx-mx-key{display:inline-flex;align-items:center;gap:var(--cx-size-6px);}
|
|
28
|
-
.cx-mx-swatch{display:inline-flex;align-items:center;justify-content:center;width:var(--cx-size-20px);height:var(--cx-size-20px);border-radius:var(--
|
|
28
|
+
.cx-mx-swatch{display:inline-flex;align-items:center;justify-content:center;width:var(--cx-size-20px);height:var(--cx-size-20px);border-radius:var(--hfx-radius-sm,4px);
|
|
29
29
|
border:var(--cx-size-1px) solid var(--mx-line);flex:none;}
|
|
30
|
-
.cx-mx-swatch.cx-mx-none{background:var(--
|
|
30
|
+
.cx-mx-swatch.cx-mx-none{background:var(--hfx-color-surface,light-dark(#ffffff,#16181c));}
|
|
31
31
|
.cx-mx-swatch.cx-mx-none::after{content:"";width:var(--cx-size-3px);height:var(--cx-size-3px);border-radius:50%;background:var(--mx-none);}
|
|
32
|
-
.cx-mx-scroll{position:relative;flex:0 1 auto;box-sizing:border-box;width:fit-content;max-width:100%;min-height:0;max-height:var(--cx-size-100vh);overflow:auto;background:var(--
|
|
32
|
+
.cx-mx-scroll{position:relative;flex:0 1 auto;box-sizing:border-box;width:fit-content;max-width:100%;min-height:0;max-height:var(--cx-size-100vh);overflow:auto;background:var(--hfx-color-surface,light-dark(#ffffff,#16181c));border:var(--cx-size-1px) solid var(--hfx-color-border,light-dark(#e2e4e7,#272a30));border-radius:var(--hfx-radius-control,var(--hfx-radius-md,6px));
|
|
33
33
|
overscroll-behavior:contain;scrollbar-color:var(--cx-scrollbar-thumb,auto) var(--cx-scrollbar-track,auto);}
|
|
34
|
-
.cx-mx-head{position:sticky;top:0;z-index:3;width:var(--mx-content-w);background:var(--
|
|
34
|
+
.cx-mx-head{position:sticky;top:0;z-index:3;width:var(--mx-content-w);background:var(--hfx-color-surface-sunken,light-dark(#f7f8f9,#111317));}
|
|
35
35
|
.cx-mx-head.cx-mx-raised{box-shadow:0 var(--cx-size-6px) var(--cx-size-8px) calc(var(--cx-size-6px) * -1) var(--mx-raised);}
|
|
36
36
|
.cx-mx-band,.cx-mx-hrow,.cx-mx-frow{position:relative;display:flex;}
|
|
37
37
|
.cx-mx-band{height:var(--mx-band-h);border-bottom:var(--cx-size-1px) solid var(--mx-line);}
|
|
38
|
-
.cx-mx-hrow{height:var(--mx-head-h);border-bottom:var(--cx-size-1px) solid var(--
|
|
38
|
+
.cx-mx-hrow{height:var(--mx-head-h);border-bottom:var(--cx-size-1px) solid var(--hfx-color-border,light-dark(#e2e4e7,#272a30));}
|
|
39
39
|
.cx-mx-spacer{flex:none;width:var(--mx-cols-w);}
|
|
40
40
|
.cx-mx-corner{position:sticky;inset-inline-start:0;z-index:2;box-sizing:border-box;flex:none;width:var(--mx-head-w);display:flex;flex-direction:column;justify-content:flex-end;
|
|
41
|
-
gap:var(--cx-size-2px);padding:var(--cx-size-6px) var(--cx-size-10px);background:var(--
|
|
42
|
-
font-size:var(--cx-size-12px);font-weight:600;color:var(--
|
|
41
|
+
gap:var(--cx-size-2px);padding:var(--cx-size-6px) var(--cx-size-10px);background:var(--hfx-color-surface-sunken,light-dark(#f7f8f9,#111317));border-inline-end:var(--cx-size-1px) solid var(--hfx-color-border,light-dark(#e2e4e7,#272a30));
|
|
42
|
+
font-size:var(--cx-size-12px);font-weight:600;color:var(--hfx-color-text-muted,light-dark(#626770,#8f949d));}
|
|
43
43
|
.cx-mx-corner-columns{align-self:flex-end;}
|
|
44
44
|
.cx-mx-corner-columns::after{content:" \2192";}
|
|
45
45
|
.cx-mx-corner-rows::after{content:" \2193";}
|
|
@@ -47,84 +47,84 @@ font-size:var(--cx-size-12px);font-weight:600;color:var(--cx-muted);}
|
|
|
47
47
|
.cx-mx-hcell{position:absolute;top:0;bottom:0;box-sizing:border-box;width:var(--mx-cell-w);contain:strict;display:flex;align-items:flex-end;justify-content:center;padding-bottom:var(--cx-size-6px);
|
|
48
48
|
border-inline-end:var(--cx-size-1px) solid var(--mx-line);font-size:var(--cx-size-12px);}
|
|
49
49
|
.cx-mx-vlabel{writing-mode:vertical-rl;transform:rotate(180deg);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-height:calc(var(--mx-head-h) - var(--cx-size-12px));}
|
|
50
|
-
.cx-mx-bcell{position:absolute;top:0;bottom:0;box-sizing:border-box;display:flex;align-items:center;padding:0 var(--cx-size-4px);border-inline-end:var(--cx-size-1px) solid var(--
|
|
50
|
+
.cx-mx-bcell{position:absolute;top:0;bottom:0;box-sizing:border-box;display:flex;align-items:center;padding:0 var(--cx-size-4px);border-inline-end:var(--cx-size-1px) solid var(--hfx-color-border,light-dark(#e2e4e7,#272a30));
|
|
51
51
|
overflow:hidden;font-size:var(--cx-size-12px);font-weight:600;}
|
|
52
|
-
.cx-mx-bandcorner,.cx-mx-bandend{background:var(--
|
|
52
|
+
.cx-mx-bandcorner,.cx-mx-bandend{background:var(--hfx-color-surface-sunken,light-dark(#f7f8f9,#111317));}
|
|
53
53
|
.cx-mx-bcell .cx-mx-toggle{max-width:100%;overflow:hidden;}
|
|
54
54
|
.cx-mx-bclip .cx-mx-toggle{visibility:hidden;}
|
|
55
55
|
.cx-mx-total{position:sticky;inset-inline-end:0;z-index:2;box-sizing:border-box;flex:none;width:var(--mx-total-w);display:flex;align-items:center;justify-content:flex-end;
|
|
56
|
-
padding:0 var(--cx-size-10px);background:var(--
|
|
57
|
-
.cx-mx-htotal{background:var(--
|
|
58
|
-
.cx-mx-total.cx-mx-zero,.cx-mx-fcell.cx-mx-zero{font-weight:400;color:var(--
|
|
56
|
+
padding:0 var(--cx-size-10px);background:var(--hfx-color-surface,light-dark(#ffffff,#16181c));border-inline-start:var(--cx-size-1px) solid var(--hfx-color-border,light-dark(#e2e4e7,#272a30));font-variant-numeric:tabular-nums;font-weight:600;}
|
|
57
|
+
.cx-mx-htotal{background:var(--hfx-color-surface-sunken,light-dark(#f7f8f9,#111317));align-items:flex-end;padding-bottom:var(--cx-size-6px);font-size:var(--cx-size-12px);color:var(--hfx-color-text-muted,light-dark(#626770,#8f949d));}
|
|
58
|
+
.cx-mx-total.cx-mx-zero,.cx-mx-fcell.cx-mx-zero{font-weight:400;color:var(--hfx-color-text-muted,light-dark(#626770,#8f949d));}
|
|
59
59
|
.cx-mx-body{position:relative;width:var(--mx-content-w);}
|
|
60
60
|
.cx-mx-row{position:absolute;top:0;inset-inline-start:0;display:flex;contain:layout style;width:var(--mx-content-w);height:var(--mx-row-h);box-sizing:border-box;border-bottom:var(--cx-size-1px) solid var(--mx-line);}
|
|
61
61
|
.cx-mx-rowhead{position:sticky;inset-inline-start:0;z-index:2;box-sizing:border-box;flex:none;width:var(--mx-head-w);display:flex;align-items:center;gap:var(--cx-size-6px);
|
|
62
|
-
min-width:0;padding:0 var(--cx-size-10px);background:var(--
|
|
62
|
+
min-width:0;padding:0 var(--cx-size-10px);background:var(--hfx-color-surface,light-dark(#ffffff,#16181c));border-inline-end:var(--cx-size-1px) solid var(--hfx-color-border,light-dark(#e2e4e7,#272a30));white-space:nowrap;overflow:hidden;}
|
|
63
63
|
.cx-mx-member .cx-mx-rowhead{padding-inline-start:var(--cx-size-24px);}
|
|
64
64
|
.cx-mx-label{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;}
|
|
65
65
|
.cx-mx-rowhead > .cx-mx-label{flex:none;max-width:100%;}
|
|
66
|
-
.cx-mx-sub{color:var(--
|
|
67
|
-
.cx-mx-heading{background:var(--
|
|
68
|
-
.cx-mx-heading .cx-mx-rowhead,.cx-mx-rolledrow .cx-mx-rowhead{width:auto;min-width:var(--mx-head-w);background:var(--
|
|
69
|
-
.cx-mx-heading .cx-mx-total,.cx-mx-rolledrow .cx-mx-total{background:var(--
|
|
66
|
+
.cx-mx-sub{color:var(--hfx-color-text-muted,light-dark(#626770,#8f949d));font-size:var(--cx-size-12px);overflow:hidden;text-overflow:ellipsis;}
|
|
67
|
+
.cx-mx-heading{background:var(--hfx-color-surface-sunken,light-dark(#f7f8f9,#111317));}
|
|
68
|
+
.cx-mx-heading .cx-mx-rowhead,.cx-mx-rolledrow .cx-mx-rowhead{width:auto;min-width:var(--mx-head-w);background:var(--hfx-color-surface-sunken,light-dark(#f7f8f9,#111317));font-weight:600;}
|
|
69
|
+
.cx-mx-heading .cx-mx-total,.cx-mx-rolledrow .cx-mx-total{background:var(--hfx-color-surface-sunken,light-dark(#f7f8f9,#111317));}
|
|
70
70
|
.cx-mx-toggle{display:inline-flex;align-items:center;gap:var(--cx-size-6px);min-width:0;min-height:var(--cx-size-24px);padding:0;font:inherit;color:inherit;background:none;border:0;cursor:pointer;}
|
|
71
71
|
.cx-mx-toggle::before{content:"";flex:none;width:0;height:0;border-block:var(--cx-size-4px) solid transparent;border-inline-start:var(--cx-size-6px) solid currentColor;transition:transform .12s;}
|
|
72
72
|
.cx-mx-toggle[aria-expanded="true"]::before{transform:rotate(90deg);}
|
|
73
73
|
.cx-mx-toggle:dir(rtl)[aria-expanded="true"]::before{transform:rotate(-90deg);}
|
|
74
74
|
.cx-mx-hcell .cx-mx-toggle{flex-direction:column;}
|
|
75
75
|
.cx-mx-cell{position:absolute;top:0;box-sizing:border-box;width:var(--mx-cell-w);height:100%;contain:strict;display:flex;align-items:center;justify-content:center;gap:var(--cx-size-2px);
|
|
76
|
-
border-inline-end:var(--cx-size-1px) solid var(--mx-line);font-size:var(--cx-size-11px);font-variant-numeric:tabular-nums;cursor:pointer;color:var(--
|
|
77
|
-
.cx-mx-cell.cx-tone-danger{color:var(--
|
|
78
|
-
.cx-mx-cell.cx-tone-warning{color:var(--
|
|
79
|
-
.cx-mx-cell.cx-tone-info{color:var(--
|
|
80
|
-
.cx-mx-cell.cx-tone-success{color:var(--
|
|
76
|
+
border-inline-end:var(--cx-size-1px) solid var(--mx-line);font-size:var(--cx-size-11px);font-variant-numeric:tabular-nums;cursor:pointer;color:var(--hfx-color-text-muted,light-dark(#626770,#8f949d));}
|
|
77
|
+
.cx-mx-cell.cx-tone-danger{color:var(--hfx-color-status-bad-fg,light-dark(#b8292a,#f47171));}
|
|
78
|
+
.cx-mx-cell.cx-tone-warning{color:var(--hfx-color-status-warn-fg,light-dark(#8c5c05,#eeb640));}
|
|
79
|
+
.cx-mx-cell.cx-tone-info{color:var(--hfx-color-status-info-fg,light-dark(#2b5fc0,#74a2f7));}
|
|
80
|
+
.cx-mx-cell.cx-tone-success{color:var(--hfx-color-status-good-fg,light-dark(#177345,#4cc78a));}
|
|
81
81
|
.cx-mx-cell.cx-toned{color:var(--cx-t);}
|
|
82
|
-
.cx-mx-cell.cx-tone-success:not(.cx-mx-attn){color:var(--
|
|
82
|
+
.cx-mx-cell.cx-tone-success:not(.cx-mx-attn){color:var(--hfx-color-status-good-solid,light-dark(#1d8a52,#4cc78a));}
|
|
83
83
|
.cx-mx-cell.cx-mx-none{color:var(--mx-none);}
|
|
84
|
-
.cx-mx-cell.cx-mx-attn{background:var(--mx-bg,var(--
|
|
85
|
-
.cx-mx-attn.cx-tone-danger{--mx-bg:var(--
|
|
86
|
-
.cx-mx-attn.cx-tone-warning{--mx-bg:var(--
|
|
87
|
-
.cx-mx-attn.cx-tone-info{--mx-bg:var(--
|
|
88
|
-
.cx-mx-attn.cx-tone-success{--mx-bg:var(--
|
|
89
|
-
.cx-mx-attn.cx-toned{color:var(--cx-t);--mx-bg:var(--cx-t-bg,color-mix(in srgb,var(--cx-t) 12%,var(--
|
|
90
|
-
.cx-host[data-cx-theme="dark"] .cx-mx-attn.cx-tone-danger{--mx-bg:color-mix(in srgb,var(--
|
|
91
|
-
@media (prefers-color-scheme:dark){.cx-host[data-cx-theme="auto"] .cx-mx-attn.cx-tone-danger{--mx-bg:color-mix(in srgb,var(--
|
|
84
|
+
.cx-mx-cell.cx-mx-attn{background:var(--mx-bg,var(--hfx-color-hover,light-dark(#f5f5f5,#232529)));font-weight:600;}
|
|
85
|
+
.cx-mx-attn.cx-tone-danger{--mx-bg:var(--hfx-color-status-bad-bg,light-dark(#f9e4e4,#3c272a));}
|
|
86
|
+
.cx-mx-attn.cx-tone-warning{--mx-bg:var(--hfx-color-status-warn-bg,light-dark(#f8efde,#3b3322));}
|
|
87
|
+
.cx-mx-attn.cx-tone-info{--mx-bg:var(--hfx-color-status-info-bg,light-dark(#e4ecfa,#262f41));}
|
|
88
|
+
.cx-mx-attn.cx-tone-success{--mx-bg:var(--hfx-color-status-good-bg,light-dark(#e2f0e9,#1f362f));}
|
|
89
|
+
.cx-mx-attn.cx-toned{color:var(--cx-t);--mx-bg:var(--cx-t-bg,color-mix(in srgb,var(--cx-t) 12%,var(--hfx-color-surface,light-dark(#ffffff,#16181c))));}
|
|
90
|
+
.cx-host[data-cx-theme="dark"] .cx-mx-attn.cx-tone-danger{--mx-bg:color-mix(in srgb,var(--hfx-color-status-bad-bg,light-dark(#f9e4e4,#3c272a)) 62%,var(--hfx-color-surface,light-dark(#ffffff,#16181c)));}
|
|
91
|
+
@media (prefers-color-scheme:dark){.cx-host[data-cx-theme="auto"] .cx-mx-attn.cx-tone-danger{--mx-bg:color-mix(in srgb,var(--hfx-color-status-bad-bg,light-dark(#f9e4e4,#3c272a)) 62%,var(--hfx-color-surface,light-dark(#ffffff,#16181c)));}}
|
|
92
92
|
.cx-mx-cell.cx-mx-self{cursor:default;background:repeating-linear-gradient(135deg,transparent 0 var(--cx-size-4px),var(--mx-line) var(--cx-size-4px) var(--cx-size-5px));}
|
|
93
93
|
.cx-mx-cell.cx-mx-rolled{box-shadow:inset 0 0 0 var(--cx-size-1px) var(--mx-line);}
|
|
94
94
|
.cx-mx-canvas{position:absolute;top:0;cursor:pointer;}
|
|
95
95
|
.cx-mx-cell.cx-mx-focus{z-index:1;background:transparent;border:0;cursor:pointer;}
|
|
96
|
-
.cx-mx-hover{position:absolute;top:0;z-index:1;box-sizing:border-box;width:var(--mx-cell-w);height:100%;pointer-events:none;box-shadow:inset 0 0 0 var(--cx-size-2px) var(--
|
|
96
|
+
.cx-mx-hover{position:absolute;top:0;z-index:1;box-sizing:border-box;width:var(--mx-cell-w);height:100%;pointer-events:none;box-shadow:inset 0 0 0 var(--cx-size-2px) var(--hfx-color-accent,light-dark(#11776f,#37c9b8));}
|
|
97
97
|
.cx-mx-gridline{color:var(--mx-line);}
|
|
98
98
|
.cx-mx-symbol{width:var(--cx-size-14px);height:var(--cx-size-14px);flex:none;}
|
|
99
99
|
.cx-mx-swatch .cx-mx-symbol{width:var(--cx-size-13px);height:var(--cx-size-13px);}
|
|
100
100
|
.cx-mx-value{overflow:hidden;white-space:nowrap;}
|
|
101
|
-
.cx-mx-foot{position:sticky;bottom:0;z-index:3;width:var(--mx-content-w);background:var(--
|
|
101
|
+
.cx-mx-foot{position:sticky;bottom:0;z-index:3;width:var(--mx-content-w);background:var(--hfx-color-surface-sunken,light-dark(#f7f8f9,#111317));border-top:var(--cx-size-1px) solid var(--hfx-color-border-strong,light-dark(#cdd0d5,#363a42));}
|
|
102
102
|
.cx-mx-foot.cx-mx-raised{box-shadow:0 calc(var(--cx-size-6px) * -1) var(--cx-size-8px) calc(var(--cx-size-6px) * -1) var(--mx-raised);}
|
|
103
103
|
.cx-mx-frow{height:var(--mx-row-h);}
|
|
104
|
-
.cx-mx-foothead{background:var(--
|
|
104
|
+
.cx-mx-foothead{background:var(--hfx-color-surface-sunken,light-dark(#f7f8f9,#111317));font-weight:600;}
|
|
105
105
|
.cx-mx-fcell{position:absolute;top:0;bottom:0;box-sizing:border-box;width:var(--mx-cell-w);contain:strict;display:flex;align-items:center;justify-content:center;
|
|
106
106
|
border-inline-end:var(--cx-size-1px) solid var(--mx-line);font-size:var(--cx-size-11px);font-weight:600;font-variant-numeric:tabular-nums;}
|
|
107
|
-
.cx-mx-foot .cx-mx-total{background:var(--
|
|
108
|
-
.cx-matrix :is(.cx-mx-cell,.cx-mx-rowhead,.cx-mx-hcell,.cx-mx-total,.cx-mx-fcell,.cx-mx-corner):focus-visible{outline:var(--
|
|
109
|
-
.cx-mx-empty{padding:var(--cx-size-24px);text-align:center;color:var(--
|
|
107
|
+
.cx-mx-foot .cx-mx-total{background:var(--hfx-color-surface-sunken,light-dark(#f7f8f9,#111317));}
|
|
108
|
+
.cx-matrix :is(.cx-mx-cell,.cx-mx-rowhead,.cx-mx-hcell,.cx-mx-total,.cx-mx-fcell,.cx-mx-corner):focus-visible{outline:var(--hfx-focus-width,2px) solid var(--hfx-color-focus-ring,light-dark(#02726a,#37c9b8));outline-offset:calc(var(--cx-size-2px) * -1);z-index:4;}
|
|
109
|
+
.cx-mx-empty{padding:var(--cx-size-24px);text-align:center;color:var(--hfx-color-text-muted,light-dark(#626770,#8f949d));border:var(--cx-size-1px) dashed var(--hfx-color-border,light-dark(#e2e4e7,#272a30));border-radius:var(--hfx-radius-control,var(--hfx-radius-md,6px));}
|
|
110
110
|
.cx-mx-tip{position:absolute;z-index:20;box-sizing:border-box;max-width:var(--cx-size-320px);padding:var(--cx-size-8px) var(--cx-size-10px);pointer-events:none;
|
|
111
|
-
background:var(--
|
|
112
|
-
box-shadow:
|
|
111
|
+
background:var(--hfx-color-surface-raised,light-dark(#ffffff,#1e2126));border:var(--cx-size-1px) solid var(--hfx-color-border-strong,light-dark(#cdd0d5,#363a42));border-radius:var(--hfx-radius-overlay,var(--hfx-radius-lg,10px));font-size:var(--cx-size-13px);
|
|
112
|
+
box-shadow:var(--hfx-elevation-2,0 1px 2px rgba(22,24,28,.05),0 6px 18px -10px rgba(22,24,28,.18));}
|
|
113
113
|
.cx-matrix{position:relative;}
|
|
114
114
|
.cx-mx-tiptitle{font-weight:600;margin-bottom:var(--cx-size-4px);}
|
|
115
115
|
.cx-mx-tiplist,.cx-mx-details{display:grid;grid-template-columns:auto 1fr;gap:var(--cx-size-2px) var(--cx-size-10px);margin:0;}
|
|
116
|
-
.cx-mx-tiplist dt,.cx-mx-details dt{color:var(--
|
|
116
|
+
.cx-mx-tiplist dt,.cx-mx-details dt{color:var(--hfx-color-text-muted,light-dark(#626770,#8f949d));}
|
|
117
117
|
.cx-mx-tiplist dd,.cx-mx-details dd{margin:0;overflow-wrap:anywhere;}
|
|
118
|
-
.cx-mx-dialog{box-sizing:border-box;width:min(var(--cx-size-420px),calc(100vw - var(--cx-size-32px)));padding:var(--cx-size-16px);color:var(--
|
|
119
|
-
border:var(--cx-size-1px) solid var(--
|
|
120
|
-
.cx-mx-dialog::backdrop{background:
|
|
118
|
+
.cx-mx-dialog{box-sizing:border-box;width:min(var(--cx-size-420px),calc(100vw - var(--cx-size-32px)));padding:var(--cx-size-16px);color:var(--hfx-color-text,light-dark(#16181c,#f2f3f5));background:var(--hfx-color-surface,light-dark(#ffffff,#16181c));
|
|
119
|
+
border:var(--cx-size-1px) solid var(--hfx-color-border-strong,light-dark(#cdd0d5,#363a42));border-radius:var(--hfx-radius-overlay,var(--hfx-radius-lg,10px));}
|
|
120
|
+
.cx-mx-dialog::backdrop{background:var(--hfx-color-overlay,light-dark(rgba(22,24,28,0.42),rgba(0,0,0,0.66)));}
|
|
121
121
|
.cx-mx-dialoghead{display:flex;align-items:center;gap:var(--cx-size-10px);margin-bottom:var(--cx-size-12px);}
|
|
122
122
|
.cx-mx-dialogtitle{margin:0;font-size:var(--cx-size-17px);}
|
|
123
123
|
.cx-mx-dialog .cx-mx-button{margin-top:var(--cx-size-16px);}
|
|
124
124
|
.cx-mx-cards{display:grid;align-content:start;gap:var(--cx-size-8px);flex:0 1 auto;min-height:0;max-height:var(--cx-size-100vh);overflow:auto;overscroll-behavior:contain;}
|
|
125
125
|
.cx-mx-cardlist,.cx-mx-cardcells{list-style:none;margin:0;padding:0;display:grid;gap:var(--cx-size-8px);}
|
|
126
|
-
.cx-mx-card{padding:var(--cx-size-10px) var(--cx-size-12px);border:var(--cx-size-1px) solid var(--
|
|
127
|
-
.cx-mx-cardgroup{padding:var(--cx-size-4px) 0 0;font-size:var(--cx-size-13px);font-weight:600;color:var(--
|
|
126
|
+
.cx-mx-card{padding:var(--cx-size-10px) var(--cx-size-12px);border:var(--cx-size-1px) solid var(--hfx-color-border,light-dark(#e2e4e7,#272a30));border-radius:var(--hfx-radius-control,var(--hfx-radius-md,6px));background:var(--hfx-color-surface,light-dark(#ffffff,#16181c));}
|
|
127
|
+
.cx-mx-cardgroup{padding:var(--cx-size-4px) 0 0;font-size:var(--cx-size-13px);font-weight:600;color:var(--hfx-color-text-muted,light-dark(#626770,#8f949d));}
|
|
128
128
|
.cx-mx-cardhead{display:flex;align-items:center;justify-content:space-between;gap:var(--cx-size-8px);font-weight:600;}
|
|
129
129
|
.cx-mx-card .cx-mx-total{position:static;width:auto;padding:0;border:0;background:none;}
|
|
130
130
|
.cx-mx-cardcells{gap:var(--cx-size-4px);margin-top:var(--cx-size-6px);}
|
|
@@ -141,23 +141,23 @@ border:var(--cx-size-1px) solid var(--cx-line-strong);border-radius:var(--cx-rad
|
|
|
141
141
|
.cx-matrix .cx-mx-print{display:block;}
|
|
142
142
|
.cx-matrix-host{max-height:none !important;}
|
|
143
143
|
.cx-mx-printtable{border-collapse:collapse;font-size:var(--cx-size-11px);-webkit-print-color-adjust:exact;print-color-adjust:exact;}
|
|
144
|
-
.cx-mx-printtable :is(th,td){border:var(--cx-size-1px) solid var(--
|
|
145
|
-
.cx-mx-printtable thead th{background:var(--
|
|
144
|
+
.cx-mx-printtable :is(th,td){border:var(--cx-size-1px) solid var(--hfx-color-border,light-dark(#e2e4e7,#272a30));padding:var(--cx-size-2px) var(--cx-size-4px);text-align:center;}
|
|
145
|
+
.cx-mx-printtable thead th{background:var(--hfx-color-surface-sunken,light-dark(#f7f8f9,#111317));}
|
|
146
146
|
.cx-mx-printtable :is(th[scope="row"],th[scope="rowgroup"]){text-align:start;}
|
|
147
147
|
.cx-mx-printtable caption{text-align:start;font-weight:600;padding-bottom:var(--cx-size-6px);}
|
|
148
|
-
.cx-mx-printgroup > th,.cx-mx-printgroup > td,.cx-mx-printrolled > th{background:var(--
|
|
149
|
-
.cx-mx-printcount{font-weight:400;color:var(--
|
|
148
|
+
.cx-mx-printgroup > th,.cx-mx-printgroup > td,.cx-mx-printrolled > th{background:var(--hfx-color-surface-sunken,light-dark(#f7f8f9,#111317));font-weight:600;}
|
|
149
|
+
.cx-mx-printcount{font-weight:400;color:var(--hfx-color-text-muted,light-dark(#626770,#8f949d));}
|
|
150
150
|
.cx-mx-printmember{padding-inline-start:var(--cx-size-16px) !important;font-weight:400;}
|
|
151
|
-
.cx-mx-printcell{color:var(--
|
|
152
|
-
.cx-mx-printcell.cx-tone-danger{color:var(--
|
|
153
|
-
.cx-mx-printcell.cx-tone-warning{color:var(--
|
|
154
|
-
.cx-mx-printcell.cx-tone-info{color:var(--
|
|
155
|
-
.cx-mx-printcell.cx-tone-success{color:var(--
|
|
151
|
+
.cx-mx-printcell{color:var(--hfx-color-text-muted,light-dark(#626770,#8f949d));}
|
|
152
|
+
.cx-mx-printcell.cx-tone-danger{color:var(--hfx-color-status-bad-fg,light-dark(#b8292a,#f47171));}
|
|
153
|
+
.cx-mx-printcell.cx-tone-warning{color:var(--hfx-color-status-warn-fg,light-dark(#8c5c05,#eeb640));}
|
|
154
|
+
.cx-mx-printcell.cx-tone-info{color:var(--hfx-color-status-info-fg,light-dark(#2b5fc0,#74a2f7));}
|
|
155
|
+
.cx-mx-printcell.cx-tone-success{color:var(--hfx-color-status-good-solid,light-dark(#1d8a52,#4cc78a));}
|
|
156
156
|
.cx-mx-printcell.cx-toned{color:var(--cx-t);}
|
|
157
|
-
.cx-mx-printcell.cx-mx-attn{background:var(--mx-bg,var(--
|
|
158
|
-
.cx-mx-printcell.cx-mx-attn.cx-tone-success{color:var(--
|
|
157
|
+
.cx-mx-printcell.cx-mx-attn{background:var(--mx-bg,var(--hfx-color-hover,light-dark(#f5f5f5,#232529)));font-weight:700;}
|
|
158
|
+
.cx-mx-printcell.cx-mx-attn.cx-tone-success{color:var(--hfx-color-status-good-fg,light-dark(#177345,#4cc78a));}
|
|
159
159
|
.cx-mx-printnone{color:var(--mx-none);}
|
|
160
|
-
.cx-mx-printself{background:var(--
|
|
160
|
+
.cx-mx-printself{background:var(--hfx-color-hover,light-dark(#f5f5f5,#232529));}
|
|
161
161
|
}
|
|
162
162
|
@media (forced-colors:active){
|
|
163
163
|
.cx-mx-cell.cx-mx-attn{border:var(--cx-size-1px) solid CanvasText;}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(global){"use strict";const installed=new WeakSet();const part={version:"
|
|
1
|
+
(function(global){"use strict";const installed=new WeakSet();const part={version:"da5c61ff2cb9ebda",install(context){if(installed.has(context.MATRIX_IMPL))return;const{MATRIX_IMPL,h,setText,fill,plural,foldText,numberFormat,gridFreeze,toneOf,applyTone,toneColors,AxisWindow,PROTOCOL}=context;const MATRIX_LABELS={matrixRows:"Rows",matrixColumns:"Columns",matrixSearch:"Find rows and columns",matrixSortBy:"Sort by",matrixGroupBy:"Group by",matrixByLabel:"Name",matrixByTotal:"Total",matrixAsListed:"As listed",matrixNoGrouping:"No groups",matrixDescending:"Descending",matrixOnlyProblems:"Only problems",matrixHideEmpty:"Hide empty rows and columns",matrixSize:"{rows} × {columns}",matrixShown:"Rows: {rows} of {totalRows}, columns: {columns} of {totalColumns}",matrixAttention:"Need attention: {count}",matrixLegend:"States",matrixFilter:"Filter",matrixClearFilters:"Clear filters",matrixNoMatches:"No rows or columns match.",matrixSelf:"Same item",matrixNoData:"No data",matrixCell:"{row} and {column}: {state}",matrixTotal:"Total",matrixItemTotal:"{item}: {count}",matrixExpandGroup:"Expand {group}",matrixCollapseGroup:"Collapse {group}",matrixGroupCount:"{count}",matrixCellCount:"Cells: {count}",matrixDetails:"Details",matrixClose:"Close",matrixValue:"Value",matrixState:"State",matrixAllClear:"Nothing needs attention",matrixShowMore:"Show more"};function matrixLabels(...sources){const labels={...MATRIX_LABELS};for(const source of sources){if(source==null)continue;if(typeof source!=="object"||Array.isArray(source))matrixFail("labels must be an object of strings");for(const[name,text]of Object.entries(source)){if(!Object.hasOwn(labels,name)){if(/^matrix[A-Z]/.test(name)) matrixFail("there is no matrix label '" + name + "'"); continue; }
|
|
2
2
|
if(typeof text!=="string"||!/\S/.test(text)) matrixFail("label '" + name + "' must be a string with visible text");
|
|
3
3
|
labels[name]=text}}
|
|
4
4
|
return Object.freeze(labels)}
|
|
@@ -62,8 +62,7 @@ const MATRIX_ROW_HEIGHTS={compact:26,normal:30,comfortable:36},MATRIX_TOTAL_WIDT
|
|
|
62
62
|
emit(name,detail,callback,cancelable){const event=new CustomEvent("canopyx:"+name,{detail,bubbles:true,cancelable:!!cancelable});const proceed=this.host.dispatchEvent(event);if(typeof this.options[callback]==="function"){try{this.options[callback](detail,event)}catch(error){this.reportError(error,callback)}}
|
|
63
63
|
return proceed&&!event.defaultPrevented}
|
|
64
64
|
reportError(error,hook){this.host.dispatchEvent(new CustomEvent("canopyx:error",{detail:{error,hook},bubbles:true}))}
|
|
65
|
-
build(){const host=this.host,doc=this.doc,signal=this.lifetime.signal;
|
|
66
|
-
const root=this.root=h("div","cx-matrix cx-mx-"+doc.density);this.bar=h("div","cx-mx-bar");this.legend=h("div","cx-mx-legend");this.legend.setAttribute("role","list");this.legend.setAttribute("aria-label",this.labels.matrixLegend);this.legend.hidden=!doc.legend;const scroll=this.scroll=h("div","cx-mx-scroll");scroll.setAttribute("role","grid");scroll.setAttribute("aria-label",doc.label);this.head=h("div","cx-mx-head");this.head.setAttribute("role","rowgroup");this.band=h("div","cx-mx-band");this.band.setAttribute("role","row");this.headRow=h("div","cx-mx-hrow");this.headRow.setAttribute("role","row");this.corner=h("div","cx-mx-corner");this.corner.setAttribute("role","columnheader");this.corner.setAttribute("aria-colindex","1");this.headSpacer=h("div","cx-mx-spacer");this.headTotal=h("div","cx-mx-total cx-mx-htotal");this.headTotal.setAttribute("role","columnheader");this.band.setAttribute("aria-rowindex","1");this.headRow.append(this.corner,this.headSpacer,this.headTotal);this.bandCorner=h("div","cx-mx-corner cx-mx-bandcorner");this.bandSpacer=h("div","cx-mx-spacer");this.bandEnd=h("div","cx-mx-total cx-mx-bandend");this.band.append(this.bandCorner,this.bandSpacer,this.bandEnd);this.head.append(this.band,this.headRow);this.body=h("div","cx-mx-body");this.body.setAttribute("role","rowgroup");this.foot=h("div","cx-mx-foot");this.foot.setAttribute("role","rowgroup");this.footRow=h("div","cx-mx-frow");this.footRow.setAttribute("role","row");this.footHeader=h("div","cx-mx-rowhead cx-mx-foothead");this.footHeader.setAttribute("role","rowheader");this.footHeader.setAttribute("aria-colindex","1");this.footSpacer=h("div","cx-mx-spacer");this.footGrand=h("div","cx-mx-total cx-mx-grand");this.footGrand.setAttribute("role","gridcell");this.footRow.append(this.footHeader,this.footSpacer,this.footGrand);this.foot.appendChild(this.footRow);this.empty=h("div","cx-mx-empty");this.empty.hidden=true;scroll.append(this.head,this.body,this.foot);this.live=h("div","cx-sr-only");this.live.setAttribute("aria-live","polite");this.tip=h("div","cx-mx-tip");this.tip.setAttribute("aria-hidden","true");this.tip.hidden=true;this.cards=h("div","cx-mx-cards");this.cards.hidden=true;this.cards.tabIndex=0;this.cards.setAttribute("role","region");this.cards.setAttribute("aria-label",doc.label);this.print=h("div","cx-mx-print");root.append(this.bar,this.legend,scroll,this.empty,this.cards,this.live,this.tip,this.print);host.appendChild(root);this.buildBar();scroll.addEventListener("scroll",()=>{this.hideTip();this.scheduleRender()},{passive:true,signal});scroll.addEventListener("keydown",event=>this.onKey(event),{signal});scroll.addEventListener("click",event=>this.onClick(event),{signal});scroll.addEventListener("focusin",event=>this.onFocus(event),{signal});scroll.addEventListener("pointermove",event=>this.onPointer(event),{signal});scroll.addEventListener("pointerleave",()=>this.hideTip(),{signal});global.addEventListener("beforeprint",()=>this.renderPrint(),{signal});this.resize=new ResizeObserver(()=>{if(this.destroyed)return;const focused=this.scroll.contains(document.activeElement);this.layout();this.render();if(focused&&!this.scroll.contains(document.activeElement)){if(!this.scroll.hidden)this.moveTo(this.focus.row,this.focus.column,true,false);else if(!this.cards.hidden)this.cards.focus({preventScroll:true})}});this.refreshChrome();this.resize.observe(host);const restyle=()=>{if(!this.destroyed){this.lookCache=null;this.scheduleRender()}};this.themeWatch=new MutationObserver(restyle);this.themeWatch.observe(host,{attributes:true,attributeFilter:["data-cx-theme","class","style"]});for(const query of["(prefers-color-scheme: dark)","(forced-colors: active)"])global.matchMedia?.(query).addEventListener?.("change",restyle,{signal})}
|
|
65
|
+
build(){const host=this.host,doc=this.doc,signal=this.lifetime.signal;const root=this.root=h("div","cx-matrix cx-mx-"+doc.density);this.bar=h("div","cx-mx-bar");this.legend=h("div","cx-mx-legend");this.legend.setAttribute("role","list");this.legend.setAttribute("aria-label",this.labels.matrixLegend);this.legend.hidden=!doc.legend;const scroll=this.scroll=h("div","cx-mx-scroll");scroll.setAttribute("role","grid");scroll.setAttribute("aria-label",doc.label);this.head=h("div","cx-mx-head");this.head.setAttribute("role","rowgroup");this.band=h("div","cx-mx-band");this.band.setAttribute("role","row");this.headRow=h("div","cx-mx-hrow");this.headRow.setAttribute("role","row");this.corner=h("div","cx-mx-corner");this.corner.setAttribute("role","columnheader");this.corner.setAttribute("aria-colindex","1");this.headSpacer=h("div","cx-mx-spacer");this.headTotal=h("div","cx-mx-total cx-mx-htotal");this.headTotal.setAttribute("role","columnheader");this.band.setAttribute("aria-rowindex","1");this.headRow.append(this.corner,this.headSpacer,this.headTotal);this.bandCorner=h("div","cx-mx-corner cx-mx-bandcorner");this.bandSpacer=h("div","cx-mx-spacer");this.bandEnd=h("div","cx-mx-total cx-mx-bandend");this.band.append(this.bandCorner,this.bandSpacer,this.bandEnd);this.head.append(this.band,this.headRow);this.body=h("div","cx-mx-body");this.body.setAttribute("role","rowgroup");this.foot=h("div","cx-mx-foot");this.foot.setAttribute("role","rowgroup");this.footRow=h("div","cx-mx-frow");this.footRow.setAttribute("role","row");this.footHeader=h("div","cx-mx-rowhead cx-mx-foothead");this.footHeader.setAttribute("role","rowheader");this.footHeader.setAttribute("aria-colindex","1");this.footSpacer=h("div","cx-mx-spacer");this.footGrand=h("div","cx-mx-total cx-mx-grand");this.footGrand.setAttribute("role","gridcell");this.footRow.append(this.footHeader,this.footSpacer,this.footGrand);this.foot.appendChild(this.footRow);this.empty=h("div","cx-mx-empty");this.empty.hidden=true;scroll.append(this.head,this.body,this.foot);this.live=h("div","cx-sr-only");this.live.setAttribute("aria-live","polite");this.tip=h("div","cx-mx-tip");this.tip.setAttribute("aria-hidden","true");this.tip.hidden=true;this.cards=h("div","cx-mx-cards");this.cards.hidden=true;this.cards.tabIndex=0;this.cards.setAttribute("role","region");this.cards.setAttribute("aria-label",doc.label);this.print=h("div","cx-mx-print");root.append(this.bar,this.legend,scroll,this.empty,this.cards,this.live,this.tip,this.print);host.appendChild(root);this.buildBar();scroll.addEventListener("scroll",()=>{this.hideTip();this.scheduleRender()},{passive:true,signal});scroll.addEventListener("keydown",event=>this.onKey(event),{signal});scroll.addEventListener("click",event=>this.onClick(event),{signal});scroll.addEventListener("focusin",event=>this.onFocus(event),{signal});scroll.addEventListener("pointermove",event=>this.onPointer(event),{signal});scroll.addEventListener("pointerleave",()=>this.hideTip(),{signal});global.addEventListener("beforeprint",()=>this.renderPrint(),{signal});this.resize=new ResizeObserver(()=>{if(this.destroyed)return;const focused=this.scroll.contains(document.activeElement);this.layout();this.render();if(focused&&!this.scroll.contains(document.activeElement)){if(!this.scroll.hidden)this.moveTo(this.focus.row,this.focus.column,true,false);else if(!this.cards.hidden)this.cards.focus({preventScroll:true})}});this.refreshChrome();this.resize.observe(host);const restyle=()=>{if(!this.destroyed){this.lookCache=null;this.scheduleRender()}};this.themeWatch=new MutationObserver(restyle);const themeAttributes=["data-theme","data-cx-theme","data-cx-fallback-mode","data-hfx-style","data-hfx-mode","data-hfx-density","data-bs-theme","data-hfx-theme","data-hfx-tokens","class","style"];for(let owner=host;owner;owner=owner.parentElement)this.themeWatch.observe(owner,{attributes:true,attributeFilter:themeAttributes});for(const query of["(prefers-color-scheme: dark)","(forced-colors: active)"])global.matchMedia?.(query).addEventListener?.("change",restyle,{signal})}
|
|
67
66
|
refreshChrome(){const doc=this.doc,labels=this.labels;this.scroll.setAttribute("aria-label",doc.label);this.cards.setAttribute("aria-label",doc.label);this.legend.setAttribute("aria-label",labels.matrixLegend);this.legend.hidden=!doc.legend;setText(this.headTotal,labels.matrixTotal);setText(this.footHeader,labels.matrixTotal);setText(this.empty,labels.matrixNoMatches);const columnsTitle=h("span","cx-mx-corner-columns"),rowsTitle=h("span","cx-mx-corner-rows");setText(columnsTitle,doc.columnTitle||labels.matrixColumns);setText(rowsTitle,doc.rows.title||labels.matrixRows);this.corner.replaceChildren(columnsTitle,rowsTitle);this.refreshBar?.()}
|
|
68
67
|
derive(announce,anchor=this.captureFocus()){const focused=this.scroll.contains(document.activeElement);this.model.derive(this.query);this.restoreFocus(anchor);this.syncBar();this.paintLegend();this.layout();this.recycleAll();this.render();if(focused&&!this.scroll.hidden)this.moveTo(this.focus.row,this.focus.column,true,false);if(announce)setText(this.live,this.summaryText())}
|
|
69
68
|
layout(){const doc=this.doc,width=this.host.clientWidth||800,phone=width<=640;this.phone=phone;this.root.classList.toggle("cx-mx-phone",phone);this.rtl=getComputedStyle(this.root).direction==="rtl";this.rowH=MATRIX_ROW_HEIGHTS[doc.density]+(phone?4:0);this.cellW=doc.cellWidth;const measure=this.measurer||=document.createElement("canvas").getContext("2d");const style=getComputedStyle(this.root),font=style.fontWeight+" "+style.fontSize+" "+style.fontFamily;const widest=(items,extra=0)=>{let max=0;if(measure){measure.font=font;for(const item of items)max=Math.max(max,measure.measureText(item.label).width+extra)}return max};const grouped=!!this.query.group.rows;const secondary=!phone&&this.model.rows.some(entry=>entry.kind==="item"&&entry.item.secondary)?Math.min(140,widest(this.model.rows.filter(entry=>entry.kind==="item"&&entry.item.secondary).map(entry=>({label:entry.item.secondary})))*0.88+6):0;const rowNeed=Math.ceil(widest(this.model.rows)+ secondary+28 +(grouped?14:0));this.rowHeadW=Math.min(phone?Math.max(96,Math.floor(width*0.42)):280,Math.max(phone?96:120,rowNeed));this.headH=Math.min(160,Math.max(56,Math.ceil(widest(this.model.columns)+ 20)));this.bandH=this.query.group.columns?28:0;this.totalW=doc.rowTotals?phone?48:MATRIX_TOTAL_WIDTH:0;this.footH=doc.columnTotals?this.rowH:0;const geometry=[this.rowH,this.rowHeadW,this.cellW,this.headH,this.bandH,this.totalW,this.rtl,phone].join(":");if(this.geometry!==undefined&&this.geometry!==geometry)this.recycleAll();this.geometry=geometry;this.rowWindow.reset(this.rowH,this.model.rows.length);this.columnWindow.reset(this.cellW,this.model.columns.length);const contentW=this.rowHeadW+this.columnWindow.total+this.totalW;const root=this.root.style;root.setProperty("--mx-row-h",this.rowH+"px");root.setProperty("--mx-cell-w",this.cellW+"px");root.setProperty("--mx-head-w",this.rowHeadW+"px");root.setProperty("--mx-head-h",this.headH+"px");root.setProperty("--mx-band-h",this.bandH+"px");root.setProperty("--mx-total-w",this.totalW+"px");root.setProperty("--mx-content-w",contentW+"px");root.setProperty("--mx-cols-w",this.columnWindow.total+"px");this.body.style.height=this.rowWindow.total+"px";this.band.hidden=!this.bandH;this.foot.hidden=!this.footH;this.headTotal.hidden=this.bandEnd.hidden=!this.totalW;this.footGrand.hidden=!this.totalW;const nothing=!this.model.rows.length||!this.model.columns.length;this.empty.hidden=!nothing;this.scroll.hidden=nothing;const cards=phone&&doc.phone==="cards";this.cards.hidden=!cards||nothing;if(cards)this.scroll.hidden=true;this.scroll.setAttribute("aria-rowcount",String(this.model.rows.length +(this.bandH?2:1)+(this.footH?1:0)));this.headRow.setAttribute("aria-rowindex",this.bandH?"2":"1");this.headTotal.setAttribute("aria-colindex",String(this.model.columns.length+2));this.scroll.setAttribute("aria-colcount",String(this.model.columns.length+1 +(this.totalW?1:0)));if(cards)this.renderCards();this.fitHeight()}
|
|
@@ -157,5 +156,5 @@ return result},applyState(state,derive=true){if(!state||typeof state!=="object")
|
|
|
157
156
|
if(state.attentionOnly!==undefined)next.attentionOnly=!!state.attentionOnly;if(state.hideEmpty!==undefined)next.hideEmpty=!!state.hideEmpty;for(const axis of MATRIX_AXES){if(state.filters&&state.filters[axis]!==undefined)next.filters[axis]=this.checkFilters(axis,state.filters[axis]);if(state.sort&&state.sort[axis]!==undefined)next.sort[axis]=this.checkSort(axis,state.sort[axis]);if(state.group&&state.group[axis]!==undefined){const group=state.group[axis];if(group!==null&&!this.axisData(axis).attributeById.has(group))throw new Error("CanopyX: a matrix groups by one of its attributes.");if(group!==next.group[axis])next.collapsed[axis]=[];next.group[axis]=group}
|
|
158
157
|
if(state.collapsed&&state.collapsed[axis]!==undefined){if(!Array.isArray(state.collapsed[axis])||state.collapsed[axis].some(key=>typeof key!=="string"))throw new Error("CanopyX: collapsed groups are a list of group keys.");next.collapsed[axis]=[...new Set(state.collapsed[axis])]}}
|
|
159
158
|
this.query=next;if(derive){this.derive(true);this.stateChanged()}},setQuery(partial){this.applyState(partial)},sort(axis,by,direction="asc"){this.applyState({sort:{[matrixAxisName(axis)]:by==null?null:{by,direction}}})},group(axis,attribute){this.applyState({group:{[matrixAxisName(axis)]:attribute??null}})},filter(axis,attribute,values){this.applyState({filters:{[matrixAxisName(axis)]:{...this.query.filters[axis],[attribute]:values??null}}})},getState(){const query=this.query,copy=value=>JSON.parse(JSON.stringify(value));return gridFreeze({search:query.search,attentionOnly:query.attentionOnly,hideEmpty:query.hideEmpty,filters:copy(query.filters),sort:copy(query.sort),group:copy(query.group),collapsed:copy(query.collapsed)})},stateChanged(){this.emit("matrixState",this.getState(),"onStateChange")},getVisible(){const ids=entries=>entries.filter(entry=>entry.kind!=="heading").flatMap(entry=>entry.members.map(item=>item.id));return gridFreeze({rows:ids(this.model.rows),columns:ids(this.model.columns)})},focusCell(row,column){const r=this.model.rows.findIndex(entry=>entry.kind!=="heading"&&entry.members.some(item=>item.id===row));const c=this.model.columns.findIndex(entry=>entry.members.some(item=>item.id===column));if(r<0||c<0)return false;this.moveTo(r,c);return true},update(view){const doc=matrixDocument(view),state=JSON.parse(JSON.stringify(this.getState())),focus=this.captureFocus();this.doc=doc;this.labels=matrixLabels(doc.labels,this.options.labels);this.model=new MatrixModel(doc,this.format);this.query=this.model.initialQuery();for(const axis of MATRIX_AXES){const attributes=this.axisData(axis).attributeById;state.filters[axis]=Object.fromEntries(Object.entries(state.filters[axis]).filter(([id])=>attributes.has(id)));const sort=state.sort[axis];if(sort&&!["#label","#total"].includes(sort.by)&&!attributes.has(sort.by))state.sort[axis]=null;if(state.group[axis]!==null&&!attributes.has(state.group[axis])){state.group[axis]=null;state.collapsed[axis]=[]}}
|
|
160
|
-
this.applyState(state,false);this.root.className="cx-matrix cx-mx-"+doc.density;this.source=view;this.closePanel(false);this.refreshChrome();this.geometry=undefined;this.derive(false,focus)}});function matrixCreate(host,options){const view=new MatrixView(host,options);const impl={ready:Promise.resolve().then(()=>{if(view.destroyed)return impl;host.setAttribute("data-cx-ready","");view.emit("matrixReady",{matrix:view.doc.id},"onReady");return impl}),document:()=>view.source||view.options.view,sort:(axis,by,direction)=>view.sort(axis,by,direction),group:(axis,attribute)=>view.group(axis,attribute),filter:(axis,attribute,values)=>view.filter(axis,attribute,values),setSearch:text=>view.setQuery({search:text}),setAttentionOnly:on=>view.setQuery({attentionOnly:!!on}),getState:()=>view.getState(),setState:state=>view.applyState(state),getVisible:()=>view.getVisible(),focusCell:(row,column)=>view.focusCell(row,column),update:next=>view.update(next),destroy:()=>{if(view.destroyed)return;view.destroyed=true;view.lifetime.abort();view.resize?.disconnect();view.themeWatch?.disconnect();cancelAnimationFrame(view.frame);cancelAnimationFrame(view.fitFrame);clearTimeout(view.searchTimer);clearTimeout(view.tipTimer);view.root.remove();host.removeAttribute("data-cx-ready");if(view.
|
|
159
|
+
this.applyState(state,false);this.root.className="cx-matrix cx-mx-"+doc.density;this.source=view;this.closePanel(false);this.refreshChrome();this.geometry=undefined;this.derive(false,focus)}});function matrixCreate(host,options){const view=new MatrixView(host,options);const impl={ready:Promise.resolve().then(()=>{if(view.destroyed)return impl;host.setAttribute("data-cx-ready","");view.emit("matrixReady",{matrix:view.doc.id},"onReady");return impl}),document:()=>view.source||view.options.view,sort:(axis,by,direction)=>view.sort(axis,by,direction),group:(axis,attribute)=>view.group(axis,attribute),filter:(axis,attribute,values)=>view.filter(axis,attribute,values),setSearch:text=>view.setQuery({search:text}),setAttentionOnly:on=>view.setQuery({attentionOnly:!!on}),getState:()=>view.getState(),setState:state=>view.applyState(state),getVisible:()=>view.getVisible(),focusCell:(row,column)=>view.focusCell(row,column),update:next=>view.update(next),destroy:()=>{if(view.destroyed)return;view.destroyed=true;view.lifetime.abort();view.resize?.disconnect();view.themeWatch?.disconnect();cancelAnimationFrame(view.frame);cancelAnimationFrame(view.fitFrame);clearTimeout(view.searchTimer);clearTimeout(view.tipTimer);view.root.remove();host.removeAttribute("data-cx-ready");if(view.fitInline!==undefined){host.style.maxHeight=view.fitInline;if(!host.getAttribute("style"))host.removeAttribute("style")}}};return impl}
|
|
161
160
|
MATRIX_IMPL.create=matrixCreate;installed.add(context.MATRIX_IMPL)}};(global.CanopyXParts||=[]).push(["matrix",part])})(typeof window!=="undefined"?window:globalThis);
|