@compilot/react-sdk 2.2.6-dev → 2.2.7-dev
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.
|
@@ -121,23 +121,51 @@ function _slicedToArray(r, e) {
|
|
|
121
121
|
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
+
function _typeof(o) {
|
|
125
|
+
"@babel/helpers - typeof";
|
|
126
|
+
|
|
127
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
128
|
+
return typeof o;
|
|
129
|
+
} : function (o) {
|
|
130
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
131
|
+
}, _typeof(o);
|
|
132
|
+
}
|
|
133
|
+
|
|
124
134
|
var toStateKey = function toStateKey(key) {
|
|
125
135
|
return key.join(":");
|
|
126
136
|
};
|
|
127
137
|
var GlobalStateContext = /*#__PURE__*/react.createContext({
|
|
128
|
-
|
|
129
|
-
|
|
138
|
+
set: function set(_state) {
|
|
139
|
+
return _state;
|
|
140
|
+
},
|
|
130
141
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
131
142
|
get: function get() {}
|
|
132
143
|
});
|
|
144
|
+
var compareState = function compareState(a, b) {
|
|
145
|
+
if (a === b) {
|
|
146
|
+
return 0;
|
|
147
|
+
}
|
|
148
|
+
if (_typeof(a) === "object" && _typeof(b) === "object") {
|
|
149
|
+
return JSON.stringify(a) === JSON.stringify(b) ? 0 : -1;
|
|
150
|
+
}
|
|
151
|
+
return -1;
|
|
152
|
+
};
|
|
133
153
|
var GlobalStateProvider = function GlobalStateProvider(_ref) {
|
|
134
154
|
var children = _ref.children;
|
|
135
155
|
var _useState = react.useState({}),
|
|
136
156
|
_useState2 = _slicedToArray(_useState, 2),
|
|
137
157
|
state = _useState2[0],
|
|
138
158
|
setState = _useState2[1];
|
|
139
|
-
var set = react.useCallback(function (key,
|
|
140
|
-
|
|
159
|
+
var set = react.useCallback(function (key, setterFn) {
|
|
160
|
+
setState(function (state) {
|
|
161
|
+
var stateKey = toStateKey(key);
|
|
162
|
+
var keyValue = state[stateKey];
|
|
163
|
+
var newValue = setterFn(state[stateKey]);
|
|
164
|
+
if (compareState(keyValue, newValue) !== 0) {
|
|
165
|
+
return _objectSpread2(_objectSpread2({}, state), {}, _defineProperty({}, stateKey, newValue));
|
|
166
|
+
}
|
|
167
|
+
return state;
|
|
168
|
+
});
|
|
141
169
|
}, [state, setState]);
|
|
142
170
|
var get = react.useCallback(function (key) {
|
|
143
171
|
return state[toStateKey(key)];
|
|
@@ -155,11 +183,7 @@ var GlobalStateProvider = function GlobalStateProvider(_ref) {
|
|
|
155
183
|
};
|
|
156
184
|
function useGlobalState(_ref2) {
|
|
157
185
|
var key = _ref2.key,
|
|
158
|
-
defaultValue = _ref2.defaultValue
|
|
159
|
-
_ref2$compareState = _ref2.compareState,
|
|
160
|
-
compareState = _ref2$compareState === void 0 ? function (a, b) {
|
|
161
|
-
return a === b ? 0 : 1;
|
|
162
|
-
} : _ref2$compareState;
|
|
186
|
+
defaultValue = _ref2.defaultValue;
|
|
163
187
|
var _useContext = react.useContext(GlobalStateContext),
|
|
164
188
|
set = _useContext.set,
|
|
165
189
|
get = _useContext.get;
|
|
@@ -170,17 +194,10 @@ function useGlobalState(_ref2) {
|
|
|
170
194
|
var _ref3;
|
|
171
195
|
return (_ref3 = get(key)) !== null && _ref3 !== void 0 ? _ref3 : memoizedDefaultValue;
|
|
172
196
|
}, [key, get, memoizedDefaultValue]);
|
|
173
|
-
var setter = react.useCallback(function (
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
newValue = setterFn(keyValue);
|
|
178
|
-
} else {
|
|
179
|
-
newValue = valueOrSetterFn;
|
|
180
|
-
}
|
|
181
|
-
if (compareState(keyValue, newValue) !== 0) {
|
|
182
|
-
set(key, newValue);
|
|
183
|
-
}
|
|
197
|
+
var setter = react.useCallback(function (setterFn) {
|
|
198
|
+
set(key, function (maybeState) {
|
|
199
|
+
return setterFn(maybeState !== null && maybeState !== void 0 ? maybeState : defaultValue);
|
|
200
|
+
});
|
|
184
201
|
}, [key, set, get]);
|
|
185
202
|
return react.useMemo(function () {
|
|
186
203
|
return [keyValue, setter];
|
|
@@ -623,7 +640,7 @@ var useAsyncMutationState = function useAsyncMutationState(_ref) {
|
|
|
623
640
|
}
|
|
624
641
|
}),
|
|
625
642
|
_useGlobalState2 = _slicedToArray(_useGlobalState, 2),
|
|
626
|
-
|
|
643
|
+
globalState = _useGlobalState2[0],
|
|
627
644
|
setState = _useGlobalState2[1];
|
|
628
645
|
var mutateAsync = react.useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
629
646
|
var result,
|
|
@@ -631,26 +648,30 @@ var useAsyncMutationState = function useAsyncMutationState(_ref) {
|
|
|
631
648
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
632
649
|
while (1) switch (_context.prev = _context.next) {
|
|
633
650
|
case 0:
|
|
634
|
-
setState({
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
651
|
+
setState(function (state) {
|
|
652
|
+
return {
|
|
653
|
+
data: state.data,
|
|
654
|
+
isIdle: false,
|
|
655
|
+
isPending: true,
|
|
656
|
+
isError: false,
|
|
657
|
+
isSuccess: false,
|
|
658
|
+
error: null
|
|
659
|
+
};
|
|
641
660
|
});
|
|
642
661
|
_context.prev = 1;
|
|
643
662
|
_context.next = 4;
|
|
644
663
|
return mutationFn.apply(void 0, _args);
|
|
645
664
|
case 4:
|
|
646
665
|
result = _context.sent;
|
|
647
|
-
setState({
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
666
|
+
setState(function (_state) {
|
|
667
|
+
return {
|
|
668
|
+
data: result,
|
|
669
|
+
isIdle: false,
|
|
670
|
+
isPending: false,
|
|
671
|
+
isError: false,
|
|
672
|
+
isSuccess: true,
|
|
673
|
+
error: null
|
|
674
|
+
};
|
|
654
675
|
});
|
|
655
676
|
|
|
656
677
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
@@ -658,13 +679,15 @@ var useAsyncMutationState = function useAsyncMutationState(_ref) {
|
|
|
658
679
|
case 9:
|
|
659
680
|
_context.prev = 9;
|
|
660
681
|
_context.t0 = _context["catch"](1);
|
|
661
|
-
setState({
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
682
|
+
setState(function (state) {
|
|
683
|
+
return {
|
|
684
|
+
data: state.data,
|
|
685
|
+
isIdle: false,
|
|
686
|
+
isPending: false,
|
|
687
|
+
isError: true,
|
|
688
|
+
isSuccess: false,
|
|
689
|
+
error: _context.t0 instanceof Error ? _context.t0 : new Error(String(_context.t0))
|
|
690
|
+
};
|
|
668
691
|
});
|
|
669
692
|
case 12:
|
|
670
693
|
case "end":
|
|
@@ -673,38 +696,42 @@ var useAsyncMutationState = function useAsyncMutationState(_ref) {
|
|
|
673
696
|
}, _callee, null, [[1, 9]]);
|
|
674
697
|
})), [setState, mutationFn]);
|
|
675
698
|
var setData = react.useCallback(function (data) {
|
|
676
|
-
setState({
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
699
|
+
setState(function (_state) {
|
|
700
|
+
return {
|
|
701
|
+
data: data,
|
|
702
|
+
isIdle: false,
|
|
703
|
+
isPending: false,
|
|
704
|
+
isError: false,
|
|
705
|
+
isSuccess: true,
|
|
706
|
+
error: null
|
|
707
|
+
};
|
|
683
708
|
});
|
|
684
709
|
}, [setState]);
|
|
685
710
|
var startPending = react.useCallback(function () {
|
|
686
|
-
if (
|
|
711
|
+
if (globalState.isPending) {
|
|
687
712
|
return;
|
|
688
713
|
}
|
|
689
|
-
setState({
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
714
|
+
setState(function (_state) {
|
|
715
|
+
return {
|
|
716
|
+
data: undefined,
|
|
717
|
+
isIdle: false,
|
|
718
|
+
isPending: true,
|
|
719
|
+
isError: false,
|
|
720
|
+
isSuccess: false,
|
|
721
|
+
error: null
|
|
722
|
+
};
|
|
696
723
|
});
|
|
697
|
-
}, [setState,
|
|
724
|
+
}, [setState, globalState.isPending]);
|
|
698
725
|
var stopPending = react.useCallback(function () {
|
|
699
|
-
if (!
|
|
726
|
+
if (!globalState.isPending) {
|
|
700
727
|
return;
|
|
701
728
|
}
|
|
702
|
-
setState(function (
|
|
703
|
-
return _objectSpread2(_objectSpread2({},
|
|
729
|
+
setState(function (state) {
|
|
730
|
+
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
704
731
|
isPending: false
|
|
705
732
|
});
|
|
706
733
|
});
|
|
707
|
-
}, [setState,
|
|
734
|
+
}, [setState, globalState.isPending]);
|
|
708
735
|
var setPending = react.useCallback(function (isPending) {
|
|
709
736
|
if (isPending) {
|
|
710
737
|
startPending();
|
|
@@ -712,7 +739,7 @@ var useAsyncMutationState = function useAsyncMutationState(_ref) {
|
|
|
712
739
|
stopPending();
|
|
713
740
|
}
|
|
714
741
|
}, [startPending, stopPending]);
|
|
715
|
-
return _objectSpread2(_objectSpread2({},
|
|
742
|
+
return _objectSpread2(_objectSpread2({}, globalState), {}, _defineProperty(_defineProperty(_defineProperty({}, mutationName, mutateAsync), "setData", setData), "setPending", setPending));
|
|
716
743
|
};
|
|
717
744
|
|
|
718
745
|
/**
|
|
@@ -987,33 +1014,39 @@ var useAsyncQueryState = function useAsyncQueryState(_ref) {
|
|
|
987
1014
|
state = _useGlobalState2[0],
|
|
988
1015
|
setState = _useGlobalState2[1];
|
|
989
1016
|
var setResult = react.useCallback(function (result) {
|
|
990
|
-
setState({
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
1017
|
+
setState(function (_state) {
|
|
1018
|
+
return {
|
|
1019
|
+
isLoading: false,
|
|
1020
|
+
isError: false,
|
|
1021
|
+
isSuccess: true,
|
|
1022
|
+
error: null,
|
|
1023
|
+
data: result
|
|
1024
|
+
};
|
|
996
1025
|
});
|
|
997
1026
|
}, [setState]);
|
|
998
1027
|
var setError = react.useCallback(function (error) {
|
|
999
|
-
setState({
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1028
|
+
setState(function (_state) {
|
|
1029
|
+
return {
|
|
1030
|
+
isLoading: false,
|
|
1031
|
+
isError: true,
|
|
1032
|
+
isSuccess: false,
|
|
1033
|
+
error: error,
|
|
1034
|
+
data: undefined
|
|
1035
|
+
};
|
|
1005
1036
|
});
|
|
1006
1037
|
}, [setState]);
|
|
1007
1038
|
var startLoading = react.useCallback(function () {
|
|
1008
1039
|
if (state.isLoading) {
|
|
1009
1040
|
return;
|
|
1010
1041
|
}
|
|
1011
|
-
setState({
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1042
|
+
setState(function (_state) {
|
|
1043
|
+
return {
|
|
1044
|
+
isLoading: true,
|
|
1045
|
+
isError: false,
|
|
1046
|
+
isSuccess: false,
|
|
1047
|
+
error: null,
|
|
1048
|
+
data: undefined
|
|
1049
|
+
};
|
|
1017
1050
|
});
|
|
1018
1051
|
}, [setState]);
|
|
1019
1052
|
var stopLoading = react.useCallback(function () {
|
|
@@ -121,23 +121,51 @@ function _slicedToArray(r, e) {
|
|
|
121
121
|
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
+
function _typeof(o) {
|
|
125
|
+
"@babel/helpers - typeof";
|
|
126
|
+
|
|
127
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
128
|
+
return typeof o;
|
|
129
|
+
} : function (o) {
|
|
130
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
131
|
+
}, _typeof(o);
|
|
132
|
+
}
|
|
133
|
+
|
|
124
134
|
var toStateKey = function toStateKey(key) {
|
|
125
135
|
return key.join(":");
|
|
126
136
|
};
|
|
127
137
|
var GlobalStateContext = /*#__PURE__*/react.createContext({
|
|
128
|
-
|
|
129
|
-
|
|
138
|
+
set: function set(_state) {
|
|
139
|
+
return _state;
|
|
140
|
+
},
|
|
130
141
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
131
142
|
get: function get() {}
|
|
132
143
|
});
|
|
144
|
+
var compareState = function compareState(a, b) {
|
|
145
|
+
if (a === b) {
|
|
146
|
+
return 0;
|
|
147
|
+
}
|
|
148
|
+
if (_typeof(a) === "object" && _typeof(b) === "object") {
|
|
149
|
+
return JSON.stringify(a) === JSON.stringify(b) ? 0 : -1;
|
|
150
|
+
}
|
|
151
|
+
return -1;
|
|
152
|
+
};
|
|
133
153
|
var GlobalStateProvider = function GlobalStateProvider(_ref) {
|
|
134
154
|
var children = _ref.children;
|
|
135
155
|
var _useState = react.useState({}),
|
|
136
156
|
_useState2 = _slicedToArray(_useState, 2),
|
|
137
157
|
state = _useState2[0],
|
|
138
158
|
setState = _useState2[1];
|
|
139
|
-
var set = react.useCallback(function (key,
|
|
140
|
-
|
|
159
|
+
var set = react.useCallback(function (key, setterFn) {
|
|
160
|
+
setState(function (state) {
|
|
161
|
+
var stateKey = toStateKey(key);
|
|
162
|
+
var keyValue = state[stateKey];
|
|
163
|
+
var newValue = setterFn(state[stateKey]);
|
|
164
|
+
if (compareState(keyValue, newValue) !== 0) {
|
|
165
|
+
return _objectSpread2(_objectSpread2({}, state), {}, _defineProperty({}, stateKey, newValue));
|
|
166
|
+
}
|
|
167
|
+
return state;
|
|
168
|
+
});
|
|
141
169
|
}, [state, setState]);
|
|
142
170
|
var get = react.useCallback(function (key) {
|
|
143
171
|
return state[toStateKey(key)];
|
|
@@ -155,11 +183,7 @@ var GlobalStateProvider = function GlobalStateProvider(_ref) {
|
|
|
155
183
|
};
|
|
156
184
|
function useGlobalState(_ref2) {
|
|
157
185
|
var key = _ref2.key,
|
|
158
|
-
defaultValue = _ref2.defaultValue
|
|
159
|
-
_ref2$compareState = _ref2.compareState,
|
|
160
|
-
compareState = _ref2$compareState === void 0 ? function (a, b) {
|
|
161
|
-
return a === b ? 0 : 1;
|
|
162
|
-
} : _ref2$compareState;
|
|
186
|
+
defaultValue = _ref2.defaultValue;
|
|
163
187
|
var _useContext = react.useContext(GlobalStateContext),
|
|
164
188
|
set = _useContext.set,
|
|
165
189
|
get = _useContext.get;
|
|
@@ -170,17 +194,10 @@ function useGlobalState(_ref2) {
|
|
|
170
194
|
var _ref3;
|
|
171
195
|
return (_ref3 = get(key)) !== null && _ref3 !== void 0 ? _ref3 : memoizedDefaultValue;
|
|
172
196
|
}, [key, get, memoizedDefaultValue]);
|
|
173
|
-
var setter = react.useCallback(function (
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
newValue = setterFn(keyValue);
|
|
178
|
-
} else {
|
|
179
|
-
newValue = valueOrSetterFn;
|
|
180
|
-
}
|
|
181
|
-
if (compareState(keyValue, newValue) !== 0) {
|
|
182
|
-
set(key, newValue);
|
|
183
|
-
}
|
|
197
|
+
var setter = react.useCallback(function (setterFn) {
|
|
198
|
+
set(key, function (maybeState) {
|
|
199
|
+
return setterFn(maybeState !== null && maybeState !== void 0 ? maybeState : defaultValue);
|
|
200
|
+
});
|
|
184
201
|
}, [key, set, get]);
|
|
185
202
|
return react.useMemo(function () {
|
|
186
203
|
return [keyValue, setter];
|
|
@@ -623,7 +640,7 @@ var useAsyncMutationState = function useAsyncMutationState(_ref) {
|
|
|
623
640
|
}
|
|
624
641
|
}),
|
|
625
642
|
_useGlobalState2 = _slicedToArray(_useGlobalState, 2),
|
|
626
|
-
|
|
643
|
+
globalState = _useGlobalState2[0],
|
|
627
644
|
setState = _useGlobalState2[1];
|
|
628
645
|
var mutateAsync = react.useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
629
646
|
var result,
|
|
@@ -631,26 +648,30 @@ var useAsyncMutationState = function useAsyncMutationState(_ref) {
|
|
|
631
648
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
632
649
|
while (1) switch (_context.prev = _context.next) {
|
|
633
650
|
case 0:
|
|
634
|
-
setState({
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
651
|
+
setState(function (state) {
|
|
652
|
+
return {
|
|
653
|
+
data: state.data,
|
|
654
|
+
isIdle: false,
|
|
655
|
+
isPending: true,
|
|
656
|
+
isError: false,
|
|
657
|
+
isSuccess: false,
|
|
658
|
+
error: null
|
|
659
|
+
};
|
|
641
660
|
});
|
|
642
661
|
_context.prev = 1;
|
|
643
662
|
_context.next = 4;
|
|
644
663
|
return mutationFn.apply(void 0, _args);
|
|
645
664
|
case 4:
|
|
646
665
|
result = _context.sent;
|
|
647
|
-
setState({
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
666
|
+
setState(function (_state) {
|
|
667
|
+
return {
|
|
668
|
+
data: result,
|
|
669
|
+
isIdle: false,
|
|
670
|
+
isPending: false,
|
|
671
|
+
isError: false,
|
|
672
|
+
isSuccess: true,
|
|
673
|
+
error: null
|
|
674
|
+
};
|
|
654
675
|
});
|
|
655
676
|
|
|
656
677
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
@@ -658,13 +679,15 @@ var useAsyncMutationState = function useAsyncMutationState(_ref) {
|
|
|
658
679
|
case 9:
|
|
659
680
|
_context.prev = 9;
|
|
660
681
|
_context.t0 = _context["catch"](1);
|
|
661
|
-
setState({
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
682
|
+
setState(function (state) {
|
|
683
|
+
return {
|
|
684
|
+
data: state.data,
|
|
685
|
+
isIdle: false,
|
|
686
|
+
isPending: false,
|
|
687
|
+
isError: true,
|
|
688
|
+
isSuccess: false,
|
|
689
|
+
error: _context.t0 instanceof Error ? _context.t0 : new Error(String(_context.t0))
|
|
690
|
+
};
|
|
668
691
|
});
|
|
669
692
|
case 12:
|
|
670
693
|
case "end":
|
|
@@ -673,38 +696,42 @@ var useAsyncMutationState = function useAsyncMutationState(_ref) {
|
|
|
673
696
|
}, _callee, null, [[1, 9]]);
|
|
674
697
|
})), [setState, mutationFn]);
|
|
675
698
|
var setData = react.useCallback(function (data) {
|
|
676
|
-
setState({
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
699
|
+
setState(function (_state) {
|
|
700
|
+
return {
|
|
701
|
+
data: data,
|
|
702
|
+
isIdle: false,
|
|
703
|
+
isPending: false,
|
|
704
|
+
isError: false,
|
|
705
|
+
isSuccess: true,
|
|
706
|
+
error: null
|
|
707
|
+
};
|
|
683
708
|
});
|
|
684
709
|
}, [setState]);
|
|
685
710
|
var startPending = react.useCallback(function () {
|
|
686
|
-
if (
|
|
711
|
+
if (globalState.isPending) {
|
|
687
712
|
return;
|
|
688
713
|
}
|
|
689
|
-
setState({
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
714
|
+
setState(function (_state) {
|
|
715
|
+
return {
|
|
716
|
+
data: undefined,
|
|
717
|
+
isIdle: false,
|
|
718
|
+
isPending: true,
|
|
719
|
+
isError: false,
|
|
720
|
+
isSuccess: false,
|
|
721
|
+
error: null
|
|
722
|
+
};
|
|
696
723
|
});
|
|
697
|
-
}, [setState,
|
|
724
|
+
}, [setState, globalState.isPending]);
|
|
698
725
|
var stopPending = react.useCallback(function () {
|
|
699
|
-
if (!
|
|
726
|
+
if (!globalState.isPending) {
|
|
700
727
|
return;
|
|
701
728
|
}
|
|
702
|
-
setState(function (
|
|
703
|
-
return _objectSpread2(_objectSpread2({},
|
|
729
|
+
setState(function (state) {
|
|
730
|
+
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
704
731
|
isPending: false
|
|
705
732
|
});
|
|
706
733
|
});
|
|
707
|
-
}, [setState,
|
|
734
|
+
}, [setState, globalState.isPending]);
|
|
708
735
|
var setPending = react.useCallback(function (isPending) {
|
|
709
736
|
if (isPending) {
|
|
710
737
|
startPending();
|
|
@@ -712,7 +739,7 @@ var useAsyncMutationState = function useAsyncMutationState(_ref) {
|
|
|
712
739
|
stopPending();
|
|
713
740
|
}
|
|
714
741
|
}, [startPending, stopPending]);
|
|
715
|
-
return _objectSpread2(_objectSpread2({},
|
|
742
|
+
return _objectSpread2(_objectSpread2({}, globalState), {}, _defineProperty(_defineProperty(_defineProperty({}, mutationName, mutateAsync), "setData", setData), "setPending", setPending));
|
|
716
743
|
};
|
|
717
744
|
|
|
718
745
|
/**
|
|
@@ -987,33 +1014,39 @@ var useAsyncQueryState = function useAsyncQueryState(_ref) {
|
|
|
987
1014
|
state = _useGlobalState2[0],
|
|
988
1015
|
setState = _useGlobalState2[1];
|
|
989
1016
|
var setResult = react.useCallback(function (result) {
|
|
990
|
-
setState({
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
1017
|
+
setState(function (_state) {
|
|
1018
|
+
return {
|
|
1019
|
+
isLoading: false,
|
|
1020
|
+
isError: false,
|
|
1021
|
+
isSuccess: true,
|
|
1022
|
+
error: null,
|
|
1023
|
+
data: result
|
|
1024
|
+
};
|
|
996
1025
|
});
|
|
997
1026
|
}, [setState]);
|
|
998
1027
|
var setError = react.useCallback(function (error) {
|
|
999
|
-
setState({
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1028
|
+
setState(function (_state) {
|
|
1029
|
+
return {
|
|
1030
|
+
isLoading: false,
|
|
1031
|
+
isError: true,
|
|
1032
|
+
isSuccess: false,
|
|
1033
|
+
error: error,
|
|
1034
|
+
data: undefined
|
|
1035
|
+
};
|
|
1005
1036
|
});
|
|
1006
1037
|
}, [setState]);
|
|
1007
1038
|
var startLoading = react.useCallback(function () {
|
|
1008
1039
|
if (state.isLoading) {
|
|
1009
1040
|
return;
|
|
1010
1041
|
}
|
|
1011
|
-
setState({
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1042
|
+
setState(function (_state) {
|
|
1043
|
+
return {
|
|
1044
|
+
isLoading: true,
|
|
1045
|
+
isError: false,
|
|
1046
|
+
isSuccess: false,
|
|
1047
|
+
error: null,
|
|
1048
|
+
data: undefined
|
|
1049
|
+
};
|
|
1017
1050
|
});
|
|
1018
1051
|
}, [setState]);
|
|
1019
1052
|
var stopLoading = react.useCallback(function () {
|
|
@@ -118,23 +118,51 @@ function _slicedToArray(r, e) {
|
|
|
118
118
|
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
+
function _typeof(o) {
|
|
122
|
+
"@babel/helpers - typeof";
|
|
123
|
+
|
|
124
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
125
|
+
return typeof o;
|
|
126
|
+
} : function (o) {
|
|
127
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
128
|
+
}, _typeof(o);
|
|
129
|
+
}
|
|
130
|
+
|
|
121
131
|
var toStateKey = function toStateKey(key) {
|
|
122
132
|
return key.join(":");
|
|
123
133
|
};
|
|
124
134
|
var GlobalStateContext = /*#__PURE__*/createContext({
|
|
125
|
-
|
|
126
|
-
|
|
135
|
+
set: function set(_state) {
|
|
136
|
+
return _state;
|
|
137
|
+
},
|
|
127
138
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
128
139
|
get: function get() {}
|
|
129
140
|
});
|
|
141
|
+
var compareState = function compareState(a, b) {
|
|
142
|
+
if (a === b) {
|
|
143
|
+
return 0;
|
|
144
|
+
}
|
|
145
|
+
if (_typeof(a) === "object" && _typeof(b) === "object") {
|
|
146
|
+
return JSON.stringify(a) === JSON.stringify(b) ? 0 : -1;
|
|
147
|
+
}
|
|
148
|
+
return -1;
|
|
149
|
+
};
|
|
130
150
|
var GlobalStateProvider = function GlobalStateProvider(_ref) {
|
|
131
151
|
var children = _ref.children;
|
|
132
152
|
var _useState = useState({}),
|
|
133
153
|
_useState2 = _slicedToArray(_useState, 2),
|
|
134
154
|
state = _useState2[0],
|
|
135
155
|
setState = _useState2[1];
|
|
136
|
-
var set = useCallback(function (key,
|
|
137
|
-
|
|
156
|
+
var set = useCallback(function (key, setterFn) {
|
|
157
|
+
setState(function (state) {
|
|
158
|
+
var stateKey = toStateKey(key);
|
|
159
|
+
var keyValue = state[stateKey];
|
|
160
|
+
var newValue = setterFn(state[stateKey]);
|
|
161
|
+
if (compareState(keyValue, newValue) !== 0) {
|
|
162
|
+
return _objectSpread2(_objectSpread2({}, state), {}, _defineProperty({}, stateKey, newValue));
|
|
163
|
+
}
|
|
164
|
+
return state;
|
|
165
|
+
});
|
|
138
166
|
}, [state, setState]);
|
|
139
167
|
var get = useCallback(function (key) {
|
|
140
168
|
return state[toStateKey(key)];
|
|
@@ -152,11 +180,7 @@ var GlobalStateProvider = function GlobalStateProvider(_ref) {
|
|
|
152
180
|
};
|
|
153
181
|
function useGlobalState(_ref2) {
|
|
154
182
|
var key = _ref2.key,
|
|
155
|
-
defaultValue = _ref2.defaultValue
|
|
156
|
-
_ref2$compareState = _ref2.compareState,
|
|
157
|
-
compareState = _ref2$compareState === void 0 ? function (a, b) {
|
|
158
|
-
return a === b ? 0 : 1;
|
|
159
|
-
} : _ref2$compareState;
|
|
183
|
+
defaultValue = _ref2.defaultValue;
|
|
160
184
|
var _useContext = useContext(GlobalStateContext),
|
|
161
185
|
set = _useContext.set,
|
|
162
186
|
get = _useContext.get;
|
|
@@ -167,17 +191,10 @@ function useGlobalState(_ref2) {
|
|
|
167
191
|
var _ref3;
|
|
168
192
|
return (_ref3 = get(key)) !== null && _ref3 !== void 0 ? _ref3 : memoizedDefaultValue;
|
|
169
193
|
}, [key, get, memoizedDefaultValue]);
|
|
170
|
-
var setter = useCallback(function (
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
newValue = setterFn(keyValue);
|
|
175
|
-
} else {
|
|
176
|
-
newValue = valueOrSetterFn;
|
|
177
|
-
}
|
|
178
|
-
if (compareState(keyValue, newValue) !== 0) {
|
|
179
|
-
set(key, newValue);
|
|
180
|
-
}
|
|
194
|
+
var setter = useCallback(function (setterFn) {
|
|
195
|
+
set(key, function (maybeState) {
|
|
196
|
+
return setterFn(maybeState !== null && maybeState !== void 0 ? maybeState : defaultValue);
|
|
197
|
+
});
|
|
181
198
|
}, [key, set, get]);
|
|
182
199
|
return useMemo(function () {
|
|
183
200
|
return [keyValue, setter];
|
|
@@ -620,7 +637,7 @@ var useAsyncMutationState = function useAsyncMutationState(_ref) {
|
|
|
620
637
|
}
|
|
621
638
|
}),
|
|
622
639
|
_useGlobalState2 = _slicedToArray(_useGlobalState, 2),
|
|
623
|
-
|
|
640
|
+
globalState = _useGlobalState2[0],
|
|
624
641
|
setState = _useGlobalState2[1];
|
|
625
642
|
var mutateAsync = useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
626
643
|
var result,
|
|
@@ -628,26 +645,30 @@ var useAsyncMutationState = function useAsyncMutationState(_ref) {
|
|
|
628
645
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
629
646
|
while (1) switch (_context.prev = _context.next) {
|
|
630
647
|
case 0:
|
|
631
|
-
setState({
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
648
|
+
setState(function (state) {
|
|
649
|
+
return {
|
|
650
|
+
data: state.data,
|
|
651
|
+
isIdle: false,
|
|
652
|
+
isPending: true,
|
|
653
|
+
isError: false,
|
|
654
|
+
isSuccess: false,
|
|
655
|
+
error: null
|
|
656
|
+
};
|
|
638
657
|
});
|
|
639
658
|
_context.prev = 1;
|
|
640
659
|
_context.next = 4;
|
|
641
660
|
return mutationFn.apply(void 0, _args);
|
|
642
661
|
case 4:
|
|
643
662
|
result = _context.sent;
|
|
644
|
-
setState({
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
663
|
+
setState(function (_state) {
|
|
664
|
+
return {
|
|
665
|
+
data: result,
|
|
666
|
+
isIdle: false,
|
|
667
|
+
isPending: false,
|
|
668
|
+
isError: false,
|
|
669
|
+
isSuccess: true,
|
|
670
|
+
error: null
|
|
671
|
+
};
|
|
651
672
|
});
|
|
652
673
|
|
|
653
674
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
@@ -655,13 +676,15 @@ var useAsyncMutationState = function useAsyncMutationState(_ref) {
|
|
|
655
676
|
case 9:
|
|
656
677
|
_context.prev = 9;
|
|
657
678
|
_context.t0 = _context["catch"](1);
|
|
658
|
-
setState({
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
679
|
+
setState(function (state) {
|
|
680
|
+
return {
|
|
681
|
+
data: state.data,
|
|
682
|
+
isIdle: false,
|
|
683
|
+
isPending: false,
|
|
684
|
+
isError: true,
|
|
685
|
+
isSuccess: false,
|
|
686
|
+
error: _context.t0 instanceof Error ? _context.t0 : new Error(String(_context.t0))
|
|
687
|
+
};
|
|
665
688
|
});
|
|
666
689
|
case 12:
|
|
667
690
|
case "end":
|
|
@@ -670,38 +693,42 @@ var useAsyncMutationState = function useAsyncMutationState(_ref) {
|
|
|
670
693
|
}, _callee, null, [[1, 9]]);
|
|
671
694
|
})), [setState, mutationFn]);
|
|
672
695
|
var setData = useCallback(function (data) {
|
|
673
|
-
setState({
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
696
|
+
setState(function (_state) {
|
|
697
|
+
return {
|
|
698
|
+
data: data,
|
|
699
|
+
isIdle: false,
|
|
700
|
+
isPending: false,
|
|
701
|
+
isError: false,
|
|
702
|
+
isSuccess: true,
|
|
703
|
+
error: null
|
|
704
|
+
};
|
|
680
705
|
});
|
|
681
706
|
}, [setState]);
|
|
682
707
|
var startPending = useCallback(function () {
|
|
683
|
-
if (
|
|
708
|
+
if (globalState.isPending) {
|
|
684
709
|
return;
|
|
685
710
|
}
|
|
686
|
-
setState({
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
711
|
+
setState(function (_state) {
|
|
712
|
+
return {
|
|
713
|
+
data: undefined,
|
|
714
|
+
isIdle: false,
|
|
715
|
+
isPending: true,
|
|
716
|
+
isError: false,
|
|
717
|
+
isSuccess: false,
|
|
718
|
+
error: null
|
|
719
|
+
};
|
|
693
720
|
});
|
|
694
|
-
}, [setState,
|
|
721
|
+
}, [setState, globalState.isPending]);
|
|
695
722
|
var stopPending = useCallback(function () {
|
|
696
|
-
if (!
|
|
723
|
+
if (!globalState.isPending) {
|
|
697
724
|
return;
|
|
698
725
|
}
|
|
699
|
-
setState(function (
|
|
700
|
-
return _objectSpread2(_objectSpread2({},
|
|
726
|
+
setState(function (state) {
|
|
727
|
+
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
701
728
|
isPending: false
|
|
702
729
|
});
|
|
703
730
|
});
|
|
704
|
-
}, [setState,
|
|
731
|
+
}, [setState, globalState.isPending]);
|
|
705
732
|
var setPending = useCallback(function (isPending) {
|
|
706
733
|
if (isPending) {
|
|
707
734
|
startPending();
|
|
@@ -709,7 +736,7 @@ var useAsyncMutationState = function useAsyncMutationState(_ref) {
|
|
|
709
736
|
stopPending();
|
|
710
737
|
}
|
|
711
738
|
}, [startPending, stopPending]);
|
|
712
|
-
return _objectSpread2(_objectSpread2({},
|
|
739
|
+
return _objectSpread2(_objectSpread2({}, globalState), {}, _defineProperty(_defineProperty(_defineProperty({}, mutationName, mutateAsync), "setData", setData), "setPending", setPending));
|
|
713
740
|
};
|
|
714
741
|
|
|
715
742
|
/**
|
|
@@ -984,33 +1011,39 @@ var useAsyncQueryState = function useAsyncQueryState(_ref) {
|
|
|
984
1011
|
state = _useGlobalState2[0],
|
|
985
1012
|
setState = _useGlobalState2[1];
|
|
986
1013
|
var setResult = useCallback(function (result) {
|
|
987
|
-
setState({
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
1014
|
+
setState(function (_state) {
|
|
1015
|
+
return {
|
|
1016
|
+
isLoading: false,
|
|
1017
|
+
isError: false,
|
|
1018
|
+
isSuccess: true,
|
|
1019
|
+
error: null,
|
|
1020
|
+
data: result
|
|
1021
|
+
};
|
|
993
1022
|
});
|
|
994
1023
|
}, [setState]);
|
|
995
1024
|
var setError = useCallback(function (error) {
|
|
996
|
-
setState({
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1025
|
+
setState(function (_state) {
|
|
1026
|
+
return {
|
|
1027
|
+
isLoading: false,
|
|
1028
|
+
isError: true,
|
|
1029
|
+
isSuccess: false,
|
|
1030
|
+
error: error,
|
|
1031
|
+
data: undefined
|
|
1032
|
+
};
|
|
1002
1033
|
});
|
|
1003
1034
|
}, [setState]);
|
|
1004
1035
|
var startLoading = useCallback(function () {
|
|
1005
1036
|
if (state.isLoading) {
|
|
1006
1037
|
return;
|
|
1007
1038
|
}
|
|
1008
|
-
setState({
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1039
|
+
setState(function (_state) {
|
|
1040
|
+
return {
|
|
1041
|
+
isLoading: true,
|
|
1042
|
+
isError: false,
|
|
1043
|
+
isSuccess: false,
|
|
1044
|
+
error: null,
|
|
1045
|
+
data: undefined
|
|
1046
|
+
};
|
|
1014
1047
|
});
|
|
1015
1048
|
}, [setState]);
|
|
1016
1049
|
var stopLoading = useCallback(function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAsyncMutationState.d.ts","sourceRoot":"../../../../src/utils","sources":["useAsyncMutationState.ts"],"names":[],"mappings":"AAKA,KAAK,WAAW,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;AAEpD,KAAK,sBAAsB,GAAG;IAC5B,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,IAAI,CAAC;IACb,SAAS,EAAE,KAAK,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC;IACf,SAAS,EAAE,KAAK,CAAC;IACjB,KAAK,EAAE,IAAI,CAAC;CACb,CAAC;AAEF,KAAK,yBAAyB,CAAC,WAAW,SAAS,WAAW,IAAI;IAChE,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;IACvC,MAAM,EAAE,KAAK,CAAC;IACd,SAAS,EAAE,KAAK,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC;IACf,SAAS,EAAE,IAAI,CAAC;IAChB,KAAK,EAAE,IAAI,CAAC;CACb,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,KAAK,CAAC;IACd,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,EAAE,KAAK,CAAC;IACf,SAAS,EAAE,KAAK,CAAC;IACjB,KAAK,EAAE,IAAI,CAAC;CACb,CAAC;AAEF,KAAK,uBAAuB,CAAC,WAAW,SAAS,WAAW,IAAI;IAC9D,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,GAAG,SAAS,CAAC;IACnD,MAAM,EAAE,KAAK,CAAC;IACd,SAAS,EAAE,KAAK,CAAC;IACjB,OAAO,EAAE,IAAI,CAAC;IACd,SAAS,EAAE,KAAK,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,qBAAqB,CAAC,WAAW,SAAS,WAAW,IAC7D,sBAAsB,GACtB,yBAAyB,CAAC,WAAW,CAAC,GACtC,yBAAyB,GACzB,uBAAuB,CAAC,WAAW,CAAC,CAAC;AAEzC,MAAM,MAAM,kBAAkB,CAC5B,WAAW,SAAS,WAAW,EAC/B,aAAa,SAAS,MAAM,IAC1B,qBAAqB,CAAC,WAAW,CAAC,GAAG;KACtC,CAAC,IAAI,aAAa,GAAG,WAAW;CAClC,GAAG;IACF,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,KAAK,IAAI,CAAC;IAC1D,UAAU,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,WAAW,SAAS,WAAW,EAC/B,aAAa,SAAS,MAAM,4DAM3B;IACD,YAAY,EAAE,aAAa,CAAC;IAC5B,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,WAAW,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;CACjD,KAAG,kBAAkB,CAAC,WAAW,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"useAsyncMutationState.d.ts","sourceRoot":"../../../../src/utils","sources":["useAsyncMutationState.ts"],"names":[],"mappings":"AAKA,KAAK,WAAW,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;AAEpD,KAAK,sBAAsB,GAAG;IAC5B,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,IAAI,CAAC;IACb,SAAS,EAAE,KAAK,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC;IACf,SAAS,EAAE,KAAK,CAAC;IACjB,KAAK,EAAE,IAAI,CAAC;CACb,CAAC;AAEF,KAAK,yBAAyB,CAAC,WAAW,SAAS,WAAW,IAAI;IAChE,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;IACvC,MAAM,EAAE,KAAK,CAAC;IACd,SAAS,EAAE,KAAK,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC;IACf,SAAS,EAAE,IAAI,CAAC;IAChB,KAAK,EAAE,IAAI,CAAC;CACb,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,KAAK,CAAC;IACd,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,EAAE,KAAK,CAAC;IACf,SAAS,EAAE,KAAK,CAAC;IACjB,KAAK,EAAE,IAAI,CAAC;CACb,CAAC;AAEF,KAAK,uBAAuB,CAAC,WAAW,SAAS,WAAW,IAAI;IAC9D,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,GAAG,SAAS,CAAC;IACnD,MAAM,EAAE,KAAK,CAAC;IACd,SAAS,EAAE,KAAK,CAAC;IACjB,OAAO,EAAE,IAAI,CAAC;IACd,SAAS,EAAE,KAAK,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,qBAAqB,CAAC,WAAW,SAAS,WAAW,IAC7D,sBAAsB,GACtB,yBAAyB,CAAC,WAAW,CAAC,GACtC,yBAAyB,GACzB,uBAAuB,CAAC,WAAW,CAAC,CAAC;AAEzC,MAAM,MAAM,kBAAkB,CAC5B,WAAW,SAAS,WAAW,EAC/B,aAAa,SAAS,MAAM,IAC1B,qBAAqB,CAAC,WAAW,CAAC,GAAG;KACtC,CAAC,IAAI,aAAa,GAAG,WAAW;CAClC,GAAG;IACF,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,KAAK,IAAI,CAAC;IAC1D,UAAU,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,WAAW,SAAS,WAAW,EAC/B,aAAa,SAAS,MAAM,4DAM3B;IACD,YAAY,EAAE,aAAa,CAAC;IAC5B,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,WAAW,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;CACjD,KAAG,kBAAkB,CAAC,WAAW,EAAE,aAAa,CAiHhD,CAAC"}
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@compilot/react-sdk",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.7-dev",
|
|
4
4
|
"description": "ComPilot React SDK",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "ISC",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"pino": "^9.4.0",
|
|
28
28
|
"zod": "^3.23.8",
|
|
29
29
|
"@compilot/web-sdk": "2.2.6-dev",
|
|
30
|
-
"@nexeraid/identity-api-client": "2.2.
|
|
30
|
+
"@nexeraid/identity-api-client": "2.2.6-dev",
|
|
31
31
|
"@nexeraid/identity-schemas": "2.2.6-dev",
|
|
32
|
-
"@nexeraid/logger": "2.2.
|
|
32
|
+
"@nexeraid/logger": "2.2.6-dev"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"react": ">=17.0.0 <20.0.0"
|