@dovetail-v2/refine 0.1.29 → 0.1.30
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.
- package/dist/{MonacoYamlDiffEditor-0b32c27a.js → MonacoYamlDiffEditor-d919d36a.js} +2 -2
- package/dist/{index-ba328da4.js → index-00501400.js} +311 -310
- package/dist/refine.js +243 -242
- package/dist/refine.umd.cjs +70 -69
- package/dist/style.css +110 -110
- package/lib/hooks/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/refine.umd.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(global2, factory) {
|
|
2
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("i18next"), require("@refinedev/core"), require("qs"), require("react"), require("react-router-dom"), require("@cloudtower/eagle"), require("
|
|
3
|
-
})(this, function(exports2, i18n, core, qs, React, reactRouterDom, eagle,
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("i18next"), require("@refinedev/core"), require("qs"), require("react"), require("react-router-dom"), require("@cloudtower/eagle"), require("lodash-es"), require("@cloudtower/icons-react"), require("js-yaml"), require("k8s-api-provider"), require("monaco-editor"), require("monaco-yaml"), require("react-dom"), require("sunflower-antd"), require("antd")) : typeof define === "function" && define.amd ? define(["exports", "i18next", "@refinedev/core", "qs", "react", "react-router-dom", "@cloudtower/eagle", "lodash-es", "@cloudtower/icons-react", "js-yaml", "k8s-api-provider", "monaco-editor", "monaco-yaml", "react-dom", "sunflower-antd", "antd"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.dovetail = {}, global2.i18n, global2.core, global2.qs, global2.React, global2.reactRouterDom, global2.eagle, global2.lodashEs, global2.iconsReact, global2.yaml$2, global2.k8sApiProvider, global2.monaco, global2.monacoYaml, global2.ReactDOM, global2.sunflowerAntd, global2.antd));
|
|
3
|
+
})(this, function(exports2, i18n, core, qs, React, reactRouterDom, eagle, lodashEs, iconsReact, yaml$2, k8sApiProvider, monaco, monacoYaml, ReactDOM, sunflowerAntd, antd) {
|
|
4
4
|
"use strict";var __defProp = Object.defineProperty;
|
|
5
5
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
6
|
var __publicField = (obj, key, value) => {
|
|
@@ -8636,6 +8636,73 @@ var __publicField = (obj, key, value) => {
|
|
|
8636
8636
|
openDeleteConfirmModal
|
|
8637
8637
|
};
|
|
8638
8638
|
};
|
|
8639
|
+
const button_1v659kh = "";
|
|
8640
|
+
const WarningButtonStyle = "wwyz7ti";
|
|
8641
|
+
const CloseButtonStyle = "c1xsou5f";
|
|
8642
|
+
const useFailedModal_ny0yrd = "";
|
|
8643
|
+
const TextStyle = "t56wb76";
|
|
8644
|
+
const TipStyle = "tnei7dl";
|
|
8645
|
+
const useFailedModal = (resource) => {
|
|
8646
|
+
const configs = React.useContext(ConfigsContext);
|
|
8647
|
+
const config = configs[resource];
|
|
8648
|
+
const [visible, setVisible] = React.useState(false);
|
|
8649
|
+
const [id, setId] = React.useState("");
|
|
8650
|
+
const [errorMsgs, setErrorMsgs] = React.useState([]);
|
|
8651
|
+
const {
|
|
8652
|
+
t: t2,
|
|
8653
|
+
i18n: i18n2
|
|
8654
|
+
} = useTranslation();
|
|
8655
|
+
const displayName = config.displayName || config.kind;
|
|
8656
|
+
const resourceDisplayName = transformResourceKindInSentence(displayName, i18n2.language);
|
|
8657
|
+
const modalProps = {
|
|
8658
|
+
className: SmallModalStyle,
|
|
8659
|
+
title: t2("dovetail.cant_delete_resource", {
|
|
8660
|
+
resource: resourceDisplayName
|
|
8661
|
+
}),
|
|
8662
|
+
showOk: false,
|
|
8663
|
+
cancelButtonProps: {
|
|
8664
|
+
className: CloseButtonStyle
|
|
8665
|
+
},
|
|
8666
|
+
cancelText: t2("dovetail.close"),
|
|
8667
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
|
|
8668
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
8669
|
+
className: cx_default(eagle.Typo.Label.l2_regular, TextStyle),
|
|
8670
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trans, {
|
|
8671
|
+
i18nKey: "dovetail.cant_delete_resource_with_name",
|
|
8672
|
+
tOptions: {
|
|
8673
|
+
name: id,
|
|
8674
|
+
resource: resourceDisplayName
|
|
8675
|
+
},
|
|
8676
|
+
shouldUnescape: true,
|
|
8677
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Tag, {
|
|
8678
|
+
color: "gray",
|
|
8679
|
+
className: NameTagStyle
|
|
8680
|
+
})
|
|
8681
|
+
})
|
|
8682
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
8683
|
+
className: cx_default(eagle.Typo.Label.l4_regular, TipStyle),
|
|
8684
|
+
children: errorMsgs.length > 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx("ol", {
|
|
8685
|
+
children: errorMsgs.map((errorMsg, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("li", {
|
|
8686
|
+
children: [index2 + 1 + ". ", " ", errorMsg]
|
|
8687
|
+
}, errorMsg))
|
|
8688
|
+
}) : lodashEs.first(errorMsgs)
|
|
8689
|
+
})]
|
|
8690
|
+
}),
|
|
8691
|
+
onCancel() {
|
|
8692
|
+
setVisible(false);
|
|
8693
|
+
}
|
|
8694
|
+
};
|
|
8695
|
+
function openFailedModal(id2, errorMsgs2) {
|
|
8696
|
+
setId(id2);
|
|
8697
|
+
setErrorMsgs(errorMsgs2);
|
|
8698
|
+
setVisible(true);
|
|
8699
|
+
}
|
|
8700
|
+
return {
|
|
8701
|
+
modalProps,
|
|
8702
|
+
visible,
|
|
8703
|
+
openFailedModal
|
|
8704
|
+
};
|
|
8705
|
+
};
|
|
8639
8706
|
const index_18b69qa = "";
|
|
8640
8707
|
const EMPTY_VALUES = [void 0, null, "", "-"];
|
|
8641
8708
|
const EmptyStyle = "e5223w8";
|
|
@@ -11339,73 +11406,6 @@ var __publicField = (obj, key, value) => {
|
|
|
11339
11406
|
download(`${name2}.yaml`, content);
|
|
11340
11407
|
};
|
|
11341
11408
|
}
|
|
11342
|
-
const button_1v659kh = "";
|
|
11343
|
-
const WarningButtonStyle = "wwyz7ti";
|
|
11344
|
-
const CloseButtonStyle = "c1xsou5f";
|
|
11345
|
-
const useFailedModal_ny0yrd = "";
|
|
11346
|
-
const TextStyle = "t56wb76";
|
|
11347
|
-
const TipStyle = "tnei7dl";
|
|
11348
|
-
const useFailedModal = (resource) => {
|
|
11349
|
-
const configs = React.useContext(ConfigsContext);
|
|
11350
|
-
const config = configs[resource];
|
|
11351
|
-
const [visible, setVisible] = React.useState(false);
|
|
11352
|
-
const [id, setId] = React.useState("");
|
|
11353
|
-
const [errorMsgs, setErrorMsgs] = React.useState([]);
|
|
11354
|
-
const {
|
|
11355
|
-
t: t2,
|
|
11356
|
-
i18n: i18n2
|
|
11357
|
-
} = useTranslation();
|
|
11358
|
-
const displayName = config.displayName || config.kind;
|
|
11359
|
-
const resourceDisplayName = transformResourceKindInSentence(displayName, i18n2.language);
|
|
11360
|
-
const modalProps = {
|
|
11361
|
-
className: SmallModalStyle,
|
|
11362
|
-
title: t2("dovetail.cant_delete_resource", {
|
|
11363
|
-
resource: resourceDisplayName
|
|
11364
|
-
}),
|
|
11365
|
-
showOk: false,
|
|
11366
|
-
cancelButtonProps: {
|
|
11367
|
-
className: CloseButtonStyle
|
|
11368
|
-
},
|
|
11369
|
-
cancelText: t2("dovetail.close"),
|
|
11370
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
|
|
11371
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
11372
|
-
className: cx_default(eagle.Typo.Label.l2_regular, TextStyle),
|
|
11373
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trans, {
|
|
11374
|
-
i18nKey: "dovetail.cant_delete_resource_with_name",
|
|
11375
|
-
tOptions: {
|
|
11376
|
-
name: id,
|
|
11377
|
-
resource: resourceDisplayName
|
|
11378
|
-
},
|
|
11379
|
-
shouldUnescape: true,
|
|
11380
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Tag, {
|
|
11381
|
-
color: "gray",
|
|
11382
|
-
className: NameTagStyle
|
|
11383
|
-
})
|
|
11384
|
-
})
|
|
11385
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
11386
|
-
className: cx_default(eagle.Typo.Label.l4_regular, TipStyle),
|
|
11387
|
-
children: errorMsgs.length > 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx("ol", {
|
|
11388
|
-
children: errorMsgs.map((errorMsg, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("li", {
|
|
11389
|
-
children: [index2 + 1 + ". ", " ", errorMsg]
|
|
11390
|
-
}, errorMsg))
|
|
11391
|
-
}) : lodashEs.first(errorMsgs)
|
|
11392
|
-
})]
|
|
11393
|
-
}),
|
|
11394
|
-
onCancel() {
|
|
11395
|
-
setVisible(false);
|
|
11396
|
-
}
|
|
11397
|
-
};
|
|
11398
|
-
function openFailedModal(id2, errorMsgs2) {
|
|
11399
|
-
setId(id2);
|
|
11400
|
-
setErrorMsgs(errorMsgs2);
|
|
11401
|
-
setVisible(true);
|
|
11402
|
-
}
|
|
11403
|
-
return {
|
|
11404
|
-
modalProps,
|
|
11405
|
-
visible,
|
|
11406
|
-
openFailedModal
|
|
11407
|
-
};
|
|
11408
|
-
};
|
|
11409
11409
|
function useEdit() {
|
|
11410
11410
|
const { resource } = core.useParsed();
|
|
11411
11411
|
const go = core.useGo();
|
|
@@ -41520,6 +41520,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
41520
41520
|
exports2.useDownloadYAML = useDownloadYAML;
|
|
41521
41521
|
exports2.useEagleTable = useEagleTable;
|
|
41522
41522
|
exports2.useEdit = useEdit;
|
|
41523
|
+
exports2.useFailedModal = useFailedModal;
|
|
41523
41524
|
exports2.useGlobalStore = useGlobalStore;
|
|
41524
41525
|
exports2.useNamespaceRefineFilter = useNamespaceRefineFilter;
|
|
41525
41526
|
exports2.useNamespacesFilter = useNamespacesFilter;
|
package/dist/style.css
CHANGED
|
@@ -248,6 +248,116 @@
|
|
|
248
248
|
/* box shadow */
|
|
249
249
|
/* fisheye */
|
|
250
250
|
/* z-index */
|
|
251
|
+
.wwyz7ti.ant-btn.ant-btn.ant-btn-primary {
|
|
252
|
+
background-color: #fea008;
|
|
253
|
+
}
|
|
254
|
+
.wwyz7ti.ant-btn.ant-btn.ant-btn-primary:hover {
|
|
255
|
+
background-color: #feba33;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.c1xsou5f.ant-btn {
|
|
259
|
+
border-radius: 6px;
|
|
260
|
+
border: 1px solid rgba(172, 186, 211, 0.6) !important;
|
|
261
|
+
}/* // basic */
|
|
262
|
+
/* FishEye Color Variables and Functions */
|
|
263
|
+
/*
|
|
264
|
+
--------------------------- Primary Color ---------------------------
|
|
265
|
+
*/
|
|
266
|
+
/*
|
|
267
|
+
---------------------------When necessary to add at any time---------------------------
|
|
268
|
+
*/
|
|
269
|
+
/* computed */
|
|
270
|
+
/* blue */
|
|
271
|
+
/* green */
|
|
272
|
+
/* yellow */
|
|
273
|
+
/* red */
|
|
274
|
+
/* purple */
|
|
275
|
+
/* palette global token*/
|
|
276
|
+
/* color opaque */
|
|
277
|
+
/* color transparent */
|
|
278
|
+
/* blue transparent */
|
|
279
|
+
/* green transparent */
|
|
280
|
+
/* yellow transparent */
|
|
281
|
+
/* red transparent */
|
|
282
|
+
/* gray transparent */
|
|
283
|
+
/* white transparent */
|
|
284
|
+
/* gradient opaque */
|
|
285
|
+
/* blue radial gradient */
|
|
286
|
+
/* blue linear gradient */
|
|
287
|
+
/* green radial gradient */
|
|
288
|
+
/* yellow radial gradient */
|
|
289
|
+
/* red radial gradient */
|
|
290
|
+
/* gray radial gradient */
|
|
291
|
+
/* white to gray radial gradient */
|
|
292
|
+
/* white to gray linear gradient */
|
|
293
|
+
/* gradient transparent */
|
|
294
|
+
/* secondary palette */
|
|
295
|
+
/* purple radial gradient */
|
|
296
|
+
/* refine alias color */
|
|
297
|
+
/* text */
|
|
298
|
+
/* link */
|
|
299
|
+
/* fill */
|
|
300
|
+
/* fill element */
|
|
301
|
+
/* fill interaction */
|
|
302
|
+
/* stroke */
|
|
303
|
+
/* background */
|
|
304
|
+
/* dim */
|
|
305
|
+
/* box shadow */
|
|
306
|
+
/* fisheye */
|
|
307
|
+
/* z-index */
|
|
308
|
+
.t56wb76 {
|
|
309
|
+
margin-bottom: 4px;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.tnei7dl {
|
|
313
|
+
color: rgba(44, 56, 82, 0.6);
|
|
314
|
+
}/* // basic */
|
|
315
|
+
/* FishEye Color Variables and Functions */
|
|
316
|
+
/*
|
|
317
|
+
--------------------------- Primary Color ---------------------------
|
|
318
|
+
*/
|
|
319
|
+
/*
|
|
320
|
+
---------------------------When necessary to add at any time---------------------------
|
|
321
|
+
*/
|
|
322
|
+
/* computed */
|
|
323
|
+
/* blue */
|
|
324
|
+
/* green */
|
|
325
|
+
/* yellow */
|
|
326
|
+
/* red */
|
|
327
|
+
/* purple */
|
|
328
|
+
/* palette global token*/
|
|
329
|
+
/* color opaque */
|
|
330
|
+
/* color transparent */
|
|
331
|
+
/* blue transparent */
|
|
332
|
+
/* green transparent */
|
|
333
|
+
/* yellow transparent */
|
|
334
|
+
/* red transparent */
|
|
335
|
+
/* gray transparent */
|
|
336
|
+
/* white transparent */
|
|
337
|
+
/* gradient opaque */
|
|
338
|
+
/* blue radial gradient */
|
|
339
|
+
/* blue linear gradient */
|
|
340
|
+
/* green radial gradient */
|
|
341
|
+
/* yellow radial gradient */
|
|
342
|
+
/* red radial gradient */
|
|
343
|
+
/* gray radial gradient */
|
|
344
|
+
/* white to gray radial gradient */
|
|
345
|
+
/* white to gray linear gradient */
|
|
346
|
+
/* gradient transparent */
|
|
347
|
+
/* secondary palette */
|
|
348
|
+
/* purple radial gradient */
|
|
349
|
+
/* refine alias color */
|
|
350
|
+
/* text */
|
|
351
|
+
/* link */
|
|
352
|
+
/* fill */
|
|
353
|
+
/* fill element */
|
|
354
|
+
/* fill interaction */
|
|
355
|
+
/* stroke */
|
|
356
|
+
/* background */
|
|
357
|
+
/* dim */
|
|
358
|
+
/* box shadow */
|
|
359
|
+
/* fisheye */
|
|
360
|
+
/* z-index */
|
|
251
361
|
.e5223w8.empty-text {
|
|
252
362
|
color: rgba(0, 21, 64, 0.3);
|
|
253
363
|
}
|
|
@@ -785,116 +895,6 @@
|
|
|
785
895
|
/* box shadow */
|
|
786
896
|
/* fisheye */
|
|
787
897
|
/* z-index */
|
|
788
|
-
.wwyz7ti.ant-btn.ant-btn.ant-btn-primary {
|
|
789
|
-
background-color: #fea008;
|
|
790
|
-
}
|
|
791
|
-
.wwyz7ti.ant-btn.ant-btn.ant-btn-primary:hover {
|
|
792
|
-
background-color: #feba33;
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
.c1xsou5f.ant-btn {
|
|
796
|
-
border-radius: 6px;
|
|
797
|
-
border: 1px solid rgba(172, 186, 211, 0.6) !important;
|
|
798
|
-
}/* // basic */
|
|
799
|
-
/* FishEye Color Variables and Functions */
|
|
800
|
-
/*
|
|
801
|
-
--------------------------- Primary Color ---------------------------
|
|
802
|
-
*/
|
|
803
|
-
/*
|
|
804
|
-
---------------------------When necessary to add at any time---------------------------
|
|
805
|
-
*/
|
|
806
|
-
/* computed */
|
|
807
|
-
/* blue */
|
|
808
|
-
/* green */
|
|
809
|
-
/* yellow */
|
|
810
|
-
/* red */
|
|
811
|
-
/* purple */
|
|
812
|
-
/* palette global token*/
|
|
813
|
-
/* color opaque */
|
|
814
|
-
/* color transparent */
|
|
815
|
-
/* blue transparent */
|
|
816
|
-
/* green transparent */
|
|
817
|
-
/* yellow transparent */
|
|
818
|
-
/* red transparent */
|
|
819
|
-
/* gray transparent */
|
|
820
|
-
/* white transparent */
|
|
821
|
-
/* gradient opaque */
|
|
822
|
-
/* blue radial gradient */
|
|
823
|
-
/* blue linear gradient */
|
|
824
|
-
/* green radial gradient */
|
|
825
|
-
/* yellow radial gradient */
|
|
826
|
-
/* red radial gradient */
|
|
827
|
-
/* gray radial gradient */
|
|
828
|
-
/* white to gray radial gradient */
|
|
829
|
-
/* white to gray linear gradient */
|
|
830
|
-
/* gradient transparent */
|
|
831
|
-
/* secondary palette */
|
|
832
|
-
/* purple radial gradient */
|
|
833
|
-
/* refine alias color */
|
|
834
|
-
/* text */
|
|
835
|
-
/* link */
|
|
836
|
-
/* fill */
|
|
837
|
-
/* fill element */
|
|
838
|
-
/* fill interaction */
|
|
839
|
-
/* stroke */
|
|
840
|
-
/* background */
|
|
841
|
-
/* dim */
|
|
842
|
-
/* box shadow */
|
|
843
|
-
/* fisheye */
|
|
844
|
-
/* z-index */
|
|
845
|
-
.t56wb76 {
|
|
846
|
-
margin-bottom: 4px;
|
|
847
|
-
}
|
|
848
|
-
|
|
849
|
-
.tnei7dl {
|
|
850
|
-
color: rgba(44, 56, 82, 0.6);
|
|
851
|
-
}/* // basic */
|
|
852
|
-
/* FishEye Color Variables and Functions */
|
|
853
|
-
/*
|
|
854
|
-
--------------------------- Primary Color ---------------------------
|
|
855
|
-
*/
|
|
856
|
-
/*
|
|
857
|
-
---------------------------When necessary to add at any time---------------------------
|
|
858
|
-
*/
|
|
859
|
-
/* computed */
|
|
860
|
-
/* blue */
|
|
861
|
-
/* green */
|
|
862
|
-
/* yellow */
|
|
863
|
-
/* red */
|
|
864
|
-
/* purple */
|
|
865
|
-
/* palette global token*/
|
|
866
|
-
/* color opaque */
|
|
867
|
-
/* color transparent */
|
|
868
|
-
/* blue transparent */
|
|
869
|
-
/* green transparent */
|
|
870
|
-
/* yellow transparent */
|
|
871
|
-
/* red transparent */
|
|
872
|
-
/* gray transparent */
|
|
873
|
-
/* white transparent */
|
|
874
|
-
/* gradient opaque */
|
|
875
|
-
/* blue radial gradient */
|
|
876
|
-
/* blue linear gradient */
|
|
877
|
-
/* green radial gradient */
|
|
878
|
-
/* yellow radial gradient */
|
|
879
|
-
/* red radial gradient */
|
|
880
|
-
/* gray radial gradient */
|
|
881
|
-
/* white to gray radial gradient */
|
|
882
|
-
/* white to gray linear gradient */
|
|
883
|
-
/* gradient transparent */
|
|
884
|
-
/* secondary palette */
|
|
885
|
-
/* purple radial gradient */
|
|
886
|
-
/* refine alias color */
|
|
887
|
-
/* text */
|
|
888
|
-
/* link */
|
|
889
|
-
/* fill */
|
|
890
|
-
/* fill element */
|
|
891
|
-
/* fill interaction */
|
|
892
|
-
/* stroke */
|
|
893
|
-
/* background */
|
|
894
|
-
/* dim */
|
|
895
|
-
/* box shadow */
|
|
896
|
-
/* fisheye */
|
|
897
|
-
/* z-index */
|
|
898
898
|
.t1908hhn {
|
|
899
899
|
padding: 12px 24px;
|
|
900
900
|
}
|
package/lib/hooks/index.d.ts
CHANGED