@deephaven/js-plugin-plotly-express 0.3.0 → 0.3.1-docs-snapshots.21
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/index.js +427 -433
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -8,7 +8,6 @@ var __publicField = (obj, key, value2) => {
|
|
|
8
8
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
9
9
|
const React = require("react");
|
|
10
10
|
const reactRedux = require("react-redux");
|
|
11
|
-
const jsapiBootstrap = require("@deephaven/jsapi-bootstrap");
|
|
12
11
|
const ReactDOM = require("react-dom");
|
|
13
12
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
14
13
|
function getDefaultExportFromCjs(x) {
|
|
@@ -4115,7 +4114,7 @@ function _toPrimitive$D(input, hint) {
|
|
|
4115
4114
|
}
|
|
4116
4115
|
return (hint === "string" ? String : Number)(input);
|
|
4117
4116
|
}
|
|
4118
|
-
var log$
|
|
4117
|
+
var log$k = Log$1.module("LayoutUtils");
|
|
4119
4118
|
function isComponentConfig$1(config2) {
|
|
4120
4119
|
return config2.componentName !== void 0;
|
|
4121
4120
|
}
|
|
@@ -4133,7 +4132,7 @@ let LayoutUtils$1 = class LayoutUtils {
|
|
|
4133
4132
|
static activateTab(root2, config2) {
|
|
4134
4133
|
var stack = LayoutUtils.getStackForRoot(root2, config2, false);
|
|
4135
4134
|
if (!stack) {
|
|
4136
|
-
log$
|
|
4135
|
+
log$k.error("Could not find stack for config", config2);
|
|
4137
4136
|
return;
|
|
4138
4137
|
}
|
|
4139
4138
|
var contentItem = LayoutUtils.getContentItemInStack(stack, config2);
|
|
@@ -4150,7 +4149,7 @@ let LayoutUtils$1 = class LayoutUtils {
|
|
|
4150
4149
|
static isActiveTab(root2, config2) {
|
|
4151
4150
|
var stack = LayoutUtils.getStackForRoot(root2, config2, false);
|
|
4152
4151
|
if (!stack) {
|
|
4153
|
-
log$
|
|
4152
|
+
log$k.error("Could not find stack for config", config2);
|
|
4154
4153
|
return false;
|
|
4155
4154
|
}
|
|
4156
4155
|
var contentItem = LayoutUtils.getContentItemInStack(stack, config2);
|
|
@@ -4320,7 +4319,7 @@ let LayoutUtils$1 = class LayoutUtils {
|
|
|
4320
4319
|
if (dehydratedComponent != null) {
|
|
4321
4320
|
dehydratedConfig.push(dehydratedComponent);
|
|
4322
4321
|
} else {
|
|
4323
|
-
log$
|
|
4322
|
+
log$k.debug2('dehydrateLayoutConfig: skipping unmapped component "'.concat(component, '"'));
|
|
4324
4323
|
}
|
|
4325
4324
|
} else if (content) {
|
|
4326
4325
|
var layoutItemConfig = _objectSpread$e(_objectSpread$e({}, itemConfig), {}, {
|
|
@@ -4420,7 +4419,7 @@ let LayoutUtils$1 = class LayoutUtils {
|
|
|
4420
4419
|
} else if (itemConfig.content !== void 0) {
|
|
4421
4420
|
var contentConfig = LayoutUtils.hydrateLayoutConfig(itemConfig.content, hydrateComponent);
|
|
4422
4421
|
if (isStackItemConfig$1(itemConfig) && itemConfig.activeItemIndex != null && itemConfig.activeItemIndex >= contentConfig.length) {
|
|
4423
|
-
log$
|
|
4422
|
+
log$k.warn("Fixing bad activeItemIndex!", itemConfig.activeItemIndex, itemConfig);
|
|
4424
4423
|
itemConfig.activeItemIndex = 0;
|
|
4425
4424
|
}
|
|
4426
4425
|
hydratedConfig.push(_objectSpread$e(_objectSpread$e({}, itemConfig), {}, {
|
|
@@ -4473,7 +4472,7 @@ let LayoutUtils$1 = class LayoutUtils {
|
|
|
4473
4472
|
var oldContentItem = LayoutUtils.getContentItemInStack(stack, searchConfig);
|
|
4474
4473
|
if (focusElement != null) {
|
|
4475
4474
|
var onComponentCreated = (event) => {
|
|
4476
|
-
log$
|
|
4475
|
+
log$k.debug("Component created, focusing element", focusElement);
|
|
4477
4476
|
stack.off("componentCreated", onComponentCreated);
|
|
4478
4477
|
var {
|
|
4479
4478
|
element
|
|
@@ -4530,7 +4529,7 @@ let LayoutUtils$1 = class LayoutUtils {
|
|
|
4530
4529
|
static closeComponent(root2, config2, closeOptions) {
|
|
4531
4530
|
var stack = LayoutUtils.getStackForRoot(root2, config2, false, false, false);
|
|
4532
4531
|
if (!stack) {
|
|
4533
|
-
log$
|
|
4532
|
+
log$k.warn("Cannot find stack for component, ignoring close", config2);
|
|
4534
4533
|
return;
|
|
4535
4534
|
}
|
|
4536
4535
|
var oldContentItem = LayoutUtils.getContentItemInStack(stack, config2);
|
|
@@ -4549,7 +4548,7 @@ let LayoutUtils$1 = class LayoutUtils {
|
|
|
4549
4548
|
static renameComponent(root2, config2, newTitle) {
|
|
4550
4549
|
var stack = LayoutUtils.getStackForRoot(root2, config2, false);
|
|
4551
4550
|
if (!stack) {
|
|
4552
|
-
log$
|
|
4551
|
+
log$k.error("Could not find stack for config", config2);
|
|
4553
4552
|
return;
|
|
4554
4553
|
}
|
|
4555
4554
|
var contentItem = LayoutUtils.getContentItemInStack(stack, config2);
|
|
@@ -4566,7 +4565,7 @@ let LayoutUtils$1 = class LayoutUtils {
|
|
|
4566
4565
|
static cloneComponent(root2, config2) {
|
|
4567
4566
|
var stack = LayoutUtils.getStackForRoot(root2, config2, false);
|
|
4568
4567
|
if (!stack) {
|
|
4569
|
-
log$
|
|
4568
|
+
log$k.error("Could not find stack for config", config2);
|
|
4570
4569
|
return null;
|
|
4571
4570
|
}
|
|
4572
4571
|
var {
|
|
@@ -4813,6 +4812,14 @@ var factoryWithThrowingShims = function() {
|
|
|
4813
4812
|
{
|
|
4814
4813
|
propTypes.exports = factoryWithThrowingShims();
|
|
4815
4814
|
}
|
|
4815
|
+
function useContextOrThrow(context2) {
|
|
4816
|
+
var message = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "No value available in context. Was code wrapped in a provider?";
|
|
4817
|
+
var value2 = React.useContext(context2);
|
|
4818
|
+
if (value2 == null) {
|
|
4819
|
+
throw new Error(message);
|
|
4820
|
+
}
|
|
4821
|
+
return value2;
|
|
4822
|
+
}
|
|
4816
4823
|
var EMPTY_ARRAY$1 = Object.freeze([]);
|
|
4817
4824
|
var EMPTY_MAP$2 = /* @__PURE__ */ new Map();
|
|
4818
4825
|
function _defineProperty$E(obj, key, value2) {
|
|
@@ -5136,14 +5143,14 @@ class TextUtils {
|
|
|
5136
5143
|
}
|
|
5137
5144
|
const TextUtils$1 = TextUtils;
|
|
5138
5145
|
var TIMEOUT_DELAY = 3500;
|
|
5139
|
-
var log$
|
|
5146
|
+
var log$j = Log$1.module("useCopyToClipboard");
|
|
5140
5147
|
function useCopyToClipboard() {
|
|
5141
5148
|
var [copied, setCopied] = React.useState(false);
|
|
5142
5149
|
var copiedTimeout = React.useRef(null);
|
|
5143
5150
|
var copy2 = React.useCallback((value2) => {
|
|
5144
5151
|
copyToClipboard(value2).then(() => {
|
|
5145
5152
|
setCopied(true);
|
|
5146
|
-
}).catch((e) => log$
|
|
5153
|
+
}).catch((e) => log$j.error("Unable to copy ".concat(value2), "\n", e));
|
|
5147
5154
|
}, []);
|
|
5148
5155
|
React.useEffect(() => {
|
|
5149
5156
|
if (copiedTimeout.current)
|
|
@@ -5237,7 +5244,7 @@ function _toPrimitive$z(input, hint) {
|
|
|
5237
5244
|
}
|
|
5238
5245
|
return (hint === "string" ? String : Number)(input);
|
|
5239
5246
|
}
|
|
5240
|
-
var log$
|
|
5247
|
+
var log$i = Log$1.module("PanelManager");
|
|
5241
5248
|
let PanelManager$1 = class PanelManager {
|
|
5242
5249
|
/**
|
|
5243
5250
|
* @param layout The GoldenLayout object to attach to
|
|
@@ -5346,28 +5353,28 @@ let PanelManager$1 = class PanelManager {
|
|
|
5346
5353
|
updatePanel(panel) {
|
|
5347
5354
|
var panelId = LayoutUtils$1.getIdFromPanel(panel);
|
|
5348
5355
|
if (panelId == null) {
|
|
5349
|
-
log$
|
|
5356
|
+
log$i.error("updatePanel Panel did not have an ID", panel);
|
|
5350
5357
|
return;
|
|
5351
5358
|
}
|
|
5352
|
-
log$
|
|
5359
|
+
log$i.debug2("Updating panel ID ".concat(panelId, " in open panels map"));
|
|
5353
5360
|
this.openedMap.delete(panelId);
|
|
5354
5361
|
this.openedMap.set(panelId, panel);
|
|
5355
5362
|
}
|
|
5356
5363
|
removePanel(panel) {
|
|
5357
5364
|
var panelId = LayoutUtils$1.getIdFromPanel(panel);
|
|
5358
5365
|
if (panelId == null) {
|
|
5359
|
-
log$
|
|
5366
|
+
log$i.error("removePanel Panel did not have an ID", panel);
|
|
5360
5367
|
return;
|
|
5361
5368
|
}
|
|
5362
5369
|
if (!this.openedMap.has(panelId)) {
|
|
5363
|
-
log$
|
|
5370
|
+
log$i.error("Missing panel ID ".concat(panelId, " in open panels map"));
|
|
5364
5371
|
return;
|
|
5365
5372
|
}
|
|
5366
5373
|
if (this.openedMap.get(panelId) !== panel) {
|
|
5367
|
-
log$
|
|
5374
|
+
log$i.debug("Panel argument doesn't match the open panels map entry for ".concat(panelId, ", removePanel ignored"));
|
|
5368
5375
|
return;
|
|
5369
5376
|
}
|
|
5370
|
-
log$
|
|
5377
|
+
log$i.debug2("Removing panel ID ".concat(panelId, " from open panels map"));
|
|
5371
5378
|
this.openedMap.delete(panelId);
|
|
5372
5379
|
}
|
|
5373
5380
|
removeClosedPanelConfig(panelConfig) {
|
|
@@ -5377,16 +5384,16 @@ let PanelManager$1 = class PanelManager {
|
|
|
5377
5384
|
}
|
|
5378
5385
|
}
|
|
5379
5386
|
handleFocus(panel) {
|
|
5380
|
-
log$
|
|
5387
|
+
log$i.debug2("Focus: ", panel);
|
|
5381
5388
|
this.updatePanel(panel);
|
|
5382
5389
|
}
|
|
5383
5390
|
handleMount(panel) {
|
|
5384
|
-
log$
|
|
5391
|
+
log$i.debug2("Mount: ", panel);
|
|
5385
5392
|
this.updatePanel(panel);
|
|
5386
5393
|
this.sendUpdate();
|
|
5387
5394
|
}
|
|
5388
5395
|
handleUnmount(panel) {
|
|
5389
|
-
log$
|
|
5396
|
+
log$i.debug2("Unmount: ", panel);
|
|
5390
5397
|
this.removePanel(panel);
|
|
5391
5398
|
this.sendUpdate();
|
|
5392
5399
|
}
|
|
@@ -5396,7 +5403,7 @@ let PanelManager$1 = class PanelManager {
|
|
|
5396
5403
|
* @param replaceConfig The config to place
|
|
5397
5404
|
*/
|
|
5398
5405
|
handleReopen(panelConfig, replaceConfig) {
|
|
5399
|
-
log$
|
|
5406
|
+
log$i.debug2("Reopen:", panelConfig, replaceConfig);
|
|
5400
5407
|
this.removeClosedPanelConfig(panelConfig);
|
|
5401
5408
|
var {
|
|
5402
5409
|
component
|
|
@@ -5418,12 +5425,12 @@ let PanelManager$1 = class PanelManager {
|
|
|
5418
5425
|
});
|
|
5419
5426
|
}
|
|
5420
5427
|
handleDeleted(panelConfig) {
|
|
5421
|
-
log$
|
|
5428
|
+
log$i.debug2("Deleted:", panelConfig);
|
|
5422
5429
|
this.removeClosedPanelConfig(panelConfig);
|
|
5423
5430
|
this.sendUpdate();
|
|
5424
5431
|
}
|
|
5425
5432
|
handleClosed(panelId, glContainer) {
|
|
5426
|
-
log$
|
|
5433
|
+
log$i.debug2("Closed: ", panelId);
|
|
5427
5434
|
this.addClosedPanel(glContainer);
|
|
5428
5435
|
this.sendUpdate();
|
|
5429
5436
|
}
|
|
@@ -11099,7 +11106,7 @@ try {
|
|
|
11099
11106
|
PRODUCTION = true;
|
|
11100
11107
|
} catch (e) {
|
|
11101
11108
|
}
|
|
11102
|
-
function log$
|
|
11109
|
+
function log$h() {
|
|
11103
11110
|
if (!PRODUCTION && console && typeof console.error === "function") {
|
|
11104
11111
|
var _console;
|
|
11105
11112
|
(_console = console).error.apply(_console, arguments);
|
|
@@ -11147,7 +11154,7 @@ var FontAwesomeIcon = /* @__PURE__ */ React.forwardRef(function(props, ref2) {
|
|
|
11147
11154
|
maskId
|
|
11148
11155
|
}));
|
|
11149
11156
|
if (!renderedIcon) {
|
|
11150
|
-
log$
|
|
11157
|
+
log$h("Could not find icon", iconLookup);
|
|
11151
11158
|
return null;
|
|
11152
11159
|
}
|
|
11153
11160
|
var abstract = renderedIcon.abstract;
|
|
@@ -97612,7 +97619,7 @@ class TableColumnFormatter {
|
|
|
97612
97619
|
* @param format Format object
|
|
97613
97620
|
* @returns true for valid object
|
|
97614
97621
|
*/
|
|
97615
|
-
static isValid(
|
|
97622
|
+
static isValid(dh, format2) {
|
|
97616
97623
|
return true;
|
|
97617
97624
|
}
|
|
97618
97625
|
/**
|
|
@@ -97697,7 +97704,7 @@ function _toPrimitive$v(input, hint) {
|
|
|
97697
97704
|
}
|
|
97698
97705
|
return (hint === "string" ? String : Number)(input);
|
|
97699
97706
|
}
|
|
97700
|
-
var log$
|
|
97707
|
+
var log$g = Log$1.module("DateTimeColumnFormatter");
|
|
97701
97708
|
class DateTimeColumnFormatter extends TableColumnFormatter$1 {
|
|
97702
97709
|
/**
|
|
97703
97710
|
* Validates format object
|
|
@@ -97705,9 +97712,9 @@ class DateTimeColumnFormatter extends TableColumnFormatter$1 {
|
|
|
97705
97712
|
* @param format Format object
|
|
97706
97713
|
* @returns true for valid object
|
|
97707
97714
|
*/
|
|
97708
|
-
static isValid(
|
|
97715
|
+
static isValid(dh, format2) {
|
|
97709
97716
|
try {
|
|
97710
|
-
|
|
97717
|
+
dh.i18n.DateTimeFormat.format(format2.formatString, new Date());
|
|
97711
97718
|
return true;
|
|
97712
97719
|
} catch (e) {
|
|
97713
97720
|
return false;
|
|
@@ -97748,7 +97755,7 @@ class DateTimeColumnFormatter extends TableColumnFormatter$1 {
|
|
|
97748
97755
|
var formatStringMap = DateTimeColumnFormatter.makeFormatStringMap(showTimeZone, showTSeparator);
|
|
97749
97756
|
return [...formatStringMap.keys()];
|
|
97750
97757
|
}
|
|
97751
|
-
constructor(
|
|
97758
|
+
constructor(dh) {
|
|
97752
97759
|
var {
|
|
97753
97760
|
timeZone: timeZoneParam = "",
|
|
97754
97761
|
showTimeZone = true,
|
|
@@ -97764,12 +97771,12 @@ class DateTimeColumnFormatter extends TableColumnFormatter$1 {
|
|
|
97764
97771
|
_defineProperty$v(this, "formatStringMap", void 0);
|
|
97765
97772
|
var timeZone = timeZoneParam || DateTimeColumnFormatter.DEFAULT_TIME_ZONE_ID;
|
|
97766
97773
|
try {
|
|
97767
|
-
this.dhTimeZone =
|
|
97774
|
+
this.dhTimeZone = dh.i18n.TimeZone.getTimeZone(timeZone);
|
|
97768
97775
|
} catch (e) {
|
|
97769
|
-
log$
|
|
97770
|
-
this.dhTimeZone =
|
|
97776
|
+
log$g.error("Unsupported time zone id", timeZone);
|
|
97777
|
+
this.dhTimeZone = dh.i18n.TimeZone.getTimeZone(DateTimeColumnFormatter.DEFAULT_TIME_ZONE_ID);
|
|
97771
97778
|
}
|
|
97772
|
-
this.dh =
|
|
97779
|
+
this.dh = dh;
|
|
97773
97780
|
this.defaultDateTimeFormatString = defaultDateTimeFormatString;
|
|
97774
97781
|
this.showTimeZone = showTimeZone;
|
|
97775
97782
|
this.showTSeparator = showTSeparator;
|
|
@@ -97786,7 +97793,7 @@ class DateTimeColumnFormatter extends TableColumnFormatter$1 {
|
|
|
97786
97793
|
try {
|
|
97787
97794
|
return this.dh.i18n.DateTimeFormat.format(formatString, value2, this.dhTimeZone);
|
|
97788
97795
|
} catch (e) {
|
|
97789
|
-
log$
|
|
97796
|
+
log$g.error("Invalid format arguments");
|
|
97790
97797
|
}
|
|
97791
97798
|
return "";
|
|
97792
97799
|
}
|
|
@@ -97818,7 +97825,7 @@ function _toPrimitive$u(input, hint) {
|
|
|
97818
97825
|
}
|
|
97819
97826
|
return (hint === "string" ? String : Number)(input);
|
|
97820
97827
|
}
|
|
97821
|
-
var log$
|
|
97828
|
+
var log$f = Log$1.module("DecimalColumnFormatter");
|
|
97822
97829
|
class DecimalColumnFormatter extends TableColumnFormatter$1 {
|
|
97823
97830
|
/**
|
|
97824
97831
|
* Validates format object
|
|
@@ -97826,9 +97833,9 @@ class DecimalColumnFormatter extends TableColumnFormatter$1 {
|
|
|
97826
97833
|
* @param format Format object
|
|
97827
97834
|
* @returns true for valid object
|
|
97828
97835
|
*/
|
|
97829
|
-
static isValid(
|
|
97836
|
+
static isValid(dh, format2) {
|
|
97830
97837
|
try {
|
|
97831
|
-
|
|
97838
|
+
dh.i18n.NumberFormat.format(format2.formatString, 0);
|
|
97832
97839
|
return true;
|
|
97833
97840
|
} catch (e) {
|
|
97834
97841
|
return false;
|
|
@@ -97884,14 +97891,14 @@ class DecimalColumnFormatter extends TableColumnFormatter$1 {
|
|
|
97884
97891
|
static isSameFormat(formatA, formatB) {
|
|
97885
97892
|
return formatA === formatB || formatA != null && formatB != null && formatA.type === formatB.type && formatA.formatString === formatB.formatString && formatA.multiplier === formatB.multiplier;
|
|
97886
97893
|
}
|
|
97887
|
-
constructor(
|
|
97894
|
+
constructor(dh) {
|
|
97888
97895
|
var {
|
|
97889
97896
|
defaultFormatString = DecimalColumnFormatter.DEFAULT_FORMAT_STRING
|
|
97890
97897
|
} = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
97891
97898
|
super();
|
|
97892
97899
|
_defineProperty$u(this, "defaultFormatString", void 0);
|
|
97893
97900
|
_defineProperty$u(this, "dh", void 0);
|
|
97894
|
-
this.dh =
|
|
97901
|
+
this.dh = dh;
|
|
97895
97902
|
this.defaultFormatString = defaultFormatString;
|
|
97896
97903
|
}
|
|
97897
97904
|
/**
|
|
@@ -97907,7 +97914,7 @@ class DecimalColumnFormatter extends TableColumnFormatter$1 {
|
|
|
97907
97914
|
try {
|
|
97908
97915
|
return this.dh.i18n.NumberFormat.format(formatString, value2);
|
|
97909
97916
|
} catch (e) {
|
|
97910
|
-
log$
|
|
97917
|
+
log$f.error("Invalid format arguments");
|
|
97911
97918
|
}
|
|
97912
97919
|
return "";
|
|
97913
97920
|
}
|
|
@@ -97951,7 +97958,7 @@ function _toPrimitive$t(input, hint) {
|
|
|
97951
97958
|
}
|
|
97952
97959
|
return (hint === "string" ? String : Number)(input);
|
|
97953
97960
|
}
|
|
97954
|
-
var log$
|
|
97961
|
+
var log$e = Log$1.module("IntegerColumnFormatter");
|
|
97955
97962
|
class IntegerColumnFormatter extends TableColumnFormatter$1 {
|
|
97956
97963
|
/**
|
|
97957
97964
|
* Validates format object
|
|
@@ -97959,9 +97966,9 @@ class IntegerColumnFormatter extends TableColumnFormatter$1 {
|
|
|
97959
97966
|
* @param format Format object
|
|
97960
97967
|
* @returns true for valid object
|
|
97961
97968
|
*/
|
|
97962
|
-
static isValid(
|
|
97969
|
+
static isValid(dh, format2) {
|
|
97963
97970
|
try {
|
|
97964
|
-
|
|
97971
|
+
dh.i18n.NumberFormat.format(format2.formatString, 0);
|
|
97965
97972
|
return true;
|
|
97966
97973
|
} catch (e) {
|
|
97967
97974
|
return false;
|
|
@@ -98017,14 +98024,14 @@ class IntegerColumnFormatter extends TableColumnFormatter$1 {
|
|
|
98017
98024
|
static isSameFormat(formatA, formatB) {
|
|
98018
98025
|
return formatA === formatB || formatA != null && formatB != null && formatA.type === formatB.type && formatA.formatString === formatB.formatString && formatA.multiplier === formatB.multiplier;
|
|
98019
98026
|
}
|
|
98020
|
-
constructor(
|
|
98027
|
+
constructor(dh) {
|
|
98021
98028
|
var {
|
|
98022
98029
|
defaultFormatString = IntegerColumnFormatter.DEFAULT_FORMAT_STRING
|
|
98023
98030
|
} = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
98024
98031
|
super();
|
|
98025
98032
|
_defineProperty$t(this, "dh", void 0);
|
|
98026
98033
|
_defineProperty$t(this, "defaultFormatString", void 0);
|
|
98027
|
-
this.dh =
|
|
98034
|
+
this.dh = dh;
|
|
98028
98035
|
this.defaultFormatString = defaultFormatString;
|
|
98029
98036
|
}
|
|
98030
98037
|
/**
|
|
@@ -98040,7 +98047,7 @@ class IntegerColumnFormatter extends TableColumnFormatter$1 {
|
|
|
98040
98047
|
try {
|
|
98041
98048
|
return this.dh.i18n.NumberFormat.format(formatString, value2);
|
|
98042
98049
|
} catch (e) {
|
|
98043
|
-
log$
|
|
98050
|
+
log$e.error("Invalid format arguments");
|
|
98044
98051
|
}
|
|
98045
98052
|
return "";
|
|
98046
98053
|
}
|
|
@@ -98090,7 +98097,7 @@ class DateUtils {
|
|
|
98090
98097
|
* @param second The seconds
|
|
98091
98098
|
* @param ns The nanoseconds
|
|
98092
98099
|
*/
|
|
98093
|
-
static makeDateWrapper(
|
|
98100
|
+
static makeDateWrapper(dh, timeZone, year2) {
|
|
98094
98101
|
var month2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0;
|
|
98095
98102
|
var day2 = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 1;
|
|
98096
98103
|
var hour2 = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 0;
|
|
@@ -98108,7 +98115,7 @@ class DateUtils {
|
|
|
98108
98115
|
var secondString = "".concat(second2).padStart(2, "0");
|
|
98109
98116
|
var nanoString = "".concat(ns).padStart(9, "0");
|
|
98110
98117
|
var dateString = "".concat(yearString, "-").concat(monthString, "-").concat(dayString, " ").concat(hourString, ":").concat(minuteString, ":").concat(secondString, ".").concat(nanoString);
|
|
98111
|
-
return
|
|
98118
|
+
return dh.i18n.DateTimeFormat.parse(DateUtils.FULL_DATE_FORMAT, dateString, dh.i18n.TimeZone.getTimeZone(timeZone));
|
|
98112
98119
|
}
|
|
98113
98120
|
/**
|
|
98114
98121
|
* Takes the string the user entered and returns the next nanos value
|
|
@@ -98127,7 +98134,7 @@ class DateUtils {
|
|
|
98127
98134
|
* @param timeZone The time zone to parse the date in. E.g. America/New_York
|
|
98128
98135
|
* @returns Returns the DateWrapper for the next date, or null if a full date was passed in
|
|
98129
98136
|
*/
|
|
98130
|
-
static getNextDate(
|
|
98137
|
+
static getNextDate(dh, components, values, timeZone) {
|
|
98131
98138
|
var {
|
|
98132
98139
|
year: year2,
|
|
98133
98140
|
month: month2,
|
|
@@ -98160,7 +98167,7 @@ class DateUtils {
|
|
|
98160
98167
|
year2 += 1;
|
|
98161
98168
|
}
|
|
98162
98169
|
var jsDate = new Date(year2, month2, date2, hours2, minutes2, seconds2);
|
|
98163
|
-
return DateUtils.makeDateWrapper(
|
|
98170
|
+
return DateUtils.makeDateWrapper(dh, timeZone, jsDate.getFullYear(), jsDate.getMonth(), jsDate.getDate(), jsDate.getHours(), jsDate.getMinutes(), jsDate.getSeconds(), nanos);
|
|
98164
98171
|
}
|
|
98165
98172
|
/**
|
|
98166
98173
|
* Get the JS month value for the provided string.
|
|
@@ -98252,7 +98259,7 @@ class DateUtils {
|
|
|
98252
98259
|
* @param timeZone The time zone to parse this range in. E.g. America/New_York
|
|
98253
98260
|
* @returns A tuple with the start and end value/null for that date range, or both null
|
|
98254
98261
|
*/
|
|
98255
|
-
static parseDateRange(
|
|
98262
|
+
static parseDateRange(dh, text, timeZone) {
|
|
98256
98263
|
var cleanText = text.trim().toLowerCase();
|
|
98257
98264
|
if (cleanText.length === 0) {
|
|
98258
98265
|
throw new Error("Cannot parse date range from empty string");
|
|
@@ -98262,19 +98269,19 @@ class DateUtils {
|
|
|
98262
98269
|
}
|
|
98263
98270
|
if (cleanText === "today") {
|
|
98264
98271
|
var now2 = new Date(Date.now());
|
|
98265
|
-
var _startDate = DateUtils.makeDateWrapper(
|
|
98266
|
-
var _endDate = DateUtils.makeDateWrapper(
|
|
98272
|
+
var _startDate = DateUtils.makeDateWrapper(dh, timeZone, now2.getFullYear(), now2.getMonth(), now2.getDate());
|
|
98273
|
+
var _endDate = DateUtils.makeDateWrapper(dh, timeZone, now2.getFullYear(), now2.getMonth(), now2.getDate() + 1);
|
|
98267
98274
|
return [_startDate, _endDate];
|
|
98268
98275
|
}
|
|
98269
98276
|
if (cleanText === "yesterday") {
|
|
98270
98277
|
var _now = new Date(Date.now());
|
|
98271
|
-
var _startDate2 = DateUtils.makeDateWrapper(
|
|
98272
|
-
var _endDate2 = DateUtils.makeDateWrapper(
|
|
98278
|
+
var _startDate2 = DateUtils.makeDateWrapper(dh, timeZone, _now.getFullYear(), _now.getMonth(), _now.getDate() - 1);
|
|
98279
|
+
var _endDate2 = DateUtils.makeDateWrapper(dh, timeZone, _now.getFullYear(), _now.getMonth(), _now.getDate());
|
|
98273
98280
|
return [_startDate2, _endDate2];
|
|
98274
98281
|
}
|
|
98275
98282
|
if (cleanText === "now") {
|
|
98276
98283
|
var _now2 = new Date(Date.now());
|
|
98277
|
-
var date2 =
|
|
98284
|
+
var date2 = dh.DateWrapper.ofJsDate(_now2);
|
|
98278
98285
|
return [date2, null];
|
|
98279
98286
|
}
|
|
98280
98287
|
var components = DateUtils.parseDateTimeString(cleanText);
|
|
@@ -98285,8 +98292,8 @@ class DateUtils {
|
|
|
98285
98292
|
if (values == null) {
|
|
98286
98293
|
throw new Error("Unable to extract date values from ".concat(components));
|
|
98287
98294
|
}
|
|
98288
|
-
var startDate = DateUtils.makeDateWrapper(
|
|
98289
|
-
var endDate = DateUtils.getNextDate(
|
|
98295
|
+
var startDate = DateUtils.makeDateWrapper(dh, timeZone, values.year, values.month, values.date, values.hours, values.minutes, values.seconds, values.nanos);
|
|
98296
|
+
var endDate = DateUtils.getNextDate(dh, components, values, timeZone);
|
|
98290
98297
|
return [startDate, endDate];
|
|
98291
98298
|
}
|
|
98292
98299
|
/**
|
|
@@ -98437,7 +98444,7 @@ function _toPrimitive$p(input, hint) {
|
|
|
98437
98444
|
}
|
|
98438
98445
|
return (hint === "string" ? String : Number)(input);
|
|
98439
98446
|
}
|
|
98440
|
-
var log$
|
|
98447
|
+
var log$d = Log$1.module("TableUtils");
|
|
98441
98448
|
class TableUtils {
|
|
98442
98449
|
// Regex looking for a negative or positive integer or decimal number
|
|
98443
98450
|
/**
|
|
@@ -98815,10 +98822,10 @@ class TableUtils {
|
|
|
98815
98822
|
}, timeout);
|
|
98816
98823
|
eventCleanup = table.addEventListener(eventName, (event) => {
|
|
98817
98824
|
if (matcher != null && !matcher(event)) {
|
|
98818
|
-
log$
|
|
98825
|
+
log$d.debug2("Event triggered, but matcher returned false.");
|
|
98819
98826
|
return;
|
|
98820
98827
|
}
|
|
98821
|
-
log$
|
|
98828
|
+
log$d.debug2("Event triggered, resolving.");
|
|
98822
98829
|
eventCleanup();
|
|
98823
98830
|
clearTimeout(timeoutId);
|
|
98824
98831
|
isPending = false;
|
|
@@ -98827,13 +98834,13 @@ class TableUtils {
|
|
|
98827
98834
|
});
|
|
98828
98835
|
wrappedPromise.cancel = () => {
|
|
98829
98836
|
if (isPending) {
|
|
98830
|
-
log$
|
|
98837
|
+
log$d.debug2("Pending promise cleanup.");
|
|
98831
98838
|
eventCleanup();
|
|
98832
98839
|
clearTimeout(timeoutId);
|
|
98833
98840
|
isPending = false;
|
|
98834
98841
|
return;
|
|
98835
98842
|
}
|
|
98836
|
-
log$
|
|
98843
|
+
log$d.debug2("Ignoring non-pending promise cancel.");
|
|
98837
98844
|
};
|
|
98838
98845
|
return wrappedPromise;
|
|
98839
98846
|
}
|
|
@@ -98925,9 +98932,9 @@ class TableUtils {
|
|
|
98925
98932
|
return TextUtils$1.sort(aName, bName, isAscending);
|
|
98926
98933
|
});
|
|
98927
98934
|
}
|
|
98928
|
-
constructor(
|
|
98935
|
+
constructor(dh) {
|
|
98929
98936
|
_defineProperty$p(this, "dh", void 0);
|
|
98930
|
-
this.dh =
|
|
98937
|
+
this.dh = dh;
|
|
98931
98938
|
}
|
|
98932
98939
|
/**
|
|
98933
98940
|
* Create filter with the provided column and text. Handles multiple filters joined with && or ||
|
|
@@ -98994,7 +99001,7 @@ class TableUtils {
|
|
|
98994
99001
|
makeQuickNumberFilter(column, text) {
|
|
98995
99002
|
var columnFilter = column.filter();
|
|
98996
99003
|
var {
|
|
98997
|
-
dh
|
|
99004
|
+
dh
|
|
98998
99005
|
} = this;
|
|
98999
99006
|
var filter2 = null;
|
|
99000
99007
|
var regex2 = /\s*(>=|<=|=>|=<|>|<|!=|=|!)?(\s*-\s*)?(\s*\d*(?:,\d{3})*(?:\.\d*)?\s*)?(null|nan|infinity|inf|\u221E)?(.*)/i;
|
|
@@ -99023,15 +99030,15 @@ class TableUtils {
|
|
|
99023
99030
|
filter2 = columnFilter.isNull();
|
|
99024
99031
|
break;
|
|
99025
99032
|
case "nan":
|
|
99026
|
-
filter2 =
|
|
99033
|
+
filter2 = dh.FilterCondition.invoke("isNaN", columnFilter);
|
|
99027
99034
|
break;
|
|
99028
99035
|
case "infinity":
|
|
99029
99036
|
case "inf":
|
|
99030
99037
|
case "∞":
|
|
99031
99038
|
if (negativeSign != null) {
|
|
99032
|
-
filter2 =
|
|
99039
|
+
filter2 = dh.FilterCondition.invoke("isInf", columnFilter).and(columnFilter.lessThan(dh.FilterValue.ofNumber(0)));
|
|
99033
99040
|
} else {
|
|
99034
|
-
filter2 =
|
|
99041
|
+
filter2 = dh.FilterCondition.invoke("isInf", columnFilter).and(columnFilter.greaterThan(dh.FilterValue.ofNumber(0)));
|
|
99035
99042
|
}
|
|
99036
99043
|
break;
|
|
99037
99044
|
}
|
|
@@ -99046,9 +99053,9 @@ class TableUtils {
|
|
|
99046
99053
|
value2 = TableUtils.removeCommas(value2);
|
|
99047
99054
|
if (TableUtils.isLongType(column.type)) {
|
|
99048
99055
|
try {
|
|
99049
|
-
value2 =
|
|
99056
|
+
value2 = dh.FilterValue.ofNumber(dh.LongWrapper.ofString("".concat(negativeSign != null ? "-" : "").concat(value2)));
|
|
99050
99057
|
} catch (error) {
|
|
99051
|
-
log$
|
|
99058
|
+
log$d.warn("Unable to create long filter", error);
|
|
99052
99059
|
return null;
|
|
99053
99060
|
}
|
|
99054
99061
|
} else {
|
|
@@ -99056,14 +99063,14 @@ class TableUtils {
|
|
|
99056
99063
|
if (value2 == null || Number.isNaN(value2)) {
|
|
99057
99064
|
return null;
|
|
99058
99065
|
}
|
|
99059
|
-
value2 =
|
|
99066
|
+
value2 = dh.FilterValue.ofNumber(negativeSign != null ? 0 - value2 : value2);
|
|
99060
99067
|
}
|
|
99061
99068
|
filter2 = column.filter();
|
|
99062
99069
|
return TableUtils.makeRangeFilterWithOperation(filter2, operation, value2);
|
|
99063
99070
|
}
|
|
99064
99071
|
makeQuickTextFilter(column, text) {
|
|
99065
99072
|
var {
|
|
99066
|
-
dh
|
|
99073
|
+
dh
|
|
99067
99074
|
} = this;
|
|
99068
99075
|
var cleanText = "".concat(text).trim();
|
|
99069
99076
|
var regex2 = /^(!~|!=|~|=|!)?(.*)/;
|
|
@@ -99104,26 +99111,26 @@ class TableUtils {
|
|
|
99104
99111
|
value2 = value2.replace("\\", "");
|
|
99105
99112
|
switch (operation) {
|
|
99106
99113
|
case "~": {
|
|
99107
|
-
return filter2.isNull().not().and(filter2.invoke("matches",
|
|
99114
|
+
return filter2.isNull().not().and(filter2.invoke("matches", dh.FilterValue.ofString("(?s)(?i).*\\Q".concat(value2, "\\E.*"))));
|
|
99108
99115
|
}
|
|
99109
99116
|
case "!~":
|
|
99110
|
-
return filter2.isNull().or(filter2.invoke("matches",
|
|
99117
|
+
return filter2.isNull().or(filter2.invoke("matches", dh.FilterValue.ofString("(?s)(?i).*\\Q".concat(value2, "\\E.*"))).not());
|
|
99111
99118
|
case "!=":
|
|
99112
99119
|
if (prefix === "*") {
|
|
99113
|
-
return filter2.isNull().or(filter2.invoke("matches",
|
|
99120
|
+
return filter2.isNull().or(filter2.invoke("matches", dh.FilterValue.ofString("(?s)(?i).*\\Q".concat(value2, "\\E$"))).not());
|
|
99114
99121
|
}
|
|
99115
99122
|
if (suffix === "*") {
|
|
99116
|
-
return filter2.isNull().or(filter2.invoke("matches",
|
|
99123
|
+
return filter2.isNull().or(filter2.invoke("matches", dh.FilterValue.ofString("(?s)(?i)^\\Q".concat(value2, "\\E.*"))).not());
|
|
99117
99124
|
}
|
|
99118
|
-
return filter2.notEqIgnoreCase(
|
|
99125
|
+
return filter2.notEqIgnoreCase(dh.FilterValue.ofString(value2.toLowerCase()));
|
|
99119
99126
|
case "=":
|
|
99120
99127
|
if (prefix === "*") {
|
|
99121
|
-
return filter2.isNull().not().and(filter2.invoke("matches",
|
|
99128
|
+
return filter2.isNull().not().and(filter2.invoke("matches", dh.FilterValue.ofString("(?s)(?i).*\\Q".concat(value2, "\\E$"))));
|
|
99122
99129
|
}
|
|
99123
99130
|
if (suffix === "*") {
|
|
99124
|
-
return filter2.isNull().not().and(filter2.invoke("matches",
|
|
99131
|
+
return filter2.isNull().not().and(filter2.invoke("matches", dh.FilterValue.ofString("(?s)(?i)^\\Q".concat(value2, "\\E.*"))));
|
|
99125
99132
|
}
|
|
99126
|
-
return filter2.eqIgnoreCase(
|
|
99133
|
+
return filter2.eqIgnoreCase(dh.FilterValue.ofString(value2.toLowerCase()));
|
|
99127
99134
|
}
|
|
99128
99135
|
return null;
|
|
99129
99136
|
}
|
|
@@ -99205,11 +99212,11 @@ class TableUtils {
|
|
|
99205
99212
|
*/
|
|
99206
99213
|
makeQuickDateFilterWithOperation(column, text, operation, timeZone) {
|
|
99207
99214
|
var {
|
|
99208
|
-
dh
|
|
99215
|
+
dh
|
|
99209
99216
|
} = this;
|
|
99210
|
-
var [startDate, endDate] = DateUtils$1.parseDateRange(
|
|
99211
|
-
var startValue = startDate != null ?
|
|
99212
|
-
var endValue = endDate != null ?
|
|
99217
|
+
var [startDate, endDate] = DateUtils$1.parseDateRange(dh, text, timeZone);
|
|
99218
|
+
var startValue = startDate != null ? dh.FilterValue.ofNumber(startDate) : null;
|
|
99219
|
+
var endValue = endDate != null ? dh.FilterValue.ofNumber(endDate) : null;
|
|
99213
99220
|
var filter2 = column.filter();
|
|
99214
99221
|
if (startValue == null) {
|
|
99215
99222
|
return operation === Type.notEq ? filter2.isNull().not() : filter2.isNull();
|
|
@@ -99254,7 +99261,7 @@ class TableUtils {
|
|
|
99254
99261
|
}
|
|
99255
99262
|
makeQuickCharFilter(column, text) {
|
|
99256
99263
|
var {
|
|
99257
|
-
dh
|
|
99264
|
+
dh
|
|
99258
99265
|
} = this;
|
|
99259
99266
|
var cleanText = "".concat(text).trim();
|
|
99260
99267
|
var regex2 = /^(>=|<=|=>|=<|>|<|!=|=|!)?(null|"."|'.'|.)?(.*)/;
|
|
@@ -99286,7 +99293,7 @@ class TableUtils {
|
|
|
99286
99293
|
return null;
|
|
99287
99294
|
}
|
|
99288
99295
|
}
|
|
99289
|
-
var filterValue =
|
|
99296
|
+
var filterValue = dh.FilterValue.ofString(TableUtils.isRangeOperation(operation) ? TableUtils.quoteValue(value2) : value2);
|
|
99290
99297
|
return TableUtils.makeRangeFilterWithOperation(filter2, operation, filterValue);
|
|
99291
99298
|
}
|
|
99292
99299
|
makeAdvancedFilter(column, options, timeZone) {
|
|
@@ -99316,16 +99323,16 @@ class TableUtils {
|
|
|
99316
99323
|
} else if (filterOperator === Operator.or) {
|
|
99317
99324
|
filter2 = filter2.or(newFilter);
|
|
99318
99325
|
} else {
|
|
99319
|
-
log$
|
|
99326
|
+
log$d.error("Unexpected filter operator", filterOperator, newFilter);
|
|
99320
99327
|
filter2 = null;
|
|
99321
99328
|
break;
|
|
99322
99329
|
}
|
|
99323
99330
|
}
|
|
99324
99331
|
} else {
|
|
99325
|
-
log$
|
|
99332
|
+
log$d.debug2("Empty filter ignored for", selectedType, value2);
|
|
99326
99333
|
}
|
|
99327
99334
|
} catch (err) {
|
|
99328
|
-
log$
|
|
99335
|
+
log$d.error("Unable to create filter", err);
|
|
99329
99336
|
filter2 = null;
|
|
99330
99337
|
break;
|
|
99331
99338
|
}
|
|
@@ -99343,7 +99350,7 @@ class TableUtils {
|
|
|
99343
99350
|
}
|
|
99344
99351
|
makeAdvancedValueFilter(column, operation, value2, timeZone) {
|
|
99345
99352
|
var {
|
|
99346
|
-
dh
|
|
99353
|
+
dh
|
|
99347
99354
|
} = this;
|
|
99348
99355
|
if (TableUtils.isDateType(column.type)) {
|
|
99349
99356
|
return this.makeQuickDateFilterWithOperation(column, value2, operation, timeZone);
|
|
@@ -99377,13 +99384,13 @@ class TableUtils {
|
|
|
99377
99384
|
case Type.isNull:
|
|
99378
99385
|
return filter2.isNull();
|
|
99379
99386
|
case Type.contains:
|
|
99380
|
-
return filter2.isNull().not().and(filter2.invoke("matches",
|
|
99387
|
+
return filter2.isNull().not().and(filter2.invoke("matches", dh.FilterValue.ofString("(?s)(?i).*\\Q".concat(value2, "\\E.*"))));
|
|
99381
99388
|
case Type.notContains:
|
|
99382
|
-
return filter2.isNull().or(filter2.invoke("matches",
|
|
99389
|
+
return filter2.isNull().or(filter2.invoke("matches", dh.FilterValue.ofString("(?s)(?i).*\\Q".concat(value2, "\\E.*"))).not());
|
|
99383
99390
|
case Type.startsWith:
|
|
99384
|
-
return filter2.isNull().not().and(filter2.invoke("matches",
|
|
99391
|
+
return filter2.isNull().not().and(filter2.invoke("matches", dh.FilterValue.ofString("(?s)(?i)^\\Q".concat(value2, "\\E.*"))));
|
|
99385
99392
|
case Type.endsWith:
|
|
99386
|
-
return filter2.isNull().not().and(filter2.invoke("matches",
|
|
99393
|
+
return filter2.isNull().not().and(filter2.invoke("matches", dh.FilterValue.ofString("(?s)(?i).*\\Q".concat(value2, "\\E$"))));
|
|
99387
99394
|
case Type.in:
|
|
99388
99395
|
case Type.inIgnoreCase:
|
|
99389
99396
|
case Type.notIn:
|
|
@@ -99428,9 +99435,9 @@ class TableUtils {
|
|
|
99428
99435
|
return _asyncToGenerator(function* () {
|
|
99429
99436
|
var timeout = _arguments2.length > 2 && _arguments2[2] !== void 0 ? _arguments2[2] : TableUtils.APPLY_TABLE_CHANGE_TIMEOUT_MS;
|
|
99430
99437
|
var {
|
|
99431
|
-
dh
|
|
99438
|
+
dh
|
|
99432
99439
|
} = _this2;
|
|
99433
|
-
return TableUtils.executeAndWaitForEvent((t) => t === null || t === void 0 ? void 0 : t.applyCustomColumns(columns), table,
|
|
99440
|
+
return TableUtils.executeAndWaitForEvent((t) => t === null || t === void 0 ? void 0 : t.applyCustomColumns(columns), table, dh.Table.EVENT_CUSTOMCOLUMNSCHANGED, timeout);
|
|
99434
99441
|
})();
|
|
99435
99442
|
}
|
|
99436
99443
|
/**
|
|
@@ -99447,9 +99454,9 @@ class TableUtils {
|
|
|
99447
99454
|
return _asyncToGenerator(function* () {
|
|
99448
99455
|
var timeout = _arguments3.length > 2 && _arguments3[2] !== void 0 ? _arguments3[2] : TableUtils.APPLY_TABLE_CHANGE_TIMEOUT_MS;
|
|
99449
99456
|
var {
|
|
99450
|
-
dh
|
|
99457
|
+
dh
|
|
99451
99458
|
} = _this3;
|
|
99452
|
-
return TableUtils.executeAndWaitForEvent((t) => t === null || t === void 0 ? void 0 : t.applyFilter(filters), table,
|
|
99459
|
+
return TableUtils.executeAndWaitForEvent((t) => t === null || t === void 0 ? void 0 : t.applyFilter(filters), table, dh.Table.EVENT_FILTERCHANGED, timeout);
|
|
99453
99460
|
})();
|
|
99454
99461
|
}
|
|
99455
99462
|
/**
|
|
@@ -99466,9 +99473,9 @@ class TableUtils {
|
|
|
99466
99473
|
return _asyncToGenerator(function* () {
|
|
99467
99474
|
var timeout = _arguments4.length > 2 && _arguments4[2] !== void 0 ? _arguments4[2] : TableUtils.APPLY_TABLE_CHANGE_TIMEOUT_MS;
|
|
99468
99475
|
var {
|
|
99469
|
-
dh
|
|
99476
|
+
dh
|
|
99470
99477
|
} = _this4;
|
|
99471
|
-
return TableUtils.executeAndWaitForEvent((t) => t === null || t === void 0 ? void 0 : t.applySort(sorts), table,
|
|
99478
|
+
return TableUtils.executeAndWaitForEvent((t) => t === null || t === void 0 ? void 0 : t.applySort(sorts), table, dh.Table.EVENT_SORTCHANGED, timeout);
|
|
99472
99479
|
})();
|
|
99473
99480
|
}
|
|
99474
99481
|
/**
|
|
@@ -99477,17 +99484,17 @@ class TableUtils {
|
|
|
99477
99484
|
*/
|
|
99478
99485
|
makeNeverFilter(column) {
|
|
99479
99486
|
var {
|
|
99480
|
-
dh
|
|
99487
|
+
dh
|
|
99481
99488
|
} = this;
|
|
99482
99489
|
var value2 = null;
|
|
99483
99490
|
if (TableUtils.isTextType(column.type)) {
|
|
99484
|
-
value2 =
|
|
99491
|
+
value2 = dh.FilterValue.ofString("a");
|
|
99485
99492
|
} else if (TableUtils.isBooleanType(column.type)) {
|
|
99486
|
-
value2 =
|
|
99493
|
+
value2 = dh.FilterValue.ofBoolean(true);
|
|
99487
99494
|
} else if (TableUtils.isDateType(column.type)) {
|
|
99488
|
-
value2 =
|
|
99495
|
+
value2 = dh.FilterValue.ofNumber(dh.DateWrapper.ofJsDate(new Date()));
|
|
99489
99496
|
} else {
|
|
99490
|
-
value2 =
|
|
99497
|
+
value2 = dh.FilterValue.ofNumber(0);
|
|
99491
99498
|
}
|
|
99492
99499
|
var eqFilter = column.filter().eq(value2);
|
|
99493
99500
|
var notEqFilter = column.filter().notEq(value2);
|
|
@@ -99500,16 +99507,16 @@ class TableUtils {
|
|
|
99500
99507
|
*/
|
|
99501
99508
|
makeFilterValue(columnType, value2) {
|
|
99502
99509
|
var {
|
|
99503
|
-
dh
|
|
99510
|
+
dh
|
|
99504
99511
|
} = this;
|
|
99505
99512
|
var type = TableUtils.getBaseType(columnType);
|
|
99506
99513
|
if (TableUtils.isTextType(type)) {
|
|
99507
|
-
return
|
|
99514
|
+
return dh.FilterValue.ofString(value2);
|
|
99508
99515
|
}
|
|
99509
99516
|
if (TableUtils.isLongType(type)) {
|
|
99510
|
-
return
|
|
99517
|
+
return dh.FilterValue.ofNumber(dh.LongWrapper.ofString(TableUtils.removeCommas(value2)));
|
|
99511
99518
|
}
|
|
99512
|
-
return
|
|
99519
|
+
return dh.FilterValue.ofNumber(TableUtils.removeCommas(value2));
|
|
99513
99520
|
}
|
|
99514
99521
|
/**
|
|
99515
99522
|
* Takes a value and converts it to an `dh.FilterValue`
|
|
@@ -99520,15 +99527,15 @@ class TableUtils {
|
|
|
99520
99527
|
*/
|
|
99521
99528
|
makeFilterRawValue(columnType, rawValue) {
|
|
99522
99529
|
var {
|
|
99523
|
-
dh
|
|
99530
|
+
dh
|
|
99524
99531
|
} = this;
|
|
99525
99532
|
if (TableUtils.isTextType(columnType)) {
|
|
99526
|
-
return
|
|
99533
|
+
return dh.FilterValue.ofString(rawValue);
|
|
99527
99534
|
}
|
|
99528
99535
|
if (TableUtils.isBooleanType(columnType)) {
|
|
99529
|
-
return
|
|
99536
|
+
return dh.FilterValue.ofBoolean(rawValue);
|
|
99530
99537
|
}
|
|
99531
|
-
return
|
|
99538
|
+
return dh.FilterValue.ofNumber(rawValue);
|
|
99532
99539
|
}
|
|
99533
99540
|
/**
|
|
99534
99541
|
* Converts a string value to a value appropriate for the column
|
|
@@ -99538,7 +99545,7 @@ class TableUtils {
|
|
|
99538
99545
|
*/
|
|
99539
99546
|
makeValue(columnType, text, timeZone) {
|
|
99540
99547
|
var {
|
|
99541
|
-
dh
|
|
99548
|
+
dh
|
|
99542
99549
|
} = this;
|
|
99543
99550
|
if (text === "null") {
|
|
99544
99551
|
return null;
|
|
@@ -99547,19 +99554,19 @@ class TableUtils {
|
|
|
99547
99554
|
return text;
|
|
99548
99555
|
}
|
|
99549
99556
|
if (TableUtils.isLongType(columnType)) {
|
|
99550
|
-
return
|
|
99557
|
+
return dh.LongWrapper.ofString(TableUtils.removeCommas(text));
|
|
99551
99558
|
}
|
|
99552
99559
|
if (TableUtils.isBooleanType(columnType)) {
|
|
99553
99560
|
return TableUtils.makeBooleanValue(text, true);
|
|
99554
99561
|
}
|
|
99555
99562
|
if (TableUtils.isDateType(columnType)) {
|
|
99556
|
-
var [date2] = DateUtils$1.parseDateRange(
|
|
99563
|
+
var [date2] = DateUtils$1.parseDateRange(dh, text, timeZone);
|
|
99557
99564
|
return date2;
|
|
99558
99565
|
}
|
|
99559
99566
|
if (TableUtils.isNumberType(columnType)) {
|
|
99560
99567
|
return TableUtils.makeNumberValue(text);
|
|
99561
99568
|
}
|
|
99562
|
-
log$
|
|
99569
|
+
log$d.error("Unexpected column type", columnType);
|
|
99563
99570
|
return null;
|
|
99564
99571
|
}
|
|
99565
99572
|
/**
|
|
@@ -99573,7 +99580,7 @@ class TableUtils {
|
|
|
99573
99580
|
*/
|
|
99574
99581
|
makeSelectValueFilter(column, selectedValues, invertSelection) {
|
|
99575
99582
|
var {
|
|
99576
|
-
dh
|
|
99583
|
+
dh
|
|
99577
99584
|
} = this;
|
|
99578
99585
|
if (selectedValues.length === 0) {
|
|
99579
99586
|
if (invertSelection) {
|
|
@@ -99588,11 +99595,11 @@ class TableUtils {
|
|
|
99588
99595
|
if (value2 == null) {
|
|
99589
99596
|
isNullSelected = true;
|
|
99590
99597
|
} else if (TableUtils.isTextType(column.type)) {
|
|
99591
|
-
values.push(
|
|
99598
|
+
values.push(dh.FilterValue.ofString(typeof value2 === "number" ? String.fromCharCode(value2) : value2));
|
|
99592
99599
|
} else if (TableUtils.isBooleanType(column.type)) {
|
|
99593
|
-
values.push(
|
|
99600
|
+
values.push(dh.FilterValue.ofBoolean(Boolean(value2)));
|
|
99594
99601
|
} else {
|
|
99595
|
-
values.push(
|
|
99602
|
+
values.push(dh.FilterValue.ofNumber(value2));
|
|
99596
99603
|
}
|
|
99597
99604
|
}
|
|
99598
99605
|
if (isNullSelected) {
|
|
@@ -99719,7 +99726,7 @@ class Formatter {
|
|
|
99719
99726
|
* @param integerFormatOptions Optional object with Integer configuration
|
|
99720
99727
|
* @param truncateNumbersWithPound Determine if numbers should be truncated w/ repeating # instead of ellipsis at the end
|
|
99721
99728
|
*/
|
|
99722
|
-
constructor(
|
|
99729
|
+
constructor(dh) {
|
|
99723
99730
|
var columnFormattingRules = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
99724
99731
|
var dateTimeOptions = arguments.length > 2 ? arguments[2] : void 0;
|
|
99725
99732
|
var decimalFormatOptions = arguments.length > 3 ? arguments[3] : void 0;
|
|
@@ -99730,7 +99737,7 @@ class Formatter {
|
|
|
99730
99737
|
_defineProperty$o(this, "columnFormatMap", void 0);
|
|
99731
99738
|
_defineProperty$o(this, "truncateNumbersWithPound", void 0);
|
|
99732
99739
|
this.defaultColumnFormatter = new DefaultColumnFormatter$1();
|
|
99733
|
-
this.typeFormatterMap = /* @__PURE__ */ new Map([[TableUtils.dataType.BOOLEAN, new BooleanColumnFormatter$1()], [TableUtils.dataType.CHAR, new CharColumnFormatter$1()], [TableUtils.dataType.DATETIME, new DateTimeColumnFormatter(
|
|
99740
|
+
this.typeFormatterMap = /* @__PURE__ */ new Map([[TableUtils.dataType.BOOLEAN, new BooleanColumnFormatter$1()], [TableUtils.dataType.CHAR, new CharColumnFormatter$1()], [TableUtils.dataType.DATETIME, new DateTimeColumnFormatter(dh, dateTimeOptions)], [TableUtils.dataType.DECIMAL, new DecimalColumnFormatter(dh, decimalFormatOptions)], [TableUtils.dataType.INT, new IntegerColumnFormatter(dh, integerFormatOptions)], [TableUtils.dataType.STRING, new StringColumnFormatter()]]);
|
|
99734
99741
|
this.columnFormatMap = Formatter.makeColumnFormatMap(columnFormattingRules);
|
|
99735
99742
|
this.truncateNumbersWithPound = truncateNumbersWithPound;
|
|
99736
99743
|
}
|
|
@@ -189595,14 +189602,14 @@ function _toPrimitive$n(input, hint) {
|
|
|
189595
189602
|
return (hint === "string" ? String : Number)(input);
|
|
189596
189603
|
}
|
|
189597
189604
|
class ChartModel {
|
|
189598
|
-
constructor(
|
|
189605
|
+
constructor(dh) {
|
|
189599
189606
|
_defineProperty$n(this, "dh", void 0);
|
|
189600
189607
|
_defineProperty$n(this, "listeners", void 0);
|
|
189601
189608
|
_defineProperty$n(this, "formatter", void 0);
|
|
189602
189609
|
_defineProperty$n(this, "rect", void 0);
|
|
189603
189610
|
_defineProperty$n(this, "isDownsamplingDisabled", void 0);
|
|
189604
189611
|
_defineProperty$n(this, "title", void 0);
|
|
189605
|
-
this.dh =
|
|
189612
|
+
this.dh = dh;
|
|
189606
189613
|
this.listeners = [];
|
|
189607
189614
|
this.isDownsamplingDisabled = false;
|
|
189608
189615
|
}
|
|
@@ -190112,7 +190119,7 @@ function _toPrimitive$m(input, hint) {
|
|
|
190112
190119
|
}
|
|
190113
190120
|
return (hint === "string" ? String : Number)(input);
|
|
190114
190121
|
}
|
|
190115
|
-
var log$
|
|
190122
|
+
var log$c = Log$1.module("ChartUtils");
|
|
190116
190123
|
var BUSINESS_COLUMN_TYPE = "io.deephaven.time.DateTime";
|
|
190117
190124
|
var MILLIS_PER_HOUR = 36e5;
|
|
190118
190125
|
var NANOS_PER_MILLI = 1e6;
|
|
@@ -190374,7 +190381,7 @@ class ChartUtils {
|
|
|
190374
190381
|
} else if (typeof theme.colorway === "string") {
|
|
190375
190382
|
colorway2 = theme.colorway.split(" ");
|
|
190376
190383
|
} else {
|
|
190377
|
-
log$
|
|
190384
|
+
log$c.warn("Unable to handle colorway property: ".concat(theme.colorway));
|
|
190378
190385
|
}
|
|
190379
190386
|
}
|
|
190380
190387
|
return colorway2;
|
|
@@ -190387,11 +190394,11 @@ class ChartUtils {
|
|
|
190387
190394
|
} = settings;
|
|
190388
190395
|
return title;
|
|
190389
190396
|
}
|
|
190390
|
-
constructor(
|
|
190397
|
+
constructor(dh) {
|
|
190391
190398
|
_defineProperty$m(this, "dh", void 0);
|
|
190392
190399
|
_defineProperty$m(this, "daysOfWeek", void 0);
|
|
190393
|
-
this.dh =
|
|
190394
|
-
this.daysOfWeek = Object.freeze(
|
|
190400
|
+
this.dh = dh;
|
|
190401
|
+
this.daysOfWeek = Object.freeze(dh.calendar.DayOfWeek.values());
|
|
190395
190402
|
}
|
|
190396
190403
|
/**
|
|
190397
190404
|
* Retrieve the axis formats from the provided figure.
|
|
@@ -190435,9 +190442,9 @@ class ChartUtils {
|
|
|
190435
190442
|
if (axisProperty != null) {
|
|
190436
190443
|
var axisLayoutProperty = ChartUtils.getAxisLayoutProperty(axisProperty, axisIndex);
|
|
190437
190444
|
if (axisFormats.has(axisLayoutProperty)) {
|
|
190438
|
-
log$
|
|
190445
|
+
log$c.debug("".concat(axisLayoutProperty, " already added."));
|
|
190439
190446
|
} else {
|
|
190440
|
-
log$
|
|
190447
|
+
log$c.debug("Adding ".concat(axisLayoutProperty, " to axisFormats."));
|
|
190441
190448
|
var axisFormat = _this.getPlotlyAxisFormat(source, formatter);
|
|
190442
190449
|
if (axisFormat === null) {
|
|
190443
190450
|
axisFormats.set(axisLayoutProperty, nullFormat);
|
|
@@ -190500,23 +190507,23 @@ class ChartUtils {
|
|
|
190500
190507
|
*/
|
|
190501
190508
|
getPlotlyChartType(plotStyle, isBusinessTime) {
|
|
190502
190509
|
var {
|
|
190503
|
-
dh
|
|
190510
|
+
dh
|
|
190504
190511
|
} = this;
|
|
190505
190512
|
switch (plotStyle) {
|
|
190506
|
-
case
|
|
190513
|
+
case dh.plot.SeriesPlotStyle.SCATTER:
|
|
190507
190514
|
return !isBusinessTime ? "scattergl" : "scatter";
|
|
190508
|
-
case
|
|
190515
|
+
case dh.plot.SeriesPlotStyle.LINE:
|
|
190509
190516
|
return "scatter";
|
|
190510
|
-
case
|
|
190511
|
-
case
|
|
190517
|
+
case dh.plot.SeriesPlotStyle.BAR:
|
|
190518
|
+
case dh.plot.SeriesPlotStyle.STACKED_BAR:
|
|
190512
190519
|
return "bar";
|
|
190513
|
-
case
|
|
190520
|
+
case dh.plot.SeriesPlotStyle.PIE:
|
|
190514
190521
|
return "pie";
|
|
190515
|
-
case
|
|
190522
|
+
case dh.plot.SeriesPlotStyle.TREEMAP:
|
|
190516
190523
|
return "treemap";
|
|
190517
|
-
case
|
|
190524
|
+
case dh.plot.SeriesPlotStyle.HISTOGRAM:
|
|
190518
190525
|
return "histogram";
|
|
190519
|
-
case
|
|
190526
|
+
case dh.plot.SeriesPlotStyle.OHLC:
|
|
190520
190527
|
return "ohlc";
|
|
190521
190528
|
default:
|
|
190522
190529
|
return void 0;
|
|
@@ -190530,11 +190537,11 @@ class ChartUtils {
|
|
|
190530
190537
|
*/
|
|
190531
190538
|
getPlotlyChartMode(plotStyle, areLinesVisible, areShapesVisible) {
|
|
190532
190539
|
var {
|
|
190533
|
-
dh
|
|
190540
|
+
dh
|
|
190534
190541
|
} = this;
|
|
190535
190542
|
var modes = /* @__PURE__ */ new Set();
|
|
190536
190543
|
switch (plotStyle) {
|
|
190537
|
-
case
|
|
190544
|
+
case dh.plot.SeriesPlotStyle.SCATTER:
|
|
190538
190545
|
if (areLinesVisible !== null && areLinesVisible !== void 0 ? areLinesVisible : false) {
|
|
190539
190546
|
modes.add(ChartUtils.MODE_LINES);
|
|
190540
190547
|
}
|
|
@@ -190542,7 +190549,7 @@ class ChartUtils {
|
|
|
190542
190549
|
modes.add(ChartUtils.MODE_MARKERS);
|
|
190543
190550
|
}
|
|
190544
190551
|
break;
|
|
190545
|
-
case
|
|
190552
|
+
case dh.plot.SeriesPlotStyle.LINE:
|
|
190546
190553
|
if (areLinesVisible !== null && areLinesVisible !== void 0 ? areLinesVisible : true) {
|
|
190547
190554
|
modes.add(ChartUtils.MODE_LINES);
|
|
190548
190555
|
}
|
|
@@ -190560,76 +190567,76 @@ class ChartUtils {
|
|
|
190560
190567
|
*/
|
|
190561
190568
|
getPlotlyProperty(plotStyle, sourceType) {
|
|
190562
190569
|
var {
|
|
190563
|
-
dh
|
|
190570
|
+
dh
|
|
190564
190571
|
} = this;
|
|
190565
190572
|
switch (plotStyle) {
|
|
190566
|
-
case
|
|
190573
|
+
case dh.plot.SeriesPlotStyle.PIE:
|
|
190567
190574
|
switch (sourceType) {
|
|
190568
|
-
case
|
|
190575
|
+
case dh.plot.SourceType.X:
|
|
190569
190576
|
return "labels";
|
|
190570
|
-
case
|
|
190577
|
+
case dh.plot.SourceType.Y:
|
|
190571
190578
|
return "values";
|
|
190572
190579
|
}
|
|
190573
190580
|
break;
|
|
190574
|
-
case
|
|
190581
|
+
case dh.plot.SeriesPlotStyle.OHLC:
|
|
190575
190582
|
switch (sourceType) {
|
|
190576
|
-
case
|
|
190583
|
+
case dh.plot.SourceType.TIME:
|
|
190577
190584
|
return "x";
|
|
190578
190585
|
}
|
|
190579
190586
|
break;
|
|
190580
|
-
case
|
|
190587
|
+
case dh.plot.SeriesPlotStyle.TREEMAP:
|
|
190581
190588
|
switch (sourceType) {
|
|
190582
|
-
case
|
|
190589
|
+
case dh.plot.SourceType.X:
|
|
190583
190590
|
return "ids";
|
|
190584
|
-
case
|
|
190591
|
+
case dh.plot.SourceType.Y:
|
|
190585
190592
|
return "values";
|
|
190586
|
-
case
|
|
190593
|
+
case dh.plot.SourceType.LABEL:
|
|
190587
190594
|
return "labels";
|
|
190588
|
-
case
|
|
190595
|
+
case dh.plot.SourceType.PARENT:
|
|
190589
190596
|
return "parents";
|
|
190590
|
-
case
|
|
190597
|
+
case dh.plot.SourceType.COLOR:
|
|
190591
190598
|
return "marker.colors";
|
|
190592
190599
|
}
|
|
190593
190600
|
break;
|
|
190594
190601
|
}
|
|
190595
190602
|
switch (sourceType) {
|
|
190596
|
-
case
|
|
190603
|
+
case dh.plot.SourceType.X:
|
|
190597
190604
|
return "x";
|
|
190598
|
-
case
|
|
190605
|
+
case dh.plot.SourceType.Y:
|
|
190599
190606
|
return "y";
|
|
190600
|
-
case
|
|
190607
|
+
case dh.plot.SourceType.Z:
|
|
190601
190608
|
return "z";
|
|
190602
|
-
case
|
|
190609
|
+
case dh.plot.SourceType.X_LOW:
|
|
190603
190610
|
return "xLow";
|
|
190604
|
-
case
|
|
190611
|
+
case dh.plot.SourceType.X_HIGH:
|
|
190605
190612
|
return "xHigh";
|
|
190606
|
-
case
|
|
190613
|
+
case dh.plot.SourceType.Y_LOW:
|
|
190607
190614
|
return "yLow";
|
|
190608
|
-
case
|
|
190615
|
+
case dh.plot.SourceType.Y_HIGH:
|
|
190609
190616
|
return "yHigh";
|
|
190610
|
-
case
|
|
190617
|
+
case dh.plot.SourceType.TIME:
|
|
190611
190618
|
return "time";
|
|
190612
|
-
case
|
|
190619
|
+
case dh.plot.SourceType.OPEN:
|
|
190613
190620
|
return "open";
|
|
190614
|
-
case
|
|
190621
|
+
case dh.plot.SourceType.HIGH:
|
|
190615
190622
|
return "high";
|
|
190616
|
-
case
|
|
190623
|
+
case dh.plot.SourceType.LOW:
|
|
190617
190624
|
return "low";
|
|
190618
|
-
case
|
|
190625
|
+
case dh.plot.SourceType.CLOSE:
|
|
190619
190626
|
return "close";
|
|
190620
|
-
case
|
|
190627
|
+
case dh.plot.SourceType.SHAPE:
|
|
190621
190628
|
return "shape";
|
|
190622
|
-
case
|
|
190629
|
+
case dh.plot.SourceType.SIZE:
|
|
190623
190630
|
return "size";
|
|
190624
|
-
case
|
|
190631
|
+
case dh.plot.SourceType.LABEL:
|
|
190625
190632
|
return "label";
|
|
190626
|
-
case
|
|
190633
|
+
case dh.plot.SourceType.COLOR:
|
|
190627
190634
|
return "color";
|
|
190628
|
-
case
|
|
190635
|
+
case dh.plot.SourceType.PARENT:
|
|
190629
190636
|
return "parent";
|
|
190630
|
-
case
|
|
190637
|
+
case dh.plot.SourceType.HOVER_TEXT:
|
|
190631
190638
|
return "hovertext";
|
|
190632
|
-
case
|
|
190639
|
+
case dh.plot.SourceType.TEXT:
|
|
190633
190640
|
return "text";
|
|
190634
190641
|
default:
|
|
190635
190642
|
throw new Error("Unrecognized source type: ".concat(sourceType));
|
|
@@ -190638,12 +190645,12 @@ class ChartUtils {
|
|
|
190638
190645
|
getPlotlySeriesOrientation(series) {
|
|
190639
190646
|
var _sources$, _sources$$axis;
|
|
190640
190647
|
var {
|
|
190641
|
-
dh
|
|
190648
|
+
dh
|
|
190642
190649
|
} = this;
|
|
190643
190650
|
var {
|
|
190644
190651
|
sources
|
|
190645
190652
|
} = series;
|
|
190646
|
-
if (sources.length === 2 && ((_sources$ = sources[0]) === null || _sources$ === void 0 ? void 0 : (_sources$$axis = _sources$.axis) === null || _sources$$axis === void 0 ? void 0 : _sources$$axis.type) ===
|
|
190653
|
+
if (sources.length === 2 && ((_sources$ = sources[0]) === null || _sources$ === void 0 ? void 0 : (_sources$$axis = _sources$.axis) === null || _sources$$axis === void 0 ? void 0 : _sources$$axis.type) === dh.plot.AxisType.Y) {
|
|
190647
190654
|
return ChartUtils.ORIENTATION.HORIZONTAL;
|
|
190648
190655
|
}
|
|
190649
190656
|
return ChartUtils.ORIENTATION.VERTICAL;
|
|
@@ -190711,7 +190718,7 @@ class ChartUtils {
|
|
|
190711
190718
|
var shapeSize = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : null;
|
|
190712
190719
|
var seriesVisibility = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : null;
|
|
190713
190720
|
var {
|
|
190714
|
-
dh
|
|
190721
|
+
dh
|
|
190715
190722
|
} = this;
|
|
190716
190723
|
var seriesData = seriesDataParam;
|
|
190717
190724
|
seriesData.marker = {
|
|
@@ -190721,13 +190728,13 @@ class ChartUtils {
|
|
|
190721
190728
|
width: 1
|
|
190722
190729
|
// default line width for lines, should eventually be able to override
|
|
190723
190730
|
};
|
|
190724
|
-
if (plotStyle ===
|
|
190731
|
+
if (plotStyle === dh.plot.SeriesPlotStyle.AREA) {
|
|
190725
190732
|
seriesData.fill = "tozeroy";
|
|
190726
|
-
} else if (plotStyle ===
|
|
190733
|
+
} else if (plotStyle === dh.plot.SeriesPlotStyle.STACKED_AREA) {
|
|
190727
190734
|
seriesData.stackgroup = "stack";
|
|
190728
|
-
} else if (plotStyle ===
|
|
190735
|
+
} else if (plotStyle === dh.plot.SeriesPlotStyle.STEP) {
|
|
190729
190736
|
seriesData.line.shape = "hv";
|
|
190730
|
-
} else if (plotStyle ===
|
|
190737
|
+
} else if (plotStyle === dh.plot.SeriesPlotStyle.HISTOGRAM) {
|
|
190731
190738
|
seriesData.width = [];
|
|
190732
190739
|
if (seriesData.marker.line !== void 0) {
|
|
190733
190740
|
Object.assign(seriesData.marker.line, {
|
|
@@ -190735,7 +190742,7 @@ class ChartUtils {
|
|
|
190735
190742
|
width: 1
|
|
190736
190743
|
});
|
|
190737
190744
|
}
|
|
190738
|
-
} else if (plotStyle ===
|
|
190745
|
+
} else if (plotStyle === dh.plot.SeriesPlotStyle.OHLC) {
|
|
190739
190746
|
seriesData.increasing = {
|
|
190740
190747
|
line: {
|
|
190741
190748
|
color: theme.ohlc_increasing
|
|
@@ -190746,12 +190753,12 @@ class ChartUtils {
|
|
|
190746
190753
|
color: theme.ohlc_decreasing
|
|
190747
190754
|
}
|
|
190748
190755
|
};
|
|
190749
|
-
} else if (plotStyle ===
|
|
190756
|
+
} else if (plotStyle === dh.plot.SeriesPlotStyle.PIE) {
|
|
190750
190757
|
seriesData.textinfo = "label+percent";
|
|
190751
190758
|
seriesData.outsidetextfont = {
|
|
190752
190759
|
color: theme.title_color
|
|
190753
190760
|
};
|
|
190754
|
-
} else if (plotStyle ===
|
|
190761
|
+
} else if (plotStyle === dh.plot.SeriesPlotStyle.TREEMAP) {
|
|
190755
190762
|
seriesData.hoverinfo = "text";
|
|
190756
190763
|
seriesData.textinfo = "label+text";
|
|
190757
190764
|
seriesData.tiling = {
|
|
@@ -190764,7 +190771,7 @@ class ChartUtils {
|
|
|
190764
190771
|
};
|
|
190765
190772
|
}
|
|
190766
190773
|
if (lineColor != null) {
|
|
190767
|
-
if (plotStyle ===
|
|
190774
|
+
if (plotStyle === dh.plot.SeriesPlotStyle.BAR) {
|
|
190768
190775
|
seriesData.marker.color = lineColor;
|
|
190769
190776
|
} else {
|
|
190770
190777
|
seriesData.line.color = lineColor;
|
|
@@ -190777,22 +190784,22 @@ class ChartUtils {
|
|
|
190777
190784
|
try {
|
|
190778
190785
|
seriesData.marker.symbol = ChartUtils.getMarkerSymbol(shape);
|
|
190779
190786
|
} catch (e) {
|
|
190780
|
-
log$
|
|
190787
|
+
log$c.warn("Unable to handle shape", shape, ":", e);
|
|
190781
190788
|
}
|
|
190782
190789
|
}
|
|
190783
190790
|
if (shapeSize != null) {
|
|
190784
190791
|
seriesData.marker.size = shapeSize * ChartUtils.DEFAULT_MARKER_SIZE;
|
|
190785
190792
|
}
|
|
190786
|
-
if (seriesVisibility != null && plotStyle !==
|
|
190793
|
+
if (seriesVisibility != null && plotStyle !== dh.plot.SeriesPlotStyle.PIE) {
|
|
190787
190794
|
seriesData.visible = seriesVisibility;
|
|
190788
190795
|
}
|
|
190789
190796
|
}
|
|
190790
190797
|
getChartType(plotStyle, isBusinessTime) {
|
|
190791
190798
|
var {
|
|
190792
|
-
dh
|
|
190799
|
+
dh
|
|
190793
190800
|
} = this;
|
|
190794
190801
|
switch (plotStyle) {
|
|
190795
|
-
case
|
|
190802
|
+
case dh.plot.SeriesPlotStyle.HISTOGRAM:
|
|
190796
190803
|
return "bar";
|
|
190797
190804
|
default:
|
|
190798
190805
|
return this.getPlotlyChartType(plotStyle, isBusinessTime);
|
|
@@ -190804,12 +190811,12 @@ class ChartUtils {
|
|
|
190804
190811
|
*/
|
|
190805
190812
|
getAxisPropertyName(axisType) {
|
|
190806
190813
|
var {
|
|
190807
|
-
dh
|
|
190814
|
+
dh
|
|
190808
190815
|
} = this;
|
|
190809
190816
|
switch (axisType) {
|
|
190810
|
-
case
|
|
190817
|
+
case dh.plot.AxisType.X:
|
|
190811
190818
|
return "x";
|
|
190812
|
-
case
|
|
190819
|
+
case dh.plot.AxisType.Y:
|
|
190813
190820
|
return "y";
|
|
190814
190821
|
default:
|
|
190815
190822
|
return null;
|
|
@@ -190821,16 +190828,16 @@ class ChartUtils {
|
|
|
190821
190828
|
*/
|
|
190822
190829
|
getAxisSide(axisPosition) {
|
|
190823
190830
|
var {
|
|
190824
|
-
dh
|
|
190831
|
+
dh
|
|
190825
190832
|
} = this;
|
|
190826
190833
|
switch (axisPosition) {
|
|
190827
|
-
case
|
|
190834
|
+
case dh.plot.AxisPosition.BOTTOM:
|
|
190828
190835
|
return "bottom";
|
|
190829
|
-
case
|
|
190836
|
+
case dh.plot.AxisPosition.TOP:
|
|
190830
190837
|
return "top";
|
|
190831
|
-
case
|
|
190838
|
+
case dh.plot.AxisPosition.LEFT:
|
|
190832
190839
|
return "left";
|
|
190833
|
-
case
|
|
190840
|
+
case dh.plot.AxisPosition.RIGHT:
|
|
190834
190841
|
return "right";
|
|
190835
190842
|
default:
|
|
190836
190843
|
return void 0;
|
|
@@ -190862,7 +190869,7 @@ class ChartUtils {
|
|
|
190862
190869
|
getChartBounds(figure, chart, plotWidth, plotHeight) {
|
|
190863
190870
|
var _axisPositionMap$get;
|
|
190864
190871
|
var {
|
|
190865
|
-
dh
|
|
190872
|
+
dh
|
|
190866
190873
|
} = this;
|
|
190867
190874
|
var {
|
|
190868
190875
|
cols,
|
|
@@ -190888,7 +190895,7 @@ class ChartUtils {
|
|
|
190888
190895
|
right: endColumn * columnSize - (endColumn < cols ? xMarginSize / 2 : 0)
|
|
190889
190896
|
};
|
|
190890
190897
|
var axisPositionMap = ChartUtils.groupArray(chart.axes, "position");
|
|
190891
|
-
var rightAxes = (_axisPositionMap$get = axisPositionMap.get(
|
|
190898
|
+
var rightAxes = (_axisPositionMap$get = axisPositionMap.get(dh.plot.AxisPosition.RIGHT)) !== null && _axisPositionMap$get !== void 0 ? _axisPositionMap$get : [];
|
|
190892
190899
|
if (rightAxes.length > 0) {
|
|
190893
190900
|
if (plotWidth > 0) {
|
|
190894
190901
|
bounds.right -= (bounds.right - bounds.left) * Math.max(0, Math.min(ChartUtils.LEGEND_WIDTH_PX / plotWidth, ChartUtils.MAX_LEGEND_SIZE));
|
|
@@ -190900,13 +190907,13 @@ class ChartUtils {
|
|
|
190900
190907
|
}
|
|
190901
190908
|
getPlotlyDateFormat(formatter, columnType, formatPattern) {
|
|
190902
190909
|
var {
|
|
190903
|
-
dh
|
|
190910
|
+
dh
|
|
190904
190911
|
} = this;
|
|
190905
190912
|
var tickformat = formatPattern == null ? void 0 : formatPattern.replace("%", "%%").replace(/S{9}/g, "%9f").replace(/S{8}/g, "%8f").replace(/S{7}/g, "%7f").replace(/S{6}/g, "%6f").replace(/S{5}/g, "%5f").replace(/S{4}/g, "%4f").replace(/S{3}/g, "%3f").replace(/S{2}/g, "%2f").replace(/S{1}/g, "%1f").replace(/y{4}/g, "%Y").replace(/y{2}/g, "%y").replace(/M{4}/g, "%B").replace(/M{3}/g, "%b").replace(/M{2}/g, "%m").replace(/M{1}/g, "%-m").replace(/E{4,}/g, "%A").replace(/E{1,}/g, "%a").replace(/d{2}/g, "%d").replace(/([^%]|^)d{1}/g, "$1%-d").replace(/H{2}/g, "%H").replace(/h{2}/g, "%I").replace(/h{1}/g, "%-I").replace(/m{2}/g, "%M").replace(/s{2}/g, "%S").replace("'T'", "T").replace(" z", "");
|
|
190906
190913
|
var ticksuffix;
|
|
190907
190914
|
var dataFormatter = formatter === null || formatter === void 0 ? void 0 : formatter.getColumnTypeFormatter(columnType);
|
|
190908
190915
|
if (dataFormatter != null && isDateTimeColumnFormatter(dataFormatter) && dataFormatter.dhTimeZone != null && dataFormatter.showTimeZone) {
|
|
190909
|
-
ticksuffix =
|
|
190916
|
+
ticksuffix = dh.i18n.DateTimeFormat.format(" z", new Date(), dataFormatter.dhTimeZone);
|
|
190910
190917
|
}
|
|
190911
190918
|
return {
|
|
190912
190919
|
tickformat,
|
|
@@ -190922,7 +190929,7 @@ class ChartUtils {
|
|
|
190922
190929
|
getPlotlyAxisFormat(source) {
|
|
190923
190930
|
var formatter = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
190924
190931
|
var {
|
|
190925
|
-
dh
|
|
190932
|
+
dh
|
|
190926
190933
|
} = this;
|
|
190927
190934
|
var {
|
|
190928
190935
|
axis,
|
|
@@ -190939,7 +190946,7 @@ class ChartUtils {
|
|
|
190939
190946
|
axisFormat = ChartUtils.getPlotlyNumberFormat(formatter, columnType, formatPattern);
|
|
190940
190947
|
axisFormat = ChartUtils.addTickSpacing(axisFormat, axis, false);
|
|
190941
190948
|
}
|
|
190942
|
-
if (axis.formatType ===
|
|
190949
|
+
if (axis.formatType === dh.plot.AxisFormatType.CATEGORY) {
|
|
190943
190950
|
if (axisFormat) {
|
|
190944
190951
|
axisFormat.type = "category";
|
|
190945
190952
|
} else {
|
|
@@ -190977,7 +190984,7 @@ class ChartUtils {
|
|
|
190977
190984
|
var axisRangeParser = arguments.length > 6 ? arguments[6] : void 0;
|
|
190978
190985
|
var theme = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : ChartTheme;
|
|
190979
190986
|
var {
|
|
190980
|
-
dh
|
|
190987
|
+
dh
|
|
190981
190988
|
} = this;
|
|
190982
190989
|
var xAxisSize = plotWidth > 0 ? Math.max(ChartUtils.MIN_AXIS_SIZE, Math.min(ChartUtils.AXIS_SIZE_PX / plotHeight, ChartUtils.MAX_AXIS_SIZE)) : ChartUtils.DEFAULT_AXIS_SIZE;
|
|
190983
190990
|
var yAxisSize = plotHeight > 0 ? Math.max(ChartUtils.MIN_AXIS_SIZE, Math.min(ChartUtils.AXIS_SIZE_PX / plotWidth, ChartUtils.MAX_AXIS_SIZE)) : ChartUtils.DEFAULT_AXIS_SIZE;
|
|
@@ -190992,7 +190999,7 @@ class ChartUtils {
|
|
|
190992
190999
|
if (axisProperty != null) {
|
|
190993
191000
|
var typeAxes = axisTypeMap.get(axisType);
|
|
190994
191001
|
var figureTypeAxes = figureAxisTypeMap.get(axisType);
|
|
190995
|
-
var isYAxis = axisType ===
|
|
191002
|
+
var isYAxis = axisType === dh.plot.AxisType.Y;
|
|
190996
191003
|
var plotSize = isYAxis ? plotHeight : plotWidth;
|
|
190997
191004
|
assertNotNull(typeAxes);
|
|
190998
191005
|
assertNotNull(figureTypeAxes);
|
|
@@ -191013,7 +191020,7 @@ class ChartUtils {
|
|
|
191013
191020
|
if (axisRangeParser != null && _range !== void 0 && (autorange2 === void 0 || autorange2 === false)) {
|
|
191014
191021
|
var rangeParser = axisRangeParser(_axis2);
|
|
191015
191022
|
var [rangeStart, rangeEnd] = rangeParser(_range);
|
|
191016
|
-
log$
|
|
191023
|
+
log$c.debug("Setting downsample range", plotSize, rangeStart, rangeEnd);
|
|
191017
191024
|
_axis2.range(plotSize, rangeStart, rangeEnd);
|
|
191018
191025
|
} else {
|
|
191019
191026
|
_axis2.range(plotSize);
|
|
@@ -191060,9 +191067,9 @@ class ChartUtils {
|
|
|
191060
191067
|
updateLayoutAxis(layoutAxisParam, axis, axisIndex, axisPositionMap, xAxisSize, yAxisSize, bounds) {
|
|
191061
191068
|
var _axis$label;
|
|
191062
191069
|
var {
|
|
191063
|
-
dh
|
|
191070
|
+
dh
|
|
191064
191071
|
} = this;
|
|
191065
|
-
var isYAxis = axis.type ===
|
|
191072
|
+
var isYAxis = axis.type === dh.plot.AxisType.Y;
|
|
191066
191073
|
var axisSize = isYAxis ? yAxisSize : xAxisSize;
|
|
191067
191074
|
var layoutAxis = layoutAxisParam;
|
|
191068
191075
|
var label = (_axis$label = axis.label) !== null && _axis$label !== void 0 ? _axis$label : "";
|
|
@@ -191084,25 +191091,25 @@ class ChartUtils {
|
|
|
191084
191091
|
var sideIndex = positionAxes.indexOf(axis);
|
|
191085
191092
|
if (sideIndex > 0) {
|
|
191086
191093
|
layoutAxis.anchor = "free";
|
|
191087
|
-
if (axis.position ===
|
|
191094
|
+
if (axis.position === dh.plot.AxisPosition.RIGHT) {
|
|
191088
191095
|
layoutAxis.position = bounds.right + (sideIndex - positionAxes.length + 1) * axisSize;
|
|
191089
|
-
} else if (axis.position ===
|
|
191096
|
+
} else if (axis.position === dh.plot.AxisPosition.TOP) {
|
|
191090
191097
|
layoutAxis.position = bounds.top + (sideIndex - positionAxes.length + 1) * axisSize;
|
|
191091
|
-
} else if (axis.position ===
|
|
191098
|
+
} else if (axis.position === dh.plot.AxisPosition.BOTTOM) {
|
|
191092
191099
|
layoutAxis.position = bounds.bottom + (positionAxes.length - sideIndex + 1) * axisSize;
|
|
191093
|
-
} else if (axis.position ===
|
|
191100
|
+
} else if (axis.position === dh.plot.AxisPosition.LEFT) {
|
|
191094
191101
|
layoutAxis.position = bounds.left + (positionAxes.length - sideIndex + 1) * axisSize;
|
|
191095
191102
|
}
|
|
191096
191103
|
}
|
|
191097
|
-
} else if (axis.type ===
|
|
191098
|
-
var leftAxes = axisPositionMap.get(
|
|
191099
|
-
var rightAxes = axisPositionMap.get(
|
|
191104
|
+
} else if (axis.type === dh.plot.AxisType.X) {
|
|
191105
|
+
var leftAxes = axisPositionMap.get(dh.plot.AxisPosition.LEFT) || [];
|
|
191106
|
+
var rightAxes = axisPositionMap.get(dh.plot.AxisPosition.RIGHT) || [];
|
|
191100
191107
|
var left = Math.max(bounds.left, bounds.left + (leftAxes.length - 1) * yAxisSize);
|
|
191101
191108
|
var right = Math.min(bounds.right - (rightAxes.length - 1) * yAxisSize, bounds.right);
|
|
191102
191109
|
layoutAxis.domain = [left, right];
|
|
191103
|
-
} else if (axis.type ===
|
|
191104
|
-
var bottomAxes = axisPositionMap.get(
|
|
191105
|
-
var topAxes = axisPositionMap.get(
|
|
191110
|
+
} else if (axis.type === dh.plot.AxisType.Y) {
|
|
191111
|
+
var bottomAxes = axisPositionMap.get(dh.plot.AxisPosition.BOTTOM) || [];
|
|
191112
|
+
var topAxes = axisPositionMap.get(dh.plot.AxisPosition.TOP) || [];
|
|
191106
191113
|
var bottom = Math.max(bounds.bottom, bounds.bottom + (bottomAxes.length - 1) * xAxisSize);
|
|
191107
191114
|
var top = Math.min(bounds.top - (topAxes.length - 1) * xAxisSize, bounds.top);
|
|
191108
191115
|
layoutAxis.domain = [bottom, top];
|
|
@@ -191231,7 +191238,7 @@ class ChartUtils {
|
|
|
191231
191238
|
*/
|
|
191232
191239
|
makeFigureSettings(settings, table) {
|
|
191233
191240
|
var {
|
|
191234
|
-
dh
|
|
191241
|
+
dh
|
|
191235
191242
|
} = this;
|
|
191236
191243
|
var {
|
|
191237
191244
|
series,
|
|
@@ -191240,29 +191247,29 @@ class ChartUtils {
|
|
|
191240
191247
|
} = settings;
|
|
191241
191248
|
var title = ChartUtils.titleFromSettings(settings);
|
|
191242
191249
|
var xAxis = {
|
|
191243
|
-
formatType: "".concat(
|
|
191244
|
-
type: "".concat(
|
|
191245
|
-
position: "".concat(
|
|
191250
|
+
formatType: "".concat(dh.plot.AxisFormatType.NUMBER),
|
|
191251
|
+
type: "".concat(dh.plot.AxisType.X),
|
|
191252
|
+
position: "".concat(dh.plot.AxisPosition.BOTTOM)
|
|
191246
191253
|
};
|
|
191247
191254
|
var yAxis = {
|
|
191248
|
-
formatType: "".concat(
|
|
191249
|
-
type: "".concat(
|
|
191250
|
-
position: "".concat(
|
|
191255
|
+
formatType: "".concat(dh.plot.AxisFormatType.NUMBER),
|
|
191256
|
+
type: "".concat(dh.plot.AxisType.Y),
|
|
191257
|
+
position: "".concat(dh.plot.AxisPosition.LEFT)
|
|
191251
191258
|
};
|
|
191252
191259
|
return {
|
|
191253
191260
|
charts: [{
|
|
191254
|
-
chartType: "".concat(
|
|
191261
|
+
chartType: "".concat(dh.plot.ChartType.XY),
|
|
191255
191262
|
axes: [xAxis, yAxis],
|
|
191256
191263
|
series: (series !== null && series !== void 0 ? series : []).map((name2) => ({
|
|
191257
191264
|
plotStyle: "".concat(type),
|
|
191258
191265
|
name: name2,
|
|
191259
191266
|
dataSources: [{
|
|
191260
|
-
type: "".concat(
|
|
191267
|
+
type: "".concat(dh.plot.SourceType.X),
|
|
191261
191268
|
columnName: settingsAxis !== null && settingsAxis !== void 0 ? settingsAxis : "",
|
|
191262
191269
|
axis: xAxis,
|
|
191263
191270
|
table
|
|
191264
191271
|
}, {
|
|
191265
|
-
type: "".concat(
|
|
191272
|
+
type: "".concat(dh.plot.SourceType.Y),
|
|
191266
191273
|
columnName: name2,
|
|
191267
191274
|
axis: yAxis,
|
|
191268
191275
|
table
|
|
@@ -191278,11 +191285,11 @@ class ChartUtils {
|
|
|
191278
191285
|
*/
|
|
191279
191286
|
unwrapValue(value2, timeZone) {
|
|
191280
191287
|
var {
|
|
191281
|
-
dh
|
|
191288
|
+
dh
|
|
191282
191289
|
} = this;
|
|
191283
191290
|
if (value2 != null) {
|
|
191284
191291
|
if (isDateWrapper$1(value2)) {
|
|
191285
|
-
return
|
|
191292
|
+
return dh.i18n.DateTimeFormat.format(ChartUtils.DATE_FORMAT, value2, timeZone);
|
|
191286
191293
|
}
|
|
191287
191294
|
if (isLongWrapper(value2)) {
|
|
191288
191295
|
return value2.asNumber();
|
|
@@ -191299,27 +191306,27 @@ class ChartUtils {
|
|
|
191299
191306
|
wrapValue(value2, columnType) {
|
|
191300
191307
|
var timeZone = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null;
|
|
191301
191308
|
var {
|
|
191302
|
-
dh
|
|
191309
|
+
dh
|
|
191303
191310
|
} = this;
|
|
191304
191311
|
if (TableUtils.isDateType(columnType) && typeof value2 === "string") {
|
|
191305
191312
|
var text = value2;
|
|
191306
191313
|
var format2 = ChartUtils.DATE_FORMAT.substr(0, value2.length);
|
|
191307
|
-
var date2 =
|
|
191314
|
+
var date2 = dh.i18n.DateTimeFormat.parse(format2, text);
|
|
191308
191315
|
if (!timeZone) {
|
|
191309
191316
|
return date2;
|
|
191310
191317
|
}
|
|
191311
191318
|
var tzFormat = "".concat(format2, " Z");
|
|
191312
|
-
var estimatedOffset =
|
|
191313
|
-
var estimatedDate =
|
|
191314
|
-
var offset2 =
|
|
191315
|
-
return
|
|
191319
|
+
var estimatedOffset = dh.i18n.DateTimeFormat.format("Z", date2, timeZone);
|
|
191320
|
+
var estimatedDate = dh.i18n.DateTimeFormat.parse(tzFormat, "".concat(text, " ").concat(estimatedOffset));
|
|
191321
|
+
var offset2 = dh.i18n.DateTimeFormat.format("Z", estimatedDate, timeZone);
|
|
191322
|
+
return dh.i18n.DateTimeFormat.parse(tzFormat, "".concat(text, " ").concat(offset2));
|
|
191316
191323
|
}
|
|
191317
191324
|
return value2;
|
|
191318
191325
|
}
|
|
191319
191326
|
makeLayoutAxis(type) {
|
|
191320
191327
|
var theme = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ChartTheme;
|
|
191321
191328
|
var {
|
|
191322
|
-
dh
|
|
191329
|
+
dh
|
|
191323
191330
|
} = this;
|
|
191324
191331
|
var axis = {
|
|
191325
191332
|
automargin: true,
|
|
@@ -191342,11 +191349,11 @@ class ChartUtils {
|
|
|
191342
191349
|
}
|
|
191343
191350
|
}
|
|
191344
191351
|
};
|
|
191345
|
-
if (type ===
|
|
191352
|
+
if (type === dh.plot.AxisType.X) {
|
|
191346
191353
|
Object.assign(axis, {
|
|
191347
191354
|
showgrid: true
|
|
191348
191355
|
});
|
|
191349
|
-
} else if (type ===
|
|
191356
|
+
} else if (type === dh.plot.AxisType.Y) {
|
|
191350
191357
|
Object.assign(axis, {
|
|
191351
191358
|
zerolinecolor: theme.zerolinecolor,
|
|
191352
191359
|
zerolinewidth: 2
|
|
@@ -191357,7 +191364,7 @@ class ChartUtils {
|
|
|
191357
191364
|
makeDefaultLayout() {
|
|
191358
191365
|
var theme = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ChartTheme;
|
|
191359
191366
|
var {
|
|
191360
|
-
dh
|
|
191367
|
+
dh
|
|
191361
191368
|
} = this;
|
|
191362
191369
|
var layout = _objectSpread$a(_objectSpread$a({}, theme), {}, {
|
|
191363
191370
|
autosize: true,
|
|
@@ -191380,17 +191387,17 @@ class ChartUtils {
|
|
|
191380
191387
|
}
|
|
191381
191388
|
},
|
|
191382
191389
|
margin: _objectSpread$a({}, ChartUtils.DEFAULT_MARGIN),
|
|
191383
|
-
xaxis: this.makeLayoutAxis(
|
|
191384
|
-
yaxis: this.makeLayoutAxis(
|
|
191390
|
+
xaxis: this.makeLayoutAxis(dh.plot.AxisType.X, theme),
|
|
191391
|
+
yaxis: this.makeLayoutAxis(dh.plot.AxisType.Y, theme),
|
|
191385
191392
|
polar: {
|
|
191386
|
-
angularaxis: this.makeLayoutAxis(
|
|
191387
|
-
radialaxis: this.makeLayoutAxis(
|
|
191393
|
+
angularaxis: this.makeLayoutAxis(dh.plot.AxisType.SHAPE, theme),
|
|
191394
|
+
radialaxis: this.makeLayoutAxis(dh.plot.AxisType.SHAPE, theme),
|
|
191388
191395
|
bgcolor: theme.plot_bgcolor
|
|
191389
191396
|
},
|
|
191390
191397
|
scene: {
|
|
191391
|
-
xaxis: this.makeLayoutAxis(
|
|
191392
|
-
yaxis: this.makeLayoutAxis(
|
|
191393
|
-
zaxis: this.makeLayoutAxis(
|
|
191398
|
+
xaxis: this.makeLayoutAxis(dh.plot.AxisType.X, theme),
|
|
191399
|
+
yaxis: this.makeLayoutAxis(dh.plot.AxisType.Y, theme),
|
|
191400
|
+
zaxis: this.makeLayoutAxis(dh.plot.AxisType.Z, theme)
|
|
191394
191401
|
}
|
|
191395
191402
|
});
|
|
191396
191403
|
layout.datarevision = 0;
|
|
@@ -191402,10 +191409,10 @@ class ChartUtils {
|
|
|
191402
191409
|
*/
|
|
191403
191410
|
hydrateSettings(settings) {
|
|
191404
191411
|
var {
|
|
191405
|
-
dh
|
|
191412
|
+
dh
|
|
191406
191413
|
} = this;
|
|
191407
191414
|
return _objectSpread$a(_objectSpread$a({}, settings), {}, {
|
|
191408
|
-
type: settings.type != null ?
|
|
191415
|
+
type: settings.type != null ? dh.plot.SeriesPlotStyle[settings.type] : void 0
|
|
191409
191416
|
});
|
|
191410
191417
|
}
|
|
191411
191418
|
}
|
|
@@ -191482,7 +191489,7 @@ function _toPrimitive$l(input, hint) {
|
|
|
191482
191489
|
}
|
|
191483
191490
|
return (hint === "string" ? String : Number)(input);
|
|
191484
191491
|
}
|
|
191485
|
-
var log$
|
|
191492
|
+
var log$b = Log$1.module("Chart");
|
|
191486
191493
|
class Chart extends React.Component {
|
|
191487
191494
|
/**
|
|
191488
191495
|
* Convert a font awesome icon definition to a plotly icon definition
|
|
@@ -191662,7 +191669,7 @@ class Chart extends React.Component {
|
|
|
191662
191669
|
model
|
|
191663
191670
|
} = this.props;
|
|
191664
191671
|
if (!this.rect || this.rect.width === 0 || this.rect.height === 0) {
|
|
191665
|
-
log$
|
|
191672
|
+
log$b.debug2("Delaying subscription until model dimensions are set");
|
|
191666
191673
|
return;
|
|
191667
191674
|
}
|
|
191668
191675
|
model.subscribe(this.handleModelEvent);
|
|
@@ -191708,7 +191715,7 @@ class Chart extends React.Component {
|
|
|
191708
191715
|
type,
|
|
191709
191716
|
detail
|
|
191710
191717
|
} = event;
|
|
191711
|
-
log$
|
|
191718
|
+
log$b.debug2("Received data update", type, detail);
|
|
191712
191719
|
switch (type) {
|
|
191713
191720
|
case ChartModel$1.EVENT_UPDATED: {
|
|
191714
191721
|
this.currentSeries += 1;
|
|
@@ -191791,7 +191798,7 @@ class Chart extends React.Component {
|
|
|
191791
191798
|
break;
|
|
191792
191799
|
}
|
|
191793
191800
|
default:
|
|
191794
|
-
log$
|
|
191801
|
+
log$b.debug("Unknown event type", type, event);
|
|
191795
191802
|
}
|
|
191796
191803
|
}
|
|
191797
191804
|
handlePlotUpdate(figure) {
|
|
@@ -191806,7 +191813,7 @@ class Chart extends React.Component {
|
|
|
191806
191813
|
}
|
|
191807
191814
|
}
|
|
191808
191815
|
handleRelayout(changes) {
|
|
191809
|
-
log$
|
|
191816
|
+
log$b.debug("handleRelayout", changes);
|
|
191810
191817
|
if (changes.hiddenlabels != null) {
|
|
191811
191818
|
var {
|
|
191812
191819
|
onSettingsChanged
|
|
@@ -191820,7 +191827,7 @@ class Chart extends React.Component {
|
|
|
191820
191827
|
}
|
|
191821
191828
|
handleRestyle(_ref4) {
|
|
191822
191829
|
var [changes, seriesIndexes] = _ref4;
|
|
191823
|
-
log$
|
|
191830
|
+
log$b.debug("handleRestyle", changes, seriesIndexes);
|
|
191824
191831
|
if (Object.keys(changes).includes("visible")) {
|
|
191825
191832
|
var {
|
|
191826
191833
|
data
|
|
@@ -191854,7 +191861,7 @@ class Chart extends React.Component {
|
|
|
191854
191861
|
var force = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
191855
191862
|
var rect2 = this.getPlotRect();
|
|
191856
191863
|
if (!rect2) {
|
|
191857
|
-
log$
|
|
191864
|
+
log$b.warn("Unable to get plotting rect");
|
|
191858
191865
|
return;
|
|
191859
191866
|
}
|
|
191860
191867
|
var isRectChanged = !this.rect || this.rect.width !== rect2.width || this.rect.height !== rect2.height;
|
|
@@ -191907,7 +191914,7 @@ class Chart extends React.Component {
|
|
|
191907
191914
|
PlotlyProp.relayout(this.plot.current.el, {
|
|
191908
191915
|
autosize: true
|
|
191909
191916
|
}).catch((e) => {
|
|
191910
|
-
log$
|
|
191917
|
+
log$b.debug("Unable to resize, promise rejected", e);
|
|
191911
191918
|
});
|
|
191912
191919
|
}
|
|
191913
191920
|
}
|
|
@@ -191938,7 +191945,7 @@ class Chart extends React.Component {
|
|
|
191938
191945
|
revision,
|
|
191939
191946
|
config: config2,
|
|
191940
191947
|
onAfterPlot: this.handleAfterPlot,
|
|
191941
|
-
onError: log$
|
|
191948
|
+
onError: log$b.error,
|
|
191942
191949
|
onRelayout: this.handleRelayout,
|
|
191943
191950
|
onUpdate: this.handlePlotUpdate,
|
|
191944
191951
|
onRestyle: this.handleRestyle,
|
|
@@ -192129,7 +192136,7 @@ function _toPrimitive$k(input, hint) {
|
|
|
192129
192136
|
}
|
|
192130
192137
|
return (hint === "string" ? String : Number)(input);
|
|
192131
192138
|
}
|
|
192132
|
-
var log$
|
|
192139
|
+
var log$a = Log$1.module("LayoutUtils");
|
|
192133
192140
|
function isComponentConfig(config2) {
|
|
192134
192141
|
return config2.componentName !== void 0;
|
|
192135
192142
|
}
|
|
@@ -192147,7 +192154,7 @@ class LayoutUtils2 {
|
|
|
192147
192154
|
static activateTab(root2, config2) {
|
|
192148
192155
|
var stack = LayoutUtils2.getStackForRoot(root2, config2, false);
|
|
192149
192156
|
if (!stack) {
|
|
192150
|
-
log$
|
|
192157
|
+
log$a.error("Could not find stack for config", config2);
|
|
192151
192158
|
return;
|
|
192152
192159
|
}
|
|
192153
192160
|
var contentItem = LayoutUtils2.getContentItemInStack(stack, config2);
|
|
@@ -192164,7 +192171,7 @@ class LayoutUtils2 {
|
|
|
192164
192171
|
static isActiveTab(root2, config2) {
|
|
192165
192172
|
var stack = LayoutUtils2.getStackForRoot(root2, config2, false);
|
|
192166
192173
|
if (!stack) {
|
|
192167
|
-
log$
|
|
192174
|
+
log$a.error("Could not find stack for config", config2);
|
|
192168
192175
|
return false;
|
|
192169
192176
|
}
|
|
192170
192177
|
var contentItem = LayoutUtils2.getContentItemInStack(stack, config2);
|
|
@@ -192334,7 +192341,7 @@ class LayoutUtils2 {
|
|
|
192334
192341
|
if (dehydratedComponent != null) {
|
|
192335
192342
|
dehydratedConfig.push(dehydratedComponent);
|
|
192336
192343
|
} else {
|
|
192337
|
-
log$
|
|
192344
|
+
log$a.debug2('dehydrateLayoutConfig: skipping unmapped component "'.concat(component, '"'));
|
|
192338
192345
|
}
|
|
192339
192346
|
} else if (content) {
|
|
192340
192347
|
var layoutItemConfig = _objectSpread$8(_objectSpread$8({}, itemConfig), {}, {
|
|
@@ -192434,7 +192441,7 @@ class LayoutUtils2 {
|
|
|
192434
192441
|
} else if (itemConfig.content !== void 0) {
|
|
192435
192442
|
var contentConfig = LayoutUtils2.hydrateLayoutConfig(itemConfig.content, hydrateComponent);
|
|
192436
192443
|
if (isStackItemConfig(itemConfig) && itemConfig.activeItemIndex != null && itemConfig.activeItemIndex >= contentConfig.length) {
|
|
192437
|
-
log$
|
|
192444
|
+
log$a.warn("Fixing bad activeItemIndex!", itemConfig.activeItemIndex, itemConfig);
|
|
192438
192445
|
itemConfig.activeItemIndex = 0;
|
|
192439
192446
|
}
|
|
192440
192447
|
hydratedConfig.push(_objectSpread$8(_objectSpread$8({}, itemConfig), {}, {
|
|
@@ -192487,7 +192494,7 @@ class LayoutUtils2 {
|
|
|
192487
192494
|
var oldContentItem = LayoutUtils2.getContentItemInStack(stack, searchConfig);
|
|
192488
192495
|
if (focusElement != null) {
|
|
192489
192496
|
var onComponentCreated = (event) => {
|
|
192490
|
-
log$
|
|
192497
|
+
log$a.debug("Component created, focusing element", focusElement);
|
|
192491
192498
|
stack.off("componentCreated", onComponentCreated);
|
|
192492
192499
|
var {
|
|
192493
192500
|
element
|
|
@@ -192544,7 +192551,7 @@ class LayoutUtils2 {
|
|
|
192544
192551
|
static closeComponent(root2, config2, closeOptions) {
|
|
192545
192552
|
var stack = LayoutUtils2.getStackForRoot(root2, config2, false, false, false);
|
|
192546
192553
|
if (!stack) {
|
|
192547
|
-
log$
|
|
192554
|
+
log$a.warn("Cannot find stack for component, ignoring close", config2);
|
|
192548
192555
|
return;
|
|
192549
192556
|
}
|
|
192550
192557
|
var oldContentItem = LayoutUtils2.getContentItemInStack(stack, config2);
|
|
@@ -192563,7 +192570,7 @@ class LayoutUtils2 {
|
|
|
192563
192570
|
static renameComponent(root2, config2, newTitle) {
|
|
192564
192571
|
var stack = LayoutUtils2.getStackForRoot(root2, config2, false);
|
|
192565
192572
|
if (!stack) {
|
|
192566
|
-
log$
|
|
192573
|
+
log$a.error("Could not find stack for config", config2);
|
|
192567
192574
|
return;
|
|
192568
192575
|
}
|
|
192569
192576
|
var contentItem = LayoutUtils2.getContentItemInStack(stack, config2);
|
|
@@ -192580,7 +192587,7 @@ class LayoutUtils2 {
|
|
|
192580
192587
|
static cloneComponent(root2, config2) {
|
|
192581
192588
|
var stack = LayoutUtils2.getStackForRoot(root2, config2, false);
|
|
192582
192589
|
if (!stack) {
|
|
192583
|
-
log$
|
|
192590
|
+
log$a.error("Could not find stack for config", config2);
|
|
192584
192591
|
return null;
|
|
192585
192592
|
}
|
|
192586
192593
|
var {
|
|
@@ -192843,7 +192850,7 @@ function _toPrimitive$j(input, hint) {
|
|
|
192843
192850
|
}
|
|
192844
192851
|
return (hint === "string" ? String : Number)(input);
|
|
192845
192852
|
}
|
|
192846
|
-
var log$
|
|
192853
|
+
var log$9 = Log$1.module("PanelManager");
|
|
192847
192854
|
class PanelManager2 {
|
|
192848
192855
|
/**
|
|
192849
192856
|
* @param layout The GoldenLayout object to attach to
|
|
@@ -192952,28 +192959,28 @@ class PanelManager2 {
|
|
|
192952
192959
|
updatePanel(panel) {
|
|
192953
192960
|
var panelId = LayoutUtils2.getIdFromPanel(panel);
|
|
192954
192961
|
if (panelId == null) {
|
|
192955
|
-
log$
|
|
192962
|
+
log$9.error("updatePanel Panel did not have an ID", panel);
|
|
192956
192963
|
return;
|
|
192957
192964
|
}
|
|
192958
|
-
log$
|
|
192965
|
+
log$9.debug2("Updating panel ID ".concat(panelId, " in open panels map"));
|
|
192959
192966
|
this.openedMap.delete(panelId);
|
|
192960
192967
|
this.openedMap.set(panelId, panel);
|
|
192961
192968
|
}
|
|
192962
192969
|
removePanel(panel) {
|
|
192963
192970
|
var panelId = LayoutUtils2.getIdFromPanel(panel);
|
|
192964
192971
|
if (panelId == null) {
|
|
192965
|
-
log$
|
|
192972
|
+
log$9.error("removePanel Panel did not have an ID", panel);
|
|
192966
192973
|
return;
|
|
192967
192974
|
}
|
|
192968
192975
|
if (!this.openedMap.has(panelId)) {
|
|
192969
|
-
log$
|
|
192976
|
+
log$9.error("Missing panel ID ".concat(panelId, " in open panels map"));
|
|
192970
192977
|
return;
|
|
192971
192978
|
}
|
|
192972
192979
|
if (this.openedMap.get(panelId) !== panel) {
|
|
192973
|
-
log$
|
|
192980
|
+
log$9.debug("Panel argument doesn't match the open panels map entry for ".concat(panelId, ", removePanel ignored"));
|
|
192974
192981
|
return;
|
|
192975
192982
|
}
|
|
192976
|
-
log$
|
|
192983
|
+
log$9.debug2("Removing panel ID ".concat(panelId, " from open panels map"));
|
|
192977
192984
|
this.openedMap.delete(panelId);
|
|
192978
192985
|
}
|
|
192979
192986
|
removeClosedPanelConfig(panelConfig) {
|
|
@@ -192983,16 +192990,16 @@ class PanelManager2 {
|
|
|
192983
192990
|
}
|
|
192984
192991
|
}
|
|
192985
192992
|
handleFocus(panel) {
|
|
192986
|
-
log$
|
|
192993
|
+
log$9.debug2("Focus: ", panel);
|
|
192987
192994
|
this.updatePanel(panel);
|
|
192988
192995
|
}
|
|
192989
192996
|
handleMount(panel) {
|
|
192990
|
-
log$
|
|
192997
|
+
log$9.debug2("Mount: ", panel);
|
|
192991
192998
|
this.updatePanel(panel);
|
|
192992
192999
|
this.sendUpdate();
|
|
192993
193000
|
}
|
|
192994
193001
|
handleUnmount(panel) {
|
|
192995
|
-
log$
|
|
193002
|
+
log$9.debug2("Unmount: ", panel);
|
|
192996
193003
|
this.removePanel(panel);
|
|
192997
193004
|
this.sendUpdate();
|
|
192998
193005
|
}
|
|
@@ -193002,7 +193009,7 @@ class PanelManager2 {
|
|
|
193002
193009
|
* @param replaceConfig The config to place
|
|
193003
193010
|
*/
|
|
193004
193011
|
handleReopen(panelConfig, replaceConfig) {
|
|
193005
|
-
log$
|
|
193012
|
+
log$9.debug2("Reopen:", panelConfig, replaceConfig);
|
|
193006
193013
|
this.removeClosedPanelConfig(panelConfig);
|
|
193007
193014
|
var {
|
|
193008
193015
|
component
|
|
@@ -193024,12 +193031,12 @@ class PanelManager2 {
|
|
|
193024
193031
|
});
|
|
193025
193032
|
}
|
|
193026
193033
|
handleDeleted(panelConfig) {
|
|
193027
|
-
log$
|
|
193034
|
+
log$9.debug2("Deleted:", panelConfig);
|
|
193028
193035
|
this.removeClosedPanelConfig(panelConfig);
|
|
193029
193036
|
this.sendUpdate();
|
|
193030
193037
|
}
|
|
193031
193038
|
handleClosed(panelId, glContainer) {
|
|
193032
|
-
log$
|
|
193039
|
+
log$9.debug2("Closed: ", panelId);
|
|
193033
193040
|
this.addClosedPanel(glContainer);
|
|
193034
193041
|
this.sendUpdate();
|
|
193035
193042
|
}
|
|
@@ -193502,7 +193509,7 @@ function _toPrimitive$g(input, hint) {
|
|
|
193502
193509
|
}
|
|
193503
193510
|
return (hint === "string" ? String : Number)(input);
|
|
193504
193511
|
}
|
|
193505
|
-
var log$
|
|
193512
|
+
var log$8 = Log$1.module("Tooltip");
|
|
193506
193513
|
class Tooltip extends React.Component {
|
|
193507
193514
|
static handleHidden() {
|
|
193508
193515
|
Tooltip.shownTooltipCount -= 1;
|
|
@@ -193571,7 +193578,7 @@ class Tooltip extends React.Component {
|
|
|
193571
193578
|
}
|
|
193572
193579
|
startListening() {
|
|
193573
193580
|
if (!this.container.current || !this.container.current.parentElement) {
|
|
193574
|
-
log$
|
|
193581
|
+
log$8.error("Tooltip doesn't have a container or a parent set!");
|
|
193575
193582
|
return;
|
|
193576
193583
|
}
|
|
193577
193584
|
this.parent = this.container.current.parentElement;
|
|
@@ -194174,7 +194181,7 @@ class ContextActionUtils {
|
|
|
194174
194181
|
}
|
|
194175
194182
|
_defineProperty$f(ContextActionUtils, "actionsDisabled", false);
|
|
194176
194183
|
const ContextActionUtils$1 = ContextActionUtils;
|
|
194177
|
-
var log$
|
|
194184
|
+
var log$7 = Log$1.module("GlobalContextAction");
|
|
194178
194185
|
class GlobalContextAction extends React.Component {
|
|
194179
194186
|
constructor(props) {
|
|
194180
194187
|
super(props);
|
|
@@ -194204,7 +194211,7 @@ class GlobalContextAction extends React.Component {
|
|
|
194204
194211
|
e.contextActions = [];
|
|
194205
194212
|
}
|
|
194206
194213
|
e.contextActions.push(action);
|
|
194207
|
-
log$
|
|
194214
|
+
log$7.debug("Received context menu event at global action! Menu items are now: ", e.contextActions);
|
|
194208
194215
|
}
|
|
194209
194216
|
handleKeyDown(e) {
|
|
194210
194217
|
var {
|
|
@@ -194212,7 +194219,7 @@ class GlobalContextAction extends React.Component {
|
|
|
194212
194219
|
} = this.props;
|
|
194213
194220
|
if (!ContextActionUtils$1.actionsDisabled && action.shortcut !== void 0 && action.shortcut.matchesEvent(e)) {
|
|
194214
194221
|
var _action$action;
|
|
194215
|
-
log$
|
|
194222
|
+
log$7.debug("Global hotkey matched!", e);
|
|
194216
194223
|
(_action$action = action.action) === null || _action$action === void 0 ? void 0 : _action$action.call(action, e);
|
|
194217
194224
|
e.preventDefault();
|
|
194218
194225
|
e.stopPropagation();
|
|
@@ -194274,7 +194281,7 @@ function _toPrimitive$e(input, hint) {
|
|
|
194274
194281
|
}
|
|
194275
194282
|
return (hint === "string" ? String : Number)(input);
|
|
194276
194283
|
}
|
|
194277
|
-
var log$
|
|
194284
|
+
var log$6 = Log$1.module("ContextActions");
|
|
194278
194285
|
class ContextActions extends React.Component {
|
|
194279
194286
|
/**
|
|
194280
194287
|
* Group you can assign to context menu actions to group them together.
|
|
@@ -194346,7 +194353,7 @@ class ContextActions extends React.Component {
|
|
|
194346
194353
|
} = el;
|
|
194347
194354
|
var ignoredClassName = ignoreClassNames.find((className) => classList2.contains(className));
|
|
194348
194355
|
if (ignoredClassName !== void 0) {
|
|
194349
|
-
log$
|
|
194356
|
+
log$6.debug2('Contextmenu event ignored based on the target className "'.concat(ignoredClassName, '"'));
|
|
194350
194357
|
return {
|
|
194351
194358
|
v: void 0
|
|
194352
194359
|
};
|
|
@@ -194375,7 +194382,7 @@ class ContextActions extends React.Component {
|
|
|
194375
194382
|
}
|
|
194376
194383
|
e.contextActions = e.contextActions.concat(contextActions);
|
|
194377
194384
|
}
|
|
194378
|
-
log$
|
|
194385
|
+
log$6.debug("Received context menu event! Menu items are now: ", e.contextActions);
|
|
194379
194386
|
}
|
|
194380
194387
|
handleKeyDown(e) {
|
|
194381
194388
|
var {
|
|
@@ -194385,11 +194392,11 @@ class ContextActions extends React.Component {
|
|
|
194385
194392
|
var keyboardAction = keyboardActions[i];
|
|
194386
194393
|
if (!ContextActionUtils$1.actionsDisabled && keyboardAction.shortcut != null && keyboardAction.shortcut.matchesEvent(e)) {
|
|
194387
194394
|
var _keyboardAction$actio;
|
|
194388
|
-
log$
|
|
194395
|
+
log$6.debug("Context hotkey matched!", e);
|
|
194389
194396
|
(_keyboardAction$actio = keyboardAction.action) === null || _keyboardAction$actio === void 0 ? void 0 : _keyboardAction$actio.call(keyboardAction, e);
|
|
194390
194397
|
e.stopPropagation();
|
|
194391
194398
|
e.preventDefault();
|
|
194392
|
-
log$
|
|
194399
|
+
log$6.debug2("Matched hotkey returned false, key event not consumed");
|
|
194393
194400
|
}
|
|
194394
194401
|
}
|
|
194395
194402
|
}
|
|
@@ -194671,6 +194678,11 @@ Log$1.module("DashboardLayout");
|
|
|
194671
194678
|
onLayoutInitialized: propTypesExports.func
|
|
194672
194679
|
});
|
|
194673
194680
|
const Dashboard = "";
|
|
194681
|
+
Log$1.module("@deephaven/jsapi-bootstrap.ApiBootstrap");
|
|
194682
|
+
var ApiContext = /* @__PURE__ */ React.createContext(null);
|
|
194683
|
+
function useApi() {
|
|
194684
|
+
return useContextOrThrow(ApiContext, "No API available in useApi. Was code wrapped in ApiBootstrap or ApiContext.Provider?");
|
|
194685
|
+
}
|
|
194674
194686
|
const encodedTlds = "aaa1rp3barth4b0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0faromeo7ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re2s2c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y0eats7k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking0channel11l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t0isalat7u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0at2delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d0network8tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntdoor4ier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5gtv3iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0eles2s3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1nder2le4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster5ia3d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4de2k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0cys3drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7serati6ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic3tual5v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rthwesternmutual14on4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3ssagens7y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cher3ks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w0time7i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ffany5ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0channel7ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lkswagen7vo3te1ing3o2yage5u0elos6wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2";
|
|
194675
194687
|
const encodedUtlds = "ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5تصالات6رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2";
|
|
194676
194688
|
const assign3 = (target, properties) => {
|
|
@@ -197615,7 +197627,7 @@ function _toPrimitive$a(input, hint) {
|
|
|
197615
197627
|
}
|
|
197616
197628
|
return (hint === "string" ? String : Number)(input);
|
|
197617
197629
|
}
|
|
197618
|
-
var log$
|
|
197630
|
+
var log$5 = Log$1.module("ColumnHeaderGroup");
|
|
197619
197631
|
class ColumnHeaderGroup {
|
|
197620
197632
|
constructor(_ref2) {
|
|
197621
197633
|
var {
|
|
@@ -197638,7 +197650,7 @@ class ColumnHeaderGroup {
|
|
|
197638
197650
|
var start = Math.min(...visibleIndexes);
|
|
197639
197651
|
var end3 = Math.max(...visibleIndexes);
|
|
197640
197652
|
if (end3 - start !== flattenedIndexes.length - 1) {
|
|
197641
|
-
log$
|
|
197653
|
+
log$5.warn("Column header group ".concat(this.name, " is not contiguous"));
|
|
197642
197654
|
}
|
|
197643
197655
|
return [start, end3];
|
|
197644
197656
|
}));
|
|
@@ -197745,7 +197757,7 @@ function _toPrimitive$9(input, hint) {
|
|
|
197745
197757
|
}
|
|
197746
197758
|
return (hint === "string" ? String : Number)(input);
|
|
197747
197759
|
}
|
|
197748
|
-
var log$
|
|
197760
|
+
var log$4 = Log$1.module("IrisGridUtils");
|
|
197749
197761
|
function isValidIndex(x, array2) {
|
|
197750
197762
|
return x >= 0 && x < array2.length;
|
|
197751
197763
|
}
|
|
@@ -198295,7 +198307,7 @@ class IrisGridUtils {
|
|
|
198295
198307
|
if (columnIndex < columns.length) {
|
|
198296
198308
|
return columns[columnIndex];
|
|
198297
198309
|
}
|
|
198298
|
-
log$
|
|
198310
|
+
log$4.error("Unable to retrieve column", columnIndex, ">=", columns.length);
|
|
198299
198311
|
return null;
|
|
198300
198312
|
}
|
|
198301
198313
|
/**
|
|
@@ -198311,7 +198323,7 @@ class IrisGridUtils {
|
|
|
198311
198323
|
return name2 === columnName;
|
|
198312
198324
|
});
|
|
198313
198325
|
if (column == null) {
|
|
198314
|
-
log$
|
|
198326
|
+
log$4.error("Unable to retrieve column by name", columnName, columns.map((_ref16) => {
|
|
198315
198327
|
var {
|
|
198316
198328
|
name: name2
|
|
198317
198329
|
} = _ref16;
|
|
@@ -198496,11 +198508,11 @@ class IrisGridUtils {
|
|
|
198496
198508
|
}
|
|
198497
198509
|
return "".concat(value2);
|
|
198498
198510
|
}
|
|
198499
|
-
constructor(
|
|
198511
|
+
constructor(dh) {
|
|
198500
198512
|
_defineProperty$9(this, "dh", void 0);
|
|
198501
198513
|
_defineProperty$9(this, "tableUtils", void 0);
|
|
198502
|
-
this.dh =
|
|
198503
|
-
this.tableUtils = new TableUtils(
|
|
198514
|
+
this.dh = dh;
|
|
198515
|
+
this.tableUtils = new TableUtils(dh);
|
|
198504
198516
|
}
|
|
198505
198517
|
/**
|
|
198506
198518
|
* Exports the state from IrisGrid to a JSON stringifiable object
|
|
@@ -198666,7 +198678,7 @@ class IrisGridUtils {
|
|
|
198666
198678
|
filter2 = this.tableUtils.makeQuickFilter(column, text, timeZone);
|
|
198667
198679
|
}
|
|
198668
198680
|
} catch (error) {
|
|
198669
|
-
log$
|
|
198681
|
+
log$4.error("hydrateQuickFilters error with", text, error);
|
|
198670
198682
|
}
|
|
198671
198683
|
return [columnIndex, {
|
|
198672
198684
|
text,
|
|
@@ -198712,7 +198724,7 @@ class IrisGridUtils {
|
|
|
198712
198724
|
filter2 = this.tableUtils.makeAdvancedFilter(column, options, timeZone);
|
|
198713
198725
|
}
|
|
198714
198726
|
} catch (error) {
|
|
198715
|
-
log$
|
|
198727
|
+
log$4.error("hydrateAdvancedFilters error with", options, error);
|
|
198716
198728
|
}
|
|
198717
198729
|
return [columnIndex, {
|
|
198718
198730
|
options,
|
|
@@ -198823,7 +198835,7 @@ class IrisGridUtils {
|
|
|
198823
198835
|
*/
|
|
198824
198836
|
hydrateSort(columns, sorts) {
|
|
198825
198837
|
var {
|
|
198826
|
-
dh
|
|
198838
|
+
dh
|
|
198827
198839
|
} = this;
|
|
198828
198840
|
return sorts.map((sort) => {
|
|
198829
198841
|
var {
|
|
@@ -198832,7 +198844,7 @@ class IrisGridUtils {
|
|
|
198832
198844
|
direction
|
|
198833
198845
|
} = sort;
|
|
198834
198846
|
if (direction === TableUtils.sortDirection.reverse) {
|
|
198835
|
-
return
|
|
198847
|
+
return dh.Table.reverse();
|
|
198836
198848
|
}
|
|
198837
198849
|
var column = typeof columnIndexOrName === "string" ? IrisGridUtils.getColumnByName(columns, columnIndexOrName) : IrisGridUtils.getColumn(columns, columnIndexOrName);
|
|
198838
198850
|
if (column != null) {
|
|
@@ -198909,7 +198921,7 @@ class IrisGridUtils {
|
|
|
198909
198921
|
try {
|
|
198910
198922
|
return this.tableUtils.makeQuickFilter(column, value2, timeZone);
|
|
198911
198923
|
} catch (e) {
|
|
198912
|
-
log$
|
|
198924
|
+
log$4.debug("Unable to create input filter", e);
|
|
198913
198925
|
}
|
|
198914
198926
|
}
|
|
198915
198927
|
return null;
|
|
@@ -198924,7 +198936,7 @@ class IrisGridUtils {
|
|
|
198924
198936
|
*/
|
|
198925
198937
|
rangeSetFromRanges(ranges) {
|
|
198926
198938
|
var {
|
|
198927
|
-
dh
|
|
198939
|
+
dh
|
|
198928
198940
|
} = this;
|
|
198929
198941
|
var rangeSets = ranges.slice().sort((a, b) => {
|
|
198930
198942
|
assertNotNull(a.startRow);
|
|
@@ -198937,9 +198949,9 @@ class IrisGridUtils {
|
|
|
198937
198949
|
} = range;
|
|
198938
198950
|
assertNotNull(startRow);
|
|
198939
198951
|
assertNotNull(endRow);
|
|
198940
|
-
return
|
|
198952
|
+
return dh.RangeSet.ofRange(startRow, endRow);
|
|
198941
198953
|
});
|
|
198942
|
-
return
|
|
198954
|
+
return dh.RangeSet.ofRanges(rangeSets);
|
|
198943
198955
|
}
|
|
198944
198956
|
}
|
|
198945
198957
|
const IrisGridUtils$1 = IrisGridUtils;
|
|
@@ -199406,7 +199418,7 @@ function _toPrimitive$2(input, hint) {
|
|
|
199406
199418
|
}
|
|
199407
199419
|
return (hint === "string" ? String : Number)(input);
|
|
199408
199420
|
}
|
|
199409
|
-
var log$
|
|
199421
|
+
var log$3 = Log$1.module("Panel");
|
|
199410
199422
|
class Panel extends React.PureComponent {
|
|
199411
199423
|
constructor(props) {
|
|
199412
199424
|
super(props);
|
|
@@ -199603,7 +199615,7 @@ class Panel extends React.PureComponent {
|
|
|
199603
199615
|
var root2 = LayoutUtils2.getRootFromContainer(glContainer);
|
|
199604
199616
|
var config2 = LayoutUtils2.getComponentConfigFromContainer(glContainer);
|
|
199605
199617
|
if (config2 == null) {
|
|
199606
|
-
log$
|
|
199618
|
+
log$3.error("Could not get component config from container", glContainer);
|
|
199607
199619
|
return;
|
|
199608
199620
|
}
|
|
199609
199621
|
var cloneConfig = LayoutUtils2.cloneComponent(root2, config2);
|
|
@@ -200135,7 +200147,7 @@ function _toPrimitive(input, hint) {
|
|
|
200135
200147
|
}
|
|
200136
200148
|
return (hint === "string" ? String : Number)(input);
|
|
200137
200149
|
}
|
|
200138
|
-
var log$
|
|
200150
|
+
var log$2 = Log$1.module("ChartPanel");
|
|
200139
200151
|
var UPDATE_MODEL_DEBOUNCE = 150;
|
|
200140
200152
|
function hasInputFilter(panel) {
|
|
200141
200153
|
return panel.inputFilters != null;
|
|
@@ -200352,30 +200364,30 @@ class ChartPanel extends React.Component {
|
|
|
200352
200364
|
}).then(this.handleLoadSuccess, this.handleLoadError);
|
|
200353
200365
|
}
|
|
200354
200366
|
startListeningToSource(table) {
|
|
200355
|
-
log$
|
|
200367
|
+
log$2.debug("startListeningToSource", table);
|
|
200356
200368
|
var {
|
|
200357
200369
|
model
|
|
200358
200370
|
} = this.state;
|
|
200359
200371
|
assertNotNull(model);
|
|
200360
200372
|
var {
|
|
200361
|
-
dh
|
|
200373
|
+
dh
|
|
200362
200374
|
} = model;
|
|
200363
|
-
table.addEventListener(
|
|
200364
|
-
table.addEventListener(
|
|
200365
|
-
table.addEventListener(
|
|
200375
|
+
table.addEventListener(dh.Table.EVENT_CUSTOMCOLUMNSCHANGED, this.handleSourceColumnChange);
|
|
200376
|
+
table.addEventListener(dh.Table.EVENT_FILTERCHANGED, this.handleSourceFilterChange);
|
|
200377
|
+
table.addEventListener(dh.Table.EVENT_SORTCHANGED, this.handleSourceSortChange);
|
|
200366
200378
|
}
|
|
200367
200379
|
stopListeningToSource(table) {
|
|
200368
|
-
log$
|
|
200380
|
+
log$2.debug("stopListeningToSource", table);
|
|
200369
200381
|
var {
|
|
200370
200382
|
model
|
|
200371
200383
|
} = this.state;
|
|
200372
200384
|
assertNotNull(model);
|
|
200373
200385
|
var {
|
|
200374
|
-
dh
|
|
200386
|
+
dh
|
|
200375
200387
|
} = model;
|
|
200376
|
-
table.removeEventListener(
|
|
200377
|
-
table.removeEventListener(
|
|
200378
|
-
table.removeEventListener(
|
|
200388
|
+
table.removeEventListener(dh.Table.EVENT_CUSTOMCOLUMNSCHANGED, this.handleSourceColumnChange);
|
|
200389
|
+
table.removeEventListener(dh.Table.EVENT_FILTERCHANGED, this.handleSourceFilterChange);
|
|
200390
|
+
table.removeEventListener(dh.Table.EVENT_SORTCHANGED, this.handleSourceSortChange);
|
|
200379
200391
|
}
|
|
200380
200392
|
loadModelIfNecessary() {
|
|
200381
200393
|
var {
|
|
@@ -200413,7 +200425,7 @@ class ChartPanel extends React.Component {
|
|
|
200413
200425
|
var {
|
|
200414
200426
|
columnSelectionValidator
|
|
200415
200427
|
} = this.props;
|
|
200416
|
-
log$
|
|
200428
|
+
log$2.debug("handleColumnMouseEnter", columnSelectionValidator, type, name2);
|
|
200417
200429
|
if (!columnSelectionValidator) {
|
|
200418
200430
|
return;
|
|
200419
200431
|
}
|
|
@@ -200426,7 +200438,7 @@ class ChartPanel extends React.Component {
|
|
|
200426
200438
|
var {
|
|
200427
200439
|
columnSelectionValidator
|
|
200428
200440
|
} = this.props;
|
|
200429
|
-
log$
|
|
200441
|
+
log$2.debug("handleColumnMouseLeave", columnSelectionValidator);
|
|
200430
200442
|
if (!columnSelectionValidator) {
|
|
200431
200443
|
return;
|
|
200432
200444
|
}
|
|
@@ -200461,7 +200473,7 @@ class ChartPanel extends React.Component {
|
|
|
200461
200473
|
this.updateColumnFilters();
|
|
200462
200474
|
}
|
|
200463
200475
|
handleLoadSuccess(model) {
|
|
200464
|
-
log$
|
|
200476
|
+
log$2.debug("handleLoadSuccess");
|
|
200465
200477
|
var {
|
|
200466
200478
|
model: prevModel
|
|
200467
200479
|
} = this.state;
|
|
@@ -200492,7 +200504,7 @@ class ChartPanel extends React.Component {
|
|
|
200492
200504
|
if (PromiseUtils.isCanceled(error)) {
|
|
200493
200505
|
return;
|
|
200494
200506
|
}
|
|
200495
|
-
log$
|
|
200507
|
+
log$2.error("handleLoadError", error);
|
|
200496
200508
|
this.setState({
|
|
200497
200509
|
error,
|
|
200498
200510
|
isLoading: false
|
|
@@ -200517,18 +200529,18 @@ class ChartPanel extends React.Component {
|
|
|
200517
200529
|
model
|
|
200518
200530
|
} = this.state;
|
|
200519
200531
|
if (!isLinked2 || !model || !source) {
|
|
200520
|
-
log$
|
|
200532
|
+
log$2.debug2("updateModelFromSource ignoring", isLinked2, model, source);
|
|
200521
200533
|
return;
|
|
200522
200534
|
}
|
|
200523
200535
|
var {
|
|
200524
|
-
dh
|
|
200536
|
+
dh
|
|
200525
200537
|
} = model;
|
|
200526
200538
|
this.pending.cancel();
|
|
200527
200539
|
if (isChartPanelTableMetadata(metadata)) {
|
|
200528
200540
|
var {
|
|
200529
200541
|
settings
|
|
200530
200542
|
} = metadata;
|
|
200531
|
-
this.pending.add(
|
|
200543
|
+
this.pending.add(dh.plot.Figure.create(new ChartUtils$1(dh).makeFigureSettings(settings, source))).then((figure) => {
|
|
200532
200544
|
if (isFigureChartModel(model)) {
|
|
200533
200545
|
model.setFigure(figure);
|
|
200534
200546
|
}
|
|
@@ -200583,7 +200595,7 @@ class ChartPanel extends React.Component {
|
|
|
200583
200595
|
settings: prevSettings
|
|
200584
200596
|
} = _ref2;
|
|
200585
200597
|
var settings = _objectSpread(_objectSpread({}, prevSettings), update3);
|
|
200586
|
-
log$
|
|
200598
|
+
log$2.debug("Updated settings", settings);
|
|
200587
200599
|
return {
|
|
200588
200600
|
settings
|
|
200589
200601
|
};
|
|
@@ -200679,7 +200691,7 @@ class ChartPanel extends React.Component {
|
|
|
200679
200691
|
* @param filterMapParam Filter map
|
|
200680
200692
|
*/
|
|
200681
200693
|
setFilterMap(filterMapParam) {
|
|
200682
|
-
log$
|
|
200694
|
+
log$2.debug("setFilterMap", filterMapParam);
|
|
200683
200695
|
this.setState((state) => {
|
|
200684
200696
|
var _updatedFilterMap;
|
|
200685
200697
|
var {
|
|
@@ -200698,7 +200710,7 @@ class ChartPanel extends React.Component {
|
|
|
200698
200710
|
return;
|
|
200699
200711
|
}
|
|
200700
200712
|
if (filterList.length < 1) {
|
|
200701
|
-
log$
|
|
200713
|
+
log$2.debug("Ignoring empty filterList for column", columnName);
|
|
200702
200714
|
return;
|
|
200703
200715
|
}
|
|
200704
200716
|
var {
|
|
@@ -200802,7 +200814,7 @@ class ChartPanel extends React.Component {
|
|
|
200802
200814
|
}
|
|
200803
200815
|
}
|
|
200804
200816
|
}
|
|
200805
|
-
log$
|
|
200817
|
+
log$2.debug("updateInputFilters", update3);
|
|
200806
200818
|
return update3;
|
|
200807
200819
|
});
|
|
200808
200820
|
}
|
|
@@ -200837,7 +200849,7 @@ class ChartPanel extends React.Component {
|
|
|
200837
200849
|
}
|
|
200838
200850
|
}
|
|
200839
200851
|
}
|
|
200840
|
-
log$
|
|
200852
|
+
log$2.debug("deleteInputFilters", needsUpdate);
|
|
200841
200853
|
return needsUpdate ? {
|
|
200842
200854
|
filterMap
|
|
200843
200855
|
} : null;
|
|
@@ -200876,12 +200888,12 @@ class ChartPanel extends React.Component {
|
|
|
200876
200888
|
} else {
|
|
200877
200889
|
model.setTitle(filterTitle);
|
|
200878
200890
|
}
|
|
200879
|
-
log$
|
|
200891
|
+
log$2.debug2("updateFilters filters set", filterMap);
|
|
200880
200892
|
this.setState({
|
|
200881
200893
|
isLoading: true
|
|
200882
200894
|
});
|
|
200883
200895
|
} else {
|
|
200884
|
-
log$
|
|
200896
|
+
log$2.debug2("updateFilters waiting on inputs", waitingInputMap);
|
|
200885
200897
|
model.setTitle(model.getDefaultTitle());
|
|
200886
200898
|
this.setState({
|
|
200887
200899
|
isLoading: false
|
|
@@ -201059,30 +201071,71 @@ var ConnectedChartPanel = reactRedux.connect(mapStateToProps, {
|
|
|
201059
201071
|
forwardRef: true
|
|
201060
201072
|
})(ChartPanel);
|
|
201061
201073
|
const ChartPanel$1 = ConnectedChartPanel;
|
|
201062
|
-
const log = Log$1.module("@deephaven/js-plugin-plotly-express.
|
|
201063
|
-
function
|
|
201064
|
-
return (
|
|
201065
|
-
// BoxPlot extends PlotData
|
|
201066
|
-
// The rest do not extend PlotData
|
|
201067
|
-
!isViolinPlotData(data) && !isOhlcPlotData(data) && !isCandlestickPlotData(data) && !isPiePlotData(data)
|
|
201068
|
-
);
|
|
201069
|
-
}
|
|
201070
|
-
function isViolinPlotData(data) {
|
|
201071
|
-
return data.type === "violin";
|
|
201072
|
-
}
|
|
201073
|
-
function isOhlcPlotData(data) {
|
|
201074
|
-
return data.type === "ohlc";
|
|
201074
|
+
const log$1 = Log$1.module("@deephaven/js-plugin-plotly-express.ChartUtils");
|
|
201075
|
+
function getWidgetData(widgetInfo) {
|
|
201076
|
+
return JSON.parse(atob(widgetInfo.getDataAsBase64()));
|
|
201075
201077
|
}
|
|
201076
|
-
function
|
|
201077
|
-
|
|
201078
|
+
async function getDataMappings(widgetInfo) {
|
|
201079
|
+
const data = getWidgetData(widgetInfo);
|
|
201080
|
+
const tables = await Promise.all(
|
|
201081
|
+
widgetInfo.exportedObjects.map((obj) => obj.fetch())
|
|
201082
|
+
);
|
|
201083
|
+
const tableColumnReplacementMap = /* @__PURE__ */ new Map();
|
|
201084
|
+
tables.forEach((table) => tableColumnReplacementMap.set(table, /* @__PURE__ */ new Map()));
|
|
201085
|
+
data.deephaven.mappings.forEach(
|
|
201086
|
+
({ table: tableIndex, data_columns: dataColumns }) => {
|
|
201087
|
+
const table = tables[tableIndex];
|
|
201088
|
+
const existingColumnMap = tableColumnReplacementMap.get(table);
|
|
201089
|
+
assertNotNull$1(existingColumnMap);
|
|
201090
|
+
Object.entries(dataColumns).forEach(([columnName, paths]) => {
|
|
201091
|
+
const existingPaths = existingColumnMap.get(columnName);
|
|
201092
|
+
if (existingPaths !== void 0) {
|
|
201093
|
+
existingPaths.push(...paths);
|
|
201094
|
+
} else {
|
|
201095
|
+
existingColumnMap.set(columnName, [...paths]);
|
|
201096
|
+
}
|
|
201097
|
+
});
|
|
201098
|
+
}
|
|
201099
|
+
);
|
|
201100
|
+
return tableColumnReplacementMap;
|
|
201078
201101
|
}
|
|
201079
|
-
function
|
|
201080
|
-
|
|
201102
|
+
function applyColorwayToData(colorway2, plotlyColorway, data) {
|
|
201103
|
+
if (colorway2.length === 0) {
|
|
201104
|
+
return;
|
|
201105
|
+
}
|
|
201106
|
+
if (plotlyColorway.length > colorway2.length) {
|
|
201107
|
+
log$1.warn(
|
|
201108
|
+
"Plotly's colorway is longer than the web UI colorway. May result in incorrect colors for some series"
|
|
201109
|
+
);
|
|
201110
|
+
}
|
|
201111
|
+
const colorMap = new Map(
|
|
201112
|
+
plotlyColorway.map((color2, i) => [
|
|
201113
|
+
color2.toUpperCase(),
|
|
201114
|
+
colorway2[i] ?? color2
|
|
201115
|
+
])
|
|
201116
|
+
);
|
|
201117
|
+
const plotlyColors = new Set(
|
|
201118
|
+
plotlyColorway.map((color2) => color2.toUpperCase())
|
|
201119
|
+
);
|
|
201120
|
+
for (let i = 0; i < data.length; i += 1) {
|
|
201121
|
+
const trace = data[i];
|
|
201122
|
+
if ("marker" in trace && trace.marker != null && "color" in trace.marker && typeof trace.marker.color === "string") {
|
|
201123
|
+
if (plotlyColors.has(trace.marker.color.toUpperCase())) {
|
|
201124
|
+
trace.marker.color = colorMap.get(trace.marker.color.toUpperCase());
|
|
201125
|
+
}
|
|
201126
|
+
}
|
|
201127
|
+
if ("line" in trace && trace.line != null && "color" in trace.line && typeof trace.line.color === "string") {
|
|
201128
|
+
if (plotlyColors.has(trace.line.color.toUpperCase())) {
|
|
201129
|
+
trace.line.color = colorMap.get(trace.line.color.toUpperCase());
|
|
201130
|
+
}
|
|
201131
|
+
}
|
|
201132
|
+
}
|
|
201081
201133
|
}
|
|
201134
|
+
const log = Log$1.module("@deephaven/js-plugin-plotly-express.ChartModel");
|
|
201082
201135
|
class PlotlyExpressChartModel extends ChartModel$1 {
|
|
201083
|
-
constructor(
|
|
201084
|
-
var _a, _b;
|
|
201085
|
-
super(
|
|
201136
|
+
constructor(dh, tableColumnReplacementMap, data, plotlyLayout, isDefaultTemplate = true, theme = ChartTheme) {
|
|
201137
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
201138
|
+
super(dh);
|
|
201086
201139
|
__publicField(this, "chartUtils");
|
|
201087
201140
|
__publicField(this, "tableSubscriptionMap");
|
|
201088
201141
|
__publicField(this, "tableSubscriptionCleanups", []);
|
|
@@ -201093,7 +201146,7 @@ class PlotlyExpressChartModel extends ChartModel$1 {
|
|
|
201093
201146
|
__publicField(this, "layout");
|
|
201094
201147
|
__publicField(this, "plotlyLayout");
|
|
201095
201148
|
this.handleFigureUpdated = this.handleFigureUpdated.bind(this);
|
|
201096
|
-
this.chartUtils = new ChartUtils$1(
|
|
201149
|
+
this.chartUtils = new ChartUtils$1(dh);
|
|
201097
201150
|
this.tableColumnReplacementMap = new Map(tableColumnReplacementMap);
|
|
201098
201151
|
this.chartDataMap = /* @__PURE__ */ new Map();
|
|
201099
201152
|
this.tableSubscriptionMap = /* @__PURE__ */ new Map();
|
|
@@ -201108,7 +201161,11 @@ class PlotlyExpressChartModel extends ChartModel$1 {
|
|
|
201108
201161
|
...plotlyLayout,
|
|
201109
201162
|
template
|
|
201110
201163
|
};
|
|
201111
|
-
|
|
201164
|
+
applyColorwayToData(
|
|
201165
|
+
((_e = (_d = (_c = this.layout) == null ? void 0 : _c.template) == null ? void 0 : _d.layout) == null ? void 0 : _e.colorway) ?? [],
|
|
201166
|
+
((_h = (_g = (_f = this.plotlyLayout) == null ? void 0 : _f.template) == null ? void 0 : _g.layout) == null ? void 0 : _h.colorway) ?? [],
|
|
201167
|
+
this.data
|
|
201168
|
+
);
|
|
201112
201169
|
this.setTitle(this.getDefaultTitle());
|
|
201113
201170
|
}
|
|
201114
201171
|
getData() {
|
|
@@ -201117,51 +201174,11 @@ class PlotlyExpressChartModel extends ChartModel$1 {
|
|
|
201117
201174
|
getLayout() {
|
|
201118
201175
|
return this.layout;
|
|
201119
201176
|
}
|
|
201120
|
-
/**
|
|
201121
|
-
* Applies the model template colorway to the data unless the data color is not its default value
|
|
201122
|
-
* Data color is not default if the user set the color specifically or the plot type sets it
|
|
201123
|
-
*/
|
|
201124
|
-
applyColorwayToData() {
|
|
201125
|
-
var _a, _b, _c, _d, _e, _f;
|
|
201126
|
-
const colorway2 = ((_c = (_b = (_a = this.layout) == null ? void 0 : _a.template) == null ? void 0 : _b.layout) == null ? void 0 : _c.colorway) ?? [];
|
|
201127
|
-
const plotlyColorway = ((_f = (_e = (_d = this.plotlyLayout) == null ? void 0 : _d.template) == null ? void 0 : _e.layout) == null ? void 0 : _f.colorway) ?? [];
|
|
201128
|
-
if (colorway2.length === 0) {
|
|
201129
|
-
return;
|
|
201130
|
-
}
|
|
201131
|
-
let startSubplotIndex = 0;
|
|
201132
|
-
for (let i = 0; i < this.data.length; i += 1) {
|
|
201133
|
-
const data = this.data[i];
|
|
201134
|
-
if (i > 0) {
|
|
201135
|
-
const prevData = this.data[i - 1];
|
|
201136
|
-
const isSamePlotType = data.type === prevData.type;
|
|
201137
|
-
let isSameDomain = true;
|
|
201138
|
-
if (isPlotData(data) && isPlotData(prevData)) {
|
|
201139
|
-
isSameDomain = deepEqual(data.domain, prevData.domain);
|
|
201140
|
-
}
|
|
201141
|
-
if (!isSamePlotType || !isSameDomain) {
|
|
201142
|
-
startSubplotIndex = i;
|
|
201143
|
-
}
|
|
201144
|
-
}
|
|
201145
|
-
const colorIndex = i - startSubplotIndex;
|
|
201146
|
-
const themeColor = colorway2[colorIndex % colorway2.length];
|
|
201147
|
-
const plotlyColor = plotlyColorway[colorIndex % plotlyColorway.length] ?? "";
|
|
201148
|
-
if ("marker" in data && data.marker != null && "color" in data.marker && typeof data.marker.color === "string") {
|
|
201149
|
-
if (data.marker.color.toUpperCase() === plotlyColor.toUpperCase() && themeColor != null) {
|
|
201150
|
-
data.marker.color = themeColor;
|
|
201151
|
-
}
|
|
201152
|
-
}
|
|
201153
|
-
if ("line" in data && data.line != null && "color" in data.line && typeof data.line.color === "string") {
|
|
201154
|
-
if (data.line.color.toUpperCase() === plotlyColor.toUpperCase() && themeColor != null) {
|
|
201155
|
-
data.line.color = themeColor;
|
|
201156
|
-
}
|
|
201157
|
-
}
|
|
201158
|
-
}
|
|
201159
|
-
}
|
|
201160
201177
|
subscribe(callback) {
|
|
201161
201178
|
super.subscribe(callback);
|
|
201162
|
-
const { dh
|
|
201179
|
+
const { dh } = this;
|
|
201163
201180
|
this.tableColumnReplacementMap.forEach(
|
|
201164
|
-
(_2, table) => this.chartDataMap.set(table, new
|
|
201181
|
+
(_2, table) => this.chartDataMap.set(table, new dh.plot.ChartData(table))
|
|
201165
201182
|
);
|
|
201166
201183
|
this.tableColumnReplacementMap.forEach((columnReplacements, table) => {
|
|
201167
201184
|
const columnNames = new Set(columnReplacements.keys());
|
|
@@ -201210,7 +201227,7 @@ class PlotlyExpressChartModel extends ChartModel$1 {
|
|
|
201210
201227
|
this.tableSubscriptionMap.forEach((sub, table) => {
|
|
201211
201228
|
this.tableSubscriptionCleanups.push(
|
|
201212
201229
|
sub.addEventListener(
|
|
201213
|
-
dh.Table.EVENT_UPDATED,
|
|
201230
|
+
this.dh.Table.EVENT_UPDATED,
|
|
201214
201231
|
(e) => this.handleFigureUpdated(
|
|
201215
201232
|
e,
|
|
201216
201233
|
this.chartDataMap.get(table),
|
|
@@ -201244,35 +201261,8 @@ class PlotlyExpressChartModel extends ChartModel$1 {
|
|
|
201244
201261
|
);
|
|
201245
201262
|
}
|
|
201246
201263
|
}
|
|
201247
|
-
function getWidgetData(widgetInfo) {
|
|
201248
|
-
return JSON.parse(atob(widgetInfo.getDataAsBase64()));
|
|
201249
|
-
}
|
|
201250
|
-
async function getDataMappings(widgetInfo) {
|
|
201251
|
-
const data = getWidgetData(widgetInfo);
|
|
201252
|
-
const tables = await Promise.all(
|
|
201253
|
-
widgetInfo.exportedObjects.map((obj) => obj.fetch())
|
|
201254
|
-
);
|
|
201255
|
-
const tableColumnReplacementMap = /* @__PURE__ */ new Map();
|
|
201256
|
-
tables.forEach((table) => tableColumnReplacementMap.set(table, /* @__PURE__ */ new Map()));
|
|
201257
|
-
data.deephaven.mappings.forEach(
|
|
201258
|
-
({ table: tableIndex, data_columns: dataColumns }) => {
|
|
201259
|
-
const table = tables[tableIndex];
|
|
201260
|
-
const existingColumnMap = tableColumnReplacementMap.get(table);
|
|
201261
|
-
assertNotNull$1(existingColumnMap);
|
|
201262
|
-
Object.entries(dataColumns).forEach(([columnName, paths]) => {
|
|
201263
|
-
const existingPaths = existingColumnMap.get(columnName);
|
|
201264
|
-
if (existingPaths !== void 0) {
|
|
201265
|
-
existingPaths.push(...paths);
|
|
201266
|
-
} else {
|
|
201267
|
-
existingColumnMap.set(columnName, [...paths]);
|
|
201268
|
-
}
|
|
201269
|
-
});
|
|
201270
|
-
}
|
|
201271
|
-
);
|
|
201272
|
-
return tableColumnReplacementMap;
|
|
201273
|
-
}
|
|
201274
201264
|
function PlotlyExpressChartPanel(props) {
|
|
201275
|
-
const
|
|
201265
|
+
const dh = useApi();
|
|
201276
201266
|
const { fetch, ...rest } = props;
|
|
201277
201267
|
const makeModel = React.useCallback(async () => {
|
|
201278
201268
|
const widgetInfo = await fetch();
|
|
@@ -201281,14 +201271,14 @@ function PlotlyExpressChartPanel(props) {
|
|
|
201281
201271
|
const isDefaultTemplate = !deephaven.is_user_set_template;
|
|
201282
201272
|
const tableColumnReplacementMap = await getDataMappings(widgetInfo);
|
|
201283
201273
|
return new PlotlyExpressChartModel(
|
|
201284
|
-
|
|
201274
|
+
dh,
|
|
201285
201275
|
tableColumnReplacementMap,
|
|
201286
201276
|
plotly2.data,
|
|
201287
201277
|
plotly2.layout ?? {},
|
|
201288
201278
|
isDefaultTemplate,
|
|
201289
201279
|
ChartTheme
|
|
201290
201280
|
);
|
|
201291
|
-
}, [
|
|
201281
|
+
}, [dh, fetch]);
|
|
201292
201282
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
201293
201283
|
ChartPanel$1,
|
|
201294
201284
|
{
|
|
@@ -201350,3 +201340,7 @@ function DashboardPlugin(props) {
|
|
|
201350
201340
|
return null;
|
|
201351
201341
|
}
|
|
201352
201342
|
exports.DashboardPlugin = DashboardPlugin;
|
|
201343
|
+
exports.PlotlyExpressChartModel = PlotlyExpressChartModel;
|
|
201344
|
+
exports.applyColorwayToData = applyColorwayToData;
|
|
201345
|
+
exports.getDataMappings = getDataMappings;
|
|
201346
|
+
exports.getWidgetData = getWidgetData;
|