@das-fed/upf-utils 6.4.0-dev.287 → 6.4.0-dev.289

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.
Files changed (78) hide show
  1. package/api-services/es5.js +1672 -1660
  2. package/api-services/index.js +1362 -1344
  3. package/api-services/index.js.gz +0 -0
  4. package/api-services/modules/app-manage/es5.js +1110 -1122
  5. package/api-services/modules/app-manage/index.js +918 -936
  6. package/api-services/modules/app-manage/index.js.gz +0 -0
  7. package/api-services/modules/authentication/es5.js +1122 -1134
  8. package/api-services/modules/authentication/index.js +930 -948
  9. package/api-services/modules/authentication/index.js.gz +0 -0
  10. package/api-services/modules/bems/es5.js +1137 -1128
  11. package/api-services/modules/bems/index.js +950 -936
  12. package/api-services/modules/bems/index.js.gz +0 -0
  13. package/api-services/modules/contract/es5.js +1122 -1134
  14. package/api-services/modules/contract/index.js +930 -948
  15. package/api-services/modules/contract/index.js.gz +0 -0
  16. package/api-services/modules/duty-manage/es5.js +848 -850
  17. package/api-services/modules/duty-manage/index.js +666 -670
  18. package/api-services/modules/duty-manage/index.js.gz +0 -0
  19. package/api-services/modules/es5.js +1355 -1367
  20. package/api-services/modules/file/es5.js +1224 -1221
  21. package/api-services/modules/file/index.js +997 -993
  22. package/api-services/modules/file/index.js.gz +0 -0
  23. package/api-services/modules/gateway-edge/es5.js +1122 -1134
  24. package/api-services/modules/gateway-edge/index.js +930 -948
  25. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  26. package/api-services/modules/index.js +1068 -1086
  27. package/api-services/modules/index.js.gz +0 -0
  28. package/api-services/modules/justauth/es5.js +873 -876
  29. package/api-services/modules/justauth/index.js +684 -688
  30. package/api-services/modules/justauth/index.js.gz +0 -0
  31. package/api-services/modules/knowledge/es5.js +1132 -1122
  32. package/api-services/modules/knowledge/index.js +944 -930
  33. package/api-services/modules/knowledge/index.js.gz +0 -0
  34. package/api-services/modules/link/es5.js +860 -857
  35. package/api-services/modules/link/index.js +674 -670
  36. package/api-services/modules/link/index.js.gz +0 -0
  37. package/api-services/modules/platformManage/es5.js +1238 -1226
  38. package/api-services/modules/platformManage/index.js +1032 -1014
  39. package/api-services/modules/platformManage/index.js.gz +0 -0
  40. package/api-services/modules/portal/es5.js +1124 -1133
  41. package/api-services/modules/portal/index.js +933 -947
  42. package/api-services/modules/portal/index.js.gz +0 -0
  43. package/api-services/modules/space-manage/es5.js +860 -857
  44. package/api-services/modules/space-manage/index.js +674 -670
  45. package/api-services/modules/space-manage/index.js.gz +0 -0
  46. package/api-services/modules/supplier/es5.js +1126 -1114
  47. package/api-services/modules/supplier/index.js +938 -920
  48. package/api-services/modules/supplier/index.js.gz +0 -0
  49. package/api-services/modules/systemConfiguration/es5.js +1122 -1134
  50. package/api-services/modules/systemConfiguration/index.js +930 -948
  51. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  52. package/api-services/src/create-service/es5.js +1132 -1120
  53. package/api-services/src/create-service/index.js +947 -929
  54. package/api-services/src/create-service/index.js.gz +0 -0
  55. package/common-info/getPermissionMethod/es5.js +1388 -1376
  56. package/common-info/getPermissionMethod/index.js +1155 -1137
  57. package/common-info/getPermissionMethod/index.js.gz +0 -0
  58. package/common-tools/timezone-format/es5.d.ts +1 -0
  59. package/common-tools/timezone-format/es5.js +159 -146
  60. package/common-tools/timezone-format/index.d.ts +1 -0
  61. package/common-tools/timezone-format/index.js +127 -111
  62. package/common-tools/timezone-format/index.js.gz +0 -0
  63. package/config/es5.js +12 -8
  64. package/config/index.js +7 -4
  65. package/create-api-service/es5.js +1133 -1121
  66. package/create-api-service/index.js +948 -930
  67. package/create-api-service/index.js.gz +0 -0
  68. package/esm-map.json +4 -1
  69. package/package.json +7 -7
  70. package/realtime-connection/es5.d.ts +70 -0
  71. package/realtime-connection/es5.js +340 -0
  72. package/realtime-connection/index.d.ts +70 -0
  73. package/realtime-connection/index.js +168 -0
  74. package/realtime-connection/index.js.gz +0 -0
  75. package/release-meta.json +4 -4
  76. package/theme/es5.js +41 -41
  77. package/theme/index.js +35 -35
  78. package/theme/index.js.gz +0 -0
@@ -172,6 +172,7 @@ export declare const timeZoneDayjs: TimeZoneDayjsFactory;
172
172
  export declare const setRuntimeIanaTimeZoneDataSnapshot: (data: Pick<PackedIanaData, "version" | "zones" | "links">, source?: RuntimeIanaTimeZoneDataSource) => RuntimeIanaTimeZoneDataSnapshot;
173
173
  export declare const getRuntimeIanaTimeZoneDataSnapshot: () => RuntimeIanaTimeZoneDataSnapshot | null;
174
174
  export declare const getRuntimeNameZoneDataSnapshot: () => RuntimeIanaTimeZoneDataSnapshot | null;
