@dovetail-v2/refine 0.3.11-alpha.0 → 0.3.11-alpha.2

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.
@@ -4,7 +4,7 @@ import * as monaco from "monaco-editor";
4
4
  import { setDiagnosticsOptions } from "monaco-yaml";
5
5
  import { useRef, useEffect } from "react";
6
6
  import ReactDOM from "react-dom";
7
- import { Y as YamlEditorStyle } from "./index-b0baca56.js";
7
+ import { Y as YamlEditorStyle } from "./index-2db85ce1.js";
8
8
  import "dayjs";
9
9
  import "i18next";
10
10
  import "@refinedev/core";
@@ -6,7 +6,7 @@ const monaco = require("monaco-editor");
6
6
  const monacoYaml = require("monaco-yaml");
7
7
  const React = require("react");
8
8
  const ReactDOM = require("react-dom");
9
- const refine = require("./index-5f852639.cjs");
9
+ const refine = require("./index-4e942497.cjs");
10
10
  require("dayjs");
11
11
  require("i18next");
12
12
  require("@refinedev/core");
@@ -10468,6 +10468,7 @@ function validateRfc1123Name({
10468
10468
  i18n: i18n2,
10469
10469
  emptyText,
10470
10470
  duplicatedText,
10471
+ maxLength,
10471
10472
  isOptional = false
10472
10473
  }) {
10473
10474
  return validateResourceName({
@@ -10478,6 +10479,7 @@ function validateRfc1123Name({
10478
10479
  duplicatedText,
10479
10480
  regex: Rfc1123NameRegExp,
10480
10481
  formatErrorText: i18n2.t("dovetail.rf1123_name_format_error"),
10482
+ maxLength,
10481
10483
  isOptional
10482
10484
  });
10483
10485
  }
@@ -10487,6 +10489,7 @@ function ValidateRfc1035Name({
10487
10489
  i18n: i18n2,
10488
10490
  emptyText,
10489
10491
  duplicatedText,
10492
+ maxLength,
10490
10493
  isOptional = false
10491
10494
  }) {
10492
10495
  return validateResourceName({
@@ -10497,6 +10500,7 @@ function ValidateRfc1035Name({
10497
10500
  duplicatedText,
10498
10501
  regex: Rfc1035NameRegExp,
10499
10502
  formatErrorText: i18n2.t("dovetail.rf1035_name_format_error"),
10503
+ maxLength,
10500
10504
  isOptional
10501
10505
  });
10502
10506
  }
@@ -10506,6 +10510,7 @@ function validateDnsSubdomainName({
10506
10510
  i18n: i18n2,
10507
10511
  emptyText,
10508
10512
  duplicatedText,
10513
+ maxLength = 253,
10509
10514
  isOptional = false
10510
10515
  }) {
10511
10516
  return validateResourceName({
@@ -10516,7 +10521,7 @@ function validateDnsSubdomainName({
10516
10521
  duplicatedText,
10517
10522
  regex: DnsSubdomainRegExp,
10518
10523
  formatErrorText: i18n2.t("dovetail.dns_subdomain_name_format_error"),
10519
- maxLength: 253,
10524
+ maxLength,
10520
10525
  isOptional
10521
10526
  });
10522
10527
  }
@@ -12982,7 +12987,7 @@ const PodLogTab = (i18n2, apiUrl) => ({
12982
12987
  ]
12983
12988
  });
12984
12989
  const NetworkPolicyRulesViewer_r6jity = "";
12985
- const MonacoYamlEditor$1 = lazy(() => import("./MonacoYamlEditor-abd8cd52.js"));
12990
+ const MonacoYamlEditor$1 = lazy(() => import("./MonacoYamlEditor-3d613ea5.js"));
12986
12991
  const EditorStyle$1 = "e1cjl2b8";
12987
12992
  const NetworkPolicyRulesViewer = ({
12988
12993
  ingressOrEgress,
@@ -15253,7 +15258,7 @@ const PlainCodeStyle = "pqch97v";
15253
15258
  const ErrorMsgStyle = "eh2qjnl";
15254
15259
  const ErrorWrapperStyle = "e19q2bnp";
15255
15260
  const YamlEditorStyle = "y16u5v3w";
15256
- const MonacoYamlEditor = React.lazy(() => import("./MonacoYamlEditor-abd8cd52.js"));
15261
+ const MonacoYamlEditor = React.lazy(() => import("./MonacoYamlEditor-3d613ea5.js"));
15257
15262
  const MonacoYamlDiffEditor = React.lazy(() => import("./MonacoYamlDiffEditor-9232e9fc.js"));
15258
15263
  const YamlEditorComponent = forwardRef(
15259
15264
  function YamlEditorComponent2(props, ref) {
@@ -16229,7 +16234,7 @@ function ConfirmModal({
16229
16234
  });
16230
16235
  }
16231
16236
  function FormModal(props) {
16232
- var _a, _b, _c;
16237
+ var _a, _b, _c, _d;
16233
16238
  const {
16234
16239
  resource: resourceFromProps,
16235
16240
  id,
@@ -16284,11 +16289,11 @@ function FormModal(props) {
16284
16289
  return "";
16285
16290
  }, [isError, id, i18n2]);
16286
16291
  const title = useMemo(() => {
16287
- var _a2, _b2, _c2, _d;
16292
+ var _a2, _b2, _c2, _d2;
16288
16293
  if (typeof ((_a2 = config.formConfig) == null ? void 0 : _a2.formTitle) === "string")
16289
16294
  return (_b2 = config.formConfig) == null ? void 0 : _b2.formTitle;
16290
16295
  if (typeof ((_c2 = config.formConfig) == null ? void 0 : _c2.formTitle) === "function") {
16291
- return (_d = config.formConfig) == null ? void 0 : _d.formTitle(action);
16296
+ return (_d2 = config.formConfig) == null ? void 0 : _d2.formTitle(action);
16292
16297
  }
16293
16298
  const label2 = config.displayName || (config == null ? void 0 : config.kind);
16294
16299
  return i18n2.t(id ? "dovetail.edit_resource" : "dovetail.create_resource", {
@@ -16296,11 +16301,11 @@ function FormModal(props) {
16296
16301
  });
16297
16302
  }, [action, config.formConfig, config.displayName, config == null ? void 0 : config.kind, i18n2, id]);
16298
16303
  const desc = useMemo(() => {
16299
- var _a2, _b2, _c2, _d;
16304
+ var _a2, _b2, _c2, _d2;
16300
16305
  if (typeof ((_a2 = config.formConfig) == null ? void 0 : _a2.formDesc) === "string")
16301
16306
  return (_b2 = config.formConfig) == null ? void 0 : _b2.formDesc;
16302
16307
  if (typeof ((_c2 = config.formConfig) == null ? void 0 : _c2.formDesc) === "function") {
16303
- return (_d = config.formConfig) == null ? void 0 : _d.formDesc(action);
16308
+ return (_d2 = config.formConfig) == null ? void 0 : _d2.formDesc(action);
16304
16309
  }
16305
16310
  return "";
16306
16311
  }, [action, config.formConfig]);
@@ -16387,10 +16392,9 @@ function FormModal(props) {
16387
16392
  onOk,
16388
16393
  okButtonProps: {
16389
16394
  ...omit$1(saveButtonProps, "onClick"),
16390
- children: (_c = config.formConfig) == null ? void 0 : _c.saveButtonText,
16391
- size: "middle"
16395
+ children: (_c = config.formConfig) == null ? void 0 : _c.saveButtonText
16392
16396
  },
16393
- okText,
16397
+ okText: ((_d = config.formConfig) == null ? void 0 : _d.saveButtonText) || okText,
16394
16398
  destroyOnClose: true,
16395
16399
  destroyOtherStep: true,
16396
16400
  ...modalProps,
@@ -17054,7 +17058,11 @@ function SelectMatchLabelButton(props) {
17054
17058
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Popover, {
17055
17059
  trigger: "click",
17056
17060
  visible: popoverVisible,
17057
- onVisibleChange: setPopoverVisible,
17061
+ onVisibleChange: (newPopoverVisible) => {
17062
+ if (disabled)
17063
+ return;
17064
+ setPopoverVisible(newPopoverVisible);
17065
+ },
17058
17066
  overlayClassName: PopoverOverlayStyle,
17059
17067
  content: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
17060
17068
  className: PopoverContentStyle,
@@ -10469,6 +10469,7 @@ function validateRfc1123Name({
10469
10469
  i18n: i18n2,
10470
10470
  emptyText,
10471
10471
  duplicatedText,
10472
+ maxLength,
10472
10473
  isOptional = false
10473
10474
  }) {
10474
10475
  return validateResourceName({
@@ -10479,6 +10480,7 @@ function validateRfc1123Name({
10479
10480
  duplicatedText,
10480
10481
  regex: Rfc1123NameRegExp,
10481
10482
  formatErrorText: i18n2.t("dovetail.rf1123_name_format_error"),
10483
+ maxLength,
10482
10484
  isOptional
10483
10485
  });
10484
10486
  }
@@ -10488,6 +10490,7 @@ function ValidateRfc1035Name({
10488
10490
  i18n: i18n2,
10489
10491
  emptyText,
10490
10492
  duplicatedText,
10493
+ maxLength,
10491
10494
  isOptional = false
10492
10495
  }) {
10493
10496
  return validateResourceName({
@@ -10498,6 +10501,7 @@ function ValidateRfc1035Name({
10498
10501
  duplicatedText,
10499
10502
  regex: Rfc1035NameRegExp,
10500
10503
  formatErrorText: i18n2.t("dovetail.rf1035_name_format_error"),
10504
+ maxLength,
10501
10505
  isOptional
10502
10506
  });
10503
10507
  }
@@ -10507,6 +10511,7 @@ function validateDnsSubdomainName({
10507
10511
  i18n: i18n2,
10508
10512
  emptyText,
10509
10513
  duplicatedText,
10514
+ maxLength = 253,
10510
10515
  isOptional = false
10511
10516
  }) {
10512
10517
  return validateResourceName({
@@ -10517,7 +10522,7 @@ function validateDnsSubdomainName({
10517
10522
  duplicatedText,
10518
10523
  regex: DnsSubdomainRegExp,
10519
10524
  formatErrorText: i18n2.t("dovetail.dns_subdomain_name_format_error"),
10520
- maxLength: 253,
10525
+ maxLength,
10521
10526
  isOptional
10522
10527
  });
10523
10528
  }
@@ -12983,7 +12988,7 @@ const PodLogTab = (i18n2, apiUrl) => ({
12983
12988
  ]
12984
12989
  });
12985
12990
  const NetworkPolicyRulesViewer_r6jity = "";
12986
- const MonacoYamlEditor$1 = React.lazy(() => Promise.resolve().then(() => require("./MonacoYamlEditor-1e515ede.cjs")));
12991
+ const MonacoYamlEditor$1 = React.lazy(() => Promise.resolve().then(() => require("./MonacoYamlEditor-b2219fcd.cjs")));
12987
12992
  const EditorStyle$1 = "e1cjl2b8";
12988
12993
  const NetworkPolicyRulesViewer = ({
12989
12994
  ingressOrEgress,
@@ -15254,7 +15259,7 @@ const PlainCodeStyle = "pqch97v";
15254
15259
  const ErrorMsgStyle = "eh2qjnl";
15255
15260
  const ErrorWrapperStyle = "e19q2bnp";
15256
15261
  const YamlEditorStyle = "y16u5v3w";
15257
- const MonacoYamlEditor = React.lazy(() => Promise.resolve().then(() => require("./MonacoYamlEditor-1e515ede.cjs")));
15262
+ const MonacoYamlEditor = React.lazy(() => Promise.resolve().then(() => require("./MonacoYamlEditor-b2219fcd.cjs")));
15258
15263
  const MonacoYamlDiffEditor = React.lazy(() => Promise.resolve().then(() => require("./MonacoYamlDiffEditor-7a07db88.cjs")));
15259
15264
  const YamlEditorComponent = React.forwardRef(
15260
15265
  function YamlEditorComponent2(props, ref) {
@@ -16230,7 +16235,7 @@ function ConfirmModal({
16230
16235
  });
16231
16236
  }
16232
16237
  function FormModal(props) {
16233
- var _a, _b, _c;
16238
+ var _a, _b, _c, _d;
16234
16239
  const {
16235
16240
  resource: resourceFromProps,
16236
16241
  id,
@@ -16285,11 +16290,11 @@ function FormModal(props) {
16285
16290
  return "";
16286
16291
  }, [isError, id, i18n2]);
16287
16292
  const title = React.useMemo(() => {
16288
- var _a2, _b2, _c2, _d;
16293
+ var _a2, _b2, _c2, _d2;
16289
16294
  if (typeof ((_a2 = config.formConfig) == null ? void 0 : _a2.formTitle) === "string")
16290
16295
  return (_b2 = config.formConfig) == null ? void 0 : _b2.formTitle;
16291
16296
  if (typeof ((_c2 = config.formConfig) == null ? void 0 : _c2.formTitle) === "function") {
16292
- return (_d = config.formConfig) == null ? void 0 : _d.formTitle(action);
16297
+ return (_d2 = config.formConfig) == null ? void 0 : _d2.formTitle(action);
16293
16298
  }
16294
16299
  const label2 = config.displayName || (config == null ? void 0 : config.kind);
16295
16300
  return i18n2.t(id ? "dovetail.edit_resource" : "dovetail.create_resource", {
@@ -16297,11 +16302,11 @@ function FormModal(props) {
16297
16302
  });
16298
16303
  }, [action, config.formConfig, config.displayName, config == null ? void 0 : config.kind, i18n2, id]);
16299
16304
  const desc = React.useMemo(() => {
16300
- var _a2, _b2, _c2, _d;
16305
+ var _a2, _b2, _c2, _d2;
16301
16306
  if (typeof ((_a2 = config.formConfig) == null ? void 0 : _a2.formDesc) === "string")
16302
16307
  return (_b2 = config.formConfig) == null ? void 0 : _b2.formDesc;
16303
16308
  if (typeof ((_c2 = config.formConfig) == null ? void 0 : _c2.formDesc) === "function") {
16304
- return (_d = config.formConfig) == null ? void 0 : _d.formDesc(action);
16309
+ return (_d2 = config.formConfig) == null ? void 0 : _d2.formDesc(action);
16305
16310
  }
16306
16311
  return "";
16307
16312
  }, [action, config.formConfig]);
@@ -16388,10 +16393,9 @@ function FormModal(props) {
16388
16393
  onOk,
16389
16394
  okButtonProps: {
16390
16395
  ...lodashEs.omit(saveButtonProps, "onClick"),
16391
- children: (_c = config.formConfig) == null ? void 0 : _c.saveButtonText,
16392
- size: "middle"
16396
+ children: (_c = config.formConfig) == null ? void 0 : _c.saveButtonText
16393
16397
  },
16394
- okText,
16398
+ okText: ((_d = config.formConfig) == null ? void 0 : _d.saveButtonText) || okText,
16395
16399
  destroyOnClose: true,
16396
16400
  destroyOtherStep: true,
16397
16401
  ...modalProps,
@@ -17055,7 +17059,11 @@ function SelectMatchLabelButton(props) {
17055
17059
  children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Popover, {
17056
17060
  trigger: "click",
17057
17061
  visible: popoverVisible,
17058
- onVisibleChange: setPopoverVisible,
17062
+ onVisibleChange: (newPopoverVisible) => {
17063
+ if (disabled)
17064
+ return;
17065
+ setPopoverVisible(newPopoverVisible);
17066
+ },
17059
17067
  overlayClassName: PopoverOverlayStyle,
17060
17068
  content: /* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
17061
17069
  className: PopoverContentStyle,
package/dist/refine.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const refine = require("./index-5f852639.cjs");
3
+ const refine = require("./index-4e942497.cjs");
4
4
  require("./common-1eb43414.cjs");
5
5
  require("@cloudtower/eagle");
6
6
  require("@refinedev/core");
package/dist/refine.js CHANGED
@@ -1,4 +1,4 @@
1
- import { bS, cQ, A, aX, aZ, aG, co, bl, bE, a2, cC, cq, aR, T, C, j, cW, aJ, bq, ad, cY, aj, aq, d6, ay, cr, cp, d9, aN, bx, w, aE, bG, d8, cR, bJ, D, b2, at, cl, bM, bO, bN, as, ck, au, a1, ce, cd, d7, bj, aV, cT, ae, c0, bV, cV, cU, cX, cA, aH, ak, s, q, cZ, I, bu, aU, t, M, bf, bh, cs, c$, aM, bt, ar, az, aA, a9, aB, cf, aY, aF, bH, cg, bK, aa, dj, cB, cL, bR, N, a3, g, aW, a7, bU, bz, by, c_, c6, de, i, ci, dd, cm, cn, aK, br, cu, L, bb, bc, bp, H, bd, J, be, B, b6, cO, z, b5, G, b9, E, b7, F, b8, K, c7, ba, cN, ab, dh, dg, P, bn, v, af, ai, c5, bk, d3, d2, b0, bv, cb, ca, p, aL, bm, x, ch, bw, b1, di, y, cE, cS, bP, bX, bY, dl, aI, d5, h, ah, ao, an, bQ, al, d4, c9, am, cP, cc, bi, bB, av, R, Q, O, bg, cH, cK, cG, cF, cI, cJ, cD, cv, cy, cz, cx, cw, ct, cM, bZ, aO, bs, cj, aC, m, c1, l, a_, dc, o, c2, a$, n, aT, bo, k, db, aQ, aS, bC, bF, bD, aP, S, bI, da, df, b3, b4, bA, bL, c8, c3, c4, ac, dx, a0, d1, ag, W, d0, ap, ax, aw, aD, b_, U, a4, d, dp, dn, dr, du, dt, dk, a8, ds, dm, bW, dq, a6, a5, r, a, c, e, X, V, Z, f, _, u, bT, $, b$, b, dB, dy, dz, dA, dD, dC, dv, dw } from "./index-b0baca56.js";
1
+ import { bS, cQ, A, aX, aZ, aG, co, bl, bE, a2, cC, cq, aR, T, C, j, cW, aJ, bq, ad, cY, aj, aq, d6, ay, cr, cp, d9, aN, bx, w, aE, bG, d8, cR, bJ, D, b2, at, cl, bM, bO, bN, as, ck, au, a1, ce, cd, d7, bj, aV, cT, ae, c0, bV, cV, cU, cX, cA, aH, ak, s, q, cZ, I, bu, aU, t, M, bf, bh, cs, c$, aM, bt, ar, az, aA, a9, aB, cf, aY, aF, bH, cg, bK, aa, dj, cB, cL, bR, N, a3, g, aW, a7, bU, bz, by, c_, c6, de, i, ci, dd, cm, cn, aK, br, cu, L, bb, bc, bp, H, bd, J, be, B, b6, cO, z, b5, G, b9, E, b7, F, b8, K, c7, ba, cN, ab, dh, dg, P, bn, v, af, ai, c5, bk, d3, d2, b0, bv, cb, ca, p, aL, bm, x, ch, bw, b1, di, y, cE, cS, bP, bX, bY, dl, aI, d5, h, ah, ao, an, bQ, al, d4, c9, am, cP, cc, bi, bB, av, R, Q, O, bg, cH, cK, cG, cF, cI, cJ, cD, cv, cy, cz, cx, cw, ct, cM, bZ, aO, bs, cj, aC, m, c1, l, a_, dc, o, c2, a$, n, aT, bo, k, db, aQ, aS, bC, bF, bD, aP, S, bI, da, df, b3, b4, bA, bL, c8, c3, c4, ac, dx, a0, d1, ag, W, d0, ap, ax, aw, aD, b_, U, a4, d, dp, dn, dr, du, dt, dk, a8, ds, dm, bW, dq, a6, a5, r, a, c, e, X, V, Z, f, _, u, bT, $, b$, b, dB, dy, dz, dA, dD, dC, dv, dw } from "./index-2db85ce1.js";
2
2
  import "./common-241b21f8.js";
3
3
  import "@cloudtower/eagle";
4
4
  import "@refinedev/core";
@@ -17,21 +17,21 @@ export declare function validateResourceName({ v, allNames, i18n, emptyText, dup
17
17
  isValid: boolean;
18
18
  errorMessage: string;
19
19
  };
20
- export declare function validateRfc1123Name({ v, allNames, i18n, emptyText, duplicatedText, isOptional, }: Omit<ValidateResourceNameOptions, 'regex' | 'formatErrorText'>): {
20
+ export declare function validateRfc1123Name({ v, allNames, i18n, emptyText, duplicatedText, maxLength, isOptional, }: Omit<ValidateResourceNameOptions, 'regex' | 'formatErrorText'>): {
21
21
  isValid: boolean;
22
22
  errorMessage?: undefined;
23
23
  } | {
24
24
  isValid: boolean;
25
25
  errorMessage: string;
26
26
  };
27
- export declare function ValidateRfc1035Name({ v, allNames, i18n, emptyText, duplicatedText, isOptional, }: Omit<ValidateResourceNameOptions, 'regex' | 'formatErrorText'>): {
27
+ export declare function ValidateRfc1035Name({ v, allNames, i18n, emptyText, duplicatedText, maxLength, isOptional, }: Omit<ValidateResourceNameOptions, 'regex' | 'formatErrorText'>): {
28
28
  isValid: boolean;
29
29
  errorMessage?: undefined;
30
30
  } | {
31
31
  isValid: boolean;
32
32
  errorMessage: string;
33
33
  };
34
- export declare function validateDnsSubdomainName({ v, allNames, i18n, emptyText, duplicatedText, isOptional, }: Omit<ValidateResourceNameOptions, 'regex' | 'formatErrorText'>): {
34
+ export declare function validateDnsSubdomainName({ v, allNames, i18n, emptyText, duplicatedText, maxLength, isOptional, }: Omit<ValidateResourceNameOptions, 'regex' | 'formatErrorText'>): {
35
35
  isValid: boolean;
36
36
  errorMessage?: undefined;
37
37
  } | {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dovetail-v2/refine",
3
- "version": "0.3.11-alpha.0",
3
+ "version": "0.3.11-alpha.2",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",