@commercelayer/app-elements 1.15.3 → 1.17.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-B0BsDPuU.js → InputDateComponent-Ba_0quKu.js} +1 -1
- package/dist/helpers/date.d.ts +30 -0
- package/dist/{main-BY0B1QQT.js → main-BlYhThqr.js} +4980 -4922
- package/dist/main.d.ts +1 -1
- package/dist/main.js +57 -55
- package/dist/style.css +1 -1
- package/dist/ui/forms/Input/Input.d.ts +4 -0
- package/dist/ui/forms/InputRadioGroup/InputRadioGroup.d.ts +5 -1
- package/dist/ui/resources/useResourceFilters/useResourceFilters.d.ts +5 -1
- package/dist/vendor.css +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var ur = Object.defineProperty;
|
|
3
3
|
var lr = (a, n, e) => n in a ? ur(a, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[n] = e;
|
|
4
4
|
var D = (a, n, e) => (lr(a, typeof n != "symbol" ? n + "" : n, e), e);
|
|
5
|
-
import { a as Ut, c as pr, i as Fe, p as dr, b as hr, f as fr, o as mr, d as q, j as be, I as gr, g as yr, w as wr, X as Dr } from "./main-
|
|
5
|
+
import { a as Ut, c as pr, i as Fe, p as dr, b as hr, f as fr, o as mr, d as q, j as be, I as gr, g as yr, w as wr, X as Dr } from "./main-BlYhThqr.js";
|
|
6
6
|
import * as C from "react";
|
|
7
7
|
import f, { createElement as vr, Component as br, useLayoutEffect as On, useEffect as Nn, createRef as kr, forwardRef as Mr } from "react";
|
|
8
8
|
import * as _r from "react-dom";
|
package/dist/helpers/date.d.ts
CHANGED
|
@@ -113,4 +113,34 @@ export declare function sortAndGroupByDate<T extends Event>(events: T[], { timez
|
|
|
113
113
|
}): Record<string, Array<Simplify<T & {
|
|
114
114
|
position: Position;
|
|
115
115
|
}>>>;
|
|
116
|
+
/**
|
|
117
|
+
* Remove milliseconds from a date ISO string.
|
|
118
|
+
*
|
|
119
|
+
* Example:
|
|
120
|
+
* ```
|
|
121
|
+
* removeMilliseconds('2022-04-24T13:44:59.452Z') // '2022-04-24T13:44:59Z'
|
|
122
|
+
* ```
|
|
123
|
+
*/
|
|
124
|
+
export declare function removeMillisecondsFromIsoDate(isoDate: string): string;
|
|
125
|
+
/**
|
|
126
|
+
* Returns one year date range (minus 1 second) from the specified now date.
|
|
127
|
+
*
|
|
128
|
+
* If `showMilliseconds` is false will remove milliseconds from the Date ISO strings,
|
|
129
|
+
* ready to be used, for instance, in Metrics APIs requests.
|
|
130
|
+
*
|
|
131
|
+
* Example:
|
|
132
|
+
* ```
|
|
133
|
+
* // with showMilliseconds = true
|
|
134
|
+
* { date_from: '2022-04-24T13:44:59:452Z', date_to: '2023-04-24T13:45:452Z' }
|
|
135
|
+
* // with showMilliseconds = false
|
|
136
|
+
* { date_from: '2022-04-24T13:44:59Z', date_to: '2023-04-24T13:45Z' }
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
139
|
+
export declare function getLastYearIsoRange({ now, showMilliseconds }: {
|
|
140
|
+
now: Date;
|
|
141
|
+
showMilliseconds: boolean;
|
|
142
|
+
}): {
|
|
143
|
+
date_from: string;
|
|
144
|
+
date_to: string;
|
|
145
|
+
};
|
|
116
146
|
export {};
|