@gooddata/util 11.68.0-alpha.6 → 11.68.0-alpha.8

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 (84) hide show
  1. package/LICENSE +1 -1
  2. package/NOTICE +4 -2
  3. package/esm/_/_baseDifference.d.ts +15 -0
  4. package/esm/_/_baseDifference.d.ts.map +1 -0
  5. package/esm/_/_baseDifference.js +68 -0
  6. package/esm/_/_basePickBy.d.ts +14 -0
  7. package/esm/_/_basePickBy.d.ts.map +1 -0
  8. package/esm/_/_basePickBy.js +57 -0
  9. package/esm/_/_createCompounder.d.ts +11 -0
  10. package/esm/_/_createCompounder.d.ts.map +1 -0
  11. package/esm/_/{_arrayAggregator.js → _createCompounder.js} +12 -16
  12. package/esm/_/camelCase.d.ts +3 -4
  13. package/esm/_/camelCase.d.ts.map +1 -1
  14. package/esm/_/camelCase.js +8 -19
  15. package/esm/_/capitalize.d.ts +9 -0
  16. package/esm/_/capitalize.d.ts.map +1 -0
  17. package/esm/_/{_arrayAggregator.d.ts → capitalize.js} +10 -9
  18. package/esm/_/clamp.d.ts +17 -0
  19. package/esm/_/clamp.d.ts.map +1 -0
  20. package/esm/_/clamp.js +56 -0
  21. package/esm/_/deburr.d.ts.map +1 -1
  22. package/esm/_/deburr.js +2 -1
  23. package/esm/_/difference.d.ts +14 -0
  24. package/esm/_/difference.d.ts.map +1 -0
  25. package/esm/_/difference.js +46 -0
  26. package/esm/_/differenceBy.d.ts +39 -0
  27. package/esm/_/differenceBy.d.ts.map +1 -0
  28. package/esm/_/{_createAggregator.js → differenceBy.js} +7 -17
  29. package/esm/_/escape.d.ts +13 -0
  30. package/esm/_/escape.d.ts.map +1 -0
  31. package/esm/_/escape.js +56 -0
  32. package/esm/_/has.d.ts +23 -0
  33. package/esm/_/has.d.ts.map +1 -0
  34. package/esm/_/has.js +35 -0
  35. package/esm/_/isPlainObject.d.ts +1 -1
  36. package/esm/_/isPlainObject.d.ts.map +1 -1
  37. package/esm/_/kebabCase.d.ts +9 -0
  38. package/esm/_/kebabCase.d.ts.map +1 -0
  39. package/esm/_/kebabCase.js +40 -0
  40. package/esm/_/keyBy.d.ts +17 -0
  41. package/esm/_/keyBy.d.ts.map +1 -0
  42. package/esm/_/{_baseAggregator.js → keyBy.js} +9 -16
  43. package/esm/_/omitBy.d.ts +21 -0
  44. package/esm/_/omitBy.d.ts.map +1 -0
  45. package/esm/_/omitBy.js +37 -0
  46. package/esm/_/partial.d.ts +87 -0
  47. package/esm/_/partial.d.ts.map +1 -0
  48. package/esm/_/partial.js +30 -0
  49. package/esm/_/pickBy.d.ts +21 -0
  50. package/esm/_/pickBy.d.ts.map +1 -0
  51. package/esm/_/pickBy.js +36 -0
  52. package/esm/_/toNumber.d.ts +11 -0
  53. package/esm/_/toNumber.d.ts.map +1 -0
  54. package/esm/_/toNumber.js +69 -0
  55. package/esm/_/toString.d.ts +11 -0
  56. package/esm/_/toString.d.ts.map +1 -0
  57. package/esm/_/toString.js +57 -0
  58. package/esm/_/types.d.ts +38 -0
  59. package/esm/_/types.d.ts.map +1 -1
  60. package/esm/_/union.d.ts +11 -0
  61. package/esm/_/union.d.ts.map +1 -0
  62. package/esm/_/union.js +55 -0
  63. package/esm/_/uniqWith.d.ts +14 -0
  64. package/esm/_/uniqWith.d.ts.map +1 -0
  65. package/esm/_/uniqWith.js +59 -0
  66. package/esm/_/update.d.ts +17 -0
  67. package/esm/_/update.d.ts.map +1 -0
  68. package/esm/_/update.js +55 -0
  69. package/esm/_/upperFirst.d.ts +10 -0
  70. package/esm/_/upperFirst.d.ts.map +1 -0
  71. package/esm/_/upperFirst.js +46 -0
  72. package/esm/_/zip.d.ts +28 -0
  73. package/esm/_/zip.d.ts.map +1 -0
  74. package/esm/_/zip.js +38 -0
  75. package/esm/index.d.ts +17 -1
  76. package/esm/index.d.ts.map +1 -1
  77. package/esm/index.js +16 -0
  78. package/esm/util.d.ts +377 -4
  79. package/package.json +3 -3
  80. package/esm/_/_arrayAggregator.d.ts.map +0 -1
  81. package/esm/_/_baseAggregator.d.ts +0 -13
  82. package/esm/_/_baseAggregator.d.ts.map +0 -1
  83. package/esm/_/_createAggregator.d.ts +0 -10
  84. package/esm/_/_createAggregator.d.ts.map +0 -1
