@commercelayer/app-elements 2.0.10 → 2.1.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.
- package/dist/{InputDateComponent-BWLbuM2u.js → InputDateComponent-BISY8ZSX.js} +932 -909
- package/dist/helpers/date.d.ts +7 -2
- package/dist/{main-D6zCJ7QP.js → main-D3aH50nl.js} +12737 -12473
- package/dist/main.js +1 -1
- package/dist/ui/forms/InputSelect/CreatableComponent.d.ts +8 -0
- package/dist/ui/forms/InputSelect/InputSelect.d.ts +5 -0
- package/package.json +1 -1
package/dist/helpers/date.d.ts
CHANGED
|
@@ -21,13 +21,18 @@ interface FormatDateOptions {
|
|
|
21
21
|
* @default date
|
|
22
22
|
*/
|
|
23
23
|
format?: Format;
|
|
24
|
+
/**
|
|
25
|
+
* Whether to show or not the current year.
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
showCurrentYear?: boolean;
|
|
24
29
|
}
|
|
25
30
|
/**
|
|
26
31
|
* Format the date as nice string also specifying a custom timezone
|
|
27
32
|
* @param opts a set of `FormatDateOptions`
|
|
28
33
|
* @returns a nice string representation. Example: 'Jul 21, 2022' or 'Jul 21, 2022 · 1:16 PM' if includeTime
|
|
29
34
|
*/
|
|
30
|
-
export declare function formatDate({ isoDate, timezone, ...opts }: FormatDateOptions): string;
|
|
35
|
+
export declare function formatDate({ isoDate, timezone, showCurrentYear, ...opts }: FormatDateOptions): string;
|
|
31
36
|
interface FormatDateWithPredicateOptions extends FormatDateOptions {
|
|
32
37
|
/**
|
|
33
38
|
* Date predicate verb string. Example: 'Created' or 'Updated'.
|
|
@@ -40,7 +45,7 @@ interface FormatDateWithPredicateOptions extends FormatDateOptions {
|
|
|
40
45
|
* @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'
|
|
41
46
|
*/
|
|
42
47
|
export declare function formatDateWithPredicate({ isoDate, timezone, format, predicate }: FormatDateWithPredicateOptions): string;
|
|
43
|
-
export declare const timeSeparator = "
|
|
48
|
+
export declare const timeSeparator = ", ";
|
|
44
49
|
type DateISOString = string;
|
|
45
50
|
/**
|
|
46
51
|
* Calculate the time-zoned start or end of the day from an ISO date string.
|