@cuemath/leap 2.9.5-j13 → 2.9.5-j14

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.
@@ -1 +1 @@
1
- {"version":3,"file":"helper.js","sources":["../../../../src/features/ui/lottie-animation/helper.ts"],"sourcesContent":["import type { AnimationItem } from 'lottie-web';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst lottieCache = new Map<string, any>();\n\nexport const fetchLottie = async (lottieSrc: string): Promise<AnimationItem | null> => {\n if (lottieCache.has(lottieSrc)) return lottieCache.get(lottieSrc);\n\n let lottieJson: AnimationItem | null = null;\n\n try {\n lottieJson = await fetch(lottieSrc)\n .then(res => res.json())\n .catch(() => null);\n if (lottieJson) {\n lottieCache.set(lottieSrc, lottieJson);\n }\n } catch (error) {\n /* eslint-disable no-console */\n console.log('Error while fetching the lottie: ', error);\n }\n\n return lottieJson;\n};\n"],"names":["lottieCache","fetchLottie","lottieSrc","lottieJson","res","error"],"mappings":"AAGA,MAAMA,wBAAkB,OAEXC,IAAc,OAAOC,MAAqD;AACrF,MAAIF,EAAY,IAAIE,CAAS,EAAU,QAAAF,EAAY,IAAIE,CAAS;AAEhE,MAAIC,IAAmC;AAEnC,MAAA;AACF,IAAAA,IAAa,MAAM,MAAMD,CAAS,EAC/B,KAAK,CAAAE,MAAOA,EAAI,KAAA,CAAM,EACtB,MAAM,MAAM,IAAI,GACfD,KACUH,EAAA,IAAIE,GAAWC,CAAU;AAAA,WAEhCE,GAAO;AAEN,YAAA,IAAI,qCAAqCA,CAAK;AAAA,EACxD;AAEO,SAAAF;AACT;"}
1
+ {"version":3,"file":"helper.js","sources":["../../../../src/features/ui/lottie-animation/helper.ts"],"sourcesContent":["import type { AnimationItem } from 'lottie-web';\n\nexport const fetchLottie = async (lottieSrc: string): Promise<AnimationItem | null> => {\n let lottieJson: AnimationItem | null = null;\n\n try {\n lottieJson = await fetch(lottieSrc)\n .then(res => res.json())\n .catch(() => null);\n } catch (error) {\n /* eslint-disable no-console */\n console.log('Error while fetching the lottie: ', error);\n }\n\n return lottieJson;\n};\n"],"names":["fetchLottie","lottieSrc","lottieJson","res","error"],"mappings":"AAEa,MAAAA,IAAc,OAAOC,MAAqD;AACrF,MAAIC,IAAmC;AAEnC,MAAA;AACF,IAAAA,IAAa,MAAM,MAAMD,CAAS,EAC/B,KAAK,CAAAE,MAAOA,EAAI,KAAA,CAAM,EACtB,MAAM,MAAM,IAAI;AAAA,WACZC,GAAO;AAEN,YAAA,IAAI,qCAAqCA,CAAK;AAAA,EACxD;AAEO,SAAAF;AACT;"}
package/dist/index.d.ts CHANGED
@@ -1000,14 +1000,13 @@ declare interface IconProps_2 extends React_2.SVGProps<SVGSVGElement> {
1000
1000
  }
1001
1001
 
1002
1002
  declare interface IContextMenuProps {
1003
- targetElement: React.ReactElement<{
1004
- menuVisible?: boolean;
1005
- }>;
1003
+ targetElement: JSX.Element;
1006
1004
  menuElement: JSX.Element;
1007
1005
  menuOffset?: number;
1008
1006
  menuZIndex?: number;
1009
1007
  startLeft?: boolean;
1010
1008
  placeTop?: boolean;
1009
+ onMenuVisibilityChange?: (visible: boolean) => void;
1011
1010
  }
1012
1011
 
1013
1012
  declare interface ICountdownTimer {
@@ -1109,8 +1108,6 @@ declare interface IDatePickerInputProps extends Omit<ICustomInputProps, 'value'
1109
1108
  onChange: (date: Date | null) => void;
1110
1109
  }
1111
1110
 