package/esm/util.d.ts CHANGED
@@ -8,15 +8,41 @@
8
8
  */
9
9
 
10
10
  /**
11
- * Converts `string` to camel case: the string is deburred, split into words (on separators, case changes,
12
- * digits and Unicode boundaries, as lodash does), each word is lower-cased and every word but the first is
13
- * capitalised.
11
+ * Converts `string` to camel case: the words of the string, lower-cased, with every word but the first
12
+ * capitalised, joined together.
14
13
  *
15
14
  * @param string - The string to convert.
16
15
  * @returns Returns the camel cased string.
17
16
  * @internal
18
17
  */
19
- export declare function _camelCase(string?: string): string;
18
+ export declare const _camelCase: (string?: string) => string;
19
+
20
+ /**
21
+ * Converts the first character of `string` to upper case and the remaining to lower case.
22
+ *
23
+ * @param string - The string to capitalize.
24
+ * @returns Returns the capitalized string.
25
+ * @internal
26
+ */
27
+ export declare function _capitalize(string?: string): string;
28
+
29
+ /**
30
+ * Clamps `number` within the inclusive `lower` and `upper` bounds. With two arguments the second one is the
31
+ * upper bound. The upper bound is applied first, bounds that convert to `NaN` count as `0`, an `undefined`
32
+ * bound is skipped, and a `NaN` number is returned as is.
33
+ *
34
+ * @param number - The number to clamp.
35
+ * @param lower - The lower bound.
36
+ * @param upper - The upper bound.
37
+ * @returns Returns the clamped number.
38
+ * @internal
39
+ */
40
+ export declare function _clamp(number: number, lower: number, upper: number): number;
41
+
42
+ /**
43
+ * @internal
44
+ */
45
+ export declare function _clamp(number: number, upper: number): number;
20
46
 
21
47
  /**
22
48
  * Recursively clones `value`.
@@ -50,6 +76,11 @@ export declare function combineGuards<T extends ((x: unknown) => x is unknown)[]
50
76
  */
51
77
  export declare function _compact<T>(array: _List<T | _Falsey> | null | undefined): T[];
52
78
 
