@fluentui-react-native/framework-base 0.2.1 → 0.3.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/CHANGELOG.json +1 -1
- package/CHANGELOG.md +35 -2
- package/README.md +18 -1
- package/babel.config.js +1 -1
- package/jsx-runtime.js +1 -0
- package/lib/component-patterns/directComponent.d.ts +7 -0
- package/lib/component-patterns/directComponent.d.ts.map +1 -0
- package/lib/component-patterns/directComponent.js +8 -0
- package/lib/component-patterns/directComponent.js.map +1 -0
- package/lib/component-patterns/extract.d.ts +22 -0
- package/lib/component-patterns/extract.d.ts.map +1 -0
- package/lib/component-patterns/extract.js +25 -0
- package/lib/component-patterns/extract.js.map +1 -0
- package/lib/component-patterns/phasedComponent.d.ts +18 -0
- package/lib/component-patterns/phasedComponent.d.ts.map +1 -0
- package/lib/component-patterns/phasedComponent.js +51 -0
- package/lib/component-patterns/phasedComponent.js.map +1 -0
- package/lib/component-patterns/render.d.ts +9 -3
- package/lib/component-patterns/render.d.ts.map +1 -1
- package/lib/component-patterns/render.js +39 -32
- package/lib/component-patterns/render.js.map +1 -1
- package/lib/component-patterns/render.types.d.ts +60 -34
- package/lib/component-patterns/render.types.d.ts.map +1 -1
- package/lib/component-patterns/render.types.js +1 -1
- package/lib/component-patterns/stagedComponent.d.ts +3 -8
- package/lib/component-patterns/stagedComponent.d.ts.map +1 -1
- package/lib/component-patterns/stagedComponent.js +10 -27
- package/lib/component-patterns/stagedComponent.js.map +1 -1
- package/lib/component-patterns/withSlots.d.ts +6 -2
- package/lib/component-patterns/withSlots.d.ts.map +1 -1
- package/lib/component-patterns/withSlots.js +3 -3
- package/lib/component-patterns/withSlots.js.map +1 -1
- package/lib/immutable-merge/Merge.d.ts +6 -3
- package/lib/immutable-merge/Merge.js +79 -83
- package/lib/immutable-merge/Merge.js.map +1 -1
- package/lib/immutable-merge/Merge.test.d.ts +1 -1
- package/lib/immutable-merge/Merge.test.js +231 -219
- package/lib/immutable-merge/Merge.test.js.map +1 -1
- package/lib/index.d.ts +33 -5
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +13 -4
- package/lib/index.js.map +1 -1
- package/lib/jsx-namespace.d.ts +65 -0
- package/lib/jsx-namespace.d.ts.map +1 -0
- package/lib/jsx-namespace.js +2 -0
- package/lib/jsx-namespace.js.map +1 -0
- package/lib/jsx-runtime.d.ts +6 -4
- package/lib/jsx-runtime.d.ts.map +1 -1
- package/lib/jsx-runtime.js +9 -7
- package/lib/jsx-runtime.js.map +1 -1
- package/lib/memo-cache/getCacheEntry.d.ts +13 -13
- package/lib/memo-cache/getCacheEntry.js +20 -22
- package/lib/memo-cache/getCacheEntry.js.map +1 -1
- package/lib/memo-cache/getCacheEntry.test.d.ts +1 -1
- package/lib/memo-cache/getCacheEntry.test.js +90 -90
- package/lib/memo-cache/getCacheEntry.test.js.map +1 -1
- package/lib/memo-cache/getMemoCache.d.ts +1 -1
- package/lib/memo-cache/getMemoCache.js +11 -11
- package/lib/memo-cache/getMemoCache.js.map +1 -1
- package/lib/memo-cache/getMemoCache.test.d.ts +1 -1
- package/lib/memo-cache/getMemoCache.test.js +73 -73
- package/lib/memo-cache/getMemoCache.test.js.map +1 -1
- package/lib/memo-cache/memoize.d.ts +1 -1
- package/lib/memo-cache/memoize.js +9 -9
- package/lib/memo-cache/memoize.js.map +1 -1
- package/lib/memo-cache/memoize.test.d.ts +1 -1
- package/lib/memo-cache/memoize.test.js +36 -38
- package/lib/memo-cache/memoize.test.js.map +1 -1
- package/lib/merge-props/index.d.ts +1 -1
- package/lib/merge-props/index.js +1 -1
- package/lib/merge-props/mergeProps.d.ts +1 -1
- package/lib/merge-props/mergeProps.js +4 -4
- package/lib/merge-props/mergeProps.js.map +1 -1
- package/lib/merge-props/mergeStyles.d.ts +33 -4
- package/lib/merge-props/mergeStyles.d.ts.map +1 -1
- package/lib/merge-props/mergeStyles.js +16 -17
- package/lib/merge-props/mergeStyles.js.map +1 -1
- package/lib/merge-props/mergeStyles.test.d.ts +1 -1
- package/lib/merge-props/mergeStyles.test.js +75 -75
- package/lib/merge-props/mergeStyles.test.js.map +1 -1
- package/lib/merge-props/mergeStyles.types.d.ts +4 -4
- package/lib/merge-props/mergeStyles.types.d.ts.map +1 -1
- package/lib/merge-props/mergeStyles.types.js +1 -1
- package/lib/utilities/filterProps.d.ts +3 -0
- package/lib/utilities/filterProps.d.ts.map +1 -0
- package/lib/utilities/filterProps.js +12 -0
- package/lib/utilities/filterProps.js.map +1 -0
- package/lib-commonjs/component-patterns/directComponent.d.ts +7 -0
- package/lib-commonjs/component-patterns/directComponent.d.ts.map +1 -0
- package/lib-commonjs/component-patterns/directComponent.js +11 -0
- package/lib-commonjs/component-patterns/directComponent.js.map +1 -0
- package/lib-commonjs/component-patterns/extract.d.ts +22 -0
- package/lib-commonjs/component-patterns/extract.d.ts.map +1 -0
- package/lib-commonjs/component-patterns/extract.js +30 -0
- package/lib-commonjs/component-patterns/extract.js.map +1 -0
- package/lib-commonjs/component-patterns/phasedComponent.d.ts +18 -0
- package/lib-commonjs/component-patterns/phasedComponent.d.ts.map +1 -0
- package/lib-commonjs/component-patterns/phasedComponent.js +60 -0
- package/lib-commonjs/component-patterns/phasedComponent.js.map +1 -0
- package/lib-commonjs/component-patterns/render.d.ts +9 -3
- package/lib-commonjs/component-patterns/render.d.ts.map +1 -1
- package/lib-commonjs/component-patterns/render.js +101 -64
- package/lib-commonjs/component-patterns/render.js.map +1 -1
- package/lib-commonjs/component-patterns/render.types.d.ts +60 -34
- package/lib-commonjs/component-patterns/render.types.d.ts.map +1 -1
- package/lib-commonjs/component-patterns/render.types.js +3 -3
- package/lib-commonjs/component-patterns/stagedComponent.d.ts +3 -8
- package/lib-commonjs/component-patterns/stagedComponent.d.ts.map +1 -1
- package/lib-commonjs/component-patterns/stagedComponent.js +64 -56
- package/lib-commonjs/component-patterns/stagedComponent.js.map +1 -1
- package/lib-commonjs/component-patterns/withSlots.d.ts +6 -2
- package/lib-commonjs/component-patterns/withSlots.d.ts.map +1 -1
- package/lib-commonjs/component-patterns/withSlots.js +7 -8
- package/lib-commonjs/component-patterns/withSlots.js.map +1 -1
- package/lib-commonjs/immutable-merge/Merge.d.ts +6 -3
- package/lib-commonjs/immutable-merge/Merge.js +85 -90
- package/lib-commonjs/immutable-merge/Merge.js.map +1 -1
- package/lib-commonjs/immutable-merge/Merge.test.d.ts +1 -1
- package/lib-commonjs/immutable-merge/Merge.test.js +234 -222
- package/lib-commonjs/immutable-merge/Merge.test.js.map +1 -1
- package/lib-commonjs/index.d.ts +33 -5
- package/lib-commonjs/index.d.ts.map +1 -1
- package/lib-commonjs/index.js +184 -31
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/jsx-namespace.d.ts +65 -0
- package/lib-commonjs/jsx-namespace.d.ts.map +1 -0
- package/lib-commonjs/jsx-namespace.js +3 -0
- package/lib-commonjs/jsx-namespace.js.map +1 -0
- package/lib-commonjs/jsx-runtime.d.ts +6 -4
- package/lib-commonjs/jsx-runtime.d.ts.map +1 -1
- package/lib-commonjs/jsx-runtime.js +69 -34
- package/lib-commonjs/jsx-runtime.js.map +1 -1
- package/lib-commonjs/memo-cache/getCacheEntry.d.ts +13 -13
- package/lib-commonjs/memo-cache/getCacheEntry.js +23 -26
- package/lib-commonjs/memo-cache/getCacheEntry.js.map +1 -1
- package/lib-commonjs/memo-cache/getCacheEntry.test.d.ts +1 -1
- package/lib-commonjs/memo-cache/getCacheEntry.test.js +93 -93
- package/lib-commonjs/memo-cache/getCacheEntry.test.js.map +1 -1
- package/lib-commonjs/memo-cache/getMemoCache.d.ts +1 -1
- package/lib-commonjs/memo-cache/getMemoCache.js +16 -17
- package/lib-commonjs/memo-cache/getMemoCache.js.map +1 -1
- package/lib-commonjs/memo-cache/getMemoCache.test.d.ts +1 -1
- package/lib-commonjs/memo-cache/getMemoCache.test.js +76 -76
- package/lib-commonjs/memo-cache/getMemoCache.test.js.map +1 -1
- package/lib-commonjs/memo-cache/memoize.d.ts +1 -1
- package/lib-commonjs/memo-cache/memoize.js +13 -14
- package/lib-commonjs/memo-cache/memoize.js.map +1 -1
- package/lib-commonjs/memo-cache/memoize.test.d.ts +1 -1
- package/lib-commonjs/memo-cache/memoize.test.js +39 -41
- package/lib-commonjs/memo-cache/memoize.test.js.map +1 -1
- package/lib-commonjs/merge-props/index.d.ts +1 -1
- package/lib-commonjs/merge-props/index.js +17 -7
- package/lib-commonjs/merge-props/index.js.map +1 -1
- package/lib-commonjs/merge-props/mergeProps.d.ts +1 -1
- package/lib-commonjs/merge-props/mergeProps.js +9 -10
- package/lib-commonjs/merge-props/mergeProps.js.map +1 -1
- package/lib-commonjs/merge-props/mergeStyles.d.ts +33 -4
- package/lib-commonjs/merge-props/mergeStyles.d.ts.map +1 -1
- package/lib-commonjs/merge-props/mergeStyles.js +23 -25
- package/lib-commonjs/merge-props/mergeStyles.js.map +1 -1
- package/lib-commonjs/merge-props/mergeStyles.test.d.ts +1 -1
- package/lib-commonjs/merge-props/mergeStyles.test.js +78 -78
- package/lib-commonjs/merge-props/mergeStyles.test.js.map +1 -1
- package/lib-commonjs/merge-props/mergeStyles.types.d.ts +4 -4
- package/lib-commonjs/merge-props/mergeStyles.types.d.ts.map +1 -1
- package/lib-commonjs/merge-props/mergeStyles.types.js +3 -3
- package/lib-commonjs/utilities/filterProps.d.ts +3 -0
- package/lib-commonjs/utilities/filterProps.d.ts.map +1 -0
- package/lib-commonjs/utilities/filterProps.js +15 -0
- package/lib-commonjs/utilities/filterProps.js.map +1 -0
- package/package.json +48 -26
- package/src/component-patterns/README.md +53 -16
- package/src/component-patterns/directComponent.ts +9 -0
- package/src/component-patterns/extract.ts +32 -0
- package/src/component-patterns/phasedComponent.ts +54 -0
- package/src/component-patterns/render.ts +21 -13
- package/src/component-patterns/render.types.ts +55 -30
- package/src/component-patterns/stagedComponent.ts +24 -0
- package/src/immutable-merge/Merge.test.ts +5 -1
- package/src/index.ts +27 -7
- package/src/jsx-namespace.ts +83 -0
- package/src/jsx-runtime.ts +8 -4
- package/src/memo-cache/README.md +1 -1
- package/src/merge-props/mergeStyles.ts +52 -4
- package/src/merge-props/mergeStyles.types.ts +2 -2
- package/src/utilities/filterProps.ts +14 -0
- package/src/component-patterns/stagedComponent.tsx +0 -45
|
@@ -1,24 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
3
|
-
exports.
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
|
+
exports.filterToObjects = filterToObjects;
|
|
4
|
+
exports.immutableMerge = immutableMerge;
|
|
5
|
+
exports.immutableMergeCore = immutableMergeCore;
|
|
6
|
+
exports.processImmutable = processImmutable;
|
|
4
7
|
/**
|
|
5
8
|
* built in handlers for the module
|
|
6
9
|
*/
|
|
7
10
|
const _builtinHandlers = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
appendArray: (...objs) => {
|
|
12
|
+
return [].concat(...objs);
|
|
13
|
+
},
|
|
11
14
|
};
|
|
12
15
|
/**
|
|
13
16
|
* This processes the various type options for merge core and turns them into a MergeConfig
|
|
14
17
|
* @param options - options passed into immutableMergeCore
|
|
15
18
|
*/
|
|
16
19
|
function normalizeOptions(options) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
return typeof options === 'boolean'
|
|
21
|
+
? [{ object: options }, options]
|
|
22
|
+
: typeof options === 'number'
|
|
23
|
+
? [{ object: options >= 0 ? options : true }, options !== 0]
|
|
24
|
+
: [options, true];
|
|
22
25
|
}
|
|
23
26
|
/**
|
|
24
27
|
* Provide a more sensible type result that expands upon the built in typeof operator
|
|
@@ -26,41 +29,38 @@ function normalizeOptions(options) {
|
|
|
26
29
|
* @param val - value to check type
|
|
27
30
|
*/
|
|
28
31
|
function getEntityType(val) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
32
|
+
switch (typeof val) {
|
|
33
|
+
case 'object':
|
|
34
|
+
if (val === null) {
|
|
35
|
+
return 'null';
|
|
36
|
+
} else if (Array.isArray(val)) {
|
|
37
|
+
return 'array';
|
|
38
|
+
}
|
|
39
|
+
return 'object';
|
|
40
|
+
default:
|
|
41
|
+
return typeof val;
|
|
42
|
+
}
|
|
41
43
|
}
|
|
42
44
|
/** resolve custom handlers if they are applicable */
|
|
43
45
|
function resolveIfHandler(option) {
|
|
44
|
-
|
|
46
|
+
return typeof option === 'function' ? option : typeof option === 'string' ? _builtinHandlers[option] : undefined;
|
|
45
47
|
}
|
|
46
48
|
/** pass array configurations down, this allows for saying all arrays should be appended rather than replaced */
|
|
47
49
|
function getTypesMixin(config) {
|
|
48
|
-
|
|
50
|
+
return config.array ? { array: config.array } : {};
|
|
49
51
|
}
|
|
50
52
|
/** resolve the object behaviors for configuration */
|
|
51
53
|
function resolveForObject(option, mixin) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return option;
|
|
63
|
-
}
|
|
54
|
+
if (typeof option === 'boolean') {
|
|
55
|
+
// booleans won't recurse if false, otherwise recurse infinitely
|
|
56
|
+
return option ? { object: option, ...mixin } : mixin;
|
|
57
|
+
} else if (typeof option === 'number') {
|
|
58
|
+
// numbers get decremented or set to false if we've reached zero. Negative values will have been converted to boolean true
|
|
59
|
+
return option === 0 ? mixin : { object: option - 1, ...mixin };
|
|
60
|
+
} else {
|
|
61
|
+
// otherwise it is an object type so just pass the child object through
|
|
62
|
+
return option;
|
|
63
|
+
}
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
66
|
* Figure out the handler for this property.
|
|
@@ -68,17 +68,17 @@ function resolveForObject(option, mixin) {
|
|
|
68
68
|
* in the undefined case, this key will be left as-is
|
|
69
69
|
*/
|
|
70
70
|
function getHandlerForPropertyOfType(config, propKey, propType) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
71
|
+
let result = undefined;
|
|
72
|
+
const option = config[propKey] !== undefined ? config[propKey] : config[propType] !== undefined ? config[propType] : undefined;
|
|
73
|
+
if (option !== undefined) {
|
|
74
|
+
// try to resolve the option as a handler, either function or built-in first. This is the only option that is valid for non-object types.
|
|
75
|
+
result = resolveIfHandler(option);
|
|
76
|
+
// if it is an object then resolve boolean, number or config types
|
|
77
|
+
if (result === undefined && propType === 'object') {
|
|
78
|
+
result = resolveForObject(option, getTypesMixin(config));
|
|
80
79
|
}
|
|
81
|
-
|
|
80
|
+
}
|
|
81
|
+
return result;
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
84
|
* Assign properties of source objects to a new target object. This is just a type wrapper around Object.assign
|
|
@@ -86,7 +86,7 @@ function getHandlerForPropertyOfType(config, propKey, propType) {
|
|
|
86
86
|
* @returns the result of object assign on the objects, typed to T
|
|
87
87
|
*/
|
|
88
88
|
function assignToNewObject(...objs) {
|
|
89
|
-
|
|
89
|
+
return Object.assign({}, ...objs);
|
|
90
90
|
}
|
|
91
91
|
/**
|
|
92
92
|
* Filter a set of unknown values to only include those that extend ObjectBase
|
|
@@ -94,9 +94,8 @@ function assignToNewObject(...objs) {
|
|
|
94
94
|
* @returns the filtered set of values
|
|
95
95
|
*/
|
|
96
96
|
function filterToObjects(values) {
|
|
97
|
-
|
|
97
|
+
return values.filter((v) => v && getEntityType(v) === 'object' && Object.getOwnPropertyNames(v).length > 0);
|
|
98
98
|
}
|
|
99
|
-
exports.filterToObjects = filterToObjects;
|
|
100
99
|
/**
|
|
101
100
|
* This will merge two or more objects together using an immutable style merge pattern. If there is only one object or
|
|
102
101
|
* if there is only one object with values, that object itself will be returned, with two or more objects the keys within will
|
|
@@ -111,42 +110,41 @@ exports.filterToObjects = filterToObjects;
|
|
|
111
110
|
* @param objs - an array of objects to merge together
|
|
112
111
|
*/
|
|
113
112
|
function immutableMergeWorker(mergeOptions, singleMode, ...objs) {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
result[key] = updatedVal;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
// delete undefined keys from the object, otherwise there is no easy way to delete keys
|
|
141
|
-
if (!processSingle && result[key] === undefined) {
|
|
142
|
-
delete result[key];
|
|
143
|
-
}
|
|
113
|
+
const setToMerge = filterToObjects(objs);
|
|
114
|
+
const [options, mightRecurse] = normalizeOptions(mergeOptions);
|
|
115
|
+
const processSingle = singleMode && setToMerge.length === 1;
|
|
116
|
+
// there is work to do if there is more than one object to merge or if we are processing single objects
|
|
117
|
+
if (setToMerge.length > 1 || (processSingle && setToMerge.length === 1)) {
|
|
118
|
+
// now assign everything to get the normal property precedence (and merge all the keys)
|
|
119
|
+
let result = processSingle ? undefined : assignToNewObject(...setToMerge);
|
|
120
|
+
const processSet = result || setToMerge[0];
|
|
121
|
+
for (const key in processSet) {
|
|
122
|
+
if (processSet.hasOwnProperty(key)) {
|
|
123
|
+
// only process if there is potential work to do
|
|
124
|
+
if (mightRecurse) {
|
|
125
|
+
const originalVal = processSet[key];
|
|
126
|
+
const entityType = getEntityType(originalVal);
|
|
127
|
+
const handler = getHandlerForPropertyOfType(options, key, entityType);
|
|
128
|
+
if (handler !== undefined) {
|
|
129
|
+
const values = setToMerge.map((set) => set[key]).filter((v) => v !== undefined);
|
|
130
|
+
const updatedVal =
|
|
131
|
+
typeof handler === 'function' ? handler(...values) : immutableMergeWorker(handler, singleMode, ...filterToObjects(values));
|
|
132
|
+
if (updatedVal !== originalVal) {
|
|
133
|
+
result = result || assignToNewObject(...setToMerge);
|
|
134
|
+
result[key] = updatedVal;
|
|
144
135
|
}
|
|
136
|
+
}
|
|
145
137
|
}
|
|
146
|
-
//
|
|
147
|
-
|
|
138
|
+
// delete undefined keys from the object, otherwise there is no easy way to delete keys
|
|
139
|
+
if (!processSingle && result[key] === undefined) {
|
|
140
|
+
delete result[key];
|
|
141
|
+
}
|
|
142
|
+
}
|
|
148
143
|
}
|
|
149
|
-
return
|
|
144
|
+
// in the single processing case return the original if nothing changed, otherwise return result
|
|
145
|
+
return result || processSet;
|
|
146
|
+
}
|
|
147
|
+
return setToMerge.length > 0 ? setToMerge[0] : undefined;
|
|
150
148
|
}
|
|
151
149
|
/**
|
|
152
150
|
* Recursively immutable merge sets of objects infinitely deep. This behaves like a standard deep merge with arrays replacing
|
|
@@ -155,9 +153,8 @@ function immutableMergeWorker(mergeOptions, singleMode, ...objs) {
|
|
|
155
153
|
* @param objs - variable input array of typed objects to merge
|
|
156
154
|
*/
|
|
157
155
|
function immutableMerge(...objs) {
|
|
158
|
-
|
|
156
|
+
return immutableMergeWorker(true, false, ...objs);
|
|
159
157
|
}
|
|
160
|
-
exports.immutableMerge = immutableMerge;
|
|
161
158
|
/**
|
|
162
159
|
* Version of immutable merge that can be configured to behave in a variety of manners. See the documentation for details.
|
|
163
160
|
*
|
|
@@ -165,9 +162,8 @@ exports.immutableMerge = immutableMerge;
|
|
|
165
162
|
* @param objs - set of objects to merge together
|
|
166
163
|
*/
|
|
167
164
|
function immutableMergeCore(options, ...objs) {
|
|
168
|
-
|
|
165
|
+
return immutableMergeWorker(options, false, ...objs);
|
|
169
166
|
}
|
|
170
|
-
exports.immutableMergeCore = immutableMergeCore;
|
|
171
167
|
/**
|
|
172
168
|
* Process one or more immutable objects ensuring that handlers are called on every entry that applies. If a single object
|
|
173
169
|
* is passed in and no changes are made, that object will be returned. If updates happen from the handlers it will return the
|
|
@@ -180,7 +176,6 @@ exports.immutableMergeCore = immutableMergeCore;
|
|
|
180
176
|
* @param objs - one or more objects to process. If multiple objects are passed they will be merged
|
|
181
177
|
*/
|
|
182
178
|
function processImmutable(options, ...objs) {
|
|
183
|
-
|
|
179
|
+
return immutableMergeWorker(options, true, ...objs);
|
|
184
180
|
}
|
|
185
|
-
|
|
186
|
-
//# sourceMappingURL=Merge.js.map
|
|
181
|
+
//# sourceMappingURL=Merge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Merge.js","sourceRoot":"","sources":["../../src/immutable-merge/Merge.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Merge.js","sourceRoot":"","sources":["../../src/immutable-merge/Merge.ts"],"names":[],"mappings":";;;;;;AAqDA;;GAEG;AACH,MAAM,gBAAgB,GAAgE;IACpF,WAAW,EAAE,CAAC,GAAG,IAAW,EAAE,EAAE,CAAC;QAC/B,OAAO,EAAE,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;IAAA,CAC3B;CACF,CAAC;AAEF;;;GAGG;AACH,SAAS,gBAAgB,CAAC,OAAuC,EAA2B;IAC1F,OAAO,OAAO,OAAO,KAAK,SAAS;QACjC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,OAAO,CAAC;QAChC,CAAC,CAAC,OAAO,OAAO,KAAK,QAAQ;YAC7B,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,OAAO,KAAK,CAAC,CAAC;YAC5D,CAAC,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAAA,CACrB;AAED;;;;GAIG;AACH,SAAS,aAAa,CAAC,GAAY,E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