@deephaven/code-studio 0.66.1-beta.1 → 0.66.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 (45) hide show
  1. package/build/assets/AppRoot-01d7c992.js +5 -0
  2. package/build/assets/AppRoot-01d7c992.js.map +1 -0
  3. package/build/assets/{Chart-e430057e.js → Chart-996a8574.js} +2 -2
  4. package/build/assets/{Chart-e430057e.js.map → Chart-996a8574.js.map} +1 -1
  5. package/build/assets/{ControlType-db3a55fd.js → ControlType-71cf4d30.js} +3 -3
  6. package/build/assets/{ControlType-db3a55fd.js.map → ControlType-71cf4d30.js.map} +1 -1
  7. package/build/assets/{FontBootstrap-2e0a56e8.css → FontBootstrap-04d3c39f.css} +1 -1
  8. package/build/assets/{FontBootstrap-65924559.js → FontBootstrap-cccf63b2.js} +3 -3
  9. package/build/assets/{FontBootstrap-65924559.js.map → FontBootstrap-cccf63b2.js.map} +1 -1
  10. package/build/assets/{FormatterUtils-1a653f23.js → FormatterUtils-8021de4f.js} +2 -2
  11. package/build/assets/{FormatterUtils-1a653f23.js.map → FormatterUtils-8021de4f.js.map} +1 -1
  12. package/build/assets/{Grid-898c7af8.js → Grid-b7456f7a.js} +2 -2
  13. package/build/assets/{Grid-898c7af8.js.map → Grid-b7456f7a.js.map} +1 -1
  14. package/build/assets/{GridRenderer-f3d3cb85.js → GridRenderer-da097de9.js} +2 -2
  15. package/build/assets/{GridRenderer-f3d3cb85.js.map → GridRenderer-da097de9.js.map} +1 -1
  16. package/build/assets/{IrisGrid-3dde2639.js → IrisGrid-6b0dbf09.js} +2 -2
  17. package/build/assets/{IrisGrid-3dde2639.js.map → IrisGrid-6b0dbf09.js.map} +1 -1
  18. package/build/assets/{IrisGridModel-e83131aa.js → IrisGridModel-9b75b81a.js} +2 -2
  19. package/build/assets/{IrisGridModel-e83131aa.js.map → IrisGridModel-9b75b81a.js.map} +1 -1
  20. package/build/assets/{IrisGridShortcuts-ce179e99.js → IrisGridShortcuts-ee534643.js} +2 -2
  21. package/build/assets/{IrisGridShortcuts-ce179e99.js.map → IrisGridShortcuts-ee534643.js.map} +1 -1
  22. package/build/assets/{IrisGridThemeProvider-cb891401.js → IrisGridThemeProvider-7f1abf19.js} +2 -2
  23. package/build/assets/{IrisGridThemeProvider-cb891401.js.map → IrisGridThemeProvider-7f1abf19.js.map} +1 -1
  24. package/build/assets/{MarkdownEditor-99777746.js → MarkdownEditor-7243fdd2.js} +2 -2
  25. package/build/assets/{MarkdownEditor-99777746.js.map → MarkdownEditor-7243fdd2.js.map} +1 -1
  26. package/build/assets/{MarkdownNotebook-a99e21fe.js → MarkdownNotebook-482107cc.js} +2 -2
  27. package/build/assets/{MarkdownNotebook-a99e21fe.js.map → MarkdownNotebook-482107cc.js.map} +1 -1
  28. package/build/assets/{MissingPartitionError-9cf051df.js → MissingPartitionError-9e32965e.js} +2 -2
  29. package/build/assets/{MissingPartitionError-9cf051df.js.map → MissingPartitionError-9e32965e.js.map} +1 -1
  30. package/build/assets/{StyleGuideRoot-230d7b7d.js → StyleGuideRoot-b8bec309.js} +2 -2
  31. package/build/assets/{StyleGuideRoot-230d7b7d.js.map → StyleGuideRoot-b8bec309.js.map} +1 -1
  32. package/build/assets/{index-6951812e.js → index-70d89ff5.js} +2 -2
  33. package/build/assets/{index-6951812e.js.map → index-70d89ff5.js.map} +1 -1
  34. package/build/assets/{index-a4b33693.js → index-c956c948.js} +3 -3
  35. package/build/assets/{index-a4b33693.js.map → index-c956c948.js.map} +1 -1
  36. package/build/assets/index-fd2eced7.js +2 -0
  37. package/build/assets/{index-3951afee.js.map → index-fd2eced7.js.map} +1 -1
  38. package/build/assets/useUser-5beb43a9.js +2 -0
  39. package/build/assets/{useUser-12aa4377.js.map → useUser-5beb43a9.js.map} +1 -1
  40. package/build/index.html +2 -2
  41. package/package.json +31 -31
  42. package/build/assets/AppRoot-33490433.js +0 -5
  43. package/build/assets/AppRoot-33490433.js.map +0 -1
  44. package/build/assets/index-3951afee.js +0 -2
  45. package/build/assets/useUser-12aa4377.js +0 -2
