react-native-app-onboard 0.1.8 → 0.2.0
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/README.md +89 -7
- package/lib/commonjs/components/CustomPages.js +31 -54
- package/lib/commonjs/components/CustomPages.js.map +1 -1
- package/lib/commonjs/components/OnboardingPages.js +59 -74
- package/lib/commonjs/components/OnboardingPages.js.map +1 -1
- package/lib/commonjs/components/Page.js +8 -3
- package/lib/commonjs/components/Page.js.map +1 -1
- package/lib/commonjs/components/Pagination.js +75 -13
- package/lib/commonjs/components/Pagination.js.map +1 -1
- package/lib/commonjs/components/Swiper.js +58 -85
- package/lib/commonjs/components/Swiper.js.map +1 -1
- package/lib/commonjs/components/button.js +3 -1
- package/lib/commonjs/components/button.js.map +1 -1
- package/lib/commonjs/context/OnboardingContext.js +101 -21
- package/lib/commonjs/context/OnboardingContext.js.map +1 -1
- package/lib/commonjs/hooks/useOnboarding.js +1 -1
- package/lib/commonjs/hooks/useOnboarding.js.map +1 -1
- package/lib/commonjs/index.js +33 -2
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/utils/persistence.js +51 -0
- package/lib/commonjs/utils/persistence.js.map +1 -0
- package/lib/module/components/CustomPages.js +31 -54
- package/lib/module/components/CustomPages.js.map +1 -1
- package/lib/module/components/OnboardingPages.js +60 -75
- package/lib/module/components/OnboardingPages.js.map +1 -1
- package/lib/module/components/Page.js +8 -3
- package/lib/module/components/Page.js.map +1 -1
- package/lib/module/components/Pagination.js +76 -14
- package/lib/module/components/Pagination.js.map +1 -1
- package/lib/module/components/Swiper.js +59 -86
- package/lib/module/components/Swiper.js.map +1 -1
- package/lib/module/components/button.js +3 -1
- package/lib/module/components/button.js.map +1 -1
- package/lib/module/context/OnboardingContext.js +102 -22
- package/lib/module/context/OnboardingContext.js.map +1 -1
- package/lib/module/hooks/useOnboarding.js +1 -1
- package/lib/module/hooks/useOnboarding.js.map +1 -1
- package/lib/module/index.js +8 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/persistence.js +42 -0
- package/lib/module/utils/persistence.js.map +1 -0
- package/lib/typescript/src/components/CustomPages.d.ts +6 -2
- package/lib/typescript/src/components/CustomPages.d.ts.map +1 -1
- package/lib/typescript/src/components/OnboardingPages.d.ts +6 -2
- package/lib/typescript/src/components/OnboardingPages.d.ts.map +1 -1
- package/lib/typescript/src/components/Page.d.ts +2 -0
- package/lib/typescript/src/components/Page.d.ts.map +1 -1
- package/lib/typescript/src/components/Pagination.d.ts +9 -0
- package/lib/typescript/src/components/Pagination.d.ts.map +1 -1
- package/lib/typescript/src/components/Swiper.d.ts.map +1 -1
- package/lib/typescript/src/components/button.d.ts.map +1 -1
- package/lib/typescript/src/context/OnboardingContext.d.ts +9 -0
- package/lib/typescript/src/context/OnboardingContext.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useOnboarding.d.ts +3 -0
- package/lib/typescript/src/hooks/useOnboarding.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +4 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types/index.d.ts +13 -0
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/persistence.d.ts +31 -0
- package/lib/typescript/src/utils/persistence.d.ts.map +1 -0
- package/package.json +25 -4
- package/src/components/CustomPages.tsx +63 -69
- package/src/components/OnboardingPages.tsx +79 -82
- package/src/components/Page.tsx +8 -2
- package/src/components/Pagination.tsx +121 -29
- package/src/components/Swiper.tsx +65 -87
- package/src/components/button.tsx +6 -1
- package/src/context/OnboardingContext.tsx +145 -26
- package/src/hooks/useOnboarding.tsx +1 -3
- package/src/index.tsx +16 -1
- package/src/types/index.ts +13 -0
- package/src/utils/persistence.ts +58 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","e","__esModule","default","OnboardingContext","exports","React","createContext","undefined","OnboardingProvider","children","width","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","e","__esModule","default","OnboardingContext","exports","React","createContext","undefined","OnboardingProvider","children","width","widthProp","numberOfScreens","scrollEnabled","onPageChange","scrollAnimationDuration","autoPlay","autoPlayInterval","loop","Dimensions","get","getProgress","page","Math","round","currentPage","setPage","useState","progress","setProgress","isDone","setIsDone","enableScroll","setEnableScroll","flatListRef","useRef","setFlatListRef","useCallback","node","current","currentPageRef","isAutoPlaying","setIsAutoPlaying","useEffect","scrollAnim","useMemo","Animated","Value","id","addListener","value","_flatListRef$current","scrollToOffset","offset","animated","removeListener","animateToOffset","stopAnimation","setValue","timing","toValue","duration","useNativeDriver","start","setCurrentPage","index","AccessibilityInfo","announceForAccessibility","nextPage","previousPage","scrollTo","pauseAutoPlay","resumeAutoPlay","timer","setTimeout","clearTimeout","contextValue","createElement","Provider"],"sourceRoot":"../../../src","sources":["context/OnboardingContext.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAKsB,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAwCf,MAAMG,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,gBAAGE,cAAK,CAACC,aAAa,CAElDC,SAAS,CAAC;AAEL,MAAMC,kBAAqD,GAAGA,CAAC;EACpEC,QAAQ;EACRC,KAAK,EAAEC,SAAS;EAChBC,eAAe;EACfC,aAAa;EACbC,YAAY;EACZC,uBAAuB;EACvBC,QAAQ,GAAG,KAAK;EAChBC,gBAAgB,GAAG,IAAI;EACvBC,IAAI,GAAG;AACT,CAAC,KAAK;EACJ,MAAMR,KAAK,GAAGC,SAAS,IAAIQ,uBAAU,CAACC,GAAG,CAAC,QAAQ,CAAC,CAACV,KAAK;EACzD,MAAMW,WAAW,GAAIC,IAAY,IAAK;IACpC,OAAOC,IAAI,CAACC,KAA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WAAW;IACXE,cAAc;IACdkC,QAAQ;IACR1C,QAAQ;IACRE,MAAM;IACNyC,aAAa;IACbC;EACF,CAAC;EAED,oBACE5E,MAAA,CAAAM,OAAA,CAAA2E,aAAA,CAAC1E,iBAAiB,CAAC2E,QAAQ;IAAC5B,KAAK,EAAE0B;EAAa,GAC7CnE,QACyB,CAAC;AAEjC,CAAC;AAACL,OAAA,CAAAI,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -10,7 +10,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
10
10
|
const useOnboarding = () => {
|
|
11
11
|
const context = _react.default.useContext(_OnboardingContext.OnboardingContext);
|
|
12
12
|
if (!context) {
|
|
13
|
-
throw new Error('
|
|
13
|
+
throw new Error('useOnboarding must be used within an OnboardingProvider');
|
|
14
14
|
}
|
|
15
15
|
return context;
|
|
16
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_OnboardingContext","e","__esModule","default","useOnboarding","context","React","useContext","OnboardingContext","Error","exports"],"sourceRoot":"../../../src","sources":["hooks/useOnboarding.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AAAiE,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE1D,MAAMG,aAAa,GAAGA,CAAA,KAAM;EACjC,MAAMC,OAAO,GAAGC,cAAK,CAACC,UAAU,CAACC,oCAAiB,CAAC;EACnD,IAAI,CAACH,OAAO,EAAE;IACZ,MAAM,IAAII,KAAK,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_OnboardingContext","e","__esModule","default","useOnboarding","context","React","useContext","OnboardingContext","Error","exports"],"sourceRoot":"../../../src","sources":["hooks/useOnboarding.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AAAiE,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE1D,MAAMG,aAAa,GAAGA,CAAA,KAAM;EACjC,MAAMC,OAAO,GAAGC,cAAK,CAACC,UAAU,CAACC,oCAAiB,CAAC;EACnD,IAAI,CAACH,OAAO,EAAE;IACZ,MAAM,IAAII,KAAK,CAAC,yDAAyD,CAAC;EAC5E;EACA,OAAOJ,OAAO;AAChB,CAAC;AAACK,OAAA,CAAAN,aAAA,GAAAA,aAAA","ignoreList":[]}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -4,6 +4,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Onboarding = Onboarding;
|
|
7
|
+
Object.defineProperty(exports, "createOnboardingStorage", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _persistence.createOnboardingStorage;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "hasCompletedOnboarding", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () {
|
|
16
|
+
return _persistence.hasCompletedOnboarding;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "markOnboardingComplete", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () {
|
|
22
|
+
return _persistence.markOnboardingComplete;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(exports, "resetOnboarding", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () {
|
|
28
|
+
return _persistence.resetOnboarding;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
7
31
|
Object.defineProperty(exports, "useOnboarding", {
|
|
8
32
|
enumerable: true,
|
|
9
33
|
get: function () {
|
|
@@ -11,16 +35,23 @@ Object.defineProperty(exports, "useOnboarding", {
|
|
|
11
35
|
}
|
|
12
36
|
});
|
|
13
37
|
var _react = _interopRequireDefault(require("react"));
|
|
14
|
-
var
|
|
38
|
+
var _components = require("./components");
|
|
15
39
|
var _OnboardingContext = require("./context/OnboardingContext");
|
|
16
40
|
var _useOnboarding = require("./hooks/useOnboarding");
|
|
41
|
+
var _persistence = require("./utils/persistence");
|
|
17
42
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
43
|
function Onboarding(props) {
|
|
19
44
|
var _props$pages;
|
|
20
45
|
const numberOfScreens = _react.default.Children.count(props.children);
|
|
21
46
|
return /*#__PURE__*/_react.default.createElement(_OnboardingContext.OnboardingProvider, {
|
|
47
|
+
width: props.width,
|
|
22
48
|
scrollEnabled: props.scrollEnabled,
|
|
49
|
+
onPageChange: props.onPageChange,
|
|
50
|
+
scrollAnimationDuration: props.scrollAnimationDuration,
|
|
51
|
+
autoPlay: props.autoPlay,
|
|
52
|
+
autoPlayInterval: props.autoPlayInterval,
|
|
53
|
+
loop: props.loop,
|
|
23
54
|
numberOfScreens: numberOfScreens || ((_props$pages = props.pages) === null || _props$pages === void 0 ? void 0 : _props$pages.length) || 0
|
|
24
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
55
|
+
}, /*#__PURE__*/_react.default.createElement(_components.Swiper, props, props.children));
|
|
25
56
|
}
|
|
26
57
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_components","_OnboardingContext","_useOnboarding","_persistence","e","__esModule","default","Onboarding","props","_props$pages","numberOfScreens","React","Children","count","children","createElement","OnboardingProvider","width","scrollEnabled","onPageChange","scrollAnimationDuration","autoPlay","autoPlayInterval","loop","pages","length","Swiper"],"sourceRoot":"../../src","sources":["index.tsx"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
|
+
exports.createOnboardingStorage = createOnboardingStorage;
|
|
7
|
+
exports.hasCompletedOnboarding = hasCompletedOnboarding;
|
|
8
|
+
exports.markOnboardingComplete = markOnboardingComplete;
|
|
9
|
+
exports.resetOnboarding = resetOnboarding;
|
|
10
|
+
/**
|
|
11
|
+
* Minimal AsyncStorage-compatible interface. Any storage that implements these
|
|
12
|
+
* three methods works (e.g. @react-native-async-storage/async-storage,
|
|
13
|
+
* expo-secure-store wrappers, or an in-memory mock in tests). Keeping the
|
|
14
|
+
* dependency injected means this library does not have to ship a storage peer
|
|
15
|
+
* dependency of its own.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const DEFAULT_KEY = '@react-native-app-onboard/completed';
|
|
19
|
+
const COMPLETED_VALUE = 'true';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Returns whether the user has previously completed onboarding stored under
|
|
23
|
+
* `key`. Defaults to a namespaced key so callers usually only pass the storage.
|
|
24
|
+
*/
|
|
25
|
+
async function hasCompletedOnboarding(storage, key = DEFAULT_KEY) {
|
|
26
|
+
const value = await storage.getItem(key);
|
|
27
|
+
return value === COMPLETED_VALUE;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** Marks onboarding as completed so it can be skipped on subsequent launches. */
|
|
31
|
+
async function markOnboardingComplete(storage, key = DEFAULT_KEY) {
|
|
32
|
+
await storage.setItem(key, COMPLETED_VALUE);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** Clears the stored completion flag (useful for "replay onboarding" actions). */
|
|
36
|
+
async function resetOnboarding(storage, key = DEFAULT_KEY) {
|
|
37
|
+
await storage.removeItem(key);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Convenience factory that binds a storage adapter (and optional key) once and
|
|
42
|
+
* returns ready-to-call helpers, so app code doesn't repeat the storage arg.
|
|
43
|
+
*/
|
|
44
|
+
function createOnboardingStorage(storage, key = DEFAULT_KEY) {
|
|
45
|
+
return {
|
|
46
|
+
hasCompleted: () => hasCompletedOnboarding(storage, key),
|
|
47
|
+
markComplete: () => markOnboardingComplete(storage, key),
|
|
48
|
+
reset: () => resetOnboarding(storage, key)
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=persistence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DEFAULT_KEY","COMPLETED_VALUE","hasCompletedOnboarding","storage","key","value","getItem","markOnboardingComplete","setItem","resetOnboarding","removeItem","createOnboardingStorage","hasCompleted","markComplete","reset"],"sourceRoot":"../../../src","sources":["utils/persistence.ts"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,MAAMA,WAAW,GAAG,qCAAqC;AACzD,MAAMC,eAAe,GAAG,MAAM;;AAE9B;AACA;AACA;AACA;AACO,eAAeC,sBAAsBA,CAC1CC,OAAiC,EACjCC,GAAW,GAAGJ,WAAW,EACP;EAClB,MAAMK,KAAK,GAAG,MAAMF,OAAO,CAACG,OAAO,CAACF,GAAG,CAAC;EACxC,OAAOC,KAAK,KAAKJ,eAAe;AAClC;;AAEA;AACO,eAAeM,sBAAsBA,CAC1CJ,OAAiC,EACjCC,GAAW,GAAGJ,WAAW,EACV;EACf,MAAMG,OAAO,CAACK,OAAO,CAACJ,GAAG,EAAEH,eAAe,CAAC;AAC7C;;AAEA;AACO,eAAeQ,eAAeA,CACnCN,OAAiC,EACjCC,GAAW,GAAGJ,WAAW,EACV;EACf,MAAMG,OAAO,CAACO,UAAU,CAACN,GAAG,CAAC;AAC/B;;AAEA;AACA;AACA;AACA;AACO,SAASO,uBAAuBA,CACrCR,OAAiC,EACjCC,GAAW,GAAGJ,WAAW,EACzB;EACA,OAAO;IACLY,YAAY,EAAEA,CAAA,KAAMV,sBAAsB,CAACC,OAAO,EAAEC,GAAG,CAAC;IACxDS,YAAY,EAAEA,CAAA,KAAMN,sBAAsB,CAACJ,OAAO,EAAEC,GAAG,CAAC;IACxDU,KAAK,EAAEA,CAAA,KAAML,eAAe,CAACN,OAAO,EAAEC,GAAG;EAC3C,CAAC;AACH","ignoreList":[]}
|
|
@@ -10,31 +10,29 @@ export const CustomPages = ({
|
|
|
10
10
|
showNext = true,
|
|
11
11
|
...props
|
|
12
12
|
}) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}, props.skipButtonPosition && props.showSkip && /*#__PURE__*/React.createElement(SkipButton, {
|
|
16
|
-
buttonTextStyle: props.skipLabelStyle,
|
|
17
|
-
buttonStyle: props.skipButtonContainerStyle,
|
|
18
|
-
position: props.skipButtonPosition,
|
|
19
|
-
onPress: props.onSkip
|
|
20
|
-
}), showPagination && props.paginationPosition === 'top' && /*#__PURE__*/React.createElement(React.Fragment, null, props.customFooter && props.customFooter({
|
|
21
|
-
nextPage: props.nextPage
|
|
22
|
-
}), !props.customFooter && /*#__PURE__*/React.createElement(Pagination, {
|
|
13
|
+
const pageWidth = props.width || width;
|
|
14
|
+
const paginationProps = {
|
|
23
15
|
color: '#fff',
|
|
24
16
|
backgroundColor: '#333',
|
|
25
|
-
width:
|
|
17
|
+
width: pageWidth,
|
|
26
18
|
onNext: props.nextPage,
|
|
27
19
|
onSkip: props.onSkip,
|
|
28
20
|
onDone: props.onDone,
|
|
29
21
|
showDone: props.showDone,
|
|
30
|
-
|
|
22
|
+
showPrevious: props.showPrevious,
|
|
23
|
+
animatedValue: props.dotsAnimatedValue,
|
|
31
24
|
showSkip: props.showSkip,
|
|
32
25
|
numberOfScreens: props.numberOfScreens,
|
|
33
26
|
skipLabel: props.skipLabel,
|
|
34
|
-
showNext
|
|
27
|
+
showNext,
|
|
35
28
|
nextLabel: props.nextLabel,
|
|
29
|
+
previousLabel: props.previousLabel,
|
|
36
30
|
doneLabel: props.doneLabel,
|
|
37
31
|
hasSkipPosition: !!props.skipButtonPosition,
|
|
32
|
+
paginationStyle: props.paginationStyle,
|
|
33
|
+
progressBarStyle: props.progressBarStyle,
|
|
34
|
+
progressBarFillStyle: props.progressBarFillStyle,
|
|
35
|
+
dotsAreTappable: props.dotsAreTappable,
|
|
38
36
|
paginationContainerStyle: props.paginationContainerStyle,
|
|
39
37
|
buttonRightContainerStyle: props.buttonRightContainerStyle,
|
|
40
38
|
buttonLeftContainerStyle: props.buttonLeftContainerStyle,
|
|
@@ -43,28 +41,34 @@ export const CustomPages = ({
|
|
|
43
41
|
skipButtonContainerStyle: props.skipButtonContainerStyle,
|
|
44
42
|
nextButtonContainerStyle: props.nextButtonContainerStyle,
|
|
45
43
|
doneButtonContainerStyle: props.doneButtonContainerStyle,
|
|
44
|
+
previousButtonContainerStyle: props.previousButtonContainerStyle,
|
|
46
45
|
skipLabelStyle: props.skipLabelStyle,
|
|
46
|
+
previousLabelStyle: props.previousLabelStyle,
|
|
47
47
|
nextLabelStyle: props.nextLabelStyle,
|
|
48
48
|
paginationPosition: props.paginationPosition
|
|
49
|
-
}
|
|
50
|
-
|
|
49
|
+
};
|
|
50
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
51
|
+
style: [styles.container]
|
|
52
|
+
}, props.skipButtonPosition && props.showSkip && /*#__PURE__*/React.createElement(SkipButton, {
|
|
53
|
+
buttonTextStyle: props.skipLabelStyle,
|
|
54
|
+
buttonStyle: props.skipButtonContainerStyle,
|
|
55
|
+
position: props.skipButtonPosition,
|
|
56
|
+
onPress: props.onSkip,
|
|
57
|
+
label: props.skipLabel
|
|
58
|
+
}), showPagination && props.paginationPosition === 'top' && /*#__PURE__*/React.createElement(React.Fragment, null, props.customFooter && props.customFooter({
|
|
59
|
+
nextPage: props.nextPage
|
|
60
|
+
}), !props.customFooter && /*#__PURE__*/React.createElement(Pagination, paginationProps)), /*#__PURE__*/React.createElement(Animated.FlatList, {
|
|
61
|
+
ref: node => props.setFlatListRef(node),
|
|
51
62
|
data: React.Children.toArray(props.children),
|
|
52
63
|
horizontal: true,
|
|
53
64
|
pagingEnabled: true,
|
|
54
65
|
showsHorizontalScrollIndicator: false,
|
|
55
66
|
scrollEnabled: props.scrollEnabled,
|
|
56
|
-
onScroll:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
x: props.scrollX
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}], {
|
|
63
|
-
useNativeDriver: false
|
|
64
|
-
}),
|
|
65
|
-
scrollEventThrottle: 1,
|
|
67
|
+
onScroll: props.onScroll,
|
|
68
|
+
onScrollBeginDrag: props.onScrollBeginDrag,
|
|
69
|
+
scrollEventThrottle: 16,
|
|
66
70
|
onMomentumScrollEnd: event => {
|
|
67
|
-
const pageIndex = Math.round(event.nativeEvent.contentOffset.x /
|
|
71
|
+
const pageIndex = Math.round(event.nativeEvent.contentOffset.x / pageWidth);
|
|
68
72
|
props.setPage(pageIndex || 0);
|
|
69
73
|
},
|
|
70
74
|
keyExtractor: (_, index) => index.toString(),
|
|
@@ -81,34 +85,7 @@ export const CustomPages = ({
|
|
|
81
85
|
}
|
|
82
86
|
}), showPagination && props.paginationPosition !== 'top' && /*#__PURE__*/React.createElement(React.Fragment, null, props.customFooter && props.customFooter({
|
|
83
87
|
nextPage: props.nextPage
|
|
84
|
-
}), !props.customFooter && /*#__PURE__*/React.createElement(Pagination,
|
|
85
|
-
color: '#fff',
|
|
86
|
-
backgroundColor: '#333',
|
|
87
|
-
width: width,
|
|
88
|
-
onNext: props.nextPage,
|
|
89
|
-
onSkip: props.onSkip,
|
|
90
|
-
onDone: props.onDone,
|
|
91
|
-
showDone: props.showDone,
|
|
92
|
-
animatedValue: props.scrollX,
|
|
93
|
-
showSkip: props.showSkip,
|
|
94
|
-
numberOfScreens: props.numberOfScreens,
|
|
95
|
-
skipLabel: props.skipLabel,
|
|
96
|
-
nextLabel: props.nextLabel,
|
|
97
|
-
showNext: showNext,
|
|
98
|
-
doneLabel: props.doneLabel,
|
|
99
|
-
paginationContainerStyle: props.paginationContainerStyle,
|
|
100
|
-
buttonRightContainerStyle: props.buttonRightContainerStyle,
|
|
101
|
-
buttonLeftContainerStyle: props.buttonLeftContainerStyle,
|
|
102
|
-
dotsContainerStyle: props.dotsContainerStyle,
|
|
103
|
-
doneLabelStyle: props.doneLabelStyle,
|
|
104
|
-
skipButtonContainerStyle: props.skipButtonContainerStyle,
|
|
105
|
-
nextButtonContainerStyle: props.nextButtonContainerStyle,
|
|
106
|
-
doneButtonContainerStyle: props.doneButtonContainerStyle,
|
|
107
|
-
skipLabelStyle: props.skipLabelStyle,
|
|
108
|
-
hasSkipPosition: !!props.skipButtonPosition,
|
|
109
|
-
paginationPosition: props.paginationPosition,
|
|
110
|
-
nextLabelStyle: props.nextLabelStyle
|
|
111
|
-
})));
|
|
88
|
+
}), !props.customFooter && /*#__PURE__*/React.createElement(Pagination, paginationProps)));
|
|
112
89
|
};
|
|
113
90
|
const styles = StyleSheet.create({
|
|
114
91
|
container: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","Dimensions","Animated","StyleSheet","React","Pagination","SkipButton","width","get","CustomPages","showPagination","showNext","props","
|
|
1
|
+
{"version":3,"names":["View","Dimensions","Animated","StyleSheet","React","Pagination","SkipButton","width","get","CustomPages","showPagination","showNext","props","pageWidth","paginationProps","color","backgroundColor","onNext","nextPage","onSkip","onDone","showDone","showPrevious","animatedValue","dotsAnimatedValue","showSkip","numberOfScreens","skipLabel","nextLabel","previousLabel","doneLabel","hasSkipPosition","skipButtonPosition","paginationStyle","progressBarStyle","progressBarFillStyle","dotsAreTappable","paginationContainerStyle","buttonRightContainerStyle","buttonLeftContainerStyle","dotsContainerStyle","doneLabelStyle","skipButtonContainerStyle","nextButtonContainerStyle","doneButtonContainerStyle","previousButtonContainerStyle","skipLabelStyle","previousLabelStyle","nextLabelStyle","paginationPosition","createElement","style","styles","container","buttonTextStyle","buttonStyle","position","onPress","label","Fragment","customFooter","FlatList","ref","node","setFlatListRef","data","Children","toArray","children","horizontal","pagingEnabled","showsHorizontalScrollIndicator","scrollEnabled","onScroll","onScrollBeginDrag","scrollEventThrottle","onMomentumScrollEnd","event","pageIndex","Math","round","nativeEvent","contentOffset","x","setPage","keyExtractor","_","index","toString","renderItem","item","cloneElement","currentPage","create","flex","justifyContent","alignItems","screen","pagination","flexDirection","paddingVertical","paddingHorizontal","dot","height","borderRadius","margin","dotsContainer"],"sourceRoot":"../../../src","sources":["components/CustomPages.tsx"],"mappings":"AAAA,SACEA,IAAI,EACJC,UAAU,EACVC,QAAQ,EACRC,UAAU,QAIL,cAAc;AACrB,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,cAAc;AAEzC,SAASC,UAAU,QAAQ,UAAU;AAErC,MAAM;EAAEC;AAAM,CAAC,GAAGN,UAAU,CAACO,GAAG,CAAC,QAAQ,CAAC;AAyB1C,OAAO,MAAMC,WAAW,GAAGA,CAAC;EAC1BC,cAAc,GAAG,IAAI;EACrBC,QAAQ,GAAG,IAAI;EACf,GAAGC;AACa,CAAC,KAAK;EACtB,MAAMC,SAAS,GAAGD,KAAK,CAACL,KAAK,IAAIA,KAAK;EAEtC,MAAMO,eAAe,GAAG;IACtBC,KAAK,EAAE,MAAM;IACbC,eAAe,EAAE,MAAM;IACvBT,KAAK,EAAEM,SAAS;IAChBI,MAAM,EAAEL,KAAK,CAACM,QAAQ;IACtBC,MAAM,EAAEP,KAAK,CAACO,MAAM;IACpBC,MAAM,EAAER,KAAK,CAACQ,MAAM;IACpBC,QAAQ,EAAET,KAAK,CAACS,QAAQ;IACxBC,YAAY,EAAEV,KAAK,CAACU,YAAY;IAChCC,aAAa,EAAEX,KAAK,CAACY,iBAAiB;IACtCC,QAAQ,EAAEb,KAAK,CAACa,QAAQ;IACxBC,eAAe,EAAEd,KAAK,CAACc,eAAe;IACtCC,SAAS,EAAEf,KAAK,CAACe,SAAS;IAC1BhB,QAAQ;IACRiB,SAAS,EAAEhB,KAAK,CAACgB,SAAS;IAC1BC,aAAa,EAAEjB,KAAK,CAACiB,aAAa;IAClCC,SAAS,EAAElB,KAAK,CAACkB,SAAS;IAC1BC,eAAe,EA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,eAAe,EAAEd,KAAK,CAACc,eAAe;QACtCR,QAAQ,EAAEN,KAAK,CAACM,QAAQ;QACxBqE;MACF,CACF,CAAC;IACH;EAAE,CACH,CAAC,EAED7E,cAAc,IAAIE,KAAK,CAACqC,kBAAkB,KAAK,KAAK,iBACnD7C,KAAA,CAAA8C,aAAA,CAAA9C,KAAA,CAAAuD,QAAA,QACG/C,KAAK,CAACgD,YAAY,IACjBhD,KAAK,CAACgD,YAAY,CAAC;IAAE1C,QAAQ,EAAEN,KAAK,CAACM;EAAS,CAAC,CAAC,EACjD,CAACN,KAAK,CAACgD,YAAY,iBAAIxD,KAAA,CAAA8C,aAAA,CAAC7C,UAAU,EAAKS,eAAkB,CAC1D,CAEA,CAAC;AAEX,CAAC;AAED,MAAMsC,MAAM,GAAGjD,UAAU,CAAC0F,MAAM,CAAC;EAC/BxC,SAAS,EAAE;IACTyC,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDC,MAAM,EAAE;IACN1F,KAAK;IACLwF,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBhF,eAAe,EAAE;EACnB,CAAC;EACDkF,UAAU,EAAE;IACVC,aAAa,EAAE,KAAK;IACpBH,UAAU,EAAE,QAAQ;IACpBI,eAAe,EAAE,EAAE;IACnBC,iBAAiB,EAAE,EAAE;IACrB9F;EACF,CAAC;EACD+F,GAAG,EAAE;IACHC,MAAM,EAAE,EAAE;IACVhG,KAAK,EAAE,EAAE;IACTiG,YAAY,EAAE,CAAC;IACfxF,eAAe,EAAE,MAAM;IACvByF,MAAM,EAAE;EACV,CAAC;EACDC,aAAa,EAAE;IACbP,aAAa,EAAE,KAAK;IACpBL,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE;EAClB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
-
import React, {
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
3
|
import tinycolor from 'tinycolor2';
|
|
4
4
|
import { Animated, StyleSheet, Dimensions } from 'react-native';
|
|
5
5
|
import { Pagination } from './Pagination';
|
|
@@ -13,122 +13,102 @@ export const OnboardingPages = ({
|
|
|
13
13
|
showNext = true,
|
|
14
14
|
...props
|
|
15
15
|
}) => {
|
|
16
|
-
|
|
17
|
-
const backgroundColorAnim = useRef(new Animated.Value(0)).current;
|
|
18
|
-
const [previousPage, setPreviousPage] = React.useState(0);
|
|
16
|
+
const pageWidth = props.width || width;
|
|
19
17
|
const currentPage_ = props.pages[props.currentPage];
|
|
20
|
-
const currentBackgroundColor = (currentPage_ === null || currentPage_ === void 0 ? void 0 : currentPage_.backgroundColor)
|
|
18
|
+
const currentBackgroundColor = (currentPage_ === null || currentPage_ === void 0 ? void 0 : currentPage_.backgroundColor) ?? 'white';
|
|
21
19
|
const isLight = tinycolor(currentBackgroundColor).getBrightness() > 180;
|
|
22
20
|
const footerBackgroundColor = isLight ? tinycolor(currentBackgroundColor).darken(30).toString() : tinycolor(currentBackgroundColor).lighten(30).toString();
|
|
23
21
|
const color = tinycolor(footerBackgroundColor).getBrightness() > 180 ? tinycolor(footerBackgroundColor).darken(60).toString() : tinycolor(footerBackgroundColor).lighten(60).toString();
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}, props.skipButtonPosition && props.showSkip && /*#__PURE__*/React.createElement(SkipButton, {
|
|
40
|
-
buttonTextStyle: props.skipLabelStyle,
|
|
41
|
-
buttonStyle: props.skipButtonContainerStyle,
|
|
42
|
-
position: props.skipButtonPosition,
|
|
43
|
-
label: props.skipLabel,
|
|
44
|
-
onPress: props.onSkip
|
|
45
|
-
}), props.paginationPosition === 'top' && /*#__PURE__*/React.createElement(React.Fragment, null, showPagination && props.customFooter && props.customFooter({
|
|
46
|
-
nextPage: props.nextPage
|
|
47
|
-
}), !props.customFooter && showPagination && /*#__PURE__*/React.createElement(Pagination, {
|
|
48
|
-
width: props.width || width,
|
|
22
|
+
const interpolatedBackgroundColor = useMemo(() => {
|
|
23
|
+
const pages = props.pages;
|
|
24
|
+
// interpolate() requires at least 2 stops; for 0 or 1 pages there is
|
|
25
|
+
// nothing to animate between, so use the solid current color.
|
|
26
|
+
if (pages.length < 2) return currentBackgroundColor;
|
|
27
|
+
const inputRange = pages.map((_, i) => i * pageWidth);
|
|
28
|
+
const outputRange = pages.map(p => p.backgroundColor ?? 'white');
|
|
29
|
+
return props.scrollX.interpolate({
|
|
30
|
+
inputRange,
|
|
31
|
+
outputRange,
|
|
32
|
+
extrapolate: 'clamp'
|
|
33
|
+
});
|
|
34
|
+
}, [props.pages, props.scrollX, pageWidth, currentBackgroundColor]);
|
|
35
|
+
const paginationProps = {
|
|
36
|
+
width: pageWidth,
|
|
49
37
|
onNext: props.nextPage,
|
|
50
38
|
onSkip: props.onSkip,
|
|
51
|
-
color
|
|
52
|
-
showNext
|
|
39
|
+
color,
|
|
40
|
+
showNext,
|
|
53
41
|
onDone: props.onDone,
|
|
54
42
|
showDone: props.showDone,
|
|
43
|
+
showPrevious: props.showPrevious,
|
|
55
44
|
backgroundColor: footerBackgroundColor,
|
|
56
|
-
animatedValue: props.
|
|
45
|
+
animatedValue: props.dotsAnimatedValue,
|
|
57
46
|
showSkip: props.showSkip,
|
|
58
47
|
numberOfScreens: props.pages.length,
|
|
59
48
|
skipLabel: props.skipLabel,
|
|
60
49
|
nextLabel: props.nextLabel,
|
|
50
|
+
previousLabel: props.previousLabel,
|
|
61
51
|
hasSkipPosition: !!props.skipButtonPosition,
|
|
62
52
|
doneLabel: props.doneLabel,
|
|
53
|
+
paginationStyle: props.paginationStyle,
|
|
54
|
+
progressBarStyle: props.progressBarStyle,
|
|
55
|
+
progressBarFillStyle: props.progressBarFillStyle,
|
|
56
|
+
dotsAreTappable: props.dotsAreTappable,
|
|
57
|
+
mirror: props.mirror,
|
|
63
58
|
paginationContainerStyle: props.paginationContainerStyle,
|
|
64
59
|
buttonRightContainerStyle: props.buttonRightContainerStyle,
|
|
65
60
|
buttonLeftContainerStyle: props.buttonLeftContainerStyle,
|
|
66
61
|
dotsContainerStyle: props.dotsContainerStyle,
|
|
67
62
|
doneLabelStyle: props.doneLabelStyle,
|
|
68
63
|
skipLabelStyle: props.skipLabelStyle,
|
|
64
|
+
previousLabelStyle: props.previousLabelStyle,
|
|
69
65
|
nextLabelStyle: props.nextLabelStyle,
|
|
70
66
|
skipButtonContainerStyle: props.skipButtonContainerStyle,
|
|
71
67
|
nextButtonContainerStyle: props.nextButtonContainerStyle,
|
|
72
|
-
doneButtonContainerStyle: props.doneButtonContainerStyle
|
|
73
|
-
|
|
74
|
-
|
|
68
|
+
doneButtonContainerStyle: props.doneButtonContainerStyle,
|
|
69
|
+
previousButtonContainerStyle: props.previousButtonContainerStyle
|
|
70
|
+
};
|
|
71
|
+
return /*#__PURE__*/React.createElement(Animated.View, {
|
|
72
|
+
style: [styles.container, {
|
|
73
|
+
backgroundColor: interpolatedBackgroundColor
|
|
74
|
+
}]
|
|
75
|
+
}, props.skipButtonPosition && props.showSkip && /*#__PURE__*/React.createElement(SkipButton, {
|
|
76
|
+
buttonTextStyle: props.skipLabelStyle,
|
|
77
|
+
buttonStyle: props.skipButtonContainerStyle,
|
|
78
|
+
position: props.skipButtonPosition,
|
|
79
|
+
label: props.skipLabel,
|
|
80
|
+
onPress: props.onSkip
|
|
81
|
+
}), props.paginationPosition === 'top' && /*#__PURE__*/React.createElement(React.Fragment, null, showPagination && props.customFooter && props.customFooter({
|
|
82
|
+
nextPage: props.nextPage
|
|
83
|
+
}), !props.customFooter && showPagination && /*#__PURE__*/React.createElement(Pagination, paginationProps)), /*#__PURE__*/React.createElement(Animated.FlatList, {
|
|
84
|
+
ref: node => props.setFlatListRef(node),
|
|
75
85
|
data: props.pages,
|
|
76
86
|
horizontal: true,
|
|
77
87
|
pagingEnabled: true,
|
|
78
88
|
showsHorizontalScrollIndicator: false,
|
|
89
|
+
scrollEnabled: props.scrollEnabled,
|
|
90
|
+
style: props.mirror ? styles.mirror : undefined,
|
|
79
91
|
keyExtractor: (_, index) => index.toString(),
|
|
80
92
|
renderItem: ({
|
|
81
93
|
item,
|
|
82
94
|
index
|
|
83
95
|
}) => /*#__PURE__*/React.createElement(OnboardingPage, _extends({
|
|
84
96
|
color: color,
|
|
85
|
-
width:
|
|
97
|
+
width: pageWidth,
|
|
86
98
|
swap: props.swap,
|
|
99
|
+
mirror: props.mirror,
|
|
87
100
|
key: index
|
|
88
101
|
}, item)),
|
|
89
|
-
onScroll:
|
|
90
|
-
|
|
91
|
-
contentOffset: {
|
|
92
|
-
x: props.scrollX
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}], {
|
|
96
|
-
useNativeDriver: false
|
|
97
|
-
}),
|
|
102
|
+
onScroll: props.onScroll,
|
|
103
|
+
onScrollBeginDrag: props.onScrollBeginDrag,
|
|
98
104
|
scrollEventThrottle: 16,
|
|
99
105
|
onMomentumScrollEnd: event => {
|
|
100
|
-
const pageIndex = Math.round(event.nativeEvent.contentOffset.x /
|
|
101
|
-
|
|
106
|
+
const pageIndex = Math.round(event.nativeEvent.contentOffset.x / pageWidth);
|
|
107
|
+
props.setPage(pageIndex || 0);
|
|
102
108
|
}
|
|
103
109
|
}), props.paginationPosition !== 'top' && /*#__PURE__*/React.createElement(React.Fragment, null, showPagination && props.customFooter && props.customFooter({
|
|
104
110
|
nextPage: props.nextPage
|
|
105
|
-
}), !props.customFooter && showPagination && /*#__PURE__*/React.createElement(Pagination,
|
|
106
|
-
width: props.width || width,
|
|
107
|
-
onNext: props.nextPage,
|
|
108
|
-
onSkip: props.onSkip,
|
|
109
|
-
color: color,
|
|
110
|
-
hasSkipPosition: !!props.skipButtonPosition,
|
|
111
|
-
onDone: props.onDone,
|
|
112
|
-
showDone: props.showDone,
|
|
113
|
-
backgroundColor: footerBackgroundColor,
|
|
114
|
-
animatedValue: props.scrollX,
|
|
115
|
-
showSkip: props.showSkip,
|
|
116
|
-
numberOfScreens: props.pages.length,
|
|
117
|
-
skipLabel: props.skipLabel,
|
|
118
|
-
nextLabel: props.nextLabel,
|
|
119
|
-
doneLabel: props.doneLabel,
|
|
120
|
-
paginationContainerStyle: props.paginationContainerStyle,
|
|
121
|
-
buttonRightContainerStyle: props.buttonRightContainerStyle,
|
|
122
|
-
buttonLeftContainerStyle: props.buttonLeftContainerStyle,
|
|
123
|
-
dotsContainerStyle: props.dotsContainerStyle,
|
|
124
|
-
doneLabelStyle: props.doneLabelStyle,
|
|
125
|
-
skipLabelStyle: props.skipLabelStyle,
|
|
126
|
-
skipButtonContainerStyle: props.skipButtonContainerStyle,
|
|
127
|
-
nextButtonContainerStyle: props.nextButtonContainerStyle,
|
|
128
|
-
doneButtonContainerStyle: props.doneButtonContainerStyle,
|
|
129
|
-
showNext: showNext,
|
|
130
|
-
nextLabelStyle: props.nextLabelStyle
|
|
131
|
-
})));
|
|
111
|
+
}), !props.customFooter && showPagination && /*#__PURE__*/React.createElement(Pagination, paginationProps)));
|
|
132
112
|
};
|
|
133
113
|
const styles = StyleSheet.create({
|
|
134
114
|
container: {
|
|
@@ -160,6 +140,11 @@ const styles = StyleSheet.create({
|
|
|
160
140
|
flexDirection: 'row',
|
|
161
141
|
flex: 1,
|
|
162
142
|
justifyContent: 'center'
|
|
143
|
+
},
|
|
144
|
+
mirror: {
|
|
145
|
+
transform: [{
|
|
146
|
+
scaleX: -1
|
|
147
|
+
}]
|
|
163
148
|
}
|
|
164
149
|
});
|
|
165
150
|
//# sourceMappingURL=OnboardingPages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","
|
|
1
|
+
{"version":3,"names":["React","useMemo","tinycolor","Animated","StyleSheet","Dimensions","Pagination","OnboardingPage","SkipButton","width","get","OnboardingPages","showPagination","showNext","props","pageWidth","currentPage_","pages","currentPage","currentBackgroundColor","backgroundColor","isLight","getBrightness","footerBackgroundColor","darken","toString","lighten","color","interpolatedBackgroundColor","length","inputRange","map","_","i","outputRange","p","scrollX","interpolate","extrapolate","paginationProps","onNext","nextPage","onSkip","onDone","showDone","showPrevious","animatedValue","dotsAnimatedValue","showSkip","numberOfScreens","skipLabel","nextLabel","previousLabel","hasSkipPosition","skipButtonPosition","doneLabel","paginationStyle","progressBarStyle","progressBarFillStyle","dotsAreTappable","mirror","paginationContainerStyle","buttonRightContainerStyle","buttonLeftContainerStyle","dotsContainerStyle","doneLabelStyle","skipLabelStyle","previousLabelStyle","nextLabelStyle","skipButtonContainerStyle","nextButtonContainerStyle","doneButtonContainerStyle","previousButtonContainerStyle","createElement","View","style","styles","container","buttonTextStyle","buttonStyle","position","label","onPress","paginationPosition","Fragment","customFooter","FlatList","ref","node","setFlatListRef","data","horizontal","pagingEnabled","showsHorizontalScrollIndicator","scrollEnabled","undefined","keyExtractor","index","renderItem","item","_extends","swap","key","onScroll","onScrollBeginDrag","scrollEventThrottle","onMomentumScrollEnd","event","pageIndex","Math","round","nativeEvent","contentOffset","x","setPage","create","flex","justifyContent","alignItems","screen","pagination","flexDirection","paddingVertical","paddingHorizontal","dot","height","borderRadius","margin","dotsContainer","transform","scaleX"],"sourceRoot":"../../../src","sources":["components/OnboardingPages.tsx"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,OAAOC,SAAS,MAAM,YAAY;AAClC,SACEC,QAAQ,EACRC,UAAU,EACVC,UAAU,QAIL,cAAc;AACrB,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,cAAc,QAAmB,QAAQ;AA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