@propeller-commerce/propeller-v2-react-ui 0.4.20 → 0.4.22
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/CHANGELOG.md +21 -0
- package/dist/index.cjs +7 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,27 @@ once it reaches 1.0. Until then (the `0.x` line) the public API may change
|
|
|
8
8
|
between minor versions; breaking changes are called out below and in
|
|
9
9
|
[MIGRATION.md](./MIGRATION.md).
|
|
10
10
|
|
|
11
|
+
## [0.4.22] - 2026-07-17
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- `DeliveryDate`: when `skipWeekends` is on and the cart's `initialDate`
|
|
16
|
+
(`postageData.requestDate`) is a weekend, it was adopted verbatim — landing
|
|
17
|
+
the selected date in the "Other date" tile (rendered LAST, out of sequence)
|
|
18
|
+
and replacing the "Other date…" entry point with that date's label. Now a
|
|
19
|
+
weekend `initialDate` snaps to the first valid weekday tile, so the selection
|
|
20
|
+
lands on the leading quick-pick and the "Other date…" tile is restored. A
|
|
21
|
+
weekday `initialDate` is still adopted as-is.
|
|
22
|
+
|
|
23
|
+
## [0.4.21] - 2026-07-16
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- `ActionCode`: the panel title now resolves through the `labels` map
|
|
28
|
+
(`labels.title`) instead of only the `title` prop, so the "Action code"
|
|
29
|
+
heading is translatable like every other label. Falls back to `props.title`,
|
|
30
|
+
then `labels.title`, then `'Action code'`. Same fix as `CartSummary` in 0.4.20.
|
|
31
|
+
|
|
11
32
|
## [0.4.20] - 2026-07-16
|
|
12
33
|
|
|
13
34
|
### Fixed
|
package/dist/index.cjs
CHANGED
|
@@ -3770,7 +3770,7 @@ function ActionCode(rawProps) {
|
|
|
3770
3770
|
);
|
|
3771
3771
|
}
|
|
3772
3772
|
function title() {
|
|
3773
|
-
return props.title || "Action code";
|
|
3773
|
+
return props.title || propellerV2CoreUi.getLabel(props.labels, "title", "Action code");
|
|
3774
3774
|
}
|
|
3775
3775
|
function showRemoveCode() {
|
|
3776
3776
|
return props.showRemoveCode !== void 0 ? props.showRemoveCode : true;
|
|
@@ -8468,12 +8468,15 @@ function DeliveryDate(props) {
|
|
|
8468
8468
|
if (props.initialDate && !selectedDate) {
|
|
8469
8469
|
const dot = props.initialDate.lastIndexOf(".");
|
|
8470
8470
|
const normalized = dot !== -1 ? props.initialDate.substring(0, dot) + "Z" : props.initialDate;
|
|
8471
|
-
|
|
8471
|
+
const parsed = new Date(normalized);
|
|
8472
|
+
const isWeekend = !isNaN(parsed.getTime()) && (parsed.getDay() === 0 || parsed.getDay() === 6);
|
|
8473
|
+
const adopt = skipWeekends && isWeekend && upcomingDates.length > 0 ? upcomingDates[0] : normalized;
|
|
8474
|
+
setSelectedDate(adopt);
|
|
8472
8475
|
if (props.onDateSelect) {
|
|
8473
|
-
props.onDateSelect(
|
|
8476
|
+
props.onDateSelect(adopt);
|
|
8474
8477
|
}
|
|
8475
8478
|
}
|
|
8476
|
-
}, [props.initialDate, props.cart, selectedDate, props.onDateSelect, props]);
|
|
8479
|
+
}, [props.initialDate, props.cart, selectedDate, props.onDateSelect, props, skipWeekends, upcomingDates]);
|
|
8477
8480
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-delivery-date ${containerClass}`, children: [
|
|
8478
8481
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-delivery-date__grid grid grid-cols-1 sm:grid-cols-2 md:grid-cols-4 gap-3", children: [
|
|
8479
8482
|
upcomingDates.map((dateStr, index) => {
|