@feedmepos/mf-common 1.29.29 → 1.29.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/app.js CHANGED
@@ -1,5 +1,5 @@
1
- import { v as s } from "./app-4f2ed6fe.js";
2
- import { G as m, E as u, x as M, N as p, Q as E, F as P, H as S, h as c, I as d, P as g, _ as C, R as _, g as h, S as A, K as F, r as R, m as T, n as f, B as y, J as O, q as L, i as D, s as I, U as Q, A as U, y as b, z as G, o as N, p as v, T as w, L as x, V as B, k as V, u as Y, j as z, w as H, t as W, M as j, D as k, C as q } from "./app-4f2ed6fe.js";
1
+ import { v as s } from "./app-34901a67.js";
2
+ import { G as m, E as u, x as M, N as p, Q as E, F as P, H as S, h as c, I as d, P as g, _ as C, R as _, g as h, S as A, K as F, r as R, m as T, n as f, B as y, J as O, q as L, i as D, s as I, U as Q, A as U, y as b, z as G, o as N, p as v, T as w, L as x, V as B, k as V, u as Y, j as z, w as H, t as W, M as j, D as k, C as q } from "./app-34901a67.js";
3
3
  import "pinia";
4
4
  import "vue";
5
5
  import "vue-router";
@@ -7,5 +7,6 @@
7
7
  */
8
8
  export declare function useAppLocale(): {
9
9
  locale: import("vue").ComputedRef<string>;
10
+ country: import("vue").Ref<string | undefined, string | undefined>;
10
11
  };
11
12
  //# sourceMappingURL=useAppLocale.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAppLocale.d.ts","sourceRoot":"","sources":["../../../src/composables/useAppLocale.ts"],"names":[],"mappings":"AA0BA;;;;;;GAMG;AACH,wBAAgB,YAAY;;EAW3B"}
1
+ {"version":3,"file":"useAppLocale.d.ts","sourceRoot":"","sources":["../../../src/composables/useAppLocale.ts"],"names":[],"mappings":"AA0BA;;;;;;GAMG;AACH,wBAAgB,YAAY;;;EAc3B"}
@@ -4,28 +4,20 @@
4
4
  * country, rather than relying on the bare device locale.
5
5
  */
6
6
  /**
7
- * Formats a stored "HH:mm" value (e.g. a scheduler time-of-day) for display.
8
- * Leave hour12 unset to let Intl pick the locale's own convention; pass it
9
- * explicitly only to override that convention for a specific caller.
7
+ * Formats a stored "HH:mm" (e.g. a scheduler time-of-day) for display.
8
+ * `hour12` overrides the country's convention for a single caller.
10
9
  *
11
- * Falls back to the raw input instead of throwing on a malformed "HH:mm" or
12
- * an invalid locale tag -- this is called with API-provided data, and a bad
13
- * value here shouldn't crash the view (dayjs.format() never threw either).
14
- * Anchors on a fixed UTC instant + `timeZone: "UTC"` rather than "today" in
15
- * the viewer's own zone, so a DST spring-forward gap can't turn a valid
16
- * "HH:mm" into a nonexistent local time.
10
+ * Returns the raw input rather than throwing on bad data, since this renders
11
+ * API-supplied values. Anchored on a fixed UTC instant so a DST
12
+ * spring-forward gap can't make a valid "HH:mm" nonexistent.
17
13
  */
18
- export declare function formatTimeOfDay(hhmm: string, locale: string, hour12?: boolean): string;
14
+ export declare function formatTimeOfDay(hhmm: string, locale: string, hour12?: boolean, country?: string): string;
15
+ /** Returns the stringified input rather than throwing, as formatTimeOfDay does. */
16
+ export declare function formatDateTime(date: Date | string | number, locale: string, opts?: Intl.DateTimeFormatOptions, country?: string): string;
19
17
  /**
20
- * Falls back to the input (stringified) instead of throwing on an unparsable
21
- * date or an invalid locale tag -- same rationale as formatTimeOfDay above.
18
+ * Whether to render a 12-hour clock. `country` is the reliable signal and
19
+ * wins; with only `locale`, falls back to the pre-existing Intl-based guess
20
+ * for callers not yet passing `country`.
22
21
  */
23
- export declare function formatDateTime(date: Date | string | number, locale: string, opts?: Intl.DateTimeFormatOptions): string;
24
- /**
25
- * Whether the given locale conventionally uses a 24-hour clock, per Intl.
26
- * Note: `hourCycle` isn't in this project's `ResolvedDateTimeFormatOptions`
27
- * lib typing (needs TS lib "ES2021.Intl"+), even though it's present at
28
- * runtime in every supported browser -- hence the local cast.
29
- */
30
- export declare function prefersHour12(locale: string): boolean;
22
+ export declare function prefersHour12(locale?: string, country?: string): boolean;
31
23
  //# sourceMappingURL=dateTimeFormat.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dateTimeFormat.d.ts","sourceRoot":"","sources":["../../../src/utils/dateTimeFormat.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAWtF;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,EAC5B,MAAM,EAAE,MAAM,EACd,IAAI,GAAE,IAAI,CAAC,qBAAmE,GAC7E,MAAM,CAQR;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAOrD"}
1
+ {"version":3,"file":"dateTimeFormat.d.ts","sourceRoot":"","sources":["../../../src/utils/dateTimeFormat.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAgCH;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE,MAAM,GACf,MAAM,CAmBR;AAED,mFAAmF;AACnF,wBAAgB,cAAc,CAC5B,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,EAC5B,MAAM,EAAE,MAAM,EACd,IAAI,GAAE,IAAI,CAAC,qBAAmE,EAC9E,OAAO,CAAC,EAAE,MAAM,GACf,MAAM,CAgBR;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAWxE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-common",
3
- "version": "1.29.29",
3
+ "version": "1.29.31",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"