@openmrs/esm-stock-management-app 1.0.1-pre.777 → 1.0.1-pre.785

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.
Files changed (120) hide show
  1. package/__mocks__/index.ts +1 -0
  2. package/__mocks__/operation-type.mock.ts +532 -0
  3. package/dist/155.js +1 -0
  4. package/dist/155.js.map +1 -0
  5. package/dist/172.js +1 -1
  6. package/dist/20.js +1 -1
  7. package/dist/290.js +1 -1
  8. package/dist/493.js +2 -0
  9. package/dist/493.js.map +1 -0
  10. package/dist/606.js +1 -1
  11. package/dist/627.js +1 -1
  12. package/dist/{400.js → 914.js} +1 -1
  13. package/dist/914.js.map +1 -0
  14. package/dist/main.js +1 -1
  15. package/dist/main.js.map +1 -1
  16. package/dist/openmrs-esm-stock-management-app.js +1 -1
  17. package/dist/openmrs-esm-stock-management-app.js.buildmanifest.json +81 -57
  18. package/dist/openmrs-esm-stock-management-app.js.map +1 -1
  19. package/dist/routes.json +1 -1
  20. package/package.json +1 -1
  21. package/src/core/utils/utils.ts +29 -0
  22. package/src/index.ts +4 -0
  23. package/src/routes.json +9 -0
  24. package/src/stock-items/add-stock-item/transactions/printout/transactions-stockcard-printout.component.tsx +8 -12
  25. package/src/stock-items/add-stock-item/transactions/transactions.component.tsx +8 -12
  26. package/src/stock-items/stock-items.resource.ts +5 -5
  27. package/src/stock-lookups/stock-lookups.resource.ts +2 -2
  28. package/src/stock-operations/edit-stock-operation/edit-stock-operation-action-menu.component.tsx +41 -16
  29. package/src/stock-operations/{add-stock-operation/received-items.component.tsx → received-items.component.tsx} +1 -1
  30. package/src/stock-operations/stock-operation-reference.component.tsx +64 -0
  31. package/src/stock-operations/stock-operation-status/stock-operation-status-row.tsx +77 -0
  32. package/src/stock-operations/stock-operation-status/stock-operation-status.scss +32 -0
  33. package/src/stock-operations/stock-operation-status/stock-operation-status.tsx +45 -0
  34. package/src/stock-operations/stock-operation-types-selector/stock-operation-types-selector.component.tsx +30 -29
  35. package/src/stock-operations/stock-operation.utils.tsx +16 -79
  36. package/src/stock-operations/stock-operations-dialog/stock-operations-issue-stock-button.component.tsx +27 -39
  37. package/src/stock-operations/stock-operations-dialog/stock-operations-print-button.component.tsx +51 -59
  38. package/src/stock-operations/{stock-item-selector/stock-item-selector.resource.tsx → stock-operations-forms/hooks/useFilterableStockItems.ts} +4 -4
  39. package/src/stock-operations/stock-operations-forms/hooks/useFilteredOperationTypesByRoles.ts +30 -0
  40. package/src/stock-operations/stock-operations-forms/hooks/useOperationTypePermisions.ts +29 -0
  41. package/src/stock-operations/stock-operations-forms/hooks/useParties.ts +73 -0
  42. package/src/stock-operations/{users-selector/users-selector.resource.tsx → stock-operations-forms/hooks/useSearchUser.ts} +9 -7
  43. package/src/stock-operations/{batch-no-selector/batch-no-selector.resource.tsx → stock-operations-forms/hooks/useStockItemBatchNumbers.ts} +3 -3
  44. package/src/stock-operations/stock-operations-forms/hooks/useStockOperationLinks.ts +20 -0
  45. package/src/stock-operations/stock-operations-forms/input-components/batch-no-selector.component.tsx +72 -0
  46. package/src/stock-operations/stock-operations-forms/input-components/batch-no-selector.test.tsx +90 -0
  47. package/src/stock-operations/{add-stock-operation/stock-item-search/stock-item-search.scss → stock-operations-forms/input-components/input-components-styles.scss} +2 -2
  48. package/src/stock-operations/stock-operations-forms/input-components/qty-uim-selector.test.tsx +157 -0
  49. package/src/stock-operations/stock-operations-forms/input-components/quantity-uom-selector.component.tsx +53 -0
  50. package/src/stock-operations/stock-operations-forms/input-components/stock-item-search.component.tsx +56 -0
  51. package/src/stock-operations/stock-operations-forms/input-components/stock-operation-reason-selector.component.tsx +59 -0
  52. package/src/stock-operations/stock-operations-forms/input-components/stock-operation-reason-selector.test.tsx +216 -0
  53. package/src/stock-operations/stock-operations-forms/input-components/unique-batch-no-entry-input.component.tsx +59 -0
  54. package/src/stock-operations/stock-operations-forms/input-components/user-selector.test.tsx +110 -0
  55. package/src/stock-operations/stock-operations-forms/input-components/users-selector.component.tsx +111 -0
  56. package/src/stock-operations/stock-operations-forms/step1.test.tsx +303 -0
  57. package/src/stock-operations/stock-operations-forms/step2.test.tsx +250 -0
  58. package/src/stock-operations/stock-operations-forms/step3.test.tsx +223 -0
  59. package/src/stock-operations/stock-operations-forms/steps/base-operation-details-form-step.tsx +241 -0
  60. package/src/stock-operations/stock-operations-forms/steps/quantity-uom-cell.component.tsx +33 -0
  61. package/src/stock-operations/stock-operations-forms/steps/stock-availability-cell.component.tsx +51 -0
  62. package/src/stock-operations/stock-operations-forms/steps/stock-operation-item-batch-no-cell.component.tsx +40 -0
  63. package/src/stock-operations/stock-operations-forms/steps/stock-operation-item-cell.component.tsx +38 -0
  64. package/src/stock-operations/stock-operations-forms/steps/stock-operation-item-expiry-cell.component.tsx +41 -0
  65. package/src/stock-operations/stock-operations-forms/steps/stock-operation-items-form-step.component.tsx +281 -0
  66. package/src/stock-operations/stock-operations-forms/steps/stock-operation-items-form-step.scc.scss +64 -0
  67. package/src/stock-operations/stock-operations-forms/steps/stock-operation-submission-form-step.component.tsx +236 -0
  68. package/src/stock-operations/stock-operations-forms/stock-issue-form-initializer-with-related-requisition-operation.component.tsx +55 -0
  69. package/src/stock-operations/stock-operations-forms/stock-item-form/stock-item-form.scss +41 -0
  70. package/src/stock-operations/stock-operations-forms/stock-item-form/stock-item-form.workspace.tsx +197 -0
  71. package/src/stock-operations/stock-operations-forms/stock-operation-form-header.component.tsx +166 -0
  72. package/src/stock-operations/stock-operations-forms/stock-operation-form.component.tsx +200 -0
  73. package/src/stock-operations/stock-operations-forms/stock-operation-form.scss +111 -0
  74. package/src/stock-operations/stock-operations-forms/stock-operation-related-link.component.tsx +45 -0
  75. package/src/stock-operations/stock-operations-forms/stock-operation-stepper/stepper.scss +41 -0
  76. package/src/stock-operations/stock-operations-forms/stock-operation-stepper/stock-operation-stepper.component.tsx +52 -0
  77. package/src/stock-operations/stock-operations-forms/stock-operations-form-utils.ts +32 -0
  78. package/src/stock-operations/stock-operations-table.component.tsx +20 -56
  79. package/src/stock-operations/stock-operations.resource.ts +16 -13
  80. package/src/stock-operations/validation-schema.ts +72 -14
  81. package/dist/400.js.map +0 -1
  82. package/dist/766.js +0 -2
  83. package/dist/766.js.map +0 -1
  84. package/src/stock-operations/add-stock-operation/add-stock-operation.component.tsx +0 -349
  85. package/src/stock-operations/add-stock-operation/add-stock-operation.resource.tsx +0 -27
  86. package/src/stock-operations/add-stock-operation/add-stock-operation.scss +0 -60
  87. package/src/stock-operations/add-stock-operation/add-stock-operation.test.tsx +0 -192
  88. package/src/stock-operations/add-stock-operation/add-stock-operation.utils.tsx +0 -152
  89. package/src/stock-operations/add-stock-operation/add-stock-utils.ts +0 -103
  90. package/src/stock-operations/add-stock-operation/base-operation-details.component.tsx +0 -439
  91. package/src/stock-operations/add-stock-operation/base-operation-details.scss +0 -30
  92. package/src/stock-operations/add-stock-operation/stock-item-search/stock-item-search.component.tsx +0 -70
  93. package/src/stock-operations/add-stock-operation/stock-items-addition-row.component.tsx +0 -360
  94. package/src/stock-operations/add-stock-operation/stock-items-addition-row.resource.tsx +0 -0
  95. package/src/stock-operations/add-stock-operation/stock-items-addition-row.scss +0 -12
  96. package/src/stock-operations/add-stock-operation/stock-items-addition-row.test.tsx +0 -10
  97. package/src/stock-operations/add-stock-operation/stock-items-addition.component.scss +0 -17
  98. package/src/stock-operations/add-stock-operation/stock-items-addition.component.tsx +0 -254
  99. package/src/stock-operations/add-stock-operation/stock-operation-context/useStockOperationContext.tsx +0 -16
  100. package/src/stock-operations/add-stock-operation/stock-operation-reference.component.tsx +0 -39
  101. package/src/stock-operations/add-stock-operation/stock-operation-related-link.component.tsx +0 -38
  102. package/src/stock-operations/add-stock-operation/stock-operation-status.component.tsx +0 -170
  103. package/src/stock-operations/add-stock-operation/stock-operation-submission.component.tsx +0 -189
  104. package/src/stock-operations/add-stock-operation/stock-operation-submission.test.tsx +0 -138
  105. package/src/stock-operations/add-stock-operation/types.ts +0 -55
  106. package/src/stock-operations/add-stock-operation/validationSchema.ts +0 -54
  107. package/src/stock-operations/batch-no-selector/batch-no-selector.component.tsx +0 -114
  108. package/src/stock-operations/batch-no-selector/batch-no-selector.scss +0 -0
  109. package/src/stock-operations/batch-no-selector/batch-no-selector.test.tsx +0 -101
  110. package/src/stock-operations/party-selector/party-selector.component.tsx +0 -59
  111. package/src/stock-operations/qty-uom-selector/qty-uom-selector.component.tsx +0 -65
  112. package/src/stock-operations/qty-uom-selector/qty-uom-selector.resource.tsx +0 -0
  113. package/src/stock-operations/qty-uom-selector/qty-uom-selector.scss +0 -0
  114. package/src/stock-operations/qty-uom-selector/qty-uom-selector.test.tsx +0 -10
  115. package/src/stock-operations/stock-item-selector/stock-item-selector.component.tsx +0 -69
  116. package/src/stock-operations/stock-item-selector/stock-item-selector.scss +0 -0
  117. package/src/stock-operations/stock-item-selector/stock-item-selector.test.tsx +0 -10
  118. package/src/stock-operations/stock-operation-reason-selector/stock-operation-reason-selector.component.tsx +0 -62
  119. package/src/stock-operations/users-selector/users-selector.component.tsx +0 -75
  120. /package/dist/{766.js.LICENSE.txt → 493.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ export * from './operation-type.mock';
@@ -0,0 +1,532 @@
1
+ export const adjustmentOpeationTypeMock = {
2
+ uuid: '11111111-1111-1111-1111-111111111111',
3
+ dateCreated: '2022-07-31T00:00:00.000+0300',
4
+ dateChanged: null,
5
+ name: 'Adjustment',
6
+ description: 'Physical item quantities that do not match the current system quantity.',
7
+ operationType: 'adjustment',
8
+ hasSource: true,
9
+ sourceType: 'Location',
10
+ hasDestination: false,
11
+ destinationType: null,
12
+ availableWhenReserved: true,
13
+ allowExpiredBatchNumbers: false,
14
+ stockOperationTypeLocationScopes: [
15
+ {
16
+ uuid: 'f958ad0a-2a55-11ed-9cab-507b9dea1806',
17
+ dateCreated: '2024-03-13T15:41:25.000+0300',
18
+ dateChanged: null,
19
+ locationTag: 'Main Pharmacy',
20
+ isSource: true,
21
+ isDestination: false,
22
+ links: [
23
+ {
24
+ rel: 'full',
25
+ uri: 'http://hie.kenyahmis.org/openmrs/ws/rest/v1/stockmanagement/stockoperationtypelocationscope/f958ad0a-2a55-11ed-9cab-507b9dea1806?v=full',
26
+ resourceAlias: 'stockoperationtypelocationscope',
27
+ },
28
+ ],
29
+ resourceVersion: '1.8',
30
+ },
31
+ {
32
+ uuid: '019f2d4b-2a56-11ed-9cab-507b9dea1806',
33
+ dateCreated: '2024-03-13T15:41:25.000+0300',
34
+ dateChanged: null,
35
+ locationTag: 'Main Store',
36
+ isSource: true,
37
+ isDestination: false,
38
+ links: [
39
+ {
40
+ rel: 'full',
41
+ uri: 'http://hie.kenyahmis.org/openmrs/ws/rest/v1/stockmanagement/stockoperationtypelocationscope/019f2d4b-2a56-11ed-9cab-507b9dea1806?v=full',
42
+ resourceAlias: 'stockoperationtypelocationscope',
43
+ },
44
+ ],
45
+ resourceVersion: '1.8',
46
+ },
47
+ {
48
+ uuid: '7228d114-2abc-11ed-ba4a-507b9dea1806',
49
+ dateCreated: '2024-03-13T15:41:25.000+0300',
50
+ dateChanged: null,
51
+ locationTag: 'Dispensary',
52
+ isSource: true,
53
+ isDestination: false,
54
+ links: [
55
+ {
56
+ rel: 'full',
57
+ uri: 'http://hie.kenyahmis.org/openmrs/ws/rest/v1/stockmanagement/stockoperationtypelocationscope/7228d114-2abc-11ed-ba4a-507b9dea1806?v=full',
58
+ resourceAlias: 'stockoperationtypelocationscope',
59
+ },
60
+ ],
61
+ resourceVersion: '1.8',
62
+ },
63
+ ],
64
+ };
65
+
66
+ export const disposalOperationTypeMock = {
67
+ uuid: '22222222-2222-2222-2222-222222222222',
68
+ dateCreated: '2022-07-31T00:00:00.000+0300',
69
+ dateChanged: null,
70
+ name: 'Disposal',
71
+ description: 'Item stock quantities that have expired and must be removed from circulation.',
72
+ operationType: 'disposed',
73
+ hasSource: true,
74
+ sourceType: 'Location',
75
+ hasDestination: false,
76
+ destinationType: null,
77
+ availableWhenReserved: true,
78
+ allowExpiredBatchNumbers: true,
79
+ stockOperationTypeLocationScopes: [
80
+ {
81
+ uuid: '12de41c9-28a1-11ed-bdcb-507b9dea1806',
82
+ dateCreated: '2024-03-13T15:41:26.000+0300',
83
+ dateChanged: null,
84
+ locationTag: 'Main Store',
85
+ isSource: true,
86
+ isDestination: false,
87
+ links: [
88
+ {
89
+ rel: 'full',
90
+ uri: 'http://hie.kenyahmis.org/openmrs/ws/rest/v1/stockmanagement/stockoperationtypelocationscope/12de41c9-28a1-11ed-bdcb-507b9dea1806?v=full',
91
+ resourceAlias: 'stockoperationtypelocationscope',
92
+ },
93
+ ],
94
+ resourceVersion: '1.8',
95
+ },
96
+ {
97
+ uuid: '8bee3005-2ae6-11ed-ba4a-507b9dea1806',
98
+ dateCreated: '2024-03-13T15:41:26.000+0300',
99
+ dateChanged: null,
100
+ locationTag: 'Main Pharmacy',
101
+ isSource: true,
102
+ isDestination: false,
103
+ links: [
104
+ {
105
+ rel: 'full',
106
+ uri: 'http://hie.kenyahmis.org/openmrs/ws/rest/v1/stockmanagement/stockoperationtypelocationscope/8bee3005-2ae6-11ed-ba4a-507b9dea1806?v=full',
107
+ resourceAlias: 'stockoperationtypelocationscope',
108
+ },
109
+ ],
110
+ resourceVersion: '1.8',
111
+ },
112
+ {
113
+ uuid: '83fbf8ca-2ae6-11ed-ba4a-507b9dea1806',
114
+ dateCreated: '2024-03-13T15:41:27.000+0300',
115
+ dateChanged: null,
116
+ locationTag: 'Dispensary',
117
+ isSource: true,
118
+ isDestination: false,
119
+ links: [
120
+ {
121
+ rel: 'full',
122
+ uri: 'http://hie.kenyahmis.org/openmrs/ws/rest/v1/stockmanagement/stockoperationtypelocationscope/83fbf8ca-2ae6-11ed-ba4a-507b9dea1806?v=full',
123
+ resourceAlias: 'stockoperationtypelocationscope',
124
+ },
125
+ ],
126
+ resourceVersion: '1.8',
127
+ },
128
+ ],
129
+ };
130
+
131
+ export const tranferOutOperationTypeMock = {
132
+ uuid: '33333333-3333-3333-3333-333333333333',
133
+ dateCreated: '2022-07-31T00:00:00.000+0300',
134
+ dateChanged: null,
135
+ name: 'Transfer Out',
136
+ description: 'Items that are distributed to other outside destination.',
137
+ operationType: 'transferout',
138
+ hasSource: true,
139
+ sourceType: 'Location',
140
+ hasDestination: true,
141
+ destinationType: 'Other',
142
+ availableWhenReserved: true,
143
+ allowExpiredBatchNumbers: false,
144
+ stockOperationTypeLocationScopes: [
145
+ {
146
+ uuid: '5b341a26-28a2-11ed-bdcb-507b9dea1806',
147
+ dateCreated: '2024-03-13T15:41:27.000+0300',
148
+ dateChanged: null,
149
+ locationTag: 'Main Store',
150
+ isSource: true,
151
+ isDestination: false,
152
+ links: [
153
+ {
154
+ rel: 'full',
155
+ uri: 'http://hie.kenyahmis.org/openmrs/ws/rest/v1/stockmanagement/stockoperationtypelocationscope/5b341a26-28a2-11ed-bdcb-507b9dea1806?v=full',
156
+ resourceAlias: 'stockoperationtypelocationscope',
157
+ },
158
+ ],
159
+ resourceVersion: '1.8',
160
+ },
161
+ ],
162
+ };
163
+
164
+ export const receiptOperationTypeMock = {
165
+ uuid: '44444444-4444-4444-4444-444444444444',
166
+ dateCreated: '2022-07-31T00:00:00.000+0300',
167
+ dateChanged: null,
168
+ name: 'Receipt',
169
+ description: 'Items that are added into the inventory system from an outside provider.',
170
+ operationType: 'receipt',
171
+ hasSource: true,
172
+ sourceType: 'Other',
173
+ hasDestination: true,
174
+ destinationType: 'Location',
175
+ availableWhenReserved: false,
176
+ allowExpiredBatchNumbers: false,
177
+ stockOperationTypeLocationScopes: [
178
+ {
179
+ uuid: '01c9285a-28a3-11ed-bdcb-507b9dea1806',
180
+ dateCreated: '2024-03-13T15:41:28.000+0300',
181
+ dateChanged: null,
182
+ locationTag: 'Main Store',
183
+ isSource: false,
184
+ isDestination: true,
185
+ links: [
186
+ {
187
+ rel: 'full',
188
+ uri: 'http://hie.kenyahmis.org/openmrs/ws/rest/v1/stockmanagement/stockoperationtypelocationscope/01c9285a-28a3-11ed-bdcb-507b9dea1806?v=full',
189
+ resourceAlias: 'stockoperationtypelocationscope',
190
+ },
191
+ ],
192
+ resourceVersion: '1.8',
193
+ },
194
+ ],
195
+ };
196
+
197
+ export const returnOperationTypeMock = {
198
+ uuid: '55555555-5555-5555-5555-555555555555',
199
+ dateCreated: '2022-07-31T00:00:00.000+0300',
200
+ dateChanged: null,
201
+ name: 'Return',
202
+ description: 'Items that are returned to the main store from other stock holding areas.',
203
+ operationType: 'return',
204
+ hasSource: true,
205
+ sourceType: 'Location',
206
+ hasDestination: true,
207
+ destinationType: 'Location',
208
+ availableWhenReserved: true,
209
+ allowExpiredBatchNumbers: false,
210
+ stockOperationTypeLocationScopes: [
211
+ {
212
+ uuid: '2c5772e7-28a4-11ed-bdcb-507b9dea1806',
213
+ dateCreated: '2024-03-13T15:41:28.000+0300',
214
+ dateChanged: null,
215
+ locationTag: 'Main Pharmacy',
216
+ isSource: true,
217
+ isDestination: false,
218
+ links: [
219
+ {
220
+ rel: 'full',
221
+ uri: 'http://hie.kenyahmis.org/openmrs/ws/rest/v1/stockmanagement/stockoperationtypelocationscope/2c5772e7-28a4-11ed-bdcb-507b9dea1806?v=full',
222
+ resourceAlias: 'stockoperationtypelocationscope',
223
+ },
224
+ ],
225
+ resourceVersion: '1.8',
226
+ },
227
+ {
228
+ uuid: '6e26757a-2abe-11ed-ba4a-507b9dea1806',
229
+ dateCreated: '2024-03-13T15:41:29.000+0300',
230
+ dateChanged: null,
231
+ locationTag: 'Dispensary',
232
+ isSource: true,
233
+ isDestination: false,
234
+ links: [
235
+ {
236
+ rel: 'full',
237
+ uri: 'http://hie.kenyahmis.org/openmrs/ws/rest/v1/stockmanagement/stockoperationtypelocationscope/6e26757a-2abe-11ed-ba4a-507b9dea1806?v=full',
238
+ resourceAlias: 'stockoperationtypelocationscope',
239
+ },
240
+ ],
241
+ resourceVersion: '1.8',
242
+ },
243
+ {
244
+ uuid: '27ff4a05-28a4-11ed-bdcb-507b9dea1806',
245
+ dateCreated: '2024-03-13T15:41:29.000+0300',
246
+ dateChanged: null,
247
+ locationTag: 'Main Store',
248
+ isSource: false,
249
+ isDestination: true,
250
+ links: [
251
+ {
252
+ rel: 'full',
253
+ uri: 'http://hie.kenyahmis.org/openmrs/ws/rest/v1/stockmanagement/stockoperationtypelocationscope/27ff4a05-28a4-11ed-bdcb-507b9dea1806?v=full',
254
+ resourceAlias: 'stockoperationtypelocationscope',
255
+ },
256
+ ],
257
+ resourceVersion: '1.8',
258
+ },
259
+ ],
260
+ };
261
+
262
+ export const stockIssueOperationtypeMock = {
263
+ uuid: '66666666-6666-6666-6666-666666666666',
264
+ dateCreated: '2022-07-31T00:00:00.000+0300',
265
+ dateChanged: null,
266
+ name: 'Stock Issue',
267
+ description: 'Items that are transferred between two locations.',
268
+ operationType: 'stockissue',
269
+ hasSource: true,
270
+ sourceType: 'Location',
271
+ hasDestination: true,
272
+ destinationType: 'Location',
273
+ availableWhenReserved: true,
274
+ allowExpiredBatchNumbers: false,
275
+ stockOperationTypeLocationScopes: [
276
+ {
277
+ uuid: '20fac1fa-28a4-11ed-bdcb-507b9dea1806',
278
+ dateCreated: '2024-03-13T15:41:29.000+0300',
279
+ dateChanged: null,
280
+ locationTag: 'Main Pharmacy',
281
+ isSource: false,
282
+ isDestination: true,
283
+ links: [
284
+ {
285
+ rel: 'full',
286
+ uri: 'http://hie.kenyahmis.org/openmrs/ws/rest/v1/stockmanagement/stockoperationtypelocationscope/20fac1fa-28a4-11ed-bdcb-507b9dea1806?v=full',
287
+ resourceAlias: 'stockoperationtypelocationscope',
288
+ },
289
+ ],
290
+ resourceVersion: '1.8',
291
+ },
292
+ {
293
+ uuid: '11ebab13-2abf-11ed-ba4a-507b9dea1806',
294
+ dateCreated: '2024-03-13T15:41:30.000+0300',
295
+ dateChanged: null,
296
+ locationTag: 'Dispensary',
297
+ isSource: false,
298
+ isDestination: true,
299
+ links: [
300
+ {
301
+ rel: 'full',
302
+ uri: 'http://hie.kenyahmis.org/openmrs/ws/rest/v1/stockmanagement/stockoperationtypelocationscope/11ebab13-2abf-11ed-ba4a-507b9dea1806?v=full',
303
+ resourceAlias: 'stockoperationtypelocationscope',
304
+ },
305
+ ],
306
+ resourceVersion: '1.8',
307
+ },
308
+ {
309
+ uuid: '1c984ba0-28a4-11ed-bdcb-507b9dea1806',
310
+ dateCreated: '2024-03-13T15:41:30.000+0300',
311
+ dateChanged: null,
312
+ locationTag: 'Main Store',
313
+ isSource: true,
314
+ isDestination: false,
315
+ links: [
316
+ {
317
+ rel: 'full',
318
+ uri: 'http://hie.kenyahmis.org/openmrs/ws/rest/v1/stockmanagement/stockoperationtypelocationscope/1c984ba0-28a4-11ed-bdcb-507b9dea1806?v=full',
319
+ resourceAlias: 'stockoperationtypelocationscope',
320
+ },
321
+ ],
322
+ resourceVersion: '1.8',
323
+ },
324
+ ],
325
+ };
326
+
327
+ export const requisitionOperationTypeMock = {
328
+ uuid: '77777777-7777-7777-7777-777777777777',
329
+ dateCreated: '2022-07-31T00:00:00.000+0300',
330
+ dateChanged: null,
331
+ name: 'Requisition',
332
+ description: 'Request for items from another location.',
333
+ operationType: 'requisition',
334
+ hasSource: true,
335
+ sourceType: 'Location',
336
+ hasDestination: true,
337
+ destinationType: 'Location',
338
+ availableWhenReserved: false,
339
+ allowExpiredBatchNumbers: false,
340
+ stockOperationTypeLocationScopes: [
341
+ {
342
+ uuid: 'dfba06ad-2abe-11ed-ba4a-507b9dea1806',
343
+ dateCreated: '2024-03-13T15:41:31.000+0300',
344
+ dateChanged: null,
345
+ locationTag: 'Dispensary',
346
+ isSource: true,
347
+ isDestination: false,
348
+ links: [
349
+ {
350
+ rel: 'full',
351
+ uri: 'http://hie.kenyahmis.org/openmrs/ws/rest/v1/stockmanagement/stockoperationtypelocationscope/dfba06ad-2abe-11ed-ba4a-507b9dea1806?v=full',
352
+ resourceAlias: 'stockoperationtypelocationscope',
353
+ },
354
+ ],
355
+ resourceVersion: '1.8',
356
+ },
357
+ {
358
+ uuid: '161ccea9-28a4-11ed-bdcb-507b9dea1806',
359
+ dateCreated: '2024-03-13T15:41:30.000+0300',
360
+ dateChanged: null,
361
+ locationTag: 'Main Pharmacy',
362
+ isSource: true,
363
+ isDestination: false,
364
+ links: [
365
+ {
366
+ rel: 'full',
367
+ uri: 'http://hie.kenyahmis.org/openmrs/ws/rest/v1/stockmanagement/stockoperationtypelocationscope/161ccea9-28a4-11ed-bdcb-507b9dea1806?v=full',
368
+ resourceAlias: 'stockoperationtypelocationscope',
369
+ },
370
+ ],
371
+ resourceVersion: '1.8',
372
+ },
373
+ {
374
+ uuid: '11ba3575-28a4-11ed-bdcb-507b9dea1806',
375
+ dateCreated: '2024-03-13T15:41:31.000+0300',
376
+ dateChanged: null,
377
+ locationTag: 'Main Store',
378
+ isSource: false,
379
+ isDestination: true,
380
+ links: [
381
+ {
382
+ rel: 'full',
383
+ uri: 'http://hie.kenyahmis.org/openmrs/ws/rest/v1/stockmanagement/stockoperationtypelocationscope/11ba3575-28a4-11ed-bdcb-507b9dea1806?v=full',
384
+ resourceAlias: 'stockoperationtypelocationscope',
385
+ },
386
+ ],
387
+ resourceVersion: '1.8',
388
+ },
389
+ ],
390
+ };
391
+
392
+ export const stockTakeOperationTypeMock = {
393
+ uuid: '88888888-8888-8888-8888-888888888888',
394
+ dateCreated: '2022-07-31T00:00:00.000+0300',
395
+ dateChanged: null,
396
+ name: 'Stock Take',
397
+ description: 'Physical verification of item quantities.',
398
+ operationType: 'stocktake',
399
+ hasSource: true,
400
+ sourceType: 'Location',
401
+ hasDestination: false,
402
+ destinationType: null,
403
+ availableWhenReserved: true,
404
+ allowExpiredBatchNumbers: false,
405
+ stockOperationTypeLocationScopes: [
406
+ {
407
+ uuid: '86fad5b3-2abf-11ed-ba4a-507b9dea1806',
408
+ dateCreated: '2024-03-13T15:41:32.000+0300',
409
+ dateChanged: null,
410
+ locationTag: 'Dispensary',
411
+ isSource: true,
412
+ isDestination: false,
413
+ links: [
414
+ {
415
+ rel: 'full',
416
+ uri: 'http://hie.kenyahmis.org/openmrs/ws/rest/v1/stockmanagement/stockoperationtypelocationscope/86fad5b3-2abf-11ed-ba4a-507b9dea1806?v=full',
417
+ resourceAlias: 'stockoperationtypelocationscope',
418
+ },
419
+ ],
420
+ resourceVersion: '1.8',
421
+ },
422
+ {
423
+ uuid: '90b9f544-2abf-11ed-ba4a-507b9dea1806',
424
+ dateCreated: '2024-03-13T15:41:31.000+0300',
425
+ dateChanged: null,
426
+ locationTag: 'Main Store',
427
+ isSource: true,
428
+ isDestination: false,
429
+ links: [
430
+ {
431
+ rel: 'full',
432
+ uri: 'http://hie.kenyahmis.org/openmrs/ws/rest/v1/stockmanagement/stockoperationtypelocationscope/90b9f544-2abf-11ed-ba4a-507b9dea1806?v=full',
433
+ resourceAlias: 'stockoperationtypelocationscope',
434
+ },
435
+ ],
436
+ resourceVersion: '1.8',
437
+ },
438
+ {
439
+ uuid: '8ab5bb1d-2abf-11ed-ba4a-507b9dea1806',
440
+ dateCreated: '2024-03-13T15:41:32.000+0300',
441
+ dateChanged: null,
442
+ locationTag: 'Main Pharmacy',
443
+ isSource: true,
444
+ isDestination: false,
445
+ links: [
446
+ {
447
+ rel: 'full',
448
+ uri: 'http://hie.kenyahmis.org/openmrs/ws/rest/v1/stockmanagement/stockoperationtypelocationscope/8ab5bb1d-2abf-11ed-ba4a-507b9dea1806?v=full',
449
+ resourceAlias: 'stockoperationtypelocationscope',
450
+ },
451
+ ],
452
+ resourceVersion: '1.8',
453
+ },
454
+ ],
455
+ };
456
+
457
+ export const openingStockOperationTypeMock = {
458
+ uuid: '99999999-9999-9999-9999-999999999999',
459
+ dateCreated: '2022-07-31T00:00:00.000+0300',
460
+ dateChanged: null,
461
+ name: 'Opening Stock',
462
+ description: 'Initial physical item quantities.',
463
+ operationType: 'initial',
464
+ hasSource: true,
465
+ sourceType: 'Location',
466
+ hasDestination: false,
467
+ destinationType: null,
468
+ availableWhenReserved: false,
469
+ allowExpiredBatchNumbers: false,
470
+ stockOperationTypeLocationScopes: [
471
+ {
472
+ uuid: '99e64f69-2e90-11ed-a5a0-507b9dea1806',
473
+ dateCreated: '2024-03-13T15:41:33.000+0300',
474
+ dateChanged: null,
475
+ locationTag: 'Main Pharmacy',
476
+ isSource: true,
477
+ isDestination: false,
478
+ links: [
479
+ {
480
+ rel: 'full',
481
+ uri: 'http://hie.kenyahmis.org/openmrs/ws/rest/v1/stockmanagement/stockoperationtypelocationscope/99e64f69-2e90-11ed-a5a0-507b9dea1806?v=full',
482
+ resourceAlias: 'stockoperationtypelocationscope',
483
+ },
484
+ ],
485
+ resourceVersion: '1.8',
486
+ },
487
+ {
488
+ uuid: '886b6f2d-2e90-11ed-a5a0-507b9dea1806',
489
+ dateCreated: '2024-03-13T15:41:32.000+0300',
490
+ dateChanged: null,
491
+ locationTag: 'Main Store',
492
+ isSource: true,
493
+ isDestination: false,
494
+ links: [
495
+ {
496
+ rel: 'full',
497
+ uri: 'http://hie.kenyahmis.org/openmrs/ws/rest/v1/stockmanagement/stockoperationtypelocationscope/886b6f2d-2e90-11ed-a5a0-507b9dea1806?v=full',
498
+ resourceAlias: 'stockoperationtypelocationscope',
499
+ },
500
+ ],
501
+ resourceVersion: '1.8',
502
+ },
503
+ {
504
+ uuid: 'a24c5c90-2e90-11ed-a5a0-507b9dea1806',
505
+ dateCreated: '2024-03-13T15:41:33.000+0300',
506
+ dateChanged: null,
507
+ locationTag: 'Dispensary',
508
+ isSource: true,
509
+ isDestination: false,
510
+ links: [
511
+ {
512
+ rel: 'full',
513
+ uri: 'http://hie.kenyahmis.org/openmrs/ws/rest/v1/stockmanagement/stockoperationtypelocationscope/a24c5c90-2e90-11ed-a5a0-507b9dea1806?v=full',
514
+ resourceAlias: 'stockoperationtypelocationscope',
515
+ },
516
+ ],
517
+ resourceVersion: '1.8',
518
+ },
519
+ ],
520
+ };
521
+
522
+ export const operationTypesMock = [
523
+ adjustmentOpeationTypeMock,
524
+ disposalOperationTypeMock,
525
+ tranferOutOperationTypeMock,
526
+ receiptOperationTypeMock,
527
+ returnOperationTypeMock,
528
+ stockIssueOperationtypeMock,
529
+ requisitionOperationTypeMock,
530
+ stockTakeOperationTypeMock,
531
+ openingStockOperationTypeMock,
532
+ ];
package/dist/155.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(globalThis.webpackChunk_openmrs_esm_stock_management_app=globalThis.webpackChunk_openmrs_esm_stock_management_app||[]).push([[155],{6433:(e,n,t)=>{t.d(n,{Z:()=>r});var a=t(1364),i=t.n(a),o=t(1682),l=t.n(o)()(i());l.push([e.id,".-esm-stock-management__stock-item-form__form___MGZrp{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%}.-esm-stock-management__stock-item-form__grid___JInL\\+{margin:1rem 1rem;padding:1rem 0 0 0}.-esm-stock-management__stock-item-form__button___OfxCY{display:flex;align-content:flex-start;align-items:baseline;min-width:50%}.-esm-stock-management__stock-item-form__buttonSet___ggJi5{display:flex;justify-content:space-between;width:100%}.-esm-stock-management__stock-item-form__datePickerInput___bHWQa span,.-esm-stock-management__stock-item-form__datePickerInput___bHWQa div,.-esm-stock-management__stock-item-form__datePickerInput___bHWQa input,.-esm-stock-management__stock-item-form__datePickerInput___bHWQa{min-width:100%}.-esm-stock-management__stock-item-form__title___FJdW5{font-size:var(--cds-heading-02-font-size, 1rem);font-weight:var(--cds-heading-02-font-weight, 600);line-height:var(--cds-heading-02-line-height, 1.5);letter-spacing:var(--cds-heading-02-letter-spacing, 0);padding:.5rem}","",{version:3,sources:["webpack://./src/stock-operations/stock-operations-forms/stock-item-form/stock-item-form.scss","webpack://./node_modules/@carbon/type/scss/_styles.scss","webpack://./node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAIA,sDACE,YAAA,CACA,qBAAA,CACA,6BAAA,CACA,UAAA,CACA,WAAA,CAGF,uDACE,gBAAA,CACA,kBAAA,CAGF,wDACE,YAAA,CACA,wBAAA,CACA,oBAAA,CACA,aAAA,CAGF,2DACE,YAAA,CACA,6BAAA,CACA,UAAA,CAGF,mRAIE,cAAA,CAGF,uDC6zBI,+CAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CD3zBF,aElBW",sourcesContent:["@use '@carbon/type';\n@use '@carbon/layout';\n@use '@carbon/colors';\n\n.form {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n width: 100%;\n height: 100%;\n}\n\n.grid {\n margin: layout.$spacing-05 layout.$spacing-05;\n padding: layout.$spacing-05 0 0 0;\n}\n\n.button {\n display: flex;\n align-content: flex-start;\n align-items: baseline;\n min-width: 50%;\n}\n\n.buttonSet {\n display: flex;\n justify-content: space-between;\n width: 100%;\n}\n\n.datePickerInput span,\n.datePickerInput div,\n.datePickerInput input,\n.datePickerInput {\n min-width: 100%;\n}\n\n.title {\n @include type.type-style('heading-02');\n padding: layout.$spacing-03;\n}\n","//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n// stylelint-disable number-max-precision\n\n@use 'sass:map';\n@use 'sass:math';\n@use '@carbon/grid/scss/config' as gridconfig;\n@use '@carbon/grid/scss/breakpoint' as grid;\n@use 'prefix' as *;\n@use 'font-family';\n@use 'scale';\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$caption-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$caption-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$legal-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$legal-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$helper-text-01: (\n font-size: scale.type-scale(1),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$helper-text-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-compact-01: $body-short-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.42857,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-01: $body-long-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-compact-02: $body-short-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-02: $body-long-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-01: (\n font-family: font-family.font-family('mono'),\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-02: (\n font-family: font-family.font-family('mono'),\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.42857,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.42857,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-compact-01: $productive-heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-compact-02: $productive-heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-03: (\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-03: $productive-heading-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-04: (\n font-size: scale.type-scale(7),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-04: $productive-heading-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-05: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-05: $productive-heading-05 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-06: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n // Extra digit needed for precision in Chrome\n line-height: 1.199,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-06: $productive-heading-06 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-07: (\n font-size: scale.type-scale(12),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-07: $productive-heading-07 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-01: $heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-02: $heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-03: (\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: scale.type-scale(5),\n line-height: 1.4,\n ),\n max: (\n font-size: scale.type-scale(6),\n line-height: 1.334,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-03: $expressive-heading-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-04: (\n font-size: scale.type-scale(7),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n font-weight: font-family.font-weight('regular'),\n ),\n max: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-04: $expressive-heading-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-05: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n font-weight: font-family.font-weight('light'),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-05: $expressive-heading-05 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-06: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-06: $expressive-heading-06 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-paragraph-01: (\n font-size: scale.type-scale(6),\n font-weight: font-family.font-weight('light'),\n line-height: 1.334,\n letter-spacing: 0,\n breakpoints: (\n lg: (\n font-size: scale.type-scale(7),\n line-height: 1.28572,\n ),\n max: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n ),\n ),\n);\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-paragraph-01: $expressive-paragraph-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-01: (\n font-family: font-family.font-family('serif'),\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.3,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(5),\n ),\n lg: (\n font-size: scale.type-scale(6),\n line-height: 1.334,\n ),\n xlg: (\n font-size: scale.type-scale(7),\n line-height: 1.28572,\n ),\n max: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-quotation-01: $quotation-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-02: (\n font-family: font-family.font-family('serif'),\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('light'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-quotation-02: $quotation-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-01: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(10),\n ),\n lg: (\n font-size: scale.type-scale(12),\n ),\n xlg: (\n font-size: scale.type-scale(13),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-01: $display-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-02: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(10),\n ),\n lg: (\n font-size: scale.type-scale(12),\n ),\n xlg: (\n font-size: scale.type-scale(13),\n line-height: 1.16,\n ),\n max: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-02: $display-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-03: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(12),\n line-height: 1.18,\n ),\n lg: (\n font-size: scale.type-scale(13),\n line-height: 1.16,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: scale.type-scale(16),\n line-height: 1.11,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-03: $display-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-04: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(14),\n line-height: 1.15,\n ),\n lg: (\n font-size: scale.type-scale(17),\n line-height: 1.11,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: scale.type-scale(20),\n line-height: 1.07,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: scale.type-scale(23),\n line-height: 1.05,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-04: $display-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$tokens: (\n caption-01: $caption-01,\n caption-02: $caption-02,\n label-01: $label-01,\n label-02: $label-02,\n helper-text-01: $helper-text-01,\n helper-text-02: $helper-text-02,\n body-short-01: $body-short-01,\n body-short-02: $body-short-02,\n body-long-01: $body-long-01,\n body-long-02: $body-long-02,\n code-01: $code-01,\n code-02: $code-02,\n heading-01: $heading-01,\n heading-02: $heading-02,\n productive-heading-01: $productive-heading-01,\n productive-heading-02: $productive-heading-02,\n productive-heading-03: $productive-heading-03,\n productive-heading-04: $productive-heading-04,\n productive-heading-05: $productive-heading-05,\n productive-heading-06: $productive-heading-06,\n productive-heading-07: $productive-heading-07,\n expressive-paragraph-01: $expressive-paragraph-01,\n expressive-heading-01: $expressive-heading-01,\n expressive-heading-02: $expressive-heading-02,\n expressive-heading-03: $expressive-heading-03,\n expressive-heading-04: $expressive-heading-04,\n expressive-heading-05: $expressive-heading-05,\n expressive-heading-06: $expressive-heading-06,\n quotation-01: $quotation-01,\n quotation-02: $quotation-02,\n display-01: $display-01,\n display-02: $display-02,\n display-03: $display-03,\n display-04: $display-04,\n // V11 Tokens\n legal-01: $legal-01,\n legal-02: $legal-02,\n body-compact-01: $body-compact-01,\n body-compact-02: $body-compact-02,\n heading-compact-01: $heading-compact-01,\n heading-compact-02: $heading-compact-02,\n body-01: $body-01,\n body-02: $body-02,\n heading-03: $heading-03,\n heading-04: $heading-04,\n heading-05: $heading-05,\n heading-06: $heading-06,\n heading-07: $heading-07,\n fluid-heading-03: $fluid-heading-03,\n fluid-heading-04: $fluid-heading-04,\n fluid-heading-05: $fluid-heading-05,\n fluid-heading-06: $fluid-heading-06,\n fluid-paragraph-01: $fluid-paragraph-01,\n fluid-quotation-01: $fluid-quotation-01,\n fluid-quotation-02: $fluid-quotation-02,\n fluid-display-01: $fluid-display-01,\n fluid-display-02: $fluid-display-02,\n fluid-display-03: $fluid-display-03,\n fluid-display-04: $fluid-display-04,\n) !default;\n\n/// @param {Map} $map\n/// @access public\n/// @group @carbon/type\n@mixin properties($map) {\n @each $name, $value in $map {\n #{$name}: $value;\n }\n}\n\n/// @param {Number} $value - Number with units\n/// @return {Number} Without units\n/// @access public\n/// @group @carbon/type\n@function strip-unit($value) {\n @return math.div($value, $value * 0 + 1);\n}\n\n/// This helper includes fluid type styles for the given token value. Fluid type\n/// means that the `font-size` is computed using `calc()` in order to be\n/// determined by the screen size instead of a breakpoint. As a result, fluid\n/// styles should be used with caution in fixed width contexts.\n///\n/// In addition, we make use of %-based line-heights so that the line-height of\n/// each type style is computed correctly due to the dynamic nature of the\n/// `font-size`.\n///\n/// Most of the logic for this work comes from CSS Tricks:\n/// https://css-tricks.com/snippets/css/fluid-typography/\n///\n/// @param {Map} $type-styles - The value of a given type token\n/// @param {Map} $breakpoints [$grid-breakpoints] - Custom breakpoints to use\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type($type-styles, $breakpoints: gridconfig.$grid-breakpoints) {\n // Include the initial styles for the given token by default without any\n // media query guard. This includes `font-size` as a fallback in the case\n // that a browser does not support `calc()`\n @include properties(map.remove($type-styles, breakpoints));\n // We also need to include the `sm` styles by default since they don't\n // appear in the fluid styles for tokens\n @include fluid-type-size($type-styles, sm, $breakpoints);\n\n // Finally, we need to go through all the breakpoints defined in the type\n // token and apply the properties and fluid type size for that given\n // breakpoint\n @each $name, $values in map.get($type-styles, breakpoints) {\n @include grid.breakpoint($name) {\n @include properties($values);\n @include fluid-type-size($type-styles, $name, $breakpoints);\n }\n }\n}\n\n/// Computes the fluid `font-size` for a given type style and breakpoint\n/// @param {Map} $type-styles - The styles for a given token\n/// @param {String} $name - The name of the breakpoint to which we apply the fluid\n/// @param {Map} $breakpoints [$grid-breakpoints] - The breakpoints for the grid system\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type-size(\n $type-styles,\n $name,\n $breakpoints: gridconfig.$grid-breakpoints\n) {\n // Get the information about the breakpoint we're currently working in. Useful\n // for getting initial width information\n $breakpoint: map.get($breakpoints, $name);\n\n // Our fluid styles are captured under the 'breakpoints' property in our type\n // styles map. These define what values to treat as `max-` variables below\n $fluid-sizes: map.get($type-styles, breakpoints);\n $fluid-breakpoint: ();\n // Special case for `sm` because the styles for small are on the type style\n // directly\n @if $name == sm {\n $fluid-breakpoint: map.remove($type-styles, breakpoints);\n } @else {\n $fluid-breakpoint: map.get($fluid-sizes, $name);\n }\n\n // Initialize our font-sizes to the default size for the type style\n $max-font-size: map.get($type-styles, font-size);\n $min-font-size: map.get($type-styles, font-size);\n @if map.has-key($fluid-breakpoint, font-size) {\n $min-font-size: map.get($fluid-breakpoint, font-size);\n }\n\n // Initialize our min and max width to the width of the current breakpoint\n $max-vw: map.get($breakpoint, width);\n $min-vw: map.get($breakpoint, width);\n\n // We can use `breakpoint-next` to see if there is another breakpoint we can\n // use to update `max-font-size` and `max-vw` with larger values\n $next-breakpoint-available: grid.breakpoint-next($name, $breakpoints);\n $next-fluid-breakpoint-name: null;\n\n // We need to figure out what the next available fluid breakpoint is for our\n // given $type-styles. In this loop we try and iterate through breakpoints\n // until we either manually set $next-breakpoint-available to null or\n // `breakpoint-next` returns null.\n @while $next-breakpoint-available {\n @if map.has-key($fluid-sizes, $next-breakpoint-available) {\n $next-fluid-breakpoint-name: $next-breakpoint-available;\n $next-breakpoint-available: null;\n } @else {\n $next-breakpoint-available: grid.breakpoint-next(\n $next-breakpoint-available,\n $breakpoints\n );\n }\n }\n\n // If we have found the next available fluid breakpoint name, then we know\n // that we have values that we can use to set max-font-size and max-vw as both\n // values derive from the next breakpoint\n @if $next-fluid-breakpoint-name {\n $next-fluid-breakpoint: map.get($breakpoints, $next-fluid-breakpoint-name);\n $max-font-size: map.get(\n map.get($fluid-sizes, $next-fluid-breakpoint-name),\n font-size\n );\n $max-vw: map.get($next-fluid-breakpoint, width);\n\n // prettier-ignore\n font-size: calc(#{$min-font-size} +\n #{strip-unit($max-font-size - $min-font-size)} *\n ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)})\n );\n } @else {\n // Otherwise, just default to setting the font size found from the type\n // style or the given fluid breakpoint in the type style\n font-size: $min-font-size;\n }\n}\n\n// TODO move following variable and `custom-property` mixin into shared file for\n// both `@carbon/type` and `@carbon/themes`\n\n/// @access private\n/// @group @carbon/type\n@mixin custom-properties($name, $value) {\n @each $property, $value in $value {\n #{$property}: var(\n --#{$custom-property-prefix}-#{$name}-#{$property},\n #{$value}\n );\n }\n}\n\n/// Helper mixin to include the styles for a given token in any selector in your\n/// project. Also includes an optional fluid option that will enable fluid\n/// styles for the token if they are defined. Fluid styles will cause the\n/// token's font-size to be computed based on the viewport size. As a result, use\n/// with caution in fixed contexts.\n/// @param {String} $name - The name of the token to get the styles for\n/// @param {Boolean} $fluid [false] - Specify whether to include fluid styles for the\n/// @param {Map} $breakpoints [$grid-breakpoints] - Provide a custom breakpoint map to use\n/// @access public\n/// @group @carbon/type\n@mixin type-style(\n $name,\n $fluid: false,\n $breakpoints: gridconfig.$grid-breakpoints\n) {\n @if not map.has-key($tokens, $name) {\n @error 'Unable to find a token with the name: `#{$name}`';\n }\n\n $token: map.get($tokens, $name);\n\n // If $fluid is set to true and the token has breakpoints defined for fluid\n // styles, delegate to the fluid-type helper for the given token\n @if $fluid == true and map.has-key($token, 'breakpoints') {\n @include fluid-type($token, $breakpoints);\n } @else {\n @include custom-properties($name, $token);\n }\n}\n","// Code generated by @carbon/layout. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-01: 0.125rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-02: 0.25rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-03: 0.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-04: 0.75rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-05: 1rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-06: 1.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-07: 2rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-08: 2.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-09: 3rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-10: 4rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-11: 5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-12: 6rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-13: 10rem !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/layout\n$spacing: (\n spacing-01: $spacing-01,\n spacing-02: $spacing-02,\n spacing-03: $spacing-03,\n spacing-04: $spacing-04,\n spacing-05: $spacing-05,\n spacing-06: $spacing-06,\n spacing-07: $spacing-07,\n spacing-08: $spacing-08,\n spacing-09: $spacing-09,\n spacing-10: $spacing-10,\n spacing-11: $spacing-11,\n spacing-12: $spacing-12,\n spacing-13: $spacing-13,\n);\n"],sourceRoot:""}]),l.locals={form:"-esm-stock-management__stock-item-form__form___MGZrp",grid:"-esm-stock-management__stock-item-form__grid___JInL+",button:"-esm-stock-management__stock-item-form__button___OfxCY",buttonSet:"-esm-stock-management__stock-item-form__buttonSet___ggJi5",datePickerInput:"-esm-stock-management__stock-item-form__datePickerInput___bHWQa",title:"-esm-stock-management__stock-item-form__title___FJdW5"};const r=l},1155:(e,n,t)=>{t.r(n),t.d(n,{default:()=>G});var a=t(4929),i=t(6312),o=t(1672),l=t.n(o),r=t(7536),s=t(3397),c=t(826),p=t(5127),u=t(3566),d=t(7701),f=t(1938),g=t(6066),h=t(3042);function y(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const m=function(e){var n=e.stockItemUuid,t=e.error,i=e.initialValue,r=e.onValueChange,p=(0,h.S)(n),u=p.isLoading,d=p.stockItemBatchNos,f=(0,s.useTranslation)().t,m=(0,g.b)(),b=m.items,$=m.setStockItemUuid,v=m.isLoading;(0,o.useEffect)((function(){$(n)}),[n,$]);var k=(0,o.useMemo)((function(){return null==d?void 0:d.map((function(e){var n,t,a,i=null==b?void 0:b.find((function(n){return n.batchNumber===e.batchNo}));return i?(t=function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},a=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),a.forEach((function(n){y(e,n,t[n])}))}return e}({},e),a=null!=(a={quantity:null!==(n=i.quantity)&&void 0!==n?n:""})?a:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t.push.apply(t,a)}return t}(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))})),t):e}))}),[d,b]),w=(0,o.useMemo)((function(){return null==k?void 0:k.filter((function(e){return void 0!==e.quantity&&0!==e.quantity}))}),[k]),x=(0,o.useMemo)((function(){return null==w?void 0:w.find((function(e){return e.uuid===i}))}),[w,i]);return u||v?l().createElement(a.xNL,{role:"progressbar"}):l().createElement(a.CtY,{style:{flexGrow:"1"},titleText:f("batchNo","Batch"),name:"stockBatchUuid",id:"stockBatchUuid",items:w||[],onChange:function(e){var n;r(null===(n=e.selectedItem)||void 0===n?void 0:n.uuid)},selectedItem:x,itemToString:function(e){var n;return(null==e?void 0:e.batchNo)?"".concat(null==e?void 0:e.batchNo," | Qty: ").concat(null!==(n=null==e?void 0:e.quantity)&&void 0!==n?n:"Unknown"," | Expiry: ").concat((0,c.KA)(e.expiration)):""},placeholder:f("filter","'Filter")+"...",invalid:t,invalidText:t})},b=function(e){var n,t=e.stockItemUuid,i=e.error,r=e.intiallvalue,c=e.onValueChange,p=(0,s.useTranslation)().t,d=(0,u.GY)(t),f=d.isLoading,g=d.error,h=d.item,y=(0,o.useMemo)((function(){var e;return(null!==(e=null==h?void 0:h.packagingUnits)&&void 0!==e?e:[]).find((function(e){return e.uuid===r}))}),[null==h?void 0:h.packagingUnits,r]);return f?l().createElement(a.N2B,{role:"progressbar"}):g?l().createElement(a.K0D,{kind:"error",title:p("packagingUomError","Error loading Stock item"),subtitle:null==g?void 0:g.message}):l().createElement(a.CtY,{titleText:p("quantityUom","Qty UoM"),name:"stockItemPackagingUOMUuid",id:"stockItemPackagingUOMUuid",items:null!==(n=null==h?void 0:h.packagingUnits)&&void 0!==n?n:[],onChange:function(e){var n;null==c||c(null===(n=e.selectedItem)||void 0===n?void 0:n.uuid)},initialSelectedItem:y,itemToString:function(e){return e.packagingUomName?"".concat(null==e?void 0:e.packagingUomName," - ").concat(null==e?void 0:e.factor," "):""},placeholder:p("filter","Filter")+"...",invalid:i,invalidText:i})};var $=t(7410),v=t.n($),k=t(4766),w=t.n(k),x=t(1991),A=t.n(x),_=t(3702),z=t.n(_),M=t(2434),C=t.n(M),I=t(1422),O=t.n(I),E=t(6433),S={};S.styleTagTransform=O(),S.setAttributes=z(),S.insert=A().bind(null,"head"),S.domAPI=w(),S.insertStyleElement=C(),v()(E.Z,S);const N=E.Z&&E.Z.locals?E.Z.locals:void 0;function P(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=new Array(n);t<n;t++)a[t]=e[t];return a}function U(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var a,i,o=[],l=!0,r=!1;try{for(t=t.call(e);!(l=(a=t.next()).done)&&(o.push(a.value),!n||o.length!==n);l=!0);}catch(e){r=!0,i=e}finally{try{l||null==t.return||t.return()}finally{if(r)throw i}}return o}}(e,n)||function(e,n){if(e){if("string"==typeof e)return P(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?P(e,n):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const j=function(e){var n=e.defaultValue,t=e.onValueChange,i=e.error,r=e.stockItemUuid,c=e.stockOperationItemUuid,p=(0,h.S)(r),u=p.isLoading,d=p.stockItemBatchNos,f=U((0,o.useState)(n),2),g=f[0],y=f[1],m=U((0,o.useState)(),2),b=m[0],$=m[1],v=(0,s.useTranslation)().t,k=(0,o.useMemo)((function(){return c.startsWith("new-item")}),[c]),w=(0,o.useMemo)((function(){return k&&-1!==(null==d?void 0:d.findIndex((function(e){return e.batchNo===g})))}),[d,g,k]);return(0,o.useEffect)((function(){n&&y(null!=n?n:"")}),[n]),(0,o.useEffect)((function(){w?$("Batch number already used"):($(void 0),null==t||t(g))}),[g,t,w,$]),u?l().createElement(a.znL,null):l().createElement(a.oil,{maxLength:50,onChange:function(e){return y(e.target.value)},value:g,invalidText:null!=b?b:i,invalid:null!=b?b:i,placeholder:v("batchNumber","Batch Number"),labelText:v("batchNumber","Batch Number")})};function T(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=new Array(n);t<n;t++)a[t]=e[t];return a}function q(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function B(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},a=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),a.forEach((function(n){q(e,n,t[n])}))}return e}function D(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t.push.apply(t,a)}return t}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}const G=function(e){var n=e.closeWorkspace,t=e.stockOperationType,g=e.stockOperationItem,h=e.onSave,y=(0,o.useMemo)((function(){return(0,p.E3)(t.operationType)}),[t]),$=(0,o.useMemo)((function(){return(0,d.NE)(y)}),[y]),v=(0,f.Z)(t),k=$.keyof().options,w=(0,r.cI)({resolver:(0,i.F)($),defaultValues:g,mode:"all"}),x=(0,s.useTranslation)().t,A=(0,u.GY)(w.getValues("stockItemUuid")).item;return l().createElement(a.l09,{onSubmit:w.handleSubmit((function(e){null==h||h(e),n()})),className:N.form},l().createElement(a.Kqy,{gap:4,className:N.grid},(null==A?void 0:A.commonName)&&l().createElement("p",{className:N.title},null==A?void 0:A.commonName),(v.requiresActualBatchInfo||v.requiresBatchUuid)&&k.includes("batchNo")&&l().createElement(a.sgG,null,l().createElement(r.Qr,{control:w.control,defaultValue:null==g?void 0:g.batchNo,name:"batchNo",render:function(e){var n=e.field,t=e.fieldState.error;return l().createElement(j,{defaultValue:n.value,onValueChange:n.onChange,stockItemUuid:g.stockItemUuid,error:null==t?void 0:t.message,stockOperationItemUuid:g.uuid})}})),v.requiresBatchUuid&&!v.requiresActualBatchInfo&&l().createElement(a.sgG,null,l().createElement(r.Qr,{control:w.control,name:"stockBatchUuid",render:function(e){var n=e.field,t=e.fieldState.error;return l().createElement(m,{initialValue:null==g?void 0:g.stockBatchUuid,onValueChange:n.onChange,stockItemUuid:g.stockItemUuid,error:null==t?void 0:t.message})}})),(v.requiresActualBatchInfo||v.requiresBatchUuid)&&k.includes("expiration")&&l().createElement(a.sgG,null,l().createElement(r.Qr,{control:w.control,name:"expiration",render:function(e){var n=e.field,t=e.fieldState.error;return l().createElement(a.Mtg,D(B({id:"expiration",datePickerType:"single",minDate:(0,c.KA)((0,c.Lg)()),locale:"en",className:N.datePickerInput,dateFormat:c.fk},n),{onChange:function(e){var t,a,i=(t=e,a=1,function(e){if(Array.isArray(e))return e}(t)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var a,i,o=[],l=!0,r=!1;try{for(t=t.call(e);!(l=(a=t.next()).done)&&(o.push(a.value),!n||o.length!==n);l=!0);}catch(e){r=!0,i=e}finally{try{l||null==t.return||t.return()}finally{if(r)throw i}}return o}}(t,a)||function(e,n){if(e){if("string"==typeof e)return T(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?T(e,n):void 0}}(t,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];n.onChange(i)}}),l().createElement(a.aj6,{autoComplete:"off",id:"expiration-input",name:"operationDate",placeholder:c.Pq,labelText:x("expiriation","Expiration Date"),invalid:null==t?void 0:t.message}))}})),l().createElement(a.sgG,null,l().createElement(r.Qr,{control:w.control,name:"quantity",render:function(e){var n=e.field,t=e.fieldState.error;return l().createElement(a.Y2U,D(B({allowEmpty:!0,className:"small-placeholder-text",disableWheel:!0,hideSteppers:!0,id:"qty"},n),{label:x("qty","Qty"),invalidText:null==t?void 0:t.message,invalid:null==t?void 0:t.message}))}})),l().createElement(a.sgG,null,l().createElement(r.Qr,{control:w.control,name:"stockItemPackagingUOMUuid",render:function(e){var n=e.field,t=e.fieldState.error;return l().createElement(b,{stockItemUuid:null==g?void 0:g.stockItemUuid,intiallvalue:n.value,error:null==t?void 0:t.message,onValueChange:n.onChange})}})),(null==v?void 0:v.canCaptureQuantityPrice)&&k.includes("purchasePrice")&&l().createElement(a.sgG,null,l().createElement(r.Qr,{control:w.control,name:"purchasePrice",render:function(e){var n=e.field,t=e.fieldState.error;return l().createElement(a.oil,D(B({},n),{labelText:x("purchasePrice","Purchase Price"),invalid:null==t?void 0:t.message,invalidText:null==t?void 0:t.message,id:"purchaseprice",placeholder:x("purchasePrice","Purchase Price")}))}}))),l().createElement(a.uVA,{className:N.buttonSet},l().createElement(a.zxk,{className:N.button,kind:"secondary",onClick:n},x("discard","Discard")),l().createElement(a.zxk,{className:N.button,kind:"primary",type:"submit",disabled:w.formState.isSubmitting},x("save","Save"))))}}}]);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"155.js","mappings":"mNAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,mhCAAohC,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,+FAA+F,0DAA0D,wEAAwE,MAAQ,GAAG,SAAW,8PAA8P,eAAiB,CAAC,ksBAAksB,u8uBAAu8uB,25DAA25D,WAAa,MAEhp3BH,EAAwBI,OAAS,CAChC,KAAQ,uDACR,KAAQ,uDACR,OAAU,yDACV,UAAa,4DACb,gBAAmB,kEACnB,MAAS,yDAEV,S,2SCwDA,QAxDwD,Y,IAAGC,EAAAA,EAAAA,cAAeC,EAAAA,EAAAA,MAAOC,EAAAA,EAAAA,aAAcC,EAAAA,EAAAA,cACpDC,GAAAA,EAAAA,EAAAA,GAAyBJ,GAA1DK,EAAiCD,EAAjCC,UAAWC,EAAsBF,EAAtBE,kBACb,GAAQC,EAAAA,EAAAA,kBAANC,EAE2DC,GAAAA,EAAAA,EAAAA,KAA3DC,EAA2DD,EAA3DC,MAAOC,EAAoDF,EAApDE,iBAAkBN,EAAkCI,EAAlCJ,WAEjCO,EAAAA,EAAAA,YAAU,WACRD,EAAiBX,EACnB,GAAG,CAACA,EAAeW,IAEnB,IAAME,GAAuBC,EAAAA,EAAAA,UAAQ,WACnC,OAAOR,aAAAA,EAAAA,EAAmBS,KAAI,SAACC,GAC7B,IAIcC,E,IA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zD1E,EAAE,UAAW,YAEhB,kBAACwI,EAAAA,IAAMA,CAACxC,UAAWC,EAAOwC,OAAQ5F,KAAK,UAAU8F,KAAK,SAASC,SAAUtD,EAAKuD,UAAUC,cACrF9I,EAAE,OAAQ,UAKrB,C","sources":["webpack://@openmrs/esm-stock-management-app/./src/stock-operations/stock-operations-forms/stock-item-form/stock-item-form.scss","webpack://@openmrs/esm-stock-management-app/./src/stock-operations/stock-operations-forms/input-components/batch-no-selector.component.tsx","webpack://@openmrs/esm-stock-management-app/./src/stock-operations/stock-operations-forms/input-components/quantity-uom-selector.component.tsx","webpack://@openmrs/esm-stock-management-app/./src/stock-operations/stock-operations-forms/stock-item-form/stock-item-form.scss?87cc","webpack://@openmrs/esm-stock-management-app/./src/stock-operations/stock-operations-forms/input-components/unique-batch-no-entry-input.component.tsx","webpack://@openmrs/esm-stock-management-app/./src/stock-operations/stock-operations-forms/stock-item-form/stock-item-form.workspace.tsx"],"names":["___CSS_LOADER_EXPORT___","push","module","id","locals","stockItemUuid","error","initialValue","onValueChange","useStockItemBatchNumbers","isLoading","stockItemBatchNos","useTranslation","t","useStockItemBatchInformationHook","items","setStockItemUuid","useEffect","stockItemBatchesInfo","useMemo","map","item","matchingBatch","find","batch","batchNumber","batchNo","quantity","filteredBatches","filter","s","undefined","initialSelectedItem","uuid","isLoadingBatchinfo","SelectSkeleton","role","ComboBox","style","flexGrow","titleText","name","onChange","data","selectedItem","itemToString","formatForDatePicker","expiration","placeholder","invalid","invalidText","intiallvalue","useStockItem","packagingUnits","u","SkeletonText","stockItemError","InlineNotification","kind","title","subtitle","message","packagingUomName","factor","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","defaultValue","stockOperationItemUuid","useState","value","setValue","_error","setError","isNewItem","startsWith","batchNoAlreadyUsed","findIndex","TextInputSkeleton","TextInput","maxLength","e","target","labelText","closeWorkspace","stockOperationType","stockOperationItem","onSave","operationType","operationFromString","formschema","getStockOperationItemFormSchema","operationTypePermision","useOperationTypePermisions","fields","keyof","form","useForm","resolver","zodResolver","defaultValues","mode","getValues","Form","onSubmit","handleSubmit","className","styles","Stack","gap","grid","commonName","p","requiresActualBatchInfo","requiresBatchUuid","includes","Column","Controller","control","render","field","fieldState","UniqueBatchNoEntryInput","BatchNoSelector","stockBatchUuid","DatePicker","datePickerType","minDate","today","locale","datePickerInput","dateFormat","DATE_PICKER_CONTROL_FORMAT","newDate","DatePickerInput","autoComplete","DATE_PICKER_FORMAT","NumberInput","allowEmpty","disableWheel","hideSteppers","label","QtyUomSelector","canCaptureQuantityPrice","ButtonSet","buttonSet","Button","button","onClick","type","disabled","formState","isSubmitting"],"sourceRoot":""}