@deephaven/iris-grid 0.96.2-alpha-jsapi-download.5 → 0.96.2-alpha-jsapi-nodejs.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"DecimalFormatContextMenu.d.ts","sourceRoot":"","sources":["../../src/format-context-menus/DecimalFormatContextMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAA+B,EAC7B,KAAK,uBAAuB,EAC7B,MAAM,0BAA0B,CAAC;AAElC,cAAM,wBAAwB;IAC5B,MAAM,CAAC,YAAY,SAAM;IAEzB,MAAM,CAAC,WAAW,SAAM;IAExB,MAAM,CAAC,gBAAgB,SAAM;IAE7B,MAAM,CAAC,WAAW,SAAM;IAExB;;;;;;OAMG;IACH,MAAM,CAAC,UAAU,CACf,EAAE,EAAE,OAAO,MAAM,EACjB,cAAc,EAAE,mBAAmB,EACnC,oBAAoB,EAAE,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI,KAAK,IAAI,GAChE,uBAAuB,EAAE;CA2E7B;AAED,eAAe,wBAAwB,CAAC"}
1
+ {"version":3,"file":"DecimalFormatContextMenu.d.ts","sourceRoot":"","sources":["../../src/format-context-menus/DecimalFormatContextMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAA+B,EAC7B,KAAK,uBAAuB,EAC7B,MAAM,0BAA0B,CAAC;AAElC,cAAM,wBAAwB;IAC5B,MAAM,CAAC,YAAY,SAAM;IAEzB,MAAM,CAAC,WAAW,SAAM;IAExB,MAAM,CAAC,gBAAgB,SAAM;IAE7B,MAAM,CAAC,WAAW,SAAM;IAExB;;;;;;OAMG;IACH,MAAM,CAAC,UAAU,CACf,EAAE,EAAE,OAAO,MAAM,EACjB,cAAc,EAAE,mBAAmB,EACnC,oBAAoB,EAAE,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI,KAAK,IAAI,GAChE,uBAAuB,EAAE;CA+E7B;AAED,eAAe,wBAAwB,CAAC"}
@@ -18,6 +18,9 @@ class DecimalFormatContextMenu {
18
18
  }, {
19
19
  format: DecimalColumnFormatter.FORMAT_BASIS_POINTS,
20
20
  group: DecimalFormatContextMenu.presetGroup
21
+ }, {
22
+ format: DecimalColumnFormatter.FORMAT_THOUSANDS,
23
+ group: DecimalFormatContextMenu.presetGroup
21
24
  }, {
22
25
  format: DecimalColumnFormatter.FORMAT_MILLIONS,
23
26
  group: DecimalFormatContextMenu.presetGroup
@@ -1 +1 @@
1
- {"version":3,"file":"DecimalFormatContextMenu.js","names":["DecimalColumnFormatter","FormatContextMenuUtils","DecimalFormatContextMenu","getOptions","dh","selectedFormat","onCustomFormatChange","formatItems","format","FORMAT_PERCENT","group","presetGroup","FORMAT_BASIS_POINTS","FORMAT_MILLIONS","FORMAT_SCIENTIFIC_NOTATION","FORMAT_ROUND","presetRoundGroup","FORMAT_ROUND_TWO_DECIMALS","FORMAT_ROUND_FOUR_DECIMALS","defaultFormatOption","makeOption","defaultGroup","isDefaultSelected","presetFormatOptions","map","item","label","isSameFormat","isCustomSelected","customFormat","makeCustomFormat","customFormatOption","makeCustomFormatOption","customGroup","DEFAULT_FORMAT_STRING","formatString","newCustomFormat","isValid","_defineProperty"],"sources":["../../src/format-context-menus/DecimalFormatContextMenu.ts"],"sourcesContent":["import {\n type DecimalColumnFormat,\n DecimalColumnFormatter,\n} from '@deephaven/jsapi-utils';\nimport type { dh as DhType } from '@deephaven/jsapi-types';\nimport FormatContextMenuUtils, {\n type FormatContextMenuOption,\n} from './FormatContextMenuUtils';\n\nclass DecimalFormatContextMenu {\n static defaultGroup = 10;\n\n static presetGroup = 20;\n\n static presetRoundGroup = 30;\n\n static customGroup = 40;\n\n /**\n * Creates list of formatting options for Decimal context menu\n * @param dh JSAPI instance\n * @param selectedFormat Selected format object, null for no selected format\n * @param onCustomFormatChange Callback to call when the custom format is changed\n * @returns Array of formatting options for the context menu\n */\n static getOptions(\n dh: typeof DhType,\n selectedFormat: DecimalColumnFormat,\n onCustomFormatChange: (value: DecimalColumnFormat | null) => void\n ): FormatContextMenuOption[] {\n const formatItems = [\n {\n format: DecimalColumnFormatter.FORMAT_PERCENT,\n group: DecimalFormatContextMenu.presetGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_BASIS_POINTS,\n group: DecimalFormatContextMenu.presetGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_MILLIONS,\n group: DecimalFormatContextMenu.presetGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_SCIENTIFIC_NOTATION,\n group: DecimalFormatContextMenu.presetGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_ROUND,\n group: DecimalFormatContextMenu.presetRoundGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_ROUND_TWO_DECIMALS,\n group: DecimalFormatContextMenu.presetRoundGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_ROUND_FOUR_DECIMALS,\n group: DecimalFormatContextMenu.presetRoundGroup,\n },\n ];\n\n const defaultFormatOption = FormatContextMenuUtils.makeOption(\n 'Default',\n null,\n DecimalFormatContextMenu.defaultGroup,\n FormatContextMenuUtils.isDefaultSelected(selectedFormat)\n );\n\n const presetFormatOptions = formatItems.map(item =>\n FormatContextMenuUtils.makeOption(\n item.format.label,\n item.format,\n item.group,\n DecimalColumnFormatter.isSameFormat(item.format, selectedFormat)\n )\n );\n\n const isCustomSelected =\n FormatContextMenuUtils.isCustomSelected(selectedFormat);\n\n const customFormat = isCustomSelected\n ? selectedFormat\n : DecimalColumnFormatter.makeCustomFormat();\n\n const customFormatOption = FormatContextMenuUtils.makeCustomFormatOption(\n customFormat,\n DecimalFormatContextMenu.customGroup,\n DecimalColumnFormatter.DEFAULT_FORMAT_STRING,\n isCustomSelected,\n formatString => {\n if (formatString != null) {\n const newCustomFormat =\n DecimalColumnFormatter.makeCustomFormat(formatString);\n if (DecimalColumnFormatter.isValid(dh, newCustomFormat)) {\n onCustomFormatChange(newCustomFormat);\n }\n } else {\n onCustomFormatChange(null);\n }\n }\n );\n\n return [defaultFormatOption, ...presetFormatOptions, customFormatOption];\n }\n}\n\nexport default DecimalFormatContextMenu;\n"],"mappings":";;;AAAA,SAEEA,sBAAsB,QACjB,wBAAwB;AAAC,OAEzBC,sBAAsB;AAI7B,MAAMC,wBAAwB,CAAC;EAS7B;AACF;AACA;AACA;AACA;AACA;AACA;EACE,OAAOC,UAAUA,CACfC,EAAiB,EACjBC,cAAmC,EACnCC,oBAAiE,EACtC;IAC3B,IAAMC,WAAW,GAAG,CAClB;MACEC,MAAM,EAAER,sBAAsB,CAACS,cAAc;MAC7CC,KAAK,EAAER,wBAAwB,CAACS;IAClC,CAAC,EACD;MACEH,MAAM,EAAER,sBAAsB,CAACY,mBAAmB;MAClDF,KAAK,EAAER,wBAAwB,CAACS;IAClC,CAAC,EACD;MACEH,MAAM,EAAER,sBAAsB,CAACa,eAAe;MAC9CH,KAAK,EAAER,wBAAwB,CAACS;IAClC,CAAC,EACD;MACEH,MAAM,EAAER,sBAAsB,CAACc,0BAA0B;MACzDJ,KAAK,EAAER,wBAAwB,CAACS;IAClC,CAAC,EACD;MACEH,MAAM,EAAER,sBAAsB,CAACe,YAAY;MAC3CL,KAAK,EAAER,wBAAwB,CAACc;IAClC,CAAC,EACD;MACER,MAAM,EAAER,sBAAsB,CAACiB,yBAAyB;MACxDP,KAAK,EAAER,wBAAwB,CAACc;IAClC,CAAC,EACD;MACER,MAAM,EAAER,sBAAsB,CAACkB,0BAA0B;MACzDR,KAAK,EAAER,wBAAwB,CAACc;IAClC,CAAC,CACF;IAED,IAAMG,mBAAmB,G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HnBpC,wBAAwB,sBAKF,EAAE;AAAAoC,eAAA,CALxBpC,wBAAwB,iBAOP,EAAE;AA0FzB,eAAeA,wBAAwB"}
1
+ {"version":3,"file":"DecimalFormatContextMenu.js","names":["DecimalColumnFormatter","FormatContextMenuUtils","DecimalFormatContextMenu","getOptions","dh","selectedFormat","onCustomFormatChange","formatItems","format","FORMAT_PERCENT","group","presetGroup","FORMAT_BASIS_POINTS","FORMAT_THOUSANDS","FORMAT_MILLIONS","FORMAT_SCIENTIFIC_NOTATION","FORMAT_ROUND","presetRoundGroup","FORMAT_ROUND_TWO_DECIMALS","FORMAT_ROUND_FOUR_DECIMALS","defaultFormatOption","makeOption","defaultGroup","isDefaultSelected","presetFormatOptions","map","item","label","isSameFormat","isCustomSelected","customFormat","makeCustomFormat","customFormatOption","makeCustomFormatOption","customGroup","DEFAULT_FORMAT_STRING","formatString","newCustomFormat","isValid","_defineProperty"],"sources":["../../src/format-context-menus/DecimalFormatContextMenu.ts"],"sourcesContent":["import {\n type DecimalColumnFormat,\n DecimalColumnFormatter,\n} from '@deephaven/jsapi-utils';\nimport type { dh as DhType } from '@deephaven/jsapi-types';\nimport FormatContextMenuUtils, {\n type FormatContextMenuOption,\n} from './FormatContextMenuUtils';\n\nclass DecimalFormatContextMenu {\n static defaultGroup = 10;\n\n static presetGroup = 20;\n\n static presetRoundGroup = 30;\n\n static customGroup = 40;\n\n /**\n * Creates list of formatting options for Decimal context menu\n * @param dh JSAPI instance\n * @param selectedFormat Selected format object, null for no selected format\n * @param onCustomFormatChange Callback to call when the custom format is changed\n * @returns Array of formatting options for the context menu\n */\n static getOptions(\n dh: typeof DhType,\n selectedFormat: DecimalColumnFormat,\n onCustomFormatChange: (value: DecimalColumnFormat | null) => void\n ): FormatContextMenuOption[] {\n const formatItems = [\n {\n format: DecimalColumnFormatter.FORMAT_PERCENT,\n group: DecimalFormatContextMenu.presetGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_BASIS_POINTS,\n group: DecimalFormatContextMenu.presetGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_THOUSANDS,\n group: DecimalFormatContextMenu.presetGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_MILLIONS,\n group: DecimalFormatContextMenu.presetGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_SCIENTIFIC_NOTATION,\n group: DecimalFormatContextMenu.presetGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_ROUND,\n group: DecimalFormatContextMenu.presetRoundGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_ROUND_TWO_DECIMALS,\n group: DecimalFormatContextMenu.presetRoundGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_ROUND_FOUR_DECIMALS,\n group: DecimalFormatContextMenu.presetRoundGroup,\n },\n ];\n\n const defaultFormatOption = FormatContextMenuUtils.makeOption(\n 'Default',\n null,\n DecimalFormatContextMenu.defaultGroup,\n FormatContextMenuUtils.isDefaultSelected(selectedFormat)\n );\n\n const presetFormatOptions = formatItems.map(item =>\n FormatContextMenuUtils.makeOption(\n item.format.label,\n item.format,\n item.group,\n DecimalColumnFormatter.isSameFormat(item.format, selectedFormat)\n )\n );\n\n const isCustomSelected =\n FormatContextMenuUtils.isCustomSelected(selectedFormat);\n\n const customFormat = isCustomSelected\n ? selectedFormat\n : DecimalColumnFormatter.makeCustomFormat();\n\n const customFormatOption = FormatContextMenuUtils.makeCustomFormatOption(\n customFormat,\n DecimalFormatContextMenu.customGroup,\n DecimalColumnFormatter.DEFAULT_FORMAT_STRING,\n isCustomSelected,\n formatString => {\n if (formatString != null) {\n const newCustomFormat =\n DecimalColumnFormatter.makeCustomFormat(formatString);\n if (DecimalColumnFormatter.isValid(dh, newCustomFormat)) {\n onCustomFormatChange(newCustomFormat);\n }\n } else {\n onCustomFormatChange(null);\n }\n }\n );\n\n return [defaultFormatOption, ...presetFormatOptions, customFormatOption];\n }\n}\n\nexport default DecimalFormatContextMenu;\n"],"mappings":";;;AAAA,SAEEA,sBAA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,EACjBD,IAAI,CAAClB,MAAM,EACXkB,IAAI,CAAChB,KAAK,EACVV,sBAAsB,CAAC4B,YAAY,CAACF,IAAI,CAAClB,MAAM,EAAEH,cAAc,CACjE,CACF,CAAC;IAED,IAAMwB,gBAAgB,GACpB5B,sBAAsB,CAAC4B,gBAAgB,CAACxB,cAAc,CAAC;IAEzD,IAAMyB,YAAY,GAAGD,gBAAgB,GACjCxB,cAAc,GACdL,sBAAsB,CAAC+B,gBAAgB,CAAC,CAAC;IAE7C,IAAMC,kBAAkB,GAAG/B,sBAAsB,CAACgC,sBAAsB,CACtEH,YAAY,EACZ5B,wBAAwB,CAACgC,WAAW,EACpClC,sBAAsB,CAACmC,qBAAqB,EAC5CN,gBAAgB,EAChBO,YAAY,IAAI;MACd,IAAIA,YAAY,IAAI,IAAI,EAAE;QACxB,IAAMC,eAAe,GACnBrC,sBAAsB,CAAC+B,gBAAgB,CAACK,YAAY,CAAC;QACvD,IAAIpC,sBAAsB,CAACsC,OAAO,CAAClC,EAAE,EAAEiC,eAAe,CAAC,EAAE;UACvD/B,oBAAoB,CAAC+B,eAAe,CAAC;QACvC;MACF,CAAC,MAAM;QACL/B,oBAAoB,CAAC,IAAI,CAAC;MAC5B;IACF,CACF,CAAC;IAED,OAAO,CAACc,mBAAmB,EAAE,GAAGI,mBAAmB,EAAEQ,kBAAkB,CAAC;EAC1E;AACF;AAACO,eAAA,CAnGKrC,wBAAwB,kBACN,EAAE;AAAAqC,eAAA,CADpBrC,wBAAwB,iBAGP,EAAE;AAAAqC,eAAA,CAHnBrC,wBAAwB,sBAKF,EAAE;AAAAqC,eAAA,CALxBrC,wBAAwB,iBAOP,EAAE;AA8FzB,eAAeA,wBAAwB"}
@@ -1 +1 @@
1
- {"version":3,"file":"IntegerFormatContextMenu.d.ts","sourceRoot":"","sources":["../../src/format-context-menus/IntegerFormatContextMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAA+B,EAC7B,KAAK,uBAAuB,EAC7B,MAAM,0BAA0B,CAAC;AAElC,cAAM,wBAAwB;IAC5B,MAAM,CAAC,YAAY,SAAM;IAEzB,MAAM,CAAC,WAAW,SAAM;IAExB,MAAM,CAAC,WAAW,SAAM;IAExB;;;;;;OAMG;IACH,MAAM,CAAC,UAAU,CACf,EAAE,EAAE,OAAO,MAAM,EACjB,cAAc,EAAE,mBAAmB,EACnC,oBAAoB,EAAE,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI,KAAK,IAAI,GAChE,uBAAuB,EAAE;CAuD7B;AAED,eAAe,wBAAwB,CAAC"}
1
+ {"version":3,"file":"IntegerFormatContextMenu.d.ts","sourceRoot":"","sources":["../../src/format-context-menus/IntegerFormatContextMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAA+B,EAC7B,KAAK,uBAAuB,EAC7B,MAAM,0BAA0B,CAAC;AAElC,cAAM,wBAAwB;IAC5B,MAAM,CAAC,YAAY,SAAM;IAEzB,MAAM,CAAC,WAAW,SAAM;IAExB,MAAM,CAAC,WAAW,SAAM;IAExB;;;;;;OAMG;IACH,MAAM,CAAC,UAAU,CACf,EAAE,EAAE,OAAO,MAAM,EACjB,cAAc,EAAE,mBAAmB,EACnC,oBAAoB,EAAE,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI,KAAK,IAAI,GAChE,uBAAuB,EAAE;CA2D7B;AAED,eAAe,wBAAwB,CAAC"}
@@ -13,6 +13,9 @@ class IntegerFormatContextMenu {
13
13
  */
14
14
  static getOptions(dh, selectedFormat, onCustomFormatChange) {
15
15
  var formatItems = [{
16
+ format: IntegerColumnFormatter.FORMAT_THOUSANDS,
17
+ group: IntegerFormatContextMenu.presetGroup
18
+ }, {
16
19
  format: IntegerColumnFormatter.FORMAT_MILLIONS,
17
20
  group: IntegerFormatContextMenu.presetGroup
18
21
  }, {
@@ -1 +1 @@
1
- {"version":3,"file":"IntegerFormatContextMenu.js","names":["IntegerColumnFormatter","FormatContextMenuUtils","IntegerFormatContextMenu","getOptions","dh","selectedFormat","onCustomFormatChange","formatItems","format","FORMAT_MILLIONS","group","presetGroup","FORMAT_SCIENTIFIC_NOTATION","defaultFormatOption","makeOption","defaultGroup","isDefaultSelected","presetFormatOptions","map","item","label","isSameFormat","isCustomSelected","customFormat","makeCustomFormat","customFormatOption","makeCustomFormatOption","customGroup","DEFAULT_FORMAT_STRING","formatString","newCustomFormat","isValid","_defineProperty"],"sources":["../../src/format-context-menus/IntegerFormatContextMenu.ts"],"sourcesContent":["import {\n type IntegerColumnFormat,\n IntegerColumnFormatter,\n} from '@deephaven/jsapi-utils';\nimport type { dh as DhType } from '@deephaven/jsapi-types';\nimport FormatContextMenuUtils, {\n type FormatContextMenuOption,\n} from './FormatContextMenuUtils';\n\nclass IntegerFormatContextMenu {\n static defaultGroup = 10;\n\n static presetGroup = 20;\n\n static customGroup = 30;\n\n /**\n * Creates list of formatting options for Integer context menu\n * @param dh JSAPI instance\n * @param selectedFormat Selected format object, null for no selected format\n * @param onCustomFormatChange Callback to call when the custom format is changed\n * @returns Array of formatting options for the context menu\n */\n static getOptions(\n dh: typeof DhType,\n selectedFormat: IntegerColumnFormat,\n onCustomFormatChange: (value: IntegerColumnFormat | null) => void\n ): FormatContextMenuOption[] {\n const formatItems = [\n {\n format: IntegerColumnFormatter.FORMAT_MILLIONS,\n group: IntegerFormatContextMenu.presetGroup,\n },\n {\n format: IntegerColumnFormatter.FORMAT_SCIENTIFIC_NOTATION,\n group: IntegerFormatContextMenu.presetGroup,\n },\n ];\n\n const defaultFormatOption = FormatContextMenuUtils.makeOption(\n 'Default',\n null,\n IntegerFormatContextMenu.defaultGroup,\n FormatContextMenuUtils.isDefaultSelected(selectedFormat)\n );\n\n const presetFormatOptions = formatItems.map(item =>\n FormatContextMenuUtils.makeOption(\n item.format.label,\n item.format,\n item.group,\n IntegerColumnFormatter.isSameFormat(item.format, selectedFormat)\n )\n );\n\n const isCustomSelected =\n FormatContextMenuUtils.isCustomSelected(selectedFormat);\n\n const customFormat = isCustomSelected\n ? selectedFormat\n : IntegerColumnFormatter.makeCustomFormat();\n\n const customFormatOption = FormatContextMenuUtils.makeCustomFormatOption(\n customFormat,\n IntegerFormatContextMenu.customGroup,\n IntegerColumnFormatter.DEFAULT_FORMAT_STRING,\n isCustomSelected,\n formatString => {\n if (formatString != null) {\n const newCustomFormat =\n IntegerColumnFormatter.makeCustomFormat(formatString);\n if (IntegerColumnFormatter.isValid(dh, newCustomFormat)) {\n onCustomFormatChange(newCustomFormat);\n }\n } else {\n onCustomFormatChange(null);\n }\n }\n );\n\n return [defaultFormatOption, ...presetFormatOptions, customFormatOption];\n }\n}\n\nexport default IntegerFormatContextMenu;\n"],"mappings":";;;AAAA,SAEEA,sBAAsB,QACjB,wBAAwB;AAAC,OAEzBC,sBAAsB;AAI7B,MAAMC,wBAAwB,CAAC;EAO7B;AACF;AACA;AACA;AACA;AACA;AACA;EACE,OAAOC,UAAUA,CACfC,EAAiB,EACjBC,cAAmC,EACnCC,oBAAiE,EACtC;IAC3B,IAAMC,WAAW,GAAG,CAClB;MACEC,MAAM,EAAER,sBAAsB,CAACS,eAAe;MAC9CC,KAAK,EAAER,wBAAwB,CAACS;IAClC,CAAC,EACD;MACEH,MAAM,EAAER,sBAAsB,CAACY,0BAA0B;MACzDF,KAAK,EAAER,wBAAwB,CAACS;IAClC,CAAC,CACF;IAED,IAAME,mBAAmB,GAAGZ,sBAAsB,CAACa,UAAU,CAC3D,SAAS,EACT,IAAI,EACJZ,wBAAwB,CAACa,YAAY,EACrCd,sBAAsB,CAACe,iBAAiB,CAACX,cAAc,CACzD,CAAC;IAED,IAAMY,mBAAmB,GAAGV,WAAW,CAACW,GAAG,CAACC,IAAI,IAC9ClB,sBAAsB,CAACa,UAAU,CAC/BK,IAAI,CAACX,MAAM,CAACY,KAAK,EACjBD,IAAI,CAACX,MAAM,EACXW,IAAI,CAACT,KAAK,EACVV,sBAAsB,CAACqB,YAAY,CAACF,IAAI,CAACX,MAAM,EAAEH,cAAc,CACjE,CACF,CAAC;IAED,IAAMiB,gBAAgB,GACpBrB,sBAAsB,CAACqB,gBAAgB,CAACjB,cAAc,CAAC;IAEzD,IAAMkB,YAAY,GAAGD,gBAAgB,GACjCjB,cAAc,GACdL,sBAAsB,CAACwB,gBAAgB,CAAC,CAAC;IAE7C,IAAMC,kBAAkB,GAAGxB,sBAAsB,CAACyB,sBAAsB,CACtEH,YAAY,EACZrB,wBAAwB,CAACyB,WAAW,EACpC3B,sBAAsB,CAAC4B,qBAAqB,EAC5CN,gBAAgB,EAChBO,YAAY,IAAI;MACd,IAAIA,YAAY,IAAI,IAAI,EAAE;QACxB,IAAMC,eAAe,GACnB9B,sBAAsB,CAACwB,gBAAgB,CAACK,YAAY,CAAC;QACvD,IAAI7B,sBAAsB,CAAC+B,OAAO,CAAC3B,EAAE,EAAE0B,eAAe,CAAC,EAAE;UACvDxB,oBAAoB,CAACwB,eAAe,CAAC;QACvC;MACF,CAAC,MAAM;QACLxB,oBAAoB,CAAC,IAAI,CAAC;MAC5B;IACF,CACF,CAAC;IAED,OAAO,CAACO,mBAAmB,EAAE,GAAGI,mBAAmB,EAAEQ,kBAAkB,CAAC;EAC1E;AACF;AAACO,eAAA,CAzEK9B,wBAAwB,kBACN,EAAE;AAAA8B,eAAA,CADpB9B,wBAAwB,iBAGP,EAAE;AAAA8B,eAAA,CAHnB9B,wBAAwB,iBAKP,EAAE;AAsEzB,eAAeA,wBAAwB"}
1
+ {"version":3,"file":"IntegerFormatContextMenu.js","names":["IntegerColumnFormatter","FormatContextMenuUtils","IntegerFormatContextMenu","getOptions","dh","selectedFormat","onCustomFormatChange","formatItems","format","FORMAT_THOUSANDS","group","presetGroup","FORMAT_MILLIONS","FORMAT_SCIENTIFIC_NOTATION","defaultFormatOption","makeOption","defaultGroup","isDefaultSelected","presetFormatOptions","map","item","label","isSameFormat","isCustomSelected","customFormat","makeCustomFormat","customFormatOption","makeCustomFormatOption","customGroup","DEFAULT_FORMAT_STRING","formatString","newCustomFormat","isValid","_defineProperty"],"sources":["../../src/format-context-menus/IntegerFormatContextMenu.ts"],"sourcesContent":["import {\n type IntegerColumnFormat,\n IntegerColumnFormatter,\n} from '@deephaven/jsapi-utils';\nimport type { dh as DhType } from '@deephaven/jsapi-types';\nimport FormatContextMenuUtils, {\n type FormatContextMenuOption,\n} from './FormatContextMenuUtils';\n\nclass IntegerFormatContextMenu {\n static defaultGroup = 10;\n\n static presetGroup = 20;\n\n static customGroup = 30;\n\n /**\n * Creates list of formatting options for Integer context menu\n * @param dh JSAPI instance\n * @param selectedFormat Selected format object, null for no selected format\n * @param onCustomFormatChange Callback to call when the custom format is changed\n * @returns Array of formatting options for the context menu\n */\n static getOptions(\n dh: typeof DhType,\n selectedFormat: IntegerColumnFormat,\n onCustomFormatChange: (value: IntegerColumnFormat | null) => void\n ): FormatContextMenuOption[] {\n const formatItems = [\n {\n format: IntegerColumnFormatter.FORMAT_THOUSANDS,\n group: IntegerFormatContextMenu.presetGroup,\n },\n {\n format: IntegerColumnFormatter.FORMAT_MILLIONS,\n group: IntegerFormatContextMenu.presetGroup,\n },\n {\n format: IntegerColumnFormatter.FORMAT_SCIENTIFIC_NOTATION,\n group: IntegerFormatContextMenu.presetGroup,\n },\n ];\n\n const defaultFormatOption = FormatContextMenuUtils.makeOption(\n 'Default',\n null,\n IntegerFormatContextMenu.defaultGroup,\n FormatContextMenuUtils.isDefaultSelected(selectedFormat)\n );\n\n const presetFormatOptions = formatItems.map(item =>\n FormatContextMenuUtils.makeOption(\n item.format.label,\n item.format,\n item.group,\n IntegerColumnFormatter.isSameFormat(item.format, selectedFormat)\n )\n );\n\n const isCustomSelected =\n FormatContextMenuUtils.isCustomSelected(selectedFormat);\n\n const customFormat = isCustomSelected\n ? selectedFormat\n : IntegerColumnFormatter.makeCustomFormat();\n\n const customFormatOption = FormatContextMenuUtils.makeCustomFormatOption(\n customFormat,\n IntegerFormatContextMenu.customGroup,\n IntegerColumnFormatter.DEFAULT_FORMAT_STRING,\n isCustomSelected,\n formatString => {\n if (formatString != null) {\n const newCustomFormat =\n IntegerColumnFormatter.makeCustomFormat(formatString);\n if (IntegerColumnFormatter.isValid(dh, newCustomFormat)) {\n onCustomFormatChange(newCustomFormat);\n }\n } else {\n onCustomFormatChange(null);\n }\n }\n );\n\n return [defaultFormatOption, ...presetFormatOptions, customFormatOption];\n }\n}\n\nexport default IntegerFormatContextMenu;\n"],"mappings":";;;AAAA,SAEEA,sBAAsB,QACjB,wBAAwB;AAAC,OAEzBC,sBAAsB;AAI7B,MAAMC,wBAAwB,CAAC;EAO7B;AACF;AACA;AACA;AACA;AACA;AACA;EACE,OAAOC,UAAUA,CACfC,EAAiB,EACjBC,cAAmC,EACnCC,oBAAiE,EACtC;IAC3B,IAAMC,WAAW,GAAG,CAClB;MACEC,MAAM,EAAER,sBAAsB,CAACS,gBAAgB;MAC/CC,KAAK,EAAER,wBAAwB,CAACS;IAClC,CAAC,EACD;MACEH,MAAM,EAAER,sBAAsB,CAACY,eAAe;MAC9CF,KAAK,EAAER,wBAAwB,CAACS;IAClC,CAAC,EACD;MACEH,MAAM,EAAER,sBAAsB,CAACa,0BAA0B;MACzDH,KAAK,EAAER,wBAAwB,CAACS;IAClC,CAAC,CACF;IAED,IAAMG,mBAAmB,GAAGb,sBAAsB,CAACc,UAAU,CAC3D,SAAS,EACT,IAAI,EACJb,wBAAwB,CAACc,YAAY,EACrCf,sBAAsB,CAACgB,iBAAiB,CAACZ,cAAc,CACzD,CAAC;IAED,IAAMa,mBAAmB,GAAGX,WAAW,CAACY,GAAG,CAACC,IAAI,IAC9CnB,sBAAsB,CAACc,UAAU,CAC/BK,IAAI,CAACZ,MAAM,CAACa,KAAK,EACjBD,IAAI,CAACZ,MAAM,EACXY,IAAI,CAACV,KAAK,EACVV,sBAAsB,CAACsB,YAAY,CAACF,IAAI,CAACZ,MAAM,EAAEH,cAAc,CACjE,CACF,CAAC;IAED,IAAMkB,gBAAgB,GACpBtB,sBAAsB,CAACsB,gBAAgB,CAAClB,cAAc,CAAC;IAEzD,IAAMmB,YAAY,GAAGD,gBAAgB,GACjClB,cAAc,GACdL,sBAAsB,CAACyB,gBAAgB,CAAC,CAAC;IAE7C,IAAMC,kBAAkB,GAAGzB,sBAAsB,CAAC0B,sBAAsB,CACtEH,YAAY,EACZtB,wBAAwB,CAAC0B,WAAW,EACpC5B,sBAAsB,CAAC6B,qBAAqB,EAC5CN,gBAAgB,EAChBO,YAAY,IAAI;MACd,IAAIA,YAAY,IAAI,IAAI,EAAE;QACxB,IAAMC,eAAe,GACnB/B,sBAAsB,CAACyB,gBAAgB,CAACK,YAAY,CAAC;QACvD,IAAI9B,sBAAsB,CAACgC,OAAO,CAAC5B,EAAE,EAAE2B,eAAe,CAAC,EAAE;UACvDzB,oBAAoB,CAACyB,eAAe,CAAC;QACvC;MACF,CAAC,MAAM;QACLzB,oBAAoB,CAAC,IAAI,CAAC;MAC5B;IACF,CACF,CAAC;IAED,OAAO,CAACQ,mBAAmB,EAAE,GAAGI,mBAAmB,EAAEQ,kBAAkB,CAAC;EAC1E;AACF;AAACO,eAAA,CA7EK/B,wBAAwB,kBACN,EAAE;AAAA+B,eAAA,CADpB/B,wBAAwB,iBAGP,EAAE;AAAA+B,eAAA,CAHnB/B,wBAAwB,iBAKP,EAAE;AA0EzB,eAAeA,wBAAwB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/iris-grid",
3
- "version": "0.96.2-alpha-jsapi-download.5+ab95c08e",
3
+ "version": "0.96.2-alpha-jsapi-nodejs.7+66d09d1d",
4
4
  "description": "Deephaven Iris Grid",
5
5
  "author": "Deephaven Data Labs LLC",
6
6
  "license": "Apache-2.0",
@@ -31,18 +31,18 @@
31
31
  "build:sass": "sass --embed-sources --load-path=../../node_modules ./src:./dist"
32
32
  },
33
33
  "dependencies": {
34
- "@deephaven/components": "^0.96.2-alpha-jsapi-download.5+ab95c08e",
35
- "@deephaven/console": "^0.96.2-alpha-jsapi-download.5+ab95c08e",
36
- "@deephaven/filters": "^0.96.2-alpha-jsapi-download.5+ab95c08e",
37
- "@deephaven/grid": "^0.96.2-alpha-jsapi-download.5+ab95c08e",
38
- "@deephaven/icons": "^0.96.2-alpha-jsapi-download.5+ab95c08e",
39
- "@deephaven/jsapi-components": "^0.96.2-alpha-jsapi-download.5+ab95c08e",
34
+ "@deephaven/components": "^0.96.2-alpha-jsapi-nodejs.7+66d09d1d",
35
+ "@deephaven/console": "^0.96.2-alpha-jsapi-nodejs.7+66d09d1d",
36
+ "@deephaven/filters": "^0.96.2-alpha-jsapi-nodejs.7+66d09d1d",
37
+ "@deephaven/grid": "^0.96.2-alpha-jsapi-nodejs.7+66d09d1d",
38
+ "@deephaven/icons": "^0.96.2-alpha-jsapi-nodejs.7+66d09d1d",
39
+ "@deephaven/jsapi-components": "^0.96.2-alpha-jsapi-nodejs.7+66d09d1d",
40
40
  "@deephaven/jsapi-types": "^1.0.0-dev0.34.0",
41
- "@deephaven/jsapi-utils": "^0.96.2-alpha-jsapi-download.5+ab95c08e",
42
- "@deephaven/log": "^0.96.2-alpha-jsapi-download.5+ab95c08e",
43
- "@deephaven/react-hooks": "^0.96.2-alpha-jsapi-download.5+ab95c08e",
44
- "@deephaven/storage": "^0.96.2-alpha-jsapi-download.5+ab95c08e",
45
- "@deephaven/utils": "^0.96.2-alpha-jsapi-download.5+ab95c08e",
41
+ "@deephaven/jsapi-utils": "^0.96.2-alpha-jsapi-nodejs.7+66d09d1d",
42
+ "@deephaven/log": "^0.96.2-alpha-jsapi-nodejs.7+66d09d1d",
43
+ "@deephaven/react-hooks": "^0.96.2-alpha-jsapi-nodejs.7+66d09d1d",
44
+ "@deephaven/storage": "^0.96.2-alpha-jsapi-nodejs.7+66d09d1d",
45
+ "@deephaven/utils": "^0.96.2-alpha-jsapi-nodejs.7+66d09d1d",
46
46
  "@dnd-kit/core": "^6.1.0",
47
47
  "@dnd-kit/sortable": "^7.0.2",
48
48
  "@dnd-kit/utilities": "^3.2.2",
@@ -65,9 +65,9 @@
65
65
  "react-dom": ">=16.8.0"
66
66
  },
67
67
  "devDependencies": {
68
- "@deephaven/jsapi-shim": "^0.96.2-alpha-jsapi-download.5+ab95c08e",
69
- "@deephaven/mocks": "^0.96.2-alpha-jsapi-download.5+ab95c08e",
70
- "@deephaven/test-utils": "^0.96.2-alpha-jsapi-download.5+ab95c08e",
68
+ "@deephaven/jsapi-shim": "^0.96.2-alpha-jsapi-nodejs.7+66d09d1d",
69
+ "@deephaven/mocks": "^0.96.2-alpha-jsapi-nodejs.7+66d09d1d",
70
+ "@deephaven/test-utils": "^0.96.2-alpha-jsapi-nodejs.7+66d09d1d",
71
71
  "deep-equal": "2.2.3"
72
72
  },
73
73
  "files": [
@@ -80,5 +80,5 @@
80
80
  "publishConfig": {
81
81
  "access": "public"
82
82
  },
83
- "gitHead": "ab95c08e91a915bb7653a87477781ae21645f3a1"
83
+ "gitHead": "66d09d1da945a38b7df591106105e8483c4ac75d"
84
84
  }