@openmrs/esm-stock-management-app 1.0.1-pre.788 → 1.0.1-pre.790

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 (44) hide show
  1. package/dist/493.js +1 -1
  2. package/dist/493.js.map +1 -1
  3. package/dist/880.js +1 -0
  4. package/dist/880.js.map +1 -0
  5. package/dist/942.js +1 -0
  6. package/dist/942.js.map +1 -0
  7. package/dist/main.js +1 -1
  8. package/dist/main.js.map +1 -1
  9. package/dist/openmrs-esm-stock-management-app.js +1 -1
  10. package/dist/openmrs-esm-stock-management-app.js.buildmanifest.json +41 -41
  11. package/dist/routes.json +1 -1
  12. package/package.json +1 -1
  13. package/src/index.ts +15 -21
  14. package/src/routes.json +5 -4
  15. package/src/stock-operations/add-stock-operation/stock-operations-expanded-row/stock-operation-expanded-row.component.tsx +32 -3
  16. package/src/stock-operations/edit-stock-operation/edit-stock-operation-action-menu.component.tsx +2 -2
  17. package/src/stock-operations/stock-operation-actions.component.tsx +81 -0
  18. package/src/stock-operations/stock-operation-links.component.tsx +82 -0
  19. package/src/stock-operations/stock-operation-reference.component.tsx +2 -2
  20. package/src/stock-operations/stock-operation-types-selector/stock-operation-types-selector.component.tsx +2 -2
  21. package/src/stock-operations/stock-operation.utils.tsx +8 -13
  22. package/src/stock-operations/stock-operations-dialog/stock-operations-issue-stock-button.component.tsx +2 -2
  23. package/src/stock-operations/stock-operations-forms/step1.test.tsx +158 -17
  24. package/src/stock-operations/stock-operations-forms/step2.test.tsx +53 -8
  25. package/src/stock-operations/stock-operations-forms/step3.test.tsx +63 -10
  26. package/src/stock-operations/stock-operations-forms/steps/base-operation-details-form-step.tsx +11 -9
  27. package/src/stock-operations/stock-operations-forms/steps/received-items.component.tsx +8 -7
  28. package/src/stock-operations/stock-operations-forms/steps/stock-operation-item-cell.component.tsx +8 -9
  29. package/src/stock-operations/stock-operations-forms/steps/stock-operation-items-form-step.component.tsx +21 -46
  30. package/src/stock-operations/stock-operations-forms/steps/stock-operation-items-form-step.scc.scss +4 -18
  31. package/src/stock-operations/stock-operations-forms/steps/stock-operation-submission-form-step.component.tsx +20 -15
  32. package/src/stock-operations/stock-operations-forms/stock-issue-form-initializer-with-related-requisition-operation.component.tsx +20 -3
  33. package/src/stock-operations/stock-operations-forms/stock-item-form/stock-item-form.workspace.tsx +3 -5
  34. package/src/stock-operations/stock-operations-forms/stock-operation-form.component.tsx +99 -57
  35. package/src/stock-operations/stock-operations-forms/stock-operation-form.scss +5 -24
  36. package/src/stock-operations/stock-operations-forms/stock-operation-related-link.component.tsx +2 -2
  37. package/src/stock-operations/stock-operations-forms/stock-operation-stepper/stepper.scss +14 -11
  38. package/src/stock-operations/stock-operations-forms/stock-operation-stepper/stock-operation-stepper.component.tsx +2 -6
  39. package/src/stock-operations/stock-operations-table.scss +20 -0
  40. package/dist/155.js +0 -1
  41. package/dist/155.js.map +0 -1
  42. package/dist/922.js +0 -1
  43. package/dist/922.js.map +0 -1
  44. package/src/stock-operations/stock-operations-forms/stock-operation-form-header.component.tsx +0 -166
@@ -1,7 +1,7 @@
1
1
  import { CircleDash } from '@carbon/react/icons';
2
2
  import { zodResolver } from '@hookform/resolvers/zod';
