@asdp/ferryui 0.1.22-dev.9771 → 0.1.22-dev.9800

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 CHANGED
@@ -1773,6 +1773,11 @@ declare const MANIFEST_ENTITY: {
1773
1773
  readonly INDIVIDUAL: "individual";
1774
1774
  };
1775
1775
  type MANIFEST_ENTITY_TYPE = typeof MANIFEST_ENTITY[keyof typeof MANIFEST_ENTITY];
1776
+ declare const HARDCODED_ID: {
1777
+ readonly FAQ_ID_PEMESANAN_TIKET: 1;
1778
+ readonly COMPANY_ID_LAINNYA: "999999";
1779
+ readonly LOAD_TYPE_ID_LAINNYA: 87;
1780
+ };
1776
1781
  interface LoadType {
1777
1782
  id: number;
1778
1783
  name: string;
@@ -1784,11 +1789,12 @@ interface LoadType {
1784
1789
  name: string;
1785
1790
  };
1786
1791
  }
1787
- declare const HARDCODED_ID: {
1788
- readonly FAQ_ID_PEMESANAN_TIKET: 1;
1789
- readonly COMPANY_ID_LAINNYA: "999999";
1790
- readonly LOAD_TYPE_ID_LAINNYA: 87;
1791
- };
1792
+ interface IdentityType {
1793
+ id: number;
1794
+ code: string;
1795
+ name: string;
1796
+ rule: string;
1797
+ }
1792
1798
 
