@dovetail-v2/refine 0.0.14-beta.2 → 0.0.14-beta.4

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,4 +1,4 @@
1
- import { j as jsxRuntime } from "./index.453e0071.js";
1
+ import { j as jsxRuntime } from "./index.6a36859b.js";
2
2
  import * as monaco from "monaco-editor";
3
3
  import { useRef, useEffect } from "react";
4
4
  import "@refinedev/core";
@@ -18,7 +18,7 @@ import * as monaco from "monaco-editor";
18
18
  import { setDiagnosticsOptions } from "monaco-yaml";
19
19
  import ReactDOM from "react-dom";
20
20
  import { Drawer } from "antd";
21
- import { GlobalStore, dataProvider, liveProvider } from "k8s-api-provider";
21
+ import { dataProvider, liveProvider } from "k8s-api-provider";
22
22
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
23
23
  function getDefaultExportFromCjs(x) {
24
24
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
@@ -6857,14 +6857,18 @@ const useEagleForm = ({
6857
6857
  const warnWhenUnsavedChanges = warnWhenUnsavedChangesProp != null ? warnWhenUnsavedChangesProp : warnWhenUnsavedChangesRefine;
6858
6858
  React.useEffect(() => {
6859
6859
  var _a2;
6860
+ form.resetFields();
6860
6861
  if (editor.current) {
6862
+ const editorValue = yaml.dump(form.getFieldsValue(true));
6861
6863
  const editorInstance = editor.current.getEditorInstance();
6864
+ editor.current.setEditorValue(editorValue);
6865
+ editor.current.setValue(editorValue);
6862
6866
  if (((_a2 = queryResult == null ? void 0 : queryResult.data) == null ? void 0 : _a2.data) && editorInstance && !isFoldRef.current) {
6863
6867
  fold(editorInstance);
6864
6868
  isFoldRef.current = true;
6865
6869
  }
6866
6870
  }
6867
- }, [(_a = queryResult == null ? void 0 : queryResult.data) == null ? void 0 : _a.data, id, fold]);
6871
+ }, [(_a = queryResult == null ? void 0 : queryResult.data) == null ? void 0 : _a.data, id, form, fold]);
6868
6872
  React.useEffect(() => {
6869
6873
  var _a2, _b2;
6870
6874
  const response = (_a2 = useFormCoreResult.mutationResult.error) == null ? void 0 : _a2.response;
@@ -8487,23 +8491,23 @@ function styled(tag) {
8487
8491
  filteredProps.className = options.atomic ? cx_default(options.class, filteredProps.className || className) : cx_default(filteredProps.className || className, options.class);
8488
8492
  const { vars } = options;
8489
8493
  if (vars) {
8490
- const style2 = {};
8494
+ const style = {};
8491
8495
  for (const name2 in vars) {
8492
8496
  const variable = vars[name2];
8493
8497
  const result = variable[0];
8494
8498
  const unit = variable[1] || "";
8495
8499
  const value = typeof result === "function" ? result(props) : result;
8496
8500
  warnIfInvalid(value, options.name);
8497
- style2[`--${name2}`] = `${value}${unit}`;
8501
+ style[`--${name2}`] = `${value}${unit}`;
8498
8502
  }
8499
8503
  const ownStyle = filteredProps.style || {};
8500
8504
  const keys = Object.keys(ownStyle);
8501
8505
  if (keys.length > 0) {
8502
8506
  keys.forEach((key) => {
8503
- style2[key] = ownStyle[key];
8507
+ style[key] = ownStyle[key];
8504
8508
  });
8505
8509
  }
8506
- filteredProps.style = style2;
8510
+ filteredProps.style = style;
8507
8511
  }
8508
8512
  if (tag.__linaria && tag !== component) {
8509
8513
  filteredProps.as = component;
@@ -9671,7 +9675,7 @@ const Separator = () => {
9671
9675
  });
9672
9676
  };
9673
9677
  const MonacoYamlEditor = React.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$2));
9674
- const MonacoYamlDiffEditor = React.lazy(() => import("./MonacoYamlDiffEditor.e41c15eb.js"));
9678
+ const MonacoYamlDiffEditor = React.lazy(() => import("./MonacoYamlDiffEditor.8f3588cd.js"));
9675
9679
  const YamlEditorComponent = forwardRef(
9676
9680
  function YamlEditorComponent2(props, ref) {
9677
9681
  const {
@@ -10159,7 +10163,8 @@ function YamlForm(props) {
10159
10163
  } = useEagleForm({
10160
10164
  editorOptions: {
10161
10165
  isSkipSchema: schemaStrategy === "None"
10162
- }
10166
+ },
10167
+ liveMode: "off"
10163
10168
  });
10164
10169
  const kit = useUIKit();
10165
10170
  const {
@@ -14897,7 +14902,7 @@ const escapeTextForHtml = (inputString) => inputString.replace(/[&<>"']/gm, (str
14897
14902
  return "&#x27;";
14898
14903
  }
14899
14904
  });
14900
- const LogViewerRow = memo(({ index, style: style2, data: data2, ansiUp }) => {
14905
+ const LogViewerRow = memo(({ index, style, data: data2, ansiUp }) => {
14901
14906
  const { parsedData, searchedWordIndexes, rowInFocus } = data2;
14902
14907
  const context = useContext(LogViewerContext);
14903
14908
  const getData = (index2) => parsedData ? parsedData[index2] : null;
@@ -14941,7 +14946,7 @@ const LogViewerRow = memo(({ index, style: style2, data: data2, ansiUp }) => {
14941
14946
  };
14942
14947
  return React.createElement(
14943
14948
  "div",
14944
- { style: style2, className: css(styles$1.logViewerListItem) },
14949
+ { style, className: css(styles$1.logViewerListItem) },
14945
14950
  React.createElement("span", { className: css(styles$1.logViewerIndex) }, getRowIndex(index)),
14946
14951
  React.createElement("span", { className: css(styles$1.logViewerText), style: { width: "fit-content" }, dangerouslySetInnerHTML: { __html: ansiUp.ansi_to_html(getFormattedData()) } })
14947
14952
  );
@@ -15069,19 +15074,19 @@ function createListComponent({ getItemOffset, getEstimatedTotalSize: getEstimate
15069
15074
  this._getItemStyle = (index) => {
15070
15075
  const { itemSize } = this.props;
15071
15076
  const itemStyleCache = this._getItemStyleCache(shouldResetStyleCacheOnItemSizeChange && itemSize);
15072
- let style2;
15077
+ let style;
15073
15078
  if (itemStyleCache.hasOwnProperty(index)) {
15074
- style2 = itemStyleCache[index];
15079
+ style = itemStyleCache[index];
15075
15080
  } else {
15076
15081
  const offset = getItemOffset(this.props, index, this._instanceProps);
15077
15082
  const size = getItemSize(this.props, index, this._instanceProps);
15078
- itemStyleCache[index] = style2 = {
15083
+ itemStyleCache[index] = style = {
15079
15084
  position: "absolute",
15080
15085
  top: offset,
15081
15086
  height: size
15082
15087
  };
15083
15088
  }
15084
- return style2;
15089
+ return style;
15085
15090
  };
15086
15091
  this._getItemStyleCache = memoizeOne(() => ({}));
15087
15092
  this._onScrollVertical = (event2) => {
@@ -15198,7 +15203,7 @@ function createListComponent({ getItemOffset, getEstimatedTotalSize: getEstimate
15198
15203
  });
15199
15204
  }
15200
15205
  render() {
15201
- const { children, outerClassName, innerClassName, height, innerRef, innerElementType, innerTagName, itemCount, itemData, itemKey = defaultItemKey, outerElementType, outerTagName, style: style2, useIsScrolling, width, isTextWrapped, hasLineNumbers, indexWidth, ansiUp } = this.props;
15206
+ const { children, outerClassName, innerClassName, height, innerRef, innerElementType, innerTagName, itemCount, itemData, itemKey = defaultItemKey, outerElementType, outerTagName, style, useIsScrolling, width, isTextWrapped, hasLineNumbers, indexWidth, ansiUp } = this.props;
15202
15207
  const { isScrolling } = this.state;
15203
15208
  const onScroll = this._onScrollVertical;
15204
15209
  const [startIndex, stopIndex] = this._getRangeToRender();
@@ -15221,7 +15226,7 @@ function createListComponent({ getItemOffset, getEstimatedTotalSize: getEstimate
15221
15226
  onScroll,
15222
15227
  ref: this._outerRefSetter,
15223
15228
  tabIndex: 0,
15224
- style: Object.assign({ height, paddingTop: 0, paddingBottom: 0, WebkitOverflowScrolling: "touch", overflowX: isTextWrapped ? "hidden" : "auto" }, style2)
15229
+ style: Object.assign({ height, paddingTop: 0, paddingBottom: 0, WebkitOverflowScrolling: "touch", overflowX: isTextWrapped ? "hidden" : "auto" }, style)
15225
15230
  }, createElement(innerElementType || innerTagName || "div", {
15226
15231
  className: innerClassName,
15227
15232
  ref: innerRef,
@@ -16191,6 +16196,60 @@ const PodLog = ({
16191
16196
  })]
16192
16197
  });
16193
16198
  };
16199
+ const styles = "";
16200
+ const Dovetail = (props) => {
16201
+ const { resourcesConfig, urlPrefix = "", Layout: Layout2, history, globalStore } = props;
16202
+ const notCustomResources = useMemo(() => {
16203
+ return resourcesConfig.filter((c) => !c.isCustom);
16204
+ }, [resourcesConfig]);
16205
+ const content = useMemo(() => {
16206
+ const _content = /* @__PURE__ */ jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment, { children: [
16207
+ /* @__PURE__ */ jsxRuntime.exports.jsx(ResourceCRUD, { configs: notCustomResources, urlPrefix }),
16208
+ props.children
16209
+ ] });
16210
+ if (Layout2) {
16211
+ return /* @__PURE__ */ jsxRuntime.exports.jsx(Layout2, { children: _content });
16212
+ }
16213
+ return _content;
16214
+ }, [Layout2, notCustomResources, props.children, urlPrefix]);
16215
+ return /* @__PURE__ */ jsxRuntime.exports.jsx(Router, { history, children: /* @__PURE__ */ jsxRuntime.exports.jsx(GlobalStoreContext.Provider, { value: { globalStore }, children: /* @__PURE__ */ jsxRuntime.exports.jsx(
16216
+ Refine,
16217
+ {
16218
+ dataProvider: {
16219
+ default: dataProvider(globalStore)
16220
+ },
16221
+ routerProvider,
16222
+ liveProvider: liveProvider(globalStore),
16223
+ options: {
16224
+ warnWhenUnsavedChanges: true,
16225
+ liveMode: "auto"
16226
+ },
16227
+ resources: resourcesConfig.map((c) => {
16228
+ return {
16229
+ name: c.name,
16230
+ meta: {
16231
+ resourceBasePath: c.basePath,
16232
+ kind: c.kind,
16233
+ parent: c.parent,
16234
+ label: `${c.kind}s`
16235
+ },
16236
+ list: `${urlPrefix}/${c.name}`,
16237
+ show: `${urlPrefix}/${c.name}/show`,
16238
+ create: `${urlPrefix}/${c.name}/create`,
16239
+ edit: `${urlPrefix}/${c.name}/edit`
16240
+ };
16241
+ }),
16242
+ children: content
16243
+ }
16244
+ ) }) });
16245
+ };
16246
+ var RESOURCE_GROUP = /* @__PURE__ */ ((RESOURCE_GROUP2) => {
16247
+ RESOURCE_GROUP2["WORKLOAD"] = "WORKLOAD";
16248
+ RESOURCE_GROUP2["STORAGE"] = "STORAGE";
16249
+ RESOURCE_GROUP2["NETWORK"] = "NETWORK";
16250
+ RESOURCE_GROUP2["CLUSTER"] = "CLUSTER";
16251
+ return RESOURCE_GROUP2;
16252
+ })(RESOURCE_GROUP || {});
16194
16253
  function getSecondsDiff(startDate, endDate) {
16195
16254
  return Math.round(Math.abs(Date.parse(endDate) - Date.parse(startDate)) / 1e3);
16196
16255
  }
@@ -16629,65 +16688,6 @@ class RelationPlugin {
16629
16688
  }
16630
16689
  const relationPlugin = new RelationPlugin();
16631
16690
  const ProviderPlugins = [relationPlugin, modelPlugin];
16632
- const styles = "";
16633
- const antd = "";
16634
- const style = "";
16635
- const Dovetail = (props) => {
16636
- const { resourcesConfig, urlPrefix = "", Layout: Layout2, history, globalStoreParams } = props;
16637
- const globalStore = useMemo(() => {
16638
- return new GlobalStore(globalStoreParams, ProviderPlugins);
16639
- }, [globalStoreParams]);
16640
- const notCustomResources = useMemo(() => {
16641
- return resourcesConfig.filter((c) => !c.isCustom);
16642
- }, [resourcesConfig]);
16643
- const content = useMemo(() => {
16644
- const _content = /* @__PURE__ */ jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment, { children: [
16645
- /* @__PURE__ */ jsxRuntime.exports.jsx(ResourceCRUD, { configs: notCustomResources, urlPrefix }),
16646
- props.children
16647
- ] });
16648
- if (Layout2) {
16649
- return /* @__PURE__ */ jsxRuntime.exports.jsx(Layout2, { children: _content });
16650
- }
16651
- return _content;
16652
- }, [Layout2, notCustomResources, props.children, urlPrefix]);
16653
- return /* @__PURE__ */ jsxRuntime.exports.jsx(Router, { history, children: /* @__PURE__ */ jsxRuntime.exports.jsx(GlobalStoreContext.Provider, { value: { globalStore }, children: /* @__PURE__ */ jsxRuntime.exports.jsx(
16654
- Refine,
16655
- {
16656
- dataProvider: {
16657
- default: dataProvider(globalStore)
16658
- },
16659
- routerProvider,
16660
- liveProvider: liveProvider(globalStore),
16661
- options: {
16662
- warnWhenUnsavedChanges: true,
16663
- liveMode: "auto"
16664
- },
16665
- resources: resourcesConfig.map((c) => {
16666
- return {
16667
- name: c.name,
16668
- meta: {
16669
- resourceBasePath: c.basePath,
16670
- kind: c.kind,
16671
- parent: c.parent,
16672
- label: `${c.kind}s`
16673
- },
16674
- list: `${urlPrefix}/${c.name}`,
16675
- show: `${urlPrefix}/${c.name}/show`,
16676
- create: `${urlPrefix}/${c.name}/create`,
16677
- edit: `${urlPrefix}/${c.name}/edit`
16678
- };
16679
- }),
16680
- children: content
16681
- }
16682
- ) }) });
16683
- };
16684
- var RESOURCE_GROUP = /* @__PURE__ */ ((RESOURCE_GROUP2) => {
16685
- RESOURCE_GROUP2["WORKLOAD"] = "WORKLOAD";
16686
- RESOURCE_GROUP2["STORAGE"] = "STORAGE";
16687
- RESOURCE_GROUP2["NETWORK"] = "NETWORK";
16688
- RESOURCE_GROUP2["CLUSTER"] = "CLUSTER";
16689
- return RESOURCE_GROUP2;
16690
- })(RESOURCE_GROUP || {});
16691
16691
  export {
16692
16692
  ConditionsField as $,
16693
16693
  AgeColumnRenderer as A,
@@ -16728,13 +16728,15 @@ export {
16728
16728
  SessionAffinityField as a7,
16729
16729
  ServicePodsField as a8,
16730
16730
  ShowContent as a9,
16731
- WorkloadModel as aA,
16732
- WorkloadBaseModel as aB,
16733
- PodModel as aC,
16734
- PodMetricsModel as aD,
16735
- ResourceModel as aE,
16736
- CronJobModel as aF,
16737
- EventModel as aG,
16731
+ JobModel as aA,
16732
+ WorkloadModel as aB,
16733
+ WorkloadBaseModel as aC,
16734
+ PodModel as aD,
16735
+ PodMetricsModel as aE,
16736
+ ResourceModel as aF,
16737
+ CronJobModel as aG,
16738
+ EventModel as aH,
16739
+ ProviderPlugins as aI,
16738
16740
  SchemaStrategy as aa,
16739
16741
  DeleteManyButton as ab,
16740
16742
  ListPage as ac,
@@ -16760,7 +16762,7 @@ export {
16760
16762
  Dovetail as aw,
16761
16763
  RESOURCE_GROUP as ax,
16762
16764
  ComponentContext as ay,
16763
- JobModel as az,
16765
+ GlobalStoreContext as az,
16764
16766
  NameSpaceColumnRenderer as b,
16765
16767
  WorkloadRestartsColumnRenderer as c,
16766
16768
  NodeNameColumnRenderer as d,
package/dist/refine.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ai, A, an, B, ap, a6, g, C, f, ay, $, v, y, J, aF, Q, aq, ao, a2, V, ab, aw, ae, D, ag, aG, Z, I, ar, az, a1, T, K, X, ac, af, M, ah, N, m, b, q, ak, d, at, t, P, w, am, aD, aC, a0, ax, _, R, G, F, z, aE, E, L, e, au, as, aa, a3, U, a8, S, a5, a7, a9, a4, ad, av, al, aB, x, W, aA, H, O, c, Y, n, s, p, o, r, a, i, h, k, l, aj, u } from "./index.453e0071.js";
1
+ import { ai, A, an, B, ap, a6, g, C, f, ay, $, v, y, J, aG, Q, aq, ao, a2, V, ab, aw, ae, D, ag, aH, az, Z, I, ar, aA, a1, T, K, X, ac, af, M, ah, N, m, b, q, ak, d, at, t, P, w, am, aE, aD, a0, aI, ax, _, R, G, F, z, aF, E, L, e, au, as, aa, a3, U, a8, S, a5, a7, a9, a4, ad, av, al, aC, x, W, aB, H, O, c, Y, n, s, p, o, r, a, i, h, k, l, aj, u } from "./index.6a36859b.js";
2
2
  import "@cloudtower/eagle";
3
3
  import "@refinedev/core";
4
4
  import "js-yaml";
@@ -29,7 +29,7 @@ export {
29
29
  v as ConditionsTable,
30
30
  y as CreateButton,
31
31
  J as CronJobDropdown,
32
- aF as CronJobModel,
32
+ aG as CronJobModel,
33
33
  Q as CronjobJobsTable,
34
34
  aq as DAEMONSET_INIT_VALUE,
35
35
  ao as DEPLOYMENT_INIT_VALUE,
@@ -40,11 +40,12 @@ export {
40
40
  ae as DrawerShow,
41
41
  D as DurationColumnRenderer,
42
42
  ag as EditButton,
43
- aG as EventModel,
43
+ aH as EventModel,
44
+ az as GlobalStoreContext,
44
45
  Z as ImageField,
45
46
  I as ImageNames,
46
47
  ar as JOB_INIT_VALUE,
47
- az as JobModel,
48
+ aA as JobModel,
48
49
  a1 as JobsField,
49
50
  T as KeyValue,
50
51
  K as KeyValueListWidget,
@@ -64,16 +65,17 @@ export {
64
65
  P as PhaseColumnRenderer,
65
66
  w as PodContainersTable,
66
67
  am as PodLog,
67
- aD as PodMetricsModel,
68
- aC as PodModel,
68
+ aE as PodMetricsModel,
69
+ aD as PodModel,
69
70
  a0 as PodsField,
71
+ aI as ProviderPlugins,
70
72
  ax as RESOURCE_GROUP,
71
73
  _ as ReplicaField,
72
74
  R as ReplicasColumnRenderer,
73
75
  G as ResourceCRUD,
74
76
  F as ResourceForm,
75
77
  z as ResourceList,
76
- aE as ResourceModel,
78
+ aF as ResourceModel,
77
79
  E as ResourceShow,
78
80
  L as ResourceUsageBar,
79
81
  e as RestartCountColumnRenderer,
@@ -91,10 +93,10 @@ export {
91
93
  ad as StateTag,
92
94
  av as TIMESTAMP_LABEL,
93
95
  al as Tags,
94
- aB as WorkloadBaseModel,
96
+ aC as WorkloadBaseModel,
95
97
  x as WorkloadDropdown,
96
98
  W as WorkloadImageColumnRenderer,
97
- aA as WorkloadModel,
99
+ aB as WorkloadModel,
98
100
  H as WorkloadPodsTable,
99
101
  O as WorkloadReplicas,
100
102
  c as WorkloadRestartsColumnRenderer,
@@ -5,8 +5,8 @@ var __publicField = (obj, key, value) => {
5
5
  return value;
6
6
  };
7
7
  (function(global2, factory) {
8
- typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@refinedev/core"), require("qs"), require("react"), require("react-router-dom"), require("@cloudtower/eagle"), require("js-yaml"), require("lodash-es"), require("sunflower-antd"), require("i18next"), require("@cloudtower/icons-react"), require("monaco-editor"), require("monaco-yaml"), require("react-dom"), require("antd"), require("k8s-api-provider")) : typeof define === "function" && define.amd ? define(["exports", "@refinedev/core", "qs", "react", "react-router-dom", "@cloudtower/eagle", "js-yaml", "lodash-es", "sunflower-antd", "i18next", "@cloudtower/icons-react", "monaco-editor", "monaco-yaml", "react-dom", "antd", "k8s-api-provider"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.dovetail = {}, global2.core, global2.qs, global2.React, global2.reactRouterDom, global2.eagle, global2.yaml, global2.lodashEs, global2.sunflowerAntd, global2.i18n, global2.iconsReact, global2.monaco, global2.monacoYaml, global2.ReactDOM, global2.antd$1, global2.k8sApiProvider));
9
- })(this, function(exports2, core, qs, React, reactRouterDom, eagle, yaml, lodashEs, sunflowerAntd, i18n, iconsReact, monaco, monacoYaml, ReactDOM, antd$1, k8sApiProvider) {
8
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@refinedev/core"), require("qs"), require("react"), require("react-router-dom"), require("@cloudtower/eagle"), require("js-yaml"), require("lodash-es"), require("sunflower-antd"), require("i18next"), require("@cloudtower/icons-react"), require("monaco-editor"), require("monaco-yaml"), require("react-dom"), require("antd"), require("k8s-api-provider")) : typeof define === "function" && define.amd ? define(["exports", "@refinedev/core", "qs", "react", "react-router-dom", "@cloudtower/eagle", "js-yaml", "lodash-es", "sunflower-antd", "i18next", "@cloudtower/icons-react", "monaco-editor", "monaco-yaml", "react-dom", "antd", "k8s-api-provider"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.dovetail = {}, global2.core, global2.qs, global2.React, global2.reactRouterDom, global2.eagle, global2.yaml, global2.lodashEs, global2.sunflowerAntd, global2.i18n, global2.iconsReact, global2.monaco, global2.monacoYaml, global2.ReactDOM, global2.antd, global2.k8sApiProvider));
9
+ })(this, function(exports2, core, qs, React, reactRouterDom, eagle, yaml, lodashEs, sunflowerAntd, i18n, iconsReact, monaco, monacoYaml, ReactDOM, antd, k8sApiProvider) {
10
10
  "use strict";
11
11
  const _interopDefaultLegacy = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
12
12
  function _interopNamespace(e) {
@@ -6870,14 +6870,18 @@ var __publicField = (obj, key, value) => {
6870
6870
  const warnWhenUnsavedChanges = warnWhenUnsavedChangesProp != null ? warnWhenUnsavedChangesProp : warnWhenUnsavedChangesRefine;
6871
6871
  React__default.default.useEffect(() => {
6872
6872
  var _a2;
6873
+ form.resetFields();
6873
6874
  if (editor.current) {
6875
+ const editorValue = yaml__default.default.dump(form.getFieldsValue(true));
6874
6876
  const editorInstance = editor.current.getEditorInstance();
6877
+ editor.current.setEditorValue(editorValue);
6878
+ editor.current.setValue(editorValue);
6875
6879
  if (((_a2 = queryResult == null ? void 0 : queryResult.data) == null ? void 0 : _a2.data) && editorInstance && !isFoldRef.current) {
6876
6880
  fold(editorInstance);
6877
6881
  isFoldRef.current = true;
6878
6882
  }
6879
6883
  }
6880
- }, [(_a = queryResult == null ? void 0 : queryResult.data) == null ? void 0 : _a.data, id, fold]);
6884
+ }, [(_a = queryResult == null ? void 0 : queryResult.data) == null ? void 0 : _a.data, id, form, fold]);
6881
6885
  React__default.default.useEffect(() => {
6882
6886
  var _a2, _b2;
6883
6887
  const response = (_a2 = useFormCoreResult.mutationResult.error) == null ? void 0 : _a2.response;
@@ -8500,23 +8504,23 @@ var __publicField = (obj, key, value) => {
8500
8504
  filteredProps.className = options.atomic ? cx_default(options.class, filteredProps.className || className) : cx_default(filteredProps.className || className, options.class);
8501
8505
  const { vars } = options;
8502
8506
  if (vars) {
8503
- const style2 = {};
8507
+ const style = {};
8504
8508
  for (const name2 in vars) {
8505
8509
  const variable = vars[name2];
8506
8510
  const result = variable[0];
8507
8511
  const unit = variable[1] || "";
8508
8512
  const value = typeof result === "function" ? result(props) : result;
8509
8513
  warnIfInvalid(value, options.name);
8510
- style2[`--${name2}`] = `${value}${unit}`;
8514
+ style[`--${name2}`] = `${value}${unit}`;
8511
8515
  }
8512
8516
  const ownStyle = filteredProps.style || {};
8513
8517
  const keys = Object.keys(ownStyle);
8514
8518
  if (keys.length > 0) {
8515
8519
  keys.forEach((key) => {
8516
- style2[key] = ownStyle[key];
8520
+ style[key] = ownStyle[key];
8517
8521
  });
8518
8522
  }
8519
- filteredProps.style = style2;
8523
+ filteredProps.style = style;
8520
8524
  }
8521
8525
  if (tag.__linaria && tag !== component) {
8522
8526
  filteredProps.as = component;
@@ -10172,7 +10176,8 @@ var __publicField = (obj, key, value) => {
10172
10176
  } = useEagleForm({
10173
10177
  editorOptions: {
10174
10178
  isSkipSchema: schemaStrategy === "None"
10175
- }
10179
+ },
10180
+ liveMode: "off"
10176
10181
  });
10177
10182
  const kit = eagle.useUIKit();
10178
10183
  const {
@@ -10520,7 +10525,7 @@ var __publicField = (obj, key, value) => {
10520
10525
  const { queryResult } = core.useShow({ id: (_a = parsed == null ? void 0 : parsed.params) == null ? void 0 : _a.id });
10521
10526
  const { isLoading } = queryResult;
10522
10527
  return /* @__PURE__ */ jsxRuntime.exports.jsx(
10523
- antd$1.Drawer,
10528
+ antd.Drawer,
10524
10529
  {
10525
10530
  title: "Show Drawer",
10526
10531
  placement: "right",
@@ -14910,7 +14915,7 @@ var __publicField = (obj, key, value) => {
14910
14915
  return "&#x27;";
14911
14916
  }
14912
14917
  });
14913
- const LogViewerRow = React.memo(({ index, style: style2, data: data2, ansiUp }) => {
14918
+ const LogViewerRow = React.memo(({ index, style, data: data2, ansiUp }) => {
14914
14919
  const { parsedData, searchedWordIndexes, rowInFocus } = data2;
14915
14920
  const context = React.useContext(LogViewerContext);
14916
14921
  const getData = (index2) => parsedData ? parsedData[index2] : null;
@@ -14954,7 +14959,7 @@ var __publicField = (obj, key, value) => {
14954
14959
  };
14955
14960
  return React__default.default.createElement(
14956
14961
  "div",
14957
- { style: style2, className: css(styles$1.logViewerListItem) },
14962
+ { style, className: css(styles$1.logViewerListItem) },
14958
14963
  React__default.default.createElement("span", { className: css(styles$1.logViewerIndex) }, getRowIndex(index)),
14959
14964
  React__default.default.createElement("span", { className: css(styles$1.logViewerText), style: { width: "fit-content" }, dangerouslySetInnerHTML: { __html: ansiUp.ansi_to_html(getFormattedData()) } })
14960
14965
  );
@@ -15082,19 +15087,19 @@ var __publicField = (obj, key, value) => {
15082
15087
  this._getItemStyle = (index) => {
15083
15088
  const { itemSize } = this.props;
15084
15089
  const itemStyleCache = this._getItemStyleCache(shouldResetStyleCacheOnItemSizeChange && itemSize);
15085
- let style2;
15090
+ let style;
15086
15091
  if (itemStyleCache.hasOwnProperty(index)) {
15087
- style2 = itemStyleCache[index];
15092
+ style = itemStyleCache[index];
15088
15093
  } else {
15089
15094
  const offset = getItemOffset(this.props, index, this._instanceProps);
15090
15095
  const size = getItemSize(this.props, index, this._instanceProps);
15091
- itemStyleCache[index] = style2 = {
15096
+ itemStyleCache[index] = style = {
15092
15097
  position: "absolute",
15093
15098
  top: offset,
15094
15099
  height: size
15095
15100
  };
15096
15101
  }
15097
- return style2;
15102
+ return style;
15098
15103
  };
15099
15104
  this._getItemStyleCache = memoizeOne(() => ({}));
15100
15105
  this._onScrollVertical = (event2) => {
@@ -15211,7 +15216,7 @@ var __publicField = (obj, key, value) => {
15211
15216
  });
15212
15217
  }
15213
15218
  render() {
15214
- const { children, outerClassName, innerClassName, height, innerRef, innerElementType, innerTagName, itemCount, itemData, itemKey = defaultItemKey, outerElementType, outerTagName, style: style2, useIsScrolling, width, isTextWrapped, hasLineNumbers, indexWidth, ansiUp } = this.props;
15219
+ const { children, outerClassName, innerClassName, height, innerRef, innerElementType, innerTagName, itemCount, itemData, itemKey = defaultItemKey, outerElementType, outerTagName, style, useIsScrolling, width, isTextWrapped, hasLineNumbers, indexWidth, ansiUp } = this.props;
15215
15220
  const { isScrolling } = this.state;
15216
15221
  const onScroll = this._onScrollVertical;
15217
15222
  const [startIndex, stopIndex] = this._getRangeToRender();
@@ -15234,7 +15239,7 @@ var __publicField = (obj, key, value) => {
15234
15239
  onScroll,
15235
15240
  ref: this._outerRefSetter,
15236
15241
  tabIndex: 0,
15237
- style: Object.assign({ height, paddingTop: 0, paddingBottom: 0, WebkitOverflowScrolling: "touch", overflowX: isTextWrapped ? "hidden" : "auto" }, style2)
15242
+ style: Object.assign({ height, paddingTop: 0, paddingBottom: 0, WebkitOverflowScrolling: "touch", overflowX: isTextWrapped ? "hidden" : "auto" }, style)
15238
15243
  }, React.createElement(innerElementType || innerTagName || "div", {
15239
15244
  className: innerClassName,
15240
15245
  ref: innerRef,
@@ -16204,6 +16209,60 @@ var __publicField = (obj, key, value) => {
16204
16209
  })]
16205
16210
  });
16206
16211
  };
16212
+ const styles = "";
16213
+ const Dovetail = (props) => {
16214
+ const { resourcesConfig, urlPrefix = "", Layout: Layout2, history, globalStore } = props;
16215
+ const notCustomResources = React.useMemo(() => {
16216
+ return resourcesConfig.filter((c) => !c.isCustom);
16217
+ }, [resourcesConfig]);
16218
+ const content = React.useMemo(() => {
16219
+ const _content = /* @__PURE__ */ jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment, { children: [
16220
+ /* @__PURE__ */ jsxRuntime.exports.jsx(ResourceCRUD, { configs: notCustomResources, urlPrefix }),
16221
+ props.children
16222
+ ] });
16223
+ if (Layout2) {
16224
+ return /* @__PURE__ */ jsxRuntime.exports.jsx(Layout2, { children: _content });
16225
+ }
16226
+ return _content;
16227
+ }, [Layout2, notCustomResources, props.children, urlPrefix]);
16228
+ return /* @__PURE__ */ jsxRuntime.exports.jsx(reactRouterDom.Router, { history, children: /* @__PURE__ */ jsxRuntime.exports.jsx(GlobalStoreContext.Provider, { value: { globalStore }, children: /* @__PURE__ */ jsxRuntime.exports.jsx(
16229
+ core.Refine,
16230
+ {
16231
+ dataProvider: {
16232
+ default: k8sApiProvider.dataProvider(globalStore)
16233
+ },
16234
+ routerProvider,
16235
+ liveProvider: k8sApiProvider.liveProvider(globalStore),
16236
+ options: {
16237
+ warnWhenUnsavedChanges: true,
16238
+ liveMode: "auto"
16239
+ },
16240
+ resources: resourcesConfig.map((c) => {
16241
+ return {
16242
+ name: c.name,
16243
+ meta: {
16244
+ resourceBasePath: c.basePath,
16245
+ kind: c.kind,
16246
+ parent: c.parent,
16247
+ label: `${c.kind}s`
16248
+ },
16249
+ list: `${urlPrefix}/${c.name}`,
16250
+ show: `${urlPrefix}/${c.name}/show`,
16251
+ create: `${urlPrefix}/${c.name}/create`,
16252
+ edit: `${urlPrefix}/${c.name}/edit`
16253
+ };
16254
+ }),
16255
+ children: content
16256
+ }
16257
+ ) }) });
16258
+ };
16259
+ var RESOURCE_GROUP = /* @__PURE__ */ ((RESOURCE_GROUP2) => {
16260
+ RESOURCE_GROUP2["WORKLOAD"] = "WORKLOAD";
16261
+ RESOURCE_GROUP2["STORAGE"] = "STORAGE";
16262
+ RESOURCE_GROUP2["NETWORK"] = "NETWORK";
16263
+ RESOURCE_GROUP2["CLUSTER"] = "CLUSTER";
16264
+ return RESOURCE_GROUP2;
16265
+ })(RESOURCE_GROUP || {});
16207
16266
  function getSecondsDiff(startDate, endDate) {
16208
16267
  return Math.round(Math.abs(Date.parse(endDate) - Date.parse(startDate)) / 1e3);
16209
16268
  }
@@ -16642,65 +16701,6 @@ var __publicField = (obj, key, value) => {
16642
16701
  }
16643
16702
  const relationPlugin = new RelationPlugin();
16644
16703
  const ProviderPlugins = [relationPlugin, modelPlugin];
16645
- const styles = "";
16646
- const antd = "";
16647
- const style = "";
16648
- const Dovetail = (props) => {
16649
- const { resourcesConfig, urlPrefix = "", Layout: Layout2, history, globalStoreParams } = props;
16650
- const globalStore = React.useMemo(() => {
16651
- return new k8sApiProvider.GlobalStore(globalStoreParams, ProviderPlugins);
16652
- }, [globalStoreParams]);
16653
- const notCustomResources = React.useMemo(() => {
16654
- return resourcesConfig.filter((c) => !c.isCustom);
16655
- }, [resourcesConfig]);
16656
- const content = React.useMemo(() => {
16657
- const _content = /* @__PURE__ */ jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment, { children: [
16658
- /* @__PURE__ */ jsxRuntime.exports.jsx(ResourceCRUD, { configs: notCustomResources, urlPrefix }),
16659
- props.children
16660
- ] });
16661
- if (Layout2) {
16662
- return /* @__PURE__ */ jsxRuntime.exports.jsx(Layout2, { children: _content });
16663
- }
16664
- return _content;
16665
- }, [Layout2, notCustomResources, props.children, urlPrefix]);
16666
- return /* @__PURE__ */ jsxRuntime.exports.jsx(reactRouterDom.Router, { history, children: /* @__PURE__ */ jsxRuntime.exports.jsx(GlobalStoreContext.Provider, { value: { globalStore }, children: /* @__PURE__ */ jsxRuntime.exports.jsx(
16667
- core.Refine,
16668
- {
16669
- dataProvider: {
16670
- default: k8sApiProvider.dataProvider(globalStore)
16671
- },
16672
- routerProvider,
16673
- liveProvider: k8sApiProvider.liveProvider(globalStore),
16674
- options: {
16675
- warnWhenUnsavedChanges: true,
16676
- liveMode: "auto"
16677
- },
16678
- resources: resourcesConfig.map((c) => {
16679
- return {
16680
- name: c.name,
16681
- meta: {
16682
- resourceBasePath: c.basePath,
16683
- kind: c.kind,
16684
- parent: c.parent,
16685
- label: `${c.kind}s`
16686
- },
16687
- list: `${urlPrefix}/${c.name}`,
16688
- show: `${urlPrefix}/${c.name}/show`,
16689
- create: `${urlPrefix}/${c.name}/create`,
16690
- edit: `${urlPrefix}/${c.name}/edit`
16691
- };
16692
- }),
16693
- children: content
16694
- }
16695
- ) }) });
16696
- };
16697
- var RESOURCE_GROUP = /* @__PURE__ */ ((RESOURCE_GROUP2) => {
16698
- RESOURCE_GROUP2["WORKLOAD"] = "WORKLOAD";
16699
- RESOURCE_GROUP2["STORAGE"] = "STORAGE";
16700
- RESOURCE_GROUP2["NETWORK"] = "NETWORK";
16701
- RESOURCE_GROUP2["CLUSTER"] = "CLUSTER";
16702
- return RESOURCE_GROUP2;
16703
- })(RESOURCE_GROUP || {});
16704
16704
  const MonacoYamlDiffEditor = (props) => {
16705
16705
  const ref = React.useRef(null);
16706
16706
  const { origin, modified, id, height } = props;
@@ -16767,6 +16767,7 @@ var __publicField = (obj, key, value) => {
16767
16767
  exports2.DurationColumnRenderer = DurationColumnRenderer;
16768
16768
  exports2.EditButton = EditButton;
16769
16769
  exports2.EventModel = EventModel;
16770
+ exports2.GlobalStoreContext = GlobalStoreContext;
16770
16771
  exports2.ImageField = ImageField;
16771
16772
  exports2.ImageNames = ImageNames;
16772
16773
  exports2.JOB_INIT_VALUE = JOB_INIT_VALUE;
@@ -16793,6 +16794,7 @@ var __publicField = (obj, key, value) => {
16793
16794
  exports2.PodMetricsModel = PodMetricsModel;
16794
16795
  exports2.PodModel = PodModel;
16795
16796
  exports2.PodsField = PodsField;
16797
+ exports2.ProviderPlugins = ProviderPlugins;
16796
16798
  exports2.RESOURCE_GROUP = RESOURCE_GROUP;
16797
16799
  exports2.ReplicaField = ReplicaField;
16798
16800
  exports2.ReplicasColumnRenderer = ReplicasColumnRenderer;