@devtron-labs/devtron-fe-common-lib 0.0.45-beta-15 → 0.0.45-beta-16
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/Dialogs/Types.d.ts +1 -0
- package/dist/Common/Helper.d.ts +16 -0
- package/dist/Common/Types.d.ts +26 -0
- package/dist/Common/index.d.ts +0 -1
- package/dist/index.js +148 -146
- package/package.json +1 -1
- package/src/Common/Dialogs/DeleteDialog.tsx +1 -1
- package/src/Common/Dialogs/Types.ts +1 -0
- package/src/Common/Helper.tsx +59 -0
- package/src/Common/Types.ts +32 -1
- package/src/Common/index.ts +0 -1
- package/dist/Common/CustomInput/CustomInput.d.ts +0 -3
- package/dist/Common/CustomInput/Types.d.ts +0 -26
- package/dist/Common/CustomInput/index.d.ts +0 -2
- package/src/Common/CustomInput/CustomInput.tsx +0 -121
- package/src/Common/CustomInput/Types.ts +0 -25
- package/src/Common/CustomInput/index.ts +0 -2
package/dist/Common/Helper.d.ts
CHANGED
|
@@ -25,6 +25,22 @@ 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;
|
|
28
44
|
export declare function handleUTCTime(ts: string, isRelativeTime?: boolean): string;
|
|
29
45
|
export declare function useSearchString(): UseSearchString;
|
|
30
46
|
export declare const closeOnEscKeyPressed: (e: any, actionClose: () => void) => void;
|
package/dist/Common/Types.d.ts
CHANGED
|
@@ -563,4 +563,30 @@ export interface CiPipeline {
|
|
|
563
563
|
isOffendingMandatoryPlugin?: boolean;
|
|
564
564
|
pipelineType?: string;
|
|
565
565
|
}
|
|
566
|
+
export declare enum PipelineType {
|
|
567
|
+
CI_PIPELINE = "CI_PIPELINE",
|
|
568
|
+
CD_PIPELINE = "CD_PIPELINE",
|
|
569
|
+
WEBHOOK = "WEBHOOK",
|
|
570
|
+
LINKED_CD = "LINKED_CD"
|
|
571
|
+
}
|
|
572
|
+
export declare enum WorkflowNodeType {
|
|
573
|
+
GIT = "GIT",
|
|
574
|
+
CI = "CI",
|
|
575
|
+
WEBHOOK = "WEBHOOK",
|
|
576
|
+
PRE_CD = "PRECD",
|
|
577
|
+
CD = "CD",
|
|
578
|
+
POST_CD = "POSTCD"
|
|
579
|
+
}
|
|
580
|
+
export declare enum AddCDPositions {
|
|
581
|
+
LEFT = "left",
|
|
582
|
+
RIGHT = "right"
|
|
583
|
+
}
|
|
584
|
+
export interface SelectedNode {
|
|
585
|
+
nodeType: WorkflowNodeType;
|
|
586
|
+
id: string;
|
|
587
|
+
}
|
|
588
|
+
export declare enum AddPipelineType {
|
|
589
|
+
SEQUENTIAL = "SEQUENTIAL",
|
|
590
|
+
PARALLEL = "PARALLEL"
|
|
591
|
+
}
|
|
566
592
|
export {};
|
package/dist/Common/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -463,7 +463,33 @@ exports.FilterConditionType = void 0;
|
|
|
463
463
|
(function (FilterConditionType) {
|
|
464
464
|
FilterConditionType[FilterConditionType["PASS"] = 1] = "PASS";
|
|
465
465
|
FilterConditionType[FilterConditionType["FAIL"] = 0] = "FAIL";
|
|
466
|
-
})(exports.FilterConditionType || (exports.FilterConditionType = {}));
|
|
466
|
+
})(exports.FilterConditionType || (exports.FilterConditionType = {}));
|
|
467
|
+
exports.PipelineType = void 0;
|
|
468
|
+
(function (PipelineType) {
|
|
469
|
+
PipelineType["CI_PIPELINE"] = "CI_PIPELINE";
|
|
470
|
+
PipelineType["CD_PIPELINE"] = "CD_PIPELINE";
|
|
471
|
+
PipelineType["WEBHOOK"] = "WEBHOOK";
|
|
472
|
+
PipelineType["LINKED_CD"] = "LINKED_CD";
|
|
473
|
+
})(exports.PipelineType || (exports.PipelineType = {}));
|
|
474
|
+
exports.WorkflowNodeType = void 0;
|
|
475
|
+
(function (WorkflowNodeType) {
|
|
476
|
+
WorkflowNodeType["GIT"] = "GIT";
|
|
477
|
+
WorkflowNodeType["CI"] = "CI";
|
|
478
|
+
WorkflowNodeType["WEBHOOK"] = "WEBHOOK";
|
|
479
|
+
WorkflowNodeType["PRE_CD"] = "PRECD";
|
|
480
|
+
WorkflowNodeType["CD"] = "CD";
|
|
481
|
+
WorkflowNodeType["POST_CD"] = "POSTCD";
|
|
482
|
+
})(exports.WorkflowNodeType || (exports.WorkflowNodeType = {}));
|
|
483
|
+
exports.AddCDPositions = void 0;
|
|
484
|
+
(function (AddCDPositions) {
|
|
485
|
+
AddCDPositions["LEFT"] = "left";
|
|
486
|
+
AddCDPositions["RIGHT"] = "right";
|
|
487
|
+
})(exports.AddCDPositions || (exports.AddCDPositions = {}));
|
|
488
|
+
exports.AddPipelineType = void 0;
|
|
489
|
+
(function (AddPipelineType) {
|
|
490
|
+
AddPipelineType["SEQUENTIAL"] = "SEQUENTIAL";
|
|
491
|
+
AddPipelineType["PARALLEL"] = "PARALLEL";
|
|
492
|
+
})(exports.AddPipelineType || (exports.AddPipelineType = {}));
|
|
467
493
|
|
|
468
494
|
var responseMessages = {
|
|
469
495
|
100: 'Continue',
|
|
@@ -9836,6 +9862,28 @@ var moment$1 = {
|
|
|
9836
9862
|
|
|
9837
9863
|
var moment = momentExports;
|
|
9838
9864
|
|
|
9865
|
+
var _g$5;
|
|
9866
|
+
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); }
|
|
9867
|
+
var SvgIcWarning = function SvgIcWarning(props) {
|
|
9868
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
|
|
9869
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9870
|
+
width: "1em",
|
|
9871
|
+
height: "1em",
|
|
9872
|
+
viewBox: "0 0 32 32"
|
|
9873
|
+
}, props), _g$5 || (_g$5 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
9874
|
+
fill: "none",
|
|
9875
|
+
fillRule: "evenodd"
|
|
9876
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
9877
|
+
d: "M0 0h32v32H0z"
|
|
9878
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
9879
|
+
fill: "#FFCB5D",
|
|
9880
|
+
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"
|
|
9881
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
9882
|
+
fill: "#FFF",
|
|
9883
|
+
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"
|
|
9884
|
+
}))));
|
|
9885
|
+
};
|
|
9886
|
+
|
|
9839
9887
|
toast.configure({
|
|
9840
9888
|
autoClose: 3000,
|
|
9841
9889
|
hideProgressBar: true,
|
|
@@ -10064,6 +10112,22 @@ function useForm(stateSchema, validationSchema, callback) {
|
|
|
10064
10112
|
};
|
|
10065
10113
|
return { state: state, disable: disable, handleOnChange: handleOnChange, handleOnSubmit: handleOnSubmit };
|
|
10066
10114
|
}
|
|
10115
|
+
function handleError(error) {
|
|
10116
|
+
if (!error) {
|
|
10117
|
+
return [];
|
|
10118
|
+
}
|
|
10119
|
+
if (!Array.isArray(error)) {
|
|
10120
|
+
return [error];
|
|
10121
|
+
}
|
|
10122
|
+
return error;
|
|
10123
|
+
}
|
|
10124
|
+
function CustomInput(_a) {
|
|
10125
|
+
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;
|
|
10126
|
+
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) {
|
|
10127
|
+
e.persist();
|
|
10128
|
+
onChange(e);
|
|
10129
|
+
}, 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)); })] })));
|
|
10130
|
+
}
|
|
10067
10131
|
function handleUTCTime(ts, isRelativeTime) {
|
|
10068
10132
|
if (isRelativeTime === void 0) { isRelativeTime = false; }
|
|
10069
10133
|
var timestamp = '';
|
|
@@ -10361,9 +10425,9 @@ var Modal = function (_a) {
|
|
|
10361
10425
|
};
|
|
10362
10426
|
|
|
10363
10427
|
var _path$c;
|
|
10364
|
-
function _extends$
|
|
10428
|
+
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); }
|
|
10365
10429
|
var SvgIcCross = function SvgIcCross(props) {
|
|
10366
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10430
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
|
|
10367
10431
|
width: "1em",
|
|
10368
10432
|
height: "1em",
|
|
10369
10433
|
viewBox: "0 0 24 24",
|
|
@@ -14669,9 +14733,9 @@ var index = /*#__PURE__*/forwardRef( /*#__PURE__*/TippyGenerator(tippy));
|
|
|
14669
14733
|
var Tippy = index;
|
|
14670
14734
|
|
|
14671
14735
|
var _path$b;
|
|
14672
|
-
function _extends$
|
|
14736
|
+
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); }
|
|
14673
14737
|
var SvgIcHelp = function SvgIcHelp(props) {
|
|
14674
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14738
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
|
|
14675
14739
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14676
14740
|
width: "1em",
|
|
14677
14741
|
height: "1em",
|
|
@@ -14684,9 +14748,9 @@ var SvgIcHelp = function SvgIcHelp(props) {
|
|
|
14684
14748
|
};
|
|
14685
14749
|
|
|
14686
14750
|
var _path$a;
|
|
14687
|
-
function _extends$
|
|
14751
|
+
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); }
|
|
14688
14752
|
var SvgIcHelpOutline = function SvgIcHelpOutline(props) {
|
|
14689
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14753
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
|
|
14690
14754
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14691
14755
|
viewBox: "0 0 17 16",
|
|
14692
14756
|
width: "1em",
|
|
@@ -14744,9 +14808,9 @@ function TippyCustomized(props) {
|
|
|
14744
14808
|
}
|
|
14745
14809
|
|
|
14746
14810
|
var _path$9, _circle, _path2$1;
|
|
14747
|
-
function _extends$
|
|
14811
|
+
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); }
|
|
14748
14812
|
var SvgInjectTag = function SvgInjectTag(props) {
|
|
14749
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14813
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
|
|
14750
14814
|
width: "1em",
|
|
14751
14815
|
height: "1em",
|
|
14752
14816
|
viewBox: "0 0 20 20",
|
|
@@ -14781,9 +14845,9 @@ function PropagateTagInfo(_a) {
|
|
|
14781
14845
|
}
|
|
14782
14846
|
|
|
14783
14847
|
var _path$8;
|
|
14784
|
-
function _extends$
|
|
14848
|
+
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); }
|
|
14785
14849
|
var SvgIcInfoOutlined = function SvgIcInfoOutlined(props) {
|
|
14786
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14850
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
|
|
14787
14851
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14788
14852
|
width: "1em",
|
|
14789
14853
|
height: "1em",
|
|
@@ -15023,9 +15087,9 @@ var TagDetails = function (_a) {
|
|
|
15023
15087
|
};
|
|
15024
15088
|
|
|
15025
15089
|
var _path$7;
|
|
15026
|
-
function _extends$
|
|
15090
|
+
function _extends$e() { _extends$e = 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$e.apply(this, arguments); }
|
|
15027
15091
|
var SvgIcAdd = function SvgIcAdd(props) {
|
|
15028
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
15092
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
|
|
15029
15093
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15030
15094
|
width: "1em",
|
|
15031
15095
|
height: "1em",
|
|
@@ -15096,7 +15160,7 @@ var DeleteDialog = function (props) {
|
|
|
15096
15160
|
}
|
|
15097
15161
|
props.closeDelete();
|
|
15098
15162
|
};
|
|
15099
|
-
return (jsxRuntime.jsxs(ConfirmationDialog, __assign({ className: "confirmation-dialog__body--w-400" }, { children: [jsxRuntime.jsx(ConfirmationDialog.Icon, { src: warn }), jsxRuntime.jsx(ConfirmationDialog.Body, __assign({ title: props.title }, { children: jsxRuntime.jsxs("div", __assign({ className: "fs-13 cn-7 lh-1-54 w-100" }, { children: [props.description ? props.description : null, props.children] })) })), jsxRuntime.jsx(ConfirmationDialog.ButtonGroup, { children: jsxRuntime.jsxs("div", __assign({ className: "flex right" }, { children: [jsxRuntime.jsx("button", __assign({ type: "button", className: "cta cancel cta-cd-delete-modal ml-16", onClick: handleModalClose, disabled: props.apiCallInProgress, "data-testid": "dialog-cancel" }, { children: "Cancel" })), jsxRuntime.jsx("button", __assign({ type: "button", className: "cta delete cta-cd-delete-modal ml-16", onClick: handleDelete, disabled: props.apiCallInProgress, "data-testid": "dialog-delete" }, { children: props.apiCallInProgress ? (jsxRuntime.jsx(Progressing, {})) : ("".concat(props.deletePrefix || '').concat(props.buttonPrimaryText ? props.buttonPrimaryText : 'Delete').concat(props.deletePostfix || '')) }))] })) })] })));
|
|
15163
|
+
return (jsxRuntime.jsxs(ConfirmationDialog, __assign({ className: "confirmation-dialog__body--w-400" }, { children: [jsxRuntime.jsx(ConfirmationDialog.Icon, { src: warn }), jsxRuntime.jsx(ConfirmationDialog.Body, __assign({ title: props.title }, { children: jsxRuntime.jsxs("div", __assign({ className: "fs-13 cn-7 lh-1-54 w-100" }, { children: [props.description ? props.description : null, props.children] })) })), jsxRuntime.jsx(ConfirmationDialog.ButtonGroup, { children: jsxRuntime.jsxs("div", __assign({ className: "flex right" }, { children: [jsxRuntime.jsx("button", __assign({ type: "button", className: "cta cancel cta-cd-delete-modal ml-16", onClick: handleModalClose, disabled: props.apiCallInProgress, "data-testid": "dialog-cancel" }, { children: "Cancel" })), jsxRuntime.jsx("button", __assign({ type: "button", className: "cta delete cta-cd-delete-modal ml-16", onClick: handleDelete, disabled: props.apiCallInProgress || props.disabled, "data-testid": "dialog-delete" }, { children: props.apiCallInProgress ? (jsxRuntime.jsx(Progressing, {})) : ("".concat(props.deletePrefix || '').concat(props.buttonPrimaryText ? props.buttonPrimaryText : 'Delete').concat(props.deletePostfix || '')) }))] })) })] })));
|
|
15100
15164
|
};
|
|
15101
15165
|
function DeleteDialogDescription(props) {
|
|
15102
15166
|
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: props.children });
|
|
@@ -15160,8 +15224,8 @@ function ForceDeleteDialog(_a) {
|
|
|
15160
15224
|
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?" })] }) })) }));
|
|
15161
15225
|
}
|
|
15162
15226
|
|
|
15163
|
-
function _extends$
|
|
15164
|
-
_extends$
|
|
15227
|
+
function _extends$d() {
|
|
15228
|
+
_extends$d = Object.assign ? Object.assign.bind() : function (target) {
|
|
15165
15229
|
for (var i = 1; i < arguments.length; i++) {
|
|
15166
15230
|
var source = arguments[i];
|
|
15167
15231
|
for (var key in source) {
|
|
@@ -15172,7 +15236,7 @@ function _extends$e() {
|
|
|
15172
15236
|
}
|
|
15173
15237
|
return target;
|
|
15174
15238
|
};
|
|
15175
|
-
return _extends$
|
|
15239
|
+
return _extends$d.apply(this, arguments);
|
|
15176
15240
|
}
|
|
15177
15241
|
|
|
15178
15242
|
/*
|
|
@@ -18713,7 +18777,7 @@ var Menu = function Menu(props) {
|
|
|
18713
18777
|
getStyles = props.getStyles,
|
|
18714
18778
|
innerRef = props.innerRef,
|
|
18715
18779
|
innerProps = props.innerProps;
|
|
18716
|
-
return jsx("div", _extends$
|
|
18780
|
+
return jsx("div", _extends$d({
|
|
18717
18781
|
css: getStyles('menu', props),
|
|
18718
18782
|
className: cx({
|
|
18719
18783
|
menu: true
|
|
@@ -18745,7 +18809,7 @@ var MenuList$1 = function MenuList(props) {
|
|
|
18745
18809
|
innerProps = props.innerProps,
|
|
18746
18810
|
innerRef = props.innerRef,
|
|
18747
18811
|
isMulti = props.isMulti;
|
|
18748
|
-
return jsx("div", _extends$
|
|
18812
|
+
return jsx("div", _extends$d({
|
|
18749
18813
|
css: getStyles('menuList', props),
|
|
18750
18814
|
className: cx({
|
|
18751
18815
|
'menu-list': true,
|
|
@@ -18776,7 +18840,7 @@ var NoOptionsMessage = function NoOptionsMessage(props) {
|
|
|
18776
18840
|
cx = props.cx,
|
|
18777
18841
|
getStyles = props.getStyles,
|
|
18778
18842
|
innerProps = props.innerProps;
|
|
18779
|
-
return jsx("div", _extends$
|
|
18843
|
+
return jsx("div", _extends$d({
|
|
18780
18844
|
css: getStyles('noOptionsMessage', props),
|
|
18781
18845
|
className: cx({
|
|
18782
18846
|
'menu-notice': true,
|
|
@@ -18793,7 +18857,7 @@ var LoadingMessage = function LoadingMessage(props) {
|
|
|
18793
18857
|
cx = props.cx,
|
|
18794
18858
|
getStyles = props.getStyles,
|
|
18795
18859
|
innerProps = props.innerProps;
|
|
18796
|
-
return jsx("div", _extends$
|
|
18860
|
+
return jsx("div", _extends$d({
|
|
18797
18861
|
css: getStyles('loadingMessage', props),
|
|
18798
18862
|
className: cx({
|
|
18799
18863
|
'menu-notice': true,
|
|
@@ -18881,7 +18945,7 @@ var MenuPortal = /*#__PURE__*/function (_Component2) {
|
|
|
18881
18945
|
rect: rect
|
|
18882
18946
|
}; // same wrapper element whether fixed or portalled
|
|
18883
18947
|
|
|
18884
|
-
var menuWrapper = jsx("div", _extends$
|
|
18948
|
+
var menuWrapper = jsx("div", _extends$d({
|
|
18885
18949
|
css: getStyles('menuPortal', state),
|
|
18886
18950
|
className: cx({
|
|
18887
18951
|
'menu-portal': true
|
|
@@ -18917,7 +18981,7 @@ var SelectContainer = function SelectContainer(props) {
|
|
|
18917
18981
|
innerProps = props.innerProps,
|
|
18918
18982
|
isDisabled = props.isDisabled,
|
|
18919
18983
|
isRtl = props.isRtl;
|
|
18920
|
-
return jsx("div", _extends$
|
|
18984
|
+
return jsx("div", _extends$d({
|
|
18921
18985
|
css: getStyles('container', props),
|
|
18922
18986
|
className: cx({
|
|
18923
18987
|
'--is-disabled': isDisabled,
|
|
@@ -18952,7 +19016,7 @@ var ValueContainer = function ValueContainer(props) {
|
|
|
18952
19016
|
isMulti = props.isMulti,
|
|
18953
19017
|
getStyles = props.getStyles,
|
|
18954
19018
|
hasValue = props.hasValue;
|
|
18955
|
-
return jsx("div", _extends$
|
|
19019
|
+
return jsx("div", _extends$d({
|
|
18956
19020
|
css: getStyles('valueContainer', props),
|
|
18957
19021
|
className: cx({
|
|
18958
19022
|
'value-container': true,
|
|
@@ -18978,7 +19042,7 @@ var IndicatorsContainer = function IndicatorsContainer(props) {
|
|
|
18978
19042
|
cx = props.cx,
|
|
18979
19043
|
innerProps = props.innerProps,
|
|
18980
19044
|
getStyles = props.getStyles;
|
|
18981
|
-
return jsx("div", _extends$
|
|
19045
|
+
return jsx("div", _extends$d({
|
|
18982
19046
|
css: getStyles('indicatorsContainer', props),
|
|
18983
19047
|
className: cx({
|
|
18984
19048
|
indicators: true
|
|
@@ -19009,7 +19073,7 @@ var Svg = function Svg(_ref) {
|
|
|
19009
19073
|
var size = _ref.size,
|
|
19010
19074
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
19011
19075
|
|
|
19012
|
-
return jsx("svg", _extends$
|
|
19076
|
+
return jsx("svg", _extends$d({
|
|
19013
19077
|
height: size,
|
|
19014
19078
|
width: size,
|
|
19015
19079
|
viewBox: "0 0 20 20",
|
|
@@ -19020,14 +19084,14 @@ var Svg = function Svg(_ref) {
|
|
|
19020
19084
|
};
|
|
19021
19085
|
|
|
19022
19086
|
var CrossIcon = function CrossIcon(props) {
|
|
19023
|
-
return jsx(Svg, _extends$
|
|
19087
|
+
return jsx(Svg, _extends$d({
|
|
19024
19088
|
size: 20
|
|
19025
19089
|
}, props), jsx("path", {
|
|
19026
19090
|
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"
|
|
19027
19091
|
}));
|
|
19028
19092
|
};
|
|
19029
19093
|
var DownChevron = function DownChevron(props) {
|
|
19030
|
-
return jsx(Svg, _extends$
|
|
19094
|
+
return jsx(Svg, _extends$d({
|
|
19031
19095
|
size: 20
|
|
19032
19096
|
}, props), jsx("path", {
|
|
19033
19097
|
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"
|
|
@@ -19060,7 +19124,7 @@ var DropdownIndicator$1 = function DropdownIndicator(props) {
|
|
|
19060
19124
|
cx = props.cx,
|
|
19061
19125
|
getStyles = props.getStyles,
|
|
19062
19126
|
innerProps = props.innerProps;
|
|
19063
|
-
return jsx("div", _extends$
|
|
19127
|
+
return jsx("div", _extends$d({
|
|
19064
19128
|
css: getStyles('dropdownIndicator', props),
|
|
19065
19129
|
className: cx({
|
|
19066
19130
|
indicator: true,
|
|
@@ -19075,7 +19139,7 @@ var ClearIndicator$1 = function ClearIndicator(props) {
|
|
|
19075
19139
|
cx = props.cx,
|
|
19076
19140
|
getStyles = props.getStyles,
|
|
19077
19141
|
innerProps = props.innerProps;
|
|
19078
|
-
return jsx("div", _extends$
|
|
19142
|
+
return jsx("div", _extends$d({
|
|
19079
19143
|
css: getStyles('clearIndicator', props),
|
|
19080
19144
|
className: cx({
|
|
19081
19145
|
indicator: true,
|
|
@@ -19105,7 +19169,7 @@ var IndicatorSeparator = function IndicatorSeparator(props) {
|
|
|
19105
19169
|
cx = props.cx,
|
|
19106
19170
|
getStyles = props.getStyles,
|
|
19107
19171
|
innerProps = props.innerProps;
|
|
19108
|
-
return jsx("span", _extends$
|
|
19172
|
+
return jsx("span", _extends$d({}, innerProps, {
|
|
19109
19173
|
css: getStyles('indicatorSeparator', props),
|
|
19110
19174
|
className: cx({
|
|
19111
19175
|
'indicator-separator': true
|
|
@@ -19160,7 +19224,7 @@ var LoadingIndicator = function LoadingIndicator(props) {
|
|
|
19160
19224
|
getStyles = props.getStyles,
|
|
19161
19225
|
innerProps = props.innerProps,
|
|
19162
19226
|
isRtl = props.isRtl;
|
|
19163
|
-
return jsx("div", _extends$
|
|
19227
|
+
return jsx("div", _extends$d({
|
|
19164
19228
|
css: getStyles('loadingIndicator', props),
|
|
19165
19229
|
className: cx({
|
|
19166
19230
|
indicator: true,
|
|
@@ -19221,7 +19285,7 @@ var Control = function Control(props) {
|
|
|
19221
19285
|
innerRef = props.innerRef,
|
|
19222
19286
|
innerProps = props.innerProps,
|
|
19223
19287
|
menuIsOpen = props.menuIsOpen;
|
|
19224
|
-
return jsx("div", _extends$
|
|
19288
|
+
return jsx("div", _extends$d({
|
|
19225
19289
|
ref: innerRef,
|
|
19226
19290
|
css: getStyles('control', props),
|
|
19227
19291
|
className: cx({
|
|
@@ -19253,12 +19317,12 @@ var Group = function Group(props) {
|
|
|
19253
19317
|
label = props.label,
|
|
19254
19318
|
theme = props.theme,
|
|
19255
19319
|
selectProps = props.selectProps;
|
|
19256
|
-
return jsx("div", _extends$
|
|
19320
|
+
return jsx("div", _extends$d({
|
|
19257
19321
|
css: getStyles('group', props),
|
|
19258
19322
|
className: cx({
|
|
19259
19323
|
group: true
|
|
19260
19324
|
}, className)
|
|
19261
|
-
}, innerProps), jsx(Heading, _extends$
|
|
19325
|
+
}, innerProps), jsx(Heading, _extends$d({}, headingProps, {
|
|
19262
19326
|
selectProps: selectProps,
|
|
19263
19327
|
theme: theme,
|
|
19264
19328
|
getStyles: getStyles,
|
|
@@ -19290,7 +19354,7 @@ var GroupHeading = function GroupHeading(props) {
|
|
|
19290
19354
|
_cleanCommonProps.data;
|
|
19291
19355
|
var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1$1);
|
|
19292
19356
|
|
|
19293
|
-
return jsx("div", _extends$
|
|
19357
|
+
return jsx("div", _extends$d({
|
|
19294
19358
|
css: getStyles('groupHeading', props),
|
|
19295
19359
|
className: cx({
|
|
19296
19360
|
'group-heading': true
|
|
@@ -19366,7 +19430,7 @@ var Input = function Input(props) {
|
|
|
19366
19430
|
}, className),
|
|
19367
19431
|
css: getStyles('input', props),
|
|
19368
19432
|
"data-value": value || ''
|
|
19369
|
-
}, jsx("input", _extends$
|
|
19433
|
+
}, jsx("input", _extends$d({
|
|
19370
19434
|
className: cx({
|
|
19371
19435
|
input: true
|
|
19372
19436
|
}, inputClassName),
|
|
@@ -19436,7 +19500,7 @@ var MultiValueLabel = MultiValueGeneric;
|
|
|
19436
19500
|
function MultiValueRemove$1(_ref5) {
|
|
19437
19501
|
var children = _ref5.children,
|
|
19438
19502
|
innerProps = _ref5.innerProps;
|
|
19439
|
-
return jsx("div", _extends$
|
|
19503
|
+
return jsx("div", _extends$d({
|
|
19440
19504
|
role: "button"
|
|
19441
19505
|
}, innerProps), children || jsx(CrossIcon, {
|
|
19442
19506
|
size: 14
|
|
@@ -19525,7 +19589,7 @@ var Option$1 = function Option(props) {
|
|
|
19525
19589
|
isSelected = props.isSelected,
|
|
19526
19590
|
innerRef = props.innerRef,
|
|
19527
19591
|
innerProps = props.innerProps;
|
|
19528
|
-
return jsx("div", _extends$
|
|
19592
|
+
return jsx("div", _extends$d({
|
|
19529
19593
|
css: getStyles('option', props),
|
|
19530
19594
|
className: cx({
|
|
19531
19595
|
option: true,
|
|
@@ -19557,7 +19621,7 @@ var Placeholder = function Placeholder(props) {
|
|
|
19557
19621
|
cx = props.cx,
|
|
19558
19622
|
getStyles = props.getStyles,
|
|
19559
19623
|
innerProps = props.innerProps;
|
|
19560
|
-
return jsx("div", _extends$
|
|
19624
|
+
return jsx("div", _extends$d({
|
|
19561
19625
|
css: getStyles('placeholder', props),
|
|
19562
19626
|
className: cx({
|
|
19563
19627
|
placeholder: true
|
|
@@ -19590,7 +19654,7 @@ var SingleValue = function SingleValue(props) {
|
|
|
19590
19654
|
getStyles = props.getStyles,
|
|
19591
19655
|
isDisabled = props.isDisabled,
|
|
19592
19656
|
innerProps = props.innerProps;
|
|
19593
|
-
return jsx("div", _extends$
|
|
19657
|
+
return jsx("div", _extends$d({
|
|
19594
19658
|
css: getStyles('singleValue', props),
|
|
19595
19659
|
className: cx({
|
|
19596
19660
|
'single-value': true,
|
|
@@ -19838,7 +19902,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
19838
19902
|
};
|
|
19839
19903
|
|
|
19840
19904
|
var A11yText = function A11yText(props) {
|
|
19841
|
-
return jsx("span", _extends$
|
|
19905
|
+
return jsx("span", _extends$d({
|
|
19842
19906
|
css: _ref
|
|
19843
19907
|
}, props));
|
|
19844
19908
|
};
|
|
@@ -20374,7 +20438,7 @@ function DummyInput(_ref) {
|
|
|
20374
20438
|
var innerRef = _ref.innerRef,
|
|
20375
20439
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
20376
20440
|
|
|
20377
|
-
return jsx("input", _extends$
|
|
20441
|
+
return jsx("input", _extends$d({
|
|
20378
20442
|
ref: innerRef
|
|
20379
20443
|
}, props, {
|
|
20380
20444
|
css: /*#__PURE__*/css$2({
|
|
@@ -22009,7 +22073,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22009
22073
|
|
|
22010
22074
|
if (!isSearchable) {
|
|
22011
22075
|
// use a dummy input to maintain focus/blur functionality
|
|
22012
|
-
return /*#__PURE__*/React__namespace.createElement(DummyInput, _extends$
|
|
22076
|
+
return /*#__PURE__*/React__namespace.createElement(DummyInput, _extends$d({
|
|
22013
22077
|
id: id,
|
|
22014
22078
|
innerRef: this.getInputRef,
|
|
22015
22079
|
onBlur: this.onInputBlur,
|
|
@@ -22023,7 +22087,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22023
22087
|
}, ariaAttributes));
|
|
22024
22088
|
}
|
|
22025
22089
|
|
|
22026
|
-
return /*#__PURE__*/React__namespace.createElement(Input, _extends$
|
|
22090
|
+
return /*#__PURE__*/React__namespace.createElement(Input, _extends$d({}, commonProps, {
|
|
22027
22091
|
autoCapitalize: "none",
|
|
22028
22092
|
autoComplete: "off",
|
|
22029
22093
|
autoCorrect: "off",
|
|
@@ -22067,7 +22131,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22067
22131
|
isFocused = _this$state5.isFocused;
|
|
22068
22132
|
|
|
22069
22133
|
if (!this.hasValue() || !controlShouldRenderValue) {
|
|
22070
|
-
return inputValue ? null : /*#__PURE__*/React__namespace.createElement(Placeholder, _extends$
|
|
22134
|
+
return inputValue ? null : /*#__PURE__*/React__namespace.createElement(Placeholder, _extends$d({}, commonProps, {
|
|
22071
22135
|
key: "placeholder",
|
|
22072
22136
|
isDisabled: isDisabled,
|
|
22073
22137
|
isFocused: isFocused,
|
|
@@ -22081,7 +22145,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22081
22145
|
return selectValue.map(function (opt, index) {
|
|
22082
22146
|
var isOptionFocused = opt === focusedValue;
|
|
22083
22147
|
var key = "".concat(_this3.getOptionLabel(opt), "-").concat(_this3.getOptionValue(opt));
|
|
22084
|
-
return /*#__PURE__*/React__namespace.createElement(MultiValue, _extends$
|
|
22148
|
+
return /*#__PURE__*/React__namespace.createElement(MultiValue, _extends$d({}, commonProps, {
|
|
22085
22149
|
components: {
|
|
22086
22150
|
Container: MultiValueContainer,
|
|
22087
22151
|
Label: MultiValueLabel,
|
|
@@ -22113,7 +22177,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22113
22177
|
}
|
|
22114
22178
|
|
|
22115
22179
|
var singleValue = selectValue[0];
|
|
22116
|
-
return /*#__PURE__*/React__namespace.createElement(SingleValue, _extends$
|
|
22180
|
+
return /*#__PURE__*/React__namespace.createElement(SingleValue, _extends$d({}, commonProps, {
|
|
22117
22181
|
data: singleValue,
|
|
22118
22182
|
isDisabled: isDisabled
|
|
22119
22183
|
}), this.formatOptionLabel(singleValue, 'value'));
|
|
@@ -22139,7 +22203,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22139
22203
|
onTouchEnd: this.onClearIndicatorTouchEnd,
|
|
22140
22204
|
'aria-hidden': 'true'
|
|
22141
22205
|
};
|
|
22142
|
-
return /*#__PURE__*/React__namespace.createElement(ClearIndicator, _extends$
|
|
22206
|
+
return /*#__PURE__*/React__namespace.createElement(ClearIndicator, _extends$d({}, commonProps, {
|
|
22143
22207
|
innerProps: innerProps,
|
|
22144
22208
|
isFocused: isFocused
|
|
22145
22209
|
}));
|
|
@@ -22159,7 +22223,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22159
22223
|
var innerProps = {
|
|
22160
22224
|
'aria-hidden': 'true'
|
|
22161
22225
|
};
|
|
22162
|
-
return /*#__PURE__*/React__namespace.createElement(LoadingIndicator, _extends$
|
|
22226
|
+
return /*#__PURE__*/React__namespace.createElement(LoadingIndicator, _extends$d({}, commonProps, {
|
|
22163
22227
|
innerProps: innerProps,
|
|
22164
22228
|
isDisabled: isDisabled,
|
|
22165
22229
|
isFocused: isFocused
|
|
@@ -22177,7 +22241,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22177
22241
|
var commonProps = this.commonProps;
|
|
22178
22242
|
var isDisabled = this.props.isDisabled;
|
|
22179
22243
|
var isFocused = this.state.isFocused;
|
|
22180
|
-
return /*#__PURE__*/React__namespace.createElement(IndicatorSeparator, _extends$
|
|
22244
|
+
return /*#__PURE__*/React__namespace.createElement(IndicatorSeparator, _extends$d({}, commonProps, {
|
|
22181
22245
|
isDisabled: isDisabled,
|
|
22182
22246
|
isFocused: isFocused
|
|
22183
22247
|
}));
|
|
@@ -22197,7 +22261,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22197
22261
|
onTouchEnd: this.onDropdownIndicatorTouchEnd,
|
|
22198
22262
|
'aria-hidden': 'true'
|
|
22199
22263
|
};
|
|
22200
|
-
return /*#__PURE__*/React__namespace.createElement(DropdownIndicator, _extends$
|
|
22264
|
+
return /*#__PURE__*/React__namespace.createElement(DropdownIndicator, _extends$d({}, commonProps, {
|
|
22201
22265
|
innerProps: innerProps,
|
|
22202
22266
|
isDisabled: isDisabled,
|
|
22203
22267
|
isFocused: isFocused
|
|
@@ -22260,7 +22324,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22260
22324
|
onMouseOver: onHover,
|
|
22261
22325
|
tabIndex: -1
|
|
22262
22326
|
};
|
|
22263
|
-
return /*#__PURE__*/React__namespace.createElement(Option, _extends$
|
|
22327
|
+
return /*#__PURE__*/React__namespace.createElement(Option, _extends$d({}, commonProps, {
|
|
22264
22328
|
innerProps: innerProps,
|
|
22265
22329
|
data: data,
|
|
22266
22330
|
isDisabled: isDisabled,
|
|
@@ -22284,7 +22348,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22284
22348
|
groupIndex = item.index;
|
|
22285
22349
|
var groupId = "".concat(_this4.getElementId('group'), "-").concat(groupIndex);
|
|
22286
22350
|
var headingId = "".concat(groupId, "-heading");
|
|
22287
|
-
return /*#__PURE__*/React__namespace.createElement(Group, _extends$
|
|
22351
|
+
return /*#__PURE__*/React__namespace.createElement(Group, _extends$d({}, commonProps, {
|
|
22288
22352
|
key: groupId,
|
|
22289
22353
|
data: _data,
|
|
22290
22354
|
options: options,
|
|
@@ -22323,12 +22387,12 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22323
22387
|
menuPosition: menuPosition,
|
|
22324
22388
|
menuShouldScrollIntoView: menuShouldScrollIntoView
|
|
22325
22389
|
};
|
|
22326
|
-
var menuElement = /*#__PURE__*/React__namespace.createElement(MenuPlacer, _extends$
|
|
22390
|
+
var menuElement = /*#__PURE__*/React__namespace.createElement(MenuPlacer, _extends$d({}, commonProps, menuPlacementProps), function (_ref4) {
|
|
22327
22391
|
var ref = _ref4.ref,
|
|
22328
22392
|
_ref4$placerProps = _ref4.placerProps,
|
|
22329
22393
|
placement = _ref4$placerProps.placement,
|
|
22330
22394
|
maxHeight = _ref4$placerProps.maxHeight;
|
|
22331
|
-
return /*#__PURE__*/React__namespace.createElement(Menu, _extends$
|
|
22395
|
+
return /*#__PURE__*/React__namespace.createElement(Menu, _extends$d({}, commonProps, menuPlacementProps, {
|
|
22332
22396
|
innerRef: ref,
|
|
22333
22397
|
innerProps: {
|
|
22334
22398
|
onMouseDown: _this4.onMenuMouseDown,
|
|
@@ -22343,7 +22407,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22343
22407
|
onBottomArrive: onMenuScrollToBottom,
|
|
22344
22408
|
lockEnabled: menuShouldBlockScroll
|
|
22345
22409
|
}, function (scrollTargetRef) {
|
|
22346
|
-
return /*#__PURE__*/React__namespace.createElement(MenuList, _extends$
|
|
22410
|
+
return /*#__PURE__*/React__namespace.createElement(MenuList, _extends$d({}, commonProps, {
|
|
22347
22411
|
innerRef: function innerRef(instance) {
|
|
22348
22412
|
_this4.getMenuListRef(instance);
|
|
22349
22413
|
|
|
@@ -22358,7 +22422,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22358
22422
|
// so we use the same component. the actual portalling logic is forked
|
|
22359
22423
|
// within the component based on `menuPosition`
|
|
22360
22424
|
|
|
22361
|
-
return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React__namespace.createElement(MenuPortal, _extends$
|
|
22425
|
+
return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React__namespace.createElement(MenuPortal, _extends$d({}, commonProps, {
|
|
22362
22426
|
appendTo: menuPortalTarget,
|
|
22363
22427
|
controlElement: this.controlRef,
|
|
22364
22428
|
menuPlacement: menuPlacement,
|
|
@@ -22423,7 +22487,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22423
22487
|
isFocused = _this$state6.isFocused,
|
|
22424
22488
|
selectValue = _this$state6.selectValue;
|
|
22425
22489
|
var focusableOptions = this.getFocusableOptions();
|
|
22426
|
-
return /*#__PURE__*/React__namespace.createElement(LiveRegion, _extends$
|
|
22490
|
+
return /*#__PURE__*/React__namespace.createElement(LiveRegion, _extends$d({}, commonProps, {
|
|
22427
22491
|
id: this.getElementId('live-region'),
|
|
22428
22492
|
ariaSelection: ariaSelection,
|
|
22429
22493
|
focusedOption: focusedOption,
|
|
@@ -22449,7 +22513,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22449
22513
|
menuIsOpen = _this$props14.menuIsOpen;
|
|
22450
22514
|
var isFocused = this.state.isFocused;
|
|
22451
22515
|
var commonProps = this.commonProps = this.getCommonProps();
|
|
22452
|
-
return /*#__PURE__*/React__namespace.createElement(SelectContainer, _extends$
|
|
22516
|
+
return /*#__PURE__*/React__namespace.createElement(SelectContainer, _extends$d({}, commonProps, {
|
|
22453
22517
|
className: className,
|
|
22454
22518
|
innerProps: {
|
|
22455
22519
|
id: id,
|
|
@@ -22457,7 +22521,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22457
22521
|
},
|
|
22458
22522
|
isDisabled: isDisabled,
|
|
22459
22523
|
isFocused: isFocused
|
|
22460
|
-
}), this.renderLiveRegion(), /*#__PURE__*/React__namespace.createElement(Control, _extends$
|
|
22524
|
+
}), this.renderLiveRegion(), /*#__PURE__*/React__namespace.createElement(Control, _extends$d({}, commonProps, {
|
|
22461
22525
|
innerRef: this.getControlRef,
|
|
22462
22526
|
innerProps: {
|
|
22463
22527
|
onMouseDown: this.onControlMouseDown,
|
|
@@ -22466,9 +22530,9 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
22466
22530
|
isDisabled: isDisabled,
|
|
22467
22531
|
isFocused: isFocused,
|
|
22468
22532
|
menuIsOpen: menuIsOpen
|
|
22469
|
-
}), /*#__PURE__*/React__namespace.createElement(ValueContainer, _extends$
|
|
22533
|
+
}), /*#__PURE__*/React__namespace.createElement(ValueContainer, _extends$d({}, commonProps, {
|
|
22470
22534
|
isDisabled: isDisabled
|
|
22471
|
-
}), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React__namespace.createElement(IndicatorsContainer, _extends$
|
|
22535
|
+
}), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React__namespace.createElement(IndicatorsContainer, _extends$d({}, commonProps, {
|
|
22472
22536
|
isDisabled: isDisabled
|
|
22473
22537
|
}), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
|
|
22474
22538
|
}
|
|
@@ -22541,22 +22605,22 @@ Select$1.defaultProps = defaultProps;
|
|
|
22541
22605
|
|
|
22542
22606
|
var StateManagedSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
22543
22607
|
var baseSelectProps = useStateManager(props);
|
|
22544
|
-
return /*#__PURE__*/React__namespace.createElement(Select$1, _extends$
|
|
22608
|
+
return /*#__PURE__*/React__namespace.createElement(Select$1, _extends$d({
|
|
22545
22609
|
ref: ref
|
|
22546
22610
|
}, baseSelectProps));
|
|
22547
22611
|
});
|
|
22548
22612
|
|
|
22549
22613
|
var ReactSelect = StateManagedSelect;
|
|
22550
22614
|
|
|
22551
|
-
var _g$
|
|
22552
|
-
function _extends$
|
|
22615
|
+
var _g$4;
|
|
22616
|
+
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); }
|
|
22553
22617
|
var SvgIcAppstatusCancelled = function SvgIcAppstatusCancelled(props) {
|
|
22554
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
22618
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
|
|
22555
22619
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22556
22620
|
viewBox: "0 0 28 28",
|
|
22557
22621
|
width: "1em",
|
|
22558
22622
|
height: "1em"
|
|
22559
|
-
}, props), _g$
|
|
22623
|
+
}, props), _g$4 || (_g$4 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
22560
22624
|
fill: "none",
|
|
22561
22625
|
fillRule: "evenodd",
|
|
22562
22626
|
transform: "translate(2 2)"
|
|
@@ -22573,9 +22637,9 @@ var SvgIcAppstatusCancelled = function SvgIcAppstatusCancelled(props) {
|
|
|
22573
22637
|
};
|
|
22574
22638
|
|
|
22575
22639
|
var _path$6;
|
|
22576
|
-
function _extends$
|
|
22640
|
+
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); }
|
|
22577
22641
|
var SvgIcCheck = function SvgIcCheck(props) {
|
|
22578
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
22642
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
|
|
22579
22643
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22580
22644
|
width: "1em",
|
|
22581
22645
|
height: "1em",
|
|
@@ -22591,15 +22655,15 @@ var SvgIcCheck = function SvgIcCheck(props) {
|
|
|
22591
22655
|
})));
|
|
22592
22656
|
};
|
|
22593
22657
|
|
|
22594
|
-
var _g$
|
|
22595
|
-
function _extends$
|
|
22658
|
+
var _g$3;
|
|
22659
|
+
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); }
|
|
22596
22660
|
var SvgIcErrorMedium = function SvgIcErrorMedium(props) {
|
|
22597
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
22661
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
|
|
22598
22662
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22599
22663
|
width: "1em",
|
|
22600
22664
|
height: "1em",
|
|
22601
22665
|
viewBox: "0 0 20 21"
|
|
22602
|
-
}, props), _g$
|
|
22666
|
+
}, props), _g$3 || (_g$3 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
22603
22667
|
fill: "none",
|
|
22604
22668
|
fillRule: "evenodd"
|
|
22605
22669
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -23068,15 +23132,15 @@ exports.ConsequenceAction = void 0;
|
|
|
23068
23132
|
ConsequenceAction["ALLOW_FOREVER"] = "ALLOW_FOREVER";
|
|
23069
23133
|
})(exports.ConsequenceAction || (exports.ConsequenceAction = {}));
|
|
23070
23134
|
|
|
23071
|
-
var _g$
|
|
23072
|
-
function _extends$
|
|
23135
|
+
var _g$2;
|
|
23136
|
+
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); }
|
|
23073
23137
|
var SvgIcInfoFilled = function SvgIcInfoFilled(props) {
|
|
23074
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
23138
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
|
|
23075
23139
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23076
23140
|
width: "1em",
|
|
23077
23141
|
height: "1em",
|
|
23078
23142
|
viewBox: "0 0 32 32"
|
|
23079
|
-
}, props), _g$
|
|
23143
|
+
}, props), _g$2 || (_g$2 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
23080
23144
|
fill: "none",
|
|
23081
23145
|
fillRule: "evenodd"
|
|
23082
23146
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -23151,9 +23215,9 @@ function DeleteComponent(_a) {
|
|
|
23151
23215
|
}
|
|
23152
23216
|
|
|
23153
23217
|
var _path$5;
|
|
23154
|
-
function _extends$
|
|
23218
|
+
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); }
|
|
23155
23219
|
var SvgIcPencil = function SvgIcPencil(props) {
|
|
23156
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
23220
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
|
|
23157
23221
|
width: "1em",
|
|
23158
23222
|
height: "1em",
|
|
23159
23223
|
viewBox: "0 0 20 20",
|
|
@@ -23169,9 +23233,9 @@ var SvgIcPencil = function SvgIcPencil(props) {
|
|
|
23169
23233
|
};
|
|
23170
23234
|
|
|
23171
23235
|
var _path$4, _path2, _path3;
|
|
23172
|
-
function _extends$
|
|
23236
|
+
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); }
|
|
23173
23237
|
var SvgIcArrowCounterClockwise = function SvgIcArrowCounterClockwise(props) {
|
|
23174
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
23238
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
|
|
23175
23239
|
width: "1em",
|
|
23176
23240
|
height: "1em",
|
|
23177
23241
|
viewBox: "0 0 12 12",
|
|
@@ -23196,9 +23260,9 @@ var SvgIcArrowCounterClockwise = function SvgIcArrowCounterClockwise(props) {
|
|
|
23196
23260
|
};
|
|
23197
23261
|
|
|
23198
23262
|
var _path$3;
|
|
23199
|
-
function _extends$
|
|
23263
|
+
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); }
|
|
23200
23264
|
var SvgIcMinus = function SvgIcMinus(props) {
|
|
23201
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
23265
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
|
|
23202
23266
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23203
23267
|
width: "1em",
|
|
23204
23268
|
height: "1em",
|
|
@@ -23211,28 +23275,6 @@ var SvgIcMinus = function SvgIcMinus(props) {
|
|
|
23211
23275
|
})));
|
|
23212
23276
|
};
|
|
23213
23277
|
|
|
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
|
-
|
|
23236
23278
|
var _g$1;
|
|
23237
23279
|
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); }
|
|
23238
23280
|
var SvgIcErrorExclamation = function SvgIcErrorExclamation(props) {
|
|
@@ -26623,46 +26665,6 @@ function DevtronProgressing(_a) {
|
|
|
26623
26665
|
return (jsxRuntime.jsx("div", __assign({ className: parentClasses ? parentClasses : '' }, { children: jsxRuntime.jsx(SvgIcRotateDevtron, { className: classes ? classes : '' }) })));
|
|
26624
26666
|
}
|
|
26625
26667
|
|
|
26626
|
-
function CustomInput(_a) {
|
|
26627
|
-
var name = _a.name, value = _a.value, error = _a.error, onChange = _a.onChange, _b = _a.onFocus, onFocus = _b === void 0 ? function (e) { } : _b, _c = _a.label, label = _c === void 0 ? '' : _c, _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 ? false : _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, handleOnBlur = _a.handleOnBlur, _t = _a.readOnly, readOnly = _t === void 0 ? false : _t, _u = _a.noTrim, noTrim = _u === void 0 ? false : _u;
|
|
26628
|
-
var renderLabelHelperText = function () {
|
|
26629
|
-
return (jsxRuntime.jsx("span", { children: jsxRuntime.jsx("a", __assign({ target: "_blank", href: link, className: "cursor fs-13 onlink ml-4" }, { 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
|
-
var onBlur = function (event) {
|
|
26641
|
-
var _a;
|
|
26642
|
-
//NOTE: This is to prevent the input from being trimmed when the user do not want to trim the input
|
|
26643
|
-
if (!noTrim) {
|
|
26644
|
-
event.stopPropagation();
|
|
26645
|
-
event.target.value = (_a = event.target.value) === null || _a === void 0 ? void 0 : _a.trim();
|
|
26646
|
-
onChange(event);
|
|
26647
|
-
}
|
|
26648
|
-
if (typeof handleOnBlur === 'function') {
|
|
26649
|
-
handleOnBlur(event);
|
|
26650
|
-
}
|
|
26651
|
-
};
|
|
26652
|
-
var renderFormError = function () {
|
|
26653
|
-
if ((error === null || error === void 0 ? void 0 : error.length) > 0) {
|
|
26654
|
-
if (typeof error === 'object') {
|
|
26655
|
-
return 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)); });
|
|
26656
|
-
}
|
|
26657
|
-
return (jsxRuntime.jsxs("div", __assign({ className: "form__error" }, { children: [jsxRuntime.jsx(SvgIcWarning, { className: "form__icon form__icon--error" }), error] })));
|
|
26658
|
-
}
|
|
26659
|
-
};
|
|
26660
|
-
return (jsxRuntime.jsxs("div", __assign({ className: "flex column left top" }, { children: [label && (jsxRuntime.jsxs("label", __assign({ className: "form__label ".concat(labelClassName), "data-testid": "label-".concat(dataTestid) }, { children: [jsxRuntime.jsx("span", __assign({ className: "".concat(isRequiredField ? 'dc__required-field' : '') }, { children: label })), showLink && renderLabelHelperText()] }))), jsxRuntime.jsx("input", { "data-testid": dataTestid, type: type, name: name, autoComplete: autoComplete, className: "form__input ".concat(rootClassName), onChange: function (e) {
|
|
26661
|
-
e.persist();
|
|
26662
|
-
onChange(e);
|
|
26663
|
-
}, onBlur: onBlur, onFocus: onFocus, placeholder: placeholder, value: value, disabled: disabled, tabIndex: tabIndex, autoFocus: autoFocus, readOnly: readOnly }), renderFormError(), helperText && (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 }))] })))] })));
|
|
26664
|
-
}
|
|
26665
|
-
|
|
26666
26668
|
exports.AppStatus = AppStatus;
|
|
26667
26669
|
exports.BreadCrumb = BreadCrumb;
|
|
26668
26670
|
exports.BreadcrumbStore = Store;
|
package/package.json
CHANGED
|
@@ -45,7 +45,7 @@ export const DeleteDialog: React.FC<DeleteDialogProps> & { Description?: React.F
|
|
|
45
45
|
type="button"
|
|
46
46
|
className="cta delete cta-cd-delete-modal ml-16"
|
|
47
47
|
onClick={handleDelete}
|
|
48
|
-
disabled={props.apiCallInProgress}
|
|
48
|
+
disabled={props.apiCallInProgress || props.disabled}
|
|
49
49
|
data-testid="dialog-delete"
|
|
50
50
|
>
|
|
51
51
|
{props.apiCallInProgress ? (
|
package/src/Common/Helper.tsx
CHANGED
|
@@ -3,6 +3,7 @@ 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'
|
|
6
7
|
import { ERROR_EMPTY_SCREEN, TOKEN_COOKIE_NAME } from './Constants'
|
|
7
8
|
import { ServerErrors } from './ServerError'
|
|
8
9
|
import { toastAccessDenied } from './ToastBody'
|
|
@@ -276,6 +277,64 @@ export function useForm(stateSchema, validationSchema = {}, callback) {
|
|
|
276
277
|
return { state, disable, handleOnChange, handleOnSubmit }
|
|
277
278
|
}
|
|
278
279
|
|
|
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
|
+
|
|
279
338
|
export function handleUTCTime(ts: string, isRelativeTime = false) {
|
|
280
339
|
let timestamp = ''
|
|
281
340
|
try {
|
package/src/Common/Types.ts
CHANGED
|
@@ -622,4 +622,35 @@ export interface CiPipeline {
|
|
|
622
622
|
}
|
|
623
623
|
isOffendingMandatoryPlugin?: boolean
|
|
624
624
|
pipelineType?: string
|
|
625
|
-
}
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
export enum PipelineType {
|
|
628
|
+
CI_PIPELINE = 'CI_PIPELINE',
|
|
629
|
+
CD_PIPELINE = 'CD_PIPELINE',
|
|
630
|
+
WEBHOOK = 'WEBHOOK',
|
|
631
|
+
LINKED_CD = 'LINKED_CD',
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
export enum WorkflowNodeType {
|
|
635
|
+
GIT = 'GIT',
|
|
636
|
+
CI = 'CI',
|
|
637
|
+
WEBHOOK = 'WEBHOOK',
|
|
638
|
+
PRE_CD = 'PRECD',
|
|
639
|
+
CD = 'CD',
|
|
640
|
+
POST_CD = 'POSTCD',
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
export enum AddCDPositions {
|
|
644
|
+
LEFT = 'left',
|
|
645
|
+
RIGHT = 'right',
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
export interface SelectedNode {
|
|
649
|
+
nodeType: WorkflowNodeType
|
|
650
|
+
id: string
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
export enum AddPipelineType {
|
|
654
|
+
SEQUENTIAL = 'SEQUENTIAL',
|
|
655
|
+
PARALLEL = 'PARALLEL',
|
|
656
|
+
}
|
package/src/Common/index.ts
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { CustomInputProps } from './Types';
|
|
3
|
-
export declare function CustomInput({ name, value, error, onChange, onFocus, label, type, disabled, labelClassName, placeholder, tabIndex, dataTestid, isRequiredField, autoFocus, rootClassName, autoComplete, showLink, linkText, link, helperText, handleOnBlur, readOnly, noTrim, }: CustomInputProps): JSX.Element;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface CustomInputProps {
|
|
3
|
-
name: string;
|
|
4
|
-
value: string | number;
|
|
5
|
-
onChange: (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?: string[] | string;
|
|
22
|
-
helperText?: string;
|
|
23
|
-
handleOnBlur?: (e: any) => void;
|
|
24
|
-
readOnly?: boolean;
|
|
25
|
-
noTrim?: boolean;
|
|
26
|
-
}
|
|
@@ -1,121 +0,0 @@
|
|
|
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
|
-
import { useCallback } from 'react'
|
|
5
|
-
|
|
6
|
-
export function CustomInput({
|
|
7
|
-
name,
|
|
8
|
-
value,
|
|
9
|
-
error,
|
|
10
|
-
onChange,
|
|
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 = false,
|
|
21
|
-
rootClassName = '',
|
|
22
|
-
autoComplete = 'off',
|
|
23
|
-
showLink = false,
|
|
24
|
-
linkText = '',
|
|
25
|
-
link = '',
|
|
26
|
-
helperText = '',
|
|
27
|
-
handleOnBlur,
|
|
28
|
-
readOnly = false,
|
|
29
|
-
noTrim = false,
|
|
30
|
-
}: CustomInputProps) {
|
|
31
|
-
const renderLabelHelperText = () => {
|
|
32
|
-
return (
|
|
33
|
-
<span>
|
|
34
|
-
<a target="_blank" href={link} className="cursor fs-13 onlink ml-4">
|
|
35
|
-
{linkText}
|
|
36
|
-
</a>
|
|
37
|
-
</span>
|
|
38
|
-
)
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function handleError(error: any): any[] {
|
|
42
|
-
if (!error) {
|
|
43
|
-
return []
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (!Array.isArray(error)) {
|
|
47
|
-
return [error]
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return error
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const onBlur = (event) => {
|
|
54
|
-
//NOTE: This is to prevent the input from being trimmed when the user do not want to trim the input
|
|
55
|
-
if (!noTrim) {
|
|
56
|
-
event.stopPropagation()
|
|
57
|
-
event.target.value = event.target.value?.trim()
|
|
58
|
-
onChange(event)
|
|
59
|
-
}
|
|
60
|
-
if (typeof handleOnBlur === 'function') {
|
|
61
|
-
handleOnBlur(event)
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const renderFormError = () => {
|
|
66
|
-
if (error?.length > 0) {
|
|
67
|
-
if (typeof error === 'object') {
|
|
68
|
-
return handleError(error).map((err: string) => (
|
|
69
|
-
<div className="form__error" key={err}>
|
|
70
|
-
<FormError className="form__icon form__icon--error" />
|
|
71
|
-
{err}
|
|
72
|
-
</div>
|
|
73
|
-
))
|
|
74
|
-
}
|
|
75
|
-
return (
|
|
76
|
-
<div className="form__error">
|
|
77
|
-
<FormError className="form__icon form__icon--error" />
|
|
78
|
-
{error}
|
|
79
|
-
</div>
|
|
80
|
-
)
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
return (
|
|
85
|
-
<div className="flex column left top">
|
|
86
|
-
{label && (
|
|
87
|
-
<label className={`form__label ${labelClassName}`} data-testid={`label-${dataTestid}`}>
|
|
88
|
-
<span className={`${isRequiredField ? 'dc__required-field' : ''}`}>{label}</span>
|
|
89
|
-
{showLink && renderLabelHelperText()}
|
|
90
|
-
</label>
|
|
91
|
-
)}
|
|
92
|
-
<input
|
|
93
|
-
data-testid={dataTestid}
|
|
94
|
-
type={type}
|
|
95
|
-
name={name}
|
|
96
|
-
autoComplete={autoComplete}
|
|
97
|
-
className={`form__input ${rootClassName}`}
|
|
98
|
-
onChange={(e) => {
|
|
99
|
-
e.persist()
|
|
100
|
-
onChange(e)
|
|
101
|
-
}}
|
|
102
|
-
onBlur={onBlur}
|
|
103
|
-
onFocus={onFocus}
|
|
104
|
-
placeholder={placeholder}
|
|
105
|
-
value={value}
|
|
106
|
-
disabled={disabled}
|
|
107
|
-
tabIndex={tabIndex}
|
|
108
|
-
autoFocus={autoFocus}
|
|
109
|
-
readOnly={readOnly}
|
|
110
|
-
/>
|
|
111
|
-
|
|
112
|
-
{renderFormError()}
|
|
113
|
-
{helperText && (
|
|
114
|
-
<div className="form__text-field-info">
|
|
115
|
-
<Info className="form__icon form__icon--info" />
|
|
116
|
-
<p className="sentence-case">{helperText}</p>
|
|
117
|
-
</div>
|
|
118
|
-
)}
|
|
119
|
-
</div>
|
|
120
|
-
)
|
|
121
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export interface CustomInputProps {
|
|
2
|
-
name: string
|
|
3
|
-
value: string | number
|
|
4
|
-
onChange: (e: any) => void
|
|
5
|
-
onFocus?: (e: any) => void
|
|
6
|
-
autoComplete?: string
|
|
7
|
-
label?: React.ReactNode
|
|
8
|
-
labelClassName?: string
|
|
9
|
-
type?: 'text' | 'number'
|
|
10
|
-
disabled?: boolean
|
|
11
|
-
placeholder?: string
|
|
12
|
-
tabIndex?: number
|
|
13
|
-
dataTestid?: string
|
|
14
|
-
isRequiredField?: boolean
|
|
15
|
-
autoFocus?: boolean
|
|
16
|
-
rootClassName?: string
|
|
17
|
-
showLink?: boolean
|
|
18
|
-
link?: string
|
|
19
|
-
linkText?: string
|
|
20
|
-
error?: string[] | string
|
|
21
|
-
helperText?: string;
|
|
22
|
-
handleOnBlur?: (e) => void
|
|
23
|
-
readOnly?: boolean
|
|
24
|
-
noTrim?: boolean
|
|
25
|
-
}
|