Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pocesar/react-native-stager
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: movilizame/react-native-stager
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 8 commits
  • 7 files changed
  • 2 contributors

Commits on Jul 19, 2019

  1. removed keyboardavoidingview

    IagoQ authored Jul 19, 2019

    Verified

    This commit was signed with the committer’s verified signature.
    Atul9 Atul Bhosale
    Copy the full SHA
    a110c2d View commit details
  2. Include build

    p4bl1t0 committed Jul 19, 2019

    Verified

    This commit was signed with the committer’s verified signature.
    Atul9 Atul Bhosale
    Copy the full SHA
    b73204f View commit details

Commits on Jul 24, 2019

  1. remove scroll view from state

    p4bl1t0 committed Jul 24, 2019
    Copy the full SHA
    f3bb11f View commit details
  2. version bump 1.0.1

    p4bl1t0 committed Jul 24, 2019
    Copy the full SHA
    ee3476f View commit details
  3. fix version 1.0.2

    p4bl1t0 committed Jul 24, 2019
    Copy the full SHA
    319a98c View commit details
  4. fix version 1.0.2

    p4bl1t0 committed Jul 24, 2019
    Copy the full SHA
    07ac7b5 View commit details
  5. bump version 1.0.3

    p4bl1t0 committed Jul 24, 2019
    Copy the full SHA
    131cd96 View commit details
  6. bump version 1.0.4

    p4bl1t0 committed Jul 24, 2019
    Copy the full SHA
    1fa116e View commit details
Showing with 448 additions and 15 deletions.
  1. +0 −1 .gitignore
  2. +99 −0 lib/index.d.ts
  3. +330 −0 lib/index.js
  4. +1 −0 lib/index.js.map
  5. +5 −2 package.json
  6. +10 −10 src/index.tsx
  7. +3 −2 tsconfig.json
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
lib
coverage
__tests__/*.js*
99 changes: 99 additions & 0 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
import React from 'react';
import { ViewStyle } from 'react-native';
export interface StagePassContext {
context: Stager;
}
export interface StagePassProps extends StagePassContext {
instance: Stage;
}
export interface StagePassPropsChild<Props> {
children: (props: Props) => React.ReactNode;
}
export interface StageProps extends StagePassPropsChild<StagePassProps> {
key: string;
maxHeight?: () => number;
continue?: () => boolean;
loaded?: (cb: () => void) => void;
noPrevious?: boolean;
}
export interface Context {
fn: Stager;
}
export interface Styles {
stageContainer: ViewStyle;
scrollview: ViewStyle;
progressView: ViewStyle;
progressFlex: ViewStyle;
progressOutterFlex: ViewStyle;
progressIndicator: ViewStyle;
progressPad: ViewStyle;
scrollviewContainer: ViewStyle;
prevBtn: ViewStyle;
prevNext: ViewStyle;
prevNextFlex: ViewStyle;
}
export declare const styles: Styles;
export declare class Stage extends React.Component<StageProps, never> {
static contextTypes: Context;
constructor(props: any, context: any);
context: Context;
refresh: () => Promise<void>;
componentDidMount(): Promise<void>;
shouldComponentUpdate(nextProps: StageProps, nextState: never, nextContext: Context): boolean;
passProps: StagePassProps;
render(): JSX.Element;
}
export interface StageConfig extends StagePassPropsChild<StagePassContext> {
}
export declare class StageButtons extends React.Component<StageConfig> {
static contextTypes: Context;
context: Context;
passProps: StagePassContext;
render(): any;
}
export declare class StageProgress extends React.Component<StageConfig> {
static contextTypes: Context;
context: Context;
passProps: StagePassContext;
render(): any;
}
export interface StagerState {
currentStage: string | null;
stage: any;
hasProgress: StageProgress | null;
hasButtons: StageButtons | null;
stages: string[];
stageState: {
noPrevious: boolean;
canContinue: boolean | null;
};
time: number;
}
export interface StagerProps {
onChange?: (stage: string, direction: number) => void;
}
export declare class Stager extends React.Component<StagerProps, StagerState> {
static childContextTypes: Context;
constructor(props: any, context: any);
next: () => Promise<void>;
prev: () => Promise<void>;
setStage: (stage: string, direction: number) => Promise<void>;
reset: () => Promise<void>;
shouldComponentUpdate(nextProps: StagerProps, nextState: StagerState): boolean;
canContinue: (state: boolean) => Promise<void>;
noPrevious: (state: boolean) => Promise<void>;
getChildContext(): Context;
notify: () => Promise<void>;
has: (type: "next" | "prev") => boolean;
getStage: (stage: string) => ({} | null | undefined)[];
nextStage: () => string | null;
currentStage: () => string | null;
prevStage: () => string | null;
gatherButtonsAndProgress: (cb?: (() => void) | undefined) => void;
gatherStages: (cb?: (() => void) | undefined) => void;
componentDidMount(): void;
progress: () => JSX.Element;
buttons: () => JSX.Element;
render(): JSX.Element;
}
export default Stager;
Loading