@pelcro/react-pelcro-js 3.0.0-beta.10 → 3.0.0-beta.11
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/index.cjs.js +10 -4
- package/dist/index.esm.js +10 -4
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -3808,7 +3808,7 @@ var gift$1 = {
|
|
|
3808
3808
|
lastName: "Last name",
|
|
3809
3809
|
email: "Email",
|
|
3810
3810
|
startDate: "Gift date",
|
|
3811
|
-
giftMessage: "Gift message (
|
|
3811
|
+
giftMessage: "Gift message ({{count}} characters remaining)",
|
|
3812
3812
|
required: "required",
|
|
3813
3813
|
firstNamePlaceholder: "First name",
|
|
3814
3814
|
lastNamePlaceholder: "Last name",
|
|
@@ -3904,7 +3904,7 @@ var gift = {
|
|
|
3904
3904
|
lastName: "Nom de famille",
|
|
3905
3905
|
email: "Adresse courriel",
|
|
3906
3906
|
startDate: "Date de début",
|
|
3907
|
-
giftMessage: "Message du cadeau (
|
|
3907
|
+
giftMessage: "Message du cadeau ({{count}} caractères restants)",
|
|
3908
3908
|
required: "Champs obligatoires",
|
|
3909
3909
|
firstNamePlaceholder: "Prénom",
|
|
3910
3910
|
lastNamePlaceholder: "Nom de famille",
|
|
@@ -19553,6 +19553,8 @@ function TextArea({
|
|
|
19553
19553
|
*/
|
|
19554
19554
|
|
|
19555
19555
|
function GiftCreateMessage(props) {
|
|
19556
|
+
var _ref, _state$giftMessage;
|
|
19557
|
+
|
|
19556
19558
|
const {
|
|
19557
19559
|
t
|
|
19558
19560
|
} = useTranslation("register");
|
|
@@ -19560,6 +19562,8 @@ function GiftCreateMessage(props) {
|
|
|
19560
19562
|
dispatch,
|
|
19561
19563
|
state
|
|
19562
19564
|
} = React.useContext(store$6);
|
|
19565
|
+
const MAX_CHARS_COUNT = 200;
|
|
19566
|
+
const remainingCharsCount = (_ref = MAX_CHARS_COUNT - ((_state$giftMessage = state.giftMessage) === null || _state$giftMessage === void 0 ? void 0 : _state$giftMessage.length)) !== null && _ref !== void 0 ? _ref : 0;
|
|
19563
19567
|
|
|
19564
19568
|
const handleInputChange = value => {
|
|
19565
19569
|
dispatch({
|
|
@@ -19577,6 +19581,9 @@ function GiftCreateMessage(props) {
|
|
|
19577
19581
|
value: state.giftMessage,
|
|
19578
19582
|
maxLength: "200",
|
|
19579
19583
|
rows: 3,
|
|
19584
|
+
label: t("gift.labels.giftMessage", {
|
|
19585
|
+
count: remainingCharsCount
|
|
19586
|
+
}),
|
|
19580
19587
|
tooltipText: t("gift.messages.giftMessageInfo")
|
|
19581
19588
|
}, props));
|
|
19582
19589
|
}
|
|
@@ -19626,8 +19633,7 @@ const GiftCreateView = props => {
|
|
|
19626
19633
|
}, /*#__PURE__*/React__default['default'].createElement(GiftCreateMessage, {
|
|
19627
19634
|
autoComplete: "gift-message",
|
|
19628
19635
|
id: "pelcro-input-gift-message",
|
|
19629
|
-
errorId: "pelcro-input-gift-message-error"
|
|
19630
|
-
label: t("gift.labels.giftMessage")
|
|
19636
|
+
errorId: "pelcro-input-gift-message-error"
|
|
19631
19637
|
})), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
19632
19638
|
className: "plc-text-gray-900 pelcro-footnote"
|
|
19633
19639
|
}, "* ", t("gift.labels.required")), /*#__PURE__*/React__default['default'].createElement(GiftCreateSubmitButton, {
|
package/dist/index.esm.js
CHANGED
|
@@ -3778,7 +3778,7 @@ var gift$1 = {
|
|
|
3778
3778
|
lastName: "Last name",
|
|
3779
3779
|
email: "Email",
|
|
3780
3780
|
startDate: "Gift date",
|
|
3781
|
-
giftMessage: "Gift message (
|
|
3781
|
+
giftMessage: "Gift message ({{count}} characters remaining)",
|
|
3782
3782
|
required: "required",
|
|
3783
3783
|
firstNamePlaceholder: "First name",
|
|
3784
3784
|
lastNamePlaceholder: "Last name",
|
|
@@ -3874,7 +3874,7 @@ var gift = {
|
|
|
3874
3874
|
lastName: "Nom de famille",
|
|
3875
3875
|
email: "Adresse courriel",
|
|
3876
3876
|
startDate: "Date de début",
|
|
3877
|
-
giftMessage: "Message du cadeau (
|
|
3877
|
+
giftMessage: "Message du cadeau ({{count}} caractères restants)",
|
|
3878
3878
|
required: "Champs obligatoires",
|
|
3879
3879
|
firstNamePlaceholder: "Prénom",
|
|
3880
3880
|
lastNamePlaceholder: "Nom de famille",
|
|
@@ -19523,6 +19523,8 @@ function TextArea({
|
|
|
19523
19523
|
*/
|
|
19524
19524
|
|
|
19525
19525
|
function GiftCreateMessage(props) {
|
|
19526
|
+
var _ref, _state$giftMessage;
|
|
19527
|
+
|
|
19526
19528
|
const {
|
|
19527
19529
|
t
|
|
19528
19530
|
} = useTranslation("register");
|
|
@@ -19530,6 +19532,8 @@ function GiftCreateMessage(props) {
|
|
|
19530
19532
|
dispatch,
|
|
19531
19533
|
state
|
|
19532
19534
|
} = useContext(store$6);
|
|
19535
|
+
const MAX_CHARS_COUNT = 200;
|
|
19536
|
+
const remainingCharsCount = (_ref = MAX_CHARS_COUNT - ((_state$giftMessage = state.giftMessage) === null || _state$giftMessage === void 0 ? void 0 : _state$giftMessage.length)) !== null && _ref !== void 0 ? _ref : 0;
|
|
19533
19537
|
|
|
19534
19538
|
const handleInputChange = value => {
|
|
19535
19539
|
dispatch({
|
|
@@ -19547,6 +19551,9 @@ function GiftCreateMessage(props) {
|
|
|
19547
19551
|
value: state.giftMessage,
|
|
19548
19552
|
maxLength: "200",
|
|
19549
19553
|
rows: 3,
|
|
19554
|
+
label: t("gift.labels.giftMessage", {
|
|
19555
|
+
count: remainingCharsCount
|
|
19556
|
+
}),
|
|
19550
19557
|
tooltipText: t("gift.messages.giftMessageInfo")
|
|
19551
19558
|
}, props));
|
|
19552
19559
|
}
|
|
@@ -19596,8 +19603,7 @@ const GiftCreateView = props => {
|
|
|
19596
19603
|
}, /*#__PURE__*/React__default.createElement(GiftCreateMessage, {
|
|
19597
19604
|
autoComplete: "gift-message",
|
|
19598
19605
|
id: "pelcro-input-gift-message",
|
|
19599
|
-
errorId: "pelcro-input-gift-message-error"
|
|
19600
|
-
label: t("gift.labels.giftMessage")
|
|
19606
|
+
errorId: "pelcro-input-gift-message-error"
|
|
19601
19607
|
})), /*#__PURE__*/React__default.createElement("p", {
|
|
19602
19608
|
className: "plc-text-gray-900 pelcro-footnote"
|
|
19603
19609
|
}, "* ", t("gift.labels.required")), /*#__PURE__*/React__default.createElement(GiftCreateSubmitButton, {
|