1112
- export declare const IdentifierForm: ({ onSubmit, onChange, formData, errors, isSubmitDisabled, isProcessing, isValid, }: IFormProps) => JSX_2.Element;
1113
-
1114
1111
  declare interface IDesmosCalculatorProps {
1115
1112
  onClose: () => void;
1116
1113
  height?: string | number;
@@ -1200,16 +1197,6 @@ declare interface IFile {
1200
1197
  url: string;
1201
1198
  }
1202
1199
 
1203
- declare interface IFormProps {
1204
- onSubmit: (e?: FormEvent<HTMLFormElement>) => void;
1205
- onChange: (key: string, value: string) => void;
1206
- formData: Record<string, string>;
1207
- errors: Record<string, string>;
1208
- isProcessing: boolean;
1209
- isSubmitDisabled: boolean;
1210
- isValid?: boolean;
1211
- }
1212
-
1213
1200
  declare interface IGame extends IBaseProject {
1214
1201
  played: boolean;
1215
1202
  }
@@ -2501,6 +2488,16 @@ declare interface IReferenceSheetProps {
2501
2488
  };
2502
2489
  }
2503
2490
 
2491
+ declare interface IResetPasswordFormProps {
2492
+ onSubmit: (e: FormEvent<HTMLFormElement>) => void;
2493
+ onChange: (key: string, value: string) => void;
2494
+ formData: Record<string, string>;
2495
+ errors: Record<string, string>;
2496
+ isProcessing: boolean;
2497
+ isSubmitDisabled: boolean;
2498
+ isValid?: boolean;
2499
+ }
2500
+
2504
2501
  export declare interface IResourceItemData {
2505
2502
  boards: string[];
2506
2503
  created_on: string;
@@ -2744,6 +2741,18 @@ export declare interface ISignUpProps {
2744
2741
  onSignupStepsComplete: (data: IUpdateUserPayloadDal | ICreateUserResponseDal | null) => void;
2745
2742
  }
2746
2743
 
2744
+ declare interface ISingleFieldFormProps {
2745
+ onSubmit: (e?: FormEvent<HTMLFormElement>) => void;
2746
+ onChange: (key: string, value: string) => void;
2747
+ value: string;
2748
+ error: string;
2749
+ isProcessing: boolean;
2750
+ isSubmitDisabled?: boolean;
2751
+ isValid?: boolean;
2752
+ field?: string;
2753
+ label?: string;
2754
+ }
2755
+
2747
2756
  declare interface ISocialAccountNotFoundProps {
2748
2757
  onRetryLogin: () => void;
2749
2758
  onGoToSignup: () => void;
@@ -3893,7 +3902,7 @@ declare interface NumRangeInputProps {
3893
3902
  endPlaceholder?: string;
3894
3903
  }
3895
3904
 
3896
- export declare const OTPForm: ({ onSubmit, onChange, formData, errors, isSubmitDisabled, isProcessing, isValid, }: IFormProps) => JSX_2.Element;
3905
+ export declare const OTPForm: ({ onSubmit, onChange, value, error, isProcessing, isValid, }: ISingleFieldFormProps) => JSX_2.Element;
3897
3906
 
3898
3907
  export declare const OTPInput: FC<IOTPInputProps>;
3899
3908
 
@@ -4033,7 +4042,7 @@ export declare const RemotePeerPointer: MemoExoticComponent<({ containerRef, onP
4033
4042
 
4034
4043
  export declare const ResendOTP: React.FC<IOTPResendProps>;
4035
4044
 
4036
- export declare const ResetPasswordForm: ({ onSubmit, onChange, formData, errors, isSubmitDisabled, isProcessing, isValid, }: IFormProps) => JSX_2.Element;
4045
+ export declare const ResetPasswordForm: ({ onSubmit, onChange, formData, errors, isSubmitDisabled, isProcessing, isValid, }: IResetPasswordFormProps) => JSX_2.Element;
4037
4046
 
4038
4047
  export declare const REWARDS_LIST: string[];
4039
4048
 
@@ -5335,7 +5344,7 @@ export declare const User2Icon: React.FC<React.SVGProps<SVGSVGElement>>;
5335
5344
 
5336
5345
  export declare const UserIcon: React.FC<React.SVGProps<SVGSVGElement>>;
5337
5346
 
5338
- export declare const UsernameForm: ({ onSubmit, onChange, formData, errors, isSubmitDisabled, isProcessing, isValid, }: IFormProps) => JSX_2.Element;
5347
+ export declare const UserIdentifierForm: ({ onSubmit, onChange, value, error, isSubmitDisabled, isProcessing, isValid, label, field, }: ISingleFieldFormProps) => JSX_2.Element;
5339
5348
 
5340
5349
  export declare const UserTypeSelector: NamedExoticComponent<IUserTypeSelectorProps>;
5341
5350