@openmrs/esm-stock-management-app 3.1.1-pre.1179 → 3.1.1-pre.1186
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/.husky/pre-commit +0 -5
- package/.husky/pre-push +0 -3
- package/dist/130.js +1 -1
- package/dist/130.js.map +1 -1
- package/dist/2177.js +1 -1
- package/dist/2177.js.map +1 -1
- package/dist/3066.js +2 -0
- package/dist/3066.js.map +1 -0
- package/dist/3220.js +1 -1
- package/dist/3220.js.map +1 -1
- package/dist/4300.js +1 -1
- package/dist/4732.js +1 -1
- package/dist/4732.js.map +1 -1
- package/dist/5125.js +1 -1
- package/dist/5125.js.map +1 -1
- package/dist/5333.js +1 -1
- package/dist/5333.js.map +1 -1
- package/dist/5609.js +1 -1
- package/dist/5609.js.map +1 -1
- package/dist/6184.js +1 -1
- package/dist/6184.js.map +1 -1
- package/dist/6757.js +1 -1
- package/dist/6757.js.map +1 -1
- package/dist/8161.js +1 -1
- package/dist/8161.js.map +1 -1
- package/dist/9186.js +1 -1
- package/dist/9186.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-stock-management-app.js +1 -1
- package/dist/openmrs-esm-stock-management-app.js.buildmanifest.json +64 -64
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/constants.ts +2 -3
- package/src/core/components/carbon/controlled-combo-box.component.tsx +12 -9
- package/src/core/components/carbon/controlled-radio-button-group.component.tsx +21 -16
- package/src/core/components/table/table.component.tsx +26 -17
- package/src/core/components/table/table.scss +4 -0
- package/src/core/components/table/types.ts +12 -0
- package/src/core/components/tabs/vertical-tabs.component.tsx +2 -6
- package/src/declarations.d.ts +0 -3
- package/src/stock-home/stock-home-inventory-card.component.tsx +2 -2
- package/src/stock-items/add-stock-item/add-stock-item.component.tsx +1 -1
- package/src/stock-items/add-stock-item/batch-information/batch-information-locations/batch-information-locations-filter.component.tsx +0 -3
- package/src/stock-items/add-stock-item/batch-information/batch-information.component.tsx +4 -4
- package/src/stock-items/add-stock-item/dispensing-package-measurement/dispensing-package-measurement.component.tsx +2 -5
- package/src/stock-items/add-stock-item/drug-selector/drug-selector.component.tsx +4 -8
- package/src/stock-items/add-stock-item/packaging-units/packaging-units-delete.modal.tsx +2 -2
- package/src/stock-items/add-stock-item/packaging-units/packaging-units.component.tsx +32 -18
- package/src/stock-items/add-stock-item/packaging-units-concept-selector/packaging-units-concept-selector.component.tsx +2 -5
- package/src/stock-items/add-stock-item/preferred-vendor-selector/preferred-vendor-selector.component.tsx +0 -3
- package/src/stock-items/add-stock-item/stock-item-category-selector/stock-item-category-selector.component.tsx +2 -5
- package/src/stock-items/add-stock-item/stock-item-details/stock-item-details.component.tsx +10 -10
- package/src/stock-items/add-stock-item/stock-item-references/stock-item-references.component.tsx +36 -27
- package/src/stock-items/add-stock-item/stock-item-references/stock-references-selector.component.tsx +2 -5
- package/src/stock-items/add-stock-item/stock-item-rules/add-stock-rules.component.tsx +16 -16
- package/src/stock-items/add-stock-item/stock-item-rules/stock-item-rules.component.tsx +10 -9
- package/src/stock-items/add-stock-item/stock-item-rules/stock-rules-filter.component.tsx +8 -3
- package/src/stock-items/add-stock-item/stock-item-units-edit/stock-item-units-edit.component.tsx +2 -2
- package/src/stock-items/add-stock-item/transactions/printout/printable-bincard-transaction-header.component.tsx +5 -5
- package/src/stock-items/add-stock-item/transactions/printout/printable-stockcard-transaction-header.component.tsx +3 -3
- package/src/stock-items/add-stock-item/transactions/printout/transactions-print-action.component.tsx +2 -5
- package/src/stock-items/add-stock-item/transactions/printout/transactions-print-bincard-preview.modal.tsx +1 -1
- package/src/stock-items/add-stock-item/transactions/transaction-filters/transaction-locations-filter.component.tsx +0 -3
- package/src/stock-items/components/filter-stock-items/filter-stock-items.component.tsx +6 -4
- package/src/stock-items/edit-stock-item/edit-stock-item-action-menu.component.tsx +1 -1
- package/src/stock-items/stock-items-table.component.tsx +21 -15
- package/src/stock-items/stock-items-table.resource.ts +1 -1
- package/src/stock-items/stock-items.resource.ts +1 -2
- package/src/stock-locations/add-locations-form.workspace.tsx +9 -11
- package/src/stock-locations/location-admin-form.component.tsx +9 -4
- package/src/stock-locations/stock-locations-table.component.tsx +3 -3
- package/src/stock-lookups/stock-lookups.resource.ts +2 -2
- package/src/stock-management-admin-card-link.component.tsx +1 -1
- package/src/stock-operations/add-stock-operation/stock-operations-expanded-row/stock-items-table.tsx +12 -8
- package/src/stock-operations/add-stock-operation/stock-operations-expanded-row/stock-operation-expanded-row.component.tsx +4 -4
- package/src/stock-operations/edit-stock-operation/edit-stock-operation-action-menu.component.tsx +6 -7
- package/src/stock-operations/stock-operation-operations-filter/stock-operation-operations-filter.component.tsx +7 -3
- package/src/stock-operations/stock-operation-sources-filter/stock-operation-sources-filter.component.tsx +8 -4
- package/src/stock-operations/stock-operation-statuses-filter/stock-operation-statuses-filter.component.tsx +16 -14
- package/src/stock-operations/stock-operation-types-selector/stock-operation-types-selector.component.tsx +4 -4
- package/src/stock-operations/stock-operations-filters.component.tsx +4 -2
- package/src/stock-operations/stock-operations-forms/input-components/batch-no-selector.component.tsx +2 -2
- package/src/stock-operations/stock-operations-forms/input-components/batch-no-selector.test.tsx +1 -1
- package/src/stock-operations/stock-operations-forms/input-components/qty-uim-selector.test.tsx +1 -1
- package/src/stock-operations/stock-operations-forms/input-components/quantity-uom-selector.component.tsx +3 -3
- package/src/stock-operations/stock-operations-forms/input-components/stock-item-search.component.tsx +3 -4
- package/src/stock-operations/stock-operations-forms/input-components/stock-operation-reason-selector.component.tsx +3 -3
- package/src/stock-operations/stock-operations-forms/input-components/users-selector.component.tsx +6 -6
- package/src/stock-operations/stock-operations-forms/step2.test.tsx +1 -5
- package/src/stock-operations/stock-operations-forms/steps/base-operation-details-form-step.tsx +15 -16
- package/src/stock-operations/stock-operations-forms/steps/quantity-uom-cell.component.tsx +1 -1
- package/src/stock-operations/stock-operations-forms/steps/received-items.component.tsx +2 -2
- package/src/stock-operations/stock-operations-forms/steps/stock-operation-items-form-step.component.tsx +24 -21
- package/src/stock-operations/stock-operations-forms/steps/stock-operation-submission-form-step.component.tsx +4 -4
- package/src/stock-operations/stock-operations-forms/stock-item-form/stock-item-form.workspace.tsx +60 -53
- package/src/stock-operations/stock-operations-forms/stock-operation-form.component.tsx +17 -12
- package/src/stock-operations/stock-operations-modal/stock-operations-completed-dispatch-button.component.tsx +1 -1
- package/src/stock-operations/stock-operations-modal/stock-operations-issue-stock-button.component.tsx +1 -1
- package/src/stock-operations/stock-operations-modal/stock-operations-print-button.component.tsx +6 -2
- package/src/stock-operations/stock-operations-modal/stock-operations-reject-button.component.tsx +4 -5
- package/src/stock-operations/stock-operations-modal/stock-operations.modal.tsx +4 -2
- package/src/stock-operations/stock-operations-table.component.tsx +16 -12
- package/src/stock-operations/stock-operations-table.resource.ts +1 -0
- package/src/stock-reports/generate-report/create-stock-report.workspace.tsx +31 -35
- package/src/stock-reports/report-list/stock-reports.component.tsx +5 -9
- package/src/stock-reports/stock-reports.resource.ts +1 -1
- package/src/stock-sources/add-stock-sources/add-stock-sources.workspace.tsx +6 -6
- package/src/stock-sources/stock-sources-items-table.component.tsx +14 -10
- package/src/stock-user-role-scopes/add-stock-user-scope/add-stock-user-role-scope.workspace.tsx +52 -53
- package/src/stock-user-role-scopes/delete-stock-user-scope/delete-stock-user-scope.component.tsx +1 -1
- package/src/stock-user-role-scopes/delete-stock-user-scope.modal.tsx +4 -1
- package/src/stock-user-role-scopes/stock-user-role-scopes-items-table.component.tsx +8 -12
- package/translations/en.json +105 -71
- package/dist/2474.js +0 -2
- package/dist/2474.js.map +0 -1
- package/src/core/components/carbon/controlled-dropdown.component.tsx +0 -37
- /package/dist/{2474.js.LICENSE.txt → 3066.js.LICENSE.txt} +0 -0
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type Control, Controller, type FieldValues } from 'react-hook-form';
|
|
3
|
-
import { type DropdownProps, type OnChangeData } from '@carbon/react/lib/components/Dropdown/Dropdown';
|
|
4
|
-
import { TextInput } from '@carbon/react';
|
|
5
|
-
|
|
6
|
-
interface ControlledDropdownProps<T, K> extends DropdownProps<K> {
|
|
7
|
-
controllerName: string;
|
|
8
|
-
name: string;
|
|
9
|
-
control: Control<FieldValues, T>;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const ControlledDropdown = <T, K>(props: ControlledDropdownProps<T, K>) => {
|
|
13
|
-
return (
|
|
14
|
-
<Controller
|
|
15
|
-
name={props.controllerName}
|
|
16
|
-
control={props.control}
|
|
17
|
-
render={({ field: { onChange, value, ref } }) => (
|
|
18
|
-
<TextInput
|
|
19
|
-
{...props}
|
|
20
|
-
onChange={(e: OnChangeData<K>) => {
|
|
21
|
-
onChange(e);
|
|
22
|
-
|
|
23
|
-
// Fire prop change
|
|
24
|
-
if (props.onChange) {
|
|
25
|
-
props.onChange(e);
|
|
26
|
-
}
|
|
27
|
-
}}
|
|
28
|
-
id={props.name}
|
|
29
|
-
ref={ref}
|
|
30
|
-
value={value}
|
|
31
|
-
/>
|
|
32
|
-
)}
|
|
33
|
-
/>
|
|
34
|
-
);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export default ControlledDropdown;
|
|
File without changes
|