@dovetail-v2/refine 0.0.35-beta.4 → 0.0.35

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.
@@ -31,301 +31,308 @@ var __publicField = (obj, key, value) => {
31
31
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
32
32
  }
33
33
  var dayjs_min = { exports: {} };
34
- (function(module2, exports3) {
35
- !function(t2, e2) {
36
- module2.exports = e2();
37
- }(commonjsGlobal, function() {
38
- var t2 = 1e3, e2 = 6e4, n2 = 36e5, r2 = "millisecond", i2 = "second", s2 = "minute", u = "hour", a2 = "day", o = "week", c2 = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t3) {
39
- var e3 = ["th", "st", "nd", "rd"], n3 = t3 % 100;
40
- return "[" + t3 + (e3[(n3 - 20) % 10] || e3[n3] || e3[0]) + "]";
41
- } }, m2 = function(t3, e3, n3) {
42
- var r3 = String(t3);
43
- return !r3 || r3.length >= e3 ? t3 : "" + Array(e3 + 1 - r3.length).join(n3) + t3;
44
- }, v = { s: m2, z: function(t3) {
45
- var e3 = -t3.utcOffset(), n3 = Math.abs(e3), r3 = Math.floor(n3 / 60), i3 = n3 % 60;
46
- return (e3 <= 0 ? "+" : "-") + m2(r3, 2, "0") + ":" + m2(i3, 2, "0");
47
- }, m: function t3(e3, n3) {
48
- if (e3.date() < n3.date())
49
- return -t3(n3, e3);
50
- var r3 = 12 * (n3.year() - e3.year()) + (n3.month() - e3.month()), i3 = e3.clone().add(r3, c2), s3 = n3 - i3 < 0, u2 = e3.clone().add(r3 + (s3 ? -1 : 1), c2);
51
- return +(-(r3 + (n3 - i3) / (s3 ? i3 - u2 : u2 - i3)) || 0);
52
- }, a: function(t3) {
53
- return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
54
- }, p: function(t3) {
55
- return { M: c2, y: h, w: o, d: a2, D: d, h: u, m: s2, s: i2, ms: r2, Q: f }[t3] || String(t3 || "").toLowerCase().replace(/s$/, "");
56
- }, u: function(t3) {
57
- return void 0 === t3;
58
- } }, g = "en", D = {};
59
- D[g] = M;
60
- var p = "$isDayjsObject", S = function(t3) {
61
- return t3 instanceof _ || !(!t3 || !t3[p]);
62
- }, w = function t3(e3, n3, r3) {
63
- var i3;
64
- if (!e3)
65
- return g;
66
- if ("string" == typeof e3) {
67
- var s3 = e3.toLowerCase();
68
- D[s3] && (i3 = s3), n3 && (D[s3] = n3, i3 = s3);
69
- var u2 = e3.split("-");
70
- if (!i3 && u2.length > 1)
71
- return t3(u2[0]);
72
- } else {
73
- var a3 = e3.name;
74
- D[a3] = e3, i3 = a3;
75
- }
76
- return !r3 && i3 && (g = i3), i3 || !r3 && g;
77
- }, O = function(t3, e3) {
78
- if (S(t3))
79
- return t3.clone();
80
- var n3 = "object" == typeof e3 ? e3 : {};
81
- return n3.date = t3, n3.args = arguments, new _(n3);
82
- }, b = v;
83
- b.l = w, b.i = S, b.w = function(t3, e3) {
84
- return O(t3, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
85
- };
86
- var _ = function() {
87
- function M2(t3) {
88
- this.$L = w(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p] = true;
89
- }
90
- var m3 = M2.prototype;
91
- return m3.parse = function(t3) {
92
- this.$d = function(t4) {
93
- var e3 = t4.date, n3 = t4.utc;
94
- if (null === e3)
95
- return /* @__PURE__ */ new Date(NaN);
96
- if (b.u(e3))
97
- return /* @__PURE__ */ new Date();
98
- if (e3 instanceof Date)
99
- return new Date(e3);
100
- if ("string" == typeof e3 && !/Z$/i.test(e3)) {
101
- var r3 = e3.match($);
102
- if (r3) {
103
- var i3 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3);
104
- return n3 ? new Date(Date.UTC(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3)) : new Date(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3);
105
- }
106
- }
107
- return new Date(e3);
108
- }(t3), this.init();
109
- }, m3.init = function() {
110
- var t3 = this.$d;
111
- this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds();
112
- }, m3.$utils = function() {
113
- return b;
114
- }, m3.isValid = function() {
115
- return !(this.$d.toString() === l);
116
- }, m3.isSame = function(t3, e3) {
117
- var n3 = O(t3);
118
- return this.startOf(e3) <= n3 && n3 <= this.endOf(e3);
119
- }, m3.isAfter = function(t3, e3) {
120
- return O(t3) < this.startOf(e3);
121
- }, m3.isBefore = function(t3, e3) {
122
- return this.endOf(e3) < O(t3);
123
- }, m3.$g = function(t3, e3, n3) {
124
- return b.u(t3) ? this[e3] : this.set(n3, t3);
125
- }, m3.unix = function() {
126
- return Math.floor(this.valueOf() / 1e3);
127
- }, m3.valueOf = function() {
128
- return this.$d.getTime();
129
- }, m3.startOf = function(t3, e3) {
130
- var n3 = this, r3 = !!b.u(e3) || e3, f2 = b.p(t3), l2 = function(t4, e4) {
131
- var i3 = b.w(n3.$u ? Date.UTC(n3.$y, e4, t4) : new Date(n3.$y, e4, t4), n3);
132
- return r3 ? i3 : i3.endOf(a2);
133
- }, $2 = function(t4, e4) {
134
- return b.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n3);
135
- }, y2 = this.$W, M3 = this.$M, m4 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
136
- switch (f2) {
137
- case h:
138
- return r3 ? l2(1, 0) : l2(31, 11);
139
- case c2:
140
- return r3 ? l2(1, M3) : l2(0, M3 + 1);
141
- case o:
142
- var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
143
- return l2(r3 ? m4 - D2 : m4 + (6 - D2), M3);
144
- case a2:
145
- case d:
146
- return $2(v2 + "Hours", 0);
147
- case u:
148
- return $2(v2 + "Minutes", 1);
149
- case s2:
150
- return $2(v2 + "Seconds", 2);
151
- case i2:
152
- return $2(v2 + "Milliseconds", 3);
153
- default:
154
- return this.clone();
155
- }
156
- }, m3.endOf = function(t3) {
157
- return this.startOf(t3, false);
158
- }, m3.$set = function(t3, e3) {
159
- var n3, o2 = b.p(t3), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n3 = {}, n3[a2] = f2 + "Date", n3[d] = f2 + "Date", n3[c2] = f2 + "Month", n3[h] = f2 + "FullYear", n3[u] = f2 + "Hours", n3[s2] = f2 + "Minutes", n3[i2] = f2 + "Seconds", n3[r2] = f2 + "Milliseconds", n3)[o2], $2 = o2 === a2 ? this.$D + (e3 - this.$W) : e3;
160
- if (o2 === c2 || o2 === h) {
161
- var y2 = this.clone().set(d, 1);
162
- y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
163
- } else
164
- l2 && this.$d[l2]($2);
165
- return this.init(), this;
166
- }, m3.set = function(t3, e3) {
167
- return this.clone().$set(t3, e3);
168
- }, m3.get = function(t3) {
169
- return this[b.p(t3)]();
170
- }, m3.add = function(r3, f2) {
171
- var d2, l2 = this;
172
- r3 = Number(r3);
173
- var $2 = b.p(f2), y2 = function(t3) {
174
- var e3 = O(l2);
175
- return b.w(e3.date(e3.date() + Math.round(t3 * r3)), l2);
176
- };
177
- if ($2 === c2)
178
- return this.set(c2, this.$M + r3);
179
- if ($2 === h)
180
- return this.set(h, this.$y + r3);
181
- if ($2 === a2)
182
- return y2(1);
183
- if ($2 === o)
184
- return y2(7);
185
- var M3 = (d2 = {}, d2[s2] = e2, d2[u] = n2, d2[i2] = t2, d2)[$2] || 1, m4 = this.$d.getTime() + r3 * M3;
186
- return b.w(m4, this);
187
- }, m3.subtract = function(t3, e3) {
188
- return this.add(-1 * t3, e3);
189
- }, m3.format = function(t3) {
190
- var e3 = this, n3 = this.$locale();
191
- if (!this.isValid())
192
- return n3.invalidDate || l;
193
- var r3 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i3 = b.z(this), s3 = this.$H, u2 = this.$m, a3 = this.$M, o2 = n3.weekdays, c3 = n3.months, f2 = n3.meridiem, h2 = function(t4, n4, i4, s4) {
194
- return t4 && (t4[n4] || t4(e3, r3)) || i4[n4].slice(0, s4);
195
- }, d2 = function(t4) {
196
- return b.s(s3 % 12 || 12, t4, "0");
197
- }, $2 = f2 || function(t4, e4, n4) {
198
- var r4 = t4 < 12 ? "AM" : "PM";
199
- return n4 ? r4.toLowerCase() : r4;
200
- };
201
- return r3.replace(y, function(t4, r4) {
202
- return r4 || function(t5) {
203
- switch (t5) {
204
- case "YY":
205
- return String(e3.$y).slice(-2);
206
- case "YYYY":
207
- return b.s(e3.$y, 4, "0");
208
- case "M":
209
- return a3 + 1;
210
- case "MM":
211
- return b.s(a3 + 1, 2, "0");
212
- case "MMM":
213
- return h2(n3.monthsShort, a3, c3, 3);
214
- case "MMMM":
215
- return h2(c3, a3);
216
- case "D":
217
- return e3.$D;
218
- case "DD":
219
- return b.s(e3.$D, 2, "0");
220
- case "d":
221
- return String(e3.$W);
222
- case "dd":
223
- return h2(n3.weekdaysMin, e3.$W, o2, 2);
224
- case "ddd":
225
- return h2(n3.weekdaysShort, e3.$W, o2, 3);
226
- case "dddd":
227
- return o2[e3.$W];
228
- case "H":
229
- return String(s3);
230
- case "HH":
231
- return b.s(s3, 2, "0");
232
- case "h":
233
- return d2(1);
234
- case "hh":
235
- return d2(2);
236
- case "a":
237
- return $2(s3, u2, true);
238
- case "A":
239
- return $2(s3, u2, false);
240
- case "m":
241
- return String(u2);
242
- case "mm":
243
- return b.s(u2, 2, "0");
244
- case "s":
245
- return String(e3.$s);
246
- case "ss":
247
- return b.s(e3.$s, 2, "0");
248
- case "SSS":
249
- return b.s(e3.$ms, 3, "0");
250
- case "Z":
251
- return i3;
34
+ var hasRequiredDayjs_min;
35
+ function requireDayjs_min() {
36
+ if (hasRequiredDayjs_min)
37
+ return dayjs_min.exports;
38
+ hasRequiredDayjs_min = 1;
39
+ (function(module2, exports3) {
40
+ !function(t2, e2) {
41
+ module2.exports = e2();
42
+ }(commonjsGlobal, function() {
43
+ var t2 = 1e3, e2 = 6e4, n2 = 36e5, r2 = "millisecond", i2 = "second", s2 = "minute", u = "hour", a2 = "day", o = "week", c2 = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t3) {
44
+ var e3 = ["th", "st", "nd", "rd"], n3 = t3 % 100;
45
+ return "[" + t3 + (e3[(n3 - 20) % 10] || e3[n3] || e3[0]) + "]";
46
+ } }, m2 = function(t3, e3, n3) {
47
+ var r3 = String(t3);
48
+ return !r3 || r3.length >= e3 ? t3 : "" + Array(e3 + 1 - r3.length).join(n3) + t3;
49
+ }, v = { s: m2, z: function(t3) {
50
+ var e3 = -t3.utcOffset(), n3 = Math.abs(e3), r3 = Math.floor(n3 / 60), i3 = n3 % 60;
51
+ return (e3 <= 0 ? "+" : "-") + m2(r3, 2, "0") + ":" + m2(i3, 2, "0");
52
+ }, m: function t3(e3, n3) {
53
+ if (e3.date() < n3.date())
54
+ return -t3(n3, e3);
55
+ var r3 = 12 * (n3.year() - e3.year()) + (n3.month() - e3.month()), i3 = e3.clone().add(r3, c2), s3 = n3 - i3 < 0, u2 = e3.clone().add(r3 + (s3 ? -1 : 1), c2);
56
+ return +(-(r3 + (n3 - i3) / (s3 ? i3 - u2 : u2 - i3)) || 0);
57
+ }, a: function(t3) {
58
+ return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
59
+ }, p: function(t3) {
60
+ return { M: c2, y: h, w: o, d: a2, D: d, h: u, m: s2, s: i2, ms: r2, Q: f }[t3] || String(t3 || "").toLowerCase().replace(/s$/, "");
61
+ }, u: function(t3) {
62
+ return void 0 === t3;
63
+ } }, g = "en", D = {};
64
+ D[g] = M;
65
+ var p = "$isDayjsObject", S = function(t3) {
66
+ return t3 instanceof _ || !(!t3 || !t3[p]);
67
+ }, w = function t3(e3, n3, r3) {
68
+ var i3;
69
+ if (!e3)
70
+ return g;
71
+ if ("string" == typeof e3) {
72
+ var s3 = e3.toLowerCase();
73
+ D[s3] && (i3 = s3), n3 && (D[s3] = n3, i3 = s3);
74
+ var u2 = e3.split("-");
75
+ if (!i3 && u2.length > 1)
76
+ return t3(u2[0]);
77
+ } else {
78
+ var a3 = e3.name;
79
+ D[a3] = e3, i3 = a3;
80
+ }
81
+ return !r3 && i3 && (g = i3), i3 || !r3 && g;
82
+ }, O = function(t3, e3) {
83
+ if (S(t3))
84
+ return t3.clone();
85
+ var n3 = "object" == typeof e3 ? e3 : {};
86
+ return n3.date = t3, n3.args = arguments, new _(n3);
87
+ }, b = v;
88
+ b.l = w, b.i = S, b.w = function(t3, e3) {
89
+ return O(t3, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
90
+ };
91
+ var _ = function() {
92
+ function M2(t3) {
93
+ this.$L = w(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p] = true;
94
+ }
95
+ var m3 = M2.prototype;
96
+ return m3.parse = function(t3) {
97
+ this.$d = function(t4) {
98
+ var e3 = t4.date, n3 = t4.utc;
99
+ if (null === e3)
100
+ return /* @__PURE__ */ new Date(NaN);
101
+ if (b.u(e3))
102
+ return /* @__PURE__ */ new Date();
103
+ if (e3 instanceof Date)
104
+ return new Date(e3);
105
+ if ("string" == typeof e3 && !/Z$/i.test(e3)) {
106
+ var r3 = e3.match($);
107
+ if (r3) {
108
+ var i3 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3);
109
+ return n3 ? new Date(Date.UTC(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3)) : new Date(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3);
110
+ }
252
111
  }
253
- return null;
254
- }(t4) || i3.replace(":", "");
255
- });
256
- }, m3.utcOffset = function() {
257
- return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
258
- }, m3.diff = function(r3, d2, l2) {
259
- var $2, y2 = this, M3 = b.p(d2), m4 = O(r3), v2 = (m4.utcOffset() - this.utcOffset()) * e2, g2 = this - m4, D2 = function() {
260
- return b.m(y2, m4);
112
+ return new Date(e3);
113
+ }(t3), this.init();
114
+ }, m3.init = function() {
115
+ var t3 = this.$d;
116
+ this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds();
117
+ }, m3.$utils = function() {
118
+ return b;
119
+ }, m3.isValid = function() {
120
+ return !(this.$d.toString() === l);
121
+ }, m3.isSame = function(t3, e3) {
122
+ var n3 = O(t3);
123
+ return this.startOf(e3) <= n3 && n3 <= this.endOf(e3);
124
+ }, m3.isAfter = function(t3, e3) {
125
+ return O(t3) < this.startOf(e3);
126
+ }, m3.isBefore = function(t3, e3) {
127
+ return this.endOf(e3) < O(t3);
128
+ }, m3.$g = function(t3, e3, n3) {
129
+ return b.u(t3) ? this[e3] : this.set(n3, t3);
130
+ }, m3.unix = function() {
131
+ return Math.floor(this.valueOf() / 1e3);
132
+ }, m3.valueOf = function() {
133
+ return this.$d.getTime();
134
+ }, m3.startOf = function(t3, e3) {
135
+ var n3 = this, r3 = !!b.u(e3) || e3, f2 = b.p(t3), l2 = function(t4, e4) {
136
+ var i3 = b.w(n3.$u ? Date.UTC(n3.$y, e4, t4) : new Date(n3.$y, e4, t4), n3);
137
+ return r3 ? i3 : i3.endOf(a2);
138
+ }, $2 = function(t4, e4) {
139
+ return b.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n3);
140
+ }, y2 = this.$W, M3 = this.$M, m4 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
141
+ switch (f2) {
142
+ case h:
143
+ return r3 ? l2(1, 0) : l2(31, 11);
144
+ case c2:
145
+ return r3 ? l2(1, M3) : l2(0, M3 + 1);
146
+ case o:
147
+ var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
148
+ return l2(r3 ? m4 - D2 : m4 + (6 - D2), M3);
149
+ case a2:
150
+ case d:
151
+ return $2(v2 + "Hours", 0);
152
+ case u:
153
+ return $2(v2 + "Minutes", 1);
154
+ case s2:
155
+ return $2(v2 + "Seconds", 2);
156
+ case i2:
157
+ return $2(v2 + "Milliseconds", 3);
158
+ default:
159
+ return this.clone();
160
+ }
161
+ }, m3.endOf = function(t3) {
162
+ return this.startOf(t3, false);
163
+ }, m3.$set = function(t3, e3) {
164
+ var n3, o2 = b.p(t3), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n3 = {}, n3[a2] = f2 + "Date", n3[d] = f2 + "Date", n3[c2] = f2 + "Month", n3[h] = f2 + "FullYear", n3[u] = f2 + "Hours", n3[s2] = f2 + "Minutes", n3[i2] = f2 + "Seconds", n3[r2] = f2 + "Milliseconds", n3)[o2], $2 = o2 === a2 ? this.$D + (e3 - this.$W) : e3;
165
+ if (o2 === c2 || o2 === h) {
166
+ var y2 = this.clone().set(d, 1);
167
+ y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
168
+ } else
169
+ l2 && this.$d[l2]($2);
170
+ return this.init(), this;
171
+ }, m3.set = function(t3, e3) {
172
+ return this.clone().$set(t3, e3);
173
+ }, m3.get = function(t3) {
174
+ return this[b.p(t3)]();
175
+ }, m3.add = function(r3, f2) {
176
+ var d2, l2 = this;
177
+ r3 = Number(r3);
178
+ var $2 = b.p(f2), y2 = function(t3) {
179
+ var e3 = O(l2);
180
+ return b.w(e3.date(e3.date() + Math.round(t3 * r3)), l2);
181
+ };
182
+ if ($2 === c2)
183
+ return this.set(c2, this.$M + r3);
184
+ if ($2 === h)
185
+ return this.set(h, this.$y + r3);
186
+ if ($2 === a2)
187
+ return y2(1);
188
+ if ($2 === o)
189
+ return y2(7);
190
+ var M3 = (d2 = {}, d2[s2] = e2, d2[u] = n2, d2[i2] = t2, d2)[$2] || 1, m4 = this.$d.getTime() + r3 * M3;
191
+ return b.w(m4, this);
192
+ }, m3.subtract = function(t3, e3) {
193
+ return this.add(-1 * t3, e3);
194
+ }, m3.format = function(t3) {
195
+ var e3 = this, n3 = this.$locale();
196
+ if (!this.isValid())
197
+ return n3.invalidDate || l;
198
+ var r3 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i3 = b.z(this), s3 = this.$H, u2 = this.$m, a3 = this.$M, o2 = n3.weekdays, c3 = n3.months, f2 = n3.meridiem, h2 = function(t4, n4, i4, s4) {
199
+ return t4 && (t4[n4] || t4(e3, r3)) || i4[n4].slice(0, s4);
200
+ }, d2 = function(t4) {
201
+ return b.s(s3 % 12 || 12, t4, "0");
202
+ }, $2 = f2 || function(t4, e4, n4) {
203
+ var r4 = t4 < 12 ? "AM" : "PM";
204
+ return n4 ? r4.toLowerCase() : r4;
205
+ };
206
+ return r3.replace(y, function(t4, r4) {
207
+ return r4 || function(t5) {
208
+ switch (t5) {
209
+ case "YY":
210
+ return String(e3.$y).slice(-2);
211
+ case "YYYY":
212
+ return b.s(e3.$y, 4, "0");
213
+ case "M":
214
+ return a3 + 1;
215
+ case "MM":
216
+ return b.s(a3 + 1, 2, "0");
217
+ case "MMM":
218
+ return h2(n3.monthsShort, a3, c3, 3);
219
+ case "MMMM":
220
+ return h2(c3, a3);
221
+ case "D":
222
+ return e3.$D;
223
+ case "DD":
224
+ return b.s(e3.$D, 2, "0");
225
+ case "d":
226
+ return String(e3.$W);
227
+ case "dd":
228
+ return h2(n3.weekdaysMin, e3.$W, o2, 2);
229
+ case "ddd":
230
+ return h2(n3.weekdaysShort, e3.$W, o2, 3);
231
+ case "dddd":
232
+ return o2[e3.$W];
233
+ case "H":
234
+ return String(s3);
235
+ case "HH":
236
+ return b.s(s3, 2, "0");
237
+ case "h":
238
+ return d2(1);
239
+ case "hh":
240
+ return d2(2);
241
+ case "a":
242
+ return $2(s3, u2, true);
243
+ case "A":
244
+ return $2(s3, u2, false);
245
+ case "m":
246
+ return String(u2);
247
+ case "mm":
248
+ return b.s(u2, 2, "0");
249
+ case "s":
250
+ return String(e3.$s);
251
+ case "ss":
252
+ return b.s(e3.$s, 2, "0");
253
+ case "SSS":
254
+ return b.s(e3.$ms, 3, "0");
255
+ case "Z":
256
+ return i3;
257
+ }
258
+ return null;
259
+ }(t4) || i3.replace(":", "");
260
+ });
261
+ }, m3.utcOffset = function() {
262
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
263
+ }, m3.diff = function(r3, d2, l2) {
264
+ var $2, y2 = this, M3 = b.p(d2), m4 = O(r3), v2 = (m4.utcOffset() - this.utcOffset()) * e2, g2 = this - m4, D2 = function() {
265
+ return b.m(y2, m4);
266
+ };
267
+ switch (M3) {
268
+ case h:
269
+ $2 = D2() / 12;
270
+ break;
271
+ case c2:
272
+ $2 = D2();
273
+ break;
274
+ case f:
275
+ $2 = D2() / 3;
276
+ break;
277
+ case o:
278
+ $2 = (g2 - v2) / 6048e5;
279
+ break;
280
+ case a2:
281
+ $2 = (g2 - v2) / 864e5;
282
+ break;
283
+ case u:
284
+ $2 = g2 / n2;
285
+ break;
286
+ case s2:
287
+ $2 = g2 / e2;
288
+ break;
289
+ case i2:
290
+ $2 = g2 / t2;
291
+ break;
292
+ default:
293
+ $2 = g2;
294
+ }
295
+ return l2 ? $2 : b.a($2);
296
+ }, m3.daysInMonth = function() {
297
+ return this.endOf(c2).$D;
298
+ }, m3.$locale = function() {
299
+ return D[this.$L];
300
+ }, m3.locale = function(t3, e3) {
301
+ if (!t3)
302
+ return this.$L;
303
+ var n3 = this.clone(), r3 = w(t3, e3, true);
304
+ return r3 && (n3.$L = r3), n3;
305
+ }, m3.clone = function() {
306
+ return b.w(this.$d, this);
307
+ }, m3.toDate = function() {
308
+ return new Date(this.valueOf());
309
+ }, m3.toJSON = function() {
310
+ return this.isValid() ? this.toISOString() : null;
311
+ }, m3.toISOString = function() {
312
+ return this.$d.toISOString();
313
+ }, m3.toString = function() {
314
+ return this.$d.toUTCString();
315
+ }, M2;
316
+ }(), k = _.prototype;
317
+ return O.prototype = k, [["$ms", r2], ["$s", i2], ["$m", s2], ["$H", u], ["$W", a2], ["$M", c2], ["$y", h], ["$D", d]].forEach(function(t3) {
318
+ k[t3[1]] = function(e3) {
319
+ return this.$g(e3, t3[0], t3[1]);
261
320
  };
262
- switch (M3) {
263
- case h:
264
- $2 = D2() / 12;
265
- break;
266
- case c2:
267
- $2 = D2();
268
- break;
269
- case f:
270
- $2 = D2() / 3;
271
- break;
272
- case o:
273
- $2 = (g2 - v2) / 6048e5;
274
- break;
275
- case a2:
276
- $2 = (g2 - v2) / 864e5;
277
- break;
278
- case u:
279
- $2 = g2 / n2;
280
- break;
281
- case s2:
282
- $2 = g2 / e2;
283
- break;
284
- case i2:
285
- $2 = g2 / t2;
286
- break;
287
- default:
288
- $2 = g2;
289
- }
290
- return l2 ? $2 : b.a($2);
291
- }, m3.daysInMonth = function() {
292
- return this.endOf(c2).$D;
293
- }, m3.$locale = function() {
294
- return D[this.$L];
295
- }, m3.locale = function(t3, e3) {
296
- if (!t3)
297
- return this.$L;
298
- var n3 = this.clone(), r3 = w(t3, e3, true);
299
- return r3 && (n3.$L = r3), n3;
300
- }, m3.clone = function() {
301
- return b.w(this.$d, this);
302
- }, m3.toDate = function() {
303
- return new Date(this.valueOf());
304
- }, m3.toJSON = function() {
305
- return this.isValid() ? this.toISOString() : null;
306
- }, m3.toISOString = function() {
307
- return this.$d.toISOString();
308
- }, m3.toString = function() {
309
- return this.$d.toUTCString();
310
- }, M2;
311
- }(), k = _.prototype;
312
- return O.prototype = k, [["$ms", r2], ["$s", i2], ["$m", s2], ["$H", u], ["$W", a2], ["$M", c2], ["$y", h], ["$D", d]].forEach(function(t3) {
313
- k[t3[1]] = function(e3) {
314
- return this.$g(e3, t3[0], t3[1]);
315
- };
316
- }), O.extend = function(t3, e3) {
317
- return t3.$i || (t3(e3, _, O), t3.$i = true), O;
318
- }, O.locale = w, O.isDayjs = S, O.unix = function(t3) {
319
- return O(1e3 * t3);
320
- }, O.en = D[g], O.Ls = D, O.p = {}, O;
321
- });
322
- })(dayjs_min);
323
- var dayjs_minExports = dayjs_min.exports;
321
+ }), O.extend = function(t3, e3) {
322
+ return t3.$i || (t3(e3, _, O), t3.$i = true), O;
323
+ }, O.locale = w, O.isDayjs = S, O.unix = function(t3) {
324
+ return O(1e3 * t3);
325
+ }, O.en = D[g], O.Ls = D, O.p = {}, O;
326
+ });
327
+ })(dayjs_min);
328
+ return dayjs_min.exports;
329
+ }
330
+ var dayjs_minExports = requireDayjs_min();
324
331
  const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