175
+ export declare const readInjectedParentIanaTimeZoneDataSnapshot: () => RuntimeIanaTimeZoneDataSnapshot | null;
175
176
  export declare const clientTimeZone: any;
176
177
  export declare const isKnownTimeZone: (timeZone?: string | null) => any;
177
178
  export declare const rebuildKnownTimeZoneIds: (data: Pick<PackedIanaData, "zones" | "links">) => any;
@@ -96,7 +96,7 @@ function Pe(e) {
96
96
  o = o / 60, r += W(c.charCodeAt(a)) * o;
97
97
  return (n + r) * t;
98
98
  }
99
- function Y(e) {
99
+ function U(e) {
100
100
  const t = [];
101
101
  for (const n of e)
102
102
  t.push(Pe(n));
@@ -126,7 +126,7 @@ function Fe(e) {
126
126
  const t = e.split("|");
127
127
  if (t.length < 5)
128
128
  throw new Error("Invalid packed zone format");
129
- const n = C(t[0]), r = Y(K(t[2])), o = Y(t[3].split("")), s = Ye(Y(K(t[4]))), i = Ue(r, o);
129
+ const n = C(t[0]), r = U(K(t[2])), o = U(t[3].split("")), s = Ye(U(K(t[4]))), i = Ue(r, o);
130
130
  return {
131
131
  name: n,
132
132
  rule: {
@@ -185,16 +185,16 @@ function He(e, t, n) {
185
185
  const Ge = (e, t, n) => {
186
186
  var a, u;
187
187
  let r = "";
188
- const o = n.tz, s = (a = o == null ? void 0 : o.guess) == null ? void 0 : a.bind(o), i = (u = o == null ? void 0 : o.setDefault) == null ? void 0 : u.bind(o), c = (m, g, D) => {
189
- const _ = D || g || r, y = D ? g : void 0;
190
- return (typeof n.utc == "function" ? n.utc(m, y) : n(m, y).utc()).tz(_);
188
+ const o = n.tz, s = (a = o == null ? void 0 : o.guess) == null ? void 0 : a.bind(o), i = (u = o == null ? void 0 : o.setDefault) == null ? void 0 : u.bind(o), c = (m, y, I) => {
189
+ const _ = I || y || r, g = I ? y : void 0;
190
+ return (typeof n.utc == "function" ? n.utc(m, g) : n(m, g).utc()).tz(_);
191
191
  };
192
192
  o && Object.assign(c, o), c.setDefault = (m) => {
193
193
  r = m, i == null || i(m);
194
- }, c.guess = () => s ? s() : typeof Intl < "u" && typeof Intl.DateTimeFormat == "function" ? Intl.DateTimeFormat().resolvedOptions().timeZone || r || "UTC" : r || "UTC", n.tz = c, t.prototype.tz = function(m = r, g) {
195
- var I;
196
- const D = m || ((I = c.guess) == null ? void 0 : I.call(c)) || "UTC", _ = this.utc().valueOf(), y = He(_, D, Re());
197
- return this.utcOffset(-y, g);
194
+ }, c.guess = () => s ? s() : typeof Intl < "u" && typeof Intl.DateTimeFormat == "function" ? Intl.DateTimeFormat().resolvedOptions().timeZone || r || "UTC" : r || "UTC", n.tz = c, t.prototype.tz = function(m = r, y) {
195
+ var A;
196
+ const I = m || ((A = c.guess) == null ? void 0 : A.call(c)) || "UTC", _ = this.utc().valueOf(), g = He(_, I, Re());
197
+ return this.utcOffset(-g, y);
198
198
  };
199
199
  }, T = Ge;
200
200
  T.preloadFromApi = Oe;
@@ -215,7 +215,8 @@ function $e(e) {
215
215
  };
216
216
  }
217
217
  function ie(e, t) {
218
- if (!e || typeof e.tz != "object" || typeof e.tz.load != "function")
218
+ const n = e == null ? void 0 : e.tz;
219
+ if (!n || typeof n.load != "function")
219
220
  throw new Error("moment.tz.load is missing. Import moment-timezone before calling loadIanaData.");
220
221
  if (!t || !Array.isArray(t.zones))
221
222
  throw new Error("Invalid packed IANA data: zones must be an array");
@@ -240,7 +241,7 @@ async function q(e, t, n) {
240
241
  }
241
242
  f.extend(Me);
242
243
  f.extend(_e);
243
- const A = "zh-CN", Je = "YYYY.MM.DD HH:mm:ss", w = "YYYY-MM-DD HH:mm:ss", We = "YYYY-MM-DD HH:mm:ss.SSS", Ke = "YYYY-MM-DDTHH:mm:ssZ", ce = "YYYY-MM-DD HH:mm", N = "UTC", j = "timeZone", fe = "timezonechange", qe = "__UPF_TIMEZONE_CHANGE__", Xe = "ianatimezonedatachange", X = {
244
+ const E = "zh-CN", Je = "YYYY.MM.DD HH:mm:ss", w = "YYYY-MM-DD HH:mm:ss", We = "YYYY-MM-DD HH:mm:ss.SSS", Ke = "YYYY-MM-DDTHH:mm:ssZ", ce = "YYYY-MM-DD HH:mm", O = "UTC", j = "timeZone", fe = "timezonechange", qe = "__UPF_TIMEZONE_CHANGE__", Xe = "ianatimezonedatachange", X = {
244
245
  zh: "夏令时",
245
246
  default: "DST"
246
247
  }, Qe = [
@@ -262,41 +263,55 @@ const A = "zh-CN", Je = "YYYY.MM.DD HH:mm:ss", w = "YYYY-MM-DD HH:mm:ss", We = "
262
263
  "Etc/GMT+0",
263
264
  "Etc/GMT-0",
264
265
  "Etc/Greenwich"
265
- ], et = f, E = /* @__PURE__ */ new Set();
266
+ ], et = f, p = /* @__PURE__ */ new Set();
266
267
  var te, ne;
267
268
  const tt = (ne = (te = f.tz) == null ? void 0 : te.guess) == null ? void 0 : ne.bind(f.tz);
268
269
  let b = !1;
269
- const l = (e) => (e || "").trim(), U = (e) => {
270
+ const l = (e) => (e || "").trim(), F = (e) => {
270
271
  const t = l(e);
271
- t && E.add(t);
272
- }, nt = () => Qe.forEach(U), p = () => typeof window > "u" ? void 0 : window, rt = (e) => ({
272
+ t && p.add(t);
273
+ }, nt = () => Qe.forEach(F), D = () => typeof window > "u" ? void 0 : window, rt = (e) => ({
273
274
  version: typeof e.version == "string" ? e.version : void 0,
274
275
  zones: Array.isArray(e.zones) ? e.zones.filter((t) => typeof t == "string") : [],
275
276
  links: Array.isArray(e.links) ? e.links.filter((t) => typeof t == "string") : []
276
- }), F = (e, t, n = Date.now()) => ({
277
+ }), k = (e, t, n = Date.now()) => ({
277
278
  ...rt(e),
278
279
  source: t,
279
280
  timestamp: n
280
- }), O = (e, t = "iana") => {
281
- const n = F(e, t);
281
+ }), v = (e, t = "iana") => {
282
+ const n = k(e, t);
282
283
  try {
283
- const r = p();
284
+ const r = D();
284
285
  r && (r.__UPF_IANA_TIMEZONE_DATA__ = n, r.dispatchEvent(new CustomEvent(Xe, { detail: n })));
285
286
  } catch {
286
287
  }
287
288
  return n;
288
289
  }, ot = () => {
289
290
  var r;
290
- const e = p(), t = e == null ? void 0 : e.__UPF_IANA_TIMEZONE_DATA__;
291
+ const e = D(), t = e == null ? void 0 : e.__UPF_IANA_TIMEZONE_DATA__;
291
292
  if (t && Array.isArray(t.zones) && t.zones.length)
292
- return F(
293
+ return k(
293
294
  t,
294
295
  t.source === "fallback" ? "fallback" : "iana",
295
296
  Number(t.timestamp || Date.now())
296
297
  );
297
298
  const n = (r = T.getCachedPackedData) == null ? void 0 : r.call(T);
298
- return n ? F(n, "iana") : null;
299
- }, Vt = ot, x = () => {
299
+ return n ? k(n, "iana") : null;
300
+ }, Vt = ot, jt = () => {
301
+ var t, n;
302
+ const e = D();
303
+ if (!(e != null && e.name)) return null;
304
+ try {
305
+ const r = (n = (t = JSON.parse(e.name || "{}")) == null ? void 0 : t.parentData) == null ? void 0 : n.ianaTimeZoneData;
306
+ return !r || !Array.isArray(r.zones) || !r.zones.length ? null : k(
307
+ r,
308
+ r.source === "fallback" ? "fallback" : "iana",
309
+ Number(r.timestamp || Date.now())
310
+ );
311
+ } catch {
312
+ return null;
313
+ }
314
+ }, x = () => {
300
315
  try {
301
316
  return typeof sessionStorage > "u" ? "" : l(sessionStorage.getItem(j));
302
317
  } catch {
@@ -309,7 +324,7 @@ const l = (e) => (e || "").trim(), U = (e) => {
309
324
  }
310
325
  }, R = () => {
311
326
  var t;
312
- const e = p();
327
+ const e = D();
313
328
  if (!(e != null && e.name)) return "";
314
329
  try {
315
330
  const n = (t = JSON.parse(e.name || "{}")) == null ? void 0 : t.parentData;
@@ -321,7 +336,7 @@ const l = (e) => (e || "").trim(), U = (e) => {
321
336
  timeZone: l(e),
322
337
  source: t,
323
338
  timestamp: Date.now()
324
- }), k = Se(x() || R()), V = /* @__PURE__ */ new Set();
339
+ }), N = Se(x() || R()), V = /* @__PURE__ */ new Set();
325
340
  let Q = !1;
326
341
  const le = () => {
327
342
  if (!(typeof Intl > "u" || typeof Intl.DateTimeFormat != "function"))
@@ -340,23 +355,23 @@ const le = () => {
340
355
  }
341
356
  }, z = (e) => {
342
357
  const t = l(e);
343
- return t ? E.size ? E.has(t) : at(t) : !1;
344
- }, v = (e) => (E.clear(), e.zones.forEach((t) => {
358
+ return t ? p.size ? p.has(t) : at(t) : !1;
359
+ }, P = (e) => (p.clear(), e.zones.forEach((t) => {
345
360
  const n = t.split("|")[0];
346
- U(n);
361
+ F(n);
347
362
  }), (e.links || []).forEach((t) => {
348
363
  t.split("|").forEach((n) => {
349
- U(n);
364
+ F(n);
350
365
  });
351
- }), nt(), Array.from(E)), jt = () => Array.from(E), xt = async (e, t = {}) => {
352
- const n = T.preloadFromData(e), r = v(n);
353
- return b || (f.extend(T), b = !0), H(t.defaultTimeZone), t.syncRuntimeSnapshot !== !1 && O(n, t.runtimeSource || "iana"), { data: n, knownTimeZones: r };
354
- }, Rt = async (e = {}) => {
355
- const t = await T.preloadFromApi(e), n = v(t);
356
- return b || (f.extend(T), b = !0), H(e.defaultTimeZone), e.syncRuntimeSnapshot !== !1 && O(t, e.runtimeSource || "iana"), { data: t, knownTimeZones: n };
357
- }, Ht = (e, t) => (ie(e, t), v(t), O(t, "iana"), t), Gt = async (e, t = {}) => {
366
+ }), nt(), Array.from(p)), xt = () => Array.from(p), Rt = async (e, t = {}) => {
367
+ const n = T.preloadFromData(e), r = P(n);
368
+ return b || (f.extend(T), b = !0), H(t.defaultTimeZone), t.syncRuntimeSnapshot !== !1 && v(n, t.runtimeSource || "iana"), { data: n, knownTimeZones: r };
369
+ }, Ht = async (e = {}) => {
370
+ const t = await T.preloadFromApi(e), n = P(t);
371
+ return b || (f.extend(T), b = !0), H(e.defaultTimeZone), e.syncRuntimeSnapshot !== !1 && v(t, e.runtimeSource || "iana"), { data: t, knownTimeZones: n };
372
+ }, Gt = (e, t) => (ie(e, t), P(t), v(t, "iana"), t), $t = async (e, t = {}) => {
358
373
  const { url: n, ...r } = t, o = n ? await q(e, n, r) : await q(e, r);
359
- return v(o), O(o, "iana"), o;
374
+ return P(o), v(o, "iana"), o;
360
375
  }, me = () => {
361
376
  var n;
362
377
  const e = (n = f.tz) == null ? void 0 : n.guess, t = typeof e == "function" ? e : tt;
@@ -368,7 +383,7 @@ const le = () => {
368
383
  }, H = (e) => {
369
384
  var r, o;
370
385
  const t = l(e), n = f.tz;
371
- return t ? z(t) ? ((o = n == null ? void 0 : n.setDefault) == null || o.call(n, t), !0) : !1 : ((r = n == null ? void 0 : n.setDefault) == null || r.call(n, N), !0);
386
+ return t ? z(t) ? ((o = n == null ? void 0 : n.setDefault) == null || o.call(n, t), !0) : !1 : ((r = n == null ? void 0 : n.setDefault) == null || r.call(n, O), !0);
372
387
  }, it = (e) => {
373
388
  V.forEach((t) => {
374
389
  try {
@@ -379,28 +394,28 @@ const le = () => {
379
394
  }, ct = (e) => {
380
395
  var t;
381
396
  try {
382
- (t = p()) == null || t.dispatchEvent(new CustomEvent(fe, { detail: e }));
397
+ (t = D()) == null || t.dispatchEvent(new CustomEvent(fe, { detail: e }));
383
398
  } catch {
384
399
  }
385
400
  }, G = (e, t = {}) => {
386
- const n = l(e), r = ue(n, t.source), o = k.value !== n;
387
- o && (k.value = n);
401
+ const n = l(e), r = ue(n, t.source), o = N.value !== n;
402
+ o && (N.value = n);
388
403
  try {
389
- const s = p();
404
+ const s = D();
390
405
  s && (s.__UPF_TIMEZONE_SNAPSHOT__ = r);
391
406
  } catch {
392
407
  }
393
408
  return t.persist !== !1 && st(n), t.syncDefault !== !1 && H(n), t.notify !== !1 && o && it(r), t.dispatchEvent !== !1 && ct(r), n;
394
- }, $t = (e, t = {}) => G(l(e), {
409
+ }, Bt = (e, t = {}) => G(l(e), {
395
410
  persist: !0,
396
411
  notify: !0,
397
412
  dispatchEvent: !0,
398
413
  syncDefault: !0,
399
414
  ...t
400
- }), Bt = (e = "sync") => {
415
+ }), Jt = (e = "sync") => {
401
416
  const t = x() || R();
402
- return t || k.value ? G(t, { source: e, dispatchEvent: !1 }) : "";
403
- }, Jt = (e) => (V.add(e), () => V.delete(e)), ft = (e) => {
417
+ return t || N.value ? G(t, { source: e, dispatchEvent: !1 }) : "";
418
+ }, Wt = (e) => (V.add(e), () => V.delete(e)), ft = (e) => {
404
419
  var n, r, o, s;
405
420
  if (typeof e == "string") return ue(e);
406
421
  if (!e || typeof e != "object") return null;
@@ -424,33 +439,33 @@ const le = () => {
424
439
  const t = e.data;
425
440
  !t || t.type !== qe || $(t.detail || t, "message");
426
441
  }, dt = () => {
427
- const e = p();
442
+ const e = D();
428
443
  return !e || Q ? !1 : (Q = !0, e.addEventListener(fe, ut), e.addEventListener("storage", lt), e.addEventListener("message", mt), !0);
429
444
  };
430
445
  dt();
431
446
  const Tt = () => {
432
- const t = l(k.value) || x() || R() || me() || le();
433
- return z(t) ? l(t) : N;
447
+ const t = l(N.value) || x() || R() || me() || le();
448
+ return z(t) ? l(t) : O;
434
449
  }, d = (e) => {
435
450
  const t = l(e) || Tt();
436
- return z(t) ? t : N;
451
+ return z(t) ? t : O;
437
452
  }, de = () => {
438
453
  const e = me() || le();
439
- return z(e) ? l(e) : N;
454
+ return z(e) ? l(e) : O;
440
455
  }, Te = (e = {}) => {
441
456
  const t = l(e.timeZone);
442
457
  return t ? d(t) : e.useClientTimeZone ? d() : de();
443
458
  }, B = (e) => e === "instant" || e === "local" ? e : "none", he = (e = {}) => B(e.timeZoneMode) !== "none", ht = () => {
444
459
  var e;
445
- return typeof window < "u" && ((e = window.navigator) != null && e.language) ? window.navigator.language : A;
460
+ return typeof window < "u" && ((e = window.navigator) != null && e.language) ? window.navigator.language : E;
446
461
  }, Ze = (e, t = []) => {
447
- const r = e || ht() || A, o = r.toLowerCase();
462
+ const r = e || ht() || E, o = r.toLowerCase();
448
463
  if (!t.length)
449
- return o === "en" ? "en-US" : o === "zh" || o === "zh-cn" ? A : r;
464
+ return o === "en" ? "en-US" : o === "zh" || o === "zh-cn" ? E : r;
450
465
  const s = t.find((a) => a.toLowerCase() === o);
451
466
  if (s) return s;
452
467
  const i = o.split("-")[0], c = t.find((a) => a.toLowerCase().split("-")[0] === i);
453
- return c || (i === "en" ? t.find((a) => a.toLowerCase().startsWith("en-")) || r : i === "zh" ? t.find((a) => a.toLowerCase().startsWith("zh-")) || A : r);
468
+ return c || (i === "en" ? t.find((a) => a.toLowerCase().startsWith("en-")) || r : i === "zh" ? t.find((a) => a.toLowerCase().startsWith("zh-")) || E : r);
454
469
  }, M = (e) => {
455
470
  if (f.isDayjs(e)) return e;
456
471
  if (e == null || e === "") return f();
@@ -464,19 +479,19 @@ const Tt = () => {
464
479
  return h(e) ? f().tz(r) : f.isDayjs(e) ? e.tz(r) : f.tz(e, r);
465
480
  const o = Z(e);
466
481
  return o.isValid() ? o.tz(r) : o;
467
- }, ge = (e, t = !1) => {
482
+ }, ye = (e, t = !1) => {
468
483
  const n = l(e);
469
484
  return n ? d(n) : t ? d() : "";
470
- }, Wt = () => et, Kt = (e, t = {}) => he(t) ? h(e) ? null : Zt(e, t) : e, gt = (e, t = {}) => {
485
+ }, Kt = () => et, qt = (e, t = {}) => he(t) ? h(e) ? null : Zt(e, t) : e, yt = (e, t = {}) => {
471
486
  const n = B(t.timeZoneMode), r = t.timeZoneValueFormat || (n === "instant" ? Ke : w);
472
487
  return e.format(r);
473
- }, qt = (e, t = {}) => {
488
+ }, Xt = (e, t = {}) => {
474
489
  if (!he(t) || h(e)) return e;
475
490
  const n = Te(t), r = Z(e);
476
491
  if (!r.isValid()) return e;
477
492
  const o = r.format(We), s = f.tz(o, n);
478
- return gt(s, t);
479
- }, yt = (e, t) => M(e).tz(d(t)).utcOffset(), Dt = (e, t, n = ce) => M(e).tz(d(t)).format(n), It = /^(\d{4}-\d{2}-\d{2})/, At = (e = {}) => {
493
+ return yt(s, t);
494
+ }, gt = (e, t) => M(e).tz(d(t)).utcOffset(), Dt = (e, t, n = ce) => M(e).tz(d(t)).format(n), It = /^(\d{4}-\d{2}-\d{2})/, At = (e = {}) => {
480
495
  const t = l(e.timeZone);
481
496
  return t ? d(t) : e.useClientTimeZone === !1 ? de() : d();
482
497
  }, Et = (e, t, n) => {
@@ -491,24 +506,24 @@ const Tt = () => {
491
506
  }
492
507
  const r = Z(e);
493
508
  return r.isValid() ? r.format("YYYY-MM-DD") : "";
494
- }, ye = (e, t = {}, n) => {
509
+ }, ge = (e, t = {}, n) => {
495
510
  const r = At(t), o = Et(e, r, t.inputMode || "date");
496
511
  if (!o) return;
497
512
  const s = f.tz(o, r);
498
513
  if (s.isValid())
499
514
  return (n === "start" ? s.startOf("day") : s.endOf("day")).valueOf();
500
- }, Xt = (e, t = {}) => ye(e, t, "start"), Qt = (e, t = {}) => ye(e, t, "end"), wt = (e, t) => Z(e).format(t.format), De = (e, t) => {
501
- const n = t.format || w, r = ge(t.timeZone, t.useClientTimeZone);
502
- if (!r) return wt(e, { format: n });
515
+ }, Qt = (e, t = {}) => ge(e, t, "start"), en = (e, t = {}) => ge(e, t, "end"), pt = (e, t) => Z(e).format(t.format), De = (e, t) => {
516
+ const n = t.format || w, r = ye(t.timeZone, t.useClientTimeZone);
517
+ if (!r) return pt(e, { format: n });
503
518
  if (t.inputMode === "local")
504
519
  return h(e) ? f().tz(r).format(n) : f.tz(e, r).format(n);
505
520
  const o = Z(e);
506
521
  return o.isValid() ? o.tz(r).format(n) : o.format(n);
507
- }, pt = (e) => typeof e == "function" && typeof (e == null ? void 0 : e.tz) == "function", zt = (e, t) => {
522
+ }, wt = (e) => typeof e == "function" && typeof (e == null ? void 0 : e.tz) == "function", zt = (e, t) => {
508
523
  var a, u;
509
524
  const { moment: n } = t, r = t.format || w;
510
- if (!pt(n)) return De(e, { ...t, dateLibrary: "dayjs" });
511
- const o = h(e) ? void 0 : e, s = ge(t.timeZone, t.useClientTimeZone);
525
+ if (!wt(n)) return De(e, { ...t, dateLibrary: "dayjs" });
526
+ const o = h(e) ? void 0 : e, s = ye(t.timeZone, t.useClientTimeZone);
512
527
  if (!s || typeof n.tz != "function") return n(o).format(r);
513
528
  if (t.inputMode === "local")
514
529
  return h(e) ? ((u = (a = n()).tz) == null ? void 0 : u.call(a, s).format(r)) || n().format(r) : n.tz(o, s).format(r);
@@ -546,8 +561,8 @@ const Tt = () => {
546
561
  SSS: n
547
562
  };
548
563
  return e.replace(/YYYY|SSS|YY|MM|DD|HH|mm|ss|M|D|H|m|s/g, (o) => r[o] ?? o);
549
- }, en = (e, t = {}) => {
550
- const n = typeof t == "string" ? { format: t } : t || {}, r = n.format || w, o = Ze(n.locale || A), s = d(n.timeZone), i = Z(e);
564
+ }, tn = (e, t = {}) => {
565
+ const n = typeof t == "string" ? { format: t } : t || {}, r = n.format || w, o = Ze(n.locale || E), s = d(n.timeZone), i = Z(e);
551
566
  if (!i.isValid()) return i.format(r);
552
567
  try {
553
568
  const c = i.toDate(), a = St(c, s, o), u = String(c.getMilliseconds()).padStart(3, "0");
@@ -555,8 +570,8 @@ const Tt = () => {
555
570
  } catch {
556
571
  return Ie(e, { format: r, timeZone: s });
557
572
  }
558
- }, tn = (e, t = w, n = {}) => Ie(e, { ...n, format: t }), ee = (e) => String(e).padStart(2, "0"), Ae = (e) => `UTC${e}`, Ee = (e, t) => {
559
- const n = yt(e, t), r = n >= 0 ? "+" : "-", o = Math.abs(n);
573
+ }, nn = (e, t = w, n = {}) => Ie(e, { ...n, format: t }), ee = (e) => String(e).padStart(2, "0"), Ae = (e) => `UTC${e}`, Ee = (e, t) => {
574
+ const n = gt(e, t), r = n >= 0 ? "+" : "-", o = Math.abs(n);
560
575
  return `UTC${r}${ee(Math.floor(o / 60))}:${ee(o % 60)}`;
561
576
  }, _t = (e, t = /* @__PURE__ */ new Date()) => {
562
577
  const n = e.currentUtcOffsetText || e.baseUtcOffsetText;
@@ -575,7 +590,7 @@ const Tt = () => {
575
590
  } catch {
576
591
  return r;
577
592
  }
578
- }, we = (e, t) => {
593
+ }, pe = (e, t) => {
579
594
  const n = t.year();
580
595
  return Array.from(
581
596
  new Set(
@@ -585,26 +600,26 @@ const Tt = () => {
585
600
  })
586
601
  )
587
602
  );
588
- }, pe = (e, t) => {
603
+ }, we = (e, t) => {
589
604
  const n = d(e);
590
605
  if (!z(n)) return !1;
591
606
  const r = M(t).tz(n);
592
- return we(n, r).length > 1;
593
- }, P = (e, t) => {
607
+ return pe(n, r).length > 1;
608
+ }, Y = (e, t) => {
594
609
  const n = d(e);
595
610
  if (!z(n)) return !1;
596
- const r = M(t).tz(n), o = we(n, r);
611
+ const r = M(t).tz(n), o = pe(n, r);
597
612
  return o.length <= 1 ? !1 : r.utcOffset() === Math.max(...o);
598
- }, nn = (e, t) => P(e, t), ze = (e) => {
613
+ }, rn = (e, t) => Y(e, t), ze = (e) => {
599
614
  if (e === 1 || e === "1") return !0;
600
615
  if (e === 0 || e === "0") return !1;
601
616
  }, bt = (e, t) => {
602
617
  const n = ze(e.dynamicOffsetFlag);
603
- return typeof n == "boolean" ? n : pe(e.timeZoneId, t);
618
+ return typeof n == "boolean" ? n : we(e.timeZoneId, t);
604
619
  }, kt = (e, t) => {
605
620
  const n = ze(e.currentDstFlag);
606
- return typeof n == "boolean" ? n : P(e.timeZoneId, t);
607
- }, rn = (e, t = /* @__PURE__ */ new Date()) => e.map((n) => {
621
+ return typeof n == "boolean" ? n : Y(e.timeZoneId, t);
622
+ }, on = (e, t = /* @__PURE__ */ new Date()) => e.map((n) => {
608
623
  const r = n.tzShowName || _t(n, t), o = bt(n, t);
609
624
  return {
610
625
  value: n.timeZoneId,
@@ -616,7 +631,7 @@ const Tt = () => {
616
631
  }), Nt = (e) => {
617
632
  const t = e.toLowerCase().split("-")[0];
618
633
  return X[t] || X.default;
619
- }, Ot = (e) => typeof e.showDaylightSavingLabel == "boolean" ? e.showDaylightSavingLabel : e.showDaylightSavingMarker ?? !0, on = (e, t, n = {}) => {
634
+ }, Ot = (e) => typeof e.showDaylightSavingLabel == "boolean" ? e.showDaylightSavingLabel : e.showDaylightSavingMarker ?? !0, sn = (e, t, n = {}) => {
620
635
  const {
621
636
  showZoneLabel: r = !0,
622
637
  zoneLabel: o,
@@ -625,10 +640,10 @@ const Tt = () => {
625
640
  standardTimeLabel: c,
626
641
  daylightSavingLabel: a,
627
642
  format: u = ce
628
- } = n, m = d(t), g = Dt(e, m, u), D = typeof s == "boolean" ? s : pe(m, e), y = (typeof i == "boolean" ? i : P(m, e)) ? a : c, I = D && y ? `[${y}]` : "";
629
- return r ? [g, o || Ee(e, m), I].filter(Boolean).join(" ") : [g, I].filter(Boolean).join(" ");
630
- }, sn = (e = {}) => {
631
- const t = Ze(e.locale, e.supportedLocales), n = d(e.timeZone), r = M(e.value).tz(n), o = Ct(n, t, r), s = Ae(r.format("Z")), i = P(n, r), c = i ? Nt(t) : "", a = Ot(e), u = i && a ? `${o} - ${c}` : o;
643
+ } = n, m = d(t), y = Dt(e, m, u), I = typeof s == "boolean" ? s : we(m, e), g = (typeof i == "boolean" ? i : Y(m, e)) ? a : c, A = I && g ? `[${g}]` : "";
644
+ return r ? [y, o || Ee(e, m), A].filter(Boolean).join(" ") : [y, A].filter(Boolean).join(" ");
645
+ }, an = (e = {}) => {
646
+ const t = Ze(e.locale, e.supportedLocales), n = d(e.timeZone), r = M(e.value).tz(n), o = Ct(n, t, r), s = Ae(r.format("Z")), i = Y(n, r), c = i ? Nt(t) : "", a = Ot(e), u = i && a ? `${o} - ${c}` : o;
632
647
  return {
633
648
  formattedValue: r.format(e.format || Je),
634
649
  locale: t,
@@ -646,60 +661,61 @@ export {
646
661
  fe as TIMEZONE_CHANGE_EVENT,
647
662
  re as TIME_ZONE_PACKED_DATA_URL,
648
663
  qe as UPF_TIMEZONE_MESSAGE_TYPE,
649
- xt as applyDayjsIanaTimeZoneData,
650
- Ht as applyMomentIanaTimeZoneData,
664
+ Rt as applyDayjsIanaTimeZoneData,
665
+ Gt as applyMomentIanaTimeZoneData,
651
666
  se as assertPackedIanaData,
652
667
  $e as assertPackedIanaTzData,
653
668
  oe as buildIanaFetchInit,
654
- rn as buildTimeZoneDisplayOptions,
669
+ on as buildTimeZoneDisplayOptions,
655
670
  ve as clearDayjsIanaCache,
656
- k as clientTimeZone,
671
+ N as clientTimeZone,
657
672
  xe as createIanaDbFromPackedData,
658
673
  T as dayjsTimezoneIanaPlugin,
659
- on as formatClientLocalDateTimeLine,
674
+ sn as formatClientLocalDateTimeLine,
660
675
  Dt as formatInTimeZone,
661
676
  Ie as formatLocalDateTime,
662
- en as formatLocalDateTimeIntl,
677
+ tn as formatLocalDateTimeIntl,
663
678
  Ee as formatTimeZoneOffsetLabel,
664
- qt as fromTimeZonePickerValue,
679
+ Xt as fromTimeZonePickerValue,
665
680
  Le as getAccessTokenFromLocalStorage,
666
681
  Ne as getCachedDayjsPackedIanaData,
667
682
  Tt as getClientTimeZone,
668
683
  Ce as getDefaultIanaAuthorization,
669
- jt as getKnownTimeZoneIds,
684
+ xt as getKnownTimeZoneIds,
670
685
  ot as getRuntimeIanaTimeZoneDataSnapshot,
671
686
  Vt as getRuntimeNameZoneDataSnapshot,
672
- Wt as getTimeZoneDayjs,
673
- sn as getTimeZoneDisplayInfo,
674
- yt as getZoneUtcOffset,
687
+ Kt as getTimeZoneDayjs,
688
+ an as getTimeZoneDisplayInfo,
689
+ gt as getZoneUtcOffset,
675
690
  dt as initClientTimeZoneSync,
676
- nn as isDaylightSavingTime,
691
+ rn as isDaylightSavingTime,
677
692
  z as isKnownTimeZone,
678
- pt as isMomentTimezoneFormatInstance,
693
+ wt as isMomentTimezoneFormatInstance,
679
694
  he as isTimeZonePickerModeEnabled,
680
- Rt as loadDayjsIanaTimeZoneData,
695
+ Ht as loadDayjsIanaTimeZoneData,
681
696
  ie as loadIanaData,
682
697
  q as loadIanaFromApi,
683
698
  ie as loadMomentIanaData,
684
699
  q as loadMomentIanaFromApi,
685
- Gt as loadMomentIanaTimeZoneData,
700
+ $t as loadMomentIanaTimeZoneData,
686
701
  Ze as normalizeLocaleCode,
687
- Jt as onClientTimeZoneChange,
702
+ Wt as onClientTimeZoneChange,
688
703
  Oe as preloadDayjsIanaFromApi,
689
704
  ae as preloadDayjsIanaFromData,
690
- v as rebuildKnownTimeZoneIds,
705
+ jt as readInjectedParentIanaTimeZoneDataSnapshot,
706
+ P as rebuildKnownTimeZoneIds,
691
707
  Te as resolvePickerTimeZone,
692
708
  d as resolveTimeZone,
693
709
  _t as resolveUtcOffsetFallback,
694
- $t as setClientTimeZone,
710
+ Bt as setClientTimeZone,
695
711
  H as setDefaultTimeZone,
696
- O as setRuntimeIanaTimeZoneDataSnapshot,
697
- Bt as syncClientTimeZone,
712
+ v as setRuntimeIanaTimeZoneDataSnapshot,
713
+ Jt as syncClientTimeZone,
698
714
  et as timeZoneDayjs,
699
- pe as timeZoneHasDST,
700
- P as timeZoneIsDST,
701
- tn as toLocalDate,
702
- Kt as toTimeZonePickerValue,
703
- Qt as toTimestampAtZoneEndOfDay,
704
- Xt as toTimestampAtZoneStartOfDay
715
+ we as timeZoneHasDST,
716
+ Y as timeZoneIsDST,
717
+ nn as toLocalDate,
718
+ qt as toTimeZonePickerValue,
719
+ en as toTimestampAtZoneEndOfDay,
720
+ Qt as toTimestampAtZoneStartOfDay
705
721
  };
package/config/es5.js CHANGED
@@ -6,12 +6,16 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
6
6
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
7
7
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
8
8
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
- var n = function n() {
10
- var s = _objectSpread({}, (window == null ? undefined : window.config) || {});
11
- s.rootContainer || (s.rootContainer = "#app"), s.baseURL || (s.baseURL = location.origin), s.ossBaseURL || (s.ossBaseURL = "/oss"), s.ossBaseURL.startsWith("/") && (s.ossBaseURL = "".concat(s.baseURL, "/oss")), s.ssoBaseURL || (s.ssoBaseURL = s.baseURL);
12
- var i = s.microAppName,
13
- o = s.publicPath,
14
- e = s.mainAppName;
15
- return i && true && !o && (o = "/".concat(i, "/").replace(/\/\//g, "/")), o || (o = "/"), s.publicPath = o, s.autoOssBucket || (s.autoOssBucket = e || i), s;
16
- };
9
+ var a = function a(o, s) {
10
+ var e = String(o || "").trim();
11
+ return e ? (e.startsWith("/") ? "".concat(String(s || "").replace(/\/+$/, "")).concat(e) : e).replace(/^https:/i, "wss:").replace(/^http:/i, "ws:").replace(/\/+$/, "") : "";
12
+ },
13
+ n = function n() {
14
+ var s = _objectSpread({}, (window == null ? undefined : window.config) || {});
15
+ s.rootContainer || (s.rootContainer = "#app"), s.baseURL || (s.baseURL = location.origin), s.wsBaseURL && (s.wsBaseURL = a(s.wsBaseURL, s.baseURL)), s.ossBaseURL || (s.ossBaseURL = "/oss"), s.ossBaseURL.startsWith("/") && (s.ossBaseURL = "".concat(s.baseURL, "/oss")), s.ssoBaseURL || (s.ssoBaseURL = s.baseURL);
16
+ var e = s.microAppName,
17
+ t = s.publicPath,
18
+ i = s.mainAppName;
19
+ return e && true && !t && (t = "/".concat(e, "/").replace(/\/\//g, "/")), t || (t = "/"), s.publicPath = t, s.autoOssBucket || (s.autoOssBucket = i || e), s;
20
+ };
17
21
  exports.getConfig = n;
package/config/index.js CHANGED
@@ -1,8 +1,11 @@
1
- const n = () => {
1
+ const a = (o, s) => {
2
+ const e = String(o || "").trim();
3
+ return e ? (e.startsWith("/") ? `${String(s || "").replace(/\/+$/, "")}${e}` : e).replace(/^https:/i, "wss:").replace(/^http:/i, "ws:").replace(/\/+$/, "") : "";
4
+ }, n = () => {
2
5
  let s = { ...(window == null ? void 0 : window.config) || {} };
3
- s.rootContainer || (s.rootContainer = "#app"), s.baseURL || (s.baseURL = location.origin), s.ossBaseURL || (s.ossBaseURL = "/oss"), s.ossBaseURL.startsWith("/") && (s.ossBaseURL = `${s.baseURL}/oss`), s.ssoBaseURL || (s.ssoBaseURL = s.baseURL);
4
- let { microAppName: i, publicPath: o, mainAppName: e } = s;
5
- return i && !0 && !o && (o = `/${i}/`.replace(/\/\//g, "/")), o || (o = "/"), s.publicPath = o, s.autoOssBucket || (s.autoOssBucket = e || i), s;
6
+ s.rootContainer || (s.rootContainer = "#app"), s.baseURL || (s.baseURL = location.origin), s.wsBaseURL && (s.wsBaseURL = a(s.wsBaseURL, s.baseURL)), s.ossBaseURL || (s.ossBaseURL = "/oss"), s.ossBaseURL.startsWith("/") && (s.ossBaseURL = `${s.baseURL}/oss`), s.ssoBaseURL || (s.ssoBaseURL = s.baseURL);
7
+ let { microAppName: e, publicPath: t, mainAppName: i } = s;
8
+ return e && !0 && !t && (t = `/${e}/`.replace(/\/\//g, "/")), t || (t = "/"), s.publicPath = t, s.autoOssBucket || (s.autoOssBucket = i || e), s;
6
9
  };
7
10
  export {
8
11
  n as getConfig