@pelcro/react-pelcro-js 3.6.0 → 3.7.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/index.cjs.js +11 -46
- package/dist/index.esm.js +11 -46
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -19245,13 +19245,6 @@ function AddressCreateFirstName(props) {
|
|
|
19245
19245
|
}
|
|
19246
19246
|
} = React.useContext(store$e);
|
|
19247
19247
|
|
|
19248
|
-
const handleBlur = () => {
|
|
19249
|
-
return dispatch({
|
|
19250
|
-
type: VALIDATE_FIELD,
|
|
19251
|
-
payload: "firstName"
|
|
19252
|
-
});
|
|
19253
|
-
};
|
|
19254
|
-
|
|
19255
19248
|
const handleInputChange = value => {
|
|
19256
19249
|
dispatch({
|
|
19257
19250
|
type: SET_TEXT_FIELD,
|
|
@@ -19273,8 +19266,8 @@ function AddressCreateFirstName(props) {
|
|
|
19273
19266
|
autoComplete: "given-name",
|
|
19274
19267
|
value: firstName,
|
|
19275
19268
|
error: firstNameError,
|
|
19276
|
-
onChange: e => handleInputChange(e.target.value)
|
|
19277
|
-
|
|
19269
|
+
onChange: e => handleInputChange(e.target.value) // onBlur={handleBlur}
|
|
19270
|
+
,
|
|
19278
19271
|
onFocus: handleFocus
|
|
19279
19272
|
}, props));
|
|
19280
19273
|
}
|
|
@@ -19288,13 +19281,6 @@ function AddressCreateLastName(props) {
|
|
|
19288
19281
|
}
|
|
19289
19282
|
} = React.useContext(store$e);
|
|
19290
19283
|
|
|
19291
|
-
const handleBlur = () => {
|
|
19292
|
-
return dispatch({
|
|
19293
|
-
type: VALIDATE_FIELD,
|
|
19294
|
-
payload: "lastName"
|
|
19295
|
-
});
|
|
19296
|
-
};
|
|
19297
|
-
|
|
19298
19284
|
const handleInputChange = value => {
|
|
19299
19285
|
dispatch({
|
|
19300
19286
|
type: SET_TEXT_FIELD,
|
|
@@ -19317,7 +19303,6 @@ function AddressCreateLastName(props) {
|
|
|
19317
19303
|
value: lastName,
|
|
19318
19304
|
error: lastNameError,
|
|
19319
19305
|
onChange: e => handleInputChange(e.target.value),
|
|
19320
|
-
onBlur: handleBlur,
|
|
19321
19306
|
onFocus: handleFocus
|
|
19322
19307
|
}, props));
|
|
19323
19308
|
}
|
|
@@ -19374,13 +19359,6 @@ function AddressCreateCity(props) {
|
|
|
19374
19359
|
}
|
|
19375
19360
|
} = React.useContext(store$e);
|
|
19376
19361
|
|
|
19377
|
-
const handleBlur = () => {
|
|
19378
|
-
return dispatch({
|
|
19379
|
-
type: VALIDATE_FIELD,
|
|
19380
|
-
payload: "city"
|
|
19381
|
-
});
|
|
19382
|
-
};
|
|
19383
|
-
|
|
19384
19362
|
const handleInputChange = value => {
|
|
19385
19363
|
dispatch({
|
|
19386
19364
|
type: SET_TEXT_FIELD,
|
|
@@ -19403,7 +19381,6 @@ function AddressCreateCity(props) {
|
|
|
19403
19381
|
value: city,
|
|
19404
19382
|
error: cityError,
|
|
19405
19383
|
onChange: e => handleInputChange(e.target.value),
|
|
19406
|
-
onBlur: handleBlur,
|
|
19407
19384
|
onFocus: handleFocus
|
|
19408
19385
|
}, props));
|
|
19409
19386
|
}
|
|
@@ -19417,13 +19394,6 @@ function AddressCreatePostalCode(props) {
|
|
|
19417
19394
|
}
|
|
19418
19395
|
} = React.useContext(store$e);
|
|
19419
19396
|
|
|
19420
|
-
const handleBlur = () => {
|
|
19421
|
-
return dispatch({
|
|
19422
|
-
type: VALIDATE_FIELD,
|
|
19423
|
-
payload: "postalCode"
|
|
19424
|
-
});
|
|
19425
|
-
};
|
|
19426
|
-
|
|
19427
19397
|
const handleInputChange = value => {
|
|
19428
19398
|
dispatch({
|
|
19429
19399
|
type: SET_TEXT_FIELD,
|
|
@@ -19446,7 +19416,6 @@ function AddressCreatePostalCode(props) {
|
|
|
19446
19416
|
value: postalCode,
|
|
19447
19417
|
error: postalCodeError,
|
|
19448
19418
|
onChange: e => handleInputChange(e.target.value),
|
|
19449
|
-
onBlur: handleBlur,
|
|
19450
19419
|
onFocus: handleFocus
|
|
19451
19420
|
}, props));
|
|
19452
19421
|
}
|
|
@@ -19628,10 +19597,12 @@ function StateSelect({
|
|
|
19628
19597
|
};
|
|
19629
19598
|
|
|
19630
19599
|
const handleBlur = () => {
|
|
19631
|
-
|
|
19632
|
-
|
|
19633
|
-
|
|
19634
|
-
|
|
19600
|
+
if (otherProps.required) {
|
|
19601
|
+
return dispatch({
|
|
19602
|
+
type: VALIDATE_FIELD,
|
|
19603
|
+
payload: "state"
|
|
19604
|
+
});
|
|
19605
|
+
}
|
|
19635
19606
|
};
|
|
19636
19607
|
|
|
19637
19608
|
const handleFocus = () => {
|
|
@@ -19654,7 +19625,6 @@ function StateSelect({
|
|
|
19654
19625
|
autoComplete: "address-level1"
|
|
19655
19626
|
}, otherProps), /*#__PURE__*/React__default['default'].createElement("option", {
|
|
19656
19627
|
value: "",
|
|
19657
|
-
disabled: true,
|
|
19658
19628
|
selected: true
|
|
19659
19629
|
}, placeholder), createStateItems());
|
|
19660
19630
|
}
|
|
@@ -19700,13 +19670,11 @@ const AddressCreateView = props => {
|
|
|
19700
19670
|
}, /*#__PURE__*/React__default['default'].createElement(AddressCreateFirstName, {
|
|
19701
19671
|
id: "pelcro-input-first-name",
|
|
19702
19672
|
errorId: "pelcro-input-first-name-error",
|
|
19703
|
-
required: true,
|
|
19704
19673
|
label: t("labels.firstName"),
|
|
19705
19674
|
autoFocus: true
|
|
19706
19675
|
}), /*#__PURE__*/React__default['default'].createElement(AddressCreateLastName, {
|
|
19707
19676
|
id: "pelcro-input-last-name",
|
|
19708
19677
|
errorId: "pelcro-input-last-name-error",
|
|
19709
|
-
required: true,
|
|
19710
19678
|
label: t("labels.lastName")
|
|
19711
19679
|
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
19712
19680
|
className: "plc-flex plc-items-start"
|
|
@@ -19720,13 +19688,11 @@ const AddressCreateView = props => {
|
|
|
19720
19688
|
}, /*#__PURE__*/React__default['default'].createElement(AddressCreatePostalCode, {
|
|
19721
19689
|
id: "pelcro-input-postal-code",
|
|
19722
19690
|
errorId: "pelcro-input-postal-code-error",
|
|
19723
|
-
required: true,
|
|
19724
19691
|
label: t("labels.code")
|
|
19725
19692
|
}), /*#__PURE__*/React__default['default'].createElement(AddressCreateCity, {
|
|
19726
19693
|
id: "pelcro-input-city",
|
|
19727
19694
|
errorId: "pelcro-input-city-error",
|
|
19728
|
-
label: t("labels.city")
|
|
19729
|
-
required: true
|
|
19695
|
+
label: t("labels.city")
|
|
19730
19696
|
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
19731
19697
|
className: "plc-flex plc-space-x-3 plc-items-start"
|
|
19732
19698
|
}, /*#__PURE__*/React__default['default'].createElement(AddressCreateCountrySelect, {
|
|
@@ -19737,8 +19703,7 @@ const AddressCreateView = props => {
|
|
|
19737
19703
|
}), /*#__PURE__*/React__default['default'].createElement(AddressCreateStateSelect, {
|
|
19738
19704
|
label: t("labels.region"),
|
|
19739
19705
|
id: "pelcro-input-state",
|
|
19740
|
-
errorId: "pelcro-input-state-error"
|
|
19741
|
-
required: true
|
|
19706
|
+
errorId: "pelcro-input-state-error"
|
|
19742
19707
|
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
19743
19708
|
className: "plc-flex plc-space-x-3 plc-items-start plc-mb-3"
|
|
19744
19709
|
}, /*#__PURE__*/React__default['default'].createElement(AddressCreateSetDefault, {
|
|
@@ -25771,7 +25736,7 @@ class Dashboard extends React.Component {
|
|
|
25771
25736
|
className: "plc-pr-2 plc-text-gray-400 plc-truncate"
|
|
25772
25737
|
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
25773
25738
|
className: "plc-font-semibold plc-text-gray-600"
|
|
25774
|
-
}, address.city, "
|
|
25739
|
+
}, address.city ? `${address.city},` : null, " ", address.country), " ", /*#__PURE__*/React__default['default'].createElement("span", {
|
|
25775
25740
|
title: address.line1
|
|
25776
25741
|
}, address.line1), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25777
25742
|
className: "plc-flex plc-mb-2 plc-mt-1"
|
package/dist/index.esm.js
CHANGED
|
@@ -19215,13 +19215,6 @@ function AddressCreateFirstName(props) {
|
|
|
19215
19215
|
}
|
|
19216
19216
|
} = useContext(store$e);
|
|
19217
19217
|
|
|
19218
|
-
const handleBlur = () => {
|
|
19219
|
-
return dispatch({
|
|
19220
|
-
type: VALIDATE_FIELD,
|
|
19221
|
-
payload: "firstName"
|
|
19222
|
-
});
|
|
19223
|
-
};
|
|
19224
|
-
|
|
19225
19218
|
const handleInputChange = value => {
|
|
19226
19219
|
dispatch({
|
|
19227
19220
|
type: SET_TEXT_FIELD,
|
|
@@ -19243,8 +19236,8 @@ function AddressCreateFirstName(props) {
|
|
|
19243
19236
|
autoComplete: "given-name",
|
|
19244
19237
|
value: firstName,
|
|
19245
19238
|
error: firstNameError,
|
|
19246
|
-
onChange: e => handleInputChange(e.target.value)
|
|
19247
|
-
|
|
19239
|
+
onChange: e => handleInputChange(e.target.value) // onBlur={handleBlur}
|
|
19240
|
+
,
|
|
19248
19241
|
onFocus: handleFocus
|
|
19249
19242
|
}, props));
|
|
19250
19243
|
}
|
|
@@ -19258,13 +19251,6 @@ function AddressCreateLastName(props) {
|
|
|
19258
19251
|
}
|
|
19259
19252
|
} = useContext(store$e);
|
|
19260
19253
|
|
|
19261
|
-
const handleBlur = () => {
|
|
19262
|
-
return dispatch({
|
|
19263
|
-
type: VALIDATE_FIELD,
|
|
19264
|
-
payload: "lastName"
|
|
19265
|
-
});
|
|
19266
|
-
};
|
|
19267
|
-
|
|
19268
19254
|
const handleInputChange = value => {
|
|
19269
19255
|
dispatch({
|
|
19270
19256
|
type: SET_TEXT_FIELD,
|
|
@@ -19287,7 +19273,6 @@ function AddressCreateLastName(props) {
|
|
|
19287
19273
|
value: lastName,
|
|
19288
19274
|
error: lastNameError,
|
|
19289
19275
|
onChange: e => handleInputChange(e.target.value),
|
|
19290
|
-
onBlur: handleBlur,
|
|
19291
19276
|
onFocus: handleFocus
|
|
19292
19277
|
}, props));
|
|
19293
19278
|
}
|
|
@@ -19344,13 +19329,6 @@ function AddressCreateCity(props) {
|
|
|
19344
19329
|
}
|
|
19345
19330
|
} = useContext(store$e);
|
|
19346
19331
|
|
|
19347
|
-
const handleBlur = () => {
|
|
19348
|
-
return dispatch({
|
|
19349
|
-
type: VALIDATE_FIELD,
|
|
19350
|
-
payload: "city"
|
|
19351
|
-
});
|
|
19352
|
-
};
|
|
19353
|
-
|
|
19354
19332
|
const handleInputChange = value => {
|
|
19355
19333
|
dispatch({
|
|
19356
19334
|
type: SET_TEXT_FIELD,
|
|
@@ -19373,7 +19351,6 @@ function AddressCreateCity(props) {
|
|
|
19373
19351
|
value: city,
|
|
19374
19352
|
error: cityError,
|
|
19375
19353
|
onChange: e => handleInputChange(e.target.value),
|
|
19376
|
-
onBlur: handleBlur,
|
|
19377
19354
|
onFocus: handleFocus
|
|
19378
19355
|
}, props));
|
|
19379
19356
|
}
|
|
@@ -19387,13 +19364,6 @@ function AddressCreatePostalCode(props) {
|
|
|
19387
19364
|
}
|
|
19388
19365
|
} = useContext(store$e);
|
|
19389
19366
|
|
|
19390
|
-
const handleBlur = () => {
|
|
19391
|
-
return dispatch({
|
|
19392
|
-
type: VALIDATE_FIELD,
|
|
19393
|
-
payload: "postalCode"
|
|
19394
|
-
});
|
|
19395
|
-
};
|
|
19396
|
-
|
|
19397
19367
|
const handleInputChange = value => {
|
|
19398
19368
|
dispatch({
|
|
19399
19369
|
type: SET_TEXT_FIELD,
|
|
@@ -19416,7 +19386,6 @@ function AddressCreatePostalCode(props) {
|
|
|
19416
19386
|
value: postalCode,
|
|
19417
19387
|
error: postalCodeError,
|
|
19418
19388
|
onChange: e => handleInputChange(e.target.value),
|
|
19419
|
-
onBlur: handleBlur,
|
|
19420
19389
|
onFocus: handleFocus
|
|
19421
19390
|
}, props));
|
|
19422
19391
|
}
|
|
@@ -19598,10 +19567,12 @@ function StateSelect({
|
|
|
19598
19567
|
};
|
|
19599
19568
|
|
|
19600
19569
|
const handleBlur = () => {
|
|
19601
|
-
|
|
19602
|
-
|
|
19603
|
-
|
|
19604
|
-
|
|
19570
|
+
if (otherProps.required) {
|
|
19571
|
+
return dispatch({
|
|
19572
|
+
type: VALIDATE_FIELD,
|
|
19573
|
+
payload: "state"
|
|
19574
|
+
});
|
|
19575
|
+
}
|
|
19605
19576
|
};
|
|
19606
19577
|
|
|
19607
19578
|
const handleFocus = () => {
|
|
@@ -19624,7 +19595,6 @@ function StateSelect({
|
|
|
19624
19595
|
autoComplete: "address-level1"
|
|
19625
19596
|
}, otherProps), /*#__PURE__*/React__default.createElement("option", {
|
|
19626
19597
|
value: "",
|
|
19627
|
-
disabled: true,
|
|
19628
19598
|
selected: true
|
|
19629
19599
|
}, placeholder), createStateItems());
|
|
19630
19600
|
}
|
|
@@ -19670,13 +19640,11 @@ const AddressCreateView = props => {
|
|
|
19670
19640
|
}, /*#__PURE__*/React__default.createElement(AddressCreateFirstName, {
|
|
19671
19641
|
id: "pelcro-input-first-name",
|
|
19672
19642
|
errorId: "pelcro-input-first-name-error",
|
|
19673
|
-
required: true,
|
|
19674
19643
|
label: t("labels.firstName"),
|
|
19675
19644
|
autoFocus: true
|
|
19676
19645
|
}), /*#__PURE__*/React__default.createElement(AddressCreateLastName, {
|
|
19677
19646
|
id: "pelcro-input-last-name",
|
|
19678
19647
|
errorId: "pelcro-input-last-name-error",
|
|
19679
|
-
required: true,
|
|
19680
19648
|
label: t("labels.lastName")
|
|
19681
19649
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
19682
19650
|
className: "plc-flex plc-items-start"
|
|
@@ -19690,13 +19658,11 @@ const AddressCreateView = props => {
|
|
|
19690
19658
|
}, /*#__PURE__*/React__default.createElement(AddressCreatePostalCode, {
|
|
19691
19659
|
id: "pelcro-input-postal-code",
|
|
19692
19660
|
errorId: "pelcro-input-postal-code-error",
|
|
19693
|
-
required: true,
|
|
19694
19661
|
label: t("labels.code")
|
|
19695
19662
|
}), /*#__PURE__*/React__default.createElement(AddressCreateCity, {
|
|
19696
19663
|
id: "pelcro-input-city",
|
|
19697
19664
|
errorId: "pelcro-input-city-error",
|
|
19698
|
-
label: t("labels.city")
|
|
19699
|
-
required: true
|
|
19665
|
+
label: t("labels.city")
|
|
19700
19666
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
19701
19667
|
className: "plc-flex plc-space-x-3 plc-items-start"
|
|
19702
19668
|
}, /*#__PURE__*/React__default.createElement(AddressCreateCountrySelect, {
|
|
@@ -19707,8 +19673,7 @@ const AddressCreateView = props => {
|
|
|
19707
19673
|
}), /*#__PURE__*/React__default.createElement(AddressCreateStateSelect, {
|
|
19708
19674
|
label: t("labels.region"),
|
|
19709
19675
|
id: "pelcro-input-state",
|
|
19710
|
-
errorId: "pelcro-input-state-error"
|
|
19711
|
-
required: true
|
|
19676
|
+
errorId: "pelcro-input-state-error"
|
|
19712
19677
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
19713
19678
|
className: "plc-flex plc-space-x-3 plc-items-start plc-mb-3"
|
|
19714
19679
|
}, /*#__PURE__*/React__default.createElement(AddressCreateSetDefault, {
|
|
@@ -25741,7 +25706,7 @@ class Dashboard extends Component {
|
|
|
25741
25706
|
className: "plc-pr-2 plc-text-gray-400 plc-truncate"
|
|
25742
25707
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
25743
25708
|
className: "plc-font-semibold plc-text-gray-600"
|
|
25744
|
-
}, address.city, "
|
|
25709
|
+
}, address.city ? `${address.city},` : null, " ", address.country), " ", /*#__PURE__*/React__default.createElement("span", {
|
|
25745
25710
|
title: address.line1
|
|
25746
25711
|
}, address.line1), /*#__PURE__*/React__default.createElement("div", {
|
|
25747
25712
|
className: "plc-flex plc-mb-2 plc-mt-1"
|