325
332
  var zh = { exports: {} };
326
333
  (function(module2, exports3) {
327
334
  !function(e2, _) {
328
- module2.exports = _(dayjs_minExports);
335
+ module2.exports = _(requireDayjs_min());
329
336
  }(commonjsGlobal, function(e2) {
330
337
  function _(e3) {
331
338
  return e3 && "object" == typeof e3 && "default" in e3 ? e3 : { default: e3 };
@@ -1391,11 +1398,11 @@ var __publicField = (obj, key, value) => {
1391
1398
  const port_mapping_title_tooltip = "Service 端口与 Pod 端口的映射关系。";
1392
1399
  const in_cluster_desc = "ClusterIP、NodePort 和 LoadBalancer 类型的服务,展示 ClusterIP 字段,为虚拟 IP 地址,只能在集群内部使用。";
1393
1400
  const in_cluster_ip_desc = "ClusterIP 为无头服务时,内容为空。";
1394
- const in_cluster_external_name_desc = "ExternalName 类型展示的是 externalName 字段。";
1401
+ const in_cluster_external_name_desc = "ExternalName 类型展示的是 DNS 记录。";
1395
1402
  const out_cluster_ip_desc = "ClusterIP 不支持集群外部访问。";
1396
1403
  const out_cluster_node_port_desc = "NodePort 展示<strong>节点 IP:nodeport</strong>。";
1397
- const out_cluster_lb_desc = "LoadBalancer 展示 <strong>external-IP</strong>。";
1398
- const out_external_name_desc = "ExternalName 展示为空。";
1404
+ const out_cluster_lb_desc = "LoadBalancer 展示 <strong>ingress[*].ip</strong>。";
1405
+ const out_external_name_desc = "ExternalName 展示 <strong>external-ip</strong>。";
1399
1406
  const dovetail = {
1400
1407
  copy,
1401
1408
  reset_arguments,
@@ -7940,11 +7947,12 @@ var __publicField = (obj, key, value) => {
7940
7947
  return response.json();
7941
7948
  }
7942
7949
  async findSchema(kind) {
7950
+ var _a;
7943
7951
  const result = this.response || await this.fetch();
7944
7952
  const schema = Object.values(result.components.schemas).find(
7945
7953
  (schema2) => {
7946
- var _a;
7947
- return (_a = schema2["x-kubernetes-group-version-kind"]) == null ? void 0 : _a.some(
7954
+ var _a2;
7955
+ return (_a2 = schema2["x-kubernetes-group-version-kind"]) == null ? void 0 : _a2.some(
7948
7956
  ({ kind: schemaKind, version: schemaVersion, group: schemaGroup }) => kind === schemaKind && this.apiVersion === `${schemaGroup ? schemaGroup + "/" : ""}${schemaVersion}`
7949
7957
  );
7950
7958
  }
@@ -7960,6 +7968,9 @@ var __publicField = (obj, key, value) => {
7960
7968
  }
7961
7969
  });
7962
7970
  }
7971
+ if ((_a = schema == null ? void 0 : schema.properties) == null ? void 0 : _a.status) {
7972
+ schema == null ? true : delete schema.properties.status;
7973
+ }
7963
7974
  return schema;
7964
7975
  }
7965
7976
  }
@@ -8526,8 +8537,7 @@ var __publicField = (obj, key, value) => {
8526
8537
  const WidgetErrorContent$1 = (props) => {
8527
8538
  const {
8528
8539
  refetch,
8529
- errorText,
8530
- hiddenRetry
8540
+ errorText
8531
8541
  } = props;
8532
8542
  const kit = React.useContext(eagle.kitContext);
8533
8543
  const {
@@ -8540,7 +8550,7 @@ var __publicField = (obj, key, value) => {
8540
8550
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx("p", {
8541
8551
  className: cx_default(eagle.Typo.Label.l1_regular_title, "title"),
8542
8552
  children: errorText || t2("dovetail.obtain_data_error")
8543
- }), hiddenRetry ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
8553
+ }), !refetch ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
8544
8554
  size: "small",
8545
8555
  type: "ordinary",
8546
8556
  onClick: (e2) => {
@@ -8708,8 +8718,7 @@ var __publicField = (obj, key, value) => {
8708
8718
  WidgetErrorContent$1,
8709
8719
  {
8710
8720
  errorText: t2("dovetail.no_resource", { kind: ` ${t2("dovetail.pod_selector")}` }),
8711
- style: { padding: "15px 0" },
8712
- hiddenRetry: true
8721
+ style: { padding: "15px 0" }
8713
8722
  }
8714
8723
  );
8715
8724
  }
@@ -8776,7 +8785,7 @@ var __publicField = (obj, key, value) => {
8776
8785
  id: port2.name || ""
8777
8786
  }));
8778
8787
  if ((ports == null ? void 0 : ports.length) === 0) {
8779
- return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, { errorText: t2("dovetail.no_resource", { kind: t2("dovetail.port") }), style: { padding: "15px 0" }, hiddenRetry: true });
8788
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, { errorText: t2("dovetail.no_resource", { kind: t2("dovetail.port") }), style: { padding: "15px 0" } });
8780
8789
  }
8781
8790
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
8782
8791
  Table$1,
@@ -9405,6 +9414,12 @@ var __publicField = (obj, key, value) => {
9405
9414
  WorkloadState2["WAITING"] = "waiting";
9406
9415
  return WorkloadState2;
9407
9416
  })(WorkloadState || {});
9417
+ var AccessControlAuth = /* @__PURE__ */ ((AccessControlAuth2) => {
9418
+ AccessControlAuth2["Edit"] = "Edit";
9419
+ AccessControlAuth2["Delete"] = "Delete";
9420
+ AccessControlAuth2["Create"] = "Create";
9421
+ return AccessControlAuth2;
9422
+ })(AccessControlAuth || {});
9408
9423
  function matchSelector(pod2, selector) {
9409
9424
  var _a, _b, _c;
9410
9425
  let match = true;
@@ -9829,8 +9844,9 @@ var __publicField = (obj, key, value) => {
9829
9844
  this._globalStore = _globalStore;
9830
9845
  }
9831
9846
  get displayType() {
9832
- const type2 = this._rawYaml.spec.type;
9833
- if (type2 === "ClusterIP" && !this._rawYaml.spec.clusterIP) {
9847
+ const spec = this._rawYaml.spec;
9848
+ const type2 = spec.type;
9849
+ if (type2 === "ClusterIP" && (!spec.clusterIP || spec.clusterIP === "None")) {
9834
9850
  return "Headless";
9835
9851
  }
9836
9852
  return type2;
@@ -9842,22 +9858,26 @@ var __publicField = (obj, key, value) => {
9842
9858
  var _a;
9843
9859
  return (_a = this._rawYaml.spec.ports) == null ? void 0 : _a.map((p) => {
9844
9860
  let servicePort = `${p.port}`;
9845
- if (this._rawYaml.spec.clusterIP) {
9861
+ if (this._rawYaml.spec.clusterIP && this._rawYaml.spec.clusterIP !== "None") {
9846
9862
  servicePort = `${this._rawYaml.spec.clusterIP}:${p.port}`;
9847
9863
  }
9848
- return `${servicePort} > ${p.targetPort}/${p.protocol}`;
9864
+ return {
9865
+ servicePort,
9866
+ targetPort: p.targetPort,
9867
+ protocol: p.protocol
9868
+ };
9849
9869
  });
9850
9870
  }
9851
9871
  }
9852
- const index_1lzkrja = "";
9872
+ const index_w8956m = "";
9853
9873
  const ServiceInClusterAccessComponent = ({
9854
9874
  service
9855
9875
  }) => {
9856
9876
  const spec = service._rawYaml.spec;
9857
9877
  switch (spec.type) {
9858
9878
  case ServiceTypeEnum.ExternalName:
9859
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
9860
- children: spec.externalName
9879
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
9880
+ value: service.dnsRecord
9861
9881
  });
9862
9882
  default:
9863
9883
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
@@ -9866,22 +9886,25 @@ var __publicField = (obj, key, value) => {
9866
9886
  }
9867
9887
  };
9868
9888
  const BreakLineStyle = "b1vtjd4k";
9889
+ const LinkStyle = "luro4rx";
9869
9890
  const ServiceOutClusterAccessComponent = ({
9870
9891
  service,
9871
9892
  clusterVip,
9872
9893
  breakLine = true
9873
9894
  }) => {
9874
- var _a, _b;
9895
+ var _a, _b, _c, _d;
9875
9896
  const spec = service._rawYaml.spec;
9897
+ const status = service._rawYaml.status;
9876
9898
  let content = "-";
9877
9899
  switch (spec.type) {
9878
9900
  case ServiceTypeEnum.NodePort:
9879
9901
  content = (_a = spec.ports) == null ? void 0 : _a.filter((v) => !!v).map((p, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Link, {
9880
9902
  target: "_blank",
9881
9903
  href: `http://${clusterVip}:${p.nodePort}`,
9882
- className: breakLine ? BreakLineStyle : "",
9904
+ className: cx_default(breakLine ? BreakLineStyle : "", LinkStyle),
9883
9905
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.OverflowTooltip, {
9884
- content: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
9906
+ content: /* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
9907
+ className: eagle.Typo.Label.l4_regular_title,
9885
9908
  children: [clusterVip, ":", p.nodePort, !breakLine && index !== (spec.ports || []).length - 1 ? ", " : ""]
9886
9909
  }),
9887
9910
  tooltip: `${clusterVip}:${p.nodePort}`
@@ -9890,8 +9913,17 @@ var __publicField = (obj, key, value) => {
9890
9913
  return /* @__PURE__ */ jsxRuntimeExports.jsx("ul", {
9891
9914
  children: content
9892
9915
  });
9916
+ case ServiceTypeEnum.ExternalName:
9917
+ content = /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
9918
+ value: (_b = spec.externalIPs) == null ? void 0 : _b.join(breakLine ? "\n" : ", ")
9919
+ });
9920
+ break;
9893
9921
  case ServiceTypeEnum.LoadBalancer:
9894
- content = (_b = spec.externalIPs) == null ? void 0 : _b.join(breakLine ? "\n" : ", ");
9922
+ content = /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
9923
+ value: (_d = (_c = status.loadBalancer) == null ? void 0 : _c.ingress) == null ? void 0 : _d.map(({
9924
+ ip
9925
+ }) => ip).join(breakLine ? "\n" : ", ")
9926
+ });
9895
9927
  break;
9896
9928
  default:
9897
9929
  content = /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
@@ -10315,7 +10347,11 @@ var __publicField = (obj, key, value) => {
10315
10347
  }), /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.space, {
10316
10348
  children: [selectedKeys.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteManyButton, {
10317
10349
  ids: selectedKeys
10318
- }) : void 0, !hideCreate ? /* @__PURE__ */ jsxRuntimeExports.jsx(CreateButton, {}) : null]
10350
+ }) : void 0, /* @__PURE__ */ jsxRuntimeExports.jsx(core.CanAccess, {
10351
+ resource: resource == null ? void 0 : resource.name,
10352
+ action: AccessControlAuth.Create,
10353
+ children: !hideCreate ? /* @__PURE__ */ jsxRuntimeExports.jsx(CreateButton, {}) : null
10354
+ })]
10319
10355
  })]
