@evotecit/canopyx 0.3.13 → 0.3.16

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.
Files changed (103) hide show
  1. package/CanopyX.Html/Assets/canopyx-calendar-edit.js +36 -18
  2. package/CanopyX.Html/Assets/canopyx-calendar-ics.js +7 -5
  3. package/CanopyX.Html/Assets/canopyx-calendar.css +124 -116
  4. package/CanopyX.Html/Assets/canopyx-calendar.js +74 -54
  5. package/CanopyX.Html/Assets/canopyx-cell-range.css +8 -8
  6. package/CanopyX.Html/Assets/canopyx-cell-range.js +1 -1
  7. package/CanopyX.Html/Assets/canopyx-changes.css +113 -113
  8. package/CanopyX.Html/Assets/canopyx-changes.js +7 -10
  9. package/CanopyX.Html/Assets/canopyx-column-groups.css +5 -5
  10. package/CanopyX.Html/Assets/canopyx-column-groups.js +1 -1
  11. package/CanopyX.Html/Assets/canopyx-data.js +2 -2
  12. package/CanopyX.Html/Assets/canopyx-detail-rows.css +9 -9
  13. package/CanopyX.Html/Assets/canopyx-detail-rows.js +2 -2
  14. package/CanopyX.Html/Assets/canopyx-editing.css +18 -18
  15. package/CanopyX.Html/Assets/canopyx-editing.js +1 -1
  16. package/CanopyX.Html/Assets/canopyx-enhance.js +2 -2
  17. package/CanopyX.Html/Assets/canopyx-facets.css +33 -33
  18. package/CanopyX.Html/Assets/canopyx-facets.js +5 -6
  19. package/CanopyX.Html/Assets/canopyx-filter-editor.css +57 -57
  20. package/CanopyX.Html/Assets/canopyx-filter-editor.js +7 -5
  21. package/CanopyX.Html/Assets/canopyx-flow-checks.css +13 -11
  22. package/CanopyX.Html/Assets/canopyx-flow-checks.js +5 -4
  23. package/CanopyX.Html/Assets/canopyx-flow-command.css +7 -7
  24. package/CanopyX.Html/Assets/canopyx-flow-command.js +1 -1
  25. package/CanopyX.Html/Assets/canopyx-flow-dialog.css +9 -7
  26. package/CanopyX.Html/Assets/canopyx-flow-dialog.js +1 -1
  27. package/CanopyX.Html/Assets/canopyx-flow-drafts.css +7 -7
  28. package/CanopyX.Html/Assets/canopyx-flow-drafts.js +1 -1
  29. package/CanopyX.Html/Assets/canopyx-flow-entry.css +17 -76
  30. package/CanopyX.Html/Assets/canopyx-flow-entry.js +11 -5
  31. package/CanopyX.Html/Assets/canopyx-flow-facts.js +2 -0
  32. package/CanopyX.Html/Assets/canopyx-flow-host.css +4 -4
  33. package/CanopyX.Html/Assets/canopyx-flow-host.js +1 -1
  34. package/CanopyX.Html/Assets/canopyx-flow-module.mjs +11 -5
  35. package/CanopyX.Html/Assets/canopyx-flow-pick.css +4 -4
  36. package/CanopyX.Html/Assets/canopyx-flow-pick.js +1 -1
  37. package/CanopyX.Html/Assets/canopyx-flow-preview.css +6 -6
  38. package/CanopyX.Html/Assets/canopyx-flow-preview.js +1 -1
  39. package/CanopyX.Html/Assets/canopyx-flow-records.css +3 -3
  40. package/CanopyX.Html/Assets/canopyx-flow-records.js +1 -1
  41. package/CanopyX.Html/Assets/canopyx-flow-tasks.css +17 -17
  42. package/CanopyX.Html/Assets/canopyx-flow-tasks.js +1 -1
  43. package/CanopyX.Html/Assets/canopyx-flow.css +79 -79
  44. package/CanopyX.Html/Assets/canopyx-flow.js +8 -7
  45. package/CanopyX.Html/Assets/canopyx-format-editor.css +23 -23
  46. package/CanopyX.Html/Assets/canopyx-format-editor.js +2 -3
  47. package/CanopyX.Html/Assets/canopyx-formatting.css +17 -17
  48. package/CanopyX.Html/Assets/canopyx-formatting.js +5 -5
  49. package/CanopyX.Html/Assets/canopyx-forms.css +5 -5
  50. package/CanopyX.Html/Assets/canopyx-forms.js +1 -1
  51. package/CanopyX.Html/Assets/canopyx-grid-module.mjs +97 -54
  52. package/CanopyX.Html/Assets/canopyx-grid-options.css +10 -0
  53. package/CanopyX.Html/Assets/canopyx-grid-options.js +47 -0
  54. package/CanopyX.Html/Assets/canopyx-grid.css +199 -261
  55. package/CanopyX.Html/Assets/canopyx-grid.js +97 -54
  56. package/CanopyX.Html/Assets/canopyx-grouping.css +17 -17
  57. package/CanopyX.Html/Assets/canopyx-grouping.js +12 -9
  58. package/CanopyX.Html/Assets/canopyx-highlight.css +14 -14
  59. package/CanopyX.Html/Assets/canopyx-highlight.js +2 -2
  60. package/CanopyX.Html/Assets/canopyx-interactive.css +94 -155
  61. package/CanopyX.Html/Assets/canopyx-interactive.js +33 -14
  62. package/CanopyX.Html/Assets/canopyx-labels-de.js +5 -0
  63. package/CanopyX.Html/Assets/canopyx-labels-es.js +5 -0
  64. package/CanopyX.Html/Assets/canopyx-labels-fr.js +5 -0
  65. package/CanopyX.Html/Assets/canopyx-labels-it.js +5 -0
  66. package/CanopyX.Html/Assets/canopyx-labels-pl.js +5 -0
  67. package/CanopyX.Html/Assets/canopyx-layouts.css +17 -17
  68. package/CanopyX.Html/Assets/canopyx-layouts.js +2 -10
  69. package/CanopyX.Html/Assets/canopyx-link.css +7 -7
  70. package/CanopyX.Html/Assets/canopyx-link.js +1 -1
  71. package/CanopyX.Html/Assets/canopyx-live.css +9 -9
  72. package/CanopyX.Html/Assets/canopyx-live.js +20 -15
  73. package/CanopyX.Html/Assets/canopyx-matrix.css +74 -74
  74. package/CanopyX.Html/Assets/canopyx-matrix.js +3 -4
  75. package/CanopyX.Html/Assets/canopyx-module.mjs +33 -14
  76. package/CanopyX.Html/Assets/canopyx-pager.css +2 -2
  77. package/CanopyX.Html/Assets/canopyx-pager.js +1 -1
  78. package/CanopyX.Html/Assets/canopyx-presenters.js +2 -2
  79. package/CanopyX.Html/Assets/canopyx-record-panel.css +57 -49
  80. package/CanopyX.Html/Assets/canopyx-record-panel.js +13 -8
  81. package/CanopyX.Html/Assets/canopyx-reporting-module.mjs +101 -57
  82. package/CanopyX.Html/Assets/canopyx-reporting.css +214 -276
  83. package/CanopyX.Html/Assets/canopyx-reporting.js +101 -57
  84. package/CanopyX.Html/Assets/canopyx-timeline.css +28 -28
  85. package/CanopyX.Html/Assets/canopyx-timeline.js +11 -10
  86. package/CanopyX.Html/Assets/canopyx-tree-tools.css +47 -47
  87. package/CanopyX.Html/Assets/canopyx-tree-tools.js +3 -3
  88. package/CanopyX.Html/Assets/canopyx.css +81 -142
  89. package/CanopyX.Html/Assets/canopyx.js +33 -14
  90. package/JavaScript/calendar.d.ts +15 -0
  91. package/JavaScript/flow.d.ts +6 -0
  92. package/JavaScript/grid.d.ts +29 -4
  93. package/JavaScript/live.d.ts +2 -0
  94. package/JavaScript/locales/de.mjs +5 -0
  95. package/JavaScript/locales/es.mjs +5 -0
  96. package/JavaScript/locales/fr.mjs +5 -0
  97. package/JavaScript/locales/it.mjs +5 -0
  98. package/JavaScript/locales/pl.mjs +5 -0
  99. package/JavaScript/plugins.d.ts +4 -0
  100. package/JavaScript/protocol.d.ts +1 -1
  101. package/JavaScript/records.d.ts +18 -4
  102. package/README.md +6 -2
  103. package/package.json +5 -1
