@devtron-labs/devtron-fe-common-lib 1.13.0-pre-6 → 1.13.0-redfish-preview-beta-1

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.
Files changed (168) hide show
  1. package/dist/{@code-editor-DDIbDgoG.js → @common-rjsf-CWkKRfHL.js} +18950 -19444
  2. package/dist/{@framer-motion-DyOLEeMN.js → @framer-motion-BL6-Hrrc.js} +1 -1
  3. package/dist/{@react-dates-B7d8RWU9.js → @react-dates-CIHHgq4p.js} +1 -1
  4. package/dist/{@react-select-Coo19Q6a.js → @react-select-BVKpsqGO.js} +1 -1
  5. package/dist/{@react-virtualized-sticky-tree-BPjPJDIR.js → @react-virtualized-sticky-tree-CjKfeUxB.js} +1 -1
  6. package/dist/{@vendor-D9q4wrnL.js → @vendor-CekuMgQx.js} +15535 -15535
  7. package/dist/Common/Checkbox.d.ts +5 -0
  8. package/dist/Common/Common.service.d.ts +2 -2
  9. package/dist/Common/Constants.d.ts +2 -2
  10. package/dist/Common/Helper.d.ts +1 -5
  11. package/dist/Common/RJSF/Form.d.ts +1 -1
  12. package/dist/Common/SegmentedBarChart/types.d.ts +11 -2
  13. package/dist/Common/Toggle/Toggle.d.ts +1 -4
  14. package/dist/Common/Types.d.ts +0 -2
  15. package/dist/Common/index.d.ts +3 -2
  16. package/dist/Pages/GlobalConfigurations/index.d.ts +0 -1
  17. package/dist/Pages/ResourceBrowser/service.d.ts +1 -1
  18. package/dist/Pages/ResourceBrowser/types.d.ts +5 -38
  19. package/dist/Shared/Components/ActionMenu/ActionMenu.component.d.ts +2 -1
  20. package/dist/Shared/Components/ActionMenu/ActionMenuOption.d.ts +3 -0
  21. package/dist/Shared/Components/ActionMenu/index.d.ts +2 -2
  22. package/dist/Shared/Components/ActionMenu/types.d.ts +11 -88
  23. package/dist/Shared/Components/AnnouncementBanner/AnnouncementBanner.d.ts +6 -0
  24. package/dist/Shared/Components/AnnouncementBanner/index.d.ts +1 -0
  25. package/dist/Shared/Components/BulkOperations/types.d.ts +2 -2
  26. package/dist/Shared/Components/Button/types.d.ts +1 -3
  27. package/dist/Shared/Components/CICDHistory/AppStatusDetailsChart.d.ts +3 -0
  28. package/dist/Shared/Components/CICDHistory/DeploymentStatusBreakdown.d.ts +1 -1
  29. package/dist/Shared/Components/CICDHistory/DeploymentStatusDetailRow.d.ts +1 -1
  30. package/dist/Shared/Components/CICDHistory/ErrorInfoStatusBar.d.ts +2 -0
  31. package/dist/Shared/Components/CICDHistory/LogStageAccordion.d.ts +1 -1
  32. package/dist/Shared/Components/CICDHistory/constants.d.ts +0 -1
  33. package/dist/Shared/Components/CICDHistory/index.d.ts +1 -0
  34. package/dist/Shared/Components/CICDHistory/service.d.ts +0 -3
  35. package/dist/Shared/Components/CICDHistory/types.d.ts +77 -11
  36. package/dist/Shared/Components/CICDHistory/utils.d.ts +3 -7
  37. package/dist/Shared/Components/EnterpriseTag/EnterpriseTag.component.d.ts +2 -0
  38. package/dist/Shared/Components/EnterpriseTag/index.d.ts +1 -0
  39. package/dist/Shared/Components/Error/ErrorBar.d.ts +1 -1
  40. package/dist/Shared/Components/Error/types.d.ts +0 -4
  41. package/dist/Shared/Components/Error/utils.d.ts +0 -1
  42. package/dist/Shared/Components/FramerComponents/index.d.ts +2 -2
  43. package/dist/Shared/Components/Header/HeaderWithCreateButton/HeaderWithCreateButon.d.ts +3 -1
  44. package/dist/Shared/Components/Header/HelpNav.d.ts +3 -0
  45. package/dist/Shared/Components/Header/PageHeader.d.ts +1 -1
  46. package/dist/Shared/Components/Header/constants.d.ts +4 -5
  47. package/dist/Shared/Components/Header/types.d.ts +10 -15
  48. package/dist/Shared/Components/Header/utils.d.ts +1 -5
  49. package/dist/Shared/Components/Icon/Icon.d.ts +3 -35
  50. package/dist/Shared/Components/Icon/IconBase.d.ts +1 -1
  51. package/dist/Shared/Components/Icon/types.d.ts +8 -30
  52. package/dist/Shared/Components/InfoBlock/constants.d.ts +2 -2
  53. package/dist/Shared/Components/InfoBlock/types.d.ts +2 -2
  54. package/dist/Shared/Components/InfoIconTippy/InfoIconTippy.d.ts +1 -1
  55. package/dist/Shared/Components/License/index.d.ts +1 -1
  56. package/dist/Shared/Components/License/utils.d.ts +1 -2
  57. package/dist/Shared/Components/LoginBanner/index.d.ts +0 -2
  58. package/dist/Shared/Components/Security/SecurityModal/types.d.ts +2 -2
  59. package/dist/Shared/Components/Security/SecurityModal/utils.d.ts +1 -1
  60. package/dist/Shared/Components/SelectPicker/common.d.ts +0 -2
  61. package/dist/Shared/Components/SelectPicker/index.d.ts +0 -1
  62. package/dist/Shared/Components/SelectPicker/type.d.ts +0 -4
  63. package/dist/Shared/Components/StatusComponent/types.d.ts +1 -2
  64. package/dist/Shared/Components/TabGroup/TabGroup.helpers.d.ts +1 -1
  65. package/dist/Shared/Components/TabGroup/TabGroup.types.d.ts +7 -33
  66. package/dist/Shared/Components/TargetPlatforms/TargetPlatformListTooltip.d.ts +1 -1
  67. package/dist/Shared/Components/TargetPlatforms/types.d.ts +2 -1
  68. package/dist/Shared/Components/index.d.ts +2 -2
  69. package/dist/Shared/Helpers.d.ts +2 -2
  70. package/dist/Shared/Providers/index.d.ts +1 -1
  71. package/dist/Shared/Providers/types.d.ts +1 -11
  72. package/dist/Shared/constants.d.ts +24 -18
  73. package/dist/Shared/types.d.ts +2 -110
  74. package/dist/assets/@common-rjsf.css +1 -1
  75. package/dist/assets/ic-charts.f41e185f.svg +19 -0
  76. package/dist/assets/ic-chat-circle-dots.e15514f8.svg +23 -0
  77. package/dist/assets/{ic-checkbox-unselected.ab91cdba.svg → ic-check-grey.f556e371.svg} +4 -2
  78. package/dist/assets/ic-disconnected.551d6161.svg +29 -0
  79. package/dist/assets/ic-discord-fill.1a1b291d.svg +19 -0
  80. package/dist/assets/ic-feedback.d32fa6b0.svg +19 -0
  81. package/dist/assets/ic-files.fc290dee.svg +19 -0
  82. package/dist/assets/{ic-checkbox-selected.c5539d6f.svg → ic-k8s-job.f4414c10.svg} +3 -4
  83. package/dist/assets/ic-login-devtron-logo.702a1d04.svg +22 -0
  84. package/dist/assets/{ic-checkbox-hover.93e8d66a.svg → ic-medal.a2e911f5.svg} +3 -4
  85. package/dist/assets/ic-megaphone.b9f9a901.svg +19 -0
  86. package/dist/assets/ic-onboarding.c98f9ef9.svg +19 -0
  87. package/dist/assets/{ic-caret-down-small.7c4f88bf.svg → ic-terminal.d875cce7.svg} +1 -1
  88. package/dist/assets/ic-thermometer.1bc48079.svg +3 -0
  89. package/dist/assets/{ic-checkbox-hover.0151d832.svg → ic-timeout-red.5eda1010.svg} +4 -3
  90. package/dist/index.d.ts +4 -3
  91. package/dist/index.js +850 -881
  92. package/package.json +1 -1
  93. package/dist/@common-rjsf-AMVnhZkY.js +0 -617
  94. package/dist/Common/Checkbox/Checkbox.d.ts +0 -2
  95. package/dist/Common/Checkbox/index.d.ts +0 -1
  96. package/dist/Common/Drawer/index.d.ts +0 -1
  97. package/dist/Common/EmptyState/index.d.ts +0 -2
  98. package/dist/Pages/GlobalConfigurations/ClustersAndEnvironments/index.d.ts +0 -1
  99. package/dist/Pages/GlobalConfigurations/ClustersAndEnvironments/types.d.ts +0 -8
  100. package/dist/Shared/Components/ActionMenu/ActionMenuItem.d.ts +0 -2
  101. package/dist/Shared/Components/ActionMenu/useActionMenu.hook.d.ts +0 -275
  102. package/dist/Shared/Components/ActionMenu/utils.d.ts +0 -7
  103. package/dist/Shared/Components/AppStatusModal/AppStatusBody.d.ts +0 -2
  104. package/dist/Shared/Components/AppStatusModal/AppStatusContent.d.ts +0 -3
  105. package/dist/Shared/Components/AppStatusModal/AppStatusModal.component.d.ts +0 -3
  106. package/dist/Shared/Components/AppStatusModal/AppStatusModalTabList.d.ts +0 -3
  107. package/dist/Shared/Components/AppStatusModal/constants.d.ts +0 -4
  108. package/dist/Shared/Components/AppStatusModal/index.d.ts +0 -3
  109. package/dist/Shared/Components/AppStatusModal/service.d.ts +0 -4
  110. package/dist/Shared/Components/AppStatusModal/types.d.ts +0 -84
  111. package/dist/Shared/Components/AppStatusModal/utils.d.ts +0 -8
  112. package/dist/Shared/Components/DeploymentStatusBreakdown/constants.d.ts +0 -10
  113. package/dist/Shared/Components/DeploymentStatusBreakdown/index.d.ts +0 -3
  114. package/dist/Shared/Components/DeploymentStatusBreakdown/types.d.ts +0 -22
  115. package/dist/Shared/Components/DeploymentStatusBreakdown/utils.d.ts +0 -20
  116. package/dist/Shared/Components/Header/HeaderWithCreateButton/types.d.ts +0 -10
  117. package/dist/Shared/Components/Header/HeaderWithCreateButton/utils.d.ts +0 -2
  118. package/dist/Shared/Components/Header/HelpButton.d.ts +0 -2
  119. package/dist/Shared/Components/LoginBanner/Testimonials.components.d.ts +0 -3
  120. package/dist/Shared/Components/Popover/Popover.component.d.ts +0 -8
  121. package/dist/Shared/Components/Popover/index.d.ts +0 -3
  122. package/dist/Shared/Components/Popover/types.d.ts +0 -105
  123. package/dist/Shared/Components/Popover/usePopover.hook.d.ts +0 -2
  124. package/dist/Shared/Components/Popover/utils.d.ts +0 -92
  125. package/dist/assets/@code-editor.css +0 -1
  126. package/dist/assets/ic-amazon-eks.13404569.svg +0 -5
  127. package/dist/assets/ic-arrow-square-out.59bb549a.svg +0 -3
  128. package/dist/assets/ic-azure-aks.a9e437d5.svg +0 -46
  129. package/dist/assets/ic-bulk-check.0f698efa.svg +0 -21
  130. package/dist/assets/ic-bulk-check.99e92f7a.svg +0 -21
  131. package/dist/assets/ic-caret-right.0ff813c2.svg +0 -3
  132. package/dist/assets/ic-celebration.77350694.svg +0 -238
  133. package/dist/assets/ic-chat-circle-online.51348da5.svg +0 -4
  134. package/dist/assets/ic-checkbox-intermediate.24c6d21d.svg +0 -22
  135. package/dist/assets/ic-checkbox-intermediate.2a2d6c49.svg +0 -22
  136. package/dist/assets/ic-checkbox-selected.47444fab.svg +0 -20
  137. package/dist/assets/ic-checkbox-unselected.8054e3d7.svg +0 -19
  138. package/dist/assets/ic-cloud-vms.27ea954e.svg +0 -5
  139. package/dist/assets/ic-cluster.71ba9e26.svg +0 -3
  140. package/dist/assets/ic-delete-dots.5380e0d0.svg +0 -62
  141. package/dist/assets/ic-disconnect.2ad261fc.svg +0 -3
  142. package/dist/assets/ic-discord-fill.103b579a.svg +0 -3
  143. package/dist/assets/ic-edit.3249ed32.svg +0 -3
  144. package/dist/assets/ic-enterprise-feat.5ee25d5b.svg +0 -3
  145. package/dist/assets/ic-enterprise-tag.209dd129.svg +0 -43
  146. package/dist/assets/ic-expand-right-sm.9b347d49.svg +0 -3
  147. package/dist/assets/ic-expand-sm.a9a724f8.svg +0 -3
  148. package/dist/assets/ic-file-edit.96a172c7.svg +0 -3
  149. package/dist/assets/ic-file.c3c45e13.svg +0 -3
  150. package/dist/assets/ic-files.b0ebea46.svg +0 -3
  151. package/dist/assets/ic-gift-gradient.7690a246.svg +0 -9
  152. package/dist/assets/ic-gift.9b048fc7.svg +0 -3
  153. package/dist/assets/ic-gitlab.ac331d67.svg +0 -31
  154. package/dist/assets/ic-google-gke.07314724.svg +0 -9
  155. package/dist/assets/ic-install.28c3beec.svg +0 -3
  156. package/dist/assets/ic-k3s.7f4bf72d.svg +0 -3
  157. package/dist/assets/ic-kind.bd8ee992.svg +0 -9
  158. package/dist/assets/ic-laptop.485e21b4.svg +0 -3
  159. package/dist/assets/ic-man-on-rocket.7f67e914.svg +0 -94
  160. package/dist/assets/ic-megaphone-left.6b2a00b7.svg +0 -3
  161. package/dist/assets/ic-megaphone-right.9d6bcd36.svg +0 -3
  162. package/dist/assets/ic-minikube.d9ff1575.svg +0 -9
  163. package/dist/assets/ic-mobile.7c649251.svg +0 -4
  164. package/dist/assets/ic-path.d4fef3b0.svg +0 -3
  165. package/dist/assets/ic-sparkle-color.01c0be88.svg +0 -1
  166. package/dist/assets/ic-ubuntu.fa47508f.svg +0 -4
  167. package/dist/assets/ic-user-circle.7d7152fa.svg +0 -3
  168. package/dist/assets/ic-wifi-slash.d0390749.svg +0 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "1.13.0-pre-6",
