@pelcro/react-pelcro-js 3.4.1-beta.4 → 3.4.1-beta.5
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 +213 -21
- package/dist/index.esm.js +213 -21
- package/dist/pelcro.css +15 -0
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -3251,7 +3251,7 @@ var buttons$e = {
|
|
|
3251
3251
|
account: "Accès abonné(e)s",
|
|
3252
3252
|
login: "Se connecter"
|
|
3253
3253
|
};
|
|
3254
|
-
var dashboard$
|
|
3254
|
+
var dashboard$3 = {
|
|
3255
3255
|
labels: {
|
|
3256
3256
|
menu: "Menu Pelcro",
|
|
3257
3257
|
name: "Nom",
|
|
@@ -3325,7 +3325,7 @@ var confirm$8 = {
|
|
|
3325
3325
|
var common_fr = {
|
|
3326
3326
|
validation: validation$2,
|
|
3327
3327
|
buttons: buttons$e,
|
|
3328
|
-
dashboard: dashboard$
|
|
3328
|
+
dashboard: dashboard$3,
|
|
3329
3329
|
select: select$5,
|
|
3330
3330
|
confirm: confirm$8
|
|
3331
3331
|
};
|
|
@@ -3340,7 +3340,7 @@ var buttons$d = {
|
|
|
3340
3340
|
account: "My account",
|
|
3341
3341
|
login: "Login"
|
|
3342
3342
|
};
|
|
3343
|
-
var dashboard$
|
|
3343
|
+
var dashboard$2 = {
|
|
3344
3344
|
labels: {
|
|
3345
3345
|
menu: "Pelcro Menu",
|
|
3346
3346
|
name: "Name",
|
|
@@ -3414,7 +3414,7 @@ var confirm$7 = {
|
|
|
3414
3414
|
var common_en = {
|
|
3415
3415
|
validation: validation$1,
|
|
3416
3416
|
buttons: buttons$d,
|
|
3417
|
-
dashboard: dashboard$
|
|
3417
|
+
dashboard: dashboard$2,
|
|
3418
3418
|
select: select$4,
|
|
3419
3419
|
confirm: confirm$7
|
|
3420
3420
|
};
|
|
@@ -3428,7 +3428,7 @@ var buttons$c = {
|
|
|
3428
3428
|
account: "내 계정",
|
|
3429
3429
|
login: "로그인"
|
|
3430
3430
|
};
|
|
3431
|
-
var dashboard = {
|
|
3431
|
+
var dashboard$1 = {
|
|
3432
3432
|
labels: {
|
|
3433
3433
|
menu: "Pelcro 메뉴",
|
|
3434
3434
|
name: "이름",
|
|
@@ -3502,7 +3502,7 @@ var confirm$6 = {
|
|
|
3502
3502
|
var common_ko = {
|
|
3503
3503
|
validation: validation,
|
|
3504
3504
|
buttons: buttons$c,
|
|
3505
|
-
dashboard: dashboard,
|
|
3505
|
+
dashboard: dashboard$1,
|
|
3506
3506
|
select: select$3,
|
|
3507
3507
|
confirm: confirm$6
|
|
3508
3508
|
};
|
|
@@ -4446,7 +4446,8 @@ var labels$n = {
|
|
|
4446
4446
|
country: "Country",
|
|
4447
4447
|
firstName: "First name",
|
|
4448
4448
|
lastName: "Last name",
|
|
4449
|
-
required: "required"
|
|
4449
|
+
required: "required",
|
|
4450
|
+
isDefault: "Set as default"
|
|
4450
4451
|
};
|
|
4451
4452
|
var buttons$b = {
|
|
4452
4453
|
submit: "Submit",
|
|
@@ -4477,7 +4478,8 @@ var labels$m = {
|
|
|
4477
4478
|
country: "Pays",
|
|
4478
4479
|
firstName: "Prénom",
|
|
4479
4480
|
lastName: "Nom de famille",
|
|
4480
|
-
required: "Champs obligatoires"
|
|
4481
|
+
required: "Champs obligatoires",
|
|
4482
|
+
isDefault: "Définir par défaut"
|
|
4481
4483
|
};
|
|
4482
4484
|
var buttons$a = {
|
|
4483
4485
|
submit: "Valider",
|
|
@@ -4508,7 +4510,8 @@ var labels$l = {
|
|
|
4508
4510
|
country: "국가",
|
|
4509
4511
|
firstName: "이름",
|
|
4510
4512
|
lastName: "성",
|
|
4511
|
-
required: "필수 항목"
|
|
4513
|
+
required: "필수 항목",
|
|
4514
|
+
isDefault: "기본값으로 설정"
|
|
4512
4515
|
};
|
|
4513
4516
|
var buttons$9 = {
|
|
4514
4517
|
submit: "제출",
|
|
@@ -4758,7 +4761,7 @@ var subtitle$2 = "Terminez votre achat ci-dessous";
|
|
|
4758
4761
|
var name$2 = "Produit";
|
|
4759
4762
|
var quantity$2 = "Quantité";
|
|
4760
4763
|
var price$2 = "Prix";
|
|
4761
|
-
var actions$
|
|
4764
|
+
var actions$3 = "Actes";
|
|
4762
4765
|
var remove$2 = "Retirer";
|
|
4763
4766
|
var total$2 = "Total";
|
|
4764
4767
|
var confirm$5 = "Passer à la caisse";
|
|
@@ -4770,7 +4773,7 @@ var cart_fr = {
|
|
|
4770
4773
|
name: name$2,
|
|
4771
4774
|
quantity: quantity$2,
|
|
4772
4775
|
price: price$2,
|
|
4773
|
-
actions: actions$
|
|
4776
|
+
actions: actions$3,
|
|
4774
4777
|
remove: remove$2,
|
|
4775
4778
|
total: total$2,
|
|
4776
4779
|
confirm: confirm$5,
|
|
@@ -4783,7 +4786,7 @@ var subtitle$1 = "Comple your purchase below";
|
|
|
4783
4786
|
var name$1 = "Name";
|
|
4784
4787
|
var quantity$1 = "Quantity";
|
|
4785
4788
|
var price$1 = "Price";
|
|
4786
|
-
var actions$
|
|
4789
|
+
var actions$2 = "Actions";
|
|
4787
4790
|
var remove$1 = "Remove";
|
|
4788
4791
|
var total$1 = "Total";
|
|
4789
4792
|
var confirm$4 = "Checkout";
|
|
@@ -4795,7 +4798,7 @@ var cart_en = {
|
|
|
4795
4798
|
name: name$1,
|
|
4796
4799
|
quantity: quantity$1,
|
|
4797
4800
|
price: price$1,
|
|
4798
|
-
actions: actions$
|
|
4801
|
+
actions: actions$2,
|
|
4799
4802
|
remove: remove$1,
|
|
4800
4803
|
total: total$1,
|
|
4801
4804
|
confirm: confirm$4,
|
|
@@ -4808,7 +4811,7 @@ var subtitle = "아래에서 결제를 진행하세요.";
|
|
|
4808
4811
|
var name = "이름";
|
|
4809
4812
|
var quantity = "수량";
|
|
4810
4813
|
var price = "가격";
|
|
4811
|
-
var actions = "조치";
|
|
4814
|
+
var actions$1 = "조치";
|
|
4812
4815
|
var remove = "제거";
|
|
4813
4816
|
var total = "총계";
|
|
4814
4817
|
var confirm$3 = "체크아웃";
|
|
@@ -4820,7 +4823,7 @@ var cart_ko = {
|
|
|
4820
4823
|
name: name,
|
|
4821
4824
|
quantity: quantity,
|
|
4822
4825
|
price: price,
|
|
4823
|
-
actions: actions,
|
|
4826
|
+
actions: actions$1,
|
|
4824
4827
|
remove: remove,
|
|
4825
4828
|
total: total,
|
|
4826
4829
|
confirm: confirm$3,
|
|
@@ -5081,6 +5084,7 @@ var labels$e = {
|
|
|
5081
5084
|
addAddress: "Add address",
|
|
5082
5085
|
addSubscription: "New Subscription",
|
|
5083
5086
|
addGift: "New Gift",
|
|
5087
|
+
"default": "Default",
|
|
5084
5088
|
orders: {
|
|
5085
5089
|
label: "Orders",
|
|
5086
5090
|
noOrders: "You have not placed any orders",
|
|
@@ -5173,6 +5177,7 @@ var labels$d = {
|
|
|
5173
5177
|
addAddress: "Ajoutez l'adresse",
|
|
5174
5178
|
addSubscription: "Nouvel abonnement",
|
|
5175
5179
|
addGift: "Ajouter un cadeau",
|
|
5180
|
+
"default": "Défaut",
|
|
5176
5181
|
orders: {
|
|
5177
5182
|
label: "Commandes",
|
|
5178
5183
|
noOrders: "Vous n'avez passé aucune commande",
|
|
@@ -5285,6 +5290,67 @@ var labels$c = {
|
|
|
5285
5290
|
goBack: "뒤로 가기"
|
|
5286
5291
|
}
|
|
5287
5292
|
};
|
|
5293
|
+
var shipments = "남은 배송 일정";
|
|
5294
|
+
var logout = "로그아웃";
|
|
5295
|
+
var dashboard = "대시보드";
|
|
5296
|
+
var unsubscribe = "취소";
|
|
5297
|
+
var reactivate = "재활성화";
|
|
5298
|
+
var renew = "갱신";
|
|
5299
|
+
var support = "지원";
|
|
5300
|
+
var account = "계정";
|
|
5301
|
+
var purchases = "구매";
|
|
5302
|
+
var subscriptions = "유료 멤버십";
|
|
5303
|
+
var donations = "기부";
|
|
5304
|
+
var invoices = "인보이스";
|
|
5305
|
+
var details = "세부 정보";
|
|
5306
|
+
var view = "보기";
|
|
5307
|
+
var paid = "결제 완료";
|
|
5308
|
+
var open = "열기";
|
|
5309
|
+
var draft = "임시 저장";
|
|
5310
|
+
var scheduled = "예약";
|
|
5311
|
+
var uncollectible = "사용 불가";
|
|
5312
|
+
var pastDue = "연체";
|
|
5313
|
+
var updatePaymentSource = "업데이트";
|
|
5314
|
+
var profile = "프로필";
|
|
5315
|
+
var updateProfile = "프로필 편집";
|
|
5316
|
+
var changePassword = "비밀번호 변경";
|
|
5317
|
+
var editNewsletters = "뉴스레터 편집";
|
|
5318
|
+
var edit = "편집";
|
|
5319
|
+
var gifts = "선물";
|
|
5320
|
+
var redeemGift = "선물 사용";
|
|
5321
|
+
var address = "주소";
|
|
5322
|
+
var addresses = "주소들";
|
|
5323
|
+
var myProfile = "내 프로필";
|
|
5324
|
+
var paymentSource = "결제 카드";
|
|
5325
|
+
var actions = "조치";
|
|
5326
|
+
var expiresOn = "종료";
|
|
5327
|
+
var startsOn = "시작";
|
|
5328
|
+
var startDate = "시작일";
|
|
5329
|
+
var renewsOn = "갱신";
|
|
5330
|
+
var canceledOn = "취소일";
|
|
5331
|
+
var recipient = "받는 사람";
|
|
5332
|
+
var addAddress = "주소 추가";
|
|
5333
|
+
var addSubscription = "새 유료 멤버십";
|
|
5334
|
+
var addGift = "새 선물";
|
|
5335
|
+
var orders = {
|
|
5336
|
+
label: "주문",
|
|
5337
|
+
noOrders: "주문하신 내역이 없습니다.",
|
|
5338
|
+
total: "총계",
|
|
5339
|
+
date: "날짜",
|
|
5340
|
+
details: "세부 정보",
|
|
5341
|
+
itemsAmount: "{{count}} 아이템",
|
|
5342
|
+
itemsAmount_plural: "{{count}} 아이템"
|
|
5343
|
+
};
|
|
5344
|
+
var savedItems = {
|
|
5345
|
+
label: "저장 및 팔로우 완료",
|
|
5346
|
+
noSavedItems: "저장된 아이템이 없습니다.",
|
|
5347
|
+
categories: "종류",
|
|
5348
|
+
details: "세부 정보",
|
|
5349
|
+
removeItem: "제거"
|
|
5350
|
+
};
|
|
5351
|
+
var subCancellation = {
|
|
5352
|
+
goBack: "뒤로 가기"
|
|
5353
|
+
};
|
|
5288
5354
|
var messages$9 = {
|
|
5289
5355
|
noCard: "등록된 카드가 없습니다.",
|
|
5290
5356
|
subCancellation: {
|
|
@@ -5296,6 +5362,53 @@ var messages$9 = {
|
|
|
5296
5362
|
};
|
|
5297
5363
|
var dashboard_ko = {
|
|
5298
5364
|
labels: labels$c,
|
|
5365
|
+
shipments: shipments,
|
|
5366
|
+
logout: logout,
|
|
5367
|
+
dashboard: dashboard,
|
|
5368
|
+
unsubscribe: unsubscribe,
|
|
5369
|
+
reactivate: reactivate,
|
|
5370
|
+
renew: renew,
|
|
5371
|
+
support: support,
|
|
5372
|
+
account: account,
|
|
5373
|
+
purchases: purchases,
|
|
5374
|
+
subscriptions: subscriptions,
|
|
5375
|
+
donations: donations,
|
|
5376
|
+
invoices: invoices,
|
|
5377
|
+
details: details,
|
|
5378
|
+
view: view,
|
|
5379
|
+
paid: paid,
|
|
5380
|
+
open: open,
|
|
5381
|
+
draft: draft,
|
|
5382
|
+
scheduled: scheduled,
|
|
5383
|
+
uncollectible: uncollectible,
|
|
5384
|
+
"void": "무효",
|
|
5385
|
+
pastDue: pastDue,
|
|
5386
|
+
updatePaymentSource: updatePaymentSource,
|
|
5387
|
+
profile: profile,
|
|
5388
|
+
updateProfile: updateProfile,
|
|
5389
|
+
changePassword: changePassword,
|
|
5390
|
+
editNewsletters: editNewsletters,
|
|
5391
|
+
edit: edit,
|
|
5392
|
+
gifts: gifts,
|
|
5393
|
+
redeemGift: redeemGift,
|
|
5394
|
+
address: address,
|
|
5395
|
+
addresses: addresses,
|
|
5396
|
+
myProfile: myProfile,
|
|
5397
|
+
paymentSource: paymentSource,
|
|
5398
|
+
actions: actions,
|
|
5399
|
+
expiresOn: expiresOn,
|
|
5400
|
+
startsOn: startsOn,
|
|
5401
|
+
startDate: startDate,
|
|
5402
|
+
renewsOn: renewsOn,
|
|
5403
|
+
canceledOn: canceledOn,
|
|
5404
|
+
recipient: recipient,
|
|
5405
|
+
addAddress: addAddress,
|
|
5406
|
+
addSubscription: addSubscription,
|
|
5407
|
+
addGift: addGift,
|
|
5408
|
+
"default": "기본",
|
|
5409
|
+
orders: orders,
|
|
5410
|
+
savedItems: savedItems,
|
|
5411
|
+
subCancellation: subCancellation,
|
|
5299
5412
|
messages: messages$9
|
|
5300
5413
|
};
|
|
5301
5414
|
|
|
@@ -10616,6 +10729,7 @@ const GET_NEWSLETTERS_SUCCESS = "GET_NEWSLETTERS_SUCCESS";
|
|
|
10616
10729
|
const SWITCH_TO_UPDATE = "SWITCH_TO_UPDATE";
|
|
10617
10730
|
const LINK_TOKEN_VERIFY = "LINK_TOKEN_VERIFY";
|
|
10618
10731
|
const SET_CANCEL_SUBSCRIPTION_REASON = "SET_CANCEL_SUBSCRIPTION_REASON";
|
|
10732
|
+
const HANDLE_CHECKBOX_CHANGE = "HANDLE_CHECKBOX_CHANGE";
|
|
10619
10733
|
|
|
10620
10734
|
const initialState$k = {
|
|
10621
10735
|
email: "",
|
|
@@ -18438,6 +18552,7 @@ const initialState$e = {
|
|
|
18438
18552
|
postalCodeError: "",
|
|
18439
18553
|
states: [],
|
|
18440
18554
|
countries: [],
|
|
18555
|
+
isDefault: false,
|
|
18441
18556
|
alert: {
|
|
18442
18557
|
type: "error",
|
|
18443
18558
|
content: ""
|
|
@@ -18520,7 +18635,8 @@ const AddressCreateContainer = ({
|
|
|
18520
18635
|
city,
|
|
18521
18636
|
state,
|
|
18522
18637
|
country,
|
|
18523
|
-
postalCode
|
|
18638
|
+
postalCode,
|
|
18639
|
+
isDefault
|
|
18524
18640
|
}, dispatch) => {
|
|
18525
18641
|
window.Pelcro.address.create({
|
|
18526
18642
|
auth_token: window.Pelcro.user.read().auth_token,
|
|
@@ -18531,7 +18647,8 @@ const AddressCreateContainer = ({
|
|
|
18531
18647
|
city: city,
|
|
18532
18648
|
state: state,
|
|
18533
18649
|
country: country,
|
|
18534
|
-
postal_code: postalCode
|
|
18650
|
+
postal_code: postalCode,
|
|
18651
|
+
is_default: isDefault
|
|
18535
18652
|
}, (err, res) => {
|
|
18536
18653
|
if (err) {
|
|
18537
18654
|
dispatch({
|
|
@@ -18658,6 +18775,11 @@ const AddressCreateContainer = ({
|
|
|
18658
18775
|
...action.payload
|
|
18659
18776
|
});
|
|
18660
18777
|
|
|
18778
|
+
case HANDLE_CHECKBOX_CHANGE:
|
|
18779
|
+
return lib_7({ ...state,
|
|
18780
|
+
...action.payload
|
|
18781
|
+
});
|
|
18782
|
+
|
|
18661
18783
|
case VALIDATE_FIELD:
|
|
18662
18784
|
return lib_7({ ...state,
|
|
18663
18785
|
[`${action.payload}Error`]: state[action.payload] ? "" : t("labels.required")
|
|
@@ -19158,6 +19280,27 @@ const AddressCreateStateSelect = props => /*#__PURE__*/React__default['default']
|
|
|
19158
19280
|
store: store$e
|
|
19159
19281
|
}, props));
|
|
19160
19282
|
|
|
19283
|
+
const AddressCreateSetDefault = props => {
|
|
19284
|
+
const {
|
|
19285
|
+
dispatch,
|
|
19286
|
+
state
|
|
19287
|
+
} = React.useContext(store$e);
|
|
19288
|
+
|
|
19289
|
+
const handleCheckboxChange = e => {
|
|
19290
|
+
dispatch({
|
|
19291
|
+
type: HANDLE_CHECKBOX_CHANGE,
|
|
19292
|
+
payload: {
|
|
19293
|
+
isDefault: e.target.checked
|
|
19294
|
+
}
|
|
19295
|
+
});
|
|
19296
|
+
};
|
|
19297
|
+
|
|
19298
|
+
return /*#__PURE__*/React__default['default'].createElement(Checkbox, {
|
|
19299
|
+
onChange: e => handleCheckboxChange(e),
|
|
19300
|
+
id: props.id
|
|
19301
|
+
}, props.label);
|
|
19302
|
+
};
|
|
19303
|
+
|
|
19161
19304
|
const AddressCreateView = props => {
|
|
19162
19305
|
const {
|
|
19163
19306
|
t
|
|
@@ -19213,6 +19356,11 @@ const AddressCreateView = props => {
|
|
|
19213
19356
|
id: "pelcro-input-state",
|
|
19214
19357
|
errorId: "pelcro-input-state-error",
|
|
19215
19358
|
required: true
|
|
19359
|
+
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
19360
|
+
className: "plc-flex plc-space-x-3 plc-items-start plc-mb-3"
|
|
19361
|
+
}, /*#__PURE__*/React__default['default'].createElement(AddressCreateSetDefault, {
|
|
19362
|
+
id: "pelcro-input-is-default",
|
|
19363
|
+
label: t("labels.isDefault")
|
|
19216
19364
|
})), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
19217
19365
|
className: "plc-text-gray-900 pelcro-footnote"
|
|
19218
19366
|
}, "* ", t("labels.required")), /*#__PURE__*/React__default['default'].createElement(AddressCreateSubmit, {
|
|
@@ -19299,6 +19447,7 @@ const initialState$d = {
|
|
|
19299
19447
|
postalCodeError: "",
|
|
19300
19448
|
states: [],
|
|
19301
19449
|
countries: [],
|
|
19450
|
+
isDefault: false,
|
|
19302
19451
|
alert: {
|
|
19303
19452
|
type: "error",
|
|
19304
19453
|
content: ""
|
|
@@ -19367,7 +19516,8 @@ const AddressUpdateContainer = ({
|
|
|
19367
19516
|
city: thisAddress.city,
|
|
19368
19517
|
state: thisAddress.state,
|
|
19369
19518
|
country: thisAddress.country,
|
|
19370
|
-
postalCode: thisAddress.postal_code
|
|
19519
|
+
postalCode: thisAddress.postal_code,
|
|
19520
|
+
isDefault: thisAddress.is_default
|
|
19371
19521
|
};
|
|
19372
19522
|
dispatch({
|
|
19373
19523
|
type: SET_TEXT_FIELD,
|
|
@@ -19385,7 +19535,8 @@ const AddressUpdateContainer = ({
|
|
|
19385
19535
|
city,
|
|
19386
19536
|
state,
|
|
19387
19537
|
country,
|
|
19388
|
-
postalCode
|
|
19538
|
+
postalCode,
|
|
19539
|
+
isDefault
|
|
19389
19540
|
}, dispatch) => {
|
|
19390
19541
|
window.Pelcro.address.update({
|
|
19391
19542
|
address_id: addressId,
|
|
@@ -19397,7 +19548,8 @@ const AddressUpdateContainer = ({
|
|
|
19397
19548
|
city: city,
|
|
19398
19549
|
state: state,
|
|
19399
19550
|
country: country,
|
|
19400
|
-
postal_code: postalCode
|
|
19551
|
+
postal_code: postalCode,
|
|
19552
|
+
is_default: isDefault
|
|
19401
19553
|
}, (err, res) => {
|
|
19402
19554
|
dispatch({
|
|
19403
19555
|
type: LOADING,
|
|
@@ -19464,6 +19616,11 @@ const AddressUpdateContainer = ({
|
|
|
19464
19616
|
...action.payload
|
|
19465
19617
|
});
|
|
19466
19618
|
|
|
19619
|
+
case HANDLE_CHECKBOX_CHANGE:
|
|
19620
|
+
return lib_7({ ...state,
|
|
19621
|
+
...action.payload
|
|
19622
|
+
});
|
|
19623
|
+
|
|
19467
19624
|
case VALIDATE_FIELD:
|
|
19468
19625
|
return lib_7({ ...state,
|
|
19469
19626
|
[`${action.payload}Error`]: state[action.payload] ? "" : t("labels.required")
|
|
@@ -19793,6 +19950,30 @@ const AddressUpdateStateSelect = props => /*#__PURE__*/React__default['default']
|
|
|
19793
19950
|
store: store$d
|
|
19794
19951
|
}, props));
|
|
19795
19952
|
|
|
19953
|
+
function AddressUpdateSetDefault(props) {
|
|
19954
|
+
const {
|
|
19955
|
+
dispatch,
|
|
19956
|
+
state: {
|
|
19957
|
+
isDefault
|
|
19958
|
+
}
|
|
19959
|
+
} = React.useContext(store$d);
|
|
19960
|
+
|
|
19961
|
+
const handleCheckboxChange = e => {
|
|
19962
|
+
dispatch({
|
|
19963
|
+
type: HANDLE_CHECKBOX_CHANGE,
|
|
19964
|
+
payload: {
|
|
19965
|
+
isDefault: e.target.checked
|
|
19966
|
+
}
|
|
19967
|
+
});
|
|
19968
|
+
};
|
|
19969
|
+
|
|
19970
|
+
return /*#__PURE__*/React__default['default'].createElement(Checkbox, {
|
|
19971
|
+
onChange: e => handleCheckboxChange(e),
|
|
19972
|
+
id: props.id,
|
|
19973
|
+
checked: isDefault
|
|
19974
|
+
}, props.label);
|
|
19975
|
+
}
|
|
19976
|
+
|
|
19796
19977
|
const AddressUpdateView = props => {
|
|
19797
19978
|
const {
|
|
19798
19979
|
t
|
|
@@ -19848,6 +20029,11 @@ const AddressUpdateView = props => {
|
|
|
19848
20029
|
errorId: "pelcro-input-state-error",
|
|
19849
20030
|
label: t("labels.region"),
|
|
19850
20031
|
required: true
|
|
20032
|
+
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
20033
|
+
className: "plc-flex plc-space-x-3 plc-items-start plc-mb-3"
|
|
20034
|
+
}, /*#__PURE__*/React__default['default'].createElement(AddressUpdateSetDefault, {
|
|
20035
|
+
id: "pelcro-input-is-default",
|
|
20036
|
+
label: t("labels.isDefault")
|
|
19851
20037
|
})), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
19852
20038
|
className: "plc-text-gray-900 pelcro-footnote"
|
|
19853
20039
|
}, "* ", t("labels.required")), /*#__PURE__*/React__default['default'].createElement(AddressUpdateSubmit, {
|
|
@@ -25109,7 +25295,13 @@ class Dashboard extends React.Component {
|
|
|
25109
25295
|
className: "plc-font-semibold plc-text-gray-600"
|
|
25110
25296
|
}, address.city, ", ", address.country), " ", /*#__PURE__*/React__default['default'].createElement("span", {
|
|
25111
25297
|
title: address.line1
|
|
25112
|
-
}, address.line1)
|
|
25298
|
+
}, address.line1), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25299
|
+
className: "plc-flex plc-mb-2 plc-mt-1"
|
|
25300
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
25301
|
+
className: "plc-rounded-full plc-bg-gray-200 plc-text-black plc-inline-flex plc-items-start plc-py-1 plc-px-4 plc-text-sm plc-capitalize"
|
|
25302
|
+
}, address.type), address.is_default && /*#__PURE__*/React__default['default'].createElement("span", {
|
|
25303
|
+
className: "plc-rounded-full plc-bg-gray-800 plc-text-white plc-inline-flex plc-items-start plc-py-1 plc-px-4 plc-text-sm plc-ml-2"
|
|
25304
|
+
}, this.locale("labels.default")))), /*#__PURE__*/React__default['default'].createElement("td", null, /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
25113
25305
|
variant: "icon",
|
|
25114
25306
|
className: "plc-text-gray-500",
|
|
25115
25307
|
icon: /*#__PURE__*/React__default['default'].createElement(SvgEdit, null),
|
package/dist/index.esm.js
CHANGED
|
@@ -3221,7 +3221,7 @@ var buttons$e = {
|
|
|
3221
3221
|
account: "Accès abonné(e)s",
|
|
3222
3222
|
login: "Se connecter"
|
|
3223
3223
|
};
|
|
3224
|
-
var dashboard$
|
|
3224
|
+
var dashboard$3 = {
|
|
3225
3225
|
labels: {
|
|
3226
3226
|
menu: "Menu Pelcro",
|
|
3227
3227
|
name: "Nom",
|
|
@@ -3295,7 +3295,7 @@ var confirm$8 = {
|
|
|
3295
3295
|
var common_fr = {
|
|
3296
3296
|
validation: validation$2,
|
|
3297
3297
|
buttons: buttons$e,
|
|
3298
|
-
dashboard: dashboard$
|
|
3298
|
+
dashboard: dashboard$3,
|
|
3299
3299
|
select: select$5,
|
|
3300
3300
|
confirm: confirm$8
|
|
3301
3301
|
};
|
|
@@ -3310,7 +3310,7 @@ var buttons$d = {
|
|
|
3310
3310
|
account: "My account",
|
|
3311
3311
|
login: "Login"
|
|
3312
3312
|
};
|
|
3313
|
-
var dashboard$
|
|
3313
|
+
var dashboard$2 = {
|
|
3314
3314
|
labels: {
|
|
3315
3315
|
menu: "Pelcro Menu",
|
|
3316
3316
|
name: "Name",
|
|
@@ -3384,7 +3384,7 @@ var confirm$7 = {
|
|
|
3384
3384
|
var common_en = {
|
|
3385
3385
|
validation: validation$1,
|
|
3386
3386
|
buttons: buttons$d,
|
|
3387
|
-
dashboard: dashboard$
|
|
3387
|
+
dashboard: dashboard$2,
|
|
3388
3388
|
select: select$4,
|
|
3389
3389
|
confirm: confirm$7
|
|
3390
3390
|
};
|
|
@@ -3398,7 +3398,7 @@ var buttons$c = {
|
|
|
3398
3398
|
account: "내 계정",
|
|
3399
3399
|
login: "로그인"
|
|
3400
3400
|
};
|
|
3401
|
-
var dashboard = {
|
|
3401
|
+
var dashboard$1 = {
|
|
3402
3402
|
labels: {
|
|
3403
3403
|
menu: "Pelcro 메뉴",
|
|
3404
3404
|
name: "이름",
|
|
@@ -3472,7 +3472,7 @@ var confirm$6 = {
|
|
|
3472
3472
|
var common_ko = {
|
|
3473
3473
|
validation: validation,
|
|
3474
3474
|
buttons: buttons$c,
|
|
3475
|
-
dashboard: dashboard,
|
|
3475
|
+
dashboard: dashboard$1,
|
|
3476
3476
|
select: select$3,
|
|
3477
3477
|
confirm: confirm$6
|
|
3478
3478
|
};
|
|
@@ -4416,7 +4416,8 @@ var labels$n = {
|
|
|
4416
4416
|
country: "Country",
|
|
4417
4417
|
firstName: "First name",
|
|
4418
4418
|
lastName: "Last name",
|
|
4419
|
-
required: "required"
|
|
4419
|
+
required: "required",
|
|
4420
|
+
isDefault: "Set as default"
|
|
4420
4421
|
};
|
|
4421
4422
|
var buttons$b = {
|
|
4422
4423
|
submit: "Submit",
|
|
@@ -4447,7 +4448,8 @@ var labels$m = {
|
|
|
4447
4448
|
country: "Pays",
|
|
4448
4449
|
firstName: "Prénom",
|
|
4449
4450
|
lastName: "Nom de famille",
|
|
4450
|
-
required: "Champs obligatoires"
|
|
4451
|
+
required: "Champs obligatoires",
|
|
4452
|
+
isDefault: "Définir par défaut"
|
|
4451
4453
|
};
|
|
4452
4454
|
var buttons$a = {
|
|
4453
4455
|
submit: "Valider",
|
|
@@ -4478,7 +4480,8 @@ var labels$l = {
|
|
|
4478
4480
|
country: "국가",
|
|
4479
4481
|
firstName: "이름",
|
|
4480
4482
|
lastName: "성",
|
|
4481
|
-
required: "필수 항목"
|
|
4483
|
+
required: "필수 항목",
|
|
4484
|
+
isDefault: "기본값으로 설정"
|
|
4482
4485
|
};
|
|
4483
4486
|
var buttons$9 = {
|
|
4484
4487
|
submit: "제출",
|
|
@@ -4728,7 +4731,7 @@ var subtitle$2 = "Terminez votre achat ci-dessous";
|
|
|
4728
4731
|
var name$2 = "Produit";
|
|
4729
4732
|
var quantity$2 = "Quantité";
|
|
4730
4733
|
var price$2 = "Prix";
|
|
4731
|
-
var actions$
|
|
4734
|
+
var actions$3 = "Actes";
|
|
4732
4735
|
var remove$2 = "Retirer";
|
|
4733
4736
|
var total$2 = "Total";
|
|
4734
4737
|
var confirm$5 = "Passer à la caisse";
|
|
@@ -4740,7 +4743,7 @@ var cart_fr = {
|
|
|
4740
4743
|
name: name$2,
|
|
4741
4744
|
quantity: quantity$2,
|
|
4742
4745
|
price: price$2,
|
|
4743
|
-
actions: actions$
|
|
4746
|
+
actions: actions$3,
|
|
4744
4747
|
remove: remove$2,
|
|
4745
4748
|
total: total$2,
|
|
4746
4749
|
confirm: confirm$5,
|
|
@@ -4753,7 +4756,7 @@ var subtitle$1 = "Comple your purchase below";
|
|
|
4753
4756
|
var name$1 = "Name";
|
|
4754
4757
|
var quantity$1 = "Quantity";
|
|
4755
4758
|
var price$1 = "Price";
|
|
4756
|
-
var actions$
|
|
4759
|
+
var actions$2 = "Actions";
|
|
4757
4760
|
var remove$1 = "Remove";
|
|
4758
4761
|
var total$1 = "Total";
|
|
4759
4762
|
var confirm$4 = "Checkout";
|
|
@@ -4765,7 +4768,7 @@ var cart_en = {
|
|
|
4765
4768
|
name: name$1,
|
|
4766
4769
|
quantity: quantity$1,
|
|
4767
4770
|
price: price$1,
|
|
4768
|
-
actions: actions$
|
|
4771
|
+
actions: actions$2,
|
|
4769
4772
|
remove: remove$1,
|
|
4770
4773
|
total: total$1,
|
|
4771
4774
|
confirm: confirm$4,
|
|
@@ -4778,7 +4781,7 @@ var subtitle = "아래에서 결제를 진행하세요.";
|
|
|
4778
4781
|
var name = "이름";
|
|
4779
4782
|
var quantity = "수량";
|
|
4780
4783
|
var price = "가격";
|
|
4781
|
-
var actions = "조치";
|
|
4784
|
+
var actions$1 = "조치";
|
|
4782
4785
|
var remove = "제거";
|
|
4783
4786
|
var total = "총계";
|
|
4784
4787
|
var confirm$3 = "체크아웃";
|
|
@@ -4790,7 +4793,7 @@ var cart_ko = {
|
|
|
4790
4793
|
name: name,
|
|
4791
4794
|
quantity: quantity,
|
|
4792
4795
|
price: price,
|
|
4793
|
-
actions: actions,
|
|
4796
|
+
actions: actions$1,
|
|
4794
4797
|
remove: remove,
|
|
4795
4798
|
total: total,
|
|
4796
4799
|
confirm: confirm$3,
|
|
@@ -5051,6 +5054,7 @@ var labels$e = {
|
|
|
5051
5054
|
addAddress: "Add address",
|
|
5052
5055
|
addSubscription: "New Subscription",
|
|
5053
5056
|
addGift: "New Gift",
|
|
5057
|
+
"default": "Default",
|
|
5054
5058
|
orders: {
|
|
5055
5059
|
label: "Orders",
|
|
5056
5060
|
noOrders: "You have not placed any orders",
|
|
@@ -5143,6 +5147,7 @@ var labels$d = {
|
|
|
5143
5147
|
addAddress: "Ajoutez l'adresse",
|
|
5144
5148
|
addSubscription: "Nouvel abonnement",
|
|
5145
5149
|
addGift: "Ajouter un cadeau",
|
|
5150
|
+
"default": "Défaut",
|
|
5146
5151
|
orders: {
|
|
5147
5152
|
label: "Commandes",
|
|
5148
5153
|
noOrders: "Vous n'avez passé aucune commande",
|
|
@@ -5255,6 +5260,67 @@ var labels$c = {
|
|
|
5255
5260
|
goBack: "뒤로 가기"
|
|
5256
5261
|
}
|
|
5257
5262
|
};
|
|
5263
|
+
var shipments = "남은 배송 일정";
|
|
5264
|
+
var logout = "로그아웃";
|
|
5265
|
+
var dashboard = "대시보드";
|
|
5266
|
+
var unsubscribe = "취소";
|
|
5267
|
+
var reactivate = "재활성화";
|
|
5268
|
+
var renew = "갱신";
|
|
5269
|
+
var support = "지원";
|
|
5270
|
+
var account = "계정";
|
|
5271
|
+
var purchases = "구매";
|
|
5272
|
+
var subscriptions = "유료 멤버십";
|
|
5273
|
+
var donations = "기부";
|
|
5274
|
+
var invoices = "인보이스";
|
|
5275
|
+
var details = "세부 정보";
|
|
5276
|
+
var view = "보기";
|
|
5277
|
+
var paid = "결제 완료";
|
|
5278
|
+
var open = "열기";
|
|
5279
|
+
var draft = "임시 저장";
|
|
5280
|
+
var scheduled = "예약";
|
|
5281
|
+
var uncollectible = "사용 불가";
|
|
5282
|
+
var pastDue = "연체";
|
|
5283
|
+
var updatePaymentSource = "업데이트";
|
|
5284
|
+
var profile = "프로필";
|
|
5285
|
+
var updateProfile = "프로필 편집";
|
|
5286
|
+
var changePassword = "비밀번호 변경";
|
|
5287
|
+
var editNewsletters = "뉴스레터 편집";
|
|
5288
|
+
var edit = "편집";
|
|
5289
|
+
var gifts = "선물";
|
|
5290
|
+
var redeemGift = "선물 사용";
|
|
5291
|
+
var address = "주소";
|
|
5292
|
+
var addresses = "주소들";
|
|
5293
|
+
var myProfile = "내 프로필";
|
|
5294
|
+
var paymentSource = "결제 카드";
|
|
5295
|
+
var actions = "조치";
|
|
5296
|
+
var expiresOn = "종료";
|
|
5297
|
+
var startsOn = "시작";
|
|
5298
|
+
var startDate = "시작일";
|
|
5299
|
+
var renewsOn = "갱신";
|
|
5300
|
+
var canceledOn = "취소일";
|
|
5301
|
+
var recipient = "받는 사람";
|
|
5302
|
+
var addAddress = "주소 추가";
|
|
5303
|
+
var addSubscription = "새 유료 멤버십";
|
|
5304
|
+
var addGift = "새 선물";
|
|
5305
|
+
var orders = {
|
|
5306
|
+
label: "주문",
|
|
5307
|
+
noOrders: "주문하신 내역이 없습니다.",
|
|
5308
|
+
total: "총계",
|
|
5309
|
+
date: "날짜",
|
|
5310
|
+
details: "세부 정보",
|
|
5311
|
+
itemsAmount: "{{count}} 아이템",
|
|
5312
|
+
itemsAmount_plural: "{{count}} 아이템"
|
|
5313
|
+
};
|
|
5314
|
+
var savedItems = {
|
|
5315
|
+
label: "저장 및 팔로우 완료",
|
|
5316
|
+
noSavedItems: "저장된 아이템이 없습니다.",
|
|
5317
|
+
categories: "종류",
|
|
5318
|
+
details: "세부 정보",
|
|
5319
|
+
removeItem: "제거"
|
|
5320
|
+
};
|
|
5321
|
+
var subCancellation = {
|
|
5322
|
+
goBack: "뒤로 가기"
|
|
5323
|
+
};
|
|
5258
5324
|
var messages$9 = {
|
|
5259
5325
|
noCard: "등록된 카드가 없습니다.",
|
|
5260
5326
|
subCancellation: {
|
|
@@ -5266,6 +5332,53 @@ var messages$9 = {
|
|
|
5266
5332
|
};
|
|
5267
5333
|
var dashboard_ko = {
|
|
5268
5334
|
labels: labels$c,
|
|
5335
|
+
shipments: shipments,
|
|
5336
|
+
logout: logout,
|
|
5337
|
+
dashboard: dashboard,
|
|
5338
|
+
unsubscribe: unsubscribe,
|
|
5339
|
+
reactivate: reactivate,
|
|
5340
|
+
renew: renew,
|
|
5341
|
+
support: support,
|
|
5342
|
+
account: account,
|
|
5343
|
+
purchases: purchases,
|
|
5344
|
+
subscriptions: subscriptions,
|
|
5345
|
+
donations: donations,
|
|
5346
|
+
invoices: invoices,
|
|
5347
|
+
details: details,
|
|
5348
|
+
view: view,
|
|
5349
|
+
paid: paid,
|
|
5350
|
+
open: open,
|
|
5351
|
+
draft: draft,
|
|
5352
|
+
scheduled: scheduled,
|
|
5353
|
+
uncollectible: uncollectible,
|
|
5354
|
+
"void": "무효",
|
|
5355
|
+
pastDue: pastDue,
|
|
5356
|
+
updatePaymentSource: updatePaymentSource,
|
|
5357
|
+
profile: profile,
|
|
5358
|
+
updateProfile: updateProfile,
|
|
5359
|
+
changePassword: changePassword,
|
|
5360
|
+
editNewsletters: editNewsletters,
|
|
5361
|
+
edit: edit,
|
|
5362
|
+
gifts: gifts,
|
|
5363
|
+
redeemGift: redeemGift,
|
|
5364
|
+
address: address,
|
|
5365
|
+
addresses: addresses,
|
|
5366
|
+
myProfile: myProfile,
|
|
5367
|
+
paymentSource: paymentSource,
|
|
5368
|
+
actions: actions,
|
|
5369
|
+
expiresOn: expiresOn,
|
|
5370
|
+
startsOn: startsOn,
|
|
5371
|
+
startDate: startDate,
|
|
5372
|
+
renewsOn: renewsOn,
|
|
5373
|
+
canceledOn: canceledOn,
|
|
5374
|
+
recipient: recipient,
|
|
5375
|
+
addAddress: addAddress,
|
|
5376
|
+
addSubscription: addSubscription,
|
|
5377
|
+
addGift: addGift,
|
|
5378
|
+
"default": "기본",
|
|
5379
|
+
orders: orders,
|
|
5380
|
+
savedItems: savedItems,
|
|
5381
|
+
subCancellation: subCancellation,
|
|
5269
5382
|
messages: messages$9
|
|
5270
5383
|
};
|
|
5271
5384
|
|
|
@@ -10586,6 +10699,7 @@ const GET_NEWSLETTERS_SUCCESS = "GET_NEWSLETTERS_SUCCESS";
|
|
|
10586
10699
|
const SWITCH_TO_UPDATE = "SWITCH_TO_UPDATE";
|
|
10587
10700
|
const LINK_TOKEN_VERIFY = "LINK_TOKEN_VERIFY";
|
|
10588
10701
|
const SET_CANCEL_SUBSCRIPTION_REASON = "SET_CANCEL_SUBSCRIPTION_REASON";
|
|
10702
|
+
const HANDLE_CHECKBOX_CHANGE = "HANDLE_CHECKBOX_CHANGE";
|
|
10589
10703
|
|
|
10590
10704
|
const initialState$k = {
|
|
10591
10705
|
email: "",
|
|
@@ -18408,6 +18522,7 @@ const initialState$e = {
|
|
|
18408
18522
|
postalCodeError: "",
|
|
18409
18523
|
states: [],
|
|
18410
18524
|
countries: [],
|
|
18525
|
+
isDefault: false,
|
|
18411
18526
|
alert: {
|
|
18412
18527
|
type: "error",
|
|
18413
18528
|
content: ""
|
|
@@ -18490,7 +18605,8 @@ const AddressCreateContainer = ({
|
|
|
18490
18605
|
city,
|
|
18491
18606
|
state,
|
|
18492
18607
|
country,
|
|
18493
|
-
postalCode
|
|
18608
|
+
postalCode,
|
|
18609
|
+
isDefault
|
|
18494
18610
|
}, dispatch) => {
|
|
18495
18611
|
window.Pelcro.address.create({
|
|
18496
18612
|
auth_token: window.Pelcro.user.read().auth_token,
|
|
@@ -18501,7 +18617,8 @@ const AddressCreateContainer = ({
|
|
|
18501
18617
|
city: city,
|
|
18502
18618
|
state: state,
|
|
18503
18619
|
country: country,
|
|
18504
|
-
postal_code: postalCode
|
|
18620
|
+
postal_code: postalCode,
|
|
18621
|
+
is_default: isDefault
|
|
18505
18622
|
}, (err, res) => {
|
|
18506
18623
|
if (err) {
|
|
18507
18624
|
dispatch({
|
|
@@ -18628,6 +18745,11 @@ const AddressCreateContainer = ({
|
|
|
18628
18745
|
...action.payload
|
|
18629
18746
|
});
|
|
18630
18747
|
|
|
18748
|
+
case HANDLE_CHECKBOX_CHANGE:
|
|
18749
|
+
return lib_7({ ...state,
|
|
18750
|
+
...action.payload
|
|
18751
|
+
});
|
|
18752
|
+
|
|
18631
18753
|
case VALIDATE_FIELD:
|
|
18632
18754
|
return lib_7({ ...state,
|
|
18633
18755
|
[`${action.payload}Error`]: state[action.payload] ? "" : t("labels.required")
|
|
@@ -19128,6 +19250,27 @@ const AddressCreateStateSelect = props => /*#__PURE__*/React__default.createElem
|
|
|
19128
19250
|
store: store$e
|
|
19129
19251
|
}, props));
|
|
19130
19252
|
|
|
19253
|
+
const AddressCreateSetDefault = props => {
|
|
19254
|
+
const {
|
|
19255
|
+
dispatch,
|
|
19256
|
+
state
|
|
19257
|
+
} = useContext(store$e);
|
|
19258
|
+
|
|
19259
|
+
const handleCheckboxChange = e => {
|
|
19260
|
+
dispatch({
|
|
19261
|
+
type: HANDLE_CHECKBOX_CHANGE,
|
|
19262
|
+
payload: {
|
|
19263
|
+
isDefault: e.target.checked
|
|
19264
|
+
}
|
|
19265
|
+
});
|
|
19266
|
+
};
|
|
19267
|
+
|
|
19268
|
+
return /*#__PURE__*/React__default.createElement(Checkbox, {
|
|
19269
|
+
onChange: e => handleCheckboxChange(e),
|
|
19270
|
+
id: props.id
|
|
19271
|
+
}, props.label);
|
|
19272
|
+
};
|
|
19273
|
+
|
|
19131
19274
|
const AddressCreateView = props => {
|
|
19132
19275
|
const {
|
|
19133
19276
|
t
|
|
@@ -19183,6 +19326,11 @@ const AddressCreateView = props => {
|
|
|
19183
19326
|
id: "pelcro-input-state",
|
|
19184
19327
|
errorId: "pelcro-input-state-error",
|
|
19185
19328
|
required: true
|
|
19329
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
19330
|
+
className: "plc-flex plc-space-x-3 plc-items-start plc-mb-3"
|
|
19331
|
+
}, /*#__PURE__*/React__default.createElement(AddressCreateSetDefault, {
|
|
19332
|
+
id: "pelcro-input-is-default",
|
|
19333
|
+
label: t("labels.isDefault")
|
|
19186
19334
|
})), /*#__PURE__*/React__default.createElement("p", {
|
|
19187
19335
|
className: "plc-text-gray-900 pelcro-footnote"
|
|
19188
19336
|
}, "* ", t("labels.required")), /*#__PURE__*/React__default.createElement(AddressCreateSubmit, {
|
|
@@ -19269,6 +19417,7 @@ const initialState$d = {
|
|
|
19269
19417
|
postalCodeError: "",
|
|
19270
19418
|
states: [],
|
|
19271
19419
|
countries: [],
|
|
19420
|
+
isDefault: false,
|
|
19272
19421
|
alert: {
|
|
19273
19422
|
type: "error",
|
|
19274
19423
|
content: ""
|
|
@@ -19337,7 +19486,8 @@ const AddressUpdateContainer = ({
|
|
|
19337
19486
|
city: thisAddress.city,
|
|
19338
19487
|
state: thisAddress.state,
|
|
19339
19488
|
country: thisAddress.country,
|
|
19340
|
-
postalCode: thisAddress.postal_code
|
|
19489
|
+
postalCode: thisAddress.postal_code,
|
|
19490
|
+
isDefault: thisAddress.is_default
|
|
19341
19491
|
};
|
|
19342
19492
|
dispatch({
|
|
19343
19493
|
type: SET_TEXT_FIELD,
|
|
@@ -19355,7 +19505,8 @@ const AddressUpdateContainer = ({
|
|
|
19355
19505
|
city,
|
|
19356
19506
|
state,
|
|
19357
19507
|
country,
|
|
19358
|
-
postalCode
|
|
19508
|
+
postalCode,
|
|
19509
|
+
isDefault
|
|
19359
19510
|
}, dispatch) => {
|
|
19360
19511
|
window.Pelcro.address.update({
|
|
19361
19512
|
address_id: addressId,
|
|
@@ -19367,7 +19518,8 @@ const AddressUpdateContainer = ({
|
|
|
19367
19518
|
city: city,
|
|
19368
19519
|
state: state,
|
|
19369
19520
|
country: country,
|
|
19370
|
-
postal_code: postalCode
|
|
19521
|
+
postal_code: postalCode,
|
|
19522
|
+
is_default: isDefault
|
|
19371
19523
|
}, (err, res) => {
|
|
19372
19524
|
dispatch({
|
|
19373
19525
|
type: LOADING,
|
|
@@ -19434,6 +19586,11 @@ const AddressUpdateContainer = ({
|
|
|
19434
19586
|
...action.payload
|
|
19435
19587
|
});
|
|
19436
19588
|
|
|
19589
|
+
case HANDLE_CHECKBOX_CHANGE:
|
|
19590
|
+
return lib_7({ ...state,
|
|
19591
|
+
...action.payload
|
|
19592
|
+
});
|
|
19593
|
+
|
|
19437
19594
|
case VALIDATE_FIELD:
|
|
19438
19595
|
return lib_7({ ...state,
|
|
19439
19596
|
[`${action.payload}Error`]: state[action.payload] ? "" : t("labels.required")
|
|
@@ -19763,6 +19920,30 @@ const AddressUpdateStateSelect = props => /*#__PURE__*/React__default.createElem
|
|
|
19763
19920
|
store: store$d
|
|
19764
19921
|
}, props));
|
|
19765
19922
|
|
|
19923
|
+
function AddressUpdateSetDefault(props) {
|
|
19924
|
+
const {
|
|
19925
|
+
dispatch,
|
|
19926
|
+
state: {
|
|
19927
|
+
isDefault
|
|
19928
|
+
}
|
|
19929
|
+
} = useContext(store$d);
|
|
19930
|
+
|
|
19931
|
+
const handleCheckboxChange = e => {
|
|
19932
|
+
dispatch({
|
|
19933
|
+
type: HANDLE_CHECKBOX_CHANGE,
|
|
19934
|
+
payload: {
|
|
19935
|
+
isDefault: e.target.checked
|
|
19936
|
+
}
|
|
19937
|
+
});
|
|
19938
|
+
};
|
|
19939
|
+
|
|
19940
|
+
return /*#__PURE__*/React__default.createElement(Checkbox, {
|
|
19941
|
+
onChange: e => handleCheckboxChange(e),
|
|
19942
|
+
id: props.id,
|
|
19943
|
+
checked: isDefault
|
|
19944
|
+
}, props.label);
|
|
19945
|
+
}
|
|
19946
|
+
|
|
19766
19947
|
const AddressUpdateView = props => {
|
|
19767
19948
|
const {
|
|
19768
19949
|
t
|
|
@@ -19818,6 +19999,11 @@ const AddressUpdateView = props => {
|
|
|
19818
19999
|
errorId: "pelcro-input-state-error",
|
|
19819
20000
|
label: t("labels.region"),
|
|
19820
20001
|
required: true
|
|
20002
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
20003
|
+
className: "plc-flex plc-space-x-3 plc-items-start plc-mb-3"
|
|
20004
|
+
}, /*#__PURE__*/React__default.createElement(AddressUpdateSetDefault, {
|
|
20005
|
+
id: "pelcro-input-is-default",
|
|
20006
|
+
label: t("labels.isDefault")
|
|
19821
20007
|
})), /*#__PURE__*/React__default.createElement("p", {
|
|
19822
20008
|
className: "plc-text-gray-900 pelcro-footnote"
|
|
19823
20009
|
}, "* ", t("labels.required")), /*#__PURE__*/React__default.createElement(AddressUpdateSubmit, {
|
|
@@ -25079,7 +25265,13 @@ class Dashboard extends Component {
|
|
|
25079
25265
|
className: "plc-font-semibold plc-text-gray-600"
|
|
25080
25266
|
}, address.city, ", ", address.country), " ", /*#__PURE__*/React__default.createElement("span", {
|
|
25081
25267
|
title: address.line1
|
|
25082
|
-
}, address.line1)
|
|
25268
|
+
}, address.line1), /*#__PURE__*/React__default.createElement("div", {
|
|
25269
|
+
className: "plc-flex plc-mb-2 plc-mt-1"
|
|
25270
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
25271
|
+
className: "plc-rounded-full plc-bg-gray-200 plc-text-black plc-inline-flex plc-items-start plc-py-1 plc-px-4 plc-text-sm plc-capitalize"
|
|
25272
|
+
}, address.type), address.is_default && /*#__PURE__*/React__default.createElement("span", {
|
|
25273
|
+
className: "plc-rounded-full plc-bg-gray-800 plc-text-white plc-inline-flex plc-items-start plc-py-1 plc-px-4 plc-text-sm plc-ml-2"
|
|
25274
|
+
}, this.locale("labels.default")))), /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement(Button, {
|
|
25083
25275
|
variant: "icon",
|
|
25084
25276
|
className: "plc-text-gray-500",
|
|
25085
25277
|
icon: /*#__PURE__*/React__default.createElement(SvgEdit, null),
|
package/dist/pelcro.css
CHANGED
|
@@ -1785,6 +1785,11 @@ in order to scope selectors under pelcro-root
|
|
|
1785
1785
|
background-color: rgba(243, 244, 246, var(--tw-bg-opacity));
|
|
1786
1786
|
}
|
|
1787
1787
|
|
|
1788
|
+
.pelcro-root .plc-bg-gray-200 {
|
|
1789
|
+
--tw-bg-opacity: 1;
|
|
1790
|
+
background-color: rgba(229, 231, 235, var(--tw-bg-opacity));
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1788
1793
|
.pelcro-root .plc-bg-gray-300 {
|
|
1789
1794
|
--tw-bg-opacity: 1;
|
|
1790
1795
|
background-color: rgba(209, 213, 219, var(--tw-bg-opacity));
|
|
@@ -2398,6 +2403,11 @@ in order to scope selectors under pelcro-root
|
|
|
2398
2403
|
padding: 1.25rem;
|
|
2399
2404
|
}
|
|
2400
2405
|
|
|
2406
|
+
.pelcro-root .plc-py-1 {
|
|
2407
|
+
padding-top: 0.25rem;
|
|
2408
|
+
padding-bottom: 0.25rem;
|
|
2409
|
+
}
|
|
2410
|
+
|
|
2401
2411
|
.pelcro-root .plc-px-1 {
|
|
2402
2412
|
padding-left: 0.25rem;
|
|
2403
2413
|
padding-right: 0.25rem;
|
|
@@ -2676,6 +2686,11 @@ in order to scope selectors under pelcro-root
|
|
|
2676
2686
|
color: hsl(var(--plc-primary-hue), var(--plc-primary-saturation), calc(var(--plc-primary-lightness) - 10%));
|
|
2677
2687
|
}
|
|
2678
2688
|
|
|
2689
|
+
.pelcro-root .plc-text-black {
|
|
2690
|
+
--tw-text-opacity: 1;
|
|
2691
|
+
color: rgba(0, 0, 0, var(--tw-text-opacity));
|
|
2692
|
+
}
|
|
2693
|
+
|
|
2679
2694
|
.pelcro-root .plc-text-white {
|
|
2680
2695
|
--tw-text-opacity: 1;
|
|
2681
2696
|
color: rgba(255, 255, 255, var(--tw-text-opacity));
|