79
+ /**
80
+ * @internal
81
+ */
82
+ export declare type _Comparator<T> = (a: T, b: T) => boolean;
83
+
53
84
  /**
54
85
  * A console function, like log, warn or error
55
86
  *
@@ -167,6 +198,63 @@ export declare type _Dictionary<T> = {
167
198
  [index: string]: T;
168
199
  };
169
200
 
201
+ /**
202
+ * Creates an array of `array` values not included in the other given arrays using SameValueZero for equality
203
+ * comparisons. The order and references of result values are determined by the first array. Only array-like
204
+ * objects are inspected: any other first argument yields an empty array and any other exclusion argument is
205
+ * skipped.
206
+ *
207
+ * @param array - The array to inspect.
208
+ * @param values - The arrays of values to exclude.
209
+ * @returns Returns the new array of filtered values.
210
+ * @internal
211
+ */
212
+ export declare function _difference<T>(array: _List<T> | null | undefined, ...values: _List<T>[]): T[];
213
+
214
+ /**
215
+ * This method is like `_difference` except that it accepts `iteratee` which is invoked for each element of
216
+ * `array` and `values` to generate the criterion by which they're compared. The order and references of
217
+ * result values are determined by the first array. The iteratee is invoked with one argument: (value).
218
+ * The iteratee is the last argument unless that argument is array-like, in which case it is one more list of
219
+ * values and the elements are compared as they are.
220
+ *
221
+ * @param array - The array to inspect.
222
+ * @param values - The values to exclude, followed by the iteratee.
223
+ * @returns Returns the new array of filtered values.
224
+ * @internal
225
+ */
226
+ export declare function _differenceBy<T1, T2>(array: _List<T1> | null | undefined, values: _List<T2>, iteratee: _ValueIteratee<T1 | T2>): T1[];
227
+
228
+ /**
229
+ * @internal
230
+ */
231
+ export declare function _differenceBy<T1, T2, T3>(array: _List<T1> | null | undefined, values1: _List<T2>, values2: _List<T3>, iteratee: _ValueIteratee<T1 | T2 | T3>): T1[];
232
+
233
+ /**
234
+ * @internal
235
+ */
236
+ export declare function _differenceBy<T1, T2, T3, T4>(array: _List<T1> | null | undefined, values1: _List<T2>, values2: _List<T3>, values3: _List<T4>, iteratee: _ValueIteratee<T1 | T2 | T3 | T4>): T1[];
237
+
238
+ /**
239
+ * @internal
240
+ */
241
+ export declare function _differenceBy<T1, T2, T3, T4, T5>(array: _List<T1> | null | undefined, values1: _List<T2>, values2: _List<T3>, values3: _List<T4>, values4: _List<T5>, iteratee: _ValueIteratee<T1 | T2 | T3 | T4 | T5>): T1[];
242
+
243
+ /**
244
+ * @internal
245
+ */
246
+ export declare function _differenceBy<T1, T2, T3, T4, T5, T6>(array: _List<T1> | null | undefined, values1: _List<T2>, values2: _List<T3>, values3: _List<T4>, values4: _List<T5>, values5: _List<T6>, iteratee: _ValueIteratee<T1 | T2 | T3 | T4 | T5 | T6>): T1[];
247
+
248
+ /**
249
+ * @internal
250
+ */
251
+ export declare function _differenceBy<T1, T2, T3, T4, T5, T6, T7>(array: _List<T1> | null | undefined, values1: _List<T2>, values2: _List<T3>, values3: _List<T4>, values4: _List<T5>, values5: _List<T6>, ...values: (_List<T7> | _ValueIteratee<T1 | T2 | T3 | T4 | T5 | T6 | T7>)[]): T1[];
252
+
253
+ /**
254
+ * @internal
255
+ */
256
+ export declare function _differenceBy<T>(array: _List<T> | null | undefined, ...values: _List<T>[]): T[];
257
+
170
258
  /**
171
259
  * @internal
172
260
  */
