@reactables/forms 0.4.0-alpha.3 → 0.4.1-alpha.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.
@@ -1,4 +1,4 @@
1
- import { Reactable } from '@reactables/core';
1
+ import { Reactable, EffectsAndSources } from '@reactables/core';
2
2
  import { ControlChange, AddControl, MarkTouched } from '../Models/Payloads';
3
3
  import { ControlRef } from '../Models';
4
4
  import { FormControlConfig, FormArrayConfig, FormGroupConfig, AbstractControlConfig } from '../Models/Configs';
@@ -18,6 +18,6 @@ export declare const RxForm: {
18
18
  group: (config: FormGroupConfig) => FormGroupConfig;
19
19
  array: (config: FormArrayConfig) => FormArrayConfig;
20
20
  control: <T>(config: FormControlConfig<T> | FbControl<T>) => FormControlConfig<T>;
21
- build: (config: AbstractControlConfig) => Reactable<Form<unknown>, RxFormActions>;
21
+ build: (config: AbstractControlConfig, options?: EffectsAndSources) => Reactable<Form<unknown>, RxFormActions>;
22
22
  };
23
23
  export {};
package/dist/index.js CHANGED
@@ -702,11 +702,9 @@ var control = function (config) {
702
702
  };
703
703
  var array = function (config) { return config; };
704
704
  var group = function (config) { return config; };
705
- var build = function (config) {
705
+ var build = function (config, options) {
706
706
  var initialState = buildFormState(config);
707
- var rxHub1 = core.RxBuilder({
708
- initialState: initialState,
709
- reducers: {
707
+ var rxHub1 = core.RxBuilder(__assign({ initialState: initialState, reducers: {
710
708
  updateValues: updateValues,
711
709
  removeControl: removeControl,
712
710
  addControl: addControl,
@@ -714,8 +712,7 @@ var build = function (config) {
714
712
  markControlAsTouched: markControlAsTouched,
715
713
  markControlAsUntouched: markControlAsUntouched,
716
714
  resetControl: resetControl
717
- }
718
- });
715
+ } }, options));
719
716
  var rxHub2 = core.RxBuilder({
720
717
  sources: [buildHub2Source(rxHub1)],
721
718
  initialState: null,
package/package.json CHANGED
@@ -14,12 +14,12 @@
14
14
  "author": "David Lai",
15
15
  "license": "ISC",
16
16
  "dependencies": {
17
- "@reactables/core": "^0.4.0-alpha.3",
17
+ "@reactables/core": "^0.4.1-alpha.1",
18
18
  "lodash.clonedeep": "^4.5.0",
19
19
  "lodash.isequal": "^4.5.0"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "rxjs": "^6.0.0 || ^7.0.0"
23
23
  },
24
- "version": "0.4.0-alpha.3"
24
+ "version": "0.4.1-alpha.1"
25
25
  }