@deephaven/code-studio 0.89.1-beta.3 → 0.90.1-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-72bdb0ec.js → AppRoot-6a34708c.js} +3 -3
- package/build/assets/{AppRoot-72bdb0ec.js.map → AppRoot-6a34708c.js.map} +1 -1
- package/build/assets/{Chart-982c1e4c.js → Chart-56f9850b.js} +2 -2
- package/build/assets/{Chart-982c1e4c.js.map → Chart-56f9850b.js.map} +1 -1
- package/build/assets/{ControlType-aad93e22.js → ControlType-5f141b46.js} +3 -3
- package/build/assets/{ControlType-aad93e22.js.map → ControlType-5f141b46.js.map} +1 -1
- package/build/assets/{FontBootstrap-e2993739.js → FontBootstrap-0329fac4.js} +2 -2
- package/build/assets/{FontBootstrap-e2993739.js.map → FontBootstrap-0329fac4.js.map} +1 -1
- package/build/assets/{FormatterUtils-b084c90b.js → FormatterUtils-3f38cab5.js} +2 -2
- package/build/assets/{FormatterUtils-b084c90b.js.map → FormatterUtils-3f38cab5.js.map} +1 -1
- package/build/assets/{Grid-f2f3fbeb.js → Grid-8c497531.js} +2 -2
- package/build/assets/{Grid-f2f3fbeb.js.map → Grid-8c497531.js.map} +1 -1
- package/build/assets/{IrisGrid-e1d10a87.js → IrisGrid-1c4d18d6.js} +2 -2
- package/build/assets/{IrisGrid-e1d10a87.js.map → IrisGrid-1c4d18d6.js.map} +1 -1
- package/build/assets/{IrisGridModel-e9fc5ada.js → IrisGridModel-79e90a27.js} +2 -2
- package/build/assets/{IrisGridModel-e9fc5ada.js.map → IrisGridModel-79e90a27.js.map} +1 -1
- package/build/assets/{IrisGridShortcuts-f6cc6409.js → IrisGridShortcuts-7e675e6c.js} +2 -2
- package/build/assets/{IrisGridShortcuts-f6cc6409.js.map → IrisGridShortcuts-7e675e6c.js.map} +1 -1
- package/build/assets/{IrisGridThemeProvider-5b0ef26e.js → IrisGridThemeProvider-e34ebbc5.js} +2 -2
- package/build/assets/{IrisGridThemeProvider-5b0ef26e.js.map → IrisGridThemeProvider-e34ebbc5.js.map} +1 -1
- package/build/assets/{LocalWorkspaceStorage-8f15b332.js → LocalWorkspaceStorage-f5194de1.js} +2 -2
- package/build/assets/{LocalWorkspaceStorage-8f15b332.js.map → LocalWorkspaceStorage-f5194de1.js.map} +1 -1
- package/build/assets/{MarkdownEditor-a926bb89.js → MarkdownEditor-dba47d8c.js} +2 -2
- package/build/assets/{MarkdownEditor-a926bb89.js.map → MarkdownEditor-dba47d8c.js.map} +1 -1
- package/build/assets/{MarkdownNotebook-6a54b413.js → MarkdownNotebook-96ff539e.js} +2 -2
- package/build/assets/{MarkdownNotebook-6a54b413.js.map → MarkdownNotebook-96ff539e.js.map} +1 -1
- package/build/assets/{MissingPartitionError-c813b4be.js → MissingPartitionError-adfe5ad0.js} +2 -2
- package/build/assets/{MissingPartitionError-c813b4be.js.map → MissingPartitionError-adfe5ad0.js.map} +1 -1
- package/build/assets/{StyleGuideRoot-4b5cf2e3.js → StyleGuideRoot-df333f01.js} +2 -2
- package/build/assets/{StyleGuideRoot-4b5cf2e3.js.map → StyleGuideRoot-df333f01.js.map} +1 -1
- package/build/assets/{TokenBoxCellRenderer-5e9a3b7e.js → TokenBoxCellRenderer-95ab65e6.js} +2 -2
- package/build/assets/{TokenBoxCellRenderer-5e9a3b7e.js.map → TokenBoxCellRenderer-95ab65e6.js.map} +1 -1
- package/build/assets/{index-73ed3e7e.js → index-0a08609e.js} +2 -2
- package/build/assets/{index-73ed3e7e.js.map → index-0a08609e.js.map} +1 -1
- package/build/assets/{index-a6ab7b46.js → index-0a714cbd.js} +3 -3
- package/build/assets/{index-a6ab7b46.js.map → index-0a714cbd.js.map} +1 -1
- package/build/assets/{index-ca124227.js → index-31948f17.js} +2 -2
- package/build/assets/{index-ca124227.js.map → index-31948f17.js.map} +1 -1
- package/build/index.html +2 -2
- package/package.json +30 -30
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var or=Object.defineProperty;var rr=(t,o,r)=>o in t?or(t,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[o]=r;var L=(t,o,r)=>(rr(t,typeof o!="symbol"?o+"":o,r),r);import{r as u,a9 as v,M as G,J as e,an as Ge,aE as C,V as xe,ab as Po,a2 as Ce,N as S,aj as P,aT as Lo,aS as U,a1 as no,bi as tr,aG as B,bz as _o,ah as sr,ai as F,ak as ar,bA as lr,al as nr,a8 as eo,ao as w,b5 as ir,bB as ze,b4 as Z,a7 as cr,am as dr,b2 as We,ar as hr,aX as Ke,aW as ur,a6 as mr,as as gr,bC as xr,bD as pr,bE as vr,bF as J,bG as fr,bH as Ie,bI as A,aN as br,bJ as jr,bK as yr,bg as wr,_ as Cr,W as Sr}from"./vendor-808b021e.js";import{b9 as io,ba as q,bb as X,a$ as je,a4 as kr,bc as oo,bd as ro,be as Bo,aT as Tr,bf as co,bg as ho,bh as uo,U as qe,bi as Nr,bj as Ir,N as Er,bk as Dr,bl as Ar,aW as mo,bm as Xe,aq as Mr,f as $r,bn as Rr,s as Pr}from"./index-ca124227.js";import{W as Lr}from"./monaco-9ad65137.js";import{e as Te,G as Fo,m as Q,S as ne,L as _r,d as Ee,I as De,c as Br,a as Ae}from"./IrisGridModel-e9fc5ada.js";import{B as p,u as Vo,s as te,q as se,aO as $,K as R,aj as ye,ah as Fr,N as go,cC as xo,R as Vr,C as _,aT as fe,S as we,aI as Or,ak as Ur,d as po,E as Oo,J as vo,bv as ee,av as Hr,a4 as Gr,ax as zr}from"./ControlType-aad93e22.js";import{M as fo,H as Wr,A as Kr,T as qr,D as Xr,d as Yr,c as Zr,h as Jr,V as E,g as Qr,C as et,L as Me,e as ot,E as oe,j as rt}from"./FontBootstrap-e2993739.js";import{G as ae,T as tt}from"./Grid-f2f3fbeb.js";import{G as Uo,O as M,C as Ye,b as st,S as at,c as he,P as bo,h as lt,e as nt,g as it,L as ct}from"./TokenBoxCellRenderer-5e9a3b7e.js";import{k as jo,T as j,g as dt,P as ht,o as ut,p as W,Q as mt,L as gt,D as xt}from"./IrisGridShortcuts-f6cc6409.js";import{N as pt,H as to,P as yo,T as vt,b as ft,j as bt}from"./LocalWorkspaceStorage-8f15b332.js";import"./helpers-de833af9.js";import"./useMergeRef-9935f949.js";function wo(t,o,r,s,a,l,n){try{var c=t[l](n),d=c.value}catch(h){r(h);return}c.done?o(d):Promise.resolve(d).then(s,a)}function $e(t){return function(){var o=this,r=arguments;return new Promise(function(s,a){var l=t.apply(o,r);function n(d){wo(l,s,a,n,c,"next",d)}function c(d){wo(l,s,a,n,c,"throw",d)}n(void 0)})}}function O(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 Te{constructor(){var{rowCount:o=1e9,columnCount:r=100,floatingTopRowCount:s=0,floatingBottomRowCount:a=0,floatingLeftColumnCount:l=0,floatingRightColumnCount:n=0,isEditable:c=!1,editedData:d=[]}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),O(this,"numRows",void 0),O(this,"numColumns",void 0),O(this,"floatingTop",void 0),O(this,"floatingBottom",void 0),O(this,"floatingLeft",void 0),O(this,"floatingRight",void 0),O(this,"editable",void 0),O(this,"editedData",void 0),this.numRows=o,this.numColumns=r,this.floatingTop=s,this.floatingBottom=a,this.floatingLeft=l,this.floatingRight=n,this.editable=c,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 $e(function*(){a.editedData[o]==null&&(a.editedData[o]=[]),a.editedData[o][r]="".concat(s)})()}setValueForRanges(o,r){var s=this;return $e(function*(){Fo.forEachCell(o,(a,l)=>{s.setValueForCell(a,l,r)})})()}setValues(o){var r=this;return $e(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 so=wt;function T(t,o,r){return o=Ct(o),o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function Ct(t){var o=St(t,"string");return typeof o=="symbol"?o:String(o)}function St(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 D extends so{constructor(){var{rowCount:o=D.DEFAULT_ROW_COUNT,columnCount:r=D.DEFAULT_COLUMN_COUNT,children:s=new Map,childRowCount:a=Math.ceil(Math.max(D.MIN_CHILD_ROW_COUNT,o*D.DEFAULT_CHILD_ROW_COUNT_FACTOR)),maxDepth:l=D.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,c)=>{for(var d=null,h=c,i=[...n].sort((b,N)=>b[0]-N[0]),m=0;m<i.length;m+=1){var[g,f]=i[m];if(h<=g)break;var y=f.rowCount;if(h<=g+y){d=g,h=h-g-1;break}h-=y}return{key:d,offsetRow:h}})),T(this,"getCachedTextForRowHeader",Q((n,c)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,c);if(d!=null){var i=n.get(d);if(i!==void 0)return"".concat(d,".").concat(i.textForRowHeader(h))}return"".concat(h)})),T(this,"getCachedTextForCell",Q((n,c,d)=>{var{key:h,offsetRow:i}=this.getCachedModelRowOffset(n,d);if(h!=null){var m=n.get(h);if(m!==void 0)return"".concat(h,".").concat(m.textForCell(c,i))}return"".concat(c,",").concat(i)})),T(this,"getCachedIsRowExpandable",Q((n,c,d)=>{var h=this.getCachedDepthForRow(n,c);return h<d})),T(this,"getCachedIsRowExpanded",Q((n,c)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,c);if(d!=null){var i=n.get(d);if(i!==void 0)return i.isRowExpanded(h)}return n.has(h)})),T(this,"getCachedDepthForRow",Q((n,c)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,c);if(d!=null){var i=n.get(d);if(i!==void 0)return i.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 c=this.children.get(a);if(c!==void 0){var{rowCount:d}=c;c.setRowExpanded(l,r,s),this.numRows+=c.rowCount-d}}else if(r){var i=new D({rowCount:this.childRowCount,columnCount:this.numColumns});n.set(l,i),this.numRows+=i.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(D,"DEFAULT_ROW_COUNT",1e9);T(D,"DEFAULT_COLUMN_COUNT",100);T(D,"DEFAULT_CHILD_ROW_COUNT_FACTOR",.01);T(D,"MIN_CHILD_ROW_COUNT",10);T(D,"MAX_DEPTH",10);const me=D;function Re(t,o,r){return o=kt(o),o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function kt(t){var o=Tt(t,"string");return typeof o=="symbol"?o:String(o)}function Tt(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 Nt extends Te{constructor(o,r){var s;super(),Re(this,"data",void 0),Re(this,"columnHeaders",void 0),Re(this,"numberOfColumns",void 0),this.data=o,this.numberOfColumns=Math.max(...o.map(a=>a.length),(s=r==null?void 0: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 It=Nt;function Pe(t,o,r){return o=Et(o),o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function Et(t){var o=Dt(t,"string");return typeof o=="symbol"?o:String(o)}function Dt(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 At extends Te{constructor(o,r){super(),Pe(this,"numberOfColumns",void 0),Pe(this,"numberOfRows",void 0),Pe(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,c,d,h,i=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((c=(d=this.viewportData)===null||d===void 0||(h=d.data[i])===null||h===void 0?void 0:h[m])!==null&&c!==void 0?c:"")}textForColumnHeader(o){return"".concat(o)}textForRowHeader(o){return"".concat(o)}}const Mt=At;function I(t,o,r){return o=$t(o),o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function $t(t){var o=Rt(t,"string");return typeof o=="symbol"?o:String(o)}function Rt(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 Pt="proportional",Lt=Uo.positiveBarColor,_t=Uo.negativeBarColor,Bt="beside",Ft="LTR",Vt="right";function Ot(t){return Array.isArray(t)&&t.every(o=>typeof o=="number")}class Ut extends Te{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,c=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(),I(this,"numberOfColumns",void 0),I(this,"numberOfRows",void 0),I(this,"data",void 0),I(this,"columnMins",void 0),I(this,"columnMaxs",void 0),I(this,"columnAxes",void 0),I(this,"valuePlacements",void 0),I(this,"directions",void 0),I(this,"positiveColors",void 0),I(this,"negativeColors",void 0),I(this,"opacities",void 0),I(this,"textAlignments",void 0),I(this,"markers",void 0),this.positiveColors=s,this.negativeColors=a,this.data=o,this.columnAxes=r,this.valuePlacements=l,this.opacities=n,this.directions=c,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 i=0;i<o.length;i+=1){var m=o[i];Ot(m)&&(this.columnMins.set(i,Math.min(...m)),this.columnMaxs.set(i,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:Vt}renderTypeForCell(o,r){return o<20||o%2===r%2?"dataBar":"text"}dataBarOptionsForCell(o,r){var s,a,l,n,c,d,h,i=io(this.columnMins,o),m=io(this.columnMaxs,o),g=(s=this.columnAxes.get(o))!==null&&s!==void 0?s:Pt,f=(a=this.valuePlacements.get(o))!==null&&a!==void 0?a:Bt,y=this.opacities.get(o);y==null||y>1?y=1:y<0&&(y=0);var b=(l=this.directions.get(o))!==null&&l!==void 0?l:Ft,N=(n=this.positiveColors.get(o))!==null&&n!==void 0?n:Lt,le=(c=this.negativeColors.get(o))!==null&&c!==void 0?c:_t,z=Number((d=this.data[o])===null||d===void 0?void 0:d[r]),Y=z>=0?N:le,Ne=(h=this.markers.get(o))!==null&&h!==void 0?h:[];return{columnMin:i,columnMax:m,axis:g,color:Y,valuePlacement:f,opacity:y,markers:Ne,direction:b,value:z}}}const Ht=Ut,Gt="isolated-section-query",Ho="sample-section";function*pe(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 c=r[l],d=`${c}${n}`,h=`${c.repeat(3)}${n}`;yield u.createElement(v,{key:d,textValue:h,children:h})}}function*ao(t,o={}){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",s=r.length,a=Object.keys(q);for(let l=0;l<t;l+=1){const n=l%s;let c=String(Math.floor(l/s));c==="0"&&(c="");const d=r[n],h=`${d}${c}`,i=o.icons===!0?a[l%a.length]:void 0,m=o.descriptions===!0?`Description ${h}`:void 0,g=i??`${d.repeat(3)}${c}`;yield{key:h,item:{key:(l+1)*100,content:g,textValue:g,description:m,icon:i}}}}function*Go(t=1){for(;;)t=t*16807%2147483647,yield t/2147483647}function Co(){return window.location.search.includes("isolateSection=true")?window.location.hash.replace(/^#/,""):""}function zo(){const[t,o]=u.useState(Co);return u.useEffect(()=>{const r=()=>o(Co());return window.addEventListener("hashchange",r),()=>window.removeEventListener("hashchange",r)},[]),t}function zt(t=1){const[o]=u.useState(()=>Go(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 Wo(t){return`${Ho}-${t.toLocaleLowerCase().replaceAll(" ","-")}`}function Ko(t,o=[]){const r=Wo(t),s=G(Ho,...o);return{id:r,className:s}}function Wt(t,o=[]){const{id:r,className:s}=Ko(t,o);return{id:r,UNSAFE_className:s}}function x({name:t,className:o="",component:r="div",...s}){const a=zo(),l=Wo(t);if(!(a===""||a===l))return null;const c=r==="div"?Ko:Wt;return e.jsx(r,{...s,...c(t,[o])})}function k(){}class ge 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(Ge,{children:[e.jsx(p,{kind:"primary",onClick:k,children:"Primary"}),e.jsx(p,{kind:"secondary",onClick:k,children:"Secondary"}),e.jsx(p,{kind:"tertiary",onClick:k,children:"Tertiary"}),e.jsx(p,{kind:"success",onClick:k,children:"Success"}),e.jsx(p,{kind:"danger",onClick:k,children:"Danger"}),e.jsx(p,{kind:"inline",onClick:k,children:"Inline"}),e.jsx(p,{kind:"ghost",onClick:k,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(C,{gap:"1rem",children:Object.entries(o).map(([r,s])=>e.jsxs("a",{className:`text-${r}`,children:[r," (",s,")"]},r))})]})}static renderSocketedButtons(){return e.jsxs(x,{name:"buttons-socketed",children:[e.jsx("h5",{children:"Socketed Buttons (for linker)"}),e.jsxs(Ge,{marginBottom:"1rem",children:[e.jsx(ne,{onClick:k,children:"Unlinked"}),e.jsx(ne,{isLinked:!0,onClick:k,children:"Linked"}),e.jsx(ne,{isLinkedSource:!0,onClick:k,children:"Linked Source"}),e.jsx(ne,{isLinked:!0,isInvalid:!0,onClick:k,children:"Error"}),e.jsx(ne,{disabled:!0,onClick:k,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:X,tooltip:"test",onClick:k}),"Toggle button (class active):",e.jsx(p,{className:"mx-2",onClick:()=>{this.setState({toggle:!o})},active:o,kind:"inline",icon:X,tooltip:"test"}),"Disabled:",e.jsx(p,{className:"mx-2",kind:"inline",disabled:!0,onClick:k,children:"Disabled"}),"With Text:",e.jsx(p,{className:"mx-2",kind:"inline",icon:X,onClick:k,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:X,tooltip:"test",onClick:k}),e.jsx("span",{className:"mx-2",children:"btn-link:"}),e.jsx(p,{kind:"ghost",onClick:k,children:"Text Button"}),e.jsx("span",{className:"mx-2",children:"btn-link (text w/ optional with icon):"}),e.jsx(p,{kind:"ghost",icon:X,onClick:k,children:"Text Button"})]})}render(){const o=ge.renderButtons(),r=this.renderInlineButtons(),s=ge.renderSocketedButtons(),a=ge.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 Kt(){const t=Vo();fo.random=zt();const[o]=u.useState(()=>new fo(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(_r,{model:o})})]})}const Ze="2px solid var(--dh-color-notice-bg)",qt={"--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"},So={"--dh-color-black":"","--dh-color-action-active-bg":"Action.active","--dh-color-action-down-bg":"Action:active","--dh-color-action-hover-bg":"Action:hover","--dh-color-action-active-hover-bg":"Action.active:hover","--dh-color-action-disabled-bg":"Action:disabled"},Xt={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 Yt(t){const o=je.parseRgba(je.asRgbOrRgbaString(t)??"");if(o==null||o.a<.5)return"white";const{r,g:s,b:a}=o;return je.getBrightness([r,s,a])>=128?"black":"white"}function Zt(t){const o=getComputedStyle(document.documentElement);return t.split(/[\n;]/g).map(s=>{var a;return(a=/^(?:\s{2}|:root\{)?(--dh-color-(?:[^:]+))/.exec(s))==null?void 0:a[1]}).filter(s=>!!s).map(s=>{const a=o.getPropertyValue(s);return s==="--dh-color-chart-colorway"?kr(a??"").map(([n,c])=>a.substring(n,c+1)).map((n,c)=>({name:`${s}-${c}`,value:n})):{name:s,value:a}}).flat()}function re(t,o,r,s=qt){const a=Xt[t];return Zt(o).reduce((c,{name:d,value:h})=>{if(/^--dh-color-true-(.*?)$/.test(d)||/^--dh-color-gray-(light|mid|dark)$/.test(d))return c;const i=/^--dh-color-([^-]+)(?:-([^-]+))?/.exec(d);let m=s[d]??(i==null?void 0:i[r])??(i==null?void 0:i[1])??"???";return m=a[m]??m,c[m]==null&&(c[m]=[]),d in So&&c[m].push({isLabel:!0,name:So[d],value:""}),/^--dh-color-gray-(light|mid|dark)$/.test(d)||c[m].push({name:d,value:h}),c},{})}function Jt(){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=Yt(r)},[]),t}function Qt(t,o){const[r,s]=u.useState();return u.useEffect(()=>{var c;if(t.current==null)return;const a=getComputedStyle(t.current,o).getPropertyValue("content"),l=(c=/"(--dh-color-.*?)[,"]/.exec(a))==null?void 0:c[1];if(l==null)return;const n=getComputedStyle(t.current).getPropertyValue(l);s(n)},[t,o]),r}function Le({className:t,children:o}){const r=Jt(),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:Ze},children:[l&&e.jsx(te,{interactive:!0,children:e.jsx("div",{children:a.value})}),o]})}function es(){const t=["100","200","300","400","500","600","700","800","850","8XX","900"].map(s=>e.jsx(Le,{className:G("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(Le,{className:G("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(Le,{className:G("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 os 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:oo,action:()=>{alert(`Alert${r}!`)},shortcut:new se({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[$.CTRL,R.A],macShortcut:[$.CMD,R.A]})},{title:`Log Message${r}`,icon:ro,action:()=>{console.log(`Logging a message${r}!`)},shortcut:new se({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[$.CTRL,R.L],macShortcut:[$.CMD,R.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:Bo,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new se({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[$.CTRL,R.SLASH],macShortcut:[$.CMD,R.SLASH]}),group:ye.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(ye,{actions:s})]}),e.jsxs(p,{kind:"tertiary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(ye,{actions:a})]})]})}}class rs extends u.Component{constructor(o){super(o),this.sampleInput=xe.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(Fr,{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(Wr,{menuText:"Checkbox Menu",valueMap:r,onUpdateValueMap:this.handleUpdateCheckboxMap})]})}}class ts extends u.Component{constructor(o){super(o),this.state={isShown:!1}}render(){const o=[{title:"Show Alert",icon:oo,action:()=>{alert("Alert!")},shortcut:new se({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[$.CTRL,R.A],macShortcut:[$.CMD,R.A]})},{title:"Log Message",icon:ro,action:()=>{console.log("Logging a message!")},shortcut:new se({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[$.CTRL,R.L],macShortcut:[$.CMD,R.L]})}],s=[{title:"Show Shortcuts",icon:Bo,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new se({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[$.CTRL,R.SLASH],macShortcut:[$.CMD,R.SLASH]}),group:ye.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:Tr,onClick:()=>{},children:e.jsx(go,{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(go,{isShown:a,onMenuClosed:()=>{this.setState({isShown:!1})},actions:s})]})]})}}const ss=`trades = db.t("LearnDeephaven", "StockTrades").where("Date=\`2017-08-25\`")\\
|
|
1
|
+
var or=Object.defineProperty;var rr=(t,o,r)=>o in t?or(t,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[o]=r;var L=(t,o,r)=>(rr(t,typeof o!="symbol"?o+"":o,r),r);import{r as u,a9 as v,M as G,J as e,an as Ge,aE as C,V as xe,ab as Po,a2 as Ce,N as S,aj as P,aT as Lo,aS as U,a1 as no,bi as tr,aG as B,bz as _o,ah as sr,ai as F,ak as ar,bA as lr,al as nr,a8 as eo,ao as w,b5 as ir,bB as ze,b4 as Z,a7 as cr,am as dr,b2 as We,ar as hr,aX as Ke,aW as ur,a6 as mr,as as gr,bC as xr,bD as pr,bE as vr,bF as J,bG as fr,bH as Ie,bI as A,aN as br,bJ as jr,bK as yr,bg as wr,_ as Cr,W as Sr}from"./vendor-808b021e.js";import{b9 as io,ba as q,bb as X,a$ as je,a4 as kr,bc as oo,bd as ro,be as Bo,aT as Tr,bf as co,bg as ho,bh as uo,U as qe,bi as Nr,bj as Ir,N as Er,bk as Dr,bl as Ar,aW as mo,bm as Xe,aq as Mr,f as $r,bn as Rr,s as Pr}from"./index-31948f17.js";import{W as Lr}from"./monaco-9ad65137.js";import{e as Te,G as Fo,m as Q,S as ne,L as _r,d as Ee,I as De,c as Br,a as Ae}from"./IrisGridModel-79e90a27.js";import{B as p,u as Vo,s as te,q as se,aO as $,K as R,aj as ye,ah as Fr,N as go,cC as xo,R as Vr,C as _,aT as fe,S as we,aI as Or,ak as Ur,d as po,E as Oo,J as vo,bv as ee,av as Hr,a4 as Gr,ax as zr}from"./ControlType-5f141b46.js";import{M as fo,H as Wr,A as Kr,T as qr,D as Xr,d as Yr,c as Zr,h as Jr,V as E,g as Qr,C as et,L as Me,e as ot,E as oe,j as rt}from"./FontBootstrap-0329fac4.js";import{G as ae,T as tt}from"./Grid-8c497531.js";import{G as Uo,O as M,C as Ye,b as st,S as at,c as he,P as bo,h as lt,e as nt,g as it,L as ct}from"./TokenBoxCellRenderer-95ab65e6.js";import{k as jo,T as j,g as dt,P as ht,o as ut,p as W,Q as mt,L as gt,D as xt}from"./IrisGridShortcuts-7e675e6c.js";import{N as pt,H as to,P as yo,T as vt,b as ft,j as bt}from"./LocalWorkspaceStorage-f5194de1.js";import"./helpers-de833af9.js";import"./useMergeRef-9935f949.js";function wo(t,o,r,s,a,l,n){try{var c=t[l](n),d=c.value}catch(h){r(h);return}c.done?o(d):Promise.resolve(d).then(s,a)}function $e(t){return function(){var o=this,r=arguments;return new Promise(function(s,a){var l=t.apply(o,r);function n(d){wo(l,s,a,n,c,"next",d)}function c(d){wo(l,s,a,n,c,"throw",d)}n(void 0)})}}function O(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 Te{constructor(){var{rowCount:o=1e9,columnCount:r=100,floatingTopRowCount:s=0,floatingBottomRowCount:a=0,floatingLeftColumnCount:l=0,floatingRightColumnCount:n=0,isEditable:c=!1,editedData:d=[]}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),O(this,"numRows",void 0),O(this,"numColumns",void 0),O(this,"floatingTop",void 0),O(this,"floatingBottom",void 0),O(this,"floatingLeft",void 0),O(this,"floatingRight",void 0),O(this,"editable",void 0),O(this,"editedData",void 0),this.numRows=o,this.numColumns=r,this.floatingTop=s,this.floatingBottom=a,this.floatingLeft=l,this.floatingRight=n,this.editable=c,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 $e(function*(){a.editedData[o]==null&&(a.editedData[o]=[]),a.editedData[o][r]="".concat(s)})()}setValueForRanges(o,r){var s=this;return $e(function*(){Fo.forEachCell(o,(a,l)=>{s.setValueForCell(a,l,r)})})()}setValues(o){var r=this;return $e(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 so=wt;function T(t,o,r){return o=Ct(o),o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function Ct(t){var o=St(t,"string");return typeof o=="symbol"?o:String(o)}function St(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 D extends so{constructor(){var{rowCount:o=D.DEFAULT_ROW_COUNT,columnCount:r=D.DEFAULT_COLUMN_COUNT,children:s=new Map,childRowCount:a=Math.ceil(Math.max(D.MIN_CHILD_ROW_COUNT,o*D.DEFAULT_CHILD_ROW_COUNT_FACTOR)),maxDepth:l=D.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,c)=>{for(var d=null,h=c,i=[...n].sort((b,N)=>b[0]-N[0]),m=0;m<i.length;m+=1){var[g,f]=i[m];if(h<=g)break;var y=f.rowCount;if(h<=g+y){d=g,h=h-g-1;break}h-=y}return{key:d,offsetRow:h}})),T(this,"getCachedTextForRowHeader",Q((n,c)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,c);if(d!=null){var i=n.get(d);if(i!==void 0)return"".concat(d,".").concat(i.textForRowHeader(h))}return"".concat(h)})),T(this,"getCachedTextForCell",Q((n,c,d)=>{var{key:h,offsetRow:i}=this.getCachedModelRowOffset(n,d);if(h!=null){var m=n.get(h);if(m!==void 0)return"".concat(h,".").concat(m.textForCell(c,i))}return"".concat(c,",").concat(i)})),T(this,"getCachedIsRowExpandable",Q((n,c,d)=>{var h=this.getCachedDepthForRow(n,c);return h<d})),T(this,"getCachedIsRowExpanded",Q((n,c)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,c);if(d!=null){var i=n.get(d);if(i!==void 0)return i.isRowExpanded(h)}return n.has(h)})),T(this,"getCachedDepthForRow",Q((n,c)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,c);if(d!=null){var i=n.get(d);if(i!==void 0)return i.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 c=this.children.get(a);if(c!==void 0){var{rowCount:d}=c;c.setRowExpanded(l,r,s),this.numRows+=c.rowCount-d}}else if(r){var i=new D({rowCount:this.childRowCount,columnCount:this.numColumns});n.set(l,i),this.numRows+=i.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(D,"DEFAULT_ROW_COUNT",1e9);T(D,"DEFAULT_COLUMN_COUNT",100);T(D,"DEFAULT_CHILD_ROW_COUNT_FACTOR",.01);T(D,"MIN_CHILD_ROW_COUNT",10);T(D,"MAX_DEPTH",10);const me=D;function Re(t,o,r){return o=kt(o),o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function kt(t){var o=Tt(t,"string");return typeof o=="symbol"?o:String(o)}function Tt(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 Nt extends Te{constructor(o,r){var s;super(),Re(this,"data",void 0),Re(this,"columnHeaders",void 0),Re(this,"numberOfColumns",void 0),this.data=o,this.numberOfColumns=Math.max(...o.map(a=>a.length),(s=r==null?void 0: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 It=Nt;function Pe(t,o,r){return o=Et(o),o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function Et(t){var o=Dt(t,"string");return typeof o=="symbol"?o:String(o)}function Dt(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 At extends Te{constructor(o,r){super(),Pe(this,"numberOfColumns",void 0),Pe(this,"numberOfRows",void 0),Pe(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,c,d,h,i=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((c=(d=this.viewportData)===null||d===void 0||(h=d.data[i])===null||h===void 0?void 0:h[m])!==null&&c!==void 0?c:"")}textForColumnHeader(o){return"".concat(o)}textForRowHeader(o){return"".concat(o)}}const Mt=At;function I(t,o,r){return o=$t(o),o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function $t(t){var o=Rt(t,"string");return typeof o=="symbol"?o:String(o)}function Rt(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 Pt="proportional",Lt=Uo.positiveBarColor,_t=Uo.negativeBarColor,Bt="beside",Ft="LTR",Vt="right";function Ot(t){return Array.isArray(t)&&t.every(o=>typeof o=="number")}class Ut extends Te{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,c=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(),I(this,"numberOfColumns",void 0),I(this,"numberOfRows",void 0),I(this,"data",void 0),I(this,"columnMins",void 0),I(this,"columnMaxs",void 0),I(this,"columnAxes",void 0),I(this,"valuePlacements",void 0),I(this,"directions",void 0),I(this,"positiveColors",void 0),I(this,"negativeColors",void 0),I(this,"opacities",void 0),I(this,"textAlignments",void 0),I(this,"markers",void 0),this.positiveColors=s,this.negativeColors=a,this.data=o,this.columnAxes=r,this.valuePlacements=l,this.opacities=n,this.directions=c,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 i=0;i<o.length;i+=1){var m=o[i];Ot(m)&&(this.columnMins.set(i,Math.min(...m)),this.columnMaxs.set(i,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:Vt}renderTypeForCell(o,r){return o<20||o%2===r%2?"dataBar":"text"}dataBarOptionsForCell(o,r){var s,a,l,n,c,d,h,i=io(this.columnMins,o),m=io(this.columnMaxs,o),g=(s=this.columnAxes.get(o))!==null&&s!==void 0?s:Pt,f=(a=this.valuePlacements.get(o))!==null&&a!==void 0?a:Bt,y=this.opacities.get(o);y==null||y>1?y=1:y<0&&(y=0);var b=(l=this.directions.get(o))!==null&&l!==void 0?l:Ft,N=(n=this.positiveColors.get(o))!==null&&n!==void 0?n:Lt,le=(c=this.negativeColors.get(o))!==null&&c!==void 0?c:_t,z=Number((d=this.data[o])===null||d===void 0?void 0:d[r]),Y=z>=0?N:le,Ne=(h=this.markers.get(o))!==null&&h!==void 0?h:[];return{columnMin:i,columnMax:m,axis:g,color:Y,valuePlacement:f,opacity:y,markers:Ne,direction:b,value:z}}}const Ht=Ut,Gt="isolated-section-query",Ho="sample-section";function*pe(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 c=r[l],d=`${c}${n}`,h=`${c.repeat(3)}${n}`;yield u.createElement(v,{key:d,textValue:h,children:h})}}function*ao(t,o={}){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",s=r.length,a=Object.keys(q);for(let l=0;l<t;l+=1){const n=l%s;let c=String(Math.floor(l/s));c==="0"&&(c="");const d=r[n],h=`${d}${c}`,i=o.icons===!0?a[l%a.length]:void 0,m=o.descriptions===!0?`Description ${h}`:void 0,g=i??`${d.repeat(3)}${c}`;yield{key:h,item:{key:(l+1)*100,content:g,textValue:g,description:m,icon:i}}}}function*Go(t=1){for(;;)t=t*16807%2147483647,yield t/2147483647}function Co(){return window.location.search.includes("isolateSection=true")?window.location.hash.replace(/^#/,""):""}function zo(){const[t,o]=u.useState(Co);return u.useEffect(()=>{const r=()=>o(Co());return window.addEventListener("hashchange",r),()=>window.removeEventListener("hashchange",r)},[]),t}function zt(t=1){const[o]=u.useState(()=>Go(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 Wo(t){return`${Ho}-${t.toLocaleLowerCase().replaceAll(" ","-")}`}function Ko(t,o=[]){const r=Wo(t),s=G(Ho,...o);return{id:r,className:s}}function Wt(t,o=[]){const{id:r,className:s}=Ko(t,o);return{id:r,UNSAFE_className:s}}function x({name:t,className:o="",component:r="div",...s}){const a=zo(),l=Wo(t);if(!(a===""||a===l))return null;const c=r==="div"?Ko:Wt;return e.jsx(r,{...s,...c(t,[o])})}function k(){}class ge 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(Ge,{children:[e.jsx(p,{kind:"primary",onClick:k,children:"Primary"}),e.jsx(p,{kind:"secondary",onClick:k,children:"Secondary"}),e.jsx(p,{kind:"tertiary",onClick:k,children:"Tertiary"}),e.jsx(p,{kind:"success",onClick:k,children:"Success"}),e.jsx(p,{kind:"danger",onClick:k,children:"Danger"}),e.jsx(p,{kind:"inline",onClick:k,children:"Inline"}),e.jsx(p,{kind:"ghost",onClick:k,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(C,{gap:"1rem",children:Object.entries(o).map(([r,s])=>e.jsxs("a",{className:`text-${r}`,children:[r," (",s,")"]},r))})]})}static renderSocketedButtons(){return e.jsxs(x,{name:"buttons-socketed",children:[e.jsx("h5",{children:"Socketed Buttons (for linker)"}),e.jsxs(Ge,{marginBottom:"1rem",children:[e.jsx(ne,{onClick:k,children:"Unlinked"}),e.jsx(ne,{isLinked:!0,onClick:k,children:"Linked"}),e.jsx(ne,{isLinkedSource:!0,onClick:k,children:"Linked Source"}),e.jsx(ne,{isLinked:!0,isInvalid:!0,onClick:k,children:"Error"}),e.jsx(ne,{disabled:!0,onClick:k,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:X,tooltip:"test",onClick:k}),"Toggle button (class active):",e.jsx(p,{className:"mx-2",onClick:()=>{this.setState({toggle:!o})},active:o,kind:"inline",icon:X,tooltip:"test"}),"Disabled:",e.jsx(p,{className:"mx-2",kind:"inline",disabled:!0,onClick:k,children:"Disabled"}),"With Text:",e.jsx(p,{className:"mx-2",kind:"inline",icon:X,onClick:k,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:X,tooltip:"test",onClick:k}),e.jsx("span",{className:"mx-2",children:"btn-link:"}),e.jsx(p,{kind:"ghost",onClick:k,children:"Text Button"}),e.jsx("span",{className:"mx-2",children:"btn-link (text w/ optional with icon):"}),e.jsx(p,{kind:"ghost",icon:X,onClick:k,children:"Text Button"})]})}render(){const o=ge.renderButtons(),r=this.renderInlineButtons(),s=ge.renderSocketedButtons(),a=ge.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 Kt(){const t=Vo();fo.random=zt();const[o]=u.useState(()=>new fo(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(_r,{model:o})})]})}const Ze="2px solid var(--dh-color-notice-bg)",qt={"--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"},So={"--dh-color-black":"","--dh-color-action-active-bg":"Action.active","--dh-color-action-down-bg":"Action:active","--dh-color-action-hover-bg":"Action:hover","--dh-color-action-active-hover-bg":"Action.active:hover","--dh-color-action-disabled-bg":"Action:disabled"},Xt={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 Yt(t){const o=je.parseRgba(je.asRgbOrRgbaString(t)??"");if(o==null||o.a<.5)return"white";const{r,g:s,b:a}=o;return je.getBrightness([r,s,a])>=128?"black":"white"}function Zt(t){const o=getComputedStyle(document.documentElement);return t.split(/[\n;]/g).map(s=>{var a;return(a=/^(?:\s{2}|:root\{)?(--dh-color-(?:[^:]+))/.exec(s))==null?void 0:a[1]}).filter(s=>!!s).map(s=>{const a=o.getPropertyValue(s);return s==="--dh-color-chart-colorway"?kr(a??"").map(([n,c])=>a.substring(n,c+1)).map((n,c)=>({name:`${s}-${c}`,value:n})):{name:s,value:a}}).flat()}function re(t,o,r,s=qt){const a=Xt[t];return Zt(o).reduce((c,{name:d,value:h})=>{if(/^--dh-color-true-(.*?)$/.test(d)||/^--dh-color-gray-(light|mid|dark)$/.test(d))return c;const i=/^--dh-color-([^-]+)(?:-([^-]+))?/.exec(d);let m=s[d]??(i==null?void 0:i[r])??(i==null?void 0:i[1])??"???";return m=a[m]??m,c[m]==null&&(c[m]=[]),d in So&&c[m].push({isLabel:!0,name:So[d],value:""}),/^--dh-color-gray-(light|mid|dark)$/.test(d)||c[m].push({name:d,value:h}),c},{})}function Jt(){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=Yt(r)},[]),t}function Qt(t,o){const[r,s]=u.useState();return u.useEffect(()=>{var c;if(t.current==null)return;const a=getComputedStyle(t.current,o).getPropertyValue("content"),l=(c=/"(--dh-color-.*?)[,"]/.exec(a))==null?void 0:c[1];if(l==null)return;const n=getComputedStyle(t.current).getPropertyValue(l);s(n)},[t,o]),r}function Le({className:t,children:o}){const r=Jt(),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:Ze},children:[l&&e.jsx(te,{interactive:!0,children:e.jsx("div",{children:a.value})}),o]})}function es(){const t=["100","200","300","400","500","600","700","800","850","8XX","900"].map(s=>e.jsx(Le,{className:G("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(Le,{className:G("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(Le,{className:G("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 os 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:oo,action:()=>{alert(`Alert${r}!`)},shortcut:new se({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[$.CTRL,R.A],macShortcut:[$.CMD,R.A]})},{title:`Log Message${r}`,icon:ro,action:()=>{console.log(`Logging a message${r}!`)},shortcut:new se({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[$.CTRL,R.L],macShortcut:[$.CMD,R.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:Bo,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new se({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[$.CTRL,R.SLASH],macShortcut:[$.CMD,R.SLASH]}),group:ye.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(ye,{actions:s})]}),e.jsxs(p,{kind:"tertiary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(ye,{actions:a})]})]})}}class rs extends u.Component{constructor(o){super(o),this.sampleInput=xe.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(Fr,{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(Wr,{menuText:"Checkbox Menu",valueMap:r,onUpdateValueMap:this.handleUpdateCheckboxMap})]})}}class ts extends u.Component{constructor(o){super(o),this.state={isShown:!1}}render(){const o=[{title:"Show Alert",icon:oo,action:()=>{alert("Alert!")},shortcut:new se({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[$.CTRL,R.A],macShortcut:[$.CMD,R.A]})},{title:"Log Message",icon:ro,action:()=>{console.log("Logging a message!")},shortcut:new se({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[$.CTRL,R.L],macShortcut:[$.CMD,R.L]})}],s=[{title:"Show Shortcuts",icon:Bo,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new se({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[$.CTRL,R.SLASH],macShortcut:[$.CMD,R.SLASH]}),group:ye.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:Tr,onClick:()=>{},children:e.jsx(go,{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(go,{isShown:a,onMenuClosed:()=>{this.setState({isShown:!1})},actions:s})]})]})}}const ss=`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
|
`,Bs="_themeColorsPalette_v5aa0_1",Fs="_swatch_v5aa0_7",Vs="_themeColors_v5aa0_1",Os="_label_v5aa0_21",Us="_capitalize_v5aa0_26",K={themeColorsPalette:Bs,swatch:Fs,themeColors:Vs,label:Os,capitalize:Us};function Hs(){return{"Theme Color Palette":re("palette",Ms,1),"Semantic Colors":re("semantic",$s,1),"Chart Colors":re("chart",Rs,2),"Editor Colors":re("editor",Ps,2),"Grid Colors":re("grid",Ls,2),"Component Colors":re("component",_s,1)}}function Mo({name:t,value:o}){return e.jsxs(e.Fragment,{children:[e.jsx("div",{children:t}),e.jsx("div",{children:o}),e.jsx("div",{children:je.normalizeCssColor(o,!0)})]})}function Gs(){const{selectedThemeKey:t}=Oo(),o=u.useMemo(Hs,[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:K.themeColorsPalette,children:Object.entries(s).map(([l,n],c)=>e.jsxs(u.Fragment,{children:[(c===0||c===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?Ze:void 0},className:G(K.swatch,"px-0"),children:[e.jsx(te,{interactive:!0,children:e.jsx(Mo,{name:d,value:h})}),d&&e.jsx(vo,{copy:d})]},d))]},l))})]},r):e.jsxs(x,{name:r,children:[e.jsx("h2",{className:"ui-title",children:r}),e.jsx("div",{className:K.themeColors,children:Object.entries(s).map(([l,n])=>e.jsxs("div",{style:{gridRow:`span ${n.length+1}`},children:[e.jsx("span",{className:G(K.label,K.capitalize),children:l}),n.map(({isLabel:c,name:d,value:h,note:i})=>c===!0?e.jsx("span",{className:K.label,children:d},d):e.jsxs("div",{className:K.swatch,style:{border:h===""&&d.length>0?Ze:void 0},children:[e.jsx("div",{style:{backgroundColor:h,height:"var(--swatch-height)",aspectRatio:"1 / 1"}}),e.jsx(te,{interactive:!0,children:e.jsx(Mo,{name:d,value:h})}),e.jsx("span",{children:d.replace("--dh-color-","")}),d.endsWith("-hue")||i!=null?e.jsx("span",{children:i??h}):null,e.jsx(vo,{copy:d})]},d))]},l))})]},r))})}const Ue="data-menu-category",zs="data-no-menu",Ws="sample-section-e2e-ignore",Yo="spectrum-component-samples",Zo="spectrum-comparison-samples";function Ks(){return e.jsxs("div",{id:Yo,children:[e.jsx("h2",{className:"ui-title","data-no-menu":!0,children:"Spectrum Components"}),e.jsxs(B,{gap:20,columns:_o("0px","1fr"),children:[e.jsxs(x,{name:"spectrum-buttons",component:E,children:[e.jsx("h3",{children:"Buttons"}),e.jsx(qs,{})]}),e.jsxs(x,{name:"spectrum-collections",component:E,children:[e.jsx("h3",{children:"Collections"}),e.jsx(Js,{})]}),e.jsxs(x,{name:"spectrum-content",component:E,children:[e.jsx("h3",{children:"Content"}),e.jsx(Zs,{})]}),e.jsxs(x,{name:"spectrum-forms",component:E,children:[e.jsx("h3",{children:"Forms"}),e.jsx(Ys,{})]}),e.jsxs(x,{name:"spectrum-overlays",component:E,children:[e.jsx("h3",{children:"Overlays"}),e.jsxs(C,{gap:"size-160",children:[e.jsx(Xs,{}),e.jsxs(sr,{children:[e.jsx(F,{children:"Dialog Trigger"}),t=>e.jsxs(ar,{children:[e.jsx(to,{children:"Some Heading"}),e.jsx(lr,{children:"Some Header"}),e.jsx(nr,{}),e.jsx(eo,{children:e.jsx(j,{children:"Are you sure?"})}),e.jsxs(Ge,{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:E,children:[e.jsx("h3",{children:"Wells"}),e.jsx(ir,{children:"This is a well."})]})]})]})}function qs(){return e.jsxs(e.Fragment,{children:[e.jsxs(F,{marginBottom:"size-200",children:[e.jsx(P,{children:e.jsx(S,{icon:X})}),e.jsx(j,{children:"Icon Button"})]}),e.jsxs(B,{autoFlow:"column",columnGap:"size-250",rowGap:"size-150",columns:ze(4,_o(0,"size-2000")),rows:ze(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(F,{children:"Normal"}),e.jsx(F,{gridRow:"span 3",isQuiet:!0,children:"Quiet"}),e.jsx(F,{staticColor:"black",children:"Static Black"}),e.jsx(F,{staticColor:"white",children:"Static White"}),e.jsx(F,{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 Xs(){return e.jsxs(e.Fragment,{children:[e.jsx(j,{children:"Contextual Help"}),e.jsxs(cr,{variant:"info",children:[e.jsx(to,{children:"Need help?"}),e.jsx(eo,{children:e.jsx(j,{children:"This is a helpful description of the thing you need help with."})})]})]})}function Ys(){return e.jsx(dr,{children:e.jsxs(B,{gap:20,columns:ze("auto-fit","210px"),alignItems:"end",children:[e.jsx(We,{label:"Text Field"}),e.jsxs(hr,{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(Ke,{children:"Checkbox"}),e.jsx(ur,{label:"Slider",defaultValue:24}),e.jsx(mr,{children:"Switch"})]})})}function Zs(){return e.jsxs(gr,{children:[e.jsx(P,{size:"XL",children:e.jsx(S,{icon:Er})}),e.jsx(to,{children:"Illustrated Message"}),e.jsx(eo,{children:"This is the content of the message."})]})}function Js(){return e.jsxs(e.Fragment,{children:[e.jsx("label",{id:"table-view-sample",children:"List View"}),e.jsxs(xr,{"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(pr,{"aria-labelledby":"table-view-sample",selectionMode:"multiple",children:[e.jsxs(vr,{children:[e.jsxs(J,{title:"Person",children:[e.jsx(J,{allowsResizing:!0,children:"Name"}),e.jsx(J,{children:"Age"})]}),e.jsxs(J,{title:"Address",children:[e.jsx(J,{allowsResizing:!0,children:"City"}),e.jsx(J,{children:"State"})]})]}),e.jsxs(fr,{children:[e.jsxs(Ie,{children:[e.jsx(A,{children:"John"}),e.jsx(A,{children:"42"}),e.jsx(A,{children:"San Francisco"}),e.jsx(A,{children:"CA"})]}),e.jsxs(Ie,{children:[e.jsx(A,{children:"Jane"}),e.jsx(A,{children:"38"}),e.jsx(A,{children:"San Francisco"}),e.jsx(A,{children:"CA"})]}),e.jsxs(Ie,{children:[e.jsx(A,{children:"Becky"}),e.jsx(A,{children:"12"}),e.jsx(A,{children:"San Francisco"}),e.jsx(A,{children:"CA"})]})]})]})]})}function ie(t){return e.jsx("div",{...t})}function Qs(){const[t,o]=u.useState([]);u.useEffect(()=>{let s={category:"",items:[]};const a=[s],l=document.querySelector(`#${Yo}`),n=document.querySelector(`#sample-section-${Zo}`);document.querySelectorAll(`h2,h3,[${Ue}]`).forEach(c=>{if(c.textContent==null||c.hasAttribute(zs))return;if(c.hasAttribute(Ue)){s={category:c.getAttribute(Ue)??"",items:[]},a.push(s);return}const h=`${(l==null?void 0:l.contains(c))===!0?"spectrum-":(n==null?void 0:n.contains(c))===!0?"spectrum-compare-":""}${c.textContent}`.toLowerCase().replace(/\s/g,"-");c.id=h,s.items.push({id:h,label:c.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),l=document.getElementById(a);l==null||l.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{window.location.hash=a},1e3)},[]);return e.jsxs(br,{children:[e.jsx(F,{children:e.jsx(P,{children:e.jsx(S,{icon:Dr})})}),e.jsx(jr,{items:t,onAction:r,children:({category:s,items:a})=>e.jsx(yr,{items:a,title:s,children:({id:l,label:n})=>e.jsx(v,{children:n},l)},s)})]})}function ea(){const t=u.useCallback(()=>{window.scrollTo({top:0,behavior:"smooth"}),setTimeout(()=>{window.location.hash=""},500)},[]);return u.useEffect(()=>{var s;const o=((s=document.querySelector("h2"))==null?void 0:s.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(P,{children:e.jsx(S,{icon:Ar})})})}const oa=["Tab 1","Tab 2","Tab 3"];function ra({isActive:t,title:o}){return e.jsxs("li",{className:G("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 ta(){return e.jsxs(x,{name:"golden-layout",children:[e.jsx("h2",{className:"ui-title",children:"Golden Layout"}),[!1,!0].map(t=>e.jsxs(xe.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:oa.map((o,r)=>e.jsx(ra,{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 sa(){return e.jsxs(x,{name:"animations",className:"sample-section-e2e-ignore",children:[e.jsx("h2",{className:"ui-title",children:"Animations"}),e.jsx(E,{position:"relative",height:400,children:e.jsx(Qr,{})})]})}const $o=[["primary","accent"],["secondary","primary"],["danger","negative"]];function aa(){const[t,o]=u.useState(!1);return e.jsxs(x,{name:Zo,className:Ws,children:[e.jsx("h2",{className:"ui-title","data-no-menu":!0,children:"Bootstrap / Spectrum Comparison"}),e.jsxs(C,{gap:20,wrap:!0,children:[e.jsxs(E,{children:[e.jsx("h3",{children:"Buttons - Filled"}),e.jsxs(B,{gap:20,columns:"repeat(2, 120px)",autoRows:"40x",justifyItems:"start",alignItems:"start",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),$o.map(([r,s])=>e.jsxs(u.Fragment,{children:[e.jsx(p,{onClick:ee,kind:r,icon:mo,children:"Button"}),e.jsxs(w,{variant:s,style:"fill",children:[e.jsx(P,{children:e.jsx(S,{icon:mo})}),e.jsx(j,{children:"Button"})]})]},r)),e.jsx(p,{onClick:ee,kind:"primary",disabled:!0,children:"Disabled"}),e.jsx(w,{variant:"accent",style:"fill",isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(E,{children:[e.jsx("h3",{children:"Buttons - Outline"}),e.jsxs(B,{gap:20,columns:"repeat(2, 120px)",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),$o.map(([r,s])=>e.jsxs(u.Fragment,{children:[e.jsx(p,{onClick:ee,kind:r,children:r}),e.jsx(w,{variant:s,style:"outline",children:s})]},r)),e.jsx(p,{onClick:ee,kind:"secondary",disabled:!0,children:"Disabled"}),e.jsx(w,{variant:"primary",style:"outline",isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(E,{children:[e.jsx("h3",{children:"Action Buttons"}),e.jsxs(B,{gap:20,columns:"repeat(2, 120px)",autoRows:"40x",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),e.jsx(p,{onClick:ee,kind:"inline",children:"Inline"}),e.jsx(F,{children:"Action"}),e.jsx(p,{onClick:ee,kind:"inline",disabled:!0,children:"Disabled"}),e.jsx(F,{isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(E,{children:[e.jsx("h3",{children:"Pickers"}),e.jsxs(B,{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(we,{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(wr,{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(E,{children:[e.jsx("h3",{children:"Text Field"}),e.jsxs(B,{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(We,{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(We,{type:"text",label:"Disabled",isDisabled:!0,value:"Disabled"})]})]}),e.jsxs(E,{children:[e.jsx("h3",{children:"Checkbox"}),e.jsxs(B,{gap:20,columns:"repeat(2, 120px)",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),e.jsx(_,{className:"form-group",checked:t,onChange:()=>o(r=>!r),children:"Checkbox"}),e.jsx(Ke,{children:"Checkbox"}),e.jsx(_,{className:"form-group",disabled:!0,checked:t,onChange:()=>o(r=>!r),children:"Disabled"}),e.jsx(Ke,{isDisabled:!0,children:"Disabled"})]})]})]})]})}const la=[...ao(52)],be=[...ao(52,{icons:!0})],Jo=[...pe(0,51)],na=[...pe(52,103)],ia=[...pe(104,155)],ca=[...pe(156,207)],da=[...pe(208,259)],ha=["String 1","String 2","String 3","","Some really long text that should get truncated",444,999,!0,!1,...Jo.map((t,o)=>o%5>0?t:u.cloneElement(t,{...t.props,children:[e.jsx(ue,{},`icon-${t.props.children}`),e.jsx(j,{children:t.props.children},`label-${t.props.children}`)]}))];function ue(){return e.jsx(P,{children:e.jsx(S,{icon:Xe})})}function ua(){const[t,o]=u.useState(200),[r,s]=u.useState(!0),[a,l]=u.useState(be),n=u.useCallback(h=>l(h===""?be:be.filter(({item:i})=>{var m;return(m=i==null?void 0:i.textValue)==null?void 0:m.includes(h)})),[]),c=u.useCallback(async()=>dt({keyedItems:la,itemHeight:ht.medium,selectedKey:t,topOffset:ut}),[t]),d=u.useCallback(h=>{o(h)},[]);return e.jsxs(x,{name:"pickers",children:[e.jsx("h2",{className:"ui-title",children:"Pickers"}),e.jsxs(C,{gap:14,direction:"column",children:[[yo,Ye].map(h=>{const i=m=>`${h===yo?"Picker":"ComboBox"} (${m})`;return e.jsxs(C,{direction:"row",gap:14,children:[e.jsx(h,{label:i("Single Child"),tooltip:{placement:"bottom-end"},children:e.jsx(v,{textValue:"Aaa",children:"Aaa"})}),e.jsx(h,{label:i("Mixed Children Types"),defaultSelectedKey:"999",tooltip:!0,children:ha}),e.jsxs(h,{label:i("Sections"),tooltip:!0,children:["String 1","String 2","String 3",e.jsxs(W,{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(ue,{}),e.jsx(j,{children:"Complex Ccc"})]})]}),e.jsxs(W,{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(ue,{}),e.jsx(j,{children:"Complex Fff"})]}),e.jsxs(v,{textValue:"Ggg",children:[e.jsx(ue,{}),e.jsx(j,{children:"Label"}),e.jsx(j,{slot:"description",children:"Description"})]}),e.jsxs(v,{textValue:"Hhh",children:[e.jsx(ue,{}),e.jsx(j,{children:"Label that causes overflow"}),e.jsx(j,{slot:"description",children:"Description that causes overflow"})]})]},"Key B"),e.jsx(W,{title:"Section A",children:Jo}),e.jsx(W,{title:"Section B",children:na}),e.jsx(W,{children:ia},"Section C"),e.jsx(W,{children:ca},"Section D"),e.jsx(W,{title:"Section E",children:da})]})]},h.displayName)}),e.jsx(_,{checked:r,onChange:h=>s(h.currentTarget.checked),children:"Show Ions"}),e.jsxs(C,{direction:"row",gap:14,children:[e.jsx(it,{label:"Picker (Controlled)",getInitialScrollPosition:c,normalizedItems:be,selectedKey:t,showItemIcons:r,onChange:d}),e.jsx(et,{label:"ComboBox (Controlled)",getInitialScrollPosition:c,normalizedItems:a,selectedKey:t,showItemIcons:r,onChange:d,validationState:t==null?"invalid":"valid",errorMessage:"Please select an item.",onInputChange:n})]})]})]})}const ma=[...ao(52,{icons:!0})];function ce(){return e.jsx(P,{slot:"illustration",children:e.jsx(S,{icon:Rr})})}const Qe={gap:10,label:{medium:21,large:25.5}};function de({label:t,direction:o="column",children:r,...s}){return e.jsxs(C,{...s,direction:o,gap:Qe.gap,children:[e.jsx(j,{children:t}),r]})}function ga(){const{scale:t}=mt(),[o,r]=u.useState([]),[s,a]=u.useState("compact"),l=Qe.label[t]+Qe.gap+2+gt[s??"compact"][t],n=u.useCallback(b=>{a(b)},[]),[c,d]=u.useState(!0),[h,i]=u.useState(""),[m,g]=u.useState(""),f=u.useCallback((b,N)=>{i(b),g(N)},[]),y=u.useCallback(b=>{r(b)},[]);return e.jsxs(x,{name:"list-views",children:[e.jsx("h2",{className:"ui-title",children:"List View"}),e.jsxs(B,{gap:14,height:"size-6000",columns:"1fr 1fr 1fr",rows:`auto minmax(${l}px, auto) 1fr auto 1fr`,children:[e.jsx(de,{alignItems:"center",direction:"row",label:"Density",gridColumn:"span 3",children:e.jsxs(Lo,{"aria-label":"Density",orientation:"horizontal",value:s,onChange:n,children:[e.jsx(U,{value:"compact",children:"Compact"}),e.jsx(U,{value:"regular",children:"Regular"}),e.jsx(U,{value:"spacious",children:"Spacious"})]})}),e.jsx(de,{label:"Single Child",gridColumn:"span 3",height:"100%",children:e.jsx(Me,{density:s,"aria-label":"Single Child",selectionMode:"multiple",children:e.jsx(v,{textValue:"Aaa",children:"Aaa"})})}),e.jsx(de,{label:"Icons",gridColumn:"span 2",children:e.jsxs(Me,{"aria-label":"Icon",density:s,selectionMode:"multiple",children:[e.jsxs(v,{textValue:"Item with icon A",children:[e.jsx(ce,{}),e.jsx(j,{children:"Item with icon A"})]}),e.jsxs(v,{textValue:"Item with icon B",children:[e.jsx(ce,{}),e.jsx(j,{children:"Item with icon B"})]}),e.jsxs(v,{textValue:"Item with icon C",children:[e.jsx(ce,{}),e.jsx(j,{children:"Item with icon C"})]}),e.jsxs(v,{textValue:"Item with icon D",children:[e.jsx(ce,{}),e.jsx(j,{children:"Item with icon D with overflowing content"})]}),e.jsxs(v,{textValue:"Item with icon E",children:[e.jsx(ce,{}),e.jsx(j,{children:"Item with icon E"})]})]})}),e.jsx(de,{label:"Mixed Children Types",children:e.jsxs(Me,{"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(P,{slot:"image",children:e.jsx(S,{icon:Xe})}),e.jsx(j,{children:"Complex Ccc with text that should be truncated"})]}),e.jsxs(v,{textValue:"Complex Ccc with Description",children:[e.jsx(P,{slot:"image",children:e.jsx(S,{icon:Xe})}),e.jsx(j,{children:"Complex Ccc with text that should be truncated"}),e.jsx(j,{slot:"description",children:"Description"})]})]})}),e.jsx(C,{gridColumn:"span 3",gap:14,children:e.jsx(_,{checked:c,onChange:b=>d(b.currentTarget.checked),children:"Show Ions"})}),e.jsxs(de,{label:"Controlled",gridColumn:"span 2",children:[e.jsx(ot,{"aria-label":"Controlled",density:s,normalizedItems:ma,selectionMode:"multiple",selectedKeys:o,showItemIcons:c,onChange:y,actions:e.jsxs(ct,{overflowMode:"collapse",buttonLabelBehavior:"collapse",maxWidth:80,onAction:f,children:[e.jsxs(v,{children:[e.jsx(P,{children:e.jsx(S,{icon:Mr})}),e.jsx(j,{children:"Edit"})]},"Edit"),e.jsxs(v,{children:[e.jsx(P,{children:e.jsx(S,{icon:$r})}),e.jsx(j,{children:"Delete"})]},"Delete")]})}),h," ",m]})]})]})}function xa(){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(oe,{message:o})}),e.jsx("div",{className:"col",style:t,children:e.jsx(oe,{message:r,type:a})}),e.jsx("div",{className:"col",style:t,children:e.jsx(oe,{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(oe,{message:o,isExpanded:!0})}),e.jsx("div",{className:"col",style:t,children:e.jsx(oe,{message:r,type:a,isExpanded:!0})}),e.jsx("div",{className:"col",style:t,children:e.jsx(oe,{message:s,type:l,isExpanded:!0})})]})]})}function Qo({value:t}){return e.jsx(p,{kind:"primary",onClick:()=>{},children:t})}Qo.displayName="FooComponent";const H=Br(Qo);function pa({value:t}){return e.jsx(H,{value:`${t}.${t}`})}function va({value:t}){return e.jsxs("div",{children:[e.jsx(H,{value:t}),e.jsx(H,{value:t})]})}function He({value:t}){return e.jsx(p,{kind:"danger",onClick:()=>{},children:t.split("").reverse().join("")})}function fa(){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(H,{value:t})}),e.jsx("small",{children:"Replaced with Reverse"}),e.jsx("div",{children:e.jsx(Ae,{value:new Map([[H,He]]),children:e.jsx(H,{value:t})})})]}),e.jsxs("div",{className:"col",children:[e.jsx("small",{children:"Nested component replaced"}),e.jsx("div",{children:e.jsx(Ae,{value:new Map([[H,He]]),children:e.jsx(pa,{value:t})})})]}),e.jsxs("div",{className:"col",children:[e.jsx("small",{children:"Multiple Components replaced"}),e.jsx("div",{children:e.jsx(Ae,{value:new Map([[H,He]]),children:e.jsx(va,{value:t})})})]})]})]})}const Ro={position:"sticky",justifyContent:"end",zIndex:1,UNSAFE_style:{float:"right"}};function ba(){const{themes:t}=Oo(),o=t.length>1,r=zo()!=="";return e.jsx("div",{tabIndex:-1,role:"main",children:e.jsxs("div",{className:G("container","style-guide-container",r&&Gt),children:[e.jsx(C,{justifyContent:"space-between",alignItems:"center",marginTop:"2rem",marginBottom:"1rem",children:e.jsx("h1",{style:{paddingTop:"2rem"},children:"Deephaven UI Components"})}),e.jsxs(C,{...Ro,UNSAFE_className:r?"hide-when-isolated":void 0,marginTop:-56,top:20,gap:10,alignItems:"end",children:[o?e.jsx(vt,{}):null,e.jsx(Qs,{})]}),e.jsx(C,{...Ro,UNSAFE_className:r?"hide-when-isolated":void 0,top:"calc(100vh - 40px)",marginTop:-32,marginEnd:o?-234:0,children:e.jsx(ea,{})}),e.jsx(ks,{}),e.jsx(ie,{"data-menu-category":"Colors"}),e.jsx(es,{}),e.jsx(Gs,{}),e.jsx(ie,{"data-menu-category":"Layout"}),e.jsx(ta,{}),e.jsx(ie,{"data-menu-category":"Components"}),e.jsx(ge,{}),e.jsx(ws,{}),e.jsx(fs,{}),e.jsx(ga,{}),e.jsx(ua,{}),e.jsx(js,{}),e.jsx(ke,{}),e.jsx(Cs,{}),e.jsx(rs,{}),e.jsx(ys,{}),e.jsx(os,{}),e.jsx(ts,{}),e.jsx(As,{}),e.jsx(Ss,{}),e.jsx(ps,{}),e.jsx(ls,{}),e.jsx(ms,{}),e.jsx(Kt,{}),e.jsx(ft,{}),e.jsx(sa,{}),e.jsx(xa,{}),e.jsx(fa,{}),e.jsx(ie,{"data-menu-category":"Spectrum Components"}),e.jsx(Ks,{}),e.jsx(ie,{"data-menu-category":"Spectrum Comparison"}),e.jsx(aa,{})]})})}function lo(t){const{workspace:o,setWorkspace:r}=t;return u.useEffect(()=>{bt.makeDefaultWorkspace({getLayouts:async()=>[],getLayout:async()=>({})}).then(r)},[r]),o!=null?e.jsx(ba,{}):null}lo.propTypes={workspace:Ce.shape({}),setWorkspace:Ce.func.isRequired};lo.defaultProps={workspace:null};const ja=t=>({workspace:Gr(t)}),ya=Cr(ja,{setWorkspace:Hr})(lo);function Pa(){return xt.register(new URL("./download/serviceWorker.js",window.location.href)),zr.init({getWorker:()=>new Lr}),window["__react-beautiful-dnd-disable-dev-warnings"]=!0,e.jsx(rt,{children:e.jsx(Sr,{store:Pr,children:e.jsx(ya,{})})})}export{Pa as StyleGuideRoot,Pa as default};
|
|
214
|
-
//# sourceMappingURL=StyleGuideRoot-
|
|
214
|
+
//# sourceMappingURL=StyleGuideRoot-df333f01.js.map
|