@deephaven/code-studio 0.60.0 → 0.60.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/assets/{AppRoot-4e766647.js → AppRoot-18896503.js} +4 -4
- package/build/assets/AppRoot-18896503.js.map +1 -0
- package/build/assets/{ControlType-aed38d2a.js → ControlType-b3af9d6b.js} +2 -2
- package/build/assets/{ControlType-aed38d2a.js.map → ControlType-b3af9d6b.js.map} +1 -1
- package/build/assets/{FontBootstrap-03312de4.js → FontBootstrap-84eb96bb.js} +2 -2
- package/build/assets/{FontBootstrap-03312de4.js.map → FontBootstrap-84eb96bb.js.map} +1 -1
- package/build/assets/{IrisGrid-95f2b562.js → IrisGrid-79707acb.js} +2 -2
- package/build/assets/{IrisGrid-95f2b562.js.map → IrisGrid-79707acb.js.map} +1 -1
- package/build/assets/{IrisGridModelFactory-83f4e8e3.js → IrisGridModelFactory-7ea0ea8b.js} +2 -2
- package/build/assets/{IrisGridModelFactory-83f4e8e3.js.map → IrisGridModelFactory-7ea0ea8b.js.map} +1 -1
- package/build/assets/{StyleGuideRoot-f74fbaec.js → StyleGuideRoot-d479ad58.js} +2 -2
- package/build/assets/{StyleGuideRoot-f74fbaec.js.map → StyleGuideRoot-d479ad58.js.map} +1 -1
- package/build/assets/{index-e5c706d4.js → index-6dcb396d.js} +2 -2
- package/build/assets/{index-e5c706d4.js.map → index-6dcb396d.js.map} +1 -1
- package/build/assets/{index-8f18b8a1.js → index-9a3f9a77.js} +2 -2
- package/build/assets/{index-8f18b8a1.js.map → index-9a3f9a77.js.map} +1 -1
- package/build/assets/{index-aeb6c8aa.js → index-ecb1b990.js} +2 -2
- package/build/assets/{index-aeb6c8aa.js.map → index-ecb1b990.js.map} +1 -1
- package/build/assets/{usePlugins-ed18184b.js → usePlugins-a7862f22.js} +2 -2
- package/build/assets/{usePlugins-ed18184b.js.map → usePlugins-a7862f22.js.map} +1 -1
- package/build/assets/{useUser-2b2d3085.js → useUser-48184119.js} +2 -2
- package/build/assets/{useUser-2b2d3085.js.map → useUser-48184119.js.map} +1 -1
- package/build/index.html +1 -1
- package/package.json +31 -31
- package/build/assets/AppRoot-4e766647.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,F as G,C as e,aN as C,H as he,U as yo,N as ve,G as k,a1 as oe,M as qe,ap as Bo,aO as P,aP as jo,aQ as D,$ as Fo,a0 as R,a3 as Oo,a4 as Fe,aR as Vo,a5 as Uo,a6 as Oe,a2 as ie,a8 as Go,a9 as b,aS as Ho,aT as Me,aU as z,aV as zo,a7 as Wo,aW as Re,ad as wo,ac as S,aX as Pe,aY as qo,aZ as Ko,ae as Xo,a_ as Yo,a$ as Zo,b0 as Qo,b1 as W,b2 as Jo,b3 as fe,b4 as I,b5 as er,b6 as or,b7 as rr,ar as lr,b8 as sr,b9 as be,K as tr,_ as ar}from"./vendor-755ebba4.js";import{aW as Ke,aX as U,aV as Q,aY as Ve,aZ as Ue,a_ as Co,aA as cr,a$ as q,b0 as Xe,G as Ye,b1 as Ze,I as Le,b2 as nr,b3 as dr,N as ir,b4 as hr,b5 as ur,aF as Qe}from"./index-8f18b8a1.js";import{W as gr}from"./monaco-0fb6bb22.js";import{ah as xe,ac as So,a9 as K,ai as To,B as mr,f as te,l as vr,K as ye,aj as re,ak as pr,I as xr,R as ko,e as B,C as _e,O as fr,a as br,S as yr,b as ne,P as Je,g as jr,c as wr}from"./IrisGrid-95f2b562.js";import{B as p,u as No,h as J,f as ee,ak as $,K as A,M as ge,L as Cr,m as eo,br as oo,n as Sr,C as L,an as ae,S as me,ae as Tr,N as kr,d as ro,ai as lo,ap as Do,k as so,aQ as X,U as Nr,$ as Dr,a4 as Er,a5 as Ir}from"./usePlugins-ed18184b.js";import{M as to,H as $r,A as Ar,V as je,T as Mr,D as Rr,C as Pr,a as Lr,c as _r,b as Br,d as Fr}from"./FontBootstrap-03312de4.js";import{N as Or,T as Vr}from"./useUser-2b2d3085.js";import{L as Ur}from"./AppRoot-4e766647.js";import{u as Gr,s as Hr}from"./ControlType-aed38d2a.js";import"./helpers-de833af9.js";import"./plotly-45de66f8.js";function ao(s,o,r,l,t,a,c){try{var i=s[a](c),n=i.value}catch(h){r(h);return}i.done?o(n):Promise.resolve(n).then(l,t)}function we(s){return function(){var o=this,r=arguments;return new Promise(function(l,t){var a=s.apply(o,r);function c(n){ao(a,l,t,c,i,"next",n)}function i(n){ao(a,l,t,c,i,"throw",n)}c(void 0)})}}function _(s,o,r){return o=zr(o),o in s?Object.defineProperty(s,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):s[o]=r,s}function zr(s){var o=Wr(s,"string");return typeof o=="symbol"?o:String(o)}function Wr(s,o){if(typeof s!="object"||s===null)return s;var r=s[Symbol.toPrimitive];if(r!==void 0){var l=r.call(s,o||"default");if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(s)}class qr extends xe{constructor(){var{rowCount:o=1e9,columnCount:r=100,floatingTopRowCount:l=0,floatingBottomRowCount:t=0,floatingLeftColumnCount:a=0,floatingRightColumnCount:c=0,isEditable:i=!1,editedData:n=[]}=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=l,this.floatingBottom=t,this.floatingLeft=a,this.floatingRight=c,this.editable=i,this.editedData=n}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 l,t;return(l=(t=this.editedData[o])===null||t===void 0?void 0:t[r])!==null&&l!==void 0?l:"".concat(o,",").concat(r)}colorForCell(o,r,l){return l.textColor}textForColumnHeader(o){return"".concat(o)}textForRowHeader(o){return"".concat(o)}textForRowFooter(o){return"".concat(o)}setValueForCell(o,r,l){var t=this;return we(function*(){t.editedData[o]==null&&(t.editedData[o]=[]),t.editedData[o][r]="".concat(l)})()}setValueForRanges(o,r){var l=this;return we(function*(){So.forEachCell(o,(t,a)=>{l.setValueForCell(t,a,r)})})()}setValues(o){var r=this;return we(function*(){for(var l=0;l<o.length;l+=1){var t,a,c=o[l];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,l){return!0}isEditableRange(o){return this.isEditable}delete(o){throw new Error("Method not implemented.")}}const Ge=qr;function w(s,o,r){return o=Kr(o),o in s?Object.defineProperty(s,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):s[o]=r,s}function Kr(s){var o=Xr(s,"string");return typeof o=="symbol"?o:String(o)}function Xr(s,o){if(typeof s!="object"||s===null)return s;var r=s[Symbol.toPrimitive];if(r!==void 0){var l=r.call(s,o||"default");if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(s)}class E extends Ge{constructor(){var{rowCount:o=E.DEFAULT_ROW_COUNT,columnCount:r=E.DEFAULT_COLUMN_COUNT,children:l=new Map,childRowCount:t=Math.ceil(Math.max(E.MIN_CHILD_ROW_COUNT,o*E.DEFAULT_CHILD_ROW_COUNT_FACTOR)),maxDepth:a=E.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",K((c,i)=>{for(var n=null,h=i,d=[...c].sort((y,F)=>y[0]-F[0]),g=0;g<d.length;g+=1){var[m,v]=d[g];if(h<=m)break;var f=v.rowCount;if(h<=m+f){n=m,h=h-m-1;break}h-=f}return{key:n,offsetRow:h}})),w(this,"getCachedTextForRowHeader",K((c,i)=>{var{key:n,offsetRow:h}=this.getCachedModelRowOffset(c,i);if(n!=null){var d=c.get(n);if(d!==void 0)return"".concat(n,".").concat(d.textForRowHeader(h))}return"".concat(h)})),w(this,"getCachedTextForCell",K((c,i,n)=>{var{key:h,offsetRow:d}=this.getCachedModelRowOffset(c,n);if(h!=null){var g=c.get(h);if(g!==void 0)return"".concat(h,".").concat(g.textForCell(i,d))}return"".concat(i,",").concat(d)})),w(this,"getCachedIsRowExpandable",K((c,i,n)=>{var h=this.getCachedDepthForRow(c,i);return h<n})),w(this,"getCachedIsRowExpanded",K((c,i)=>{var{key:n,offsetRow:h}=this.getCachedModelRowOffset(c,i);if(n!=null){var d=c.get(n);if(d!==void 0)return d.isRowExpanded(h)}return c.has(h)})),w(this,"getCachedDepthForRow",K((c,i)=>{var{key:n,offsetRow:h}=this.getCachedModelRowOffset(c,i);if(n!=null){var d=c.get(n);if(d!==void 0)return d.depthForRow(h)+1}return 0})),this.children=l,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 l=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 i=this.children.get(t);if(i!==void 0){var{rowCount:n}=i;i.setRowExpanded(a,r,l),this.numRows+=i.rowCount-n}}else if(r){var d=new E({rowCount:this.childRowCount,columnCount:this.numColumns});c.set(a,d),this.numRows+=d.rowCount}else{var h=c.get(a);h!==void 0&&(this.numRows-=h.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(E,"DEFAULT_ROW_COUNT",1e9);w(E,"DEFAULT_COLUMN_COUNT",100);w(E,"DEFAULT_CHILD_ROW_COUNT_FACTOR",.01);w(E,"MIN_CHILD_ROW_COUNT",10);w(E,"MAX_DEPTH",10);const He=E;function Ce(s,o,r){return o=Yr(o),o in s?Object.defineProperty(s,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):s[o]=r,s}function Yr(s){var o=Zr(s,"string");return typeof o=="symbol"?o:String(o)}function Zr(s,o){if(typeof s!="object"||s===null)return s;var r=s[Symbol.toPrimitive];if(r!==void 0){var l=r.call(s,o||"default");if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(s)}class Qr extends xe{constructor(o,r){var l;super(),Ce(this,"data",void 0),Ce(this,"columnHeaders",void 0),Ce(this,"numberOfColumns",void 0),this.data=o,this.numberOfColumns=Math.max(...o.map(t=>t.length),(l=r?.length)!==null&&l!==void 0?l:0),this.columnHeaders=r}get rowCount(){return this.data.length}get columnCount(){return this.numberOfColumns}textForCell(o,r){var l;return"".concat((l=this.data[r])===null||l===void 0?void 0:l[o])}textForColumnHeader(o){var r,l;return(r=(l=this.columnHeaders)===null||l===void 0?void 0:l[o])!==null&&r!==void 0?r:""}}const Jr=Qr;function Se(s,o,r){return o=el(o),o in s?Object.defineProperty(s,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):s[o]=r,s}function el(s){var o=ol(s,"string");return typeof o=="symbol"?o:String(o)}function ol(s,o){if(typeof s!="object"||s===null)return s;var r=s[Symbol.toPrimitive];if(r!==void 0){var l=r.call(s,o||"default");if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(s)}class rl extends xe{constructor(o,r){super(),Se(this,"numberOfColumns",void 0),Se(this,"numberOfRows",void 0),Se(this,"viewportData",void 0),this.numberOfColumns=o,this.numberOfRows=r}get columnCount(){return this.numberOfColumns}get rowCount(){return this.numberOfRows}textForCell(o,r){var l,t,a,c,i,n,h,d=r-((l=(t=this.viewportData)===null||t===void 0?void 0:t.rowOffset)!==null&&l!==void 0?l:0),g=o-((a=(c=this.viewportData)===null||c===void 0?void 0:c.columnOffset)!==null&&a!==void 0?a:0);return"".concat((i=(n=this.viewportData)===null||n===void 0||(h=n.data[d])===null||h===void 0?void 0:h[g])!==null&&i!==void 0?i:"")}textForColumnHeader(o){return"".concat(o)}textForRowHeader(o){return"".concat(o)}}const ll=rl;function T(s,o,r){return o=sl(o),o in s?Object.defineProperty(s,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):s[o]=r,s}function sl(s){var o=tl(s,"string");return typeof o=="symbol"?o:String(o)}function tl(s,o){if(typeof s!="object"||s===null)return s;var r=s[Symbol.toPrimitive];if(r!==void 0){var l=r.call(s,o||"default");if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(s)}var al="proportional",cl=To.positiveBarColor,nl=To.negativeBarColor,dl="beside",il="LTR",hl="right";function ul(s){return Array.isArray(s)&&s.every(o=>typeof o=="number")}class gl extends xe{constructor(o){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Map,l=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,i=arguments.length>6&&arguments[6]!==void 0?arguments[6]:new Map,n=arguments.length>7&&arguments[7]!==void 0?arguments[7]:new Map,h=arguments.length>8&&arguments[8]!==void 0?arguments[8]:new Map;super(),T(this,"numberOfColumns",void 0),T(this,"numberOfRows",void 0),T(this,"data",void 0),T(this,"columnMins",void 0),T(this,"columnMaxs",void 0),T(this,"columnAxes",void 0),T(this,"valuePlacements",void 0),T(this,"directions",void 0),T(this,"positiveColors",void 0),T(this,"negativeColors",void 0),T(this,"opacities",void 0),T(this,"textAlignments",void 0),T(this,"markers",void 0),this.positiveColors=l,this.negativeColors=t,this.data=o,this.columnAxes=r,this.valuePlacements=a,this.opacities=c,this.directions=i,this.textAlignments=n,this.markers=h,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];ul(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 l;return"".concat((l=this.data[o])===null||l===void 0?void 0:l[r])}textForColumnHeader(o){return"".concat(o)}textAlignForCell(o,r){var l;return(l=this.textAlignments.get(o))!==null&&l!==void 0?l:hl}renderTypeForCell(o,r){return o<20||o%2===r%2?"dataBar":"text"}dataBarOptionsForCell(o,r){var l,t,a,c,i,n,h,d=Ke(this.columnMins,o),g=Ke(this.columnMaxs,o),m=(l=this.columnAxes.get(o))!==null&&l!==void 0?l:al,v=(t=this.valuePlacements.get(o))!==null&&t!==void 0?t:dl,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:il,F=(c=this.positiveColors.get(o))!==null&&c!==void 0?c:cl,le=(i=this.negativeColors.get(o))!==null&&i!==void 0?i:nl,O=Number((n=this.data[o])===null||n===void 0?void 0:n[r]),H=O>=0?F:le,ue=(h=this.markers.get(o))!==null&&h!==void 0?h:[];return{columnMin:d,columnMax:g,axis:m,color:H,valuePlacement:v,opacity:f,markers:ue,direction:y,value:O}}}const ml=gl,Te="hide-from-e2e-tests",co="sample-section";function*Eo(s=1){for(;;)s=s*16807%2147483647,yield s/2147483647}function vl(s=1){const[o]=u.useState(()=>Eo(s));return u.useCallback(()=>{const r=o.next();if(r.done===!0)throw new Error("Random number generator unexpectedly finished");return r.value},[o])}function x(s,o=[]){const r=`${co}-${s.toLocaleLowerCase().replaceAll(" ","-")}`,l=G(co,...o);return{id:r,className:l}}function N(s,o=[]){const{id:r,className:l}=x(s,o);return{id:r,UNSAFE_className:l}}function M(){}class Z extends u.Component{static renderButtonBrand(o,r){const l=o.length?`btn-${o}-${r}`:`btn-${r}`;return e.jsx(mr,{className:l,style:{marginBottom:"1rem",marginRight:"1rem"},children:r},r)}static renderButtons(o){const r=["primary","secondary","success","warning","danger","info"].map(l=>Z.renderButtonBrand(o,l));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,l])=>e.jsxs("a",{className:`text-${r}`,children:[r," (",l,")"]},r))})]})}static renderSocketedButtons(){return e.jsxs("div",{...x("buttons-socketed"),children:[e.jsx("h5",{children:"Socketed Buttons (for linker)"}),e.jsx(te,{style:{marginBottom:"1rem",marginRight:"1rem"},onClick:M,children:"Unlinked"}),e.jsx(te,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,onClick:M,children:"Linked"}),e.jsx(te,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinkedSource:!0,onClick:M,children:"Linked Source"}),e.jsx(te,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,isInvalid:!0,onClick:M,children:"Error"}),e.jsx(te,{style:{marginBottom:"1rem",marginRight:"1rem"},disabled:!0,onClick:M,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:U,tooltip:"test",onClick:M}),"Toggle button (class active):",e.jsx(p,{className:"mx-2",onClick:()=>{this.setState({toggle:!o})},active:o,kind:"inline",icon:U,tooltip:"test"}),"Disabled:",e.jsx(p,{className:"mx-2",kind:"inline",disabled:!0,onClick:M,children:"Disabled"}),"With Text:",e.jsx(p,{className:"mx-2",kind:"inline",icon:U,onClick:M,children:e.jsx("span",{children:"Text Button"})}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("span",{children:"btn-link-icon (no text):"}),e.jsx(p,{kind:"ghost",icon:U,tooltip:"test",onClick:M}),e.jsx("span",{className:"mx-2",children:"btn-link:"}),e.jsx(p,{kind:"ghost",onClick:M,children:"Text Button"}),e.jsx("span",{className:"mx-2",children:"btn-link (text w/ optional with icon):"}),e.jsx(p,{kind:"ghost",icon:U,onClick:M,children:"Text Button"})]})}render(){const o=["","outline"].map(a=>Z.renderButtons(a)),r=this.renderInlineButtons(),l=Z.renderSocketedButtons(),t=Z.renderLinks();return e.jsxs("div",{children:[e.jsx("h2",{className:"ui-title",children:"Buttons"}),e.jsxs("div",{style:{padding:"1rem 0"},children:[o,r,l,t]})]})}}function pl(){const s=No();to.random=vl();const[o]=u.useState(()=>new to(s));return e.jsxs("div",{...x("charts"),children:[e.jsx("h2",{className:"ui-title",children:"Chart"}),e.jsx("div",{style:{height:500},children:e.jsx(vr,{model:o})})]})}const Be="2px solid var(--dh-color-notice-bg)",xl={"--dh-color-black":"gray","--dh-color-white":"gray","--dh-color-border":"General","--dh-color-bg":"General","--dh-color-surface-bg":"General","--dh-color-fg":"General","--dh-color-content-bg":"General","--dh-color-subdued-content-bg":"General","--dh-color-dropshadow":"General","--dh-color-keyboard-selected-bg":"Misc","--dh-color-hover-border":"Misc","--dh-color-visual-positive":"Visual Status","--dh-color-visual-negative":"Visual Status","--dh-color-visual-notice":"Visual Status","--dh-color-visual-info":"Visual Status","--dh-color-gray-bg":"Default Background","--dh-color-red-bg":"Default Background","--dh-color-orange-bg":"Default Background","--dh-color-yellow-bg":"Default Background","--dh-color-chartreuse-bg":"Default Background","--dh-color-celery-bg":"Default Background","--dh-color-green-bg":"Default Background","--dh-color-seafoam-bg":"Default Background","--dh-color-cyan-bg":"Default Background","--dh-color-blue-bg":"Default Background","--dh-color-indigo-bg":"Default Background","--dh-color-purple-bg":"Default Background","--dh-color-fuchsia-bg":"Default Background","--dh-color-magenta-bg":"Default Background","--dh-color-editor-bg":"editor","--dh-color-editor-fg":"editor","--dh-color-editor-context-menu-bg":"menus","--dh-color-editor-context-menu-fg":"menus","--dh-color-editor-menu-selection-bg":"menus","--dh-color-grid-bg":"grid","--dh-color-grid-number-positive":"Data Types","--dh-color-grid-number-negative":"Data Types","--dh-color-grid-number-zero":"Data Types","--dh-color-grid-date":"Data Types","--dh-color-grid-string-null":"Data Types"},no={"--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"},fl={palette:{black:"gray",white:"gray"},editor:{line:"editor",comment:"code",string:"code",number:"code",delimiter:"code",identifier:"code",keyword:"code",operator:"code",storage:"code",predefined:"code",selection:"state",focus:"state"},chart:{axis:"Chart",bg:"Chart",grid:"Chart",plot:"Chart",title:"Chart",active:"Data",trend:"Data",area:"Data",range:"Data",line:"Deprecated"},grid:{data:"Data Bars",context:"Context Menu"},semantic:{},component:{}};function de(s){const o=Q.parseRgba(Q.asRgbOrRgbaString(s)??"");if(o==null||o.a<.5)return"white";const{r,g:l,b:t}=o;return Q.getBrightness([r,l,t])>=128?"black":"white"}function bl(s){const o=getComputedStyle(document.documentElement);return s.split(/[\n;]/g).map(l=>/^(?:\s{2}|:root\{)?(--dh-color-(?:[^:]+))/.exec(l)?.[1]).filter(l=>!!l).map(l=>{const t=o.getPropertyValue(l);return l==="--dh-color-chart-colorway"?t.split("hsl").filter(Boolean).map(c=>`hsl${c.trim()}`).map((c,i)=>({name:`${l}-${i}`,value:c})):{name:l,value:t}}).flat()}function Y(s,o,r,l=xl){const t=fl[s];return bl(o).reduce((i,{name:n,value:h})=>{if(/^--dh-color-(.*?)-hsl$/.test(n)||/^--dh-color-gray-(light|mid|dark)$/.test(n))return i;const d=/^--dh-color-([^-]+)(?:-([^-]+))?/.exec(n);let g=l[n]??d?.[r]??d?.[1]??"???";if(g=t[g]??g,i[g]==null&&(i[g]=[]),n in no&&i[g].push({isLabel:!0,name:no[n],value:""}),/^--dh-color-gray-(light|mid|dark)$/.test(n))return i;const m={"--dh-color-gray-900":"light","--dh-color-gray-600":"mid","--dh-color-gray-300":"dark"}[n];return i[g].push({name:n,value:h,note:m}),i},{})}function yl(){const s=u.useRef(null);return u.useLayoutEffect(()=>{if(s.current==null)return;const o=getComputedStyle(s.current),{backgroundColor:r}=o;s.current.style.color=de(r)},[]),s}function jl(s,o){const[r,l]=u.useState();return u.useEffect(()=>{if(s.current==null)return;const t=getComputedStyle(s.current,o).getPropertyValue("content"),a=/"(--dh-color-.*?)[,"]/.exec(t)?.[1];if(a==null)return;const c=getComputedStyle(s.current).getPropertyValue(a);l(c)},[s,o]),r}function ke({className:s,children:o}){const r=yl(),l=jl(r,":after"),t=u.useMemo(()=>l!=null?{value:l,normalized:Q.normalizeCssColor(l,!0)}:null,[l]),a=t!=null&&t.value!=="";return e.jsxs("div",{ref:r,className:s,style:{border:a?void 0:Be},children:[a&&e.jsxs(J,{interactive:!0,children:[e.jsx("div",{children:t.value}),e.jsx("div",{children:t.normalized})]}),o]})}function wl(){const s=["100","200","300","400","500","600","700","800","850","8XX","900"].map(l=>e.jsx(ke,{className:G("swatch","gray-swatch",`gray-swatch-${l}`),children:l==="8XX"?"N/A":`Gray-${l}`},l)),o=["red","orange","yellow","green","blue","purple","white","black"].map(l=>e.jsx(ke,{className:G("swatch",`swatch-${l}`),children:l},l)),r=["content-bg","background","foreground","primary","primary-dark","secondary","secondary-hover","success","info","warning","danger","danger-hover"].map(l=>e.jsx(ke,{className:G("swatch",`swatch-${l}`),children:l},l));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:[s,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 Cl 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:Ve,action:()=>{alert(`Alert${r}!`)},shortcut:new ee({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[$.CTRL,A.A],macShortcut:[$.CMD,A.A]})},{title:`Log Message${r}`,icon:Ue,action:()=>{console.log(`Logging a message${r}!`)},shortcut:new ee({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[$.CTRL,A.L],macShortcut:[$.CMD,A.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(),l=[{title:"Show Shortcuts",icon:Co,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new ee({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[$.CTRL,A.SLASH],macShortcut:[$.CMD,A.SLASH]}),group:ge.groups.global}].concat(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(ge,{actions:l})]}),e.jsxs(p,{kind:"tertiary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(ge,{actions:t})]})]})}}class Sl extends u.Component{constructor(o){super(o),this.sampleInput=he.createRef(),this.handleUpdateCheckboxMap=this.handleUpdateCheckboxMap.bind(this);const r=["Parent A",new Map([["Child 1",!0],["Child 2",!1]])],l=["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,l,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(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($r,{menuText:"Checkbox Menu",valueMap:r,onUpdateValueMap:this.handleUpdateCheckboxMap})]})}}class Tl extends u.Component{constructor(o){super(o),this.state={isShown:!1}}render(){const o=[{title:"Show Alert",icon:Ve,action:()=>{alert("Alert!")},shortcut:new ee({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[$.CTRL,A.A],macShortcut:[$.CMD,A.A]})},{title:"Log Message",icon:Ue,action:()=>{console.log("Logging a message!")},shortcut:new ee({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[$.CTRL,A.L],macShortcut:[$.CMD,A.L]})}],l=[{title:"Show Shortcuts",icon:Co,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new ee({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[$.CTRL,A.SLASH],macShortcut:[$.CMD,A.SLASH]}),group:ge.groups.global}].concat(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:cr,onClick:()=>{},children:e.jsx(eo,{actions:l})}),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(eo,{isShown:t,onMenuClosed:()=>{this.setState({isShown:!1})},actions:l})]})]})}}const kl=`trades = db.t("LearnDeephaven", "StockTrades").where("Date=\`2017-08-25\`")\\
|
|
1
|
+
import{r as u,F as G,C as e,aN as C,H as he,U as yo,N as ve,G as k,a1 as oe,M as qe,ap as Bo,aO as P,aP as jo,aQ as D,$ as Fo,a0 as R,a3 as Oo,a4 as Fe,aR as Vo,a5 as Uo,a6 as Oe,a2 as ie,a8 as Go,a9 as b,aS as Ho,aT as Me,aU as z,aV as zo,a7 as Wo,aW as Re,ad as wo,ac as S,aX as Pe,aY as qo,aZ as Ko,ae as Xo,a_ as Yo,a$ as Zo,b0 as Qo,b1 as W,b2 as Jo,b3 as fe,b4 as I,b5 as er,b6 as or,b7 as rr,ar as lr,b8 as sr,b9 as be,K as tr,_ as ar}from"./vendor-755ebba4.js";import{aW as Ke,aX as U,aV as Q,aY as Ve,aZ as Ue,a_ as Co,aA as cr,a$ as q,b0 as Xe,G as Ye,b1 as Ze,I as Le,b2 as nr,b3 as dr,N as ir,b4 as hr,b5 as ur,aF as Qe}from"./index-9a3f9a77.js";import{W as gr}from"./monaco-0fb6bb22.js";import{ah as xe,ac as So,a9 as K,ai as To,B as mr,f as te,l as vr,K as ye,aj as re,ak as pr,I as xr,R as ko,e as B,C as _e,O as fr,a as br,S as yr,b as ne,P as Je,g as jr,c as wr}from"./IrisGrid-79707acb.js";import{B as p,u as No,h as J,f as ee,ak as $,K as A,M as ge,L as Cr,m as eo,br as oo,n as Sr,C as L,an as ae,S as me,ae as Tr,N as kr,d as ro,ai as lo,ap as Do,k as so,aQ as X,U as Nr,$ as Dr,a4 as Er,a5 as Ir}from"./usePlugins-a7862f22.js";import{M as to,H as $r,A as Ar,V as je,T as Mr,D as Rr,C as Pr,a as Lr,c as _r,b as Br,d as Fr}from"./FontBootstrap-84eb96bb.js";import{N as Or,T as Vr}from"./useUser-48184119.js";import{L as Ur}from"./AppRoot-18896503.js";import{u as Gr,s as Hr}from"./ControlType-b3af9d6b.js";import"./helpers-de833af9.js";import"./plotly-45de66f8.js";function ao(s,o,r,l,t,a,c){try{var i=s[a](c),n=i.value}catch(h){r(h);return}i.done?o(n):Promise.resolve(n).then(l,t)}function we(s){return function(){var o=this,r=arguments;return new Promise(function(l,t){var a=s.apply(o,r);function c(n){ao(a,l,t,c,i,"next",n)}function i(n){ao(a,l,t,c,i,"throw",n)}c(void 0)})}}function _(s,o,r){return o=zr(o),o in s?Object.defineProperty(s,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):s[o]=r,s}function zr(s){var o=Wr(s,"string");return typeof o=="symbol"?o:String(o)}function Wr(s,o){if(typeof s!="object"||s===null)return s;var r=s[Symbol.toPrimitive];if(r!==void 0){var l=r.call(s,o||"default");if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(s)}class qr extends xe{constructor(){var{rowCount:o=1e9,columnCount:r=100,floatingTopRowCount:l=0,floatingBottomRowCount:t=0,floatingLeftColumnCount:a=0,floatingRightColumnCount:c=0,isEditable:i=!1,editedData:n=[]}=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=l,this.floatingBottom=t,this.floatingLeft=a,this.floatingRight=c,this.editable=i,this.editedData=n}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 l,t;return(l=(t=this.editedData[o])===null||t===void 0?void 0:t[r])!==null&&l!==void 0?l:"".concat(o,",").concat(r)}colorForCell(o,r,l){return l.textColor}textForColumnHeader(o){return"".concat(o)}textForRowHeader(o){return"".concat(o)}textForRowFooter(o){return"".concat(o)}setValueForCell(o,r,l){var t=this;return we(function*(){t.editedData[o]==null&&(t.editedData[o]=[]),t.editedData[o][r]="".concat(l)})()}setValueForRanges(o,r){var l=this;return we(function*(){So.forEachCell(o,(t,a)=>{l.setValueForCell(t,a,r)})})()}setValues(o){var r=this;return we(function*(){for(var l=0;l<o.length;l+=1){var t,a,c=o[l];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,l){return!0}isEditableRange(o){return this.isEditable}delete(o){throw new Error("Method not implemented.")}}const Ge=qr;function w(s,o,r){return o=Kr(o),o in s?Object.defineProperty(s,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):s[o]=r,s}function Kr(s){var o=Xr(s,"string");return typeof o=="symbol"?o:String(o)}function Xr(s,o){if(typeof s!="object"||s===null)return s;var r=s[Symbol.toPrimitive];if(r!==void 0){var l=r.call(s,o||"default");if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(s)}class E extends Ge{constructor(){var{rowCount:o=E.DEFAULT_ROW_COUNT,columnCount:r=E.DEFAULT_COLUMN_COUNT,children:l=new Map,childRowCount:t=Math.ceil(Math.max(E.MIN_CHILD_ROW_COUNT,o*E.DEFAULT_CHILD_ROW_COUNT_FACTOR)),maxDepth:a=E.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",K((c,i)=>{for(var n=null,h=i,d=[...c].sort((y,F)=>y[0]-F[0]),g=0;g<d.length;g+=1){var[m,v]=d[g];if(h<=m)break;var f=v.rowCount;if(h<=m+f){n=m,h=h-m-1;break}h-=f}return{key:n,offsetRow:h}})),w(this,"getCachedTextForRowHeader",K((c,i)=>{var{key:n,offsetRow:h}=this.getCachedModelRowOffset(c,i);if(n!=null){var d=c.get(n);if(d!==void 0)return"".concat(n,".").concat(d.textForRowHeader(h))}return"".concat(h)})),w(this,"getCachedTextForCell",K((c,i,n)=>{var{key:h,offsetRow:d}=this.getCachedModelRowOffset(c,n);if(h!=null){var g=c.get(h);if(g!==void 0)return"".concat(h,".").concat(g.textForCell(i,d))}return"".concat(i,",").concat(d)})),w(this,"getCachedIsRowExpandable",K((c,i,n)=>{var h=this.getCachedDepthForRow(c,i);return h<n})),w(this,"getCachedIsRowExpanded",K((c,i)=>{var{key:n,offsetRow:h}=this.getCachedModelRowOffset(c,i);if(n!=null){var d=c.get(n);if(d!==void 0)return d.isRowExpanded(h)}return c.has(h)})),w(this,"getCachedDepthForRow",K((c,i)=>{var{key:n,offsetRow:h}=this.getCachedModelRowOffset(c,i);if(n!=null){var d=c.get(n);if(d!==void 0)return d.depthForRow(h)+1}return 0})),this.children=l,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 l=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 i=this.children.get(t);if(i!==void 0){var{rowCount:n}=i;i.setRowExpanded(a,r,l),this.numRows+=i.rowCount-n}}else if(r){var d=new E({rowCount:this.childRowCount,columnCount:this.numColumns});c.set(a,d),this.numRows+=d.rowCount}else{var h=c.get(a);h!==void 0&&(this.numRows-=h.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(E,"DEFAULT_ROW_COUNT",1e9);w(E,"DEFAULT_COLUMN_COUNT",100);w(E,"DEFAULT_CHILD_ROW_COUNT_FACTOR",.01);w(E,"MIN_CHILD_ROW_COUNT",10);w(E,"MAX_DEPTH",10);const He=E;function Ce(s,o,r){return o=Yr(o),o in s?Object.defineProperty(s,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):s[o]=r,s}function Yr(s){var o=Zr(s,"string");return typeof o=="symbol"?o:String(o)}function Zr(s,o){if(typeof s!="object"||s===null)return s;var r=s[Symbol.toPrimitive];if(r!==void 0){var l=r.call(s,o||"default");if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(s)}class Qr extends xe{constructor(o,r){var l;super(),Ce(this,"data",void 0),Ce(this,"columnHeaders",void 0),Ce(this,"numberOfColumns",void 0),this.data=o,this.numberOfColumns=Math.max(...o.map(t=>t.length),(l=r?.length)!==null&&l!==void 0?l:0),this.columnHeaders=r}get rowCount(){return this.data.length}get columnCount(){return this.numberOfColumns}textForCell(o,r){var l;return"".concat((l=this.data[r])===null||l===void 0?void 0:l[o])}textForColumnHeader(o){var r,l;return(r=(l=this.columnHeaders)===null||l===void 0?void 0:l[o])!==null&&r!==void 0?r:""}}const Jr=Qr;function Se(s,o,r){return o=el(o),o in s?Object.defineProperty(s,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):s[o]=r,s}function el(s){var o=ol(s,"string");return typeof o=="symbol"?o:String(o)}function ol(s,o){if(typeof s!="object"||s===null)return s;var r=s[Symbol.toPrimitive];if(r!==void 0){var l=r.call(s,o||"default");if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(s)}class rl extends xe{constructor(o,r){super(),Se(this,"numberOfColumns",void 0),Se(this,"numberOfRows",void 0),Se(this,"viewportData",void 0),this.numberOfColumns=o,this.numberOfRows=r}get columnCount(){return this.numberOfColumns}get rowCount(){return this.numberOfRows}textForCell(o,r){var l,t,a,c,i,n,h,d=r-((l=(t=this.viewportData)===null||t===void 0?void 0:t.rowOffset)!==null&&l!==void 0?l:0),g=o-((a=(c=this.viewportData)===null||c===void 0?void 0:c.columnOffset)!==null&&a!==void 0?a:0);return"".concat((i=(n=this.viewportData)===null||n===void 0||(h=n.data[d])===null||h===void 0?void 0:h[g])!==null&&i!==void 0?i:"")}textForColumnHeader(o){return"".concat(o)}textForRowHeader(o){return"".concat(o)}}const ll=rl;function T(s,o,r){return o=sl(o),o in s?Object.defineProperty(s,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):s[o]=r,s}function sl(s){var o=tl(s,"string");return typeof o=="symbol"?o:String(o)}function tl(s,o){if(typeof s!="object"||s===null)return s;var r=s[Symbol.toPrimitive];if(r!==void 0){var l=r.call(s,o||"default");if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(s)}var al="proportional",cl=To.positiveBarColor,nl=To.negativeBarColor,dl="beside",il="LTR",hl="right";function ul(s){return Array.isArray(s)&&s.every(o=>typeof o=="number")}class gl extends xe{constructor(o){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Map,l=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,i=arguments.length>6&&arguments[6]!==void 0?arguments[6]:new Map,n=arguments.length>7&&arguments[7]!==void 0?arguments[7]:new Map,h=arguments.length>8&&arguments[8]!==void 0?arguments[8]:new Map;super(),T(this,"numberOfColumns",void 0),T(this,"numberOfRows",void 0),T(this,"data",void 0),T(this,"columnMins",void 0),T(this,"columnMaxs",void 0),T(this,"columnAxes",void 0),T(this,"valuePlacements",void 0),T(this,"directions",void 0),T(this,"positiveColors",void 0),T(this,"negativeColors",void 0),T(this,"opacities",void 0),T(this,"textAlignments",void 0),T(this,"markers",void 0),this.positiveColors=l,this.negativeColors=t,this.data=o,this.columnAxes=r,this.valuePlacements=a,this.opacities=c,this.directions=i,this.textAlignments=n,this.markers=h,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];ul(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 l;return"".concat((l=this.data[o])===null||l===void 0?void 0:l[r])}textForColumnHeader(o){return"".concat(o)}textAlignForCell(o,r){var l;return(l=this.textAlignments.get(o))!==null&&l!==void 0?l:hl}renderTypeForCell(o,r){return o<20||o%2===r%2?"dataBar":"text"}dataBarOptionsForCell(o,r){var l,t,a,c,i,n,h,d=Ke(this.columnMins,o),g=Ke(this.columnMaxs,o),m=(l=this.columnAxes.get(o))!==null&&l!==void 0?l:al,v=(t=this.valuePlacements.get(o))!==null&&t!==void 0?t:dl,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:il,F=(c=this.positiveColors.get(o))!==null&&c!==void 0?c:cl,le=(i=this.negativeColors.get(o))!==null&&i!==void 0?i:nl,O=Number((n=this.data[o])===null||n===void 0?void 0:n[r]),H=O>=0?F:le,ue=(h=this.markers.get(o))!==null&&h!==void 0?h:[];return{columnMin:d,columnMax:g,axis:m,color:H,valuePlacement:v,opacity:f,markers:ue,direction:y,value:O}}}const ml=gl,Te="hide-from-e2e-tests",co="sample-section";function*Eo(s=1){for(;;)s=s*16807%2147483647,yield s/2147483647}function vl(s=1){const[o]=u.useState(()=>Eo(s));return u.useCallback(()=>{const r=o.next();if(r.done===!0)throw new Error("Random number generator unexpectedly finished");return r.value},[o])}function x(s,o=[]){const r=`${co}-${s.toLocaleLowerCase().replaceAll(" ","-")}`,l=G(co,...o);return{id:r,className:l}}function N(s,o=[]){const{id:r,className:l}=x(s,o);return{id:r,UNSAFE_className:l}}function M(){}class Z extends u.Component{static renderButtonBrand(o,r){const l=o.length?`btn-${o}-${r}`:`btn-${r}`;return e.jsx(mr,{className:l,style:{marginBottom:"1rem",marginRight:"1rem"},children:r},r)}static renderButtons(o){const r=["primary","secondary","success","warning","danger","info"].map(l=>Z.renderButtonBrand(o,l));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,l])=>e.jsxs("a",{className:`text-${r}`,children:[r," (",l,")"]},r))})]})}static renderSocketedButtons(){return e.jsxs("div",{...x("buttons-socketed"),children:[e.jsx("h5",{children:"Socketed Buttons (for linker)"}),e.jsx(te,{style:{marginBottom:"1rem",marginRight:"1rem"},onClick:M,children:"Unlinked"}),e.jsx(te,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,onClick:M,children:"Linked"}),e.jsx(te,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinkedSource:!0,onClick:M,children:"Linked Source"}),e.jsx(te,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,isInvalid:!0,onClick:M,children:"Error"}),e.jsx(te,{style:{marginBottom:"1rem",marginRight:"1rem"},disabled:!0,onClick:M,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:U,tooltip:"test",onClick:M}),"Toggle button (class active):",e.jsx(p,{className:"mx-2",onClick:()=>{this.setState({toggle:!o})},active:o,kind:"inline",icon:U,tooltip:"test"}),"Disabled:",e.jsx(p,{className:"mx-2",kind:"inline",disabled:!0,onClick:M,children:"Disabled"}),"With Text:",e.jsx(p,{className:"mx-2",kind:"inline",icon:U,onClick:M,children:e.jsx("span",{children:"Text Button"})}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("span",{children:"btn-link-icon (no text):"}),e.jsx(p,{kind:"ghost",icon:U,tooltip:"test",onClick:M}),e.jsx("span",{className:"mx-2",children:"btn-link:"}),e.jsx(p,{kind:"ghost",onClick:M,children:"Text Button"}),e.jsx("span",{className:"mx-2",children:"btn-link (text w/ optional with icon):"}),e.jsx(p,{kind:"ghost",icon:U,onClick:M,children:"Text Button"})]})}render(){const o=["","outline"].map(a=>Z.renderButtons(a)),r=this.renderInlineButtons(),l=Z.renderSocketedButtons(),t=Z.renderLinks();return e.jsxs("div",{children:[e.jsx("h2",{className:"ui-title",children:"Buttons"}),e.jsxs("div",{style:{padding:"1rem 0"},children:[o,r,l,t]})]})}}function pl(){const s=No();to.random=vl();const[o]=u.useState(()=>new to(s));return e.jsxs("div",{...x("charts"),children:[e.jsx("h2",{className:"ui-title",children:"Chart"}),e.jsx("div",{style:{height:500},children:e.jsx(vr,{model:o})})]})}const Be="2px solid var(--dh-color-notice-bg)",xl={"--dh-color-black":"gray","--dh-color-white":"gray","--dh-color-border":"General","--dh-color-bg":"General","--dh-color-surface-bg":"General","--dh-color-fg":"General","--dh-color-content-bg":"General","--dh-color-subdued-content-bg":"General","--dh-color-dropshadow":"General","--dh-color-keyboard-selected-bg":"Misc","--dh-color-hover-border":"Misc","--dh-color-visual-positive":"Visual Status","--dh-color-visual-negative":"Visual Status","--dh-color-visual-notice":"Visual Status","--dh-color-visual-info":"Visual Status","--dh-color-gray-bg":"Default Background","--dh-color-red-bg":"Default Background","--dh-color-orange-bg":"Default Background","--dh-color-yellow-bg":"Default Background","--dh-color-chartreuse-bg":"Default Background","--dh-color-celery-bg":"Default Background","--dh-color-green-bg":"Default Background","--dh-color-seafoam-bg":"Default Background","--dh-color-cyan-bg":"Default Background","--dh-color-blue-bg":"Default Background","--dh-color-indigo-bg":"Default Background","--dh-color-purple-bg":"Default Background","--dh-color-fuchsia-bg":"Default Background","--dh-color-magenta-bg":"Default Background","--dh-color-editor-bg":"editor","--dh-color-editor-fg":"editor","--dh-color-editor-context-menu-bg":"menus","--dh-color-editor-context-menu-fg":"menus","--dh-color-editor-menu-selection-bg":"menus","--dh-color-grid-bg":"grid","--dh-color-grid-number-positive":"Data Types","--dh-color-grid-number-negative":"Data Types","--dh-color-grid-number-zero":"Data Types","--dh-color-grid-date":"Data Types","--dh-color-grid-string-null":"Data Types"},no={"--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"},fl={palette:{black:"gray",white:"gray"},editor:{line:"editor",comment:"code",string:"code",number:"code",delimiter:"code",identifier:"code",keyword:"code",operator:"code",storage:"code",predefined:"code",selection:"state",focus:"state"},chart:{axis:"Chart",bg:"Chart",grid:"Chart",plot:"Chart",title:"Chart",active:"Data",trend:"Data",area:"Data",range:"Data",line:"Deprecated"},grid:{data:"Data Bars",context:"Context Menu"},semantic:{},component:{}};function de(s){const o=Q.parseRgba(Q.asRgbOrRgbaString(s)??"");if(o==null||o.a<.5)return"white";const{r,g:l,b:t}=o;return Q.getBrightness([r,l,t])>=128?"black":"white"}function bl(s){const o=getComputedStyle(document.documentElement);return s.split(/[\n;]/g).map(l=>/^(?:\s{2}|:root\{)?(--dh-color-(?:[^:]+))/.exec(l)?.[1]).filter(l=>!!l).map(l=>{const t=o.getPropertyValue(l);return l==="--dh-color-chart-colorway"?t.split("hsl").filter(Boolean).map(c=>`hsl${c.trim()}`).map((c,i)=>({name:`${l}-${i}`,value:c})):{name:l,value:t}}).flat()}function Y(s,o,r,l=xl){const t=fl[s];return bl(o).reduce((i,{name:n,value:h})=>{if(/^--dh-color-(.*?)-hsl$/.test(n)||/^--dh-color-gray-(light|mid|dark)$/.test(n))return i;const d=/^--dh-color-([^-]+)(?:-([^-]+))?/.exec(n);let g=l[n]??d?.[r]??d?.[1]??"???";if(g=t[g]??g,i[g]==null&&(i[g]=[]),n in no&&i[g].push({isLabel:!0,name:no[n],value:""}),/^--dh-color-gray-(light|mid|dark)$/.test(n))return i;const m={"--dh-color-gray-900":"light","--dh-color-gray-600":"mid","--dh-color-gray-300":"dark"}[n];return i[g].push({name:n,value:h,note:m}),i},{})}function yl(){const s=u.useRef(null);return u.useLayoutEffect(()=>{if(s.current==null)return;const o=getComputedStyle(s.current),{backgroundColor:r}=o;s.current.style.color=de(r)},[]),s}function jl(s,o){const[r,l]=u.useState();return u.useEffect(()=>{if(s.current==null)return;const t=getComputedStyle(s.current,o).getPropertyValue("content"),a=/"(--dh-color-.*?)[,"]/.exec(t)?.[1];if(a==null)return;const c=getComputedStyle(s.current).getPropertyValue(a);l(c)},[s,o]),r}function ke({className:s,children:o}){const r=yl(),l=jl(r,":after"),t=u.useMemo(()=>l!=null?{value:l,normalized:Q.normalizeCssColor(l,!0)}:null,[l]),a=t!=null&&t.value!=="";return e.jsxs("div",{ref:r,className:s,style:{border:a?void 0:Be},children:[a&&e.jsxs(J,{interactive:!0,children:[e.jsx("div",{children:t.value}),e.jsx("div",{children:t.normalized})]}),o]})}function wl(){const s=["100","200","300","400","500","600","700","800","850","8XX","900"].map(l=>e.jsx(ke,{className:G("swatch","gray-swatch",`gray-swatch-${l}`),children:l==="8XX"?"N/A":`Gray-${l}`},l)),o=["red","orange","yellow","green","blue","purple","white","black"].map(l=>e.jsx(ke,{className:G("swatch",`swatch-${l}`),children:l},l)),r=["content-bg","background","foreground","primary","primary-dark","secondary","secondary-hover","success","info","warning","danger","danger-hover"].map(l=>e.jsx(ke,{className:G("swatch",`swatch-${l}`),children:l},l));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:[s,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 Cl 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:Ve,action:()=>{alert(`Alert${r}!`)},shortcut:new ee({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[$.CTRL,A.A],macShortcut:[$.CMD,A.A]})},{title:`Log Message${r}`,icon:Ue,action:()=>{console.log(`Logging a message${r}!`)},shortcut:new ee({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[$.CTRL,A.L],macShortcut:[$.CMD,A.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(),l=[{title:"Show Shortcuts",icon:Co,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new ee({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[$.CTRL,A.SLASH],macShortcut:[$.CMD,A.SLASH]}),group:ge.groups.global}].concat(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(ge,{actions:l})]}),e.jsxs(p,{kind:"tertiary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(ge,{actions:t})]})]})}}class Sl extends u.Component{constructor(o){super(o),this.sampleInput=he.createRef(),this.handleUpdateCheckboxMap=this.handleUpdateCheckboxMap.bind(this);const r=["Parent A",new Map([["Child 1",!0],["Child 2",!1]])],l=["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,l,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(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($r,{menuText:"Checkbox Menu",valueMap:r,onUpdateValueMap:this.handleUpdateCheckboxMap})]})}}class Tl extends u.Component{constructor(o){super(o),this.state={isShown:!1}}render(){const o=[{title:"Show Alert",icon:Ve,action:()=>{alert("Alert!")},shortcut:new ee({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[$.CTRL,A.A],macShortcut:[$.CMD,A.A]})},{title:"Log Message",icon:Ue,action:()=>{console.log("Logging a message!")},shortcut:new ee({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[$.CTRL,A.L],macShortcut:[$.CMD,A.L]})}],l=[{title:"Show Shortcuts",icon:Co,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new ee({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[$.CTRL,A.SLASH],macShortcut:[$.CMD,A.SLASH]}),group:ge.groups.global}].concat(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:cr,onClick:()=>{},children:e.jsx(eo,{actions:l})}),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(eo,{isShown:t,onMenuClosed:()=>{this.setState({isShown:!1})},actions:l})]})]})}}const kl=`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
|
`,ns="_themeColorsPalette_1u45s_1",ds="_swatch_1u45s_7",is="_themeColors_1u45s_1",hs="_label_1u45s_21",us="_capitalize_1u45s_29",V={themeColorsPalette:ns,swatch:ds,themeColors:is,label:hs,capitalize:us};function gs(){return{"Theme Color Palette":Y("palette",rs,1),"Semantic Colors":Y("semantic",ls,1),"Chart Colors":Y("chart",ss,2),"Editor Colors":Y("editor",ts,2),"Grid Colors":Y("grid",as,2),"Component Colors":Y("component",cs,1)}}function ms(){const{selectedThemeKey:s}=Do(),o=u.useMemo(gs,[s]);return e.jsx(e.Fragment,{children:Object.entries(o).map(([r,l],t)=>r==="Theme Color Palette"?e.jsxs("div",{...x(r),children:[e.jsx("h2",{className:"ui-title",children:r}),e.jsx("div",{className:V.themeColorsPalette,children:Object.entries(l).map(([a,c],i)=>e.jsxs(u.Fragment,{children:[(i===0||i===1)&&c.map(({name:n},h)=>e.jsx("div",{style:{gridColumnStart:h+2,textAlign:"center"},className:"mt-3",children:n.split("-").pop()},n)),e.jsx("div",{className:"text-right pr-2",children:a}),c.map(({name:n,value:h})=>e.jsxs("div",{style:{backgroundColor:h,border:h===""&&n.length>0?Be:void 0,color:`var(--dh-color-${de(h)})`},className:G(V.swatch,"px-0"),children:[e.jsxs(J,{interactive:!0,children:[e.jsx("div",{children:n}),e.jsx("div",{children:h}),e.jsx("div",{children:Q.normalizeCssColor(h,!0)})]}),e.jsx(so,{copy:n,style:{color:`var(--dh-color-${de(h)})`}})]},n))]},a))})]},r):e.jsxs("div",{...x(r),children:[e.jsx("h2",{className:"ui-title",children:r}),e.jsx("div",{className:V.themeColors,children:Object.entries(l).map(([a,c])=>e.jsxs("div",{style:{gridRow:`span ${c.length+1}`},children:[e.jsx("span",{className:G(V.label,V.capitalize),children:a}),c.map(({isLabel:i,name:n,value:h,note:d})=>i===!0?e.jsx("span",{className:V.label,children:n},n):e.jsxs("div",{className:V.swatch,style:{backgroundColor:h,border:h===""&&n.length>0?Be:void 0,color:`var(--dh-color-${de(h)})`},children:[e.jsxs(J,{interactive:!0,children:[e.jsx("div",{children:n}),e.jsx("div",{children:h}),e.jsx("div",{children:Q.normalizeCssColor(h,!0)})]}),e.jsx("span",{children:n.replace("--dh-color-","")}),n.endsWith("-hue")||d!=null?e.jsx("span",{children:d??h}):null,e.jsx(so,{copy:n,style:{color:`var(--dh-color-${de(h)})`}})]},n))]},a))})]},r))})}const Ae="data-menu-category",vs="data-no-menu",ps="sample-section-e2e-ignore",$o="spectrum-component-samples",Ao="spectrum-comparison-samples";function xs(){return e.jsxs("div",{id:$o,children:[e.jsx("h2",{className:"ui-title","data-no-menu":!0,children:"Spectrum Components"}),e.jsxs(P,{gap:20,columns:jo("0px","1fr"),children:[e.jsxs(D,{...N("spectrum-buttons"),children:[e.jsx("h3",{children:"Buttons"}),e.jsx(fs,{})]}),e.jsxs(D,{...N("spectrum-collections"),children:[e.jsx("h3",{children:"Collections"}),e.jsx(ws,{})]}),e.jsxs(D,{...N("spectrum-content"),children:[e.jsx("h3",{children:"Content"}),e.jsx(js,{})]}),e.jsxs(D,{...N("spectrum-forms"),children:[e.jsx("h3",{children:"Forms"}),e.jsx(ys,{})]}),e.jsxs(D,{...N("spectrum-overlays"),children:[e.jsx("h3",{children:"Overlays"}),e.jsxs(C,{gap:"size-160",children:[e.jsx(bs,{}),e.jsxs(Fo,{children:[e.jsx(R,{children:"Dialog Trigger"}),s=>e.jsxs(Oo,{children:[e.jsx(Fe,{children:"Some Heading"}),e.jsx(Vo,{children:"Some Header"}),e.jsx(Uo,{}),e.jsx(Oe,{children:e.jsx(ie,{children:"Are you sure?"})}),e.jsxs(Go,{children:[e.jsx(b,{variant:"secondary",onPress:s,children:"Cancel"}),e.jsx(b,{variant:"accent",onPress:s,children:"Confirm"})]})]})]})]})]}),e.jsxs(D,{...N("spectrum-well"),children:[e.jsx("h3",{children:"Wells"}),e.jsx(Ho,{children:"This is a well."})]})]})]})}function fs(){return e.jsxs(e.Fragment,{children:[e.jsxs(R,{marginBottom:"size-200",children:[e.jsx(oe,{children:e.jsx(k,{icon:U})}),e.jsx(ie,{children:"Icon Button"})]}),e.jsxs(P,{autoFlow:"column",columnGap:"size-250",rowGap:"size-150",columns:Me(4,jo(0,"size-2000")),rows:Me(8,"size-400"),children:[e.jsx("label",{children:'Button style="outline"'}),e.jsx(b,{variant:"primary",style:"outline",children:"Primary"}),e.jsx(b,{variant:"secondary",style:"outline",children:"Secondary"}),e.jsx(b,{variant:"accent",style:"outline",children:"Accent"}),e.jsx(b,{variant:"negative",style:"outline",children:"Negative"}),e.jsx(b,{variant:"primary",staticColor:"black",style:"outline",children:"Static Black"}),e.jsx(b,{variant:"primary",staticColor:"white",style:"outline",children:"Static White"}),e.jsx(b,{variant:"primary",isDisabled:!0,style:"outline",children:"Disabled"}),e.jsx("label",{children:'Button style="fill"'}),e.jsx(b,{variant:"primary",style:"fill",children:"Primary"}),e.jsx(b,{variant:"secondary",style:"fill",children:"Secondary"}),e.jsx(b,{variant:"accent",style:"fill",children:"Accent"}),e.jsx(b,{variant:"negative",style:"fill",children:"Negative"}),e.jsx(b,{variant:"primary",staticColor:"black",style:"fill",children:"Static Black"}),e.jsx(b,{variant:"primary",staticColor:"white",style:"fill",children:"Static White"}),e.jsx(b,{variant:"primary",isDisabled:!0,style:"fill",children:"Disabled"}),e.jsx("label",{children:"Action Button"}),e.jsx(R,{children:"Normal"}),e.jsx(R,{gridRow:"span 3",isQuiet:!0,children:"Quiet"}),e.jsx(R,{staticColor:"black",children:"Static Black"}),e.jsx(R,{staticColor:"white",children:"Static White"}),e.jsx(R,{isDisabled:!0,children:"Disabled"}),e.jsx("label",{children:"Toggle Button"}),e.jsx(z,{children:"Normal"}),e.jsx(z,{isQuiet:!0,children:"Quiet"}),e.jsx(z,{gridRow:"span 2",isEmphasized:!0,children:"Emphasized"}),e.jsx(z,{staticColor:"black",children:"Static Black"}),e.jsx(z,{staticColor:"white",children:"Static White"}),e.jsx(z,{isDisabled:!0,children:"Disabled"})]})]})}function bs(){return e.jsxs(e.Fragment,{children:[e.jsx(ie,{children:"Contextual Help"}),e.jsxs(zo,{variant:"info",children:[e.jsx(Fe,{children:"Need help?"}),e.jsx(Oe,{children:e.jsx(ie,{children:"This is a helpful description of the thing you need help with."})})]})]})}function ys(){return e.jsx(Wo,{children:e.jsxs(P,{gap:20,columns:Me("auto-fit","210px"),alignItems:"end",children:[e.jsx(Re,{label:"Text Field"}),e.jsxs(wo,{label:"Combobox",menuTrigger:"focus",defaultSelectedKey:"two",children:[e.jsx(S,{children:"One"},"one"),e.jsx(S,{children:"Two"},"two"),e.jsx(S,{children:"Three"},"three")]}),e.jsx(Pe,{children:"Checkbox"}),e.jsx(qo,{label:"Slider",defaultValue:24}),e.jsx(Ko,{children:"Switch"})]})})}function js(){return e.jsxs(Xo,{children:[e.jsx(oe,{size:"XL",children:e.jsx(k,{icon:ir})}),e.jsx(Fe,{children:"Illustrated Message"}),e.jsx(Oe,{children:"This is the content of the message."})]})}function ws(){return e.jsxs(e.Fragment,{children:[e.jsx("label",{id:"table-view-sample",children:"List View"}),e.jsxs(Yo,{"aria-labelledby":"table-view-sample",selectionMode:"multiple",maxWidth:"size-6000",marginBottom:"size-200",children:[e.jsx(S,{children:"One"}),e.jsx(S,{children:"Two"}),e.jsx(S,{children:"Three"}),e.jsx(S,{children:"Four"})]}),e.jsx("label",{id:"table-view-sample",children:"Table View"}),e.jsxs(Zo,{"aria-labelledby":"table-view-sample",selectionMode:"multiple",children:[e.jsxs(Qo,{children:[e.jsxs(W,{title:"Person",children:[e.jsx(W,{allowsResizing:!0,children:"Name"}),e.jsx(W,{children:"Age"})]}),e.jsxs(W,{title:"Address",children:[e.jsx(W,{allowsResizing:!0,children:"City"}),e.jsx(W,{children:"State"})]})]}),e.jsxs(Jo,{children:[e.jsxs(fe,{children:[e.jsx(I,{children:"John"}),e.jsx(I,{children:"42"}),e.jsx(I,{children:"San Francisco"}),e.jsx(I,{children:"CA"})]}),e.jsxs(fe,{children:[e.jsx(I,{children:"Jane"}),e.jsx(I,{children:"38"}),e.jsx(I,{children:"San Francisco"}),e.jsx(I,{children:"CA"})]}),e.jsxs(fe,{children:[e.jsx(I,{children:"Becky"}),e.jsx(I,{children:"12"}),e.jsx(I,{children:"San Francisco"}),e.jsx(I,{children:"CA"})]})]})]})]})}function ce(s){return e.jsx("div",{...s})}function Cs(){const[s,o]=u.useState([]);u.useEffect(()=>{let l={category:"",items:[]};const t=[l],a=document.querySelector(`#${$o}`),c=document.querySelector(`#${Ao}`);document.querySelectorAll(`h2,h3,[${Ae}]`).forEach(i=>{if(i.textContent==null||i.hasAttribute(vs))return;if(i.hasAttribute(Ae)){l={category:i.getAttribute(Ae)??"",items:[]},t.push(l);return}const h=`${a?.contains(i)===!0?"spectrum-":c?.contains(i)===!0?"spectrum-compare-":""}${i.textContent}`.toLowerCase().replace(/\s/g,"-");i.id=h,l.items.push({id:h,label:i.textContent})}),o(t)},[]),u.useEffect(()=>{const l=window.location.hash===""?null:document.querySelector(window.location.hash);setTimeout(()=>{l?l.scrollIntoView():window.scrollTo({top:0,behavior:"auto"})},0)},[]);const r=u.useCallback(l=>{const t=String(l);document.getElementById(t)?.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{window.location.hash=t},1e3)},[]);return e.jsxs(er,{children:[e.jsx(R,{children:e.jsx(oe,{children:e.jsx(k,{icon:hr})})}),e.jsx(or,{items:s,onAction:r,children:({category:l,items:t})=>e.jsx(rr,{items:t,title:l,children:({id:a,label:c})=>e.jsx(S,{children:c},a)},l)})]})}function Ss(){const s=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(b,{UNSAFE_className:"goto-top-button",variant:"accent",onPress:s,children:e.jsx(oe,{children:e.jsx(k,{icon:ur})})})}const Ts=["Tab 1","Tab 2","Tab 3"];function ks({isActive:s,title:o}){return e.jsxs("li",{className:G("lm_tab",s&&"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 Ns(){return e.jsxs("div",{...x("golden-layout"),children:[e.jsx("h2",{className:"ui-title",children:"Golden Layout"}),[!1,!0].map(s=>e.jsxs(he.Fragment,{children:[e.jsx("h5",{children:s?"Minimized":"Maximised"}),e.jsx("div",{style:{position:"relative",border:"none"},className:s?"lm_maximised":void 0,children:e.jsxs("div",{className:"lm_header",children:[e.jsx("ul",{className:"lm_tabs",children:Ts.map((o,r)=>e.jsx(ks,{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(s)))]})}function Ds(){return e.jsxs("div",{...x("animations",["sample-section-e2e-ignore"]),children:[e.jsx("h2",{className:"ui-title",children:"Animations"}),e.jsx(D,{position:"relative",height:400,children:e.jsx(Br,{})})]})}const fo=[["primary","accent"],["secondary","primary"],["danger","negative"]],Es=[{title:"One",value:"1"},{title:"Two",value:"2"},{title:"Three",value:"3"}];function Is(){const[s,o]=u.useState(!1),[r,l]=u.useState("1"),t=u.useCallback(a=>{l(a.target.value)},[]);return e.jsxs("div",{...x(Ao,[ps]),children:[e.jsx("h2",{className:"ui-title","data-no-menu":!0,children:"Bootstrap / Spectrum Comparison"}),e.jsxs(C,{gap:20,wrap:!0,children:[e.jsxs(D,{children:[e.jsx("h3",{children:"Buttons - Filled"}),e.jsxs(P,{gap:20,columns:"repeat(2, 120px)",autoRows:"40x",justifyItems:"start",alignItems:"start",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),fo.map(([a,c])=>e.jsxs(u.Fragment,{children:[e.jsx(p,{onClick:X,kind:a,icon:Qe,children:"Button"}),e.jsxs(b,{variant:c,style:"fill",children:[e.jsx(oe,{children:e.jsx(k,{icon:Qe})}),e.jsx(ie,{children:"Button"})]})]},a)),e.jsx(p,{onClick:X,kind:"primary",disabled:!0,children:"Disabled"}),e.jsx(b,{variant:"accent",style:"fill",isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(D,{children:[e.jsx("h3",{children:"Buttons - Outline"}),e.jsxs(P,{gap:20,columns:"repeat(2, 120px)",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),fo.map(([a,c])=>e.jsxs(u.Fragment,{children:[e.jsx(p,{onClick:X,kind:a,children:a}),e.jsx(b,{variant:c,style:"outline",children:c})]},a)),e.jsx(p,{onClick:X,kind:"secondary",disabled:!0,children:"Disabled"}),e.jsx(b,{variant:"primary",style:"outline",isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(D,{children:[e.jsx("h3",{children:"Action Buttons"}),e.jsxs(P,{gap:20,columns:"repeat(2, 120px)",autoRows:"40x",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),e.jsx(p,{onClick:X,kind:"inline",children:"Inline"}),e.jsx(R,{children:"Action"}),e.jsx(p,{onClick:X,kind:"inline",disabled:!0,children:"Disabled"}),e.jsx(R,{isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(D,{children:[e.jsx("h3",{children:"Pickers"}),e.jsxs(P,{gap:20,columns:"repeat(2, 192px)",autoRows:"40x",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),[!1,!0].map(a=>e.jsxs(u.Fragment,{children:[e.jsxs("div",{children:[e.jsxs("label",{className:"input-label",children:[a?"Disabled ":"","Combobox"]}),e.jsx(_e,{disabled:a,options:Es,defaultValue:"One"})]}),e.jsxs(wo,{isDisabled:a,label:a?"Disabled Combobox":"Combobox",inputValue:"One",children:[e.jsx(S,{children:"One"},"1"),e.jsx(S,{children:"Two"},"2"),e.jsx(S,{children:"Three"},"3")]})]},String(a))),[!1,!0].map(a=>e.jsxs(u.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"input-label",children:"Select"}),e.jsxs(me,{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(lr,{isDisabled:a,label:a?"Disabled Picker":"Picker",placeholder:"Picker",children:[e.jsx(S,{children:"One"},"1"),e.jsx(S,{children:"Two"},"2"),e.jsx(S,{children:"Three"},"3")]})]},String(a)))]})]}),e.jsxs(D,{children:[e.jsx("h3",{children:"Text Field"}),e.jsxs(P,{gap:20,columns:"repeat(2, 192px)",autoRows:"40x",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),e.jsxs("div",{children:[e.jsx("label",{className:"input-label",children:"type=text"}),e.jsx("input",{type:"text",className:"form-control",placeholder:"Text Input"})]}),e.jsx(Re,{type:"text",label:"TextField"}),e.jsxs("div",{children:[e.jsx("label",{className:"input-label",children:"Disabled"}),e.jsx("input",{type:"text",className:"form-control",disabled:!0,value:"Disabled"})]}),e.jsx(Re,{type:"text",label:"Disabled",isDisabled:!0,value:"Disabled"})]})]}),e.jsxs(D,{children:[e.jsx("h3",{children:"Checkbox"}),e.jsxs(P,{gap:20,columns:"repeat(2, 120px)",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),e.jsx(L,{className:"form-group",checked:s,onChange:()=>o(a=>!a),children:"Checkbox"}),e.jsx(Pe,{children:"Checkbox"}),e.jsx(L,{className:"form-group",disabled:!0,checked:s,onChange:()=>o(a=>!a),children:"Disabled"}),e.jsx(Pe,{isDisabled:!0,children:"Disabled"}),e.jsx(C,{direction:"column",children:e.jsxs("label",{children:["Radio Group",e.jsxs(ko,{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(sr,{label:"Radio Group",value:r,onChange:l,children:[e.jsx(be,{value:"1",children:"One"}),e.jsx(be,{value:"2",children:"Two"}),e.jsx(be,{value:"3",children:"Three"})]})]})]})]})]})}const bo={position:"sticky",justifyContent:"end",zIndex:1,UNSAFE_style:{float:"right"}};function $s(){const s=window.location.search.includes("isolateSection=true"),{themes:o}=Do(),r=o.length>1;return e.jsx("div",{tabIndex:-1,role:"main",children:e.jsxs("div",{className:"container style-guide-container",children:[s&&e.jsx("style",{children:`.${Te}, .sample-section:not(${window.location.hash}), :not(.sample-section) > h2 {
|
|
212
212
|
display: none;
|
|
213
213
|
}`}),e.jsx(C,{justifyContent:"space-between",alignItems:"center",marginTop:"2rem",marginBottom:"1rem",children:e.jsx("h1",{style:{paddingTop:"2rem"},children:"Deephaven UI Components"})}),e.jsxs(C,{...bo,UNSAFE_className:Te,marginTop:-56,top:20,gap:10,alignItems:"end",children:[r?e.jsx(Vr,{}):null,e.jsx(Cs,{})]}),e.jsx(C,{...bo,UNSAFE_className:Te,top:"calc(100vh - 40px)",marginTop:-32,marginEnd:r?-234:0,children:e.jsx(Ss,{})}),e.jsx(Kl,{}),e.jsx(ce,{"data-menu-category":"Colors"}),e.jsx(wl,{}),e.jsx(ms,{}),e.jsx(ce,{"data-menu-category":"Layout"}),e.jsx(Ns,{}),e.jsx(ce,{"data-menu-category":"Components"}),e.jsx(Z,{}),e.jsx(zl,{}),e.jsx(Vl,{}),e.jsx(Gl,{}),e.jsx(pe,{}),e.jsx(Wl,{}),e.jsx(Sl,{}),e.jsx(Hl,{}),e.jsx(Cl,{}),e.jsx(Tl,{}),e.jsx(os,{}),e.jsx(ql,{}),e.jsx(Fl,{}),e.jsx(Dl,{}),e.jsx(Ll,{}),e.jsx(pl,{}),e.jsx(Nr,{}),e.jsx(Ds,{}),e.jsx(ce,{"data-menu-category":"Spectrum Components"}),e.jsx(xs,{}),e.jsx(ce,{"data-menu-category":"Spectrum Comparison"}),e.jsx(Is,{})]})})}function ze(s){const{workspace:o,setWorkspace:r}=s;return u.useEffect(()=>{Ur.makeDefaultWorkspace({getLayouts:async()=>[],getLayout:async()=>({})}).then(r)},[r]),o!=null?e.jsx($s,{}):null}ze.propTypes={workspace:ve.shape({}),setWorkspace:ve.func.isRequired};ze.defaultProps={workspace:null};const As=s=>({workspace:Gr(s)}),Ms=tr(As,{setWorkspace:Dr})(ze);function zs(){return Er.register(new URL("./download/serviceWorker.js",window.location.href)),Ir.init({getWorker:()=>new gr}),window["__react-beautiful-dnd-disable-dev-warnings"]=!0,e.jsx(Fr,{children:e.jsx(ar,{store:Hr,children:e.jsx(Ms,{})})})}export{zs as StyleGuideRoot,zs as default};
|
|
214
|
-
//# sourceMappingURL=StyleGuideRoot-
|
|
214
|
+
//# sourceMappingURL=StyleGuideRoot-d479ad58.js.map
|