@lichens-innovation/react-native-common 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +194 -0
- package/dist/components/battery/battery-level.d.ts +9 -0
- package/dist/components/battery/battery-level.js +9 -0
- package/dist/components/battery/battery-level.js.map +1 -0
- package/dist/components/battery/battery.utils.d.ts +2 -0
- package/dist/components/battery/battery.utils.js +25 -0
- package/dist/components/battery/battery.utils.js.map +1 -0
- package/dist/components/battery/index.d.ts +2 -0
- package/dist/components/battery/index.js +3 -0
- package/dist/components/battery/index.js.map +1 -0
- package/dist/components/bottom-sheet/bottom-sheet.constants.d.ts +1 -0
- package/dist/components/bottom-sheet/bottom-sheet.constants.js +2 -0
- package/dist/components/bottom-sheet/bottom-sheet.constants.js.map +1 -0
- package/dist/components/bottom-sheet/default-backdrop.d.ts +3 -0
- package/dist/components/bottom-sheet/default-backdrop.js +4 -0
- package/dist/components/bottom-sheet/default-backdrop.js.map +1 -0
- package/dist/components/bottom-sheet/default-backdrop.windows.d.ts +2 -0
- package/dist/components/bottom-sheet/default-backdrop.windows.js +3 -0
- package/dist/components/bottom-sheet/default-backdrop.windows.js.map +1 -0
- package/dist/components/bottom-sheet/default-sheet-background.d.ts +3 -0
- package/dist/components/bottom-sheet/default-sheet-background.js +8 -0
- package/dist/components/bottom-sheet/default-sheet-background.js.map +1 -0
- package/dist/components/bottom-sheet/index.d.ts +4 -0
- package/dist/components/bottom-sheet/index.js +5 -0
- package/dist/components/bottom-sheet/index.js.map +1 -0
- package/dist/components/bottom-sheet/use-bottom-sheet-toggler.d.ts +7 -0
- package/dist/components/bottom-sheet/use-bottom-sheet-toggler.js +39 -0
- package/dist/components/bottom-sheet/use-bottom-sheet-toggler.js.map +1 -0
- package/dist/components/code-scanner/barcode-scanner-dialog.d.ts +11 -0
- package/dist/components/code-scanner/barcode-scanner-dialog.js +32 -0
- package/dist/components/code-scanner/barcode-scanner-dialog.js.map +1 -0
- package/dist/components/code-scanner/barcode-scanner.d.ts +7 -0
- package/dist/components/code-scanner/barcode-scanner.js +34 -0
- package/dist/components/code-scanner/barcode-scanner.js.map +1 -0
- package/dist/components/code-scanner/barcode-scanner.utils.d.ts +4 -0
- package/dist/components/code-scanner/barcode-scanner.utils.js +38 -0
- package/dist/components/code-scanner/barcode-scanner.utils.js.map +1 -0
- package/dist/components/code-scanner/index.d.ts +3 -0
- package/dist/components/code-scanner/index.js +4 -0
- package/dist/components/code-scanner/index.js.map +1 -0
- package/dist/components/dialogs/dialog-close-only.d.ts +12 -0
- package/dist/components/dialogs/dialog-close-only.js +39 -0
- package/dist/components/dialogs/dialog-close-only.js.map +1 -0
- package/dist/components/dialogs/dialog-ok-cancel.d.ts +13 -0
- package/dist/components/dialogs/dialog-ok-cancel.js +44 -0
- package/dist/components/dialogs/dialog-ok-cancel.js.map +1 -0
- package/dist/components/dialogs/dialog-syntax-color-result.d.ts +14 -0
- package/dist/components/dialogs/dialog-syntax-color-result.js +47 -0
- package/dist/components/dialogs/dialog-syntax-color-result.js.map +1 -0
- package/dist/components/dialogs/index.d.ts +4 -0
- package/dist/components/dialogs/index.js +5 -0
- package/dist/components/dialogs/index.js.map +1 -0
- package/dist/components/dialogs/use-dialog-styles.d.ts +4 -0
- package/dist/components/dialogs/use-dialog-styles.js +13 -0
- package/dist/components/dialogs/use-dialog-styles.js.map +1 -0
- package/dist/components/drop-down-selector/drop-down-selector.d.ts +15 -0
- package/dist/components/drop-down-selector/drop-down-selector.js +59 -0
- package/dist/components/drop-down-selector/drop-down-selector.js.map +1 -0
- package/dist/components/drop-down-selector/drop-down-selector.windows.d.ts +2 -0
- package/dist/components/drop-down-selector/drop-down-selector.windows.js +3 -0
- package/dist/components/drop-down-selector/drop-down-selector.windows.js.map +1 -0
- package/dist/components/drop-down-selector/index.d.ts +1 -0
- package/dist/components/drop-down-selector/index.js +2 -0
- package/dist/components/drop-down-selector/index.js.map +1 -0
- package/dist/components/error/error-boundary-screen.d.ts +2 -0
- package/dist/components/error/error-boundary-screen.js +35 -0
- package/dist/components/error/error-boundary-screen.js.map +1 -0
- package/dist/components/error/error-boundary-screen.windows.d.ts +2 -0
- package/dist/components/error/error-boundary-screen.windows.js +3 -0
- package/dist/components/error/error-boundary-screen.windows.js.map +1 -0
- package/dist/components/error/error-boundary.d.ts +3 -0
- package/dist/components/error/error-boundary.js +27 -0
- package/dist/components/error/error-boundary.js.map +1 -0
- package/dist/components/error/error-boundary.windows.d.ts +2 -0
- package/dist/components/error/error-boundary.windows.js +3 -0
- package/dist/components/error/error-boundary.windows.js.map +1 -0
- package/dist/components/error/error-details.d.ts +7 -0
- package/dist/components/error/error-details.js +32 -0
- package/dist/components/error/error-details.js.map +1 -0
- package/dist/components/error/index.d.ts +4 -0
- package/dist/components/error/index.js +5 -0
- package/dist/components/error/index.js.map +1 -0
- package/dist/components/error/use-error-details.d.ts +7 -0
- package/dist/components/error/use-error-details.js +19 -0
- package/dist/components/error/use-error-details.js.map +1 -0
- package/dist/components/event-logs/event-logs-screen.d.ts +2 -0
- package/dist/components/event-logs/event-logs-screen.js +63 -0
- package/dist/components/event-logs/event-logs-screen.js.map +1 -0
- package/dist/components/event-logs/index.d.ts +2 -0
- package/dist/components/event-logs/index.js +3 -0
- package/dist/components/event-logs/index.js.map +1 -0
- package/dist/components/event-logs/live-logs-viewer/index.d.ts +6 -0
- package/dist/components/event-logs/live-logs-viewer/index.js +7 -0
- package/dist/components/event-logs/live-logs-viewer/index.js.map +1 -0
- package/dist/components/event-logs/live-logs-viewer/log-entry-item-suffix.d.ts +7 -0
- package/dist/components/event-logs/live-logs-viewer/log-entry-item-suffix.js +6 -0
- package/dist/components/event-logs/live-logs-viewer/log-entry-item-suffix.js.map +1 -0
- package/dist/components/event-logs/live-logs-viewer/log-entry-item.d.ts +7 -0
- package/dist/components/event-logs/live-logs-viewer/log-entry-item.js +35 -0
- package/dist/components/event-logs/live-logs-viewer/log-entry-item.js.map +1 -0
- package/dist/components/event-logs/live-logs-viewer/logs-viewer.d.ts +7 -0
- package/dist/components/event-logs/live-logs-viewer/logs-viewer.js +44 -0
- package/dist/components/event-logs/live-logs-viewer/logs-viewer.js.map +1 -0
- package/dist/components/event-logs/live-logs-viewer/logs-viewer.utils.d.ts +1 -0
- package/dist/components/event-logs/live-logs-viewer/logs-viewer.utils.js +6 -0
- package/dist/components/event-logs/live-logs-viewer/logs-viewer.utils.js.map +1 -0
- package/dist/components/event-logs/live-logs-viewer/use-auto-scroll.d.ts +7 -0
- package/dist/components/event-logs/live-logs-viewer/use-auto-scroll.js +20 -0
- package/dist/components/event-logs/live-logs-viewer/use-auto-scroll.js.map +1 -0
- package/dist/components/event-logs/live-logs-viewer/use-logs-actions.d.ts +6 -0
- package/dist/components/event-logs/live-logs-viewer/use-logs-actions.js +24 -0
- package/dist/components/event-logs/live-logs-viewer/use-logs-actions.js.map +1 -0
- package/dist/components/header-actions/header-back-button.d.ts +2 -0
- package/dist/components/header-actions/header-back-button.js +5 -0
- package/dist/components/header-actions/header-back-button.js.map +1 -0
- package/dist/components/header-actions/header-back-button.windows.d.ts +2 -0
- package/dist/components/header-actions/header-back-button.windows.js +3 -0
- package/dist/components/header-actions/header-back-button.windows.js.map +1 -0
- package/dist/components/header-actions/header-button.d.ts +7 -0
- package/dist/components/header-actions/header-button.js +18 -0
- package/dist/components/header-actions/header-button.js.map +1 -0
- package/dist/components/header-actions/index.d.ts +2 -0
- package/dist/components/header-actions/index.js +3 -0
- package/dist/components/header-actions/index.js.map +1 -0
- package/dist/components/index.d.ts +16 -0
- package/dist/components/index.js +17 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/language-selector/index.d.ts +4 -0
- package/dist/components/language-selector/index.js +5 -0
- package/dist/components/language-selector/index.js.map +1 -0
- package/dist/components/language-selector/language-selector-menu.d.ts +3 -0
- package/dist/components/language-selector/language-selector-menu.js +13 -0
- package/dist/components/language-selector/language-selector-menu.js.map +1 -0
- package/dist/components/language-selector/language-selector-segmented.d.ts +3 -0
- package/dist/components/language-selector/language-selector-segmented.js +9 -0
- package/dist/components/language-selector/language-selector-segmented.js.map +1 -0
- package/dist/components/language-selector/language-selector.d.ts +3 -0
- package/dist/components/language-selector/language-selector.js +10 -0
- package/dist/components/language-selector/language-selector.js.map +1 -0
- package/dist/components/language-selector/language-selector.types.d.ts +9 -0
- package/dist/components/language-selector/language-selector.types.js +1 -0
- package/dist/components/language-selector/language-selector.types.js.map +1 -0
- package/dist/components/layout/full-centered.d.ts +7 -0
- package/dist/components/layout/full-centered.js +4 -0
- package/dist/components/layout/full-centered.js.map +1 -0
- package/dist/components/layout/index.d.ts +2 -0
- package/dist/components/layout/index.js +3 -0
- package/dist/components/layout/index.js.map +1 -0
- package/dist/components/layout/safe-container.d.ts +8 -0
- package/dist/components/layout/safe-container.js +18 -0
- package/dist/components/layout/safe-container.js.map +1 -0
- package/dist/components/layout/safe-container.windows.d.ts +8 -0
- package/dist/components/layout/safe-container.windows.js +16 -0
- package/dist/components/layout/safe-container.windows.js.map +1 -0
- package/dist/components/on-off-toggle/index.d.ts +1 -0
- package/dist/components/on-off-toggle/index.js +2 -0
- package/dist/components/on-off-toggle/index.js.map +1 -0
- package/dist/components/on-off-toggle/on-off-toggle.d.ts +9 -0
- package/dist/components/on-off-toggle/on-off-toggle.js +27 -0
- package/dist/components/on-off-toggle/on-off-toggle.js.map +1 -0
- package/dist/components/score-indicator/index.d.ts +1 -0
- package/dist/components/score-indicator/index.js +2 -0
- package/dist/components/score-indicator/index.js.map +1 -0
- package/dist/components/score-indicator/score-indicator.d.ts +6 -0
- package/dist/components/score-indicator/score-indicator.js +31 -0
- package/dist/components/score-indicator/score-indicator.js.map +1 -0
- package/dist/components/snack-bar/index.d.ts +2 -0
- package/dist/components/snack-bar/index.js +3 -0
- package/dist/components/snack-bar/index.js.map +1 -0
- package/dist/components/snack-bar/snackbar-provider.d.ts +8 -0
- package/dist/components/snack-bar/snackbar-provider.js +31 -0
- package/dist/components/snack-bar/snackbar-provider.js.map +1 -0
- package/dist/components/snack-bar/snackbar.constants.d.ts +5 -0
- package/dist/components/snack-bar/snackbar.constants.js +6 -0
- package/dist/components/snack-bar/snackbar.constants.js.map +1 -0
- package/dist/components/spinner/activity-progress-bar-stats.d.ts +8 -0
- package/dist/components/spinner/activity-progress-bar-stats.js +27 -0
- package/dist/components/spinner/activity-progress-bar-stats.js.map +1 -0
- package/dist/components/spinner/activity-progress-bar.d.ts +10 -0
- package/dist/components/spinner/activity-progress-bar.js +21 -0
- package/dist/components/spinner/activity-progress-bar.js.map +1 -0
- package/dist/components/spinner/activity-progress.utils.d.ts +10 -0
- package/dist/components/spinner/activity-progress.utils.js +20 -0
- package/dist/components/spinner/activity-progress.utils.js.map +1 -0
- package/dist/components/spinner/full-centered-spinner.d.ts +2 -0
- package/dist/components/spinner/full-centered-spinner.js +5 -0
- package/dist/components/spinner/full-centered-spinner.js.map +1 -0
- package/dist/components/spinner/index.d.ts +5 -0
- package/dist/components/spinner/index.js +6 -0
- package/dist/components/spinner/index.js.map +1 -0
- package/dist/components/spinner/modal-spinner.d.ts +9 -0
- package/dist/components/spinner/modal-spinner.js +34 -0
- package/dist/components/spinner/modal-spinner.js.map +1 -0
- package/dist/components/syntax/index.d.ts +4 -0
- package/dist/components/syntax/index.js +5 -0
- package/dist/components/syntax/index.js.map +1 -0
- package/dist/components/syntax/styles/dark.d.ts +92 -0
- package/dist/components/syntax/styles/dark.js +92 -0
- package/dist/components/syntax/styles/dark.js.map +1 -0
- package/dist/components/syntax/styles/index.d.ts +2 -0
- package/dist/components/syntax/styles/index.js +3 -0
- package/dist/components/syntax/styles/index.js.map +1 -0
- package/dist/components/syntax/styles/light.d.ts +110 -0
- package/dist/components/syntax/styles/light.js +110 -0
- package/dist/components/syntax/styles/light.js.map +1 -0
- package/dist/components/syntax/syntax-coloring-tag-code.d.ts +9 -0
- package/dist/components/syntax/syntax-coloring-tag-code.js +27 -0
- package/dist/components/syntax/syntax-coloring-tag-code.js.map +1 -0
- package/dist/components/syntax/syntax-coloring-tag-pre.d.ts +9 -0
- package/dist/components/syntax/syntax-coloring-tag-pre.js +18 -0
- package/dist/components/syntax/syntax-coloring-tag-pre.js.map +1 -0
- package/dist/components/syntax/syntax-coloring.d.ts +8 -0
- package/dist/components/syntax/syntax-coloring.js +25 -0
- package/dist/components/syntax/syntax-coloring.js.map +1 -0
- package/dist/components/tab-bar-icon.d.ts +14 -0
- package/dist/components/tab-bar-icon.js +12 -0
- package/dist/components/tab-bar-icon.js.map +1 -0
- package/dist/config/env.config.d.ts +2 -0
- package/dist/config/env.config.js +4 -0
- package/dist/config/env.config.js.map +1 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.js +2 -0
- package/dist/config/index.js.map +1 -0
- package/dist/hooks/camera-image-picker/camera-image-picker.utils.d.ts +4 -0
- package/dist/hooks/camera-image-picker/camera-image-picker.utils.js +16 -0
- package/dist/hooks/camera-image-picker/camera-image-picker.utils.js.map +1 -0
- package/dist/hooks/camera-image-picker/index.d.ts +2 -0
- package/dist/hooks/camera-image-picker/index.js +3 -0
- package/dist/hooks/camera-image-picker/index.js.map +1 -0
- package/dist/hooks/camera-image-picker/use-camera-image-picker.d.ts +5 -0
- package/dist/hooks/camera-image-picker/use-camera-image-picker.js +53 -0
- package/dist/hooks/camera-image-picker/use-camera-image-picker.js.map +1 -0
- package/dist/hooks/index.d.ts +8 -0
- package/dist/hooks/index.js +9 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/use-animate-on-focus.windows.d.ts +1 -0
- package/dist/hooks/use-animate-on-focus.windows.js +5 -0
- package/dist/hooks/use-animate-on-focus.windows.js.map +1 -0
- package/dist/hooks/use-image-picker.d.ts +11 -0
- package/dist/hooks/use-image-picker.js +35 -0
- package/dist/hooks/use-image-picker.js.map +1 -0
- package/dist/hooks/use-image-picker.windows.d.ts +1 -0
- package/dist/hooks/use-image-picker.windows.js +5 -0
- package/dist/hooks/use-image-picker.windows.js.map +1 -0
- package/dist/hooks/use-invalidate-queries-on-focus.d.ts +2 -0
- package/dist/hooks/use-invalidate-queries-on-focus.js +11 -0
- package/dist/hooks/use-invalidate-queries-on-focus.js.map +1 -0
- package/dist/hooks/use-on-html-message.d.ts +5 -0
- package/dist/hooks/use-on-html-message.js +30 -0
- package/dist/hooks/use-on-html-message.js.map +1 -0
- package/dist/hooks/use-single-file-selector.d.ts +17 -0
- package/dist/hooks/use-single-file-selector.js +32 -0
- package/dist/hooks/use-single-file-selector.js.map +1 -0
- package/dist/hooks/use-single-file-selector.windows.d.ts +1 -0
- package/dist/hooks/use-single-file-selector.windows.js +5 -0
- package/dist/hooks/use-single-file-selector.windows.js.map +1 -0
- package/dist/hooks/use-timeout-state.d.ts +1 -0
- package/dist/hooks/use-timeout-state.js +11 -0
- package/dist/hooks/use-timeout-state.js.map +1 -0
- package/dist/hooks/use-timeout-toggle.d.ts +1 -0
- package/dist/hooks/use-timeout-toggle.js +20 -0
- package/dist/hooks/use-timeout-toggle.js.map +1 -0
- package/dist/hooks/use-updates.d.ts +8 -0
- package/dist/hooks/use-updates.js +68 -0
- package/dist/hooks/use-updates.js.map +1 -0
- package/dist/hooks/use-updates.windows.d.ts +1 -0
- package/dist/hooks/use-updates.windows.js +5 -0
- package/dist/hooks/use-updates.windows.js.map +1 -0
- package/dist/i18n/en/common.json +183 -0
- package/dist/i18n/fr/common.json +183 -0
- package/dist/i18n/i18n.d.ts +17 -0
- package/dist/i18n/i18n.js +47 -0
- package/dist/i18n/i18n.js.map +1 -0
- package/dist/i18n/i18n.utils.d.ts +1 -0
- package/dist/i18n/i18n.utils.js +7 -0
- package/dist/i18n/i18n.utils.js.map +1 -0
- package/dist/i18n/i18n.utils.windows.d.ts +1 -0
- package/dist/i18n/i18n.utils.windows.js +6 -0
- package/dist/i18n/i18n.utils.windows.js.map +1 -0
- package/dist/i18n/index.d.ts +2 -0
- package/dist/i18n/index.js +3 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/logger/index.d.ts +3 -0
- package/dist/logger/index.js +4 -0
- package/dist/logger/index.js.map +1 -0
- package/dist/logger/logger.d.ts +17 -0
- package/dist/logger/logger.js +142 -0
- package/dist/logger/logger.js.map +1 -0
- package/dist/logger/logger.utils.d.ts +30 -0
- package/dist/logger/logger.utils.js +46 -0
- package/dist/logger/logger.utils.js.map +1 -0
- package/dist/logger/logger.windows.d.ts +18 -0
- package/dist/logger/logger.windows.js +65 -0
- package/dist/logger/logger.windows.js.map +1 -0
- package/dist/logger/use-log-entry-color.d.ts +1 -0
- package/dist/logger/use-log-entry-color.js +23 -0
- package/dist/logger/use-log-entry-color.js.map +1 -0
- package/dist/services/device-finder/device-finder.d.ts +31 -0
- package/dist/services/device-finder/device-finder.js +104 -0
- package/dist/services/device-finder/device-finder.js.map +1 -0
- package/dist/services/device-finder/device-finder.types.d.ts +8 -0
- package/dist/services/device-finder/device-finder.types.js +1 -0
- package/dist/services/device-finder/device-finder.types.js.map +1 -0
- package/dist/services/device-finder/device-finder.windows.d.ts +18 -0
- package/dist/services/device-finder/device-finder.windows.js +48 -0
- package/dist/services/device-finder/device-finder.windows.js.map +1 -0
- package/dist/services/device-finder/index.d.ts +2 -0
- package/dist/services/device-finder/index.js +3 -0
- package/dist/services/device-finder/index.js.map +1 -0
- package/dist/services/files/index.d.ts +2 -0
- package/dist/services/files/index.js +3 -0
- package/dist/services/files/index.js.map +1 -0
- package/dist/services/files/native-file-system.d.ts +15 -0
- package/dist/services/files/native-file-system.js +101 -0
- package/dist/services/files/native-file-system.js.map +1 -0
- package/dist/services/files/native-file-system.types.d.ts +38 -0
- package/dist/services/files/native-file-system.types.js +6 -0
- package/dist/services/files/native-file-system.types.js.map +1 -0
- package/dist/services/files/native-file-system.windows.d.ts +14 -0
- package/dist/services/files/native-file-system.windows.js +31 -0
- package/dist/services/files/native-file-system.windows.js.map +1 -0
- package/dist/services/index.d.ts +3 -0
- package/dist/services/index.js +4 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/wifi/index.d.ts +6 -0
- package/dist/services/wifi/index.js +7 -0
- package/dist/services/wifi/index.js.map +1 -0
- package/dist/services/wifi/query-keys.d.ts +10 -0
- package/dist/services/wifi/query-keys.js +11 -0
- package/dist/services/wifi/query-keys.js.map +1 -0
- package/dist/services/wifi/use-wifi-info.d.ts +472 -0
- package/dist/services/wifi/use-wifi-info.js +95 -0
- package/dist/services/wifi/use-wifi-info.js.map +1 -0
- package/dist/services/wifi/wifi-info.types.d.ts +22 -0
- package/dist/services/wifi/wifi-info.types.js +21 -0
- package/dist/services/wifi/wifi-info.types.js.map +1 -0
- package/dist/services/wifi/wifi-info.utils.d.ts +15 -0
- package/dist/services/wifi/wifi-info.utils.js +114 -0
- package/dist/services/wifi/wifi-info.utils.js.map +1 -0
- package/dist/services/wifi/wifi-info.utils.simulator.d.ts +3 -0
- package/dist/services/wifi/wifi-info.utils.simulator.js +23 -0
- package/dist/services/wifi/wifi-info.utils.simulator.js.map +1 -0
- package/dist/services/wifi/wifi-info.utils.windows.d.ts +2 -0
- package/dist/services/wifi/wifi-info.utils.windows.js +6 -0
- package/dist/services/wifi/wifi-info.utils.windows.js.map +1 -0
- package/dist/services/wifi/wifi-infos-context.d.ts +170 -0
- package/dist/services/wifi/wifi-infos-context.js +34 -0
- package/dist/services/wifi/wifi-infos-context.js.map +1 -0
- package/dist/store/common-logs.store.d.ts +13 -0
- package/dist/store/common-logs.store.js +32 -0
- package/dist/store/common-logs.store.js.map +1 -0
- package/dist/store/common.store.d.ts +12 -0
- package/dist/store/common.store.js +40 -0
- package/dist/store/common.store.js.map +1 -0
- package/dist/store/index.d.ts +3 -0
- package/dist/store/index.js +4 -0
- package/dist/store/index.js.map +1 -0
- package/dist/store/react-query-provider.d.ts +4 -0
- package/dist/store/react-query-provider.js +7 -0
- package/dist/store/react-query-provider.js.map +1 -0
- package/dist/theme/dark-colors-scheme.d.ts +42 -0
- package/dist/theme/dark-colors-scheme.js +44 -0
- package/dist/theme/dark-colors-scheme.js.map +1 -0
- package/dist/theme/index.d.ts +3 -0
- package/dist/theme/index.js +4 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/light-colors-scheme.d.ts +42 -0
- package/dist/theme/light-colors-scheme.js +44 -0
- package/dist/theme/light-colors-scheme.js.map +1 -0
- package/dist/theme/theme.d.ts +171 -0
- package/dist/theme/theme.js +27 -0
- package/dist/theme/theme.js.map +1 -0
- package/dist/utils/alert.utils.d.ts +1 -0
- package/dist/utils/alert.utils.js +12 -0
- package/dist/utils/alert.utils.js.map +1 -0
- package/dist/utils/axios.config.d.ts +2 -0
- package/dist/utils/axios.config.js +15 -0
- package/dist/utils/axios.config.js.map +1 -0
- package/dist/utils/base64.utils.d.ts +2 -0
- package/dist/utils/base64.utils.js +8 -0
- package/dist/utils/base64.utils.js.map +1 -0
- package/dist/utils/clipboard.utils.d.ts +1 -0
- package/dist/utils/clipboard.utils.js +12 -0
- package/dist/utils/clipboard.utils.js.map +1 -0
- package/dist/utils/color.utils.d.ts +1 -0
- package/dist/utils/color.utils.js +27 -0
- package/dist/utils/color.utils.js.map +1 -0
- package/dist/utils/date.utils.d.ts +7 -0
- package/dist/utils/date.utils.js +20 -0
- package/dist/utils/date.utils.js.map +1 -0
- package/dist/utils/device.utils.d.ts +4 -0
- package/dist/utils/device.utils.js +28 -0
- package/dist/utils/device.utils.js.map +1 -0
- package/dist/utils/device.utils.windows.d.ts +3 -0
- package/dist/utils/device.utils.windows.js +11 -0
- package/dist/utils/device.utils.windows.js.map +1 -0
- package/dist/utils/digest-auth.d.ts +32 -0
- package/dist/utils/digest-auth.js +151 -0
- package/dist/utils/digest-auth.js.map +1 -0
- package/dist/utils/env.utils.d.ts +5 -0
- package/dist/utils/env.utils.js +32 -0
- package/dist/utils/env.utils.js.map +1 -0
- package/dist/utils/env.utils.windows.d.ts +3 -0
- package/dist/utils/env.utils.windows.js +11 -0
- package/dist/utils/env.utils.windows.js.map +1 -0
- package/dist/utils/errors.utils.d.ts +7 -0
- package/dist/utils/errors.utils.js +20 -0
- package/dist/utils/errors.utils.js.map +1 -0
- package/dist/utils/file-picker.utils.d.ts +30 -0
- package/dist/utils/file-picker.utils.js +18 -0
- package/dist/utils/file-picker.utils.js.map +1 -0
- package/dist/utils/file-picker.utils.windows.d.ts +9 -0
- package/dist/utils/file-picker.utils.windows.js +6 -0
- package/dist/utils/file-picker.utils.windows.js.map +1 -0
- package/dist/utils/file.utils.d.ts +31 -0
- package/dist/utils/file.utils.js +108 -0
- package/dist/utils/file.utils.js.map +1 -0
- package/dist/utils/filename.utils.d.ts +14 -0
- package/dist/utils/filename.utils.js +72 -0
- package/dist/utils/filename.utils.js.map +1 -0
- package/dist/utils/font.utils.d.ts +1 -0
- package/dist/utils/font.utils.js +8 -0
- package/dist/utils/font.utils.js.map +1 -0
- package/dist/utils/http.utils.d.ts +3 -0
- package/dist/utils/http.utils.js +20 -0
- package/dist/utils/http.utils.js.map +1 -0
- package/dist/utils/image.utils.d.ts +1 -0
- package/dist/utils/image.utils.js +16 -0
- package/dist/utils/image.utils.js.map +1 -0
- package/dist/utils/index.d.ts +29 -0
- package/dist/utils/index.js +30 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/licences.utils.d.ts +16 -0
- package/dist/utils/licences.utils.js +19 -0
- package/dist/utils/licences.utils.js.map +1 -0
- package/dist/utils/linking.utils.d.ts +3 -0
- package/dist/utils/linking.utils.js +33 -0
- package/dist/utils/linking.utils.js.map +1 -0
- package/dist/utils/network.utils.d.ts +4 -0
- package/dist/utils/network.utils.js +42 -0
- package/dist/utils/network.utils.js.map +1 -0
- package/dist/utils/number.utils.d.ts +1 -0
- package/dist/utils/number.utils.js +13 -0
- package/dist/utils/number.utils.js.map +1 -0
- package/dist/utils/platform.utils.d.ts +1 -0
- package/dist/utils/platform.utils.js +6 -0
- package/dist/utils/platform.utils.js.map +1 -0
- package/dist/utils/regex.d.ts +2 -0
- package/dist/utils/regex.js +3 -0
- package/dist/utils/regex.js.map +1 -0
- package/dist/utils/sharing.utils.d.ts +9 -0
- package/dist/utils/sharing.utils.js +58 -0
- package/dist/utils/sharing.utils.js.map +1 -0
- package/dist/utils/sharing.utils.windows.d.ts +3 -0
- package/dist/utils/sharing.utils.windows.js +11 -0
- package/dist/utils/sharing.utils.windows.js.map +1 -0
- package/dist/utils/sqlite.utils.d.ts +10 -0
- package/dist/utils/sqlite.utils.js +37 -0
- package/dist/utils/sqlite.utils.js.map +1 -0
- package/dist/utils/storage.d.ts +10 -0
- package/dist/utils/storage.js +60 -0
- package/dist/utils/storage.js.map +1 -0
- package/dist/utils/storage.windows.d.ts +10 -0
- package/dist/utils/storage.windows.js +34 -0
- package/dist/utils/storage.windows.js.map +1 -0
- package/dist/utils/string.utils.d.ts +16 -0
- package/dist/utils/string.utils.js +30 -0
- package/dist/utils/string.utils.js.map +1 -0
- package/dist/utils/thread.utils.d.ts +1 -0
- package/dist/utils/thread.utils.js +2 -0
- package/dist/utils/thread.utils.js.map +1 -0
- package/dist/utils/time.utils.d.ts +12 -0
- package/dist/utils/time.utils.js +13 -0
- package/dist/utils/time.utils.js.map +1 -0
- package/dist/utils/types.utils.d.ts +4 -0
- package/dist/utils/types.utils.js +24 -0
- package/dist/utils/types.utils.js.map +1 -0
- package/dist/utils/uri.utils.d.ts +11 -0
- package/dist/utils/uri.utils.js +19 -0
- package/dist/utils/uri.utils.js.map +1 -0
- package/dist/utils/webview.utils.d.ts +9 -0
- package/dist/utils/webview.utils.js +18 -0
- package/dist/utils/webview.utils.js.map +1 -0
- package/package.json +176 -0
package/README.md
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# React Native Common Module
|
|
2
|
+
|
|
3
|
+
This repository contains common components, utilities, and services used across React Native Expo applications.
|
|
4
|
+
|
|
5
|
+
[](https://github.com/RichardLitt/standard-readme)
|
|
6
|
+
[](https://www.typescriptlang.org/)
|
|
7
|
+
[](https://yarnpkg.com/)
|
|
8
|
+
[](https://react.dev/)
|
|
9
|
+
[](https://nodejs.org/)
|
|
10
|
+
[](https://vitest.dev/)
|
|
11
|
+
[](https://reactnative.dev/)
|
|
12
|
+
[](https://expo.dev/)
|
|
13
|
+
|
|
14
|
+
[](https://github.com/Lichens-Innovation/react-native-common) [](https://github.com/Lichens-Innovation/react-native-common)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
Table of content
|
|
18
|
+
|
|
19
|
+
- [React Native Common Module](#react-native-common-module)
|
|
20
|
+
- [Reusable Components](#reusable-components)
|
|
21
|
+
- [Services, Utilities and Hooks](#services-utilities-and-hooks)
|
|
22
|
+
- [Consume in a project](#consume-in-a-project)
|
|
23
|
+
- [Adding the dependency to an existing mobile application](#adding-the-dependency-to-an-existing-mobile-application)
|
|
24
|
+
- [Basic Usage Example](#basic-usage-example)
|
|
25
|
+
- [Contributions](#contributions)
|
|
26
|
+
- [Prerequisites](#prerequisites)
|
|
27
|
+
- [Installation](#installation)
|
|
28
|
+
- [Scripts](#scripts)
|
|
29
|
+
- [Peer Dependencies](#peer-dependencies)
|
|
30
|
+
- [Why Peer Dependencies?](#why-peer-dependencies)
|
|
31
|
+
- [Our Implementation Strategy](#our-implementation-strategy)
|
|
32
|
+
- [Why devDependencies + peerDependencies?](#why-devdependencies--peerdependencies)
|
|
33
|
+
- [WinRT integration](#winrt-integration)
|
|
34
|
+
- [Project coding guidelines](#project-coding-guidelines)
|
|
35
|
+
- [License](#license)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## Reusable Components
|
|
39
|
+
|
|
40
|
+
- Safe area containers, centered layouts, tab bar components
|
|
41
|
+
- ErrorBoundary, Snackbar notifications, loading spinners, progress indicators
|
|
42
|
+
- various interactive components (dropdowns, bottom sheets, etc.)
|
|
43
|
+
- global theme and light/dark modes support
|
|
44
|
+
|
|
45
|
+
## Services, Utilities and Hooks
|
|
46
|
+
|
|
47
|
+
- `@tanstack/react-query` hooks
|
|
48
|
+
- `MMKV`-based efficient data persistence (native storage solution)
|
|
49
|
+
- HTTP `Axios` configuration, Digest authentication support
|
|
50
|
+
- File operations, image processing, filename management
|
|
51
|
+
- Device detection (`Bonjour` service) environment config
|
|
52
|
+
- WiFi and available networks detection
|
|
53
|
+
- hooks for Expo updates detection, image picking, animations...
|
|
54
|
+
- `WebView` integration hooks and utilities
|
|
55
|
+
- I18N internationalization (`i18next` setup and files)
|
|
56
|
+
- `logging` service (`Sentry`, file-base, console, in-memory)
|
|
57
|
+
- various helper functions (strings, dates, base64...)
|
|
58
|
+
- types, interfaces, constants
|
|
59
|
+
|
|
60
|
+
## Consume in a project
|
|
61
|
+
|
|
62
|
+
Depending on your Expo SDK version, here are the compatibility table for `react-native-common` module:
|
|
63
|
+
|
|
64
|
+
| Version Family | Expo SDK Version | Description |
|
|
65
|
+
|----------------|------------------|-------------------------------------------------------|
|
|
66
|
+
| 1.x.y | SDK 52, SDK 53 | Compatible with applications using Expo SDK 52 and 53 |
|
|
67
|
+
| 2.x.y | SDK 54 | Compatible with applications using Expo SDK 54 |
|
|
68
|
+
| 3.x.y | SDK 55 | Compatible with applications using Expo SDK 55 |
|
|
69
|
+
|
|
70
|
+
### Adding the dependency to an existing mobile application
|
|
71
|
+
|
|
72
|
+
The following will install the latest available version on your react-native app:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
yarn add @Lichens-Innovation/react-native-common
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Basic Usage Example
|
|
79
|
+
|
|
80
|
+
Here's how to import and use the `DialogOkCancel` component:
|
|
81
|
+
|
|
82
|
+
```tsx
|
|
83
|
+
import { DialogOkCancel } from '@Lichens-Innovation/react-native-common';
|
|
84
|
+
import React, { useState } from 'react';
|
|
85
|
+
import { Button } from 'react-native-paper';
|
|
86
|
+
|
|
87
|
+
export const MyComponent = () => {
|
|
88
|
+
const [showDialog, setShowDialog] = useState(false);
|
|
89
|
+
|
|
90
|
+
const handleOk = () => {
|
|
91
|
+
console.log('User confirmed');
|
|
92
|
+
setShowDialog(false);
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const handleCancel = () => {
|
|
96
|
+
console.log('User cancelled');
|
|
97
|
+
setShowDialog(false);
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
return (
|
|
101
|
+
<>
|
|
102
|
+
<Button
|
|
103
|
+
title="Show Dialog"
|
|
104
|
+
onPress={() => setShowDialog(true)}
|
|
105
|
+
/>
|
|
106
|
+
|
|
107
|
+
<DialogOkCancel
|
|
108
|
+
isVisible={showDialog}
|
|
109
|
+
title="Confirm Action"
|
|
110
|
+
description="Are you sure you want to proceed with this action?"
|
|
111
|
+
onOk={handleOk}
|
|
112
|
+
onCancel={handleCancel}
|
|
113
|
+
/>
|
|
114
|
+
</>
|
|
115
|
+
);
|
|
116
|
+
};
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Contributions
|
|
120
|
+
|
|
121
|
+
Contributions to the project are made by simply improving the current codebase and then creating a Pull Request. If the version field in `package.json` is incremented, the build will be automatically triggered when the PR is merged into the `main` branch, and the new version will be published to our enterprise Git repository.
|
|
122
|
+
|
|
123
|
+
### Prerequisites
|
|
124
|
+
|
|
125
|
+
- Node.js (LTS or higher)
|
|
126
|
+
- Yarn
|
|
127
|
+
- React Native development environment set up (see [React Native documentation](https://reactnative.dev/docs/environment-setup))
|
|
128
|
+
|
|
129
|
+
### Installation
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
git clone https://github.com/Lichens-Innovation/react-native-common.git
|
|
133
|
+
cd react-native-common
|
|
134
|
+
yarn install
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Scripts
|
|
138
|
+
|
|
139
|
+
| Command | Description |
|
|
140
|
+
|------------------------------|-----------------------------------------------------------------------------|
|
|
141
|
+
| `yarn build` | Cleans the dist folder and compiles TypeScript |
|
|
142
|
+
| `yarn clean:node` | Removes node_modules directories and yarn.lock file |
|
|
143
|
+
| `yarn clean:dist` | Removes the dist directory |
|
|
144
|
+
| `yarn typecheck` | Checks TypeScript types without emitting files |
|
|
145
|
+
| `yarn watch:for:rvdrain` | Watches for TS changes and syncs dist files to rvdrain app node_modules |
|
|
146
|
+
| `yarn watch:for:manufacture` | Watches for TS changes and syncs dist files to manufacture app node_modules |
|
|
147
|
+
| `yarn test` | Runs tests using Vitest |
|
|
148
|
+
| `yarn mirror:to:rinnovision` | Mirrors the package to the Rinnovision repository |
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
## Peer Dependencies
|
|
152
|
+
|
|
153
|
+
This package uses a **peer dependencies** approach for all React Native, Expo, and shared ecosystem libraries. Here's why and how it works:
|
|
154
|
+
|
|
155
|
+
### Why Peer Dependencies?
|
|
156
|
+
|
|
157
|
+
- **Avoid duplicate packages**: Prevents bundling the same libraries multiple times in the final app
|
|
158
|
+
- **Version control**: The consuming app controls the exact versions of critical dependencies like React Native and Expo
|
|
159
|
+
- **Bundle size optimization**: Reduces the final app bundle size by sharing common dependencies
|
|
160
|
+
- **Consistency**: Ensures all parts of the app use the same version of core libraries
|
|
161
|
+
|
|
162
|
+
### Our Implementation Strategy
|
|
163
|
+
|
|
164
|
+
We keep dependencies in three categories:
|
|
165
|
+
|
|
166
|
+
1. **`dependencies`**: Pure utility libraries specific to this package (date-fns, immer, handlebars, etc.)
|
|
167
|
+
2. **`devDependencies`**: All React Native, Expo, and ecosystem packages needed for compilation and type checking
|
|
168
|
+
3. **`peerDependencies`**: Same packages as devDependencies, indicating what the consuming app must provide
|
|
169
|
+
|
|
170
|
+
### Why devDependencies + peerDependencies?
|
|
171
|
+
|
|
172
|
+
This dual approach solves the compilation problem while maintaining clean dependency resolution:
|
|
173
|
+
|
|
174
|
+
- **`devDependencies`** provide the necessary packages and types for TypeScript compilation
|
|
175
|
+
- **`peerDependencies`** inform the consuming app about required dependencies and versions
|
|
176
|
+
- The final app bundle only includes one copy of each shared dependency
|
|
177
|
+
|
|
178
|
+
## WinRT integration
|
|
179
|
+
|
|
180
|
+
Interfaces and types are generated by the `react-native-winrt` package at build time of the desktop application. To ensure compatibility and avoid conflicts, the generated types should be placed in the `src/types/winrt` folder of current project. Here's how to do it. Copy all generated types from:
|
|
181
|
+
|
|
182
|
+
- `my-app-desktop\node_modules\react-native-winrt\windows\WinRTTurboModule\Generated Files\types\`
|
|
183
|
+
- to `src\types\winrt\`
|
|
184
|
+
|
|
185
|
+
## Project coding guidelines
|
|
186
|
+
|
|
187
|
+
Adhering to established coding guidelines is essential for developing efficient, maintainable, and scalable software. These guidelines promote consistency across codebases, making it easier for teams to collaborate and for new developers to understand existing code. By following standardized patterns, such as those outlined in the [Coding guidelines](https://github.com/amwebexpert/chrome-extensions-collection/blob/master/packages/coding-guide-helper/public/markdowns/table-of-content.md), developers can reduce errors and enhance code readability.
|
|
188
|
+
|
|
189
|
+
* [Coding guidelines](https://github.com/amwebexpert/chrome-extensions-collection/blob/master/packages/coding-guide-helper/public/markdowns/table-of-content.md)
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
## License
|
|
193
|
+
|
|
194
|
+
This project is proprietary and confidential. Unauthorized copying, transferring, or reproduction of the contents, via any medium, is strictly prohibited.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { StyleProp, TextStyle } from 'react-native';
|
|
3
|
+
interface BatteryLevelProps {
|
|
4
|
+
batteryLevel?: number | null;
|
|
5
|
+
size?: number;
|
|
6
|
+
style?: StyleProp<TextStyle>;
|
|
7
|
+
}
|
|
8
|
+
export declare const BatteryLevel: FunctionComponent<BatteryLevelProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Icon } from 'react-native-paper';
|
|
3
|
+
import { getBatteryColor, getBatteryIcon } from './battery.utils';
|
|
4
|
+
export const BatteryLevel = ({ batteryLevel, size = 32 }) => {
|
|
5
|
+
const batteryColor = getBatteryColor(batteryLevel);
|
|
6
|
+
const batteryIcon = getBatteryIcon(batteryLevel);
|
|
7
|
+
return _jsx(Icon, { source: batteryIcon, size: size, color: batteryColor });
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=battery-level.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"battery-level.js","sourceRoot":"","sources":["../../../src/components/battery/battery-level.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAQlE,MAAM,CAAC,MAAM,YAAY,GAAyC,CAAC,EAAE,YAAY,EAAE,IAAI,GAAG,EAAE,EAAE,EAAE,EAAE;IAChG,MAAM,YAAY,GAAG,eAAe,CAAC,YAAY,CAAC,CAAC;IACnD,MAAM,WAAW,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IAEjD,OAAO,KAAC,IAAI,IAAC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,GAAI,CAAC;AACxE,CAAC,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const getBatteryIcon: (level?: number | null) => "battery-alert-variant-outline" | "battery" | "battery-60" | "battery-50" | "battery-40" | "battery-30" | "battery-20" | "battery-10" | "battery-arrow-down-outline";
|
|
2
|
+
export declare const getBatteryColor: (batteryLevel?: number | null) => string;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { getColorForPercentage } from '../../utils/color.utils';
|
|
2
|
+
import { isNullish } from '../../utils/types.utils';
|
|
3
|
+
export const getBatteryIcon = (level) => {
|
|
4
|
+
if (isNullish(level))
|
|
5
|
+
return 'battery-alert-variant-outline';
|
|
6
|
+
if (level >= 90)
|
|
7
|
+
return 'battery';
|
|
8
|
+
if (level >= 75)
|
|
9
|
+
return 'battery-60';
|
|
10
|
+
if (level >= 60)
|
|
11
|
+
return 'battery-50';
|
|
12
|
+
if (level >= 45)
|
|
13
|
+
return 'battery-40';
|
|
14
|
+
if (level >= 30)
|
|
15
|
+
return 'battery-30';
|
|
16
|
+
if (level >= 15)
|
|
17
|
+
return 'battery-20';
|
|
18
|
+
if (level > 0)
|
|
19
|
+
return 'battery-10';
|
|
20
|
+
return 'battery-arrow-down-outline';
|
|
21
|
+
};
|
|
22
|
+
export const getBatteryColor = (batteryLevel) => {
|
|
23
|
+
return isNullish(batteryLevel) ? 'gray' : getColorForPercentage(batteryLevel / 100);
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=battery.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"battery.utils.js","sourceRoot":"","sources":["../../../src/components/battery/battery.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAqB,EAAE,EAAE;IACtD,IAAI,SAAS,CAAC,KAAK,CAAC;QAAE,OAAO,+BAA+B,CAAC;IAE7D,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,SAAS,CAAC;IAClC,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,YAAY,CAAC;IACrC,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,YAAY,CAAC;IACrC,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,YAAY,CAAC;IACrC,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,YAAY,CAAC;IACrC,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,YAAY,CAAC;IACrC,IAAI,KAAK,GAAG,CAAC;QAAE,OAAO,YAAY,CAAC;IAEnC,OAAO,4BAA4B,CAAC;AACtC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,YAA4B,EAAE,EAAE;IAC9D,OAAO,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,qBAAqB,CAAC,YAAY,GAAG,GAAG,CAAC,CAAC;AACtF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/battery/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DEFAULT_SHEET_SNAP_POINTS: string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bottom-sheet.constants.js","sourceRoot":"","sources":["../../../src/components/bottom-sheet/bottom-sheet.constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { BottomSheetBackdrop } from '@gorhom/bottom-sheet';
|
|
3
|
+
export const DefaultBackdrop = (props) => (_jsx(BottomSheetBackdrop, Object.assign({ disappearsOnIndex: -1, appearsOnIndex: 0 }, props)));
|
|
4
|
+
//# sourceMappingURL=default-backdrop.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-backdrop.js","sourceRoot":"","sources":["../../../src/components/bottom-sheet/default-backdrop.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,mBAAmB,EAAiC,MAAM,sBAAsB,CAAC;AAG1F,MAAM,CAAC,MAAM,eAAe,GAAgD,CAAC,KAAK,EAAE,EAAE,CAAC,CACrF,KAAC,mBAAmB,kBAAC,iBAAiB,EAAE,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,IAAM,KAAK,EAAI,CAC7E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-backdrop.windows.js","sourceRoot":"","sources":["../../../src/components/bottom-sheet/default-backdrop.windows.tsx"],"names":[],"mappings":";AAEA,MAAM,CAAC,MAAM,eAAe,GAA2B,GAAG,EAAE,CAAC,mBAAK,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { useAppTheme } from '../../theme/theme';
|
|
4
|
+
export const DefaultSheetBackground = ({ style }) => {
|
|
5
|
+
const { colors } = useAppTheme();
|
|
6
|
+
return _jsx(View, { style: [style, { backgroundColor: colors.background }] });
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=default-sheet-background.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-sheet-background.js","sourceRoot":"","sources":["../../../src/components/bottom-sheet/default-sheet-background.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,MAAM,sBAAsB,GAAkD,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACjG,MAAM,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACjC,OAAO,KAAC,IAAI,IAAC,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,GAAI,CAAC;AAC1E,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/bottom-sheet/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BottomSheetModal } from '@gorhom/bottom-sheet';
|
|
2
|
+
export declare const useBottomSheetToggler: () => {
|
|
3
|
+
bottomSheetModalRef: import("react").RefObject<BottomSheetModal>;
|
|
4
|
+
showBottomSheet: () => void;
|
|
5
|
+
hideBottomSheet: () => void;
|
|
6
|
+
isBottomSheetOpen: boolean;
|
|
7
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { BackHandler } from 'react-native';
|
|
3
|
+
import { logger } from '../../logger/logger';
|
|
4
|
+
export const useBottomSheetToggler = () => {
|
|
5
|
+
const bottomSheetModalRef = useRef(null);
|
|
6
|
+
const [isBottomSheetOpen, setIsBottomSheetOpen] = useState(false);
|
|
7
|
+
const showBottomSheet = () => {
|
|
8
|
+
var _a;
|
|
9
|
+
setIsBottomSheetOpen(true);
|
|
10
|
+
(_a = bottomSheetModalRef.current) === null || _a === void 0 ? void 0 : _a.present();
|
|
11
|
+
};
|
|
12
|
+
const hideBottomSheet = () => {
|
|
13
|
+
var _a;
|
|
14
|
+
logger.debug('[useBottomSheetToggler] hideBottomSheet');
|
|
15
|
+
setIsBottomSheetOpen(false);
|
|
16
|
+
(_a = bottomSheetModalRef.current) === null || _a === void 0 ? void 0 : _a.dismiss();
|
|
17
|
+
};
|
|
18
|
+
const onBackButtonPress = () => {
|
|
19
|
+
if (!isBottomSheetOpen || !bottomSheetModalRef.current) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
logger.debug('[useBottomSheetToggler] onBackButtonPress: closing bottom sheet');
|
|
23
|
+
hideBottomSheet();
|
|
24
|
+
return true;
|
|
25
|
+
};
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
if (!isBottomSheetOpen)
|
|
28
|
+
return;
|
|
29
|
+
const backHandler = BackHandler.addEventListener('hardwareBackPress', onBackButtonPress);
|
|
30
|
+
return () => backHandler.remove();
|
|
31
|
+
}, [isBottomSheetOpen]);
|
|
32
|
+
return {
|
|
33
|
+
bottomSheetModalRef,
|
|
34
|
+
showBottomSheet,
|
|
35
|
+
hideBottomSheet,
|
|
36
|
+
isBottomSheetOpen,
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=use-bottom-sheet-toggler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-bottom-sheet-toggler.js","sourceRoot":"","sources":["../../../src/components/bottom-sheet/use-bottom-sheet-toggler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,EAAE;IACxC,MAAM,mBAAmB,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAC;IAC3D,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAElE,MAAM,eAAe,GAAG,GAAG,EAAE;;QAC3B,oBAAoB,CAAC,IAAI,CAAC,CAAC;QAC3B,MAAA,mBAAmB,CAAC,OAAO,0CAAE,OAAO,EAAE,CAAC;IACzC,CAAC,CAAC;IAEF,MAAM,eAAe,GAAG,GAAG,EAAE;;QAC3B,MAAM,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAC;QACxD,oBAAoB,CAAC,KAAK,CAAC,CAAC;QAC5B,MAAA,mBAAmB,CAAC,OAAO,0CAAE,OAAO,EAAE,CAAC;IACzC,CAAC,CAAC;IAEF,MAAM,iBAAiB,GAAG,GAAY,EAAE;QACtC,IAAI,CAAC,iBAAiB,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,CAAC;YACvD,OAAO,KAAK,CAAC;QACf,CAAC;QAED,MAAM,CAAC,KAAK,CAAC,iEAAiE,CAAC,CAAC;QAChF,eAAe,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,iBAAiB;YAAE,OAAO;QAE/B,MAAM,WAAW,GAAG,WAAW,CAAC,gBAAgB,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,CAAC;QACzF,OAAO,GAAG,EAAE,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;IACpC,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAExB,OAAO;QACL,mBAAmB;QACnB,eAAe;QACf,eAAe;QACf,iBAAiB;KAClB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BarcodeScanningResult } from 'expo-camera';
|
|
2
|
+
import { FunctionComponent } from 'react';
|
|
3
|
+
import { DialogCloseOnlyProps } from '../dialogs/dialog-close-only';
|
|
4
|
+
interface BarcodeScannerDialogProps extends DialogCloseOnlyProps {
|
|
5
|
+
isVisible: boolean;
|
|
6
|
+
title: string;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
onBarcodeScanned: (result: BarcodeScanningResult) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const BarcodeScannerDialog: FunctionComponent<BarcodeScannerDialogProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { useEffect, useState } from 'react';
|
|
14
|
+
import { DialogCloseOnly } from '../dialogs/dialog-close-only';
|
|
15
|
+
import { BarcodeScanner } from './barcode-scanner';
|
|
16
|
+
import { getPermissionMessage, requestCameraPermissions } from './barcode-scanner.utils';
|
|
17
|
+
export const BarcodeScannerDialog = (_a) => {
|
|
18
|
+
var { isVisible, title, onClose, onBarcodeScanned } = _a, rest = __rest(_a, ["isVisible", "title", "onClose", "onBarcodeScanned"]);
|
|
19
|
+
const [hasPermission, setHasPermission] = useState();
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
requestCameraPermissions().then(setHasPermission);
|
|
22
|
+
}, []);
|
|
23
|
+
if (!isVisible) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
if (!hasPermission) {
|
|
27
|
+
const message = getPermissionMessage(hasPermission);
|
|
28
|
+
return _jsx(DialogCloseOnly, Object.assign({ isVisible: true, title: title, onClose: onClose, content: message }, rest));
|
|
29
|
+
}
|
|
30
|
+
return (_jsx(DialogCloseOnly, Object.assign({ isVisible: true, title: title, onClose: onClose, content: _jsx(BarcodeScanner, { onBarcodeScanned: onBarcodeScanned }) }, rest)));
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=barcode-scanner-dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"barcode-scanner-dialog.js","sourceRoot":"","sources":["../../../src/components/code-scanner/barcode-scanner-dialog.tsx"],"names":[],"mappings":";;;;;;;;;;;;AACA,OAAc,EAAqB,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,eAAe,EAAwB,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AASzF,MAAM,CAAC,MAAM,oBAAoB,GAAiD,CAAC,EAMlF,EAAE,EAAE;QAN8E,EACjF,SAAS,EACT,KAAK,EACL,OAAO,EACP,gBAAgB,OAEjB,EADI,IAAI,cAL0E,qDAMlF,CADQ;IAEP,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,EAAW,CAAC;IAE9D,SAAS,CAAC,GAAG,EAAE;QACb,wBAAwB,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IACpD,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,OAAO,GAAG,oBAAoB,CAAC,aAAa,CAAC,CAAC;QACpD,OAAO,KAAC,eAAe,kBAAC,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,IAAM,IAAI,EAAI,CAAC;IAC1G,CAAC;IAED,OAAO,CACL,KAAC,eAAe,kBACd,SAAS,EAAE,IAAI,EACf,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,KAAC,cAAc,IAAC,gBAAgB,EAAE,gBAAgB,GAAI,IAC3D,IAAI,EACR,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BarcodeScanningResult } from 'expo-camera';
|
|
2
|
+
import { FunctionComponent } from 'react';
|
|
3
|
+
interface BarcodeScannerProps {
|
|
4
|
+
onBarcodeScanned: (result: BarcodeScanningResult) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const BarcodeScanner: FunctionComponent<BarcodeScannerProps>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { CameraView } from 'expo-camera';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import { StyleSheet, useWindowDimensions, View } from 'react-native';
|
|
5
|
+
import { Text } from 'react-native-paper';
|
|
6
|
+
import { useAppTheme } from '../../theme/theme';
|
|
7
|
+
import { BARCODE_TYPES } from './barcode-scanner.utils';
|
|
8
|
+
export const BarcodeScanner = ({ onBarcodeScanned }) => {
|
|
9
|
+
const styles = useStyles();
|
|
10
|
+
const { t } = useTranslation();
|
|
11
|
+
return (_jsxs(_Fragment, { children: [_jsx(View, { style: styles.cameraContainer, children: _jsx(CameraView, { style: [StyleSheet.absoluteFillObject, styles.camera], onBarcodeScanned: onBarcodeScanned, barcodeScannerSettings: { barcodeTypes: BARCODE_TYPES }, facing: "back" }) }), _jsx(Text, { variant: "bodySmall", style: styles.instruction, children: t('common:barcodeScanner.scanBarcodeInstruction') })] }));
|
|
12
|
+
};
|
|
13
|
+
const DIALOG_HEADER_AND_FOOTER_HEIGHT = 200;
|
|
14
|
+
const MAX_CAMERA_HEIGHT = 560;
|
|
15
|
+
const useStyles = () => {
|
|
16
|
+
const theme = useAppTheme();
|
|
17
|
+
const { height } = useWindowDimensions();
|
|
18
|
+
return StyleSheet.create({
|
|
19
|
+
cameraContainer: {
|
|
20
|
+
alignSelf: 'center',
|
|
21
|
+
width: '100%',
|
|
22
|
+
height: Math.min(height - DIALOG_HEADER_AND_FOOTER_HEIGHT, MAX_CAMERA_HEIGHT),
|
|
23
|
+
},
|
|
24
|
+
camera: {
|
|
25
|
+
borderWidth: 2,
|
|
26
|
+
borderColor: theme.colors.primary,
|
|
27
|
+
borderStyle: 'dashed',
|
|
28
|
+
},
|
|
29
|
+
instruction: {
|
|
30
|
+
textAlign: 'center',
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=barcode-scanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"barcode-scanner.js","sourceRoot":"","sources":["../../../src/components/code-scanner/barcode-scanner.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAyB,UAAU,EAAE,MAAM,aAAa,CAAC;AAEhE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAMxD,MAAM,CAAC,MAAM,cAAc,GAA2C,CAAC,EAAE,gBAAgB,EAAE,EAAE,EAAE;IAC7F,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAC;IAE/B,OAAO,CACL,8BACE,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,eAAe,YACjC,KAAC,UAAU,IACT,KAAK,EAAE,CAAC,UAAU,CAAC,kBAAkB,EAAE,MAAM,CAAC,MAAM,CAAC,EACrD,gBAAgB,EAAE,gBAAgB,EAClC,sBAAsB,EAAE,EAAE,YAAY,EAAE,aAAa,EAAE,EACvD,MAAM,EAAC,MAAM,GACb,GACG,EAEP,KAAC,IAAI,IAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAE,MAAM,CAAC,WAAW,YAChD,CAAC,CAAC,8CAA8C,CAAC,GAC7C,IACN,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,+BAA+B,GAAG,GAAG,CAAC;AAC5C,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAE9B,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAC5B,MAAM,EAAE,MAAM,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAEzC,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,eAAe,EAAE;YACf,SAAS,EAAE,QAAQ;YACnB,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,+BAA+B,EAAE,iBAAiB,CAAC;SAC9E;QACD,MAAM,EAAE;YACN,WAAW,EAAE,CAAC;YACd,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO;YACjC,WAAW,EAAE,QAAQ;SACtB;QACD,WAAW,EAAE;YACX,SAAS,EAAE,QAAQ;SACpB;KACF,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Camera } from 'expo-camera';
|
|
2
|
+
import i18next from 'i18next';
|
|
3
|
+
import { logger } from '../../logger/logger';
|
|
4
|
+
import { isNullish } from '../../utils/types.utils';
|
|
5
|
+
export const BARCODE_TYPES = [
|
|
6
|
+
'aztec',
|
|
7
|
+
'ean13',
|
|
8
|
+
'ean8',
|
|
9
|
+
'qr',
|
|
10
|
+
'pdf417',
|
|
11
|
+
'upc_e',
|
|
12
|
+
'datamatrix',
|
|
13
|
+
'code39',
|
|
14
|
+
'code93',
|
|
15
|
+
'itf14',
|
|
16
|
+
'codabar',
|
|
17
|
+
'code128',
|
|
18
|
+
'upc_a',
|
|
19
|
+
];
|
|
20
|
+
export const getPermissionMessage = (hasPermission) => {
|
|
21
|
+
if (isNullish(hasPermission)) {
|
|
22
|
+
return i18next.t('common:barcodeScanner.requestingCameraPermission');
|
|
23
|
+
}
|
|
24
|
+
return hasPermission
|
|
25
|
+
? i18next.t('common:barcodeScanner.cameraAccessGranted')
|
|
26
|
+
: i18next.t('common:barcodeScanner.noCameraAccess');
|
|
27
|
+
};
|
|
28
|
+
export const requestCameraPermissions = async () => {
|
|
29
|
+
try {
|
|
30
|
+
const { status } = await Camera.requestCameraPermissionsAsync();
|
|
31
|
+
return status === 'granted';
|
|
32
|
+
}
|
|
33
|
+
catch (e) {
|
|
34
|
+
logger.error('[BarcodeScanner] Failed to request camera permissions', e);
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=barcode-scanner.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"barcode-scanner.utils.js","sourceRoot":"","sources":["../../../src/components/code-scanner/barcode-scanner.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,MAAM,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,MAAM,CAAC,MAAM,aAAa,GAAkB;IAC1C,OAAO;IACP,OAAO;IACP,MAAM;IACN,IAAI;IACJ,QAAQ;IACR,OAAO;IACP,YAAY;IACZ,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,SAAS;IACT,SAAS;IACT,OAAO;CACR,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,aAA8B,EAAU,EAAE;IAC7E,IAAI,SAAS,CAAC,aAAa,CAAC,EAAE,CAAC;QAC7B,OAAO,OAAO,CAAC,CAAC,CAAC,kDAAkD,CAAC,CAAC;IACvE,CAAC;IAED,OAAO,aAAa;QAClB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,2CAA2C,CAAC;QACxD,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,sCAAsC,CAAC,CAAC;AACxD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,IAAsB,EAAE;IACnE,IAAI,CAAC;QACH,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,6BAA6B,EAAE,CAAC;QAChE,OAAO,MAAM,KAAK,SAAS,CAAC;IAC9B,CAAC;IAAC,OAAO,CAAU,EAAE,CAAC;QACpB,MAAM,CAAC,KAAK,CAAC,uDAAuD,EAAE,CAAC,CAAC,CAAC;QACzE,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/code-scanner/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ComponentProps, type FunctionComponent, type ReactNode } from 'react';
|
|
2
|
+
import { Dialog } from 'react-native-paper';
|
|
3
|
+
type DialogProps = ComponentProps<typeof Dialog>;
|
|
4
|
+
export interface DialogCloseOnlyProps extends Omit<DialogProps, 'children' | 'visible'> {
|
|
5
|
+
icon?: string;
|
|
6
|
+
title?: ReactNode;
|
|
7
|
+
content?: ReactNode;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
isVisible: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const DialogCloseOnly: FunctionComponent<DialogCloseOnlyProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { useTranslation } from 'react-i18next';
|
|
14
|
+
import { StyleSheet } from 'react-native';
|
|
15
|
+
import { Button, Dialog, Portal } from 'react-native-paper';
|
|
16
|
+
import { useDialogStyles } from './use-dialog-styles';
|
|
17
|
+
export const DialogCloseOnly = (_a) => {
|
|
18
|
+
var { icon, title, content, onClose, isVisible } = _a, rest = __rest(_a, ["icon", "title", "content", "onClose", "isVisible"]);
|
|
19
|
+
const { style: dialogStyleProp } = rest, dialogProps = __rest(rest, ["style"]);
|
|
20
|
+
const styles = useStyles();
|
|
21
|
+
const { t } = useTranslation();
|
|
22
|
+
const hasIcon = !!icon;
|
|
23
|
+
const hasTitle = !!title;
|
|
24
|
+
const hasContent = !!content;
|
|
25
|
+
if (!isVisible) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
return (_jsx(Portal, { children: _jsxs(Dialog, Object.assign({ style: [styles.dialog, dialogStyleProp], visible: true, onDismiss: onClose }, dialogProps, { children: [hasIcon && _jsx(Dialog.Icon, { icon: icon }), hasTitle && _jsx(Dialog.Title, { children: title }), hasContent && _jsx(Dialog.Content, { children: content }), _jsx(Dialog.Actions, { children: _jsx(Button, { mode: "contained", onPress: onClose, children: t('common:close') }) })] })) }));
|
|
29
|
+
};
|
|
30
|
+
const useStyles = () => {
|
|
31
|
+
const { width, alignSelf } = useDialogStyles();
|
|
32
|
+
return StyleSheet.create({
|
|
33
|
+
dialog: {
|
|
34
|
+
width,
|
|
35
|
+
alignSelf,
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=dialog-close-only.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog-close-only.js","sourceRoot":"","sources":["../../../src/components/dialogs/dialog-close-only.tsx"],"names":[],"mappings":";;;;;;;;;;;;AACA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAYtD,MAAM,CAAC,MAAM,eAAe,GAA4C,CAAC,EAOxE,EAAE,EAAE;QAPoE,EACvE,IAAI,EACJ,KAAK,EACL,OAAO,EACP,OAAO,EACP,SAAS,OAEV,EADI,IAAI,cANgE,oDAOxE,CADQ;IAEP,MAAM,EAAE,KAAK,EAAE,eAAe,KAAqB,IAAI,EAApB,WAAW,UAAK,IAAI,EAAjD,SAA0C,CAAO,CAAC;IACxD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAC;IAE/B,MAAM,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC;IACvB,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC;IACzB,MAAM,UAAU,GAAG,CAAC,CAAC,OAAO,CAAC;IAE7B,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,KAAC,MAAM,cACL,MAAC,MAAM,kBAAC,KAAK,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,IAAM,WAAW,eAChG,OAAO,IAAI,KAAC,MAAM,CAAC,IAAI,IAAC,IAAI,EAAE,IAAI,GAAI,EACtC,QAAQ,IAAI,KAAC,MAAM,CAAC,KAAK,cAAE,KAAK,GAAgB,EAChD,UAAU,IAAI,KAAC,MAAM,CAAC,OAAO,cAAE,OAAO,GAAkB,EAEzD,KAAC,MAAM,CAAC,OAAO,cACb,KAAC,MAAM,IAAC,IAAI,EAAC,WAAW,EAAC,OAAO,EAAE,OAAO,YACtC,CAAC,CAAC,cAAc,CAAC,GACX,GACM,KACV,GACF,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,eAAe,EAAE,CAAC;IAE/C,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,MAAM,EAAE;YACN,KAAK;YACL,SAAS;SACV;KACF,CAAC,CAAC;AACL,CAAC,CAAC"}
|