10320
10356
  }), description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
10321
10357
  className: DescriptionStyle,
@@ -10440,8 +10476,7 @@ var __publicField = (obj, key, value) => {
10440
10476
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
10441
10477
  WidgetErrorContent$1,
10442
10478
  {
10443
- errorText: i18n2.t("dovetail.no_resource", { kind: i18n2.t("dovetail.event") }),
10444
- hiddenRetry: true
10479
+ errorText: i18n2.t("dovetail.no_resource", { kind: i18n2.t("dovetail.event") })
10445
10480
  }
10446
10481
  );
10447
10482
  }
@@ -10562,7 +10597,7 @@ var __publicField = (obj, key, value) => {
10562
10597
  }
10563
10598
  ];
10564
10599
  if ((rows == null ? void 0 : rows.length) === 0) {
10565
- return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, { errorText: t2("dovetail.no_resource", { kind: t2("dovetail.rule") }), style: { padding: "15px 0" }, hiddenRetry: true });
10600
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, { errorText: t2("dovetail.no_resource", { kind: t2("dovetail.rule") }), style: { padding: "15px 0" } });
10566
10601
  }
10567
10602
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
10568
10603
  Table$1,
@@ -10605,8 +10640,7 @@ var __publicField = (obj, key, value) => {
10605
10640
  }, key2));
