@devtron-labs/devtron-fe-common-lib 1.6.13 → 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-BR2fcwFa.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
  };
@@ -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;