3
- import { parseDate, showSnackbar, useConfig, useSession } from '@openmrs/esm-framework';
4
- import React, { useEffect, useMemo, useState } from 'react';
3
+ import { DefaultWorkspaceProps, parseDate, showSnackbar, useConfig, useSession } from '@openmrs/esm-framework';
4
+ import React, { useCallback, useEffect, useMemo, useState } from 'react';
5
5
  import { FieldError, FormProvider, useForm } from 'react-hook-form';
6
6
  import { useTranslation } from 'react-i18next';
7
7
  import { ConfigObject } from '../../config-schema';
@@ -15,19 +15,20 @@ import {
15
15
  } from '../../core/api/types/stockOperation/StockOperationType';
16
16
  import { TabItem } from '../../core/components/tabs/types';
17
17
  import { otherUser, pick } from '../../core/utils/utils';
18
- import ReceivedItems from './steps/received-items.component';
19
18
  import {
19
+ BaseStockOperationItemFormData,
20
20
  getStockOperationFormSchema,
21
21
  getStockOperationItemFormSchema,
22
22
  StockOperationItemDtoSchema,
23
23
  } from '../validation-schema';
24
24
  import useOperationTypePermisions from './hooks/useOperationTypePermisions';
25
25
  import BaseOperationDetailsFormStep from './steps/base-operation-details-form-step';
26
+ import ReceivedItems from './steps/received-items.component';
26
27
  import StockOperationItemsFormStep from './steps/stock-operation-items-form-step.component';
27
28
  import StockOperationSubmissionFormStep from './steps/stock-operation-submission-form-step.component';
28
- import StockOperationFormHeader from './stock-operation-form-header.component';
29
- import StockOperationStepper from './stock-operation-stepper/stock-operation-stepper.component';
30
29
  import StockIssueFormInitializerWithRelatedRequisitionOperation from './stock-issue-form-initializer-with-related-requisition-operation.component';
30
+ import StockItemForm, { StockItemFormProps } from './stock-item-form/stock-item-form.workspace';
31
+ import StockOperationStepper from './stock-operation-stepper/stock-operation-stepper.component';
31
32
 
32
33
  /**
33
34
  * Props interface for the StockOperationForm component
@@ -37,7 +38,7 @@ import StockIssueFormInitializerWithRelatedRequisitionOperation from './stock-is
37
38
  * @property {string} [stockRequisitionUuid] - Requisition operation uuid used in stock issue stockOperation type
38
39
  * When undefined or null, the form will be in creation mode.
39
40
  */
