@brightspace-ui/labs 1.0.0 → 1.1.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
@@ -46,5 +46,5 @@
46
46
  "@brightspace-ui/core": "^2",
47
47
  "lit": "^2"
48
48
  },
49
- "version": "1.0.0"
49
+ "version": "1.1.0"
50
50
  }
@@ -134,6 +134,7 @@ The compute lifecycle for each `ComputeValue` controller instance will be execut
134
134
  | `host` | LitElement | The host for the controller. | Yes |
135
135
  | `valuesOptions` | Array | The array of objects that each define a computed value. | Yes |
136
136
  | `valuesOptions[i].name` | String | The name of the computed value. Used to assign the internal `ComputedValue` instance to the `ComputedValues` instance. | Yes |
137
+ | `valuesOptions[i].Controller` | Class | The controller instantiated internally for this particular value. By default this uses the `ComputedValue` controller, but it can be overriden with a custom controller. | |
137
138
  | `...valuesOptions[i]` | Object | The rest of the attributes for the object are passed to the internal `ComputedValue` instance constructor. See the `ComputedValue` constructor for details. | Yes |
138
139
 
139
140
  ## `ComputedValues` Instance Members
@@ -2,8 +2,8 @@ import ComputedValue from './computed-value.js';
2
2
 
3
3
  export default class ComputedValues {
4
4
  constructor(host, valuesOptions = []) {
5
- valuesOptions.forEach(({ name, ...options }) => {
6
- this[name] = new ComputedValue(host, options);
5
+ valuesOptions.forEach(({ Controller = ComputedValue, name, ...options }) => {
6
+ this[name] = new Controller(host, options);
7
7
  });
8
8
  }
9
9
  }