10606
10641
  if (!result.length) {
10607
10642
  return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, {
10608
- errorText: empty2 || t2("dovetail.empty"),
10609
- hiddenRetry: true
10643
+ errorText: empty2 || t2("dovetail.empty")
10610
10644
  });
10611
10645
  }
10612
10646
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {
@@ -10687,12 +10721,20 @@ var __publicField = (obj, key, value) => {
10687
10721
  const { t: t2 } = useTranslation();
10688
10722
  const openForm = useOpenForm({ id: record.id });
10689
10723
  const isInShowPage = useResourceResult.action === "show";
10724
+ const { data: canEditData } = core.useCan({
10725
+ resource: resource == null ? void 0 : resource.name,
10726
+ action: AccessControlAuth.Edit
10727
+ });
10728
+ const { data: canDeleteData } = core.useCan({
10729
+ resource: resource == null ? void 0 : resource.name,
10730
+ action: AccessControlAuth.Delete
10731
+ });
10690
10732
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
10691
10733
  /* @__PURE__ */ jsxRuntimeExports.jsx(
10692
10734
  kit.dropdown,
10693
10735
  {
10694
10736
  overlay: /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.menu, { children: [
10695
- isInShowPage ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
10737
+ isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
10696
10738
  kit.menuItem,
10697
10739
  {
10698
10740
  onClick: openForm,
@@ -10715,8 +10757,8 @@ var __publicField = (obj, key, value) => {
10715
10757
  }
10716
10758
  ),
10717
10759
  props.children,
10718
- /* @__PURE__ */ jsxRuntimeExports.jsx(kit.divider, { style: { margin: 0 } }),
10719
- /* @__PURE__ */ jsxRuntimeExports.jsx(
10760
+ (canDeleteData == null ? void 0 : canDeleteData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(kit.divider, { style: { margin: 0 } }) : null,
10761
+ (canDeleteData == null ? void 0 : canDeleteData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
10720
10762
  kit.menuItem,
10721
10763
  {
10722
10764
  danger: true,
@@ -10725,12 +10767,13 @@ var __publicField = (obj, key, value) => {
10725
10767
  },
10726
10768
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Icon, { src: iconsReact.TrashBinDelete16Icon, children: t2("dovetail.delete") })
10727
10769
  }
10728
- )
10770
+ ) : null
10729
10771
  ] }),
10772
+ trigger: ["click"],
10730
10773
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
10731
10774
  kit.button,
10732
10775
  {
10733
- type: size === "large" ? "quiet" : "tertiary",
10776
+ type: "quiet",
10734
10777
  size: size === "large" ? "middle" : "small",
10735
10778
  prefixIcon: size === "large" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
10736
10779
  eagle.Icon,
@@ -10901,13 +10944,17 @@ var __publicField = (obj, key, value) => {
10901
10944
  state: stateDisplay
10902
10945
  }) : void 0]
10903
10946
  }), /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.space, {
10904
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
10905
- style: {
10906
- marginRight: 8
10907
- },
10908
- onClick: openForm,
10909
- prefixIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(iconsReact.EditPen16GradientBlueIcon, {}),
10910
- children: t2("dovetail.edit_yaml")
10947
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx(core.CanAccess, {
10948
+ resource: resource == null ? void 0 : resource.name,
10949
+ action: AccessControlAuth.Edit,
10950
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
10951
+ style: {
10952
+ marginRight: 8
10953
+ },
10954
+ onClick: openForm,
10955
+ prefixIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(iconsReact.EditPen16GradientBlueIcon, {}),
10956
+ children: t2("dovetail.edit_yaml")
10957
+ })
10911
10958
  }), /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown, {
10912
10959
  record,
10913
10960
  size: "large"
@@ -10958,7 +11005,7 @@ var __publicField = (obj, key, value) => {
10958
11005
  eagle.Button,
10959
11006
  {
10960
11007
  type: "quiet",
10961
- prefixIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Icon, { src: iconsReact.ViewEye16GrayIcon }),
11008
+ prefixIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Icon, { src: hideSecret ? iconsReact.ViewEye16GrayIcon : iconsReact.EntityFilterIgnoreGradient16GrayIcon }),
10962
11009
  onClick: () => setHideSecret((v) => !v),
10963
11010
  children: hideSecret ? i18n2.t("dovetail.show_data_value") : i18n2.t("dovetail.hide_data_value")
10964
11011
  }
