@m4l/components 9.57.2 → 9.58.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"mfRuntimeUtils.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/MFLoader/helpers/mfRuntimeUtils/mfRuntimeUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,UAAU,EACV,gBAAgB,EAChB,MAAM,EACP,MAAM,aAAa,CAAC;AAErB;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEzE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE7E;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAExE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE3E;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAExD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAMtF;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,CAM9D;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAahE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,GAAG,MAAM,CAI/E;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,GAAG,MAAM,CAIpF;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAatE;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,gBAAgB,GACzB,qBAAqB,CAOvB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAU3E"}
1
+ {"version":3,"file":"mfRuntimeUtils.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/MFLoader/helpers/mfRuntimeUtils/mfRuntimeUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,UAAU,EACV,gBAAgB,EAChB,MAAM,EACP,MAAM,aAAa,CAAC;AAIrB;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEzE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE7E;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAExE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE3E;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAExD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAMtF;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,CAM9D;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAahE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,GAAG,MAAM,CAI/E;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,GAAG,MAAM,CAIpF;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAatE;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,gBAAgB,GACzB,qBAAqB,CAOvB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAS3E"}
@@ -1,43 +1,44 @@
1
- function s(e, n) {
1
+ let r = 0;
2
+ function u(e, n) {
2
3
  return `render_v2_${e}_${n}`;
3
4
  }
4
- function u(e, n) {
5
+ function o(e, n) {
5
6
  return `render_${e}_${n}`;
6
7
  }
7
- function o(e, n) {
8
+ function a(e, n) {
8
9
  return `unmount_${e}_${n}`;
9
10
  }
10
- function a(e, n) {
11
+ function f(e, n) {
11
12
  return `observable_${e}_${n}`;
12
13
  }
13
- function r(e) {
14
+ function i(e) {
14
15
  return e instanceof Error && /abort/i.test(e.message);
15
16
  }
16
- function i(e, n) {
17
+ function s(e, n) {
17
18
  return e instanceof Error && e.message ? e.message : n;
18
19
  }
19
- function d(e, n) {
20
+ function l(e, n) {
20
21
  return e instanceof Error ? new Error(`${n}: ${e.message}`) : new Error(n);
21
22
  }
22
- function f(e) {
23
+ function d(e) {
23
24
  if (typeof e != "object" || e === null)
24
25
  return !1;
25
26
  const t = e["src/index.tsx"];
26
27
  return typeof t != "object" || t === null ? !1 : typeof t.file == "string";
27
28
  }
28
- function l(e, n) {
29
+ function c(e, n) {
29
30
  return `${e}/manifest.json?rnd=${Math.random()}`;
30
31
  }
31
- function c(e, n) {
32
+ function b(e, n) {
32
33
  return n ? `${e}/src/index.tsx?rnd=${Math.random()}` : `${e}/src/index.tsx`;
33
34
  }
34
- function b(e) {
35
- if (r(e))
35
+ function $(e) {
36
+ if (i(e))
36
37
  return !1;
37
- const n = i(e, "")?.toLowerCase() ?? "";
38
+ const n = s(e, "")?.toLowerCase() ?? "";
38
39
  return n.includes("manifest request failed with status 404") || n.includes("manifest is missing the required src/index.tsx entry") || n.includes("unexpected token") || n.includes("json");
39
40
  }
40
- function $(e) {
41
+ function m(e) {
41
42
  return {
42
43
  ...e.emergeType ? { emergeType: e.emergeType } : {},
43
44
  ...e.hostRuntime ? { hostRuntime: e.hostRuntime } : {},
@@ -45,10 +46,9 @@ function $(e) {
45
46
  ...e.observability ? { observability: e.observability } : {}
46
47
  };
47
48
  }
48
- function m(e, n) {
49
- const t = `${Math.round((/* @__PURE__ */ new Date()).getTime() / 1e3)}_rnd_${Math.round(
50
- Math.random() * 1e3
51
- )}`;
49
+ function y(e, n) {
50
+ r += 1;
51
+ const t = `${Math.round((/* @__PURE__ */ new Date()).getTime() / 1e3)}_rnd_${r}`;
52
52
  return {
53
53
  divContainerId: `container_${e}_${n}_${t}`,
54
54
  scriptId: `script_${n}_${t}`,
@@ -56,17 +56,17 @@ function m(e, n) {
56
56
  };
57
57
  }
58
58
  export {
59
- u as buildLegacyRenderKey,
60
- $ as buildLegacyRenderOptions,
61
- c as buildLocalDevEntryUrl,
62
- m as buildMFInstanceIds,
63
- l as buildManifestUrl,
64
- a as buildObservableKey,
65
- s as buildRenderV2Key,
66
- o as buildUnmountKey,
67
- i as getFailureDetail,
68
- r as isAbortLikeError,
69
- f as isMFManifest,
70
- b as shouldUseLocalDevEntryFallback,
71
- d as toError
59
+ o as buildLegacyRenderKey,
60
+ m as buildLegacyRenderOptions,
61
+ b as buildLocalDevEntryUrl,
62
+ y as buildMFInstanceIds,
63
+ c as buildManifestUrl,
64
+ f as buildObservableKey,
65
+ u as buildRenderV2Key,
66
+ a as buildUnmountKey,
67
+ s as getFailureDetail,
68
+ i as isAbortLikeError,
69
+ d as isMFManifest,
70
+ $ as shouldUseLocalDevEntryFallback,
71
+ l as toError
72
72
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "9.57.2",
3
+ "version": "9.58.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -53,22 +53,22 @@
53
53
  "@hookform/resolvers": "2.9.11",
54
54
  "nprogress": "0.2.0",
55
55
  "react-transition-group": "4.4.5",
56
+ "react-dropzone": "14.4.1",
57
+ "react-rnd": "10.5.2",
56
58
  "@mui/x-date-pickers": "6.20.2",
57
59
  "@tanstack/react-virtual": "3.13.23",
58
60
  "react-draggable": "4.5.0",
59
- "react-spinners": "0.13.8",
60
61
  "react-color": "2.19.3",
61
- "react-dropzone": "14.4.1",
62
- "react-rnd": "10.5.2",
62
+ "react-spinners": "0.13.8",
63
+ "simplebar-react": "3.2.6",
63
64
  "chart.js": "4.5.1",
64
65
  "chartjs-chart-error-bars": "4.4.5",
65
66
  "qrcode.react": "3.2.0",
66
- "simplebar-react": "3.2.6",
67
67
  "react-resizable-panels": "2.1.9",
68
- "react-simple-code-editor": "0.14.1",
69
68
  "react-data-grid": "7.0.0-beta.47",
70
69
  "react-dnd": "16.0.1",
71
70
  "react-dnd-html5-backend": "16.0.1",
71
+ "react-simple-code-editor": "0.14.1",
72
72
  "date-fns": "2.30.0",
73
73
  "react-window": "1.8.11",
74
74
  "react-resizable": "3.1.3"
@@ -1,6 +1,4 @@
1
1
  import { PresentationTimeType, FormatDistanteToNowDictionary, FormatDistanceToNowReturn } from './types';
2
- /**
3
- * TODO: Documentar
4
- */
2
+ /** Format non-negative elapsed time between one source instant and now. */
5
3
  export declare const formatDistanceToNow: (type: PresentationTimeType, date: Date, dictionary: FormatDistanteToNowDictionary) => FormatDistanceToNowReturn;
6
4
  //# sourceMappingURL=formatDistanteToNow.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"formatDistanteToNow.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/utils/formatDistanceToNow/formatDistanteToNow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAezG;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAC9B,MAAM,oBAAoB,EAC1B,MAAM,IAAI,EACV,YAAY,6BAA6B,KACzC,yBAkGD,CAAC"}
1
+ {"version":3,"file":"formatDistanteToNow.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/utils/formatDistanceToNow/formatDistanteToNow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAazG,2EAA2E;AAC3E,eAAO,MAAM,mBAAmB,GAC9B,MAAM,oBAAoB,EAC1B,MAAM,IAAI,EACV,YAAY,6BAA6B,KACzC,yBAkGD,CAAC"}
@@ -4,25 +4,25 @@ const s = (i, ...h) => {
4
4
  for (let b = 0; b < h.length; b++)
5
5
  e = e?.replaceAll(`$${b + 1}`, h[b]);
6
6
  return e;
7
- }, N = (i, h, e) => {
7
+ }, x = (i, h, e) => {
8
8
  if (!(h instanceof Date))
9
9
  return { time: "No date", value: "", unit: "" };
10
- const w = (/* @__PURE__ */ new Date()).getTime() - h.getTime(), o = Math.floor(w / 1e3), u = Math.floor(o / 60), l = Math.floor(u / 60), n = Math.floor(l / 24), a = Math.floor(n / 30), f = Math.floor(a / 12);
10
+ const w = Math.max(0, (/* @__PURE__ */ new Date()).getTime() - h.getTime()), o = Math.floor(w / 1e3), u = Math.floor(o / 60), l = Math.floor(u / 60), n = Math.floor(l / 24), a = Math.floor(n / 30), f = Math.floor(a / 12);
11
11
  let r, m, t = "";
12
- const M = f > 1 ? e.label_unit_time_years : e.label_unit_time_year, S = a % 12 > 1 ? e.label_unit_time_months : e.label_unit_time_month, p = n % 30 > 1 ? e.label_unit_time_days : e.label_unit_time_day, g = l % 24 > 1 ? e.label_unit_time_hours : e.label_unit_time_hour, c = o > 1 ? e.label_unit_time_seconds : e.label_unit_time_second, D = u % 60 > 1 ? e.label_unit_time_minutes : e.label_unit_time_minute;
12
+ const c = f > 1 ? e.label_unit_time_years : e.label_unit_time_year, S = a % 12 > 1 ? e.label_unit_time_months : e.label_unit_time_month, p = n % 30 > 1 ? e.label_unit_time_days : e.label_unit_time_day, g = l % 24 > 1 ? e.label_unit_time_hours : e.label_unit_time_hour, M = o > 1 ? e.label_unit_time_seconds : e.label_unit_time_second, D = u % 60 > 1 ? e.label_unit_time_minutes : e.label_unit_time_minute;
13
13
  let _ = e.label_sentence_present_others;
14
14
  i === "past" ? _ = e.label_sentence_past_others : i === "future" && (_ = e.label_sentence_future_others);
15
15
  const T = ":", $ = "-";
16
- return o < 60 ? (i === "past" ? t = s(e.label_sentence_past_seconds, o + "", c) : i === "future" ? t = s(
16
+ return o < 60 ? (i === "past" ? t = s(e.label_sentence_past_seconds, o + "", M) : i === "future" ? t = s(
17
17
  e.label_sentence_future_seconds,
18
18
  o + "",
19
- c
19
+ M
20
20
  ) : t = s(
21
21
  e.label_sentence_present_seconds,
22
22
  o + "",
23
- c
24
- ), r = o.toString().padStart(2, "0") + "", m = e.label_unit_time_seconds_short) : u < 60 ? (t = s(_, `${u}`, D), r = u.toString().padStart(2, "0") + ":" + (o % 60).toString().padStart(2, "0"), m = e.label_unit_time_minutes_short + e.label_separator_time + e.label_unit_time_seconds_short) : l < 24 ? (u % 60 > 0 ? t = s(_, `${l} ${g} ${u % 60} ${D}`, "") : t = s(_, `${l} ${g}`, ""), r = l.toString().padStart(2, "0") + ":" + (u % 60).toString().padStart(2, "0"), m = e.label_unit_time_hours_short + T + e.label_unit_time_minutes_short) : n < 30 ? (l % 24 > 0 ? t = s(_, `${n} ${p} ${l % 24} ${g}`, "") : t = s(_, `${n} ${p}`, ""), r = n.toString().padStart(2, "0") + " " + (l % 24).toString().padStart(2, "0"), m = e.label_unit_time_days_short + " " + e.label_unit_time_hours_short) : a < 12 ? (n % 30 > 0 ? t = s(_, `${a} ${S} ${n % 30} ${p}`, "") : t = s(_, `${a} ${S}`, ""), r = a.toString().padStart(2, "0") + $ + (n % 30).toString().padStart(2, "0"), m = e.label_unit_time_months_short + $ + e.label_unit_time_days_short) : (a % 12 > 0 ? t = s(_, `${f} ${M} ${a % 12} ${S}`, "") : t = s(_, `${f} ${M}`, ""), r = f.toString().padStart(2, "0") + $ + (a % 12).toString().padStart(2, "0"), m = e.label_unit_time_years_short + $ + e.label_unit_time_months_short), { time: t, value: r, unit: m };
23
+ M
24
+ ), r = o.toString().padStart(2, "0") + "", m = e.label_unit_time_seconds_short) : u < 60 ? (t = s(_, `${u}`, D), r = u.toString().padStart(2, "0") + ":" + (o % 60).toString().padStart(2, "0"), m = e.label_unit_time_minutes_short + e.label_separator_time + e.label_unit_time_seconds_short) : l < 24 ? (u % 60 > 0 ? t = s(_, `${l} ${g} ${u % 60} ${D}`, "") : t = s(_, `${l} ${g}`, ""), r = l.toString().padStart(2, "0") + ":" + (u % 60).toString().padStart(2, "0"), m = e.label_unit_time_hours_short + T + e.label_unit_time_minutes_short) : n < 30 ? (l % 24 > 0 ? t = s(_, `${n} ${p} ${l % 24} ${g}`, "") : t = s(_, `${n} ${p}`, ""), r = n.toString().padStart(2, "0") + " " + (l % 24).toString().padStart(2, "0"), m = e.label_unit_time_days_short + " " + e.label_unit_time_hours_short) : a < 12 ? (n % 30 > 0 ? t = s(_, `${a} ${S} ${n % 30} ${p}`, "") : t = s(_, `${a} ${S}`, ""), r = a.toString().padStart(2, "0") + $ + (n % 30).toString().padStart(2, "0"), m = e.label_unit_time_months_short + $ + e.label_unit_time_days_short) : (a % 12 > 0 ? t = s(_, `${f} ${c} ${a % 12} ${S}`, "") : t = s(_, `${f} ${c}`, ""), r = f.toString().padStart(2, "0") + $ + (a % 12).toString().padStart(2, "0"), m = e.label_unit_time_years_short + $ + e.label_unit_time_months_short), { time: t, value: r, unit: m };
25
25
  };
26
26
  export {
27
- N as formatDistanceToNow
27
+ x as formatDistanceToNow
28
28
  };