@asdp/ferryui 0.1.22-dev.9596 → 0.1.22-dev.9610
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 +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +215 -179
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +215 -179
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1733,6 +1733,9 @@ type MANIFEST_ENTITY_TYPE = typeof MANIFEST_ENTITY[keyof typeof MANIFEST_ENTITY]
|
|
|
1733
1733
|
interface LoadType {
|
|
1734
1734
|
id: number;
|
|
1735
1735
|
name: string;
|
|
1736
|
+
price: number;
|
|
1737
|
+
currency: string;
|
|
1738
|
+
formattedPrice: string;
|
|
1736
1739
|
unit?: {
|
|
1737
1740
|
id: string;
|
|
1738
1741
|
name: string;
|
|
@@ -1741,6 +1744,7 @@ interface LoadType {
|
|
|
1741
1744
|
declare const HARDCODED_ID: {
|
|
1742
1745
|
readonly FAQ_ID_PEMESANAN_TIKET: 1;
|
|
1743
1746
|
readonly COMPANY_ID_LAINNYA: "999999";
|
|
1747
|
+
readonly LOAD_TYPE_ID_LAINNYA: 87;
|
|
1744
1748
|
};
|
|
1745
1749
|
|
|
1746
1750
|
interface TypeOfServiceChild {
|
package/dist/index.d.ts
CHANGED
|
@@ -1733,6 +1733,9 @@ type MANIFEST_ENTITY_TYPE = typeof MANIFEST_ENTITY[keyof typeof MANIFEST_ENTITY]
|
|
|
1733
1733
|
interface LoadType {
|
|
1734
1734
|
id: number;
|
|
1735
1735
|
name: string;
|
|
1736
|
+
price: number;
|
|
1737
|
+
currency: string;
|
|
1738
|
+
formattedPrice: string;
|
|
1736
1739
|
unit?: {
|
|
1737
1740
|
id: string;
|
|
1738
1741
|
name: string;
|
|
@@ -1741,6 +1744,7 @@ interface LoadType {
|
|
|
1741
1744
|
declare const HARDCODED_ID: {
|
|
1742
1745
|
readonly FAQ_ID_PEMESANAN_TIKET: 1;
|
|
1743
1746
|
readonly COMPANY_ID_LAINNYA: "999999";
|
|
1747
|
+
readonly LOAD_TYPE_ID_LAINNYA: 87;
|
|
1744
1748
|
};
|
|
1745
1749
|
|
|
1746
1750
|
interface TypeOfServiceChild {
|
package/dist/index.js
CHANGED
|
@@ -469,7 +469,8 @@ var MANIFEST_ENTITY = {
|
|
|
469
469
|
};
|
|
470
470
|
var HARDCODED_ID = {
|
|
471
471
|
FAQ_ID_PEMESANAN_TIKET: 1,
|
|
472
|
-
COMPANY_ID_LAINNYA: "999999"
|
|
472
|
+
COMPANY_ID_LAINNYA: "999999",
|
|
473
|
+
LOAD_TYPE_ID_LAINNYA: 87
|
|
473
474
|
};
|
|
474
475
|
var useStyles2 = reactComponents.makeStyles({
|
|
475
476
|
carousel: {},
|
|
@@ -11923,7 +11924,7 @@ var CardPassengerList = ({
|
|
|
11923
11924
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11924
11925
|
react.Icon,
|
|
11925
11926
|
{
|
|
11926
|
-
icon: "fluent:chevron-right-24-regular",
|
|
11927
|
+
icon: passenger.name && passenger.serviceName ? "fluent:edit-24-regular" : "fluent:chevron-right-24-regular",
|
|
11927
11928
|
width: 20,
|
|
11928
11929
|
height: 20
|
|
11929
11930
|
}
|
|
@@ -12826,7 +12827,9 @@ var CardVehicleOwnerForm = ({
|
|
|
12826
12827
|
InputDynamic_default,
|
|
12827
12828
|
{
|
|
12828
12829
|
control,
|
|
12829
|
-
disabled
|
|
12830
|
+
disabled: disabled || (getValues(
|
|
12831
|
+
`owners.${index}.cargo.${cargoIndex}.commodity`
|
|
12832
|
+
) || "") === "",
|
|
12830
12833
|
name: `owners.${index}.cargo.${cargoIndex}.cargoType`,
|
|
12831
12834
|
onChange: (val) => {
|
|
12832
12835
|
const name = `owners.${index}.cargo.${cargoIndex}.cargoType`;
|
|
@@ -12867,57 +12870,158 @@ var CardVehicleOwnerForm = ({
|
|
|
12867
12870
|
(loadType) => loadType.id === type
|
|
12868
12871
|
);
|
|
12869
12872
|
if (!selectedLoadType) {
|
|
12870
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
12873
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { md: 3, children: [
|
|
12874
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.label, children: mergedLabels.priceLabel }),
|
|
12875
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12876
|
+
reactComponents.Body2,
|
|
12877
|
+
{
|
|
12878
|
+
style: { marginTop: "0.5rem" },
|
|
12879
|
+
children: (() => {
|
|
12880
|
+
return new Intl.NumberFormat(
|
|
12881
|
+
"id-ID",
|
|
12882
|
+
{
|
|
12883
|
+
style: "currency",
|
|
12884
|
+
currency: "IDR",
|
|
12885
|
+
minimumFractionDigits: 0
|
|
12886
|
+
}
|
|
12887
|
+
).format(0);
|
|
12888
|
+
})()
|
|
12889
|
+
}
|
|
12890
|
+
)
|
|
12891
|
+
] });
|
|
12871
12892
|
}
|
|
12872
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12873
|
-
/* @__PURE__ */ jsxRuntime.
|
|
12874
|
-
|
|
12875
|
-
|
|
12876
|
-
|
|
12877
|
-
|
|
12878
|
-
|
|
12879
|
-
|
|
12880
|
-
|
|
12881
|
-
|
|
12882
|
-
|
|
12883
|
-
|
|
12884
|
-
|
|
12885
|
-
|
|
12886
|
-
|
|
12887
|
-
|
|
12888
|
-
|
|
12889
|
-
|
|
12890
|
-
|
|
12891
|
-
|
|
12892
|
-
|
|
12893
|
-
|
|
12894
|
-
|
|
12895
|
-
|
|
12896
|
-
|
|
12897
|
-
|
|
12898
|
-
|
|
12899
|
-
|
|
12900
|
-
|
|
12901
|
-
|
|
12902
|
-
|
|
12903
|
-
|
|
12904
|
-
|
|
12905
|
-
|
|
12906
|
-
|
|
12907
|
-
|
|
12908
|
-
|
|
12893
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12894
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { md: 3, children: [
|
|
12895
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.label, children: mergedLabels.cargoQuantityLabel }),
|
|
12896
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
12897
|
+
"div",
|
|
12898
|
+
{
|
|
12899
|
+
style: {
|
|
12900
|
+
display: "flex",
|
|
12901
|
+
alignItems: "center",
|
|
12902
|
+
border: `1px solid ${reactComponents.tokens.colorNeutralStroke1}`,
|
|
12903
|
+
borderRadius: reactComponents.tokens.borderRadiusMedium,
|
|
12904
|
+
height: "40px",
|
|
12905
|
+
padding: "0 12px",
|
|
12906
|
+
backgroundColor: reactComponents.tokens.colorNeutralBackground1
|
|
12907
|
+
},
|
|
12908
|
+
children: [
|
|
12909
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 0.5 } }),
|
|
12910
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
12911
|
+
"div",
|
|
12912
|
+
{
|
|
12913
|
+
style: {
|
|
12914
|
+
display: "flex",
|
|
12915
|
+
alignItems: "center",
|
|
12916
|
+
gap: "12px"
|
|
12917
|
+
},
|
|
12918
|
+
children: [
|
|
12919
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12920
|
+
reactComponents.Button,
|
|
12921
|
+
{
|
|
12922
|
+
appearance: "transparent",
|
|
12923
|
+
disabled,
|
|
12924
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12925
|
+
react.Icon,
|
|
12926
|
+
{
|
|
12927
|
+
icon: "fluent:subtract-circle-24-regular",
|
|
12928
|
+
style: {
|
|
12929
|
+
fontSize: "24px",
|
|
12930
|
+
color: reactComponents.tokens.colorNeutralForeground4
|
|
12931
|
+
}
|
|
12909
12932
|
}
|
|
12933
|
+
),
|
|
12934
|
+
"aria-label": mergedLabels.decrementQuantityAriaLabel,
|
|
12935
|
+
size: "small",
|
|
12936
|
+
onClick: () => {
|
|
12937
|
+
const currentVal = getValues(
|
|
12938
|
+
`owners.${index}.cargo.${cargoIndex}.quantity`
|
|
12939
|
+
) || 0;
|
|
12940
|
+
const currentQty = Number(currentVal);
|
|
12941
|
+
if (currentQty > 0) {
|
|
12942
|
+
const newVal = currentQty - 1;
|
|
12943
|
+
setValue(
|
|
12944
|
+
`owners.${index}.cargo.${cargoIndex}.quantity`,
|
|
12945
|
+
newVal
|
|
12946
|
+
);
|
|
12947
|
+
onUpdateCargoQuantity(
|
|
12948
|
+
owner.id,
|
|
12949
|
+
cargo.id,
|
|
12950
|
+
newVal
|
|
12951
|
+
);
|
|
12952
|
+
}
|
|
12953
|
+
},
|
|
12954
|
+
style: {
|
|
12955
|
+
minWidth: "32px",
|
|
12956
|
+
padding: "0"
|
|
12957
|
+
}
|
|
12958
|
+
}
|
|
12959
|
+
),
|
|
12960
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "40px" }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12961
|
+
reactHookForm.Controller,
|
|
12962
|
+
{
|
|
12963
|
+
name: `owners.${index}.cargo.${cargoIndex}.quantity`,
|
|
12964
|
+
control,
|
|
12965
|
+
disabled,
|
|
12966
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
12967
|
+
"input",
|
|
12968
|
+
{
|
|
12969
|
+
...field,
|
|
12970
|
+
min: 1,
|
|
12971
|
+
type: "number",
|
|
12972
|
+
style: {
|
|
12973
|
+
border: "none",
|
|
12974
|
+
width: "100%",
|
|
12975
|
+
textAlign: "center",
|
|
12976
|
+
outline: "none",
|
|
12977
|
+
backgroundColor: "transparent",
|
|
12978
|
+
color: reactComponents.tokens.colorNeutralForeground1,
|
|
12979
|
+
fontSize: reactComponents.tokens.fontSizeBase400,
|
|
12980
|
+
fontFamily: reactComponents.tokens.fontFamilyBase
|
|
12981
|
+
},
|
|
12982
|
+
onWheel: (e) => e.target.blur(),
|
|
12983
|
+
onChange: (e) => {
|
|
12984
|
+
const newVal = Number(
|
|
12985
|
+
e.target.value
|
|
12986
|
+
);
|
|
12987
|
+
field.onChange(e);
|
|
12988
|
+
onUpdateCargoQuantity(
|
|
12989
|
+
owner.id,
|
|
12990
|
+
cargo.id,
|
|
12991
|
+
newVal
|
|
12992
|
+
);
|
|
12993
|
+
}
|
|
12994
|
+
}
|
|
12995
|
+
),
|
|
12996
|
+
rules: {
|
|
12997
|
+
required: true,
|
|
12998
|
+
min: 1
|
|
12910
12999
|
}
|
|
12911
|
-
|
|
12912
|
-
|
|
12913
|
-
|
|
12914
|
-
|
|
12915
|
-
|
|
12916
|
-
|
|
12917
|
-
|
|
12918
|
-
|
|
12919
|
-
|
|
12920
|
-
|
|
13000
|
+
}
|
|
13001
|
+
) }),
|
|
13002
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13003
|
+
reactComponents.Button,
|
|
13004
|
+
{
|
|
13005
|
+
appearance: "transparent",
|
|
13006
|
+
disabled,
|
|
13007
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13008
|
+
react.Icon,
|
|
13009
|
+
{
|
|
13010
|
+
icon: "fluent:add-circle-24-regular",
|
|
13011
|
+
style: {
|
|
13012
|
+
fontSize: "24px",
|
|
13013
|
+
color: reactComponents.tokens.colorBrandStroke1
|
|
13014
|
+
}
|
|
13015
|
+
}
|
|
13016
|
+
),
|
|
13017
|
+
"aria-label": mergedLabels.incrementQuantityAriaLabel,
|
|
13018
|
+
size: "small",
|
|
13019
|
+
onClick: () => {
|
|
13020
|
+
const currentVal = getValues(
|
|
13021
|
+
`owners.${index}.cargo.${cargoIndex}.quantity`
|
|
13022
|
+
) || 0;
|
|
13023
|
+
const currentQty = Number(currentVal);
|
|
13024
|
+
const newVal = currentQty + 1;
|
|
12921
13025
|
setValue(
|
|
12922
13026
|
`owners.${index}.cargo.${cargoIndex}.quantity`,
|
|
12923
13027
|
newVal
|
|
@@ -12927,137 +13031,69 @@ var CardVehicleOwnerForm = ({
|
|
|
12927
13031
|
cargo.id,
|
|
12928
13032
|
newVal
|
|
12929
13033
|
);
|
|
13034
|
+
},
|
|
13035
|
+
style: {
|
|
13036
|
+
minWidth: "32px",
|
|
13037
|
+
padding: "0"
|
|
12930
13038
|
}
|
|
12931
|
-
},
|
|
12932
|
-
style: {
|
|
12933
|
-
minWidth: "32px",
|
|
12934
|
-
padding: "0"
|
|
12935
|
-
}
|
|
12936
|
-
}
|
|
12937
|
-
),
|
|
12938
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "40px" }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12939
|
-
reactHookForm.Controller,
|
|
12940
|
-
{
|
|
12941
|
-
name: `owners.${index}.cargo.${cargoIndex}.quantity`,
|
|
12942
|
-
control,
|
|
12943
|
-
disabled,
|
|
12944
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
12945
|
-
"input",
|
|
12946
|
-
{
|
|
12947
|
-
...field,
|
|
12948
|
-
min: 1,
|
|
12949
|
-
type: "number",
|
|
12950
|
-
style: {
|
|
12951
|
-
border: "none",
|
|
12952
|
-
width: "100%",
|
|
12953
|
-
textAlign: "center",
|
|
12954
|
-
outline: "none",
|
|
12955
|
-
backgroundColor: "transparent",
|
|
12956
|
-
color: reactComponents.tokens.colorNeutralForeground1,
|
|
12957
|
-
fontSize: reactComponents.tokens.fontSizeBase400,
|
|
12958
|
-
fontFamily: reactComponents.tokens.fontFamilyBase
|
|
12959
|
-
},
|
|
12960
|
-
onWheel: (e) => e.target.blur(),
|
|
12961
|
-
onChange: (e) => {
|
|
12962
|
-
const newVal = Number(e.target.value);
|
|
12963
|
-
field.onChange(e);
|
|
12964
|
-
onUpdateCargoQuantity(
|
|
12965
|
-
owner.id,
|
|
12966
|
-
cargo.id,
|
|
12967
|
-
newVal
|
|
12968
|
-
);
|
|
12969
|
-
}
|
|
12970
|
-
}
|
|
12971
|
-
)
|
|
12972
|
-
}
|
|
12973
|
-
) }),
|
|
12974
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12975
|
-
reactComponents.Button,
|
|
12976
|
-
{
|
|
12977
|
-
appearance: "transparent",
|
|
12978
|
-
disabled,
|
|
12979
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12980
|
-
react.Icon,
|
|
12981
|
-
{
|
|
12982
|
-
icon: "fluent:add-circle-24-regular",
|
|
12983
|
-
style: {
|
|
12984
|
-
fontSize: "24px",
|
|
12985
|
-
color: reactComponents.tokens.colorBrandStroke1
|
|
12986
|
-
}
|
|
12987
|
-
}
|
|
12988
|
-
),
|
|
12989
|
-
"aria-label": mergedLabels.incrementQuantityAriaLabel,
|
|
12990
|
-
size: "small",
|
|
12991
|
-
onClick: () => {
|
|
12992
|
-
const currentVal = getValues(
|
|
12993
|
-
`owners.${index}.cargo.${cargoIndex}.quantity`
|
|
12994
|
-
) || 0;
|
|
12995
|
-
const currentQty = Number(currentVal);
|
|
12996
|
-
const newVal = currentQty + 1;
|
|
12997
|
-
setValue(
|
|
12998
|
-
`owners.${index}.cargo.${cargoIndex}.quantity`,
|
|
12999
|
-
newVal
|
|
13000
|
-
);
|
|
13001
|
-
onUpdateCargoQuantity(
|
|
13002
|
-
owner.id,
|
|
13003
|
-
cargo.id,
|
|
13004
|
-
newVal
|
|
13005
|
-
);
|
|
13006
|
-
},
|
|
13007
|
-
style: {
|
|
13008
|
-
minWidth: "32px",
|
|
13009
|
-
padding: "0"
|
|
13010
13039
|
}
|
|
13011
|
-
|
|
13012
|
-
|
|
13013
|
-
|
|
13014
|
-
|
|
13015
|
-
|
|
13016
|
-
|
|
13017
|
-
|
|
13018
|
-
|
|
13019
|
-
|
|
13020
|
-
|
|
13021
|
-
|
|
13022
|
-
|
|
13023
|
-
|
|
13024
|
-
|
|
13025
|
-
|
|
13026
|
-
|
|
13027
|
-
|
|
13028
|
-
|
|
13029
|
-
|
|
13030
|
-
|
|
13031
|
-
|
|
13032
|
-
|
|
13033
|
-
|
|
13034
|
-
}
|
|
13035
|
-
|
|
13036
|
-
|
|
13037
|
-
|
|
13038
|
-
}
|
|
13039
|
-
)
|
|
13040
|
-
] });
|
|
13041
|
-
})(),
|
|
13042
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { md: 3, children: [
|
|
13043
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.label, children: mergedLabels.priceLabel }),
|
|
13044
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body2, { style: { marginTop: "0.5rem" }, children: (() => {
|
|
13045
|
-
return new Intl.NumberFormat(
|
|
13046
|
-
language === "id" ? "id-ID" : "en-US",
|
|
13047
|
-
{
|
|
13048
|
-
style: "currency",
|
|
13049
|
-
currency: language === "id" ? "IDR" : "USD",
|
|
13050
|
-
minimumFractionDigits: 0
|
|
13051
|
-
}
|
|
13052
|
-
).format(
|
|
13053
|
-
Number(
|
|
13054
|
-
getValues(
|
|
13055
|
-
`owners.${index}.cargo.${cargoIndex}.price`
|
|
13056
|
-
) || 1234567890
|
|
13040
|
+
)
|
|
13041
|
+
]
|
|
13042
|
+
}
|
|
13043
|
+
),
|
|
13044
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13045
|
+
"div",
|
|
13046
|
+
{
|
|
13047
|
+
style: {
|
|
13048
|
+
flex: 1,
|
|
13049
|
+
textAlign: "left",
|
|
13050
|
+
color: reactComponents.tokens.colorNeutralForeground1,
|
|
13051
|
+
fontSize: reactComponents.tokens.fontSizeBase300,
|
|
13052
|
+
paddingRight: "8px"
|
|
13053
|
+
},
|
|
13054
|
+
children: (() => {
|
|
13055
|
+
const type2 = watch(
|
|
13056
|
+
`owners.${index}.cargo.${cargoIndex}.cargoType`
|
|
13057
|
+
);
|
|
13058
|
+
const selectedLoadType2 = loadTypes.find(
|
|
13059
|
+
(loadType) => loadType.id === type2
|
|
13060
|
+
);
|
|
13061
|
+
return selectedLoadType2?.unit?.name || "----87----";
|
|
13062
|
+
})()
|
|
13063
|
+
}
|
|
13064
|
+
)
|
|
13065
|
+
]
|
|
13066
|
+
}
|
|
13057
13067
|
)
|
|
13058
|
-
)
|
|
13059
|
-
|
|
13060
|
-
|
|
13068
|
+
] }),
|
|
13069
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { md: 3, children: [
|
|
13070
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 0.5 } }),
|
|
13071
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.label, children: mergedLabels.priceLabel }),
|
|
13072
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13073
|
+
reactComponents.Body2,
|
|
13074
|
+
{
|
|
13075
|
+
style: { marginTop: "0.5rem" },
|
|
13076
|
+
children: (() => {
|
|
13077
|
+
return new Intl.NumberFormat(
|
|
13078
|
+
"id-ID",
|
|
13079
|
+
{
|
|
13080
|
+
style: "currency",
|
|
13081
|
+
currency: "IDR",
|
|
13082
|
+
minimumFractionDigits: 0
|
|
13083
|
+
}
|
|
13084
|
+
).format(
|
|
13085
|
+
Number(
|
|
13086
|
+
getValues(
|
|
13087
|
+
`owners.${index}.cargo.${cargoIndex}.quantity`
|
|
13088
|
+
) || 0
|
|
13089
|
+
) * (selectedLoadType?.price || 0)
|
|
13090
|
+
);
|
|
13091
|
+
})()
|
|
13092
|
+
}
|
|
13093
|
+
)
|
|
13094
|
+
] })
|
|
13095
|
+
] });
|
|
13096
|
+
})()
|
|
13061
13097
|
] }),
|
|
13062
13098
|
/* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { children: [
|
|
13063
13099
|
/* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { md: 6, children: [
|