@@ -1,4 +1,4 @@
1
- import{r as u,J as G,H as e,aP as C,L as he,Z as jr,U as ve,K as T,a6 as H,T as qe,au as Br,aQ as P,aR as yr,aS as D,a4 as Fr,a5 as R,a8 as Or,a9 as Fe,aT as Vr,aa as Ur,ab as Oe,a7 as re,ad as Gr,ae as b,aU as Hr,aV as Me,aW as W,aX as zr,ac as Wr,aY as Re,ai as wr,ah as j,aZ as Pe,a_ as qr,a$ as Yr,aj as Zr,b0 as Kr,b1 as Xr,b2 as Qr,b3 as q,b4 as Jr,b5 as fe,b6 as E,b7 as eo,b8 as ro,b9 as oo,aw as to,ba as ao,bb as be,O as lo,a3 as so}from"./vendor-2463d21d.js";import{aW as Ye,aX as U,aN as de,a3 as no,aY as Ve,aZ as Ue,a_ as Cr,aF as io,a$ as Y,b0 as Ze,G as Ke,b1 as Xe,I as Le,b2 as co,b3 as ho,N as uo,b4 as go,b5 as mo,aJ as Qe,b6 as vo}from"./index-6951812e.js";import{W as po}from"./monaco-b5248072.js";import{f as xe,d as Sr,m as Z,B as xo,S as le,L as fo,c as je,I as bo,R as Tr,a as B}from"./IrisGridModel-e83131aa.js";import{B as p,u as kr,s as J,q as ee,aV as $,K as A,am as ge,ak as jo,H as Je,cp as er,N as yo,C as L,aY as se,S as me,aQ as wo,an as Co,d as rr,a_ as Nr,z as or,bt as K,aq as So,aB as To,aa as ko,aH as No,w as Do}from"./ControlType-db3a55fd.js";import{M as tr,H as Io,A as Eo,V as ye,T as $o,D as Ao,C as Mo,a as Ro,c as Po,b as Lo,P as ar,e as _o}from"./FontBootstrap-65924559.js";import{G as oe,T as Bo}from"./Grid-898c7af8.js";import{G as Dr,C as _e,O as Fo,a as Oo,S as Vo,b as ie,P as lr,e as Uo,c as Go}from"./GridRenderer-f3d3cb85.js";import{a as sr,D as Ho}from"./IrisGridShortcuts-ce179e99.js";import{N as zo,T as Wo}from"./useUser-12aa4377.js";import{L as qo}from"./AppRoot-33490433.js";import"./helpers-de833af9.js";function nr(t,r,o,a,l,s,n){try{var i=t[s](n),d=i.value}catch(h){o(h);return}i.done?r(d):Promise.resolve(d).then(a,l)}function we(t){return function(){var r=this,o=arguments;return new Promise(function(a,l){var s=t.apply(r,o);function n(d){nr(s,a,l,n,i,"next",d)}function i(d){nr(s,a,l,n,i,"throw",d)}n(void 0)})}}function _(t,r,o){return r=Yo(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function Yo(t){var r=Zo(t,"string");return typeof r=="symbol"?r:String(r)}function Zo(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 Ko extends xe{constructor(){var{rowCount:r=1e9,columnCount:o=100,floatingTopRowCount:a=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(),_(this,"numRows",void 0),_(this,"numColumns",void 0),_(this,"floatingTop",void 0),_(this,"floatingBottom",void 0),_(this,"floatingLeft",void 0),_(this,"floatingRight",void 0),_(this,"editable",void 0),_(this,"editedData",void 0),this.numRows=r,this.numColumns=o,this.floatingTop=a,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 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 we(function*(){l.editedData[r]==null&&(l.editedData[r]=[]),l.editedData[r][o]="".concat(a)})()}setValueForRanges(r,o){var a=this;return we(function*(){Sr.forEachCell(r,(l,s)=>{a.setValueForCell(l,s,o)})})()}setValues(r){var o=this;return we(function*(){for(var a=0;a<r.length;a+=1){var l,s,n=r[a];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,a){return!0}isEditableRange(r){return this.isEditable}delete(r){throw new Error("Method not implemented.")}}const Ge=Ko;function S(t,r,o){return r=Xo(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function Xo(t){var r=Qo(t,"string");return typeof r=="symbol"?r:String(r)}function Qo(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 Ge{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",Z((n,i)=>{for(var d=null,h=i,c=[...n].sort((y,F)=>y[0]-F[0]),g=0;g<c.length;g+=1){var[m,v]=c[g];if(h<=m)break;var f=v.rowCount;if(h<=m+f){d=m,h=h-m-1;break}h-=f}return{key:d,offsetRow:h}})),S(this,"getCachedTextForRowHeader",Z((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)})),S(this,"getCachedTextForCell",Z((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)})),S(this,"getCachedIsRowExpandable",Z((n,i,d)=>{var h=this.getCachedDepthForRow(n,i);return h<d})),S(this,"getCachedIsRowExpanded",Z((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)})),S(this,"getCachedDepthForRow",Z((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=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),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,a),this.numRows+=i.rowCount-d}}else if(o){var c=new I({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)}}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 He=I;function Ce(t,r,o){return r=Jo(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function Jo(t){var r=et(t,"string");return typeof r=="symbol"?r:String(r)}function et(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 rt extends xe{constructor(r,o){var a;super(),Ce(this,"data",void 0),Ce(this,"columnHeaders",void 0),Ce(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 ot=rt;function Se(t,r,o){return r=tt(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function tt(t){var r=at(t,"string");return typeof r=="symbol"?r:String(r)}function at(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 lt extends xe{constructor(r,o){super(),Se(this,"numberOfColumns",void 0),Se(this,"numberOfRows",void 0),Se(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,n,i,d,h,c=o-((a=(l=this.viewportData)===null||l===void 0?void 0:l.rowOffset)!==null&&a!==void 0?a: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 st=lt;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=it(t,"string");return typeof r=="symbol"?r:String(r)}function it(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 ct="proportional",dt=Dr.positiveBarColor,ht=Dr.negativeBarColor,ut="beside",gt="LTR",mt="right";function vt(t){return Array.isArray(t)&&t.every(r=>typeof r=="number")}class pt extends xe{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,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(),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=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];vt(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 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:mt}renderTypeForCell(r,o){return r<20||r%2===o%2?"dataBar":"text"}dataBarOptionsForCell(r,o){var a,l,s,n,i,d,h,c=Ye(this.columnMins,r),g=Ye(this.columnMaxs,r),m=(a=this.columnAxes.get(r))!==null&&a!==void 0?a:ct,v=(l=this.valuePlacements.get(r))!==null&&l!==void 0?l:ut,f=this.opacities.get(r);f==null||f>1?f=1:f<0&&(f=0);var y=(s=this.directions.get(r))!==null&&s!==void 0?s:gt,F=(n=this.positiveColors.get(r))!==null&&n!==void 0?n:dt,te=(i=this.negativeColors.get(r))!==null&&i!==void 0?i:ht,O=Number((d=this.data[r])===null||d===void 0?void 0:d[o]),z=O>=0?F:te,ue=(h=this.markers.get(r))!==null&&h!==void 0?h:[];return{columnMin:c,columnMax:g,axis:m,color:z,valuePlacement:v,opacity:f,markers:ue,direction:y,value:O}}}const xt=pt,Te="hide-from-e2e-tests",ir="sample-section";function*Ir(t=1){for(;;)t=t*16807%2147483647,yield t/2147483647}function ft(t=1){const[r]=u.useState(()=>Ir(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 x(t,r=[]){const o=`${ir}-${t.toLocaleLowerCase().replaceAll(" ","-")}`,a=G(ir,...r);return{id:o,className:a}}function N(t,r=[]){const{id:o,className:a}=x(t,r);return{id:o,UNSAFE_className:a}}function M(){}class Q extends u.Component{static renderButtonBrand(r,o){const a=r.length?`btn-${r}-${o}`:`btn-${o}`;return e.jsx(xo,{className:a,style:{marginBottom:"1rem",marginRight:"1rem"},children:o},o)}static renderButtons(r){const o=["primary","secondary","success","warning","danger","info"].map(a=>Q.renderButtonBrand(r,a));return e.jsxs("div",{...x(`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",{...x("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",{...x("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",{...x("buttons-inline"),style:{padding:"1rem 0"},children:[e.jsx("h5",{children:"Inline Buttons"}),"Regular btn-inline:",e.jsx(p,{className:"mx-2",kind:"inline",icon:U,tooltip:"test",onClick:M}),"Toggle button (class active):",e.jsx(p,{className:"mx-2",onClick:()=>{this.setState({toggle:!r})},active:r,kind:"inline",icon:U,tooltip:"test"}),"Disabled:",e.jsx(p,{className:"mx-2",kind:"inline",disabled:!0,onClick:M,children:"Disabled"}),"With Text:",e.jsx(p,{className:"mx-2",kind:"inline",icon:U,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(p,{kind:"ghost",icon:U,tooltip:"test",onClick:M}),e.jsx("span",{className:"mx-2",children:"btn-link:"}),e.jsx(p,{kind:"ghost",onClick:M,children:"Text Button"}),e.jsx("span",{className:"mx-2",children:"btn-link (text w/ optional with icon):"}),e.jsx(p,{kind:"ghost",icon:U,onClick:M,children:"Text Button"})]})}render(){const r=["","outline"].map(s=>Q.renderButtons(s)),o=this.renderInlineButtons(),a=Q.renderSocketedButtons(),l=Q.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 bt(){const t=kr();tr.random=ft();const[r]=u.useState(()=>new tr(t));return e.jsxs("div",{...x("charts"),children:[e.jsx("h2",{className:"ui-title",children:"Chart"}),e.jsx("div",{style:{height:500},children:e.jsx(fo,{model:r})})]})}const Be="2px solid var(--dh-color-notice-bg)",jt={"--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"},cr={"--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"},yt={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(t){const r=de.parseRgba(de.asRgbOrRgbaString(t)??"");if(r==null||r.a<.5)return"white";const{r:o,g:a,b:l}=r;return de.getBrightness([o,a,l])>=128?"black":"white"}function wt(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(([n,i])=>l.substring(n,i+1)).map((n,i)=>({name:`${a}-${i}`,value:n})):{name:a,value:l}}).flat()}function X(t,r,o,a=jt){const l=yt[t];return wt(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=a[d]??c?.[o]??c?.[1]??"???";return g=l[g]??g,i[g]==null&&(i[g]=[]),d in cr&&i[g].push({isLabel:!0,name:cr[d],value:""}),/^--dh-color-gray-(light|mid|dark)$/.test(d)||i[g].push({name:d,value:h}),i},{})}function Ct(){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=ce(o)},[]),t}function St(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 n=getComputedStyle(t.current).getPropertyValue(s);a(n)},[t,r]),o}function ke({className:t,children:r}){const o=Ct(),a=St(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:Be},children:[s&&e.jsx(J,{interactive:!0,children:e.jsx("div",{children:l.value})}),r]})}function Tt(){const t=["100","200","300","400","500","600","700","800","850","8XX","900"].map(a=>e.jsx(ke,{className:G("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(ke,{className:G("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(ke,{className:G("swatch",`swatch-${a}`),children:a},a));return e.jsxs("div",{...x("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 kt 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:Ve,action:()=>{alert(`Alert${o}!`)},shortcut:new ee({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[$.CTRL,A.A],macShortcut:[$.CMD,A.A]})},{title:`Log Message${o}`,icon:Ue,action:()=>{console.log(`Logging a message${o}!`)},shortcut:new ee({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[$.CTRL,A.L],macShortcut:[$.CMD,A.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:Cr,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new ee({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[$.CTRL,A.SLASH],macShortcut:[$.CMD,A.SLASH]}),group:ge.groups.global}].concat(r),l=()=>new Promise(s=>{setTimeout(()=>{s(r)},3e3)});return e.jsxs("div",{...x("context-menus"),children:[e.jsx("h2",{className:"ui-title",children:"Context Menu"}),e.jsxs(p,{kind:"primary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(ge,{actions:a})]}),e.jsxs(p,{kind:"tertiary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(ge,{actions:l})]})]})}}class Nt 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]])],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",{...x("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(p,{kind:"primary",style:{marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{r?this.setState({isShown:!1}):this.setState({isShown:!0})},children:["Open Dialog",e.jsx(jo,{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(Io,{menuText:"Checkbox Menu",valueMap:o,onUpdateValueMap:this.handleUpdateCheckboxMap})]})}}class Dt extends u.Component{constructor(r){super(r),this.state={isShown:!1}}render(){const r=[{title:"Show Alert",icon:Ve,action:()=>{alert("Alert!")},shortcut:new ee({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[$.CTRL,A.A],macShortcut:[$.CMD,A.A]})},{title:"Log Message",icon:Ue,action:()=>{console.log("Logging a message!")},shortcut:new ee({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[$.CTRL,A.L],macShortcut:[$.CMD,A.L]})}],a=[{title:"Show Shortcuts",icon:Cr,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new ee({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[$.CTRL,A.SLASH],macShortcut:[$.CMD,A.SLASH]}),group:ge.groups.global}].concat(r),{isShown:l}=this.state;return e.jsxs("div",{...x("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(p,{kind:"inline",className:"mx-2",icon:io,onClick:()=>{},children:e.jsx(Je,{actions:a})}),e.jsxs(p,{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(Je,{isShown:l,onMenuClosed:()=>{this.setState({isShown:!1})},actions:a})]})]})}}const It=`trades = db.t("LearnDeephaven", "StockTrades").where("Date=\`2017-08-25\`")\\
1
+ import{r as u,J as G,H as e,aP as C,L as he,Z as jr,U as ve,K as T,a6 as H,T as qe,au as Br,aQ as P,aR as yr,aS as D,a4 as Fr,a5 as R,a8 as Or,a9 as Fe,aT as Vr,aa as Ur,ab as Oe,a7 as re,ad as Gr,ae as b,aU as Hr,aV as Me,aW as W,aX as zr,ac as Wr,aY as Re,ai as wr,ah as j,aZ as Pe,a_ as qr,a$ as Yr,aj as Zr,b0 as Kr,b1 as Xr,b2 as Qr,b3 as q,b4 as Jr,b5 as fe,b6 as E,b7 as eo,b8 as ro,b9 as oo,aw as to,ba as ao,bb as be,O as lo,a3 as so}from"./vendor-2463d21d.js";import{aW as Ye,aX as U,aN as de,a3 as no,aY as Ve,aZ as Ue,a_ as Cr,aF as io,a$ as Y,b0 as Ze,G as Ke,b1 as Xe,I as Le,b2 as co,b3 as ho,N as uo,b4 as go,b5 as mo,aJ as Qe,b6 as vo}from"./index-70d89ff5.js";import{W as po}from"./monaco-b5248072.js";import{f as xe,d as Sr,m as Z,B as xo,S as le,L as fo,c as je,I as bo,R as Tr,a as B}from"./IrisGridModel-9b75b81a.js";import{B as p,u as kr,s as J,q as ee,aV as $,K as A,am as ge,ak as jo,H as Je,cp as er,N as yo,C as L,aY as se,S as me,aQ as wo,an as Co,d as rr,a_ as Nr,z as or,bt as K,aq as So,aB as To,aa as ko,aH as No,w as Do}from"./ControlType-71cf4d30.js";import{M as tr,H as Io,A as Eo,V as ye,T as $o,D as Ao,C as Mo,a as Ro,c as Po,b as Lo,P as ar,e as _o}from"./FontBootstrap-cccf63b2.js";import{G as oe,T as Bo}from"./Grid-b7456f7a.js";import{G as Dr,C as _e,O as Fo,a as Oo,S as Vo,b as ie,P as lr,e as Uo,c as Go}from"./GridRenderer-da097de9.js";import{a as sr,D as Ho}from"./IrisGridShortcuts-ee534643.js";import{N as zo,T as Wo}from"./useUser-5beb43a9.js";import{L as qo}from"./AppRoot-01d7c992.js";import"./helpers-de833af9.js";function nr(t,r,o,a,l,s,n){try{var i=t[s](n),d=i.value}catch(h){o(h);return}i.done?r(d):Promise.resolve(d).then(a,l)}function we(t){return function(){var r=this,o=arguments;return new Promise(function(a,l){var s=t.apply(r,o);function n(d){nr(s,a,l,n,i,"next",d)}function i(d){nr(s,a,l,n,i,"throw",d)}n(void 0)})}}function _(t,r,o){return r=Yo(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function Yo(t){var r=Zo(t,"string");return typeof r=="symbol"?r:String(r)}function Zo(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 Ko extends xe{constructor(){var{rowCount:r=1e9,columnCount:o=100,floatingTopRowCount:a=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(),_(this,"numRows",void 0),_(this,"numColumns",void 0),_(this,"floatingTop",void 0),_(this,"floatingBottom",void 0),_(this,"floatingLeft",void 0),_(this,"floatingRight",void 0),_(this,"editable",void 0),_(this,"editedData",void 0),this.numRows=r,this.numColumns=o,this.floatingTop=a,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 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 we(function*(){l.editedData[r]==null&&(l.editedData[r]=[]),l.editedData[r][o]="".concat(a)})()}setValueForRanges(r,o){var a=this;return we(function*(){Sr.forEachCell(r,(l,s)=>{a.setValueForCell(l,s,o)})})()}setValues(r){var o=this;return we(function*(){for(var a=0;a<r.length;a+=1){var l,s,n=r[a];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,a){return!0}isEditableRange(r){return this.isEditable}delete(r){throw new Error("Method not implemented.")}}const Ge=Ko;function S(t,r,o){return r=Xo(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function Xo(t){var r=Qo(t,"string");return typeof r=="symbol"?r:String(r)}function Qo(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 Ge{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",Z((n,i)=>{for(var d=null,h=i,c=[...n].sort((y,F)=>y[0]-F[0]),g=0;g<c.length;g+=1){var[m,v]=c[g];if(h<=m)break;var f=v.rowCount;if(h<=m+f){d=m,h=h-m-1;break}h-=f}return{key:d,offsetRow:h}})),S(this,"getCachedTextForRowHeader",Z((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)})),S(this,"getCachedTextForCell",Z((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)})),S(this,"getCachedIsRowExpandable",Z((n,i,d)=>{var h=this.getCachedDepthForRow(n,i);return h<d})),S(this,"getCachedIsRowExpanded",Z((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)})),S(this,"getCachedDepthForRow",Z((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=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),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,a),this.numRows+=i.rowCount-d}}else if(o){var c=new I({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)}}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 He=I;function Ce(t,r,o){return r=Jo(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function Jo(t){var r=et(t,"string");return typeof r=="symbol"?r:String(r)}function et(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 rt extends xe{constructor(r,o){var a;super(),Ce(this,"data",void 0),Ce(this,"columnHeaders",void 0),Ce(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 ot=rt;function Se(t,r,o){return r=tt(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function tt(t){var r=at(t,"string");return typeof r=="symbol"?r:String(r)}function at(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 lt extends xe{constructor(r,o){super(),Se(this,"numberOfColumns",void 0),Se(this,"numberOfRows",void 0),Se(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,n,i,d,h,c=o-((a=(l=this.viewportData)===null||l===void 0?void 0:l.rowOffset)!==null&&a!==void 0?a: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 st=lt;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=it(t,"string");return typeof r=="symbol"?r:String(r)}function it(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 ct="proportional",dt=Dr.positiveBarColor,ht=Dr.negativeBarColor,ut="beside",gt="LTR",mt="right";function vt(t){return Array.isArray(t)&&t.every(r=>typeof r=="number")}class pt extends xe{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,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(),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=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];vt(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 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:mt}renderTypeForCell(r,o){return r<20||r%2===o%2?"dataBar":"text"}dataBarOptionsForCell(r,o){var a,l,s,n,i,d,h,c=Ye(this.columnMins,r),g=Ye(this.columnMaxs,r),m=(a=this.columnAxes.get(r))!==null&&a!==void 0?a:ct,v=(l=this.valuePlacements.get(r))!==null&&l!==void 0?l:ut,f=this.opacities.get(r);f==null||f>1?f=1:f<0&&(f=0);var y=(s=this.directions.get(r))!==null&&s!==void 0?s:gt,F=(n=this.positiveColors.get(r))!==null&&n!==void 0?n:dt,te=(i=this.negativeColors.get(r))!==null&&i!==void 0?i:ht,O=Number((d=this.data[r])===null||d===void 0?void 0:d[o]),z=O>=0?F:te,ue=(h=this.markers.get(r))!==null&&h!==void 0?h:[];return{columnMin:c,columnMax:g,axis:m,color:z,valuePlacement:v,opacity:f,markers:ue,direction:y,value:O}}}const xt=pt,Te="hide-from-e2e-tests",ir="sample-section";function*Ir(t=1){for(;;)t=t*16807%2147483647,yield t/2147483647}function ft(t=1){const[r]=u.useState(()=>Ir(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 x(t,r=[]){const o=`${ir}-${t.toLocaleLowerCase().replaceAll(" ","-")}`,a=G(ir,...r);return{id:o,className:a}}function N(t,r=[]){const{id:o,className:a}=x(t,r);return{id:o,UNSAFE_className:a}}function M(){}class Q extends u.Component{static renderButtonBrand(r,o){const a=r.length?`btn-${r}-${o}`:`btn-${o}`;return e.jsx(xo,{className:a,style:{marginBottom:"1rem",marginRight:"1rem"},children:o},o)}static renderButtons(r){const o=["primary","secondary","success","warning","danger","info"].map(a=>Q.renderButtonBrand(r,a));return e.jsxs("div",{...x(`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",{...x("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",{...x("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",{...x("buttons-inline"),style:{padding:"1rem 0"},children:[e.jsx("h5",{children:"Inline Buttons"}),"Regular btn-inline:",e.jsx(p,{className:"mx-2",kind:"inline",icon:U,tooltip:"test",onClick:M}),"Toggle button (class active):",e.jsx(p,{className:"mx-2",onClick:()=>{this.setState({toggle:!r})},active:r,kind:"inline",icon:U,tooltip:"test"}),"Disabled:",e.jsx(p,{className:"mx-2",kind:"inline",disabled:!0,onClick:M,children:"Disabled"}),"With Text:",e.jsx(p,{className:"mx-2",kind:"inline",icon:U,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(p,{kind:"ghost",icon:U,tooltip:"test",onClick:M}),e.jsx("span",{className:"mx-2",children:"btn-link:"}),e.jsx(p,{kind:"ghost",onClick:M,children:"Text Button"}),e.jsx("span",{className:"mx-2",children:"btn-link (text w/ optional with icon):"}),e.jsx(p,{kind:"ghost",icon:U,onClick:M,children:"Text Button"})]})}render(){const r=["","outline"].map(s=>Q.renderButtons(s)),o=this.renderInlineButtons(),a=Q.renderSocketedButtons(),l=Q.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 bt(){const t=kr();tr.random=ft();const[r]=u.useState(()=>new tr(t));return e.jsxs("div",{...x("charts"),children:[e.jsx("h2",{className:"ui-title",children:"Chart"}),e.jsx("div",{style:{height:500},children:e.jsx(fo,{model:r})})]})}const Be="2px solid var(--dh-color-notice-bg)",jt={"--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"},cr={"--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"},yt={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(t){const r=de.parseRgba(de.asRgbOrRgbaString(t)??"");if(r==null||r.a<.5)return"white";const{r:o,g:a,b:l}=r;return de.getBrightness([o,a,l])>=128?"black":"white"}function wt(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(([n,i])=>l.substring(n,i+1)).map((n,i)=>({name:`${a}-${i}`,value:n})):{name:a,value:l}}).flat()}function X(t,r,o,a=jt){const l=yt[t];return wt(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=a[d]??c?.[o]??c?.[1]??"???";return g=l[g]??g,i[g]==null&&(i[g]=[]),d in cr&&i[g].push({isLabel:!0,name:cr[d],value:""}),/^--dh-color-gray-(light|mid|dark)$/.test(d)||i[g].push({name:d,value:h}),i},{})}function Ct(){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=ce(o)},[]),t}function St(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 n=getComputedStyle(t.current).getPropertyValue(s);a(n)},[t,r]),o}function ke({className:t,children:r}){const o=Ct(),a=St(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:Be},children:[s&&e.jsx(J,{interactive:!0,children:e.jsx("div",{children:l.value})}),r]})}function Tt(){const t=["100","200","300","400","500","600","700","800","850","8XX","900"].map(a=>e.jsx(ke,{className:G("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(ke,{className:G("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(ke,{className:G("swatch",`swatch-${a}`),children:a},a));return e.jsxs("div",{...x("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 kt 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:Ve,action:()=>{alert(`Alert${o}!`)},shortcut:new ee({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[$.CTRL,A.A],macShortcut:[$.CMD,A.A]})},{title:`Log Message${o}`,icon:Ue,action:()=>{console.log(`Logging a message${o}!`)},shortcut:new ee({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[$.CTRL,A.L],macShortcut:[$.CMD,A.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:Cr,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new ee({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[$.CTRL,A.SLASH],macShortcut:[$.CMD,A.SLASH]}),group:ge.groups.global}].concat(r),l=()=>new Promise(s=>{setTimeout(()=>{s(r)},3e3)});return e.jsxs("div",{...x("context-menus"),children:[e.jsx("h2",{className:"ui-title",children:"Context Menu"}),e.jsxs(p,{kind:"primary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(ge,{actions:a})]}),e.jsxs(p,{kind:"tertiary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(ge,{actions:l})]})]})}}class Nt 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]])],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",{...x("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(p,{kind:"primary",style:{marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{r?this.setState({isShown:!1}):this.setState({isShown:!0})},children:["Open Dialog",e.jsx(jo,{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(Io,{menuText:"Checkbox Menu",valueMap:o,onUpdateValueMap:this.handleUpdateCheckboxMap})]})}}class Dt extends u.Component{constructor(r){super(r),this.state={isShown:!1}}render(){const r=[{title:"Show Alert",icon:Ve,action:()=>{alert("Alert!")},shortcut:new ee({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[$.CTRL,A.A],macShortcut:[$.CMD,A.A]})},{title:"Log Message",icon:Ue,action:()=>{console.log("Logging a message!")},shortcut:new ee({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[$.CTRL,A.L],macShortcut:[$.CMD,A.L]})}],a=[{title:"Show Shortcuts",icon:Cr,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new ee({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[$.CTRL,A.SLASH],macShortcut:[$.CMD,A.SLASH]}),group:ge.groups.global}].concat(r),{isShown:l}=this.state;return e.jsxs("div",{...x("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(p,{kind:"inline",className:"mx-2",icon:io,onClick:()=>{},children:e.jsx(Je,{actions:a})}),e.jsxs(p,{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(Je,{isShown:l,onMenuClosed:()=>{this.setState({isShown:!1})},actions:a})]})]})}}const It=`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
  `,ha="_themeColorsPalette_1mdfo_1",ua="_swatch_1mdfo_7",ga="_themeColors_1mdfo_1",ma="_label_1mdfo_21",va="_capitalize_1mdfo_29",V={themeColorsPalette:ha,swatch:ua,themeColors:ga,label:ma,capitalize:va};function pa(){return{"Theme Color Palette":X("palette",la,1),"Semantic Colors":X("semantic",sa,1),"Chart Colors":X("chart",na,2),"Editor Colors":X("editor",ia,2),"Grid Colors":X("grid",ca,2),"Component Colors":X("component",da,1)}}function xa(){const{selectedThemeKey:t}=Nr(),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",{...x(o),children:[e.jsx("h2",{className:"ui-title",children:o}),e.jsx("div",{className:V.themeColorsPalette,children:Object.entries(a).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?Be:void 0,color:`var(--dh-color-${ce(h)})`},className:G(V.swatch,"px-0"),children:[e.jsxs(J,{interactive:!0,children:[e.jsx("div",{children:d}),e.jsx("div",{children:h}),e.jsx("div",{children:de.normalizeCssColor(h,!0)})]}),e.jsx(or,{copy:d,style:{color:`var(--dh-color-${ce(h)})`}})]},d))]},s))})]},o):e.jsxs("div",{...x(o),children:[e.jsx("h2",{className:"ui-title",children:o}),e.jsx("div",{className:V.themeColors,children:Object.entries(a).map(([s,n])=>e.jsxs("div",{style:{gridRow:`span ${n.length+1}`},children:[e.jsx("span",{className:G(V.label,V.capitalize),children:s}),n.map(({isLabel:i,name:d,value:h,note:c})=>i===!0?e.jsx("span",{className:V.label,children:d},d):e.jsxs("div",{className:V.swatch,style:{backgroundColor:h,border:h===""&&d.length>0?Be:void 0,color:`var(--dh-color-${ce(h)})`},children:[e.jsxs(J,{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(or,{copy:d,style:{color:`var(--dh-color-${ce(h)})`}})]},d))]},s))})]},o))})}const Ae="data-menu-category",fa="data-no-menu",ba="sample-section-e2e-ignore",$r="spectrum-component-samples",Ar="spectrum-comparison-samples";function ja(){return e.jsxs("div",{id:$r,children:[e.jsx("h2",{className:"ui-title","data-no-menu":!0,children:"Spectrum Components"}),e.jsxs(P,{gap:20,columns:yr("0px","1fr"),children:[e.jsxs(D,{...N("spectrum-buttons"),children:[e.jsx("h3",{children:"Buttons"}),e.jsx(ya,{})]}),e.jsxs(D,{...N("spectrum-collections"),children:[e.jsx("h3",{children:"Collections"}),e.jsx(Ta,{})]}),e.jsxs(D,{...N("spectrum-content"),children:[e.jsx("h3",{children:"Content"}),e.jsx(Sa,{})]}),e.jsxs(D,{...N("spectrum-forms"),children:[e.jsx("h3",{children:"Forms"}),e.jsx(Ca,{})]}),e.jsxs(D,{...N("spectrum-overlays"),children:[e.jsx("h3",{children:"Overlays"}),e.jsxs(C,{gap:"size-160",children:[e.jsx(wa,{}),e.jsxs(Fr,{children:[e.jsx(R,{children:"Dialog Trigger"}),t=>e.jsxs(Or,{children:[e.jsx(Fe,{children:"Some Heading"}),e.jsx(Vr,{children:"Some Header"}),e.jsx(Ur,{}),e.jsx(Oe,{children:e.jsx(re,{children:"Are you sure?"})}),e.jsxs(Gr,{children:[e.jsx(b,{variant:"secondary",onPress:t,children:"Cancel"}),e.jsx(b,{variant:"accent",onPress:t,children:"Confirm"})]})]})]})]})]}),e.jsxs(D,{...N("spectrum-well"),children:[e.jsx("h3",{children:"Wells"}),e.jsx(Hr,{children:"This is a well."})]})]})]})}function ya(){return e.jsxs(e.Fragment,{children:[e.jsxs(R,{marginBottom:"size-200",children:[e.jsx(H,{children:e.jsx(T,{icon:U})}),e.jsx(re,{children:"Icon Button"})]}),e.jsxs(P,{autoFlow:"column",columnGap:"size-250",rowGap:"size-150",columns:Me(4,yr(0,"size-2000")),rows:Me(8,"size-400"),children:[e.jsx("label",{children:'Button style="outline"'}),e.jsx(b,{variant:"primary",style:"outline",children:"Primary"}),e.jsx(b,{variant:"secondary",style:"outline",children:"Secondary"}),e.jsx(b,{variant:"accent",style:"outline",children:"Accent"}),e.jsx(b,{variant:"negative",style:"outline",children:"Negative"}),e.jsx(b,{variant:"primary",staticColor:"black",style:"outline",children:"Static Black"}),e.jsx(b,{variant:"primary",staticColor:"white",style:"outline",children:"Static White"}),e.jsx(b,{variant:"primary",isDisabled:!0,style:"outline",children:"Disabled"}),e.jsx("label",{children:'Button style="fill"'}),e.jsx(b,{variant:"primary",style:"fill",children:"Primary"}),e.jsx(b,{variant:"secondary",style:"fill",children:"Secondary"}),e.jsx(b,{variant:"accent",style:"fill",children:"Accent"}),e.jsx(b,{variant:"negative",style:"fill",children:"Negative"}),e.jsx(b,{variant:"primary",staticColor:"black",style:"fill",children:"Static Black"}),e.jsx(b,{variant:"primary",staticColor:"white",style:"fill",children:"Static White"}),e.jsx(b,{variant:"primary",isDisabled:!0,style:"fill",children:"Disabled"}),e.jsx("label",{children:"Action Button"}),e.jsx(R,{children:"Normal"}),e.jsx(R,{gridRow:"span 3",isQuiet:!0,children:"Quiet"}),e.jsx(R,{staticColor:"black",children:"Static Black"}),e.jsx(R,{staticColor:"white",children:"Static White"}),e.jsx(R,{isDisabled:!0,children:"Disabled"}),e.jsx("label",{children:"Toggle Button"}),e.jsx(W,{children:"Normal"}),e.jsx(W,{isQuiet:!0,children:"Quiet"}),e.jsx(W,{gridRow:"span 2",isEmphasized:!0,children:"Emphasized"}),e.jsx(W,{staticColor:"black",children:"Static Black"}),e.jsx(W,{staticColor:"white",children:"Static White"}),e.jsx(W,{isDisabled:!0,children:"Disabled"})]})]})}function wa(){return e.jsxs(e.Fragment,{children:[e.jsx(re,{children:"Contextual Help"}),e.jsxs(zr,{variant:"info",children:[e.jsx(Fe,{children:"Need help?"}),e.jsx(Oe,{children:e.jsx(re,{children:"This is a helpful description of the thing you need help with."})})]})]})}function Ca(){return e.jsx(Wr,{children:e.jsxs(P,{gap:20,columns:Me("auto-fit","210px"),alignItems:"end",children:[e.jsx(Re,{label:"Text Field"}),e.jsxs(wr,{label:"Combobox",menuTrigger:"focus",defaultSelectedKey:"two",children:[e.jsx(j,{children:"One"},"one"),e.jsx(j,{children:"Two"},"two"),e.jsx(j,{children:"Three"},"three")]}),e.jsx(Pe,{children:"Checkbox"}),e.jsx(qr,{label:"Slider",defaultValue:24}),e.jsx(Yr,{children:"Switch"})]})})}function Sa(){return e.jsxs(Zr,{children:[e.jsx(H,{size:"XL",children:e.jsx(T,{icon:uo})}),e.jsx(Fe,{children:"Illustrated Message"}),e.jsx(Oe,{children:"This is the content of the message."})]})}function Ta(){return e.jsxs(e.Fragment,{children:[e.jsx("label",{id:"table-view-sample",children:"List View"}),e.jsxs(Kr,{"aria-labelledby":"table-view-sample",selectionMode:"multiple",maxWidth:"size-6000",marginBottom:"size-200",children:[e.jsx(j,{children:"One"}),e.jsx(j,{children:"Two"}),e.jsx(j,{children:"Three"}),e.jsx(j,{children:"Four"})]}),e.jsx("label",{id:"table-view-sample",children:"Table View"}),e.jsxs(Xr,{"aria-labelledby":"table-view-sample",selectionMode:"multiple",children:[e.jsxs(Qr,{children:[e.jsxs(q,{title:"Person",children:[e.jsx(q,{allowsResizing:!0,children:"Name"}),e.jsx(q,{children:"Age"})]}),e.jsxs(q,{title:"Address",children:[e.jsx(q,{allowsResizing:!0,children:"City"}),e.jsx(q,{children:"State"})]})]}),e.jsxs(Jr,{children:[e.jsxs(fe,{children:[e.jsx(E,{children:"John"}),e.jsx(E,{children:"42"}),e.jsx(E,{children:"San Francisco"}),e.jsx(E,{children:"CA"})]}),e.jsxs(fe,{children:[e.jsx(E,{children:"Jane"}),e.jsx(E,{children:"38"}),e.jsx(E,{children:"San Francisco"}),e.jsx(E,{children:"CA"})]}),e.jsxs(fe,{children:[e.jsx(E,{children:"Becky"}),e.jsx(E,{children:"12"}),e.jsx(E,{children:"San Francisco"}),e.jsx(E,{children:"CA"})]})]})]})]})}function ne(t){return e.jsx("div",{...t})}function ka(){const[t,r]=u.useState([]);u.useEffect(()=>{let a={category:"",items:[]};const l=[a],s=document.querySelector(`#${$r}`),n=document.querySelector(`#${Ar}`);document.querySelectorAll(`h2,h3,[${Ae}]`).forEach(i=>{if(i.textContent==null||i.hasAttribute(fa))return;if(i.hasAttribute(Ae)){a={category:i.getAttribute(Ae)??"",items:[]},l.push(a);return}const h=`${s?.contains(i)===!0?"spectrum-":n?.contains(i)===!0?"spectrum-compare-":""}${i.textContent}`.toLowerCase().replace(/\s/g,"-");i.id=h,a.items.push({id:h,label:i.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(eo,{children:[e.jsx(R,{children:e.jsx(H,{children:e.jsx(T,{icon:go})})}),e.jsx(ro,{items:t,onAction:o,children:({category:a,items:l})=>e.jsx(oo,{items:l,title:a,children:({id:s,label:n})=>e.jsx(j,{children:n},s)},a)})]})}function Na(){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(b,{UNSAFE_className:"goto-top-button",variant:"accent",onPress:t,children:e.jsx(H,{children:e.jsx(T,{icon:mo})})})}const Da=["Tab 1","Tab 2","Tab 3"];function Ia({isActive:t,title:r}){return e.jsxs("li",{className:G("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 Ea(){return e.jsxs("div",{...x("golden-layout"),children:[e.jsx("h2",{className:"ui-title",children:"Golden Layout"}),[!1,!0].map(t=>e.jsxs(he.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:Da.map((r,o)=>e.jsx(Ia,{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 $a(){return e.jsxs("div",{...x("animations",["sample-section-e2e-ignore"]),children:[e.jsx("h2",{className:"ui-title",children:"Animations"}),e.jsx(D,{position:"relative",height:400,children:e.jsx(Lo,{})})]})}const fr=[["primary","accent"],["secondary","primary"],["danger","negative"]],Aa=[{title:"One",value:"1"},{title:"Two",value:"2"},{title:"Three",value:"3"}];function Ma(){const[t,r]=u.useState(!1),[o,a]=u.useState("1"),l=u.useCallback(s=>{a(s.target.value)},[]);return e.jsxs("div",{...x(Ar,[ba]),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(P,{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(p,{onClick:K,kind:s,icon:Qe,children:"Button"}),e.jsxs(b,{variant:n,style:"fill",children:[e.jsx(H,{children:e.jsx(T,{icon:Qe})}),e.jsx(re,{children:"Button"})]})]},s)),e.jsx(p,{onClick:K,kind:"primary",disabled:!0,children:"Disabled"}),e.jsx(b,{variant:"accent",style:"fill",isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(D,{children:[e.jsx("h3",{children:"Buttons - Outline"}),e.jsxs(P,{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(p,{onClick:K,kind:s,children:s}),e.jsx(b,{variant:n,style:"outline",children:n})]},s)),e.jsx(p,{onClick:K,kind:"secondary",disabled:!0,children:"Disabled"}),e.jsx(b,{variant:"primary",style:"outline",isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(D,{children:[e.jsx("h3",{children:"Action Buttons"}),e.jsxs(P,{gap:20,columns:"repeat(2, 120px)",autoRows:"40x",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),e.jsx(p,{onClick:K,kind:"inline",children:"Inline"}),e.jsx(R,{children:"Action"}),e.jsx(p,{onClick:K,kind:"inline",disabled:!0,children:"Disabled"}),e.jsx(R,{isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(D,{children:[e.jsx("h3",{children:"Pickers"}),e.jsxs(P,{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(_e,{disabled:s,options:Aa,defaultValue:"One"})]}),e.jsxs(wr,{isDisabled:s,label:s?"Disabled Combobox":"Combobox",inputValue:"One",children:[e.jsx(j,{children:"One"},"1"),e.jsx(j,{children:"Two"},"2"),e.jsx(j,{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(me,{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(to,{isDisabled:s,label:s?"Disabled Picker":"Picker",placeholder:"Picker",children:[e.jsx(j,{children:"One"},"1"),e.jsx(j,{children:"Two"},"2"),e.jsx(j,{children:"Three"},"3")]})]},String(s)))]})]}),e.jsxs(D,{children:[e.jsx("h3",{children:"Text Field"}),e.jsxs(P,{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(Re,{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(Re,{type:"text",label:"Disabled",isDisabled:!0,value:"Disabled"})]})]}),e.jsxs(D,{children:[e.jsx("h3",{children:"Checkbox"}),e.jsxs(P,{gap:20,columns:"repeat(2, 120px)",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),e.jsx(L,{className:"form-group",checked:t,onChange:()=>r(s=>!s),children:"Checkbox"}),e.jsx(Pe,{children:"Checkbox"}),e.jsx(L,{className:"form-group",disabled:!0,checked:t,onChange:()=>r(s=>!s),children:"Disabled"}),e.jsx(Pe,{isDisabled:!0,children:"Disabled"}),e.jsx(C,{direction:"column",children:e.jsxs("label",{children:["Radio Group",e.jsxs(Tr,{onChange:l,value:o,children:[e.jsx(B,{value:"1",children:"One"}),e.jsx(B,{value:"2",children:"Two"}),e.jsx(B,{value:"3",children:"Three"})]})]})}),e.jsxs(ao,{label:"Radio Group",value:o,onChange:a,children:[e.jsx(be,{value:"1",children:"One"}),e.jsx(be,{value:"2",children:"Two"}),e.jsx(be,{value:"3",children:"Three"})]})]})]})]})]})}function Ra(){return e.jsx(H,{children:e.jsx(T,{icon:vo})})}function Pa(){return e.jsxs("div",{...x("pickers"),children:[e.jsx("h2",{className:"ui-title",children:"Pickers"}),e.jsxs(C,{gap:14,children:[e.jsx(ar,{label:"Single Child",tooltip:{placement:"bottom-end"},children:e.jsx(j,{children:"Aaa"})}),e.jsxs(ar,{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(j,{children:"Item Aaa"}),e.jsx(j,{children:"Item Bbb"}),e.jsxs(j,{textValue:"Complex Ccc",children:[e.jsx(Ra,{}),e.jsx(re,{children:"Complex Ccc"})]})]})]})]})}const br={position:"sticky",justifyContent:"end",zIndex:1,UNSAFE_style:{float:"right"}};function La(){const t=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:[t&&e.jsx("style",{children:`.${Te}, .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,{...br,UNSAFE_className:Te,marginTop:-56,top:20,gap:10,alignItems:"end",children:[o?e.jsx(Wo,{}):null,e.jsx(ka,{})]}),e.jsx(C,{...br,UNSAFE_className:Te,top:"calc(100vh - 40px)",marginTop:-32,marginEnd:o?-234:0,children:e.jsx(Na,{})}),e.jsx(Xt,{}),e.jsx(ne,{"data-menu-category":"Colors"}),e.jsx(Tt,{}),e.jsx(xa,{}),e.jsx(ne,{"data-menu-category":"Layout"}),e.jsx(Ea,{}),e.jsx(ne,{"data-menu-category":"Components"}),e.jsx(Q,{}),e.jsx(Yt,{}),e.jsx(Ht,{}),e.jsx(Wt,{}),e.jsx(pe,{}),e.jsx(Zt,{}),e.jsx(Nt,{}),e.jsx(qt,{}),e.jsx(kt,{}),e.jsx(Dt,{}),e.jsx(aa,{}),e.jsx(Pa,{}),e.jsx(Kt,{}),e.jsx(Ut,{}),e.jsx($t,{}),e.jsx(Ft,{}),e.jsx(bt,{}),e.jsx(So,{}),e.jsx($a,{}),e.jsx(ne,{"data-menu-category":"Spectrum Components"}),e.jsx(ja,{}),e.jsx(ne,{"data-menu-category":"Spectrum Comparison"}),e.jsx(Ma,{})]})})}function ze(t){const{workspace:r,setWorkspace:o}=t;return u.useEffect(()=>{qo.makeDefaultWorkspace({getLayouts:async()=>[],getLayout:async()=>({})}).then(o)},[o]),r!=null?e.jsx(La,{}):null}ze.propTypes={workspace:ve.shape({}),setWorkspace:ve.func.isRequired};ze.defaultProps={workspace:null};const _a=t=>({workspace:ko(t)}),Ba=lo(_a,{setWorkspace:To})(ze);function Xa(){return Ho.register(new URL("./download/serviceWorker.js",window.location.href)),No.init({getWorker:()=>new po}),window["__react-beautiful-dnd-disable-dev-warnings"]=!0,e.jsx(_o,{children:e.jsx(so,{store:Do,children:e.jsx(Ba,{})})})}export{Xa as StyleGuideRoot,Xa as default};
214
- //# sourceMappingURL=StyleGuideRoot-230d7b7d.js.map
214
+ //# sourceMappingURL=StyleGuideRoot-b8bec309.js.map