@scrumble-nl/gatherer-frontend 1.3.1-beta.3 → 1.4.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -25
- package/lib/module/context/gatherer-context.js +22 -14
- package/lib/module/context/gatherer-context.js.map +1 -1
- package/lib/module/context/scan-context.js +7 -3
- package/lib/module/context/scan-context.js.map +1 -1
- package/lib/module/hooks/use-gatherer.js +3 -1
- package/lib/module/hooks/use-gatherer.js.map +1 -1
- package/lib/module/hooks/use-pick-item-switch.js +4 -2
- package/lib/module/hooks/use-pick-item-switch.js.map +1 -1
- package/lib/module/hooks/use-scanner.js +3 -1
- package/lib/module/hooks/use-scanner.js.map +1 -1
- package/lib/module/index.js +7 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/lang/en/components/pick-list.js +2 -0
- package/lib/module/lang/en/components/pick-list.js.map +1 -1
- package/lib/module/lang/en/components/picker.js +2 -0
- package/lib/module/lang/en/components/picker.js.map +1 -1
- package/lib/module/lang/en/english.js +4 -2
- package/lib/module/lang/en/english.js.map +1 -1
- package/lib/module/lang/i18n.js +4 -3
- package/lib/module/lang/i18n.js.map +1 -1
- package/lib/module/lang/nl/components/pick-list.js +2 -0
- package/lib/module/lang/nl/components/pick-list.js.map +1 -1
- package/lib/module/lang/nl/components/picker.js +2 -0
- package/lib/module/lang/nl/components/picker.js.map +1 -1
- package/lib/module/lang/nl/dutch.js +4 -2
- package/lib/module/lang/nl/dutch.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/module/pick-list/partials/empty-list.js +11 -6
- package/lib/module/pick-list/partials/empty-list.js.map +1 -1
- package/lib/module/pick-list/partials/pick-group-item.js +24 -13
- package/lib/module/pick-list/partials/pick-group-item.js.map +1 -1
- package/lib/module/pick-list/partials/search.js +34 -28
- package/lib/module/pick-list/partials/search.js.map +1 -1
- package/lib/module/pick-list/pick-list.js +12 -9
- package/lib/module/pick-list/pick-list.js.map +1 -1
- package/lib/module/pick-list/styles/empty-list-styles.js +3 -1
- package/lib/module/pick-list/styles/empty-list-styles.js.map +1 -1
- package/lib/module/pick-list/styles/pick-group-item-styles.js +3 -1
- package/lib/module/pick-list/styles/pick-group-item-styles.js.map +1 -1
- package/lib/module/pick-list/styles/search-styles.js +3 -1
- package/lib/module/pick-list/styles/search-styles.js.map +1 -1
- package/lib/module/picker/partials/modal/pick-modal.js +24 -16
- package/lib/module/picker/partials/modal/pick-modal.js.map +1 -1
- package/lib/module/picker/partials/modal/pick-quantity-select.js +51 -38
- package/lib/module/picker/partials/modal/pick-quantity-select.js.map +1 -1
- package/lib/module/picker/partials/pick-amount.js +17 -11
- package/lib/module/picker/partials/pick-amount.js.map +1 -1
- package/lib/module/picker/partials/product-info.js +21 -15
- package/lib/module/picker/partials/product-info.js.map +1 -1
- package/lib/module/picker/partials/progress-bar.js +21 -15
- package/lib/module/picker/partials/progress-bar.js.map +1 -1
- package/lib/module/picker/picker.js +21 -22
- package/lib/module/picker/picker.js.map +1 -1
- package/lib/module/picker/styles/pick-amount-styles.js +3 -1
- package/lib/module/picker/styles/pick-amount-styles.js.map +1 -1
- package/lib/module/picker/styles/pick-modal-styles.js +3 -1
- package/lib/module/picker/styles/pick-modal-styles.js.map +1 -1
- package/lib/module/picker/styles/picker-styles.js +2 -0
- package/lib/module/picker/styles/picker-styles.js.map +1 -1
- package/lib/module/picker/styles/product-info-styles.js +3 -1
- package/lib/module/picker/styles/product-info-styles.js.map +1 -1
- package/lib/module/picker/styles/progress-bar-styles.js +3 -1
- package/lib/module/picker/styles/progress-bar-styles.js.map +1 -1
- package/lib/module/shared/api/api-urls.js +2 -0
- package/lib/module/shared/api/api-urls.js.map +1 -1
- package/lib/module/shared/badge/badge.js +12 -7
- package/lib/module/shared/badge/badge.js.map +1 -1
- package/lib/module/shared/badge/styles/badge-styles.js +3 -1
- package/lib/module/shared/badge/styles/badge-styles.js.map +1 -1
- package/lib/module/shared/constants.js +2 -0
- package/lib/module/shared/constants.js.map +1 -1
- package/lib/module/shared/default-pick-group-item.js +17 -13
- package/lib/module/shared/default-pick-group-item.js.map +1 -1
- package/lib/module/shared/layout/data-column.js +14 -9
- package/lib/module/shared/layout/data-column.js.map +1 -1
- package/lib/module/shared/layout/data-format.js +8 -4
- package/lib/module/shared/layout/data-format.js.map +1 -1
- package/lib/module/shared/layout/data-row.js +16 -12
- package/lib/module/shared/layout/data-row.js.map +1 -1
- package/lib/module/shared/layout/styles/layout-styles.js +3 -1
- package/lib/module/shared/layout/styles/layout-styles.js.map +1 -1
- package/lib/module/shared/press-button/press-button.js +9 -5
- package/lib/module/shared/press-button/press-button.js.map +1 -1
- package/lib/module/types/badge/badge.d.js +1 -1
- package/lib/module/types/badge/badge.d.js.map +1 -1
- package/lib/module/types/config/config.d.js +1 -1
- package/lib/module/types/config/config.d.js.map +1 -1
- package/lib/module/types/control/control.d.js +1 -1
- package/lib/module/types/control/control.d.js.map +1 -1
- package/lib/module/types/pick-group/pick-group.d.js +1 -1
- package/lib/module/types/pick-group/pick-group.d.js.map +1 -1
- package/lib/module/types/pick-group/search-params.d.js +1 -1
- package/lib/module/types/pick-group/search-params.d.js.map +1 -1
- package/lib/module/types/pick-item/pick-item.d.js +1 -1
- package/lib/module/types/pick-item/pick-item.d.js.map +1 -1
- package/lib/module/types/scanner/scanner.d.js +1 -1
- package/lib/module/types/scanner/scanner.d.js.map +1 -1
- package/lib/typescript/context/gatherer-context.d.ts +3 -1
- package/lib/typescript/context/gatherer-context.d.ts.map +1 -0
- package/lib/typescript/context/scan-context.d.ts +2 -1
- package/lib/typescript/context/scan-context.d.ts.map +1 -0
- package/lib/typescript/hooks/use-gatherer.d.ts +3 -2
- package/lib/typescript/hooks/use-gatherer.d.ts.map +1 -0
- package/lib/typescript/hooks/use-pick-item-switch.d.ts +1 -0
- package/lib/typescript/hooks/use-pick-item-switch.d.ts.map +1 -0
- package/lib/typescript/hooks/use-scanner.d.ts +1 -0
- package/lib/typescript/hooks/use-scanner.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/lang/en/components/pick-list.d.ts +1 -0
- package/lib/typescript/lang/en/components/pick-list.d.ts.map +1 -0
- package/lib/typescript/lang/en/components/picker.d.ts +1 -0
- package/lib/typescript/lang/en/components/picker.d.ts.map +1 -0
- package/lib/typescript/lang/en/english.d.ts +1 -0
- package/lib/typescript/lang/en/english.d.ts.map +1 -0
- package/lib/typescript/lang/i18n.d.ts +1 -0
- package/lib/typescript/lang/i18n.d.ts.map +1 -0
- package/lib/typescript/lang/nl/components/pick-list.d.ts +1 -0
- package/lib/typescript/lang/nl/components/pick-list.d.ts.map +1 -0
- package/lib/typescript/lang/nl/components/picker.d.ts +1 -0
- package/lib/typescript/lang/nl/components/picker.d.ts.map +1 -0
- package/lib/typescript/lang/nl/dutch.d.ts +1 -0
- package/lib/typescript/lang/nl/dutch.d.ts.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/pick-list/partials/empty-list.d.ts +3 -1
- package/lib/typescript/pick-list/partials/empty-list.d.ts.map +1 -0
- package/lib/typescript/pick-list/partials/pick-group-item.d.ts +3 -1
- package/lib/typescript/pick-list/partials/pick-group-item.d.ts.map +1 -0
- package/lib/typescript/pick-list/partials/search.d.ts +3 -1
- package/lib/typescript/pick-list/partials/search.d.ts.map +1 -0
- package/lib/typescript/pick-list/pick-list.d.ts +3 -1
- package/lib/typescript/pick-list/pick-list.d.ts.map +1 -0
- package/lib/typescript/pick-list/styles/empty-list-styles.d.ts +1 -0
- package/lib/typescript/pick-list/styles/empty-list-styles.d.ts.map +1 -0
- package/lib/typescript/pick-list/styles/pick-group-item-styles.d.ts +1 -0
- package/lib/typescript/pick-list/styles/pick-group-item-styles.d.ts.map +1 -0
- package/lib/typescript/pick-list/styles/search-styles.d.ts +1 -0
- package/lib/typescript/pick-list/styles/search-styles.d.ts.map +1 -0
- package/lib/typescript/picker/partials/modal/pick-modal.d.ts +3 -1
- package/lib/typescript/picker/partials/modal/pick-modal.d.ts.map +1 -0
- package/lib/typescript/picker/partials/modal/pick-quantity-select.d.ts +3 -1
- package/lib/typescript/picker/partials/modal/pick-quantity-select.d.ts.map +1 -0
- package/lib/typescript/picker/partials/pick-amount.d.ts +3 -1
- package/lib/typescript/picker/partials/pick-amount.d.ts.map +1 -0
- package/lib/typescript/picker/partials/product-info.d.ts +3 -2
- package/lib/typescript/picker/partials/product-info.d.ts.map +1 -0
- package/lib/typescript/picker/partials/progress-bar.d.ts +3 -1
- package/lib/typescript/picker/partials/progress-bar.d.ts.map +1 -0
- package/lib/typescript/picker/picker.d.ts +10 -9
- package/lib/typescript/picker/picker.d.ts.map +1 -0
- package/lib/typescript/picker/styles/pick-amount-styles.d.ts +1 -0
- package/lib/typescript/picker/styles/pick-amount-styles.d.ts.map +1 -0
- package/lib/typescript/picker/styles/pick-modal-styles.d.ts +4 -3
- package/lib/typescript/picker/styles/pick-modal-styles.d.ts.map +1 -0
- package/lib/typescript/picker/styles/picker-styles.d.ts +1 -0
- package/lib/typescript/picker/styles/picker-styles.d.ts.map +1 -0
- package/lib/typescript/picker/styles/product-info-styles.d.ts +1 -0
- package/lib/typescript/picker/styles/product-info-styles.d.ts.map +1 -0
- package/lib/typescript/picker/styles/progress-bar-styles.d.ts +1 -0
- package/lib/typescript/picker/styles/progress-bar-styles.d.ts.map +1 -0
- package/lib/typescript/shared/api/api-urls.d.ts +8 -7
- package/lib/typescript/shared/api/api-urls.d.ts.map +1 -0
- package/lib/typescript/shared/badge/badge.d.ts +4 -3
- package/lib/typescript/shared/badge/badge.d.ts.map +1 -0
- package/lib/typescript/shared/badge/styles/badge-styles.d.ts +1 -0
- package/lib/typescript/shared/badge/styles/badge-styles.d.ts.map +1 -0
- package/lib/typescript/shared/constants.d.ts +1 -0
- package/lib/typescript/shared/constants.d.ts.map +1 -0
- package/lib/typescript/shared/default-pick-group-item.d.ts +2 -1
- package/lib/typescript/shared/default-pick-group-item.d.ts.map +1 -0
- package/lib/typescript/shared/layout/data-column.d.ts +4 -2
- package/lib/typescript/shared/layout/data-column.d.ts.map +1 -0
- package/lib/typescript/shared/layout/data-format.d.ts +4 -2
- package/lib/typescript/shared/layout/data-format.d.ts.map +1 -0
- package/lib/typescript/shared/layout/data-row.d.ts +5 -3
- package/lib/typescript/shared/layout/data-row.d.ts.map +1 -0
- package/lib/typescript/shared/layout/styles/layout-styles.d.ts +3 -2
- package/lib/typescript/shared/layout/styles/layout-styles.d.ts.map +1 -0
- package/lib/typescript/shared/press-button/press-button.d.ts +3 -2
- package/lib/typescript/shared/press-button/press-button.d.ts.map +1 -0
- package/package.json +32 -42
- package/src/context/gatherer-context.tsx +7 -5
- package/src/context/scan-context.tsx +1 -1
- package/src/hooks/use-gatherer.tsx +2 -3
- package/src/hooks/use-pick-item-switch.tsx +2 -2
- package/src/lang/i18n.ts +0 -1
- package/src/pick-list/partials/empty-list.tsx +1 -1
- package/src/pick-list/partials/pick-group-item.tsx +1 -1
- package/src/pick-list/partials/search.tsx +1 -1
- package/src/pick-list/pick-list.tsx +2 -2
- package/src/picker/partials/modal/pick-modal.tsx +1 -1
- package/src/picker/partials/modal/pick-quantity-select.tsx +2 -3
- package/src/picker/partials/pick-amount.tsx +1 -1
- package/src/picker/partials/product-info.tsx +1 -1
- package/src/picker/partials/progress-bar.tsx +1 -1
- package/src/picker/picker.tsx +4 -11
- package/src/shared/badge/badge.tsx +2 -4
- package/src/shared/default-pick-group-item.ts +15 -13
- package/src/shared/layout/data-column.tsx +3 -3
- package/src/shared/layout/data-format.tsx +3 -3
- package/src/shared/layout/data-row.tsx +4 -4
- package/src/shared/press-button/press-button.tsx +1 -1
- package/src/types/config/config.d.ts +8 -6
- package/src/types/control/control.d.ts +1 -1
- package/lib/commonjs/context/gatherer-context.js +0 -89
- package/lib/commonjs/context/gatherer-context.js.map +0 -1
- package/lib/commonjs/context/scan-context.js +0 -18
- package/lib/commonjs/context/scan-context.js.map +0 -1
- package/lib/commonjs/hooks/use-gatherer.js +0 -13
- package/lib/commonjs/hooks/use-gatherer.js.map +0 -1
- package/lib/commonjs/hooks/use-pick-item-switch.js +0 -52
- package/lib/commonjs/hooks/use-pick-item-switch.js.map +0 -1
- package/lib/commonjs/hooks/use-scanner.js +0 -33
- package/lib/commonjs/hooks/use-scanner.js.map +0 -1
- package/lib/commonjs/index.js +0 -41
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/lang/en/components/pick-list.js +0 -14
- package/lib/commonjs/lang/en/components/pick-list.js.map +0 -1
- package/lib/commonjs/lang/en/components/picker.js +0 -16
- package/lib/commonjs/lang/en/components/picker.js.map +0 -1
- package/lib/commonjs/lang/en/english.js +0 -16
- package/lib/commonjs/lang/en/english.js.map +0 -1
- package/lib/commonjs/lang/i18n.js +0 -27
- package/lib/commonjs/lang/i18n.js.map +0 -1
- package/lib/commonjs/lang/nl/components/pick-list.js +0 -14
- package/lib/commonjs/lang/nl/components/pick-list.js.map +0 -1
- package/lib/commonjs/lang/nl/components/picker.js +0 -16
- package/lib/commonjs/lang/nl/components/picker.js.map +0 -1
- package/lib/commonjs/lang/nl/dutch.js +0 -16
- package/lib/commonjs/lang/nl/dutch.js.map +0 -1
- package/lib/commonjs/pick-list/partials/empty-list.js +0 -23
- package/lib/commonjs/pick-list/partials/empty-list.js.map +0 -1
- package/lib/commonjs/pick-list/partials/pick-group-item.js +0 -50
- package/lib/commonjs/pick-list/partials/pick-group-item.js.map +0 -1
- package/lib/commonjs/pick-list/partials/search.js +0 -64
- package/lib/commonjs/pick-list/partials/search.js.map +0 -1
- package/lib/commonjs/pick-list/pick-list.js +0 -86
- package/lib/commonjs/pick-list/pick-list.js.map +0 -1
- package/lib/commonjs/pick-list/styles/empty-list-styles.js +0 -19
- package/lib/commonjs/pick-list/styles/empty-list-styles.js.map +0 -1
- package/lib/commonjs/pick-list/styles/pick-group-item-styles.js +0 -28
- package/lib/commonjs/pick-list/styles/pick-group-item-styles.js.map +0 -1
- package/lib/commonjs/pick-list/styles/search-styles.js +0 -34
- package/lib/commonjs/pick-list/styles/search-styles.js.map +0 -1
- package/lib/commonjs/picker/partials/modal/pick-modal.js +0 -47
- package/lib/commonjs/picker/partials/modal/pick-modal.js.map +0 -1
- package/lib/commonjs/picker/partials/modal/pick-quantity-select.js +0 -136
- package/lib/commonjs/picker/partials/modal/pick-quantity-select.js.map +0 -1
- package/lib/commonjs/picker/partials/pick-amount.js +0 -40
- package/lib/commonjs/picker/partials/pick-amount.js.map +0 -1
- package/lib/commonjs/picker/partials/product-info.js +0 -46
- package/lib/commonjs/picker/partials/product-info.js.map +0 -1
- package/lib/commonjs/picker/partials/progress-bar.js +0 -42
- package/lib/commonjs/picker/partials/progress-bar.js.map +0 -1
- package/lib/commonjs/picker/picker.js +0 -100
- package/lib/commonjs/picker/picker.js.map +0 -1
- package/lib/commonjs/picker/styles/pick-amount-styles.js +0 -30
- package/lib/commonjs/picker/styles/pick-amount-styles.js.map +0 -1
- package/lib/commonjs/picker/styles/pick-modal-styles.js +0 -86
- package/lib/commonjs/picker/styles/pick-modal-styles.js.map +0 -1
- package/lib/commonjs/picker/styles/picker-styles.js +0 -14
- package/lib/commonjs/picker/styles/picker-styles.js.map +0 -1
- package/lib/commonjs/picker/styles/product-info-styles.js +0 -30
- package/lib/commonjs/picker/styles/product-info-styles.js.map +0 -1
- package/lib/commonjs/picker/styles/progress-bar-styles.js +0 -18
- package/lib/commonjs/picker/styles/progress-bar-styles.js.map +0 -1
- package/lib/commonjs/shared/api/api-urls.js +0 -22
- package/lib/commonjs/shared/api/api-urls.js.map +0 -1
- package/lib/commonjs/shared/badge/badge.js +0 -44
- package/lib/commonjs/shared/badge/badge.js.map +0 -1
- package/lib/commonjs/shared/badge/styles/badge-styles.js +0 -24
- package/lib/commonjs/shared/badge/styles/badge-styles.js.map +0 -1
- package/lib/commonjs/shared/constants.js +0 -37
- package/lib/commonjs/shared/constants.js.map +0 -1
- package/lib/commonjs/shared/default-pick-group-item.js +0 -22
- package/lib/commonjs/shared/default-pick-group-item.js.map +0 -1
- package/lib/commonjs/shared/layout/data-column.js +0 -26
- package/lib/commonjs/shared/layout/data-column.js.map +0 -1
- package/lib/commonjs/shared/layout/data-format.js +0 -27
- package/lib/commonjs/shared/layout/data-format.js.map +0 -1
- package/lib/commonjs/shared/layout/data-row.js +0 -36
- package/lib/commonjs/shared/layout/data-row.js.map +0 -1
- package/lib/commonjs/shared/layout/styles/layout-styles.js +0 -29
- package/lib/commonjs/shared/layout/styles/layout-styles.js.map +0 -1
- package/lib/commonjs/shared/press-button/press-button.js +0 -34
- package/lib/commonjs/shared/press-button/press-button.js.map +0 -1
- package/lib/commonjs/types/badge/badge.d.js +0 -2
- package/lib/commonjs/types/badge/badge.d.js.map +0 -1
- package/lib/commonjs/types/config/config.d.js +0 -2
- package/lib/commonjs/types/config/config.d.js.map +0 -1
- package/lib/commonjs/types/control/control.d.js +0 -2
- package/lib/commonjs/types/control/control.d.js.map +0 -1
- package/lib/commonjs/types/pick-group/pick-group.d.js +0 -2
- package/lib/commonjs/types/pick-group/pick-group.d.js.map +0 -1
- package/lib/commonjs/types/pick-group/search-params.d.js +0 -2
- package/lib/commonjs/types/pick-group/search-params.d.js.map +0 -1
- package/lib/commonjs/types/pick-item/pick-item.d.js +0 -2
- package/lib/commonjs/types/pick-item/pick-item.d.js.map +0 -1
- package/lib/commonjs/types/scanner/scanner.d.js +0 -2
- package/lib/commonjs/types/scanner/scanner.d.js.map +0 -1
package/README.md
CHANGED
|
@@ -52,21 +52,21 @@ Gatherer frontend comes with a couple of ready-to-use components that are easy t
|
|
|
52
52
|
|
|
53
53
|
### PickList
|
|
54
54
|
|
|
55
|
-
| Prop | Description | Type | Default value
|
|
56
|
-
|
|
57
|
-
| `renderItem` | A component that renders the item in the picklist. When none given a default item will be used based on default back-end parameters | `ListRenderItem<PickGroup>` | `
|
|
58
|
-
| `searchParams` | Searchable params to use for searching in the picklist. When this prop is `undefined` the picklist renders its own search text input | `{searchField: string; searchValue: string}` |
|
|
59
|
-
| `onItemPress` | This is the callback when a user presses on the renderItem in the picklist. This callback only triggers when no `renderItem` is being passed as prop | `(pickGroup: PickGroup) => void` |
|
|
60
|
-
| `isAfterPickList` | Determines which picklist to retrieve from the server (normal or after picklist) | `boolean` | `false`
|
|
55
|
+
| Prop | Description | Type | Default value |
|
|
56
|
+
|--------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------|----------------|
|
|
57
|
+
| `renderItem` | A component that renders the item in the picklist. When none given a default item will be used based on default back-end parameters | `ListRenderItem<PickGroup>` | `ReactElement` |
|
|
58
|
+
| `searchParams` | Searchable params to use for searching in the picklist. When this prop is `undefined` the picklist renders its own search text input | `{searchField: string; searchValue: string}` | |
|
|
59
|
+
| `onItemPress` | This is the callback when a user presses on the renderItem in the picklist. This callback only triggers when no `renderItem` is being passed as prop | `(pickGroup: PickGroup) => void` | |
|
|
60
|
+
| `isAfterPickList` | Determines which picklist to retrieve from the server (normal or after picklist) | `boolean` | `false` |
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
### Picker
|
|
64
64
|
|
|
65
|
-
| Prop | Description | Type
|
|
66
|
-
|
|
67
|
-
| `children` | Children to render in the Picker | `ReactNode`
|
|
68
|
-
| `style` | Styling to apply to the global Picker container | `ViewStyle`
|
|
69
|
-
| `pickModal` | Custom modal to use when multiple of the same item need to be picked | `
|
|
65
|
+
| Prop | Description | Type | Default value |
|
|
66
|
+
|-------------------|-----------------------------------------------------------------------------------|----------------|-----------------|
|
|
67
|
+
| `children` | Children to render in the Picker | `ReactNode` | |
|
|
68
|
+
| `style` | Styling to apply to the global Picker container | `ViewStyle` | `flex: 1` |
|
|
69
|
+
| `pickModal` | Custom modal to use when multiple of the same item need to be picked | `ReactElement` | `<PickModal />` |
|
|
70
70
|
|
|
71
71
|
The picker comes with several build-in ready-to-use child components.
|
|
72
72
|
|
|
@@ -83,14 +83,14 @@ return (
|
|
|
83
83
|
);
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
| Prop | Description | Type
|
|
87
|
-
|
|
88
|
-
| `leftTitle` | Title of the left column | `string`
|
|
89
|
-
| `leftContent` | Content of the left column | <code>
|
|
90
|
-
| `rightTitle` | Title of the right column | `string`
|
|
91
|
-
| `rightContent` | Content of the right column | <code>
|
|
92
|
-
| `rowStyles` | Extra styling applied to the row | `ViewStyle`
|
|
93
|
-
| `columnStyles` | Extra styling applied to both columns | `ViewStyle`
|
|
86
|
+
| Prop | Description | Type | Required? |
|
|
87
|
+
|----------------|---------------------------------------|-------------------------------------------------------|-----------|
|
|
88
|
+
| `leftTitle` | Title of the left column | `string` | `true` |
|
|
89
|
+
| `leftContent` | Content of the left column | <code>ReactElement | string | number</code> | `true` |
|
|
90
|
+
| `rightTitle` | Title of the right column | `string` | `false` |
|
|
91
|
+
| `rightContent` | Content of the right column | <code>ReactElement | string | number</code> | `false` |
|
|
92
|
+
| `rowStyles` | Extra styling applied to the row | `ViewStyle` | `false` |
|
|
93
|
+
| `columnStyles` | Extra styling applied to both columns | `ViewStyle` | `false` |
|
|
94
94
|
|
|
95
95
|
#### Column
|
|
96
96
|
A column to place content in. This is build into `Row` by default.
|
|
@@ -101,11 +101,11 @@ import {Picker} from '@scrumble-nl/gatherer-frontend';
|
|
|
101
101
|
return <Picker.Column title="Title" data="Content" />;
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
| Prop | Description | Type
|
|
105
|
-
|
|
106
|
-
| `title` | Title of the column | `string`
|
|
107
|
-
| `data` | Content of the column | <code>
|
|
108
|
-
| `columnStyles` | Extra styling applied to the column | `ViewStyle`
|
|
104
|
+
| Prop | Description | Type | Required? |
|
|
105
|
+
|----------------|-------------------------------------|-------------------------------------------------------|-----------|
|
|
106
|
+
| `title` | Title of the column | `string` | `true` |
|
|
107
|
+
| `data` | Content of the column | <code>ReactElement | string | number</code> | `true` |
|
|
108
|
+
| `columnStyles` | Extra styling applied to the column | `ViewStyle` | `false` |
|
|
109
109
|
|
|
110
110
|
#### ProgressBar
|
|
111
111
|
A progress bar, usually shown in the bottom of the screen, to track progress when picking items.
|
|
@@ -144,7 +144,7 @@ A complete example of an out-of-the-box picker front-end would look like this:
|
|
|
144
144
|
```typescript jsx
|
|
145
145
|
import {Picker} from '@scrumble-nl/gatherer-frontend';
|
|
146
146
|
|
|
147
|
-
export const App = ()
|
|
147
|
+
export const App = () => {
|
|
148
148
|
return (
|
|
149
149
|
<Picker>
|
|
150
150
|
<Picker.ProductInfo />
|
|
@@ -1,22 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
1
3
|
import React, { createContext, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
2
|
-
import i18n from
|
|
3
|
-
import { ScanContextProvider } from
|
|
4
|
-
import { defaultPickGroupItem } from
|
|
5
|
-
import { NEXT_PICK_ITEM_URL, PREV_PICK_ITEM_URL, START_PICKING_URL } from
|
|
4
|
+
import i18n from "../lang/i18n.js";
|
|
5
|
+
import { ScanContextProvider } from "./scan-context.js";
|
|
6
|
+
import { defaultPickGroupItem } from "../shared/default-pick-group-item.js";
|
|
7
|
+
import { NEXT_PICK_ITEM_URL, PREV_PICK_ITEM_URL, START_PICKING_URL } from "../shared/api/api-urls.js";
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
10
|
export const GathererContext = /*#__PURE__*/createContext({});
|
|
7
|
-
export const GathererContextProvider =
|
|
11
|
+
export const GathererContextProvider = ({
|
|
12
|
+
children,
|
|
13
|
+
config
|
|
14
|
+
}) => {
|
|
8
15
|
const {
|
|
9
16
|
scanImplementation,
|
|
10
17
|
instance,
|
|
11
18
|
onLastPick,
|
|
12
19
|
language,
|
|
13
20
|
parseEan
|
|
14
|
-
} =
|
|
15
|
-
const [pickItem, setPickItem] = useState(defaultPickGroupItem);
|
|
21
|
+
} = config;
|
|
22
|
+
const [pickItem, setPickItem] = useState(() => defaultPickGroupItem());
|
|
16
23
|
const currentPickGroupId = useRef(0);
|
|
17
24
|
useEffect(() => {
|
|
18
|
-
|
|
19
|
-
(_scanImplementation$r = scanImplementation.registerEventListener) === null || _scanImplementation$r === void 0 ? void 0 : _scanImplementation$r.call(scanImplementation);
|
|
25
|
+
scanImplementation.registerEventListener?.();
|
|
20
26
|
}, [scanImplementation]);
|
|
21
27
|
const savePickGroupData = useCallback(data => {
|
|
22
28
|
setPickItem(data);
|
|
@@ -69,10 +75,12 @@ export const GathererContextProvider = props => {
|
|
|
69
75
|
scanImplementation,
|
|
70
76
|
currentPickGroupId: currentPickGroupId.current
|
|
71
77
|
}), [parseEan, instance, onLastPick, pickItem, savePickGroupData, scanImplementation, startPicking, switchPickItem]);
|
|
72
|
-
return /*#__PURE__*/
|
|
73
|
-
value: context
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
78
|
+
return /*#__PURE__*/_jsx(GathererContext.Provider, {
|
|
79
|
+
value: context,
|
|
80
|
+
children: /*#__PURE__*/_jsx(ScanContextProvider, {
|
|
81
|
+
scanner: config.scanImplementation,
|
|
82
|
+
children: children
|
|
83
|
+
})
|
|
84
|
+
});
|
|
77
85
|
};
|
|
78
86
|
//# sourceMappingURL=gatherer-context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","createContext","useCallback","useEffect","useMemo","useRef","useState","i18n","ScanContextProvider","defaultPickGroupItem","NEXT_PICK_ITEM_URL","PREV_PICK_ITEM_URL","START_PICKING_URL","GathererContext","GathererContextProvider","
|
|
1
|
+
{"version":3,"names":["React","createContext","useCallback","useEffect","useMemo","useRef","useState","i18n","ScanContextProvider","defaultPickGroupItem","NEXT_PICK_ITEM_URL","PREV_PICK_ITEM_URL","START_PICKING_URL","jsx","_jsx","GathererContext","GathererContextProvider","children","config","scanImplementation","instance","onLastPick","language","parseEan","pickItem","setPickItem","currentPickGroupId","registerEventListener","savePickGroupData","data","startPicking","pickGroupId","Promise","resolve","reject","post","pick_group_id","then","response","current","catch","switchPickItem","dir","url","prevState","previous","next","pick_item_id","id","changeLanguage","context","Provider","value","scanner"],"sourceRoot":"../../../src","sources":["context/gatherer-context.tsx"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
1
3
|
import React, { createContext } from 'react';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
5
|
export const ScanContext = /*#__PURE__*/createContext({});
|
|
3
6
|
export const ScanContextProvider = props => {
|
|
4
|
-
return /*#__PURE__*/
|
|
5
|
-
value: props.scanner
|
|
6
|
-
|
|
7
|
+
return /*#__PURE__*/_jsx(ScanContext.Provider, {
|
|
8
|
+
value: props.scanner,
|
|
9
|
+
children: props.children
|
|
10
|
+
});
|
|
7
11
|
};
|
|
8
12
|
//# sourceMappingURL=scan-context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","createContext","ScanContext","ScanContextProvider","props","scanner","children"],"
|
|
1
|
+
{"version":3,"names":["React","createContext","jsx","_jsx","ScanContext","ScanContextProvider","props","Provider","value","scanner","children"],"sourceRoot":"../../../src","sources":["context/scan-context.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAGC,aAAa,QAAkB,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAmBtD,OAAO,MAAMC,WAAW,gBAAGH,aAAa,CAAe,CAAC,CAAiB,CAAC;AAE1E,OAAO,MAAMI,mBAAmB,GAAIC,KAAY,IAAK;EACjD,oBAAOH,IAAA,CAACC,WAAW,CAACG,QAAQ;IAACC,KAAK,EAAEF,KAAK,CAACG,OAAQ;IAAAC,QAAA,EAAEJ,KAAK,CAACI;EAAQ,CAAuB,CAAC;AAC9F,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
1
3
|
import { useContext } from 'react';
|
|
2
|
-
import { GathererContext } from
|
|
4
|
+
import { GathererContext } from "../context/gatherer-context.js";
|
|
3
5
|
export const useGatherer = () => {
|
|
4
6
|
return useContext(GathererContext);
|
|
5
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useContext","GathererContext","useGatherer"],"
|
|
1
|
+
{"version":3,"names":["useContext","GathererContext","useGatherer"],"sourceRoot":"../../../src","sources":["hooks/use-gatherer.tsx"],"mappings":";;AAAA,SAAQA,UAAU,QAAO,OAAO;AAEhC,SAAQC,eAAe,QAAyB,gCAA6B;AAE7E,OAAO,MAAMC,WAAW,GAAGA,CAAA,KAAiC;EACxD,OAAOF,UAAU,CAAsBC,eAAe,CAAC;AAC3D,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
1
3
|
import { useCallback } from 'react';
|
|
2
|
-
import { useGatherer } from
|
|
3
|
-
import { SET_ITEM_PICKED_URL } from
|
|
4
|
+
import { useGatherer } from "./use-gatherer.js";
|
|
5
|
+
import { SET_ITEM_PICKED_URL } from "../shared/api/api-urls.js";
|
|
4
6
|
export const usePickItemSwitch = () => {
|
|
5
7
|
const {
|
|
6
8
|
pickItem,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useGatherer","SET_ITEM_PICKED_URL","usePickItemSwitch","pickItem","currentPickGroupId","savePickGroupData","switchPickItem","onLastPick","instance","retrieveNextPickItem","setItemToPicked","quantityPicked","metaData","patch","quantity_picked","pick_group_id","pick_item_id","id","metadata","then","response","data","content","nextPickItem","isSkip","previousPickItem"],"sources":["use-pick-item-switch.tsx"],"
|
|
1
|
+
{"version":3,"names":["useCallback","useGatherer","SET_ITEM_PICKED_URL","usePickItemSwitch","pickItem","currentPickGroupId","savePickGroupData","switchPickItem","onLastPick","instance","retrieveNextPickItem","setItemToPicked","quantityPicked","metaData","patch","quantity_picked","pick_group_id","pick_item_id","id","metadata","then","response","data","content","nextPickItem","isSkip","previousPickItem"],"sourceRoot":"../../../src","sources":["hooks/use-pick-item-switch.tsx"],"mappings":";;AAAA,SAAQA,WAAW,QAAO,OAAO;AAEjC,SAAQC,WAAW,QAAO,mBAAgB;AAC1C,SAAQC,mBAAmB,QAAO,2BAAwB;AAE1D,OAAO,MAAMC,iBAAiB,GAAGA,CAAA,KAAqB;EAClD,MAAM;IAACC,QAAQ;IAAEC,kBAAkB;IAAEC,iBAAiB;IAAEC,cAAc;IAAEC,UAAU;IAAEC;EAAQ,CAAC,GAAGR,WAAW,CAAC,CAAC;EAE7G,MAAMS,oBAAoB,GAAGV,WAAW,CAAC,MAAY;IACjDO,cAAc,CAAC,MAAM,CAAC;EAC1B,CAAC,EAAE,CAACA,cAAc,CAAC,CAAC;EAEpB,MAAMI,eAAe,GAAGX,WAAW,CAC/B,CAACY,cAAuB,EAAEC,QAAiB,KAAW;IAClDJ,QAAQ,CACHK,KAAK,CAACZ,mBAAmB,EAAE;MACxBa,eAAe,EAAEH,cAAc;MAC/BI,aAAa,EAAEX,kBAAkB;MACjCY,YAAY,EAAEb,QAAQ,CAACA,QAAQ,CAACc,EAAE;MAClCC,QAAQ,EAAEN;IACd,CAAC,CAAC,CACDO,IAAI,CAACC,QAAQ,IAAI;MACd,IAAIA,QAAQ,CAACC,IAAI,CAACC,OAAO,KAAK,qBAAqB,EAAE;QACjDf,UAAU,CAAC,CAAC;MAChB,CAAC,MAAM;QACHF,iBAAiB,CAACe,QAAQ,CAACC,IAAI,CAAC;MACpC;IACJ,CAAC,CAAC;EACV,CAAC,EACD,CAACjB,kBAAkB,EAAEI,QAAQ,EAAED,UAAU,EAAEJ,QAAQ,CAACA,QAAQ,CAACc,EAAE,EAAEZ,iBAAiB,CACtF,CAAC;EAED,MAAMkB,YAAY,GAAGxB,WAAW,CAC5B,CAACyB,MAAe,EAAEb,cAAuB,EAAEC,QAAiB,KAAW;IACnE,IAAIY,MAAM,EAAE;MACRf,oBAAoB,CAAC,CAAC;MACtB;IACJ;IAEAC,eAAe,CAACC,cAAc,EAAEC,QAAQ,CAAC;EAC7C,CAAC,EACD,CAACH,oBAAoB,EAAEC,eAAe,CAC1C,CAAC;EAED,MAAMe,gBAAgB,GAAG1B,WAAW,CAAC,MAAY;IAC7CO,cAAc,CAAC,MAAM,CAAC;EAC1B,CAAC,EAAE,CAACA,cAAc,CAAC,CAAC;EAEpB,OAAO;IACHiB,YAAY;IACZE;EACJ,CAAC;AACL,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
1
3
|
import { useCallback, useContext, useEffect, useRef } from 'react';
|
|
2
|
-
import { ScanContext } from
|
|
4
|
+
import { ScanContext } from "../context/scan-context.js";
|
|
3
5
|
export const useScanner = onScan => {
|
|
4
6
|
const {
|
|
5
7
|
registerListener,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useContext","useEffect","useRef","ScanContext","useScanner","onScan","registerListener","clearEventListeners","callbackRef","current","startScanner","event","trimmedScan","data","trim","stopScanner"],"
|
|
1
|
+
{"version":3,"names":["useCallback","useContext","useEffect","useRef","ScanContext","useScanner","onScan","registerListener","clearEventListeners","callbackRef","current","startScanner","event","trimmedScan","data","trim","stopScanner"],"sourceRoot":"../../../src","sources":["hooks/use-scanner.tsx"],"mappings":";;AAAA,SAAQA,WAAW,EAAEC,UAAU,EAAEC,SAAS,EAAEC,MAAM,QAAO,OAAO;AAEhE,SAAsBC,WAAW,QAAO,4BAAyB;AAIjE,OAAO,MAAMC,UAAU,GAAIC,MAAoB,IAAc;EACzD,MAAM;IAACC,gBAAgB;IAAEC;EAAmB,CAAC,GAAGP,UAAU,CAAeG,WAAW,CAAC;EACrF,MAAMK,WAAW,GAAGN,MAAM,CAAeG,MAAM,CAAC;EAEhDJ,SAAS,CAAC,MAAM;IACZO,WAAW,CAACC,OAAO,GAAGJ,MAAM;EAChC,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAEZ,MAAMK,YAAY,GAAGX,WAAW,CAAC,MAAY;IACzCO,gBAAgB,CAACK,KAAK,IAAI;MACtB,MAAMC,WAAW,GAAGD,KAAK,CAACE,IAAI,CAACC,IAAI,CAAC,CAAC;MAErCN,WAAW,CAACC,OAAO,CAACG,WAAW,CAAC;IACpC,CAAC,CAAC;EACN,CAAC,EAAE,CAACN,gBAAgB,CAAC,CAAC;EAEtB,MAAMS,WAAW,GAAGhB,WAAW,CAAC,MAAY;IACxCQ,mBAAmB,CAAC,CAAC;EACzB,CAAC,EAAE,CAACA,mBAAmB,CAAC,CAAC;EAEzB,OAAO;IACHG,YAAY;IACZK;EACJ,CAAC;AACL,CAAC","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export { Picker } from "./picker/picker.js";
|
|
4
|
+
export { PickList } from "./pick-list/pick-list.js";
|
|
5
|
+
export { useGatherer } from "./hooks/use-gatherer.js";
|
|
6
|
+
export { usePickItemSwitch } from "./hooks/use-pick-item-switch.js";
|
|
7
|
+
export { GathererContextProvider } from "./context/gatherer-context.js";
|
|
6
8
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Picker","PickList","useGatherer","usePickItemSwitch","GathererContextProvider"],"
|
|
1
|
+
{"version":3,"names":["Picker","PickList","useGatherer","usePickItemSwitch","GathererContextProvider"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAAQA,MAAM,QAAO,oBAAiB;AACtC,SAAQC,QAAQ,QAAO,0BAAuB;AAC9C,SAAQC,WAAW,QAAO,yBAAsB;AAChD,SAAQC,iBAAiB,QAAO,iCAA8B;AAC9D,SAAQC,uBAAuB,QAAO,+BAA4B","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["pickList"],"
|
|
1
|
+
{"version":3,"names":["pickList"],"sourceRoot":"../../../../../src","sources":["lang/en/components/pick-list.ts"],"mappings":";;AAAA,OAAO,MAAMA,QAAQ,GAAG;EACpB,8BAA8B,EAAE,kBAAkB;EAClD,gCAAgC,EAAE,eAAe;EACjD,+BAA+B,EAAE,QAAQ;EACzC,gCAAgC,EAAE;AACtC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["picker"],"
|
|
1
|
+
{"version":3,"names":["picker"],"sourceRoot":"../../../../../src","sources":["lang/en/components/picker.ts"],"mappings":";;AAAA,OAAO,MAAMA,MAAM,GAAG;EAClB,qBAAqB,EAAE,SAAS;EAChC,yBAAyB,EAAE,YAAY;EACvC,8BAA8B,EAAE,gCAAgC;EAChE,4BAA4B,EAAE,oCAAoC;EAClE,6BAA6B,EAAE,SAAS;EACxC,mCAAmC,EAAE;AACzC,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { picker } from "./components/picker.js";
|
|
4
|
+
import { pickList } from "./components/pick-list.js";
|
|
3
5
|
export const englishTranslations = {
|
|
4
6
|
translation: {
|
|
5
7
|
...pickList,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["picker","pickList","englishTranslations","translation"],"
|
|
1
|
+
{"version":3,"names":["picker","pickList","englishTranslations","translation"],"sourceRoot":"../../../../src","sources":["lang/en/english.ts"],"mappings":";;AAAA,SAAQA,MAAM,QAAO,wBAAqB;AAC1C,SAAQC,QAAQ,QAAO,2BAAwB;AAE/C,OAAO,MAAMC,mBAAmB,GAAG;EAC/BC,WAAW,EAAE;IACT,GAAGF,QAAQ;IACX,GAAGD;EACP;AACJ,CAAC","ignoreList":[]}
|
package/lib/module/lang/i18n.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
1
3
|
import i18n from 'i18next';
|
|
2
4
|
import { initReactI18next } from 'react-i18next';
|
|
3
|
-
import { dutchTranslations } from
|
|
4
|
-
import { englishTranslations } from
|
|
5
|
+
import { dutchTranslations } from "./nl/dutch.js";
|
|
6
|
+
import { englishTranslations } from "./en/english.js";
|
|
5
7
|
const resources = {
|
|
6
8
|
en: englishTranslations,
|
|
7
9
|
nl: dutchTranslations
|
|
8
10
|
};
|
|
9
11
|
i18n.use(initReactI18next).init({
|
|
10
|
-
compatibilityJSON: 'v3',
|
|
11
12
|
lng: 'nl',
|
|
12
13
|
fallbackLng: 'en',
|
|
13
14
|
resources,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["i18n","initReactI18next","dutchTranslations","englishTranslations","resources","en","nl","use","init","
|
|
1
|
+
{"version":3,"names":["i18n","initReactI18next","dutchTranslations","englishTranslations","resources","en","nl","use","init","lng","fallbackLng","interpolation","escapeValue"],"sourceRoot":"../../../src","sources":["lang/i18n.ts"],"mappings":";;AAAA,OAAOA,IAAI,MAAM,SAAS;AAC1B,SAAQC,gBAAgB,QAAO,eAAe;AAE9C,SAAQC,iBAAiB,QAAO,eAAY;AAC5C,SAAQC,mBAAmB,QAAO,iBAAc;AAEhD,MAAMC,SAAS,GAAG;EACdC,EAAE,EAAEF,mBAAmB;EACvBG,EAAE,EAAEJ;AACR,CAAC;AAEDF,IAAI,CAACO,GAAG,CAACN,gBAAgB,CAAC,CAACO,IAAI,CAAC;EAC5BC,GAAG,EAAE,IAAI;EACTC,WAAW,EAAE,IAAI;EACjBN,SAAS;EACTO,aAAa,EAAE;IACXC,WAAW,EAAE;EACjB;AACJ,CAAC,CAAC;AAEF,eAAeZ,IAAI","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["pickList"],"
|
|
1
|
+
{"version":3,"names":["pickList"],"sourceRoot":"../../../../../src","sources":["lang/nl/components/pick-list.ts"],"mappings":";;AAAA,OAAO,MAAMA,QAAQ,GAAG;EACpB,8BAA8B,EAAE,eAAe;EAC/C,gCAAgC,EAAE,eAAe;EACjD,+BAA+B,EAAE,QAAQ;EACzC,gCAAgC,EAAE;AACtC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["picker"],"
|
|
1
|
+
{"version":3,"names":["picker"],"sourceRoot":"../../../../../src","sources":["lang/nl/components/picker.ts"],"mappings":";;AAAA,OAAO,MAAMA,MAAM,GAAG;EAClB,qBAAqB,EAAE,SAAS;EAChC,yBAAyB,EAAE,YAAY;EACvC,8BAA8B,EAAE,uBAAuB;EACvD,4BAA4B,EAAE,iCAAiC;EAC/D,6BAA6B,EAAE,SAAS;EACxC,mCAAmC,EAAE;AACzC,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { picker } from "./components/picker.js";
|
|
4
|
+
import { pickList } from "./components/pick-list.js";
|
|
3
5
|
export const dutchTranslations = {
|
|
4
6
|
translation: {
|
|
5
7
|
...pickList,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["picker","pickList","dutchTranslations","translation"],"
|
|
1
|
+
{"version":3,"names":["picker","pickList","dutchTranslations","translation"],"sourceRoot":"../../../../src","sources":["lang/nl/dutch.ts"],"mappings":";;AAAA,SAAQA,MAAM,QAAO,wBAAqB;AAC1C,SAAQC,QAAQ,QAAO,2BAAwB;AAE/C,OAAO,MAAMC,iBAAiB,GAAG;EAC7BC,WAAW,EAAE;IACT,GAAGF,QAAQ;IACX,GAAGD;EACP;AACJ,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import { Text, View } from 'react-native';
|
|
3
|
-
import { styles } from
|
|
5
|
+
import { styles } from "../styles/empty-list-styles.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
7
|
const {
|
|
5
8
|
container,
|
|
6
9
|
text
|
|
7
10
|
} = styles;
|
|
8
11
|
export const EmptyList = props => {
|
|
9
|
-
return /*#__PURE__*/
|
|
10
|
-
style: container
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
return /*#__PURE__*/_jsx(View, {
|
|
13
|
+
style: container,
|
|
14
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
15
|
+
style: text,
|
|
16
|
+
children: props.text
|
|
17
|
+
})
|
|
18
|
+
});
|
|
14
19
|
};
|
|
15
20
|
//# sourceMappingURL=empty-list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","View","styles","container","text","EmptyList","props"],"
|
|
1
|
+
{"version":3,"names":["React","Text","View","styles","jsx","_jsx","container","text","EmptyList","props","style","children"],"sourceRoot":"../../../../src","sources":["pick-list/partials/empty-list.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,IAAI,EAAEC,IAAI,QAAO,cAAc;AAEvC,SAAQC,MAAM,QAAO,gCAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAMnD,MAAM;EAACC,SAAS;EAAEC;AAAI,CAAC,GAAGJ,MAAM;AAEhC,OAAO,MAAMK,SAAS,GAAIC,KAAY,IAAK;EACvC,oBACIJ,IAAA,CAACH,IAAI;IAACQ,KAAK,EAAEJ,SAAU;IAAAK,QAAA,eACnBN,IAAA,CAACJ,IAAI;MAACS,KAAK,EAAEH,IAAK;MAAAI,QAAA,EAAEF,KAAK,CAACF;IAAI,CAAO;EAAC,CACpC,CAAC;AAEf,CAAC","ignoreList":[]}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import { View, Text } from 'react-native';
|
|
3
5
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { Badge } from
|
|
5
|
-
import { useGatherer } from
|
|
6
|
-
import { styles } from
|
|
7
|
-
import { PressButton } from
|
|
6
|
+
import { Badge } from "../../shared/badge/badge.js";
|
|
7
|
+
import { useGatherer } from "../../hooks/use-gatherer.js";
|
|
8
|
+
import { styles } from "../styles/pick-group-item-styles.js";
|
|
9
|
+
import { PressButton } from "../../shared/press-button/press-button.js";
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
11
|
const {
|
|
9
12
|
listItem,
|
|
10
13
|
label,
|
|
@@ -28,15 +31,23 @@ export const PickGroupItem = props => {
|
|
|
28
31
|
}
|
|
29
32
|
startPicking(props.renderProps.item.id);
|
|
30
33
|
};
|
|
31
|
-
return /*#__PURE__*/
|
|
34
|
+
return /*#__PURE__*/_jsxs(PressButton, {
|
|
32
35
|
style: listItem,
|
|
33
|
-
onPress: handlePress
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
onPress: handlePress,
|
|
37
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
38
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
39
|
+
style: label,
|
|
40
|
+
children: "ID"
|
|
41
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
42
|
+
style: text,
|
|
43
|
+
children: id
|
|
44
|
+
})]
|
|
45
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
46
|
+
children: /*#__PURE__*/_jsx(Badge, {
|
|
47
|
+
variant: is_picked ? 'success' : 'danger',
|
|
48
|
+
children: t(`pick-list.item.is-picked.${is_picked ? 'true' : 'false'}`)
|
|
49
|
+
})
|
|
50
|
+
})]
|
|
51
|
+
});
|
|
41
52
|
};
|
|
42
53
|
//# sourceMappingURL=pick-group-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","useTranslation","Badge","useGatherer","styles","PressButton","listItem","label","text","PickGroupItem","props","t","startPicking","id","is_picked","renderProps","item","handlePress","onPress"],"
|
|
1
|
+
{"version":3,"names":["React","View","Text","useTranslation","Badge","useGatherer","styles","PressButton","jsx","_jsx","jsxs","_jsxs","listItem","label","text","PickGroupItem","props","t","startPicking","id","is_picked","renderProps","item","handlePress","onPress","style","children","variant"],"sourceRoot":"../../../../src","sources":["pick-list/partials/pick-group-item.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,EAAEC,IAAI,QAAO,cAAc;AAE3D,SAAQC,cAAc,QAAO,eAAe;AAE5C,SAAQC,KAAK,QAAO,6BAA0B;AAC9C,SAAQC,WAAW,QAAO,6BAA0B;AACpD,SAAQC,MAAM,QAAO,qCAAkC;AACvD,SAAQC,WAAW,QAAO,2CAAwC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAOnE,MAAM;EAACC,QAAQ;EAAEC,KAAK;EAAEC;AAAI,CAAC,GAAGR,MAAM;AAEtC,OAAO,MAAMS,aAAa,GAAyBC,KAAe,IAAK;EACnE,MAAM;IAACC;EAAC,CAAC,GAAGd,cAAc,CAAC,CAAC;EAC5B,MAAM;IAACe;EAAY,CAAC,GAAGb,WAAW,CAAC,CAAC;EACpC,MAAM;IAACc,EAAE;IAAEC;EAAS,CAAC,GAAGJ,KAAK,CAACK,WAAW,CAACC,IAAI;EAE9C,MAAMC,WAAW,GAAGA,CAAA,KAAY;IAC5B,IAAIP,KAAK,CAACQ,OAAO,EAAE;MACfR,KAAK,CAACQ,OAAO,CAACR,KAAK,CAACK,WAAW,CAACC,IAAI,CAAC;MACrC;IACJ;IAEAJ,YAAY,CAACF,KAAK,CAACK,WAAW,CAACC,IAAI,CAACH,EAAE,CAAC;EAC3C,CAAC;EAED,oBACIR,KAAA,CAACJ,WAAW;IAACkB,KAAK,EAAEb,QAAS;IAACY,OAAO,EAAED,WAAY;IAAAG,QAAA,gBAC/Cf,KAAA,CAACV,IAAI;MAAAyB,QAAA,gBACDjB,IAAA,CAACP,IAAI;QAACuB,KAAK,EAAEZ,KAAM;QAAAa,QAAA,EAAC;MAAE,CAAM,CAAC,eAC7BjB,IAAA,CAACP,IAAI;QAACuB,KAAK,EAAEX,IAAK;QAAAY,QAAA,EAAEP;MAAE,CAAO,CAAC;IAAA,CAC5B,CAAC,eACPV,IAAA,CAACR,IAAI;MAAAyB,QAAA,eACDjB,IAAA,CAACL,KAAK;QAACuB,OAAO,EAAEP,SAAS,GAAG,SAAS,GAAG,QAAS;QAAAM,QAAA,EAC5CT,CAAC,CAAC,4BAA4BG,SAAS,GAAG,MAAM,GAAG,OAAO,EAAE;MAAC,CAC3D;IAAC,CACN,CAAC;EAAA,CACE,CAAC;AAEtB,CAAC","ignoreList":[]}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
1
3
|
import React, { useEffect, useRef, useState } from 'react';
|
|
2
4
|
import { Pressable, TextInput, View } from 'react-native';
|
|
3
5
|
import Icon from 'react-native-vector-icons/Ionicons';
|
|
4
|
-
import { GREY } from
|
|
5
|
-
import { styles } from
|
|
6
|
+
import { GREY } from "../../shared/constants.js";
|
|
7
|
+
import { styles } from "../styles/search-styles.js";
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
9
|
const {
|
|
7
10
|
container,
|
|
8
11
|
searchColumn,
|
|
@@ -22,33 +25,36 @@ export const Search = props => {
|
|
|
22
25
|
return () => clearTimeout(handleSearch);
|
|
23
26
|
}, [searchTerm, onSearch]);
|
|
24
27
|
const handleClear = () => {
|
|
25
|
-
|
|
26
|
-
(_textInputRef$current = textInputRef.current) === null || _textInputRef$current === void 0 ? void 0 : _textInputRef$current.clear();
|
|
28
|
+
textInputRef.current?.clear();
|
|
27
29
|
onSearch('');
|
|
28
30
|
};
|
|
29
|
-
return /*#__PURE__*/
|
|
30
|
-
style: container
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
31
|
+
return /*#__PURE__*/_jsx(View, {
|
|
32
|
+
style: container,
|
|
33
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
34
|
+
style: searchColumn,
|
|
35
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
36
|
+
style: iconColumn,
|
|
37
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
38
|
+
name: "search-outline",
|
|
39
|
+
size: 20,
|
|
40
|
+
color: GREY
|
|
41
|
+
})
|
|
42
|
+
}), /*#__PURE__*/_jsx(TextInput, {
|
|
43
|
+
ref: textInputRef,
|
|
44
|
+
value: searchTerm,
|
|
45
|
+
onChangeText: setSearchTerm,
|
|
46
|
+
style: search,
|
|
47
|
+
placeholder: "Zoeken..."
|
|
48
|
+
}), /*#__PURE__*/_jsx(Pressable, {
|
|
49
|
+
onPress: handleClear,
|
|
50
|
+
style: iconColumn,
|
|
51
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
52
|
+
name: "close-outline",
|
|
53
|
+
size: 26,
|
|
54
|
+
color: GREY
|
|
55
|
+
})
|
|
56
|
+
})]
|
|
57
|
+
})
|
|
58
|
+
});
|
|
53
59
|
};
|
|
54
60
|
//# sourceMappingURL=search.js.map
|