@design.estate/dees-catalog 3.98.1 → 3.99.1
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_bundle/bundle.js +192 -26
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/00group-chart/dees-chart-area/component.d.ts +22 -0
- package/dist_ts_web/elements/00group-chart/dees-chart-area/component.js +175 -3
- package/dist_ts_web/elements/00group-chart/dees-chart-area/styles.js +11 -1
- package/dist_ts_web/elements/00group-chart/dees-chart-area/template.js +4 -2
- package/dist_ts_web/elements/00group-dataview/dees-table/dees-table.d.ts +2 -0
- package/dist_ts_web/elements/00group-dataview/dees-table/dees-table.js +23 -23
- package/package.json +2 -2
- package/readme.md +10 -1
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/00group-chart/dees-chart-area/component.ts +164 -1
- package/ts_web/elements/00group-chart/dees-chart-area/styles.ts +10 -0
- package/ts_web/elements/00group-chart/dees-chart-area/template.ts +3 -1
- package/ts_web/elements/00group-dataview/dees-table/dees-table.ts +28 -20
- package/dist_watch/bundle.js +0 -235637
- package/dist_watch/bundle.js.map +0 -7
- package/dist_watch/index.html +0 -28
package/dist_bundle/bundle.js
CHANGED
|
@@ -150293,6 +150293,15 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
|
|
|
150293
150293
|
__privateAdd(this, _dataName, __runInitializers(_init39, 36, this)), __runInitializers(_init39, 39, this);
|
|
150294
150294
|
__privateAdd(this, _searchable, __runInitializers(_init39, 40, this, true)), __runInitializers(_init39, 43, this);
|
|
150295
150295
|
__privateAdd(this, _dataActions, __runInitializers(_init39, 44, this, [])), __runInitializers(_init39, 47, this);
|
|
150296
|
+
__publicField(this, "__searchAction", {
|
|
150297
|
+
name: "Search",
|
|
150298
|
+
iconName: "lucide:Search",
|
|
150299
|
+
type: ["header"],
|
|
150300
|
+
actionFunc: /* @__PURE__ */ __name(async () => {
|
|
150301
|
+
const searchGrid = this.shadowRoot.querySelector(".searchGrid");
|
|
150302
|
+
searchGrid.classList.toggle("hidden");
|
|
150303
|
+
}, "actionFunc")
|
|
150304
|
+
});
|
|
150296
150305
|
__privateAdd(this, _columns, __runInitializers(_init39, 48, this, [])), __runInitializers(_init39, 51, this);
|
|
150297
150306
|
__privateAdd(this, _rowKey, __runInitializers(_init39, 52, this)), __runInitializers(_init39, 55, this);
|
|
150298
150307
|
__privateAdd(this, _augmentFromDisplayFunction, __runInitializers(_init39, 56, this, false)), __runInitializers(_init39, 59, this);
|
|
@@ -150455,7 +150464,7 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
|
|
|
150455
150464
|
this.startEditing(cell2.item, cell2.col);
|
|
150456
150465
|
return;
|
|
150457
150466
|
}
|
|
150458
|
-
const dblAction = this.
|
|
150467
|
+
const dblAction = this.__getEffectiveDataActions().find(
|
|
150459
150468
|
(action) => action.type?.includes("doubleClick") && this.isActionRelevant(action, cell2.item)
|
|
150460
150469
|
);
|
|
150461
150470
|
if (dblAction) dblAction.actionFunc({ item: cell2.item, table: this });
|
|
@@ -150884,7 +150893,7 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
|
|
|
150884
150893
|
${this.renderSortIndicator(col)}
|
|
150885
150894
|
</th>`;
|
|
150886
150895
|
})}
|
|
150887
|
-
${this.
|
|
150896
|
+
${this.__getEffectiveDataActions().length > 0 ? b2`<th class="actionsCol">Actions</th>` : b2``}
|
|
150888
150897
|
</tr>
|
|
150889
150898
|
${this.showColumnFilters ? b2`<tr class="filtersRow">
|
|
150890
150899
|
${this.showSelectionCheckbox ? b2`<th style="width:42px;"></th>` : b2``}
|
|
@@ -150896,7 +150905,7 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
|
|
|
150896
150905
|
@input=${(e10) => this.setColumnFilter(key2, e10.target.value)} />
|
|
150897
150906
|
</th>`;
|
|
150898
150907
|
})}
|
|
150899
|
-
${this.
|
|
150908
|
+
${this.__getEffectiveDataActions().length > 0 ? b2`<th></th>` : b2``}
|
|
150900
150909
|
</tr>` : b2``}
|
|
150901
150910
|
`;
|
|
150902
150911
|
}
|
|
@@ -151379,22 +151388,6 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
|
|
|
151379
151388
|
this.__syncFloatingHeader();
|
|
151380
151389
|
}
|
|
151381
151390
|
if (this.searchable) {
|
|
151382
|
-
const existing = this.dataActions.find((actionArg) => actionArg.type?.includes("header") && actionArg.name === "Search");
|
|
151383
|
-
if (!existing) {
|
|
151384
|
-
this.dataActions.unshift({
|
|
151385
|
-
name: "Search",
|
|
151386
|
-
iconName: "lucide:Search",
|
|
151387
|
-
type: ["header"],
|
|
151388
|
-
actionFunc: /* @__PURE__ */ __name(async () => {
|
|
151389
|
-
console.log("open search");
|
|
151390
|
-
const searchGrid = this.shadowRoot.querySelector(".searchGrid");
|
|
151391
|
-
searchGrid.classList.toggle("hidden");
|
|
151392
|
-
}, "actionFunc")
|
|
151393
|
-
});
|
|
151394
|
-
console.log(this.dataActions);
|
|
151395
|
-
this.requestUpdate();
|
|
151396
|
-
}
|
|
151397
|
-
;
|
|
151398
151391
|
this.wireSearchInputs();
|
|
151399
151392
|
}
|
|
151400
151393
|
}
|
|
@@ -151450,7 +151443,9 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
|
|
|
151450
151443
|
const cell2 = cells2[i11];
|
|
151451
151444
|
const width = window.getComputedStyle(cell2).width;
|
|
151452
151445
|
if (cell2.textContent.includes("Actions")) {
|
|
151453
|
-
const neededWidth = this.
|
|
151446
|
+
const neededWidth = this.__getEffectiveDataActions().filter(
|
|
151447
|
+
(actionArg) => actionArg.type?.includes("inRow")
|
|
151448
|
+
).length * 36;
|
|
151454
151449
|
cell2.style.width = `${Math.max(neededWidth, 68)}px`;
|
|
151455
151450
|
} else {
|
|
151456
151451
|
cell2.style.width = width;
|
|
@@ -152000,9 +151995,17 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
|
|
|
152000
151995
|
isActionRelevant(actionArg, itemArg) {
|
|
152001
151996
|
return !actionArg.actionRelevancyCheckFunc || actionArg.actionRelevancyCheckFunc(itemArg);
|
|
152002
151997
|
}
|
|
151998
|
+
__getEffectiveDataActions() {
|
|
151999
|
+
if (!this.searchable || this.dataActions.some(
|
|
152000
|
+
(actionArg) => actionArg.type?.includes("header") && actionArg.name === "Search"
|
|
152001
|
+
)) {
|
|
152002
|
+
return this.dataActions;
|
|
152003
|
+
}
|
|
152004
|
+
return [this.__searchAction, ...this.dataActions];
|
|
152005
|
+
}
|
|
152003
152006
|
getActionsForType(typeArg) {
|
|
152004
152007
|
const actions = [];
|
|
152005
|
-
for (const action of this.
|
|
152008
|
+
for (const action of this.__getEffectiveDataActions()) {
|
|
152006
152009
|
if (!action.type?.includes(typeArg)) continue;
|
|
152007
152010
|
actions.push(action);
|
|
152008
152011
|
}
|
|
@@ -160989,6 +160992,16 @@ var chartAreaStyles = [
|
|
|
160989
160992
|
position: absolute;
|
|
160990
160993
|
inset: 0 0 4px 0;
|
|
160991
160994
|
}
|
|
160995
|
+
.rangeSelectionOverlay {
|
|
160996
|
+
position: absolute;
|
|
160997
|
+
display: none;
|
|
160998
|
+
top: 0;
|
|
160999
|
+
bottom: 0;
|
|
161000
|
+
z-index: 3;
|
|
161001
|
+
pointer-events: none;
|
|
161002
|
+
background: color-mix(in srgb, var(--dees-color-accent, #3b82f6) 18%, transparent);
|
|
161003
|
+
border-inline: 1px solid color-mix(in srgb, var(--dees-color-accent, #3b82f6) 70%, transparent);
|
|
161004
|
+
}
|
|
160992
161005
|
.statsBar {
|
|
160993
161006
|
min-height: 32px;
|
|
160994
161007
|
padding: 4px 16px;
|
|
@@ -161054,7 +161067,9 @@ var renderChartArea = /* @__PURE__ */ __name((component) => {
|
|
|
161054
161067
|
<dees-icon .icon=${component.isFullPage ? "lucide:Minimize2" : "lucide:Maximize2"} .iconSize=${14}></dees-icon>
|
|
161055
161068
|
</button>
|
|
161056
161069
|
</div>
|
|
161057
|
-
<div class="chartContainer"
|
|
161070
|
+
<div class="chartContainer">
|
|
161071
|
+
<div class="rangeSelectionOverlay" aria-hidden="true"></div>
|
|
161072
|
+
</div>
|
|
161058
161073
|
${component.seriesStats.length > 0 && !component.hideLegend ? b2`
|
|
161059
161074
|
<div slot="footer" class="statsBar">
|
|
161060
161075
|
${component.seriesStats.map((s9) => b2`
|
|
@@ -161223,10 +161238,10 @@ init_dist_ts25();
|
|
|
161223
161238
|
init_dist_ts24();
|
|
161224
161239
|
init_services();
|
|
161225
161240
|
init_dees_tile();
|
|
161226
|
-
var _chartLines_dec, _hideLegend_dec, _legendStats_dec, _autoScrollInterval_dec, _yAxisMax_dec, _yAxisScaling_dec, _realtimeMode_dec, _rollingWindow_dec, _yAxisFormatter_dec, _series_dec, _label_dec5, _isFullPage_dec, _seriesStats_dec, _chart_dec, _a56, _DeesChartArea_decorators, _init57, _chart, _seriesStats, _isFullPage, _label5, _series, _yAxisFormatter, _rollingWindow, _realtimeMode, _yAxisScaling, _yAxisMax, _autoScrollInterval, _legendStats, _hideLegend, _chartLines;
|
|
161241
|
+
var _selectedRange_dec, _rangeSelectionEnabled_dec, _chartLines_dec, _hideLegend_dec, _legendStats_dec, _autoScrollInterval_dec, _yAxisMax_dec, _yAxisScaling_dec, _realtimeMode_dec, _rollingWindow_dec, _yAxisFormatter_dec, _series_dec, _label_dec5, _isFullPage_dec, _seriesStats_dec, _chart_dec, _a56, _DeesChartArea_decorators, _init57, _chart, _seriesStats, _isFullPage, _label5, _series, _yAxisFormatter, _rollingWindow, _realtimeMode, _yAxisScaling, _yAxisMax, _autoScrollInterval, _legendStats, _hideLegend, _chartLines, _rangeSelectionEnabled, _selectedRange;
|
|
161227
161242
|
var CHART_LEGEND_STATS = ["latest", "min", "max", "avg"];
|
|
161228
161243
|
_DeesChartArea_decorators = [customElement("dees-chart-area")];
|
|
161229
|
-
var _DeesChartArea = class _DeesChartArea extends (_a56 = DeesElement, _chart_dec = [r5()], _seriesStats_dec = [r5()], _isFullPage_dec = [r5()], _label_dec5 = [n5()], _series_dec = [n5({ type: Array })], _yAxisFormatter_dec = [n5({ attribute: false })], _rollingWindow_dec = [n5({ type: Number })], _realtimeMode_dec = [n5({ type: Boolean })], _yAxisScaling_dec = [n5({ type: String })], _yAxisMax_dec = [n5({ type: Number })], _autoScrollInterval_dec = [n5({ type: Number })], _legendStats_dec = [n5({ type: Array })], _hideLegend_dec = [n5({ type: Boolean })], _chartLines_dec = [n5({ type: Array })], _a56) {
|
|
161244
|
+
var _DeesChartArea = class _DeesChartArea extends (_a56 = DeesElement, _chart_dec = [r5()], _seriesStats_dec = [r5()], _isFullPage_dec = [r5()], _label_dec5 = [n5()], _series_dec = [n5({ type: Array })], _yAxisFormatter_dec = [n5({ attribute: false })], _rollingWindow_dec = [n5({ type: Number })], _realtimeMode_dec = [n5({ type: Boolean })], _yAxisScaling_dec = [n5({ type: String })], _yAxisMax_dec = [n5({ type: Number })], _autoScrollInterval_dec = [n5({ type: Number })], _legendStats_dec = [n5({ type: Array })], _hideLegend_dec = [n5({ type: Boolean })], _chartLines_dec = [n5({ type: Array })], _rangeSelectionEnabled_dec = [n5({ type: Boolean })], _selectedRange_dec = [n5({ attribute: false })], _a56) {
|
|
161230
161245
|
constructor() {
|
|
161231
161246
|
super();
|
|
161232
161247
|
__privateAdd(this, _chart, __runInitializers(_init57, 8, this, null)), __runInitializers(_init57, 11, this);
|
|
@@ -161243,6 +161258,8 @@ var _DeesChartArea = class _DeesChartArea extends (_a56 = DeesElement, _chart_de
|
|
|
161243
161258
|
__privateAdd(this, _legendStats, __runInitializers(_init57, 52, this, [...CHART_LEGEND_STATS])), __runInitializers(_init57, 55, this);
|
|
161244
161259
|
__privateAdd(this, _hideLegend, __runInitializers(_init57, 56, this, false)), __runInitializers(_init57, 59, this);
|
|
161245
161260
|
__privateAdd(this, _chartLines, __runInitializers(_init57, 60, this, ["avg", "max"])), __runInitializers(_init57, 63, this);
|
|
161261
|
+
__privateAdd(this, _rangeSelectionEnabled, __runInitializers(_init57, 64, this, false)), __runInitializers(_init57, 67, this);
|
|
161262
|
+
__privateAdd(this, _selectedRange, __runInitializers(_init57, 68, this, null)), __runInitializers(_init57, 71, this);
|
|
161246
161263
|
__publicField(this, "internalChartData", []);
|
|
161247
161264
|
__publicField(this, "autoScrollTimer", null);
|
|
161248
161265
|
__publicField(this, "lcBundle", null);
|
|
@@ -161253,6 +161270,65 @@ var _DeesChartArea = class _DeesChartArea extends (_a56 = DeesElement, _chart_de
|
|
|
161253
161270
|
__publicField(this, "pendingRealtimePrune", false);
|
|
161254
161271
|
__publicField(this, "crosshairMoveHandler", null);
|
|
161255
161272
|
__publicField(this, "chartContainer", null);
|
|
161273
|
+
__publicField(this, "rangeOverlay", null);
|
|
161274
|
+
__publicField(this, "rangeResizeObserver", null);
|
|
161275
|
+
__publicField(this, "rangeDrag", null);
|
|
161276
|
+
__publicField(this, "rangePointerDownHandler", /* @__PURE__ */ __name((event) => {
|
|
161277
|
+
if (!this.rangeSelectionEnabled || event.button !== 0 || !this.chartContainer) return;
|
|
161278
|
+
const x3 = this.getRangePointerX(event);
|
|
161279
|
+
const timeMs = this.coordinateToEpochMs(x3);
|
|
161280
|
+
if (timeMs === null) return;
|
|
161281
|
+
event.preventDefault();
|
|
161282
|
+
this.rangeDrag = { pointerId: event.pointerId, startX: x3, startMs: timeMs };
|
|
161283
|
+
try {
|
|
161284
|
+
this.chartContainer.setPointerCapture(event.pointerId);
|
|
161285
|
+
} catch {
|
|
161286
|
+
}
|
|
161287
|
+
window.addEventListener("keydown", this.rangeKeydownHandler);
|
|
161288
|
+
this.paintRangeOverlay(x3, x3);
|
|
161289
|
+
}, "rangePointerDownHandler"));
|
|
161290
|
+
__publicField(this, "rangePointerMoveHandler", /* @__PURE__ */ __name((event) => {
|
|
161291
|
+
if (!this.rangeDrag || event.pointerId !== this.rangeDrag.pointerId) return;
|
|
161292
|
+
event.preventDefault();
|
|
161293
|
+
this.paintRangeOverlay(this.rangeDrag.startX, this.getRangePointerX(event));
|
|
161294
|
+
}, "rangePointerMoveHandler"));
|
|
161295
|
+
__publicField(this, "rangePointerUpHandler", /* @__PURE__ */ __name((event) => {
|
|
161296
|
+
const drag = this.rangeDrag;
|
|
161297
|
+
if (!drag || event.pointerId !== drag.pointerId) return;
|
|
161298
|
+
const endX = this.getRangePointerX(event);
|
|
161299
|
+
const endMs = this.coordinateToEpochMs(endX);
|
|
161300
|
+
this.finishRangeDrag(event.pointerId);
|
|
161301
|
+
if (endMs === null || Math.abs(endX - drag.startX) < 4) {
|
|
161302
|
+
this.syncRangeOverlay();
|
|
161303
|
+
return;
|
|
161304
|
+
}
|
|
161305
|
+
const from3 = Math.min(drag.startMs, endMs);
|
|
161306
|
+
const to = Math.max(drag.startMs, endMs);
|
|
161307
|
+
if (!Number.isSafeInteger(from3) || !Number.isSafeInteger(to) || from3 >= to) {
|
|
161308
|
+
this.syncRangeOverlay();
|
|
161309
|
+
return;
|
|
161310
|
+
}
|
|
161311
|
+
this.dispatchEvent(new CustomEvent("range-change", {
|
|
161312
|
+
detail: { from: from3, to },
|
|
161313
|
+
bubbles: true,
|
|
161314
|
+
composed: true
|
|
161315
|
+
}));
|
|
161316
|
+
this.syncRangeOverlay();
|
|
161317
|
+
}, "rangePointerUpHandler"));
|
|
161318
|
+
__publicField(this, "rangePointerCancelHandler", /* @__PURE__ */ __name((event) => {
|
|
161319
|
+
if (!this.rangeDrag || event.pointerId !== this.rangeDrag.pointerId) return;
|
|
161320
|
+
this.finishRangeDrag(event.pointerId);
|
|
161321
|
+
this.syncRangeOverlay();
|
|
161322
|
+
}, "rangePointerCancelHandler"));
|
|
161323
|
+
__publicField(this, "rangeKeydownHandler", /* @__PURE__ */ __name((event) => {
|
|
161324
|
+
if (event.key !== "Escape" || !this.rangeDrag) return;
|
|
161325
|
+
const pointerId = this.rangeDrag.pointerId;
|
|
161326
|
+
this.finishRangeDrag(pointerId);
|
|
161327
|
+
this.syncRangeOverlay();
|
|
161328
|
+
}, "rangeKeydownHandler"));
|
|
161329
|
+
__publicField(this, "rangeVisibleTimeChangeHandler", /* @__PURE__ */ __name(() => {
|
|
161330
|
+
this.syncRangeOverlay();
|
|
161331
|
+
}, "rangeVisibleTimeChangeHandler"));
|
|
161256
161332
|
__publicField(this, "chartMouseLeaveHandler", /* @__PURE__ */ __name(() => {
|
|
161257
161333
|
this.chart?.clearCrosshairPosition();
|
|
161258
161334
|
this.handleCrosshairCleared();
|
|
@@ -161262,11 +161338,15 @@ var _DeesChartArea = class _DeesChartArea extends (_a56 = DeesElement, _chart_de
|
|
|
161262
161338
|
this.stopAutoScroll();
|
|
161263
161339
|
const chart = this.chart;
|
|
161264
161340
|
const crosshairMoveHandler = this.crosshairMoveHandler;
|
|
161265
|
-
this.chart = null;
|
|
161266
161341
|
this.crosshairMoveHandler = null;
|
|
161267
161342
|
this.chartContainer?.removeEventListener("mouseleave", this.chartMouseLeaveHandler);
|
|
161343
|
+
this.teardownRangeSelection();
|
|
161344
|
+
this.chart = null;
|
|
161345
|
+
this.rangeResizeObserver?.disconnect();
|
|
161346
|
+
this.rangeResizeObserver = null;
|
|
161268
161347
|
this.chartContainer = null;
|
|
161269
161348
|
this.tooltipEl = null;
|
|
161349
|
+
this.rangeOverlay = null;
|
|
161270
161350
|
this.crosshairActive = false;
|
|
161271
161351
|
this.pendingRealtimePrune = false;
|
|
161272
161352
|
if (crosshairMoveHandler && chart) {
|
|
@@ -161293,6 +161373,84 @@ var _DeesChartArea = class _DeesChartArea extends (_a56 = DeesElement, _chart_de
|
|
|
161293
161373
|
return renderChartArea(this);
|
|
161294
161374
|
}
|
|
161295
161375
|
// --- Helpers ---
|
|
161376
|
+
getRangePointerX(event) {
|
|
161377
|
+
const rect = this.chartContainer.getBoundingClientRect();
|
|
161378
|
+
return Math.min(Math.max(event.clientX - rect.left, 0), rect.width);
|
|
161379
|
+
}
|
|
161380
|
+
coordinateToEpochMs(coordinateArg) {
|
|
161381
|
+
const time = this.chart?.timeScale().coordinateToTime(coordinateArg);
|
|
161382
|
+
if (typeof time !== "number" || !Number.isFinite(time)) return null;
|
|
161383
|
+
const epochMs = Math.round(time * 1e3);
|
|
161384
|
+
return Number.isSafeInteger(epochMs) && epochMs >= 0 ? epochMs : null;
|
|
161385
|
+
}
|
|
161386
|
+
paintRangeOverlay(firstXArg, secondXArg) {
|
|
161387
|
+
if (!this.rangeOverlay) return;
|
|
161388
|
+
const left = Math.min(firstXArg, secondXArg);
|
|
161389
|
+
const width = Math.abs(secondXArg - firstXArg);
|
|
161390
|
+
this.rangeOverlay.style.display = "block";
|
|
161391
|
+
this.rangeOverlay.style.left = `${left}px`;
|
|
161392
|
+
this.rangeOverlay.style.width = `${Math.max(width, 1)}px`;
|
|
161393
|
+
}
|
|
161394
|
+
finishRangeDrag(pointerIdArg) {
|
|
161395
|
+
this.rangeDrag = null;
|
|
161396
|
+
window.removeEventListener("keydown", this.rangeKeydownHandler);
|
|
161397
|
+
try {
|
|
161398
|
+
this.chartContainer?.releasePointerCapture(pointerIdArg);
|
|
161399
|
+
} catch {
|
|
161400
|
+
}
|
|
161401
|
+
}
|
|
161402
|
+
setupRangeSelection() {
|
|
161403
|
+
if (!this.chartContainer) return;
|
|
161404
|
+
this.rangeOverlay = this.chartContainer.querySelector(".rangeSelectionOverlay");
|
|
161405
|
+
this.chart?.timeScale().subscribeVisibleTimeRangeChange(this.rangeVisibleTimeChangeHandler);
|
|
161406
|
+
this.chartContainer.addEventListener("pointerdown", this.rangePointerDownHandler);
|
|
161407
|
+
this.chartContainer.addEventListener("pointermove", this.rangePointerMoveHandler);
|
|
161408
|
+
this.chartContainer.addEventListener("pointerup", this.rangePointerUpHandler);
|
|
161409
|
+
this.chartContainer.addEventListener("pointercancel", this.rangePointerCancelHandler);
|
|
161410
|
+
this.chartContainer.addEventListener("lostpointercapture", this.rangePointerCancelHandler);
|
|
161411
|
+
this.rangeResizeObserver = new ResizeObserver(() => this.syncRangeOverlay());
|
|
161412
|
+
this.rangeResizeObserver.observe(this.chartContainer);
|
|
161413
|
+
this.syncRangeOverlay();
|
|
161414
|
+
}
|
|
161415
|
+
teardownRangeSelection() {
|
|
161416
|
+
if (!this.chartContainer) return;
|
|
161417
|
+
this.chart?.timeScale().unsubscribeVisibleTimeRangeChange(this.rangeVisibleTimeChangeHandler);
|
|
161418
|
+
this.chartContainer.removeEventListener("pointerdown", this.rangePointerDownHandler);
|
|
161419
|
+
this.chartContainer.removeEventListener("pointermove", this.rangePointerMoveHandler);
|
|
161420
|
+
this.chartContainer.removeEventListener("pointerup", this.rangePointerUpHandler);
|
|
161421
|
+
this.chartContainer.removeEventListener("pointercancel", this.rangePointerCancelHandler);
|
|
161422
|
+
this.chartContainer.removeEventListener("lostpointercapture", this.rangePointerCancelHandler);
|
|
161423
|
+
window.removeEventListener("keydown", this.rangeKeydownHandler);
|
|
161424
|
+
if (this.rangeDrag) {
|
|
161425
|
+
try {
|
|
161426
|
+
this.chartContainer.releasePointerCapture(this.rangeDrag.pointerId);
|
|
161427
|
+
} catch {
|
|
161428
|
+
}
|
|
161429
|
+
}
|
|
161430
|
+
this.rangeDrag = null;
|
|
161431
|
+
}
|
|
161432
|
+
syncRangeOverlay() {
|
|
161433
|
+
if (!this.rangeOverlay || !this.chart || !this.rangeSelectionEnabled || !this.selectedRange) {
|
|
161434
|
+
if (this.rangeOverlay) this.rangeOverlay.style.display = "none";
|
|
161435
|
+
return;
|
|
161436
|
+
}
|
|
161437
|
+
const { from: from3, to } = this.selectedRange;
|
|
161438
|
+
if (!Number.isSafeInteger(from3) || !Number.isSafeInteger(to) || from3 < 0 || to <= from3) {
|
|
161439
|
+
this.rangeOverlay.style.display = "none";
|
|
161440
|
+
return;
|
|
161441
|
+
}
|
|
161442
|
+
const fromCoordinate = this.chart.timeScale().timeToCoordinate(
|
|
161443
|
+
Math.floor(from3 / 1e3)
|
|
161444
|
+
);
|
|
161445
|
+
const toCoordinate = this.chart.timeScale().timeToCoordinate(
|
|
161446
|
+
Math.floor(to / 1e3)
|
|
161447
|
+
);
|
|
161448
|
+
if (fromCoordinate === null || toCoordinate === null) {
|
|
161449
|
+
this.rangeOverlay.style.display = "none";
|
|
161450
|
+
return;
|
|
161451
|
+
}
|
|
161452
|
+
this.paintRangeOverlay(fromCoordinate, toCoordinate);
|
|
161453
|
+
}
|
|
161296
161454
|
convertDataToLC(data) {
|
|
161297
161455
|
const pointsByTime = /* @__PURE__ */ new Map();
|
|
161298
161456
|
for (const point4 of data) {
|
|
@@ -161658,6 +161816,7 @@ var _DeesChartArea = class _DeesChartArea extends (_a56 = DeesElement, _chart_de
|
|
|
161658
161816
|
this.internalChartData = canonicalSeries;
|
|
161659
161817
|
this.recreateSeries(canonicalSeries);
|
|
161660
161818
|
this.setupTooltip();
|
|
161819
|
+
this.setupRangeSelection();
|
|
161661
161820
|
this.syncAutoScroll();
|
|
161662
161821
|
} catch (error) {
|
|
161663
161822
|
console.error("Failed to initialize chart:", error);
|
|
@@ -161689,6 +161848,9 @@ var _DeesChartArea = class _DeesChartArea extends (_a56 = DeesElement, _chart_de
|
|
|
161689
161848
|
if (this.chart && autoScrollConfigurationChanged) {
|
|
161690
161849
|
this.syncAutoScroll();
|
|
161691
161850
|
}
|
|
161851
|
+
if (changedProperties.has("selectedRange") || changedProperties.has("rangeSelectionEnabled")) {
|
|
161852
|
+
this.syncRangeOverlay();
|
|
161853
|
+
}
|
|
161692
161854
|
if (changedProperties.has("chartLines") && this.chart) {
|
|
161693
161855
|
this.refreshPriceLines();
|
|
161694
161856
|
}
|
|
@@ -161893,6 +162055,8 @@ _autoScrollInterval = new WeakMap();
|
|
|
161893
162055
|
_legendStats = new WeakMap();
|
|
161894
162056
|
_hideLegend = new WeakMap();
|
|
161895
162057
|
_chartLines = new WeakMap();
|
|
162058
|
+
_rangeSelectionEnabled = new WeakMap();
|
|
162059
|
+
_selectedRange = new WeakMap();
|
|
161896
162060
|
__decorateElement(_init57, 4, "chart", _chart_dec, _DeesChartArea, _chart);
|
|
161897
162061
|
__decorateElement(_init57, 4, "seriesStats", _seriesStats_dec, _DeesChartArea, _seriesStats);
|
|
161898
162062
|
__decorateElement(_init57, 4, "isFullPage", _isFullPage_dec, _DeesChartArea, _isFullPage);
|
|
@@ -161907,6 +162071,8 @@ __decorateElement(_init57, 4, "autoScrollInterval", _autoScrollInterval_dec, _De
|
|
|
161907
162071
|
__decorateElement(_init57, 4, "legendStats", _legendStats_dec, _DeesChartArea, _legendStats);
|
|
161908
162072
|
__decorateElement(_init57, 4, "hideLegend", _hideLegend_dec, _DeesChartArea, _hideLegend);
|
|
161909
162073
|
__decorateElement(_init57, 4, "chartLines", _chartLines_dec, _DeesChartArea, _chartLines);
|
|
162074
|
+
__decorateElement(_init57, 4, "rangeSelectionEnabled", _rangeSelectionEnabled_dec, _DeesChartArea, _rangeSelectionEnabled);
|
|
162075
|
+
__decorateElement(_init57, 4, "selectedRange", _selectedRange_dec, _DeesChartArea, _selectedRange);
|
|
161910
162076
|
_DeesChartArea = __decorateElement(_init57, 0, "DeesChartArea", _DeesChartArea_decorators, _DeesChartArea);
|
|
161911
162077
|
__name(_DeesChartArea, "DeesChartArea");
|
|
161912
162078
|
__publicField(_DeesChartArea, "demo", demoFunc37);
|
|
@@ -198221,7 +198387,7 @@ init_group_runtime();
|
|
|
198221
198387
|
// ts_web/00_commitinfo_data.ts
|
|
198222
198388
|
var commitinfo = {
|
|
198223
198389
|
name: "@design.estate/dees-catalog",
|
|
198224
|
-
version: "3.
|
|
198390
|
+
version: "3.99.1",
|
|
198225
198391
|
description: "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript."
|
|
198226
198392
|
};
|
|
198227
198393
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@design.estate/dees-catalog',
|
|
6
|
-
version: '3.
|
|
6
|
+
version: '3.99.1',
|
|
7
7
|
description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHNfd2ViLzAwX2NvbW1pdGluZm9fZGF0YS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUNILE1BQU0sQ0FBQyxNQUFNLFVBQVUsR0FBRztJQUN4QixJQUFJLEVBQUUsNkJBQTZCO0lBQ25DLE9BQU8sRUFBRSxRQUFRO0lBQ2pCLFdBQVcsRUFBRSxzSkFBc0o7Q0FDcEssQ0FBQSJ9
|
|
@@ -13,6 +13,10 @@ export type ChartSeriesConfig = {
|
|
|
13
13
|
export type TChartLegendStat = 'latest' | 'min' | 'max' | 'avg';
|
|
14
14
|
export type TChartPriceLine = 'avg' | 'max';
|
|
15
15
|
export declare const CHART_LEGEND_STATS: TChartLegendStat[];
|
|
16
|
+
export interface IChartSelectedRange {
|
|
17
|
+
from: number;
|
|
18
|
+
to: number;
|
|
19
|
+
}
|
|
16
20
|
declare global {
|
|
17
21
|
interface HTMLElementTagNameMap {
|
|
18
22
|
'dees-chart-area': DeesChartArea;
|
|
@@ -53,6 +57,8 @@ export declare class DeesChartArea extends DeesElement {
|
|
|
53
57
|
* keeps its existing rule of only appearing when max exceeds avg by >10%.
|
|
54
58
|
*/
|
|
55
59
|
accessor chartLines: TChartPriceLine[];
|
|
60
|
+
accessor rangeSelectionEnabled: boolean;
|
|
61
|
+
accessor selectedRange: IChartSelectedRange | null;
|
|
56
62
|
private internalChartData;
|
|
57
63
|
private autoScrollTimer;
|
|
58
64
|
private lcBundle;
|
|
@@ -63,10 +69,26 @@ export declare class DeesChartArea extends DeesElement {
|
|
|
63
69
|
private pendingRealtimePrune;
|
|
64
70
|
private crosshairMoveHandler;
|
|
65
71
|
private chartContainer;
|
|
72
|
+
private rangeOverlay;
|
|
73
|
+
private rangeResizeObserver;
|
|
74
|
+
private rangeDrag;
|
|
75
|
+
private readonly rangePointerDownHandler;
|
|
76
|
+
private readonly rangePointerMoveHandler;
|
|
77
|
+
private readonly rangePointerUpHandler;
|
|
78
|
+
private readonly rangePointerCancelHandler;
|
|
79
|
+
private readonly rangeKeydownHandler;
|
|
80
|
+
private readonly rangeVisibleTimeChangeHandler;
|
|
66
81
|
private readonly chartMouseLeaveHandler;
|
|
67
82
|
constructor();
|
|
68
83
|
static styles: import("@design.estate/dees-element").CSSResult[];
|
|
69
84
|
render(): TemplateResult;
|
|
85
|
+
private getRangePointerX;
|
|
86
|
+
private coordinateToEpochMs;
|
|
87
|
+
private paintRangeOverlay;
|
|
88
|
+
private finishRangeDrag;
|
|
89
|
+
private setupRangeSelection;
|
|
90
|
+
private teardownRangeSelection;
|
|
91
|
+
private syncRangeOverlay;
|
|
70
92
|
private convertDataToLC;
|
|
71
93
|
private getSeriesName;
|
|
72
94
|
private getSeriesKey;
|