@devtron-labs/devtron-fe-common-lib 0.0.55-beta-1 → 0.0.55-beta-3
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/{CodeEditor-0a5bfd53.js → CodeEditor-3c2aaef5.js} +11082 -11082
- package/dist/Common/AddCDButton/AddCDButton.js +24 -24
- package/dist/Common/AppStatus/AppStatus.js +16 -16
- package/dist/Common/BreadCrumb/BreadCrumb.js +43 -43
- package/dist/Common/BreadCrumb/BreadcrumbStore.js +9 -9
- package/dist/Common/ChartVersionAndTypeSelector.js +42 -42
- package/dist/Common/Checkbox.js +8 -8
- package/dist/Common/ClipboardButton/ClipboardButton.js +17 -17
- package/dist/Common/ClipboardButton/__tests__/ClipboardButton.test.js +10 -10
- package/dist/Common/CodeEditor/CodeEditor.js +4 -4
- package/dist/Common/Common.service.js +1 -1
- package/dist/Common/CustomInput/CustomInput.js +56 -56
- package/dist/Common/CustomTagSelector/PropagateTagInfo.js +22 -22
- package/dist/Common/CustomTagSelector/ResizableTagTextArea.js +22 -22
- package/dist/Common/CustomTagSelector/TagDetails.js +33 -33
- package/dist/Common/CustomTagSelector/TagLabelSelect.js +33 -33
- package/dist/Common/CustomTagSelector/TagLabelValueSelector.js +83 -83
- package/dist/Common/DebouncedSearch/DebouncedSearch.js +24 -24
- package/dist/Common/DebouncedSearch/__tests__/DebouncedSearch.test.js +16 -16
- package/dist/Common/DeleteComponentModal/DeleteComponent.js +49 -49
- package/dist/Common/DevtronProgressing/DevtronProgressing.js +2 -2
- package/dist/Common/Dialogs/ConfirmationDialog.js +14 -14
- package/dist/Common/Dialogs/DeleteDialog.js +24 -24
- package/dist/Common/Dialogs/DialogForm.js +21 -21
- package/dist/Common/Dialogs/ForceDeleteDialog.js +12 -12
- package/dist/Common/DraggableWrapper/DraggableButton.js +6 -6
- package/dist/Common/DraggableWrapper/DraggableWrapper.js +42 -1468
- package/dist/Common/Drawer/Drawer.js +6 -6
- package/dist/Common/EmptyState/EmptyState.js +19 -19
- package/dist/Common/EmptyState/GenericEmptyState.js +25 -25
- package/dist/Common/Error.js +6 -6
- package/dist/Common/ErrorScreenNotFound.js +3 -3
- package/dist/Common/Grid/Grid.js +11 -11
- package/dist/Common/Helper.js +3 -3
- package/dist/Common/Hooks/UseSuperAdmin/UseSuperAdmin.js +1 -1
- package/dist/Common/ImageTags.js +224 -221
- package/dist/Common/InfoColorBar/InfoColourbar.js +37 -37
- package/dist/Common/Modals/Modal.js +8 -8
- package/dist/Common/Modals/OpaqueModal.js +13 -13
- package/dist/Common/Modals/VisibleModal.js +3 -3
- package/dist/Common/Modals/VisibleModal2.js +8 -8
- package/dist/Common/MultiSelectCustomization.js +45 -45
- package/dist/Common/Pagination/PageSizeSelector.js +37 -34
- package/dist/Common/Pagination/Pagination.js +60 -57
- package/dist/Common/PopupMenu.js +32 -32
- package/dist/Common/Progressing.js +20 -20
- package/dist/Common/RJSF/Form.js +14 -9877
- package/dist/Common/RJSF/common/FieldRow.js +16 -16
- package/dist/Common/RJSF/config.js +3 -3
- package/dist/Common/RJSF/templates/ArrayFieldItemTemplate.js +13 -13
- package/dist/Common/RJSF/templates/ArrayFieldTemplate.js +37 -40
- package/dist/Common/RJSF/templates/BaseInput.js +14 -6
- package/dist/Common/RJSF/templates/ButtonTemplates/AddButton.js +6 -6
- package/dist/Common/RJSF/templates/ButtonTemplates/RemoveButton.js +3 -3
- package/dist/Common/RJSF/templates/ButtonTemplates/SubmitButton.js +6 -8
- package/dist/Common/RJSF/templates/Description.js +6 -6
- package/dist/Common/RJSF/templates/Field.js +12 -15
- package/dist/Common/RJSF/templates/FieldErrorTemplate.js +8 -10
- package/dist/Common/RJSF/templates/ObjectFieldTemplate.js +35 -40
- package/dist/Common/RJSF/templates/TitleField.js +5 -5
- package/dist/Common/RJSF/templates/WrapIfAdditionalTemplate.js +23 -24
- package/dist/Common/RJSF/templates/index.js +3 -3
- package/dist/Common/RJSF/utils.js +9 -12
- package/dist/Common/RJSF/widgets/Checkbox.js +20 -20
- package/dist/Common/RJSF/widgets/Select.js +609 -40
- package/dist/Common/RadioGroup/RadioGroup.js +32 -32
- package/dist/Common/RadioGroup.js +17 -17
- package/dist/Common/Reload.js +10 -10
- package/dist/Common/ResizableTextarea.js +11 -11
- package/dist/Common/SearchBar/SearchBar.component.js +26 -26
- package/dist/Common/Security/ScanVulnerabilitiesTable.js +20 -20
- package/dist/Common/Select/Select.js +93 -93
- package/dist/Common/TippyCustomized.js +4 -4
- package/dist/Common/ToastBody.js +22 -22
- package/dist/Common/Toggle/Toggle.js +15 -15
- package/dist/Common/index.js +3 -3
- package/dist/{Helper-e1262739.js → Helper-a0caa238.js} +916 -916
- package/dist/TippyCustomized-7b9b46b9.js +124 -0
- package/dist/{_commonjsHelpers-c5d32002.js → _commonjsHelpers-aeeeeb92.js} +2 -2
- package/dist/{cssMode-c259da7f.js → cssMode-c5cae484.js} +1 -1
- package/dist/{freemarker2-d852fa33.js → freemarker2-b9a8615c.js} +1 -1
- package/dist/{handlebars-7e868cd0.js → handlebars-3803af36.js} +1 -1
- package/dist/{html-1faea799.js → html-498f0150.js} +1 -1
- package/dist/{htmlMode-175871d9.js → htmlMode-a8ae8cc5.js} +1 -1
- package/dist/index.js +3 -3
- package/dist/{javascript-46245cbe.js → javascript-4363ced3.js} +1 -1
- package/dist/{jsonMode-bbe5176f.js → jsonMode-80290b9e.js} +1 -1
- package/dist/jsx-runtime-0dcb030c.js +667 -0
- package/dist/{liquid-e6b820e1.js → liquid-1398df0a.js} +1 -1
- package/dist/{python-7d292338.js → python-dd2d43e8.js} +1 -1
- package/dist/{razor-c6ab49dd.js → razor-20a66096.js} +1 -1
- package/dist/{react-select.esm-27b8d563.js → react-select.esm-97f26847.js} +1280 -1112
- package/dist/{react-toastify.esm-e28f7200.js → react-toastify.esm-1042de65.js} +149 -155
- package/dist/{react.esm-5465a283.js → react.esm-2c92920f.js} +4929 -4393
- package/dist/{tippy-react.esm-d5c56a0a.js → tippy-react.esm-8dc66a75.js} +89 -89
- package/dist/{tsMode-4d1329d1.js → tsMode-3fa4eb6a.js} +1 -1
- package/dist/{typescript-402306e6.js → typescript-1bbaf605.js} +1 -1
- package/dist/{xml-8975e1f9.js → xml-a2693dbd.js} +1 -1
- package/dist/{yaml-680c02bf.js → yaml-01ce4fdd.js} +1 -1
- package/package.json +3 -12
- package/dist/BaseInput-8101e714.js +0 -1686
- package/dist/Common/UseWindowSize.d.ts +0 -4
- package/dist/Common/UseWindowSize.js +0 -20
- package/dist/TippyCustomized-c58fd46a.js +0 -124
- package/dist/canExpand-ab1f6741.js +0 -10
- package/dist/englishStringTranslator-2c9a30fc.js +0 -17
- package/dist/enums-d0bd3f97.js +0 -6618
- package/dist/getSubmitButtonOptions-a1be9bb0.js +0 -20
- package/dist/getTemplate-91d3260d.js +0 -11
- package/dist/getUiOptions-844b45a7.js +0 -10
- package/dist/idGenerators-0b33693c.js +0 -35
- package/dist/index-5a231705.js +0 -17417
- package/dist/index-c855d89c.js +0 -173
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { j as s } from "../../jsx-runtime-0dcb030c.js";
|
|
2
2
|
import { S as P } from "../../ic-info-filled-31a15add.js";
|
|
3
|
-
import { S as
|
|
4
|
-
function
|
|
3
|
+
import { S as R } from "../../ic-warning-42534af1.js";
|
|
4
|
+
function B({
|
|
5
5
|
name: m,
|
|
6
|
-
value:
|
|
7
|
-
error:
|
|
8
|
-
onChange:
|
|
9
|
-
onFocus:
|
|
6
|
+
value: u,
|
|
7
|
+
error: r,
|
|
8
|
+
onChange: n,
|
|
9
|
+
onFocus: p = (l) => {
|
|
10
10
|
},
|
|
11
11
|
label: t,
|
|
12
|
-
type:
|
|
13
|
-
disabled:
|
|
14
|
-
labelClassName:
|
|
15
|
-
placeholder:
|
|
16
|
-
tabIndex:
|
|
17
|
-
dataTestid:
|
|
18
|
-
isRequiredField:
|
|
19
|
-
autoFocus:
|
|
20
|
-
rootClassName:
|
|
21
|
-
autoComplete:
|
|
22
|
-
helperText:
|
|
23
|
-
handleOnBlur:
|
|
24
|
-
readOnly:
|
|
25
|
-
noTrim:
|
|
26
|
-
ref:
|
|
27
|
-
onKeyPress:
|
|
28
|
-
defaultValue:
|
|
29
|
-
onKeyDown:
|
|
30
|
-
required:
|
|
12
|
+
type: d = "text",
|
|
13
|
+
disabled: _ = !1,
|
|
14
|
+
labelClassName: x = "",
|
|
15
|
+
placeholder: j = "",
|
|
16
|
+
tabIndex: g = 1,
|
|
17
|
+
dataTestid: o = "",
|
|
18
|
+
isRequiredField: N = !1,
|
|
19
|
+
autoFocus: h = !1,
|
|
20
|
+
rootClassName: y = "",
|
|
21
|
+
autoComplete: I = "off",
|
|
22
|
+
helperText: i = "",
|
|
23
|
+
handleOnBlur: a,
|
|
24
|
+
readOnly: S = !1,
|
|
25
|
+
noTrim: $ = !1,
|
|
26
|
+
ref: b,
|
|
27
|
+
onKeyPress: v,
|
|
28
|
+
defaultValue: E,
|
|
29
|
+
onKeyDown: A,
|
|
30
|
+
required: C,
|
|
31
31
|
additionalErrorInfo: f
|
|
32
32
|
}) {
|
|
33
|
-
function
|
|
33
|
+
function l(e) {
|
|
34
34
|
return Array.isArray(e) ? e : [e];
|
|
35
35
|
}
|
|
36
36
|
const F = (e) => {
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
/* @__PURE__ */
|
|
37
|
+
$ || (e.stopPropagation(), e.target.value = e.target.value?.trim(), n(e)), typeof a == "function" && a(e);
|
|
38
|
+
}, c = (e) => /* @__PURE__ */ s.jsxs("div", { className: "form__error", children: [
|
|
39
|
+
/* @__PURE__ */ s.jsx(R, { className: "form__icon form__icon--error" }),
|
|
40
40
|
e,
|
|
41
41
|
typeof f == "function" && f()
|
|
42
|
-
] }, e),
|
|
43
|
-
return /* @__PURE__ */ s("div", { className: "flex column left top", children: [
|
|
44
|
-
|
|
45
|
-
/* @__PURE__ */
|
|
42
|
+
] }, e), L = () => r?.length ? typeof r == "object" ? l(r).map((e) => c(e)) : c(r) : null, W = () => typeof t == "string" ? /* @__PURE__ */ s.jsx("span", { className: `${N ? "dc__required-field" : ""}`, children: t }) : t, q = () => t ? /* @__PURE__ */ s.jsx("label", { className: `form__label ${x}`, "data-testid": `label-${o}`, children: W() }) : null;
|
|
43
|
+
return /* @__PURE__ */ s.jsxs("div", { className: "flex column left top", children: [
|
|
44
|
+
q(),
|
|
45
|
+
/* @__PURE__ */ s.jsx(
|
|
46
46
|
"input",
|
|
47
47
|
{
|
|
48
|
-
"data-testid":
|
|
49
|
-
type:
|
|
48
|
+
"data-testid": o,
|
|
49
|
+
type: d,
|
|
50
50
|
name: m,
|
|
51
|
-
autoComplete:
|
|
52
|
-
className: `form__input ${
|
|
51
|
+
autoComplete: I,
|
|
52
|
+
className: `form__input ${y}`,
|
|
53
53
|
onChange: (e) => {
|
|
54
|
-
e.persist(),
|
|
54
|
+
e.persist(), n(e);
|
|
55
55
|
},
|
|
56
56
|
onBlur: F,
|
|
57
|
-
onFocus:
|
|
58
|
-
placeholder:
|
|
59
|
-
value:
|
|
60
|
-
disabled:
|
|
61
|
-
tabIndex:
|
|
62
|
-
autoFocus:
|
|
63
|
-
readOnly:
|
|
64
|
-
ref:
|
|
65
|
-
onKeyPress:
|
|
66
|
-
defaultValue:
|
|
67
|
-
onKeyDown:
|
|
68
|
-
required:
|
|
57
|
+
onFocus: p,
|
|
58
|
+
placeholder: j,
|
|
59
|
+
value: u,
|
|
60
|
+
disabled: _,
|
|
61
|
+
tabIndex: g,
|
|
62
|
+
autoFocus: h,
|
|
63
|
+
readOnly: S,
|
|
64
|
+
ref: b,
|
|
65
|
+
onKeyPress: v,
|
|
66
|
+
defaultValue: E,
|
|
67
|
+
onKeyDown: A,
|
|
68
|
+
required: C
|
|
69
69
|
}
|
|
70
70
|
),
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
/* @__PURE__ */
|
|
71
|
+
L(),
|
|
72
|
+
i && /* @__PURE__ */ s.jsxs("div", { className: "form__text-field-info", children: [
|
|
73
|
+
/* @__PURE__ */ s.jsx(P, { className: "form__icon form__icon--info" }),
|
|
74
|
+
/* @__PURE__ */ s.jsx("p", { className: "sentence-case", children: i })
|
|
75
75
|
] })
|
|
76
76
|
] });
|
|
77
77
|
}
|
|
78
78
|
export {
|
|
79
|
-
|
|
79
|
+
B as CustomInput
|
|
80
80
|
};
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { S as
|
|
3
|
-
import { T as
|
|
4
|
-
import { TippyTheme as
|
|
5
|
-
import { DOCUMENTATION as
|
|
6
|
-
function
|
|
7
|
-
const
|
|
8
|
-
/* @__PURE__ */
|
|
9
|
-
/* @__PURE__ */
|
|
1
|
+
import { j as e } from "../../jsx-runtime-0dcb030c.js";
|
|
2
|
+
import { S as s } from "../../inject-tag-824bf92c.js";
|
|
3
|
+
import { T as i, S as n } from "../../TippyCustomized-7b9b46b9.js";
|
|
4
|
+
import { TippyTheme as r } from "../Types.js";
|
|
5
|
+
import { DOCUMENTATION as t } from "../Constants.js";
|
|
6
|
+
function u({ isCreateApp: a }) {
|
|
7
|
+
const o = () => /* @__PURE__ */ e.jsxs("div", { className: "p-12 fs-13", children: [
|
|
8
|
+
/* @__PURE__ */ e.jsxs("div", { className: "mb-20", children: [
|
|
9
|
+
/* @__PURE__ */ e.jsxs("span", { className: "flex left", children: [
|
|
10
10
|
"Add a tag and click on the",
|
|
11
|
-
/* @__PURE__ */ e(
|
|
11
|
+
/* @__PURE__ */ e.jsx(s, { className: "icon-dim-16 ml-4 mr-4" }),
|
|
12
12
|
"icon to"
|
|
13
13
|
] }),
|
|
14
14
|
"propagate tags as labels to Kubernetes resources"
|
|
15
15
|
] }),
|
|
16
|
-
/* @__PURE__ */ e("div", { children: "Use these tags to filter/identify resources via CLI or in other Kubernetes tools." })
|
|
16
|
+
/* @__PURE__ */ e.jsx("div", { children: "Use these tags to filter/identify resources via CLI or in other Kubernetes tools." })
|
|
17
17
|
] });
|
|
18
|
-
return /* @__PURE__ */ e(
|
|
19
|
-
|
|
18
|
+
return /* @__PURE__ */ e.jsx(
|
|
19
|
+
i,
|
|
20
20
|
{
|
|
21
|
-
theme:
|
|
21
|
+
theme: r.white,
|
|
22
22
|
className: "w-300",
|
|
23
23
|
placement: "top",
|
|
24
|
-
Icon:
|
|
24
|
+
Icon: s,
|
|
25
25
|
heading: "Propagate tags to K8s resources",
|
|
26
26
|
infoText: "",
|
|
27
|
-
additionalContent:
|
|
27
|
+
additionalContent: o(),
|
|
28
28
|
showCloseButton: !0,
|
|
29
29
|
trigger: "click",
|
|
30
30
|
interactive: !0,
|
|
31
|
-
documentationLink:
|
|
31
|
+
documentationLink: a ? t.APP_TAGS : t.APP_OVERVIEW_TAGS,
|
|
32
32
|
documentationLinkText: "View Documentation",
|
|
33
|
-
children: /* @__PURE__ */
|
|
34
|
-
/* @__PURE__ */ e(
|
|
35
|
-
/* @__PURE__ */ e("span", { children: "Propagate tags" }),
|
|
36
|
-
/* @__PURE__ */ e(
|
|
33
|
+
children: /* @__PURE__ */ e.jsxs("div", { className: "flexbox cursor", children: [
|
|
34
|
+
/* @__PURE__ */ e.jsx(s, { className: "icon-dim-16 mt-2 mr-4" }),
|
|
35
|
+
/* @__PURE__ */ e.jsx("span", { children: "Propagate tags" }),
|
|
36
|
+
/* @__PURE__ */ e.jsx(n, { className: "icon-dim-16 mt-2 ml-4" })
|
|
37
37
|
] })
|
|
38
38
|
}
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
41
|
export {
|
|
42
|
-
|
|
42
|
+
u as default
|
|
43
43
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useState as
|
|
3
|
-
import { u as
|
|
1
|
+
import { j as m } from "../../jsx-runtime-0dcb030c.js";
|
|
2
|
+
import { useState as w, useEffect as z } from "react";
|
|
3
|
+
import { u as C } from "../../Helper-a0caa238.js";
|
|
4
4
|
function A({
|
|
5
5
|
className: n,
|
|
6
6
|
minHeight: s,
|
|
7
|
-
maxHeight:
|
|
8
|
-
value:
|
|
7
|
+
maxHeight: o,
|
|
8
|
+
value: l,
|
|
9
9
|
onChange: x,
|
|
10
10
|
onBlur: e,
|
|
11
11
|
onFocus: u,
|
|
@@ -13,29 +13,29 @@ function A({
|
|
|
13
13
|
tabIndex: g,
|
|
14
14
|
refVar: c,
|
|
15
15
|
dependentRef: r,
|
|
16
|
-
dataTestId:
|
|
17
|
-
handleKeyDown:
|
|
16
|
+
dataTestId: E,
|
|
17
|
+
handleKeyDown: T
|
|
18
18
|
}) {
|
|
19
|
-
const [h, i] =
|
|
20
|
-
|
|
21
|
-
i(
|
|
22
|
-
}, [
|
|
23
|
-
const
|
|
19
|
+
const [h, i] = w("");
|
|
20
|
+
z(() => {
|
|
21
|
+
i(l);
|
|
22
|
+
}, [l]);
|
|
23
|
+
const f = (t) => {
|
|
24
24
|
i(t.target.value), x(t);
|
|
25
25
|
}, a = () => {
|
|
26
26
|
if (document.activeElement !== c.current)
|
|
27
27
|
return;
|
|
28
28
|
c.current.style.height = s + "px", r && (r.current.style.height = s + "px");
|
|
29
29
|
let t = c.current.scrollHeight;
|
|
30
|
-
r && t < r.current.scrollHeight && (t = r.current.scrollHeight), s && t < s && (t = s),
|
|
30
|
+
r && t < r.current.scrollHeight && (t = r.current.scrollHeight), s && t < s && (t = s), o && t > o && (t = o), c.current.style.height = t + "px", r && (r.current.style.height = t + "px");
|
|
31
31
|
};
|
|
32
|
-
|
|
33
|
-
const
|
|
32
|
+
C(a, 500, [h]);
|
|
33
|
+
const j = (t) => {
|
|
34
34
|
c.current.style.height = s + "px", r && (r.current.style.height = s + "px"), e && e(t);
|
|
35
|
-
},
|
|
35
|
+
}, p = (t) => {
|
|
36
36
|
a(), u && u(t);
|
|
37
37
|
};
|
|
38
|
-
return /* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ m.jsx(
|
|
39
39
|
"textarea",
|
|
40
40
|
{
|
|
41
41
|
rows: 1,
|
|
@@ -44,12 +44,12 @@ function A({
|
|
|
44
44
|
placeholder: y,
|
|
45
45
|
className: `${n || ""} lh-20`,
|
|
46
46
|
style: { resize: "none" },
|
|
47
|
-
onChange:
|
|
48
|
-
onBlur:
|
|
49
|
-
onFocus:
|
|
47
|
+
onChange: f,
|
|
48
|
+
onBlur: j,
|
|
49
|
+
onFocus: p,
|
|
50
50
|
tabIndex: g,
|
|
51
|
-
"data-testid":
|
|
52
|
-
onKeyDown:
|
|
51
|
+
"data-testid": E,
|
|
52
|
+
onKeyDown: T
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
55
|
}
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { j as a } from "../../jsx-runtime-0dcb030c.js";
|
|
2
2
|
import { useRef as n } from "react";
|
|
3
|
-
import { S as
|
|
4
|
-
import { S as
|
|
3
|
+
import { S as v } from "../../ic-cross-0e71861d.js";
|
|
4
|
+
import { S as y } from "../../inject-tag-824bf92c.js";
|
|
5
5
|
import { TagLabelValueSelector as d } from "./TagLabelValueSelector.js";
|
|
6
6
|
import { KEY_VALUE as c } from "../Constants.js";
|
|
7
|
-
import { b as
|
|
8
|
-
import { ValidationRules as
|
|
9
|
-
const
|
|
10
|
-
index:
|
|
11
|
-
tagData:
|
|
12
|
-
setTagData:
|
|
7
|
+
import { b as I } from "../../Helper-a0caa238.js";
|
|
8
|
+
import { ValidationRules as V } from "./ValidationRules.js";
|
|
9
|
+
const E = ({
|
|
10
|
+
index: o,
|
|
11
|
+
tagData: r,
|
|
12
|
+
setTagData: s,
|
|
13
13
|
removeTag: m,
|
|
14
|
-
tabIndex:
|
|
14
|
+
tabIndex: l = 1,
|
|
15
15
|
suggestedTagsOptions: u
|
|
16
16
|
}) => {
|
|
17
|
-
const
|
|
18
|
-
|
|
17
|
+
const t = n(null), i = n(null), p = new V(), g = (e) => {
|
|
18
|
+
I(e), m(o);
|
|
19
19
|
}, f = () => {
|
|
20
|
-
const e = { ...
|
|
21
|
-
e.propagate = !e.propagate, e.propagate ? (e.isInvalidKey = e.isInvalidKey || !e.key, e.isInvalidValue = e.isInvalidValue || !e.value) : (e.isInvalidKey = e.key || e.value ? !p.propagateTagKey(e.key).isValid : !1, e.isInvalidValue = e.value ? !p.propagateTagValue(e.value, e.key).isValid : !1),
|
|
20
|
+
const e = { ...r };
|
|
21
|
+
e.propagate = !e.propagate, e.propagate ? (e.isInvalidKey = e.isInvalidKey || !e.key, e.isInvalidValue = e.isInvalidValue || !e.value) : (e.isInvalidKey = e.key || e.value ? !p.propagateTagKey(e.key).isValid : !1, e.isInvalidValue = e.value ? !p.propagateTagValue(e.value, e.key).isValid : !1), s(o, e);
|
|
22
22
|
};
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
/* @__PURE__ */
|
|
23
|
+
return /* @__PURE__ */ a.jsxs("div", { className: "flexbox mb-8", children: [
|
|
24
|
+
/* @__PURE__ */ a.jsx(
|
|
25
25
|
"div",
|
|
26
26
|
{
|
|
27
|
-
className: `dc__border h-30 pl-4 pr-4 br-4 mr-8 pointer ${
|
|
27
|
+
className: `dc__border h-30 pl-4 pr-4 br-4 mr-8 pointer ${r.propagate ? "bcn-7" : ""} ${r.key.startsWith("devtron.ai/") ? "cursor-not-allowed bcn-1" : ""}`,
|
|
28
28
|
onClick: f,
|
|
29
|
-
"data-testid": `propagate-tag-${
|
|
30
|
-
children: /* @__PURE__ */
|
|
29
|
+
"data-testid": `propagate-tag-${o}`,
|
|
30
|
+
children: /* @__PURE__ */ a.jsx(y, { className: `icon-dim-20 mt-4 ${r.propagate ? "scn-0" : ""}` })
|
|
31
31
|
}
|
|
32
32
|
),
|
|
33
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ a.jsx(
|
|
34
34
|
d,
|
|
35
35
|
{
|
|
36
|
-
selectedTagIndex:
|
|
37
|
-
tagData:
|
|
38
|
-
setTagData:
|
|
36
|
+
selectedTagIndex: o,
|
|
37
|
+
tagData: r,
|
|
38
|
+
setTagData: s,
|
|
39
39
|
tagInputType: c.KEY,
|
|
40
40
|
placeholder: "Enter key",
|
|
41
|
-
tabIndex:
|
|
42
|
-
refVar:
|
|
41
|
+
tabIndex: l - 1,
|
|
42
|
+
refVar: t,
|
|
43
43
|
dependentRef: i,
|
|
44
44
|
tagOptions: u
|
|
45
45
|
}
|
|
46
46
|
),
|
|
47
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ a.jsx(
|
|
48
48
|
d,
|
|
49
49
|
{
|
|
50
|
-
selectedTagIndex:
|
|
51
|
-
tagData:
|
|
52
|
-
setTagData:
|
|
50
|
+
selectedTagIndex: o,
|
|
51
|
+
tagData: r,
|
|
52
|
+
setTagData: s,
|
|
53
53
|
tagInputType: c.VALUE,
|
|
54
54
|
placeholder: "Enter value",
|
|
55
|
-
tabIndex:
|
|
55
|
+
tabIndex: l,
|
|
56
56
|
refVar: i,
|
|
57
|
-
dependentRef:
|
|
57
|
+
dependentRef: t
|
|
58
58
|
}
|
|
59
59
|
),
|
|
60
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ a.jsx("div", { className: "dc__border pl-4 pr-4 dc__right-radius-4 pointer flex top", onClick: g, "data-testid": `delete-tag-${o}`, children: /* @__PURE__ */ a.jsx(v, { className: "icon-dim-20 mt-4" }) })
|
|
61
61
|
] });
|
|
62
62
|
};
|
|
63
63
|
export {
|
|
64
|
-
|
|
64
|
+
E as TagDetails
|
|
65
65
|
};
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { TagDetails as
|
|
3
|
-
import {
|
|
4
|
-
import { S as
|
|
5
|
-
import { DEFAULT_TAG_DATA as
|
|
1
|
+
import x from "./PropagateTagInfo.js";
|
|
2
|
+
import { TagDetails as f } from "./TagDetails.js";
|
|
3
|
+
import { j as t } from "../../jsx-runtime-0dcb030c.js";
|
|
4
|
+
import { S as g } from "../../ic-add-4787ded5.js";
|
|
5
|
+
import { DEFAULT_TAG_DATA as l } from "../Constants.js";
|
|
6
6
|
import "./TagLabelValueSelector.js";
|
|
7
7
|
import "./ResizableTagTextArea.js";
|
|
8
|
-
const
|
|
9
|
-
isCreateApp:
|
|
10
|
-
labelTags:
|
|
11
|
-
setLabelTags:
|
|
12
|
-
tabIndex:
|
|
8
|
+
const N = ({
|
|
9
|
+
isCreateApp: e,
|
|
10
|
+
labelTags: o,
|
|
11
|
+
setLabelTags: c,
|
|
12
|
+
tabIndex: d = 0
|
|
13
13
|
}) => {
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
const a = [...
|
|
22
|
-
a.splice(
|
|
14
|
+
const n = (s, a) => {
|
|
15
|
+
const i = [...o], r = a;
|
|
16
|
+
r.key.startsWith("devtron.ai/") && (r.propagate = !1), i[s] = r, c(i);
|
|
17
|
+
}, m = () => {
|
|
18
|
+
const s = [...o];
|
|
19
|
+
s.splice(0, 0, l), c(s);
|
|
20
|
+
}, p = (s) => {
|
|
21
|
+
const a = [...o];
|
|
22
|
+
a.splice(s, 1), c(a);
|
|
23
23
|
};
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ t.jsxs("div", { children: [
|
|
25
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flexbox dc__content-space mb-8", children: [
|
|
26
|
+
/* @__PURE__ */ t.jsx("span", { children: "Tags" }),
|
|
27
|
+
/* @__PURE__ */ t.jsx(x, { isCreateApp: e })
|
|
28
28
|
] }),
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ t.jsxs("div", { children: [
|
|
30
|
+
/* @__PURE__ */ t.jsxs("div", { className: "dc_width-max-content cb-5 fw-6 fs-13 flexbox mr-20 mb-8 cursor", onClick: m, "data-testid": "add-tag-button", children: [
|
|
31
|
+
/* @__PURE__ */ t.jsx(g, { className: "icon-dim-20 fcb-5" }),
|
|
32
32
|
" Add tag"
|
|
33
33
|
] }),
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
|
|
34
|
+
/* @__PURE__ */ t.jsx("div", { className: "mb-8", "data-testid": "tag-rows-container", children: o?.map((s, a) => /* @__PURE__ */ t.jsx(
|
|
35
|
+
f,
|
|
36
36
|
{
|
|
37
37
|
index: a,
|
|
38
|
-
tagData:
|
|
39
|
-
setTagData:
|
|
40
|
-
removeTag:
|
|
41
|
-
tabIndex:
|
|
38
|
+
tagData: s,
|
|
39
|
+
setTagData: n,
|
|
40
|
+
removeTag: p,
|
|
41
|
+
tabIndex: d + (a + 2)
|
|
42
42
|
},
|
|
43
43
|
`tag-${a}`
|
|
44
44
|
)) })
|
|
@@ -46,5 +46,5 @@ const w = ({
|
|
|
46
46
|
] });
|
|
47
47
|
};
|
|
48
48
|
export {
|
|
49
|
-
|
|
49
|
+
N as TagLabelSelect
|
|
50
50
|
};
|