3
+ "version": "1.13.0-redfish-preview-beta-1",
4
4
  "description": "Supporting common component library",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,617 +0,0 @@
1
- import { j as n, au as y, aw as k, av as W } from "./@vendor-D9q4wrnL.js";
2
- import V, { forwardRef as J, useMemo as P } from "react";
3
- import K, { getDefaultRegistry as q } from "@rjsf/core";
4
- import { T as F, j as N, c as v, b as S, a as Y, i as z, d as w, e as E, S as G } from "./@code-editor-DDIbDgoG.js";
5
- import Q, { components as D } from "react-select";
6
- import { ReactComponent as X } from "./assets/ic-chevron-down.fc70d7a7.svg";
7
- import { getUiOptions as B, getTemplate as $, getSubmitButtonOptions as Z, ADDITIONAL_PROPERTY_FLAG as L, errorId as ee, englishStringTranslator as te, TranslatableString as ne, titleId as re, canExpand as se, deepEquals as ae } from "@rjsf/utils";
8
- import { ReactComponent as oe } from "./assets/ic-add.cfaa779b.svg";
9
- import { ReactComponent as ie } from "./assets/ic-cross.01e03666.svg";
10
- import { ReactComponent as le } from "./assets/ic-warning.ecf7ff97.svg";
11
- import './assets/@common-rjsf.css';const O = {
12
- SELECT: "Please select an option",
13
- INPUT: "Please enter an input",
14
- OBJECT_KEY: "Please enter a value for the key"
15
- }, ce = "Key not available", Je = {
16
- "ui:submitButtonOptions": {
17
- norender: !0
18
- }
19
- }, de = ({
20
- children: e,
21
- disabled: t,
22
- hasToolbar: s,
23
- hasRemove: r,
24
- index: a,
25
- onDropIndexClick: i,
26
- readonly: l,
27
- registry: o,
28
- uiSchema: c
29
- }) => {
30
- const { RemoveButton: d } = o.templates.ButtonTemplates;
31
- return /* @__PURE__ */ n.jsxs("div", { className: "dc__position-rel display-grid rjsf-form-template__array-field-item flex-align-center", children: [
32
- e,
33
- /* @__PURE__ */ n.jsx("div", { className: "dc__position-abs remove-btn__container", style: { right: "-28px", top: "9px" }, children: s && r && /* @__PURE__ */ n.jsx(
34
- d,
35
- {
36
- disabled: t || l,
37
- onClick: i(a),
38
- uiSchema: c,
39
- registry: o
40
- }
41
- ) })
42
- ] });
43
- }, T = ({
44
- showLabel: e,
45
- label: t,
46
- required: s,
47
- children: r,
48
- id: a,
49
- rawDescription: i,
50
- shouldAlignCenter: l = !0
51
- }) => /* @__PURE__ */ n.jsxs(
52
- "div",
53
- {
54
- className: e ? `display-grid dc__gap-12 rjsf-form-template__field ${l ? "flex-align-center" : ""}` : "",
55
- children: [
56
- e && /* @__PURE__ */ n.jsxs("label", { className: "cn-7 fs-13 lh-20 fw-4 flexbox mb-0", htmlFor: a, children: [
57
- /* @__PURE__ */ n.jsx(F, { alwaysShowTippyOnHover: !!i, content: i, children: /* @__PURE__ */ n.jsx("span", { className: `dc__ellipsis-right ${i ? "text-underline-dashed-300" : ""}`, children: t || ce }) }),
58
- s && /* @__PURE__ */ n.jsx("span", { className: "cr-5", children: " *" })
59
- ] }),
60
- r
61
- ]
62
- }
63
- ), A = ({ label: e, canAdd: t, onAddClick: s, disabled: r, readonly: a, uiSchema: i, registry: l }) => {
64
- const {
65
- ButtonTemplates: { AddButton: o }
66
- } = l.templates;
67
- return t && /* @__PURE__ */ n.jsx(
68
- o,
69
- {
70
- label: e,
71
- onClick: s,
72
- disabled: r || a,
73
- uiSchema: i,
74
- registry: l
75
- }
76
- );
77
- }, ue = ({
78
- canAdd: e,
79
- className: t,
80
- disabled: s,
81
- idSchema: r,
82
- uiSchema: a,
83
- items: i,
84
- onAddClick: l,
85
- readonly: o,
86
- registry: c,
87
- required: d,
88
- title: x
89
- }) => {
90
- const u = B(a), f = $("ArrayFieldItemTemplate", c, u), p = u.title || x;
91
- return /* @__PURE__ */ n.jsx("fieldset", { className: t, id: r.$id, children: i.length ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
92
- i.map(({ key: j, ..._ }, h) => {
93
- const m = {
94
- ..._.children,
95
- props: {
96
- ..._.children.props
97
- }
98
- };
99
- return /* @__PURE__ */ n.jsx(f, { ..._, children: m }, j);
100
- }),
101
- /* @__PURE__ */ n.jsx(
102
- A,
103
- {
104
- label: p,
105
- canAdd: e,
106
- onAddClick: l,
107
- disabled: s,
108
- readonly: o,
109
- uiSchema: a,
110
- registry: c
111
- }
112
- )
113
- ] }) : /* @__PURE__ */ n.jsx(T, { label: p, required: d, showLabel: !0, id: r.$id, children: /* @__PURE__ */ n.jsx(
114
- A,
115
- {
116
- label: p,
117
- canAdd: e,
118
- onAddClick: l,
119
- disabled: s,
120
- readonly: o,
121
- uiSchema: a,
122
- registry: c
123
- }
124
- ) }) });
125
- }, {
126
- templates: { BaseInputTemplate: me }
127
- } = q(), pe = ({ placeholder: e, ...t }) => /* @__PURE__ */ n.jsx(
128
- me,
129
- {
130
- placeholder: e || O.INPUT,
131
- ...t,
132
- className: "form__input cn-9 fs-13 lh-20 fw-4"
133
- }
134
- ), U = ({
135
- label: e,
136
- icon: t,
137
- iconType: s,
138
- registry: r,
139
- uiSchema: a,
140
- ...i
141
- }) => {
142
- const l = `Add ${e}`;
143
- return /* @__PURE__ */ n.jsx("div", { className: "flexbox flex-justify-start", children: /* @__PURE__ */ n.jsxs(
144
- "button",
145
- {
146
- ...i,
147
- type: "button",
148
- className: "dc__outline-none-imp p-0 dc__transparent flex dc__gap-4 cursor dc__mxw-250",
149
- title: "Add",
150
- children: [
151
- /* @__PURE__ */ n.jsx(oe, { className: "icon-dim-16 fcb-5" }),
152
- /* @__PURE__ */ n.jsx(F, { placement: "right", content: l, children: /* @__PURE__ */ n.jsx("span", { className: "cb-5 fs-13 lh-34 dc__truncate", children: l }) })
153
- ]
154
- }
155
- ) });
156
- }, fe = ({ icon: e, iconType: t, registry: s, uiSchema: r, ...a }) => /* @__PURE__ */ n.jsx("button", { ...a, type: "button", className: "dc__outline-none-imp p-0 dc__transparent flex cursor", title: "Remove", children: /* @__PURE__ */ n.jsx(ie, { className: "icon-dim-16 fcn-6" }) }), he = ({ uiSchema: e }) => {
157
- const { submitText: t, norender: s, props: r = {} } = Z(e);
158
- return s ? null : /* @__PURE__ */ n.jsx("div", { className: "flexbox flex-justify-end", children: /* @__PURE__ */ n.jsx("button", { type: "submit", ...r, className: `cta ${r.className || ""}`, children: t }) });
159
- }, C = ({
160
- id: e,
161
- title: t,
162
- required: s,
163
- description: r
164
- }) => /* @__PURE__ */ n.jsxs("legend", { className: "fs-13 fw-6 cn-9 lh-20 dc__no-border pb-9 mb-0", id: e, children: [
165
- /* @__PURE__ */ n.jsx(F, { alwaysShowTippyOnHover: !!r, content: r, children: /* @__PURE__ */ n.jsx("span", { className: `${r ? "text-underline-dashed-300" : ""}`, children: t }) }),
166
- s && /* @__PURE__ */ n.jsx("span", { className: "cr-5", children: " *" })
167
- ] }), xe = (e) => {
168
- const {
169
- id: t,
170
- label: s,
171
- children: r,
172
- errors: a,
173
- hidden: i,
174
- required: l,
175
- displayLabel: o,
176
- registry: c,
177
- uiSchema: d,
178
- classNames: x,
179
- schema: u,
180
- rawDescription: f
181
- } = e, p = B(d), j = $(
182
- "WrapIfAdditionalTemplate",
183
- c,
184
- p
185
- ), _ = L in u, h = (o || u.type === "boolean") && !_, m = u.type === "array";
186
- return i ? /* @__PURE__ */ n.jsx("div", { className: "hidden", children: r }) : (
187
- // NOTE: need to override the margins of default rjsf css
188
- /* @__PURE__ */ n.jsxs("div", { className: `${x} mb-0`, children: [
189
- m && /* @__PURE__ */ n.jsx(
190
- C,
191
- {
192
- id: t,
193
- title: s,
194
- required: l,
195
- registry: c,
196
- uiSchema: d,
197
- schema: u,
198
- description: f
199
- }
200
- ),
201
- /* @__PURE__ */ n.jsx(
202
- T,
203
- {
204
- label: s,
205
- showLabel: h,
206
- id: t,
207
- required: l,
208
- rawDescription: f,
209
- children: /* @__PURE__ */ n.jsx(j, { ...e, children: r })
210
- }
211
- ),
212
- a
213
- ] })
214
- );
215
- }, je = ({ errors: e = [], idSchema: t }) => {
216
- const s = ee(t);
217
- return e.length > 0 && /* @__PURE__ */ n.jsx("span", { className: "display-grid rjsf-form-template__field--error dc__gap-12", id: s, children: e.filter((r) => !!r).map((r, a) => /* @__PURE__ */ n.jsxs(V.Fragment, { children: [
218
- /* @__PURE__ */ n.jsx("span", {}),
219
- /* @__PURE__ */ n.jsxs("span", { className: "form__error", children: [
220
- /* @__PURE__ */ n.jsx(le, { className: "form__icon form__icon--error" }),
221
- r
222
- ] })
223
- ] }, a)) });
224
- }, _e = (e, t) => {
225
- switch (e) {
226
- case ne.NewStringDefault:
227
- return "";
228
- default:
229
- return te(e, t);
230
- }
231
- }, Ke = (e) => {
232
- try {
233
- const t = new URL(e).origin === window.location.origin;
234
- return {
235
- href: e,
236
- target: t ? "_self" : "_blank",
237
- rel: t ? void 0 : "external noreferrer",
238
- url: e
239
- };
240
- } catch {
241
- return {
242
- href: e,
243
- target: "_blank",
244
- url: `${e} (Invalid URL)`
245
- };
246
- }
247
- }, qe = (e) => {
248
- const t = typeof e;
249
- switch (t) {
250
- case "boolean":
251
- case "string":
252
- case "number":
253
- return t;
254
- case "object":
255
- return Array.isArray(e) ? "array" : e === null ? "null" : t;
256
- default:
257
- return "null";
258
- }
259
- }, b = (e) => {
260
- if (!e)
261
- return "";
262
- const t = e.trim(), r = (/^\/.+$/g.test(t) ? t : `/${t}`).replaceAll(/\./g, "/");
263
- return /(\/(([^/~])|(~[01]))*)/g.test(r) ? r : "";
264
- }, R = {
265
- value: !1,
266
- path: ""
267
- }, ge = (e) => {
268
- if (!e)
269
- return null;
270
- const t = structuredClone(e);
271
- return typeof t == "string" ? {
272
- value: !0,
273
- path: b(t)
274
- } : typeof t != "object" ? structuredClone(R) : Object.hasOwn(t, "condition") && "condition" in t && Object.hasOwn(t, "value") && "value" in t ? {
275
- value: t.condition,
276
- path: b(t.value)
277
- } : Object.hasOwn(t, "value") && "value" in t && Object.hasOwn(t, "path") && "path" in t ? {
278
- value: t.value,
279
- path: b(t.path)
280
- } : structuredClone(R);
281
- }, H = (e, t, s) => {
282
- e && (e.type === "object" && e.properties && typeof e.properties == "object" && Object.entries(e.properties).forEach(([r, a]) => {
283
- H(a, `${t}/${r}`, s);
284
- }), (e.type === "boolean" || e.type === "string" || e.type === "number" || e.type === "integer") && (s[t] = b(e.updatePath ?? t)));
285
- }, be = (e) => {
286
- const t = {};
287
- return H(e, "", t), t;
288
- }, M = (e, t, s) => {
289
- if (t >= s.length)
290
- return e;
291
- const r = s[t];
292
- if (t === s.length - 1) {
293
- const a = structuredClone(e);
294
- return delete a[r], a;
295
- }
296
- if (e[r] && (e[r] = M(e[r], t + 1, s)), Object.keys(e[r] ?? {}).length === 0) {
297
- const a = structuredClone(e);
298
- return delete a[r], a;
299
- }
300
- return e;
301
- }, ye = (e, t) => {
302
- if (!e || typeof e != "object" || Array.isArray(e))
303
- throw new Error("Invalid object");
304
- if (!t || !t.startsWith("/"))
305
- throw new Error("Invalid path");
306
- const s = t.split("/").slice(1);
307
- return M(e, 0, s);
308
- }, I = ({
309
- formState: e,
310
- formData: t,
311
- schemaPathToUpdatePathMap: s
312
- }) => {
313
- let r = structuredClone(e);
314
- return r && (Object.entries(s).forEach(([a, i]) => {
315
- if (a === i || !i)
316
- return;
317
- const l = y({
318
- json: t,
319
- path: v(a),
320
- resultType: "value",
321
- wrap: !1
322
- });
323
- l === void 0 ? r = ye(r, a) : r = N([S(a, l), r]);
324
- const o = y({
325
- json: e,
326
- path: v(a),
327
- resultType: "value",
328
- wrap: !1
329
- });
330
- o !== void 0 && (r = N([S(i, o), r]));
331
- }), t && r ? k(t, W(t, r), !1, !1).newDocument : r);
332
- }, ve = ({ formData: e, schemaPathToUpdatePathMap: t }) => N([
333
- ...Object.entries(t).map(([s, r]) => {
334
- if (s === r || !r)
335
- return {};
336
- const a = y({
337
- json: e,
338
- path: v(r),
339
- resultType: "value",
340
- wrap: !1
341
- });
342
- return a === void 0 ? {} : S(s, a);
343
- }),
344
- structuredClone(e)
345
- ]), Te = ({
346
- disabled: e,
347
- formData: t,
348
- idSchema: s,
349
- onAddClick: r,
350
- properties: a,
351
- readonly: i,
352
- registry: l,
353
- required: o,
354
- schema: c,
355
- title: d,
356
- uiSchema: x,
357
- formContext: u
358
- }) => {
359
- const f = !!c.additionalProperties, p = se(c, x, t) && /* @__PURE__ */ n.jsx(
360
- U,
361
- {
362
- label: d,
363
- className: "object-property-expand",
364
- onClick: r(c),
365
- disabled: e || i,
366
- uiSchema: x,
367
- registry: l
368
- }
369
- ), j = a.filter((_) => {
370
- const h = c.properties?.[_.name]?.hidden;
371
- if (!h)
372
- return !0;
373
- try {
374
- const m = ge(h);
375
- if (!m.path)
376
- throw new Error("Empty path property of hidden descriptor field");
377
- const g = y({
378
- path: v(m.path),
379
- json: u,
380
- resultType: "value",
381
- wrap: !1
382
- });
383
- return !(g === void 0 || ae(m.value, g));
384
- } catch {
385
- return !0;
386
- }
387
- }).map((_) => _.content);
388
- return f ? a.length ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
389
- /* @__PURE__ */ n.jsx(
390
- T,
391
- {
392
- label: d,
393
- required: o,
394
- showLabel: !0,
395
- id: s.$id,
396
- shouldAlignCenter: !1,
397
- children: /* @__PURE__ */ n.jsx("div", { children: j })
398
- }
399
- ),
400
- p
401
- ] }) : /* @__PURE__ */ n.jsx(T, { label: d, required: o, showLabel: !0, id: s.$id, children: p }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
402
- j,
403
- p
404
- ] });
405
- }, we = (e) => {
406
- const { idSchema: t, registry: s, required: r, schema: a, title: i, uiSchema: l, description: o } = e, c = !!a.additionalProperties, d = i && !c;
407
- return /* @__PURE__ */ n.jsxs("fieldset", { id: t.$id, children: [
408
- d && /* @__PURE__ */ n.jsx(
409
- C,
410
- {
411
- id: re(t),
412
- title: i,
413
- required: r,
414
- schema: a,
415
- uiSchema: l,
416
- registry: s,
417
- description: o
418
- }
419
- ),
420
- /* @__PURE__ */ n.jsx(
421
- "div",
422
- {
423
- className: `${a.properties && !c && t.$id !== "root" ? "dc__border-left pl-12" : ""} ${t.$id === "root" ? "dc__separated-flexbox dc__separated-flexbox--vertical" : "flexbox-col dc__gap-8"}`,
424
- children: /* @__PURE__ */ n.jsx(Te, { ...e })
425
- }
426
- )
427
- ] });
428
- }, Ne = ({
429
- id: e,
430
- disabled: t,
431
- label: s,
432
- onKeyChange: r,
433
- onDropPropertyClick: a,
434
- readonly: i,
435
- schema: l,
436
- children: o,
437
- uiSchema: c,
438
- registry: d
439
- }) => {
440
- const { templates: x } = d, { RemoveButton: u } = x.ButtonTemplates, f = L in l;
441
- return /* @__PURE__ */ n.jsx(n.Fragment, { children: f ? /* @__PURE__ */ n.jsxs("div", { className: "dc__position-rel rjsf-form-template__additional-fields display-grid dc__gap-8 flex-align-center", children: [
442
- /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(
443
- "input",
444
- {
445
- type: "text",
446
- className: "form__input cn-9 fs-13 lh-20 fw-4",
447
- id: `${e}-key`,
448
- onBlur: (p) => r(p.target.value),
449
- placeholder: O.OBJECT_KEY,
450
- defaultValue: s
451
- }
452
- ) }),
453
- /* @__PURE__ */ n.jsx("div", { children: o }),
454
- /* @__PURE__ */ n.jsx("div", { className: "dc__position-abs remove-btn__container", style: { right: "-28px", top: "9px" }, children: /* @__PURE__ */ n.jsx(
455
- u,
456
- {
457
- disabled: t || i,
458
- onClick: a(s),
459
- uiSchema: c,
460
- registry: d
461
- }
462
- ) })
463
- ] }) : o });
464
- }, Se = ({
465
- id: e,
466
- onChange: t,
467
- value: s,
468
- required: r,
469
- disabled: a,
470
- readonly: i,
471
- autofocus: l,
472
- onBlur: o,
473
- onFocus: c
474
- }) => {
475
- const d = (u, f) => {
476
- const { id: p, checked: j } = u.target;
477
- f === "blur" ? o(p, j) : f === "focus" && c(p, j);
478
- }, x = z(s) ? !1 : s;
479
- return /* @__PURE__ */ n.jsxs("div", { children: [
480
- /* @__PURE__ */ n.jsx(
481
- Y,
482
- {
483
- selected: x,
484
- onSelect: t,
485
- id: e,
486
- name: e,
487
- required: r,
488
- disabled: a || i,
489
- autoFocus: l,
490
- rootClassName: "w-32 mb-0 dc__height-inherit",
491
- onBlur: (u) => d(u, "blur"),
492
- onFocus: (u) => d(u, "focus")
493
- }
494
- ),
495
- /* @__PURE__ */ n.jsx("span", { className: "dc__capitalize ml-8", children: x.toString() })
496
- ] });
497
- }, Fe = ({ children: e, ...t }) => /* @__PURE__ */ n.jsx(D.MenuList, { ...t, children: Array.isArray(e) ? e.slice(0, 20) : e }), Oe = (e) => /* @__PURE__ */ n.jsx(D.DropdownIndicator, { ...e, children: /* @__PURE__ */ n.jsx(X, { className: "icon-dim-20 icon-n5", "data-testid": "overview-project-edit-dropdown" }) }), Ce = (e) => {
498
- const {
499
- id: t,
500
- multiple: s = !1,
501
- options: r,
502
- value: a,
503
- disabled: i,
504
- readonly: l,
505
- autofocus: o = !1,
506
- onChange: c,
507
- onBlur: d,
508
- onFocus: x,
509
- placeholder: u
510
- } = e, { enumOptions: f = [] } = r, p = s ? [] : "", j = (h) => {
511
- c(s ? h.map((m) => m.value) : h.value);
512
- }, _ = (h) => s ? f.filter((m) => h.some((g) => E(g, m.value))) : f.find((m) => E(h, m.value));
513
- return /* @__PURE__ */ n.jsx(
514
- Q,
515
- {
516
- id: t,
517
- name: t,
518
- isMulti: s,
519
- value: typeof a > "u" ? p : _(a),
520
- autoFocus: o,
521
- onChange: j,
522
- options: f,
523
- onBlur: () => d(t, a),
524
- onFocus: () => x(t, a),
525
- placeholder: u || O.SELECT,
526
- isDisabled: i || l,
527
- styles: {
528
- ...w,
529
- control: (h, m) => ({
530
- ...w.control(h, m),
531
- minHeight: "36px"
532
- }),
533
- multiValue: (h, m) => ({
534
- ...w.multiValue(h, m),
535
- margin: "2px 8px 2px 2px"
536
- })
537
- },
538
- components: {
539
- IndicatorSeparator: null,
540
- DropdownIndicator: Oe,
541
- MenuList: Fe
542
- },
543
- menuPlacement: "auto"
544
- }
545
- );
546
- }, Pe = {
547
- CheckboxWidget: Se,
548
- SelectWidget: Ce
549
- }, Ee = {
550
- ArrayFieldItemTemplate: de,
551
- ArrayFieldTemplate: ue,
552
- BaseInputTemplate: pe,
553
- ButtonTemplates: { AddButton: U, RemoveButton: fe, SubmitButton: he },
554
- FieldTemplate: xe,
555
- FieldErrorTemplate: je,
556
- ObjectFieldTemplate: we,
557
- TitleFieldTemplate: C,
558
- WrapIfAdditionalTemplate: Ne
559
- }, Ae = K, Re = G, Ye = J((e, t) => {
560
- const { schemaPathToUpdatePathMap: s, isUpdatePathKeywordPresent: r } = P(() => {
561
- const o = be(e.schema);
562
- return {
563
- schemaPathToUpdatePathMap: o,
564
- isUpdatePathKeywordPresent: Object.entries(o).some(([c, d]) => c !== d)
565
- };
566
- }, [e.schema]), a = P(() => r ? ve({ formData: e.formData ?? {}, schemaPathToUpdatePathMap: s }) : e.formData, [e.formData, s, r]), i = (o) => {
567
- if (!e.onChange)
568
- return;
569
- const c = I({
570
- formState: o.formData,
571
- formData: e.formData,
572
- schemaPathToUpdatePathMap: s
573
- });
574
- e.onChange({ ...o, formData: c });
575
- }, l = (o, c) => {
576
- if (!e.onSubmit)
577
- return;
578
- const d = I({
579
- formState: o.formData,
580
- formData: e.formData,
581
- schemaPathToUpdatePathMap: s
582
- });
583
- e.onSubmit?.({ ...o, formData: d }, c);
584
- };
585
- return /* @__PURE__ */ n.jsx(
586
- Ae,
587
- {
588
- noHtml5Validate: !0,
589
- showErrorList: !1,
590
- autoComplete: "off",
591
- ...e,
592
- formData: a,
593
- ...r ? {
594
- onChange: i,
595
- onSubmit: l
596
- } : {},
597
- className: `rjsf-form-template__container ${e.className || ""}`,
598
- validator: Re,
599
- templates: {
600
- ...Ee,
601
- ...e.templates
602
- },
603
- formContext: a,
604
- widgets: { ...Pe, ...e.widgets },
605
- translateString: _e,
606
- ref: t
607
- }
608
- );
609
- });
610
- export {
611
- Je as H,
612
- Ye as R,
613
- Ke as a,
614
- be as b,
615
- b as c,
616
- qe as g
617
- };
@@ -1,2 +0,0 @@
1
- import { CheckboxProps } from '../Types';
2
- export declare const Checkbox: ({ rootClassName, onClick, name, disabled, value, onChange, tabIndex, isChecked, id, dataTestId, children, }: CheckboxProps) => JSX.Element;
@@ -1 +0,0 @@
1
- export * from './Checkbox';
@@ -1 +0,0 @@
1
- export * from './Drawer';
@@ -1,2 +0,0 @@
1
- export { default as GenericEmptyState } from './GenericEmptyState';
2
- export { default as GenericFilterEmptyState } from './GenericFilterEmptyState';
@@ -1 +0,0 @@
1
- export type { NewClusterFormFooterProps, NewClusterFormProps } from './types';
@@ -1,8 +0,0 @@
1
- export interface NewClusterFormFooterProps {
2
- apiCallInProgress: boolean;
3
- handleModalClose: () => void;
4
- closeButtonText?: string;
5
- }
6
- export interface NewClusterFormProps extends Pick<NewClusterFormFooterProps, 'handleModalClose'> {
7
- FooterComponent: React.FunctionComponent<NewClusterFormFooterProps> & Record<'CTA' | 'Start', React.FunctionComponent<{}>>;
8
- }
@@ -1,2 +0,0 @@
1
- import { ActionMenuItemProps } from './types';
2
- export declare const ActionMenuItem: <T extends string | number>({ item, itemRef, isFocused, onClick, onMouseEnter, disableDescriptionEllipsis, }: ActionMenuItemProps<T>) => JSX.Element;