@openmrs/esm-appointments-app 9.1.2-pre.6596 → 9.2.0

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/dist/4745.js CHANGED
@@ -1 +1 @@
1
- (globalThis.webpackChunk_openmrs_esm_appointments_app=globalThis.webpackChunk_openmrs_esm_appointments_app||[]).push([[4745],{1740:n=>{"use strict";n.exports=function(n){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=n.insertStyleElement(n);return{update:function(t){!function(n,e,t){var a="";t.supports&&(a+="@supports (".concat(t.supports,") {")),t.media&&(a+="@media ".concat(t.media," {"));var i=void 0!==t.layer;i&&(a+="@layer".concat(t.layer.length>0?" ".concat(t.layer):""," {")),a+=t.css,i&&(a+="}"),t.media&&(a+="}"),t.supports&&(a+="}");var o=t.sourceMap;o&&"undefined"!=typeof btoa&&(a+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleTagTransform(a,n,e.options)}(e,n,t)},remove:function(){!function(n){if(null===n.parentNode)return!1;n.parentNode.removeChild(n)}(e)}}}},15196:(n,e,t)=>{"use strict";t.d(e,{A:()=>s});var a=t(30977),i=t.n(a),o=t(95924),r=t.n(o)()(i());r.push([n.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-appointments__patient-upcoming-appointments-card__container___KFtGG{margin:1rem}.-esm-appointments__patient-upcoming-appointments-card__container___KFtGG section{margin:1rem 0}.-esm-appointments__patient-upcoming-appointments-card__sectionTitle___Jj\\+iv{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);color:#525252;margin:0 0 .5rem 0}.-esm-appointments__patient-upcoming-appointments-card__checkbox___Q0bWB:not(:first-child){margin:0}.-esm-appointments__patient-upcoming-appointments-card__input___IVxme{margin:0 1rem 1rem}.-esm-appointments__patient-upcoming-appointments-card__headerLabel___uqtaE{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);color:#525252}.-esm-appointments__patient-upcoming-appointments-card__checkboxContainer___te\\+1s{display:grid;grid-template-columns:1fr 1fr}.-esm-appointments__patient-upcoming-appointments-card__structuredList___wnDvB{padding:.5rem .5rem .5rem}.-esm-appointments__patient-upcoming-appointments-card__inlineNotification___gw6y0{width:100%;max-width:unset;padding:0}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/patient-appointments/patient-upcoming-appointments-card.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,0EACE,WC0BW,CDxBX,kFACE,aAAA,CAIJ,8EEs1BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CFp1BF,aDPQ,CCQR,kBAAA,CAIA,2FACE,QAAA,CAIJ,sEACE,kBAAA,CAGF,4EEs0BI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CFp0BF,aDvBQ,CC0BV,mFACE,YAAA,CACA,6BAAA,CAGF,+EACE,yBAAA,CAGF,mFACE,UAAA,CACA,eAAA,CACA,SAAA",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.container {\n margin: layout.$spacing-05;\n\n & section {\n margin: layout.$spacing-05 0;\n }\n}\n\n.sectionTitle {\n @include type.type-style('heading-compact-02');\n color: $text-02;\n margin: 0 0 layout.$spacing-03 0;\n}\n\n.checkbox {\n &:not(:first-child) {\n margin: 0;\n }\n}\n\n.input {\n margin: 0 layout.$spacing-05 layout.$spacing-05;\n}\n\n.headerLabel {\n @include type.type-style('label-01');\n color: $text-02;\n}\n\n.checkboxContainer {\n display: grid;\n grid-template-columns: 1fr 1fr;\n}\n\n.structuredList {\n padding: layout.$spacing-03 layout.$spacing-03 layout.$spacing-03;\n}\n\n.inlineNotification {\n width: 100%;\n max-width: unset;\n padding: 0;\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:""}]),r.locals={container:"-esm-appointments__patient-upcoming-appointments-card__container___KFtGG",sectionTitle:"-esm-appointments__patient-upcoming-appointments-card__sectionTitle___Jj+iv",checkbox:"-esm-appointments__patient-upcoming-appointments-card__checkbox___Q0bWB",input:"-esm-appointments__patient-upcoming-appointments-card__input___IVxme",headerLabel:"-esm-appointments__patient-upcoming-appointments-card__headerLabel___uqtaE",checkboxContainer:"-esm-appointments__patient-upcoming-appointments-card__checkboxContainer___te+1s",structuredList:"-esm-appointments__patient-upcoming-appointments-card__structuredList___wnDvB",inlineNotification:"-esm-appointments__patient-upcoming-appointments-card__inlineNotification___gw6y0"};const s=r},19862:(n,e,t)=>{"use strict";t.d(e,{Fy:()=>g,KQ:()=>f,RA:()=>h,q4:()=>d,wQ:()=>y});var a=t(1343),i=t(23464),o=t.n(i),r=t(85602),s=t.n(r),p=t(71123),l=t(54440);function c(n,e,t,a,i,o,r){try{var s=n[o](r),p=s.value}catch(n){return void t(n)}s.done?e(p):Promise.resolve(p).then(a,i)}o().extend(s());var u="".concat(l.restBaseUrl,"/appointment");function d(){var n=(0,p.iX)().mutate;return{mutateAppointments:(0,a.useCallback)(function(){return n(function(n){return"string"==typeof n&&n.startsWith(u)||Array.isArray(n)&&n[0].startsWith(u)})},[n])}}function f(){var n=(0,p.Ay)("".concat(l.restBaseUrl,"/appointmentService/all/full"),l.openmrsFetch),e=n.data,t=n.error,a=n.isLoading;return{data:e?e.data:null,error:t,isLoading:a}}function g(n,e){return(0,l.openmrsFetch)("".concat(l.restBaseUrl,"/appointment"),{method:"POST",signal:e.signal,headers:{"Content-Type":"application/json"},body:n})}function h(n,e){return(0,l.openmrsFetch)("".concat(l.restBaseUrl,"/recurring-appointments"),{method:"POST",signal:e.signal,headers:{"Content-Type":"application/json"},body:n})}"".concat(l.restBaseUrl,"/appointments/search");var y=function(n){return(e=function(){return function(n,e){var t,a,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},r=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return r.next=s(0),r.throw=s(1),r.return=s(2),"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(p){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(o=0)),o;)try{if(t=1,a&&(i=2&s[0]?a.return:s[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,s[1])).done)return i;switch(a=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,a=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(n,o)}catch(n){s=[6,n],a=0}finally{t=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,p])}}}(this,function(e){switch(e.label){case 0:return[4,(0,l.openmrsFetch)("".concat(l.restBaseUrl,"/appointments/conflicts"),{method:"POST",body:{patientUuid:n.patientUuid,serviceUuid:n.serviceUuid,startDateTime:n.startDateTime,endDateTime:n.endDateTime,providers:[],locationUuid:n.locationUuid,appointmentKind:n.appointmentKind},headers:{"Content-Type":"application/json"}})];case 1:return[2,e.sent()]}})},function(){var n=this,t=arguments;return new Promise(function(a,i){var o=e.apply(n,t);function r(n){c(o,a,i,r,s,"next",n)}function s(n){c(o,a,i,r,s,"throw",n)}r(void 0)})})();var e}},30493:(n,e,t)=>{"use strict";t.d(e,{D:()=>u,y:()=>d});var a=t(23464),i=t.n(a),o=t(71123),r=t(54440),s=t(85602),p=t.n(s);function l(n,e,t,a,i,o,r){try{var s=n[o](r),p=s.value}catch(n){return void t(n)}s.done?e(p):Promise.resolve(p).then(a,i)}i().extend(p());var c="".concat(r.restBaseUrl,"/appointments/search");function u(n,e,t){var a,s,p,l,u,d,f,g=(0,o.Ay)(c,function(){return(0,r.openmrsFetch)(c,{method:"POST",signal:t.signal,headers:{"Content-Type":"application/json"},body:{patientUuid:n,startDate:e}})}),h=g.data,y=g.error,m=g.isLoading,b=g.isValidating,$=g.mutate,v=(null==h||null===(a=h.data)||void 0===a?void 0:a.length)?h.data:null,w=null==v||null===(p=v.sort(function(n,e){return e.startDateTime>n.startDateTime?1:-1}))||void 0===p||null===(s=p.filter(function(n){return"Cancelled"!==n.status}))||void 0===s?void 0:s.filter(function(n){var e=n.startDateTime;return i()(new Date(e).toISOString()).isBefore((new Date).setHours(0,0,0,0))}),k=null==v||null===(u=v.sort(function(n,e){return n.startDateTime>e.startDateTime?1:-1}))||void 0===u||null===(l=u.filter(function(n){return"Cancelled"!==n.status}))||void 0===l?void 0:l.filter(function(n){var e=n.startDateTime;return i()(new Date(e).toISOString()).isAfter(new Date)}),A=null==v||null===(f=v.sort(function(n,e){return n.startDateTime>e.startDateTime?1:-1}))||void 0===f||null===(d=f.filter(function(n){return"Cancelled"!==n.status}))||void 0===d?void 0:d.filter(function(n){var e=n.startDateTime;return i()(new Date(e).toISOString()).isToday()});return{data:h?{pastAppointments:w,upcomingAppointments:k,todaysAppointments:A}:null,error:y,isLoading:m,isValidating:b,mutate:$}}var d=function(n,e){return(t=function(){var t,a,o;return function(n,e){var t,a,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},r=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return r.next=s(0),r.throw=s(1),r.return=s(2),"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(p){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(o=0)),o;)try{if(t=1,a&&(i=2&s[0]?a.return:s[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,s[1])).done)return i;switch(a=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,a=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(n,o)}catch(n){s=[6,n],a=0}finally{t=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,p])}}}(this,function(s){switch(s.label){case 0:return t=Intl.DateTimeFormat().resolvedOptions().timeZone,a=i()(new Date).format("YYYY-MM-DDTHH:mm:ss.SSSZZ"),o="".concat(r.restBaseUrl,"/appointments/").concat(e,"/status-change"),[4,(0,r.openmrsFetch)(o,{body:{toStatus:n,onDate:a,timeZone:t},method:"POST",headers:{"Content-Type":"application/json"}})];case 1:return[2,s.sent()]}})},function(){var n=this,e=arguments;return new Promise(function(a,i){var o=t.apply(n,e);function r(n){l(o,a,i,r,s,"next",n)}function s(n){l(o,a,i,r,s,"throw",n)}r(void 0)})})();var t}},30855:(n,e,t)=>{"use strict";n.exports=function(n){var e=t.nc;e&&n.setAttribute("nonce",e)}},30977:n=>{"use strict";function e(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,a=new Array(e);t<e;t++)a[t]=n[t];return a}n.exports=function(n){var t,a,i=(a=4,function(n){if(Array.isArray(n))return n}(t=n)||function(n,e){var t=n&&("undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"]);if(null!=t){var a,i,o=[],r=!0,s=!1;try{for(t=t.call(n);!(r=(a=t.next()).done)&&(o.push(a.value),!e||o.length!==e);r=!0);}catch(n){s=!0,i=n}finally{try{r||null==t.return||t.return()}finally{if(s)throw i}}return o}}(t,a)||function(n,t){if(n){if("string"==typeof n)return e(n,t);var a=Object.prototype.toString.call(n).slice(8,-1);return"Object"===a&&n.constructor&&(a=n.constructor.name),"Map"===a||"Set"===a?Array.from(n):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?e(n,t):void 0}}(t,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=i[1],r=i[3];if(!r)return o;if("function"==typeof btoa){var s=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),p="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),l="/*# ".concat(p," */"),c=r.sources.map(function(n){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(n," */")});return[o].concat(c).concat([l]).join("\n")}return[o].join("\n")}},34745:(n,e,t)=>{"use strict";t.r(e),t.d(e,{default:()=>T});var a=t(1343),i=t.n(a),o=t(93150),r=t(93689),s=t(54440),p=t(30493),l=t(97999),c=t(72591),u=t.n(c),d=t(1740),f=t.n(d),g=t(88128),h=t.n(g),y=t(30855),m=t.n(y),b=t(93051),$=t.n(b),v=t(73656),w=t.n(v),k=t(15196),A={};A.styleTagTransform=w(),A.setAttributes=m(),A.insert=h().bind(null,"head"),A.domAPI=f(),A.insertStyleElement=$(),u()(k.A,A);const x=k.A&&k.A.locals?k.A.locals:void 0;var _=t(23464),z=t.n(_),C=t(19862);function M(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,a=new Array(e);t<e;t++)a[t]=n[t];return a}const T=function(n){var e,t,c,u,d=n.patientUuid,f=n.setVisitFormCallbacks,g=n.patientChartConfig,h=(0,o.useTranslation)().t,y=z()((new Date).toISOString()).subtract(6,"month").toISOString(),m=h("upcomingAppointments","Upcoming appointments"),b=(c=(0,a.useState)(null),u=2,function(n){if(Array.isArray(n))return n}(c)||function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var a,i,o=[],r=!0,s=!1;try{for(t=t.call(n);!(r=(a=t.next()).done)&&(o.push(a.value),!e||o.length!==e);r=!0);}catch(n){s=!0,i=n}finally{try{r||null==t.return||t.return()}finally{if(s)throw i}}return o}}(c,u)||function(n,e){if(n){if("string"==typeof n)return M(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?M(n,e):void 0}}(c,u)||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.")}()),$=b[0],v=b[1],w=(0,C.q4)().mutateAppointments,k=(0,a.useMemo)(function(){return w},[w]),A=(0,a.useMemo)(function(){return new AbortController},[]);(0,a.useEffect)(function(){return function(){return A.abort()}},[A]);var _=(0,p.D)(d,y,A),T=_.data,E=_.error,S=_.isLoading,D=(0,a.useMemo)(function(){return{onVisitCreatedOrUpdated:function(){return $?(0,p.y)("CheckedIn",$.uuid).then(function(){k(),(0,s.showSnackbar)({isLowContrast:!0,kind:"success",subtitle:h("appointmentMarkedChecked","Appointment marked as Checked In"),title:h("appointmentCheckedIn","Appointment Checked In")})}).catch(function(n){(0,s.showSnackbar)({title:h("updateError","Error updating upcoming appointment"),kind:"error",isLowContrast:!1,subtitle:null==n?void 0:n.message})}):Promise.resolve()}}},[$,k,h]);(0,a.useEffect)(function(){f(D)},[D,f]);var I=(null==T||null===(e=T.todaysAppointments)||void 0===e?void 0:e.length)?null==T?void 0:T.todaysAppointments:[],U=(null==T||null===(t=T.upcomingAppointments)||void 0===t?void 0:t.length)?null==T?void 0:T.upcomingAppointments:[],N=I.concat(U).filter(function(n){return"CheckedIn"!==n.status});return g.showUpcomingAppointments?E?i().createElement(l.ErrorState,{headerTitle:m,error:E}):S?i().createElement("span",null,i().createElement(r.OuH,null)):N.length?i().createElement("div",null,i().createElement("div",null,i().createElement("p",{className:x.sectionTitle},m),i().createElement("span",{className:x.headerLabel},h("appointmentToFulfill","Select appointment to fulfill"))),i().createElement(r.r9c,null,i().createElement(r.AVA,null,i().createElement(r.Cvq,{head:!0},i().createElement(r.Um2,{head:!0},h("date","Date")),i().createElement(r.Um2,{head:!0},h("appointmentType","Appointment type")),i().createElement(r.Um2,{head:!0},h("action","Action")))),i().createElement(r.GRJ,null,N.map(function(n,e){return i().createElement(r.Cvq,{key:e,className:x.structuredList},i().createElement(r.Um2,null,(0,s.formatDate)((0,s.parseDate)(n.startDateTime),{mode:"wide"})),i().createElement(r.Um2,null,n.service?n.service.name:"——"),i().createElement(r.Um2,null,i().createElement(r.aaP,{className:x.radioButton,labelText:"",id:"radio-".concat(e),name:"appointmentRadio",value:n.uuid,checked:$===n,onChange:function(){return function(n){v(n)}(n)}})))})))):i().createElement(r.jeF,{kind:"info",lowContrast:!0,className:x.inlineNotification,title:h("upcomingAppointments","Upcoming appointments"),subtitle:h("noUpcomingAppointments","No upcoming appointments found")}):i().createElement(i().Fragment,null)}},72591:n=>{"use strict";var e=[];function t(n){for(var t=-1,a=0;a<e.length;a++)if(e[a].identifier===n){t=a;break}return t}function a(n,a){for(var o={},r=[],s=0;s<n.length;s++){var p=n[s],l=a.base?p[0]+a.base:p[0],c=o[l]||0,u="".concat(l," ").concat(c);o[l]=c+1;var d=t(u),f={css:p[1],media:p[2],sourceMap:p[3],supports:p[4],layer:p[5]};if(-1!==d)e[d].references++,e[d].updater(f);else{var g=i(f,a);a.byIndex=s,e.splice(s,0,{identifier:u,updater:g,references:1})}r.push(u)}return r}function i(n,e){var t=e.domAPI(e);return t.update(n),function(e){if(e){if(e.css===n.css&&e.media===n.media&&e.sourceMap===n.sourceMap&&e.supports===n.supports&&e.layer===n.layer)return;t.update(n=e)}else t.remove()}}n.exports=function(n,i){var o=a(n=n||[],i=i||{});return function(n){n=n||[];for(var r=0;r<o.length;r++){var s=t(o[r]);e[s].references--}for(var p=a(n,i),l=0;l<o.length;l++){var c=t(o[l]);0===e[c].references&&(e[c].updater(),e.splice(c,1))}o=p}}},73656:n=>{"use strict";n.exports=function(n,e){if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}},85602:function(n){n.exports=function(){"use strict";return function(n,e,t){e.prototype.isToday=function(){var n="YYYY-MM-DD",e=t();return this.format(n)===e.format(n)}}}()},88128:n=>{"use strict";var e={};n.exports=function(n,t){var a=function(n){if(void 0===e[n]){var t=document.querySelector(n);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(n){t=null}e[n]=t}return e[n]}(n);if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}},93051:n=>{"use strict";n.exports=function(n){var e=document.createElement("style");return n.setAttributes(e,n.attributes),n.insert(e,n.options),e}},95924:n=>{"use strict";n.exports=function(n){var e=[];return e.toString=function(){return this.map(function(e){var t=n(e);return e[2]?"@media ".concat(e[2]," {").concat(t,"}"):t}).join("")},e.i=function(n,t,a){"string"==typeof n&&(n=[[null,n,""]]);var i={};if(a)for(var o=0;o<this.length;o++){var r=this[o][0];null!=r&&(i[r]=!0)}for(var s=0;s<n.length;s++){var p=[].concat(n[s]);a&&i[p[0]]||(t&&(p[2]?p[2]="".concat(t," and ").concat(p[2]):p[2]=t),e.push(p))}},e}}}]);
1
+ (globalThis.webpackChunk_openmrs_esm_appointments_app=globalThis.webpackChunk_openmrs_esm_appointments_app||[]).push([[4745],{1740:n=>{"use strict";n.exports=function(n){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=n.insertStyleElement(n);return{update:function(t){!function(n,e,t){var a="";t.supports&&(a+="@supports (".concat(t.supports,") {")),t.media&&(a+="@media ".concat(t.media," {"));var i=void 0!==t.layer;i&&(a+="@layer".concat(t.layer.length>0?" ".concat(t.layer):""," {")),a+=t.css,i&&(a+="}"),t.media&&(a+="}"),t.supports&&(a+="}");var o=t.sourceMap;o&&"undefined"!=typeof btoa&&(a+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleTagTransform(a,n,e.options)}(e,n,t)},remove:function(){!function(n){if(null===n.parentNode)return!1;n.parentNode.removeChild(n)}(e)}}}},15196:(n,e,t)=>{"use strict";t.d(e,{A:()=>s});var a=t(30977),i=t.n(a),o=t(95924),r=t.n(o)()(i());r.push([n.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-appointments__patient-upcoming-appointments-card__container___KFtGG{margin:1rem}.-esm-appointments__patient-upcoming-appointments-card__container___KFtGG section{margin:1rem 0}.-esm-appointments__patient-upcoming-appointments-card__sectionTitle___Jj\\+iv{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);color:#525252;margin:0 0 .5rem 0}.-esm-appointments__patient-upcoming-appointments-card__checkbox___Q0bWB:not(:first-child){margin:0}.-esm-appointments__patient-upcoming-appointments-card__input___IVxme{margin:0 1rem 1rem}.-esm-appointments__patient-upcoming-appointments-card__headerLabel___uqtaE{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);color:#525252}.-esm-appointments__patient-upcoming-appointments-card__checkboxContainer___te\\+1s{display:grid;grid-template-columns:1fr 1fr}.-esm-appointments__patient-upcoming-appointments-card__structuredList___wnDvB{padding:.5rem .5rem .5rem}.-esm-appointments__patient-upcoming-appointments-card__inlineNotification___gw6y0{width:100%;max-width:unset;padding:0}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/patient-appointments/patient-upcoming-appointments-card.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,0EACE,WC0BW,CDxBX,kFACE,aAAA,CAIJ,8EEs1BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CFp1BF,aDPQ,CCQR,kBAAA,CAIA,2FACE,QAAA,CAIJ,sEACE,kBAAA,CAGF,4EEs0BI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CFp0BF,aDvBQ,CC0BV,mFACE,YAAA,CACA,6BAAA,CAGF,+EACE,yBAAA,CAGF,mFACE,UAAA,CACA,eAAA,CACA,SAAA",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.container {\n margin: layout.$spacing-05;\n\n & section {\n margin: layout.$spacing-05 0;\n }\n}\n\n.sectionTitle {\n @include type.type-style('heading-compact-02');\n color: $text-02;\n margin: 0 0 layout.$spacing-03 0;\n}\n\n.checkbox {\n &:not(:first-child) {\n margin: 0;\n }\n}\n\n.input {\n margin: 0 layout.$spacing-05 layout.$spacing-05;\n}\n\n.headerLabel {\n @include type.type-style('label-01');\n color: $text-02;\n}\n\n.checkboxContainer {\n display: grid;\n grid-template-columns: 1fr 1fr;\n}\n\n.structuredList {\n padding: layout.$spacing-03 layout.$spacing-03 layout.$spacing-03;\n}\n\n.inlineNotification {\n width: 100%;\n max-width: unset;\n padding: 0;\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:""}]),r.locals={container:"-esm-appointments__patient-upcoming-appointments-card__container___KFtGG",sectionTitle:"-esm-appointments__patient-upcoming-appointments-card__sectionTitle___Jj+iv",checkbox:"-esm-appointments__patient-upcoming-appointments-card__checkbox___Q0bWB",input:"-esm-appointments__patient-upcoming-appointments-card__input___IVxme",headerLabel:"-esm-appointments__patient-upcoming-appointments-card__headerLabel___uqtaE",checkboxContainer:"-esm-appointments__patient-upcoming-appointments-card__checkboxContainer___te+1s",structuredList:"-esm-appointments__patient-upcoming-appointments-card__structuredList___wnDvB",inlineNotification:"-esm-appointments__patient-upcoming-appointments-card__inlineNotification___gw6y0"};const s=r},19862:(n,e,t)=>{"use strict";t.d(e,{Fy:()=>g,KQ:()=>f,RA:()=>h,q4:()=>d,wQ:()=>y});var a=t(1343),i=t(23464),o=t.n(i),r=t(85602),s=t.n(r),p=t(71123),l=t(54440);function c(n,e,t,a,i,o,r){try{var s=n[o](r),p=s.value}catch(n){return void t(n)}s.done?e(p):Promise.resolve(p).then(a,i)}o().extend(s());var u="".concat(l.restBaseUrl,"/appointment");function d(){var n=(0,p.iX)().mutate;return{mutateAppointments:(0,a.useCallback)(function(){return n(function(n){return"string"==typeof n&&n.startsWith(u)||Array.isArray(n)&&n[0].startsWith(u)})},[n])}}function f(){var n=(0,p.Ay)("".concat(l.restBaseUrl,"/appointmentService/all/full"),l.openmrsFetch),e=n.data,t=n.error,a=n.isLoading;return{data:e?e.data:null,error:t,isLoading:a}}function g(n,e){return(0,l.openmrsFetch)("".concat(l.restBaseUrl,"/appointment"),{method:"POST",signal:e.signal,headers:{"Content-Type":"application/json"},body:n})}function h(n,e){return(0,l.openmrsFetch)("".concat(l.restBaseUrl,"/recurring-appointments"),{method:"POST",signal:e.signal,headers:{"Content-Type":"application/json"},body:n})}"".concat(l.restBaseUrl,"/appointments/search");var y=function(n){return(e=function(){return function(n,e){var t,a,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},r=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return r.next=s(0),r.throw=s(1),r.return=s(2),"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(p){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(o=0)),o;)try{if(t=1,a&&(i=2&s[0]?a.return:s[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,s[1])).done)return i;switch(a=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,a=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(n,o)}catch(n){s=[6,n],a=0}finally{t=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,p])}}}(this,function(e){switch(e.label){case 0:return[4,(0,l.openmrsFetch)("".concat(l.restBaseUrl,"/appointments/conflicts"),{method:"POST",body:{patientUuid:n.patientUuid,serviceUuid:n.serviceUuid,startDateTime:n.startDateTime,endDateTime:n.endDateTime,providers:[],locationUuid:n.locationUuid,appointmentKind:n.appointmentKind},headers:{"Content-Type":"application/json"}})];case 1:return[2,e.sent()]}})},function(){var n=this,t=arguments;return new Promise(function(a,i){var o=e.apply(n,t);function r(n){c(o,a,i,r,s,"next",n)}function s(n){c(o,a,i,r,s,"throw",n)}r(void 0)})})();var e}},30493:(n,e,t)=>{"use strict";t.d(e,{D:()=>u,y:()=>d});var a=t(23464),i=t.n(a),o=t(71123),r=t(54440),s=t(85602),p=t.n(s);function l(n,e,t,a,i,o,r){try{var s=n[o](r),p=s.value}catch(n){return void t(n)}s.done?e(p):Promise.resolve(p).then(a,i)}i().extend(p());var c="".concat(r.restBaseUrl,"/appointments/search");function u(n,e,t){var a,s,p,l,u,d,f,g=(0,o.Ay)(c,function(){return(0,r.openmrsFetch)(c,{method:"POST",signal:t.signal,headers:{"Content-Type":"application/json"},body:{patientUuid:n,startDate:e}})}),h=g.data,y=g.error,m=g.isLoading,b=g.isValidating,$=g.mutate,v=(null==h||null===(a=h.data)||void 0===a?void 0:a.length)?h.data:null,w=null==v||null===(p=v.sort(function(n,e){return e.startDateTime>n.startDateTime?1:-1}))||void 0===p||null===(s=p.filter(function(n){return"Cancelled"!==n.status}))||void 0===s?void 0:s.filter(function(n){var e=n.startDateTime;return i()(new Date(e).toISOString()).isBefore((new Date).setHours(0,0,0,0))}),k=null==v||null===(u=v.sort(function(n,e){return n.startDateTime>e.startDateTime?1:-1}))||void 0===u||null===(l=u.filter(function(n){return"Cancelled"!==n.status}))||void 0===l?void 0:l.filter(function(n){var e=n.startDateTime;return i()(new Date(e).toISOString()).isAfter(new Date)}),A=null==v||null===(f=v.sort(function(n,e){return n.startDateTime>e.startDateTime?1:-1}))||void 0===f||null===(d=f.filter(function(n){return"Cancelled"!==n.status}))||void 0===d?void 0:d.filter(function(n){var e=n.startDateTime;return i()(new Date(e).toISOString()).isToday()});return{data:h?{pastAppointments:w,upcomingAppointments:k,todaysAppointments:A}:null,error:y,isLoading:m,isValidating:b,mutate:$}}var d=function(n,e){return(t=function(){var t,a,o;return function(n,e){var t,a,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},r=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return r.next=s(0),r.throw=s(1),r.return=s(2),"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(p){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(o=0)),o;)try{if(t=1,a&&(i=2&s[0]?a.return:s[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,s[1])).done)return i;switch(a=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,a=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(n,o)}catch(n){s=[6,n],a=0}finally{t=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,p])}}}(this,function(s){switch(s.label){case 0:return t=Intl.DateTimeFormat().resolvedOptions().timeZone,a=i()(new Date).format("YYYY-MM-DDTHH:mm:ss.SSSZZ"),o="".concat(r.restBaseUrl,"/appointments/").concat(e,"/status-change"),[4,(0,r.openmrsFetch)(o,{body:{toStatus:n,onDate:a,timeZone:t},method:"POST",headers:{"Content-Type":"application/json"}})];case 1:return[2,s.sent()]}})},function(){var n=this,e=arguments;return new Promise(function(a,i){var o=t.apply(n,e);function r(n){l(o,a,i,r,s,"next",n)}function s(n){l(o,a,i,r,s,"throw",n)}r(void 0)})})();var t}},30855:(n,e,t)=>{"use strict";n.exports=function(n){var e=t.nc;e&&n.setAttribute("nonce",e)}},30977:n=>{"use strict";function e(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,a=new Array(e);t<e;t++)a[t]=n[t];return a}n.exports=function(n){var t,a,i=(a=4,function(n){if(Array.isArray(n))return n}(t=n)||function(n,e){var t=n&&("undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"]);if(null!=t){var a,i,o=[],r=!0,s=!1;try{for(t=t.call(n);!(r=(a=t.next()).done)&&(o.push(a.value),!e||o.length!==e);r=!0);}catch(n){s=!0,i=n}finally{try{r||null==t.return||t.return()}finally{if(s)throw i}}return o}}(t,a)||function(n,t){if(n){if("string"==typeof n)return e(n,t);var a=Object.prototype.toString.call(n).slice(8,-1);return"Object"===a&&n.constructor&&(a=n.constructor.name),"Map"===a||"Set"===a?Array.from(n):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?e(n,t):void 0}}(t,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=i[1],r=i[3];if(!r)return o;if("function"==typeof btoa){var s=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),p="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),l="/*# ".concat(p," */"),c=r.sources.map(function(n){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(n," */")});return[o].concat(c).concat([l]).join("\n")}return[o].join("\n")}},34745:(n,e,t)=>{"use strict";t.r(e),t.d(e,{default:()=>T});var a=t(1343),i=t.n(a),o=t(23464),r=t.n(o),s=t(93150),p=t(93689),l=t(54440),c=t(97999),u=t(30493),d=t(19862),f=t(72591),g=t.n(f),h=t(1740),y=t.n(h),m=t(88128),b=t.n(m),$=t(30855),v=t.n($),w=t(93051),k=t.n(w),A=t(73656),x=t.n(A),_=t(15196),z={};z.styleTagTransform=x(),z.setAttributes=v(),z.insert=b().bind(null,"head"),z.domAPI=y(),z.insertStyleElement=k(),g()(_.A,z);const C=_.A&&_.A.locals?_.A.locals:void 0;function M(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,a=new Array(e);t<e;t++)a[t]=n[t];return a}const T=function(n){var e,t,o,f,g=n.patientUuid,h=n.setVisitFormCallbacks,y=n.patientChartConfig,m=(0,s.useTranslation)().t,b=(0,a.useMemo)(function(){return r()().subtract(6,"month").toISOString()},[]),$=m("upcomingAppointments","Upcoming appointments"),v=(o=(0,a.useState)(null),f=2,function(n){if(Array.isArray(n))return n}(o)||function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var a,i,o=[],r=!0,s=!1;try{for(t=t.call(n);!(r=(a=t.next()).done)&&(o.push(a.value),!e||o.length!==e);r=!0);}catch(n){s=!0,i=n}finally{try{r||null==t.return||t.return()}finally{if(s)throw i}}return o}}(o,f)||function(n,e){if(n){if("string"==typeof n)return M(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?M(n,e):void 0}}(o,f)||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.")}()),w=v[0],k=v[1],A=(0,d.q4)().mutateAppointments,x=(0,a.useMemo)(function(){return A},[A]),_=(0,a.useMemo)(function(){return new AbortController},[]);(0,a.useEffect)(function(){return function(){return _.abort()}},[_]);var z=(0,u.D)(g,b,_),T=z.data,E=z.error,S=z.isLoading,D=(0,a.useMemo)(function(){return{onVisitCreatedOrUpdated:function(){return w?(0,u.y)("CheckedIn",w.uuid).then(function(){x(),(0,l.showSnackbar)({isLowContrast:!0,kind:"success",subtitle:m("appointmentMarkedChecked","Appointment marked as Checked In"),title:m("appointmentCheckedIn","Appointment Checked In")})}).catch(function(n){(0,l.showSnackbar)({title:m("updateError","Error updating upcoming appointment"),kind:"error",isLowContrast:!1,subtitle:null==n?void 0:n.message})}):Promise.resolve()}}},[w,x,m]);(0,a.useEffect)(function(){h(D)},[D,h]);var I=(null==T||null===(e=T.todaysAppointments)||void 0===e?void 0:e.length)?null==T?void 0:T.todaysAppointments:[],U=(null==T||null===(t=T.upcomingAppointments)||void 0===t?void 0:t.length)?null==T?void 0:T.upcomingAppointments:[],N=I.concat(U).filter(function(n){return"CheckedIn"!==n.status});return y.showUpcomingAppointments?E?i().createElement(c.ErrorState,{headerTitle:$,error:E}):S?i().createElement("span",null,i().createElement(p.OuH,null)):N.length?i().createElement("div",null,i().createElement("div",null,i().createElement("p",{className:C.sectionTitle},$),i().createElement("span",{className:C.headerLabel},m("appointmentToFulfill","Select appointment to fulfill"))),i().createElement(p.r9c,null,i().createElement(p.AVA,null,i().createElement(p.Cvq,{head:!0},i().createElement(p.Um2,{head:!0},m("date","Date")),i().createElement(p.Um2,{head:!0},m("appointmentType","Appointment type")),i().createElement(p.Um2,{head:!0},m("action","Action")))),i().createElement(p.GRJ,null,N.map(function(n,e){return i().createElement(p.Cvq,{key:e,className:C.structuredList},i().createElement(p.Um2,null,(0,l.formatDate)((0,l.parseDate)(n.startDateTime),{mode:"wide"})),i().createElement(p.Um2,null,n.service?n.service.name:"——"),i().createElement(p.Um2,null,i().createElement(p.aaP,{className:C.radioButton,labelText:"",id:"radio-".concat(e),name:"appointmentRadio",value:n.uuid,checked:w===n,onChange:function(){return function(n){k(n)}(n)}})))})))):i().createElement(p.jeF,{className:C.inlineNotification,kind:"info",lowContrast:!0,subtitle:m("noUpcomingAppointments","No upcoming appointments found"),title:m("upcomingAppointments","Upcoming appointments")}):null}},72591:n=>{"use strict";var e=[];function t(n){for(var t=-1,a=0;a<e.length;a++)if(e[a].identifier===n){t=a;break}return t}function a(n,a){for(var o={},r=[],s=0;s<n.length;s++){var p=n[s],l=a.base?p[0]+a.base:p[0],c=o[l]||0,u="".concat(l," ").concat(c);o[l]=c+1;var d=t(u),f={css:p[1],media:p[2],sourceMap:p[3],supports:p[4],layer:p[5]};if(-1!==d)e[d].references++,e[d].updater(f);else{var g=i(f,a);a.byIndex=s,e.splice(s,0,{identifier:u,updater:g,references:1})}r.push(u)}return r}function i(n,e){var t=e.domAPI(e);return t.update(n),function(e){if(e){if(e.css===n.css&&e.media===n.media&&e.sourceMap===n.sourceMap&&e.supports===n.supports&&e.layer===n.layer)return;t.update(n=e)}else t.remove()}}n.exports=function(n,i){var o=a(n=n||[],i=i||{});return function(n){n=n||[];for(var r=0;r<o.length;r++){var s=t(o[r]);e[s].references--}for(var p=a(n,i),l=0;l<o.length;l++){var c=t(o[l]);0===e[c].references&&(e[c].updater(),e.splice(c,1))}o=p}}},73656:n=>{"use strict";n.exports=function(n,e){if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}},85602:function(n){n.exports=function(){"use strict";return function(n,e,t){e.prototype.isToday=function(){var n="YYYY-MM-DD",e=t();return this.format(n)===e.format(n)}}}()},88128:n=>{"use strict";var e={};n.exports=function(n,t){var a=function(n){if(void 0===e[n]){var t=document.querySelector(n);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(n){t=null}e[n]=t}return e[n]}(n);if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}},93051:n=>{"use strict";n.exports=function(n){var e=document.createElement("style");return n.setAttributes(e,n.attributes),n.insert(e,n.options),e}},95924:n=>{"use strict";n.exports=function(n){var e=[];return e.toString=function(){return this.map(function(e){var t=n(e);return e[2]?"@media ".concat(e[2]," {").concat(t,"}"):t}).join("")},e.i=function(n,t,a){"string"==typeof n&&(n=[[null,n,""]]);var i={};if(a)for(var o=0;o<this.length;o++){var r=this[o][0];null!=r&&(i[r]=!0)}for(var s=0;s<n.length;s++){var p=[].concat(n[s]);a&&i[p[0]]||(t&&(p[2]?p[2]="".concat(t," and ").concat(p[2]):p[2]=t),e.push(p))}},e}}}]);
package/dist/4745.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"4745.js","mappings":"oJA4DAA,EAAOC,QAjBP,SAAgBC,GACd,GAAwB,oBAAbC,SACT,MAAO,CACLC,OAAQ,WAAmB,EAC3BC,OAAQ,WAAmB,GAG/B,IAAIC,EAAeJ,EAAQK,mBAAmBL,GAC9C,MAAO,CACLE,OAAQ,SAAgBI,IAjD5B,SAAeF,EAAcJ,EAASM,GACpC,IAAIC,EAAM,GACND,EAAIE,WACND,GAAO,cAAcE,OAAOH,EAAIE,SAAU,QAExCF,EAAII,QACNH,GAAO,UAAUE,OAAOH,EAAII,MAAO,OAErC,IAAIC,OAAiC,IAAdL,EAAIM,MACvB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P,SAA4BC,GAC1B,IAAIsP,EAAUrP,SAASsP,cAAc,SAGrC,OAFAvP,EAAQ+I,cAAcuG,EAAStP,EAAQwP,YACvCxP,EAAQgJ,OAAOsG,EAAStP,EAAQA,SACzBsP,CACT,C,yBCAAxP,EAAOC,QAAU,SAAU0P,GACzB,IAAIrC,EAAO,GAuDX,OArDAA,EAAKxF,SAAW,WACd,OAAO+G,KAAKhG,IAAI,SAAUrC,GACxB,IAAI+B,EAAUoH,EAAuBnJ,GAErC,OAAIA,EAAK,GACA,UAAU7F,OAAO6F,EAAK,GAAI,MAAM7F,OAAO4H,EAAS,KAGlDA,CACT,GAAGS,KAAK,GACV,EAIAsE,EAAKhH,EAAI,SAAUsJ,EAASC,EAAYC,GACf,iBAAZF,IAETA,EAAU,CAAC,CAAC,KAAMA,EAAS,MAG7B,IAAIG,EAAyB,CAAC,EAE9B,GAAID,EACF,IAAK,IAAIxJ,EAAI,EAAGA,EAAIuI,KAAK9N,OAAQuF,IAAK,CAEpC,IAAIzE,EAAKgN,KAAKvI,GAAG,GAEP,MAANzE,IACFkO,EAAuBlO,IAAM,EAEjC,CAGF,IAAK,IAAI8E,EAAK,EAAGA,EAAKiJ,EAAQ7O,OAAQ4F,IAAM,CAC1C,IAAIH,EAAO,GAAG7F,OAAOiP,EAAQjJ,IAEzBmJ,GAAUC,EAAuBvJ,EAAK,MAKtCqJ,IACGrJ,EAAK,GAGRA,EAAK,GAAK,GAAG7F,OAAOkP,EAAY,SAASlP,OAAO6F,EAAK,IAFrDA,EAAK,GAAKqJ,GAMdvC,EAAK1L,KAAK4E,GACZ,CACF,EAEO8G,CACT,C","sources":["webpack://@openmrs/esm-appointments-app/../../node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://@openmrs/esm-appointments-app/./src/patient-appointments/patient-upcoming-appointments-card.scss","webpack://@openmrs/esm-appointments-app/./src/form/appointments-form.resource.ts","webpack://@openmrs/esm-appointments-app/./src/patient-appointments/patient-appointments.resource.ts","webpack://@openmrs/esm-appointments-app/../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://@openmrs/esm-appointments-app/../../node_modules/@openmrs/webpack-config/node_modules/css-loader/dist/runtime/cssWithMappingToString.js","webpack://@openmrs/esm-appointments-app/./src/patient-appointments/patient-upcoming-appointments-card.scss?d765","webpack://@openmrs/esm-appointments-app/./src/patient-appointments/patient-upcoming-appointments-card.component.tsx","webpack://@openmrs/esm-appointments-app/../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://@openmrs/esm-appointments-app/../../node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://@openmrs/esm-appointments-app/../../node_modules/dayjs/plugin/isToday.js","webpack://@openmrs/esm-appointments-app/../../node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://@openmrs/esm-appointments-app/../../node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://@openmrs/esm-appointments-app/../../node_modules/@openmrs/webpack-config/node_modules/css-loader/dist/runtime/api.js"],"names":["module","exports","options","document","update","remove","styleElement","insertStyleElement","obj","css","supports","concat","media","needLayer","layer","length","sourceMap","btoa","unescape","encodeURIComponent","JSON","stringify","styleTagTransform","apply","parentNode","removeChild","removeStyleElement","___CSS_LOADER_EXPORT___","push","id","locals","dayjs","isToday","appointmentUrlMatcher","restBaseUrl","useMutateAppointments","useSWRConfig","mutate","mutateAppointments","useCallback","key","startsWith","Array","isArray","useAppointmentService","useSWR","openmrsFetch","data","error","isLoading","saveAppointment","appointment","abortController","method","signal","headers","body","saveRecurringAppointments","recurringAppointments","checkAppointmentConflict","appointmentPayload","patientUuid","serviceUuid","startDateTime","endDateTime","providers","locationUuid","appointmentKind","appointmentsSearchUrl","usePatientAppointments","startDate","appointments","isValidating","pastAppointments","sort","a","b","filter","status","Date","toISOString","isBefore","setHours","upcomingAppointments","isAfter","todaysAppointments","changeAppointmentStatus","toStatus","appointmentUuid","timeZone","statusChangeTime","url","Intl","DateTimeFormat","resolvedOptions","format","onDate","nonce","setAttribute","_arrayLikeToArray","arr","len","i","arr2","item","_item","_arrayWithHoles","_i","Symbol","iterator","_s","_e","_arr","_n","_d","call","next","done","value","err","_iterableToArrayLimit","o","minLen","n","Object","prototype","toString","slice","constructor","name","from","test","_unsupportedIterableToArray","TypeError","_nonIterableRest","content","cssMapping","base64","sourceMapping","sourceURLs","sources","map","source","sourceRoot","join","setAttributes","insert","domAPI","undefined","appointmentsData","setVisitFormCallbacks","patientChartConfig","useTranslation","t","subtract","headerTitle","useState","selectedAppointment","setSelectedAppointment","memoMutateAppointments","useMemo","ac","AbortController","useEffect","abort","onVisitCreatedOrUpdated","uuid","then","showSnackbar","isLowContrast","kind","subtitle","title","catch","message","Promise","resolve","futureAppointments","showUpcomingAppointments","ErrorState","span","InlineLoading","div","p","className","styles","sectionTitle","headerLabel","StructuredListWrapper","StructuredListHead","StructuredListRow","head","StructuredListCell","StructuredListBody","index","structuredList","formatDate","parseDate","mode","service","RadioButton","radioButton","labelText","checked","onChange","handleRadioChange","InlineNotification","lowContrast","inlineNotification","stylesInDOM","getIndexByIdentifier","identifier","result","modulesToDom","list","idCountMap","identifiers","base","count","indexByIdentifier","references","updater","addElementStyle","byIndex","splice","api","newObj","lastIdentifiers","newList","newLastIdentifiers","_index","styleSheet","cssText","firstChild","appendChild","createTextNode","e","this","memo","style","target","styleTarget","querySelector","window","HTMLIFrameElement","contentDocument","getTarget","Error","element","createElement","attributes","cssWithMappingToString","modules","mediaQuery","dedupe","alreadyImportedModules"],"sourceRoot":""}
1
+ {"version":3,"file":"4745.js","mappings":"oJA4DAA,EAAOC,QAjBP,SAAgBC,GACd,GAAwB,oBAAbC,SACT,MAAO,CACLC,OAAQ,WAAmB,EAC3BC,OAAQ,WAAmB,GAG/B,IAAIC,EAAeJ,EAAQK,mBAAmBL,GAC9C,MAAO,CACLE,OAAQ,SAAgBI,IAjD5B,SAAeF,EAAcJ,EAASM,GACpC,IAAIC,EAAM,GACND,EAAIE,WACND,GAAO,cAAcE,OAAOH,EAAI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AAOH,EAAKE,EACd,CAIeM,CAAUpG,GACvB,IAAK8F,EACH,MAAM,IAAIO,MAAM,2GAElBP,EAAON,YAAYK,EACrB,C,yBCvBA/O,EAAOC,QANP,SAA4BC,GAC1B,IAAIsP,EAAUrP,SAASsP,cAAc,SAGrC,OAFAvP,EAAQ+I,cAAcuG,EAAStP,EAAQwP,YACvCxP,EAAQgJ,OAAOsG,EAAStP,EAAQA,SACzBsP,CACT,C,yBCAAxP,EAAOC,QAAU,SAAU0P,GACzB,IAAIrC,EAAO,GAuDX,OArDAA,EAAKxF,SAAW,WACd,OAAO+G,KAAKhG,IAAI,SAAUrC,GACxB,IAAI+B,EAAUoH,EAAuBnJ,GAErC,OAAIA,EAAK,GACA,UAAU7F,OAAO6F,EAAK,GAAI,MAAM7F,OAAO4H,EAAS,KAGlDA,CACT,GAAGS,KAAK,GACV,EAIAsE,EAAKhH,EAAI,SAAUsJ,EAASC,EAAYC,GACf,iBAAZF,IAETA,EAAU,CAAC,CAAC,KAAMA,EAAS,MAG7B,IAAIG,EAAyB,CAAC,EAE9B,GAAID,EACF,IAAK,IAAIxJ,EAAI,EAAGA,EAAIuI,KAAK9N,OAAQuF,IAAK,CAEpC,IAAIzE,EAAKgN,KAAKvI,GAAG,GAEP,MAANzE,IACFkO,EAAuBlO,IAAM,EAEjC,CAGF,IAAK,IAAI8E,EAAK,EAAGA,EAAKiJ,EAAQ7O,OAAQ4F,IAAM,CAC1C,IAAIH,EAAO,GAAG7F,OAAOiP,EAAQjJ,IAEzBmJ,GAAUC,EAAuBvJ,EAAK,MAKtCqJ,IACGrJ,EAAK,GAGRA,EAAK,GAAK,GAAG7F,OAAOkP,EAAY,SAASlP,OAAO6F,EAAK,IAFrDA,EAAK,GAAKqJ,GAMdvC,EAAK1L,KAAK4E,GACZ,CACF,EAEO8G,CACT,C","sources":["webpack://@openmrs/esm-appointments-app/../../node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://@openmrs/esm-appointments-app/./src/patient-appointments/patient-upcoming-appointments-card.scss","webpack://@openmrs/esm-appointments-app/./src/form/appointments-form.resource.ts","webpack://@openmrs/esm-appointments-app/./src/patient-appointments/patient-appointments.resource.ts","webpack://@openmrs/esm-appointments-app/../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://@openmrs/esm-appointments-app/../../node_modules/@openmrs/webpack-config/node_modules/css-loader/dist/runtime/cssWithMappingToString.js","webpack://@openmrs/esm-appointments-app/./src/patient-appointments/patient-upcoming-appointments-card.scss?d765","webpack://@openmrs/esm-appointments-app/./src/patient-appointments/patient-upcoming-appointments-card.component.tsx","webpack://@openmrs/esm-appointments-app/../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://@openmrs/esm-appointments-app/../../node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://@openmrs/esm-appointments-app/../../node_modules/dayjs/plugin/isToday.js","webpack://@openmrs/esm-appointments-app/../../node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://@openmrs/esm-appointments-app/../../node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://@openmrs/esm-appointments-app/../../node_modules/@openmrs/webpack-config/node_modules/css-loader/dist/runtime/api.js"],"names":["module","exports","options","document","update","remove","styleElement","insertStyleElement","obj","css","supports","concat","media","needLayer","layer","length","sourceMap","btoa","unescape","encodeURIComponent","JSON","stringify","styleTagTransform","apply","parentNode","removeChild","removeStyleElement","___CSS_LOADER_EXPORT___","push","id","locals","dayjs","isToday","appointmentUrlMatcher","restBaseUrl","useMutateAppointments","useSWRConfig","mutate","mutateAppointments","useCallback","key","startsWith","Array","isArray","useAppointmentService","useSWR","openmrsFetch","data","error","isLoading","saveAppointment","appointment","abortController","method","signal","headers","body","saveRecurringAppointments","recurringAppointments","checkAppointmentConflict","appointmentPayload","patientUuid","serviceUuid","startDateTime","endDateTime","providers","locationUuid","appointmentKind","appointmentsSearchUrl","usePatientAppointments","startDate","appointments","isValidating","pastAppointments","sort","a","b","filter","status","Date","toISOString","isBefore","setHours","upcomingAppointments","isAfter","todaysAppointments","changeAppointmentStatus","toStatus","appointmentUuid","timeZone","statusChangeTime","url","Intl","DateTimeFormat","resolvedOptions","format","onDate","nonce","setAttribute","_arrayLikeToArray","arr","len","i","arr2","item","_item","_arrayWithHoles","_i","Symbol","iterator","_s","_e","_arr","_n","_d","call","next","done","value","err","_iterableToArrayLimit","o","minLen","n","Object","prototype","toString","slice","constructor","name","from","test","_unsupportedIterableToArray","TypeError","_nonIterableRest","content","cssMapping","base64","sourceMapping","sourceURLs","sources","map","source","sourceRoot","join","setAttributes","insert","domAPI","undefined","appointmentsData","setVisitFormCallbacks","patientChartConfig","useTranslation","t","useMemo","subtract","headerTitle","useState","selectedAppointment","setSelectedAppointment","memoMutateAppointments","ac","AbortController","useEffect","abort","onVisitCreatedOrUpdated","uuid","then","showSnackbar","isLowContrast","kind","subtitle","title","catch","message","Promise","resolve","futureAppointments","showUpcomingAppointments","ErrorState","span","InlineLoading","div","p","className","styles","sectionTitle","headerLabel","StructuredListWrapper","StructuredListHead","StructuredListRow","head","StructuredListCell","StructuredListBody","index","structuredList","formatDate","parseDate","mode","service","RadioButton","radioButton","labelText","checked","onChange","handleRadioChange","InlineNotification","inlineNotification","lowContrast","stylesInDOM","getIndexByIdentifier","identifier","result","modulesToDom","list","idCountMap","identifiers","base","count","indexByIdentifier","references","updater","addElementStyle","byIndex","splice","api","newObj","lastIdentifiers","newList","newLastIdentifiers","_index","styleSheet","cssText","firstChild","appendChild","createTextNode","e","this","memo","style","target","styleTarget","querySelector","window","HTMLIFrameElement","contentDocument","getTarget","Error","element","createElement","attributes","cssWithMappingToString","modules","mediaQuery","dedupe","alreadyImportedModules"],"sourceRoot":""}
@@ -511,9 +511,9 @@
511
511
  "entry": false,
512
512
  "recorded": false,
513
513
  "reason": "split chunk (cache group: default)",
514
- "size": 90914,
514
+ "size": 90995,
515
515
  "sizes": {
516
- "javascript": 90914
516
+ "javascript": 90995
517
517
  },
518
518
  "names": [],
519
519
  "idHints": [],
@@ -527,7 +527,7 @@
527
527
  "auxiliaryFiles": [
528
528
  "3092.js.map"
529
529
  ],
530
- "hash": "9f0629d3462dabb2",
530
+ "hash": "10429bb4dd86db7b",
531
531
  "childrenByOrder": {}
532
532
  },
533
533
  {
@@ -635,9 +635,9 @@
635
635
  "initial": false,
636
636
  "entry": false,
637
637
  "recorded": false,
638
- "size": 17595,
638
+ "size": 19637,
639
639
  "sizes": {
640
- "javascript": 17595
640
+ "javascript": 19637
641
641
  },
642
642
  "names": [],
643
643
  "idHints": [],
@@ -651,7 +651,7 @@
651
651
  "auxiliaryFiles": [
652
652
  "3431.js.map"
653
653
  ],
654
- "hash": "73f41321e5ed59c9",
654
+ "hash": "1a08fbb697e50c61",
655
655
  "childrenByOrder": {}
656
656
  },
657
657
  {
@@ -857,9 +857,9 @@
857
857
  "initial": false,
858
858
  "entry": false,
859
859
  "recorded": false,
860
- "size": 6294,
860
+ "size": 6337,
861
861
  "sizes": {
862
- "javascript": 6294
862
+ "javascript": 6337
863
863
  },
864
864
  "names": [],
865
865
  "idHints": [],
@@ -871,7 +871,7 @@
871
871
  "4300.js"
872
872
  ],
873
873
  "auxiliaryFiles": [],
874
- "hash": "37ae6be4b361f414",
874
+ "hash": "3242cae15b503c1d",
875
875
  "childrenByOrder": {}
876
876
  },
877
877
  {
@@ -1014,9 +1014,9 @@
1014
1014
  "initial": false,
1015
1015
  "entry": false,
1016
1016
  "recorded": false,
1017
- "size": 75140,
1017
+ "size": 75113,
1018
1018
  "sizes": {
1019
- "javascript": 75140
1019
+ "javascript": 75113
1020
1020
  },
1021
1021
  "names": [],
1022
1022
  "idHints": [],
@@ -1030,7 +1030,7 @@
1030
1030
  "auxiliaryFiles": [
1031
1031
  "4745.js.map"
1032
1032
  ],
1033
- "hash": "7384f10883e655e2",
1033
+ "hash": "a4c2381e3cc385f1",
1034
1034
  "childrenByOrder": {}
1035
1035
  },
1036
1036
  {
@@ -1632,7 +1632,7 @@
1632
1632
  "auxiliaryFiles": [
1633
1633
  "7698.js.map"
1634
1634
  ],
1635
- "hash": "1e869d88e604f659",
1635
+ "hash": "6115a6533806f882",
1636
1636
  "childrenByOrder": {}
1637
1637
  },
1638
1638
  {
@@ -1792,7 +1792,7 @@
1792
1792
  "auxiliaryFiles": [
1793
1793
  "main.js.map"
1794
1794
  ],
1795
- "hash": "edd05fd339e8b4bc",
1795
+ "hash": "833d9e5010661572",
1796
1796
  "childrenByOrder": {}
1797
1797
  },
1798
1798
  {
package/dist/routes.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":"^2.2.0"},"extensions":[{"name":"home-appointments","slot":"homepage-widgets-slot","component":"homeAppointments","order":1},{"name":"clinical-appointments-dashboard-link","slot":"homepage-dashboard-slot","component":"appointmentsDashboardLink","meta":{"name":"appointments","slot":"clinical-appointments-dashboard-slot","title":"Appointments"},"order":2},{"component":"root","name":"clinical-appointments-dashboard","slot":"clinical-appointments-dashboard-slot"},{"name":"appointments-dashboard","slot":"appointments-dashboard-slot","component":"appointmentsDashboard"},{"name":"appointments-calendar-dashboard-link","slot":"calendar-dashboard-slot","component":"appointmentsCalendarDashboardLink"},{"name":"todays-appointments-dashboard","slot":"todays-appointment-slot","component":"homeAppointments"},{"name":"expected-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsList"},{"name":"checked-in-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsList"},{"name":"completed-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsList"},{"name":"missed-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsList"},{"name":"cancelled-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsList"},{"name":"early-appointments-panel","component":"earlyAppointments"},{"name":"patient-appointments-summary-dashboard","component":"patientAppointmentsSummaryDashboardLink","slot":"patient-chart-dashboard-slot","order":11,"meta":{"columns":1,"columnSpan":1,"hideDashboardTitle":true,"path":"Appointments","slot":"patient-chart-appointments-dashboard-slot","title":"Appointments"}},{"name":"appointments-details-widget","component":"patientAppointmentsDetailedSummary","slot":"patient-chart-appointments-dashboard-slot","meta":{"columnSpan":1}},{"name":"patient-upcoming-appointment-widget","component":"patientUpcomingAppointmentsWidget","slot":"visit-form-top-slot"},{"name":"search-patient","component":"searchPatient"},{"name":"home-appointments-tile","slot":"home-metrics-tiles-slot","component":"homeAppointmentsTile"},{"name":"metrics-card-scheduled-appointments","component":"metricsCardScheduledAppointments","slot":"appointments-metrics-slot","order":1},{"name":"metrics-card-highest-volume-service","component":"metricsCardHighestVolumeService","slot":"appointments-metrics-slot","order":2},{"name":"metrics-card-providers-booked","component":"metricsCardProvidersBooked","slot":"appointments-metrics-slot","order":3}],"modals":[{"name":"end-appointment-modal","component":"endAppointmentModal"},{"name":"cancel-appointment-modal","component":"cancelAppointmentModal"}],"workspaces":[{"name":"appointments-form-workspace","component":"appointmentsFormWorkspace","title":"createNewAppointment","type":"form"}],"version":"9.1.2-pre.6596"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":"^2.2.0"},"extensions":[{"name":"home-appointments","slot":"homepage-widgets-slot","component":"homeAppointments","order":1},{"name":"clinical-appointments-dashboard-link","slot":"homepage-dashboard-slot","component":"appointmentsDashboardLink","meta":{"name":"appointments","slot":"clinical-appointments-dashboard-slot","title":"Appointments"},"order":2},{"component":"root","name":"clinical-appointments-dashboard","slot":"clinical-appointments-dashboard-slot"},{"name":"appointments-dashboard","slot":"appointments-dashboard-slot","component":"appointmentsDashboard"},{"name":"appointments-calendar-dashboard-link","slot":"calendar-dashboard-slot","component":"appointmentsCalendarDashboardLink"},{"name":"todays-appointments-dashboard","slot":"todays-appointment-slot","component":"homeAppointments"},{"name":"expected-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsList"},{"name":"checked-in-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsList"},{"name":"completed-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsList"},{"name":"missed-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsList"},{"name":"cancelled-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsList"},{"name":"early-appointments-panel","component":"earlyAppointments"},{"name":"patient-appointments-summary-dashboard","component":"patientAppointmentsSummaryDashboardLink","slot":"patient-chart-dashboard-slot","order":11,"meta":{"columns":1,"columnSpan":1,"hideDashboardTitle":true,"path":"Appointments","slot":"patient-chart-appointments-dashboard-slot","title":"Appointments"}},{"name":"appointments-details-widget","component":"patientAppointmentsDetailedSummary","slot":"patient-chart-appointments-dashboard-slot","meta":{"columnSpan":1}},{"name":"patient-upcoming-appointment-widget","component":"patientUpcomingAppointmentsWidget","slot":"visit-form-top-slot"},{"name":"search-patient","component":"searchPatient"},{"name":"home-appointments-tile","slot":"home-metrics-tiles-slot","component":"homeAppointmentsTile"},{"name":"metrics-card-scheduled-appointments","component":"metricsCardScheduledAppointments","slot":"appointments-metrics-slot","order":1},{"name":"metrics-card-highest-volume-service","component":"metricsCardHighestVolumeService","slot":"appointments-metrics-slot","order":2},{"name":"metrics-card-providers-booked","component":"metricsCardProvidersBooked","slot":"appointments-metrics-slot","order":3}],"modals":[{"name":"end-appointment-modal","component":"endAppointmentModal"},{"name":"cancel-appointment-modal","component":"cancelAppointmentModal"}],"workspaces":[{"name":"appointments-form-workspace","component":"appointmentsFormWorkspace","title":"createNewAppointment","type":"form"}],"version":"9.2.0"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-appointments-app",
3
- "version": "9.1.2-pre.6596",
3
+ "version": "9.2.0",
4
4
  "description": "Appointments front-end module for O3",
5
5
  "browser": "dist/openmrs-esm-appointments-app.js",
6
6
  "main": "src/index.ts",
@@ -59,6 +59,5 @@
59
59
  "devDependencies": {
60
60
  "@openmrs/esm-patient-common-lib": "next",
61
61
  "webpack": "^5.99.9"
62
- },
63
- "stableVersion": "9.1.1"
62
+ }
64
63
  }
@@ -1,4 +1,4 @@
1
- import React, { useState } from 'react';
1
+ import React, { useState, useMemo } from 'react';
2
2
  import dayjs from 'dayjs';
3
3
  import { useTranslation } from 'react-i18next';
4
4
  import { Button, ContentSwitcher, DataTableSkeleton, InlineLoading, Layer, Switch, Tile } from '@carbon/react';
@@ -28,13 +28,17 @@ const PatientAppointmentsBase: React.FC<PatientAppointmentsBaseProps> = ({ patie
28
28
  const [switchedView, setSwitchedView] = useState(false);
29
29
 
30
30
  const [contentSwitcherValue, setContentSwitcherValue] = useState(0);
31
- const startDate = dayjs(new Date().toISOString()).subtract(6, 'month').toISOString();
31
+ const startDate = useMemo(() => dayjs().subtract(6, 'month').toISOString(), []);
32
32
  const {
33
33
  data: appointmentsData,
34
34
  error,
35
35
  isLoading,
36
36
  isValidating,
37
- } = usePatientAppointments(patientUuid, startDate, new AbortController());
37
+ } = usePatientAppointments(
38
+ patientUuid,
39
+ startDate,
40
+ useMemo(() => new AbortController(), []),
41
+ );
38
42
 
39
43
  const handleLaunchAppointmentsForm = () => {
40
44
  if (
@@ -114,6 +118,7 @@ const PatientAppointmentsBase: React.FC<PatientAppointmentsBaseProps> = ({ patie
114
118
  </Layer>
115
119
  );
116
120
  }
121
+
117
122
  if (contentSwitcherValue === AppointmentTypes.TODAY) {
118
123
  if (appointmentsData.todaysAppointments?.length) {
119
124
  return (
@@ -1,4 +1,5 @@
1
- import React, { useState } from 'react';
1
+ import React, { useState, useMemo } from 'react';
2
+ import dayjs from 'dayjs';
2
3
  import { useTranslation } from 'react-i18next';
3
4
  import { Button, ModalBody, ModalFooter, ModalHeader } from '@carbon/react';
4
5
  import { showSnackbar } from '@openmrs/esm-framework';
@@ -16,31 +17,46 @@ const CancelAppointmentModal: React.FC<CancelAppointmentModalProps> = ({
16
17
  patientUuid,
17
18
  }) => {
18
19
  const { t } = useTranslation();
19
- const { mutate } = usePatientAppointments(patientUuid, new Date().toUTCString(), new AbortController());
20
+ const startDate = useMemo(() => dayjs().subtract(6, 'month').toISOString(), []);
21
+ const { mutate } = usePatientAppointments(
22
+ patientUuid,
23
+ startDate,
24
+ useMemo(() => new AbortController(), []),
25
+ );
20
26
  const [isSubmitting, setIsSubmitting] = useState(false);
21
27
 
22
28
  const handleCancelAppointment = async () => {
23
29
  setIsSubmitting(true);
24
30
 
25
- changeAppointmentStatus('Cancelled', appointmentUuid)
26
- .then(() => {
27
- mutate();
28
- closeCancelModal();
29
- showSnackbar({
30
- isLowContrast: true,
31
- kind: 'success',
32
- subtitle: t('appointmentCancelledSuccessfully', 'Appointment cancelled successfully'),
33
- title: t('appointmentCancelled', 'Appointment cancelled'),
34
- });
35
- })
36
- .catch((err) => {
37
- showSnackbar({
38
- title: t('appointmentCancelError', 'Error cancelling appointment'),
39
- kind: 'error',
40
- isLowContrast: true,
41
- subtitle: err?.message,
42
- });
31
+ try {
32
+ await changeAppointmentStatus('Cancelled', appointmentUuid);
33
+ mutate();
34
+ closeCancelModal();
35
+ showSnackbar({
36
+ isLowContrast: true,
37
+ kind: 'success',
38
+ subtitle: t('appointmentCancelledSuccessfully', 'Appointment cancelled successfully'),
39
+ title: t('appointmentCancelled', 'Appointment cancelled'),
40
+ });
41
+ } catch (err) {
42
+ const rawErrorMessage =
43
+ err?.responseBody?.error?.message ||
44
+ err?.responseBody?.message ||
45
+ err?.message ||
46
+ t('unknownError', 'An unknown error occurred');
47
+
48
+ // Remove square brackets from the error message
49
+ const errorMessage = rawErrorMessage.replace(/^\[|\]$/g, '');
50
+
51
+ showSnackbar({
52
+ title: t('appointmentCancelError', 'Error cancelling appointment'),
53
+ kind: 'error',
54
+ isLowContrast: false,
55
+ subtitle: errorMessage,
43
56
  });
57
+ } finally {
58
+ setIsSubmitting(false);
59
+ }
44
60
  };
45
61
 
46
62
  return (