@dovetail-v2/refine 0.0.20 → 0.0.21-beta.0
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/refine.umd.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(global2, factory) {
|
|
2
|
-
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("
|
|
3
|
-
})(this, function(exports2, core, qs, React, reactRouterDom, eagle, yaml, lodashEs, sunflowerAntd,
|
|
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("js-yaml"), require("lodash-es"), require("sunflower-antd"), 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", "i18next", "@refinedev/core", "qs", "react", "react-router-dom", "@cloudtower/eagle", "js-yaml", "lodash-es", "sunflower-antd", "@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.i18n, global2.core, global2.qs, global2.React, global2.reactRouterDom, global2.eagle, global2.yaml, global2.lodashEs, global2.sunflowerAntd, global2.iconsReact, global2.monaco, global2.monacoYaml, global2.ReactDOM, global2.antd, global2.k8sApiProvider));
|
|
3
|
+
})(this, function(exports2, i18n, core, qs, React, reactRouterDom, eagle, yaml, lodashEs, sunflowerAntd, iconsReact, monaco, monacoYaml, ReactDOM, antd, k8sApiProvider) {
|
|
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) => {
|
|
@@ -30,247 +30,756 @@ var __publicField = (obj, key, value) => {
|
|
|
30
30
|
function getDefaultExportFromCjs(x) {
|
|
31
31
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
* LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/
|
|
43
|
-
var hasRequiredReactJsxRuntime_production_min;
|
|
44
|
-
function requireReactJsxRuntime_production_min() {
|
|
45
|
-
if (hasRequiredReactJsxRuntime_production_min)
|
|
46
|
-
return reactJsxRuntime_production_min;
|
|
47
|
-
hasRequiredReactJsxRuntime_production_min = 1;
|
|
48
|
-
var f = React, g = 60103;
|
|
49
|
-
reactJsxRuntime_production_min.Fragment = 60107;
|
|
50
|
-
if ("function" === typeof Symbol && Symbol.for) {
|
|
51
|
-
var h = Symbol.for;
|
|
52
|
-
g = h("react.element");
|
|
53
|
-
reactJsxRuntime_production_min.Fragment = h("react.fragment");
|
|
33
|
+
function warn() {
|
|
34
|
+
if (console && console.warn) {
|
|
35
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
36
|
+
args[_key] = arguments[_key];
|
|
37
|
+
}
|
|
38
|
+
if (typeof args[0] === "string")
|
|
39
|
+
args[0] = `react-i18next:: ${args[0]}`;
|
|
40
|
+
console.warn(...args);
|
|
54
41
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
void 0 !== a.ref && (l = a.ref);
|
|
61
|
-
for (b in a)
|
|
62
|
-
n.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
|
|
63
|
-
if (c && c.defaultProps)
|
|
64
|
-
for (b in a = c.defaultProps, a)
|
|
65
|
-
void 0 === d[b] && (d[b] = a[b]);
|
|
66
|
-
return { $$typeof: g, type: c, key: e, ref: l, props: d, _owner: m.current };
|
|
42
|
+
}
|
|
43
|
+
const alreadyWarned = {};
|
|
44
|
+
function warnOnce() {
|
|
45
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
46
|
+
args[_key2] = arguments[_key2];
|
|
67
47
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
48
|
+
if (typeof args[0] === "string" && alreadyWarned[args[0]])
|
|
49
|
+
return;
|
|
50
|
+
if (typeof args[0] === "string")
|
|
51
|
+
alreadyWarned[args[0]] = /* @__PURE__ */ new Date();
|
|
52
|
+
warn(...args);
|
|
71
53
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
54
|
+
const loadedClb = (i18n2, cb) => () => {
|
|
55
|
+
if (i18n2.isInitialized) {
|
|
56
|
+
cb();
|
|
57
|
+
} else {
|
|
58
|
+
const initialized = () => {
|
|
59
|
+
setTimeout(() => {
|
|
60
|
+
i18n2.off("initialized", initialized);
|
|
61
|
+
}, 0);
|
|
62
|
+
cb();
|
|
63
|
+
};
|
|
64
|
+
i18n2.on("initialized", initialized);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
function loadNamespaces(i18n2, ns, cb) {
|
|
68
|
+
i18n2.loadNamespaces(ns, loadedClb(i18n2, cb));
|
|
69
|
+
}
|
|
70
|
+
function loadLanguages(i18n2, lng, ns, cb) {
|
|
71
|
+
if (typeof ns === "string")
|
|
72
|
+
ns = [ns];
|
|
73
|
+
ns.forEach((n) => {
|
|
74
|
+
if (i18n2.options.ns.indexOf(n) < 0)
|
|
75
|
+
i18n2.options.ns.push(n);
|
|
76
|
+
});
|
|
77
|
+
i18n2.loadLanguages(lng, loadedClb(i18n2, cb));
|
|
78
|
+
}
|
|
79
|
+
function oldI18nextHasLoadedNamespace(ns, i18n2) {
|
|
80
|
+
let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
81
|
+
const lng = i18n2.languages[0];
|
|
82
|
+
const fallbackLng = i18n2.options ? i18n2.options.fallbackLng : false;
|
|
83
|
+
const lastLng = i18n2.languages[i18n2.languages.length - 1];
|
|
84
|
+
if (lng.toLowerCase() === "cimode")
|
|
85
|
+
return true;
|
|
86
|
+
const loadNotPending = (l, n) => {
|
|
87
|
+
const loadState = i18n2.services.backendConnector.state[`${l}|${n}`];
|
|
88
|
+
return loadState === -1 || loadState === 2;
|
|
89
|
+
};
|
|
90
|
+
if (options.bindI18n && options.bindI18n.indexOf("languageChanging") > -1 && i18n2.services.backendConnector.backend && i18n2.isLanguageChangingTo && !loadNotPending(i18n2.isLanguageChangingTo, ns))
|
|
91
|
+
return false;
|
|
92
|
+
if (i18n2.hasResourceBundle(lng, ns))
|
|
93
|
+
return true;
|
|
94
|
+
if (!i18n2.services.backendConnector.backend || i18n2.options.resources && !i18n2.options.partialBundledLanguages)
|
|
95
|
+
return true;
|
|
96
|
+
if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns)))
|
|
97
|
+
return true;
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
function hasLoadedNamespace(ns, i18n2) {
|
|
101
|
+
let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
102
|
+
if (!i18n2.languages || !i18n2.languages.length) {
|
|
103
|
+
warnOnce("i18n.languages were undefined or empty", i18n2.languages);
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
const isNewerI18next = i18n2.options.ignoreJSONStructure !== void 0;
|
|
107
|
+
if (!isNewerI18next) {
|
|
108
|
+
return oldI18nextHasLoadedNamespace(ns, i18n2, options);
|
|
109
|
+
}
|
|
110
|
+
return i18n2.hasLoadedNamespace(ns, {
|
|
111
|
+
lng: options.lng,
|
|
112
|
+
precheck: (i18nInstance2, loadNotPending) => {
|
|
113
|
+
if (options.bindI18n && options.bindI18n.indexOf("languageChanging") > -1 && i18nInstance2.services.backendConnector.backend && i18nInstance2.isLanguageChangingTo && !loadNotPending(i18nInstance2.isLanguageChangingTo, ns))
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
const matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
|
|
119
|
+
const htmlEntities = {
|
|
120
|
+
"&": "&",
|
|
121
|
+
"&": "&",
|
|
122
|
+
"<": "<",
|
|
123
|
+
"<": "<",
|
|
124
|
+
">": ">",
|
|
125
|
+
">": ">",
|
|
126
|
+
"'": "'",
|
|
127
|
+
"'": "'",
|
|
128
|
+
""": '"',
|
|
129
|
+
""": '"',
|
|
130
|
+
" ": " ",
|
|
131
|
+
" ": " ",
|
|
132
|
+
"©": "©",
|
|
133
|
+
"©": "©",
|
|
134
|
+
"®": "®",
|
|
135
|
+
"®": "®",
|
|
136
|
+
"…": "…",
|
|
137
|
+
"…": "…",
|
|
138
|
+
"/": "/",
|
|
139
|
+
"/": "/"
|
|
140
|
+
};
|
|
141
|
+
const unescapeHtmlEntity = (m) => htmlEntities[m];
|
|
142
|
+
const unescape = (text) => text.replace(matchHtmlEntity, unescapeHtmlEntity);
|
|
143
|
+
let defaultOptions = {
|
|
144
|
+
bindI18n: "languageChanged",
|
|
145
|
+
bindI18nStore: "",
|
|
146
|
+
transEmptyNodeValue: "",
|
|
147
|
+
transSupportBasicHtmlNodes: true,
|
|
148
|
+
transWrapTextNodes: "",
|
|
149
|
+
transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
|
|
150
|
+
useSuspense: true,
|
|
151
|
+
unescape
|
|
152
|
+
};
|
|
153
|
+
function setDefaults() {
|
|
154
|
+
let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
155
|
+
defaultOptions = {
|
|
156
|
+
...defaultOptions,
|
|
157
|
+
...options
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
function getDefaults() {
|
|
161
|
+
return defaultOptions;
|
|
162
|
+
}
|
|
163
|
+
let i18nInstance;
|
|
164
|
+
function setI18n(instance) {
|
|
165
|
+
i18nInstance = instance;
|
|
166
|
+
}
|
|
167
|
+
function getI18n() {
|
|
168
|
+
return i18nInstance;
|
|
169
|
+
}
|
|
170
|
+
const initReactI18next = {
|
|
171
|
+
type: "3rdParty",
|
|
172
|
+
init(instance) {
|
|
173
|
+
setDefaults(instance.options.react);
|
|
174
|
+
setI18n(instance);
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
const I18nContext = React.createContext();
|
|
178
|
+
class ReportNamespaces {
|
|
179
|
+
constructor() {
|
|
180
|
+
this.usedNamespaces = {};
|
|
181
|
+
}
|
|
182
|
+
addUsedNamespaces(namespaces) {
|
|
183
|
+
namespaces.forEach((ns) => {
|
|
184
|
+
if (!this.usedNamespaces[ns])
|
|
185
|
+
this.usedNamespaces[ns] = true;
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
getUsedNamespaces() {
|
|
189
|
+
return Object.keys(this.usedNamespaces);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
const usePrevious = (value, ignore) => {
|
|
193
|
+
const ref = React.useRef();
|
|
194
|
+
React.useEffect(() => {
|
|
195
|
+
ref.current = ignore ? ref.current : value;
|
|
196
|
+
}, [value, ignore]);
|
|
197
|
+
return ref.current;
|
|
198
|
+
};
|
|
199
|
+
function useTranslation(ns) {
|
|
200
|
+
let props = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
201
|
+
const {
|
|
202
|
+
i18n: i18nFromProps
|
|
203
|
+
} = props;
|
|
204
|
+
const {
|
|
205
|
+
i18n: i18nFromContext,
|
|
206
|
+
defaultNS: defaultNSFromContext
|
|
207
|
+
} = React.useContext(I18nContext) || {};
|
|
208
|
+
const i18n2 = i18nFromProps || i18nFromContext || getI18n();
|
|
209
|
+
if (i18n2 && !i18n2.reportNamespaces)
|
|
210
|
+
i18n2.reportNamespaces = new ReportNamespaces();
|
|
211
|
+
if (!i18n2) {
|
|
212
|
+
warnOnce("You will need to pass in an i18next instance by using initReactI18next");
|
|
213
|
+
const notReadyT = (k, optsOrDefaultValue) => {
|
|
214
|
+
if (typeof optsOrDefaultValue === "string")
|
|
215
|
+
return optsOrDefaultValue;
|
|
216
|
+
if (optsOrDefaultValue && typeof optsOrDefaultValue === "object" && typeof optsOrDefaultValue.defaultValue === "string")
|
|
217
|
+
return optsOrDefaultValue.defaultValue;
|
|
218
|
+
return Array.isArray(k) ? k[k.length - 1] : k;
|
|
219
|
+
};
|
|
220
|
+
const retNotReady = [notReadyT, {}, false];
|
|
221
|
+
retNotReady.t = notReadyT;
|
|
222
|
+
retNotReady.i18n = {};
|
|
223
|
+
retNotReady.ready = false;
|
|
224
|
+
return retNotReady;
|
|
225
|
+
}
|
|
226
|
+
if (i18n2.options.react && i18n2.options.react.wait !== void 0)
|
|
227
|
+
warnOnce("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
|
|
228
|
+
const i18nOptions = {
|
|
229
|
+
...getDefaults(),
|
|
230
|
+
...i18n2.options.react,
|
|
231
|
+
...props
|
|
232
|
+
};
|
|
233
|
+
const {
|
|
234
|
+
useSuspense,
|
|
235
|
+
keyPrefix
|
|
236
|
+
} = i18nOptions;
|
|
237
|
+
let namespaces = ns || defaultNSFromContext || i18n2.options && i18n2.options.defaultNS;
|
|
238
|
+
namespaces = typeof namespaces === "string" ? [namespaces] : namespaces || ["translation"];
|
|
239
|
+
if (i18n2.reportNamespaces.addUsedNamespaces)
|
|
240
|
+
i18n2.reportNamespaces.addUsedNamespaces(namespaces);
|
|
241
|
+
const ready2 = (i18n2.isInitialized || i18n2.initializedStoreOnce) && namespaces.every((n) => hasLoadedNamespace(n, i18n2, i18nOptions));
|
|
242
|
+
function getT() {
|
|
243
|
+
return i18n2.getFixedT(props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
|
|
244
|
+
}
|
|
245
|
+
const [t, setT] = React.useState(getT);
|
|
246
|
+
let joinedNS = namespaces.join();
|
|
247
|
+
if (props.lng)
|
|
248
|
+
joinedNS = `${props.lng}${joinedNS}`;
|
|
249
|
+
const previousJoinedNS = usePrevious(joinedNS);
|
|
250
|
+
const isMounted = React.useRef(true);
|
|
251
|
+
React.useEffect(() => {
|
|
252
|
+
const {
|
|
253
|
+
bindI18n,
|
|
254
|
+
bindI18nStore
|
|
255
|
+
} = i18nOptions;
|
|
256
|
+
isMounted.current = true;
|
|
257
|
+
if (!ready2 && !useSuspense) {
|
|
258
|
+
if (props.lng) {
|
|
259
|
+
loadLanguages(i18n2, props.lng, namespaces, () => {
|
|
260
|
+
if (isMounted.current)
|
|
261
|
+
setT(getT);
|
|
262
|
+
});
|
|
263
|
+
} else {
|
|
264
|
+
loadNamespaces(i18n2, namespaces, () => {
|
|
265
|
+
if (isMounted.current)
|
|
266
|
+
setT(getT);
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
if (ready2 && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
|
|
271
|
+
setT(getT);
|
|
272
|
+
}
|
|
273
|
+
function boundReset() {
|
|
274
|
+
if (isMounted.current)
|
|
275
|
+
setT(getT);
|
|
276
|
+
}
|
|
277
|
+
if (bindI18n && i18n2)
|
|
278
|
+
i18n2.on(bindI18n, boundReset);
|
|
279
|
+
if (bindI18nStore && i18n2)
|
|
280
|
+
i18n2.store.on(bindI18nStore, boundReset);
|
|
281
|
+
return () => {
|
|
282
|
+
isMounted.current = false;
|
|
283
|
+
if (bindI18n && i18n2)
|
|
284
|
+
bindI18n.split(" ").forEach((e) => i18n2.off(e, boundReset));
|
|
285
|
+
if (bindI18nStore && i18n2)
|
|
286
|
+
bindI18nStore.split(" ").forEach((e) => i18n2.store.off(e, boundReset));
|
|
287
|
+
};
|
|
288
|
+
}, [i18n2, joinedNS]);
|
|
289
|
+
const isInitial = React.useRef(true);
|
|
290
|
+
React.useEffect(() => {
|
|
291
|
+
if (isMounted.current && !isInitial.current) {
|
|
292
|
+
setT(getT);
|
|
293
|
+
}
|
|
294
|
+
isInitial.current = false;
|
|
295
|
+
}, [i18n2, keyPrefix]);
|
|
296
|
+
const ret = [t, i18n2, ready2];
|
|
297
|
+
ret.t = t;
|
|
298
|
+
ret.i18n = i18n2;
|
|
299
|
+
ret.ready = ready2;
|
|
300
|
+
if (ready2)
|
|
301
|
+
return ret;
|
|
302
|
+
if (!ready2 && !useSuspense)
|
|
303
|
+
return ret;
|
|
304
|
+
throw new Promise((resolve) => {
|
|
305
|
+
if (props.lng) {
|
|
306
|
+
loadLanguages(i18n2, props.lng, namespaces, () => resolve());
|
|
307
|
+
} else {
|
|
308
|
+
loadNamespaces(i18n2, namespaces, () => resolve());
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
const copy$1 = "Copy";
|
|
313
|
+
const reset_arguments$1 = "Reset";
|
|
314
|
+
const view_changes$1 = "Show Diff";
|
|
315
|
+
const back_to_edit$1 = "Edit";
|
|
316
|
+
const configure_file$1 = "Configuration";
|
|
317
|
+
const yaml_format_wrong$1 = "Configuration is in an invalid YAML format.";
|
|
318
|
+
const yaml_value_wrong$1 = "Configuration has invalid values.";
|
|
319
|
+
const edit_yaml$1 = "Edit YAML";
|
|
320
|
+
const copied$1 = "Copied";
|
|
321
|
+
const already_reset$1 = "Already reset";
|
|
322
|
+
const fetch_schema_fail$1 = "Failed to fetch schema.";
|
|
323
|
+
const obtain_data_error$1 = "Having trouble getting data.";
|
|
324
|
+
const retry$1 = "Retry";
|
|
325
|
+
const create_resource$1 = "Create {{resource}}";
|
|
326
|
+
const edit_resource$1 = "Edit {{resource}}";
|
|
327
|
+
const dovetail$1 = {
|
|
328
|
+
copy: copy$1,
|
|
329
|
+
reset_arguments: reset_arguments$1,
|
|
330
|
+
view_changes: view_changes$1,
|
|
331
|
+
back_to_edit: back_to_edit$1,
|
|
332
|
+
configure_file: configure_file$1,
|
|
333
|
+
yaml_format_wrong: yaml_format_wrong$1,
|
|
334
|
+
yaml_value_wrong: yaml_value_wrong$1,
|
|
335
|
+
edit_yaml: edit_yaml$1,
|
|
336
|
+
copied: copied$1,
|
|
337
|
+
already_reset: already_reset$1,
|
|
338
|
+
fetch_schema_fail: fetch_schema_fail$1,
|
|
339
|
+
obtain_data_error: obtain_data_error$1,
|
|
340
|
+
retry: retry$1,
|
|
341
|
+
create_resource: create_resource$1,
|
|
342
|
+
edit_resource: edit_resource$1
|
|
343
|
+
};
|
|
344
|
+
const EN = {
|
|
345
|
+
dovetail: dovetail$1
|
|
346
|
+
};
|
|
347
|
+
const copy = "复制";
|
|
348
|
+
const reset_arguments = "重置";
|
|
349
|
+
const view_changes = "查看改动";
|
|
350
|
+
const back_to_edit = "编辑";
|
|
351
|
+
const configure_file = "配置内容";
|
|
352
|
+
const yaml_format_wrong = "配置内容不是有效的 yaml 格式。";
|
|
353
|
+
const yaml_value_wrong = "配置内容中存在不合法的值。";
|
|
354
|
+
const edit_yaml = "编辑 YAML";
|
|
355
|
+
const copied = "已复制";
|
|
356
|
+
const already_reset = "已重置";
|
|
357
|
+
const cancel = "取消";
|
|
358
|
+
const create = "创建";
|
|
359
|
+
const confirm_delete_text = "确定要删除 {{target}} 吗?";
|
|
360
|
+
const edit = "编辑";
|
|
361
|
+
const namespace = "名字空间";
|
|
362
|
+
const name = "名称";
|
|
363
|
+
const state = "状态";
|
|
364
|
+
const status = "状态";
|
|
365
|
+
const phase = "状态";
|
|
366
|
+
const image = "容器镜像";
|
|
367
|
+
const replicas = "副本数";
|
|
368
|
+
const created_time = "创建时间";
|
|
369
|
+
const label = "标签";
|
|
370
|
+
const annotation = "注释";
|
|
371
|
+
const type = "类型";
|
|
372
|
+
const event = "事件";
|
|
373
|
+
const reason = "原因";
|
|
374
|
+
const object = "对象";
|
|
375
|
+
const note$1 = "事件信息";
|
|
376
|
+
const condition = "Condition";
|
|
377
|
+
const download_yaml = "下载 YAML";
|
|
378
|
+
const detail = "详情";
|
|
379
|
+
const node_name = "主机名称";
|
|
380
|
+
const restarts = "重启次数";
|
|
381
|
+
const updated_time = "更新时间";
|
|
382
|
+
const message = "消息";
|
|
383
|
+
const save = "保存";
|
|
384
|
+
const more = "更多";
|
|
385
|
+
const workload = "工作负载";
|
|
386
|
+
const all_namespaces = "所有名字空间";
|
|
387
|
+
const empty = "无可显示的数据";
|
|
388
|
+
const schedule = "调度时间表";
|
|
389
|
+
const lastScheduleTime = "上次调度时间";
|
|
390
|
+
const duration = "持续时间";
|
|
391
|
+
const completions = "完成 Job 历史数";
|
|
392
|
+
const started = "开始时间";
|
|
393
|
+
const init_container = "初始化容器";
|
|
394
|
+
const container = "容器";
|
|
395
|
+
const redeploy = "重新部署";
|
|
396
|
+
const data = "数据";
|
|
397
|
+
const suspend = "暂停";
|
|
398
|
+
const resume = "重新开始";
|
|
399
|
+
const cluster = "集群";
|
|
400
|
+
const storage = "存储";
|
|
401
|
+
const network = "网络";
|
|
402
|
+
const clusterIp = "集群 IP";
|
|
403
|
+
const sessionAffinity = "会话保持";
|
|
404
|
+
const log = "日志";
|
|
405
|
+
const select_container = "选择容器";
|
|
406
|
+
const wrap = "折叠";
|
|
407
|
+
const resume_log = "继续";
|
|
408
|
+
const log_new_lines = ",并展示 {{ count }} 行新日志";
|
|
409
|
+
const fetch_schema_fail = "获取 schema 失败。";
|
|
410
|
+
const obtain_data_error = "获取数据时遇到问题。";
|
|
411
|
+
const retry = "重试";
|
|
412
|
+
const ready = "就绪";
|
|
413
|
+
const updating = "更新中";
|
|
414
|
+
const completed = "完成";
|
|
415
|
+
const failed = "异常";
|
|
416
|
+
const suspended = "挂起";
|
|
417
|
+
const running = "运行中";
|
|
418
|
+
const terminating = "终止";
|
|
419
|
+
const succeeded = "成功终止";
|
|
420
|
+
const unknown = "未知";
|
|
421
|
+
const pending = "待处理";
|
|
422
|
+
const waiting = "等待中";
|
|
423
|
+
const create_resource = "创建 {{resource}}";
|
|
424
|
+
const edit_resource = "编辑 {{resource}}";
|
|
425
|
+
const sec = "秒";
|
|
426
|
+
const min = "分";
|
|
427
|
+
const hr = "小时";
|
|
428
|
+
const day = "天";
|
|
429
|
+
const expand = "展开";
|
|
430
|
+
const fold = "收起";
|
|
431
|
+
const rule = "规则";
|
|
432
|
+
const default_backend = "默认后端";
|
|
433
|
+
const ingress_rule_type = "规则类型";
|
|
434
|
+
const port = "端口";
|
|
435
|
+
const dovetail = {
|
|
436
|
+
copy,
|
|
437
|
+
reset_arguments,
|
|
438
|
+
view_changes,
|
|
439
|
+
back_to_edit,
|
|
440
|
+
configure_file,
|
|
441
|
+
yaml_format_wrong,
|
|
442
|
+
yaml_value_wrong,
|
|
443
|
+
edit_yaml,
|
|
444
|
+
copied,
|
|
445
|
+
already_reset,
|
|
446
|
+
cancel,
|
|
447
|
+
"delete": "删除",
|
|
448
|
+
create,
|
|
449
|
+
confirm_delete_text,
|
|
450
|
+
edit,
|
|
451
|
+
namespace,
|
|
452
|
+
name,
|
|
453
|
+
state,
|
|
454
|
+
status,
|
|
455
|
+
phase,
|
|
456
|
+
image,
|
|
457
|
+
replicas,
|
|
458
|
+
created_time,
|
|
459
|
+
label,
|
|
460
|
+
annotation,
|
|
461
|
+
type,
|
|
462
|
+
event,
|
|
463
|
+
reason,
|
|
464
|
+
object,
|
|
465
|
+
note: note$1,
|
|
466
|
+
condition,
|
|
467
|
+
download_yaml,
|
|
468
|
+
detail,
|
|
469
|
+
node_name,
|
|
470
|
+
restarts,
|
|
471
|
+
updated_time,
|
|
472
|
+
message,
|
|
473
|
+
save,
|
|
474
|
+
more,
|
|
475
|
+
workload,
|
|
476
|
+
all_namespaces,
|
|
477
|
+
empty,
|
|
478
|
+
schedule,
|
|
479
|
+
lastScheduleTime,
|
|
480
|
+
duration,
|
|
481
|
+
completions,
|
|
482
|
+
started,
|
|
483
|
+
init_container,
|
|
484
|
+
container,
|
|
485
|
+
redeploy,
|
|
486
|
+
data,
|
|
487
|
+
suspend,
|
|
488
|
+
resume,
|
|
489
|
+
cluster,
|
|
490
|
+
storage,
|
|
491
|
+
network,
|
|
492
|
+
clusterIp,
|
|
493
|
+
sessionAffinity,
|
|
494
|
+
log,
|
|
495
|
+
select_container,
|
|
496
|
+
wrap,
|
|
497
|
+
resume_log,
|
|
498
|
+
log_new_lines,
|
|
499
|
+
fetch_schema_fail,
|
|
500
|
+
obtain_data_error,
|
|
501
|
+
retry,
|
|
502
|
+
ready,
|
|
503
|
+
updating,
|
|
504
|
+
completed,
|
|
505
|
+
failed,
|
|
506
|
+
suspended,
|
|
507
|
+
running,
|
|
508
|
+
terminating,
|
|
509
|
+
succeeded,
|
|
510
|
+
unknown,
|
|
511
|
+
pending,
|
|
512
|
+
waiting,
|
|
513
|
+
create_resource,
|
|
514
|
+
edit_resource,
|
|
515
|
+
sec,
|
|
516
|
+
min,
|
|
517
|
+
hr,
|
|
518
|
+
day,
|
|
519
|
+
expand,
|
|
520
|
+
fold,
|
|
521
|
+
rule,
|
|
522
|
+
default_backend,
|
|
523
|
+
ingress_rule_type,
|
|
524
|
+
port
|
|
525
|
+
};
|
|
526
|
+
const ZH = {
|
|
527
|
+
dovetail
|
|
528
|
+
};
|
|
529
|
+
const resources = {
|
|
530
|
+
"en-US": EN,
|
|
531
|
+
"zh-CN": ZH
|
|
532
|
+
};
|
|
533
|
+
i18n.use(initReactI18next).init({
|
|
534
|
+
supportedLngs: ["en-US", "zh-CN"],
|
|
535
|
+
resources,
|
|
536
|
+
ns: Object.keys(resources["zh-CN"]),
|
|
537
|
+
defaultNS: "dovetail",
|
|
538
|
+
fallbackLng: ["en-US", "zh-CN"],
|
|
539
|
+
lng: "zh-CN",
|
|
540
|
+
nsSeparator: "."
|
|
541
|
+
});
|
|
542
|
+
var jsxRuntime = { exports: {} };
|
|
543
|
+
var reactJsxRuntime_production_min = {};
|
|
544
|
+
/** @license React v16.14.0
|
|
545
|
+
* react-jsx-runtime.production.min.js
|
|
546
|
+
*
|
|
547
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
548
|
+
*
|
|
549
|
+
* This source code is licensed under the MIT license found in the
|
|
550
|
+
* LICENSE file in the root directory of this source tree.
|
|
551
|
+
*/
|
|
552
|
+
var hasRequiredReactJsxRuntime_production_min;
|
|
553
|
+
function requireReactJsxRuntime_production_min() {
|
|
554
|
+
if (hasRequiredReactJsxRuntime_production_min)
|
|
555
|
+
return reactJsxRuntime_production_min;
|
|
556
|
+
hasRequiredReactJsxRuntime_production_min = 1;
|
|
557
|
+
var f = React, g = 60103;
|
|
558
|
+
reactJsxRuntime_production_min.Fragment = 60107;
|
|
559
|
+
if ("function" === typeof Symbol && Symbol.for) {
|
|
560
|
+
var h = Symbol.for;
|
|
561
|
+
g = h("react.element");
|
|
562
|
+
reactJsxRuntime_production_min.Fragment = h("react.fragment");
|
|
563
|
+
}
|
|
564
|
+
var m = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, n = Object.prototype.hasOwnProperty, p = { key: true, ref: true, __self: true, __source: true };
|
|
565
|
+
function q(c, a, k) {
|
|
566
|
+
var b, d = {}, e = null, l = null;
|
|
567
|
+
void 0 !== k && (e = "" + k);
|
|
568
|
+
void 0 !== a.key && (e = "" + a.key);
|
|
569
|
+
void 0 !== a.ref && (l = a.ref);
|
|
570
|
+
for (b in a)
|
|
571
|
+
n.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
|
|
572
|
+
if (c && c.defaultProps)
|
|
573
|
+
for (b in a = c.defaultProps, a)
|
|
574
|
+
void 0 === d[b] && (d[b] = a[b]);
|
|
575
|
+
return { $$typeof: g, type: c, key: e, ref: l, props: d, _owner: m.current };
|
|
576
|
+
}
|
|
577
|
+
reactJsxRuntime_production_min.jsx = q;
|
|
578
|
+
reactJsxRuntime_production_min.jsxs = q;
|
|
579
|
+
return reactJsxRuntime_production_min;
|
|
580
|
+
}
|
|
581
|
+
var reactJsxRuntime_development = {};
|
|
582
|
+
/** @license React v16.14.0
|
|
583
|
+
* react-jsx-runtime.development.js
|
|
584
|
+
*
|
|
585
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
586
|
+
*
|
|
587
|
+
* This source code is licensed under the MIT license found in the
|
|
588
|
+
* LICENSE file in the root directory of this source tree.
|
|
589
|
+
*/
|
|
590
|
+
var hasRequiredReactJsxRuntime_development;
|
|
591
|
+
function requireReactJsxRuntime_development() {
|
|
592
|
+
if (hasRequiredReactJsxRuntime_development)
|
|
593
|
+
return reactJsxRuntime_development;
|
|
594
|
+
hasRequiredReactJsxRuntime_development = 1;
|
|
595
|
+
(function(exports3) {
|
|
596
|
+
if (process.env.NODE_ENV !== "production") {
|
|
597
|
+
(function() {
|
|
598
|
+
var React$1 = React;
|
|
599
|
+
var REACT_ELEMENT_TYPE = 60103;
|
|
600
|
+
var REACT_PORTAL_TYPE = 60106;
|
|
601
|
+
exports3.Fragment = 60107;
|
|
602
|
+
var REACT_STRICT_MODE_TYPE = 60108;
|
|
603
|
+
var REACT_PROFILER_TYPE = 60114;
|
|
604
|
+
var REACT_PROVIDER_TYPE = 60109;
|
|
605
|
+
var REACT_CONTEXT_TYPE = 60110;
|
|
606
|
+
var REACT_FORWARD_REF_TYPE = 60112;
|
|
607
|
+
var REACT_SUSPENSE_TYPE = 60113;
|
|
608
|
+
var REACT_SUSPENSE_LIST_TYPE = 60120;
|
|
609
|
+
var REACT_MEMO_TYPE = 60115;
|
|
610
|
+
var REACT_LAZY_TYPE = 60116;
|
|
611
|
+
var REACT_BLOCK_TYPE = 60121;
|
|
612
|
+
var REACT_SERVER_BLOCK_TYPE = 60122;
|
|
613
|
+
var REACT_FUNDAMENTAL_TYPE = 60117;
|
|
614
|
+
var REACT_DEBUG_TRACING_MODE_TYPE = 60129;
|
|
615
|
+
var REACT_LEGACY_HIDDEN_TYPE = 60131;
|
|
616
|
+
if (typeof Symbol === "function" && Symbol.for) {
|
|
617
|
+
var symbolFor = Symbol.for;
|
|
618
|
+
REACT_ELEMENT_TYPE = symbolFor("react.element");
|
|
619
|
+
REACT_PORTAL_TYPE = symbolFor("react.portal");
|
|
620
|
+
exports3.Fragment = symbolFor("react.fragment");
|
|
621
|
+
REACT_STRICT_MODE_TYPE = symbolFor("react.strict_mode");
|
|
622
|
+
REACT_PROFILER_TYPE = symbolFor("react.profiler");
|
|
623
|
+
REACT_PROVIDER_TYPE = symbolFor("react.provider");
|
|
624
|
+
REACT_CONTEXT_TYPE = symbolFor("react.context");
|
|
625
|
+
REACT_FORWARD_REF_TYPE = symbolFor("react.forward_ref");
|
|
626
|
+
REACT_SUSPENSE_TYPE = symbolFor("react.suspense");
|
|
627
|
+
REACT_SUSPENSE_LIST_TYPE = symbolFor("react.suspense_list");
|
|
628
|
+
REACT_MEMO_TYPE = symbolFor("react.memo");
|
|
629
|
+
REACT_LAZY_TYPE = symbolFor("react.lazy");
|
|
630
|
+
REACT_BLOCK_TYPE = symbolFor("react.block");
|
|
631
|
+
REACT_SERVER_BLOCK_TYPE = symbolFor("react.server.block");
|
|
632
|
+
REACT_FUNDAMENTAL_TYPE = symbolFor("react.fundamental");
|
|
633
|
+
symbolFor("react.scope");
|
|
634
|
+
symbolFor("react.opaque.id");
|
|
635
|
+
REACT_DEBUG_TRACING_MODE_TYPE = symbolFor("react.debug_trace_mode");
|
|
636
|
+
symbolFor("react.offscreen");
|
|
637
|
+
REACT_LEGACY_HIDDEN_TYPE = symbolFor("react.legacy_hidden");
|
|
638
|
+
}
|
|
639
|
+
var MAYBE_ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
|
|
640
|
+
var FAUX_ITERATOR_SYMBOL = "@@iterator";
|
|
641
|
+
function getIteratorFn(maybeIterable) {
|
|
642
|
+
if (maybeIterable === null || typeof maybeIterable !== "object") {
|
|
643
|
+
return null;
|
|
644
|
+
}
|
|
645
|
+
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
646
|
+
if (typeof maybeIterator === "function") {
|
|
647
|
+
return maybeIterator;
|
|
648
|
+
}
|
|
649
|
+
return null;
|
|
650
|
+
}
|
|
651
|
+
var ReactSharedInternals = React$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
652
|
+
function error(format) {
|
|
653
|
+
{
|
|
654
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
655
|
+
args[_key2 - 1] = arguments[_key2];
|
|
656
|
+
}
|
|
657
|
+
printWarning("error", format, args);
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
function printWarning(level, format, args) {
|
|
661
|
+
{
|
|
662
|
+
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
663
|
+
var stack = "";
|
|
664
|
+
if (currentlyValidatingElement) {
|
|
665
|
+
var name2 = getComponentName(currentlyValidatingElement.type);
|
|
666
|
+
var owner = currentlyValidatingElement._owner;
|
|
667
|
+
stack += describeComponentFrame(name2, currentlyValidatingElement._source, owner && getComponentName(owner.type));
|
|
668
|
+
}
|
|
669
|
+
stack += ReactDebugCurrentFrame.getStackAddendum();
|
|
670
|
+
if (stack !== "") {
|
|
671
|
+
format += "%s";
|
|
672
|
+
args = args.concat([stack]);
|
|
673
|
+
}
|
|
674
|
+
var argsWithFormat = args.map(function(item) {
|
|
675
|
+
return "" + item;
|
|
676
|
+
});
|
|
677
|
+
argsWithFormat.unshift("Warning: " + format);
|
|
678
|
+
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
var enableScopeAPI = false;
|
|
682
|
+
function isValidElementType(type2) {
|
|
683
|
+
if (typeof type2 === "string" || typeof type2 === "function") {
|
|
684
|
+
return true;
|
|
685
|
+
}
|
|
686
|
+
if (type2 === exports3.Fragment || type2 === REACT_PROFILER_TYPE || type2 === REACT_DEBUG_TRACING_MODE_TYPE || type2 === REACT_STRICT_MODE_TYPE || type2 === REACT_SUSPENSE_TYPE || type2 === REACT_SUSPENSE_LIST_TYPE || type2 === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI) {
|
|
687
|
+
return true;
|
|
688
|
+
}
|
|
689
|
+
if (typeof type2 === "object" && type2 !== null) {
|
|
690
|
+
if (type2.$$typeof === REACT_LAZY_TYPE || type2.$$typeof === REACT_MEMO_TYPE || type2.$$typeof === REACT_PROVIDER_TYPE || type2.$$typeof === REACT_CONTEXT_TYPE || type2.$$typeof === REACT_FORWARD_REF_TYPE || type2.$$typeof === REACT_FUNDAMENTAL_TYPE || type2.$$typeof === REACT_BLOCK_TYPE || type2[0] === REACT_SERVER_BLOCK_TYPE) {
|
|
691
|
+
return true;
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
return false;
|
|
695
|
+
}
|
|
696
|
+
var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
|
|
697
|
+
function describeComponentFrame(name2, source, ownerName) {
|
|
698
|
+
var sourceInfo = "";
|
|
699
|
+
if (source) {
|
|
700
|
+
var path = source.fileName;
|
|
701
|
+
var fileName = path.replace(BEFORE_SLASH_RE, "");
|
|
702
|
+
{
|
|
703
|
+
if (/^index\./.test(fileName)) {
|
|
704
|
+
var match = path.match(BEFORE_SLASH_RE);
|
|
705
|
+
if (match) {
|
|
706
|
+
var pathBeforeSlash = match[1];
|
|
707
|
+
if (pathBeforeSlash) {
|
|
708
|
+
var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, "");
|
|
709
|
+
fileName = folderName + "/" + fileName;
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
sourceInfo = " (at " + fileName + ":" + source.lineNumber + ")";
|
|
715
|
+
} else if (ownerName) {
|
|
716
|
+
sourceInfo = " (created by " + ownerName + ")";
|
|
717
|
+
}
|
|
718
|
+
return "\n in " + (name2 || "Unknown") + sourceInfo;
|
|
719
|
+
}
|
|
720
|
+
var Resolved = 1;
|
|
721
|
+
function refineResolvedLazyComponent(lazyComponent) {
|
|
722
|
+
return lazyComponent._status === Resolved ? lazyComponent._result : null;
|
|
723
|
+
}
|
|
724
|
+
function getWrappedName(outerType, innerType, wrapperName) {
|
|
725
|
+
var functionName = innerType.displayName || innerType.name || "";
|
|
726
|
+
return outerType.displayName || (functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName);
|
|
727
|
+
}
|
|
728
|
+
function getComponentName(type2) {
|
|
729
|
+
if (type2 == null) {
|
|
730
|
+
return null;
|
|
731
|
+
}
|
|
732
|
+
{
|
|
733
|
+
if (typeof type2.tag === "number") {
|
|
734
|
+
error("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue.");
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
if (typeof type2 === "function") {
|
|
738
|
+
return type2.displayName || type2.name || null;
|
|
739
|
+
}
|
|
740
|
+
if (typeof type2 === "string") {
|
|
741
|
+
return type2;
|
|
742
|
+
}
|
|
743
|
+
switch (type2) {
|
|
744
|
+
case exports3.Fragment:
|
|
745
|
+
return "Fragment";
|
|
746
|
+
case REACT_PORTAL_TYPE:
|
|
747
|
+
return "Portal";
|
|
748
|
+
case REACT_PROFILER_TYPE:
|
|
749
|
+
return "Profiler";
|
|
750
|
+
case REACT_STRICT_MODE_TYPE:
|
|
751
|
+
return "StrictMode";
|
|
752
|
+
case REACT_SUSPENSE_TYPE:
|
|
753
|
+
return "Suspense";
|
|
754
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
755
|
+
return "SuspenseList";
|
|
756
|
+
}
|
|
757
|
+
if (typeof type2 === "object") {
|
|
758
|
+
switch (type2.$$typeof) {
|
|
759
|
+
case REACT_CONTEXT_TYPE:
|
|
760
|
+
return "Context.Consumer";
|
|
761
|
+
case REACT_PROVIDER_TYPE:
|
|
762
|
+
return "Context.Provider";
|
|
763
|
+
case REACT_FORWARD_REF_TYPE:
|
|
764
|
+
return getWrappedName(type2, type2.render, "ForwardRef");
|
|
765
|
+
case REACT_MEMO_TYPE:
|
|
766
|
+
return getComponentName(type2.type);
|
|
767
|
+
case REACT_BLOCK_TYPE:
|
|
768
|
+
return getComponentName(type2.render);
|
|
769
|
+
case REACT_LAZY_TYPE: {
|
|
770
|
+
var thenable = type2;
|
|
771
|
+
var resolvedThenable = refineResolvedLazyComponent(thenable);
|
|
772
|
+
if (resolvedThenable) {
|
|
773
|
+
return getComponentName(resolvedThenable);
|
|
774
|
+
}
|
|
775
|
+
break;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
return null;
|
|
780
|
+
}
|
|
781
|
+
var loggedTypeFailures = {};
|
|
782
|
+
ReactSharedInternals.ReactDebugCurrentFrame;
|
|
274
783
|
var currentlyValidatingElement = null;
|
|
275
784
|
function setCurrentlyValidatingElement(element) {
|
|
276
785
|
{
|
|
@@ -563,510 +1072,231 @@ var __publicField = (obj, key, value) => {
|
|
|
563
1072
|
}
|
|
564
1073
|
}
|
|
565
1074
|
}
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
function validatePropTypes(element) {
|
|
569
|
-
{
|
|
570
|
-
var type2 = element.type;
|
|
571
|
-
if (type2 === null || type2 === void 0 || typeof type2 === "string") {
|
|
572
|
-
return;
|
|
573
|
-
}
|
|
574
|
-
var propTypes;
|
|
575
|
-
if (typeof type2 === "function") {
|
|
576
|
-
propTypes = type2.propTypes;
|
|
577
|
-
} else if (typeof type2 === "object" && (type2.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
578
|
-
// Inner props are checked in the reconciler.
|
|
579
|
-
type2.$$typeof === REACT_MEMO_TYPE)) {
|
|
580
|
-
propTypes = type2.propTypes;
|
|
581
|
-
} else {
|
|
582
|
-
return;
|
|
583
|
-
}
|
|
584
|
-
if (propTypes) {
|
|
585
|
-
var name2 = getComponentName(type2);
|
|
586
|
-
checkPropTypes(propTypes, element.props, "prop", name2, element);
|
|
587
|
-
} else if (type2.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
|
|
588
|
-
propTypesMisspellWarningShown = true;
|
|
589
|
-
var _name = getComponentName(type2);
|
|
590
|
-
error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
|
|
591
|
-
}
|
|
592
|
-
if (typeof type2.getDefaultProps === "function" && !type2.getDefaultProps.isReactClassApproved) {
|
|
593
|
-
error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
function validateFragmentProps(fragment) {
|
|
598
|
-
{
|
|
599
|
-
var keys = Object.keys(fragment.props);
|
|
600
|
-
for (var i = 0; i < keys.length; i++) {
|
|
601
|
-
var key = keys[i];
|
|
602
|
-
if (key !== "children" && key !== "key") {
|
|
603
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
604
|
-
error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
|
|
605
|
-
setCurrentlyValidatingElement$1(null);
|
|
606
|
-
break;
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
if (fragment.ref !== null) {
|
|
610
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
611
|
-
error("Invalid attribute `ref` supplied to `React.Fragment`.");
|
|
612
|
-
setCurrentlyValidatingElement$1(null);
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
function jsxWithValidation(type2, props, key, isStaticChildren, source, self2) {
|
|
617
|
-
{
|
|
618
|
-
var validType = isValidElementType(type2);
|
|
619
|
-
if (!validType) {
|
|
620
|
-
var info = "";
|
|
621
|
-
if (type2 === void 0 || typeof type2 === "object" && type2 !== null && Object.keys(type2).length === 0) {
|
|
622
|
-
info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
|
|
623
|
-
}
|
|
624
|
-
var sourceInfo = getSourceInfoErrorAddendum(source);
|
|
625
|
-
if (sourceInfo) {
|
|
626
|
-
info += sourceInfo;
|
|
627
|
-
} else {
|
|
628
|
-
info += getDeclarationErrorAddendum();
|
|
629
|
-
}
|
|
630
|
-
var typeString;
|
|
631
|
-
if (type2 === null) {
|
|
632
|
-
typeString = "null";
|
|
633
|
-
} else if (Array.isArray(type2)) {
|
|
634
|
-
typeString = "array";
|
|
635
|
-
} else if (type2 !== void 0 && type2.$$typeof === REACT_ELEMENT_TYPE) {
|
|
636
|
-
typeString = "<" + (getComponentName(type2.type) || "Unknown") + " />";
|
|
637
|
-
info = " Did you accidentally export a JSX literal instead of a component?";
|
|
638
|
-
} else {
|
|
639
|
-
typeString = typeof type2;
|
|
640
|
-
}
|
|
641
|
-
error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
|
|
642
|
-
}
|
|
643
|
-
var element = jsxDEV(type2, props, key, source, self2);
|
|
644
|
-
if (element == null) {
|
|
645
|
-
return element;
|
|
646
|
-
}
|
|
647
|
-
if (validType) {
|
|
648
|
-
var children = props.children;
|
|
649
|
-
if (children !== void 0) {
|
|
650
|
-
if (isStaticChildren) {
|
|
651
|
-
if (Array.isArray(children)) {
|
|
652
|
-
for (var i = 0; i < children.length; i++) {
|
|
653
|
-
validateChildKeys(children[i], type2);
|
|
654
|
-
}
|
|
655
|
-
if (Object.freeze) {
|
|
656
|
-
Object.freeze(children);
|
|
657
|
-
}
|
|
658
|
-
} else {
|
|
659
|
-
error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
660
|
-
}
|
|
661
|
-
} else {
|
|
662
|
-
validateChildKeys(children, type2);
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
if (type2 === exports3.Fragment) {
|
|
667
|
-
validateFragmentProps(element);
|
|
668
|
-
} else {
|
|
669
|
-
validatePropTypes(element);
|
|
670
|
-
}
|
|
671
|
-
return element;
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
function jsxWithValidationStatic(type2, props, key) {
|
|
675
|
-
{
|
|
676
|
-
return jsxWithValidation(type2, props, key, true);
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
function jsxWithValidationDynamic(type2, props, key) {
|
|
680
|
-
{
|
|
681
|
-
return jsxWithValidation(type2, props, key, false);
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
var jsx = jsxWithValidationDynamic;
|
|
685
|
-
var jsxs = jsxWithValidationStatic;
|
|
686
|
-
exports3.jsx = jsx;
|
|
687
|
-
exports3.jsxs = jsxs;
|
|
688
|
-
})();
|
|
689
|
-
}
|
|
690
|
-
})(reactJsxRuntime_development);
|
|
691
|
-
return reactJsxRuntime_development;
|
|
692
|
-
}
|
|
693
|
-
if (process.env.NODE_ENV === "production") {
|
|
694
|
-
jsxRuntime.exports = requireReactJsxRuntime_production_min();
|
|
695
|
-
} else {
|
|
696
|
-
jsxRuntime.exports = requireReactJsxRuntime_development();
|
|
697
|
-
}
|
|
698
|
-
var jsxRuntimeExports = jsxRuntime.exports;
|
|
699
|
-
const stringifyConfig = {
|
|
700
|
-
addQueryPrefix: true,
|
|
701
|
-
skipNulls: true,
|
|
702
|
-
arrayFormat: "indices",
|
|
703
|
-
encode: false,
|
|
704
|
-
encodeValuesOnly: true
|
|
705
|
-
};
|
|
706
|
-
const convertToNumberIfPossible = (value) => {
|
|
707
|
-
if (typeof value === "undefined") {
|
|
708
|
-
return value;
|
|
709
|
-
}
|
|
710
|
-
const num = Number(value);
|
|
711
|
-
if (`${num}` === value) {
|
|
712
|
-
return num;
|
|
713
|
-
}
|
|
714
|
-
return value;
|
|
715
|
-
};
|
|
716
|
-
const routerProvider = {
|
|
717
|
-
go: () => {
|
|
718
|
-
const { search: existingSearch, hash: existingHash } = reactRouterDom.useLocation();
|
|
719
|
-
const history = reactRouterDom.useHistory();
|
|
720
|
-
const fn = React.useCallback(
|
|
721
|
-
({ to, type: type2, query, hash, options: { keepQuery, keepHash } = {} }) => {
|
|
722
|
-
const urlQuery = {
|
|
723
|
-
...keepQuery && existingSearch && qs.parse(existingSearch, { ignoreQueryPrefix: true }),
|
|
724
|
-
...query
|
|
725
|
-
};
|
|
726
|
-
if (urlQuery.to) {
|
|
727
|
-
urlQuery.to = encodeURIComponent(`${urlQuery.to}`);
|
|
728
|
-
}
|
|
729
|
-
const hasUrlQuery = Object.keys(urlQuery).length > 0;
|
|
730
|
-
const urlHash = `#${(hash || keepHash && existingHash || "").replace(
|
|
731
|
-
/^#/,
|
|
732
|
-
""
|
|
733
|
-
)}`;
|
|
734
|
-
const hasUrlHash = urlHash.length > 1;
|
|
735
|
-
const urlTo = to || "";
|
|
736
|
-
const fullPath = `${urlTo}${hasUrlQuery ? qs.stringify(urlQuery, stringifyConfig) : ""}${hasUrlHash ? urlHash : ""}`;
|
|
737
|
-
if (type2 === "path") {
|
|
738
|
-
return fullPath;
|
|
1075
|
+
}
|
|
739
1076
|
}
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
...parsedSearch
|
|
769
|
-
};
|
|
770
|
-
const response = {
|
|
771
|
-
...resource && { resource },
|
|
772
|
-
...action && { action },
|
|
773
|
-
...(parsedSearch == null ? void 0 : parsedSearch.id) && { id: decodeURIComponent(parsedSearch.id) },
|
|
774
|
-
// ...(params?.action && { action: params.action }), // lets see if there is a need for this
|
|
775
|
-
pathname,
|
|
776
|
-
params: {
|
|
777
|
-
...combinedParams,
|
|
778
|
-
current: convertToNumberIfPossible(combinedParams.current),
|
|
779
|
-
pageSize: convertToNumberIfPossible(combinedParams.pageSize),
|
|
780
|
-
to: combinedParams.to ? decodeURIComponent(combinedParams.to) : void 0
|
|
1077
|
+
function validatePropTypes(element) {
|
|
1078
|
+
{
|
|
1079
|
+
var type2 = element.type;
|
|
1080
|
+
if (type2 === null || type2 === void 0 || typeof type2 === "string") {
|
|
1081
|
+
return;
|
|
1082
|
+
}
|
|
1083
|
+
var propTypes;
|
|
1084
|
+
if (typeof type2 === "function") {
|
|
1085
|
+
propTypes = type2.propTypes;
|
|
1086
|
+
} else if (typeof type2 === "object" && (type2.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
1087
|
+
// Inner props are checked in the reconciler.
|
|
1088
|
+
type2.$$typeof === REACT_MEMO_TYPE)) {
|
|
1089
|
+
propTypes = type2.propTypes;
|
|
1090
|
+
} else {
|
|
1091
|
+
return;
|
|
1092
|
+
}
|
|
1093
|
+
if (propTypes) {
|
|
1094
|
+
var name2 = getComponentName(type2);
|
|
1095
|
+
checkPropTypes(propTypes, element.props, "prop", name2, element);
|
|
1096
|
+
} else if (type2.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
|
|
1097
|
+
propTypesMisspellWarningShown = true;
|
|
1098
|
+
var _name = getComponentName(type2);
|
|
1099
|
+
error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
|
|
1100
|
+
}
|
|
1101
|
+
if (typeof type2.getDefaultProps === "function" && !type2.getDefaultProps.isReactClassApproved) {
|
|
1102
|
+
error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
781
1105
|
}
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
const htmlEntities = {
|
|
878
|
-
"&": "&",
|
|
879
|
-
"&": "&",
|
|
880
|
-
"<": "<",
|
|
881
|
-
"<": "<",
|
|
882
|
-
">": ">",
|
|
883
|
-
">": ">",
|
|
884
|
-
"'": "'",
|
|
885
|
-
"'": "'",
|
|
886
|
-
""": '"',
|
|
887
|
-
""": '"',
|
|
888
|
-
" ": " ",
|
|
889
|
-
" ": " ",
|
|
890
|
-
"©": "©",
|
|
891
|
-
"©": "©",
|
|
892
|
-
"®": "®",
|
|
893
|
-
"®": "®",
|
|
894
|
-
"…": "…",
|
|
895
|
-
"…": "…",
|
|
896
|
-
"/": "/",
|
|
897
|
-
"/": "/"
|
|
898
|
-
};
|
|
899
|
-
const unescapeHtmlEntity = (m) => htmlEntities[m];
|
|
900
|
-
const unescape = (text) => text.replace(matchHtmlEntity, unescapeHtmlEntity);
|
|
901
|
-
let defaultOptions = {
|
|
902
|
-
bindI18n: "languageChanged",
|
|
903
|
-
bindI18nStore: "",
|
|
904
|
-
transEmptyNodeValue: "",
|
|
905
|
-
transSupportBasicHtmlNodes: true,
|
|
906
|
-
transWrapTextNodes: "",
|
|
907
|
-
transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
|
|
908
|
-
useSuspense: true,
|
|
909
|
-
unescape
|
|
910
|
-
};
|
|
911
|
-
function setDefaults() {
|
|
912
|
-
let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
913
|
-
defaultOptions = {
|
|
914
|
-
...defaultOptions,
|
|
915
|
-
...options
|
|
916
|
-
};
|
|
917
|
-
}
|
|
918
|
-
function getDefaults() {
|
|
919
|
-
return defaultOptions;
|
|
920
|
-
}
|
|
921
|
-
let i18nInstance;
|
|
922
|
-
function setI18n(instance) {
|
|
923
|
-
i18nInstance = instance;
|
|
1106
|
+
function validateFragmentProps(fragment) {
|
|
1107
|
+
{
|
|
1108
|
+
var keys = Object.keys(fragment.props);
|
|
1109
|
+
for (var i = 0; i < keys.length; i++) {
|
|
1110
|
+
var key = keys[i];
|
|
1111
|
+
if (key !== "children" && key !== "key") {
|
|
1112
|
+
setCurrentlyValidatingElement$1(fragment);
|
|
1113
|
+
error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
|
|
1114
|
+
setCurrentlyValidatingElement$1(null);
|
|
1115
|
+
break;
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
if (fragment.ref !== null) {
|
|
1119
|
+
setCurrentlyValidatingElement$1(fragment);
|
|
1120
|
+
error("Invalid attribute `ref` supplied to `React.Fragment`.");
|
|
1121
|
+
setCurrentlyValidatingElement$1(null);
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
function jsxWithValidation(type2, props, key, isStaticChildren, source, self2) {
|
|
1126
|
+
{
|
|
1127
|
+
var validType = isValidElementType(type2);
|
|
1128
|
+
if (!validType) {
|
|
1129
|
+
var info = "";
|
|
1130
|
+
if (type2 === void 0 || typeof type2 === "object" && type2 !== null && Object.keys(type2).length === 0) {
|
|
1131
|
+
info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
|
|
1132
|
+
}
|
|
1133
|
+
var sourceInfo = getSourceInfoErrorAddendum(source);
|
|
1134
|
+
if (sourceInfo) {
|
|
1135
|
+
info += sourceInfo;
|
|
1136
|
+
} else {
|
|
1137
|
+
info += getDeclarationErrorAddendum();
|
|
1138
|
+
}
|
|
1139
|
+
var typeString;
|
|
1140
|
+
if (type2 === null) {
|
|
1141
|
+
typeString = "null";
|
|
1142
|
+
} else if (Array.isArray(type2)) {
|
|
1143
|
+
typeString = "array";
|
|
1144
|
+
} else if (type2 !== void 0 && type2.$$typeof === REACT_ELEMENT_TYPE) {
|
|
1145
|
+
typeString = "<" + (getComponentName(type2.type) || "Unknown") + " />";
|
|
1146
|
+
info = " Did you accidentally export a JSX literal instead of a component?";
|
|
1147
|
+
} else {
|
|
1148
|
+
typeString = typeof type2;
|
|
1149
|
+
}
|
|
1150
|
+
error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
|
|
1151
|
+
}
|
|
1152
|
+
var element = jsxDEV(type2, props, key, source, self2);
|
|
1153
|
+
if (element == null) {
|
|
1154
|
+
return element;
|
|
1155
|
+
}
|
|
1156
|
+
if (validType) {
|
|
1157
|
+
var children = props.children;
|
|
1158
|
+
if (children !== void 0) {
|
|
1159
|
+
if (isStaticChildren) {
|
|
1160
|
+
if (Array.isArray(children)) {
|
|
1161
|
+
for (var i = 0; i < children.length; i++) {
|
|
1162
|
+
validateChildKeys(children[i], type2);
|
|
1163
|
+
}
|
|
1164
|
+
if (Object.freeze) {
|
|
1165
|
+
Object.freeze(children);
|
|
1166
|
+
}
|
|
1167
|
+
} else {
|
|
1168
|
+
error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
1169
|
+
}
|
|
1170
|
+
} else {
|
|
1171
|
+
validateChildKeys(children, type2);
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
if (type2 === exports3.Fragment) {
|
|
1176
|
+
validateFragmentProps(element);
|
|
1177
|
+
} else {
|
|
1178
|
+
validatePropTypes(element);
|
|
1179
|
+
}
|
|
1180
|
+
return element;
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
function jsxWithValidationStatic(type2, props, key) {
|
|
1184
|
+
{
|
|
1185
|
+
return jsxWithValidation(type2, props, key, true);
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
function jsxWithValidationDynamic(type2, props, key) {
|
|
1189
|
+
{
|
|
1190
|
+
return jsxWithValidation(type2, props, key, false);
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
var jsx = jsxWithValidationDynamic;
|
|
1194
|
+
var jsxs = jsxWithValidationStatic;
|
|
1195
|
+
exports3.jsx = jsx;
|
|
1196
|
+
exports3.jsxs = jsxs;
|
|
1197
|
+
})();
|
|
1198
|
+
}
|
|
1199
|
+
})(reactJsxRuntime_development);
|
|
1200
|
+
return reactJsxRuntime_development;
|
|
924
1201
|
}
|
|
925
|
-
|
|
926
|
-
|
|
1202
|
+
if (process.env.NODE_ENV === "production") {
|
|
1203
|
+
jsxRuntime.exports = requireReactJsxRuntime_production_min();
|
|
1204
|
+
} else {
|
|
1205
|
+
jsxRuntime.exports = requireReactJsxRuntime_development();
|
|
927
1206
|
}
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
1207
|
+
var jsxRuntimeExports = jsxRuntime.exports;
|
|
1208
|
+
const stringifyConfig = {
|
|
1209
|
+
addQueryPrefix: true,
|
|
1210
|
+
skipNulls: true,
|
|
1211
|
+
arrayFormat: "indices",
|
|
1212
|
+
encode: false,
|
|
1213
|
+
encodeValuesOnly: true
|
|
934
1214
|
};
|
|
935
|
-
const
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
this.usedNamespaces = {};
|
|
939
|
-
}
|
|
940
|
-
addUsedNamespaces(namespaces) {
|
|
941
|
-
namespaces.forEach((ns) => {
|
|
942
|
-
if (!this.usedNamespaces[ns])
|
|
943
|
-
this.usedNamespaces[ns] = true;
|
|
944
|
-
});
|
|
1215
|
+
const convertToNumberIfPossible = (value) => {
|
|
1216
|
+
if (typeof value === "undefined") {
|
|
1217
|
+
return value;
|
|
945
1218
|
}
|
|
946
|
-
|
|
947
|
-
|
|
1219
|
+
const num = Number(value);
|
|
1220
|
+
if (`${num}` === value) {
|
|
1221
|
+
return num;
|
|
948
1222
|
}
|
|
949
|
-
|
|
950
|
-
const usePrevious = (value, ignore) => {
|
|
951
|
-
const ref = React.useRef();
|
|
952
|
-
React.useEffect(() => {
|
|
953
|
-
ref.current = ignore ? ref.current : value;
|
|
954
|
-
}, [value, ignore]);
|
|
955
|
-
return ref.current;
|
|
1223
|
+
return value;
|
|
956
1224
|
};
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
let joinedNS = namespaces.join();
|
|
1005
|
-
if (props.lng)
|
|
1006
|
-
joinedNS = `${props.lng}${joinedNS}`;
|
|
1007
|
-
const previousJoinedNS = usePrevious(joinedNS);
|
|
1008
|
-
const isMounted = React.useRef(true);
|
|
1009
|
-
React.useEffect(() => {
|
|
1010
|
-
const {
|
|
1011
|
-
bindI18n,
|
|
1012
|
-
bindI18nStore
|
|
1013
|
-
} = i18nOptions;
|
|
1014
|
-
isMounted.current = true;
|
|
1015
|
-
if (!ready2 && !useSuspense) {
|
|
1016
|
-
if (props.lng) {
|
|
1017
|
-
loadLanguages(i18n2, props.lng, namespaces, () => {
|
|
1018
|
-
if (isMounted.current)
|
|
1019
|
-
setT(getT);
|
|
1020
|
-
});
|
|
1021
|
-
} else {
|
|
1022
|
-
loadNamespaces(i18n2, namespaces, () => {
|
|
1023
|
-
if (isMounted.current)
|
|
1024
|
-
setT(getT);
|
|
1025
|
-
});
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
|
-
if (ready2 && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
|
|
1029
|
-
setT(getT);
|
|
1030
|
-
}
|
|
1031
|
-
function boundReset() {
|
|
1032
|
-
if (isMounted.current)
|
|
1033
|
-
setT(getT);
|
|
1034
|
-
}
|
|
1035
|
-
if (bindI18n && i18n2)
|
|
1036
|
-
i18n2.on(bindI18n, boundReset);
|
|
1037
|
-
if (bindI18nStore && i18n2)
|
|
1038
|
-
i18n2.store.on(bindI18nStore, boundReset);
|
|
1039
|
-
return () => {
|
|
1040
|
-
isMounted.current = false;
|
|
1041
|
-
if (bindI18n && i18n2)
|
|
1042
|
-
bindI18n.split(" ").forEach((e) => i18n2.off(e, boundReset));
|
|
1043
|
-
if (bindI18nStore && i18n2)
|
|
1044
|
-
bindI18nStore.split(" ").forEach((e) => i18n2.store.off(e, boundReset));
|
|
1045
|
-
};
|
|
1046
|
-
}, [i18n2, joinedNS]);
|
|
1047
|
-
const isInitial = React.useRef(true);
|
|
1048
|
-
React.useEffect(() => {
|
|
1049
|
-
if (isMounted.current && !isInitial.current) {
|
|
1050
|
-
setT(getT);
|
|
1051
|
-
}
|
|
1052
|
-
isInitial.current = false;
|
|
1053
|
-
}, [i18n2, keyPrefix]);
|
|
1054
|
-
const ret = [t, i18n2, ready2];
|
|
1055
|
-
ret.t = t;
|
|
1056
|
-
ret.i18n = i18n2;
|
|
1057
|
-
ret.ready = ready2;
|
|
1058
|
-
if (ready2)
|
|
1059
|
-
return ret;
|
|
1060
|
-
if (!ready2 && !useSuspense)
|
|
1061
|
-
return ret;
|
|
1062
|
-
throw new Promise((resolve) => {
|
|
1063
|
-
if (props.lng) {
|
|
1064
|
-
loadLanguages(i18n2, props.lng, namespaces, () => resolve());
|
|
1065
|
-
} else {
|
|
1066
|
-
loadNamespaces(i18n2, namespaces, () => resolve());
|
|
1225
|
+
const routerProvider = {
|
|
1226
|
+
go: () => {
|
|
1227
|
+
const { search: existingSearch, hash: existingHash } = reactRouterDom.useLocation();
|
|
1228
|
+
const history = reactRouterDom.useHistory();
|
|
1229
|
+
const fn = React.useCallback(
|
|
1230
|
+
({ to, type: type2, query, hash, options: { keepQuery, keepHash } = {} }) => {
|
|
1231
|
+
const urlQuery = {
|
|
1232
|
+
...keepQuery && existingSearch && qs.parse(existingSearch, { ignoreQueryPrefix: true }),
|
|
1233
|
+
...query
|
|
1234
|
+
};
|
|
1235
|
+
if (urlQuery.to) {
|
|
1236
|
+
urlQuery.to = encodeURIComponent(`${urlQuery.to}`);
|
|
1237
|
+
}
|
|
1238
|
+
const hasUrlQuery = Object.keys(urlQuery).length > 0;
|
|
1239
|
+
const urlHash = `#${(hash || keepHash && existingHash || "").replace(
|
|
1240
|
+
/^#/,
|
|
1241
|
+
""
|
|
1242
|
+
)}`;
|
|
1243
|
+
const hasUrlHash = urlHash.length > 1;
|
|
1244
|
+
const urlTo = to || "";
|
|
1245
|
+
const fullPath = `${urlTo}${hasUrlQuery ? qs.stringify(urlQuery, stringifyConfig) : ""}${hasUrlHash ? urlHash : ""}`;
|
|
1246
|
+
if (type2 === "path") {
|
|
1247
|
+
return fullPath;
|
|
1248
|
+
}
|
|
1249
|
+
return history[type2 || "push"](fullPath);
|
|
1250
|
+
},
|
|
1251
|
+
[existingHash, existingSearch, history]
|
|
1252
|
+
);
|
|
1253
|
+
return fn;
|
|
1254
|
+
},
|
|
1255
|
+
back: () => {
|
|
1256
|
+
const history = reactRouterDom.useHistory();
|
|
1257
|
+
const fn = React.useCallback(() => {
|
|
1258
|
+
history.go(-1);
|
|
1259
|
+
}, [history]);
|
|
1260
|
+
return fn;
|
|
1261
|
+
},
|
|
1262
|
+
parse: () => {
|
|
1263
|
+
var _a;
|
|
1264
|
+
let params = reactRouterDom.useParams();
|
|
1265
|
+
const { pathname, search } = reactRouterDom.useLocation();
|
|
1266
|
+
const { resources: resources2 } = React.useContext(core.ResourceContext);
|
|
1267
|
+
const { resource, action, matchedRoute } = React.useMemo(() => {
|
|
1268
|
+
return core.matchResourceFromRoute(pathname, resources2);
|
|
1269
|
+
}, [resources2, pathname]);
|
|
1270
|
+
if (Object.entries(params).length === 0 && matchedRoute) {
|
|
1271
|
+
params = ((_a = reactRouterDom.matchPath(matchedRoute, pathname)) == null ? void 0 : _a.params) || {};
|
|
1067
1272
|
}
|
|
1068
|
-
|
|
1069
|
-
|
|
1273
|
+
const fn = React.useCallback(() => {
|
|
1274
|
+
const parsedSearch = qs.parse(search, { ignoreQueryPrefix: true });
|
|
1275
|
+
const combinedParams = {
|
|
1276
|
+
...params,
|
|
1277
|
+
...parsedSearch
|
|
1278
|
+
};
|
|
1279
|
+
const response = {
|
|
1280
|
+
...resource && { resource },
|
|
1281
|
+
...action && { action },
|
|
1282
|
+
...(parsedSearch == null ? void 0 : parsedSearch.id) && { id: decodeURIComponent(parsedSearch.id) },
|
|
1283
|
+
// ...(params?.action && { action: params.action }), // lets see if there is a need for this
|
|
1284
|
+
pathname,
|
|
1285
|
+
params: {
|
|
1286
|
+
...combinedParams,
|
|
1287
|
+
current: convertToNumberIfPossible(combinedParams.current),
|
|
1288
|
+
pageSize: convertToNumberIfPossible(combinedParams.pageSize),
|
|
1289
|
+
to: combinedParams.to ? decodeURIComponent(combinedParams.to) : void 0
|
|
1290
|
+
}
|
|
1291
|
+
};
|
|
1292
|
+
return response;
|
|
1293
|
+
}, [pathname, search, params, resource, action]);
|
|
1294
|
+
return fn;
|
|
1295
|
+
},
|
|
1296
|
+
Link: React.forwardRef(function RefineLink(props, ref) {
|
|
1297
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactRouterDom.Link, { ...props, ref });
|
|
1298
|
+
})
|
|
1299
|
+
};
|
|
1070
1300
|
function useK8sYamlEditor() {
|
|
1071
1301
|
const foldSymbol = React.useCallback(function(editor, symbol) {
|
|
1072
1302
|
const model = editor.getModel();
|
|
@@ -7282,236 +7512,6 @@ var __publicField = (obj, key, value) => {
|
|
|
7282
7512
|
/* @__PURE__ */ jsxRuntimeExports.jsx(kit.form.Item, { name: ["metadata", "annotations"], label: "Annotations", children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValueListWidget, {}) })
|
|
7283
7513
|
] });
|
|
7284
7514
|
}
|
|
7285
|
-
const copy$1 = "Copy";
|
|
7286
|
-
const reset_arguments$1 = "Reset";
|
|
7287
|
-
const view_changes$1 = "Show Diff";
|
|
7288
|
-
const back_to_edit$1 = "Edit";
|
|
7289
|
-
const configure_file$1 = "Configuration";
|
|
7290
|
-
const yaml_format_wrong$1 = "Configuration is in an invalid YAML format.";
|
|
7291
|
-
const yaml_value_wrong$1 = "Configuration has invalid values.";
|
|
7292
|
-
const edit_yaml$1 = "Edit YAML";
|
|
7293
|
-
const copied$1 = "Copied";
|
|
7294
|
-
const already_reset$1 = "Already reset";
|
|
7295
|
-
const fetch_schema_fail$1 = "Failed to fetch schema.";
|
|
7296
|
-
const obtain_data_error$1 = "Having trouble getting data.";
|
|
7297
|
-
const retry$1 = "Retry";
|
|
7298
|
-
const create_resource$1 = "Create {{resource}}";
|
|
7299
|
-
const edit_resource$1 = "Edit {{resource}}";
|
|
7300
|
-
const dovetail$1 = {
|
|
7301
|
-
copy: copy$1,
|
|
7302
|
-
reset_arguments: reset_arguments$1,
|
|
7303
|
-
view_changes: view_changes$1,
|
|
7304
|
-
back_to_edit: back_to_edit$1,
|
|
7305
|
-
configure_file: configure_file$1,
|
|
7306
|
-
yaml_format_wrong: yaml_format_wrong$1,
|
|
7307
|
-
yaml_value_wrong: yaml_value_wrong$1,
|
|
7308
|
-
edit_yaml: edit_yaml$1,
|
|
7309
|
-
copied: copied$1,
|
|
7310
|
-
already_reset: already_reset$1,
|
|
7311
|
-
fetch_schema_fail: fetch_schema_fail$1,
|
|
7312
|
-
obtain_data_error: obtain_data_error$1,
|
|
7313
|
-
retry: retry$1,
|
|
7314
|
-
create_resource: create_resource$1,
|
|
7315
|
-
edit_resource: edit_resource$1
|
|
7316
|
-
};
|
|
7317
|
-
const EN = {
|
|
7318
|
-
dovetail: dovetail$1
|
|
7319
|
-
};
|
|
7320
|
-
const copy = "复制";
|
|
7321
|
-
const reset_arguments = "重置";
|
|
7322
|
-
const view_changes = "查看改动";
|
|
7323
|
-
const back_to_edit = "编辑";
|
|
7324
|
-
const configure_file = "配置内容";
|
|
7325
|
-
const yaml_format_wrong = "配置内容不是有效的 yaml 格式。";
|
|
7326
|
-
const yaml_value_wrong = "配置内容中存在不合法的值。";
|
|
7327
|
-
const edit_yaml = "编辑 YAML";
|
|
7328
|
-
const copied = "已复制";
|
|
7329
|
-
const already_reset = "已重置";
|
|
7330
|
-
const cancel = "取消";
|
|
7331
|
-
const create = "创建";
|
|
7332
|
-
const confirm_delete_text = "确定要删除 {{target}} 吗?";
|
|
7333
|
-
const edit = "编辑";
|
|
7334
|
-
const namespace = "名字空间";
|
|
7335
|
-
const name = "名称";
|
|
7336
|
-
const state = "状态";
|
|
7337
|
-
const status = "状态";
|
|
7338
|
-
const phase = "状态";
|
|
7339
|
-
const image = "容器镜像";
|
|
7340
|
-
const replicas = "副本数";
|
|
7341
|
-
const created_time = "创建时间";
|
|
7342
|
-
const label = "标签";
|
|
7343
|
-
const annotation = "注释";
|
|
7344
|
-
const type = "类型";
|
|
7345
|
-
const event = "事件";
|
|
7346
|
-
const reason = "原因";
|
|
7347
|
-
const object = "对象";
|
|
7348
|
-
const note$1 = "事件信息";
|
|
7349
|
-
const condition = "Condition";
|
|
7350
|
-
const download_yaml = "下载 YAML";
|
|
7351
|
-
const detail = "详情";
|
|
7352
|
-
const node_name = "主机名称";
|
|
7353
|
-
const restarts = "重启次数";
|
|
7354
|
-
const updated_time = "更新时间";
|
|
7355
|
-
const message = "消息";
|
|
7356
|
-
const save = "保存";
|
|
7357
|
-
const more = "更多";
|
|
7358
|
-
const workload = "工作负载";
|
|
7359
|
-
const all_namespaces = "所有名字空间";
|
|
7360
|
-
const empty = "无可显示的数据";
|
|
7361
|
-
const schedule = "调度时间表";
|
|
7362
|
-
const lastScheduleTime = "上次调度时间";
|
|
7363
|
-
const duration = "持续时间";
|
|
7364
|
-
const completions = "完成 Job 历史数";
|
|
7365
|
-
const started = "开始时间";
|
|
7366
|
-
const init_container = "初始化容器";
|
|
7367
|
-
const container = "容器";
|
|
7368
|
-
const redeploy = "重新部署";
|
|
7369
|
-
const data = "数据";
|
|
7370
|
-
const suspend = "暂停";
|
|
7371
|
-
const resume = "重新开始";
|
|
7372
|
-
const cluster = "集群";
|
|
7373
|
-
const storage = "存储";
|
|
7374
|
-
const network = "网络";
|
|
7375
|
-
const clusterIp = "集群 IP";
|
|
7376
|
-
const sessionAffinity = "会话保持";
|
|
7377
|
-
const log = "日志";
|
|
7378
|
-
const select_container = "选择容器";
|
|
7379
|
-
const wrap = "折叠";
|
|
7380
|
-
const resume_log = "继续";
|
|
7381
|
-
const log_new_lines = ",并展示 {{ count }} 行新日志";
|
|
7382
|
-
const fetch_schema_fail = "获取 schema 失败。";
|
|
7383
|
-
const obtain_data_error = "获取数据时遇到问题。";
|
|
7384
|
-
const retry = "重试";
|
|
7385
|
-
const ready = "就绪";
|
|
7386
|
-
const updating = "更新中";
|
|
7387
|
-
const completed = "完成";
|
|
7388
|
-
const failed = "异常";
|
|
7389
|
-
const suspended = "挂起";
|
|
7390
|
-
const running = "运行中";
|
|
7391
|
-
const terminating = "终止";
|
|
7392
|
-
const succeeded = "成功终止";
|
|
7393
|
-
const unknown = "未知";
|
|
7394
|
-
const pending = "待处理";
|
|
7395
|
-
const waiting = "等待中";
|
|
7396
|
-
const create_resource = "创建 {{resource}}";
|
|
7397
|
-
const edit_resource = "编辑 {{resource}}";
|
|
7398
|
-
const sec = "秒";
|
|
7399
|
-
const min = "分";
|
|
7400
|
-
const hr = "小时";
|
|
7401
|
-
const day = "天";
|
|
7402
|
-
const expand = "展开";
|
|
7403
|
-
const fold = "收起";
|
|
7404
|
-
const rule = "规则";
|
|
7405
|
-
const default_backend = "默认后端";
|
|
7406
|
-
const ingress_rule_type = "规则类型";
|
|
7407
|
-
const port = "端口";
|
|
7408
|
-
const dovetail = {
|
|
7409
|
-
copy,
|
|
7410
|
-
reset_arguments,
|
|
7411
|
-
view_changes,
|
|
7412
|
-
back_to_edit,
|
|
7413
|
-
configure_file,
|
|
7414
|
-
yaml_format_wrong,
|
|
7415
|
-
yaml_value_wrong,
|
|
7416
|
-
edit_yaml,
|
|
7417
|
-
copied,
|
|
7418
|
-
already_reset,
|
|
7419
|
-
cancel,
|
|
7420
|
-
"delete": "删除",
|
|
7421
|
-
create,
|
|
7422
|
-
confirm_delete_text,
|
|
7423
|
-
edit,
|
|
7424
|
-
namespace,
|
|
7425
|
-
name,
|
|
7426
|
-
state,
|
|
7427
|
-
status,
|
|
7428
|
-
phase,
|
|
7429
|
-
image,
|
|
7430
|
-
replicas,
|
|
7431
|
-
created_time,
|
|
7432
|
-
label,
|
|
7433
|
-
annotation,
|
|
7434
|
-
type,
|
|
7435
|
-
event,
|
|
7436
|
-
reason,
|
|
7437
|
-
object,
|
|
7438
|
-
note: note$1,
|
|
7439
|
-
condition,
|
|
7440
|
-
download_yaml,
|
|
7441
|
-
detail,
|
|
7442
|
-
node_name,
|
|
7443
|
-
restarts,
|
|
7444
|
-
updated_time,
|
|
7445
|
-
message,
|
|
7446
|
-
save,
|
|
7447
|
-
more,
|
|
7448
|
-
workload,
|
|
7449
|
-
all_namespaces,
|
|
7450
|
-
empty,
|
|
7451
|
-
schedule,
|
|
7452
|
-
lastScheduleTime,
|
|
7453
|
-
duration,
|
|
7454
|
-
completions,
|
|
7455
|
-
started,
|
|
7456
|
-
init_container,
|
|
7457
|
-
container,
|
|
7458
|
-
redeploy,
|
|
7459
|
-
data,
|
|
7460
|
-
suspend,
|
|
7461
|
-
resume,
|
|
7462
|
-
cluster,
|
|
7463
|
-
storage,
|
|
7464
|
-
network,
|
|
7465
|
-
clusterIp,
|
|
7466
|
-
sessionAffinity,
|
|
7467
|
-
log,
|
|
7468
|
-
select_container,
|
|
7469
|
-
wrap,
|
|
7470
|
-
resume_log,
|
|
7471
|
-
log_new_lines,
|
|
7472
|
-
fetch_schema_fail,
|
|
7473
|
-
obtain_data_error,
|
|
7474
|
-
retry,
|
|
7475
|
-
ready,
|
|
7476
|
-
updating,
|
|
7477
|
-
completed,
|
|
7478
|
-
failed,
|
|
7479
|
-
suspended,
|
|
7480
|
-
running,
|
|
7481
|
-
terminating,
|
|
7482
|
-
succeeded,
|
|
7483
|
-
unknown,
|
|
7484
|
-
pending,
|
|
7485
|
-
waiting,
|
|
7486
|
-
create_resource,
|
|
7487
|
-
edit_resource,
|
|
7488
|
-
sec,
|
|
7489
|
-
min,
|
|
7490
|
-
hr,
|
|
7491
|
-
day,
|
|
7492
|
-
expand,
|
|
7493
|
-
fold,
|
|
7494
|
-
rule,
|
|
7495
|
-
default_backend,
|
|
7496
|
-
ingress_rule_type,
|
|
7497
|
-
port
|
|
7498
|
-
};
|
|
7499
|
-
const ZH = {
|
|
7500
|
-
dovetail
|
|
7501
|
-
};
|
|
7502
|
-
const resources = {
|
|
7503
|
-
"en-US": EN,
|
|
7504
|
-
"zh-CN": ZH
|
|
7505
|
-
};
|
|
7506
|
-
i18n.use(initReactI18next).init({
|
|
7507
|
-
supportedLngs: ["en-US", "zh-CN"],
|
|
7508
|
-
resources,
|
|
7509
|
-
ns: Object.keys(resources["zh-CN"]),
|
|
7510
|
-
defaultNS: "dovetail",
|
|
7511
|
-
fallbackLng: ["en-US", "zh-CN"],
|
|
7512
|
-
lng: "zh-CN",
|
|
7513
|
-
nsSeparator: "."
|
|
7514
|
-
});
|
|
7515
7515
|
function addId(arr, idKey) {
|
|
7516
7516
|
return arr.map((e) => {
|
|
7517
7517
|
return {
|
|
@@ -19325,6 +19325,7 @@ var __publicField = (obj, key, value) => {
|
|
|
19325
19325
|
}
|
|
19326
19326
|
const relationPlugin = new RelationPlugin();
|
|
19327
19327
|
const ProviderPlugins = [relationPlugin, modelPlugin];
|
|
19328
|
+
const DovetailRefineI18n = i18n;
|
|
19328
19329
|
const MonacoYamlDiffEditor = (props) => {
|
|
19329
19330
|
const ref = React.useRef(null);
|
|
19330
19331
|
const { origin, modified, id, height } = props;
|
|
@@ -19390,6 +19391,7 @@ var __publicField = (obj, key, value) => {
|
|
|
19390
19391
|
exports2.DeleteManyButton = DeleteManyButton;
|
|
19391
19392
|
exports2.DeploymentModel = DeploymentModel;
|
|
19392
19393
|
exports2.Dovetail = Dovetail;
|
|
19394
|
+
exports2.DovetailRefineI18n = DovetailRefineI18n;
|
|
19393
19395
|
exports2.DrawerShow = DrawerShow;
|
|
19394
19396
|
exports2.DurationColumnRenderer = DurationColumnRenderer;
|
|
19395
19397
|
exports2.EditButton = EditButton;
|