@internetarchive/histogram-date-range 1.2.1-alpha.1 → 1.2.2-alpha-webdev7377.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) 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/js/app-root.d.ts +19 -19
  9. package/dist/demo/js/app-root.js +46 -46
  10. package/dist/index.d.ts +1 -1
  11. package/dist/index.js +1 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/src/histogram-date-range.d.ts +166 -159
  14. package/dist/src/histogram-date-range.js +856 -846
  15. package/dist/src/histogram-date-range.js.map +1 -1
  16. package/dist/test/histogram-date-range.test.d.ts +1 -1
  17. package/dist/test/histogram-date-range.test.js +488 -488
  18. package/dist/test/histogram-date-range.test.js.map +1 -1
  19. package/docs/demo/index.css +22 -22
  20. package/docs/demo/index.html +159 -159
  21. package/docs/dist/src/histogram-date-range.js +17 -12
  22. package/index.ts +1 -1
  23. package/package.json +85 -85
  24. package/snowpack.config.js +10 -10
  25. package/src/histogram-date-range.ts +923 -915
  26. package/test/histogram-date-range.test.ts +684 -684
  27. package/tsconfig.json +21 -21
  28. package/web-dev-server.config.mjs +28 -28
  29. package/web-test-runner.config.mjs +29 -29
  30. package/dist/demo/app-root.d.ts +0 -19
  31. package/dist/demo/app-root.js +0 -58
  32. package/dist/demo/app-root.js.map +0 -1
  33. package/dist/docs/_snowpack/pkg/@internetarchive/ia-activity-indicator/ia-activity-indicator.d.ts +0 -1
  34. package/dist/docs/_snowpack/pkg/@internetarchive/ia-activity-indicator/ia-activity-indicator.js +0 -2
  35. package/dist/docs/_snowpack/pkg/@internetarchive/ia-activity-indicator/ia-activity-indicator.js.map +0 -1
