rn-custom-ui 1.0.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/LICENSE +20 -0
- package/README.md +477 -0
- package/lib/module/assets/images/close.png +0 -0
- package/lib/module/components/CustomCheckbox/index.js +99 -0
- package/lib/module/components/CustomCheckbox/index.js.map +1 -0
- package/lib/module/components/CustomCheckbox/styles.js +213 -0
- package/lib/module/components/CustomCheckbox/styles.js.map +1 -0
- package/lib/module/components/CustomCheckbox/types.js +4 -0
- package/lib/module/components/CustomCheckbox/types.js.map +1 -0
- package/lib/module/components/closeButton/index.js +45 -0
- package/lib/module/components/closeButton/index.js.map +1 -0
- package/lib/module/components/closeButton/types.js +4 -0
- package/lib/module/components/closeButton/types.js.map +1 -0
- package/lib/module/components/customButton/index.js +176 -0
- package/lib/module/components/customButton/index.js.map +1 -0
- package/lib/module/components/customButton/styles.js +282 -0
- package/lib/module/components/customButton/styles.js.map +1 -0
- package/lib/module/components/customButton/types.js +4 -0
- package/lib/module/components/customButton/types.js.map +1 -0
- package/lib/module/components/customDropDown/DropDownBottomSheet.js +57 -0
- package/lib/module/components/customDropDown/DropDownBottomSheet.js.map +1 -0
- package/lib/module/components/customDropDown/DropDownList.js +51 -0
- package/lib/module/components/customDropDown/DropDownList.js.map +1 -0
- package/lib/module/components/customDropDown/DropDownListItem.js +38 -0
- package/lib/module/components/customDropDown/DropDownListItem.js.map +1 -0
- package/lib/module/components/customDropDown/DropDownListModal.js +63 -0
- package/lib/module/components/customDropDown/DropDownListModal.js.map +1 -0
- package/lib/module/components/customDropDown/index.js +143 -0
- package/lib/module/components/customDropDown/index.js.map +1 -0
- package/lib/module/components/customDropDown/styles.js +189 -0
- package/lib/module/components/customDropDown/styles.js.map +1 -0
- package/lib/module/components/customDropDown/types.js +4 -0
- package/lib/module/components/customDropDown/types.js.map +1 -0
- package/lib/module/components/customDropDown/utils.js +17 -0
- package/lib/module/components/customDropDown/utils.js.map +1 -0
- package/lib/module/components/customList/ListEmpty.js +33 -0
- package/lib/module/components/customList/ListEmpty.js.map +1 -0
- package/lib/module/components/customList/ListFooterLoader.js +14 -0
- package/lib/module/components/customList/ListFooterLoader.js.map +1 -0
- package/lib/module/components/customList/defaultKeyExtractor.js +9 -0
- package/lib/module/components/customList/defaultKeyExtractor.js.map +1 -0
- package/lib/module/components/customList/getFlashList.js +19 -0
- package/lib/module/components/customList/getFlashList.js.map +1 -0
- package/lib/module/components/customList/index.js +117 -0
- package/lib/module/components/customList/index.js.map +1 -0
- package/lib/module/components/customList/styles.js +45 -0
- package/lib/module/components/customList/styles.js.map +1 -0
- package/lib/module/components/customList/types.js +4 -0
- package/lib/module/components/customList/types.js.map +1 -0
- package/lib/module/components/customModal/ModalFooter.js +44 -0
- package/lib/module/components/customModal/ModalFooter.js.map +1 -0
- package/lib/module/components/customModal/index.js +132 -0
- package/lib/module/components/customModal/index.js.map +1 -0
- package/lib/module/components/customModal/styles.js +123 -0
- package/lib/module/components/customModal/styles.js.map +1 -0
- package/lib/module/components/customModal/types.js +4 -0
- package/lib/module/components/customModal/types.js.map +1 -0
- package/lib/module/components/customModal/useCustomModal.js +23 -0
- package/lib/module/components/customModal/useCustomModal.js.map +1 -0
- package/lib/module/components/customNumberPad/NumberPadKey.js +39 -0
- package/lib/module/components/customNumberPad/NumberPadKey.js.map +1 -0
- package/lib/module/components/customNumberPad/index.js +156 -0
- package/lib/module/components/customNumberPad/index.js.map +1 -0
- package/lib/module/components/customNumberPad/styles.js +131 -0
- package/lib/module/components/customNumberPad/styles.js.map +1 -0
- package/lib/module/components/customNumberPad/types.js +4 -0
- package/lib/module/components/customNumberPad/types.js.map +1 -0
- package/lib/module/components/customNumberPad/useNumberPadInput.js +44 -0
- package/lib/module/components/customNumberPad/useNumberPadInput.js.map +1 -0
- package/lib/module/components/customNumberPad/utils.js +38 -0
- package/lib/module/components/customNumberPad/utils.js.map +1 -0
- package/lib/module/components/customSlideTabs/AnimatedTabIndicator.js +66 -0
- package/lib/module/components/customSlideTabs/AnimatedTabIndicator.js.map +1 -0
- package/lib/module/components/customSlideTabs/TabBarItem.js +61 -0
- package/lib/module/components/customSlideTabs/TabBarItem.js.map +1 -0
- package/lib/module/components/customSlideTabs/TabScene.js +88 -0
- package/lib/module/components/customSlideTabs/TabScene.js.map +1 -0
- package/lib/module/components/customSlideTabs/index.js +277 -0
- package/lib/module/components/customSlideTabs/index.js.map +1 -0
- package/lib/module/components/customSlideTabs/styles.js +132 -0
- package/lib/module/components/customSlideTabs/styles.js.map +1 -0
- package/lib/module/components/customSlideTabs/tabBarScroll.js +65 -0
- package/lib/module/components/customSlideTabs/tabBarScroll.js.map +1 -0
- package/lib/module/components/customSlideTabs/types.js +4 -0
- package/lib/module/components/customSlideTabs/types.js.map +1 -0
- package/lib/module/components/loading/index.js +34 -0
- package/lib/module/components/loading/index.js.map +1 -0
- package/lib/module/customFunctions/array.js +61 -0
- package/lib/module/customFunctions/array.js.map +1 -0
- package/lib/module/customFunctions/async.js +62 -0
- package/lib/module/customFunctions/async.js.map +1 -0
- package/lib/module/customFunctions/date.js +109 -0
- package/lib/module/customFunctions/date.js.map +1 -0
- package/lib/module/customFunctions/general.js +29 -0
- package/lib/module/customFunctions/general.js.map +1 -0
- package/lib/module/customFunctions/id.js +20 -0
- package/lib/module/customFunctions/id.js.map +1 -0
- package/lib/module/customFunctions/index.js +29 -0
- package/lib/module/customFunctions/index.js.map +1 -0
- package/lib/module/customFunctions/number.js +94 -0
- package/lib/module/customFunctions/number.js.map +1 -0
- package/lib/module/customFunctions/object.js +39 -0
- package/lib/module/customFunctions/object.js.map +1 -0
- package/lib/module/customFunctions/string.js +63 -0
- package/lib/module/customFunctions/string.js.map +1 -0
- package/lib/module/customFunctions/types.js +2 -0
- package/lib/module/customFunctions/types.js.map +1 -0
- package/lib/module/customFunctions/validation.js +34 -0
- package/lib/module/customFunctions/validation.js.map +1 -0
- package/lib/module/customHooks/errors.js +61 -0
- package/lib/module/customHooks/errors.js.map +1 -0
- package/lib/module/customHooks/fetchJson.js +36 -0
- package/lib/module/customHooks/fetchJson.js.map +1 -0
- package/lib/module/customHooks/index.js +10 -0
- package/lib/module/customHooks/index.js.map +1 -0
- package/lib/module/customHooks/internal.js +49 -0
- package/lib/module/customHooks/internal.js.map +1 -0
- package/lib/module/customHooks/types.js +2 -0
- package/lib/module/customHooks/types.js.map +1 -0
- package/lib/module/customHooks/useApi.js +91 -0
- package/lib/module/customHooks/useApi.js.map +1 -0
- package/lib/module/customHooks/useLazyApi.js +80 -0
- package/lib/module/customHooks/useLazyApi.js.map +1 -0
- package/lib/module/customHooks/useMutation.js +69 -0
- package/lib/module/customHooks/useMutation.js.map +1 -0
- package/lib/module/customHooks/usePaginatedApi.js +127 -0
- package/lib/module/customHooks/usePaginatedApi.js.map +1 -0
- package/lib/module/customHooks/usePollingApi.js +37 -0
- package/lib/module/customHooks/usePollingApi.js.map +1 -0
- package/lib/module/index.js +13 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/multiply.js +6 -0
- package/lib/module/multiply.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/components/CustomCheckbox/index.d.ts +5 -0
- package/lib/typescript/src/components/CustomCheckbox/index.d.ts.map +1 -0
- package/lib/typescript/src/components/CustomCheckbox/styles.d.ts +67 -0
- package/lib/typescript/src/components/CustomCheckbox/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/CustomCheckbox/types.d.ts +28 -0
- package/lib/typescript/src/components/CustomCheckbox/types.d.ts.map +1 -0
- package/lib/typescript/src/components/closeButton/index.d.ts +4 -0
- package/lib/typescript/src/components/closeButton/index.d.ts.map +1 -0
- package/lib/typescript/src/components/closeButton/types.d.ts +8 -0
- package/lib/typescript/src/components/closeButton/types.d.ts.map +1 -0
- package/lib/typescript/src/components/customButton/index.d.ts +5 -0
- package/lib/typescript/src/components/customButton/index.d.ts.map +1 -0
- package/lib/typescript/src/components/customButton/styles.d.ts +231 -0
- package/lib/typescript/src/components/customButton/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/customButton/types.d.ts +46 -0
- package/lib/typescript/src/components/customButton/types.d.ts.map +1 -0
- package/lib/typescript/src/components/customDropDown/DropDownBottomSheet.d.ts +18 -0
- package/lib/typescript/src/components/customDropDown/DropDownBottomSheet.d.ts.map +1 -0
- package/lib/typescript/src/components/customDropDown/DropDownList.d.ts +17 -0
- package/lib/typescript/src/components/customDropDown/DropDownList.d.ts.map +1 -0
- package/lib/typescript/src/components/customDropDown/DropDownListItem.d.ts +15 -0
- package/lib/typescript/src/components/customDropDown/DropDownListItem.d.ts.map +1 -0
- package/lib/typescript/src/components/customDropDown/DropDownListModal.d.ts +19 -0
- package/lib/typescript/src/components/customDropDown/DropDownListModal.d.ts.map +1 -0
- package/lib/typescript/src/components/customDropDown/index.d.ts +5 -0
- package/lib/typescript/src/components/customDropDown/index.d.ts.map +1 -0
- package/lib/typescript/src/components/customDropDown/styles.d.ts +190 -0
- package/lib/typescript/src/components/customDropDown/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/customDropDown/types.d.ts +37 -0
- package/lib/typescript/src/components/customDropDown/types.d.ts.map +1 -0
- package/lib/typescript/src/components/customDropDown/utils.d.ts +4 -0
- package/lib/typescript/src/components/customDropDown/utils.d.ts.map +1 -0
- package/lib/typescript/src/components/customList/ListEmpty.d.ts +10 -0
- package/lib/typescript/src/components/customList/ListEmpty.d.ts.map +1 -0
- package/lib/typescript/src/components/customList/ListFooterLoader.d.ts +3 -0
- package/lib/typescript/src/components/customList/ListFooterLoader.d.ts.map +1 -0
- package/lib/typescript/src/components/customList/defaultKeyExtractor.d.ts +2 -0
- package/lib/typescript/src/components/customList/defaultKeyExtractor.d.ts.map +1 -0
- package/lib/typescript/src/components/customList/getFlashList.d.ts +6 -0
- package/lib/typescript/src/components/customList/getFlashList.d.ts.map +1 -0
- package/lib/typescript/src/components/customList/index.d.ts +11 -0
- package/lib/typescript/src/components/customList/index.d.ts.map +1 -0
- package/lib/typescript/src/components/customList/styles.d.ts +42 -0
- package/lib/typescript/src/components/customList/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/customList/types.d.ts +33 -0
- package/lib/typescript/src/components/customList/types.d.ts.map +1 -0
- package/lib/typescript/src/components/customModal/ModalFooter.d.ts +12 -0
- package/lib/typescript/src/components/customModal/ModalFooter.d.ts.map +1 -0
- package/lib/typescript/src/components/customModal/index.d.ts +6 -0
- package/lib/typescript/src/components/customModal/index.d.ts.map +1 -0
- package/lib/typescript/src/components/customModal/styles.d.ts +83 -0
- package/lib/typescript/src/components/customModal/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/customModal/types.d.ts +36 -0
- package/lib/typescript/src/components/customModal/types.d.ts.map +1 -0
- package/lib/typescript/src/components/customModal/useCustomModal.d.ts +8 -0
- package/lib/typescript/src/components/customModal/useCustomModal.d.ts.map +1 -0
- package/lib/typescript/src/components/customNumberPad/NumberPadKey.d.ts +23 -0
- package/lib/typescript/src/components/customNumberPad/NumberPadKey.d.ts.map +1 -0
- package/lib/typescript/src/components/customNumberPad/index.d.ts +7 -0
- package/lib/typescript/src/components/customNumberPad/index.d.ts.map +1 -0
- package/lib/typescript/src/components/customNumberPad/styles.d.ts +37 -0
- package/lib/typescript/src/components/customNumberPad/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/customNumberPad/types.d.ts +47 -0
- package/lib/typescript/src/components/customNumberPad/types.d.ts.map +1 -0
- package/lib/typescript/src/components/customNumberPad/useNumberPadInput.d.ts +16 -0
- package/lib/typescript/src/components/customNumberPad/useNumberPadInput.d.ts.map +1 -0
- package/lib/typescript/src/components/customNumberPad/utils.d.ts +4 -0
- package/lib/typescript/src/components/customNumberPad/utils.d.ts.map +1 -0
- package/lib/typescript/src/components/customSlideTabs/AnimatedTabIndicator.d.ts +16 -0
- package/lib/typescript/src/components/customSlideTabs/AnimatedTabIndicator.d.ts.map +1 -0
- package/lib/typescript/src/components/customSlideTabs/TabBarItem.d.ts +23 -0
- package/lib/typescript/src/components/customSlideTabs/TabBarItem.d.ts.map +1 -0
- package/lib/typescript/src/components/customSlideTabs/TabScene.d.ts +21 -0
- package/lib/typescript/src/components/customSlideTabs/TabScene.d.ts.map +1 -0
- package/lib/typescript/src/components/customSlideTabs/index.d.ts +5 -0
- package/lib/typescript/src/components/customSlideTabs/index.d.ts.map +1 -0
- package/lib/typescript/src/components/customSlideTabs/styles.d.ts +130 -0
- package/lib/typescript/src/components/customSlideTabs/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/customSlideTabs/tabBarScroll.d.ts +15 -0
- package/lib/typescript/src/components/customSlideTabs/tabBarScroll.d.ts.map +1 -0
- package/lib/typescript/src/components/customSlideTabs/types.d.ts +68 -0
- package/lib/typescript/src/components/customSlideTabs/types.d.ts.map +1 -0
- package/lib/typescript/src/components/loading/index.d.ts +7 -0
- package/lib/typescript/src/components/loading/index.d.ts.map +1 -0
- package/lib/typescript/src/customFunctions/array.d.ts +7 -0
- package/lib/typescript/src/customFunctions/array.d.ts.map +1 -0
- package/lib/typescript/src/customFunctions/async.d.ts +9 -0
- package/lib/typescript/src/customFunctions/async.d.ts.map +1 -0
- package/lib/typescript/src/customFunctions/date.d.ts +18 -0
- package/lib/typescript/src/customFunctions/date.d.ts.map +1 -0
- package/lib/typescript/src/customFunctions/general.d.ts +7 -0
- package/lib/typescript/src/customFunctions/general.d.ts.map +1 -0
- package/lib/typescript/src/customFunctions/id.d.ts +4 -0
- package/lib/typescript/src/customFunctions/id.d.ts.map +1 -0
- package/lib/typescript/src/customFunctions/index.d.ts +26 -0
- package/lib/typescript/src/customFunctions/index.d.ts.map +1 -0
- package/lib/typescript/src/customFunctions/number.d.ts +15 -0
- package/lib/typescript/src/customFunctions/number.d.ts.map +1 -0
- package/lib/typescript/src/customFunctions/object.d.ts +6 -0
- package/lib/typescript/src/customFunctions/object.d.ts.map +1 -0
- package/lib/typescript/src/customFunctions/string.d.ts +20 -0
- package/lib/typescript/src/customFunctions/string.d.ts.map +1 -0
- package/lib/typescript/src/customFunctions/types.d.ts +22 -0
- package/lib/typescript/src/customFunctions/types.d.ts.map +1 -0
- package/lib/typescript/src/customFunctions/validation.d.ts +11 -0
- package/lib/typescript/src/customFunctions/validation.d.ts.map +1 -0
- package/lib/typescript/src/customHooks/errors.d.ts +16 -0
- package/lib/typescript/src/customHooks/errors.d.ts.map +1 -0
- package/lib/typescript/src/customHooks/fetchJson.d.ts +5 -0
- package/lib/typescript/src/customHooks/fetchJson.d.ts.map +1 -0
- package/lib/typescript/src/customHooks/index.d.ts +9 -0
- package/lib/typescript/src/customHooks/index.d.ts.map +1 -0
- package/lib/typescript/src/customHooks/internal.d.ts +12 -0
- package/lib/typescript/src/customHooks/internal.d.ts.map +1 -0
- package/lib/typescript/src/customHooks/types.d.ts +49 -0
- package/lib/typescript/src/customHooks/types.d.ts.map +1 -0
- package/lib/typescript/src/customHooks/useApi.d.ts +13 -0
- package/lib/typescript/src/customHooks/useApi.d.ts.map +1 -0
- package/lib/typescript/src/customHooks/useLazyApi.d.ts +14 -0
- package/lib/typescript/src/customHooks/useLazyApi.d.ts.map +1 -0
- package/lib/typescript/src/customHooks/useMutation.d.ts +15 -0
- package/lib/typescript/src/customHooks/useMutation.d.ts.map +1 -0
- package/lib/typescript/src/customHooks/usePaginatedApi.d.ts +19 -0
- package/lib/typescript/src/customHooks/usePaginatedApi.d.ts.map +1 -0
- package/lib/typescript/src/customHooks/usePollingApi.d.ts +13 -0
- package/lib/typescript/src/customHooks/usePollingApi.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +11 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/multiply.d.ts +2 -0
- package/lib/typescript/src/multiply.d.ts.map +1 -0
- package/package.json +181 -0
- package/src/assets/images/close.png +0 -0
- package/src/components/CustomCheckbox/index.tsx +143 -0
- package/src/components/CustomCheckbox/styles.ts +146 -0
- package/src/components/CustomCheckbox/types.ts +33 -0
- package/src/components/closeButton/index.tsx +40 -0
- package/src/components/closeButton/types.ts +13 -0
- package/src/components/customButton/index.tsx +288 -0
- package/src/components/customButton/styles.ts +247 -0
- package/src/components/customButton/types.ts +71 -0
- package/src/components/customDropDown/DropDownBottomSheet.tsx +70 -0
- package/src/components/customDropDown/DropDownList.tsx +88 -0
- package/src/components/customDropDown/DropDownListItem.tsx +74 -0
- package/src/components/customDropDown/DropDownListModal.tsx +86 -0
- package/src/components/customDropDown/index.tsx +213 -0
- package/src/components/customDropDown/styles.ts +184 -0
- package/src/components/customDropDown/types.ts +48 -0
- package/src/components/customDropDown/utils.ts +24 -0
- package/src/components/customList/ListEmpty.tsx +36 -0
- package/src/components/customList/ListFooterLoader.tsx +11 -0
- package/src/components/customList/defaultKeyExtractor.ts +7 -0
- package/src/components/customList/getFlashList.ts +26 -0
- package/src/components/customList/index.tsx +142 -0
- package/src/components/customList/styles.ts +43 -0
- package/src/components/customList/types.ts +60 -0
- package/src/components/customModal/ModalFooter.tsx +57 -0
- package/src/components/customModal/index.tsx +166 -0
- package/src/components/customModal/styles.ts +131 -0
- package/src/components/customModal/types.ts +48 -0
- package/src/components/customModal/useCustomModal.ts +25 -0
- package/src/components/customNumberPad/NumberPadKey.tsx +81 -0
- package/src/components/customNumberPad/index.tsx +204 -0
- package/src/components/customNumberPad/styles.ts +146 -0
- package/src/components/customNumberPad/types.ts +53 -0
- package/src/components/customNumberPad/useNumberPadInput.ts +56 -0
- package/src/components/customNumberPad/utils.ts +54 -0
- package/src/components/customSlideTabs/AnimatedTabIndicator.tsx +103 -0
- package/src/components/customSlideTabs/TabBarItem.tsx +118 -0
- package/src/components/customSlideTabs/TabScene.tsx +136 -0
- package/src/components/customSlideTabs/index.tsx +385 -0
- package/src/components/customSlideTabs/styles.ts +136 -0
- package/src/components/customSlideTabs/tabBarScroll.ts +92 -0
- package/src/components/customSlideTabs/types.ts +87 -0
- package/src/components/loading/index.tsx +34 -0
- package/src/customFunctions/array.ts +83 -0
- package/src/customFunctions/async.ts +85 -0
- package/src/customFunctions/date.ts +158 -0
- package/src/customFunctions/general.ts +35 -0
- package/src/customFunctions/id.ts +25 -0
- package/src/customFunctions/index.ts +91 -0
- package/src/customFunctions/number.ts +139 -0
- package/src/customFunctions/object.ts +59 -0
- package/src/customFunctions/string.ts +119 -0
- package/src/customFunctions/types.ts +25 -0
- package/src/customFunctions/validation.ts +49 -0
- package/src/customHooks/errors.ts +87 -0
- package/src/customHooks/fetchJson.ts +49 -0
- package/src/customHooks/index.ts +20 -0
- package/src/customHooks/internal.ts +67 -0
- package/src/customHooks/types.ts +71 -0
- package/src/customHooks/useApi.ts +107 -0
- package/src/customHooks/useLazyApi.ts +92 -0
- package/src/customHooks/useMutation.ts +97 -0
- package/src/customHooks/usePaginatedApi.ts +168 -0
- package/src/customHooks/usePollingApi.ts +48 -0
- package/src/index.tsx +63 -0
- package/src/multiply.tsx +3 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { type ImageStyle, type TextStyle, type ViewStyle } from 'react-native';
|
|
2
|
+
export declare const styles: Readonly<{
|
|
3
|
+
container: {
|
|
4
|
+
flex: number;
|
|
5
|
+
};
|
|
6
|
+
tabBar: {
|
|
7
|
+
flexGrow: number;
|
|
8
|
+
position: "relative";
|
|
9
|
+
overflow: "hidden";
|
|
10
|
+
};
|
|
11
|
+
tabBarContent: {
|
|
12
|
+
paddingHorizontal: number;
|
|
13
|
+
gap: number;
|
|
14
|
+
};
|
|
15
|
+
tabItem: {
|
|
16
|
+
alignItems: "center";
|
|
17
|
+
justifyContent: "center";
|
|
18
|
+
paddingHorizontal: number;
|
|
19
|
+
paddingVertical: number;
|
|
20
|
+
minWidth: number;
|
|
21
|
+
zIndex: number;
|
|
22
|
+
};
|
|
23
|
+
tabItemTransparent: {
|
|
24
|
+
backgroundColor: string;
|
|
25
|
+
};
|
|
26
|
+
tabItemActive: {
|
|
27
|
+
backgroundColor: string;
|
|
28
|
+
borderRadius: number;
|
|
29
|
+
};
|
|
30
|
+
tabContent: {
|
|
31
|
+
flexDirection: "row";
|
|
32
|
+
alignItems: "center";
|
|
33
|
+
gap: number;
|
|
34
|
+
};
|
|
35
|
+
tabImage: {
|
|
36
|
+
width: number;
|
|
37
|
+
height: number;
|
|
38
|
+
opacity: number;
|
|
39
|
+
};
|
|
40
|
+
tabImageActive: {
|
|
41
|
+
opacity: number;
|
|
42
|
+
};
|
|
43
|
+
tabText: {
|
|
44
|
+
fontSize: number;
|
|
45
|
+
fontWeight: "600";
|
|
46
|
+
color: string;
|
|
47
|
+
textTransform: "uppercase";
|
|
48
|
+
letterSpacing: number;
|
|
49
|
+
};
|
|
50
|
+
tabTextActive: {
|
|
51
|
+
color: string;
|
|
52
|
+
};
|
|
53
|
+
underline: {
|
|
54
|
+
marginTop: number;
|
|
55
|
+
height: number;
|
|
56
|
+
width: string;
|
|
57
|
+
borderRadius: number;
|
|
58
|
+
backgroundColor: string;
|
|
59
|
+
};
|
|
60
|
+
indicatorPill: {
|
|
61
|
+
position: "absolute";
|
|
62
|
+
top: number;
|
|
63
|
+
bottom: number;
|
|
64
|
+
borderRadius: number;
|
|
65
|
+
backgroundColor: string;
|
|
66
|
+
zIndex: number;
|
|
67
|
+
};
|
|
68
|
+
indicatorUnderline: {
|
|
69
|
+
position: "absolute";
|
|
70
|
+
bottom: number;
|
|
71
|
+
height: number;
|
|
72
|
+
borderRadius: number;
|
|
73
|
+
backgroundColor: string;
|
|
74
|
+
zIndex: number;
|
|
75
|
+
};
|
|
76
|
+
badge: {
|
|
77
|
+
minWidth: number;
|
|
78
|
+
height: number;
|
|
79
|
+
borderRadius: number;
|
|
80
|
+
paddingHorizontal: number;
|
|
81
|
+
alignItems: "center";
|
|
82
|
+
justifyContent: "center";
|
|
83
|
+
backgroundColor: string;
|
|
84
|
+
};
|
|
85
|
+
badgeText: {
|
|
86
|
+
fontSize: number;
|
|
87
|
+
fontWeight: "700";
|
|
88
|
+
color: string;
|
|
89
|
+
};
|
|
90
|
+
pager: {
|
|
91
|
+
flex: number;
|
|
92
|
+
};
|
|
93
|
+
scene: {
|
|
94
|
+
flex: number;
|
|
95
|
+
};
|
|
96
|
+
scenePlaceholder: {
|
|
97
|
+
flex: number;
|
|
98
|
+
alignItems: "center";
|
|
99
|
+
justifyContent: "center";
|
|
100
|
+
padding: number;
|
|
101
|
+
};
|
|
102
|
+
scenePlaceholderText: {
|
|
103
|
+
fontSize: number;
|
|
104
|
+
color: string;
|
|
105
|
+
};
|
|
106
|
+
sceneHeader: {
|
|
107
|
+
gap: number;
|
|
108
|
+
marginBottom: number;
|
|
109
|
+
};
|
|
110
|
+
sceneHeading: {
|
|
111
|
+
fontSize: number;
|
|
112
|
+
fontWeight: "700";
|
|
113
|
+
color: string;
|
|
114
|
+
};
|
|
115
|
+
sceneSubtitle: {
|
|
116
|
+
fontSize: number;
|
|
117
|
+
color: string;
|
|
118
|
+
lineHeight: number;
|
|
119
|
+
};
|
|
120
|
+
}>;
|
|
121
|
+
export declare const defaultTheme: {
|
|
122
|
+
tabItem: ViewStyle;
|
|
123
|
+
tabItemActive: ViewStyle;
|
|
124
|
+
tabImage: ImageStyle;
|
|
125
|
+
tabImageActive: ImageStyle;
|
|
126
|
+
tabText: TextStyle;
|
|
127
|
+
tabTextActive: TextStyle;
|
|
128
|
+
underline: ViewStyle;
|
|
129
|
+
};
|
|
130
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/customSlideTabs/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsHjB,CAAC;AAEH,eAAO,MAAM,YAAY;aACI,SAAS;mBACG,SAAS;cACnB,UAAU;oBACE,UAAU;aACxB,SAAS;mBACG,SAAS;eACjB,SAAS;CACzC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const TAB_BAR_HORIZONTAL_PADDING = 12;
|
|
2
|
+
export declare const TAB_BAR_ITEM_GAP = 8;
|
|
3
|
+
export type TabLayoutMetric = {
|
|
4
|
+
offset: number;
|
|
5
|
+
width: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const buildTabLayoutMetrics: (widths: Array<number | undefined>) => TabLayoutMetric[];
|
|
8
|
+
export declare const getMaxTabScrollOffset: (metrics: TabLayoutMetric[], tabBarWidth: number) => number;
|
|
9
|
+
export declare const getCenteredTabScrollOffset: (index: number, metrics: TabLayoutMetric[], tabBarWidth: number) => number | null;
|
|
10
|
+
export declare const getCenteredTabScrollOffsetFromProgress: (progress: number, metrics: TabLayoutMetric[], tabBarWidth: number) => number | null;
|
|
11
|
+
export declare const getIndicatorAtProgress: (progress: number, metrics: TabLayoutMetric[]) => {
|
|
12
|
+
left: number;
|
|
13
|
+
width: number;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=tabBarScroll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabBarScroll.d.ts","sourceRoot":"","sources":["../../../../../src/components/customSlideTabs/tabBarScroll.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAC7C,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,QAAQ,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,KAChC,eAAe,EASjB,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,SAAS,eAAe,EAAE,EAC1B,aAAa,MAAM,WAWpB,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,OAAO,MAAM,EACb,SAAS,eAAe,EAAE,EAC1B,aAAa,MAAM,KAClB,MAAM,GAAG,IAWX,CAAC;AAEF,eAAO,MAAM,sCAAsC,GACjD,UAAU,MAAM,EAChB,SAAS,eAAe,EAAE,EAC1B,aAAa,MAAM,KAClB,MAAM,GAAG,IAWX,CAAC;AAEF,eAAO,MAAM,sBAAsB,GACjC,UAAU,MAAM,EAChB,SAAS,eAAe,EAAE,KACzB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAkB/B,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react';
|
|
2
|
+
import type { ImageSourcePropType, ImageStyle, StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
3
|
+
import type { ApiFetcher } from '../../customHooks/types';
|
|
4
|
+
export type SlideTabIconComponent = ComponentType<{
|
|
5
|
+
size?: number;
|
|
6
|
+
color?: string;
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
}>;
|
|
9
|
+
export type SlideTabItem = {
|
|
10
|
+
key: string;
|
|
11
|
+
title: string;
|
|
12
|
+
/** Custom scene heading — defaults to title when omitted */
|
|
13
|
+
heading?: string;
|
|
14
|
+
/** Optional subtitle shown below scene heading */
|
|
15
|
+
subtitle?: string;
|
|
16
|
+
image?: ImageSourcePropType;
|
|
17
|
+
LeftIcon?: SlideTabIconComponent;
|
|
18
|
+
badge?: number | string;
|
|
19
|
+
};
|
|
20
|
+
export type SlideTabSceneState<TData, TError = unknown> = {
|
|
21
|
+
tab: SlideTabItem;
|
|
22
|
+
index: number;
|
|
23
|
+
isActive: boolean;
|
|
24
|
+
data: TData | null;
|
|
25
|
+
error: TError | null;
|
|
26
|
+
isIdle: boolean;
|
|
27
|
+
isLoading: boolean;
|
|
28
|
+
isSuccess: boolean;
|
|
29
|
+
isError: boolean;
|
|
30
|
+
refetch: () => Promise<TData | null | undefined>;
|
|
31
|
+
reset: () => void;
|
|
32
|
+
};
|
|
33
|
+
export type CustomSlideTabsProps<TData = unknown, TError = unknown> = {
|
|
34
|
+
tabs: SlideTabItem[];
|
|
35
|
+
renderScene: (state: SlideTabSceneState<TData, TError>) => ReactNode;
|
|
36
|
+
fetchSceneData?: (tab: SlideTabItem, index: number, signal?: AbortSignal) => Promise<TData>;
|
|
37
|
+
initialIndex?: number;
|
|
38
|
+
lazy?: boolean;
|
|
39
|
+
fetchWhenActive?: boolean;
|
|
40
|
+
refetchOnRevisit?: boolean;
|
|
41
|
+
keepPreviousSceneData?: boolean;
|
|
42
|
+
onTabChange?: (index: number, tab: SlideTabItem) => void;
|
|
43
|
+
/** Fully custom tab label — overrides default title/image layout */
|
|
44
|
+
renderTab?: (tab: SlideTabItem, index: number, isActive: boolean) => ReactNode;
|
|
45
|
+
/** Custom scene heading — overrides heading/subtitle from tab config */
|
|
46
|
+
renderSceneHeader?: (state: SlideTabSceneState<TData, TError>) => ReactNode;
|
|
47
|
+
showSceneHeading?: boolean;
|
|
48
|
+
/** Animated sliding pill + underline on the tab bar */
|
|
49
|
+
animatedIndicator?: boolean;
|
|
50
|
+
showUnderline?: boolean;
|
|
51
|
+
tabBarStyle?: StyleProp<ViewStyle>;
|
|
52
|
+
tabStyle?: StyleProp<ViewStyle>;
|
|
53
|
+
activeTabStyle?: StyleProp<ViewStyle>;
|
|
54
|
+
tabTextStyle?: StyleProp<TextStyle>;
|
|
55
|
+
activeTabTextStyle?: StyleProp<TextStyle>;
|
|
56
|
+
tabImageStyle?: StyleProp<ImageStyle>;
|
|
57
|
+
activeTabImageStyle?: StyleProp<ImageStyle>;
|
|
58
|
+
underlineStyle?: StyleProp<ViewStyle>;
|
|
59
|
+
indicatorPillStyle?: StyleProp<ViewStyle>;
|
|
60
|
+
sceneHeadingStyle?: StyleProp<TextStyle>;
|
|
61
|
+
sceneSubtitleStyle?: StyleProp<TextStyle>;
|
|
62
|
+
sceneHeaderStyle?: StyleProp<ViewStyle>;
|
|
63
|
+
sceneContainerStyle?: StyleProp<ViewStyle>;
|
|
64
|
+
sceneStyle?: StyleProp<ViewStyle>;
|
|
65
|
+
pageWidth?: number;
|
|
66
|
+
};
|
|
67
|
+
export type SlideTabFetcher<TData> = ApiFetcher<TData>;
|
|
68
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/customSlideTabs/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EACV,mBAAmB,EACnB,UAAU,EACV,SAAS,EACT,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAAC,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,IAAI;IACxD,GAAG,EAAE,YAAY,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,E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M,MAAM,GAAI,kBAAoC,KAAK,gCAUxD,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const groupBy: <T, K extends string | number>(items: T[], getKey: (item: T) => K) => Record<K, T[]>;
|
|
2
|
+
export declare const chunk: <T>(items: T[], size: number) => T[][];
|
|
3
|
+
export declare const sortBy: <T>(items: T[], selector: (item: T) => string | number, direction?: "asc" | "desc") => T[];
|
|
4
|
+
export declare const uniqueBy: <T, K>(items: T[], selector: (item: T) => K) => T[];
|
|
5
|
+
export declare const flatten: <T>(items: Array<T | T[]>) => T[];
|
|
6
|
+
export declare const shuffle: <T>(items: T[]) => T[];
|
|
7
|
+
//# sourceMappingURL=array.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../../../src/customFunctions/array.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,GAAI,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,EAClD,OAAO,CAAC,EAAE,EACV,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KACrB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAYf,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,CAAC,EAAE,OAAO,CAAC,EAAE,EAAE,MAAM,MAAM,KAAG,CAAC,EAAE,EAWtD,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,CAAC,EACtB,OAAO,CAAC,EAAE,EACV,UAAU,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GAAG,MAAM,EACtC,YAAW,KAAK,GAAG,MAAc,KAChC,CAAC,EAiBH,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,EAAE,UAAU,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAG,CAAC,EAatE,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,CAAC,EAAE,OAAO,KAAK,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,KAAG,CAAC,EAAyB,CAAC;AAE9E,eAAO,MAAM,OAAO,GAAI,CAAC,EAAE,OAAO,CAAC,EAAE,KAAG,CAAC,EAYxC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const sleep: (ms: number) => Promise<void>;
|
|
2
|
+
export declare const debounce: <T extends (...args: never[]) => void>(fn: T, delayMs: number) => {
|
|
3
|
+
(...args: Parameters<T>): void;
|
|
4
|
+
cancel(): void;
|
|
5
|
+
};
|
|
6
|
+
export declare const throttle: <T extends (...args: never[]) => void>(fn: T, intervalMs: number) => (...args: Parameters<T>) => void;
|
|
7
|
+
export declare const tryParseJson: <T = unknown>(value: string, fallback?: T | null) => T | null;
|
|
8
|
+
export declare const safeStringify: (value: unknown, space?: number, fallback?: string) => string;
|
|
9
|
+
//# sourceMappingURL=async.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../../../../src/customFunctions/async.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAI,IAAI,MAAM,KAAG,OAAO,CAAC,IAAI,CAG3C,CAAC;AAEL,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,IAAI,EAC3D,IAAI,CAAC,EACL,SAAS,MAAM;cAIa,UAAU,CAAC,CAAC,CAAC;;CAkB1C,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,IAAI,EAC3D,IAAI,CAAC,EACL,YAAY,MAAM,MAKV,GAAG,MAAM,UAAU,CAAC,CAAC,CAAC,SAuB/B,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,CAAC,GAAG,OAAO,EACtC,OAAO,MAAM,EACb,WAAU,CAAC,GAAG,IAAW,KACxB,CAAC,GAAG,IAMN,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,OAAO,OAAO,EACd,cAAS,EACT,iBAAa,KACZ,MAMF,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { LocalizedDateTimeOptions } from './types';
|
|
2
|
+
export declare const formatDateYYYYMMDD: (date?: Date) => string;
|
|
3
|
+
export declare const getIsoTimeWithoutMilliseconds: (date?: Date) => string;
|
|
4
|
+
export declare const isOlderThanHours: (timestamp: string | number, hours?: number) => boolean;
|
|
5
|
+
export declare const formatTimestampTo12Hour: (timestampMs: string | number) => string;
|
|
6
|
+
export declare const formatDateTimeLocalized: (date?: Date, options?: LocalizedDateTimeOptions) => {
|
|
7
|
+
englishDate: string;
|
|
8
|
+
frenchDate: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const parseCompactDateTime: (dateString: string) => string;
|
|
11
|
+
export declare const generateCompactTimestampId: (hoursOffset?: number) => string;
|
|
12
|
+
export declare const addDays: (date: Date, days: number) => Date;
|
|
13
|
+
export declare const differenceInDays: (from: Date, to: Date) => number;
|
|
14
|
+
export declare const differenceInMinutes: (from: Date | number, to: Date | number) => number;
|
|
15
|
+
export declare const isSameDay: (left: Date | number, right: Date | number) => boolean;
|
|
16
|
+
export declare const isToday: (date: Date | number) => boolean;
|
|
17
|
+
export declare const formatRelativeTime: (date: Date | number, now?: Date | number) => string;
|
|
18
|
+
//# sourceMappingURL=date.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../../../src/customFunctions/date.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD,eAAO,MAAM,kBAAkB,GAAI,OAAM,IAAiB,KAAG,MAM5D,CAAC;AAEF,eAAO,MAAM,6BAA6B,GACxC,OAAM,IAAiB,KACtB,MAAgD,CAAC;AAEpD,eAAO,MAAM,gBAAgB,GAC3B,WAAW,MAAM,GAAG,MAAM,EAC1B,cAAU,KACT,OAKF,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,aAAa,MAAM,GAAG,MAAM,KAC3B,MAaF,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,OAAM,IAAiB,EACvB,UAAS,wBAA6B;;;CAwBvC,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,YAAY,MAAM,KAAG,MASzD,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,oBAAe,KAAG,MAQ5D,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,MAAM,IAAI,EAAE,MAAM,MAAM,KAAG,IAIlD,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,MAAM,IAAI,EAAE,IAAI,IAAI,KAAG,MAMvD,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,MAAM,IAAI,GAAG,MAAM,EACnB,IAAI,IAAI,GAAG,MAAM,KAChB,MAKF,CAAC;AAEF,eAAO,MAAM,SAAS,GACpB,MAAM,IAAI,GAAG,MAAM,EACnB,OAAO,IAAI,GAAG,MAAM,KACnB,OASF,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,MAAM,IAAI,GAAG,MAAM,KAAG,OACjB,CAAC;AAE9B,eAAO,MAAM,kBAAkB,GAC7B,MAAM,IAAI,GAAG,MAAM,EACnB,MAAK,IAAI,GAAG,MAAmB,KAC9B,MAuBF,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LoggerPayload } from './types';
|
|
2
|
+
export declare const logger: ({ msg, data }: LoggerPayload) => void;
|
|
3
|
+
export declare const isNullish: (value: unknown) => value is null | undefined;
|
|
4
|
+
export declare const isEmpty: (value: unknown) => boolean;
|
|
5
|
+
export declare const isDefined: <T>(value: T | null | undefined) => value is T;
|
|
6
|
+
export declare const noop: () => void;
|
|
7
|
+
//# sourceMappingURL=general.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../../../src/customFunctions/general.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,eAAO,MAAM,MAAM,GAAI,eAAoB,aAAa,SAIvD,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,IAAI,GAAG,SACpB,CAAC;AAExC,eAAO,MAAM,OAAO,GAAI,OAAO,OAAO,KAAG,OAkBxC,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,CAAC,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,KAAG,KAAK,IAAI,CAC7B,CAAC;AAExC,eAAO,MAAM,IAAI,YAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../../../src/customFunctions/id.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,0BAA0B,GAAI,eAAW,KAAG,MAUxD,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,qBAAiB,KAAG,MAGrD,CAAC;AAEF,eAAO,MAAM,YAAY,QAAO,MAK5B,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export { chunk, flatten, groupBy, shuffle, sortBy, uniqueBy } from './array';
|
|
2
|
+
export { debounce, safeStringify, sleep, throttle, tryParseJson, } from './async';
|
|
3
|
+
export { addDays, differenceInDays, differenceInMinutes, formatDateYYYYMMDD, formatDateTimeLocalized, formatRelativeTime, formatTimestampTo12Hour, generateCompactTimestampId, getIsoTimeWithoutMilliseconds, isOlderThanHours, isSameDay, isToday, parseCompactDateTime, } from './date';
|
|
4
|
+
export { isDefined, isEmpty, isNullish, logger, noop } from './general';
|
|
5
|
+
export { generateRandomAlphanumeric, generateSessionId, generateUuid, } from './id';
|
|
6
|
+
export { average, clamp, formatBytes, formatCurrency, formatDiscountAmount, formatNumberWithCommas, formatPercentage, generateRandomNumberString, parseNumberSafe, percentage, randomInt, roundToDecimals, sum, } from './number';
|
|
7
|
+
export { deepClone, getNestedValue, isPlainObject, omit, pick } from './object';
|
|
8
|
+
export { camelToTitle, capitalizeFirst, capitalizeWords, findItemByProperty, getLocalizedSplitText, initialsFromName, maskString, normalizeWhitespace, removeDuplicateStrings, removeDuplicates, slugify, truncate, } from './string';
|
|
9
|
+
export type { CurrencyLocale, FormatCurrencyOptions, FormatNumberOptions, LocalizedDateTimeOptions, LoggerPayload, } from './types';
|
|
10
|
+
export { encodePlusInEmail, isNumeric, isStrongPassword, isValidEmail, isValidPhone, isValidUrl, } from './validation';
|
|
11
|
+
export { isOlderThanHours as isUpdateAppSession } from './date';
|
|
12
|
+
export { capitalizeFirst as getFirstCap } from './string';
|
|
13
|
+
export { formatCurrency as getFrAmount } from './number';
|
|
14
|
+
export { formatDateYYYYMMDD as getFormattedDate } from './date';
|
|
15
|
+
export { getIsoTimeWithoutMilliseconds as getCurrentTime } from './date';
|
|
16
|
+
export { generateCompactTimestampId as getUniqueId } from './date';
|
|
17
|
+
export { formatTimestampTo12Hour as getLastScannedTime } from './date';
|
|
18
|
+
export { formatDateTimeLocalized as getPrintDate } from './date';
|
|
19
|
+
export { parseCompactDateTime as formatToEST } from './date';
|
|
20
|
+
export { generateRandomAlphanumeric as paymentServiceId } from './id';
|
|
21
|
+
export { generateSessionId as generateAppSessionId } from './id';
|
|
22
|
+
export { generateSessionId as generateUserSessionId } from './id';
|
|
23
|
+
export { generateUuid as generateCartSessionId } from './id';
|
|
24
|
+
export { findItemByProperty as getCurrentScreen } from './string';
|
|
25
|
+
export { getLocalizedSplitText as getTextByLanguage } from './string';
|
|
26
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/customFunctions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,E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AI,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAChE,OAAO,EAAE,eAAe,IAAI,WAAW,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,cAAc,IAAI,WAAW,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EAAE,kBAAkB,IAAI,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAChE,OAAO,EAAE,6BAA6B,IAAI,cAAc,EAAE,MAAM,QAAQ,CAAC;AACzE,OAAO,EAAE,0BAA0B,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAC;AACnE,OAAO,EAAE,uBAAuB,IAAI,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AACvE,OAAO,EAAE,uBAAuB,IAAI,YAAY,EAAE,MAAM,QAAQ,CAAC;AACjE,OAAO,EAAE,oBAAoB,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC7D,OAAO,EAAE,0BAA0B,IAAI,gBAAgB,EAAE,MAAM,MAAM,CAAC;AACtE,OAAO,EAAE,iBAAiB,IAAI,oBAAoB,EAAE,MAAM,MAAM,CAAC;AACjE,OAAO,EAAE,iBAAiB,IAAI,qBAAqB,EAAE,MAAM,MAAM,CAAC;AAClE,OAAO,EAAE,YAAY,IAAI,qBAAqB,EAAE,MAAM,MAAM,CAAC;AAC7D,OAAO,EAAE,kBAAkB,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAClE,OAAO,EAAE,qBAAqB,IAAI,iBAAiB,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { FormatCurrencyOptions, FormatNumberOptions } from './types';
|
|
2
|
+
export declare const parseNumberSafe: (value: number | string | null | undefined) => number;
|
|
3
|
+
export declare const formatNumberWithCommas: (value: number | string | null | undefined, options?: FormatNumberOptions) => string;
|
|
4
|
+
export declare const formatCurrency: (amount: number | string | null | undefined, options?: FormatCurrencyOptions) => string;
|
|
5
|
+
export declare const formatDiscountAmount: (discount: number | string | undefined, options?: FormatCurrencyOptions) => string | number;
|
|
6
|
+
export declare const generateRandomNumberString: (length: number) => string;
|
|
7
|
+
export declare const roundToDecimals: (value: number | string, decimals?: number) => number;
|
|
8
|
+
export declare const clamp: (value: number, min: number, max: number) => number;
|
|
9
|
+
export declare const formatPercentage: (value: number | string, decimals?: number, locale?: string) => string;
|
|
10
|
+
export declare const percentage: (part: number, total: number) => number;
|
|
11
|
+
export declare const formatBytes: (bytes: number, decimals?: number) => string;
|
|
12
|
+
export declare const randomInt: (min: number, max: number) => number;
|
|
13
|
+
export declare const sum: (values: Array<number | string>) => number;
|
|
14
|
+
export declare const average: (values: Array<number | string>) => number;
|
|
15
|
+
//# sourceMappingURL=number.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../../../src/customFunctions/number.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAO1E,eAAO,MAAM,eAAe,UALC,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,MAKvB,CAAC;AAE5C,eAAO,MAAM,sBAAsB,GACjC,OAAO,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,EACzC,UAAS,mBAAwB,KAChC,MAWF,CAAC;AAEF,eAAO,MAAM,cAAc,GACzB,QAAQ,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,EAC1C,UAAS,qBAA0B,KAClC,MA0BF,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,UAAU,MAAM,GAAG,MAAM,GAAG,SAAS,EACrC,UAAS,qBAA0B,KAClC,MAAM,GAAG,MAOX,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,QAAQ,MAAM,KAAG,MAS3D,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,OAAO,MAAM,GAAG,MAAM,EACtB,iBAAY,KACX,MAGF,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,KAAG,MAC3B,CAAC;AAEtC,eAAO,MAAM,gBAAgB,GAC3B,OAAO,MAAM,GAAG,MAAM,EACtB,iBAAY,EACZ,eAAgB,KACf,MAII,CAAC;AAER,eAAO,MAAM,UAAU,GAAI,MAAM,MAAM,EAAE,OAAO,MAAM,KAAG,MAMxD,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,EAAE,iBAAY,KAAG,MAazD,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,KAAK,MAAM,EAAE,KAAK,MAAM,KAAG,MAIpD,CAAC;AAEF,eAAO,MAAM,GAAG,GAAI,QAAQ,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,KAAG,MACoB,CAAC;AAE1E,eAAO,MAAM,OAAO,GAAI,QAAQ,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,KAAG,MAMxD,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const pick: <T extends object, K extends keyof T>(object: T, keys: K[]) => Pick<T, K>;
|
|
2
|
+
export declare const omit: <T extends object, K extends keyof T>(object: T, keys: K[]) => Omit<T, K>;
|
|
3
|
+
export declare const deepClone: <T>(value: T) => T;
|
|
4
|
+
export declare const isPlainObject: (value: unknown) => value is Record<string, unknown>;
|
|
5
|
+
export declare const getNestedValue: <T = unknown>(object: Record<string, unknown>, path: string, fallback?: T) => T | undefined;
|
|
6
|
+
//# sourceMappingURL=object.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../../src/customFunctions/object.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,GAAI,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,CAAC,EACtD,QAAQ,CAAC,EACT,MAAM,CAAC,EAAE,KACR,IAAI,CAAC,CAAC,EAAE,CAAC,CAUX,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,CAAC,EACtD,QAAQ,CAAC,EACT,MAAM,CAAC,EAAE,KACR,IAAI,CAAC,CAAC,EAAE,CAAC,CAQX,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,CAAC,EAAE,OAAO,CAAC,KAAG,CAMvC,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,OAAO,OAAO,KACb,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CACoC,CAAC;AAEvE,eAAO,MAAM,cAAc,GAAI,CAAC,GAAG,OAAO,EACxC,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,MAAM,MAAM,EACZ,WAAW,CAAC,KACX,CAAC,GAAG,SAaN,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const capitalizeFirst: (value: string) => string;
|
|
2
|
+
export declare const getLocalizedSplitText: (text: string | undefined, language: string, options?: {
|
|
3
|
+
englishCode?: string;
|
|
4
|
+
delimiter?: string;
|
|
5
|
+
}) => string;
|
|
6
|
+
export declare const removeDuplicates: <T>(items: T[]) => T[];
|
|
7
|
+
export declare const removeDuplicateStrings: (items: string[]) => string[];
|
|
8
|
+
export declare const findItemByProperty: <T extends Record<string, unknown>>(items: T[] | null | undefined, property: keyof T, value: unknown) => T | undefined;
|
|
9
|
+
export declare const truncate: (value: string, maxLength: number, suffix?: string) => string;
|
|
10
|
+
export declare const capitalizeWords: (value: string) => string;
|
|
11
|
+
export declare const slugify: (value: string) => string;
|
|
12
|
+
export declare const maskString: (value: string, options?: {
|
|
13
|
+
visibleStart?: number;
|
|
14
|
+
visibleEnd?: number;
|
|
15
|
+
maskChar?: string;
|
|
16
|
+
}) => string;
|
|
17
|
+
export declare const normalizeWhitespace: (value: string) => string;
|
|
18
|
+
export declare const initialsFromName: (fullName: string, maxInitials?: number) => string;
|
|
19
|
+
export declare const camelToTitle: (value: string) => string;
|
|
20
|
+
//# sourceMappingURL=string.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../../src/customFunctions/string.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,KAAG,MAM/C,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,MAAM,MAAM,GAAG,SAAS,EACxB,UAAU,MAAM,EAChB,UAAU;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,KACrD,MAkBF,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,CAAC,EAAE,OAAO,CAAC,EAAE,KAAG,CAAC,EACtB,CAAC;AAE7B,eAAO,MAAM,sBAAsB,GAAI,OAAO,MAAM,EAAE,KAAG,MAAM,EACtC,CAAC;AAE1B,eAAO,MAAM,kBAAkB,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClE,OAAO,CAAC,EAAE,GAAG,IAAI,GAAG,SAAS,EAC7B,UAAU,MAAM,CAAC,EACjB,OAAO,OAAO,KACb,CAAC,GAAG,SAMN,CAAC;AAEF,eAAO,MAAM,QAAQ,GACnB,OAAO,MAAM,EACb,WAAW,MAAM,EACjB,eAAc,KACb,MAMF,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,KAAG,MAMlC,CAAC;AAEf,eAAO,MAAM,OAAO,GAAI,OAAO,MAAM,KAAG,MAMhB,CAAC;AAEzB,eAAO,MAAM,UAAU,GACrB,OAAO,MAAM,EACb,UAAS;IACP,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACd,KACL,MAgBF,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,OAAO,MAAM,KAAG,MACjB,CAAC;AAEpC,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,EAAE,oBAAe,KAAG,MAOpE,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,MAG1C,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type CurrencyLocale = 'en-US' | 'en-CA' | 'fr-CA' | 'fr-FR' | string;
|
|
2
|
+
export type FormatCurrencyOptions = {
|
|
3
|
+
locale?: CurrencyLocale;
|
|
4
|
+
currency?: string;
|
|
5
|
+
isDiscount?: boolean;
|
|
6
|
+
minimumFractionDigits?: number;
|
|
7
|
+
maximumFractionDigits?: number;
|
|
8
|
+
};
|
|
9
|
+
export type FormatNumberOptions = {
|
|
10
|
+
locale?: string;
|
|
11
|
+
minimumFractionDigits?: number;
|
|
12
|
+
maximumFractionDigits?: number;
|
|
13
|
+
};
|
|
14
|
+
export type LocalizedDateTimeOptions = {
|
|
15
|
+
englishLocale?: string;
|
|
16
|
+
frenchLocale?: string;
|
|
17
|
+
};
|
|
18
|
+
export type LoggerPayload = {
|
|
19
|
+
msg?: string;
|
|
20
|
+
data?: unknown;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/customFunctions/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAE5E,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const isValidEmail: (email: string) => boolean;
|
|
2
|
+
export declare const isValidUrl: (value: string) => boolean;
|
|
3
|
+
export declare const isValidPhone: (value: string) => boolean;
|
|
4
|
+
export declare const isNumeric: (value: string | number) => boolean;
|
|
5
|
+
export declare const isStrongPassword: (password: string, options?: {
|
|
6
|
+
minLength?: number;
|
|
7
|
+
requireNumber?: boolean;
|
|
8
|
+
requireLetter?: boolean;
|
|
9
|
+
}) => boolean;
|
|
10
|
+
export declare const encodePlusInEmail: (email: string) => string;
|
|
11
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../../src/customFunctions/validation.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,OAAkC,CAAC;AAEhF,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,KAAG,OACb,CAAC;AAE/B,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,OACb,CAAC;AAEjC,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,GAAG,MAAM,KAAG,OACT,CAAC;AAE3C,eAAO,MAAM,gBAAgB,GAC3B,UAAU,MAAM,EAChB,UAAS;IACP,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;CACpB,KACL,OAgBF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,OAAO,MAAM,KAAG,MAMjD,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ApiErrorLike } from './types';
|
|
2
|
+
export declare class ApiError extends Error implements ApiErrorLike {
|
|
3
|
+
status?: number;
|
|
4
|
+
code?: string;
|
|
5
|
+
details?: unknown;
|
|
6
|
+
constructor(message: string, options?: {
|
|
7
|
+
status?: number;
|
|
8
|
+
code?: string;
|
|
9
|
+
details?: unknown;
|
|
10
|
+
cause?: unknown;
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
export declare const isApiError: (error: unknown) => error is ApiError;
|
|
14
|
+
export declare const toApiError: (error: unknown) => ApiError;
|
|
15
|
+
export declare const getApiErrorMessage: (error: unknown, fallback?: string) => string;
|
|
16
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/customHooks/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,qBAAa,QAAS,SAAQ,KAAM,YAAW,YAAY;IACzD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;gBAGhB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE;QACP,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,KAAK,CAAC,EAAE,OAAO,CAAC;KACZ;CAQT;AAED,eAAO,MAAM,UAAU,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,QAC1B,CAAC;AAE5B,eAAO,MAAM,UAAU,GAAI,OAAO,OAAO,KAAG,QAoC3C,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAC7B,OAAO,OAAO,EACd,iBAAiC,KAChC,MAkBF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchJson.d.ts","sourceRoot":"","sources":["../../../../src/customHooks/fetchJson.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG;IAC3C,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,SAAS,GAAU,SAAS,EACvC,OAAO,WAAW,GAAG,GAAG,EACxB,UAAS,gBAAqB,KAC7B,OAAO,CAAC,SAAS,CAuCnB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { ApiError, getApiErrorMessage, isApiError, toApiError } from './errors';
|
|
2
|
+
export { fetchJson, type FetchJsonOptions } from './fetchJson';
|
|
3
|
+
export { useApi } from './useApi';
|
|
4
|
+
export { useLazyApi } from './useLazyApi';
|
|
5
|
+
export { useMutation } from './useMutation';
|
|
6
|
+
export { usePaginatedApi } from './usePaginatedApi';
|
|
7
|
+
export { usePollingApi } from './usePollingApi';
|
|
8
|
+
export type { ApiErrorLike, ApiFetcher, ApiStatus, ApiStatusFlags, PaginatedFetcher, PaginatedResponse, UseApiOptions, UseLazyApiOptions, UseMutationOptions, UsePaginatedApiOptions, UsePollingApiOptions, } from './types';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/customHooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EACV,YAAY,EACZ,UAAU,EACV,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ApiStatus, ApiStatusFlags } from './types';
|
|
2
|
+
export declare const useDependencyKey: (deps: ReadonlyArray<unknown>) => string;
|
|
3
|
+
export declare const getStatusFlags: (status: ApiStatus) => ApiStatusFlags;
|
|
4
|
+
export declare const useIsMounted: () => import("react").RefObject<boolean>;
|
|
5
|
+
export declare const useAbortControllerRef: () => {
|
|
6
|
+
abortRef: import("react").RefObject<AbortController | null>;
|
|
7
|
+
abort: () => void;
|
|
8
|
+
create: () => AbortController;
|
|
9
|
+
};
|
|
10
|
+
export declare const normalizeApiError: <TError>(error: unknown) => TError;
|
|
11
|
+
export declare const isAbortError: (error: unknown) => boolean;
|
|
12
|
+
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../../src/customHooks/internal.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzD,eAAO,MAAM,gBAAgB,GAAI,MAAM,aAAa,CAAC,OAAO,CAAC,WACvC,CAAC;AAEvB,eAAO,MAAM,cAAc,GAAI,QAAQ,SAAS,KAAG,cAMjD,CAAC;AAEH,eAAO,MAAM,YAAY,0CAYxB,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;CAkBjC,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,MAAM,EAAE,OAAO,OAAO,KAAG,MAC9B,CAAC;AAE9B,eAAO,MAAM,YAAY,GAAI,OAAO,OAAO,YAa1C,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export type ApiStatus = 'idle' | 'loading' | 'success' | 'error';
|
|
2
|
+
export type ApiStatusFlags = {
|
|
3
|
+
status: ApiStatus;
|
|
4
|
+
isIdle: boolean;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
isSuccess: boolean;
|
|
7
|
+
isError: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type ApiFetcher<TData> = (signal?: AbortSignal) => Promise<TData>;
|
|
10
|
+
export type ApiErrorLike = {
|
|
11
|
+
message: string;
|
|
12
|
+
status?: number;
|
|
13
|
+
code?: string;
|
|
14
|
+
details?: unknown;
|
|
15
|
+
};
|
|
16
|
+
export type UseApiOptions<TData, TError = ApiErrorLike> = {
|
|
17
|
+
enabled?: boolean;
|
|
18
|
+
initialData?: TData | null;
|
|
19
|
+
deps?: ReadonlyArray<unknown>;
|
|
20
|
+
keepPreviousData?: boolean;
|
|
21
|
+
onSuccess?: (data: TData) => void;
|
|
22
|
+
onError?: (error: TError) => void;
|
|
23
|
+
onSettled?: (data: TData | null, error: TError | null) => void;
|
|
24
|
+
};
|
|
25
|
+
export type UseLazyApiOptions<TData, TError = ApiErrorLike> = Omit<UseApiOptions<TData, TError>, 'enabled'>;
|
|
26
|
+
export type UseMutationOptions<TData, TVariables, TError = ApiErrorLike> = {
|
|
27
|
+
onSuccess?: (data: TData, variables: TVariables) => void;
|
|
28
|
+
onError?: (error: TError, variables: TVariables) => void;
|
|
29
|
+
onSettled?: (data: TData | null, error: TError | null, variables: TVariables) => void;
|
|
30
|
+
};
|
|
31
|
+
export type PaginatedResponse<TItem> = {
|
|
32
|
+
items: TItem[];
|
|
33
|
+
hasMore: boolean;
|
|
34
|
+
total?: number;
|
|
35
|
+
};
|
|
36
|
+
export type PaginatedFetcher<TItem> = (page: number, signal?: AbortSignal) => Promise<PaginatedResponse<TItem>>;
|
|
37
|
+
export type UsePaginatedApiOptions<TItem, TError = ApiErrorLike> = {
|
|
38
|
+
enabled?: boolean;
|
|
39
|
+
initialPage?: number;
|
|
40
|
+
deps?: ReadonlyArray<unknown>;
|
|
41
|
+
onSuccess?: (response: PaginatedResponse<TItem>, page: number) => void;
|
|
42
|
+
onError?: (error: TError, page: number) => void;
|
|
43
|
+
};
|
|
44
|
+
export type UsePollingApiOptions<TData, TError = ApiErrorLike> = UseApiOptions<TData, TError> & {
|
|
45
|
+
intervalMs: number;
|
|
46
|
+
pollWhenHidden?: boolean;
|
|
47
|
+
pauseOnError?: boolean;
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/customHooks/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAEjE,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,SAAS,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,UAAU,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC;AAEzE,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,IAAI;IACxD,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,WAAW,KACjB,OAAO,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC;AAEvC,MAAM,MAAM,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,IAAI;IACjE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9B,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACjD,CAAC;AAEF,MAAM,MAAM,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,IAAI,aAAa,CAC5E,KAAK,EACL,MAAM,CACP,GAAG;IACF,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ApiFetcher, ApiStatus, UseApiOptions } from './types';
|
|
2
|
+
export declare const useApi: <TData, TError = unknown>(fetcher: ApiFetcher<TData>, options?: UseApiOptions<TData, TError>) => {
|
|
3
|
+
refetch: () => Promise<TData | null>;
|
|
4
|
+
reset: () => void;
|
|
5
|
+
status: ApiStatus;
|
|
6
|
+
isIdle: boolean;
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
isSuccess: boolean;
|
|
9
|
+
isError: boolean;
|
|
10
|
+
data: TData | null;
|
|
11
|
+
error: TError | null;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=useApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useApi.d.ts","sourceRoot":"","sources":["../../../../src/customHooks/useApi.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEpE,eAAO,MAAM,MAAM,GAAI,KAAK,EAAE,MAAM,GAAG,OAAO,EAC5C,SAAS,UAAU,CAAC,KAAK,CAAC,EAC1B,UAAS,aAAa,CAAC,KAAK,EAAE,MAAM,CAAM;;;;;;;;;;CA4F3C,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ApiFetcher, ApiStatus, UseLazyApiOptions } from './types';
|
|
2
|
+
export declare const useLazyApi: <TData, TError = unknown>(fetcher: ApiFetcher<TData>, options?: UseLazyApiOptions<TData, TError>) => {
|
|
3
|
+
execute: () => Promise<TData | null>;
|
|
4
|
+
refetch: () => Promise<TData | null>;
|
|
5
|
+
reset: () => void;
|
|
6
|
+
status: ApiStatus;
|
|
7
|
+
isIdle: boolean;
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
isSuccess: boolean;
|
|
10
|
+
isError: boolean;
|
|
11
|
+
data: TData | null;
|
|
12
|
+
error: TError | null;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=useLazyApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLazyApi.d.ts","sourceRoot":"","sources":["../../../../src/customHooks/useLazyApi.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAExE,eAAO,MAAM,UAAU,GAAI,KAAK,EAAE,MAAM,GAAG,OAAO,EAChD,SAAS,UAAU,CAAC,KAAK,CAAC,EAC1B,UAAS,iBAAiB,CAAC,KAAK,EAAE,MAAM,CAAM;;;;;;;;;;;CA8E/C,CAAC"}
|