@@ -185,6 +273,19 @@ export declare type _EmptyObject<T> = {
185
273
  */
186
274
  export declare type _EmptyObjectOf<T> = _EmptyObject<T> extends T ? _EmptyObject<T> : never;
187
275
 
276
+ /**
277
+ * Converts the characters `&`, `<`, `>`, `"` and `'` in `string` to their corresponding HTML entities.
278
+ *
279
+ * **Note:** No other characters are escaped. Though `>` is escaped for symmetry, characters like `>` and `/`
280
+ * don't need escaping in HTML and have no special meaning unless they're part of a tag or unquoted attribute
281
+ * value. When working with HTML you should always quote attribute values to reduce XSS vectors.
282
+ *
283
+ * @param string - The string to escape.
284
+ * @returns Returns the escaped string.
285
+ * @internal
286
+ */
287
+ export declare function _escape(string?: string): string;
288
+
188
289
  /**
189
290
  * Escapes special characters used in regular expressions.
190
291
  * @param value - string to be escaped
@@ -200,6 +301,31 @@ export declare function escapeRegExp(value: string): string;
200
301
  */
201
302
  export declare type _Falsey = null | undefined | false | "" | 0 | 0n;
202
303
 
304
+ /**
305
+ * @internal
306
+ */
307
+ export declare type _Function0<R> = () => R;
308
+
309
+ /**
310
+ * @internal
311
+ */
312
+ export declare type _Function1<T1, R> = (t1: T1) => R;
313
+
314
+ /**
315
+ * @internal
316
+ */
317
+ export declare type _Function2<T1, T2, R> = (t1: T1, t2: T2) => R;
318
+
319
+ /**
320
+ * @internal
321
+ */
322
+ export declare type _Function3<T1, T2, T3, R> = (t1: T1, t2: T2, t3: T3) => R;
323
+
324
+ /**
325
+ * @internal
326
+ */
327
+ export declare type _Function4<T1, T2, T3, T4, R> = (t1: T1, t2: T2, t3: T3, t4: T4) => R;
328
+
203
329
  /**
204
330
  * Creates an object composed of keys generated from the results of running each element of
205
331
  * `collection` thru `iteratee`. The order of grouped values is determined by the order they occur in
@@ -224,6 +350,26 @@ export declare function _groupBy<T extends object>(collection: T | null | undefi
224
350
  */
225
351
  export declare type GuardType<T> = T extends ((o: unknown) => o is infer U) ? U : never;
226
352
 
353
+ /**
354
+ * Checks if `path` is a direct property of `object`: every segment of the path must be an own property of
355
+ * the value before it, or a valid index of an array or arguments object.
356
+ *
357
+ * @param object - The object to query.
358
+ * @param path - The path to check.
359
+ * @returns Returns `true` if `path` exists, else `false`.
360
+ * @internal
361
+ */
362
+ export declare function _has<T, K extends _PropertyName>(object: T, path: K): object is T & {
363
+ [P in K]: P extends keyof T ? T[P] : Record<string, unknown> extends T ? T[keyof T] : unknown;
364
+ } & {
365
+ [uniqueSymbol]: unknown;
366
+ };
367
+
368
+ /**
369
+ * @internal
370
+ */
371
+ export declare function _has<T>(object: T, path: _PropertyPath): boolean;
372
+
227
373
  /**
228
374
  * Returns a hash code for a string.
229
375
  *
@@ -305,11 +451,47 @@ export declare interface IShortenTextOptions {
305
451
  maxLength?: number;
306
452
  }
307
453
 
454
+ /**
455
+ * Checks if `value` is a plain object, that is, an object created by the `Object` constructor or one
456
+ * with a `[[Prototype]]` of `null`.
457
+ *
458
+ * @param value - The value to check.
459
+ * @returns Returns `true` if `value` is a plain object, else `false`.
460
+ * @internal
461
+ */
462
+ export declare function _isPlainObject(value?: unknown): boolean;
463
+
308
464
  /**
309
465
  * @internal
310
466
  */
311
467
  export declare type _IterateeShorthand<T> = _PropertyName | [_PropertyName, any] | _PartialShallow<T>;
312
468
 
469
+ /**
470
+ * Converts `string` to kebab case: the words of the string, lower-cased and joined with hyphens.
471
+ *
472
+ * @param string - The string to convert.
473
+ * @returns Returns the kebab cased string.
474
+ * @internal
475
+ */
476
+ export declare const _kebabCase: (string?: string) => string;
477
+
478
+ /**
479
+ * Creates an object composed of keys generated from the results of running each element of `collection`
480
+ * thru `iteratee`. The corresponding value of each key is the last element responsible for generating the
481
+ * key. The iteratee is invoked with one argument: (value).
482
+ *
483
+ * @param collection - The collection to iterate over.
484
+ * @param iteratee - The iteratee to transform keys.
485
+ * @returns Returns the composed aggregate object.
486
+ * @internal
487
+ */
488
+ export declare function _keyBy<T>(collection: _List<T> | null | undefined, iteratee?: _ValueIterateeCustom<T, _PropertyName>): _Dictionary<T>;
489
+
490
+ /**
491
+ * @internal
492
+ */
493
+ export declare function _keyBy<T extends object>(collection: T | null | undefined, iteratee?: _ValueIterateeCustom<T[keyof T], _PropertyName>): _Dictionary<T[keyof T]>;
494
+
313
495
  /**
314
496
  * @internal
315
497
  */
@@ -454,6 +636,13 @@ export declare function _merge(object: any, ...otherArgs: any[]): any;
454
636
  */
455
637
  export declare type _NotVoid = unknown;
456
638
 
639
+ /**
640
+ * @internal
641
+ */
642
+ export declare type _NumericDictionary<T> = {
643
+ [index: number]: T;
644
+ };
645
+
457
646
  /**
458
647
  * @internal
459
648
  */
@@ -492,6 +681,28 @@ export declare function _omit<T extends object, K extends keyof T>(object: T | n
492
681
  */
493
682
  export declare function _omit<T extends object>(object: T | null | undefined, ...paths: Array<_Many<_PropertyName>>): _PartialObject<T>;
494
683
 
684
+ /**
685
+ * The opposite of `pickBy`; this method creates an object composed of the own and inherited enumerable
686
+ * string and symbol keyed properties of `object` that `predicate` doesn't return truthy for. The predicate
687
+ * is invoked with two arguments: (value, key). Picked values are kept by reference.
688
+ *
689
+ * @param object - The source object.
690
+ * @param predicate - The function invoked per property, or an iteratee shorthand. Defaults to identity.
691
+ * @returns Returns the new object.
692
+ * @internal
693
+ */
694
+ export declare function _omitBy<T>(object: _Dictionary<T> | null | undefined, predicate?: _ValueKeyIteratee<T>): _Dictionary<T>;
695
+
696
+ /**
697
+ * @internal
698
+ */
699
+ export declare function _omitBy<T>(object: _NumericDictionary<T> | null | undefined, predicate?: _ValueKeyIteratee<T>): _NumericDictionary<T>;
700
+
701
+ /**
702
+ * @internal
703
+ */
704
+ export declare function _omitBy<T extends object>(object: T | null | undefined, predicate: _ValueKeyIteratee<T[keyof T]>): _PartialObject<T>;
705
+
495
706
  /**
496
707
  * Parse string in a form of [foo, bar] to an array of objects.
497
708
  * Assume alphanumeric strings in the array and spaces; if some is not alphanumeric , return null
@@ -502,6 +713,53 @@ export declare function _omit<T extends object>(object: T | null | undefined, ..
502
713
  */
503
714
  export declare function parseStringToArray(str: string): string[] | null;
504
715
 
716
+ /**
717
+ * The call signatures of `_partial`: each applied parameter is dropped from the resulting function, a
718
+ * placeholder keeps its parameter in place.
719
+ *
720
+ * @internal
721
+ */
722
+ export declare type _Partial = {
723
+ <T1, T2, R>(func: _Function2<T1, T2, R>, plc1: _Placeholder, arg2: T2): _Function1<T1, R>;
724
+ <T1, T2, T3, R>(func: _Function3<T1, T2, T3, R>, plc1: _Placeholder, arg2: T2): _Function2<T1, T3, R>;
725
+ <T1, T2, T3, R>(func: _Function3<T1, T2, T3, R>, plc1: _Placeholder, plc2: _Placeholder, arg3: T3): _Function2<T1, T2, R>;
726
+ <T1, T2, T3, R>(func: _Function3<T1, T2, T3, R>, arg1: T1, plc2: _Placeholder, arg3: T3): _Function1<T2, R>;
727
+ <T1, T2, T3, R>(func: _Function3<T1, T2, T3, R>, plc1: _Placeholder, arg2: T2, arg3: T3): _Function1<T1, R>;
728
+ <T1, T2, T3, T4, R>(func: _Function4<T1, T2, T3, T4, R>, plc1: _Placeholder, arg2: T2): _Function3<T1, T3, T4, R>;
729
+ <T1, T2, T3, T4, R>(func: _Function4<T1, T2, T3, T4, R>, plc1: _Placeholder, plc2: _Placeholder, arg3: T3): _Function3<T1, T2, T4, R>;
730
+ <T1, T2, T3, T4, R>(func: _Function4<T1, T2, T3, T4, R>, arg1: T1, plc2: _Placeholder, arg3: T3): _Function2<T2, T4, R>;
731
+ <T1, T2, T3, T4, R>(func: _Function4<T1, T2, T3, T4, R>, plc1: _Placeholder, arg2: T2, arg3: T3): _Function2<T1, T4, R>;
732
+ <T1, T2, T3, T4, R>(func: _Function4<T1, T2, T3, T4, R>, plc1: _Placeholder, plc2: _Placeholder, plc3: _Placeholder, arg4: T4): _Function3<T1, T2, T3, R>;
733
+ <T1, T2, T3, T4, R>(func: _Function4<T1, T2, T3, T4, R>, arg1: T1, plc2: _Placeholder, plc3: _Placeholder, arg4: T4): _Function2<T2, T3, R>;
734
+ <T1, T2, T3, T4, R>(func: _Function4<T1, T2, T3, T4, R>, plc1: _Placeholder, arg2: T2, plc3: _Placeholder, arg4: T4): _Function2<T1, T3, R>;
735
+ <T1, T2, T3, T4, R>(func: _Function4<T1, T2, T3, T4, R>, arg1: T1, arg2: T2, plc3: _Placeholder, arg4: T4): _Function1<T3, R>;
736
+ <T1, T2, T3, T4, R>(func: _Function4<T1, T2, T3, T4, R>, plc1: _Placeholder, plc2: _Placeholder, arg3: T3, arg4: T4): _Function2<T1, T2, R>;
737
+ <T1, T2, T3, T4, R>(func: _Function4<T1, T2, T3, T4, R>, arg1: T1, plc2: _Placeholder, arg3: T3, arg4: T4): _Function1<T2, R>;
738
+ <T1, T2, T3, T4, R>(func: _Function4<T1, T2, T3, T4, R>, plc1: _Placeholder, arg2: T2, arg3: T3, arg4: T4): _Function1<T1, R>;
739
+ <TS extends any[], R>(func: (...ts: TS) => R): (...ts: TS) => R;
740
+ <TS extends any[], T1, R>(func: (t1: T1, ...ts: TS) => R, arg1: T1): (...ts: TS) => R;
741
+ <TS extends any[], T1, T2, R>(func: (t1: T1, t2: T2, ...ts: TS) => R, t1: T1, t2: T2): (...ts: TS) => R;
742
+ <TS extends any[], T1, T2, T3, R>(func: (t1: T1, t2: T2, t3: T3, ...ts: TS) => R, t1: T1, t2: T2, t3: T3): (...ts: TS) => R;
743
+ <TS extends any[], T1, T2, T3, T4, R>(func: (t1: T1, t2: T2, t3: T3, t4: T4, ...ts: TS) => R, t1: T1, t2: T2, t3: T3, t4: T4): (...ts: TS) => R;
744
+ /** Marks a parameter of the function that is left open; `_partial.placeholder` is its only value. */
745
+ placeholder: _Placeholder;
746
+ };
747
+
748
+ /**
749
+ * Creates a function that invokes `func` with `partials` prepended to the arguments it receives. This method
750
+ * is like `bind` except it does **not** alter the `this` binding. The `_partial.placeholder` value may be
751
+ * used as a placeholder for partially applied arguments: each placeholder takes the next argument of the
752
+ * call, the remaining call arguments are appended. Calling the result with `new` constructs `func`.
753
+ *
754
+ * **Note:** This method doesn't set the "length" property of partially applied functions.
755
+ *
756
+ * @param func - The function to partially apply arguments to.
757
+ * @param partials - The arguments to be partially applied.
758
+ * @returns Returns the new partially applied function.
759
+ * @internal
760
+ */
761
+ export declare const _partial: _Partial;
762
+
505
763
  /**
506
764
  * @internal
507
765
  */
@@ -555,6 +813,39 @@ export declare function _pick<T extends object, U extends keyof T>(object: T, ..
555
813
  */
556
814
  export declare function _pick<T>(object: T | null | undefined, ...props: _Many<_PropertyPath>[]): _PartialObject<T>;
557
815
 
816
+ /**
817
+ * Creates an object composed of the own and inherited enumerable string and symbol keyed properties of
818
+ * `object` that `predicate` returns truthy for. The predicate is invoked with two arguments: (value, key).
819
+ * Picked values are kept by reference.
820
+ *
821
+ * @param object - The source object.
822
+ * @param predicate - The function invoked per property, or an iteratee shorthand. Defaults to identity.
823
+ * @returns Returns the new object.
824
+ * @internal
825
+ */
826
+ export declare function _pickBy<T>(object: _Dictionary<T> | null | undefined, predicate?: _ValueKeyIteratee<T>): _Dictionary<T>;
827
+
828
+ /**
829
+ * @internal
830
+ */
831
+ export declare function _pickBy<T>(object: _NumericDictionary<T> | null | undefined, predicate?: _ValueKeyIteratee<T>): _NumericDictionary<T>;
832
+
833
+ /**
834
+ * @internal
835
+ */
836
+ export declare function _pickBy<T extends object>(object: T | null | undefined, predicate?: _ValueKeyIteratee<T[keyof T]>): _PartialObject<T>;
837
+
838
+ /**
839
+ * The type of `_partial.placeholder`, which stands in for lodash's `_` placeholder.
840
+ *
841
+ * @internal
842
+ */
843
+ export declare type _Placeholder = {
844
+ readonly [placeholderBrand]: true;
845
+ };
846
+
847
+ declare const placeholderBrand: unique symbol;
848
+
558
849
  /**
559
850
  * @internal
560
851
  */
@@ -783,6 +1074,16 @@ export declare type _ThrottleSettingsLeading = (_ThrottleSettings & {
783
1074
  leading: true;
784
1075
  }) | Omit<_ThrottleSettings, "leading">;
785
1076
 
1077
+ /**
1078
+ * Creates an array of unique values, in order, from all given arrays using SameValueZero for equality
1079
+ * comparisons. Only array-like objects are inspected; other arguments, strings included, are skipped.
1080
+ *
1081
+ * @param arrays - The arrays to inspect.
1082
+ * @returns Returns the new array of combined values.
1083
+ * @internal
1084
+ */
1085
+ export declare function _union<T>(...arrays: (_List<T> | null | undefined)[]): T[];
1086
+
786
1087
  /**
787
1088
  * Creates a duplicate-free version of an array, using SameValueZero for equality comparisons, in which
788
1089
  * only the first occurrence of each element is kept. The order of result values is determined by the
@@ -806,6 +1107,37 @@ export declare function _uniq<T>(array: _List<T> | null | undefined): T[];
806
1107
  */
807
1108
  export declare function _uniqBy<T>(array: _List<T> | null | undefined, iteratee: _ValueIteratee<T>): T[];
808
1109
 
1110
+ declare const uniqueSymbol: unique symbol;
1111
+
1112
+ /**
1113
+ * This method is like `_uniq` except that it accepts `comparator` which is invoked to compare elements of
1114
+ * `array`. The order of result values is determined by the order they occur in the array. The comparator
1115
+ * is invoked with two arguments: (arrVal, othVal), the candidate first and then each kept element in order.
1116
+ * Without a function comparator, elements are compared with SameValueZero.
1117
+ *
1118
+ * @param array - The array to inspect.
1119
+ * @param comparator - The comparator invoked per element.
1120
+ * @returns Returns the new duplicate free array.
1121
+ * @internal
1122
+ */
1123
+ export declare function _uniqWith<T>(array: _List<T> | null | undefined, comparator?: _Comparator<T>): T[];
1124
+
1125
+ /**
1126
+ * This method is like `_set` except that it accepts `updater` to produce the value to set. The updater is
1127
+ * invoked with one argument, the current value at `path`, which is `undefined` when the path does not exist;
1128
+ * a non-function updater keeps the current value. Missing segments of the path are created as lodash does,
1129
+ * arrays for index segments and plain objects otherwise.
1130
+ *
1131
+ * **Note:** This method mutates `object`.
1132
+ *
1133
+ * @param object - The object to modify.
1134
+ * @param path - The path of the property to set.
1135
+ * @param updater - The function to produce the updated value.
1136
+ * @returns Returns `object`.
1137
+ * @internal
1138
+ */
1139
+ export declare function _update(object: object, path: _PropertyPath, updater: (value: any) => any): any;
1140
+
809
1141
  /**
810
1142
  * An iteratee as lodash accepts it: a function, a property name or path, a `[path, value]` pair, or a
811
1143
  * partial object to match.
@@ -814,6 +1146,11 @@ export declare function _uniqBy<T>(array: _List<T> | null | undefined, iteratee:
814
1146
  */
815
1147
  export declare type _ValueIteratee<T> = ((value: T) => _NotVoid) | _IterateeShorthand<T>;
816
1148
 
1149
+ /**
1150
+ * @internal
1151
+ */
1152
+ export declare type _ValueIterateeCustom<T, TResult> = ((value: T) => TResult) | _IterateeShorthand<T>;
1153
+
817
1154
  /**
818
1155
  * A predicate that narrows the element type, so functions like `_partition` can type their result.
819
1156
  *
@@ -821,6 +1158,11 @@ export declare type _ValueIteratee<T> = ((value: T) => _NotVoid) | _IterateeShor
821
1158
  */
822
1159
  export declare type _ValueIteratorTypeGuard<T, S extends T> = (value: T) => value is S;
823
1160
 
1161
+ /**
1162
+ * @internal
1163
+ */
1164
+ export declare type _ValueKeyIteratee<T> = ((value: T, key: string) => _NotVoid) | _IterateeShorthand<T>;
1165
+
824
1166
  /**
825
1167
  * A waitFor-compatible polling function, structurally matching testing-library's waitFor.
826
1168
  *
@@ -831,4 +1173,35 @@ export declare type WaitForFn = <T>(callback: () => T | Promise<T>, options?: {
831
1173
  timeout?: number;
832
1174
  }) => Promise<T>;
833
1175
 
1176
+ /**
1177
+ * Creates an array of grouped elements, the first of which contains the first elements of the given arrays,
1178
+ * the second of which contains the second elements of the given arrays, and so on. Shorter arrays are padded
1179
+ * with `undefined` up to the longest one. Only array-like objects take part; other arguments are skipped.
1180
+ *
1181
+ * @param arrays - The arrays to process.
1182
+ * @returns Returns the new array of grouped elements.
1183
+ * @internal
1184
+ */
1185
+ export declare function _zip<T1, T2>(arrays1: _List<T1>, arrays2: _List<T2>): [T1 | undefined, T2 | undefined][];
1186
+
1187
+ /**
1188
+ * @internal
1189
+ */
1190
+ export declare function _zip<T1, T2, T3>(arrays1: _List<T1>, arrays2: _List<T2>, arrays3: _List<T3>): [T1 | undefined, T2 | undefined, T3 | undefined][];
1191
+
1192
+ /**
1193
+ * @internal
1194
+ */
1195
+ export declare function _zip<T1, T2, T3, T4>(arrays1: _List<T1>, arrays2: _List<T2>, arrays3: _List<T3>, arrays4: _List<T4>): [T1 | undefined, T2 | undefined, T3 | undefined, T4 | undefined][];
1196
+
1197
+ /**
1198
+ * @internal
1199
+ */
1200
+ export declare function _zip<T1, T2, T3, T4, T5>(arrays1: _List<T1>, arrays2: _List<T2>, arrays3: _List<T3>, arrays4: _List<T4>, arrays5: _List<T5>): [T1 | undefined, T2 | undefined, T3 | undefined, T4 | undefined, T5 | undefined][];
1201
+
1202
+ /**
1203
+ * @internal
1204
+ */
1205
+ export declare function _zip<T>(...arrays: (_List<T> | null | undefined)[]): (T | undefined)[][];
1206
+
834
1207
  export { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/util",
3
- "version": "11.68.0-alpha.6",
3
+ "version": "11.68.0-alpha.8",
4
4
  "description": "GoodData Utility Functions",
5
5
  "license": "MIT",
6
6
  "author": "GoodData",
@@ -47,8 +47,8 @@
47
47
  "oxlint-tsgolint": "7.0.2001",
48
48
  "typescript": "7.0.2",
49
49
  "vitest": "5.0.4",
50
- "@gooddata/oxlint-config": "11.68.0-alpha.6",
51
- "@gooddata/eslint-config": "11.68.0-alpha.6"
50
+ "@gooddata/eslint-config": "11.68.0-alpha.8",
51
+ "@gooddata/oxlint-config": "11.68.0-alpha.8"
52
52
  },
53
53
  "scripts": {
54
54
  "_phase:build": "npm run build",
@@ -1 +0,0 @@
1
- {"version":3,"file":"_arrayAggregator.d.ts","sourceRoot":"","sources":["../../src/_/_arrayAggregator.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,GAAG,GAAG,CAU9F"}
@@ -1,13 +0,0 @@
1
- /**
2
- * Aggregates elements of `collection` on `accumulator` with keys transformed
3
- * by `iteratee` and values set by `setter`.
4
- *
5
- * @private
6
- * @param {Array|Object} collection The collection to iterate over.
7
- * @param {Function} setter The function to set `accumulator` values.
8
- * @param {Function} iteratee The iteratee to transform keys.
9
- * @param {Object} accumulator The initial aggregated object.
10
- * @returns {Function} Returns `accumulator`.
11
- */
12
- export declare function _baseAggregator(collection: any, setter: any, iteratee: any, accumulator: any): any;
13
- //# sourceMappingURL=_baseAggregator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_baseAggregator.d.ts","sourceRoot":"","sources":["../../src/_/_baseAggregator.ts"],"names":[],"mappings":"AAqCA;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,GAAG,GAAG,CAMlG"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Creates a function like `_.groupBy`.
3
- *
4
- * @private
5
- * @param {Function} setter The function to set accumulator values.
6
- * @param {Function} [initializer] The accumulator object initializer.
7
- * @returns {Function} Returns the new aggregator function.
8
- */
9
- export declare function _createAggregator(setter: any, initializer?: any): (collection: any, iteratee?: any) => any;
10
- //# sourceMappingURL=_createAggregator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_createAggregator.d.ts","sourceRoot":"","sources":["../../src/_/_createAggregator.ts"],"names":[],"mappings":"AAwCA;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,GAAG,EAAE,WAAW,CAAC,EAAE,GAAG,GAAG,CAAC,UAAU,EAAE,GAAG,EAAE,QAAQ,CAAC,EAAE,GAAG,KAAK,GAAG,CAO1G"}