playbook_ui 14.17.0.pre.alpha.play1964tablekitheadertextstylefix7164 → 14.17.0.pre.rc.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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/types.ts +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +0 -70
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +2 -83
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +7 -20
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_collapsible/__snapshots__/collapsible.test.js.snap +7 -14
- data/app/pb_kits/playbook/pb_contact/contact.test.js +7 -7
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +34 -34
- data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +2 -2
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +0 -16
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.html.erb +11 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.jsx +7 -0
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_inline_styles.scss +24 -28
- data/app/pb_kits/playbook/pb_date_range_inline/date_range_inline.test.js +2 -2
- data/app/pb_kits/playbook/pb_date_range_stacked/date_range_stacked.test.js +1 -1
- data/app/pb_kits/playbook/pb_draggable/context/index.tsx +17 -58
- data/app/pb_kits/playbook/pb_draggable/draggable.test.jsx +3 -3
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx +6 -6
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.jsx +6 -6
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +6 -6
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +8 -8
- data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +3 -3
- data/app/pb_kits/playbook/pb_filter/Filter/CurrentFilters.tsx +4 -3
- data/app/pb_kits/playbook/pb_filter/Filter/SortMenu.tsx +3 -2
- data/app/pb_kits/playbook/pb_form/pb_form_validation.js +1 -1
- data/app/pb_kits/playbook/pb_form_group/_form_group.scss +0 -22
- data/app/pb_kits/playbook/pb_icon/icon.test.js +9 -9
- data/app/pb_kits/playbook/pb_icon_circle/icon_circle.test.js +1 -1
- data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.test.js +1 -1
- data/app/pb_kits/playbook/pb_icon_value/icon_value.test.js +1 -1
- data/app/pb_kits/playbook/pb_label_value/label_value.test.js +1 -1
- data/app/pb_kits/playbook/pb_layout/_layout.scss +0 -58
- data/app/pb_kits/playbook/pb_layout/_layout.tsx +7 -20
- data/app/pb_kits/playbook/pb_layout/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_layout/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_layout/layout.test.js +0 -4
- data/app/pb_kits/playbook/pb_lightbox/hooks/useVisibility.js +1 -1
- data/app/pb_kits/playbook/pb_link/link.test.jsx +2 -2
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +1 -2
- data/app/pb_kits/playbook/pb_nav/_nav_item.test.js +3 -5
- data/app/pb_kits/playbook/pb_stat_change/stat_change.test.js +4 -8
- data/app/pb_kits/playbook/pb_table/styles/_headers.scss +7 -19
- data/app/pb_kits/playbook/pb_table/styles/_striped.scss +3 -3
- data/app/pb_kits/playbook/pb_tooltip/floating_ui.js +282 -0
- data/app/pb_kits/playbook/pb_tooltip/index.js +56 -183
- data/app/pb_kits/playbook/pb_tooltip/tooltip.html.erb +5 -2
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +4 -4
- data/app/pb_kits/playbook/pb_typeahead/index.ts +2 -2
- data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +5 -2
- data/app/pb_kits/playbook/pb_user/user.html.erb +6 -1
- data/app/pb_kits/playbook/pb_user_badge/user_badge.html.erb +6 -1
- data/app/pb_kits/playbook/utilities/globalProps.ts +1 -1
- data/app/pb_kits/playbook/utilities/object.test.js +1 -149
- data/app/pb_kits/playbook/utilities/object.ts +42 -124
- data/dist/chunks/{_typeahead-7W5Ha5Td.js → _typeahead-N-EFroAX.js} +3 -3
- data/dist/chunks/_weekday_stacked-Db780bKR.js +45 -0
- data/dist/chunks/lib-Co5y3V4K.js +29 -0
- data/dist/chunks/{pb_form_validation-BvNy9Bd6.js → pb_form_validation-DMajaRt3.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/kit_base.rb +4 -4
- data/lib/playbook/version.rb +2 -2
- metadata +7 -13
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.jsx +0 -90
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.md +0 -3
- data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.jsx +0 -190
- data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.md +0 -5
- data/app/pb_kits/playbook/pb_layout/subcomponents/_game.tsx +0 -90
- data/app/pb_kits/playbook/pb_layout/subcomponents/_round.tsx +0 -57
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_vertical.md +0 -1
- data/dist/chunks/_weekday_stacked-DSKatW3m.js +0 -45
- data/dist/chunks/lib-BGzBzFZX.js +0 -29
@@ -1,4 +1,4 @@
|
|
1
|
-
import { isEmpty, get, isString, uniqueId, omitBy, noop, merge, filter, find, partial
|
1
|
+
import { isEmpty, get, isString, uniqueId, omitBy, noop, merge, filter, find, partial } from './object';
|
2
2
|
|
3
3
|
describe('Lodash functions', () => {
|
4
4
|
describe('isEmpty', () => {
|
@@ -234,152 +234,4 @@ describe('Lodash functions', () => {
|
|
234
234
|
expect(joinPartial('b', 'c')).toBe('a_b_c');
|
235
235
|
});
|
236
236
|
});
|
237
|
-
|
238
|
-
describe('map', () => {
|
239
|
-
test('maps over an array with a function iteratee', () => {
|
240
|
-
const arr = [1, 2, 3];
|
241
|
-
const result = map(arr, (num) => num * 2);
|
242
|
-
expect(result).toEqual([2, 4, 6]);
|
243
|
-
});
|
244
|
-
|
245
|
-
test('maps over an array with a string iteratee', () => {
|
246
|
-
const arr = [{ value: 1 }, { value: 2 }, { value: 3 }];
|
247
|
-
const result = map(arr, 'value');
|
248
|
-
expect(result).toEqual([1, 2, 3]);
|
249
|
-
});
|
250
|
-
|
251
|
-
test('maps over an object with a function iteratee', () => {
|
252
|
-
const obj = { a: 1, b: 2, c: 3 };
|
253
|
-
const result = map(obj, (val, key) => key + val);
|
254
|
-
expect(result.sort()).toEqual(['a1', 'b2', 'c3'].sort());
|
255
|
-
});
|
256
|
-
|
257
|
-
test('maps over an object with a string iteratee', () => {
|
258
|
-
const obj = {
|
259
|
-
one: { num: 1 },
|
260
|
-
two: { num: 2 },
|
261
|
-
three: { num: 3 },
|
262
|
-
};
|
263
|
-
const result = map(obj, 'num');
|
264
|
-
expect(result.sort()).toEqual([1, 2, 3].sort());
|
265
|
-
});
|
266
|
-
|
267
|
-
test('returns original values if no iteratee provided', () => {
|
268
|
-
const arr = [1, 2, 3];
|
269
|
-
const result = map(arr);
|
270
|
-
expect(result).toEqual([1, 2, 3]);
|
271
|
-
});
|
272
|
-
});
|
273
|
-
|
274
|
-
describe('cloneDeep', () => {
|
275
|
-
test('clones primitive values', () => {
|
276
|
-
expect(cloneDeep(42)).toBe(42);
|
277
|
-
expect(cloneDeep('test')).toBe('test');
|
278
|
-
expect(cloneDeep(null)).toBe(null);
|
279
|
-
});
|
280
|
-
|
281
|
-
test('clones arrays deeply', () => {
|
282
|
-
const arr = [1, [2, 3]];
|
283
|
-
const cloned = cloneDeep(arr);
|
284
|
-
expect(cloned).toEqual(arr);
|
285
|
-
cloned[1][0] = 99;
|
286
|
-
expect(arr[1][0]).toBe(2);
|
287
|
-
});
|
288
|
-
|
289
|
-
test('clones objects deeply', () => {
|
290
|
-
const obj = { a: { b: 2 } };
|
291
|
-
const cloned = cloneDeep(obj);
|
292
|
-
expect(cloned).toEqual(obj);
|
293
|
-
cloned.a.b = 99;
|
294
|
-
expect(obj.a.b).toBe(2);
|
295
|
-
});
|
296
|
-
|
297
|
-
test('clones Date objects', () => {
|
298
|
-
const date = new Date();
|
299
|
-
const cloned = cloneDeep(date);
|
300
|
-
expect(cloned).not.toBe(date);
|
301
|
-
expect(cloned.getTime()).toBe(date.getTime());
|
302
|
-
});
|
303
|
-
|
304
|
-
test('clones RegExp objects', () => {
|
305
|
-
const regex = /test/gi;
|
306
|
-
const cloned = cloneDeep(regex);
|
307
|
-
expect(cloned).not.toBe(regex);
|
308
|
-
expect(cloned.source).toBe(regex.source);
|
309
|
-
expect(cloned.flags).toBe(regex.flags);
|
310
|
-
});
|
311
|
-
});
|
312
|
-
|
313
|
-
describe('omit', () => {
|
314
|
-
test('omits specified keys from object', () => {
|
315
|
-
const obj = { a: 1, b: 2, c: 3 };
|
316
|
-
expect(omit(obj, 'a', 'c')).toEqual({ b: 2 });
|
317
|
-
});
|
318
|
-
|
319
|
-
test('supports array of keys to omit', () => {
|
320
|
-
const obj = { a: 1, b: 2, c: 3 };
|
321
|
-
expect(omit(obj, ['b'])).toEqual({ a: 1, c: 3 });
|
322
|
-
});
|
323
|
-
|
324
|
-
test('returns empty object for null or non-object input', () => {
|
325
|
-
expect(omit(null, 'a')).toEqual({});
|
326
|
-
expect(omit("string", 'a')).toEqual({});
|
327
|
-
});
|
328
|
-
|
329
|
-
test('returns original object if no keys match', () => {
|
330
|
-
const obj = { a: 1, b: 2 };
|
331
|
-
expect(omit(obj, 'c')).toEqual({ a: 1, b: 2 });
|
332
|
-
});
|
333
|
-
});
|
334
|
-
|
335
|
-
describe('debounce', () => {
|
336
|
-
beforeEach(() => {
|
337
|
-
jest.useFakeTimers();
|
338
|
-
});
|
339
|
-
|
340
|
-
afterEach(() => {
|
341
|
-
jest.useRealTimers();
|
342
|
-
});
|
343
|
-
|
344
|
-
test('delays execution until wait time has passed', () => {
|
345
|
-
const func = jest.fn();
|
346
|
-
const debounced = debounce(func, 1000);
|
347
|
-
debounced();
|
348
|
-
expect(func).not.toHaveBeenCalled();
|
349
|
-
jest.advanceTimersByTime(500);
|
350
|
-
expect(func).not.toHaveBeenCalled();
|
351
|
-
jest.advanceTimersByTime(500);
|
352
|
-
expect(func).toHaveBeenCalledTimes(1);
|
353
|
-
});
|
354
|
-
|
355
|
-
test('calls function only once when called repeatedly', () => {
|
356
|
-
const func = jest.fn();
|
357
|
-
const debounced = debounce(func, 1000);
|
358
|
-
debounced();
|
359
|
-
debounced();
|
360
|
-
debounced();
|
361
|
-
jest.advanceTimersByTime(1000);
|
362
|
-
expect(func).toHaveBeenCalledTimes(1);
|
363
|
-
});
|
364
|
-
|
365
|
-
test('immediate option calls function on first call', () => {
|
366
|
-
const func = jest.fn();
|
367
|
-
const debounced = debounce(func, 1000, true);
|
368
|
-
debounced();
|
369
|
-
expect(func).toHaveBeenCalledTimes(1);
|
370
|
-
debounced();
|
371
|
-
debounced();
|
372
|
-
jest.advanceTimersByTime(1000);
|
373
|
-
expect(func).toHaveBeenCalledTimes(1);
|
374
|
-
});
|
375
|
-
|
376
|
-
test('subsequent call after wait period works with immediate option', () => {
|
377
|
-
const func = jest.fn();
|
378
|
-
const debounced = debounce(func, 1000, true);
|
379
|
-
debounced();
|
380
|
-
jest.advanceTimersByTime(1100);
|
381
|
-
debounced();
|
382
|
-
expect(func).toHaveBeenCalledTimes(2);
|
383
|
-
});
|
384
|
-
});
|
385
237
|
});
|
@@ -1,7 +1,6 @@
|
|
1
1
|
/* 🛠️ Any commonly used lodash functions can be added here. 🤙 */
|
2
2
|
|
3
|
-
export const isEmpty = (obj: any) =>
|
4
|
-
[Object, Array].includes((obj || {}).constructor) && !Object.entries((obj || {})).length
|
3
|
+
export const isEmpty = (obj: any) => [Object, Array].includes((obj || {}).constructor) && !Object.entries((obj || {})).length;
|
5
4
|
|
6
5
|
export const get = <T, R = any>(obj: T, path: string, defaultValue?: R): R | any => {
|
7
6
|
const travel = (regexp: RegExp): any =>
|
@@ -25,175 +24,94 @@ export const omitBy = (obj: Record<string, any>, predicate: (value: any, key: st
|
|
25
24
|
if (obj === null || typeof obj !== 'object') return {}
|
26
25
|
return Object.keys(obj).reduce((result: Record<string, any>, key: string) => {
|
27
26
|
if (!predicate(obj[key], key)) {
|
28
|
-
result[key] = obj[key]
|
27
|
+
result[key] = obj[key];
|
29
28
|
}
|
30
|
-
return result
|
29
|
+
return result;
|
31
30
|
}, {})
|
32
31
|
}
|
33
32
|
|
34
|
-
export const omit = (
|
35
|
-
obj: Record<string, any>,
|
36
|
-
...paths: (string | string[])[]
|
37
|
-
): Record<string, any> => {
|
38
|
-
if (obj === null || typeof obj !== 'object') return {}
|
39
|
-
const keysToOmit = new Set<string>()
|
40
|
-
paths.forEach(p => {
|
41
|
-
if (Array.isArray(p)) {
|
42
|
-
p.forEach(key => keysToOmit.add(key))
|
43
|
-
} else {
|
44
|
-
keysToOmit.add(p)
|
45
|
-
}
|
46
|
-
})
|
47
|
-
const result: Record<string, any> = {}
|
48
|
-
for (const key in obj) {
|
49
|
-
if (!keysToOmit.has(key)) {
|
50
|
-
result[key] = obj[key]
|
51
|
-
}
|
52
|
-
}
|
53
|
-
return result
|
54
|
-
}
|
55
|
-
|
56
33
|
export const noop = (): void => {
|
57
34
|
// empty
|
58
|
-
}
|
59
|
-
|
60
|
-
export const cloneDeep = (value: any): any => {
|
61
|
-
if (value === null || typeof value !== 'object') {
|
62
|
-
return value
|
63
|
-
}
|
64
|
-
if (Array.isArray(value)) {
|
65
|
-
return value.map(cloneDeep)
|
66
|
-
}
|
67
|
-
if (value instanceof Date) {
|
68
|
-
return new Date(value.getTime())
|
69
|
-
}
|
70
|
-
if (value instanceof RegExp) {
|
71
|
-
return new RegExp(value.source, value.flags)
|
72
|
-
}
|
73
|
-
const clonedObj: any = {}
|
74
|
-
for (const key in value) {
|
75
|
-
if (Object.prototype.hasOwnProperty.call(value, key)) {
|
76
|
-
clonedObj[key] = cloneDeep(value[key])
|
77
|
-
}
|
78
|
-
}
|
79
|
-
return clonedObj
|
80
|
-
}
|
35
|
+
};
|
81
36
|
|
82
37
|
export function merge(
|
83
38
|
...objects: Array<Record<string, unknown> | null | undefined>
|
84
39
|
): Record<string, unknown> {
|
85
40
|
const isPlainObject = (obj: unknown): obj is Record<string, unknown> =>
|
86
|
-
!!obj && typeof obj === 'object' && !Array.isArray(obj)
|
41
|
+
!!obj && typeof obj === 'object' && !Array.isArray(obj);
|
87
42
|
|
88
|
-
const result: Record<string, unknown> = {}
|
43
|
+
const result: Record<string, unknown> = {};
|
89
44
|
|
90
45
|
for (const obj of objects) {
|
91
|
-
if (!obj || typeof obj !== 'object') continue
|
46
|
+
if (!obj || typeof obj !== 'object') continue;
|
92
47
|
|
93
48
|
for (const key of Object.keys(obj)) {
|
94
|
-
const oldVal = result[key]
|
95
|
-
const newVal = (obj as Record<string, unknown>)[key]
|
49
|
+
const oldVal = result[key];
|
50
|
+
const newVal = (obj as Record<string, unknown>)[key];
|
96
51
|
|
97
52
|
if (Array.isArray(oldVal) && Array.isArray(newVal)) {
|
98
|
-
result[key] = newVal
|
53
|
+
result[key] = newVal;
|
99
54
|
} else if (isPlainObject(oldVal) && isPlainObject(newVal)) {
|
100
|
-
result[key] = merge(oldVal, newVal)
|
55
|
+
result[key] = merge(oldVal, newVal);
|
101
56
|
} else if (Array.isArray(oldVal) && isPlainObject(newVal)) {
|
102
|
-
result[key] = oldVal
|
57
|
+
result[key] = oldVal;
|
103
58
|
} else if (isPlainObject(oldVal) && Array.isArray(newVal)) {
|
104
|
-
result[key] = oldVal
|
59
|
+
result[key] = oldVal;
|
105
60
|
} else {
|
106
|
-
result[key] = newVal
|
61
|
+
result[key] = newVal;
|
107
62
|
}
|
108
63
|
}
|
109
64
|
}
|
110
|
-
return result
|
65
|
+
return result;
|
111
66
|
}
|
112
67
|
|
113
68
|
const createIteratee = (predicate: any) => {
|
114
69
|
if (typeof predicate === 'function') {
|
115
|
-
return predicate
|
70
|
+
return predicate;
|
116
71
|
}
|
117
72
|
if (typeof predicate === 'string') {
|
118
|
-
return (obj: any) => obj[predicate]
|
73
|
+
return (obj: any) => obj[predicate];
|
119
74
|
}
|
120
75
|
if (Array.isArray(predicate)) {
|
121
|
-
const [key, value] = predicate
|
122
|
-
return (obj: any) => obj[key] === value
|
76
|
+
const [key, value] = predicate;
|
77
|
+
return (obj: any) => obj[key] === value;
|
123
78
|
}
|
124
79
|
if (typeof predicate === 'object' && predicate !== null) {
|
125
80
|
return (obj: any) => {
|
126
81
|
for (const key in predicate) {
|
127
82
|
if (Object.prototype.hasOwnProperty.call(predicate, key)) {
|
128
|
-
if (obj[key] !== predicate[key]) return false
|
83
|
+
if (obj[key] !== predicate[key]) return false;
|
129
84
|
}
|
130
85
|
}
|
131
|
-
return true
|
132
|
-
}
|
86
|
+
return true;
|
87
|
+
};
|
133
88
|
}
|
134
|
-
return () => false
|
135
|
-
}
|
89
|
+
return () => false;
|
90
|
+
};
|
136
91
|
|
137
92
|
export const filter = <T>(array: T[], predicate: any): T[] => {
|
138
|
-
const iteratee = createIteratee(predicate)
|
139
|
-
return array.filter(iteratee)
|
140
|
-
}
|
93
|
+
const iteratee = createIteratee(predicate);
|
94
|
+
return array.filter(iteratee);
|
95
|
+
};
|
141
96
|
|
142
97
|
export const find = <T>(array: T[], predicate: any): T | undefined => {
|
143
|
-
const iteratee = createIteratee(predicate)
|
144
|
-
return array.find(iteratee)
|
145
|
-
}
|
98
|
+
const iteratee = createIteratee(predicate);
|
99
|
+
return array.find(iteratee);
|
100
|
+
};
|
146
101
|
|
147
|
-
export const partial = <F extends (...args:
|
102
|
+
export const partial = <F extends (...args: unknown[]) => unknown>(
|
148
103
|
fn: F,
|
149
|
-
...partials:
|
150
|
-
): ((...args:
|
151
|
-
const placeholder = partial.placeholder
|
152
|
-
return (...args:
|
153
|
-
let argIndex = 0
|
104
|
+
...partials: unknown[]
|
105
|
+
): ((...args: unknown[]) => ReturnType<F>) => {
|
106
|
+
const placeholder = partial.placeholder;
|
107
|
+
return (...args: unknown[]): ReturnType<F> => {
|
108
|
+
let argIndex = 0;
|
154
109
|
const finalArgs = partials.map(arg =>
|
155
110
|
arg === placeholder ? args[argIndex++] : arg
|
156
|
-
)
|
157
|
-
return fn(...(finalArgs.concat(args.slice(argIndex)) as Parameters<F>)) as ReturnType<F
|
158
|
-
}
|
159
|
-
}
|
160
|
-
|
161
|
-
partial.placeholder = Symbol()
|
162
|
-
export const _ = partial.placeholder
|
163
|
-
|
164
|
-
export const map = <T, U>(
|
165
|
-
collection: T[] | Record<string, T>,
|
166
|
-
iteratee?: ((value: T, index: number | string, collection: T[] | Record<string, T>) => U) | string
|
167
|
-
): U[] => {
|
168
|
-
const fn =
|
169
|
-
typeof iteratee === "function"
|
170
|
-
? iteratee
|
171
|
-
: typeof iteratee === "string"
|
172
|
-
? (item: T) => (item as any)[iteratee]
|
173
|
-
: (item: T) => item as unknown as U
|
174
|
-
|
175
|
-
if (Array.isArray(collection)) {
|
176
|
-
return collection.map((value, index) => fn(value, index, collection))
|
177
|
-
}
|
178
|
-
return Object.keys(collection).map(key => fn(collection[key], key, collection))
|
179
|
-
}
|
180
|
-
|
181
|
-
export function debounce<F extends (...args: any[]) => any>(
|
182
|
-
func: F,
|
183
|
-
wait: number,
|
184
|
-
immediate?: boolean
|
185
|
-
): (...args: Parameters<F>) => void {
|
186
|
-
let timeout: ReturnType<typeof setTimeout> | null;
|
187
|
-
return function(this: any, ...args: any[]) {
|
188
|
-
if (timeout) clearTimeout(timeout);
|
189
|
-
if (immediate && !timeout) {
|
190
|
-
func.apply(this, args);
|
191
|
-
}
|
192
|
-
timeout = setTimeout(() => {
|
193
|
-
timeout = null;
|
194
|
-
if (!immediate) {
|
195
|
-
func.apply(this, args);
|
196
|
-
}
|
197
|
-
}, wait);
|
111
|
+
);
|
112
|
+
return fn(...(finalArgs.concat(args.slice(argIndex)) as Parameters<F>)) as ReturnType<F>;
|
198
113
|
};
|
199
|
-
}
|
114
|
+
};
|
115
|
+
|
116
|
+
partial.placeholder = Symbol();
|
117
|
+
export const _ = partial.placeholder;
|