@deephaven/code-studio 0.86.1-beta.0 → 0.86.2-beta.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.
- package/build/assets/{AppRoot-d6529975.js → AppRoot-56511b92.js} +3 -3
- package/build/assets/{AppRoot-d6529975.js.map → AppRoot-56511b92.js.map} +1 -1
- package/build/assets/{Chart-91302dcf.js → Chart-6997e8bb.js} +2 -2
- package/build/assets/{Chart-91302dcf.js.map → Chart-6997e8bb.js.map} +1 -1
- package/build/assets/{ControlType-a12820cc.js → ControlType-69e1fac5.js} +3 -3
- package/build/assets/{ControlType-a12820cc.js.map → ControlType-69e1fac5.js.map} +1 -1
- package/build/assets/{FontBootstrap-f6c0d03d.js → FontBootstrap-26cb4aa5.js} +2 -2
- package/build/assets/{FontBootstrap-f6c0d03d.js.map → FontBootstrap-26cb4aa5.js.map} +1 -1
- package/build/assets/{FormatterUtils-d09cd5a2.js → FormatterUtils-59e8cebb.js} +2 -2
- package/build/assets/{FormatterUtils-d09cd5a2.js.map → FormatterUtils-59e8cebb.js.map} +1 -1
- package/build/assets/{Grid-fef80846.js → Grid-7d3b8fcc.js} +2 -2
- package/build/assets/{Grid-fef80846.js.map → Grid-7d3b8fcc.js.map} +1 -1
- package/build/assets/{IrisGrid-4bf5ddc8.js → IrisGrid-f1cafb4e.js} +2 -2
- package/build/assets/{IrisGrid-4bf5ddc8.js.map → IrisGrid-f1cafb4e.js.map} +1 -1
- package/build/assets/{IrisGridModel-538a8746.js → IrisGridModel-ef7fbf31.js} +2 -2
- package/build/assets/{IrisGridModel-538a8746.js.map → IrisGridModel-ef7fbf31.js.map} +1 -1
- package/build/assets/{IrisGridShortcuts-0a8dd775.js → IrisGridShortcuts-e4e2e06e.js} +2 -2
- package/build/assets/{IrisGridShortcuts-0a8dd775.js.map → IrisGridShortcuts-e4e2e06e.js.map} +1 -1
- package/build/assets/{IrisGridThemeProvider-6bbaf5e5.js → IrisGridThemeProvider-0ed2b1a4.js} +2 -2
- package/build/assets/{IrisGridThemeProvider-6bbaf5e5.js.map → IrisGridThemeProvider-0ed2b1a4.js.map} +1 -1
- package/build/assets/{LocalWorkspaceStorage-c474272c.js → LocalWorkspaceStorage-00363c27.js} +2 -2
- package/build/assets/{LocalWorkspaceStorage-c474272c.js.map → LocalWorkspaceStorage-00363c27.js.map} +1 -1
- package/build/assets/{MarkdownEditor-bc7f8b86.js → MarkdownEditor-601f0820.js} +2 -2
- package/build/assets/{MarkdownEditor-bc7f8b86.js.map → MarkdownEditor-601f0820.js.map} +1 -1
- package/build/assets/{MarkdownNotebook-08e7e6b2.js → MarkdownNotebook-fa467ec2.js} +2 -2
- package/build/assets/{MarkdownNotebook-08e7e6b2.js.map → MarkdownNotebook-fa467ec2.js.map} +1 -1
- package/build/assets/{MissingPartitionError-ccd1b92c.js → MissingPartitionError-f67c33ed.js} +2 -2
- package/build/assets/{MissingPartitionError-ccd1b92c.js.map → MissingPartitionError-f67c33ed.js.map} +1 -1
- package/build/assets/{StyleGuideRoot-5adc572a.js → StyleGuideRoot-3a96cd30.js} +2 -2
- package/build/assets/{StyleGuideRoot-5adc572a.js.map → StyleGuideRoot-3a96cd30.js.map} +1 -1
- package/build/assets/{TokenBoxCellRenderer-fc88dfbc.js → TokenBoxCellRenderer-21fe6e70.js} +2 -2
- package/build/assets/{TokenBoxCellRenderer-fc88dfbc.js.map → TokenBoxCellRenderer-21fe6e70.js.map} +1 -1
- package/build/assets/{index-e1b9aa32.js → index-97d9bf03.js} +2 -2
- package/build/assets/{index-e1b9aa32.js.map → index-97d9bf03.js.map} +1 -1
- package/build/assets/{index-ec91dba2.js → index-bdc5e9b2.js} +2 -2
- package/build/assets/{index-ec91dba2.js.map → index-bdc5e9b2.js.map} +1 -1
- package/build/assets/{index-cd00d63a.js → index-f0d0452f.js} +6 -6
- package/build/assets/index-f0d0452f.js.map +1 -0
- package/build/index.html +2 -2
- package/package.json +30 -30
- package/build/assets/index-cd00d63a.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,aj as v,K as H,I as e,af as Fe,ax as k,M as me,a2 as Ao,V as ye,L as C,ab as R,aM as Mo,aL as O,U as ro,bb as Yo,az as P,bz as $o,a9 as Qo,aa as _,ac as Jo,bA as er,ad as or,_ as qe,ag as w,a_ as rr,bB as Ve,aZ as Z,Z as tr,ae as sr,aX as Oe,ak as ar,aQ as Ue,aP as lr,$ as nr,al as ir,bC as cr,bD as dr,bE as hr,bF as Y,bG as ur,bH as ke,bI as D,aG as mr,bJ as gr,bK as xr,b9 as pr,Q as vr,a8 as fr}from"./vendor-6520fd55.js";import{aW as to,aX as K,aY as q,aM as fe,a1 as br,aZ as Xe,a_ as Ze,a$ as Ro,aE as jr,b0 as so,b1 as ao,b2 as lo,Q as He,b3 as yr,b4 as wr,I as Cr,b5 as Sr,b6 as kr,aH as no,b7 as Ge,am as Tr,f as Nr,b8 as Ir}from"./index-ec91dba2.js";import{W as Er}from"./monaco-b5248072.js";import{e as Ce,G as Lo,m as Q,S as le,L as Dr,d as Te,I as Ar,c as Mr,a as Ne}from"./IrisGridModel-538a8746.js";import{B as p,u as Po,s as re,q as te,aP as M,K as $,al as be,aj as $r,N as io,cF as co,V as Rr,C as L,aT as pe,S as je,aJ as Lr,am as Pr,d as ho,aZ as _o,J as uo,bx as J,ax as _r,a6 as Br,az as Fr,w as Vr}from"./ControlType-a12820cc.js";import{M as mo,H as Or,A as Ur,T as Hr,D as Gr,d as zr,c as Wr,h as Kr,V as I,g as qr,P as go,C as Xr,L as Ie,e as Zr,E as ee,j as Yr}from"./FontBootstrap-f6c0d03d.js";import{G as se,T as Qr}from"./Grid-fef80846.js";import{a9 as Bo,O as A,C as ze,n as Jr,B as et,o as de,y as xo,E as ot,v as rt,g as tt,P as st,x as at,S as z,z as lt,a3 as nt,L as it,r as ct}from"./TokenBoxCellRenderer-fc88dfbc.js";import{a as po,T as j,D as dt}from"./IrisGridShortcuts-0a8dd775.js";import{N as ht,H as Ye,T as ut,b as mt,j as gt}from"./LocalWorkspaceStorage-c474272c.js";import"./helpers-de833af9.js";function vo(t,o,r,s,a,l,n){try{var i=t[l](n),d=i.value}catch(h){r(h);return}i.done?o(d):Promise.resolve(d).then(s,a)}function Ee(t){return function(){var o=this,r=arguments;return new Promise(function(s,a){var l=t.apply(o,r);function n(d){vo(l,s,a,n,i,"next",d)}function i(d){vo(l,s,a,n,i,"throw",d)}n(void 0)})}}function V(t,o,r){return o=xt(o),o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function xt(t){var o=pt(t,"string");return typeof o=="symbol"?o:String(o)}function pt(t,o){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var s=r.call(t,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(t)}class vt extends Ce{constructor(){var{rowCount:o=1e9,columnCount:r=100,floatingTopRowCount:s=0,floatingBottomRowCount:a=0,floatingLeftColumnCount:l=0,floatingRightColumnCount:n=0,isEditable:i=!1,editedData:d=[]}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),V(this,"numRows",void 0),V(this,"numColumns",void 0),V(this,"floatingTop",void 0),V(this,"floatingBottom",void 0),V(this,"floatingLeft",void 0),V(this,"floatingRight",void 0),V(this,"editable",void 0),V(this,"editedData",void 0),this.numRows=o,this.numColumns=r,this.floatingTop=s,this.floatingBottom=a,this.floatingLeft=l,this.floatingRight=n,this.editable=i,this.editedData=d}get rowCount(){return this.numRows}get columnCount(){return this.numColumns}get floatingTopRowCount(){return this.floatingTop}get floatingBottomRowCount(){return this.floatingBottom}get floatingLeftColumnCount(){return this.floatingLeft}get floatingRightColumnCount(){return this.floatingRight}get isEditable(){return this.editable}textForCell(o,r){var s,a;return(s=(a=this.editedData[o])===null||a===void 0?void 0:a[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 a=this;return Ee(function*(){a.editedData[o]==null&&(a.editedData[o]=[]),a.editedData[o][r]="".concat(s)})()}setValueForRanges(o,r){var s=this;return Ee(function*(){Lo.forEachCell(o,(a,l)=>{s.setValueForCell(a,l,r)})})()}setValues(o){var r=this;return Ee(function*(){for(var s=0;s<o.length;s+=1){var a,l,n=o[s];r.setValueForCell((a=n.column)!==null&&a!==void 0?a:n.x,(l=n.row)!==null&&l!==void 0?l:n.y,n.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 Qe=vt;function T(t,o,r){return o=ft(o),o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function ft(t){var o=bt(t,"string");return typeof o=="symbol"?o:String(o)}function bt(t,o){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var s=r.call(t,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(t)}class E extends Qe{constructor(){var{rowCount:o=E.DEFAULT_ROW_COUNT,columnCount:r=E.DEFAULT_COLUMN_COUNT,children:s=new Map,childRowCount:a=Math.ceil(Math.max(E.MIN_CHILD_ROW_COUNT,o*E.DEFAULT_CHILD_ROW_COUNT_FACTOR)),maxDepth:l=E.MAX_DEPTH}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super({rowCount:o,columnCount:r}),T(this,"children",void 0),T(this,"childRowCount",void 0),T(this,"maxDepth",void 0),T(this,"getCachedModelRowOffset",Q((n,i)=>{for(var d=null,h=i,c=[...n].sort((y,B)=>y[0]-B[0]),m=0;m<c.length;m+=1){var[g,f]=c[m];if(h<=g)break;var b=f.rowCount;if(h<=g+b){d=g,h=h-g-1;break}h-=b}return{key:d,offsetRow:h}})),T(this,"getCachedTextForRowHeader",Q((n,i)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,i);if(d!=null){var c=n.get(d);if(c!==void 0)return"".concat(d,".").concat(c.textForRowHeader(h))}return"".concat(h)})),T(this,"getCachedTextForCell",Q((n,i,d)=>{var{key:h,offsetRow:c}=this.getCachedModelRowOffset(n,d);if(h!=null){var m=n.get(h);if(m!==void 0)return"".concat(h,".").concat(m.textForCell(i,c))}return"".concat(i,",").concat(c)})),T(this,"getCachedIsRowExpandable",Q((n,i,d)=>{var h=this.getCachedDepthForRow(n,i);return h<d})),T(this,"getCachedIsRowExpanded",Q((n,i)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,i);if(d!=null){var c=n.get(d);if(c!==void 0)return c.isRowExpanded(h)}return n.has(h)})),T(this,"getCachedDepthForRow",Q((n,i)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,i);if(d!=null){var c=n.get(d);if(c!==void 0)return c.depthForRow(h)+1}return 0})),this.children=s,this.childRowCount=a,this.maxDepth=l}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:a,offsetRow:l}=this.getCachedModelRowOffset(this.children,o),n=new Map(this.children);if(a!=null){var i=this.children.get(a);if(i!==void 0){var{rowCount:d}=i;i.setRowExpanded(l,r,s),this.numRows+=i.rowCount-d}}else if(r){var c=new E({rowCount:this.childRowCount,columnCount:this.numColumns});n.set(l,c),this.numRows+=c.rowCount}else{var h=n.get(l);h!==void 0&&(this.numRows-=h.rowCount,n.delete(l))}this.children=n}expandAll(){throw new Error("Expand all not implemented.")}collapseAll(){throw new Error("Collapse all not implemented.")}depthForRow(o){return this.getCachedDepthForRow(this.children,o)}}T(E,"DEFAULT_ROW_COUNT",1e9);T(E,"DEFAULT_COLUMN_COUNT",100);T(E,"DEFAULT_CHILD_ROW_COUNT_FACTOR",.01);T(E,"MIN_CHILD_ROW_COUNT",10);T(E,"MAX_DEPTH",10);const Je=E;function De(t,o,r){return o=jt(o),o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function jt(t){var o=yt(t,"string");return typeof o=="symbol"?o:String(o)}function yt(t,o){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var s=r.call(t,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(t)}class wt extends Ce{constructor(o,r){var s;super(),De(this,"data",void 0),De(this,"columnHeaders",void 0),De(this,"numberOfColumns",void 0),this.data=o,this.numberOfColumns=Math.max(...o.map(a=>a.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 Ct=wt;function Ae(t,o,r){return o=St(o),o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function St(t){var o=kt(t,"string");return typeof o=="symbol"?o:String(o)}function kt(t,o){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var s=r.call(t,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(t)}class Tt extends Ce{constructor(o,r){super(),Ae(this,"numberOfColumns",void 0),Ae(this,"numberOfRows",void 0),Ae(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,a,l,n,i,d,h,c=r-((s=(a=this.viewportData)===null||a===void 0?void 0:a.rowOffset)!==null&&s!==void 0?s:0),m=o-((l=(n=this.viewportData)===null||n===void 0?void 0:n.columnOffset)!==null&&l!==void 0?l:0);return"".concat((i=(d=this.viewportData)===null||d===void 0||(h=d.data[c])===null||h===void 0?void 0:h[m])!==null&&i!==void 0?i:"")}textForColumnHeader(o){return"".concat(o)}textForRowHeader(o){return"".concat(o)}}const Nt=Tt;function N(t,o,r){return o=It(o),o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function It(t){var o=Et(t,"string");return typeof o=="symbol"?o:String(o)}function Et(t,o){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var s=r.call(t,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(t)}var Dt="proportional",At=Bo.positiveBarColor,Mt=Bo.negativeBarColor,$t="beside",Rt="LTR",Lt="right";function Pt(t){return Array.isArray(t)&&t.every(o=>typeof o=="number")}class _t extends Ce{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,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:new Map,l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:new Map,n=arguments.length>5&&arguments[5]!==void 0?arguments[5]:new Map,i=arguments.length>6&&arguments[6]!==void 0?arguments[6]:new Map,d=arguments.length>7&&arguments[7]!==void 0?arguments[7]:new Map,h=arguments.length>8&&arguments[8]!==void 0?arguments[8]:new Map;super(),N(this,"numberOfColumns",void 0),N(this,"numberOfRows",void 0),N(this,"data",void 0),N(this,"columnMins",void 0),N(this,"columnMaxs",void 0),N(this,"columnAxes",void 0),N(this,"valuePlacements",void 0),N(this,"directions",void 0),N(this,"positiveColors",void 0),N(this,"negativeColors",void 0),N(this,"opacities",void 0),N(this,"textAlignments",void 0),N(this,"markers",void 0),this.positiveColors=s,this.negativeColors=a,this.data=o,this.columnAxes=r,this.valuePlacements=l,this.opacities=n,this.directions=i,this.textAlignments=d,this.markers=h,this.numberOfRows=Math.max(...o.map(g=>g.length)),this.numberOfColumns=o.length,this.columnMins=new Map,this.columnMaxs=new Map;for(var c=0;c<o.length;c+=1){var m=o[c];Pt(m)&&(this.columnMins.set(c,Math.min(...m)),this.columnMaxs.set(c,Math.max(...m)))}}get rowCount(){return this.numberOfRows}get columnCount(){return this.numberOfColumns}textForCell(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:Lt}renderTypeForCell(o,r){return o<20||o%2===r%2?"dataBar":"text"}dataBarOptionsForCell(o,r){var s,a,l,n,i,d,h,c=to(this.columnMins,o),m=to(this.columnMaxs,o),g=(s=this.columnAxes.get(o))!==null&&s!==void 0?s:Dt,f=(a=this.valuePlacements.get(o))!==null&&a!==void 0?a:$t,b=this.opacities.get(o);b==null||b>1?b=1:b<0&&(b=0);var y=(l=this.directions.get(o))!==null&&l!==void 0?l:Rt,B=(n=this.positiveColors.get(o))!==null&&n!==void 0?n:At,ae=(i=this.negativeColors.get(o))!==null&&i!==void 0?i:Mt,G=Number((d=this.data[o])===null||d===void 0?void 0:d[r]),X=G>=0?B:ae,Se=(h=this.markers.get(o))!==null&&h!==void 0?h:[];return{columnMin:c,columnMax:m,axis:g,color:X,valuePlacement:f,opacity:b,markers:Se,direction:y,value:G}}}const Bt=_t,Ft="isolated-section-query",Fo="sample-section";function*ge(t,o){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",s=r.length;for(let a=t;a<=o;a+=1){const l=a%s;let n=String(Math.floor(a/s));n==="0"&&(n="");const i=r[l],d=`${i}${n}`,h=`${i.repeat(3)}${n}`;yield u.createElement(v,{key:d,textValue:h,children:h})}}function*eo(t,o={}){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",s=r.length,a=Object.keys(K);for(let l=0;l<t;l+=1){const n=l%s;let i=String(Math.floor(l/s));i==="0"&&(i="");const d=r[n],h=`${d}${i}`,c=o.icons===!0?a[l%a.length]:void 0,m=o.descriptions===!0?`Description ${h}`:void 0,g=c??`${d.repeat(3)}${i}`;yield{key:h,item:{key:(l+1)*100,content:g,textValue:g,description:m,icon:c}}}}function*Vo(t=1){for(;;)t=t*16807%2147483647,yield t/2147483647}function fo(){return window.location.search.includes("isolateSection=true")?window.location.hash.replace(/^#/,""):""}function Oo(){const[t,o]=u.useState(fo);return u.useEffect(()=>{const r=()=>o(fo());return window.addEventListener("hashchange",r),()=>window.removeEventListener("hashchange",r)},[]),t}function Vt(t=1){const[o]=u.useState(()=>Vo(t));return u.useCallback(()=>{const r=o.next();if(r.done===!0)throw new Error("Random number generator unexpectedly finished");return r.value},[o])}function Uo(t){return`${Fo}-${t.toLocaleLowerCase().replaceAll(" ","-")}`}function Ho(t,o=[]){const r=Uo(t),s=H(Fo,...o);return{id:r,className:s}}function Ot(t,o=[]){const{id:r,className:s}=Ho(t,o);return{id:r,UNSAFE_className:s}}function x({name:t,className:o="",component:r="div",...s}){const a=Oo(),l=Uo(t);if(!(a===""||a===l))return null;const i=r==="div"?Ho:Ot;return e.jsx(r,{...s,...i(t,[o])})}function S(){}class ue extends u.Component{static renderButtons(){return e.jsxs(e.Fragment,{children:[e.jsx("h5",{children:"Button Kinds"}),e.jsx(x,{name:"buttons-regular",style:{padding:"1rem 0"},children:e.jsxs(Fe,{children:[e.jsx(p,{kind:"primary",onClick:S,children:"Primary"}),e.jsx(p,{kind:"secondary",onClick:S,children:"Secondary"}),e.jsx(p,{kind:"tertiary",onClick:S,children:"Tertiary"}),e.jsx(p,{kind:"success",onClick:S,children:"Success"}),e.jsx(p,{kind:"danger",onClick:S,children:"Danger"}),e.jsx(p,{kind:"inline",onClick:S,children:"Inline"}),e.jsx(p,{kind:"ghost",onClick:S,children:"Ghost"})]})})]})}static renderLinks(){const o={primary:"accent",secondary:"neutral",success:"positive",info:"info",warning:"notice",danger:"negative"};return e.jsxs(x,{name:"links",style:{paddingTop:"1rem"},children:[e.jsx("h5",{children:"Links"}),e.jsx(k,{gap:"1rem",children:Object.entries(o).map(([r,s])=>e.jsxs("a",{className:`text-${r}`,children:[r," (",s,")"]},r))})]})}static renderSocketedButtons(){return e.jsxs(x,{name:"buttons-socketed",children:[e.jsx("h5",{children:"Socketed Buttons (for linker)"}),e.jsxs(Fe,{marginBottom:"1rem",children:[e.jsx(le,{onClick:S,children:"Unlinked"}),e.jsx(le,{isLinked:!0,onClick:S,children:"Linked"}),e.jsx(le,{isLinkedSource:!0,onClick:S,children:"Linked Source"}),e.jsx(le,{isLinked:!0,isInvalid:!0,onClick:S,children:"Error"}),e.jsx(le,{disabled:!0,onClick:S,children:"Disabled"})]})]})}constructor(o){super(o),this.state={toggle:!0}}renderInlineButtons(){const{toggle:o}=this.state;return e.jsxs(x,{name:"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:q,tooltip:"test",onClick:S}),"Toggle button (class active):",e.jsx(p,{className:"mx-2",onClick:()=>{this.setState({toggle:!o})},active:o,kind:"inline",icon:q,tooltip:"test"}),"Disabled:",e.jsx(p,{className:"mx-2",kind:"inline",disabled:!0,onClick:S,children:"Disabled"}),"With Text:",e.jsx(p,{className:"mx-2",kind:"inline",icon:q,onClick:S,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:q,tooltip:"test",onClick:S}),e.jsx("span",{className:"mx-2",children:"btn-link:"}),e.jsx(p,{kind:"ghost",onClick:S,children:"Text Button"}),e.jsx("span",{className:"mx-2",children:"btn-link (text w/ optional with icon):"}),e.jsx(p,{kind:"ghost",icon:q,onClick:S,children:"Text Button"})]})}render(){const o=ue.renderButtons(),r=this.renderInlineButtons(),s=ue.renderSocketedButtons(),a=ue.renderLinks();return e.jsxs("div",{children:[e.jsx("h2",{className:"ui-title",children:"Buttons"}),e.jsxs("div",{style:{padding:"1rem 0"},children:[o,r,s,a]})]})}}function Ut(){const t=Po();mo.random=Vt();const[o]=u.useState(()=>new mo(t));return e.jsxs(x,{name:"charts",children:[e.jsx("h2",{className:"ui-title",children:"Chart"}),e.jsx("div",{style:{height:500},children:e.jsx(Dr,{model:o})})]})}const We="2px solid var(--dh-color-notice-bg)",Ht={"--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"},bo={"--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"},Gt={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 zt(t){const o=fe.parseRgba(fe.asRgbOrRgbaString(t)??"");if(o==null||o.a<.5)return"white";const{r,g:s,b:a}=o;return fe.getBrightness([r,s,a])>=128?"black":"white"}function Wt(t){const o=getComputedStyle(document.documentElement);return t.split(/[\n;]/g).map(s=>/^(?:\s{2}|:root\{)?(--dh-color-(?:[^:]+))/.exec(s)?.[1]).filter(s=>!!s).map(s=>{const a=o.getPropertyValue(s);return s==="--dh-color-chart-colorway"?br(a??"").map(([n,i])=>a.substring(n,i+1)).map((n,i)=>({name:`${s}-${i}`,value:n})):{name:s,value:a}}).flat()}function oe(t,o,r,s=Ht){const a=Gt[t];return Wt(o).reduce((i,{name:d,value:h})=>{if(/^--dh-color-true-(.*?)$/.test(d)||/^--dh-color-gray-(light|mid|dark)$/.test(d))return i;const c=/^--dh-color-([^-]+)(?:-([^-]+))?/.exec(d);let m=s[d]??c?.[r]??c?.[1]??"???";return m=a[m]??m,i[m]==null&&(i[m]=[]),d in bo&&i[m].push({isLabel:!0,name:bo[d],value:""}),/^--dh-color-gray-(light|mid|dark)$/.test(d)||i[m].push({name:d,value:h}),i},{})}function Kt(){const t=u.useRef(null);return u.useLayoutEffect(()=>{if(t.current==null)return;const o=getComputedStyle(t.current),{backgroundColor:r}=o;t.current.style.color=zt(r)},[]),t}function qt(t,o){const[r,s]=u.useState();return u.useEffect(()=>{if(t.current==null)return;const a=getComputedStyle(t.current,o).getPropertyValue("content"),l=/"(--dh-color-.*?)[,"]/.exec(a)?.[1];if(l==null)return;const n=getComputedStyle(t.current).getPropertyValue(l);s(n)},[t,o]),r}function Me({className:t,children:o}){const r=Kt(),s=qt(r,":after"),a=u.useMemo(()=>s!=null?{value:s}:null,[s]),l=a!=null&&a.value!=="";return e.jsxs("div",{ref:r,className:t,style:{border:l?void 0:We},children:[l&&e.jsx(re,{interactive:!0,children:e.jsx("div",{children:a.value})}),o]})}function Xt(){const t=["100","200","300","400","500","600","700","800","850","8XX","900"].map(s=>e.jsx(Me,{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(Me,{className:H("swatch",`swatch-${s}`),children:s},s)),r=["content-bg","background","foreground","primary","primary-dark","secondary","secondary-hover","success","info","warning","danger","danger-hover"].map(s=>e.jsx(Me,{className:H("swatch",`swatch-${s}`),children:s},s));return e.jsxs(x,{name:"colors",children:[e.jsx("h2",{className:"ui-title",children:"Colors"}),e.jsxs("div",{className:"row",children:[e.jsxs("div",{className:"col",children:[t,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 Zt 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:Xe,action:()=>{alert(`Alert${r}!`)},shortcut:new te({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[M.CTRL,$.A],macShortcut:[M.CMD,$.A]})},{title:`Log Message${r}`,icon:Ze,action:()=>{console.log(`Logging a message${r}!`)},shortcut:new te({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[M.CTRL,$.L],macShortcut:[M.CMD,$.L]})},{title:"Sub-menu",actions:()=>this.makeContextMenuItems((o??0)+1),order:3}].concat(new Array(10).fill({title:`Disabled Option${r}`,disabled:!0,order:2}))}render(){const o=this.makeContextMenuItems(),s=[{title:"Show Shortcuts",icon:Ro,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new te({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[M.CTRL,$.SLASH],macShortcut:[M.CMD,$.SLASH]}),group:be.groups.global}].concat(o),a=()=>new Promise(l=>{setTimeout(()=>{l(o)},3e3)});return e.jsxs(x,{name:"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(be,{actions:s})]}),e.jsxs(p,{kind:"tertiary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(be,{actions:a})]})]})}}class Yt extends u.Component{constructor(o){super(o),this.sampleInput=me.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]])],a=["Leaf Parent",!0];this.state={isShown:!1,checkBoxMap:new Map([r,s,a])}}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(x,{name:"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($r,{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(Or,{menuText:"Checkbox Menu",valueMap:r,onUpdateValueMap:this.handleUpdateCheckboxMap})]})}}class Qt extends u.Component{constructor(o){super(o),this.state={isShown:!1}}render(){const o=[{title:"Show Alert",icon:Xe,action:()=>{alert("Alert!")},shortcut:new te({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[M.CTRL,$.A],macShortcut:[M.CMD,$.A]})},{title:"Log Message",icon:Ze,action:()=>{console.log("Logging a message!")},shortcut:new te({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[M.CTRL,$.L],macShortcut:[M.CMD,$.L]})}],s=[{title:"Show Shortcuts",icon:Ro,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new te({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[M.CTRL,$.SLASH],macShortcut:[M.CMD,$.SLASH]}),group:be.groups.global}].concat(o),{isShown:a}=this.state;return e.jsxs(x,{name:"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:jr,onClick:()=>{},children:e.jsx(io,{actions:s})}),e.jsxs(p,{kind:"primary",style:{marginRight:"1rem",minWidth:"165px"},onClick:()=>{a?this.setState({isShown:!1}):this.setState({isShown:!0})},children:["Menu Shown: ",a.toString()]}),e.jsxs("div",{ref:this.button,className:"btn btn-secondary disabled",style:{marginRight:"1rem"},children:["Shown using isShown",e.jsx(io,{isShown:a,onMenuClosed:()=>{this.setState({isShown:!1})},actions:s})]})]})}}const Jt=`trades = db.t("LearnDeephaven", "StockTrades").where("Date=\`2017-08-25\`")\\
|
|
1
|
+
import{r as u,aj as v,K as H,I as e,af as Fe,ax as k,M as me,a2 as Ao,V as ye,L as C,ab as R,aM as Mo,aL as O,U as ro,bb as Yo,az as P,bz as $o,a9 as Qo,aa as _,ac as Jo,bA as er,ad as or,_ as qe,ag as w,a_ as rr,bB as Ve,aZ as Z,Z as tr,ae as sr,aX as Oe,ak as ar,aQ as Ue,aP as lr,$ as nr,al as ir,bC as cr,bD as dr,bE as hr,bF as Y,bG as ur,bH as ke,bI as D,aG as mr,bJ as gr,bK as xr,b9 as pr,Q as vr,a8 as fr}from"./vendor-6520fd55.js";import{aW as to,aX as K,aY as q,aM as fe,a1 as br,aZ as Xe,a_ as Ze,a$ as Ro,aE as jr,b0 as so,b1 as ao,b2 as lo,Q as He,b3 as yr,b4 as wr,I as Cr,b5 as Sr,b6 as kr,aH as no,b7 as Ge,am as Tr,f as Nr,b8 as Ir}from"./index-bdc5e9b2.js";import{W as Er}from"./monaco-b5248072.js";import{e as Ce,G as Lo,m as Q,S as le,L as Dr,d as Te,I as Ar,c as Mr,a as Ne}from"./IrisGridModel-ef7fbf31.js";import{B as p,u as Po,s as re,q as te,aP as M,K as $,al as be,aj as $r,N as io,cF as co,V as Rr,C as L,aT as pe,S as je,aJ as Lr,am as Pr,d as ho,aZ as _o,J as uo,bx as J,ax as _r,a6 as Br,az as Fr,w as Vr}from"./ControlType-69e1fac5.js";import{M as mo,H as Or,A as Ur,T as Hr,D as Gr,d as zr,c as Wr,h as Kr,V as I,g as qr,P as go,C as Xr,L as Ie,e as Zr,E as ee,j as Yr}from"./FontBootstrap-26cb4aa5.js";import{G as se,T as Qr}from"./Grid-7d3b8fcc.js";import{a9 as Bo,O as A,C as ze,n as Jr,B as et,o as de,y as xo,E as ot,v as rt,g as tt,P as st,x as at,S as z,z as lt,a3 as nt,L as it,r as ct}from"./TokenBoxCellRenderer-21fe6e70.js";import{a as po,T as j,D as dt}from"./IrisGridShortcuts-e4e2e06e.js";import{N as ht,H as Ye,T as ut,b as mt,j as gt}from"./LocalWorkspaceStorage-00363c27.js";import"./helpers-de833af9.js";function vo(t,o,r,s,a,l,n){try{var i=t[l](n),d=i.value}catch(h){r(h);return}i.done?o(d):Promise.resolve(d).then(s,a)}function Ee(t){return function(){var o=this,r=arguments;return new Promise(function(s,a){var l=t.apply(o,r);function n(d){vo(l,s,a,n,i,"next",d)}function i(d){vo(l,s,a,n,i,"throw",d)}n(void 0)})}}function V(t,o,r){return o=xt(o),o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function xt(t){var o=pt(t,"string");return typeof o=="symbol"?o:String(o)}function pt(t,o){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var s=r.call(t,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(t)}class vt extends Ce{constructor(){var{rowCount:o=1e9,columnCount:r=100,floatingTopRowCount:s=0,floatingBottomRowCount:a=0,floatingLeftColumnCount:l=0,floatingRightColumnCount:n=0,isEditable:i=!1,editedData:d=[]}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),V(this,"numRows",void 0),V(this,"numColumns",void 0),V(this,"floatingTop",void 0),V(this,"floatingBottom",void 0),V(this,"floatingLeft",void 0),V(this,"floatingRight",void 0),V(this,"editable",void 0),V(this,"editedData",void 0),this.numRows=o,this.numColumns=r,this.floatingTop=s,this.floatingBottom=a,this.floatingLeft=l,this.floatingRight=n,this.editable=i,this.editedData=d}get rowCount(){return this.numRows}get columnCount(){return this.numColumns}get floatingTopRowCount(){return this.floatingTop}get floatingBottomRowCount(){return this.floatingBottom}get floatingLeftColumnCount(){return this.floatingLeft}get floatingRightColumnCount(){return this.floatingRight}get isEditable(){return this.editable}textForCell(o,r){var s,a;return(s=(a=this.editedData[o])===null||a===void 0?void 0:a[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 a=this;return Ee(function*(){a.editedData[o]==null&&(a.editedData[o]=[]),a.editedData[o][r]="".concat(s)})()}setValueForRanges(o,r){var s=this;return Ee(function*(){Lo.forEachCell(o,(a,l)=>{s.setValueForCell(a,l,r)})})()}setValues(o){var r=this;return Ee(function*(){for(var s=0;s<o.length;s+=1){var a,l,n=o[s];r.setValueForCell((a=n.column)!==null&&a!==void 0?a:n.x,(l=n.row)!==null&&l!==void 0?l:n.y,n.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 Qe=vt;function T(t,o,r){return o=ft(o),o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function ft(t){var o=bt(t,"string");return typeof o=="symbol"?o:String(o)}function bt(t,o){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var s=r.call(t,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(t)}class E extends Qe{constructor(){var{rowCount:o=E.DEFAULT_ROW_COUNT,columnCount:r=E.DEFAULT_COLUMN_COUNT,children:s=new Map,childRowCount:a=Math.ceil(Math.max(E.MIN_CHILD_ROW_COUNT,o*E.DEFAULT_CHILD_ROW_COUNT_FACTOR)),maxDepth:l=E.MAX_DEPTH}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super({rowCount:o,columnCount:r}),T(this,"children",void 0),T(this,"childRowCount",void 0),T(this,"maxDepth",void 0),T(this,"getCachedModelRowOffset",Q((n,i)=>{for(var d=null,h=i,c=[...n].sort((y,B)=>y[0]-B[0]),m=0;m<c.length;m+=1){var[g,f]=c[m];if(h<=g)break;var b=f.rowCount;if(h<=g+b){d=g,h=h-g-1;break}h-=b}return{key:d,offsetRow:h}})),T(this,"getCachedTextForRowHeader",Q((n,i)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,i);if(d!=null){var c=n.get(d);if(c!==void 0)return"".concat(d,".").concat(c.textForRowHeader(h))}return"".concat(h)})),T(this,"getCachedTextForCell",Q((n,i,d)=>{var{key:h,offsetRow:c}=this.getCachedModelRowOffset(n,d);if(h!=null){var m=n.get(h);if(m!==void 0)return"".concat(h,".").concat(m.textForCell(i,c))}return"".concat(i,",").concat(c)})),T(this,"getCachedIsRowExpandable",Q((n,i,d)=>{var h=this.getCachedDepthForRow(n,i);return h<d})),T(this,"getCachedIsRowExpanded",Q((n,i)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,i);if(d!=null){var c=n.get(d);if(c!==void 0)return c.isRowExpanded(h)}return n.has(h)})),T(this,"getCachedDepthForRow",Q((n,i)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,i);if(d!=null){var c=n.get(d);if(c!==void 0)return c.depthForRow(h)+1}return 0})),this.children=s,this.childRowCount=a,this.maxDepth=l}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:a,offsetRow:l}=this.getCachedModelRowOffset(this.children,o),n=new Map(this.children);if(a!=null){var i=this.children.get(a);if(i!==void 0){var{rowCount:d}=i;i.setRowExpanded(l,r,s),this.numRows+=i.rowCount-d}}else if(r){var c=new E({rowCount:this.childRowCount,columnCount:this.numColumns});n.set(l,c),this.numRows+=c.rowCount}else{var h=n.get(l);h!==void 0&&(this.numRows-=h.rowCount,n.delete(l))}this.children=n}expandAll(){throw new Error("Expand all not implemented.")}collapseAll(){throw new Error("Collapse all not implemented.")}depthForRow(o){return this.getCachedDepthForRow(this.children,o)}}T(E,"DEFAULT_ROW_COUNT",1e9);T(E,"DEFAULT_COLUMN_COUNT",100);T(E,"DEFAULT_CHILD_ROW_COUNT_FACTOR",.01);T(E,"MIN_CHILD_ROW_COUNT",10);T(E,"MAX_DEPTH",10);const Je=E;function De(t,o,r){return o=jt(o),o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function jt(t){var o=yt(t,"string");return typeof o=="symbol"?o:String(o)}function yt(t,o){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var s=r.call(t,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(t)}class wt extends Ce{constructor(o,r){var s;super(),De(this,"data",void 0),De(this,"columnHeaders",void 0),De(this,"numberOfColumns",void 0),this.data=o,this.numberOfColumns=Math.max(...o.map(a=>a.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 Ct=wt;function Ae(t,o,r){return o=St(o),o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function St(t){var o=kt(t,"string");return typeof o=="symbol"?o:String(o)}function kt(t,o){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var s=r.call(t,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(t)}class Tt extends Ce{constructor(o,r){super(),Ae(this,"numberOfColumns",void 0),Ae(this,"numberOfRows",void 0),Ae(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,a,l,n,i,d,h,c=r-((s=(a=this.viewportData)===null||a===void 0?void 0:a.rowOffset)!==null&&s!==void 0?s:0),m=o-((l=(n=this.viewportData)===null||n===void 0?void 0:n.columnOffset)!==null&&l!==void 0?l:0);return"".concat((i=(d=this.viewportData)===null||d===void 0||(h=d.data[c])===null||h===void 0?void 0:h[m])!==null&&i!==void 0?i:"")}textForColumnHeader(o){return"".concat(o)}textForRowHeader(o){return"".concat(o)}}const Nt=Tt;function N(t,o,r){return o=It(o),o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function It(t){var o=Et(t,"string");return typeof o=="symbol"?o:String(o)}function Et(t,o){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var s=r.call(t,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(t)}var Dt="proportional",At=Bo.positiveBarColor,Mt=Bo.negativeBarColor,$t="beside",Rt="LTR",Lt="right";function Pt(t){return Array.isArray(t)&&t.every(o=>typeof o=="number")}class _t extends Ce{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,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:new Map,l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:new Map,n=arguments.length>5&&arguments[5]!==void 0?arguments[5]:new Map,i=arguments.length>6&&arguments[6]!==void 0?arguments[6]:new Map,d=arguments.length>7&&arguments[7]!==void 0?arguments[7]:new Map,h=arguments.length>8&&arguments[8]!==void 0?arguments[8]:new Map;super(),N(this,"numberOfColumns",void 0),N(this,"numberOfRows",void 0),N(this,"data",void 0),N(this,"columnMins",void 0),N(this,"columnMaxs",void 0),N(this,"columnAxes",void 0),N(this,"valuePlacements",void 0),N(this,"directions",void 0),N(this,"positiveColors",void 0),N(this,"negativeColors",void 0),N(this,"opacities",void 0),N(this,"textAlignments",void 0),N(this,"markers",void 0),this.positiveColors=s,this.negativeColors=a,this.data=o,this.columnAxes=r,this.valuePlacements=l,this.opacities=n,this.directions=i,this.textAlignments=d,this.markers=h,this.numberOfRows=Math.max(...o.map(g=>g.length)),this.numberOfColumns=o.length,this.columnMins=new Map,this.columnMaxs=new Map;for(var c=0;c<o.length;c+=1){var m=o[c];Pt(m)&&(this.columnMins.set(c,Math.min(...m)),this.columnMaxs.set(c,Math.max(...m)))}}get rowCount(){return this.numberOfRows}get columnCount(){return this.numberOfColumns}textForCell(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:Lt}renderTypeForCell(o,r){return o<20||o%2===r%2?"dataBar":"text"}dataBarOptionsForCell(o,r){var s,a,l,n,i,d,h,c=to(this.columnMins,o),m=to(this.columnMaxs,o),g=(s=this.columnAxes.get(o))!==null&&s!==void 0?s:Dt,f=(a=this.valuePlacements.get(o))!==null&&a!==void 0?a:$t,b=this.opacities.get(o);b==null||b>1?b=1:b<0&&(b=0);var y=(l=this.directions.get(o))!==null&&l!==void 0?l:Rt,B=(n=this.positiveColors.get(o))!==null&&n!==void 0?n:At,ae=(i=this.negativeColors.get(o))!==null&&i!==void 0?i:Mt,G=Number((d=this.data[o])===null||d===void 0?void 0:d[r]),X=G>=0?B:ae,Se=(h=this.markers.get(o))!==null&&h!==void 0?h:[];return{columnMin:c,columnMax:m,axis:g,color:X,valuePlacement:f,opacity:b,markers:Se,direction:y,value:G}}}const Bt=_t,Ft="isolated-section-query",Fo="sample-section";function*ge(t,o){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",s=r.length;for(let a=t;a<=o;a+=1){const l=a%s;let n=String(Math.floor(a/s));n==="0"&&(n="");const i=r[l],d=`${i}${n}`,h=`${i.repeat(3)}${n}`;yield u.createElement(v,{key:d,textValue:h,children:h})}}function*eo(t,o={}){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",s=r.length,a=Object.keys(K);for(let l=0;l<t;l+=1){const n=l%s;let i=String(Math.floor(l/s));i==="0"&&(i="");const d=r[n],h=`${d}${i}`,c=o.icons===!0?a[l%a.length]:void 0,m=o.descriptions===!0?`Description ${h}`:void 0,g=c??`${d.repeat(3)}${i}`;yield{key:h,item:{key:(l+1)*100,content:g,textValue:g,description:m,icon:c}}}}function*Vo(t=1){for(;;)t=t*16807%2147483647,yield t/2147483647}function fo(){return window.location.search.includes("isolateSection=true")?window.location.hash.replace(/^#/,""):""}function Oo(){const[t,o]=u.useState(fo);return u.useEffect(()=>{const r=()=>o(fo());return window.addEventListener("hashchange",r),()=>window.removeEventListener("hashchange",r)},[]),t}function Vt(t=1){const[o]=u.useState(()=>Vo(t));return u.useCallback(()=>{const r=o.next();if(r.done===!0)throw new Error("Random number generator unexpectedly finished");return r.value},[o])}function Uo(t){return`${Fo}-${t.toLocaleLowerCase().replaceAll(" ","-")}`}function Ho(t,o=[]){const r=Uo(t),s=H(Fo,...o);return{id:r,className:s}}function Ot(t,o=[]){const{id:r,className:s}=Ho(t,o);return{id:r,UNSAFE_className:s}}function x({name:t,className:o="",component:r="div",...s}){const a=Oo(),l=Uo(t);if(!(a===""||a===l))return null;const i=r==="div"?Ho:Ot;return e.jsx(r,{...s,...i(t,[o])})}function S(){}class ue extends u.Component{static renderButtons(){return e.jsxs(e.Fragment,{children:[e.jsx("h5",{children:"Button Kinds"}),e.jsx(x,{name:"buttons-regular",style:{padding:"1rem 0"},children:e.jsxs(Fe,{children:[e.jsx(p,{kind:"primary",onClick:S,children:"Primary"}),e.jsx(p,{kind:"secondary",onClick:S,children:"Secondary"}),e.jsx(p,{kind:"tertiary",onClick:S,children:"Tertiary"}),e.jsx(p,{kind:"success",onClick:S,children:"Success"}),e.jsx(p,{kind:"danger",onClick:S,children:"Danger"}),e.jsx(p,{kind:"inline",onClick:S,children:"Inline"}),e.jsx(p,{kind:"ghost",onClick:S,children:"Ghost"})]})})]})}static renderLinks(){const o={primary:"accent",secondary:"neutral",success:"positive",info:"info",warning:"notice",danger:"negative"};return e.jsxs(x,{name:"links",style:{paddingTop:"1rem"},children:[e.jsx("h5",{children:"Links"}),e.jsx(k,{gap:"1rem",children:Object.entries(o).map(([r,s])=>e.jsxs("a",{className:`text-${r}`,children:[r," (",s,")"]},r))})]})}static renderSocketedButtons(){return e.jsxs(x,{name:"buttons-socketed",children:[e.jsx("h5",{children:"Socketed Buttons (for linker)"}),e.jsxs(Fe,{marginBottom:"1rem",children:[e.jsx(le,{onClick:S,children:"Unlinked"}),e.jsx(le,{isLinked:!0,onClick:S,children:"Linked"}),e.jsx(le,{isLinkedSource:!0,onClick:S,children:"Linked Source"}),e.jsx(le,{isLinked:!0,isInvalid:!0,onClick:S,children:"Error"}),e.jsx(le,{disabled:!0,onClick:S,children:"Disabled"})]})]})}constructor(o){super(o),this.state={toggle:!0}}renderInlineButtons(){const{toggle:o}=this.state;return e.jsxs(x,{name:"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:q,tooltip:"test",onClick:S}),"Toggle button (class active):",e.jsx(p,{className:"mx-2",onClick:()=>{this.setState({toggle:!o})},active:o,kind:"inline",icon:q,tooltip:"test"}),"Disabled:",e.jsx(p,{className:"mx-2",kind:"inline",disabled:!0,onClick:S,children:"Disabled"}),"With Text:",e.jsx(p,{className:"mx-2",kind:"inline",icon:q,onClick:S,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:q,tooltip:"test",onClick:S}),e.jsx("span",{className:"mx-2",children:"btn-link:"}),e.jsx(p,{kind:"ghost",onClick:S,children:"Text Button"}),e.jsx("span",{className:"mx-2",children:"btn-link (text w/ optional with icon):"}),e.jsx(p,{kind:"ghost",icon:q,onClick:S,children:"Text Button"})]})}render(){const o=ue.renderButtons(),r=this.renderInlineButtons(),s=ue.renderSocketedButtons(),a=ue.renderLinks();return e.jsxs("div",{children:[e.jsx("h2",{className:"ui-title",children:"Buttons"}),e.jsxs("div",{style:{padding:"1rem 0"},children:[o,r,s,a]})]})}}function Ut(){const t=Po();mo.random=Vt();const[o]=u.useState(()=>new mo(t));return e.jsxs(x,{name:"charts",children:[e.jsx("h2",{className:"ui-title",children:"Chart"}),e.jsx("div",{style:{height:500},children:e.jsx(Dr,{model:o})})]})}const We="2px solid var(--dh-color-notice-bg)",Ht={"--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"},bo={"--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"},Gt={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 zt(t){const o=fe.parseRgba(fe.asRgbOrRgbaString(t)??"");if(o==null||o.a<.5)return"white";const{r,g:s,b:a}=o;return fe.getBrightness([r,s,a])>=128?"black":"white"}function Wt(t){const o=getComputedStyle(document.documentElement);return t.split(/[\n;]/g).map(s=>/^(?:\s{2}|:root\{)?(--dh-color-(?:[^:]+))/.exec(s)?.[1]).filter(s=>!!s).map(s=>{const a=o.getPropertyValue(s);return s==="--dh-color-chart-colorway"?br(a??"").map(([n,i])=>a.substring(n,i+1)).map((n,i)=>({name:`${s}-${i}`,value:n})):{name:s,value:a}}).flat()}function oe(t,o,r,s=Ht){const a=Gt[t];return Wt(o).reduce((i,{name:d,value:h})=>{if(/^--dh-color-true-(.*?)$/.test(d)||/^--dh-color-gray-(light|mid|dark)$/.test(d))return i;const c=/^--dh-color-([^-]+)(?:-([^-]+))?/.exec(d);let m=s[d]??c?.[r]??c?.[1]??"???";return m=a[m]??m,i[m]==null&&(i[m]=[]),d in bo&&i[m].push({isLabel:!0,name:bo[d],value:""}),/^--dh-color-gray-(light|mid|dark)$/.test(d)||i[m].push({name:d,value:h}),i},{})}function Kt(){const t=u.useRef(null);return u.useLayoutEffect(()=>{if(t.current==null)return;const o=getComputedStyle(t.current),{backgroundColor:r}=o;t.current.style.color=zt(r)},[]),t}function qt(t,o){const[r,s]=u.useState();return u.useEffect(()=>{if(t.current==null)return;const a=getComputedStyle(t.current,o).getPropertyValue("content"),l=/"(--dh-color-.*?)[,"]/.exec(a)?.[1];if(l==null)return;const n=getComputedStyle(t.current).getPropertyValue(l);s(n)},[t,o]),r}function Me({className:t,children:o}){const r=Kt(),s=qt(r,":after"),a=u.useMemo(()=>s!=null?{value:s}:null,[s]),l=a!=null&&a.value!=="";return e.jsxs("div",{ref:r,className:t,style:{border:l?void 0:We},children:[l&&e.jsx(re,{interactive:!0,children:e.jsx("div",{children:a.value})}),o]})}function Xt(){const t=["100","200","300","400","500","600","700","800","850","8XX","900"].map(s=>e.jsx(Me,{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(Me,{className:H("swatch",`swatch-${s}`),children:s},s)),r=["content-bg","background","foreground","primary","primary-dark","secondary","secondary-hover","success","info","warning","danger","danger-hover"].map(s=>e.jsx(Me,{className:H("swatch",`swatch-${s}`),children:s},s));return e.jsxs(x,{name:"colors",children:[e.jsx("h2",{className:"ui-title",children:"Colors"}),e.jsxs("div",{className:"row",children:[e.jsxs("div",{className:"col",children:[t,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 Zt 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:Xe,action:()=>{alert(`Alert${r}!`)},shortcut:new te({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[M.CTRL,$.A],macShortcut:[M.CMD,$.A]})},{title:`Log Message${r}`,icon:Ze,action:()=>{console.log(`Logging a message${r}!`)},shortcut:new te({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[M.CTRL,$.L],macShortcut:[M.CMD,$.L]})},{title:"Sub-menu",actions:()=>this.makeContextMenuItems((o??0)+1),order:3}].concat(new Array(10).fill({title:`Disabled Option${r}`,disabled:!0,order:2}))}render(){const o=this.makeContextMenuItems(),s=[{title:"Show Shortcuts",icon:Ro,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new te({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[M.CTRL,$.SLASH],macShortcut:[M.CMD,$.SLASH]}),group:be.groups.global}].concat(o),a=()=>new Promise(l=>{setTimeout(()=>{l(o)},3e3)});return e.jsxs(x,{name:"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(be,{actions:s})]}),e.jsxs(p,{kind:"tertiary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(be,{actions:a})]})]})}}class Yt extends u.Component{constructor(o){super(o),this.sampleInput=me.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]])],a=["Leaf Parent",!0];this.state={isShown:!1,checkBoxMap:new Map([r,s,a])}}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(x,{name:"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($r,{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(Or,{menuText:"Checkbox Menu",valueMap:r,onUpdateValueMap:this.handleUpdateCheckboxMap})]})}}class Qt extends u.Component{constructor(o){super(o),this.state={isShown:!1}}render(){const o=[{title:"Show Alert",icon:Xe,action:()=>{alert("Alert!")},shortcut:new te({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[M.CTRL,$.A],macShortcut:[M.CMD,$.A]})},{title:"Log Message",icon:Ze,action:()=>{console.log("Logging a message!")},shortcut:new te({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[M.CTRL,$.L],macShortcut:[M.CMD,$.L]})}],s=[{title:"Show Shortcuts",icon:Ro,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new te({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[M.CTRL,$.SLASH],macShortcut:[M.CMD,$.SLASH]}),group:be.groups.global}].concat(o),{isShown:a}=this.state;return e.jsxs(x,{name:"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:jr,onClick:()=>{},children:e.jsx(io,{actions:s})}),e.jsxs(p,{kind:"primary",style:{marginRight:"1rem",minWidth:"165px"},onClick:()=>{a?this.setState({isShown:!1}):this.setState({isShown:!0})},children:["Menu Shown: ",a.toString()]}),e.jsxs("div",{ref:this.button,className:"btn btn-secondary disabled",style:{marginRight:"1rem"},children:["Shown using isShown",e.jsx(io,{isShown:a,onMenuClosed:()=>{this.setState({isShown:!1})},actions:s})]})]})}}const Jt=`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
|
`,Ls="_themeColorsPalette_v5aa0_1",Ps="_swatch_v5aa0_7",_s="_themeColors_v5aa0_1",Bs="_label_v5aa0_21",Fs="_capitalize_v5aa0_26",W={themeColorsPalette:Ls,swatch:Ps,themeColors:_s,label:Bs,capitalize:Fs};function Vs(){return{"Theme Color Palette":oe("palette",Es,1),"Semantic Colors":oe("semantic",Ds,1),"Chart Colors":oe("chart",As,2),"Editor Colors":oe("editor",Ms,2),"Grid Colors":oe("grid",$s,2),"Component Colors":oe("component",Rs,1)}}function Io({name:t,value:o}){return e.jsxs(e.Fragment,{children:[e.jsx("div",{children:t}),e.jsx("div",{children:o}),e.jsx("div",{children:fe.normalizeCssColor(o,!0)})]})}function Os(){const{selectedThemeKey:t}=_o(),o=u.useMemo(Vs,[t]);return e.jsx(e.Fragment,{children:Object.entries(o).map(([r,s],a)=>r==="Theme Color Palette"?e.jsxs(x,{name:r,children:[e.jsx("h2",{className:"ui-title",children:r}),e.jsx("div",{className:W.themeColorsPalette,children:Object.entries(s).map(([l,n],i)=>e.jsxs(u.Fragment,{children:[(i===0||i===1)&&n.map(({name:d},h)=>e.jsx("div",{style:{gridColumnStart:h+2,textAlign:"center"},className:"mt-3",children:d.split("-").pop()},d)),e.jsx("div",{className:"text-right pr-2",children:l}),n.map(({name:d,value:h})=>e.jsxs("div",{style:{backgroundColor:h,border:h===""&&d.length>0?We:void 0},className:H(W.swatch,"px-0"),children:[e.jsx(re,{interactive:!0,children:e.jsx(Io,{name:d,value:h})}),d&&e.jsx(uo,{copy:d})]},d))]},l))})]},r):e.jsxs(x,{name:r,children:[e.jsx("h2",{className:"ui-title",children:r}),e.jsx("div",{className:W.themeColors,children:Object.entries(s).map(([l,n])=>e.jsxs("div",{style:{gridRow:`span ${n.length+1}`},children:[e.jsx("span",{className:H(W.label,W.capitalize),children:l}),n.map(({isLabel:i,name:d,value:h,note:c})=>i===!0?e.jsx("span",{className:W.label,children:d},d):e.jsxs("div",{className:W.swatch,style:{border:h===""&&d.length>0?We:void 0},children:[e.jsx("div",{style:{backgroundColor:h,height:"var(--swatch-height)",aspectRatio:"1 / 1"}}),e.jsx(re,{interactive:!0,children:e.jsx(Io,{name:d,value:h})}),e.jsx("span",{children:d.replace("--dh-color-","")}),d.endsWith("-hue")||c!=null?e.jsx("span",{children:c??h}):null,e.jsx(uo,{copy:d})]},d))]},l))})]},r))})}const _e="data-menu-category",Us="data-no-menu",Hs="sample-section-e2e-ignore",Wo="spectrum-component-samples",Ko="spectrum-comparison-samples";function Gs(){return e.jsxs("div",{id:Wo,children:[e.jsx("h2",{className:"ui-title","data-no-menu":!0,children:"Spectrum Components"}),e.jsxs(P,{gap:20,columns:$o("0px","1fr"),children:[e.jsxs(x,{name:"spectrum-buttons",component:I,children:[e.jsx("h3",{children:"Buttons"}),e.jsx(zs,{})]}),e.jsxs(x,{name:"spectrum-collections",component:I,children:[e.jsx("h3",{children:"Collections"}),e.jsx(Xs,{})]}),e.jsxs(x,{name:"spectrum-content",component:I,children:[e.jsx("h3",{children:"Content"}),e.jsx(qs,{})]}),e.jsxs(x,{name:"spectrum-forms",component:I,children:[e.jsx("h3",{children:"Forms"}),e.jsx(Ks,{})]}),e.jsxs(x,{name:"spectrum-overlays",component:I,children:[e.jsx("h3",{children:"Overlays"}),e.jsxs(k,{gap:"size-160",children:[e.jsx(Ws,{}),e.jsxs(Qo,{children:[e.jsx(_,{children:"Dialog Trigger"}),t=>e.jsxs(Jo,{children:[e.jsx(Ye,{children:"Some Heading"}),e.jsx(er,{children:"Some Header"}),e.jsx(or,{}),e.jsx(qe,{children:e.jsx(j,{children:"Are you sure?"})}),e.jsxs(Fe,{children:[e.jsx(w,{variant:"secondary",onPress:t,children:"Cancel"}),e.jsx(w,{variant:"accent",onPress:t,children:"Confirm"})]})]})]})]})]}),e.jsxs(x,{name:"spectrum-well",component:I,children:[e.jsx("h3",{children:"Wells"}),e.jsx(rr,{children:"This is a well."})]})]})]})}function zs(){return e.jsxs(e.Fragment,{children:[e.jsxs(_,{marginBottom:"size-200",children:[e.jsx(R,{children:e.jsx(C,{icon:q})}),e.jsx(j,{children:"Icon Button"})]}),e.jsxs(P,{autoFlow:"column",columnGap:"size-250",rowGap:"size-150",columns:Ve(4,$o(0,"size-2000")),rows:Ve(8,"size-400"),children:[e.jsx("label",{children:'Button style="outline"'}),e.jsx(w,{variant:"primary",style:"outline",children:"Primary"}),e.jsx(w,{variant:"secondary",style:"outline",children:"Secondary"}),e.jsx(w,{variant:"accent",style:"outline",children:"Accent"}),e.jsx(w,{variant:"negative",style:"outline",children:"Negative"}),e.jsx(w,{variant:"primary",staticColor:"black",style:"outline",children:"Static Black"}),e.jsx(w,{variant:"primary",staticColor:"white",style:"outline",children:"Static White"}),e.jsx(w,{variant:"primary",isDisabled:!0,style:"outline",children:"Disabled"}),e.jsx("label",{children:'Button style="fill"'}),e.jsx(w,{variant:"primary",style:"fill",children:"Primary"}),e.jsx(w,{variant:"secondary",style:"fill",children:"Secondary"}),e.jsx(w,{variant:"accent",style:"fill",children:"Accent"}),e.jsx(w,{variant:"negative",style:"fill",children:"Negative"}),e.jsx(w,{variant:"primary",staticColor:"black",style:"fill",children:"Static Black"}),e.jsx(w,{variant:"primary",staticColor:"white",style:"fill",children:"Static White"}),e.jsx(w,{variant:"primary",isDisabled:!0,style:"fill",children:"Disabled"}),e.jsx("label",{children:"Action Button"}),e.jsx(_,{children:"Normal"}),e.jsx(_,{gridRow:"span 3",isQuiet:!0,children:"Quiet"}),e.jsx(_,{staticColor:"black",children:"Static Black"}),e.jsx(_,{staticColor:"white",children:"Static White"}),e.jsx(_,{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 Ws(){return e.jsxs(e.Fragment,{children:[e.jsx(j,{children:"Contextual Help"}),e.jsxs(tr,{variant:"info",children:[e.jsx(Ye,{children:"Need help?"}),e.jsx(qe,{children:e.jsx(j,{children:"This is a helpful description of the thing you need help with."})})]})]})}function Ks(){return e.jsx(sr,{children:e.jsxs(P,{gap:20,columns:Ve("auto-fit","210px"),alignItems:"end",children:[e.jsx(Oe,{label:"Text Field"}),e.jsxs(ar,{label:"Combobox",menuTrigger:"focus",defaultSelectedKey:"two",children:[e.jsx(v,{children:"One"},"one"),e.jsx(v,{children:"Two"},"two"),e.jsx(v,{children:"Three"},"three")]}),e.jsx(Ue,{children:"Checkbox"}),e.jsx(lr,{label:"Slider",defaultValue:24}),e.jsx(nr,{children:"Switch"})]})})}function qs(){return e.jsxs(ir,{children:[e.jsx(R,{size:"XL",children:e.jsx(C,{icon:Cr})}),e.jsx(Ye,{children:"Illustrated Message"}),e.jsx(qe,{children:"This is the content of the message."})]})}function Xs(){return e.jsxs(e.Fragment,{children:[e.jsx("label",{id:"table-view-sample",children:"List View"}),e.jsxs(cr,{"aria-labelledby":"table-view-sample",selectionMode:"multiple",maxWidth:"size-6000",marginBottom:"size-200",children:[e.jsx(v,{children:"One"}),e.jsx(v,{children:"Two"}),e.jsx(v,{children:"Three"}),e.jsx(v,{children:"Four"})]}),e.jsx("label",{id:"table-view-sample",children:"Table View"}),e.jsxs(dr,{"aria-labelledby":"table-view-sample",selectionMode:"multiple",children:[e.jsxs(hr,{children:[e.jsxs(Y,{title:"Person",children:[e.jsx(Y,{allowsResizing:!0,children:"Name"}),e.jsx(Y,{children:"Age"})]}),e.jsxs(Y,{title:"Address",children:[e.jsx(Y,{allowsResizing:!0,children:"City"}),e.jsx(Y,{children:"State"})]})]}),e.jsxs(ur,{children:[e.jsxs(ke,{children:[e.jsx(D,{children:"John"}),e.jsx(D,{children:"42"}),e.jsx(D,{children:"San Francisco"}),e.jsx(D,{children:"CA"})]}),e.jsxs(ke,{children:[e.jsx(D,{children:"Jane"}),e.jsx(D,{children:"38"}),e.jsx(D,{children:"San Francisco"}),e.jsx(D,{children:"CA"})]}),e.jsxs(ke,{children:[e.jsx(D,{children:"Becky"}),e.jsx(D,{children:"12"}),e.jsx(D,{children:"San Francisco"}),e.jsx(D,{children:"CA"})]})]})]})]})}function ne(t){return e.jsx("div",{...t})}function Zs(){const[t,o]=u.useState([]);u.useEffect(()=>{let s={category:"",items:[]};const a=[s],l=document.querySelector(`#${Wo}`),n=document.querySelector(`#sample-section-${Ko}`);document.querySelectorAll(`h2,h3,[${_e}]`).forEach(i=>{if(i.textContent==null||i.hasAttribute(Us))return;if(i.hasAttribute(_e)){s={category:i.getAttribute(_e)??"",items:[]},a.push(s);return}const h=`${l?.contains(i)===!0?"spectrum-":n?.contains(i)===!0?"spectrum-compare-":""}${i.textContent}`.toLowerCase().replace(/\s/g,"-");i.id=h,s.items.push({id:h,label:i.textContent})}),o(a)},[]),u.useEffect(()=>{const s=window.location.hash===""?null:document.querySelector(window.location.hash);setTimeout(()=>{s?s.scrollIntoView():window.scrollTo({top:0,behavior:"auto"})},0)},[]);const r=u.useCallback(s=>{const a=String(s);document.getElementById(a)?.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{window.location.hash=a},1e3)},[]);return e.jsxs(mr,{children:[e.jsx(_,{children:e.jsx(R,{children:e.jsx(C,{icon:Sr})})}),e.jsx(gr,{items:t,onAction:r,children:({category:s,items:a})=>e.jsx(xr,{items:a,title:s,children:({id:l,label:n})=>e.jsx(v,{children:n},l)},s)})]})}function Ys(){const t=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(w,{UNSAFE_className:"goto-top-button",variant:"accent",onPress:t,children:e.jsx(R,{children:e.jsx(C,{icon:kr})})})}const Qs=["Tab 1","Tab 2","Tab 3"];function Js({isActive:t,title:o}){return e.jsxs("li",{className:H("lm_tab",t&&"lm_active"),children:[e.jsx("span",{className:"lm_title_before"}),e.jsx("span",{className:"lm_title",children:o}),e.jsx("span",{className:"lm_close_tab"})]})}function ea(){return e.jsxs(x,{name:"golden-layout",children:[e.jsx("h2",{className:"ui-title",children:"Golden Layout"}),[!1,!0].map(t=>e.jsxs(me.Fragment,{children:[e.jsx("h5",{children:t?"Minimized":"Maximised"}),e.jsx("div",{style:{position:"relative",border:"none"},className:t?"lm_maximised":void 0,children:e.jsxs("div",{className:"lm_header",children:[e.jsx("ul",{className:"lm_tabs",children:Qs.map((o,r)=>e.jsx(Js,{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(t)))]})}function oa(){return e.jsxs(x,{name:"animations",className:"sample-section-e2e-ignore",children:[e.jsx("h2",{className:"ui-title",children:"Animations"}),e.jsx(I,{position:"relative",height:400,children:e.jsx(qr,{})})]})}const Eo=[["primary","accent"],["secondary","primary"],["danger","negative"]];function ra(){const[t,o]=u.useState(!1);return e.jsxs(x,{name:Ko,className:Hs,children:[e.jsx("h2",{className:"ui-title","data-no-menu":!0,children:"Bootstrap / Spectrum Comparison"}),e.jsxs(k,{gap:20,wrap:!0,children:[e.jsxs(I,{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"}),Eo.map(([r,s])=>e.jsxs(u.Fragment,{children:[e.jsx(p,{onClick:J,kind:r,icon:no,children:"Button"}),e.jsxs(w,{variant:s,style:"fill",children:[e.jsx(R,{children:e.jsx(C,{icon:no})}),e.jsx(j,{children:"Button"})]})]},r)),e.jsx(p,{onClick:J,kind:"primary",disabled:!0,children:"Disabled"}),e.jsx(w,{variant:"accent",style:"fill",isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(I,{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"}),Eo.map(([r,s])=>e.jsxs(u.Fragment,{children:[e.jsx(p,{onClick:J,kind:r,children:r}),e.jsx(w,{variant:s,style:"outline",children:s})]},r)),e.jsx(p,{onClick:J,kind:"secondary",disabled:!0,children:"Disabled"}),e.jsx(w,{variant:"primary",style:"outline",isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(I,{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:J,kind:"inline",children:"Inline"}),e.jsx(_,{children:"Action"}),e.jsx(p,{onClick:J,kind:"inline",disabled:!0,children:"Disabled"}),e.jsx(_,{isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(I,{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(r=>e.jsxs(u.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"input-label",children:"Select"}),e.jsxs(je,{disabled:r,placeholder:"Select",onChange:s=>{},className:"custom-select",children:[e.jsxs("option",{disabled:!0,value:"0",children:[r?"":"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(pr,{isDisabled:r,label:r?"Disabled Picker":"Picker",placeholder:"Picker",children:[e.jsx(v,{children:"One"},"1"),e.jsx(v,{children:"Two"},"2"),e.jsx(v,{children:"Three"},"3")]})]},String(r)))]})]}),e.jsxs(I,{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(Oe,{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(Oe,{type:"text",label:"Disabled",isDisabled:!0,value:"Disabled"})]})]}),e.jsxs(I,{children:[e.jsx("h3",{children:"Checkbox"}),e.jsxs(P,{gap:20,columns:"repeat(2, 120px)",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),e.jsx(L,{className:"form-group",checked:t,onChange:()=>o(r=>!r),children:"Checkbox"}),e.jsx(Ue,{children:"Checkbox"}),e.jsx(L,{className:"form-group",disabled:!0,checked:t,onChange:()=>o(r=>!r),children:"Disabled"}),e.jsx(Ue,{isDisabled:!0,children:"Disabled"})]})]})]})]})}const ta=[...eo(52)],ve=[...eo(52,{icons:!0})],qo=[...ge(0,51)],sa=[...ge(52,103)],aa=[...ge(104,155)],la=[...ge(156,207)],na=[...ge(208,259)],ia=["String 1","String 2","String 3","","Some really long text that should get truncated",444,999,!0,!1,...qo.map((t,o)=>o%5>0?t:u.cloneElement(t,{...t.props,children:[e.jsx(he,{},`icon-${t.props.children}`),e.jsx(j,{children:t.props.children},`label-${t.props.children}`)]}))];function he(){return e.jsx(R,{children:e.jsx(C,{icon:Ge})})}function ca(){const[t,o]=u.useState(200),[r,s]=u.useState(!0),[a,l]=u.useState(ve),n=u.useCallback(h=>l(h===""?ve:ve.filter(({item:c})=>c?.textValue?.includes(h))),[]),i=u.useCallback(async()=>tt({keyedItems:ta,itemHeight:st.medium,selectedKey:t,topOffset:at}),[t]),d=u.useCallback(h=>{o(h)},[]);return e.jsxs(x,{name:"pickers",children:[e.jsx("h2",{className:"ui-title",children:"Pickers"}),e.jsxs(k,{gap:14,direction:"column",children:[[go,ze].map(h=>{const c=m=>`${h===go?"Picker":"ComboBox"} (${m})`;return e.jsxs(k,{direction:"row",gap:14,children:[e.jsx(h,{label:c("Single Child"),tooltip:{placement:"bottom-end"},children:e.jsx(v,{textValue:"Aaa",children:"Aaa"})}),e.jsx(h,{label:c("Mixed Children Types"),defaultSelectedKey:"999",tooltip:!0,children:ia}),e.jsxs(h,{label:c("Sections"),tooltip:!0,children:["String 1","String 2","String 3",e.jsxs(z,{title:"Section",children:[e.jsx(v,{textValue:"Item Aaa",children:"Item Aaa"}),e.jsx(v,{textValue:"Item Bbb",children:"Item Bbb"}),e.jsxs(v,{textValue:"Complex Ccc",children:[e.jsx(he,{}),e.jsx(j,{children:"Complex Ccc"})]})]}),e.jsxs(z,{children:[e.jsx(v,{textValue:"Item Ddd",children:"Item Ddd"}),e.jsx(v,{textValue:"Item Eee",children:"Item Eee"}),e.jsxs(v,{textValue:"Complex Fff",children:[e.jsx(he,{}),e.jsx(j,{children:"Complex Fff"})]}),e.jsxs(v,{textValue:"Ggg",children:[e.jsx(he,{}),e.jsx(j,{children:"Label"}),e.jsx(j,{slot:"description",children:"Description"})]}),e.jsxs(v,{textValue:"Hhh",children:[e.jsx(he,{}),e.jsx(j,{children:"Label that causes overflow"}),e.jsx(j,{slot:"description",children:"Description that causes overflow"})]})]},"Key B"),e.jsx(z,{title:"Section A",children:qo}),e.jsx(z,{title:"Section B",children:sa}),e.jsx(z,{children:aa},"Section C"),e.jsx(z,{children:la},"Section D"),e.jsx(z,{title:"Section E",children:na})]})]},h.displayName)}),e.jsx(L,{checked:r,onChange:h=>s(h.currentTarget.checked),children:"Show Ions"}),e.jsxs(k,{direction:"row",gap:14,children:[e.jsx(lt,{label:"Picker (Controlled)",getInitialScrollPosition:i,normalizedItems:ve,selectedKey:t,showItemIcons:r,onChange:d}),e.jsx(Xr,{label:"ComboBox (Controlled)",getInitialScrollPosition:i,normalizedItems:a,selectedKey:t,showItemIcons:r,onChange:d,validationState:t==null?"invalid":"valid",errorMessage:"Please select an item.",onInputChange:n})]})]})]})}const da=[...eo(52,{icons:!0})];function ie(){return e.jsx(R,{slot:"illustration",children:e.jsx(C,{icon:Ir})})}const Ke={gap:10,label:{medium:21,large:25.5}};function ce({label:t,direction:o="column",children:r,...s}){return e.jsxs(k,{...s,direction:o,gap:Ke.gap,children:[e.jsx(j,{children:t}),r]})}function ha(){const{scale:t}=nt(),[o,r]=u.useState([]),[s,a]=u.useState("compact"),l=Ke.label[t]+Ke.gap+2+it[s??"compact"][t],n=u.useCallback(y=>{a(y)},[]),[i,d]=u.useState(!0),[h,c]=u.useState(""),[m,g]=u.useState(""),f=u.useCallback((y,B)=>{c(y),g(B)},[]),b=u.useCallback(y=>{r(y)},[]);return e.jsxs(x,{name:"list-views",children:[e.jsx("h2",{className:"ui-title",children:"List View"}),e.jsxs(P,{gap:14,height:"size-6000",columns:"1fr 1fr 1fr",rows:`auto minmax(${l}px, auto) 1fr auto 1fr`,children:[e.jsx(ce,{alignItems:"center",direction:"row",label:"Density",gridColumn:"span 3",children:e.jsxs(Mo,{"aria-label":"Density",orientation:"horizontal",value:s,onChange:n,children:[e.jsx(O,{value:"compact",children:"Compact"}),e.jsx(O,{value:"regular",children:"Regular"}),e.jsx(O,{value:"spacious",children:"Spacious"})]})}),e.jsx(ce,{label:"Single Child",gridColumn:"span 3",height:"100%",children:e.jsx(Ie,{density:s,"aria-label":"Single Child",selectionMode:"multiple",children:e.jsx(v,{textValue:"Aaa",children:"Aaa"})})}),e.jsx(ce,{label:"Icons",gridColumn:"span 2",children:e.jsxs(Ie,{"aria-label":"Icon",density:s,selectionMode:"multiple",children:[e.jsxs(v,{textValue:"Item with icon A",children:[e.jsx(ie,{}),e.jsx(j,{children:"Item with icon A"})]}),e.jsxs(v,{textValue:"Item with icon B",children:[e.jsx(ie,{}),e.jsx(j,{children:"Item with icon B"})]}),e.jsxs(v,{textValue:"Item with icon C",children:[e.jsx(ie,{}),e.jsx(j,{children:"Item with icon C"})]}),e.jsxs(v,{textValue:"Item with icon D",children:[e.jsx(ie,{}),e.jsx(j,{children:"Item with icon D with overflowing content"})]}),e.jsxs(v,{textValue:"Item with icon E",children:[e.jsx(ie,{}),e.jsx(j,{children:"Item with icon E"})]})]})}),e.jsx(ce,{label:"Mixed Children Types",children:e.jsxs(Ie,{"aria-label":"Mixed Children Types",density:s,maxWidth:"size-2400",selectionMode:"multiple",defaultSelectedKeys:["999",444],children:["String 1","String 2","String 3","","Some really long text that should get truncated",444,999,!0,!1,e.jsx(v,{textValue:"Item Aaa",children:"Item Aaa"}),e.jsx(v,{textValue:"Item Bbb",children:"Item Bbb"}),e.jsxs(v,{textValue:"Item with Description",children:[e.jsx(j,{children:"Item with Description"}),e.jsx(j,{slot:"description",children:"Description"})]}),e.jsxs(v,{textValue:"Complex Ccc",children:[e.jsx(R,{slot:"image",children:e.jsx(C,{icon:Ge})}),e.jsx(j,{children:"Complex Ccc with text that should be truncated"})]}),e.jsxs(v,{textValue:"Complex Ccc with Description",children:[e.jsx(R,{slot:"image",children:e.jsx(C,{icon:Ge})}),e.jsx(j,{children:"Complex Ccc with text that should be truncated"}),e.jsx(j,{slot:"description",children:"Description"})]})]})}),e.jsx(k,{gridColumn:"span 3",gap:14,children:e.jsx(L,{checked:i,onChange:y=>d(y.currentTarget.checked),children:"Show Ions"})}),e.jsxs(ce,{label:"Controlled",gridColumn:"span 2",children:[e.jsx(Zr,{"aria-label":"Controlled",density:s,normalizedItems:da,selectionMode:"multiple",selectedKeys:o,showItemIcons:i,onChange:b,actions:e.jsxs(ct,{overflowMode:"collapse",buttonLabelBehavior:"collapse",maxWidth:80,onAction:f,children:[e.jsxs(v,{children:[e.jsx(R,{children:e.jsx(C,{icon:Tr})}),e.jsx(j,{children:"Edit"})]},"Edit"),e.jsxs(v,{children:[e.jsx(R,{children:e.jsx(C,{icon:Nr})}),e.jsx(j,{children:"Delete"})]},"Delete")]})}),h," ",m]})]})]})}function ua(){const t={maxHeight:500,display:"flex",flexDirection:"column",maxWidth:400},o="This is a short error message",r=`Mid length error message
|
|
212
212
|
`.repeat(10),s=`Really long error message
|
|
213
213
|
`.repeat(100),a="MidError",l="SuperLongErrorMessageType";return e.jsxs(x,{name:"error-views",children:[e.jsx("h2",{className:"ui-title",title:"Display error messages easily",children:"Error Views"}),e.jsx("h3",{children:"Expandable"}),e.jsxs("div",{className:"row",style:{maxHeight:500},children:[e.jsx("div",{className:"col",style:t,children:e.jsx(ee,{message:o})}),e.jsx("div",{className:"col",style:t,children:e.jsx(ee,{message:r,type:a})}),e.jsx("div",{className:"col",style:t,children:e.jsx(ee,{message:s,type:l})})]}),e.jsx("h3",{children:"Always expanded"}),e.jsxs("div",{className:"row",style:{maxHeight:500},children:[e.jsx("div",{className:"col",style:t,children:e.jsx(ee,{message:o,isExpanded:!0})}),e.jsx("div",{className:"col",style:t,children:e.jsx(ee,{message:r,type:a,isExpanded:!0})}),e.jsx("div",{className:"col",style:t,children:e.jsx(ee,{message:s,type:l,isExpanded:!0})})]})]})}function Xo({value:t}){return e.jsx(p,{kind:"primary",onClick:()=>{},children:t})}Xo.displayName="FooComponent";const U=Mr(Xo);function ma({value:t}){return e.jsx(U,{value:`${t}.${t}`})}function ga({value:t}){return e.jsxs("div",{children:[e.jsx(U,{value:t}),e.jsx(U,{value:t})]})}function Be({value:t}){return e.jsx(p,{kind:"danger",onClick:()=>{},children:t.split("").reverse().join("")})}function xa(){const[t,o]=u.useState("hello");return e.jsxs(x,{name:"xcomponents",children:[e.jsx("h2",{className:"ui-title",children:"XComponents"}),e.jsxs("p",{children:["XComponents are a way to replace a component with another component without needing to pass props all the way down the component tree. This can be useful in cases where we have a component deep down in the component tree that we want to replace with a different component, but don't want to have to provide props at the top level just to hook into that.",e.jsx("br",{}),"Below is a component that is simply a button displaying the text inputted in the input field. We will replace this component with a new component that reverses the text, straight up, then in a nested scenario, and then multiple instances."]}),e.jsx("div",{className:"form-group",children:e.jsxs("label",{htmlFor:"xcomponentsInput",children:["Input Value:",e.jsx("input",{type:"text",className:"form-control",id:"xcomponentsInput",value:t,onChange:r=>o(r.target.value)})]})}),e.jsxs("div",{className:"row",children:[e.jsxs("div",{className:"col",children:[e.jsx("small",{children:"Original Component"}),e.jsx("div",{children:e.jsx(U,{value:t})}),e.jsx("small",{children:"Replaced with Reverse"}),e.jsx("div",{children:e.jsx(Ne,{value:new Map([[U,Be]]),children:e.jsx(U,{value:t})})})]}),e.jsxs("div",{className:"col",children:[e.jsx("small",{children:"Nested component replaced"}),e.jsx("div",{children:e.jsx(Ne,{value:new Map([[U,Be]]),children:e.jsx(ma,{value:t})})})]}),e.jsxs("div",{className:"col",children:[e.jsx("small",{children:"Multiple Components replaced"}),e.jsx("div",{children:e.jsx(Ne,{value:new Map([[U,Be]]),children:e.jsx(ga,{value:t})})})]})]})]})}const Do={position:"sticky",justifyContent:"end",zIndex:1,UNSAFE_style:{float:"right"}};function pa(){const{themes:t}=_o(),o=t.length>1,r=Oo()!=="";return e.jsx("div",{tabIndex:-1,role:"main",children:e.jsxs("div",{className:H("container","style-guide-container",r&&Ft),children:[e.jsx(k,{justifyContent:"space-between",alignItems:"center",marginTop:"2rem",marginBottom:"1rem",children:e.jsx("h1",{style:{paddingTop:"2rem"},children:"Deephaven UI Components"})}),e.jsxs(k,{...Do,UNSAFE_className:r?"hide-when-isolated":void 0,marginTop:-56,top:20,gap:10,alignItems:"end",children:[o?e.jsx(ut,{}):null,e.jsx(Zs,{})]}),e.jsx(k,{...Do,UNSAFE_className:r?"hide-when-isolated":void 0,top:"calc(100vh - 40px)",marginTop:-32,marginEnd:o?-234:0,children:e.jsx(Ys,{})}),e.jsx(ys,{}),e.jsx(ne,{"data-menu-category":"Colors"}),e.jsx(Xt,{}),e.jsx(Os,{}),e.jsx(ne,{"data-menu-category":"Layout"}),e.jsx(ea,{}),e.jsx(ne,{"data-menu-category":"Components"}),e.jsx(ue,{}),e.jsx(fs,{}),e.jsx(gs,{}),e.jsx(ha,{}),e.jsx(ca,{}),e.jsx(ps,{}),e.jsx(we,{}),e.jsx(bs,{}),e.jsx(Yt,{}),e.jsx(vs,{}),e.jsx(Zt,{}),e.jsx(Qt,{}),e.jsx(Is,{}),e.jsx(js,{}),e.jsx(us,{}),e.jsx(os,{}),e.jsx(cs,{}),e.jsx(Ut,{}),e.jsx(mt,{}),e.jsx(oa,{}),e.jsx(ua,{}),e.jsx(xa,{}),e.jsx(ne,{"data-menu-category":"Spectrum Components"}),e.jsx(Gs,{}),e.jsx(ne,{"data-menu-category":"Spectrum Comparison"}),e.jsx(ra,{})]})})}function oo(t){const{workspace:o,setWorkspace:r}=t;return u.useEffect(()=>{gt.makeDefaultWorkspace({getLayouts:async()=>[],getLayout:async()=>({})}).then(r)},[r]),o!=null?e.jsx(pa,{}):null}oo.propTypes={workspace:ye.shape({}),setWorkspace:ye.func.isRequired};oo.defaultProps={workspace:null};const va=t=>({workspace:Br(t)}),fa=vr(va,{setWorkspace:_r})(oo);function Da(){return dt.register(new URL("./download/serviceWorker.js",window.location.href)),Fr.init({getWorker:()=>new Er}),window["__react-beautiful-dnd-disable-dev-warnings"]=!0,e.jsx(Yr,{children:e.jsx(fr,{store:Vr,children:e.jsx(fa,{})})})}export{Da as StyleGuideRoot,Da as default};
|
|
214
|
-
//# sourceMappingURL=StyleGuideRoot-
|
|
214
|
+
//# sourceMappingURL=StyleGuideRoot-3a96cd30.js.map
|