@asdp/ferryui 0.1.22-dev.8463 → 0.1.22-dev.8491
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 +326 -1
- package/dist/index.d.ts +326 -1
- package/dist/index.js +778 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +775 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1675,4 +1675,329 @@ interface ModalSearchTicketProps extends Partial<DialogProps> {
|
|
|
1675
1675
|
*/
|
|
1676
1676
|
declare const ModalSearchTicket: React$1.FC<ModalSearchTicketProps>;
|
|
1677
1677
|
|
|
1678
|
-
|
|
1678
|
+
interface StepperStep {
|
|
1679
|
+
id: string;
|
|
1680
|
+
label: string;
|
|
1681
|
+
number: number;
|
|
1682
|
+
}
|
|
1683
|
+
interface StepperProps {
|
|
1684
|
+
/**
|
|
1685
|
+
* Array of steps to display
|
|
1686
|
+
*/
|
|
1687
|
+
steps: StepperStep[];
|
|
1688
|
+
/**
|
|
1689
|
+
* Current active step (can be step id or step number)
|
|
1690
|
+
*/
|
|
1691
|
+
currentStep: string | number;
|
|
1692
|
+
/**
|
|
1693
|
+
* Additional CSS class name
|
|
1694
|
+
*/
|
|
1695
|
+
className?: string;
|
|
1696
|
+
}
|
|
1697
|
+
type StepStatus = 'completed' | 'active' | 'inactive';
|
|
1698
|
+
|
|
1699
|
+
declare const Stepper: React$1.FC<StepperProps>;
|
|
1700
|
+
|
|
1701
|
+
interface OrdererInfo {
|
|
1702
|
+
name?: string;
|
|
1703
|
+
phoneNumber?: string;
|
|
1704
|
+
email?: string;
|
|
1705
|
+
}
|
|
1706
|
+
interface CardOrdererInfoProps {
|
|
1707
|
+
/**
|
|
1708
|
+
* Orderer information to display
|
|
1709
|
+
*/
|
|
1710
|
+
orderer?: OrdererInfo;
|
|
1711
|
+
/**
|
|
1712
|
+
* Additional CSS class name
|
|
1713
|
+
*/
|
|
1714
|
+
className?: string;
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1717
|
+
declare const CardOrdererInfo: React$1.FC<CardOrdererInfoProps>;
|
|
1718
|
+
|
|
1719
|
+
interface PassengerItem {
|
|
1720
|
+
/**
|
|
1721
|
+
* Unique identifier for the passenger
|
|
1722
|
+
*/
|
|
1723
|
+
id?: number;
|
|
1724
|
+
/**
|
|
1725
|
+
* Passenger name
|
|
1726
|
+
*/
|
|
1727
|
+
name?: string;
|
|
1728
|
+
/**
|
|
1729
|
+
* Passenger category/type (e.g., "ADULT", "CHILD", "INFANT")
|
|
1730
|
+
*/
|
|
1731
|
+
category?: string;
|
|
1732
|
+
/**
|
|
1733
|
+
* Whether the passenger data is completed
|
|
1734
|
+
*/
|
|
1735
|
+
isCompleted?: boolean;
|
|
1736
|
+
}
|
|
1737
|
+
interface ModalListPassengerProps {
|
|
1738
|
+
/**
|
|
1739
|
+
* Whether the modal is open
|
|
1740
|
+
*/
|
|
1741
|
+
open: boolean;
|
|
1742
|
+
/**
|
|
1743
|
+
* Callback when modal should close
|
|
1744
|
+
*/
|
|
1745
|
+
onClose: () => void;
|
|
1746
|
+
/**
|
|
1747
|
+
* Modal title
|
|
1748
|
+
* @default "Detail Penumpang"
|
|
1749
|
+
*/
|
|
1750
|
+
title?: string;
|
|
1751
|
+
/**
|
|
1752
|
+
* List of available passengers to display
|
|
1753
|
+
*/
|
|
1754
|
+
passengers: PassengerItem[];
|
|
1755
|
+
/**
|
|
1756
|
+
* Current search query value
|
|
1757
|
+
*/
|
|
1758
|
+
searchQuery: string;
|
|
1759
|
+
/**
|
|
1760
|
+
* Callback when search query changes
|
|
1761
|
+
*/
|
|
1762
|
+
onSearchChange: (query: string) => void;
|
|
1763
|
+
/**
|
|
1764
|
+
* Callback when a passenger is selected
|
|
1765
|
+
*/
|
|
1766
|
+
onSelectPassenger: (passenger: PassengerItem) => void;
|
|
1767
|
+
/**
|
|
1768
|
+
* Callback when edit button is clicked for a passenger
|
|
1769
|
+
*/
|
|
1770
|
+
onEditPassenger: (passenger: PassengerItem) => void;
|
|
1771
|
+
/**
|
|
1772
|
+
* Callback when "Tambah Penumpang" button is clicked
|
|
1773
|
+
*/
|
|
1774
|
+
onAddPassenger: () => void;
|
|
1775
|
+
/**
|
|
1776
|
+
* Whether "Sama Dengan Pemesan" is checked
|
|
1777
|
+
*/
|
|
1778
|
+
sameAsOrderer: boolean;
|
|
1779
|
+
/**
|
|
1780
|
+
* Callback when "Sama Dengan Pemesan" switch changes
|
|
1781
|
+
*/
|
|
1782
|
+
onSameAsOrdererChange: (checked: boolean) => void;
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
/**
|
|
1786
|
+
* ModalListPassenger - A reusable modal component for selecting passengers from a list
|
|
1787
|
+
*
|
|
1788
|
+
* This component provides a modal interface for selecting passengers with features like:
|
|
1789
|
+
* - Search functionality
|
|
1790
|
+
* - "Sama Dengan Pemesan" toggle
|
|
1791
|
+
* - Edit passenger option
|
|
1792
|
+
* - Add new passenger option
|
|
1793
|
+
*
|
|
1794
|
+
* @example
|
|
1795
|
+
* ```tsx
|
|
1796
|
+
* <ModalListPassenger
|
|
1797
|
+
* open={isOpen}
|
|
1798
|
+
* onClose={() => setIsOpen(false)}
|
|
1799
|
+
* passengers={passengerList}
|
|
1800
|
+
* searchQuery={search}
|
|
1801
|
+
* onSearchChange={setSearch}
|
|
1802
|
+
* onSelectPassenger={handleSelect}
|
|
1803
|
+
* onEditPassenger={handleEdit}
|
|
1804
|
+
* onAddPassenger={handleAdd}
|
|
1805
|
+
* sameAsOrderer={sameAsOrderer}
|
|
1806
|
+
* onSameAsOrdererChange={setSameAsOrderer}
|
|
1807
|
+
* />
|
|
1808
|
+
* ```
|
|
1809
|
+
*/
|
|
1810
|
+
declare const ModalListPassenger: React$1.FC<ModalListPassengerProps>;
|
|
1811
|
+
|
|
1812
|
+
interface PassengerFormData {
|
|
1813
|
+
/**
|
|
1814
|
+
* Passenger title (Tuan, Nyonya, Nona)
|
|
1815
|
+
*/
|
|
1816
|
+
title?: string;
|
|
1817
|
+
/**
|
|
1818
|
+
* Full name
|
|
1819
|
+
*/
|
|
1820
|
+
name?: string;
|
|
1821
|
+
/**
|
|
1822
|
+
* ID type (KTP, SIM, Paspor) - for adults only
|
|
1823
|
+
*/
|
|
1824
|
+
idType?: string;
|
|
1825
|
+
/**
|
|
1826
|
+
* ID number - for adults only
|
|
1827
|
+
*/
|
|
1828
|
+
idNumber?: string;
|
|
1829
|
+
/**
|
|
1830
|
+
* Age - for adults only
|
|
1831
|
+
*/
|
|
1832
|
+
age?: number;
|
|
1833
|
+
/**
|
|
1834
|
+
* Birth date - for children/infants only
|
|
1835
|
+
*/
|
|
1836
|
+
date?: string;
|
|
1837
|
+
/**
|
|
1838
|
+
* City ID
|
|
1839
|
+
*/
|
|
1840
|
+
cityId?: string;
|
|
1841
|
+
/**
|
|
1842
|
+
* Ticket class
|
|
1843
|
+
*/
|
|
1844
|
+
ticketClass?: string;
|
|
1845
|
+
/**
|
|
1846
|
+
* Category (ADULT, CHILD, INFANT, ELDERLY)
|
|
1847
|
+
*/
|
|
1848
|
+
category?: string;
|
|
1849
|
+
/**
|
|
1850
|
+
* Whether the form is completed
|
|
1851
|
+
*/
|
|
1852
|
+
isCompleted?: boolean;
|
|
1853
|
+
/**
|
|
1854
|
+
* Passenger ID (for edit mode)
|
|
1855
|
+
*/
|
|
1856
|
+
id?: number;
|
|
1857
|
+
}
|
|
1858
|
+
interface ModalPassengerFormProps {
|
|
1859
|
+
/**
|
|
1860
|
+
* Whether the modal is open
|
|
1861
|
+
*/
|
|
1862
|
+
open: boolean;
|
|
1863
|
+
/**
|
|
1864
|
+
* Callback when modal should close
|
|
1865
|
+
*/
|
|
1866
|
+
onClose: () => void;
|
|
1867
|
+
/**
|
|
1868
|
+
* Modal title
|
|
1869
|
+
* @default "Detail Penumpang"
|
|
1870
|
+
*/
|
|
1871
|
+
title?: string;
|
|
1872
|
+
/**
|
|
1873
|
+
* Callback when form is submitted
|
|
1874
|
+
*/
|
|
1875
|
+
onSubmit: (data: PassengerFormData) => void;
|
|
1876
|
+
/**
|
|
1877
|
+
* Default values for the form
|
|
1878
|
+
*/
|
|
1879
|
+
defaultValues?: PassengerFormData;
|
|
1880
|
+
/**
|
|
1881
|
+
* Whether this is an adult form (shows ID fields) or child/infant form (shows birth date)
|
|
1882
|
+
* @default true
|
|
1883
|
+
*/
|
|
1884
|
+
isAdultForm?: boolean;
|
|
1885
|
+
/**
|
|
1886
|
+
* Options for title select field
|
|
1887
|
+
*/
|
|
1888
|
+
titleOptions: SelectOption[];
|
|
1889
|
+
/**
|
|
1890
|
+
* Options for ID type select field
|
|
1891
|
+
*/
|
|
1892
|
+
idTypeOptions: SelectOption[];
|
|
1893
|
+
/**
|
|
1894
|
+
* Options for city select field
|
|
1895
|
+
*/
|
|
1896
|
+
cityOptions: SelectOption[];
|
|
1897
|
+
/**
|
|
1898
|
+
* Options for ticket class radio field
|
|
1899
|
+
*/
|
|
1900
|
+
ticketClassOptions: RadioOption[];
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
/**
|
|
1904
|
+
* ModalPassengerForm - A reusable modal component for adding/editing passenger details
|
|
1905
|
+
*
|
|
1906
|
+
* This component provides a form interface for passenger information with features like:
|
|
1907
|
+
* - Different fields for adult vs child/infant passengers
|
|
1908
|
+
* - Form validation
|
|
1909
|
+
* - Support for add and edit modes
|
|
1910
|
+
*
|
|
1911
|
+
* @example
|
|
1912
|
+
* ```tsx
|
|
1913
|
+
* <ModalPassengerForm
|
|
1914
|
+
* open={isOpen}
|
|
1915
|
+
* onClose={() => setIsOpen(false)}
|
|
1916
|
+
* onSubmit={handleSubmit}
|
|
1917
|
+
* defaultValues={passengerData}
|
|
1918
|
+
* isAdultForm={true}
|
|
1919
|
+
* titleOptions={titleOpts}
|
|
1920
|
+
* idTypeOptions={idTypeOpts}
|
|
1921
|
+
* cityOptions={cityOpts}
|
|
1922
|
+
* ticketClassOptions={ticketClassOpts}
|
|
1923
|
+
* />
|
|
1924
|
+
* ```
|
|
1925
|
+
*/
|
|
1926
|
+
declare const ModalPassengerForm: React$1.FC<ModalPassengerFormProps>;
|
|
1927
|
+
|
|
1928
|
+
interface PassengerListItem {
|
|
1929
|
+
/**
|
|
1930
|
+
* Unique identifier for the passenger
|
|
1931
|
+
*/
|
|
1932
|
+
id?: number;
|
|
1933
|
+
/**
|
|
1934
|
+
* Passenger name
|
|
1935
|
+
*/
|
|
1936
|
+
name?: string;
|
|
1937
|
+
/**
|
|
1938
|
+
* Passenger type code (e.g., "ADULT", "CHILD", "INFANT")
|
|
1939
|
+
*/
|
|
1940
|
+
passengerType?: string;
|
|
1941
|
+
/**
|
|
1942
|
+
* Service class name (e.g., "ECONOMY", "BUSINESS", "EXECUTIVE")
|
|
1943
|
+
*/
|
|
1944
|
+
serviceName?: string;
|
|
1945
|
+
}
|
|
1946
|
+
interface BadgeConfig {
|
|
1947
|
+
/**
|
|
1948
|
+
* Badge background color
|
|
1949
|
+
*/
|
|
1950
|
+
color: string;
|
|
1951
|
+
/**
|
|
1952
|
+
* Path to badge icon
|
|
1953
|
+
*/
|
|
1954
|
+
icon: string;
|
|
1955
|
+
}
|
|
1956
|
+
interface CardPassengerListProps {
|
|
1957
|
+
/**
|
|
1958
|
+
* Card title
|
|
1959
|
+
* @default "Data Penumpang"
|
|
1960
|
+
*/
|
|
1961
|
+
title?: string;
|
|
1962
|
+
/**
|
|
1963
|
+
* List of passengers to display
|
|
1964
|
+
*/
|
|
1965
|
+
passengers: PassengerListItem[];
|
|
1966
|
+
/**
|
|
1967
|
+
* Callback when a passenger is clicked
|
|
1968
|
+
*/
|
|
1969
|
+
onPassengerClick: (passenger: PassengerListItem) => void;
|
|
1970
|
+
/**
|
|
1971
|
+
* Additional CSS class name
|
|
1972
|
+
*/
|
|
1973
|
+
className?: string;
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
/**
|
|
1977
|
+
* CardPassengerList - A reusable card component for displaying passenger list
|
|
1978
|
+
*
|
|
1979
|
+
* This component provides a card interface for showing passengers with features like:
|
|
1980
|
+
* - Header with title and divider line
|
|
1981
|
+
* - List of passengers with service class badges
|
|
1982
|
+
* - Clickable passenger items
|
|
1983
|
+
* - Badge with overlapping icon design
|
|
1984
|
+
*
|
|
1985
|
+
* @example
|
|
1986
|
+
* ```tsx
|
|
1987
|
+
* <CardPassengerList
|
|
1988
|
+
* title="Data Penumpang"
|
|
1989
|
+
* passengers={passengerList}
|
|
1990
|
+
* onPassengerClick={handleClick}
|
|
1991
|
+
* />
|
|
1992
|
+
* ```
|
|
1993
|
+
*/
|
|
1994
|
+
declare const CardPassengerList: React$1.FC<CardPassengerListProps>;
|
|
1995
|
+
|
|
1996
|
+
/**
|
|
1997
|
+
* Get badge configuration based on ticket class
|
|
1998
|
+
* @param ticketClass - The ticket class (ECONOMY, BUSINESS, EXECUTIVE)
|
|
1999
|
+
* @returns Badge configuration with color and icon path
|
|
2000
|
+
*/
|
|
2001
|
+
declare const getBadgeConfig: (ticketClass?: string) => BadgeConfig;
|
|
2002
|
+
|
|
2003
|
+
export { BackgroundTicketCard, BackgroundTicketCardVertical, type BadgeConfig, CardBanner, type CardBannerProps, CardOrdererInfo, type CardOrdererInfoProps, CardPassengerList, type CardPassengerListProps, CardPromo, type CardPromoProps, CardServiceMenu, type CardServiceMenuProps, CardTicket, type CardTicketProps, CardTicketSearch, DEFAULT_LABELS$3 as CardTicketSearchDefaultLabels, type CardTicketSearchFormData, type CardTicketSearchLabels, type CardTicketSearchProps, type ServiceMenuItem as CardTicketSearchServiceMenuItem, CardTicketSearchSummary, DEFAULT_LABELS$2 as CardTicketSearchSummaryDefaultLabels, type CardTicketSearchSummaryProps, CarouselWithCustomNav, type CarouselWithCustomNavProps, type CountryCode, DEFAULT_COUNTRY_CODES, DEFAULT_DURATION_RANGE, DEFAULT_PRICE_RANGE, DEFAULT_SCROLL_AMOUNT, DEFAULT_SERVICE_CLASSES, DEFAULT_SERVICE_TYPES, DEFAULT_SORT_OPTIONS, DEFAULT_TIME_SLOTS, DEFAULT_VEHICLE_ICONS, DateFilter, DEFAULT_LABELS as DateFilterDefaultLabels, type DateFilterLabels, type DateFilterProps, type DateItem, type FilterCount, type HarborItem, InputDynamic, type InputDynamicProps, type InputType, MODAL_PRESETS, ModalFilterTicket, DEFAULT_LABELS$1 as ModalFilterTicketDefaultLabels, type ModalFilterTicketLabels, type ModalFilterTicketProps, ModalIllustration, type ModalIllustrationButton, type ModalIllustrationProps, ModalListPassenger, type PassengerItem as ModalListPassengerItem, type ModalListPassengerProps, ModalPassengerForm, type ModalPassengerFormProps, type ModalPresetKey, ModalSearchHarbor, type ModalSearchHarborProps, ModalSearchTicket, type ModalSearchTicketProps, ModalSelectDate, type ModalSelectDateProps, ModalService, type ModalServiceProps, ModalTotalPassengers, type ModalTotalPassengersProps, ModalTypeOfService, type ModalTypeOfServiceProps, type OrdererInfo, type Passenger, type PassengerFormData, type PassengerListItem, type PassengerService, type PassengerServiceCode, type PassengerType, type RadioOption, type SearchSummaryField, type SearchTicketFormData, type SelectOption, type SelectedPassengerItem, type ServiceClass, type ServiceId, type ServiceItem, SortMenu, type SortMenuProps, type SortOption, type StepStatus, Stepper, type StepperProps, type StepperStep, type TabType, type TypeOfService, getBadgeConfig, getModalPreset, getSortLabel };
|
package/dist/index.d.ts
CHANGED
|
@@ -1675,4 +1675,329 @@ interface ModalSearchTicketProps extends Partial<DialogProps> {
|
|
|
1675
1675
|
*/
|
|
1676
1676
|
declare const ModalSearchTicket: React$1.FC<ModalSearchTicketProps>;
|
|
1677
1677
|
|
|
1678
|
-
|
|
1678
|
+
interface StepperStep {
|
|
1679
|
+
id: string;
|
|
1680
|
+
label: string;
|
|
1681
|
+
number: number;
|
|
1682
|
+
}
|
|
1683
|
+
interface StepperProps {
|
|
1684
|
+
/**
|
|
1685
|
+
* Array of steps to display
|
|
1686
|
+
*/
|
|
1687
|
+
steps: StepperStep[];
|
|
1688
|
+
/**
|
|
1689
|
+
* Current active step (can be step id or step number)
|
|
1690
|
+
*/
|
|
1691
|
+
currentStep: string | number;
|
|
1692
|
+
/**
|
|
1693
|
+
* Additional CSS class name
|
|
1694
|
+
*/
|
|
1695
|
+
className?: string;
|
|
1696
|
+
}
|
|
1697
|
+
type StepStatus = 'completed' | 'active' | 'inactive';
|
|
1698
|
+
|
|
1699
|
+
declare const Stepper: React$1.FC<StepperProps>;
|
|
1700
|
+
|
|
1701
|
+
interface OrdererInfo {
|
|
1702
|
+
name?: string;
|
|
1703
|
+
phoneNumber?: string;
|
|
1704
|
+
email?: string;
|
|
1705
|
+
}
|
|
1706
|
+
interface CardOrdererInfoProps {
|
|
1707
|
+
/**
|
|
1708
|
+
* Orderer information to display
|
|
1709
|
+
*/
|
|
1710
|
+
orderer?: OrdererInfo;
|
|
1711
|
+
/**
|
|
1712
|
+
* Additional CSS class name
|
|
1713
|
+
*/
|
|
1714
|
+
className?: string;
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1717
|
+
declare const CardOrdererInfo: React$1.FC<CardOrdererInfoProps>;
|
|
1718
|
+
|
|
1719
|
+
interface PassengerItem {
|
|
1720
|
+
/**
|
|
1721
|
+
* Unique identifier for the passenger
|
|
1722
|
+
*/
|
|
1723
|
+
id?: number;
|
|
1724
|
+
/**
|
|
1725
|
+
* Passenger name
|
|
1726
|
+
*/
|
|
1727
|
+
name?: string;
|
|
1728
|
+
/**
|
|
1729
|
+
* Passenger category/type (e.g., "ADULT", "CHILD", "INFANT")
|
|
1730
|
+
*/
|
|
1731
|
+
category?: string;
|
|
1732
|
+
/**
|
|
1733
|
+
* Whether the passenger data is completed
|
|
1734
|
+
*/
|
|
1735
|
+
isCompleted?: boolean;
|
|
1736
|
+
}
|
|
1737
|
+
interface ModalListPassengerProps {
|
|
1738
|
+
/**
|
|
1739
|
+
* Whether the modal is open
|
|
1740
|
+
*/
|
|
1741
|
+
open: boolean;
|
|
1742
|
+
/**
|
|
1743
|
+
* Callback when modal should close
|
|
1744
|
+
*/
|
|
1745
|
+
onClose: () => void;
|
|
1746
|
+
/**
|
|
1747
|
+
* Modal title
|
|
1748
|
+
* @default "Detail Penumpang"
|
|
1749
|
+
*/
|
|
1750
|
+
title?: string;
|
|
1751
|
+
/**
|
|
1752
|
+
* List of available passengers to display
|
|
1753
|
+
*/
|
|
1754
|
+
passengers: PassengerItem[];
|
|
1755
|
+
/**
|
|
1756
|
+
* Current search query value
|
|
1757
|
+
*/
|
|
1758
|
+
searchQuery: string;
|
|
1759
|
+
/**
|
|
1760
|
+
* Callback when search query changes
|
|
1761
|
+
*/
|
|
1762
|
+
onSearchChange: (query: string) => void;
|
|
1763
|
+
/**
|
|
1764
|
+
* Callback when a passenger is selected
|
|
1765
|
+
*/
|
|
1766
|
+
onSelectPassenger: (passenger: PassengerItem) => void;
|
|
1767
|
+
/**
|
|
1768
|
+
* Callback when edit button is clicked for a passenger
|
|
1769
|
+
*/
|
|
1770
|
+
onEditPassenger: (passenger: PassengerItem) => void;
|
|
1771
|
+
/**
|
|
1772
|
+
* Callback when "Tambah Penumpang" button is clicked
|
|
1773
|
+
*/
|
|
1774
|
+
onAddPassenger: () => void;
|
|
1775
|
+
/**
|
|
1776
|
+
* Whether "Sama Dengan Pemesan" is checked
|
|
1777
|
+
*/
|
|
1778
|
+
sameAsOrderer: boolean;
|
|
1779
|
+
/**
|
|
1780
|
+
* Callback when "Sama Dengan Pemesan" switch changes
|
|
1781
|
+
*/
|
|
1782
|
+
onSameAsOrdererChange: (checked: boolean) => void;
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
/**
|
|
1786
|
+
* ModalListPassenger - A reusable modal component for selecting passengers from a list
|
|
1787
|
+
*
|
|
1788
|
+
* This component provides a modal interface for selecting passengers with features like:
|
|
1789
|
+
* - Search functionality
|
|
1790
|
+
* - "Sama Dengan Pemesan" toggle
|
|
1791
|
+
* - Edit passenger option
|
|
1792
|
+
* - Add new passenger option
|
|
1793
|
+
*
|
|
1794
|
+
* @example
|
|
1795
|
+
* ```tsx
|
|
1796
|
+
* <ModalListPassenger
|
|
1797
|
+
* open={isOpen}
|
|
1798
|
+
* onClose={() => setIsOpen(false)}
|
|
1799
|
+
* passengers={passengerList}
|
|
1800
|
+
* searchQuery={search}
|
|
1801
|
+
* onSearchChange={setSearch}
|
|
1802
|
+
* onSelectPassenger={handleSelect}
|
|
1803
|
+
* onEditPassenger={handleEdit}
|
|
1804
|
+
* onAddPassenger={handleAdd}
|
|
1805
|
+
* sameAsOrderer={sameAsOrderer}
|
|
1806
|
+
* onSameAsOrdererChange={setSameAsOrderer}
|
|
1807
|
+
* />
|
|
1808
|
+
* ```
|
|
1809
|
+
*/
|
|
1810
|
+
declare const ModalListPassenger: React$1.FC<ModalListPassengerProps>;
|
|
1811
|
+
|
|
1812
|
+
interface PassengerFormData {
|
|
1813
|
+
/**
|
|
1814
|
+
* Passenger title (Tuan, Nyonya, Nona)
|
|
1815
|
+
*/
|
|
1816
|
+
title?: string;
|
|
1817
|
+
/**
|
|
1818
|
+
* Full name
|
|
1819
|
+
*/
|
|
1820
|
+
name?: string;
|
|
1821
|
+
/**
|
|
1822
|
+
* ID type (KTP, SIM, Paspor) - for adults only
|
|
1823
|
+
*/
|
|
1824
|
+
idType?: string;
|
|
1825
|
+
/**
|
|
1826
|
+
* ID number - for adults only
|
|
1827
|
+
*/
|
|
1828
|
+
idNumber?: string;
|
|
1829
|
+
/**
|
|
1830
|
+
* Age - for adults only
|
|
1831
|
+
*/
|
|
1832
|
+
age?: number;
|
|
1833
|
+
/**
|
|
1834
|
+
* Birth date - for children/infants only
|
|
1835
|
+
*/
|
|
1836
|
+
date?: string;
|
|
1837
|
+
/**
|
|
1838
|
+
* City ID
|
|
1839
|
+
*/
|
|
1840
|
+
cityId?: string;
|
|
1841
|
+
/**
|
|
1842
|
+
* Ticket class
|
|
1843
|
+
*/
|
|
1844
|
+
ticketClass?: string;
|
|
1845
|
+
/**
|
|
1846
|
+
* Category (ADULT, CHILD, INFANT, ELDERLY)
|
|
1847
|
+
*/
|
|
1848
|
+
category?: string;
|
|
1849
|
+
/**
|
|
1850
|
+
* Whether the form is completed
|
|
1851
|
+
*/
|
|
1852
|
+
isCompleted?: boolean;
|
|
1853
|
+
/**
|
|
1854
|
+
* Passenger ID (for edit mode)
|
|
1855
|
+
*/
|
|
1856
|
+
id?: number;
|
|
1857
|
+
}
|
|
1858
|
+
interface ModalPassengerFormProps {
|
|
1859
|
+
/**
|
|
1860
|
+
* Whether the modal is open
|
|
1861
|
+
*/
|
|
1862
|
+
open: boolean;
|
|
1863
|
+
/**
|
|
1864
|
+
* Callback when modal should close
|
|
1865
|
+
*/
|
|
1866
|
+
onClose: () => void;
|
|
1867
|
+
/**
|
|
1868
|
+
* Modal title
|
|
1869
|
+
* @default "Detail Penumpang"
|
|
1870
|
+
*/
|
|
1871
|
+
title?: string;
|
|
1872
|
+
/**
|
|
1873
|
+
* Callback when form is submitted
|
|
1874
|
+
*/
|
|
1875
|
+
onSubmit: (data: PassengerFormData) => void;
|
|
1876
|
+
/**
|
|
1877
|
+
* Default values for the form
|
|
1878
|
+
*/
|
|
1879
|
+
defaultValues?: PassengerFormData;
|
|
1880
|
+
/**
|
|
1881
|
+
* Whether this is an adult form (shows ID fields) or child/infant form (shows birth date)
|
|
1882
|
+
* @default true
|
|
1883
|
+
*/
|
|
1884
|
+
isAdultForm?: boolean;
|
|
1885
|
+
/**
|
|
1886
|
+
* Options for title select field
|
|
1887
|
+
*/
|
|
1888
|
+
titleOptions: SelectOption[];
|
|
1889
|
+
/**
|
|
1890
|
+
* Options for ID type select field
|
|
1891
|
+
*/
|
|
1892
|
+
idTypeOptions: SelectOption[];
|
|
1893
|
+
/**
|
|
1894
|
+
* Options for city select field
|
|
1895
|
+
*/
|
|
1896
|
+
cityOptions: SelectOption[];
|
|
1897
|
+
/**
|
|
1898
|
+
* Options for ticket class radio field
|
|
1899
|
+
*/
|
|
1900
|
+
ticketClassOptions: RadioOption[];
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
/**
|
|
1904
|
+
* ModalPassengerForm - A reusable modal component for adding/editing passenger details
|
|
1905
|
+
*
|
|
1906
|
+
* This component provides a form interface for passenger information with features like:
|
|
1907
|
+
* - Different fields for adult vs child/infant passengers
|
|
1908
|
+
* - Form validation
|
|
1909
|
+
* - Support for add and edit modes
|
|
1910
|
+
*
|
|
1911
|
+
* @example
|
|
1912
|
+
* ```tsx
|
|
1913
|
+
* <ModalPassengerForm
|
|
1914
|
+
* open={isOpen}
|
|
1915
|
+
* onClose={() => setIsOpen(false)}
|
|
1916
|
+
* onSubmit={handleSubmit}
|
|
1917
|
+
* defaultValues={passengerData}
|
|
1918
|
+
* isAdultForm={true}
|
|
1919
|
+
* titleOptions={titleOpts}
|
|
1920
|
+
* idTypeOptions={idTypeOpts}
|
|
1921
|
+
* cityOptions={cityOpts}
|
|
1922
|
+
* ticketClassOptions={ticketClassOpts}
|
|
1923
|
+
* />
|
|
1924
|
+
* ```
|
|
1925
|
+
*/
|
|
1926
|
+
declare const ModalPassengerForm: React$1.FC<ModalPassengerFormProps>;
|
|
1927
|
+
|
|
1928
|
+
interface PassengerListItem {
|
|
1929
|
+
/**
|
|
1930
|
+
* Unique identifier for the passenger
|
|
1931
|
+
*/
|
|
1932
|
+
id?: number;
|
|
1933
|
+
/**
|
|
1934
|
+
* Passenger name
|
|
1935
|
+
*/
|
|
1936
|
+
name?: string;
|
|
1937
|
+
/**
|
|
1938
|
+
* Passenger type code (e.g., "ADULT", "CHILD", "INFANT")
|
|
1939
|
+
*/
|
|
1940
|
+
passengerType?: string;
|
|
1941
|
+
/**
|
|
1942
|
+
* Service class name (e.g., "ECONOMY", "BUSINESS", "EXECUTIVE")
|
|
1943
|
+
*/
|
|
1944
|
+
serviceName?: string;
|
|
1945
|
+
}
|
|
1946
|
+
interface BadgeConfig {
|
|
1947
|
+
/**
|
|
1948
|
+
* Badge background color
|
|
1949
|
+
*/
|
|
1950
|
+
color: string;
|
|
1951
|
+
/**
|
|
1952
|
+
* Path to badge icon
|
|
1953
|
+
*/
|
|
1954
|
+
icon: string;
|
|
1955
|
+
}
|
|
1956
|
+
interface CardPassengerListProps {
|
|
1957
|
+
/**
|
|
1958
|
+
* Card title
|
|
1959
|
+
* @default "Data Penumpang"
|
|
1960
|
+
*/
|
|
1961
|
+
title?: string;
|
|
1962
|
+
/**
|
|
1963
|
+
* List of passengers to display
|
|
1964
|
+
*/
|
|
1965
|
+
passengers: PassengerListItem[];
|
|
1966
|
+
/**
|
|
1967
|
+
* Callback when a passenger is clicked
|
|
1968
|
+
*/
|
|
1969
|
+
onPassengerClick: (passenger: PassengerListItem) => void;
|
|
1970
|
+
/**
|
|
1971
|
+
* Additional CSS class name
|
|
1972
|
+
*/
|
|
1973
|
+
className?: string;
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
/**
|
|
1977
|
+
* CardPassengerList - A reusable card component for displaying passenger list
|
|
1978
|
+
*
|
|
1979
|
+
* This component provides a card interface for showing passengers with features like:
|
|
1980
|
+
* - Header with title and divider line
|
|
1981
|
+
* - List of passengers with service class badges
|
|
1982
|
+
* - Clickable passenger items
|
|
1983
|
+
* - Badge with overlapping icon design
|
|
1984
|
+
*
|
|
1985
|
+
* @example
|
|
1986
|
+
* ```tsx
|
|
1987
|
+
* <CardPassengerList
|
|
1988
|
+
* title="Data Penumpang"
|
|
1989
|
+
* passengers={passengerList}
|
|
1990
|
+
* onPassengerClick={handleClick}
|
|
1991
|
+
* />
|
|
1992
|
+
* ```
|
|
1993
|
+
*/
|
|
1994
|
+
declare const CardPassengerList: React$1.FC<CardPassengerListProps>;
|
|
1995
|
+
|
|
1996
|
+
/**
|
|
1997
|
+
* Get badge configuration based on ticket class
|
|
1998
|
+
* @param ticketClass - The ticket class (ECONOMY, BUSINESS, EXECUTIVE)
|
|
1999
|
+
* @returns Badge configuration with color and icon path
|
|
2000
|
+
*/
|
|
2001
|
+
declare const getBadgeConfig: (ticketClass?: string) => BadgeConfig;
|
|
2002
|
+
|
|
2003
|
+
export { BackgroundTicketCard, BackgroundTicketCardVertical, type BadgeConfig, CardBanner, type CardBannerProps, CardOrdererInfo, type CardOrdererInfoProps, CardPassengerList, type CardPassengerListProps, CardPromo, type CardPromoProps, CardServiceMenu, type CardServiceMenuProps, CardTicket, type CardTicketProps, CardTicketSearch, DEFAULT_LABELS$3 as CardTicketSearchDefaultLabels, type CardTicketSearchFormData, type CardTicketSearchLabels, type CardTicketSearchProps, type ServiceMenuItem as CardTicketSearchServiceMenuItem, CardTicketSearchSummary, DEFAULT_LABELS$2 as CardTicketSearchSummaryDefaultLabels, type CardTicketSearchSummaryProps, CarouselWithCustomNav, type CarouselWithCustomNavProps, type CountryCode, DEFAULT_COUNTRY_CODES, DEFAULT_DURATION_RANGE, DEFAULT_PRICE_RANGE, DEFAULT_SCROLL_AMOUNT, DEFAULT_SERVICE_CLASSES, DEFAULT_SERVICE_TYPES, DEFAULT_SORT_OPTIONS, DEFAULT_TIME_SLOTS, DEFAULT_VEHICLE_ICONS, DateFilter, DEFAULT_LABELS as DateFilterDefaultLabels, type DateFilterLabels, type DateFilterProps, type DateItem, type FilterCount, type HarborItem, InputDynamic, type InputDynamicProps, type InputType, MODAL_PRESETS, ModalFilterTicket, DEFAULT_LABELS$1 as ModalFilterTicketDefaultLabels, type ModalFilterTicketLabels, type ModalFilterTicketProps, ModalIllustration, type ModalIllustrationButton, type ModalIllustrationProps, ModalListPassenger, type PassengerItem as ModalListPassengerItem, type ModalListPassengerProps, ModalPassengerForm, type ModalPassengerFormProps, type ModalPresetKey, ModalSearchHarbor, type ModalSearchHarborProps, ModalSearchTicket, type ModalSearchTicketProps, ModalSelectDate, type ModalSelectDateProps, ModalService, type ModalServiceProps, ModalTotalPassengers, type ModalTotalPassengersProps, ModalTypeOfService, type ModalTypeOfServiceProps, type OrdererInfo, type Passenger, type PassengerFormData, type PassengerListItem, type PassengerService, type PassengerServiceCode, type PassengerType, type RadioOption, type SearchSummaryField, type SearchTicketFormData, type SelectOption, type SelectedPassengerItem, type ServiceClass, type ServiceId, type ServiceItem, SortMenu, type SortMenuProps, type SortOption, type StepStatus, Stepper, type StepperProps, type StepperStep, type TabType, type TypeOfService, getBadgeConfig, getModalPreset, getSortLabel };
|