@deephaven/code-studio 0.85.17 → 0.85.19
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-7a744e50.js +5 -0
- package/build/assets/AppRoot-7a744e50.js.map +1 -0
- package/build/assets/Chart-882792b1.js +2 -0
- package/build/assets/Chart-882792b1.js.map +1 -0
- package/build/assets/{ControlType-001645f1.js → ControlType-fe978772.js} +13 -13
- package/build/assets/ControlType-fe978772.js.map +1 -0
- package/build/assets/{FontBootstrap-35901c17.js → FontBootstrap-f4b4e8a8.js} +2 -2
- package/build/assets/{FontBootstrap-35901c17.js.map → FontBootstrap-f4b4e8a8.js.map} +1 -1
- package/build/assets/{FormatterUtils-bf39f590.js → FormatterUtils-377efaf4.js} +2 -2
- package/build/assets/{FormatterUtils-bf39f590.js.map → FormatterUtils-377efaf4.js.map} +1 -1
- package/build/assets/{Grid-28612899.js → Grid-bd55074d.js} +2 -2
- package/build/assets/{Grid-28612899.js.map → Grid-bd55074d.js.map} +1 -1
- package/build/assets/{IrisGrid-5d99cd11.js → IrisGrid-0df792b1.js} +2 -2
- package/build/assets/{IrisGrid-5d99cd11.js.map → IrisGrid-0df792b1.js.map} +1 -1
- package/build/assets/IrisGridModel-d6e3269b.js +2 -0
- package/build/assets/IrisGridModel-d6e3269b.js.map +1 -0
- package/build/assets/{IrisGridShortcuts-14b85cc2.js → IrisGridShortcuts-62ef3674.js} +2 -2
- package/build/assets/{IrisGridShortcuts-14b85cc2.js.map → IrisGridShortcuts-62ef3674.js.map} +1 -1
- package/build/assets/{IrisGridThemeProvider-0f855033.js → IrisGridThemeProvider-d6e02bcc.js} +2 -2
- package/build/assets/{IrisGridThemeProvider-0f855033.js.map → IrisGridThemeProvider-d6e02bcc.js.map} +1 -1
- package/build/assets/{LocalWorkspaceStorage-b1dcae96.js → LocalWorkspaceStorage-b77ac809.js} +2 -2
- package/build/assets/{LocalWorkspaceStorage-b1dcae96.js.map → LocalWorkspaceStorage-b77ac809.js.map} +1 -1
- package/build/assets/{MarkdownEditor-d5387167.js → MarkdownEditor-9e441153.js} +2 -2
- package/build/assets/{MarkdownEditor-d5387167.js.map → MarkdownEditor-9e441153.js.map} +1 -1
- package/build/assets/{MarkdownNotebook-c11cf0f4.js → MarkdownNotebook-5a9fee2c.js} +2 -2
- package/build/assets/{MarkdownNotebook-c11cf0f4.js.map → MarkdownNotebook-5a9fee2c.js.map} +1 -1
- package/build/assets/{MissingPartitionError-f5888322.js → MissingPartitionError-af17667c.js} +2 -2
- package/build/assets/{MissingPartitionError-f5888322.js.map → MissingPartitionError-af17667c.js.map} +1 -1
- package/build/assets/{StyleGuideRoot-f37171ae.js → StyleGuideRoot-fb99f9e6.js} +2 -2
- package/build/assets/{StyleGuideRoot-f37171ae.js.map → StyleGuideRoot-fb99f9e6.js.map} +1 -1
- package/build/assets/{TokenBoxCellRenderer-b5f2e3b0.js → TokenBoxCellRenderer-4790783d.js} +2 -2
- package/build/assets/{TokenBoxCellRenderer-b5f2e3b0.js.map → TokenBoxCellRenderer-4790783d.js.map} +1 -1
- package/build/assets/{index-b99dd0d8.js → index-d1d2711f.js} +2 -2
- package/build/assets/{index-b99dd0d8.js.map → index-d1d2711f.js.map} +1 -1
- package/build/assets/{index-4d8d7a9d.js → index-d99585da.js} +2 -2
- package/build/assets/{index-4d8d7a9d.js.map → index-d99585da.js.map} +1 -1
- package/build/assets/{index-c49f7120.js → index-e86c210a.js} +3 -3
- package/build/assets/index-e86c210a.js.map +1 -0
- package/build/index.html +2 -2
- package/package.json +23 -23
- package/build/assets/AppRoot-1c970c4f.js +0 -5
- package/build/assets/AppRoot-1c970c4f.js.map +0 -1
- package/build/assets/Chart-1fa85c96.js +0 -2
- package/build/assets/Chart-1fa85c96.js.map +0 -1
- package/build/assets/ControlType-001645f1.js.map +0 -1
- package/build/assets/IrisGridModel-52d7c835.js +0 -2
- package/build/assets/IrisGridModel-52d7c835.js.map +0 -1
- package/build/assets/index-c49f7120.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,a9 as p,M as U,J as e,an as Oe,aD as y,V as ge,ab as Dr,a3 as we,N as S,aj as R,aS as Ar,aR as O,a2 as or,bi as Xr,aF as P,bz as Mr,ah as Yr,ai as _,ak as Zr,bA as Jr,al as Qr,a8 as Xe,ao as C,b5 as eo,bB as Ge,b4 as Y,a7 as ro,am as oo,b2 as Ue,ar as to,aX as G,aW as so,a6 as ao,as as lo,bC as no,bD as io,bE as co,bF as Z,bG as ho,bH as Te,bI as D,aM as uo,bJ as mo,bK as go,bg as xo,a0 as po,W as vo}from"./vendor-3cc10195.js";import{b9 as tr,ba as K,bb as q,a$ as be,a4 as fo,bc as Ye,bd as Ze,be as $r,aT as bo,bf as sr,bg as ar,bh as lr,U as He,bi as jo,bj as yo,N as wo,bk as Co,bl as So,aW as nr,bm as ze,aq as ko,f as To,bn as No,s as Io}from"./index-b99dd0d8.js";import{W as Eo}from"./monaco-b5248072.js";import{c as Se,G as Rr,m as J,S as le,L as Do,b as Ne,I as Ie}from"./IrisGridModel-52d7c835.js";import{B as v,u as Lr,s as oe,q as te,aM as M,K as $,ai as je,ag as Ao,N as ir,bE as cr,R as Mo,C as L,aR as ve,S as ye,aG as $o,aj as Ro,d as dr,E as Pr,J as hr,bL as Q,au as Lo,a4 as Po,aw as _o}from"./ControlType-001645f1.js";import{M as ur,H as Bo,A as Fo,T as Vo,D as Oo,e as Go,c as Uo,i as Ho,V as I,h as zo,d as Wo,L as Ee,f as Ko,E as ee,C as De,k as qo}from"./FontBootstrap-35901c17.js";import{G as se,T as Xo}from"./Grid-28612899.js";import{G as _r,O as A,C as We,b as Yo,S as Zo,c as de,P as mr,h as Jo,e as Qo,g as et,L as rt}from"./TokenBoxCellRenderer-b5f2e3b0.js";import{k as gr,T as b,g as ot,P as tt,o as st,p as z,Q as at,L as lt,D as nt}from"./IrisGridShortcuts-14b85cc2.js";import{N as it,H as Je,P as xr,T as ct,b as dt,j as ht}from"./LocalWorkspaceStorage-b1dcae96.js";import"./helpers-de833af9.js";import"./useMergeRef-da6b2a92.js";function pr(t,r,o,s,a,l,n){try{var i=t[l](n),d=i.value}catch(h){o(h);return}i.done?r(d):Promise.resolve(d).then(s,a)}function Ae(t){return function(){var r=this,o=arguments;return new Promise(function(s,a){var l=t.apply(r,o);function n(d){pr(l,s,a,n,i,"next",d)}function i(d){pr(l,s,a,n,i,"throw",d)}n(void 0)})}}function V(t,r,o){return r=ut(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function ut(t){var r=mt(t,"string");return typeof r=="symbol"?r:String(r)}function mt(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var s=o.call(t,r||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class gt extends Se{constructor(){var{rowCount:r=1e9,columnCount:o=100,floatingTopRowCount:s=0,floatingBottomRowCount:a=0,floatingLeftColumnCount:l=0,floatingRightColumnCount:n=0,isEditable:i=!1,editedData:d=[]}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),V(this,"numRows",void 0),V(this,"numColumns",void 0),V(this,"floatingTop",void 0),V(this,"floatingBottom",void 0),V(this,"floatingLeft",void 0),V(this,"floatingRight",void 0),V(this,"editable",void 0),V(this,"editedData",void 0),this.numRows=r,this.numColumns=o,this.floatingTop=s,this.floatingBottom=a,this.floatingLeft=l,this.floatingRight=n,this.editable=i,this.editedData=d}get rowCount(){return this.numRows}get columnCount(){return this.numColumns}get floatingTopRowCount(){return this.floatingTop}get floatingBottomRowCount(){return this.floatingBottom}get floatingLeftColumnCount(){return this.floatingLeft}get floatingRightColumnCount(){return this.floatingRight}get isEditable(){return this.editable}textForCell(r,o){var s,a;return(s=(a=this.editedData[r])===null||a===void 0?void 0:a[o])!==null&&s!==void 0?s:"".concat(r,",").concat(o)}colorForCell(r,o,s){return s.textColor}textForColumnHeader(r){return"".concat(r)}textForRowHeader(r){return"".concat(r)}textForRowFooter(r){return"".concat(r)}setValueForCell(r,o,s){var a=this;return Ae(function*(){a.editedData[r]==null&&(a.editedData[r]=[]),a.editedData[r][o]="".concat(s)})()}setValueForRanges(r,o){var s=this;return Ae(function*(){Rr.forEachCell(r,(a,l)=>{s.setValueForCell(a,l,o)})})()}setValues(r){var o=this;return Ae(function*(){for(var s=0;s<r.length;s+=1){var a,l,n=r[s];o.setValueForCell((a=n.column)!==null&&a!==void 0?a:n.x,(l=n.row)!==null&&l!==void 0?l:n.y,n.text)}})()}editValueForCell(r,o){return this.textForCell(r,o)}isValidForCell(r,o,s){return!0}isEditableRange(r){return this.isEditable}delete(r){throw new Error("Method not implemented.")}}const Qe=gt;function T(t,r,o){return r=xt(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function xt(t){var r=pt(t,"string");return typeof r=="symbol"?r:String(r)}function pt(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var s=o.call(t,r||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class E extends Qe{constructor(){var{rowCount:r=E.DEFAULT_ROW_COUNT,columnCount:o=E.DEFAULT_COLUMN_COUNT,children:s=new Map,childRowCount:a=Math.ceil(Math.max(E.MIN_CHILD_ROW_COUNT,r*E.DEFAULT_CHILD_ROW_COUNT_FACTOR)),maxDepth:l=E.MAX_DEPTH}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super({rowCount:r,columnCount:o}),T(this,"children",void 0),T(this,"childRowCount",void 0),T(this,"maxDepth",void 0),T(this,"getCachedModelRowOffset",J((n,i)=>{for(var d=null,h=i,c=[...n].sort((w,B)=>w[0]-B[0]),m=0;m<c.length;m+=1){var[g,f]=c[m];if(h<=g)break;var j=f.rowCount;if(h<=g+j){d=g,h=h-g-1;break}h-=j}return{key:d,offsetRow:h}})),T(this,"getCachedTextForRowHeader",J((n,i)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,i);if(d!=null){var c=n.get(d);if(c!==void 0)return"".concat(d,".").concat(c.textForRowHeader(h))}return"".concat(h)})),T(this,"getCachedTextForCell",J((n,i,d)=>{var{key:h,offsetRow:c}=this.getCachedModelRowOffset(n,d);if(h!=null){var m=n.get(h);if(m!==void 0)return"".concat(h,".").concat(m.textForCell(i,c))}return"".concat(i,",").concat(c)})),T(this,"getCachedIsRowExpandable",J((n,i,d)=>{var h=this.getCachedDepthForRow(n,i);return h<d})),T(this,"getCachedIsRowExpanded",J((n,i)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,i);if(d!=null){var c=n.get(d);if(c!==void 0)return c.isRowExpanded(h)}return n.has(h)})),T(this,"getCachedDepthForRow",J((n,i)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,i);if(d!=null){var c=n.get(d);if(c!==void 0)return c.depthForRow(h)+1}return 0})),this.children=s,this.childRowCount=a,this.maxDepth=l}textForCell(r,o){return this.getCachedTextForCell(this.children,r,o)}textForRowHeader(r){return this.getCachedTextForRowHeader(this.children,r)}isRowMovable(r){return!1}get hasExpandableRows(){return!0}get isExpandAllAvailable(){return!1}get floatingBottomRowCount(){return 0}isRowExpandable(r){return this.getCachedIsRowExpandable(this.children,r,this.maxDepth)}isRowExpanded(r){return this.getCachedIsRowExpanded(this.children,r)}setRowExpanded(r,o){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,{key:a,offsetRow:l}=this.getCachedModelRowOffset(this.children,r),n=new Map(this.children);if(a!=null){var i=this.children.get(a);if(i!==void 0){var{rowCount:d}=i;i.setRowExpanded(l,o,s),this.numRows+=i.rowCount-d}}else if(o){var c=new E({rowCount:this.childRowCount,columnCount:this.numColumns});n.set(l,c),this.numRows+=c.rowCount}else{var h=n.get(l);h!==void 0&&(this.numRows-=h.rowCount,n.delete(l))}this.children=n}expandAll(){throw new Error("Expand all not implemented.")}collapseAll(){throw new Error("Collapse all not implemented.")}depthForRow(r){return this.getCachedDepthForRow(this.children,r)}}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 ue=E;function Me(t,r,o){return r=vt(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function vt(t){var r=ft(t,"string");return typeof r=="symbol"?r:String(r)}function ft(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var s=o.call(t,r||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class bt extends Se{constructor(r,o){var s;super(),Me(this,"data",void 0),Me(this,"columnHeaders",void 0),Me(this,"numberOfColumns",void 0),this.data=r,this.numberOfColumns=Math.max(...r.map(a=>a.length),(s=o?.length)!==null&&s!==void 0?s:0),this.columnHeaders=o}get rowCount(){return this.data.length}get columnCount(){return this.numberOfColumns}textForCell(r,o){var s;return"".concat((s=this.data[o])===null||s===void 0?void 0:s[r])}textForColumnHeader(r){var o,s;return(o=(s=this.columnHeaders)===null||s===void 0?void 0:s[r])!==null&&o!==void 0?o:""}}const jt=bt;function $e(t,r,o){return r=yt(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function yt(t){var r=wt(t,"string");return typeof r=="symbol"?r:String(r)}function wt(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var s=o.call(t,r||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class Ct extends Se{constructor(r,o){super(),$e(this,"numberOfColumns",void 0),$e(this,"numberOfRows",void 0),$e(this,"viewportData",void 0),this.numberOfColumns=r,this.numberOfRows=o}get columnCount(){return this.numberOfColumns}get rowCount(){return this.numberOfRows}textForCell(r,o){var s,a,l,n,i,d,h,c=o-((s=(a=this.viewportData)===null||a===void 0?void 0:a.rowOffset)!==null&&s!==void 0?s:0),m=r-((l=(n=this.viewportData)===null||n===void 0?void 0:n.columnOffset)!==null&&l!==void 0?l:0);return"".concat((i=(d=this.viewportData)===null||d===void 0||(h=d.data[c])===null||h===void 0?void 0:h[m])!==null&&i!==void 0?i:"")}textForColumnHeader(r){return"".concat(r)}textForRowHeader(r){return"".concat(r)}}const St=Ct;function N(t,r,o){return r=kt(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function kt(t){var r=Tt(t,"string");return typeof r=="symbol"?r:String(r)}function Tt(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var s=o.call(t,r||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var Nt="proportional",It=_r.positiveBarColor,Et=_r.negativeBarColor,Dt="beside",At="LTR",Mt="right";function $t(t){return Array.isArray(t)&&t.every(r=>typeof r=="number")}class Rt extends Se{constructor(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Map,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Map,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:new Map,l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:new Map,n=arguments.length>5&&arguments[5]!==void 0?arguments[5]:new Map,i=arguments.length>6&&arguments[6]!==void 0?arguments[6]:new Map,d=arguments.length>7&&arguments[7]!==void 0?arguments[7]:new Map,h=arguments.length>8&&arguments[8]!==void 0?arguments[8]:new Map;super(),N(this,"numberOfColumns",void 0),N(this,"numberOfRows",void 0),N(this,"data",void 0),N(this,"columnMins",void 0),N(this,"columnMaxs",void 0),N(this,"columnAxes",void 0),N(this,"valuePlacements",void 0),N(this,"directions",void 0),N(this,"positiveColors",void 0),N(this,"negativeColors",void 0),N(this,"opacities",void 0),N(this,"textAlignments",void 0),N(this,"markers",void 0),this.positiveColors=s,this.negativeColors=a,this.data=r,this.columnAxes=o,this.valuePlacements=l,this.opacities=n,this.directions=i,this.textAlignments=d,this.markers=h,this.numberOfRows=Math.max(...r.map(g=>g.length)),this.numberOfColumns=r.length,this.columnMins=new Map,this.columnMaxs=new Map;for(var c=0;c<r.length;c+=1){var m=r[c];$t(m)&&(this.columnMins.set(c,Math.min(...m)),this.columnMaxs.set(c,Math.max(...m)))}}get rowCount(){return this.numberOfRows}get columnCount(){return this.numberOfColumns}textForCell(r,o){var s;return"".concat((s=this.data[r])===null||s===void 0?void 0:s[o])}textForColumnHeader(r){return"".concat(r)}textAlignForCell(r,o){var s;return(s=this.textAlignments.get(r))!==null&&s!==void 0?s:Mt}renderTypeForCell(r,o){return r<20||r%2===o%2?"dataBar":"text"}dataBarOptionsForCell(r,o){var s,a,l,n,i,d,h,c=tr(this.columnMins,r),m=tr(this.columnMaxs,r),g=(s=this.columnAxes.get(r))!==null&&s!==void 0?s:Nt,f=(a=this.valuePlacements.get(r))!==null&&a!==void 0?a:Dt,j=this.opacities.get(r);j==null||j>1?j=1:j<0&&(j=0);var w=(l=this.directions.get(r))!==null&&l!==void 0?l:At,B=(n=this.positiveColors.get(r))!==null&&n!==void 0?n:It,ae=(i=this.negativeColors.get(r))!==null&&i!==void 0?i:Et,H=Number((d=this.data[r])===null||d===void 0?void 0:d[o]),X=H>=0?B:ae,ke=(h=this.markers.get(r))!==null&&h!==void 0?h:[];return{columnMin:c,columnMax:m,axis:g,color:X,valuePlacement:f,opacity:j,markers:ke,direction:w,value:H}}}const Lt=Rt,Pt="isolated-section-query",Br="sample-section";function*xe(t,r){const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",s=o.length;for(let a=t;a<=r;a+=1){const l=a%s;let n=String(Math.floor(a/s));n==="0"&&(n="");const i=o[l],d=`${i}${n}`,h=`${i.repeat(3)}${n}`;yield u.createElement(p,{key:d,textValue:h,children:h})}}function*er(t,r={}){const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",s=o.length,a=Object.keys(K);for(let l=0;l<t;l+=1){const n=l%s;let i=String(Math.floor(l/s));i==="0"&&(i="");const d=o[n],h=`${d}${i}`,c=r.icons===!0?a[l%a.length]:void 0,m=r.descriptions===!0?`Description ${h}`:void 0,g=c??`${d.repeat(3)}${i}`;yield{key:h,item:{key:(l+1)*100,content:g,textValue:g,description:m,icon:c}}}}function*Fr(t=1){for(;;)t=t*16807%2147483647,yield t/2147483647}function vr(){return window.location.search.includes("isolateSection=true")?window.location.hash.replace(/^#/,""):""}function Vr(){const[t,r]=u.useState(vr);return u.useEffect(()=>{const o=()=>r(vr());return window.addEventListener("hashchange",o),()=>window.removeEventListener("hashchange",o)},[]),t}function _t(t=1){const[r]=u.useState(()=>Fr(t));return u.useCallback(()=>{const o=r.next();if(o.done===!0)throw new Error("Random number generator unexpectedly finished");return o.value},[r])}function Or(t){return`${Br}-${t.toLocaleLowerCase().replaceAll(" ","-")}`}function Gr(t,r=[]){const o=Or(t),s=U(Br,...r);return{id:o,className:s}}function Bt(t,r=[]){const{id:o,className:s}=Gr(t,r);return{id:o,UNSAFE_className:s}}function x({name:t,className:r="",component:o="div",...s}){const a=Vr(),l=Or(t);if(!(a===""||a===l))return null;const i=o==="div"?Gr:Bt;return e.jsx(o,{...s,...i(t,[r])})}function k(){}class me 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(Oe,{children:[e.jsx(v,{kind:"primary",onClick:k,children:"Primary"}),e.jsx(v,{kind:"secondary",onClick:k,children:"Secondary"}),e.jsx(v,{kind:"tertiary",onClick:k,children:"Tertiary"}),e.jsx(v,{kind:"success",onClick:k,children:"Success"}),e.jsx(v,{kind:"danger",onClick:k,children:"Danger"}),e.jsx(v,{kind:"inline",onClick:k,children:"Inline"}),e.jsx(v,{kind:"ghost",onClick:k,children:"Ghost"})]})})]})}static renderLinks(){const r={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(y,{gap:"1rem",children:Object.entries(r).map(([o,s])=>e.jsxs("a",{className:`text-${o}`,children:[o," (",s,")"]},o))})]})}static renderSocketedButtons(){return e.jsxs(x,{name:"buttons-socketed",children:[e.jsx("h5",{children:"Socketed Buttons (for linker)"}),e.jsxs(Oe,{marginBottom:"1rem",children:[e.jsx(le,{onClick:k,children:"Unlinked"}),e.jsx(le,{isLinked:!0,onClick:k,children:"Linked"}),e.jsx(le,{isLinkedSource:!0,onClick:k,children:"Linked Source"}),e.jsx(le,{isLinked:!0,isInvalid:!0,onClick:k,children:"Error"}),e.jsx(le,{disabled:!0,onClick:k,children:"Disabled"})]})]})}constructor(r){super(r),this.state={toggle:!0}}renderInlineButtons(){const{toggle:r}=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:q,tooltip:"test",onClick:k}),"Toggle button (class active):",e.jsx(v,{className:"mx-2",onClick:()=>{this.setState({toggle:!r})},active:r,kind:"inline",icon:q,tooltip:"test"}),"Disabled:",e.jsx(v,{className:"mx-2",kind:"inline",disabled:!0,onClick:k,children:"Disabled"}),"With Text:",e.jsx(v,{className:"mx-2",kind:"inline",icon:q,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(v,{kind:"ghost",icon:q,tooltip:"test",onClick:k}),e.jsx("span",{className:"mx-2",children:"btn-link:"}),e.jsx(v,{kind:"ghost",onClick:k,children:"Text Button"}),e.jsx("span",{className:"mx-2",children:"btn-link (text w/ optional with icon):"}),e.jsx(v,{kind:"ghost",icon:q,onClick:k,children:"Text Button"})]})}render(){const r=me.renderButtons(),o=this.renderInlineButtons(),s=me.renderSocketedButtons(),a=me.renderLinks();return e.jsxs("div",{children:[e.jsx("h2",{className:"ui-title",children:"Buttons"}),e.jsxs("div",{style:{padding:"1rem 0"},children:[r,o,s,a]})]})}}function Ft(){const t=Lr();ur.random=_t();const[r]=u.useState(()=>new ur(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(Do,{model:r})})]})}const Ke="2px solid var(--dh-color-notice-bg)",Vt={"--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"},fr={"--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"},Ot={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 Gt(t){const r=be.parseRgba(be.asRgbOrRgbaString(t)??"");if(r==null||r.a<.5)return"white";const{r:o,g:s,b:a}=r;return be.getBrightness([o,s,a])>=128?"black":"white"}function Ut(t){const r=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=r.getPropertyValue(s);return s==="--dh-color-chart-colorway"?fo(a??"").map(([n,i])=>a.substring(n,i+1)).map((n,i)=>({name:`${s}-${i}`,value:n})):{name:s,value:a}}).flat()}function re(t,r,o,s=Vt){const a=Ot[t];return Ut(r).reduce((i,{name:d,value:h})=>{if(/^--dh-color-true-(.*?)$/.test(d)||/^--dh-color-gray-(light|mid|dark)$/.test(d))return i;const c=/^--dh-color-([^-]+)(?:-([^-]+))?/.exec(d);let m=s[d]??c?.[o]??c?.[1]??"???";return m=a[m]??m,i[m]==null&&(i[m]=[]),d in fr&&i[m].push({isLabel:!0,name:fr[d],value:""}),/^--dh-color-gray-(light|mid|dark)$/.test(d)||i[m].push({name:d,value:h}),i},{})}function Ht(){const t=u.useRef(null);return u.useLayoutEffect(()=>{if(t.current==null)return;const r=getComputedStyle(t.current),{backgroundColor:o}=r;t.current.style.color=Gt(o)},[]),t}function zt(t,r){const[o,s]=u.useState();return u.useEffect(()=>{if(t.current==null)return;const a=getComputedStyle(t.current,r).getPropertyValue("content"),l=/"(--dh-color-.*?)[,"]/.exec(a)?.[1];if(l==null)return;const n=getComputedStyle(t.current).getPropertyValue(l);s(n)},[t,r]),o}function Re({className:t,children:r}){const o=Ht(),s=zt(o,":after"),a=u.useMemo(()=>s!=null?{value:s}:null,[s]),l=a!=null&&a.value!=="";return e.jsxs("div",{ref:o,className:t,style:{border:l?void 0:Ke},children:[l&&e.jsx(oe,{interactive:!0,children:e.jsx("div",{children:a.value})}),r]})}function Wt(){const t=["100","200","300","400","500","600","700","800","850","8XX","900"].map(s=>e.jsx(Re,{className:U("swatch","gray-swatch",`gray-swatch-${s}`),children:s==="8XX"?"N/A":`Gray-${s}`},s)),r=["red","orange","yellow","green","blue","purple","white","black"].map(s=>e.jsx(Re,{className:U("swatch",`swatch-${s}`),children:s},s)),o=["content-bg","background","foreground","primary","primary-dark","secondary","secondary-hover","success","info","warning","danger","danger-hover"].map(s=>e.jsx(Re,{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,r]}),e.jsx("div",{className:"col",children:o}),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 Kt extends u.Component{constructor(r){super(r),this.makeContextMenuItems=this.makeContextMenuItems.bind(this)}makeContextMenuItems(r){const o=r!==void 0?` ${r}`:"";return[{title:`Show Alert${o}`,icon:Ye,action:()=>{alert(`Alert${o}!`)},shortcut:new te({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[M.CTRL,$.A],macShortcut:[M.CMD,$.A]})},{title:`Log Message${o}`,icon:Ze,action:()=>{console.log(`Logging a message${o}!`)},shortcut:new te({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[M.CTRL,$.L],macShortcut:[M.CMD,$.L]})},{title:"Sub-menu",actions:()=>this.makeContextMenuItems((r??0)+1),order:3}].concat(new Array(10).fill({title:`Disabled Option${o}`,disabled:!0,order:2}))}render(){const r=this.makeContextMenuItems(),s=[{title:"Show Shortcuts",icon:$r,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new te({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[M.CTRL,$.SLASH],macShortcut:[M.CMD,$.SLASH]}),group:je.groups.global}].concat(r),a=()=>new Promise(l=>{setTimeout(()=>{l(r)},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(je,{actions:s})]}),e.jsxs(v,{kind:"tertiary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(je,{actions:a})]})]})}}class qt extends u.Component{constructor(r){super(r),this.sampleInput=ge.createRef(),this.handleUpdateCheckboxMap=this.handleUpdateCheckboxMap.bind(this);const o=["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([o,s,a])}}handleUpdateCheckboxMap(r){this.setState({checkBoxMap:r})}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:r,checkBoxMap:o}=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:()=>{r?this.setState({isShown:!1}):this.setState({isShown:!0})},children:["Open Dialog",e.jsx(Ao,{options:{placement:"bottom"},isShown:r,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(Bo,{menuText:"Checkbox Menu",valueMap:o,onUpdateValueMap:this.handleUpdateCheckboxMap})]})}}class Xt extends u.Component{constructor(r){super(r),this.state={isShown:!1}}render(){const r=[{title:"Show Alert",icon:Ye,action:()=>{alert("Alert!")},shortcut:new te({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[M.CTRL,$.A],macShortcut:[M.CMD,$.A]})},{title:"Log Message",icon:Ze,action:()=>{console.log("Logging a message!")},shortcut:new te({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[M.CTRL,$.L],macShortcut:[M.CMD,$.L]})}],s=[{title:"Show Shortcuts",icon:$r,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new te({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[M.CTRL,$.SLASH],macShortcut:[M.CMD,$.SLASH]}),group:je.groups.global}].concat(r),{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:bo,onClick:()=>{},children:e.jsx(ir,{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(ir,{isShown:a,onMenuClosed:()=>{this.setState({isShown:!1})},actions:s})]})]})}}const Yt=`trades = db.t("LearnDeephaven", "StockTrades").where("Date=\`2017-08-25\`")\\
|
|
1
|
+
import{r as u,a9 as p,M as U,J as e,an as Oe,aD as y,V as ge,ab as Dr,a3 as we,N as S,aj as R,aS as Ar,aR as O,a2 as or,bi as Xr,aF as P,bz as Mr,ah as Yr,ai as _,ak as Zr,bA as Jr,al as Qr,a8 as Xe,ao as C,b5 as eo,bB as Ge,b4 as Y,a7 as ro,am as oo,b2 as Ue,ar as to,aX as G,aW as so,a6 as ao,as as lo,bC as no,bD as io,bE as co,bF as Z,bG as ho,bH as Te,bI as D,aM as uo,bJ as mo,bK as go,bg as xo,a0 as po,W as vo}from"./vendor-3cc10195.js";import{b9 as tr,ba as K,bb as q,a$ as be,a4 as fo,bc as Ye,bd as Ze,be as $r,aT as bo,bf as sr,bg as ar,bh as lr,U as He,bi as jo,bj as yo,N as wo,bk as Co,bl as So,aW as nr,bm as ze,aq as ko,f as To,bn as No,s as Io}from"./index-d1d2711f.js";import{W as Eo}from"./monaco-b5248072.js";import{c as Se,G as Rr,m as J,S as le,L as Do,b as Ne,I as Ie}from"./IrisGridModel-d6e3269b.js";import{B as v,u as Lr,s as oe,q as te,aM as M,K as $,ai as je,ag as Ao,N as ir,bE as cr,R as Mo,C as L,aR as ve,S as ye,aG as $o,aj as Ro,d as dr,E as Pr,J as hr,bL as Q,au as Lo,a4 as Po,aw as _o}from"./ControlType-fe978772.js";import{M as ur,H as Bo,A as Fo,T as Vo,D as Oo,e as Go,c as Uo,i as Ho,V as I,h as zo,d as Wo,L as Ee,f as Ko,E as ee,C as De,k as qo}from"./FontBootstrap-f4b4e8a8.js";import{G as se,T as Xo}from"./Grid-bd55074d.js";import{G as _r,O as A,C as We,b as Yo,S as Zo,c as de,P as mr,h as Jo,e as Qo,g as et,L as rt}from"./TokenBoxCellRenderer-4790783d.js";import{k as gr,T as b,g as ot,P as tt,o as st,p as z,Q as at,L as lt,D as nt}from"./IrisGridShortcuts-62ef3674.js";import{N as it,H as Je,P as xr,T as ct,b as dt,j as ht}from"./LocalWorkspaceStorage-b77ac809.js";import"./helpers-de833af9.js";import"./useMergeRef-da6b2a92.js";function pr(t,r,o,s,a,l,n){try{var i=t[l](n),d=i.value}catch(h){o(h);return}i.done?r(d):Promise.resolve(d).then(s,a)}function Ae(t){return function(){var r=this,o=arguments;return new Promise(function(s,a){var l=t.apply(r,o);function n(d){pr(l,s,a,n,i,"next",d)}function i(d){pr(l,s,a,n,i,"throw",d)}n(void 0)})}}function V(t,r,o){return r=ut(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function ut(t){var r=mt(t,"string");return typeof r=="symbol"?r:String(r)}function mt(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var s=o.call(t,r||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class gt extends Se{constructor(){var{rowCount:r=1e9,columnCount:o=100,floatingTopRowCount:s=0,floatingBottomRowCount:a=0,floatingLeftColumnCount:l=0,floatingRightColumnCount:n=0,isEditable:i=!1,editedData:d=[]}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),V(this,"numRows",void 0),V(this,"numColumns",void 0),V(this,"floatingTop",void 0),V(this,"floatingBottom",void 0),V(this,"floatingLeft",void 0),V(this,"floatingRight",void 0),V(this,"editable",void 0),V(this,"editedData",void 0),this.numRows=r,this.numColumns=o,this.floatingTop=s,this.floatingBottom=a,this.floatingLeft=l,this.floatingRight=n,this.editable=i,this.editedData=d}get rowCount(){return this.numRows}get columnCount(){return this.numColumns}get floatingTopRowCount(){return this.floatingTop}get floatingBottomRowCount(){return this.floatingBottom}get floatingLeftColumnCount(){return this.floatingLeft}get floatingRightColumnCount(){return this.floatingRight}get isEditable(){return this.editable}textForCell(r,o){var s,a;return(s=(a=this.editedData[r])===null||a===void 0?void 0:a[o])!==null&&s!==void 0?s:"".concat(r,",").concat(o)}colorForCell(r,o,s){return s.textColor}textForColumnHeader(r){return"".concat(r)}textForRowHeader(r){return"".concat(r)}textForRowFooter(r){return"".concat(r)}setValueForCell(r,o,s){var a=this;return Ae(function*(){a.editedData[r]==null&&(a.editedData[r]=[]),a.editedData[r][o]="".concat(s)})()}setValueForRanges(r,o){var s=this;return Ae(function*(){Rr.forEachCell(r,(a,l)=>{s.setValueForCell(a,l,o)})})()}setValues(r){var o=this;return Ae(function*(){for(var s=0;s<r.length;s+=1){var a,l,n=r[s];o.setValueForCell((a=n.column)!==null&&a!==void 0?a:n.x,(l=n.row)!==null&&l!==void 0?l:n.y,n.text)}})()}editValueForCell(r,o){return this.textForCell(r,o)}isValidForCell(r,o,s){return!0}isEditableRange(r){return this.isEditable}delete(r){throw new Error("Method not implemented.")}}const Qe=gt;function T(t,r,o){return r=xt(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function xt(t){var r=pt(t,"string");return typeof r=="symbol"?r:String(r)}function pt(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var s=o.call(t,r||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class E extends Qe{constructor(){var{rowCount:r=E.DEFAULT_ROW_COUNT,columnCount:o=E.DEFAULT_COLUMN_COUNT,children:s=new Map,childRowCount:a=Math.ceil(Math.max(E.MIN_CHILD_ROW_COUNT,r*E.DEFAULT_CHILD_ROW_COUNT_FACTOR)),maxDepth:l=E.MAX_DEPTH}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super({rowCount:r,columnCount:o}),T(this,"children",void 0),T(this,"childRowCount",void 0),T(this,"maxDepth",void 0),T(this,"getCachedModelRowOffset",J((n,i)=>{for(var d=null,h=i,c=[...n].sort((w,B)=>w[0]-B[0]),m=0;m<c.length;m+=1){var[g,f]=c[m];if(h<=g)break;var j=f.rowCount;if(h<=g+j){d=g,h=h-g-1;break}h-=j}return{key:d,offsetRow:h}})),T(this,"getCachedTextForRowHeader",J((n,i)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,i);if(d!=null){var c=n.get(d);if(c!==void 0)return"".concat(d,".").concat(c.textForRowHeader(h))}return"".concat(h)})),T(this,"getCachedTextForCell",J((n,i,d)=>{var{key:h,offsetRow:c}=this.getCachedModelRowOffset(n,d);if(h!=null){var m=n.get(h);if(m!==void 0)return"".concat(h,".").concat(m.textForCell(i,c))}return"".concat(i,",").concat(c)})),T(this,"getCachedIsRowExpandable",J((n,i,d)=>{var h=this.getCachedDepthForRow(n,i);return h<d})),T(this,"getCachedIsRowExpanded",J((n,i)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,i);if(d!=null){var c=n.get(d);if(c!==void 0)return c.isRowExpanded(h)}return n.has(h)})),T(this,"getCachedDepthForRow",J((n,i)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,i);if(d!=null){var c=n.get(d);if(c!==void 0)return c.depthForRow(h)+1}return 0})),this.children=s,this.childRowCount=a,this.maxDepth=l}textForCell(r,o){return this.getCachedTextForCell(this.children,r,o)}textForRowHeader(r){return this.getCachedTextForRowHeader(this.children,r)}isRowMovable(r){return!1}get hasExpandableRows(){return!0}get isExpandAllAvailable(){return!1}get floatingBottomRowCount(){return 0}isRowExpandable(r){return this.getCachedIsRowExpandable(this.children,r,this.maxDepth)}isRowExpanded(r){return this.getCachedIsRowExpanded(this.children,r)}setRowExpanded(r,o){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,{key:a,offsetRow:l}=this.getCachedModelRowOffset(this.children,r),n=new Map(this.children);if(a!=null){var i=this.children.get(a);if(i!==void 0){var{rowCount:d}=i;i.setRowExpanded(l,o,s),this.numRows+=i.rowCount-d}}else if(o){var c=new E({rowCount:this.childRowCount,columnCount:this.numColumns});n.set(l,c),this.numRows+=c.rowCount}else{var h=n.get(l);h!==void 0&&(this.numRows-=h.rowCount,n.delete(l))}this.children=n}expandAll(){throw new Error("Expand all not implemented.")}collapseAll(){throw new Error("Collapse all not implemented.")}depthForRow(r){return this.getCachedDepthForRow(this.children,r)}}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 ue=E;function Me(t,r,o){return r=vt(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function vt(t){var r=ft(t,"string");return typeof r=="symbol"?r:String(r)}function ft(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var s=o.call(t,r||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class bt extends Se{constructor(r,o){var s;super(),Me(this,"data",void 0),Me(this,"columnHeaders",void 0),Me(this,"numberOfColumns",void 0),this.data=r,this.numberOfColumns=Math.max(...r.map(a=>a.length),(s=o?.length)!==null&&s!==void 0?s:0),this.columnHeaders=o}get rowCount(){return this.data.length}get columnCount(){return this.numberOfColumns}textForCell(r,o){var s;return"".concat((s=this.data[o])===null||s===void 0?void 0:s[r])}textForColumnHeader(r){var o,s;return(o=(s=this.columnHeaders)===null||s===void 0?void 0:s[r])!==null&&o!==void 0?o:""}}const jt=bt;function $e(t,r,o){return r=yt(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function yt(t){var r=wt(t,"string");return typeof r=="symbol"?r:String(r)}function wt(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var s=o.call(t,r||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class Ct extends Se{constructor(r,o){super(),$e(this,"numberOfColumns",void 0),$e(this,"numberOfRows",void 0),$e(this,"viewportData",void 0),this.numberOfColumns=r,this.numberOfRows=o}get columnCount(){return this.numberOfColumns}get rowCount(){return this.numberOfRows}textForCell(r,o){var s,a,l,n,i,d,h,c=o-((s=(a=this.viewportData)===null||a===void 0?void 0:a.rowOffset)!==null&&s!==void 0?s:0),m=r-((l=(n=this.viewportData)===null||n===void 0?void 0:n.columnOffset)!==null&&l!==void 0?l:0);return"".concat((i=(d=this.viewportData)===null||d===void 0||(h=d.data[c])===null||h===void 0?void 0:h[m])!==null&&i!==void 0?i:"")}textForColumnHeader(r){return"".concat(r)}textForRowHeader(r){return"".concat(r)}}const St=Ct;function N(t,r,o){return r=kt(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function kt(t){var r=Tt(t,"string");return typeof r=="symbol"?r:String(r)}function Tt(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var s=o.call(t,r||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var Nt="proportional",It=_r.positiveBarColor,Et=_r.negativeBarColor,Dt="beside",At="LTR",Mt="right";function $t(t){return Array.isArray(t)&&t.every(r=>typeof r=="number")}class Rt extends Se{constructor(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Map,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Map,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:new Map,l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:new Map,n=arguments.length>5&&arguments[5]!==void 0?arguments[5]:new Map,i=arguments.length>6&&arguments[6]!==void 0?arguments[6]:new Map,d=arguments.length>7&&arguments[7]!==void 0?arguments[7]:new Map,h=arguments.length>8&&arguments[8]!==void 0?arguments[8]:new Map;super(),N(this,"numberOfColumns",void 0),N(this,"numberOfRows",void 0),N(this,"data",void 0),N(this,"columnMins",void 0),N(this,"columnMaxs",void 0),N(this,"columnAxes",void 0),N(this,"valuePlacements",void 0),N(this,"directions",void 0),N(this,"positiveColors",void 0),N(this,"negativeColors",void 0),N(this,"opacities",void 0),N(this,"textAlignments",void 0),N(this,"markers",void 0),this.positiveColors=s,this.negativeColors=a,this.data=r,this.columnAxes=o,this.valuePlacements=l,this.opacities=n,this.directions=i,this.textAlignments=d,this.markers=h,this.numberOfRows=Math.max(...r.map(g=>g.length)),this.numberOfColumns=r.length,this.columnMins=new Map,this.columnMaxs=new Map;for(var c=0;c<r.length;c+=1){var m=r[c];$t(m)&&(this.columnMins.set(c,Math.min(...m)),this.columnMaxs.set(c,Math.max(...m)))}}get rowCount(){return this.numberOfRows}get columnCount(){return this.numberOfColumns}textForCell(r,o){var s;return"".concat((s=this.data[r])===null||s===void 0?void 0:s[o])}textForColumnHeader(r){return"".concat(r)}textAlignForCell(r,o){var s;return(s=this.textAlignments.get(r))!==null&&s!==void 0?s:Mt}renderTypeForCell(r,o){return r<20||r%2===o%2?"dataBar":"text"}dataBarOptionsForCell(r,o){var s,a,l,n,i,d,h,c=tr(this.columnMins,r),m=tr(this.columnMaxs,r),g=(s=this.columnAxes.get(r))!==null&&s!==void 0?s:Nt,f=(a=this.valuePlacements.get(r))!==null&&a!==void 0?a:Dt,j=this.opacities.get(r);j==null||j>1?j=1:j<0&&(j=0);var w=(l=this.directions.get(r))!==null&&l!==void 0?l:At,B=(n=this.positiveColors.get(r))!==null&&n!==void 0?n:It,ae=(i=this.negativeColors.get(r))!==null&&i!==void 0?i:Et,H=Number((d=this.data[r])===null||d===void 0?void 0:d[o]),X=H>=0?B:ae,ke=(h=this.markers.get(r))!==null&&h!==void 0?h:[];return{columnMin:c,columnMax:m,axis:g,color:X,valuePlacement:f,opacity:j,markers:ke,direction:w,value:H}}}const Lt=Rt,Pt="isolated-section-query",Br="sample-section";function*xe(t,r){const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",s=o.length;for(let a=t;a<=r;a+=1){const l=a%s;let n=String(Math.floor(a/s));n==="0"&&(n="");const i=o[l],d=`${i}${n}`,h=`${i.repeat(3)}${n}`;yield u.createElement(p,{key:d,textValue:h,children:h})}}function*er(t,r={}){const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",s=o.length,a=Object.keys(K);for(let l=0;l<t;l+=1){const n=l%s;let i=String(Math.floor(l/s));i==="0"&&(i="");const d=o[n],h=`${d}${i}`,c=r.icons===!0?a[l%a.length]:void 0,m=r.descriptions===!0?`Description ${h}`:void 0,g=c??`${d.repeat(3)}${i}`;yield{key:h,item:{key:(l+1)*100,content:g,textValue:g,description:m,icon:c}}}}function*Fr(t=1){for(;;)t=t*16807%2147483647,yield t/2147483647}function vr(){return window.location.search.includes("isolateSection=true")?window.location.hash.replace(/^#/,""):""}function Vr(){const[t,r]=u.useState(vr);return u.useEffect(()=>{const o=()=>r(vr());return window.addEventListener("hashchange",o),()=>window.removeEventListener("hashchange",o)},[]),t}function _t(t=1){const[r]=u.useState(()=>Fr(t));return u.useCallback(()=>{const o=r.next();if(o.done===!0)throw new Error("Random number generator unexpectedly finished");return o.value},[r])}function Or(t){return`${Br}-${t.toLocaleLowerCase().replaceAll(" ","-")}`}function Gr(t,r=[]){const o=Or(t),s=U(Br,...r);return{id:o,className:s}}function Bt(t,r=[]){const{id:o,className:s}=Gr(t,r);return{id:o,UNSAFE_className:s}}function x({name:t,className:r="",component:o="div",...s}){const a=Vr(),l=Or(t);if(!(a===""||a===l))return null;const i=o==="div"?Gr:Bt;return e.jsx(o,{...s,...i(t,[r])})}function k(){}class me 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(Oe,{children:[e.jsx(v,{kind:"primary",onClick:k,children:"Primary"}),e.jsx(v,{kind:"secondary",onClick:k,children:"Secondary"}),e.jsx(v,{kind:"tertiary",onClick:k,children:"Tertiary"}),e.jsx(v,{kind:"success",onClick:k,children:"Success"}),e.jsx(v,{kind:"danger",onClick:k,children:"Danger"}),e.jsx(v,{kind:"inline",onClick:k,children:"Inline"}),e.jsx(v,{kind:"ghost",onClick:k,children:"Ghost"})]})})]})}static renderLinks(){const r={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(y,{gap:"1rem",children:Object.entries(r).map(([o,s])=>e.jsxs("a",{className:`text-${o}`,children:[o," (",s,")"]},o))})]})}static renderSocketedButtons(){return e.jsxs(x,{name:"buttons-socketed",children:[e.jsx("h5",{children:"Socketed Buttons (for linker)"}),e.jsxs(Oe,{marginBottom:"1rem",children:[e.jsx(le,{onClick:k,children:"Unlinked"}),e.jsx(le,{isLinked:!0,onClick:k,children:"Linked"}),e.jsx(le,{isLinkedSource:!0,onClick:k,children:"Linked Source"}),e.jsx(le,{isLinked:!0,isInvalid:!0,onClick:k,children:"Error"}),e.jsx(le,{disabled:!0,onClick:k,children:"Disabled"})]})]})}constructor(r){super(r),this.state={toggle:!0}}renderInlineButtons(){const{toggle:r}=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:q,tooltip:"test",onClick:k}),"Toggle button (class active):",e.jsx(v,{className:"mx-2",onClick:()=>{this.setState({toggle:!r})},active:r,kind:"inline",icon:q,tooltip:"test"}),"Disabled:",e.jsx(v,{className:"mx-2",kind:"inline",disabled:!0,onClick:k,children:"Disabled"}),"With Text:",e.jsx(v,{className:"mx-2",kind:"inline",icon:q,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(v,{kind:"ghost",icon:q,tooltip:"test",onClick:k}),e.jsx("span",{className:"mx-2",children:"btn-link:"}),e.jsx(v,{kind:"ghost",onClick:k,children:"Text Button"}),e.jsx("span",{className:"mx-2",children:"btn-link (text w/ optional with icon):"}),e.jsx(v,{kind:"ghost",icon:q,onClick:k,children:"Text Button"})]})}render(){const r=me.renderButtons(),o=this.renderInlineButtons(),s=me.renderSocketedButtons(),a=me.renderLinks();return e.jsxs("div",{children:[e.jsx("h2",{className:"ui-title",children:"Buttons"}),e.jsxs("div",{style:{padding:"1rem 0"},children:[r,o,s,a]})]})}}function Ft(){const t=Lr();ur.random=_t();const[r]=u.useState(()=>new ur(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(Do,{model:r})})]})}const Ke="2px solid var(--dh-color-notice-bg)",Vt={"--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"},fr={"--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"},Ot={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 Gt(t){const r=be.parseRgba(be.asRgbOrRgbaString(t)??"");if(r==null||r.a<.5)return"white";const{r:o,g:s,b:a}=r;return be.getBrightness([o,s,a])>=128?"black":"white"}function Ut(t){const r=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=r.getPropertyValue(s);return s==="--dh-color-chart-colorway"?fo(a??"").map(([n,i])=>a.substring(n,i+1)).map((n,i)=>({name:`${s}-${i}`,value:n})):{name:s,value:a}}).flat()}function re(t,r,o,s=Vt){const a=Ot[t];return Ut(r).reduce((i,{name:d,value:h})=>{if(/^--dh-color-true-(.*?)$/.test(d)||/^--dh-color-gray-(light|mid|dark)$/.test(d))return i;const c=/^--dh-color-([^-]+)(?:-([^-]+))?/.exec(d);let m=s[d]??c?.[o]??c?.[1]??"???";return m=a[m]??m,i[m]==null&&(i[m]=[]),d in fr&&i[m].push({isLabel:!0,name:fr[d],value:""}),/^--dh-color-gray-(light|mid|dark)$/.test(d)||i[m].push({name:d,value:h}),i},{})}function Ht(){const t=u.useRef(null);return u.useLayoutEffect(()=>{if(t.current==null)return;const r=getComputedStyle(t.current),{backgroundColor:o}=r;t.current.style.color=Gt(o)},[]),t}function zt(t,r){const[o,s]=u.useState();return u.useEffect(()=>{if(t.current==null)return;const a=getComputedStyle(t.current,r).getPropertyValue("content"),l=/"(--dh-color-.*?)[,"]/.exec(a)?.[1];if(l==null)return;const n=getComputedStyle(t.current).getPropertyValue(l);s(n)},[t,r]),o}function Re({className:t,children:r}){const o=Ht(),s=zt(o,":after"),a=u.useMemo(()=>s!=null?{value:s}:null,[s]),l=a!=null&&a.value!=="";return e.jsxs("div",{ref:o,className:t,style:{border:l?void 0:Ke},children:[l&&e.jsx(oe,{interactive:!0,children:e.jsx("div",{children:a.value})}),r]})}function Wt(){const t=["100","200","300","400","500","600","700","800","850","8XX","900"].map(s=>e.jsx(Re,{className:U("swatch","gray-swatch",`gray-swatch-${s}`),children:s==="8XX"?"N/A":`Gray-${s}`},s)),r=["red","orange","yellow","green","blue","purple","white","black"].map(s=>e.jsx(Re,{className:U("swatch",`swatch-${s}`),children:s},s)),o=["content-bg","background","foreground","primary","primary-dark","secondary","secondary-hover","success","info","warning","danger","danger-hover"].map(s=>e.jsx(Re,{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,r]}),e.jsx("div",{className:"col",children:o}),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 Kt extends u.Component{constructor(r){super(r),this.makeContextMenuItems=this.makeContextMenuItems.bind(this)}makeContextMenuItems(r){const o=r!==void 0?` ${r}`:"";return[{title:`Show Alert${o}`,icon:Ye,action:()=>{alert(`Alert${o}!`)},shortcut:new te({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[M.CTRL,$.A],macShortcut:[M.CMD,$.A]})},{title:`Log Message${o}`,icon:Ze,action:()=>{console.log(`Logging a message${o}!`)},shortcut:new te({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[M.CTRL,$.L],macShortcut:[M.CMD,$.L]})},{title:"Sub-menu",actions:()=>this.makeContextMenuItems((r??0)+1),order:3}].concat(new Array(10).fill({title:`Disabled Option${o}`,disabled:!0,order:2}))}render(){const r=this.makeContextMenuItems(),s=[{title:"Show Shortcuts",icon:$r,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new te({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[M.CTRL,$.SLASH],macShortcut:[M.CMD,$.SLASH]}),group:je.groups.global}].concat(r),a=()=>new Promise(l=>{setTimeout(()=>{l(r)},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(je,{actions:s})]}),e.jsxs(v,{kind:"tertiary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(je,{actions:a})]})]})}}class qt extends u.Component{constructor(r){super(r),this.sampleInput=ge.createRef(),this.handleUpdateCheckboxMap=this.handleUpdateCheckboxMap.bind(this);const o=["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([o,s,a])}}handleUpdateCheckboxMap(r){this.setState({checkBoxMap:r})}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:r,checkBoxMap:o}=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:()=>{r?this.setState({isShown:!1}):this.setState({isShown:!0})},children:["Open Dialog",e.jsx(Ao,{options:{placement:"bottom"},isShown:r,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(Bo,{menuText:"Checkbox Menu",valueMap:o,onUpdateValueMap:this.handleUpdateCheckboxMap})]})}}class Xt extends u.Component{constructor(r){super(r),this.state={isShown:!1}}render(){const r=[{title:"Show Alert",icon:Ye,action:()=>{alert("Alert!")},shortcut:new te({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[M.CTRL,$.A],macShortcut:[M.CMD,$.A]})},{title:"Log Message",icon:Ze,action:()=>{console.log("Logging a message!")},shortcut:new te({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[M.CTRL,$.L],macShortcut:[M.CMD,$.L]})}],s=[{title:"Show Shortcuts",icon:$r,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new te({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[M.CTRL,$.SLASH],macShortcut:[M.CMD,$.SLASH]}),group:je.groups.global}].concat(r),{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:bo,onClick:()=>{},children:e.jsx(ir,{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(ir,{isShown:a,onMenuClosed:()=>{this.setState({isShown:!1})},actions:s})]})]})}}const Yt=`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
|
`,As="_themeColorsPalette_v5aa0_1",Ms="_swatch_v5aa0_7",$s="_themeColors_v5aa0_1",Rs="_label_v5aa0_21",Ls="_capitalize_v5aa0_26",W={themeColorsPalette:As,swatch:Ms,themeColors:$s,label:Rs,capitalize:Ls};function Ps(){return{"Theme Color Palette":re("palette",ks,1),"Semantic Colors":re("semantic",Ts,1),"Chart Colors":re("chart",Ns,2),"Editor Colors":re("editor",Is,2),"Grid Colors":re("grid",Es,2),"Component Colors":re("component",Ds,1)}}function Nr({name:t,value:r}){return e.jsxs(e.Fragment,{children:[e.jsx("div",{children:t}),e.jsx("div",{children:r}),e.jsx("div",{children:be.normalizeCssColor(r,!0)})]})}function _s(){const{selectedThemeKey:t}=Pr(),r=u.useMemo(Ps,[t]);return e.jsx(e.Fragment,{children:Object.entries(r).map(([o,s],a)=>o==="Theme Color Palette"?e.jsxs(x,{name:o,children:[e.jsx("h2",{className:"ui-title",children:o}),e.jsx("div",{className:W.themeColorsPalette,children:Object.entries(s).map(([l,n],i)=>e.jsxs(u.Fragment,{children:[(i===0||i===1)&&n.map(({name:d},h)=>e.jsx("div",{style:{gridColumnStart:h+2,textAlign:"center"},className:"mt-3",children:d.split("-").pop()},d)),e.jsx("div",{className:"text-right pr-2",children:l}),n.map(({name:d,value:h})=>e.jsxs("div",{style:{backgroundColor:h,border:h===""&&d.length>0?Ke:void 0},className:U(W.swatch,"px-0"),children:[e.jsx(oe,{interactive:!0,children:e.jsx(Nr,{name:d,value:h})}),d&&e.jsx(hr,{copy:d})]},d))]},l))})]},o):e.jsxs(x,{name:o,children:[e.jsx("h2",{className:"ui-title",children:o}),e.jsx("div",{className:W.themeColors,children:Object.entries(s).map(([l,n])=>e.jsxs("div",{style:{gridRow:`span ${n.length+1}`},children:[e.jsx("span",{className:U(W.label,W.capitalize),children:l}),n.map(({isLabel:i,name:d,value:h,note:c})=>i===!0?e.jsx("span",{className:W.label,children:d},d):e.jsxs("div",{className:W.swatch,style:{border:h===""&&d.length>0?Ke:void 0},children:[e.jsx("div",{style:{backgroundColor:h,height:"var(--swatch-height)",aspectRatio:"1 / 1"}}),e.jsx(oe,{interactive:!0,children:e.jsx(Nr,{name:d,value:h})}),e.jsx("span",{children:d.replace("--dh-color-","")}),d.endsWith("-hue")||c!=null?e.jsx("span",{children:c??h}):null,e.jsx(hr,{copy:d})]},d))]},l))})]},o))})}const Ve="data-menu-category",Bs="data-no-menu",Fs="sample-section-e2e-ignore",zr="spectrum-component-samples",Wr="spectrum-comparison-samples";function Vs(){return e.jsxs("div",{id:zr,children:[e.jsx("h2",{className:"ui-title","data-no-menu":!0,children:"Spectrum Components"}),e.jsxs(P,{gap:20,columns:Mr("0px","1fr"),children:[e.jsxs(x,{name:"spectrum-buttons",component:I,children:[e.jsx("h3",{children:"Buttons"}),e.jsx(Os,{})]}),e.jsxs(x,{name:"spectrum-collections",component:I,children:[e.jsx("h3",{children:"Collections"}),e.jsx(zs,{})]}),e.jsxs(x,{name:"spectrum-content",component:I,children:[e.jsx("h3",{children:"Content"}),e.jsx(Hs,{})]}),e.jsxs(x,{name:"spectrum-forms",component:I,children:[e.jsx("h3",{children:"Forms"}),e.jsx(Us,{})]}),e.jsxs(x,{name:"spectrum-overlays",component:I,children:[e.jsx("h3",{children:"Overlays"}),e.jsxs(y,{gap:"size-160",children:[e.jsx(Gs,{}),e.jsxs(Yr,{children:[e.jsx(_,{children:"Dialog Trigger"}),t=>e.jsxs(Zr,{children:[e.jsx(Je,{children:"Some Heading"}),e.jsx(Jr,{children:"Some Header"}),e.jsx(Qr,{}),e.jsx(Xe,{children:e.jsx(b,{children:"Are you sure?"})}),e.jsxs(Oe,{children:[e.jsx(C,{variant:"secondary",onPress:t,children:"Cancel"}),e.jsx(C,{variant:"accent",onPress:t,children:"Confirm"})]})]})]})]})]}),e.jsxs(x,{name:"spectrum-well",component:I,children:[e.jsx("h3",{children:"Wells"}),e.jsx(eo,{children:"This is a well."})]})]})]})}function Os(){return e.jsxs(e.Fragment,{children:[e.jsxs(_,{marginBottom:"size-200",children:[e.jsx(R,{children:e.jsx(S,{icon:q})}),e.jsx(b,{children:"Icon Button"})]}),e.jsxs(P,{autoFlow:"column",columnGap:"size-250",rowGap:"size-150",columns:Ge(4,Mr(0,"size-2000")),rows:Ge(8,"size-400"),children:[e.jsx("label",{children:'Button style="outline"'}),e.jsx(C,{variant:"primary",style:"outline",children:"Primary"}),e.jsx(C,{variant:"secondary",style:"outline",children:"Secondary"}),e.jsx(C,{variant:"accent",style:"outline",children:"Accent"}),e.jsx(C,{variant:"negative",style:"outline",children:"Negative"}),e.jsx(C,{variant:"primary",staticColor:"black",style:"outline",children:"Static Black"}),e.jsx(C,{variant:"primary",staticColor:"white",style:"outline",children:"Static White"}),e.jsx(C,{variant:"primary",isDisabled:!0,style:"outline",children:"Disabled"}),e.jsx("label",{children:'Button style="fill"'}),e.jsx(C,{variant:"primary",style:"fill",children:"Primary"}),e.jsx(C,{variant:"secondary",style:"fill",children:"Secondary"}),e.jsx(C,{variant:"accent",style:"fill",children:"Accent"}),e.jsx(C,{variant:"negative",style:"fill",children:"Negative"}),e.jsx(C,{variant:"primary",staticColor:"black",style:"fill",children:"Static Black"}),e.jsx(C,{variant:"primary",staticColor:"white",style:"fill",children:"Static White"}),e.jsx(C,{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 Gs(){return e.jsxs(e.Fragment,{children:[e.jsx(b,{children:"Contextual Help"}),e.jsxs(ro,{variant:"info",children:[e.jsx(Je,{children:"Need help?"}),e.jsx(Xe,{children:e.jsx(b,{children:"This is a helpful description of the thing you need help with."})})]})]})}function Us(){return e.jsx(oo,{children:e.jsxs(P,{gap:20,columns:Ge("auto-fit","210px"),alignItems:"end",children:[e.jsx(Ue,{label:"Text Field"}),e.jsxs(to,{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(G,{children:"Checkbox"}),e.jsx(so,{label:"Slider",defaultValue:24}),e.jsx(ao,{children:"Switch"})]})})}function Hs(){return e.jsxs(lo,{children:[e.jsx(R,{size:"XL",children:e.jsx(S,{icon:wo})}),e.jsx(Je,{children:"Illustrated Message"}),e.jsx(Xe,{children:"This is the content of the message."})]})}function zs(){return e.jsxs(e.Fragment,{children:[e.jsx("label",{id:"table-view-sample",children:"List View"}),e.jsxs(no,{"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(io,{"aria-labelledby":"table-view-sample",selectionMode:"multiple",children:[e.jsxs(co,{children:[e.jsxs(Z,{title:"Person",children:[e.jsx(Z,{allowsResizing:!0,children:"Name"}),e.jsx(Z,{children:"Age"})]}),e.jsxs(Z,{title:"Address",children:[e.jsx(Z,{allowsResizing:!0,children:"City"}),e.jsx(Z,{children:"State"})]})]}),e.jsxs(ho,{children:[e.jsxs(Te,{children:[e.jsx(D,{children:"John"}),e.jsx(D,{children:"42"}),e.jsx(D,{children:"San Francisco"}),e.jsx(D,{children:"CA"})]}),e.jsxs(Te,{children:[e.jsx(D,{children:"Jane"}),e.jsx(D,{children:"38"}),e.jsx(D,{children:"San Francisco"}),e.jsx(D,{children:"CA"})]}),e.jsxs(Te,{children:[e.jsx(D,{children:"Becky"}),e.jsx(D,{children:"12"}),e.jsx(D,{children:"San Francisco"}),e.jsx(D,{children:"CA"})]})]})]})]})}function ne(t){return e.jsx("div",{...t})}function Ws(){const[t,r]=u.useState([]);u.useEffect(()=>{let s={category:"",items:[]};const a=[s],l=document.querySelector(`#${zr}`),n=document.querySelector(`#sample-section-${Wr}`);document.querySelectorAll(`h2,h3,[${Ve}]`).forEach(i=>{if(i.textContent==null||i.hasAttribute(Bs))return;if(i.hasAttribute(Ve)){s={category:i.getAttribute(Ve)??"",items:[]},a.push(s);return}const h=`${l?.contains(i)===!0?"spectrum-":n?.contains(i)===!0?"spectrum-compare-":""}${i.textContent}`.toLowerCase().replace(/\s/g,"-");i.id=h,s.items.push({id:h,label:i.textContent})}),r(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 o=u.useCallback(s=>{const a=String(s);document.getElementById(a)?.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{window.location.hash=a},1e3)},[]);return e.jsxs(uo,{children:[e.jsx(_,{children:e.jsx(R,{children:e.jsx(S,{icon:Co})})}),e.jsx(mo,{items:t,onAction:o,children:({category:s,items:a})=>e.jsx(go,{items:a,title:s,children:({id:l,label:n})=>e.jsx(p,{children:n},l)},s)})]})}function Ks(){const t=u.useCallback(()=>{window.scrollTo({top:0,behavior:"smooth"}),setTimeout(()=>{window.location.hash=""},500)},[]);return u.useEffect(()=>{const r=document.querySelector("h2")?.offsetTop??0;function o(){document.documentElement.dataset.scroll=String(window.scrollY>=r)}return document.addEventListener("scroll",o,{passive:!0}),()=>{document.removeEventListener("scroll",o)}},[]),e.jsx(C,{UNSAFE_className:"goto-top-button",variant:"accent",onPress:t,children:e.jsx(R,{children:e.jsx(S,{icon:So})})})}const qs=["Tab 1","Tab 2","Tab 3"];function Xs({isActive:t,title:r}){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:r}),e.jsx("span",{className:"lm_close_tab"})]})}function Ys(){return e.jsxs(x,{name:"golden-layout",children:[e.jsx("h2",{className:"ui-title",children:"Golden Layout"}),[!1,!0].map(t=>e.jsxs(ge.Fragment,{children:[e.jsx("h5",{children:t?"Minimized":"Maximised"}),e.jsx("div",{style:{position:"relative",border:"none"},className:t?"lm_maximised":void 0,children:e.jsxs("div",{className:"lm_header",children:[e.jsx("ul",{className:"lm_tabs",children:qs.map((r,o)=>e.jsx(Xs,{isActive:o===0,title:r},r))}),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 Zs(){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(zo,{})})]})}const Ir=[["primary","accent"],["secondary","primary"],["danger","negative"]];function Js(){const[t,r]=u.useState(!1);return e.jsxs(x,{name:Wr,className:Fs,children:[e.jsx("h2",{className:"ui-title","data-no-menu":!0,children:"Bootstrap / Spectrum Comparison"}),e.jsxs(y,{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"}),Ir.map(([o,s])=>e.jsxs(u.Fragment,{children:[e.jsx(v,{onClick:Q,kind:o,icon:nr,children:"Button"}),e.jsxs(C,{variant:s,style:"fill",children:[e.jsx(R,{children:e.jsx(S,{icon:nr})}),e.jsx(b,{children:"Button"})]})]},o)),e.jsx(v,{onClick:Q,kind:"primary",disabled:!0,children:"Disabled"}),e.jsx(C,{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"}),Ir.map(([o,s])=>e.jsxs(u.Fragment,{children:[e.jsx(v,{onClick:Q,kind:o,children:o}),e.jsx(C,{variant:s,style:"outline",children:s})]},o)),e.jsx(v,{onClick:Q,kind:"secondary",disabled:!0,children:"Disabled"}),e.jsx(C,{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(o=>e.jsxs(u.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"input-label",children:"Select"}),e.jsxs(ye,{disabled:o,placeholder:"Select",onChange:s=>{},className:"custom-select",children:[e.jsxs("option",{disabled:!0,value:"0",children:[o?"":"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(xo,{isDisabled:o,label:o?"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(o)))]})]}),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(Ue,{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(Ue,{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:()=>r(o=>!o),children:"Checkbox"}),e.jsx(G,{children:"Checkbox"}),e.jsx(L,{className:"form-group",disabled:!0,checked:t,onChange:()=>r(o=>!o),children:"Disabled"}),e.jsx(G,{isDisabled:!0,children:"Disabled"})]})]})]})]})}const Qs=[...er(52)],fe=[...er(52,{icons:!0})],Kr=[...xe(0,51)],ea=[...xe(52,103)],ra=[...xe(104,155)],oa=[...xe(156,207)],ta=[...xe(208,259)],sa=["String 1","String 2","String 3","","Some really long text that should get truncated",444,999,!0,!1,...Kr.map((t,r)=>r%5>0?t:u.cloneElement(t,{...t.props,children:[e.jsx(he,{},`icon-${t.props.children}`),e.jsx(b,{children:t.props.children},`label-${t.props.children}`)]}))];function he(){return e.jsx(R,{children:e.jsx(S,{icon:ze})})}function aa(){const[t,r]=u.useState(200),[o,s]=u.useState(!0),[a,l]=u.useState(fe),n=u.useCallback(h=>l(h===""?fe:fe.filter(({item:c})=>c?.textValue?.includes(h))),[]),i=u.useCallback(async()=>ot({keyedItems:Qs,itemHeight:tt.medium,selectedKey:t,topOffset:st}),[t]),d=u.useCallback(h=>{r(h)},[]);return e.jsxs(x,{name:"pickers",children:[e.jsx("h2",{className:"ui-title",children:"Pickers"}),e.jsxs(y,{gap:14,direction:"column",children:[[xr,We].map(h=>{const c=m=>`${h===xr?"Picker":"ComboBox"} (${m})`;return e.jsxs(y,{direction:"row",gap:14,children:[e.jsx(h,{label:c("Single Child"),tooltip:{placement:"bottom-end"},children:e.jsx(p,{textValue:"Aaa",children:"Aaa"})}),e.jsx(h,{label:c("Mixed Children Types"),defaultSelectedKey:"999",tooltip:!0,children:sa}),e.jsxs(h,{label:c("Sections"),tooltip:!0,children:["String 1","String 2","String 3",e.jsxs(z,{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(he,{}),e.jsx(b,{children:"Complex Ccc"})]})]}),e.jsxs(z,{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(he,{}),e.jsx(b,{children:"Complex Fff"})]}),e.jsxs(p,{textValue:"Ggg",children:[e.jsx(he,{}),e.jsx(b,{children:"Label"}),e.jsx(b,{slot:"description",children:"Description"})]}),e.jsxs(p,{textValue:"Hhh",children:[e.jsx(he,{}),e.jsx(b,{children:"Label that causes overflow"}),e.jsx(b,{slot:"description",children:"Description that causes overflow"})]})]},"Key B"),e.jsx(z,{title:"Section A",children:Kr}),e.jsx(z,{title:"Section B",children:ea}),e.jsx(z,{children:ra},"Section C"),e.jsx(z,{children:oa},"Section D"),e.jsx(z,{title:"Section E",children:ta})]})]},h.displayName)}),e.jsx(L,{checked:o,onChange:h=>s(h.currentTarget.checked),children:"Show Ions"}),e.jsxs(y,{direction:"row",gap:14,children:[e.jsx(et,{label:"Picker (Controlled)",getInitialScrollPosition:i,normalizedItems:fe,selectedKey:t,showItemIcons:o,onChange:d}),e.jsx(Wo,{label:"ComboBox (Controlled)",getInitialScrollPosition:i,normalizedItems:a,selectedKey:t,showItemIcons:o,onChange:d,validationState:t==null?"invalid":"valid",errorMessage:"Please select an item.",onInputChange:n})]})]})]})}const la=[...er(52,{icons:!0})];function ie(){return e.jsx(R,{slot:"illustration",children:e.jsx(S,{icon:No})})}const qe={gap:10,label:{medium:21,large:25.5}};function ce({label:t,direction:r="column",children:o,...s}){return e.jsxs(y,{...s,direction:r,gap:qe.gap,children:[e.jsx(b,{children:t}),o]})}function na(){const{scale:t}=at(),[r,o]=u.useState([]),[s,a]=u.useState("compact"),l=qe.label[t]+qe.gap+2+lt[s??"compact"][t],n=u.useCallback(w=>{a(w)},[]),[i,d]=u.useState(!0),[h,c]=u.useState(""),[m,g]=u.useState(""),f=u.useCallback((w,B)=>{c(w),g(B)},[]),j=u.useCallback(w=>{o(w)},[]);return e.jsxs(x,{name:"list-views",children:[e.jsx("h2",{className:"ui-title",children:"List View"}),e.jsxs(P,{gap:14,height:"size-6000",columns:"1fr 1fr 1fr",rows:`auto minmax(${l}px, auto) 1fr auto 1fr`,children:[e.jsx(ce,{alignItems:"center",direction:"row",label:"Density",gridColumn:"span 3",children:e.jsxs(Ar,{"aria-label":"Density",orientation:"horizontal",value:s,onChange:n,children:[e.jsx(O,{value:"compact",children:"Compact"}),e.jsx(O,{value:"regular",children:"Regular"}),e.jsx(O,{value:"spacious",children:"Spacious"})]})}),e.jsx(ce,{label:"Single Child",gridColumn:"span 3",height:"100%",children:e.jsx(Ee,{density:s,"aria-label":"Single Child",selectionMode:"multiple",children:e.jsx(p,{textValue:"Aaa",children:"Aaa"})})}),e.jsx(ce,{label:"Icons",gridColumn:"span 2",children:e.jsxs(Ee,{"aria-label":"Icon",density:s,selectionMode:"multiple",children:[e.jsxs(p,{textValue:"Item with icon A",children:[e.jsx(ie,{}),e.jsx(b,{children:"Item with icon A"})]}),e.jsxs(p,{textValue:"Item with icon B",children:[e.jsx(ie,{}),e.jsx(b,{children:"Item with icon B"})]}),e.jsxs(p,{textValue:"Item with icon C",children:[e.jsx(ie,{}),e.jsx(b,{children:"Item with icon C"})]}),e.jsxs(p,{textValue:"Item with icon D",children:[e.jsx(ie,{}),e.jsx(b,{children:"Item with icon D with overflowing content"})]}),e.jsxs(p,{textValue:"Item with icon E",children:[e.jsx(ie,{}),e.jsx(b,{children:"Item with icon E"})]})]})}),e.jsx(ce,{label:"Mixed Children Types",children:e.jsxs(Ee,{"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(b,{children:"Item with Description"}),e.jsx(b,{slot:"description",children:"Description"})]}),e.jsxs(p,{textValue:"Complex Ccc",children:[e.jsx(R,{slot:"image",children:e.jsx(S,{icon:ze})}),e.jsx(b,{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(S,{icon:ze})}),e.jsx(b,{children:"Complex Ccc with text that should be truncated"}),e.jsx(b,{slot:"description",children:"Description"})]})]})}),e.jsx(y,{gridColumn:"span 3",gap:14,children:e.jsx(L,{checked:i,onChange:w=>d(w.currentTarget.checked),children:"Show Ions"})}),e.jsxs(ce,{label:"Controlled",gridColumn:"span 2",children:[e.jsx(Ko,{"aria-label":"Controlled",density:s,normalizedItems:la,selectionMode:"multiple",selectedKeys:r,showItemIcons:i,onChange:j,actions:e.jsxs(rt,{overflowMode:"collapse",buttonLabelBehavior:"collapse",maxWidth:80,onAction:f,children:[e.jsxs(p,{children:[e.jsx(R,{children:e.jsx(S,{icon:ko})}),e.jsx(b,{children:"Edit"})]},"Edit"),e.jsxs(p,{children:[e.jsx(R,{children:e.jsx(S,{icon:To})}),e.jsx(b,{children:"Delete"})]},"Delete")]})}),h," ",m]})]})]})}function ia(){const t={maxHeight:500,display:"flex",flexDirection:"column",maxWidth:400},r="This is a short error message",o=`Mid length error message
|
|
212
212
|
`.repeat(10),s=`Really long error message
|
|
213
213
|
`.repeat(100),a="MidError",l="SuperLongErrorMessageType";return e.jsxs(x,{name:"error-views",children:[e.jsx("h2",{className:"ui-title",title:"Display error messages easily",children:"Error Views"}),e.jsx("h3",{children:"Expandable"}),e.jsxs("div",{className:"row",style:{maxHeight:500},children:[e.jsx("div",{className:"col",style:t,children:e.jsx(ee,{message:r})}),e.jsx("div",{className:"col",style:t,children:e.jsx(ee,{message:o,type:a})}),e.jsx("div",{className:"col",style:t,children:e.jsx(ee,{message:s,type:l})})]}),e.jsx("h3",{children:"Always expanded"}),e.jsxs("div",{className:"row",style:{maxHeight:500},children:[e.jsx("div",{className:"col",style:t,children:e.jsx(ee,{message:r,isExpanded:!0})}),e.jsx("div",{className:"col",style:t,children:e.jsx(ee,{message:o,type:a,isExpanded:!0})}),e.jsx("div",{className:"col",style:t,children:e.jsx(ee,{message:s,type:l,isExpanded:!0})})]})]})}function ca(){return e.jsxs(x,{name:"checkbox-groups",children:[e.jsx("h2",{className:"ui-title",children:"Checkbox Groups"}),e.jsxs(y,{gap:"size-100",gridColumn:"span 3",height:"100%",children:[e.jsxs(y,{direction:"column",children:[e.jsx(b,{children:"Single Child"}),e.jsx(De,{"aria-label":"Single Child",children:e.jsx(G,{value:"Aaa",children:"Aaa"})})]}),e.jsxs(y,{direction:"column",children:[e.jsx(b,{children:"Multiple Children"}),e.jsxs(De,{"aria-label":"Multiple Children",children:[e.jsx(G,{value:"Aaa",children:"Aaa"}),e.jsx(G,{value:"Bbb",children:"Bbb"}),e.jsx(G,{value:"Ccc",children:"Ccc"})]})]}),e.jsxs(y,{direction:"column",children:[e.jsx(b,{children:"Mixed Children Types"}),e.jsxs(De,{"aria-label":"Mixed Children Types",children:["String 1","String 2",444,999,!0,!1,e.jsx(G,{children:"Aaa"})]})]})]})]})}const Er={position:"sticky",justifyContent:"end",zIndex:1,UNSAFE_style:{float:"right"}};function da(){const{themes:t}=Pr(),r=t.length>1,o=Vr()!=="";return e.jsx("div",{tabIndex:-1,role:"main",children:e.jsxs("div",{className:U("container","style-guide-container",o&&Pt),children:[e.jsx(y,{justifyContent:"space-between",alignItems:"center",marginTop:"2rem",marginBottom:"1rem",children:e.jsx("h1",{style:{paddingTop:"2rem"},children:"Deephaven UI Components"})}),e.jsxs(y,{...Er,UNSAFE_className:o?"hide-when-isolated":void 0,marginTop:-56,top:20,gap:10,alignItems:"end",children:[r?e.jsx(ct,{}):null,e.jsx(Ws,{})]}),e.jsx(y,{...Er,UNSAFE_className:o?"hide-when-isolated":void 0,top:"calc(100vh - 40px)",marginTop:-32,marginEnd:r?-234:0,children:e.jsx(Ks,{})}),e.jsx(vs,{}),e.jsx(ne,{"data-menu-category":"Colors"}),e.jsx(Wt,{}),e.jsx(_s,{}),e.jsx(ne,{"data-menu-category":"Layout"}),e.jsx(Ys,{}),e.jsx(ne,{"data-menu-category":"Components"}),e.jsx(me,{}),e.jsx(gs,{}),e.jsx(ds,{}),e.jsx(na,{}),e.jsx(aa,{}),e.jsx(us,{}),e.jsx(Ce,{}),e.jsx(xs,{}),e.jsx(ca,{}),e.jsx(qt,{}),e.jsx(ms,{}),e.jsx(Kt,{}),e.jsx(Xt,{}),e.jsx(Ss,{}),e.jsx(ps,{}),e.jsx(is,{}),e.jsx(Jt,{}),e.jsx(as,{}),e.jsx(Ft,{}),e.jsx(dt,{}),e.jsx(Zs,{}),e.jsx(ne,{"data-menu-category":"Spectrum Components"}),e.jsx(Vs,{}),e.jsx(ne,{"data-menu-category":"Spectrum Comparison"}),e.jsx(Js,{}),e.jsx(ia,{})]})})}function rr(t){const{workspace:r,setWorkspace:o}=t;return u.useEffect(()=>{ht.makeDefaultWorkspace({getLayouts:async()=>[],getLayout:async()=>({})}).then(o)},[o]),r!=null?e.jsx(da,{}):null}rr.propTypes={workspace:we.shape({}),setWorkspace:we.func.isRequired};rr.defaultProps={workspace:null};const ha=t=>({workspace:Po(t)}),ua=po(ha,{setWorkspace:Lo})(rr);function ka(){return nt.register(new URL("./download/serviceWorker.js",window.location.href)),_o.init({getWorker:()=>new Eo}),window["__react-beautiful-dnd-disable-dev-warnings"]=!0,e.jsx(qo,{children:e.jsx(vo,{store:Io,children:e.jsx(ua,{})})})}export{ka as StyleGuideRoot,ka as default};
|
|
214
|
-
//# sourceMappingURL=StyleGuideRoot-
|
|
214
|
+
//# sourceMappingURL=StyleGuideRoot-fb99f9e6.js.map
|