@limetech/lime-crm-building-blocks 1.54.6 → 1.55.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.
Files changed (91) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/{_Map-7b4a3fd8.js → _Map-ea5de08f.js} +167 -6
  3. package/dist/cjs/{get-a5ed6f0a.js → _MapCache-e45fbb5e.js} +21 -305
  4. package/dist/cjs/_Uint8Array-a560184a.js +365 -0
  5. package/dist/cjs/{_getTag-9b35d8fd.js → _getTag-232d2c59.js} +15 -14
  6. package/dist/cjs/get-f2e2fe51.js +313 -0
  7. package/dist/cjs/{keycodes-a6c36f6d.js → keycodes-4c91c567.js} +4 -2
  8. package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
  9. package/dist/cjs/limebb-browser.cjs.entry.js +1 -1
  10. package/dist/cjs/limebb-component-config.cjs.entry.js +3 -4
  11. package/dist/cjs/limebb-empty-state.cjs.entry.js +45 -0
  12. package/dist/cjs/{limebb-empty-state_2.cjs.entry.js → limebb-feed-timeline-item.cjs.entry.js} +0 -39
  13. package/dist/cjs/limebb-info-tile.cjs.entry.js +2 -3
  14. package/dist/cjs/limebb-locale-picker.cjs.entry.js +29 -377
  15. package/dist/cjs/limebb-notification-item.cjs.entry.js +6 -3
  16. package/dist/cjs/limebb-text-editor-picker.cjs.entry.js +28 -14
  17. package/dist/cjs/limebb-text-editor.cjs.entry.js +863 -46
  18. package/dist/cjs/loader.cjs.js +1 -1
  19. package/dist/collection/components/notification-list/notification-item/notification-item.js +6 -3
  20. package/dist/collection/components/text-editor/text-editor-picker.css +2 -2
  21. package/dist/collection/components/text-editor/text-editor-picker.js +52 -27
  22. package/dist/collection/components/text-editor/text-editor.js +90 -40
  23. package/dist/collection/components/text-editor/utils/searcher-utils.js +12 -1
  24. package/dist/components/_Map.js +157 -2
  25. package/dist/{esm/get-bb007d5d.js → components/_MapCache.js} +21 -299
  26. package/dist/components/_Uint8Array.js +353 -0
  27. package/dist/components/_getTag.js +2 -3
  28. package/dist/components/get.js +3 -432
  29. package/dist/components/keycodes.js +3 -2
  30. package/dist/components/limebb-locale-picker.js +5 -353
  31. package/dist/components/limebb-text-editor.js +868 -43
  32. package/dist/components/notification-item.js +6 -3
  33. package/dist/components/text-editor-picker.js +35 -14
  34. package/dist/esm/{_Map-62ad6821.js → _Map-1b6f37f5.js} +157 -2
  35. package/dist/esm/_MapCache-64d079c4.js +456 -0
  36. package/dist/esm/_Uint8Array-d4ca8cd7.js +353 -0
  37. package/dist/esm/{_getTag-86f08bee.js → _getTag-37e499e8.js} +2 -3
  38. package/dist/esm/get-cd62268e.js +305 -0
  39. package/dist/esm/keycodes-5ad45042.js +7 -0
  40. package/dist/esm/lime-crm-building-blocks.js +1 -1
  41. package/dist/esm/limebb-browser.entry.js +1 -1
  42. package/dist/esm/limebb-component-config.entry.js +3 -4
  43. package/dist/esm/limebb-empty-state.entry.js +41 -0
  44. package/dist/esm/{limebb-empty-state_2.entry.js → limebb-feed-timeline-item.entry.js} +1 -39
  45. package/dist/esm/limebb-info-tile.entry.js +2 -3
  46. package/dist/esm/limebb-locale-picker.entry.js +5 -353
  47. package/dist/esm/limebb-notification-item.entry.js +6 -3
  48. package/dist/esm/limebb-text-editor-picker.entry.js +29 -15
  49. package/dist/esm/limebb-text-editor.entry.js +858 -41
  50. package/dist/esm/loader.js +1 -1
  51. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  52. package/dist/lime-crm-building-blocks/p-0086e532.js +1 -0
  53. package/dist/lime-crm-building-blocks/p-1acd64f5.entry.js +1 -0
  54. package/dist/lime-crm-building-blocks/p-28e4e638.js +1 -0
  55. package/dist/lime-crm-building-blocks/p-39b80f7a.entry.js +1 -0
  56. package/dist/lime-crm-building-blocks/p-5e1860a3.entry.js +1 -0
  57. package/dist/lime-crm-building-blocks/p-949f5146.entry.js +1 -0
  58. package/dist/lime-crm-building-blocks/p-a3aeec8e.entry.js +1 -0
  59. package/dist/lime-crm-building-blocks/p-abdc6601.entry.js +1 -0
  60. package/dist/lime-crm-building-blocks/p-b4e15af7.entry.js +1 -0
  61. package/dist/lime-crm-building-blocks/p-babffb23.js +1 -0
  62. package/dist/lime-crm-building-blocks/{p-8c471dcf.entry.js → p-c4e176ca.entry.js} +1 -1
  63. package/dist/lime-crm-building-blocks/p-dc97e968.entry.js +1 -0
  64. package/dist/lime-crm-building-blocks/p-e7281662.js +1 -0
  65. package/dist/lime-crm-building-blocks/p-ef494ab2.js +1 -0
  66. package/dist/lime-crm-building-blocks/p-f340c7e6.js +1 -0
  67. package/dist/types/components/text-editor/text-editor-picker.d.ts +11 -7
  68. package/dist/types/components/text-editor/text-editor.d.ts +14 -5
  69. package/dist/types/components/text-editor/utils/searcher-utils.d.ts +4 -0
  70. package/dist/types/components.d.ts +14 -7
  71. package/package.json +2 -2
  72. package/dist/cjs/isObject-437a6bfd.js +0 -165
  73. package/dist/cjs/isSymbol-26e4a497.js +0 -30
  74. package/dist/components/isObject.js +0 -158
  75. package/dist/components/isSymbol.js +0 -28
  76. package/dist/esm/isObject-895b7b45.js +0 -158
  77. package/dist/esm/isSymbol-d109757f.js +0 -28
  78. package/dist/esm/keycodes-7f4bac6f.js +0 -6
  79. package/dist/lime-crm-building-blocks/p-0ec76fa4.js +0 -1
  80. package/dist/lime-crm-building-blocks/p-1953001c.entry.js +0 -1
  81. package/dist/lime-crm-building-blocks/p-19f5ce69.entry.js +0 -1
  82. package/dist/lime-crm-building-blocks/p-1f838edf.js +0 -1
  83. package/dist/lime-crm-building-blocks/p-214188d4.js +0 -1
  84. package/dist/lime-crm-building-blocks/p-3b38867a.entry.js +0 -1
  85. package/dist/lime-crm-building-blocks/p-43810f23.entry.js +0 -1
  86. package/dist/lime-crm-building-blocks/p-90eaffe7.js +0 -1
  87. package/dist/lime-crm-building-blocks/p-9267b7bc.js +0 -1
  88. package/dist/lime-crm-building-blocks/p-931bfc20.entry.js +0 -1
  89. package/dist/lime-crm-building-blocks/p-9c2a8a0e.entry.js +0 -1
  90. package/dist/lime-crm-building-blocks/p-a5c21e07.entry.js +0 -1
  91. package/dist/lime-crm-building-blocks/p-d194d40c.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ## [1.55.0](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.54.6...v1.55.0) (2024-12-09)
