elbe-ui 0.4.24 → 0.4.25
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,6 +1,6 @@
|
|
|
1
1
|
import { Context } from "preact";
|
|
2
2
|
import { BitParams, BitUseInterface } from "..";
|
|
3
3
|
import { _BitCtrlMaker, _BitProvider } from "./_bit_utils";
|
|
4
|
-
export declare function _makeBitProvider<D, P, I>(context: Context<BitUseInterface<D, I>>, bitP: BitParams<D, P, I> & {
|
|
4
|
+
export declare function _makeBitProvider<D, P, I>(context: Context<BitUseInterface<D, P, I>>, bitP: BitParams<D, P, I> & {
|
|
5
5
|
control: _BitCtrlMaker<D, P, I>;
|
|
6
6
|
}): _BitProvider<P>;
|
|
@@ -104,7 +104,7 @@ export function _makeBitProvider(context, bitP) {
|
|
|
104
104
|
map,
|
|
105
105
|
mapUI });
|
|
106
106
|
const userCtrl = bitP.control(Object.assign(Object.assign({}, baseCtrl), { parameters: p, reload: _reload }));
|
|
107
|
-
return Object.assign(Object.assign(Object.assign({}, baseCtrl), userCtrl), { reload: _reload });
|
|
107
|
+
return Object.assign(Object.assign(Object.assign({}, baseCtrl), userCtrl), { reload: _reload, parameters: p });
|
|
108
108
|
}
|
|
109
109
|
const ctrl = useMemo(() => _make(), [state]);
|
|
110
110
|
useEffect(() => ctrl.reload(true), []);
|
package/dist/bit/_bit_utils.d.ts
CHANGED
|
@@ -102,6 +102,6 @@ export type _BitProvider<P> = (p: {
|
|
|
102
102
|
} & P) => JSX.Element;
|
|
103
103
|
export interface _BitInterface<D, P, I> {
|
|
104
104
|
Provider: _BitProvider<P>;
|
|
105
|
-
use: () => BitUseInterface<D, I>;
|
|
105
|
+
use: () => BitUseInterface<D, P, I>;
|
|
106
106
|
}
|
|
107
107
|
export declare function _isFn<T>(f: any): f is (d: T) => any;
|
package/dist/bit/bit.d.ts
CHANGED
|
@@ -8,7 +8,9 @@ export type BitTriMap<T, D> = {
|
|
|
8
8
|
onError?: (e: any) => D;
|
|
9
9
|
onData?: (value: T) => D;
|
|
10
10
|
};
|
|
11
|
-
export type BitUseInterface<D, I> = _BitGetInterface<D> & I
|
|
11
|
+
export type BitUseInterface<D, P, I> = _BitGetInterface<D> & I & {
|
|
12
|
+
parameters: P;
|
|
13
|
+
};
|
|
12
14
|
export type BitParams<D, P, I> = {
|
|
13
15
|
control?: _BitCtrlMaker<D, P, I>;
|
|
14
16
|
debugLabel?: Maybe<string>;
|