@deephaven/iris-grid 0.83.1-beta.4 → 0.84.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/GotoRow.d.ts.map +1 -1
- package/dist/GotoRow.js +2 -4
- package/dist/GotoRow.js.map +1 -1
- package/dist/IrisGridProxyModel.d.ts +10 -116
- package/dist/IrisGridProxyModel.d.ts.map +1 -1
- package/dist/IrisGridProxyModel.js +42 -369
- package/dist/IrisGridProxyModel.js.map +1 -1
- package/dist/mousehandlers/IrisGridContextMenuHandler.d.ts +2 -2
- package/dist/mousehandlers/IrisGridContextMenuHandler.d.ts.map +1 -1
- package/dist/mousehandlers/IrisGridContextMenuHandler.js.map +1 -1
- package/package.json +15 -15
package/dist/GotoRow.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GotoRow.d.ts","sourceRoot":"","sources":["../src/GotoRow.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EACZ,WAAW,EASZ,MAAM,OAAO,CAAC;AAEf,OAAO,EAEL,SAAS,IAAI,eAAe,EAC7B,MAAM,oBAAoB,CAAC;AAI5B,OAAO,gBAAgB,CAAC;AAExB,OAAO,aAAa,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"GotoRow.d.ts","sourceRoot":"","sources":["../src/GotoRow.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EACZ,WAAW,EASZ,MAAM,OAAO,CAAC;AAEf,OAAO,EAEL,SAAS,IAAI,eAAe,EAC7B,MAAM,oBAAoB,CAAC;AAI5B,OAAO,gBAAgB,CAAC;AAExB,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C,UAAU,YAAY;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,KAAK,EAAE,aAAa,CAAC;IACrB,sBAAsB,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACvE,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IAErB,2BAA2B,EAAE,UAAU,CAAC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,eAAe,CAAC;IACjC,oCAAoC,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IACvE,gCAAgC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IACpE,kBAAkB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,iBAAiB,EAAE,CAAC,UAAU,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACnD;AAED,MAAM,MAAM,cAAc,GAAG;IAAE,KAAK,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC;AAEnD,QAAA,MAAM,OAAO,qFAmWZ,CAAC;AAGF,eAAe,OAAO,CAAC"}
|
package/dist/GotoRow.js
CHANGED
|
@@ -8,12 +8,10 @@ import classNames from 'classnames';
|
|
|
8
8
|
import "./GotoRow.css";
|
|
9
9
|
import { nanoid } from 'nanoid';
|
|
10
10
|
import IrisGridBottomBar from "./IrisGridBottomBar.js";
|
|
11
|
+
import { isIrisGridTableModelTemplate } from "./IrisGridTableModelTemplate.js";
|
|
11
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
14
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
|
-
function isIrisGridProxyModel(model) {
|
|
15
|
-
return model.model !== undefined;
|
|
16
|
-
}
|
|
17
15
|
var DEFAULT_FORMAT_STRING = '###,##0';
|
|
18
16
|
var GotoRow = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
19
17
|
var {
|
|
@@ -41,7 +39,7 @@ var GotoRow = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
41
39
|
var gotoValueInputRef = useRef(null);
|
|
42
40
|
var [isGotoRowActive, setIsGotoRowActive] = useState(false);
|
|
43
41
|
var columns = [];
|
|
44
|
-
if (
|
|
42
|
+
if (isIrisGridTableModelTemplate(model)) {
|
|
45
43
|
({
|
|
46
44
|
columns
|
|
47
45
|
} = model.table);
|
package/dist/GotoRow.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GotoRow.js","names":["FontAwesomeIcon","vsClose","vsArrowUp","vsArrowDown","React","forwardRef","useEffect","useImperativeHandle","useMemo","useRef","useState","Type","FilterType","Button","DateTimeInput","Select","TableUtils","classNames","nanoid","IrisGridBottomBar","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","isIrisGridProxyModel","model","undefined","DEFAULT_FORMAT_STRING","GotoRow","_ref","ref","gotoRow","gotoRowError","gotoValueError","onGotoRowSubmit","isShown","onEntering","onEntered","onExiting","onExited","onGotoRowNumberChanged","onClose","gotoValueSelectedColumnName","gotoValue","gotoValueFilter","onGotoValueSelectedColumnNameChanged","onGotoValueSelectedFilterChanged","onGotoValueChanged","onGotoValueSubmit","gotoRowInputRef","gotoValueInputRef","isGotoRowActive","setIsGotoRowActive","columns","table","dh","rowCount","gotoRowInputId","concat","handleGotoValueNumberKeyDown","e","key","stopPropagation","preventDefault","Number","POSITIVE_INFINITY","NEGATIVE_INFINITY","onGotoValueInputChanged","handleGotoValueKeySubmit","shiftKey","index","getColumnIndexByName","selectedColumn","columnType","type","normalizedType","getNormalizedType","value","focus","_gotoRowInputRef$curr","current","select","selectInput","document","activeElement","_gotoRowInputRef$curr2","_gotoValueInputRef$cu","renderValueInput","dataType","DECIMAL","INT","className","children","onKeyDown","placeholder","onChange","target","toLowerCase","test","DATETIME","defaultValue","onSubmit","STRING","eventTargetValue","eqIgnoreCase","containsIgnoreCase","eq","contains","BOOLEAN","onClick","onFocus","role","htmlFor","event","id","i18n","NumberFormat","format","kind","icon","style","marginRight","isSeekRowAvailable","columnName","map","column","name","tooltip","disabled","displayName"],"sources":["../src/GotoRow.tsx"],"sourcesContent":["import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { vsClose, vsArrowUp, vsArrowDown } from '@deephaven/icons';\nimport React, {\n ChangeEvent,\n KeyboardEvent,\n ReactElement,\n forwardRef,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport type { dh } from '@deephaven/jsapi-types';\nimport {\n Type as FilterType,\n TypeValue as FilterTypeValue,\n} from '@deephaven/filters';\nimport { Button, DateTimeInput, Select } from '@deephaven/components';\nimport { TableUtils } from '@deephaven/jsapi-utils';\nimport classNames from 'classnames';\nimport './GotoRow.scss';\nimport { nanoid } from 'nanoid';\nimport IrisGridModel from './IrisGridModel';\nimport IrisGridProxyModel from './IrisGridProxyModel';\nimport IrisGridBottomBar from './IrisGridBottomBar';\nimport { ColumnName } from './CommonTypes';\n\nfunction isIrisGridProxyModel(\n model: IrisGridModel\n): model is IrisGridProxyModel {\n return (model as IrisGridProxyModel).model !== undefined;\n}\n\nconst DEFAULT_FORMAT_STRING = '###,##0';\n\ninterface GotoRowProps {\n gotoRow: string;\n gotoRowError: string;\n gotoValueError: string;\n onGotoRowSubmit: () => void;\n model: IrisGridModel;\n onGotoRowNumberChanged: (event: ChangeEvent<HTMLInputElement>) => void;\n onClose: () => void;\n isShown: boolean;\n onEntering: () => void;\n onEntered: () => void;\n onExiting: () => void;\n onExited: () => void;\n\n gotoValueSelectedColumnName: ColumnName;\n gotoValue: string;\n gotoValueFilter: FilterTypeValue;\n onGotoValueSelectedColumnNameChanged: (columnName: ColumnName) => void;\n onGotoValueSelectedFilterChanged: (filter: FilterTypeValue) => void;\n onGotoValueChanged: (input: string) => void;\n onGotoValueSubmit: (isBackward?: boolean) => void;\n}\n\nexport type GotoRowElement = { focus: () => void };\n\nconst GotoRow = forwardRef<GotoRowElement, GotoRowProps>(\n (\n {\n gotoRow,\n gotoRowError,\n gotoValueError,\n onGotoRowSubmit,\n isShown,\n onEntering,\n onEntered,\n onExiting,\n onExited,\n model,\n onGotoRowNumberChanged,\n onClose,\n gotoValueSelectedColumnName,\n gotoValue,\n gotoValueFilter,\n onGotoValueSelectedColumnNameChanged,\n onGotoValueSelectedFilterChanged,\n onGotoValueChanged,\n onGotoValueSubmit,\n }: GotoRowProps,\n ref\n ): ReactElement => {\n const gotoRowInputRef = useRef<HTMLInputElement>(null);\n const gotoValueInputRef = useRef<HTMLInputElement>(null);\n\n const [isGotoRowActive, setIsGotoRowActive] = useState(false);\n let columns: dh.Column[] = [];\n\n if (isIrisGridProxyModel(model) && model.table !== undefined) {\n ({ columns } = model.table);\n }\n\n const { dh, rowCount } = model;\n\n const gotoRowInputId = useMemo(() => `goto-row-input-${nanoid()}`, []);\n\n const handleGotoValueNumberKeyDown = (\n e: KeyboardEvent<HTMLInputElement>\n ): void => {\n if (e.key === 'Enter') {\n e.stopPropagation();\n e.preventDefault();\n onGotoValueSubmit();\n } else if (\n (e.key === 'Backspace' || e.key === 'Delete') &&\n (gotoValue === `${Number.POSITIVE_INFINITY}` ||\n gotoValue === `${Number.NEGATIVE_INFINITY}`)\n ) {\n onGotoValueInputChanged('');\n }\n };\n\n const handleGotoValueKeySubmit = (\n e: KeyboardEvent<HTMLInputElement>\n ): void => {\n if (e.key === 'Enter') {\n e.stopPropagation();\n e.preventDefault();\n onGotoValueSubmit(e.shiftKey);\n }\n };\n\n const index = model.getColumnIndexByName(gotoValueSelectedColumnName);\n\n const selectedColumn = columns[index ?? 0];\n\n const columnType = selectedColumn?.type;\n\n const normalizedType = TableUtils.getNormalizedType(columnType);\n const onGotoValueInputChanged = (value?: string): void => {\n onGotoValueChanged(value ?? '');\n };\n useImperativeHandle(ref, () => ({\n focus(): void {\n setIsGotoRowActive(true);\n gotoRowInputRef.current?.select();\n },\n }));\n const selectInput = (): void => {\n // when row changes without focus (i.e. via context menu), re-select input\n if (\n isGotoRowActive &&\n document.activeElement !== gotoRowInputRef.current\n ) {\n gotoRowInputRef.current?.select();\n } else if (\n !isGotoRowActive &&\n document.activeElement !== gotoValueInputRef.current\n ) {\n gotoValueInputRef.current?.select();\n }\n };\n useEffect(selectInput, [isGotoRowActive]);\n\n const renderValueInput = (): JSX.Element => {\n switch (normalizedType) {\n case TableUtils.dataType.DECIMAL:\n case TableUtils.dataType.INT:\n return (\n <div className=\"goto-row-input\">\n <input\n ref={gotoValueInputRef}\n className={classNames('form-control', {\n 'is-invalid': gotoValueError !== '',\n })}\n onKeyDown={handleGotoValueNumberKeyDown}\n placeholder=\"value\"\n onChange={e => {\n const value = e.target.value.toLowerCase();\n // regex tests for\n if (/^-?[0-9]*\\.?[0-9]*$/.test(e.target.value)) {\n onGotoValueInputChanged(e.target.value);\n } else if (value === '-i' || value === '-infinity') {\n onGotoValueInputChanged(`${Number.NEGATIVE_INFINITY}`);\n } else if (value === 'i' || value === 'infinity') {\n onGotoValueInputChanged(`${Number.POSITIVE_INFINITY}`);\n }\n }}\n value={gotoValue}\n aria-label=\"Value Input\"\n />\n </div>\n );\n case TableUtils.dataType.DATETIME:\n return (\n <div className=\"goto-value-date-time-input\">\n <DateTimeInput\n ref={gotoValueInputRef}\n className={classNames(\n 'form-control',\n 'goto-value-date-time-input',\n {\n 'is-invalid': gotoValueError !== '',\n }\n )}\n defaultValue={gotoValue}\n onChange={onGotoValueInputChanged}\n onSubmit={handleGotoValueKeySubmit}\n aria-label=\"Value Input\"\n />\n </div>\n );\n case TableUtils.dataType.STRING:\n return (\n <>\n <div className=\"goto-row-input\">\n <Select\n className=\"custom-select\"\n onChange={eventTargetValue => {\n onGotoValueSelectedFilterChanged(\n eventTargetValue as FilterTypeValue\n );\n }}\n value={gotoValueFilter}\n aria-label=\"filter-type-select\"\n >\n <option\n key={FilterType.eqIgnoreCase}\n value={FilterType.eqIgnoreCase}\n >\n Equals (case-insensitive)\n </option>\n <option\n key={FilterType.containsIgnoreCase}\n value={FilterType.containsIgnoreCase}\n >\n Contains (case-insensitive)\n </option>\n <option key={FilterType.eq} value={FilterType.eq}>\n Equals\n </option>\n <option key={FilterType.contains} value={FilterType.contains}>\n Contains\n </option>\n </Select>\n </div>\n <div className=\"goto-row-input\">\n <input\n ref={gotoValueInputRef}\n className={classNames('form-control', {\n 'is-invalid': gotoValueError !== '',\n })}\n onKeyDown={handleGotoValueKeySubmit}\n placeholder=\"value\"\n onChange={e => onGotoValueInputChanged(e.target.value)}\n value={gotoValue}\n aria-label=\"Value Input\"\n />\n </div>\n </>\n );\n case TableUtils.dataType.BOOLEAN:\n return (\n <div className=\"goto-row-input\">\n <Select\n className=\"custom-select\"\n onChange={eventTargetValue => {\n onGotoValueInputChanged(eventTargetValue);\n }}\n value={gotoValue}\n aria-label=\"Value Input\"\n >\n <option aria-label=\"null value\" key=\"null\" value=\"\" />\n <option key=\"true\" value=\"true\">\n true\n </option>\n <option key=\"false\" value=\"false\">\n false\n </option>\n </Select>\n </div>\n );\n default:\n return (\n <div className=\"goto-row-input\">\n <input\n ref={gotoValueInputRef}\n className=\"form-control\"\n onKeyDown={handleGotoValueKeySubmit}\n placeholder=\"value\"\n onChange={e => onGotoValueInputChanged(e.target.value)}\n value={gotoValue}\n aria-label=\"Value Input\"\n />\n </div>\n );\n }\n };\n return (\n <IrisGridBottomBar\n isShown={isShown}\n className={classNames('goto-row')}\n onEntering={onEntering}\n onEntered={() => {\n onEntered();\n selectInput();\n }}\n onExiting={onExiting}\n onExited={onExited}\n >\n <>\n <div className=\"goto-row-row\">\n <div\n className={classNames('goto-row-wrapper', {\n 'is-inactive': !isGotoRowActive,\n })}\n onClick={() => setIsGotoRowActive(true)}\n onFocus={() => setIsGotoRowActive(true)}\n role=\"group\"\n >\n <label className=\"goto-row-text\" htmlFor={gotoRowInputId}>\n Go to row\n </label>\n <div className=\"goto-row-input\">\n <input\n ref={gotoRowInputRef}\n data-testid=\"goto-row-input\"\n type=\"number\"\n onKeyDown={e => {\n if (e.key === 'Enter') {\n e.stopPropagation();\n e.preventDefault();\n onGotoRowSubmit();\n }\n }}\n className={classNames('form-control', {\n 'is-invalid': gotoRowError !== '',\n })}\n placeholder=\"Row number\"\n onChange={event => {\n onGotoRowNumberChanged(event);\n }}\n value={gotoRow}\n id={gotoRowInputId}\n />\n </div>\n <div className=\"goto-row-text\">\n of{' '}\n {dh.i18n.NumberFormat.format(DEFAULT_FORMAT_STRING, rowCount)}\n </div>\n {gotoRowError && (\n <div className=\"text-danger\">{gotoRowError}</div>\n )}\n </div>\n <div className=\"goto-row-close\">\n <Button kind=\"ghost\" onClick={onClose}>\n <FontAwesomeIcon icon={vsClose} style={{ marginRight: '0' }} />\n </Button>\n </div>\n </div>\n {model.isSeekRowAvailable && (\n <div className=\"goto-row-row\">\n <div\n className={classNames('goto-row-wrapper', {\n 'is-inactive': isGotoRowActive,\n })}\n onClick={() => setIsGotoRowActive(false)}\n onFocus={() => setIsGotoRowActive(false)}\n role=\"group\"\n >\n <div className=\"goto-row-text\">Go to value</div>\n <div className=\"goto-row-input\">\n <Select\n className=\"custom-select\"\n onChange={eventTargetValue => {\n const columnName = eventTargetValue;\n onGotoValueSelectedColumnNameChanged(columnName);\n }}\n value={gotoValueSelectedColumnName}\n aria-label=\"column-name-select\"\n id=\"column-name-select\"\n >\n {columns.map(column => (\n <option key={column.name} value={column.name}>\n {column.name}\n </option>\n ))}\n </Select>\n </div>\n\n {renderValueInput()}\n\n <div>\n <Button\n tooltip=\"Previous match\"\n icon={vsArrowUp}\n kind=\"ghost\"\n disabled={gotoValue === ''}\n onClick={() => {\n onGotoValueSubmit(true);\n }}\n />\n <Button\n tooltip=\"Next match\"\n icon={vsArrowDown}\n kind=\"ghost\"\n disabled={gotoValue === ''}\n onClick={() => {\n onGotoValueSubmit(false);\n }}\n />\n </div>\n {gotoValueError && (\n <div className=\"text-danger\">{gotoValueError}</div>\n )}\n </div>\n </div>\n )}\n </>\n </IrisGridBottomBar>\n );\n }\n);\nGotoRow.displayName = 'GotoRow';\n\nexport default GotoRow;\n"],"mappings":"AAAA,SAASA,eAAe,QAAQ,gCAAgC;AAChE,SAASC,OAAO,EAAEC,SAAS,EAAEC,WAAW,QAAQ,kBAAkB;AAClE,OAAOC,KAAK,IAIVC,UAAU,EACVC,SAAS,EACTC,mBAAmB,EACnBC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AAEd,SACEC,IAAI,IAAIC,UAAU,QAEb,oBAAoB;AAC3B,SAASC,MAAM,EAAEC,aAAa,EAAEC,MAAM,QAAQ,uBAAuB;AACrE,SAASC,UAAU,QAAQ,wBAAwB;AACnD,OAAOC,UAAU,MAAM,YAAY;AAAC;AAEpC,SAASC,MAAM,QAAQ,QAAQ;AAAC,OAGzBC,iBAAiB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAGxB,SAASC,oBAAoBA,CAC3BC,KAAoB,EACS;EAC7B,OAAQA,KAAK,CAAwBA,KAAK,KAAKC,SAAS;AAC1D;AAEA,IAAMC,qBAAqB,GAAG,SAAS;AA2BvC,IAAMC,OAAO,gBAAGzB,UAAU,CACxB,CAAA0B,IAAA,EAsBEC,GAAG,KACc;EAAA,IAtBjB;IACEC,OAAO;IACPC,YAAY;IACZC,cAAc;IACdC,eAAe;IACfC,OAAO;IACPC,UAAU;IACVC,SAAS,EAATA,UAAS;IACTC,SAAS;IACTC,QAAQ;IACRd,KAAK;IACLe,sBAAsB;IACtBC,OAAO;IACPC,2BAA2B;IAC3BC,SAAS;IACTC,eAAe;IACfC,oCAAoC;IACpCC,gCAAgC;IAChCC,kBA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IAAA;YAAKwE,SAAS,EAAC,aAAa;YAAAC,QAAA,EAAE3D;UAAc,CAAM,CACnD;QAAA,CACE;MAAC,CACH,CACN;IAAA,CACD;EAAC,CACc,CAAC;AAExB,CACF,CAAC;AACDL,OAAO,CAACqG,WAAW,GAAG,SAAS;AAE/B,eAAerG,OAAO"}
|
|
1
|
+
{"version":3,"file":"GotoRow.js","names":["FontAwesomeIcon","vsClose","vsArrowUp","vsArrowDown","React","forwardRef","useEffect","useImperativeHandle","useMemo","useRef","useState","Type","FilterType","Button","DateTimeInput","Select","TableUtils","classNames","nanoid","IrisGridBottomBar","isIrisGridTableModelTemplate","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","DEFAULT_FORMAT_STRING","GotoRow","_ref","ref","gotoRow","gotoRowError","gotoValueError","onGotoRowSubmit","isShown","onEntering","onEntered","onExiting","onExited","model","onGotoRowNumberChanged","onClose","gotoValueSelectedColumnName","gotoValue","gotoValueFilter","onGotoValueSelectedColumnNameChanged","onGotoValueSelectedFilterChanged","onGotoValueChanged","onGotoValueSubmit","gotoRowInputRef","gotoValueInputRef","isGotoRowActive","setIsGotoRowActive","columns","table","dh","rowCount","gotoRowInputId","concat","handleGotoValueNumberKeyDown","e","key","stopPropagation","preventDefault","Number","POSITIVE_INFINITY","NEGATIVE_INFINITY","onGotoValueInputChanged","handleGotoValueKeySubmit","shiftKey","index","getColumnIndexByName","selectedColumn","columnType","type","normalizedType","getNormalizedType","value","focus","_gotoRowInputRef$curr","current","select","selectInput","document","activeElement","_gotoRowInputRef$curr2","_gotoValueInputRef$cu","renderValueInput","dataType","DECIMAL","INT","className","children","onKeyDown","placeholder","onChange","target","toLowerCase","test","DATETIME","defaultValue","onSubmit","STRING","eventTargetValue","eqIgnoreCase","containsIgnoreCase","eq","contains","BOOLEAN","onClick","onFocus","role","htmlFor","event","id","i18n","NumberFormat","format","kind","icon","style","marginRight","isSeekRowAvailable","columnName","map","column","name","tooltip","disabled","displayName"],"sources":["../src/GotoRow.tsx"],"sourcesContent":["import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { vsClose, vsArrowUp, vsArrowDown } from '@deephaven/icons';\nimport React, {\n ChangeEvent,\n KeyboardEvent,\n ReactElement,\n forwardRef,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport type { dh } from '@deephaven/jsapi-types';\nimport {\n Type as FilterType,\n TypeValue as FilterTypeValue,\n} from '@deephaven/filters';\nimport { Button, DateTimeInput, Select } from '@deephaven/components';\nimport { TableUtils } from '@deephaven/jsapi-utils';\nimport classNames from 'classnames';\nimport './GotoRow.scss';\nimport { nanoid } from 'nanoid';\nimport IrisGridModel from './IrisGridModel';\nimport IrisGridBottomBar from './IrisGridBottomBar';\nimport { ColumnName } from './CommonTypes';\nimport { isIrisGridTableModelTemplate } from './IrisGridTableModelTemplate';\n\nconst DEFAULT_FORMAT_STRING = '###,##0';\n\ninterface GotoRowProps {\n gotoRow: string;\n gotoRowError: string;\n gotoValueError: string;\n onGotoRowSubmit: () => void;\n model: IrisGridModel;\n onGotoRowNumberChanged: (event: ChangeEvent<HTMLInputElement>) => void;\n onClose: () => void;\n isShown: boolean;\n onEntering: () => void;\n onEntered: () => void;\n onExiting: () => void;\n onExited: () => void;\n\n gotoValueSelectedColumnName: ColumnName;\n gotoValue: string;\n gotoValueFilter: FilterTypeValue;\n onGotoValueSelectedColumnNameChanged: (columnName: ColumnName) => void;\n onGotoValueSelectedFilterChanged: (filter: FilterTypeValue) => void;\n onGotoValueChanged: (input: string) => void;\n onGotoValueSubmit: (isBackward?: boolean) => void;\n}\n\nexport type GotoRowElement = { focus: () => void };\n\nconst GotoRow = forwardRef<GotoRowElement, GotoRowProps>(\n (\n {\n gotoRow,\n gotoRowError,\n gotoValueError,\n onGotoRowSubmit,\n isShown,\n onEntering,\n onEntered,\n onExiting,\n onExited,\n model,\n onGotoRowNumberChanged,\n onClose,\n gotoValueSelectedColumnName,\n gotoValue,\n gotoValueFilter,\n onGotoValueSelectedColumnNameChanged,\n onGotoValueSelectedFilterChanged,\n onGotoValueChanged,\n onGotoValueSubmit,\n }: GotoRowProps,\n ref\n ): ReactElement => {\n const gotoRowInputRef = useRef<HTMLInputElement>(null);\n const gotoValueInputRef = useRef<HTMLInputElement>(null);\n\n const [isGotoRowActive, setIsGotoRowActive] = useState(false);\n let columns: dh.Column[] = [];\n\n if (isIrisGridTableModelTemplate(model)) {\n ({ columns } = model.table);\n }\n\n const { dh, rowCount } = model;\n\n const gotoRowInputId = useMemo(() => `goto-row-input-${nanoid()}`, []);\n\n const handleGotoValueNumberKeyDown = (\n e: KeyboardEvent<HTMLInputElement>\n ): void => {\n if (e.key === 'Enter') {\n e.stopPropagation();\n e.preventDefault();\n onGotoValueSubmit();\n } else if (\n (e.key === 'Backspace' || e.key === 'Delete') &&\n (gotoValue === `${Number.POSITIVE_INFINITY}` ||\n gotoValue === `${Number.NEGATIVE_INFINITY}`)\n ) {\n onGotoValueInputChanged('');\n }\n };\n\n const handleGotoValueKeySubmit = (\n e: KeyboardEvent<HTMLInputElement>\n ): void => {\n if (e.key === 'Enter') {\n e.stopPropagation();\n e.preventDefault();\n onGotoValueSubmit(e.shiftKey);\n }\n };\n\n const index = model.getColumnIndexByName(gotoValueSelectedColumnName);\n\n const selectedColumn = columns[index ?? 0];\n\n const columnType = selectedColumn?.type;\n\n const normalizedType = TableUtils.getNormalizedType(columnType);\n const onGotoValueInputChanged = (value?: string): void => {\n onGotoValueChanged(value ?? '');\n };\n useImperativeHandle(ref, () => ({\n focus(): void {\n setIsGotoRowActive(true);\n gotoRowInputRef.current?.select();\n },\n }));\n const selectInput = (): void => {\n // when row changes without focus (i.e. via context menu), re-select input\n if (\n isGotoRowActive &&\n document.activeElement !== gotoRowInputRef.current\n ) {\n gotoRowInputRef.current?.select();\n } else if (\n !isGotoRowActive &&\n document.activeElement !== gotoValueInputRef.current\n ) {\n gotoValueInputRef.current?.select();\n }\n };\n useEffect(selectInput, [isGotoRowActive]);\n\n const renderValueInput = (): JSX.Element => {\n switch (normalizedType) {\n case TableUtils.dataType.DECIMAL:\n case TableUtils.dataType.INT:\n return (\n <div className=\"goto-row-input\">\n <input\n ref={gotoValueInputRef}\n className={classNames('form-control', {\n 'is-invalid': gotoValueError !== '',\n })}\n onKeyDown={handleGotoValueNumberKeyDown}\n placeholder=\"value\"\n onChange={e => {\n const value = e.target.value.toLowerCase();\n // regex tests for\n if (/^-?[0-9]*\\.?[0-9]*$/.test(e.target.value)) {\n onGotoValueInputChanged(e.target.value);\n } else if (value === '-i' || value === '-infinity') {\n onGotoValueInputChanged(`${Number.NEGATIVE_INFINITY}`);\n } else if (value === 'i' || value === 'infinity') {\n onGotoValueInputChanged(`${Number.POSITIVE_INFINITY}`);\n }\n }}\n value={gotoValue}\n aria-label=\"Value Input\"\n />\n </div>\n );\n case TableUtils.dataType.DATETIME:\n return (\n <div className=\"goto-value-date-time-input\">\n <DateTimeInput\n ref={gotoValueInputRef}\n className={classNames(\n 'form-control',\n 'goto-value-date-time-input',\n {\n 'is-invalid': gotoValueError !== '',\n }\n )}\n defaultValue={gotoValue}\n onChange={onGotoValueInputChanged}\n onSubmit={handleGotoValueKeySubmit}\n aria-label=\"Value Input\"\n />\n </div>\n );\n case TableUtils.dataType.STRING:\n return (\n <>\n <div className=\"goto-row-input\">\n <Select\n className=\"custom-select\"\n onChange={eventTargetValue => {\n onGotoValueSelectedFilterChanged(\n eventTargetValue as FilterTypeValue\n );\n }}\n value={gotoValueFilter}\n aria-label=\"filter-type-select\"\n >\n <option\n key={FilterType.eqIgnoreCase}\n value={FilterType.eqIgnoreCase}\n >\n Equals (case-insensitive)\n </option>\n <option\n key={FilterType.containsIgnoreCase}\n value={FilterType.containsIgnoreCase}\n >\n Contains (case-insensitive)\n </option>\n <option key={FilterType.eq} value={FilterType.eq}>\n Equals\n </option>\n <option key={FilterType.contains} value={FilterType.contains}>\n Contains\n </option>\n </Select>\n </div>\n <div className=\"goto-row-input\">\n <input\n ref={gotoValueInputRef}\n className={classNames('form-control', {\n 'is-invalid': gotoValueError !== '',\n })}\n onKeyDown={handleGotoValueKeySubmit}\n placeholder=\"value\"\n onChange={e => onGotoValueInputChanged(e.target.value)}\n value={gotoValue}\n aria-label=\"Value Input\"\n />\n </div>\n </>\n );\n case TableUtils.dataType.BOOLEAN:\n return (\n <div className=\"goto-row-input\">\n <Select\n className=\"custom-select\"\n onChange={eventTargetValue => {\n onGotoValueInputChanged(eventTargetValue);\n }}\n value={gotoValue}\n aria-label=\"Value Input\"\n >\n <option aria-label=\"null value\" key=\"null\" value=\"\" />\n <option key=\"true\" value=\"true\">\n true\n </option>\n <option key=\"false\" value=\"false\">\n false\n </option>\n </Select>\n </div>\n );\n default:\n return (\n <div className=\"goto-row-input\">\n <input\n ref={gotoValueInputRef}\n className=\"form-control\"\n onKeyDown={handleGotoValueKeySubmit}\n placeholder=\"value\"\n onChange={e => onGotoValueInputChanged(e.target.value)}\n value={gotoValue}\n aria-label=\"Value Input\"\n />\n </div>\n );\n }\n };\n return (\n <IrisGridBottomBar\n isShown={isShown}\n className={classNames('goto-row')}\n onEntering={onEntering}\n onEntered={() => {\n onEntered();\n selectInput();\n }}\n onExiting={onExiting}\n onExited={onExited}\n >\n <>\n <div className=\"goto-row-row\">\n <div\n className={classNames('goto-row-wrapper', {\n 'is-inactive': !isGotoRowActive,\n })}\n onClick={() => setIsGotoRowActive(true)}\n onFocus={() => setIsGotoRowActive(true)}\n role=\"group\"\n >\n <label className=\"goto-row-text\" htmlFor={gotoRowInputId}>\n Go to row\n </label>\n <div className=\"goto-row-input\">\n <input\n ref={gotoRowInputRef}\n data-testid=\"goto-row-input\"\n type=\"number\"\n onKeyDown={e => {\n if (e.key === 'Enter') {\n e.stopPropagation();\n e.preventDefault();\n onGotoRowSubmit();\n }\n }}\n className={classNames('form-control', {\n 'is-invalid': gotoRowError !== '',\n })}\n placeholder=\"Row number\"\n onChange={event => {\n onGotoRowNumberChanged(event);\n }}\n value={gotoRow}\n id={gotoRowInputId}\n />\n </div>\n <div className=\"goto-row-text\">\n of{' '}\n {dh.i18n.NumberFormat.format(DEFAULT_FORMAT_STRING, rowCount)}\n </div>\n {gotoRowError && (\n <div className=\"text-danger\">{gotoRowError}</div>\n )}\n </div>\n <div className=\"goto-row-close\">\n <Button kind=\"ghost\" onClick={onClose}>\n <FontAwesomeIcon icon={vsClose} style={{ marginRight: '0' }} />\n </Button>\n </div>\n </div>\n {model.isSeekRowAvailable && (\n <div className=\"goto-row-row\">\n <div\n className={classNames('goto-row-wrapper', {\n 'is-inactive': isGotoRowActive,\n })}\n onClick={() => setIsGotoRowActive(false)}\n onFocus={() => setIsGotoRowActive(false)}\n role=\"group\"\n >\n <div className=\"goto-row-text\">Go to value</div>\n <div className=\"goto-row-input\">\n <Select\n className=\"custom-select\"\n onChange={eventTargetValue => {\n const columnName = eventTargetValue;\n onGotoValueSelectedColumnNameChanged(columnName);\n }}\n value={gotoValueSelectedColumnName}\n aria-label=\"column-name-select\"\n id=\"column-name-select\"\n >\n {columns.map(column => (\n <option key={column.name} value={column.name}>\n {column.name}\n </option>\n ))}\n </Select>\n </div>\n\n {renderValueInput()}\n\n <div>\n <Button\n tooltip=\"Previous match\"\n icon={vsArrowUp}\n kind=\"ghost\"\n disabled={gotoValue === ''}\n onClick={() => {\n onGotoValueSubmit(true);\n }}\n />\n <Button\n tooltip=\"Next match\"\n icon={vsArrowDown}\n kind=\"ghost\"\n disabled={gotoValue === ''}\n onClick={() => {\n onGotoValueSubmit(false);\n }}\n />\n </div>\n {gotoValueError && (\n <div className=\"text-danger\">{gotoValueError}</div>\n )}\n </div>\n </div>\n )}\n </>\n </IrisGridBottomBar>\n );\n }\n);\nGotoRow.displayName = 'GotoRow';\n\nexport default GotoRow;\n"],"mappings":"AAAA,SAASA,eAAe,QAAQ,gCAAgC;AAChE,SAASC,OAAO,EAAEC,SAAS,EAAEC,WAAW,QAAQ,kBAAkB;AAClE,OAAOC,KAAK,IAIVC,UAAU,EACVC,SAA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M,iBACjBxG,IAAA;gBAA0BwD,KAAK,EAAEgD,MAAM,CAACC,IAAK;gBAAAlC,QAAA,EAC1CiC,MAAM,CAACC;cAAI,GADDD,MAAM,CAACC,IAEZ,CACT;YAAC,CACI;UAAC,CACN,CAAC,EAELvC,gBAAgB,CAAC,CAAC,eAEnBhE,KAAA;YAAAqE,QAAA,gBACEvE,IAAA,CAACT,MAAM;cACLmH,OAAO,EAAC,gBAAgB;cACxBR,IAAI,EAAEtH,SAAU;cAChBqH,IAAI,EAAC,OAAO;cACZU,QAAQ,EAAErF,SAAS,KAAK,EAAG;cAC3BkE,OAAO,EAAEA,CAAA,KAAM;gBACb7D,iBAAiB,CAAC,IAAI,CAAC;cACzB;YAAE,CACH,CAAC,eACF3B,IAAA,CAACT,MAAM;cACLmH,OAAO,EAAC,YAAY;cACpBR,IAAI,EAAErH,WAAY;cAClBoH,IAAI,EAAC,OAAO;cACZU,QAAQ,EAAErF,SAAS,KAAK,EAAG;cAC3BkE,OAAO,EAAEA,CAAA,KAAM;gBACb7D,iBAAiB,CAAC,KAAK,CAAC;cAC1B;YAAE,CACH,CAAC;UAAA,CACC,CAAC,EACLhB,cAAc,iBACbX,IAAA;YAAKsE,SAAS,EAAC,aAAa;YAAAC,QAAA,EAAE5D;UAAc,CAAM,CACnD;QAAA,CACE;MAAC,CACH,CACN;IAAA,CACD;EAAC,CACc,CAAC;AAExB,CACF,CAAC;AACDL,OAAO,CAACsG,WAAW,GAAG,SAAS;AAE/B,eAAetG,OAAO"}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { Formatter } from '@deephaven/jsapi-utils';
|
|
2
|
-
import { CancelablePromise } from '@deephaven/utils';
|
|
3
2
|
import type { dh as DhType } from '@deephaven/jsapi-types';
|
|
4
|
-
import { EditableGridModel, ModelIndex, MoveOperation } from '@deephaven/grid';
|
|
5
|
-
import IrisGridTableModel from './IrisGridTableModel';
|
|
6
|
-
import IrisGridTreeTableModel from './IrisGridTreeTableModel';
|
|
7
3
|
import IrisGridModel from './IrisGridModel';
|
|
8
|
-
import { ColumnName
|
|
9
|
-
import type ColumnHeaderGroup from './ColumnHeaderGroup';
|
|
4
|
+
import { ColumnName } from './CommonTypes';
|
|
10
5
|
import { PartitionConfig, PartitionedGridModel } from './PartitionedGridModel';
|
|
11
6
|
/**
|
|
12
7
|
* Model which proxies calls to other IrisGridModels.
|
|
13
8
|
* This allows for operations that generate new tables, like rollups.
|
|
9
|
+
* The proxy model will call any methods it has implemented and delegate any
|
|
10
|
+
* it does not implement to the underlying model.
|
|
14
11
|
*/
|
|
15
12
|
declare class IrisGridProxyModel extends IrisGridModel implements PartitionedGridModel {
|
|
16
13
|
/**
|
|
@@ -19,18 +16,14 @@ declare class IrisGridProxyModel extends IrisGridModel implements PartitionedGri
|
|
|
19
16
|
* @param formatter The formatter to use when getting formats
|
|
20
17
|
* @param inputTable Iris input table associated with this table
|
|
21
18
|
*/
|
|
22
|
-
dh: typeof DhType;
|
|
23
|
-
originalModel: IrisGridModel;
|
|
24
19
|
model: IrisGridModel;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
columns?: DhType.Column[];
|
|
33
|
-
};
|
|
20
|
+
dh: typeof DhType;
|
|
21
|
+
private originalModel;
|
|
22
|
+
private modelPromise;
|
|
23
|
+
private rollup;
|
|
24
|
+
private partition;
|
|
25
|
+
private selectDistinct;
|
|
26
|
+
private currentViewport?;
|
|
34
27
|
constructor(dh: typeof DhType, table: DhType.Table | DhType.TreeTable | DhType.PartitionedTable, formatter?: Formatter, inputTable?: DhType.InputTable | null);
|
|
35
28
|
close(): void;
|
|
36
29
|
handleModelEvent(event: CustomEvent): void;
|
|
@@ -40,122 +33,23 @@ declare class IrisGridProxyModel extends IrisGridModel implements PartitionedGri
|
|
|
40
33
|
stopListening(): void;
|
|
41
34
|
addListeners(model: IrisGridModel): void;
|
|
42
35
|
removeListeners(model: IrisGridModel): void;
|
|
43
|
-
get rowCount(): number;
|
|
44
|
-
get columnCount(): number;
|
|
45
|
-
get floatingTopRowCount(): number;
|
|
46
|
-
get floatingBottomRowCount(): number;
|
|
47
|
-
get floatingLeftColumnCount(): number;
|
|
48
|
-
get floatingRightColumnCount(): number;
|
|
49
|
-
textForCell: IrisGridModel['textForCell'];
|
|
50
|
-
truncationCharForCell: IrisGridModel['truncationCharForCell'];
|
|
51
|
-
textAlignForCell: IrisGridModel['textAlignForCell'];
|
|
52
|
-
colorForCell: IrisGridModel['colorForCell'];
|
|
53
|
-
backgroundColorForCell: IrisGridModel['backgroundColorForCell'];
|
|
54
|
-
textForColumnHeader: IrisGridModel['textForColumnHeader'];
|
|
55
|
-
colorForColumnHeader: IrisGridModel['colorForColumnHeader'];
|
|
56
|
-
textForRowHeader: IrisGridModel['textForRowHeader'];
|
|
57
|
-
textForRowFooter: IrisGridModel['textForRowFooter'];
|
|
58
|
-
isRowMovable: IrisGridModel['isRowMovable'];
|
|
59
|
-
isColumnMovable: IrisGridModel['isColumnMovable'];
|
|
60
|
-
isColumnFrozen(x: ModelIndex): boolean;
|
|
61
|
-
isColumnSortable(index: number): boolean;
|
|
62
|
-
get hasExpandableRows(): boolean;
|
|
63
|
-
get isExpandAllAvailable(): boolean;
|
|
64
|
-
isRowExpandable: IrisGridTreeTableModel['isRowExpandable'];
|
|
65
|
-
isRowExpanded: IrisGridTreeTableModel['isRowExpanded'];
|
|
66
|
-
setRowExpanded: IrisGridTreeTableModel['setRowExpanded'];
|
|
67
|
-
expandAll: IrisGridTreeTableModel['expandAll'];
|
|
68
|
-
collapseAll: IrisGridTreeTableModel['collapseAll'];
|
|
69
|
-
depthForRow: IrisGridTreeTableModel['depthForRow'];
|
|
70
|
-
get isExportAvailable(): boolean;
|
|
71
|
-
get isColumnStatisticsAvailable(): boolean;
|
|
72
|
-
get isValuesTableAvailable(): boolean;
|
|
73
36
|
get isCustomColumnsAvailable(): boolean;
|
|
74
|
-
get isFormatColumnsAvailable(): boolean;
|
|
75
|
-
get isChartBuilderAvailable(): boolean;
|
|
76
37
|
get isRollupAvailable(): boolean;
|
|
77
38
|
get isSelectDistinctAvailable(): boolean;
|
|
78
|
-
get isTotalsAvailable(): boolean;
|
|
79
|
-
get isReversible(): boolean;
|
|
80
|
-
get columns(): readonly DhType.Column[];
|
|
81
|
-
get initialMovedColumns(): readonly MoveOperation[];
|
|
82
|
-
get initialMovedRows(): readonly MoveOperation[];
|
|
83
|
-
get layoutHints(): DhType.LayoutHints | null | undefined;
|
|
84
|
-
get frontColumns(): readonly ColumnName[];
|
|
85
|
-
get backColumns(): readonly ColumnName[];
|
|
86
|
-
get frozenColumns(): readonly ColumnName[];
|
|
87
|
-
get keyColumnSet(): Set<ColumnName>;
|
|
88
|
-
getColumnHeaderGroup: IrisGridModel['getColumnHeaderGroup'];
|
|
89
|
-
get columnHeaderGroups(): readonly ColumnHeaderGroup[];
|
|
90
|
-
set columnHeaderGroups(groups: readonly ColumnHeaderGroup[]);
|
|
91
|
-
get initialColumnHeaderGroups(): readonly ColumnHeaderGroup[];
|
|
92
|
-
getColumnHeaderParentGroup: IrisGridModel['getColumnHeaderParentGroup'];
|
|
93
|
-
get columnHeaderGroupMap(): ReadonlyMap<string, ColumnHeaderGroup>;
|
|
94
|
-
get columnHeaderMaxDepth(): number;
|
|
95
|
-
updateFrozenColumns(columns: readonly ColumnName[]): void;
|
|
96
39
|
get originalColumns(): readonly DhType.Column[];
|
|
97
|
-
get groupedColumns(): readonly DhType.Column[];
|
|
98
40
|
get partitionColumns(): readonly DhType.Column[];
|
|
99
|
-
sourceForCell: IrisGridModel['sourceForCell'];
|
|
100
|
-
getClearFilterRange: IrisGridModel['getClearFilterRange'];
|
|
101
|
-
get description(): string;
|
|
102
|
-
formatForCell: IrisGridModel['formatForCell'];
|
|
103
|
-
valueForCell: IrisGridModel['valueForCell'];
|
|
104
|
-
renderTypeForCell: IrisGridModel['renderTypeForCell'];
|
|
105
|
-
dataBarOptionsForCell: IrisGridModel['dataBarOptionsForCell'];
|
|
106
|
-
get filter(): readonly DhType.FilterCondition[];
|
|
107
|
-
set filter(filter: readonly DhType.FilterCondition[]);
|
|
108
41
|
get partitionConfig(): PartitionConfig | null;
|
|
109
42
|
set partitionConfig(partitionConfig: PartitionConfig | null);
|
|
110
43
|
partitionKeysTable(): Promise<DhType.Table>;
|
|
111
44
|
partitionMergedTable(): Promise<DhType.Table>;
|
|
112
45
|
partitionTable(partitions: unknown[]): Promise<DhType.Table>;
|
|
113
|
-
get formatter(): Formatter;
|
|
114
|
-
set formatter(formatter: Formatter);
|
|
115
|
-
displayString: IrisGridModel['displayString'];
|
|
116
|
-
get sort(): readonly DhType.Sort[];
|
|
117
|
-
set sort(sort: readonly DhType.Sort[]);
|
|
118
|
-
get customColumns(): readonly ColumnName[];
|
|
119
|
-
set customColumns(customColumns: readonly ColumnName[]);
|
|
120
|
-
get formatColumns(): readonly DhType.CustomColumn[];
|
|
121
|
-
set formatColumns(formatColumns: readonly DhType.CustomColumn[]);
|
|
122
46
|
get rollupConfig(): DhType.RollupConfig | null;
|
|
123
47
|
set rollupConfig(rollupConfig: DhType.RollupConfig | null);
|
|
124
48
|
get selectDistinctColumns(): ColumnName[];
|
|
125
49
|
set selectDistinctColumns(columnNames: string[]);
|
|
126
|
-
get table(): DhType.Table | DhType.TreeTable | undefined;
|
|
127
|
-
get totalsConfig(): UITotalsTableConfig | null;
|
|
128
|
-
set totalsConfig(totalsConfig: UITotalsTableConfig | null);
|
|
129
50
|
get isFilterRequired(): boolean;
|
|
130
51
|
get isPartitionRequired(): boolean;
|
|
131
|
-
get isEditable(): boolean;
|
|
132
|
-
get isDeletable(): boolean;
|
|
133
|
-
get isViewportPending(): boolean;
|
|
134
|
-
isEditableRange: IrisGridTableModel['isEditableRange'];
|
|
135
|
-
isDeletableRange: IrisGridTableModel['isDeletableRange'];
|
|
136
|
-
isDeletableRanges: IrisGridTableModel['isDeletableRanges'];
|
|
137
|
-
isFilterable: IrisGridTableModel['isFilterable'];
|
|
138
52
|
setViewport: (top: number, bottom: number, columns?: DhType.Column[]) => void;
|
|
139
|
-
snapshot: IrisGridModel['snapshot'];
|
|
140
|
-
textSnapshot: IrisGridTableModel['textSnapshot'];
|
|
141
|
-
export(): Promise<DhType.Table>;
|
|
142
|
-
valuesTable: IrisGridTableModel['valuesTable'];
|
|
143
|
-
columnStatistics(column: DhType.Column): Promise<DhType.ColumnStatistics>;
|
|
144
|
-
editValueForCell: IrisGridTableModel['editValueForCell'];
|
|
145
|
-
setValueForCell: IrisGridTableModel['setValueForCell'];
|
|
146
|
-
setValueForRanges: IrisGridTableModel['setValueForRanges'];
|
|
147
|
-
setValues: EditableGridModel['setValues'];
|
|
148
|
-
isValidForCell: IrisGridTableModel['isValidForCell'];
|
|
149
|
-
delete: IrisGridTableModel['delete'];
|
|
150
|
-
get pendingDataMap(): PendingDataMap<UIRow>;
|
|
151
|
-
set pendingDataMap(map: PendingDataMap<UIRow>);
|
|
152
|
-
get pendingRowCount(): number;
|
|
153
|
-
set pendingRowCount(count: number);
|
|
154
|
-
get pendingDataErrors(): PendingDataErrorMap;
|
|
155
|
-
commitPending: IrisGridTableModel['commitPending'];
|
|
156
|
-
getColumnIndexByName(name: ColumnName): number | undefined;
|
|
157
|
-
seekRow(startRow: number, column: DhType.Column, valueType: DhType.ValueTypeType, value: unknown, insensitive?: boolean, contains?: boolean, isBackwards?: boolean): Promise<number>;
|
|
158
|
-
get isSeekRowAvailable(): boolean;
|
|
159
53
|
}
|
|
160
54
|
export default IrisGridProxyModel;
|
|
161
55
|
//# sourceMappingURL=IrisGridProxyModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IrisGridProxyModel.d.ts","sourceRoot":"","sources":["../src/IrisGridProxyModel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IrisGridProxyModel.d.ts","sourceRoot":"","sources":["../src/IrisGridProxyModel.ts"],"names":[],"mappings":"AACA,OAAO,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