1793
1799
  interface TypeOfServiceChild {
1794
1800
  id: number;
@@ -2731,7 +2737,7 @@ interface ModalPassengerFormLabels {
2731
2737
  minLengthName: string;
2732
2738
  requiredIdType: string;
2733
2739
  requiredIdNumber: string;
2734
- minLengthIdNumber: string;
2740
+ lengthIdNumber: string;
2735
2741
  requiredAge: string;
2736
2742
  minAge: string;
2737
2743
  maxAge: string;
@@ -2742,6 +2748,8 @@ interface ModalPassengerFormLabels {
2742
2748
  requiredPhoneNumber: string;
2743
2749
  minLengthPhoneNumber: string;
2744
2750
  invalidEmail: string;
2751
+ invalidName: string;
2752
+ invalidIdNumber: string;
2745
2753
  };
2746
2754
  }
2747
2755
  interface PassengerFormData {
@@ -2835,7 +2843,7 @@ interface ModalPassengerFormProps {
2835
2843
  /**
2836
2844
  * Options for identity type select field
2837
2845
  */
2838
- idTypeOptions: SelectOption[];
2846
+ idTypes: IdentityType[];
2839
2847
  /**
2840
2848
  * Options for country select field
2841
2849
  */
@@ -2927,6 +2935,7 @@ interface CardVehicleDetailLabels {
2927
2935
  hasLoadLabel: string;
2928
2936
  yesLabel: string;
2929
2937
  noLabel: string;
2938
+ vehicleNumberFormatError: string;
2930
2939
  }
2931
2940
  interface CardVehicleDetailProps {
2932
2941
  /**
@@ -3920,4 +3929,4 @@ interface ModalListMenuServiceProps {
3920
3929
 
3921
3930
  declare const ModalListMenuService: React$1.FC<ModalListMenuServiceProps>;
3922
3931
 
3923
- export { API_CONFIG, API_ENDPOINTS, API_ERROR_MESSAGES, BackgroundTicketCard, BackgroundTicketCardVertical, type BadgeConfig, type BillingDetail, COUNTRIES, CardAddon, type CardAddonProps, CardBanner, type CardBannerProps, CardBookingTicket, type CardBookingTicketProps, CardFAQ, type CardFAQProps, CardMealCatalog, type CardMealCatalogProps, CardOrdererInfo, type CardOrdererInfoProps, CardPassengerList, type CardPassengerListProps, CardPaymentGuide, type CardPaymentGuideProps, CardPaymentInfo, type CardPaymentInfoProps, CardPaymentMethodList, type CardPaymentMethodListProps, CardPriceDetails, type CardPriceDetailsProps, CardProfileMenu, type CardProfileMenuLabels, type CardProfileMenuProps, CardPromo, type CardPromoProps, CardReview, CardReviewPassenger, type CardReviewPassengerProps, type CardReviewProps, CardServiceMenu, type CardServiceMenuProps, CardStatusOrder, type CardStatusOrderProps, CardTicket, type CardTicketProps, CardTicketSearch, DEFAULT_LABELS$4 as CardTicketSearchDefaultLabels, type CardTicketSearchFormData, type CardTicketSearchLabels, type CardTicketSearchProps, type ServiceMenuItem as CardTicketSearchServiceMenuItem, CardTicketSearchSummary, DEFAULT_LABELS$3 as CardTicketSearchSummaryDefaultLabels, type CardTicketSearchSummaryProps, CardVehicleDetail, type CardVehicleDetailProps, CardVehicleOwnerForm, type CardVehicleOwnerFormProps, type CargoItem, CarouselWithCustomNav, type CarouselWithCustomNavProps, type CountryOption, DEFAULT_DURATION_RANGE, DEFAULT_PRICE_RANGE, DEFAULT_SCROLL_AMOUNT, DEFAULT_SERVICE_TYPES, DEFAULT_SORT_OPTIONS, DEFAULT_TIME_SLOTS, DEFAULT_VEHICLE_ICONS, DateFilter, DEFAULT_LABELS as DateFilterDefaultLabels, type DateFilterLabels, type DateFilterProps, type DateItem, type DepartureItem, EmptyContent, type EmptyContentButton, DEFAULT_LABELS$2 as EmptyContentDefaultLabels, type EmptyContentLabels, type EmptyContentProps, FileUpload, type FileUploadProps, type FilterCount, GENDER, type GENDER_TYPE, HARDCODED_ID, HTTP_STATUS, type HarborItem, IDENTITY_TYPE, type IDENTITY_TYPE_TYPE, InputDynamic, type InputDynamicProps, type InputType, LOAD_TYPE, type LOAD_TYPE_TYPE, type LoadType, MANIFEST_ENTITY, type MANIFEST_ENTITY_TYPE, MODAL_PRESETS, MY_TICKET_STATUS, type MY_TICKET_STATUS_TYPE, MY_TICKET_TAB, type MY_TICKET_TAB_TYPE, type MealCategory, type MealItem, ModalFilterTicket, DEFAULT_LABELS$1 as ModalFilterTicketDefaultLabels, type ModalFilterTicketLabels, type ModalFilterTicketProps, ModalIllustration, type ModalIllustrationButton, type ModalIllustrationProps, ModalListMenuService, type ModalListMenuServiceProps, ModalListPassenger, type PassengerItem as ModalListPassengerItem, type ModalListPassengerProps, ModalPassengerForm, type ModalPassengerFormProps, type ModalPresetKey, ModalPreviewImage, type ModalPreviewImageProps, ModalPriceDetail, type ModalPriceDetailProps, ModalSearchHarbor, type ModalSearchHarborProps, ModalSearchTicket, type ModalSearchTicketProps, ModalSelectDate, type ModalSelectDateProps, ModalService, type CardServiceMenuItem as ModalServiceItem, type ModalServiceProps, ModalTotalPassengers, type ModalTotalPassengersProps, ModalTypeOfService, type ModalTypeOfServiceProps, PASSENGER_TYPE, type PASSENGER_TYPE_TYPE, type Passenger, type PassengerClass, type PassengerFormData, type PassengerService, type PassengerType, type PaymentGuideStep, type PaymentMethodCategory, type PaymentStep, type PriceDetailItem, type ProfileMenuSection, type ProfileMenuTab, type Provider, type RadioOption, type ReservationStep, type ReviewPassengerItem, type RouteItem, type SearchSummaryField, type SearchTicketFormData, type SelectOption, type SelectedPassengerItem, type ServiceId, type ServiceItem, SortMenu, type SortMenuProps, type SortOption, type StepStatus, Stepper, type StepperProps, type StepperStep, type TabType, type TypeOfService, type VehicleOwner, calculateAge, getBadgeConfig, getModalPreset, getSortLabel, hexToRgba };
3932
+ export { API_CONFIG, API_ENDPOINTS, API_ERROR_MESSAGES, BackgroundTicketCard, BackgroundTicketCardVertical, type BadgeConfig, type BillingDetail, COUNTRIES, CardAddon, type CardAddonProps, CardBanner, type CardBannerProps, CardBookingTicket, type CardBookingTicketProps, CardFAQ, type CardFAQProps, CardMealCatalog, type CardMealCatalogProps, CardOrdererInfo, type CardOrdererInfoProps, CardPassengerList, type CardPassengerListProps, CardPaymentGuide, type CardPaymentGuideProps, CardPaymentInfo, type CardPaymentInfoProps, CardPaymentMethodList, type CardPaymentMethodListProps, CardPriceDetails, type CardPriceDetailsProps, CardProfileMenu, type CardProfileMenuLabels, type CardProfileMenuProps, CardPromo, type CardPromoProps, CardReview, CardReviewPassenger, type CardReviewPassengerProps, type CardReviewProps, CardServiceMenu, type CardServiceMenuProps, CardStatusOrder, type CardStatusOrderProps, CardTicket, type CardTicketProps, CardTicketSearch, DEFAULT_LABELS$4 as CardTicketSearchDefaultLabels, type CardTicketSearchFormData, type CardTicketSearchLabels, type CardTicketSearchProps, type ServiceMenuItem as CardTicketSearchServiceMenuItem, CardTicketSearchSummary, DEFAULT_LABELS$3 as CardTicketSearchSummaryDefaultLabels, type CardTicketSearchSummaryProps, CardVehicleDetail, type CardVehicleDetailProps, CardVehicleOwnerForm, type CardVehicleOwnerFormProps, type CargoItem, CarouselWithCustomNav, type CarouselWithCustomNavProps, type CountryOption, DEFAULT_DURATION_RANGE, DEFAULT_PRICE_RANGE, DEFAULT_SCROLL_AMOUNT, DEFAULT_SERVICE_TYPES, DEFAULT_SORT_OPTIONS, DEFAULT_TIME_SLOTS, DEFAULT_VEHICLE_ICONS, DateFilter, DEFAULT_LABELS as DateFilterDefaultLabels, type DateFilterLabels, type DateFilterProps, type DateItem, type DepartureItem, EmptyContent, type EmptyContentButton, DEFAULT_LABELS$2 as EmptyContentDefaultLabels, type EmptyContentLabels, type EmptyContentProps, FileUpload, type FileUploadProps, type FilterCount, GENDER, type GENDER_TYPE, HARDCODED_ID, HTTP_STATUS, type HarborItem, IDENTITY_TYPE, type IDENTITY_TYPE_TYPE, type IdentityType, InputDynamic, type InputDynamicProps, type InputType, LOAD_TYPE, type LOAD_TYPE_TYPE, type LoadType, MANIFEST_ENTITY, type MANIFEST_ENTITY_TYPE, MODAL_PRESETS, MY_TICKET_STATUS, type MY_TICKET_STATUS_TYPE, MY_TICKET_TAB, type MY_TICKET_TAB_TYPE, type MealCategory, type MealItem, ModalFilterTicket, DEFAULT_LABELS$1 as ModalFilterTicketDefaultLabels, type ModalFilterTicketLabels, type ModalFilterTicketProps, ModalIllustration, type ModalIllustrationButton, type ModalIllustrationProps, ModalListMenuService, type ModalListMenuServiceProps, ModalListPassenger, type PassengerItem as ModalListPassengerItem, type ModalListPassengerProps, ModalPassengerForm, type ModalPassengerFormProps, type ModalPresetKey, ModalPreviewImage, type ModalPreviewImageProps, ModalPriceDetail, type ModalPriceDetailProps, ModalSearchHarbor, type ModalSearchHarborProps, ModalSearchTicket, type ModalSearchTicketProps, ModalSelectDate, type ModalSelectDateProps, ModalService, type CardServiceMenuItem as ModalServiceItem, type ModalServiceProps, ModalTotalPassengers, type ModalTotalPassengersProps, ModalTypeOfService, type ModalTypeOfServiceProps, PASSENGER_TYPE, type PASSENGER_TYPE_TYPE, type Passenger, type PassengerClass, type PassengerFormData, type PassengerService, type PassengerType, type PaymentGuideStep, type PaymentMethodCategory, type PaymentStep, type PriceDetailItem, type ProfileMenuSection, type ProfileMenuTab, type Provider, type RadioOption, type ReservationStep, type ReviewPassengerItem, type RouteItem, type SearchSummaryField, type SearchTicketFormData, type SelectOption, type SelectedPassengerItem, type ServiceId, type ServiceItem, SortMenu, type SortMenuProps, type SortOption, type StepStatus, Stepper, type StepperProps, type StepperStep, type TabType, type TypeOfService, type VehicleOwner, calculateAge, getBadgeConfig, getModalPreset, getSortLabel, hexToRgba };
package/dist/index.d.ts CHANGED
@@ -1773,6 +1773,11 @@ declare const MANIFEST_ENTITY: {
1773
1773
  readonly INDIVIDUAL: "individual";
1774
1774
  };
1775
1775
  type MANIFEST_ENTITY_TYPE = typeof MANIFEST_ENTITY[keyof typeof MANIFEST_ENTITY];
1776
+ declare const HARDCODED_ID: {
1777
+ readonly FAQ_ID_PEMESANAN_TIKET: 1;
1778
+ readonly COMPANY_ID_LAINNYA: "999999";
1779
+ readonly LOAD_TYPE_ID_LAINNYA: 87;
1780
+ };
1776
1781
  interface LoadType {
1777
1782
  id: number;
1778
1783
  name: string;
@@ -1784,11 +1789,12 @@ interface LoadType {
1784
1789
  name: string;
1785
1790
  };
1786
1791
  }
1787
- declare const HARDCODED_ID: {
1788
- readonly FAQ_ID_PEMESANAN_TIKET: 1;
1789
- readonly COMPANY_ID_LAINNYA: "999999";
1790
- readonly LOAD_TYPE_ID_LAINNYA: 87;
1791
- };
1792
+ interface IdentityType {
1793
+ id: number;
1794
+ code: string;
1795
+ name: string;
1796
+ rule: string;
1797
+ }
1792
1798
 
1793
1799
  interface TypeOfServiceChild {
1794
1800
  id: number;
@@ -2731,7 +2737,7 @@ interface ModalPassengerFormLabels {
2731
2737
  minLengthName: string;
2732
2738
  requiredIdType: string;
2733
2739
  requiredIdNumber: string;
2734
- minLengthIdNumber: string;
2740
+ lengthIdNumber: string;
2735
2741
  requiredAge: string;
2736
2742
  minAge: string;
2737
2743
  maxAge: string;
@@ -2742,6 +2748,8 @@ interface ModalPassengerFormLabels {
2742
2748
  requiredPhoneNumber: string;
2743
2749
  minLengthPhoneNumber: string;
2744
2750
  invalidEmail: string;
2751
+ invalidName: string;
2752
+ invalidIdNumber: string;
2745
2753
  };
2746
2754
  }
2747
2755
  interface PassengerFormData {
@@ -2835,7 +2843,7 @@ interface ModalPassengerFormProps {
2835
2843
  /**
2836
2844
  * Options for identity type select field
2837
2845
  */
2838
- idTypeOptions: SelectOption[];
2846
+ idTypes: IdentityType[];
2839
2847
  /**
2840
2848
  * Options for country select field
2841
2849
  */
@@ -2927,6 +2935,7 @@ interface CardVehicleDetailLabels {
2927
2935
  hasLoadLabel: string;
2928
2936
  yesLabel: string;
2929
2937
  noLabel: string;
2938
+ vehicleNumberFormatError: string;
2930
2939
  }
2931
2940
  interface CardVehicleDetailProps {
2932
2941
  /**
@@ -3920,4 +3929,4 @@ interface ModalListMenuServiceProps {
3920
3929
 
3921
3930
  declare const ModalListMenuService: React$1.FC<ModalListMenuServiceProps>;
3922
3931
 
3923
- export { API_CONFIG, API_ENDPOINTS, API_ERROR_MESSAGES, BackgroundTicketCard, BackgroundTicketCardVertical, type BadgeConfig, type BillingDetail, COUNTRIES, CardAddon, type CardAddonProps, CardBanner, type CardBannerProps, CardBookingTicket, type CardBookingTicketProps, CardFAQ, type CardFAQProps, CardMealCatalog, type CardMealCatalogProps, CardOrdererInfo, type CardOrdererInfoProps, CardPassengerList, type CardPassengerListProps, CardPaymentGuide, type CardPaymentGuideProps, CardPaymentInfo, type CardPaymentInfoProps, CardPaymentMethodList, type CardPaymentMethodListProps, CardPriceDetails, type CardPriceDetailsProps, CardProfileMenu, type CardProfileMenuLabels, type CardProfileMenuProps, CardPromo, type CardPromoProps, CardReview, CardReviewPassenger, type CardReviewPassengerProps, type CardReviewProps, CardServiceMenu, type CardServiceMenuProps, CardStatusOrder, type CardStatusOrderProps, CardTicket, type CardTicketProps, CardTicketSearch, DEFAULT_LABELS$4 as CardTicketSearchDefaultLabels, type CardTicketSearchFormData, type CardTicketSearchLabels, type CardTicketSearchProps, type ServiceMenuItem as CardTicketSearchServiceMenuItem, CardTicketSearchSummary, DEFAULT_LABELS$3 as CardTicketSearchSummaryDefaultLabels, type CardTicketSearchSummaryProps, CardVehicleDetail, type CardVehicleDetailProps, CardVehicleOwnerForm, type CardVehicleOwnerFormProps, type CargoItem, CarouselWithCustomNav, type CarouselWithCustomNavProps, type CountryOption, DEFAULT_DURATION_RANGE, DEFAULT_PRICE_RANGE, DEFAULT_SCROLL_AMOUNT, DEFAULT_SERVICE_TYPES, DEFAULT_SORT_OPTIONS, DEFAULT_TIME_SLOTS, DEFAULT_VEHICLE_ICONS, DateFilter, DEFAULT_LABELS as DateFilterDefaultLabels, type DateFilterLabels, type DateFilterProps, type DateItem, type DepartureItem, EmptyContent, type EmptyContentButton, DEFAULT_LABELS$2 as EmptyContentDefaultLabels, type EmptyContentLabels, type EmptyContentProps, FileUpload, type FileUploadProps, type FilterCount, GENDER, type GENDER_TYPE, HARDCODED_ID, HTTP_STATUS, type HarborItem, IDENTITY_TYPE, type IDENTITY_TYPE_TYPE, InputDynamic, type InputDynamicProps, type InputType, LOAD_TYPE, type LOAD_TYPE_TYPE, type LoadType, MANIFEST_ENTITY, type MANIFEST_ENTITY_TYPE, MODAL_PRESETS, MY_TICKET_STATUS, type MY_TICKET_STATUS_TYPE, MY_TICKET_TAB, type MY_TICKET_TAB_TYPE, type MealCategory, type MealItem, ModalFilterTicket, DEFAULT_LABELS$1 as ModalFilterTicketDefaultLabels, type ModalFilterTicketLabels, type ModalFilterTicketProps, ModalIllustration, type ModalIllustrationButton, type ModalIllustrationProps, ModalListMenuService, type ModalListMenuServiceProps, ModalListPassenger, type PassengerItem as ModalListPassengerItem, type ModalListPassengerProps, ModalPassengerForm, type ModalPassengerFormProps, type ModalPresetKey, ModalPreviewImage, type ModalPreviewImageProps, ModalPriceDetail, type ModalPriceDetailProps, ModalSearchHarbor, type ModalSearchHarborProps, ModalSearchTicket, type ModalSearchTicketProps, ModalSelectDate, type ModalSelectDateProps, ModalService, type CardServiceMenuItem as ModalServiceItem, type ModalServiceProps, ModalTotalPassengers, type ModalTotalPassengersProps, ModalTypeOfService, type ModalTypeOfServiceProps, PASSENGER_TYPE, type PASSENGER_TYPE_TYPE, type Passenger, type PassengerClass, type PassengerFormData, type PassengerService, type PassengerType, type PaymentGuideStep, type PaymentMethodCategory, type PaymentStep, type PriceDetailItem, type ProfileMenuSection, type ProfileMenuTab, type Provider, type RadioOption, type ReservationStep, type ReviewPassengerItem, type RouteItem, type SearchSummaryField, type SearchTicketFormData, type SelectOption, type SelectedPassengerItem, type ServiceId, type ServiceItem, SortMenu, type SortMenuProps, type SortOption, type StepStatus, Stepper, type StepperProps, type StepperStep, type TabType, type TypeOfService, type VehicleOwner, calculateAge, getBadgeConfig, getModalPreset, getSortLabel, hexToRgba };
3932
+ export { API_CONFIG, API_ENDPOINTS, API_ERROR_MESSAGES, BackgroundTicketCard, BackgroundTicketCardVertical, type BadgeConfig, type BillingDetail, COUNTRIES, CardAddon, type CardAddonProps, CardBanner, type CardBannerProps, CardBookingTicket, type CardBookingTicketProps, CardFAQ, type CardFAQProps, CardMealCatalog, type CardMealCatalogProps, CardOrdererInfo, type CardOrdererInfoProps, CardPassengerList, type CardPassengerListProps, CardPaymentGuide, type CardPaymentGuideProps, CardPaymentInfo, type CardPaymentInfoProps, CardPaymentMethodList, type CardPaymentMethodListProps, CardPriceDetails, type CardPriceDetailsProps, CardProfileMenu, type CardProfileMenuLabels, type CardProfileMenuProps, CardPromo, type CardPromoProps, CardReview, CardReviewPassenger, type CardReviewPassengerProps, type CardReviewProps, CardServiceMenu, type CardServiceMenuProps, CardStatusOrder, type CardStatusOrderProps, CardTicket, type CardTicketProps, CardTicketSearch, DEFAULT_LABELS$4 as CardTicketSearchDefaultLabels, type CardTicketSearchFormData, type CardTicketSearchLabels, type CardTicketSearchProps, type ServiceMenuItem as CardTicketSearchServiceMenuItem, CardTicketSearchSummary, DEFAULT_LABELS$3 as CardTicketSearchSummaryDefaultLabels, type CardTicketSearchSummaryProps, CardVehicleDetail, type CardVehicleDetailProps, CardVehicleOwnerForm, type CardVehicleOwnerFormProps, type CargoItem, CarouselWithCustomNav, type CarouselWithCustomNavProps, type CountryOption, DEFAULT_DURATION_RANGE, DEFAULT_PRICE_RANGE, DEFAULT_SCROLL_AMOUNT, DEFAULT_SERVICE_TYPES, DEFAULT_SORT_OPTIONS, DEFAULT_TIME_SLOTS, DEFAULT_VEHICLE_ICONS, DateFilter, DEFAULT_LABELS as DateFilterDefaultLabels, type DateFilterLabels, type DateFilterProps, type DateItem, type DepartureItem, EmptyContent, type EmptyContentButton, DEFAULT_LABELS$2 as EmptyContentDefaultLabels, type EmptyContentLabels, type EmptyContentProps, FileUpload, type FileUploadProps, type FilterCount, GENDER, type GENDER_TYPE, HARDCODED_ID, HTTP_STATUS, type HarborItem, IDENTITY_TYPE, type IDENTITY_TYPE_TYPE, type IdentityType, InputDynamic, type InputDynamicProps, type InputType, LOAD_TYPE, type LOAD_TYPE_TYPE, type LoadType, MANIFEST_ENTITY, type MANIFEST_ENTITY_TYPE, MODAL_PRESETS, MY_TICKET_STATUS, type MY_TICKET_STATUS_TYPE, MY_TICKET_TAB, type MY_TICKET_TAB_TYPE, type MealCategory, type MealItem, ModalFilterTicket, DEFAULT_LABELS$1 as ModalFilterTicketDefaultLabels, type ModalFilterTicketLabels, type ModalFilterTicketProps, ModalIllustration, type ModalIllustrationButton, type ModalIllustrationProps, ModalListMenuService, type ModalListMenuServiceProps, ModalListPassenger, type PassengerItem as ModalListPassengerItem, type ModalListPassengerProps, ModalPassengerForm, type ModalPassengerFormProps, type ModalPresetKey, ModalPreviewImage, type ModalPreviewImageProps, ModalPriceDetail, type ModalPriceDetailProps, ModalSearchHarbor, type ModalSearchHarborProps, ModalSearchTicket, type ModalSearchTicketProps, ModalSelectDate, type ModalSelectDateProps, ModalService, type CardServiceMenuItem as ModalServiceItem, type ModalServiceProps, ModalTotalPassengers, type ModalTotalPassengersProps, ModalTypeOfService, type ModalTypeOfServiceProps, PASSENGER_TYPE, type PASSENGER_TYPE_TYPE, type Passenger, type PassengerClass, type PassengerFormData, type PassengerService, type PassengerType, type PaymentGuideStep, type PaymentMethodCategory, type PaymentStep, type PriceDetailItem, type ProfileMenuSection, type ProfileMenuTab, type Provider, type RadioOption, type ReservationStep, type ReviewPassengerItem, type RouteItem, type SearchSummaryField, type SearchTicketFormData, type SelectOption, type SelectedPassengerItem, type ServiceId, type ServiceItem, SortMenu, type SortMenuProps, type SortOption, type StepStatus, Stepper, type StepperProps, type StepperStep, type TabType, type TypeOfService, type VehicleOwner, calculateAge, getBadgeConfig, getModalPreset, getSortLabel, hexToRgba };
package/dist/index.js CHANGED
@@ -1709,7 +1709,7 @@ var CardTicket = ({
1709
1709
  },
1710
1710
  children: [
1711
1711
  /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle2, { children: mergedLabels.totalPriceLabel }),
1712
- /* @__PURE__ */ jsxRuntime.jsxs(
1712
+ /* @__PURE__ */ jsxRuntime.jsx(
1713
1713
  reactComponents.Title3,
1714
1714
  {
1715
1715
  style: {
@@ -1717,11 +1717,7 @@ var CardTicket = ({
1717
1717
  flex: "column",
1718
1718
  justifyContent: "end"
1719
1719
  },
1720
- children: [
1721
- mergedLabels.currencySymbol,
1722
- "\xA0",
1723
- departureItem?.billingDetail?.total?.formatted
1724
- ]
1720
+ children: departureItem?.billingDetail?.total?.formatted
1725
1721
  }
1726
1722
  )
1727
1723
  ]
@@ -5480,7 +5476,7 @@ var DEFAULT_LABELS8 = {
5480
5476
  departureDateLabel: "Tanggal Berangkat",
5481
5477
  returnDateLabel: "Tanggal Pulang",
5482
5478
  serviceClassLabel: "Kelas Layanan",
5483
- typeOfServiceLabel: "Jenis Layanan",
5479
+ typeOfServiceLabel: "Jenis Penumpang",
5484
5480
  passengerLabel: "Penumpang",
5485
5481
  roundTripLabel: "Pulang Pergi",
5486
5482
  searchButton: "Cari Tiket",
@@ -5489,7 +5485,7 @@ var DEFAULT_LABELS8 = {
5489
5485
  placeholderDepartureDate: "Pilih Tanggal Keberangkatan",
5490
5486
  placeholderReturnDate: "Pilih Tanggal Kepulangan",
5491
5487
  placeholderTypeClass: "Pilih Kelas Layanan",
5492
- placeholderTypeService: "Pilih Jenis Layanan",
5488
+ placeholderTypeService: "Pilih Jenis Penumpang",
5493
5489
  placeholderPassenger: "Pilih Jumlah Penumpang",
5494
5490
  errorOriginRequired: "Pelabuhan asal wajib diisi",
5495
5491
  errorDestinationRequired: "Pelabuhan tujuan wajib diisi",
@@ -5508,7 +5504,7 @@ var DEFAULT_LABELS8 = {
5508
5504
  departureDateLabel: "Departure Date",
5509
5505
  returnDateLabel: "Return Date",
5510
5506
  serviceClassLabel: "Service Class",
5511
- typeOfServiceLabel: "Service Type",
5507
+ typeOfServiceLabel: "Type Of Passenger",
5512
5508
  passengerLabel: "Passenger",
5513
5509
  roundTripLabel: "Round Trip",
5514
5510
  searchButton: "Search Ticket",
@@ -6185,7 +6181,7 @@ var DEFAULT_LABELS9 = {
6185
6181
  destinationHarbor: "Pelabuhan Tujuan",
6186
6182
  departureDate: "Tanggal Keberangkatan",
6187
6183
  serviceClass: "Kelas Layanan",
6188
- typeOfService: "Jenis Layanan",
6184
+ typeOfService: "Jenis Penumpang",
6189
6185
  totalPassengers: "Jumlah Penumpang",
6190
6186
  changeSearchButton: "Ganti Pencarian",
6191
6187
  swapAriaLabel: "Tukar asal dan tujuan"
@@ -6195,7 +6191,7 @@ var DEFAULT_LABELS9 = {
6195
6191
  destinationHarbor: "Destination Port",
6196
6192
  departureDate: "Departure Date",
6197
6193
  serviceClass: "Service Class",
6198
- typeOfService: "Service Type",
6194
+ typeOfService: "Type Of Passenger",
6199
6195
  totalPassengers: "Total Passengers",
6200
6196
  changeSearchButton: "Change Search",
6201
6197
  swapAriaLabel: "Swap origin and destination"
@@ -8311,20 +8307,20 @@ var ModalTotalPassengers = ({
8311
8307
  // src/components/ModalTypeOfService/ModalTypeOfService.constants.ts
8312
8308
  var DEFAULT_LABELS15 = {
8313
8309
  id: {
8314
- title: "Pilih Jenis Layanan",
8310
+ title: "Pilih Jenis Penumpang",
8315
8311
  cancelButton: "Batal",
8316
8312
  saveButton: "Simpan",
8317
8313
  vehiclesAlt: "kendaraan",
8318
8314
  closeAriaLabel: "Tutup",
8319
- emptyContent: "Jenis Layanan"
8315
+ emptyContent: "Jenis Penumpang"
8320
8316
  },
8321
8317
  en: {
8322
- title: "Select Service Type",
8318
+ title: "Select Type Of Passenger",
8323
8319
  cancelButton: "Cancel",
8324
8320
  saveButton: "Save",
8325
8321
  vehiclesAlt: "vehicles",
8326
8322
  closeAriaLabel: "Close",
8327
- emptyContent: "Service Type"
8323
+ emptyContent: "Type Of Passenger"
8328
8324
  }
8329
8325
  };
8330
8326
  var DEFAULT_VEHICLE_ICONS = {
@@ -8519,7 +8515,8 @@ var HoverableRadioItem = ({
8519
8515
  item,
8520
8516
  imageRenderer,
8521
8517
  styles,
8522
- isChild = false
8518
+ isChild = false,
8519
+ onClick
8523
8520
  }) => {
8524
8521
  const [isHovered, setIsHovered] = React.useState(false);
8525
8522
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -8529,6 +8526,7 @@ var HoverableRadioItem = ({
8529
8526
  style: { padding: reactComponents.tokens.spacingHorizontalXS, cursor: "pointer" },
8530
8527
  onMouseEnter: () => setIsHovered(true),
8531
8528
  onMouseLeave: () => setIsHovered(false),
8529
+ onClick,
8532
8530
  children: [
8533
8531
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: isChild ? void 0 : { marginLeft: 2 }, children: imageRenderer({
8534
8532
  src: item.image,
@@ -8749,7 +8747,8 @@ var ModalTypeOfService = ({
8749
8747
  item: childItem,
8750
8748
  imageRenderer,
8751
8749
  styles,
8752
- isChild: true
8750
+ isChild: true,
8751
+ onClick: () => setSelectedServiceId(childItem.id)
8753
8752
  },
8754
8753
  childIndex
8755
8754
  )) })
@@ -8764,7 +8763,8 @@ var ModalTypeOfService = ({
8764
8763
  item,
8765
8764
  imageRenderer,
8766
8765
  styles,
8767
- isChild: false
8766
+ isChild: false,
8767
+ onClick: () => setSelectedServiceId(item.id)
8768
8768
  },
8769
8769
  index
8770
8770
  );
@@ -9001,7 +9001,7 @@ var SortMenu = ({
9001
9001
  var DEFAULT_LABELS17 = {
9002
9002
  id: {
9003
9003
  title: "Filter dengan",
9004
- serviceTypeLabel: "Jenis Layanan",
9004
+ serviceTypeLabel: "Jenis Penumpang",
9005
9005
  departureTimeLabel: "Waktu pergi",
9006
9006
  arrivalTimeLabel: "Waktu tiba",
9007
9007
  priceLabel: "Harga",
@@ -10792,7 +10792,7 @@ var DEFAULT_LABELS23 = {
10792
10792
  cancelButton: "Batal",
10793
10793
  idTypeOtherLabel: "Tanggal lahir",
10794
10794
  idTypeOtherPlaceholder: "DD/MM/YYYY",
10795
- countryLabel: "Negara Penerbit Passport",
10795
+ countryLabel: "Negara Penerbit Paspor",
10796
10796
  countryPlaceholder: "Masukkan Negara",
10797
10797
  autofill: "Isi Data Otomatis",
10798
10798
  phoneNumberLabel: "Nomor Telepon",
@@ -10822,7 +10822,7 @@ var DEFAULT_LABELS23 = {
10822
10822
  minLengthName: "Nama minimal 3 karakter",
10823
10823
  requiredIdType: "Jenis ID harus dipilih",
10824
10824
  requiredIdNumber: "Nomor identitas harus diisi",
10825
- minLengthIdNumber: "Nomor identitas minimal 6 karakter",
10825
+ lengthIdNumber: "Nomor identitas minimal 6 karakter",
10826
10826
  requiredAge: "Usia harus diisi",
10827
10827
  minAge: "Usia minimal 1 tahun",
10828
10828
  maxAge: "Usia maksimal 150 tahun",
@@ -10832,7 +10832,9 @@ var DEFAULT_LABELS23 = {
10832
10832
  requiredCountry: "Negara harus diisi",
10833
10833
  requiredPhoneNumber: "Nomor telepon harus diisi",
10834
10834
  minLengthPhoneNumber: "Nomor telepon minimal 10 karakter",
10835
- invalidEmail: "Format email tidak valid"
10835
+ invalidEmail: "Format email tidak valid",
10836
+ invalidName: "Nama hanya boleh berisi huruf dan spasi",
10837
+ invalidIdNumber: "Format Nomor Identitas tidak valid"
10836
10838
  }
10837
10839
  },
10838
10840
  en: {
@@ -10888,7 +10890,7 @@ var DEFAULT_LABELS23 = {
10888
10890
  minLengthName: "Name must be at least 3 characters",
10889
10891
  requiredIdType: "ID type is required",
10890
10892
  requiredIdNumber: "Identity number is required",
10891
- minLengthIdNumber: "Identity number must be at least 6 characters",
10893
+ lengthIdNumber: "Identity number must be at least 6 characters",
10892
10894
  requiredAge: "Age is required",
10893
10895
  minAge: "Age must be at least 1 year",
10894
10896
  maxAge: "Age must be at most 150 years",
@@ -10898,7 +10900,9 @@ var DEFAULT_LABELS23 = {
10898
10900
  requiredCountry: "Country is required",
10899
10901
  requiredPhoneNumber: "Phone number is required",
10900
10902
  minLengthPhoneNumber: "Phone number must be at least 10 characters",
10901
- invalidEmail: "Invalid email format"
10903
+ invalidEmail: "Invalid email format",
10904
+ invalidName: "Name must only contain letters and spaces",
10905
+ invalidIdNumber: "Invalid Identity Number format"
10902
10906
  }
10903
10907
  }
10904
10908
  };
@@ -11095,7 +11099,7 @@ var ModalPassengerForm = ({
11095
11099
  titleOptions,
11096
11100
  countryOptions,
11097
11101
  cityOptions,
11098
- idTypeOptions,
11102
+ idTypes,
11099
11103
  ticketClassOptions,
11100
11104
  onScanComplete
11101
11105
  }) => {
@@ -11126,6 +11130,11 @@ var ModalPassengerForm = ({
11126
11130
  const watchIdentityTypeId = watch("identityTypeId");
11127
11131
  const watchPassportCountryId = watch("countryId");
11128
11132
  const watchBirthdate = watch("birthdate");
11133
+ const selectedIdentityType = idTypes.find(
11134
+ (type) => type.id.toString() === watchIdentityTypeId
11135
+ );
11136
+ const idRuleLengthMatch = selectedIdentityType?.rule?.match(/\{(\d+)(?:,\d+)?\}/);
11137
+ const dynamicMinLengthId = idRuleLengthMatch ? parseInt(idRuleLengthMatch[1], 10) : 6;
11129
11138
  React.useEffect(() => {
11130
11139
  const subscription = watch((value, { name, type }) => {
11131
11140
  console.log("Changed field:", name);
@@ -11355,22 +11364,22 @@ var ModalPassengerForm = ({
11355
11364
  children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle1, { children: mergedLabels.selectIdTypeTitle })
11356
11365
  }
11357
11366
  ),
11358
- /* @__PURE__ */ jsxRuntime.jsx(reactComponents.DialogContent, { className: styles.content, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.idTypeList, children: idTypeOptions.map((type) => /* @__PURE__ */ jsxRuntime.jsx(
11367
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.DialogContent, { className: styles.content, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.idTypeList, children: idTypes.map((type) => /* @__PURE__ */ jsxRuntime.jsx(
11359
11368
  "div",
11360
11369
  {
11361
11370
  className: styles.idTypeItem,
11362
- onClick: () => handleSelectIdType(Number(type.value)),
11371
+ onClick: () => handleSelectIdType(Number(type.id)),
11363
11372
  onKeyDown: (e) => {
11364
11373
  if (e.key === "Enter" || e.key === " ") {
11365
11374
  e.preventDefault();
11366
- handleSelectIdType(Number(type.value));
11375
+ handleSelectIdType(type.id);
11367
11376
  }
11368
11377
  },
11369
11378
  role: "button",
11370
11379
  tabIndex: 0,
11371
- children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.idTypeText, children: type.label })
11380
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.idTypeText, children: type.name })
11372
11381
  },
11373
- type.value
11382
+ type.id
11374
11383
  )) }) })
11375
11384
  ] }) })
11376
11385
  }
@@ -11665,6 +11674,10 @@ var ModalPassengerForm = ({
11665
11674
  minLength: {
11666
11675
  value: 3,
11667
11676
  message: mergedErrors.minLengthName
11677
+ },
11678
+ pattern: {
11679
+ value: /^[a-zA-Z\s]+$/,
11680
+ message: mergedErrors.invalidName
11668
11681
  }
11669
11682
  }
11670
11683
  }
@@ -11714,7 +11727,10 @@ var ModalPassengerForm = ({
11714
11727
  type: "select",
11715
11728
  label: mergedLabels.idTypeLabel,
11716
11729
  placeholder: mergedLabels.idTypePlaceholder,
11717
- options: idTypeOptions,
11730
+ options: idTypes.map((t) => ({
11731
+ label: t.name,
11732
+ value: t.id.toString()
11733
+ })),
11718
11734
  size: "large",
11719
11735
  required: true,
11720
11736
  validationRules: {
@@ -11726,15 +11742,15 @@ var ModalPassengerForm = ({
11726
11742
  watchIdentityTypeId === IDENTITY_TYPE.PSP.toString() && /* @__PURE__ */ jsxRuntime.jsx(
11727
11743
  InputDynamic_default,
11728
11744
  {
11745
+ control,
11746
+ label: mergedLabels.countryLabel,
11729
11747
  menuPlacement: "top",
11730
11748
  name: "countryId",
11731
- control,
11732
11749
  options: countryOptions,
11733
- type: "select",
11734
- label: mergedLabels.countryLabel,
11735
11750
  placeholder: mergedLabels.countryPlaceholder,
11736
- size: "large",
11737
11751
  required: true,
11752
+ size: "large",
11753
+ type: "country",
11738
11754
  validationRules: {
11739
11755
  required: mergedErrors.requiredCountry
11740
11756
  }
@@ -11745,7 +11761,7 @@ var ModalPassengerForm = ({
11745
11761
  {
11746
11762
  name: "identityId",
11747
11763
  control,
11748
- type: watchIdentityTypeId === IDENTITY_TYPE.KTP.toString() ? "number" : "text",
11764
+ type: "text",
11749
11765
  label: mergedLabels.idNumberLabel,
11750
11766
  placeholder: mergedLabels.idNumberPlaceholder,
11751
11767
  size: "large",
@@ -11753,8 +11769,40 @@ var ModalPassengerForm = ({
11753
11769
  validationRules: {
11754
11770
  required: mergedErrors.requiredIdNumber,
11755
11771
  minLength: {
11756
- value: 6,
11757
- message: mergedErrors.minLengthIdNumber
11772
+ value: dynamicMinLengthId,
11773
+ message: mergedErrors.lengthIdNumber.replace(
11774
+ "6",
11775
+ dynamicMinLengthId.toString()
11776
+ )
11777
+ },
11778
+ ...selectedIdentityType?.rule ? {
11779
+ pattern: {
11780
+ value: new RegExp(
11781
+ selectedIdentityType.rule
11782
+ ),
11783
+ message: mergedErrors.invalidIdNumber
11784
+ }
11785
+ } : {}
11786
+ },
11787
+ onChange: (val) => {
11788
+ let cleaned = val;
11789
+ if (selectedIdentityType?.rule) {
11790
+ const match = selectedIdentityType.rule.match(/\[(.*?)\]/);
11791
+ if (match && match[1]) {
11792
+ const filterRegex = new RegExp(
11793
+ `[^${match[1]}]`,
11794
+ "g"
11795
+ );
11796
+ cleaned = val.replace(filterRegex, "");
11797
+ }
11798
+ } else {
11799
+ cleaned = val.replace(/[^a-zA-Z0-9]/g, "");
11800
+ }
11801
+ if (cleaned !== val) {
11802
+ setValue("identityId", cleaned, {
11803
+ shouldValidate: true,
11804
+ shouldDirty: true
11805
+ });
11758
11806
  }
11759
11807
  }
11760
11808
  }
@@ -12055,7 +12103,8 @@ var DEFAULT_LABELS25 = {
12055
12103
  vehicleNumberPlaceholder: "Contoh: B1234CD",
12056
12104
  hasLoadLabel: "Apakah kendaraan membawa muatan?",
12057
12105
  yesLabel: "Ya",
12058
- noLabel: "Tidak"
12106
+ noLabel: "Tidak",
12107
+ vehicleNumberFormatError: "Format Plat Nomor Tidak Valid"
12059
12108
  },
12060
12109
  en: {
12061
12110
  title: "Vehicle Details",
@@ -12063,7 +12112,8 @@ var DEFAULT_LABELS25 = {
12063
12112
  vehicleNumberPlaceholder: "Example: B1234CD",
12064
12113
  hasLoadLabel: "Does the vehicle carry a load?",
12065
12114
  yesLabel: "Yes",
12066
- noLabel: "No"
12115
+ noLabel: "No",
12116
+ vehicleNumberFormatError: "Invalid License Plate Format"
12067
12117
  }
12068
12118
  };
12069
12119
  var useStyles26 = reactComponents.makeStyles({
@@ -12146,7 +12196,28 @@ var CardVehicleDetail = ({
12146
12196
  name: vehicleNumberName,
12147
12197
  placeholder: mergedLabels.vehicleNumberPlaceholder,
12148
12198
  required: true,
12149
- type: "text"
12199
+ type: "text",
12200
+ onInput: (e) => {
12201
+ const target = e.currentTarget;
12202
+ const val = target.value;
12203
+ const formatted = val.toUpperCase().replace(/[^A-Z0-9]/g, "");
12204
+ if (val !== formatted) {
12205
+ const nativeInputValueSetter = Object.getOwnPropertyDescriptor(
12206
+ window.HTMLInputElement.prototype,
12207
+ "value"
12208
+ )?.set;
12209
+ if (nativeInputValueSetter) {
12210
+ nativeInputValueSetter.call(target, formatted);
12211
+ target.dispatchEvent(new Event("input", { bubbles: true }));
12212
+ }
12213
+ }
12214
+ },
12215
+ validationRules: {
12216
+ pattern: {
12217
+ value: /^[A-Z]{1,2}[0-9]{1,4}[A-Z]{1,4}$/,
12218
+ message: mergedLabels.vehicleNumberFormatError || "Format Plat Nomor Tidak Valid"
12219
+ }
12220
+ }
12150
12221
  }
12151
12222
  )
12152
12223
  ] }),