@deephaven/code-studio 0.56.0 → 0.57.0

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 (29) hide show
  1. package/build/assets/{AppRoot-c69f286d.js → AppRoot-af503463.js} +4 -4
  2. package/build/assets/{AppRoot-c69f286d.js.map → AppRoot-af503463.js.map} +1 -1
  3. package/build/assets/{ControlType-1bdbc207.js → ControlType-83c0cb9c.js} +2 -2
  4. package/build/assets/ControlType-83c0cb9c.js.map +1 -0
  5. package/build/assets/FontBootstrap-b4538119.js +4 -0
  6. package/build/assets/FontBootstrap-b4538119.js.map +1 -0
  7. package/build/assets/{IrisGrid-6d9d51d4.js → IrisGrid-48e0c5de.js} +4 -4
  8. package/build/assets/{IrisGrid-6d9d51d4.js.map → IrisGrid-48e0c5de.js.map} +1 -1
  9. package/build/assets/{IrisGridModelFactory-e70ab7de.js → IrisGridModelFactory-4166dcd3.js} +2 -2
  10. package/build/assets/{IrisGridModelFactory-e70ab7de.js.map → IrisGridModelFactory-4166dcd3.js.map} +1 -1
  11. package/build/assets/{StyleGuideRoot-b68e7e2e.js → StyleGuideRoot-17a1d97f.js} +2 -2
  12. package/build/assets/StyleGuideRoot-17a1d97f.js.map +1 -0
  13. package/build/assets/{index-6fd4451b.js → index-1c94f8a1.js} +3 -3
  14. package/build/assets/{index-6fd4451b.js.map → index-1c94f8a1.js.map} +1 -1
  15. package/build/assets/{index-0be9ad52.js → index-b98d157a.js} +2 -2
  16. package/build/assets/{index-0be9ad52.js.map → index-b98d157a.js.map} +1 -1
  17. package/build/assets/{index-6170a9ac.js → index-cbb82d20.js} +2 -2
  18. package/build/assets/{index-6170a9ac.js.map → index-cbb82d20.js.map} +1 -1
  19. package/build/assets/{usePlugins-738c8dbc.js → usePlugins-5d177539.js} +3 -3
  20. package/build/assets/usePlugins-5d177539.js.map +1 -0
  21. package/build/assets/{useUser-7c5049ea.js → useUser-49aeff4f.js} +2 -2
  22. package/build/assets/{useUser-7c5049ea.js.map → useUser-49aeff4f.js.map} +1 -1
  23. package/build/index.html +2 -2
  24. package/package.json +31 -31
  25. package/build/assets/ControlType-1bdbc207.js.map +0 -1
  26. package/build/assets/FontBootstrap-6b01cb5c.js +0 -4
  27. package/build/assets/FontBootstrap-6b01cb5c.js.map +0 -1
  28. package/build/assets/StyleGuideRoot-b68e7e2e.js.map +0 -1
  29. package/build/assets/usePlugins-738c8dbc.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import{r as u,F as H,C as e,H as le,Q as ao,aI as I,M as ne,G as k,_ as se,L as _e,aJ as To,aK as Ie,aL as No,aM as $,aN as ko,Z as L,a0 as ke,aO as De,a8 as j,aP as F,aQ as Do,a3 as co,a5 as ho,a6 as Eo,aR as Io,ac as Ao,ab as ce,aS as Mo,aT as Ro,aU as $o,ad as Lo,aV as Po,aW as _o,aX as V,aY as Bo,aZ as ue,a_ as N,a$ as Fo,b0 as Vo,b1 as Oo,J as Uo,Y as Go}from"./vendor-90228628.js";import{aS as Be,aT as _,aR as ee,aU as Ae,aV as Me,aW as no,au as Ho,aX as O,aY as Fe,E as Ve,aZ as Oe,G as Ee,a_ as zo,a$ as Wo,K as qo,b0 as Zo,b1 as Xo}from"./index-0be9ad52.js";import{W as Yo}from"./monaco-1410cbed.js";import{ad as ie,aa as io,a7 as U,ae as uo,B as Ko,g as X,m as Qo,L as ge,af as W,ag as Jo,I as er,R as or,f as Y,C as Ue,O as rr,a as lr,S as sr,c as J,b as Ge,P as He,h as tr,d as ar}from"./IrisGrid-6d9d51d4.js";import{B as f,u as go,g as oe,e as z,a3 as D,K as E,w as he,v as cr,l as ze,ba as We,m as hr,C as P,a6 as K,S as me,_ as nr,x as dr,d as qe,a8 as mo,A as ir,M as ur,N as gr}from"./usePlugins-738c8dbc.js";import{M as Ze,H as mr,A as vr,V as ve,T as pr,D as xr,C as fr,a as br,c as yr,b as jr,d as wr}from"./FontBootstrap-6b01cb5c.js";import{T as Cr}from"./useUser-7c5049ea.js";import{L as Sr}from"./AppRoot-c69f286d.js";import{Q as Tr,x as Nr,s as kr}from"./ControlType-1bdbc207.js";import"./helpers-042e6b4d.js";import"./plotly-a2eb9a48.js";function Xe(l,o,r,s,t,c,a){try{var n=l[c](a),h=n.value}catch(i){r(i);return}n.done?o(h):Promise.resolve(h).then(s,t)}function pe(l){return function(){var o=this,r=arguments;return new Promise(function(s,t){var c=l.apply(o,r);function a(h){Xe(c,s,t,a,n,"next",h)}function n(h){Xe(c,s,t,a,n,"throw",h)}a(void 0)})}}function A(l,o,r){return o=Dr(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function Dr(l){var o=Er(l,"string");return typeof o=="symbol"?o:String(o)}function Er(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 Ir extends ie{constructor(){var{rowCount:o=1e9,columnCount:r=100,floatingTopRowCount:s=0,floatingBottomRowCount:t=0,floatingLeftColumnCount:c=0,floatingRightColumnCount:a=0,isEditable:n=!1,editedData:h=[]}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),A(this,"numRows",void 0),A(this,"numColumns",void 0),A(this,"floatingTop",void 0),A(this,"floatingBottom",void 0),A(this,"floatingLeft",void 0),A(this,"floatingRight",void 0),A(this,"editable",void 0),A(this,"editedData",void 0),this.numRows=o,this.numColumns=r,this.floatingTop=s,this.floatingBottom=t,this.floatingLeft=c,this.floatingRight=a,this.editable=n,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 pe(function*(){t.editedData[o]==null&&(t.editedData[o]=[]),t.editedData[o][r]="".concat(s)})()}setValueForRanges(o,r){var s=this;return pe(function*(){io.forEachCell(o,(t,c)=>{s.setValueForCell(t,c,r)})})()}setValues(o){var r=this;return pe(function*(){for(var s=0;s<o.length;s+=1){var t,c,a=o[s];r.setValueForCell((t=a.column)!==null&&t!==void 0?t:a.x,(c=a.row)!==null&&c!==void 0?c:a.y,a.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 Re=Ir;function w(l,o,r){return o=Ar(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function Ar(l){var o=Mr(l,"string");return typeof o=="symbol"?o:String(o)}function Mr(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 T extends Re{constructor(){var{rowCount:o=T.DEFAULT_ROW_COUNT,columnCount:r=T.DEFAULT_COLUMN_COUNT,children:s=new Map,childRowCount:t=Math.ceil(Math.max(T.MIN_CHILD_ROW_COUNT,o*T.DEFAULT_CHILD_ROW_COUNT_FACTOR)),maxDepth:c=T.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",U((a,n)=>{for(var h=null,i=n,d=[...a].sort((b,M)=>b[0]-M[0]),g=0;g<d.length;g+=1){var[m,v]=d[g];if(i<=m)break;var x=v.rowCount;if(i<=m+x){h=m,i=i-m-1;break}i-=x}return{key:h,offsetRow:i}})),w(this,"getCachedTextForRowHeader",U((a,n)=>{var{key:h,offsetRow:i}=this.getCachedModelRowOffset(a,n);if(h!=null){var d=a.get(h);if(d!==void 0)return"".concat(h,".").concat(d.textForRowHeader(i))}return"".concat(i)})),w(this,"getCachedTextForCell",U((a,n,h)=>{var{key:i,offsetRow:d}=this.getCachedModelRowOffset(a,h);if(i!=null){var g=a.get(i);if(g!==void 0)return"".concat(i,".").concat(g.textForCell(n,d))}return"".concat(n,",").concat(d)})),w(this,"getCachedIsRowExpandable",U((a,n,h)=>{var i=this.getCachedDepthForRow(a,n);return i<h})),w(this,"getCachedIsRowExpanded",U((a,n)=>{var{key:h,offsetRow:i}=this.getCachedModelRowOffset(a,n);if(h!=null){var d=a.get(h);if(d!==void 0)return d.isRowExpanded(i)}return a.has(i)})),w(this,"getCachedDepthForRow",U((a,n)=>{var{key:h,offsetRow:i}=this.getCachedModelRowOffset(a,n);if(h!=null){var d=a.get(h);if(d!==void 0)return d.depthForRow(i)+1}return 0})),this.children=s,this.childRowCount=t,this.maxDepth=c}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:c}=this.getCachedModelRowOffset(this.children,o),a=new Map(this.children);if(t!=null){var n=this.children.get(t);if(n!==void 0){var{rowCount:h}=n;n.setRowExpanded(c,r,s),this.numRows+=n.rowCount-h}}else if(r){var d=new T({rowCount:this.childRowCount,columnCount:this.numColumns});a.set(c,d),this.numRows+=d.rowCount}else{var i=a.get(c);i!==void 0&&(this.numRows-=i.rowCount,a.delete(c))}this.children=a}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(T,"DEFAULT_ROW_COUNT",1e9);w(T,"DEFAULT_COLUMN_COUNT",100);w(T,"DEFAULT_CHILD_ROW_COUNT_FACTOR",.01);w(T,"MIN_CHILD_ROW_COUNT",10);w(T,"MAX_DEPTH",10);const $e=T;function xe(l,o,r){return o=Rr(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function Rr(l){var o=$r(l,"string");return typeof o=="symbol"?o:String(o)}function $r(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 Lr extends ie{constructor(o,r){var s;super(),xe(this,"data",void 0),xe(this,"columnHeaders",void 0),xe(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 Pr=Lr;function fe(l,o,r){return o=_r(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function _r(l){var o=Br(l,"string");return typeof o=="symbol"?o:String(o)}function Br(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 Fr extends ie{constructor(o,r){super(),fe(this,"numberOfColumns",void 0),fe(this,"numberOfRows",void 0),fe(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,c,a,n,h,i,d=r-((s=(t=this.viewportData)===null||t===void 0?void 0:t.rowOffset)!==null&&s!==void 0?s:0),g=o-((c=(a=this.viewportData)===null||a===void 0?void 0:a.columnOffset)!==null&&c!==void 0?c:0);return"".concat((n=(h=this.viewportData)===null||h===void 0||(i=h.data[d])===null||i===void 0?void 0:i[g])!==null&&n!==void 0?n:"")}textForColumnHeader(o){return"".concat(o)}textForRowHeader(o){return"".concat(o)}}const Vr=Fr;function C(l,o,r){return o=Or(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function Or(l){var o=Ur(l,"string");return typeof o=="symbol"?o:String(o)}function Ur(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 Gr="proportional",Hr=uo.positiveBarColor,zr=uo.negativeBarColor,Wr="beside",qr="LTR",Zr="right";function Xr(l){return Array.isArray(l)&&l.every(o=>typeof o=="number")}class Yr extends ie{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,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:new Map,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:new Map,n=arguments.length>6&&arguments[6]!==void 0?arguments[6]:new Map,h=arguments.length>7&&arguments[7]!==void 0?arguments[7]:new Map,i=arguments.length>8&&arguments[8]!==void 0?arguments[8]:new Map;super(),C(this,"numberOfColumns",void 0),C(this,"numberOfRows",void 0),C(this,"data",void 0),C(this,"columnMins",void 0),C(this,"columnMaxs",void 0),C(this,"columnAxes",void 0),C(this,"valuePlacements",void 0),C(this,"directions",void 0),C(this,"positiveColors",void 0),C(this,"negativeColors",void 0),C(this,"opacities",void 0),C(this,"textAlignments",void 0),C(this,"markers",void 0),this.positiveColors=s,this.negativeColors=t,this.data=o,this.columnAxes=r,this.valuePlacements=c,this.opacities=a,this.directions=n,this.textAlignments=h,this.markers=i,this.numberOfRows=Math.max(...o.map(m=>m.length)),this.numberOfColumns=o.length,this.columnMins=new Map,this.columnMaxs=new Map;for(var d=0;d<o.length;d+=1){var g=o[d];Xr(g)&&(this.columnMins.set(d,Math.min(...g)),this.columnMaxs.set(d,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:Zr}renderTypeForCell(o,r){return o<20||o%2===r%2?"dataBar":"text"}dataBarOptionsForCell(o,r){var s,t,c,a,n,h,i,d=Be(this.columnMins,o),g=Be(this.columnMaxs,o),m=(s=this.columnAxes.get(o))!==null&&s!==void 0?s:Gr,v=(t=this.valuePlacements.get(o))!==null&&t!==void 0?t:Wr,x=this.opacities.get(o);x==null||x>1?x=1:x<0&&(x=0);var b=(c=this.directions.get(o))!==null&&c!==void 0?c:qr,M=(a=this.positiveColors.get(o))!==null&&a!==void 0?a:Hr,q=(n=this.negativeColors.get(o))!==null&&n!==void 0?n:zr,R=Number((h=this.data[o])===null||h===void 0?void 0:h[r]),B=R>=0?M:q,te=(i=this.markers.get(o))!==null&&i!==void 0?i:[];return{columnMin:d,columnMax:g,axis:m,color:B,valuePlacement:v,opacity:x,markers:te,direction:b,value:R}}}const Kr=Yr,be="hide-from-e2e-tests",Ye="sample-section";function*vo(l=1){for(;;)l=l*16807%2147483647,yield l/2147483647}function Qr(l=1){const[o]=u.useState(()=>vo(l));return u.useCallback(()=>{const r=o.next();if(r.done===!0)throw new Error("Random number generator unexpectedly finished");return r.value},[o])}function p(l,o=[]){const r=`${Ye}-${l.toLocaleLowerCase().replaceAll(" ","-")}`,s=H(Ye,...o);return{id:r,className:s}}function S(l,o=[]){const{id:r,className:s}=p(l,o);return{id:r,UNSAFE_className:s}}class re extends u.Component{static renderButtonBrand(o,r){const s=o.length?`btn-${o}-${r}`:`btn-${r}`;return e.jsx(Ko,{className:s,style:{marginBottom:"1rem",marginRight:"1rem"},children:r},r)}static renderButtons(o){const r=["primary","secondary","success","warning","danger","info"].map(s=>re.renderButtonBrand(o,s));return e.jsxs("div",{...p(`buttons-${o.length?"outline":"regular"}`),children:[e.jsx("h5",{children:o.length?"Outline":"Regular"}),r]},o)}static renderSocketedButtons(){return e.jsxs("div",{...p("buttons-socketed"),children:[e.jsx("h5",{children:"Socketed Buttons (for linker)"}),e.jsx(X,{style:{marginBottom:"1rem",marginRight:"1rem"},children:"Unlinked"}),e.jsx(X,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,children:"Linked"}),e.jsx(X,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinkedSource:!0,children:"Linked Source"}),e.jsx(X,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,isInvalid:!0,children:"Error"}),e.jsx(X,{style:{marginBottom:"1rem",marginRight:"1rem"},disabled:!0,children:"Disabled"})]})}constructor(o){super(o),this.state={toggle:!0}}renderInlineButtons(){const{toggle:o}=this.state;return e.jsxs("div",{...p("buttons-inline"),style:{padding:"1rem 0"},children:[e.jsx("h5",{children:"Inline Buttons"}),"Regular btn-inline:",e.jsx(f,{className:"mx-2",kind:"inline",icon:_,tooltip:"test"}),"Toggle button (class active):",e.jsx(f,{className:"mx-2",onClick:()=>{this.setState({toggle:!o})},active:o,kind:"inline",icon:_,tooltip:"test"}),"Disabled:",e.jsx(f,{className:"mx-2",kind:"inline",disabled:!0,children:"Disabled"}),"With Text:",e.jsx(f,{className:"mx-2",kind:"inline",icon:_,children:e.jsx("span",{children:"Text Button"})}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("span",{children:"btn-link-icon (no text):"}),e.jsx(f,{kind:"ghost",icon:_,tooltip:"test"}),e.jsx("span",{className:"mx-2",children:"btn-link:"}),e.jsx(f,{kind:"ghost",children:"Text Button "}),e.jsx("span",{className:"mx-2",children:"btn-link (text w/ optional with icon):"}),e.jsx(f,{kind:"ghost",icon:_,children:"Text Button"})]})}render(){const o=["","outline"].map(t=>re.renderButtons(t)),r=this.renderInlineButtons(),s=re.renderSocketedButtons();return e.jsxs("div",{children:[e.jsx("h2",{className:"ui-title",children:"Buttons"}),e.jsxs("div",{style:{padding:"1rem 0"},children:[o,r,s]})]})}}function Jr(){const l=go();Ze.random=Qr();const[o]=u.useState(()=>new Ze(l));return e.jsxs("div",{...p("charts"),children:[e.jsx("h2",{className:"ui-title",children:"Chart"}),e.jsx("div",{style:{height:500},children:e.jsx(Qo,{model:o})})]})}const po="2px solid var(--dh-color-notice-bg)",el={"--dh-color-black":"gray","--dh-color-white":"gray","--dh-color-border":"General","--dh-color-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"},Ke={"--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"},ol={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 xo(l){const o=ee.parseRgba(ee.asRgbOrRgbaString(l)??"");if(o==null||o.a<.5)return"white";const{r,g:s,b:t}=o;return ee.getBrightness([r,s,t])>=128?"black":"white"}function rl(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(a=>`hsl${a.trim()}`).map((a,n)=>({name:`${s}-${n}`,value:a})):{name:s,value:t}}).flat()}function G(l,o,r,s=el){const t=ol[l];return rl(o).reduce((n,{name:h,value:i})=>{if(/^--dh-color-(.*?)-hsl$/.test(h)||/^--dh-color-gray-(light|mid|dark)$/.test(h))return n;const d=/^--dh-color-([^-]+)(?:-([^-]+))?/.exec(h);let g=s[h]??d?.[r]??d?.[1]??"???";if(g=t[g]??g,n[g]==null&&(n[g]=[]),h in Ke&&n[g].push({isLabel:!0,name:Ke[h],value:""}),/^--dh-color-gray-(light|mid|dark)$/.test(h))return n;const m={"--dh-color-gray-900":"light","--dh-color-gray-600":"mid","--dh-color-gray-300":"dark"}[h];return n[g].push({name:h,value:i,note:m}),n},{})}function ll(){const l=u.useRef(null);return u.useLayoutEffect(()=>{if(l.current==null)return;const o=getComputedStyle(l.current),{backgroundColor:r}=o;l.current.style.color=xo(r)},[]),l}function sl(l,o){const[r,s]=u.useState();return u.useEffect(()=>{if(l.current==null)return;const t=getComputedStyle(l.current,o).getPropertyValue("content"),c=/"(--dh-color-.*?)[,"]/.exec(t)?.[1];c!=null&&s(c)},[l,o]),r}function ye({className:l,children:o}){const r=ll(),s=sl(r,":after"),t=u.useMemo(()=>s!=null?{value:s,normalized:ee.normalizeCssColor(s,!0)}:null,[s]),c=t!=null&&t.value!=="";return e.jsxs("div",{ref:r,className:l,style:{border:c?void 0:po},children:[c&&e.jsxs(oe,{children:[e.jsx("div",{children:t.value}),e.jsx("div",{children:t.normalized})]}),o]})}function tl(){const l=["100","200","300","400","500","600","700","800","850","8XX","900"].map(s=>e.jsx(ye,{className:H("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(ye,{className:H("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(ye,{className:H("swatch",`swatch-${s}`),children:s},s));return e.jsxs("div",{...p("colors"),children:[e.jsx("h2",{className:"ui-title",children:"Colors"}),e.jsxs("div",{className:"row",children:[e.jsxs("div",{className:"col",children:[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 al extends u.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:Ae,action:()=>{alert(`Alert${r}!`)},shortcut:new z({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[D.CTRL,E.A],macShortcut:[D.CMD,E.A]})},{title:`Log Message${r}`,icon:Me,action:()=>{console.log(`Logging a message${r}!`)},shortcut:new z({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[D.CTRL,E.L],macShortcut:[D.CMD,E.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:no,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new z({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[D.CTRL,E.SLASH],macShortcut:[D.CMD,E.SLASH]}),group:he.groups.global}].concat(o),t=()=>new Promise(c=>{setTimeout(()=>{c(o)},3e3)});return e.jsxs("div",{...p("context-menus"),children:[e.jsx("h2",{className:"ui-title",children:"Context Menu"}),e.jsxs(f,{kind:"primary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(he,{actions:s})]}),e.jsxs(f,{kind:"tertiary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(he,{actions:t})]})]})}}class cl extends u.Component{constructor(o){super(o),this.sampleInput=le.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",{...p("dialog"),children:[e.jsx("h2",{className:"ui-title",children:"Popover Dialog"}),e.jsx("p",{children:"Popover dialog that can contain interactive elements, can be set to self close on blur."}),e.jsxs(f,{kind:"primary",style:{marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{o?this.setState({isShown:!1}):this.setState({isShown:!0})},children:["Open Dialog",e.jsx(cr,{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(mr,{menuText:"Checkbox Menu",valueMap:r,onUpdateValueMap:this.handleUpdateCheckboxMap})]})}}class hl extends u.Component{constructor(o){super(o),this.state={isShown:!1}}render(){const o=[{title:"Show Alert",icon:Ae,action:()=>{alert("Alert!")},shortcut:new z({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[D.CTRL,E.A],macShortcut:[D.CMD,E.A]})},{title:"Log Message",icon:Me,action:()=>{console.log("Logging a message!")},shortcut:new z({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[D.CTRL,E.L],macShortcut:[D.CMD,E.L]})}],s=[{title:"Show Shortcuts",icon:no,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new z({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[D.CTRL,E.SLASH],macShortcut:[D.CMD,E.SLASH]}),group:he.groups.global}].concat(o),{isShown:t}=this.state;return e.jsxs("div",{...p("dropdown-menus"),children:[e.jsx("h2",{className:"ui-title",children:"Dropdown Menu"}),e.jsx("p",{children:"A simple dropdown menu of actions, can open on click of parent container, or controlled by prop."}),e.jsx(f,{kind:"inline",className:"mx-2",icon:Ho,onClick:()=>{},children:e.jsx(ze,{actions:s})}),e.jsxs(f,{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(ze,{isShown:t,onMenuClosed:()=>{this.setState({isShown:!1})},actions:s})]})]})}}const nl=`trades = db.t("LearnDeephaven", "StockTrades").where("Date=\`2017-08-25\`")\\
1
+ import{r as u,F as H,C as e,H as le,Q as ao,aI as I,M as ne,G as k,_ as se,L as _e,aJ as To,aK as Ie,aL as No,aM as $,aN as ko,Z as L,a0 as ke,aO as De,a8 as j,aP as F,aQ as Do,a3 as co,a5 as ho,a6 as Eo,aR as Io,ac as Ao,ab as ce,aS as Mo,aT as Ro,aU as $o,ad as Lo,aV as Po,aW as _o,aX as V,aY as Bo,aZ as ue,a_ as N,a$ as Fo,b0 as Vo,b1 as Oo,J as Uo,Y as Go}from"./vendor-90228628.js";import{aS as Be,aT as _,aR as ee,aU as Ae,aV as Me,aW as no,au as Ho,aX as O,aY as Fe,E as Ve,aZ as Oe,G as Ee,a_ as zo,a$ as Wo,K as qo,b0 as Zo,b1 as Xo}from"./index-b98d157a.js";import{W as Yo}from"./monaco-1410cbed.js";import{ad as ie,aa as io,a7 as U,ae as uo,B as Ko,g as X,m as Qo,L as ge,af as W,ag as Jo,I as er,R as or,f as Y,C as Ue,O as rr,a as lr,S as sr,c as J,b as Ge,P as He,h as tr,d as ar}from"./IrisGrid-48e0c5de.js";import{B as f,u as go,g as oe,e as z,a3 as D,K as E,w as he,v as cr,l as ze,ba as We,m as hr,C as P,a6 as K,S as me,_ as nr,x as dr,d as qe,a8 as mo,A as ir,M as ur,N as gr}from"./usePlugins-5d177539.js";import{M as Ze,H as mr,A as vr,V as ve,T as pr,D as xr,C as fr,a as br,c as yr,b as jr,d as wr}from"./FontBootstrap-b4538119.js";import{T as Cr}from"./useUser-49aeff4f.js";import{L as Sr}from"./AppRoot-af503463.js";import{Q as Tr,x as Nr,s as kr}from"./ControlType-83c0cb9c.js";import"./helpers-042e6b4d.js";import"./plotly-a2eb9a48.js";function Xe(l,o,r,s,t,c,a){try{var n=l[c](a),h=n.value}catch(i){r(i);return}n.done?o(h):Promise.resolve(h).then(s,t)}function pe(l){return function(){var o=this,r=arguments;return new Promise(function(s,t){var c=l.apply(o,r);function a(h){Xe(c,s,t,a,n,"next",h)}function n(h){Xe(c,s,t,a,n,"throw",h)}a(void 0)})}}function A(l,o,r){return o=Dr(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function Dr(l){var o=Er(l,"string");return typeof o=="symbol"?o:String(o)}function Er(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 Ir extends ie{constructor(){var{rowCount:o=1e9,columnCount:r=100,floatingTopRowCount:s=0,floatingBottomRowCount:t=0,floatingLeftColumnCount:c=0,floatingRightColumnCount:a=0,isEditable:n=!1,editedData:h=[]}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),A(this,"numRows",void 0),A(this,"numColumns",void 0),A(this,"floatingTop",void 0),A(this,"floatingBottom",void 0),A(this,"floatingLeft",void 0),A(this,"floatingRight",void 0),A(this,"editable",void 0),A(this,"editedData",void 0),this.numRows=o,this.numColumns=r,this.floatingTop=s,this.floatingBottom=t,this.floatingLeft=c,this.floatingRight=a,this.editable=n,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 pe(function*(){t.editedData[o]==null&&(t.editedData[o]=[]),t.editedData[o][r]="".concat(s)})()}setValueForRanges(o,r){var s=this;return pe(function*(){io.forEachCell(o,(t,c)=>{s.setValueForCell(t,c,r)})})()}setValues(o){var r=this;return pe(function*(){for(var s=0;s<o.length;s+=1){var t,c,a=o[s];r.setValueForCell((t=a.column)!==null&&t!==void 0?t:a.x,(c=a.row)!==null&&c!==void 0?c:a.y,a.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 Re=Ir;function w(l,o,r){return o=Ar(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function Ar(l){var o=Mr(l,"string");return typeof o=="symbol"?o:String(o)}function Mr(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 T extends Re{constructor(){var{rowCount:o=T.DEFAULT_ROW_COUNT,columnCount:r=T.DEFAULT_COLUMN_COUNT,children:s=new Map,childRowCount:t=Math.ceil(Math.max(T.MIN_CHILD_ROW_COUNT,o*T.DEFAULT_CHILD_ROW_COUNT_FACTOR)),maxDepth:c=T.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",U((a,n)=>{for(var h=null,i=n,d=[...a].sort((b,M)=>b[0]-M[0]),g=0;g<d.length;g+=1){var[m,v]=d[g];if(i<=m)break;var x=v.rowCount;if(i<=m+x){h=m,i=i-m-1;break}i-=x}return{key:h,offsetRow:i}})),w(this,"getCachedTextForRowHeader",U((a,n)=>{var{key:h,offsetRow:i}=this.getCachedModelRowOffset(a,n);if(h!=null){var d=a.get(h);if(d!==void 0)return"".concat(h,".").concat(d.textForRowHeader(i))}return"".concat(i)})),w(this,"getCachedTextForCell",U((a,n,h)=>{var{key:i,offsetRow:d}=this.getCachedModelRowOffset(a,h);if(i!=null){var g=a.get(i);if(g!==void 0)return"".concat(i,".").concat(g.textForCell(n,d))}return"".concat(n,",").concat(d)})),w(this,"getCachedIsRowExpandable",U((a,n,h)=>{var i=this.getCachedDepthForRow(a,n);return i<h})),w(this,"getCachedIsRowExpanded",U((a,n)=>{var{key:h,offsetRow:i}=this.getCachedModelRowOffset(a,n);if(h!=null){var d=a.get(h);if(d!==void 0)return d.isRowExpanded(i)}return a.has(i)})),w(this,"getCachedDepthForRow",U((a,n)=>{var{key:h,offsetRow:i}=this.getCachedModelRowOffset(a,n);if(h!=null){var d=a.get(h);if(d!==void 0)return d.depthForRow(i)+1}return 0})),this.children=s,this.childRowCount=t,this.maxDepth=c}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:c}=this.getCachedModelRowOffset(this.children,o),a=new Map(this.children);if(t!=null){var n=this.children.get(t);if(n!==void 0){var{rowCount:h}=n;n.setRowExpanded(c,r,s),this.numRows+=n.rowCount-h}}else if(r){var d=new T({rowCount:this.childRowCount,columnCount:this.numColumns});a.set(c,d),this.numRows+=d.rowCount}else{var i=a.get(c);i!==void 0&&(this.numRows-=i.rowCount,a.delete(c))}this.children=a}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(T,"DEFAULT_ROW_COUNT",1e9);w(T,"DEFAULT_COLUMN_COUNT",100);w(T,"DEFAULT_CHILD_ROW_COUNT_FACTOR",.01);w(T,"MIN_CHILD_ROW_COUNT",10);w(T,"MAX_DEPTH",10);const $e=T;function xe(l,o,r){return o=Rr(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function Rr(l){var o=$r(l,"string");return typeof o=="symbol"?o:String(o)}function $r(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 Lr extends ie{constructor(o,r){var s;super(),xe(this,"data",void 0),xe(this,"columnHeaders",void 0),xe(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 Pr=Lr;function fe(l,o,r){return o=_r(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function _r(l){var o=Br(l,"string");return typeof o=="symbol"?o:String(o)}function Br(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 Fr extends ie{constructor(o,r){super(),fe(this,"numberOfColumns",void 0),fe(this,"numberOfRows",void 0),fe(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,c,a,n,h,i,d=r-((s=(t=this.viewportData)===null||t===void 0?void 0:t.rowOffset)!==null&&s!==void 0?s:0),g=o-((c=(a=this.viewportData)===null||a===void 0?void 0:a.columnOffset)!==null&&c!==void 0?c:0);return"".concat((n=(h=this.viewportData)===null||h===void 0||(i=h.data[d])===null||i===void 0?void 0:i[g])!==null&&n!==void 0?n:"")}textForColumnHeader(o){return"".concat(o)}textForRowHeader(o){return"".concat(o)}}const Vr=Fr;function C(l,o,r){return o=Or(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function Or(l){var o=Ur(l,"string");return typeof o=="symbol"?o:String(o)}function Ur(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 Gr="proportional",Hr=uo.positiveBarColor,zr=uo.negativeBarColor,Wr="beside",qr="LTR",Zr="right";function Xr(l){return Array.isArray(l)&&l.every(o=>typeof o=="number")}class Yr extends ie{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,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:new Map,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:new Map,n=arguments.length>6&&arguments[6]!==void 0?arguments[6]:new Map,h=arguments.length>7&&arguments[7]!==void 0?arguments[7]:new Map,i=arguments.length>8&&arguments[8]!==void 0?arguments[8]:new Map;super(),C(this,"numberOfColumns",void 0),C(this,"numberOfRows",void 0),C(this,"data",void 0),C(this,"columnMins",void 0),C(this,"columnMaxs",void 0),C(this,"columnAxes",void 0),C(this,"valuePlacements",void 0),C(this,"directions",void 0),C(this,"positiveColors",void 0),C(this,"negativeColors",void 0),C(this,"opacities",void 0),C(this,"textAlignments",void 0),C(this,"markers",void 0),this.positiveColors=s,this.negativeColors=t,this.data=o,this.columnAxes=r,this.valuePlacements=c,this.opacities=a,this.directions=n,this.textAlignments=h,this.markers=i,this.numberOfRows=Math.max(...o.map(m=>m.length)),this.numberOfColumns=o.length,this.columnMins=new Map,this.columnMaxs=new Map;for(var d=0;d<o.length;d+=1){var g=o[d];Xr(g)&&(this.columnMins.set(d,Math.min(...g)),this.columnMaxs.set(d,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:Zr}renderTypeForCell(o,r){return o<20||o%2===r%2?"dataBar":"text"}dataBarOptionsForCell(o,r){var s,t,c,a,n,h,i,d=Be(this.columnMins,o),g=Be(this.columnMaxs,o),m=(s=this.columnAxes.get(o))!==null&&s!==void 0?s:Gr,v=(t=this.valuePlacements.get(o))!==null&&t!==void 0?t:Wr,x=this.opacities.get(o);x==null||x>1?x=1:x<0&&(x=0);var b=(c=this.directions.get(o))!==null&&c!==void 0?c:qr,M=(a=this.positiveColors.get(o))!==null&&a!==void 0?a:Hr,q=(n=this.negativeColors.get(o))!==null&&n!==void 0?n:zr,R=Number((h=this.data[o])===null||h===void 0?void 0:h[r]),B=R>=0?M:q,te=(i=this.markers.get(o))!==null&&i!==void 0?i:[];return{columnMin:d,columnMax:g,axis:m,color:B,valuePlacement:v,opacity:x,markers:te,direction:b,value:R}}}const Kr=Yr,be="hide-from-e2e-tests",Ye="sample-section";function*vo(l=1){for(;;)l=l*16807%2147483647,yield l/2147483647}function Qr(l=1){const[o]=u.useState(()=>vo(l));return u.useCallback(()=>{const r=o.next();if(r.done===!0)throw new Error("Random number generator unexpectedly finished");return r.value},[o])}function p(l,o=[]){const r=`${Ye}-${l.toLocaleLowerCase().replaceAll(" ","-")}`,s=H(Ye,...o);return{id:r,className:s}}function S(l,o=[]){const{id:r,className:s}=p(l,o);return{id:r,UNSAFE_className:s}}class re extends u.Component{static renderButtonBrand(o,r){const s=o.length?`btn-${o}-${r}`:`btn-${r}`;return e.jsx(Ko,{className:s,style:{marginBottom:"1rem",marginRight:"1rem"},children:r},r)}static renderButtons(o){const r=["primary","secondary","success","warning","danger","info"].map(s=>re.renderButtonBrand(o,s));return e.jsxs("div",{...p(`buttons-${o.length?"outline":"regular"}`),children:[e.jsx("h5",{children:o.length?"Outline":"Regular"}),r]},o)}static renderSocketedButtons(){return e.jsxs("div",{...p("buttons-socketed"),children:[e.jsx("h5",{children:"Socketed Buttons (for linker)"}),e.jsx(X,{style:{marginBottom:"1rem",marginRight:"1rem"},children:"Unlinked"}),e.jsx(X,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,children:"Linked"}),e.jsx(X,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinkedSource:!0,children:"Linked Source"}),e.jsx(X,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,isInvalid:!0,children:"Error"}),e.jsx(X,{style:{marginBottom:"1rem",marginRight:"1rem"},disabled:!0,children:"Disabled"})]})}constructor(o){super(o),this.state={toggle:!0}}renderInlineButtons(){const{toggle:o}=this.state;return e.jsxs("div",{...p("buttons-inline"),style:{padding:"1rem 0"},children:[e.jsx("h5",{children:"Inline Buttons"}),"Regular btn-inline:",e.jsx(f,{className:"mx-2",kind:"inline",icon:_,tooltip:"test"}),"Toggle button (class active):",e.jsx(f,{className:"mx-2",onClick:()=>{this.setState({toggle:!o})},active:o,kind:"inline",icon:_,tooltip:"test"}),"Disabled:",e.jsx(f,{className:"mx-2",kind:"inline",disabled:!0,children:"Disabled"}),"With Text:",e.jsx(f,{className:"mx-2",kind:"inline",icon:_,children:e.jsx("span",{children:"Text Button"})}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("span",{children:"btn-link-icon (no text):"}),e.jsx(f,{kind:"ghost",icon:_,tooltip:"test"}),e.jsx("span",{className:"mx-2",children:"btn-link:"}),e.jsx(f,{kind:"ghost",children:"Text Button "}),e.jsx("span",{className:"mx-2",children:"btn-link (text w/ optional with icon):"}),e.jsx(f,{kind:"ghost",icon:_,children:"Text Button"})]})}render(){const o=["","outline"].map(t=>re.renderButtons(t)),r=this.renderInlineButtons(),s=re.renderSocketedButtons();return e.jsxs("div",{children:[e.jsx("h2",{className:"ui-title",children:"Buttons"}),e.jsxs("div",{style:{padding:"1rem 0"},children:[o,r,s]})]})}}function Jr(){const l=go();Ze.random=Qr();const[o]=u.useState(()=>new Ze(l));return e.jsxs("div",{...p("charts"),children:[e.jsx("h2",{className:"ui-title",children:"Chart"}),e.jsx("div",{style:{height:500},children:e.jsx(Qo,{model:o})})]})}const po="2px solid var(--dh-color-notice-bg)",el={"--dh-color-black":"gray","--dh-color-white":"gray","--dh-color-border":"General","--dh-color-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"},Ke={"--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"},ol={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 xo(l){const o=ee.parseRgba(ee.asRgbOrRgbaString(l)??"");if(o==null||o.a<.5)return"white";const{r,g:s,b:t}=o;return ee.getBrightness([r,s,t])>=128?"black":"white"}function rl(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(a=>`hsl${a.trim()}`).map((a,n)=>({name:`${s}-${n}`,value:a})):{name:s,value:t}}).flat()}function G(l,o,r,s=el){const t=ol[l];return rl(o).reduce((n,{name:h,value:i})=>{if(/^--dh-color-(.*?)-hsl$/.test(h)||/^--dh-color-gray-(light|mid|dark)$/.test(h))return n;const d=/^--dh-color-([^-]+)(?:-([^-]+))?/.exec(h);let g=s[h]??d?.[r]??d?.[1]??"???";if(g=t[g]??g,n[g]==null&&(n[g]=[]),h in Ke&&n[g].push({isLabel:!0,name:Ke[h],value:""}),/^--dh-color-gray-(light|mid|dark)$/.test(h))return n;const m={"--dh-color-gray-900":"light","--dh-color-gray-600":"mid","--dh-color-gray-300":"dark"}[h];return n[g].push({name:h,value:i,note:m}),n},{})}function ll(){const l=u.useRef(null);return u.useLayoutEffect(()=>{if(l.current==null)return;const o=getComputedStyle(l.current),{backgroundColor:r}=o;l.current.style.color=xo(r)},[]),l}function sl(l,o){const[r,s]=u.useState();return u.useEffect(()=>{if(l.current==null)return;const t=getComputedStyle(l.current,o).getPropertyValue("content"),c=/"(--dh-color-.*?)[,"]/.exec(t)?.[1];c!=null&&s(c)},[l,o]),r}function ye({className:l,children:o}){const r=ll(),s=sl(r,":after"),t=u.useMemo(()=>s!=null?{value:s,normalized:ee.normalizeCssColor(s,!0)}:null,[s]),c=t!=null&&t.value!=="";return e.jsxs("div",{ref:r,className:l,style:{border:c?void 0:po},children:[c&&e.jsxs(oe,{children:[e.jsx("div",{children:t.value}),e.jsx("div",{children:t.normalized})]}),o]})}function tl(){const l=["100","200","300","400","500","600","700","800","850","8XX","900"].map(s=>e.jsx(ye,{className:H("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(ye,{className:H("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(ye,{className:H("swatch",`swatch-${s}`),children:s},s));return e.jsxs("div",{...p("colors"),children:[e.jsx("h2",{className:"ui-title",children:"Colors"}),e.jsxs("div",{className:"row",children:[e.jsxs("div",{className:"col",children:[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 al extends u.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:Ae,action:()=>{alert(`Alert${r}!`)},shortcut:new z({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[D.CTRL,E.A],macShortcut:[D.CMD,E.A]})},{title:`Log Message${r}`,icon:Me,action:()=>{console.log(`Logging a message${r}!`)},shortcut:new z({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[D.CTRL,E.L],macShortcut:[D.CMD,E.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:no,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new z({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[D.CTRL,E.SLASH],macShortcut:[D.CMD,E.SLASH]}),group:he.groups.global}].concat(o),t=()=>new Promise(c=>{setTimeout(()=>{c(o)},3e3)});return e.jsxs("div",{...p("context-menus"),children:[e.jsx("h2",{className:"ui-title",children:"Context Menu"}),e.jsxs(f,{kind:"primary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(he,{actions:s})]}),e.jsxs(f,{kind:"tertiary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(he,{actions:t})]})]})}}class cl extends u.Component{constructor(o){super(o),this.sampleInput=le.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",{...p("dialog"),children:[e.jsx("h2",{className:"ui-title",children:"Popover Dialog"}),e.jsx("p",{children:"Popover dialog that can contain interactive elements, can be set to self close on blur."}),e.jsxs(f,{kind:"primary",style:{marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{o?this.setState({isShown:!1}):this.setState({isShown:!0})},children:["Open Dialog",e.jsx(cr,{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(mr,{menuText:"Checkbox Menu",valueMap:r,onUpdateValueMap:this.handleUpdateCheckboxMap})]})}}class hl extends u.Component{constructor(o){super(o),this.state={isShown:!1}}render(){const o=[{title:"Show Alert",icon:Ae,action:()=>{alert("Alert!")},shortcut:new z({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[D.CTRL,E.A],macShortcut:[D.CMD,E.A]})},{title:"Log Message",icon:Me,action:()=>{console.log("Logging a message!")},shortcut:new z({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[D.CTRL,E.L],macShortcut:[D.CMD,E.L]})}],s=[{title:"Show Shortcuts",icon:no,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new z({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[D.CTRL,E.SLASH],macShortcut:[D.CMD,E.SLASH]}),group:he.groups.global}].concat(o),{isShown:t}=this.state;return e.jsxs("div",{...p("dropdown-menus"),children:[e.jsx("h2",{className:"ui-title",children:"Dropdown Menu"}),e.jsx("p",{children:"A simple dropdown menu of actions, can open on click of parent container, or controlled by prop."}),e.jsx(f,{kind:"inline",className:"mx-2",icon:Ho,onClick:()=>{},children:e.jsx(ze,{actions:s})}),e.jsxs(f,{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(ze,{isShown:t,onMenuClosed:()=>{this.setState({isShown:!1})},actions:s})]})]})}}const nl=`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
  `,zl="_themeColors_1ezbi_1",Wl="_label_1ezbi_8",ql="_capitalize_1ezbi_16",Zl="_swatch_1ezbi_19",Q={themeColors:zl,label:Wl,capitalize:ql,swatch:Zl};function Xl(){return{"Theme Color Palette":G("palette",Fl,1),"Semantic Colors":G("semantic",Vl,1),"Chart Colors":G("chart",Ol,2),"Editor Colors":G("editor",Ul,2),"Grid Colors":G("grid",Gl,2),"Component Colors":G("component",Hl,1)}}function Yl(){const{selectedThemeKey:l}=mo(),o=u.useMemo(Xl,[l]);return e.jsx(e.Fragment,{children:Object.entries(o).map(([r,s],t)=>e.jsxs("div",{...p(r),children:[e.jsx("h2",{className:"ui-title",children:r}),e.jsx("div",{className:Q.themeColors,children:Object.entries(s).map(([c,a])=>e.jsxs("div",{style:{gridRow:`span ${a.length+1}`},children:[e.jsx("span",{className:H(Q.label,Q.capitalize),children:c}),a.map(({isLabel:n,name:h,value:i,note:d})=>n===!0?e.jsx("span",{className:Q.label,children:h},h):e.jsxs("div",{className:Q.swatch,style:{backgroundColor:i,border:i===""&&h.length>0?po:void 0,color:`var(--dh-color-${xo(i)})`},children:[e.jsxs(oe,{children:[e.jsx("div",{children:h}),e.jsx("div",{children:i}),e.jsx("div",{children:ee.normalizeCssColor(i,!0)})]}),e.jsx("span",{children:h.replace("--dh-color-","")}),h.endsWith("-hue")||d!=null?e.jsx("span",{children:d??i}):null]},h))]},c))})]},r))})}const Ne="data-menu-category",Kl="data-no-menu",bo="spectrum-component-samples";function Ql(){return e.jsxs("div",{id:bo,children:[e.jsx("h2",{className:"ui-title","data-no-menu":!0,children:"Spectrum Components"}),e.jsxs(Ie,{gap:20,columns:No("0px","1fr"),children:[e.jsxs($,{...S("spectrum-buttons"),children:[e.jsx("h3",{children:"Buttons"}),e.jsx(Jl,{})]}),e.jsxs($,{...S("spectrum-collections"),children:[e.jsx("h3",{children:"Collections"}),e.jsx(ls,{})]}),e.jsxs($,{...S("spectrum-content"),children:[e.jsx("h3",{children:"Content"}),e.jsx(rs,{})]}),e.jsxs($,{...S("spectrum-forms"),children:[e.jsx("h3",{children:"Forms"}),e.jsx(os,{})]}),e.jsxs($,{...S("spectrum-overlays"),children:[e.jsx("h3",{children:"Overlays"}),e.jsx(es,{})]}),e.jsxs($,{...S("spectrum-well"),children:[e.jsx("h3",{children:"Wells"}),e.jsx(ko,{children:"This is a well."})]})]})]})}function Jl(){return e.jsxs(e.Fragment,{children:[e.jsxs(L,{marginBottom:"size-200",children:[e.jsx(se,{children:e.jsx(k,{icon:_})}),e.jsx(ke,{children:"Icon Button"})]}),e.jsxs(Ie,{autoFlow:"column",columnGap:"size-250",rowGap:"size-150",columns:De(4,"size-2000"),rows:De(8,"size-400"),children:[e.jsx("label",{children:'Button style="outline"'}),e.jsx(j,{variant:"primary",style:"outline",children:"Primary"}),e.jsx(j,{variant:"secondary",style:"outline",children:"Secondary"}),e.jsx(j,{variant:"accent",style:"outline",children:"Accent"}),e.jsx(j,{variant:"negative",style:"outline",children:"Negative"}),e.jsx(j,{variant:"primary",staticColor:"black",style:"outline",children:"Static Black"}),e.jsx(j,{variant:"primary",staticColor:"white",style:"outline",children:"Static White"}),e.jsx(j,{variant:"primary",isDisabled:!0,style:"outline",children:"Disabled"}),e.jsx("label",{children:'Button style="fill"'}),e.jsx(j,{variant:"primary",style:"fill",children:"Primary"}),e.jsx(j,{variant:"secondary",style:"fill",children:"Secondary"}),e.jsx(j,{variant:"accent",style:"fill",children:"Accent"}),e.jsx(j,{variant:"negative",style:"fill",children:"Negative"}),e.jsx(j,{variant:"primary",staticColor:"black",style:"fill",children:"Static Black"}),e.jsx(j,{variant:"primary",staticColor:"white",style:"fill",children:"Static White"}),e.jsx(j,{variant:"primary",isDisabled:!0,style:"fill",children:"Disabled"}),e.jsx("label",{children:"Action Button"}),e.jsx(L,{children:"Normal"}),e.jsx(L,{gridRow:"span 3",isQuiet:!0,children:"Quiet"}),e.jsx(L,{staticColor:"black",children:"Static Black"}),e.jsx(L,{staticColor:"white",children:"Static White"}),e.jsx(L,{isDisabled:!0,children:"Disabled"}),e.jsx("label",{children:"Toggle Button"}),e.jsx(F,{children:"Normal"}),e.jsx(F,{isQuiet:!0,children:"Quiet"}),e.jsx(F,{gridRow:"span 2",isEmphasized:!0,children:"Emphasized"}),e.jsx(F,{staticColor:"black",children:"Static Black"}),e.jsx(F,{staticColor:"white",children:"Static White"}),e.jsx(F,{isDisabled:!0,children:"Disabled"})]})]})}function es(){return e.jsxs(e.Fragment,{children:[e.jsx(ke,{children:"Contextual Help"}),e.jsxs(Do,{variant:"info",children:[e.jsx(co,{children:"Need help?"}),e.jsx(ho,{children:e.jsx(ke,{children:"This is a helpful description of the thing you need help with."})})]})]})}function os(){return e.jsx(Eo,{children:e.jsxs(Ie,{gap:20,columns:De("auto-fit","210px"),children:[e.jsx(Io,{label:"Text Field"}),e.jsxs(Ao,{label:"Combobox",menuTrigger:"focus",defaultSelectedKey:"two",children:[e.jsx(ce,{children:"One"},"one"),e.jsx(ce,{children:"Two"},"two"),e.jsx(ce,{children:"Three"},"three")]}),e.jsx(Mo,{children:"Checkbox"}),e.jsx(Ro,{label:"Slider",defaultValue:24}),e.jsx($o,{children:"Switch"})]})})}function rs(){return e.jsxs(Lo,{children:[e.jsx(se,{size:"XL",children:e.jsx(k,{icon:qo})}),e.jsx(co,{children:"Illustrated Message"}),e.jsx(ho,{children:"This is the content of the message."})]})}function ls(){return e.jsxs(e.Fragment,{children:[e.jsx("label",{id:"table-view-sample",children:"Table View"}),e.jsxs(Po,{"aria-labelledby":"table-view-sample",selectionMode:"multiple",children:[e.jsxs(_o,{children:[e.jsxs(V,{title:"Person",children:[e.jsx(V,{allowsResizing:!0,children:"Name"}),e.jsx(V,{children:"Age"})]}),e.jsxs(V,{title:"Address",children:[e.jsx(V,{allowsResizing:!0,children:"City"}),e.jsx(V,{children:"State"})]})]}),e.jsxs(Bo,{children:[e.jsxs(ue,{children:[e.jsx(N,{children:"John"}),e.jsx(N,{children:"42"}),e.jsx(N,{children:"San Francisco"}),e.jsx(N,{children:"CA"})]}),e.jsxs(ue,{children:[e.jsx(N,{children:"Jane"}),e.jsx(N,{children:"38"}),e.jsx(N,{children:"San Francisco"}),e.jsx(N,{children:"CA"})]}),e.jsxs(ue,{children:[e.jsx(N,{children:"Becky"}),e.jsx(N,{children:"12"}),e.jsx(N,{children:"San Francisco"}),e.jsx(N,{children:"CA"})]})]})]})]})}function ae({"data-menu-category":l}){return e.jsx("div",{"data-menu-category":l})}function ss(){const[l,o]=u.useState([]);u.useEffect(()=>{let s={category:"",items:[]};const t=[s],c=document.querySelector(`#${bo}`);document.querySelectorAll(`h2,h3,[${Ne}]`).forEach(a=>{if(a.textContent==null||a.hasAttribute(Kl))return;if(a.hasAttribute(Ne)){s={category:a.getAttribute(Ne)??"",items:[]},t.push(s);return}const n=`${c?.contains(a)===!0?"spectrum-":""}${a.textContent}`.toLowerCase().replace(/\s/g,"-");a.id=n,s.items.push({id:n,label:a.textContent})}),o(t)},[]),u.useEffect(()=>{const s=window.location.hash===""?null:document.querySelector(window.location.hash);s&&setTimeout(()=>{s.scrollIntoView()},0)},[]);const r=u.useCallback(s=>{const t=String(s);document.getElementById(t)?.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{window.location.hash=t},1e3)},[]);return e.jsxs(Fo,{children:[e.jsx(L,{children:e.jsx(se,{children:e.jsx(k,{icon:Zo})})}),e.jsx(Vo,{items:l,onAction:r,children:({category:s,items:t})=>e.jsx(Oo,{items:t,title:s,children:({id:c,label:a})=>e.jsx(ce,{children:a},c)},s)})]})}function ts(){const l=u.useCallback(()=>{window.scrollTo({top:0,behavior:"smooth"}),setTimeout(()=>{window.location.hash=""},500)},[]);return u.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(j,{UNSAFE_className:"goto-top-button",variant:"accent",onPress:l,children:e.jsx(se,{children:e.jsx(k,{icon:Xo})})})}const as=["Tab 1","Tab 2","Tab 3"];function cs({isActive:l,title:o}){return e.jsxs("li",{className:H("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 hs(){return e.jsxs("div",{...p("golden-layout"),children:[e.jsx("h2",{className:"ui-title",children:"Golden Layout"}),[!1,!0].map(l=>e.jsxs(le.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:as.map((o,r)=>e.jsx(cs,{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 ns(){return e.jsxs("div",{...p("animations",["sample-section-e2e-ignore"]),children:[e.jsx("h2",{className:"ui-title",children:"Animations"}),e.jsx($,{position:"relative",height:400,children:e.jsx(jr,{})})]})}const to={position:"sticky",justifyContent:"end",zIndex:1,UNSAFE_style:{float:"right"}};function ds(){const l=window.location.search.includes("isolateSection=true"),{themes:o}=mo(),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:`.${be}, .sample-section:not(${window.location.hash}), :not(.sample-section) > h2 {
212
212
  display: none;
213
213
  }`}),e.jsx(I,{justifyContent:"space-between",alignItems:"center",marginTop:"2rem",marginBottom:"1rem",children:e.jsx("h1",{style:{paddingTop:"2rem"},children:"Deephaven UI Components"})}),e.jsxs(I,{...to,UNSAFE_className:be,marginTop:-56,top:20,gap:10,alignItems:"end",children:[r?e.jsx(Cr,{}):null,e.jsx(ss,{})]}),e.jsx(I,{...to,UNSAFE_className:be,top:"calc(100vh - 40px)",marginTop:-32,marginEnd:r?-234:0,children:e.jsx(ts,{})}),e.jsx(Al,{}),e.jsx(ae,{"data-menu-category":"Colors"}),e.jsx(tl,{}),e.jsx(Yl,{}),e.jsx(ae,{"data-menu-category":"Layout"}),e.jsx(hs,{}),e.jsx(ae,{"data-menu-category":"Components"}),e.jsx(re,{}),e.jsx(Dl,{}),e.jsx(Sl,{}),e.jsx(Nl,{}),e.jsx(de,{}),e.jsx(El,{}),e.jsx(cl,{}),e.jsx(kl,{}),e.jsx(al,{}),e.jsx(hl,{}),e.jsx(Bl,{}),e.jsx(Il,{}),e.jsx(wl,{}),e.jsx(il,{}),e.jsx(bl,{}),e.jsx(Jr,{}),e.jsx(ir,{}),e.jsx(ns,{}),e.jsx(ae,{"data-menu-category":"Spectrum Components"}),e.jsx(Ql,{})]})})}function Le(l){const{workspace:o,setWorkspace:r}=l;return u.useEffect(()=>{Sr.makeDefaultWorkspace({getLayouts:async()=>[],getLayout:async()=>({})}).then(r)},[r]),o!=null?e.jsx(ds,{}):null}Le.propTypes={workspace:ne.shape({}),setWorkspace:ne.func.isRequired};Le.defaultProps={workspace:null};const is=l=>({workspace:Nr(l)}),us=Uo(is,{setWorkspace:Tr})(Le);function Ss(){return ur.register(new URL("./download/serviceWorker.js",window.location.href)),gr.init({getWorker:()=>new Yo}),window["__react-beautiful-dnd-disable-dev-warnings"]=!0,e.jsx(wr,{children:e.jsx(Go,{store:kr,children:e.jsx(us,{})})})}export{Ss as StyleGuideRoot,Ss as default};
214
- //# sourceMappingURL=StyleGuideRoot-b68e7e2e.js.map
214
+ //# sourceMappingURL=StyleGuideRoot-17a1d97f.js.map