@deephaven/code-studio 0.81.3-beta.1 → 0.81.3-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/assets/{AppRoot-bc0f2886.js → AppRoot-c6dfd449.js} +3 -3
- package/build/assets/{AppRoot-bc0f2886.js.map → AppRoot-c6dfd449.js.map} +1 -1
- package/build/assets/{Chart-2984d8fa.js → Chart-89a96ea4.js} +2 -2
- package/build/assets/{Chart-2984d8fa.js.map → Chart-89a96ea4.js.map} +1 -1
- package/build/assets/{ControlType-d6cfb5f2.js → ControlType-678cce9a.js} +3 -3
- package/build/assets/{ControlType-d6cfb5f2.js.map → ControlType-678cce9a.js.map} +1 -1
- package/build/assets/{FontBootstrap-1a40c59e.js → FontBootstrap-e95a2e21.js} +2 -2
- package/build/assets/{FontBootstrap-1a40c59e.js.map → FontBootstrap-e95a2e21.js.map} +1 -1
- package/build/assets/{FormatterUtils-00da0214.js → FormatterUtils-da46f5d1.js} +2 -2
- package/build/assets/{FormatterUtils-00da0214.js.map → FormatterUtils-da46f5d1.js.map} +1 -1
- package/build/assets/{Grid-c4d73d3f.js → Grid-5d137089.js} +2 -2
- package/build/assets/{Grid-c4d73d3f.js.map → Grid-5d137089.js.map} +1 -1
- package/build/assets/GridRenderer-9e002c53.js +2 -0
- package/build/assets/GridRenderer-9e002c53.js.map +1 -0
- package/build/assets/{IrisGrid-636e2c59.js → IrisGrid-4380cef0.js} +3 -3
- package/build/assets/IrisGrid-4380cef0.js.map +1 -0
- package/build/assets/{IrisGridModel-304a6579.js → IrisGridModel-7202106a.js} +2 -2
- package/build/assets/{IrisGridModel-304a6579.js.map → IrisGridModel-7202106a.js.map} +1 -1
- package/build/assets/{IrisGridShortcuts-3f84ae1d.js → IrisGridShortcuts-54989c78.js} +2 -2
- package/build/assets/{IrisGridShortcuts-3f84ae1d.js.map → IrisGridShortcuts-54989c78.js.map} +1 -1
- package/build/assets/{IrisGridThemeProvider-d6cd1ca4.js → IrisGridThemeProvider-51ff658e.js} +2 -2
- package/build/assets/{IrisGridThemeProvider-d6cd1ca4.js.map → IrisGridThemeProvider-51ff658e.js.map} +1 -1
- package/build/assets/{MarkdownEditor-caf6233b.js → MarkdownEditor-6cc77fd5.js} +2 -2
- package/build/assets/{MarkdownEditor-caf6233b.js.map → MarkdownEditor-6cc77fd5.js.map} +1 -1
- package/build/assets/{MarkdownNotebook-0a3fd207.js → MarkdownNotebook-c5a4564a.js} +2 -2
- package/build/assets/{MarkdownNotebook-0a3fd207.js.map → MarkdownNotebook-c5a4564a.js.map} +1 -1
- package/build/assets/{MissingPartitionError-6d1ef742.js → MissingPartitionError-eee78ece.js} +2 -2
- package/build/assets/{MissingPartitionError-6d1ef742.js.map → MissingPartitionError-eee78ece.js.map} +1 -1
- package/build/assets/{StyleGuideRoot-ef45dc41.js → StyleGuideRoot-1282b337.js} +2 -2
- package/build/assets/{StyleGuideRoot-ef45dc41.js.map → StyleGuideRoot-1282b337.js.map} +1 -1
- package/build/assets/{index-f47d0ec0.js → index-7cfa45d8.js} +3 -3
- package/build/assets/{index-f47d0ec0.js.map → index-7cfa45d8.js.map} +1 -1
- package/build/assets/{index-19561089.js → index-cc60f475.js} +2 -2
- package/build/assets/{index-19561089.js.map → index-cc60f475.js.map} +1 -1
- package/build/assets/{index-bef97151.js → index-fefb5d8b.js} +2 -2
- package/build/assets/{index-bef97151.js.map → index-fefb5d8b.js.map} +1 -1
- package/build/assets/{useUser-ff677ee8.js → useUser-8448509e.js} +2 -2
- package/build/assets/{useUser-ff677ee8.js.map → useUser-8448509e.js.map} +1 -1
- package/build/index.html +1 -1
- package/package.json +30 -30
- package/build/assets/GridRenderer-5d401667.js +0 -2
- package/build/assets/GridRenderer-5d401667.js.map +0 -1
- package/build/assets/IrisGrid-636e2c59.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as h,ag as p,K as U,I as e,ac as _e,av as k,M as ue,_ as No,V as be,L as C,a7 as R,aK as Io,aJ as O,U as eo,bc as Wo,ax as P,by as Eo,a5 as Ko,a6 as _,a8 as qo,bz as Yo,a9 as Xo,aa as We,ad as w,aZ as Zo,bA as Be,aY as Y,aq as Qo,ab as Jo,aW as Fe,ah as Do,aO as Ve,aN as er,aQ as or,ai as rr,bB as tr,bC as sr,bD as ar,bE as X,bF as lr,bG as Ce,bH as D,aE as nr,bI as ir,bJ as cr,ba as dr,Q as hr,a4 as ur}from"./vendor-4601e84c.js";import{aV as oo,aW as W,aX as K,aL as pe,a2 as mr,aY as Ke,aZ as qe,a_ as Ao,aE as gr,a$ as ro,F as to,b0 as so,I as Oe,b1 as xr,b2 as pr,K as vr,b3 as fr,b4 as br,aH as ao,b5 as Ue,am as jr,f as yr,b6 as wr}from"./index-19561089.js";import{W as Cr}from"./monaco-b5248072.js";import{e as ye,G as Mo,m as Z,S as ae,L as Sr,b as Se,I as kr}from"./IrisGridModel-304a6579.js";import{B as v,u as $o,s as oe,q as re,aU as M,K as $,al as ve,aj as Tr,J as lo,cC as no,Q as Nr,C as L,aY as xe,S as fe,aQ as Ir,am as Er,d as io,a_ as Ro,A as co,bx as Q,cD as Dr,cE as Ar,by as Mr,ay as $r,a7 as Rr,aE as Lr,w as Pr}from"./ControlType-d6cfb5f2.js";import{M as ho,e as _r,A as Br,T as Fr,D as Vr,C as Or,d as Ur,i as Hr,V as I,H as Ye,h as Gr,P as ke,L as Te,f as zr,E as J,k as Wr}from"./FontBootstrap-1a40c59e.js";import{G as te,T as Kr}from"./Grid-c4d73d3f.js";import{a1 as Lo,O as A,l as He,m as qr,w as Yr,n as ce,P as uo,x as Xr,r as Zr,T as j,g as Qr,S as G,v as Jr,Y as et,L as ot}from"./GridRenderer-5d401667.js";import{a as mo,D as rt}from"./IrisGridShortcuts-3f84ae1d.js";import{N as tt,T as st,b as at}from"./useUser-ff677ee8.js";import{L as lt}from"./AppRoot-bc0f2886.js";import"./helpers-de833af9.js";function go(t,o,r,s,a,l,n){try{var i=t[l](n),c=i.value}catch(u){r(u);return}i.done?o(c):Promise.resolve(c).then(s,a)}function Ne(t){return function(){var o=this,r=arguments;return new Promise(function(s,a){var l=t.apply(o,r);function n(c){go(l,s,a,n,i,"next",c)}function i(c){go(l,s,a,n,i,"throw",c)}n(void 0)})}}function V(t,o,r){return o=nt(o),o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function nt(t){var o=it(t,"string");return typeof o=="symbol"?o:String(o)}function it(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 ct extends ye{constructor(){var{rowCount:o=1e9,columnCount:r=100,floatingTopRowCount:s=0,floatingBottomRowCount:a=0,floatingLeftColumnCount:l=0,floatingRightColumnCount:n=0,isEditable:i=!1,editedData:c=[]}=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=c}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 Ne(function*(){a.editedData[o]==null&&(a.editedData[o]=[]),a.editedData[o][r]="".concat(s)})()}setValueForRanges(o,r){var s=this;return Ne(function*(){Mo.forEachCell(o,(a,l)=>{s.setValueForCell(a,l,r)})})()}setValues(o){var r=this;return Ne(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 Xe=ct;function T(t,o,r){return o=dt(o),o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function dt(t){var o=ht(t,"string");return typeof o=="symbol"?o:String(o)}function ht(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 Xe{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",Z((n,i)=>{for(var c=null,u=i,d=[...n].sort((y,B)=>y[0]-B[0]),m=0;m<d.length;m+=1){var[g,f]=d[m];if(u<=g)break;var b=f.rowCount;if(u<=g+b){c=g,u=u-g-1;break}u-=b}return{key:c,offsetRow:u}})),T(this,"getCachedTextForRowHeader",Z((n,i)=>{var{key:c,offsetRow:u}=this.getCachedModelRowOffset(n,i);if(c!=null){var d=n.get(c);if(d!==void 0)return"".concat(c,".").concat(d.textForRowHeader(u))}return"".concat(u)})),T(this,"getCachedTextForCell",Z((n,i,c)=>{var{key:u,offsetRow:d}=this.getCachedModelRowOffset(n,c);if(u!=null){var m=n.get(u);if(m!==void 0)return"".concat(u,".").concat(m.textForCell(i,d))}return"".concat(i,",").concat(d)})),T(this,"getCachedIsRowExpandable",Z((n,i,c)=>{var u=this.getCachedDepthForRow(n,i);return u<c})),T(this,"getCachedIsRowExpanded",Z((n,i)=>{var{key:c,offsetRow:u}=this.getCachedModelRowOffset(n,i);if(c!=null){var d=n.get(c);if(d!==void 0)return d.isRowExpanded(u)}return n.has(u)})),T(this,"getCachedDepthForRow",Z((n,i)=>{var{key:c,offsetRow:u}=this.getCachedModelRowOffset(n,i);if(c!=null){var d=n.get(c);if(d!==void 0)return d.depthForRow(u)+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:c}=i;i.setRowExpanded(l,r,s),this.numRows+=i.rowCount-c}}else if(r){var d=new E({rowCount:this.childRowCount,columnCount:this.numColumns});n.set(l,d),this.numRows+=d.rowCount}else{var u=n.get(l);u!==void 0&&(this.numRows-=u.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 Ze=E;function Ie(t,o,r){return o=ut(o),o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function ut(t){var o=mt(t,"string");return typeof o=="symbol"?o:String(o)}function mt(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 gt extends ye{constructor(o,r){var s;super(),Ie(this,"data",void 0),Ie(this,"columnHeaders",void 0),Ie(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 xt=gt;function Ee(t,o,r){return o=pt(o),o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function pt(t){var o=vt(t,"string");return typeof o=="symbol"?o:String(o)}function vt(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 ft extends ye{constructor(o,r){super(),Ee(this,"numberOfColumns",void 0),Ee(this,"numberOfRows",void 0),Ee(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,c,u,d=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=(c=this.viewportData)===null||c===void 0||(u=c.data[d])===null||u===void 0?void 0:u[m])!==null&&i!==void 0?i:"")}textForColumnHeader(o){return"".concat(o)}textForRowHeader(o){return"".concat(o)}}const bt=ft;function N(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)}var wt="proportional",Ct=Lo.positiveBarColor,St=Lo.negativeBarColor,kt="beside",Tt="LTR",Nt="right";function It(t){return Array.isArray(t)&&t.every(o=>typeof o=="number")}class Et extends ye{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,c=arguments.length>7&&arguments[7]!==void 0?arguments[7]:new Map,u=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=c,this.markers=u,this.numberOfRows=Math.max(...o.map(g=>g.length)),this.numberOfColumns=o.length,this.columnMins=new Map,this.columnMaxs=new Map;for(var d=0;d<o.length;d+=1){var m=o[d];It(m)&&(this.columnMins.set(d,Math.min(...m)),this.columnMaxs.set(d,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:Nt}renderTypeForCell(o,r){return o<20||o%2===r%2?"dataBar":"text"}dataBarOptionsForCell(o,r){var s,a,l,n,i,c,u,d=oo(this.columnMins,o),m=oo(this.columnMaxs,o),g=(s=this.columnAxes.get(o))!==null&&s!==void 0?s:wt,f=(a=this.valuePlacements.get(o))!==null&&a!==void 0?a:kt,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:Tt,B=(n=this.positiveColors.get(o))!==null&&n!==void 0?n:Ct,se=(i=this.negativeColors.get(o))!==null&&i!==void 0?i:St,H=Number((c=this.data[o])===null||c===void 0?void 0:c[r]),q=H>=0?B:se,we=(u=this.markers.get(o))!==null&&u!==void 0?u:[];return{columnMin:d,columnMax:m,axis:g,color:q,valuePlacement:f,opacity:b,markers:we,direction:y,value:H}}}const Dt=Et,At="isolated-section-query",Po="sample-section";function*me(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],c=`${i}${n}`,u=`${i.repeat(3)}${n}`;yield h.createElement(p,{key:c,textValue:u,children:u})}}function*Qe(t,o={}){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",s=r.length,a=Object.keys(W);for(let l=0;l<t;l+=1){const n=l%s;let i=String(Math.floor(l/s));i==="0"&&(i="");const c=r[n],u=`${c}${i}`,d=o.icons===!0?a[l%a.length]:void 0,m=o.descriptions===!0?`Description ${u}`:void 0,g=d??`${c.repeat(3)}${i}`;yield{key:u,item:{key:(l+1)*100,content:g,textValue:g,description:m,icon:d}}}}function*_o(t=1){for(;;)t=t*16807%2147483647,yield t/2147483647}function xo(){return window.location.search.includes("isolateSection=true")?window.location.hash.replace(/^#/,""):""}function Bo(){const[t,o]=h.useState(xo);return h.useEffect(()=>{const r=()=>o(xo());return window.addEventListener("hashchange",r),()=>window.removeEventListener("hashchange",r)},[]),t}function Mt(t=1){const[o]=h.useState(()=>_o(t));return h.useCallback(()=>{const r=o.next();if(r.done===!0)throw new Error("Random number generator unexpectedly finished");return r.value},[o])}function Fo(t){return`${Po}-${t.toLocaleLowerCase().replaceAll(" ","-")}`}function Vo(t,o=[]){const r=Fo(t),s=U(Po,...o);return{id:r,className:s}}function $t(t,o=[]){const{id:r,className:s}=Vo(t,o);return{id:r,UNSAFE_className:s}}function x({name:t,className:o="",component:r="div",...s}){const a=Bo(),l=Fo(t);if(!(a===""||a===l))return null;const i=r==="div"?Vo:$t;return e.jsx(r,{...s,...i(t,[o])})}function S(){}class he extends h.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(_e,{children:[e.jsx(v,{kind:"primary",onClick:S,children:"Primary"}),e.jsx(v,{kind:"secondary",onClick:S,children:"Secondary"}),e.jsx(v,{kind:"tertiary",onClick:S,children:"Tertiary"}),e.jsx(v,{kind:"success",onClick:S,children:"Success"}),e.jsx(v,{kind:"danger",onClick:S,children:"Danger"}),e.jsx(v,{kind:"inline",onClick:S,children:"Inline"}),e.jsx(v,{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(_e,{marginBottom:"1rem",children:[e.jsx(ae,{onClick:S,children:"Unlinked"}),e.jsx(ae,{isLinked:!0,onClick:S,children:"Linked"}),e.jsx(ae,{isLinkedSource:!0,onClick:S,children:"Linked Source"}),e.jsx(ae,{isLinked:!0,isInvalid:!0,onClick:S,children:"Error"}),e.jsx(ae,{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(v,{className:"mx-2",kind:"inline",icon:K,tooltip:"test",onClick:S}),"Toggle button (class active):",e.jsx(v,{className:"mx-2",onClick:()=>{this.setState({toggle:!o})},active:o,kind:"inline",icon:K,tooltip:"test"}),"Disabled:",e.jsx(v,{className:"mx-2",kind:"inline",disabled:!0,onClick:S,children:"Disabled"}),"With Text:",e.jsx(v,{className:"mx-2",kind:"inline",icon:K,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(v,{kind:"ghost",icon:K,tooltip:"test",onClick:S}),e.jsx("span",{className:"mx-2",children:"btn-link:"}),e.jsx(v,{kind:"ghost",onClick:S,children:"Text Button"}),e.jsx("span",{className:"mx-2",children:"btn-link (text w/ optional with icon):"}),e.jsx(v,{kind:"ghost",icon:K,onClick:S,children:"Text Button"})]})}render(){const o=he.renderButtons(),r=this.renderInlineButtons(),s=he.renderSocketedButtons(),a=he.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 Rt(){const t=$o();ho.random=Mt();const[o]=h.useState(()=>new ho(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(Sr,{model:o})})]})}const Ge="2px solid var(--dh-color-notice-bg)",Lt={"--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"},po={"--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"},Pt={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 _t(t){const o=pe.parseRgba(pe.asRgbOrRgbaString(t)??"");if(o==null||o.a<.5)return"white";const{r,g:s,b:a}=o;return pe.getBrightness([r,s,a])>=128?"black":"white"}function Bt(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"?mr(a??"").map(([n,i])=>a.substring(n,i+1)).map((n,i)=>({name:`${s}-${i}`,value:n})):{name:s,value:a}}).flat()}function ee(t,o,r,s=Lt){const a=Pt[t];return Bt(o).reduce((i,{name:c,value:u})=>{if(/^--dh-color-true-(.*?)$/.test(c)||/^--dh-color-gray-(light|mid|dark)$/.test(c))return i;const d=/^--dh-color-([^-]+)(?:-([^-]+))?/.exec(c);let m=s[c]??d?.[r]??d?.[1]??"???";return m=a[m]??m,i[m]==null&&(i[m]=[]),c in po&&i[m].push({isLabel:!0,name:po[c],value:""}),/^--dh-color-gray-(light|mid|dark)$/.test(c)||i[m].push({name:c,value:u}),i},{})}function Ft(){const t=h.useRef(null);return h.useLayoutEffect(()=>{if(t.current==null)return;const o=getComputedStyle(t.current),{backgroundColor:r}=o;t.current.style.color=_t(r)},[]),t}function Vt(t,o){const[r,s]=h.useState();return h.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 De({className:t,children:o}){const r=Ft(),s=Vt(r,":after"),a=h.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:Ge},children:[l&&e.jsx(oe,{interactive:!0,children:e.jsx("div",{children:a.value})}),o]})}function Ot(){const t=["100","200","300","400","500","600","700","800","850","8XX","900"].map(s=>e.jsx(De,{className:U("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(De,{className:U("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(De,{className:U("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 Ut extends h.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:Ke,action:()=>{alert(`Alert${r}!`)},shortcut:new re({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[M.CTRL,$.A],macShortcut:[M.CMD,$.A]})},{title:`Log Message${r}`,icon:qe,action:()=>{console.log(`Logging a message${r}!`)},shortcut:new re({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:Ao,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new re({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[M.CTRL,$.SLASH],macShortcut:[M.CMD,$.SLASH]}),group:ve.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(v,{kind:"primary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(ve,{actions:s})]}),e.jsxs(v,{kind:"tertiary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(ve,{actions:a})]})]})}}class Ht extends h.Component{constructor(o){super(o),this.sampleInput=ue.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(v,{kind:"primary",style:{marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{o?this.setState({isShown:!1}):this.setState({isShown:!0})},children:["Open Dialog",e.jsx(Tr,{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 Gt extends h.Component{constructor(o){super(o),this.state={isShown:!1}}render(){const o=[{title:"Show Alert",icon:Ke,action:()=>{alert("Alert!")},shortcut:new re({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[M.CTRL,$.A],macShortcut:[M.CMD,$.A]})},{title:"Log Message",icon:qe,action:()=>{console.log("Logging a message!")},shortcut:new re({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[M.CTRL,$.L],macShortcut:[M.CMD,$.L]})}],s=[{title:"Show Shortcuts",icon:Ao,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new re({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[M.CTRL,$.SLASH],macShortcut:[M.CMD,$.SLASH]}),group:ve.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(v,{kind:"inline",className:"mx-2",icon:gr,onClick:()=>{},children:e.jsx(lo,{actions:s})}),e.jsxs(v,{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(lo,{isShown:a,onMenuClosed:()=>{this.setState({isShown:!1})},actions:s})]})]})}}const zt=`trades = db.t("LearnDeephaven", "StockTrades").where("Date=\`2017-08-25\`")\\
|
|
1
|
+
import{r as h,ag as p,K as U,I as e,ac as _e,av as k,M as ue,_ as No,V as be,L as C,a7 as R,aK as Io,aJ as O,U as eo,bc as Wo,ax as P,by as Eo,a5 as Ko,a6 as _,a8 as qo,bz as Yo,a9 as Xo,aa as We,ad as w,aZ as Zo,bA as Be,aY as Y,aq as Qo,ab as Jo,aW as Fe,ah as Do,aO as Ve,aN as er,aQ as or,ai as rr,bB as tr,bC as sr,bD as ar,bE as X,bF as lr,bG as Ce,bH as D,aE as nr,bI as ir,bJ as cr,ba as dr,Q as hr,a4 as ur}from"./vendor-4601e84c.js";import{aV as oo,aW as W,aX as K,aL as pe,a2 as mr,aY as Ke,aZ as qe,a_ as Ao,aE as gr,a$ as ro,F as to,b0 as so,I as Oe,b1 as xr,b2 as pr,K as vr,b3 as fr,b4 as br,aH as ao,b5 as Ue,am as jr,f as yr,b6 as wr}from"./index-cc60f475.js";import{W as Cr}from"./monaco-b5248072.js";import{e as ye,G as Mo,m as Z,S as ae,L as Sr,b as Se,I as kr}from"./IrisGridModel-7202106a.js";import{B as v,u as $o,s as oe,q as re,aU as M,K as $,al as ve,aj as Tr,J as lo,cC as no,Q as Nr,C as L,aY as xe,S as fe,aQ as Ir,am as Er,d as io,a_ as Ro,A as co,bx as Q,cD as Dr,cE as Ar,by as Mr,ay as $r,a7 as Rr,aE as Lr,w as Pr}from"./ControlType-678cce9a.js";import{M as ho,e as _r,A as Br,T as Fr,D as Vr,C as Or,d as Ur,i as Hr,V as I,H as Ye,h as Gr,P as ke,L as Te,f as zr,E as J,k as Wr}from"./FontBootstrap-e95a2e21.js";import{G as te,T as Kr}from"./Grid-5d137089.js";import{a1 as Lo,O as A,l as He,m as qr,w as Yr,n as ce,P as uo,x as Xr,r as Zr,T as j,g as Qr,S as G,v as Jr,Y as et,L as ot}from"./GridRenderer-9e002c53.js";import{a as mo,D as rt}from"./IrisGridShortcuts-54989c78.js";import{N as tt,T as st,b as at}from"./useUser-8448509e.js";import{L as lt}from"./AppRoot-c6dfd449.js";import"./helpers-de833af9.js";function go(t,o,r,s,a,l,n){try{var i=t[l](n),c=i.value}catch(u){r(u);return}i.done?o(c):Promise.resolve(c).then(s,a)}function Ne(t){return function(){var o=this,r=arguments;return new Promise(function(s,a){var l=t.apply(o,r);function n(c){go(l,s,a,n,i,"next",c)}function i(c){go(l,s,a,n,i,"throw",c)}n(void 0)})}}function V(t,o,r){return o=nt(o),o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function nt(t){var o=it(t,"string");return typeof o=="symbol"?o:String(o)}function it(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 ct extends ye{constructor(){var{rowCount:o=1e9,columnCount:r=100,floatingTopRowCount:s=0,floatingBottomRowCount:a=0,floatingLeftColumnCount:l=0,floatingRightColumnCount:n=0,isEditable:i=!1,editedData:c=[]}=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=c}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 Ne(function*(){a.editedData[o]==null&&(a.editedData[o]=[]),a.editedData[o][r]="".concat(s)})()}setValueForRanges(o,r){var s=this;return Ne(function*(){Mo.forEachCell(o,(a,l)=>{s.setValueForCell(a,l,r)})})()}setValues(o){var r=this;return Ne(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 Xe=ct;function T(t,o,r){return o=dt(o),o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function dt(t){var o=ht(t,"string");return typeof o=="symbol"?o:String(o)}function ht(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 Xe{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",Z((n,i)=>{for(var c=null,u=i,d=[...n].sort((y,B)=>y[0]-B[0]),m=0;m<d.length;m+=1){var[g,f]=d[m];if(u<=g)break;var b=f.rowCount;if(u<=g+b){c=g,u=u-g-1;break}u-=b}return{key:c,offsetRow:u}})),T(this,"getCachedTextForRowHeader",Z((n,i)=>{var{key:c,offsetRow:u}=this.getCachedModelRowOffset(n,i);if(c!=null){var d=n.get(c);if(d!==void 0)return"".concat(c,".").concat(d.textForRowHeader(u))}return"".concat(u)})),T(this,"getCachedTextForCell",Z((n,i,c)=>{var{key:u,offsetRow:d}=this.getCachedModelRowOffset(n,c);if(u!=null){var m=n.get(u);if(m!==void 0)return"".concat(u,".").concat(m.textForCell(i,d))}return"".concat(i,",").concat(d)})),T(this,"getCachedIsRowExpandable",Z((n,i,c)=>{var u=this.getCachedDepthForRow(n,i);return u<c})),T(this,"getCachedIsRowExpanded",Z((n,i)=>{var{key:c,offsetRow:u}=this.getCachedModelRowOffset(n,i);if(c!=null){var d=n.get(c);if(d!==void 0)return d.isRowExpanded(u)}return n.has(u)})),T(this,"getCachedDepthForRow",Z((n,i)=>{var{key:c,offsetRow:u}=this.getCachedModelRowOffset(n,i);if(c!=null){var d=n.get(c);if(d!==void 0)return d.depthForRow(u)+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:c}=i;i.setRowExpanded(l,r,s),this.numRows+=i.rowCount-c}}else if(r){var d=new E({rowCount:this.childRowCount,columnCount:this.numColumns});n.set(l,d),this.numRows+=d.rowCount}else{var u=n.get(l);u!==void 0&&(this.numRows-=u.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 Ze=E;function Ie(t,o,r){return o=ut(o),o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function ut(t){var o=mt(t,"string");return typeof o=="symbol"?o:String(o)}function mt(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 gt extends ye{constructor(o,r){var s;super(),Ie(this,"data",void 0),Ie(this,"columnHeaders",void 0),Ie(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 xt=gt;function Ee(t,o,r){return o=pt(o),o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function pt(t){var o=vt(t,"string");return typeof o=="symbol"?o:String(o)}function vt(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 ft extends ye{constructor(o,r){super(),Ee(this,"numberOfColumns",void 0),Ee(this,"numberOfRows",void 0),Ee(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,c,u,d=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=(c=this.viewportData)===null||c===void 0||(u=c.data[d])===null||u===void 0?void 0:u[m])!==null&&i!==void 0?i:"")}textForColumnHeader(o){return"".concat(o)}textForRowHeader(o){return"".concat(o)}}const bt=ft;function N(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)}var wt="proportional",Ct=Lo.positiveBarColor,St=Lo.negativeBarColor,kt="beside",Tt="LTR",Nt="right";function It(t){return Array.isArray(t)&&t.every(o=>typeof o=="number")}class Et extends ye{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,c=arguments.length>7&&arguments[7]!==void 0?arguments[7]:new Map,u=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=c,this.markers=u,this.numberOfRows=Math.max(...o.map(g=>g.length)),this.numberOfColumns=o.length,this.columnMins=new Map,this.columnMaxs=new Map;for(var d=0;d<o.length;d+=1){var m=o[d];It(m)&&(this.columnMins.set(d,Math.min(...m)),this.columnMaxs.set(d,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:Nt}renderTypeForCell(o,r){return o<20||o%2===r%2?"dataBar":"text"}dataBarOptionsForCell(o,r){var s,a,l,n,i,c,u,d=oo(this.columnMins,o),m=oo(this.columnMaxs,o),g=(s=this.columnAxes.get(o))!==null&&s!==void 0?s:wt,f=(a=this.valuePlacements.get(o))!==null&&a!==void 0?a:kt,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:Tt,B=(n=this.positiveColors.get(o))!==null&&n!==void 0?n:Ct,se=(i=this.negativeColors.get(o))!==null&&i!==void 0?i:St,H=Number((c=this.data[o])===null||c===void 0?void 0:c[r]),q=H>=0?B:se,we=(u=this.markers.get(o))!==null&&u!==void 0?u:[];return{columnMin:d,columnMax:m,axis:g,color:q,valuePlacement:f,opacity:b,markers:we,direction:y,value:H}}}const Dt=Et,At="isolated-section-query",Po="sample-section";function*me(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],c=`${i}${n}`,u=`${i.repeat(3)}${n}`;yield h.createElement(p,{key:c,textValue:u,children:u})}}function*Qe(t,o={}){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",s=r.length,a=Object.keys(W);for(let l=0;l<t;l+=1){const n=l%s;let i=String(Math.floor(l/s));i==="0"&&(i="");const c=r[n],u=`${c}${i}`,d=o.icons===!0?a[l%a.length]:void 0,m=o.descriptions===!0?`Description ${u}`:void 0,g=d??`${c.repeat(3)}${i}`;yield{key:u,item:{key:(l+1)*100,content:g,textValue:g,description:m,icon:d}}}}function*_o(t=1){for(;;)t=t*16807%2147483647,yield t/2147483647}function xo(){return window.location.search.includes("isolateSection=true")?window.location.hash.replace(/^#/,""):""}function Bo(){const[t,o]=h.useState(xo);return h.useEffect(()=>{const r=()=>o(xo());return window.addEventListener("hashchange",r),()=>window.removeEventListener("hashchange",r)},[]),t}function Mt(t=1){const[o]=h.useState(()=>_o(t));return h.useCallback(()=>{const r=o.next();if(r.done===!0)throw new Error("Random number generator unexpectedly finished");return r.value},[o])}function Fo(t){return`${Po}-${t.toLocaleLowerCase().replaceAll(" ","-")}`}function Vo(t,o=[]){const r=Fo(t),s=U(Po,...o);return{id:r,className:s}}function $t(t,o=[]){const{id:r,className:s}=Vo(t,o);return{id:r,UNSAFE_className:s}}function x({name:t,className:o="",component:r="div",...s}){const a=Bo(),l=Fo(t);if(!(a===""||a===l))return null;const i=r==="div"?Vo:$t;return e.jsx(r,{...s,...i(t,[o])})}function S(){}class he extends h.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(_e,{children:[e.jsx(v,{kind:"primary",onClick:S,children:"Primary"}),e.jsx(v,{kind:"secondary",onClick:S,children:"Secondary"}),e.jsx(v,{kind:"tertiary",onClick:S,children:"Tertiary"}),e.jsx(v,{kind:"success",onClick:S,children:"Success"}),e.jsx(v,{kind:"danger",onClick:S,children:"Danger"}),e.jsx(v,{kind:"inline",onClick:S,children:"Inline"}),e.jsx(v,{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(_e,{marginBottom:"1rem",children:[e.jsx(ae,{onClick:S,children:"Unlinked"}),e.jsx(ae,{isLinked:!0,onClick:S,children:"Linked"}),e.jsx(ae,{isLinkedSource:!0,onClick:S,children:"Linked Source"}),e.jsx(ae,{isLinked:!0,isInvalid:!0,onClick:S,children:"Error"}),e.jsx(ae,{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(v,{className:"mx-2",kind:"inline",icon:K,tooltip:"test",onClick:S}),"Toggle button (class active):",e.jsx(v,{className:"mx-2",onClick:()=>{this.setState({toggle:!o})},active:o,kind:"inline",icon:K,tooltip:"test"}),"Disabled:",e.jsx(v,{className:"mx-2",kind:"inline",disabled:!0,onClick:S,children:"Disabled"}),"With Text:",e.jsx(v,{className:"mx-2",kind:"inline",icon:K,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(v,{kind:"ghost",icon:K,tooltip:"test",onClick:S}),e.jsx("span",{className:"mx-2",children:"btn-link:"}),e.jsx(v,{kind:"ghost",onClick:S,children:"Text Button"}),e.jsx("span",{className:"mx-2",children:"btn-link (text w/ optional with icon):"}),e.jsx(v,{kind:"ghost",icon:K,onClick:S,children:"Text Button"})]})}render(){const o=he.renderButtons(),r=this.renderInlineButtons(),s=he.renderSocketedButtons(),a=he.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 Rt(){const t=$o();ho.random=Mt();const[o]=h.useState(()=>new ho(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(Sr,{model:o})})]})}const Ge="2px solid var(--dh-color-notice-bg)",Lt={"--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"},po={"--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"},Pt={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 _t(t){const o=pe.parseRgba(pe.asRgbOrRgbaString(t)??"");if(o==null||o.a<.5)return"white";const{r,g:s,b:a}=o;return pe.getBrightness([r,s,a])>=128?"black":"white"}function Bt(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"?mr(a??"").map(([n,i])=>a.substring(n,i+1)).map((n,i)=>({name:`${s}-${i}`,value:n})):{name:s,value:a}}).flat()}function ee(t,o,r,s=Lt){const a=Pt[t];return Bt(o).reduce((i,{name:c,value:u})=>{if(/^--dh-color-true-(.*?)$/.test(c)||/^--dh-color-gray-(light|mid|dark)$/.test(c))return i;const d=/^--dh-color-([^-]+)(?:-([^-]+))?/.exec(c);let m=s[c]??d?.[r]??d?.[1]??"???";return m=a[m]??m,i[m]==null&&(i[m]=[]),c in po&&i[m].push({isLabel:!0,name:po[c],value:""}),/^--dh-color-gray-(light|mid|dark)$/.test(c)||i[m].push({name:c,value:u}),i},{})}function Ft(){const t=h.useRef(null);return h.useLayoutEffect(()=>{if(t.current==null)return;const o=getComputedStyle(t.current),{backgroundColor:r}=o;t.current.style.color=_t(r)},[]),t}function Vt(t,o){const[r,s]=h.useState();return h.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 De({className:t,children:o}){const r=Ft(),s=Vt(r,":after"),a=h.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:Ge},children:[l&&e.jsx(oe,{interactive:!0,children:e.jsx("div",{children:a.value})}),o]})}function Ot(){const t=["100","200","300","400","500","600","700","800","850","8XX","900"].map(s=>e.jsx(De,{className:U("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(De,{className:U("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(De,{className:U("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 Ut extends h.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:Ke,action:()=>{alert(`Alert${r}!`)},shortcut:new re({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[M.CTRL,$.A],macShortcut:[M.CMD,$.A]})},{title:`Log Message${r}`,icon:qe,action:()=>{console.log(`Logging a message${r}!`)},shortcut:new re({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:Ao,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new re({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[M.CTRL,$.SLASH],macShortcut:[M.CMD,$.SLASH]}),group:ve.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(v,{kind:"primary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(ve,{actions:s})]}),e.jsxs(v,{kind:"tertiary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(ve,{actions:a})]})]})}}class Ht extends h.Component{constructor(o){super(o),this.sampleInput=ue.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(v,{kind:"primary",style:{marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{o?this.setState({isShown:!1}):this.setState({isShown:!0})},children:["Open Dialog",e.jsx(Tr,{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 Gt extends h.Component{constructor(o){super(o),this.state={isShown:!1}}render(){const o=[{title:"Show Alert",icon:Ke,action:()=>{alert("Alert!")},shortcut:new re({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[M.CTRL,$.A],macShortcut:[M.CMD,$.A]})},{title:"Log Message",icon:qe,action:()=>{console.log("Logging a message!")},shortcut:new re({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[M.CTRL,$.L],macShortcut:[M.CMD,$.L]})}],s=[{title:"Show Shortcuts",icon:Ao,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new re({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[M.CTRL,$.SLASH],macShortcut:[M.CMD,$.SLASH]}),group:ve.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(v,{kind:"inline",className:"mx-2",icon:gr,onClick:()=>{},children:e.jsx(lo,{actions:s})}),e.jsxs(v,{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(lo,{isShown:a,onMenuClosed:()=>{this.setState({isShown:!1})},actions:s})]})]})}}const zt=`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_v5aa0_1",Is="_swatch_v5aa0_7",Es="_themeColors_v5aa0_1",Ds="_label_v5aa0_21",As="_capitalize_v5aa0_26",z={themeColorsPalette:Ns,swatch:Is,themeColors:Es,label:Ds,capitalize:As};function Ms(){return{"Theme Color Palette":ee("palette",ys,1),"Semantic Colors":ee("semantic",ws,1),"Chart Colors":ee("chart",Cs,2),"Editor Colors":ee("editor",Ss,2),"Grid Colors":ee("grid",ks,2),"Component Colors":ee("component",Ts,1)}}function So({name:t,value:o}){return e.jsxs(e.Fragment,{children:[e.jsx("div",{children:t}),e.jsx("div",{children:o}),e.jsx("div",{children:pe.normalizeCssColor(o,!0)})]})}function $s(){const{selectedThemeKey:t}=Ro(),o=h.useMemo(Ms,[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:z.themeColorsPalette,children:Object.entries(s).map(([l,n],i)=>e.jsxs(h.Fragment,{children:[(i===0||i===1)&&n.map(({name:c},u)=>e.jsx("div",{style:{gridColumnStart:u+2,textAlign:"center"},className:"mt-3",children:c.split("-").pop()},c)),e.jsx("div",{className:"text-right pr-2",children:l}),n.map(({name:c,value:u})=>e.jsxs("div",{style:{backgroundColor:u,border:u===""&&c.length>0?Ge:void 0},className:U(z.swatch,"px-0"),children:[e.jsx(oe,{interactive:!0,children:e.jsx(So,{name:c,value:u})}),c&&e.jsx(co,{copy:c})]},c))]},l))})]},r):e.jsxs(x,{name:r,children:[e.jsx("h2",{className:"ui-title",children:r}),e.jsx("div",{className:z.themeColors,children:Object.entries(s).map(([l,n])=>e.jsxs("div",{style:{gridRow:`span ${n.length+1}`},children:[e.jsx("span",{className:U(z.label,z.capitalize),children:l}),n.map(({isLabel:i,name:c,value:u,note:d})=>i===!0?e.jsx("span",{className:z.label,children:c},c):e.jsxs("div",{className:z.swatch,style:{border:u===""&&c.length>0?Ge:void 0},children:[e.jsx("div",{style:{backgroundColor:u,height:"var(--swatch-height)",aspectRatio:"1 / 1"}}),e.jsx(oe,{interactive:!0,children:e.jsx(So,{name:c,value:u})}),e.jsx("span",{children:c.replace("--dh-color-","")}),c.endsWith("-hue")||d!=null?e.jsx("span",{children:d??u}):null,e.jsx(co,{copy:c})]},c))]},l))})]},r))})}const Pe="data-menu-category",Rs="data-no-menu",Ls="sample-section-e2e-ignore",Uo="spectrum-component-samples",Ho="spectrum-comparison-samples";function Ps(){return e.jsxs("div",{id:Uo,children:[e.jsx("h2",{className:"ui-title","data-no-menu":!0,children:"Spectrum Components"}),e.jsxs(P,{gap:20,columns:Eo("0px","1fr"),children:[e.jsxs(x,{name:"spectrum-buttons",component:I,children:[e.jsx("h3",{children:"Buttons"}),e.jsx(_s,{})]}),e.jsxs(x,{name:"spectrum-collections",component:I,children:[e.jsx("h3",{children:"Collections"}),e.jsx(Os,{})]}),e.jsxs(x,{name:"spectrum-content",component:I,children:[e.jsx("h3",{children:"Content"}),e.jsx(Vs,{})]}),e.jsxs(x,{name:"spectrum-forms",component:I,children:[e.jsx("h3",{children:"Forms"}),e.jsx(Fs,{})]}),e.jsxs(x,{name:"spectrum-overlays",component:I,children:[e.jsx("h3",{children:"Overlays"}),e.jsxs(k,{gap:"size-160",children:[e.jsx(Bs,{}),e.jsxs(Ko,{children:[e.jsx(_,{children:"Dialog Trigger"}),t=>e.jsxs(qo,{children:[e.jsx(Ye,{children:"Some Heading"}),e.jsx(Yo,{children:"Some Header"}),e.jsx(Xo,{}),e.jsx(We,{children:e.jsx(j,{children:"Are you sure?"})}),e.jsxs(_e,{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(Zo,{children:"This is a well."})]})]})]})}function _s(){return e.jsxs(e.Fragment,{children:[e.jsxs(_,{marginBottom:"size-200",children:[e.jsx(R,{children:e.jsx(C,{icon:K})}),e.jsx(j,{children:"Icon Button"})]}),e.jsxs(P,{autoFlow:"column",columnGap:"size-250",rowGap:"size-150",columns:Be(4,Eo(0,"size-2000")),rows:Be(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(Y,{children:"Normal"}),e.jsx(Y,{isQuiet:!0,children:"Quiet"}),e.jsx(Y,{gridRow:"span 2",isEmphasized:!0,children:"Emphasized"}),e.jsx(Y,{staticColor:"black",children:"Static Black"}),e.jsx(Y,{staticColor:"white",children:"Static White"}),e.jsx(Y,{isDisabled:!0,children:"Disabled"})]})]})}function Bs(){return e.jsxs(e.Fragment,{children:[e.jsx(j,{children:"Contextual Help"}),e.jsxs(Qo,{variant:"info",children:[e.jsx(Ye,{children:"Need help?"}),e.jsx(We,{children:e.jsx(j,{children:"This is a helpful description of the thing you need help with."})})]})]})}function Fs(){return e.jsx(Jo,{children:e.jsxs(P,{gap:20,columns:Be("auto-fit","210px"),alignItems:"end",children:[e.jsx(Fe,{label:"Text Field"}),e.jsxs(Do,{label:"Combobox",menuTrigger:"focus",defaultSelectedKey:"two",children:[e.jsx(p,{children:"One"},"one"),e.jsx(p,{children:"Two"},"two"),e.jsx(p,{children:"Three"},"three")]}),e.jsx(Ve,{children:"Checkbox"}),e.jsx(er,{label:"Slider",defaultValue:24}),e.jsx(or,{children:"Switch"})]})})}function Vs(){return e.jsxs(rr,{children:[e.jsx(R,{size:"XL",children:e.jsx(C,{icon:vr})}),e.jsx(Ye,{children:"Illustrated Message"}),e.jsx(We,{children:"This is the content of the message."})]})}function Os(){return e.jsxs(e.Fragment,{children:[e.jsx("label",{id:"table-view-sample",children:"List View"}),e.jsxs(tr,{"aria-labelledby":"table-view-sample",selectionMode:"multiple",maxWidth:"size-6000",marginBottom:"size-200",children:[e.jsx(p,{children:"One"}),e.jsx(p,{children:"Two"}),e.jsx(p,{children:"Three"}),e.jsx(p,{children:"Four"})]}),e.jsx("label",{id:"table-view-sample",children:"Table View"}),e.jsxs(sr,{"aria-labelledby":"table-view-sample",selectionMode:"multiple",children:[e.jsxs(ar,{children:[e.jsxs(X,{title:"Person",children:[e.jsx(X,{allowsResizing:!0,children:"Name"}),e.jsx(X,{children:"Age"})]}),e.jsxs(X,{title:"Address",children:[e.jsx(X,{allowsResizing:!0,children:"City"}),e.jsx(X,{children:"State"})]})]}),e.jsxs(lr,{children:[e.jsxs(Ce,{children:[e.jsx(D,{children:"John"}),e.jsx(D,{children:"42"}),e.jsx(D,{children:"San Francisco"}),e.jsx(D,{children:"CA"})]}),e.jsxs(Ce,{children:[e.jsx(D,{children:"Jane"}),e.jsx(D,{children:"38"}),e.jsx(D,{children:"San Francisco"}),e.jsx(D,{children:"CA"})]}),e.jsxs(Ce,{children:[e.jsx(D,{children:"Becky"}),e.jsx(D,{children:"12"}),e.jsx(D,{children:"San Francisco"}),e.jsx(D,{children:"CA"})]})]})]})]})}function le(t){return e.jsx("div",{...t})}function Us(){const[t,o]=h.useState([]);h.useEffect(()=>{let s={category:"",items:[]};const a=[s],l=document.querySelector(`#${Uo}`),n=document.querySelector(`#sample-section-${Ho}`);document.querySelectorAll(`h2,h3,[${Pe}]`).forEach(i=>{if(i.textContent==null||i.hasAttribute(Rs))return;if(i.hasAttribute(Pe)){s={category:i.getAttribute(Pe)??"",items:[]},a.push(s);return}const u=`${l?.contains(i)===!0?"spectrum-":n?.contains(i)===!0?"spectrum-compare-":""}${i.textContent}`.toLowerCase().replace(/\s/g,"-");i.id=u,s.items.push({id:u,label:i.textContent})}),o(a)},[]),h.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=h.useCallback(s=>{const a=String(s);document.getElementById(a)?.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{window.location.hash=a},1e3)},[]);return e.jsxs(nr,{children:[e.jsx(_,{children:e.jsx(R,{children:e.jsx(C,{icon:fr})})}),e.jsx(ir,{items:t,onAction:r,children:({category:s,items:a})=>e.jsx(cr,{items:a,title:s,children:({id:l,label:n})=>e.jsx(p,{children:n},l)},s)})]})}function Hs(){const t=h.useCallback(()=>{window.scrollTo({top:0,behavior:"smooth"}),setTimeout(()=>{window.location.hash=""},500)},[]);return h.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:br})})})}const Gs=["Tab 1","Tab 2","Tab 3"];function zs({isActive:t,title:o}){return e.jsxs("li",{className:U("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 Ws(){return e.jsxs(x,{name:"golden-layout",children:[e.jsx("h2",{className:"ui-title",children:"Golden Layout"}),[!1,!0].map(t=>e.jsxs(ue.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:Gs.map((o,r)=>e.jsx(zs,{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 Ks(){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(Gr,{})})]})}const ko=[["primary","accent"],["secondary","primary"],["danger","negative"]],qs=[{title:"One",value:"1"},{title:"Two",value:"2"},{title:"Three",value:"3"}];function Ys(){const[t,o]=h.useState(!1);return e.jsxs(x,{name:Ho,className:Ls,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"}),ko.map(([r,s])=>e.jsxs(h.Fragment,{children:[e.jsx(v,{onClick:Q,kind:r,icon:ao,children:"Button"}),e.jsxs(w,{variant:s,style:"fill",children:[e.jsx(R,{children:e.jsx(C,{icon:ao})}),e.jsx(j,{children:"Button"})]})]},r)),e.jsx(v,{onClick:Q,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"}),ko.map(([r,s])=>e.jsxs(h.Fragment,{children:[e.jsx(v,{onClick:Q,kind:r,children:r}),e.jsx(w,{variant:s,style:"outline",children:s})]},r)),e.jsx(v,{onClick:Q,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(v,{onClick:Q,kind:"inline",children:"Inline"}),e.jsx(_,{children:"Action"}),e.jsx(v,{onClick:Q,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(h.Fragment,{children:[e.jsxs("div",{children:[e.jsxs("label",{className:"input-label",children:[r?"Disabled ":"","Combobox"]}),e.jsx(He,{disabled:r,options:qs,defaultValue:"One"})]}),e.jsxs(Do,{isDisabled:r,label:r?"Disabled Combobox":"Combobox",inputValue:"One",children:[e.jsx(p,{children:"One"},"1"),e.jsx(p,{children:"Two"},"2"),e.jsx(p,{children:"Three"},"3")]})]},String(r))),[!1,!0].map(r=>e.jsxs(h.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"input-label",children:"Select"}),e.jsxs(fe,{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(dr,{isDisabled:r,label:r?"Disabled Picker":"Picker",placeholder:"Picker",children:[e.jsx(p,{children:"One"},"1"),e.jsx(p,{children:"Two"},"2"),e.jsx(p,{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(Fe,{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(Fe,{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(Ve,{children:"Checkbox"}),e.jsx(L,{className:"form-group",disabled:!0,checked:t,onChange:()=>o(r=>!r),children:"Disabled"}),e.jsx(Ve,{isDisabled:!0,children:"Disabled"})]})]})]})]})}const Xs=[...Qe(52)],Zs=[...Qe(52,{icons:!0})],Go=[...me(0,51)],Qs=[...me(52,103)],Js=[...me(104,155)],ea=[...me(156,207)],oa=[...me(208,259)],ra=["String 1","String 2","String 3","","Some really long text that should get truncated",444,999,!0,!1,...Go.map((t,o)=>o%5>0?t:h.cloneElement(t,{...t.props,children:[e.jsx(de,{},`icon-${t.props.children}`),e.jsx(j,{children:t.props.children},`label-${t.props.children}`)]}))];function de(){return e.jsx(R,{children:e.jsx(C,{icon:Ue})})}function ta(){const[t,o]=h.useState(null),[r,s]=h.useState(!0),a=h.useCallback(async()=>Qr({keyedItems:Xs,itemHeight:Dr.medium,selectedKey:t,topOffset:Ar}),[t]),l=h.useCallback(n=>{o(n)},[]);return e.jsxs(x,{name:"pickers",children:[e.jsx("h2",{className:"ui-title",children:"Pickers"}),e.jsxs(k,{gap:14,direction:"column",children:[e.jsxs(k,{direction:"row",gap:14,children:[e.jsx(ke,{label:"Single Child",tooltip:{placement:"bottom-end"},children:e.jsx(p,{textValue:"Aaa",children:"Aaa"})}),e.jsx(ke,{label:"Mixed Children Types",defaultSelectedKey:"999",tooltip:!0,children:ra}),e.jsxs(ke,{label:"Sections",tooltip:!0,children:["String 1","String 2","String 3",e.jsxs(G,{title:"Section",children:[e.jsx(p,{textValue:"Item Aaa",children:"Item Aaa"}),e.jsx(p,{textValue:"Item Bbb",children:"Item Bbb"}),e.jsxs(p,{textValue:"Complex Ccc",children:[e.jsx(de,{}),e.jsx(j,{children:"Complex Ccc"})]})]}),e.jsxs(G,{children:[e.jsx(p,{textValue:"Item Ddd",children:"Item Ddd"}),e.jsx(p,{textValue:"Item Eee",children:"Item Eee"}),e.jsxs(p,{textValue:"Complex Fff",children:[e.jsx(de,{}),e.jsx(j,{children:"Complex Fff"})]}),e.jsxs(p,{textValue:"Ggg",children:[e.jsx(de,{}),e.jsx(j,{children:"Label"}),e.jsx(j,{slot:"description",children:"Description"})]}),e.jsxs(p,{textValue:"Hhh",children:[e.jsx(de,{}),e.jsx(j,{children:"Label that causes overflow"}),e.jsx(j,{slot:"description",children:"Description that causes overflow"})]})]},"Key B"),e.jsx(G,{title:"Section A",children:Go}),e.jsx(G,{title:"Section B",children:Qs}),e.jsx(G,{children:Js},"Section C"),e.jsx(G,{children:ea},"Section D"),e.jsx(G,{title:"Section E",children:oa})]})]}),e.jsx(L,{checked:r,onChange:n=>s(n.currentTarget.checked),children:"Show Ions"}),e.jsx(k,{direction:"row",gap:14,children:e.jsx(Jr,{label:"Controlled",getInitialScrollPosition:a,normalizedItems:Zs,selectedKey:t,showItemIcons:r,onChange:l})})]})]})}const sa=[...Qe(52,{icons:!0})];function ne(){return e.jsx(R,{slot:"illustration",children:e.jsx(C,{icon:wr})})}const ze={gap:10,label:{medium:21,large:25.5}};function ie({label:t,direction:o="column",children:r,...s}){return e.jsxs(k,{...s,direction:o,gap:ze.gap,children:[e.jsx(j,{children:t}),r]})}function aa(){const{scale:t}=et(),[o,r]=h.useState([]),[s,a]=h.useState("compact"),l=ze.label[t]+ze.gap+2+Mr[s??"compact"][t],n=h.useCallback(y=>{a(y)},[]),[i,c]=h.useState(!0),[u,d]=h.useState(""),[m,g]=h.useState(""),f=h.useCallback((y,B)=>{d(y),g(B)},[]),b=h.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(ie,{alignItems:"center",direction:"row",label:"Density",gridColumn:"span 3",children:e.jsxs(Io,{"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(ie,{label:"Single Child",gridColumn:"span 3",height:"100%",children:e.jsx(Te,{density:s,"aria-label":"Single Child",selectionMode:"multiple",children:e.jsx(p,{textValue:"Aaa",children:"Aaa"})})}),e.jsx(ie,{label:"Icons",gridColumn:"span 2",children:e.jsxs(Te,{"aria-label":"Icon",density:s,selectionMode:"multiple",children:[e.jsxs(p,{textValue:"Item with icon A",children:[e.jsx(ne,{}),e.jsx(j,{children:"Item with icon A"})]}),e.jsxs(p,{textValue:"Item with icon B",children:[e.jsx(ne,{}),e.jsx(j,{children:"Item with icon B"})]}),e.jsxs(p,{textValue:"Item with icon C",children:[e.jsx(ne,{}),e.jsx(j,{children:"Item with icon C"})]}),e.jsxs(p,{textValue:"Item with icon D",children:[e.jsx(ne,{}),e.jsx(j,{children:"Item with icon D with overflowing content"})]}),e.jsxs(p,{textValue:"Item with icon E",children:[e.jsx(ne,{}),e.jsx(j,{children:"Item with icon E"})]})]})}),e.jsx(ie,{label:"Mixed Children Types",children:e.jsxs(Te,{"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(p,{textValue:"Item Aaa",children:"Item Aaa"}),e.jsx(p,{textValue:"Item Bbb",children:"Item Bbb"}),e.jsxs(p,{textValue:"Item with Description",children:[e.jsx(j,{children:"Item with Description"}),e.jsx(j,{slot:"description",children:"Description"})]}),e.jsxs(p,{textValue:"Complex Ccc",children:[e.jsx(R,{slot:"image",children:e.jsx(C,{icon:Ue})}),e.jsx(j,{children:"Complex Ccc with text that should be truncated"})]}),e.jsxs(p,{textValue:"Complex Ccc with Description",children:[e.jsx(R,{slot:"image",children:e.jsx(C,{icon:Ue})}),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=>c(y.currentTarget.checked),children:"Show Ions"})}),e.jsxs(ie,{label:"Controlled",gridColumn:"span 2",children:[e.jsx(zr,{"aria-label":"Controlled",density:s,normalizedItems:sa,selectionMode:"multiple",selectedKeys:o,showItemIcons:i,onChange:b,actions:e.jsxs(ot,{overflowMode:"collapse",buttonLabelBehavior:"collapse",maxWidth:80,onAction:f,children:[e.jsxs(p,{children:[e.jsx(R,{children:e.jsx(C,{icon:jr})}),e.jsx(j,{children:"Edit"})]},"Edit"),e.jsxs(p,{children:[e.jsx(R,{children:e.jsx(C,{icon:yr})}),e.jsx(j,{children:"Delete"})]},"Delete")]})}),u," ",m]})]})]})}function la(){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(J,{message:o})}),e.jsx("div",{className:"col",style:t,children:e.jsx(J,{message:r,type:a})}),e.jsx("div",{className:"col",style:t,children:e.jsx(J,{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(J,{message:o,isExpanded:!0})}),e.jsx("div",{className:"col",style:t,children:e.jsx(J,{message:r,type:a,isExpanded:!0})}),e.jsx("div",{className:"col",style:t,children:e.jsx(J,{message:s,type:l,isExpanded:!0})})]})]})}const To={position:"sticky",justifyContent:"end",zIndex:1,UNSAFE_style:{float:"right"}};function na(){const{themes:t}=Ro(),o=t.length>1,r=Bo()!=="";return e.jsx("div",{tabIndex:-1,role:"main",children:e.jsxs("div",{className:U("container","style-guide-container",r&&At),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,{...To,UNSAFE_className:r?"hide-when-isolated":void 0,marginTop:-56,top:20,gap:10,alignItems:"end",children:[o?e.jsx(st,{}):null,e.jsx(Us,{})]}),e.jsx(k,{...To,UNSAFE_className:r?"hide-when-isolated":void 0,top:"calc(100vh - 40px)",marginTop:-32,marginEnd:o?-234:0,children:e.jsx(Hs,{})}),e.jsx(ms,{}),e.jsx(le,{"data-menu-category":"Colors"}),e.jsx(Ot,{}),e.jsx($s,{}),e.jsx(le,{"data-menu-category":"Layout"}),e.jsx(Ws,{}),e.jsx(le,{"data-menu-category":"Components"}),e.jsx(he,{}),e.jsx(ds,{}),e.jsx(ls,{}),e.jsx(aa,{}),e.jsx(ta,{}),e.jsx(is,{}),e.jsx(je,{}),e.jsx(hs,{}),e.jsx(Ht,{}),e.jsx(cs,{}),e.jsx(Ut,{}),e.jsx(Gt,{}),e.jsx(js,{}),e.jsx(us,{}),e.jsx(ss,{}),e.jsx(Kt,{}),e.jsx(os,{}),e.jsx(Rt,{}),e.jsx(at,{}),e.jsx(Ks,{}),e.jsx(le,{"data-menu-category":"Spectrum Components"}),e.jsx(Ps,{}),e.jsx(le,{"data-menu-category":"Spectrum Comparison"}),e.jsx(Ys,{}),e.jsx(la,{})]})})}function Je(t){const{workspace:o,setWorkspace:r}=t;return h.useEffect(()=>{lt.makeDefaultWorkspace({getLayouts:async()=>[],getLayout:async()=>({})}).then(r)},[r]),o!=null?e.jsx(na,{}):null}Je.propTypes={workspace:be.shape({}),setWorkspace:be.func.isRequired};Je.defaultProps={workspace:null};const ia=t=>({workspace:Rr(t)}),ca=hr(ia,{setWorkspace:$r})(Je);function wa(){return rt.register(new URL("./download/serviceWorker.js",window.location.href)),Lr.init({getWorker:()=>new Cr}),window["__react-beautiful-dnd-disable-dev-warnings"]=!0,e.jsx(Wr,{children:e.jsx(ur,{store:Pr,children:e.jsx(ca,{})})})}export{wa as StyleGuideRoot,wa as default};
|
|
214
|
-
//# sourceMappingURL=StyleGuideRoot-
|
|
214
|
+
//# sourceMappingURL=StyleGuideRoot-1282b337.js.map
|