@asdp/ferryui 0.1.22-dev.9417 → 0.1.22-dev.9474
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 +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +76 -71
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +76 -71
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -872,6 +872,7 @@ interface InputDynamicProps<T extends FieldValues = FieldValues> {
|
|
|
872
872
|
* @default false
|
|
873
873
|
*/
|
|
874
874
|
disablePastDates?: boolean;
|
|
875
|
+
disableFutureDates?: boolean;
|
|
875
876
|
}
|
|
876
877
|
interface InputDynamicLabels {
|
|
877
878
|
emailOrPhonePlaceholder: string;
|
|
@@ -1316,6 +1317,10 @@ interface ServiceItem {
|
|
|
1316
1317
|
* Color code for the service type
|
|
1317
1318
|
*/
|
|
1318
1319
|
serviceTypeColor: string;
|
|
1320
|
+
/**
|
|
1321
|
+
* Short description of the service
|
|
1322
|
+
*/
|
|
1323
|
+
serviceShortDescription: string;
|
|
1319
1324
|
}
|
|
1320
1325
|
interface ModalServiceLabels {
|
|
1321
1326
|
title: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -872,6 +872,7 @@ interface InputDynamicProps<T extends FieldValues = FieldValues> {
|
|
|
872
872
|
* @default false
|
|
873
873
|
*/
|
|
874
874
|
disablePastDates?: boolean;
|
|
875
|
+
disableFutureDates?: boolean;
|
|
875
876
|
}
|
|
876
877
|
interface InputDynamicLabels {
|
|
877
878
|
emailOrPhonePlaceholder: string;
|
|
@@ -1316,6 +1317,10 @@ interface ServiceItem {
|
|
|
1316
1317
|
* Color code for the service type
|
|
1317
1318
|
*/
|
|
1318
1319
|
serviceTypeColor: string;
|
|
1320
|
+
/**
|
|
1321
|
+
* Short description of the service
|
|
1322
|
+
*/
|
|
1323
|
+
serviceShortDescription: string;
|
|
1319
1324
|
}
|
|
1320
1325
|
interface ModalServiceLabels {
|
|
1321
1326
|
title: string;
|
package/dist/index.js
CHANGED
|
@@ -2505,6 +2505,7 @@ var DatePickerInput = React.forwardRef(
|
|
|
2505
2505
|
min,
|
|
2506
2506
|
max,
|
|
2507
2507
|
disablePastDates = false,
|
|
2508
|
+
disableFutureDates = false,
|
|
2508
2509
|
...restProps
|
|
2509
2510
|
}, ref) => {
|
|
2510
2511
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
@@ -2539,6 +2540,7 @@ var DatePickerInput = React.forwardRef(
|
|
|
2539
2540
|
return today;
|
|
2540
2541
|
};
|
|
2541
2542
|
const minDate = min ? new Date(min) : disablePastDates ? getStartOfToday() : void 0;
|
|
2543
|
+
const maxDate = max ? new Date(max) : disableFutureDates ? getStartOfToday() : void 0;
|
|
2542
2544
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2543
2545
|
reactComponents.Popover,
|
|
2544
2546
|
{
|
|
@@ -2590,7 +2592,7 @@ var DatePickerInput = React.forwardRef(
|
|
|
2590
2592
|
highlightSelectedMonth: true,
|
|
2591
2593
|
showMonthPickerAsOverlay: false,
|
|
2592
2594
|
minDate,
|
|
2593
|
-
maxDate
|
|
2595
|
+
maxDate
|
|
2594
2596
|
}
|
|
2595
2597
|
) })
|
|
2596
2598
|
]
|
|
@@ -4189,7 +4191,8 @@ var InputDynamic = ({
|
|
|
4189
4191
|
language = "id",
|
|
4190
4192
|
labels,
|
|
4191
4193
|
menuPlacement,
|
|
4192
|
-
disablePastDates = false
|
|
4194
|
+
disablePastDates = false,
|
|
4195
|
+
disableFutureDates = false
|
|
4193
4196
|
}) => {
|
|
4194
4197
|
const styles = useStyles8();
|
|
4195
4198
|
const mergedLabels = { ...DEFAULT_LABELS7[language], ...labels };
|
|
@@ -4956,7 +4959,8 @@ var InputDynamic = ({
|
|
|
4956
4959
|
style: inputStyle,
|
|
4957
4960
|
max: max ? String(max) : void 0,
|
|
4958
4961
|
min: min ? String(min) : void 0,
|
|
4959
|
-
disablePastDates
|
|
4962
|
+
disablePastDates,
|
|
4963
|
+
disableFutureDates
|
|
4960
4964
|
}
|
|
4961
4965
|
);
|
|
4962
4966
|
}
|
|
@@ -6692,14 +6696,26 @@ var useStyles12 = reactComponents.makeStyles({
|
|
|
6692
6696
|
display: "flex",
|
|
6693
6697
|
gap: "1rem",
|
|
6694
6698
|
marginBottom: "1rem",
|
|
6695
|
-
flexWrap: "
|
|
6696
|
-
marginTop: "1rem"
|
|
6699
|
+
flexWrap: "nowrap",
|
|
6700
|
+
marginTop: "1rem",
|
|
6701
|
+
overflowX: "auto",
|
|
6702
|
+
width: "100%",
|
|
6703
|
+
paddingBottom: "8px",
|
|
6704
|
+
paddingTop: "4px",
|
|
6705
|
+
alignItems: "center",
|
|
6706
|
+
flexShrink: 0,
|
|
6707
|
+
"&::-webkit-scrollbar": {
|
|
6708
|
+
display: "none"
|
|
6709
|
+
},
|
|
6710
|
+
msOverflowStyle: "none",
|
|
6711
|
+
scrollbarWidth: "none"
|
|
6697
6712
|
},
|
|
6698
6713
|
circularButton: {
|
|
6699
6714
|
borderRadius: reactComponents.tokens.borderRadius3XLarge,
|
|
6700
6715
|
border: `1px solid ${reactComponents.tokens.colorBrandBackground}`,
|
|
6701
6716
|
backgroundColor: brandColors["140"],
|
|
6702
|
-
gap: "5px"
|
|
6717
|
+
gap: "5px",
|
|
6718
|
+
flexShrink: 0
|
|
6703
6719
|
},
|
|
6704
6720
|
buttonContent: {
|
|
6705
6721
|
display: "flex",
|
|
@@ -6960,7 +6976,8 @@ var ModalSearchHarbor = ({
|
|
|
6960
6976
|
}
|
|
6961
6977
|
)
|
|
6962
6978
|
] }),
|
|
6963
|
-
favoriteHarbors.length > 0 &&
|
|
6979
|
+
favoriteHarbors.length > 0 && //Make Favorite scroll to vertical
|
|
6980
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.buttonContainer, children: favoriteHarbors.map((harbor) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6964
6981
|
reactComponents.Button,
|
|
6965
6982
|
{
|
|
6966
6983
|
onClick: () => handleSelect(harbor),
|
|
@@ -7497,7 +7514,7 @@ var useStyles14 = reactComponents.makeStyles({
|
|
|
7497
7514
|
display: "flex",
|
|
7498
7515
|
flexDirection: "column",
|
|
7499
7516
|
gap: "12px",
|
|
7500
|
-
|
|
7517
|
+
maxHeight: "700px",
|
|
7501
7518
|
overflowY: "auto",
|
|
7502
7519
|
padding: "2px"
|
|
7503
7520
|
},
|
|
@@ -7694,54 +7711,56 @@ var ModalService = ({
|
|
|
7694
7711
|
actionButton: reloadButton,
|
|
7695
7712
|
imageSrc: emptyImageSrc
|
|
7696
7713
|
}
|
|
7697
|
-
) : /* @__PURE__ */ jsxRuntime.
|
|
7698
|
-
/* @__PURE__ */ jsxRuntime.
|
|
7699
|
-
|
|
7700
|
-
|
|
7701
|
-
|
|
7702
|
-
|
|
7703
|
-
|
|
7704
|
-
|
|
7705
|
-
|
|
7706
|
-
|
|
7707
|
-
|
|
7708
|
-
|
|
7709
|
-
|
|
7710
|
-
|
|
7711
|
-
|
|
7712
|
-
|
|
7713
|
-
|
|
7714
|
-
/* @__PURE__ */ jsxRuntime.
|
|
7715
|
-
|
|
7716
|
-
|
|
7714
|
+
) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7715
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.serviceList, children: [
|
|
7716
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.headerRow, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7717
|
+
reactComponents.Checkbox,
|
|
7718
|
+
{
|
|
7719
|
+
label: mergedLabels.selectAll,
|
|
7720
|
+
checked: selectedServices.length === services.length,
|
|
7721
|
+
onChange: handleToggleAll
|
|
7722
|
+
}
|
|
7723
|
+
) }),
|
|
7724
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, {}),
|
|
7725
|
+
services.map((service) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7726
|
+
"div",
|
|
7727
|
+
{
|
|
7728
|
+
className: styles.serviceItem,
|
|
7729
|
+
onClick: () => handleToggleService(service.serviceTypeId),
|
|
7730
|
+
children: [
|
|
7731
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.serviceContent, children: [
|
|
7732
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.serviceName, children: service.serviceShortDescription }),
|
|
7733
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { alignSelf: "flex-start" }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7734
|
+
reactComponents.Badge,
|
|
7735
|
+
{
|
|
7736
|
+
appearance: "ghost",
|
|
7737
|
+
style: {
|
|
7738
|
+
backgroundColor: service.serviceTypeColor,
|
|
7739
|
+
color: "#ffffff",
|
|
7740
|
+
border: "none",
|
|
7741
|
+
padding: "4px 10px",
|
|
7742
|
+
height: "auto",
|
|
7743
|
+
borderRadius: "100px"
|
|
7744
|
+
},
|
|
7745
|
+
children: service.serviceTypeName
|
|
7746
|
+
}
|
|
7747
|
+
) }),
|
|
7748
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1, { className: styles.serviceDescription, children: service.serviceDescription })
|
|
7749
|
+
] }),
|
|
7750
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7751
|
+
reactComponents.Checkbox,
|
|
7717
7752
|
{
|
|
7718
|
-
|
|
7719
|
-
|
|
7720
|
-
|
|
7721
|
-
color: "#ffffff",
|
|
7722
|
-
border: "none",
|
|
7723
|
-
padding: "4px 10px",
|
|
7724
|
-
height: "auto",
|
|
7725
|
-
borderRadius: "100px"
|
|
7726
|
-
},
|
|
7727
|
-
children: service.serviceTypeCode
|
|
7753
|
+
checked: selectedServices.includes(service.serviceTypeId),
|
|
7754
|
+
onChange: () => handleToggleService(service.serviceTypeId),
|
|
7755
|
+
onClick: (e) => e.stopPropagation()
|
|
7728
7756
|
}
|
|
7729
|
-
)
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
|
|
7734
|
-
|
|
7735
|
-
|
|
7736
|
-
onChange: () => handleToggleService(service.serviceTypeId),
|
|
7737
|
-
onClick: (e) => e.stopPropagation()
|
|
7738
|
-
}
|
|
7739
|
-
)
|
|
7740
|
-
]
|
|
7741
|
-
},
|
|
7742
|
-
service.serviceTypeId
|
|
7743
|
-
)),
|
|
7744
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, {}),
|
|
7757
|
+
)
|
|
7758
|
+
]
|
|
7759
|
+
},
|
|
7760
|
+
service.serviceTypeId
|
|
7761
|
+
)),
|
|
7762
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, {})
|
|
7763
|
+
] }),
|
|
7745
7764
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.footer, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7746
7765
|
reactComponents.Button,
|
|
7747
7766
|
{
|
|
@@ -7753,7 +7772,7 @@ var ModalService = ({
|
|
|
7753
7772
|
children: mergedLabels.saveButton
|
|
7754
7773
|
}
|
|
7755
7774
|
) })
|
|
7756
|
-
] }) })
|
|
7775
|
+
] }) })
|
|
7757
7776
|
] }) }) });
|
|
7758
7777
|
};
|
|
7759
7778
|
|
|
@@ -11502,6 +11521,7 @@ var ModalPassengerForm = ({
|
|
|
11502
11521
|
placeholder: mergedLabels.datePlaceholder,
|
|
11503
11522
|
size: "large",
|
|
11504
11523
|
required: true,
|
|
11524
|
+
disableFutureDates: true,
|
|
11505
11525
|
validationRules: {
|
|
11506
11526
|
required: mergedErrors.requiredDate,
|
|
11507
11527
|
validate: (value) => {
|
|
@@ -11544,22 +11564,7 @@ var ModalPassengerForm = ({
|
|
|
11544
11564
|
}
|
|
11545
11565
|
}
|
|
11546
11566
|
),
|
|
11547
|
-
watchIdentityTypeId ? watchIdentityTypeId
|
|
11548
|
-
InputDynamic_default,
|
|
11549
|
-
{
|
|
11550
|
-
name: "identityId",
|
|
11551
|
-
control,
|
|
11552
|
-
type: "date",
|
|
11553
|
-
label: mergedLabels.idTypeOtherLabel,
|
|
11554
|
-
placeholder: mergedLabels.idTypeOtherPlaceholder,
|
|
11555
|
-
size: "large",
|
|
11556
|
-
required: true,
|
|
11557
|
-
max: (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
|
|
11558
|
-
validationRules: {
|
|
11559
|
-
required: mergedErrors.requiredDate
|
|
11560
|
-
}
|
|
11561
|
-
}
|
|
11562
|
-
) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11567
|
+
watchIdentityTypeId ? watchIdentityTypeId !== IDENTITY_TYPE.TGL.toString() && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11563
11568
|
watchIdentityTypeId === IDENTITY_TYPE.PSP.toString() && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11564
11569
|
InputDynamic_default,
|
|
11565
11570
|
{
|