@jobber/components 6.104.0 → 6.105.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Autocomplete/Autocomplete.types.d.ts +9 -51
- package/dist/Autocomplete/index.cjs +10 -20
- package/dist/Autocomplete/index.mjs +10 -20
- package/dist/Autocomplete/tests/Autocomplete.setup.d.ts +1 -1
- package/dist/Autocomplete/useAutocomplete.d.ts +2 -2
- package/dist/Checkbox/Checkbox.rebuilt.d.ts +2 -2
- package/dist/Checkbox/Checkbox.types.d.ts +24 -18
- package/dist/Checkbox/index.cjs +9 -2
- package/dist/Checkbox/index.mjs +9 -2
- package/dist/Chips/InternalChipDismissible/hooks/index.cjs +2 -2
- package/dist/Chips/InternalChipDismissible/hooks/index.mjs +2 -2
- package/dist/Chips/InternalChipDismissible/index.cjs +2 -2
- package/dist/Chips/InternalChipDismissible/index.mjs +2 -2
- package/dist/Chips/index.cjs +2 -2
- package/dist/Chips/index.mjs +2 -2
- package/dist/DataList/components/DataListHeader/index.cjs +1 -0
- package/dist/DataList/components/DataListHeader/index.mjs +1 -0
- package/dist/DataList/components/DataListItem/index.cjs +1 -0
- package/dist/DataList/components/DataListItem/index.mjs +1 -0
- package/dist/DataList/components/DataListItems/index.cjs +1 -0
- package/dist/DataList/components/DataListItems/index.mjs +1 -0
- package/dist/DataList/components/DataListLayout/index.cjs +1 -0
- package/dist/DataList/components/DataListLayout/index.mjs +1 -0
- package/dist/DataList/components/DataListSearch/index.cjs +2 -12
- package/dist/DataList/components/DataListSearch/index.mjs +2 -12
- package/dist/DataList/index.cjs +1 -8
- package/dist/DataList/index.mjs +1 -8
- package/dist/DataTable/index.cjs +3 -2
- package/dist/DataTable/index.mjs +3 -2
- package/dist/DatePicker/index.cjs +2 -2
- package/dist/DatePicker/index.mjs +2 -2
- package/dist/FormField/FormFieldTypes.d.ts +0 -2
- package/dist/FormField/hooks/useFormFieldWrapperStyles.d.ts +7 -2
- package/dist/FormField-cjs.js +0 -1
- package/dist/FormField-es.js +1 -1
- package/dist/InputDate/InputDate.types.d.ts +12 -7
- package/dist/InputDate/index.cjs +6 -9
- package/dist/InputDate/index.mjs +6 -9
- package/dist/InputDate/useInputDateActivatorActions.d.ts +4 -8
- package/dist/InputEmail/InputEmail.types.d.ts +10 -20
- package/dist/InputEmail/hooks/useInputEmailActions.d.ts +10 -4
- package/dist/InputEmail/index.cjs +43 -49
- package/dist/InputEmail/index.mjs +43 -49
- package/dist/InputNumber/InputNumber.rebuilt.types.d.ts +7 -15
- package/dist/InputNumber/index.cjs +6 -4
- package/dist/InputNumber/index.mjs +6 -4
- package/dist/InputPhoneNumber/InputPhoneNumber.types.d.ts +12 -28
- package/dist/InputPhoneNumber/hooks/useInputPhoneActions.d.ts +9 -4
- package/dist/InputPhoneNumber/index.cjs +48 -36
- package/dist/InputPhoneNumber/index.mjs +48 -36
- package/dist/InputText/InputText.types.d.ts +31 -25
- package/dist/InputText/index.cjs +66 -62
- package/dist/InputText/index.mjs +67 -63
- package/dist/InputText/useInputTextActions.d.ts +10 -4
- package/dist/InputTime/InputTime.rebuilt.d.ts +1 -1
- package/dist/InputTime/InputTime.types.d.ts +13 -4
- package/dist/InputTime/hooks/useInputTimeActions.d.ts +21 -0
- package/dist/InputTime/index.cjs +91 -30
- package/dist/InputTime/index.mjs +94 -33
- package/dist/List/index.cjs +2 -2
- package/dist/List/index.mjs +2 -2
- package/dist/MultiSelect/index.cjs +1 -0
- package/dist/MultiSelect/index.mjs +1 -0
- package/dist/RecurringSelect/index.cjs +3 -2
- package/dist/RecurringSelect/index.mjs +3 -2
- package/dist/Select/Select.types.d.ts +7 -3
- package/dist/Select/hooks/useSelectActions.d.ts +5 -5
- package/dist/Select/index.cjs +27 -41
- package/dist/Select/index.mjs +29 -43
- package/dist/Tabs-es.js +1 -1
- package/dist/_baseEach-cjs.js +12 -12
- package/dist/_baseEach-es.js +1 -1
- package/dist/_baseFlatten-cjs.js +2 -2
- package/dist/_baseFlatten-es.js +1 -1
- package/dist/{_baseGet-cjs.js → _getAllKeys-cjs.js} +181 -181
- package/dist/{_baseGet-es.js → _getAllKeys-es.js} +182 -182
- package/dist/debounce-es.js +1 -1
- package/dist/filterDataAttributes-cjs.js +26 -0
- package/dist/filterDataAttributes-es.js +24 -0
- package/dist/index.cjs +3 -2
- package/dist/index.mjs +3 -2
- package/dist/omit-cjs.js +14 -14
- package/dist/omit-es.js +1 -1
- package/dist/sharedHelpers/filterDataAttributes.d.ts +17 -0
- package/dist/sharedHelpers/types.d.ts +231 -0
- package/dist/useScrollToActive-cjs.js +3 -3
- package/dist/useScrollToActive-es.js +2 -2
- package/package.json +2 -2
- package/dist/InputEmail/hooks/useInputEmailFormField.d.ts +0 -32
- package/dist/InputPhoneNumber/hooks/useInputPhoneFormField.d.ts +0 -71
- package/dist/InputText/useInputTextFormField.d.ts +0 -366
- package/dist/Select/hooks/useSelectFormField.d.ts +0 -34
package/dist/Select/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React__default, {
|
|
1
|
+
import React__default, { useId, useRef } from 'react';
|
|
2
2
|
import { o as omit } from '../omit-es.js';
|
|
3
|
-
import { k as FormField, j as useFormFieldWrapperStyles, b as useAtlantisFormFieldName, f as FormFieldWrapper, l as FormFieldPostFix } from '../FormField-es.js';
|
|
3
|
+
import { k as FormField, j as useFormFieldWrapperStyles, b as useAtlantisFormFieldName, f as FormFieldWrapper, l as FormFieldPostFix, m as mergeRefs } from '../FormField-es.js';
|
|
4
4
|
import classnames from 'classnames';
|
|
5
5
|
import '../tslib.es6-es.js';
|
|
6
6
|
import 'react-hook-form';
|
|
@@ -8,13 +8,14 @@ import '@jobber/hooks';
|
|
|
8
8
|
import 'framer-motion';
|
|
9
9
|
import '@jobber/design';
|
|
10
10
|
import '../Button-es.js';
|
|
11
|
+
import { f as filterDataAttributes } from '../filterDataAttributes-es.js';
|
|
11
12
|
import '../_commonjsHelpers-es.js';
|
|
12
|
-
import '../
|
|
13
|
+
import '../_getAllKeys-es.js';
|
|
13
14
|
import '../isTypedArray-es.js';
|
|
14
15
|
import '../isObjectLike-es.js';
|
|
16
|
+
import '../isSymbol-es.js';
|
|
15
17
|
import '../identity-es.js';
|
|
16
18
|
import '../_getTag-es.js';
|
|
17
|
-
import '../isSymbol-es.js';
|
|
18
19
|
import '../keysIn-es.js';
|
|
19
20
|
import '../_baseAssignValue-es.js';
|
|
20
21
|
import '../_baseFlatten-es.js';
|
|
@@ -40,11 +41,11 @@ function useSelectActions({ onChange, onBlur, onFocus, }) {
|
|
|
40
41
|
const newValue = event.currentTarget.value;
|
|
41
42
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue, event);
|
|
42
43
|
}
|
|
43
|
-
function handleBlur() {
|
|
44
|
-
onBlur === null || onBlur === void 0 ? void 0 : onBlur();
|
|
44
|
+
function handleBlur(event) {
|
|
45
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
|
|
45
46
|
}
|
|
46
|
-
function handleFocus() {
|
|
47
|
-
onFocus === null || onFocus === void 0 ? void 0 : onFocus();
|
|
47
|
+
function handleFocus(event) {
|
|
48
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(event);
|
|
48
49
|
}
|
|
49
50
|
return {
|
|
50
51
|
handleChange,
|
|
@@ -53,27 +54,16 @@ function useSelectActions({ onChange, onBlur, onFocus, }) {
|
|
|
53
54
|
};
|
|
54
55
|
}
|
|
55
56
|
|
|
56
|
-
/**
|
|
57
|
-
* Hook for managing the props of a Select component.
|
|
58
|
-
* Extracted from FormField's useAtlantisFormField.
|
|
59
|
-
*/
|
|
60
|
-
function useSelectFormField({ id, name, disabled, autofocus, description, inline, value, handleChange, handleBlur, handleFocus, }) {
|
|
61
|
-
const descriptionIdentifier = `descriptionUUID--${id}`;
|
|
62
|
-
const fieldProps = Object.assign({ id,
|
|
63
|
-
name,
|
|
64
|
-
disabled, autoFocus: autofocus, onChange: handleChange, onBlur: handleBlur, onFocus: handleFocus, value }, (description &&
|
|
65
|
-
!inline && { "aria-describedby": descriptionIdentifier }));
|
|
66
|
-
return { fieldProps, descriptionIdentifier };
|
|
67
|
-
}
|
|
68
|
-
|
|
69
57
|
var styles = {"select":"-hmXAsAfH9U-","selectPostfix":"_5ST4c1fXDYU-","spinning":"oOACJmrVDf0-"};
|
|
70
58
|
|
|
71
59
|
function SelectRebuilt(props) {
|
|
72
|
-
var _a
|
|
73
|
-
const
|
|
74
|
-
const wrapperRef = useRef(null);
|
|
60
|
+
var _a;
|
|
61
|
+
const { mergedRef, wrapperRef } = useSelectRefs(props.inputRef);
|
|
75
62
|
const { inputStyle } = useFormFieldWrapperStyles(Object.assign({}, omit(props, ["version"])));
|
|
76
|
-
const
|
|
63
|
+
const dataAttrs = filterDataAttributes(props);
|
|
64
|
+
const generatedId = useId();
|
|
65
|
+
const id = props.id || generatedId;
|
|
66
|
+
const descriptionIdentifier = `descriptionUUID--${id}`;
|
|
77
67
|
const { name } = useAtlantisFormFieldName({
|
|
78
68
|
nameProp: props.name,
|
|
79
69
|
id: id,
|
|
@@ -83,27 +73,23 @@ function SelectRebuilt(props) {
|
|
|
83
73
|
onBlur: props.onBlur,
|
|
84
74
|
onFocus: props.onFocus,
|
|
85
75
|
});
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
"onFocus",
|
|
90
|
-
"size",
|
|
91
|
-
"placeholder",
|
|
92
|
-
"version",
|
|
93
|
-
]);
|
|
94
|
-
const { fieldProps, descriptionIdentifier } = useSelectFormField(Object.assign(Object.assign({}, inputProps), { id,
|
|
95
|
-
name,
|
|
96
|
-
handleChange,
|
|
97
|
-
handleBlur,
|
|
98
|
-
handleFocus }));
|
|
99
|
-
return (React__default.createElement(FormFieldWrapper, { disabled: props.disabled, size: props.size, align: props.align, inline: props.inline, autofocus: props.autofocus, name: name, wrapperRef: wrapperRef, error: (_b = props.error) !== null && _b !== void 0 ? _b : "", invalid: props.invalid, identifier: id, descriptionIdentifier: descriptionIdentifier, description: props.description, type: "select", placeholder: props.placeholder, value: props.value, prefix: props.prefix, suffix: props.suffix, clearable: "never", maxLength: props.maxLength },
|
|
76
|
+
const descriptionVisible = props.description && !props.inline;
|
|
77
|
+
const isInvalid = Boolean(props.error || props.invalid);
|
|
78
|
+
return (React__default.createElement(FormFieldWrapper, { disabled: props.disabled, size: props.size, align: props.align, inline: props.inline, name: name, wrapperRef: wrapperRef, error: (_a = props.error) !== null && _a !== void 0 ? _a : "", invalid: props.invalid, identifier: id, descriptionIdentifier: descriptionIdentifier, description: props.description, type: "select", placeholder: props.placeholder, value: props.value, prefix: props.prefix, suffix: props.suffix, clearable: "never" },
|
|
100
79
|
React__default.createElement(React__default.Fragment, null,
|
|
101
|
-
React__default.createElement("select", Object.assign({
|
|
80
|
+
React__default.createElement("select", Object.assign({ id: id, name: name, disabled: props.disabled, autoFocus: props.autoFocus, onChange: handleChange, onBlur: handleBlur, onFocus: handleFocus, value: props.value, "aria-label": props["aria-label"], "aria-describedby": descriptionVisible
|
|
81
|
+
? descriptionIdentifier
|
|
82
|
+
: props["aria-describedby"], "aria-invalid": isInvalid ? true : undefined, "aria-required": props["aria-required"], ref: mergedRef, className: classnames(inputStyle, props.UNSAFE_experimentalStyles && styles.select) }, dataAttrs), props.children),
|
|
102
83
|
React__default.createElement(FormFieldPostFix, { variation: "select", className: styles.selectPostfix }))));
|
|
103
84
|
}
|
|
104
|
-
function
|
|
105
|
-
const
|
|
106
|
-
|
|
85
|
+
function useSelectRefs(inputRef) {
|
|
86
|
+
const internalRef = useRef(null);
|
|
87
|
+
const mergedRef = mergeRefs([
|
|
88
|
+
internalRef,
|
|
89
|
+
inputRef,
|
|
90
|
+
]);
|
|
91
|
+
const wrapperRef = useRef(null);
|
|
92
|
+
return { mergedRef, wrapperRef };
|
|
107
93
|
}
|
|
108
94
|
|
|
109
95
|
function SelectOption({ children, disabled, value }) {
|
package/dist/Tabs-es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default, { useState, useRef, useCallback, useEffect } from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
import { g as getDefaultExportFromCjs } from './_commonjsHelpers-es.js';
|
|
4
|
-
import {
|
|
4
|
+
import { d as debounce_1 } from './debounce-es.js';
|
|
5
5
|
import { a as isObject_1 } from './isObjectLike-es.js';
|
|
6
6
|
import { T as Typography } from './Typography-es.js';
|
|
7
7
|
|
package/dist/_baseEach-cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var identity$1 = require('./identity-cjs.js');
|
|
4
4
|
var isObjectLike$1 = require('./isObjectLike-cjs.js');
|
|
5
|
-
var
|
|
5
|
+
var _getAllKeys = require('./_getAllKeys-cjs.js');
|
|
6
6
|
var _getTag = require('./_getTag-cjs.js');
|
|
7
7
|
var isTypedArray$1 = require('./isTypedArray-cjs.js');
|
|
8
8
|
var _commonjsHelpers = require('./_commonjsHelpers-cjs.js');
|
|
@@ -351,7 +351,7 @@ function equalByTag$1(object, other, tag, bitmask, customizer, equalFunc, stack)
|
|
|
351
351
|
|
|
352
352
|
var _equalByTag = equalByTag$1;
|
|
353
353
|
|
|
354
|
-
var getAllKeys =
|
|
354
|
+
var getAllKeys = _getAllKeys._getAllKeys;
|
|
355
355
|
|
|
356
356
|
/** Used to compose bitmasks for value comparisons. */
|
|
357
357
|
var COMPARE_PARTIAL_FLAG$3 = 1;
|
|
@@ -635,7 +635,7 @@ function isStrictComparable$2(value) {
|
|
|
635
635
|
var _isStrictComparable = isStrictComparable$2;
|
|
636
636
|
|
|
637
637
|
var isStrictComparable$1 = _isStrictComparable,
|
|
638
|
-
keys$1 =
|
|
638
|
+
keys$1 = _getAllKeys.keys_1;
|
|
639
639
|
|
|
640
640
|
/**
|
|
641
641
|
* Gets the property names, values, and compare flags of `object`.
|
|
@@ -704,7 +704,7 @@ function baseMatches$1(source) {
|
|
|
704
704
|
|
|
705
705
|
var _baseMatches = baseMatches$1;
|
|
706
706
|
|
|
707
|
-
var baseGet$1 =
|
|
707
|
+
var baseGet$1 = _getAllKeys._baseGet;
|
|
708
708
|
|
|
709
709
|
/**
|
|
710
710
|
* Gets the value at `path` of `object`. If the resolved value is
|
|
@@ -755,12 +755,12 @@ function baseHasIn$1(object, key) {
|
|
|
755
755
|
|
|
756
756
|
var _baseHasIn = baseHasIn$1;
|
|
757
757
|
|
|
758
|
-
var castPath =
|
|
758
|
+
var castPath = _getAllKeys._castPath,
|
|
759
759
|
isArguments = isTypedArray$1.isArguments_1,
|
|
760
760
|
isArray$1 = isTypedArray$1.isArray_1,
|
|
761
761
|
isIndex = identity$1._isIndex,
|
|
762
762
|
isLength = isTypedArray$1.isLength_1,
|
|
763
|
-
toKey$2 =
|
|
763
|
+
toKey$2 = _getAllKeys._toKey;
|
|
764
764
|
|
|
765
765
|
/**
|
|
766
766
|
* Checks if `path` exists on `object`.
|
|
@@ -833,10 +833,10 @@ var hasIn_1 = hasIn$1;
|
|
|
833
833
|
var baseIsEqual = _baseIsEqual,
|
|
834
834
|
get = get_1,
|
|
835
835
|
hasIn = hasIn_1,
|
|
836
|
-
isKey$1 =
|
|
836
|
+
isKey$1 = _getAllKeys._isKey,
|
|
837
837
|
isStrictComparable = _isStrictComparable,
|
|
838
838
|
matchesStrictComparable = _matchesStrictComparable,
|
|
839
|
-
toKey$1 =
|
|
839
|
+
toKey$1 = _getAllKeys._toKey;
|
|
840
840
|
|
|
841
841
|
/** Used to compose bitmasks for value comparisons. */
|
|
842
842
|
var COMPARE_PARTIAL_FLAG = 1,
|
|
@@ -880,7 +880,7 @@ function baseProperty$1(key) {
|
|
|
880
880
|
|
|
881
881
|
var _baseProperty = baseProperty$1;
|
|
882
882
|
|
|
883
|
-
var baseGet =
|
|
883
|
+
var baseGet = _getAllKeys._baseGet;
|
|
884
884
|
|
|
885
885
|
/**
|
|
886
886
|
* A specialized version of `baseProperty` which supports deep paths.
|
|
@@ -899,8 +899,8 @@ var _basePropertyDeep = basePropertyDeep$1;
|
|
|
899
899
|
|
|
900
900
|
var baseProperty = _baseProperty,
|
|
901
901
|
basePropertyDeep = _basePropertyDeep,
|
|
902
|
-
isKey =
|
|
903
|
-
toKey =
|
|
902
|
+
isKey = _getAllKeys._isKey,
|
|
903
|
+
toKey = _getAllKeys._toKey;
|
|
904
904
|
|
|
905
905
|
/**
|
|
906
906
|
* Creates a function that returns the value at `path` of a given object.
|
|
@@ -963,7 +963,7 @@ function baseIteratee(value) {
|
|
|
963
963
|
var _baseIteratee = baseIteratee;
|
|
964
964
|
|
|
965
965
|
var baseFor = _baseFor._baseFor,
|
|
966
|
-
keys =
|
|
966
|
+
keys = _getAllKeys.keys_1;
|
|
967
967
|
|
|
968
968
|
/**
|
|
969
969
|
* The base implementation of `_.forOwn` without support for iteratee shorthands.
|
package/dist/_baseEach-es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { g as _MapCache, d as _Uint8Array, e as eq_1, c as _Stack, a as _isIndex, i as identity_1 } from './identity-es.js';
|
|
2
2
|
import { b as _Symbol, i as isObjectLike_1, a as isObject_1 } from './isObjectLike-es.js';
|
|
3
|
-
import { e as _getAllKeys, k as keys_1, b as _baseGet, f as _castPath, g as _toKey, h as _isKey } from './
|
|
3
|
+
import { e as _getAllKeys, k as keys_1, b as _baseGet, f as _castPath, g as _toKey, h as _isKey } from './_getAllKeys-es.js';
|
|
4
4
|
import { a as _getTag } from './_getTag-es.js';
|
|
5
5
|
import { c as isBufferExports, d as isTypedArray_1, a as isArray_1, i as isArguments_1, m as isLength_1, b as isArrayLike_1 } from './isTypedArray-es.js';
|
|
6
6
|
import { g as getDefaultExportFromCjs } from './_commonjsHelpers-es.js';
|
package/dist/_baseFlatten-cjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _getAllKeys = require('./_getAllKeys-cjs.js');
|
|
4
4
|
var isObjectLike = require('./isObjectLike-cjs.js');
|
|
5
5
|
var isTypedArray = require('./isTypedArray-cjs.js');
|
|
6
6
|
|
|
@@ -25,7 +25,7 @@ function isFlattenable$1(value) {
|
|
|
25
25
|
|
|
26
26
|
var _isFlattenable = isFlattenable$1;
|
|
27
27
|
|
|
28
|
-
var arrayPush =
|
|
28
|
+
var arrayPush = _getAllKeys._arrayPush,
|
|
29
29
|
isFlattenable = _isFlattenable;
|
|
30
30
|
|
|
31
31
|
/**
|
package/dist/_baseFlatten-es.js
CHANGED
|
@@ -1,154 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var isTypedArray = require('./isTypedArray-cjs.js');
|
|
4
|
-
var identity = require('./identity-cjs.js');
|
|
5
|
-
var _getTag = require('./_getTag-cjs.js');
|
|
6
4
|
var isSymbol$3 = require('./isSymbol-cjs.js');
|
|
5
|
+
var identity = require('./identity-cjs.js');
|
|
7
6
|
var isObjectLike = require('./isObjectLike-cjs.js');
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* A specialized version of `_.map` for arrays without support for iteratee
|
|
11
|
-
* shorthands.
|
|
12
|
-
*
|
|
13
|
-
* @private
|
|
14
|
-
* @param {Array} [array] The array to iterate over.
|
|
15
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
16
|
-
* @returns {Array} Returns the new mapped array.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
function arrayMap$1(array, iteratee) {
|
|
20
|
-
var index = -1,
|
|
21
|
-
length = array == null ? 0 : array.length,
|
|
22
|
-
result = Array(length);
|
|
23
|
-
|
|
24
|
-
while (++index < length) {
|
|
25
|
-
result[index] = iteratee(array[index], index, array);
|
|
26
|
-
}
|
|
27
|
-
return result;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
var _arrayMap = arrayMap$1;
|
|
31
|
-
|
|
32
|
-
var arrayLikeKeys = identity._arrayLikeKeys,
|
|
33
|
-
baseKeys = _getTag._baseKeys,
|
|
34
|
-
isArrayLike = isTypedArray.isArrayLike_1;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Creates an array of the own enumerable property names of `object`.
|
|
38
|
-
*
|
|
39
|
-
* **Note:** Non-object values are coerced to objects. See the
|
|
40
|
-
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
41
|
-
* for more details.
|
|
42
|
-
*
|
|
43
|
-
* @static
|
|
44
|
-
* @since 0.1.0
|
|
45
|
-
* @memberOf _
|
|
46
|
-
* @category Object
|
|
47
|
-
* @param {Object} object The object to query.
|
|
48
|
-
* @returns {Array} Returns the array of property names.
|
|
49
|
-
* @example
|
|
50
|
-
*
|
|
51
|
-
* function Foo() {
|
|
52
|
-
* this.a = 1;
|
|
53
|
-
* this.b = 2;
|
|
54
|
-
* }
|
|
55
|
-
*
|
|
56
|
-
* Foo.prototype.c = 3;
|
|
57
|
-
*
|
|
58
|
-
* _.keys(new Foo);
|
|
59
|
-
* // => ['a', 'b'] (iteration order is not guaranteed)
|
|
60
|
-
*
|
|
61
|
-
* _.keys('hi');
|
|
62
|
-
* // => ['0', '1']
|
|
63
|
-
*/
|
|
64
|
-
function keys$1(object) {
|
|
65
|
-
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
var keys_1 = keys$1;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* A specialized version of `_.filter` for arrays without support for
|
|
72
|
-
* iteratee shorthands.
|
|
73
|
-
*
|
|
74
|
-
* @private
|
|
75
|
-
* @param {Array} [array] The array to iterate over.
|
|
76
|
-
* @param {Function} predicate The function invoked per iteration.
|
|
77
|
-
* @returns {Array} Returns the new filtered array.
|
|
78
|
-
*/
|
|
79
|
-
|
|
80
|
-
function arrayFilter$1(array, predicate) {
|
|
81
|
-
var index = -1,
|
|
82
|
-
length = array == null ? 0 : array.length,
|
|
83
|
-
resIndex = 0,
|
|
84
|
-
result = [];
|
|
85
|
-
|
|
86
|
-
while (++index < length) {
|
|
87
|
-
var value = array[index];
|
|
88
|
-
if (predicate(value, index, array)) {
|
|
89
|
-
result[resIndex++] = value;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
return result;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
var _arrayFilter = arrayFilter$1;
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* This method returns a new empty array.
|
|
99
|
-
*
|
|
100
|
-
* @static
|
|
101
|
-
* @memberOf _
|
|
102
|
-
* @since 4.13.0
|
|
103
|
-
* @category Util
|
|
104
|
-
* @returns {Array} Returns the new empty array.
|
|
105
|
-
* @example
|
|
106
|
-
*
|
|
107
|
-
* var arrays = _.times(2, _.stubArray);
|
|
108
|
-
*
|
|
109
|
-
* console.log(arrays);
|
|
110
|
-
* // => [[], []]
|
|
111
|
-
*
|
|
112
|
-
* console.log(arrays[0] === arrays[1]);
|
|
113
|
-
* // => false
|
|
114
|
-
*/
|
|
115
|
-
|
|
116
|
-
function stubArray$1() {
|
|
117
|
-
return [];
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
var stubArray_1 = stubArray$1;
|
|
121
|
-
|
|
122
|
-
var arrayFilter = _arrayFilter,
|
|
123
|
-
stubArray = stubArray_1;
|
|
124
|
-
|
|
125
|
-
/** Used for built-in method references. */
|
|
126
|
-
var objectProto = Object.prototype;
|
|
127
|
-
|
|
128
|
-
/** Built-in value references. */
|
|
129
|
-
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
130
|
-
|
|
131
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
132
|
-
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Creates an array of the own enumerable symbols of `object`.
|
|
136
|
-
*
|
|
137
|
-
* @private
|
|
138
|
-
* @param {Object} object The object to query.
|
|
139
|
-
* @returns {Array} Returns the array of symbols.
|
|
140
|
-
*/
|
|
141
|
-
var getSymbols$1 = !nativeGetSymbols ? stubArray : function(object) {
|
|
142
|
-
if (object == null) {
|
|
143
|
-
return [];
|
|
144
|
-
}
|
|
145
|
-
object = Object(object);
|
|
146
|
-
return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
|
147
|
-
return propertyIsEnumerable.call(object, symbol);
|
|
148
|
-
});
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
var _getSymbols = getSymbols$1;
|
|
7
|
+
var _getTag = require('./_getTag-cjs.js');
|
|
152
8
|
|
|
153
9
|
/**
|
|
154
10
|
* Appends the elements of `values` to `array`.
|
|
@@ -172,45 +28,30 @@ function arrayPush$1(array, values) {
|
|
|
172
28
|
|
|
173
29
|
var _arrayPush = arrayPush$1;
|
|
174
30
|
|
|
175
|
-
var arrayPush = _arrayPush,
|
|
176
|
-
isArray$3 = isTypedArray.isArray_1;
|
|
177
|
-
|
|
178
31
|
/**
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
* symbols of `object`.
|
|
32
|
+
* A specialized version of `_.map` for arrays without support for iteratee
|
|
33
|
+
* shorthands.
|
|
182
34
|
*
|
|
183
35
|
* @private
|
|
184
|
-
* @param {
|
|
185
|
-
* @param {Function}
|
|
186
|
-
* @
|
|
187
|
-
* @returns {Array} Returns the array of property names and symbols.
|
|
36
|
+
* @param {Array} [array] The array to iterate over.
|
|
37
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
38
|
+
* @returns {Array} Returns the new mapped array.
|
|
188
39
|
*/
|
|
189
|
-
function baseGetAllKeys$1(object, keysFunc, symbolsFunc) {
|
|
190
|
-
var result = keysFunc(object);
|
|
191
|
-
return isArray$3(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
192
|
-
}
|
|
193
40
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
keys = keys_1;
|
|
41
|
+
function arrayMap$1(array, iteratee) {
|
|
42
|
+
var index = -1,
|
|
43
|
+
length = array == null ? 0 : array.length,
|
|
44
|
+
result = Array(length);
|
|
199
45
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
* @param {Object} object The object to query.
|
|
205
|
-
* @returns {Array} Returns the array of property names and symbols.
|
|
206
|
-
*/
|
|
207
|
-
function getAllKeys(object) {
|
|
208
|
-
return baseGetAllKeys(object, keys, getSymbols);
|
|
46
|
+
while (++index < length) {
|
|
47
|
+
result[index] = iteratee(array[index], index, array);
|
|
48
|
+
}
|
|
49
|
+
return result;
|
|
209
50
|
}
|
|
210
51
|
|
|
211
|
-
var
|
|
52
|
+
var _arrayMap = arrayMap$1;
|
|
212
53
|
|
|
213
|
-
var isArray$
|
|
54
|
+
var isArray$3 = isTypedArray.isArray_1,
|
|
214
55
|
isSymbol$2 = isSymbol$3.isSymbol_1;
|
|
215
56
|
|
|
216
57
|
/** Used to match property names within property paths. */
|
|
@@ -226,7 +67,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
|
226
67
|
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
227
68
|
*/
|
|
228
69
|
function isKey$1(value, object) {
|
|
229
|
-
if (isArray$
|
|
70
|
+
if (isArray$3(value)) {
|
|
230
71
|
return false;
|
|
231
72
|
}
|
|
232
73
|
var type = typeof value;
|
|
@@ -371,7 +212,7 @@ var _stringToPath = stringToPath$1;
|
|
|
371
212
|
|
|
372
213
|
var Symbol = isObjectLike._Symbol,
|
|
373
214
|
arrayMap = _arrayMap,
|
|
374
|
-
isArray$
|
|
215
|
+
isArray$2 = isTypedArray.isArray_1,
|
|
375
216
|
isSymbol$1 = isSymbol$3.isSymbol_1;
|
|
376
217
|
|
|
377
218
|
/** Used as references for various `Number` constants. */
|
|
@@ -394,7 +235,7 @@ function baseToString$1(value) {
|
|
|
394
235
|
if (typeof value == 'string') {
|
|
395
236
|
return value;
|
|
396
237
|
}
|
|
397
|
-
if (isArray$
|
|
238
|
+
if (isArray$2(value)) {
|
|
398
239
|
// Recursively convert values (susceptible to call stack limits).
|
|
399
240
|
return arrayMap(value, baseToString$1) + '';
|
|
400
241
|
}
|
|
@@ -436,7 +277,7 @@ function toString$1(value) {
|
|
|
436
277
|
|
|
437
278
|
var toString_1 = toString$1;
|
|
438
279
|
|
|
439
|
-
var isArray = isTypedArray.isArray_1,
|
|
280
|
+
var isArray$1 = isTypedArray.isArray_1,
|
|
440
281
|
isKey = _isKey,
|
|
441
282
|
stringToPath = _stringToPath,
|
|
442
283
|
toString = toString_1;
|
|
@@ -450,7 +291,7 @@ var isArray = isTypedArray.isArray_1,
|
|
|
450
291
|
* @returns {Array} Returns the cast property path array.
|
|
451
292
|
*/
|
|
452
293
|
function castPath$1(value, object) {
|
|
453
|
-
if (isArray(value)) {
|
|
294
|
+
if (isArray$1(value)) {
|
|
454
295
|
return value;
|
|
455
296
|
}
|
|
456
297
|
return isKey(value, object) ? [value] : stringToPath(toString(value));
|
|
@@ -505,6 +346,165 @@ function baseGet(object, path) {
|
|
|
505
346
|
|
|
506
347
|
var _baseGet = baseGet;
|
|
507
348
|
|
|
349
|
+
var arrayPush = _arrayPush,
|
|
350
|
+
isArray = isTypedArray.isArray_1;
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
|
|
354
|
+
* `keysFunc` and `symbolsFunc` to get the enumerable property names and
|
|
355
|
+
* symbols of `object`.
|
|
356
|
+
*
|
|
357
|
+
* @private
|
|
358
|
+
* @param {Object} object The object to query.
|
|
359
|
+
* @param {Function} keysFunc The function to get the keys of `object`.
|
|
360
|
+
* @param {Function} symbolsFunc The function to get the symbols of `object`.
|
|
361
|
+
* @returns {Array} Returns the array of property names and symbols.
|
|
362
|
+
*/
|
|
363
|
+
function baseGetAllKeys$1(object, keysFunc, symbolsFunc) {
|
|
364
|
+
var result = keysFunc(object);
|
|
365
|
+
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
var _baseGetAllKeys = baseGetAllKeys$1;
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* A specialized version of `_.filter` for arrays without support for
|
|
372
|
+
* iteratee shorthands.
|
|
373
|
+
*
|
|
374
|
+
* @private
|
|
375
|
+
* @param {Array} [array] The array to iterate over.
|
|
376
|
+
* @param {Function} predicate The function invoked per iteration.
|
|
377
|
+
* @returns {Array} Returns the new filtered array.
|
|
378
|
+
*/
|
|
379
|
+
|
|
380
|
+
function arrayFilter$1(array, predicate) {
|
|
381
|
+
var index = -1,
|
|
382
|
+
length = array == null ? 0 : array.length,
|
|
383
|
+
resIndex = 0,
|
|
384
|
+
result = [];
|
|
385
|
+
|
|
386
|
+
while (++index < length) {
|
|
387
|
+
var value = array[index];
|
|
388
|
+
if (predicate(value, index, array)) {
|
|
389
|
+
result[resIndex++] = value;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
return result;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
var _arrayFilter = arrayFilter$1;
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* This method returns a new empty array.
|
|
399
|
+
*
|
|
400
|
+
* @static
|
|
401
|
+
* @memberOf _
|
|
402
|
+
* @since 4.13.0
|
|
403
|
+
* @category Util
|
|
404
|
+
* @returns {Array} Returns the new empty array.
|
|
405
|
+
* @example
|
|
406
|
+
*
|
|
407
|
+
* var arrays = _.times(2, _.stubArray);
|
|
408
|
+
*
|
|
409
|
+
* console.log(arrays);
|
|
410
|
+
* // => [[], []]
|
|
411
|
+
*
|
|
412
|
+
* console.log(arrays[0] === arrays[1]);
|
|
413
|
+
* // => false
|
|
414
|
+
*/
|
|
415
|
+
|
|
416
|
+
function stubArray$1() {
|
|
417
|
+
return [];
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
var stubArray_1 = stubArray$1;
|
|
421
|
+
|
|
422
|
+
var arrayFilter = _arrayFilter,
|
|
423
|
+
stubArray = stubArray_1;
|
|
424
|
+
|
|
425
|
+
/** Used for built-in method references. */
|
|
426
|
+
var objectProto = Object.prototype;
|
|
427
|
+
|
|
428
|
+
/** Built-in value references. */
|
|
429
|
+
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
430
|
+
|
|
431
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
432
|
+
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Creates an array of the own enumerable symbols of `object`.
|
|
436
|
+
*
|
|
437
|
+
* @private
|
|
438
|
+
* @param {Object} object The object to query.
|
|
439
|
+
* @returns {Array} Returns the array of symbols.
|
|
440
|
+
*/
|
|
441
|
+
var getSymbols$1 = !nativeGetSymbols ? stubArray : function(object) {
|
|
442
|
+
if (object == null) {
|
|
443
|
+
return [];
|
|
444
|
+
}
|
|
445
|
+
object = Object(object);
|
|
446
|
+
return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
|
447
|
+
return propertyIsEnumerable.call(object, symbol);
|
|
448
|
+
});
|
|
449
|
+
};
|
|
450
|
+
|
|
451
|
+
var _getSymbols = getSymbols$1;
|
|
452
|
+
|
|
453
|
+
var arrayLikeKeys = identity._arrayLikeKeys,
|
|
454
|
+
baseKeys = _getTag._baseKeys,
|
|
455
|
+
isArrayLike = isTypedArray.isArrayLike_1;
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Creates an array of the own enumerable property names of `object`.
|
|
459
|
+
*
|
|
460
|
+
* **Note:** Non-object values are coerced to objects. See the
|
|
461
|
+
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
462
|
+
* for more details.
|
|
463
|
+
*
|
|
464
|
+
* @static
|
|
465
|
+
* @since 0.1.0
|
|
466
|
+
* @memberOf _
|
|
467
|
+
* @category Object
|
|
468
|
+
* @param {Object} object The object to query.
|
|
469
|
+
* @returns {Array} Returns the array of property names.
|
|
470
|
+
* @example
|
|
471
|
+
*
|
|
472
|
+
* function Foo() {
|
|
473
|
+
* this.a = 1;
|
|
474
|
+
* this.b = 2;
|
|
475
|
+
* }
|
|
476
|
+
*
|
|
477
|
+
* Foo.prototype.c = 3;
|
|
478
|
+
*
|
|
479
|
+
* _.keys(new Foo);
|
|
480
|
+
* // => ['a', 'b'] (iteration order is not guaranteed)
|
|
481
|
+
*
|
|
482
|
+
* _.keys('hi');
|
|
483
|
+
* // => ['0', '1']
|
|
484
|
+
*/
|
|
485
|
+
function keys$1(object) {
|
|
486
|
+
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
var keys_1 = keys$1;
|
|
490
|
+
|
|
491
|
+
var baseGetAllKeys = _baseGetAllKeys,
|
|
492
|
+
getSymbols = _getSymbols,
|
|
493
|
+
keys = keys_1;
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* Creates an array of own enumerable property names and symbols of `object`.
|
|
497
|
+
*
|
|
498
|
+
* @private
|
|
499
|
+
* @param {Object} object The object to query.
|
|
500
|
+
* @returns {Array} Returns the array of property names and symbols.
|
|
501
|
+
*/
|
|
502
|
+
function getAllKeys(object) {
|
|
503
|
+
return baseGetAllKeys(object, keys, getSymbols);
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
var _getAllKeys = getAllKeys;
|
|
507
|
+
|
|
508
508
|
exports._arrayMap = _arrayMap;
|
|
509
509
|
exports._arrayPush = _arrayPush;
|
|
510
510
|
exports._baseGet = _baseGet;
|