react-native-onyx 1.0.17 → 1.0.19
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/API.md +12 -0
- package/dist/web.development.js +292 -168
- package/dist/web.development.js.map +1 -1
- package/dist/web.min.js +1 -1
- package/dist/web.min.js.map +1 -1
- package/lib/Onyx.js +209 -108
- package/lib/OnyxCache.js +4 -2
- package/lib/fastMerge.js +66 -0
- package/lib/storage/providers/LocalForage.js +5 -2
- package/package.json +1 -1
- package/lib/mergeWithCustomized.js +0 -26
package/dist/web.development.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
2
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
-
module.exports = factory(require("underscore"), require("expensify-common/lib/str"), require("lodash/
|
|
3
|
+
module.exports = factory(require("underscore"), require("expensify-common/lib/str"), require("lodash/get"), require("localforage"), require("react"));
|
|
4
4
|
else if(typeof define === 'function' && define.amd)
|
|
5
|
-
define(["underscore", "expensify-common/lib/str", "lodash/
|
|
5
|
+
define(["underscore", "expensify-common/lib/str", "lodash/get", "localforage", "react"], factory);
|
|
6
6
|
else if(typeof exports === 'object')
|
|
7
|
-
exports["react-native-onyx/web"] = factory(require("underscore"), require("expensify-common/lib/str"), require("lodash/
|
|
7
|
+
exports["react-native-onyx/web"] = factory(require("underscore"), require("expensify-common/lib/str"), require("lodash/get"), require("localforage"), require("react"));
|
|
8
8
|
else
|
|
9
|
-
root["react-native-onyx/web"] = factory(root["underscore"], root["expensify-common/lib/str"], root["lodash/
|
|
10
|
-
})(self, (__WEBPACK_EXTERNAL_MODULE_underscore__, __WEBPACK_EXTERNAL_MODULE_expensify_common_lib_str__,
|
|
9
|
+
root["react-native-onyx/web"] = factory(root["underscore"], root["expensify-common/lib/str"], root["lodash/get"], root["localforage"], root["react"]);
|
|
10
|
+
})(self, (__WEBPACK_EXTERNAL_MODULE_underscore__, __WEBPACK_EXTERNAL_MODULE_expensify_common_lib_str__, __WEBPACK_EXTERNAL_MODULE_lodash_get__, __WEBPACK_EXTERNAL_MODULE_localforage__, __WEBPACK_EXTERNAL_MODULE_react__) => {
|
|
11
11
|
return /******/ (() => { // webpackBootstrap
|
|
12
12
|
/******/ var __webpack_modules__ = ({
|
|
13
13
|
|
|
@@ -489,15 +489,15 @@ function logInfo(message) {
|
|
|
489
489
|
\*********************/
|
|
490
490
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
491
491
|
|
|
492
|
-
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(exports, "__esModule", ({ value: true }));exports["default"] = void 0;var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js"));var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/toConsumableArray.js"));var
|
|
492
|
+
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(exports, "__esModule", ({ value: true }));exports["default"] = void 0;var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js"));var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/toConsumableArray.js"));var _extends3 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js"));var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js"));
|
|
493
|
+
var _underscore = _interopRequireDefault(__webpack_require__(/*! underscore */ "underscore"));
|
|
493
494
|
var _str = _interopRequireDefault(__webpack_require__(/*! expensify-common/lib/str */ "expensify-common/lib/str"));
|
|
494
|
-
var _merge = _interopRequireDefault(__webpack_require__(/*! lodash/merge */ "lodash/merge"));
|
|
495
495
|
var _get = _interopRequireDefault(__webpack_require__(/*! lodash/get */ "lodash/get"));
|
|
496
496
|
var _storage = _interopRequireDefault(__webpack_require__(/*! ./storage */ "./lib/storage/index.web.js"));
|
|
497
497
|
var Logger = _interopRequireWildcard(__webpack_require__(/*! ./Logger */ "./lib/Logger.js"));
|
|
498
498
|
var _OnyxCache = _interopRequireDefault(__webpack_require__(/*! ./OnyxCache */ "./lib/OnyxCache.js"));
|
|
499
499
|
var _createDeferredTask = _interopRequireDefault(__webpack_require__(/*! ./createDeferredTask */ "./lib/createDeferredTask.js"));
|
|
500
|
-
var
|
|
500
|
+
var _fastMerge = _interopRequireDefault(__webpack_require__(/*! ./fastMerge */ "./lib/fastMerge.js"));function _getRequireWildcardCache(nodeInterop) {if (typeof WeakMap !== "function") return null;var cacheBabelInterop = new WeakMap();var cacheNodeInterop = new WeakMap();return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {return nodeInterop ? cacheNodeInterop : cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj, nodeInterop) {if (!nodeInterop && obj && obj.__esModule) {return obj;}if (obj === null || typeof obj !== "object" && typeof obj !== "function") {return { default: obj };}var cache = _getRequireWildcardCache(nodeInterop);if (cache && cache.has(obj)) {return cache.get(obj);}var newObj = {};var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;for (var key in obj) {if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;if (desc && (desc.get || desc.set)) {Object.defineProperty(newObj, key, desc);} else {newObj[key] = obj[key];}}}newObj.default = obj;if (cache) {cache.set(obj, newObj);}return newObj;} /* eslint-disable no-continue */
|
|
501
501
|
|
|
502
502
|
// Keeps track of the last connectionID that was used so we can keep incrementing it
|
|
503
503
|
var lastConnectionID = 0;
|
|
@@ -598,8 +598,17 @@ function isCollectionKey(key) {
|
|
|
598
598
|
}
|
|
599
599
|
|
|
600
600
|
/**
|
|
601
|
-
*
|
|
602
|
-
*
|
|
601
|
+
* @param {String} collectionKey
|
|
602
|
+
* @param {String} key
|
|
603
|
+
* @returns {Boolean}
|
|
604
|
+
*/
|
|
605
|
+
function isCollectionMemberKey(collectionKey, key) {
|
|
606
|
+
return _str.default.startsWith(key, collectionKey) && key.length > collectionKey.length;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* Checks to see if a provided key is the exact configured key of our connected subscriber
|
|
611
|
+
* or if the provided key is a collection member key (in case our configured key is a "collection key")
|
|
603
612
|
*
|
|
604
613
|
* @private
|
|
605
614
|
* @param {String} configKey
|
|
@@ -716,7 +725,7 @@ function addAllSafeEvictionKeysToRecentlyAccessedList() {
|
|
|
716
725
|
*/
|
|
717
726
|
function getCachedCollection(collectionKey) {
|
|
718
727
|
var collectionMemberKeys = _underscore.default.filter(_OnyxCache.default.getAllKeys(),
|
|
719
|
-
function (storedKey) {return
|
|
728
|
+
function (storedKey) {return isCollectionMemberKey(collectionKey, storedKey);});
|
|
720
729
|
|
|
721
730
|
|
|
722
731
|
return _underscore.default.reduce(collectionMemberKeys, function (prev, curr) {
|
|
@@ -736,73 +745,103 @@ function getCachedCollection(collectionKey) {
|
|
|
736
745
|
*
|
|
737
746
|
* @private
|
|
738
747
|
* @param {String} collectionKey
|
|
739
|
-
* @param {Object} collection
|
|
748
|
+
* @param {Object} partialCollection - a partial collection of grouped member keys
|
|
740
749
|
*/
|
|
741
|
-
function keysChanged(collectionKey,
|
|
742
|
-
//
|
|
743
|
-
|
|
750
|
+
function keysChanged(collectionKey, partialCollection) {
|
|
751
|
+
// We are iterating over all subscribers similar to keyChanged(). However, we are looking for subscribers who are subscribing to either a collection key or
|
|
752
|
+
// individual collection key member for the collection that is being updated. It is important to note that the collection parameter cane be a PARTIAL collection
|
|
753
|
+
// and does not represent all of the combined keys and values for a collection key. It is just the "new" data that was merged in via mergeCollection().
|
|
754
|
+
var stateMappingKeys = _underscore.default.keys(callbackToStateMapping);var _loop = function _loop(
|
|
755
|
+
i) {
|
|
756
|
+
var subscriber = callbackToStateMapping[stateMappingKeys[i]];
|
|
744
757
|
if (!subscriber) {
|
|
745
|
-
return;
|
|
758
|
+
return "continue";
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
// Skip iteration if we do not have a collection key or a collection member key on this subscriber
|
|
762
|
+
if (!_str.default.startsWith(subscriber.key, collectionKey)) {
|
|
763
|
+
return "continue";
|
|
746
764
|
}
|
|
747
765
|
|
|
748
766
|
/**
|
|
749
767
|
* e.g. Onyx.connect({key: ONYXKEYS.COLLECTION.REPORT, callback: ...});
|
|
750
768
|
*/
|
|
751
|
-
var isSubscribedToCollectionKey =
|
|
752
|
-
isCollectionKey(subscriber.key);
|
|
769
|
+
var isSubscribedToCollectionKey = subscriber.key === collectionKey;
|
|
753
770
|
|
|
754
771
|
/**
|
|
755
772
|
* e.g. Onyx.connect({key: `${ONYXKEYS.COLLECTION.REPORT}{reportID}`, callback: ...});
|
|
756
773
|
*/
|
|
757
|
-
var isSubscribedToCollectionMemberKey = subscriber.key
|
|
774
|
+
var isSubscribedToCollectionMemberKey = isCollectionMemberKey(collectionKey, subscriber.key);
|
|
758
775
|
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
776
|
+
// We prepare the "cached collection" which is the entire collection + the new partial data that
|
|
777
|
+
// was merged in via mergeCollection().
|
|
778
|
+
var cachedCollection = getCachedCollection(collectionKey);
|
|
762
779
|
|
|
780
|
+
// Regular Onyx.connect() subscriber found.
|
|
781
|
+
if (_underscore.default.isFunction(subscriber.callback)) {
|
|
782
|
+
// If they are subscribed to the collection key and using waitForCollectionCallback then we'll
|
|
783
|
+
// send the whole cached collection.
|
|
784
|
+
if (isSubscribedToCollectionKey) {
|
|
763
785
|
if (subscriber.waitForCollectionCallback) {
|
|
764
786
|
subscriber.callback(cachedCollection);
|
|
765
|
-
return;
|
|
787
|
+
return "continue";
|
|
766
788
|
}
|
|
767
789
|
|
|
768
|
-
|
|
790
|
+
// If they are not using waitForCollectionCallback then we notify the subscriber with
|
|
791
|
+
// the new merged data but only for any keys in the partial collection.
|
|
792
|
+
var dataKeys = _underscore.default.keys(partialCollection);
|
|
793
|
+
for (var j = 0; j < dataKeys.length; j++) {
|
|
794
|
+
var dataKey = dataKeys[j];
|
|
769
795
|
subscriber.callback(cachedCollection[dataKey], dataKey);
|
|
770
|
-
}
|
|
771
|
-
|
|
796
|
+
}
|
|
797
|
+
return "continue";
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
// And if the subscriber is specifically only tracking a particular collection member key then we will
|
|
801
|
+
// notify them with the cached data for that key only.
|
|
802
|
+
if (isSubscribedToCollectionMemberKey) {
|
|
803
|
+
subscriber.callback(cachedCollection[subscriber.key], subscriber.key);
|
|
804
|
+
return "continue";
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
return "continue";
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
// React component subscriber found.
|
|
811
|
+
if (subscriber.withOnyxInstance) {
|
|
812
|
+
// We are subscribed to a collection key so we must update the data in state with the new
|
|
813
|
+
// collection member key values from the partial update.
|
|
814
|
+
if (isSubscribedToCollectionKey) {
|
|
772
815
|
subscriber.withOnyxInstance.setState(function (prevState) {
|
|
773
816
|
var finalCollection = _underscore.default.clone(prevState[subscriber.statePropertyName] || {});
|
|
774
|
-
_underscore.default.each(collection, function (data, dataKey) {
|
|
775
|
-
if (finalCollection[dataKey]) {
|
|
776
|
-
(0, _merge.default)(finalCollection[dataKey], data);
|
|
777
|
-
} else {
|
|
778
|
-
finalCollection[dataKey] = data;
|
|
779
|
-
}
|
|
780
|
-
});
|
|
781
817
|
|
|
818
|
+
var dataKeys = _underscore.default.keys(partialCollection);
|
|
819
|
+
for (var _j = 0; _j < dataKeys.length; _j++) {
|
|
820
|
+
var _dataKey = dataKeys[_j];
|
|
821
|
+
finalCollection[_dataKey] = cachedCollection[_dataKey];
|
|
822
|
+
}
|
|
782
823
|
return (0, _defineProperty2.default)({},
|
|
783
824
|
subscriber.statePropertyName, finalCollection);
|
|
784
825
|
|
|
785
826
|
});
|
|
827
|
+
return "continue";
|
|
786
828
|
}
|
|
787
|
-
} else if (isSubscribedToCollectionMemberKey) {
|
|
788
|
-
var dataFromCollection = collection[subscriber.key];
|
|
789
829
|
|
|
790
|
-
// If
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
prevState[subscriber.statePropertyName],
|
|
800
|
-
dataFromCollection) :
|
|
830
|
+
// If a React component is only interested in a single key then we can set the cached value directly to the state name.
|
|
831
|
+
if (isSubscribedToCollectionMemberKey) {
|
|
832
|
+
// However, we only want to update this subscriber if the partial data contains a change.
|
|
833
|
+
// Otherwise, we would update them with a value they already have and trigger an unnecessary re-render.
|
|
834
|
+
var dataFromCollection = partialCollection[subscriber.key];
|
|
835
|
+
if (_underscore.default.isUndefined(dataFromCollection)) {
|
|
836
|
+
return "continue";
|
|
837
|
+
}
|
|
801
838
|
|
|
802
|
-
|
|
839
|
+
subscriber.withOnyxInstance.setState((0, _defineProperty2.default)({},
|
|
840
|
+
subscriber.statePropertyName, cachedCollection[subscriber.key]));
|
|
803
841
|
|
|
804
|
-
|
|
805
|
-
|
|
842
|
+
}
|
|
843
|
+
}};for (var i = stateMappingKeys.length; i--;) {var _ret = _loop(i);if (_ret === "continue") continue;
|
|
844
|
+
}
|
|
806
845
|
}
|
|
807
846
|
|
|
808
847
|
/**
|
|
@@ -820,43 +859,54 @@ function keyChanged(key, data) {
|
|
|
820
859
|
removeLastAccessedKey(key);
|
|
821
860
|
}
|
|
822
861
|
|
|
823
|
-
//
|
|
824
|
-
|
|
862
|
+
// We are iterating over all subscribers to see if they are interested in the key that has just changed. If the subscriber's key is a collection key then we will
|
|
863
|
+
// notify them if the key that changed is a collection member. Or if it is a regular key notify them when there is an exact match. Depending on whether the subscriber
|
|
864
|
+
// was connected via withOnyx we will call setState() directly on the withOnyx instance. If it is a regular connection we will pass the data to the provided callback.
|
|
865
|
+
var stateMappingKeys = _underscore.default.keys(callbackToStateMapping);var _loop2 = function _loop2(
|
|
866
|
+
i) {
|
|
867
|
+
var subscriber = callbackToStateMapping[stateMappingKeys[i]];
|
|
825
868
|
if (!subscriber || !isKeyMatch(subscriber.key, key)) {
|
|
826
|
-
return;
|
|
869
|
+
return "continue";
|
|
827
870
|
}
|
|
828
871
|
|
|
872
|
+
// Subscriber is a regular call to connect() and provided a callback
|
|
829
873
|
if (_underscore.default.isFunction(subscriber.callback)) {
|
|
830
|
-
if (subscriber.waitForCollectionCallback) {
|
|
874
|
+
if (isCollectionKey(subscriber.key) && subscriber.waitForCollectionCallback) {
|
|
831
875
|
var cachedCollection = getCachedCollection(subscriber.key);
|
|
832
876
|
cachedCollection[key] = data;
|
|
833
877
|
subscriber.callback(cachedCollection);
|
|
834
|
-
return;
|
|
878
|
+
return "continue";
|
|
835
879
|
}
|
|
836
880
|
|
|
837
881
|
subscriber.callback(data, key);
|
|
838
|
-
return;
|
|
882
|
+
return "continue";
|
|
839
883
|
}
|
|
840
884
|
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
885
|
+
// Subscriber connected via withOnyx() HOC
|
|
886
|
+
if (subscriber.withOnyxInstance) {
|
|
887
|
+
// Check if we are subscribing to a collection key and overwrite the collection member key value in state
|
|
888
|
+
if (isCollectionKey(subscriber.key)) {
|
|
889
|
+
subscriber.withOnyxInstance.setState(function (prevState) {
|
|
890
|
+
var collection = prevState[subscriber.statePropertyName] || {};
|
|
891
|
+
return (0, _defineProperty2.default)({},
|
|
892
|
+
subscriber.statePropertyName, (0, _extends3.default)({},
|
|
893
|
+
collection, (0, _defineProperty2.default)({},
|
|
894
|
+
key, data)));
|
|
844
895
|
|
|
845
|
-
// Check if we are subscribing to a collection key and add this item as a collection
|
|
846
|
-
if (isCollectionKey(subscriber.key)) {
|
|
847
|
-
subscriber.withOnyxInstance.setState(function (prevState) {
|
|
848
|
-
var collection = _underscore.default.clone(prevState[subscriber.statePropertyName] || {});
|
|
849
|
-
collection[key] = data;
|
|
850
|
-
return (0, _defineProperty2.default)({},
|
|
851
|
-
subscriber.statePropertyName, collection);
|
|
852
896
|
|
|
853
|
-
|
|
854
|
-
|
|
897
|
+
});
|
|
898
|
+
return "continue";
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
// If we did not match on a collection key then we just set the new data to the state property
|
|
855
902
|
subscriber.withOnyxInstance.setState((0, _defineProperty2.default)({},
|
|
856
903
|
subscriber.statePropertyName, data));
|
|
857
904
|
|
|
905
|
+
return "continue";
|
|
858
906
|
}
|
|
859
|
-
|
|
907
|
+
|
|
908
|
+
console.error('Warning: Found a matching subscriber to a key that changed, but no callback or withOnyxInstance could be found.');};for (var i = stateMappingKeys.length; i--;) {var _ret2 = _loop2(i);if (_ret2 === "continue") continue;
|
|
909
|
+
}
|
|
860
910
|
}
|
|
861
911
|
|
|
862
912
|
/**
|
|
@@ -870,9 +920,9 @@ function keyChanged(key, data) {
|
|
|
870
920
|
* @param {string} [config.statePropertyName]
|
|
871
921
|
* @param {function} [config.callback]
|
|
872
922
|
* @param {*|null} val
|
|
873
|
-
* @param {String}
|
|
923
|
+
* @param {String} matchedKey
|
|
874
924
|
*/
|
|
875
|
-
function sendDataToConnection(config, val,
|
|
925
|
+
function sendDataToConnection(config, val, matchedKey) {
|
|
876
926
|
// If the mapping no longer exists then we should not send any data.
|
|
877
927
|
// This means our subscriber disconnected or withOnyx wrapped component unmounted.
|
|
878
928
|
if (!callbackToStateMapping[config.connectionID]) {
|
|
@@ -882,10 +932,54 @@ function sendDataToConnection(config, val, key) {
|
|
|
882
932
|
if (config.withOnyxInstance) {
|
|
883
933
|
config.withOnyxInstance.setWithOnyxState(config.statePropertyName, val);
|
|
884
934
|
} else if (_underscore.default.isFunction(config.callback)) {
|
|
885
|
-
config.callback(val,
|
|
935
|
+
config.callback(val, matchedKey);
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
/**
|
|
940
|
+
* We check to see if this key is flagged as safe for eviction and add it to the recentlyAccessedKeys list so that when we
|
|
941
|
+
* run out of storage the least recently accessed key can be removed.
|
|
942
|
+
*
|
|
943
|
+
* @private
|
|
944
|
+
* @param {Object} mapping
|
|
945
|
+
*/
|
|
946
|
+
function addKeyToRecentlyAccessedIfNeeded(mapping) {
|
|
947
|
+
if (!isSafeEvictionKey(mapping.key)) {
|
|
948
|
+
return;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
// Try to free some cache whenever we connect to a safe eviction key
|
|
952
|
+
_OnyxCache.default.removeLeastRecentlyUsedKeys();
|
|
953
|
+
|
|
954
|
+
if (mapping.withOnyxInstance && !isCollectionKey(mapping.key)) {
|
|
955
|
+
// All React components subscribing to a key flagged as a safe eviction key must implement the canEvict property.
|
|
956
|
+
if (_underscore.default.isUndefined(mapping.canEvict)) {
|
|
957
|
+
throw new Error("Cannot subscribe to safe eviction key '" +
|
|
958
|
+
mapping.key + "' without providing a canEvict value.");
|
|
959
|
+
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
addLastAccessedKey(mapping.key);
|
|
886
963
|
}
|
|
887
964
|
}
|
|
888
965
|
|
|
966
|
+
/**
|
|
967
|
+
* Gets the data for a given an array of matching keys, combines them into an object, and sends the result back to the subscriber.
|
|
968
|
+
*
|
|
969
|
+
* @private
|
|
970
|
+
* @param {Array} matchingKeys
|
|
971
|
+
* @param {Object} mapping
|
|
972
|
+
*/
|
|
973
|
+
function getCollectionDataAndSendAsObject(matchingKeys, mapping) {
|
|
974
|
+
Promise.all(_underscore.default.map(matchingKeys, function (key) {return get(key);})).
|
|
975
|
+
then(function (values) {return _underscore.default.reduce(values, function (finalObject, value, i) {
|
|
976
|
+
// eslint-disable-next-line no-param-reassign
|
|
977
|
+
finalObject[matchingKeys[i]] = value;
|
|
978
|
+
return finalObject;
|
|
979
|
+
}, {});}).
|
|
980
|
+
then(function (val) {return sendDataToConnection(mapping, val);});
|
|
981
|
+
}
|
|
982
|
+
|
|
889
983
|
/**
|
|
890
984
|
* Subscribes a react component's state directly to a store key
|
|
891
985
|
*
|
|
@@ -918,58 +1012,63 @@ function connect(mapping) {
|
|
|
918
1012
|
|
|
919
1013
|
// Commit connection only after init passes
|
|
920
1014
|
deferredInitTask.promise.
|
|
921
|
-
then(function () {
|
|
922
|
-
|
|
923
|
-
|
|
1015
|
+
then(function () {return addKeyToRecentlyAccessedIfNeeded(mapping);}).
|
|
1016
|
+
then(getAllKeys).
|
|
1017
|
+
then(function (keys) {
|
|
1018
|
+
// We search all the keys in storage to see if any are a "match" for the subscriber we are connecting so that we
|
|
1019
|
+
// can send data back to the subscriber. Note that multiple keys can match as a subscriber could either be
|
|
1020
|
+
// subscribed to a "collection key" or a single key.
|
|
1021
|
+
var matchingKeys = _underscore.default.filter(keys, function (key) {return isKeyMatch(mapping.key, key);});
|
|
1022
|
+
|
|
1023
|
+
// If the key being connected to does not exist we initialize the value with null. For subscribers that connected
|
|
1024
|
+
// directly via connect() they will simply get a null value sent to them without any information about which key matched
|
|
1025
|
+
// since there are none matched. In withOnyx() we wait for all connected keys to return a value before rendering the child
|
|
1026
|
+
// component. This null value will be filtered out so that the connected component can utilize defaultProps.
|
|
1027
|
+
if (matchingKeys.length === 0) {
|
|
1028
|
+
sendDataToConnection(mapping, null);
|
|
924
1029
|
return;
|
|
925
1030
|
}
|
|
926
1031
|
|
|
927
|
-
//
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
if (
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
1032
|
+
// When using a callback subscriber we will either trigger the provided callback for each key we find or combine all values
|
|
1033
|
+
// into an object and just make a single call. The latter behavior is enabled by providing a waitForCollectionCallback key
|
|
1034
|
+
// combined with a subscription to a collection key.
|
|
1035
|
+
if (_underscore.default.isFunction(mapping.callback)) {
|
|
1036
|
+
if (isCollectionKey(mapping.key)) {
|
|
1037
|
+
if (mapping.waitForCollectionCallback) {
|
|
1038
|
+
getCollectionDataAndSendAsObject(matchingKeys, mapping);
|
|
1039
|
+
return;
|
|
1040
|
+
}
|
|
936
1041
|
|
|
1042
|
+
// We did not opt into using waitForCollectionCallback mode so the callback is called for every matching key.
|
|
1043
|
+
var _loop3 = function _loop3(i) {
|
|
1044
|
+
get(matchingKeys[i]).then(function (val) {return sendDataToConnection(mapping, val, matchingKeys[i]);});};for (var i = 0; i < matchingKeys.length; i++) {_loop3(i);
|
|
1045
|
+
}
|
|
1046
|
+
return;
|
|
937
1047
|
}
|
|
938
1048
|
|
|
939
|
-
|
|
1049
|
+
// If we are not subscribed to a collection key then there's only a single key to send an update for.
|
|
1050
|
+
get(mapping.key).then(function (val) {return sendDataToConnection(mapping, val, mapping.key);});
|
|
1051
|
+
return;
|
|
940
1052
|
}
|
|
941
|
-
}).
|
|
942
|
-
then(getAllKeys).
|
|
943
|
-
then(function (keys) {
|
|
944
|
-
// Find all the keys matched by the config key
|
|
945
|
-
var matchingKeys = _underscore.default.filter(keys, function (key) {return isKeyMatch(mapping.key, key);});
|
|
946
1053
|
|
|
947
|
-
// If
|
|
948
|
-
|
|
949
|
-
|
|
1054
|
+
// If we have a withOnyxInstance that means a React component has subscribed via the withOnyx() HOC and we need to
|
|
1055
|
+
// group collection key member data into an object.
|
|
1056
|
+
if (mapping.withOnyxInstance) {
|
|
1057
|
+
if (isCollectionKey(mapping.key)) {
|
|
1058
|
+
getCollectionDataAndSendAsObject(matchingKeys, mapping);
|
|
1059
|
+
return;
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
// If the subscriber is not using a collection key then we just send a single value back to the subscriber
|
|
1063
|
+
get(mapping.key).then(function (val) {return sendDataToConnection(mapping, val, mapping.key);});
|
|
950
1064
|
return;
|
|
951
1065
|
}
|
|
952
1066
|
|
|
953
|
-
|
|
954
|
-
// for each key we find. It's up to the subscriber to know whether
|
|
955
|
-
// to expect a single key or multiple keys in the case of a collection.
|
|
956
|
-
// React components are an exception since we'll want to send their
|
|
957
|
-
// initial data as a single object when using collection keys.
|
|
958
|
-
if (mapping.withOnyxInstance && isCollectionKey(mapping.key) || mapping.waitForCollectionCallback) {
|
|
959
|
-
Promise.all(_underscore.default.map(matchingKeys, function (key) {return get(key);})).
|
|
960
|
-
then(function (values) {return _underscore.default.reduce(values, function (finalObject, value, i) {
|
|
961
|
-
// eslint-disable-next-line no-param-reassign
|
|
962
|
-
finalObject[matchingKeys[i]] = value;
|
|
963
|
-
return finalObject;
|
|
964
|
-
}, {});}).
|
|
965
|
-
then(function (val) {return sendDataToConnection(mapping, val);});
|
|
966
|
-
} else {
|
|
967
|
-
_underscore.default.each(matchingKeys, function (key) {
|
|
968
|
-
get(key).then(function (val) {return sendDataToConnection(mapping, val, key);});
|
|
969
|
-
});
|
|
970
|
-
}
|
|
1067
|
+
console.error('Warning: Onyx.connect() was found without a callback or withOnyxInstance');
|
|
971
1068
|
});
|
|
972
1069
|
|
|
1070
|
+
// The connectionID is returned back to the caller so that it can be used to clean up the connection when it's no longer needed
|
|
1071
|
+
// by calling Onyx.disconnect(connectionID).
|
|
973
1072
|
return connectionID;
|
|
974
1073
|
}
|
|
975
1074
|
|
|
@@ -1153,7 +1252,9 @@ function applyMerge(key, data) {
|
|
|
1153
1252
|
if (_underscore.default.isObject(data) || _underscore.default.every(mergeValues, _underscore.default.isObject)) {
|
|
1154
1253
|
// Object values are merged one after the other
|
|
1155
1254
|
return _underscore.default.reduce(mergeValues, function (modifiedData, mergeValue) {
|
|
1156
|
-
|
|
1255
|
+
// lodash adds a small overhead so we don't use it here
|
|
1256
|
+
// eslint-disable-next-line prefer-object-spread, rulesdir/prefer-underscore-method
|
|
1257
|
+
var newData = (0, _extends3.default)({}, (0, _fastMerge.default)(modifiedData, mergeValue));
|
|
1157
1258
|
|
|
1158
1259
|
// We will also delete any object keys that are undefined or null.
|
|
1159
1260
|
// Deleting keys is not supported by AsyncStorage so we do it this way.
|
|
@@ -1224,7 +1325,7 @@ function initializeWithDefaultKeyStates() {
|
|
|
1224
1325
|
then(function (pairs) {
|
|
1225
1326
|
var asObject = _underscore.default.object(pairs);
|
|
1226
1327
|
|
|
1227
|
-
var merged = (0,
|
|
1328
|
+
var merged = (0, _fastMerge.default)(asObject, defaultKeyStates);
|
|
1228
1329
|
_OnyxCache.default.merge(merged);
|
|
1229
1330
|
_underscore.default.each(merged, function (val, key) {return keyChanged(key, val);});
|
|
1230
1331
|
});
|
|
@@ -1279,7 +1380,7 @@ function clear() {
|
|
|
1279
1380
|
*/
|
|
1280
1381
|
function mergeCollection(collectionKey, collection) {
|
|
1281
1382
|
// Confirm all the collection keys belong to the same parent
|
|
1282
|
-
_underscore.default.each(collection, function (
|
|
1383
|
+
_underscore.default.each(collection, function (_data, dataKey) {
|
|
1283
1384
|
if (isKeyMatch(collectionKey, dataKey)) {
|
|
1284
1385
|
return;
|
|
1285
1386
|
}
|
|
@@ -1331,7 +1432,7 @@ function mergeCollection(collectionKey, collection) {
|
|
|
1331
1432
|
*/
|
|
1332
1433
|
function update(data) {
|
|
1333
1434
|
// First, validate the Onyx object is in the format we expect
|
|
1334
|
-
_underscore.default.each(data, function (
|
|
1435
|
+
_underscore.default.each(data, function (_ref3) {var onyxMethod = _ref3.onyxMethod,key = _ref3.key;
|
|
1335
1436
|
if (!_underscore.default.contains(['clear', 'set', 'merge', 'mergecollection'], onyxMethod)) {
|
|
1336
1437
|
throw new Error("Invalid onyxMethod " + onyxMethod + " in Onyx update.");
|
|
1337
1438
|
}
|
|
@@ -1340,7 +1441,7 @@ function update(data) {
|
|
|
1340
1441
|
}
|
|
1341
1442
|
});
|
|
1342
1443
|
|
|
1343
|
-
_underscore.default.each(data, function (
|
|
1444
|
+
_underscore.default.each(data, function (_ref4) {var onyxMethod = _ref4.onyxMethod,key = _ref4.key,value = _ref4.value;
|
|
1344
1445
|
switch (onyxMethod) {
|
|
1345
1446
|
case 'set':
|
|
1346
1447
|
set(key, value);
|
|
@@ -1394,7 +1495,7 @@ function init()
|
|
|
1394
1495
|
|
|
1395
1496
|
|
|
1396
1497
|
|
|
1397
|
-
{var
|
|
1498
|
+
{var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},_ref5$keys = _ref5.keys,keys = _ref5$keys === void 0 ? {} : _ref5$keys,_ref5$initialKeyState = _ref5.initialKeyStates,initialKeyStates = _ref5$initialKeyState === void 0 ? {} : _ref5$initialKeyState,_ref5$safeEvictionKey = _ref5.safeEvictionKeys,safeEvictionKeys = _ref5$safeEvictionKey === void 0 ? [] : _ref5$safeEvictionKey,_ref5$maxCachedKeysCo = _ref5.maxCachedKeysCount,maxCachedKeysCount = _ref5$maxCachedKeysCo === void 0 ? 1000 : _ref5$maxCachedKeysCo,_ref5$captureMetrics = _ref5.captureMetrics,captureMetrics = _ref5$captureMetrics === void 0 ? false : _ref5$captureMetrics,_ref5$shouldSyncMulti = _ref5.shouldSyncMultipleInstances,shouldSyncMultipleInstances = _ref5$shouldSyncMulti === void 0 ? Boolean(__webpack_require__.g.localStorage) : _ref5$shouldSyncMulti,_ref5$keysToDisableSy = _ref5.keysToDisableSyncEvents,keysToDisableSyncEvents = _ref5$keysToDisableSy === void 0 ? [] : _ref5$keysToDisableSy;
|
|
1398
1499
|
if (captureMetrics) {
|
|
1399
1500
|
// The code here is only bundled and applied when the captureMetrics is set
|
|
1400
1501
|
// eslint-disable-next-line no-use-before-define
|
|
@@ -1493,8 +1594,8 @@ Onyx;exports["default"] = _default;
|
|
|
1493
1594
|
\**************************/
|
|
1494
1595
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1495
1596
|
|
|
1496
|
-
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(exports, "__esModule", ({ value: true }));exports["default"] = void 0;var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/toConsumableArray.js"));var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"));var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"));var _underscore = _interopRequireDefault(__webpack_require__(/*! underscore */ "underscore"));
|
|
1497
|
-
var
|
|
1597
|
+
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(exports, "__esModule", ({ value: true }));exports["default"] = void 0;var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/toConsumableArray.js"));var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js"));var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"));var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"));var _underscore = _interopRequireDefault(__webpack_require__(/*! underscore */ "underscore"));
|
|
1598
|
+
var _fastMerge = _interopRequireDefault(__webpack_require__(/*! ./fastMerge */ "./lib/fastMerge.js"));
|
|
1498
1599
|
|
|
1499
1600
|
var isDefined = _underscore.default.negate(_underscore.default.isUndefined);
|
|
1500
1601
|
|
|
@@ -1605,7 +1706,9 @@ OnyxCache = /*#__PURE__*/function () {
|
|
|
1605
1706
|
* @param {Record<string, *>} data - a map of (cache) key - values
|
|
1606
1707
|
*/ }, { key: "merge", value: function merge(
|
|
1607
1708
|
data) {var _this = this;
|
|
1608
|
-
|
|
1709
|
+
// lodash adds a small overhead so we don't use it here
|
|
1710
|
+
// eslint-disable-next-line prefer-object-spread, rulesdir/prefer-underscore-method
|
|
1711
|
+
this.storageMap = (0, _extends2.default)({}, (0, _fastMerge.default)(this.storageMap, data));
|
|
1609
1712
|
|
|
1610
1713
|
var storageKeys = this.getAllKeys();
|
|
1611
1714
|
var mergedKeys = _underscore.default.keys(data);
|
|
@@ -1776,38 +1879,78 @@ function createDeferredTask() {
|
|
|
1776
1879
|
|
|
1777
1880
|
/***/ }),
|
|
1778
1881
|
|
|
1779
|
-
/***/ "./lib/
|
|
1780
|
-
|
|
1781
|
-
!*** ./lib/
|
|
1782
|
-
|
|
1783
|
-
/***/ ((__unused_webpack_module, exports
|
|
1882
|
+
/***/ "./lib/fastMerge.js":
|
|
1883
|
+
/*!**************************!*\
|
|
1884
|
+
!*** ./lib/fastMerge.js ***!
|
|
1885
|
+
\**************************/
|
|
1886
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
1784
1887
|
|
|
1785
|
-
|
|
1888
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));exports["default"] = void 0; // Mostly copied from https://medium.com/@lubaka.a/how-to-remove-lodash-performance-improvement-b306669ad0e1
|
|
1786
1889
|
|
|
1787
1890
|
/**
|
|
1788
|
-
*
|
|
1789
|
-
*
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1891
|
+
* @param {mixed} val
|
|
1892
|
+
* @returns {boolean}
|
|
1893
|
+
*/
|
|
1894
|
+
function isMergeableObject(val) {
|
|
1895
|
+
var nonNullObject = val != null ? typeof val === 'object' : false;
|
|
1896
|
+
return nonNullObject &&
|
|
1897
|
+
Object.prototype.toString.call(val) !== '[object RegExp]' &&
|
|
1898
|
+
Object.prototype.toString.call(val) !== '[object Date]';
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
/**
|
|
1902
|
+
* @param {Object} target
|
|
1903
|
+
* @param {Object} source
|
|
1904
|
+
* @returns {Object}
|
|
1905
|
+
*/
|
|
1906
|
+
function mergeObject(target, source) {
|
|
1907
|
+
var destination = {};
|
|
1908
|
+
if (isMergeableObject(target)) {
|
|
1909
|
+
// lodash adds a small overhead so we don't use it here
|
|
1910
|
+
// eslint-disable-next-line rulesdir/prefer-underscore-method
|
|
1911
|
+
var targetKeys = Object.keys(target);
|
|
1912
|
+
for (var i = 0; i < targetKeys.length; ++i) {
|
|
1913
|
+
var key = targetKeys[i];
|
|
1914
|
+
destination[key] = target[key];
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
|
|
1918
|
+
// lodash adds a small overhead so we don't use it here
|
|
1800
1919
|
// eslint-disable-next-line rulesdir/prefer-underscore-method
|
|
1801
|
-
|
|
1802
|
-
|
|
1920
|
+
var sourceKeys = Object.keys(source);
|
|
1921
|
+
for (var _i = 0; _i < sourceKeys.length; ++_i) {
|
|
1922
|
+
var _key = sourceKeys[_i];
|
|
1923
|
+
if (source[_key] === undefined) {
|
|
1924
|
+
// eslint-disable-next-line no-continue
|
|
1925
|
+
continue;
|
|
1926
|
+
}
|
|
1927
|
+
if (!isMergeableObject(source[_key]) || !target[_key]) {
|
|
1928
|
+
destination[_key] = source[_key];
|
|
1929
|
+
} else {
|
|
1930
|
+
// eslint-disable-next-line no-use-before-define
|
|
1931
|
+
destination[_key] = fastMerge(target[_key], source[_key]);
|
|
1932
|
+
}
|
|
1803
1933
|
}
|
|
1934
|
+
|
|
1935
|
+
return destination;
|
|
1804
1936
|
}
|
|
1805
1937
|
|
|
1806
|
-
|
|
1807
|
-
|
|
1938
|
+
/**
|
|
1939
|
+
* @param {Object|Array} target
|
|
1940
|
+
* @param {Object|Array} source
|
|
1941
|
+
* @returns {Object|Array}
|
|
1942
|
+
*/
|
|
1943
|
+
function fastMerge(target, source) {
|
|
1944
|
+
// lodash adds a small overhead so we don't use it here
|
|
1945
|
+
// eslint-disable-next-line rulesdir/prefer-underscore-method
|
|
1946
|
+
var array = Array.isArray(source);
|
|
1947
|
+
if (array) {
|
|
1948
|
+
return source;
|
|
1949
|
+
}
|
|
1950
|
+
return mergeObject(target, source);
|
|
1808
1951
|
}var _default =
|
|
1809
1952
|
|
|
1810
|
-
|
|
1953
|
+
fastMerge;exports["default"] = _default;
|
|
1811
1954
|
|
|
1812
1955
|
/***/ }),
|
|
1813
1956
|
|
|
@@ -1909,7 +2052,7 @@ _WebStorage.default;exports["default"] = _default;
|
|
|
1909
2052
|
\**********************************************/
|
|
1910
2053
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1911
2054
|
|
|
1912
|
-
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(exports, "__esModule", ({ value: true }));exports["default"] = void 0;var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js"));
|
|
2055
|
+
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(exports, "__esModule", ({ value: true }));exports["default"] = void 0;var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js"));var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js"));
|
|
1913
2056
|
|
|
1914
2057
|
|
|
1915
2058
|
|
|
@@ -1918,7 +2061,7 @@ var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/inte
|
|
|
1918
2061
|
var _localforage = _interopRequireDefault(__webpack_require__(/*! localforage */ "localforage"));
|
|
1919
2062
|
var _underscore = _interopRequireDefault(__webpack_require__(/*! underscore */ "underscore"));
|
|
1920
2063
|
var _SyncQueue = _interopRequireDefault(__webpack_require__(/*! ../../SyncQueue */ "./lib/SyncQueue.js"));
|
|
1921
|
-
var
|
|
2064
|
+
var _fastMerge = _interopRequireDefault(__webpack_require__(/*! ../../fastMerge */ "./lib/fastMerge.js")); /**
|
|
1922
2065
|
* @file
|
|
1923
2066
|
* The storage provider based on localforage allows us to store most anything in its
|
|
1924
2067
|
* natural form in the underlying DB without having to stringify or de-stringify it
|
|
@@ -1934,8 +2077,11 @@ var provider = {
|
|
|
1934
2077
|
if (shouldMerge) {
|
|
1935
2078
|
return _localforage.default.getItem(key).
|
|
1936
2079
|
then(function (existingValue) {
|
|
1937
|
-
var newValue = _underscore.default.isObject(existingValue)
|
|
1938
|
-
|
|
2080
|
+
var newValue = _underscore.default.isObject(existingValue)
|
|
2081
|
+
|
|
2082
|
+
// lodash adds a small overhead so we don't use it here
|
|
2083
|
+
// eslint-disable-next-line prefer-object-spread, rulesdir/prefer-underscore-method
|
|
2084
|
+
? (0, _extends2.default)({}, (0, _fastMerge.default)(existingValue, value)) :
|
|
1939
2085
|
value;
|
|
1940
2086
|
return _localforage.default.setItem(key, newValue);
|
|
1941
2087
|
});
|
|
@@ -3337,28 +3483,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_lodash_get__;
|
|
|
3337
3483
|
|
|
3338
3484
|
/***/ }),
|
|
3339
3485
|
|
|
3340
|
-
/***/ "lodash/merge":
|
|
3341
|
-
/*!*******************************!*\
|
|
3342
|
-
!*** external "lodash/merge" ***!
|
|
3343
|
-
\*******************************/
|
|
3344
|
-
/***/ ((module) => {
|
|
3345
|
-
|
|
3346
|
-
"use strict";
|
|
3347
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_lodash_merge__;
|
|
3348
|
-
|
|
3349
|
-
/***/ }),
|
|
3350
|
-
|
|
3351
|
-
/***/ "lodash/mergeWith":
|
|
3352
|
-
/*!***********************************!*\
|
|
3353
|
-
!*** external "lodash/mergeWith" ***!
|
|
3354
|
-
\***********************************/
|
|
3355
|
-
/***/ ((module) => {
|
|
3356
|
-
|
|
3357
|
-
"use strict";
|
|
3358
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_lodash_mergeWith__;
|
|
3359
|
-
|
|
3360
|
-
/***/ }),
|
|
3361
|
-
|
|
3362
3486
|
/***/ "react":
|
|
3363
3487
|
/*!************************!*\
|
|
3364
3488
|
!*** external "react" ***!
|