Newest EFB
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tfdidesign-md11-load-manager",
|
||||
"version": "0.1.182",
|
||||
"version": "0.1.186",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
|
||||
@@ -4,6 +4,7 @@ import Keyboard from '../keyboard/Keyboard';
|
||||
|
||||
export default function Input(props: {
|
||||
type?: string;
|
||||
topKeyboard?: boolean;
|
||||
value: any;
|
||||
min?: number;
|
||||
max?: number;
|
||||
@@ -66,6 +67,7 @@ export default function Input(props: {
|
||||
{showKeyboard && (
|
||||
<Keyboard
|
||||
ref={keyboardRef}
|
||||
top={props.topKeyboard}
|
||||
value={String(props.value)}
|
||||
blurRef={blurRef}
|
||||
onInput={(value) => props.onChange && props.onChange(value)}
|
||||
|
||||
@@ -23,11 +23,12 @@ const Keyboard = forwardRef<
|
||||
HTMLDivElement,
|
||||
{
|
||||
value: string;
|
||||
blurRef: RefObject<boolean>
|
||||
blurRef: RefObject<boolean>;
|
||||
top?: boolean;
|
||||
onInput: (value: string) => void;
|
||||
onClose: () => void;
|
||||
}
|
||||
>(({ value, blurRef, onInput, onClose }, ref) => {
|
||||
>(({ value, top, blurRef, onInput, onClose }, ref) => {
|
||||
const [shift, setShift] = useState(false);
|
||||
|
||||
const layout = shift ? defaultLayout.shift : defaultLayout.default;
|
||||
@@ -63,7 +64,7 @@ const Keyboard = forwardRef<
|
||||
return createPortal(
|
||||
<div
|
||||
ref={ref}
|
||||
className="absolute bottom-0 left-0 z-50 box-border w-full touch-manipulation select-none overflow-hidden bg-zinc-800 p-2 text-white"
|
||||
className={`absolute ${top ? 'top-0' : 'bottom-0'} left-0 z-50 box-border w-full touch-manipulation select-none overflow-hidden bg-zinc-800 p-2 text-white`}
|
||||
>
|
||||
{layout.map((row, rowIndex) => (
|
||||
<div key={`row-${rowIndex}`} className="mb-1 flex w-full justify-center gap-1">
|
||||
|
||||
@@ -3,6 +3,7 @@ import { LoadingState } from '../../types/general';
|
||||
import { WASMDataPax } from '../../types/WASMData';
|
||||
import { CoherentCallGSXReset, CoherentCallOptionsSet } from '../../utils/utils';
|
||||
import ToggleComponentKH from '../toggleComponent/ToggleComponent';
|
||||
import Input from '../input/Input';
|
||||
|
||||
interface OptionsPaxProps {
|
||||
WASMData: WASMDataPax;
|
||||
@@ -56,12 +57,12 @@ const OptionsPax: FC<OptionsPaxProps> = ({ WASMData, loadingState, gsxActive })
|
||||
<div className="relative flex w-full items-center justify-between rounded-t-md bg-zinc-600 p-2 px-4">
|
||||
<div className="flex w-full items-center justify-between text-xs">
|
||||
<label>Pax Weight ({WASMData.userData.isImperial ? 'lbs' : 'kg'})</label>
|
||||
<input
|
||||
<Input
|
||||
type="text"
|
||||
placeholder=""
|
||||
className="w-1/2 rounded-lg border border-white bg-zinc-700 px-3 py-2 text-right focus:border-blue-600 focus:ring-blue-600"
|
||||
value={paxWeight}
|
||||
onChange={(e) => handleInput(e.target.value, Number.MAX_VALUE, setPaxWeight)}
|
||||
onChange={(value) => handleInput(value, Number.MAX_VALUE, setPaxWeight)}
|
||||
disabled={loadingState !== 'preview' || gsxActive}
|
||||
/>
|
||||
</div>
|
||||
@@ -69,12 +70,12 @@ const OptionsPax: FC<OptionsPaxProps> = ({ WASMData, loadingState, gsxActive })
|
||||
<div className="relative flex w-full items-center justify-between rounded-b-md bg-zinc-700 p-2 px-4">
|
||||
<div className="flex w-full items-center justify-between text-xs">
|
||||
<label>Bag Weight ({WASMData.userData.isImperial ? 'lbs' : 'kg'})</label>
|
||||
<input
|
||||
<Input
|
||||
type="text"
|
||||
placeholder=""
|
||||
className="w-1/2 rounded-lg border border-white bg-zinc-700 px-3 py-2 text-right focus:border-blue-600 focus:ring-blue-600"
|
||||
value={bagWeight}
|
||||
onChange={(e) => handleInput(e.target.value, Number.MAX_VALUE, setBagWeight)}
|
||||
onChange={(value) => handleInput(value, Number.MAX_VALUE, setBagWeight)}
|
||||
disabled={loadingState !== 'preview' || gsxActive}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -160,6 +160,7 @@ const StationEntryF: FC<StationEntryProps> = ({ WASMData, loadingState, gsxActiv
|
||||
<label>Forward Cargo ({WASMData.userData.isImperial ? 'lbs' : 'kg'})</label>
|
||||
<Input
|
||||
type="text"
|
||||
topKeyboard
|
||||
placeholder=""
|
||||
className="w-1/2 rounded-lg border border-white bg-zinc-700 px-3 py-2 text-right focus:border-blue-600 focus:ring-blue-600"
|
||||
value={lowerForward}
|
||||
@@ -173,6 +174,7 @@ const StationEntryF: FC<StationEntryProps> = ({ WASMData, loadingState, gsxActiv
|
||||
<label>Aft Cargo ({WASMData.userData.isImperial ? 'lbs' : 'kg'})</label>
|
||||
<Input
|
||||
type="text"
|
||||
topKeyboard
|
||||
placeholder=""
|
||||
className="w-1/2 rounded-lg border border-white bg-zinc-700 px-3 py-2 text-right focus:border-blue-600 focus:ring-blue-600"
|
||||
value={lowerRear}
|
||||
|
||||
@@ -160,6 +160,7 @@ const StationEntryPax: FC<StationEntryProps> = ({ WASMData, loadingState, gsxAct
|
||||
<label>Forward Cargo ({WASMData.userData.isImperial ? 'lbs' : 'kg'})</label>
|
||||
<Input
|
||||
type="text"
|
||||
topKeyboard
|
||||
placeholder=""
|
||||
className="w-1/2 rounded-lg border border-white bg-zinc-700 px-3 py-2 text-right focus:border-blue-600 focus:ring-blue-600"
|
||||
value={forwardCargo}
|
||||
@@ -173,6 +174,7 @@ const StationEntryPax: FC<StationEntryProps> = ({ WASMData, loadingState, gsxAct
|
||||
<label>Aft Cargo ({WASMData.userData.isImperial ? 'lbs' : 'kg'})</label>
|
||||
<Input
|
||||
type="text"
|
||||
topKeyboard
|
||||
placeholder=""
|
||||
className="w-1/2 rounded-lg border border-white bg-zinc-700 px-3 py-2 text-right focus:border-blue-600 focus:ring-blue-600"
|
||||
value={rearCargo}
|
||||
|
||||
Reference in New Issue
Block a user