@commercelayer/app-elements 0.0.2 → 0.0.3
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/{Async-3438eb73.js → Async-aebe6fb6.js} +2 -2
- package/dist/{InputDateComponent-5ebcc687.js → InputDateComponent-1b76aaec.js} +2695 -3924
- package/dist/{Select-78485e35.js → Select-cf15ff7b.js} +2 -2
- package/dist/helpers/date.d.ts +14 -4
- package/dist/main-e7c75433.js +6593 -0
- package/dist/main.js +8 -8
- package/dist/{overrides-f8861d03.js → overrides-679fa915.js} +2 -2
- package/package.json +3 -1
- package/dist/main-2d19ae00.js +0 -5009
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as r from "react";
|
|
2
2
|
import a, { forwardRef as s } from "react";
|
|
3
|
-
import { u as m, S as c, d as p, s as i } from "./overrides-
|
|
3
|
+
import { u as m, S as c, d as p, s as i } from "./overrides-679fa915.js";
|
|
4
4
|
import "react-dom";
|
|
5
|
-
import "./main-
|
|
5
|
+
import "./main-e7c75433.js";
|
|
6
6
|
import "@commercelayer/sdk";
|
|
7
7
|
var l = /* @__PURE__ */ s(function(e, t) {
|
|
8
8
|
var o = m(e);
|
package/dist/helpers/date.d.ts
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Format the date as nice string
|
|
3
|
-
* @param dateIsoString - to match iso string `created_at` or `updated_at` from the import object (or <any>_at). Example '2022-10-06T11:59:30.371Z'
|
|
4
|
-
* @param includeTime - optional flag to also include time
|
|
5
|
-
* @param timeZone - optional string to cast a specific timezone and override user's browser default (Eg: UTC)
|
|
6
3
|
* @returns a nice string representation. Example: 'Jul 21, 2022' or 'Jul 21, 2022 · 1:16 PM' if includeTime
|
|
7
4
|
*/
|
|
8
|
-
export declare function formatDate(
|
|
5
|
+
export declare function formatDate({ isoDate, includeTime, timezone }: {
|
|
6
|
+
/**
|
|
7
|
+
* JavaScript ISO date string. Example '2022-10-06T11:59:30.371Z'
|
|
8
|
+
*/
|
|
9
|
+
isoDate?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Boolean value to include time in returned string: Example: 'Oct 26, 2022 · 4:16 PM'
|
|
12
|
+
*/
|
|
13
|
+
includeTime?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Set a specific timezone, when not passed default value is 'UTC'
|
|
16
|
+
*/
|
|
17
|
+
timezone?: string;
|
|
18
|
+
}): string;
|