package/tsconfig.json CHANGED
@@ -1,21 +1,21 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es2018",
4
- "module": "esnext",
5
- "moduleResolution": "node",
6
- "noEmitOnError": true,
7
- "lib": ["es2017", "dom"],
8
- "strict": true,
9
- "esModuleInterop": false,
10
- "allowSyntheticDefaultImports": true,
11
- "experimentalDecorators": true,
12
- "importHelpers": true,
13
- "outDir": "dist",
14
- "sourceMap": true,
15
- "inlineSources": true,
16
- "rootDir": "./",
17
- "declaration": true
18
- },
19
- "include": ["**/*.ts"],
20
- "exclude": ["node_modules", "dist"]
21
- }
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es2018",
4
+ "module": "esnext",
5
+ "moduleResolution": "node",
6
+ "noEmitOnError": true,
7
+ "lib": ["es2017", "dom"],
8
+ "strict": true,
9
+ "esModuleInterop": false,
10
+ "allowSyntheticDefaultImports": true,
11
+ "experimentalDecorators": true,
12
+ "importHelpers": true,
13
+ "outDir": "dist",
14
+ "sourceMap": true,
15
+ "inlineSources": true,
16
+ "rootDir": "./",
17
+ "declaration": true
18
+ },
19
+ "include": ["**/*.ts"],
20
+ "exclude": ["node_modules", "dist"]
21
+ }
@@ -1,28 +1,28 @@
1
- // import { hmrPlugin, presets } from '@open-wc/dev-server-hmr';
2
-
3
- /** Use Hot Module replacement by adding --hmr to the start command */
4
- const hmr = process.argv.includes('--hmr');
5
-
6
- export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
7
- nodeResolve: true,
8
- open: '/demo/',
9
- watch: !hmr,
10
-
11
- /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
12
- // esbuildTarget: 'auto'
13
-
14
- /** Set appIndex to enable SPA routing */
15
- // appIndex: 'demo/index.html',
16
-
17
- /** Confgure bare import resolve plugin */
18
- // nodeResolve: {
19
- // exportConditions: ['browser', 'development']
20
- // },
21
-
22
- plugins: [
23
- /** Use Hot Module Replacement by uncommenting. Requires @open-wc/dev-server-hmr plugin */
24
- // hmr && hmrPlugin({ exclude: ['**/*/node_modules/**/*'], presets: [presets.litElement] }),
25
- ],
26
-
27
- // See documentation for all available options
28
- });
1
+ // import { hmrPlugin, presets } from '@open-wc/dev-server-hmr';
2
+
3
+ /** Use Hot Module replacement by adding --hmr to the start command */
4
+ const hmr = process.argv.includes('--hmr');
5
+
6
+ export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
7
+ nodeResolve: true,
8
+ open: '/demo/',
9
+ watch: !hmr,
10
+
11
+ /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
12
+ // esbuildTarget: 'auto'
13
+
14
+ /** Set appIndex to enable SPA routing */
15
+ // appIndex: 'demo/index.html',
16
+
17
+ /** Confgure bare import resolve plugin */
18
+ // nodeResolve: {
19
+ // exportConditions: ['browser', 'development']
20
+ // },
21
+
22
+ plugins: [
23
+ /** Use Hot Module Replacement by uncommenting. Requires @open-wc/dev-server-hmr plugin */
24
+ // hmr && hmrPlugin({ exclude: ['**/*/node_modules/**/*'], presets: [presets.litElement] }),
25
+ ],
26
+
27
+ // See documentation for all available options
28
+ });
@@ -1,29 +1,29 @@
1
- // import { playwrightLauncher } from '@web/test-runner-playwright';
2
-
3
- export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
4
- files: 'dist/test/**/*.test.js',
5
- nodeResolve: true,
6
-
7
- /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
8
- // esbuildTarget: 'auto',
9
-
10
- /** Confgure bare import resolve plugin */
11
- // nodeResolve: {
12
- // exportConditions: ['browser', 'development']
13
- // },
14
-
15
- /** Amount of browsers to run concurrently */
16
- // concurrentBrowsers: 2,
17
-
18
- /** Amount of test files per browser to test concurrently */
19
- // concurrency: 1,
20
-
21
- /** Browsers to run tests on */
22
- // browsers: [
23
- // playwrightLauncher({ product: 'chromium' }),
24
- // playwrightLauncher({ product: 'firefox' }),
25
- // playwrightLauncher({ product: 'webkit' }),
26
- // ],
27
-
28
- // See documentation for all available options
29
- });
1
+ // import { playwrightLauncher } from '@web/test-runner-playwright';
2
+
3
+ export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
4
+ files: 'dist/test/**/*.test.js',
5
+ nodeResolve: true,
6
+
7
+ /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
8
+ // esbuildTarget: 'auto',
9
+
10
+ /** Confgure bare import resolve plugin */
11
+ // nodeResolve: {
12
+ // exportConditions: ['browser', 'development']
13
+ // },
14
+
15
+ /** Amount of browsers to run concurrently */
16
+ // concurrentBrowsers: 2,
17
+
18
+ /** Amount of test files per browser to test concurrently */
19
+ // concurrency: 1,
20
+
21
+ /** Browsers to run tests on */
22
+ // browsers: [
23
+ // playwrightLauncher({ product: 'chromium' }),
24
+ // playwrightLauncher({ product: 'firefox' }),
25
+ // playwrightLauncher({ product: 'webkit' }),
26
+ // ],
27
+
28
+ // See documentation for all available options
29
+ });
@@ -1,19 +0,0 @@
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,58 +0,0 @@
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
- return html `
25
- <histogram-date-range
26
- .minDate=${(_a = this.dataSource) === null || _a === void 0 ? void 0 : _a.minDate}
27
- .maxDate=${(_b = this.dataSource) === null || _b === void 0 ? void 0 : _b.maxDate}
28
- .minSelectedDate=${(_c = this.dataSource) === null || _c === void 0 ? void 0 : _c.minSelectedDate}
29
- .maxSelectedDate=${(_d = this.dataSource) === null || _d === void 0 ? void 0 : _d.maxSelectedDate}
30
- .updateDelay=${1000}
31
- .bins=${(_e = this.dataSource) === null || _e === void 0 ? void 0 : _e.bins}
32
- ></histogram-date-range>
33
-
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 };
58
- //# sourceMappingURL=app-root.js.map
@@ -1 +0,0 @@
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,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,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,2 +0,0 @@
1
- import './index';
2
- //# sourceMappingURL=ia-activity-indicator.js.map
@@ -1 +0,0 @@
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"]}