@commercelayer/app-elements 1.6.1 → 1.6.2

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,4 +1,4 @@
1
- import { P as xa, r as O, a as Ln, t as F, b as Ct, c as Te, d as T, g as Mr, _ as Kt, s as He, e as lr, f as Sa, h as Y, i as R, j as N, k, l as C, m as I, n as Oa, o as dr, p as Fn, q as Ta, u as Ea, v as _a, w as Zr, x as Pa, y as zr, z as Na, A as Ia, B as Ya, C as Hn, D as ae, E as nt, F as Ft, G as fr, H as xr, I as Ra, J as Xr, K as Aa, L as La, M as Fa, N as Ht, O as qe, Q as Ha, R as Ba, X as ja } from "./main-843e8b0f.js";
1
+ import { P as xa, r as O, a as Ln, t as F, b as Ct, c as Te, d as T, g as Mr, _ as Kt, s as He, e as lr, f as Sa, h as Y, i as R, j as N, k, l as C, m as I, n as Oa, o as dr, p as Fn, q as Ta, u as Ea, v as _a, w as Zr, x as Pa, y as zr, z as Na, A as Ia, B as Ya, C as Hn, D as ae, E as nt, F as Ft, G as fr, H as xr, I as Ra, J as Xr, K as Aa, L as La, M as Fa, N as Ht, O as qe, Q as Ha, R as Ba, X as ja } from "./main-d61a61f0.js";
2
2
  import * as U from "react";
3
3
  import h, { forwardRef as Bn, createElement as Ua, Component as Va, createRef as Wa } from "react";
4
4
  import * as Qa from "react-dom";
@@ -27,6 +27,18 @@ interface FormatDateOptions {
27
27
  * @returns a nice string representation. Example: 'Jul 21, 2022' or 'Jul 21, 2022 · 1:16 PM' if includeTime
28
28
  */
29
29
  export declare function formatDate({ isoDate, timezone, ...opts }: FormatDateOptions): string;
30
+ interface FormatDateWithPredicateOptions extends FormatDateOptions {
31
+ /**
32
+ * Date predicate verb string. Example: 'Created' or 'Updated'.
33
+ */
34
+ predicate: string;
35
+ }
36
+ /**
37
+ * Generate a string containing provided predicate, a separator and provided date formatted according to `formatDate` method
38
+ * @param opts a set of `FormatDateOptions` along with a date verb predicate. In this method `format` prop has 'full' default value.
39
+ * @returns a nice string representation of the predicate, followed by the proper separator and the formatted date. Examples: 'Created today · 1:16 PM', 'Updated on Jul 21, 2022 · 1:16 PM' or 'Updated at 1:16 PM'
40
+ */
41
+ export declare function formatDateWithPredicate({ isoDate, timezone, format, predicate }: FormatDateWithPredicateOptions): string;
30
42
  export declare const timeSeparator = "\u00B7";
31
43
  type DateISOString = string;
32
44
  /**