@deephaven/code-studio 0.58.1-beta.3 → 0.58.1-beta.4

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 (25) hide show
  1. package/build/assets/{AppRoot-f2c0cecf.js → AppRoot-fdc5eb5a.js} +3 -3
  2. package/build/assets/{AppRoot-f2c0cecf.js.map → AppRoot-fdc5eb5a.js.map} +1 -1
  3. package/build/assets/{ControlType-aff5f8e7.js → ControlType-69102dc4.js} +2 -2
  4. package/build/assets/{ControlType-aff5f8e7.js.map → ControlType-69102dc4.js.map} +1 -1
  5. package/build/assets/{FontBootstrap-b7f5a552.js → FontBootstrap-f42bc79f.js} +2 -2
  6. package/build/assets/{FontBootstrap-b7f5a552.js.map → FontBootstrap-f42bc79f.js.map} +1 -1
  7. package/build/assets/{IrisGrid-8a50ed39.js → IrisGrid-15265463.js} +3 -3
  8. package/build/assets/IrisGrid-15265463.js.map +1 -0
  9. package/build/assets/{IrisGridModelFactory-77d1d5ab.js → IrisGridModelFactory-2a87d03d.js} +2 -2
  10. package/build/assets/{IrisGridModelFactory-77d1d5ab.js.map → IrisGridModelFactory-2a87d03d.js.map} +1 -1
  11. package/build/assets/{StyleGuideRoot-7922ed98.js → StyleGuideRoot-42c5ad7b.js} +2 -2
  12. package/build/assets/{StyleGuideRoot-7922ed98.js.map → StyleGuideRoot-42c5ad7b.js.map} +1 -1
  13. package/build/assets/{index-3594c50b.js → index-37d5593d.js} +2 -2
  14. package/build/assets/{index-3594c50b.js.map → index-37d5593d.js.map} +1 -1
  15. package/build/assets/{index-193f6ee3.js → index-635bafe9.js} +2 -2
  16. package/build/assets/{index-193f6ee3.js.map → index-635bafe9.js.map} +1 -1
  17. package/build/assets/{index-ac83be2c.js → index-c71a4621.js} +2 -2
  18. package/build/assets/{index-ac83be2c.js.map → index-c71a4621.js.map} +1 -1
  19. package/build/assets/{usePlugins-d0580593.js → usePlugins-88ed4725.js} +2 -2
  20. package/build/assets/{usePlugins-d0580593.js.map → usePlugins-88ed4725.js.map} +1 -1
  21. package/build/assets/{useUser-e2e1b326.js → useUser-ce344a68.js} +2 -2
  22. package/build/assets/{useUser-e2e1b326.js.map → useUser-ce344a68.js.map} +1 -1
  23. package/build/index.html +1 -1
  24. package/package.json +31 -31
  25. package/build/assets/IrisGrid-8a50ed39.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import{r as i,F as Z,C as e,aI as C,H as ce,Q as po,M as ue,G as E,_ as ne,L as ze,aJ as Mo,aK as L,aL as Lo,aM as k,$ as Po,Z as R,a2 as _o,a3 as _e,aN as Bo,a4 as Fo,a5 as Be,a0 as ge,a7 as Oo,a8 as b,aO as Vo,aP as $e,aQ as G,aR as Uo,a6 as Go,aS as Ae,ac as xo,ab as M,aT as Re,aU as Ho,aV as zo,ad as Wo,aW as qo,aX as Ko,aY as H,aZ as Zo,a_ as pe,a$ as D,b0 as Xo,b1 as Yo,b2 as Qo,al as Jo,b3 as er,b4 as xe,J as or,Y as rr}from"./vendor-c2884880.js";import{aT as We,aU as V,aS as te,aV as Fe,aW as Oe,aX as fo,av as lr,aY as z,aZ as qe,E as Ke,a_ as Ze,G as Me,a$ as sr,b0 as tr,K as ar,b1 as cr,b2 as nr}from"./index-193f6ee3.js";import{W as dr}from"./monaco-1410cbed.js";import{ad as ve,aa as bo,a7 as W,ae as yo,B as hr,g as ee,m as ir,L as fe,af as Y,ag as ur,I as gr,R as jo,f as B,C as Le,O as mr,a as vr,S as pr,c as se,b as Xe,P as Ye,h as xr,d as fr}from"./IrisGrid-8a50ed39.js";import{B as p,u as wo,g as ae,e as X,a3 as I,K as $,w as he,v as br,l as Qe,ba as Je,m as yr,C as P,a6 as oe,S as ie,_ as jr,x as wr,d as eo,a8 as Co,j as Cr,A as Sr,M as Tr,N as kr}from"./usePlugins-d0580593.js";import{M as oo,H as Nr,A as Dr,V as be,T as Er,D as Ir,C as $r,a as Ar,c as Rr,N as Mr,b as Lr,d as Pr}from"./FontBootstrap-b7f5a552.js";import{T as _r}from"./useUser-e2e1b326.js";import{L as Br}from"./AppRoot-f2c0cecf.js";import{Q as Fr,x as Or,s as Vr}from"./ControlType-aff5f8e7.js";import"./helpers-042e6b4d.js";import"./plotly-f77cf0f4.js";function ro(l,o,r,s,t,a,c){try{var d=l[a](c),h=d.value}catch(u){r(u);return}d.done?o(h):Promise.resolve(h).then(s,t)}function ye(l){return function(){var o=this,r=arguments;return new Promise(function(s,t){var a=l.apply(o,r);function c(h){ro(a,s,t,c,d,"next",h)}function d(h){ro(a,s,t,c,d,"throw",h)}c(void 0)})}}function _(l,o,r){return o=Ur(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function Ur(l){var o=Gr(l,"string");return typeof o=="symbol"?o:String(o)}function Gr(l,o){if(typeof l!="object"||l===null)return l;var r=l[Symbol.toPrimitive];if(r!==void 0){var s=r.call(l,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(l)}class Hr extends ve{constructor(){var{rowCount:o=1e9,columnCount:r=100,floatingTopRowCount:s=0,floatingBottomRowCount:t=0,floatingLeftColumnCount:a=0,floatingRightColumnCount:c=0,isEditable:d=!1,editedData:h=[]}=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=o,this.numColumns=r,this.floatingTop=s,this.floatingBottom=t,this.floatingLeft=a,this.floatingRight=c,this.editable=d,this.editedData=h}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(o,r){var s,t;return(s=(t=this.editedData[o])===null||t===void 0?void 0:t[r])!==null&&s!==void 0?s:"".concat(o,",").concat(r)}colorForCell(o,r,s){return s.textColor}textForColumnHeader(o){return"".concat(o)}textForRowHeader(o){return"".concat(o)}textForRowFooter(o){return"".concat(o)}setValueForCell(o,r,s){var t=this;return ye(function*(){t.editedData[o]==null&&(t.editedData[o]=[]),t.editedData[o][r]="".concat(s)})()}setValueForRanges(o,r){var s=this;return ye(function*(){bo.forEachCell(o,(t,a)=>{s.setValueForCell(t,a,r)})})()}setValues(o){var r=this;return ye(function*(){for(var s=0;s<o.length;s+=1){var t,a,c=o[s];r.setValueForCell((t=c.column)!==null&&t!==void 0?t:c.x,(a=c.row)!==null&&a!==void 0?a:c.y,c.text)}})()}editValueForCell(o,r){return this.textForCell(o,r)}isValidForCell(o,r,s){return!0}isEditableRange(o){return this.isEditable}delete(o){throw new Error("Method not implemented.")}}const Ve=Hr;function w(l,o,r){return o=zr(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function zr(l){var o=Wr(l,"string");return typeof o=="symbol"?o:String(o)}function Wr(l,o){if(typeof l!="object"||l===null)return l;var r=l[Symbol.toPrimitive];if(r!==void 0){var s=r.call(l,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(l)}class N extends Ve{constructor(){var{rowCount:o=N.DEFAULT_ROW_COUNT,columnCount:r=N.DEFAULT_COLUMN_COUNT,children:s=new Map,childRowCount:t=Math.ceil(Math.max(N.MIN_CHILD_ROW_COUNT,o*N.DEFAULT_CHILD_ROW_COUNT_FACTOR)),maxDepth:a=N.MAX_DEPTH}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super({rowCount:o,columnCount:r}),w(this,"children",void 0),w(this,"childRowCount",void 0),w(this,"maxDepth",void 0),w(this,"getCachedModelRowOffset",W((c,d)=>{for(var h=null,u=d,n=[...c].sort((y,F)=>y[0]-F[0]),g=0;g<n.length;g+=1){var[m,v]=n[g];if(u<=m)break;var f=v.rowCount;if(u<=m+f){h=m,u=u-m-1;break}u-=f}return{key:h,offsetRow:u}})),w(this,"getCachedTextForRowHeader",W((c,d)=>{var{key:h,offsetRow:u}=this.getCachedModelRowOffset(c,d);if(h!=null){var n=c.get(h);if(n!==void 0)return"".concat(h,".").concat(n.textForRowHeader(u))}return"".concat(u)})),w(this,"getCachedTextForCell",W((c,d,h)=>{var{key:u,offsetRow:n}=this.getCachedModelRowOffset(c,h);if(u!=null){var g=c.get(u);if(g!==void 0)return"".concat(u,".").concat(g.textForCell(d,n))}return"".concat(d,",").concat(n)})),w(this,"getCachedIsRowExpandable",W((c,d,h)=>{var u=this.getCachedDepthForRow(c,d);return u<h})),w(this,"getCachedIsRowExpanded",W((c,d)=>{var{key:h,offsetRow:u}=this.getCachedModelRowOffset(c,d);if(h!=null){var n=c.get(h);if(n!==void 0)return n.isRowExpanded(u)}return c.has(u)})),w(this,"getCachedDepthForRow",W((c,d)=>{var{key:h,offsetRow:u}=this.getCachedModelRowOffset(c,d);if(h!=null){var n=c.get(h);if(n!==void 0)return n.depthForRow(u)+1}return 0})),this.children=s,this.childRowCount=t,this.maxDepth=a}textForCell(o,r){return this.getCachedTextForCell(this.children,o,r)}textForRowHeader(o){return this.getCachedTextForRowHeader(this.children,o)}isRowMovable(o){return!1}get hasExpandableRows(){return!0}get isExpandAllAvailable(){return!1}get floatingBottomRowCount(){return 0}isRowExpandable(o){return this.getCachedIsRowExpandable(this.children,o,this.maxDepth)}isRowExpanded(o){return this.getCachedIsRowExpanded(this.children,o)}setRowExpanded(o,r){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,{key:t,offsetRow:a}=this.getCachedModelRowOffset(this.children,o),c=new Map(this.children);if(t!=null){var d=this.children.get(t);if(d!==void 0){var{rowCount:h}=d;d.setRowExpanded(a,r,s),this.numRows+=d.rowCount-h}}else if(r){var n=new N({rowCount:this.childRowCount,columnCount:this.numColumns});c.set(a,n),this.numRows+=n.rowCount}else{var u=c.get(a);u!==void 0&&(this.numRows-=u.rowCount,c.delete(a))}this.children=c}expandAll(){throw new Error("Expand all not implemented.")}collapseAll(){throw new Error("Collapse all not implemented.")}depthForRow(o){return this.getCachedDepthForRow(this.children,o)}}w(N,"DEFAULT_ROW_COUNT",1e9);w(N,"DEFAULT_COLUMN_COUNT",100);w(N,"DEFAULT_CHILD_ROW_COUNT_FACTOR",.01);w(N,"MIN_CHILD_ROW_COUNT",10);w(N,"MAX_DEPTH",10);const Ue=N;function je(l,o,r){return o=qr(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function qr(l){var o=Kr(l,"string");return typeof o=="symbol"?o:String(o)}function Kr(l,o){if(typeof l!="object"||l===null)return l;var r=l[Symbol.toPrimitive];if(r!==void 0){var s=r.call(l,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(l)}class Zr extends ve{constructor(o,r){var s;super(),je(this,"data",void 0),je(this,"columnHeaders",void 0),je(this,"numberOfColumns",void 0),this.data=o,this.numberOfColumns=Math.max(...o.map(t=>t.length),(s=r?.length)!==null&&s!==void 0?s:0),this.columnHeaders=r}get rowCount(){return this.data.length}get columnCount(){return this.numberOfColumns}textForCell(o,r){var s;return"".concat((s=this.data[r])===null||s===void 0?void 0:s[o])}textForColumnHeader(o){var r,s;return(r=(s=this.columnHeaders)===null||s===void 0?void 0:s[o])!==null&&r!==void 0?r:""}}const Xr=Zr;function we(l,o,r){return o=Yr(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function Yr(l){var o=Qr(l,"string");return typeof o=="symbol"?o:String(o)}function Qr(l,o){if(typeof l!="object"||l===null)return l;var r=l[Symbol.toPrimitive];if(r!==void 0){var s=r.call(l,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(l)}class Jr extends ve{constructor(o,r){super(),we(this,"numberOfColumns",void 0),we(this,"numberOfRows",void 0),we(this,"viewportData",void 0),this.numberOfColumns=o,this.numberOfRows=r}get columnCount(){return this.numberOfColumns}get rowCount(){return this.numberOfRows}textForCell(o,r){var s,t,a,c,d,h,u,n=r-((s=(t=this.viewportData)===null||t===void 0?void 0:t.rowOffset)!==null&&s!==void 0?s:0),g=o-((a=(c=this.viewportData)===null||c===void 0?void 0:c.columnOffset)!==null&&a!==void 0?a:0);return"".concat((d=(h=this.viewportData)===null||h===void 0||(u=h.data[n])===null||u===void 0?void 0:u[g])!==null&&d!==void 0?d:"")}textForColumnHeader(o){return"".concat(o)}textForRowHeader(o){return"".concat(o)}}const el=Jr;function S(l,o,r){return o=ol(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function ol(l){var o=rl(l,"string");return typeof o=="symbol"?o:String(o)}function rl(l,o){if(typeof l!="object"||l===null)return l;var r=l[Symbol.toPrimitive];if(r!==void 0){var s=r.call(l,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(l)}var ll="proportional",sl=yo.positiveBarColor,tl=yo.negativeBarColor,al="beside",cl="LTR",nl="right";function dl(l){return Array.isArray(l)&&l.every(o=>typeof o=="number")}class hl extends ve{constructor(o){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Map,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Map,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:new Map,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:new Map,c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:new Map,d=arguments.length>6&&arguments[6]!==void 0?arguments[6]:new Map,h=arguments.length>7&&arguments[7]!==void 0?arguments[7]:new Map,u=arguments.length>8&&arguments[8]!==void 0?arguments[8]:new Map;super(),S(this,"numberOfColumns",void 0),S(this,"numberOfRows",void 0),S(this,"data",void 0),S(this,"columnMins",void 0),S(this,"columnMaxs",void 0),S(this,"columnAxes",void 0),S(this,"valuePlacements",void 0),S(this,"directions",void 0),S(this,"positiveColors",void 0),S(this,"negativeColors",void 0),S(this,"opacities",void 0),S(this,"textAlignments",void 0),S(this,"markers",void 0),this.positiveColors=s,this.negativeColors=t,this.data=o,this.columnAxes=r,this.valuePlacements=a,this.opacities=c,this.directions=d,this.textAlignments=h,this.markers=u,this.numberOfRows=Math.max(...o.map(m=>m.length)),this.numberOfColumns=o.length,this.columnMins=new Map,this.columnMaxs=new Map;for(var n=0;n<o.length;n+=1){var g=o[n];dl(g)&&(this.columnMins.set(n,Math.min(...g)),this.columnMaxs.set(n,Math.max(...g)))}}get rowCount(){return this.numberOfRows}get columnCount(){return this.numberOfColumns}textForCell(o,r){var s;return"".concat((s=this.data[o])===null||s===void 0?void 0:s[r])}textForColumnHeader(o){return"".concat(o)}textAlignForCell(o,r){var s;return(s=this.textAlignments.get(o))!==null&&s!==void 0?s:nl}renderTypeForCell(o,r){return o<20||o%2===r%2?"dataBar":"text"}dataBarOptionsForCell(o,r){var s,t,a,c,d,h,u,n=We(this.columnMins,o),g=We(this.columnMaxs,o),m=(s=this.columnAxes.get(o))!==null&&s!==void 0?s:ll,v=(t=this.valuePlacements.get(o))!==null&&t!==void 0?t:al,f=this.opacities.get(o);f==null||f>1?f=1:f<0&&(f=0);var y=(a=this.directions.get(o))!==null&&a!==void 0?a:cl,F=(c=this.positiveColors.get(o))!==null&&c!==void 0?c:sl,Q=(d=this.negativeColors.get(o))!==null&&d!==void 0?d:tl,O=Number((h=this.data[o])===null||h===void 0?void 0:h[r]),U=O>=0?F:Q,de=(u=this.markers.get(o))!==null&&u!==void 0?u:[];return{columnMin:n,columnMax:g,axis:m,color:U,valuePlacement:v,opacity:f,markers:de,direction:y,value:O}}}const il=hl,Ce="hide-from-e2e-tests",lo="sample-section";function*So(l=1){for(;;)l=l*16807%2147483647,yield l/2147483647}function ul(l=1){const[o]=i.useState(()=>So(l));return i.useCallback(()=>{const r=o.next();if(r.done===!0)throw new Error("Random number generator unexpectedly finished");return r.value},[o])}function x(l,o=[]){const r=`${lo}-${l.toLocaleLowerCase().replaceAll(" ","-")}`,s=Z(lo,...o);return{id:r,className:s}}function T(l,o=[]){const{id:r,className:s}=x(l,o);return{id:r,UNSAFE_className:s}}function A(){}class K extends i.Component{static renderButtonBrand(o,r){const s=o.length?`btn-${o}-${r}`:`btn-${r}`;return e.jsx(hr,{className:s,style:{marginBottom:"1rem",marginRight:"1rem"},children:r},r)}static renderButtons(o){const r=["primary","secondary","success","warning","danger","info"].map(s=>K.renderButtonBrand(o,s));return e.jsxs("div",{...x(`buttons-${o.length?"outline":"regular"}`),children:[e.jsx("h5",{children:o.length?"Outline":"Regular"}),r]},o)}static renderLinks(){const o={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(o).map(([r,s])=>e.jsxs("a",{className:`text-${r}`,children:[r," (",s,")"]},r))})]})}static renderSocketedButtons(){return e.jsxs("div",{...x("buttons-socketed"),children:[e.jsx("h5",{children:"Socketed Buttons (for linker)"}),e.jsx(ee,{style:{marginBottom:"1rem",marginRight:"1rem"},onClick:A,children:"Unlinked"}),e.jsx(ee,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,onClick:A,children:"Linked"}),e.jsx(ee,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinkedSource:!0,onClick:A,children:"Linked Source"}),e.jsx(ee,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,isInvalid:!0,onClick:A,children:"Error"}),e.jsx(ee,{style:{marginBottom:"1rem",marginRight:"1rem"},disabled:!0,onClick:A,children:"Disabled"})]})}constructor(o){super(o),this.state={toggle:!0}}renderInlineButtons(){const{toggle:o}=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:V,tooltip:"test",onClick:A}),"Toggle button (class active):",e.jsx(p,{className:"mx-2",onClick:()=>{this.setState({toggle:!o})},active:o,kind:"inline",icon:V,tooltip:"test"}),"Disabled:",e.jsx(p,{className:"mx-2",kind:"inline",disabled:!0,onClick:A,children:"Disabled"}),"With Text:",e.jsx(p,{className:"mx-2",kind:"inline",icon:V,onClick:A,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:V,tooltip:"test",onClick:A}),e.jsx("span",{className:"mx-2",children:"btn-link:"}),e.jsx(p,{kind:"ghost",onClick:A,children:"Text Button"}),e.jsx("span",{className:"mx-2",children:"btn-link (text w/ optional with icon):"}),e.jsx(p,{kind:"ghost",icon:V,onClick:A,children:"Text Button"})]})}render(){const o=["","outline"].map(a=>K.renderButtons(a)),r=this.renderInlineButtons(),s=K.renderSocketedButtons(),t=K.renderLinks();return e.jsxs("div",{children:[e.jsx("h2",{className:"ui-title",children:"Buttons"}),e.jsxs("div",{style:{padding:"1rem 0"},children:[o,r,s,t]})]})}}function gl(){const l=wo();oo.random=ul();const[o]=i.useState(()=>new oo(l));return e.jsxs("div",{...x("charts"),children:[e.jsx("h2",{className:"ui-title",children:"Chart"}),e.jsx("div",{style:{height:500},children:e.jsx(ir,{model:o})})]})}const To="2px solid var(--dh-color-notice-bg)",ml={"--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-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-blue-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-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"},so={"--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"},vl={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 Pe(l){const o=te.parseRgba(te.asRgbOrRgbaString(l)??"");if(o==null||o.a<.5)return"white";const{r,g:s,b:t}=o;return te.getBrightness([r,s,t])>=128?"black":"white"}function pl(l){const o=getComputedStyle(document.documentElement);return l.split(/[\n;]/g).map(s=>/^(?:\s{2}|:root\{)?(--dh-color-(?:[^:]+))/.exec(s)?.[1]).filter(s=>!!s).map(s=>{const t=o.getPropertyValue(s);return s==="--dh-color-chart-colorway"?t.split("hsl").filter(Boolean).map(c=>`hsl${c.trim()}`).map((c,d)=>({name:`${s}-${d}`,value:c})):{name:s,value:t}}).flat()}function q(l,o,r,s=ml){const t=vl[l];return pl(o).reduce((d,{name:h,value:u})=>{if(/^--dh-color-(.*?)-hsl$/.test(h)||/^--dh-color-gray-(light|mid|dark)$/.test(h))return d;const n=/^--dh-color-([^-]+)(?:-([^-]+))?/.exec(h);let g=s[h]??n?.[r]??n?.[1]??"???";if(g=t[g]??g,d[g]==null&&(d[g]=[]),h in so&&d[g].push({isLabel:!0,name:so[h],value:""}),/^--dh-color-gray-(light|mid|dark)$/.test(h))return d;const m={"--dh-color-gray-900":"light","--dh-color-gray-600":"mid","--dh-color-gray-300":"dark"}[h];return d[g].push({name:h,value:u,note:m}),d},{})}function xl(){const l=i.useRef(null);return i.useLayoutEffect(()=>{if(l.current==null)return;const o=getComputedStyle(l.current),{backgroundColor:r}=o;l.current.style.color=Pe(r)},[]),l}function fl(l,o){const[r,s]=i.useState();return i.useEffect(()=>{if(l.current==null)return;const t=getComputedStyle(l.current,o).getPropertyValue("content"),a=/"(--dh-color-.*?)[,"]/.exec(t)?.[1];if(a==null)return;const c=getComputedStyle(l.current).getPropertyValue(a);s(c)},[l,o]),r}function Se({className:l,children:o}){const r=xl(),s=fl(r,":after"),t=i.useMemo(()=>s!=null?{value:s,normalized:te.normalizeCssColor(s,!0)}:null,[s]),a=t!=null&&t.value!=="";return e.jsxs("div",{ref:r,className:l,style:{border:a?void 0:To},children:[a&&e.jsxs(ae,{interactive:!0,children:[e.jsx("div",{children:t.value}),e.jsx("div",{children:t.normalized})]}),o]})}function bl(){const l=["100","200","300","400","500","600","700","800","850","8XX","900"].map(s=>e.jsx(Se,{className:Z("swatch","gray-swatch",`gray-swatch-${s}`),children:s==="8XX"?"N/A":`Gray-${s}`},s)),o=["red","orange","yellow","green","blue","purple","white","black"].map(s=>e.jsx(Se,{className:Z("swatch",`swatch-${s}`),children:s},s)),r=["content-bg","background","foreground","primary","primary-dark","primary-light","secondary","secondary-hover","success","info","warning","danger","danger-hover"].map(s=>e.jsx(Se,{className:Z("swatch",`swatch-${s}`),children:s},s));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:[l,o]}),e.jsx("div",{className:"col",children:r}),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 yl extends i.Component{constructor(o){super(o),this.makeContextMenuItems=this.makeContextMenuItems.bind(this)}makeContextMenuItems(o){const r=o!==void 0?` ${o}`:"";return[{title:`Show Alert${r}`,icon:Fe,action:()=>{alert(`Alert${r}!`)},shortcut:new X({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[I.CTRL,$.A],macShortcut:[I.CMD,$.A]})},{title:`Log Message${r}`,icon:Oe,action:()=>{console.log(`Logging a message${r}!`)},shortcut:new X({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[I.CTRL,$.L],macShortcut:[I.CMD,$.L]})},{title:"Sub-menu",actions:()=>this.makeContextMenuItems((o??0)+1),order:3}].concat(new Array(10).fill({title:`Disabled Option${r}`,disabled:!0,order:2}))}render(){const o=this.makeContextMenuItems(),s=[{title:"Show Shortcuts",icon:fo,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new X({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[I.CTRL,$.SLASH],macShortcut:[I.CMD,$.SLASH]}),group:he.groups.global}].concat(o),t=()=>new Promise(a=>{setTimeout(()=>{a(o)},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(he,{actions:s})]}),e.jsxs(p,{kind:"tertiary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(he,{actions:t})]})]})}}class jl extends i.Component{constructor(o){super(o),this.sampleInput=ce.createRef(),this.handleUpdateCheckboxMap=this.handleUpdateCheckboxMap.bind(this);const r=["Parent A",new Map([["Child 1",!0],["Child 2",!1]])],s=["Parent B",new Map([["Child 3",!0],["Child 4",!1],["Child 5",!0],["Child 6",!1]])],t=["Leaf Parent",!0];this.state={isShown:!1,checkBoxMap:new Map([r,s,t])}}handleUpdateCheckboxMap(o){this.setState({checkBoxMap:o})}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:o,checkBoxMap:r}=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:()=>{o?this.setState({isShown:!1}):this.setState({isShown:!0})},children:["Open Dialog",e.jsx(br,{options:{placement:"bottom"},isShown:o,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(Nr,{menuText:"Checkbox Menu",valueMap:r,onUpdateValueMap:this.handleUpdateCheckboxMap})]})}}class wl extends i.Component{constructor(o){super(o),this.state={isShown:!1}}render(){const o=[{title:"Show Alert",icon:Fe,action:()=>{alert("Alert!")},shortcut:new X({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[I.CTRL,$.A],macShortcut:[I.CMD,$.A]})},{title:"Log Message",icon:Oe,action:()=>{console.log("Logging a message!")},shortcut:new X({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[I.CTRL,$.L],macShortcut:[I.CMD,$.L]})}],s=[{title:"Show Shortcuts",icon:fo,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new X({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[I.CTRL,$.SLASH],macShortcut:[I.CMD,$.SLASH]}),group:he.groups.global}].concat(o),{isShown:t}=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:lr,onClick:()=>{},children:e.jsx(Qe,{actions:s})}),e.jsxs(p,{kind:"primary",style:{marginRight:"1rem",minWidth:"165px"},onClick:()=>{t?this.setState({isShown:!1}):this.setState({isShown:!0})},children:["Menu Shown: ",t.toString()]}),e.jsxs("div",{ref:this.button,className:"btn btn-secondary disabled",style:{marginRight:"1rem"},children:["Shown using isShown",e.jsx(Qe,{isShown:t,onMenuClosed:()=>{this.setState({isShown:!1})},actions:s})]})]})}}const Cl=`trades = db.t("LearnDeephaven", "StockTrades").where("Date=\`2017-08-25\`")\\
1
+ import{r as i,F as Z,C as e,aI as C,H as ce,Q as po,M as ue,G as E,_ as ne,L as ze,aJ as Mo,aK as L,aL as Lo,aM as k,$ as Po,Z as R,a2 as _o,a3 as _e,aN as Bo,a4 as Fo,a5 as Be,a0 as ge,a7 as Oo,a8 as b,aO as Vo,aP as $e,aQ as G,aR as Uo,a6 as Go,aS as Ae,ac as xo,ab as M,aT as Re,aU as Ho,aV as zo,ad as Wo,aW as qo,aX as Ko,aY as H,aZ as Zo,a_ as pe,a$ as D,b0 as Xo,b1 as Yo,b2 as Qo,al as Jo,b3 as er,b4 as xe,J as or,Y as rr}from"./vendor-c2884880.js";import{aT as We,aU as V,aS as te,aV as Fe,aW as Oe,aX as fo,av as lr,aY as z,aZ as qe,E as Ke,a_ as Ze,G as Me,a$ as sr,b0 as tr,K as ar,b1 as cr,b2 as nr}from"./index-635bafe9.js";import{W as dr}from"./monaco-1410cbed.js";import{ad as ve,aa as bo,a7 as W,ae as yo,B as hr,g as ee,m as ir,L as fe,af as Y,ag as ur,I as gr,R as jo,f as B,C as Le,O as mr,a as vr,S as pr,c as se,b as Xe,P as Ye,h as xr,d as fr}from"./IrisGrid-15265463.js";import{B as p,u as wo,g as ae,e as X,a3 as I,K as $,w as he,v as br,l as Qe,ba as Je,m as yr,C as P,a6 as oe,S as ie,_ as jr,x as wr,d as eo,a8 as Co,j as Cr,A as Sr,M as Tr,N as kr}from"./usePlugins-88ed4725.js";import{M as oo,H as Nr,A as Dr,V as be,T as Er,D as Ir,C as $r,a as Ar,c as Rr,N as Mr,b as Lr,d as Pr}from"./FontBootstrap-f42bc79f.js";import{T as _r}from"./useUser-ce344a68.js";import{L as Br}from"./AppRoot-fdc5eb5a.js";import{Q as Fr,x as Or,s as Vr}from"./ControlType-69102dc4.js";import"./helpers-042e6b4d.js";import"./plotly-f77cf0f4.js";function ro(l,o,r,s,t,a,c){try{var d=l[a](c),h=d.value}catch(u){r(u);return}d.done?o(h):Promise.resolve(h).then(s,t)}function ye(l){return function(){var o=this,r=arguments;return new Promise(function(s,t){var a=l.apply(o,r);function c(h){ro(a,s,t,c,d,"next",h)}function d(h){ro(a,s,t,c,d,"throw",h)}c(void 0)})}}function _(l,o,r){return o=Ur(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function Ur(l){var o=Gr(l,"string");return typeof o=="symbol"?o:String(o)}function Gr(l,o){if(typeof l!="object"||l===null)return l;var r=l[Symbol.toPrimitive];if(r!==void 0){var s=r.call(l,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(l)}class Hr extends ve{constructor(){var{rowCount:o=1e9,columnCount:r=100,floatingTopRowCount:s=0,floatingBottomRowCount:t=0,floatingLeftColumnCount:a=0,floatingRightColumnCount:c=0,isEditable:d=!1,editedData:h=[]}=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=o,this.numColumns=r,this.floatingTop=s,this.floatingBottom=t,this.floatingLeft=a,this.floatingRight=c,this.editable=d,this.editedData=h}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(o,r){var s,t;return(s=(t=this.editedData[o])===null||t===void 0?void 0:t[r])!==null&&s!==void 0?s:"".concat(o,",").concat(r)}colorForCell(o,r,s){return s.textColor}textForColumnHeader(o){return"".concat(o)}textForRowHeader(o){return"".concat(o)}textForRowFooter(o){return"".concat(o)}setValueForCell(o,r,s){var t=this;return ye(function*(){t.editedData[o]==null&&(t.editedData[o]=[]),t.editedData[o][r]="".concat(s)})()}setValueForRanges(o,r){var s=this;return ye(function*(){bo.forEachCell(o,(t,a)=>{s.setValueForCell(t,a,r)})})()}setValues(o){var r=this;return ye(function*(){for(var s=0;s<o.length;s+=1){var t,a,c=o[s];r.setValueForCell((t=c.column)!==null&&t!==void 0?t:c.x,(a=c.row)!==null&&a!==void 0?a:c.y,c.text)}})()}editValueForCell(o,r){return this.textForCell(o,r)}isValidForCell(o,r,s){return!0}isEditableRange(o){return this.isEditable}delete(o){throw new Error("Method not implemented.")}}const Ve=Hr;function w(l,o,r){return o=zr(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function zr(l){var o=Wr(l,"string");return typeof o=="symbol"?o:String(o)}function Wr(l,o){if(typeof l!="object"||l===null)return l;var r=l[Symbol.toPrimitive];if(r!==void 0){var s=r.call(l,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(l)}class N extends Ve{constructor(){var{rowCount:o=N.DEFAULT_ROW_COUNT,columnCount:r=N.DEFAULT_COLUMN_COUNT,children:s=new Map,childRowCount:t=Math.ceil(Math.max(N.MIN_CHILD_ROW_COUNT,o*N.DEFAULT_CHILD_ROW_COUNT_FACTOR)),maxDepth:a=N.MAX_DEPTH}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super({rowCount:o,columnCount:r}),w(this,"children",void 0),w(this,"childRowCount",void 0),w(this,"maxDepth",void 0),w(this,"getCachedModelRowOffset",W((c,d)=>{for(var h=null,u=d,n=[...c].sort((y,F)=>y[0]-F[0]),g=0;g<n.length;g+=1){var[m,v]=n[g];if(u<=m)break;var f=v.rowCount;if(u<=m+f){h=m,u=u-m-1;break}u-=f}return{key:h,offsetRow:u}})),w(this,"getCachedTextForRowHeader",W((c,d)=>{var{key:h,offsetRow:u}=this.getCachedModelRowOffset(c,d);if(h!=null){var n=c.get(h);if(n!==void 0)return"".concat(h,".").concat(n.textForRowHeader(u))}return"".concat(u)})),w(this,"getCachedTextForCell",W((c,d,h)=>{var{key:u,offsetRow:n}=this.getCachedModelRowOffset(c,h);if(u!=null){var g=c.get(u);if(g!==void 0)return"".concat(u,".").concat(g.textForCell(d,n))}return"".concat(d,",").concat(n)})),w(this,"getCachedIsRowExpandable",W((c,d,h)=>{var u=this.getCachedDepthForRow(c,d);return u<h})),w(this,"getCachedIsRowExpanded",W((c,d)=>{var{key:h,offsetRow:u}=this.getCachedModelRowOffset(c,d);if(h!=null){var n=c.get(h);if(n!==void 0)return n.isRowExpanded(u)}return c.has(u)})),w(this,"getCachedDepthForRow",W((c,d)=>{var{key:h,offsetRow:u}=this.getCachedModelRowOffset(c,d);if(h!=null){var n=c.get(h);if(n!==void 0)return n.depthForRow(u)+1}return 0})),this.children=s,this.childRowCount=t,this.maxDepth=a}textForCell(o,r){return this.getCachedTextForCell(this.children,o,r)}textForRowHeader(o){return this.getCachedTextForRowHeader(this.children,o)}isRowMovable(o){return!1}get hasExpandableRows(){return!0}get isExpandAllAvailable(){return!1}get floatingBottomRowCount(){return 0}isRowExpandable(o){return this.getCachedIsRowExpandable(this.children,o,this.maxDepth)}isRowExpanded(o){return this.getCachedIsRowExpanded(this.children,o)}setRowExpanded(o,r){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,{key:t,offsetRow:a}=this.getCachedModelRowOffset(this.children,o),c=new Map(this.children);if(t!=null){var d=this.children.get(t);if(d!==void 0){var{rowCount:h}=d;d.setRowExpanded(a,r,s),this.numRows+=d.rowCount-h}}else if(r){var n=new N({rowCount:this.childRowCount,columnCount:this.numColumns});c.set(a,n),this.numRows+=n.rowCount}else{var u=c.get(a);u!==void 0&&(this.numRows-=u.rowCount,c.delete(a))}this.children=c}expandAll(){throw new Error("Expand all not implemented.")}collapseAll(){throw new Error("Collapse all not implemented.")}depthForRow(o){return this.getCachedDepthForRow(this.children,o)}}w(N,"DEFAULT_ROW_COUNT",1e9);w(N,"DEFAULT_COLUMN_COUNT",100);w(N,"DEFAULT_CHILD_ROW_COUNT_FACTOR",.01);w(N,"MIN_CHILD_ROW_COUNT",10);w(N,"MAX_DEPTH",10);const Ue=N;function je(l,o,r){return o=qr(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function qr(l){var o=Kr(l,"string");return typeof o=="symbol"?o:String(o)}function Kr(l,o){if(typeof l!="object"||l===null)return l;var r=l[Symbol.toPrimitive];if(r!==void 0){var s=r.call(l,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(l)}class Zr extends ve{constructor(o,r){var s;super(),je(this,"data",void 0),je(this,"columnHeaders",void 0),je(this,"numberOfColumns",void 0),this.data=o,this.numberOfColumns=Math.max(...o.map(t=>t.length),(s=r?.length)!==null&&s!==void 0?s:0),this.columnHeaders=r}get rowCount(){return this.data.length}get columnCount(){return this.numberOfColumns}textForCell(o,r){var s;return"".concat((s=this.data[r])===null||s===void 0?void 0:s[o])}textForColumnHeader(o){var r,s;return(r=(s=this.columnHeaders)===null||s===void 0?void 0:s[o])!==null&&r!==void 0?r:""}}const Xr=Zr;function we(l,o,r){return o=Yr(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function Yr(l){var o=Qr(l,"string");return typeof o=="symbol"?o:String(o)}function Qr(l,o){if(typeof l!="object"||l===null)return l;var r=l[Symbol.toPrimitive];if(r!==void 0){var s=r.call(l,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(l)}class Jr extends ve{constructor(o,r){super(),we(this,"numberOfColumns",void 0),we(this,"numberOfRows",void 0),we(this,"viewportData",void 0),this.numberOfColumns=o,this.numberOfRows=r}get columnCount(){return this.numberOfColumns}get rowCount(){return this.numberOfRows}textForCell(o,r){var s,t,a,c,d,h,u,n=r-((s=(t=this.viewportData)===null||t===void 0?void 0:t.rowOffset)!==null&&s!==void 0?s:0),g=o-((a=(c=this.viewportData)===null||c===void 0?void 0:c.columnOffset)!==null&&a!==void 0?a:0);return"".concat((d=(h=this.viewportData)===null||h===void 0||(u=h.data[n])===null||u===void 0?void 0:u[g])!==null&&d!==void 0?d:"")}textForColumnHeader(o){return"".concat(o)}textForRowHeader(o){return"".concat(o)}}const el=Jr;function S(l,o,r){return o=ol(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function ol(l){var o=rl(l,"string");return typeof o=="symbol"?o:String(o)}function rl(l,o){if(typeof l!="object"||l===null)return l;var r=l[Symbol.toPrimitive];if(r!==void 0){var s=r.call(l,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(l)}var ll="proportional",sl=yo.positiveBarColor,tl=yo.negativeBarColor,al="beside",cl="LTR",nl="right";function dl(l){return Array.isArray(l)&&l.every(o=>typeof o=="number")}class hl extends ve{constructor(o){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Map,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Map,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:new Map,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:new Map,c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:new Map,d=arguments.length>6&&arguments[6]!==void 0?arguments[6]:new Map,h=arguments.length>7&&arguments[7]!==void 0?arguments[7]:new Map,u=arguments.length>8&&arguments[8]!==void 0?arguments[8]:new Map;super(),S(this,"numberOfColumns",void 0),S(this,"numberOfRows",void 0),S(this,"data",void 0),S(this,"columnMins",void 0),S(this,"columnMaxs",void 0),S(this,"columnAxes",void 0),S(this,"valuePlacements",void 0),S(this,"directions",void 0),S(this,"positiveColors",void 0),S(this,"negativeColors",void 0),S(this,"opacities",void 0),S(this,"textAlignments",void 0),S(this,"markers",void 0),this.positiveColors=s,this.negativeColors=t,this.data=o,this.columnAxes=r,this.valuePlacements=a,this.opacities=c,this.directions=d,this.textAlignments=h,this.markers=u,this.numberOfRows=Math.max(...o.map(m=>m.length)),this.numberOfColumns=o.length,this.columnMins=new Map,this.columnMaxs=new Map;for(var n=0;n<o.length;n+=1){var g=o[n];dl(g)&&(this.columnMins.set(n,Math.min(...g)),this.columnMaxs.set(n,Math.max(...g)))}}get rowCount(){return this.numberOfRows}get columnCount(){return this.numberOfColumns}textForCell(o,r){var s;return"".concat((s=this.data[o])===null||s===void 0?void 0:s[r])}textForColumnHeader(o){return"".concat(o)}textAlignForCell(o,r){var s;return(s=this.textAlignments.get(o))!==null&&s!==void 0?s:nl}renderTypeForCell(o,r){return o<20||o%2===r%2?"dataBar":"text"}dataBarOptionsForCell(o,r){var s,t,a,c,d,h,u,n=We(this.columnMins,o),g=We(this.columnMaxs,o),m=(s=this.columnAxes.get(o))!==null&&s!==void 0?s:ll,v=(t=this.valuePlacements.get(o))!==null&&t!==void 0?t:al,f=this.opacities.get(o);f==null||f>1?f=1:f<0&&(f=0);var y=(a=this.directions.get(o))!==null&&a!==void 0?a:cl,F=(c=this.positiveColors.get(o))!==null&&c!==void 0?c:sl,Q=(d=this.negativeColors.get(o))!==null&&d!==void 0?d:tl,O=Number((h=this.data[o])===null||h===void 0?void 0:h[r]),U=O>=0?F:Q,de=(u=this.markers.get(o))!==null&&u!==void 0?u:[];return{columnMin:n,columnMax:g,axis:m,color:U,valuePlacement:v,opacity:f,markers:de,direction:y,value:O}}}const il=hl,Ce="hide-from-e2e-tests",lo="sample-section";function*So(l=1){for(;;)l=l*16807%2147483647,yield l/2147483647}function ul(l=1){const[o]=i.useState(()=>So(l));return i.useCallback(()=>{const r=o.next();if(r.done===!0)throw new Error("Random number generator unexpectedly finished");return r.value},[o])}function x(l,o=[]){const r=`${lo}-${l.toLocaleLowerCase().replaceAll(" ","-")}`,s=Z(lo,...o);return{id:r,className:s}}function T(l,o=[]){const{id:r,className:s}=x(l,o);return{id:r,UNSAFE_className:s}}function A(){}class K extends i.Component{static renderButtonBrand(o,r){const s=o.length?`btn-${o}-${r}`:`btn-${r}`;return e.jsx(hr,{className:s,style:{marginBottom:"1rem",marginRight:"1rem"},children:r},r)}static renderButtons(o){const r=["primary","secondary","success","warning","danger","info"].map(s=>K.renderButtonBrand(o,s));return e.jsxs("div",{...x(`buttons-${o.length?"outline":"regular"}`),children:[e.jsx("h5",{children:o.length?"Outline":"Regular"}),r]},o)}static renderLinks(){const o={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(o).map(([r,s])=>e.jsxs("a",{className:`text-${r}`,children:[r," (",s,")"]},r))})]})}static renderSocketedButtons(){return e.jsxs("div",{...x("buttons-socketed"),children:[e.jsx("h5",{children:"Socketed Buttons (for linker)"}),e.jsx(ee,{style:{marginBottom:"1rem",marginRight:"1rem"},onClick:A,children:"Unlinked"}),e.jsx(ee,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,onClick:A,children:"Linked"}),e.jsx(ee,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinkedSource:!0,onClick:A,children:"Linked Source"}),e.jsx(ee,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,isInvalid:!0,onClick:A,children:"Error"}),e.jsx(ee,{style:{marginBottom:"1rem",marginRight:"1rem"},disabled:!0,onClick:A,children:"Disabled"})]})}constructor(o){super(o),this.state={toggle:!0}}renderInlineButtons(){const{toggle:o}=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:V,tooltip:"test",onClick:A}),"Toggle button (class active):",e.jsx(p,{className:"mx-2",onClick:()=>{this.setState({toggle:!o})},active:o,kind:"inline",icon:V,tooltip:"test"}),"Disabled:",e.jsx(p,{className:"mx-2",kind:"inline",disabled:!0,onClick:A,children:"Disabled"}),"With Text:",e.jsx(p,{className:"mx-2",kind:"inline",icon:V,onClick:A,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:V,tooltip:"test",onClick:A}),e.jsx("span",{className:"mx-2",children:"btn-link:"}),e.jsx(p,{kind:"ghost",onClick:A,children:"Text Button"}),e.jsx("span",{className:"mx-2",children:"btn-link (text w/ optional with icon):"}),e.jsx(p,{kind:"ghost",icon:V,onClick:A,children:"Text Button"})]})}render(){const o=["","outline"].map(a=>K.renderButtons(a)),r=this.renderInlineButtons(),s=K.renderSocketedButtons(),t=K.renderLinks();return e.jsxs("div",{children:[e.jsx("h2",{className:"ui-title",children:"Buttons"}),e.jsxs("div",{style:{padding:"1rem 0"},children:[o,r,s,t]})]})}}function gl(){const l=wo();oo.random=ul();const[o]=i.useState(()=>new oo(l));return e.jsxs("div",{...x("charts"),children:[e.jsx("h2",{className:"ui-title",children:"Chart"}),e.jsx("div",{style:{height:500},children:e.jsx(ir,{model:o})})]})}const To="2px solid var(--dh-color-notice-bg)",ml={"--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-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-blue-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-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"},so={"--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"},vl={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 Pe(l){const o=te.parseRgba(te.asRgbOrRgbaString(l)??"");if(o==null||o.a<.5)return"white";const{r,g:s,b:t}=o;return te.getBrightness([r,s,t])>=128?"black":"white"}function pl(l){const o=getComputedStyle(document.documentElement);return l.split(/[\n;]/g).map(s=>/^(?:\s{2}|:root\{)?(--dh-color-(?:[^:]+))/.exec(s)?.[1]).filter(s=>!!s).map(s=>{const t=o.getPropertyValue(s);return s==="--dh-color-chart-colorway"?t.split("hsl").filter(Boolean).map(c=>`hsl${c.trim()}`).map((c,d)=>({name:`${s}-${d}`,value:c})):{name:s,value:t}}).flat()}function q(l,o,r,s=ml){const t=vl[l];return pl(o).reduce((d,{name:h,value:u})=>{if(/^--dh-color-(.*?)-hsl$/.test(h)||/^--dh-color-gray-(light|mid|dark)$/.test(h))return d;const n=/^--dh-color-([^-]+)(?:-([^-]+))?/.exec(h);let g=s[h]??n?.[r]??n?.[1]??"???";if(g=t[g]??g,d[g]==null&&(d[g]=[]),h in so&&d[g].push({isLabel:!0,name:so[h],value:""}),/^--dh-color-gray-(light|mid|dark)$/.test(h))return d;const m={"--dh-color-gray-900":"light","--dh-color-gray-600":"mid","--dh-color-gray-300":"dark"}[h];return d[g].push({name:h,value:u,note:m}),d},{})}function xl(){const l=i.useRef(null);return i.useLayoutEffect(()=>{if(l.current==null)return;const o=getComputedStyle(l.current),{backgroundColor:r}=o;l.current.style.color=Pe(r)},[]),l}function fl(l,o){const[r,s]=i.useState();return i.useEffect(()=>{if(l.current==null)return;const t=getComputedStyle(l.current,o).getPropertyValue("content"),a=/"(--dh-color-.*?)[,"]/.exec(t)?.[1];if(a==null)return;const c=getComputedStyle(l.current).getPropertyValue(a);s(c)},[l,o]),r}function Se({className:l,children:o}){const r=xl(),s=fl(r,":after"),t=i.useMemo(()=>s!=null?{value:s,normalized:te.normalizeCssColor(s,!0)}:null,[s]),a=t!=null&&t.value!=="";return e.jsxs("div",{ref:r,className:l,style:{border:a?void 0:To},children:[a&&e.jsxs(ae,{interactive:!0,children:[e.jsx("div",{children:t.value}),e.jsx("div",{children:t.normalized})]}),o]})}function bl(){const l=["100","200","300","400","500","600","700","800","850","8XX","900"].map(s=>e.jsx(Se,{className:Z("swatch","gray-swatch",`gray-swatch-${s}`),children:s==="8XX"?"N/A":`Gray-${s}`},s)),o=["red","orange","yellow","green","blue","purple","white","black"].map(s=>e.jsx(Se,{className:Z("swatch",`swatch-${s}`),children:s},s)),r=["content-bg","background","foreground","primary","primary-dark","primary-light","secondary","secondary-hover","success","info","warning","danger","danger-hover"].map(s=>e.jsx(Se,{className:Z("swatch",`swatch-${s}`),children:s},s));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:[l,o]}),e.jsx("div",{className:"col",children:r}),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 yl extends i.Component{constructor(o){super(o),this.makeContextMenuItems=this.makeContextMenuItems.bind(this)}makeContextMenuItems(o){const r=o!==void 0?` ${o}`:"";return[{title:`Show Alert${r}`,icon:Fe,action:()=>{alert(`Alert${r}!`)},shortcut:new X({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[I.CTRL,$.A],macShortcut:[I.CMD,$.A]})},{title:`Log Message${r}`,icon:Oe,action:()=>{console.log(`Logging a message${r}!`)},shortcut:new X({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[I.CTRL,$.L],macShortcut:[I.CMD,$.L]})},{title:"Sub-menu",actions:()=>this.makeContextMenuItems((o??0)+1),order:3}].concat(new Array(10).fill({title:`Disabled Option${r}`,disabled:!0,order:2}))}render(){const o=this.makeContextMenuItems(),s=[{title:"Show Shortcuts",icon:fo,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new X({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[I.CTRL,$.SLASH],macShortcut:[I.CMD,$.SLASH]}),group:he.groups.global}].concat(o),t=()=>new Promise(a=>{setTimeout(()=>{a(o)},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(he,{actions:s})]}),e.jsxs(p,{kind:"tertiary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(he,{actions:t})]})]})}}class jl extends i.Component{constructor(o){super(o),this.sampleInput=ce.createRef(),this.handleUpdateCheckboxMap=this.handleUpdateCheckboxMap.bind(this);const r=["Parent A",new Map([["Child 1",!0],["Child 2",!1]])],s=["Parent B",new Map([["Child 3",!0],["Child 4",!1],["Child 5",!0],["Child 6",!1]])],t=["Leaf Parent",!0];this.state={isShown:!1,checkBoxMap:new Map([r,s,t])}}handleUpdateCheckboxMap(o){this.setState({checkBoxMap:o})}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:o,checkBoxMap:r}=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:()=>{o?this.setState({isShown:!1}):this.setState({isShown:!0})},children:["Open Dialog",e.jsx(br,{options:{placement:"bottom"},isShown:o,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(Nr,{menuText:"Checkbox Menu",valueMap:r,onUpdateValueMap:this.handleUpdateCheckboxMap})]})}}class wl extends i.Component{constructor(o){super(o),this.state={isShown:!1}}render(){const o=[{title:"Show Alert",icon:Fe,action:()=>{alert("Alert!")},shortcut:new X({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[I.CTRL,$.A],macShortcut:[I.CMD,$.A]})},{title:"Log Message",icon:Oe,action:()=>{console.log("Logging a message!")},shortcut:new X({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[I.CTRL,$.L],macShortcut:[I.CMD,$.L]})}],s=[{title:"Show Shortcuts",icon:fo,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new X({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[I.CTRL,$.SLASH],macShortcut:[I.CMD,$.SLASH]}),group:he.groups.global}].concat(o),{isShown:t}=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:lr,onClick:()=>{},children:e.jsx(Qe,{actions:s})}),e.jsxs(p,{kind:"primary",style:{marginRight:"1rem",minWidth:"165px"},onClick:()=>{t?this.setState({isShown:!1}):this.setState({isShown:!0})},children:["Menu Shown: ",t.toString()]}),e.jsxs("div",{ref:this.button,className:"btn btn-secondary disabled",style:{marginRight:"1rem"},children:["Shown using isShown",e.jsx(Qe,{isShown:t,onMenuClosed:()=>{this.setState({isShown:!1})},actions:s})]})]})}}const Cl=`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
  `,ts="_themeColors_suwdy_1",as="_label_suwdy_8",cs="_capitalize_suwdy_16",ns="_swatch_suwdy_19",re={themeColors:ts,label:as,capitalize:cs,swatch:ns};function ds(){return{"Theme Color Palette":q("palette",Jl,1),"Semantic Colors":q("semantic",es,1),"Chart Colors":q("chart",os,2),"Editor Colors":q("editor",rs,2),"Grid Colors":q("grid",ls,2),"Component Colors":q("component",ss,1)}}function hs(){const{selectedThemeKey:l}=Co(),o=i.useMemo(ds,[l]);return e.jsx(e.Fragment,{children:Object.entries(o).map(([r,s],t)=>e.jsxs("div",{...x(r),children:[e.jsx("h2",{className:"ui-title",children:r}),e.jsx("div",{className:re.themeColors,children:Object.entries(s).map(([a,c])=>e.jsxs("div",{style:{gridRow:`span ${c.length+1}`},children:[e.jsx("span",{className:Z(re.label,re.capitalize),children:a}),c.map(({isLabel:d,name:h,value:u,note:n})=>d===!0?e.jsx("span",{className:re.label,children:h},h):e.jsxs("div",{className:re.swatch,style:{backgroundColor:u,border:u===""&&h.length>0?To:void 0,color:`var(--dh-color-${Pe(u)})`},children:[e.jsxs(ae,{interactive:!0,children:[e.jsx("div",{children:h}),e.jsx("div",{children:u}),e.jsx("div",{children:te.normalizeCssColor(u,!0)})]}),e.jsx("span",{children:h.replace("--dh-color-","")}),h.endsWith("-hue")||n!=null?e.jsx("span",{children:n??u}):null,e.jsx(Cr,{copy:h,style:{color:`var(--dh-color-${Pe(u)})`}})]},h))]},a))})]},r))})}const Ie="data-menu-category",is="data-no-menu",us="sample-section-e2e-ignore",No="spectrum-component-samples",Do="spectrum-comparison-samples";function gs(){return e.jsxs("div",{id:No,children:[e.jsx("h2",{className:"ui-title","data-no-menu":!0,children:"Spectrum Components"}),e.jsxs(L,{gap:20,columns:Lo("0px","1fr"),children:[e.jsxs(k,{...T("spectrum-buttons"),children:[e.jsx("h3",{children:"Buttons"}),e.jsx(ms,{})]}),e.jsxs(k,{...T("spectrum-collections"),children:[e.jsx("h3",{children:"Collections"}),e.jsx(fs,{})]}),e.jsxs(k,{...T("spectrum-content"),children:[e.jsx("h3",{children:"Content"}),e.jsx(xs,{})]}),e.jsxs(k,{...T("spectrum-forms"),children:[e.jsx("h3",{children:"Forms"}),e.jsx(ps,{})]}),e.jsxs(k,{...T("spectrum-overlays"),children:[e.jsx("h3",{children:"Overlays"}),e.jsxs(C,{gap:"size-160",children:[e.jsx(vs,{}),e.jsxs(Po,{children:[e.jsx(R,{children:"Dialog Trigger"}),l=>e.jsxs(_o,{children:[e.jsx(_e,{children:"Some Heading"}),e.jsx(Bo,{children:"Some Header"}),e.jsx(Fo,{}),e.jsx(Be,{children:e.jsx(ge,{children:"Are you sure?"})}),e.jsxs(Oo,{children:[e.jsx(b,{variant:"secondary",onPress:l,children:"Cancel"}),e.jsx(b,{variant:"accent",onPress:l,children:"Confirm"})]})]})]})]})]}),e.jsxs(k,{...T("spectrum-well"),children:[e.jsx("h3",{children:"Wells"}),e.jsx(Vo,{children:"This is a well."})]})]})]})}function ms(){return e.jsxs(e.Fragment,{children:[e.jsxs(R,{marginBottom:"size-200",children:[e.jsx(ne,{children:e.jsx(E,{icon:V})}),e.jsx(ge,{children:"Icon Button"})]}),e.jsxs(L,{autoFlow:"column",columnGap:"size-250",rowGap:"size-150",columns:$e(4,"size-2000"),rows:$e(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(G,{children:"Normal"}),e.jsx(G,{isQuiet:!0,children:"Quiet"}),e.jsx(G,{gridRow:"span 2",isEmphasized:!0,children:"Emphasized"}),e.jsx(G,{staticColor:"black",children:"Static Black"}),e.jsx(G,{staticColor:"white",children:"Static White"}),e.jsx(G,{isDisabled:!0,children:"Disabled"})]})]})}function vs(){return e.jsxs(e.Fragment,{children:[e.jsx(ge,{children:"Contextual Help"}),e.jsxs(Uo,{variant:"info",children:[e.jsx(_e,{children:"Need help?"}),e.jsx(Be,{children:e.jsx(ge,{children:"This is a helpful description of the thing you need help with."})})]})]})}function ps(){return e.jsx(Go,{children:e.jsxs(L,{gap:20,columns:$e("auto-fit","210px"),children:[e.jsx(Ae,{label:"Text Field"}),e.jsxs(xo,{label:"Combobox",menuTrigger:"focus",defaultSelectedKey:"two",children:[e.jsx(M,{children:"One"},"one"),e.jsx(M,{children:"Two"},"two"),e.jsx(M,{children:"Three"},"three")]}),e.jsx(Re,{children:"Checkbox"}),e.jsx(Ho,{label:"Slider",defaultValue:24}),e.jsx(zo,{children:"Switch"})]})})}function xs(){return e.jsxs(Wo,{children:[e.jsx(ne,{size:"XL",children:e.jsx(E,{icon:ar})}),e.jsx(_e,{children:"Illustrated Message"}),e.jsx(Be,{children:"This is the content of the message."})]})}function fs(){return e.jsxs(e.Fragment,{children:[e.jsx("label",{id:"table-view-sample",children:"Table View"}),e.jsxs(qo,{"aria-labelledby":"table-view-sample",selectionMode:"multiple",children:[e.jsxs(Ko,{children:[e.jsxs(H,{title:"Person",children:[e.jsx(H,{allowsResizing:!0,children:"Name"}),e.jsx(H,{children:"Age"})]}),e.jsxs(H,{title:"Address",children:[e.jsx(H,{allowsResizing:!0,children:"City"}),e.jsx(H,{children:"State"})]})]}),e.jsxs(Zo,{children:[e.jsxs(pe,{children:[e.jsx(D,{children:"John"}),e.jsx(D,{children:"42"}),e.jsx(D,{children:"San Francisco"}),e.jsx(D,{children:"CA"})]}),e.jsxs(pe,{children:[e.jsx(D,{children:"Jane"}),e.jsx(D,{children:"38"}),e.jsx(D,{children:"San Francisco"}),e.jsx(D,{children:"CA"})]}),e.jsxs(pe,{children:[e.jsx(D,{children:"Becky"}),e.jsx(D,{children:"12"}),e.jsx(D,{children:"San Francisco"}),e.jsx(D,{children:"CA"})]})]})]})]})}function le(l){return e.jsx("div",{...l})}function bs(){const[l,o]=i.useState([]);i.useEffect(()=>{let s={category:"",items:[]};const t=[s],a=document.querySelector(`#${No}`),c=document.querySelector(`#${Do}`);document.querySelectorAll(`h2,h3,[${Ie}]`).forEach(d=>{if(d.textContent==null||d.hasAttribute(is))return;if(d.hasAttribute(Ie)){s={category:d.getAttribute(Ie)??"",items:[]},t.push(s);return}const u=`${a?.contains(d)===!0?"spectrum-":c?.contains(d)===!0?"spectrum-compare-":""}${d.textContent}`.toLowerCase().replace(/\s/g,"-");d.id=u,s.items.push({id:u,label:d.textContent})}),o(t)},[]),i.useEffect(()=>{const s=window.location.hash===""?null:document.querySelector(window.location.hash);s&&setTimeout(()=>{s.scrollIntoView()},0)},[]);const r=i.useCallback(s=>{const t=String(s);document.getElementById(t)?.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{window.location.hash=t},1e3)},[]);return e.jsxs(Xo,{children:[e.jsx(R,{children:e.jsx(ne,{children:e.jsx(E,{icon:cr})})}),e.jsx(Yo,{items:l,onAction:r,children:({category:s,items:t})=>e.jsx(Qo,{items:t,title:s,children:({id:a,label:c})=>e.jsx(M,{children:c},a)},s)})]})}function ys(){const l=i.useCallback(()=>{window.scrollTo({top:0,behavior:"smooth"}),setTimeout(()=>{window.location.hash=""},500)},[]);return i.useEffect(()=>{const o=document.querySelector("h2")?.offsetTop??0;function r(){document.documentElement.dataset.scroll=String(window.scrollY>=o)}return document.addEventListener("scroll",r,{passive:!0}),()=>{document.removeEventListener("scroll",r)}},[]),e.jsx(b,{UNSAFE_className:"goto-top-button",variant:"accent",onPress:l,children:e.jsx(ne,{children:e.jsx(E,{icon:nr})})})}const js=["Tab 1","Tab 2","Tab 3"];function ws({isActive:l,title:o}){return e.jsxs("li",{className:Z("lm_tab",l&&"lm_active"),children:[e.jsx("span",{className:"lm_title_before"}),e.jsx("span",{className:"lm_title",children:o}),e.jsx("span",{className:"lm_close_tab"})]})}function Cs(){return e.jsxs("div",{...x("golden-layout"),children:[e.jsx("h2",{className:"ui-title",children:"Golden Layout"}),[!1,!0].map(l=>e.jsxs(ce.Fragment,{children:[e.jsx("h5",{children:l?"Minimized":"Maximised"}),e.jsx("div",{style:{position:"relative",border:"none"},className:l?"lm_maximised":void 0,children:e.jsxs("div",{className:"lm_header",children:[e.jsx("ul",{className:"lm_tabs",children:js.map((o,r)=>e.jsx(ws,{isActive:r===0,title:o},o))}),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(l)))]})}function Ss(){return e.jsxs("div",{...x("animations",["sample-section-e2e-ignore"]),children:[e.jsx("h2",{className:"ui-title",children:"Animations"}),e.jsx(k,{position:"relative",height:400,children:e.jsx(Lr,{})})]})}const mo=[["primary","accent"],["secondary","primary"],["danger","negative"]],Ts=[{title:"One",value:"1"},{title:"Two",value:"2"},{title:"Three",value:"3"}];function ks(){const[l,o]=i.useState(!1),[r,s]=i.useState("1"),t=i.useCallback(a=>{s(a.target.value)},[]);return e.jsxs("div",{...x(Do,[us]),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(k,{children:[e.jsx("h3",{children:"Buttons - Filled"}),e.jsxs(L,{gap:20,columns:"repeat(2, 120px)",autoRows:"40x",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),mo.map(([a,c])=>e.jsxs(i.Fragment,{children:[e.jsx(p,{kind:a,children:"Button"}),e.jsx(b,{variant:c,style:"fill",children:"Button"})]},a)),e.jsx(p,{kind:"primary",disabled:!0,children:"Disabled"}),e.jsx(b,{variant:"accent",style:"fill",isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(k,{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"}),mo.map(([a,c])=>e.jsxs(i.Fragment,{children:[e.jsx(p,{kind:a,children:a}),e.jsx(b,{variant:c,style:"outline",children:c})]},a)),e.jsx(p,{kind:"secondary",disabled:!0,children:"Disabled"}),e.jsx(b,{variant:"primary",style:"outline",isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(k,{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(p,{kind:"inline",children:"Inline"}),e.jsx(R,{children:"Action"}),e.jsx(p,{kind:"inline",disabled:!0,children:"Disabled"}),e.jsx(R,{isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(k,{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(a=>e.jsxs(i.Fragment,{children:[e.jsxs("div",{children:[e.jsxs("label",{className:"input-label",children:[a?"Disabled ":"","Combobox"]}),e.jsx(Le,{disabled:a,options:Ts,defaultValue:"One"})]}),e.jsxs(xo,{isDisabled:a,label:a?"Disabled Combobox":"Combobox",inputValue:"One",children:[e.jsx(M,{children:"One"},"1"),e.jsx(M,{children:"Two"},"2"),e.jsx(M,{children:"Three"},"3")]})]},String(a))),[!1,!0].map(a=>e.jsxs(i.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"input-label",children:"Select"}),e.jsxs(ie,{disabled:a,placeholder:"Select",onChange:c=>{},className:"custom-select",children:[e.jsxs("option",{disabled:!0,value:"0",children:[a?"":"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(Jo,{isDisabled:a,label:a?"Disabled Picker":"Picker",placeholder:"Picker",children:[e.jsx(M,{children:"One"},"1"),e.jsx(M,{children:"Two"},"2"),e.jsx(M,{children:"Three"},"3")]})]},String(a)))]})]}),e.jsxs(k,{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(Ae,{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(Ae,{type:"text",label:"Disabled",isDisabled:!0,value:"Disabled"})]})]}),e.jsxs(k,{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(P,{className:"form-group",checked:l,onChange:()=>o(a=>!a),children:"Checkbox"}),e.jsx(Re,{children:"Checkbox"}),e.jsx(P,{className:"form-group",disabled:!0,checked:l,onChange:()=>o(a=>!a),children:"Disabled"}),e.jsx(Re,{isDisabled:!0,children:"Disabled"}),e.jsx(C,{direction:"column",children:e.jsxs("label",{children:["Radio Group",e.jsxs(jo,{onChange:t,value:r,children:[e.jsx(B,{value:"1",children:"One"}),e.jsx(B,{value:"2",children:"Two"}),e.jsx(B,{value:"3",children:"Three"})]})]})}),e.jsxs(er,{label:"Radio Group",value:r,onChange:s,children:[e.jsx(xe,{value:"1",children:"One"}),e.jsx(xe,{value:"2",children:"Two"}),e.jsx(xe,{value:"3",children:"Three"})]})]})]})]})]})}const vo={position:"sticky",justifyContent:"end",zIndex:1,UNSAFE_style:{float:"right"}};function Ns(){const l=window.location.search.includes("isolateSection=true"),{themes:o}=Co(),r=o.length>1;return e.jsx("div",{tabIndex:-1,role:"main",children:e.jsxs("div",{className:"container style-guide-container",children:[l&&e.jsx("style",{children:`.${Ce}, .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,{...vo,UNSAFE_className:Ce,marginTop:-56,top:20,gap:10,alignItems:"end",children:[r?e.jsx(_r,{}):null,e.jsx(bs,{})]}),e.jsx(C,{...vo,UNSAFE_className:Ce,top:"calc(100vh - 40px)",marginTop:-32,marginEnd:r?-234:0,children:e.jsx(ys,{})}),e.jsx(zl,{}),e.jsx(le,{"data-menu-category":"Colors"}),e.jsx(bl,{}),e.jsx(hs,{}),e.jsx(le,{"data-menu-category":"Layout"}),e.jsx(Cs,{}),e.jsx(le,{"data-menu-category":"Components"}),e.jsx(K,{}),e.jsx(Ul,{}),e.jsx(Bl,{}),e.jsx(Ol,{}),e.jsx(me,{}),e.jsx(Gl,{}),e.jsx(jl,{}),e.jsx(Vl,{}),e.jsx(yl,{}),e.jsx(wl,{}),e.jsx(Ql,{}),e.jsx(Hl,{}),e.jsx(Pl,{}),e.jsx(Tl,{}),e.jsx(Rl,{}),e.jsx(gl,{}),e.jsx(Sr,{}),e.jsx(Ss,{}),e.jsx(le,{"data-menu-category":"Spectrum Components"}),e.jsx(gs,{}),e.jsx(le,{"data-menu-category":"Spectrum Comparison"}),e.jsx(ks,{})]})})}function Ge(l){const{workspace:o,setWorkspace:r}=l;return i.useEffect(()=>{Br.makeDefaultWorkspace({getLayouts:async()=>[],getLayout:async()=>({})}).then(r)},[r]),o!=null?e.jsx(Ns,{}):null}Ge.propTypes={workspace:ue.shape({}),setWorkspace:ue.func.isRequired};Ge.defaultProps={workspace:null};const Ds=l=>({workspace:Or(l)}),Es=or(Ds,{setWorkspace:Fr})(Ge);function Vs(){return Tr.register(new URL("./download/serviceWorker.js",window.location.href)),kr.init({getWorker:()=>new dr}),window["__react-beautiful-dnd-disable-dev-warnings"]=!0,e.jsx(Pr,{children:e.jsx(rr,{store:Vr,children:e.jsx(Es,{})})})}export{Vs as StyleGuideRoot,Vs as default};
214
- //# sourceMappingURL=StyleGuideRoot-7922ed98.js.map
214
+ //# sourceMappingURL=StyleGuideRoot-42c5ad7b.js.map