@deephaven/code-studio 0.72.1-beta.0 → 0.72.1-xcomponent.2

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 (48) hide show
  1. package/build/assets/{AppRoot-686447ad.js → AppRoot-11e1f33c.js} +3 -3
  2. package/build/assets/{AppRoot-686447ad.js.map → AppRoot-11e1f33c.js.map} +1 -1
  3. package/build/assets/Chart-4231e6bc.js +2 -0
  4. package/build/assets/Chart-4231e6bc.js.map +1 -0
  5. package/build/assets/Chart-d34ffe5c.css +1 -0
  6. package/build/assets/{ControlType-73c58e54.js → ControlType-415a9903.js} +16 -16
  7. package/build/assets/ControlType-415a9903.js.map +1 -0
  8. package/build/assets/{FontBootstrap-c6a5ae22.js → FontBootstrap-25660620.js} +2 -2
  9. package/build/assets/{FontBootstrap-c6a5ae22.js.map → FontBootstrap-25660620.js.map} +1 -1
  10. package/build/assets/{FormatterUtils-46f1e8b1.js → FormatterUtils-e8ffca2f.js} +2 -2
  11. package/build/assets/{FormatterUtils-46f1e8b1.js.map → FormatterUtils-e8ffca2f.js.map} +1 -1
  12. package/build/assets/{Grid-c4d472c3.js → Grid-6d872ae3.js} +2 -2
  13. package/build/assets/{Grid-c4d472c3.js.map → Grid-6d872ae3.js.map} +1 -1
  14. package/build/assets/{GridRenderer-c0f86124.js → GridRenderer-bab79eb0.js} +2 -2
  15. package/build/assets/{GridRenderer-c0f86124.js.map → GridRenderer-bab79eb0.js.map} +1 -1
  16. package/build/assets/{IrisGrid-602bab4b.js → IrisGrid-3826a20c.js} +2 -2
  17. package/build/assets/{IrisGrid-602bab4b.js.map → IrisGrid-3826a20c.js.map} +1 -1
  18. package/build/assets/{IrisGridModel-3ab54b37.js → IrisGridModel-e3f09f93.js} +2 -2
  19. package/build/assets/{IrisGridModel-3ab54b37.js.map → IrisGridModel-e3f09f93.js.map} +1 -1
  20. package/build/assets/{IrisGridShortcuts-5dcaf227.js → IrisGridShortcuts-92664e64.js} +2 -2
  21. package/build/assets/{IrisGridShortcuts-5dcaf227.js.map → IrisGridShortcuts-92664e64.js.map} +1 -1
  22. package/build/assets/{IrisGridThemeProvider-700784ee.js → IrisGridThemeProvider-093bbb0e.js} +2 -2
  23. package/build/assets/{IrisGridThemeProvider-700784ee.js.map → IrisGridThemeProvider-093bbb0e.js.map} +1 -1
  24. package/build/assets/{MarkdownEditor-2f118ef9.js → MarkdownEditor-3fa34469.js} +2 -2
  25. package/build/assets/{MarkdownEditor-2f118ef9.js.map → MarkdownEditor-3fa34469.js.map} +1 -1
  26. package/build/assets/{MarkdownNotebook-d4391ec1.js → MarkdownNotebook-af943e95.js} +2 -2
  27. package/build/assets/{MarkdownNotebook-d4391ec1.js.map → MarkdownNotebook-af943e95.js.map} +1 -1
  28. package/build/assets/{MissingPartitionError-b18d0caf.js → MissingPartitionError-57c39972.js} +2 -2
  29. package/build/assets/{MissingPartitionError-b18d0caf.js.map → MissingPartitionError-57c39972.js.map} +1 -1
  30. package/build/assets/{StyleGuideRoot-c2aef5b8.js → StyleGuideRoot-1203faf4.js} +2 -2
  31. package/build/assets/{StyleGuideRoot-c2aef5b8.js.map → StyleGuideRoot-1203faf4.js.map} +1 -1
  32. package/build/assets/{index-7eda1758.js → index-3e91acb7.js} +2 -2
  33. package/build/assets/{index-7eda1758.js.map → index-3e91acb7.js.map} +1 -1
  34. package/build/assets/index-8e66685a.js +9 -0
  35. package/build/assets/index-8e66685a.js.map +1 -0
  36. package/build/assets/index-d02e69c2.js +2 -0
  37. package/build/assets/{index-18214492.js.map → index-d02e69c2.js.map} +1 -1
  38. package/build/assets/{useUser-24b935e9.js → useUser-548657c8.js} +2 -2
  39. package/build/assets/{useUser-24b935e9.js.map → useUser-548657c8.js.map} +1 -1
  40. package/build/index.html +1 -1
  41. package/package.json +30 -30
  42. package/build/assets/Chart-4a3cd464.css +0 -1
  43. package/build/assets/Chart-8723ca27.js +0 -2
  44. package/build/assets/Chart-8723ca27.js.map +0 -1
  45. package/build/assets/ControlType-73c58e54.js.map +0 -1
  46. package/build/assets/index-18214492.js +0 -2
  47. package/build/assets/index-a70beb44.js +0 -9
  48. package/build/assets/index-a70beb44.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import{r as u,K as z,I as e,ax as w,M as he,_ as jr,V as pe,L as S,a7 as W,U as Ze,bc as Mr,az as L,bx as yr,a5 as Pr,a6 as P,a8 as Lr,by as _r,a9 as Br,aa as Ue,ac as Fr,ad as j,a_ as Or,bz as Pe,aZ as K,as as Vr,ab as Ur,aX as Le,ah as wr,ag as f,bA as _e,aP as Gr,aR as Hr,ai as zr,aF as Wr,bB as qr,bC as Kr,bD as Z,bE as Zr,bF as ye,bG as E,aH as Xr,bH as Yr,aO as Be,be as Jr,bI as Qr,bJ as we,Q as eo,a4 as ro}from"./vendor-e4be0cee.js";import{aW as Xe,aX as H,aN as de,a3 as oo,aY as Ge,aZ as He,a_ as Cr,aF as to,a$ as X,b0 as Ye,G as Je,b1 as Qe,I as Fe,b2 as ao,b3 as lo,N as so,b4 as no,b5 as io,aJ as er,b6 as co}from"./index-7eda1758.js";import{W as ho}from"./monaco-b5248072.js";import{f as be,d as Sr,m as Y,B as uo,S as le,L as go,c as Ce,I as mo,R as Tr,a as O}from"./IrisGridModel-3ab54b37.js";import{B as x,u as kr,s as re,q as oe,aZ as $,K as R,an as ve,al as vo,J as rr,cE as or,Q as xo,C as _,b0 as ge,S as xe,aU as po,ao as fo,d as tr,b2 as Nr,A as ar,bz as J,ar as bo,aD as jo,ab as yo,aJ as wo,w as Co}from"./ControlType-73c58e54.js";import{M as lr,l as So,A as To,o as ko,D as No,k as Do,j as Eo,p as Io,V as N,H as ze,T as A,n as Ao,P as me,G as $o}from"./FontBootstrap-c6a5ae22.js";import{G as te,T as Ro}from"./Grid-c4d472c3.js";import{G as Dr,O as I,C as Oe,a as Mo,S as Po,b as ie,P as sr,e as Lo,c as _o}from"./GridRenderer-c0f86124.js";import{a as nr,D as Bo}from"./IrisGridShortcuts-5dcaf227.js";import{N as Fo,T as Oo}from"./useUser-24b935e9.js";import{L as Vo}from"./AppRoot-686447ad.js";import"./helpers-de833af9.js";function ir(a,r,o,t,l,s,n){try{var i=a[s](n),d=i.value}catch(h){o(h);return}i.done?r(d):Promise.resolve(d).then(t,l)}function Se(a){return function(){var r=this,o=arguments;return new Promise(function(t,l){var s=a.apply(r,o);function n(d){ir(s,t,l,n,i,"next",d)}function i(d){ir(s,t,l,n,i,"throw",d)}n(void 0)})}}function F(a,r,o){return r=Uo(r),r in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o,a}function Uo(a){var r=Go(a,"string");return typeof r=="symbol"?r:String(r)}function Go(a,r){if(typeof a!="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var t=o.call(a,r||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(a)}class Ho extends be{constructor(){var{rowCount:r=1e9,columnCount:o=100,floatingTopRowCount:t=0,floatingBottomRowCount:l=0,floatingLeftColumnCount:s=0,floatingRightColumnCount:n=0,isEditable:i=!1,editedData:d=[]}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),F(this,"numRows",void 0),F(this,"numColumns",void 0),F(this,"floatingTop",void 0),F(this,"floatingBottom",void 0),F(this,"floatingLeft",void 0),F(this,"floatingRight",void 0),F(this,"editable",void 0),F(this,"editedData",void 0),this.numRows=r,this.numColumns=o,this.floatingTop=t,this.floatingBottom=l,this.floatingLeft=s,this.floatingRight=n,this.editable=i,this.editedData=d}get rowCount(){return this.numRows}get columnCount(){return this.numColumns}get floatingTopRowCount(){return this.floatingTop}get floatingBottomRowCount(){return this.floatingBottom}get floatingLeftColumnCount(){return this.floatingLeft}get floatingRightColumnCount(){return this.floatingRight}get isEditable(){return this.editable}textForCell(r,o){var t,l;return(t=(l=this.editedData[r])===null||l===void 0?void 0:l[o])!==null&&t!==void 0?t:"".concat(r,",").concat(o)}colorForCell(r,o,t){return t.textColor}textForColumnHeader(r){return"".concat(r)}textForRowHeader(r){return"".concat(r)}textForRowFooter(r){return"".concat(r)}setValueForCell(r,o,t){var l=this;return Se(function*(){l.editedData[r]==null&&(l.editedData[r]=[]),l.editedData[r][o]="".concat(t)})()}setValueForRanges(r,o){var t=this;return Se(function*(){Sr.forEachCell(r,(l,s)=>{t.setValueForCell(l,s,o)})})()}setValues(r){var o=this;return Se(function*(){for(var t=0;t<r.length;t+=1){var l,s,n=r[t];o.setValueForCell((l=n.column)!==null&&l!==void 0?l:n.x,(s=n.row)!==null&&s!==void 0?s:n.y,n.text)}})()}editValueForCell(r,o){return this.textForCell(r,o)}isValidForCell(r,o,t){return!0}isEditableRange(r){return this.isEditable}delete(r){throw new Error("Method not implemented.")}}const We=Ho;function C(a,r,o){return r=zo(r),r in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o,a}function zo(a){var r=Wo(a,"string");return typeof r=="symbol"?r:String(r)}function Wo(a,r){if(typeof a!="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var t=o.call(a,r||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(a)}class D extends We{constructor(){var{rowCount:r=D.DEFAULT_ROW_COUNT,columnCount:o=D.DEFAULT_COLUMN_COUNT,children:t=new Map,childRowCount:l=Math.ceil(Math.max(D.MIN_CHILD_ROW_COUNT,r*D.DEFAULT_CHILD_ROW_COUNT_FACTOR)),maxDepth:s=D.MAX_DEPTH}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super({rowCount:r,columnCount:o}),C(this,"children",void 0),C(this,"childRowCount",void 0),C(this,"maxDepth",void 0),C(this,"getCachedModelRowOffset",Y((n,i)=>{for(var d=null,h=i,c=[...n].sort((y,V)=>y[0]-V[0]),g=0;g<c.length;g+=1){var[m,v]=c[g];if(h<=m)break;var b=v.rowCount;if(h<=m+b){d=m,h=h-m-1;break}h-=b}return{key:d,offsetRow:h}})),C(this,"getCachedTextForRowHeader",Y((n,i)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,i);if(d!=null){var c=n.get(d);if(c!==void 0)return"".concat(d,".").concat(c.textForRowHeader(h))}return"".concat(h)})),C(this,"getCachedTextForCell",Y((n,i,d)=>{var{key:h,offsetRow:c}=this.getCachedModelRowOffset(n,d);if(h!=null){var g=n.get(h);if(g!==void 0)return"".concat(h,".").concat(g.textForCell(i,c))}return"".concat(i,",").concat(c)})),C(this,"getCachedIsRowExpandable",Y((n,i,d)=>{var h=this.getCachedDepthForRow(n,i);return h<d})),C(this,"getCachedIsRowExpanded",Y((n,i)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,i);if(d!=null){var c=n.get(d);if(c!==void 0)return c.isRowExpanded(h)}return n.has(h)})),C(this,"getCachedDepthForRow",Y((n,i)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,i);if(d!=null){var c=n.get(d);if(c!==void 0)return c.depthForRow(h)+1}return 0})),this.children=t,this.childRowCount=l,this.maxDepth=s}textForCell(r,o){return this.getCachedTextForCell(this.children,r,o)}textForRowHeader(r){return this.getCachedTextForRowHeader(this.children,r)}isRowMovable(r){return!1}get hasExpandableRows(){return!0}get isExpandAllAvailable(){return!1}get floatingBottomRowCount(){return 0}isRowExpandable(r){return this.getCachedIsRowExpandable(this.children,r,this.maxDepth)}isRowExpanded(r){return this.getCachedIsRowExpanded(this.children,r)}setRowExpanded(r,o){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,{key:l,offsetRow:s}=this.getCachedModelRowOffset(this.children,r),n=new Map(this.children);if(l!=null){var i=this.children.get(l);if(i!==void 0){var{rowCount:d}=i;i.setRowExpanded(s,o,t),this.numRows+=i.rowCount-d}}else if(o){var c=new D({rowCount:this.childRowCount,columnCount:this.numColumns});n.set(s,c),this.numRows+=c.rowCount}else{var h=n.get(s);h!==void 0&&(this.numRows-=h.rowCount,n.delete(s))}this.children=n}expandAll(){throw new Error("Expand all not implemented.")}collapseAll(){throw new Error("Collapse all not implemented.")}depthForRow(r){return this.getCachedDepthForRow(this.children,r)}}C(D,"DEFAULT_ROW_COUNT",1e9);C(D,"DEFAULT_COLUMN_COUNT",100);C(D,"DEFAULT_CHILD_ROW_COUNT_FACTOR",.01);C(D,"MIN_CHILD_ROW_COUNT",10);C(D,"MAX_DEPTH",10);const qe=D;function Te(a,r,o){return r=qo(r),r in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o,a}function qo(a){var r=Ko(a,"string");return typeof r=="symbol"?r:String(r)}function Ko(a,r){if(typeof a!="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var t=o.call(a,r||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(a)}class Zo extends be{constructor(r,o){var t;super(),Te(this,"data",void 0),Te(this,"columnHeaders",void 0),Te(this,"numberOfColumns",void 0),this.data=r,this.numberOfColumns=Math.max(...r.map(l=>l.length),(t=o?.length)!==null&&t!==void 0?t:0),this.columnHeaders=o}get rowCount(){return this.data.length}get columnCount(){return this.numberOfColumns}textForCell(r,o){var t;return"".concat((t=this.data[o])===null||t===void 0?void 0:t[r])}textForColumnHeader(r){var o,t;return(o=(t=this.columnHeaders)===null||t===void 0?void 0:t[r])!==null&&o!==void 0?o:""}}const Xo=Zo;function ke(a,r,o){return r=Yo(r),r in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o,a}function Yo(a){var r=Jo(a,"string");return typeof r=="symbol"?r:String(r)}function Jo(a,r){if(typeof a!="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var t=o.call(a,r||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(a)}class Qo extends be{constructor(r,o){super(),ke(this,"numberOfColumns",void 0),ke(this,"numberOfRows",void 0),ke(this,"viewportData",void 0),this.numberOfColumns=r,this.numberOfRows=o}get columnCount(){return this.numberOfColumns}get rowCount(){return this.numberOfRows}textForCell(r,o){var t,l,s,n,i,d,h,c=o-((t=(l=this.viewportData)===null||l===void 0?void 0:l.rowOffset)!==null&&t!==void 0?t:0),g=r-((s=(n=this.viewportData)===null||n===void 0?void 0:n.columnOffset)!==null&&s!==void 0?s:0);return"".concat((i=(d=this.viewportData)===null||d===void 0||(h=d.data[c])===null||h===void 0?void 0:h[g])!==null&&i!==void 0?i:"")}textForColumnHeader(r){return"".concat(r)}textForRowHeader(r){return"".concat(r)}}const et=Qo;function T(a,r,o){return r=rt(r),r in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o,a}function rt(a){var r=ot(a,"string");return typeof r=="symbol"?r:String(r)}function ot(a,r){if(typeof a!="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var t=o.call(a,r||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(a)}var tt="proportional",at=Dr.positiveBarColor,lt=Dr.negativeBarColor,st="beside",nt="LTR",it="right";function ct(a){return Array.isArray(a)&&a.every(r=>typeof r=="number")}class dt extends be{constructor(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Map,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Map,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:new Map,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:new Map,n=arguments.length>5&&arguments[5]!==void 0?arguments[5]:new Map,i=arguments.length>6&&arguments[6]!==void 0?arguments[6]:new Map,d=arguments.length>7&&arguments[7]!==void 0?arguments[7]:new Map,h=arguments.length>8&&arguments[8]!==void 0?arguments[8]:new Map;super(),T(this,"numberOfColumns",void 0),T(this,"numberOfRows",void 0),T(this,"data",void 0),T(this,"columnMins",void 0),T(this,"columnMaxs",void 0),T(this,"columnAxes",void 0),T(this,"valuePlacements",void 0),T(this,"directions",void 0),T(this,"positiveColors",void 0),T(this,"negativeColors",void 0),T(this,"opacities",void 0),T(this,"textAlignments",void 0),T(this,"markers",void 0),this.positiveColors=t,this.negativeColors=l,this.data=r,this.columnAxes=o,this.valuePlacements=s,this.opacities=n,this.directions=i,this.textAlignments=d,this.markers=h,this.numberOfRows=Math.max(...r.map(m=>m.length)),this.numberOfColumns=r.length,this.columnMins=new Map,this.columnMaxs=new Map;for(var c=0;c<r.length;c+=1){var g=r[c];ct(g)&&(this.columnMins.set(c,Math.min(...g)),this.columnMaxs.set(c,Math.max(...g)))}}get rowCount(){return this.numberOfRows}get columnCount(){return this.numberOfColumns}textForCell(r,o){var t;return"".concat((t=this.data[r])===null||t===void 0?void 0:t[o])}textForColumnHeader(r){return"".concat(r)}textAlignForCell(r,o){var t;return(t=this.textAlignments.get(r))!==null&&t!==void 0?t:it}renderTypeForCell(r,o){return r<20||r%2===o%2?"dataBar":"text"}dataBarOptionsForCell(r,o){var t,l,s,n,i,d,h,c=Xe(this.columnMins,r),g=Xe(this.columnMaxs,r),m=(t=this.columnAxes.get(r))!==null&&t!==void 0?t:tt,v=(l=this.valuePlacements.get(r))!==null&&l!==void 0?l:st,b=this.opacities.get(r);b==null||b>1?b=1:b<0&&(b=0);var y=(s=this.directions.get(r))!==null&&s!==void 0?s:nt,V=(n=this.positiveColors.get(r))!==null&&n!==void 0?n:at,ae=(i=this.negativeColors.get(r))!==null&&i!==void 0?i:lt,U=Number((d=this.data[r])===null||d===void 0?void 0:d[o]),q=U>=0?V:ae,je=(h=this.markers.get(r))!==null&&h!==void 0?h:[];return{columnMin:c,columnMax:g,axis:m,color:q,valuePlacement:v,opacity:b,markers:je,direction:y,value:U}}}const ht=dt,Ne="hide-from-e2e-tests",cr="sample-section";function*Er(a=1){for(;;)a=a*16807%2147483647,yield a/2147483647}function ut(a=1){const[r]=u.useState(()=>Er(a));return u.useCallback(()=>{const o=r.next();if(o.done===!0)throw new Error("Random number generator unexpectedly finished");return o.value},[r])}function p(a,r=[]){const o=`${cr}-${a.toLocaleLowerCase().replaceAll(" ","-")}`,t=z(cr,...r);return{id:o,className:t}}function k(a,r=[]){const{id:o,className:t}=p(a,r);return{id:o,UNSAFE_className:t}}function M(){}class ee extends u.Component{static renderButtonBrand(r,o){const t=r.length?`btn-${r}-${o}`:`btn-${o}`;return e.jsx(uo,{className:t,style:{marginBottom:"1rem",marginRight:"1rem"},children:o},o)}static renderButtons(r){const o=["primary","secondary","success","warning","danger","info"].map(t=>ee.renderButtonBrand(r,t));return e.jsxs("div",{...p(`buttons-${r.length?"outline":"regular"}`),children:[e.jsx("h5",{children:r.length?"Outline":"Regular"}),o]},r)}static renderLinks(){const r={primary:"accent",secondary:"neutral",success:"positive",info:"info",warning:"notice",danger:"negative"};return e.jsxs("div",{...p("links"),style:{paddingTop:"1rem"},children:[e.jsx("h5",{children:"Links"}),e.jsx(w,{gap:"1rem",children:Object.entries(r).map(([o,t])=>e.jsxs("a",{className:`text-${o}`,children:[o," (",t,")"]},o))})]})}static renderSocketedButtons(){return e.jsxs("div",{...p("buttons-socketed"),children:[e.jsx("h5",{children:"Socketed Buttons (for linker)"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},onClick:M,children:"Unlinked"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,onClick:M,children:"Linked"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinkedSource:!0,onClick:M,children:"Linked Source"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,isInvalid:!0,onClick:M,children:"Error"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},disabled:!0,onClick:M,children:"Disabled"})]})}constructor(r){super(r),this.state={toggle:!0}}renderInlineButtons(){const{toggle:r}=this.state;return e.jsxs("div",{...p("buttons-inline"),style:{padding:"1rem 0"},children:[e.jsx("h5",{children:"Inline Buttons"}),"Regular btn-inline:",e.jsx(x,{className:"mx-2",kind:"inline",icon:H,tooltip:"test",onClick:M}),"Toggle button (class active):",e.jsx(x,{className:"mx-2",onClick:()=>{this.setState({toggle:!r})},active:r,kind:"inline",icon:H,tooltip:"test"}),"Disabled:",e.jsx(x,{className:"mx-2",kind:"inline",disabled:!0,onClick:M,children:"Disabled"}),"With Text:",e.jsx(x,{className:"mx-2",kind:"inline",icon:H,onClick:M,children:e.jsx("span",{children:"Text Button"})}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("span",{children:"btn-link-icon (no text):"}),e.jsx(x,{kind:"ghost",icon:H,tooltip:"test",onClick:M}),e.jsx("span",{className:"mx-2",children:"btn-link:"}),e.jsx(x,{kind:"ghost",onClick:M,children:"Text Button"}),e.jsx("span",{className:"mx-2",children:"btn-link (text w/ optional with icon):"}),e.jsx(x,{kind:"ghost",icon:H,onClick:M,children:"Text Button"})]})}render(){const r=["","outline"].map(s=>ee.renderButtons(s)),o=this.renderInlineButtons(),t=ee.renderSocketedButtons(),l=ee.renderLinks();return e.jsxs("div",{children:[e.jsx("h2",{className:"ui-title",children:"Buttons"}),e.jsxs("div",{style:{padding:"1rem 0"},children:[r,o,t,l]})]})}}function gt(){const a=kr();lr.random=ut();const[r]=u.useState(()=>new lr(a));return e.jsxs("div",{...p("charts"),children:[e.jsx("h2",{className:"ui-title",children:"Chart"}),e.jsx("div",{style:{height:500},children:e.jsx(go,{model:r})})]})}const Ve="2px solid var(--dh-color-notice-bg)",mt={"--dh-color-black":"gray","--dh-color-white":"gray","--dh-color-border":"General","--dh-color-bg":"General","--dh-color-surface-bg":"General","--dh-color-fg":"General","--dh-color-content-bg":"General","--dh-color-subdued-content-bg":"General","--dh-color-dropshadow":"General","--dh-color-keyboard-selected-bg":"Misc","--dh-color-hover-border":"Misc","--dh-color-visual-positive":"Visual Status","--dh-color-visual-negative":"Visual Status","--dh-color-visual-notice":"Visual Status","--dh-color-visual-info":"Visual Status","--dh-color-gray-bg":"Default Background","--dh-color-red-bg":"Default Background","--dh-color-orange-bg":"Default Background","--dh-color-yellow-bg":"Default Background","--dh-color-chartreuse-bg":"Default Background","--dh-color-celery-bg":"Default Background","--dh-color-green-bg":"Default Background","--dh-color-seafoam-bg":"Default Background","--dh-color-cyan-bg":"Default Background","--dh-color-blue-bg":"Default Background","--dh-color-indigo-bg":"Default Background","--dh-color-purple-bg":"Default Background","--dh-color-fuchsia-bg":"Default Background","--dh-color-magenta-bg":"Default Background","--dh-color-editor-bg":"editor","--dh-color-editor-fg":"editor","--dh-color-editor-context-menu-bg":"menus","--dh-color-editor-context-menu-fg":"menus","--dh-color-editor-menu-selection-bg":"menus","--dh-color-grid-bg":"grid","--dh-color-grid-number-positive":"Data Types","--dh-color-grid-number-negative":"Data Types","--dh-color-grid-number-zero":"Data Types","--dh-color-grid-date":"Data Types","--dh-color-grid-string-null":"Data Types"},dr={"--dh-color-black":"","--dh-color-action-active-bg":"Action.active","--dh-color-action-down-bg":"Action:active","--dh-color-action-hover-bg":"Action:hover","--dh-color-action-active-hover-bg":"Action.active:hover","--dh-color-action-disabled-bg":"Action:disabled"},vt={palette:{black:"gray",white:"gray"},editor:{line:"editor",comment:"code",string:"code",number:"code",delimiter:"code",identifier:"code",keyword:"code",operator:"code",storage:"code",predefined:"code",selection:"state",focus:"state"},chart:{axis:"Chart",bg:"Chart",grid:"Chart",plot:"Chart",title:"Chart",active:"Data",trend:"Data",area:"Data",range:"Data",line:"Deprecated"},grid:{data:"Data Bars",context:"Context Menu"},semantic:{},component:{}};function ce(a){const r=de.parseRgba(de.asRgbOrRgbaString(a)??"");if(r==null||r.a<.5)return"white";const{r:o,g:t,b:l}=r;return de.getBrightness([o,t,l])>=128?"black":"white"}function xt(a){const r=getComputedStyle(document.documentElement);return a.split(/[\n;]/g).map(t=>/^(?:\s{2}|:root\{)?(--dh-color-(?:[^:]+))/.exec(t)?.[1]).filter(t=>!!t).map(t=>{const l=r.getPropertyValue(t);return t==="--dh-color-chart-colorway"?oo(l??"").map(([n,i])=>l.substring(n,i+1)).map((n,i)=>({name:`${t}-${i}`,value:n})):{name:t,value:l}}).flat()}function Q(a,r,o,t=mt){const l=vt[a];return xt(r).reduce((i,{name:d,value:h})=>{if(/^--dh-color-true-(.*?)$/.test(d)||/^--dh-color-gray-(light|mid|dark)$/.test(d))return i;const c=/^--dh-color-([^-]+)(?:-([^-]+))?/.exec(d);let g=t[d]??c?.[o]??c?.[1]??"???";return g=l[g]??g,i[g]==null&&(i[g]=[]),d in dr&&i[g].push({isLabel:!0,name:dr[d],value:""}),/^--dh-color-gray-(light|mid|dark)$/.test(d)||i[g].push({name:d,value:h}),i},{})}function pt(){const a=u.useRef(null);return u.useLayoutEffect(()=>{if(a.current==null)return;const r=getComputedStyle(a.current),{backgroundColor:o}=r;a.current.style.color=ce(o)},[]),a}function ft(a,r){const[o,t]=u.useState();return u.useEffect(()=>{if(a.current==null)return;const l=getComputedStyle(a.current,r).getPropertyValue("content"),s=/"(--dh-color-.*?)[,"]/.exec(l)?.[1];if(s==null)return;const n=getComputedStyle(a.current).getPropertyValue(s);t(n)},[a,r]),o}function De({className:a,children:r}){const o=pt(),t=ft(o,":after"),l=u.useMemo(()=>t!=null?{value:t}:null,[t]),s=l!=null&&l.value!=="";return e.jsxs("div",{ref:o,className:a,style:{border:s?void 0:Ve},children:[s&&e.jsx(re,{interactive:!0,children:e.jsx("div",{children:l.value})}),r]})}function bt(){const a=["100","200","300","400","500","600","700","800","850","8XX","900"].map(t=>e.jsx(De,{className:z("swatch","gray-swatch",`gray-swatch-${t}`),children:t==="8XX"?"N/A":`Gray-${t}`},t)),r=["red","orange","yellow","green","blue","purple","white","black"].map(t=>e.jsx(De,{className:z("swatch",`swatch-${t}`),children:t},t)),o=["content-bg","background","foreground","primary","primary-dark","secondary","secondary-hover","success","info","warning","danger","danger-hover"].map(t=>e.jsx(De,{className:z("swatch",`swatch-${t}`),children:t},t));return e.jsxs("div",{...p("colors"),children:[e.jsx("h2",{className:"ui-title",children:"Colors"}),e.jsxs("div",{className:"row",children:[e.jsxs("div",{className:"col",children:[a,r]}),e.jsx("div",{className:"col",children:o}),e.jsx("div",{className:"col",children:e.jsx("p",{children:"This section is for legacy reference only. Use the css variable based semantic colors in the following sections. You should not be using colors defined in the theme color palette directly."})})]})]})}class jt extends u.Component{constructor(r){super(r),this.makeContextMenuItems=this.makeContextMenuItems.bind(this)}makeContextMenuItems(r){const o=r!==void 0?` ${r}`:"";return[{title:`Show Alert${o}`,icon:Ge,action:()=>{alert(`Alert${o}!`)},shortcut:new oe({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[$.CTRL,R.A],macShortcut:[$.CMD,R.A]})},{title:`Log Message${o}`,icon:He,action:()=>{console.log(`Logging a message${o}!`)},shortcut:new oe({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[$.CTRL,R.L],macShortcut:[$.CMD,R.L]})},{title:"Sub-menu",actions:()=>this.makeContextMenuItems((r??0)+1),order:3}].concat(new Array(10).fill({title:`Disabled Option${o}`,disabled:!0,order:2}))}render(){const r=this.makeContextMenuItems(),t=[{title:"Show Shortcuts",icon:Cr,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new oe({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[$.CTRL,R.SLASH],macShortcut:[$.CMD,R.SLASH]}),group:ve.groups.global}].concat(r),l=()=>new Promise(s=>{setTimeout(()=>{s(r)},3e3)});return e.jsxs("div",{...p("context-menus"),children:[e.jsx("h2",{className:"ui-title",children:"Context Menu"}),e.jsxs(x,{kind:"primary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(ve,{actions:t})]}),e.jsxs(x,{kind:"tertiary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(ve,{actions:l})]})]})}}class yt extends u.Component{constructor(r){super(r),this.sampleInput=he.createRef(),this.handleUpdateCheckboxMap=this.handleUpdateCheckboxMap.bind(this);const o=["Parent A",new Map([["Child 1",!0],["Child 2",!1]])],t=["Parent B",new Map([["Child 3",!0],["Child 4",!1],["Child 5",!0],["Child 6",!1]])],l=["Leaf Parent",!0];this.state={isShown:!1,checkBoxMap:new Map([o,t,l])}}handleUpdateCheckboxMap(r){this.setState({checkBoxMap:r})}renderChild(){return e.jsxs("div",{className:"p-3",children:[e.jsx("h4",{children:"Sample Child"}),e.jsxs("div",{className:"form-group",children:[e.jsxs("label",{htmlFor:"exampleInput1",children:["Input Label",e.jsx("input",{ref:this.sampleInput,type:"text",className:"form-control",id:"exampleInput1","aria-describedby":"emailHelp",placeholder:"Input Placeholder"})]}),e.jsx("small",{className:"form-text text-muted",children:"Help text for a form input"})]})]})}render(){const{isShown:r,checkBoxMap:o}=this.state;return e.jsxs("div",{...p("dialog"),children:[e.jsx("h2",{className:"ui-title",children:"Popover Dialog"}),e.jsx("p",{children:"Popover dialog that can contain interactive elements, can be set to self close on blur."}),e.jsxs(x,{kind:"primary",style:{marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{r?this.setState({isShown:!1}):this.setState({isShown:!0})},children:["Open Dialog",e.jsx(vo,{options:{placement:"bottom"},isShown:r,onEntered:()=>{this.sampleInput.current&&this.sampleInput.current.focus()},onExited:()=>{this.setState({isShown:!1})},closeOnBlur:!0,interactive:!0,children:this.renderChild()})]}),e.jsx("p",{children:"The Hierarchical Checkbox Menu uses a popover dialog to display hierarchical groups of checkboxes."}),e.jsx(So,{menuText:"Checkbox Menu",valueMap:o,onUpdateValueMap:this.handleUpdateCheckboxMap})]})}}class wt extends u.Component{constructor(r){super(r),this.state={isShown:!1}}render(){const r=[{title:"Show Alert",icon:Ge,action:()=>{alert("Alert!")},shortcut:new oe({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[$.CTRL,R.A],macShortcut:[$.CMD,R.A]})},{title:"Log Message",icon:He,action:()=>{console.log("Logging a message!")},shortcut:new oe({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[$.CTRL,R.L],macShortcut:[$.CMD,R.L]})}],t=[{title:"Show Shortcuts",icon:Cr,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new oe({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[$.CTRL,R.SLASH],macShortcut:[$.CMD,R.SLASH]}),group:ve.groups.global}].concat(r),{isShown:l}=this.state;return e.jsxs("div",{...p("dropdown-menus"),children:[e.jsx("h2",{className:"ui-title",children:"Dropdown Menu"}),e.jsx("p",{children:"A simple dropdown menu of actions, can open on click of parent container, or controlled by prop."}),e.jsx(x,{kind:"inline",className:"mx-2",icon:to,onClick:()=>{},children:e.jsx(rr,{actions:t})}),e.jsxs(x,{kind:"primary",style:{marginRight:"1rem",minWidth:"165px"},onClick:()=>{l?this.setState({isShown:!1}):this.setState({isShown:!0})},children:["Menu Shown: ",l.toString()]}),e.jsxs("div",{ref:this.button,className:"btn btn-secondary disabled",style:{marginRight:"1rem"},children:["Shown using isShown",e.jsx(rr,{isShown:l,onMenuClosed:()=>{this.setState({isShown:!1})},actions:t})]})]})}}const Ct=`trades = db.t("LearnDeephaven", "StockTrades").where("Date=\`2017-08-25\`")\\
1
+ import{r as u,K as z,I as e,ax as w,M as he,_ as jr,V as pe,L as S,a7 as W,U as Ze,bc as Mr,az as L,bx as yr,a5 as Pr,a6 as P,a8 as Lr,by as _r,a9 as Br,aa as Ue,ac as Fr,ad as j,a_ as Or,bz as Pe,aZ as K,as as Vr,ab as Ur,aX as Le,ah as wr,ag as f,bA as _e,aP as Gr,aR as Hr,ai as zr,aF as Wr,bB as qr,bC as Kr,bD as Z,bE as Zr,bF as ye,bG as E,aH as Xr,bH as Yr,aO as Be,be as Jr,bI as Qr,bJ as we,Q as eo,a4 as ro}from"./vendor-e4be0cee.js";import{aW as Xe,aX as H,aN as de,a3 as oo,aY as Ge,aZ as He,a_ as Cr,aF as to,a$ as X,b0 as Ye,G as Je,b1 as Qe,I as Fe,b2 as ao,b3 as lo,N as so,b4 as no,b5 as io,aJ as er,b6 as co}from"./index-3e91acb7.js";import{W as ho}from"./monaco-b5248072.js";import{f as be,d as Sr,m as Y,B as uo,S as le,L as go,c as Ce,I as mo,R as Tr,a as O}from"./IrisGridModel-e3f09f93.js";import{B as x,u as kr,s as re,q as oe,aZ as $,K as R,an as ve,al as vo,J as rr,cE as or,Q as xo,C as _,b0 as ge,S as xe,aU as po,ao as fo,d as tr,b2 as Nr,A as ar,bz as J,ar as bo,aD as jo,ab as yo,aJ as wo,w as Co}from"./ControlType-415a9903.js";import{M as lr,l as So,A as To,o as ko,D as No,k as Do,j as Eo,p as Io,V as N,H as ze,T as A,n as Ao,P as me,G as $o}from"./FontBootstrap-25660620.js";import{G as te,T as Ro}from"./Grid-6d872ae3.js";import{G as Dr,O as I,C as Oe,a as Mo,S as Po,b as ie,P as sr,e as Lo,c as _o}from"./GridRenderer-bab79eb0.js";import{a as nr,D as Bo}from"./IrisGridShortcuts-92664e64.js";import{N as Fo,T as Oo}from"./useUser-548657c8.js";import{L as Vo}from"./AppRoot-11e1f33c.js";import"./helpers-de833af9.js";function ir(a,r,o,t,l,s,n){try{var i=a[s](n),d=i.value}catch(h){o(h);return}i.done?r(d):Promise.resolve(d).then(t,l)}function Se(a){return function(){var r=this,o=arguments;return new Promise(function(t,l){var s=a.apply(r,o);function n(d){ir(s,t,l,n,i,"next",d)}function i(d){ir(s,t,l,n,i,"throw",d)}n(void 0)})}}function F(a,r,o){return r=Uo(r),r in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o,a}function Uo(a){var r=Go(a,"string");return typeof r=="symbol"?r:String(r)}function Go(a,r){if(typeof a!="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var t=o.call(a,r||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(a)}class Ho extends be{constructor(){var{rowCount:r=1e9,columnCount:o=100,floatingTopRowCount:t=0,floatingBottomRowCount:l=0,floatingLeftColumnCount:s=0,floatingRightColumnCount:n=0,isEditable:i=!1,editedData:d=[]}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),F(this,"numRows",void 0),F(this,"numColumns",void 0),F(this,"floatingTop",void 0),F(this,"floatingBottom",void 0),F(this,"floatingLeft",void 0),F(this,"floatingRight",void 0),F(this,"editable",void 0),F(this,"editedData",void 0),this.numRows=r,this.numColumns=o,this.floatingTop=t,this.floatingBottom=l,this.floatingLeft=s,this.floatingRight=n,this.editable=i,this.editedData=d}get rowCount(){return this.numRows}get columnCount(){return this.numColumns}get floatingTopRowCount(){return this.floatingTop}get floatingBottomRowCount(){return this.floatingBottom}get floatingLeftColumnCount(){return this.floatingLeft}get floatingRightColumnCount(){return this.floatingRight}get isEditable(){return this.editable}textForCell(r,o){var t,l;return(t=(l=this.editedData[r])===null||l===void 0?void 0:l[o])!==null&&t!==void 0?t:"".concat(r,",").concat(o)}colorForCell(r,o,t){return t.textColor}textForColumnHeader(r){return"".concat(r)}textForRowHeader(r){return"".concat(r)}textForRowFooter(r){return"".concat(r)}setValueForCell(r,o,t){var l=this;return Se(function*(){l.editedData[r]==null&&(l.editedData[r]=[]),l.editedData[r][o]="".concat(t)})()}setValueForRanges(r,o){var t=this;return Se(function*(){Sr.forEachCell(r,(l,s)=>{t.setValueForCell(l,s,o)})})()}setValues(r){var o=this;return Se(function*(){for(var t=0;t<r.length;t+=1){var l,s,n=r[t];o.setValueForCell((l=n.column)!==null&&l!==void 0?l:n.x,(s=n.row)!==null&&s!==void 0?s:n.y,n.text)}})()}editValueForCell(r,o){return this.textForCell(r,o)}isValidForCell(r,o,t){return!0}isEditableRange(r){return this.isEditable}delete(r){throw new Error("Method not implemented.")}}const We=Ho;function C(a,r,o){return r=zo(r),r in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o,a}function zo(a){var r=Wo(a,"string");return typeof r=="symbol"?r:String(r)}function Wo(a,r){if(typeof a!="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var t=o.call(a,r||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(a)}class D extends We{constructor(){var{rowCount:r=D.DEFAULT_ROW_COUNT,columnCount:o=D.DEFAULT_COLUMN_COUNT,children:t=new Map,childRowCount:l=Math.ceil(Math.max(D.MIN_CHILD_ROW_COUNT,r*D.DEFAULT_CHILD_ROW_COUNT_FACTOR)),maxDepth:s=D.MAX_DEPTH}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super({rowCount:r,columnCount:o}),C(this,"children",void 0),C(this,"childRowCount",void 0),C(this,"maxDepth",void 0),C(this,"getCachedModelRowOffset",Y((n,i)=>{for(var d=null,h=i,c=[...n].sort((y,V)=>y[0]-V[0]),g=0;g<c.length;g+=1){var[m,v]=c[g];if(h<=m)break;var b=v.rowCount;if(h<=m+b){d=m,h=h-m-1;break}h-=b}return{key:d,offsetRow:h}})),C(this,"getCachedTextForRowHeader",Y((n,i)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,i);if(d!=null){var c=n.get(d);if(c!==void 0)return"".concat(d,".").concat(c.textForRowHeader(h))}return"".concat(h)})),C(this,"getCachedTextForCell",Y((n,i,d)=>{var{key:h,offsetRow:c}=this.getCachedModelRowOffset(n,d);if(h!=null){var g=n.get(h);if(g!==void 0)return"".concat(h,".").concat(g.textForCell(i,c))}return"".concat(i,",").concat(c)})),C(this,"getCachedIsRowExpandable",Y((n,i,d)=>{var h=this.getCachedDepthForRow(n,i);return h<d})),C(this,"getCachedIsRowExpanded",Y((n,i)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,i);if(d!=null){var c=n.get(d);if(c!==void 0)return c.isRowExpanded(h)}return n.has(h)})),C(this,"getCachedDepthForRow",Y((n,i)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,i);if(d!=null){var c=n.get(d);if(c!==void 0)return c.depthForRow(h)+1}return 0})),this.children=t,this.childRowCount=l,this.maxDepth=s}textForCell(r,o){return this.getCachedTextForCell(this.children,r,o)}textForRowHeader(r){return this.getCachedTextForRowHeader(this.children,r)}isRowMovable(r){return!1}get hasExpandableRows(){return!0}get isExpandAllAvailable(){return!1}get floatingBottomRowCount(){return 0}isRowExpandable(r){return this.getCachedIsRowExpandable(this.children,r,this.maxDepth)}isRowExpanded(r){return this.getCachedIsRowExpanded(this.children,r)}setRowExpanded(r,o){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,{key:l,offsetRow:s}=this.getCachedModelRowOffset(this.children,r),n=new Map(this.children);if(l!=null){var i=this.children.get(l);if(i!==void 0){var{rowCount:d}=i;i.setRowExpanded(s,o,t),this.numRows+=i.rowCount-d}}else if(o){var c=new D({rowCount:this.childRowCount,columnCount:this.numColumns});n.set(s,c),this.numRows+=c.rowCount}else{var h=n.get(s);h!==void 0&&(this.numRows-=h.rowCount,n.delete(s))}this.children=n}expandAll(){throw new Error("Expand all not implemented.")}collapseAll(){throw new Error("Collapse all not implemented.")}depthForRow(r){return this.getCachedDepthForRow(this.children,r)}}C(D,"DEFAULT_ROW_COUNT",1e9);C(D,"DEFAULT_COLUMN_COUNT",100);C(D,"DEFAULT_CHILD_ROW_COUNT_FACTOR",.01);C(D,"MIN_CHILD_ROW_COUNT",10);C(D,"MAX_DEPTH",10);const qe=D;function Te(a,r,o){return r=qo(r),r in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o,a}function qo(a){var r=Ko(a,"string");return typeof r=="symbol"?r:String(r)}function Ko(a,r){if(typeof a!="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var t=o.call(a,r||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(a)}class Zo extends be{constructor(r,o){var t;super(),Te(this,"data",void 0),Te(this,"columnHeaders",void 0),Te(this,"numberOfColumns",void 0),this.data=r,this.numberOfColumns=Math.max(...r.map(l=>l.length),(t=o?.length)!==null&&t!==void 0?t:0),this.columnHeaders=o}get rowCount(){return this.data.length}get columnCount(){return this.numberOfColumns}textForCell(r,o){var t;return"".concat((t=this.data[o])===null||t===void 0?void 0:t[r])}textForColumnHeader(r){var o,t;return(o=(t=this.columnHeaders)===null||t===void 0?void 0:t[r])!==null&&o!==void 0?o:""}}const Xo=Zo;function ke(a,r,o){return r=Yo(r),r in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o,a}function Yo(a){var r=Jo(a,"string");return typeof r=="symbol"?r:String(r)}function Jo(a,r){if(typeof a!="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var t=o.call(a,r||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(a)}class Qo extends be{constructor(r,o){super(),ke(this,"numberOfColumns",void 0),ke(this,"numberOfRows",void 0),ke(this,"viewportData",void 0),this.numberOfColumns=r,this.numberOfRows=o}get columnCount(){return this.numberOfColumns}get rowCount(){return this.numberOfRows}textForCell(r,o){var t,l,s,n,i,d,h,c=o-((t=(l=this.viewportData)===null||l===void 0?void 0:l.rowOffset)!==null&&t!==void 0?t:0),g=r-((s=(n=this.viewportData)===null||n===void 0?void 0:n.columnOffset)!==null&&s!==void 0?s:0);return"".concat((i=(d=this.viewportData)===null||d===void 0||(h=d.data[c])===null||h===void 0?void 0:h[g])!==null&&i!==void 0?i:"")}textForColumnHeader(r){return"".concat(r)}textForRowHeader(r){return"".concat(r)}}const et=Qo;function T(a,r,o){return r=rt(r),r in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o,a}function rt(a){var r=ot(a,"string");return typeof r=="symbol"?r:String(r)}function ot(a,r){if(typeof a!="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var t=o.call(a,r||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(a)}var tt="proportional",at=Dr.positiveBarColor,lt=Dr.negativeBarColor,st="beside",nt="LTR",it="right";function ct(a){return Array.isArray(a)&&a.every(r=>typeof r=="number")}class dt extends be{constructor(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Map,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Map,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:new Map,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:new Map,n=arguments.length>5&&arguments[5]!==void 0?arguments[5]:new Map,i=arguments.length>6&&arguments[6]!==void 0?arguments[6]:new Map,d=arguments.length>7&&arguments[7]!==void 0?arguments[7]:new Map,h=arguments.length>8&&arguments[8]!==void 0?arguments[8]:new Map;super(),T(this,"numberOfColumns",void 0),T(this,"numberOfRows",void 0),T(this,"data",void 0),T(this,"columnMins",void 0),T(this,"columnMaxs",void 0),T(this,"columnAxes",void 0),T(this,"valuePlacements",void 0),T(this,"directions",void 0),T(this,"positiveColors",void 0),T(this,"negativeColors",void 0),T(this,"opacities",void 0),T(this,"textAlignments",void 0),T(this,"markers",void 0),this.positiveColors=t,this.negativeColors=l,this.data=r,this.columnAxes=o,this.valuePlacements=s,this.opacities=n,this.directions=i,this.textAlignments=d,this.markers=h,this.numberOfRows=Math.max(...r.map(m=>m.length)),this.numberOfColumns=r.length,this.columnMins=new Map,this.columnMaxs=new Map;for(var c=0;c<r.length;c+=1){var g=r[c];ct(g)&&(this.columnMins.set(c,Math.min(...g)),this.columnMaxs.set(c,Math.max(...g)))}}get rowCount(){return this.numberOfRows}get columnCount(){return this.numberOfColumns}textForCell(r,o){var t;return"".concat((t=this.data[r])===null||t===void 0?void 0:t[o])}textForColumnHeader(r){return"".concat(r)}textAlignForCell(r,o){var t;return(t=this.textAlignments.get(r))!==null&&t!==void 0?t:it}renderTypeForCell(r,o){return r<20||r%2===o%2?"dataBar":"text"}dataBarOptionsForCell(r,o){var t,l,s,n,i,d,h,c=Xe(this.columnMins,r),g=Xe(this.columnMaxs,r),m=(t=this.columnAxes.get(r))!==null&&t!==void 0?t:tt,v=(l=this.valuePlacements.get(r))!==null&&l!==void 0?l:st,b=this.opacities.get(r);b==null||b>1?b=1:b<0&&(b=0);var y=(s=this.directions.get(r))!==null&&s!==void 0?s:nt,V=(n=this.positiveColors.get(r))!==null&&n!==void 0?n:at,ae=(i=this.negativeColors.get(r))!==null&&i!==void 0?i:lt,U=Number((d=this.data[r])===null||d===void 0?void 0:d[o]),q=U>=0?V:ae,je=(h=this.markers.get(r))!==null&&h!==void 0?h:[];return{columnMin:c,columnMax:g,axis:m,color:q,valuePlacement:v,opacity:b,markers:je,direction:y,value:U}}}const ht=dt,Ne="hide-from-e2e-tests",cr="sample-section";function*Er(a=1){for(;;)a=a*16807%2147483647,yield a/2147483647}function ut(a=1){const[r]=u.useState(()=>Er(a));return u.useCallback(()=>{const o=r.next();if(o.done===!0)throw new Error("Random number generator unexpectedly finished");return o.value},[r])}function p(a,r=[]){const o=`${cr}-${a.toLocaleLowerCase().replaceAll(" ","-")}`,t=z(cr,...r);return{id:o,className:t}}function k(a,r=[]){const{id:o,className:t}=p(a,r);return{id:o,UNSAFE_className:t}}function M(){}class ee extends u.Component{static renderButtonBrand(r,o){const t=r.length?`btn-${r}-${o}`:`btn-${o}`;return e.jsx(uo,{className:t,style:{marginBottom:"1rem",marginRight:"1rem"},children:o},o)}static renderButtons(r){const o=["primary","secondary","success","warning","danger","info"].map(t=>ee.renderButtonBrand(r,t));return e.jsxs("div",{...p(`buttons-${r.length?"outline":"regular"}`),children:[e.jsx("h5",{children:r.length?"Outline":"Regular"}),o]},r)}static renderLinks(){const r={primary:"accent",secondary:"neutral",success:"positive",info:"info",warning:"notice",danger:"negative"};return e.jsxs("div",{...p("links"),style:{paddingTop:"1rem"},children:[e.jsx("h5",{children:"Links"}),e.jsx(w,{gap:"1rem",children:Object.entries(r).map(([o,t])=>e.jsxs("a",{className:`text-${o}`,children:[o," (",t,")"]},o))})]})}static renderSocketedButtons(){return e.jsxs("div",{...p("buttons-socketed"),children:[e.jsx("h5",{children:"Socketed Buttons (for linker)"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},onClick:M,children:"Unlinked"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,onClick:M,children:"Linked"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinkedSource:!0,onClick:M,children:"Linked Source"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,isInvalid:!0,onClick:M,children:"Error"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},disabled:!0,onClick:M,children:"Disabled"})]})}constructor(r){super(r),this.state={toggle:!0}}renderInlineButtons(){const{toggle:r}=this.state;return e.jsxs("div",{...p("buttons-inline"),style:{padding:"1rem 0"},children:[e.jsx("h5",{children:"Inline Buttons"}),"Regular btn-inline:",e.jsx(x,{className:"mx-2",kind:"inline",icon:H,tooltip:"test",onClick:M}),"Toggle button (class active):",e.jsx(x,{className:"mx-2",onClick:()=>{this.setState({toggle:!r})},active:r,kind:"inline",icon:H,tooltip:"test"}),"Disabled:",e.jsx(x,{className:"mx-2",kind:"inline",disabled:!0,onClick:M,children:"Disabled"}),"With Text:",e.jsx(x,{className:"mx-2",kind:"inline",icon:H,onClick:M,children:e.jsx("span",{children:"Text Button"})}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("span",{children:"btn-link-icon (no text):"}),e.jsx(x,{kind:"ghost",icon:H,tooltip:"test",onClick:M}),e.jsx("span",{className:"mx-2",children:"btn-link:"}),e.jsx(x,{kind:"ghost",onClick:M,children:"Text Button"}),e.jsx("span",{className:"mx-2",children:"btn-link (text w/ optional with icon):"}),e.jsx(x,{kind:"ghost",icon:H,onClick:M,children:"Text Button"})]})}render(){const r=["","outline"].map(s=>ee.renderButtons(s)),o=this.renderInlineButtons(),t=ee.renderSocketedButtons(),l=ee.renderLinks();return e.jsxs("div",{children:[e.jsx("h2",{className:"ui-title",children:"Buttons"}),e.jsxs("div",{style:{padding:"1rem 0"},children:[r,o,t,l]})]})}}function gt(){const a=kr();lr.random=ut();const[r]=u.useState(()=>new lr(a));return e.jsxs("div",{...p("charts"),children:[e.jsx("h2",{className:"ui-title",children:"Chart"}),e.jsx("div",{style:{height:500},children:e.jsx(go,{model:r})})]})}const Ve="2px solid var(--dh-color-notice-bg)",mt={"--dh-color-black":"gray","--dh-color-white":"gray","--dh-color-border":"General","--dh-color-bg":"General","--dh-color-surface-bg":"General","--dh-color-fg":"General","--dh-color-content-bg":"General","--dh-color-subdued-content-bg":"General","--dh-color-dropshadow":"General","--dh-color-keyboard-selected-bg":"Misc","--dh-color-hover-border":"Misc","--dh-color-visual-positive":"Visual Status","--dh-color-visual-negative":"Visual Status","--dh-color-visual-notice":"Visual Status","--dh-color-visual-info":"Visual Status","--dh-color-gray-bg":"Default Background","--dh-color-red-bg":"Default Background","--dh-color-orange-bg":"Default Background","--dh-color-yellow-bg":"Default Background","--dh-color-chartreuse-bg":"Default Background","--dh-color-celery-bg":"Default Background","--dh-color-green-bg":"Default Background","--dh-color-seafoam-bg":"Default Background","--dh-color-cyan-bg":"Default Background","--dh-color-blue-bg":"Default Background","--dh-color-indigo-bg":"Default Background","--dh-color-purple-bg":"Default Background","--dh-color-fuchsia-bg":"Default Background","--dh-color-magenta-bg":"Default Background","--dh-color-editor-bg":"editor","--dh-color-editor-fg":"editor","--dh-color-editor-context-menu-bg":"menus","--dh-color-editor-context-menu-fg":"menus","--dh-color-editor-menu-selection-bg":"menus","--dh-color-grid-bg":"grid","--dh-color-grid-number-positive":"Data Types","--dh-color-grid-number-negative":"Data Types","--dh-color-grid-number-zero":"Data Types","--dh-color-grid-date":"Data Types","--dh-color-grid-string-null":"Data Types"},dr={"--dh-color-black":"","--dh-color-action-active-bg":"Action.active","--dh-color-action-down-bg":"Action:active","--dh-color-action-hover-bg":"Action:hover","--dh-color-action-active-hover-bg":"Action.active:hover","--dh-color-action-disabled-bg":"Action:disabled"},vt={palette:{black:"gray",white:"gray"},editor:{line:"editor",comment:"code",string:"code",number:"code",delimiter:"code",identifier:"code",keyword:"code",operator:"code",storage:"code",predefined:"code",selection:"state",focus:"state"},chart:{axis:"Chart",bg:"Chart",grid:"Chart",plot:"Chart",title:"Chart",active:"Data",trend:"Data",area:"Data",range:"Data",line:"Deprecated"},grid:{data:"Data Bars",context:"Context Menu"},semantic:{},component:{}};function ce(a){const r=de.parseRgba(de.asRgbOrRgbaString(a)??"");if(r==null||r.a<.5)return"white";const{r:o,g:t,b:l}=r;return de.getBrightness([o,t,l])>=128?"black":"white"}function xt(a){const r=getComputedStyle(document.documentElement);return a.split(/[\n;]/g).map(t=>/^(?:\s{2}|:root\{)?(--dh-color-(?:[^:]+))/.exec(t)?.[1]).filter(t=>!!t).map(t=>{const l=r.getPropertyValue(t);return t==="--dh-color-chart-colorway"?oo(l??"").map(([n,i])=>l.substring(n,i+1)).map((n,i)=>({name:`${t}-${i}`,value:n})):{name:t,value:l}}).flat()}function Q(a,r,o,t=mt){const l=vt[a];return xt(r).reduce((i,{name:d,value:h})=>{if(/^--dh-color-true-(.*?)$/.test(d)||/^--dh-color-gray-(light|mid|dark)$/.test(d))return i;const c=/^--dh-color-([^-]+)(?:-([^-]+))?/.exec(d);let g=t[d]??c?.[o]??c?.[1]??"???";return g=l[g]??g,i[g]==null&&(i[g]=[]),d in dr&&i[g].push({isLabel:!0,name:dr[d],value:""}),/^--dh-color-gray-(light|mid|dark)$/.test(d)||i[g].push({name:d,value:h}),i},{})}function pt(){const a=u.useRef(null);return u.useLayoutEffect(()=>{if(a.current==null)return;const r=getComputedStyle(a.current),{backgroundColor:o}=r;a.current.style.color=ce(o)},[]),a}function ft(a,r){const[o,t]=u.useState();return u.useEffect(()=>{if(a.current==null)return;const l=getComputedStyle(a.current,r).getPropertyValue("content"),s=/"(--dh-color-.*?)[,"]/.exec(l)?.[1];if(s==null)return;const n=getComputedStyle(a.current).getPropertyValue(s);t(n)},[a,r]),o}function De({className:a,children:r}){const o=pt(),t=ft(o,":after"),l=u.useMemo(()=>t!=null?{value:t}:null,[t]),s=l!=null&&l.value!=="";return e.jsxs("div",{ref:o,className:a,style:{border:s?void 0:Ve},children:[s&&e.jsx(re,{interactive:!0,children:e.jsx("div",{children:l.value})}),r]})}function bt(){const a=["100","200","300","400","500","600","700","800","850","8XX","900"].map(t=>e.jsx(De,{className:z("swatch","gray-swatch",`gray-swatch-${t}`),children:t==="8XX"?"N/A":`Gray-${t}`},t)),r=["red","orange","yellow","green","blue","purple","white","black"].map(t=>e.jsx(De,{className:z("swatch",`swatch-${t}`),children:t},t)),o=["content-bg","background","foreground","primary","primary-dark","secondary","secondary-hover","success","info","warning","danger","danger-hover"].map(t=>e.jsx(De,{className:z("swatch",`swatch-${t}`),children:t},t));return e.jsxs("div",{...p("colors"),children:[e.jsx("h2",{className:"ui-title",children:"Colors"}),e.jsxs("div",{className:"row",children:[e.jsxs("div",{className:"col",children:[a,r]}),e.jsx("div",{className:"col",children:o}),e.jsx("div",{className:"col",children:e.jsx("p",{children:"This section is for legacy reference only. Use the css variable based semantic colors in the following sections. You should not be using colors defined in the theme color palette directly."})})]})]})}class jt extends u.Component{constructor(r){super(r),this.makeContextMenuItems=this.makeContextMenuItems.bind(this)}makeContextMenuItems(r){const o=r!==void 0?` ${r}`:"";return[{title:`Show Alert${o}`,icon:Ge,action:()=>{alert(`Alert${o}!`)},shortcut:new oe({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[$.CTRL,R.A],macShortcut:[$.CMD,R.A]})},{title:`Log Message${o}`,icon:He,action:()=>{console.log(`Logging a message${o}!`)},shortcut:new oe({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[$.CTRL,R.L],macShortcut:[$.CMD,R.L]})},{title:"Sub-menu",actions:()=>this.makeContextMenuItems((r??0)+1),order:3}].concat(new Array(10).fill({title:`Disabled Option${o}`,disabled:!0,order:2}))}render(){const r=this.makeContextMenuItems(),t=[{title:"Show Shortcuts",icon:Cr,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new oe({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[$.CTRL,R.SLASH],macShortcut:[$.CMD,R.SLASH]}),group:ve.groups.global}].concat(r),l=()=>new Promise(s=>{setTimeout(()=>{s(r)},3e3)});return e.jsxs("div",{...p("context-menus"),children:[e.jsx("h2",{className:"ui-title",children:"Context Menu"}),e.jsxs(x,{kind:"primary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(ve,{actions:t})]}),e.jsxs(x,{kind:"tertiary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(ve,{actions:l})]})]})}}class yt extends u.Component{constructor(r){super(r),this.sampleInput=he.createRef(),this.handleUpdateCheckboxMap=this.handleUpdateCheckboxMap.bind(this);const o=["Parent A",new Map([["Child 1",!0],["Child 2",!1]])],t=["Parent B",new Map([["Child 3",!0],["Child 4",!1],["Child 5",!0],["Child 6",!1]])],l=["Leaf Parent",!0];this.state={isShown:!1,checkBoxMap:new Map([o,t,l])}}handleUpdateCheckboxMap(r){this.setState({checkBoxMap:r})}renderChild(){return e.jsxs("div",{className:"p-3",children:[e.jsx("h4",{children:"Sample Child"}),e.jsxs("div",{className:"form-group",children:[e.jsxs("label",{htmlFor:"exampleInput1",children:["Input Label",e.jsx("input",{ref:this.sampleInput,type:"text",className:"form-control",id:"exampleInput1","aria-describedby":"emailHelp",placeholder:"Input Placeholder"})]}),e.jsx("small",{className:"form-text text-muted",children:"Help text for a form input"})]})]})}render(){const{isShown:r,checkBoxMap:o}=this.state;return e.jsxs("div",{...p("dialog"),children:[e.jsx("h2",{className:"ui-title",children:"Popover Dialog"}),e.jsx("p",{children:"Popover dialog that can contain interactive elements, can be set to self close on blur."}),e.jsxs(x,{kind:"primary",style:{marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{r?this.setState({isShown:!1}):this.setState({isShown:!0})},children:["Open Dialog",e.jsx(vo,{options:{placement:"bottom"},isShown:r,onEntered:()=>{this.sampleInput.current&&this.sampleInput.current.focus()},onExited:()=>{this.setState({isShown:!1})},closeOnBlur:!0,interactive:!0,children:this.renderChild()})]}),e.jsx("p",{children:"The Hierarchical Checkbox Menu uses a popover dialog to display hierarchical groups of checkboxes."}),e.jsx(So,{menuText:"Checkbox Menu",valueMap:o,onUpdateValueMap:this.handleUpdateCheckboxMap})]})}}class wt extends u.Component{constructor(r){super(r),this.state={isShown:!1}}render(){const r=[{title:"Show Alert",icon:Ge,action:()=>{alert("Alert!")},shortcut:new oe({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[$.CTRL,R.A],macShortcut:[$.CMD,R.A]})},{title:"Log Message",icon:He,action:()=>{console.log("Logging a message!")},shortcut:new oe({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[$.CTRL,R.L],macShortcut:[$.CMD,R.L]})}],t=[{title:"Show Shortcuts",icon:Cr,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new oe({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[$.CTRL,R.SLASH],macShortcut:[$.CMD,R.SLASH]}),group:ve.groups.global}].concat(r),{isShown:l}=this.state;return e.jsxs("div",{...p("dropdown-menus"),children:[e.jsx("h2",{className:"ui-title",children:"Dropdown Menu"}),e.jsx("p",{children:"A simple dropdown menu of actions, can open on click of parent container, or controlled by prop."}),e.jsx(x,{kind:"inline",className:"mx-2",icon:to,onClick:()=>{},children:e.jsx(rr,{actions:t})}),e.jsxs(x,{kind:"primary",style:{marginRight:"1rem",minWidth:"165px"},onClick:()=>{l?this.setState({isShown:!1}):this.setState({isShown:!0})},children:["Menu Shown: ",l.toString()]}),e.jsxs("div",{ref:this.button,className:"btn btn-secondary disabled",style:{marginRight:"1rem"},children:["Shown using isShown",e.jsx(rr,{isShown:l,onMenuClosed:()=>{this.setState({isShown:!1})},actions:t})]})]})}}const Ct=`trades = db.t("LearnDeephaven", "StockTrades").where("Date=\`2017-08-25\`")\\
2
2
  .headBy(3, "Sym")\\
3
3
  .view("Sym", "Last")
4
4
 
@@ -211,4 +211,4 @@ simulation = shares30min.update("Values=(double[])ss.update(Sym, TargetPosition,
211
211
  `,la="_themeColorsPalette_1mdfo_1",sa="_swatch_1mdfo_7",na="_themeColors_1mdfo_1",ia="_label_1mdfo_21",ca="_capitalize_1mdfo_29",G={themeColorsPalette:la,swatch:sa,themeColors:na,label:ia,capitalize:ca};function da(){return{"Theme Color Palette":Q("palette",Qt,1),"Semantic Colors":Q("semantic",ea,1),"Chart Colors":Q("chart",ra,2),"Editor Colors":Q("editor",oa,2),"Grid Colors":Q("grid",ta,2),"Component Colors":Q("component",aa,1)}}function ha(){const{selectedThemeKey:a}=Nr(),r=u.useMemo(da,[a]);return e.jsx(e.Fragment,{children:Object.entries(r).map(([o,t],l)=>o==="Theme Color Palette"?e.jsxs("div",{...p(o),children:[e.jsx("h2",{className:"ui-title",children:o}),e.jsx("div",{className:G.themeColorsPalette,children:Object.entries(t).map(([s,n],i)=>e.jsxs(u.Fragment,{children:[(i===0||i===1)&&n.map(({name:d},h)=>e.jsx("div",{style:{gridColumnStart:h+2,textAlign:"center"},className:"mt-3",children:d.split("-").pop()},d)),e.jsx("div",{className:"text-right pr-2",children:s}),n.map(({name:d,value:h})=>e.jsxs("div",{style:{backgroundColor:h,border:h===""&&d.length>0?Ve:void 0,color:`var(--dh-color-${ce(h)})`},className:z(G.swatch,"px-0"),children:[e.jsxs(re,{interactive:!0,children:[e.jsx("div",{children:d}),e.jsx("div",{children:h}),e.jsx("div",{children:de.normalizeCssColor(h,!0)})]}),e.jsx(ar,{copy:d,style:{color:`var(--dh-color-${ce(h)})`}})]},d))]},s))})]},o):e.jsxs("div",{...p(o),children:[e.jsx("h2",{className:"ui-title",children:o}),e.jsx("div",{className:G.themeColors,children:Object.entries(t).map(([s,n])=>e.jsxs("div",{style:{gridRow:`span ${n.length+1}`},children:[e.jsx("span",{className:z(G.label,G.capitalize),children:s}),n.map(({isLabel:i,name:d,value:h,note:c})=>i===!0?e.jsx("span",{className:G.label,children:d},d):e.jsxs("div",{className:G.swatch,style:{backgroundColor:h,border:h===""&&d.length>0?Ve:void 0,color:`var(--dh-color-${ce(h)})`},children:[e.jsxs(re,{interactive:!0,children:[e.jsx("div",{children:d}),e.jsx("div",{children:h}),e.jsx("div",{children:de.normalizeCssColor(h,!0)})]}),e.jsx("span",{children:d.replace("--dh-color-","")}),d.endsWith("-hue")||c!=null?e.jsx("span",{children:c??h}):null,e.jsx(ar,{copy:d,style:{color:`var(--dh-color-${ce(h)})`}})]},d))]},s))})]},o))})}const Me="data-menu-category",ua="data-no-menu",ga="sample-section-e2e-ignore",Ar="spectrum-component-samples",$r="spectrum-comparison-samples";function ma(){return e.jsxs("div",{id:Ar,children:[e.jsx("h2",{className:"ui-title","data-no-menu":!0,children:"Spectrum Components"}),e.jsxs(L,{gap:20,columns:yr("0px","1fr"),children:[e.jsxs(N,{...k("spectrum-buttons"),children:[e.jsx("h3",{children:"Buttons"}),e.jsx(va,{})]}),e.jsxs(N,{...k("spectrum-collections"),children:[e.jsx("h3",{children:"Collections"}),e.jsx(ba,{})]}),e.jsxs(N,{...k("spectrum-content"),children:[e.jsx("h3",{children:"Content"}),e.jsx(fa,{})]}),e.jsxs(N,{...k("spectrum-forms"),children:[e.jsx("h3",{children:"Forms"}),e.jsx(pa,{})]}),e.jsxs(N,{...k("spectrum-overlays"),children:[e.jsx("h3",{children:"Overlays"}),e.jsxs(w,{gap:"size-160",children:[e.jsx(xa,{}),e.jsxs(Pr,{children:[e.jsx(P,{children:"Dialog Trigger"}),a=>e.jsxs(Lr,{children:[e.jsx(ze,{children:"Some Heading"}),e.jsx(_r,{children:"Some Header"}),e.jsx(Br,{}),e.jsx(Ue,{children:e.jsx(A,{children:"Are you sure?"})}),e.jsxs(Fr,{children:[e.jsx(j,{variant:"secondary",onPress:a,children:"Cancel"}),e.jsx(j,{variant:"accent",onPress:a,children:"Confirm"})]})]})]})]})]}),e.jsxs(N,{...k("spectrum-well"),children:[e.jsx("h3",{children:"Wells"}),e.jsx(Or,{children:"This is a well."})]})]})]})}function va(){return e.jsxs(e.Fragment,{children:[e.jsxs(P,{marginBottom:"size-200",children:[e.jsx(W,{children:e.jsx(S,{icon:H})}),e.jsx(A,{children:"Icon Button"})]}),e.jsxs(L,{autoFlow:"column",columnGap:"size-250",rowGap:"size-150",columns:Pe(4,yr(0,"size-2000")),rows:Pe(8,"size-400"),children:[e.jsx("label",{children:'Button style="outline"'}),e.jsx(j,{variant:"primary",style:"outline",children:"Primary"}),e.jsx(j,{variant:"secondary",style:"outline",children:"Secondary"}),e.jsx(j,{variant:"accent",style:"outline",children:"Accent"}),e.jsx(j,{variant:"negative",style:"outline",children:"Negative"}),e.jsx(j,{variant:"primary",staticColor:"black",style:"outline",children:"Static Black"}),e.jsx(j,{variant:"primary",staticColor:"white",style:"outline",children:"Static White"}),e.jsx(j,{variant:"primary",isDisabled:!0,style:"outline",children:"Disabled"}),e.jsx("label",{children:'Button style="fill"'}),e.jsx(j,{variant:"primary",style:"fill",children:"Primary"}),e.jsx(j,{variant:"secondary",style:"fill",children:"Secondary"}),e.jsx(j,{variant:"accent",style:"fill",children:"Accent"}),e.jsx(j,{variant:"negative",style:"fill",children:"Negative"}),e.jsx(j,{variant:"primary",staticColor:"black",style:"fill",children:"Static Black"}),e.jsx(j,{variant:"primary",staticColor:"white",style:"fill",children:"Static White"}),e.jsx(j,{variant:"primary",isDisabled:!0,style:"fill",children:"Disabled"}),e.jsx("label",{children:"Action Button"}),e.jsx(P,{children:"Normal"}),e.jsx(P,{gridRow:"span 3",isQuiet:!0,children:"Quiet"}),e.jsx(P,{staticColor:"black",children:"Static Black"}),e.jsx(P,{staticColor:"white",children:"Static White"}),e.jsx(P,{isDisabled:!0,children:"Disabled"}),e.jsx("label",{children:"Toggle Button"}),e.jsx(K,{children:"Normal"}),e.jsx(K,{isQuiet:!0,children:"Quiet"}),e.jsx(K,{gridRow:"span 2",isEmphasized:!0,children:"Emphasized"}),e.jsx(K,{staticColor:"black",children:"Static Black"}),e.jsx(K,{staticColor:"white",children:"Static White"}),e.jsx(K,{isDisabled:!0,children:"Disabled"})]})]})}function xa(){return e.jsxs(e.Fragment,{children:[e.jsx(A,{children:"Contextual Help"}),e.jsxs(Vr,{variant:"info",children:[e.jsx(ze,{children:"Need help?"}),e.jsx(Ue,{children:e.jsx(A,{children:"This is a helpful description of the thing you need help with."})})]})]})}function pa(){return e.jsx(Ur,{children:e.jsxs(L,{gap:20,columns:Pe("auto-fit","210px"),alignItems:"end",children:[e.jsx(Le,{label:"Text Field"}),e.jsxs(wr,{label:"Combobox",menuTrigger:"focus",defaultSelectedKey:"two",children:[e.jsx(f,{children:"One"},"one"),e.jsx(f,{children:"Two"},"two"),e.jsx(f,{children:"Three"},"three")]}),e.jsx(_e,{children:"Checkbox"}),e.jsx(Gr,{label:"Slider",defaultValue:24}),e.jsx(Hr,{children:"Switch"})]})})}function fa(){return e.jsxs(zr,{children:[e.jsx(W,{size:"XL",children:e.jsx(S,{icon:so})}),e.jsx(ze,{children:"Illustrated Message"}),e.jsx(Ue,{children:"This is the content of the message."})]})}function ba(){return e.jsxs(e.Fragment,{children:[e.jsx("label",{id:"table-view-sample",children:"List View"}),e.jsxs(Wr,{"aria-labelledby":"table-view-sample",selectionMode:"multiple",maxWidth:"size-6000",marginBottom:"size-200",children:[e.jsx(f,{children:"One"}),e.jsx(f,{children:"Two"}),e.jsx(f,{children:"Three"}),e.jsx(f,{children:"Four"})]}),e.jsx("label",{id:"table-view-sample",children:"Table View"}),e.jsxs(qr,{"aria-labelledby":"table-view-sample",selectionMode:"multiple",children:[e.jsxs(Kr,{children:[e.jsxs(Z,{title:"Person",children:[e.jsx(Z,{allowsResizing:!0,children:"Name"}),e.jsx(Z,{children:"Age"})]}),e.jsxs(Z,{title:"Address",children:[e.jsx(Z,{allowsResizing:!0,children:"City"}),e.jsx(Z,{children:"State"})]})]}),e.jsxs(Zr,{children:[e.jsxs(ye,{children:[e.jsx(E,{children:"John"}),e.jsx(E,{children:"42"}),e.jsx(E,{children:"San Francisco"}),e.jsx(E,{children:"CA"})]}),e.jsxs(ye,{children:[e.jsx(E,{children:"Jane"}),e.jsx(E,{children:"38"}),e.jsx(E,{children:"San Francisco"}),e.jsx(E,{children:"CA"})]}),e.jsxs(ye,{children:[e.jsx(E,{children:"Becky"}),e.jsx(E,{children:"12"}),e.jsx(E,{children:"San Francisco"}),e.jsx(E,{children:"CA"})]})]})]})]})}function se(a){return e.jsx("div",{...a})}function ja(){const[a,r]=u.useState([]);u.useEffect(()=>{let t={category:"",items:[]};const l=[t],s=document.querySelector(`#${Ar}`),n=document.querySelector(`#sample-section-${$r}`);document.querySelectorAll(`h2,h3,[${Me}]`).forEach(i=>{if(i.textContent==null||i.hasAttribute(ua))return;if(i.hasAttribute(Me)){t={category:i.getAttribute(Me)??"",items:[]},l.push(t);return}const h=`${s?.contains(i)===!0?"spectrum-":n?.contains(i)===!0?"spectrum-compare-":""}${i.textContent}`.toLowerCase().replace(/\s/g,"-");i.id=h,t.items.push({id:h,label:i.textContent})}),r(l)},[]),u.useEffect(()=>{const t=window.location.hash===""?null:document.querySelector(window.location.hash);setTimeout(()=>{t?t.scrollIntoView():window.scrollTo({top:0,behavior:"auto"})},0)},[]);const o=u.useCallback(t=>{const l=String(t);document.getElementById(l)?.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{window.location.hash=l},1e3)},[]);return e.jsxs(Xr,{children:[e.jsx(P,{children:e.jsx(W,{children:e.jsx(S,{icon:no})})}),e.jsx(Yr,{items:a,onAction:o,children:({category:t,items:l})=>e.jsx(Be,{items:l,title:t,children:({id:s,label:n})=>e.jsx(f,{children:n},s)},t)})]})}function ya(){const a=u.useCallback(()=>{window.scrollTo({top:0,behavior:"smooth"}),setTimeout(()=>{window.location.hash=""},500)},[]);return u.useEffect(()=>{const r=document.querySelector("h2")?.offsetTop??0;function o(){document.documentElement.dataset.scroll=String(window.scrollY>=r)}return document.addEventListener("scroll",o,{passive:!0}),()=>{document.removeEventListener("scroll",o)}},[]),e.jsx(j,{UNSAFE_className:"goto-top-button",variant:"accent",onPress:a,children:e.jsx(W,{children:e.jsx(S,{icon:io})})})}const wa=["Tab 1","Tab 2","Tab 3"];function Ca({isActive:a,title:r}){return e.jsxs("li",{className:z("lm_tab",a&&"lm_active"),children:[e.jsx("span",{className:"lm_title_before"}),e.jsx("span",{className:"lm_title",children:r}),e.jsx("span",{className:"lm_close_tab"})]})}function Sa(){return e.jsxs("div",{...p("golden-layout"),children:[e.jsx("h2",{className:"ui-title",children:"Golden Layout"}),[!1,!0].map(a=>e.jsxs(he.Fragment,{children:[e.jsx("h5",{children:a?"Minimized":"Maximised"}),e.jsx("div",{style:{position:"relative",border:"none"},className:a?"lm_maximised":void 0,children:e.jsxs("div",{className:"lm_header",children:[e.jsx("ul",{className:"lm_tabs",children:wa.map((r,o)=>e.jsx(Ca,{isActive:o===0,title:r},r))}),e.jsxs("ul",{className:"lm_controls",children:[e.jsx("li",{className:"lm_tabpreviousbutton"}),e.jsx("li",{className:"lm_tabnextbutton"}),e.jsx("li",{className:"lm_maximise"}),e.jsx("li",{className:"lm_popout"}),e.jsx("li",{className:"lm_tabdropdown"}),e.jsx("li",{className:"lm_close"})]})]})})]},String(a)))]})}function Ta(){return e.jsxs("div",{...p("animations",["sample-section-e2e-ignore"]),children:[e.jsx("h2",{className:"ui-title",children:"Animations"}),e.jsx(N,{position:"relative",height:400,children:e.jsx(Ao,{})})]})}const fr=[["primary","accent"],["secondary","primary"],["danger","negative"]],ka=[{title:"One",value:"1"},{title:"Two",value:"2"},{title:"Three",value:"3"}];function Na(){const[a,r]=u.useState(!1),[o,t]=u.useState("1"),l=u.useCallback(s=>{t(s.target.value)},[]);return e.jsxs("div",{...p($r,[ga]),children:[e.jsx("h2",{className:"ui-title","data-no-menu":!0,children:"Bootstrap / Spectrum Comparison"}),e.jsxs(w,{gap:20,wrap:!0,children:[e.jsxs(N,{children:[e.jsx("h3",{children:"Buttons - Filled"}),e.jsxs(L,{gap:20,columns:"repeat(2, 120px)",autoRows:"40x",justifyItems:"start",alignItems:"start",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),fr.map(([s,n])=>e.jsxs(u.Fragment,{children:[e.jsx(x,{onClick:J,kind:s,icon:er,children:"Button"}),e.jsxs(j,{variant:n,style:"fill",children:[e.jsx(W,{children:e.jsx(S,{icon:er})}),e.jsx(A,{children:"Button"})]})]},s)),e.jsx(x,{onClick:J,kind:"primary",disabled:!0,children:"Disabled"}),e.jsx(j,{variant:"accent",style:"fill",isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(N,{children:[e.jsx("h3",{children:"Buttons - Outline"}),e.jsxs(L,{gap:20,columns:"repeat(2, 120px)",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),fr.map(([s,n])=>e.jsxs(u.Fragment,{children:[e.jsx(x,{onClick:J,kind:s,children:s}),e.jsx(j,{variant:n,style:"outline",children:n})]},s)),e.jsx(x,{onClick:J,kind:"secondary",disabled:!0,children:"Disabled"}),e.jsx(j,{variant:"primary",style:"outline",isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(N,{children:[e.jsx("h3",{children:"Action Buttons"}),e.jsxs(L,{gap:20,columns:"repeat(2, 120px)",autoRows:"40x",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),e.jsx(x,{onClick:J,kind:"inline",children:"Inline"}),e.jsx(P,{children:"Action"}),e.jsx(x,{onClick:J,kind:"inline",disabled:!0,children:"Disabled"}),e.jsx(P,{isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(N,{children:[e.jsx("h3",{children:"Pickers"}),e.jsxs(L,{gap:20,columns:"repeat(2, 192px)",autoRows:"40x",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),[!1,!0].map(s=>e.jsxs(u.Fragment,{children:[e.jsxs("div",{children:[e.jsxs("label",{className:"input-label",children:[s?"Disabled ":"","Combobox"]}),e.jsx(Oe,{disabled:s,options:ka,defaultValue:"One"})]}),e.jsxs(wr,{isDisabled:s,label:s?"Disabled Combobox":"Combobox",inputValue:"One",children:[e.jsx(f,{children:"One"},"1"),e.jsx(f,{children:"Two"},"2"),e.jsx(f,{children:"Three"},"3")]})]},String(s))),[!1,!0].map(s=>e.jsxs(u.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"input-label",children:"Select"}),e.jsxs(xe,{disabled:s,placeholder:"Select",onChange:n=>{},className:"custom-select",children:[e.jsxs("option",{disabled:!0,value:"0",children:[s?"":"Disabled ","Select"]}),e.jsx("option",{value:"1",children:"One"}),e.jsx("option",{value:"2",children:"Two"}),e.jsx("option",{value:"3",children:"Three"})]})]}),e.jsxs(Jr,{isDisabled:s,label:s?"Disabled Picker":"Picker",placeholder:"Picker",children:[e.jsx(f,{children:"One"},"1"),e.jsx(f,{children:"Two"},"2"),e.jsx(f,{children:"Three"},"3")]})]},String(s)))]})]}),e.jsxs(N,{children:[e.jsx("h3",{children:"Text Field"}),e.jsxs(L,{gap:20,columns:"repeat(2, 192px)",autoRows:"40x",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),e.jsxs("div",{children:[e.jsx("label",{className:"input-label",children:"type=text"}),e.jsx("input",{type:"text",className:"form-control",placeholder:"Text Input"})]}),e.jsx(Le,{type:"text",label:"TextField"}),e.jsxs("div",{children:[e.jsx("label",{className:"input-label",children:"Disabled"}),e.jsx("input",{type:"text",className:"form-control",disabled:!0,value:"Disabled"})]}),e.jsx(Le,{type:"text",label:"Disabled",isDisabled:!0,value:"Disabled"})]})]}),e.jsxs(N,{children:[e.jsx("h3",{children:"Checkbox"}),e.jsxs(L,{gap:20,columns:"repeat(2, 120px)",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),e.jsx(_,{className:"form-group",checked:a,onChange:()=>r(s=>!s),children:"Checkbox"}),e.jsx(_e,{children:"Checkbox"}),e.jsx(_,{className:"form-group",disabled:!0,checked:a,onChange:()=>r(s=>!s),children:"Disabled"}),e.jsx(_e,{isDisabled:!0,children:"Disabled"}),e.jsx(w,{direction:"column",children:e.jsxs("label",{children:["Radio Group",e.jsxs(Tr,{onChange:l,value:o,children:[e.jsx(O,{value:"1",children:"One"}),e.jsx(O,{value:"2",children:"Two"}),e.jsx(O,{value:"3",children:"Three"})]})]})}),e.jsxs(Qr,{label:"Radio Group",value:o,onChange:t,children:[e.jsx(we,{value:"1",children:"One"}),e.jsx(we,{value:"2",children:"Two"}),e.jsx(we,{value:"3",children:"Three"})]})]})]})]})]})}const Da="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("").map((a,r)=>({key:a,item:{key:(r+1)*100,content:`${a}${a}${a}`}}));function ne(){return e.jsx(W,{children:e.jsx(S,{icon:co})})}function Ea(){const[a,r]=u.useState(),o=u.useCallback(t=>{r(t)},[]);return e.jsxs("div",{...p("pickers"),children:[e.jsx("h2",{className:"ui-title",children:"Pickers"}),e.jsxs(w,{gap:14,children:[e.jsx(me,{label:"Single Child",tooltip:{placement:"bottom-end"},children:e.jsx(f,{children:"Aaa"})}),e.jsxs(me,{label:"Mixed Children Types",defaultSelectedKey:999,tooltip:!0,children:["String 1","String 2","String 3","","Some really long text that should get truncated",444,999,!0,!1,e.jsx(f,{children:"Item Aaa"}),e.jsx(f,{children:"Item Bbb"}),e.jsxs(f,{textValue:"Complex Ccc",children:[e.jsx(ne,{}),e.jsx(A,{children:"Complex Ccc with text that should be truncated"})]})]}),e.jsxs(me,{label:"Sections",tooltip:!0,children:["String 1","String 2","String 3",e.jsxs(Be,{title:"Section A",children:[e.jsx(f,{children:"Item Aaa"}),e.jsx(f,{children:"Item Bbb"}),e.jsxs(f,{textValue:"Complex Ccc",children:[e.jsx(ne,{}),e.jsx(A,{children:"Complex Ccc"})]})]}),e.jsxs(Be,{children:[e.jsx(f,{children:"Item Ddd"}),e.jsx(f,{children:"Item Eee"}),e.jsxs(f,{textValue:"Complex Fff",children:[e.jsx(ne,{}),e.jsx(A,{children:"Complex Fff"})]}),e.jsxs(f,{children:[e.jsx(ne,{}),e.jsx(A,{children:"Label"}),e.jsx(A,{slot:"description",children:"Description"})]},"Ggg"),e.jsxs(f,{children:[e.jsx(ne,{}),e.jsx(A,{children:"Label that causes overflow"}),e.jsx(A,{slot:"description",children:"Description that causes overflow"})]},"Hhh")]},"Key B")]}),e.jsx(me,{label:"Controlled",selectedKey:a,onChange:o,children:Da})]})]})}const br={position:"sticky",justifyContent:"end",zIndex:1,UNSAFE_style:{float:"right"}};function Ia(){const a=window.location.search.includes("isolateSection=true"),{themes:r}=Nr(),o=r.length>1;return e.jsx("div",{tabIndex:-1,role:"main",children:e.jsxs("div",{className:"container style-guide-container",children:[a&&e.jsx("style",{children:`.${Ne}, .sample-section:not(${window.location.hash}), :not(.sample-section) > h2 {
212
212
  display: none;
213
213
  }`}),e.jsx(w,{justifyContent:"space-between",alignItems:"center",marginTop:"2rem",marginBottom:"1rem",children:e.jsx("h1",{style:{paddingTop:"2rem"},children:"Deephaven UI Components"})}),e.jsxs(w,{...br,UNSAFE_className:Ne,marginTop:-56,top:20,gap:10,alignItems:"end",children:[o?e.jsx(Oo,{}):null,e.jsx(ja,{})]}),e.jsx(w,{...br,UNSAFE_className:Ne,top:"calc(100vh - 40px)",marginTop:-32,marginEnd:o?-234:0,children:e.jsx(ya,{})}),e.jsx(zt,{}),e.jsx(se,{"data-menu-category":"Colors"}),e.jsx(bt,{}),e.jsx(ha,{}),e.jsx(se,{"data-menu-category":"Layout"}),e.jsx(Sa,{}),e.jsx(se,{"data-menu-category":"Components"}),e.jsx(ee,{}),e.jsx(Ut,{}),e.jsx(Bt,{}),e.jsx(Ea,{}),e.jsx(Ot,{}),e.jsx(fe,{}),e.jsx(Gt,{}),e.jsx(yt,{}),e.jsx(Vt,{}),e.jsx(jt,{}),e.jsx(wt,{}),e.jsx(Jt,{}),e.jsx(Ht,{}),e.jsx(Lt,{}),e.jsx(Tt,{}),e.jsx(Rt,{}),e.jsx(gt,{}),e.jsx(bo,{}),e.jsx(Ta,{}),e.jsx(se,{"data-menu-category":"Spectrum Components"}),e.jsx(ma,{}),e.jsx(se,{"data-menu-category":"Spectrum Comparison"}),e.jsx(Na,{})]})})}function Ke(a){const{workspace:r,setWorkspace:o}=a;return u.useEffect(()=>{Vo.makeDefaultWorkspace({getLayouts:async()=>[],getLayout:async()=>({})}).then(o)},[o]),r!=null?e.jsx(Ia,{}):null}Ke.propTypes={workspace:pe.shape({}),setWorkspace:pe.func.isRequired};Ke.defaultProps={workspace:null};const Aa=a=>({workspace:yo(a)}),$a=eo(Aa,{setWorkspace:jo})(Ke);function za(){return Bo.register(new URL("./download/serviceWorker.js",window.location.href)),wo.init({getWorker:()=>new ho}),window["__react-beautiful-dnd-disable-dev-warnings"]=!0,e.jsx($o,{children:e.jsx(ro,{store:Co,children:e.jsx($a,{})})})}export{za as StyleGuideRoot,za as default};
214
- //# sourceMappingURL=StyleGuideRoot-c2aef5b8.js.map
214
+ //# sourceMappingURL=StyleGuideRoot-1203faf4.js.map