@react-native-ohos/react-native-pager-view 6.7.2-rc.1 → 6.7.2-rc.2

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.
Files changed (40) hide show
  1. package/harmony/pager_view/BuildProfile.ets +17 -0
  2. package/harmony/pager_view/oh-package.json5 +2 -2
  3. package/harmony/pager_view/src/main/cpp/ViewPagerComponentInstance.cpp +3 -0
  4. package/harmony/pager_view.har +0 -0
  5. package/lib/commonjs/PagerView.js +23 -1
  6. package/lib/commonjs/PagerView.js.map +1 -1
  7. package/lib/commonjs/PagerViewNativeComponent.js +24 -0
  8. package/lib/commonjs/PagerViewNativeComponent.js.map +1 -1
  9. package/lib/commonjs/index.js +23 -0
  10. package/lib/commonjs/index.js.map +1 -1
  11. package/lib/commonjs/usePagerView.js +24 -0
  12. package/lib/commonjs/usePagerView.js.map +1 -1
  13. package/lib/commonjs/utils.js +24 -0
  14. package/lib/commonjs/utils.js.map +1 -1
  15. package/lib/module/PagerView.js +23 -0
  16. package/lib/module/PagerView.js.map +1 -1
  17. package/lib/module/PagerViewNativeComponent.js +24 -0
  18. package/lib/module/PagerViewNativeComponent.js.map +1 -1
  19. package/lib/module/index.js +24 -0
  20. package/lib/module/index.js.map +1 -1
  21. package/lib/module/usePagerView.js +24 -0
  22. package/lib/module/usePagerView.js.map +1 -1
  23. package/lib/module/utils.js +23 -0
  24. package/lib/module/utils.js.map +1 -1
  25. package/lib/typescript/PagerView.d.ts +23 -0
  26. package/lib/typescript/PagerViewNativeComponent.d.ts +23 -0
  27. package/lib/typescript/index.d.ts +23 -0
  28. package/lib/typescript/usePagerView.d.ts +23 -0
  29. package/lib/typescript/utils.d.ts +23 -0
  30. package/package.json +1 -1
  31. package/src/PagerView.tsx +23 -0
  32. package/src/PagerViewNativeComponent.ts +23 -0
  33. package/src/index.tsx +23 -0
  34. package/src/usePagerView.ts +23 -0
  35. package/src/utils.tsx +23 -0
  36. package/harmony/pager_view/LICENSE +0 -21
  37. package/harmony/pager_view/NOTICE +0 -33
  38. package/harmony/pager_view/OAT.xml +0 -38
  39. package/harmony/pager_view/README.OpenSource +0 -11
  40. package/harmony/pager_view/README.md +0 -236
