@lichens-innovation/react-native-common 3.10.0 → 3.11.1
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 +35 -0
- package/dist/index.d.ts +1860 -9
- package/dist/index.js +4666 -9
- package/dist/index.js.map +1 -1
- package/dist/rjsf.d.ts +125 -0
- package/dist/rjsf.js +1484 -0
- package/dist/rjsf.js.map +1 -0
- package/package.json +45 -8
- package/dist/components/battery/battery-level.d.ts +0 -9
- package/dist/components/battery/battery-level.js +0 -9
- package/dist/components/battery/battery-level.js.map +0 -1
- package/dist/components/battery/battery.utils.d.ts +0 -2
- package/dist/components/battery/battery.utils.js +0 -24
- package/dist/components/battery/battery.utils.js.map +0 -1
- package/dist/components/battery/index.d.ts +0 -2
- package/dist/components/battery/index.js +0 -3
- package/dist/components/battery/index.js.map +0 -1
- package/dist/components/bottom-sheet/bottom-sheet.constants.d.ts +0 -1
- package/dist/components/bottom-sheet/bottom-sheet.constants.js +0 -2
- package/dist/components/bottom-sheet/bottom-sheet.constants.js.map +0 -1
- package/dist/components/bottom-sheet/default-backdrop.d.ts +0 -3
- package/dist/components/bottom-sheet/default-backdrop.js +0 -4
- package/dist/components/bottom-sheet/default-backdrop.js.map +0 -1
- package/dist/components/bottom-sheet/default-backdrop.windows.d.ts +0 -2
- package/dist/components/bottom-sheet/default-backdrop.windows.js +0 -3
- package/dist/components/bottom-sheet/default-backdrop.windows.js.map +0 -1
- package/dist/components/bottom-sheet/default-sheet-background.d.ts +0 -3
- package/dist/components/bottom-sheet/default-sheet-background.js +0 -8
- package/dist/components/bottom-sheet/default-sheet-background.js.map +0 -1
- package/dist/components/bottom-sheet/index.d.ts +0 -4
- package/dist/components/bottom-sheet/index.js +0 -5
- package/dist/components/bottom-sheet/index.js.map +0 -1
- package/dist/components/bottom-sheet/use-bottom-sheet-toggler.d.ts +0 -7
- package/dist/components/bottom-sheet/use-bottom-sheet-toggler.js +0 -39
- package/dist/components/bottom-sheet/use-bottom-sheet-toggler.js.map +0 -1
- package/dist/components/code-scanner/barcode-scanner-dialog.d.ts +0 -11
- package/dist/components/code-scanner/barcode-scanner-dialog.js +0 -32
- package/dist/components/code-scanner/barcode-scanner-dialog.js.map +0 -1
- package/dist/components/code-scanner/barcode-scanner.d.ts +0 -7
- package/dist/components/code-scanner/barcode-scanner.js +0 -34
- package/dist/components/code-scanner/barcode-scanner.js.map +0 -1
- package/dist/components/code-scanner/barcode-scanner.utils.d.ts +0 -4
- package/dist/components/code-scanner/barcode-scanner.utils.js +0 -38
- package/dist/components/code-scanner/barcode-scanner.utils.js.map +0 -1
- package/dist/components/code-scanner/index.d.ts +0 -3
- package/dist/components/code-scanner/index.js +0 -4
- package/dist/components/code-scanner/index.js.map +0 -1
- package/dist/components/dialogs/dialog-close-only.d.ts +0 -12
- package/dist/components/dialogs/dialog-close-only.js +0 -39
- package/dist/components/dialogs/dialog-close-only.js.map +0 -1
- package/dist/components/dialogs/dialog-ok-cancel.d.ts +0 -13
- package/dist/components/dialogs/dialog-ok-cancel.js +0 -44
- package/dist/components/dialogs/dialog-ok-cancel.js.map +0 -1
- package/dist/components/dialogs/dialog-single-textinput.d.ts +0 -16
- package/dist/components/dialogs/dialog-single-textinput.js +0 -59
- package/dist/components/dialogs/dialog-single-textinput.js.map +0 -1
- package/dist/components/dialogs/dialog-syntax-color-result.d.ts +0 -14
- package/dist/components/dialogs/dialog-syntax-color-result.js +0 -47
- package/dist/components/dialogs/dialog-syntax-color-result.js.map +0 -1
- package/dist/components/dialogs/index.d.ts +0 -5
- package/dist/components/dialogs/index.js +0 -6
- package/dist/components/dialogs/index.js.map +0 -1
- package/dist/components/dialogs/use-dialog-styles.d.ts +0 -4
- package/dist/components/dialogs/use-dialog-styles.js +0 -13
- package/dist/components/dialogs/use-dialog-styles.js.map +0 -1
- package/dist/components/drop-down-selector/drop-down-selector-item.d.ts +0 -8
- package/dist/components/drop-down-selector/drop-down-selector-item.js +0 -24
- package/dist/components/drop-down-selector/drop-down-selector-item.js.map +0 -1
- package/dist/components/drop-down-selector/drop-down-selector-left-icon.d.ts +0 -7
- package/dist/components/drop-down-selector/drop-down-selector-left-icon.js +0 -9
- package/dist/components/drop-down-selector/drop-down-selector-left-icon.js.map +0 -1
- package/dist/components/drop-down-selector/drop-down-selector.d.ts +0 -17
- package/dist/components/drop-down-selector/drop-down-selector.js +0 -60
- package/dist/components/drop-down-selector/drop-down-selector.js.map +0 -1
- package/dist/components/drop-down-selector/drop-down-selector.utils.d.ts +0 -22
- package/dist/components/drop-down-selector/drop-down-selector.utils.js +0 -37
- package/dist/components/drop-down-selector/drop-down-selector.utils.js.map +0 -1
- package/dist/components/drop-down-selector/drop-down-selector.windows.d.ts +0 -2
- package/dist/components/drop-down-selector/drop-down-selector.windows.js +0 -3
- package/dist/components/drop-down-selector/drop-down-selector.windows.js.map +0 -1
- package/dist/components/drop-down-selector/index.d.ts +0 -1
- package/dist/components/drop-down-selector/index.js +0 -2
- package/dist/components/drop-down-selector/index.js.map +0 -1
- package/dist/components/error/error-boundary-screen.d.ts +0 -2
- package/dist/components/error/error-boundary-screen.js +0 -35
- package/dist/components/error/error-boundary-screen.js.map +0 -1
- package/dist/components/error/error-boundary-screen.windows.d.ts +0 -2
- package/dist/components/error/error-boundary-screen.windows.js +0 -3
- package/dist/components/error/error-boundary-screen.windows.js.map +0 -1
- package/dist/components/error/error-boundary.d.ts +0 -3
- package/dist/components/error/error-boundary.js +0 -27
- package/dist/components/error/error-boundary.js.map +0 -1
- package/dist/components/error/error-boundary.windows.d.ts +0 -2
- package/dist/components/error/error-boundary.windows.js +0 -3
- package/dist/components/error/error-boundary.windows.js.map +0 -1
- package/dist/components/error/error-details.d.ts +0 -7
- package/dist/components/error/error-details.js +0 -32
- package/dist/components/error/error-details.js.map +0 -1
- package/dist/components/error/index.d.ts +0 -4
- package/dist/components/error/index.js +0 -5
- package/dist/components/error/index.js.map +0 -1
- package/dist/components/error/use-error-details.d.ts +0 -7
- package/dist/components/error/use-error-details.js +0 -19
- package/dist/components/error/use-error-details.js.map +0 -1
- package/dist/components/event-logs/event-logs-screen.d.ts +0 -2
- package/dist/components/event-logs/event-logs-screen.js +0 -63
- package/dist/components/event-logs/event-logs-screen.js.map +0 -1
- package/dist/components/event-logs/index.d.ts +0 -2
- package/dist/components/event-logs/index.js +0 -3
- package/dist/components/event-logs/index.js.map +0 -1
- package/dist/components/event-logs/live-logs-viewer/index.d.ts +0 -6
- package/dist/components/event-logs/live-logs-viewer/index.js +0 -7
- package/dist/components/event-logs/live-logs-viewer/index.js.map +0 -1
- package/dist/components/event-logs/live-logs-viewer/log-entry-item-suffix.d.ts +0 -7
- package/dist/components/event-logs/live-logs-viewer/log-entry-item-suffix.js +0 -6
- package/dist/components/event-logs/live-logs-viewer/log-entry-item-suffix.js.map +0 -1
- package/dist/components/event-logs/live-logs-viewer/log-entry-item.d.ts +0 -7
- package/dist/components/event-logs/live-logs-viewer/log-entry-item.js +0 -35
- package/dist/components/event-logs/live-logs-viewer/log-entry-item.js.map +0 -1
- package/dist/components/event-logs/live-logs-viewer/logs-viewer.d.ts +0 -7
- package/dist/components/event-logs/live-logs-viewer/logs-viewer.js +0 -44
- package/dist/components/event-logs/live-logs-viewer/logs-viewer.js.map +0 -1
- package/dist/components/event-logs/live-logs-viewer/logs-viewer.utils.d.ts +0 -1
- package/dist/components/event-logs/live-logs-viewer/logs-viewer.utils.js +0 -6
- package/dist/components/event-logs/live-logs-viewer/logs-viewer.utils.js.map +0 -1
- package/dist/components/event-logs/live-logs-viewer/use-auto-scroll.d.ts +0 -7
- package/dist/components/event-logs/live-logs-viewer/use-auto-scroll.js +0 -20
- package/dist/components/event-logs/live-logs-viewer/use-auto-scroll.js.map +0 -1
- package/dist/components/event-logs/live-logs-viewer/use-logs-actions.d.ts +0 -6
- package/dist/components/event-logs/live-logs-viewer/use-logs-actions.js +0 -24
- package/dist/components/event-logs/live-logs-viewer/use-logs-actions.js.map +0 -1
- package/dist/components/header-actions/header-back-button.d.ts +0 -2
- package/dist/components/header-actions/header-back-button.js +0 -5
- package/dist/components/header-actions/header-back-button.js.map +0 -1
- package/dist/components/header-actions/header-back-button.windows.d.ts +0 -2
- package/dist/components/header-actions/header-back-button.windows.js +0 -3
- package/dist/components/header-actions/header-back-button.windows.js.map +0 -1
- package/dist/components/header-actions/header-button.d.ts +0 -7
- package/dist/components/header-actions/header-button.js +0 -18
- package/dist/components/header-actions/header-button.js.map +0 -1
- package/dist/components/header-actions/index.d.ts +0 -2
- package/dist/components/header-actions/index.js +0 -3
- package/dist/components/header-actions/index.js.map +0 -1
- package/dist/components/index.d.ts +0 -19
- package/dist/components/index.js +0 -20
- package/dist/components/index.js.map +0 -1
- package/dist/components/language-selector/index.d.ts +0 -4
- package/dist/components/language-selector/index.js +0 -5
- package/dist/components/language-selector/index.js.map +0 -1
- package/dist/components/language-selector/language-selector-menu.d.ts +0 -3
- package/dist/components/language-selector/language-selector-menu.js +0 -13
- package/dist/components/language-selector/language-selector-menu.js.map +0 -1
- package/dist/components/language-selector/language-selector-segmented.d.ts +0 -3
- package/dist/components/language-selector/language-selector-segmented.js +0 -9
- package/dist/components/language-selector/language-selector-segmented.js.map +0 -1
- package/dist/components/language-selector/language-selector.d.ts +0 -3
- package/dist/components/language-selector/language-selector.js +0 -10
- package/dist/components/language-selector/language-selector.js.map +0 -1
- package/dist/components/language-selector/language-selector.types.d.ts +0 -9
- package/dist/components/language-selector/language-selector.types.js +0 -1
- package/dist/components/language-selector/language-selector.types.js.map +0 -1
- package/dist/components/layout/full-centered.d.ts +0 -7
- package/dist/components/layout/full-centered.js +0 -4
- package/dist/components/layout/full-centered.js.map +0 -1
- package/dist/components/layout/index.d.ts +0 -4
- package/dist/components/layout/index.js +0 -5
- package/dist/components/layout/index.js.map +0 -1
- package/dist/components/layout/orientation-aware-tabs/index.d.ts +0 -2
- package/dist/components/layout/orientation-aware-tabs/index.js +0 -3
- package/dist/components/layout/orientation-aware-tabs/index.js.map +0 -1
- package/dist/components/layout/orientation-aware-tabs/orientation-aware-tab-button.d.ts +0 -9
- package/dist/components/layout/orientation-aware-tabs/orientation-aware-tab-button.js +0 -40
- package/dist/components/layout/orientation-aware-tabs/orientation-aware-tab-button.js.map +0 -1
- package/dist/components/layout/orientation-aware-tabs/orientation-aware-tabs-layout.d.ts +0 -15
- package/dist/components/layout/orientation-aware-tabs/orientation-aware-tabs-layout.js +0 -40
- package/dist/components/layout/orientation-aware-tabs/orientation-aware-tabs-layout.js.map +0 -1
- package/dist/components/layout/resizable/horizontal-resizable-split-view.d.ts +0 -3
- package/dist/components/layout/resizable/horizontal-resizable-split-view.js +0 -80
- package/dist/components/layout/resizable/horizontal-resizable-split-view.js.map +0 -1
- package/dist/components/layout/resizable/horizontal-resizable-split-view.types.d.ts +0 -20
- package/dist/components/layout/resizable/horizontal-resizable-split-view.types.js +0 -1
- package/dist/components/layout/resizable/horizontal-resizable-split-view.types.js.map +0 -1
- package/dist/components/layout/resizable/horizontal-resizable-split-view.utils.d.ts +0 -2
- package/dist/components/layout/resizable/horizontal-resizable-split-view.utils.js +0 -23
- package/dist/components/layout/resizable/horizontal-resizable-split-view.utils.js.map +0 -1
- package/dist/components/layout/resizable/index.d.ts +0 -6
- package/dist/components/layout/resizable/index.js +0 -7
- package/dist/components/layout/resizable/index.js.map +0 -1
- package/dist/components/layout/resizable/resizable-overlay-view.d.ts +0 -3
- package/dist/components/layout/resizable/resizable-overlay-view.js +0 -132
- package/dist/components/layout/resizable/resizable-overlay-view.js.map +0 -1
- package/dist/components/layout/resizable/resizable-overlay-view.utils.d.ts +0 -16
- package/dist/components/layout/resizable/resizable-overlay-view.utils.js +0 -19
- package/dist/components/layout/resizable/resizable-overlay-view.utils.js.map +0 -1
- package/dist/components/layout/resizable/vertical-resizable-overlay-view.types.d.ts +0 -28
- package/dist/components/layout/resizable/vertical-resizable-overlay-view.types.js +0 -1
- package/dist/components/layout/resizable/vertical-resizable-overlay-view.types.js.map +0 -1
- package/dist/components/layout/resizable/vertical-resizable-overlay-view.utils.d.ts +0 -2
- package/dist/components/layout/resizable/vertical-resizable-overlay-view.utils.js +0 -31
- package/dist/components/layout/resizable/vertical-resizable-overlay-view.utils.js.map +0 -1
- package/dist/components/layout/resizable/vertical-resizable-split-view.d.ts +0 -3
- package/dist/components/layout/resizable/vertical-resizable-split-view.js +0 -79
- package/dist/components/layout/resizable/vertical-resizable-split-view.js.map +0 -1
- package/dist/components/layout/resizable/vertical-resizable-split-view.types.d.ts +0 -20
- package/dist/components/layout/resizable/vertical-resizable-split-view.types.js +0 -1
- package/dist/components/layout/resizable/vertical-resizable-split-view.types.js.map +0 -1
- package/dist/components/layout/resizable/vertical-resizable-split-view.utils.d.ts +0 -2
- package/dist/components/layout/resizable/vertical-resizable-split-view.utils.js +0 -23
- package/dist/components/layout/resizable/vertical-resizable-split-view.utils.js.map +0 -1
- package/dist/components/layout/safe-container.d.ts +0 -8
- package/dist/components/layout/safe-container.js +0 -18
- package/dist/components/layout/safe-container.js.map +0 -1
- package/dist/components/layout/safe-container.windows.d.ts +0 -8
- package/dist/components/layout/safe-container.windows.js +0 -16
- package/dist/components/layout/safe-container.windows.js.map +0 -1
- package/dist/components/lists/index.d.ts +0 -2
- package/dist/components/lists/index.js +0 -3
- package/dist/components/lists/index.js.map +0 -1
- package/dist/components/lists/list-header.d.ts +0 -5
- package/dist/components/lists/list-header.js +0 -17
- package/dist/components/lists/list-header.js.map +0 -1
- package/dist/components/lists/list-items-separator.d.ts +0 -2
- package/dist/components/lists/list-items-separator.js +0 -17
- package/dist/components/lists/list-items-separator.js.map +0 -1
- package/dist/components/on-off-toggle/index.d.ts +0 -1
- package/dist/components/on-off-toggle/index.js +0 -2
- package/dist/components/on-off-toggle/index.js.map +0 -1
- package/dist/components/on-off-toggle/on-off-toggle.d.ts +0 -9
- package/dist/components/on-off-toggle/on-off-toggle.js +0 -27
- package/dist/components/on-off-toggle/on-off-toggle.js.map +0 -1
- package/dist/components/password-input/index.d.ts +0 -1
- package/dist/components/password-input/index.js +0 -2
- package/dist/components/password-input/index.js.map +0 -1
- package/dist/components/password-input/password-input.d.ts +0 -4
- package/dist/components/password-input/password-input.js +0 -27
- package/dist/components/password-input/password-input.js.map +0 -1
- package/dist/components/score-indicator/index.d.ts +0 -1
- package/dist/components/score-indicator/index.js +0 -2
- package/dist/components/score-indicator/index.js.map +0 -1
- package/dist/components/score-indicator/score-indicator.d.ts +0 -6
- package/dist/components/score-indicator/score-indicator.js +0 -31
- package/dist/components/score-indicator/score-indicator.js.map +0 -1
- package/dist/components/snack-bar/index.d.ts +0 -2
- package/dist/components/snack-bar/index.js +0 -3
- package/dist/components/snack-bar/index.js.map +0 -1
- package/dist/components/snack-bar/snackbar-provider.d.ts +0 -8
- package/dist/components/snack-bar/snackbar-provider.js +0 -31
- package/dist/components/snack-bar/snackbar-provider.js.map +0 -1
- package/dist/components/snack-bar/snackbar.constants.d.ts +0 -5
- package/dist/components/snack-bar/snackbar.constants.js +0 -6
- package/dist/components/snack-bar/snackbar.constants.js.map +0 -1
- package/dist/components/spinner/activity-progress-bar-stats.d.ts +0 -8
- package/dist/components/spinner/activity-progress-bar-stats.js +0 -27
- package/dist/components/spinner/activity-progress-bar-stats.js.map +0 -1
- package/dist/components/spinner/activity-progress-bar.d.ts +0 -10
- package/dist/components/spinner/activity-progress-bar.js +0 -21
- package/dist/components/spinner/activity-progress-bar.js.map +0 -1
- package/dist/components/spinner/activity-progress.utils.d.ts +0 -10
- package/dist/components/spinner/activity-progress.utils.js +0 -20
- package/dist/components/spinner/activity-progress.utils.js.map +0 -1
- package/dist/components/spinner/full-centered-spinner.d.ts +0 -2
- package/dist/components/spinner/full-centered-spinner.js +0 -5
- package/dist/components/spinner/full-centered-spinner.js.map +0 -1
- package/dist/components/spinner/index.d.ts +0 -5
- package/dist/components/spinner/index.js +0 -6
- package/dist/components/spinner/index.js.map +0 -1
- package/dist/components/spinner/modal-spinner.d.ts +0 -9
- package/dist/components/spinner/modal-spinner.js +0 -34
- package/dist/components/spinner/modal-spinner.js.map +0 -1
- package/dist/components/syntax/index.d.ts +0 -4
- package/dist/components/syntax/index.js +0 -5
- package/dist/components/syntax/index.js.map +0 -1
- package/dist/components/syntax/styles/dark.d.ts +0 -92
- package/dist/components/syntax/styles/dark.js +0 -92
- package/dist/components/syntax/styles/dark.js.map +0 -1
- package/dist/components/syntax/styles/index.d.ts +0 -2
- package/dist/components/syntax/styles/index.js +0 -3
- package/dist/components/syntax/styles/index.js.map +0 -1
- package/dist/components/syntax/styles/light.d.ts +0 -110
- package/dist/components/syntax/styles/light.js +0 -110
- package/dist/components/syntax/styles/light.js.map +0 -1
- package/dist/components/syntax/syntax-coloring-tag-code.d.ts +0 -9
- package/dist/components/syntax/syntax-coloring-tag-code.js +0 -27
- package/dist/components/syntax/syntax-coloring-tag-code.js.map +0 -1
- package/dist/components/syntax/syntax-coloring-tag-pre.d.ts +0 -9
- package/dist/components/syntax/syntax-coloring-tag-pre.js +0 -18
- package/dist/components/syntax/syntax-coloring-tag-pre.js.map +0 -1
- package/dist/components/syntax/syntax-coloring.d.ts +0 -8
- package/dist/components/syntax/syntax-coloring.js +0 -25
- package/dist/components/syntax/syntax-coloring.js.map +0 -1
- package/dist/components/tab-bar-icon.d.ts +0 -14
- package/dist/components/tab-bar-icon.js +0 -12
- package/dist/components/tab-bar-icon.js.map +0 -1
- package/dist/components/voice-recognition/index.d.ts +0 -2
- package/dist/components/voice-recognition/index.js +0 -3
- package/dist/components/voice-recognition/index.js.map +0 -1
- package/dist/components/voice-recognition/voice-recognition-text-input.d.ts +0 -10
- package/dist/components/voice-recognition/voice-recognition-text-input.js +0 -104
- package/dist/components/voice-recognition/voice-recognition-text-input.js.map +0 -1
- package/dist/components/voice-recognition/voice-recognition.utils.d.ts +0 -7
- package/dist/components/voice-recognition/voice-recognition.utils.js +0 -24
- package/dist/components/voice-recognition/voice-recognition.utils.js.map +0 -1
- package/dist/config/env.config.d.ts +0 -2
- package/dist/config/env.config.js +0 -4
- package/dist/config/env.config.js.map +0 -1
- package/dist/config/index.d.ts +0 -1
- package/dist/config/index.js +0 -2
- package/dist/config/index.js.map +0 -1
- package/dist/hooks/camera-image-picker/camera-image-picker.utils.d.ts +0 -4
- package/dist/hooks/camera-image-picker/camera-image-picker.utils.js +0 -16
- package/dist/hooks/camera-image-picker/camera-image-picker.utils.js.map +0 -1
- package/dist/hooks/camera-image-picker/index.d.ts +0 -2
- package/dist/hooks/camera-image-picker/index.js +0 -3
- package/dist/hooks/camera-image-picker/index.js.map +0 -1
- package/dist/hooks/camera-image-picker/use-camera-image-picker.d.ts +0 -5
- package/dist/hooks/camera-image-picker/use-camera-image-picker.js +0 -53
- package/dist/hooks/camera-image-picker/use-camera-image-picker.js.map +0 -1
- package/dist/hooks/index.d.ts +0 -9
- package/dist/hooks/index.js +0 -10
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/use-animate-on-focus.windows.d.ts +0 -1
- package/dist/hooks/use-animate-on-focus.windows.js +0 -5
- package/dist/hooks/use-animate-on-focus.windows.js.map +0 -1
- package/dist/hooks/use-image-picker.d.ts +0 -11
- package/dist/hooks/use-image-picker.js +0 -35
- package/dist/hooks/use-image-picker.js.map +0 -1
- package/dist/hooks/use-image-picker.windows.d.ts +0 -1
- package/dist/hooks/use-image-picker.windows.js +0 -5
- package/dist/hooks/use-image-picker.windows.js.map +0 -1
- package/dist/hooks/use-invalidate-queries-on-focus.d.ts +0 -2
- package/dist/hooks/use-invalidate-queries-on-focus.js +0 -11
- package/dist/hooks/use-invalidate-queries-on-focus.js.map +0 -1
- package/dist/hooks/use-on-html-message.d.ts +0 -5
- package/dist/hooks/use-on-html-message.js +0 -30
- package/dist/hooks/use-on-html-message.js.map +0 -1
- package/dist/hooks/use-single-file-selector.d.ts +0 -17
- package/dist/hooks/use-single-file-selector.js +0 -32
- package/dist/hooks/use-single-file-selector.js.map +0 -1
- package/dist/hooks/use-single-file-selector.windows.d.ts +0 -1
- package/dist/hooks/use-single-file-selector.windows.js +0 -5
- package/dist/hooks/use-single-file-selector.windows.js.map +0 -1
- package/dist/hooks/use-timeout-state.d.ts +0 -1
- package/dist/hooks/use-timeout-state.js +0 -11
- package/dist/hooks/use-timeout-state.js.map +0 -1
- package/dist/hooks/use-timeout-toggle.d.ts +0 -1
- package/dist/hooks/use-timeout-toggle.js +0 -20
- package/dist/hooks/use-timeout-toggle.js.map +0 -1
- package/dist/hooks/use-updates.d.ts +0 -8
- package/dist/hooks/use-updates.js +0 -68
- package/dist/hooks/use-updates.js.map +0 -1
- package/dist/hooks/use-updates.windows.d.ts +0 -1
- package/dist/hooks/use-updates.windows.js +0 -5
- package/dist/hooks/use-updates.windows.js.map +0 -1
- package/dist/hooks/use-window-orientation.d.ts +0 -3
- package/dist/hooks/use-window-orientation.js +0 -10
- package/dist/hooks/use-window-orientation.js.map +0 -1
- package/dist/i18n/en/common.json +0 -188
- package/dist/i18n/fr/common.json +0 -188
- package/dist/i18n/i18n.d.ts +0 -17
- package/dist/i18n/i18n.js +0 -47
- package/dist/i18n/i18n.js.map +0 -1
- package/dist/i18n/i18n.utils.d.ts +0 -1
- package/dist/i18n/i18n.utils.js +0 -7
- package/dist/i18n/i18n.utils.js.map +0 -1
- package/dist/i18n/i18n.utils.windows.d.ts +0 -1
- package/dist/i18n/i18n.utils.windows.js +0 -6
- package/dist/i18n/i18n.utils.windows.js.map +0 -1
- package/dist/i18n/index.d.ts +0 -2
- package/dist/i18n/index.js +0 -3
- package/dist/i18n/index.js.map +0 -1
- package/dist/logger/index.d.ts +0 -4
- package/dist/logger/index.js +0 -5
- package/dist/logger/index.js.map +0 -1
- package/dist/logger/logger.d.ts +0 -17
- package/dist/logger/logger.js +0 -163
- package/dist/logger/logger.js.map +0 -1
- package/dist/logger/logger.types.d.ts +0 -25
- package/dist/logger/logger.types.js +0 -8
- package/dist/logger/logger.types.js.map +0 -1
- package/dist/logger/logger.utils.d.ts +0 -6
- package/dist/logger/logger.utils.js +0 -40
- package/dist/logger/logger.utils.js.map +0 -1
- package/dist/logger/logger.windows.d.ts +0 -18
- package/dist/logger/logger.windows.js +0 -65
- package/dist/logger/logger.windows.js.map +0 -1
- package/dist/logger/use-log-entry-color.d.ts +0 -1
- package/dist/logger/use-log-entry-color.js +0 -23
- package/dist/logger/use-log-entry-color.js.map +0 -1
- package/dist/services/device-finder/device-finder.d.ts +0 -31
- package/dist/services/device-finder/device-finder.js +0 -105
- package/dist/services/device-finder/device-finder.js.map +0 -1
- package/dist/services/device-finder/device-finder.types.d.ts +0 -8
- package/dist/services/device-finder/device-finder.types.js +0 -1
- package/dist/services/device-finder/device-finder.types.js.map +0 -1
- package/dist/services/device-finder/device-finder.windows.d.ts +0 -18
- package/dist/services/device-finder/device-finder.windows.js +0 -48
- package/dist/services/device-finder/device-finder.windows.js.map +0 -1
- package/dist/services/device-finder/index.d.ts +0 -2
- package/dist/services/device-finder/index.js +0 -3
- package/dist/services/device-finder/index.js.map +0 -1
- package/dist/services/files/index.d.ts +0 -2
- package/dist/services/files/index.js +0 -3
- package/dist/services/files/index.js.map +0 -1
- package/dist/services/files/native-file-system.d.ts +0 -15
- package/dist/services/files/native-file-system.js +0 -101
- package/dist/services/files/native-file-system.js.map +0 -1
- package/dist/services/files/native-file-system.types.d.ts +0 -38
- package/dist/services/files/native-file-system.types.js +0 -6
- package/dist/services/files/native-file-system.types.js.map +0 -1
- package/dist/services/files/native-file-system.windows.d.ts +0 -14
- package/dist/services/files/native-file-system.windows.js +0 -31
- package/dist/services/files/native-file-system.windows.js.map +0 -1
- package/dist/services/index.d.ts +0 -3
- package/dist/services/index.js +0 -4
- package/dist/services/index.js.map +0 -1
- package/dist/services/wifi/index.d.ts +0 -6
- package/dist/services/wifi/index.js +0 -7
- package/dist/services/wifi/index.js.map +0 -1
- package/dist/services/wifi/query-keys.d.ts +0 -10
- package/dist/services/wifi/query-keys.js +0 -11
- package/dist/services/wifi/query-keys.js.map +0 -1
- package/dist/services/wifi/use-wifi-info.d.ts +0 -472
- package/dist/services/wifi/use-wifi-info.js +0 -95
- package/dist/services/wifi/use-wifi-info.js.map +0 -1
- package/dist/services/wifi/wifi-info.types.d.ts +0 -22
- package/dist/services/wifi/wifi-info.types.js +0 -21
- package/dist/services/wifi/wifi-info.types.js.map +0 -1
- package/dist/services/wifi/wifi-info.utils.d.ts +0 -15
- package/dist/services/wifi/wifi-info.utils.js +0 -114
- package/dist/services/wifi/wifi-info.utils.js.map +0 -1
- package/dist/services/wifi/wifi-info.utils.simulator.d.ts +0 -3
- package/dist/services/wifi/wifi-info.utils.simulator.js +0 -23
- package/dist/services/wifi/wifi-info.utils.simulator.js.map +0 -1
- package/dist/services/wifi/wifi-info.utils.windows.d.ts +0 -2
- package/dist/services/wifi/wifi-info.utils.windows.js +0 -6
- package/dist/services/wifi/wifi-info.utils.windows.js.map +0 -1
- package/dist/services/wifi/wifi-infos-context.d.ts +0 -170
- package/dist/services/wifi/wifi-infos-context.js +0 -34
- package/dist/services/wifi/wifi-infos-context.js.map +0 -1
- package/dist/store/common-logs.store.d.ts +0 -13
- package/dist/store/common-logs.store.js +0 -32
- package/dist/store/common-logs.store.js.map +0 -1
- package/dist/store/common.store.d.ts +0 -12
- package/dist/store/common.store.js +0 -40
- package/dist/store/common.store.js.map +0 -1
- package/dist/store/index.d.ts +0 -3
- package/dist/store/index.js +0 -4
- package/dist/store/index.js.map +0 -1
- package/dist/store/react-query-provider.d.ts +0 -4
- package/dist/store/react-query-provider.js +0 -7
- package/dist/store/react-query-provider.js.map +0 -1
- package/dist/theme/dark-colors-scheme.d.ts +0 -42
- package/dist/theme/dark-colors-scheme.js +0 -44
- package/dist/theme/dark-colors-scheme.js.map +0 -1
- package/dist/theme/index.d.ts +0 -3
- package/dist/theme/index.js +0 -4
- package/dist/theme/index.js.map +0 -1
- package/dist/theme/light-colors-scheme.d.ts +0 -42
- package/dist/theme/light-colors-scheme.js +0 -44
- package/dist/theme/light-colors-scheme.js.map +0 -1
- package/dist/theme/theme.d.ts +0 -171
- package/dist/theme/theme.js +0 -27
- package/dist/theme/theme.js.map +0 -1
- package/dist/utils/alert.utils.d.ts +0 -1
- package/dist/utils/alert.utils.js +0 -12
- package/dist/utils/alert.utils.js.map +0 -1
- package/dist/utils/axios.config.d.ts +0 -2
- package/dist/utils/axios.config.js +0 -15
- package/dist/utils/axios.config.js.map +0 -1
- package/dist/utils/base64.utils.d.ts +0 -2
- package/dist/utils/base64.utils.js +0 -8
- package/dist/utils/base64.utils.js.map +0 -1
- package/dist/utils/clipboard.utils.d.ts +0 -1
- package/dist/utils/clipboard.utils.js +0 -12
- package/dist/utils/clipboard.utils.js.map +0 -1
- package/dist/utils/date.utils.d.ts +0 -3
- package/dist/utils/date.utils.js +0 -15
- package/dist/utils/date.utils.js.map +0 -1
- package/dist/utils/device.utils.d.ts +0 -4
- package/dist/utils/device.utils.js +0 -28
- package/dist/utils/device.utils.js.map +0 -1
- package/dist/utils/device.utils.windows.d.ts +0 -3
- package/dist/utils/device.utils.windows.js +0 -11
- package/dist/utils/device.utils.windows.js.map +0 -1
- package/dist/utils/digest-auth.d.ts +0 -32
- package/dist/utils/digest-auth.js +0 -157
- package/dist/utils/digest-auth.js.map +0 -1
- package/dist/utils/env.utils.d.ts +0 -5
- package/dist/utils/env.utils.js +0 -32
- package/dist/utils/env.utils.js.map +0 -1
- package/dist/utils/env.utils.windows.d.ts +0 -3
- package/dist/utils/env.utils.windows.js +0 -11
- package/dist/utils/env.utils.windows.js.map +0 -1
- package/dist/utils/errors.utils.d.ts +0 -6
- package/dist/utils/errors.utils.js +0 -9
- package/dist/utils/errors.utils.js.map +0 -1
- package/dist/utils/file-picker.utils.d.ts +0 -30
- package/dist/utils/file-picker.utils.js +0 -18
- package/dist/utils/file-picker.utils.js.map +0 -1
- package/dist/utils/file-picker.utils.windows.d.ts +0 -9
- package/dist/utils/file-picker.utils.windows.js +0 -6
- package/dist/utils/file-picker.utils.windows.js.map +0 -1
- package/dist/utils/file.utils.d.ts +0 -28
- package/dist/utils/file.utils.js +0 -105
- package/dist/utils/file.utils.js.map +0 -1
- package/dist/utils/filename.utils.d.ts +0 -40
- package/dist/utils/filename.utils.js +0 -129
- package/dist/utils/filename.utils.js.map +0 -1
- package/dist/utils/font.utils.d.ts +0 -1
- package/dist/utils/font.utils.js +0 -8
- package/dist/utils/font.utils.js.map +0 -1
- package/dist/utils/image.utils.d.ts +0 -1
- package/dist/utils/image.utils.js +0 -16
- package/dist/utils/image.utils.js.map +0 -1
- package/dist/utils/index.d.ts +0 -22
- package/dist/utils/index.js +0 -23
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/licences.utils.d.ts +0 -16
- package/dist/utils/licences.utils.js +0 -19
- package/dist/utils/licences.utils.js.map +0 -1
- package/dist/utils/linking.utils.d.ts +0 -3
- package/dist/utils/linking.utils.js +0 -33
- package/dist/utils/linking.utils.js.map +0 -1
- package/dist/utils/network.utils.d.ts +0 -4
- package/dist/utils/network.utils.js +0 -41
- package/dist/utils/network.utils.js.map +0 -1
- package/dist/utils/platform.utils.d.ts +0 -1
- package/dist/utils/platform.utils.js +0 -6
- package/dist/utils/platform.utils.js.map +0 -1
- package/dist/utils/sharing.utils.d.ts +0 -9
- package/dist/utils/sharing.utils.js +0 -58
- package/dist/utils/sharing.utils.js.map +0 -1
- package/dist/utils/sharing.utils.windows.d.ts +0 -3
- package/dist/utils/sharing.utils.windows.js +0 -11
- package/dist/utils/sharing.utils.windows.js.map +0 -1
- package/dist/utils/sqlite.utils.d.ts +0 -10
- package/dist/utils/sqlite.utils.js +0 -36
- package/dist/utils/sqlite.utils.js.map +0 -1
- package/dist/utils/storage.d.ts +0 -10
- package/dist/utils/storage.js +0 -60
- package/dist/utils/storage.js.map +0 -1
- package/dist/utils/storage.windows.d.ts +0 -10
- package/dist/utils/storage.windows.js +0 -34
- package/dist/utils/storage.windows.js.map +0 -1
- package/dist/utils/webview.utils.d.ts +0 -9
- package/dist/utils/webview.utils.js +0 -18
- package/dist/utils/webview.utils.js.map +0 -1
|
@@ -1,32 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,7 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,34 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { isNullish } from '@lichens-innovation/ts-common';
|
|
2
|
-
import { Camera } from 'expo-camera';
|
|
3
|
-
import i18next from 'i18next';
|
|
4
|
-
import { logger } from '../../logger/logger';
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"barcode-scanner.utils.js","sourceRoot":"","sources":["../../../src/components/code-scanner/barcode-scanner.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAe,MAAM,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,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"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,12 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,39 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type ComponentProps, type FunctionComponent, type ReactNode } from 'react';
|
|
2
|
-
import { Dialog } from 'react-native-paper';
|
|
3
|
-
type DialogProps = ComponentProps<typeof Dialog>;
|
|
4
|
-
interface DialogOkCancelProps extends Omit<DialogProps, 'children' | 'visible'> {
|
|
5
|
-
icon?: string;
|
|
6
|
-
title?: ReactNode;
|
|
7
|
-
description?: ReactNode;
|
|
8
|
-
onOk: () => void;
|
|
9
|
-
onCancel: () => void;
|
|
10
|
-
isVisible: boolean;
|
|
11
|
-
}
|
|
12
|
-
export declare const DialogOkCancel: FunctionComponent<DialogOkCancelProps>;
|
|
13
|
-
export {};
|
|
@@ -1,44 +0,0 @@
|
|
|
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, Text } from 'react-native-paper';
|
|
16
|
-
import { useDialogStyles } from './use-dialog-styles';
|
|
17
|
-
export const DialogOkCancel = (_a) => {
|
|
18
|
-
var { icon, title, description, onOk, onCancel, isVisible } = _a, rest = __rest(_a, ["icon", "title", "description", "onOk", "onCancel", "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 hasTitleString = typeof title === 'string';
|
|
25
|
-
const hasDescription = !!description;
|
|
26
|
-
const hasDescriptionString = typeof description === 'string';
|
|
27
|
-
if (!isVisible) {
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
return (_jsx(Portal, { children: _jsxs(Dialog, Object.assign({ style: [styles.dialog, dialogStyleProp], visible: true, onDismiss: onCancel }, dialogProps, { children: [hasIcon && _jsx(Dialog.Icon, { icon: icon }), hasTitle && _jsx(Dialog.Title, { children: hasTitleString ? _jsx(Text, { children: title }) : title }), hasDescription && (_jsx(Dialog.Content, { children: hasDescriptionString ? _jsx(Text, { children: description }) : description })), _jsxs(Dialog.Actions, { children: [_jsx(Button, { onPress: onCancel, children: t('common:cancel') }), _jsx(Button, { style: styles.button, mode: "contained", onPress: onOk, children: t('common:ok') })] })] })) }));
|
|
31
|
-
};
|
|
32
|
-
const useStyles = () => {
|
|
33
|
-
const { width, alignSelf } = useDialogStyles();
|
|
34
|
-
return StyleSheet.create({
|
|
35
|
-
button: {
|
|
36
|
-
width: 60,
|
|
37
|
-
},
|
|
38
|
-
dialog: {
|
|
39
|
-
width,
|
|
40
|
-
alignSelf,
|
|
41
|
-
},
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
//# sourceMappingURL=dialog-ok-cancel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-ok-cancel.js","sourceRoot":"","sources":["../../../src/components/dialogs/dialog-ok-cancel.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,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAatD,MAAM,CAAC,MAAM,cAAc,GAA2C,CAAC,EAQtE,EAAE,EAAE;QARkE,EACrE,IAAI,EACJ,KAAK,EACL,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,SAAS,OAEV,EADI,IAAI,cAP8D,iEAQtE,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;IAEvB,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC;IACzB,MAAM,cAAc,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC;IAEjD,MAAM,cAAc,GAAG,CAAC,CAAC,WAAW,CAAC;IACrC,MAAM,oBAA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ComponentProps, type FunctionComponent, type ReactNode } from 'react';
|
|
2
|
-
import { Dialog } from 'react-native-paper';
|
|
3
|
-
type DialogProps = ComponentProps<typeof Dialog>;
|
|
4
|
-
interface DialogSingleTextInputProps extends Omit<DialogProps, 'children' | 'visible'> {
|
|
5
|
-
title: ReactNode;
|
|
6
|
-
description?: ReactNode;
|
|
7
|
-
value: string;
|
|
8
|
-
onChange: (value: string) => void;
|
|
9
|
-
errorMessage?: string;
|
|
10
|
-
placeholder?: string;
|
|
11
|
-
onOk: (inputValue: string) => void;
|
|
12
|
-
onCancel: () => void;
|
|
13
|
-
isVisible: boolean;
|
|
14
|
-
}
|
|
15
|
-
export declare const DialogSingleTextInput: FunctionComponent<DialogSingleTextInputProps>;
|
|
16
|
-
export {};
|
|
@@ -1,59 +0,0 @@
|
|
|
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 { useState } from 'react';
|
|
14
|
-
import { useTranslation } from 'react-i18next';
|
|
15
|
-
import { StyleSheet } from 'react-native';
|
|
16
|
-
import { Button, Dialog, Portal, Text, TextInput } from 'react-native-paper';
|
|
17
|
-
import { useAppTheme } from '../../theme/theme';
|
|
18
|
-
import { useDialogStyles } from './use-dialog-styles';
|
|
19
|
-
export const DialogSingleTextInput = (_a) => {
|
|
20
|
-
var { title, description, value, onChange, errorMessage, placeholder, onOk, onCancel, isVisible } = _a, rest = __rest(_a, ["title", "description", "value", "onChange", "errorMessage", "placeholder", "onOk", "onCancel", "isVisible"]);
|
|
21
|
-
const { style: dialogStyleProp } = rest, dialogProps = __rest(rest, ["style"]);
|
|
22
|
-
const styles = useStyles();
|
|
23
|
-
const { t } = useTranslation();
|
|
24
|
-
const [selection, setSelection] = useState();
|
|
25
|
-
const [inputValue, setInputValue] = useState(value);
|
|
26
|
-
const hasTitle = !!title;
|
|
27
|
-
const hasTitleString = typeof title === 'string';
|
|
28
|
-
const hasDescription = !!description;
|
|
29
|
-
const hasDescriptionString = typeof description === 'string';
|
|
30
|
-
const hasError = !!errorMessage;
|
|
31
|
-
const isInputPopulated = inputValue.trim().length > 0;
|
|
32
|
-
const isOkEnabled = !hasError && isInputPopulated;
|
|
33
|
-
const onChangeText = (text) => {
|
|
34
|
-
setInputValue(text);
|
|
35
|
-
onChange(text);
|
|
36
|
-
};
|
|
37
|
-
if (!isVisible) {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
return (_jsx(Portal, { children: _jsxs(Dialog, Object.assign({}, dialogProps, { style: [styles.dialog, dialogStyleProp], visible: true, onDismiss: onCancel, children: [hasTitle && _jsx(Dialog.Title, { children: hasTitleString ? _jsx(Text, { children: title }) : title }), hasDescription && (_jsx(Dialog.Content, { children: hasDescriptionString ? _jsx(Text, { children: description }) : description })), _jsxs(Dialog.Content, { children: [_jsx(TextInput, { mode: "outlined", value: inputValue, onChangeText: onChangeText, selection: selection, onSelectionChange: (e) => setSelection(e.nativeEvent.selection), placeholder: placeholder, error: hasError }), hasError && (_jsx(Text, { variant: "bodyMedium", style: styles.errorText, children: errorMessage }))] }), _jsxs(Dialog.Actions, { children: [_jsx(Button, { onPress: onCancel, children: t('common:cancel') }), _jsx(Button, { style: styles.button, mode: "contained", onPress: () => onOk(inputValue), disabled: !isOkEnabled, children: t('common:ok') })] })] })) }));
|
|
41
|
-
};
|
|
42
|
-
const useStyles = () => {
|
|
43
|
-
const theme = useAppTheme();
|
|
44
|
-
const { width, alignSelf } = useDialogStyles();
|
|
45
|
-
return StyleSheet.create({
|
|
46
|
-
button: {
|
|
47
|
-
width: 60,
|
|
48
|
-
},
|
|
49
|
-
dialog: {
|
|
50
|
-
width,
|
|
51
|
-
alignSelf,
|
|
52
|
-
},
|
|
53
|
-
errorText: {
|
|
54
|
-
marginTop: theme.spacing(1),
|
|
55
|
-
color: theme.colors.error,
|
|
56
|
-
},
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
//# sourceMappingURL=dialog-single-textinput.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-single-textinput.js","sourceRoot":"","sources":["../../../src/components/dialogs/dialog-single-textinput.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAA+D,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9F,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,IAAI,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAkBtD,MAAM,CAAC,MAAM,qBAAqB,GAAkD,CAAC,EAWpF,EAAE,EAAE;QAXgF,EACnF,KAAK,EACL,WAAW,EACX,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,SAAS,OAEV,EADI,IAAI,cAV4E,6GAWpF,CADQ;IAEP,MAAM,EAAE,KAAK,EAAE,eAAe,KAAqB,IAAI,EAApB,WAAW,UAAK,IAAI,EAAjD,SAA0C,CAAO,CAAC;IACxD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC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,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type ComponentProps, type FunctionComponent, type ReactNode } from 'react';
|
|
2
|
-
import { Dialog } from 'react-native-paper';
|
|
3
|
-
type DialogProps = ComponentProps<typeof Dialog>;
|
|
4
|
-
interface DialogSyntaxColorResultProps extends Omit<DialogProps, 'children' | 'visible'> {
|
|
5
|
-
icon?: string;
|
|
6
|
-
title: ReactNode;
|
|
7
|
-
code: string;
|
|
8
|
-
language: string;
|
|
9
|
-
maxCodeLength?: number;
|
|
10
|
-
onClose: () => void;
|
|
11
|
-
isVisible: boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare const DialogSyntaxColorResult: FunctionComponent<DialogSyntaxColorResultProps>;
|
|
14
|
-
export {};
|
|
@@ -1,47 +0,0 @@
|
|
|
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 { ScrollView, StyleSheet, useWindowDimensions } from 'react-native';
|
|
15
|
-
import { Button, Dialog, Portal } from 'react-native-paper';
|
|
16
|
-
import { setClipboardTextContent } from '../../utils/clipboard.utils';
|
|
17
|
-
import { useSnackbar } from '../snack-bar/snackbar-provider';
|
|
18
|
-
import { SyntaxColoring } from '../syntax/syntax-coloring';
|
|
19
|
-
import { useDialogStyles } from './use-dialog-styles';
|
|
20
|
-
export const DialogSyntaxColorResult = (_a) => {
|
|
21
|
-
var { icon, title, code, language, maxCodeLength, onClose, isVisible } = _a, dialogProps = __rest(_a, ["icon", "title", "code", "language", "maxCodeLength", "onClose", "isVisible"]);
|
|
22
|
-
const styles = useStyles();
|
|
23
|
-
const { showSnackbarMessage } = useSnackbar();
|
|
24
|
-
const { t } = useTranslation();
|
|
25
|
-
const hasIcon = !!icon;
|
|
26
|
-
const hasTitle = !!title;
|
|
27
|
-
const onCopy = () => {
|
|
28
|
-
setClipboardTextContent(code);
|
|
29
|
-
showSnackbarMessage(t('common:copiedToClipboard'));
|
|
30
|
-
};
|
|
31
|
-
if (!isVisible) {
|
|
32
|
-
return null;
|
|
33
|
-
}
|
|
34
|
-
return (_jsx(Portal, { children: _jsxs(Dialog, Object.assign({ visible: true, onDismiss: onClose, style: styles.dialog }, dialogProps, { children: [hasIcon && _jsx(Dialog.Icon, { icon: icon }), hasTitle && _jsx(Dialog.Title, { children: title }), _jsx(Dialog.ScrollArea, { children: _jsx(ScrollView, { children: _jsx(SyntaxColoring, { code: code, language: language, maxCodeLength: maxCodeLength }) }) }), _jsxs(Dialog.Actions, { children: [_jsx(Button, { mode: "outlined", onPress: onCopy, icon: "content-copy", children: t('common:copy') }), _jsx(Button, { mode: "contained", onPress: onClose, children: t('common:close') })] })] })) }));
|
|
35
|
-
};
|
|
36
|
-
const useStyles = () => {
|
|
37
|
-
const { width, alignSelf } = useDialogStyles();
|
|
38
|
-
const { height } = useWindowDimensions();
|
|
39
|
-
return StyleSheet.create({
|
|
40
|
-
dialog: {
|
|
41
|
-
maxHeight: height * 0.8,
|
|
42
|
-
width,
|
|
43
|
-
alignSelf,
|
|
44
|
-
},
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
//# sourceMappingURL=dialog-syntax-color-result.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-syntax-color-result.js","sourceRoot":"","sources":["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AK,EAAE,MAAM,CAAC,MAAM,IAAM,WAAW,eAC7E,OAAO,IAAI,KAAC,MAAM,CAAC,IAAI,IAAC,IAAI,EAAE,IAAI,GAAI,EACtC,QAAQ,IAAI,KAAC,MAAM,CAAC,KAAK,cAAE,KAAK,GAAgB,EAEjD,KAAC,MAAM,CAAC,UAAU,cAChB,KAAC,UAAU,cACT,KAAC,cAAc,IAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,GAAI,GACrE,GACK,EAEpB,MAAC,MAAM,CAAC,OAAO,eACb,KAAC,MAAM,IAAC,IAAI,EAAC,UAAU,EAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAC,cAAc,YACzD,CAAC,CAAC,aAAa,CAAC,GACV,EACT,KAAC,MAAM,IAAC,IAAI,EAAC,WAAW,EAAC,OAAO,EAAE,OAAO,YACtC,CAAC,CAAC,cAAc,CAAC,GACX,IACM,KACV,GACF,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,eAAe,EAAE,CAAC;IAC/C,MAAM,EAAE,MAAM,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAEzC,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,MAAM,EAAE;YACN,SAAS,EAAE,MAAM,GAAG,GAAG;YACvB,KAAK;YACL,SAAS;SACV;KACF,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/dialogs/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { useWindowDimensions } from 'react-native';
|
|
2
|
-
const LARGE_SCREEN_WIDTH = 600;
|
|
3
|
-
const MAX_DIALOG_WIDTH = 500;
|
|
4
|
-
export const useDialogStyles = () => {
|
|
5
|
-
const { width: deviceWidth } = useWindowDimensions();
|
|
6
|
-
const width = deviceWidth > LARGE_SCREEN_WIDTH ? MAX_DIALOG_WIDTH : undefined;
|
|
7
|
-
const alignSelf = width ? 'center' : undefined;
|
|
8
|
-
return {
|
|
9
|
-
width,
|
|
10
|
-
alignSelf,
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=use-dialog-styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-dialog-styles.js","sourceRoot":"","sources":["../../../src/components/dialogs/use-dialog-styles.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAa,MAAM,cAAc,CAAC;AAE9D,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAC/B,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,mBAAmB,EAAE,CAAC;IACrD,MAAM,KAAK,GAAG,WAAW,GAAG,kBAAkB,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC;IAC9E,MAAM,SAAS,GAA2B,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IAEvE,OAAO;QACL,KAAK;QACL,SAAS;KACV,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
|
-
import { SelectOption } from './drop-down-selector';
|
|
3
|
-
export type DropDownSelectorItemProps = {
|
|
4
|
-
item: SelectOption;
|
|
5
|
-
selected?: boolean;
|
|
6
|
-
textColor: string;
|
|
7
|
-
};
|
|
8
|
-
export declare const DropDownSelectorItem: FunctionComponent<DropDownSelectorItemProps>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { StyleSheet, View } from 'react-native';
|
|
3
|
-
import { Text } from 'react-native-paper';
|
|
4
|
-
import { useAppTheme } from '../../theme/theme';
|
|
5
|
-
import { DropDownSelectorLeftIcon } from './drop-down-selector-left-icon';
|
|
6
|
-
export const DropDownSelectorItem = ({ item, selected, textColor }) => {
|
|
7
|
-
const isSelected = selected === true;
|
|
8
|
-
const styles = useStyles({ isSelected });
|
|
9
|
-
return (_jsxs(View, { style: styles.itemContainer, children: [item.icon && _jsx(DropDownSelectorLeftIcon, { icon: item.icon, color: textColor }), _jsx(Text, { style: { color: textColor }, children: item.label })] }));
|
|
10
|
-
};
|
|
11
|
-
const useStyles = ({ isSelected }) => {
|
|
12
|
-
const theme = useAppTheme();
|
|
13
|
-
return StyleSheet.create({
|
|
14
|
-
itemContainer: {
|
|
15
|
-
flexDirection: 'row',
|
|
16
|
-
alignItems: 'center',
|
|
17
|
-
paddingVertical: theme.spacing(1),
|
|
18
|
-
paddingHorizontal: theme.spacing(1),
|
|
19
|
-
gap: theme.spacing(1),
|
|
20
|
-
backgroundColor: isSelected ? theme.colors.surfaceVariant : theme.colors.surface,
|
|
21
|
-
},
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=drop-down-selector-item.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drop-down-selector-item.js","sourceRoot":"","sources":["../../../src/components/drop-down-selector/drop-down-selector-item.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,wBAAwB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color, size = 20, }) => {
|
|
4
|
-
if (!icon) {
|
|
5
|
-
return null;
|
|
6
|
-
}
|
|
7
|
-
return _jsx(Icon, { source: icon, size: size, color: color });
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=drop-down-selector-left-icon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drop-down-selector-left-icon.js","sourceRoot":"","sources":["../../../src/components/drop-down-selector/drop-down-selector-left-icon.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAQ1C,MAAM,CAAC,MAAM,wBAAwB,GAAqD,CAAC,EACzF,IAAI,EACJ,KAAK,EACL,IAAI,GAAG,EAAE,GACV,EAAE,EAAE;IACH,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAC,IAAI,IAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,GAAI,CAAC;AAC1D,CAAC,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
|
-
export interface SelectOption {
|
|
3
|
-
label: string;
|
|
4
|
-
value: string;
|
|
5
|
-
icon?: string;
|
|
6
|
-
}
|
|
7
|
-
export type DropDownSelectorProps = {
|
|
8
|
-
label?: string;
|
|
9
|
-
value?: string;
|
|
10
|
-
onChange: (code: string) => void;
|
|
11
|
-
isError?: boolean;
|
|
12
|
-
options: SelectOption[];
|
|
13
|
-
placeholder?: string;
|
|
14
|
-
searchPlaceholder?: string;
|
|
15
|
-
disabled?: boolean;
|
|
16
|
-
};
|
|
17
|
-
export declare const DropDownSelector: FunctionComponent<DropDownSelectorProps>;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { StyleSheet, View } from 'react-native';
|
|
4
|
-
import { Dropdown } from 'react-native-element-dropdown';
|
|
5
|
-
import { Text } from 'react-native-paper';
|
|
6
|
-
import { useAppTheme } from '../../theme/theme';
|
|
7
|
-
import { getBorderColor, getLabelColor, getTextColor } from './drop-down-selector.utils';
|
|
8
|
-
import { DropDownSelectorItem } from './drop-down-selector-item';
|
|
9
|
-
import { DropDownSelectorLeftIcon } from './drop-down-selector-left-icon';
|
|
10
|
-
export const DropDownSelector = ({ label, value, onChange, isError, options, placeholder, searchPlaceholder, disabled, }) => {
|
|
11
|
-
const [isFocused, setIsFocused] = useState(false);
|
|
12
|
-
const hasLabel = !!label;
|
|
13
|
-
const theme = useAppTheme();
|
|
14
|
-
const isDisabled = disabled === true;
|
|
15
|
-
const textColor = getTextColor({ theme, isFocused, isDisabled });
|
|
16
|
-
const styles = useStyles({ isFocused, disabled, isError, textColor });
|
|
17
|
-
const selectedItem = options.find((option) => option.value === value);
|
|
18
|
-
return (_jsxs(View, { children: [hasLabel && (_jsx(Text, { variant: "bodySmall", style: styles.dropdownTitle, children: label })), _jsx(Dropdown, { style: styles.dropdown, autoScroll: false, placeholderStyle: styles.placeholderStyle, selectedTextStyle: styles.selectedTextStyle, data: options, search: false, searchPlaceholder: searchPlaceholder, maxHeight: 300, labelField: "label", valueField: "value", placeholder: isFocused ? '' : placeholder, value: value, disable: disabled, onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false), onChange: ({ value }) => {
|
|
19
|
-
onChange(value);
|
|
20
|
-
setIsFocused(false);
|
|
21
|
-
}, renderItem: (item, selected) => (_jsx(DropDownSelectorItem, { item: item, selected: selected, textColor: textColor })), renderLeftIcon: () => _jsx(DropDownSelectorLeftIcon, { icon: selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.icon, color: textColor }) })] }));
|
|
22
|
-
};
|
|
23
|
-
const useStyles = ({ isFocused, disabled, isError, textColor }) => {
|
|
24
|
-
const theme = useAppTheme();
|
|
25
|
-
const { surface, surfaceDisabled } = theme.colors;
|
|
26
|
-
const isDisabled = disabled === true;
|
|
27
|
-
const isFocusedAndEnabled = isFocused && !isDisabled;
|
|
28
|
-
// Priority: error > disabled > focus > normal
|
|
29
|
-
const labelColor = getLabelColor({ theme, isError: !!isError, isDisabled, isFocusedAndEnabled });
|
|
30
|
-
const borderColor = getBorderColor({ theme, isError: !!isError, isDisabled, isFocused });
|
|
31
|
-
const borderWidth = isFocusedAndEnabled ? 2 : 1;
|
|
32
|
-
const backgroundColor = isDisabled ? surfaceDisabled : 'transparent';
|
|
33
|
-
return StyleSheet.create({
|
|
34
|
-
dropdownTitle: {
|
|
35
|
-
position: 'absolute',
|
|
36
|
-
top: -theme.spacing(1),
|
|
37
|
-
left: theme.spacing(1),
|
|
38
|
-
backgroundColor: surface,
|
|
39
|
-
paddingHorizontal: theme.spacing(0.75),
|
|
40
|
-
color: labelColor,
|
|
41
|
-
zIndex: 1,
|
|
42
|
-
},
|
|
43
|
-
dropdown: {
|
|
44
|
-
height: 50,
|
|
45
|
-
borderColor,
|
|
46
|
-
borderWidth,
|
|
47
|
-
borderRadius: theme.roundness,
|
|
48
|
-
paddingHorizontal: theme.spacing(1),
|
|
49
|
-
backgroundColor,
|
|
50
|
-
},
|
|
51
|
-
placeholderStyle: {
|
|
52
|
-
color: textColor,
|
|
53
|
-
},
|
|
54
|
-
selectedTextStyle: {
|
|
55
|
-
color: textColor,
|
|
56
|
-
paddingLeft: theme.spacing(1),
|
|
57
|
-
},
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
//# sourceMappingURL=drop-down-selector.js.map
|