@devtron-labs/devtron-fe-common-lib 1.6.13-beta-5 → 1.6.14

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.
@@ -1,10 +1,10 @@
1
- import { j as t, O as E } from "./@vendor-CWh7bjwl.js";
2
- import P, { forwardRef as $ } from "react";
1
+ import { j as t, O as P } from "./@vendor-CWh7bjwl.js";
2
+ import R, { forwardRef as $ } from "react";
3
3
  import L, { getDefaultRegistry as D } from "@rjsf/core";
4
- import { T as v, c as H, a as U, i as k, b as T, d as S, S as M } from "./@code-editor-D-iQEeTd.js";
5
- import J, { components as C } from "react-select";
4
+ import { T as v, c as H, a as U, i as k, b as y, d as S, S as M } from "./@code-editor-DZHMo1tR.js";
5
+ import J, { components as A } from "react-select";
6
6
  import { ReactComponent as V } from "./assets/ic-chevron-down.fc70d7a7.svg";
7
- import { getUiOptions as A, getTemplate as I, getSubmitButtonOptions as W, ADDITIONAL_PROPERTY_FLAG as B, errorId as q, englishStringTranslator as K, TranslatableString as Y, titleId as z, canExpand as G, deepEquals as Q } from "@rjsf/utils";
7
+ import { getUiOptions as C, getTemplate as B, getSubmitButtonOptions as W, ADDITIONAL_PROPERTY_FLAG as I, errorId as q, englishStringTranslator as K, TranslatableString as Y, titleId as z, canExpand as G, deepEquals as Q } from "@rjsf/utils";
8
8
  import { ReactComponent as X } from "./assets/ic-add.cfaa779b.svg";
9
9
  import { ReactComponent as Z } from "./assets/ic-cross.01e03666.svg";
10
10
  import { ReactComponent as ee } from "./assets/ic-warning.a842ba2a.svg";
