@openmrs/esm-login-app 4.0.3 → 4.0.4-pre.475

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.
@@ -1,32 +1,32 @@
1
- @openmrs/esm-login-app:build: cache hit, replaying output dfac58d5956f4804
2
- @openmrs/esm-login-app:build: assets by chunk 310 KiB (id hint: vendors)
3
- @openmrs/esm-login-app:build:  asset 788.js 130 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
4
- @openmrs/esm-login-app:build:  asset 581.js 91.8 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
5
- @openmrs/esm-login-app:build:  asset 759.js 49.6 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
6
- @openmrs/esm-login-app:build:  asset 925.js 19 KiB [emitted] [minimized] (id hint: vendors)
7
- @openmrs/esm-login-app:build:  asset 50.js 16.1 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
8
- @openmrs/esm-login-app:build:  asset 611.js 2 KiB [emitted] [minimized] (id hint: vendors)
9
- @openmrs/esm-login-app:build:  asset 390.js 960 bytes [emitted] [minimized] (id hint: vendors)
10
- @openmrs/esm-login-app:build: + 20 assets
11
- @openmrs/esm-login-app:build: orphan modules 3.95 MiB (javascript) 42 bytes (consume-shared) [orphan] 402 modules
12
- @openmrs/esm-login-app:build: runtime modules 38.3 KiB 28 modules
13
- @openmrs/esm-login-app:build: built modules 2.81 MiB (javascript) 210 bytes (share-init) 168 bytes (consume-shared) [built]
14
- @openmrs/esm-login-app:build:  javascript modules 2.81 MiB 51 modules
15
- @openmrs/esm-login-app:build:  optional modules 2.61 KiB [optional]
16
- @openmrs/esm-login-app:build:  ./translations/de.json 216 bytes [optional] [built] [code generated]
17
- @openmrs/esm-login-app:build:  + 9 modules
18
- @openmrs/esm-login-app:build:  provide-module modules 210 bytes
19
- @openmrs/esm-login-app:build:  provide shared module (default) @openmrs/esm-framework@4.0.3 = ../../framework/esm-framework/src/internal.ts 42 bytes [built] [code generated]
20
- @openmrs/esm-login-app:build:  provide shared module (default) react-dom@18.2.0 = ../../../node_modules/react-dom/index.js 42 bytes [built] [code generated]
21
- @openmrs/esm-login-app:build:  + 3 modules
22
- @openmrs/esm-login-app:build:  consume-shared-module modules 168 bytes
23
- @openmrs/esm-login-app:build:  consume shared module (default) @openmrs/esm-framework@* (singleton) (fallback: ../../framework/esm-framework/src/internal.ts) 42 bytes [built] [code generated]
24
- @openmrs/esm-login-app:build:  consume shared module (default) react@^18 (singleton) (fallback: ../../../node_modules/react/index.js) 42 bytes [built] [code generated]
25
- @openmrs/esm-login-app:build:  + 2 modules
26
- @openmrs/esm-login-app:build: 
27
- @openmrs/esm-login-app:build: WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
28
- @openmrs/esm-login-app:build: This can impact web performance.
29
- @openmrs/esm-login-app:build: Assets:
30
- @openmrs/esm-login-app:build:  889.js (405 KiB)
31
- @openmrs/esm-login-app:build: 
32
- @openmrs/esm-login-app:build: webpack 5.74.0 compiled with 1 warning in 94283 ms
1
+ @openmrs/esm-login-app:build: cache hit, replaying output aea28d63827fa6d3
2
+ @openmrs/esm-login-app:build: assets by chunk 306 KiB (id hint: vendors)
3
+ @openmrs/esm-login-app:build:  asset 788.js 130 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
4
+ @openmrs/esm-login-app:build:  asset 581.js 91.8 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
5
+ @openmrs/esm-login-app:build:  asset 759.js 49.6 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
6
+ @openmrs/esm-login-app:build:  asset 925.js 19 KiB [emitted] [minimized] (id hint: vendors)
7
+ @openmrs/esm-login-app:build:  asset 98.js 12.7 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
8
+ @openmrs/esm-login-app:build:  asset 611.js 2 KiB [emitted] [minimized] (id hint: vendors)
9
+ @openmrs/esm-login-app:build:  asset 390.js 960 bytes [emitted] [minimized] (id hint: vendors)
10
+ @openmrs/esm-login-app:build: + 20 assets
11
+ @openmrs/esm-login-app:build: orphan modules 3.95 MiB (javascript) 42 bytes (consume-shared) [orphan] 403 modules
12
+ @openmrs/esm-login-app:build: runtime modules 38.3 KiB 28 modules
13
+ @openmrs/esm-login-app:build: built modules 2.82 MiB (javascript) 210 bytes (share-init) 168 bytes (consume-shared) [built]
14
+ @openmrs/esm-login-app:build:  javascript modules 2.81 MiB 53 modules
15
+ @openmrs/esm-login-app:build:  optional modules 2.61 KiB [optional]
16
+ @openmrs/esm-login-app:build:  ./translations/de.json 216 bytes [optional] [built] [code generated]
17
+ @openmrs/esm-login-app:build:  + 9 modules
18
+ @openmrs/esm-login-app:build:  provide-module modules 210 bytes
19
+ @openmrs/esm-login-app:build:  provide shared module (default) @openmrs/esm-framework@4.0.4-pre.475 = ../../framework/esm-framework/src/internal.ts 42 bytes [built] [code generated]
20
+ @openmrs/esm-login-app:build:  provide shared module (default) react-dom@18.2.0 = ../../../node_modules/react-dom/index.js 42 bytes [built] [code generated]
21
+ @openmrs/esm-login-app:build:  + 3 modules
22
+ @openmrs/esm-login-app:build:  consume-shared-module modules 168 bytes
23
+ @openmrs/esm-login-app:build:  consume shared module (default) @openmrs/esm-framework@* (singleton) (fallback: ../../framework/esm-framework/src/internal.ts) 42 bytes [built] [code generated]
24
+ @openmrs/esm-login-app:build:  consume shared module (default) react@^18 (singleton) (fallback: ../../../node_modules/react/index.js) 42 bytes [built] [code generated]
25
+ @openmrs/esm-login-app:build:  + 2 modules
26
+ @openmrs/esm-login-app:build: 
27
+ @openmrs/esm-login-app:build: WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
28
+ @openmrs/esm-login-app:build: This can impact web performance.
29
+ @openmrs/esm-login-app:build: Assets:
30
+ @openmrs/esm-login-app:build:  889.js (408 KiB)
31
+ @openmrs/esm-login-app:build: 
32
+ @openmrs/esm-login-app:build: webpack 5.74.0 compiled with 1 warning in 55452 ms
package/dist/420.js CHANGED
@@ -1 +1 @@
1
- (self.webpackChunk_openmrs_esm_login_app=self.webpackChunk_openmrs_esm_login_app||[]).push([[420],{2420:(e,o,n)=>{"use strict";n.r(o),n.d(o,{backendDependencies:()=>c,importTranslation:()=>a,setupOpenMRS:()=>p,version:()=>s});var t=n(4610),r={provider:{type:{_type:t.Type.String,_default:"basic",_description:"Selects the login mechanism to use. Choices are 'basic' and 'oauth2'. For 'oauth2' you'll also need to set the 'loginUrl' and 'logoutUrl'."},loginUrl:{_type:t.Type.String,_default:"${openmrsSpaBase}/login",_description:"The URL to use for an OAuth2 login.",_validators:[t.validators.isUrl]},logoutUrl:{_type:t.Type.String,_default:"${openmrsSpaBase}/logout",_description:"The URL to use for an OAuth2 logout.",_validators:[t.validators.isUrl]}},chooseLocation:{enabled:{_type:t.Type.Boolean,_default:!0,_description:"Whether to show a 'Choose Location' screen after login. If true, the user will be taken to the loginSuccess URL after they choose a location."},numberToShow:{_type:t.Type.Number,_default:8,_description:"The number of locations displayed on location picker"},locationsPerRequest:{_type:t.Type.Number,_default:50,_description:"The number of results to be fetched in each cycle of the infinite scroll"},useLoginLocationTag:{_type:t.Type.Boolean,_default:!0,_description:"Whether to show only locations with the 'Login Location' tag. If false, shows all locations."}},links:{loginSuccess:{_type:t.Type.String,_description:"Where to take the user after they are logged in.",_default:"${openmrsSpaBase}/home",_validators:[t.validators.isUrl]}},logo:{src:{_type:t.Type.String,_default:null,_description:"A path or URL to an image. If null, will use the OpenMRS SVG sprite.",_validators:[t.validators.isUrl]},alt:{_type:t.Type.String,_default:"Logo",_description:"Alt text, shown on hover"}}};function i(e,o,n){return o in e?Object.defineProperty(e,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[o]=n,e}function l(e){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{},t=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),t.forEach((function(o){i(e,o,n[o])}))}return e}var s="4.0.3",a=n(3979),c={"webservices.rest":"^2.24.0"},u={online:{isLoginEnabled:!0},offline:{isLoginEnabled:!1}};function p(){var e="@openmrs/esm-login-app",o={featureName:"login",moduleName:e};return(0,t.defineConfigSchema)(e,r),{pages:[l({load:(0,t.getAsyncLifecycle)((function(){return Promise.all([n.e(581),n.e(50),n.e(611),n.e(776),n.e(680),n.e(607),n.e(897)]).then(n.bind(n,8897))}),o),route:"login"},u),l({load:(0,t.getAsyncLifecycle)((function(){return Promise.all([n.e(581),n.e(50),n.e(611),n.e(776),n.e(680),n.e(607),n.e(897)]).then(n.bind(n,8897))}),o),route:"logout"},u)],extensions:[l({name:"location-picker",slot:"location-picker",load:(0,t.getAsyncLifecycle)((function(){return Promise.all([n.e(581),n.e(50),n.e(776),n.e(680),n.e(607)]).then(n.bind(n,9607))}),o)},u),{name:"logout-button",slot:"user-panel-actions-slot",load:(0,t.getAsyncLifecycle)((function(){return Promise.all([n.e(581),n.e(776),n.e(680),n.e(406)]).then(n.bind(n,7406))}),o),online:!0,offline:!1},l({name:"location-changer",slot:"user-panel-slot",order:1,load:(0,t.getAsyncLifecycle)((function(){return Promise.all([n.e(581),n.e(390),n.e(776),n.e(680),n.e(951)]).then(n.bind(n,6951))}),o)},u)]}}},3979:(e,o,n)=>{var t={"./de.json":[4272,272],"./en.json":[3574,574],"./es.json":[8319,319],"./fr.json":[2757,757],"./hi.json":[5336,336],"./sw.json":[236,236],"./sw_KE.json":[539,539],"./tr_TR.json":[5673,673],"./uk.json":[5240,240],"./zh_CN.json":[1644,644]};function r(e){if(!n.o(t,e))return Promise.resolve().then((()=>{var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}));var o=t[e],r=o[0];return n.e(o[1]).then((()=>n(r)))}r.keys=()=>Object.keys(t),r.id=3979,e.exports=r}}]);
1
+ (self.webpackChunk_openmrs_esm_login_app=self.webpackChunk_openmrs_esm_login_app||[]).push([[420],{2420:(e,o,n)=>{"use strict";n.r(o),n.d(o,{backendDependencies:()=>c,importTranslation:()=>a,setupOpenMRS:()=>p,version:()=>s});var t=n(4610),r={provider:{type:{_type:t.Type.String,_default:"basic",_description:"Selects the login mechanism to use. Choices are 'basic' and 'oauth2'. For 'oauth2' you'll also need to set the 'loginUrl' and 'logoutUrl'."},loginUrl:{_type:t.Type.String,_default:"${openmrsSpaBase}/login",_description:"The URL to use for an OAuth2 login.",_validators:[t.validators.isUrl]},logoutUrl:{_type:t.Type.String,_default:"${openmrsSpaBase}/logout",_description:"The URL to use for an OAuth2 logout.",_validators:[t.validators.isUrl]}},chooseLocation:{enabled:{_type:t.Type.Boolean,_default:!0,_description:"Whether to show a 'Choose Location' screen after login. If true, the user will be taken to the loginSuccess URL after they choose a location."},numberToShow:{_type:t.Type.Number,_default:8,_description:"The number of locations displayed on location picker"},locationsPerRequest:{_type:t.Type.Number,_default:50,_description:"The number of results to be fetched in each cycle of the infinite scroll"},useLoginLocationTag:{_type:t.Type.Boolean,_default:!0,_description:"Whether to show only locations with the 'Login Location' tag. If false, shows all locations."}},links:{loginSuccess:{_type:t.Type.String,_description:"Where to take the user after they are logged in.",_default:"${openmrsSpaBase}/home",_validators:[t.validators.isUrl]}},logo:{src:{_type:t.Type.String,_default:null,_description:"A path or URL to an image. If null, will use the OpenMRS SVG sprite.",_validators:[t.validators.isUrl]},alt:{_type:t.Type.String,_default:"Logo",_description:"Alt text, shown on hover"}}};function i(e,o,n){return o in e?Object.defineProperty(e,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[o]=n,e}function l(e){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{},t=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),t.forEach((function(o){i(e,o,n[o])}))}return e}var s="4.0.4-pre.475",a=n(3979),c={"webservices.rest":"^2.24.0"},u={online:{isLoginEnabled:!0},offline:{isLoginEnabled:!1}};function p(){var e="@openmrs/esm-login-app",o={featureName:"login",moduleName:e};return(0,t.defineConfigSchema)(e,r),{pages:[l({load:(0,t.getAsyncLifecycle)((function(){return Promise.all([n.e(581),n.e(98),n.e(611),n.e(776),n.e(680),n.e(607),n.e(897)]).then(n.bind(n,8897))}),o),route:"login"},u),l({load:(0,t.getAsyncLifecycle)((function(){return Promise.all([n.e(581),n.e(98),n.e(611),n.e(776),n.e(680),n.e(607),n.e(897)]).then(n.bind(n,8897))}),o),route:"logout"},u)],extensions:[l({name:"location-picker",slot:"location-picker",load:(0,t.getAsyncLifecycle)((function(){return Promise.all([n.e(581),n.e(98),n.e(776),n.e(680),n.e(607)]).then(n.bind(n,9607))}),o)},u),{name:"logout-button",slot:"user-panel-actions-slot",load:(0,t.getAsyncLifecycle)((function(){return Promise.all([n.e(581),n.e(776),n.e(680),n.e(406)]).then(n.bind(n,7406))}),o),online:!0,offline:!1},l({name:"location-changer",slot:"user-panel-slot",order:1,load:(0,t.getAsyncLifecycle)((function(){return Promise.all([n.e(581),n.e(390),n.e(776),n.e(680),n.e(951)]).then(n.bind(n,6951))}),o)},u)]}}},3979:(e,o,n)=>{var t={"./de.json":[4272,272],"./en.json":[3574,574],"./es.json":[8319,319],"./fr.json":[2757,757],"./hi.json":[5336,336],"./sw.json":[236,236],"./sw_KE.json":[539,539],"./tr_TR.json":[5673,673],"./uk.json":[5240,240],"./zh_CN.json":[1644,644]};function r(e){if(!n.o(t,e))return Promise.resolve().then((()=>{var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}));var o=t[e],r=o[0];return n.e(o[1]).then((()=>n(r)))}r.keys=()=>Object.keys(t),r.id=3979,e.exports=r}}]);
package/dist/607.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_openmrs_esm_login_app=self.webpackChunk_openmrs_esm_login_app||[]).push([[607],{5152:(e,o,t)=>{t.d(o,{Z:()=>a});var n=t(361),i=t.n(n)()((function(e){return e[1]}));i.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}:root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-login__location-picker__productiveHeading01___5QiCf,.-esm-login__location-picker__locationNotFound___-t5pO{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px)}.-esm-login__location-picker__productiveHeading03___6nV-j,.-esm-login__location-picker__welcomeTitle___iI\\+4Z{font-size:var(--cds-heading-03-font-size, 1.25rem);font-weight:var(--cds-heading-03-font-weight, 400);line-height:var(--cds-heading-03-line-height, 1.4);letter-spacing:var(--cds-heading-03-letter-spacing, 0)}.-esm-login__location-picker__bodyShort01___Yu8ZO,.-esm-login__location-picker__locationRadioButton___Gdh0u,.-esm-login__location-picker__resultsCount___KQ5mh{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px)}.-esm-login__location-picker__bodyShort02___Qiqsi,.-esm-login__location-picker__searchResults___CAZcg{font-size:var(--cds-body-compact-02-font-size, 1rem);font-weight:var(--cds-body-compact-02-font-weight, 400);line-height:var(--cds-body-compact-02-line-height, 1.375);letter-spacing:var(--cds-body-compact-02-letter-spacing, 0)}.-esm-login__location-picker__bodyLong01___jzOK6,.-esm-login__location-picker__welcomeMessage___Wfdzz{font-size:var(--cds-body-01-font-size, 0.875rem);font-weight:var(--cds-body-01-font-weight, 400);line-height:var(--cds-body-01-line-height, 1.42857);letter-spacing:var(--cds-body-01-letter-spacing, 0.16px)}.-esm-login__location-picker__label01___itiyC{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)}.-esm-login__location-picker__caption01___VD9WY{font-size:var(--cds-legal-01-font-size, 0.75rem);font-weight:var(--cds-legal-01-font-weight, 400);line-height:var(--cds-legal-01-line-height, 1.33333);letter-spacing:var(--cds-legal-01-letter-spacing, 0.32px)}.-esm-login__location-picker__locationPickerContainer___t4nEl{display:flex;flex-direction:column;justify-content:center;align-items:center;height:100vh;width:100vw}.-esm-login__location-picker__paddedContainer___xd-z7{padding:1.5rem}.-esm-login__location-picker__locationCard___p8DlF{display:flex;flex-direction:column;width:23rem;background-color:#fff;margin:0;border:1px solid #e0e0e0}.-esm-login__location-picker__welcomeTitle___iI\\+4Z{text-transform:capitalize}.-esm-login__location-picker__welcomeMessage___Wfdzz{margin-top:.125rem;color:#525252}.-esm-login__location-picker__searchResults___CAZcg{max-height:100%;overflow-y:auto;padding:0rem 1.5rem;background-color:#f4f4f4;height:25.5rem}.-esm-login__location-picker__resultsCount___KQ5mh{color:#525252}.-esm-login__location-picker__locationResultsContainer___IvnTr{display:flex;overflow-y:auto;margin-top:1rem;padding:0rem .125rem 0rem}.-esm-login__location-picker__locationRadioButton___Gdh0u{display:flex;height:3rem;align-items:center}.-esm-login__location-picker__locationNotFound___-t5pO{color:#525252;margin-bottom:1rem}.-esm-login__location-picker__confirmButton___mHNSY button{margin:1.5rem;width:20rem}.-esm-login__location-picker__radioButtonSkeleton___mCTbu{margin-right:0 !important;margin-bottom:1rem}.-esm-login__location-picker__radioButtonSkeleton___mCTbu span{width:100% !important}.-esm-login__location-picker__pagination___N8tXt{background-color:#f4f4f4;display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem;border:.125rem solid #e0e0e0}.-esm-login__location-picker__pagination___N8tXt>button:first-child,pagination>button:first-child:hover{border-right:.125rem solid #e0e0e0}.-esm-login__location-picker__pagination___N8tXt>button,.-esm-login__location-picker__pagination___N8tXt>button:hover{border-left:.125rem solid #e0e0e0}.-esm-login__location-picker__loadingIcon___Tgfyj{display:flex;justify-content:center;align-items:center;margin-top:1rem}.-esm-login__location-picker__loadingContainer___XwbLl{margin-top:1.5rem}.-esm-login__location-picker__emptyState___B2y\\+I{display:flex;flex-direction:column;justify-content:center;margin:1.5rem auto 0rem}",""]),i.locals={productiveHeading01:"-esm-login__location-picker__productiveHeading01___5QiCf",locationNotFound:"-esm-login__location-picker__locationNotFound___-t5pO",productiveHeading03:"-esm-login__location-picker__productiveHeading03___6nV-j",welcomeTitle:"-esm-login__location-picker__welcomeTitle___iI+4Z",bodyShort01:"-esm-login__location-picker__bodyShort01___Yu8ZO",locationRadioButton:"-esm-login__location-picker__locationRadioButton___Gdh0u",resultsCount:"-esm-login__location-picker__resultsCount___KQ5mh",bodyShort02:"-esm-login__location-picker__bodyShort02___Qiqsi",searchResults:"-esm-login__location-picker__searchResults___CAZcg",bodyLong01:"-esm-login__location-picker__bodyLong01___jzOK6",welcomeMessage:"-esm-login__location-picker__welcomeMessage___Wfdzz",label01:"-esm-login__location-picker__label01___itiyC",caption01:"-esm-login__location-picker__caption01___VD9WY",locationPickerContainer:"-esm-login__location-picker__locationPickerContainer___t4nEl",paddedContainer:"-esm-login__location-picker__paddedContainer___xd-z7",locationCard:"-esm-login__location-picker__locationCard___p8DlF",locationResultsContainer:"-esm-login__location-picker__locationResultsContainer___IvnTr",confirmButton:"-esm-login__location-picker__confirmButton___mHNSY",radioButtonSkeleton:"-esm-login__location-picker__radioButtonSkeleton___mCTbu",pagination:"-esm-login__location-picker__pagination___N8tXt",loadingIcon:"-esm-login__location-picker__loadingIcon___Tgfyj",loadingContainer:"-esm-login__location-picker__loadingContainer___XwbLl",emptyState:"-esm-login__location-picker__emptyState___B2y+I"};const a=i},4865:(e,o,t)=>{t.d(o,{h:()=>_});var n=t(5776),i=t(4610),a=t(3415);function r(e,o){(null==o||o>e.length)&&(o=e.length);for(var t=0,n=new Array(o);t<o;t++)n[t]=e[t];return n}function l(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,o){if(e){if("string"==typeof e)return r(e,o);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?r(e,o):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var c="".concat(i.fhirBaseUrl,"/Location?_summary=data");function _(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=function(n,i){var a,r;if(i&&!(null==i||null===(a=i.data)||void 0===a||null===(r=a.link)||void 0===r?void 0:r.some((function(e){return"next"===e.relation}))))return null;var l=c;return o&&(l+="&_count=".concat(o)),n&&(l+="&_getpagesoffset=".concat(n*o)),e&&(l+="&_tag=login location"),"string"==typeof t&&""!=t&&(l+="&name:contains=".concat(t)),l},_=(0,a.ZP)(r,i.openmrsFetch),s=_.data,d=_.isValidating,m=_.setSize,u=_.error;u&&(console.error(u),(0,i.reportError)(u));var g=(0,n.useMemo)((function(){var e,o,t,n,i,a,r;return{locationData:s?(e=[]).concat.apply(e,l(null==s?void 0:s.map((function(e){var o;return null!==(a=null==e||null===(o=e.data)||void 0===o?void 0:o.entry)&&void 0!==a?a:[]})))):null,isLoading:!s&&!u,totalResults:null!==(r=null==s||null===(o=s[0])||void 0===o||null===(t=o.data)||void 0===t?void 0:t.total)&&void 0!==r?r:null,hasMore:!!(null==s?void 0:s.length)&&(null==s||null===(n=s[s.length-1])||void 0===n||null===(i=n.data)||void 0===i?void 0:i.link.some((function(e){return"next"===e.relation}))),loadingNewData:d,setPage:m}}),[s,u,d,m,t]);return g}},9607:(e,o,t)=>{t.r(o),t.d(o,{default:()=>N});var n=t(5776),i=t.n(n),a=t(9717),r=t(2680),l=t(622),c=t(4610),_=t(4865),s=t(487),d=t.n(s),m=t(631),u=t.n(m),g=t(2052),p=t.n(g),f=t(4010),h=t.n(f),v=t(1469),b=t.n(v),y=t(9329),k=t.n(y),w=t(5152),S={};S.styleTagTransform=k(),S.setAttributes=h(),S.insert=p().bind(null,"head"),S.domAPI=u(),S.insertStyleElement=b(),d()(w.Z,S);const C=w.Z&&w.Z.locals?w.Z.locals:void 0;function E(e,o){(null==o||o>e.length)&&(o=e.length);for(var t=0,n=new Array(o);t<o;t++)n[t]=e[t];return n}function z(e,o){return function(e){if(Array.isArray(e))return e}(e)||function(e,o){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,i,a=[],r=!0,l=!1;try{for(t=t.call(e);!(r=(n=t.next()).done)&&(a.push(n.value),!o||a.length!==o);r=!0);}catch(e){l=!0,i=e}finally{try{r||null==t.return||t.return()}finally{if(l)throw i}}return a}}(e,o)||function(e,o){if(e){if("string"==typeof e)return E(e,o);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?E(e,o):void 0}}(e,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const N=function(e){var o,t,s=e.currentUser,d=e.loginLocations,m=e.onChangeLocation,u=e.hideWelcomeMessage,g=e.currentLocationUuid,p=e.isLoginEnabled,f=(0,c.useConfig)().chooseLocation,h=(0,r.useTranslation)().t,v=z((0,n.useState)(f.numberToShow),2),b=(v[0],v[1]),y="userDefaultLoginLocationKey",k=z((0,n.useState)(null!==(t=window.localStorage.getItem("".concat(y).concat(s)),o=(null==d?void 0:d.some((function(e){return e.resource.id===t})))?t:"")&&void 0!==o?o:""),2),w=k[0],S=k[1],E=z((0,n.useState)(""),2),N=E[0],x=E[1],T=(0,_.h)(f.useLoginLocationTag,f.locationsPerRequest,N),I=T.locationData,L=T.isLoading,R=T.hasMore,A=T.totalResults,B=T.loadingNewData,j=T.setPage,Z=z((0,n.useState)(!1),2),O=Z[0],F=Z[1],M=(0,n.useRef)();(0,n.useEffect)((function(){O&&(m(w),F(!1))}),[O,w,m]),(0,n.useEffect)((function(){w&&window.localStorage.setItem("".concat(y).concat(s),w)}),[w,s]),(0,n.useEffect)((function(){g&&u&&S(g)}),[g,u]),(0,n.useEffect)((function(){O&&M.current&&(M.current.value="",x(null))}),[O]),(0,n.useEffect)((function(){!L&&A&&f.numberToShow&&b(Math.min(f.numberToShow,A))}),[L,A,f.numberToShow]);var D=(0,a.Z)((function(e){S(""),x(e)}),300),P=(0,n.useRef)(null),Y=(0,n.useCallback)((function(e){B||(P.current&&P.current.disconnect(),P.current=new IntersectionObserver((function(e){e[0].isIntersecting&&R&&j((function(e){return e+1}))}),{threshold:1}),e&&P.current.observe(e))}),[B,R,j]);return i().createElement("div",{className:C.locationPickerContainer},i().createElement("form",{onSubmit:function(e){e.preventDefault(),F(!0)}},i().createElement("div",{className:C.locationCard},i().createElement("div",{className:C.paddedContainer},i().createElement("p",{className:C.welcomeTitle},h("welcome","Welcome")," ",s),i().createElement("p",{className:C.welcomeMessage},h("selectYourLocation","Select your location from the list below. Use the search bar to find your location."))),i().createElement(l.olm,{autoFocus:!0,labelText:h("searchForLocation","Search for a location"),id:"search-1",placeholder:h("searchForLocation","Search for a location"),onChange:function(e){return D(e.target.value)},name:"searchForLocation",size:"lg"}),i().createElement("div",{className:C.searchResults},L?i().createElement("div",{className:C.loadingContainer},i().createElement(l.CMh,{className:C.radioButtonSkeleton})):i().createElement(i().Fragment,null,i().createElement("div",{className:C.locationResultsContainer},(null==I?void 0:I.length)>0&&i().createElement(l.SYO,{valueSelected:w,orientation:"vertical",name:w,onChange:function(e){S(e.toString())}},I.map((function(e){return i().createElement(l.EUY,{className:C.locationRadioButton,key:e.resource.id,id:e.resource.name,labelText:e.resource.name,value:e.resource.id})}))),0===(null==I?void 0:I.length)&&i().createElement("div",{className:C.emptyState},i().createElement("p",{className:C.locationNotFound},h("noResultsToDisplay","No results to display")))),R&&i().createElement("div",{className:C.loadingIcon,ref:Y},i().createElement(l.gbz,{small:!0,withOverlay:!1,description:h("loading","Loading")})))),i().createElement("div",{className:C.confirmButton},i().createElement(l.zxk,{kind:"primary",type:"submit",disabled:!w||!p},h("confirm","Confirm"))))))}}}]);
1
+ "use strict";(self.webpackChunk_openmrs_esm_login_app=self.webpackChunk_openmrs_esm_login_app||[]).push([[607],{5152:(e,o,t)=>{t.d(o,{Z:()=>a});var n=t(361),i=t.n(n)()((function(e){return e[1]}));i.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}:root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-login__location-picker__productiveHeading01___5QiCf,.-esm-login__location-picker__locationNotFound___-t5pO{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px)}.-esm-login__location-picker__productiveHeading03___6nV-j,.-esm-login__location-picker__welcomeTitle___iI\\+4Z{font-size:var(--cds-heading-03-font-size, 1.25rem);font-weight:var(--cds-heading-03-font-weight, 400);line-height:var(--cds-heading-03-line-height, 1.4);letter-spacing:var(--cds-heading-03-letter-spacing, 0)}.-esm-login__location-picker__bodyShort01___Yu8ZO,.-esm-login__location-picker__locationRadioButton___Gdh0u,.-esm-login__location-picker__resultsCount___KQ5mh{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px)}.-esm-login__location-picker__bodyShort02___Qiqsi,.-esm-login__location-picker__searchResults___CAZcg{font-size:var(--cds-body-compact-02-font-size, 1rem);font-weight:var(--cds-body-compact-02-font-weight, 400);line-height:var(--cds-body-compact-02-line-height, 1.375);letter-spacing:var(--cds-body-compact-02-letter-spacing, 0)}.-esm-login__location-picker__bodyLong01___jzOK6,.-esm-login__location-picker__welcomeMessage___Wfdzz{font-size:var(--cds-body-01-font-size, 0.875rem);font-weight:var(--cds-body-01-font-weight, 400);line-height:var(--cds-body-01-line-height, 1.42857);letter-spacing:var(--cds-body-01-letter-spacing, 0.16px)}.-esm-login__location-picker__label01___itiyC{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)}.-esm-login__location-picker__caption01___VD9WY{font-size:var(--cds-legal-01-font-size, 0.75rem);font-weight:var(--cds-legal-01-font-weight, 400);line-height:var(--cds-legal-01-line-height, 1.33333);letter-spacing:var(--cds-legal-01-letter-spacing, 0.32px)}.-esm-login__location-picker__locationPickerContainer___t4nEl{display:flex;flex-direction:column;justify-content:center;align-items:center;height:100vh;width:100vw}.-esm-login__location-picker__paddedContainer___xd-z7{padding:1.5rem}.-esm-login__location-picker__locationCard___p8DlF{display:flex;flex-direction:column;width:23rem;background-color:#fff;margin:0;border:1px solid #e0e0e0}.-esm-login__location-picker__welcomeTitle___iI\\+4Z{text-transform:capitalize}.-esm-login__location-picker__welcomeMessage___Wfdzz{margin-top:.125rem;color:#525252}.-esm-login__location-picker__searchResults___CAZcg{max-height:100%;overflow-y:auto;padding:0rem 1.5rem;background-color:#f4f4f4;height:25.5rem}.-esm-login__location-picker__resultsCount___KQ5mh{color:#525252}.-esm-login__location-picker__locationResultsContainer___IvnTr{display:flex;overflow-y:auto;margin-top:1rem;padding:0rem .125rem 0rem}.-esm-login__location-picker__locationRadioButton___Gdh0u{display:flex;height:3rem;align-items:center}.-esm-login__location-picker__locationNotFound___-t5pO{color:#525252;margin-bottom:1rem}.-esm-login__location-picker__confirmButton___mHNSY button{margin:1.5rem;width:20rem}.-esm-login__location-picker__radioButtonSkeleton___mCTbu{margin-right:0 !important;margin-bottom:1rem}.-esm-login__location-picker__radioButtonSkeleton___mCTbu span{width:100% !important}.-esm-login__location-picker__pagination___N8tXt{background-color:#f4f4f4;display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem;border:.125rem solid #e0e0e0}.-esm-login__location-picker__pagination___N8tXt>button:first-child,pagination>button:first-child:hover{border-right:.125rem solid #e0e0e0}.-esm-login__location-picker__pagination___N8tXt>button,.-esm-login__location-picker__pagination___N8tXt>button:hover{border-left:.125rem solid #e0e0e0}.-esm-login__location-picker__loadingIcon___Tgfyj{display:flex;justify-content:center;align-items:center;margin-top:1rem}.-esm-login__location-picker__loadingContainer___XwbLl{margin-top:1.5rem}.-esm-login__location-picker__emptyState___B2y\\+I{display:flex;flex-direction:column;justify-content:center;margin:1.5rem auto 0rem}",""]),i.locals={productiveHeading01:"-esm-login__location-picker__productiveHeading01___5QiCf",locationNotFound:"-esm-login__location-picker__locationNotFound___-t5pO",productiveHeading03:"-esm-login__location-picker__productiveHeading03___6nV-j",welcomeTitle:"-esm-login__location-picker__welcomeTitle___iI+4Z",bodyShort01:"-esm-login__location-picker__bodyShort01___Yu8ZO",locationRadioButton:"-esm-login__location-picker__locationRadioButton___Gdh0u",resultsCount:"-esm-login__location-picker__resultsCount___KQ5mh",bodyShort02:"-esm-login__location-picker__bodyShort02___Qiqsi",searchResults:"-esm-login__location-picker__searchResults___CAZcg",bodyLong01:"-esm-login__location-picker__bodyLong01___jzOK6",welcomeMessage:"-esm-login__location-picker__welcomeMessage___Wfdzz",label01:"-esm-login__location-picker__label01___itiyC",caption01:"-esm-login__location-picker__caption01___VD9WY",locationPickerContainer:"-esm-login__location-picker__locationPickerContainer___t4nEl",paddedContainer:"-esm-login__location-picker__paddedContainer___xd-z7",locationCard:"-esm-login__location-picker__locationCard___p8DlF",locationResultsContainer:"-esm-login__location-picker__locationResultsContainer___IvnTr",confirmButton:"-esm-login__location-picker__confirmButton___mHNSY",radioButtonSkeleton:"-esm-login__location-picker__radioButtonSkeleton___mCTbu",pagination:"-esm-login__location-picker__pagination___N8tXt",loadingIcon:"-esm-login__location-picker__loadingIcon___Tgfyj",loadingContainer:"-esm-login__location-picker__loadingContainer___XwbLl",emptyState:"-esm-login__location-picker__emptyState___B2y+I"};const a=i},4865:(e,o,t)=>{t.d(o,{h:()=>_});var n=t(5776),i=t(4610),a=t(8225);function r(e,o){(null==o||o>e.length)&&(o=e.length);for(var t=0,n=new Array(o);t<o;t++)n[t]=e[t];return n}function l(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,o){if(e){if("string"==typeof e)return r(e,o);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?r(e,o):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var c="".concat(i.fhirBaseUrl,"/Location?_summary=data");function _(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=function(n,i){var a,r;if(i&&!(null==i||null===(a=i.data)||void 0===a||null===(r=a.link)||void 0===r?void 0:r.some((function(e){return"next"===e.relation}))))return null;var l=c;return o&&(l+="&_count=".concat(o)),n&&(l+="&_getpagesoffset=".concat(n*o)),e&&(l+="&_tag=login location"),"string"==typeof t&&""!=t&&(l+="&name:contains=".concat(t)),l},_=(0,a.ZP)(r,i.openmrsFetch),s=_.data,d=_.isValidating,m=_.setSize,u=_.error;u&&(console.error(u),(0,i.reportError)(u));var g=(0,n.useMemo)((function(){var e,o,t,n,i,a,r;return{locationData:s?(e=[]).concat.apply(e,l(null==s?void 0:s.map((function(e){var o;return null!==(a=null==e||null===(o=e.data)||void 0===o?void 0:o.entry)&&void 0!==a?a:[]})))):null,isLoading:!s&&!u,totalResults:null!==(r=null==s||null===(o=s[0])||void 0===o||null===(t=o.data)||void 0===t?void 0:t.total)&&void 0!==r?r:null,hasMore:!!(null==s?void 0:s.length)&&(null==s||null===(n=s[s.length-1])||void 0===n||null===(i=n.data)||void 0===i?void 0:i.link.some((function(e){return"next"===e.relation}))),loadingNewData:d,setPage:m}}),[s,u,d,m,t]);return g}},9607:(e,o,t)=>{t.r(o),t.d(o,{default:()=>N});var n=t(5776),i=t.n(n),a=t(9717),r=t(2680),l=t(622),c=t(4610),_=t(4865),s=t(487),d=t.n(s),m=t(631),u=t.n(m),g=t(2052),p=t.n(g),f=t(4010),h=t.n(f),v=t(1469),b=t.n(v),y=t(9329),k=t.n(y),w=t(5152),S={};S.styleTagTransform=k(),S.setAttributes=h(),S.insert=p().bind(null,"head"),S.domAPI=u(),S.insertStyleElement=b(),d()(w.Z,S);const C=w.Z&&w.Z.locals?w.Z.locals:void 0;function E(e,o){(null==o||o>e.length)&&(o=e.length);for(var t=0,n=new Array(o);t<o;t++)n[t]=e[t];return n}function z(e,o){return function(e){if(Array.isArray(e))return e}(e)||function(e,o){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,i,a=[],r=!0,l=!1;try{for(t=t.call(e);!(r=(n=t.next()).done)&&(a.push(n.value),!o||a.length!==o);r=!0);}catch(e){l=!0,i=e}finally{try{r||null==t.return||t.return()}finally{if(l)throw i}}return a}}(e,o)||function(e,o){if(e){if("string"==typeof e)return E(e,o);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?E(e,o):void 0}}(e,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const N=function(e){var o,t,s=e.currentUser,d=e.loginLocations,m=e.onChangeLocation,u=e.hideWelcomeMessage,g=e.currentLocationUuid,p=e.isLoginEnabled,f=(0,c.useConfig)().chooseLocation,h=(0,r.useTranslation)().t,v=z((0,n.useState)(f.numberToShow),2),b=(v[0],v[1]),y="userDefaultLoginLocationKey",k=z((0,n.useState)(null!==(t=window.localStorage.getItem("".concat(y).concat(s)),o=(null==d?void 0:d.some((function(e){return e.resource.id===t})))?t:"")&&void 0!==o?o:""),2),w=k[0],S=k[1],E=z((0,n.useState)(""),2),N=E[0],x=E[1],T=(0,_.h)(f.useLoginLocationTag,f.locationsPerRequest,N),I=T.locationData,L=T.isLoading,R=T.hasMore,A=T.totalResults,B=T.loadingNewData,j=T.setPage,Z=z((0,n.useState)(!1),2),O=Z[0],F=Z[1],M=(0,n.useRef)();(0,n.useEffect)((function(){O&&(m(w),F(!1))}),[O,w,m]),(0,n.useEffect)((function(){w&&window.localStorage.setItem("".concat(y).concat(s),w)}),[w,s]),(0,n.useEffect)((function(){g&&u&&S(g)}),[g,u]),(0,n.useEffect)((function(){O&&M.current&&(M.current.value="",x(null))}),[O]),(0,n.useEffect)((function(){!L&&A&&f.numberToShow&&b(Math.min(f.numberToShow,A))}),[L,A,f.numberToShow]);var D=(0,a.Z)((function(e){S(""),x(e)}),300),P=(0,n.useRef)(null),Y=(0,n.useCallback)((function(e){B||(P.current&&P.current.disconnect(),P.current=new IntersectionObserver((function(e){e[0].isIntersecting&&R&&j((function(e){return e+1}))}),{threshold:1}),e&&P.current.observe(e))}),[B,R,j]);return i().createElement("div",{className:C.locationPickerContainer},i().createElement("form",{onSubmit:function(e){e.preventDefault(),F(!0)}},i().createElement("div",{className:C.locationCard},i().createElement("div",{className:C.paddedContainer},i().createElement("p",{className:C.welcomeTitle},h("welcome","Welcome")," ",s),i().createElement("p",{className:C.welcomeMessage},h("selectYourLocation","Select your location from the list below. Use the search bar to find your location."))),i().createElement(l.olm,{autoFocus:!0,labelText:h("searchForLocation","Search for a location"),id:"search-1",placeholder:h("searchForLocation","Search for a location"),onChange:function(e){return D(e.target.value)},name:"searchForLocation",size:"lg"}),i().createElement("div",{className:C.searchResults},L?i().createElement("div",{className:C.loadingContainer},i().createElement(l.CMh,{className:C.radioButtonSkeleton})):i().createElement(i().Fragment,null,i().createElement("div",{className:C.locationResultsContainer},(null==I?void 0:I.length)>0&&i().createElement(l.SYO,{valueSelected:w,orientation:"vertical",name:w,onChange:function(e){S(e.toString())}},I.map((function(e){return i().createElement(l.EUY,{className:C.locationRadioButton,key:e.resource.id,id:e.resource.name,labelText:e.resource.name,value:e.resource.id})}))),0===(null==I?void 0:I.length)&&i().createElement("div",{className:C.emptyState},i().createElement("p",{className:C.locationNotFound},h("noResultsToDisplay","No results to display")))),R&&i().createElement("div",{className:C.loadingIcon,ref:Y},i().createElement(l.gbz,{small:!0,withOverlay:!1,description:h("loading","Loading")})))),i().createElement("div",{className:C.confirmButton},i().createElement(l.zxk,{kind:"primary",type:"submit",disabled:!w||!p},h("confirm","Confirm"))))))}}}]);