@oxy.so/bloom 23.3.0 → 23.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/admonition.mdx +1 -2
- package/docs/adoption-matrix.mdx +3 -12
- package/docs/bloom-language-modifiers.mdx +9 -48
- package/docs/bloom-language-nodes.mdx +2 -195
- package/docs/bloom-language-tokens.mdx +2 -2
- package/docs/bloom-language.mdx +18 -56
- package/docs/empty-state.mdx +1 -2
- package/docs/fab.mdx +5 -3
- package/docs/field.mdx +1 -1
- package/docs/public-parts.mdx +2 -18
- package/docs/screen.mdx +10 -0
- package/docs/scroll.mdx +7 -0
- package/docs/task-catalog.json +1 -1
- package/docs/task-catalog.mdx +1 -1
- package/lib/commonjs/button/Button.web.js +5 -2
- package/lib/commonjs/button/Button.web.js.map +1 -1
- package/lib/commonjs/button/shared.js.map +1 -1
- package/lib/commonjs/chat-composer/shared.js.map +1 -1
- package/lib/commonjs/chat-people/StoryViewer.js +2 -1
- package/lib/commonjs/chat-people/StoryViewer.js.map +1 -1
- package/lib/commonjs/date-picker/PickerShell.js +2 -1
- package/lib/commonjs/date-picker/PickerShell.js.map +1 -1
- package/lib/commonjs/dialog/DetailDialogMotion.js +10 -4
- package/lib/commonjs/dialog/DetailDialogMotion.js.map +1 -1
- package/lib/commonjs/fab/constants.js +5 -2
- package/lib/commonjs/fab/constants.js.map +1 -1
- package/lib/commonjs/fab/index.js +6 -0
- package/lib/commonjs/fab/index.js.map +1 -1
- package/lib/commonjs/fab/index.web.js +6 -0
- package/lib/commonjs/fab/index.web.js.map +1 -1
- package/lib/commonjs/fab/use-fab-props.js +1 -1
- package/lib/commonjs/fab/use-fab-props.js.map +1 -1
- package/lib/commonjs/field/FieldConstraintScope.js +2 -2
- package/lib/commonjs/floating/lens/lens-button-host.js +2 -1
- package/lib/commonjs/floating/lens/lens-button-host.js.map +1 -1
- package/lib/commonjs/floating/lens/lens-tint.js +19 -0
- package/lib/commonjs/floating/lens/lens-tint.js.map +1 -0
- package/lib/commonjs/floating/lens/use-lens-menu.js +2 -1
- package/lib/commonjs/floating/lens/use-lens-menu.js.map +1 -1
- package/lib/commonjs/index.js +229 -866
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +229 -866
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/listing-actions/ApplicationChecklist.js.map +1 -1
- package/lib/commonjs/locale/translations/ar.js +0 -262
- package/lib/commonjs/locale/translations/ar.js.map +1 -1
- package/lib/commonjs/locale/translations/bn.js +0 -234
- package/lib/commonjs/locale/translations/bn.js.map +1 -1
- package/lib/commonjs/locale/translations/ca.js +0 -249
- package/lib/commonjs/locale/translations/ca.js.map +1 -1
- package/lib/commonjs/locale/translations/de.js +0 -246
- package/lib/commonjs/locale/translations/de.js.map +1 -1
- package/lib/commonjs/locale/translations/es.js +0 -249
- package/lib/commonjs/locale/translations/es.js.map +1 -1
- package/lib/commonjs/locale/translations/fr.js +0 -249
- package/lib/commonjs/locale/translations/fr.js.map +1 -1
- package/lib/commonjs/locale/translations/hi.js +0 -240
- package/lib/commonjs/locale/translations/hi.js.map +1 -1
- package/lib/commonjs/locale/translations/id.js +0 -234
- package/lib/commonjs/locale/translations/id.js.map +1 -1
- package/lib/commonjs/locale/translations/it.js +0 -249
- package/lib/commonjs/locale/translations/it.js.map +1 -1
- package/lib/commonjs/locale/translations/ja.js +0 -234
- package/lib/commonjs/locale/translations/ja.js.map +1 -1
- package/lib/commonjs/locale/translations/pt.js +0 -249
- package/lib/commonjs/locale/translations/pt.js.map +1 -1
- package/lib/commonjs/locale/translations/ru.js +0 -259
- package/lib/commonjs/locale/translations/ru.js.map +1 -1
- package/lib/commonjs/locale/translations/tr.js +0 -238
- package/lib/commonjs/locale/translations/tr.js.map +1 -1
- package/lib/commonjs/locale/translations/zh.js +0 -234
- package/lib/commonjs/locale/translations/zh.js.map +1 -1
- package/lib/commonjs/overlay/Overlay.js +13 -22
- package/lib/commonjs/overlay/Overlay.js.map +1 -1
- package/lib/commonjs/panel-routing/expo-router/StackScene.js +42 -3
- package/lib/commonjs/panel-routing/expo-router/StackScene.js.map +1 -1
- package/lib/commonjs/queue-panel/QueueIconButton.js.map +1 -1
- package/lib/commonjs/screen/index.js +7 -0
- package/lib/commonjs/screen/index.js.map +1 -1
- package/lib/commonjs/screen/index.web.js +7 -0
- package/lib/commonjs/screen/index.web.js.map +1 -1
- package/lib/commonjs/screen/use-screen-entered.js +28 -0
- package/lib/commonjs/screen/use-screen-entered.js.map +1 -0
- package/lib/commonjs/screen/use-screen-scroll.js +21 -2
- package/lib/commonjs/screen/use-screen-scroll.js.map +1 -1
- package/lib/commonjs/sidebar/Sidebar.js +18 -9
- package/lib/commonjs/sidebar/Sidebar.js.map +1 -1
- package/lib/commonjs/tab-pager/expo-router/TabPager.js +18 -13
- package/lib/commonjs/tab-pager/expo-router/TabPager.js.map +1 -1
- package/lib/commonjs/tabs/expo-router/RouterTabs.js.map +1 -1
- package/lib/commonjs/toast/ToastHost.js +1 -0
- package/lib/commonjs/toast/ToastHost.js.map +1 -1
- package/lib/commonjs/toast/ToastHost.native.js +1 -0
- package/lib/commonjs/toast/ToastHost.native.js.map +1 -1
- package/lib/module/button/Button.web.js +6 -3
- package/lib/module/button/Button.web.js.map +1 -1
- package/lib/module/button/shared.js.map +1 -1
- package/lib/module/chat-composer/shared.js.map +1 -1
- package/lib/module/chat-people/StoryViewer.js +1 -2
- package/lib/module/chat-people/StoryViewer.js.map +1 -1
- package/lib/module/date-picker/PickerShell.js +1 -2
- package/lib/module/date-picker/PickerShell.js.map +1 -1
- package/lib/module/dialog/DetailDialogMotion.js +11 -5
- package/lib/module/dialog/DetailDialogMotion.js.map +1 -1
- package/lib/module/fab/constants.js +4 -1
- package/lib/module/fab/constants.js.map +1 -1
- package/lib/module/fab/index.js +1 -1
- package/lib/module/fab/index.js.map +1 -1
- package/lib/module/fab/index.web.js +1 -1
- package/lib/module/fab/index.web.js.map +1 -1
- package/lib/module/fab/use-fab-props.js +2 -2
- package/lib/module/fab/use-fab-props.js.map +1 -1
- package/lib/module/field/FieldConstraintScope.js +2 -2
- package/lib/module/floating/lens/lens-button-host.js +2 -1
- package/lib/module/floating/lens/lens-button-host.js.map +1 -1
- package/lib/module/floating/lens/lens-tint.js +15 -0
- package/lib/module/floating/lens/lens-tint.js.map +1 -0
- package/lib/module/floating/lens/use-lens-menu.js +2 -1
- package/lib/module/floating/lens/use-lens-menu.js.map +1 -1
- package/lib/module/index.js +0 -23
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +0 -23
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/listing-actions/ApplicationChecklist.js.map +1 -1
- package/lib/module/locale/translations/ar.js +0 -262
- package/lib/module/locale/translations/ar.js.map +1 -1
- package/lib/module/locale/translations/bn.js +0 -234
- package/lib/module/locale/translations/bn.js.map +1 -1
- package/lib/module/locale/translations/ca.js +0 -249
- package/lib/module/locale/translations/ca.js.map +1 -1
- package/lib/module/locale/translations/de.js +0 -246
- package/lib/module/locale/translations/de.js.map +1 -1
- package/lib/module/locale/translations/es.js +0 -249
- package/lib/module/locale/translations/es.js.map +1 -1
- package/lib/module/locale/translations/fr.js +0 -249
- package/lib/module/locale/translations/fr.js.map +1 -1
- package/lib/module/locale/translations/hi.js +0 -240
- package/lib/module/locale/translations/hi.js.map +1 -1
- package/lib/module/locale/translations/id.js +0 -234
- package/lib/module/locale/translations/id.js.map +1 -1
- package/lib/module/locale/translations/it.js +0 -249
- package/lib/module/locale/translations/it.js.map +1 -1
- package/lib/module/locale/translations/ja.js +0 -234
- package/lib/module/locale/translations/ja.js.map +1 -1
- package/lib/module/locale/translations/pt.js +0 -249
- package/lib/module/locale/translations/pt.js.map +1 -1
- package/lib/module/locale/translations/ru.js +0 -259
- package/lib/module/locale/translations/ru.js.map +1 -1
- package/lib/module/locale/translations/tr.js +0 -238
- package/lib/module/locale/translations/tr.js.map +1 -1
- package/lib/module/locale/translations/zh.js +0 -234
- package/lib/module/locale/translations/zh.js.map +1 -1
- package/lib/module/overlay/Overlay.js +13 -22
- package/lib/module/overlay/Overlay.js.map +1 -1
- package/lib/module/panel-routing/expo-router/StackScene.js +42 -4
- package/lib/module/panel-routing/expo-router/StackScene.js.map +1 -1
- package/lib/module/queue-panel/QueueIconButton.js.map +1 -1
- package/lib/module/screen/index.js +1 -0
- package/lib/module/screen/index.js.map +1 -1
- package/lib/module/screen/index.web.js +1 -0
- package/lib/module/screen/index.web.js.map +1 -1
- package/lib/module/screen/use-screen-entered.js +24 -0
- package/lib/module/screen/use-screen-entered.js.map +1 -0
- package/lib/module/screen/use-screen-scroll.js +21 -2
- package/lib/module/screen/use-screen-scroll.js.map +1 -1
- package/lib/module/sidebar/Sidebar.js +18 -9
- package/lib/module/sidebar/Sidebar.js.map +1 -1
- package/lib/module/tab-pager/expo-router/TabPager.js +19 -14
- package/lib/module/tab-pager/expo-router/TabPager.js.map +1 -1
- package/lib/module/tabs/expo-router/RouterTabs.js.map +1 -1
- package/lib/module/toast/ToastHost.js +1 -0
- package/lib/module/toast/ToastHost.js.map +1 -1
- package/lib/module/toast/ToastHost.native.js +1 -0
- package/lib/module/toast/ToastHost.native.js.map +1 -1
- package/lib/typescript/commonjs/agent-reply/types.d.ts +2 -2
- package/lib/typescript/commonjs/agent-reply/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/badge/types.d.ts +1 -1
- package/lib/typescript/commonjs/badge/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/breadcrumb/types.d.ts +3 -2
- package/lib/typescript/commonjs/breadcrumb/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/button/Button.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/button/shared.d.ts +3 -2
- package/lib/typescript/commonjs/button/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/button/types.d.ts +3 -3
- package/lib/typescript/commonjs/button/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/carousel/types.d.ts +3 -2
- package/lib/typescript/commonjs/carousel/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/shared.d.ts +4 -3
- package/lib/typescript/commonjs/chat-composer/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/types.d.ts +9 -9
- package/lib/typescript/commonjs/chat-composer/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-people/StoryViewer.d.ts.map +1 -1
- package/lib/typescript/commonjs/date-picker/PickerShell.d.ts +2 -2
- package/lib/typescript/commonjs/date-picker/PickerShell.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/DetailDialogMotion.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/fab/constants.d.ts +3 -1
- package/lib/typescript/commonjs/fab/constants.d.ts.map +1 -1
- package/lib/typescript/commonjs/fab/index.d.ts +1 -1
- package/lib/typescript/commonjs/fab/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/fab/index.web.d.ts +1 -1
- package/lib/typescript/commonjs/fab/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/fab/types.d.ts +2 -2
- package/lib/typescript/commonjs/fab/use-fab-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/field/FieldConstraintScope.d.ts +2 -2
- package/lib/typescript/commonjs/floating/lens/lens-button-host.d.ts.map +1 -1
- package/lib/typescript/commonjs/floating/lens/lens-tint.d.ts +13 -0
- package/lib/typescript/commonjs/floating/lens/lens-tint.d.ts.map +1 -0
- package/lib/typescript/commonjs/floating/lens/use-lens-menu.d.ts.map +1 -1
- package/lib/typescript/commonjs/home-search/types.d.ts +1 -1
- package/lib/typescript/commonjs/home-search/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +0 -21
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.web.d.ts +0 -21
- package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/listing-actions/ApplicationChecklist.d.ts.map +1 -1
- package/lib/typescript/commonjs/listing-actions/types.d.ts +2 -2
- package/lib/typescript/commonjs/listing-actions/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/ar.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/bn.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/ca.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/de.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/es.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/fr.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/hi.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/id.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/it.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/ja.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/pt.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/ru.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/tr.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/types.d.ts +0 -14
- package/lib/typescript/commonjs/locale/translations/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/zh.d.ts.map +1 -1
- package/lib/typescript/commonjs/overlay/Overlay.d.ts +1 -1
- package/lib/typescript/commonjs/overlay/Overlay.d.ts.map +1 -1
- package/lib/typescript/commonjs/overlay/types.d.ts +10 -0
- package/lib/typescript/commonjs/overlay/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/page-header/types.d.ts +1 -1
- package/lib/typescript/commonjs/page-header/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/panel-routing/expo-router/StackScene.d.ts +32 -5
- package/lib/typescript/commonjs/panel-routing/expo-router/StackScene.d.ts.map +1 -1
- package/lib/typescript/commonjs/queue-panel/QueueIconButton.d.ts +2 -2
- package/lib/typescript/commonjs/queue-panel/QueueIconButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/screen/index.d.ts +1 -0
- package/lib/typescript/commonjs/screen/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/screen/index.web.d.ts +1 -0
- package/lib/typescript/commonjs/screen/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/screen/use-screen-entered.d.ts +16 -0
- package/lib/typescript/commonjs/screen/use-screen-entered.d.ts.map +1 -0
- package/lib/typescript/commonjs/screen/use-screen-scroll.d.ts +3 -2
- package/lib/typescript/commonjs/screen/use-screen-scroll.d.ts.map +1 -1
- package/lib/typescript/commonjs/sidebar/Sidebar.d.ts.map +1 -1
- package/lib/typescript/commonjs/sidebar/types.d.ts +9 -9
- package/lib/typescript/commonjs/sidebar/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/stay-search/types.d.ts +3 -3
- package/lib/typescript/commonjs/stay-search/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/tab-pager/expo-router/TabPager.d.ts.map +1 -1
- package/lib/typescript/commonjs/tabs/expo-router/RouterTabs.d.ts +3 -2
- package/lib/typescript/commonjs/tabs/expo-router/RouterTabs.d.ts.map +1 -1
- package/lib/typescript/commonjs/tabs/types.d.ts +1 -1
- package/lib/typescript/commonjs/tabs/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/toast/ToastHost.native.d.ts.map +1 -1
- package/lib/typescript/module/agent-reply/types.d.ts +2 -2
- package/lib/typescript/module/agent-reply/types.d.ts.map +1 -1
- package/lib/typescript/module/badge/types.d.ts +1 -1
- package/lib/typescript/module/badge/types.d.ts.map +1 -1
- package/lib/typescript/module/breadcrumb/types.d.ts +3 -2
- package/lib/typescript/module/breadcrumb/types.d.ts.map +1 -1
- package/lib/typescript/module/button/Button.web.d.ts.map +1 -1
- package/lib/typescript/module/button/shared.d.ts +3 -2
- package/lib/typescript/module/button/shared.d.ts.map +1 -1
- package/lib/typescript/module/button/types.d.ts +3 -3
- package/lib/typescript/module/button/types.d.ts.map +1 -1
- package/lib/typescript/module/carousel/types.d.ts +3 -2
- package/lib/typescript/module/carousel/types.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/shared.d.ts +4 -3
- package/lib/typescript/module/chat-composer/shared.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/types.d.ts +9 -9
- package/lib/typescript/module/chat-composer/types.d.ts.map +1 -1
- package/lib/typescript/module/chat-people/StoryViewer.d.ts.map +1 -1
- package/lib/typescript/module/date-picker/PickerShell.d.ts +2 -2
- package/lib/typescript/module/date-picker/PickerShell.d.ts.map +1 -1
- package/lib/typescript/module/dialog/DetailDialogMotion.d.ts.map +1 -1
- package/lib/typescript/module/dialog/types.d.ts.map +1 -1
- package/lib/typescript/module/fab/constants.d.ts +3 -1
- package/lib/typescript/module/fab/constants.d.ts.map +1 -1
- package/lib/typescript/module/fab/index.d.ts +1 -1
- package/lib/typescript/module/fab/index.d.ts.map +1 -1
- package/lib/typescript/module/fab/index.web.d.ts +1 -1
- package/lib/typescript/module/fab/index.web.d.ts.map +1 -1
- package/lib/typescript/module/fab/types.d.ts +2 -2
- package/lib/typescript/module/fab/use-fab-props.d.ts.map +1 -1
- package/lib/typescript/module/field/FieldConstraintScope.d.ts +2 -2
- package/lib/typescript/module/floating/lens/lens-button-host.d.ts.map +1 -1
- package/lib/typescript/module/floating/lens/lens-tint.d.ts +13 -0
- package/lib/typescript/module/floating/lens/lens-tint.d.ts.map +1 -0
- package/lib/typescript/module/floating/lens/use-lens-menu.d.ts.map +1 -1
- package/lib/typescript/module/home-search/types.d.ts +1 -1
- package/lib/typescript/module/home-search/types.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +0 -21
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/index.web.d.ts +0 -21
- package/lib/typescript/module/index.web.d.ts.map +1 -1
- package/lib/typescript/module/listing-actions/ApplicationChecklist.d.ts.map +1 -1
- package/lib/typescript/module/listing-actions/types.d.ts +2 -2
- package/lib/typescript/module/listing-actions/types.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/ar.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/bn.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/ca.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/de.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/es.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/fr.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/hi.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/id.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/it.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/ja.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/pt.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/ru.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/tr.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/types.d.ts +0 -14
- package/lib/typescript/module/locale/translations/types.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/zh.d.ts.map +1 -1
- package/lib/typescript/module/overlay/Overlay.d.ts +1 -1
- package/lib/typescript/module/overlay/Overlay.d.ts.map +1 -1
- package/lib/typescript/module/overlay/types.d.ts +10 -0
- package/lib/typescript/module/overlay/types.d.ts.map +1 -1
- package/lib/typescript/module/page-header/types.d.ts +1 -1
- package/lib/typescript/module/page-header/types.d.ts.map +1 -1
- package/lib/typescript/module/panel-routing/expo-router/StackScene.d.ts +32 -5
- package/lib/typescript/module/panel-routing/expo-router/StackScene.d.ts.map +1 -1
- package/lib/typescript/module/queue-panel/QueueIconButton.d.ts +2 -2
- package/lib/typescript/module/queue-panel/QueueIconButton.d.ts.map +1 -1
- package/lib/typescript/module/screen/index.d.ts +1 -0
- package/lib/typescript/module/screen/index.d.ts.map +1 -1
- package/lib/typescript/module/screen/index.web.d.ts +1 -0
- package/lib/typescript/module/screen/index.web.d.ts.map +1 -1
- package/lib/typescript/module/screen/use-screen-entered.d.ts +16 -0
- package/lib/typescript/module/screen/use-screen-entered.d.ts.map +1 -0
- package/lib/typescript/module/screen/use-screen-scroll.d.ts +3 -2
- package/lib/typescript/module/screen/use-screen-scroll.d.ts.map +1 -1
- package/lib/typescript/module/sidebar/Sidebar.d.ts.map +1 -1
- package/lib/typescript/module/sidebar/types.d.ts +9 -9
- package/lib/typescript/module/sidebar/types.d.ts.map +1 -1
- package/lib/typescript/module/stay-search/types.d.ts +3 -3
- package/lib/typescript/module/stay-search/types.d.ts.map +1 -1
- package/lib/typescript/module/tab-pager/expo-router/TabPager.d.ts.map +1 -1
- package/lib/typescript/module/tabs/expo-router/RouterTabs.d.ts +3 -2
- package/lib/typescript/module/tabs/expo-router/RouterTabs.d.ts.map +1 -1
- package/lib/typescript/module/tabs/types.d.ts +1 -1
- package/lib/typescript/module/tabs/types.d.ts.map +1 -1
- package/lib/typescript/module/toast/ToastHost.native.d.ts.map +1 -1
- package/package.json +1 -120
- package/src/__tests__/support/adoption-matrix.ts +0 -9
- package/src/__tests__/support/public-part-classifications.json +0 -16
- package/src/agent-reply/types.ts +2 -2
- package/src/badge/types.ts +1 -1
- package/src/breadcrumb/types.ts +3 -2
- package/src/button/Button.web.tsx +15 -2
- package/src/button/shared.ts +3 -4
- package/src/button/types.ts +3 -3
- package/src/carousel/types.ts +3 -2
- package/src/chat-composer/shared.ts +4 -4
- package/src/chat-composer/types.ts +9 -9
- package/src/chat-people/StoryViewer.tsx +2 -2
- package/src/date-picker/PickerShell.tsx +2 -2
- package/src/dialog/DetailDialogMotion.tsx +15 -9
- package/src/dialog/types.ts +0 -1
- package/src/fab/constants.ts +4 -1
- package/src/fab/index.ts +1 -1
- package/src/fab/index.web.ts +1 -1
- package/src/fab/types.ts +2 -2
- package/src/fab/use-fab-props.ts +2 -2
- package/src/field/FieldConstraintScope.tsx +2 -2
- package/src/floating/lens/lens-button-host.tsx +2 -1
- package/src/floating/lens/lens-tint.ts +12 -0
- package/src/floating/lens/use-lens-menu.tsx +2 -1
- package/src/home-search/types.ts +1 -1
- package/src/index.ts +0 -195
- package/src/index.web.ts +0 -195
- package/src/listing-actions/ApplicationChecklist.tsx +3 -2
- package/src/listing-actions/types.ts +2 -2
- package/src/locale/translations/ar.ts +0 -232
- package/src/locale/translations/bn.ts +0 -200
- package/src/locale/translations/ca.ts +0 -210
- package/src/locale/translations/de.ts +0 -213
- package/src/locale/translations/es.ts +0 -210
- package/src/locale/translations/fr.ts +0 -214
- package/src/locale/translations/hi.ts +0 -201
- package/src/locale/translations/id.ts +0 -206
- package/src/locale/translations/it.ts +0 -214
- package/src/locale/translations/ja.ts +0 -202
- package/src/locale/translations/pt.ts +0 -220
- package/src/locale/translations/ru.ts +0 -225
- package/src/locale/translations/tr.ts +0 -202
- package/src/locale/translations/types.ts +0 -14
- package/src/locale/translations/zh.ts +0 -200
- package/src/overlay/Overlay.tsx +23 -21
- package/src/overlay/types.ts +10 -0
- package/src/page-header/types.ts +1 -1
- package/src/panel-routing/expo-router/StackScene.tsx +62 -5
- package/src/queue-panel/QueueIconButton.tsx +2 -2
- package/src/screen/index.ts +1 -0
- package/src/screen/index.web.ts +1 -0
- package/src/screen/use-screen-entered.ts +21 -0
- package/src/screen/use-screen-scroll.ts +36 -2
- package/src/sidebar/Sidebar.tsx +17 -11
- package/src/sidebar/types.ts +9 -9
- package/src/stay-search/types.ts +3 -3
- package/src/tab-pager/expo-router/TabPager.tsx +35 -16
- package/src/tabs/expo-router/RouterTabs.tsx +3 -2
- package/src/tabs/types.ts +1 -1
- package/src/toast/ToastHost.native.tsx +5 -1
- package/src/toast/ToastHost.tsx +1 -1
- package/docs/carrier-quote.mdx +0 -121
- package/docs/delivery-slot.mdx +0 -91
- package/docs/earnings.mdx +0 -89
- package/docs/job-board.mdx +0 -82
- package/docs/proof-of-delivery.mdx +0 -86
- package/docs/shipment-request.mdx +0 -139
- package/docs/vehicle-picker.mdx +0 -92
- package/lib/commonjs/carrier-quote/CarrierQuoteCard.js +0 -547
- package/lib/commonjs/carrier-quote/CarrierQuoteCard.js.map +0 -1
- package/lib/commonjs/carrier-quote/CarrierQuoteList.js +0 -274
- package/lib/commonjs/carrier-quote/CarrierQuoteList.js.map +0 -1
- package/lib/commonjs/carrier-quote/constants.js +0 -64
- package/lib/commonjs/carrier-quote/constants.js.map +0 -1
- package/lib/commonjs/carrier-quote/index.js +0 -82
- package/lib/commonjs/carrier-quote/index.js.map +0 -1
- package/lib/commonjs/carrier-quote/messages.js +0 -50
- package/lib/commonjs/carrier-quote/messages.js.map +0 -1
- package/lib/commonjs/carrier-quote/shared.js +0 -150
- package/lib/commonjs/carrier-quote/shared.js.map +0 -1
- package/lib/commonjs/carrier-quote/types.js +0 -6
- package/lib/commonjs/carrier-quote/types.js.map +0 -1
- package/lib/commonjs/delivery-slot/DeliverySlotDays.js +0 -92
- package/lib/commonjs/delivery-slot/DeliverySlotDays.js.map +0 -1
- package/lib/commonjs/delivery-slot/DeliverySlotOption.js +0 -131
- package/lib/commonjs/delivery-slot/DeliverySlotOption.js.map +0 -1
- package/lib/commonjs/delivery-slot/DeliverySlotPicker.js +0 -265
- package/lib/commonjs/delivery-slot/DeliverySlotPicker.js.map +0 -1
- package/lib/commonjs/delivery-slot/constants.js +0 -52
- package/lib/commonjs/delivery-slot/constants.js.map +0 -1
- package/lib/commonjs/delivery-slot/index.js +0 -101
- package/lib/commonjs/delivery-slot/index.js.map +0 -1
- package/lib/commonjs/delivery-slot/messages.js +0 -27
- package/lib/commonjs/delivery-slot/messages.js.map +0 -1
- package/lib/commonjs/delivery-slot/shared.js +0 -60
- package/lib/commonjs/delivery-slot/shared.js.map +0 -1
- package/lib/commonjs/delivery-slot/types.js +0 -6
- package/lib/commonjs/delivery-slot/types.js.map +0 -1
- package/lib/commonjs/earnings/EarningsBreakdown.js +0 -85
- package/lib/commonjs/earnings/EarningsBreakdown.js.map +0 -1
- package/lib/commonjs/earnings/EarningsPayoutRow.js +0 -156
- package/lib/commonjs/earnings/EarningsPayoutRow.js.map +0 -1
- package/lib/commonjs/earnings/EarningsSummary.js +0 -295
- package/lib/commonjs/earnings/EarningsSummary.js.map +0 -1
- package/lib/commonjs/earnings/constants.js +0 -61
- package/lib/commonjs/earnings/constants.js.map +0 -1
- package/lib/commonjs/earnings/index.js +0 -77
- package/lib/commonjs/earnings/index.js.map +0 -1
- package/lib/commonjs/earnings/messages.js +0 -30
- package/lib/commonjs/earnings/messages.js.map +0 -1
- package/lib/commonjs/earnings/shared.js +0 -72
- package/lib/commonjs/earnings/shared.js.map +0 -1
- package/lib/commonjs/earnings/types.js +0 -6
- package/lib/commonjs/earnings/types.js.map +0 -1
- package/lib/commonjs/job-board/JobBoard.js +0 -464
- package/lib/commonjs/job-board/JobBoard.js.map +0 -1
- package/lib/commonjs/job-board/JobCard.js +0 -582
- package/lib/commonjs/job-board/JobCard.js.map +0 -1
- package/lib/commonjs/job-board/constants.js +0 -119
- package/lib/commonjs/job-board/constants.js.map +0 -1
- package/lib/commonjs/job-board/index.js +0 -106
- package/lib/commonjs/job-board/index.js.map +0 -1
- package/lib/commonjs/job-board/messages.js +0 -68
- package/lib/commonjs/job-board/messages.js.map +0 -1
- package/lib/commonjs/job-board/shared.js +0 -179
- package/lib/commonjs/job-board/shared.js.map +0 -1
- package/lib/commonjs/job-board/types.js +0 -6
- package/lib/commonjs/job-board/types.js.map +0 -1
- package/lib/commonjs/proof-of-delivery/ProofOfDelivery.js +0 -306
- package/lib/commonjs/proof-of-delivery/ProofOfDelivery.js.map +0 -1
- package/lib/commonjs/proof-of-delivery/SignaturePad.js +0 -304
- package/lib/commonjs/proof-of-delivery/SignaturePad.js.map +0 -1
- package/lib/commonjs/proof-of-delivery/constants.js +0 -51
- package/lib/commonjs/proof-of-delivery/constants.js.map +0 -1
- package/lib/commonjs/proof-of-delivery/index.js +0 -106
- package/lib/commonjs/proof-of-delivery/index.js.map +0 -1
- package/lib/commonjs/proof-of-delivery/messages.js +0 -41
- package/lib/commonjs/proof-of-delivery/messages.js.map +0 -1
- package/lib/commonjs/proof-of-delivery/shared.js +0 -171
- package/lib/commonjs/proof-of-delivery/shared.js.map +0 -1
- package/lib/commonjs/proof-of-delivery/types.js +0 -6
- package/lib/commonjs/proof-of-delivery/types.js.map +0 -1
- package/lib/commonjs/shipment-request/ShipmentLoadPicker.js +0 -272
- package/lib/commonjs/shipment-request/ShipmentLoadPicker.js.map +0 -1
- package/lib/commonjs/shipment-request/ShipmentOptionsList.js +0 -188
- package/lib/commonjs/shipment-request/ShipmentOptionsList.js.map +0 -1
- package/lib/commonjs/shipment-request/ShipmentRequestForm.js +0 -155
- package/lib/commonjs/shipment-request/ShipmentRequestForm.js.map +0 -1
- package/lib/commonjs/shipment-request/constants.js +0 -118
- package/lib/commonjs/shipment-request/constants.js.map +0 -1
- package/lib/commonjs/shipment-request/index.js +0 -95
- package/lib/commonjs/shipment-request/index.js.map +0 -1
- package/lib/commonjs/shipment-request/messages.js +0 -79
- package/lib/commonjs/shipment-request/messages.js.map +0 -1
- package/lib/commonjs/shipment-request/shared.js +0 -65
- package/lib/commonjs/shipment-request/shared.js.map +0 -1
- package/lib/commonjs/shipment-request/types.js +0 -6
- package/lib/commonjs/shipment-request/types.js.map +0 -1
- package/lib/commonjs/vehicle-picker/VehiclePicker.js +0 -238
- package/lib/commonjs/vehicle-picker/VehiclePicker.js.map +0 -1
- package/lib/commonjs/vehicle-picker/constants.js +0 -76
- package/lib/commonjs/vehicle-picker/constants.js.map +0 -1
- package/lib/commonjs/vehicle-picker/index.js +0 -45
- package/lib/commonjs/vehicle-picker/index.js.map +0 -1
- package/lib/commonjs/vehicle-picker/messages.js +0 -49
- package/lib/commonjs/vehicle-picker/messages.js.map +0 -1
- package/lib/commonjs/vehicle-picker/shared.js +0 -24
- package/lib/commonjs/vehicle-picker/shared.js.map +0 -1
- package/lib/commonjs/vehicle-picker/types.js +0 -6
- package/lib/commonjs/vehicle-picker/types.js.map +0 -1
- package/lib/module/carrier-quote/CarrierQuoteCard.js +0 -543
- package/lib/module/carrier-quote/CarrierQuoteCard.js.map +0 -1
- package/lib/module/carrier-quote/CarrierQuoteList.js +0 -270
- package/lib/module/carrier-quote/CarrierQuoteList.js.map +0 -1
- package/lib/module/carrier-quote/constants.js +0 -61
- package/lib/module/carrier-quote/constants.js.map +0 -1
- package/lib/module/carrier-quote/index.js +0 -7
- package/lib/module/carrier-quote/index.js.map +0 -1
- package/lib/module/carrier-quote/messages.js +0 -47
- package/lib/module/carrier-quote/messages.js.map +0 -1
- package/lib/module/carrier-quote/shared.js +0 -139
- package/lib/module/carrier-quote/shared.js.map +0 -1
- package/lib/module/carrier-quote/types.js +0 -4
- package/lib/module/carrier-quote/types.js.map +0 -1
- package/lib/module/delivery-slot/DeliverySlotDays.js +0 -86
- package/lib/module/delivery-slot/DeliverySlotDays.js.map +0 -1
- package/lib/module/delivery-slot/DeliverySlotOption.js +0 -125
- package/lib/module/delivery-slot/DeliverySlotOption.js.map +0 -1
- package/lib/module/delivery-slot/DeliverySlotPicker.js +0 -259
- package/lib/module/delivery-slot/DeliverySlotPicker.js.map +0 -1
- package/lib/module/delivery-slot/constants.js +0 -48
- package/lib/module/delivery-slot/constants.js.map +0 -1
- package/lib/module/delivery-slot/index.js +0 -8
- package/lib/module/delivery-slot/index.js.map +0 -1
- package/lib/module/delivery-slot/messages.js +0 -24
- package/lib/module/delivery-slot/messages.js.map +0 -1
- package/lib/module/delivery-slot/shared.js +0 -52
- package/lib/module/delivery-slot/shared.js.map +0 -1
- package/lib/module/delivery-slot/types.js +0 -4
- package/lib/module/delivery-slot/types.js.map +0 -1
- package/lib/module/earnings/EarningsBreakdown.js +0 -79
- package/lib/module/earnings/EarningsBreakdown.js.map +0 -1
- package/lib/module/earnings/EarningsPayoutRow.js +0 -150
- package/lib/module/earnings/EarningsPayoutRow.js.map +0 -1
- package/lib/module/earnings/EarningsSummary.js +0 -289
- package/lib/module/earnings/EarningsSummary.js.map +0 -1
- package/lib/module/earnings/constants.js +0 -58
- package/lib/module/earnings/constants.js.map +0 -1
- package/lib/module/earnings/index.js +0 -8
- package/lib/module/earnings/index.js.map +0 -1
- package/lib/module/earnings/messages.js +0 -27
- package/lib/module/earnings/messages.js.map +0 -1
- package/lib/module/earnings/shared.js +0 -63
- package/lib/module/earnings/shared.js.map +0 -1
- package/lib/module/earnings/types.js +0 -4
- package/lib/module/earnings/types.js.map +0 -1
- package/lib/module/job-board/JobBoard.js +0 -460
- package/lib/module/job-board/JobBoard.js.map +0 -1
- package/lib/module/job-board/JobCard.js +0 -578
- package/lib/module/job-board/JobCard.js.map +0 -1
- package/lib/module/job-board/constants.js +0 -114
- package/lib/module/job-board/constants.js.map +0 -1
- package/lib/module/job-board/index.js +0 -7
- package/lib/module/job-board/index.js.map +0 -1
- package/lib/module/job-board/messages.js +0 -65
- package/lib/module/job-board/messages.js.map +0 -1
- package/lib/module/job-board/shared.js +0 -167
- package/lib/module/job-board/shared.js.map +0 -1
- package/lib/module/job-board/types.js +0 -4
- package/lib/module/job-board/types.js.map +0 -1
- package/lib/module/proof-of-delivery/ProofOfDelivery.js +0 -300
- package/lib/module/proof-of-delivery/ProofOfDelivery.js.map +0 -1
- package/lib/module/proof-of-delivery/SignaturePad.js +0 -298
- package/lib/module/proof-of-delivery/SignaturePad.js.map +0 -1
- package/lib/module/proof-of-delivery/constants.js +0 -47
- package/lib/module/proof-of-delivery/constants.js.map +0 -1
- package/lib/module/proof-of-delivery/index.js +0 -7
- package/lib/module/proof-of-delivery/index.js.map +0 -1
- package/lib/module/proof-of-delivery/messages.js +0 -38
- package/lib/module/proof-of-delivery/messages.js.map +0 -1
- package/lib/module/proof-of-delivery/shared.js +0 -157
- package/lib/module/proof-of-delivery/shared.js.map +0 -1
- package/lib/module/proof-of-delivery/types.js +0 -4
- package/lib/module/proof-of-delivery/types.js.map +0 -1
- package/lib/module/shipment-request/ShipmentLoadPicker.js +0 -266
- package/lib/module/shipment-request/ShipmentLoadPicker.js.map +0 -1
- package/lib/module/shipment-request/ShipmentOptionsList.js +0 -184
- package/lib/module/shipment-request/ShipmentOptionsList.js.map +0 -1
- package/lib/module/shipment-request/ShipmentRequestForm.js +0 -149
- package/lib/module/shipment-request/ShipmentRequestForm.js.map +0 -1
- package/lib/module/shipment-request/constants.js +0 -112
- package/lib/module/shipment-request/constants.js.map +0 -1
- package/lib/module/shipment-request/index.js +0 -8
- package/lib/module/shipment-request/index.js.map +0 -1
- package/lib/module/shipment-request/messages.js +0 -76
- package/lib/module/shipment-request/messages.js.map +0 -1
- package/lib/module/shipment-request/shared.js +0 -58
- package/lib/module/shipment-request/shared.js.map +0 -1
- package/lib/module/shipment-request/types.js +0 -4
- package/lib/module/shipment-request/types.js.map +0 -1
- package/lib/module/vehicle-picker/VehiclePicker.js +0 -232
- package/lib/module/vehicle-picker/VehiclePicker.js.map +0 -1
- package/lib/module/vehicle-picker/constants.js +0 -71
- package/lib/module/vehicle-picker/constants.js.map +0 -1
- package/lib/module/vehicle-picker/index.js +0 -6
- package/lib/module/vehicle-picker/index.js.map +0 -1
- package/lib/module/vehicle-picker/messages.js +0 -46
- package/lib/module/vehicle-picker/messages.js.map +0 -1
- package/lib/module/vehicle-picker/shared.js +0 -20
- package/lib/module/vehicle-picker/shared.js.map +0 -1
- package/lib/module/vehicle-picker/types.js +0 -4
- package/lib/module/vehicle-picker/types.js.map +0 -1
- package/lib/typescript/commonjs/carrier-quote/CarrierQuoteCard.d.ts +0 -6
- package/lib/typescript/commonjs/carrier-quote/CarrierQuoteCard.d.ts.map +0 -1
- package/lib/typescript/commonjs/carrier-quote/CarrierQuoteList.d.ts +0 -29
- package/lib/typescript/commonjs/carrier-quote/CarrierQuoteList.d.ts.map +0 -1
- package/lib/typescript/commonjs/carrier-quote/constants.d.ts +0 -55
- package/lib/typescript/commonjs/carrier-quote/constants.d.ts.map +0 -1
- package/lib/typescript/commonjs/carrier-quote/index.d.ts +0 -8
- package/lib/typescript/commonjs/carrier-quote/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/carrier-quote/messages.d.ts +0 -38
- package/lib/typescript/commonjs/carrier-quote/messages.d.ts.map +0 -1
- package/lib/typescript/commonjs/carrier-quote/shared.d.ts +0 -58
- package/lib/typescript/commonjs/carrier-quote/shared.d.ts.map +0 -1
- package/lib/typescript/commonjs/carrier-quote/types.d.ts +0 -191
- package/lib/typescript/commonjs/carrier-quote/types.d.ts.map +0 -1
- package/lib/typescript/commonjs/delivery-slot/DeliverySlotDays.d.ts +0 -28
- package/lib/typescript/commonjs/delivery-slot/DeliverySlotDays.d.ts.map +0 -1
- package/lib/typescript/commonjs/delivery-slot/DeliverySlotOption.d.ts +0 -27
- package/lib/typescript/commonjs/delivery-slot/DeliverySlotOption.d.ts.map +0 -1
- package/lib/typescript/commonjs/delivery-slot/DeliverySlotPicker.d.ts +0 -34
- package/lib/typescript/commonjs/delivery-slot/DeliverySlotPicker.d.ts.map +0 -1
- package/lib/typescript/commonjs/delivery-slot/constants.d.ts +0 -34
- package/lib/typescript/commonjs/delivery-slot/constants.d.ts.map +0 -1
- package/lib/typescript/commonjs/delivery-slot/index.d.ts +0 -8
- package/lib/typescript/commonjs/delivery-slot/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/delivery-slot/messages.d.ts +0 -23
- package/lib/typescript/commonjs/delivery-slot/messages.d.ts.map +0 -1
- package/lib/typescript/commonjs/delivery-slot/shared.d.ts +0 -36
- package/lib/typescript/commonjs/delivery-slot/shared.d.ts.map +0 -1
- package/lib/typescript/commonjs/delivery-slot/types.d.ts +0 -178
- package/lib/typescript/commonjs/delivery-slot/types.d.ts.map +0 -1
- package/lib/typescript/commonjs/earnings/EarningsBreakdown.d.ts +0 -24
- package/lib/typescript/commonjs/earnings/EarningsBreakdown.d.ts.map +0 -1
- package/lib/typescript/commonjs/earnings/EarningsPayoutRow.d.ts +0 -25
- package/lib/typescript/commonjs/earnings/EarningsPayoutRow.d.ts.map +0 -1
- package/lib/typescript/commonjs/earnings/EarningsSummary.d.ts +0 -6
- package/lib/typescript/commonjs/earnings/EarningsSummary.d.ts.map +0 -1
- package/lib/typescript/commonjs/earnings/constants.d.ts +0 -41
- package/lib/typescript/commonjs/earnings/constants.d.ts.map +0 -1
- package/lib/typescript/commonjs/earnings/index.d.ts +0 -9
- package/lib/typescript/commonjs/earnings/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/earnings/messages.d.ts +0 -26
- package/lib/typescript/commonjs/earnings/messages.d.ts.map +0 -1
- package/lib/typescript/commonjs/earnings/shared.d.ts +0 -43
- package/lib/typescript/commonjs/earnings/shared.d.ts.map +0 -1
- package/lib/typescript/commonjs/earnings/types.d.ts +0 -171
- package/lib/typescript/commonjs/earnings/types.d.ts.map +0 -1
- package/lib/typescript/commonjs/job-board/JobBoard.d.ts +0 -38
- package/lib/typescript/commonjs/job-board/JobBoard.d.ts.map +0 -1
- package/lib/typescript/commonjs/job-board/JobCard.d.ts +0 -6
- package/lib/typescript/commonjs/job-board/JobCard.d.ts.map +0 -1
- package/lib/typescript/commonjs/job-board/constants.d.ts +0 -79
- package/lib/typescript/commonjs/job-board/constants.d.ts.map +0 -1
- package/lib/typescript/commonjs/job-board/index.d.ts +0 -8
- package/lib/typescript/commonjs/job-board/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/job-board/messages.d.ts +0 -56
- package/lib/typescript/commonjs/job-board/messages.d.ts.map +0 -1
- package/lib/typescript/commonjs/job-board/shared.d.ts +0 -78
- package/lib/typescript/commonjs/job-board/shared.d.ts.map +0 -1
- package/lib/typescript/commonjs/job-board/types.d.ts +0 -269
- package/lib/typescript/commonjs/job-board/types.d.ts.map +0 -1
- package/lib/typescript/commonjs/proof-of-delivery/ProofOfDelivery.d.ts +0 -51
- package/lib/typescript/commonjs/proof-of-delivery/ProofOfDelivery.d.ts.map +0 -1
- package/lib/typescript/commonjs/proof-of-delivery/SignaturePad.d.ts +0 -6
- package/lib/typescript/commonjs/proof-of-delivery/SignaturePad.d.ts.map +0 -1
- package/lib/typescript/commonjs/proof-of-delivery/constants.d.ts +0 -43
- package/lib/typescript/commonjs/proof-of-delivery/constants.d.ts.map +0 -1
- package/lib/typescript/commonjs/proof-of-delivery/index.d.ts +0 -8
- package/lib/typescript/commonjs/proof-of-delivery/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/proof-of-delivery/messages.d.ts +0 -13
- package/lib/typescript/commonjs/proof-of-delivery/messages.d.ts.map +0 -1
- package/lib/typescript/commonjs/proof-of-delivery/shared.d.ts +0 -79
- package/lib/typescript/commonjs/proof-of-delivery/shared.d.ts.map +0 -1
- package/lib/typescript/commonjs/proof-of-delivery/types.d.ts +0 -165
- package/lib/typescript/commonjs/proof-of-delivery/types.d.ts.map +0 -1
- package/lib/typescript/commonjs/shipment-request/ShipmentLoadPicker.d.ts +0 -32
- package/lib/typescript/commonjs/shipment-request/ShipmentLoadPicker.d.ts.map +0 -1
- package/lib/typescript/commonjs/shipment-request/ShipmentOptionsList.d.ts +0 -5
- package/lib/typescript/commonjs/shipment-request/ShipmentOptionsList.d.ts.map +0 -1
- package/lib/typescript/commonjs/shipment-request/ShipmentRequestForm.d.ts +0 -33
- package/lib/typescript/commonjs/shipment-request/ShipmentRequestForm.d.ts.map +0 -1
- package/lib/typescript/commonjs/shipment-request/constants.d.ts +0 -50
- package/lib/typescript/commonjs/shipment-request/constants.d.ts.map +0 -1
- package/lib/typescript/commonjs/shipment-request/index.d.ts +0 -8
- package/lib/typescript/commonjs/shipment-request/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/shipment-request/messages.d.ts +0 -45
- package/lib/typescript/commonjs/shipment-request/messages.d.ts.map +0 -1
- package/lib/typescript/commonjs/shipment-request/shared.d.ts +0 -40
- package/lib/typescript/commonjs/shipment-request/shared.d.ts.map +0 -1
- package/lib/typescript/commonjs/shipment-request/types.d.ts +0 -219
- package/lib/typescript/commonjs/shipment-request/types.d.ts.map +0 -1
- package/lib/typescript/commonjs/vehicle-picker/VehiclePicker.d.ts +0 -7
- package/lib/typescript/commonjs/vehicle-picker/VehiclePicker.d.ts.map +0 -1
- package/lib/typescript/commonjs/vehicle-picker/constants.d.ts +0 -45
- package/lib/typescript/commonjs/vehicle-picker/constants.d.ts.map +0 -1
- package/lib/typescript/commonjs/vehicle-picker/index.d.ts +0 -6
- package/lib/typescript/commonjs/vehicle-picker/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/vehicle-picker/messages.d.ts +0 -26
- package/lib/typescript/commonjs/vehicle-picker/messages.d.ts.map +0 -1
- package/lib/typescript/commonjs/vehicle-picker/shared.d.ts +0 -19
- package/lib/typescript/commonjs/vehicle-picker/shared.d.ts.map +0 -1
- package/lib/typescript/commonjs/vehicle-picker/types.d.ts +0 -82
- package/lib/typescript/commonjs/vehicle-picker/types.d.ts.map +0 -1
- package/lib/typescript/module/carrier-quote/CarrierQuoteCard.d.ts +0 -6
- package/lib/typescript/module/carrier-quote/CarrierQuoteCard.d.ts.map +0 -1
- package/lib/typescript/module/carrier-quote/CarrierQuoteList.d.ts +0 -29
- package/lib/typescript/module/carrier-quote/CarrierQuoteList.d.ts.map +0 -1
- package/lib/typescript/module/carrier-quote/constants.d.ts +0 -55
- package/lib/typescript/module/carrier-quote/constants.d.ts.map +0 -1
- package/lib/typescript/module/carrier-quote/index.d.ts +0 -8
- package/lib/typescript/module/carrier-quote/index.d.ts.map +0 -1
- package/lib/typescript/module/carrier-quote/messages.d.ts +0 -38
- package/lib/typescript/module/carrier-quote/messages.d.ts.map +0 -1
- package/lib/typescript/module/carrier-quote/shared.d.ts +0 -58
- package/lib/typescript/module/carrier-quote/shared.d.ts.map +0 -1
- package/lib/typescript/module/carrier-quote/types.d.ts +0 -191
- package/lib/typescript/module/carrier-quote/types.d.ts.map +0 -1
- package/lib/typescript/module/delivery-slot/DeliverySlotDays.d.ts +0 -28
- package/lib/typescript/module/delivery-slot/DeliverySlotDays.d.ts.map +0 -1
- package/lib/typescript/module/delivery-slot/DeliverySlotOption.d.ts +0 -27
- package/lib/typescript/module/delivery-slot/DeliverySlotOption.d.ts.map +0 -1
- package/lib/typescript/module/delivery-slot/DeliverySlotPicker.d.ts +0 -34
- package/lib/typescript/module/delivery-slot/DeliverySlotPicker.d.ts.map +0 -1
- package/lib/typescript/module/delivery-slot/constants.d.ts +0 -34
- package/lib/typescript/module/delivery-slot/constants.d.ts.map +0 -1
- package/lib/typescript/module/delivery-slot/index.d.ts +0 -8
- package/lib/typescript/module/delivery-slot/index.d.ts.map +0 -1
- package/lib/typescript/module/delivery-slot/messages.d.ts +0 -23
- package/lib/typescript/module/delivery-slot/messages.d.ts.map +0 -1
- package/lib/typescript/module/delivery-slot/shared.d.ts +0 -36
- package/lib/typescript/module/delivery-slot/shared.d.ts.map +0 -1
- package/lib/typescript/module/delivery-slot/types.d.ts +0 -178
- package/lib/typescript/module/delivery-slot/types.d.ts.map +0 -1
- package/lib/typescript/module/earnings/EarningsBreakdown.d.ts +0 -24
- package/lib/typescript/module/earnings/EarningsBreakdown.d.ts.map +0 -1
- package/lib/typescript/module/earnings/EarningsPayoutRow.d.ts +0 -25
- package/lib/typescript/module/earnings/EarningsPayoutRow.d.ts.map +0 -1
- package/lib/typescript/module/earnings/EarningsSummary.d.ts +0 -6
- package/lib/typescript/module/earnings/EarningsSummary.d.ts.map +0 -1
- package/lib/typescript/module/earnings/constants.d.ts +0 -41
- package/lib/typescript/module/earnings/constants.d.ts.map +0 -1
- package/lib/typescript/module/earnings/index.d.ts +0 -9
- package/lib/typescript/module/earnings/index.d.ts.map +0 -1
- package/lib/typescript/module/earnings/messages.d.ts +0 -26
- package/lib/typescript/module/earnings/messages.d.ts.map +0 -1
- package/lib/typescript/module/earnings/shared.d.ts +0 -43
- package/lib/typescript/module/earnings/shared.d.ts.map +0 -1
- package/lib/typescript/module/earnings/types.d.ts +0 -171
- package/lib/typescript/module/earnings/types.d.ts.map +0 -1
- package/lib/typescript/module/job-board/JobBoard.d.ts +0 -38
- package/lib/typescript/module/job-board/JobBoard.d.ts.map +0 -1
- package/lib/typescript/module/job-board/JobCard.d.ts +0 -6
- package/lib/typescript/module/job-board/JobCard.d.ts.map +0 -1
- package/lib/typescript/module/job-board/constants.d.ts +0 -79
- package/lib/typescript/module/job-board/constants.d.ts.map +0 -1
- package/lib/typescript/module/job-board/index.d.ts +0 -8
- package/lib/typescript/module/job-board/index.d.ts.map +0 -1
- package/lib/typescript/module/job-board/messages.d.ts +0 -56
- package/lib/typescript/module/job-board/messages.d.ts.map +0 -1
- package/lib/typescript/module/job-board/shared.d.ts +0 -78
- package/lib/typescript/module/job-board/shared.d.ts.map +0 -1
- package/lib/typescript/module/job-board/types.d.ts +0 -269
- package/lib/typescript/module/job-board/types.d.ts.map +0 -1
- package/lib/typescript/module/proof-of-delivery/ProofOfDelivery.d.ts +0 -51
- package/lib/typescript/module/proof-of-delivery/ProofOfDelivery.d.ts.map +0 -1
- package/lib/typescript/module/proof-of-delivery/SignaturePad.d.ts +0 -6
- package/lib/typescript/module/proof-of-delivery/SignaturePad.d.ts.map +0 -1
- package/lib/typescript/module/proof-of-delivery/constants.d.ts +0 -43
- package/lib/typescript/module/proof-of-delivery/constants.d.ts.map +0 -1
- package/lib/typescript/module/proof-of-delivery/index.d.ts +0 -8
- package/lib/typescript/module/proof-of-delivery/index.d.ts.map +0 -1
- package/lib/typescript/module/proof-of-delivery/messages.d.ts +0 -13
- package/lib/typescript/module/proof-of-delivery/messages.d.ts.map +0 -1
- package/lib/typescript/module/proof-of-delivery/shared.d.ts +0 -79
- package/lib/typescript/module/proof-of-delivery/shared.d.ts.map +0 -1
- package/lib/typescript/module/proof-of-delivery/types.d.ts +0 -165
- package/lib/typescript/module/proof-of-delivery/types.d.ts.map +0 -1
- package/lib/typescript/module/shipment-request/ShipmentLoadPicker.d.ts +0 -32
- package/lib/typescript/module/shipment-request/ShipmentLoadPicker.d.ts.map +0 -1
- package/lib/typescript/module/shipment-request/ShipmentOptionsList.d.ts +0 -5
- package/lib/typescript/module/shipment-request/ShipmentOptionsList.d.ts.map +0 -1
- package/lib/typescript/module/shipment-request/ShipmentRequestForm.d.ts +0 -33
- package/lib/typescript/module/shipment-request/ShipmentRequestForm.d.ts.map +0 -1
- package/lib/typescript/module/shipment-request/constants.d.ts +0 -50
- package/lib/typescript/module/shipment-request/constants.d.ts.map +0 -1
- package/lib/typescript/module/shipment-request/index.d.ts +0 -8
- package/lib/typescript/module/shipment-request/index.d.ts.map +0 -1
- package/lib/typescript/module/shipment-request/messages.d.ts +0 -45
- package/lib/typescript/module/shipment-request/messages.d.ts.map +0 -1
- package/lib/typescript/module/shipment-request/shared.d.ts +0 -40
- package/lib/typescript/module/shipment-request/shared.d.ts.map +0 -1
- package/lib/typescript/module/shipment-request/types.d.ts +0 -219
- package/lib/typescript/module/shipment-request/types.d.ts.map +0 -1
- package/lib/typescript/module/vehicle-picker/VehiclePicker.d.ts +0 -7
- package/lib/typescript/module/vehicle-picker/VehiclePicker.d.ts.map +0 -1
- package/lib/typescript/module/vehicle-picker/constants.d.ts +0 -45
- package/lib/typescript/module/vehicle-picker/constants.d.ts.map +0 -1
- package/lib/typescript/module/vehicle-picker/index.d.ts +0 -6
- package/lib/typescript/module/vehicle-picker/index.d.ts.map +0 -1
- package/lib/typescript/module/vehicle-picker/messages.d.ts +0 -26
- package/lib/typescript/module/vehicle-picker/messages.d.ts.map +0 -1
- package/lib/typescript/module/vehicle-picker/shared.d.ts +0 -19
- package/lib/typescript/module/vehicle-picker/shared.d.ts.map +0 -1
- package/lib/typescript/module/vehicle-picker/types.d.ts +0 -82
- package/lib/typescript/module/vehicle-picker/types.d.ts.map +0 -1
- package/src/carrier-quote/CarrierQuoteCard.tsx +0 -558
- package/src/carrier-quote/CarrierQuoteList.tsx +0 -271
- package/src/carrier-quote/constants.ts +0 -57
- package/src/carrier-quote/index.ts +0 -28
- package/src/carrier-quote/messages.ts +0 -66
- package/src/carrier-quote/shared.ts +0 -168
- package/src/carrier-quote/types.ts +0 -199
- package/src/delivery-slot/DeliverySlotDays.tsx +0 -91
- package/src/delivery-slot/DeliverySlotOption.tsx +0 -123
- package/src/delivery-slot/DeliverySlotPicker.tsx +0 -275
- package/src/delivery-slot/constants.ts +0 -47
- package/src/delivery-slot/index.ts +0 -24
- package/src/delivery-slot/messages.ts +0 -33
- package/src/delivery-slot/shared.ts +0 -84
- package/src/delivery-slot/types.ts +0 -191
- package/src/earnings/EarningsBreakdown.tsx +0 -75
- package/src/earnings/EarningsPayoutRow.tsx +0 -141
- package/src/earnings/EarningsSummary.tsx +0 -310
- package/src/earnings/constants.ts +0 -61
- package/src/earnings/index.ts +0 -24
- package/src/earnings/messages.ts +0 -45
- package/src/earnings/shared.ts +0 -94
- package/src/earnings/types.ts +0 -180
- package/src/job-board/JobBoard.tsx +0 -514
- package/src/job-board/JobCard.tsx +0 -597
- package/src/job-board/constants.ts +0 -106
- package/src/job-board/index.ts +0 -34
- package/src/job-board/messages.ts +0 -96
- package/src/job-board/shared.ts +0 -215
- package/src/job-board/types.ts +0 -274
- package/src/proof-of-delivery/ProofOfDelivery.tsx +0 -321
- package/src/proof-of-delivery/SignaturePad.tsx +0 -309
- package/src/proof-of-delivery/constants.ts +0 -54
- package/src/proof-of-delivery/index.ts +0 -29
- package/src/proof-of-delivery/messages.ts +0 -43
- package/src/proof-of-delivery/shared.ts +0 -190
- package/src/proof-of-delivery/types.ts +0 -174
- package/src/shipment-request/ShipmentLoadPicker.tsx +0 -249
- package/src/shipment-request/ShipmentOptionsList.tsx +0 -192
- package/src/shipment-request/ShipmentRequestForm.tsx +0 -160
- package/src/shipment-request/constants.ts +0 -138
- package/src/shipment-request/index.ts +0 -37
- package/src/shipment-request/messages.ts +0 -85
- package/src/shipment-request/shared.ts +0 -72
- package/src/shipment-request/types.ts +0 -235
- package/src/vehicle-picker/VehiclePicker.tsx +0 -233
- package/src/vehicle-picker/constants.ts +0 -77
- package/src/vehicle-picker/index.ts +0 -15
- package/src/vehicle-picker/messages.ts +0 -61
- package/src/vehicle-picker/shared.ts +0 -27
- package/src/vehicle-picker/types.ts +0 -86
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
import { memo, useMemo } from 'react';
|
|
2
|
-
import { View, type TextStyle } from 'react-native';
|
|
3
|
-
|
|
4
|
-
import { Chip } from '../chip';
|
|
5
|
-
import { useMessages } from '../locale/messages';
|
|
6
|
-
import { GroupedSection, GroupedSectionItem } from '../grouped-section';
|
|
7
|
-
import { Switch } from '../switch';
|
|
8
|
-
import { TextFieldLabel } from '../text-field';
|
|
9
|
-
import { useTheme } from '../theme/use-theme';
|
|
10
|
-
import { Text } from '../typography';
|
|
11
|
-
import { SHIPMENT_REQUEST_GEOMETRY } from './constants';
|
|
12
|
-
import { SHIPMENT_REQUEST_MESSAGES } from './messages';
|
|
13
|
-
import { joinShipmentName, toggleShipmentExtra } from './shared';
|
|
14
|
-
import type { ShipmentOptionsListProps } from './types';
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* The answers that change what a job costs.
|
|
18
|
-
*
|
|
19
|
-
* Three groups, and the CONTROL is the difference between them:
|
|
20
|
-
*
|
|
21
|
-
* extras independent of each other, so each is a `GroupedSectionItem` with a
|
|
22
|
-
* `Switch` and its own price at the end of the row. A switch is the
|
|
23
|
-
* control for "and also this"
|
|
24
|
-
* access exactly one is true — a place is on the ground, up stairs, or has a
|
|
25
|
-
* lift — so they are a `radiogroup` of chips, and choosing one
|
|
26
|
-
* unchooses the rest without the user having to
|
|
27
|
-
* window the same, over collection times
|
|
28
|
-
*
|
|
29
|
-
* **A PRICE HERE IS A STRING.** `"+€12.00"`, `"Included"` — drawn where the
|
|
30
|
-
* option is and never added to anything. The running total belongs to
|
|
31
|
-
* `PriceSummary`, which is what `ShipmentRequestForm` puts under this.
|
|
32
|
-
*
|
|
33
|
-
* **A SWITCH DRAWS NO TEXT**, so each one is named with its row's title and its
|
|
34
|
-
* price: the caption beside a switch is a SIBLING on both platforms, and a
|
|
35
|
-
* screen reader that reads only the control announces "switch, off".
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
const TABULAR: TextStyle = { fontVariant: ['tabular-nums'] };
|
|
39
|
-
|
|
40
|
-
function ShipmentOptionsListComponent({
|
|
41
|
-
extras,
|
|
42
|
-
selectedExtras = [],
|
|
43
|
-
onExtrasChange,
|
|
44
|
-
accessOptions,
|
|
45
|
-
access = null,
|
|
46
|
-
onAccessChange,
|
|
47
|
-
windows,
|
|
48
|
-
window: windowId = null,
|
|
49
|
-
onWindowChange,
|
|
50
|
-
labels: labelOverrides,
|
|
51
|
-
disabled = false,
|
|
52
|
-
style,
|
|
53
|
-
testID,
|
|
54
|
-
}: ShipmentOptionsListProps) {
|
|
55
|
-
const theme = useTheme();
|
|
56
|
-
const { messages } = useMessages(SHIPMENT_REQUEST_MESSAGES);
|
|
57
|
-
const labels = useMemo(
|
|
58
|
-
() => ({ ...messages.options, ...labelOverrides }),
|
|
59
|
-
[messages, labelOverrides],
|
|
60
|
-
);
|
|
61
|
-
const id = (part: string) => (testID ? `${testID}-${part}` : undefined);
|
|
62
|
-
const chosen = new Set(selectedExtras);
|
|
63
|
-
|
|
64
|
-
const priceText = (price: string | undefined) =>
|
|
65
|
-
price === undefined ? null : (
|
|
66
|
-
<Text
|
|
67
|
-
variant="body-2-medium"
|
|
68
|
-
numberOfLines={1}
|
|
69
|
-
style={[{ color: theme.colors.textSecondary }, TABULAR]}
|
|
70
|
-
>
|
|
71
|
-
{price}
|
|
72
|
-
</Text>
|
|
73
|
-
);
|
|
74
|
-
|
|
75
|
-
return (
|
|
76
|
-
<View testID={testID} style={[{ gap: SHIPMENT_REQUEST_GEOMETRY.controlGap }, style]}>
|
|
77
|
-
{extras?.length ? (
|
|
78
|
-
<View style={{ gap: 8 }} testID={id('extras')}>
|
|
79
|
-
<TextFieldLabel>{labels.extras}</TextFieldLabel>
|
|
80
|
-
<GroupedSection>
|
|
81
|
-
{extras.map((extra) => {
|
|
82
|
-
const on = chosen.has(extra.key);
|
|
83
|
-
const blocked = disabled || extra.disabled === true;
|
|
84
|
-
const name = joinShipmentName([extra.title, extra.description, extra.price]);
|
|
85
|
-
return (
|
|
86
|
-
<GroupedSectionItem
|
|
87
|
-
key={extra.key}
|
|
88
|
-
icon={
|
|
89
|
-
extra.icon ? (
|
|
90
|
-
<extra.icon width={20} height={20} fill={theme.colors.text} />
|
|
91
|
-
) : undefined
|
|
92
|
-
}
|
|
93
|
-
title={extra.title}
|
|
94
|
-
description={extra.description}
|
|
95
|
-
disabled={blocked}
|
|
96
|
-
// The ROW is not the control. A pressable row wrapping a
|
|
97
|
-
// switch is two targets for one answer, and on web the outer
|
|
98
|
-
// one is a button containing a checkbox.
|
|
99
|
-
showChevron={false}
|
|
100
|
-
rightElement={
|
|
101
|
-
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 10 }}>
|
|
102
|
-
{priceText(extra.price)}
|
|
103
|
-
<Switch
|
|
104
|
-
checked={on}
|
|
105
|
-
onCheckedChange={() =>
|
|
106
|
-
onExtrasChange?.(toggleShipmentExtra(extras, selectedExtras, extra.key))
|
|
107
|
-
}
|
|
108
|
-
disabled={blocked}
|
|
109
|
-
accessibilityLabel={name}
|
|
110
|
-
testID={id(`extra-${extra.key}`)}
|
|
111
|
-
/>
|
|
112
|
-
</View>
|
|
113
|
-
}
|
|
114
|
-
/>
|
|
115
|
-
);
|
|
116
|
-
})}
|
|
117
|
-
</GroupedSection>
|
|
118
|
-
</View>
|
|
119
|
-
) : null}
|
|
120
|
-
|
|
121
|
-
{accessOptions?.length ? (
|
|
122
|
-
<View style={{ gap: 8 }}>
|
|
123
|
-
<TextFieldLabel>{labels.access}</TextFieldLabel>
|
|
124
|
-
<View
|
|
125
|
-
collapsable={false}
|
|
126
|
-
role="radiogroup"
|
|
127
|
-
accessibilityLabel={labels.access}
|
|
128
|
-
style={{
|
|
129
|
-
flexDirection: 'row',
|
|
130
|
-
flexWrap: 'wrap',
|
|
131
|
-
gap: SHIPMENT_REQUEST_GEOMETRY.chipGap,
|
|
132
|
-
}}
|
|
133
|
-
testID={id('access')}
|
|
134
|
-
>
|
|
135
|
-
{accessOptions.map((option) => (
|
|
136
|
-
<Chip
|
|
137
|
-
key={option.value}
|
|
138
|
-
role="radio"
|
|
139
|
-
size="xl"
|
|
140
|
-
variant="outlined"
|
|
141
|
-
selected={access === option.value}
|
|
142
|
-
disabled={disabled || option.disabled}
|
|
143
|
-
leadingIcon={option.icon}
|
|
144
|
-
onPress={() => onAccessChange?.(option.value)}
|
|
145
|
-
accessibilityLabel={joinShipmentName([option.label, option.price])}
|
|
146
|
-
testID={id(`access-${option.value}`)}
|
|
147
|
-
>
|
|
148
|
-
{joinShipmentName([option.label, option.price], ' · ')}
|
|
149
|
-
</Chip>
|
|
150
|
-
))}
|
|
151
|
-
</View>
|
|
152
|
-
</View>
|
|
153
|
-
) : null}
|
|
154
|
-
|
|
155
|
-
{windows?.length ? (
|
|
156
|
-
<View style={{ gap: 8 }}>
|
|
157
|
-
<TextFieldLabel>{labels.window}</TextFieldLabel>
|
|
158
|
-
<View
|
|
159
|
-
collapsable={false}
|
|
160
|
-
role="radiogroup"
|
|
161
|
-
accessibilityLabel={labels.window}
|
|
162
|
-
style={{
|
|
163
|
-
flexDirection: 'row',
|
|
164
|
-
flexWrap: 'wrap',
|
|
165
|
-
gap: SHIPMENT_REQUEST_GEOMETRY.chipGap,
|
|
166
|
-
}}
|
|
167
|
-
testID={id('window')}
|
|
168
|
-
>
|
|
169
|
-
{windows.map((option) => (
|
|
170
|
-
<Chip
|
|
171
|
-
key={option.id}
|
|
172
|
-
role="radio"
|
|
173
|
-
size="xl"
|
|
174
|
-
variant="outlined"
|
|
175
|
-
selected={windowId === option.id}
|
|
176
|
-
disabled={disabled || option.disabled}
|
|
177
|
-
onPress={() => onWindowChange?.(option.id)}
|
|
178
|
-
accessibilityLabel={joinShipmentName([option.label, option.price])}
|
|
179
|
-
testID={id(`window-${option.id}`)}
|
|
180
|
-
>
|
|
181
|
-
{joinShipmentName([option.label, option.price], ' · ')}
|
|
182
|
-
</Chip>
|
|
183
|
-
))}
|
|
184
|
-
</View>
|
|
185
|
-
</View>
|
|
186
|
-
) : null}
|
|
187
|
-
</View>
|
|
188
|
-
);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
export const ShipmentOptionsList = memo(ShipmentOptionsListComponent);
|
|
192
|
-
ShipmentOptionsList.displayName = 'ShipmentOptionsList';
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import React, { memo, useMemo } from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
|
|
4
|
-
import { useMessages } from '../locale/messages';
|
|
5
|
-
import { PriceSummary } from '../price-breakdown';
|
|
6
|
-
import { RouteStops } from '../route-stops';
|
|
7
|
-
import { SortablePhotoGrid } from '../sortable-media';
|
|
8
|
-
import { FilterSection } from '../stay-filters/FilterSection';
|
|
9
|
-
import { ShipmentLoadPicker } from './ShipmentLoadPicker';
|
|
10
|
-
import { ShipmentOptionsList } from './ShipmentOptionsList';
|
|
11
|
-
import { SHIPMENT_REQUEST_LABELS } from './constants';
|
|
12
|
-
import { SHIPMENT_REQUEST_MESSAGES } from './messages';
|
|
13
|
-
import type { ShipmentRequestFormProps } from './types';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Describing a job: where it goes, what is being moved, what it looks like,
|
|
17
|
-
* what changes the price, and what that price currently is.
|
|
18
|
-
*
|
|
19
|
-
* It is the REGISTER a Bloom multi-part form is written in — one column of
|
|
20
|
-
* sections, each a heading over its controls with a hairline under it, no card
|
|
21
|
-
* per section and no step counter. The one decision it makes is the ORDER, and
|
|
22
|
-
* the order is the order of the questions a carrier needs answered:
|
|
23
|
-
*
|
|
24
|
-
* 1 route `RouteStops` — the origin, the destination, the stops between
|
|
25
|
-
* 2 load `ShipmentLoadPicker` — kind, size, weight, quantity, notes
|
|
26
|
-
* 3 photos `SortablePhotoGrid` — drawn only when `photos` is given
|
|
27
|
-
* 4 options `ShipmentOptionsList` — the answers that move the number
|
|
28
|
-
* 5 price `PriceSummary` — last, so the options and the number they move
|
|
29
|
-
* are on one screen
|
|
30
|
-
*
|
|
31
|
-
* **IT DRAWS NOTHING OF ITS OWN.** Every section is an existing Bloom family
|
|
32
|
-
* handed its props unchanged: there is one component that knows what a route
|
|
33
|
-
* looks like, one that knows what a photo grid looks like, one that knows what
|
|
34
|
-
* an itemised price looks like, and a form that redrew any of them would be a
|
|
35
|
-
* copy that drifts. A section whose props are absent is not drawn — a job that
|
|
36
|
-
* needs no photograph should not be asked for one.
|
|
37
|
-
*
|
|
38
|
-
* **THE LAST SECTION HAS NO RULE UNDER IT**, and the footer sits below it with
|
|
39
|
-
* none either: a divider is a separator between two things, and there is
|
|
40
|
-
* nothing after the last one.
|
|
41
|
-
*/
|
|
42
|
-
|
|
43
|
-
function ShipmentRequestFormComponent({
|
|
44
|
-
route,
|
|
45
|
-
load,
|
|
46
|
-
onLoadChange,
|
|
47
|
-
loadProps,
|
|
48
|
-
photos,
|
|
49
|
-
options,
|
|
50
|
-
price,
|
|
51
|
-
footer,
|
|
52
|
-
labels: labelOverrides,
|
|
53
|
-
disabled = false,
|
|
54
|
-
accessibilityLabel: accessibilityLabelProp,
|
|
55
|
-
style,
|
|
56
|
-
testID,
|
|
57
|
-
}: ShipmentRequestFormProps) {
|
|
58
|
-
const { messages } = useMessages(SHIPMENT_REQUEST_MESSAGES);
|
|
59
|
-
const accessibilityLabel = accessibilityLabelProp ?? messages.shipmentRequest;
|
|
60
|
-
const labels = useMemo(
|
|
61
|
-
() => ({ ...SHIPMENT_REQUEST_LABELS, ...messages.form, ...labelOverrides }),
|
|
62
|
-
[messages, labelOverrides],
|
|
63
|
-
);
|
|
64
|
-
const id = (part: string) => (testID ? `${testID}-${part}` : undefined);
|
|
65
|
-
|
|
66
|
-
// Which sections exist, so the LAST one can drop its rule without every
|
|
67
|
-
// section having to know what follows it.
|
|
68
|
-
const sections: { key: string; title: string; description?: string; content: React.ReactNode }[] =
|
|
69
|
-
[
|
|
70
|
-
{
|
|
71
|
-
key: 'route',
|
|
72
|
-
title: labels.route,
|
|
73
|
-
description: labels.routeDescription,
|
|
74
|
-
content: <RouteStops {...route} testID={route.testID ?? id('route')} />,
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
key: 'load',
|
|
78
|
-
title: labels.load,
|
|
79
|
-
description: labels.loadDescription,
|
|
80
|
-
content: (
|
|
81
|
-
<ShipmentLoadPicker
|
|
82
|
-
{...loadProps}
|
|
83
|
-
value={load}
|
|
84
|
-
onValueChange={onLoadChange}
|
|
85
|
-
disabled={disabled || loadProps?.disabled}
|
|
86
|
-
testID={id('load')}
|
|
87
|
-
/>
|
|
88
|
-
),
|
|
89
|
-
},
|
|
90
|
-
];
|
|
91
|
-
|
|
92
|
-
if (photos) {
|
|
93
|
-
sections.push({
|
|
94
|
-
key: 'photos',
|
|
95
|
-
title: labels.photos,
|
|
96
|
-
description: labels.photosDescription,
|
|
97
|
-
content: (
|
|
98
|
-
<SortablePhotoGrid
|
|
99
|
-
{...photos}
|
|
100
|
-
disabled={disabled || photos.disabled}
|
|
101
|
-
testID={id('photos')}
|
|
102
|
-
/>
|
|
103
|
-
),
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
if (options) {
|
|
108
|
-
sections.push({
|
|
109
|
-
key: 'options',
|
|
110
|
-
title: labels.options,
|
|
111
|
-
description: labels.optionsDescription,
|
|
112
|
-
content: (
|
|
113
|
-
<ShipmentOptionsList
|
|
114
|
-
{...options}
|
|
115
|
-
disabled={disabled || options.disabled}
|
|
116
|
-
testID={id('options')}
|
|
117
|
-
/>
|
|
118
|
-
),
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
if (price) {
|
|
123
|
-
sections.push({
|
|
124
|
-
key: 'price',
|
|
125
|
-
title: labels.price,
|
|
126
|
-
description: labels.priceDescription,
|
|
127
|
-
content: <PriceSummary {...price} testID={id('price')} />,
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
return (
|
|
132
|
-
<View
|
|
133
|
-
collapsable={false}
|
|
134
|
-
testID={testID}
|
|
135
|
-
role="form"
|
|
136
|
-
accessibilityLabel={accessibilityLabel}
|
|
137
|
-
style={style}
|
|
138
|
-
>
|
|
139
|
-
{sections.map((section, index) => (
|
|
140
|
-
<FilterSection
|
|
141
|
-
key={section.key}
|
|
142
|
-
title={section.title}
|
|
143
|
-
description={section.description === '' ? undefined : section.description}
|
|
144
|
-
divider={index < sections.length - 1}
|
|
145
|
-
testID={id(`section-${section.key}`)}
|
|
146
|
-
>
|
|
147
|
-
{section.content}
|
|
148
|
-
</FilterSection>
|
|
149
|
-
))}
|
|
150
|
-
{footer ? (
|
|
151
|
-
<View style={{ paddingTop: 24 }} testID={id('footer')}>
|
|
152
|
-
{footer}
|
|
153
|
-
</View>
|
|
154
|
-
) : null}
|
|
155
|
-
</View>
|
|
156
|
-
);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export const ShipmentRequestForm = memo(ShipmentRequestFormComponent);
|
|
160
|
-
ShipmentRequestForm.displayName = 'ShipmentRequestForm';
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { RiArrowUpDownLine } from '../icons/remix/RiArrowUpDownLine';
|
|
2
|
-
import { RiBox3Line } from '../icons/remix/RiBox3Line';
|
|
3
|
-
import { RiMailLine } from '../icons/remix/RiMailLine';
|
|
4
|
-
import { RiRestaurantLine } from '../icons/remix/RiRestaurantLine';
|
|
5
|
-
import { RiSofaLine } from '../icons/remix/RiSofaLine';
|
|
6
|
-
import { RiStackLine } from '../icons/remix/RiStackLine';
|
|
7
|
-
import { RiStairsLine } from '../icons/remix/RiStairsLine';
|
|
8
|
-
import { RiWalkLine } from '../icons/remix/RiWalkLine';
|
|
9
|
-
import type { BloomIconComponent } from '../icons/icon-component';
|
|
10
|
-
import { SHIPMENT_REQUEST_MESSAGES, type ShipmentRequestMessages } from './messages';
|
|
11
|
-
import type {
|
|
12
|
-
ShipmentAccess,
|
|
13
|
-
ShipmentAccessOption,
|
|
14
|
-
ShipmentLoadKind,
|
|
15
|
-
ShipmentLoadKindOption,
|
|
16
|
-
ShipmentLoadPickerLabels,
|
|
17
|
-
ShipmentLoadSize,
|
|
18
|
-
ShipmentLoadSizeOption,
|
|
19
|
-
ShipmentOptionsLabels,
|
|
20
|
-
ShipmentRequestFormLabels,
|
|
21
|
-
} from './types';
|
|
22
|
-
|
|
23
|
-
const KIND_ORDER: readonly ShipmentLoadKind[] = [
|
|
24
|
-
'envelope',
|
|
25
|
-
'parcel',
|
|
26
|
-
'furniture',
|
|
27
|
-
'pallet',
|
|
28
|
-
'food',
|
|
29
|
-
];
|
|
30
|
-
const KIND_ICON: Record<ShipmentLoadKind, BloomIconComponent> = {
|
|
31
|
-
envelope: RiMailLine,
|
|
32
|
-
parcel: RiBox3Line,
|
|
33
|
-
furniture: RiSofaLine,
|
|
34
|
-
pallet: RiStackLine,
|
|
35
|
-
food: RiRestaurantLine,
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
/** The rungs' one-or-two-letter codes: clothing sizes, read the same in every language. */
|
|
39
|
-
const SIZE_CODE: ReadonlyArray<readonly [ShipmentLoadSize, string]> = [
|
|
40
|
-
['small', 'S'],
|
|
41
|
-
['medium', 'M'],
|
|
42
|
-
['large', 'L'],
|
|
43
|
-
['extraLarge', 'XL'],
|
|
44
|
-
];
|
|
45
|
-
|
|
46
|
-
const ACCESS_ORDER: readonly ShipmentAccess[] = ['ground', 'stairs', 'lift'];
|
|
47
|
-
const ACCESS_ICON: Record<ShipmentAccess, BloomIconComponent> = {
|
|
48
|
-
ground: RiWalkLine,
|
|
49
|
-
stairs: RiStairsLine,
|
|
50
|
-
lift: RiArrowUpDownLine,
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
/** The five built-in kinds in one language's words. */
|
|
54
|
-
export function builtInLoadKinds(
|
|
55
|
-
messages: ShipmentRequestMessages,
|
|
56
|
-
): readonly ShipmentLoadKindOption[] {
|
|
57
|
-
return KIND_ORDER.map((value) => ({ value, ...messages.kinds[value], icon: KIND_ICON[value] }));
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/** The four built-in size rungs in one language's words. */
|
|
61
|
-
export function builtInLoadSizes(
|
|
62
|
-
messages: ShipmentRequestMessages,
|
|
63
|
-
): readonly ShipmentLoadSizeOption[] {
|
|
64
|
-
return SIZE_CODE.map(([value, label]) => ({ value, label, detail: messages.sizes[value] }));
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* The five kinds, in the order a marketplace draws them: the two a bike can
|
|
69
|
-
* take first, then the two that need a van, then food — which is not a size at
|
|
70
|
-
* all but a condition.
|
|
71
|
-
*/
|
|
72
|
-
export const SHIPMENT_LOAD_KINDS: readonly ShipmentLoadKindOption[] = builtInLoadKinds(
|
|
73
|
-
SHIPMENT_REQUEST_MESSAGES.en,
|
|
74
|
-
);
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* The four size rungs.
|
|
78
|
-
*
|
|
79
|
-
* The segments are single letters because they sit in one control at phone
|
|
80
|
-
* width and four words never fit; the sentence each one means is drawn UNDER
|
|
81
|
-
* the control, for the chosen rung only. A control whose options all carry
|
|
82
|
-
* their own sentence is a list, not a segmented control.
|
|
83
|
-
*
|
|
84
|
-
* In English, like the kinds and access words; a picker given no `kinds` or
|
|
85
|
-
* `sizes` draws them in the resolved locale's words.
|
|
86
|
-
*/
|
|
87
|
-
export const SHIPMENT_LOAD_SIZES: readonly ShipmentLoadSizeOption[] = builtInLoadSizes(
|
|
88
|
-
SHIPMENT_REQUEST_MESSAGES.en,
|
|
89
|
-
);
|
|
90
|
-
|
|
91
|
-
/** Ground floor, stairs, lift. One of them is true, so they are a single choice. */
|
|
92
|
-
export const SHIPMENT_ACCESS_OPTIONS: readonly ShipmentAccessOption[] = ACCESS_ORDER.map(
|
|
93
|
-
(value) => ({
|
|
94
|
-
value,
|
|
95
|
-
label: SHIPMENT_REQUEST_MESSAGES.en.access[value],
|
|
96
|
-
icon: ACCESS_ICON[value],
|
|
97
|
-
}),
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
// The default copy below is English and stays exported; the components speak
|
|
101
|
-
// `SHIPMENT_REQUEST_MESSAGES` in the resolved locale.
|
|
102
|
-
const EN = SHIPMENT_REQUEST_MESSAGES.en;
|
|
103
|
-
|
|
104
|
-
/** The load picker's default copy. */
|
|
105
|
-
export const SHIPMENT_LOAD_LABELS: Required<ShipmentLoadPickerLabels> = {
|
|
106
|
-
...EN.load,
|
|
107
|
-
// i18n-exempt: a unit symbol, the same in every language Bloom ships
|
|
108
|
-
weightUnit: 'kg',
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
/** The options list's default copy. */
|
|
112
|
-
export const SHIPMENT_OPTIONS_LABELS: Required<ShipmentOptionsLabels> = EN.options;
|
|
113
|
-
|
|
114
|
-
/** The form's default section headings. */
|
|
115
|
-
export const SHIPMENT_REQUEST_LABELS: Required<ShipmentRequestFormLabels> = {
|
|
116
|
-
...EN.form,
|
|
117
|
-
loadDescription: '',
|
|
118
|
-
priceDescription: '',
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* The picker geometry this family owns.
|
|
123
|
-
*
|
|
124
|
-
* The SECTION geometry is deliberately absent: `ShipmentRequestForm` draws its
|
|
125
|
-
* sections with `FilterSection`, which already owns the inset, the heading gap
|
|
126
|
-
* and the rule between two sections. A second set of numbers here would be a
|
|
127
|
-
* copy that drifts from the one actually drawn.
|
|
128
|
-
*/
|
|
129
|
-
export const SHIPMENT_REQUEST_GEOMETRY = {
|
|
130
|
-
controlGap: 20,
|
|
131
|
-
chipGap: 8,
|
|
132
|
-
/** The weight field's width beside the stepper on a wide form. */
|
|
133
|
-
weightWidth: 180,
|
|
134
|
-
/** The form's OWN width under which the paired controls stack. */
|
|
135
|
-
narrowWidth: 480,
|
|
136
|
-
} as const;
|
|
137
|
-
|
|
138
|
-
export type ShipmentRequestGeometry = typeof SHIPMENT_REQUEST_GEOMETRY;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export { ShipmentLoadPicker } from './ShipmentLoadPicker';
|
|
2
|
-
export { ShipmentOptionsList } from './ShipmentOptionsList';
|
|
3
|
-
export { ShipmentRequestForm } from './ShipmentRequestForm';
|
|
4
|
-
export {
|
|
5
|
-
SHIPMENT_ACCESS_OPTIONS,
|
|
6
|
-
SHIPMENT_LOAD_KINDS,
|
|
7
|
-
SHIPMENT_LOAD_LABELS,
|
|
8
|
-
SHIPMENT_LOAD_SIZES,
|
|
9
|
-
SHIPMENT_OPTIONS_LABELS,
|
|
10
|
-
SHIPMENT_REQUEST_GEOMETRY,
|
|
11
|
-
SHIPMENT_REQUEST_LABELS,
|
|
12
|
-
} from './constants';
|
|
13
|
-
export type { ShipmentRequestGeometry } from './constants';
|
|
14
|
-
export {
|
|
15
|
-
isShipmentLoadComplete,
|
|
16
|
-
joinShipmentName,
|
|
17
|
-
sanitizeWeight,
|
|
18
|
-
toggleShipmentExtra,
|
|
19
|
-
} from './shared';
|
|
20
|
-
export type {
|
|
21
|
-
ShipmentAccess,
|
|
22
|
-
ShipmentAccessOption,
|
|
23
|
-
ShipmentExtra,
|
|
24
|
-
ShipmentLoad,
|
|
25
|
-
ShipmentLoadErrors,
|
|
26
|
-
ShipmentLoadKind,
|
|
27
|
-
ShipmentLoadKindOption,
|
|
28
|
-
ShipmentLoadPickerLabels,
|
|
29
|
-
ShipmentLoadPickerProps,
|
|
30
|
-
ShipmentLoadSize,
|
|
31
|
-
ShipmentLoadSizeOption,
|
|
32
|
-
ShipmentOptionsLabels,
|
|
33
|
-
ShipmentOptionsListProps,
|
|
34
|
-
ShipmentRequestFormLabels,
|
|
35
|
-
ShipmentRequestFormProps,
|
|
36
|
-
ShipmentTimeWindow,
|
|
37
|
-
} from './types';
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { defineMessages, type MessageCatalog } from '../locale/messages';
|
|
2
|
-
import { plural } from '../locale/plural';
|
|
3
|
-
import type { ShipmentAccess, ShipmentLoadKind, ShipmentLoadSize } from './types';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Every fixed string the shipment-request family draws or announces — its
|
|
7
|
-
* headings and the built-in kinds, sizes and access words — in each Bloom
|
|
8
|
-
* language. The weight unit is a symbol and stays `kg`. A caller's `labels`,
|
|
9
|
-
* `kinds`, `sizes`, `accessOptions` and `accessibilityLabel` still win.
|
|
10
|
-
*/
|
|
11
|
-
export interface ShipmentRequestMessages {
|
|
12
|
-
kinds: Record<ShipmentLoadKind, { label: string; description: string }>;
|
|
13
|
-
/** The sentence under the size control for the chosen rung. */
|
|
14
|
-
sizes: Record<ShipmentLoadSize, string>;
|
|
15
|
-
access: Record<ShipmentAccess, string>;
|
|
16
|
-
load: {
|
|
17
|
-
kind: string;
|
|
18
|
-
size: string;
|
|
19
|
-
weight: string;
|
|
20
|
-
quantity: string;
|
|
21
|
-
quantityValue: (quantity: number) => string;
|
|
22
|
-
notes: string;
|
|
23
|
-
notesPlaceholder: string;
|
|
24
|
-
};
|
|
25
|
-
options: { extras: string; access: string; window: string };
|
|
26
|
-
form: {
|
|
27
|
-
route: string;
|
|
28
|
-
routeDescription: string;
|
|
29
|
-
load: string;
|
|
30
|
-
photos: string;
|
|
31
|
-
photosDescription: string;
|
|
32
|
-
options: string;
|
|
33
|
-
optionsDescription: string;
|
|
34
|
-
price: string;
|
|
35
|
-
};
|
|
36
|
-
/** Names the form. */
|
|
37
|
-
shipmentRequest: string;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export const SHIPMENT_REQUEST_MESSAGES: MessageCatalog<ShipmentRequestMessages> =
|
|
41
|
-
defineMessages<ShipmentRequestMessages>('SHIPMENT_REQUEST_MESSAGES', {
|
|
42
|
-
kinds: {
|
|
43
|
-
envelope: { label: 'Envelope', description: 'Documents, keys, anything flat.' },
|
|
44
|
-
parcel: { label: 'Parcel', description: 'A box or a bag one person can carry.' },
|
|
45
|
-
furniture: {
|
|
46
|
-
label: 'Furniture',
|
|
47
|
-
description: 'A sofa, a table, a mattress — two people at both ends.',
|
|
48
|
-
},
|
|
49
|
-
pallet: { label: 'Pallet', description: 'Wrapped and stacked, moved with a tail lift.' },
|
|
50
|
-
food: { label: 'Food', description: 'A restaurant run, kept at temperature.' },
|
|
51
|
-
},
|
|
52
|
-
sizes: {
|
|
53
|
-
small: 'Up to a shoebox — 35 × 25 × 20 cm.',
|
|
54
|
-
medium: 'Up to a cabin bag — 55 × 40 × 25 cm.',
|
|
55
|
-
large: 'Up to a washing machine — 85 × 60 × 60 cm.',
|
|
56
|
-
extraLarge: 'Bigger than that — tell us in the notes.',
|
|
57
|
-
},
|
|
58
|
-
access: { ground: 'Ground floor', stairs: 'Stairs', lift: 'Lift' },
|
|
59
|
-
load: {
|
|
60
|
-
kind: 'What are we moving?',
|
|
61
|
-
size: 'Size',
|
|
62
|
-
weight: 'Weight',
|
|
63
|
-
quantity: 'How many',
|
|
64
|
-
quantityValue: (n) => plural('en', n, { one: '{n} item', other: '{n} items' }),
|
|
65
|
-
notes: 'Anything else the carrier should know?',
|
|
66
|
-
notesPlaceholder: 'Fragile, a lift code, where to leave it…',
|
|
67
|
-
},
|
|
68
|
-
options: {
|
|
69
|
-
extras: 'Extras',
|
|
70
|
-
access: 'Access at both ends',
|
|
71
|
-
window: 'When should it be collected?',
|
|
72
|
-
},
|
|
73
|
-
form: {
|
|
74
|
-
route: 'Where it goes',
|
|
75
|
-
routeDescription: 'Pick-up first, drop-off last.',
|
|
76
|
-
load: 'The load',
|
|
77
|
-
photos: 'Photos',
|
|
78
|
-
photosDescription:
|
|
79
|
-
'A photo of the load is the single biggest thing you can do for the quotes you get back.',
|
|
80
|
-
options: 'Options',
|
|
81
|
-
optionsDescription: 'Each of these changes the price.',
|
|
82
|
-
price: 'Price',
|
|
83
|
-
},
|
|
84
|
-
shipmentRequest: 'Shipment request',
|
|
85
|
-
});
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The pure decisions `shipment-request` makes, kept out of the render so each
|
|
3
|
-
* one can be walked at its boundary.
|
|
4
|
-
*/
|
|
5
|
-
import type { ShipmentLoad } from './types';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* What a weight field KEEPS of what was typed.
|
|
9
|
-
*
|
|
10
|
-
* Digits, and one decimal separator — a comma is accepted and emitted as a dot,
|
|
11
|
-
* because half of Europe types one and no app wants to parse both. Everything
|
|
12
|
-
* else goes, including the unit: `"18,5 kg"` is `"18.5"`. The unit is drawn
|
|
13
|
-
* beside the field and never stored, so an app parses a number rather than a
|
|
14
|
-
* sentence.
|
|
15
|
-
*
|
|
16
|
-
* A leading separator becomes `"0."`, because `".5"` is a number a person means
|
|
17
|
-
* and `Number('.5')` happening to work is not a reason to store it that way.
|
|
18
|
-
*/
|
|
19
|
-
export function sanitizeWeight(text: string): string {
|
|
20
|
-
const cleaned = text.replace(/,/g, '.').replace(/[^\d.]/g, '');
|
|
21
|
-
const firstDot = cleaned.indexOf('.');
|
|
22
|
-
if (firstDot === -1) return cleaned;
|
|
23
|
-
const head = cleaned.slice(0, firstDot);
|
|
24
|
-
const tail = cleaned.slice(firstDot + 1).replace(/\./g, '');
|
|
25
|
-
return `${head === '' ? '0' : head}.${tail}`;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Whether the load has been described enough to ask for quotes.
|
|
30
|
-
*
|
|
31
|
-
* It is the FORM's question, not the app's: an app that prices a job has its
|
|
32
|
-
* own rules, and this only answers whether every control the picker draws has
|
|
33
|
-
* been answered. Exported so a submit button can be disabled from the same
|
|
34
|
-
* decision the picker makes, rather than from a second copy of it.
|
|
35
|
-
*/
|
|
36
|
-
export function isShipmentLoadComplete(load: ShipmentLoad): boolean {
|
|
37
|
-
return (
|
|
38
|
-
load.kind !== null &&
|
|
39
|
-
load.size !== null &&
|
|
40
|
-
load.weight.trim() !== '' &&
|
|
41
|
-
Number(load.weight) > 0 &&
|
|
42
|
-
load.quantity >= 1
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* The next selection of extras, in the OPTIONS' order.
|
|
48
|
-
*
|
|
49
|
-
* Reporting in the options' order rather than the tap order means the value is
|
|
50
|
-
* stable: a form that round-trips through a server does not reorder its own
|
|
51
|
-
* switches, and two equal selections compare equal.
|
|
52
|
-
*/
|
|
53
|
-
export function toggleShipmentExtra(
|
|
54
|
-
options: readonly { key: string }[],
|
|
55
|
-
selected: readonly string[],
|
|
56
|
-
key: string,
|
|
57
|
-
): string[] {
|
|
58
|
-
const next = new Set(selected);
|
|
59
|
-
if (next.has(key)) next.delete(key);
|
|
60
|
-
else next.add(key);
|
|
61
|
-
return options.map((option) => option.key).filter((candidate) => next.has(candidate));
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/** Joins the non-empty parts of an accessible name. */
|
|
65
|
-
export function joinShipmentName(
|
|
66
|
-
parts: ReadonlyArray<string | false | null | undefined>,
|
|
67
|
-
separator = ', ',
|
|
68
|
-
): string {
|
|
69
|
-
return parts
|
|
70
|
-
.filter((part): part is string => typeof part === 'string' && part !== '')
|
|
71
|
-
.join(separator);
|
|
72
|
-
}
|