@asdp/ferryui 0.1.22-dev.10310 → 0.1.22-dev.10344
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.d.mts +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.js +22 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -18
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -423,6 +423,7 @@ interface CardBannerProps {
|
|
|
423
423
|
declare const CardBanner: React$1.FC<CardBannerProps>;
|
|
424
424
|
|
|
425
425
|
interface CardTicketLabels {
|
|
426
|
+
priceListDetailButton: string;
|
|
426
427
|
availableSeatsLabel: string;
|
|
427
428
|
soldOutLabel: string;
|
|
428
429
|
estimationPrefix: string;
|
|
@@ -1690,10 +1691,12 @@ declare const PASSENGER_TYPE: {
|
|
|
1690
1691
|
};
|
|
1691
1692
|
type PASSENGER_TYPE_TYPE = typeof PASSENGER_TYPE[keyof typeof PASSENGER_TYPE];
|
|
1692
1693
|
declare const IDENTITY_TYPE: {
|
|
1693
|
-
readonly KTP:
|
|
1694
|
-
readonly SIM:
|
|
1695
|
-
readonly
|
|
1696
|
-
readonly
|
|
1694
|
+
readonly KTP: "KTP";
|
|
1695
|
+
readonly SIM: "SIM";
|
|
1696
|
+
readonly KK: "KK";
|
|
1697
|
+
readonly KTA: "KTA";
|
|
1698
|
+
readonly PASSPORT: "PASSPORT";
|
|
1699
|
+
readonly LAINNYA: "LAINNYA";
|
|
1697
1700
|
};
|
|
1698
1701
|
type IDENTITY_TYPE_TYPE = typeof IDENTITY_TYPE[keyof typeof IDENTITY_TYPE];
|
|
1699
1702
|
declare const LOAD_TYPE: {
|
package/dist/index.d.ts
CHANGED
|
@@ -423,6 +423,7 @@ interface CardBannerProps {
|
|
|
423
423
|
declare const CardBanner: React$1.FC<CardBannerProps>;
|
|
424
424
|
|
|
425
425
|
interface CardTicketLabels {
|
|
426
|
+
priceListDetailButton: string;
|
|
426
427
|
availableSeatsLabel: string;
|
|
427
428
|
soldOutLabel: string;
|
|
428
429
|
estimationPrefix: string;
|
|
@@ -1690,10 +1691,12 @@ declare const PASSENGER_TYPE: {
|
|
|
1690
1691
|
};
|
|
1691
1692
|
type PASSENGER_TYPE_TYPE = typeof PASSENGER_TYPE[keyof typeof PASSENGER_TYPE];
|
|
1692
1693
|
declare const IDENTITY_TYPE: {
|
|
1693
|
-
readonly KTP:
|
|
1694
|
-
readonly SIM:
|
|
1695
|
-
readonly
|
|
1696
|
-
readonly
|
|
1694
|
+
readonly KTP: "KTP";
|
|
1695
|
+
readonly SIM: "SIM";
|
|
1696
|
+
readonly KK: "KK";
|
|
1697
|
+
readonly KTA: "KTA";
|
|
1698
|
+
readonly PASSPORT: "PASSPORT";
|
|
1699
|
+
readonly LAINNYA: "LAINNYA";
|
|
1697
1700
|
};
|
|
1698
1701
|
type IDENTITY_TYPE_TYPE = typeof IDENTITY_TYPE[keyof typeof IDENTITY_TYPE];
|
|
1699
1702
|
declare const LOAD_TYPE: {
|
package/dist/index.js
CHANGED
|
@@ -408,10 +408,12 @@ var PASSENGER_TYPE = {
|
|
|
408
408
|
ELDERLY: 4
|
|
409
409
|
};
|
|
410
410
|
var IDENTITY_TYPE = {
|
|
411
|
-
KTP:
|
|
412
|
-
SIM:
|
|
413
|
-
|
|
414
|
-
|
|
411
|
+
KTP: "KTP",
|
|
412
|
+
SIM: "SIM",
|
|
413
|
+
KK: "KK",
|
|
414
|
+
KTA: "KTA",
|
|
415
|
+
PASSPORT: "PASSPORT",
|
|
416
|
+
LAINNYA: "LAINNYA"
|
|
415
417
|
};
|
|
416
418
|
var LOAD_TYPE = {
|
|
417
419
|
PEDESTRIAN: 1,
|
|
@@ -1098,6 +1100,7 @@ var DEFAULT_LABELS5 = {
|
|
|
1098
1100
|
soldOutLabel: "Habis",
|
|
1099
1101
|
estimationPrefix: "Estimasi",
|
|
1100
1102
|
priceDetailsButton: "Rincian Harga",
|
|
1103
|
+
priceListDetailButton: "Daftar Harga",
|
|
1101
1104
|
policyButton: "Kebijakan",
|
|
1102
1105
|
totalPriceLabel: "Total harga",
|
|
1103
1106
|
facilitiesLabel: "Fasilitas",
|
|
@@ -1113,6 +1116,7 @@ var DEFAULT_LABELS5 = {
|
|
|
1113
1116
|
soldOutLabel: "Sold Out",
|
|
1114
1117
|
estimationPrefix: "Estimation",
|
|
1115
1118
|
priceDetailsButton: "Price Details",
|
|
1119
|
+
priceListDetailButton: "Price List",
|
|
1116
1120
|
policyButton: "Policy",
|
|
1117
1121
|
totalPriceLabel: "Total price",
|
|
1118
1122
|
facilitiesLabel: "Facilities",
|
|
@@ -1720,7 +1724,7 @@ var CardTicket = ({
|
|
|
1720
1724
|
departureItem?.billingDetail,
|
|
1721
1725
|
departureItem?.provider
|
|
1722
1726
|
),
|
|
1723
|
-
children: mergedLabels.priceDetailsButton
|
|
1727
|
+
children: loadType === 6 ? mergedLabels.priceListDetailButton : mergedLabels.priceDetailsButton
|
|
1724
1728
|
}
|
|
1725
1729
|
),
|
|
1726
1730
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11468,10 +11472,10 @@ var ModalPassengerForm = ({
|
|
|
11468
11472
|
const watchIdentityTypeId = watch("identityTypeId");
|
|
11469
11473
|
const watchPassportCountryId = watch("countryId");
|
|
11470
11474
|
const watchBirthdate = watch("birthdate");
|
|
11471
|
-
const
|
|
11475
|
+
const _selectedIdentityType = idTypes.find(
|
|
11472
11476
|
(type) => type.id.toString() === watchIdentityTypeId
|
|
11473
11477
|
);
|
|
11474
|
-
const idRuleLengthMatch =
|
|
11478
|
+
const idRuleLengthMatch = _selectedIdentityType?.rule?.match(/\{(\d+)(?:,\d+)?\}/);
|
|
11475
11479
|
const dynamicMinLengthId = idRuleLengthMatch ? parseInt(idRuleLengthMatch[1], 10) : 6;
|
|
11476
11480
|
React.useEffect(() => {
|
|
11477
11481
|
reset(defaultValues);
|
|
@@ -11542,7 +11546,7 @@ var ModalPassengerForm = ({
|
|
|
11542
11546
|
ctx.drawImage(videoRef.current, 0, 0, canvas.width, canvas.height);
|
|
11543
11547
|
setCapturedImage(canvas.toDataURL("image/jpeg"));
|
|
11544
11548
|
stopCamera();
|
|
11545
|
-
if (scannedIdType === IDENTITY_TYPE.KTP) {
|
|
11549
|
+
if (scannedIdType === IDENTITY_TYPE.KTP.toString()) {
|
|
11546
11550
|
setScanStatus("reading");
|
|
11547
11551
|
} else {
|
|
11548
11552
|
setScanStatus("error");
|
|
@@ -11663,8 +11667,8 @@ var ModalPassengerForm = ({
|
|
|
11663
11667
|
const handleCloseModalSelectTypeId = () => {
|
|
11664
11668
|
setIsModalSelectIdTypeOpen(false);
|
|
11665
11669
|
};
|
|
11666
|
-
const handleSelectIdType = (
|
|
11667
|
-
setScannedIdType(
|
|
11670
|
+
const handleSelectIdType = (selectedIdentityTypeCode) => {
|
|
11671
|
+
setScannedIdType(selectedIdentityTypeCode);
|
|
11668
11672
|
setIsModalSelectIdTypeOpen(false);
|
|
11669
11673
|
setScanStatus("idle");
|
|
11670
11674
|
setIsModalScanOpen(true);
|
|
@@ -11708,11 +11712,11 @@ var ModalPassengerForm = ({
|
|
|
11708
11712
|
"div",
|
|
11709
11713
|
{
|
|
11710
11714
|
className: styles.idTypeItem,
|
|
11711
|
-
onClick: () => handleSelectIdType(
|
|
11715
|
+
onClick: () => handleSelectIdType(type.code),
|
|
11712
11716
|
onKeyDown: (e) => {
|
|
11713
11717
|
if (e.key === "Enter" || e.key === " ") {
|
|
11714
11718
|
e.preventDefault();
|
|
11715
|
-
handleSelectIdType(type.
|
|
11719
|
+
handleSelectIdType(type.code);
|
|
11716
11720
|
}
|
|
11717
11721
|
},
|
|
11718
11722
|
role: "button",
|
|
@@ -12091,8 +12095,8 @@ var ModalPassengerForm = ({
|
|
|
12091
12095
|
}
|
|
12092
12096
|
}
|
|
12093
12097
|
),
|
|
12094
|
-
watchIdentityTypeId ?
|
|
12095
|
-
|
|
12098
|
+
watchIdentityTypeId ? _selectedIdentityType?.code !== IDENTITY_TYPE.LAINNYA.toString() && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12099
|
+
_selectedIdentityType?.code === IDENTITY_TYPE.PASSPORT.toString() && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12096
12100
|
InputDynamic_default,
|
|
12097
12101
|
{
|
|
12098
12102
|
control,
|
|
@@ -12128,10 +12132,10 @@ var ModalPassengerForm = ({
|
|
|
12128
12132
|
dynamicMinLengthId.toString()
|
|
12129
12133
|
)
|
|
12130
12134
|
},
|
|
12131
|
-
...
|
|
12135
|
+
..._selectedIdentityType?.rule ? {
|
|
12132
12136
|
pattern: {
|
|
12133
12137
|
value: new RegExp(
|
|
12134
|
-
|
|
12138
|
+
_selectedIdentityType.rule
|
|
12135
12139
|
),
|
|
12136
12140
|
message: mergedErrors.invalidIdNumber
|
|
12137
12141
|
}
|
|
@@ -12139,8 +12143,8 @@ var ModalPassengerForm = ({
|
|
|
12139
12143
|
},
|
|
12140
12144
|
onChange: (val) => {
|
|
12141
12145
|
let cleaned = val;
|
|
12142
|
-
if (
|
|
12143
|
-
const match =
|
|
12146
|
+
if (_selectedIdentityType?.rule) {
|
|
12147
|
+
const match = _selectedIdentityType.rule.match(/\[(.*?)\]/);
|
|
12144
12148
|
if (match && match[1]) {
|
|
12145
12149
|
const filterRegex = new RegExp(
|
|
12146
12150
|
`[^${match[1]}]`,
|