@@ -11009,8 +11056,7 @@ var __publicField = (obj, key, value) => {
11009
11056
  }),
11010
11057
  style: {
11011
11058
  padding: "15px 0"
11012
- },
11013
- hiddenRetry: true
11059
+ }
11014
11060
  });
11015
11061
  }
11016
11062
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.space, {
@@ -11194,16 +11240,23 @@ var __publicField = (obj, key, value) => {
11194
11240
  const {
11195
11241
  i18n: i18n2
11196
11242
  } = useTranslation();
11197
- return /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
11198
- className: EditButtonStyle,
11199
- type: "link",
11200
- onClick: () => {
11201
- eagle.pushModal({
11202
- component: EditFieldModal,
11203
- props: modalProps
11204
- });
11205
- },
11206
- children: i18n2.t("dovetail.edit")
11243
+ const {
11244
+ resource
11245
+ } = core.useResource();
11246
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(core.CanAccess, {
11247
+ resource: resource == null ? void 0 : resource.name,
11248
+ action: AccessControlAuth.Edit,
11249
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
11250
+ className: EditButtonStyle,
11251
+ type: "link",
11252
+ onClick: () => {
11253
+ eagle.pushModal({
11254
+ component: EditFieldModal,
11255
+ props: modalProps
11256
+ });
11257
+ },
11258
+ children: i18n2.t("dovetail.edit")
11259
+ })
11207
11260
  });
