@limetech/lime-elements 40.5.1 → 40.5.4
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.md +21 -0
- package/dist/cjs/{_baseEach-Bygi-un6.js → _baseForOwn-8jMPwf3X.js} +1 -43
- package/dist/cjs/{_baseIsEqual-CQZKiKbe.js → _baseIsEqual-zzV9DKMv.js} +0 -1
- package/dist/cjs/{_baseIteratee-DDklwtn9.js → _baseIteratee-BIMRm4nq.js} +1 -3
- package/dist/cjs/_baseSet-DykMx7uF.js +92 -0
- package/dist/cjs/_getPrototype-CCLHkBHj.js +8 -0
- package/dist/cjs/{cloneDeep-hE40Q8aw.js → cloneDeep-D2immmwT.js} +16 -160
- package/dist/cjs/{difference-B543MGsY.js → isArrayLikeObject-U2Ddbw4n.js} +5 -93
- package/dist/cjs/{isEqual-Cd9J8a5-.js → isEqual-D3eFkhqd.js} +1 -1
- package/dist/cjs/limel-action-bar_3.cjs.entry.js +1 -1
- package/dist/cjs/limel-chip-set.cjs.entry.js +2 -2
- package/dist/cjs/limel-dialog.cjs.entry.js +2 -2
- package/dist/cjs/limel-file-dropzone_2.cjs.entry.js +45 -6
- package/dist/cjs/limel-file-viewer.cjs.entry.js +510 -70
- package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +73 -11
- package/dist/cjs/limel-form.cjs.entry.js +5985 -3415
- package/dist/cjs/limel-popover_2.cjs.entry.js +1 -1
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +326 -262
- package/dist/cjs/limel-tab-bar.cjs.entry.js +83 -4
- package/dist/cjs/limel-table.cjs.entry.js +598 -199
- package/dist/collection/components/action-bar/action-bar-item/action-bar-item.css +1 -1
- package/dist/collection/components/form/fields/schema-field.js +8 -0
- package/dist/collection/components/form/form.js +1 -0
- package/dist/collection/components/form/form.test-schemas.js +47 -0
- package/dist/collection/components/form/templates/array-field-collapsible-item.js +38 -11
- package/dist/collection/components/popover-surface/popover-surface.css +1 -0
- package/dist/collection/components/table/table.css +1 -2
- package/dist/esm/{_baseEach-lvj-g1Zj.js → _baseForOwn-D5j7fHlv.js} +2 -42
- package/dist/esm/{_baseIsEqual-B6bIeexY.js → _baseIsEqual-CyF4P8uM.js} +2 -2
- package/dist/esm/{_baseIteratee-CEZRuq23.js → _baseIteratee-CpbczHY1.js} +3 -3
- package/dist/esm/_baseSet-Cw2IE6ZF.js +89 -0
- package/dist/esm/_getPrototype-B0kMNv1F.js +6 -0
- package/dist/esm/{_getTag-CMJL-6hk.js → _getTag-BiAaLWvH.js} +1 -1
- package/dist/esm/{cloneDeep-CL7UD3mR.js → cloneDeep-DAbOtbs8.js} +18 -154
- package/dist/esm/{difference-DND5tWiA.js → isArrayLikeObject-CJB8HbtH.js} +7 -91
- package/dist/esm/{isEmpty-DHgukT5k.js → isEmpty-BGVZ12Ea.js} +1 -1
- package/dist/esm/{isEqual-4tbMaaf_.js → isEqual-CE83yS8T.js} +1 -1
- package/dist/esm/limel-action-bar_3.entry.js +1 -1
- package/dist/esm/limel-chip-set.entry.js +3 -3
- package/dist/esm/limel-chip_2.entry.js +2 -2
- package/dist/esm/limel-dialog.entry.js +3 -3
- package/dist/esm/limel-file-dropzone_2.entry.js +45 -6
- package/dist/esm/limel-file-viewer.entry.js +510 -70
- package/dist/esm/limel-flatpickr-adapter.entry.js +69 -7
- package/dist/esm/limel-form.entry.js +5982 -3412
- package/dist/esm/limel-popover_2.entry.js +1 -1
- package/dist/esm/limel-prosemirror-adapter.entry.js +327 -263
- package/dist/esm/limel-tab-bar.entry.js +83 -4
- package/dist/esm/limel-table.entry.js +595 -196
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/p-05afb316.entry.js +1 -0
- package/dist/lime-elements/p-0fba64eb.entry.js +16 -0
- package/dist/lime-elements/p-10594468.entry.js +1 -0
- package/dist/lime-elements/p-19344984.entry.js +13 -0
- package/dist/lime-elements/p-26c5c6b9.entry.js +1 -0
- package/dist/lime-elements/{p-11a96a8c.entry.js → p-36ce4fbc.entry.js} +1 -1
- package/dist/lime-elements/{p-955292eb.entry.js → p-4aae63bd.entry.js} +1 -1
- package/dist/lime-elements/{p-b8c76487.entry.js → p-5d974afa.entry.js} +1 -1
- package/dist/lime-elements/p-B6-3WXAv.js +1 -0
- package/dist/lime-elements/p-BQeIv4aA.js +1 -0
- package/dist/lime-elements/p-BY5NjPj8.js +1 -0
- package/dist/lime-elements/p-COdirXg1.js +1 -0
- package/dist/lime-elements/p-CW2-jhzP.js +1 -0
- package/dist/lime-elements/p-D2VFSWDU.js +1 -0
- package/dist/lime-elements/{p-D4RdItCq.js → p-DK0pjX-Y.js} +1 -1
- package/dist/lime-elements/p-ORUNaKm-.js +1 -0
- package/dist/lime-elements/{p-5b371d6b.entry.js → p-a71f6e87.entry.js} +4 -4
- package/dist/lime-elements/{p-1dd86ad4.entry.js → p-bd7b3f8e.entry.js} +1 -1
- package/dist/lime-elements/p-cef66e53.entry.js +1 -0
- package/dist/lime-elements/{p-02812dc8.entry.js → p-d3bd4b80.entry.js} +1 -1
- package/dist/lime-elements/p-nVemxylR.js +1 -0
- package/dist/lime-elements/p-pk5KIdKH.js +1 -0
- package/dist/types/components/form/form.test-schemas.d.ts +3 -0
- package/dist/types/components/form/templates/array-field-collapsible-item.d.ts +0 -1
- package/package.json +16 -16
- package/dist/cjs/_getAllKeysIn-BJsgUTAt.js +0 -119
- package/dist/cjs/_isIterateeCall-BUGt9SrH.js +0 -73
- package/dist/cjs/pickBy-D-X6S5kg.js +0 -201
- package/dist/esm/_getAllKeysIn-kT3KizYN.js +0 -114
- package/dist/esm/_isIterateeCall-Bb4gUZLK.js +0 -70
- package/dist/esm/pickBy-C4C3CM4m.js +0 -195
- package/dist/lime-elements/p-055b11f7.entry.js +0 -13
- package/dist/lime-elements/p-56bkn1D-.js +0 -1
- package/dist/lime-elements/p-67f02b69.entry.js +0 -1
- package/dist/lime-elements/p-867681aa.entry.js +0 -1
- package/dist/lime-elements/p-9d3437ac.entry.js +0 -16
- package/dist/lime-elements/p-B8yl2MCT.js +0 -1
- package/dist/lime-elements/p-BAR6am-7.js +0 -1
- package/dist/lime-elements/p-BE1Efiuj.js +0 -1
- package/dist/lime-elements/p-BsX7ma3n.js +0 -1
- package/dist/lime-elements/p-CR7u-m0b.js +0 -1
- package/dist/lime-elements/p-CVzgpz9P.js +0 -1
- package/dist/lime-elements/p-D8H5afYg.js +0 -1
- package/dist/lime-elements/p-DtrvybFR.js +0 -1
- package/dist/lime-elements/p-f309ceb8.entry.js +0 -1
- package/dist/lime-elements/p-f3c108c9.entry.js +0 -1
- package/dist/lime-elements/p-mmkVLOjW.js +0 -1
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _baseIteratee = require('./_baseIteratee-DDklwtn9.js');
|
|
4
|
-
var _assignValue = require('./_assignValue-DQh76m39.js');
|
|
5
|
-
var _isIndex = require('./_isIndex-Bu45fvR7.js');
|
|
6
|
-
var isObject = require('./isObject-B6Osvvqp.js');
|
|
7
|
-
var _getAllKeysIn = require('./_getAllKeysIn-BJsgUTAt.js');
|
|
8
|
-
|
|
9
|
-
/** Used for built-in method references. */
|
|
10
|
-
var objectProto = Object.prototype;
|
|
11
|
-
|
|
12
|
-
/** Used to check objects for own properties. */
|
|
13
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* The base implementation of `_.has` without support for deep paths.
|
|
17
|
-
*
|
|
18
|
-
* @private
|
|
19
|
-
* @param {Object} [object] The object to query.
|
|
20
|
-
* @param {Array|string} key The key to check.
|
|
21
|
-
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
|
22
|
-
*/
|
|
23
|
-
function baseHas(object, key) {
|
|
24
|
-
return object != null && hasOwnProperty.call(object, key);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Checks if `path` is a direct property of `object`.
|
|
29
|
-
*
|
|
30
|
-
* @static
|
|
31
|
-
* @since 0.1.0
|
|
32
|
-
* @memberOf _
|
|
33
|
-
* @category Object
|
|
34
|
-
* @param {Object} object The object to query.
|
|
35
|
-
* @param {Array|string} path The path to check.
|
|
36
|
-
* @returns {boolean} Returns `true` if `path` exists, else `false`.
|
|
37
|
-
* @example
|
|
38
|
-
*
|
|
39
|
-
* var object = { 'a': { 'b': 2 } };
|
|
40
|
-
* var other = _.create({ 'a': _.create({ 'b': 2 }) });
|
|
41
|
-
*
|
|
42
|
-
* _.has(object, 'a');
|
|
43
|
-
* // => true
|
|
44
|
-
*
|
|
45
|
-
* _.has(object, 'a.b');
|
|
46
|
-
* // => true
|
|
47
|
-
*
|
|
48
|
-
* _.has(object, ['a', 'b']);
|
|
49
|
-
* // => true
|
|
50
|
-
*
|
|
51
|
-
* _.has(other, 'a');
|
|
52
|
-
* // => false
|
|
53
|
-
*/
|
|
54
|
-
function has(object, path) {
|
|
55
|
-
return object != null && _baseIteratee.hasPath(object, path, baseHas);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/** Error message constants. */
|
|
59
|
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Creates a function that negates the result of the predicate `func`. The
|
|
63
|
-
* `func` predicate is invoked with the `this` binding and arguments of the
|
|
64
|
-
* created function.
|
|
65
|
-
*
|
|
66
|
-
* @static
|
|
67
|
-
* @memberOf _
|
|
68
|
-
* @since 3.0.0
|
|
69
|
-
* @category Function
|
|
70
|
-
* @param {Function} predicate The predicate to negate.
|
|
71
|
-
* @returns {Function} Returns the new negated function.
|
|
72
|
-
* @example
|
|
73
|
-
*
|
|
74
|
-
* function isEven(n) {
|
|
75
|
-
* return n % 2 == 0;
|
|
76
|
-
* }
|
|
77
|
-
*
|
|
78
|
-
* _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
|
|
79
|
-
* // => [1, 3, 5]
|
|
80
|
-
*/
|
|
81
|
-
function negate(predicate) {
|
|
82
|
-
if (typeof predicate != 'function') {
|
|
83
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
84
|
-
}
|
|
85
|
-
return function() {
|
|
86
|
-
var args = arguments;
|
|
87
|
-
switch (args.length) {
|
|
88
|
-
case 0: return !predicate.call(this);
|
|
89
|
-
case 1: return !predicate.call(this, args[0]);
|
|
90
|
-
case 2: return !predicate.call(this, args[0], args[1]);
|
|
91
|
-
case 3: return !predicate.call(this, args[0], args[1], args[2]);
|
|
92
|
-
}
|
|
93
|
-
return !predicate.apply(this, args);
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* The base implementation of `_.set`.
|
|
99
|
-
*
|
|
100
|
-
* @private
|
|
101
|
-
* @param {Object} object The object to modify.
|
|
102
|
-
* @param {Array|string} path The path of the property to set.
|
|
103
|
-
* @param {*} value The value to set.
|
|
104
|
-
* @param {Function} [customizer] The function to customize path creation.
|
|
105
|
-
* @returns {Object} Returns `object`.
|
|
106
|
-
*/
|
|
107
|
-
function baseSet(object, path, value, customizer) {
|
|
108
|
-
if (!isObject.isObject(object)) {
|
|
109
|
-
return object;
|
|
110
|
-
}
|
|
111
|
-
path = _baseIteratee.castPath(path, object);
|
|
112
|
-
|
|
113
|
-
var index = -1,
|
|
114
|
-
length = path.length,
|
|
115
|
-
lastIndex = length - 1,
|
|
116
|
-
nested = object;
|
|
117
|
-
|
|
118
|
-
while (nested != null && ++index < length) {
|
|
119
|
-
var key = _baseIteratee.toKey(path[index]),
|
|
120
|
-
newValue = value;
|
|
121
|
-
|
|
122
|
-
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
|
|
123
|
-
return object;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
if (index != lastIndex) {
|
|
127
|
-
var objValue = nested[key];
|
|
128
|
-
newValue = customizer ? customizer(objValue, key, nested) : undefined;
|
|
129
|
-
if (newValue === undefined) {
|
|
130
|
-
newValue = isObject.isObject(objValue)
|
|
131
|
-
? objValue
|
|
132
|
-
: (_isIndex.isIndex(path[index + 1]) ? [] : {});
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
_assignValue.assignValue(nested, key, newValue);
|
|
136
|
-
nested = nested[key];
|
|
137
|
-
}
|
|
138
|
-
return object;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* The base implementation of `_.pickBy` without support for iteratee shorthands.
|
|
143
|
-
*
|
|
144
|
-
* @private
|
|
145
|
-
* @param {Object} object The source object.
|
|
146
|
-
* @param {string[]} paths The property paths to pick.
|
|
147
|
-
* @param {Function} predicate The function invoked per property.
|
|
148
|
-
* @returns {Object} Returns the new object.
|
|
149
|
-
*/
|
|
150
|
-
function basePickBy(object, paths, predicate) {
|
|
151
|
-
var index = -1,
|
|
152
|
-
length = paths.length,
|
|
153
|
-
result = {};
|
|
154
|
-
|
|
155
|
-
while (++index < length) {
|
|
156
|
-
var path = paths[index],
|
|
157
|
-
value = _baseIteratee.baseGet(object, path);
|
|
158
|
-
|
|
159
|
-
if (predicate(value, path)) {
|
|
160
|
-
baseSet(result, _baseIteratee.castPath(path, object), value);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
return result;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Creates an object composed of the `object` properties `predicate` returns
|
|
168
|
-
* truthy for. The predicate is invoked with two arguments: (value, key).
|
|
169
|
-
*
|
|
170
|
-
* @static
|
|
171
|
-
* @memberOf _
|
|
172
|
-
* @since 4.0.0
|
|
173
|
-
* @category Object
|
|
174
|
-
* @param {Object} object The source object.
|
|
175
|
-
* @param {Function} [predicate=_.identity] The function invoked per property.
|
|
176
|
-
* @returns {Object} Returns the new object.
|
|
177
|
-
* @example
|
|
178
|
-
*
|
|
179
|
-
* var object = { 'a': 1, 'b': '2', 'c': 3 };
|
|
180
|
-
*
|
|
181
|
-
* _.pickBy(object, _.isNumber);
|
|
182
|
-
* // => { 'a': 1, 'c': 3 }
|
|
183
|
-
*/
|
|
184
|
-
function pickBy(object, predicate) {
|
|
185
|
-
if (object == null) {
|
|
186
|
-
return {};
|
|
187
|
-
}
|
|
188
|
-
var props = _baseIteratee.arrayMap(_getAllKeysIn.getAllKeysIn(object), function(prop) {
|
|
189
|
-
return [prop];
|
|
190
|
-
});
|
|
191
|
-
predicate = _baseIteratee.baseIteratee(predicate);
|
|
192
|
-
return basePickBy(object, props, function(value, path) {
|
|
193
|
-
return predicate(value, path[0]);
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
exports.basePickBy = basePickBy;
|
|
198
|
-
exports.baseSet = baseSet;
|
|
199
|
-
exports.has = has;
|
|
200
|
-
exports.negate = negate;
|
|
201
|
-
exports.pickBy = pickBy;
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { h as arrayLikeKeys, i as stubArray, f as arrayPush, g as getSymbols, j as baseGetAllKeys } from './_baseIsEqual-B6bIeexY.js';
|
|
2
|
-
import { d as isPrototype, o as overArg } from './_getTag-CMJL-6hk.js';
|
|
3
|
-
import { i as isObject } from './isObject-BJQylLSL.js';
|
|
4
|
-
import { i as isArrayLike } from './isArrayLike-CyVGB489.js';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* This function is like
|
|
8
|
-
* [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
9
|
-
* except that it includes inherited enumerable properties.
|
|
10
|
-
*
|
|
11
|
-
* @private
|
|
12
|
-
* @param {Object} object The object to query.
|
|
13
|
-
* @returns {Array} Returns the array of property names.
|
|
14
|
-
*/
|
|
15
|
-
function nativeKeysIn(object) {
|
|
16
|
-
var result = [];
|
|
17
|
-
if (object != null) {
|
|
18
|
-
for (var key in Object(object)) {
|
|
19
|
-
result.push(key);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return result;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/** Used for built-in method references. */
|
|
26
|
-
var objectProto = Object.prototype;
|
|
27
|
-
|
|
28
|
-
/** Used to check objects for own properties. */
|
|
29
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
|
|
33
|
-
*
|
|
34
|
-
* @private
|
|
35
|
-
* @param {Object} object The object to query.
|
|
36
|
-
* @returns {Array} Returns the array of property names.
|
|
37
|
-
*/
|
|
38
|
-
function baseKeysIn(object) {
|
|
39
|
-
if (!isObject(object)) {
|
|
40
|
-
return nativeKeysIn(object);
|
|
41
|
-
}
|
|
42
|
-
var isProto = isPrototype(object),
|
|
43
|
-
result = [];
|
|
44
|
-
|
|
45
|
-
for (var key in object) {
|
|
46
|
-
if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
|
|
47
|
-
result.push(key);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return result;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Creates an array of the own and inherited enumerable property names of `object`.
|
|
55
|
-
*
|
|
56
|
-
* **Note:** Non-object values are coerced to objects.
|
|
57
|
-
*
|
|
58
|
-
* @static
|
|
59
|
-
* @memberOf _
|
|
60
|
-
* @since 3.0.0
|
|
61
|
-
* @category Object
|
|
62
|
-
* @param {Object} object The object to query.
|
|
63
|
-
* @returns {Array} Returns the array of property names.
|
|
64
|
-
* @example
|
|
65
|
-
*
|
|
66
|
-
* function Foo() {
|
|
67
|
-
* this.a = 1;
|
|
68
|
-
* this.b = 2;
|
|
69
|
-
* }
|
|
70
|
-
*
|
|
71
|
-
* Foo.prototype.c = 3;
|
|
72
|
-
*
|
|
73
|
-
* _.keysIn(new Foo);
|
|
74
|
-
* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
|
|
75
|
-
*/
|
|
76
|
-
function keysIn(object) {
|
|
77
|
-
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/** Built-in value references. */
|
|
81
|
-
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
82
|
-
|
|
83
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
84
|
-
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Creates an array of the own and inherited enumerable symbols of `object`.
|
|
88
|
-
*
|
|
89
|
-
* @private
|
|
90
|
-
* @param {Object} object The object to query.
|
|
91
|
-
* @returns {Array} Returns the array of symbols.
|
|
92
|
-
*/
|
|
93
|
-
var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
|
|
94
|
-
var result = [];
|
|
95
|
-
while (object) {
|
|
96
|
-
arrayPush(result, getSymbols(object));
|
|
97
|
-
object = getPrototype(object);
|
|
98
|
-
}
|
|
99
|
-
return result;
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Creates an array of own and inherited enumerable property names and
|
|
104
|
-
* symbols of `object`.
|
|
105
|
-
*
|
|
106
|
-
* @private
|
|
107
|
-
* @param {Object} object The object to query.
|
|
108
|
-
* @returns {Array} Returns the array of property names and symbols.
|
|
109
|
-
*/
|
|
110
|
-
function getAllKeysIn(object) {
|
|
111
|
-
return baseGetAllKeys(object, keysIn, getSymbolsIn);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export { getAllKeysIn as a, getSymbolsIn as b, getPrototype as g, keysIn as k };
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { t as toNumber } from './toNumber-D6JYpQI9.js';
|
|
2
|
-
import { e as eq } from './eq-CZ30nDJE.js';
|
|
3
|
-
import { i as isArrayLike } from './isArrayLike-CyVGB489.js';
|
|
4
|
-
import { i as isIndex } from './_isIndex-B--C3qwe.js';
|
|
5
|
-
import { i as isObject } from './isObject-BJQylLSL.js';
|
|
6
|
-
|
|
7
|
-
/** Used as references for various `Number` constants. */
|
|
8
|
-
var INFINITY = 1 / 0,
|
|
9
|
-
MAX_INTEGER = 1.7976931348623157e+308;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Converts `value` to a finite number.
|
|
13
|
-
*
|
|
14
|
-
* @static
|
|
15
|
-
* @memberOf _
|
|
16
|
-
* @since 4.12.0
|
|
17
|
-
* @category Lang
|
|
18
|
-
* @param {*} value The value to convert.
|
|
19
|
-
* @returns {number} Returns the converted number.
|
|
20
|
-
* @example
|
|
21
|
-
*
|
|
22
|
-
* _.toFinite(3.2);
|
|
23
|
-
* // => 3.2
|
|
24
|
-
*
|
|
25
|
-
* _.toFinite(Number.MIN_VALUE);
|
|
26
|
-
* // => 5e-324
|
|
27
|
-
*
|
|
28
|
-
* _.toFinite(Infinity);
|
|
29
|
-
* // => 1.7976931348623157e+308
|
|
30
|
-
*
|
|
31
|
-
* _.toFinite('3.2');
|
|
32
|
-
* // => 3.2
|
|
33
|
-
*/
|
|
34
|
-
function toFinite(value) {
|
|
35
|
-
if (!value) {
|
|
36
|
-
return value === 0 ? value : 0;
|
|
37
|
-
}
|
|
38
|
-
value = toNumber(value);
|
|
39
|
-
if (value === INFINITY || value === -INFINITY) {
|
|
40
|
-
var sign = (value < 0 ? -1 : 1);
|
|
41
|
-
return sign * MAX_INTEGER;
|
|
42
|
-
}
|
|
43
|
-
return value === value ? value : 0;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Checks if the given arguments are from an iteratee call.
|
|
48
|
-
*
|
|
49
|
-
* @private
|
|
50
|
-
* @param {*} value The potential iteratee value argument.
|
|
51
|
-
* @param {*} index The potential iteratee index or key argument.
|
|
52
|
-
* @param {*} object The potential iteratee object argument.
|
|
53
|
-
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
|
|
54
|
-
* else `false`.
|
|
55
|
-
*/
|
|
56
|
-
function isIterateeCall(value, index, object) {
|
|
57
|
-
if (!isObject(object)) {
|
|
58
|
-
return false;
|
|
59
|
-
}
|
|
60
|
-
var type = typeof index;
|
|
61
|
-
if (type == 'number'
|
|
62
|
-
? (isArrayLike(object) && isIndex(index, object.length))
|
|
63
|
-
: (type == 'string' && index in object)
|
|
64
|
-
) {
|
|
65
|
-
return eq(object[index], value);
|
|
66
|
-
}
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export { isIterateeCall as i, toFinite as t };
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
import { f as hasPath, d as castPath, e as toKey, b as baseGet, a as arrayMap, c as baseIteratee } from './_baseIteratee-CEZRuq23.js';
|
|
2
|
-
import { a as assignValue } from './_assignValue-CEFvyZxO.js';
|
|
3
|
-
import { i as isIndex } from './_isIndex-B--C3qwe.js';
|
|
4
|
-
import { i as isObject } from './isObject-BJQylLSL.js';
|
|
5
|
-
import { a as getAllKeysIn } from './_getAllKeysIn-kT3KizYN.js';
|
|
6
|
-
|
|
7
|
-
/** Used for built-in method references. */
|
|
8
|
-
var objectProto = Object.prototype;
|
|
9
|
-
|
|
10
|
-
/** Used to check objects for own properties. */
|
|
11
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* The base implementation of `_.has` without support for deep paths.
|
|
15
|
-
*
|
|
16
|
-
* @private
|
|
17
|
-
* @param {Object} [object] The object to query.
|
|
18
|
-
* @param {Array|string} key The key to check.
|
|
19
|
-
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
|
20
|
-
*/
|
|
21
|
-
function baseHas(object, key) {
|
|
22
|
-
return object != null && hasOwnProperty.call(object, key);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Checks if `path` is a direct property of `object`.
|
|
27
|
-
*
|
|
28
|
-
* @static
|
|
29
|
-
* @since 0.1.0
|
|
30
|
-
* @memberOf _
|
|
31
|
-
* @category Object
|
|
32
|
-
* @param {Object} object The object to query.
|
|
33
|
-
* @param {Array|string} path The path to check.
|
|
34
|
-
* @returns {boolean} Returns `true` if `path` exists, else `false`.
|
|
35
|
-
* @example
|
|
36
|
-
*
|
|
37
|
-
* var object = { 'a': { 'b': 2 } };
|
|
38
|
-
* var other = _.create({ 'a': _.create({ 'b': 2 }) });
|
|
39
|
-
*
|
|
40
|
-
* _.has(object, 'a');
|
|
41
|
-
* // => true
|
|
42
|
-
*
|
|
43
|
-
* _.has(object, 'a.b');
|
|
44
|
-
* // => true
|
|
45
|
-
*
|
|
46
|
-
* _.has(object, ['a', 'b']);
|
|
47
|
-
* // => true
|
|
48
|
-
*
|
|
49
|
-
* _.has(other, 'a');
|
|
50
|
-
* // => false
|
|
51
|
-
*/
|
|
52
|
-
function has(object, path) {
|
|
53
|
-
return object != null && hasPath(object, path, baseHas);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/** Error message constants. */
|
|
57
|
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Creates a function that negates the result of the predicate `func`. The
|
|
61
|
-
* `func` predicate is invoked with the `this` binding and arguments of the
|
|
62
|
-
* created function.
|
|
63
|
-
*
|
|
64
|
-
* @static
|
|
65
|
-
* @memberOf _
|
|
66
|
-
* @since 3.0.0
|
|
67
|
-
* @category Function
|
|
68
|
-
* @param {Function} predicate The predicate to negate.
|
|
69
|
-
* @returns {Function} Returns the new negated function.
|
|
70
|
-
* @example
|
|
71
|
-
*
|
|
72
|
-
* function isEven(n) {
|
|
73
|
-
* return n % 2 == 0;
|
|
74
|
-
* }
|
|
75
|
-
*
|
|
76
|
-
* _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
|
|
77
|
-
* // => [1, 3, 5]
|
|
78
|
-
*/
|
|
79
|
-
function negate(predicate) {
|
|
80
|
-
if (typeof predicate != 'function') {
|
|
81
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
82
|
-
}
|
|
83
|
-
return function() {
|
|
84
|
-
var args = arguments;
|
|
85
|
-
switch (args.length) {
|
|
86
|
-
case 0: return !predicate.call(this);
|
|
87
|
-
case 1: return !predicate.call(this, args[0]);
|
|
88
|
-
case 2: return !predicate.call(this, args[0], args[1]);
|
|
89
|
-
case 3: return !predicate.call(this, args[0], args[1], args[2]);
|
|
90
|
-
}
|
|
91
|
-
return !predicate.apply(this, args);
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* The base implementation of `_.set`.
|
|
97
|
-
*
|
|
98
|
-
* @private
|
|
99
|
-
* @param {Object} object The object to modify.
|
|
100
|
-
* @param {Array|string} path The path of the property to set.
|
|
101
|
-
* @param {*} value The value to set.
|
|
102
|
-
* @param {Function} [customizer] The function to customize path creation.
|
|
103
|
-
* @returns {Object} Returns `object`.
|
|
104
|
-
*/
|
|
105
|
-
function baseSet(object, path, value, customizer) {
|
|
106
|
-
if (!isObject(object)) {
|
|
107
|
-
return object;
|
|
108
|
-
}
|
|
109
|
-
path = castPath(path, object);
|
|
110
|
-
|
|
111
|
-
var index = -1,
|
|
112
|
-
length = path.length,
|
|
113
|
-
lastIndex = length - 1,
|
|
114
|
-
nested = object;
|
|
115
|
-
|
|
116
|
-
while (nested != null && ++index < length) {
|
|
117
|
-
var key = toKey(path[index]),
|
|
118
|
-
newValue = value;
|
|
119
|
-
|
|
120
|
-
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
|
|
121
|
-
return object;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
if (index != lastIndex) {
|
|
125
|
-
var objValue = nested[key];
|
|
126
|
-
newValue = customizer ? customizer(objValue, key, nested) : undefined;
|
|
127
|
-
if (newValue === undefined) {
|
|
128
|
-
newValue = isObject(objValue)
|
|
129
|
-
? objValue
|
|
130
|
-
: (isIndex(path[index + 1]) ? [] : {});
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
assignValue(nested, key, newValue);
|
|
134
|
-
nested = nested[key];
|
|
135
|
-
}
|
|
136
|
-
return object;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* The base implementation of `_.pickBy` without support for iteratee shorthands.
|
|
141
|
-
*
|
|
142
|
-
* @private
|
|
143
|
-
* @param {Object} object The source object.
|
|
144
|
-
* @param {string[]} paths The property paths to pick.
|
|
145
|
-
* @param {Function} predicate The function invoked per property.
|
|
146
|
-
* @returns {Object} Returns the new object.
|
|
147
|
-
*/
|
|
148
|
-
function basePickBy(object, paths, predicate) {
|
|
149
|
-
var index = -1,
|
|
150
|
-
length = paths.length,
|
|
151
|
-
result = {};
|
|
152
|
-
|
|
153
|
-
while (++index < length) {
|
|
154
|
-
var path = paths[index],
|
|
155
|
-
value = baseGet(object, path);
|
|
156
|
-
|
|
157
|
-
if (predicate(value, path)) {
|
|
158
|
-
baseSet(result, castPath(path, object), value);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
return result;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Creates an object composed of the `object` properties `predicate` returns
|
|
166
|
-
* truthy for. The predicate is invoked with two arguments: (value, key).
|
|
167
|
-
*
|
|
168
|
-
* @static
|
|
169
|
-
* @memberOf _
|
|
170
|
-
* @since 4.0.0
|
|
171
|
-
* @category Object
|
|
172
|
-
* @param {Object} object The source object.
|
|
173
|
-
* @param {Function} [predicate=_.identity] The function invoked per property.
|
|
174
|
-
* @returns {Object} Returns the new object.
|
|
175
|
-
* @example
|
|
176
|
-
*
|
|
177
|
-
* var object = { 'a': 1, 'b': '2', 'c': 3 };
|
|
178
|
-
*
|
|
179
|
-
* _.pickBy(object, _.isNumber);
|
|
180
|
-
* // => { 'a': 1, 'c': 3 }
|
|
181
|
-
*/
|
|
182
|
-
function pickBy(object, predicate) {
|
|
183
|
-
if (object == null) {
|
|
184
|
-
return {};
|
|
185
|
-
}
|
|
186
|
-
var props = arrayMap(getAllKeysIn(object), function(prop) {
|
|
187
|
-
return [prop];
|
|
188
|
-
});
|
|
189
|
-
predicate = baseIteratee(predicate);
|
|
190
|
-
return basePickBy(object, props, function(value, path) {
|
|
191
|
-
return predicate(value, path[0]);
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
export { baseSet as a, basePickBy as b, has as h, negate as n, pickBy as p };
|