@deephaven/iris-grid 0.38.1-beta.5 → 0.38.1-beta.9
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/dist/IrisGrid.d.ts.map +1 -1
- package/dist/IrisGrid.js +13 -3
- package/dist/IrisGrid.js.map +1 -1
- package/dist/IrisGridModelFactory.d.ts.map +1 -1
- package/dist/IrisGridModelFactory.js +1 -1
- package/dist/IrisGridModelFactory.js.map +1 -1
- package/dist/IrisGridProxyModel.d.ts.map +1 -1
- package/dist/IrisGridProxyModel.js +1 -1
- package/dist/IrisGridProxyModel.js.map +1 -1
- package/dist/IrisGridTableModel.d.ts.map +1 -1
- package/dist/IrisGridTableModel.js +1 -1
- package/dist/IrisGridTableModel.js.map +1 -1
- package/dist/IrisGridTableModelTemplate.d.ts.map +1 -1
- package/dist/IrisGridTableModelTemplate.js +1 -1
- package/dist/IrisGridTableModelTemplate.js.map +1 -1
- package/dist/IrisGridTestUtils.d.ts.map +1 -1
- package/dist/IrisGridTestUtils.js +1 -1
- package/dist/IrisGridTestUtils.js.map +1 -1
- package/dist/format-context-menus/DecimalFormatContextMenu.d.ts +3 -1
- package/dist/format-context-menus/DecimalFormatContextMenu.d.ts.map +1 -1
- package/dist/format-context-menus/DecimalFormatContextMenu.js +3 -2
- package/dist/format-context-menus/DecimalFormatContextMenu.js.map +1 -1
- package/dist/format-context-menus/IntegerFormatContextMenu.d.ts +3 -1
- package/dist/format-context-menus/IntegerFormatContextMenu.d.ts.map +1 -1
- package/dist/format-context-menus/IntegerFormatContextMenu.js +3 -2
- package/dist/format-context-menus/IntegerFormatContextMenu.js.map +1 -1
- package/dist/mousehandlers/IrisGridContextMenuHandler.d.ts.map +1 -1
- package/dist/mousehandlers/IrisGridContextMenuHandler.js +8 -4
- package/dist/mousehandlers/IrisGridContextMenuHandler.js.map +1 -1
- package/package.json +16 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IrisGridTestUtils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AAiB,EACjB,IAAS,EACT,WAA+B,GAChC;;;;;KAAK,GAAG,KAAK;IASd,MAAM,CAAC,aAAa,CAClB,OAAO,WAAkC,EACzC,IAAI,SAAa,EACjB,IAAI,UAAK,GACR,SAAS;IAOZ,MAAM,CAAC,cAAc,CAAC,UAAU,GAAE,MAAM,EAAO,GAAG,UAAU;IAK5D,MAAM,CAAC,gBAAgB,CACrB,KAAK,QAAgC,GACpC,yBAAyB;IAK5B,MAAM,CAAC,SAAS,CACd,EAAE,EAAE,MAAM,EACV,KAAK,QAAgC,EACrC,SAAS,YAAoB,EAC7B,UAAU,GAAE,UAAU,GAAG,IAAW,GACnC,kBAAkB;CAGtB;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -104,7 +104,7 @@ class IrisGridTestUtils {
|
|
|
104
104
|
}
|
|
105
105
|
static makeModel(dh) {
|
|
106
106
|
var table = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IrisGridTestUtils.makeTable();
|
|
107
|
-
var formatter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : new Formatter();
|
|
107
|
+
var formatter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : new Formatter(dh);
|
|
108
108
|
var inputTable = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
109
109
|
return new IrisGridProxyModel(dh, table, formatter, inputTable);
|
|
110
110
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IrisGridTestUtils.js","names":["Formatter","IrisGridProxyModel","IrisGridTestUtils","valueForCell","rowIndex","columnIndex","formatValue","value","undefined","makeColumn","name","type","DEFAULT_TYPE","index","dh","Column","makeRollupTableConfig","RollupTableConfig","makeColumns","count","prefix","columns","i","push","makeUserColumnWidths","userColumnWidths","Map","set","toString","makeRow","row","Row","get","jest","fn","column","makeFilter","FilterCondition","makeSort","Sort","makeTable","size","sort","layoutHints","table","Table","copy","Promise","resolve","freeze","makeTreeTable","TreeTable","makeInputTable","keyColumns","InputTable","makeSubscription","TableViewportSubscription","makeModel","formatter","inputTable"],"sources":["../src/IrisGridTestUtils.ts"],"sourcesContent":["import { GridRangeIndex, ModelSizeMap } from '@deephaven/grid';\nimport type {\n Column,\n dh as DhType,\n FilterCondition,\n InputTable,\n LayoutHints,\n RollupConfig,\n Row,\n Sort,\n Table,\n TableViewportSubscription,\n TreeTable,\n} from '@deephaven/jsapi-types';\nimport { Formatter } from '@deephaven/jsapi-utils';\nimport IrisGridProxyModel from './IrisGridProxyModel';\n\nclass IrisGridTestUtils {\n static DEFAULT_TYPE = 'java.lang.String';\n\n static valueForCell(\n rowIndex: GridRangeIndex,\n columnIndex: GridRangeIndex,\n formatValue?: boolean\n ): string {\n let value = `${rowIndex},${columnIndex}`;\n if (formatValue !== undefined && formatValue) {\n value = `(${value})`;\n }\n return value;\n }\n\n static makeColumn(\n name?: string,\n type: string = IrisGridTestUtils.DEFAULT_TYPE,\n index = 0\n ): Column {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return new (dh as any).Column({ index, name, type });\n }\n\n static makeRollupTableConfig(): RollupConfig {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return new (dh as any).RollupTableConfig();\n }\n\n static makeColumns(count = 5, prefix = ''): Column[] {\n const columns = [];\n for (let i = 0; i < count; i += 1) {\n columns.push(\n this.makeColumn(`${prefix}${i}`, IrisGridTestUtils.DEFAULT_TYPE, i)\n );\n }\n return columns;\n }\n\n static makeUserColumnWidths(count = 5): ModelSizeMap {\n const userColumnWidths = new Map();\n for (let i = 0; i < count; i += 1) {\n userColumnWidths.set(i.toString(), 100);\n }\n return userColumnWidths;\n }\n\n static makeRow(i: number): Row {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const row = new (dh as any).Row({ index: i, name: `${i}` });\n\n row.get = jest.fn(column =>\n IrisGridTestUtils.valueForCell(i, column.index)\n );\n\n return row;\n }\n\n static makeFilter(): FilterCondition {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return new (dh as any).FilterCondition();\n }\n\n static makeSort(): Sort {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return new (dh as any).Sort();\n }\n\n static makeTable({\n columns = IrisGridTestUtils.makeColumns(),\n size = 1000000000,\n sort = [],\n layoutHints = {} as LayoutHints,\n } = {}): Table {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const table = new (dh as any).Table({ columns, size, sort });\n table.copy = jest.fn(() => Promise.resolve(table));\n table.freeze = jest.fn(() => Promise.resolve(table));\n table.layoutHints = layoutHints;\n return table;\n }\n\n static makeTreeTable(\n columns = IrisGridTestUtils.makeColumns(),\n size = 1000000000,\n sort = []\n ): TreeTable {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const table = new (dh as any).TreeTable({ columns, size, sort });\n table.copy = jest.fn(() => Promise.resolve(table));\n return table;\n }\n\n static makeInputTable(keyColumns: Column[] = []): InputTable {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return new (dh as any).InputTable(keyColumns);\n }\n\n static makeSubscription(\n table = IrisGridTestUtils.makeTable()\n ): TableViewportSubscription {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return new (dh as any).TableViewportSubscription({ table });\n }\n\n static makeModel(\n dh: DhType,\n table = IrisGridTestUtils.makeTable(),\n formatter = new Formatter(),\n inputTable: InputTable | null = null\n ): IrisGridProxyModel {\n return new IrisGridProxyModel(dh, table, formatter, inputTable);\n }\n}\n\nexport default IrisGridTestUtils;\n"],"mappings":";;;AAcA,SAASA,SAAS,QAAQ,wBAAwB;AAAC,OAC5CC,kBAAkB;AAEzB,MAAMC,iBAAiB,CAAC;EAGtB,OAAOC,YAAY,CACjBC,QAAwB,EACxBC,WAA2B,EAC3BC,WAAqB,EACb;IACR,IAAIC,KAAK,aAAMH,QAAQ,cAAIC,WAAW,CAAE;IACxC,IAAIC,WAAW,KAAKE,SAAS,IAAIF,WAAW,EAAE;MAC5CC,KAAK,cAAOA,KAAK,MAAG;IACtB;IACA,OAAOA,KAAK;EAC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KAAK,CAAC,CAAC;IAClD,OAAOA,KAAK;EACd;EAEA,OAAOQ,cAAc,GAAwC;IAAA,IAAvCC,UAAoB,uEAAG,EAAE;IAC7C;IACA,OAAO,IAAKvC,EAAE,CAASwC,UAAU,CAACD,UAAU,CAAC;EAC/C;EAEA,OAAOE,gBAAgB,GAEM;IAAA,IAD3BX,KAAK,uEAAG1C,iBAAiB,CAACsC,SAAS,EAAE;IAErC;IACA,OAAO,IAAK1B,EAAE,CAAS0C,yBAAyB,CAAC;MAAEZ;IAAM,CAAC,CAAC;EAC7D;EAEA,OAAOa,SAAS,CACd3C,EAAU,EAIU;IAAA,IAHpB8B,KAAK,uEAAG1C,iBAAiB,CAACsC,SAAS,EAAE;IAAA,IACrCkB,SAAS,uEAAG,IAAI1D,SAAS,EAAE;IAAA,
|
|
1
|
+
{"version":3,"file":"IrisGridTestUtils.js","names":["Formatter","IrisGridProxyModel","IrisGridTestUtils","valueForCell","rowIndex","columnIndex","formatValue","value","undefined","makeColumn","name","type","DEFAULT_TYPE","index","dh","Column","makeRollupTableConfig","RollupTableConfig","makeColumns","count","prefix","columns","i","push","makeUserColumnWidths","userColumnWidths","Map","set","toString","makeRow","row","Row","get","jest","fn","column","makeFilter","FilterCondition","makeSort","Sort","makeTable","size","sort","layoutHints","table","Table","copy","Promise","resolve","freeze","makeTreeTable","TreeTable","makeInputTable","keyColumns","InputTable","makeSubscription","TableViewportSubscription","makeModel","formatter","inputTable"],"sources":["../src/IrisGridTestUtils.ts"],"sourcesContent":["import { GridRangeIndex, ModelSizeMap } from '@deephaven/grid';\nimport type {\n Column,\n dh as DhType,\n FilterCondition,\n InputTable,\n LayoutHints,\n RollupConfig,\n Row,\n Sort,\n Table,\n TableViewportSubscription,\n TreeTable,\n} from '@deephaven/jsapi-types';\nimport { Formatter } from '@deephaven/jsapi-utils';\nimport IrisGridProxyModel from './IrisGridProxyModel';\n\nclass IrisGridTestUtils {\n static DEFAULT_TYPE = 'java.lang.String';\n\n static valueForCell(\n rowIndex: GridRangeIndex,\n columnIndex: GridRangeIndex,\n formatValue?: boolean\n ): string {\n let value = `${rowIndex},${columnIndex}`;\n if (formatValue !== undefined && formatValue) {\n value = `(${value})`;\n }\n return value;\n }\n\n static makeColumn(\n name?: string,\n type: string = IrisGridTestUtils.DEFAULT_TYPE,\n index = 0\n ): Column {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return new (dh as any).Column({ index, name, type });\n }\n\n static makeRollupTableConfig(): RollupConfig {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return new (dh as any).RollupTableConfig();\n }\n\n static makeColumns(count = 5, prefix = ''): Column[] {\n const columns = [];\n for (let i = 0; i < count; i += 1) {\n columns.push(\n this.makeColumn(`${prefix}${i}`, IrisGridTestUtils.DEFAULT_TYPE, i)\n );\n }\n return columns;\n }\n\n static makeUserColumnWidths(count = 5): ModelSizeMap {\n const userColumnWidths = new Map();\n for (let i = 0; i < count; i += 1) {\n userColumnWidths.set(i.toString(), 100);\n }\n return userColumnWidths;\n }\n\n static makeRow(i: number): Row {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const row = new (dh as any).Row({ index: i, name: `${i}` });\n\n row.get = jest.fn(column =>\n IrisGridTestUtils.valueForCell(i, column.index)\n );\n\n return row;\n }\n\n static makeFilter(): FilterCondition {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return new (dh as any).FilterCondition();\n }\n\n static makeSort(): Sort {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return new (dh as any).Sort();\n }\n\n static makeTable({\n columns = IrisGridTestUtils.makeColumns(),\n size = 1000000000,\n sort = [],\n layoutHints = {} as LayoutHints,\n } = {}): Table {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const table = new (dh as any).Table({ columns, size, sort });\n table.copy = jest.fn(() => Promise.resolve(table));\n table.freeze = jest.fn(() => Promise.resolve(table));\n table.layoutHints = layoutHints;\n return table;\n }\n\n static makeTreeTable(\n columns = IrisGridTestUtils.makeColumns(),\n size = 1000000000,\n sort = []\n ): TreeTable {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const table = new (dh as any).TreeTable({ columns, size, sort });\n table.copy = jest.fn(() => Promise.resolve(table));\n return table;\n }\n\n static makeInputTable(keyColumns: Column[] = []): InputTable {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return new (dh as any).InputTable(keyColumns);\n }\n\n static makeSubscription(\n table = IrisGridTestUtils.makeTable()\n ): TableViewportSubscription {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return new (dh as any).TableViewportSubscription({ table });\n }\n\n static makeModel(\n dh: DhType,\n table = IrisGridTestUtils.makeTable(),\n formatter = new Formatter(dh),\n inputTable: InputTable | null = null\n ): IrisGridProxyModel {\n return new IrisGridProxyModel(dh, table, formatter, inputTable);\n }\n}\n\nexport default IrisGridTestUtils;\n"],"mappings":";;;AAcA,SAASA,SAAS,QAAQ,wBAAwB;AAAC,OAC5CC,kBAAkB;AAEzB,MAAMC,iBAAiB,CAAC;EAGtB,OAAOC,YAAY,CACjBC,QAAwB,EACxBC,WAA2B,EAC3BC,WAAqB,EACb;IACR,IAAIC,KAAK,aAAMH,QAAQ,cAAIC,WAAW,CAAE;IACxC,IAAIC,WAAW,KAAKE,SAAS,IAAIF,WAAW,EAAE;MAC5CC,KAAK,cAAOA,KAAK,MAAG;IACtB;IACA,OAAOA,KAAK;EACd;EAEA,OAAOE,UAAU,CACfC,IAAa,EAGL;IAAA,IAFRC,IAAY,uEAAGT,iBAAiB,CAACU,YAAY;IAAA,IAC7CC,KAAK,uEAAG,CAAC;IAET;IACA,OAAO,IAAKC,EAAE,CAASC,MAAM,CAAC;MAAEF,KAAK;MAAEH,IAAI;MAAEC;IAAK,CAAC,CAAC;EACtD;EAEA,OAAOK,qBAAqB,GAAiB;IAC3C;IACA,OAAO,IAAKF,EAAE,CAASG,iBAAiB,EAAE;EAC5C;EAEA,OAAOC,WAAW,GAAmC;IAAA,IAAlCC,KAAK,uEAAG,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CACd3C,EAAU,EAIU;IAAA,IAHpB8B,KAAK,uEAAG1C,iBAAiB,CAACsC,SAAS,EAAE;IAAA,IACrCkB,SAAS,uEAAG,IAAI1D,SAAS,CAACc,EAAE,CAAC;IAAA,IAC7B6C,UAA6B,uEAAG,IAAI;IAEpC,OAAO,IAAI1D,kBAAkB,CAACa,EAAE,EAAE8B,KAAK,EAAEc,SAAS,EAAEC,UAAU,CAAC;EACjE;AACF;AAAC,gBAjHKzD,iBAAiB,kBACC,kBAAkB;AAkH1C,eAAeA,iBAAiB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DecimalColumnFormat } from '@deephaven/jsapi-utils';
|
|
2
|
+
import type { dh as DhType } from '@deephaven/jsapi-types';
|
|
2
3
|
import { FormatContextMenuOption } from './FormatContextMenuUtils';
|
|
3
4
|
declare class DecimalFormatContextMenu {
|
|
4
5
|
static defaultGroup: number;
|
|
@@ -7,11 +8,12 @@ declare class DecimalFormatContextMenu {
|
|
|
7
8
|
static customGroup: number;
|
|
8
9
|
/**
|
|
9
10
|
* Creates list of formatting options for Decimal context menu
|
|
11
|
+
* @param dh JSAPI instance
|
|
10
12
|
* @param selectedFormat Selected format object, null for no selected format
|
|
11
13
|
* @param onCustomFormatChange Callback to call when the custom format is changed
|
|
12
14
|
* @returns Array of formatting options for the context menu
|
|
13
15
|
*/
|
|
14
|
-
static getOptions(selectedFormat: DecimalColumnFormat, onCustomFormatChange: (value: DecimalColumnFormat | null) => void): FormatContextMenuOption[];
|
|
16
|
+
static getOptions(dh: DhType, selectedFormat: DecimalColumnFormat, onCustomFormatChange: (value: DecimalColumnFormat | null) => void): FormatContextMenuOption[];
|
|
15
17
|
}
|
|
16
18
|
export default DecimalFormatContextMenu;
|
|
17
19
|
//# sourceMappingURL=DecimalFormatContextMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DecimalFormatContextMenu.d.ts","sourceRoot":"","sources":["../../src/format-context-menus/DecimalFormatContextMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAEpB,MAAM,wBAAwB,CAAC;AAChC,OAA+B,EAC7B,uBAAuB,EACxB,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
|
|
1
|
+
{"version":3,"file":"DecimalFormatContextMenu.d.ts","sourceRoot":"","sources":["../../src/format-context-menus/DecimalFormatContextMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAEpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAA+B,EAC7B,uBAAuB,EACxB,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,MAAM,EACV,cAAc,EAAE,mBAAmB,EACnC,oBAAoB,EAAE,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI,KAAK,IAAI,GAChE,uBAAuB,EAAE;CA6E7B;AAED,eAAe,wBAAwB,CAAC"}
|
|
@@ -6,11 +6,12 @@ import FormatContextMenuUtils from "./FormatContextMenuUtils.js";
|
|
|
6
6
|
class DecimalFormatContextMenu {
|
|
7
7
|
/**
|
|
8
8
|
* Creates list of formatting options for Decimal context menu
|
|
9
|
+
* @param dh JSAPI instance
|
|
9
10
|
* @param selectedFormat Selected format object, null for no selected format
|
|
10
11
|
* @param onCustomFormatChange Callback to call when the custom format is changed
|
|
11
12
|
* @returns Array of formatting options for the context menu
|
|
12
13
|
*/
|
|
13
|
-
static getOptions(selectedFormat, onCustomFormatChange) {
|
|
14
|
+
static getOptions(dh, selectedFormat, onCustomFormatChange) {
|
|
14
15
|
var formatItems = [{
|
|
15
16
|
format: DecimalColumnFormatter.FORMAT_PERCENT,
|
|
16
17
|
group: DecimalFormatContextMenu.presetGroup
|
|
@@ -40,7 +41,7 @@ class DecimalFormatContextMenu {
|
|
|
40
41
|
var customFormatOption = FormatContextMenuUtils.makeCustomFormatOption(customFormat, DecimalFormatContextMenu.customGroup, DecimalColumnFormatter.DEFAULT_FORMAT_STRING, isCustomSelected, formatString => {
|
|
41
42
|
if (formatString != null) {
|
|
42
43
|
var newCustomFormat = DecimalColumnFormatter.makeCustomFormat(formatString);
|
|
43
|
-
if (DecimalColumnFormatter.isValid(newCustomFormat)) {
|
|
44
|
+
if (DecimalColumnFormatter.isValid(dh, newCustomFormat)) {
|
|
44
45
|
onCustomFormatChange(newCustomFormat);
|
|
45
46
|
}
|
|
46
47
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DecimalFormatContextMenu.js","names":["DecimalColumnFormatter","FormatContextMenuUtils","DecimalFormatContextMenu","getOptions","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"],"sources":["../../src/format-context-menus/DecimalFormatContextMenu.ts"],"sourcesContent":["import {\n DecimalColumnFormat,\n DecimalColumnFormatter,\n} from '@deephaven/jsapi-utils';\nimport FormatContextMenuUtils, {\n 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 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 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 = FormatContextMenuUtils.isCustomSelected(\n selectedFormat\n );\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 = DecimalColumnFormatter.makeCustomFormat(\n formatString\n );\n if (DecimalColumnFormatter.isValid(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,
|
|
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"],"sources":["../../src/format-context-menus/DecimalFormatContextMenu.ts"],"sourcesContent":["import {\n DecimalColumnFormat,\n DecimalColumnFormatter,\n} from '@deephaven/jsapi-utils';\nimport type { dh as DhType } from '@deephaven/jsapi-types';\nimport FormatContextMenuUtils, {\n 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: 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 = FormatContextMenuUtils.isCustomSelected(\n selectedFormat\n );\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 = DecimalColumnFormatter.makeCustomFormat(\n formatString\n );\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,UAAU,CACfC,EAAU,EACVC,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,GAAGlB,sBAAsB,CAACmB,UAAU,CAC3D,SAAS,EACT,IAAI,EACJlB,wBAAwB,CAACmB,YAAY,EACrCpB,sBAAsB,CAACqB,iBAAiB,CAACjB,cAAc,CAAC,CACzD;IAED,IAAMkB,mBAAmB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} from '@deephaven/jsapi-types';
|
|
2
3
|
import { FormatContextMenuOption } from './FormatContextMenuUtils';
|
|
3
4
|
declare class IntegerFormatContextMenu {
|
|
4
5
|
static defaultGroup: number;
|
|
@@ -6,11 +7,12 @@ declare class IntegerFormatContextMenu {
|
|
|
6
7
|
static customGroup: number;
|
|
7
8
|
/**
|
|
8
9
|
* Creates list of formatting options for Integer context menu
|
|
10
|
+
* @param dh JSAPI instance
|
|
9
11
|
* @param selectedFormat Selected format object, null for no selected format
|
|
10
12
|
* @param onCustomFormatChange Callback to call when the custom format is changed
|
|
11
13
|
* @returns Array of formatting options for the context menu
|
|
12
14
|
*/
|
|
13
|
-
static getOptions(selectedFormat: IntegerColumnFormat, onCustomFormatChange: (value: IntegerColumnFormat | null) => void): FormatContextMenuOption[];
|
|
15
|
+
static getOptions(dh: DhType, selectedFormat: IntegerColumnFormat, onCustomFormatChange: (value: IntegerColumnFormat | null) => void): FormatContextMenuOption[];
|
|
14
16
|
}
|
|
15
17
|
export default IntegerFormatContextMenu;
|
|
16
18
|
//# sourceMappingURL=IntegerFormatContextMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntegerFormatContextMenu.d.ts","sourceRoot":"","sources":["../../src/format-context-menus/IntegerFormatContextMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAEpB,MAAM,wBAAwB,CAAC;AAChC,OAA+B,EAC7B,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAElC,cAAM,wBAAwB;IAC5B,MAAM,CAAC,YAAY,SAAM;IAEzB,MAAM,CAAC,WAAW,SAAM;IAExB,MAAM,CAAC,WAAW,SAAM;IAExB
|
|
1
|
+
{"version":3,"file":"IntegerFormatContextMenu.d.ts","sourceRoot":"","sources":["../../src/format-context-menus/IntegerFormatContextMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAEpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAA+B,EAC7B,uBAAuB,EACxB,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,MAAM,EACV,cAAc,EAAE,mBAAmB,EACnC,oBAAoB,EAAE,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI,KAAK,IAAI,GAChE,uBAAuB,EAAE;CAyD7B;AAED,eAAe,wBAAwB,CAAC"}
|
|
@@ -6,11 +6,12 @@ import FormatContextMenuUtils from "./FormatContextMenuUtils.js";
|
|
|
6
6
|
class IntegerFormatContextMenu {
|
|
7
7
|
/**
|
|
8
8
|
* Creates list of formatting options for Integer context menu
|
|
9
|
+
* @param dh JSAPI instance
|
|
9
10
|
* @param selectedFormat Selected format object, null for no selected format
|
|
10
11
|
* @param onCustomFormatChange Callback to call when the custom format is changed
|
|
11
12
|
* @returns Array of formatting options for the context menu
|
|
12
13
|
*/
|
|
13
|
-
static getOptions(selectedFormat, onCustomFormatChange) {
|
|
14
|
+
static getOptions(dh, selectedFormat, onCustomFormatChange) {
|
|
14
15
|
var formatItems = [{
|
|
15
16
|
format: IntegerColumnFormatter.FORMAT_MILLIONS,
|
|
16
17
|
group: IntegerFormatContextMenu.presetGroup
|
|
@@ -25,7 +26,7 @@ class IntegerFormatContextMenu {
|
|
|
25
26
|
var customFormatOption = FormatContextMenuUtils.makeCustomFormatOption(customFormat, IntegerFormatContextMenu.customGroup, IntegerColumnFormatter.DEFAULT_FORMAT_STRING, isCustomSelected, formatString => {
|
|
26
27
|
if (formatString != null) {
|
|
27
28
|
var newCustomFormat = IntegerColumnFormatter.makeCustomFormat(formatString);
|
|
28
|
-
if (IntegerColumnFormatter.isValid(newCustomFormat)) {
|
|
29
|
+
if (IntegerColumnFormatter.isValid(dh, newCustomFormat)) {
|
|
29
30
|
onCustomFormatChange(newCustomFormat);
|
|
30
31
|
}
|
|
31
32
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntegerFormatContextMenu.js","names":["IntegerColumnFormatter","FormatContextMenuUtils","IntegerFormatContextMenu","getOptions","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"],"sources":["../../src/format-context-menus/IntegerFormatContextMenu.ts"],"sourcesContent":["import {\n IntegerColumnFormat,\n IntegerColumnFormatter,\n} from '@deephaven/jsapi-utils';\nimport FormatContextMenuUtils, {\n 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 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 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 = FormatContextMenuUtils.isCustomSelected(\n selectedFormat\n );\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 = IntegerColumnFormatter.makeCustomFormat(\n formatString\n );\n if (IntegerColumnFormatter.isValid(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,
|
|
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"],"sources":["../../src/format-context-menus/IntegerFormatContextMenu.ts"],"sourcesContent":["import {\n IntegerColumnFormat,\n IntegerColumnFormatter,\n} from '@deephaven/jsapi-utils';\nimport type { dh as DhType } from '@deephaven/jsapi-types';\nimport FormatContextMenuUtils, {\n 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: 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 = FormatContextMenuUtils.isCustomSelected(\n selectedFormat\n );\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 = IntegerColumnFormatter.makeCustomFormat(\n formatString\n );\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;A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B,eAAe,CAAC;QACvC;MACF,CAAC,MAAM;QACLxB,oBAAoB,CAAC,IAAI,CAAC;MAC5B;IACF,CAAC,CACF;IAED,OAAO,CAACO,mBAAmB,EAAE,GAAGI,mBAAmB,EAAEQ,kBAAkB,CAAC;EAC1E;AACF;AAAC,gBA3EKvB,wBAAwB,kBACN,EAAE;AAAA,gBADpBA,wBAAwB,iBAGP,EAAE;AAAA,gBAHnBA,wBAAwB,iBAKP,EAAE;AAwEzB,eAAeA,wBAAwB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IrisGridContextMenuHandler.d.ts","sourceRoot":"","sources":["../../src/mousehandlers/IrisGridContextMenuHandler.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,EACL,aAAa,EAId,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,kBAAkB,EAClB,IAAI,EACJ,gBAAgB,EAChB,SAAS,EAIT,UAAU,EACX,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EACV,MAAM,EACN,EAAE,IAAI,MAAM,EACZ,eAAe,EACf,WAAW,EACX,IAAI,EACL,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAIL,iBAAiB,EAEjB,aAAa,EACd,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAO5C,OAAO,mCAAmC,CAAC;AAE3C,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAO7C;;GAEG;AACH,cAAM,0BAA2B,SAAQ,gBAAgB;IACvD,MAAM,CAAC,UAAU,SAAmC;IAEpD,MAAM,CAAC,kBAAkB,SAAmC;IAE5D,MAAM,CAAC,YAAY,SAAmC;IAEtD,MAAM,CAAC,qBAAqB,SAAmC;IAE/D,MAAM,CAAC,UAAU,SAAmC;IAEpD,MAAM,CAAC,UAAU,SAAmC;IA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AM,EACd,WAAW,CAAC,EAAE,WAAW,EACzB,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAC5B,aAAa,EAAE;IAsElB,aAAa,CACX,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,UAAU,EACvB,UAAU,EAAE,IAAI,GAAG,IAAI,GACtB,aAAa,EAAE;IA+FlB,qBAAqB,CACnB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,UAAU,GACtB,aAAa,EAAE;IA4ElB,eAAe,CACb,UAAU,CAAC,EAAE,IAAI,GAAG,IAAI,EACxB,SAAS,GAAE,aAAoB,EAC/B,KAAK,UAAQ,GACZ,OAAO;CAMX;AAED,eAAe,0BAA0B,CAAC"}
|
|
@@ -251,6 +251,7 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
251
251
|
getCellActions(modelColumn, grid, gridPoint) {
|
|
252
252
|
assertNotNull(modelColumn);
|
|
253
253
|
var {
|
|
254
|
+
dh,
|
|
254
255
|
irisGrid
|
|
255
256
|
} = this;
|
|
256
257
|
var {
|
|
@@ -280,13 +281,13 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
280
281
|
var {
|
|
281
282
|
settings
|
|
282
283
|
} = irisGrid.props;
|
|
283
|
-
var dateFilterFormatter = new DateTimeColumnFormatter({
|
|
284
|
+
var dateFilterFormatter = new DateTimeColumnFormatter(dh, {
|
|
284
285
|
timeZone: settings === null || settings === void 0 ? void 0 : settings.timeZone,
|
|
285
286
|
showTimeZone: false,
|
|
286
287
|
showTSeparator: true,
|
|
287
288
|
defaultDateTimeFormatString: CONTEXT_MENU_DATE_FORMAT
|
|
288
289
|
});
|
|
289
|
-
var previewFilterFormatter = new DateTimeColumnFormatter({
|
|
290
|
+
var previewFilterFormatter = new DateTimeColumnFormatter(dh, {
|
|
290
291
|
timeZone: settings === null || settings === void 0 ? void 0 : settings.timeZone,
|
|
291
292
|
showTimeZone: settings === null || settings === void 0 ? void 0 : settings.showTimeZone,
|
|
292
293
|
showTSeparator: settings === null || settings === void 0 ? void 0 : settings.showTSeparator,
|
|
@@ -631,16 +632,19 @@ class IrisGridContextMenuHandler extends GridMouseHandler {
|
|
|
631
632
|
var {
|
|
632
633
|
formatter
|
|
633
634
|
} = model;
|
|
635
|
+
var {
|
|
636
|
+
dh
|
|
637
|
+
} = this;
|
|
634
638
|
var selectedFormat = formatter.getColumnFormat(column.type, column.name);
|
|
635
639
|
var formatOptions;
|
|
636
640
|
var columnIndex = model.getColumnIndexByName(column.name);
|
|
637
641
|
if (TableUtils.isDecimalType(column.type)) {
|
|
638
|
-
formatOptions = DecimalFormatContextMenu.getOptions(selectedFormat, format => {
|
|
642
|
+
formatOptions = DecimalFormatContextMenu.getOptions(dh, selectedFormat, format => {
|
|
639
643
|
assertNotNull(columnIndex);
|
|
640
644
|
this.debouncedUpdateCustomFormat(columnIndex, format);
|
|
641
645
|
});
|
|
642
646
|
} else if (TableUtils.isIntegerType(column.type)) {
|
|
643
|
-
formatOptions = IntegerFormatContextMenu.getOptions(selectedFormat, format => {
|
|
647
|
+
formatOptions = IntegerFormatContextMenu.getOptions(dh, selectedFormat, format => {
|
|
644
648
|
assertNotNull(columnIndex);
|
|
645
649
|
this.debouncedUpdateCustomFormat(columnIndex, format);
|
|
646
650
|
});
|