@internetarchive/histogram-date-range 1.2.0 → 1.2.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.
Files changed (47) hide show
  1. package/.editorconfig +29 -29
  2. package/.eslintrc.js +14 -14
  3. package/.github/workflows/ci.yml +30 -26
  4. package/LICENSE +661 -661
  5. package/README.md +113 -113
  6. package/demo/index.css +22 -22
  7. package/demo/index.html +159 -159
  8. package/dist/demo/app-root.d.ts +19 -0
  9. package/dist/demo/app-root.js +58 -0
  10. package/dist/demo/app-root.js.map +1 -0
  11. package/dist/demo/js/app-root.d.ts +19 -19
  12. package/dist/demo/js/app-root.js +46 -46
  13. package/dist/docs/_snowpack/pkg/@internetarchive/ia-activity-indicator/ia-activity-indicator.d.ts +1 -0
  14. package/dist/docs/_snowpack/pkg/@internetarchive/ia-activity-indicator/ia-activity-indicator.js +2 -0
  15. package/dist/docs/_snowpack/pkg/@internetarchive/ia-activity-indicator/ia-activity-indicator.js.map +1 -0
  16. package/dist/index.d.ts +1 -1
  17. package/dist/index.js +1 -1
  18. package/dist/index.js.map +1 -1
  19. package/dist/src/histogram-date-range.d.ts +159 -159
  20. package/dist/src/histogram-date-range.js +846 -853
  21. package/dist/src/histogram-date-range.js.map +1 -1
  22. package/dist/test/histogram-date-range.test.d.ts +1 -1
  23. package/dist/test/histogram-date-range.test.js +488 -488
  24. package/dist/test/histogram-date-range.test.js.map +1 -1
  25. package/docs/_snowpack/pkg/@internetarchive/{ia-activity-indicator/ia-activity-indicator.js → ia-activity-indicator.js} +193 -168
  26. package/docs/_snowpack/pkg/common/lit-element-4616b61d.js +22 -0
  27. package/docs/_snowpack/pkg/common/lit-html-a4f3a51c.js +8 -0
  28. package/docs/_snowpack/pkg/common/query-assigned-elements-61aefe32.js +21 -0
  29. package/docs/_snowpack/pkg/dayjs/esm/plugin/customParseFormat.js +355 -0
  30. package/docs/_snowpack/pkg/dayjs/esm.js +631 -0
  31. package/docs/_snowpack/pkg/import-map.json +3 -1
  32. package/docs/_snowpack/pkg/lit/decorators.js +4 -21
  33. package/docs/_snowpack/pkg/lit/directives/live.js +3 -3
  34. package/docs/_snowpack/pkg/lit.js +2 -2
  35. package/docs/demo/index.css +22 -22
  36. package/docs/demo/index.html +159 -159
  37. package/docs/dist/src/histogram-date-range.js +5 -5
  38. package/index.ts +1 -1
  39. package/package.json +85 -84
  40. package/snowpack.config.js +10 -10
  41. package/src/histogram-date-range.ts +914 -922
  42. package/test/histogram-date-range.test.ts +684 -684
  43. package/tsconfig.json +21 -21
  44. package/web-dev-server.config.mjs +28 -28
  45. package/web-test-runner.config.mjs +29 -29
  46. package/docs/_snowpack/pkg/common/lit-element-2ebaea62.js +0 -22
  47. package/docs/_snowpack/pkg/common/lit-html-ab4365d1.js +0 -8
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-root.js","sourceRoot":"","sources":["../../demo/app-root.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,6BAA6B,CAAC;AAUrC;;;GAGG;AAEH,IAAa,OAAO,GAApB,MAAa,OAAQ,SAAQ,UAAU;IAAvC;;QACW,eAAU,GAAe;YAChC,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,IAAI;YACb,eAAe,EAAE,IAAI;YACrB,eAAe,EAAE,IAAI;YACrB,IAAI,EAAE;gBACJ,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;aACtE;SACF,CAAC;IAgCJ,CAAC;IA9BC,MAAM;;QACJ,OAAO,IAAI,CAAA;;mBAEI,MAAA,IAAI,CAAC,UAAU,0CAAE,OAAO;mBACxB,MAAA,IAAI,CAAC,UAAU,0CAAE,OAAO;2BAChB,MAAA,IAAI,CAAC,UAAU,0CAAE,eAAe;2BAChC,MAAA,IAAI,CAAC,UAAU,0CAAE,eAAe;uBACpC,IAAI;gBACX,MAAA,IAAI,CAAC,UAAU,0CAAE,IAAI;;;uBAGd,IAAI,CAAC,SAAS;KAChC,CAAC;IACJ,CAAC;IAEO,SAAS;QACf,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;QACjD,MAAM,OAAO,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;QAC3D,uBAAuB;QACvB,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,CAC3C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,OAAO,CAAC,CACpC,CAAC;QACF,IAAI,CAAC,UAAU,GAAG;YAChB,OAAO;YACP,OAAO;YACP,eAAe,EAAE,OAAO;YACxB,eAAe,EAAE,OAAO;YACxB,IAAI,EAAE,IAAI;SACX,CAAC;IACJ,CAAC;CACF,CAAA;AAxCU;IAAR,KAAK,EAAE;2CAQN;AATS,OAAO;IADnB,aAAa,CAAC,UAAU,CAAC;GACb,OAAO,CAyCnB;SAzCY,OAAO","sourcesContent":["import { LitElement, html, TemplateResult } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\nimport '../src/histogram-date-range';\n\ninterface DataSource {\n minDate: unknown;\n maxDate: unknown;\n minSelectedDate: unknown;\n maxSelectedDate: unknown;\n bins: number[];\n}\n\n/**\n * This is mainly to test the histogram-date-range within\n * a lit-element.\n */\n@customElement('app-root')\nexport class AppRoot extends LitElement {\n @state() dataSource: DataSource = {\n minDate: 1955,\n maxDate: 2000,\n minSelectedDate: 1955,\n maxSelectedDate: 2000,\n bins: [\n 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,\n ],\n };\n\n render(): TemplateResult {\n return html`\n <histogram-date-range\n .minDate=${this.dataSource?.minDate}\n .maxDate=${this.dataSource?.maxDate}\n .minSelectedDate=${this.dataSource?.minSelectedDate}\n .maxSelectedDate=${this.dataSource?.maxSelectedDate}\n .updateDelay=${1000}\n .bins=${this.dataSource?.bins}\n ></histogram-date-range>\n\n <button @click=${this.randomize}>Randomize</button>\n `;\n }\n\n private randomize() {\n const minDate = Math.round(Math.random() * 1000);\n const maxDate = minDate + Math.round(Math.random() * 1000);\n // generate random bins\n const bins = Array.from({ length: 20 }, () =>\n Math.floor(Math.random() * minDate)\n );\n this.dataSource = {\n minDate,\n maxDate,\n minSelectedDate: minDate,\n maxSelectedDate: maxDate,\n bins: bins,\n };\n }\n}\n"]}
@@ -1,19 +1,19 @@
1
- import { LitElement, TemplateResult } from 'lit';
2
- import '../../src/histogram-date-range';
3
- interface DataSource {
4
- minDate: unknown;
5
- maxDate: unknown;
6
- minSelectedDate: unknown;
7
- maxSelectedDate: unknown;
8
- bins: number[];
9
- }
10
- /**
11
- * This is mainly to test the histogram-date-range within
12
- * a lit-element.
13
- */
14
- export declare class AppRoot extends LitElement {
15
- dataSource: DataSource;
16
- render(): TemplateResult;
17
- private randomize;
18
- }
19
- export {};
1
+ import { LitElement, TemplateResult } from 'lit';
2
+ import '../../src/histogram-date-range';
3
+ interface DataSource {
4
+ minDate: unknown;
5
+ maxDate: unknown;
6
+ minSelectedDate: unknown;
7
+ maxSelectedDate: unknown;
8
+ bins: number[];
9
+ }
10
+ /**
11
+ * This is mainly to test the histogram-date-range within
12
+ * a lit-element.
13
+ */
14
+ export declare class AppRoot extends LitElement {
15
+ dataSource: DataSource;
16
+ render(): TemplateResult;
17
+ private randomize;
18
+ }
19
+ export {};
@@ -1,26 +1,26 @@
1
- import { __decorate } from "tslib";
2
- import { LitElement, html } from 'lit';
3
- import { customElement, state } from 'lit/decorators.js';
4
- import '../../src/histogram-date-range';
5
- /**
6
- * This is mainly to test the histogram-date-range within
7
- * a lit-element.
8
- */
9
- let AppRoot = class AppRoot extends LitElement {
10
- constructor() {
11
- super(...arguments);
12
- this.dataSource = {
13
- minDate: 1955,
14
- maxDate: 2000,
15
- minSelectedDate: 1955,
16
- maxSelectedDate: 2000,
17
- bins: [
18
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
19
- ],
20
- };
21
- }
22
- render() {
23
- var _a, _b, _c, _d, _e;
1
+ import { __decorate } from "tslib";
2
+ import { LitElement, html } from 'lit';
3
+ import { customElement, state } from 'lit/decorators.js';
4
+ import '../../src/histogram-date-range';
5
+ /**
6
+ * This is mainly to test the histogram-date-range within
7
+ * a lit-element.
8
+ */
9
+ let AppRoot = class AppRoot extends LitElement {
10
+ constructor() {
11
+ super(...arguments);
12
+ this.dataSource = {
13
+ minDate: 1955,
14
+ maxDate: 2000,
15
+ minSelectedDate: 1955,
16
+ maxSelectedDate: 2000,
17
+ bins: [
18
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
19
+ ],
20
+ };
21
+ }
22
+ render() {
23
+ var _a, _b, _c, _d, _e;
24
24
  return html `
25
25
  <histogram-date-range
26
26
  .minDate=${(_a = this.dataSource) === null || _a === void 0 ? void 0 : _a.minDate}
@@ -32,27 +32,27 @@ let AppRoot = class AppRoot extends LitElement {
32
32
  ></histogram-date-range>
33
33
 
34
34
  <button @click=${this.randomize}>Randomize</button>
35
- `;
36
- }
37
- randomize() {
38
- const minDate = Math.round(Math.random() * 1000);
39
- const maxDate = minDate + Math.round(Math.random() * 1000);
40
- // generate random bins
41
- const bins = Array.from({ length: 20 }, () => Math.floor(Math.random() * minDate));
42
- this.dataSource = {
43
- minDate,
44
- maxDate,
45
- minSelectedDate: minDate,
46
- maxSelectedDate: maxDate,
47
- bins: bins,
48
- };
49
- }
50
- };
51
- __decorate([
52
- state()
53
- ], AppRoot.prototype, "dataSource", void 0);
54
- AppRoot = __decorate([
55
- customElement('app-root')
56
- ], AppRoot);
57
- export { AppRoot };
35
+ `;
36
+ }
37
+ randomize() {
38
+ const minDate = Math.round(Math.random() * 1000);
39
+ const maxDate = minDate + Math.round(Math.random() * 1000);
40
+ // generate random bins
41
+ const bins = Array.from({ length: 20 }, () => Math.floor(Math.random() * minDate));
42
+ this.dataSource = {
43
+ minDate,
44
+ maxDate,
45
+ minSelectedDate: minDate,
46
+ maxSelectedDate: maxDate,
47
+ bins: bins,
48
+ };
49
+ }
50
+ };
51
+ __decorate([
52
+ state()
53
+ ], AppRoot.prototype, "dataSource", void 0);
54
+ AppRoot = __decorate([
55
+ customElement('app-root')
56
+ ], AppRoot);
57
+ export { AppRoot };
58
58
  //# sourceMappingURL=app-root.js.map
@@ -0,0 +1,2 @@
1
+ import './index';
2
+ //# sourceMappingURL=ia-activity-indicator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ia-activity-indicator.js","sourceRoot":"","sources":["../../../../../../docs/_snowpack/pkg/@internetarchive/ia-activity-indicator/ia-activity-indicator.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAC","sourcesContent":["import './index';\n"]}
package/dist/index.d.ts CHANGED
@@ -1 +1 @@
1
- export { HistogramDateRange } from './src/histogram-date-range';
1
+ export { HistogramDateRange } from './src/histogram-date-range';
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { HistogramDateRange } from './src/histogram-date-range';
1
+ export { HistogramDateRange } from './src/histogram-date-range';
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["export { HistogramDateRange } from './src/histogram-date-range';\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["export { HistogramDateRange } from './src/histogram-date-range';\n"]}
@@ -1,159 +1,159 @@
1
- import { LitElement, PropertyValues, SVGTemplateResult, TemplateResult } from 'lit';
2
- import '@internetarchive/ia-activity-indicator/ia-activity-indicator';
3
- export declare class HistogramDateRange extends LitElement {
4
- width: number;
5
- height: number;
6
- sliderWidth: number;
7
- tooltipWidth: number;
8
- tooltipHeight: number;
9
- updateDelay: number;
10
- dateFormat: string;
11
- missingDataMessage: string;
12
- minDate: string;
13
- maxDate: string;
14
- disabled: boolean;
15
- bins: number[];
16
- /** If true, update events will not be canceled by the date inputs receiving focus */
17
- updateWhileFocused: boolean;
18
- private _tooltipOffset;
19
- private _tooltipContent?;
20
- private _tooltipVisible;
21
- private _isDragging;
22
- private _isLoading;
23
- private _minSelectedDate;
24
- private _maxSelectedDate;
25
- private _minDateMS;
26
- private _maxDateMS;
27
- private _dragOffset;
28
- private _histWidth;
29
- private _binWidth;
30
- private _currentSlider?;
31
- private _histData;
32
- private _emitUpdatedEventTimer?;
33
- private _previousDateRange;
34
- disconnectedCallback(): void;
35
- updated(changedProps: PropertyValues): void;
36
- /**
37
- * Set private properties that depend on the attribute bin data
38
- *
39
- * We're caching these values and not using getters to avoid recalculating all
40
- * of the hist data every time the user drags a slider or hovers over a bar
41
- * creating a tooltip.
42
- */
43
- private handleDataUpdate;
44
- private calculateHistData;
45
- private get hasBinData();
46
- private get _numBins();
47
- private get histogramLeftEdgeX();
48
- private get histogramRightEdgeX();
49
- /** component's loading (and disabled) state */
50
- get loading(): boolean;
51
- set loading(value: boolean);
52
- /** formatted minimum date of selected date range */
53
- get minSelectedDate(): string;
54
- /** updates minSelectedDate if new date is valid */
55
- set minSelectedDate(rawDate: string);
56
- /** formatted maximum date of selected date range */
57
- get maxSelectedDate(): string;
58
- /** updates maxSelectedDate if new date is valid */
59
- set maxSelectedDate(rawDate: string);
60
- /** horizontal position of min date slider */
61
- get minSliderX(): number;
62
- /** horizontal position of max date slider */
63
- get maxSliderX(): number;
64
- private get dateRangeMS();
65
- private showTooltip;
66
- private hideTooltip;
67
- private drag;
68
- private drop;
69
- /**
70
- * Adjust the date range based on slider movement
71
- *
72
- * @param e PointerEvent from the slider being moved
73
- */
74
- private move;
75
- /**
76
- * Constrain a proposed value for the minimum (left) slider
77
- *
78
- * If the value is less than the leftmost valid position, then set it to the
79
- * left edge of the histogram (ie the slider width). If the value is greater
80
- * than the rightmost valid position (the position of the max slider), then
81
- * set it to the position of the max slider
82
- */
83
- private validMinSliderX;
84
- /**
85
- * Constrain a proposed value for the maximum (right) slider
86
- *
87
- * If the value is greater than the rightmost valid position, then set it to
88
- * the right edge of the histogram (ie histogram width - slider width). If the
89
- * value is less than the leftmost valid position (the position of the min
90
- * slider), then set it to the position of the min slider
91
- */
92
- private validMaxSliderX;
93
- private addListeners;
94
- private removeListeners;
95
- /**
96
- * start a timer to emit an update event. this timer can be canceled (and the
97
- * event not emitted) if user drags a slider or focuses a date input within
98
- * the update delay
99
- */
100
- private beginEmitUpdateProcess;
101
- private cancelPendingUpdateEvent;
102
- /**
103
- * find position of pointer in relation to the current slider
104
- */
105
- private setDragOffset;
106
- /**
107
- * @param x horizontal position of slider
108
- * @returns string representation of date
109
- */
110
- private translatePositionToDate;
111
- /**
112
- * Returns slider x-position corresponding to given date
113
- *
114
- * @param date
115
- * @returns x-position of slider
116
- */
117
- private translateDateToPosition;
118
- /** ensure that the returned value is between minValue and maxValue */
119
- private clamp;
120
- private handleInputFocus;
121
- private handleMinDateInput;
122
- private handleMaxDateInput;
123
- private handleKeyUp;
124
- private get currentDateRangeString();
125
- private getMSFromString;
126
- /**
127
- * expand or narrow the selected range by moving the slider nearest the
128
- * clicked bar to the outer edge of the clicked bar
129
- *
130
- * @param e Event click event from a histogram bar
131
- */
132
- private handleBarClick;
133
- private get minSliderTemplate();
134
- private get maxSliderTemplate();
135
- private generateSliderSVG;
136
- get selectedRangeTemplate(): SVGTemplateResult;
137
- get histogramTemplate(): SVGTemplateResult[];
138
- private formatDate;
139
- /**
140
- * NOTE: we are relying on the lit `live` directive in the template to
141
- * ensure that the change to minSelectedDate is noticed and the input value
142
- * gets properly re-rendered. see
143
- * https://lit.dev/docs/templates/directives/#live
144
- */
145
- get minInputTemplate(): TemplateResult;
146
- get maxInputTemplate(): TemplateResult;
147
- get minLabelTemplate(): TemplateResult;
148
- get maxLabelTemplate(): TemplateResult;
149
- get tooltipTemplate(): TemplateResult;
150
- private get noDataTemplate();
151
- private get activityIndicatorTemplate();
152
- static styles: import("lit").CSSResult;
153
- render(): TemplateResult;
154
- }
155
- declare global {
156
- interface HTMLElementTagNameMap {
157
- 'histogram-date-range': HistogramDateRange;
158
- }
159
- }
1
+ import '@internetarchive/ia-activity-indicator';
2
+ import { LitElement, PropertyValues, SVGTemplateResult, TemplateResult } from 'lit';
3
+ export declare class HistogramDateRange extends LitElement {
4
+ width: number;
5
+ height: number;
6
+ sliderWidth: number;
7
+ tooltipWidth: number;
8
+ tooltipHeight: number;
9
+ updateDelay: number;
10
+ dateFormat: string;
11
+ missingDataMessage: string;
12
+ minDate: string;
13
+ maxDate: string;
14
+ disabled: boolean;
15
+ bins: number[];
16
+ /** If true, update events will not be canceled by the date inputs receiving focus */
17
+ updateWhileFocused: boolean;
18
+ private _tooltipOffset;
19
+ private _tooltipContent?;
20
+ private _tooltipVisible;
21
+ private _isDragging;
22
+ private _isLoading;
23
+ private _minSelectedDate;
24
+ private _maxSelectedDate;
25
+ private _minDateMS;
26
+ private _maxDateMS;
27
+ private _dragOffset;
28
+ private _histWidth;
29
+ private _binWidth;
30
+ private _currentSlider?;
31
+ private _histData;
32
+ private _emitUpdatedEventTimer?;
33
+ private _previousDateRange;
34
+ disconnectedCallback(): void;
35
+ updated(changedProps: PropertyValues): void;
36
+ /**
37
+ * Set private properties that depend on the attribute bin data
38
+ *
39
+ * We're caching these values and not using getters to avoid recalculating all
40
+ * of the hist data every time the user drags a slider or hovers over a bar
41
+ * creating a tooltip.
42
+ */
43
+ private handleDataUpdate;
44
+ private calculateHistData;
45
+ private get hasBinData();
46
+ private get _numBins();
47
+ private get histogramLeftEdgeX();
48
+ private get histogramRightEdgeX();
49
+ /** component's loading (and disabled) state */
50
+ get loading(): boolean;
51
+ set loading(value: boolean);
52
+ /** formatted minimum date of selected date range */
53
+ get minSelectedDate(): string;
54
+ /** updates minSelectedDate if new date is valid */
55
+ set minSelectedDate(rawDate: string);
56
+ /** formatted maximum date of selected date range */
57
+ get maxSelectedDate(): string;
58
+ /** updates maxSelectedDate if new date is valid */
59
+ set maxSelectedDate(rawDate: string);
60
+ /** horizontal position of min date slider */
61
+ get minSliderX(): number;
62
+ /** horizontal position of max date slider */
63
+ get maxSliderX(): number;
64
+ private get dateRangeMS();
65
+ private showTooltip;
66
+ private hideTooltip;
67
+ private drag;
68
+ private drop;
69
+ /**
70
+ * Adjust the date range based on slider movement
71
+ *
72
+ * @param e PointerEvent from the slider being moved
73
+ */
74
+ private move;
75
+ /**
76
+ * Constrain a proposed value for the minimum (left) slider
77
+ *
78
+ * If the value is less than the leftmost valid position, then set it to the
79
+ * left edge of the histogram (ie the slider width). If the value is greater
80
+ * than the rightmost valid position (the position of the max slider), then
81
+ * set it to the position of the max slider
82
+ */
83
+ private validMinSliderX;
84
+ /**
85
+ * Constrain a proposed value for the maximum (right) slider
86
+ *
87
+ * If the value is greater than the rightmost valid position, then set it to
88
+ * the right edge of the histogram (ie histogram width - slider width). If the
89
+ * value is less than the leftmost valid position (the position of the min
90
+ * slider), then set it to the position of the min slider
91
+ */
92
+ private validMaxSliderX;
93
+ private addListeners;
94
+ private removeListeners;
95
+ /**
96
+ * start a timer to emit an update event. this timer can be canceled (and the
97
+ * event not emitted) if user drags a slider or focuses a date input within
98
+ * the update delay
99
+ */
100
+ private beginEmitUpdateProcess;
101
+ private cancelPendingUpdateEvent;
102
+ /**
103
+ * find position of pointer in relation to the current slider
104
+ */
105
+ private setDragOffset;
106
+ /**
107
+ * @param x horizontal position of slider
108
+ * @returns string representation of date
109
+ */
110
+ private translatePositionToDate;
111
+ /**
112
+ * Returns slider x-position corresponding to given date
113
+ *
114
+ * @param date
115
+ * @returns x-position of slider
116
+ */
117
+ private translateDateToPosition;
118
+ /** ensure that the returned value is between minValue and maxValue */
119
+ private clamp;
120
+ private handleInputFocus;
121
+ private handleMinDateInput;
122
+ private handleMaxDateInput;
123
+ private handleKeyUp;
124
+ private get currentDateRangeString();
125
+ private getMSFromString;
126
+ /**
127
+ * expand or narrow the selected range by moving the slider nearest the
128
+ * clicked bar to the outer edge of the clicked bar
129
+ *
130
+ * @param e Event click event from a histogram bar
131
+ */
132
+ private handleBarClick;
133
+ private get minSliderTemplate();
134
+ private get maxSliderTemplate();
135
+ private generateSliderSVG;
136
+ get selectedRangeTemplate(): SVGTemplateResult;
137
+ get histogramTemplate(): SVGTemplateResult[];
138
+ private formatDate;
139
+ /**
140
+ * NOTE: we are relying on the lit `live` directive in the template to
141
+ * ensure that the change to minSelectedDate is noticed and the input value
142
+ * gets properly re-rendered. see
143
+ * https://lit.dev/docs/templates/directives/#live
144
+ */
145
+ get minInputTemplate(): TemplateResult;
146
+ get maxInputTemplate(): TemplateResult;
147
+ get minLabelTemplate(): TemplateResult;
148
+ get maxLabelTemplate(): TemplateResult;
149
+ get tooltipTemplate(): TemplateResult;
150
+ private get noDataTemplate();
151
+ private get activityIndicatorTemplate();
152
+ static styles: import("lit").CSSResult;
153
+ render(): TemplateResult;
154
+ }
155
+ declare global {
156
+ interface HTMLElementTagNameMap {
157
+ 'histogram-date-range': HistogramDateRange;
158
+ }
159
+ }