@devtron-labs/devtron-fe-common-lib 0.0.7-beta-51 → 0.0.9
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/Constants.d.ts +0 -5
- package/dist/Common/DeleteComponentModal/DeleteComponent.d.ts +4 -0
- package/dist/Common/DeleteComponentModal/types.d.ts +15 -0
- package/dist/Common/Dialogs/Types.d.ts +0 -1
- package/dist/Common/Helper.d.ts +22 -0
- package/dist/Common/Types.d.ts +3 -28
- package/dist/Common/index.d.ts +1 -1
- package/dist/index.js +213 -102
- package/package.json +1 -1
- package/src/Assets/Icon/ic-info-filled.svg +7 -0
- package/src/Assets/Icon/ic-warning.svg +7 -0
- package/src/Common/Constants.ts +0 -6
- package/src/Common/DeleteComponentModal/DeleteComponent.tsx +95 -0
- package/src/Common/DeleteComponentModal/types.ts +15 -0
- package/src/Common/Dialogs/DeleteDialog.tsx +27 -45
- package/src/Common/Dialogs/Types.ts +0 -1
- package/src/Common/EmptyState/GenericEmptyState.tsx +1 -1
- package/src/Common/Helper.tsx +199 -36
- package/src/Common/TippyCustomized.tsx +2 -28
- package/src/Common/Types.ts +3 -30
- package/src/Common/index.ts +1 -1
- package/dist/Common/CIPipeline.Types.d.ts +0 -263
- package/src/Assets/Icon/ic-help.svg +0 -3
- package/src/Common/CIPipeline.Types.ts +0 -275
- /package/src/Assets/Img/{delete-medium.svg → warning-medium.svg} +0 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DeleteComponentProps } from './types';
|
|
3
|
+
declare function DeleteComponent({ setDeleting, toggleConfirmation, deleteComponent, title, component, payload, confirmationDialogDescription, redirectTo, url, reload, configuration, closeCustomComponent, }: DeleteComponentProps): JSX.Element;
|
|
4
|
+
export default DeleteComponent;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface DeleteComponentProps {
|
|
2
|
+
setDeleting: (boolean: any) => void;
|
|
3
|
+
toggleConfirmation: any;
|
|
4
|
+
deleteComponent: (any: any) => Promise<any>;
|
|
5
|
+
title: string;
|
|
6
|
+
component: string;
|
|
7
|
+
payload: any;
|
|
8
|
+
confirmationDialogDescription?: string;
|
|
9
|
+
redirectTo?: boolean;
|
|
10
|
+
url?: string;
|
|
11
|
+
reload?: () => void;
|
|
12
|
+
configuration?: string;
|
|
13
|
+
dataTestid?: string;
|
|
14
|
+
closeCustomComponent?: () => void;
|
|
15
|
+
}
|
package/dist/Common/Helper.d.ts
CHANGED
|
@@ -17,4 +17,26 @@ export declare function not(e: any): boolean;
|
|
|
17
17
|
export declare function useEffectAfterMount(cb: any, dependencies: any): void;
|
|
18
18
|
export declare function getCookie(sKey: any): string;
|
|
19
19
|
export declare function getLoginInfo(): any;
|
|
20
|
+
export declare function useForm(stateSchema: any, validationSchema: {}, callback: any): {
|
|
21
|
+
state: any;
|
|
22
|
+
disable: boolean;
|
|
23
|
+
handleOnChange: (event: any) => void;
|
|
24
|
+
handleOnSubmit: (event: any) => void;
|
|
25
|
+
};
|
|
26
|
+
export declare function CustomInput({ name, value, error, onChange, onBlur, onFocus, label, type, disabled, autoComplete, labelClassName, placeholder, tabIndex, dataTestid, }: {
|
|
27
|
+
name: any;
|
|
28
|
+
value: any;
|
|
29
|
+
error: any;
|
|
30
|
+
onChange: any;
|
|
31
|
+
onBlur?: (e: any) => void;
|
|
32
|
+
onFocus?: (e: any) => void;
|
|
33
|
+
label: any;
|
|
34
|
+
type?: string;
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
autoComplete?: string;
|
|
37
|
+
labelClassName?: string;
|
|
38
|
+
placeholder?: string;
|
|
39
|
+
tabIndex?: number;
|
|
40
|
+
dataTestid?: string;
|
|
41
|
+
}): JSX.Element;
|
|
20
42
|
export {};
|
package/dist/Common/Types.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ReactNode, CSSProperties } from 'react';
|
|
2
2
|
import { Placement } from 'tippy.js';
|
|
3
|
-
import { VariableType } from './CIPipeline.Types';
|
|
4
3
|
export interface ResponseType {
|
|
5
4
|
code: number;
|
|
6
5
|
status: string;
|
|
@@ -46,8 +45,7 @@ export interface CheckboxProps {
|
|
|
46
45
|
export interface TippyCustomizedProps {
|
|
47
46
|
theme: TippyTheme;
|
|
48
47
|
visible?: boolean;
|
|
49
|
-
heading?: string;
|
|
50
|
-
headingInfo?: string;
|
|
48
|
+
heading?: ReactNode | string;
|
|
51
49
|
infoTextHeading?: string;
|
|
52
50
|
placement: Placement;
|
|
53
51
|
className?: string;
|
|
@@ -236,7 +234,8 @@ export interface CommonNodeAttr {
|
|
|
236
234
|
approvalUsers?: string[];
|
|
237
235
|
userApprovalConfig?: UserApprovalConfigType;
|
|
238
236
|
requestedUserId?: number;
|
|
239
|
-
|
|
237
|
+
helmPackageName?: string;
|
|
238
|
+
isVirtualEnvironment?: boolean;
|
|
240
239
|
}
|
|
241
240
|
export interface VulnerabilityType {
|
|
242
241
|
name: string;
|
|
@@ -291,28 +290,4 @@ export interface CDMaterialResponseType {
|
|
|
291
290
|
userApprovalConfig: UserApprovalConfigType;
|
|
292
291
|
requestedUserId: number;
|
|
293
292
|
}
|
|
294
|
-
export declare enum PluginRequiredStageKeys {
|
|
295
|
-
PRE_CI = "PRE_CI",
|
|
296
|
-
POST_CI = "POST_CI",
|
|
297
|
-
PRE_OR_POST_CI = "PRE_OR_POST_CI"
|
|
298
|
-
}
|
|
299
|
-
export declare enum PluginRequiredStage {
|
|
300
|
-
PRE_CI = "preBuildStage",
|
|
301
|
-
POST_CI = "postBuildStage",
|
|
302
|
-
PRE_OR_POST_CI = "PRE_OR_POST_CI"
|
|
303
|
-
}
|
|
304
|
-
export interface MandatoryPluginDetailType {
|
|
305
|
-
id: number;
|
|
306
|
-
name: string;
|
|
307
|
-
description?: string;
|
|
308
|
-
requiredIn: PluginRequiredStage;
|
|
309
|
-
applied?: boolean;
|
|
310
|
-
inputVariables?: VariableType[];
|
|
311
|
-
outputVariables?: VariableType[];
|
|
312
|
-
}
|
|
313
|
-
export interface MandatoryPluginDataType {
|
|
314
|
-
pluginData: MandatoryPluginDetailType[];
|
|
315
|
-
isValidPre: boolean;
|
|
316
|
-
isValidPost: boolean;
|
|
317
|
-
}
|
|
318
293
|
export {};
|
package/dist/Common/index.d.ts
CHANGED
|
@@ -29,4 +29,4 @@ export { default as GenericEmptyState } from './EmptyState/GenericEmptyState';
|
|
|
29
29
|
export { default as Toggle } from './Toggle/Toggle';
|
|
30
30
|
export { default as ScanVulnerabilitiesTable } from './Security/ScanVulnerabilitiesTable';
|
|
31
31
|
export { default as StyledRadioGroup } from './RadioGroup/RadioGroup';
|
|
32
|
-
export
|
|
32
|
+
export { default as DeleteComponent } from './DeleteComponentModal/DeleteComponent';
|
package/dist/index.js
CHANGED
|
@@ -6,20 +6,20 @@ var ReactDOM = require('react-dom');
|
|
|
6
6
|
var reactRouterDom = require('react-router-dom');
|
|
7
7
|
|
|
8
8
|
function _interopNamespaceDefault(e) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
Object.keys(e).forEach(function (k) {
|
|
12
|
+
if (k !== 'default') {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return e[k]; }
|
|
17
|
+
});
|
|
18
|
+
}
|
|
17
19
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
n.default = e;
|
|
22
|
-
return Object.freeze(n);
|
|
20
|
+
}
|
|
21
|
+
n.default = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
@@ -75,11 +75,6 @@ var TOKEN_COOKIE_NAME = 'argocd.token';
|
|
|
75
75
|
var TriggerTypeMap = {
|
|
76
76
|
automatic: 'Auto',
|
|
77
77
|
manual: 'Manual',
|
|
78
|
-
};
|
|
79
|
-
var BuildStageVariable = {
|
|
80
|
-
PreBuild: 'preBuildStage',
|
|
81
|
-
Build: 'buildStage',
|
|
82
|
-
PostBuild: 'postBuildStage',
|
|
83
78
|
};
|
|
84
79
|
|
|
85
80
|
/******************************************************************************
|
|
@@ -253,19 +248,7 @@ exports.DeploymentNodeType = void 0;
|
|
|
253
248
|
DeploymentNodeType["CD"] = "CD";
|
|
254
249
|
DeploymentNodeType["POSTCD"] = "POSTCD";
|
|
255
250
|
DeploymentNodeType["APPROVAL"] = "APPROVAL";
|
|
256
|
-
})(exports.DeploymentNodeType || (exports.DeploymentNodeType = {}));
|
|
257
|
-
exports.PluginRequiredStageKeys = void 0;
|
|
258
|
-
(function (PluginRequiredStageKeys) {
|
|
259
|
-
PluginRequiredStageKeys["PRE_CI"] = "PRE_CI";
|
|
260
|
-
PluginRequiredStageKeys["POST_CI"] = "POST_CI";
|
|
261
|
-
PluginRequiredStageKeys["PRE_OR_POST_CI"] = "PRE_OR_POST_CI";
|
|
262
|
-
})(exports.PluginRequiredStageKeys || (exports.PluginRequiredStageKeys = {}));
|
|
263
|
-
exports.PluginRequiredStage = void 0;
|
|
264
|
-
(function (PluginRequiredStage) {
|
|
265
|
-
PluginRequiredStage["PRE_CI"] = "preBuildStage";
|
|
266
|
-
PluginRequiredStage["POST_CI"] = "postBuildStage";
|
|
267
|
-
PluginRequiredStage["PRE_OR_POST_CI"] = "PRE_OR_POST_CI";
|
|
268
|
-
})(exports.PluginRequiredStage || (exports.PluginRequiredStage = {}));
|
|
251
|
+
})(exports.DeploymentNodeType || (exports.DeploymentNodeType = {}));
|
|
269
252
|
|
|
270
253
|
var responseMessages = {
|
|
271
254
|
100: 'Continue',
|
|
@@ -520,7 +503,7 @@ function styleInject(css, ref) {
|
|
|
520
503
|
var css_248z$6 = ".empty-state {\n height: 100%;\n}\n.empty-state img {\n height: 40%;\n max-height: 200px;\n width: auto;\n max-width: 250px;\n}\n.empty-state svg {\n height: 40%;\n max-height: 200px;\n width: auto;\n}\n.empty-state h1,\n.empty-state h2,\n.empty-state h3,\n.empty-state h4,\n.empty-state h5,\n.empty-state h6 {\n color: var(--N900);\n}\n.empty-state .subtitle {\n font-size: 13px;\n width: 300px;\n font-weight: 400;\n text-align: center;\n line-height: 1.5;\n margin-bottom: 20px;\n}\n.empty-state .cta {\n height: 36px;\n}\n.empty-state p {\n width: 300px;\n text-align: center;\n font-size: 13px;\n color: var(--N700);\n}\n.empty-state strong {\n font-size: 16px;\n margin-bottom: 4px;\n color: var(--N900);\n font-weight: normal;\n}\n.empty-state .select-popup {\n height: min-content;\n max-height: 250px;\n overflow: auto;\n padding: 8px 0;\n}\n.empty-state .empty-state__loader {\n width: 34px;\n height: 34px;\n margin-bottom: 16px;\n}\n.empty-state .empty-state__loading-text {\n font-size: 12px;\n width: 200px;\n font-weight: normal;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.5;\n letter-spacing: normal;\n text-align: center;\n color: var(--N900);\n}\n.empty-state .button__icon {\n width: 16px;\n height: 16px;\n margin-left: 8px;\n}";
|
|
521
504
|
styleInject(css_248z$6);
|
|
522
505
|
|
|
523
|
-
var _g$
|
|
506
|
+
var _g$3;
|
|
524
507
|
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); }
|
|
525
508
|
var SvgIcProgressing = function SvgIcProgressing(props) {
|
|
526
509
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
|
|
@@ -528,7 +511,7 @@ var SvgIcProgressing = function SvgIcProgressing(props) {
|
|
|
528
511
|
viewBox: "0 0 24 24",
|
|
529
512
|
width: "1em",
|
|
530
513
|
height: "1em"
|
|
531
|
-
}, props), _g$
|
|
514
|
+
}, props), _g$3 || (_g$3 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
532
515
|
fill: "none"
|
|
533
516
|
}, /*#__PURE__*/React__namespace.createElement("animateTransform", {
|
|
534
517
|
attributeName: "transform",
|
|
@@ -2002,7 +1985,7 @@ var AppNotDeployed = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAAGQCAYA
|
|
|
2002
1985
|
|
|
2003
1986
|
function GenericEmptyState(_a) {
|
|
2004
1987
|
var title = _a.title, image = _a.image, subTitle = _a.subTitle, isButtonAvailable = _a.isButtonAvailable, classname = _a.classname, styles = _a.styles, heightToDeduct = _a.heightToDeduct, imageType = _a.imageType, renderButton = _a.renderButton, imageClassName = _a.imageClassName, children = _a.children, noImage = _a.noImage;
|
|
2005
|
-
return (jsxRuntime.jsxs("div", __assign({ className: "flex column empty-state dc__align-reload-center ".concat(classname ? classname : ''), style: styles, "data-testid": "generic-empty-state" }, (heightToDeduct >= 0 && { style: __assign(__assign({}, styles), { height: "calc(100vh - ".concat(heightToDeduct, "px)") }) }), { children: [!noImage && jsxRuntime.jsx("img", { className: imageClassName ? imageClassName : '', src: image || AppNotDeployed, width: imageType === exports.ImageType.Medium ? '200' : '250', height: imageType === exports.ImageType.Medium ? '160' : '200', alt: "empty-state" }), jsxRuntime.jsx("h4", __assign({ className: "title fw-6 cn-9 mb-8" }, { children: title })), subTitle && jsxRuntime.jsx("p", __assign({ className: "subtitle" }, { children: subTitle })), isButtonAvailable && renderButton(), children] })));
|
|
1988
|
+
return (jsxRuntime.jsxs("div", __assign({ className: "flex column empty-state dc__align-reload-center ".concat(classname ? classname : ''), style: styles, "data-testid": "generic-empty-state" }, (heightToDeduct >= 0 && { style: __assign(__assign({}, styles), { height: "calc(100vh - ".concat(heightToDeduct, "px)") }) }), { children: [!noImage && jsxRuntime.jsx("img", { className: imageClassName ? imageClassName : '', src: image || AppNotDeployed, width: imageType === exports.ImageType.Medium ? '200' : '250', height: imageType === exports.ImageType.Medium ? '160' : '200', alt: "empty-state" }), jsxRuntime.jsx("h4", __assign({ className: "title fw-6 cn-9 mb-8 mt-20" }, { children: title })), subTitle && jsxRuntime.jsx("p", __assign({ className: "subtitle" }, { children: subTitle })), isButtonAvailable && renderButton(), children] })));
|
|
2006
1989
|
}
|
|
2007
1990
|
|
|
2008
1991
|
function ErrorScreenNotFound() {
|
|
@@ -3944,6 +3927,28 @@ function captureException(exception, captureContext) {
|
|
|
3944
3927
|
return getCurrentHub().captureException(exception, { captureContext });
|
|
3945
3928
|
}
|
|
3946
3929
|
|
|
3930
|
+
var _g$2;
|
|
3931
|
+
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); }
|
|
3932
|
+
var SvgIcWarning = function SvgIcWarning(props) {
|
|
3933
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
|
|
3934
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3935
|
+
width: "1em",
|
|
3936
|
+
height: "1em",
|
|
3937
|
+
viewBox: "0 0 32 32"
|
|
3938
|
+
}, props), _g$2 || (_g$2 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
3939
|
+
fill: "none",
|
|
3940
|
+
fillRule: "evenodd"
|
|
3941
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
3942
|
+
d: "M0 0h32v32H0z"
|
|
3943
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
3944
|
+
fill: "#FFCB5D",
|
|
3945
|
+
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"
|
|
3946
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
3947
|
+
fill: "#FFF",
|
|
3948
|
+
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"
|
|
3949
|
+
}))));
|
|
3950
|
+
};
|
|
3951
|
+
|
|
3947
3952
|
toast.configure({
|
|
3948
3953
|
autoClose: 3000,
|
|
3949
3954
|
hideProgressBar: true,
|
|
@@ -4082,6 +4087,110 @@ function getLoginInfo() {
|
|
|
4082
4087
|
return null;
|
|
4083
4088
|
}
|
|
4084
4089
|
}
|
|
4090
|
+
}
|
|
4091
|
+
function useForm(stateSchema, validationSchema, callback) {
|
|
4092
|
+
if (validationSchema === void 0) { validationSchema = {}; }
|
|
4093
|
+
var _a = __read(React.useState(stateSchema), 2), state = _a[0], setState = _a[1];
|
|
4094
|
+
var _b = __read(React.useState(true), 2), disable = _b[0], setDisable = _b[1];
|
|
4095
|
+
var _c = __read(React.useState(false), 2), isDirty = _c[0], setIsDirty = _c[1];
|
|
4096
|
+
// Disable button in initial render.
|
|
4097
|
+
React.useEffect(function () {
|
|
4098
|
+
setDisable(true);
|
|
4099
|
+
}, []);
|
|
4100
|
+
// For every changed in our state this will be fired
|
|
4101
|
+
// To be able to disable the button
|
|
4102
|
+
React.useEffect(function () {
|
|
4103
|
+
if (isDirty) {
|
|
4104
|
+
setDisable(validateState(state));
|
|
4105
|
+
}
|
|
4106
|
+
}, [state, isDirty]);
|
|
4107
|
+
// Used to disable submit button if there's an error in state
|
|
4108
|
+
// or the required field in state has no value.
|
|
4109
|
+
// Wrapped in useCallback to cached the function to avoid intensive memory leaked
|
|
4110
|
+
// in every re-render in component
|
|
4111
|
+
var validateState = React.useCallback(function (state) {
|
|
4112
|
+
//check errors in all fields
|
|
4113
|
+
var hasErrorInState = Object.keys(validationSchema).some(function (key) {
|
|
4114
|
+
var isInputFieldRequired = validationSchema[key].required;
|
|
4115
|
+
var stateValue = state[key].value; // state value
|
|
4116
|
+
var stateError = state[key].error; // state error
|
|
4117
|
+
return (isInputFieldRequired && !stateValue) || stateError;
|
|
4118
|
+
});
|
|
4119
|
+
return hasErrorInState;
|
|
4120
|
+
}, [state, validationSchema]);
|
|
4121
|
+
function validateField(name, value) {
|
|
4122
|
+
if (validationSchema[name].required) {
|
|
4123
|
+
if (!value) {
|
|
4124
|
+
return 'This is a required field.';
|
|
4125
|
+
}
|
|
4126
|
+
}
|
|
4127
|
+
function _validateSingleValidator(validator, value) {
|
|
4128
|
+
if (value && !validator.regex.test(value)) {
|
|
4129
|
+
return false;
|
|
4130
|
+
}
|
|
4131
|
+
return true;
|
|
4132
|
+
}
|
|
4133
|
+
// single validator
|
|
4134
|
+
var _validator = validationSchema[name].validator;
|
|
4135
|
+
if (_validator && typeof _validator === 'object') {
|
|
4136
|
+
if (!_validateSingleValidator(_validator, value)) {
|
|
4137
|
+
return _validator.error;
|
|
4138
|
+
}
|
|
4139
|
+
}
|
|
4140
|
+
// multiple validators
|
|
4141
|
+
var _validators = validationSchema[name].validators;
|
|
4142
|
+
if (_validators && typeof _validators === 'object' && Array.isArray(_validators)) {
|
|
4143
|
+
var errors_1 = [];
|
|
4144
|
+
_validators.forEach(function (_validator) {
|
|
4145
|
+
if (!_validateSingleValidator(_validator, value)) {
|
|
4146
|
+
errors_1.push(_validator.error);
|
|
4147
|
+
}
|
|
4148
|
+
});
|
|
4149
|
+
if (errors_1.length > 0) {
|
|
4150
|
+
return errors_1;
|
|
4151
|
+
}
|
|
4152
|
+
}
|
|
4153
|
+
return '';
|
|
4154
|
+
}
|
|
4155
|
+
var handleOnChange = React.useCallback(function (event) {
|
|
4156
|
+
setIsDirty(true);
|
|
4157
|
+
var _a = event.target, name = _a.name, value = _a.value;
|
|
4158
|
+
var error = validateField(name, value);
|
|
4159
|
+
setState(function (prevState) {
|
|
4160
|
+
var _a;
|
|
4161
|
+
return (__assign(__assign({}, prevState), (_a = {}, _a[name] = { value: value, error: error }, _a)));
|
|
4162
|
+
});
|
|
4163
|
+
}, [validationSchema]);
|
|
4164
|
+
var handleOnSubmit = function (event) {
|
|
4165
|
+
event.preventDefault();
|
|
4166
|
+
var newState = Object.keys(validationSchema).reduce(function (agg, curr) {
|
|
4167
|
+
agg[curr] = __assign(__assign({}, state[curr]), { error: validateField(curr, state[curr].value) });
|
|
4168
|
+
return agg;
|
|
4169
|
+
}, state);
|
|
4170
|
+
if (!validateState(newState)) {
|
|
4171
|
+
callback(state);
|
|
4172
|
+
}
|
|
4173
|
+
else {
|
|
4174
|
+
setState(__assign({}, newState));
|
|
4175
|
+
}
|
|
4176
|
+
};
|
|
4177
|
+
return { state: state, disable: disable, handleOnChange: handleOnChange, handleOnSubmit: handleOnSubmit };
|
|
4178
|
+
}
|
|
4179
|
+
function handleError(error) {
|
|
4180
|
+
if (!error) {
|
|
4181
|
+
return [];
|
|
4182
|
+
}
|
|
4183
|
+
if (!Array.isArray(error)) {
|
|
4184
|
+
return [error];
|
|
4185
|
+
}
|
|
4186
|
+
return error;
|
|
4187
|
+
}
|
|
4188
|
+
function CustomInput(_a) {
|
|
4189
|
+
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;
|
|
4190
|
+
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) {
|
|
4191
|
+
e.persist();
|
|
4192
|
+
onChange(e);
|
|
4193
|
+
}, 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] }))); })] })));
|
|
4085
4194
|
}
|
|
4086
4195
|
|
|
4087
4196
|
function Progressing(_a) {
|
|
@@ -4209,16 +4318,16 @@ var Modal = function (_a) {
|
|
|
4209
4318
|
}, id: "popup", className: "".concat(rootClassName, " popup ").concat(modal ? 'modal' : ''), style: __assign({}, style) }, { children: children })), document.getElementById('visible-modal'));
|
|
4210
4319
|
};
|
|
4211
4320
|
|
|
4212
|
-
var _path$
|
|
4213
|
-
function _extends$
|
|
4321
|
+
var _path$5;
|
|
4322
|
+
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); }
|
|
4214
4323
|
var SvgIcCross = function SvgIcCross(props) {
|
|
4215
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
4324
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
|
|
4216
4325
|
width: "1em",
|
|
4217
4326
|
height: "1em",
|
|
4218
4327
|
viewBox: "0 0 24 24",
|
|
4219
4328
|
fill: "none",
|
|
4220
4329
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4221
|
-
}, props), _path$
|
|
4330
|
+
}, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
4222
4331
|
d: "M19.28 5.78a.75.75 0 0 0-1.06-1.06l1.06 1.06ZM4.72 18.22a.75.75 0 1 0 1.06 1.06l-1.06-1.06Zm13.5 1.06a.75.75 0 1 0 1.06-1.06l-1.06 1.06ZM5.78 4.72a.75.75 0 0 0-1.06 1.06l1.06-1.06Zm12.44 0-6.75 6.75 1.06 1.06 6.75-6.75-1.06-1.06Zm-6.75 6.75-6.75 6.75 1.06 1.06 6.75-6.75-1.06-1.06Zm7.81 6.75-6.75-6.75-1.06 1.06 6.75 6.75 1.06-1.06Zm-6.75-6.75L5.78 4.72 4.72 5.78l6.75 6.75 1.06-1.06Z",
|
|
4223
4332
|
fill: "#596168"
|
|
4224
4333
|
})));
|
|
@@ -8517,21 +8626,6 @@ var index = /*#__PURE__*/forwardRef( /*#__PURE__*/TippyGenerator(tippy));
|
|
|
8517
8626
|
|
|
8518
8627
|
var Tippy = index;
|
|
8519
8628
|
|
|
8520
|
-
var _path$5;
|
|
8521
|
-
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); }
|
|
8522
|
-
var SvgIcHelp = function SvgIcHelp(props) {
|
|
8523
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
|
|
8524
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
8525
|
-
width: "1em",
|
|
8526
|
-
height: "1em",
|
|
8527
|
-
viewBox: "0 0 24 24"
|
|
8528
|
-
}, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
8529
|
-
fill: "#767D84",
|
|
8530
|
-
fillRule: "evenodd",
|
|
8531
|
-
d: "M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm-.205 12.868c-.615 0-1.12.505-1.12 1.12 0 .617.505 1.121 1.12 1.121.615 0 1.12-.504 1.12-1.12 0-.616-.506-1.12-1.12-1.12zM11.863 7c-1.667 0-3.197 1.187-3.196 2.527 0 .546.41.833.888.833 1.325 0 .642-1.803 2.39-1.803.82 0 1.311.438 1.311 1.175 0 1.34-2.39 1.708-2.39 3.334 0 .438.287.915.874.915.902 0 .792-.67 1.12-1.148.438-.642 2.473-1.325 2.473-3.101 0-1.927-1.721-2.732-3.47-2.732z"
|
|
8532
|
-
})));
|
|
8533
|
-
};
|
|
8534
|
-
|
|
8535
8629
|
var css_248z$4 = ".tippy-box[data-animation=shift-toward-subtle][data-state=hidden]{opacity:0}.tippy-box[data-animation=shift-toward-subtle][data-state=hidden][data-placement^=top][data-state=hidden]{transform:translateY(-5px)}.tippy-box[data-animation=shift-toward-subtle][data-state=hidden][data-placement^=bottom][data-state=hidden]{transform:translateY(5px)}.tippy-box[data-animation=shift-toward-subtle][data-state=hidden][data-placement^=left][data-state=hidden]{transform:translateX(-5px)}.tippy-box[data-animation=shift-toward-subtle][data-state=hidden][data-placement^=right][data-state=hidden]{transform:translateX(5px)}";
|
|
8536
8630
|
styleInject(css_248z$4);
|
|
8537
8631
|
|
|
@@ -8539,7 +8633,6 @@ styleInject(css_248z$4);
|
|
|
8539
8633
|
// So this can be updated to support further for new features or interactions
|
|
8540
8634
|
function TippyCustomized(props) {
|
|
8541
8635
|
var tippyRef = React.useRef(null);
|
|
8542
|
-
var _a = __read(React.useState(false), 2), showHeadingInfo = _a[0], setShowHeadingInfo = _a[1];
|
|
8543
8636
|
var isWhiteTheme = props.theme === exports.TippyTheme.white;
|
|
8544
8637
|
var onTippyMount = function (tippyInstance) {
|
|
8545
8638
|
tippyRef.current = tippyInstance;
|
|
@@ -8554,19 +8647,15 @@ function TippyCustomized(props) {
|
|
|
8554
8647
|
props.onClose();
|
|
8555
8648
|
}
|
|
8556
8649
|
}
|
|
8557
|
-
setShowHeadingInfo(false);
|
|
8558
8650
|
};
|
|
8559
8651
|
var closeOnEsc = function (e) {
|
|
8560
8652
|
if (e.keyCode === 27) {
|
|
8561
8653
|
closeTippy();
|
|
8562
8654
|
}
|
|
8563
8655
|
};
|
|
8564
|
-
var toggleHeadingInfo = function (e) {
|
|
8565
|
-
setShowHeadingInfo(not);
|
|
8566
|
-
};
|
|
8567
8656
|
var getTippyContent = function () {
|
|
8568
|
-
var Icon = props.Icon, iconPath = props.iconPath, iconClass = props.iconClass, iconSize = props.iconSize, onImageLoadError = props.onImageLoadError, heading = props.heading,
|
|
8569
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", __assign({ className: "dc__word-break dc__hyphens-auto flex left ".concat(isWhiteTheme ? 'p-12 dc__border-bottom-n1 cn-9' : 'pt-20 pb-12 pr-20 pl-20 cn-0 top') }, { children: [iconPath ? (jsxRuntime.jsx("img", { className: "icon-dim-".concat(iconSize || 20, " mr-6 ").concat(iconClass || ''), src: iconPath, alt:
|
|
8657
|
+
var Icon = props.Icon, iconPath = props.iconPath, iconClass = props.iconClass, iconSize = props.iconSize, onImageLoadError = props.onImageLoadError, heading = props.heading, infoTextHeading = props.infoTextHeading, infoText = props.infoText, showCloseButton = props.showCloseButton, additionalContent = props.additionalContent, documentationLink = props.documentationLink, documentationLinkText = props.documentationLinkText;
|
|
8658
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", __assign({ className: "dc__word-break dc__hyphens-auto flex left ".concat(isWhiteTheme ? 'p-12 dc__border-bottom-n1 cn-9' : 'pt-20 pb-12 pr-20 pl-20 cn-0 top') }, { children: [iconPath ? (jsxRuntime.jsx("img", { className: "icon-dim-".concat(iconSize || 20, " mr-6 ").concat(iconClass || ''), src: iconPath, alt: "Heading", onError: onImageLoadError })) : (Icon && (jsxRuntime.jsx("div", __assign({ className: "icon-dim-".concat(iconSize || 20, " mr-6") }, { children: jsxRuntime.jsx(Icon, { className: "icon-dim-".concat(iconSize || 20, " ").concat(iconClass || '') }) })))), heading && jsxRuntime.jsx("span", __assign({ className: "fs-14 fw-6 lh-20 ".concat(showCloseButton ? 'mr-6' : '') }, { children: heading })), showCloseButton && (jsxRuntime.jsx("div", __assign({ className: "icon-dim-16 ml-auto" }, { children: jsxRuntime.jsx(SvgIcCross, { className: "icon-dim-16 cursor ".concat(isWhiteTheme ? 'fcn-9' : 'fcn-0'), onClick: closeTippy }) })))] })), infoTextHeading && (jsxRuntime.jsx("div", __assign({ className: "dc__word-break dc__hyphens-auto fs-14 fw-6 lh-20 ".concat(isWhiteTheme ? 'pl-12 pr-12' : 'pl-20 pr-20') }, { children: infoTextHeading }))), infoText && (jsxRuntime.jsx("div", __assign({ className: "dc__word-break dc__hyphens-auto fs-13 fw-4 lh-20 ".concat(isWhiteTheme
|
|
8570
8659
|
? 'p-12'
|
|
8571
8660
|
: "pl-20 pr-20 pt-4 ".concat(additionalContent && documentationLink ? 'pb-12' : 'pb-20')) }, { children: infoText }))), additionalContent, documentationLink && (jsxRuntime.jsx("div", __assign({ className: "pl-12 pb-12" }, { children: jsxRuntime.jsx("a", __assign({ href: documentationLink, target: "_blank", rel: "noreferrer noopener", className: "fs-13 cb-5", onClick: closeTippy }, { children: documentationLinkText || 'Learn more' })) })))] }));
|
|
8572
8661
|
};
|
|
@@ -8924,7 +9013,7 @@ ConfirmationDialog.ButtonGroup = ButtonGroup;
|
|
|
8924
9013
|
var warn = "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2248%22%20height%3D%2248%22%20viewBox%3D%220%200%2048%2048%22%3E%20%20%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%200h48v48H0z%22%2F%3E%20%20%20%20%20%20%20%20%3Cg%20fill%3D%22%23FFEBEB%22%20stroke%3D%22%23F33E3E%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M7%2024h24v17a4%204%200%200%201-4%204H11a4%204%200%200%201-4-4V24z%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20stroke-linecap%3D%22round%22%20d%3D%22M19%2029.5v10M24%2029.5v10M14%2029.5v10%22%2F%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3Cpath%20stroke%3D%22%23F33E3E%22%20stroke-dasharray%3D%2217%2C3%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%20d%3D%22M42%2010a3%203%200%200%201%200%206H31M38%2023a3%203%200%200%200-3-3h-8%22%2F%3E%20%20%20%20%20%20%20%20%3Cg%20stroke%3D%22%23F33E3E%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%20transform%3D%22rotate%28-10%2036.29%20-8.86%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20width%3D%2230%22%20height%3D%225%22%20y%3D%226%22%20fill%3D%22%23FFEBEB%22%20rx%3D%221%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M11%200h8a2%202%200%200%201%202%202v4H9V2a2%202%200%200%201%202-2z%22%2F%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";
|
|
8925
9014
|
|
|
8926
9015
|
var DeleteDialog = function (props) {
|
|
8927
|
-
return
|
|
9016
|
+
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: props.closeDelete, 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: function () { return props.delete(); }, disabled: props.apiCallInProgress, "data-testid": "dialog-delete" }, { children: props.apiCallInProgress ? jsxRuntime.jsx(Progressing, {}) : "".concat(props.deletePrefix || '', "Delete").concat(props.deletePostfix || '') }))] })) })] }));
|
|
8928
9017
|
};
|
|
8929
9018
|
function DeleteDialogDescription(props) {
|
|
8930
9019
|
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: props.children });
|
|
@@ -16623,59 +16712,80 @@ function Radio(_a) {
|
|
|
16623
16712
|
}
|
|
16624
16713
|
RadioGroup.Radio = Radio;
|
|
16625
16714
|
|
|
16626
|
-
|
|
16627
|
-
|
|
16628
|
-
|
|
16629
|
-
|
|
16630
|
-
|
|
16631
|
-
|
|
16632
|
-
|
|
16633
|
-
(function (
|
|
16634
|
-
|
|
16635
|
-
|
|
16636
|
-
|
|
16637
|
-
|
|
16638
|
-
(
|
|
16639
|
-
|
|
16640
|
-
|
|
16641
|
-
|
|
16642
|
-
|
|
16643
|
-
|
|
16644
|
-
(
|
|
16645
|
-
|
|
16646
|
-
|
|
16647
|
-
|
|
16648
|
-
|
|
16649
|
-
|
|
16650
|
-
|
|
16651
|
-
|
|
16652
|
-
|
|
16653
|
-
|
|
16654
|
-
|
|
16655
|
-
|
|
16656
|
-
|
|
16657
|
-
|
|
16658
|
-
|
|
16659
|
-
|
|
16660
|
-
|
|
16661
|
-
|
|
16662
|
-
|
|
16663
|
-
|
|
16664
|
-
|
|
16665
|
-
|
|
16715
|
+
var info = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2032%2032%22%3E%20%20%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%200h32v32H0z%22%2F%3E%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22%2306C%22%20d%3D%22M16%202.667C8.64%202.667%202.667%208.64%202.667%2016S8.64%2029.333%2016%2029.333%2029.333%2023.36%2029.333%2016%2023.36%202.667%2016%202.667z%22%2F%3E%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22%23FFF%22%20d%3D%22M16%2014.667c.736%200%201.333.597%201.333%201.333v5.333a1.333%201.333%200%201%201-2.666%200V16c0-.736.597-1.333%201.333-1.333zm0-5.334A1.333%201.333%200%201%201%2016%2012a1.333%201.333%200%200%201%200-2.667z%22%2F%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";
|
|
16716
|
+
|
|
16717
|
+
function DeleteComponent(_a) {
|
|
16718
|
+
var setDeleting = _a.setDeleting, toggleConfirmation = _a.toggleConfirmation, deleteComponent = _a.deleteComponent, title = _a.title, component = _a.component, payload = _a.payload, _b = _a.confirmationDialogDescription, confirmationDialogDescription = _b === void 0 ? '' : _b, _c = _a.redirectTo, redirectTo = _c === void 0 ? false : _c, _d = _a.url, url = _d === void 0 ? '' : _d, reload = _a.reload, _e = _a.configuration, configuration = _e === void 0 ? '' : _e, closeCustomComponent = _a.closeCustomComponent;
|
|
16719
|
+
var _f = __read(React.useState(false), 2), showCannotDeleteDialogModal = _f[0], setCannotDeleteDialogModal = _f[1];
|
|
16720
|
+
var push = reactRouterDom.useHistory().push;
|
|
16721
|
+
function handleDelete() {
|
|
16722
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
16723
|
+
var serverError_1;
|
|
16724
|
+
return __generator(this, function (_a) {
|
|
16725
|
+
switch (_a.label) {
|
|
16726
|
+
case 0:
|
|
16727
|
+
setDeleting(true);
|
|
16728
|
+
_a.label = 1;
|
|
16729
|
+
case 1:
|
|
16730
|
+
_a.trys.push([1, 3, 4, 5]);
|
|
16731
|
+
return [4 /*yield*/, deleteComponent(payload)];
|
|
16732
|
+
case 2:
|
|
16733
|
+
_a.sent();
|
|
16734
|
+
toast.success('Successfully deleted');
|
|
16735
|
+
toggleConfirmation(false);
|
|
16736
|
+
if (redirectTo) {
|
|
16737
|
+
push(url);
|
|
16738
|
+
}
|
|
16739
|
+
else {
|
|
16740
|
+
reload();
|
|
16741
|
+
}
|
|
16742
|
+
if (typeof closeCustomComponent === 'function') {
|
|
16743
|
+
closeCustomComponent();
|
|
16744
|
+
}
|
|
16745
|
+
return [3 /*break*/, 5];
|
|
16746
|
+
case 3:
|
|
16747
|
+
serverError_1 = _a.sent();
|
|
16748
|
+
if (serverError_1 instanceof ServerErrors && serverError_1.code === 500) {
|
|
16749
|
+
setCannotDeleteDialogModal(true);
|
|
16750
|
+
}
|
|
16751
|
+
return [3 /*break*/, 5];
|
|
16752
|
+
case 4:
|
|
16753
|
+
setDeleting(false);
|
|
16754
|
+
return [7 /*endfinally*/];
|
|
16755
|
+
case 5: return [2 /*return*/];
|
|
16756
|
+
}
|
|
16757
|
+
});
|
|
16758
|
+
});
|
|
16759
|
+
}
|
|
16760
|
+
var handleConfirmation = function () {
|
|
16761
|
+
setCannotDeleteDialogModal(false);
|
|
16762
|
+
toggleConfirmation(false);
|
|
16763
|
+
if (typeof closeCustomComponent === 'function') {
|
|
16764
|
+
closeCustomComponent();
|
|
16765
|
+
}
|
|
16766
|
+
};
|
|
16767
|
+
var renderCannotDeleteDialogModal = function () {
|
|
16768
|
+
return (jsxRuntime.jsxs(ConfirmationDialog, __assign({ className: "confirmation-dialog__body--w-360" }, { children: [jsxRuntime.jsx(ConfirmationDialog.Icon, { src: info }), jsxRuntime.jsx(ConfirmationDialog.Body, { title: "Cannot delete ".concat(component, " '").concat(title, "'") }), jsxRuntime.jsx("p", __assign({ className: "fs-13 cn-7 " }, { children: confirmationDialogDescription })), jsxRuntime.jsx(ConfirmationDialog.ButtonGroup, { children: jsxRuntime.jsx("button", __assign({ type: "button", className: "cta", onClick: handleConfirmation }, { children: "Okay" })) })] })));
|
|
16769
|
+
};
|
|
16770
|
+
var renderDeleteDialog = function () {
|
|
16771
|
+
return (jsxRuntime.jsx(DeleteDialog, __assign({ title: "Delete ".concat(component, " '").concat(title, "'"), delete: handleDelete, closeDelete: function () { return toggleConfirmation(false); }, dataTestId: "delete-dialog" }, { children: jsxRuntime.jsx(DeleteDialog.Description, { children: jsxRuntime.jsxs("p", { children: ["Are you sure you want to delete this ", configuration ? configuration : component, "? "] }) }) })));
|
|
16772
|
+
};
|
|
16773
|
+
return (jsxRuntime.jsxs("div", { children: [!showCannotDeleteDialogModal && renderDeleteDialog(), showCannotDeleteDialogModal && renderCannotDeleteDialogModal()] }));
|
|
16774
|
+
}
|
|
16666
16775
|
|
|
16667
16776
|
exports.BreadCrumb = BreadCrumb;
|
|
16668
16777
|
exports.BreadcrumbStore = Store;
|
|
16669
|
-
exports.BuildStageVariable = BuildStageVariable;
|
|
16670
16778
|
exports.CDModalTab = CDModalTab;
|
|
16671
16779
|
exports.Checkbox = Checkbox;
|
|
16672
16780
|
exports.ClearIndicator = ClearIndicator;
|
|
16673
16781
|
exports.ConditionalWrap = ConditionalWrap;
|
|
16674
16782
|
exports.ConfirmationDialog = ConfirmationDialog;
|
|
16783
|
+
exports.CustomInput = CustomInput;
|
|
16675
16784
|
exports.CustomSelect = CustomSelect;
|
|
16676
16785
|
exports.DEFAULT_TAG_DATA = DEFAULT_TAG_DATA;
|
|
16677
16786
|
exports.DOCUMENTATION = DOCUMENTATION;
|
|
16678
16787
|
exports.DOCUMENTATION_HOME_PAGE = DOCUMENTATION_HOME_PAGE;
|
|
16788
|
+
exports.DeleteComponent = DeleteComponent;
|
|
16679
16789
|
exports.DeleteDialog = DeleteDialog;
|
|
16680
16790
|
exports.DetailsProgressing = DetailsProgressing;
|
|
16681
16791
|
exports.DialogForm = DialogForm;
|
|
@@ -16743,4 +16853,5 @@ exports.toastAccessDenied = toastAccessDenied;
|
|
|
16743
16853
|
exports.trash = trash;
|
|
16744
16854
|
exports.useBreadcrumb = useBreadcrumb;
|
|
16745
16855
|
exports.useEffectAfterMount = useEffectAfterMount;
|
|
16856
|
+
exports.useForm = useForm;
|
|
16746
16857
|
exports.useThrottledEffect = useThrottledEffect;
|
package/package.json
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 32 32">
|
|
2
|
+
<g fill="none" fill-rule="evenodd">
|
|
3
|
+
<path d="M0 0h32v32H0z"/>
|
|
4
|
+
<path fill="#06C" d="M16 2.667C8.64 2.667 2.667 8.64 2.667 16S8.64 29.333 16 29.333 29.333 23.36 29.333 16 23.36 2.667 16 2.667z"/>
|
|
5
|
+
<path fill="#FFF" d="M16 14.667c.736 0 1.333.597 1.333 1.333v5.333a1.333 1.333 0 1 1-2.666 0V16c0-.736.597-1.333 1.333-1.333zm0-5.334A1.333 1.333 0 1 1 16 12a1.333 1.333 0 0 1 0-2.667z"/>
|
|
6
|
+
</g>
|
|
7
|
+
</svg>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
2
|
+
<g fill="none" fill-rule="evenodd">
|
|
3
|
+
<path d="M0 0h32v32H0z"/>
|
|
4
|
+
<path fill="#FFCB5D" d="M18.315 5.052L29.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"/>
|
|
5
|
+
<path fill="#FFF" 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"/>
|
|
6
|
+
</g>
|
|
7
|
+
</svg>
|
package/src/Common/Constants.ts
CHANGED
|
@@ -57,10 +57,4 @@ export const TOKEN_COOKIE_NAME = 'argocd.token'
|
|
|
57
57
|
export const TriggerTypeMap = {
|
|
58
58
|
automatic: 'Auto',
|
|
59
59
|
manual: 'Manual',
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export const BuildStageVariable = {
|
|
63
|
-
PreBuild: 'preBuildStage',
|
|
64
|
-
Build: 'buildStage',
|
|
65
|
-
PostBuild: 'postBuildStage',
|
|
66
60
|
}
|