@@ -1,10 +1,9 @@
1
- (function(global){"use strict";const installed=new WeakSet();const part={version:"24f176a39c02944a",requires:["filter-editor","formatting"],install(context){if(installed.has(context.DataGrid.prototype))return;const{DataGrid,h,setText,fill,gridButton,gridOption,gridDateInputMoment,gridInputLabel,gridIcon,gridDecorateButton,announceMenu,formatCompile,formatToneVar,formatError,FORMAT_ICONS,FORMAT_TONE_ICONS,FORMAT_OPERATORS,svgIcon}=context;const FORMAT_EDITOR_LABELS={formatRule:"Rule {number}",formatAddRule:"Add rule",formatEditRule:"Edit {rule}",formatDeleteRule:"Delete {rule}",formatMoveUp:"Move {rule} up",formatMoveDown:"Move {rule} down",formatEnableRule:"Apply {rule}",formatNoRules:"No formatting rules.",formatName:"Name",formatDescription:"Screen reader description",formatOnlyRowsWhere:"Only rows where",formatEveryRow:"Every row",formatNone:"None",formatApplyTo:"Apply to",formatTargetCell:"Cell",formatTargetRow:"Whole row",formatTargetColumns:"Chosen columns",formatStyle:"Style",formatHighlight:"Highlight",formatDataBar:"Data bar",formatColorScale:"Colour scale",formatBands:"Threshold bands",formatTone:"Tone",formatEmphasis:"Emphasis",formatFill:"Fill",formatTextOnly:"Text colour",formatStrong:"Bold fill",formatIcon:"Icon",formatNoIcon:"No icon",formatAutomatic:"Automatic",formatBadge:"Badge",formatCue:"Text cue",formatLowest:"Lowest",formatMidpoint:"Midpoint",formatHighest:"Highest",formatAddBand:"+ Band",formatRemoveBand:"Remove band",formatSave:"Save rule",formatCancel:"Cancel",formatShowLegend:"Show legend",formatInvalid:"Complete the rule before saving.",formatMatchCase:"Match case",formatToneDanger:"Danger",formatToneWarning:"Warning",formatToneSuccess:"Success",formatToneInfo:"Info",formatToneNeutral:"Neutral",formatToneMuted:"Muted",formatNotContains:"does not contain",formatEndsWith:"ends with",formatNotIn:"is none of",formatBetween:"between",formatLike:"matches wildcard",formatMatches:"matches pattern",formatOlderThan:"older than (days)",formatWithinLast:"within the last (days)",formatNotLike:"does not match wildcard",formatNotMatches:"does not match pattern",formatBetweenExclusive:"between (exclusive)"};function formatEditorTheme(grid,dialog){dialog.setAttribute("data-cx-theme",grid.host.getAttribute("data-cx-theme")||"auto");const theme=getComputedStyle(grid.host);dialog.style.colorScheme=theme.colorScheme;for(const name of theme)if(name.startsWith("--cx-"))dialog.style.setProperty(name,theme.getPropertyValue(name))}
2
- function formatIconButton(label,icon,run){const button=gridDecorateButton(gridButton("",run),icon==="edit"?"more":icon,true);if(icon==="edit")button.querySelector("svg").replaceWith(svgIcon('<path d="M4 20h4L19 9l-4-4L4 16zM13.5 6.5l4 4"/>'));button.classList.add("icon");button.setAttribute("aria-label",label);button.title=label;return button}
1
+ (function(global){"use strict";const installed=new WeakSet();const part={version:"b8c229ddfc1f218b",requires:["filter-editor","formatting"],install(context){if(installed.has(context.DataGrid.prototype))return;const{DataGrid,h,setText,fill,gridButton,gridOption,gridDateInputMoment,gridInputLabel,gridIcon,gridDecorateButton,announceMenu,formatCompile,formatToneVar,formatError,FORMAT_ICONS,FORMAT_TONE_ICONS,FORMAT_OPERATORS,svgIcon,overlayTheme}=context;const FORMAT_EDITOR_LABELS={formatRule:"Rule {number}",formatAddRule:"Add rule",formatEditRule:"Edit {rule}",formatDeleteRule:"Delete {rule}",formatMoveUp:"Move {rule} up",formatMoveDown:"Move {rule} down",formatEnableRule:"Apply {rule}",formatNoRules:"No formatting rules.",formatName:"Name",formatDescription:"Screen reader description",formatOnlyRowsWhere:"Only rows where",formatEveryRow:"Every row",formatNone:"None",formatApplyTo:"Apply to",formatTargetCell:"Cell",formatTargetRow:"Whole row",formatTargetColumns:"Chosen columns",formatStyle:"Style",formatHighlight:"Highlight",formatDataBar:"Data bar",formatColorScale:"Colour scale",formatBands:"Threshold bands",formatTone:"Tone",formatEmphasis:"Emphasis",formatFill:"Fill",formatTextOnly:"Text colour",formatStrong:"Bold fill",formatIcon:"Icon",formatNoIcon:"No icon",formatAutomatic:"Automatic",formatBadge:"Badge",formatCue:"Text cue",formatLowest:"Lowest",formatMidpoint:"Midpoint",formatHighest:"Highest",formatAddBand:"+ Band",formatRemoveBand:"Remove band",formatSave:"Save rule",formatCancel:"Cancel",formatShowLegend:"Show legend",formatInvalid:"Complete the rule before saving.",formatMatchCase:"Match case",formatToneDanger:"Danger",formatToneWarning:"Warning",formatToneSuccess:"Success",formatToneInfo:"Info",formatToneNeutral:"Neutral",formatToneMuted:"Muted",formatNotContains:"does not contain",formatEndsWith:"ends with",formatNotIn:"is none of",formatBetween:"between",formatLike:"matches wildcard",formatMatches:"matches pattern",formatOlderThan:"older than (days)",formatWithinLast:"within the last (days)",formatNotLike:"does not match wildcard",formatNotMatches:"does not match pattern",formatBetweenExclusive:"between (exclusive)"};function formatIconButton(label,icon,run){const button=gridDecorateButton(gridButton("",run),icon==="edit"?"more":icon,true);if(icon==="edit")button.querySelector("svg").replaceWith(svgIcon('<path d="M4 20h4L19 9l-4-4L4 16zM13.5 6.5l4 4"/>'));button.classList.add("icon");button.setAttribute("aria-label",label);button.title=label;return button}
3
2
  function formatPreview(style){const swatch=h("span","cx-format-swatch"),stops=style.scale?style.scale.stops.map(stop=>stop.tone):style.bands?style.bands.map(band=>band.tone):null;swatch.setAttribute("aria-hidden","true");if(stops){swatch.classList.add("cx-fmt-gradient");swatch.style.setProperty("--cx-fmt-scale","linear-gradient(90deg,"+stops.map(formatToneVar).join(",")+ ")")}
4
3
  else if(style.bar){swatch.classList.add("cx-fmt-barred");const bar=h("span","cx-fmt-bar");bar.style.setProperty("--cx-fmt-w","70%");bar.style.setProperty("--cx-fmt",formatToneVar(style.bar.tone||"info"));swatch.appendChild(bar)}
5
4
  else if(style.tone){swatch.classList.add("cx-fmt-fill");swatch.style.setProperty("--cx-fmt",formatToneVar(style.tone));const name=!style.icon||style.icon==="auto"?FORMAT_TONE_ICONS[style.tone]||"dot":style.icon;if(name!=="none")setText(swatch,FORMAT_ICONS[name]||name)}else if(style.badge)setText(swatch,style.badge.slice(0,2));return swatch}
6
5
  Object.assign(DataGrid.prototype,{showFormatEditor(){this.formatEditor?.close();if(!this.formatLabels.formatAddRule){const own={};for(const name of Object.keys(FORMAT_EDITOR_LABELS))own[name]=Object.hasOwn(this.labels,name)?this.labels[name]:FORMAT_EDITOR_LABELS[name];this.formatLabels={...this.formatLabels,...own}}
7
- const labels=this.formatLabels,returnFocus=document.activeElement,phone=this.host.clientWidth<=640;const dialog=h("dialog","cx-host cx-grid-overlay cx-format-editor"),head=h("div","cx-drawer-h"),title=h("h4"),body=h("div","cx-format-body"),status=h("p","cx-grid-control-error"),foot=h("div","cx-pop-f");formatEditorTheme(this,dialog);dialog.classList.toggle("cx-phone",phone);title.id=this.id+"-format-title";title.tabIndex=-1;setText(title,labels.formatRules);dialog.setAttribute("aria-labelledby",title.id);status.setAttribute("role","status");head.append(title,formatIconButton(labels.formatCancel,"close",()=>dialog.close()));dialog.append(head,body,status,foot);document.body.appendChild(dialog);this.formatEditor=dialog;const editor={dialog,body,foot,status,title,rules:JSON.parse(JSON.stringify(this.getFormatRules()))};editor.apply=()=>this.setFormatRules(editor.rules).then(()=>{setText(status,"");return true},error=>{setText(status,error.message);return false});editor.list=focus=>this.renderFormatList(editor,focus);dialog.addEventListener("keydown",event=>{if(event.key==="Escape"){event.preventDefault();event.stopPropagation();if(editor.back)editor.back();else dialog.close()}});dialog.addEventListener("close",()=>{dialog.remove();if(this.formatEditor===dialog)this.formatEditor=null;if(!this.destroyed)(returnFocus?.isConnected&&returnFocus.checkVisibility?.()?returnFocus:this.grid).focus({preventScroll:true})},{once:true});const owner=new AbortController();this.lifetime.signal.addEventListener("abort",()=>dialog.close(),{once:true,signal:owner.signal});dialog.addEventListener("close",()=>owner.abort(),{once:true});announceMenu(dialog);dialog.showModal();editor.list();title.focus({preventScroll:true});return dialog},renderFormatList(editor,focus){const labels=this.formatLabels,{body,foot,rules}=editor,name=(rule,index)=>rule.label||fill(labels.formatRule,{number:index+1});editor.back=null;setText(editor.title,labels.formatRules);body.replaceChildren();foot.replaceChildren();const list=h("ol","cx-format-rules");list.setAttribute("aria-label",labels.formatRules);const change=(mutate,next)=>{mutate();editor.apply().then(ok=>{if(!ok)editor.rules=JSON.parse(JSON.stringify(this.getFormatRules()));editor.list(next)})};rules.forEach((rule,index)=>{const item=h("li","cx-format-item"),toggle=h("input"),text=h("span","cx-format-item-text"),title=h("b"),summary=h("span","cx-muted"),actions=h("span","cx-format-actions");const label=name(rule,index);toggle.type="checkbox";toggle.checked=rule.enabled!==false;toggle.setAttribute("aria-label",fill(labels.formatEnableRule,{rule:label}));toggle.addEventListener("change",()=>change(()=>{if(toggle.checked)delete rule.enabled;else rule.enabled=false},"toggle:"+index));setText(title,label);setText(summary,this.formatSummary(rule));text.append(title,summary);const move=(by,key)=>()=>change(()=>rules.splice(index+by,0,rules.splice(index,1)[0]),key+":" +(index+by));const up=formatIconButton(fill(labels.formatMoveUp,{rule:label}),"up",move(-1,"up")),down=formatIconButton(fill(labels.formatMoveDown,{rule:label}),"down",move(1,"down"));up.disabled=index===0;down.disabled=index===rules.length-1;const edit=formatIconButton(fill(labels.formatEditRule,{rule:label}),"edit",()=>this.renderFormatRule(editor,index));edit.dataset.cxFocus="edit:"+index;const remove=formatIconButton(fill(labels.formatDeleteRule,{rule:label}),"close",()=>change(()=>rules.splice(index,1),"add"));toggle.dataset.cxFocus="toggle:"+index;up.dataset.cxFocus="up:"+index;down.dataset.cxFocus="down:"+index;actions.append(up,down,edit,remove);item.append(toggle,formatPreview(rule.style||{}),text,actions);list.appendChild(item)});if(rules.length)body.appendChild(list);else{const empty=h("p","cx-muted");setText(empty,labels.formatNoRules);body.appendChild(empty)}
6
+ const labels=this.formatLabels,returnFocus=document.activeElement,phone=this.host.clientWidth<=640;const dialog=h("dialog","cx-host cx-grid-overlay cx-format-editor"),head=h("div","cx-drawer-h"),title=h("h4"),body=h("div","cx-format-body"),status=h("p","cx-grid-control-error"),foot=h("div","cx-pop-f");overlayTheme(this.host,dialog);dialog.classList.toggle("cx-phone",phone);title.id=this.id+"-format-title";title.tabIndex=-1;setText(title,labels.formatRules);dialog.setAttribute("aria-labelledby",title.id);status.setAttribute("role","status");head.append(title,formatIconButton(labels.formatCancel,"close",()=>dialog.close()));dialog.append(head,body,status,foot);document.body.appendChild(dialog);this.formatEditor=dialog;const editor={dialog,body,foot,status,title,rules:JSON.parse(JSON.stringify(this.getFormatRules()))};editor.apply=()=>this.setFormatRules(editor.rules).then(()=>{setText(status,"");return true},error=>{setText(status,error.message);return false});editor.list=focus=>this.renderFormatList(editor,focus);dialog.addEventListener("keydown",event=>{if(event.key==="Escape"){event.preventDefault();event.stopPropagation();if(editor.back)editor.back();else dialog.close()}});dialog.addEventListener("close",()=>{dialog.remove();if(this.formatEditor===dialog)this.formatEditor=null;if(!this.destroyed)(returnFocus?.isConnected&&returnFocus.checkVisibility?.()?returnFocus:this.grid).focus({preventScroll:true})},{once:true});const owner=new AbortController();this.lifetime.signal.addEventListener("abort",()=>dialog.close(),{once:true,signal:owner.signal});dialog.addEventListener("close",()=>owner.abort(),{once:true});announceMenu(dialog);dialog.showModal();editor.list();title.focus({preventScroll:true});return dialog},renderFormatList(editor,focus){const labels=this.formatLabels,{body,foot,rules}=editor,name=(rule,index)=>rule.label||fill(labels.formatRule,{number:index+1});editor.back=null;setText(editor.title,labels.formatRules);body.replaceChildren();foot.replaceChildren();const list=h("ol","cx-format-rules");list.setAttribute("aria-label",labels.formatRules);const change=(mutate,next)=>{mutate();editor.apply().then(ok=>{if(!ok)editor.rules=JSON.parse(JSON.stringify(this.getFormatRules()));editor.list(next)})};rules.forEach((rule,index)=>{const item=h("li","cx-format-item"),toggle=h("input"),text=h("span","cx-format-item-text"),title=h("b"),summary=h("span","cx-muted"),actions=h("span","cx-format-actions");const label=name(rule,index);toggle.type="checkbox";toggle.checked=rule.enabled!==false;toggle.setAttribute("aria-label",fill(labels.formatEnableRule,{rule:label}));toggle.addEventListener("change",()=>change(()=>{if(toggle.checked)delete rule.enabled;else rule.enabled=false},"toggle:"+index));setText(title,label);setText(summary,this.formatSummary(rule));text.append(title,summary);const move=(by,key)=>()=>change(()=>rules.splice(index+by,0,rules.splice(index,1)[0]),key+":" +(index+by));const up=formatIconButton(fill(labels.formatMoveUp,{rule:label}),"up",move(-1,"up")),down=formatIconButton(fill(labels.formatMoveDown,{rule:label}),"down",move(1,"down"));up.disabled=index===0;down.disabled=index===rules.length-1;const edit=formatIconButton(fill(labels.formatEditRule,{rule:label}),"edit",()=>this.renderFormatRule(editor,index));edit.dataset.cxFocus="edit:"+index;const remove=formatIconButton(fill(labels.formatDeleteRule,{rule:label}),"close",()=>change(()=>rules.splice(index,1),"add"));toggle.dataset.cxFocus="toggle:"+index;up.dataset.cxFocus="up:"+index;down.dataset.cxFocus="down:"+index;actions.append(up,down,edit,remove);item.append(toggle,formatPreview(rule.style||{}),text,actions);list.appendChild(item)});if(rules.length)body.appendChild(list);else{const empty=h("p","cx-muted");setText(empty,labels.formatNoRules);body.appendChild(empty)}
8
7
  const add=gridButton(labels.formatAddRule,()=>this.renderFormatRule(editor,-1));add.classList.add("cx-link");add.dataset.cxFocus="add";add.disabled=rules.length>=64;const legend=h("input"),legendLabel=gridInputLabel(labels.formatShowLegend,legend);legend.type="checkbox";legend.checked=!!this.formatLegendShown;legendLabel.classList.add("cx-format-legend-switch");legend.addEventListener("change",()=>this.setFormatLegend(legend.checked));const done=gridButton(this.labels.gridDone,()=>editor.dialog.close());foot.append(add,legendLabel,done);const target=focus&&editor.dialog.querySelector('[data-cx-focus="'+focus+'"]');if(target&&!target.disabled)target.focus({preventScroll:true});else if(focus)add.focus({preventScroll:true})},formatSummary(rule){const labels=this.formatLabels,title=id=>this.columns.find(column=>column.id===id)?.title||id,style=rule.style||{};const target=rule.target==="row"?labels.formatTargetRow:rule.target==="columns"?(rule.columns||[]).map(title).join(", "):labels.formatTargetCell+" · "+title(rule.column);const kind=style.bar?labels.formatDataBar:style.scale?labels.formatColorScale:style.bands?labels.formatBands:labels.formatHighlight;return[target,kind,rule.when?null:labels.formatEveryRow].filter(Boolean).join(" · ")}});const FORMAT_TONES=["danger","warning","success","info","neutral","muted"];function formatField(text,control,className){const label=control.tagName==="DIV"?h("div"):gridInputLabel(text,control);if(control.tagName==="DIV"){const heading=h("span");setText(heading,text);heading.setAttribute("aria-hidden","true");label.append(heading,control)}
9
8
  label.classList.add("cx-format-field");if(className)label.classList.add(className);if(control.tagName==="SELECT"||control.tagName==="INPUT"&&control.type!=="checkbox")control.classList.add("cx-input");return label}
10
9
  function formatSelect(options,value){const select=h("select");for(const[key,text]of options)select.appendChild(gridOption(key,text));if(value!==undefined&&options.some(option=>option[0]===value))select.value=value;return select}
@@ -1,30 +1,30 @@
1
- .cx-data-grid .cx-row .cx-cell.cx-fmt-fill,.cx-data-grid .cx-row .cx-cell.cx-fmt-strong{background-color:color-mix(in srgb,var(--cx-fmt) 13%,var(--cx-surface));color:color-mix(in srgb,var(--cx-fmt) 82%,var(--cx-text));}
1
+ .cx-data-grid .cx-row .cx-cell.cx-fmt-fill,.cx-data-grid .cx-row .cx-cell.cx-fmt-strong{background-color:color-mix(in srgb,var(--cx-fmt) 13%,var(--hfx-color-surface,light-dark(#ffffff,#16181c)));color:color-mix(in srgb,var(--cx-fmt) 82%,var(--hfx-color-text,light-dark(#16181c,#f2f3f5)));}
2
2
  .cx-data-grid .cx-row .cx-cell.cx-fmt-strong{font-weight:600;}
3
- .cx-data-grid .cx-row .cx-cell.cx-fmt-text{color:color-mix(in srgb,var(--cx-fmt) 82%,var(--cx-text));}
4
- .cx-data-grid .cx-row .cx-cell.cx-fmt-scale{background-color:color-mix(in srgb,var(--cx-fmt-scale) 18%,var(--cx-surface));}
5
- .cx-data-grid .cx-row.cx-fmt-row,.cx-data-grid .cx-row.cx-fmt-row [data-cx-pin]{background:color-mix(in srgb,var(--cx-fmt) 8%,var(--cx-surface));}
6
- .cx-data-grid .cx-row.cx-fmt-row:hover,.cx-data-grid .cx-row.cx-fmt-row:hover [data-cx-pin]{background:color-mix(in srgb,var(--cx-fmt) 12%,var(--cx-surface));}
7
- .cx-data-grid .cx-row.cx-fmt-row[aria-selected="true"],.cx-data-grid .cx-row.cx-fmt-row[aria-selected="true"] [data-cx-pin]{background:var(--cx-selected-bg);}
3
+ .cx-data-grid .cx-row .cx-cell.cx-fmt-text{color:color-mix(in srgb,var(--cx-fmt) 82%,var(--hfx-color-text,light-dark(#16181c,#f2f3f5)));}
4
+ .cx-data-grid .cx-row .cx-cell.cx-fmt-scale{background-color:color-mix(in srgb,var(--cx-fmt-scale) 18%,var(--hfx-color-surface,light-dark(#ffffff,#16181c)));}
5
+ .cx-data-grid .cx-row.cx-fmt-row,.cx-data-grid .cx-row.cx-fmt-row [data-cx-pin]{background:color-mix(in srgb,var(--cx-fmt) 8%,var(--hfx-color-surface,light-dark(#ffffff,#16181c)));}
6
+ .cx-data-grid .cx-row.cx-fmt-row:hover,.cx-data-grid .cx-row.cx-fmt-row:hover [data-cx-pin]{background:color-mix(in srgb,var(--cx-fmt) 12%,var(--hfx-color-surface,light-dark(#ffffff,#16181c)));}
7
+ .cx-data-grid .cx-row.cx-fmt-row[aria-selected="true"],.cx-data-grid .cx-row.cx-fmt-row[aria-selected="true"] [data-cx-pin]{background:var(--hfx-color-accent-subtle,light-dark(#e7f1f1,#1b3435));}
8
8
  .cx-data-grid .cx-row.cx-fmt-row > .cx-cell:first-child{box-shadow:inset var(--cx-size-3px) 0 0 var(--cx-fmt);}
9
- .cx-fmt-bar{flex:1 1 var(--cx-size-24px);min-width:var(--cx-size-24px);max-width:var(--cx-size-180px);height:var(--cx-size-8px);border-radius:var(--cx-size-4px);overflow:hidden;background:color-mix(in srgb,var(--cx-text) 9%,transparent);pointer-events:none;}
10
- .cx-fmt-bar::before{content:"";display:block;width:var(--cx-fmt-w);height:100%;border-radius:inherit;background:color-mix(in srgb,var(--cx-fmt) 78%,var(--cx-surface));}
9
+ .cx-fmt-bar{flex:1 1 var(--cx-size-24px);min-width:var(--cx-size-24px);max-width:var(--cx-size-180px);height:var(--cx-size-8px);border-radius:var(--hfx-radius-control,var(--hfx-radius-md,6px));overflow:hidden;background:color-mix(in srgb,var(--hfx-color-text,light-dark(#16181c,#f2f3f5)) 9%,transparent);pointer-events:none;}
10
+ .cx-fmt-bar::before{content:"";display:block;width:var(--cx-fmt-w);height:100%;border-radius:inherit;background:color-mix(in srgb,var(--cx-fmt) 78%,var(--hfx-color-surface,light-dark(#ffffff,#16181c)));}
11
11
  .cx-fmt-novalue > .cx-text{position:absolute;width:var(--cx-size-1px);height:var(--cx-size-1px);overflow:hidden;clip:rect(0 0 0 0);}
12
12
  .cx-fmt-icon{flex:none;color:var(--cx-fmt,currentColor);font-weight:700;line-height:1;}
13
13
  .cx-fmt-badge{flex:none;}
14
- .cx-fmt-cue{flex:none;color:var(--cx-text-2);font-size:var(--cx-size-12d5px);}
14
+ .cx-fmt-cue{flex:none;color:var(--hfx-color-text-secondary,light-dark(#4d525b,#b0b4bc));font-size:var(--cx-size-12d5px);}
15
15
  .cx-data-grid .cx-hidden-fields.cx-fmt-flag{color:var(--cx-fmt);font-weight:700;text-decoration:underline var(--cx-size-2px) var(--cx-fmt);text-underline-offset:var(--cx-size-3px);}
16
- .cx-drawer dd:is(.cx-fmt-fill,.cx-fmt-strong,.cx-fmt-scale){display:flex;flex-wrap:wrap;align-items:center;gap:var(--cx-size-6px);margin:var(--cx-size-neg-2px) 0;padding:var(--cx-size-2px) var(--cx-size-6px);border-radius:var(--cx-radius-sm);}
17
- .cx-drawer dd.cx-fmt-fill,.cx-drawer dd.cx-fmt-strong{background:color-mix(in srgb,var(--cx-fmt) 13%,var(--cx-surface));color:color-mix(in srgb,var(--cx-fmt) 82%,var(--cx-text));}
16
+ .cx-drawer dd:is(.cx-fmt-fill,.cx-fmt-strong,.cx-fmt-scale){display:flex;flex-wrap:wrap;align-items:center;gap:var(--cx-size-6px);margin:var(--cx-size-neg-2px) 0;padding:var(--cx-size-2px) var(--cx-size-6px);border-radius:var(--hfx-radius-sm,4px);}
17
+ .cx-drawer dd.cx-fmt-fill,.cx-drawer dd.cx-fmt-strong{background:color-mix(in srgb,var(--cx-fmt) 13%,var(--hfx-color-surface,light-dark(#ffffff,#16181c)));color:color-mix(in srgb,var(--cx-fmt) 82%,var(--hfx-color-text,light-dark(#16181c,#f2f3f5)));}
18
18
  .cx-drawer dd.cx-fmt-strong{font-weight:600;}
19
- .cx-drawer dd.cx-fmt-text{color:color-mix(in srgb,var(--cx-fmt) 82%,var(--cx-text));}
20
- .cx-drawer dd.cx-fmt-scale{background:color-mix(in srgb,var(--cx-fmt-scale) 18%,var(--cx-surface));}
19
+ .cx-drawer dd.cx-fmt-text{color:color-mix(in srgb,var(--cx-fmt) 82%,var(--hfx-color-text,light-dark(#16181c,#f2f3f5)));}
20
+ .cx-drawer dd.cx-fmt-scale{background:color-mix(in srgb,var(--cx-fmt-scale) 18%,var(--hfx-color-surface,light-dark(#ffffff,#16181c)));}
21
21
  .cx-drawer dd:has(> .cx-fmt-icon,> .cx-fmt-cue,> .cx-fmt-badge,> .cx-fmt-bar){display:flex;flex-wrap:wrap;align-items:center;gap:var(--cx-size-6px);}
22
- .cx-drawer .cx-drawer-h.cx-fmt-accent{box-shadow:inset var(--cx-size-3px) 0 0 var(--cx-fmt);background:color-mix(in srgb,var(--cx-fmt) 8%,var(--cx-surface));}
22
+ .cx-drawer .cx-drawer-h.cx-fmt-accent{box-shadow:inset var(--cx-size-3px) 0 0 var(--cx-fmt);background:color-mix(in srgb,var(--cx-fmt) 8%,var(--hfx-color-surface,light-dark(#ffffff,#16181c)));}
23
23
  .cx-drawer .cx-drawer-h > .cx-fmt-icon{margin-top:var(--cx-size-4px);font-size:var(--cx-size-17px);}
24
- .cx-format-legend{flex:none;display:flex;flex-wrap:wrap;align-items:center;gap:var(--cx-size-6px) var(--cx-size-16px);margin:0 0 var(--cx-size-8px);padding:0;list-style:none;font-size:var(--cx-size-12d5px);color:var(--cx-text-2);}
24
+ .cx-format-legend{flex:none;display:flex;flex-wrap:wrap;align-items:center;gap:var(--cx-size-6px) var(--cx-size-16px);margin:0 0 var(--cx-size-8px);padding:0;list-style:none;font-size:var(--cx-size-12d5px);color:var(--hfx-color-text-secondary,light-dark(#4d525b,#b0b4bc));}
25
25
  .cx-format-key{display:inline-flex;align-items:center;gap:var(--cx-size-6px);min-width:0;}
26
- .cx-format-swatch{position:relative;isolation:isolate;display:inline-grid;place-items:center;flex:none;min-width:var(--cx-size-18px);height:var(--cx-size-18px);border-radius:var(--cx-radius-sm);border:var(--cx-size-1px) solid var(--cx-line);font-size:var(--cx-size-11px);}
27
- .cx-format-swatch.cx-fmt-fill,.cx-format-swatch.cx-fmt-strong,.cx-format-swatch.cx-fmt-text{background:color-mix(in srgb,var(--cx-fmt) 13%,var(--cx-surface));border-color:color-mix(in srgb,var(--cx-fmt) 35%,var(--cx-surface));}
26
+ .cx-format-swatch{position:relative;isolation:isolate;display:inline-grid;place-items:center;flex:none;min-width:var(--cx-size-18px);height:var(--cx-size-18px);border-radius:var(--hfx-radius-sm,4px);border:var(--cx-size-1px) solid var(--hfx-color-border,light-dark(#e2e4e7,#272a30));font-size:var(--cx-size-11px);}
27
+ .cx-format-swatch.cx-fmt-fill,.cx-format-swatch.cx-fmt-strong,.cx-format-swatch.cx-fmt-text{background:color-mix(in srgb,var(--cx-fmt) 13%,var(--hfx-color-surface,light-dark(#ffffff,#16181c)));border-color:color-mix(in srgb,var(--cx-fmt) 35%,var(--hfx-color-surface,light-dark(#ffffff,#16181c)));}
28
28
  .cx-format-swatch.cx-fmt-gradient{width:var(--cx-size-36px);background:var(--cx-fmt-scale);opacity:.55;}
29
29
  .cx-format-swatch.cx-fmt-barred{width:var(--cx-size-36px);padding:0 var(--cx-size-3px);}
30
30
  .cx-format-swatch .cx-fmt-bar{width:100%;max-width:none;}
@@ -1,4 +1,4 @@
1
- (function(global){"use strict";const installed=new WeakSet();const part={version:"1a28068597f435de",install(context){if(installed.has(context.DataGrid.prototype))return;const{DataGrid,h,setText,setClass,fill,gridFreeze,gridDateInputMoment,cellValue,cellText,foldText,toneOf,numberFormat,gridButton,gridOption,gridInputLabel,gridIcon,gridDecorateButton,GRID_REPORTING,loadPart,definePart,announceMenu,boundedPattern,wildcardMatch,svgIcon}=context;const FORMAT_OPERATORS={eq:1,ne:1,gt:1,ge:1,lt:1,le:1,contains:1,notContains:1,startsWith:1,endsWith:1,like:1,notLike:1,matches:1,notMatches:1,in:-1,notIn:-1,between:2,betweenExclusive:2,isNull:0,isNotNull:0,olderThan:1,withinLast:1};const FORMAT_TYPES=["text","number","boolean","date"],FORMAT_DAY=86400000;function formatError(message){throw new Error("CanopyX: "+message)}
1
+ (function(global){"use strict";const installed=new WeakSet();const part={version:"d3795e4b933d83a8",install(context){if(installed.has(context.DataGrid.prototype))return;const{toneVariable,DataGrid,h,setText,setClass,fill,gridFreeze,gridDateInputMoment,cellValue,cellText,foldText,toneOf,numberFormat,gridButton,gridOption,gridInputLabel,gridIcon,gridDecorateButton,GRID_REPORTING,loadPart,definePart,announceMenu,boundedPattern,wildcardMatch,svgIcon,overlayTheme}=context;const FORMAT_OPERATORS={eq:1,ne:1,gt:1,ge:1,lt:1,le:1,contains:1,notContains:1,startsWith:1,endsWith:1,like:1,notLike:1,matches:1,notMatches:1,in:-1,notIn:-1,between:2,betweenExclusive:2,isNull:0,isNotNull:0,olderThan:1,withinLast:1};const FORMAT_TYPES=["text","number","boolean","date"],FORMAT_DAY=86400000;function formatError(message){throw new Error("CanopyX: "+message)}
2
2
  function formatKeys(value,keys,what){if(!value||typeof value!=="object"||Array.isArray(value)||Object.keys(value).some(key=>!keys.includes(key)))formatError("invalid "+what+".")}
3
3
  const formatCultures=new Map();function formatCulture(culture){let entry=formatCultures.get(culture);if(!entry){let tag;try{tag=Intl.getCanonicalLocales(culture)[0]}catch(_){formatError("unknown culture '"+culture+"'.")}
4
4
  const parts=new Intl.NumberFormat(tag).formatToParts(12345.6),part=type=>(parts.find(item=>item.type===type)||{}).value;entry={tag,group:part("group")||",",decimal:part("decimal")||".",accent:new Intl.Collator(tag,{sensitivity:"accent"}),variant:new Intl.Collator(tag,{sensitivity:"variant"})};if(formatCultures.size<64)formatCultures.set(culture,entry)}
@@ -21,7 +21,7 @@ catch(_){formatError("invalid pattern '"+source+"'.")}}else if(op==="olderThan"|
21
21
  return false}}
22
22
  function formatGroup(group,columns,budget,depth){if(depth>8||++budget.groups>64)formatError("formatting conditions exceed eight levels or 64 groups.");formatKeys(group,["operator","filters","groups"],"formatting condition group");const filters=group.filters??[],groups=group.groups??[];if(!["and","or","none"].includes(group.operator)||!Array.isArray(filters)||!Array.isArray(groups)||!filters.length&&!groups.length)
23
23
  formatError("invalid or empty formatting condition group.");const tests=[...filters.map(filter=>formatPredicate(filter,columns,budget)),...groups.map(child=>formatGroup(child,columns,budget,depth+1))];const count=tests.length;if(group.operator==="and")return row=>{for(let i=0;i<count;i++)if(!tests[i](row))return false;return true};const any=row=>{for(let i=0;i<count;i++)if(tests[i](row))return true;return false};return group.operator==="or"?any:row=>!any(row)}
24
- const FORMAT_ICONS={up:"↑",down:"↓",check:"✓",cross:"✕",warning:"⚠︎",info:"ⓘ",dot:"●",circle:"○",triangle:"▲",square:"■",diamond:"◆",flag:"⚑",star:"★",minus:"−",plus:"+",clock:"◷"};const FORMAT_TONE_ICONS={danger:"cross",warning:"warning",success:"check",info:"info"};const FORMAT_LABELS={formatRules:"Conditional formatting",formatLegend:"Formatting legend",formatUpTo:"Up to",formatAbove:"Above",formatHiddenFlagged:"{count} hidden fields formatted: {rules}"};function formatToneVar(tone){return tone==="neutral"?"var(--cx-text-2)":tone==="muted"?"var(--cx-muted)":"var(--cx-tone-"+tone+",var(--cx-text-2))"}
24
+ const FORMAT_ICONS={up:"↑",down:"↓",check:"✓",cross:"✕",warning:"⚠︎",info:"ⓘ",dot:"●",circle:"○",triangle:"▲",square:"■",diamond:"◆",flag:"⚑",star:"★",minus:"−",plus:"+",clock:"◷"};const FORMAT_TONE_ICONS={danger:"cross",warning:"warning",success:"check",info:"info"};const FORMAT_LABELS={formatRules:"Conditional formatting",formatLegend:"Formatting legend",formatUpTo:"Up to",formatAbove:"Above",formatHiddenFlagged:"{count} hidden fields formatted: {rules}"};function formatToneVar(tone){return tone==="neutral"?"var(--hfx-color-text-secondary,light-dark(#4d525b,#b0b4bc))":tone==="muted"?"var(--hfx-color-text-muted,light-dark(#626770,#8f949d))":toneVariable(tone,false,"var(--hfx-color-text-secondary,light-dark(#4d525b,#b0b4bc))")}
25
25
  function formatTone(value){if(typeof value!=="string"||!toneOf(value).cls)formatError("'"+value+"' is not a tone name.");return value}
26
26
  const formatText=(value,limit)=>value===undefined||typeof value==="string"&&value.trim()&&value.length<=limit&&!/[\u0000-\u001f\u007f]/.test(value) ? value : formatError("formatting text must have 1 to " + limit + " visible characters.");
27
27
  const formatFinite=value=>value===undefined||Number.isFinite(value)&&Math.abs(value)<=Number.MAX_SAFE_INTEGER?value:formatError("formatting bounds are finite numbers.");function formatIcon(value){if(value===undefined||value==="auto"||value==="none"||Object.hasOwn(FORMAT_ICONS,value))return value;if(typeof value!=="string"||!value.trim()||[...value].length>4||/[\u0000-\u001f\u007f<>]/.test(value)) formatError("an icon is a known name or up to four characters.");
@@ -68,7 +68,7 @@ if(target.scale){add("cx-fmt-scale");prop(element,"--cx-fmt-scale",target.scale)
68
68
  if(target.className)for(const name of target.className.split(/\s+/)) if (name) add(name);
69
69
  if(target.css)for(const name of Object.keys(target.css))prop(element,name,target.css[name]);if(target.glyph){const icon=node("span","cx-fmt-icon",target.glyph);icon.setAttribute("aria-hidden","true");if(target.tone)prop(icon,"--cx-fmt",formatToneVar(target.tone));element.insertBefore(icon,before&&before.parentNode===element?before:element.firstChild)}
70
70
  if(target.bar){add("cx-fmt-barred");if(!target.bar.show)add("cx-fmt-novalue");const bar=node("span","cx-fmt-bar");bar.setAttribute("aria-hidden","true");prop(bar,"--cx-fmt-w",(target.bar.width*100).toFixed(1)+ "%");prop(bar,"--cx-fmt",formatToneVar(target.bar.tone));element.insertBefore(bar,element.firstChild)}
71
- if(target.badge){const badge=node("span","cx-badge cx-fmt-badge",target.badge),tone=toneOf(target.tone||"neutral");badge.className +=tone.cls;if(tone.host){prop(badge,"--cx-t","var(--cx-tone-"+tone.host+")");prop(badge,"--cx-t-bg","var(--cx-tone-"+tone.host+"-bg)")}
71
+ if(target.badge){const badge=node("span","cx-badge cx-fmt-badge",target.badge),tone=toneOf(target.tone||"neutral");badge.className +=tone.cls;if(tone.host){prop(badge,"--cx-t",toneVariable(tone.host));prop(badge,"--cx-t-bg",toneVariable(tone.host,true))}
72
72
  element.appendChild(badge)}
73
73
  if(target.cue)element.appendChild(node("span","cx-fmt-cue",target.cue));if(target.descriptions&&target.descriptions.length)element.appendChild(node("span","cx-sr-only",", "+target.descriptions.join(", ")))}
74
74
  const formatCues=target=>({glyph:target.glyph,badge:target.badge,cue:target.cue,tone:target.tone,descriptions:target.descriptions});const FORMAT_PAINT=DataGrid.prototype.paintGridHighlights;DataGrid.prototype.paintGridHighlights=function(element,row){FORMAT_PAINT.call(this,element,row);formatClear(element);const result=!row.status&&this.formatResult&&this.formatResult(row.h);if(!result)return;const slots=element._cells,first=slots[0];if(result.row){const own=result.row;if(own.tone||own.className||own.css){const fx=element._fx=formatEffects(element);setClass(element,element._cls +(own.tone?" cx-fmt-row":"")+(own.className?" "+own.className:""));if(own.tone){element.style.setProperty("--cx-fmt",formatToneVar(own.tone));fx.props.push("--cx-fmt")}
@@ -76,7 +76,7 @@ if(own.css)for(const name of Object.keys(own.css)){element.style.setProperty(nam
76
76
  if(first){first.fx=formatEffects(first.cell);first.highlighted=true;formatDecorate(first.cell,formatCues(result.row),first.fx,first.textSpan)}}
77
77
  const columns=this.cols.concat(this.phoneLineColumns()),paintSlots=slots.concat(first?.childSlots||[]);for(let i=0;i<columns.length;i++){const target=result.cells.get(columns[i].id),slot=paintSlots[i];if(!target||!slot)continue;if(!slot.fx||slot.fx.element!==slot.cell)slot.fx=formatEffects(slot.cell);slot.highlighted=true;formatDecorate(slot.cell,target,slot.fx,slot.textSpan,"fill")}
78
78
  if(first&&first.hiddenFields){const details=this.formatResult(row.h,true);if(details)this.formatHiddenFields(first,details)}};const formatFlag=target=>target&&target.details&&(target.tone||target.glyph||target.badge||target.cue);DataGrid.prototype.formatHiddenFields=function(slot,result){const button=slot.hiddenFields,hidden=this.phoneRemainingColumns().filter(column=>formatFlag(result.cells.get(column.id)));if(!hidden.length)return;let tone=null;for(const column of hidden){const next=result.cells.get(column.id).tone;if(next&&(FORMAT_RANK[next]||3)>(FORMAT_RANK[tone]||0))tone=next}
79
- const fx=slot.fx||(slot.fx=formatEffects(slot.cell)),effects=formatEffects(button),label=button.getAttribute("aria-label");let decorated;fx.nodes.push({remove(){formatUndo(effects);if(button.getAttribute("aria-label")===decorated)button.setAttribute("aria-label",label)}});effects.classes.push("cx-fmt-flag");button.classList.add("cx-fmt-flag");button.style.setProperty("--cx-fmt",tone?formatToneVar(tone):"var(--cx-text-2)");effects.props.push("--cx-fmt");const rules=[...new Set(hidden.flatMap(column=>result.cells.get(column.id).descriptions))].join(", ");decorated=label+". "+fill(this.formatLabels.formatHiddenFlagged,{count:hidden.length,rules});button.setAttribute("aria-label",decorated)};const FORMAT_MEASURE=DataGrid.prototype.measureGridColumn;DataGrid.prototype.measureGridColumn=function(column){if(column.formatMinW!==undefined){column.minW=column.formatMinW;delete column.formatMinW}
79
+ const fx=slot.fx||(slot.fx=formatEffects(slot.cell)),effects=formatEffects(button),label=button.getAttribute("aria-label");let decorated;fx.nodes.push({remove(){formatUndo(effects);if(button.getAttribute("aria-label")===decorated)button.setAttribute("aria-label",label)}});effects.classes.push("cx-fmt-flag");button.classList.add("cx-fmt-flag");button.style.setProperty("--cx-fmt",tone?formatToneVar(tone):"var(--hfx-color-text-secondary,light-dark(#4d525b,#b0b4bc))");effects.props.push("--cx-fmt");const rules=[...new Set(hidden.flatMap(column=>result.cells.get(column.id).descriptions))].join(", ");decorated=label+". "+fill(this.formatLabels.formatHiddenFlagged,{count:hidden.length,rules});button.setAttribute("aria-label",decorated)};const FORMAT_MEASURE=DataGrid.prototype.measureGridColumn;DataGrid.prototype.measureGridColumn=function(column){if(column.formatMinW!==undefined){column.minW=column.formatMinW;delete column.formatMinW}
80
80
  const result=FORMAT_MEASURE.call(this,column);if(!this.formatCompiled||!this.formatCompiled.length||!this.fitContext||!this.fitFont)return result;const context=this.fitContext,[font,small,,pad]=this.fitFont,first=column===this.columns.find(item=>!item.hidden);const measure=(text,face)=>{context.font=face;return context.measureText(String(text).slice(0,512)).width};let need=0,floor=0,sampled=0;for(const row of this.rowCache.values()){if(sampled++===200)break;const formats=this.formatResult(row.h),own=formats&&formats.cells.get(column.id),cues=first&&formats&&formats.row;if(!own&&!cues)continue;let width=measure(cellText(row.h.cells[column.id],column,this.fmt)||"—",font),flag=false;for(const target of[own,cues])if(target){if(target.glyph){width +=20;flag=true}
81
81
  if(target.badge){width +=measure(target.badge,small)+ 20;flag=true}
82
82
  if(target.cue){width +=measure(target.cue,small)+ 6;flag=true}
@@ -85,7 +85,7 @@ width=Math.ceil(width+2*pad+4);need=Math.max(need,width);if(flag)floor=Math.max(
85
85
  if(floor){column.formatMinW=column.minW;column.minW=Math.max(column.minW||0,Math.min(floor,420))}
86
86
  return need>result.width||floor>result.width?Object.freeze({...result,width:Math.max(result.width,Math.min(Math.max(need,floor),420))}):result};DataGrid.prototype.formatRefit=function(){this.fitKey=null;if(this.sized&&this.grid.clientWidth)this.applyWidths()};function formatDrawer(grid,dialog){let effects=[];const paint=()=>{effects.forEach(formatUndo);effects=[];const head=dialog.querySelector(".cx-drawer-h"),title=head&&head.querySelector("h4"),data=dialog._cxRecord;if(!dialog.isConnected||!title||!data||!grid.formatCompiled||!grid.formatCompiled.length)return;const result=grid.formatResult(data,true);if(!result)return;if(result.row){const fx=formatEffects(head);effects.push(fx);formatDecorate(head,{tone:result.row.tone,descriptions:result.row.descriptions,glyph:result.row.glyph},fx,title,"accent")}
87
87
  for(const field of grid.drawerFields(dialog)){const target=field.column&&result.cells.get(field.column.id);if(!target||!target.details)continue;const fx=formatEffects(field.value);effects.push(fx);formatDecorate(field.value,target,fx,field.value.firstChild,"fill")}};dialog.addEventListener("cx-drawer-paint",paint);dialog.addEventListener("close",()=>{effects.forEach(formatUndo);effects=[]},{once:true})}
88
- DataGrid.drawerHook(20,function(dialog){formatDrawer(this,dialog)});const FORMAT_EDITOR=definePart(DataGrid,"format-editor","formatting rule editor",()=>({DataGrid,h,setText,fill,gridButton,gridOption,gridDateInputMoment,gridInputLabel,gridIcon,gridDecorateButton,announceMenu,formatCompile,formatToneVar,formatError,FORMAT_ICONS,FORMAT_TONE_ICONS,FORMAT_OPERATORS,svgIcon}));function formatPick(labels){const own={};for(const name of Object.keys(FORMAT_LABELS))own[name]=Object.hasOwn(labels,name)?labels[name]:FORMAT_LABELS[name];return own}
88
+ DataGrid.drawerHook(20,function(dialog){formatDrawer(this,dialog)});const FORMAT_EDITOR=definePart(DataGrid,"format-editor","formatting rule editor",()=>({DataGrid,h,setText,fill,gridButton,gridOption,gridDateInputMoment,gridInputLabel,gridIcon,gridDecorateButton,announceMenu,formatCompile,formatToneVar,formatError,FORMAT_ICONS,FORMAT_TONE_ICONS,FORMAT_OPERATORS,svgIcon,overlayTheme}));function formatPick(labels){const own={};for(const name of Object.keys(FORMAT_LABELS))own[name]=Object.hasOwn(labels,name)?labels[name]:FORMAT_LABELS[name];return own}
89
89
  Object.assign(DataGrid.prototype,{validateFormatRules(rules){formatCompile(rules,this)},startFormatting(){if(this.formatStarted||this.destroyed)return;this.formatStarted=true;this.formatVersion=1;this.formatCache=new WeakMap();this.formatLabels=formatPick(this.labels);try{this.formatOptions=formatOptions(this.view.formatting);this.formatCompiled=formatCompile(this.view.formatRules||[],this)}
90
90
  catch(error){this.formatOptions=this.formatOptions||{};this.formatCompiled=[];this.emit("error",{error})}
91
91
  this.formatRules=gridFreeze(JSON.parse(JSON.stringify(this.formatCompiled.length?this.view.formatRules:[])));this.formatEdited=false;this.formatLegendShown=!!this.formatOptions.legend;if(this.formatOptions.editor&&this.overflow){const entry=gridButton(this.formatLabels.formatRules,()=>this.openFormatRules().catch(error=>this.emit("error",{error})));entry.classList.add("cx-grid-format-rules");entry.setAttribute("aria-haspopup","dialog");this.overflow.panel.insertBefore(entry,this.overflow.panel.querySelector(".cx-grid-details, .cx-grid-print"))}
@@ -1,8 +1,8 @@
1
1
  /* Forms part: what every form's editors share, here the lookup combobox's suggestion list (a popover above any clipping). */
2
- .cx-editor-list{position:fixed;inset:auto;margin:0;box-sizing:border-box;background:var(--cx-surface);color:var(--cx-text);border:var(--cx-size-1px) solid var(--cx-line-strong);border-radius:var(--cx-radius);box-shadow:var(--cx-panel-shadow);font:var(--cx-size-13d5px)/1.4 var(--cx-font);}
2
+ .cx-editor-list{position:fixed;inset:auto;margin:0;box-sizing:border-box;background:var(--hfx-color-surface-raised,light-dark(#ffffff,#1e2126));color:var(--hfx-color-text,light-dark(#16181c,#f2f3f5));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));box-shadow:var(--hfx-elevation-2,0 1px 2px rgba(22,24,28,.05),0 6px 18px -10px rgba(22,24,28,.18));font:var(--cx-size-13d5px)/1.4 var(--hfx-font-sans,"Segoe UI Variable Text","Segoe UI",system-ui,-apple-system,"Helvetica Neue",Arial,sans-serif);}
3
3
  .cx-editor-list{max-height:var(--cx-size-240px);overflow:auto;padding:var(--cx-size-4px);}
4
- .cx-editor-option,.cx-editor-note{padding:var(--cx-size-6px) var(--cx-size-8px);border-radius:var(--cx-radius-sm);white-space:nowrap;}
4
+ .cx-editor-option,.cx-editor-note{padding:var(--cx-size-6px) var(--cx-size-8px);border-radius:var(--hfx-radius-sm,4px);white-space:nowrap;}
5
5
  .cx-editor-option{cursor:pointer;}
6
- .cx-editor-option[aria-selected="true"],.cx-editor-option:hover{background:var(--cx-selected-bg);}
7
- .cx-editor-note{color:var(--cx-muted);}
8
- .cx-editor::placeholder{color:color-mix(in srgb,var(--cx-text) 60%,var(--cx-surface));font-style:italic;opacity:1;}
6
+ .cx-editor-option[aria-selected="true"],.cx-editor-option:hover{background:var(--hfx-color-accent-subtle,light-dark(#e7f1f1,#1b3435));}
7
+ .cx-editor-note{color:var(--hfx-color-text-muted,light-dark(#626770,#8f949d));}
8
+ .cx-editor::placeholder{color:color-mix(in srgb,var(--hfx-color-text,light-dark(#16181c,#f2f3f5)) 60%,var(--hfx-color-surface,light-dark(#ffffff,#16181c)));font-style:italic;opacity:1;}
@@ -1,4 +1,4 @@
1
- (function(global){"use strict";const installed=new WeakSet();const part={version:"a8c60f205d9babca",install(context){if(installed.has(context.FORMS_IMPL))return;const{FORMS_IMPL,h,setText,fill,gridFreeze,gridMomentFromParts,boundedPattern,foldText}=context;const editPad=(number,width=2)=>String(number).padStart(width,"0");function editInput(context,type="text"){const input=h("input","cx-editor");input.type=type;input.autocomplete="off";if(typeof context.editor.placeholder==="string")input.placeholder=context.editor.placeholder;return input}
1
+ (function(global){"use strict";const installed=new WeakSet();const part={version:"0d77c25f4fa14425",install(context){if(installed.has(context.FORMS_IMPL))return;const{FORMS_IMPL,h,setText,fill,gridFreeze,gridMomentFromParts,boundedPattern,foldText}=context;const editPad=(number,width=2)=>String(number).padStart(width,"0");function editInput(context,type="text"){const input=h("input","cx-editor");input.type=type;input.autocomplete="off";if(typeof context.editor.placeholder==="string")input.placeholder=context.editor.placeholder;return input}
2
2
  const EDIT_NUMBER_LOCALES=new Map();function editParseNumber(text,locale){let format=EDIT_NUMBER_LOCALES.get(locale);if(!format){let number;try{number=new Intl.NumberFormat(locale||undefined)}catch(error){number=new Intl.NumberFormat()}
3
3
  const digits=new Map();for(let digit=0;digit<10;digit++)digits.set(number.formatToParts(digit).find(part=>part.type==="integer").value,String(digit));format={parts:number.formatToParts(-12345.6),digits};if(EDIT_NUMBER_LOCALES.size>=32)EDIT_NUMBER_LOCALES.delete(EDIT_NUMBER_LOCALES.keys().next().value);EDIT_NUMBER_LOCALES.set(locale,format)}
4
4
  const parts=format.parts;const group=parts.find(part=>part.type==="group")?.value??",",decimal=parts.find(part=>part.type==="decimal")?.value??".";let source=Array.from(text.trim(),digit=>format.digits.get(digit)??digit).join("").replace(/[\u061c\u200e\u200f]/g, "").replace(/\u2212/g, "-");