@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.
- package/.editorconfig +29 -29
- package/.eslintrc.js +14 -14
- package/.github/workflows/ci.yml +30 -26
- package/LICENSE +661 -661
- package/README.md +113 -113
- package/demo/index.css +22 -22
- package/demo/index.html +159 -159
- package/dist/demo/app-root.d.ts +19 -0
- package/dist/demo/app-root.js +58 -0
- package/dist/demo/app-root.js.map +1 -0
- package/dist/demo/js/app-root.d.ts +19 -19
- package/dist/demo/js/app-root.js +46 -46
- package/dist/docs/_snowpack/pkg/@internetarchive/ia-activity-indicator/ia-activity-indicator.d.ts +1 -0
- package/dist/docs/_snowpack/pkg/@internetarchive/ia-activity-indicator/ia-activity-indicator.js +2 -0
- package/dist/docs/_snowpack/pkg/@internetarchive/ia-activity-indicator/ia-activity-indicator.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/src/histogram-date-range.d.ts +159 -159
- package/dist/src/histogram-date-range.js +846 -853
- package/dist/src/histogram-date-range.js.map +1 -1
- package/dist/test/histogram-date-range.test.d.ts +1 -1
- package/dist/test/histogram-date-range.test.js +488 -488
- package/dist/test/histogram-date-range.test.js.map +1 -1
- package/docs/_snowpack/pkg/@internetarchive/{ia-activity-indicator/ia-activity-indicator.js → ia-activity-indicator.js} +193 -168
- package/docs/_snowpack/pkg/common/lit-element-4616b61d.js +22 -0
- package/docs/_snowpack/pkg/common/lit-html-a4f3a51c.js +8 -0
- package/docs/_snowpack/pkg/common/query-assigned-elements-61aefe32.js +21 -0
- package/docs/_snowpack/pkg/dayjs/esm/plugin/customParseFormat.js +355 -0
- package/docs/_snowpack/pkg/dayjs/esm.js +631 -0
- package/docs/_snowpack/pkg/import-map.json +3 -1
- package/docs/_snowpack/pkg/lit/decorators.js +4 -21
- package/docs/_snowpack/pkg/lit/directives/live.js +3 -3
- package/docs/_snowpack/pkg/lit.js +2 -2
- package/docs/demo/index.css +22 -22
- package/docs/demo/index.html +159 -159
- package/docs/dist/src/histogram-date-range.js +5 -5
- package/index.ts +1 -1
- package/package.json +85 -84
- package/snowpack.config.js +10 -10
- package/src/histogram-date-range.ts +914 -922
- package/test/histogram-date-range.test.ts +684 -684
- package/tsconfig.json +21 -21
- package/web-dev-server.config.mjs +28 -28
- package/web-test-runner.config.mjs +29 -29
- package/docs/_snowpack/pkg/common/lit-element-2ebaea62.js +0 -22
- package/docs/_snowpack/pkg/common/lit-html-ab4365d1.js +0 -8
package/docs/demo/index.css
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
html {
|
|
2
|
-
font-size: 10px;
|
|
3
|
-
font-family: sans-serif;
|
|
4
|
-
}
|
|
5
|
-
body {
|
|
6
|
-
background: white;
|
|
7
|
-
}
|
|
8
|
-
.container {
|
|
9
|
-
margin-top: 20px;
|
|
10
|
-
display: grid;
|
|
11
|
-
justify-content: center;
|
|
12
|
-
}
|
|
13
|
-
.description {
|
|
14
|
-
margin: 10px auto;
|
|
15
|
-
}
|
|
16
|
-
.received-events {
|
|
17
|
-
position: absolute;
|
|
18
|
-
top: 0;
|
|
19
|
-
}
|
|
20
|
-
button {
|
|
21
|
-
font-size: 100%;
|
|
22
|
-
margin: 10px auto;
|
|
1
|
+
html {
|
|
2
|
+
font-size: 10px;
|
|
3
|
+
font-family: sans-serif;
|
|
4
|
+
}
|
|
5
|
+
body {
|
|
6
|
+
background: white;
|
|
7
|
+
}
|
|
8
|
+
.container {
|
|
9
|
+
margin-top: 20px;
|
|
10
|
+
display: grid;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
}
|
|
13
|
+
.description {
|
|
14
|
+
margin: 10px auto;
|
|
15
|
+
}
|
|
16
|
+
.received-events {
|
|
17
|
+
position: absolute;
|
|
18
|
+
top: 0;
|
|
19
|
+
}
|
|
20
|
+
button {
|
|
21
|
+
font-size: 100%;
|
|
22
|
+
margin: 10px auto;
|
|
23
23
|
}
|
package/docs/demo/index.html
CHANGED
|
@@ -1,159 +1,159 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
5
|
-
<meta charset="utf-8" />
|
|
6
|
-
<link rel="stylesheet" href="index.css">
|
|
7
|
-
</head>
|
|
8
|
-
|
|
9
|
-
<script type="module">
|
|
10
|
-
import '../dist/src/histogram-date-range.js';
|
|
11
|
-
let eventCount = 0;
|
|
12
|
-
import '../dist/demo/js/app-root.js';
|
|
13
|
-
// listen to events from the component and display the data received from them
|
|
14
|
-
document.addEventListener('histogramDateRangeUpdated', e => {
|
|
15
|
-
document.querySelector('.received-events').innerHTML =
|
|
16
|
-
++eventCount + ': ' + JSON.stringify(e.detail);
|
|
17
|
-
});
|
|
18
|
-
</script>
|
|
19
|
-
<body>
|
|
20
|
-
<pre class="received-events"></pre>
|
|
21
|
-
<div class="container">
|
|
22
|
-
<div class="description">
|
|
23
|
-
histogram inside a lit element
|
|
24
|
-
</div>
|
|
25
|
-
<app-root></app-root>
|
|
26
|
-
|
|
27
|
-
<div class="description">
|
|
28
|
-
pre-selected range with 1000ms debounce delay
|
|
29
|
-
</div>
|
|
30
|
-
<histogram-date-range
|
|
31
|
-
minDate="1400"
|
|
32
|
-
maxDate="2021"
|
|
33
|
-
updateDelay="1000"
|
|
34
|
-
minSelectedDate="1800"
|
|
35
|
-
maxSelectedDate="1900"
|
|
36
|
-
bins="[ 74, 67, 17, 66, 49, 93, 47, 61, 32, 46, 53, 2,
|
|
37
|
-
13, 45, 28, 1, 8, 70, 37, 74, 67, 17, 66, 49, 93,
|
|
38
|
-
47, 61, 70, 37, 74, 67, 17, 66, 49, 93, 47, 61, 32,
|
|
39
|
-
32, 70, 37, 74, 67, 17, 66, 49, 93, 47, 61, 32
|
|
40
|
-
]"
|
|
41
|
-
></histogram-date-range>
|
|
42
|
-
</div>
|
|
43
|
-
|
|
44
|
-
<div class="container">
|
|
45
|
-
<div class="description">range spanning negative to positive years</div>
|
|
46
|
-
<histogram-date-range
|
|
47
|
-
minDate="-1050" maxDate="2200"
|
|
48
|
-
bins="[ 74, 67, 17, 66, 49, 93, 47, 61, 32, 46, 53, 2,
|
|
49
|
-
13, 45, 28, 1, 8, 70, 37, 74, 67, 17, 66, 49, 93,
|
|
50
|
-
47, 61, 70, 37, 74, 67, 17, 66, 49, 93, 47, 61, 32,
|
|
51
|
-
32, 70, 37, 74, 67, 17, 66, 49, 93, 47, 61, 32
|
|
52
|
-
]"
|
|
53
|
-
></histogram-date-range>
|
|
54
|
-
</div>
|
|
55
|
-
|
|
56
|
-
<div class="container">
|
|
57
|
-
<div class="description">
|
|
58
|
-
small diff between max and min values
|
|
59
|
-
</div>
|
|
60
|
-
<histogram-date-range
|
|
61
|
-
width="175"
|
|
62
|
-
tooltipwidth="120"
|
|
63
|
-
dateFormat="YYYY"
|
|
64
|
-
updateDelay="1000"
|
|
65
|
-
missingDataMessage="..."
|
|
66
|
-
minSelectedDate="1987"
|
|
67
|
-
maxSelectedDate="2016"
|
|
68
|
-
minDate="1987"
|
|
69
|
-
maxDate="2016"
|
|
70
|
-
bins="[1519,1643,1880,2046,1973,2085,2148,2152,2349,2304,2314,2484,2590,2450,2495,2475,2392,2631,2504,2619,2519,2552,2462,2217,2171,2132,2127,2041,1638,1441]"
|
|
71
|
-
>
|
|
72
|
-
</histogram-date-range>
|
|
73
|
-
</div>
|
|
74
|
-
|
|
75
|
-
<div class="container">
|
|
76
|
-
<div class="description">small year range and few bins</div>
|
|
77
|
-
<histogram-date-range width="175" tooltipwidth="120"
|
|
78
|
-
minDate="2008" maxDate="2016" bins="[76104,866978,1151617,986331,218672,107410,3324]">
|
|
79
|
-
</histogram-date-range>
|
|
80
|
-
</div>
|
|
81
|
-
|
|
82
|
-
<div class="container">
|
|
83
|
-
<div class="description">
|
|
84
|
-
default range with custom styling and date format
|
|
85
|
-
</div>
|
|
86
|
-
<histogram-date-range
|
|
87
|
-
width="300"
|
|
88
|
-
height="50"
|
|
89
|
-
tooltipWidth="140"
|
|
90
|
-
dateFormat="DD MMM YYYY"
|
|
91
|
-
style="
|
|
92
|
-
--histogramDateRangeSliderColor: #d8b384;
|
|
93
|
-
--histogramDateRangeSelectedRangeColor: #f3f0d7;
|
|
94
|
-
--histogramDateRangeTooltipFontFamily: serif;
|
|
95
|
-
--histogramDateRangeInputFontFamily: serif;
|
|
96
|
-
--histogramDateRangeTooltipFontSize: 1rem;
|
|
97
|
-
--histogramDateRangeInputWidth: 85px;
|
|
98
|
-
"
|
|
99
|
-
minDate="05 May 1972"
|
|
100
|
-
maxDate="21 Dec 1980"
|
|
101
|
-
bins="[ 85, 25, 200, 0, 0, 34, 0, 2, 5, 10, 0, 56, 10, 45, 100, 70, 50 ]"
|
|
102
|
-
></histogram-date-range>
|
|
103
|
-
</div>
|
|
104
|
-
|
|
105
|
-
<div class="container">
|
|
106
|
-
<div class="description">loading state toggle</div>
|
|
107
|
-
<histogram-date-range
|
|
108
|
-
id="loading"
|
|
109
|
-
minDate="1900"
|
|
110
|
-
maxDate="2021"
|
|
111
|
-
bins="[
|
|
112
|
-
74, 67, 17, 66, 49, 93, 47, 61, 32, 46, 53, 2, 13, 45, 67, 17, 66,
|
|
113
|
-
49, 93, 47, 61, 32, 32, 70, 37, 74, 67, 17, 66, 49, 93, 47, 61, 32
|
|
114
|
-
]"
|
|
115
|
-
></histogram-date-range>
|
|
116
|
-
<button id="loading-toggle">toggle loading</button>
|
|
117
|
-
</div>
|
|
118
|
-
<script>
|
|
119
|
-
document
|
|
120
|
-
.querySelector('#loading-toggle')
|
|
121
|
-
.addEventListener('click', () => {
|
|
122
|
-
const histogram = document.querySelector(
|
|
123
|
-
'histogram-date-range#loading'
|
|
124
|
-
);
|
|
125
|
-
histogram.loading = !histogram.loading;
|
|
126
|
-
});
|
|
127
|
-
</script>
|
|
128
|
-
|
|
129
|
-
<div class="container">
|
|
130
|
-
<div class="description">data set up with js</div>
|
|
131
|
-
<histogram-date-range id="js-setup"></histogram-date-range>
|
|
132
|
-
</div>
|
|
133
|
-
<script>
|
|
134
|
-
document.addEventListener('DOMContentLoaded', function () {
|
|
135
|
-
const histogram = document.querySelector(
|
|
136
|
-
'histogram-date-range#js-setup'
|
|
137
|
-
);
|
|
138
|
-
histogram.minDate = '1950';
|
|
139
|
-
histogram.maxDate = '2000';
|
|
140
|
-
// generate array of [0, 1, 2, ... 49]
|
|
141
|
-
histogram.bins = [...Array(50).keys()];
|
|
142
|
-
});
|
|
143
|
-
</script>
|
|
144
|
-
|
|
145
|
-
<div class="container">
|
|
146
|
-
<div class="description">
|
|
147
|
-
single bin
|
|
148
|
-
</div>
|
|
149
|
-
<histogram-date-range minDate="1926" maxDate="1926" bins="[8]">
|
|
150
|
-
</histogram-date-range>
|
|
151
|
-
</div>
|
|
152
|
-
|
|
153
|
-
<div class="container">
|
|
154
|
-
<div class="description">empty data</div>
|
|
155
|
-
<histogram-date-range missingDataMessage="no data..."></histoghistogram-date-range>
|
|
156
|
-
</div>
|
|
157
|
-
|
|
158
|
-
</body>
|
|
159
|
-
</html>
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
5
|
+
<meta charset="utf-8" />
|
|
6
|
+
<link rel="stylesheet" href="index.css">
|
|
7
|
+
</head>
|
|
8
|
+
|
|
9
|
+
<script type="module">
|
|
10
|
+
import '../dist/src/histogram-date-range.js';
|
|
11
|
+
let eventCount = 0;
|
|
12
|
+
import '../dist/demo/js/app-root.js';
|
|
13
|
+
// listen to events from the component and display the data received from them
|
|
14
|
+
document.addEventListener('histogramDateRangeUpdated', e => {
|
|
15
|
+
document.querySelector('.received-events').innerHTML =
|
|
16
|
+
++eventCount + ': ' + JSON.stringify(e.detail);
|
|
17
|
+
});
|
|
18
|
+
</script>
|
|
19
|
+
<body>
|
|
20
|
+
<pre class="received-events"></pre>
|
|
21
|
+
<div class="container">
|
|
22
|
+
<div class="description">
|
|
23
|
+
histogram inside a lit element
|
|
24
|
+
</div>
|
|
25
|
+
<app-root></app-root>
|
|
26
|
+
|
|
27
|
+
<div class="description">
|
|
28
|
+
pre-selected range with 1000ms debounce delay
|
|
29
|
+
</div>
|
|
30
|
+
<histogram-date-range
|
|
31
|
+
minDate="1400"
|
|
32
|
+
maxDate="2021"
|
|
33
|
+
updateDelay="1000"
|
|
34
|
+
minSelectedDate="1800"
|
|
35
|
+
maxSelectedDate="1900"
|
|
36
|
+
bins="[ 74, 67, 17, 66, 49, 93, 47, 61, 32, 46, 53, 2,
|
|
37
|
+
13, 45, 28, 1, 8, 70, 37, 74, 67, 17, 66, 49, 93,
|
|
38
|
+
47, 61, 70, 37, 74, 67, 17, 66, 49, 93, 47, 61, 32,
|
|
39
|
+
32, 70, 37, 74, 67, 17, 66, 49, 93, 47, 61, 32
|
|
40
|
+
]"
|
|
41
|
+
></histogram-date-range>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<div class="container">
|
|
45
|
+
<div class="description">range spanning negative to positive years</div>
|
|
46
|
+
<histogram-date-range
|
|
47
|
+
minDate="-1050" maxDate="2200"
|
|
48
|
+
bins="[ 74, 67, 17, 66, 49, 93, 47, 61, 32, 46, 53, 2,
|
|
49
|
+
13, 45, 28, 1, 8, 70, 37, 74, 67, 17, 66, 49, 93,
|
|
50
|
+
47, 61, 70, 37, 74, 67, 17, 66, 49, 93, 47, 61, 32,
|
|
51
|
+
32, 70, 37, 74, 67, 17, 66, 49, 93, 47, 61, 32
|
|
52
|
+
]"
|
|
53
|
+
></histogram-date-range>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<div class="container">
|
|
57
|
+
<div class="description">
|
|
58
|
+
small diff between max and min values
|
|
59
|
+
</div>
|
|
60
|
+
<histogram-date-range
|
|
61
|
+
width="175"
|
|
62
|
+
tooltipwidth="120"
|
|
63
|
+
dateFormat="YYYY"
|
|
64
|
+
updateDelay="1000"
|
|
65
|
+
missingDataMessage="..."
|
|
66
|
+
minSelectedDate="1987"
|
|
67
|
+
maxSelectedDate="2016"
|
|
68
|
+
minDate="1987"
|
|
69
|
+
maxDate="2016"
|
|
70
|
+
bins="[1519,1643,1880,2046,1973,2085,2148,2152,2349,2304,2314,2484,2590,2450,2495,2475,2392,2631,2504,2619,2519,2552,2462,2217,2171,2132,2127,2041,1638,1441]"
|
|
71
|
+
>
|
|
72
|
+
</histogram-date-range>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<div class="container">
|
|
76
|
+
<div class="description">small year range and few bins</div>
|
|
77
|
+
<histogram-date-range width="175" tooltipwidth="120"
|
|
78
|
+
minDate="2008" maxDate="2016" bins="[76104,866978,1151617,986331,218672,107410,3324]">
|
|
79
|
+
</histogram-date-range>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<div class="container">
|
|
83
|
+
<div class="description">
|
|
84
|
+
default range with custom styling and date format
|
|
85
|
+
</div>
|
|
86
|
+
<histogram-date-range
|
|
87
|
+
width="300"
|
|
88
|
+
height="50"
|
|
89
|
+
tooltipWidth="140"
|
|
90
|
+
dateFormat="DD MMM YYYY"
|
|
91
|
+
style="
|
|
92
|
+
--histogramDateRangeSliderColor: #d8b384;
|
|
93
|
+
--histogramDateRangeSelectedRangeColor: #f3f0d7;
|
|
94
|
+
--histogramDateRangeTooltipFontFamily: serif;
|
|
95
|
+
--histogramDateRangeInputFontFamily: serif;
|
|
96
|
+
--histogramDateRangeTooltipFontSize: 1rem;
|
|
97
|
+
--histogramDateRangeInputWidth: 85px;
|
|
98
|
+
"
|
|
99
|
+
minDate="05 May 1972"
|
|
100
|
+
maxDate="21 Dec 1980"
|
|
101
|
+
bins="[ 85, 25, 200, 0, 0, 34, 0, 2, 5, 10, 0, 56, 10, 45, 100, 70, 50 ]"
|
|
102
|
+
></histogram-date-range>
|
|
103
|
+
</div>
|
|
104
|
+
|
|
105
|
+
<div class="container">
|
|
106
|
+
<div class="description">loading state toggle</div>
|
|
107
|
+
<histogram-date-range
|
|
108
|
+
id="loading"
|
|
109
|
+
minDate="1900"
|
|
110
|
+
maxDate="2021"
|
|
111
|
+
bins="[
|
|
112
|
+
74, 67, 17, 66, 49, 93, 47, 61, 32, 46, 53, 2, 13, 45, 67, 17, 66,
|
|
113
|
+
49, 93, 47, 61, 32, 32, 70, 37, 74, 67, 17, 66, 49, 93, 47, 61, 32
|
|
114
|
+
]"
|
|
115
|
+
></histogram-date-range>
|
|
116
|
+
<button id="loading-toggle">toggle loading</button>
|
|
117
|
+
</div>
|
|
118
|
+
<script>
|
|
119
|
+
document
|
|
120
|
+
.querySelector('#loading-toggle')
|
|
121
|
+
.addEventListener('click', () => {
|
|
122
|
+
const histogram = document.querySelector(
|
|
123
|
+
'histogram-date-range#loading'
|
|
124
|
+
);
|
|
125
|
+
histogram.loading = !histogram.loading;
|
|
126
|
+
});
|
|
127
|
+
</script>
|
|
128
|
+
|
|
129
|
+
<div class="container">
|
|
130
|
+
<div class="description">data set up with js</div>
|
|
131
|
+
<histogram-date-range id="js-setup"></histogram-date-range>
|
|
132
|
+
</div>
|
|
133
|
+
<script>
|
|
134
|
+
document.addEventListener('DOMContentLoaded', function () {
|
|
135
|
+
const histogram = document.querySelector(
|
|
136
|
+
'histogram-date-range#js-setup'
|
|
137
|
+
);
|
|
138
|
+
histogram.minDate = '1950';
|
|
139
|
+
histogram.maxDate = '2000';
|
|
140
|
+
// generate array of [0, 1, 2, ... 49]
|
|
141
|
+
histogram.bins = [...Array(50).keys()];
|
|
142
|
+
});
|
|
143
|
+
</script>
|
|
144
|
+
|
|
145
|
+
<div class="container">
|
|
146
|
+
<div class="description">
|
|
147
|
+
single bin
|
|
148
|
+
</div>
|
|
149
|
+
<histogram-date-range minDate="1926" maxDate="1926" bins="[8]">
|
|
150
|
+
</histogram-date-range>
|
|
151
|
+
</div>
|
|
152
|
+
|
|
153
|
+
<div class="container">
|
|
154
|
+
<div class="description">empty data</div>
|
|
155
|
+
<histogram-date-range missingDataMessage="no data..."></histoghistogram-date-range>
|
|
156
|
+
</div>
|
|
157
|
+
|
|
158
|
+
</body>
|
|
159
|
+
</html>
|
|
@@ -9,18 +9,18 @@ var __decorate = (decorators, target, key, kind) => {
|
|
|
9
9
|
__defProp(target, key, result);
|
|
10
10
|
return result;
|
|
11
11
|
};
|
|
12
|
+
import "../../_snowpack/pkg/@internetarchive/ia-activity-indicator.js";
|
|
13
|
+
import dayjs from "../../_snowpack/pkg/dayjs/esm.js";
|
|
14
|
+
import customParseFormat from "../../_snowpack/pkg/dayjs/esm/plugin/customParseFormat.js";
|
|
12
15
|
import {
|
|
13
16
|
css,
|
|
14
17
|
html,
|
|
15
|
-
nothing,
|
|
16
18
|
LitElement,
|
|
19
|
+
nothing,
|
|
17
20
|
svg
|
|
18
21
|
} from "../../_snowpack/pkg/lit.js";
|
|
19
|
-
import {property, state
|
|
22
|
+
import {customElement, property, state} from "../../_snowpack/pkg/lit/decorators.js";
|
|
20
23
|
import {live} from "../../_snowpack/pkg/lit/directives/live.js";
|
|
21
|
-
import "../../_snowpack/pkg/@internetarchive/ia-activity-indicator/ia-activity-indicator.js";
|
|
22
|
-
import dayjs from "https://esm.archive.org/dayjs@1.11.10";
|
|
23
|
-
import customParseFormat from "https://esm.archive.org/dayjs@1.9.4/esm/plugin/customParseFormat";
|
|
24
24
|
dayjs.extend(customParseFormat);
|
|
25
25
|
const WIDTH = 180;
|
|
26
26
|
const HEIGHT = 40;
|
package/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { HistogramDateRange } from './src/histogram-date-range';
|
|
1
|
+
export { HistogramDateRange } from './src/histogram-date-range';
|
package/package.json
CHANGED
|
@@ -1,84 +1,85 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@internetarchive/histogram-date-range",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "Internet Archive histogram date range picker",
|
|
5
|
-
"license": "AGPL-3.0-only",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"module": "dist/index.js",
|
|
8
|
-
"types": "dist/index.d.ts",
|
|
9
|
-
"publishConfig": {
|
|
10
|
-
"access": "public"
|
|
11
|
-
},
|
|
12
|
-
"scripts": {
|
|
13
|
-
"start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds\"",
|
|
14
|
-
"build": "snowpack build && touch docs/.nojekyll",
|
|
15
|
-
"prepublish": "tsc",
|
|
16
|
-
"prepare": "npm run build",
|
|
17
|
-
"lint": "eslint --ext .ts,.html . --ignore-path .gitignore && prettier \"**/*.ts\" --check --ignore-path .gitignore",
|
|
18
|
-
"format": "eslint --ext .ts,.html . --fix --ignore-path .gitignore && prettier \"**/*.ts\" --write --ignore-path .gitignore",
|
|
19
|
-
"test": "tsc && wtr --coverage",
|
|
20
|
-
"test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\""
|
|
21
|
-
},
|
|
22
|
-
"dependencies": {
|
|
23
|
-
"@internetarchive/ia-activity-indicator": "^0.0.
|
|
24
|
-
"dayjs": "1.11.
|
|
25
|
-
"lit": "^2.
|
|
26
|
-
},
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"@open-wc/eslint-config": "^7.0.0",
|
|
29
|
-
"@open-wc/testing": "^3.0.3",
|
|
30
|
-
"@
|
|
31
|
-
"@typescript-eslint/
|
|
32
|
-
"@
|
|
33
|
-
"@web/
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"eslint
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
"eslint-config
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"import/
|
|
61
|
-
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@internetarchive/histogram-date-range",
|
|
3
|
+
"version": "1.2.1",
|
|
4
|
+
"description": "Internet Archive histogram date range picker",
|
|
5
|
+
"license": "AGPL-3.0-only",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"module": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds\"",
|
|
14
|
+
"build": "snowpack build && touch docs/.nojekyll",
|
|
15
|
+
"prepublish": "tsc",
|
|
16
|
+
"prepare": "npm run build",
|
|
17
|
+
"lint": "eslint --ext .ts,.html . --ignore-path .gitignore && prettier \"**/*.ts\" --check --ignore-path .gitignore",
|
|
18
|
+
"format": "eslint --ext .ts,.html . --fix --ignore-path .gitignore && prettier \"**/*.ts\" --write --ignore-path .gitignore",
|
|
19
|
+
"test": "tsc && wtr --coverage",
|
|
20
|
+
"test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\""
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@internetarchive/ia-activity-indicator": "^0.0.6",
|
|
24
|
+
"dayjs": "^1.11.13",
|
|
25
|
+
"lit": "^2.8.0"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@open-wc/eslint-config": "^7.0.0",
|
|
29
|
+
"@open-wc/testing": "^3.0.3",
|
|
30
|
+
"@types/mocha": "^10.0.10",
|
|
31
|
+
"@typescript-eslint/eslint-plugin": "^5.10.0",
|
|
32
|
+
"@typescript-eslint/parser": "^5.10.0",
|
|
33
|
+
"@web/dev-server": "^0.1.29",
|
|
34
|
+
"@web/test-runner": "^0.19.0",
|
|
35
|
+
"concurrently": "^7.0.0",
|
|
36
|
+
"eslint": "^8.7.0",
|
|
37
|
+
"eslint-config-prettier": "^8.3.0",
|
|
38
|
+
"husky": "^4.3.8",
|
|
39
|
+
"lint-staged": "^12.2.2",
|
|
40
|
+
"lit-html": "^2.1.1",
|
|
41
|
+
"prettier": "^2.5.1",
|
|
42
|
+
"snowpack": "^3.8.8",
|
|
43
|
+
"tslib": "^2.3.1",
|
|
44
|
+
"typescript": "^4.5"
|
|
45
|
+
},
|
|
46
|
+
"eslintConfig": {
|
|
47
|
+
"parser": "@typescript-eslint/parser",
|
|
48
|
+
"extends": [
|
|
49
|
+
"@open-wc/eslint-config",
|
|
50
|
+
"eslint-config-prettier"
|
|
51
|
+
],
|
|
52
|
+
"plugins": [
|
|
53
|
+
"@typescript-eslint"
|
|
54
|
+
],
|
|
55
|
+
"rules": {
|
|
56
|
+
"no-unused-vars": "off",
|
|
57
|
+
"@typescript-eslint/no-unused-vars": [
|
|
58
|
+
"error"
|
|
59
|
+
],
|
|
60
|
+
"import/no-unresolved": "off",
|
|
61
|
+
"import/extensions": [
|
|
62
|
+
"error",
|
|
63
|
+
"always",
|
|
64
|
+
{
|
|
65
|
+
"ignorePackages": true
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"prettier": {
|
|
71
|
+
"singleQuote": true,
|
|
72
|
+
"arrowParens": "avoid"
|
|
73
|
+
},
|
|
74
|
+
"husky": {
|
|
75
|
+
"hooks": {
|
|
76
|
+
"pre-commit": "lint-staged"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"lint-staged": {
|
|
80
|
+
"*.ts": [
|
|
81
|
+
"eslint --fix",
|
|
82
|
+
"prettier --write"
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
}
|
package/snowpack.config.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
buildOptions: {
|
|
3
|
-
out: 'docs',
|
|
4
|
-
},
|
|
5
|
-
mount: {
|
|
6
|
-
'demo/js': { url: '/dist/demo/js' },
|
|
7
|
-
demo: { url: '/demo' },
|
|
8
|
-
src: { url: '/dist/src' },
|
|
9
|
-
},
|
|
10
|
-
};
|
|
1
|
+
module.exports = {
|
|
2
|
+
buildOptions: {
|
|
3
|
+
out: 'docs',
|
|
4
|
+
},
|
|
5
|
+
mount: {
|
|
6
|
+
'demo/js': { url: '/dist/demo/js' },
|
|
7
|
+
demo: { url: '/demo' },
|
|
8
|
+
src: { url: '/dist/src' },
|
|
9
|
+
},
|
|
10
|
+
};
|