@uwdata/mosaic-inputs 0.7.1 → 0.8.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uwdata/mosaic-inputs",
3
- "version": "0.7.1",
3
+ "version": "0.8.0",
4
4
  "description": "Mosaic input components.",
5
5
  "keywords": [
6
6
  "inputs",
@@ -20,14 +20,14 @@
20
20
  "scripts": {
21
21
  "prebuild": "rimraf dist && mkdir dist",
22
22
  "build": "node ../../esbuild.js mosaic-inputs",
23
- "lint": "eslint src test --ext .js",
23
+ "lint": "eslint src test",
24
24
  "test": "mocha 'test/**/*-test.js'",
25
25
  "prepublishOnly": "npm run test && npm run lint && npm run build"
26
26
  },
27
27
  "dependencies": {
28
- "@uwdata/mosaic-core": "^0.7.1",
29
- "@uwdata/mosaic-sql": "^0.7.0",
28
+ "@uwdata/mosaic-core": "^0.8.0",
29
+ "@uwdata/mosaic-sql": "^0.8.0",
30
30
  "isoformat": "^0.2.1"
31
31
  },
32
- "gitHead": "7e6f3ea9b3011ea2c9201c1aa16e8e5664621a4c"
32
+ "gitHead": "a24b4c9f7dfa1c38c6af96ec17e075326c1af9b0"
33
33
  }
package/src/Menu.js CHANGED
@@ -9,6 +9,10 @@ const isObject = v => {
9
9
  export const menu = options => input(Menu, options);
10
10
 
11
11
  export class Menu extends MosaicClient {
12
+ /**
13
+ * Create a new Menu instance.
14
+ * @param {object} options Options object
15
+ */
12
16
  constructor({
13
17
  element,
14
18
  filterBy,
package/src/Search.js CHANGED
@@ -10,6 +10,10 @@ let _id = 0;
10
10
  export const search = options => input(Search, options);
11
11
 
12
12
  export class Search extends MosaicClient {
13
+ /**
14
+ * Create a new Search instance.
15
+ * @param {object} options Options object
16
+ */
13
17
  constructor({
14
18
  element,
15
19
  filterBy,
package/src/Slider.js CHANGED
@@ -7,6 +7,10 @@ let _id = 0;
7
7
  export const slider = options => input(Slider, options);
8
8
 
9
9
  export class Slider extends MosaicClient {
10
+ /**
11
+ * Create a new Slider instance.
12
+ * @param {object} options Options object
13
+ */
10
14
  constructor({
11
15
  element,
12
16
  filterBy,
@@ -80,7 +84,7 @@ export class Slider extends MosaicClient {
80
84
  const { min, max } = Array.from(data)[0];
81
85
  if (this.min == null) this.slider.setAttribute('min', min);
82
86
  if (this.max == null) this.slider.setAttribute('max', max);
83
- if (this.step == null) this.slider.setAttribute('step', (max - min) / 500);
87
+ if (this.step == null) this.slider.setAttribute('step', String((max - min) / 500));
84
88
  return this;
85
89
  }
86
90
 
package/src/Table.js CHANGED
@@ -8,6 +8,10 @@ let _id = -1;
8
8
  export const table = options => input(Table, options);
9
9
 
10
10
  export class Table extends MosaicClient {
11
+ /**
12
+ * Create a new Table instance.
13
+ * @param {object} options Options object
14
+ */
11
15
  constructor({
12
16
  element,
13
17
  filterBy,
@@ -42,6 +42,9 @@ export function formatDate(date) {
42
42
 
43
43
  // Memoize the last-returned locale.
44
44
  export function localize(f) {
45
- let key = localize, value;
46
- return (locale = 'en') => locale === key ? value : (value = f(key = locale));
45
+ let key = null;
46
+ let value;
47
+ return (locale = 'en') => locale === key
48
+ ? value
49
+ : (value = f(key = locale));
47
50
  }