40
- type StockOperationFormProps = {
41
+ type StockOperationFormProps = DefaultWorkspaceProps & {
41
42
  stockOperation?: StockOperationDTO;
42
43
  stockOperationType: StockOperationType;
43
44
  stockRequisitionUuid?: string;
@@ -47,6 +48,7 @@ const StockOperationForm: React.FC<StockOperationFormProps> = ({
47
48
  stockOperation,
48
49
  stockOperationType,
49
50
  stockRequisitionUuid,
51
+ closeWorkspace,
50
52
  }) => {
51
53
  const { t } = useTranslation();
52
54
  const operationType = useMemo(() => {
@@ -66,6 +68,64 @@ const StockOperationForm: React.FC<StockOperationFormProps> = ({
66
68
  (stockOperation.status === 'DISPATCHED' || stockOperation.status === 'COMPLETED')
67
69
  );
68
70
  }, [stockOperation]);
71
+ const {
72
+ user: { uuid: defaultLoggedUserUuid },
73
+ } = useSession();
74
+ const { autoPopulateResponsiblePerson } = useConfig<ConfigObject>();
75
+ const form = useForm<StockOperationItemDtoSchema>({
76
+ defaultValues: {
77
+ responsiblePersonUuid:
78
+ stockOperation?.responsiblePersonUuid ?? // if person uuid exist, make it default
79
+ (stockOperation?.responsiblePersonOther ? otherUser.uuid : undefined) ?? // if other resp person exist, default other user uuid
80
+ (autoPopulateResponsiblePerson ? defaultLoggedUserUuid : undefined), //Else default login user if configured
81
+ operationDate: stockOperation?.operationDate ? parseDate(stockOperation!.operationDate as any) : today(),
82
+ remarks: stockOperation?.remarks ?? '',
83
+
84
+ operationTypeUuid: stockOperation?.operationTypeUuid ?? stockOperationType?.uuid,
85
+ reasonUuid: stockOperation?.reasonUuid ?? '',
86
+ responsiblePersonOther: stockOperation?.responsiblePersonOther ?? '',
87
+ stockOperationItems:
88
+ stockOperation?.stockOperationItems?.map((item) =>
89
+ pick(
90
+ { ...item, expiration: item.expiration ? parseDate(item.expiration as any) : undefined },
91
+ stockOperationItemFormSchema.keyof().options,
92
+ ),
93
+ ) ?? [],
94
+ sourceUuid: stockOperation?.sourceUuid ?? '',
95
+ destinationUuid: stockOperation?.destinationUuid ?? '',
96
+ },
97
+ mode: 'all',
98
+ resolver: zodResolver(formschema),
99
+ });
100
+ const [renderItemForm, setRenderItemForm] = useState(false);
101
+ const [itemsFormProps, setItemFormProps] = useState<StockItemFormProps>();
102
+
103
+ const handleLaunchStockItem = useCallback(
104
+ (stockOperationItem?: BaseStockOperationItemFormData) => {
105
+ setItemFormProps({
106
+ stockOperationType,
107
+ stockOperationItem,
108
+ onSave: (data) => {
109
+ const items = (form.getValues('stockOperationItems') ?? []) as Array<BaseStockOperationItemFormData>;
110
+ const index = items.findIndex((i) => i.uuid === data.uuid);
111
+ if (index === -1) {
112
+ items.push(data);
113
+ } else {
114
+ items[index] = data;
115
+ }
116
+ form.setValue('stockOperationItems', items as any);
117
+ setRenderItemForm(false);
118
+ setItemFormProps(undefined);
119
+ },
120
+ onBack: () => {
121
+ setRenderItemForm(false);
122
+ setItemFormProps(undefined);
123
+ },
124
+ });
125
+ setRenderItemForm(true);
126
+ },
127
+ [stockOperationType, form, setItemFormProps, setRenderItemForm],
128
+ );
69
129
  const steps: TabItem[] = useMemo(() => {
70
130
  return [
71
131
  {
@@ -77,7 +137,7 @@ const StockOperationForm: React.FC<StockOperationFormProps> = ({
77
137
  onNext={() => setSelectedIndex(1)}
78
138
  />
79
139
  ),
80
- disabled: true,
140
+ disabled: false,
81
141
  },
82
142
  {
83
143
  name: t('stockItems', 'Stock Items'),
@@ -87,9 +147,10 @@ const StockOperationForm: React.FC<StockOperationFormProps> = ({
87
147
  stockOperationType={stockOperationType}
88
148
  onNext={() => setSelectedIndex(2)}
89
149
  onPrevious={() => setSelectedIndex(0)}
150
+ onLaunchItemsForm={handleLaunchStockItem}
90
151
  />
91
152
  ),
92
- disabled: true,
153
+ disabled: false,
93
154
  },
94
155
  {
95
156
  name: operationTypePermision?.requiresDispatchAcknowledgement ? 'Submit/Dispatch' : 'Submit/Complete',
@@ -99,9 +160,10 @@ const StockOperationForm: React.FC<StockOperationFormProps> = ({
99
160
  stockOperationType={stockOperationType}
100
161
  onPrevious={() => setSelectedIndex(1)}
101
162
  onNext={showReceivedItems ? () => setSelectedIndex(3) : undefined}
163
+ dismissWorkspace={closeWorkspace}
102
164
  />
103
165
  ),
104
- disabled: true,
166
+ disabled: false,
105
167
  },
106
168
  ].concat(
107
169
  showReceivedItems
@@ -109,51 +171,31 @@ const StockOperationForm: React.FC<StockOperationFormProps> = ({
109
171
  {
110
172
  name: t('receivedItems', 'Received Items'),
111
173
  component: <ReceivedItems stockOperation={stockOperation} onPrevious={() => setSelectedIndex(2)} />,
112
- disabled: true,
174
+ disabled: false,
113
175
  },
114
176
  ]
115
177
  : [],
116
178
  ) as TabItem[];
117
- }, [stockOperation, stockOperationType, t, operationTypePermision, showReceivedItems]);
118
- const {
119
- user: { uuid: defaultLoggedUserUuid },
120
- } = useSession();
121
- const { autoPopulateResponsiblePerson } = useConfig<ConfigObject>();
122
- const [selectedIndex, setSelectedIndex] = useState(0);
123
- const form = useForm<StockOperationItemDtoSchema>({
124
- // defaultValues: operationType === OperationType.STOCK_ISSUE_OPERATION_TYPE ? issueStockOperation : model,
125
- defaultValues: {
126
- responsiblePersonUuid:
127
- stockOperation?.responsiblePersonUuid ?? // if person uuid exist, make it default
128
- (stockOperation?.responsiblePersonOther ? otherUser.uuid : undefined) ?? // if other resp person exist, default other user uuid
129
- (autoPopulateResponsiblePerson ? defaultLoggedUserUuid : undefined), //Else default login user if configured
130
- operationDate: stockOperation?.operationDate ? parseDate(stockOperation!.operationDate as any) : today(),
131
- remarks: stockOperation?.remarks ?? '',
179
+ }, [
180
+ stockOperation,
181
+ stockOperationType,
182
+ t,
183
+ operationTypePermision,
184
+ showReceivedItems,
185
+ handleLaunchStockItem,
186
+ closeWorkspace,
187
+ ]);
132
188
 
133
- operationTypeUuid: stockOperation?.operationTypeUuid ?? stockOperationType?.uuid,
134
- reasonUuid: stockOperation?.reasonUuid ?? '',
135
- responsiblePersonOther: stockOperation?.responsiblePersonOther ?? '',
136
- stockOperationItems:
137
- stockOperation?.stockOperationItems?.map((item) =>
138
- pick(
139
- { ...item, expiration: item.expiration ? parseDate(item.expiration as any) : undefined },
140
- stockOperationItemFormSchema.keyof().options,
141
- ),
142
- ) ?? [],
143
- sourceUuid: stockOperation?.sourceUuid ?? '',
144
- destinationUuid: stockOperation?.destinationUuid ?? '',
145
- },
146
- mode: 'all',
147
- resolver: zodResolver(formschema),
148
- });
189
+ const [selectedIndex, setSelectedIndex] = useState(0);
149
190
 
150
191
  useEffect(() => {
151
- // Show error snackbar
192
+ // Display fields errors for stock operation items and operation type uuid
152
193
  Object.entries(form.formState.errors ?? {}).forEach(([key, val]) => {
153
194
  if (['stockOperationItems', 'operationTypeUuid'].includes(key)) {
154
- showSnackbar({ kind: 'error', title: key, subtitle: (val[key] as FieldError)?.message });
195
+ showSnackbar({ kind: 'error', title: key, subtitle: (val as FieldError)?.message });
155
196
  }
156
197
  });
198
+
157
199
  // Navigate to step where the error is
158
200
  const fieldSteps = [
159
201
  [
@@ -178,26 +220,26 @@ const StockOperationForm: React.FC<StockOperationFormProps> = ({
178
220
 
179
221
  return (
180
222
  <FormProvider {...form}>
181
- {stockOperation && (
182
- <StockOperationFormHeader stockOperationType={stockOperationType} stockOperation={stockOperation} />
183
- )}
184
223
  {stockOperationType.operationType === OperationType.STOCK_ISSUE_OPERATION_TYPE && (
185
224
  <StockIssueFormInitializerWithRelatedRequisitionOperation
186
225
  stockRequisitionUuid={stockRequisitionUuid as string}
187
226
  stockOperationType={stockOperationType}
188
227
  />
189
228
  )}
190
- <StockOperationStepper
191
- steps={steps.map((tab, index) => ({
192
- title: tab.name,
193
- component: tab.component,
194
- disabled: tab.disabled,
195
- // subTitle: `Subtitle for ${tab.name}`,
196
- icon: <CircleDash />,
197
- }))}
198
- selectedIndex={selectedIndex}
199
- onChange={setSelectedIndex}
200
- />
229
+ {renderItemForm ? (
230
+ <StockItemForm {...itemsFormProps} />
231
+ ) : (
232
+ <StockOperationStepper
233
+ steps={steps.map((tab, index) => ({
234
+ title: tab.name,
235
+ component: tab.component,
236
+ disabled: tab.disabled,
237
+ icon: <CircleDash />,
238
+ }))}
239
+ selectedIndex={selectedIndex}
240
+ onChange={setSelectedIndex}
241
+ />
242
+ )}
201
243
  </FormProvider>
202
244
  );
203
245
  };
@@ -66,15 +66,13 @@
66
66
  }
67
67
 
68
68
  .btnSet {
69
+ width: 100%;
70
+ flex: 1;
69
71
  display: flex;
70
- flex-direction: row;
72
+ flex-direction: row-reverse;
71
73
  gap: layout.$spacing-03;
72
74
  align-items: center;
73
- }
74
-
75
- .relatedLink {
76
- margin-left: layout.$spacing-02;
77
- color: colors.$blue-60;
75
+ margin-top: layout.$spacing-03;
78
76
  }
79
77
 
80
78
  .textHeading {
@@ -90,22 +88,5 @@
90
88
  .statusBody {
91
89
  display: flex;
92
90
  justify-content: space-between;
93
- margin: layout.$spacing-02;
94
- }
95
-
96
- .actionBtns {
97
- margin: layout.$spacing-03;
98
- display: flex;
99
- flex-direction: row;
100
- gap: layout.$spacing-03;
101
- flex-wrap: wrap;
102
- height: fit-content;
103
- }
104
-
105
- .operationlinkscontainer {
106
- margin: layout.$spacing-05;
107
- }
108
-
109
- .relatedTransactionHeader {
110
- color: colors.$green-50;
91
+ align-items: center;
111
92
  }
@@ -1,7 +1,7 @@
1
1
  import React, { useCallback } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { useStockOperationTypes } from '../../stock-lookups/stock-lookups.resource';
4
- import { launchStockoperationAddOrEditDialog } from '../stock-operation.utils';
4
+ import { launchStockoperationAddOrEditWorkSpace } from '../stock-operation.utils';
5
5
  import { useStockOperationAndItems } from '../stock-operations.resource';
6
6
 
7
7
  interface StockOperationRelatedLinkProps {
@@ -26,7 +26,7 @@ const StockOperationRelatedLink: React.FC<StockOperationRelatedLinkProps> = ({
26
26
  if (!operationType) {
27
27
  return;
28
28
  }
29
- launchStockoperationAddOrEditDialog(
29
+ launchStockoperationAddOrEditWorkSpace(
30
30
  t,
31
31
  operationType,
32
32
  stockOperation,
@@ -4,31 +4,29 @@
4
4
 
5
5
  .layer {
6
6
  display: flex;
7
- flex-direction: column;
7
+ flex-direction: row;
8
8
  gap: layout.$spacing-05;
9
- padding: layout.$spacing-05;
9
+ padding: layout.$spacing-03;
10
+ height: 100%;
10
11
  }
11
12
 
12
13
  .stepperContainer {
13
14
  display: flex;
14
15
  gap: layout.$spacing-03;
15
- flex: 1;
16
- align-items: center;
17
- width: 100%;
16
+ align-items: baseline;
17
+ flex-direction: column;
18
+ width: 200px;
19
+ background-color: colors.$gray-10;
18
20
  }
19
21
 
20
22
  .stepperItem {
21
- flex: 1;
22
- height: 100%;
23
- display: flex;
24
23
  gap: layout.$spacing-03;
25
- align-items: center;
26
24
  padding: layout.$spacing-03;
27
- border-top: layout.$spacing-01 solid colors.$gray-30;
25
+ border-left: layout.$spacing-02 solid colors.$gray-30;
28
26
  }
29
27
 
30
28
  .stepperItemActive {
31
- border-top: layout.$spacing-02 solid var(--brand-03);
29
+ border-left: layout.$spacing-02 solid var(--brand-03);
32
30
  }
33
31
 
34
32
  .subtTitle {
@@ -39,3 +37,8 @@
39
37
  .title {
40
38
  @include type.type-style('heading-02');
41
39
  }
40
+
41
+ .content {
42
+ flex: 1;
43
+ overflow: auto;
44
+ }
@@ -35,16 +35,12 @@ const StockOperationStepper: React.FC<StockOperationStepperProps> = ({
35
35
  key={index}
36
36
  onClick={!disabled ? () => onChange?.(index) : undefined}
37
37
  >
38
- {icon}
39
- <div>
40
- <p className={styles.title}>{title}</p>
41
- <p className={styles.subtTitle}>{subTitle}</p>
42
- </div>
38
+ <p className={styles.title}>{title}</p>
43
39
  </li>
44
40
  );
45
41
  })}
46
42
  </ol>
47
- <Layer>{steps[selectedIndex].component}</Layer>
43
+ <Layer className={styles.content}>{steps[selectedIndex].component}</Layer>
48
44
  </Layer>
49
45
  );
50
46
  };
@@ -1,5 +1,6 @@
1
1
  @use '@carbon/layout';
2
2
  @use '@carbon/type';
3
+ @use '@carbon/colors';
3
4
  @use '~@openmrs/esm-styleguide/src/vars' as *;
4
5
 
5
6
  .tileContainer {
@@ -76,3 +77,22 @@
76
77
  margin-right: 4px;
77
78
  }
78
79
  }
80
+
81
+ .actionBtns {
82
+ display: flex;
83
+ flex-direction: row;
84
+ gap: layout.$spacing-03;
85
+ flex-wrap: wrap;
86
+ height: fit-content;
87
+ justify-content: flex-end;
88
+ flex: 1;
89
+ }
90
+
91
+ .relatedLink {
92
+ margin-left: layout.$spacing-02;
93
+ color: colors.$blue-60;
94
+ }
95
+
96
+ .relatedTransactionHeader {
97
+ color: colors.$green-50;
98
+ }
package/dist/155.js DELETED
@@ -1 +0,0 @@
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:()=>W});var a=t(4929),i=t(6312),o=t(7248),l=t(1672),r=t.n(l),s=t(7536),c=t(3397),p=t(826),u=t(5127),d=t(3566),g=t(7701),f=t(1938),h=t(6066),y=t(3042);function m(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const b=function(e){var n=e.stockItemUuid,t=e.error,i=e.initialValue,o=e.onValueChange,s=(0,y.S)(n),u=s.isLoading,d=s.stockItemBatchNos,g=(0,c.useTranslation)().t,f=(0,h.b)(),b=f.items,$=f.setStockItemUuid,v=f.isLoading;(0,l.useEffect)((function(){$(n)}),[n,$]);var k=(0,l.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){m(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,l.useMemo)((function(){return null==k?void 0:k.filter((function(e){return void 0!==e.quantity&&0!==e.quantity}))}),[k]),x=(0,l.useMemo)((function(){return null==w?void 0:w.find((function(e){return e.uuid===i}))}),[w,i]);return u||v?r().createElement(a.xNL,{role:"progressbar"}):r().createElement(a.CtY,{style:{flexGrow:"1"},titleText:g("batchNo","Batch"),name:"stockBatchUuid",id:"stockBatchUuid",items:w||[],onChange:function(e){var n;o(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,p.KA)(e.expiration)):""},placeholder:g("filter","'Filter")+"...",invalid:t,invalidText:t})},$=function(e){var n,t=e.stockItemUuid,i=e.error,o=e.intiallvalue,s=e.onValueChange,p=(0,c.useTranslation)().t,u=(0,d.GY)(t),g=u.isLoading,f=u.error,h=u.item,y=(0,l.useMemo)((function(){var e;return(null!==(e=null==h?void 0:h.packagingUnits)&&void 0!==e?e:[]).find((function(e){return e.uuid===o}))}),[null==h?void 0:h.packagingUnits,o]);return g?r().createElement(a.N2B,{role:"progressbar"}):f?r().createElement(a.K0D,{kind:"error",title:p("packagingUomError","Error loading Stock item"),subtitle:null==f?void 0:f.message}):r().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==s||s(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 v=t(7410),k=t.n(v),w=t(4766),x=t.n(w),A=t(1991),_=t.n(A),z=t(3702),M=t.n(z),C=t(2434),I=t.n(C),O=t(1422),E=t.n(O),N=t(6433),S={};S.styleTagTransform=E(),S.setAttributes=M(),S.insert=_().bind(null,"head"),S.domAPI=x(),S.insertStyleElement=I(),k()(N.Z,S);const P=N.Z&&N.Z.locals?N.Z.locals:void 0;function U(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 j(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 U(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)?U(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 T=function(e){var n=e.defaultValue,t=e.onValueChange,i=e.error,o=e.stockItemUuid,s=e.stockOperationItemUuid,p=(0,y.S)(o),u=p.isLoading,d=p.stockItemBatchNos,g=j((0,l.useState)(n),2),f=g[0],h=g[1],m=j((0,l.useState)(),2),b=m[0],$=m[1],v=(0,c.useTranslation)().t,k=(0,l.useMemo)((function(){return s.startsWith("new-item")}),[s]),w=(0,l.useMemo)((function(){return k&&-1!==(null==d?void 0:d.findIndex((function(e){return e.batchNo===f})))}),[d,f,k]);return(0,l.useEffect)((function(){n&&h(null!=n?n:"")}),[n]),(0,l.useEffect)((function(){w?$("Batch number already used"):($(void 0),null==t||t(f))}),[f,t,w,$]),u?r().createElement(a.znL,null):r().createElement(a.oil,{maxLength:50,onChange:function(e){return h(e.target.value)},value:f,invalidText:null!=b?b:i,invalid:null!=b?b:i,placeholder:v("batchNumber","Batch Number"),labelText:v("batchNumber","Batch Number")})};function q(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 B(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function D(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){B(e,n,t[n])}))}return e}function G(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 W=function(e){var n=e.closeWorkspace,t=e.stockOperationType,h=e.stockOperationItem,y=e.onSave,m=(0,l.useMemo)((function(){return(0,u.E3)(t.operationType)}),[t]),v=(0,l.useMemo)((function(){return(0,g.NE)(m)}),[m]),k=(0,f.Z)(t),w=(0,o.useConfig)().useItemCommonNameAsDisplay,x=v.keyof().options,A=(0,s.cI)({resolver:(0,i.F)(v),defaultValues:h,mode:"all"}),_=(0,c.useTranslation)().t,z=(0,d.GY)(A.getValues("stockItemUuid")).item,M=(0,l.useMemo)((function(){if(w){var e=(null==z?void 0:z.drugName)?"(Drug name: ".concat(z.drugName,")"):void 0;return"".concat((null==z?void 0:z.commonName)||_("noCommonNameAvailable","No common name available")+(null!=e?e:""))}}),[z,w,_]),C=(0,l.useMemo)((function(){if(!w){var e=(null==z?void 0:z.commonName)?"(Common name: ".concat(z.commonName,")"):void 0;return"".concat((null==z?void 0:z.drugName)||_("noDrugNameAvailable","No drug name available")+(null!=e?e:""))}}),[z,w,_]);return r().createElement(a.l09,{onSubmit:A.handleSubmit((function(e){null==y||y(e),n()})),className:P.form},r().createElement(a.Kqy,{gap:4,className:P.grid},r().createElement("p",{className:P.title},w?M:C),(k.requiresActualBatchInfo||k.requiresBatchUuid)&&x.includes("batchNo")&&r().createElement(a.sgG,null,r().createElement(s.Qr,{control:A.control,defaultValue:null==h?void 0:h.batchNo,name:"batchNo",render:function(e){var n=e.field,t=e.fieldState.error;return r().createElement(T,{defaultValue:n.value,onValueChange:n.onChange,stockItemUuid:h.stockItemUuid,error:null==t?void 0:t.message,stockOperationItemUuid:h.uuid})}})),k.requiresBatchUuid&&!k.requiresActualBatchInfo&&r().createElement(a.sgG,null,r().createElement(s.Qr,{control:A.control,name:"stockBatchUuid",render:function(e){var n=e.field,t=e.fieldState.error;return r().createElement(b,{initialValue:null==h?void 0:h.stockBatchUuid,onValueChange:n.onChange,stockItemUuid:h.stockItemUuid,error:null==t?void 0:t.message})}})),(k.requiresActualBatchInfo||k.requiresBatchUuid)&&x.includes("expiration")&&r().createElement(a.sgG,null,r().createElement(s.Qr,{control:A.control,name:"expiration",render:function(e){var n=e.field,t=e.fieldState.error;return r().createElement(a.Mtg,G(D({id:"expiration",datePickerType:"single",minDate:(0,p.KA)((0,p.Lg)()),locale:"en",className:P.datePickerInput,dateFormat:p.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 q(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)?q(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)}}),r().createElement(a.aj6,{autoComplete:"off",id:"expiration-input",name:"operationDate",placeholder:p.Pq,labelText:_("expiriation","Expiration Date"),invalid:null==t?void 0:t.message}))}})),r().createElement(a.sgG,null,r().createElement(s.Qr,{control:A.control,name:"quantity",render:function(e){var n=e.field,t=e.fieldState.error;return r().createElement(a.Y2U,G(D({allowEmpty:!0,className:"small-placeholder-text",disableWheel:!0,hideSteppers:!0,id:"qty"},n),{label:_("qty","Qty"),invalidText:null==t?void 0:t.message,invalid:null==t?void 0:t.message}))}})),r().createElement(a.sgG,null,r().createElement(s.Qr,{control:A.control,name:"stockItemPackagingUOMUuid",render:function(e){var n=e.field,t=e.fieldState.error;return r().createElement($,{stockItemUuid:null==h?void 0:h.stockItemUuid,intiallvalue:n.value,error:null==t?void 0:t.message,onValueChange:n.onChange})}})),(null==k?void 0:k.canCaptureQuantityPrice)&&x.includes("purchasePrice")&&r().createElement(a.sgG,null,r().createElement(s.Qr,{control:A.control,name:"purchasePrice",render:function(e){var n=e.field,t=e.fieldState.error;return r().createElement(a.oil,G(D({},n),{labelText:_("purchasePrice","Purchase Price"),invalid:null==t?void 0:t.message,invalidText:null==t?void 0:t.message,id:"purchaseprice",placeholder:_("purchasePrice","Purchase Price")}))}}))),r().createElement(a.uVA,{className:P.buttonSet},r().createElement(a.zxk,{className:P.button,kind:"secondary",onClick:n},_("discard","Discard")),r().createElement(a.zxk,{className:P.button,kind:"primary",type:"submit",disabled:A.formState.isSubmitting},_("save","Save"))))}}}]);
package/dist/155.js.map DELETED
@@ -1 +0,0 @@
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,qTCwDA,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,EAAA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AAAA,EAAOuD,QACdrD,cAAesH,EAAMpF,U,MAM5BqD,aAAAA,EAAAA,EAAwBsD,0BAA2BlD,EAAOsB,SAAS,kBAClE,kBAACC,EAAAA,IAAMA,KACL,kBAACC,EAAAA,GAAUA,CACTC,QAASvB,EAAKuB,QACdnF,KAAM,gBACNoF,OAAQ,Y,IAAGC,EAAAA,EAAAA,MAAOC,EAAAA,EAAAA,WAAczH,M,OAC9B,kBAAC4E,EAAAA,IAASA,EAAAA,EAAAA,CAAAA,EACJ4C,GAAAA,CACJxC,UAAWzE,EAAE,gBAAiB,kBAC9BoC,QAAS3C,aAAAA,EAAAA,EAAOuD,QAChBX,YAAa5C,aAAAA,EAAAA,EAAOuD,QACpB1D,GAAK,gBACL6C,YAAanC,EAAE,gBAAiB,oB,MAQ5C,kBAACyI,EAAAA,IAASA,CAACrC,UAAWC,EAAOqC,WAC3B,kBAACC,EAAAA,IAAMA,CAACvC,UAAWC,EAAOuC,OAAQ/F,KAAK,YAAYgG,QAASnE,GACzD1E,EAAE,UAAW,YAEhB,kBAAC2I,EAAAA,IAAMA,CAACvC,UAAWC,EAAOuC,OAAQ/F,KAAK,UAAUiG,KAAK,SAASC,SAAUvD,EAAKwD,UAAUC,cACrFjJ,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","useConfig","useItemCommonNameAsDisplay","fields","keyof","form","useForm","resolver","zodResolver","defaultValues","mode","getValues","commonName","drugName","Form","onSubmit","handleSubmit","className","styles","Stack","gap","grid","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":""}