@asdp/ferryui 0.1.22-dev.9789 → 0.1.22-dev.9801

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
@@ -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({
@@ -12119,7 +12169,7 @@ var CardVehicleDetail = ({
12119
12169
  },
12120
12170
  children: [
12121
12171
  /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle1, { className: styles.headerTitle, children: mergedLabels.title }),
12122
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1, marginLeft: "1rem" }, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, {}) })
12172
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, {}) })
12123
12173
  ]
12124
12174
  }
12125
12175
  ),
@@ -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
  ] }),
@@ -12901,7 +12972,10 @@ var CardVehicleOwnerForm = ({
12901
12972
  onUpdateOwner(owner.id, {
12902
12973
  cargoItems: updatedCargoItems
12903
12974
  });
12904
- setValue(`owners.${index}.cargo.${cargoIndex}.cargoType`, "");
12975
+ setValue(
12976
+ `owners.${index}.cargo.${cargoIndex}.cargoType`,
12977
+ ""
12978
+ );
12905
12979
  },
12906
12980
  options: commodityOptions,
12907
12981
  placeholder: mergedLabels.selectPlaceholder,
@@ -12952,9 +13026,11 @@ var CardVehicleOwnerForm = ({
12952
13026
  cargoItems: updatedCargoItems
12953
13027
  });
12954
13028
  },
12955
- options: loadTypeOptions.filter((lt) => lt.commodityId === (getValues(
12956
- `owners.${index}.cargo.${cargoIndex}.commodity`
12957
- ) || "")).map((lt) => ({
13029
+ options: loadTypeOptions.filter(
13030
+ (lt) => lt.commodityId === (getValues(
13031
+ `owners.${index}.cargo.${cargoIndex}.commodity`
13032
+ ) || "")
13033
+ ).map((lt) => ({
12958
13034
  value: lt.id.toString(),
12959
13035
  label: `${lt.name} (${lt.unit?.name})`
12960
13036
  })),