@openmrs/esm-billing-app 1.1.2-pre.1623 → 1.1.2-pre.1634
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__mocks__/bills.mock.ts +6 -5
- package/dist/1807.js +1 -1
- package/dist/1807.js.map +1 -1
- package/dist/2704.js +1 -0
- package/dist/2704.js.map +1 -0
- package/dist/3002.js +1 -1
- package/dist/4300.js +1 -1
- package/dist/6404.js +1 -0
- package/dist/6404.js.map +1 -0
- package/dist/6792.js +1 -1
- package/dist/8341.js +2 -0
- package/dist/8341.js.map +1 -0
- package/dist/8421.js +1 -1
- package/dist/8421.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-billing-app.js +1 -1
- package/dist/openmrs-esm-billing-app.js.buildmanifest.json +81 -57
- package/dist/routes.json +1 -1
- package/e2e/commands/patient-operations.ts +1 -1
- package/e2e/pages/billing-dashboard-page.ts +3 -1
- package/e2e/pages/billing-form-page.ts +5 -0
- package/e2e/pages/invoice-page.ts +10 -0
- package/e2e/specs/billing-dashboard.spec.ts +125 -2
- package/e2e/specs/billing-patient-chart.spec.ts +86 -0
- package/package.json +1 -1
- package/src/bill-history/bill-history.component.tsx +2 -1
- package/src/billable-services/bill-waiver/bill-waiver.component.tsx +3 -1
- package/src/billing-form/billing-checkin-form.component.tsx +116 -57
- package/src/billing-form/billing-checkin-form.scss +26 -2
- package/src/billing-form/billing-checkin-form.test.tsx +51 -1
- package/src/billing-form/billing-form.resource.test.ts +87 -0
- package/src/billing-form/billing-form.resource.ts +33 -0
- package/src/billing-form/billing-form.workspace.tsx +4 -4
- package/src/billing-form/visit-attributes/visit-attributes-form.component.tsx +25 -2
- package/src/billing-form/visit-attributes/visit-attributes-form.scss +29 -0
- package/src/billing.resource.ts +21 -7
- package/src/bills-table/bills-table.component.tsx +16 -12
- package/src/bills-table/bills-table.test.tsx +84 -7
- package/src/index.ts +5 -0
- package/src/invoice/invoice.component.tsx +38 -23
- package/src/invoice/invoice.scss +9 -8
- package/src/invoice/invoice.test.tsx +77 -8
- package/src/invoice/line-item-action-menu.component.tsx +2 -2
- package/src/invoice/payments/payments.component.tsx +2 -2
- package/src/invoice/payments/payments.test.tsx +31 -2
- package/src/metrics-cards/metrics.resource.ts +3 -4
- package/src/modal/finalize-bill-confirmation.modal.test.tsx +209 -0
- package/src/modal/finalize-bill-confirmation.modal.tsx +86 -0
- package/src/modal/require-payment.modal.tsx +2 -1
- package/src/routes.json +4 -0
- package/src/types/index.ts +10 -1
- package/tools/setup-tests.ts +7 -6
- package/translations/en.json +17 -0
- package/dist/3057.js +0 -2
- package/dist/3057.js.map +0 -1
- package/dist/3857.js +0 -1
- package/dist/3857.js.map +0 -1
- /package/dist/{3057.js.LICENSE.txt → 8341.js.LICENSE.txt} +0 -0
package/__mocks__/bills.mock.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { restBaseUrl } from '@openmrs/esm-framework';
|
|
2
|
+
import { BillStatus } from '../src/types';
|
|
2
3
|
|
|
3
4
|
export const mockPatient = {
|
|
4
5
|
uuid: 'dda9b65f-0037-11ec-85e7-04ed33c79a3e',
|
|
@@ -116,7 +117,7 @@ export const billsSummary = [
|
|
|
116
117
|
},
|
|
117
118
|
],
|
|
118
119
|
receiptNumber: 'CP2-0011-0',
|
|
119
|
-
status:
|
|
120
|
+
status: BillStatus.PENDING,
|
|
120
121
|
adjustmentReason: null,
|
|
121
122
|
id: 30,
|
|
122
123
|
resourceVersion: '1.8',
|
|
@@ -225,7 +226,7 @@ export const billsSummary = [
|
|
|
225
226
|
},
|
|
226
227
|
],
|
|
227
228
|
receiptNumber: 'CP2-0011-0',
|
|
228
|
-
status:
|
|
229
|
+
status: BillStatus.PENDING,
|
|
229
230
|
adjustmentReason: null,
|
|
230
231
|
id: 30,
|
|
231
232
|
resourceVersion: '1.8',
|
|
@@ -334,7 +335,7 @@ export const billsSummary = [
|
|
|
334
335
|
},
|
|
335
336
|
],
|
|
336
337
|
receiptNumber: 'CP2-0011-0',
|
|
337
|
-
status:
|
|
338
|
+
status: BillStatus.PAID,
|
|
338
339
|
adjustmentReason: null,
|
|
339
340
|
id: 30,
|
|
340
341
|
resourceVersion: '1.8',
|
|
@@ -347,7 +348,7 @@ export const mockBill = {
|
|
|
347
348
|
patientName: 'James Bond',
|
|
348
349
|
identifier: 'PJYM9 ',
|
|
349
350
|
patientUuid: 'b2fcf02b-7ee3-4d16-a48f-576be2b103aa',
|
|
350
|
-
status:
|
|
351
|
+
status: BillStatus.PENDING,
|
|
351
352
|
receiptNumber: '0035-6',
|
|
352
353
|
cashier: {
|
|
353
354
|
uuid: 'fe00dd43-4c39-4ce9-9832-bc3620c80c6c',
|
|
@@ -377,7 +378,7 @@ export const mockBill = {
|
|
|
377
378
|
priceName: '',
|
|
378
379
|
priceUuid: '',
|
|
379
380
|
lineItemOrder: 0,
|
|
380
|
-
paymentStatus:
|
|
381
|
+
paymentStatus: BillStatus.PENDING,
|
|
381
382
|
resourceVersion: '1.8',
|
|
382
383
|
},
|
|
383
384
|
],
|
package/dist/1807.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_billing_app=globalThis.webpackChunk_openmrs_esm_billing_app||[]).push([[1807],{11444(e,n,t){t.d(n,{A:()=>r});var i=t(54991),l=t.n(i),a=t(76314),o=t.n(a)()(l());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-billing__billing-form__tablet___depIv{padding:1.5rem 1rem;background-color:#fff}.-esm-billing__billing-form__desktop___XrIGU{padding:0rem}.-esm-billing__billing-form__button___\\+KaHL{height:4rem;display:flex;align-content:flex-start;align-items:baseline;min-width:50%}.-esm-billing__billing-form__button___\\+KaHL .cds--inline-loading{min-height:1rem !important}.-esm-billing__billing-form__button___\\+KaHL .cds--inline-loading__text{font-size:unset !important}.-esm-billing__billing-form__mt2___XSCej{margin-top:2rem}.-esm-billing__billing-form__searchContent___rwtx-{position:absolute;background-color:#fff;min-width:230px;overflow:auto;border:1px solid #ddd;z-index:1;width:92%}.-esm-billing__billing-form__searchItem___gJRX7{border-bottom:.1rem solid;border-bottom-color:silver;cursor:pointer}.-esm-billing__billing-form__invalidInput___-CFhJ{border:2px solid red}.-esm-billing__billing-form__removeButton___JOb\\+t{color:#ee0909;right:20px;cursor:pointer}.-esm-billing__billing-form__form___dOD1L{display:flex;flex-direction:column;justify-content:space-between;height:calc(100vh - 6rem)}.omrs-breakpoint-lt-desktop .-esm-billing__billing-form__form___dOD1L{background-color:#ededed}.omrs-breakpoint-gt-tablet .-esm-billing__billing-form__form___dOD1L{background-color:#fff}.-esm-billing__billing-form__grid___bVIsN{margin:1rem;display:flex;flex-direction:column;gap:1rem}.-esm-billing__billing-form__row___kfkPE{margin:.5rem 0rem 0rem;display:flex;flex-flow:row wrap;gap:1rem}.-esm-billing__billing-form__spacer___5WyoB{margin-top:1rem}.-esm-billing__billing-form__existingItemsContainer___ONfRE{padding:1rem;background-color:#f4f4f4;border:1px solid #e0e0e0;border-radius:.25rem}.-esm-billing__billing-form__existingItemsContainer___ONfRE .-esm-billing__billing-form__existingItemRow___ZDzhJ{display:flex;justify-content:space-between;align-items:center;padding:.5rem 0;border-bottom:1px solid #e0e0e0}.-esm-billing__billing-form__existingItemsContainer___ONfRE .-esm-billing__billing-form__existingItemRow___ZDzhJ:last-of-type{border-bottom:none}.-esm-billing__billing-form__existingItemsContainer___ONfRE .-esm-billing__billing-form__existingItemRow___ZDzhJ .-esm-billing__billing-form__existingItemName___X3S0u{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px);flex:1;color:#525252}.-esm-billing__billing-form__existingItemsContainer___ONfRE .-esm-billing__billing-form__existingItemRow___ZDzhJ .-esm-billing__billing-form__existingItemDetail___LDqAI{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px);flex:0 0 auto;color:#525252;margin:0 1rem}.-esm-billing__billing-form__existingItemsContainer___ONfRE .-esm-billing__billing-form__existingItemRow___ZDzhJ .-esm-billing__billing-form__existingItemTotal___orcdj{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px);flex:0 0 auto;color:#525252}.-esm-billing__billing-form__existingItemsContainer___ONfRE .-esm-billing__billing-form__existingItemsSubtotal___YO4s5{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px);text-align:right;padding-top:.75rem;border-top:1px solid #e0e0e0;margin-top:.5rem;color:#525252}.-esm-billing__billing-form__sectionHeading___HFgo1{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);margin-bottom:.75rem;color:#525252}.-esm-billing__billing-form__selectedItemsContainer___EgCXw{margin-top:1rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa{border:1px solid #e0e0e0;border-radius:.25rem;padding:1rem;margin-bottom:1rem;background-color:#f4f4f4}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemHeader___IPVIh{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemHeader___IPVIh .-esm-billing__billing-form__itemName___0pvcY{font-weight:600;font-size:1rem;color:#525252}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO{display:flex;flex-wrap:wrap;gap:1rem;margin-top:.5rem;align-items:flex-end}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb{display:flex;flex-direction:column;min-width:0}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:first-child{flex:1 1 auto;min-width:250px}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:nth-child(2){flex:0 0 140px;width:140px}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:last-child{flex:0 0 180px;width:180px;margin-left:auto;text-align:right}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb label{font-size:.875rem;font-weight:500;margin-bottom:.5rem;color:#525252;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--list-box,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--number,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--combo-box,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--list-box__wrapper,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--list-box__field{width:100% !important;max-width:100% !important;min-width:0 !important}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .-esm-billing__billing-form__priceDisplay___MN5Zc,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .-esm-billing__billing-form__totalDisplay___mNY6D{font-size:.875rem;font-size:.875rem;font-weight:600;color:#525252;padding:.5rem 0;word-break:break-word}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__grandTotal___a5c-8{text-align:right;padding:1rem;border-top:2px solid #0f62fe;margin-top:1rem;background-color:#f4f4f4;font-size:1.125rem;font-weight:600;color:#525252}@media(max-width: 1056px){.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:nth-child(2){flex:1 1 100%;width:100%}}@media(max-width: 768px){.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa{padding:.75rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO{flex-direction:column;gap:.5rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:first-child,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:nth-child(2),.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:last-child{flex:1 1 100%;width:100%;max-width:100%}}","",{version:3,sources:["webpack://./node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/billing-form/billing-form.scss","webpack://./node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./node_modules/@carbon/type/scss/_styles.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCzDF,4CACE,mBAAA,CACA,qBDHM,CCMR,6CACE,YAAA,CAGF,6CACE,WC0CW,CDzCX,YAAA,CACA,wBAAA,CACA,oBAAA,CACA,aAAA,CAEA,kEACE,0BAAA,CAGF,wEACE,0BAAA,CAIJ,yCACE,eCWW,CDRb,mDACE,iBAAA,CACA,qBAAA,CACA,eAAA,CACA,aAAA,CACA,qBAAA,CACA,SAAA,CACA,SAAA,CAGF,gDACE,yBAAA,CACA,0BAAA,CACA,cAAA,CAGF,kDACE,oBAAA,CAGF,mDACE,aAAA,CACA,UAAA,CACA,cAAA,CAGF,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E,cAAA,CACA,WAAA,CAGF,2NACE,cAAA,CACA,WAAA,CACA,gBAAA,CACA,gBAAA,CAGF,sNACE,iBAAA,CACA,eAAA,CACA,mBCjLG,CDkLH,aDhMA,CCiMA,kBAAA,CACA,eAAA,CACA,sBAAA,CAGF,0mCAKE,qBAAA,CACA,yBAAA,CACA,sBAAA,CAGF,ogBAEE,iBAAA,CACA,iBAAA,CACA,eAAA,CACA,aDrNA,CCsNA,eAAA,CACA,qBAAA,CAMR,4GACE,gBAAA,CACA,YCvMS,CDwMT,4BAAA,CACA,eCzMS,CD0MT,wBDvOI,CCwOJ,kBAAA,CACA,eAAA,CACA,aDrOM,CCyOV,0BAKU,6NACE,aAAA,CACA,UAAA,CAAA,CAQZ,yBAEI,0GACE,cCxOO,CD0OP,4JACE,qBAAA,CACA,SCjPK,CDoPH,opBAGE,aAAA,CACA,UAAA,CACA,cAAA,CAAA",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/layout';\n@use '@carbon/type';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.tablet {\n padding: layout.$spacing-06 layout.$spacing-05;\n background-color: $ui-02;\n}\n\n.desktop {\n padding: 0rem;\n}\n\n.button {\n height: layout.$spacing-10;\n display: flex;\n align-content: flex-start;\n align-items: baseline;\n min-width: 50%;\n\n :global(.cds--inline-loading) {\n min-height: layout.$spacing-05 !important;\n }\n\n :global(.cds--inline-loading__text) {\n font-size: unset !important;\n }\n}\n\n.mt2 {\n margin-top: layout.$spacing-07;\n}\n\n.searchContent {\n position: absolute;\n background-color: #fff;\n min-width: 230px;\n overflow: auto;\n border: 1px solid #ddd;\n z-index: 1;\n width: 92%;\n}\n\n.searchItem {\n border-bottom: 0.1rem solid;\n border-bottom-color: silver;\n cursor: pointer;\n}\n\n.invalidInput {\n border: 2px solid red;\n}\n\n.removeButton {\n color: #ee0909;\n right: 20px;\n cursor: pointer;\n}\n\n.form {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n height: calc(100vh - 6rem);\n}\n\n:global(.omrs-breakpoint-lt-desktop) .form {\n background-color: #ededed;\n}\n\n:global(.omrs-breakpoint-gt-tablet) .form {\n background-color: $ui-02;\n}\n\n.grid {\n margin: layout.$spacing-05;\n display: flex;\n flex-direction: column;\n gap: layout.$spacing-05;\n}\n\n.row {\n margin: layout.$spacing-03 0rem 0rem;\n display: flex;\n flex-flow: row wrap;\n gap: layout.$spacing-05;\n}\n\n.spacer {\n margin-top: layout.$spacing-05;\n}\n\n.existingItemsContainer {\n padding: layout.$spacing-05;\n background-color: $ui-01;\n border: 1px solid $ui-03;\n border-radius: layout.$spacing-02;\n\n .existingItemRow {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: layout.$spacing-03 0;\n border-bottom: 1px solid $ui-03;\n\n &:last-of-type {\n border-bottom: none;\n }\n\n .existingItemName {\n @include type.type-style('body-compact-01');\n flex: 1;\n color: $text-02;\n }\n\n .existingItemDetail {\n @include type.type-style('body-compact-01');\n flex: 0 0 auto;\n color: $text-02;\n margin: 0 layout.$spacing-05;\n }\n\n .existingItemTotal {\n @include type.type-style('heading-compact-01');\n flex: 0 0 auto;\n color: $text-02;\n }\n }\n\n .existingItemsSubtotal {\n @include type.type-style('body-compact-01');\n text-align: right;\n padding-top: layout.$spacing-04;\n border-top: 1px solid $ui-03;\n margin-top: layout.$spacing-03;\n color: $text-02;\n }\n}\n\n.sectionHeading {\n @include type.type-style('heading-compact-02');\n margin-bottom: layout.$spacing-04;\n color: $text-02;\n}\n\n.selectedItemsContainer {\n margin-top: layout.$spacing-05;\n \n .itemCard {\n border: 1px solid $ui-03;\n border-radius: layout.$spacing-02;\n padding: layout.$spacing-05;\n margin-bottom: layout.$spacing-05;\n background-color: $ui-01;\n \n .itemHeader {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: layout.$spacing-05;\n \n .itemName {\n font-weight: 600;\n font-size: 1rem;\n color: $text-02;\n }\n }\n \n .itemControls {\n display: flex;\n flex-wrap: wrap;\n gap: layout.$spacing-05;\n margin-top: layout.$spacing-03;\n align-items: flex-end; .controlSection {\n display: flex;\n flex-direction: column;\n min-width: 0;\n \n &:first-child {\n flex: 1 1 auto;\n min-width: 250px;\n }\n \n &:nth-child(2) {\n flex: 0 0 140px;\n width: 140px;\n }\n \n &:last-child {\n flex: 0 0 180px;\n width: 180px;\n margin-left: auto;\n text-align: right;\n }\n \n label {\n font-size: 0.875rem;\n font-weight: 500;\n margin-bottom: layout.$spacing-03;\n color: $text-02;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n \n :global(.cds--list-box),\n :global(.cds--number),\n :global(.cds--combo-box),\n :global(.cds--list-box__wrapper),\n :global(.cds--list-box__field) {\n width: 100% !important;\n max-width: 100% !important;\n min-width: 0 !important;\n }\n \n .priceDisplay,\n .totalDisplay {\n font-size: 0.875rem;\n font-size: 0.875rem;\n font-weight: 600;\n color: $text-02;\n padding: layout.$spacing-03 0;\n word-break: break-word;\n }\n }\n }\n }\n \n .grandTotal {\n text-align: right;\n padding: layout.$spacing-05;\n border-top: 2px solid $interactive-01;\n margin-top: layout.$spacing-05;\n background-color: $ui-01;\n font-size: 1.125rem;\n font-weight: 600;\n color: $text-02;\n }\n}\n\n@media (max-width: 1056px) {\n .selectedItemsContainer {\n .itemCard {\n .itemControls {\n .controlSection {\n &:nth-child(2) {\n flex: 1 1 100%;\n width: 100%;\n }\n }\n }\n }\n }\n}\n\n@media (max-width: 768px) {\n .selectedItemsContainer {\n .itemCard {\n padding: layout.$spacing-04;\n \n .itemControls {\n flex-direction: column;\n gap: layout.$spacing-03;\n \n .controlSection {\n &:first-child,\n &:nth-child(2),\n &:last-child {\n flex: 1 1 100%;\n width: 100%;\n max-width: 100%;\n }\n }\n }\n }\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","//\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"],sourceRoot:""}]),o.locals={tablet:"-esm-billing__billing-form__tablet___depIv",desktop:"-esm-billing__billing-form__desktop___XrIGU",button:"-esm-billing__billing-form__button___+KaHL",mt2:"-esm-billing__billing-form__mt2___XSCej",searchContent:"-esm-billing__billing-form__searchContent___rwtx-",searchItem:"-esm-billing__billing-form__searchItem___gJRX7",invalidInput:"-esm-billing__billing-form__invalidInput___-CFhJ",removeButton:"-esm-billing__billing-form__removeButton___JOb+t",form:"-esm-billing__billing-form__form___dOD1L",grid:"-esm-billing__billing-form__grid___bVIsN",row:"-esm-billing__billing-form__row___kfkPE",spacer:"-esm-billing__billing-form__spacer___5WyoB",existingItemsContainer:"-esm-billing__billing-form__existingItemsContainer___ONfRE",existingItemRow:"-esm-billing__billing-form__existingItemRow___ZDzhJ",existingItemName:"-esm-billing__billing-form__existingItemName___X3S0u",existingItemDetail:"-esm-billing__billing-form__existingItemDetail___LDqAI",existingItemTotal:"-esm-billing__billing-form__existingItemTotal___orcdj",existingItemsSubtotal:"-esm-billing__billing-form__existingItemsSubtotal___YO4s5",sectionHeading:"-esm-billing__billing-form__sectionHeading___HFgo1",selectedItemsContainer:"-esm-billing__billing-form__selectedItemsContainer___EgCXw",itemCard:"-esm-billing__billing-form__itemCard___-qABa",itemHeader:"-esm-billing__billing-form__itemHeader___IPVIh",itemName:"-esm-billing__billing-form__itemName___0pvcY",itemControls:"-esm-billing__billing-form__itemControls___T4bKO",controlSection:"-esm-billing__billing-form__controlSection___OAlFb",priceDisplay:"-esm-billing__billing-form__priceDisplay___MN5Zc",totalDisplay:"-esm-billing__billing-form__totalDisplay___mNY6D",grandTotal:"-esm-billing__billing-form__grandTotal___a5c-8"};const r=o},81807(e,n,t){t.r(n),t.d(n,{default:()=>O});var i=t(16072),l=t(2076),a=t(80281),o=t(57224),r=t(54392),s=t(89027),c=t(50654),p=t(14720),g=t(85072),m=t.n(g),d=t(97825),_=t.n(d),u=t(77659),b=t.n(u),f=t(55056),h=t.n(f),y=t(10540),A=t.n(y),C=t(41113),$=t.n(C),w=t(11444),x={};x.styleTagTransform=$(),x.setAttributes=h(),x.insert=b().bind(null,"head"),x.domAPI=_(),x.insertStyleElement=A(),m()(w.A,x);const v=w.A&&w.A.locals?w.A.locals:void 0;function k(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function E(e,n,t,i,l,a,o){try{var r=e[a](o),s=r.value}catch(e){return void t(e)}r.done?n(s):Promise.resolve(s).then(i,l)}function I(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function z(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},i=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),i.forEach((function(n){I(e,n,t[n])}))}return e}function B(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n.push.apply(n,t)}return n}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}function D(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 i,l,a=[],o=!0,r=!1;try{for(t=t.call(e);!(o=(i=t.next()).done)&&(a.push(i.value),!n||a.length!==n);o=!0);}catch(e){r=!0,l=e}finally{try{o||null==t.return||t.return()}finally{if(r)throw l}}return a}}(e,n)||S(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.")}()}function M(e){return function(e){if(Array.isArray(e))return k(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||S(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,n){if(e){if("string"==typeof e)return k(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)?k(e,n):void 0}}const O=function(e){var n=e.workspaceProps,t=n.patientUuid,g=n.onMutate,m=n.billUuid,d=e.closeWorkspace,_="tablet"===(0,o.useLayoutType)(),u=(0,l.useTranslation)().t,b=(0,o.useConfig)(),f=b.defaultCurrency,h=b.postBilledItems,y=D((0,i.useState)(!1),2),A=y[0],C=y[1],$=D((0,i.useState)([]),2),w=$[0],x=$[1],k=(0,r.ly)(),I=k.data,S=k.error,O=k.isLoading,N=(0,r.DX)(m),T=N.bill,q=N.isLoading,F=N.error,P=(0,s.ly)(),H=P.billableServices,X=P.isLoading,j=P.error,G=!!m&&!!T,K=(0,i.useMemo)((function(){return G?(0,p.Zz)(T.lineItems):0}),[G,null==T?void 0:T.lineItems]),L=(0,i.useMemo)((function(){var e;if(!I)return[];if(!G)return I;var n=null!==(e=T.lineItems)&&void 0!==e?e:[],t=new Set(n.flatMap((function(e){return[e.billableService,e.item].filter(Boolean)})));return I.filter((function(e){return e.name&&!t.has(e.name)}))}),[I,G,null==T?void 0:T.lineItems]),R=function(){return(e=function(){var e,n,i,l,a;return function(e,n){var t,i,l,a={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),r=Object.defineProperty;return r(o,"next",{value:s(0)}),r(o,"throw",{value:s(1)}),r(o,"return",{value:s(2)}),"function"==typeof Symbol&&r(o,Symbol.iterator,{value:function(){return this}}),o;function s(r){return function(s){return function(r){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,r[0]&&(a=0)),a;)try{if(t=1,i&&(l=2&r[0]?i.return:r[0]?i.throw||((l=i.return)&&l.call(i),0):i.next)&&!(l=l.call(i,r[1])).done)return l;switch(i=0,l&&(r=[2&r[0],l.value]),r[0]){case 0:case 1:l=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!((l=(l=a.trys).length>0&&l[l.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!l||r[1]>l[0]&&r[1]<l[3])){a.label=r[1];break}if(6===r[0]&&a.label<l[1]){a.label=l[1],l=r;break}if(l&&a.label<l[2]){a.label=l[2],a.ops.push(r);break}l[2]&&a.ops.pop(),a.trys.pop();continue}r=n.call(e,a)}catch(e){r=[6,e],i=0}finally{t=l=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}(this,(function(s){switch(s.label){case 0:if(A||0===w.length)return[2];if(G&&(X||j))return[2];if(!function(){if(0===w.length)return!1;var e=!0,n=!1,t=void 0;try{for(var i,l=w[Symbol.iterator]();!(e=(i=l.next()).done);e=!0){var a=i.value;if(a.availablePaymentMethods&&a.availablePaymentMethods.length>1&&!a.selectedPaymentMethod)return(0,o.showSnackbar)({title:u("validationError","Validation error"),subtitle:u("paymentMethodRequired","Payment method is required for all items"),kind:"error"}),!1;if(!a.quantity||a.quantity<1)return!1}}catch(e){n=!0,t=e}finally{try{e||null==l.return||l.return()}finally{if(n)throw t}}return!0}())return[2];C(!0),e=w.map((function(e){return{quantity:e.quantity,price:e.price,lineItemOrder:0,paymentStatus:"PENDING",billableService:e.uuid}})),s.label=1;case 1:return s.trys.push([1,6,7,8]),G?(n=T.lineItems.map((function(e){var n=(0,c.e)(H,e.billableService||e.item);if(!n)throw new Error(u("serviceResolutionError",'Could not resolve service "{{service}}"',{service:e.billableService||e.item}));return{uuid:e.uuid,quantity:e.quantity,price:e.price,lineItemOrder:e.lineItemOrder,paymentStatus:e.paymentStatus,billableService:n,priceName:e.priceName,priceUuid:e.priceUuid}})),i={cashPoint:T.cashPointUuid,cashier:T.cashier.uuid,lineItems:M(n).concat(M(e)),patient:T.patientUuid,status:T.status,uuid:T.uuid},[4,(0,r.FR)(i)]):[3,3];case 2:return s.sent(),[3,5];case 3:return l={cashPoint:h.cashPoint,cashier:h.cashier,lineItems:e,payments:[],patient:t,status:"PENDING"},[4,(0,r.Xn)(l)];case 4:s.sent(),s.label=5;case 5:return d({discardUnsavedChanges:!0}),null==g||g(),(0,o.showSnackbar)({title:G?u("itemsAddedToBill","Items added to bill"):u("billProcessed","Bill processed"),subtitle:G?u("itemsAddedToBillSuccessfully","Items have been added to the bill successfully"):u("billProcessedSuccessfully","Bill processed successfully"),kind:"success"}),[3,8];case 6:return a=s.sent(),(0,o.showSnackbar)({title:u("billProcessingError","Bill processing error"),kind:"error",subtitle:(p=a,m=Error,(null!=m&&"undefined"!=typeof Symbol&&m[Symbol.hasInstance]?m[Symbol.hasInstance](p):p instanceof m)?a.message:u("unknownBillError","An unexpected error occurred"))}),[3,8];case 7:return C(!1),[7];case 8:return[2]}var p,m}))},function(){var n=this,t=arguments;return new Promise((function(i,l){var a=e.apply(n,t);function o(e){E(a,i,l,o,r,"next",e)}function r(e){E(a,i,l,o,r,"throw",e)}o(void 0)}))})();var e};return i.createElement(o.Workspace2,{title:G?u("addItemsToBill","Add items to bill"):u("addBillItems","Add bill items"),hasUnsavedChanges:w.length>0},i.createElement(a.lVW,{className:v.form,onSubmit:function(e){e.preventDefault(),R()}},i.createElement("div",{className:v.grid},m&&q?i.createElement(a.OuH,{description:(0,o.getCoreTranslation)("loading")+"..."}):m&&F?i.createElement(a.jeF,{kind:"error",lowContrast:!0,title:u("errorLoadingBill","Error loading bill"),subtitle:null==F?void 0:F.message}):G&&j?i.createElement(a.jeF,{kind:"error",lowContrast:!0,title:u("errorLoadingBillableServices","Error loading billable services"),subtitle:null==j?void 0:j.message}):i.createElement(i.Fragment,null,G&&i.createElement("div",{className:v.existingItemsContainer},i.createElement("h4",{className:v.sectionHeading},u("existingItems","Existing items")),T.lineItems.map((function(e){return i.createElement("div",{key:e.uuid,className:v.existingItemRow},i.createElement("span",{className:v.existingItemName},e.billableService||e.item||e.display),i.createElement("span",{className:v.existingItemDetail},e.quantity," x ",(0,p.aL)(e.price,f)),i.createElement("span",{className:v.existingItemTotal},(0,p.aL)(e.price*e.quantity,f)))})),i.createElement("div",{className:v.existingItemsSubtotal},i.createElement("strong",null,u("subtotal","Subtotal"),": ",(0,p.aL)(K,f)))),G&&i.createElement("h4",{className:v.sectionHeading},u("newItems","New items")),O?i.createElement(a.OuH,{description:(0,o.getCoreTranslation)("loading")+"..."}):S?i.createElement(a.jeF,{kind:"error",lowContrast:!0,title:u("errorLoadingBillableServices","Error loading billable services"),subtitle:null==S?void 0:S.message}):i.createElement(a.a32,{id:"searchItems",onChange:function(e){return function(e){if(e){var n=w.find((function(n){return n.uuid===e.uuid}));if(n){var t=B(z({},n),{quantity:n.quantity+1});x(M(w).map((function(n){return n.uuid===e.uuid?t:n})))}else{var i=e.servicePrices||[],l=0,a=null;if(1===i.length){var o=i[0].price;l="number"==typeof o?o:parseFloat(o),a=i[0]}var r={uuid:e.uuid,display:e.name,quantity:1,price:l,billableService:e.uuid,paymentStatus:"PENDING",lineItemOrder:0,selectedPaymentMethod:a,availablePaymentMethods:i};x(M(w).concat([r]))}}}(e.selectedItem)},itemToString:function(e){return(null==e?void 0:e.name)||""},items:L,titleText:u("searchItems","Search items and services")})),w&&w.length>0&&i.createElement("div",{className:v.selectedItemsContainer},i.createElement("h4",{className:v.sectionHeading},u("selectedItems","Selected items")),w.map((function(e){return i.createElement("div",{key:e.uuid,className:v.itemCard},i.createElement("div",{className:v.itemHeader},i.createElement("span",{className:v.itemName},e.display),i.createElement(a.K0,{align:"top-end",kind:"ghost",label:u("remove","Remove"),onClick:function(){return n=e.uuid,t=M(w).filter((function(e){return e.uuid!==n})),void x(t);var n,t}},i.createElement(o.TrashCanIcon,{size:16}))),i.createElement("div",{className:v.itemControls},e.availablePaymentMethods&&e.availablePaymentMethods.length>1?i.createElement("div",{className:v.controlSection},i.createElement("label",null,u("selectPaymentMethod","Select payment method")),i.createElement(a.a32,{id:"payment-method-".concat(e.uuid),items:e.availablePaymentMethods,itemToString:function(e){return e?"".concat(e.name," - ").concat((0,p.aL)("number"==typeof e.price?e.price:parseFloat(e.price),f)):""},selectedItem:e.selectedPaymentMethod,onChange:function(n){var t,i,l,a=n.selectedItem;a&&(t=e.uuid,i=a,l=M(w).map((function(e){return e.uuid===t?B(z({},e),{selectedPaymentMethod:i,price:"number"==typeof i.price?i.price:parseFloat(i.price),priceName:i.name,priceUuid:i.uuid}):e})),x(l))},placeholder:u("selectPaymentMethod","Select payment method"),titleText:""})):i.createElement("div",{className:v.controlSection},i.createElement("label",null,u("unitPrice","Unit price")),i.createElement("span",{className:v.priceDisplay},(0,p.aL)(e.price,f))),i.createElement("div",{className:v.controlSection},i.createElement("label",null,u("quantity","Quantity")),i.createElement(a.Q7x,{allowEmpty:!0,disableWheel:!0,hideSteppers:!0,id:"quantity-".concat(e.uuid),invalid:!e.quantity||e.quantity<1,invalidText:u("quantityMustBeAtLeastOne","Quantity must be at least 1"),onChange:function(n,t){var i,l,a,o=t.value,r=parseFloat(String(o));i=e.uuid,l=isNaN(r)?0:r,a=M(w).map((function(e){return e.uuid===i?B(z({},e),{quantity:l}):e})),x(a)},value:e.quantity})),i.createElement("div",{className:v.controlSection},i.createElement("label",null,u("total","Total")),i.createElement("span",{className:v.totalDisplay},(0,p.aL)(e.price*e.quantity,f)))))})),i.createElement("div",{className:v.grandTotal},i.createElement("strong",null,u("grandTotal","Grand total"),":"," ",(0,p.aL)(K+(0,p.Zz)(w),f))))),i.createElement(a.Te$,{className:_?v.tablet:v.desktop},i.createElement(a.$nd,{className:v.button,kind:"secondary",disabled:A,onClick:function(){return d({discardUnsavedChanges:!1})}},u("discard","Discard")),i.createElement(a.$nd,{className:v.button,kind:"primary",disabled:A||0===w.length||G&&X,type:"submit"},A?i.createElement(a.OuH,{description:u("saving","Saving")+"..."}):u("saveAndClose","Save and close")))))}}}]);
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_billing_app=globalThis.webpackChunk_openmrs_esm_billing_app||[]).push([[1807],{11444(e,n,t){t.d(n,{A:()=>r});var i=t(54991),l=t.n(i),a=t(76314),o=t.n(a)()(l());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-billing__billing-form__tablet___depIv{padding:1.5rem 1rem;background-color:#fff}.-esm-billing__billing-form__desktop___XrIGU{padding:0rem}.-esm-billing__billing-form__button___\\+KaHL{height:4rem;display:flex;align-content:flex-start;align-items:baseline;min-width:50%}.-esm-billing__billing-form__button___\\+KaHL .cds--inline-loading{min-height:1rem !important}.-esm-billing__billing-form__button___\\+KaHL .cds--inline-loading__text{font-size:unset !important}.-esm-billing__billing-form__mt2___XSCej{margin-top:2rem}.-esm-billing__billing-form__searchContent___rwtx-{position:absolute;background-color:#fff;min-width:230px;overflow:auto;border:1px solid #ddd;z-index:1;width:92%}.-esm-billing__billing-form__searchItem___gJRX7{border-bottom:.1rem solid;border-bottom-color:silver;cursor:pointer}.-esm-billing__billing-form__invalidInput___-CFhJ{border:2px solid red}.-esm-billing__billing-form__removeButton___JOb\\+t{color:#ee0909;right:20px;cursor:pointer}.-esm-billing__billing-form__form___dOD1L{display:flex;flex-direction:column;justify-content:space-between;height:calc(100vh - 6rem)}.omrs-breakpoint-lt-desktop .-esm-billing__billing-form__form___dOD1L{background-color:#ededed}.omrs-breakpoint-gt-tablet .-esm-billing__billing-form__form___dOD1L{background-color:#fff}.-esm-billing__billing-form__grid___bVIsN{margin:1rem;display:flex;flex-direction:column;gap:1rem}.-esm-billing__billing-form__row___kfkPE{margin:.5rem 0rem 0rem;display:flex;flex-flow:row wrap;gap:1rem}.-esm-billing__billing-form__spacer___5WyoB{margin-top:1rem}.-esm-billing__billing-form__existingItemsContainer___ONfRE{padding:1rem;background-color:#f4f4f4;border:1px solid #e0e0e0;border-radius:.25rem}.-esm-billing__billing-form__existingItemsContainer___ONfRE .-esm-billing__billing-form__existingItemRow___ZDzhJ{display:flex;justify-content:space-between;align-items:center;padding:.5rem 0;border-bottom:1px solid #e0e0e0}.-esm-billing__billing-form__existingItemsContainer___ONfRE .-esm-billing__billing-form__existingItemRow___ZDzhJ:last-of-type{border-bottom:none}.-esm-billing__billing-form__existingItemsContainer___ONfRE .-esm-billing__billing-form__existingItemRow___ZDzhJ .-esm-billing__billing-form__existingItemName___X3S0u{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px);flex:1;color:#525252}.-esm-billing__billing-form__existingItemsContainer___ONfRE .-esm-billing__billing-form__existingItemRow___ZDzhJ .-esm-billing__billing-form__existingItemDetail___LDqAI{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px);flex:0 0 auto;color:#525252;margin:0 1rem}.-esm-billing__billing-form__existingItemsContainer___ONfRE .-esm-billing__billing-form__existingItemRow___ZDzhJ .-esm-billing__billing-form__existingItemTotal___orcdj{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px);flex:0 0 auto;color:#525252}.-esm-billing__billing-form__existingItemsContainer___ONfRE .-esm-billing__billing-form__existingItemsSubtotal___YO4s5{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px);text-align:right;padding-top:.75rem;border-top:1px solid #e0e0e0;margin-top:.5rem;color:#525252}.-esm-billing__billing-form__sectionHeading___HFgo1{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);margin-bottom:.75rem;color:#525252}.-esm-billing__billing-form__selectedItemsContainer___EgCXw{margin-top:1rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa{border:1px solid #e0e0e0;border-radius:.25rem;padding:1rem;margin-bottom:1rem;background-color:#f4f4f4}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemHeader___IPVIh{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemHeader___IPVIh .-esm-billing__billing-form__itemName___0pvcY{font-weight:600;font-size:1rem;color:#525252}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO{display:flex;flex-wrap:wrap;gap:1rem;margin-top:.5rem;align-items:flex-end}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb{display:flex;flex-direction:column;min-width:0}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:first-child{flex:1 1 auto;min-width:250px}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:nth-child(2){flex:0 0 140px;width:140px}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:last-child{flex:0 0 180px;width:180px;margin-left:auto;text-align:right}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb label{font-size:.875rem;font-weight:500;margin-bottom:.5rem;color:#525252;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--list-box,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--number,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--combo-box,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--list-box__wrapper,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--list-box__field{width:100% !important;max-width:100% !important;min-width:0 !important}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .-esm-billing__billing-form__priceDisplay___MN5Zc,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .-esm-billing__billing-form__totalDisplay___mNY6D{font-size:.875rem;font-size:.875rem;font-weight:600;color:#525252;padding:.5rem 0;word-break:break-word}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__grandTotal___a5c-8{text-align:right;padding:1rem;border-top:2px solid #0f62fe;margin-top:1rem;background-color:#f4f4f4;font-size:1.125rem;font-weight:600;color:#525252}@media(max-width: 1056px){.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:nth-child(2){flex:1 1 100%;width:100%}}@media(max-width: 768px){.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa{padding:.75rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO{flex-direction:column;gap:.5rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:first-child,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:nth-child(2),.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:last-child{flex:1 1 100%;width:100%;max-width:100%}}","",{version:3,sources:["webpack://./node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/billing-form/billing-form.scss","webpack://./node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./node_modules/@carbon/type/scss/_styles.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCzDF,4CACE,mBAAA,CACA,qBDHM,CCMR,6CACE,YAAA,CAGF,6CACE,WC0CW,CDzCX,YAAA,CACA,wBAAA,CACA,oBAAA,CACA,aAAA,CAEA,kEACE,0BAAA,CAGF,wEACE,0BAAA,CAIJ,yCACE,eCWW,CDRb,mDACE,iBAAA,CACA,qBAAA,CACA,eAAA,CACA,aAAA,CACA,qBAAA,CACA,SAAA,CACA,SAAA,CAGF,gDACE,yBAAA,CACA,0BAAA,CACA,cAAA,CAGF,kDACE,oBAAA,CAGF,mDACE,aAAA,CACA,UAAA,CACA,cAAA,CAGF,0CACE,YAAA,CACA,qBAAA,CACA,6BAAA,CACA,yBAAA,CAGF,sEACE,wBAAA,CAGF,qEACE,qBDpEM,CCuER,0CACE,WC5CW,CD6CX,YAAA,CACA,qBAAA,CACA,QC/CW,CDkDb,yCACE,sBAAA,CACA,YAAA,CACA,kBAAA,CACA,QCtDW,CDyDb,4CACE,eC1DW,CD6Db,4DACE,YC9DW,CD+DX,wBD5FM,CC6FN,wBAAA,CACA,oBChFW,CDkFX,iHACE,YAAA,CACA,6BAAA,CACA,kBAAA,CACA,eAAA,CACA,+BAAA,CAEA,8HACE,kBAAA,CAGF,uKEqvBA,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEA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aAAA,CACA,UAAA,CAAA,CAQZ,yBAEI,0GACE,cCxOO,CD0OP,4JACE,qBAAA,CACA,SCjPK,CDoPH,opBAGE,aAAA,CACA,UAAA,CACA,cAAA,CAAA",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/layout';\n@use '@carbon/type';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.tablet {\n padding: layout.$spacing-06 layout.$spacing-05;\n background-color: $ui-02;\n}\n\n.desktop {\n padding: 0rem;\n}\n\n.button {\n height: layout.$spacing-10;\n display: flex;\n align-content: flex-start;\n align-items: baseline;\n min-width: 50%;\n\n :global(.cds--inline-loading) {\n min-height: layout.$spacing-05 !important;\n }\n\n :global(.cds--inline-loading__text) {\n font-size: unset !important;\n }\n}\n\n.mt2 {\n margin-top: layout.$spacing-07;\n}\n\n.searchContent {\n position: absolute;\n background-color: #fff;\n min-width: 230px;\n overflow: auto;\n border: 1px solid #ddd;\n z-index: 1;\n width: 92%;\n}\n\n.searchItem {\n border-bottom: 0.1rem solid;\n border-bottom-color: silver;\n cursor: pointer;\n}\n\n.invalidInput {\n border: 2px solid red;\n}\n\n.removeButton {\n color: #ee0909;\n right: 20px;\n cursor: pointer;\n}\n\n.form {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n height: calc(100vh - 6rem);\n}\n\n:global(.omrs-breakpoint-lt-desktop) .form {\n background-color: #ededed;\n}\n\n:global(.omrs-breakpoint-gt-tablet) .form {\n background-color: $ui-02;\n}\n\n.grid {\n margin: layout.$spacing-05;\n display: flex;\n flex-direction: column;\n gap: layout.$spacing-05;\n}\n\n.row {\n margin: layout.$spacing-03 0rem 0rem;\n display: flex;\n flex-flow: row wrap;\n gap: layout.$spacing-05;\n}\n\n.spacer {\n margin-top: layout.$spacing-05;\n}\n\n.existingItemsContainer {\n padding: layout.$spacing-05;\n background-color: $ui-01;\n border: 1px solid $ui-03;\n border-radius: layout.$spacing-02;\n\n .existingItemRow {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: layout.$spacing-03 0;\n border-bottom: 1px solid $ui-03;\n\n &:last-of-type {\n border-bottom: none;\n }\n\n .existingItemName {\n @include type.type-style('body-compact-01');\n flex: 1;\n color: $text-02;\n }\n\n .existingItemDetail {\n @include type.type-style('body-compact-01');\n flex: 0 0 auto;\n color: $text-02;\n margin: 0 layout.$spacing-05;\n }\n\n .existingItemTotal {\n @include type.type-style('heading-compact-01');\n flex: 0 0 auto;\n color: $text-02;\n }\n }\n\n .existingItemsSubtotal {\n @include type.type-style('body-compact-01');\n text-align: right;\n padding-top: layout.$spacing-04;\n border-top: 1px solid $ui-03;\n margin-top: layout.$spacing-03;\n color: $text-02;\n }\n}\n\n.sectionHeading {\n @include type.type-style('heading-compact-02');\n margin-bottom: layout.$spacing-04;\n color: $text-02;\n}\n\n.selectedItemsContainer {\n margin-top: layout.$spacing-05;\n \n .itemCard {\n border: 1px solid $ui-03;\n border-radius: layout.$spacing-02;\n padding: layout.$spacing-05;\n margin-bottom: layout.$spacing-05;\n background-color: $ui-01;\n \n .itemHeader {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: layout.$spacing-05;\n \n .itemName {\n font-weight: 600;\n font-size: 1rem;\n color: $text-02;\n }\n }\n \n .itemControls {\n display: flex;\n flex-wrap: wrap;\n gap: layout.$spacing-05;\n margin-top: layout.$spacing-03;\n align-items: flex-end; .controlSection {\n display: flex;\n flex-direction: column;\n min-width: 0;\n \n &:first-child {\n flex: 1 1 auto;\n min-width: 250px;\n }\n \n &:nth-child(2) {\n flex: 0 0 140px;\n width: 140px;\n }\n \n &:last-child {\n flex: 0 0 180px;\n width: 180px;\n margin-left: auto;\n text-align: right;\n }\n \n label {\n font-size: 0.875rem;\n font-weight: 500;\n margin-bottom: layout.$spacing-03;\n color: $text-02;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n \n :global(.cds--list-box),\n :global(.cds--number),\n :global(.cds--combo-box),\n :global(.cds--list-box__wrapper),\n :global(.cds--list-box__field) {\n width: 100% !important;\n max-width: 100% !important;\n min-width: 0 !important;\n }\n \n .priceDisplay,\n .totalDisplay {\n font-size: 0.875rem;\n font-size: 0.875rem;\n font-weight: 600;\n color: $text-02;\n padding: layout.$spacing-03 0;\n word-break: break-word;\n }\n }\n }\n }\n \n .grandTotal {\n text-align: right;\n padding: layout.$spacing-05;\n border-top: 2px solid $interactive-01;\n margin-top: layout.$spacing-05;\n background-color: $ui-01;\n font-size: 1.125rem;\n font-weight: 600;\n color: $text-02;\n }\n}\n\n@media (max-width: 1056px) {\n .selectedItemsContainer {\n .itemCard {\n .itemControls {\n .controlSection {\n &:nth-child(2) {\n flex: 1 1 100%;\n width: 100%;\n }\n }\n }\n }\n }\n}\n\n@media (max-width: 768px) {\n .selectedItemsContainer {\n .itemCard {\n padding: layout.$spacing-04;\n \n .itemControls {\n flex-direction: column;\n gap: layout.$spacing-03;\n \n .controlSection {\n &:first-child,\n &:nth-child(2),\n &:last-child {\n flex: 1 1 100%;\n width: 100%;\n max-width: 100%;\n }\n }\n }\n }\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","//\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"],sourceRoot:""}]),o.locals={tablet:"-esm-billing__billing-form__tablet___depIv",desktop:"-esm-billing__billing-form__desktop___XrIGU",button:"-esm-billing__billing-form__button___+KaHL",mt2:"-esm-billing__billing-form__mt2___XSCej",searchContent:"-esm-billing__billing-form__searchContent___rwtx-",searchItem:"-esm-billing__billing-form__searchItem___gJRX7",invalidInput:"-esm-billing__billing-form__invalidInput___-CFhJ",removeButton:"-esm-billing__billing-form__removeButton___JOb+t",form:"-esm-billing__billing-form__form___dOD1L",grid:"-esm-billing__billing-form__grid___bVIsN",row:"-esm-billing__billing-form__row___kfkPE",spacer:"-esm-billing__billing-form__spacer___5WyoB",existingItemsContainer:"-esm-billing__billing-form__existingItemsContainer___ONfRE",existingItemRow:"-esm-billing__billing-form__existingItemRow___ZDzhJ",existingItemName:"-esm-billing__billing-form__existingItemName___X3S0u",existingItemDetail:"-esm-billing__billing-form__existingItemDetail___LDqAI",existingItemTotal:"-esm-billing__billing-form__existingItemTotal___orcdj",existingItemsSubtotal:"-esm-billing__billing-form__existingItemsSubtotal___YO4s5",sectionHeading:"-esm-billing__billing-form__sectionHeading___HFgo1",selectedItemsContainer:"-esm-billing__billing-form__selectedItemsContainer___EgCXw",itemCard:"-esm-billing__billing-form__itemCard___-qABa",itemHeader:"-esm-billing__billing-form__itemHeader___IPVIh",itemName:"-esm-billing__billing-form__itemName___0pvcY",itemControls:"-esm-billing__billing-form__itemControls___T4bKO",controlSection:"-esm-billing__billing-form__controlSection___OAlFb",priceDisplay:"-esm-billing__billing-form__priceDisplay___MN5Zc",totalDisplay:"-esm-billing__billing-form__totalDisplay___mNY6D",grandTotal:"-esm-billing__billing-form__grandTotal___a5c-8"};const r=o},81807(e,n,t){t.r(n),t.d(n,{default:()=>N});var i=t(16072),l=t(2076),a=t(35301),o=t(57224),r=t(54392),s=t(89027),c=t(50654),p=t(14720),g=t(61145),m=t(85072),d=t.n(m),_=t(97825),u=t.n(_),b=t(77659),f=t.n(b),h=t(55056),y=t.n(h),A=t(10540),C=t.n(A),$=t(41113),w=t.n($),x=t(11444),v={};v.styleTagTransform=w(),v.setAttributes=y(),v.insert=f().bind(null,"head"),v.domAPI=u(),v.insertStyleElement=C(),d()(x.A,v);const k=x.A&&x.A.locals?x.A.locals:void 0;function E(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function I(e,n,t,i,l,a,o){try{var r=e[a](o),s=r.value}catch(e){return void t(e)}r.done?n(s):Promise.resolve(s).then(i,l)}function z(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]:{},i=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),i.forEach((function(n){z(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){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n.push.apply(n,t)}return n}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}function M(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 i,l,a=[],o=!0,r=!1;try{for(t=t.call(e);!(o=(i=t.next()).done)&&(a.push(i.value),!n||a.length!==n);o=!0);}catch(e){r=!0,l=e}finally{try{o||null==t.return||t.return()}finally{if(r)throw l}}return a}}(e,n)||O(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.")}()}function S(e){return function(e){if(Array.isArray(e))return E(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||O(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,n){if(e){if("string"==typeof e)return E(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)?E(e,n):void 0}}const N=function(e){var n=e.workspaceProps,t=n.patientUuid,m=n.onMutate,d=n.billUuid,_=e.closeWorkspace,u="tablet"===(0,o.useLayoutType)(),b=(0,l.useTranslation)().t,f=(0,o.useConfig)(),h=f.defaultCurrency,y=f.postBilledItems,A=M((0,i.useState)(!1),2),C=A[0],$=A[1],w=M((0,i.useState)([]),2),x=w[0],v=w[1],E=(0,r.ly)(),z=E.data,O=E.error,N=E.isLoading,T=(0,r.DX)(d),q=T.bill,F=T.isLoading,P=T.error,H=(0,s.ly)(),X=H.billableServices,j=H.isLoading,G=H.error,K=!!d&&!!q,L=(0,i.useMemo)((function(){return K?(0,p.Zz)(q.lineItems):0}),[K,null==q?void 0:q.lineItems]),R=(0,i.useMemo)((function(){var e;if(!z)return[];if(!K)return z;var n=null!==(e=q.lineItems)&&void 0!==e?e:[],t=new Set(n.flatMap((function(e){return[e.billableService,e.item].filter(Boolean)})));return z.filter((function(e){return e.name&&!t.has(e.name)}))}),[z,K,null==q?void 0:q.lineItems]),W=function(){return(e=function(){var e,n,i,l,a;return function(e,n){var t,i,l,a={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),r=Object.defineProperty;return r(o,"next",{value:s(0)}),r(o,"throw",{value:s(1)}),r(o,"return",{value:s(2)}),"function"==typeof Symbol&&r(o,Symbol.iterator,{value:function(){return this}}),o;function s(r){return function(s){return function(r){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,r[0]&&(a=0)),a;)try{if(t=1,i&&(l=2&r[0]?i.return:r[0]?i.throw||((l=i.return)&&l.call(i),0):i.next)&&!(l=l.call(i,r[1])).done)return l;switch(i=0,l&&(r=[2&r[0],l.value]),r[0]){case 0:case 1:l=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!((l=(l=a.trys).length>0&&l[l.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!l||r[1]>l[0]&&r[1]<l[3])){a.label=r[1];break}if(6===r[0]&&a.label<l[1]){a.label=l[1],l=r;break}if(l&&a.label<l[2]){a.label=l[2],a.ops.push(r);break}l[2]&&a.ops.pop(),a.trys.pop();continue}r=n.call(e,a)}catch(e){r=[6,e],i=0}finally{t=l=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}(this,(function(s){switch(s.label){case 0:if(C||0===x.length)return[2];if(K&&(j||G))return[2];if(!function(){if(0===x.length)return!1;var e=!0,n=!1,t=void 0;try{for(var i,l=x[Symbol.iterator]();!(e=(i=l.next()).done);e=!0){var a=i.value;if(a.availablePaymentMethods&&a.availablePaymentMethods.length>1&&!a.selectedPaymentMethod)return(0,o.showSnackbar)({title:b("validationError","Validation error"),subtitle:b("paymentMethodRequired","Payment method is required for all items"),kind:"error"}),!1;if(!a.quantity||a.quantity<1)return!1}}catch(e){n=!0,t=e}finally{try{e||null==l.return||l.return()}finally{if(n)throw t}}return!0}())return[2];$(!0),e=x.map((function(e){return{quantity:e.quantity,price:e.price,lineItemOrder:0,paymentStatus:g.i.PENDING,billableService:e.uuid}})),s.label=1;case 1:return s.trys.push([1,6,7,8]),K?(n=q.lineItems.map((function(e){var n=(0,c.e)(X,e.billableService||e.item);if(!n)throw new Error(b("serviceResolutionError",'Could not resolve service "{{service}}"',{service:e.billableService||e.item}));return{uuid:e.uuid,quantity:e.quantity,price:e.price,lineItemOrder:e.lineItemOrder,paymentStatus:e.paymentStatus,billableService:n,priceName:e.priceName,priceUuid:e.priceUuid}})),i={cashPoint:q.cashPointUuid,cashier:q.cashier.uuid,lineItems:S(n).concat(S(e)),patient:q.patientUuid,status:q.status,uuid:q.uuid},[4,(0,r.FR)(i)]):[3,3];case 2:return s.sent(),[3,5];case 3:return l={cashPoint:y.cashPoint,cashier:y.cashier,lineItems:e,payments:[],patient:t,status:g.i.PENDING},[4,(0,r.Xn)(l)];case 4:s.sent(),s.label=5;case 5:return _({discardUnsavedChanges:!0}),null==m||m(),(0,o.showSnackbar)({title:K?b("itemsAddedToBill","Items added to bill"):b("billProcessed","Bill processed"),subtitle:K?b("itemsAddedToBillSuccessfully","Items have been added to the bill successfully"):b("billProcessedSuccessfully","Bill processed successfully"),kind:"success"}),[3,8];case 6:return a=s.sent(),(0,o.showSnackbar)({title:b("billProcessingError","Bill processing error"),kind:"error",subtitle:(p=a,d=Error,(null!=d&&"undefined"!=typeof Symbol&&d[Symbol.hasInstance]?d[Symbol.hasInstance](p):p instanceof d)?a.message:b("unknownBillError","An unexpected error occurred"))}),[3,8];case 7:return $(!1),[7];case 8:return[2]}var p,d}))},function(){var n=this,t=arguments;return new Promise((function(i,l){var a=e.apply(n,t);function o(e){I(a,i,l,o,r,"next",e)}function r(e){I(a,i,l,o,r,"throw",e)}o(void 0)}))})();var e};return i.createElement(o.Workspace2,{title:K?b("addItemsToBill","Add items to bill"):b("addBillItems","Add bill items"),hasUnsavedChanges:x.length>0},i.createElement(a.lVW,{className:k.form,onSubmit:function(e){e.preventDefault(),W()}},i.createElement("div",{className:k.grid},d&&F?i.createElement(a.OuH,{description:(0,o.getCoreTranslation)("loading")+"..."}):d&&P?i.createElement(a.jeF,{kind:"error",lowContrast:!0,title:b("errorLoadingBill","Error loading bill"),subtitle:null==P?void 0:P.message}):K&&G?i.createElement(a.jeF,{kind:"error",lowContrast:!0,title:b("errorLoadingBillableServices","Error loading billable services"),subtitle:null==G?void 0:G.message}):i.createElement(i.Fragment,null,K&&i.createElement("div",{className:k.existingItemsContainer},i.createElement("h4",{className:k.sectionHeading},b("existingItems","Existing items")),q.lineItems.map((function(e){return i.createElement("div",{key:e.uuid,className:k.existingItemRow},i.createElement("span",{className:k.existingItemName},e.billableService||e.item||e.display),i.createElement("span",{className:k.existingItemDetail},e.quantity," x ",(0,p.aL)(e.price,h)),i.createElement("span",{className:k.existingItemTotal},(0,p.aL)(e.price*e.quantity,h)))})),i.createElement("div",{className:k.existingItemsSubtotal},i.createElement("strong",null,b("subtotal","Subtotal"),": ",(0,p.aL)(L,h)))),K&&i.createElement("h4",{className:k.sectionHeading},b("newItems","New items")),N?i.createElement(a.OuH,{description:(0,o.getCoreTranslation)("loading")+"..."}):O?i.createElement(a.jeF,{kind:"error",lowContrast:!0,title:b("errorLoadingBillableServices","Error loading billable services"),subtitle:null==O?void 0:O.message}):i.createElement(a.a32,{id:"searchItems",onChange:function(e){return function(e){if(e){var n=x.find((function(n){return n.uuid===e.uuid}));if(n){var t=D(B({},n),{quantity:n.quantity+1});v(S(x).map((function(n){return n.uuid===e.uuid?t:n})))}else{var i=e.servicePrices||[],l=0,a=null;if(1===i.length){var o=i[0].price;l="number"==typeof o?o:parseFloat(o),a=i[0]}var r={uuid:e.uuid,display:e.name,quantity:1,price:l,billableService:e.uuid,paymentStatus:g.i.PENDING,lineItemOrder:0,selectedPaymentMethod:a,availablePaymentMethods:i};v(S(x).concat([r]))}}}(e.selectedItem)},itemToString:function(e){return(null==e?void 0:e.name)||""},items:R,titleText:b("searchItems","Search items and services")})),x&&x.length>0&&i.createElement("div",{className:k.selectedItemsContainer},i.createElement("h4",{className:k.sectionHeading},b("selectedItems","Selected items")),x.map((function(e){return i.createElement("div",{key:e.uuid,className:k.itemCard},i.createElement("div",{className:k.itemHeader},i.createElement("span",{className:k.itemName},e.display),i.createElement(a.K0,{align:"top-end",kind:"ghost",label:b("remove","Remove"),onClick:function(){return n=e.uuid,t=S(x).filter((function(e){return e.uuid!==n})),void v(t);var n,t}},i.createElement(o.TrashCanIcon,{size:16}))),i.createElement("div",{className:k.itemControls},e.availablePaymentMethods&&e.availablePaymentMethods.length>1?i.createElement("div",{className:k.controlSection},i.createElement("label",null,b("selectPaymentMethod","Select payment method")),i.createElement(a.a32,{id:"payment-method-".concat(e.uuid),items:e.availablePaymentMethods,itemToString:function(e){return e?"".concat(e.name," - ").concat((0,p.aL)("number"==typeof e.price?e.price:parseFloat(e.price),h)):""},selectedItem:e.selectedPaymentMethod,onChange:function(n){var t,i,l,a=n.selectedItem;a&&(t=e.uuid,i=a,l=S(x).map((function(e){return e.uuid===t?D(B({},e),{selectedPaymentMethod:i,price:"number"==typeof i.price?i.price:parseFloat(i.price),priceName:i.name,priceUuid:i.uuid}):e})),v(l))},placeholder:b("selectPaymentMethod","Select payment method"),titleText:""})):i.createElement("div",{className:k.controlSection},i.createElement("label",null,b("unitPrice","Unit price")),i.createElement("span",{className:k.priceDisplay},(0,p.aL)(e.price,h))),i.createElement("div",{className:k.controlSection},i.createElement("label",null,b("quantity","Quantity")),i.createElement(a.Q7x,{allowEmpty:!0,disableWheel:!0,hideSteppers:!0,id:"quantity-".concat(e.uuid),invalid:!e.quantity||e.quantity<1,invalidText:b("quantityMustBeAtLeastOne","Quantity must be at least 1"),onChange:function(n,t){var i,l,a,o=t.value,r=parseFloat(String(o));i=e.uuid,l=isNaN(r)?0:r,a=S(x).map((function(e){return e.uuid===i?D(B({},e),{quantity:l}):e})),v(a)},value:e.quantity})),i.createElement("div",{className:k.controlSection},i.createElement("label",null,b("total","Total")),i.createElement("span",{className:k.totalDisplay},(0,p.aL)(e.price*e.quantity,h)))))})),i.createElement("div",{className:k.grandTotal},i.createElement("strong",null,b("grandTotal","Grand total"),":"," ",(0,p.aL)(L+(0,p.Zz)(x),h))))),i.createElement(a.Te$,{className:u?k.tablet:k.desktop},i.createElement(a.$nd,{className:k.button,kind:"secondary",disabled:C,onClick:function(){return _({discardUnsavedChanges:!1})}},b("discard","Discard")),i.createElement(a.$nd,{className:k.button,kind:"primary",disabled:C||0===x.length||K&&j,type:"submit"},C?i.createElement(a.OuH,{description:b("saving","Saving")+"..."}):b("saveAndClose","Save and close")))))}}}]);
|
package/dist/1807.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1807.js","mappings":"kMAGIA,E,MAA0B,GAA4B,KAE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,IAAMA,CACL5E,UAAWC,EAAO4E,OAClBxG,KAAK,UACLyG,SAAUlJ,GAAyC,IAAzBE,EAAc+B,QAAiBrB,GAAcsB,EACvEiH,KAAK,UACJnJ,EACC,gBAAC6E,EAAAA,IAAaA,CAACC,YAAanF,EAAE,SAAU,UAAY,QAEpDA,EAAE,eAAgB,qBAOhC,C","sources":["webpack://@openmrs/esm-billing-app/./src/billing-form/billing-form.scss","webpack://@openmrs/esm-billing-app/./src/billing-form/billing-form.scss?2871","webpack://@openmrs/esm-billing-app/./src/billing-form/billing-form.workspace.tsx"],"names":["___CSS_LOADER_EXPORT___","push","module","id","locals","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","undefined","workspaceProps","patientUuid","onMutate","billUuid","closeWorkspace","isTablet","useLayoutType","useTranslation","t","useConfig","defaultCurrency","postBilledItems","useState","isSubmitting","setIsSubmitting","selectedItems","setSelectedItems","useBillableServices","data","error","isLoading","useBill","bill","useBillableServicesList","billableServices","isEditMode","existingItemsTotal","useMemo","calculateTotalAmount","lineItems","availableBillableItems","existingNames","Set","flatMap","lineItem","billableService","item","filter","Boolean","name","has","postBillItems","newLineItems","existingLineItems","payload","err","length","isLoadingBillableServices","billableServicesError","availablePaymentMethods","selectedPaymentMethod","showSnackbar","title","subtitle","kind","quantity","validateSelectedItems","map","price","lineItemOrder","paymentStatus","uuid","serviceUuid","getBillableServiceUuid","Error","service","priceName","priceUuid","cashPoint","cashPointUuid","cashier","patient","status","updateBillItems","payments","processBillItems","discardUnsavedChanges","message","Workspace2","hasUnsavedChanges","Form","className","styles","form","onSubmit","event","preventDefault","div","grid","isLoadingBill","InlineLoading","description","getCoreTranslation","billError","InlineNotification","lowContrast","existingItemsContainer","h4","sectionHeading","key","existingItemRow","span","existingItemName","display","existingItemDetail","convertToCurrency","existingItemTotal","existingItemsSubtotal","strong","ComboBox","onChange","existingItem","find","selectedItem","updatedItem","servicePrices","defaultPrice","parseFloat","mappedItem","selectBillableItem","itemToString","items","titleText","selectedItemsContainer","itemCard","itemHeader","itemName","IconButton","align","label","onClick","updatedItems","TrashCanIcon","size","itemControls","controlSection","method","itemUuid","paymentMethod","placeholder","priceDisplay","NumberInput","allowEmpty","disableWheel","hideSteppers","invalid","invalidText","_","value","number","String","isNaN","totalDisplay","grandTotal","ButtonSet","tablet","desktop","Button","button","disabled","type"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"1807.js","mappings":"kMAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,6gUAA8gU,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,kEAAkE,iDAAiD,uEAAuE,2DAA2D,MAAQ,GAAG,SAAW,w7DAAw7D,eAAiB,CAAC,g/DAAg/D,2rLAA2rL,05DAA05D,w8uBAAw8uB,WAAa,MAEj06CH,EAAwBI,OAAS,CAChC,OAAU,6CACV,QAAW,8CACX,OAAU,6CACV,IAAO,0CACP,cAAiB,oDACjB,WAAc,iDACd,aAAgB,mDAChB,aAAgB,mDAChB,KAAQ,2CACR,KAAQ,2CACR,IAAO,0CACP,OAAU,6CACV,uBAA0B,6DAC1B,gBAAmB,sDACnB,iBAAoB,uDACpB,mBAAsB,yDACtB,kBAAqB,wDACrB,sBAAyB,4DACzB,eAAkB,qDAClB,uBAA0B,6DAC1B,SAAY,+CACZ,WAAc,iDACd,SAAY,+CACZ,aAAgB,mDAChB,eAAkB,qDAClB,aAAgB,mDAChB,aAAgB,mDAChB,WAAc,kDAEf,S,sRC1BIC,EAAU,CAAC,EAEfA,EAAQC,kBAAoB,IAC5BD,EAAQE,cAAgB,IAElBF,EAAQG,OAAS,SAAc,KAAM,QAE3CH,EAAQI,OAAS,IACjBJ,EAAQK,mBAAqB,IAEhB,IAAI,IAASL,GAKnB,QAAe,KAAW,IAAQD,OAAS,IAAQA,YAASO,E,stECkZnE,QAnY2E,Y,QACzEC,eAAkBC,EAAAA,EAAAA,YAAaC,EAAAA,EAAAA,SAAUC,EAAAA,EAA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,EAAE,aAAc,eAAe,IAAE,KACjCmG,EAAAA,EAAAA,IAAkBjF,GAAqBE,EAAAA,EAAAA,IAAqBb,GAAgBL,OAOvF,gBAACkJ,EAAAA,IAASA,CAACzE,UAAW9E,EAAW+E,EAAOyE,OAASzE,EAAO0E,SACtD,gBAACC,EAAAA,IAAMA,CACL5E,UAAWC,EAAO4E,OAClB1G,KAAK,YACL2G,SAAUpJ,EACVuH,QAAS,W,OAAMhI,EAAe,CAAE0E,uBAAuB,G,GACtDtE,EAAE,UAAW,YAEhB,gBAACuJ,EAAAA,IAAMA,CACL5E,UAAWC,EAAO4E,OAClB1G,KAAK,UACL2G,SAAUpJ,GAAyC,IAAzBE,EAAc+B,QAAiBrB,GAAcsB,EACvEmH,KAAK,UACJrJ,EACC,gBAAC+E,EAAAA,IAAaA,CAACC,YAAarF,EAAE,SAAU,UAAY,QAEpDA,EAAE,eAAgB,qBAOhC,C","sources":["webpack://@openmrs/esm-billing-app/./src/billing-form/billing-form.scss","webpack://@openmrs/esm-billing-app/./src/billing-form/billing-form.scss?2871","webpack://@openmrs/esm-billing-app/./src/billing-form/billing-form.workspace.tsx"],"names":["___CSS_LOADER_EXPORT___","push","module","id","locals","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","undefined","workspaceProps","patientUuid","onMutate","billUuid","closeWorkspace","isTablet","useLayoutType","useTranslation","t","useConfig","defaultCurrency","postBilledItems","useState","isSubmitting","setIsSubmitting","selectedItems","setSelectedItems","useBillableServices","data","error","isLoading","useBill","bill","useBillableServicesList","billableServices","isEditMode","existingItemsTotal","useMemo","calculateTotalAmount","lineItems","availableBillableItems","existingNames","Set","flatMap","lineItem","billableService","item","filter","Boolean","name","has","postBillItems","newLineItems","existingLineItems","payload","err","length","isLoadingBillableServices","billableServicesError","availablePaymentMethods","selectedPaymentMethod","showSnackbar","title","subtitle","kind","quantity","validateSelectedItems","map","price","lineItemOrder","paymentStatus","BillStatus","PENDING","uuid","serviceUuid","getBillableServiceUuid","Error","service","priceName","priceUuid","cashPoint","cashPointUuid","cashier","patient","status","updateBillItems","payments","processBillItems","discardUnsavedChanges","message","Workspace2","hasUnsavedChanges","Form","className","styles","form","onSubmit","event","preventDefault","div","grid","isLoadingBill","InlineLoading","description","getCoreTranslation","billError","InlineNotification","lowContrast","existingItemsContainer","h4","sectionHeading","key","existingItemRow","span","existingItemName","display","existingItemDetail","convertToCurrency","existingItemTotal","existingItemsSubtotal","strong","ComboBox","onChange","existingItem","find","selectedItem","updatedItem","servicePrices","defaultPrice","parseFloat","mappedItem","selectBillableItem","itemToString","items","titleText","selectedItemsContainer","itemCard","itemHeader","itemName","IconButton","align","label","onClick","updatedItems","TrashCanIcon","size","itemControls","controlSection","method","itemUuid","paymentMethod","placeholder","priceDisplay","NumberInput","allowEmpty","disableWheel","hideSteppers","invalid","invalidText","_","value","number","String","isNaN","totalDisplay","grandTotal","ButtonSet","tablet","desktop","Button","button","disabled","type"],"sourceRoot":""}
|
package/dist/2704.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_billing_app=globalThis.webpackChunk_openmrs_esm_billing_app||[]).push([[2704],{17093(e,n,t){t.d(n,{A:()=>o});var a=t(54991),r=t.n(a),i=t(76314),l=t.n(i)()(r());l.push([e.id,".-esm-billing__delete-line-item-confirmation__spinner___pvl4L .cds--inline-loading{min-height:1rem}.-esm-billing__delete-line-item-confirmation__spinner___pvl4L .cds--inline-loading__text{font-size:unset !important}.-esm-billing__delete-line-item-confirmation__modalBody___EJ97w{padding-bottom:1rem}.-esm-billing__delete-line-item-confirmation__sectionTitle___IAvf7{margin-bottom:.75rem}","",{version:3,sources:["webpack://./src/modal/delete-line-item-confirmation.scss","webpack://./node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAGE,mFACE,eC2BS,CDxBX,yFACE,0BAAA,CAIJ,gEACE,mBCkBW,CDfb,mEACE,oBCSW",sourcesContent:["@use '@carbon/layout';\n\n.spinner {\n :global(.cds--inline-loading) {\n min-height: layout.$spacing-05;\n }\n\n :global(.cds--inline-loading__text) {\n font-size: unset !important;\n }\n}\n\n.modalBody {\n padding-bottom: layout.$spacing-05;\n}\n\n.sectionTitle {\n margin-bottom: layout.$spacing-04;\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={spinner:"-esm-billing__delete-line-item-confirmation__spinner___pvl4L",modalBody:"-esm-billing__delete-line-item-confirmation__modalBody___EJ97w",sectionTitle:"-esm-billing__delete-line-item-confirmation__sectionTitle___IAvf7"};const o=l},37670(e,n,t){t.d(n,{A:()=>y});var a=t(85072),r=t.n(a),i=t(97825),l=t.n(i),o=t(77659),c=t.n(o),s=t(55056),u=t.n(s),p=t(10540),m=t.n(p),d=t(41113),g=t.n(d),b=t(17093),f={};f.styleTagTransform=g(),f.setAttributes=u(),f.insert=c().bind(null,"head"),f.domAPI=l(),f.insertStyleElement=m(),r()(b.A,f);const y=b.A&&b.A.locals?b.A.locals:void 0},92704(e,n,t){t.r(n),t.d(n,{default:()=>m});var a=t(16072),r=t(35301),i=t(2076),l=t(57224),o=t(54392),c=t(37670);function s(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,t,a,r,i,l){try{var o=e[i](l),c=o.value}catch(e){return void t(e)}o.done?n(c):Promise.resolve(c).then(a,r)}function p(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,r,i=[],l=!0,o=!1;try{for(t=t.call(e);!(l=(a=t.next()).done)&&(i.push(a.value),!n||i.length!==n);l=!0);}catch(e){o=!0,r=e}finally{try{l||null==t.return||t.return()}finally{if(o)throw r}}return i}}(e,n)||function(e,n){if(e){if("string"==typeof e)return s(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)?s(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 m=function(e){var n=e.closeModal,t=e.item,s=e.onMutate,m=(0,i.useTranslation)().t,d=p((0,a.useState)(!1),2),g=d[0],b=d[1],f=p((0,a.useState)(""),2),y=f[0],_=f[1],h=t.billableService||t.item;return a.createElement(a.Fragment,null,a.createElement(r.rQ0,{className:c.A.sectionTitle,closeModal:n,title:m("deleteLineItem","Delete line item")}),a.createElement(r.cwr,{className:c.A.modalBody},a.createElement(r.BJc,{gap:5},a.createElement("p",null,m("deleteConfirmation",'Are you sure you want to delete "{{itemName}}" from this bill?',{itemName:h})),a.createElement(r.fs1,{enableCounter:!0,id:"deleteReason",labelText:m("deleteReason","Reason for deletion"),maxCount:255,onChange:function(e){return _(e.target.value)},placeholder:m("deleteReasonPlaceholder","Enter the reason for removing this line item from the bill"),required:!0,rows:3,value:y}))),a.createElement(r.jlY,null,a.createElement(r.$nd,{kind:"secondary",onClick:n},(0,l.getCoreTranslation)("cancel")),a.createElement(r.$nd,{kind:"danger",onClick:function(){return(e=function(){var e,a,r,i;return function(e,n){var t,a,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),o=Object.defineProperty;return o(l,"next",{value:c(0)}),o(l,"throw",{value:c(1)}),o(l,"return",{value:c(2)}),"function"==typeof Symbol&&o(l,Symbol.iterator,{value:function(){return this}}),l;function c(o){return function(c){return function(o){if(t)throw new TypeError("Generator is already executing.");for(;l&&(l=0,o[0]&&(i=0)),i;)try{if(t=1,a&&(r=2&o[0]?a.return:o[0]?a.throw||((r=a.return)&&r.call(a),0):a.next)&&!(r=r.call(a,o[1])).done)return r;switch(a=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,a=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!((r=(r=i.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){i.label=o[1];break}if(6===o[0]&&i.label<r[1]){i.label=r[1],r=o;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(o);break}r[2]&&i.ops.pop(),i.trys.pop();continue}o=n.call(e,i)}catch(e){o=[6,e],a=0}finally{t=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}}(this,(function(c){switch(c.label){case 0:b(!0),c.label=1;case 1:return c.trys.push([1,3,4,5]),[4,(0,o.mi)(t.uuid,y.trim())];case 2:return c.sent(),null==s||s(),(0,l.showSnackbar)({title:m("lineItemDeleted","Line item deleted"),subtitle:m("lineItemDeleteSuccess","Bill line item deleted successfully"),kind:"success"}),n(),[3,5];case 3:return e=c.sent(),i=(null==e||null===(r=e.responseBody)||void 0===r||null===(a=r.error)||void 0===a?void 0:a.message)||(null==e?void 0:e.message)||m("deleteFailedTryAgain","Unable to delete line item. Please try again."),(0,l.showSnackbar)({title:m("lineItemDeleteFailed","Failed to delete line item"),subtitle:i,kind:"error"}),[3,5];case 4:return b(!1),[7];case 5:return[2]}}))},function(){var n=this,t=arguments;return new Promise((function(a,r){var i=e.apply(n,t);function l(e){u(i,a,r,l,o,"next",e)}function o(e){u(i,a,r,l,o,"throw",e)}l(void 0)}))})();var e},disabled:g||!y.trim()},g?a.createElement(r.OuH,{className:c.A.spinner,description:m("deleting","Deleting")+"..."}):a.createElement("span",null,(0,l.getCoreTranslation)("delete")))))}}}]);
|
package/dist/2704.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2704.js","mappings":"kMAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,sYAAuY,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,2DAA2D,wEAAwE,MAAQ,GAAG,SAAW,wEAAwE,eAAiB,C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AYC,QAASpC,IAC/BqC,EAAAA,EAAAA,oBAAmB,WAGtB,gBAACH,EAAAA,IAAMA,CAACC,KAAK,SAASC,QA9DA,W,wBAcjBE,EAELA,EAAAA,EADIC,E,0vCAdRhC,GAAc,G,iBAGZ,O,uBAAA,C,GAAMiC,EAAAA,EAAAA,IAAevC,EAAKwC,KAAMjC,EAAakC,S,cAA7C,SACAxC,SAAAA,KAEAyC,EAAAA,EAAAA,cAAa,CACX3B,MAAOZ,EAAE,kBAAmB,qBAC5BwC,SAAUxC,EAAE,wBAAyB,uCACrC+B,KAAM,YAGRnC,I,oBACOsC,EAAAA,EAAAA,OACDC,GACJD,SAAiB,QAAjBA,EAAAA,EAAKO,oBAALP,IAAAA,GAAwB,QAAxBA,EAAAA,EAAmBQ,aAAnBR,IAAAA,OAAAA,EAAAA,EAA0BC,WAC1BD,aAAAA,EAAAA,EAAKC,UACLnC,EAAE,uBAAwB,kDAE5BuC,EAAAA,EAAAA,cAAa,CACX3B,MAAOZ,EAAE,uBAAwB,8BACjCwC,SAAUL,EACVJ,KAAM,U,oBAGR5B,GAAc,G,wBAElB,E,wLAkC0DwC,SAAUzC,IAAeE,EAAakC,QACvFpC,EACC,gBAAC0C,EAAAA,IAAaA,CAACnC,UAAWC,EAAAA,EAAOmC,QAASC,YAAa9C,EAAE,WAAY,YAAc,QAEnF,gBAAC+C,OAAAA,MAAMd,EAAAA,EAAAA,oBAAmB,aAMtC,C","sources":["webpack://@openmrs/esm-billing-app/./src/modal/delete-line-item-confirmation.scss","webpack://@openmrs/esm-billing-app/./src/modal/delete-line-item-confirmation.scss?4b0c","webpack://@openmrs/esm-billing-app/./src/modal/delete-line-item-confirmation.modal.tsx"],"names":["___CSS_LOADER_EXPORT___","push","module","id","locals","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","undefined","closeModal","item","onMutate","useTranslation","t","useState","isDeleting","setIsDeleting","deleteReason","setDeleteReason","itemName","billableService","ModalHeader","className","styles","sectionTitle","title","ModalBody","modalBody","Stack","gap","p","TextArea","enableCounter","labelText","maxCount","onChange","e","target","value","placeholder","required","rows","ModalFooter","Button","kind","onClick","getCoreTranslation","err","message","deleteBillItem","uuid","trim","showSnackbar","subtitle","responseBody","error","disabled","InlineLoading","spinner","description","span"],"sourceRoot":""}
|