@@ -12,7 +12,7 @@ import './assets/@common-rjsf.css';const N = {
12
12
  SELECT: "Please select an option",
13
13
  INPUT: "Please enter an input",
14
14
  OBJECT_KEY: "Please enter a value for the key"
15
- }, te = "Key not available", Ee = {
15
+ }, te = "Key not available", Pe = {
16
16
  "ui:submitButtonOptions": {
17
17
  norender: !0
18
18
  }
@@ -63,7 +63,7 @@ import './assets/@common-rjsf.css';const N = {
63
63
  required: d,
64
64
  title: x
65
65
  }) => {
66
- const p = A(r), h = I("ArrayFieldItemTemplate", l, p), u = p.title || x;
66
+ const p = C(r), h = B("ArrayFieldItemTemplate", l, p), u = p.title || x;
67
67
  return /* @__PURE__ */ t.jsx("fieldset", { className: e, id: a.$id, children: o.length ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
68
68
  o.map(({ key: j, ..._ }, f) => {
69
69
  const m = {
@@ -131,7 +131,7 @@ import './assets/@common-rjsf.css';const N = {
131
131
  ...e,
132
132
  className: "form__input cn-9 fs-13 lh-20 fw-4"
133
133
  }
134
- ), R = ({
134
+ ), E = ({
135
135
  label: n,
136
136
  icon: e,
137
137
  iconType: s,
@@ -178,11 +178,11 @@ import './assets/@common-rjsf.css';const N = {
178
178
  classNames: x,
179
179
  schema: p,
180
180
  rawDescription: h
181
- } = n, u = A(d), j = I(
181
+ } = n, u = C(d), j = B(
182
182
  "WrapIfAdditionalTemplate",
183
183
  l,
184
184
  u
185
- ), _ = B in p, f = (c || p.type === "boolean") && !_, m = p.type === "array";
185
+ ), _ = I in p, f = (c || p.type === "boolean") && !_, m = p.type === "array";
186
186
  return o ? /* @__PURE__ */ t.jsx("div", { className: "hidden", children: a }) : (
187
187
  // NOTE: need to override the margins of default rjsf css
188
188
  /* @__PURE__ */ t.jsxs("div", { className: `${x} mb-0`, children: [
@@ -214,7 +214,7 @@ import './assets/@common-rjsf.css';const N = {
214
214
  );
215
215
  }, ce = ({ errors: n = [], idSchema: e }) => {
216
216
  const s = q(e);
217
- return n.length > 0 && /* @__PURE__ */ t.jsx("span", { className: "display-grid rjsf-form-template__field--error dc__gap-12", id: s, children: n.filter((a) => !!a).map((a, r) => /* @__PURE__ */ t.jsxs(P.Fragment, { children: [
217
+ return n.length > 0 && /* @__PURE__ */ t.jsx("span", { className: "display-grid rjsf-form-template__field--error dc__gap-12", id: s, children: n.filter((a) => !!a).map((a, r) => /* @__PURE__ */ t.jsxs(R.Fragment, { children: [
218
218
  /* @__PURE__ */ t.jsx("span", {}),
219
219
  /* @__PURE__ */ t.jsxs("span", { className: "form__error", children: [
220
220
  /* @__PURE__ */ t.jsx(ee, { className: "form__icon form__icon--error" }),
@@ -228,7 +228,7 @@ import './assets/@common-rjsf.css';const N = {
228
228
  default:
229
229
  return K(n, e);
230
230
  }
231
- }, Pe = (n) => {
231
+ }, Re = (n) => {
232
232
  try {
233
233
  const e = new URL(n).origin === window.location.origin;
234
234
  return {
@@ -256,7 +256,7 @@ import './assets/@common-rjsf.css';const N = {
256
256
  default:
257
257
  return "null";
258
258
  }
259
- }, y = (n) => {
259
+ }, T = (n) => {
260
260
  if (!n)
261
261
  return "";
262
262
  const e = n.trim();
@@ -270,13 +270,13 @@ import './assets/@common-rjsf.css';const N = {
270
270
  const e = structuredClone(n);
271
271
  return typeof e == "string" ? {
272
272
  value: !0,
273
- path: y(e)
273
+ path: T(e)
274
274
  } : typeof e != "object" ? structuredClone(F) : Object.hasOwn(e, "condition") && "condition" in e && Object.hasOwn(e, "value") && "value" in e ? {
275
275
  value: e.condition,
276
- path: y(e.value)
276
+ path: T(e.value)
277
277
  } : Object.hasOwn(e, "value") && "value" in e && Object.hasOwn(e, "path") && "path" in e ? {
278
278
  value: e.value,
279
- path: y(e.path)
279
+ path: T(e.path)
280
280
  } : structuredClone(F);
281
281
  }, me = ({
282
282
  disabled: n,
@@ -293,7 +293,7 @@ import './assets/@common-rjsf.css';const N = {
293
293
  formContext: p
294
294
  }) => {
295
295
  const h = !!l.additionalProperties, u = G(l, x, e) && /* @__PURE__ */ t.jsx(
296
- R,
296
+ E,
297
297
  {
298
298
  label: d,
299
299
  className: "object-property-expand",
@@ -312,7 +312,7 @@ import './assets/@common-rjsf.css';const N = {
312
312
  throw new Error("Empty path property of hidden descriptor field");
313
313
  if (!m.path.match(/^\/\w+(\/\w+)*$/g))
314
314
  throw new Error("Provided path is not a valid JSON pointer");
315
- const g = E({
315
+ const g = P({
316
316
  path: H(m.path),
317
317
  json: p
318
318
  })?.[0];
@@ -373,7 +373,7 @@ import './assets/@common-rjsf.css';const N = {
373
373
  uiSchema: l,
374
374
  registry: d
375
375
  }) => {
376
- const { templates: x } = d, { RemoveButton: p } = x.ButtonTemplates, h = B in i;
376
+ const { templates: x } = d, { RemoveButton: p } = x.ButtonTemplates, h = I in i;
377
377
  return /* @__PURE__ */ t.jsx(t.Fragment, { children: h ? /* @__PURE__ */ t.jsxs("div", { className: "dc__position-rel rjsf-form-template__additional-fields display-grid dc__gap-8 flex-align-center", children: [
378
378
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
379
379
  "input",
@@ -430,7 +430,7 @@ import './assets/@common-rjsf.css';const N = {
430
430
  ),
431
431
  /* @__PURE__ */ t.jsx("span", { className: "dc__capitalize ml-8", children: x.toString() })
432
432
  ] });
433
- }, xe = ({ children: n, ...e }) => /* @__PURE__ */ t.jsx(C.MenuList, { ...e, children: Array.isArray(n) ? n.slice(0, 20) : n }), _e = (n) => /* @__PURE__ */ t.jsx(C.DropdownIndicator, { ...n, children: /* @__PURE__ */ t.jsx(V, { className: "icon-dim-20 icon-n5", "data-testid": "overview-project-edit-dropdown" }) }), je = (n) => {
433
+ }, xe = ({ children: n, ...e }) => /* @__PURE__ */ t.jsx(A.MenuList, { ...e, children: Array.isArray(n) ? n.slice(0, 20) : n }), _e = (n) => /* @__PURE__ */ t.jsx(A.DropdownIndicator, { ...n, children: /* @__PURE__ */ t.jsx(V, { className: "icon-dim-20 icon-n5", "data-testid": "overview-project-edit-dropdown" }) }), je = (n) => {
434
434
  const {
435
435
  id: e,
436
436
  multiple: s = !1,
@@ -461,13 +461,13 @@ import './assets/@common-rjsf.css';const N = {
461
461
  placeholder: p || N.SELECT,
462
462
  isDisabled: o || i,
463
463
  styles: {
464
- ...T,
464
+ ...y,
465
465
  control: (f, m) => ({
466
- ...T.control(f, m),
466
+ ...y.control(f, m),
467
467
  minHeight: "36px"
468
468
  }),
469
469
  multiValue: (f, m) => ({
470
- ...T.multiValue(f, m),
470
+ ...y.multiValue(f, m),
471
471
  margin: "2px 8px 2px 2px"
472
472
  })
473
473
  },
@@ -486,21 +486,21 @@ import './assets/@common-rjsf.css';const N = {
486
486
  ArrayFieldItemTemplate: se,
487
487
  ArrayFieldTemplate: ne,
488
488
  BaseInputTemplate: re,
489
- ButtonTemplates: { AddButton: R, RemoveButton: oe, SubmitButton: ie },
489
+ ButtonTemplates: { AddButton: E, RemoveButton: oe, SubmitButton: ie },
490
490
  FieldTemplate: le,
491
491
  FieldErrorTemplate: ce,
492
492
  ObjectFieldTemplate: ue,
493
493
  TitleFieldTemplate: w,
494
494
  WrapIfAdditionalTemplate: he
495
- }, Te = L, ye = M, Le = $((n, e) => /* @__PURE__ */ t.jsx(
496
- Te,
495
+ }, ye = L, Te = M, Le = $((n, e) => /* @__PURE__ */ t.jsx(
496
+ ye,
497
497
  {
498
498
  noHtml5Validate: !0,
499
499
  showErrorList: !1,
500
500
  autoComplete: "off",
501
501
  ...n,
502
502
  className: `rjsf-form-template__container ${n.className || ""}`,
503
- validator: ye,
503
+ validator: Te,
504
504
  templates: {
505
505
  ...be,
506
506
  ...n.templates
@@ -512,8 +512,8 @@ import './assets/@common-rjsf.css';const N = {
512
512
  }
513
513
  ));
514
514
  export {
515
- Ee as H,
515
+ Pe as H,
516
516
  Le as R,
517
- Pe as a,
517
+ Re as a,
518
518
  $e as g
519
519
  };
@@ -1,6 +1,3 @@
1
1
  import { InfoColourBarType } from '../Types';
2
- /**
3
- * @deprecated Use InfoBlock instead
4
- */
5
2
  declare const InfoColourBar: ({ message, classname, Icon, iconClass, iconSize, renderActionButton, linkText, redirectLink, linkOnClick, linkClass, internalLink, styles, hideIcon, textConfig, }: InfoColourBarType) => JSX.Element;
6
3
  export default InfoColourBar;
@@ -2,7 +2,7 @@ import { default as React, ReactNode, CSSProperties, ReactElement, MutableRefObj
2
2
  import { TippyProps } from '@tippyjs/react';
3
3
  import { UserGroupDTO } from '../Pages/GlobalConfigurations';
4
4
  import { ImageComment, ReleaseTag } from './ImageTags.Types';
5
- import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity, PolicyBlockInfo, TargetPlatformItemDTO, ComponentLayoutType } from '../Shared';
5
+ import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity, PolicyBlockInfo, TargetPlatformItemDTO } from '../Shared';
6
6
  import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, RefVariableType, SortingOrder, TaskErrorObj, VariableTypeFormat } from '.';
7
7
  /**
8
8
  * Generic response type object with support for overriding the result type
@@ -118,7 +118,7 @@ export interface GenericEmptyStateType {
118
118
  /**
119
119
  * @default 'column'
120
120
  */
121
- layout?: ComponentLayoutType;
121
+ layout?: 'row' | 'column';
122
122
  contentClassName?: string;
123
123
  }
124
124
  export interface ErrorPageType extends Pick<GenericEmptyStateType, 'image' | 'title' | 'subTitle' | 'renderButton' | 'imageType'>, Pick<ErrorScreenManagerProps, 'reload' | 'redirectURL'> {
@@ -1,4 +1,3 @@
1
- import { BorderConfigType, ComponentLayoutType } from '../../types';
2
1
  import { ReactElement, ReactNode } from 'react';
3
2
  export type LabelOrAriaLabelType = {
4
3
  label: ReactNode;
@@ -19,7 +18,7 @@ export type FormFieldLabelProps = LabelOrAriaLabelType & {
19
18
  /**
20
19
  * Layout of the field
21
20
  */
22
- layout?: ComponentLayoutType;
21
+ layout?: 'row' | 'column';
23
22
  };
24
23
  export interface FormFieldInfoProps extends Pick<FormFieldLabelProps, 'inputId'> {
25
24
  /**
@@ -47,5 +46,30 @@ export interface FormFieldWrapperProps extends Pick<FormFieldLabelProps, 'label'
47
46
  */
48
47
  fullWidth?: boolean;
49
48
  children: ReactElement;
50
- borderRadiusConfig?: BorderConfigType;
49
+ borderRadiusConfig?: {
50
+ /**
51
+ * If false, the top border radius is not applied
52
+ *
53
+ * @default true
54
+ */
55
+ top?: boolean;
56
+ /**
57
+ * If false, the right border radius is not applied
58
+ *
59
+ * @default true
60
+ */
61
+ right?: boolean;
62
+ /**
63
+ * If false, the bottom border radius is not applied
64
+ *
65
+ * @default true
66
+ */
67
+ bottom?: boolean;
68
+ /**
69
+ * If false, the left border radius is not applied
70
+ *
71
+ * @default true
72
+ */
73
+ left?: boolean;
74
+ };
51
75
  }
@@ -1,4 +1,4 @@
1
- import { FormFieldInfoProps, FormFieldLabelProps } from './types';
1
+ import { FormFieldInfoProps, FormFieldLabelProps, FormFieldWrapperProps } from './types';
2
2
  export declare const getFormErrorElementId: (inputId: FormFieldLabelProps["inputId"]) => string;
3
3
  export declare const getFormLabelElementId: (inputId: FormFieldLabelProps["inputId"]) => string;
4
4
  export declare const getFormHelperTextElementId: (inputId: FormFieldLabelProps["inputId"]) => string;
@@ -15,3 +15,4 @@ export declare const getFormFieldAriaAttributes: ({ inputId, label, ariaLabel, r
15
15
  'aria-describedby'?: string;
16
16
  'aria-required': boolean;
17
17
  };
18
+ export declare const getFormFieldBorderClassName: (borderRadiusConfig?: FormFieldWrapperProps["borderRadiusConfig"]) => string;
@@ -60,4 +60,3 @@ export * from './ThemeSwitcher';
60
60
  export * from './TargetPlatforms';
61
61
  export * from './UnsavedChanges';
62
62
  export * from './UnsavedChangesDialog';
63
- export * from './InfoBlock';
@@ -4,7 +4,7 @@ import { Pair } from 'yaml';
4
4
  import { StrictRJSFSchema } from '@rjsf/utils';
5
5
  import { MaterialHistoryType } from '@Shared/Services/app.types';
6
6
  import { MaterialInfo, SortingOrder, UserApprovalConfigType, ApprovalConfigDataType, UserApprovalInfo } from '../Common';
7
- import { BorderConfigType, GitTriggers, IntersectionChangeHandler, IntersectionOptions, PreventOutsideFocusProps, TargetPlatformItemDTO, TargetPlatformsDTO, WebhookEventNameType } from './types';
7
+ import { GitTriggers, IntersectionChangeHandler, IntersectionOptions, PreventOutsideFocusProps, TargetPlatformItemDTO, TargetPlatformsDTO, WebhookEventNameType } from './types';
8
8
  import { AggregatedNodes, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, PodMetadatum } from './Components';
9
9
  interface HighlightSearchTextProps {
10
10
  /**
@@ -95,6 +95,4 @@ export declare const checkIfPathIsMatching: (currentPathName: string, customMess
95
95
  export declare const sanitizeTargetPlatforms: (targetPlatforms: TargetPlatformsDTO["targetPlatforms"]) => TargetPlatformItemDTO[];
96
96
  export declare const isAWSCodeCommitURL: (url?: string) => boolean;
97
97
  export declare const renderMaterialIcon: (url?: string) => JSX.Element;
98
- export declare const deriveBorderRadiusClassFromConfig: (borderRadiusConfig?: BorderConfigType) => string;
99
- export declare const deriveBorderClassFromConfig: (borderConfig?: BorderConfigType) => string;
100
98
  export {};
@@ -824,31 +824,4 @@ export declare const TriggerType: {
824
824
  readonly Auto: "AUTOMATIC";
825
825
  readonly Manual: "MANUAL";
826
826
  };
827
- export type ComponentLayoutType = 'row' | 'column';
828
- export interface BorderConfigType {
829
- /**
830
- * If false, (border-radius/border)-top is not applied
831
- *
832
- * @default true
833
- */
834
- top?: boolean;
835
- /**
836
- * If false, (border-radius/border)-right is not applied
837
- *
838
- * @default true
839
- */
840
- right?: boolean;
841
- /**
842
- * If false, (border-radius/border)-bottom is not applied
843
- *
844
- * @default true
845
- */
846
- bottom?: boolean;
847
- /**
848
- * If false, (border-radius/border)-left is not applied
849
- *
850
- * @default true
851
- */
852
- left?: boolean;
853
- }
854
827
  export {};
@@ -49,6 +49,7 @@ export declare const validateSemanticVersioning: (version: string) => Validation
49
49
  */
50
50
  export declare const validateDisplayName: (name: string) => ValidationResponseType;
51
51
  export declare const SCHEMA_07_VALIDATOR_STRICT: import('@rjsf/validator-ajv8/lib/validator').default<any, import('@rjsf/utils').RJSFSchema, any>;
52
+ export declare const SCHEMA_07_VALIDATOR: import('@rjsf/validator-ajv8/lib/validator').default<any, import('@rjsf/utils').RJSFSchema, any>;
52
53
  export declare const doesJSONConformToSchema07: (json: string, strict?: boolean) => ValidationResponseType;
53
54
  export declare const validateDateAndTime: (date: Date) => ValidationResponseType;
54
55
  export declare const validateIframe: (input: string) => ValidationResponseType;