@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
|
@@ -4,6 +4,9 @@ export class PsSheetService {
|
|
|
4
4
|
static maxHeight(windowHeight) {
|
|
5
5
|
return Math.floor(windowHeight * PsSheetConfig.maxHeightFraction);
|
|
6
6
|
}
|
|
7
|
+
static handlesInset(os) {
|
|
8
|
+
return os === 'ios' || os === 'android';
|
|
9
|
+
}
|
|
7
10
|
static bottomPadding(isFloating, bottomInset) {
|
|
8
11
|
return PsLayoutConfig.sheetGutter + (isFloating ? 0 : bottomInset);
|
|
9
12
|
}
|
|
@@ -22,6 +25,17 @@ export class PsSheetService {
|
|
|
22
25
|
}
|
|
23
26
|
return isPressed ? PsSheetConfig.pressedOpacity : 1;
|
|
24
27
|
}
|
|
28
|
+
static trailing(action, closeLabel, onClose) {
|
|
29
|
+
if (action === null)
|
|
30
|
+
return undefined;
|
|
31
|
+
return action === undefined ? PsSheetService.closeAction(closeLabel, onClose) : action;
|
|
32
|
+
}
|
|
33
|
+
static leadingIconStyle(kind) {
|
|
34
|
+
return kind === 'back' ? { transform: [{ scaleX: -1 }] } : {};
|
|
35
|
+
}
|
|
36
|
+
static grownHeight(previous, measured, isOpen) {
|
|
37
|
+
return isOpen ? Math.max(previous, measured) : measured;
|
|
38
|
+
}
|
|
25
39
|
static shouldClose(isPresented, isOpen, isDismissBlocked) {
|
|
26
40
|
return !isPresented && isOpen && !isDismissBlocked;
|
|
27
41
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PsMobileTheme } from '../interfaces/ps-mobile-theme';
|
|
2
|
+
import type { PsStackScreenOptions } from '../interfaces/ps-stack-screen-options';
|
|
3
|
+
export declare class PsStackOptionsService {
|
|
4
|
+
static android(base: PsStackScreenOptions, theme: PsMobileTheme): PsStackScreenOptions;
|
|
5
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PsHeaderConfig } from '../constants/ps-header-config';
|
|
2
|
+
export class PsStackOptionsService {
|
|
3
|
+
static android(base, theme) {
|
|
4
|
+
return {
|
|
5
|
+
...base,
|
|
6
|
+
contentStyle: { backgroundColor: theme.background },
|
|
7
|
+
headerShadowVisible: false,
|
|
8
|
+
headerStyle: { backgroundColor: theme.background },
|
|
9
|
+
headerTintColor: theme.ink,
|
|
10
|
+
headerTitleAlign: 'left',
|
|
11
|
+
headerTitleStyle: {
|
|
12
|
+
color: theme.ink,
|
|
13
|
+
fontFamily: theme.fonts.semibold,
|
|
14
|
+
fontSize: PsHeaderConfig.titleSize,
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PsMobileTheme } from '../interfaces/ps-mobile-theme';
|
|
2
|
+
export declare class PsStateService {
|
|
3
|
+
static pressedFill(theme: PsMobileTheme, base: string): string;
|
|
4
|
+
static headerFill(theme: PsMobileTheme, isPressed: boolean): string;
|
|
5
|
+
static disabledOpacity(): number;
|
|
6
|
+
static ringColor(theme: PsMobileTheme, hasError: boolean): string;
|
|
7
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Platform } from 'react-native';
|
|
2
|
+
import { PsAndroidStateConfig } from '../constants/ps-android-state-config';
|
|
3
|
+
import { PsMobileControlConfig } from '../constants/ps-mobile-control-config';
|
|
4
|
+
import { PsMobileColorService } from './ps-mobile-color-service';
|
|
5
|
+
export class PsStateService {
|
|
6
|
+
static pressedFill(theme, base) {
|
|
7
|
+
if (Platform.OS === 'android')
|
|
8
|
+
return base;
|
|
9
|
+
return PsMobileColorService.withAlpha(theme.ink, PsMobileControlConfig.pressedAlpha);
|
|
10
|
+
}
|
|
11
|
+
static headerFill(theme, isPressed) {
|
|
12
|
+
if (Platform.OS === 'android')
|
|
13
|
+
return isPressed ? theme.primarySoftStrong : theme.primarySoft;
|
|
14
|
+
return PsMobileColorService.withAlpha(theme.ink, isPressed
|
|
15
|
+
? PsMobileControlConfig.neutralAlpha + PsMobileControlConfig.pressedAlpha
|
|
16
|
+
: PsMobileControlConfig.neutralAlpha);
|
|
17
|
+
}
|
|
18
|
+
static disabledOpacity() {
|
|
19
|
+
return Platform.OS === 'android'
|
|
20
|
+
? PsAndroidStateConfig.disabledContentAlpha
|
|
21
|
+
: PsMobileControlConfig.disabledOpacity;
|
|
22
|
+
}
|
|
23
|
+
static ringColor(theme, hasError) {
|
|
24
|
+
return Platform.OS === 'android' && hasError ? theme.danger : theme.primary;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PsSwitcherItem } from '../interfaces/ps-switcher-item';
|
|
2
|
+
export declare class PsSwitcherService {
|
|
3
|
+
static filter(items: PsSwitcherItem[], query: string): PsSwitcherItem[];
|
|
4
|
+
static hasSearch(count: number): boolean;
|
|
5
|
+
static selected(items: PsSwitcherItem[], id: string): PsSwitcherItem | undefined;
|
|
6
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PsSwitcherConfig } from '../constants/ps-switcher-config';
|
|
2
|
+
export class PsSwitcherService {
|
|
3
|
+
static filter(items, query) {
|
|
4
|
+
const needle = query.trim().toLowerCase();
|
|
5
|
+
return needle === ''
|
|
6
|
+
? items
|
|
7
|
+
: items.filter((item) => item.searchText.toLowerCase().includes(needle));
|
|
8
|
+
}
|
|
9
|
+
static hasSearch(count) {
|
|
10
|
+
return count > PsSwitcherConfig.searchThreshold;
|
|
11
|
+
}
|
|
12
|
+
static selected(items, id) {
|
|
13
|
+
return items.find((item) => item.id === id);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Platform } from 'react-native';
|
|
2
|
+
import { PsAndroidStateConfig } from '../constants/ps-android-state-config';
|
|
3
|
+
import { PsMobileColorService } from './ps-mobile-color-service';
|
|
4
|
+
export class PsTabBarStyleService {
|
|
5
|
+
static resolve(theme) {
|
|
6
|
+
if (Platform.OS !== 'android')
|
|
7
|
+
return { tintColor: theme.primaryText };
|
|
8
|
+
return {
|
|
9
|
+
backgroundColor: theme.surface,
|
|
10
|
+
badgeBackgroundColor: theme.danger,
|
|
11
|
+
badgeTextColor: theme.white,
|
|
12
|
+
iconColor: { default: theme.muted, selected: theme.primaryText },
|
|
13
|
+
indicatorColor: theme.primarySoftStrong,
|
|
14
|
+
labelStyle: {
|
|
15
|
+
default: {
|
|
16
|
+
color: theme.muted,
|
|
17
|
+
fontFamily: theme.fonts.medium,
|
|
18
|
+
fontSize: PsAndroidStateConfig.tabLabelSize,
|
|
19
|
+
},
|
|
20
|
+
selected: {
|
|
21
|
+
color: theme.primaryText,
|
|
22
|
+
fontFamily: theme.fonts.semibold,
|
|
23
|
+
fontSize: PsAndroidStateConfig.tabLabelSize,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
rippleColor: PsMobileColorService.withAlpha(theme.primary, PsAndroidStateConfig.rippleAlpha),
|
|
27
|
+
tintColor: theme.primaryText,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -3,15 +3,15 @@ export class PsTextService {
|
|
|
3
3
|
static color(tone, theme) {
|
|
4
4
|
switch (tone) {
|
|
5
5
|
case 'danger':
|
|
6
|
-
return theme.
|
|
6
|
+
return theme.dangerText;
|
|
7
7
|
case 'muted':
|
|
8
8
|
return theme.muted;
|
|
9
9
|
case 'primary':
|
|
10
|
-
return theme.
|
|
10
|
+
return theme.primaryText;
|
|
11
11
|
case 'success':
|
|
12
|
-
return theme.
|
|
12
|
+
return theme.successText;
|
|
13
13
|
case 'warning':
|
|
14
|
-
return theme.
|
|
14
|
+
return theme.warningText;
|
|
15
15
|
case 'white':
|
|
16
16
|
return theme.white;
|
|
17
17
|
default:
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PsChartBarRect } from '../interfaces/ps-chart-bar-rect';
|
|
2
|
+
import type { PsChartDomain } from '../interfaces/ps-chart-domain';
|
|
3
|
+
import type { PsChartPlot } from '../interfaces/ps-chart-plot';
|
|
4
|
+
import type { PsWaterfallDatum } from '../interfaces/ps-waterfall-datum';
|
|
5
|
+
import type { PsWaterfallStep } from '../interfaces/ps-waterfall-step';
|
|
6
|
+
export declare class PsWaterfallService {
|
|
7
|
+
static steps(data: PsWaterfallDatum[]): PsWaterfallStep[];
|
|
8
|
+
static values(steps: PsWaterfallStep[]): number[];
|
|
9
|
+
static rects(steps: PsWaterfallStep[], colors: string[], domain: PsChartDomain, plot: PsChartPlot): PsChartBarRect[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { PsChartConfig } from '../constants/ps-chart-config';
|
|
2
|
+
import { PsChartBarService } from './ps-chart-bar-service';
|
|
3
|
+
import { PsChartScaleService } from './ps-chart-scale-service';
|
|
4
|
+
export class PsWaterfallService {
|
|
5
|
+
static steps(data) {
|
|
6
|
+
let running = 0;
|
|
7
|
+
return data.map((datum) => {
|
|
8
|
+
const value = Number.isFinite(datum.value) ? datum.value : 0;
|
|
9
|
+
if (datum.isTotal === true) {
|
|
10
|
+
running = value;
|
|
11
|
+
return { end: value, isTotal: true, label: datum.label, start: 0, value };
|
|
12
|
+
}
|
|
13
|
+
const start = running;
|
|
14
|
+
running += value;
|
|
15
|
+
return { end: running, isTotal: false, label: datum.label, start, value };
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
static values(steps) {
|
|
19
|
+
return steps.flatMap((step) => [step.start, step.end]);
|
|
20
|
+
}
|
|
21
|
+
static rects(steps, colors, domain, plot) {
|
|
22
|
+
const slot = PsChartBarService.slot(steps.length, plot);
|
|
23
|
+
const width = slot * (1 - PsChartConfig.barGapRatio);
|
|
24
|
+
return steps.map((step, row) => {
|
|
25
|
+
const from = PsChartScaleService.y(step.start, domain, plot);
|
|
26
|
+
const to = PsChartScaleService.y(step.end, domain, plot);
|
|
27
|
+
return {
|
|
28
|
+
color: step.isTotal ? colors[2] : step.value < 0 ? colors[1] : colors[0],
|
|
29
|
+
height: Math.abs(to - from),
|
|
30
|
+
id: `${row}:${step.label}`,
|
|
31
|
+
isNegative: step.end < step.start,
|
|
32
|
+
width,
|
|
33
|
+
x: plot.left + row * slot + (slot * PsChartConfig.barGapRatio) / 2,
|
|
34
|
+
y: Math.min(from, to),
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
package/jest-setup.js
CHANGED
|
@@ -16,6 +16,8 @@ jest.mock('react-native-reanimated', () => {
|
|
|
16
16
|
interpolate: (value, input, output) => output[0],
|
|
17
17
|
withRepeat: (value) => value,
|
|
18
18
|
FadeInUp: builder,
|
|
19
|
+
SlideInLeft: builder,
|
|
20
|
+
SlideInRight: builder,
|
|
19
21
|
FadeOutUp: builder,
|
|
20
22
|
useAnimatedProps: (props) => props(),
|
|
21
23
|
useAnimatedStyle: (style) => style(),
|
|
@@ -57,3 +59,155 @@ jest.mock('@react-native-menu/menu', () => {
|
|
|
57
59
|
React.createElement(View, { actions, onPressAction, testID }, children),
|
|
58
60
|
};
|
|
59
61
|
});
|
|
62
|
+
|
|
63
|
+
jest.mock('expo-router', () => {
|
|
64
|
+
const React = require('react');
|
|
65
|
+
const { View } = require('react-native');
|
|
66
|
+
const Link = ({ children, href }) =>
|
|
67
|
+
React.createElement(View, { href, testID: 'ps-list-link' }, children);
|
|
68
|
+
const Pass = ({ children }) => React.createElement(React.Fragment, null, children);
|
|
69
|
+
const MenuAction = ({ onPress, title }) =>
|
|
70
|
+
React.createElement(View, {
|
|
71
|
+
accessibilityLabel: title,
|
|
72
|
+
onPress,
|
|
73
|
+
testID: 'ps-list-link-action',
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
Link.Trigger = Pass;
|
|
77
|
+
Link.Preview = ({ children, style }) =>
|
|
78
|
+
children === undefined
|
|
79
|
+
? null
|
|
80
|
+
: React.createElement(View, { style, testID: 'ps-list-link-preview' }, children);
|
|
81
|
+
const Menu = ({ children }) =>
|
|
82
|
+
React.createElement(
|
|
83
|
+
React.Fragment,
|
|
84
|
+
null,
|
|
85
|
+
React.Children.toArray(children).filter(
|
|
86
|
+
(child) => React.isValidElement(child) && (child.type === MenuAction || child.type === Menu)
|
|
87
|
+
)
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
Link.Menu = Menu;
|
|
91
|
+
Link.MenuAction = MenuAction;
|
|
92
|
+
|
|
93
|
+
const Stack = () => null;
|
|
94
|
+
|
|
95
|
+
Stack.Screen = ({ options }) =>
|
|
96
|
+
React.createElement(View, {
|
|
97
|
+
accessibilityLabel: options.title,
|
|
98
|
+
headerBackVisible: options.headerBackVisible,
|
|
99
|
+
testID: 'stack-screen',
|
|
100
|
+
});
|
|
101
|
+
Stack.Toolbar = ({ children, placement }) =>
|
|
102
|
+
React.createElement(View, { testID: `stack-toolbar-${placement}` }, children);
|
|
103
|
+
Stack.Toolbar.Button = ({ children, disabled, onPress }) =>
|
|
104
|
+
React.createElement(View, { accessibilityLabel: children, disabled, onPress });
|
|
105
|
+
Stack.Toolbar.Spacer = () => null;
|
|
106
|
+
|
|
107
|
+
const ThemeProvider = ({ children }) => React.createElement(React.Fragment, null, children);
|
|
108
|
+
|
|
109
|
+
return { __esModule: true, Link, Stack, ThemeProvider };
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
jest.mock(
|
|
113
|
+
'expo-local-authentication',
|
|
114
|
+
() => ({
|
|
115
|
+
__esModule: true,
|
|
116
|
+
authenticateAsync: jest.fn(() => Promise.resolve({ success: true })),
|
|
117
|
+
getEnrolledLevelAsync: jest.fn(() => Promise.resolve(3)),
|
|
118
|
+
supportedAuthenticationTypesAsync: jest.fn(() => Promise.resolve([2])),
|
|
119
|
+
}),
|
|
120
|
+
{ virtual: true }
|
|
121
|
+
);
|
|
122
|
+
|
|
123
|
+
jest.mock(
|
|
124
|
+
'expo-quick-actions',
|
|
125
|
+
() => ({
|
|
126
|
+
__esModule: true,
|
|
127
|
+
addListener: jest.fn(() => ({ remove: jest.fn() })),
|
|
128
|
+
initial: undefined,
|
|
129
|
+
setItems: jest.fn(() => Promise.resolve()),
|
|
130
|
+
}),
|
|
131
|
+
{ virtual: true }
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
jest.mock('expo', () => {
|
|
135
|
+
const actual = jest.requireActual('expo');
|
|
136
|
+
|
|
137
|
+
return {
|
|
138
|
+
...actual,
|
|
139
|
+
requireOptionalNativeModule: (name) =>
|
|
140
|
+
name === 'ExpoLocalAuthentication' ? {} : actual.requireOptionalNativeModule(name),
|
|
141
|
+
};
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
jest.mock(
|
|
145
|
+
'react-native-document-scanner-plugin',
|
|
146
|
+
() => ({
|
|
147
|
+
__esModule: true,
|
|
148
|
+
default: {
|
|
149
|
+
scanDocument: jest.fn(() => Promise.resolve({ scannedImages: [], status: 'cancel' })),
|
|
150
|
+
},
|
|
151
|
+
}),
|
|
152
|
+
{ virtual: true }
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
jest.mock(
|
|
156
|
+
'react-native-pdf-thumbnail',
|
|
157
|
+
() => ({
|
|
158
|
+
__esModule: true,
|
|
159
|
+
default: {
|
|
160
|
+
generate: jest.fn(() =>
|
|
161
|
+
Promise.resolve({ height: 400, uri: 'file:///page-0.jpg', width: 300 })
|
|
162
|
+
),
|
|
163
|
+
generateAllPages: jest.fn(() =>
|
|
164
|
+
Promise.resolve([{ height: 400, uri: 'file:///page-0.jpg', width: 300 }])
|
|
165
|
+
),
|
|
166
|
+
},
|
|
167
|
+
}),
|
|
168
|
+
{ virtual: true }
|
|
169
|
+
);
|
|
170
|
+
|
|
171
|
+
jest.mock(
|
|
172
|
+
'expo-image-picker',
|
|
173
|
+
() => ({
|
|
174
|
+
__esModule: true,
|
|
175
|
+
launchCameraAsync: jest.fn(() => Promise.resolve({ assets: null, canceled: true })),
|
|
176
|
+
launchImageLibraryAsync: jest.fn(() => Promise.resolve({ assets: null, canceled: true })),
|
|
177
|
+
requestCameraPermissionsAsync: jest.fn(() => Promise.resolve({ granted: true })),
|
|
178
|
+
}),
|
|
179
|
+
{ virtual: true }
|
|
180
|
+
);
|
|
181
|
+
|
|
182
|
+
jest.mock(
|
|
183
|
+
'expo-document-picker',
|
|
184
|
+
() => ({
|
|
185
|
+
__esModule: true,
|
|
186
|
+
getDocumentAsync: jest.fn(() => Promise.resolve({ assets: null, canceled: true })),
|
|
187
|
+
}),
|
|
188
|
+
{ virtual: true }
|
|
189
|
+
);
|
|
190
|
+
|
|
191
|
+
jest.mock('expo-device', () => ({ __esModule: true, isDevice: true }), { virtual: true });
|
|
192
|
+
|
|
193
|
+
jest.mock(
|
|
194
|
+
'expo-camera',
|
|
195
|
+
() => {
|
|
196
|
+
const React = require('react');
|
|
197
|
+
const { View } = require('react-native');
|
|
198
|
+
|
|
199
|
+
return {
|
|
200
|
+
__esModule: true,
|
|
201
|
+
Camera: {
|
|
202
|
+
requestCameraPermissionsAsync: jest.fn(() => Promise.resolve({ granted: true })),
|
|
203
|
+
},
|
|
204
|
+
CameraView: (props) =>
|
|
205
|
+
React.createElement(View, {
|
|
206
|
+
enableTorch: props.enableTorch,
|
|
207
|
+
onBarcodeScanned: props.onBarcodeScanned,
|
|
208
|
+
testID: 'ps-barcode-camera',
|
|
209
|
+
}),
|
|
210
|
+
};
|
|
211
|
+
},
|
|
212
|
+
{ virtual: true }
|
|
213
|
+
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pallasoft/ps-mobile-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Native iOS (SwiftUI) and Android (Jetpack Compose) Ps components for Pallasoft mobile apps",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"test": "jest"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@pallasoft/ps-design-system": "^1.
|
|
37
|
+
"@pallasoft/ps-design-system": "^1.19.0",
|
|
38
38
|
"@pallasoft/ps-icons": "^1.11.0",
|
|
39
39
|
"@pallasoft/ps-utilities": "^2.27.0"
|
|
40
40
|
},
|
|
@@ -42,19 +42,55 @@
|
|
|
42
42
|
"@expo/ui": "~58.0.0",
|
|
43
43
|
"@react-native-menu/menu": "^2.0.0",
|
|
44
44
|
"expo": "~58.0.0",
|
|
45
|
+
"expo-camera": "~58.0.0",
|
|
46
|
+
"expo-device": "~58.0.0",
|
|
47
|
+
"expo-document-picker": "~58.0.0",
|
|
48
|
+
"expo-file-system": "~58.0.0",
|
|
45
49
|
"expo-haptics": "~58.0.7",
|
|
50
|
+
"expo-image-picker": "~58.0.0",
|
|
46
51
|
"expo-linear-gradient": "~58.0.3",
|
|
52
|
+
"expo-local-authentication": "~58.0.0",
|
|
53
|
+
"expo-quick-actions": "^6.0.2",
|
|
54
|
+
"expo-router": "~58.0.0",
|
|
47
55
|
"react": "^19.3.0",
|
|
48
56
|
"react-native": "~0.88.0",
|
|
49
57
|
"react-native-document-scanner-plugin": "^2.0.4",
|
|
50
58
|
"react-native-gesture-handler": "~3.3.0",
|
|
59
|
+
"react-native-pdf-thumbnail": "^2.0.0",
|
|
51
60
|
"react-native-reanimated": "~4.7.1",
|
|
52
61
|
"react-native-safe-area-context": "~5.10.1",
|
|
53
62
|
"react-native-svg": "~15.16.0"
|
|
54
63
|
},
|
|
55
64
|
"peerDependenciesMeta": {
|
|
65
|
+
"expo-camera": {
|
|
66
|
+
"optional": true
|
|
67
|
+
},
|
|
68
|
+
"expo-device": {
|
|
69
|
+
"optional": true
|
|
70
|
+
},
|
|
71
|
+
"expo-document-picker": {
|
|
72
|
+
"optional": true
|
|
73
|
+
},
|
|
74
|
+
"expo-file-system": {
|
|
75
|
+
"optional": true
|
|
76
|
+
},
|
|
77
|
+
"expo-image-picker": {
|
|
78
|
+
"optional": true
|
|
79
|
+
},
|
|
80
|
+
"expo-local-authentication": {
|
|
81
|
+
"optional": true
|
|
82
|
+
},
|
|
83
|
+
"expo-quick-actions": {
|
|
84
|
+
"optional": true
|
|
85
|
+
},
|
|
86
|
+
"expo-router": {
|
|
87
|
+
"optional": true
|
|
88
|
+
},
|
|
56
89
|
"react-native-document-scanner-plugin": {
|
|
57
90
|
"optional": true
|
|
91
|
+
},
|
|
92
|
+
"react-native-pdf-thumbnail": {
|
|
93
|
+
"optional": true
|
|
58
94
|
}
|
|
59
95
|
},
|
|
60
96
|
"devDependencies": {
|
|
@@ -67,6 +103,7 @@
|
|
|
67
103
|
"@expo/ui": "~58.0.21",
|
|
68
104
|
"@ianvs/prettier-plugin-sort-imports": "^4.7.0",
|
|
69
105
|
"@react-native-menu/menu": "^2.0.0",
|
|
106
|
+
"@react-native/jest-preset": "^0.88.0",
|
|
70
107
|
"@semantic-release/changelog": "^6.0.3",
|
|
71
108
|
"@semantic-release/commit-analyzer": "^13.0.0",
|
|
72
109
|
"@semantic-release/git": "^10.0.1",
|
|
@@ -86,8 +123,15 @@
|
|
|
86
123
|
"eslint-plugin-import": "^2.32.0",
|
|
87
124
|
"eslint-plugin-prettier": "^5.5.4",
|
|
88
125
|
"expo": "~58.0.16",
|
|
126
|
+
"expo-device": "~58.0.5",
|
|
127
|
+
"expo-document-picker": "~58.0.4",
|
|
128
|
+
"expo-file-system": "~58.0.10",
|
|
89
129
|
"expo-haptics": "~58.0.7",
|
|
130
|
+
"expo-image-picker": "~58.0.10",
|
|
90
131
|
"expo-linear-gradient": "~58.0.3",
|
|
132
|
+
"expo-local-authentication": "~58.0.2",
|
|
133
|
+
"expo-router": "~58.0.24",
|
|
134
|
+
"hono": "^4.13.13",
|
|
91
135
|
"husky": "^9.1.7",
|
|
92
136
|
"jest": "^30.5.2",
|
|
93
137
|
"jest-expo": "~58.0.11",
|
|
@@ -96,6 +140,7 @@
|
|
|
96
140
|
"react": "^19.3.1",
|
|
97
141
|
"react-native": "0.88.0",
|
|
98
142
|
"react-native-gesture-handler": "~3.3.0",
|
|
143
|
+
"react-native-pdf-thumbnail": "^2.0.0",
|
|
99
144
|
"react-native-reanimated": "^4.7.1",
|
|
100
145
|
"react-native-safe-area-context": "~5.10.1",
|
|
101
146
|
"react-native-svg": "^15.16.0",
|