@devtron-labs/devtron-fe-common-lib 0.0.44 → 0.0.45-beta-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Common/CustomInput/CustomInput.d.ts +3 -0
- package/dist/Common/CustomInput/Types.d.ts +24 -0
- package/dist/Common/CustomInput/index.d.ts +2 -0
- package/dist/Common/Helper.d.ts +1 -17
- package/dist/Common/index.d.ts +1 -0
- package/dist/index.js +127 -122
- package/package.json +1 -1
- package/src/Common/CustomInput/CustomInput.tsx +92 -0
- package/src/Common/CustomInput/Types.ts +23 -0
- package/src/Common/CustomInput/index.ts +2 -0
- package/src/Common/Helper.tsx +2 -61
- package/src/Common/Types.ts +1 -1
- package/src/Common/index.ts +1 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CustomInputProps } from "./Types";
|
|
3
|
+
export declare function CustomInput({ name, value, error, onChange, onBlur, onFocus, label, type, disabled, labelClassName, placeholder, tabIndex, dataTestid, isRequiredField, autoFocus, rootClassName, autoComplete, showLink, linkText, link, helperText, }: CustomInputProps): JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface CustomInputProps {
|
|
3
|
+
name: string;
|
|
4
|
+
value: string | number;
|
|
5
|
+
onChange: (e: any) => void;
|
|
6
|
+
onBlur?: (e: any) => void;
|
|
7
|
+
onFocus?: (e: any) => void;
|
|
8
|
+
autoComplete?: string;
|
|
9
|
+
label?: React.ReactNode;
|
|
10
|
+
labelClassName?: string;
|
|
11
|
+
type?: 'text' | 'number';
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
tabIndex?: number;
|
|
15
|
+
dataTestid?: string;
|
|
16
|
+
isRequiredField?: boolean;
|
|
17
|
+
autoFocus?: boolean;
|
|
18
|
+
rootClassName?: string;
|
|
19
|
+
showLink?: boolean;
|
|
20
|
+
link?: string;
|
|
21
|
+
linkText?: string;
|
|
22
|
+
error?: React.ReactNode;
|
|
23
|
+
helperText?: string;
|
|
24
|
+
}
|
package/dist/Common/Helper.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export declare function sortCallback(key: string, a: any, b: any, isCaseSensitiv
|
|
|
12
12
|
export declare const stopPropagation: (event: any) => void;
|
|
13
13
|
export declare function useThrottledEffect(callback: any, delay: any, deps?: any[]): void;
|
|
14
14
|
export declare function getRandomColor(email: string): string;
|
|
15
|
-
export declare const getAlphabetIcon: (str: string) => JSX.Element;
|
|
15
|
+
export declare const getAlphabetIcon: (str: string, rootClassName?: string) => JSX.Element;
|
|
16
16
|
export declare const getEmptyArrayOfLength: (length: number) => unknown[];
|
|
17
17
|
export declare function noop(...args: any[]): any;
|
|
18
18
|
export declare function not(e: any): boolean;
|
|
@@ -25,22 +25,6 @@ export declare function useForm(stateSchema: any, validationSchema: {}, callback
|
|
|
25
25
|
handleOnChange: (event: any) => void;
|
|
26
26
|
handleOnSubmit: (event: any) => void;
|
|
27
27
|
};
|
|
28
|
-
export declare function CustomInput({ name, value, error, onChange, onBlur, onFocus, label, type, disabled, autoComplete, labelClassName, placeholder, tabIndex, dataTestid, }: {
|
|
29
|
-
name: any;
|
|
30
|
-
value: any;
|
|
31
|
-
error: any;
|
|
32
|
-
onChange: any;
|
|
33
|
-
onBlur?: (e: any) => void;
|
|
34
|
-
onFocus?: (e: any) => void;
|
|
35
|
-
label: any;
|
|
36
|
-
type?: string;
|
|
37
|
-
disabled?: boolean;
|
|
38
|
-
autoComplete?: string;
|
|
39
|
-
labelClassName?: string;
|
|
40
|
-
placeholder?: string;
|
|
41
|
-
tabIndex?: number;
|
|
42
|
-
dataTestid?: string;
|
|
43
|
-
}): JSX.Element;
|
|
44
28
|
export declare function handleUTCTime(ts: string, isRelativeTime?: boolean): string;
|
|
45
29
|
export declare function useSearchString(): UseSearchString;
|
|
46
30
|
export declare const closeOnEscKeyPressed: (e: any, actionClose: () => void) => void;
|
package/dist/Common/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -9836,28 +9836,6 @@ var moment$1 = {
|
|
|
9836
9836
|
|
|
9837
9837
|
var moment = momentExports;
|
|
9838
9838
|
|
|
9839
|
-
var _g$5;
|
|
9840
|
-
function _extends$k() { _extends$k = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
|
|
9841
|
-
var SvgIcWarning = function SvgIcWarning(props) {
|
|
9842
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
|
|
9843
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
9844
|
-
width: "1em",
|
|
9845
|
-
height: "1em",
|
|
9846
|
-
viewBox: "0 0 32 32"
|
|
9847
|
-
}, props), _g$5 || (_g$5 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
9848
|
-
fill: "none",
|
|
9849
|
-
fillRule: "evenodd"
|
|
9850
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
9851
|
-
d: "M0 0h32v32H0z"
|
|
9852
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
9853
|
-
fill: "#FFCB5D",
|
|
9854
|
-
d: "M18.315 5.052 29.72 25.01A2.667 2.667 0 0 1 27.405 29H4.595a2.667 2.667 0 0 1-2.315-3.99L13.685 5.052a2.667 2.667 0 0 1 4.63 0z"
|
|
9855
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
9856
|
-
fill: "#FFF",
|
|
9857
|
-
d: "M16 22.667a1.333 1.333 0 1 1 0 2.666 1.333 1.333 0 0 1 0-2.666zM16 12c.736 0 1.333.597 1.333 1.333v6.334a1.333 1.333 0 1 1-2.666 0v-6.334c0-.736.597-1.333 1.333-1.333z"
|
|
9858
|
-
}))));
|
|
9859
|
-
};
|
|
9860
|
-
|
|
9861
9839
|
toast.configure({
|
|
9862
9840
|
autoClose: 3000,
|
|
9863
9841
|
hideProgressBar: true,
|
|
@@ -9956,10 +9934,11 @@ function getRandomColor(email) {
|
|
|
9956
9934
|
}
|
|
9957
9935
|
return colors$1[sum % colors$1.length];
|
|
9958
9936
|
}
|
|
9959
|
-
var getAlphabetIcon = function (str) {
|
|
9937
|
+
var getAlphabetIcon = function (str, rootClassName) {
|
|
9938
|
+
if (rootClassName === void 0) { rootClassName = ""; }
|
|
9960
9939
|
if (!str)
|
|
9961
9940
|
return null;
|
|
9962
|
-
return (jsxRuntime.jsx("span", __assign({ className: "alphabet-icon__initial fs-13 icon-dim-20 flex cn-0 mr-8", style: { backgroundColor: getRandomColor(str) } }, { children: str[0] })));
|
|
9941
|
+
return (jsxRuntime.jsx("span", __assign({ className: "".concat(rootClassName, " alphabet-icon__initial fs-13 icon-dim-20 flex cn-0 mr-8"), style: { backgroundColor: getRandomColor(str) } }, { children: str[0] })));
|
|
9963
9942
|
};
|
|
9964
9943
|
var getEmptyArrayOfLength = function (length) {
|
|
9965
9944
|
return Array.from({ length: length });
|
|
@@ -10085,22 +10064,6 @@ function useForm(stateSchema, validationSchema, callback) {
|
|
|
10085
10064
|
};
|
|
10086
10065
|
return { state: state, disable: disable, handleOnChange: handleOnChange, handleOnSubmit: handleOnSubmit };
|
|
10087
10066
|
}
|
|
10088
|
-
function handleError(error) {
|
|
10089
|
-
if (!error) {
|
|
10090
|
-
return [];
|
|
10091
|
-
}
|
|
10092
|
-
if (!Array.isArray(error)) {
|
|
10093
|
-
return [error];
|
|
10094
|
-
}
|
|
10095
|
-
return error;
|
|
10096
|
-
}
|
|
10097
|
-
function CustomInput(_a) {
|
|
10098
|
-
var name = _a.name, value = _a.value, error = _a.error, onChange = _a.onChange, _b = _a.onBlur, onBlur = _b === void 0 ? function (e) { } : _b, _c = _a.onFocus, onFocus = _c === void 0 ? function (e) { } : _c, label = _a.label, _d = _a.type, type = _d === void 0 ? 'text' : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e; _a.autoComplete; var _g = _a.labelClassName, labelClassName = _g === void 0 ? '' : _g, _h = _a.placeholder, placeholder = _h === void 0 ? '' : _h, _j = _a.tabIndex, tabIndex = _j === void 0 ? 1 : _j, _k = _a.dataTestid, dataTestid = _k === void 0 ? '' : _k;
|
|
10099
|
-
return (jsxRuntime.jsxs("div", __assign({ className: "flex column left top" }, { children: [jsxRuntime.jsx("label", __assign({ className: "form__label ".concat(labelClassName) }, { children: label })), jsxRuntime.jsx("input", { "data-testid": dataTestid, type: type, name: name, autoComplete: "off", className: "form__input", onChange: function (e) {
|
|
10100
|
-
e.persist();
|
|
10101
|
-
onChange(e);
|
|
10102
|
-
}, onBlur: onBlur, onFocus: onFocus, placeholder: placeholder, value: value, disabled: disabled, tabIndex: tabIndex }), handleError(error).map(function (err) { return (jsxRuntime.jsxs("div", __assign({ className: "form__error" }, { children: [jsxRuntime.jsx(SvgIcWarning, { className: "form__icon form__icon--error" }), err] }), err)); })] })));
|
|
10103
|
-
}
|
|
10104
10067
|
function handleUTCTime(ts, isRelativeTime) {
|
|
10105
10068
|
if (isRelativeTime === void 0) { isRelativeTime = false; }
|
|
10106
10069
|
var timestamp = '';
|
|
@@ -10398,9 +10361,9 @@ var Modal = function (_a) {
|
|
|
10398
10361
|
};
|
|
10399
10362
|
|
|
10400
10363
|
var _path$c;
|
|
10401
|
-
function _extends$
|
|
10364
|
+
function _extends$k() { _extends$k = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
|
|
10402
10365
|
var SvgIcCross = function SvgIcCross(props) {
|
|
10403
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10366
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
|
|
10404
10367
|
width: "1em",
|
|
10405
10368
|
height: "1em",
|
|
10406
10369
|
viewBox: "0 0 24 24",
|
|
@@ -14706,9 +14669,9 @@ var index = /*#__PURE__*/forwardRef( /*#__PURE__*/TippyGenerator(tippy));
|
|
|
14706
14669
|
var Tippy = index;
|
|
14707
14670
|
|
|
14708
14671
|
var _path$b;
|
|
14709
|
-
function _extends$
|
|
14672
|
+
function _extends$j() { _extends$j = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
|
|
14710
14673
|
var SvgIcHelp = function SvgIcHelp(props) {
|
|
14711
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14674
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
|
|
14712
14675
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14713
14676
|
width: "1em",
|
|
14714
14677
|
height: "1em",
|
|
@@ -14721,9 +14684,9 @@ var SvgIcHelp = function SvgIcHelp(props) {
|
|
|
14721
14684
|
};
|
|
14722
14685
|
|
|
14723
14686
|
var _path$a;
|
|
14724
|
-
function _extends$
|
|
14687
|
+
function _extends$i() { _extends$i = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$i.apply(this, arguments); }
|
|
14725
14688
|
var SvgIcHelpOutline = function SvgIcHelpOutline(props) {
|
|
14726
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14689
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
|
|
14727
14690
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14728
14691
|
viewBox: "0 0 17 16",
|
|
14729
14692
|
width: "1em",
|
|
@@ -14781,9 +14744,9 @@ function TippyCustomized(props) {
|
|
|
14781
14744
|
}
|
|
14782
14745
|
|
|
14783
14746
|
var _path$9, _circle, _path2$1;
|
|
14784
|
-
function _extends$
|
|
14747
|
+
function _extends$h() { _extends$h = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$h.apply(this, arguments); }
|
|
14785
14748
|
var SvgInjectTag = function SvgInjectTag(props) {
|
|
14786
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14749
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
|
|
14787
14750
|
width: "1em",
|
|
14788
14751
|
height: "1em",
|
|
14789
14752
|
viewBox: "0 0 20 20",
|
|
@@ -14818,9 +14781,9 @@ function PropagateTagInfo(_a) {
|
|
|
14818
14781
|
}
|
|
14819
14782
|
|
|
14820
14783
|
var _path$8;
|
|
14821
|
-
function _extends$
|
|
14784
|
+
function _extends$g() { _extends$g = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$g.apply(this, arguments); }
|
|
14822
14785
|
var SvgIcInfoOutlined = function SvgIcInfoOutlined(props) {
|
|
14823
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14786
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
|
|
14824
14787
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14825
14788
|
width: "1em",
|
|
14826
14789
|
height: "1em",
|
|
@@ -15060,9 +15023,9 @@ var TagDetails = function (_a) {
|
|
|
15060
15023
|
};
|
|
15061
15024
|
|
|
15062
15025
|
var _path$7;
|
|
15063
|
-
function _extends$
|
|
15026
|
+
function _extends$f() { _extends$f = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$f.apply(this, arguments); }
|
|
15064
15027
|
var SvgIcAdd = function SvgIcAdd(props) {
|
|
15065
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
15028
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
|
|
15066
15029
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15067
15030
|
width: "1em",
|
|
15068
15031
|
height: "1em",
|
|
@@ -15197,8 +15160,8 @@ function ForceDeleteDialog(_a) {
|
|
|
15197
15160
|
return (jsxRuntime.jsx("div", { children: jsxRuntime.jsx(DeleteDialog, __assign({ title: forceDeleteDialogTitle, delete: onClickDelete, closeDelete: closeDeleteModal, deletePrefix: "Force " }, { children: jsxRuntime.jsxs(DeleteDialog.Description, { children: [jsxRuntime.jsxs("p", __assign({ className: "mt-12 mb-12 p-8 dc__break-word dc__window-bg" }, { children: ["Error: ", forceDeleteDialogMessage] })), jsxRuntime.jsx("p", { children: "Do you want to force delete?" })] }) })) }));
|
|
15198
15161
|
}
|
|
15199
15162
|
|
|
15200
|
-
function _extends$
|
|
15201
|
-
_extends$
|
|
15163
|
+
function _extends$e() {
|
|
15164
|
+
_extends$e = Object.assign ? Object.assign.bind() : function (target) {
|
|
15202
15165
|
for (var i = 1; i < arguments.length; i++) {
|
|
15203
15166
|
var source = arguments[i];
|
|
15204
15167
|
for (var key in source) {
|
|
@@ -15209,7 +15172,7 @@ function _extends$d() {
|
|
|
15209
15172
|
}
|
|
15210
15173
|
return target;
|
|
15211
15174
|
};
|
|
15212
|
-
return _extends$
|
|
15175
|
+
return _extends$e.apply(this, arguments);
|
|
15213
15176
|
}
|
|
15214
15177
|
|
|
15215
15178
|
/*
|
|
@@ -18750,7 +18713,7 @@ var Menu = function Menu(props) {
|
|
|
18750
18713
|
getStyles = props.getStyles,
|
|
18751
18714
|
innerRef = props.innerRef,
|
|
18752
18715
|
innerProps = props.innerProps;
|
|
18753
|
-
return jsx("div", _extends$
|
|
18716
|
+
return jsx("div", _extends$e({
|
|
18754
18717
|
css: getStyles('menu', props),
|
|
18755
18718
|
className: cx({
|
|
18756
18719
|
menu: true
|
|
@@ -18782,7 +18745,7 @@ var MenuList$1 = function MenuList(props) {
|
|
|
18782
18745
|
innerProps = props.innerProps,
|
|
18783
18746
|
innerRef = props.innerRef,
|
|
18784
18747
|
isMulti = props.isMulti;
|
|
18785
|
-
return jsx("div", _extends$
|
|
18748
|
+
return jsx("div", _extends$e({
|
|
18786
18749
|
css: getStyles('menuList', props),
|
|
18787
18750
|
className: cx({
|
|
18788
18751
|
'menu-list': true,
|
|
@@ -18813,7 +18776,7 @@ var NoOptionsMessage = function NoOptionsMessage(props) {
|
|
|
18813
18776
|
cx = props.cx,
|
|
18814
18777
|
getStyles = props.getStyles,
|
|
18815
18778
|
innerProps = props.innerProps;
|
|
18816
|
-
return jsx("div", _extends$
|
|
18779
|
+
return jsx("div", _extends$e({
|
|
18817
18780
|
css: getStyles('noOptionsMessage', props),
|
|
18818
18781
|
className: cx({
|
|
18819
18782
|
'menu-notice': true,
|
|
@@ -18830,7 +18793,7 @@ var LoadingMessage = function LoadingMessage(props) {
|
|
|
18830
18793
|
cx = props.cx,
|
|
18831
18794
|
getStyles = props.getStyles,
|
|
18832
18795
|
innerProps = props.innerProps;
|
|
18833
|
-
return jsx("div", _extends$
|
|
18796
|
+
return jsx("div", _extends$e({
|
|
18834
18797
|
css: getStyles('loadingMessage', props),
|
|
18835
18798
|
className: cx({
|
|
18836
18799
|
'menu-notice': true,
|
|
@@ -18918,7 +18881,7 @@ var MenuPortal = /*#__PURE__*/function (_Component2) {
|
|
|
18918
18881
|
rect: rect
|
|
18919
18882
|
}; // same wrapper element whether fixed or portalled
|
|
18920
18883
|
|
|
18921
|
-
var menuWrapper = jsx("div", _extends$
|
|
18884
|
+
var menuWrapper = jsx("div", _extends$e({
|
|
18922
18885
|
css: getStyles('menuPortal', state),
|
|
18923
18886
|
className: cx({
|
|
18924
18887
|
'menu-portal': true
|
|
@@ -18954,7 +18917,7 @@ var SelectContainer = function SelectContainer(props) {
|
|
|
18954
18917
|
innerProps = props.innerProps,
|
|
18955
18918
|
isDisabled = props.isDisabled,
|
|
18956
18919
|
isRtl = props.isRtl;
|
|
18957
|
-
return jsx("div", _extends$
|
|
18920
|
+
return jsx("div", _extends$e({
|
|
18958
18921
|
css: getStyles('container', props),
|
|
18959
18922
|
className: cx({
|
|
18960
18923
|
'--is-disabled': isDisabled,
|
|
@@ -18989,7 +18952,7 @@ var ValueContainer = function ValueContainer(props) {
|
|
|
18989
18952
|
isMulti = props.isMulti,
|
|
18990
18953
|
getStyles = props.getStyles,
|
|
18991
18954
|
hasValue = props.hasValue;
|
|
18992
|
-
return jsx("div", _extends$
|
|
18955
|
+
return jsx("div", _extends$e({
|
|
18993
18956
|
css: getStyles('valueContainer', props),
|
|
18994
18957
|
className: cx({
|
|
18995
18958
|
'value-container': true,
|
|
@@ -19015,7 +18978,7 @@ var IndicatorsContainer = function IndicatorsContainer(props) {
|
|
|
19015
18978
|
cx = props.cx,
|
|
19016
18979
|
innerProps = props.innerProps,
|
|
19017
18980
|
getStyles = props.getStyles;
|
|
19018
|
-
return jsx("div", _extends$
|
|
18981
|
+
return jsx("div", _extends$e({
|
|
19019
18982
|
css: getStyles('indicatorsContainer', props),
|
|
19020
18983
|
className: cx({
|
|
19021
18984
|
indicators: true
|
|
@@ -19046,7 +19009,7 @@ var Svg = function Svg(_ref) {
|
|
|
19046
19009
|
var size = _ref.size,
|
|
19047
19010
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
19048
19011
|
|
|
19049
|
-
return jsx("svg", _extends$
|
|
19012
|
+
return jsx("svg", _extends$e({
|
|
19050
19013
|
height: size,
|
|
19051
19014
|
width: size,
|
|
19052
19015
|
viewBox: "0 0 20 20",
|
|
@@ -19057,14 +19020,14 @@ var Svg = function Svg(_ref) {
|
|
|
19057
19020
|
};
|
|
19058
19021
|
|
|
19059
19022
|
var CrossIcon = function CrossIcon(props) {
|
|
19060
|
-
return jsx(Svg, _extends$
|
|
19023
|
+
return jsx(Svg, _extends$e({
|
|
19061
19024
|
size: 20
|
|
19062
19025
|
}, props), jsx("path", {
|
|
19063
19026
|
d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"
|
|
19064
19027
|
}));
|
|
19065
19028
|
};
|
|
19066
19029
|
var DownChevron = function DownChevron(props) {
|
|
19067
|
-
return jsx(Svg, _extends$
|
|
19030
|
+
return jsx(Svg, _extends$e({
|
|
19068
19031
|
size: 20
|
|
19069
19032
|
}, props), jsx("path", {
|
|
19070
19033
|
d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"
|
|
@@ -19097,7 +19060,7 @@ var DropdownIndicator$1 = function DropdownIndicator(props) {
|
|
|
19097
19060
|
cx = props.cx,
|
|
19098
19061
|
getStyles = props.getStyles,
|
|
19099
19062
|
innerProps = props.innerProps;
|
|
19100
|
-
return jsx("div", _extends$
|
|
19063
|
+
return jsx("div", _extends$e({
|
|
19101
19064
|
css: getStyles('dropdownIndicator', props),
|
|
19102
19065
|
className: cx({
|
|
19103
19066
|
indicator: true,
|
|
@@ -19112,7 +19075,7 @@ var ClearIndicator$1 = function ClearIndicator(props) {
|
|
|
19112
19075
|
cx = props.cx,
|
|
19113
19076
|
getStyles = props.getStyles,
|
|
19114
19077
|
innerProps = props.innerProps;
|
|
19115
|
-
return jsx("div", _extends$
|
|
19078
|
+
return jsx("div", _extends$e({
|
|
19116
19079
|
css: getStyles('clearIndicator', props),
|
|
19117
19080
|
className: cx({
|
|
19118
19081
|
indicator: true,
|
|
@@ -19142,7 +19105,7 @@ var IndicatorSeparator = function IndicatorSeparator(props) {
|
|
|
19142
19105
|
cx = props.cx,
|
|
19143
19106
|
getStyles = props.getStyles,
|
|
19144
19107
|
innerProps = props.innerProps;
|
|
19145
|
-
return jsx("span", _extends$
|
|
19108
|
+
return jsx("span", _extends$e({}, innerProps, {
|
|
19146
19109
|
css: getStyles('indicatorSeparator', props),
|
|
19147
19110
|
className: cx({
|
|
19148
19111
|
'indicator-separator': true
|
|
@@ -19197,7 +19160,7 @@ var LoadingIndicator = function LoadingIndicator(props) {
|
|
|
19197
19160
|
getStyles = props.getStyles,
|
|
19198
19161
|
innerProps = props.innerProps,
|
|
19199
19162
|
isRtl = props.isRtl;
|
|
19200
|
-
return jsx("div", _extends$
|
|
19163
|
+
return jsx("div", _extends$e({
|
|
19201
19164
|
css: getStyles('loadingIndicator', props),
|
|
19202
19165
|
className: cx({
|
|
19203
19166
|
indicator: true,
|
|
@@ -19258,7 +19221,7 @@ var Control = function Control(props) {
|
|
|
19258
19221
|
innerRef = props.innerRef,
|
|
19259
19222
|
innerProps = props.innerProps,
|
|
19260
19223
|
menuIsOpen = props.menuIsOpen;
|
|
19261
|
-
return jsx("div", _extends$
|
|
19224
|
+
return jsx("div", _extends$e({
|
|
19262
19225
|
ref: innerRef,
|
|
19263
19226
|
css: getStyles('control', props),
|
|
19264
19227
|
className: cx({
|
|
@@ -19290,12 +19253,12 @@ var Group = function Group(props) {
|
|
|
19290
19253
|
label = props.label,
|
|
19291
19254
|
theme = props.theme,
|
|
19292
19255
|
selectProps = props.selectProps;
|
|
19293
|
-
return jsx("div", _extends$
|
|
19256
|
+
return jsx("div", _extends$e({
|
|
19294
19257
|
css: getStyles('group', props),
|
|
19295
19258
|
className: cx({
|
|
19296
19259
|
group: true
|
|
19297
19260
|
}, className)
|
|
19298
|
-
}, innerProps), jsx(Heading, _extends$
|
|
19261
|
+
}, innerProps), jsx(Heading, _extends$e({}, headingProps, {
|
|
19299
19262
|
selectProps: selectProps,
|
|
19300
19263
|
theme: theme,
|
|
19301
19264
|
getStyles: getStyles,
|
|
@@ -19327,7 +19290,7 @@ var GroupHeading = function GroupHeading(props) {
|
|
|
19327
19290
|
_cleanCommonProps.data;
|
|
19328
19291
|
var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1$1);
|
|
19329
19292
|
|
|
19330
|
-
return jsx("div", _extends$
|
|
19293
|
+
return jsx("div", _extends$e({
|
|
19331
19294
|
css: getStyles('groupHeading', props),
|
|
19332
19295
|
className: cx({
|
|
19333
19296
|
'group-heading': true
|
|
@@ -19403,7 +19366,7 @@ var Input = function Input(props) {
|
|
|
19403
19366
|
}, className),
|
|
19404
19367
|
css: getStyles('input', props),
|
|
19405
19368
|
"data-value": value || ''
|
|
19406
|
-
}, jsx("input", _extends$
|
|
19369
|
+
}, jsx("input", _extends$e({
|
|
19407
19370
|
className: cx({
|
|
19408
19371
|
input: true
|
|
19409
19372
|
}, inputClassName),
|
|
@@ -19473,7 +19436,7 @@ var MultiValueLabel = MultiValueGeneric;
|
|
|
19473
19436
|
function MultiValueRemove$1(_ref5) {
|
|
19474
19437
|
var children = _ref5.children,
|
|
19475
19438
|
innerProps = _ref5.innerProps;
|
|
19476
|
-
return jsx("div", _extends$
|
|
19439
|
+
return jsx("div", _extends$e({
|
|
19477
19440
|
role: "button"
|
|
19478
19441
|
}, innerProps), children || jsx(CrossIcon, {
|
|
19479
19442
|
size: 14
|
|
@@ -19562,7 +19525,7 @@ var Option$1 = function Option(props) {
|
|
|
19562
19525
|
isSelected = props.isSelected,
|
|
19563
19526
|
innerRef = props.innerRef,
|
|
19564
19527
|
innerProps = props.innerProps;
|
|
19565
|
-
return jsx("div", _extends$
|
|
19528
|
+
return jsx("div", _extends$e({
|
|
19566
19529
|
css: getStyles('option', props),
|
|
19567
19530
|
className: cx({
|
|
19568
19531
|
option: true,
|
|
@@ -19594,7 +19557,7 @@ var Placeholder = function Placeholder(props) {
|
|
|
19594
19557
|
cx = props.cx,
|
|
19595
19558
|
getStyles = props.getStyles,
|
|
19596
19559
|
innerProps = props.innerProps;
|
|
19597
|
-
return jsx("div", _extends$
|
|
19560
|
+
return jsx("div", _extends$e({
|
|
19598
19561
|
css: getStyles('placeholder', props),
|
|
19599
19562
|
className: cx({
|
|
19600
19563
|
placeholder: true
|
|
@@ -19627,7 +19590,7 @@ var SingleValue = function SingleValue(props) {
|
|
|
19627
19590
|
getStyles = props.getStyles,
|
|
19628
19591
|
isDisabled = props.isDisabled,
|
|
19629
19592
|
innerProps = props.innerProps;
|
|
19630
|
-
return jsx("div", _extends$
|
|
19593
|
+
return jsx("div", _extends$e({
|
|
19631
19594
|
css: getStyles('singleValue', props),
|
|
19632
19595
|
className: cx({
|
|
19633
19596
|
'single-value': true,
|
|
@@ -19875,7 +19838,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
19875
19838
|
};
|
|
19876
19839
|
|
|
19877
19840
|
var A11yText = function A11yText(props) {
|
|
19878
|
-
return jsx("span", _extends$
|
|
19841
|
+
return jsx("span", _extends$e({
|
|
19879
19842
|
css: _ref
|
|
19880
19843
|
}, props));
|
|
19881
19844
|
};
|
|
@@ -20411,7 +20374,7 @@ function DummyInput(_ref) {
|
|
|
20411
20374
|
var innerRef = _ref.innerRef,
|
|
20412
20375
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
20413
20376
|
|
|
20414
|
-
return jsx("input", _extends$
|
|
20377
|
+
return jsx("input", _extends$e({
|
|
20415
20378
|
ref: innerRef
|
|
20416
20379
|
}, props, {
|
|
20417
20380
|
css: /*#__PURE__*/css$2({
|
|
@@ -22046,7 +22009,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22046
22009
|
|
|
22047
22010
|
if (!isSearchable) {
|
|
22048
22011
|
// use a dummy input to maintain focus/blur functionality
|
|
22049
|
-
return /*#__PURE__*/React__namespace.createElement(DummyInput, _extends$
|
|
22012
|
+
return /*#__PURE__*/React__namespace.createElement(DummyInput, _extends$e({
|
|
22050
22013
|
id: id,
|
|
22051
22014
|
innerRef: this.getInputRef,
|
|
22052
22015
|
onBlur: this.onInputBlur,
|
|
@@ -22060,7 +22023,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22060
22023
|
}, ariaAttributes));
|
|
22061
22024
|
}
|
|
22062
22025
|
|
|
22063
|
-
return /*#__PURE__*/React__namespace.createElement(Input, _extends$
|
|
22026
|
+
return /*#__PURE__*/React__namespace.createElement(Input, _extends$e({}, commonProps, {
|
|
22064
22027
|
autoCapitalize: "none",
|
|
22065
22028
|
autoComplete: "off",
|
|
22066
22029
|
autoCorrect: "off",
|
|
@@ -22104,7 +22067,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22104
22067
|
isFocused = _this$state5.isFocused;
|
|
22105
22068
|
|
|
22106
22069
|
if (!this.hasValue() || !controlShouldRenderValue) {
|
|
22107
|
-
return inputValue ? null : /*#__PURE__*/React__namespace.createElement(Placeholder, _extends$
|
|
22070
|
+
return inputValue ? null : /*#__PURE__*/React__namespace.createElement(Placeholder, _extends$e({}, commonProps, {
|
|
22108
22071
|
key: "placeholder",
|
|
22109
22072
|
isDisabled: isDisabled,
|
|
22110
22073
|
isFocused: isFocused,
|
|
@@ -22118,7 +22081,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22118
22081
|
return selectValue.map(function (opt, index) {
|
|
22119
22082
|
var isOptionFocused = opt === focusedValue;
|
|
22120
22083
|
var key = "".concat(_this3.getOptionLabel(opt), "-").concat(_this3.getOptionValue(opt));
|
|
22121
|
-
return /*#__PURE__*/React__namespace.createElement(MultiValue, _extends$
|
|
22084
|
+
return /*#__PURE__*/React__namespace.createElement(MultiValue, _extends$e({}, commonProps, {
|
|
22122
22085
|
components: {
|
|
22123
22086
|
Container: MultiValueContainer,
|
|
22124
22087
|
Label: MultiValueLabel,
|
|
@@ -22150,7 +22113,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22150
22113
|
}
|
|
22151
22114
|
|
|
22152
22115
|
var singleValue = selectValue[0];
|
|
22153
|
-
return /*#__PURE__*/React__namespace.createElement(SingleValue, _extends$
|
|
22116
|
+
return /*#__PURE__*/React__namespace.createElement(SingleValue, _extends$e({}, commonProps, {
|
|
22154
22117
|
data: singleValue,
|
|
22155
22118
|
isDisabled: isDisabled
|
|
22156
22119
|
}), this.formatOptionLabel(singleValue, 'value'));
|
|
@@ -22176,7 +22139,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22176
22139
|
onTouchEnd: this.onClearIndicatorTouchEnd,
|
|
22177
22140
|
'aria-hidden': 'true'
|
|
22178
22141
|
};
|
|
22179
|
-
return /*#__PURE__*/React__namespace.createElement(ClearIndicator, _extends$
|
|
22142
|
+
return /*#__PURE__*/React__namespace.createElement(ClearIndicator, _extends$e({}, commonProps, {
|
|
22180
22143
|
innerProps: innerProps,
|
|
22181
22144
|
isFocused: isFocused
|
|
22182
22145
|
}));
|
|
@@ -22196,7 +22159,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22196
22159
|
var innerProps = {
|
|
22197
22160
|
'aria-hidden': 'true'
|
|
22198
22161
|
};
|
|
22199
|
-
return /*#__PURE__*/React__namespace.createElement(LoadingIndicator, _extends$
|
|
22162
|
+
return /*#__PURE__*/React__namespace.createElement(LoadingIndicator, _extends$e({}, commonProps, {
|
|
22200
22163
|
innerProps: innerProps,
|
|
22201
22164
|
isDisabled: isDisabled,
|
|
22202
22165
|
isFocused: isFocused
|
|
@@ -22214,7 +22177,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22214
22177
|
var commonProps = this.commonProps;
|
|
22215
22178
|
var isDisabled = this.props.isDisabled;
|
|
22216
22179
|
var isFocused = this.state.isFocused;
|
|
22217
|
-
return /*#__PURE__*/React__namespace.createElement(IndicatorSeparator, _extends$
|
|
22180
|
+
return /*#__PURE__*/React__namespace.createElement(IndicatorSeparator, _extends$e({}, commonProps, {
|
|
22218
22181
|
isDisabled: isDisabled,
|
|
22219
22182
|
isFocused: isFocused
|
|
22220
22183
|
}));
|
|
@@ -22234,7 +22197,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22234
22197
|
onTouchEnd: this.onDropdownIndicatorTouchEnd,
|
|
22235
22198
|
'aria-hidden': 'true'
|
|
22236
22199
|
};
|
|
22237
|
-
return /*#__PURE__*/React__namespace.createElement(DropdownIndicator, _extends$
|
|
22200
|
+
return /*#__PURE__*/React__namespace.createElement(DropdownIndicator, _extends$e({}, commonProps, {
|
|
22238
22201
|
innerProps: innerProps,
|
|
22239
22202
|
isDisabled: isDisabled,
|
|
22240
22203
|
isFocused: isFocused
|
|
@@ -22297,7 +22260,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22297
22260
|
onMouseOver: onHover,
|
|
22298
22261
|
tabIndex: -1
|
|
22299
22262
|
};
|
|
22300
|
-
return /*#__PURE__*/React__namespace.createElement(Option, _extends$
|
|
22263
|
+
return /*#__PURE__*/React__namespace.createElement(Option, _extends$e({}, commonProps, {
|
|
22301
22264
|
innerProps: innerProps,
|
|
22302
22265
|
data: data,
|
|
22303
22266
|
isDisabled: isDisabled,
|
|
@@ -22321,7 +22284,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22321
22284
|
groupIndex = item.index;
|
|
22322
22285
|
var groupId = "".concat(_this4.getElementId('group'), "-").concat(groupIndex);
|
|
22323
22286
|
var headingId = "".concat(groupId, "-heading");
|
|
22324
|
-
return /*#__PURE__*/React__namespace.createElement(Group, _extends$
|
|
22287
|
+
return /*#__PURE__*/React__namespace.createElement(Group, _extends$e({}, commonProps, {
|
|
22325
22288
|
key: groupId,
|
|
22326
22289
|
data: _data,
|
|
22327
22290
|
options: options,
|
|
@@ -22360,12 +22323,12 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22360
22323
|
menuPosition: menuPosition,
|
|
22361
22324
|
menuShouldScrollIntoView: menuShouldScrollIntoView
|
|
22362
22325
|
};
|
|
22363
|
-
var menuElement = /*#__PURE__*/React__namespace.createElement(MenuPlacer, _extends$
|
|
22326
|
+
var menuElement = /*#__PURE__*/React__namespace.createElement(MenuPlacer, _extends$e({}, commonProps, menuPlacementProps), function (_ref4) {
|
|
22364
22327
|
var ref = _ref4.ref,
|
|
22365
22328
|
_ref4$placerProps = _ref4.placerProps,
|
|
22366
22329
|
placement = _ref4$placerProps.placement,
|
|
22367
22330
|
maxHeight = _ref4$placerProps.maxHeight;
|
|
22368
|
-
return /*#__PURE__*/React__namespace.createElement(Menu, _extends$
|
|
22331
|
+
return /*#__PURE__*/React__namespace.createElement(Menu, _extends$e({}, commonProps, menuPlacementProps, {
|
|
22369
22332
|
innerRef: ref,
|
|
22370
22333
|
innerProps: {
|
|
22371
22334
|
onMouseDown: _this4.onMenuMouseDown,
|
|
@@ -22380,7 +22343,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22380
22343
|
onBottomArrive: onMenuScrollToBottom,
|
|
22381
22344
|
lockEnabled: menuShouldBlockScroll
|
|
22382
22345
|
}, function (scrollTargetRef) {
|
|
22383
|
-
return /*#__PURE__*/React__namespace.createElement(MenuList, _extends$
|
|
22346
|
+
return /*#__PURE__*/React__namespace.createElement(MenuList, _extends$e({}, commonProps, {
|
|
22384
22347
|
innerRef: function innerRef(instance) {
|
|
22385
22348
|
_this4.getMenuListRef(instance);
|
|
22386
22349
|
|
|
@@ -22395,7 +22358,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22395
22358
|
// so we use the same component. the actual portalling logic is forked
|
|
22396
22359
|
// within the component based on `menuPosition`
|
|
22397
22360
|
|
|
22398
|
-
return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React__namespace.createElement(MenuPortal, _extends$
|
|
22361
|
+
return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React__namespace.createElement(MenuPortal, _extends$e({}, commonProps, {
|
|
22399
22362
|
appendTo: menuPortalTarget,
|
|
22400
22363
|
controlElement: this.controlRef,
|
|
22401
22364
|
menuPlacement: menuPlacement,
|
|
@@ -22460,7 +22423,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22460
22423
|
isFocused = _this$state6.isFocused,
|
|
22461
22424
|
selectValue = _this$state6.selectValue;
|
|
22462
22425
|
var focusableOptions = this.getFocusableOptions();
|
|
22463
|
-
return /*#__PURE__*/React__namespace.createElement(LiveRegion, _extends$
|
|
22426
|
+
return /*#__PURE__*/React__namespace.createElement(LiveRegion, _extends$e({}, commonProps, {
|
|
22464
22427
|
id: this.getElementId('live-region'),
|
|
22465
22428
|
ariaSelection: ariaSelection,
|
|
22466
22429
|
focusedOption: focusedOption,
|
|
@@ -22486,7 +22449,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22486
22449
|
menuIsOpen = _this$props14.menuIsOpen;
|
|
22487
22450
|
var isFocused = this.state.isFocused;
|
|
22488
22451
|
var commonProps = this.commonProps = this.getCommonProps();
|
|
22489
|
-
return /*#__PURE__*/React__namespace.createElement(SelectContainer, _extends$
|
|
22452
|
+
return /*#__PURE__*/React__namespace.createElement(SelectContainer, _extends$e({}, commonProps, {
|
|
22490
22453
|
className: className,
|
|
22491
22454
|
innerProps: {
|
|
22492
22455
|
id: id,
|
|
@@ -22494,7 +22457,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22494
22457
|
},
|
|
22495
22458
|
isDisabled: isDisabled,
|
|
22496
22459
|
isFocused: isFocused
|
|
22497
|
-
}), this.renderLiveRegion(), /*#__PURE__*/React__namespace.createElement(Control, _extends$
|
|
22460
|
+
}), this.renderLiveRegion(), /*#__PURE__*/React__namespace.createElement(Control, _extends$e({}, commonProps, {
|
|
22498
22461
|
innerRef: this.getControlRef,
|
|
22499
22462
|
innerProps: {
|
|
22500
22463
|
onMouseDown: this.onControlMouseDown,
|
|
@@ -22503,9 +22466,9 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22503
22466
|
isDisabled: isDisabled,
|
|
22504
22467
|
isFocused: isFocused,
|
|
22505
22468
|
menuIsOpen: menuIsOpen
|
|
22506
|
-
}), /*#__PURE__*/React__namespace.createElement(ValueContainer, _extends$
|
|
22469
|
+
}), /*#__PURE__*/React__namespace.createElement(ValueContainer, _extends$e({}, commonProps, {
|
|
22507
22470
|
isDisabled: isDisabled
|
|
22508
|
-
}), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React__namespace.createElement(IndicatorsContainer, _extends$
|
|
22471
|
+
}), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React__namespace.createElement(IndicatorsContainer, _extends$e({}, commonProps, {
|
|
22509
22472
|
isDisabled: isDisabled
|
|
22510
22473
|
}), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
|
|
22511
22474
|
}
|
|
@@ -22578,22 +22541,22 @@ Select$1.defaultProps = defaultProps;
|
|
|
22578
22541
|
|
|
22579
22542
|
var StateManagedSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
22580
22543
|
var baseSelectProps = useStateManager(props);
|
|
22581
|
-
return /*#__PURE__*/React__namespace.createElement(Select$1, _extends$
|
|
22544
|
+
return /*#__PURE__*/React__namespace.createElement(Select$1, _extends$e({
|
|
22582
22545
|
ref: ref
|
|
22583
22546
|
}, baseSelectProps));
|
|
22584
22547
|
});
|
|
22585
22548
|
|
|
22586
22549
|
var ReactSelect = StateManagedSelect;
|
|
22587
22550
|
|
|
22588
|
-
var _g$
|
|
22589
|
-
function _extends$
|
|
22551
|
+
var _g$5;
|
|
22552
|
+
function _extends$d() { _extends$d = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$d.apply(this, arguments); }
|
|
22590
22553
|
var SvgIcAppstatusCancelled = function SvgIcAppstatusCancelled(props) {
|
|
22591
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
22554
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
|
|
22592
22555
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22593
22556
|
viewBox: "0 0 28 28",
|
|
22594
22557
|
width: "1em",
|
|
22595
22558
|
height: "1em"
|
|
22596
|
-
}, props), _g$
|
|
22559
|
+
}, props), _g$5 || (_g$5 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
22597
22560
|
fill: "none",
|
|
22598
22561
|
fillRule: "evenodd",
|
|
22599
22562
|
transform: "translate(2 2)"
|
|
@@ -22610,9 +22573,9 @@ var SvgIcAppstatusCancelled = function SvgIcAppstatusCancelled(props) {
|
|
|
22610
22573
|
};
|
|
22611
22574
|
|
|
22612
22575
|
var _path$6;
|
|
22613
|
-
function _extends$
|
|
22576
|
+
function _extends$c() { _extends$c = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$c.apply(this, arguments); }
|
|
22614
22577
|
var SvgIcCheck = function SvgIcCheck(props) {
|
|
22615
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
22578
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
|
|
22616
22579
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22617
22580
|
width: "1em",
|
|
22618
22581
|
height: "1em",
|
|
@@ -22628,15 +22591,15 @@ var SvgIcCheck = function SvgIcCheck(props) {
|
|
|
22628
22591
|
})));
|
|
22629
22592
|
};
|
|
22630
22593
|
|
|
22631
|
-
var _g$
|
|
22632
|
-
function _extends$
|
|
22594
|
+
var _g$4;
|
|
22595
|
+
function _extends$b() { _extends$b = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$b.apply(this, arguments); }
|
|
22633
22596
|
var SvgIcErrorMedium = function SvgIcErrorMedium(props) {
|
|
22634
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
22597
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
|
|
22635
22598
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22636
22599
|
width: "1em",
|
|
22637
22600
|
height: "1em",
|
|
22638
22601
|
viewBox: "0 0 20 21"
|
|
22639
|
-
}, props), _g$
|
|
22602
|
+
}, props), _g$4 || (_g$4 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
22640
22603
|
fill: "none",
|
|
22641
22604
|
fillRule: "evenodd"
|
|
22642
22605
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -23105,15 +23068,15 @@ exports.ConsequenceAction = void 0;
|
|
|
23105
23068
|
ConsequenceAction["ALLOW_FOREVER"] = "ALLOW_FOREVER";
|
|
23106
23069
|
})(exports.ConsequenceAction || (exports.ConsequenceAction = {}));
|
|
23107
23070
|
|
|
23108
|
-
var _g$
|
|
23109
|
-
function _extends$
|
|
23071
|
+
var _g$3;
|
|
23072
|
+
function _extends$a() { _extends$a = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$a.apply(this, arguments); }
|
|
23110
23073
|
var SvgIcInfoFilled = function SvgIcInfoFilled(props) {
|
|
23111
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
23074
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
|
|
23112
23075
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23113
23076
|
width: "1em",
|
|
23114
23077
|
height: "1em",
|
|
23115
23078
|
viewBox: "0 0 32 32"
|
|
23116
|
-
}, props), _g$
|
|
23079
|
+
}, props), _g$3 || (_g$3 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
23117
23080
|
fill: "none",
|
|
23118
23081
|
fillRule: "evenodd"
|
|
23119
23082
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -23188,9 +23151,9 @@ function DeleteComponent(_a) {
|
|
|
23188
23151
|
}
|
|
23189
23152
|
|
|
23190
23153
|
var _path$5;
|
|
23191
|
-
function _extends$
|
|
23154
|
+
function _extends$9() { _extends$9 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
|
|
23192
23155
|
var SvgIcPencil = function SvgIcPencil(props) {
|
|
23193
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
23156
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
|
|
23194
23157
|
width: "1em",
|
|
23195
23158
|
height: "1em",
|
|
23196
23159
|
viewBox: "0 0 20 20",
|
|
@@ -23206,9 +23169,9 @@ var SvgIcPencil = function SvgIcPencil(props) {
|
|
|
23206
23169
|
};
|
|
23207
23170
|
|
|
23208
23171
|
var _path$4, _path2, _path3;
|
|
23209
|
-
function _extends$
|
|
23172
|
+
function _extends$8() { _extends$8 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$8.apply(this, arguments); }
|
|
23210
23173
|
var SvgIcArrowCounterClockwise = function SvgIcArrowCounterClockwise(props) {
|
|
23211
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
23174
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
|
|
23212
23175
|
width: "1em",
|
|
23213
23176
|
height: "1em",
|
|
23214
23177
|
viewBox: "0 0 12 12",
|
|
@@ -23233,9 +23196,9 @@ var SvgIcArrowCounterClockwise = function SvgIcArrowCounterClockwise(props) {
|
|
|
23233
23196
|
};
|
|
23234
23197
|
|
|
23235
23198
|
var _path$3;
|
|
23236
|
-
function _extends$
|
|
23199
|
+
function _extends$7() { _extends$7 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$7.apply(this, arguments); }
|
|
23237
23200
|
var SvgIcMinus = function SvgIcMinus(props) {
|
|
23238
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
23201
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
|
|
23239
23202
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23240
23203
|
width: "1em",
|
|
23241
23204
|
height: "1em",
|
|
@@ -23248,6 +23211,28 @@ var SvgIcMinus = function SvgIcMinus(props) {
|
|
|
23248
23211
|
})));
|
|
23249
23212
|
};
|
|
23250
23213
|
|
|
23214
|
+
var _g$2;
|
|
23215
|
+
function _extends$6() { _extends$6 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$6.apply(this, arguments); }
|
|
23216
|
+
var SvgIcWarning = function SvgIcWarning(props) {
|
|
23217
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
|
|
23218
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
23219
|
+
width: "1em",
|
|
23220
|
+
height: "1em",
|
|
23221
|
+
viewBox: "0 0 32 32"
|
|
23222
|
+
}, props), _g$2 || (_g$2 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
23223
|
+
fill: "none",
|
|
23224
|
+
fillRule: "evenodd"
|
|
23225
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
23226
|
+
d: "M0 0h32v32H0z"
|
|
23227
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
23228
|
+
fill: "#FFCB5D",
|
|
23229
|
+
d: "M18.315 5.052 29.72 25.01A2.667 2.667 0 0 1 27.405 29H4.595a2.667 2.667 0 0 1-2.315-3.99L13.685 5.052a2.667 2.667 0 0 1 4.63 0z"
|
|
23230
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
23231
|
+
fill: "#FFF",
|
|
23232
|
+
d: "M16 22.667a1.333 1.333 0 1 1 0 2.666 1.333 1.333 0 0 1 0-2.666zM16 12c.736 0 1.333.597 1.333 1.333v6.334a1.333 1.333 0 1 1-2.666 0v-6.334c0-.736.597-1.333 1.333-1.333z"
|
|
23233
|
+
}))));
|
|
23234
|
+
};
|
|
23235
|
+
|
|
23251
23236
|
var _g$1;
|
|
23252
23237
|
function _extends$5() { _extends$5 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$5.apply(this, arguments); }
|
|
23253
23238
|
var SvgIcErrorExclamation = function SvgIcErrorExclamation(props) {
|
|
@@ -26638,6 +26623,26 @@ function DevtronProgressing(_a) {
|
|
|
26638
26623
|
return (jsxRuntime.jsx("div", __assign({ className: parentClasses ? parentClasses : '' }, { children: jsxRuntime.jsx(SvgIcRotateDevtron, { className: classes ? classes : '' }) })));
|
|
26639
26624
|
}
|
|
26640
26625
|
|
|
26626
|
+
function CustomInput(_a) {
|
|
26627
|
+
var name = _a.name, value = _a.value, error = _a.error, onChange = _a.onChange, _b = _a.onBlur, onBlur = _b === void 0 ? function (e) { } : _b, _c = _a.onFocus, onFocus = _c === void 0 ? function (e) { } : _c, label = _a.label, _d = _a.type, type = _d === void 0 ? 'text' : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.labelClassName, labelClassName = _f === void 0 ? '' : _f, _g = _a.placeholder, placeholder = _g === void 0 ? '' : _g, _h = _a.tabIndex, tabIndex = _h === void 0 ? 1 : _h, _j = _a.dataTestid, dataTestid = _j === void 0 ? '' : _j, _k = _a.isRequiredField, isRequiredField = _k === void 0 ? false : _k, _l = _a.autoFocus, autoFocus = _l === void 0 ? true : _l, _m = _a.rootClassName, rootClassName = _m === void 0 ? '' : _m, _o = _a.autoComplete, autoComplete = _o === void 0 ? 'off' : _o, _p = _a.showLink, showLink = _p === void 0 ? false : _p, _q = _a.linkText, linkText = _q === void 0 ? '' : _q, _r = _a.link, link = _r === void 0 ? '' : _r, _s = _a.helperText, helperText = _s === void 0 ? '' : _s;
|
|
26628
|
+
var renderLabelHelperText = function () {
|
|
26629
|
+
return (jsxRuntime.jsx("span", { children: jsxRuntime.jsx("a", __assign({ target: "_blank", href: link, className: "cursor fs-13 onlink" }, { children: linkText })) }));
|
|
26630
|
+
};
|
|
26631
|
+
function handleError(error) {
|
|
26632
|
+
if (!error) {
|
|
26633
|
+
return [];
|
|
26634
|
+
}
|
|
26635
|
+
if (!Array.isArray(error)) {
|
|
26636
|
+
return [error];
|
|
26637
|
+
}
|
|
26638
|
+
return error;
|
|
26639
|
+
}
|
|
26640
|
+
return (jsxRuntime.jsxs("div", __assign({ className: "flex column left top" }, { children: [label && (jsxRuntime.jsxs("label", __assign({ className: "form__label ".concat(labelClassName, " ").concat(isRequiredField ? 'dc__required-field' : ''), "data-testid": "label-".concat(dataTestid) }, { children: [label, " ", showLink && renderLabelHelperText()] }))), jsxRuntime.jsx("input", { "data-testid": dataTestid, type: type, name: name, autoComplete: autoComplete, className: "form__input ".concat(rootClassName), onChange: function (e) {
|
|
26641
|
+
e.persist();
|
|
26642
|
+
onChange(e);
|
|
26643
|
+
}, onBlur: onBlur, onFocus: onFocus, placeholder: placeholder, value: value, disabled: disabled, tabIndex: tabIndex, autoFocus: autoFocus }), handleError(error).map(function (err) { return (jsxRuntime.jsxs("div", __assign({ className: "form__error" }, { children: [jsxRuntime.jsx(SvgIcWarning, { className: "form__icon form__icon--error" }), err] }), err)); }), helperText ? (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", __assign({ className: "form__text-field-info" }, { children: [jsxRuntime.jsx(SvgIcInfoFilled, { className: "form__icon form__icon--info" }), jsxRuntime.jsx("p", __assign({ className: "sentence-case" }, { children: helperText }))] })) })) : null] })));
|
|
26644
|
+
}
|
|
26645
|
+
|
|
26641
26646
|
exports.AppStatus = AppStatus;
|
|
26642
26647
|
exports.BreadCrumb = BreadCrumb;
|
|
26643
26648
|
exports.BreadcrumbStore = Store;
|
package/package.json
CHANGED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { CustomInputProps } from "./Types"
|
|
2
|
+
import { ReactComponent as Info } from '../../Assets/Icon/ic-info-filled.svg'
|
|
3
|
+
import { ReactComponent as FormError } from '../../Assets/Icon/ic-warning.svg'
|
|
4
|
+
|
|
5
|
+
export function CustomInput({
|
|
6
|
+
name,
|
|
7
|
+
value,
|
|
8
|
+
error,
|
|
9
|
+
onChange,
|
|
10
|
+
onBlur = (e) => {},
|
|
11
|
+
onFocus = (e) => {},
|
|
12
|
+
label,
|
|
13
|
+
type = 'text',
|
|
14
|
+
disabled = false,
|
|
15
|
+
labelClassName = '',
|
|
16
|
+
placeholder = '',
|
|
17
|
+
tabIndex = 1,
|
|
18
|
+
dataTestid = '',
|
|
19
|
+
isRequiredField = false,
|
|
20
|
+
autoFocus = true,
|
|
21
|
+
rootClassName = '',
|
|
22
|
+
autoComplete = 'off',
|
|
23
|
+
showLink= false,
|
|
24
|
+
linkText= '',
|
|
25
|
+
link= '',
|
|
26
|
+
helperText= '',
|
|
27
|
+
}: CustomInputProps) {
|
|
28
|
+
|
|
29
|
+
const renderLabelHelperText = () => {
|
|
30
|
+
return (
|
|
31
|
+
<span>
|
|
32
|
+
<a target="_blank" href={link} className="cursor fs-13 onlink">
|
|
33
|
+
{linkText}
|
|
34
|
+
</a>
|
|
35
|
+
</span>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function handleError(error: any): any[] {
|
|
40
|
+
if (!error) {
|
|
41
|
+
return []
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (!Array.isArray(error)) {
|
|
45
|
+
return [error]
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return error
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<div className="flex column left top">
|
|
53
|
+
{label && (
|
|
54
|
+
<label className={`form__label ${labelClassName} ${isRequiredField ? 'dc__required-field' : ''}`} data-testid={`label-${dataTestid}`}>
|
|
55
|
+
{label} {showLink && renderLabelHelperText()}
|
|
56
|
+
</label>
|
|
57
|
+
)}
|
|
58
|
+
<input
|
|
59
|
+
data-testid={dataTestid}
|
|
60
|
+
type={type}
|
|
61
|
+
name={name}
|
|
62
|
+
autoComplete={autoComplete}
|
|
63
|
+
className={`form__input ${rootClassName}`}
|
|
64
|
+
onChange={(e) => {
|
|
65
|
+
e.persist()
|
|
66
|
+
onChange(e)
|
|
67
|
+
}}
|
|
68
|
+
onBlur={onBlur}
|
|
69
|
+
onFocus={onFocus}
|
|
70
|
+
placeholder={placeholder}
|
|
71
|
+
value={value}
|
|
72
|
+
disabled={disabled}
|
|
73
|
+
tabIndex={tabIndex}
|
|
74
|
+
autoFocus={autoFocus}
|
|
75
|
+
/>
|
|
76
|
+
{handleError(error).map((err) => (
|
|
77
|
+
<div className="form__error" key={err}>
|
|
78
|
+
<FormError className="form__icon form__icon--error" />
|
|
79
|
+
{err}
|
|
80
|
+
</div>
|
|
81
|
+
))}
|
|
82
|
+
{helperText ? (
|
|
83
|
+
<>
|
|
84
|
+
<div className="form__text-field-info">
|
|
85
|
+
<Info className="form__icon form__icon--info" />
|
|
86
|
+
<p className="sentence-case">{helperText}</p>
|
|
87
|
+
</div>
|
|
88
|
+
</>
|
|
89
|
+
) : null}
|
|
90
|
+
</div>
|
|
91
|
+
)
|
|
92
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface CustomInputProps {
|
|
2
|
+
name: string
|
|
3
|
+
value: string | number
|
|
4
|
+
onChange: (e: any) => void
|
|
5
|
+
onBlur?: (e: any) => void
|
|
6
|
+
onFocus?: (e: any) => void
|
|
7
|
+
autoComplete?: string
|
|
8
|
+
label?: React.ReactNode
|
|
9
|
+
labelClassName?: string
|
|
10
|
+
type?: 'text' | 'number'
|
|
11
|
+
disabled?: boolean
|
|
12
|
+
placeholder?: string
|
|
13
|
+
tabIndex?: number
|
|
14
|
+
dataTestid?: string
|
|
15
|
+
isRequiredField?: boolean
|
|
16
|
+
autoFocus?: boolean
|
|
17
|
+
rootClassName?: string
|
|
18
|
+
showLink?: boolean
|
|
19
|
+
link?: string
|
|
20
|
+
linkText?: string
|
|
21
|
+
error?: React.ReactNode
|
|
22
|
+
helperText?: string;
|
|
23
|
+
}
|
package/src/Common/Helper.tsx
CHANGED
|
@@ -3,7 +3,6 @@ import moment from 'moment'
|
|
|
3
3
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
|
4
4
|
import { useLocation } from 'react-router-dom'
|
|
5
5
|
import { toast } from 'react-toastify'
|
|
6
|
-
import { ReactComponent as FormError } from '../Assets/Icon/ic-warning.svg'
|
|
7
6
|
import { ERROR_EMPTY_SCREEN, TOKEN_COOKIE_NAME } from './Constants'
|
|
8
7
|
import { ServerErrors } from './ServerError'
|
|
9
8
|
import { toastAccessDenied } from './ToastBody'
|
|
@@ -116,11 +115,11 @@ export function getRandomColor(email: string): string {
|
|
|
116
115
|
return colors[sum % colors.length]
|
|
117
116
|
}
|
|
118
117
|
|
|
119
|
-
export const getAlphabetIcon = (str: string) => {
|
|
118
|
+
export const getAlphabetIcon = (str: string, rootClassName: string = "") => {
|
|
120
119
|
if (!str) return null
|
|
121
120
|
return (
|
|
122
121
|
<span
|
|
123
|
-
className=
|
|
122
|
+
className={`${rootClassName} alphabet-icon__initial fs-13 icon-dim-20 flex cn-0 mr-8`}
|
|
124
123
|
style={{ backgroundColor: getRandomColor(str) }}
|
|
125
124
|
>
|
|
126
125
|
{str[0]}
|
|
@@ -277,64 +276,6 @@ export function useForm(stateSchema, validationSchema = {}, callback) {
|
|
|
277
276
|
return { state, disable, handleOnChange, handleOnSubmit }
|
|
278
277
|
}
|
|
279
278
|
|
|
280
|
-
function handleError(error: any): any[] {
|
|
281
|
-
if (!error) {
|
|
282
|
-
return []
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
if (!Array.isArray(error)) {
|
|
286
|
-
return [error]
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
return error
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
export function CustomInput({
|
|
293
|
-
name,
|
|
294
|
-
value,
|
|
295
|
-
error,
|
|
296
|
-
onChange,
|
|
297
|
-
onBlur = (e) => {},
|
|
298
|
-
onFocus = (e) => {},
|
|
299
|
-
label,
|
|
300
|
-
type = 'text',
|
|
301
|
-
disabled = false,
|
|
302
|
-
autoComplete = 'off',
|
|
303
|
-
labelClassName = '',
|
|
304
|
-
placeholder = '',
|
|
305
|
-
tabIndex = 1,
|
|
306
|
-
dataTestid = '',
|
|
307
|
-
}) {
|
|
308
|
-
return (
|
|
309
|
-
<div className="flex column left top">
|
|
310
|
-
<label className={`form__label ${labelClassName}`}>{label}</label>
|
|
311
|
-
<input
|
|
312
|
-
data-testid={dataTestid}
|
|
313
|
-
type={type}
|
|
314
|
-
name={name}
|
|
315
|
-
autoComplete="off"
|
|
316
|
-
className="form__input"
|
|
317
|
-
onChange={(e) => {
|
|
318
|
-
e.persist()
|
|
319
|
-
onChange(e)
|
|
320
|
-
}}
|
|
321
|
-
onBlur={onBlur}
|
|
322
|
-
onFocus={onFocus}
|
|
323
|
-
placeholder={placeholder}
|
|
324
|
-
value={value}
|
|
325
|
-
disabled={disabled}
|
|
326
|
-
tabIndex={tabIndex}
|
|
327
|
-
/>
|
|
328
|
-
{handleError(error).map((err) => (
|
|
329
|
-
<div className="form__error" key={err}>
|
|
330
|
-
<FormError className="form__icon form__icon--error" />
|
|
331
|
-
{err}
|
|
332
|
-
</div>
|
|
333
|
-
))}
|
|
334
|
-
</div>
|
|
335
|
-
)
|
|
336
|
-
}
|
|
337
|
-
|
|
338
279
|
export function handleUTCTime(ts: string, isRelativeTime = false) {
|
|
339
280
|
let timestamp = ''
|
|
340
281
|
try {
|
package/src/Common/Types.ts
CHANGED
package/src/Common/index.ts
CHANGED