@deephaven/iris-grid 0.9.4-plugins.9 → 0.10.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/IrisGrid.d.ts +23 -3
- package/dist/IrisGrid.d.ts.map +1 -1
- package/dist/IrisGrid.js +146 -8
- package/dist/IrisGrid.js.map +1 -1
- package/dist/IrisGridModel.d.ts +14 -2
- package/dist/IrisGridModel.d.ts.map +1 -1
- package/dist/IrisGridModel.js +8 -0
- package/dist/IrisGridModel.js.map +1 -1
- package/dist/IrisGridModelFactory.d.ts +1 -1
- package/dist/IrisGridModelFactory.d.ts.map +1 -1
- package/dist/IrisGridModelFactory.js +8 -1
- package/dist/IrisGridModelFactory.js.map +1 -1
- package/dist/IrisGridModelUpdater.d.ts +3 -2
- package/dist/IrisGridModelUpdater.d.ts.map +1 -1
- package/dist/IrisGridModelUpdater.js +7 -1
- package/dist/IrisGridModelUpdater.js.map +1 -1
- package/dist/IrisGridProxyModel.d.ts.map +1 -1
- package/dist/IrisGridProxyModel.js +12 -0
- package/dist/IrisGridProxyModel.js.map +1 -1
- package/dist/IrisGridTableModel.d.ts +2 -0
- package/dist/IrisGridTableModel.d.ts.map +1 -1
- package/dist/IrisGridTableModel.js +47 -5
- package/dist/IrisGridTableModel.js.map +1 -1
- package/dist/IrisGridUtils.d.ts +2 -0
- package/dist/IrisGridUtils.d.ts.map +1 -1
- package/dist/IrisGridUtils.js +4 -0
- package/dist/IrisGridUtils.js.map +1 -1
- package/dist/TableUtils.d.ts.map +1 -1
- package/dist/TableUtils.js +2 -0
- package/dist/TableUtils.js.map +1 -1
- package/dist/sidebar/ChartBuilder.js +1 -1
- package/dist/sidebar/ChartBuilder.js.map +1 -1
- package/dist/sidebar/OptionType.d.ts +3 -1
- package/dist/sidebar/OptionType.d.ts.map +1 -1
- package/dist/sidebar/OptionType.js +2 -0
- package/dist/sidebar/OptionType.js.map +1 -1
- package/dist/sidebar/conditional-formatting/ColumnFormatEditor.d.ts +9 -0
- package/dist/sidebar/conditional-formatting/ColumnFormatEditor.d.ts.map +1 -0
- package/dist/sidebar/conditional-formatting/ColumnFormatEditor.js +132 -0
- package/dist/sidebar/conditional-formatting/ColumnFormatEditor.js.map +1 -0
- package/dist/sidebar/conditional-formatting/ConditionEditor.d.ts +9 -0
- package/dist/sidebar/conditional-formatting/ConditionEditor.d.ts.map +1 -0
- package/dist/sidebar/conditional-formatting/ConditionEditor.js +273 -0
- package/dist/sidebar/conditional-formatting/ConditionEditor.js.map +1 -0
- package/dist/sidebar/conditional-formatting/ConditionalFormatEditor.css +21 -0
- package/dist/sidebar/conditional-formatting/ConditionalFormatEditor.css.map +1 -0
- package/dist/sidebar/conditional-formatting/ConditionalFormatEditor.d.ts +15 -0
- package/dist/sidebar/conditional-formatting/ConditionalFormatEditor.d.ts.map +1 -0
- package/dist/sidebar/conditional-formatting/ConditionalFormatEditor.js +115 -0
- package/dist/sidebar/conditional-formatting/ConditionalFormatEditor.js.map +1 -0
- package/dist/sidebar/conditional-formatting/ConditionalFormattingAPIUtils.d.ts +6 -0
- package/dist/sidebar/conditional-formatting/ConditionalFormattingAPIUtils.d.ts.map +1 -0
- package/dist/sidebar/conditional-formatting/ConditionalFormattingAPIUtils.js +21 -0
- package/dist/sidebar/conditional-formatting/ConditionalFormattingAPIUtils.js.map +1 -0
- package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.css +56 -0
- package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.css.map +1 -0
- package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.d.ts +15 -0
- package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.d.ts.map +1 -0
- package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.js +160 -0
- package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.js.map +1 -0
- package/dist/sidebar/conditional-formatting/ConditionalFormattingUtils.d.ts +119 -0
- package/dist/sidebar/conditional-formatting/ConditionalFormattingUtils.d.ts.map +1 -0
- package/dist/sidebar/conditional-formatting/ConditionalFormattingUtils.js +748 -0
- package/dist/sidebar/conditional-formatting/ConditionalFormattingUtils.js.map +1 -0
- package/dist/sidebar/conditional-formatting/RowFormatEditor.d.ts +9 -0
- package/dist/sidebar/conditional-formatting/RowFormatEditor.d.ts.map +1 -0
- package/dist/sidebar/conditional-formatting/RowFormatEditor.js +132 -0
- package/dist/sidebar/conditional-formatting/RowFormatEditor.js.map +1 -0
- package/dist/sidebar/conditional-formatting/StyleEditor.css +54 -0
- package/dist/sidebar/conditional-formatting/StyleEditor.css.map +1 -0
- package/dist/sidebar/conditional-formatting/StyleEditor.d.ts +9 -0
- package/dist/sidebar/conditional-formatting/StyleEditor.d.ts.map +1 -0
- package/dist/sidebar/conditional-formatting/StyleEditor.js +160 -0
- package/dist/sidebar/conditional-formatting/StyleEditor.js.map +1 -0
- package/dist/sidebar/icons/FormatColumnWhereIcon.d.ts +4 -0
- package/dist/sidebar/icons/FormatColumnWhereIcon.d.ts.map +1 -0
- package/dist/sidebar/icons/FormatColumnWhereIcon.js +45 -0
- package/dist/sidebar/icons/FormatColumnWhereIcon.js.map +1 -0
- package/dist/sidebar/icons/FormatRowWhereIcon.d.ts +4 -0
- package/dist/sidebar/icons/FormatRowWhereIcon.d.ts.map +1 -0
- package/dist/sidebar/icons/FormatRowWhereIcon.js +39 -0
- package/dist/sidebar/icons/FormatRowWhereIcon.js.map +1 -0
- package/dist/sidebar/icons/index.d.ts +2 -0
- package/dist/sidebar/icons/index.js +2 -0
- package/dist/sidebar/icons/index.js.map +1 -1
- package/package.json +11 -11
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/sidebar/conditional-formatting/ConditionalFormatEditor.tsx"],"names":["React","useCallback","useState","classNames","Button","Log","FormatColumnWhereIcon","FormatRowWhereIcon","ColumnFormatEditor","RowFormatEditor","FormatterType","log","module","DEFAULT_CALLBACK","undefined","getFormatterTypeIcon","option","CONDITIONAL","ROWS","getFormatterTypeLabel","formatterTypes","ConditionalFormatEditor","props","columns","onSave","onUpdate","onCancel","rule","defaultRule","selectedFormatter","setFormatter","type","setRule","isValid","setIsValid","handleCancel","handleSave","error","handleFormatterChange","value","debug","handleRuleChange","ruleConfig","isRuleValid","updatedRule","config","map","index","active"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,WAAhB,EAA6BC,QAA7B,QAA6C,OAA7C;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SAASC,MAAT,QAAuB,uBAAvB;AACA,OAAOC,GAAP,MAAgB,gBAAhB;SACSC,qB,EAAuBC,kB;OACzBC,kB;OACAC,e;SAGLC,a;;AAMF,IAAMC,GAAG,GAAGN,GAAG,CAACO,MAAJ,CAAW,yBAAX,CAAZ;;AAgBA,IAAMC,gBAAgB,GAAG,MAAMC,SAA/B;;AAEA,SAASC,oBAAT,CAA8BC,MAA9B,EAA8E;AAC5E,UAAQA,MAAR;AACE,SAAKN,aAAa,CAACO,WAAnB;AACE,0BAAO,oBAAC,qBAAD,OAAP;;AACF,SAAKP,aAAa,CAACQ,IAAnB;AACE,0BAAO,oBAAC,kBAAD,OAAP;AAJJ;AAMD;;AAED,SAASC,qBAAT,CAA+BH,MAA/B,EAA8D;AAC5D,UAAQA,MAAR;AACE,SAAKN,aAAa,CAACO,WAAnB;AACE,aAAO,aAAP;;AACF,SAAKP,aAAa,CAACQ,IAAnB;AACE,aAAO,MAAP;AAJJ;AAMD;;AAED,IAAME,cAAc,GAAG,CAACV,aAAa,CAACO,WAAf,EAA4BP,aAAa,CAACQ,IAA1C,CAAvB;;AAEA,IAAMG,uBAAuB,GAC3BC,KAD8B,IAEd;AAAA;;AAChB,MAAM;AACJC,IAAAA,OADI;AAEJC,IAAAA,MAAM,GAAGX,gBAFL;AAGJY,IAAAA,QAAQ,GAAGZ,gBAHP;AAIJa,IAAAA,QAAQ,GAAGb,gBAJP;AAKJc,IAAAA,IAAI,EAAEC;AALF,MAMFN,KANJ;AAQA,MAAM,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,kBACE,oBAAC,MAAD;AAAQ,IAAA,IAAI,EAAC,WAAb;AAAyB,IAAA,OAAO,EAAEN,YAAlC;AAAgD,IAAA,SAAS,EAAC;AAA1D,cADF,eAIE,oBAAC,MAAD;AACE,IAAA,IAAI,EAAC,SADP;AAEE,IAAA,OAAO,EAAEC,UAFX;AAGE,IAAA,QAAQ,EAAET,IAAI,KAAKb,SAAT,IAAsB,CAACmB;AAHnC,YAJF,CAvCF,CADF;AAsDD,CAtGD;;AAwGA,eAAeZ,uBAAf","sourcesContent":["import React, { useCallback, useState } from 'react';\nimport classNames from 'classnames';\nimport { Button } from '@deephaven/components';\nimport Log from '@deephaven/log';\nimport { FormatColumnWhereIcon, FormatRowWhereIcon } from '../icons';\nimport ColumnFormatEditor from './ColumnFormatEditor';\nimport RowFormatEditor from './RowFormatEditor';\nimport {\n BaseFormatConfig,\n FormatterType,\n FormattingRule,\n ModelColumn,\n} from './ConditionalFormattingUtils';\nimport './ConditionalFormatEditor.scss';\n\nconst log = Log.module('ConditionalFormatEditor');\n\nexport type SaveCallback = (rule: FormattingRule) => void;\n\nexport type UpdateCallback = (rule?: FormattingRule) => void;\n\nexport type CancelCallback = () => void;\n\nexport interface ConditionalFormatEditorProps {\n columns: ModelColumn[];\n rule?: FormattingRule;\n onCancel?: CancelCallback;\n onSave?: SaveCallback;\n onUpdate?: UpdateCallback;\n}\n\nconst DEFAULT_CALLBACK = () => undefined;\n\nfunction getFormatterTypeIcon(option: FormatterType): JSX.Element | undefined {\n switch (option) {\n case FormatterType.CONDITIONAL:\n return <FormatColumnWhereIcon />;\n case FormatterType.ROWS:\n return <FormatRowWhereIcon />;\n }\n}\n\nfunction getFormatterTypeLabel(option: FormatterType): string {\n switch (option) {\n case FormatterType.CONDITIONAL:\n return 'Conditional';\n case FormatterType.ROWS:\n return 'Rows';\n }\n}\n\nconst formatterTypes = [FormatterType.CONDITIONAL, FormatterType.ROWS];\n\nconst ConditionalFormatEditor = (\n props: ConditionalFormatEditorProps\n): JSX.Element => {\n const {\n columns,\n onSave = DEFAULT_CALLBACK,\n onUpdate = DEFAULT_CALLBACK,\n onCancel = DEFAULT_CALLBACK,\n rule: defaultRule,\n } = props;\n\n const [selectedFormatter, setFormatter] = useState(\n defaultRule?.type ?? formatterTypes[0]\n );\n const [rule, setRule] = useState(defaultRule);\n const [isValid, setIsValid] = useState(false);\n\n const handleCancel = useCallback(() => {\n onCancel();\n }, [onCancel]);\n\n const handleSave = useCallback(() => {\n if (rule === undefined) {\n log.error('Rule is not defined.');\n return;\n }\n onSave(rule);\n }, [onSave, rule]);\n\n const handleFormatterChange = useCallback(value => {\n log.debug('handleFormatterChange', value);\n setFormatter(value);\n }, []);\n\n const handleRuleChange = useCallback(\n (ruleConfig, isRuleValid) => {\n log.debug('handleRuleChange', ruleConfig, isRuleValid, selectedFormatter);\n const updatedRule = {\n type: selectedFormatter,\n config: ruleConfig as BaseFormatConfig,\n };\n setRule(updatedRule);\n setIsValid(isRuleValid);\n onUpdate(isRuleValid ? updatedRule : undefined);\n },\n [onUpdate, selectedFormatter]\n );\n\n return (\n <div className=\"conditional-format-editor form\">\n <div className=\"mb-2\">\n <label className=\"mb-0\" htmlFor=\"formatter-select\">\n Select Formatter\n </label>\n\n <div className=\"formatter-list\">\n {formatterTypes.map((type, index) => (\n <div key={type} className=\"formatter-type\">\n <button\n type=\"button\"\n className={classNames('btn', 'btn-icon', 'btn-formatter-type', {\n active: type === selectedFormatter,\n })}\n data-index={index}\n onClick={() => handleFormatterChange(type)}\n >\n {getFormatterTypeIcon(type)}\n {getFormatterTypeLabel(type)}\n </button>\n </div>\n ))}\n </div>\n </div>\n {selectedFormatter === FormatterType.CONDITIONAL && (\n <ColumnFormatEditor\n columns={columns}\n config={rule?.config}\n onChange={handleRuleChange}\n />\n )}\n {selectedFormatter === FormatterType.ROWS && (\n <RowFormatEditor\n columns={columns}\n config={rule?.config}\n onChange={handleRuleChange}\n />\n )}\n <hr />\n <div className=\"d-flex justify-content-end my-3\">\n <Button kind=\"secondary\" onClick={handleCancel} className=\"mr-2\">\n Cancel\n </Button>\n <Button\n kind=\"primary\"\n onClick={handleSave}\n disabled={rule === undefined || !isValid}\n >\n Done\n </Button>\n </div>\n </div>\n );\n};\n\nexport default ConditionalFormatEditor;\n"],"file":"ConditionalFormatEditor.js"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Column, CustomColumn } from '@deephaven/jsapi-shim';
|
|
2
|
+
import { BaseFormatConfig } from './ConditionalFormattingUtils';
|
|
3
|
+
export declare function makeTernaryFormatRule(config: BaseFormatConfig, prevRule: string): string | undefined;
|
|
4
|
+
export declare function makeRowFormatColumn(rule: string): CustomColumn;
|
|
5
|
+
export declare function makeColumnFormatColumn(col: Column, rule: string): CustomColumn;
|
|
6
|
+
//# sourceMappingURL=ConditionalFormattingAPIUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConditionalFormattingAPIUtils.d.ts","sourceRoot":"","sources":["../../../src/sidebar/conditional-formatting/ConditionalFormattingAPIUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EACL,gBAAgB,EAGjB,MAAM,8BAA8B,CAAC;AAMtC,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,gBAAgB,EACxB,QAAQ,EAAE,MAAM,GACf,MAAM,GAAG,SAAS,CAOpB;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAE9D;AAED,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,GACX,YAAY,CAEd"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { getConditionDBString, getStyleDBString } from "./ConditionalFormattingUtils.js"; // Conditional formatting API utils in a separate file
|
|
2
|
+
// to make ConditionalFormattingUtils.ts easier to test.
|
|
3
|
+
// https://github.com/facebook/jest/issues/936#issuecomment-545080082
|
|
4
|
+
|
|
5
|
+
export function makeTernaryFormatRule(config, prevRule) {
|
|
6
|
+
var styleDBString = getStyleDBString(config);
|
|
7
|
+
|
|
8
|
+
if (styleDBString === undefined) {
|
|
9
|
+
return undefined;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
var conditionDBString = getConditionDBString(config);
|
|
13
|
+
return "".concat(conditionDBString, " ? ").concat(styleDBString, " : ").concat(prevRule);
|
|
14
|
+
}
|
|
15
|
+
export function makeRowFormatColumn(rule) {
|
|
16
|
+
return dh.Column.formatRowColor(rule);
|
|
17
|
+
}
|
|
18
|
+
export function makeColumnFormatColumn(col, rule) {
|
|
19
|
+
return col.formatColor(rule);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=ConditionalFormattingAPIUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/sidebar/conditional-formatting/ConditionalFormattingAPIUtils.ts"],"names":["getConditionDBString","getStyleDBString","makeTernaryFormatRule","config","prevRule","styleDBString","undefined","conditionDBString","makeRowFormatColumn","rule","dh","Column","formatRowColor","makeColumnFormatColumn","col","formatColor"],"mappings":"SAGEA,oB,EACAC,gB,2CAGF;AACA;AACA;;AAEA,OAAO,SAASC,qBAAT,CACLC,MADK,EAELC,QAFK,EAGe;AACpB,MAAMC,aAAa,GAAGJ,gBAAgB,CAACE,MAAD,CAAtC;;AACA,MAAIE,aAAa,KAAKC,SAAtB,EAAiC;AAC/B,WAAOA,SAAP;AACD;;AACD,MAAMC,iBAAiB,GAAGP,oBAAoB,CAACG,MAAD,CAA9C;AACA,mBAAUI,iBAAV,gBAAiCF,aAAjC,gBAAoDD,QAApD;AACD;AAED,OAAO,SAASI,mBAAT,CAA6BC,IAA7B,EAAyD;AAC9D,SAAOC,EAAE,CAACC,MAAH,CAAUC,cAAV,CAAyBH,IAAzB,CAAP;AACD;AAED,OAAO,SAASI,sBAAT,CACLC,GADK,EAELL,IAFK,EAGS;AACd,SAAOK,GAAG,CAACC,WAAJ,CAAgBN,IAAhB,CAAP;AACD","sourcesContent":["import { Column, CustomColumn } from '@deephaven/jsapi-shim';\nimport {\n BaseFormatConfig,\n getConditionDBString,\n getStyleDBString,\n} from './ConditionalFormattingUtils';\n\n// Conditional formatting API utils in a separate file\n// to make ConditionalFormattingUtils.ts easier to test.\n// https://github.com/facebook/jest/issues/936#issuecomment-545080082\n\nexport function makeTernaryFormatRule(\n config: BaseFormatConfig,\n prevRule: string\n): string | undefined {\n const styleDBString = getStyleDBString(config);\n if (styleDBString === undefined) {\n return undefined;\n }\n const conditionDBString = getConditionDBString(config);\n return `${conditionDBString} ? ${styleDBString} : ${prevRule}`;\n}\n\nexport function makeRowFormatColumn(rule: string): CustomColumn {\n return dh.Column.formatRowColor(rule);\n}\n\nexport function makeColumnFormatColumn(\n col: Column,\n rule: string\n): CustomColumn {\n return col.formatColor(rule);\n}\n"],"file":"ConditionalFormattingAPIUtils.js"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
.conditional-formatting-rules {
|
|
2
|
+
padding: 0.25rem;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.conditional-formatting-list-item {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: row;
|
|
8
|
+
margin-bottom: 2px;
|
|
9
|
+
padding: 0 0.25rem;
|
|
10
|
+
}
|
|
11
|
+
.conditional-formatting-list-item:first-child {
|
|
12
|
+
padding-top: 0.25rem;
|
|
13
|
+
}
|
|
14
|
+
.conditional-formatting-list-item .formatting-item {
|
|
15
|
+
border-radius: 4px;
|
|
16
|
+
display: flex;
|
|
17
|
+
padding: 0.25rem;
|
|
18
|
+
flex-grow: 1;
|
|
19
|
+
align-items: center;
|
|
20
|
+
user-select: none;
|
|
21
|
+
transition: color 0.12s ease-in-out, background-color 0.12s ease-in-out, border-color 0.12s ease-in-out, box-shadow 0.12s ease-in-out;
|
|
22
|
+
border: 1px solid transparent;
|
|
23
|
+
line-height: 1.5;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
}
|
|
26
|
+
.conditional-formatting-list-item .formatting-item .btn-drag-handle {
|
|
27
|
+
cursor: grab;
|
|
28
|
+
}
|
|
29
|
+
.conditional-formatting-list-item .formatting-item .rule-icon {
|
|
30
|
+
padding-right: 0.5rem;
|
|
31
|
+
}
|
|
32
|
+
.conditional-formatting-list-item .formatting-item .rule-icon-bg {
|
|
33
|
+
min-width: 2rem;
|
|
34
|
+
height: 2rem;
|
|
35
|
+
display: flex;
|
|
36
|
+
font-size: x-small;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
align-items: center;
|
|
39
|
+
}
|
|
40
|
+
.conditional-formatting-list-item .formatting-item .rule-title {
|
|
41
|
+
overflow-x: hidden;
|
|
42
|
+
text-overflow: ellipsis;
|
|
43
|
+
padding-right: 2px;
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-grow: 1;
|
|
46
|
+
}
|
|
47
|
+
.conditional-formatting-list-item .formatting-item:focus {
|
|
48
|
+
outline: 0;
|
|
49
|
+
border: 1px solid rgba(72, 120, 234, 0.85);
|
|
50
|
+
box-shadow: 0 0 0 0.2rem rgba(72, 120, 234, 0.35);
|
|
51
|
+
}
|
|
52
|
+
.conditional-formatting-list-item .formatting-item:hover {
|
|
53
|
+
background: #5b5a5c;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/*# sourceMappingURL=ConditionalFormattingMenu.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../../src/sidebar/conditional-formatting/ConditionalFormattingMenu.scss","../../../../components/scss/new_variables.scss","../../../../components/scss/bootstrap_overrides.scss","../../../../../node_modules/bootstrap/scss/_variables.scss"],"names":[],"mappings":"AAEA;EACE,SCDS;;;ADIX;EACE;EACA;EACA;EACA;;AAEA;EACE,aCXO;;ADcT;EACE,eEwGY;EFvGZ;EACA,SCjBO;EDkBP;EACA;EACA;EACA,YEyGa;EFxGb;EACA,aG+Q0B;EH9Q1B;;AAEA;EACE;;AAGF;EACE,eC9BK;;ADiCP;EACE;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA,YEsFuB;;AFnFzB;EACE,YEtCK","file":"ConditionalFormattingMenu.css"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import './ConditionalFormattingMenu.scss';
|
|
2
|
+
import { FormattingRule } from './ConditionalFormattingUtils';
|
|
3
|
+
export declare type ChangeCallback = (rules: FormattingRule[]) => void;
|
|
4
|
+
export declare type SelectCallback = (index: number) => void;
|
|
5
|
+
export declare type CreateCallback = () => void;
|
|
6
|
+
export declare type ConditionalFormattingMenuProps = {
|
|
7
|
+
rules: FormattingRule[];
|
|
8
|
+
selectedColumn?: string;
|
|
9
|
+
onChange?: ChangeCallback;
|
|
10
|
+
onCreate?: CreateCallback;
|
|
11
|
+
onSelect?: SelectCallback;
|
|
12
|
+
};
|
|
13
|
+
declare const ConditionalFormattingMenu: (props: ConditionalFormattingMenuProps) => JSX.Element;
|
|
14
|
+
export default ConditionalFormattingMenu;
|
|
15
|
+
//# sourceMappingURL=ConditionalFormattingMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConditionalFormattingMenu.d.ts","sourceRoot":"","sources":["../../../src/sidebar/conditional-formatting/ConditionalFormattingMenu.tsx"],"names":[],"mappings":"AAQA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,EAEL,cAAc,EAQf,MAAM,8BAA8B,CAAC;AAKtC,oBAAY,cAAc,GAAG,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,IAAI,CAAC;AAE/D,oBAAY,cAAc,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;AAErD,oBAAY,cAAc,GAAG,MAAM,IAAI,CAAC;AAExC,oBAAY,8BAA8B,GAAG;IAC3C,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B,CAAC;AAoDF,QAAA,MAAM,yBAAyB,UACtB,8BAA8B,KACpC,WA0JF,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
import React, { useCallback } from 'react';
|
|
4
|
+
import { DragDropContext, Draggable, Droppable } from 'react-beautiful-dnd';
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
7
|
+
import { dhNewCircleLargeFilled, vsGripper, vsTrash } from '@deephaven/icons';
|
|
8
|
+
import { Button, DragUtils, Tooltip } from '@deephaven/components';
|
|
9
|
+
import Log from '@deephaven/log';
|
|
10
|
+
import "./ConditionalFormattingMenu.css";
|
|
11
|
+
import { FormatterType, getBackgroundForStyleConfig, getColorForStyleConfig, getShortLabelForConditionType, NumberCondition, StringCondition, DateCondition } from "./ConditionalFormattingUtils.js";
|
|
12
|
+
import TableUtils from "../../TableUtils.js";
|
|
13
|
+
var log = Log.module('ConditionalFormattingMenu');
|
|
14
|
+
|
|
15
|
+
var DEFAULT_CALLBACK = () => undefined;
|
|
16
|
+
|
|
17
|
+
function getRuleValue(config) {
|
|
18
|
+
var {
|
|
19
|
+
column: {
|
|
20
|
+
type
|
|
21
|
+
}
|
|
22
|
+
} = config;
|
|
23
|
+
|
|
24
|
+
if (TableUtils.isNumberType(type)) {
|
|
25
|
+
return config.condition === NumberCondition.IS_NULL || config.condition === NumberCondition.IS_NOT_NULL ? '' : "".concat(config.value);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (TableUtils.isCharType(type)) {
|
|
29
|
+
return config.condition === DateCondition.IS_NULL || config.condition === DateCondition.IS_NOT_NULL ? '' : "".concat(config.value);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (TableUtils.isTextType(type)) {
|
|
33
|
+
return config.condition === StringCondition.IS_NULL || config.condition === StringCondition.IS_NOT_NULL ? '' : "\"".concat(config.value, "\"");
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (TableUtils.isDateType(type)) {
|
|
37
|
+
return config.condition === DateCondition.IS_NULL || config.condition === DateCondition.IS_NOT_NULL ? '' : "".concat(config.value);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (TableUtils.isBooleanType(type)) {
|
|
41
|
+
return '';
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
throw new Error("Invalid column type ".concat(type, " in getRuleValue"));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function getRuleTitle(config) {
|
|
48
|
+
if (TableUtils.isNumberType(config.column.type) && config.condition === NumberCondition.IS_BETWEEN) {
|
|
49
|
+
return "".concat(config.start, " < ").concat(config.column.name, " < ").concat(config.end);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return "".concat(config.column.name, " ").concat(getShortLabelForConditionType(config.column.type, config.condition), " \n ").concat(getRuleValue(config));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
var ConditionalFormattingMenu = props => {
|
|
56
|
+
var {
|
|
57
|
+
rules = [],
|
|
58
|
+
onChange = DEFAULT_CALLBACK,
|
|
59
|
+
onCreate = DEFAULT_CALLBACK,
|
|
60
|
+
onSelect = DEFAULT_CALLBACK
|
|
61
|
+
} = props;
|
|
62
|
+
var handleRuleClick = useCallback((e, rule, index) => {
|
|
63
|
+
e.stopPropagation();
|
|
64
|
+
log.debug('Rule clicked', rule, index);
|
|
65
|
+
onSelect(index);
|
|
66
|
+
}, [onSelect]);
|
|
67
|
+
var handleDeleteClick = useCallback((e, rule, index) => {
|
|
68
|
+
e.stopPropagation();
|
|
69
|
+
log.debug('Delete button clicked', rule, index);
|
|
70
|
+
var updatedRules = [...rules];
|
|
71
|
+
updatedRules.splice(index, 1);
|
|
72
|
+
onChange(updatedRules);
|
|
73
|
+
}, [onChange, rules]);
|
|
74
|
+
var handleDragHandlerClick = useCallback(e => {
|
|
75
|
+
e.stopPropagation();
|
|
76
|
+
}, []);
|
|
77
|
+
var handleDragEnd = useCallback(result => {
|
|
78
|
+
DragUtils.stopDragging(); // if dropped outside the list
|
|
79
|
+
|
|
80
|
+
if (!result.destination) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
var sourceIndex = result.source.index;
|
|
85
|
+
var destinationIndex = result.destination.index;
|
|
86
|
+
var updatedRules = [...rules];
|
|
87
|
+
var sourceInput = rules[sourceIndex];
|
|
88
|
+
updatedRules.splice(sourceIndex, 1);
|
|
89
|
+
updatedRules.splice(destinationIndex, 0, sourceInput);
|
|
90
|
+
onChange(updatedRules);
|
|
91
|
+
}, [onChange, rules]); // Display list of rules
|
|
92
|
+
|
|
93
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
94
|
+
className: "conditional-formatting-rules"
|
|
95
|
+
}, /*#__PURE__*/React.createElement(DragDropContext, {
|
|
96
|
+
onDragStart: DragUtils.startDragging,
|
|
97
|
+
onDragEnd: handleDragEnd
|
|
98
|
+
}, /*#__PURE__*/React.createElement(Droppable, {
|
|
99
|
+
droppableId: "droppable-custom-columns"
|
|
100
|
+
}, (provided, snapshot) => /*#__PURE__*/React.createElement("div", _extends({
|
|
101
|
+
ref: provided.innerRef // eslint-disable-next-line react/jsx-props-no-spreading
|
|
102
|
+
|
|
103
|
+
}, provided.droppableProps, {
|
|
104
|
+
className: classNames('droppable-container', {
|
|
105
|
+
dragging: snapshot.draggingFromThisWith
|
|
106
|
+
})
|
|
107
|
+
}), rules.length === 0 && /*#__PURE__*/React.createElement("div", {
|
|
108
|
+
className: "text-muted pl-2"
|
|
109
|
+
}, "No formats defined"), rules.map((rule, index) => /*#__PURE__*/React.createElement(Draggable // eslint-disable-next-line react/no-array-index-key
|
|
110
|
+
, {
|
|
111
|
+
key: "".concat(index, "-").concat(rule.type),
|
|
112
|
+
draggableId: "".concat(index, "-").concat(rule.type),
|
|
113
|
+
index: index,
|
|
114
|
+
disableInteractiveElementBlocking: true
|
|
115
|
+
}, // eslint-disable-next-line @typescript-eslint/no-shadow
|
|
116
|
+
(provided, snapshot) => /*#__PURE__*/React.createElement("div", _extends({
|
|
117
|
+
role: "menuitem",
|
|
118
|
+
tabIndex: 0,
|
|
119
|
+
onClick: e => handleRuleClick(e, rule, index),
|
|
120
|
+
className: classNames('draggable-container', {
|
|
121
|
+
dragging: snapshot.isDragging
|
|
122
|
+
}),
|
|
123
|
+
ref: provided.innerRef // eslint-disable-next-line react/jsx-props-no-spreading
|
|
124
|
+
|
|
125
|
+
}, provided.draggableProps), /*#__PURE__*/React.createElement("div", {
|
|
126
|
+
className: "conditional-formatting-list-item"
|
|
127
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
128
|
+
className: "formatting-item"
|
|
129
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
130
|
+
className: "rule-icon"
|
|
131
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
132
|
+
className: "rule-icon-bg",
|
|
133
|
+
style: {
|
|
134
|
+
backgroundColor: getBackgroundForStyleConfig(rule.config.style),
|
|
135
|
+
color: getColorForStyleConfig(rule.config.style)
|
|
136
|
+
}
|
|
137
|
+
}, rule.type === FormatterType.ROWS ? 'row' : 'col')), /*#__PURE__*/React.createElement("div", {
|
|
138
|
+
className: "rule-title"
|
|
139
|
+
}, getRuleTitle(rule.config)), /*#__PURE__*/React.createElement("button", {
|
|
140
|
+
type: "button",
|
|
141
|
+
className: "btn btn-link btn-link-icon ml-1 px-2",
|
|
142
|
+
onClick: e => handleDeleteClick(e, rule, index)
|
|
143
|
+
}, /*#__PURE__*/React.createElement(Tooltip, null, "Delete rule"), /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
144
|
+
icon: vsTrash
|
|
145
|
+
})), /*#__PURE__*/React.createElement("button", _extends({
|
|
146
|
+
type: "button",
|
|
147
|
+
className: "btn btn-link btn-link-icon px-2 btn-drag-handle",
|
|
148
|
+
onClick: handleDragHandlerClick // eslint-disable-next-line react/jsx-props-no-spreading
|
|
149
|
+
|
|
150
|
+
}, provided.dragHandleProps), /*#__PURE__*/React.createElement(Tooltip, null, "Drag to re-order"), /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
151
|
+
icon: vsGripper
|
|
152
|
+
}))))))), provided.placeholder))), /*#__PURE__*/React.createElement("hr", null), /*#__PURE__*/React.createElement(Button, {
|
|
153
|
+
kind: "ghost",
|
|
154
|
+
onClick: onCreate,
|
|
155
|
+
icon: dhNewCircleLargeFilled
|
|
156
|
+
}, "Add New Rule"));
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
export default ConditionalFormattingMenu;
|
|
160
|
+
//# sourceMappingURL=ConditionalFormattingMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/sidebar/conditional-formatting/ConditionalFormattingMenu.tsx"],"names":["React","useCallback","DragDropContext","Draggable","Droppable","classNames","FontAwesomeIcon","dhNewCircleLargeFilled","vsGripper","vsTrash","Button","DragUtils","Tooltip","Log","FormatterType","getBackgroundForStyleConfig","getColorForStyleConfig","getShortLabelForConditionType","NumberCondition","StringCondition","DateCondition","TableUtils","log","module","DEFAULT_CALLBACK","undefined","getRuleValue","config","column","type","isNumberType","condition","IS_NULL","IS_NOT_NULL","value","isCharType","isTextType","isDateType","isBooleanType","Error","getRuleTitle","IS_BETWEEN","start","name","end","ConditionalFormattingMenu","props","rules","onChange","onCreate","onSelect","handleRuleClick","e","rule","index","stopPropagation","debug","handleDeleteClick","updatedRules","splice","handleDragHandlerClick","handleDragEnd","result","stopDragging","destination","sourceIndex","source","destinationIndex","sourceInput","startDragging","provided","snapshot","innerRef","droppableProps","dragging","draggingFromThisWith","length","map","isDragging","draggableProps","backgroundColor","style","color","ROWS","dragHandleProps","placeholder"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,WAAhB,QAAmC,OAAnC;AACA,SAASC,eAAT,EAA0BC,SAA1B,EAAqCC,SAArC,QAAsD,qBAAtD;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,SAASC,sBAAT,EAAiCC,SAAjC,EAA4CC,OAA5C,QAA2D,kBAA3D;AACA,SAASC,MAAT,EAAiBC,SAAjB,EAA4BC,OAA5B,QAA2C,uBAA3C;AACA,OAAOC,GAAP,MAAgB,gBAAhB;;SAMEC,a,EACAC,2B,EACAC,sB,EACAC,6B,EACAC,e,EACAC,e,EACAC,a;OAEKC,U;AAEP,IAAMC,GAAG,GAAGT,GAAG,CAACU,MAAJ,CAAW,2BAAX,CAAZ;;AAgBA,IAAMC,gBAAgB,GAAG,MAAMC,SAA/B;;AAEA,SAASC,YAAT,CAAsBC,MAAtB,EAAwD;AACtD,MAAM;AACJC,IAAAA,MAAM,EAAE;AAAEC,MAAAA;AAAF;AADJ,MAEFF,MAFJ;;AAGA,MAAIN,UAAU,CAACS,YAAX,CAAwBD,IAAxB,CAAJ,EAAmC;AACjC,WAAOF,MAAM,CAACI,SAAP,KAAqBb,eAAe,CAACc,OAArC,IACLL,MAAM,CAACI,SAAP,KAAqBb,eAAe,CAACe,WADhC,GAEH,EAFG,aAGAN,MAAM,CAACO,KAHP,CAAP;AAID;;AACD,MAAIb,UAAU,CAACc,UAAX,CAAsBN,IAAtB,CAAJ,EAAiC;AAC/B,WAAOF,MAAM,CAACI,SAAP,KAAqBX,aAAa,CAACY,OAAnC,IACLL,MAAM,CAACI,SAAP,KAAqBX,aAAa,CAACa,WAD9B,GAEH,EAFG,aAGAN,MAAM,CAACO,KAHP,CAAP;AAID;;AACD,MAA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,CAXH,EAiFG8D,QAAQ,CAACe,WAjFZ,CAFJ,CAJF,CADF,eA6FE,+BA7FF,eA8FE,oBAAC,MAAD;AAAQ,IAAA,IAAI,EAAC,OAAb;AAAqB,IAAA,OAAO,EAAEpC,QAA9B;AAAwC,IAAA,IAAI,EAAE1C;AAA9C,oBA9FF,CADF;AAoGD,CA5JD;;AA8JA,eAAesC,yBAAf","sourcesContent":["import React, { useCallback } from 'react';\nimport { DragDropContext, Draggable, Droppable } from 'react-beautiful-dnd';\nimport classNames from 'classnames';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { dhNewCircleLargeFilled, vsGripper, vsTrash } from '@deephaven/icons';\nimport { Button, DragUtils, Tooltip } from '@deephaven/components';\nimport Log from '@deephaven/log';\n\nimport './ConditionalFormattingMenu.scss';\nimport {\n BaseFormatConfig,\n FormattingRule,\n FormatterType,\n getBackgroundForStyleConfig,\n getColorForStyleConfig,\n getShortLabelForConditionType,\n NumberCondition,\n StringCondition,\n DateCondition,\n} from './ConditionalFormattingUtils';\nimport TableUtils from '../../TableUtils';\n\nconst log = Log.module('ConditionalFormattingMenu');\n\nexport type ChangeCallback = (rules: FormattingRule[]) => void;\n\nexport type SelectCallback = (index: number) => void;\n\nexport type CreateCallback = () => void;\n\nexport type ConditionalFormattingMenuProps = {\n rules: FormattingRule[];\n selectedColumn?: string;\n onChange?: ChangeCallback;\n onCreate?: CreateCallback;\n onSelect?: SelectCallback;\n};\n\nconst DEFAULT_CALLBACK = () => undefined;\n\nfunction getRuleValue(config: BaseFormatConfig): string {\n const {\n column: { type },\n } = config;\n if (TableUtils.isNumberType(type)) {\n return config.condition === NumberCondition.IS_NULL ||\n config.condition === NumberCondition.IS_NOT_NULL\n ? ''\n : `${config.value}`;\n }\n if (TableUtils.isCharType(type)) {\n return config.condition === DateCondition.IS_NULL ||\n config.condition === DateCondition.IS_NOT_NULL\n ? ''\n : `${config.value}`;\n }\n if (TableUtils.isTextType(type)) {\n return config.condition === StringCondition.IS_NULL ||\n config.condition === StringCondition.IS_NOT_NULL\n ? ''\n : `\"${config.value}\"`;\n }\n if (TableUtils.isDateType(type)) {\n return config.condition === DateCondition.IS_NULL ||\n config.condition === DateCondition.IS_NOT_NULL\n ? ''\n : `${config.value}`;\n }\n if (TableUtils.isBooleanType(type)) {\n return '';\n }\n throw new Error(`Invalid column type ${type} in getRuleValue`);\n}\n\nfunction getRuleTitle(config: BaseFormatConfig): string {\n if (\n TableUtils.isNumberType(config.column.type) &&\n config.condition === NumberCondition.IS_BETWEEN\n ) {\n return `${config.start} < ${config.column.name} < ${config.end}`;\n }\n return `${config.column.name} ${getShortLabelForConditionType(\n (config as BaseFormatConfig).column.type,\n (config as BaseFormatConfig).condition\n )} \n ${getRuleValue(config as BaseFormatConfig)}`;\n}\n\nconst ConditionalFormattingMenu = (\n props: ConditionalFormattingMenuProps\n): JSX.Element => {\n const {\n rules = [],\n onChange = DEFAULT_CALLBACK,\n onCreate = DEFAULT_CALLBACK,\n onSelect = DEFAULT_CALLBACK,\n } = props;\n\n const handleRuleClick = useCallback(\n (e, rule, index) => {\n e.stopPropagation();\n log.debug('Rule clicked', rule, index);\n onSelect(index);\n },\n [onSelect]\n );\n\n const handleDeleteClick = useCallback(\n (e, rule, index) => {\n e.stopPropagation();\n log.debug('Delete button clicked', rule, index);\n const updatedRules = [...rules];\n updatedRules.splice(index, 1);\n onChange(updatedRules);\n },\n [onChange, rules]\n );\n\n const handleDragHandlerClick = useCallback(e => {\n e.stopPropagation();\n }, []);\n\n const handleDragEnd = useCallback(\n result => {\n DragUtils.stopDragging();\n\n // if dropped outside the list\n if (!result.destination) {\n return;\n }\n const sourceIndex = result.source.index;\n const destinationIndex = result.destination.index;\n const updatedRules = [...rules];\n const sourceInput = rules[sourceIndex];\n\n updatedRules.splice(sourceIndex, 1);\n updatedRules.splice(destinationIndex, 0, sourceInput);\n\n onChange(updatedRules);\n },\n [onChange, rules]\n );\n\n // Display list of rules\n return (\n <div className=\"conditional-formatting-rules\">\n <DragDropContext\n onDragStart={DragUtils.startDragging}\n onDragEnd={handleDragEnd}\n >\n <Droppable droppableId=\"droppable-custom-columns\">\n {(provided, snapshot) => (\n <div\n ref={provided.innerRef}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...provided.droppableProps}\n className={classNames('droppable-container', {\n dragging: snapshot.draggingFromThisWith,\n })}\n >\n {rules.length === 0 && (\n <div className=\"text-muted pl-2\">No formats defined</div>\n )}\n {rules.map((rule, index) => (\n <Draggable\n // eslint-disable-next-line react/no-array-index-key\n key={`${index}-${rule.type}`}\n draggableId={`${index}-${rule.type}`}\n index={index}\n disableInteractiveElementBlocking\n >\n {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n (provided, snapshot) => (\n <div\n role=\"menuitem\"\n tabIndex={0}\n onClick={e => handleRuleClick(e, rule, index)}\n className={classNames('draggable-container', {\n dragging: snapshot.isDragging,\n })}\n ref={provided.innerRef}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...provided.draggableProps}\n >\n <div className=\"conditional-formatting-list-item\">\n <div className=\"formatting-item\">\n <div className=\"rule-icon\">\n <span\n className=\"rule-icon-bg\"\n style={{\n backgroundColor: getBackgroundForStyleConfig(\n (rule.config as BaseFormatConfig).style\n ),\n color: getColorForStyleConfig(\n (rule.config as BaseFormatConfig).style\n ),\n }}\n >\n {rule.type === FormatterType.ROWS\n ? 'row'\n : 'col'}\n </span>\n </div>\n <div className=\"rule-title\">\n {getRuleTitle(rule.config as BaseFormatConfig)}\n </div>\n <button\n type=\"button\"\n className=\"btn btn-link btn-link-icon ml-1 px-2\"\n onClick={e => handleDeleteClick(e, rule, index)}\n >\n <Tooltip>Delete rule</Tooltip>\n <FontAwesomeIcon icon={vsTrash} />\n </button>\n\n <button\n type=\"button\"\n className=\"btn btn-link btn-link-icon px-2 btn-drag-handle\"\n onClick={handleDragHandlerClick}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...provided.dragHandleProps}\n >\n <Tooltip>Drag to re-order</Tooltip>\n <FontAwesomeIcon icon={vsGripper} />\n </button>\n </div>\n </div>\n </div>\n )\n }\n </Draggable>\n ))}\n {provided.placeholder}\n </div>\n )}\n </Droppable>\n </DragDropContext>\n <hr />\n <Button kind=\"ghost\" onClick={onCreate} icon={dhNewCircleLargeFilled}>\n Add New Rule\n </Button>\n </div>\n );\n};\n\nexport default ConditionalFormattingMenu;\n"],"file":"ConditionalFormattingMenu.js"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { Column, CustomColumn } from '@deephaven/jsapi-shim';
|
|
2
|
+
export declare type ModelColumn = {
|
|
3
|
+
name: string;
|
|
4
|
+
type: string;
|
|
5
|
+
};
|
|
6
|
+
export declare type Condition = NumberCondition | StringCondition | DateCondition | BooleanCondition | CharCondition;
|
|
7
|
+
export interface BaseFormatConfig {
|
|
8
|
+
column: ModelColumn;
|
|
9
|
+
condition: Condition;
|
|
10
|
+
value?: string;
|
|
11
|
+
start?: string;
|
|
12
|
+
end?: string;
|
|
13
|
+
style: FormatStyleConfig;
|
|
14
|
+
}
|
|
15
|
+
export interface ConditionConfig {
|
|
16
|
+
condition: Condition;
|
|
17
|
+
value?: string;
|
|
18
|
+
start?: string;
|
|
19
|
+
end?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare type ChangeCallback = (ruleConfig: BaseFormatConfig, isValid: boolean) => void;
|
|
22
|
+
export declare enum FormatterType {
|
|
23
|
+
CONDITIONAL = "conditional",
|
|
24
|
+
ROWS = "rows"
|
|
25
|
+
}
|
|
26
|
+
export interface FormattingRule {
|
|
27
|
+
type: FormatterType;
|
|
28
|
+
config: BaseFormatConfig;
|
|
29
|
+
}
|
|
30
|
+
export declare enum NumberCondition {
|
|
31
|
+
IS_EQUAL = "is-equal",
|
|
32
|
+
IS_NOT_EQUAL = "is-not-equal",
|
|
33
|
+
IS_BETWEEN = "is-between",
|
|
34
|
+
GREATER_THAN = "greater-than",
|
|
35
|
+
GREATER_THAN_OR_EQUAL = "greater-than-or-equal",
|
|
36
|
+
LESS_THAN = "less-than",
|
|
37
|
+
LESS_THAN_OR_EQUAL = "less-than-or-equal",
|
|
38
|
+
IS_NULL = "is-null",
|
|
39
|
+
IS_NOT_NULL = "is-not-null"
|
|
40
|
+
}
|
|
41
|
+
export declare enum StringCondition {
|
|
42
|
+
IS_EXACTLY = "is-exactly",
|
|
43
|
+
IS_NOT_EXACTLY = "is-not-exactly",
|
|
44
|
+
CONTAINS = "contains",
|
|
45
|
+
DOES_NOT_CONTAIN = "does-not-contain",
|
|
46
|
+
STARTS_WITH = "starts-with",
|
|
47
|
+
ENDS_WITH = "ends-with",
|
|
48
|
+
IS_NULL = "is-null",
|
|
49
|
+
IS_NOT_NULL = "is-not-null"
|
|
50
|
+
}
|
|
51
|
+
export declare enum DateCondition {
|
|
52
|
+
IS_EXACTLY = "is-exactly",
|
|
53
|
+
IS_NOT_EXACTLY = "is-not-exactly",
|
|
54
|
+
IS_BEFORE = "is-before",
|
|
55
|
+
IS_BEFORE_OR_EQUAL = "is-before-or-equal",
|
|
56
|
+
IS_AFTER = "is-after",
|
|
57
|
+
IS_AFTER_OR_EQUAL = "is-after-or-equal",
|
|
58
|
+
IS_NULL = "is-null",
|
|
59
|
+
IS_NOT_NULL = "is-not-null"
|
|
60
|
+
}
|
|
61
|
+
export declare enum BooleanCondition {
|
|
62
|
+
IS_TRUE = "is-true",
|
|
63
|
+
IS_FALSE = "is-false",
|
|
64
|
+
IS_NULL = "is-null",
|
|
65
|
+
IS_NOT_NULL = "is-not-null"
|
|
66
|
+
}
|
|
67
|
+
export declare enum CharCondition {
|
|
68
|
+
IS_EQUAL = "is-equal",
|
|
69
|
+
IS_NOT_EQUAL = "is-not-equal",
|
|
70
|
+
IS_NULL = "is-null",
|
|
71
|
+
IS_NOT_NULL = "is-not-null"
|
|
72
|
+
}
|
|
73
|
+
export declare enum FormatStyleType {
|
|
74
|
+
NO_FORMATTING = "no-formatting",
|
|
75
|
+
POSITIVE = "positive",
|
|
76
|
+
NEGATIVE = "negative",
|
|
77
|
+
WARN = "warn",
|
|
78
|
+
NEUTRAL = "neutral",
|
|
79
|
+
ACCENT_1 = "accent-1",
|
|
80
|
+
ACCENT_2 = "accent-2",
|
|
81
|
+
CUSTOM = "custom"
|
|
82
|
+
}
|
|
83
|
+
export interface FormatStyleConfig {
|
|
84
|
+
type: FormatStyleType;
|
|
85
|
+
customConfig?: {
|
|
86
|
+
color: string;
|
|
87
|
+
background: string;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
export declare function getLabelForStyleType(option: FormatStyleType): string;
|
|
91
|
+
export declare function getBackgroundForStyleConfig(config: FormatStyleConfig): string | undefined;
|
|
92
|
+
export declare function getColorForStyleConfig(config: FormatStyleConfig): string | undefined;
|
|
93
|
+
export declare function getStyleDBString(config: BaseFormatConfig): string | undefined;
|
|
94
|
+
export declare function getConditionDBString(config: BaseFormatConfig): string;
|
|
95
|
+
export declare function getLabelForNumberCondition(condition: NumberCondition): string;
|
|
96
|
+
export declare function getLabelForStringCondition(condition: StringCondition): string;
|
|
97
|
+
export declare function getLabelForDateCondition(condition: DateCondition): string;
|
|
98
|
+
export declare function getLabelForBooleanCondition(condition: BooleanCondition): string;
|
|
99
|
+
export declare function getLabelForCharCondition(condition: CharCondition): string;
|
|
100
|
+
export declare function getDefaultConditionForType(columnType: string): Condition;
|
|
101
|
+
export declare function getDefaultValueForType(columnType: string): string | undefined;
|
|
102
|
+
export declare function getConditionConfig(config: BaseFormatConfig): ConditionConfig;
|
|
103
|
+
export declare function getDefaultConditionConfigForType(type: string): ConditionConfig;
|
|
104
|
+
export declare function getDefaultStyleConfig(): FormatStyleConfig;
|
|
105
|
+
export declare function getShortLabelForNumberCondition(condition: NumberCondition): string;
|
|
106
|
+
export declare function getTextForNumberCondition(columnName: string, condition: NumberCondition, value: unknown, start: unknown, end: unknown): string;
|
|
107
|
+
export declare function getTextForStringCondition(columnName: string, condition: StringCondition, value: unknown): string;
|
|
108
|
+
export declare function getTextForDateCondition(columnName: string, condition: DateCondition, value: unknown): string;
|
|
109
|
+
export declare function getTextForBooleanCondition(columnName: string, condition: BooleanCondition): string;
|
|
110
|
+
export declare function getTextForCharCondition(columnName: string, condition: CharCondition, value: unknown): string;
|
|
111
|
+
export declare function getShortLabelForConditionType(columnType: string, condition: Condition): string;
|
|
112
|
+
/**
|
|
113
|
+
* Get format columns array for the given columns and formatting rules
|
|
114
|
+
* @param columns Available columns
|
|
115
|
+
* @param rules Formatting rules to build the format columns from
|
|
116
|
+
* @returns Array of format columns
|
|
117
|
+
*/
|
|
118
|
+
export declare function getFormatColumns(columns: Column[], rules: FormattingRule[]): CustomColumn[];
|
|
119
|
+
//# sourceMappingURL=ConditionalFormattingUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConditionalFormattingUtils.d.ts","sourceRoot":"","sources":["../../../src/sidebar/conditional-formatting/ConditionalFormattingUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAU7D,oBAAY,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,SAAS,GACjB,eAAe,GACf,eAAe,GACf,aAAa,GACb,gBAAgB,GAChB,aAAa,CAAC;AAElB,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,iBAAiB,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;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