@@ -1 +1 @@
1
- {"version":3,"names":["PagerView","Animated","useCallback","useMemo","useRef","useState","AnimatedPagerView","createAnimatedComponent","usePagerView","pagesAmount","ref","pages","setPages","Array","fill","map","_v","index","activePage","setActivePage","isAnimated","setIsAnimated","overdragEnabled","setOverdragEnabled","scrollEnabled","setScrollEnabled","scrollState","setScrollState","progress","setProgress","position","offset","onPageScrollOffset","Value","current","onPageScrollPosition","onPageSelectedPosition","setPage","page","_ref$current","_ref$current2","setPageWithoutAnimation","addPage","prevPages","length","removePage","slice","toggleAnimation","animated","toggleScroll","enabled","toggleOverdrag","onPageScroll","event","nativeEvent","listener","useNativeDriver","onPageSelected","onPageScrollStateChanged","e","pageScrollState"],"sources":["usePagerView.ts"],"sourcesContent":["import type * as ReactNative from 'react-native';\r\nimport type {\r\n OnPageScrollEventData as PagerViewOnPageScrollEventData,\r\n OnPageSelectedEventData as PagerViewOnPageSelectedEventData,\r\n OnPageScrollStateChangedEventData as PageScrollStateChangedNativeEventData,\r\n} from './PagerViewNativeComponent';\r\n\r\ntype PageScrollStateChangedNativeEvent =\r\n ReactNative.NativeSyntheticEvent<PageScrollStateChangedNativeEventData>;\r\n\r\nimport { PagerView } from './PagerView';\r\n\r\nimport { Animated } from 'react-native';\r\nimport { useCallback, useMemo, useRef, useState } from 'react';\r\n\r\nexport type UsePagerViewProps = ReturnType<typeof usePagerView>;\r\n\r\nconst AnimatedPagerView = Animated.createAnimatedComponent(PagerView);\r\n\r\ntype UsePagerViewParams = {\r\n pagesAmount: number;\r\n};\r\n\r\nexport function usePagerView(\r\n { pagesAmount }: UsePagerViewParams = { pagesAmount: 0 }\r\n) {\r\n const ref = useRef<PagerView>(null);\r\n const [pages, setPages] = useState<number[]>(\r\n new Array(pagesAmount).fill('').map((_v, index) => index)\r\n );\r\n const [activePage, setActivePage] = useState(0);\r\n const [isAnimated, setIsAnimated] = useState(true);\r\n const [overdragEnabled, setOverdragEnabled] = useState(false);\r\n const [scrollEnabled, setScrollEnabled] = useState(true);\r\n const [scrollState, setScrollState] = useState('idle');\r\n const [progress, setProgress] = useState({ position: 0, offset: 0 });\r\n const onPageScrollOffset = useRef(new Animated.Value(0)).current;\r\n const onPageScrollPosition = useRef(new Animated.Value(0)).current;\r\n const onPageSelectedPosition = useRef(new Animated.Value(0)).current;\r\n\r\n const setPage = useCallback(\r\n (page: number) =>\r\n isAnimated\r\n ? ref.current?.setPage(page)\r\n : ref.current?.setPageWithoutAnimation(page),\r\n [isAnimated]\r\n );\r\n\r\n const addPage = useCallback(() => {\r\n setPages((prevPages) => {\r\n return [...prevPages, prevPages.length];\r\n });\r\n }, []);\r\n\r\n const removePage = useCallback(() => {\r\n setPages((prevPages) => {\r\n if (prevPages.length === 1) {\r\n return prevPages;\r\n }\r\n return prevPages.slice(0, prevPages.length - 1);\r\n });\r\n }, []);\r\n\r\n const toggleAnimation = useCallback(\r\n () => setIsAnimated((animated) => !animated),\r\n []\r\n );\r\n\r\n const toggleScroll = useCallback(\r\n () => setScrollEnabled((enabled) => !enabled),\r\n []\r\n );\r\n\r\n const toggleOverdrag = useCallback(\r\n () => setOverdragEnabled((enabled) => !enabled),\r\n []\r\n );\r\n\r\n const onPageScroll = useMemo(\r\n () =>\r\n Animated.event<PagerViewOnPageScrollEventData>(\r\n [\r\n {\r\n nativeEvent: {\r\n offset: onPageScrollOffset,\r\n position: onPageScrollPosition,\r\n },\r\n },\r\n ],\r\n {\r\n listener: ({ nativeEvent: { offset, position } }) => {\r\n setProgress({\r\n position,\r\n offset,\r\n });\r\n },\r\n useNativeDriver: true,\r\n }\r\n ),\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n []\r\n );\r\n\r\n const onPageSelected = useMemo(\r\n () =>\r\n Animated.event<PagerViewOnPageSelectedEventData>(\r\n [{ nativeEvent: { position: onPageSelectedPosition } }],\r\n {\r\n listener: ({ nativeEvent: { position } }) => {\r\n setActivePage(position);\r\n },\r\n useNativeDriver: true,\r\n }\r\n ),\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n []\r\n );\r\n\r\n const onPageScrollStateChanged = useCallback(\r\n (e: PageScrollStateChangedNativeEvent) => {\r\n setScrollState(e.nativeEvent.pageScrollState);\r\n },\r\n []\r\n );\r\n\r\n return {\r\n ref,\r\n activePage,\r\n isAnimated,\r\n pages,\r\n scrollState,\r\n scrollEnabled,\r\n progress,\r\n overdragEnabled,\r\n setPage,\r\n addPage,\r\n removePage,\r\n toggleScroll,\r\n toggleAnimation,\r\n setProgress,\r\n onPageScroll,\r\n onPageSelected,\r\n onPageScrollStateChanged,\r\n toggleOverdrag,\r\n AnimatedPagerView,\r\n PagerView,\r\n };\r\n}\r\n"],"mappings":"AAUA,SAASA,SAAS,QAAQ,aAAa;AAEvC,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,WAAW,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAI9D,MAAMC,iBAAiB,GAAGL,QAAQ,CAACM,uBAAuB,CAACP,SAAS,CAAC;AAMrE,OAAO,SAASQ,YAAYA,CAC1B;EAAEC;AAAgC,CAAC,GAAG;EAAEA,WAAW,EAAE;AAAE,CAAC,EACxD;EACA,MAAMC,GAAG,GAAGN,MAAM,CAAY,IAAI,CAAC;EACnC,MAAM,CAACO,KAAK,EAAEC,QAAQ,CAAC,GAAGP,QAAQ,CAChC,IAAIQ,KAAK,CAACJ,WAAW,CAAC,CAACK,IAAI,CAAC,EAAE,CAAC,CAACC,GAAG,CAAC,CAACC,EAAE,EAAEC,KAAK,KAAKA,KAAK,CAC1D,CAAC;EACD,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAGd,QAAQ,CAAC,CAAC,CAAC;EAC/C,MAAM,CAACe,UAAU,EAAEC,aAAa,CAAC,GAAGhB,QAAQ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;IAAE,CAAC,KAAK;MAC3CX,aAAa,CAACW,QAAQ,CAAC;IACzB,CAAC;IACD0B,eAAe,EAAE;EACnB,CACF,CAAC;EACH;EACA,EACF,CAAC;EAED,MAAME,wBAAwB,GAAGxD,WAAW,CACzCyD,CAAoC,IAAK;IACxChC,cAAc,CAACgC,CAAC,CAACL,WAAW,CAACM,eAAe,CAAC;EAC/C,CAAC,EACD,EACF,CAAC;EAED,OAAO;IACLlD,GAAG;IACHQ,UAAU;IACVE,UAAU;IACVT,KAAK;IACLe,WAAW;IACXF,aAAa;IACbI,QAAQ;IACRN,eAAe;IACfe,OAAO;IACPK,OAAO;IACPG,UAAU;IACVI,YAAY;IACZF,eAAe;IACflB,WAAW;IACXuB,YAAY;IACZK,cAAc;IACdC,wBAAwB;IACxBP,cAAc;IACd7C,iBAAiB;IACjBN;EACF,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["PagerView","Animated","useCallback","useMemo","useRef","useState","AnimatedPagerView","createAnimatedComponent","usePagerView","pagesAmount","ref","pages","setPages","Array","fill","map","_v","index","activePage","setActivePage","isAnimated","setIsAnimated","overdragEnabled","setOverdragEnabled","scrollEnabled","setScrollEnabled","scrollState","setScrollState","progress","setProgress","position","offset","onPageScrollOffset","Value","current","onPageScrollPosition","onPageSelectedPosition","setPage","page","_ref$current","_ref$current2","setPageWithoutAnimation","addPage","prevPages","length","removePage","slice","toggleAnimation","animated","toggleScroll","enabled","toggleOverdrag","onPageScroll","event","nativeEvent","listener","useNativeDriver","onPageSelected","onPageScrollStateChanged","e","pageScrollState"],"sources":["usePagerView.ts"],"sourcesContent":["/**\r\n * MIT License\r\n *\r\n * Copyright (C) 2025 Huawei Device Co., Ltd.\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in all\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\nimport type * as ReactNative from 'react-native';\r\nimport type {\r\n OnPageScrollEventData as PagerViewOnPageScrollEventData,\r\n OnPageSelectedEventData as PagerViewOnPageSelectedEventData,\r\n OnPageScrollStateChangedEventData as PageScrollStateChangedNativeEventData,\r\n} from './PagerViewNativeComponent';\r\n\r\ntype PageScrollStateChangedNativeEvent =\r\n ReactNative.NativeSyntheticEvent<PageScrollStateChangedNativeEventData>;\r\n\r\nimport { PagerView } from './PagerView';\r\n\r\nimport { Animated } from 'react-native';\r\nimport { useCallback, useMemo, useRef, useState } from 'react';\r\n\r\nexport type UsePagerViewProps = ReturnType<typeof usePagerView>;\r\n\r\nconst AnimatedPagerView = Animated.createAnimatedComponent(PagerView);\r\n\r\ntype UsePagerViewParams = {\r\n pagesAmount: number;\r\n};\r\n\r\nexport function usePagerView(\r\n { pagesAmount }: UsePagerViewParams = { pagesAmount: 0 }\r\n) {\r\n const ref = useRef<PagerView>(null);\r\n const [pages, setPages] = useState<number[]>(\r\n new Array(pagesAmount).fill('').map((_v, index) => index)\r\n );\r\n const [activePage, setActivePage] = useState(0);\r\n const [isAnimated, setIsAnimated] = useState(true);\r\n const [overdragEnabled, setOverdragEnabled] = useState(false);\r\n const [scrollEnabled, setScrollEnabled] = useState(true);\r\n const [scrollState, setScrollState] = useState('idle');\r\n const [progress, setProgress] = useState({ position: 0, offset: 0 });\r\n const onPageScrollOffset = useRef(new Animated.Value(0)).current;\r\n const onPageScrollPosition = useRef(new Animated.Value(0)).current;\r\n const onPageSelectedPosition = useRef(new Animated.Value(0)).current;\r\n\r\n const setPage = useCallback(\r\n (page: number) =>\r\n isAnimated\r\n ? ref.current?.setPage(page)\r\n : ref.current?.setPageWithoutAnimation(page),\r\n [isAnimated]\r\n );\r\n\r\n const addPage = useCallback(() => {\r\n setPages((prevPages) => {\r\n return [...prevPages, prevPages.length];\r\n });\r\n }, []);\r\n\r\n const removePage = useCallback(() => {\r\n setPages((prevPages) => {\r\n if (prevPages.length === 1) {\r\n return prevPages;\r\n }\r\n return prevPages.slice(0, prevPages.length - 1);\r\n });\r\n }, []);\r\n\r\n const toggleAnimation = useCallback(\r\n () => setIsAnimated((animated) => !animated),\r\n []\r\n );\r\n\r\n const toggleScroll = useCallback(\r\n () => setScrollEnabled((enabled) => !enabled),\r\n []\r\n );\r\n\r\n const toggleOverdrag = useCallback(\r\n () => setOverdragEnabled((enabled) => !enabled),\r\n []\r\n );\r\n\r\n const onPageScroll = useMemo(\r\n () =>\r\n Animated.event<PagerViewOnPageScrollEventData>(\r\n [\r\n {\r\n nativeEvent: {\r\n offset: onPageScrollOffset,\r\n position: onPageScrollPosition,\r\n },\r\n },\r\n ],\r\n {\r\n listener: ({ nativeEvent: { offset, position } }) => {\r\n setProgress({\r\n position,\r\n offset,\r\n });\r\n },\r\n useNativeDriver: true,\r\n }\r\n ),\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n []\r\n );\r\n\r\n const onPageSelected = useMemo(\r\n () =>\r\n Animated.event<PagerViewOnPageSelectedEventData>(\r\n [{ nativeEvent: { position: onPageSelectedPosition } }],\r\n {\r\n listener: ({ nativeEvent: { position } }) => {\r\n setActivePage(position);\r\n },\r\n useNativeDriver: true,\r\n }\r\n ),\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n []\r\n );\r\n\r\n const onPageScrollStateChanged = useCallback(\r\n (e: PageScrollStateChangedNativeEvent) => {\r\n setScrollState(e.nativeEvent.pageScrollState);\r\n },\r\n []\r\n );\r\n\r\n return {\r\n ref,\r\n activePage,\r\n isAnimated,\r\n pages,\r\n scrollState,\r\n scrollEnabled,\r\n progress,\r\n overdragEnabled,\r\n setPage,\r\n addPage,\r\n removePage,\r\n toggleScroll,\r\n toggleAnimation,\r\n setProgress,\r\n onPageScroll,\r\n onPageSelected,\r\n onPageScrollStateChanged,\r\n toggleOverdrag,\r\n AnimatedPagerView,\r\n PagerView,\r\n };\r\n}\r\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAWA,SAASA,SAAS,QAAQ,aAAa;AAEvC,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,WAAW,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAI9D,MAAMC,iBAAiB,GAAGL,QAAQ,CAACM,uBAAuB,CAACP,SAAS,CAAC;AAMrE,OAAO,SAASQ,YAAYA,CAC1B;EAAEC;AAAgC,CAAC,GAAG;EAAEA,WAAW,EAAE;AAAE,CAAC,EACxD;EACA,MAAMC,GAAG,GAAGN,MAAM,CAAY,IAAI,CAAC;EACnC,MAAM,CAACO,KAAK,EAAEC,QAAQ,CAAC,GAAGP,QAAQ,CAChC,IAAIQ,KAAK,CAACJ,WAAW,CAAC,CAACK,IAAI,CAAC,EAAE,CAAC,CAACC,GAAG,CAAC,CAACC,EAAE,EAAEC,KAAK,KAAKA,KAAK,CAC1D,CAAC;EACD,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAGd,QAAQ,CAAC,CAAC,CAAC;EAC/C,MAAM,CAACe,UAAU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AC;MAAED,WAAW,EAAE;QAAExB;MAAS;IAAE,CAAC,KAAK;MAC3CX,aAAa,CAACW,QAAQ,CAAC;IACzB,CAAC;IACD0B,eAAe,EAAE;EACnB,CACF,CAAC;EACH;EACA,EACF,CAAC;EAED,MAAME,wBAAwB,GAAGxD,WAAW,CACzCyD,CAAoC,IAAK;IACxChC,cAAc,CAACgC,CAAC,CAACL,WAAW,CAACM,eAAe,CAAC;EAC/C,CAAC,EACD,EACF,CAAC;EAED,OAAO;IACLlD,GAAG;IACHQ,UAAU;IACVE,UAAU;IACVT,KAAK;IACLe,WAAW;IACXF,aAAa;IACbI,QAAQ;IACRN,eAAe;IACfe,OAAO;IACPK,OAAO;IACPG,UAAU;IACVI,YAAY;IACZF,eAAe;IACflB,WAAW;IACXuB,YAAY;IACZK,cAAc;IACdC,wBAAwB;IACxBP,cAAc;IACd7C,iBAAiB;IACjBN;EACF,CAAC;AACH","ignoreList":[]}
@@ -1,3 +1,26 @@
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (C) 2025 Huawei Device Co., Ltd.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
1
24
  import React, { Children } from 'react';
2
25
  import { StyleSheet, View } from 'react-native';
3
26
  export const childrenWithOverriddenStyle = children => {
@@ -1 +1 @@
1
- {"version":3,"names":["React","Children","StyleSheet","View","childrenWithOverriddenStyle","children","map","child","element","createElement","style","absoluteFill","collapsable","cloneElement","props"],"sources":["utils.tsx"],"sourcesContent":["import React, { Children, ReactNode } from 'react';\r\nimport { StyleSheet, View } from 'react-native';\r\n\r\nexport const childrenWithOverriddenStyle = (children?: ReactNode) => {\r\n return Children.map(children, (child) => {\r\n const element = child as React.ReactElement;\r\n return (\r\n // Add a wrapper to ensure layout is calculated correctly\r\n <View style={StyleSheet.absoluteFill} collapsable={false}>\r\n {/* @ts-ignore */}\r\n {React.cloneElement(element, {\r\n ...element.props,\r\n // Override styles so that each page will fill the parent.\r\n style: [element.props.style, StyleSheet.absoluteFill],\r\n })}\r\n </View>\r\n );\r\n });\r\n};\r\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAmB,OAAO;AAClD,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE/C,OAAO,MAAMC,2BAA2B,GAAIC,QAAoB,IAAK;EACnE,OAAOJ,QAAQ,CAACK,GAAG,CAACD,QAAQ,EAAGE,KAAK,IAAK;IACvC,MAAMC,OAAO,GAAGD,KAA2B;IAC3C;MAAA;MACE;MACAP,KAAA,CAAAS,aAAA,CAACN,IAAI;QAACO,KAAK,EAAER,UAAU,CAACS,YAAa;QAACC,WAAW,EAAE;MAAM,gBAEtDZ,KAAK,CAACa,YAAY,CAACL,OAAO,EAAE;QAC3B,GAAGA,OAAO,CAACM,KAAK;QAChB;QACAJ,KAAK,EAAE,CAACF,OAAO,CAACM,KAAK,CAACJ,KAAK,EAAER,UAAU,CAACS,YAAY;MACtD,CAAC,CACG;IAAC;EAEX,CAAC,CAAC;AACJ,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","Children","StyleSheet","View","childrenWithOverriddenStyle","children","map","child","element","createElement","style","absoluteFill","collapsable","cloneElement","props"],"sources":["utils.tsx"],"sourcesContent":["/**\r\n * MIT License\r\n *\r\n * Copyright (C) 2025 Huawei Device Co., Ltd.\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in all\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\nimport React, { Children, ReactNode } from 'react';\r\nimport { StyleSheet, View } from 'react-native';\r\n\r\nexport const childrenWithOverriddenStyle = (children?: ReactNode) => {\r\n return Children.map(children, (child) => {\r\n const element = child as React.ReactElement;\r\n return (\r\n // Add a wrapper to ensure layout is calculated correctly\r\n <View style={StyleSheet.absoluteFill} collapsable={false}>\r\n {/* @ts-ignore */}\r\n {React.cloneElement(element, {\r\n ...element.props,\r\n // Override styles so that each page will fill the parent.\r\n style: [element.props.style, StyleSheet.absoluteFill],\r\n })}\r\n </View>\r\n );\r\n });\r\n};\r\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,QAAQ,QAAmB,OAAO;AAClD,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE/C,OAAO,MAAMC,2BAA2B,GAAIC,QAAoB,IAAK;EACnE,OAAOJ,QAAQ,CAACK,GAAG,CAACD,QAAQ,EAAGE,KAAK,IAAK;IACvC,MAAMC,OAAO,GAAGD,KAA2B;IAC3C;MAAA;MACE;MACAP,KAAA,CAAAS,aAAA,CAACN,IAAI;QAACO,KAAK,EAAER,UAAU,CAACS,YAAa;QAACC,WAAW,EAAE;MAAM,gBAEtDZ,KAAK,CAACa,YAAY,CAACL,OAAO,EAAE;QAC3B,GAAGA,OAAO,CAACM,KAAK;QAChB;QACAJ,KAAK,EAAE,CAACF,OAAO,CAACM,KAAK,CAACJ,KAAK,EAAER,UAAU,CAACS,YAAY;MACtD,CAAC,CACG;IAAC;EAEX,CAAC,CAAC;AACJ,CAAC","ignoreList":[]}
@@ -1,3 +1,26 @@
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (C) 2025 Huawei Device Co., Ltd.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
1
24
  import React from 'react';
2
25
  import PagerViewNativeComponent, { NativeProps } from './PagerViewNativeComponent';
3
26
  /**
@@ -1,3 +1,26 @@
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (C) 2025 Huawei Device Co., Ltd.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
1
24
  import type * as React from 'react';
2
25
  import type { HostComponent, ViewProps } from 'react-native';
3
26
  import type { DirectEventHandler, Double, Int32, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
@@ -1,3 +1,26 @@
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (C) 2025 Huawei Device Co., Ltd.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
1
24
  import type * as ReactNative from 'react-native';
2
25
  import { PagerView } from './PagerView';
3
26
  export default PagerView;
@@ -1,4 +1,27 @@
1
1
  /// <reference types="react" />
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (C) 2025 Huawei Device Co., Ltd.
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ */
2
25
  import type * as ReactNative from 'react-native';
3
26
  import type { OnPageScrollStateChangedEventData as PageScrollStateChangedNativeEventData } from './PagerViewNativeComponent';
4
27
  type PageScrollStateChangedNativeEvent = ReactNative.NativeSyntheticEvent<PageScrollStateChangedNativeEventData>;
@@ -1,2 +1,25 @@
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (C) 2025 Huawei Device Co., Ltd.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
1
24
  import React, { ReactNode } from 'react';
2
25
  export declare const childrenWithOverriddenStyle: (children?: ReactNode) => React.JSX.Element[] | null | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-ohos/react-native-pager-view",
3
- "version": "6.7.2-rc.1",
3
+ "version": "6.7.2-rc.2",
4
4
  "description": "React Native wrapper for Harmony ViewPager",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
package/src/PagerView.tsx CHANGED
@@ -1,3 +1,26 @@
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (C) 2025 Huawei Device Co., Ltd.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
1
24
  import React from 'react';
2
25
  import { Platform, Keyboard } from 'react-native';
3
26
  import { I18nManager } from 'react-native';
@@ -1,3 +1,26 @@
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (C) 2025 Huawei Device Co., Ltd.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
1
24
  import type * as React from 'react';
2
25
  import type { HostComponent, ViewProps } from 'react-native';
3
26
  import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
package/src/index.tsx CHANGED
@@ -1,3 +1,26 @@
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (C) 2025 Huawei Device Co., Ltd.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
1
24
  import type * as ReactNative from 'react-native';
2
25
  import { PagerView } from './PagerView';
3
26
  export default PagerView;
@@ -1,3 +1,26 @@
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (C) 2025 Huawei Device Co., Ltd.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
1
24
  import type * as ReactNative from 'react-native';
2
25
  import type {
3
26
  OnPageScrollEventData as PagerViewOnPageScrollEventData,
package/src/utils.tsx CHANGED
@@ -1,3 +1,26 @@
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (C) 2025 Huawei Device Co., Ltd.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
1
24
  import React, { Children, ReactNode } from 'react';
2
25
  import { StyleSheet, View } from 'react-native';
3
26
 
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2021 Callstack
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,33 +0,0 @@
1
- OPEN SOURCE SOFTWARE NOTICE
2
-
3
- Please note we provide an open source software notice for the third party open source software along with this software and/or this software component (in the following just “this SOFTWARE”). The open source software licenses are granted by the respective right holders.
4
-
5
- Warranty Disclaimer
6
- THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
7
-
8
- Copyright Notice and License Texts
9
-
10
- ----------------------------------------------------------------------
11
- Software: react-native-pager-view V6.7.1
12
-
13
- MIT License
14
-
15
- Copyright (c) 2021 Callstack
16
-
17
- Permission is hereby granted, free of charge, to any person obtaining a copy
18
- of this software and associated documentation files (the "Software"), to deal
19
- in the Software without restriction, including without limitation the rights
20
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
21
- copies of the Software, and to permit persons to whom the Software is
22
- furnished to do so, subject to the following conditions:
23
-
24
- The above copyright notice and this permission notice shall be included in all
25
- copies or substantial portions of the Software.
26
-
27
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
30
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33
- SOFTWARE.
@@ -1,38 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <configuration>
3
- <oatconfig>
4
- <licensefile>LICENSE</licensefile>
5
- <filefilterlist>
6
- <filefilter name="copyrightPolicyFilter" desc="Filters for compatibility,license header policies">
7
- <filteritem type="filename" name="hvigorfile.ts" desc="hvigor构建脚本,DevEco Studio自动生成,不需要添加版权头"/>
8
- <filteritem type="filename" name="*.json5" desc="hvigor工程配置文件,DevEco Studio自动生成,不需要添加版权头"/>
9
- <filteritem type="filename" name="*.proto" desc="资源文件,不需要添加版权头"/>
10
- <filteritem type="filename" name="*.json" desc="资源文件,不需要添加版权头"/>
11
- <filteritem type="filepath" name="hvigorw" desc="工程模板,不修改版权头,以防有修改版权风险"/>
12
- <filteritem type="filepath" name="hvigorw.bat" desc="工程模板,不修改版权头,以防有修改版权风险"/>
13
- <filteritem type="filepath" name="hvigor/hvigor-wrapper.js" desc="工程模板,不修改版权头,以防有修改版权风险"/>
14
- <filteritem type="filename" name="LICENSE" desc="工程文件,不修改版权头"/>
15
- </filefilter>
16
- <filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
17
- <filteritem type="filename" name="hvigorfile.ts" desc="hvigor构建脚本,DevEco Studio自动生成,不需要添加许可证头"/>
18
- <filteritem type="filename" name="*.json5" desc="hvigor工程配置文件,DevEco Studio自动生成,不需要添加许可证头"/>
19
- <filteritem type="filename" name="LICENSE" desc="原三方库证书文件无需更改,因此添加过滤"/>
20
- <filteritem type="filename" name="*.proto" desc="资源文件,不需要添加许可证头"/>
21
- <filteritem type="filename" name="*.json" desc="资源文件,不需要添加许可证头"/>
22
- <filteritem type="filepath" name="hvigorw" desc="工程模板,不修改版权头,以防有修改版权风险"/>
23
- <filteritem type="filepath" name="hvigorw.bat" desc="工程模板,不修改版权头,以防有修改版权风险"/>
24
- <filteritem type="filepath" name="hvigor/hvigor-wrapper.js" desc="工程模板,不修改版权头,以防有修改版权风险"/>
25
- </filefilter>
26
- <filefilter name="binaryFileTypePolicyFilter" desc="Filters for resources files policies">
27
- <filteritem type="filename" name="icon.png" desc="应用图标"/>
28
- <filteritem type="filename" name="app_icon.png" desc="应用图标"/>
29
- <filteritem type="filename" name="warn.png" desc="页面展示图标"/>
30
- </filefilter>
31
- </filefilterlist>
32
- <policylist>
33
- <policy name="projectPolicy" desc="">
34
- <policyitem type="license" name="MIT" path="*.*" desc="license under the MIT"/>
35
- </policy>
36
- </policylist>
37
- </oatconfig>
38
- </configuration>
@@ -1,11 +0,0 @@
1
- [
2
- {
3
- "Name": "react-native-pager-view",
4
- "License": "MIT License",
5
- "License File": "https://github.com/callstack/react-native-pager-view/blob/master/LICENSE",
6
- "Version Number": "6.7.1",
7
- "Owner" : "troZee <hello@callstack.com>",
8
- "Upstream URL": "https://github.com/callstack/react-native-pager-view",
9
- "Description": "React Native wrapper for Android, iOS, Harmony ViewPager"
10
- }
11
- ]