@deephaven/code-studio 0.69.0 → 0.69.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/build/assets/{AppRoot-214e2caf.js → AppRoot-a463cf9e.js} +3 -3
  2. package/build/assets/AppRoot-a463cf9e.js.map +1 -0
  3. package/build/assets/{Chart-ec173eeb.js → Chart-270c924c.js} +2 -2
  4. package/build/assets/{Chart-ec173eeb.js.map → Chart-270c924c.js.map} +1 -1
  5. package/build/assets/{ControlType-f06bc5f0.js → ControlType-47c5efae.js} +3 -3
  6. package/build/assets/{ControlType-f06bc5f0.js.map → ControlType-47c5efae.js.map} +1 -1
  7. package/build/assets/{FontBootstrap-df930865.js → FontBootstrap-834f018d.js} +2 -2
  8. package/build/assets/{FontBootstrap-df930865.js.map → FontBootstrap-834f018d.js.map} +1 -1
  9. package/build/assets/{FormatterUtils-e27be17a.js → FormatterUtils-0ab27c1f.js} +2 -2
  10. package/build/assets/{FormatterUtils-e27be17a.js.map → FormatterUtils-0ab27c1f.js.map} +1 -1
  11. package/build/assets/{Grid-ce8c267b.js → Grid-a1df1631.js} +2 -2
  12. package/build/assets/{Grid-ce8c267b.js.map → Grid-a1df1631.js.map} +1 -1
  13. package/build/assets/{GridRenderer-9f3ca76f.js → GridRenderer-c55aefc8.js} +2 -2
  14. package/build/assets/{GridRenderer-9f3ca76f.js.map → GridRenderer-c55aefc8.js.map} +1 -1
  15. package/build/assets/{IrisGrid-aef07c0c.js → IrisGrid-f8d03cd5.js} +2 -2
  16. package/build/assets/{IrisGrid-aef07c0c.js.map → IrisGrid-f8d03cd5.js.map} +1 -1
  17. package/build/assets/{IrisGridModel-202cfca9.js → IrisGridModel-874ec2ee.js} +2 -2
  18. package/build/assets/{IrisGridModel-202cfca9.js.map → IrisGridModel-874ec2ee.js.map} +1 -1
  19. package/build/assets/{IrisGridShortcuts-53119a65.js → IrisGridShortcuts-a8c63cbe.js} +2 -2
  20. package/build/assets/{IrisGridShortcuts-53119a65.js.map → IrisGridShortcuts-a8c63cbe.js.map} +1 -1
  21. package/build/assets/{IrisGridThemeProvider-1582b870.js → IrisGridThemeProvider-0b2a822a.js} +2 -2
  22. package/build/assets/{IrisGridThemeProvider-1582b870.js.map → IrisGridThemeProvider-0b2a822a.js.map} +1 -1
  23. package/build/assets/{MarkdownEditor-ab45c541.js → MarkdownEditor-f5772ef0.js} +2 -2
  24. package/build/assets/{MarkdownEditor-ab45c541.js.map → MarkdownEditor-f5772ef0.js.map} +1 -1
  25. package/build/assets/{MarkdownNotebook-980abf78.js → MarkdownNotebook-c887e429.js} +2 -2
  26. package/build/assets/{MarkdownNotebook-980abf78.js.map → MarkdownNotebook-c887e429.js.map} +1 -1
  27. package/build/assets/{MissingPartitionError-40f804d7.js → MissingPartitionError-9cfce06e.js} +2 -2
  28. package/build/assets/{MissingPartitionError-40f804d7.js.map → MissingPartitionError-9cfce06e.js.map} +1 -1
  29. package/build/assets/{StyleGuideRoot-68cf32f4.js → StyleGuideRoot-b4694c2d.js} +2 -2
  30. package/build/assets/{StyleGuideRoot-68cf32f4.js.map → StyleGuideRoot-b4694c2d.js.map} +1 -1
  31. package/build/assets/{index-e37d0cee.js → index-17d3e9f4.js} +3 -3
  32. package/build/assets/{index-e37d0cee.js.map → index-17d3e9f4.js.map} +1 -1
  33. package/build/assets/{index-0064374d.js → index-6bd79930.js} +2 -2
  34. package/build/assets/{index-0064374d.js.map → index-6bd79930.js.map} +1 -1
  35. package/build/assets/{index-13455a3c.js → index-9d39bc05.js} +2 -2
  36. package/build/assets/{index-13455a3c.js.map → index-9d39bc05.js.map} +1 -1
  37. package/build/assets/{useUser-b71260d2.js → useUser-2327a307.js} +2 -2
  38. package/build/assets/{useUser-b71260d2.js.map → useUser-2327a307.js.map} +1 -1
  39. package/build/index.html +2 -2
  40. package/package.json +2 -2
  41. package/build/assets/AppRoot-214e2caf.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import{r as u,K as H,I as e,al as C,M as ue,_ as wr,V as xe,L as T,a7 as z,U as Xe,ax as Or,aS as L,aT as Cr,aU as D,a5 as Vr,a6 as P,a9 as Ur,aa as Ue,aV as Gr,ab as Hr,ac as Ge,a8 as $,ae as zr,af as j,aW as Wr,aX as Pe,aY as q,aZ as qr,ad as Kr,a_ as Le,aj as Sr,ai as f,a$ as _e,b0 as Zr,b1 as Xr,ak as Yr,b2 as Qr,b3 as Jr,b4 as eo,b5 as K,b6 as ro,b7 as be,b8 as E,b9 as oo,ba as to,am as Be,az as ao,bb as lo,bc as je,Q as so,a4 as io}from"./vendor-19d67aee.js";import{aW as Ye,aX as G,aN as he,a3 as no,aY as He,aZ as ze,a_ as Tr,aF as co,a$ as Z,b0 as Qe,G as Je,b1 as er,I as Fe,b2 as ho,b3 as uo,N as mo,b4 as go,b5 as vo,aJ as rr,b6 as xo}from"./index-13455a3c.js";import{W as po}from"./monaco-b5248072.js";import{f as fe,d as kr,m as X,B as fo,S as le,L as bo,c as ye,I as jo,R as Nr,a as F}from"./IrisGridModel-202cfca9.js";import{B as x,u as Dr,s as ee,q as re,aW as A,K as M,am as ge,ak as yo,H as or,cs as tr,N as wo,C as _,aZ as se,S as ve,aR as Co,an as So,d as ar,a$ as Ir,z as lr,bv as Y,aq as To,aC as ko,aa as No,aI as Do,w as Io}from"./ControlType-f06bc5f0.js";import{M as sr,H as Eo,A as $o,V as we,T as Ao,D as Mo,C as Ro,a as Po,c as Lo,b as _o,P as Ce,j as Bo}from"./FontBootstrap-df930865.js";import{G as oe,T as Fo}from"./Grid-ce8c267b.js";import{G as Er,C as Oe,O as Oo,a as Vo,S as Uo,b as ce,P as ir,e as Go,c as Ho}from"./GridRenderer-9f3ca76f.js";import{a as nr,D as zo}from"./IrisGridShortcuts-53119a65.js";import{N as Wo,T as qo}from"./useUser-b71260d2.js";import{L as Ko}from"./AppRoot-214e2caf.js";import"./helpers-de833af9.js";function cr(t,r,o,a,l,s,i){try{var n=t[s](i),d=n.value}catch(h){o(h);return}n.done?r(d):Promise.resolve(d).then(a,l)}function Se(t){return function(){var r=this,o=arguments;return new Promise(function(a,l){var s=t.apply(r,o);function i(d){cr(s,a,l,i,n,"next",d)}function n(d){cr(s,a,l,i,n,"throw",d)}i(void 0)})}}function B(t,r,o){return r=Zo(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function Zo(t){var r=Xo(t,"string");return typeof r=="symbol"?r:String(r)}function Xo(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var a=o.call(t,r||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class Yo extends fe{constructor(){var{rowCount:r=1e9,columnCount:o=100,floatingTopRowCount:a=0,floatingBottomRowCount:l=0,floatingLeftColumnCount:s=0,floatingRightColumnCount:i=0,isEditable:n=!1,editedData:d=[]}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),B(this,"numRows",void 0),B(this,"numColumns",void 0),B(this,"floatingTop",void 0),B(this,"floatingBottom",void 0),B(this,"floatingLeft",void 0),B(this,"floatingRight",void 0),B(this,"editable",void 0),B(this,"editedData",void 0),this.numRows=r,this.numColumns=o,this.floatingTop=a,this.floatingBottom=l,this.floatingLeft=s,this.floatingRight=i,this.editable=n,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 a,l;return(a=(l=this.editedData[r])===null||l===void 0?void 0:l[o])!==null&&a!==void 0?a:"".concat(r,",").concat(o)}colorForCell(r,o,a){return a.textColor}textForColumnHeader(r){return"".concat(r)}textForRowHeader(r){return"".concat(r)}textForRowFooter(r){return"".concat(r)}setValueForCell(r,o,a){var l=this;return Se(function*(){l.editedData[r]==null&&(l.editedData[r]=[]),l.editedData[r][o]="".concat(a)})()}setValueForRanges(r,o){var a=this;return Se(function*(){kr.forEachCell(r,(l,s)=>{a.setValueForCell(l,s,o)})})()}setValues(r){var o=this;return Se(function*(){for(var a=0;a<r.length;a+=1){var l,s,i=r[a];o.setValueForCell((l=i.column)!==null&&l!==void 0?l:i.x,(s=i.row)!==null&&s!==void 0?s:i.y,i.text)}})()}editValueForCell(r,o){return this.textForCell(r,o)}isValidForCell(r,o,a){return!0}isEditableRange(r){return this.isEditable}delete(r){throw new Error("Method not implemented.")}}const We=Yo;function S(t,r,o){return r=Qo(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function Qo(t){var r=Jo(t,"string");return typeof r=="symbol"?r:String(r)}function Jo(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var a=o.call(t,r||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class I extends We{constructor(){var{rowCount:r=I.DEFAULT_ROW_COUNT,columnCount:o=I.DEFAULT_COLUMN_COUNT,children:a=new Map,childRowCount:l=Math.ceil(Math.max(I.MIN_CHILD_ROW_COUNT,r*I.DEFAULT_CHILD_ROW_COUNT_FACTOR)),maxDepth:s=I.MAX_DEPTH}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super({rowCount:r,columnCount:o}),S(this,"children",void 0),S(this,"childRowCount",void 0),S(this,"maxDepth",void 0),S(this,"getCachedModelRowOffset",X((i,n)=>{for(var d=null,h=n,c=[...i].sort((y,O)=>y[0]-O[0]),m=0;m<c.length;m+=1){var[g,v]=c[m];if(h<=g)break;var b=v.rowCount;if(h<=g+b){d=g,h=h-g-1;break}h-=b}return{key:d,offsetRow:h}})),S(this,"getCachedTextForRowHeader",X((i,n)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(i,n);if(d!=null){var c=i.get(d);if(c!==void 0)return"".concat(d,".").concat(c.textForRowHeader(h))}return"".concat(h)})),S(this,"getCachedTextForCell",X((i,n,d)=>{var{key:h,offsetRow:c}=this.getCachedModelRowOffset(i,d);if(h!=null){var m=i.get(h);if(m!==void 0)return"".concat(h,".").concat(m.textForCell(n,c))}return"".concat(n,",").concat(c)})),S(this,"getCachedIsRowExpandable",X((i,n,d)=>{var h=this.getCachedDepthForRow(i,n);return h<d})),S(this,"getCachedIsRowExpanded",X((i,n)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(i,n);if(d!=null){var c=i.get(d);if(c!==void 0)return c.isRowExpanded(h)}return i.has(h)})),S(this,"getCachedDepthForRow",X((i,n)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(i,n);if(d!=null){var c=i.get(d);if(c!==void 0)return c.depthForRow(h)+1}return 0})),this.children=a,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 a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,{key:l,offsetRow:s}=this.getCachedModelRowOffset(this.children,r),i=new Map(this.children);if(l!=null){var n=this.children.get(l);if(n!==void 0){var{rowCount:d}=n;n.setRowExpanded(s,o,a),this.numRows+=n.rowCount-d}}else if(o){var c=new I({rowCount:this.childRowCount,columnCount:this.numColumns});i.set(s,c),this.numRows+=c.rowCount}else{var h=i.get(s);h!==void 0&&(this.numRows-=h.rowCount,i.delete(s))}this.children=i}expandAll(){throw new Error("Expand all not implemented.")}collapseAll(){throw new Error("Collapse all not implemented.")}depthForRow(r){return this.getCachedDepthForRow(this.children,r)}}S(I,"DEFAULT_ROW_COUNT",1e9);S(I,"DEFAULT_COLUMN_COUNT",100);S(I,"DEFAULT_CHILD_ROW_COUNT_FACTOR",.01);S(I,"MIN_CHILD_ROW_COUNT",10);S(I,"MAX_DEPTH",10);const qe=I;function Te(t,r,o){return r=et(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function et(t){var r=rt(t,"string");return typeof r=="symbol"?r:String(r)}function rt(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var a=o.call(t,r||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class ot extends fe{constructor(r,o){var a;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),(a=o?.length)!==null&&a!==void 0?a:0),this.columnHeaders=o}get rowCount(){return this.data.length}get columnCount(){return this.numberOfColumns}textForCell(r,o){var a;return"".concat((a=this.data[o])===null||a===void 0?void 0:a[r])}textForColumnHeader(r){var o,a;return(o=(a=this.columnHeaders)===null||a===void 0?void 0:a[r])!==null&&o!==void 0?o:""}}const tt=ot;function ke(t,r,o){return r=at(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function at(t){var r=lt(t,"string");return typeof r=="symbol"?r:String(r)}function lt(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var a=o.call(t,r||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class st extends fe{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 a,l,s,i,n,d,h,c=o-((a=(l=this.viewportData)===null||l===void 0?void 0:l.rowOffset)!==null&&a!==void 0?a:0),m=r-((s=(i=this.viewportData)===null||i===void 0?void 0:i.columnOffset)!==null&&s!==void 0?s:0);return"".concat((n=(d=this.viewportData)===null||d===void 0||(h=d.data[c])===null||h===void 0?void 0:h[m])!==null&&n!==void 0?n:"")}textForColumnHeader(r){return"".concat(r)}textForRowHeader(r){return"".concat(r)}}const it=st;function k(t,r,o){return r=nt(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function nt(t){var r=ct(t,"string");return typeof r=="symbol"?r:String(r)}function ct(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var a=o.call(t,r||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var dt="proportional",ht=Er.positiveBarColor,ut=Er.negativeBarColor,mt="beside",gt="LTR",vt="right";function xt(t){return Array.isArray(t)&&t.every(r=>typeof r=="number")}class pt extends fe{constructor(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Map,a=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,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:new Map,n=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(),k(this,"numberOfColumns",void 0),k(this,"numberOfRows",void 0),k(this,"data",void 0),k(this,"columnMins",void 0),k(this,"columnMaxs",void 0),k(this,"columnAxes",void 0),k(this,"valuePlacements",void 0),k(this,"directions",void 0),k(this,"positiveColors",void 0),k(this,"negativeColors",void 0),k(this,"opacities",void 0),k(this,"textAlignments",void 0),k(this,"markers",void 0),this.positiveColors=a,this.negativeColors=l,this.data=r,this.columnAxes=o,this.valuePlacements=s,this.opacities=i,this.directions=n,this.textAlignments=d,this.markers=h,this.numberOfRows=Math.max(...r.map(g=>g.length)),this.numberOfColumns=r.length,this.columnMins=new Map,this.columnMaxs=new Map;for(var c=0;c<r.length;c+=1){var m=r[c];xt(m)&&(this.columnMins.set(c,Math.min(...m)),this.columnMaxs.set(c,Math.max(...m)))}}get rowCount(){return this.numberOfRows}get columnCount(){return this.numberOfColumns}textForCell(r,o){var a;return"".concat((a=this.data[r])===null||a===void 0?void 0:a[o])}textForColumnHeader(r){return"".concat(r)}textAlignForCell(r,o){var a;return(a=this.textAlignments.get(r))!==null&&a!==void 0?a:vt}renderTypeForCell(r,o){return r<20||r%2===o%2?"dataBar":"text"}dataBarOptionsForCell(r,o){var a,l,s,i,n,d,h,c=Ye(this.columnMins,r),m=Ye(this.columnMaxs,r),g=(a=this.columnAxes.get(r))!==null&&a!==void 0?a:dt,v=(l=this.valuePlacements.get(r))!==null&&l!==void 0?l:mt,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:gt,O=(i=this.positiveColors.get(r))!==null&&i!==void 0?i:ht,te=(n=this.negativeColors.get(r))!==null&&n!==void 0?n:ut,V=Number((d=this.data[r])===null||d===void 0?void 0:d[o]),W=V>=0?O:te,me=(h=this.markers.get(r))!==null&&h!==void 0?h:[];return{columnMin:c,columnMax:m,axis:g,color:W,valuePlacement:v,opacity:b,markers:me,direction:y,value:V}}}const ft=pt,Ne="hide-from-e2e-tests",dr="sample-section";function*$r(t=1){for(;;)t=t*16807%2147483647,yield t/2147483647}function bt(t=1){const[r]=u.useState(()=>$r(t));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(t,r=[]){const o=`${dr}-${t.toLocaleLowerCase().replaceAll(" ","-")}`,a=H(dr,...r);return{id:o,className:a}}function N(t,r=[]){const{id:o,className:a}=p(t,r);return{id:o,UNSAFE_className:a}}function R(){}class J extends u.Component{static renderButtonBrand(r,o){const a=r.length?`btn-${r}-${o}`:`btn-${o}`;return e.jsx(fo,{className:a,style:{marginBottom:"1rem",marginRight:"1rem"},children:o},o)}static renderButtons(r){const o=["primary","secondary","success","warning","danger","info"].map(a=>J.renderButtonBrand(r,a));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(C,{gap:"1rem",children:Object.entries(r).map(([o,a])=>e.jsxs("a",{className:`text-${o}`,children:[o," (",a,")"]},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:R,children:"Unlinked"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,onClick:R,children:"Linked"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinkedSource:!0,onClick:R,children:"Linked Source"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,isInvalid:!0,onClick:R,children:"Error"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},disabled:!0,onClick:R,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:G,tooltip:"test",onClick:R}),"Toggle button (class active):",e.jsx(x,{className:"mx-2",onClick:()=>{this.setState({toggle:!r})},active:r,kind:"inline",icon:G,tooltip:"test"}),"Disabled:",e.jsx(x,{className:"mx-2",kind:"inline",disabled:!0,onClick:R,children:"Disabled"}),"With Text:",e.jsx(x,{className:"mx-2",kind:"inline",icon:G,onClick:R,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:G,tooltip:"test",onClick:R}),e.jsx("span",{className:"mx-2",children:"btn-link:"}),e.jsx(x,{kind:"ghost",onClick:R,children:"Text Button"}),e.jsx("span",{className:"mx-2",children:"btn-link (text w/ optional with icon):"}),e.jsx(x,{kind:"ghost",icon:G,onClick:R,children:"Text Button"})]})}render(){const r=["","outline"].map(s=>J.renderButtons(s)),o=this.renderInlineButtons(),a=J.renderSocketedButtons(),l=J.renderLinks();return e.jsxs("div",{children:[e.jsx("h2",{className:"ui-title",children:"Buttons"}),e.jsxs("div",{style:{padding:"1rem 0"},children:[r,o,a,l]})]})}}function jt(){const t=Dr();sr.random=bt();const[r]=u.useState(()=>new sr(t));return e.jsxs("div",{...p("charts"),children:[e.jsx("h2",{className:"ui-title",children:"Chart"}),e.jsx("div",{style:{height:500},children:e.jsx(bo,{model:r})})]})}const Ve="2px solid var(--dh-color-notice-bg)",yt={"--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"},hr={"--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"},wt={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 de(t){const r=he.parseRgba(he.asRgbOrRgbaString(t)??"");if(r==null||r.a<.5)return"white";const{r:o,g:a,b:l}=r;return he.getBrightness([o,a,l])>=128?"black":"white"}function Ct(t){const r=getComputedStyle(document.documentElement);return t.split(/[\n;]/g).map(a=>/^(?:\s{2}|:root\{)?(--dh-color-(?:[^:]+))/.exec(a)?.[1]).filter(a=>!!a).map(a=>{const l=r.getPropertyValue(a);return a==="--dh-color-chart-colorway"?no(l??"").map(([i,n])=>l.substring(i,n+1)).map((i,n)=>({name:`${a}-${n}`,value:i})):{name:a,value:l}}).flat()}function Q(t,r,o,a=yt){const l=wt[t];return Ct(r).reduce((n,{name:d,value:h})=>{if(/^--dh-color-true-(.*?)$/.test(d)||/^--dh-color-gray-(light|mid|dark)$/.test(d))return n;const c=/^--dh-color-([^-]+)(?:-([^-]+))?/.exec(d);let m=a[d]??c?.[o]??c?.[1]??"???";return m=l[m]??m,n[m]==null&&(n[m]=[]),d in hr&&n[m].push({isLabel:!0,name:hr[d],value:""}),/^--dh-color-gray-(light|mid|dark)$/.test(d)||n[m].push({name:d,value:h}),n},{})}function St(){const t=u.useRef(null);return u.useLayoutEffect(()=>{if(t.current==null)return;const r=getComputedStyle(t.current),{backgroundColor:o}=r;t.current.style.color=de(o)},[]),t}function Tt(t,r){const[o,a]=u.useState();return u.useEffect(()=>{if(t.current==null)return;const l=getComputedStyle(t.current,r).getPropertyValue("content"),s=/"(--dh-color-.*?)[,"]/.exec(l)?.[1];if(s==null)return;const i=getComputedStyle(t.current).getPropertyValue(s);a(i)},[t,r]),o}function De({className:t,children:r}){const o=St(),a=Tt(o,":after"),l=u.useMemo(()=>a!=null?{value:a}:null,[a]),s=l!=null&&l.value!=="";return e.jsxs("div",{ref:o,className:t,style:{border:s?void 0:Ve},children:[s&&e.jsx(ee,{interactive:!0,children:e.jsx("div",{children:l.value})}),r]})}function kt(){const t=["100","200","300","400","500","600","700","800","850","8XX","900"].map(a=>e.jsx(De,{className:H("swatch","gray-swatch",`gray-swatch-${a}`),children:a==="8XX"?"N/A":`Gray-${a}`},a)),r=["red","orange","yellow","green","blue","purple","white","black"].map(a=>e.jsx(De,{className:H("swatch",`swatch-${a}`),children:a},a)),o=["content-bg","background","foreground","primary","primary-dark","secondary","secondary-hover","success","info","warning","danger","danger-hover"].map(a=>e.jsx(De,{className:H("swatch",`swatch-${a}`),children:a},a));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:[t,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 Nt 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:He,action:()=>{alert(`Alert${o}!`)},shortcut:new re({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[A.CTRL,M.A],macShortcut:[A.CMD,M.A]})},{title:`Log Message${o}`,icon:ze,action:()=>{console.log(`Logging a message${o}!`)},shortcut:new re({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[A.CTRL,M.L],macShortcut:[A.CMD,M.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(),a=[{title:"Show Shortcuts",icon:Tr,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new re({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[A.CTRL,M.SLASH],macShortcut:[A.CMD,M.SLASH]}),group:ge.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(ge,{actions:a})]}),e.jsxs(x,{kind:"tertiary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(ge,{actions:l})]})]})}}class Dt extends u.Component{constructor(r){super(r),this.sampleInput=ue.createRef(),this.handleUpdateCheckboxMap=this.handleUpdateCheckboxMap.bind(this);const o=["Parent A",new Map([["Child 1",!0],["Child 2",!1]])],a=["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,a,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(yo,{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(Eo,{menuText:"Checkbox Menu",valueMap:o,onUpdateValueMap:this.handleUpdateCheckboxMap})]})}}class It extends u.Component{constructor(r){super(r),this.state={isShown:!1}}render(){const r=[{title:"Show Alert",icon:He,action:()=>{alert("Alert!")},shortcut:new re({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[A.CTRL,M.A],macShortcut:[A.CMD,M.A]})},{title:"Log Message",icon:ze,action:()=>{console.log("Logging a message!")},shortcut:new re({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[A.CTRL,M.L],macShortcut:[A.CMD,M.L]})}],a=[{title:"Show Shortcuts",icon:Tr,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new re({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[A.CTRL,M.SLASH],macShortcut:[A.CMD,M.SLASH]}),group:ge.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:co,onClick:()=>{},children:e.jsx(or,{actions:a})}),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(or,{isShown:l,onMenuClosed:()=>{this.setState({isShown:!1})},actions:a})]})]})}}const Et=`trades = db.t("LearnDeephaven", "StockTrades").where("Date=\`2017-08-25\`")\\
1
+ import{r as u,K as H,I as e,al as C,M as ue,_ as wr,V as xe,L as T,a7 as z,U as Xe,ax as Or,aS as L,aT as Cr,aU as D,a5 as Vr,a6 as P,a9 as Ur,aa as Ue,aV as Gr,ab as Hr,ac as Ge,a8 as $,ae as zr,af as j,aW as Wr,aX as Pe,aY as q,aZ as qr,ad as Kr,a_ as Le,aj as Sr,ai as f,a$ as _e,b0 as Zr,b1 as Xr,ak as Yr,b2 as Qr,b3 as Jr,b4 as eo,b5 as K,b6 as ro,b7 as be,b8 as E,b9 as oo,ba as to,am as Be,az as ao,bb as lo,bc as je,Q as so,a4 as io}from"./vendor-19d67aee.js";import{aW as Ye,aX as G,aN as he,a3 as no,aY as He,aZ as ze,a_ as Tr,aF as co,a$ as Z,b0 as Qe,G as Je,b1 as er,I as Fe,b2 as ho,b3 as uo,N as mo,b4 as go,b5 as vo,aJ as rr,b6 as xo}from"./index-9d39bc05.js";import{W as po}from"./monaco-b5248072.js";import{f as fe,d as kr,m as X,B as fo,S as le,L as bo,c as ye,I as jo,R as Nr,a as F}from"./IrisGridModel-874ec2ee.js";import{B as x,u as Dr,s as ee,q as re,aW as A,K as M,am as ge,ak as yo,H as or,cs as tr,N as wo,C as _,aZ as se,S as ve,aR as Co,an as So,d as ar,a$ as Ir,z as lr,bv as Y,aq as To,aC as ko,aa as No,aI as Do,w as Io}from"./ControlType-47c5efae.js";import{M as sr,H as Eo,A as $o,V as we,T as Ao,D as Mo,C as Ro,a as Po,c as Lo,b as _o,P as Ce,j as Bo}from"./FontBootstrap-834f018d.js";import{G as oe,T as Fo}from"./Grid-a1df1631.js";import{G as Er,C as Oe,O as Oo,a as Vo,S as Uo,b as ce,P as ir,e as Go,c as Ho}from"./GridRenderer-c55aefc8.js";import{a as nr,D as zo}from"./IrisGridShortcuts-a8c63cbe.js";import{N as Wo,T as qo}from"./useUser-2327a307.js";import{L as Ko}from"./AppRoot-a463cf9e.js";import"./helpers-de833af9.js";function cr(t,r,o,a,l,s,i){try{var n=t[s](i),d=n.value}catch(h){o(h);return}n.done?r(d):Promise.resolve(d).then(a,l)}function Se(t){return function(){var r=this,o=arguments;return new Promise(function(a,l){var s=t.apply(r,o);function i(d){cr(s,a,l,i,n,"next",d)}function n(d){cr(s,a,l,i,n,"throw",d)}i(void 0)})}}function B(t,r,o){return r=Zo(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function Zo(t){var r=Xo(t,"string");return typeof r=="symbol"?r:String(r)}function Xo(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var a=o.call(t,r||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class Yo extends fe{constructor(){var{rowCount:r=1e9,columnCount:o=100,floatingTopRowCount:a=0,floatingBottomRowCount:l=0,floatingLeftColumnCount:s=0,floatingRightColumnCount:i=0,isEditable:n=!1,editedData:d=[]}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),B(this,"numRows",void 0),B(this,"numColumns",void 0),B(this,"floatingTop",void 0),B(this,"floatingBottom",void 0),B(this,"floatingLeft",void 0),B(this,"floatingRight",void 0),B(this,"editable",void 0),B(this,"editedData",void 0),this.numRows=r,this.numColumns=o,this.floatingTop=a,this.floatingBottom=l,this.floatingLeft=s,this.floatingRight=i,this.editable=n,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 a,l;return(a=(l=this.editedData[r])===null||l===void 0?void 0:l[o])!==null&&a!==void 0?a:"".concat(r,",").concat(o)}colorForCell(r,o,a){return a.textColor}textForColumnHeader(r){return"".concat(r)}textForRowHeader(r){return"".concat(r)}textForRowFooter(r){return"".concat(r)}setValueForCell(r,o,a){var l=this;return Se(function*(){l.editedData[r]==null&&(l.editedData[r]=[]),l.editedData[r][o]="".concat(a)})()}setValueForRanges(r,o){var a=this;return Se(function*(){kr.forEachCell(r,(l,s)=>{a.setValueForCell(l,s,o)})})()}setValues(r){var o=this;return Se(function*(){for(var a=0;a<r.length;a+=1){var l,s,i=r[a];o.setValueForCell((l=i.column)!==null&&l!==void 0?l:i.x,(s=i.row)!==null&&s!==void 0?s:i.y,i.text)}})()}editValueForCell(r,o){return this.textForCell(r,o)}isValidForCell(r,o,a){return!0}isEditableRange(r){return this.isEditable}delete(r){throw new Error("Method not implemented.")}}const We=Yo;function S(t,r,o){return r=Qo(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function Qo(t){var r=Jo(t,"string");return typeof r=="symbol"?r:String(r)}function Jo(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var a=o.call(t,r||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class I extends We{constructor(){var{rowCount:r=I.DEFAULT_ROW_COUNT,columnCount:o=I.DEFAULT_COLUMN_COUNT,children:a=new Map,childRowCount:l=Math.ceil(Math.max(I.MIN_CHILD_ROW_COUNT,r*I.DEFAULT_CHILD_ROW_COUNT_FACTOR)),maxDepth:s=I.MAX_DEPTH}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super({rowCount:r,columnCount:o}),S(this,"children",void 0),S(this,"childRowCount",void 0),S(this,"maxDepth",void 0),S(this,"getCachedModelRowOffset",X((i,n)=>{for(var d=null,h=n,c=[...i].sort((y,O)=>y[0]-O[0]),m=0;m<c.length;m+=1){var[g,v]=c[m];if(h<=g)break;var b=v.rowCount;if(h<=g+b){d=g,h=h-g-1;break}h-=b}return{key:d,offsetRow:h}})),S(this,"getCachedTextForRowHeader",X((i,n)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(i,n);if(d!=null){var c=i.get(d);if(c!==void 0)return"".concat(d,".").concat(c.textForRowHeader(h))}return"".concat(h)})),S(this,"getCachedTextForCell",X((i,n,d)=>{var{key:h,offsetRow:c}=this.getCachedModelRowOffset(i,d);if(h!=null){var m=i.get(h);if(m!==void 0)return"".concat(h,".").concat(m.textForCell(n,c))}return"".concat(n,",").concat(c)})),S(this,"getCachedIsRowExpandable",X((i,n,d)=>{var h=this.getCachedDepthForRow(i,n);return h<d})),S(this,"getCachedIsRowExpanded",X((i,n)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(i,n);if(d!=null){var c=i.get(d);if(c!==void 0)return c.isRowExpanded(h)}return i.has(h)})),S(this,"getCachedDepthForRow",X((i,n)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(i,n);if(d!=null){var c=i.get(d);if(c!==void 0)return c.depthForRow(h)+1}return 0})),this.children=a,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 a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,{key:l,offsetRow:s}=this.getCachedModelRowOffset(this.children,r),i=new Map(this.children);if(l!=null){var n=this.children.get(l);if(n!==void 0){var{rowCount:d}=n;n.setRowExpanded(s,o,a),this.numRows+=n.rowCount-d}}else if(o){var c=new I({rowCount:this.childRowCount,columnCount:this.numColumns});i.set(s,c),this.numRows+=c.rowCount}else{var h=i.get(s);h!==void 0&&(this.numRows-=h.rowCount,i.delete(s))}this.children=i}expandAll(){throw new Error("Expand all not implemented.")}collapseAll(){throw new Error("Collapse all not implemented.")}depthForRow(r){return this.getCachedDepthForRow(this.children,r)}}S(I,"DEFAULT_ROW_COUNT",1e9);S(I,"DEFAULT_COLUMN_COUNT",100);S(I,"DEFAULT_CHILD_ROW_COUNT_FACTOR",.01);S(I,"MIN_CHILD_ROW_COUNT",10);S(I,"MAX_DEPTH",10);const qe=I;function Te(t,r,o){return r=et(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function et(t){var r=rt(t,"string");return typeof r=="symbol"?r:String(r)}function rt(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var a=o.call(t,r||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class ot extends fe{constructor(r,o){var a;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),(a=o?.length)!==null&&a!==void 0?a:0),this.columnHeaders=o}get rowCount(){return this.data.length}get columnCount(){return this.numberOfColumns}textForCell(r,o){var a;return"".concat((a=this.data[o])===null||a===void 0?void 0:a[r])}textForColumnHeader(r){var o,a;return(o=(a=this.columnHeaders)===null||a===void 0?void 0:a[r])!==null&&o!==void 0?o:""}}const tt=ot;function ke(t,r,o){return r=at(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function at(t){var r=lt(t,"string");return typeof r=="symbol"?r:String(r)}function lt(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var a=o.call(t,r||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class st extends fe{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 a,l,s,i,n,d,h,c=o-((a=(l=this.viewportData)===null||l===void 0?void 0:l.rowOffset)!==null&&a!==void 0?a:0),m=r-((s=(i=this.viewportData)===null||i===void 0?void 0:i.columnOffset)!==null&&s!==void 0?s:0);return"".concat((n=(d=this.viewportData)===null||d===void 0||(h=d.data[c])===null||h===void 0?void 0:h[m])!==null&&n!==void 0?n:"")}textForColumnHeader(r){return"".concat(r)}textForRowHeader(r){return"".concat(r)}}const it=st;function k(t,r,o){return r=nt(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function nt(t){var r=ct(t,"string");return typeof r=="symbol"?r:String(r)}function ct(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var a=o.call(t,r||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var dt="proportional",ht=Er.positiveBarColor,ut=Er.negativeBarColor,mt="beside",gt="LTR",vt="right";function xt(t){return Array.isArray(t)&&t.every(r=>typeof r=="number")}class pt extends fe{constructor(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Map,a=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,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:new Map,n=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(),k(this,"numberOfColumns",void 0),k(this,"numberOfRows",void 0),k(this,"data",void 0),k(this,"columnMins",void 0),k(this,"columnMaxs",void 0),k(this,"columnAxes",void 0),k(this,"valuePlacements",void 0),k(this,"directions",void 0),k(this,"positiveColors",void 0),k(this,"negativeColors",void 0),k(this,"opacities",void 0),k(this,"textAlignments",void 0),k(this,"markers",void 0),this.positiveColors=a,this.negativeColors=l,this.data=r,this.columnAxes=o,this.valuePlacements=s,this.opacities=i,this.directions=n,this.textAlignments=d,this.markers=h,this.numberOfRows=Math.max(...r.map(g=>g.length)),this.numberOfColumns=r.length,this.columnMins=new Map,this.columnMaxs=new Map;for(var c=0;c<r.length;c+=1){var m=r[c];xt(m)&&(this.columnMins.set(c,Math.min(...m)),this.columnMaxs.set(c,Math.max(...m)))}}get rowCount(){return this.numberOfRows}get columnCount(){return this.numberOfColumns}textForCell(r,o){var a;return"".concat((a=this.data[r])===null||a===void 0?void 0:a[o])}textForColumnHeader(r){return"".concat(r)}textAlignForCell(r,o){var a;return(a=this.textAlignments.get(r))!==null&&a!==void 0?a:vt}renderTypeForCell(r,o){return r<20||r%2===o%2?"dataBar":"text"}dataBarOptionsForCell(r,o){var a,l,s,i,n,d,h,c=Ye(this.columnMins,r),m=Ye(this.columnMaxs,r),g=(a=this.columnAxes.get(r))!==null&&a!==void 0?a:dt,v=(l=this.valuePlacements.get(r))!==null&&l!==void 0?l:mt,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:gt,O=(i=this.positiveColors.get(r))!==null&&i!==void 0?i:ht,te=(n=this.negativeColors.get(r))!==null&&n!==void 0?n:ut,V=Number((d=this.data[r])===null||d===void 0?void 0:d[o]),W=V>=0?O:te,me=(h=this.markers.get(r))!==null&&h!==void 0?h:[];return{columnMin:c,columnMax:m,axis:g,color:W,valuePlacement:v,opacity:b,markers:me,direction:y,value:V}}}const ft=pt,Ne="hide-from-e2e-tests",dr="sample-section";function*$r(t=1){for(;;)t=t*16807%2147483647,yield t/2147483647}function bt(t=1){const[r]=u.useState(()=>$r(t));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(t,r=[]){const o=`${dr}-${t.toLocaleLowerCase().replaceAll(" ","-")}`,a=H(dr,...r);return{id:o,className:a}}function N(t,r=[]){const{id:o,className:a}=p(t,r);return{id:o,UNSAFE_className:a}}function R(){}class J extends u.Component{static renderButtonBrand(r,o){const a=r.length?`btn-${r}-${o}`:`btn-${o}`;return e.jsx(fo,{className:a,style:{marginBottom:"1rem",marginRight:"1rem"},children:o},o)}static renderButtons(r){const o=["primary","secondary","success","warning","danger","info"].map(a=>J.renderButtonBrand(r,a));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(C,{gap:"1rem",children:Object.entries(r).map(([o,a])=>e.jsxs("a",{className:`text-${o}`,children:[o," (",a,")"]},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:R,children:"Unlinked"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,onClick:R,children:"Linked"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinkedSource:!0,onClick:R,children:"Linked Source"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,isInvalid:!0,onClick:R,children:"Error"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},disabled:!0,onClick:R,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:G,tooltip:"test",onClick:R}),"Toggle button (class active):",e.jsx(x,{className:"mx-2",onClick:()=>{this.setState({toggle:!r})},active:r,kind:"inline",icon:G,tooltip:"test"}),"Disabled:",e.jsx(x,{className:"mx-2",kind:"inline",disabled:!0,onClick:R,children:"Disabled"}),"With Text:",e.jsx(x,{className:"mx-2",kind:"inline",icon:G,onClick:R,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:G,tooltip:"test",onClick:R}),e.jsx("span",{className:"mx-2",children:"btn-link:"}),e.jsx(x,{kind:"ghost",onClick:R,children:"Text Button"}),e.jsx("span",{className:"mx-2",children:"btn-link (text w/ optional with icon):"}),e.jsx(x,{kind:"ghost",icon:G,onClick:R,children:"Text Button"})]})}render(){const r=["","outline"].map(s=>J.renderButtons(s)),o=this.renderInlineButtons(),a=J.renderSocketedButtons(),l=J.renderLinks();return e.jsxs("div",{children:[e.jsx("h2",{className:"ui-title",children:"Buttons"}),e.jsxs("div",{style:{padding:"1rem 0"},children:[r,o,a,l]})]})}}function jt(){const t=Dr();sr.random=bt();const[r]=u.useState(()=>new sr(t));return e.jsxs("div",{...p("charts"),children:[e.jsx("h2",{className:"ui-title",children:"Chart"}),e.jsx("div",{style:{height:500},children:e.jsx(bo,{model:r})})]})}const Ve="2px solid var(--dh-color-notice-bg)",yt={"--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"},hr={"--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"},wt={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 de(t){const r=he.parseRgba(he.asRgbOrRgbaString(t)??"");if(r==null||r.a<.5)return"white";const{r:o,g:a,b:l}=r;return he.getBrightness([o,a,l])>=128?"black":"white"}function Ct(t){const r=getComputedStyle(document.documentElement);return t.split(/[\n;]/g).map(a=>/^(?:\s{2}|:root\{)?(--dh-color-(?:[^:]+))/.exec(a)?.[1]).filter(a=>!!a).map(a=>{const l=r.getPropertyValue(a);return a==="--dh-color-chart-colorway"?no(l??"").map(([i,n])=>l.substring(i,n+1)).map((i,n)=>({name:`${a}-${n}`,value:i})):{name:a,value:l}}).flat()}function Q(t,r,o,a=yt){const l=wt[t];return Ct(r).reduce((n,{name:d,value:h})=>{if(/^--dh-color-true-(.*?)$/.test(d)||/^--dh-color-gray-(light|mid|dark)$/.test(d))return n;const c=/^--dh-color-([^-]+)(?:-([^-]+))?/.exec(d);let m=a[d]??c?.[o]??c?.[1]??"???";return m=l[m]??m,n[m]==null&&(n[m]=[]),d in hr&&n[m].push({isLabel:!0,name:hr[d],value:""}),/^--dh-color-gray-(light|mid|dark)$/.test(d)||n[m].push({name:d,value:h}),n},{})}function St(){const t=u.useRef(null);return u.useLayoutEffect(()=>{if(t.current==null)return;const r=getComputedStyle(t.current),{backgroundColor:o}=r;t.current.style.color=de(o)},[]),t}function Tt(t,r){const[o,a]=u.useState();return u.useEffect(()=>{if(t.current==null)return;const l=getComputedStyle(t.current,r).getPropertyValue("content"),s=/"(--dh-color-.*?)[,"]/.exec(l)?.[1];if(s==null)return;const i=getComputedStyle(t.current).getPropertyValue(s);a(i)},[t,r]),o}function De({className:t,children:r}){const o=St(),a=Tt(o,":after"),l=u.useMemo(()=>a!=null?{value:a}:null,[a]),s=l!=null&&l.value!=="";return e.jsxs("div",{ref:o,className:t,style:{border:s?void 0:Ve},children:[s&&e.jsx(ee,{interactive:!0,children:e.jsx("div",{children:l.value})}),r]})}function kt(){const t=["100","200","300","400","500","600","700","800","850","8XX","900"].map(a=>e.jsx(De,{className:H("swatch","gray-swatch",`gray-swatch-${a}`),children:a==="8XX"?"N/A":`Gray-${a}`},a)),r=["red","orange","yellow","green","blue","purple","white","black"].map(a=>e.jsx(De,{className:H("swatch",`swatch-${a}`),children:a},a)),o=["content-bg","background","foreground","primary","primary-dark","secondary","secondary-hover","success","info","warning","danger","danger-hover"].map(a=>e.jsx(De,{className:H("swatch",`swatch-${a}`),children:a},a));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:[t,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 Nt 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:He,action:()=>{alert(`Alert${o}!`)},shortcut:new re({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[A.CTRL,M.A],macShortcut:[A.CMD,M.A]})},{title:`Log Message${o}`,icon:ze,action:()=>{console.log(`Logging a message${o}!`)},shortcut:new re({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[A.CTRL,M.L],macShortcut:[A.CMD,M.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(),a=[{title:"Show Shortcuts",icon:Tr,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new re({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[A.CTRL,M.SLASH],macShortcut:[A.CMD,M.SLASH]}),group:ge.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(ge,{actions:a})]}),e.jsxs(x,{kind:"tertiary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(ge,{actions:l})]})]})}}class Dt extends u.Component{constructor(r){super(r),this.sampleInput=ue.createRef(),this.handleUpdateCheckboxMap=this.handleUpdateCheckboxMap.bind(this);const o=["Parent A",new Map([["Child 1",!0],["Child 2",!1]])],a=["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,a,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(yo,{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(Eo,{menuText:"Checkbox Menu",valueMap:o,onUpdateValueMap:this.handleUpdateCheckboxMap})]})}}class It extends u.Component{constructor(r){super(r),this.state={isShown:!1}}render(){const r=[{title:"Show Alert",icon:He,action:()=>{alert("Alert!")},shortcut:new re({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[A.CTRL,M.A],macShortcut:[A.CMD,M.A]})},{title:"Log Message",icon:ze,action:()=>{console.log("Logging a message!")},shortcut:new re({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[A.CTRL,M.L],macShortcut:[A.CMD,M.L]})}],a=[{title:"Show Shortcuts",icon:Tr,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new re({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[A.CTRL,M.SLASH],macShortcut:[A.CMD,M.SLASH]}),group:ge.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:co,onClick:()=>{},children:e.jsx(or,{actions:a})}),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(or,{isShown:l,onMenuClosed:()=>{this.setState({isShown:!1})},actions:a})]})]})}}const Et=`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
  `,ua="_themeColorsPalette_1mdfo_1",ma="_swatch_1mdfo_7",ga="_themeColors_1mdfo_1",va="_label_1mdfo_21",xa="_capitalize_1mdfo_29",U={themeColorsPalette:ua,swatch:ma,themeColors:ga,label:va,capitalize:xa};function pa(){return{"Theme Color Palette":Q("palette",sa,1),"Semantic Colors":Q("semantic",ia,1),"Chart Colors":Q("chart",na,2),"Editor Colors":Q("editor",ca,2),"Grid Colors":Q("grid",da,2),"Component Colors":Q("component",ha,1)}}function fa(){const{selectedThemeKey:t}=Ir(),r=u.useMemo(pa,[t]);return e.jsx(e.Fragment,{children:Object.entries(r).map(([o,a],l)=>o==="Theme Color Palette"?e.jsxs("div",{...p(o),children:[e.jsx("h2",{className:"ui-title",children:o}),e.jsx("div",{className:U.themeColorsPalette,children:Object.entries(a).map(([s,i],n)=>e.jsxs(u.Fragment,{children:[(n===0||n===1)&&i.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}),i.map(({name:d,value:h})=>e.jsxs("div",{style:{backgroundColor:h,border:h===""&&d.length>0?Ve:void 0,color:`var(--dh-color-${de(h)})`},className:H(U.swatch,"px-0"),children:[e.jsxs(ee,{interactive:!0,children:[e.jsx("div",{children:d}),e.jsx("div",{children:h}),e.jsx("div",{children:he.normalizeCssColor(h,!0)})]}),e.jsx(lr,{copy:d,style:{color:`var(--dh-color-${de(h)})`}})]},d))]},s))})]},o):e.jsxs("div",{...p(o),children:[e.jsx("h2",{className:"ui-title",children:o}),e.jsx("div",{className:U.themeColors,children:Object.entries(a).map(([s,i])=>e.jsxs("div",{style:{gridRow:`span ${i.length+1}`},children:[e.jsx("span",{className:H(U.label,U.capitalize),children:s}),i.map(({isLabel:n,name:d,value:h,note:c})=>n===!0?e.jsx("span",{className:U.label,children:d},d):e.jsxs("div",{className:U.swatch,style:{backgroundColor:h,border:h===""&&d.length>0?Ve:void 0,color:`var(--dh-color-${de(h)})`},children:[e.jsxs(ee,{interactive:!0,children:[e.jsx("div",{children:d}),e.jsx("div",{children:h}),e.jsx("div",{children:he.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(lr,{copy:d,style:{color:`var(--dh-color-${de(h)})`}})]},d))]},s))})]},o))})}const Re="data-menu-category",ba="data-no-menu",ja="sample-section-e2e-ignore",Mr="spectrum-component-samples",Rr="spectrum-comparison-samples";function ya(){return e.jsxs("div",{id:Mr,children:[e.jsx("h2",{className:"ui-title","data-no-menu":!0,children:"Spectrum Components"}),e.jsxs(L,{gap:20,columns:Cr("0px","1fr"),children:[e.jsxs(D,{...N("spectrum-buttons"),children:[e.jsx("h3",{children:"Buttons"}),e.jsx(wa,{})]}),e.jsxs(D,{...N("spectrum-collections"),children:[e.jsx("h3",{children:"Collections"}),e.jsx(ka,{})]}),e.jsxs(D,{...N("spectrum-content"),children:[e.jsx("h3",{children:"Content"}),e.jsx(Ta,{})]}),e.jsxs(D,{...N("spectrum-forms"),children:[e.jsx("h3",{children:"Forms"}),e.jsx(Sa,{})]}),e.jsxs(D,{...N("spectrum-overlays"),children:[e.jsx("h3",{children:"Overlays"}),e.jsxs(C,{gap:"size-160",children:[e.jsx(Ca,{}),e.jsxs(Vr,{children:[e.jsx(P,{children:"Dialog Trigger"}),t=>e.jsxs(Ur,{children:[e.jsx(Ue,{children:"Some Heading"}),e.jsx(Gr,{children:"Some Header"}),e.jsx(Hr,{}),e.jsx(Ge,{children:e.jsx($,{children:"Are you sure?"})}),e.jsxs(zr,{children:[e.jsx(j,{variant:"secondary",onPress:t,children:"Cancel"}),e.jsx(j,{variant:"accent",onPress:t,children:"Confirm"})]})]})]})]})]}),e.jsxs(D,{...N("spectrum-well"),children:[e.jsx("h3",{children:"Wells"}),e.jsx(Wr,{children:"This is a well."})]})]})]})}function wa(){return e.jsxs(e.Fragment,{children:[e.jsxs(P,{marginBottom:"size-200",children:[e.jsx(z,{children:e.jsx(T,{icon:G})}),e.jsx($,{children:"Icon Button"})]}),e.jsxs(L,{autoFlow:"column",columnGap:"size-250",rowGap:"size-150",columns:Pe(4,Cr(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(q,{children:"Normal"}),e.jsx(q,{isQuiet:!0,children:"Quiet"}),e.jsx(q,{gridRow:"span 2",isEmphasized:!0,children:"Emphasized"}),e.jsx(q,{staticColor:"black",children:"Static Black"}),e.jsx(q,{staticColor:"white",children:"Static White"}),e.jsx(q,{isDisabled:!0,children:"Disabled"})]})]})}function Ca(){return e.jsxs(e.Fragment,{children:[e.jsx($,{children:"Contextual Help"}),e.jsxs(qr,{variant:"info",children:[e.jsx(Ue,{children:"Need help?"}),e.jsx(Ge,{children:e.jsx($,{children:"This is a helpful description of the thing you need help with."})})]})]})}function Sa(){return e.jsx(Kr,{children:e.jsxs(L,{gap:20,columns:Pe("auto-fit","210px"),alignItems:"end",children:[e.jsx(Le,{label:"Text Field"}),e.jsxs(Sr,{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(Zr,{label:"Slider",defaultValue:24}),e.jsx(Xr,{children:"Switch"})]})})}function Ta(){return e.jsxs(Yr,{children:[e.jsx(z,{size:"XL",children:e.jsx(T,{icon:mo})}),e.jsx(Ue,{children:"Illustrated Message"}),e.jsx(Ge,{children:"This is the content of the message."})]})}function ka(){return e.jsxs(e.Fragment,{children:[e.jsx("label",{id:"table-view-sample",children:"List View"}),e.jsxs(Qr,{"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(Jr,{"aria-labelledby":"table-view-sample",selectionMode:"multiple",children:[e.jsxs(eo,{children:[e.jsxs(K,{title:"Person",children:[e.jsx(K,{allowsResizing:!0,children:"Name"}),e.jsx(K,{children:"Age"})]}),e.jsxs(K,{title:"Address",children:[e.jsx(K,{allowsResizing:!0,children:"City"}),e.jsx(K,{children:"State"})]})]}),e.jsxs(ro,{children:[e.jsxs(be,{children:[e.jsx(E,{children:"John"}),e.jsx(E,{children:"42"}),e.jsx(E,{children:"San Francisco"}),e.jsx(E,{children:"CA"})]}),e.jsxs(be,{children:[e.jsx(E,{children:"Jane"}),e.jsx(E,{children:"38"}),e.jsx(E,{children:"San Francisco"}),e.jsx(E,{children:"CA"})]}),e.jsxs(be,{children:[e.jsx(E,{children:"Becky"}),e.jsx(E,{children:"12"}),e.jsx(E,{children:"San Francisco"}),e.jsx(E,{children:"CA"})]})]})]})]})}function ie(t){return e.jsx("div",{...t})}function Na(){const[t,r]=u.useState([]);u.useEffect(()=>{let a={category:"",items:[]};const l=[a],s=document.querySelector(`#${Mr}`),i=document.querySelector(`#sample-section-${Rr}`);document.querySelectorAll(`h2,h3,[${Re}]`).forEach(n=>{if(n.textContent==null||n.hasAttribute(ba))return;if(n.hasAttribute(Re)){a={category:n.getAttribute(Re)??"",items:[]},l.push(a);return}const h=`${s?.contains(n)===!0?"spectrum-":i?.contains(n)===!0?"spectrum-compare-":""}${n.textContent}`.toLowerCase().replace(/\s/g,"-");n.id=h,a.items.push({id:h,label:n.textContent})}),r(l)},[]),u.useEffect(()=>{const a=window.location.hash===""?null:document.querySelector(window.location.hash);setTimeout(()=>{a?a.scrollIntoView():window.scrollTo({top:0,behavior:"auto"})},0)},[]);const o=u.useCallback(a=>{const l=String(a);document.getElementById(l)?.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{window.location.hash=l},1e3)},[]);return e.jsxs(oo,{children:[e.jsx(P,{children:e.jsx(z,{children:e.jsx(T,{icon:go})})}),e.jsx(to,{items:t,onAction:o,children:({category:a,items:l})=>e.jsx(Be,{items:l,title:a,children:({id:s,label:i})=>e.jsx(f,{children:i},s)},a)})]})}function Da(){const t=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:t,children:e.jsx(z,{children:e.jsx(T,{icon:vo})})})}const Ia=["Tab 1","Tab 2","Tab 3"];function Ea({isActive:t,title:r}){return e.jsxs("li",{className:H("lm_tab",t&&"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 $a(){return e.jsxs("div",{...p("golden-layout"),children:[e.jsx("h2",{className:"ui-title",children:"Golden Layout"}),[!1,!0].map(t=>e.jsxs(ue.Fragment,{children:[e.jsx("h5",{children:t?"Minimized":"Maximised"}),e.jsx("div",{style:{position:"relative",border:"none"},className:t?"lm_maximised":void 0,children:e.jsxs("div",{className:"lm_header",children:[e.jsx("ul",{className:"lm_tabs",children:Ia.map((r,o)=>e.jsx(Ea,{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(t)))]})}function Aa(){return e.jsxs("div",{...p("animations",["sample-section-e2e-ignore"]),children:[e.jsx("h2",{className:"ui-title",children:"Animations"}),e.jsx(D,{position:"relative",height:400,children:e.jsx(_o,{})})]})}const jr=[["primary","accent"],["secondary","primary"],["danger","negative"]],Ma=[{title:"One",value:"1"},{title:"Two",value:"2"},{title:"Three",value:"3"}];function Ra(){const[t,r]=u.useState(!1),[o,a]=u.useState("1"),l=u.useCallback(s=>{a(s.target.value)},[]);return e.jsxs("div",{...p(Rr,[ja]),children:[e.jsx("h2",{className:"ui-title","data-no-menu":!0,children:"Bootstrap / Spectrum Comparison"}),e.jsxs(C,{gap:20,wrap:!0,children:[e.jsxs(D,{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"}),jr.map(([s,i])=>e.jsxs(u.Fragment,{children:[e.jsx(x,{onClick:Y,kind:s,icon:rr,children:"Button"}),e.jsxs(j,{variant:i,style:"fill",children:[e.jsx(z,{children:e.jsx(T,{icon:rr})}),e.jsx($,{children:"Button"})]})]},s)),e.jsx(x,{onClick:Y,kind:"primary",disabled:!0,children:"Disabled"}),e.jsx(j,{variant:"accent",style:"fill",isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(D,{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"}),jr.map(([s,i])=>e.jsxs(u.Fragment,{children:[e.jsx(x,{onClick:Y,kind:s,children:s}),e.jsx(j,{variant:i,style:"outline",children:i})]},s)),e.jsx(x,{onClick:Y,kind:"secondary",disabled:!0,children:"Disabled"}),e.jsx(j,{variant:"primary",style:"outline",isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(D,{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:Y,kind:"inline",children:"Inline"}),e.jsx(P,{children:"Action"}),e.jsx(x,{onClick:Y,kind:"inline",disabled:!0,children:"Disabled"}),e.jsx(P,{isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(D,{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:Ma,defaultValue:"One"})]}),e.jsxs(Sr,{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(ve,{disabled:s,placeholder:"Select",onChange:i=>{},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(ao,{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(D,{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(D,{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:t,onChange:()=>r(s=>!s),children:"Checkbox"}),e.jsx(_e,{children:"Checkbox"}),e.jsx(_,{className:"form-group",disabled:!0,checked:t,onChange:()=>r(s=>!s),children:"Disabled"}),e.jsx(_e,{isDisabled:!0,children:"Disabled"}),e.jsx(C,{direction:"column",children:e.jsxs("label",{children:["Radio Group",e.jsxs(Nr,{onChange:l,value:o,children:[e.jsx(F,{value:"1",children:"One"}),e.jsx(F,{value:"2",children:"Two"}),e.jsx(F,{value:"3",children:"Three"})]})]})}),e.jsxs(lo,{label:"Radio Group",value:o,onChange:a,children:[e.jsx(je,{value:"1",children:"One"}),e.jsx(je,{value:"2",children:"Two"}),e.jsx(je,{value:"3",children:"Three"})]})]})]})]})]})}function ne(){return e.jsx(z,{children:e.jsx(T,{icon:xo})})}function Pa(){return e.jsxs("div",{...p("pickers"),children:[e.jsx("h2",{className:"ui-title",children:"Pickers"}),e.jsxs(C,{gap:14,children:[e.jsx(Ce,{label:"Single Child",tooltip:{placement:"bottom-end"},children:e.jsx(f,{children:"Aaa"})}),e.jsxs(Ce,{label:"Mixed Children Types",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($,{children:"Complex Ccc with text that should be truncated"})]})]}),e.jsxs(Ce,{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($,{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($,{children:"Complex Fff"})]}),e.jsxs(f,{children:[e.jsx(ne,{}),e.jsx($,{children:"Label"}),e.jsx($,{slot:"description",children:"Description"})]},"Ggg"),e.jsxs(f,{children:[e.jsx(ne,{}),e.jsx($,{children:"Label that causes overflow"}),e.jsx($,{slot:"description",children:"Description that causes overflow"})]},"Hhh")]},"Key B")]})]})]})}const yr={position:"sticky",justifyContent:"end",zIndex:1,UNSAFE_style:{float:"right"}};function La(){const t=window.location.search.includes("isolateSection=true"),{themes:r}=Ir(),o=r.length>1;return e.jsx("div",{tabIndex:-1,role:"main",children:e.jsxs("div",{className:"container style-guide-container",children:[t&&e.jsx("style",{children:`.${Ne}, .sample-section:not(${window.location.hash}), :not(.sample-section) > h2 {
212
212
  display: none;
213
213
  }`}),e.jsx(C,{justifyContent:"space-between",alignItems:"center",marginTop:"2rem",marginBottom:"1rem",children:e.jsx("h1",{style:{paddingTop:"2rem"},children:"Deephaven UI Components"})}),e.jsxs(C,{...yr,UNSAFE_className:Ne,marginTop:-56,top:20,gap:10,alignItems:"end",children:[o?e.jsx(qo,{}):null,e.jsx(Na,{})]}),e.jsx(C,{...yr,UNSAFE_className:Ne,top:"calc(100vh - 40px)",marginTop:-32,marginEnd:o?-234:0,children:e.jsx(Da,{})}),e.jsx(Qt,{}),e.jsx(ie,{"data-menu-category":"Colors"}),e.jsx(kt,{}),e.jsx(fa,{}),e.jsx(ie,{"data-menu-category":"Layout"}),e.jsx($a,{}),e.jsx(ie,{"data-menu-category":"Components"}),e.jsx(J,{}),e.jsx(Zt,{}),e.jsx(zt,{}),e.jsx(Pa,{}),e.jsx(qt,{}),e.jsx(pe,{}),e.jsx(Xt,{}),e.jsx(Dt,{}),e.jsx(Kt,{}),e.jsx(Nt,{}),e.jsx(It,{}),e.jsx(la,{}),e.jsx(Yt,{}),e.jsx(Gt,{}),e.jsx(At,{}),e.jsx(Ot,{}),e.jsx(jt,{}),e.jsx(To,{}),e.jsx(Aa,{}),e.jsx(ie,{"data-menu-category":"Spectrum Components"}),e.jsx(ya,{}),e.jsx(ie,{"data-menu-category":"Spectrum Comparison"}),e.jsx(Ra,{})]})})}function Ke(t){const{workspace:r,setWorkspace:o}=t;return u.useEffect(()=>{Ko.makeDefaultWorkspace({getLayouts:async()=>[],getLayout:async()=>({})}).then(o)},[o]),r!=null?e.jsx(La,{}):null}Ke.propTypes={workspace:xe.shape({}),setWorkspace:xe.func.isRequired};Ke.defaultProps={workspace:null};const _a=t=>({workspace:No(t)}),Ba=so(_a,{setWorkspace:ko})(Ke);function Ya(){return zo.register(new URL("./download/serviceWorker.js",window.location.href)),Do.init({getWorker:()=>new po}),window["__react-beautiful-dnd-disable-dev-warnings"]=!0,e.jsx(Bo,{children:e.jsx(io,{store:Io,children:e.jsx(Ba,{})})})}export{Ya as StyleGuideRoot,Ya as default};
214
- //# sourceMappingURL=StyleGuideRoot-68cf32f4.js.map
214
+ //# sourceMappingURL=StyleGuideRoot-b4694c2d.js.map