11208
11261
  }
11209
11262
  const index_c9frt4 = "";
@@ -11571,17 +11624,17 @@ var __publicField = (obj, key, value) => {
11571
11624
  return /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValueAnnotation, { data: value2, expandable: true });
11572
11625
  }
11573
11626
  });
11574
- const ServiceInnerClusterAccessField = (i18n2) => ({
11627
+ const ServiceInnerClusterAccessField = () => ({
11575
11628
  key: "innerClusterAccess",
11576
- title: i18n2.t("dovetail.in_cluster_access"),
11629
+ title: /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceInClusterAccessTitle, {}),
11577
11630
  path: [],
11578
11631
  renderContent: (_, record) => {
11579
11632
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceInClusterAccessComponent, { service: record });
11580
11633
  }
11581
11634
  });
11582
- const ServiceOutClusterAccessField = (i18n2, clusterVip) => ({
11635
+ const ServiceOutClusterAccessField = (clusterVip) => ({
11583
11636
  key: "innerClusterAccess",
11584
- title: i18n2.t("dovetail.out_cluster_access"),
11637
+ title: /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceOutClusterAccessTitle, {}),
11585
11638
  path: [],
11586
11639
  renderContent: (_, record) => {
11587
11640
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceOutClusterAccessComponent, { service: record, clusterVip, breakLine: false });
@@ -17272,6 +17325,10 @@ var __publicField = (obj, key, value) => {
17272
17325
  signal
17273
17326
  }).then((response) => {
17274
17327
  var _a3;
17328
+ if (response.status !== 200) {
17329
+ setLogs([]);
17330
+ return;
17331
+ }
17275
17332
  const reader = (_a3 = response.body) == null ? void 0 : _a3.getReader();
17276
17333
  if (!reader) {
17277
17334
  return;
@@ -17292,6 +17349,7 @@ var __publicField = (obj, key, value) => {
17292
17349
  }
17293
17350
  const total = buffer + chunk.slice(0, lastIndex);
17294
17351
  buffer = chunk.slice(lastIndex + 1);
17352
+ console.log(total);
17295
17353
  const formattedLogs = total.split("\n").filter(Boolean).map((line) => {
17296
17354
  const [timestamps, ...content] = line.split(" ");
17297
17355
  const t22 = new Date(timestamps).toLocaleString();
@@ -17381,8 +17439,7 @@ var __publicField = (obj, key, value) => {
17381
17439
  },
17382
17440
  errorText: t2("dovetail.no_resource", {
17383
17441
  kind: t2("dovetail.previous_log")
17384
- }),
17385
- hiddenRetry: true
17442
+ })
17386
17443
  }) : /* @__PURE__ */ jsxRuntimeExports.jsx(LogViewer, {
17387
17444
  innerRef: logViewerRef,
17388
17445
  height: "100%",
@@ -17499,7 +17556,7 @@ var __publicField = (obj, key, value) => {
17499
17556
  model.dispose();
17500
17557
  editor.dispose();
17501
17558
  };
17502
- }, [defaultValue, schema, id, readOnly, isScrollOnFocus, getInstance]);
17559
+ }, [schema, id, readOnly, isScrollOnFocus, getInstance]);
17503
17560
  React.useEffect(() => {
17504
17561
  const editor = instanceRef.current.editor;
17505
17562
  if (editor) {
@@ -17608,8 +17665,7 @@ var __publicField = (obj, key, value) => {
17608
17665
  }),
17609
17666
  style: {
17610
17667
  padding: "15px 0"
17611
- },
17612
- hiddenRetry: true
17668
+ }
17613
17669
  });
17614
17670
  }
17615
17671
  return /* @__PURE__ */ jsxRuntimeExports.jsx(MonacoYamlEditor$1, {
@@ -17690,7 +17746,7 @@ var __publicField = (obj, key, value) => {
17690
17746
  [containerStatuses, initContainerStatuses]
17691
17747
  );
17692
17748
  if (dataSource.length === 0) {
17693
- return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, { errorText: i18n2.t("dovetail.no_resource", { kind: i18n2.t("dovetail.container") }), style: { padding: "15px 0" }, hiddenRetry: true });
17749
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, { errorText: i18n2.t("dovetail.no_resource", { kind: i18n2.t("dovetail.container") }), style: { padding: "15px 0" } });
17694
17750
  }
17695
17751
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
17696
17752
  Table$1,