2
+
3
+ ### Features
4
+
5
+
6
+ * **text editor mentions:** add searcher item update functions ([329ae9a](https://github.com/Lundalogik/lime-crm-building-blocks/commit/329ae9a5c76920d366169c2d88fcbd4b57b4eae8))
7
+ * **text editor mentions:** handle keyboard navigation and search ([54dd929](https://github.com/Lundalogik/lime-crm-building-blocks/commit/54dd929a320014d999bfa8734e5e59602c32fbaf))
8
+ * **text editor:** use interact event and limel-menu-list ([99db713](https://github.com/Lundalogik/lime-crm-building-blocks/commit/99db7139fa67bbf61815086884cf5d13120f0f27))
9
+ ### Bug Fixes
10
+
11
+
12
+ * **text editor:** remove check for isItem as we don't support list separators ([42a99ae](https://github.com/Lundalogik/lime-crm-building-blocks/commit/42a99ae7fa3c59a915c7c31b5316f1792685e8d2))
13
+
1
14
  ## [1.54.6](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.54.5...v1.54.6) (2024-12-06)
2
15
 
3
16
  ### Bug Fixes
@@ -1,6 +1,131 @@
1
1
  'use strict';
2
2
 
3
- const isObject = require('./isObject-437a6bfd.js');
3
+ /** Detect free variable `global` from Node.js. */
4
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
5
+
6
+ /** Detect free variable `self`. */
7
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
8
+
9
+ /** Used as a reference to the global object. */
10
+ var root = freeGlobal || freeSelf || Function('return this')();
11
+
12
+ /** Built-in value references. */
13
+ var Symbol = root.Symbol;
14
+
15
+ /** Used for built-in method references. */
16
+ var objectProto$2 = Object.prototype;
17
+
18
+ /** Used to check objects for own properties. */
19
+ var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
20
+
21
+ /**
22
+ * Used to resolve the
23
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
24
+ * of values.
25
+ */
26
+ var nativeObjectToString$1 = objectProto$2.toString;
27
+
28
+ /** Built-in value references. */
29
+ var symToStringTag$1 = Symbol ? Symbol.toStringTag : undefined;
30
+
31
+ /**
32
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
33
+ *
34
+ * @private
35
+ * @param {*} value The value to query.
36
+ * @returns {string} Returns the raw `toStringTag`.
37
+ */
38
+ function getRawTag(value) {
39
+ var isOwn = hasOwnProperty$1.call(value, symToStringTag$1),
40
+ tag = value[symToStringTag$1];
41
+
42
+ try {
43
+ value[symToStringTag$1] = undefined;
44
+ var unmasked = true;
45
+ } catch (e) {}
46
+
47
+ var result = nativeObjectToString$1.call(value);
48
+ if (unmasked) {
49
+ if (isOwn) {
50
+ value[symToStringTag$1] = tag;
51
+ } else {
52
+ delete value[symToStringTag$1];
53
+ }
54
+ }
55
+ return result;
56
+ }
57
+
58
+ /** Used for built-in method references. */
59
+ var objectProto$1 = Object.prototype;
60
+
61
+ /**
62
+ * Used to resolve the
63
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
64
+ * of values.
65
+ */
66
+ var nativeObjectToString = objectProto$1.toString;
67
+
68
+ /**
69
+ * Converts `value` to a string using `Object.prototype.toString`.
70
+ *
71
+ * @private
72
+ * @param {*} value The value to convert.
73
+ * @returns {string} Returns the converted string.
74
+ */
75
+ function objectToString(value) {
76
+ return nativeObjectToString.call(value);
77
+ }
78
+
79
+ /** `Object#toString` result references. */
80
+ var nullTag = '[object Null]',
81
+ undefinedTag = '[object Undefined]';
82
+
83
+ /** Built-in value references. */
84
+ var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
85
+
86
+ /**
87
+ * The base implementation of `getTag` without fallbacks for buggy environments.
88
+ *
89
+ * @private
90
+ * @param {*} value The value to query.
91
+ * @returns {string} Returns the `toStringTag`.
92
+ */
93
+ function baseGetTag(value) {
94
+ if (value == null) {
95
+ return value === undefined ? undefinedTag : nullTag;
96
+ }
97
+ return (symToStringTag && symToStringTag in Object(value))
98
+ ? getRawTag(value)
99
+ : objectToString(value);
100
+ }
101
+
102
+ /**
103
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
104
+ * and has a `typeof` result of "object".
105
+ *
106
+ * @static
107
+ * @memberOf _
108
+ * @since 4.0.0
109
+ * @category Lang
110
+ * @param {*} value The value to check.
111
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
112
+ * @example
113
+ *
114
+ * _.isObjectLike({});
115
+ * // => true
116
+ *
117
+ * _.isObjectLike([1, 2, 3]);
118
+ * // => true
119
+ *
120
+ * _.isObjectLike(_.noop);
121
+ * // => false
122
+ *
123
+ * _.isObjectLike(null);
124
+ * // => false
125
+ */
126
+ function isObjectLike(value) {
127
+ return value != null && typeof value == 'object';
128
+ }
4
129
 
5
130
  /**
6
131
  * Checks if `value` is classified as an `Array` object.
@@ -27,6 +152,36 @@ const isObject = require('./isObject-437a6bfd.js');
27
152
  */
28
153
  var isArray = Array.isArray;
29
154
 
155
+ /**
156
+ * Checks if `value` is the
157
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
158
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
159
+ *
160
+ * @static
161
+ * @memberOf _
162
+ * @since 0.1.0
163
+ * @category Lang
164
+ * @param {*} value The value to check.
165
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
166
+ * @example
167
+ *
168
+ * _.isObject({});
169
+ * // => true
170
+ *
171
+ * _.isObject([1, 2, 3]);
172
+ * // => true
173
+ *
174
+ * _.isObject(_.noop);
175
+ * // => true
176
+ *
177
+ * _.isObject(null);
178
+ * // => false
179
+ */
180
+ function isObject(value) {
181
+ var type = typeof value;
182
+ return value != null && (type == 'object' || type == 'function');
183
+ }
184
+
30
185
  /** `Object#toString` result references. */
31
186
  var asyncTag = '[object AsyncFunction]',
32
187
  funcTag = '[object Function]',
@@ -51,17 +206,17 @@ var asyncTag = '[object AsyncFunction]',
51
206
  * // => false
52
207
  */
53
208
  function isFunction(value) {
54
- if (!isObject.isObject(value)) {
209
+ if (!isObject(value)) {
55
210
  return false;
56
211
  }
57
212
  // The use of `Object#toString` avoids issues with the `typeof` operator
58
213
  // in Safari 9 which returns 'object' for typed arrays and other constructors.
59
- var tag = isObject.baseGetTag(value);
214
+ var tag = baseGetTag(value);
60
215
  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
61
216
  }
62
217
 
63
218
  /** Used to detect overreaching core-js shims. */
64
- var coreJsData = isObject.root['__core-js_shared__'];
219
+ var coreJsData = root['__core-js_shared__'];
65
220
 
66
221
  /** Used to detect methods masquerading as native. */
67
222
  var maskSrcKey = (function() {
@@ -139,7 +294,7 @@ var reIsNative = RegExp('^' +
139
294
  * else `false`.
140
295
  */
141
296
  function baseIsNative(value) {
142
- if (!isObject.isObject(value) || isMasked(value)) {
297
+ if (!isObject(value) || isMasked(value)) {
143
298
  return false;
144
299
  }
145
300
  var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
@@ -172,10 +327,16 @@ function getNative(object, key) {
172
327
  }
173
328
 
174
329
  /* Built-in method references that are verified to be native. */
175
- var Map = getNative(isObject.root, 'Map');
330
+ var Map = getNative(root, 'Map');
176
331
 
177
332
  exports.Map = Map;
333
+ exports.Symbol = Symbol;
334
+ exports.baseGetTag = baseGetTag;
335
+ exports.freeGlobal = freeGlobal;
178
336
  exports.getNative = getNative;
179
337
  exports.isArray = isArray;
180
338
  exports.isFunction = isFunction;
339
+ exports.isObject = isObject;
340
+ exports.isObjectLike = isObjectLike;
341
+ exports.root = root;
181
342
  exports.toSource = toSource;
@@ -1,58 +1,30 @@
1
1
  'use strict';
2
2
 
3
- const _Map = require('./_Map-7b4a3fd8.js');
4
- const isSymbol = require('./isSymbol-26e4a497.js');
5
- const isObject = require('./isObject-437a6bfd.js');
3
+ const _Map = require('./_Map-ea5de08f.js');
6
4
 
7
- /**
8
- * A specialized version of `_.map` for arrays without support for iteratee
9
- * shorthands.
10
- *
11
- * @private
12
- * @param {Array} [array] The array to iterate over.
13
- * @param {Function} iteratee The function invoked per iteration.
14
- * @returns {Array} Returns the new mapped array.
15
- */
16
- function arrayMap(array, iteratee) {
17
- var index = -1,
18
- length = array == null ? 0 : array.length,
19
- result = Array(length);
20
-
21
- while (++index < length) {
22
- result[index] = iteratee(array[index], index, array);
23
- }
24
- return result;
25
- }
26
-
27
- /** Used as references for various `Number` constants. */
28
- var INFINITY$1 = 1 / 0;
29
-
30
- /** Used to convert symbols to primitives and strings. */
31
- var symbolProto = isObject.Symbol ? isObject.Symbol.prototype : undefined,
32
- symbolToString = symbolProto ? symbolProto.toString : undefined;
5
+ /** `Object#toString` result references. */
6
+ var symbolTag = '[object Symbol]';
33
7
 
34
8
  /**
35
- * The base implementation of `_.toString` which doesn't convert nullish
36
- * values to empty strings.
9
+ * Checks if `value` is classified as a `Symbol` primitive or object.
37
10
  *
38
- * @private
39
- * @param {*} value The value to process.
40
- * @returns {string} Returns the string.
11
+ * @static
12
+ * @memberOf _
13
+ * @since 4.0.0
14
+ * @category Lang
15
+ * @param {*} value The value to check.
16
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
17
+ * @example
18
+ *
19
+ * _.isSymbol(Symbol.iterator);
20
+ * // => true
21
+ *
22
+ * _.isSymbol('abc');
23
+ * // => false
41
24
  */
42
- function baseToString(value) {
43
- // Exit early for strings to avoid a performance hit in some environments.
44
- if (typeof value == 'string') {
45
- return value;
46
- }
47
- if (_Map.isArray(value)) {
48
- // Recursively convert values (susceptible to call stack limits).
49
- return arrayMap(value, baseToString) + '';
50
- }
51
- if (isSymbol.isSymbol(value)) {
52
- return symbolToString ? symbolToString.call(value) : '';
53
- }
54
- var result = (value + '');
55
- return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
25
+ function isSymbol(value) {
26
+ return typeof value == 'symbol' ||
27
+ (_Map.isObjectLike(value) && _Map.baseGetTag(value) == symbolTag);
56
28
  }
57
29
 
58
30
  /**
@@ -91,31 +63,6 @@ function eq(value, other) {
91
63
  return value === other || (value !== value && other !== other);
92
64
  }
93
65
 
94
- /** Used to match property names within property paths. */
95
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
96
- reIsPlainProp = /^\w*$/;
97
-
98
- /**
99
- * Checks if `value` is a property name and not a property path.
100
- *
101
- * @private
102
- * @param {*} value The value to check.
103
- * @param {Object} [object] The object to query keys on.
104
- * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
105
- */
106
- function isKey(value, object) {
107
- if (_Map.isArray(value)) {
108
- return false;
109
- }
110
- var type = typeof value;
111
- if (type == 'number' || type == 'symbol' || type == 'boolean' ||
112
- value == null || isSymbol.isSymbol(value)) {
113
- return true;
114
- }
115
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
116
- (object != null && value in Object(object));
117
- }
118
-
119
66
  /* Built-in method references that are verified to be native. */
120
67
  var nativeCreate = _Map.getNative(Object, 'create');
121
68
 
@@ -508,238 +455,7 @@ MapCache.prototype.get = mapCacheGet;
508
455
  MapCache.prototype.has = mapCacheHas;
509
456
  MapCache.prototype.set = mapCacheSet;
510
457
 
511
- /** Error message constants. */
512
- var FUNC_ERROR_TEXT = 'Expected a function';
513
-
514
- /**
515
- * Creates a function that memoizes the result of `func`. If `resolver` is
516
- * provided, it determines the cache key for storing the result based on the
517
- * arguments provided to the memoized function. By default, the first argument
518
- * provided to the memoized function is used as the map cache key. The `func`
519
- * is invoked with the `this` binding of the memoized function.
520
- *
521
- * **Note:** The cache is exposed as the `cache` property on the memoized
522
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
523
- * constructor with one whose instances implement the
524
- * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
525
- * method interface of `clear`, `delete`, `get`, `has`, and `set`.
526
- *
527
- * @static
528
- * @memberOf _
529
- * @since 0.1.0
530
- * @category Function
531
- * @param {Function} func The function to have its output memoized.
532
- * @param {Function} [resolver] The function to resolve the cache key.
533
- * @returns {Function} Returns the new memoized function.
534
- * @example
535
- *
536
- * var object = { 'a': 1, 'b': 2 };
537
- * var other = { 'c': 3, 'd': 4 };
538
- *
539
- * var values = _.memoize(_.values);
540
- * values(object);
541
- * // => [1, 2]
542
- *
543
- * values(other);
544
- * // => [3, 4]
545
- *
546
- * object.a = 2;
547
- * values(object);
548
- * // => [1, 2]
549
- *
550
- * // Modify the result cache.
551
- * values.cache.set(object, ['a', 'b']);
552
- * values(object);
553
- * // => ['a', 'b']
554
- *
555
- * // Replace `_.memoize.Cache`.
556
- * _.memoize.Cache = WeakMap;
557
- */
558
- function memoize(func, resolver) {
559
- if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
560
- throw new TypeError(FUNC_ERROR_TEXT);
561
- }
562
- var memoized = function() {
563
- var args = arguments,
564
- key = resolver ? resolver.apply(this, args) : args[0],
565
- cache = memoized.cache;
566
-
567
- if (cache.has(key)) {
568
- return cache.get(key);
569
- }
570
- var result = func.apply(this, args);
571
- memoized.cache = cache.set(key, result) || cache;
572
- return result;
573
- };
574
- memoized.cache = new (memoize.Cache || MapCache);
575
- return memoized;
576
- }
577
-
578
- // Expose `MapCache`.
579
- memoize.Cache = MapCache;
580
-
581
- /** Used as the maximum memoize cache size. */
582
- var MAX_MEMOIZE_SIZE = 500;
583
-
584
- /**
585
- * A specialized version of `_.memoize` which clears the memoized function's
586
- * cache when it exceeds `MAX_MEMOIZE_SIZE`.
587
- *
588
- * @private
589
- * @param {Function} func The function to have its output memoized.
590
- * @returns {Function} Returns the new memoized function.
591
- */
592
- function memoizeCapped(func) {
593
- var result = memoize(func, function(key) {
594
- if (cache.size === MAX_MEMOIZE_SIZE) {
595
- cache.clear();
596
- }
597
- return key;
598
- });
599
-
600
- var cache = result.cache;
601
- return result;
602
- }
603
-
604
- /** Used to match property names within property paths. */
605
- var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
606
-
607
- /** Used to match backslashes in property paths. */
608
- var reEscapeChar = /\\(\\)?/g;
609
-
610
- /**
611
- * Converts `string` to a property path array.
612
- *
613
- * @private
614
- * @param {string} string The string to convert.
615
- * @returns {Array} Returns the property path array.
616
- */
617
- var stringToPath = memoizeCapped(function(string) {
618
- var result = [];
619
- if (string.charCodeAt(0) === 46 /* . */) {
620
- result.push('');
621
- }
622
- string.replace(rePropName, function(match, number, quote, subString) {
623
- result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
624
- });
625
- return result;
626
- });
627
-
628
- /**
629
- * Converts `value` to a string. An empty string is returned for `null`
630
- * and `undefined` values. The sign of `-0` is preserved.
631
- *
632
- * @static
633
- * @memberOf _
634
- * @since 4.0.0
635
- * @category Lang
636
- * @param {*} value The value to convert.
637
- * @returns {string} Returns the converted string.
638
- * @example
639
- *
640
- * _.toString(null);
641
- * // => ''
642
- *
643
- * _.toString(-0);
644
- * // => '-0'
645
- *
646
- * _.toString([1, 2, 3]);
647
- * // => '1,2,3'
648
- */
649
- function toString(value) {
650
- return value == null ? '' : baseToString(value);
651
- }
652
-
653
- /**
654
- * Casts `value` to a path array if it's not one.
655
- *
656
- * @private
657
- * @param {*} value The value to inspect.
658
- * @param {Object} [object] The object to query keys on.
659
- * @returns {Array} Returns the cast property path array.
660
- */
661
- function castPath(value, object) {
662
- if (_Map.isArray(value)) {
663
- return value;
664
- }
665
- return isKey(value, object) ? [value] : stringToPath(toString(value));
666
- }
667
-
668
- /** Used as references for various `Number` constants. */
669
- var INFINITY = 1 / 0;
670
-
671
- /**
672
- * Converts `value` to a string key if it's not a string or symbol.
673
- *
674
- * @private
675
- * @param {*} value The value to inspect.
676
- * @returns {string|symbol} Returns the key.
677
- */
678
- function toKey(value) {
679
- if (typeof value == 'string' || isSymbol.isSymbol(value)) {
680
- return value;
681
- }
682
- var result = (value + '');
683
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
684
- }
685
-
686
- /**
687
- * The base implementation of `_.get` without support for default values.
688
- *
689
- * @private
690
- * @param {Object} object The object to query.
691
- * @param {Array|string} path The path of the property to get.
692
- * @returns {*} Returns the resolved value.
693
- */
694
- function baseGet(object, path) {
695
- path = castPath(path, object);
696
-
697
- var index = 0,
698
- length = path.length;
699
-
700
- while (object != null && index < length) {
701
- object = object[toKey(path[index++])];
702
- }
703
- return (index && index == length) ? object : undefined;
704
- }
705
-
706
- /**
707
- * Gets the value at `path` of `object`. If the resolved value is
708
- * `undefined`, the `defaultValue` is returned in its place.
709
- *
710
- * @static
711
- * @memberOf _
712
- * @since 3.7.0
713
- * @category Object
714
- * @param {Object} object The object to query.
715
- * @param {Array|string} path The path of the property to get.
716
- * @param {*} [defaultValue] The value returned for `undefined` resolved values.
717
- * @returns {*} Returns the resolved value.
718
- * @example
719
- *
720
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
721
- *
722
- * _.get(object, 'a[0].b.c');
723
- * // => 3
724
- *
725
- * _.get(object, ['a', '0', 'b', 'c']);
726
- * // => 3
727
- *
728
- * _.get(object, 'a.b.c', 'default');
729
- * // => 'default'
730
- */
731
- function get(object, path, defaultValue) {
732
- var result = object == null ? undefined : baseGet(object, path);
733
- return result === undefined ? defaultValue : result;
734
- }
735
-
736
458
  exports.ListCache = ListCache;
737
459
  exports.MapCache = MapCache;
738
- exports.arrayMap = arrayMap;
739
- exports.baseGet = baseGet;
740
- exports.castPath = castPath;
741
460
  exports.eq = eq;
742
- exports.get = get;
743
- exports.isKey = isKey;
744
- exports.toKey = toKey;
745
- exports.toString = toString;
461
+ exports.isSymbol = isSymbol;