@pallasoft/ps-mobile-components 1.2.0 → 1.4.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/dist/components/ps-action-menu/ps-action-menu-avatar-entry.d.ts +5 -0
- package/dist/components/ps-action-menu/ps-action-menu-avatar-entry.js +16 -0
- package/dist/components/ps-action-menu/ps-action-menu-entries.js +5 -2
- package/dist/components/ps-action-menu/ps-action-menu-labelled.d.ts +2 -1
- package/dist/components/ps-action-menu/ps-action-menu-labelled.js +2 -2
- package/dist/components/ps-action-menu/ps-action-menu.android.js +19 -30
- package/dist/components/ps-action-menu/ps-action-menu.ios.js +10 -1
- package/dist/components/ps-action-menu/ps-menu-tile-canvas.d.ts +6 -0
- package/dist/components/ps-action-menu/ps-menu-tile-canvas.js +5 -0
- package/dist/components/ps-action-menu/ps-menu-tile-drawing.d.ts +6 -0
- package/dist/components/ps-action-menu/ps-menu-tile-drawing.js +34 -0
- package/dist/components/ps-action-sheet/ps-action-sheet.js +6 -4
- package/dist/components/ps-app-lock-screen/index.d.ts +2 -0
- package/dist/components/ps-app-lock-screen/index.js +2 -0
- package/dist/components/ps-app-lock-screen/ps-app-lock-screen-props.d.ts +9 -0
- package/dist/components/ps-app-lock-screen/ps-app-lock-screen-props.js +1 -0
- package/dist/components/ps-app-lock-screen/ps-app-lock-screen.d.ts +2 -0
- package/dist/components/ps-app-lock-screen/ps-app-lock-screen.js +19 -0
- package/dist/components/ps-barcode-scanner-sheet/index.d.ts +2 -0
- package/dist/components/ps-barcode-scanner-sheet/index.js +2 -0
- package/dist/components/ps-barcode-scanner-sheet/ps-barcode-scanner-sheet-props.d.ts +11 -0
- package/dist/components/ps-barcode-scanner-sheet/ps-barcode-scanner-sheet-props.js +1 -0
- package/dist/components/ps-barcode-scanner-sheet/ps-barcode-scanner-sheet.d.ts +2 -0
- package/dist/components/ps-barcode-scanner-sheet/ps-barcode-scanner-sheet.js +82 -0
- package/dist/components/ps-button/ps-button.js +4 -2
- package/dist/components/ps-cartesian-chart/ps-cartesian-chart.js +25 -19
- package/dist/components/ps-checkbox/ps-checkbox.js +5 -2
- package/dist/components/ps-chip/ps-chip.js +4 -2
- package/dist/components/ps-date-field/ps-date-field.android.js +1 -1
- package/dist/components/ps-date-field/ps-date-field.ios.js +1 -1
- package/dist/components/ps-document-page/ps-document-page-props.d.ts +3 -0
- package/dist/components/ps-document-page/ps-document-page.d.ts +1 -1
- package/dist/components/ps-document-page/ps-document-page.js +16 -7
- package/dist/components/ps-document-page-strip/index.d.ts +2 -0
- package/dist/components/ps-document-page-strip/index.js +2 -0
- package/dist/components/ps-document-page-strip/ps-document-page-strip-props.d.ts +6 -0
- package/dist/components/ps-document-page-strip/ps-document-page-strip-props.js +1 -0
- package/dist/components/ps-document-page-strip/ps-document-page-strip.d.ts +2 -0
- package/dist/components/ps-document-page-strip/ps-document-page-strip.js +43 -0
- package/dist/components/ps-document-pdf-cover/index.d.ts +2 -0
- package/dist/components/ps-document-pdf-cover/index.js +2 -0
- package/dist/components/ps-document-pdf-cover/ps-document-pdf-cover-props.d.ts +6 -0
- package/dist/components/ps-document-pdf-cover/ps-document-pdf-cover-props.js +1 -0
- package/dist/components/ps-document-pdf-cover/ps-document-pdf-cover.d.ts +2 -0
- package/dist/components/ps-document-pdf-cover/ps-document-pdf-cover.js +18 -0
- package/dist/components/ps-document-preview/ps-document-preview.js +3 -4
- package/dist/components/ps-document-preview-face/index.d.ts +2 -0
- package/dist/components/ps-document-preview-face/index.js +2 -0
- package/dist/components/ps-document-preview-face/ps-document-preview-face-props.d.ts +6 -0
- package/dist/components/ps-document-preview-face/ps-document-preview-face-props.js +1 -0
- package/dist/components/ps-document-preview-face/ps-document-preview-face.d.ts +2 -0
- package/dist/components/ps-document-preview-face/ps-document-preview-face.js +18 -0
- package/dist/components/ps-document-text-page/index.d.ts +2 -0
- package/dist/components/ps-document-text-page/index.js +2 -0
- package/dist/components/ps-document-text-page/ps-document-text-page-props.d.ts +6 -0
- package/dist/components/ps-document-text-page/ps-document-text-page-props.js +1 -0
- package/dist/components/ps-document-text-page/ps-document-text-page.d.ts +2 -0
- package/dist/components/ps-document-text-page/ps-document-text-page.js +18 -0
- package/dist/components/ps-document-unsupported/index.d.ts +2 -0
- package/dist/components/ps-document-unsupported/index.js +2 -0
- package/dist/components/ps-document-unsupported/ps-document-unsupported-props.d.ts +7 -0
- package/dist/components/ps-document-unsupported/ps-document-unsupported-props.js +1 -0
- package/dist/components/ps-document-unsupported/ps-document-unsupported.d.ts +2 -0
- package/dist/components/ps-document-unsupported/ps-document-unsupported.js +10 -0
- package/dist/components/ps-document-viewer/ps-document-viewer.js +27 -7
- package/dist/components/ps-form-sheet/ps-form-sheet-props.d.ts +2 -0
- package/dist/components/ps-form-sheet/ps-form-sheet.d.ts +1 -1
- package/dist/components/ps-form-sheet/ps-form-sheet.js +17 -7
- package/dist/components/ps-header-action/index.d.ts +2 -0
- package/dist/components/ps-header-action/index.js +2 -0
- package/dist/components/ps-header-action/ps-header-action-props.d.ts +6 -0
- package/dist/components/ps-header-action/ps-header-action-props.js +1 -0
- package/dist/components/ps-header-action/ps-header-action.android.d.ts +2 -0
- package/dist/components/ps-header-action/ps-header-action.android.js +9 -0
- package/dist/components/ps-header-action/ps-header-action.d.ts +2 -0
- package/dist/components/ps-header-action/ps-header-action.js +11 -0
- package/dist/components/ps-header-menu/index.d.ts +2 -0
- package/dist/components/ps-header-menu/index.js +2 -0
- package/dist/components/ps-header-menu/ps-header-menu-props.d.ts +7 -0
- package/dist/components/ps-header-menu/ps-header-menu-props.js +1 -0
- package/dist/components/ps-header-menu/ps-header-menu.android.d.ts +2 -0
- package/dist/components/ps-header-menu/ps-header-menu.android.js +11 -0
- package/dist/components/ps-header-menu/ps-header-menu.d.ts +2 -0
- package/dist/components/ps-header-menu/ps-header-menu.js +20 -0
- package/dist/components/ps-icon-button/ps-icon-button.js +7 -7
- package/dist/components/ps-kpi-card/ps-kpi-card.js +1 -2
- package/dist/components/ps-list/ps-list-action-row.js +6 -6
- package/dist/components/ps-list/ps-list-context-menu.android.d.ts +2 -0
- package/dist/components/ps-list/ps-list-context-menu.android.js +3 -0
- package/dist/components/ps-list/ps-list-context-menu.js +1 -1
- package/dist/components/ps-list/ps-list-link-menu-entry.d.ts +5 -0
- package/dist/components/ps-list/ps-list-link-menu-entry.js +11 -0
- package/dist/components/ps-list/ps-list-link-menu.android.d.ts +2 -0
- package/dist/components/ps-list/ps-list-link-menu.android.js +7 -0
- package/dist/components/ps-list/ps-list-link-menu.d.ts +10 -0
- package/dist/components/ps-list/ps-list-link-menu.js +16 -0
- package/dist/components/ps-list/ps-list-link-row.js +6 -6
- package/dist/components/ps-list/ps-list-props.d.ts +4 -1
- package/dist/components/ps-list/ps-list-row-body.d.ts +2 -2
- package/dist/components/ps-list/ps-list-row-body.js +9 -8
- package/dist/components/ps-list/ps-list-row-menu.d.ts +10 -0
- package/dist/components/ps-list/ps-list-row-menu.js +27 -0
- package/dist/components/ps-list/ps-list-row.d.ts +1 -1
- package/dist/components/ps-list/ps-list-row.js +4 -3
- package/dist/components/ps-list/ps-list-select-row.js +2 -1
- package/dist/components/ps-menu-popup/index.d.ts +4 -0
- package/dist/components/ps-menu-popup/index.js +4 -0
- package/dist/components/ps-menu-popup/ps-menu-popup-divider.d.ts +1 -0
- package/dist/components/ps-menu-popup/ps-menu-popup-divider.js +7 -0
- package/dist/components/ps-menu-popup/ps-menu-popup-header.d.ts +5 -0
- package/dist/components/ps-menu-popup/ps-menu-popup-header.js +8 -0
- package/dist/components/ps-menu-popup/ps-menu-popup-row.d.ts +12 -0
- package/dist/components/ps-menu-popup/ps-menu-popup-row.js +22 -0
- package/dist/components/ps-menu-popup/ps-menu-popup.d.ts +9 -0
- package/dist/components/ps-menu-popup/ps-menu-popup.js +35 -0
- package/dist/components/ps-mobile-theme-provider/ps-mobile-theme-provider-props.d.ts +5 -2
- package/dist/components/ps-mobile-theme-provider/ps-mobile-theme-provider.d.ts +1 -1
- package/dist/components/ps-mobile-theme-provider/ps-mobile-theme-provider.js +27 -11
- package/dist/components/ps-native-menu/ps-native-menu-row.js +5 -5
- package/dist/components/ps-native-menu/ps-native-menu.android.js +16 -24
- package/dist/components/ps-option-picker/index.d.ts +2 -0
- package/dist/components/ps-option-picker/index.js +2 -0
- package/dist/components/ps-option-picker/ps-option-picker-props.d.ts +16 -0
- package/dist/components/ps-option-picker/ps-option-picker-props.js +1 -0
- package/dist/components/ps-option-picker/ps-option-picker.d.ts +2 -0
- package/dist/components/ps-option-picker/ps-option-picker.js +35 -0
- package/dist/components/ps-page-header/ps-page-header.js +3 -1
- package/dist/components/ps-pallasoft-sign-in-button/ps-pallasoft-sign-in-button.js +3 -1
- package/dist/components/ps-privacy-cover/index.d.ts +2 -0
- package/dist/components/ps-privacy-cover/index.js +2 -0
- package/dist/components/ps-privacy-cover/ps-privacy-cover-props.d.ts +4 -0
- package/dist/components/ps-privacy-cover/ps-privacy-cover-props.js +1 -0
- package/dist/components/ps-privacy-cover/ps-privacy-cover.d.ts +2 -0
- package/dist/components/ps-privacy-cover/ps-privacy-cover.js +17 -0
- package/dist/components/ps-screen/ps-screen.js +9 -4
- package/dist/components/ps-search-field/ps-search-field.js +3 -1
- package/dist/components/ps-search-select-field/index.d.ts +2 -0
- package/dist/components/ps-search-select-field/index.js +2 -0
- package/dist/components/ps-search-select-field/ps-search-select-field-props.d.ts +10 -0
- package/dist/components/ps-search-select-field/ps-search-select-field-props.js +1 -0
- package/dist/components/ps-search-select-field/ps-search-select-field.d.ts +2 -0
- package/dist/components/ps-search-select-field/ps-search-select-field.js +15 -0
- package/dist/components/ps-segmented-control/ps-segmented-control.android.js +4 -9
- package/dist/components/ps-selection-mode/index.d.ts +2 -0
- package/dist/components/ps-selection-mode/index.js +2 -0
- package/dist/components/ps-selection-mode/ps-selection-bar.d.ts +9 -0
- package/dist/components/ps-selection-mode/ps-selection-bar.js +49 -0
- package/dist/components/ps-selection-mode/ps-selection-mode-props.d.ts +13 -0
- package/dist/components/ps-selection-mode/ps-selection-mode-props.js +1 -0
- package/dist/components/ps-selection-mode/ps-selection-mode.android.d.ts +2 -0
- package/dist/components/ps-selection-mode/ps-selection-mode.android.js +23 -0
- package/dist/components/ps-selection-mode/ps-selection-mode.d.ts +2 -0
- package/dist/components/ps-selection-mode/ps-selection-mode.js +28 -0
- package/dist/components/ps-sheet/ps-sheet-props.d.ts +4 -1
- package/dist/components/ps-sheet/ps-sheet.d.ts +1 -1
- package/dist/components/ps-sheet/ps-sheet.js +4 -5
- package/dist/components/ps-sheet-content/ps-sheet-content.js +1 -1
- package/dist/components/ps-sheet-header/ps-sheet-header-props.d.ts +2 -0
- package/dist/components/ps-sheet-header/ps-sheet-header.d.ts +1 -1
- package/dist/components/ps-sheet-header/ps-sheet-header.js +2 -2
- package/dist/components/ps-sheet-page/ps-sheet-page-view.d.ts +8 -0
- package/dist/components/ps-sheet-page/ps-sheet-page-view.js +11 -0
- package/dist/components/ps-sheet-presenter/ps-sheet-presenter.android.js +4 -4
- package/dist/components/ps-sheet-presenter/ps-sheet-presenter.ios.js +9 -2
- package/dist/components/ps-sortable-grid/ps-sortable-item.js +2 -0
- package/dist/components/ps-spinner/ps-spinner.android.d.ts +2 -0
- package/dist/components/ps-spinner/ps-spinner.android.js +13 -0
- package/dist/components/ps-switch/ps-switch.android.d.ts +2 -0
- package/dist/components/ps-switch/ps-switch.android.js +25 -0
- package/dist/components/ps-switcher/index.d.ts +2 -0
- package/dist/components/ps-switcher/index.js +2 -0
- package/dist/components/ps-switcher/ps-switcher-panel.d.ts +10 -0
- package/dist/components/ps-switcher/ps-switcher-panel.js +17 -0
- package/dist/components/ps-switcher/ps-switcher-props.d.ts +12 -0
- package/dist/components/ps-switcher/ps-switcher-props.js +1 -0
- package/dist/components/ps-switcher/ps-switcher-row.d.ts +7 -0
- package/dist/components/ps-switcher/ps-switcher-row.js +33 -0
- package/dist/components/ps-switcher/ps-switcher-trigger.d.ts +11 -0
- package/dist/components/ps-switcher/ps-switcher-trigger.js +35 -0
- package/dist/components/ps-switcher/ps-switcher.d.ts +2 -0
- package/dist/components/ps-switcher/ps-switcher.js +21 -0
- package/dist/components/ps-tab-bar-provider/index.d.ts +2 -0
- package/dist/components/ps-tab-bar-provider/index.js +2 -0
- package/dist/components/ps-tab-bar-provider/ps-tab-bar-provider-props.d.ts +4 -0
- package/dist/components/ps-tab-bar-provider/ps-tab-bar-provider-props.js +1 -0
- package/dist/components/ps-tab-bar-provider/ps-tab-bar-provider.d.ts +2 -0
- package/dist/components/ps-tab-bar-provider/ps-tab-bar-provider.js +8 -0
- package/dist/components/ps-tabs/ps-tabs.js +4 -2
- package/dist/components/ps-text-link/ps-text-link.js +1 -1
- package/dist/components/ps-waterfall-chart/index.d.ts +2 -0
- package/dist/components/ps-waterfall-chart/index.js +2 -0
- package/dist/components/ps-waterfall-chart/ps-waterfall-chart-props.d.ts +9 -0
- package/dist/components/ps-waterfall-chart/ps-waterfall-chart-props.js +1 -0
- package/dist/components/ps-waterfall-chart/ps-waterfall-chart.d.ts +2 -0
- package/dist/components/ps-waterfall-chart/ps-waterfall-chart.js +37 -0
- package/dist/components/ps-widget-list/ps-widget-list.js +1 -1
- package/dist/constants/ps-android-state-config.d.ts +12 -0
- package/dist/constants/ps-android-state-config.js +12 -0
- package/dist/constants/ps-app-lock-config.d.ts +13 -0
- package/dist/constants/ps-app-lock-config.js +13 -0
- package/dist/constants/ps-app-lock-native-codes.d.ts +10 -0
- package/dist/constants/ps-app-lock-native-codes.js +10 -0
- package/dist/constants/ps-barcode-permission.d.ts +6 -0
- package/dist/constants/ps-barcode-permission.js +5 -0
- package/dist/constants/ps-barcode-scanner-config.d.ts +18 -0
- package/dist/constants/ps-barcode-scanner-config.js +31 -0
- package/dist/constants/ps-biometry-kind.d.ts +7 -0
- package/dist/constants/ps-biometry-kind.js +6 -0
- package/dist/constants/ps-capture-config.d.ts +12 -0
- package/dist/constants/ps-capture-config.js +22 -0
- package/dist/constants/ps-capture-source.d.ts +7 -0
- package/dist/constants/ps-capture-source.js +6 -0
- package/dist/constants/ps-cartesian-series-shape.d.ts +5 -0
- package/dist/constants/ps-cartesian-series-shape.js +4 -0
- package/dist/constants/ps-chart-brand-config.d.ts +21 -0
- package/dist/constants/ps-chart-brand-config.js +10 -0
- package/dist/constants/ps-document-config.d.ts +3 -0
- package/dist/constants/ps-document-config.js +3 -0
- package/dist/constants/ps-document-file-config.d.ts +11 -0
- package/dist/constants/ps-document-file-config.js +11 -0
- package/dist/constants/ps-document-kind.d.ts +1 -0
- package/dist/constants/ps-document-kind.js +1 -0
- package/dist/constants/ps-document-load-status.d.ts +7 -0
- package/dist/constants/ps-document-load-status.js +6 -0
- package/dist/constants/ps-document-pdf-config.d.ts +14 -0
- package/dist/constants/ps-document-pdf-config.js +14 -0
- package/dist/constants/ps-header-config.d.ts +3 -0
- package/dist/constants/ps-header-config.js +3 -0
- package/dist/constants/ps-list-config.d.ts +2 -0
- package/dist/constants/ps-list-config.js +2 -0
- package/dist/constants/ps-menu-popup-config.d.ts +10 -0
- package/dist/constants/ps-menu-popup-config.js +10 -0
- package/dist/constants/ps-menu-tile-config.d.ts +9 -0
- package/dist/constants/ps-menu-tile-config.js +9 -0
- package/dist/constants/ps-mobile-control-config.d.ts +0 -12
- package/dist/constants/ps-mobile-control-config.js +0 -6
- package/dist/constants/ps-option-picker-config.d.ts +6 -0
- package/dist/constants/ps-option-picker-config.js +6 -0
- package/dist/constants/ps-quick-action-config.d.ts +4 -0
- package/dist/constants/ps-quick-action-config.js +4 -0
- package/dist/constants/ps-ripple-kind.d.ts +8 -0
- package/dist/constants/ps-ripple-kind.js +7 -0
- package/dist/constants/ps-selection-bar-config.d.ts +4 -0
- package/dist/constants/ps-selection-bar-config.js +4 -0
- package/dist/constants/ps-sf-symbol-config.d.ts +92 -0
- package/dist/constants/ps-sf-symbol-config.js +92 -0
- package/dist/constants/ps-sheet-page-config.d.ts +4 -0
- package/dist/constants/ps-sheet-page-config.js +4 -0
- package/dist/constants/ps-sortable-grid-config.d.ts +2 -1
- package/dist/constants/ps-sortable-grid-config.js +2 -1
- package/dist/constants/ps-switcher-config.d.ts +12 -0
- package/dist/constants/ps-switcher-config.js +12 -0
- package/dist/contexts/ps-tab-bar-context.d.ts +2 -0
- package/dist/contexts/ps-tab-bar-context.js +6 -0
- package/dist/hooks/use-ps-app-lock.d.ts +3 -0
- package/dist/hooks/use-ps-app-lock.js +72 -0
- package/dist/hooks/use-ps-barcode-scanner.d.ts +2 -0
- package/dist/hooks/use-ps-barcode-scanner.js +9 -0
- package/dist/hooks/use-ps-document-open.d.ts +3 -0
- package/dist/hooks/use-ps-document-open.js +14 -0
- package/dist/hooks/use-ps-document-pdf-cover.d.ts +3 -0
- package/dist/hooks/use-ps-document-pdf-cover.js +33 -0
- package/dist/hooks/use-ps-document-pdf-pages.d.ts +3 -0
- package/dist/hooks/use-ps-document-pdf-pages.js +31 -0
- package/dist/hooks/use-ps-document-text.d.ts +3 -0
- package/dist/hooks/use-ps-document-text.js +29 -0
- package/dist/hooks/use-ps-file-upload.d.ts +3 -0
- package/dist/hooks/use-ps-file-upload.js +32 -0
- package/dist/hooks/use-ps-header-right.d.ts +2 -0
- package/dist/hooks/use-ps-header-right.js +9 -0
- package/dist/hooks/use-ps-material-scheme.d.ts +2 -0
- package/dist/hooks/use-ps-material-scheme.js +3 -0
- package/dist/hooks/use-ps-menu-anchor.d.ts +10 -0
- package/dist/hooks/use-ps-menu-anchor.js +13 -0
- package/dist/hooks/use-ps-menu-tiles.d.ts +4 -0
- package/dist/hooks/use-ps-menu-tiles.js +8 -0
- package/dist/hooks/use-ps-quick-actions.d.ts +2 -0
- package/dist/hooks/use-ps-quick-actions.js +30 -0
- package/dist/hooks/use-ps-stack-screen-options.d.ts +2 -0
- package/dist/hooks/use-ps-stack-screen-options.js +7 -0
- package/dist/hooks/use-ps-tab-bar.d.ts +2 -0
- package/dist/hooks/use-ps-tab-bar.js +3 -0
- package/dist/hooks/use-ps-top-inset.d.ts +1 -0
- package/dist/hooks/use-ps-top-inset.js +10 -0
- package/dist/index.d.ts +62 -0
- package/dist/index.js +61 -0
- package/dist/interfaces/ps-action-menu-header.d.ts +1 -0
- package/dist/interfaces/ps-app-lock-native.d.ts +13 -0
- package/dist/interfaces/ps-app-lock-native.js +1 -0
- package/dist/interfaces/ps-app-lock-prompt.d.ts +4 -0
- package/dist/interfaces/ps-app-lock-prompt.js +1 -0
- package/dist/interfaces/ps-barcode-frame-size.d.ts +4 -0
- package/dist/interfaces/ps-barcode-frame-size.js +1 -0
- package/dist/interfaces/ps-barcode-last-read.d.ts +4 -0
- package/dist/interfaces/ps-barcode-last-read.js +1 -0
- package/dist/interfaces/ps-barcode-scan.d.ts +4 -0
- package/dist/interfaces/ps-barcode-scan.js +1 -0
- package/dist/interfaces/ps-barcode-scanner-labels.d.ts +8 -0
- package/dist/interfaces/ps-barcode-scanner-labels.js +1 -0
- package/dist/interfaces/ps-barcode-scanner-native.d.ts +23 -0
- package/dist/interfaces/ps-barcode-scanner-native.js +1 -0
- package/dist/interfaces/ps-capture-labels.d.ts +6 -0
- package/dist/interfaces/ps-capture-labels.js +1 -0
- package/dist/interfaces/ps-capture-menu-options.d.ts +6 -0
- package/dist/interfaces/ps-capture-menu-options.js +1 -0
- package/dist/interfaces/ps-capture-modules.d.ts +6 -0
- package/dist/interfaces/ps-capture-modules.js +1 -0
- package/dist/interfaces/ps-capture-options.d.ts +6 -0
- package/dist/interfaces/ps-capture-options.js +1 -0
- package/dist/interfaces/ps-cartesian-chart-series.d.ts +2 -0
- package/dist/interfaces/ps-date-dialog-colors.d.ts +19 -0
- package/dist/interfaces/ps-date-dialog-colors.js +1 -0
- package/dist/interfaces/ps-device-file.d.ts +5 -0
- package/dist/interfaces/ps-device-file.js +1 -0
- package/dist/interfaces/ps-document-file-system.d.ts +2 -0
- package/dist/interfaces/ps-document-file-system.js +1 -0
- package/dist/interfaces/ps-document-labels.d.ts +1 -0
- package/dist/interfaces/ps-document-page-image.d.ts +5 -0
- package/dist/interfaces/ps-document-page-image.js +1 -0
- package/dist/interfaces/ps-document-pdf-native.d.ts +9 -0
- package/dist/interfaces/ps-document-pdf-native.js +1 -0
- package/dist/interfaces/ps-document-pdf-options.d.ts +4 -0
- package/dist/interfaces/ps-document-pdf-options.js +1 -0
- package/dist/interfaces/ps-document-pdf-state.d.ts +6 -0
- package/dist/interfaces/ps-document-pdf-state.js +1 -0
- package/dist/interfaces/ps-document-viewer-entry.d.ts +8 -0
- package/dist/interfaces/ps-document-viewer-entry.js +1 -0
- package/dist/interfaces/ps-file-upload-options.d.ts +8 -0
- package/dist/interfaces/ps-file-upload-options.js +1 -0
- package/dist/interfaces/ps-material-scheme.d.ts +38 -0
- package/dist/interfaces/ps-material-scheme.js +1 -0
- package/dist/interfaces/ps-material-segmented-colors.d.ts +14 -0
- package/dist/interfaces/ps-material-segmented-colors.js +1 -0
- package/dist/interfaces/ps-material-switch-colors.d.ts +14 -0
- package/dist/interfaces/ps-material-switch-colors.js +1 -0
- package/dist/interfaces/ps-menu-anchor.d.ts +6 -0
- package/dist/interfaces/ps-menu-anchor.js +1 -0
- package/dist/interfaces/ps-menu-item.d.ts +3 -0
- package/dist/interfaces/ps-menu-popup-layout.d.ts +6 -0
- package/dist/interfaces/ps-menu-popup-layout.js +1 -0
- package/dist/interfaces/ps-menu-popup-window.d.ts +4 -0
- package/dist/interfaces/ps-menu-popup-window.js +1 -0
- package/dist/interfaces/ps-menu-tile-request.d.ts +7 -0
- package/dist/interfaces/ps-menu-tile-request.js +1 -0
- package/dist/interfaces/ps-menu-tile-shape.d.ts +1 -0
- package/dist/interfaces/ps-menu-tile-shape.js +1 -0
- package/dist/interfaces/ps-mobile-brand-colors.d.ts +5 -0
- package/dist/interfaces/ps-mobile-brand-colors.js +1 -0
- package/dist/interfaces/ps-mobile-brand-input.d.ts +7 -0
- package/dist/interfaces/ps-mobile-brand-input.js +1 -0
- package/dist/interfaces/ps-mobile-theme-input.d.ts +3 -1
- package/dist/interfaces/ps-mobile-theme.d.ts +32 -0
- package/dist/interfaces/ps-quick-action-native.d.ts +14 -0
- package/dist/interfaces/ps-quick-action-native.js +1 -0
- package/dist/interfaces/ps-quick-action.d.ts +7 -0
- package/dist/interfaces/ps-quick-action.js +1 -0
- package/dist/interfaces/ps-scanned-file.d.ts +2 -5
- package/dist/interfaces/ps-sheet-leading-kind.d.ts +1 -0
- package/dist/interfaces/ps-sheet-leading-kind.js +1 -0
- package/dist/interfaces/ps-sheet-page.d.ts +8 -0
- package/dist/interfaces/ps-sheet-page.js +1 -0
- package/dist/interfaces/ps-stack-screen-options.d.ts +2 -0
- package/dist/interfaces/ps-stack-screen-options.js +1 -0
- package/dist/interfaces/ps-switcher-item.d.ts +11 -0
- package/dist/interfaces/ps-switcher-item.js +1 -0
- package/dist/interfaces/ps-tab-bar-context-data.d.ts +5 -0
- package/dist/interfaces/ps-tab-bar-context-data.js +1 -0
- package/dist/interfaces/ps-tab-bar-icon-colors.d.ts +4 -0
- package/dist/interfaces/ps-tab-bar-icon-colors.js +1 -0
- package/dist/interfaces/ps-tab-bar-label-style.d.ts +5 -0
- package/dist/interfaces/ps-tab-bar-label-style.js +1 -0
- package/dist/interfaces/ps-tab-bar-label-styles.d.ts +5 -0
- package/dist/interfaces/ps-tab-bar-label-styles.js +1 -0
- package/dist/interfaces/ps-tab-bar-style.d.ts +12 -0
- package/dist/interfaces/ps-tab-bar-style.js +1 -0
- package/dist/interfaces/ps-waterfall-datum.d.ts +6 -0
- package/dist/interfaces/ps-waterfall-datum.js +1 -0
- package/dist/interfaces/ps-waterfall-step.d.ts +7 -0
- package/dist/interfaces/ps-waterfall-step.js +1 -0
- package/dist/interfaces/use-ps-app-lock-options.d.ts +6 -0
- package/dist/interfaces/use-ps-app-lock-options.js +1 -0
- package/dist/interfaces/use-ps-app-lock-result.d.ts +7 -0
- package/dist/interfaces/use-ps-app-lock-result.js +1 -0
- package/dist/interfaces/use-ps-barcode-scanner-result.d.ts +6 -0
- package/dist/interfaces/use-ps-barcode-scanner-result.js +1 -0
- package/dist/interfaces/use-ps-document-open-result.d.ts +5 -0
- package/dist/interfaces/use-ps-document-open-result.js +1 -0
- package/dist/interfaces/use-ps-document-pdf-cover-result.d.ts +7 -0
- package/dist/interfaces/use-ps-document-pdf-cover-result.js +1 -0
- package/dist/interfaces/use-ps-document-pdf-pages-result.d.ts +5 -0
- package/dist/interfaces/use-ps-document-pdf-pages-result.js +1 -0
- package/dist/interfaces/use-ps-document-text-result.d.ts +5 -0
- package/dist/interfaces/use-ps-document-text-result.js +1 -0
- package/dist/interfaces/use-ps-file-upload-result.d.ts +8 -0
- package/dist/interfaces/use-ps-file-upload-result.js +1 -0
- package/dist/interfaces/use-ps-quick-actions-options.d.ts +5 -0
- package/dist/interfaces/use-ps-quick-actions-options.js +1 -0
- package/dist/services/ps-action-menu-service.d.ts +4 -0
- package/dist/services/ps-action-menu-service.js +25 -2
- package/dist/services/ps-app-lock-grace-service.d.ts +6 -0
- package/dist/services/ps-app-lock-grace-service.js +17 -0
- package/dist/services/ps-app-lock-service.d.ts +10 -0
- package/dist/services/ps-app-lock-service.js +84 -0
- package/dist/services/ps-badge-tone-service.js +3 -3
- package/dist/services/ps-barcode-scanner-service.d.ts +14 -0
- package/dist/services/ps-barcode-scanner-service.js +53 -0
- package/dist/services/ps-button-style-service.d.ts +2 -0
- package/dist/services/ps-button-style-service.js +15 -3
- package/dist/services/ps-capture-picker-service.d.ts +11 -0
- package/dist/services/ps-capture-picker-service.js +67 -0
- package/dist/services/ps-capture-source-service.d.ts +10 -0
- package/dist/services/ps-capture-source-service.js +31 -0
- package/dist/services/ps-chart-brand-service.d.ts +4 -0
- package/dist/services/ps-chart-brand-service.js +20 -0
- package/dist/services/ps-chart-shape-service.d.ts +7 -0
- package/dist/services/ps-chart-shape-service.js +17 -0
- package/dist/services/ps-context-menu-service.d.ts +1 -0
- package/dist/services/ps-context-menu-service.js +13 -0
- package/dist/services/ps-control-style-service.js +3 -2
- package/dist/services/ps-date-picker-service.d.ts +3 -0
- package/dist/services/ps-date-picker-service.js +21 -0
- package/dist/services/ps-device-file-service.d.ts +14 -0
- package/dist/services/ps-device-file-service.js +27 -0
- package/dist/services/ps-document-file-service.d.ts +10 -0
- package/dist/services/ps-document-file-service.js +75 -0
- package/dist/services/ps-document-open-service.d.ts +5 -0
- package/dist/services/ps-document-open-service.js +16 -0
- package/dist/services/ps-document-pdf-service.d.ts +10 -0
- package/dist/services/ps-document-pdf-service.js +40 -0
- package/dist/services/ps-document-text-service.d.ts +5 -0
- package/dist/services/ps-document-text-service.js +14 -0
- package/dist/services/ps-document-viewer-entry-service.d.ts +11 -0
- package/dist/services/ps-document-viewer-entry-service.js +72 -0
- package/dist/services/ps-list-row-style-service.d.ts +4 -0
- package/dist/services/ps-list-row-style-service.js +8 -0
- package/dist/services/ps-material-control-service.d.ts +9 -0
- package/dist/services/ps-material-control-service.js +46 -0
- package/dist/services/ps-material-scheme-service.d.ts +5 -0
- package/dist/services/ps-material-scheme-service.js +42 -0
- package/dist/services/ps-menu-popup-service.d.ts +6 -0
- package/dist/services/ps-menu-popup-service.js +23 -0
- package/dist/services/ps-menu-tile-service.d.ts +16 -0
- package/dist/services/ps-menu-tile-service.js +70 -0
- package/dist/services/ps-menu-tile-style-service.d.ts +4 -0
- package/dist/services/ps-menu-tile-style-service.js +5 -0
- package/dist/services/ps-mobile-brand-service.d.ts +5 -0
- package/dist/services/ps-mobile-brand-service.js +24 -0
- package/dist/services/ps-mobile-theme-service.d.ts +1 -3
- package/dist/services/ps-mobile-theme-service.js +70 -95
- package/dist/services/ps-navigation-theme-service.d.ts +5 -0
- package/dist/services/ps-navigation-theme-service.js +21 -0
- package/dist/services/ps-option-picker-service.d.ts +8 -0
- package/dist/services/ps-option-picker-service.js +10 -0
- package/dist/services/ps-pdf-native-service.d.ts +8 -0
- package/dist/services/ps-pdf-native-service.js +33 -0
- package/dist/services/ps-quick-action-service.d.ts +9 -0
- package/dist/services/ps-quick-action-service.js +31 -0
- package/dist/services/ps-ripple-service.d.ts +7 -0
- package/dist/services/ps-ripple-service.js +26 -0
- package/dist/services/ps-screen-service.d.ts +3 -1
- package/dist/services/ps-screen-service.js +8 -2
- package/dist/services/ps-selection-service.d.ts +5 -0
- package/dist/services/ps-selection-service.js +13 -0
- package/dist/services/ps-sheet-service.d.ts +6 -0
- package/dist/services/ps-sheet-service.js +14 -0
- package/dist/services/ps-stack-options-service.d.ts +5 -0
- package/dist/services/ps-stack-options-service.js +18 -0
- package/dist/services/ps-state-service.d.ts +7 -0
- package/dist/services/ps-state-service.js +26 -0
- package/dist/services/ps-switcher-service.d.ts +6 -0
- package/dist/services/ps-switcher-service.js +15 -0
- package/dist/services/ps-tab-bar-style-service.d.ts +5 -0
- package/dist/services/ps-tab-bar-style-service.js +30 -0
- package/dist/services/ps-text-service.js +4 -4
- package/dist/services/ps-waterfall-service.d.ts +10 -0
- package/dist/services/ps-waterfall-service.js +38 -0
- package/jest-setup.js +154 -0
- package/package.json +47 -2
|
@@ -6,8 +6,12 @@ export interface PsMobileTheme {
|
|
|
6
6
|
chart: string[];
|
|
7
7
|
danger: string;
|
|
8
8
|
dangerSoft: string;
|
|
9
|
+
dangerText: string;
|
|
9
10
|
fonts: PsMobileFonts;
|
|
10
11
|
hasHaptics: boolean;
|
|
12
|
+
info: string;
|
|
13
|
+
infoSoft: string;
|
|
14
|
+
infoText: string;
|
|
11
15
|
isDark: boolean;
|
|
12
16
|
isReduceMotion: boolean;
|
|
13
17
|
ink: string;
|
|
@@ -15,17 +19,45 @@ export interface PsMobileTheme {
|
|
|
15
19
|
muted: string;
|
|
16
20
|
overlay: string;
|
|
17
21
|
primary: string;
|
|
22
|
+
primary100: string;
|
|
23
|
+
primary200: string;
|
|
24
|
+
primary300: string;
|
|
25
|
+
primary400: string;
|
|
26
|
+
primary50: string;
|
|
27
|
+
primary500: string;
|
|
28
|
+
primary600: string;
|
|
29
|
+
primary700: string;
|
|
30
|
+
primary800: string;
|
|
31
|
+
primary900: string;
|
|
18
32
|
primaryContrast: string;
|
|
33
|
+
primaryPressed: string;
|
|
19
34
|
primarySoft: string;
|
|
35
|
+
primarySoftStrong: string;
|
|
36
|
+
primaryText: string;
|
|
20
37
|
secondary: string;
|
|
38
|
+
secondary100: string;
|
|
39
|
+
secondary200: string;
|
|
40
|
+
secondary300: string;
|
|
41
|
+
secondary400: string;
|
|
42
|
+
secondary50: string;
|
|
43
|
+
secondary500: string;
|
|
44
|
+
secondary600: string;
|
|
45
|
+
secondary700: string;
|
|
46
|
+
secondary800: string;
|
|
47
|
+
secondary900: string;
|
|
21
48
|
secondaryContrast: string;
|
|
49
|
+
secondaryPressed: string;
|
|
22
50
|
secondarySoft: string;
|
|
51
|
+
secondarySoftStrong: string;
|
|
52
|
+
secondaryText: string;
|
|
23
53
|
skeletonBase: string;
|
|
24
54
|
skeletonSweep: string;
|
|
25
55
|
success: string;
|
|
26
56
|
successSoft: string;
|
|
57
|
+
successText: string;
|
|
27
58
|
surface: string;
|
|
28
59
|
warning: string;
|
|
29
60
|
warningSoft: string;
|
|
61
|
+
warningText: string;
|
|
30
62
|
white: string;
|
|
31
63
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface PsQuickActionNativeItem {
|
|
2
|
+
icon: string;
|
|
3
|
+
id: string;
|
|
4
|
+
subtitle?: string;
|
|
5
|
+
title: string;
|
|
6
|
+
}
|
|
7
|
+
export interface PsQuickActionNativeSubscription {
|
|
8
|
+
remove: () => void;
|
|
9
|
+
}
|
|
10
|
+
export interface PsQuickActionNative {
|
|
11
|
+
addListener: (listener: (action: PsQuickActionNativeItem) => void) => PsQuickActionNativeSubscription;
|
|
12
|
+
initial?: PsQuickActionNativeItem;
|
|
13
|
+
setItems: (items: PsQuickActionNativeItem[]) => Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type PsSheetLeadingKind = 'back' | 'close';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PsTabBarIconColors } from './ps-tab-bar-icon-colors';
|
|
2
|
+
import type { PsTabBarLabelStyles } from './ps-tab-bar-label-styles';
|
|
3
|
+
export interface PsTabBarStyle {
|
|
4
|
+
backgroundColor?: string;
|
|
5
|
+
badgeBackgroundColor?: string;
|
|
6
|
+
badgeTextColor?: string;
|
|
7
|
+
iconColor?: PsTabBarIconColors;
|
|
8
|
+
indicatorColor?: string;
|
|
9
|
+
labelStyle?: PsTabBarLabelStyles;
|
|
10
|
+
rippleColor?: string;
|
|
11
|
+
tintColor: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PsDocumentLoadStatus } from '../constants/ps-document-load-status';
|
|
2
|
+
import type { PsDocumentPageImage } from './ps-document-page-image';
|
|
3
|
+
export interface UsePsDocumentPdfCoverResult {
|
|
4
|
+
cover: PsDocumentPageImage | null;
|
|
5
|
+
retry: () => void;
|
|
6
|
+
status: PsDocumentLoadStatus;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PsCaptureSource } from '../constants/ps-capture-source';
|
|
2
|
+
import type { PsCaptureLabels } from './ps-capture-labels';
|
|
3
|
+
import type { PsMenuItem } from './ps-menu-item';
|
|
4
|
+
export interface UsePsFileUploadResult {
|
|
5
|
+
isUploading: boolean;
|
|
6
|
+
items: (labels: PsCaptureLabels, onPicked?: (source: PsCaptureSource) => void) => PsMenuItem[];
|
|
7
|
+
pick: (source: PsCaptureSource) => Promise<void>;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SFSymbol } from 'sf-symbols-typescript';
|
|
2
|
+
import type { PsActionMenuHeader } from '../interfaces/ps-action-menu-header';
|
|
2
3
|
import type { PsActionMenuSection } from '../interfaces/ps-action-menu-section';
|
|
3
4
|
import type { PsMenuItem } from '../interfaces/ps-menu-item';
|
|
4
5
|
export declare class PsActionMenuService {
|
|
@@ -6,5 +7,8 @@ export declare class PsActionMenuService {
|
|
|
6
7
|
static consistent(sections: PsActionMenuSection[]): PsActionMenuSection[];
|
|
7
8
|
static flatten(sections: PsActionMenuSection[]): PsMenuItem[];
|
|
8
9
|
static expand(item: PsMenuItem): PsMenuItem[];
|
|
10
|
+
static hasAvatar(item: PsMenuItem): boolean;
|
|
11
|
+
static monogram(item: PsMenuItem): SFSymbol | undefined;
|
|
12
|
+
static headerSymbol(header: PsActionMenuHeader): SFSymbol;
|
|
9
13
|
static symbol(item: PsMenuItem): SFSymbol | undefined;
|
|
10
14
|
}
|
|
@@ -7,7 +7,7 @@ export class PsActionMenuService {
|
|
|
7
7
|
}
|
|
8
8
|
static consistent(sections) {
|
|
9
9
|
const items = sections.flatMap((section) => section.items);
|
|
10
|
-
const hasAll = items.every((item) => item.iconKey !== undefined || item.isChecked === true);
|
|
10
|
+
const hasAll = items.every((item) => item.iconKey !== undefined || item.isChecked === true || PsActionMenuService.hasAvatar(item));
|
|
11
11
|
if (hasAll)
|
|
12
12
|
return sections;
|
|
13
13
|
return sections.map((section) => ({
|
|
@@ -26,9 +26,32 @@ export class PsActionMenuService {
|
|
|
26
26
|
...item.children.flatMap((child) => this.expand(child)),
|
|
27
27
|
];
|
|
28
28
|
}
|
|
29
|
+
static hasAvatar(item) {
|
|
30
|
+
return item.imageUri !== undefined || item.monogram !== undefined;
|
|
31
|
+
}
|
|
32
|
+
static monogram(item) {
|
|
33
|
+
if (item.monogram === undefined)
|
|
34
|
+
return undefined;
|
|
35
|
+
const monograms = PsSfSymbolConfig.monograms;
|
|
36
|
+
return monograms[item.monogram.trim().normalize('NFD').charAt(0).toLowerCase()];
|
|
37
|
+
}
|
|
38
|
+
static headerSymbol(header) {
|
|
39
|
+
const monogram = header.initials === undefined
|
|
40
|
+
? undefined
|
|
41
|
+
: PsActionMenuService.monogram({
|
|
42
|
+
id: 'header',
|
|
43
|
+
label: header.title,
|
|
44
|
+
monogram: header.initials,
|
|
45
|
+
onSelect: () => undefined,
|
|
46
|
+
});
|
|
47
|
+
return monogram === undefined ? PsSfSymbolConfig.headerSymbol : monogram;
|
|
48
|
+
}
|
|
29
49
|
static symbol(item) {
|
|
30
|
-
if (item.isChecked)
|
|
50
|
+
if (item.isChecked && !PsActionMenuService.hasAvatar(item))
|
|
31
51
|
return PsSfSymbolConfig.checkedSymbol;
|
|
52
|
+
const monogram = PsActionMenuService.monogram(item);
|
|
53
|
+
if (monogram !== undefined)
|
|
54
|
+
return monogram;
|
|
32
55
|
if (item.iconKey === undefined)
|
|
33
56
|
return undefined;
|
|
34
57
|
const symbols = PsSfSymbolConfig.symbols;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare class PsAppLockGraceService {
|
|
2
|
+
static isExpired(backgroundedAt: number | null, now: number, graceSeconds: number): boolean;
|
|
3
|
+
static isActive(state: string): boolean;
|
|
4
|
+
static isHidden(state: string): boolean;
|
|
5
|
+
static isBackground(state: string): boolean;
|
|
6
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PsAppLockConfig } from '../constants/ps-app-lock-config';
|
|
2
|
+
export class PsAppLockGraceService {
|
|
3
|
+
static isExpired(backgroundedAt, now, graceSeconds) {
|
|
4
|
+
if (backgroundedAt === null)
|
|
5
|
+
return false;
|
|
6
|
+
return now - backgroundedAt >= graceSeconds;
|
|
7
|
+
}
|
|
8
|
+
static isActive(state) {
|
|
9
|
+
return state === PsAppLockConfig.activeState;
|
|
10
|
+
}
|
|
11
|
+
static isHidden(state) {
|
|
12
|
+
return state === PsAppLockConfig.inactiveState || state === PsAppLockConfig.backgroundState;
|
|
13
|
+
}
|
|
14
|
+
static isBackground(state) {
|
|
15
|
+
return state === PsAppLockConfig.backgroundState;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PsBiometryKind } from '../constants/ps-biometry-kind';
|
|
2
|
+
export declare class PsAppLockService {
|
|
3
|
+
private static busyCount;
|
|
4
|
+
static isAvailable(): Promise<boolean>;
|
|
5
|
+
static biometryKind(): Promise<PsBiometryKind>;
|
|
6
|
+
static kindOf(types: number[], level: number, platform: string): PsBiometryKind;
|
|
7
|
+
static authenticate(prompt: string, cancelLabel: string): Promise<boolean>;
|
|
8
|
+
static isBusy(): boolean;
|
|
9
|
+
private static load;
|
|
10
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { requireOptionalNativeModule } from 'expo';
|
|
2
|
+
import { Platform } from 'react-native';
|
|
3
|
+
import { PsAppLockConfig } from '../constants/ps-app-lock-config';
|
|
4
|
+
import { PsAuthenticationTypeCode, PsSecurityLevelCode, } from '../constants/ps-app-lock-native-codes';
|
|
5
|
+
import { PsBiometryKind } from '../constants/ps-biometry-kind';
|
|
6
|
+
export class PsAppLockService {
|
|
7
|
+
static async isAvailable() {
|
|
8
|
+
const native = PsAppLockService.load();
|
|
9
|
+
if (native === null)
|
|
10
|
+
return false;
|
|
11
|
+
try {
|
|
12
|
+
return (await native.getEnrolledLevelAsync()) > PsSecurityLevelCode.none;
|
|
13
|
+
}
|
|
14
|
+
catch {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
static async biometryKind() {
|
|
19
|
+
const native = PsAppLockService.load();
|
|
20
|
+
if (native === null)
|
|
21
|
+
return PsBiometryKind.passcode;
|
|
22
|
+
try {
|
|
23
|
+
const [types, level] = await Promise.all([
|
|
24
|
+
native.supportedAuthenticationTypesAsync(),
|
|
25
|
+
native.getEnrolledLevelAsync(),
|
|
26
|
+
]);
|
|
27
|
+
return PsAppLockService.kindOf(types, level, Platform.OS);
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
return PsBiometryKind.passcode;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
static kindOf(types, level, platform) {
|
|
34
|
+
if (level < PsSecurityLevelCode.biometricWeak)
|
|
35
|
+
return PsBiometryKind.passcode;
|
|
36
|
+
const has = (code) => types.includes(code);
|
|
37
|
+
const face = has(PsAuthenticationTypeCode.face);
|
|
38
|
+
const fingerprint = has(PsAuthenticationTypeCode.fingerprint);
|
|
39
|
+
if (platform === PsAppLockConfig.iosPlatform && face)
|
|
40
|
+
return PsBiometryKind.face;
|
|
41
|
+
if (fingerprint)
|
|
42
|
+
return PsBiometryKind.fingerprint;
|
|
43
|
+
if (face)
|
|
44
|
+
return PsBiometryKind.face;
|
|
45
|
+
if (has(PsAuthenticationTypeCode.iris))
|
|
46
|
+
return PsBiometryKind.iris;
|
|
47
|
+
return PsBiometryKind.passcode;
|
|
48
|
+
}
|
|
49
|
+
static async authenticate(prompt, cancelLabel) {
|
|
50
|
+
const native = PsAppLockService.load();
|
|
51
|
+
if (native === null)
|
|
52
|
+
return false;
|
|
53
|
+
PsAppLockService.busyCount += 1;
|
|
54
|
+
try {
|
|
55
|
+
const result = await native.authenticateAsync({
|
|
56
|
+
cancelLabel,
|
|
57
|
+
disableDeviceFallback: false,
|
|
58
|
+
promptMessage: prompt,
|
|
59
|
+
});
|
|
60
|
+
return result.success;
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
finally {
|
|
66
|
+
PsAppLockService.busyCount -= 1;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
static isBusy() {
|
|
70
|
+
return PsAppLockService.busyCount > 0;
|
|
71
|
+
}
|
|
72
|
+
static load() {
|
|
73
|
+
try {
|
|
74
|
+
if (requireOptionalNativeModule(PsAppLockConfig.nativeModuleName) === null)
|
|
75
|
+
return null;
|
|
76
|
+
const loaded = require('expo-local-authentication');
|
|
77
|
+
return typeof loaded.authenticateAsync === 'function' ? loaded : null;
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
PsAppLockService.busyCount = 0;
|
|
@@ -4,13 +4,13 @@ export class PsBadgeToneService {
|
|
|
4
4
|
static resolve(tone, theme) {
|
|
5
5
|
switch (tone) {
|
|
6
6
|
case 'danger':
|
|
7
|
-
return { background: theme.dangerSoft, foreground: theme.
|
|
7
|
+
return { background: theme.dangerSoft, foreground: theme.dangerText };
|
|
8
8
|
case 'primary':
|
|
9
9
|
return { background: theme.primarySoft, foreground: theme.ink };
|
|
10
10
|
case 'success':
|
|
11
|
-
return { background: theme.successSoft, foreground: theme.
|
|
11
|
+
return { background: theme.successSoft, foreground: theme.successText };
|
|
12
12
|
case 'warning':
|
|
13
|
-
return { background: theme.warningSoft, foreground: theme.
|
|
13
|
+
return { background: theme.warningSoft, foreground: theme.warningText };
|
|
14
14
|
default:
|
|
15
15
|
return {
|
|
16
16
|
background: PsMobileColorService.withAlpha(theme.ink, PsMobileControlConfig.neutralAlpha),
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { PsBarcodeFrameSize } from '../interfaces/ps-barcode-frame-size';
|
|
3
|
+
import type { PsBarcodeLastRead } from '../interfaces/ps-barcode-last-read';
|
|
4
|
+
import type { PsBarcodeScannerCameraProps } from '../interfaces/ps-barcode-scanner-native';
|
|
5
|
+
export declare class PsBarcodeScannerService {
|
|
6
|
+
static isAvailable(): boolean;
|
|
7
|
+
static camera(): ComponentType<PsBarcodeScannerCameraProps> | null;
|
|
8
|
+
static requestPermission(): Promise<boolean>;
|
|
9
|
+
static normalise(data: string): string;
|
|
10
|
+
static accept(previous: PsBarcodeLastRead | null, data: string, now: number): boolean;
|
|
11
|
+
static types(barcodeTypes?: string[]): string[];
|
|
12
|
+
static frameSize(width: number): PsBarcodeFrameSize;
|
|
13
|
+
private static load;
|
|
14
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { PsBarcodeScannerConfig } from '../constants/ps-barcode-scanner-config';
|
|
2
|
+
export class PsBarcodeScannerService {
|
|
3
|
+
static isAvailable() {
|
|
4
|
+
return PsBarcodeScannerService.load() !== null;
|
|
5
|
+
}
|
|
6
|
+
static camera() {
|
|
7
|
+
const native = PsBarcodeScannerService.load();
|
|
8
|
+
return native === null ? null : native.CameraView;
|
|
9
|
+
}
|
|
10
|
+
static async requestPermission() {
|
|
11
|
+
const native = PsBarcodeScannerService.load();
|
|
12
|
+
if (native === null)
|
|
13
|
+
return false;
|
|
14
|
+
try {
|
|
15
|
+
const response = await native.Camera.requestCameraPermissionsAsync();
|
|
16
|
+
return response.granted;
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
static normalise(data) {
|
|
23
|
+
return data.trim();
|
|
24
|
+
}
|
|
25
|
+
static accept(previous, data, now) {
|
|
26
|
+
if (data === '')
|
|
27
|
+
return false;
|
|
28
|
+
if (previous === null)
|
|
29
|
+
return true;
|
|
30
|
+
return previous.data !== data || now - previous.at >= PsBarcodeScannerConfig.cooldownMs;
|
|
31
|
+
}
|
|
32
|
+
static types(barcodeTypes) {
|
|
33
|
+
return barcodeTypes === undefined || barcodeTypes.length === 0
|
|
34
|
+
? PsBarcodeScannerConfig.barcodeTypes
|
|
35
|
+
: barcodeTypes;
|
|
36
|
+
}
|
|
37
|
+
static frameSize(width) {
|
|
38
|
+
const frameWidth = Math.round(width * PsBarcodeScannerConfig.frameWidthFraction);
|
|
39
|
+
return {
|
|
40
|
+
height: Math.round(frameWidth * PsBarcodeScannerConfig.frameAspectRatio),
|
|
41
|
+
width: frameWidth,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
static load() {
|
|
45
|
+
try {
|
|
46
|
+
const loaded = require('expo-camera');
|
|
47
|
+
return typeof loaded.CameraView === 'function' ? loaded : null;
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { PsRippleKind } from '../constants/ps-ripple-kind';
|
|
1
2
|
import type { PsButtonStyleData } from '../interfaces/ps-button-style-data';
|
|
2
3
|
import type { PsMobileTheme } from '../interfaces/ps-mobile-theme';
|
|
3
4
|
export type PsButtonVariant = 'danger' | 'ghost' | 'primary' | 'secondary' | 'surface';
|
|
4
5
|
export declare class PsButtonStyleService {
|
|
6
|
+
static rippleKind(variant: PsButtonVariant): PsRippleKind;
|
|
5
7
|
static resolve(variant: PsButtonVariant, theme: PsMobileTheme): PsButtonStyleData;
|
|
6
8
|
}
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { PsMobileControlConfig } from '../constants/ps-mobile-control-config';
|
|
2
|
+
import { PsRippleKind } from '../constants/ps-ripple-kind';
|
|
2
3
|
import { PsMobileColorService } from './ps-mobile-color-service';
|
|
4
|
+
import { PsStateService } from './ps-state-service';
|
|
3
5
|
export class PsButtonStyleService {
|
|
6
|
+
static rippleKind(variant) {
|
|
7
|
+
switch (variant) {
|
|
8
|
+
case 'primary':
|
|
9
|
+
return PsRippleKind.OnPrimary;
|
|
10
|
+
case 'danger':
|
|
11
|
+
return PsRippleKind.OnDanger;
|
|
12
|
+
default:
|
|
13
|
+
return PsRippleKind.Surface;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
4
16
|
static resolve(variant, theme) {
|
|
5
17
|
const hover = PsMobileColorService.withAlpha(theme.primary, PsMobileControlConfig.pressedBorderAlpha);
|
|
6
18
|
switch (variant) {
|
|
@@ -9,8 +21,8 @@ export class PsButtonStyleService {
|
|
|
9
21
|
background: theme.primary,
|
|
10
22
|
border: theme.primary,
|
|
11
23
|
foreground: theme.primaryContrast,
|
|
12
|
-
pressedBackground: theme.
|
|
13
|
-
pressedBorder: theme.
|
|
24
|
+
pressedBackground: theme.primaryPressed,
|
|
25
|
+
pressedBorder: theme.primaryPressed,
|
|
14
26
|
};
|
|
15
27
|
case 'danger':
|
|
16
28
|
return {
|
|
@@ -25,7 +37,7 @@ export class PsButtonStyleService {
|
|
|
25
37
|
background: theme.surface,
|
|
26
38
|
border: theme.line,
|
|
27
39
|
foreground: theme.ink,
|
|
28
|
-
pressedBackground:
|
|
40
|
+
pressedBackground: PsStateService.pressedFill(theme, theme.surface),
|
|
29
41
|
pressedBorder: hover,
|
|
30
42
|
};
|
|
31
43
|
}
|