@@ -17928,8 +17984,12 @@ var __publicField = (obj, key, value) => {
17928
17984
  const { resource } = core.useResource();
17929
17985
  const { mutateAsync } = core.useUpdate();
17930
17986
  const { t: t2 } = useTranslation();
17987
+ const { data: canEditData } = core.useCan({
17988
+ resource: resource == null ? void 0 : resource.name,
17989
+ action: AccessControlAuth.Edit
17990
+ });
17931
17991
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(K8sDropdown, { record, size, children: [
17932
- /* @__PURE__ */ jsxRuntimeExports.jsx(
17992
+ (canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
17933
17993
  kit.menu.Item,
17934
17994
  {
17935
17995
  onClick: async () => {
@@ -17968,7 +18028,7 @@ var __publicField = (obj, key, value) => {
17968
18028
  },
17969
18029
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Icon, { src: iconsReact.Retry16GradientBlueIcon, children: t2("dovetail.redeploy") })
17970
18030
  }
17971
- ),
18031
+ ) : null,
17972
18032
  children
17973
18033
  ] });
17974
18034
  }
@@ -17977,10 +18037,14 @@ var __publicField = (obj, key, value) => {
17977
18037
  const kit = eagle.useUIKit();
17978
18038
  const { t: t2 } = useTranslation();
17979
18039
  const formRef = React.useRef(null);
17980
- const { action } = core.useResource();
18040
+ const { action, resource } = core.useResource();
17981
18041
  const isInShowPage = action === "show";
18042
+ const { data: canEditData } = core.useCan({
18043
+ resource: resource == null ? void 0 : resource.name,
18044
+ action: AccessControlAuth.Edit
18045
+ });
17982
18046
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(WorkloadDropdown, { record, size, children: [
17983
- isInShowPage ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
18047
+ isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
17984
18048
  kit.menu.Item,
17985
18049
  {
17986
18050
  onClick: () => {
@@ -18139,7 +18203,7 @@ var __publicField = (obj, key, value) => {
18139
18203
  return void 0;
18140
18204
  }
18141
18205
  }
18142
- const index_p3hly3 = "";
18206
+ const index_ccf0kl = "";
18143
18207
  const SelectStyle = "sj0ggy";
18144
18208
  const SearchInputStyle = "s1eo8uqs";
18145
18209
  const SelectContentStyle = "s64gojc";
@@ -18223,7 +18287,7 @@ var __publicField = (obj, key, value) => {
18223
18287
  },
18224
18288
  children: label2
18225
18289
  }) : /* @__PURE__ */ jsxRuntimeExports.jsx(kit.token, {
18226
- className: isCountToken ? CountTokenStyle : TokenStyle,
18290
+ className: cx_default(isCountToken ? CountTokenStyle : TokenStyle, isCountToken ? "" : "closable-token"),
18227
18291
  closable,
18228
18292
  onClose,
18229
18293
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(kit.overflowTooltip, {
@@ -18233,6 +18297,8 @@ var __publicField = (obj, key, value) => {
18233
18297
  },
18234
18298
  maxTagCount: 1,
18235
18299
  optionLabelProp: "label",
18300
+ showArrow: true,
18301
+ showSearch: false,
18236
18302
  multiple: true,
18237
18303
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx(kit.option, {
18238
18304
  value: "_all",
@@ -18303,8 +18369,7 @@ var __publicField = (obj, key, value) => {
18303
18369
  children: !(tableProps.data.length || tableProps.loading) ? /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, {
18304
18370
  errorText: tableProps.empty || t2("dovetail.no_resource", {
18305
18371
  kind: ` ${config.kind}`
18306
- }),
18307
- hiddenRetry: true
18372
+ })
18308
18373
  }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Table$1, {
18309
18374
  ...tableProps,
18310
18375
  empty: tableProps.empty || t2("dovetail.no_resource", {
@@ -18320,7 +18385,7 @@ var __publicField = (obj, key, value) => {
18320
18385
  });
18321
18386
  }
18322
18387
  function ResourceList(props) {
18323
- const { formatter, name: name2, columns, Dropdown, noShow } = props.config;
18388
+ const { formatter, columns, Dropdown, noShow } = props.config;
18324
18389
  const { i18n: i18n2 } = useTranslation();
18325
18390
  const nameRenderer = noShow ? PlainTextNameColumnRenderer(i18n2) : NameColumnRenderer(i18n2);
18326
18391
  const { tableProps, selectedKeys } = useEagleTable({
@@ -22393,7 +22458,7 @@ var __publicField = (obj, key, value) => {
22393
22458
  ]
22394
22459
  }
22395
22460
  ),
22396
- /* @__PURE__ */ jsxRuntimeExports.jsx(
22461
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
22397
22462
  "div",
22398
22463
  {
22399
22464
  style: {
@@ -22402,29 +22467,32 @@ var __publicField = (obj, key, value) => {
22402
22467
  height: height || "500px",
22403
22468
  zIndex: 1
22404
22469
  },
22405
- children: isDiff ? /* @__PURE__ */ jsxRuntimeExports.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: PlainCodeStyle, children: value2 }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
22406
- MonacoYamlDiffEditor$2,
22407
- {
22408
- id: props.id,
22409
- origin: defaultValue,
22410
- modified: value2,
22411
- height
22412
- }
22413
- ) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: PlainCodeStyle, children: value2 }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
22414
- MonacoYamlEditor,
22415
- {
22416
- id: props.id,
22417
- getInstance,
22418
- defaultValue,
22419
- height,
22420
- onChange,
22421
- onValidate,
22422
- onEditorCreate,
22423
- onBlur: props.onBlur,
22424
- schema,
22425
- readOnly
22426
- }
22427
- ) })
22470
+ children: [
22471
+ /* @__PURE__ */ jsxRuntimeExports.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: PlainCodeStyle, children: value2 }), children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { display: isDiff ? "none" : "block" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
22472
+ MonacoYamlEditor,
22473
+ {
22474
+ id: props.id,
22475
+ getInstance,
22476
+ defaultValue: value2,
22477
+ height,
22478
+ onChange,
22479
+ onValidate,
22480
+ onEditorCreate,
22481
+ onBlur: props.onBlur,
22482
+ schema,
22483
+ readOnly
22484
+ }
22485
+ ) }) }),
22486
+ isDiff ? /* @__PURE__ */ jsxRuntimeExports.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: PlainCodeStyle, children: value2 }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
22487
+ MonacoYamlDiffEditor$2,
22488
+ {
22489
+ id: props.id,
22490
+ origin: defaultValue,
22491
+ modified: value2,
22492
+ height
22493
+ }
22494
+ ) }) : null
22495
+ ]
22428
22496
  }
22429
22497
  )
22430
22498
  ]
@@ -23041,8 +23109,12 @@ var __publicField = (obj, key, value) => {
23041
23109
  const { resource } = core.useResource();
23042
23110
  const { mutateAsync } = core.useUpdate();
23043
23111
  const { t: t2 } = useTranslation();
23112
+ const { data: canEditData } = core.useCan({
23113
+ resource: resource == null ? void 0 : resource.name,
23114
+ action: AccessControlAuth.Edit
23115
+ });
23044
23116
  const suspended2 = Boolean(spec == null ? void 0 : spec.suspend);
23045
- return /* @__PURE__ */ jsxRuntimeExports.jsx(K8sDropdown, { record, size, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
23117
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(K8sDropdown, { record, size, children: (canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
23046
23118
  kit.menu.Item,
23047
23119
  {
23048
23120
  onClick: async () => {
@@ -23081,7 +23153,7 @@ var __publicField = (obj, key, value) => {
23081
23153
  },
23082
23154
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Icon, { src: suspended2 ? iconsReact.RecoverContinue16GradientBlueIcon : iconsReact.Pause16GradientBlueIcon, children: t2(suspended2 ? "dovetail.resume" : "dovetail.suspend") })
23083
23155
  }
23084
- ) });
23156
+ ) : null });
23085
23157
  }
23086
23158
  const index_1wzdp7m = "";
23087
23159
  const WrapperStyle = "wfg6u6g";
@@ -23581,32 +23653,38 @@ var __publicField = (obj, key, value) => {
23581
23653
  sorter: CommonSorter(dataIndex)
23582
23654
  };
23583
23655
  };
23584
- const ServiceInClusterAccessColumnRenderer = (i18n2) => {
23585
- return {
23586
- key: "inClusterAccess",
23587
- title: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Tooltip, {
23588
- overlayClassName: ServiceClusterTooltipStyle,
23589
- title: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
23656
+ function ServiceInClusterAccessTitle() {
23657
+ const {
23658
+ i18n: i18n2
23659
+ } = useTranslation();
23660
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Tooltip, {
23661
+ overlayClassName: ServiceClusterTooltipStyle,
23662
+ title: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
23663
+ style: {
23664
+ lineHeight: "22px"
23665
+ },
23666
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23667
+ children: i18n2.t("dovetail.in_cluster_desc")
23668
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23669
+ children: i18n2.t("dovetail.in_cluster_ip_desc")
23670
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Divider, {
23590
23671
  style: {
23591
- lineHeight: "22px"
23592
- },
23593
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23594
- children: i18n2.t("dovetail.in_cluster_desc")
23595
- }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23596
- children: i18n2.t("dovetail.in_cluster_ip_desc")
23597
- }), /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Divider, {
23598
- style: {
23599
- margin: "6px 0"
23600
- }
23601
- }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23602
- children: i18n2.t("dovetail.in_cluster_external_name_desc")
23603
- })]
23604
- }),
23605
- children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
23606
- className: DashedTitleStyle,
23607
- children: i18n2.t("dovetail.in_cluster_access")
23608
- })
23672
+ margin: "6px 0"
23673
+ }
23674
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23675
+ children: i18n2.t("dovetail.in_cluster_external_name_desc")
23676
+ })]
23609
23677
  }),
23678
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
23679
+ className: DashedTitleStyle,
23680
+ children: i18n2.t("dovetail.in_cluster_access")
23681
+ })
23682
+ });
23683
+ }
23684
+ const ServiceInClusterAccessColumnRenderer = () => {
23685
+ return {
23686
+ key: "inClusterAccess",
23687
+ title: /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceInClusterAccessTitle, {}),
23610
23688
  display: true,
23611
23689
  dataIndex: [],
23612
23690
  width: 160,
@@ -23617,34 +23695,40 @@ var __publicField = (obj, key, value) => {
23617
23695
  }
23618
23696
  };
23619
23697
  };
23620
- const ServiceOutClusterAccessColumnRenderer = (i18n2, clusterVip) => {
23698
+ function ServiceOutClusterAccessTitle() {
23699
+ const {
23700
+ i18n: i18n2
23701
+ } = useTranslation();
23702
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Tooltip, {
23703
+ overlayClassName: ServiceClusterTooltipStyle,
23704
+ title: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
23705
+ style: {
23706
+ lineHeight: "22px"
23707
+ },
23708
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23709
+ children: i18n2.t("dovetail.out_cluster_ip_desc")
23710
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23711
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trans, {
23712
+ i18nKey: "dovetail.out_cluster_node_port_desc"
23713
+ })
23714
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23715
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trans, {
23716
+ i18nKey: "dovetail.out_cluster_lb_desc"
23717
+ })
23718
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23719
+ children: i18n2.t("dovetail.out_external_name_desc")
23720
+ })]
23721
+ }),
23722
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
23723
+ className: DashedTitleStyle,
23724
+ children: i18n2.t("dovetail.out_cluster_access")
23725
+ })
23726
+ });
23727
+ }
23728
+ const ServiceOutClusterAccessColumnRenderer = (clusterVip) => {
23621
23729
  return {
23622
23730
  key: "outClusterAccess",
23623
- title: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Tooltip, {
23624
- overlayClassName: ServiceClusterTooltipStyle,
23625
- title: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
23626
- style: {
23627
- lineHeight: "22px"
23628
- },
23629
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23630
- children: i18n2.t("dovetail.out_cluster_ip_desc")
23631
- }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23632
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trans, {
23633
- i18nKey: "dovetail.out_cluster_node_port_desc"
23634
- })
23635
- }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23636
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trans, {
23637
- i18nKey: "dovetail.out_cluster_lb_desc"
23638
- })
23639
- }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23640
- children: i18n2.t("dovetail.out_external_name_desc")
23641
- })]
23642
- }),
23643
- children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
23644
- className: DashedTitleStyle,
23645
- children: i18n2.t("dovetail.out_cluster_access")
23646
- })
23647
- }),
23731
+ title: /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceOutClusterAccessTitle, {}),
23648
23732
  display: true,
23649
23733
  dataIndex: [],
23650
23734
  width: 160,
@@ -23667,6 +23751,11 @@ var __publicField = (obj, key, value) => {
23667
23751
  sorter: CommonSorter(dataIndex),
23668
23752
  width: 160,
23669
23753
  render(value2, record) {
23754
+ if (!(value2 == null ? void 0 : value2.length)) {
23755
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
23756
+ value: ""
23757
+ });
23758
+ }
23670
23759
  return value2.map((o) => /* @__PURE__ */ jsxRuntimeExports.jsx(ReferenceLink, {
23671
23760
  ownerReference: o,
23672
23761
  namespace: record.metadata.namespace || "default"
@@ -23801,10 +23890,21 @@ var __publicField = (obj, key, value) => {
23801
23890
  display: true,
23802
23891
  dataIndex: ["displayPortMapping"],
23803
23892
  width: 300,
23804
- render(value2) {
23805
- const content = value2.map((v) => /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.OverflowTooltip, {
23806
- content: v
23807
- }, v));
23893
+ render(value2, record) {
23894
+ var _a;
23895
+ const content = (_a = record.displayPortMapping) == null ? void 0 : _a.map((v) => /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.OverflowTooltip, {
23896
+ content: /* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
23897
+ style: {
23898
+ whiteSpace: "pre"
23899
+ },
23900
+ children: [record.displayType === "NodePort" ? /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Link, {
23901
+ href: `//${v.servicePort}`,
23902
+ target: "_blank",
23903
+ children: v.servicePort
23904
+ }) : v.servicePort, " > ", v.targetPort, "/", v.protocol]
23905
+ }),
23906
+ tooltip: `${v.servicePort} > ${v.targetPort}/${v.protocol}`
23907
+ }, v.servicePort));
23808
23908
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {
23809
23909
  children: content
23810
23910
  });
@@ -23894,7 +23994,7 @@ var __publicField = (obj, key, value) => {
23894
23994
  };
23895
23995
  const styles = "";
23896
23996
  const Dovetail = (props) => {
23897
- const { resourcesConfig, urlPrefix = "", Layout: Layout2, history, globalStore } = props;
23997
+ const { resourcesConfig, urlPrefix = "", Layout: Layout2, history, globalStore, accessControlProvider } = props;
23898
23998
  const msg = eagle.useMessage();
23899
23999
  const notCustomResources = React.useMemo(() => {
23900
24000
  return resourcesConfig.filter((c2) => !c2.isCustom);
@@ -23938,6 +24038,7 @@ var __publicField = (obj, key, value) => {
23938
24038
  liveMode: "auto",
23939
24039
  disableTelemetry: true
23940
24040
  },
24041
+ accessControlProvider,
23941
24042
  resources: resourcesConfig.map((c2) => {
23942
24043
  return {
23943
24044
  name: c2.name,
@@ -24133,6 +24234,7 @@ var __publicField = (obj, key, value) => {
24133
24234
  default: MonacoYamlDiffEditor
24134
24235
  }, Symbol.toStringTag, { value: "Module" }));
24135
24236
  exports2.ALL_NS = ALL_NS;
24237
+ exports2.AccessControlAuth = AccessControlAuth;
24136
24238
  exports2.AgeColumnRenderer = AgeColumnRenderer;
24137
24239
  exports2.AgeField = AgeField;
24138
24240
  exports2.AnnotationsField = AnnotationsField;
@@ -24264,11 +24366,13 @@ var __publicField = (obj, key, value) => {
24264
24366
  exports2.Separator = Separator;
24265
24367
  exports2.ServiceInClusterAccessColumnRenderer = ServiceInClusterAccessColumnRenderer;
24266
24368
  exports2.ServiceInClusterAccessComponent = ServiceInClusterAccessComponent;
24369
+ exports2.ServiceInClusterAccessTitle = ServiceInClusterAccessTitle;
24267
24370
  exports2.ServiceInnerClusterAccessField = ServiceInnerClusterAccessField;
24268
24371
  exports2.ServiceModel = ServiceModel;
24269
24372
  exports2.ServiceOutClusterAccessColumnRenderer = ServiceOutClusterAccessColumnRenderer;
24270
24373
  exports2.ServiceOutClusterAccessComponent = ServiceOutClusterAccessComponent;
24271
24374
  exports2.ServiceOutClusterAccessField = ServiceOutClusterAccessField;
24375
+ exports2.ServiceOutClusterAccessTitle = ServiceOutClusterAccessTitle;
24272
24376
  exports2.ServicePodsField = ServicePodsField;
24273
24377
  exports2.ServicePodsGroup = ServicePodsGroup;
24274
24378
  exports2.ServiceTypeColumnRenderer = ServiceTypeColumnRenderer;