@openmrs/esm-implementer-tools-app 3.1.10-pre.92 → 3.1.12-pre.598
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/README.md +1 -9
- package/__mocks__/react-i18next.js +54 -0
- package/{.babelrc → babel.config.json} +2 -1
- package/dist/266.openmrs-esm-implementer-tools-app.js +3 -0
- package/dist/266.openmrs-esm-implementer-tools-app.js.LICENSE.txt +8 -0
- package/dist/266.openmrs-esm-implementer-tools-app.js.map +1 -0
- package/dist/319.openmrs-esm-implementer-tools-app.js +1 -0
- package/dist/472.openmrs-esm-implementer-tools-app.js +2 -0
- package/dist/472.openmrs-esm-implementer-tools-app.js.map +1 -0
- package/dist/574.openmrs-esm-implementer-tools-app.js +1 -0
- package/dist/728.openmrs-esm-implementer-tools-app.js +2 -0
- package/dist/728.openmrs-esm-implementer-tools-app.js.map +1 -0
- package/dist/965.openmrs-esm-implementer-tools-app.js +3 -0
- package/dist/965.openmrs-esm-implementer-tools-app.js.LICENSE.txt +5 -0
- package/dist/965.openmrs-esm-implementer-tools-app.js.map +1 -0
- package/dist/openmrs-esm-implementer-tools-app.js +1 -1
- package/dist/openmrs-esm-implementer-tools-app.js.buildmanifest.json +170 -0
- package/dist/openmrs-esm-implementer-tools-app.js.map +1 -1
- package/jest.config.js +1 -2
- package/package.json +13 -20
- package/src/backend-dependencies/backend-dependencies.component.tsx +97 -0
- package/src/backend-dependencies/openmrs-backend-dependencies.ts +113 -93
- package/src/backend-dependencies/useBackendDependencies.ts +16 -0
- package/src/config-edit-button/config-edit-button.component.tsx +3 -1
- package/src/configuration/config-tree-for-module.component.tsx +1 -1
- package/src/configuration/config-tree.component.tsx +2 -9
- package/src/configuration/configuration.component.tsx +101 -31
- package/src/configuration/configuration.test.tsx +6 -6
- package/src/configuration/description.component.tsx +3 -1
- package/src/configuration/display-value.tsx +4 -4
- package/src/configuration/editable-value.component.tsx +5 -2
- package/src/configuration/extension-slots-config-tree.tsx +10 -14
- package/src/configuration/layout/subtree.component.tsx +1 -1
- package/src/configuration/layout/tree-container.component.tsx +1 -1
- package/src/configuration/value-editor.tsx +1 -1
- package/src/configuration/value-editors/array-editor.tsx +3 -3
- package/src/configuration/value-editors/extension-slot-add.tsx +1 -1
- package/src/configuration/value-editors/extension-slot-order.tsx +0 -4
- package/src/configuration/value-editors/extension-slot-remove.tsx +19 -7
- package/src/configuration/value-editors/object-editor.tsx +3 -3
- package/src/configuration/value-editors/value-editor-field.tsx +1 -3
- package/src/implementer-tools.button.tsx +33 -0
- package/src/implementer-tools.component.tsx +45 -81
- package/src/implementer-tools.styles.css +5 -9
- package/src/index.ts +35 -9
- package/src/popup/popup.component.tsx +11 -27
- package/src/popup/popup.styles.css +1 -1
- package/src/store.ts +27 -32
- package/src/ui-editor/extension-overlay.component.tsx +1 -1
- package/src/ui-editor/styles.css +7 -0
- package/src/ui-editor/ui-editor.tsx +49 -21
- package/translations/en.json +12 -0
- package/translations/es.json +13 -0
- package/tsconfig.json +1 -0
- package/webpack.config.js +1 -66
- package/__mocks__/openmrs-esm-framework.mock.tsx +0 -142
- package/dist/1.openmrs-esm-implementer-tools-app.js +0 -15
- package/dist/1.openmrs-esm-implementer-tools-app.js.map +0 -1
- package/dist/2.openmrs-esm-implementer-tools-app.js +0 -2
- package/dist/2.openmrs-esm-implementer-tools-app.js.map +0 -1
- package/src/backend-dependencies/backend-dependecies.component.tsx +0 -106
- package/src/backend-dependencies/backend-dependencies-style.css +0 -4
- package/src/backend-dependencies/helpers/backend-dependecies-helper.test.ts +0 -127
- package/src/backend-dependencies/helpers/backend-dependecies-helper.ts +0 -70
- package/src/set-public-path.ts +0 -3
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{121:function(e,t,n){var a=n(57),o=n(159);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var l={insert:"head",singleton:!1};a(o,l);e.exports=o.locals||{}},131:function(e,t,n){var a=n(57),o=n(196);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var l={insert:"head",singleton:!1};a(o,l);e.exports=o.locals||{}},141:function(e,t,n){var a=n(57),o=n(142);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var l={insert:"head",singleton:!1};a(o,l);e.exports=o.locals||{}},142:function(e,t,n){(t=n(58)(!1)).push([e.i,"._1Ayf60UdSpBRqA1EEcFhMx {\n position: fixed;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 50%;\n z-index: 100000;\n background-color: #d0d0d0;\n border-top: 2px solid #404050;\n color: #222;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: flex-start;\n box-sizing: border-box;\n font-family: sans serif;\n overflow-y: auto;\n}\n\n._9564e3pCax4M6JkAZ66LR {\n margin-top: 40px;\n width: 100%;\n}\n\n._1Jwt3NPr3regy33Xkl6d0W {\n width: 30em;\n}\n\n._2qArfSC3xnWI_x3yYrKRp5 {\n position: fixed;\n width: 100%;\n height: 42px;\n display: flex;\n justify-content: space-between;\n border-bottom: 1px solid #a0a0a0;\n z-index: 2;\n}\n\n._2ijbe5ewzzeFLftP1nW8Fr {\n min-height: 3em;\n padding: 0 1em;\n}\n\n._2qArfSC3xnWI_x3yYrKRp5 .bx--content-switcher-btn:first-child,\n._2qArfSC3xnWI_x3yYrKRp5 .bx--content-switcher-btn:last-child {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n",""]),t.locals={popup:"_1Ayf60UdSpBRqA1EEcFhMx",content:"_9564e3pCax4M6JkAZ66LR",tabs:"_1Jwt3NPr3regy33Xkl6d0W",topBar:"_2qArfSC3xnWI_x3yYrKRp5",closeButton:"_2ijbe5ewzzeFLftP1nW8Fr"},e.exports=t},143:function(e,t,n){(t=n(58)(!1)).push([e.i,"._3CbKuFsDeC-_p1UpmHFzMi {\n position: fixed;\n width: 100%;\n background-color: #e0e0e0;\n border-bottom: 1px solid #a0a0a0;\n border-top: 1px solid #c0c0c0;\n z-index: 2;\n}\n\n._3CbKuFsDeC-_p1UpmHFzMi > div {\n flex: 0 1 auto;\n}\n\n._1uWtA9PWbIGd8yBBW-KBi- {\n display: inline-flex;\n align-items: center;\n}\n\n._20lnyaVgwu2KFvC40pqIcI {\n text-decoration: none;\n color: inherit;\n}\n\n._37uZ0pr4NAGyQ6vWjAWZrd {\n background-color: #f0f0f0;\n width: 100%;\n display: flex;\n overflow-y: auto;\n}\n\n._2AO9Ks7NJEIHDaq9zQixzr {\n width: 55%;\n overflow-wrap: break-word;\n overflow-x: hidden;\n overflow-y: scroll;\n}\n\n._338-zNGO7spkC4rH0u9psF {\n width: 45%;\n background-color: #e0e0e0;\n color: #424242;\n padding: 1em 2em;\n font-size: 12pt;\n overflow-wrap: break-word;\n overflow-y: scroll;\n}\n\n._2AO9Ks7NJEIHDaq9zQixzr .bx--text-input-wrapper {\n min-width: 8em;\n}\n\n.inGvCqOxdR_cFm-9Phjj_ .bx--accordion__content {\n padding-right: 0;\n}\n\n.jb4ugOoVj7XcCU9YRfS9s {\n position: absolute;\n left: 97vw;\n top: -2px;\n}\n\n.L-2i-IWmSl9QOOtZWNW_7 {\n width: 25em;\n}\n\n._2N9mCDaqEn8MjoJMMzOVkw {\n height: 2.5rem;\n min-width: 5em;\n margin-left: 1em;\n}\n",""]),t.locals={tools:"_3CbKuFsDeC-_p1UpmHFzMi",actionButton:"_1uWtA9PWbIGd8yBBW-KBi-",downloadLink:"_20lnyaVgwu2KFvC40pqIcI",mainContent:"_37uZ0pr4NAGyQ6vWjAWZrd",configTreePane:"_2AO9Ks7NJEIHDaq9zQixzr",descriptionPane:"_338-zNGO7spkC4rH0u9psF",fullWidthAccordion:"inGvCqOxdR_cFm-9Phjj_",toggleToolbarButton:"jb4ugOoVj7XcCU9YRfS9s",valueEditorInput:"L-2i-IWmSl9QOOtZWNW_7",valueEditorButtons:"_2N9mCDaqEn8MjoJMMzOVkw"},e.exports=t},144:function(e,t,n){var a=n(57),o=n(145);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var l={insert:"head",singleton:!1};a(o,l);e.exports=o.locals||{}},145:function(e,t,n){(t=n(58)(!1)).push([e.i,"._2NqeFbzQeg_2fP3tf8eSb5 {\n background: none;\n color: #474b6b;\n border: none;\n font: inherit;\n text-align: left;\n}\n\n._3V3NQGmIjxEWhiqjC_pyP8 {\n margin-left: 1em;\n color: orange;\n font-size: 11pt;\n}\n\n._1hvpyO7iwXlumeoE6tJ0P8 {\n color: #2020a0;\n}\n",""]),t.locals={secretButton:"_2NqeFbzQeg_2fP3tf8eSb5",error:"_3V3NQGmIjxEWhiqjC_pyP8",overriddenValue:"_1hvpyO7iwXlumeoE6tJ0P8"},e.exports=t},146:function(e,t,n){var a=n(57),o=n(147);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var l={insert:"head",singleton:!1};a(o,l);e.exports=o.locals||{}},147:function(e,t,n){(t=n(58)(!1)).push([e.i,".Udme2PvAx8NGskbfrVj5k .bx--structured-list-td {\n padding: 0.25rem 3rem 0.25rem 1rem;\n}\n\n.Udme2PvAx8NGskbfrVj5k .bx--structured-list {\n margin-bottom: 0.25rem;\n}\n\n.jMEg7edKgYth-wiOiui93 {\n text-align: right;\n}\n\n/* .valueCell {\n display: inline-flex;\n} */\n",""]),t.locals={arrayEditor:"Udme2PvAx8NGskbfrVj5k",buttonCell:"jMEg7edKgYth-wiOiui93"},e.exports=t},151:function(e,t,n){var a=n(57),o=n(152);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var l={insert:"head",singleton:!1};a(o,l);e.exports=o.locals||{}},152:function(e,t,n){(t=n(58)(!1)).push([e.i,'._2A8VfFa6Or2_56KQPWFgiU,\n._2A8VfFa6Or2_56KQPWFgiU > [role="combobox"] {\n display: flex;\n position: relative;\n width: 20em;\n}\n\n._2A8VfFa6Or2_56KQPWFgiU [role="listbox"] {\n margin: 0;\n padding: 0;\n display: flex;\n flex-flow: column wrap;\n background-color: whitesmoke;\n color: #fff;\n}\n\n._2A8VfFa6Or2_56KQPWFgiU li {\n line-height: 0.75rem;\n padding: 0.5em;\n display: block;\n border-bottom: 0.125rem solid #718096;\n outline: 0;\n margin: 0;\n color: #000;\n}\n\n._2A8VfFa6Or2_56KQPWFgiU [role="option"]:hover {\n background-color: #38a169;\n border-color: #38a169;\n color: #f7fafc;\n}\n',""]),t.locals={autocomplete:"_2A8VfFa6Or2_56KQPWFgiU"},e.exports=t},155:function(e,t,n){var a=n(57),o=n(156);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var l={insert:"head",singleton:!1};a(o,l);e.exports=o.locals||{}},156:function(e,t,n){(t=n(58)(!1)).push([e.i,"._3FDvaeaQ0NuZ3d9JvGdLm7 .bx--structured-list-td {\n padding: 0.25rem 3rem 0.25rem 1rem;\n}\n\n._3FDvaeaQ0NuZ3d9JvGdLm7 .bx--structured-list {\n margin-bottom: 0.25rem;\n}\n\n._6OmfZhhrHxi6B7GGiKxq0 {\n text-align: right;\n}\n\n/* .valueCell {\n display: inline-flex;\n} */\n",""]),t.locals={objectEditor:"_3FDvaeaQ0NuZ3d9JvGdLm7",buttonCell:"_6OmfZhhrHxi6B7GGiKxq0"},e.exports=t},159:function(e,t,n){(t=n(58)(!1)).push([e.i,".tuImD_VrgRA1FTRISm0Bz {\n width: 12em;\n}\n\n._2y4Z5HPpbr_kfY1poLwvjY {\n margin-bottom: 1em;\n}\n\n._1Fg9Buv7our49B7uFKCrsT {\n border-left: 2px solid #c0c0c0;\n}\n\n._1J0L5kDRUGQibKU9QcJeLs {\n left: -6em;\n}\n",""]),t.locals={labelCell:"tuImD_VrgRA1FTRISm0Bz",structuredList:"_2y4Z5HPpbr_kfY1poLwvjY",structuredListRow:"_1Fg9Buv7our49B7uFKCrsT",subtreeCell:"_1J0L5kDRUGQibKU9QcJeLs"},e.exports=t},160:function(e,t,n){var a=n(57),o=n(161);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var l={insert:"head",singleton:!1};a(o,l);e.exports=o.locals||{}},161:function(e,t,n){(t=n(58)(!1)).push([e.i,".M3HCJa1PAW9AqqZ7JBxOi {\n color: #303030;\n margin-bottom: 1em;\n}\n\n.jVqk5E1wOwXXTHfZDZ_r2 {\n margin-bottom: 0.5em;\n}\n\n.hQCeoRJzu_gezvkJPVZ8W {\n font-style: italic;\n margin-bottom: 0.5em;\n}\n\n._31eSLoZaupMMwZ5uko3FLS {\n font-family: monospace;\n margin-top: 0.5em;\n margin-left: 0.5em;\n}\n",""]),t.locals={path:"M3HCJa1PAW9AqqZ7JBxOi",description:"jVqk5E1wOwXXTHfZDZ_r2",source:"hQCeoRJzu_gezvkJPVZ8W",value:"_31eSLoZaupMMwZ5uko3FLS"},e.exports=t},165:function(e,t,n){var a=n(57),o=n(166);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var l={insert:"head",singleton:!1};a(o,l);e.exports=o.locals||{}},166:function(e,t,n){(t=n(58)(!1)).push([e.i,"._3uuruv4Pt_yVYOLDPEqSof {\n width: 130%;\n margin: 30px;\n}\n",""]),t.locals={panel:"_3uuruv4Pt_yVYOLDPEqSof"},e.exports=t},169:function(e,t,n){var a=n(57),o=n(170);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var l={insert:"head",singleton:!1};a(o,l);e.exports=o.locals||{}},170:function(e,t,n){(t=n(58)(!1)).push([e.i,"._3eP8BKCw_9P3TtI7igZgGk {\n z-index: 100000;\n background-color: var(--omrs-color-interaction-minus-two);\n height: 40px !important;\n width: 40px !important;\n bottom: 10px;\n right: 8px;\n position: fixed;\n border-radius: 2px;\n}\n\n._1FTimJxULqRpytW9iorKVA {\n background-color: var(--omrs-color-danger);\n}\n",""]),t.locals={popupTriggerButton:"_3eP8BKCw_9P3TtI7igZgGk",triggerButtonAlert:"_1FTimJxULqRpytW9iorKVA"},e.exports=t},196:function(e,t,n){(t=n(58)(!1)).push([e.i,"._3cyQmg3Gkemf6WVOsgc22a {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(43, 43, 185, 0.1);\n border: 1px solid rgba(43, 43, 185, 0.4);\n pointer-events: none;\n}\n\n._3RyNSS9XYBibk4269zUVji {\n background-color: rgb(255, 255, 255, 0.85);\n border: 1px solid rgba(43, 43, 185, 0.4);\n color: #393939;\n position: absolute;\n bottom: 0;\n right: 0;\n padding: 0.5em 0.5em 0.5em 0.5em;\n pointer-events: none;\n}\n\n._2xisOu6tKf7-O6ZhRoYCcV {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: none;\n border: none;\n}\n\n._2xisOu6tKf7-O6ZhRoYCcV:hover {\n background-color: rgba(43, 43, 185, 0.1);\n}\n\n/* Show the tooltip text when you mouse over the tooltip container */\n._2xisOu6tKf7-O6ZhRoYCcV:focus .KpHVG1timhVRpvCCZ3wsy,\n._2xisOu6tKf7-O6ZhRoYCcV:hover .KpHVG1timhVRpvCCZ3wsy {\n visibility: visible;\n opacity: 1;\n}\n\n.KpHVG1timhVRpvCCZ3wsy {\n visibility: hidden;\n width: auto;\n background-color: rgb(255, 255, 255, 0.85);\n text-align: center;\n padding: 0.5em 0.5em 0.5em 0.5em;\n border: 1px solid rgba(43, 43, 185, 0.4);\n\n position: absolute;\n top: 0;\n left: 0;\n}\n",""]),t.locals={slotOverlay:"_3cyQmg3Gkemf6WVOsgc22a",slotName:"_3RyNSS9XYBibk4269zUVji",extensionOverlay:"_2xisOu6tKf7-O6ZhRoYCcV",extensionTooltip:"KpHVG1timhVRpvCCZ3wsy"},e.exports=t},226:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return et}));var a=n(28),o=n.n(a),l=n(12),r=n(119),i=n(230),s=n(224),c=n(225),u=n(141),m=n.n(u),d=n(116),p=n(162),f=n(164),g=n(163),b=n(223),v=n(89),E=n.n(v),h=n(220),y=n(221),_=n(222),O=n(202),x=n(135),j=n(95),k=n(200),N=n(108),C=n(158),S=n(144),w=n.n(S),M=n(157),I=n(90),V=n(219),B=n(228),T=n(227),F=n(150),A=n(146),W=n.n(A),P=n(215),D=n(217);function L({element:e,valueArray:t,setValue:n}){const r=Object(a.useMemo)(()=>Object(I.a)("array-editor-"),[]);return o.a.createElement(P.a,{className:W.a.arrayEditor},o.a.createElement(D.d,null,o.a.createElement(D.a,null,t.map((a,s)=>{var c,u;return o.a.createElement(D.c,{key:`${r}-${s}`},o.a.createElement(D.b,null,o.a.createElement($,{element:{...e._elements,_value:a,_source:e._source},valueType:null!==(c=null===(u=e._elements)||void 0===u?void 0:u._type)&&void 0!==c?c:l.Type.Object,value:a,onChange:e=>{const a=Object(N.a)(t);a[s]=e,n(a)}})),o.a.createElement(D.b,{className:W.a.buttonCell},o.a.createElement(i.a,{renderIcon:d.a,size:"sm",kind:"secondary",iconDescription:"Remove",hasIconOnly:!0,onClick:()=>{const e=Object(N.a)(t);e.splice(s,1),n(e)}})))}),o.a.createElement(D.c,null,o.a.createElement(D.b,null),o.a.createElement(D.b,{className:W.a.buttonCell},o.a.createElement(i.a,{renderIcon:F.a,size:"sm",iconDescription:"Add",hasIconOnly:!0,onClick:()=>{var a,o;const r=Object(N.a)(t),i=(null!==(a=null===(o=e._elements)||void 0===o?void 0:o._type)&&void 0!==a?a:l.Type.Object)==l.Type.Object?{}:null;r.push(i),n(r)}}))))))}var R=n(201);var K=n(151),q=n.n(K);function z({setConcept:e}){const[t,n]=Object(a.useState)(""),[r,i]=Object(a.useState)([]),[s,c]=Object(a.useState)(""),u=Object(a.useMemo)(()=>Object(I.a)(),[]),m=()=>{n(""),i([])},d=Object(R.a)(e=>{n(e)},300);return Object(a.useEffect)(()=>{const e=new AbortController;var n;return t&&t.length>=2?(n=t,Object(l.openmrsFetch)("/ws/rest/v1/concept/?q="+n,{method:"GET"})).then(({data:{results:e}})=>{i(e.slice(0,9))}):i([]),()=>e.abort()},[t]),o.a.createElement("div",{className:q.a.autocomplete},o.a.createElement("input",{type:"text",autoComplete:"off",autoCapitalize:"off","aria-autocomplete":"list",role:"combobox","aria-label":"Look up concept by name","aria-controls":"searchbox-"+u,"aria-expanded":r.length>0,placeholder:"Look up concept by name",autoFocus:!0,onChange:e=>{d(e.target.value)}}),o.a.createElement("div",{id:"searchbox-"+u},o.a.createElement("ul",{role:"listbox"},!!r.length&&r.map(t=>o.a.createElement("li",{key:t.uuid,role:"option",style:{padding:"5px"},onClick:()=>{(t=>{c(t.uuid),m(),e(t)})(t)},"aria-selected":"true"},t.display)),t&&r&&!r.length&&o.a.createElement("li",null,"No matching results found."))))}var Z=n(132);function J({value:e,setValue:t}){const[n,r]=Object(a.useState)([]);return Object(a.useEffect)(()=>{function e(e){r(Object.keys(e.extensions))}return e(l.extensionStore.getState()),l.extensionStore.subscribe(e)},[]),o.a.createElement(Z.a.Filterable,{id:"add-select",items:n.map(e=>({id:e,label:e})),placeholder:"Select extensions",onChange:e=>t(e.selectedItems.map(e=>e.id)),initialSelectedItems:e})}var U=n(29);function G({slotName:e,slotModuleName:t,value:n,setValue:a}){const{extensionIdBySlotByModule:r}=Object(l.useStore)(U.a);return o.a.createElement(Z.a.Filterable,{id:"add-select",items:r[t][e].map(e=>({id:e,label:e})),placeholder:"Select extensions",onChange:e=>a(e.selectedItems.map(e=>e.id)),initialSelectedItems:n})}var H=n(155),Q=n.n(H);function Y({element:e,valueObject:t,setValue:n}){return o.a.createElement(P.a,{className:Q.a.objectEditor},o.a.createElement(D.d,null,o.a.createElement(D.a,null,Object.entries(e).map(([a,r])=>a.startsWith("_")?null:o.a.createElement(D.c,null,o.a.createElement(D.b,null,o.a.createElement($,{element:{_value:a,_source:e._source},valueType:l.Type.String,value:a,onChange:e=>{const o=Object(N.a)(t);o[e]=Object(N.a)(t[a]),delete o[a],n(o)}})),o.a.createElement(D.b,null,o.a.createElement($,{element:{...r,_value:t[a],_source:e._source},valueType:r._type,value:t[a],onChange:e=>{const o=Object(N.a)(t);o[a]=e,n(o)}})))))))}function X({slotName:e,slotModuleName:t,value:n,setValue:a}){const{extensionIdBySlotByModule:r}=Object(l.useStore)(U.a);return o.a.createElement("div",null,"Todo: compose array with extension lookup")}function $({element:e,path:t,valueType:n,value:r,onChange:i}){const[s]=Object(a.useState)(Object(I.a)("value-editor-"));if("remove"===n&&!t)throw new Error("Programming error: ValueEditorField initialized for a 'remove' field, but no 'path' is available");return n===l.Type.Array?o.a.createElement(L,{element:e,valueArray:r,setValue:i}):n===l.Type.Boolean?o.a.createElement(V.a,{id:s,checked:r,hideLabel:!0,labelText:"",onChange:i}):n===l.Type.ConceptUuid?o.a.createElement(z,{setConcept:e=>i(e.uuid)}):n===l.Type.Number?o.a.createElement(B.a,{id:s,value:r,onChange:e=>i(Number(e.imaginaryTarget.value))}):n===l.Type.String||n===l.Type.UUID?o.a.createElement(T.a,{id:s,value:r,labelText:"",onChange:e=>i(e.target.value)}):"add"===n?o.a.createElement(J,{value:null!=r?r:e._value,setValue:i}):"remove"===n&&t?o.a.createElement(G,{slotName:t[2],slotModuleName:t[0],value:null!=r?r:e._value,setValue:i}):"order"===n&&t?o.a.createElement(X,{slotName:t[2],slotModuleName:t[0],value:null!=r?r:e._value,setValue:i}):"configure"===n&&t?o.a.createElement(o.a.Fragment,null,"Todo"):o.a.createElement(Y,{element:e,valueObject:r,setValue:i})}function ee({element:e,customType:t,path:n,handleSave:l,handleClose:s}){const c=Object(a.useRef)(null),[u,m]=Object(a.useState)(e._value),d=null!=t?t:e._type,p=e=>{"Escape"===e.key?s():"Enter"===e.key&&l(JSON.stringify(u))};return Object(a.useEffect)(()=>(document.addEventListener("keyup",p),()=>{document.removeEventListener("keyup",p)}),[u]),o.a.createElement("div",{ref:c,style:{display:"inherit"}},o.a.createElement($,{element:e,path:n,value:u,onChange:m,valueType:d}),o.a.createElement("div",{className:E.a.valueEditorButtons},o.a.createElement(i.a,{renderIcon:M.a,size:"sm",kind:"primary",iconDescription:"Save",hasIconOnly:!0,onClick:()=>l(JSON.stringify(u))}),o.a.createElement(i.a,{renderIcon:r.a,size:"sm",kind:"secondary",iconDescription:"Cancel",hasIconOnly:!0,onClick:s})))}function te({value:e}){return o.a.createElement(o.a.Fragment,null,Array.isArray(e)?"object"==typeof e[0]?e.map(e=>o.a.createElement("div",{style:{marginBottom:"1em"}},o.a.createElement(te,{value:e}))):e.join(", "):"object"==typeof e&&null!==e?Object.entries(e).map(([e,t])=>o.a.createElement("div",null,e,": ",o.a.createElement(te,{value:t}))):"string"==typeof e||"number"==typeof e?e:null==e?"none":JSON.stringify(e))}function ne({path:e,element:t,customType:n}){const[r,s]=Object(a.useState)(),[c,u]=Object(a.useState)(!1),[m,d]=Object(a.useState)(null),p=Object(a.useRef)(null),f=()=>{u(!1),d(null)};return Object(a.useEffect)(()=>{const t=t=>{t.configPathBeingEdited&&Object(j.a)(t.configPathBeingEdited,e)&&p&&p.current&&(u(!0),p.current.focus())};return t(U.a.getState()),U.a.subscribe(t)},[]),Object(a.useEffect)(()=>{const n=U.a.getState();c&&!Object(j.a)(n.configPathBeingEdited,e)&&U.a.setState({configPathBeingEdited:e,activeItemDescription:{path:e,source:t._source,description:t._description,value:r}}),!c&&Object(j.a)(n.configPathBeingEdited,e)&&U.a.setState({configPathBeingEdited:null})},[c]),o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:w.a.line},c?o.a.createElement(o.a.Fragment,null,o.a.createElement(ee,{element:t,customType:n,path:e,handleClose:f,handleSave:t=>{try{const n=JSON.parse(t),a=function e(t,n,a){var o;n.length>1?t[n[0]]=e(null!==(o=t[n[0]])&&void 0!==o?o:{},n.slice(1),a):t[n[0]]=a;return t}(Object(N.a)(l.temporaryConfigStore.getState()),["config",...e],n);l.temporaryConfigStore.setState(a),s(t),f()}catch(e){console.warn(e),d("That's not formatted quite right. Try again.")}}})):o.a.createElement(o.a.Fragment,null,o.a.createElement("button",{className:`${w.a.secretButton} ${"temporary config"==t._source?w.a.overriddenValue:""}`,onClick:()=>u(!0),ref:p},o.a.createElement(te,{value:t._value})),"temporary config"==t._source?o.a.createElement(i.a,{style:{marginLeft:"1em"},renderIcon:C.a,size:"sm",kind:"tertiary",iconDescription:"Reset to default",hasIconOnly:!0,onClick:()=>{l.temporaryConfigStore.setState(Object(k.a)(l.temporaryConfigStore.getState(),["config",...e]))}}):null),m&&o.a.createElement("div",{className:w.a.error},m)))}function ae({moduleName:e,slotName:t,config:n}){return o.a.createElement(ne,{path:[e,t,"configure"],element:n&&Object.keys(n).length?{_value:n,_source:"",_default:{}}:{_value:void 0,_source:"default",_default:{}},customType:"configure"})}var oe=n(121),le=n.n(oe);function re({leaf:e,label:t,children:n,onMouseEnter:a,onMouseLeave:l}){return e?o.a.createElement(D.c,{className:le.a.structuredListRow,onMouseEnter:a,onMouseLeave:l},o.a.createElement(D.b,{className:le.a.labelCell},t),o.a.createElement(D.b,null,n)):o.a.createElement(o.a.Fragment,null,o.a.createElement(D.c,{className:le.a.structuredListRow,onMouseEnter:a,onMouseLeave:l},o.a.createElement(D.b,{className:le.a.labelCell},t),o.a.createElement(D.b,null)),o.a.createElement(D.c,{className:le.a.structuredListRow},o.a.createElement(D.b,null),o.a.createElement(D.b,{className:le.a.subtreeCell},o.a.createElement(D.d,{className:le.a.structuredList},o.a.createElement(D.a,null,n)))))}function ie({config:e,moduleName:t}){const{extensionIdBySlotByModule:n}=Object(l.useStore)(U.a),a=Object.keys(n[t]||{});return a.length?o.a.createElement(re,{label:"extension slots",leaf:!1},a.map(n=>o.a.createElement(se,{config:null==e?void 0:e[n],path:[t,"extensions",n]}))):null}function se({config:e,path:t}){const[n,r]=Object(a.useState)([]),i=t[0],s=t[2];function c(e){var t;const n=U.a.getState();Object(j.a)(null===(t=n.activeItemDescription)||void 0===t?void 0:t.path,e)&&!Object(j.a)(n.configPathBeingEdited,e)&&U.a.setState({activeItemDescription:void 0})}return Object(a.useEffect)(()=>{function e(e){var t,n,a;r(null===(t=e.slots[s])||void 0===t||null===(n=t.instances)||void 0===n||null===(a=n[i])||void 0===a?void 0:a.assignedIds)}return e(l.extensionStore.getState()),l.extensionStore.subscribe(e)},[]),o.a.createElement(re,{label:s,leaf:!1,onMouseEnter:()=>function(e,t){U.a.getState().configPathBeingEdited||U.a.setState({activeItemDescription:{path:[e,t],value:n}})}(i,s),onMouseLeave:()=>c([i,s])},["add","remove","order","configure"].map(n=>{var a,l;return o.a.createElement(re,{label:n,key:t.join(".")+n,leaf:!0,onMouseEnter:()=>function(e,t,n,a){U.a.getState().configPathBeingEdited||U.a.setState({activeItemDescription:{path:[e,t,n],source:null==a?void 0:a._source,description:{add:"Add an extension to this slot.",remove:"Remove an extension from this slot.",order:"Reorder the extensions in this slot.",configure:"Pass a configuration object directly to one of the extensions in this slot."}[n],value:JSON.stringify(null==a?void 0:a._value)}})}(i,s,n,null==e?void 0:e[n]),onMouseLeave:()=>c([i,s,n])},"configure"===n?o.a.createElement(ae,{moduleName:i,slotName:s,config:null==e||null===(a=e.configure)||void 0===a?void 0:a._value}):o.a.createElement(ne,{path:t.concat([n]),element:null!==(l=null==e?void 0:e[n])&&void 0!==l?l:{_value:void 0,_source:"default",_default:[]},customType:n}))}))}function ce({config:e,path:t=[]}){return o.a.createElement(o.a.Fragment,null,Object.entries(e).map(([e,n],a)=>{const l=t.concat([e]),r=n.hasOwnProperty("_value")||n.hasOwnProperty("_type");return o.a.createElement(re,{label:e,leaf:r,onMouseEnter:()=>function(e,t,n){U.a.getState().configPathBeingEdited||U.a.setState({activeItemDescription:{path:e,source:n._source,description:n._description,value:JSON.stringify(n._value)}})}(l,0,n),onMouseLeave:()=>function(e){var t;const n=U.a.getState();Object(j.a)(null===(t=n.activeItemDescription)||void 0===t?void 0:t.path,e)&&!Object(j.a)(n.configPathBeingEdited,e)&&U.a.setState({activeItemDescription:void 0})}(l),key:"subtree-"+l.join(".")},r?o.a.createElement(ne,{path:l,element:n}):o.a.createElement(ce,{config:n,path:l}))}))}var ue=n(198);function me({children:e}){return o.a.createElement(D.d,{className:le.a.structuredList},o.a.createElement(D.a,null,e))}function de({config:e,moduleName:t}){return o.a.createElement(me,null,o.a.createElement(ie,{config:e.extensions,moduleName:t}),o.a.createElement(ce,{config:Object(ue.a)(e,(e,t)=>"extensions"!==t),path:[t]}))}function pe({config:e}){const{extensionIdBySlotByModule:t}=Object(l.useStore)(U.a);return o.a.createElement("div",null,o.a.createElement(O.a,{align:"start"},e&&Object.keys(e).sort().map(n=>{const a=e[n];return Object.keys(a).length||t[n]?o.a.createElement(x.a,{title:o.a.createElement("h6",{className:E.a.moduleName},n),className:E.a.fullWidthAccordion,key:"accordion-"+n},o.a.createElement("div",{key:n+"-config"},o.a.createElement(de,{config:a,moduleName:n}))):null})))}var fe=n(160),ge=n.n(fe);function be(){const{activeItemDescription:e}=Object(l.useStore)(U.a);return o.a.createElement("div",null,e?o.a.createElement(o.a.Fragment,null,o.a.createElement("p",{className:ge.a.path},e.path.slice(1).join(" → ")),o.a.createElement("p",{className:ge.a.description},e.description),o.a.createElement("p",{className:ge.a.source},"default"===e.source?o.a.createElement(o.a.Fragment,null,"The current value is the default."):e.source?o.a.createElement(o.a.Fragment,null,"The current value comes from ",e.source,"."):null),e.value?o.a.createElement("p",null,"Value:"):null,o.a.createElement("p",{className:ge.a.value},Array.isArray(e.value)?e.value.map(e=>o.a.createElement("p",{key:e},e)):e.value)):null)}const ve={toggleIsUIEditorEnabled:({isUIEditorEnabled:e})=>({isUIEditorEnabled:!e}),toggleIsToolbarOpen:({isConfigToolbarOpen:e})=>({isConfigToolbarOpen:!e})},Ee={toggleDevDefaults:({devDefaultsAreOn:e})=>({devDefaultsAreOn:!e})};function he({setHasAlert:e}){const{isUIEditorEnabled:t,toggleIsUIEditorEnabled:n,isConfigToolbarOpen:a,toggleIsToolbarOpen:r}=Object(l.useStore)(U.a,ve),{devDefaultsAreOn:s,toggleDevDefaults:c}=Object(l.useStore)(l.configInternalStore,Ee),{config:u}=Object(l.useStore)(l.implementerToolsConfigStore),m=Object(l.useStore)(l.temporaryConfigStore).config,f=new Blob([JSON.stringify(m,void 0,2)],{type:"application/json"});return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:E.a.tools},a?o.a.createElement(h.a,{style:{margin:"0.25rem",padding:"0.5em 1.5em"}},o.a.createElement(y.a,null,o.a.createElement(_.a,{sm:1,md:1},o.a.createElement(b.a,{id:"devConfigSwitch",labelText:"Dev Config",onToggle:c,toggled:s})),o.a.createElement(_.a,{sm:1,md:1,className:E.a.actionButton},o.a.createElement(b.a,{id:"uiEditorSwitch",labelText:"UI Editor",toggled:t,onToggle:n})),o.a.createElement(_.a,{sm:1,md:2,className:E.a.actionButton},o.a.createElement(i.a,{kind:"danger",iconDescription:"Clear temporary config",renderIcon:d.a,onClick:()=>{l.temporaryConfigStore.setState({config:{}})}},"Clear Temporary Config")),o.a.createElement(_.a,{sm:1,md:2,className:E.a.actionButton},o.a.createElement(i.a,{kind:"secondary",iconDescription:"Download temporary config",renderIcon:p.a},o.a.createElement("a",{className:E.a.downloadLink,download:"temporary_config.json",href:window.URL.createObjectURL(f)},"Download Temporary Config"))))):null,o.a.createElement("div",{className:E.a.toggleToolbarButton},o.a.createElement(ye,{isConfigToolbarOpen:a,toggleIsToolbarOpen:r}))),o.a.createElement("div",{className:E.a.mainContent,style:{marginTop:a?"72px":"25px",height:a?"calc(50vh - 114px)":"calc(50vh - 68px)"}},o.a.createElement("div",{className:E.a.configTreePane},o.a.createElement(pe,{config:u})),o.a.createElement("div",{className:E.a.descriptionPane},o.a.createElement(be,null))))}function ye({isConfigToolbarOpen:e,toggleIsToolbarOpen:t}){return o.a.createElement(i.a,{hasIconOnly:!0,renderIcon:e?g.a:f.a,onClick:t,kind:"ghost",size:"small",iconDescription:(e?"Hide":"Show")+" toolbar"})}var _e=n(165),Oe=n.n(_e),xe=n(197),je=n(125),ke=n(123),Ne=n(126),Ce=n(127),Se=n(134),we=n(124),Me=n(79);const Ie=({modulesWithMissingBackendModules:e,modulesWithWrongBackendModulesVersion:t,setHasAlert:n})=>{const[l,r]=Object(a.useState)([]);Object(a.useEffect)(()=>{(e.length||t.length)&&(r(function(e,t){let n=[];return[...e.map(e=>{const a=t.find(t=>t.moduleName===e.moduleName);let o=[];a&&(o=a.backendModules.map(e=>({name:e.uuid,requiredVersion:e.version,type:"missing"})),n.push(a));const l=e.backendModules.map(e=>({name:e.uuid,installedVersion:e.version,requiredVersion:e.requiredVersion,type:"version-mismatch"}));return{name:e.moduleName,unresolvedDeps:[...l,...o]}}),...t.filter(e=>!n.includes(e)).map(e=>{const t=e.backendModules.map(e=>({name:e.uuid,requiredVersion:e.version,type:"missing"}));return{name:e.moduleName,unresolvedDeps:t}})]}(t,e)),n(!0))},[e,t]);return o.a.createElement("div",{className:Oe.a.panel},o.a.createElement("div",null,o.a.createElement(xe.a,{rows:[],headers:[{key:"name",header:"Module Name"},{key:"installedVersion",header:"Installed Version"},{key:"requiredVersion",header:"Required Version"}]},({headers:e,getTableProps:t,getHeaderProps:n})=>o.a.createElement(je.a,{title:""},o.a.createElement(ke.a,t(),o.a.createElement(Ne.a,null,o.a.createElement(Ce.a,null,e.map(e=>o.a.createElement(Se.a,n({header:e}),e.header)))),o.a.createElement(we.a,null,l.map((e,t)=>o.a.createElement(a.Fragment,{key:e.name},o.a.createElement(Ce.a,null,o.a.createElement(Me.a,null,o.a.createElement("strong",null,e.name)),o.a.createElement(Me.a,null),o.a.createElement(Me.a,null)),e.unresolvedDeps.map(e=>o.a.createElement(Ce.a,{key:e.name},o.a.createElement(Me.a,null,e.name),o.a.createElement(Me.a,null,"missing"===e.type?o.a.createElement("span",{style:{color:"red"}},"Missing"):e.installedVersion),o.a.createElement(Me.a,null,e.requiredVersion)))))))))))};function Ve(e){const[t,n]=Object(a.useState)(!1),[l,u]=Object(a.useState)(!1),[d,p]=Object(a.useState)(0);return Object(a.useEffect)(()=>{e.setHasAlert(t||l)},[l,t]),o.a.createElement("div",{className:m.a.popup},o.a.createElement("div",{className:m.a.topBar},o.a.createElement("div",{className:m.a.tabs},o.a.createElement(s.a,{onChange:e=>{p(e.index)}},o.a.createElement(c.a,{name:"configuration-tab",text:"Configuration",onClick:()=>{},onKeyDown:()=>{}}),o.a.createElement(c.a,{name:"backend-modules-tab",text:"Backend Modules",onClick:()=>{},onKeyDown:()=>{}}))),o.a.createElement("div",null,o.a.createElement(i.a,{className:m.a.closeButton,kind:"secondary",renderIcon:r.a,iconDescription:"Close",onClick:e.close,hasIconOnly:!0}))),o.a.createElement("div",{className:m.a.content},0==d?o.a.createElement(he,{setHasAlert:n}):o.a.createElement(Ie,{setHasAlert:u,modulesWithMissingBackendModules:e.modulesWithMissingBackendModules,modulesWithWrongBackendModulesVersion:e.modulesWithWrongBackendModulesVersion})))}var Be=n(169),Te=n.n(Be),Fe=n(171),Ae=n(199);const We=[],Pe=[],De=[];let Le;async function Re(){try{const e=await Object(l.openmrsFetch)("/ws/rest/v1/module?v=custom:(uuid,version)",{method:"GET"});We.push(...e.data.results)}catch(e){setTimeout(()=>{throw e})}}async function Ke(){var e;if(Le)return Le;const t=(null!==(e=window.installedModules)&&void 0!==e?e:[]).filter(e=>e[1].backendDependencies).map(e=>({backendDependencies:e[1].backendDependencies,moduleName:e[0]}));return await Re(),t.forEach(e=>function(e){const t=function(e){const t=Object.keys(e),n=We.map(e=>e.uuid);return Object(Ae.a)(t,n).map(t=>({uuid:t,version:e[t]}))}(e.backendDependencies),n=(a=e.backendDependencies,Object.keys(a).map(e=>({uuid:e,version:a[e]})).filter(e=>We.find(t=>e.uuid===t.uuid)));var a;t.length>0&&Pe.push({moduleName:e.moduleName,backendModules:t});n.length>0&&De.push({moduleName:e.moduleName,backendModules:qe(n)})}(e)),Le={modulesWithMissingBackendModules:Pe,modulesWithWrongBackendModulesVersion:De},Le}function qe(e){let t=[];for(let n in e){const a=We[n].version,o=e[n].version,l=e[n].uuid;ze(o,a)||t.push({uuid:l,requiredVersion:o,version:a})}return t}function ze(e,t){return Fe.eq(Fe.coerce(e),Fe.coerce(t))}var Ze=n(229),Je=n(131),Ue=n.n(Je),Ge=n(52);function He({el:e,children:t}){return e?Object(Ge.createPortal)(t,e):null}function Qe({extensionName:e,slotModuleName:t,slotName:n,domElement:l}){const[r,i]=Object(a.useState)();return Object(a.useEffect)(()=>{if(l){var e;const t=document.createElement("div");null===(e=l.parentElement)||void 0===e||e.appendChild(t),i(t)}},[l]),r?o.a.createElement(He,{key:`extension-overlay-${t}-${n}-${e}`,el:r},o.a.createElement(Ye,{extensionId:e})):null}function Ye({extensionId:e}){return o.a.createElement("button",{className:Ue.a.extensionOverlay},o.a.createElement("span",{className:Ue.a.extensionTooltip},e))}function Xe(){const{slots:e,extensions:t}=Object(l.useExtensionStore)();return o.a.createElement(o.a.Fragment,null,e?Object.entries(e).map(([e,t])=>Object.entries(t.instances).map(([t,n])=>o.a.createElement(He,{key:`slot-overlay-${t}-${e}`,el:n.domElement},o.a.createElement($e,{slotName:e})))):null,t?Object.entries(t).map(([e,t])=>Object.entries(t.instances).map(([t,n])=>Object.entries(n).map(([n,a])=>o.a.createElement(Qe,{extensionName:e,slotModuleName:t,slotName:n,domElement:a.domElement})))):null)}function $e({slotName:e}){return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:Ue.a.slotOverlay}),o.a.createElement("div",{className:Ue.a.slotName},e))}function et(){return o.a.createElement(l.UserHasAccess,{privilege:"coreapps.systemAdministration"},o.a.createElement(tt,null))}function tt(){const[e,t]=Object(a.useState)(!1),[n,r]=Object(a.useState)(0),[i,s]=Object(a.useState)([]),[c,u]=Object(a.useState)([]),{isOpen:m,isUIEditorEnabled:d}=Object(l.useStore)(U.a);function p(){U.a.setState({isOpen:!m})}return Object(a.useEffect)(()=>{Ke().then(({modulesWithMissingBackendModules:e,modulesWithWrongBackendModulesVersion:t})=>{s(e),u(t)})},[]),Object(a.useEffect)(()=>{if(!i.length&&!c.length)return;Object(l.showToast)({description:"Found modules with unresolved backend dependencies.",action:o.a.createElement(Ze.a,{onClick:()=>(r(1),m||p(),!1)},"View"),kind:"error"})},[i,c]),o.a.createElement(o.a.Fragment,null,o.a.createElement("button",{onClick:p,className:`${Te.a.popupTriggerButton} ${e?Te.a.triggerButtonAlert:""}`}),m?o.a.createElement(Ve,{close:p,setHasAlert:t,modulesWithMissingBackendModules:i,modulesWithWrongBackendModulesVersion:c,visibleTabIndex:n}):null,d?o.a.createElement(Xe,null):null)}},89:function(e,t,n){var a=n(57),o=n(143);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var l={insert:"head",singleton:!1};a(o,l);e.exports=o.locals||{}}}]);
|
|
2
|
-
//# sourceMappingURL=2.openmrs-esm-implementer-tools-app.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./src/configuration/layout/layout.styles.css?4e25","webpack:///./src/ui-editor/styles.css?12fc","webpack:///./src/popup/popup.styles.css?f491","webpack:///./src/popup/popup.styles.css","webpack:///./src/configuration/configuration.styles.css","webpack:///./src/configuration/editable-value.styles.css?da97","webpack:///./src/configuration/editable-value.styles.css","webpack:///./src/configuration/value-editors/array-editor.styles.css?4089","webpack:///./src/configuration/value-editors/array-editor.styles.css","webpack:///./src/configuration/value-editors/concept-search.styles.css?a1e9","webpack:///./src/configuration/value-editors/concept-search.styles.css","webpack:///./src/configuration/value-editors/object-editor.styles.css?40f6","webpack:///./src/configuration/value-editors/object-editor.styles.css","webpack:///./src/configuration/layout/layout.styles.css","webpack:///./src/configuration/description.styles.css?8c28","webpack:///./src/configuration/description.styles.css","webpack:///./src/backend-dependencies/backend-dependencies-style.css?d3cc","webpack:///./src/backend-dependencies/backend-dependencies-style.css","webpack:///./src/implementer-tools.styles.css?c075","webpack:///./src/implementer-tools.styles.css","webpack:///./src/ui-editor/styles.css","webpack:///./src/configuration/value-editors/array-editor.tsx","webpack:///./src/configuration/value-editors/concept-search.tsx","webpack:///./src/configuration/value-editors/concept-search.resource.tsx","webpack:///./src/configuration/value-editors/extension-slot-add.tsx","webpack:///./src/configuration/value-editors/extension-slot-remove.tsx","webpack:///./src/configuration/value-editors/object-editor.tsx","webpack:///./src/configuration/value-editors/extension-slot-order.tsx","webpack:///./src/configuration/value-editors/value-editor-field.tsx","webpack:///./src/configuration/value-editor.tsx","webpack:///./src/configuration/display-value.tsx","webpack:///./src/configuration/editable-value.component.tsx","webpack:///./src/configuration/extension-configure-tree.tsx","webpack:///./src/configuration/layout/subtree.component.tsx","webpack:///./src/configuration/extension-slots-config-tree.tsx","webpack:///./src/configuration/config-subtree.component.tsx","webpack:///./src/configuration/layout/tree-container.component.tsx","webpack:///./src/configuration/config-tree-for-module.component.tsx","webpack:///./src/configuration/config-tree.component.tsx","webpack:///./src/configuration/description.component.tsx","webpack:///./src/configuration/configuration.component.tsx","webpack:///./src/backend-dependencies/backend-dependecies.component.tsx","webpack:///./src/backend-dependencies/helpers/backend-dependecies-helper.ts","webpack:///./src/popup/popup.component.tsx","webpack:///./src/backend-dependencies/openmrs-backend-dependencies.ts","webpack:///./src/ui-editor/portal.tsx","webpack:///./src/ui-editor/extension-overlay.component.tsx","webpack:///./src/ui-editor/ui-editor.tsx","webpack:///./src/implementer-tools.component.tsx","webpack:///./src/configuration/configuration.styles.css?c42b"],"names":["api","content","__esModule","default","module","i","options","exports","locals","___CSS_LOADER_API_IMPORT___","push","ArrayEditor","element","valueArray","setValue","arrayKey","useMemo","uniqueId","Tile","className","styles","arrayEditor","StructuredList","map","value","key","ValueEditorField","_elements","_value","_source","valueType","_type","Type","Object","onChange","newValue","newValueArray","cloneDeep","buttonCell","Button","renderIcon","TrashCan16","size","kind","iconDescription","hasIconOnly","onClick","splice","Add16","ConceptSearchBox","setConcept","searchTerm","setSearchTerm","useState","searchResults","setSearchResults","activeConceptUuid","setActiveConceptUuid","id","resetSearch","handleSearchTermChange","debounce","useEffect","ac","AbortController","query","length","openmrsFetch","method","then","data","results","slice","abort","autocomplete","type","autoComplete","autoCapitalize","aria-autocomplete","role","aria-label","aria-controls","aria-expanded","placeholder","autoFocus","$event","target","concept","uuid","style","padding","handleUuidChange","aria-selected","display","ExtensionSlotAdd","availableExtensions","setAvailableExtensions","update","state","keys","extensions","extensionStore","getState","subscribe","MultiSelect","Filterable","items","name","label","selectedItems","v","initialSelectedItems","ExtensionSlotRemove","slotName","slotModuleName","extensionIdBySlotByModule","useStore","implementerToolsStore","ObjectEditor","valueObject","objectEditor","entries","schema","startsWith","String","newKey","newValueObject","ExtensionSlotOrder","path","Error","Array","Boolean","Checkbox","checked","hideLabel","labelText","ConceptUuid","Number","NumberInput","e","imaginaryTarget","UUID","TextInput","ValueEditor","customType","handleSave","handleClose","ref","useRef","tmpValue","setTmpValue","keyListener","JSON","stringify","document","addEventListener","removeEventListener","valueEditorButtons","Save16","Close16","DisplayValue","isArray","marginBottom","join","k","EditableValue","valueString","setValueString","editing","setEditing","error","setError","activeConfigRef","closeEditor","configPathBeingEdited","isEqual","current","focus","setState","activeItemDescription","source","description","_description","line","val","result","parse","tempConfigUpdate","set","obj","temporaryConfigStore","console","warn","secretButton","overriddenValue","marginLeft","Reset16","unset","ExtensionConfigureTree","moduleName","config","_default","undefined","Subtree","leaf","children","onMouseEnter","onMouseLeave","structuredListRow","labelCell","subtreeCell","structuredList","ExtensionSlotsConfigTree","extensionSlotNames","ExtensionSlotConfigTree","assignedExtensions","setAssignedExtensions","removeActiveItemDescriptionOnMouseLeave","thisPath","slots","instances","assignedIds","setActiveExtensionSlotOnMouseEnter","add","remove","order","configure","setActiveItemDescriptionOnMouseEnter","concat","ConfigSubtree","isLeaf","hasOwnProperty","TreeContainer","ConfigTreeForModule","pickBy","ConfigTree","Accordion","align","sort","moduleConfig","AccordionItem","title","fullWidthAccordion","Description","actions","toggleIsUIEditorEnabled","isUIEditorEnabled","toggleIsToolbarOpen","isConfigToolbarOpen","configActions","toggleDevDefaults","devDefaultsAreOn","Configuration","setHasAlert","configInternalStore","implementerToolsConfigStore","tempConfig","tempConfigObjUrl","Blob","tools","Grid","margin","Row","Column","sm","md","Toggle","onToggle","toggled","actionButton","Download16","downloadLink","download","href","window","URL","createObjectURL","toggleToolbarButton","OpenOrCloseButton","mainContent","marginTop","height","configTreePane","descriptionPane","ChevronUp16","ChevronDown16","ModuleDiagnostics","modulesWithMissingBackendModules","modulesWithWrongBackendModulesVersion","unresolvedDeps","setUnresolvedDeps","similarEsms","m","similarEsm","find","x","leavesForSimilarEsm","backendModules","requiredVersion","version","leaves","installedVersion","filter","includes","parseUnresolvedDeps","panel","DataTable","rows","headers","header","getTableProps","getHeaderProps","TableContainer","Table","TableHead","TableRow","TableHeader","TableBody","esm","index","TableCell","dep","color","Popup","props","configHasAlert","setConfigHasAlert","diagnosticsHasAlert","setDiagnosticsHasAlert","activeTab","setActiveTab","popup","topBar","tabs","ContentSwitcher","c","Switch","text","onKeyDown","closeButton","close","installedBackendModules","memorizedUnresolvedsBackendDeps","async","initInstalledBackendModules","response","err","setTimeout","checkModules","modules","installedModules","backendDependencies","forEach","missingBackendModule","requiredBackendModules","requiredBackendModulesUuids","installedBackendModuleUuids","res","difference","getMissingBackendModules","installedAndRequiredModules","requiredModule","installedModule","getMisMatchedBackendModules","checkIfModulesAreInstalled","installedAndRequiredBackendModules","misMatchedBackendModules","isVersionInstalled","semver","Portal","el","createPortal","ExtensionOverlay","extensionName","domElement","overlayDomElement","setOverlayDomElement","newOverlayDomElement","createElement","parentElement","appendChild","Content","extensionId","extensionOverlay","extensionTooltip","UiEditor","useExtensionStore","slotInfo","slotInstance","SlotOverlay","extensionInfo","bySlotName","extensionInstance","slotOverlay","ImplementerTools","privilege","PopupHandler","hasAlert","visibleTabIndex","setVisibleTabIndex","setModulesWithMissingBackendModules","setModulesWithWrongBackendModulesVersion","isOpen","togglePopup","showToast","action","Notification","popupTriggerButton","triggerButtonAlert"],"mappings":"6EAAA,IAAIA,EAAM,EAAQ,IACFC,EAAU,EAAQ,KAIC,iBAFvBA,EAAUA,EAAQC,WAAaD,EAAQE,QAAUF,KAG/C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8N,EAAsC9N,OAGxC,OAUFkV,oBAAU,CACR/N,YAAa,sDACbgO,OACE,kBAACC,GAAA,EAAD,CAA0BxW,QAXA,KAC5BiW,EAAmB,GACdG,GACHC,KAEK,IAML,QAIFxW,KAAM,WAEP,CAACoP,EAAkCC,IAGpC,oCACE,4BACElP,QAASqW,EACThY,UAAY,GAAEC,KAAOmY,sBACnBV,EAAWzX,KAAOoY,mBAAqB,OAG1CN,EACC,kBAAC/E,GAAD,CACEiB,MAAO+D,EACPtJ,YAAaA,EACbkC,iCAAkCA,EAClCC,sCACEA,EAEF8G,gBAAiBA,IAEjB,KACHxJ,EAAoB,kBAAC2I,GAAD,MAAe,Q,mBCpG1C,IAAIjY,EAAM,EAAQ,IACFC,EAAU,EAAQ,KAIC,iBAFvBA,EAAUA,EAAQC,WAAaD,EAAQE,QAAUF,KAG/CA,EAAU,CAAC,CAACG,EAAOC,EAAIJ,EAAS,MAG9C,IAAIK,EAAU,CAEd,OAAiB,OACjB,WAAoB,GAEPN,EAAIC,EAASK,GAI1BF,EAAOG,QAAUN,EAAQO,QAAU","file":"2.openmrs-esm-implementer-tools-app.js","sourcesContent":["var api = require(\"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js??ref--7-1!./layout.styles.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","var api = require(\"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js??ref--7-1!./styles.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","var api = require(\"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js??ref--7-1!./popup.styles.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"._1Ayf60UdSpBRqA1EEcFhMx {\\n position: fixed;\\n bottom: 0;\\n left: 0;\\n width: 100%;\\n height: 50%;\\n z-index: 100000;\\n background-color: #d0d0d0;\\n border-top: 2px solid #404050;\\n color: #222;\\n display: flex;\\n flex-direction: column;\\n justify-content: space-between;\\n align-items: flex-start;\\n box-sizing: border-box;\\n font-family: sans serif;\\n overflow-y: auto;\\n}\\n\\n._9564e3pCax4M6JkAZ66LR {\\n margin-top: 40px;\\n width: 100%;\\n}\\n\\n._1Jwt3NPr3regy33Xkl6d0W {\\n width: 30em;\\n}\\n\\n._2qArfSC3xnWI_x3yYrKRp5 {\\n position: fixed;\\n width: 100%;\\n height: 42px;\\n display: flex;\\n justify-content: space-between;\\n border-bottom: 1px solid #a0a0a0;\\n z-index: 2;\\n}\\n\\n._2ijbe5ewzzeFLftP1nW8Fr {\\n min-height: 3em;\\n padding: 0 1em;\\n}\\n\\n._2qArfSC3xnWI_x3yYrKRp5 .bx--content-switcher-btn:first-child,\\n._2qArfSC3xnWI_x3yYrKRp5 .bx--content-switcher-btn:last-child {\\n border-top-left-radius: 0;\\n border-bottom-left-radius: 0;\\n border-top-right-radius: 0;\\n border-bottom-right-radius: 0;\\n}\\n\", \"\"]);\n// Exports\nexports.locals = {\n\t\"popup\": \"_1Ayf60UdSpBRqA1EEcFhMx\",\n\t\"content\": \"_9564e3pCax4M6JkAZ66LR\",\n\t\"tabs\": \"_1Jwt3NPr3regy33Xkl6d0W\",\n\t\"topBar\": \"_2qArfSC3xnWI_x3yYrKRp5\",\n\t\"closeButton\": \"_2ijbe5ewzzeFLftP1nW8Fr\"\n};\nmodule.exports = exports;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"._3CbKuFsDeC-_p1UpmHFzMi {\\n position: fixed;\\n width: 100%;\\n background-color: #e0e0e0;\\n border-bottom: 1px solid #a0a0a0;\\n border-top: 1px solid #c0c0c0;\\n z-index: 2;\\n}\\n\\n._3CbKuFsDeC-_p1UpmHFzMi > div {\\n flex: 0 1 auto;\\n}\\n\\n._1uWtA9PWbIGd8yBBW-KBi- {\\n display: inline-flex;\\n align-items: center;\\n}\\n\\n._20lnyaVgwu2KFvC40pqIcI {\\n text-decoration: none;\\n color: inherit;\\n}\\n\\n._37uZ0pr4NAGyQ6vWjAWZrd {\\n background-color: #f0f0f0;\\n width: 100%;\\n display: flex;\\n overflow-y: auto;\\n}\\n\\n._2AO9Ks7NJEIHDaq9zQixzr {\\n width: 55%;\\n overflow-wrap: break-word;\\n overflow-x: hidden;\\n overflow-y: scroll;\\n}\\n\\n._338-zNGO7spkC4rH0u9psF {\\n width: 45%;\\n background-color: #e0e0e0;\\n color: #424242;\\n padding: 1em 2em;\\n font-size: 12pt;\\n overflow-wrap: break-word;\\n overflow-y: scroll;\\n}\\n\\n._2AO9Ks7NJEIHDaq9zQixzr .bx--text-input-wrapper {\\n min-width: 8em;\\n}\\n\\n.inGvCqOxdR_cFm-9Phjj_ .bx--accordion__content {\\n padding-right: 0;\\n}\\n\\n.jb4ugOoVj7XcCU9YRfS9s {\\n position: absolute;\\n left: 97vw;\\n top: -2px;\\n}\\n\\n.L-2i-IWmSl9QOOtZWNW_7 {\\n width: 25em;\\n}\\n\\n._2N9mCDaqEn8MjoJMMzOVkw {\\n height: 2.5rem;\\n min-width: 5em;\\n margin-left: 1em;\\n}\\n\", \"\"]);\n// Exports\nexports.locals = {\n\t\"tools\": \"_3CbKuFsDeC-_p1UpmHFzMi\",\n\t\"actionButton\": \"_1uWtA9PWbIGd8yBBW-KBi-\",\n\t\"downloadLink\": \"_20lnyaVgwu2KFvC40pqIcI\",\n\t\"mainContent\": \"_37uZ0pr4NAGyQ6vWjAWZrd\",\n\t\"configTreePane\": \"_2AO9Ks7NJEIHDaq9zQixzr\",\n\t\"descriptionPane\": \"_338-zNGO7spkC4rH0u9psF\",\n\t\"fullWidthAccordion\": \"inGvCqOxdR_cFm-9Phjj_\",\n\t\"toggleToolbarButton\": \"jb4ugOoVj7XcCU9YRfS9s\",\n\t\"valueEditorInput\": \"L-2i-IWmSl9QOOtZWNW_7\",\n\t\"valueEditorButtons\": \"_2N9mCDaqEn8MjoJMMzOVkw\"\n};\nmodule.exports = exports;\n","var api = require(\"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js??ref--7-1!./editable-value.styles.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"._2NqeFbzQeg_2fP3tf8eSb5 {\\n background: none;\\n color: #474b6b;\\n border: none;\\n font: inherit;\\n text-align: left;\\n}\\n\\n._3V3NQGmIjxEWhiqjC_pyP8 {\\n margin-left: 1em;\\n color: orange;\\n font-size: 11pt;\\n}\\n\\n._1hvpyO7iwXlumeoE6tJ0P8 {\\n color: #2020a0;\\n}\\n\", \"\"]);\n// Exports\nexports.locals = {\n\t\"secretButton\": \"_2NqeFbzQeg_2fP3tf8eSb5\",\n\t\"error\": \"_3V3NQGmIjxEWhiqjC_pyP8\",\n\t\"overriddenValue\": \"_1hvpyO7iwXlumeoE6tJ0P8\"\n};\nmodule.exports = exports;\n","var api = require(\"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js??ref--7-1!./array-editor.styles.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".Udme2PvAx8NGskbfrVj5k .bx--structured-list-td {\\n padding: 0.25rem 3rem 0.25rem 1rem;\\n}\\n\\n.Udme2PvAx8NGskbfrVj5k .bx--structured-list {\\n margin-bottom: 0.25rem;\\n}\\n\\n.jMEg7edKgYth-wiOiui93 {\\n text-align: right;\\n}\\n\\n/* .valueCell {\\n display: inline-flex;\\n} */\\n\", \"\"]);\n// Exports\nexports.locals = {\n\t\"arrayEditor\": \"Udme2PvAx8NGskbfrVj5k\",\n\t\"buttonCell\": \"jMEg7edKgYth-wiOiui93\"\n};\nmodule.exports = exports;\n","var api = require(\"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js??ref--7-1!./concept-search.styles.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"._2A8VfFa6Or2_56KQPWFgiU,\\n._2A8VfFa6Or2_56KQPWFgiU > [role=\\\"combobox\\\"] {\\n display: flex;\\n position: relative;\\n width: 20em;\\n}\\n\\n._2A8VfFa6Or2_56KQPWFgiU [role=\\\"listbox\\\"] {\\n margin: 0;\\n padding: 0;\\n display: flex;\\n flex-flow: column wrap;\\n background-color: whitesmoke;\\n color: #fff;\\n}\\n\\n._2A8VfFa6Or2_56KQPWFgiU li {\\n line-height: 0.75rem;\\n padding: 0.5em;\\n display: block;\\n border-bottom: 0.125rem solid #718096;\\n outline: 0;\\n margin: 0;\\n color: #000;\\n}\\n\\n._2A8VfFa6Or2_56KQPWFgiU [role=\\\"option\\\"]:hover {\\n background-color: #38a169;\\n border-color: #38a169;\\n color: #f7fafc;\\n}\\n\", \"\"]);\n// Exports\nexports.locals = {\n\t\"autocomplete\": \"_2A8VfFa6Or2_56KQPWFgiU\"\n};\nmodule.exports = exports;\n","var api = require(\"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js??ref--7-1!./object-editor.styles.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"._3FDvaeaQ0NuZ3d9JvGdLm7 .bx--structured-list-td {\\n padding: 0.25rem 3rem 0.25rem 1rem;\\n}\\n\\n._3FDvaeaQ0NuZ3d9JvGdLm7 .bx--structured-list {\\n margin-bottom: 0.25rem;\\n}\\n\\n._6OmfZhhrHxi6B7GGiKxq0 {\\n text-align: right;\\n}\\n\\n/* .valueCell {\\n display: inline-flex;\\n} */\\n\", \"\"]);\n// Exports\nexports.locals = {\n\t\"objectEditor\": \"_3FDvaeaQ0NuZ3d9JvGdLm7\",\n\t\"buttonCell\": \"_6OmfZhhrHxi6B7GGiKxq0\"\n};\nmodule.exports = exports;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".tuImD_VrgRA1FTRISm0Bz {\\n width: 12em;\\n}\\n\\n._2y4Z5HPpbr_kfY1poLwvjY {\\n margin-bottom: 1em;\\n}\\n\\n._1Fg9Buv7our49B7uFKCrsT {\\n border-left: 2px solid #c0c0c0;\\n}\\n\\n._1J0L5kDRUGQibKU9QcJeLs {\\n left: -6em;\\n}\\n\", \"\"]);\n// Exports\nexports.locals = {\n\t\"labelCell\": \"tuImD_VrgRA1FTRISm0Bz\",\n\t\"structuredList\": \"_2y4Z5HPpbr_kfY1poLwvjY\",\n\t\"structuredListRow\": \"_1Fg9Buv7our49B7uFKCrsT\",\n\t\"subtreeCell\": \"_1J0L5kDRUGQibKU9QcJeLs\"\n};\nmodule.exports = exports;\n","var api = require(\"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js??ref--7-1!./description.styles.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".M3HCJa1PAW9AqqZ7JBxOi {\\n color: #303030;\\n margin-bottom: 1em;\\n}\\n\\n.jVqk5E1wOwXXTHfZDZ_r2 {\\n margin-bottom: 0.5em;\\n}\\n\\n.hQCeoRJzu_gezvkJPVZ8W {\\n font-style: italic;\\n margin-bottom: 0.5em;\\n}\\n\\n._31eSLoZaupMMwZ5uko3FLS {\\n font-family: monospace;\\n margin-top: 0.5em;\\n margin-left: 0.5em;\\n}\\n\", \"\"]);\n// Exports\nexports.locals = {\n\t\"path\": \"M3HCJa1PAW9AqqZ7JBxOi\",\n\t\"description\": \"jVqk5E1wOwXXTHfZDZ_r2\",\n\t\"source\": \"hQCeoRJzu_gezvkJPVZ8W\",\n\t\"value\": \"_31eSLoZaupMMwZ5uko3FLS\"\n};\nmodule.exports = exports;\n","var api = require(\"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js??ref--7-1!./backend-dependencies-style.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"._3uuruv4Pt_yVYOLDPEqSof {\\n width: 130%;\\n margin: 30px;\\n}\\n\", \"\"]);\n// Exports\nexports.locals = {\n\t\"panel\": \"_3uuruv4Pt_yVYOLDPEqSof\"\n};\nmodule.exports = exports;\n","var api = require(\"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--7-1!./implementer-tools.styles.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"._3eP8BKCw_9P3TtI7igZgGk {\\n z-index: 100000;\\n background-color: var(--omrs-color-interaction-minus-two);\\n height: 40px !important;\\n width: 40px !important;\\n bottom: 10px;\\n right: 8px;\\n position: fixed;\\n border-radius: 2px;\\n}\\n\\n._1FTimJxULqRpytW9iorKVA {\\n background-color: var(--omrs-color-danger);\\n}\\n\", \"\"]);\n// Exports\nexports.locals = {\n\t\"popupTriggerButton\": \"_3eP8BKCw_9P3TtI7igZgGk\",\n\t\"triggerButtonAlert\": \"_1FTimJxULqRpytW9iorKVA\"\n};\nmodule.exports = exports;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"._3cyQmg3Gkemf6WVOsgc22a {\\n position: absolute;\\n top: 0;\\n left: 0;\\n width: 100%;\\n height: 100%;\\n background-color: rgba(43, 43, 185, 0.1);\\n border: 1px solid rgba(43, 43, 185, 0.4);\\n pointer-events: none;\\n}\\n\\n._3RyNSS9XYBibk4269zUVji {\\n background-color: rgb(255, 255, 255, 0.85);\\n border: 1px solid rgba(43, 43, 185, 0.4);\\n color: #393939;\\n position: absolute;\\n bottom: 0;\\n right: 0;\\n padding: 0.5em 0.5em 0.5em 0.5em;\\n pointer-events: none;\\n}\\n\\n._2xisOu6tKf7-O6ZhRoYCcV {\\n position: absolute;\\n top: 0;\\n left: 0;\\n width: 100%;\\n height: 100%;\\n background: none;\\n border: none;\\n}\\n\\n._2xisOu6tKf7-O6ZhRoYCcV:hover {\\n background-color: rgba(43, 43, 185, 0.1);\\n}\\n\\n/* Show the tooltip text when you mouse over the tooltip container */\\n._2xisOu6tKf7-O6ZhRoYCcV:focus .KpHVG1timhVRpvCCZ3wsy,\\n._2xisOu6tKf7-O6ZhRoYCcV:hover .KpHVG1timhVRpvCCZ3wsy {\\n visibility: visible;\\n opacity: 1;\\n}\\n\\n.KpHVG1timhVRpvCCZ3wsy {\\n visibility: hidden;\\n width: auto;\\n background-color: rgb(255, 255, 255, 0.85);\\n text-align: center;\\n padding: 0.5em 0.5em 0.5em 0.5em;\\n border: 1px solid rgba(43, 43, 185, 0.4);\\n\\n position: absolute;\\n top: 0;\\n left: 0;\\n}\\n\", \"\"]);\n// Exports\nexports.locals = {\n\t\"slotOverlay\": \"_3cyQmg3Gkemf6WVOsgc22a\",\n\t\"slotName\": \"_3RyNSS9XYBibk4269zUVji\",\n\t\"extensionOverlay\": \"_2xisOu6tKf7-O6ZhRoYCcV\",\n\t\"extensionTooltip\": \"KpHVG1timhVRpvCCZ3wsy\"\n};\nmodule.exports = exports;\n","import React, { useMemo } from \"react\";\nimport cloneDeep from \"lodash-es/cloneDeep\";\nimport uniqueId from \"lodash-es/uniqueId\";\nimport Add16 from \"@carbon/icons-react/es/add/16\";\nimport TrashCan16 from \"@carbon/icons-react/es/trash-can/16\";\nimport Button from \"carbon-components-react/es/components/Button\";\nimport styles from \"./array-editor.styles.css\";\nimport { Type } from \"@openmrs/esm-framework\";\nimport { Tile } from \"carbon-components-react/es/components/Tile\";\nimport {\n StructuredListBody,\n StructuredListCell,\n StructuredListRow,\n StructuredListWrapper,\n} from \"carbon-components-react/es/components/StructuredList\";\nimport { ValueEditorField } from \"./value-editor-field\";\nimport { ConfigValueDescriptor } from \"../editable-value.component\";\n\ninterface ArrayEditorProps {\n element: ConfigValueDescriptor;\n valueArray: Array<any>;\n setValue: (value: Array<any>) => void;\n}\n\nexport function ArrayEditor({\n element,\n valueArray,\n setValue,\n}: ArrayEditorProps) {\n const arrayKey = useMemo(() => uniqueId(\"array-editor-\"), []);\n return (\n <Tile className={styles.arrayEditor}>\n <StructuredListWrapper>\n <StructuredListBody>\n {valueArray.map((value, i) => (\n <StructuredListRow key={`${arrayKey}-${i}`}>\n <StructuredListCell>\n <ValueEditorField\n element={{\n ...element._elements,\n _value: value,\n _source: element._source,\n }}\n valueType={(element._elements?._type as Type) ?? Type.Object}\n value={value}\n onChange={(newValue) => {\n const newValueArray = cloneDeep(valueArray);\n newValueArray[i] = newValue;\n setValue(newValueArray);\n }}\n />\n </StructuredListCell>\n <StructuredListCell className={styles.buttonCell}>\n <Button\n renderIcon={TrashCan16}\n size=\"sm\"\n kind=\"secondary\"\n iconDescription=\"Remove\"\n hasIconOnly\n onClick={() => {\n const newValueArray = cloneDeep(valueArray);\n newValueArray.splice(i, 1);\n setValue(newValueArray);\n }}\n />\n </StructuredListCell>\n </StructuredListRow>\n ))}\n <StructuredListRow>\n <StructuredListCell></StructuredListCell>\n <StructuredListCell className={styles.buttonCell}>\n <Button\n renderIcon={Add16}\n size=\"sm\"\n iconDescription=\"Add\"\n hasIconOnly\n onClick={() => {\n const newValueArray = cloneDeep(valueArray);\n const newValue =\n (element._elements?._type ?? Type.Object) == Type.Object\n ? {}\n : null;\n newValueArray.push(newValue);\n setValue(newValueArray);\n }}\n />\n </StructuredListCell>\n </StructuredListRow>\n </StructuredListBody>\n </StructuredListWrapper>\n </Tile>\n );\n}\n","import React, { useState, useEffect, useMemo } from \"react\";\nimport debounce from \"lodash-es/debounce\";\nimport uniqueId from \"lodash-es/uniqueId\";\nimport {\n fetchConceptByUuid,\n performConceptSearch,\n} from \"./concept-search.resource\";\nimport styles from \"./concept-search.styles.css\";\n\ninterface ConceptSearchBoxProps {\n setConcept: (concept) => void;\n}\n\nexport function ConceptSearchBox({ setConcept }: ConceptSearchBoxProps) {\n const [searchTerm, setSearchTerm] = useState(\"\");\n const [searchResults, setSearchResults] = useState([]);\n const [activeConceptUuid, setActiveConceptUuid] = useState<any>(\"\");\n const searchTimeoutInMs = 300;\n\n const id = useMemo(() => uniqueId(), []);\n\n const handleUuidChange = (concept) => {\n setActiveConceptUuid(concept.uuid);\n resetSearch();\n setConcept(concept);\n };\n\n const resetSearch = () => {\n setSearchTerm(\"\");\n setSearchResults([]);\n };\n\n const handleSearchTermChange = debounce((searchTerm) => {\n setSearchTerm(searchTerm);\n }, searchTimeoutInMs);\n\n useEffect(() => {\n const ac = new AbortController();\n\n if (searchTerm && searchTerm.length >= 2) {\n performConceptSearch(searchTerm).then(({ data: { results } }) => {\n setSearchResults(results.slice(0, 9));\n });\n } else {\n setSearchResults([]);\n }\n return () => ac.abort();\n }, [searchTerm]);\n\n return (\n <div className={styles.autocomplete}>\n <input\n type=\"text\"\n autoComplete=\"off\"\n autoCapitalize=\"off\"\n aria-autocomplete=\"list\"\n role=\"combobox\"\n aria-label=\"Look up concept by name\"\n aria-controls={`searchbox-${id}`}\n aria-expanded={searchResults.length > 0}\n placeholder=\"Look up concept by name\"\n autoFocus\n onChange={($event) => {\n handleSearchTermChange($event.target.value);\n }}\n />\n <div id={`searchbox-${id}`}>\n <ul role=\"listbox\">\n {!!searchResults.length &&\n searchResults.map((concept: any) => (\n <li\n key={concept.uuid}\n role=\"option\"\n style={{ padding: \"5px\" }}\n onClick={() => {\n handleUuidChange(concept);\n }}\n aria-selected=\"true\"\n >\n {concept.display}\n </li>\n ))}\n {searchTerm && searchResults && !searchResults.length && (\n <li>No matching results found.</li>\n )}\n </ul>\n </div>\n </div>\n );\n}\n","import { openmrsFetch } from \"@openmrs/esm-framework\";\n\nexport function fetchConceptByUuid(conceptUuid: string) {\n return openmrsFetch(`/ws/rest/v1/concept/${conceptUuid}`, {\n method: \"GET\",\n });\n}\n\nexport function performConceptSearch(query: string) {\n return openmrsFetch(`/ws/rest/v1/concept/?q=${query}`, {\n method: \"GET\",\n });\n}\n","import React, { useState, useEffect } from \"react\";\nimport MultiSelect from \"carbon-components-react/es/components/MultiSelect\";\nimport { ExtensionStore, extensionStore } from \"@openmrs/esm-framework\";\n\nexport function ExtensionSlotAdd({ value, setValue }) {\n const [availableExtensions, setAvailableExtensions] = useState<Array<string>>(\n []\n );\n\n useEffect(() => {\n function update(state: ExtensionStore) {\n setAvailableExtensions(Object.keys(state.extensions));\n }\n update(extensionStore.getState());\n return extensionStore.subscribe(update);\n }, []);\n\n return (\n <MultiSelect.Filterable\n id={`add-select`}\n items={availableExtensions.map((name) => ({ id: name, label: name }))}\n placeholder=\"Select extensions\"\n onChange={(value) => setValue(value.selectedItems.map((v) => v.id))}\n initialSelectedItems={value}\n />\n );\n}\n","import React from \"react\";\nimport MultiSelect from \"carbon-components-react/es/components/MultiSelect\";\nimport { useStore } from \"@openmrs/esm-framework\";\nimport { implementerToolsStore } from \"../../store\";\n\nexport function ExtensionSlotRemove({\n slotName,\n slotModuleName,\n value,\n setValue,\n}) {\n const { extensionIdBySlotByModule } = useStore(implementerToolsStore);\n\n return (\n <MultiSelect.Filterable\n id={`add-select`}\n items={extensionIdBySlotByModule[slotModuleName][\n slotName\n ].map((name) => ({ id: name, label: name }))}\n placeholder=\"Select extensions\"\n onChange={(value) => setValue(value.selectedItems.map((v) => v.id))}\n initialSelectedItems={value}\n />\n );\n}\n","import React from \"react\";\nimport {\n StructuredListBody,\n StructuredListCell,\n StructuredListRow,\n StructuredListWrapper,\n} from \"carbon-components-react/es/components/StructuredList\";\nimport { Tile } from \"carbon-components-react/es/components/Tile\";\nimport { ValueEditorField } from \"./value-editor-field\";\nimport { ConfigValueDescriptor } from \"../editable-value.component\";\nimport { Type } from \"@openmrs/esm-framework\";\nimport cloneDeep from \"lodash-es/cloneDeep\";\nimport styles from \"./object-editor.styles.css\";\n\ninterface ObjectEditorProps {\n element: ConfigValueDescriptor;\n valueObject: Object;\n setValue: (value: Object) => void;\n}\n\nexport function ObjectEditor({\n element,\n valueObject,\n setValue,\n}: ObjectEditorProps) {\n return (\n <Tile className={styles.objectEditor}>\n <StructuredListWrapper>\n <StructuredListBody>\n {Object.entries(element).map(([key, schema]) =>\n !key.startsWith(\"_\") ? (\n <StructuredListRow>\n <StructuredListCell>\n <ValueEditorField\n element={{ _value: key, _source: element._source }}\n valueType={Type.String}\n value={key}\n onChange={(newKey) => {\n const newValueObject = cloneDeep(valueObject);\n newValueObject[newKey] = cloneDeep(valueObject[key]);\n delete newValueObject[key];\n setValue(newValueObject);\n }}\n />\n </StructuredListCell>\n <StructuredListCell>\n <ValueEditorField\n element={{\n ...schema,\n _value: valueObject[key],\n _source: element._source,\n }}\n valueType={schema._type}\n value={valueObject[key]}\n onChange={(newValue) => {\n const newValueObject = cloneDeep(valueObject);\n newValueObject[key] = newValue;\n setValue(newValueObject);\n }}\n />\n </StructuredListCell>\n </StructuredListRow>\n ) : null\n )}\n </StructuredListBody>\n </StructuredListWrapper>\n </Tile>\n );\n}\n","import React from \"react\";\nimport { useStore } from \"@openmrs/esm-framework\";\nimport { implementerToolsStore } from \"../../store\";\n\nexport function ExtensionSlotOrder({\n slotName,\n slotModuleName,\n value,\n setValue,\n}) {\n const { extensionIdBySlotByModule } = useStore(implementerToolsStore);\n\n return <div>Todo: compose array with extension lookup</div>;\n}\n","import React, { useState } from \"react\";\nimport uniqueId from \"lodash-es/uniqueId\";\nimport Checkbox from \"carbon-components-react/es/components/Checkbox\";\nimport NumberInput from \"carbon-components-react/es/components/NumberInput\";\nimport TextInput from \"carbon-components-react/es/components/TextInput\";\nimport { Type } from \"@openmrs/esm-framework\";\nimport { ConfigValueDescriptor } from \"../editable-value.component\";\nimport { ValueType } from \"../value-editor\";\nimport { ArrayEditor } from \"./array-editor\";\nimport { ConceptSearchBox } from \"./concept-search\";\nimport { ExtensionSlotAdd } from \"./extension-slot-add\";\nimport { ExtensionSlotRemove } from \"./extension-slot-remove\";\nimport { ObjectEditor } from \"./object-editor\";\nimport { ExtensionSlotOrder } from \"./extension-slot-order\";\n\nexport interface ValueEditorFieldProps {\n element: ConfigValueDescriptor;\n path?: Array<string>;\n valueType?: ValueType;\n value: any;\n onChange: (value: any) => void;\n}\n\nexport function ValueEditorField({\n element,\n path,\n valueType,\n value,\n onChange,\n}: ValueEditorFieldProps) {\n const [id] = useState(uniqueId(\"value-editor-\"));\n\n if (valueType === \"remove\" && !path) {\n throw new Error(\n \"Programming error: ValueEditorField initialized for a 'remove' field, but no 'path' is available\"\n );\n }\n\n return valueType === Type.Array ? (\n <ArrayEditor element={element} valueArray={value} setValue={onChange} />\n ) : valueType === Type.Boolean ? (\n <Checkbox\n id={id}\n checked={value}\n hideLabel\n labelText=\"\"\n onChange={onChange}\n ></Checkbox>\n ) : valueType === Type.ConceptUuid ? (\n <ConceptSearchBox setConcept={(concept) => onChange(concept.uuid)} />\n ) : valueType === Type.Number ? (\n <NumberInput\n id={id}\n value={value}\n onChange={\n // e.target.value not working properly right now: https://github.com/carbon-design-system/carbon/issues/7457\n (e) => onChange(Number((e as any).imaginaryTarget.value))\n }\n ></NumberInput>\n ) : valueType === Type.String || valueType === Type.UUID ? (\n <TextInput\n id={id}\n value={value}\n labelText=\"\"\n onChange={(e) => onChange(e.target.value)}\n ></TextInput>\n ) : valueType === \"add\" ? (\n <ExtensionSlotAdd value={value ?? element._value} setValue={onChange} />\n ) : valueType === \"remove\" && path ? (\n <ExtensionSlotRemove\n slotName={path[2]}\n slotModuleName={path[0]}\n value={value ?? element._value}\n setValue={onChange}\n />\n ) : valueType === \"order\" && path ? (\n <ExtensionSlotOrder\n slotName={path[2]}\n slotModuleName={path[0]}\n value={value ?? element._value}\n setValue={onChange}\n />\n ) : valueType === \"configure\" && path ? (\n <>Todo</>\n ) : (\n <ObjectEditor element={element} valueObject={value} setValue={onChange} />\n );\n}\n","import React, { useEffect, useState, useRef } from \"react\";\nimport Close16 from \"@carbon/icons-react/es/close/16\";\nimport Save16 from \"@carbon/icons-react/es/save/16\";\nimport Button from \"carbon-components-react/es/components/Button\";\nimport { Type } from \"@openmrs/esm-framework\";\nimport { ConfigValueDescriptor } from \"./editable-value.component\";\nimport { ValueEditorField } from \"./value-editors/value-editor-field\";\nimport styles from \"./configuration.styles.css\";\n\nexport type CustomValueType = \"add\" | \"remove\" | \"order\" | \"configure\";\n\nexport type ValueType = CustomValueType | Type;\n\ninterface ValueEditorProps {\n element: ConfigValueDescriptor;\n customType?: CustomValueType;\n path: Array<string>;\n handleSave: (val: string) => void;\n handleClose: () => void;\n}\n\nexport function ValueEditor({\n element,\n customType,\n path,\n handleSave,\n handleClose,\n}: ValueEditorProps) {\n const ref = useRef<HTMLDivElement>(null);\n const [tmpValue, setTmpValue] = useState(element._value);\n\n const valueType = customType ?? element._type;\n\n const keyListener = (e: KeyboardEvent) => {\n if (e.key === \"Escape\") {\n handleClose();\n } else if (e.key === \"Enter\") {\n handleSave(JSON.stringify(tmpValue));\n }\n };\n\n useEffect(() => {\n document.addEventListener(\"keyup\", keyListener);\n return () => {\n document.removeEventListener(\"keyup\", keyListener);\n };\n }, [tmpValue]);\n\n return (\n <div ref={ref} style={{ display: \"inherit\" }}>\n <ValueEditorField\n element={element}\n path={path}\n value={tmpValue}\n onChange={setTmpValue}\n valueType={valueType}\n />\n <div className={styles.valueEditorButtons}>\n <Button\n renderIcon={Save16}\n size=\"sm\"\n kind=\"primary\"\n iconDescription=\"Save\"\n hasIconOnly\n onClick={() => handleSave(JSON.stringify(tmpValue))}\n />\n <Button\n renderIcon={Close16}\n size=\"sm\"\n kind=\"secondary\"\n iconDescription=\"Cancel\"\n hasIconOnly\n onClick={handleClose}\n />\n </div>\n </div>\n );\n}\n","import React from \"react\";\n\nexport interface DisplayValueProps {\n value: any;\n}\n\nexport function DisplayValue({ value }: DisplayValueProps) {\n // TODO: Make this show the concept name for ConceptUUID type values\n return (\n <>\n {Array.isArray(value)\n ? typeof value[0] === \"object\"\n ? value.map((v) => (\n <div style={{ marginBottom: \"1em\" }}>\n <DisplayValue value={v} />\n </div>\n ))\n : value.join(\", \")\n : typeof value === \"object\" && value !== null\n ? Object.entries(value).map(([k, v]) => (\n <div>\n {k}: <DisplayValue value={v} />\n </div>\n ))\n : typeof value === \"string\" || typeof value === \"number\"\n ? value\n : value == null\n ? \"none\"\n : JSON.stringify(value)}\n </>\n );\n}\n","import React, { useState, useEffect, useRef } from \"react\";\nimport isEqual from \"lodash-es/isEqual\";\nimport unset from \"lodash-es/unset\";\nimport cloneDeep from \"lodash-es/cloneDeep\";\nimport Reset16 from \"@carbon/icons-react/es/reset/16\";\nimport Button from \"carbon-components-react/es/components/Button\";\nimport styles from \"./editable-value.styles.css\";\nimport {\n ConfigValue,\n Validator,\n Type,\n Config,\n temporaryConfigStore,\n} from \"@openmrs/esm-framework\";\nimport { ValueEditor, CustomValueType } from \"./value-editor\";\nimport { implementerToolsStore, ImplementerToolsStore } from \"../store\";\nimport { DisplayValue } from \"./display-value\";\n\nexport interface EditableValueProps {\n path: Array<string>;\n element: ConfigValueDescriptor;\n customType?: CustomValueType;\n}\n\nexport interface ConfigValueDescriptor {\n _value: ConfigValue;\n _source: string;\n _default?: ConfigValue;\n _description?: string;\n _elements?: Config | ConfigValueDescriptor;\n _validators?: Array<Validator>;\n _type?: Type;\n}\n\nexport default function EditableValue({\n path,\n element,\n customType,\n}: EditableValueProps) {\n const [valueString, setValueString] = useState<string>();\n const [editing, setEditing] = useState(false);\n const [error, setError] = useState<string | null>(null);\n const activeConfigRef = useRef<HTMLButtonElement>(null);\n\n const closeEditor = () => {\n setEditing(false);\n setError(null);\n };\n\n const focusOnConfigPathBeingEdited = () => {\n if (activeConfigRef && activeConfigRef.current) {\n setEditing(true);\n activeConfigRef.current.focus();\n }\n };\n\n useEffect(() => {\n const update = (state: ImplementerToolsStore) => {\n if (\n state.configPathBeingEdited &&\n isEqual(state.configPathBeingEdited, path)\n ) {\n focusOnConfigPathBeingEdited();\n }\n };\n update(implementerToolsStore.getState());\n return implementerToolsStore.subscribe(update);\n }, []);\n\n useEffect(() => {\n const state = implementerToolsStore.getState();\n if (editing && !isEqual(state.configPathBeingEdited, path)) {\n implementerToolsStore.setState({\n configPathBeingEdited: path,\n activeItemDescription: {\n path: path,\n source: element._source,\n description: element._description,\n value: valueString,\n },\n });\n }\n if (!editing && isEqual(state.configPathBeingEdited, path)) {\n implementerToolsStore.setState({ configPathBeingEdited: null });\n }\n }, [editing]);\n\n return (\n <>\n <div className={styles.line}>\n {editing ? (\n <>\n <ValueEditor\n element={element}\n customType={customType}\n path={path}\n handleClose={closeEditor}\n handleSave={(val) => {\n try {\n const result = JSON.parse(val);\n const tempConfigUpdate = set(\n cloneDeep(temporaryConfigStore.getState()),\n [\"config\", ...path],\n result\n );\n temporaryConfigStore.setState(tempConfigUpdate);\n setValueString(val);\n closeEditor();\n } catch (e) {\n console.warn(e);\n setError(\"That's not formatted quite right. Try again.\");\n }\n }}\n />\n </>\n ) : (\n <>\n <button\n className={`${styles.secretButton} ${\n element._source == \"temporary config\"\n ? styles.overriddenValue\n : \"\"\n }`}\n onClick={() => setEditing(true)}\n ref={activeConfigRef}\n >\n <DisplayValue value={element._value} />\n </button>\n {element._source == \"temporary config\" ? (\n <Button\n style={{ marginLeft: \"1em\" }}\n renderIcon={Reset16}\n size=\"sm\"\n kind=\"tertiary\"\n iconDescription=\"Reset to default\"\n hasIconOnly\n onClick={() => {\n temporaryConfigStore.setState(\n unset(temporaryConfigStore.getState(), [\"config\", ...path])\n );\n }}\n />\n ) : null}\n </>\n )}\n {error && <div className={styles.error}>{error}</div>}\n </div>\n </>\n );\n}\n\n// A substitute for the lodash.set function, which seems to be broken,\n// at least within Jest.\nfunction set<T>(obj: T, path: Array<string>, value: any): T {\n if (path.length > 1) {\n obj[path[0]] = set(obj[path[0]] ?? {}, path.slice(1), value);\n } else {\n obj[path[0]] = value;\n }\n return obj;\n}\n","import React from \"react\";\nimport EditableValue from \"./editable-value.component\";\nimport { ExtensionSlotConfigureValueObject } from \"@openmrs/esm-framework\";\n\nexport interface ExtensionConfigureTreeProps {\n moduleName: string;\n slotName: string;\n config?: ExtensionSlotConfigureValueObject;\n}\n\nexport function ExtensionConfigureTree({\n moduleName,\n slotName,\n config,\n}: ExtensionConfigureTreeProps) {\n return (\n <EditableValue\n path={[moduleName, slotName, \"configure\"]}\n element={\n config && Object.keys(config).length\n ? { _value: config, _source: \"\", _default: {} }\n : { _value: undefined, _source: \"default\", _default: {} }\n }\n customType=\"configure\"\n />\n );\n}\n","import React from \"react\";\nimport {\n StructuredListBody,\n StructuredListCell,\n StructuredListRow,\n StructuredListWrapper,\n} from \"carbon-components-react/es/components/StructuredList\";\nimport styles from \"./layout.styles.css\";\n\nexport interface SubtreeProps {\n leaf: boolean;\n label: string;\n children: React.ReactNode;\n onMouseEnter?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;\n onMouseLeave?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;\n}\n\nexport function Subtree({\n leaf,\n label,\n children,\n onMouseEnter,\n onMouseLeave,\n}: SubtreeProps) {\n return leaf ? (\n <StructuredListRow\n className={styles.structuredListRow}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n <StructuredListCell className={styles.labelCell}>\n {label}\n </StructuredListCell>\n <StructuredListCell>{children}</StructuredListCell>\n </StructuredListRow>\n ) : (\n <>\n <StructuredListRow\n className={styles.structuredListRow}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n <StructuredListCell className={styles.labelCell}>\n {label}\n </StructuredListCell>\n <StructuredListCell />\n </StructuredListRow>\n <StructuredListRow className={styles.structuredListRow}>\n <StructuredListCell />\n <StructuredListCell className={styles.subtreeCell}>\n <StructuredListWrapper className={styles.structuredList}>\n <StructuredListBody>{children}</StructuredListBody>\n </StructuredListWrapper>\n </StructuredListCell>\n </StructuredListRow>\n </>\n );\n}\n","import React, { useEffect, useState } from \"react\";\nimport EditableValue from \"./editable-value.component\";\nimport isEqual from \"lodash-es/isEqual\";\nimport {\n extensionStore,\n ExtensionSlotConfigureValueObject,\n useStore,\n} from \"@openmrs/esm-framework\";\nimport { ExtensionConfigureTree } from \"./extension-configure-tree\";\nimport { Subtree } from \"./layout/subtree.component\";\nimport { implementerToolsStore } from \"../store\";\n\ninterface ExtensionSlotsConfigTreeProps {\n config: { [key: string]: any };\n moduleName: string;\n}\n\ninterface ExtensionSlotImplementerToolsConfig {\n add?: ExtensionSlotConfigValueDescriptor;\n remove?: ExtensionSlotConfigValueDescriptor;\n order?: ExtensionSlotConfigValueDescriptor;\n configure?: ExtensionConfigureDescriptor;\n}\n\ninterface ExtensionSlotConfigValueDescriptor {\n _value: Array<string>;\n _source: string;\n}\n\ninterface ExtensionConfigureDescriptor {\n _value: ExtensionSlotConfigureValueObject;\n _source: string;\n}\n\nexport function ExtensionSlotsConfigTree({\n config,\n moduleName,\n}: ExtensionSlotsConfigTreeProps) {\n const { extensionIdBySlotByModule } = useStore(implementerToolsStore);\n\n const extensionSlotNames = Object.keys(\n extensionIdBySlotByModule[moduleName] || {}\n );\n\n return extensionSlotNames.length ? (\n <Subtree label={\"extension slots\"} leaf={false}>\n {extensionSlotNames.map((slotName) => (\n <ExtensionSlotConfigTree\n config={config?.[slotName]}\n path={[moduleName, \"extensions\", slotName]}\n />\n ))}\n </Subtree>\n ) : null;\n}\n\ninterface ExtensionSlotConfigProps {\n config: ExtensionSlotImplementerToolsConfig;\n path: string[];\n}\n\nfunction ExtensionSlotConfigTree({ config, path }: ExtensionSlotConfigProps) {\n const [assignedExtensions, setAssignedExtensions] = useState<Array<string>>(\n []\n );\n const moduleName = path[0];\n const slotName = path[2];\n\n useEffect(() => {\n function update(state) {\n setAssignedExtensions(\n state.slots[slotName]?.instances?.[moduleName]?.assignedIds\n );\n }\n update(extensionStore.getState());\n return extensionStore.subscribe(update);\n }, []);\n\n function setActiveExtensionSlotOnMouseEnter(moduleName, slotName) {\n if (!implementerToolsStore.getState().configPathBeingEdited) {\n implementerToolsStore.setState({\n activeItemDescription: {\n path: [moduleName, slotName],\n value: assignedExtensions,\n },\n });\n }\n }\n\n function setActiveItemDescriptionOnMouseEnter(\n moduleName,\n slotName,\n key,\n value\n ) {\n if (!implementerToolsStore.getState().configPathBeingEdited) {\n implementerToolsStore.setState({\n activeItemDescription: {\n path: [moduleName, slotName, key],\n source: value?._source,\n description: {\n add: \"Add an extension to this slot.\",\n remove: \"Remove an extension from this slot.\",\n order: \"Reorder the extensions in this slot.\",\n configure:\n \"Pass a configuration object directly to one of the extensions in this slot.\",\n }[key],\n value: JSON.stringify(value?._value),\n },\n });\n }\n }\n\n function removeActiveItemDescriptionOnMouseLeave(thisPath) {\n const state = implementerToolsStore.getState();\n if (\n isEqual(state.activeItemDescription?.path, thisPath) &&\n !isEqual(state.configPathBeingEdited, thisPath)\n ) {\n implementerToolsStore.setState({ activeItemDescription: undefined });\n }\n }\n\n return (\n <Subtree\n label={slotName}\n leaf={false}\n onMouseEnter={() =>\n setActiveExtensionSlotOnMouseEnter(moduleName, slotName)\n }\n onMouseLeave={() =>\n removeActiveItemDescriptionOnMouseLeave([moduleName, slotName])\n }\n >\n {([\"add\", \"remove\", \"order\", \"configure\"] as const).map((key) => (\n <Subtree\n label={key}\n key={path.join(\".\") + key}\n leaf={true}\n onMouseEnter={() =>\n setActiveItemDescriptionOnMouseEnter(\n moduleName,\n slotName,\n key,\n config?.[key]\n )\n }\n onMouseLeave={() =>\n removeActiveItemDescriptionOnMouseLeave([moduleName, slotName, key])\n }\n >\n {key === \"configure\" ? (\n <ExtensionConfigureTree\n moduleName={moduleName}\n slotName={slotName}\n config={config?.configure?._value}\n />\n ) : (\n <EditableValue\n path={path.concat([key])}\n element={\n config?.[key] ?? {\n _value: undefined,\n _source: \"default\",\n _default: [],\n }\n }\n customType={key}\n />\n )}\n </Subtree>\n ))}\n </Subtree>\n );\n}\n","import React from \"react\";\nimport EditableValue from \"./editable-value.component\";\nimport { implementerToolsStore } from \"../store\";\nimport isEqual from \"lodash-es/isEqual\";\nimport { Subtree } from \"./layout/subtree.component\";\n\nexport interface ConfigSubtreeProps {\n config: Record<string, any>;\n path?: Array<string>;\n}\n\nexport function ConfigSubtree({ config, path = [] }: ConfigSubtreeProps) {\n function setActiveItemDescriptionOnMouseEnter(thisPath, key, value) {\n if (!implementerToolsStore.getState().configPathBeingEdited) {\n implementerToolsStore.setState({\n activeItemDescription: {\n path: thisPath,\n source: value._source,\n description: value._description,\n value: JSON.stringify(value._value),\n },\n });\n }\n }\n\n function removeActiveItemDescriptionOnMouseLeave(thisPath) {\n const state = implementerToolsStore.getState();\n if (\n isEqual(state.activeItemDescription?.path, thisPath) &&\n !isEqual(state.configPathBeingEdited, thisPath)\n ) {\n implementerToolsStore.setState({ activeItemDescription: undefined });\n }\n }\n\n return (\n <>\n {Object.entries(config).map(([key, value], i) => {\n const thisPath = path.concat([key]);\n const isLeaf =\n value.hasOwnProperty(\"_value\") || value.hasOwnProperty(\"_type\");\n return (\n <Subtree\n label={key}\n leaf={isLeaf}\n onMouseEnter={() =>\n setActiveItemDescriptionOnMouseEnter(thisPath, key, value)\n }\n onMouseLeave={() =>\n removeActiveItemDescriptionOnMouseLeave(thisPath)\n }\n key={`subtree-${thisPath.join(\".\")}`}\n >\n {isLeaf ? (\n <EditableValue path={thisPath} element={value} />\n ) : (\n <ConfigSubtree config={value} path={thisPath} />\n )}\n </Subtree>\n );\n })}\n </>\n );\n}\n","import React, { ReactNode } from \"react\";\nimport {\n StructuredListBody,\n StructuredListWrapper,\n} from \"carbon-components-react/es/components/StructuredList\";\nimport styles from \"./layout.styles.css\";\n\nexport interface TreeContainerProps {\n children: ReactNode;\n}\n\nexport function TreeContainer({ children }: TreeContainerProps) {\n return (\n <StructuredListWrapper className={styles.structuredList}>\n <StructuredListBody>{children}</StructuredListBody>\n </StructuredListWrapper>\n );\n}\n","import React from \"react\";\nimport { ExtensionSlotsConfigTree } from \"./extension-slots-config-tree\";\nimport { ConfigSubtree } from \"./config-subtree.component\";\nimport pickBy from \"lodash-es/pickBy\";\nimport { TreeContainer } from \"./layout/tree-container.component\";\n\nexport interface ConfigTreeForModuleProps {\n config: Record<string, any>;\n moduleName: string;\n}\n\nexport function ConfigTreeForModule({\n config,\n moduleName,\n}: ConfigTreeForModuleProps) {\n return (\n <TreeContainer>\n <ExtensionSlotsConfigTree\n config={config.extensions}\n moduleName={moduleName}\n />\n <ConfigSubtree\n config={pickBy(config, (v, key) => key !== \"extensions\")}\n path={[moduleName]}\n />\n </TreeContainer>\n );\n}\n","import React from \"react\";\nimport styles from \"./configuration.styles.css\";\nimport Accordion, {\n AccordionItem,\n} from \"carbon-components-react/es/components/Accordion\";\nimport { ConfigTreeForModule } from \"./config-tree-for-module.component\";\nimport { useStore } from \"@openmrs/esm-framework\";\nimport { implementerToolsStore } from \"../store\";\n\nexport interface ConfigTreeProps {\n config: Record<string, any>;\n}\n\nexport function ConfigTree({ config }: ConfigTreeProps) {\n const { extensionIdBySlotByModule } = useStore(implementerToolsStore);\n\n return (\n <div>\n <Accordion align=\"start\">\n {config &&\n Object.keys(config)\n .sort()\n .map((moduleName) => {\n const moduleConfig = config[moduleName];\n return Object.keys(moduleConfig).length ||\n extensionIdBySlotByModule[moduleName] ? (\n <AccordionItem\n title={<h6 className={styles.moduleName}>{moduleName}</h6>}\n className={styles.fullWidthAccordion}\n key={`accordion-${moduleName}`}\n >\n <div key={`${moduleName}-config`}>\n <ConfigTreeForModule\n config={moduleConfig}\n moduleName={moduleName}\n />\n </div>\n </AccordionItem>\n ) : null;\n })}\n </Accordion>\n </div>\n );\n}\n","import React from \"react\";\nimport styles from \"./description.styles.css\";\nimport { useStore } from \"@openmrs/esm-framework\";\nimport { implementerToolsStore } from \"../store\";\n\nexport function Description() {\n const { activeItemDescription } = useStore(implementerToolsStore);\n return (\n <div>\n {activeItemDescription ? (\n <>\n <p className={styles.path}>\n {activeItemDescription.path.slice(1).join(\" → \")}\n </p>\n <p className={styles.description}>\n {activeItemDescription.description}\n </p>\n <p className={styles.source}>\n {activeItemDescription.source === \"default\" ? (\n <>The current value is the default.</>\n ) : activeItemDescription.source ? (\n <>The current value comes from {activeItemDescription.source}.</>\n ) : null}\n </p>\n {activeItemDescription.value ? <p>Value:</p> : null}\n <p className={styles.value}>\n {Array.isArray(activeItemDescription.value)\n ? activeItemDescription.value.map((v) => <p key={v}>{v}</p>)\n : activeItemDescription.value}\n </p>\n </>\n ) : null}\n </div>\n );\n}\n","import React from \"react\";\nimport TrashCan16 from \"@carbon/icons-react/es/trash-can/16\";\nimport Download16 from \"@carbon/icons-react/es/download/16\";\nimport ChevronDown16 from \"@carbon/icons-react/es/chevron--down/16\";\nimport ChevronUp16 from \"@carbon/icons-react/es/chevron--up/16\";\nimport Button from \"carbon-components-react/es/components/Button\";\nimport Toggle from \"carbon-components-react/es/components/Toggle\";\nimport styles from \"./configuration.styles.css\";\nimport {\n ConfigInternalStore,\n configInternalStore,\n implementerToolsConfigStore,\n temporaryConfigStore,\n useStore,\n} from \"@openmrs/esm-framework\";\nimport { Column, Grid, Row } from \"carbon-components-react/es/components/Grid\";\nimport { ConfigTree } from \"./config-tree.component\";\nimport { Description } from \"./description.component\";\nimport { implementerToolsStore, ImplementerToolsStore } from \"../store\";\n\nexport type ConfigurationProps = {\n setHasAlert(value: boolean): void;\n};\n\nconst actions = {\n toggleIsUIEditorEnabled({ isUIEditorEnabled }: ImplementerToolsStore) {\n return { isUIEditorEnabled: !isUIEditorEnabled };\n },\n toggleIsToolbarOpen({ isConfigToolbarOpen }: ImplementerToolsStore) {\n return { isConfigToolbarOpen: !isConfigToolbarOpen };\n },\n};\n\nconst configActions = {\n toggleDevDefaults({ devDefaultsAreOn }: ConfigInternalStore) {\n return { devDefaultsAreOn: !devDefaultsAreOn };\n },\n};\n\nexport function Configuration({ setHasAlert }: ConfigurationProps) {\n const {\n isUIEditorEnabled,\n toggleIsUIEditorEnabled,\n isConfigToolbarOpen,\n toggleIsToolbarOpen,\n } = useStore(implementerToolsStore, actions);\n const { devDefaultsAreOn, toggleDevDefaults } = useStore(\n configInternalStore,\n configActions\n );\n const { config } = useStore(implementerToolsConfigStore);\n const tempConfigStore = useStore(temporaryConfigStore);\n const tempConfig = tempConfigStore.config;\n const tempConfigObjUrl = new Blob(\n [JSON.stringify(tempConfig, undefined, 2)],\n {\n type: \"application/json\",\n }\n );\n\n return (\n <>\n <div className={styles.tools}>\n {isConfigToolbarOpen ? (\n <Grid style={{ margin: \"0.25rem\", padding: \"0.5em 1.5em\" }}>\n <Row>\n <Column sm={1} md={1}>\n <Toggle\n id=\"devConfigSwitch\"\n labelText=\"Dev Config\"\n onToggle={toggleDevDefaults}\n toggled={devDefaultsAreOn}\n />\n </Column>\n <Column sm={1} md={1} className={styles.actionButton}>\n <Toggle\n id=\"uiEditorSwitch\"\n labelText=\"UI Editor\"\n toggled={isUIEditorEnabled}\n onToggle={toggleIsUIEditorEnabled}\n />\n </Column>\n <Column sm={1} md={2} className={styles.actionButton}>\n <Button\n kind=\"danger\"\n iconDescription=\"Clear temporary config\"\n renderIcon={TrashCan16}\n onClick={() => {\n temporaryConfigStore.setState({ config: {} });\n }}\n >\n Clear Temporary Config\n </Button>\n </Column>\n <Column sm={1} md={2} className={styles.actionButton}>\n <Button\n kind=\"secondary\"\n iconDescription=\"Download temporary config\"\n renderIcon={Download16}\n >\n <a\n className={styles.downloadLink}\n download=\"temporary_config.json\"\n href={window.URL.createObjectURL(tempConfigObjUrl)}\n >\n Download Temporary Config\n </a>\n </Button>\n </Column>\n </Row>\n </Grid>\n ) : null}\n <div className={styles.toggleToolbarButton}>\n <OpenOrCloseButton\n isConfigToolbarOpen={isConfigToolbarOpen}\n toggleIsToolbarOpen={toggleIsToolbarOpen}\n />\n </div>\n </div>\n <div\n className={styles.mainContent}\n style={{\n marginTop: isConfigToolbarOpen ? \"72px\" : \"25px\",\n height: isConfigToolbarOpen\n ? \"calc(50vh - 114px)\"\n : \"calc(50vh - 68px)\",\n }}\n >\n <div className={styles.configTreePane}>\n <ConfigTree config={config} />\n </div>\n <div className={styles.descriptionPane}>\n <Description />\n </div>\n </div>\n </>\n );\n}\n\nfunction OpenOrCloseButton({ isConfigToolbarOpen, toggleIsToolbarOpen }) {\n return (\n <Button\n hasIconOnly\n renderIcon={isConfigToolbarOpen ? ChevronUp16 : ChevronDown16}\n onClick={toggleIsToolbarOpen}\n kind=\"ghost\"\n size=\"small\"\n iconDescription={`${isConfigToolbarOpen ? \"Hide\" : \"Show\"} toolbar`}\n ></Button>\n );\n}\n","import React, { Fragment, useEffect, useState } from \"react\";\nimport style from \"./backend-dependencies-style.css\";\nimport DataTable, {\n Table,\n TableHead,\n TableRow,\n TableHeader,\n TableBody,\n TableCell,\n TableContainer,\n} from \"carbon-components-react/es/components/DataTable\";\nimport {\n FrontendModule,\n ModuleDiagnosticsProps,\n parseUnresolvedDeps,\n} from \"./helpers/backend-dependecies-helper\";\n\nexport const ModuleDiagnostics: React.FC<ModuleDiagnosticsProps> = ({\n modulesWithMissingBackendModules,\n modulesWithWrongBackendModulesVersion,\n setHasAlert,\n}) => {\n const [unresolvedDeps, setUnresolvedDeps] = useState<Array<FrontendModule>>(\n []\n );\n\n useEffect(() => {\n if (\n !modulesWithMissingBackendModules.length &&\n !modulesWithWrongBackendModulesVersion.length\n )\n return;\n\n setUnresolvedDeps(\n parseUnresolvedDeps(\n modulesWithWrongBackendModulesVersion,\n modulesWithMissingBackendModules\n )\n );\n setHasAlert(true);\n }, [modulesWithMissingBackendModules, modulesWithWrongBackendModulesVersion]);\n\n const headers = [\n {\n key: \"name\",\n header: \"Module Name\",\n },\n {\n key: \"installedVersion\",\n header: \"Installed Version\",\n },\n {\n key: \"requiredVersion\",\n header: \"Required Version\",\n },\n ];\n return (\n <div className={style.panel}>\n <div>\n <DataTable rows={[]} headers={headers}>\n {({ headers, getTableProps, getHeaderProps }) => (\n <TableContainer title={\"\"}>\n <Table {...getTableProps()}>\n <TableHead>\n <TableRow>\n {headers.map((header) => (\n <TableHeader {...getHeaderProps({ header })}>\n {header.header}\n </TableHeader>\n ))}\n </TableRow>\n </TableHead>\n <TableBody>\n {unresolvedDeps.map((esm, index) => (\n <Fragment key={esm.name}>\n <TableRow>\n <TableCell>\n <strong>{esm.name}</strong>\n </TableCell>\n <TableCell></TableCell>\n <TableCell></TableCell>\n </TableRow>\n {esm.unresolvedDeps.map((dep) => (\n <TableRow key={dep.name}>\n <TableCell>{dep.name}</TableCell>\n <TableCell>\n {dep.type === \"missing\" ? (\n <span style={{ color: \"red\" }}>Missing</span>\n ) : (\n dep.installedVersion\n )}\n </TableCell>\n <TableCell>{dep.requiredVersion}</TableCell>\n </TableRow>\n ))}\n </Fragment>\n ))}\n </TableBody>\n </Table>\n </TableContainer>\n )}\n </DataTable>\n </div>\n </div>\n );\n};\n","import { MissingBackendModules } from \"../openmrs-backend-dependencies\";\n\nexport function parseUnresolvedDeps(\n modulesWithWrongBackendModulesVersion: Array<MissingBackendModules>,\n modulesWithMissingBackendModules: Array<MissingBackendModules>\n): Array<FrontendModule> {\n let similarEsms: Array<MissingBackendModules> = [];\n const unresolvedDeps1 = modulesWithWrongBackendModulesVersion.map((m) => {\n const similarEsm = modulesWithMissingBackendModules.find(\n (x) => x.moduleName === m.moduleName\n );\n\n let leavesForSimilarEsm: Array<UnresolvedBackendDependency> = [];\n if (similarEsm) {\n leavesForSimilarEsm = similarEsm.backendModules.map(\n (m) =>\n ({\n name: m.uuid,\n requiredVersion: m.version,\n type: \"missing\",\n } as UnresolvedBackendDependency)\n );\n similarEsms.push(similarEsm);\n }\n const leaves = m.backendModules.map(\n (m) =>\n ({\n name: m.uuid,\n installedVersion: m.version,\n requiredVersion: m.requiredVersion,\n type: \"version-mismatch\",\n } as UnresolvedBackendDependency)\n );\n return {\n name: m.moduleName,\n unresolvedDeps: [...leaves, ...leavesForSimilarEsm],\n };\n });\n const unresolvedDeps2 = modulesWithMissingBackendModules\n .filter((m) => !similarEsms.includes(m))\n .map((m) => {\n const leaves = m.backendModules.map((m) => ({\n name: m.uuid,\n requiredVersion: m.version,\n type: \"missing\",\n }));\n return { name: m.moduleName, unresolvedDeps: leaves } as FrontendModule;\n });\n return [...unresolvedDeps1, ...unresolvedDeps2];\n}\n\nexport type ModuleDiagnosticsProps = {\n setHasAlert(value: boolean): void;\n modulesWithMissingBackendModules: Array<MissingBackendModules>;\n modulesWithWrongBackendModulesVersion: Array<MissingBackendModules>;\n};\n\nexport interface FrontendModule {\n name: string;\n unresolvedDeps: Array<UnresolvedBackendDependency>;\n}\n\ntype DeficiencyType = \"missing\" | \"version-mismatch\";\n\nexport interface UnresolvedBackendDependency {\n name: string;\n requiredVersion?: string;\n installedVersion?: string;\n type: DeficiencyType;\n}\n","import React, { useState, useEffect } from \"react\";\nimport Close16 from \"@carbon/icons-react/es/close/16\";\nimport Button from \"carbon-components-react/es/components/Button\";\nimport ContentSwitcher from \"carbon-components-react/es/components/ContentSwitcher\";\nimport Switch from \"carbon-components-react/es/components/Switch\";\nimport styles from \"./popup.styles.css\";\nimport { Configuration } from \"../configuration/configuration.component\";\nimport { ModuleDiagnostics } from \"../backend-dependencies/backend-dependecies.component\";\nimport { MissingBackendModules } from \"../backend-dependencies/openmrs-backend-dependencies\";\n\ninterface DevToolsPopupProps {\n close(): void;\n setHasAlert(value: boolean): void;\n modulesWithMissingBackendModules: Array<MissingBackendModules>;\n modulesWithWrongBackendModulesVersion: Array<MissingBackendModules>;\n visibleTabIndex?: number;\n}\n\nexport default function Popup(props: DevToolsPopupProps) {\n const [configHasAlert, setConfigHasAlert] = useState(false);\n const [diagnosticsHasAlert, setDiagnosticsHasAlert] = useState(false);\n const [activeTab, setActiveTab] = useState(0);\n\n useEffect(() => {\n props.setHasAlert(configHasAlert || diagnosticsHasAlert);\n }, [diagnosticsHasAlert, configHasAlert]);\n\n return (\n <div className={styles.popup}>\n <div className={styles.topBar}>\n <div className={styles.tabs}>\n <ContentSwitcher\n onChange={(c) => {\n setActiveTab((c as any).index);\n }}\n >\n <Switch\n name=\"configuration-tab\"\n text=\"Configuration\"\n onClick={() => {}}\n onKeyDown={() => {}}\n />\n <Switch\n name=\"backend-modules-tab\"\n text=\"Backend Modules\"\n onClick={() => {}}\n onKeyDown={() => {}}\n />\n </ContentSwitcher>\n </div>\n <div>\n <Button\n className={styles.closeButton}\n kind=\"secondary\"\n renderIcon={Close16}\n iconDescription=\"Close\"\n onClick={props.close}\n hasIconOnly\n />\n </div>\n </div>\n <div className={styles.content}>\n {activeTab == 0 ? (\n <Configuration setHasAlert={setConfigHasAlert} />\n ) : (\n <ModuleDiagnostics\n setHasAlert={setDiagnosticsHasAlert}\n modulesWithMissingBackendModules={\n props.modulesWithMissingBackendModules\n }\n modulesWithWrongBackendModulesVersion={\n props.modulesWithWrongBackendModulesVersion\n }\n />\n )}\n </div>\n </div>\n );\n}\n","import * as semver from \"semver\";\nimport { openmrsFetch } from \"@openmrs/esm-framework\";\nimport difference from \"lodash-es/difference\";\n\nconst installedBackendModules: Array<Record<string, string>> = [];\nconst modulesWithMissingBackendModules: MissingBackendModules[] = [];\nconst modulesWithWrongBackendModulesVersion: MissingBackendModules[] = [];\n\nlet memorizedUnresolvedsBackendDeps: UnresolvedBackendDependencies;\n\nasync function initInstalledBackendModules() {\n try {\n const response = await fetchInstalledBackendModules();\n installedBackendModules.push(...response.data.results);\n } catch (err) {\n setTimeout(() => {\n throw err;\n });\n }\n}\n\nexport async function checkModules(): Promise<UnresolvedBackendDependencies> {\n if (memorizedUnresolvedsBackendDeps) return memorizedUnresolvedsBackendDeps;\n\n const modules = (window.installedModules ?? [])\n .filter((module) => module[1].backendDependencies)\n .map((module) => ({\n backendDependencies: module[1].backendDependencies,\n moduleName: module[0],\n }));\n\n await initInstalledBackendModules();\n modules.forEach((module) => checkIfModulesAreInstalled(module));\n\n memorizedUnresolvedsBackendDeps = {\n modulesWithMissingBackendModules,\n modulesWithWrongBackendModulesVersion,\n };\n\n return memorizedUnresolvedsBackendDeps;\n}\n\nfunction checkIfModulesAreInstalled(module: Module) {\n const missingBackendModule = getMissingBackendModules(\n module.backendDependencies\n );\n const installedAndRequiredModules = getInstalledAndRequiredBackendModules(\n module.backendDependencies\n );\n if (missingBackendModule.length > 0) {\n modulesWithMissingBackendModules.push({\n moduleName: module.moduleName,\n backendModules: missingBackendModule,\n });\n }\n if (installedAndRequiredModules.length > 0) {\n modulesWithWrongBackendModulesVersion.push({\n moduleName: module.moduleName,\n backendModules: getMisMatchedBackendModules(installedAndRequiredModules),\n });\n }\n}\n\nfunction fetchInstalledBackendModules() {\n return openmrsFetch(`/ws/rest/v1/module?v=custom:(uuid,version)`, {\n method: \"GET\",\n });\n}\n\nfunction getMissingBackendModules(\n requiredBackendModules: Record<string, string>\n) {\n const requiredBackendModulesUuids = Object.keys(requiredBackendModules);\n const installedBackendModuleUuids = installedBackendModules.map(\n (res) => res.uuid\n );\n const missingModules = difference(\n requiredBackendModulesUuids,\n installedBackendModuleUuids\n );\n return missingModules.map((key) => {\n return { uuid: key, version: requiredBackendModules[key] };\n });\n}\n\nfunction getInstalledAndRequiredBackendModules(\n requiredBackendModules: Record<string, string>\n) {\n const requiredModules = Object.keys(requiredBackendModules).map((key) => {\n return { uuid: key, version: requiredBackendModules[key] };\n });\n return requiredModules.filter((requiredModule) => {\n return installedBackendModules.find((installedModule) => {\n return requiredModule.uuid === installedModule.uuid;\n });\n });\n}\n\nfunction getMisMatchedBackendModules(\n installedAndRequiredBackendModules: BackendModule[]\n) {\n let misMatchedBackendModules: BackendModule[] = [];\n for (let uuid in installedAndRequiredBackendModules) {\n const installedVersion = installedBackendModules[uuid].version;\n const requiredVersion = installedAndRequiredBackendModules[uuid].version;\n const moduleName = installedAndRequiredBackendModules[uuid].uuid;\n\n if (!isVersionInstalled(requiredVersion, installedVersion)) {\n misMatchedBackendModules.push({\n uuid: moduleName,\n requiredVersion: requiredVersion,\n version: installedVersion,\n });\n }\n }\n return misMatchedBackendModules;\n}\n\nfunction isVersionInstalled(requiredVersion: string, installedVersion: string) {\n return semver.eq(\n // @ts-ignore\n semver.coerce(requiredVersion),\n semver.coerce(installedVersion)\n );\n}\n\nexport interface UnresolvedBackendDependencies {\n modulesWithMissingBackendModules: MissingBackendModules[];\n modulesWithWrongBackendModulesVersion: MissingBackendModules[];\n}\n\nexport interface BackendModule {\n uuid: string;\n version: string;\n requiredVersion?: string;\n}\n\nexport interface MissingBackendModules {\n moduleName: string;\n backendModules: BackendModule[];\n}\n\nexport interface Module {\n moduleName: string;\n backendDependencies: Record<string, string>;\n}\n","import { createPortal } from \"react-dom\";\n\nexport function Portal({ el, children }) {\n return el ? createPortal(children, el) : null;\n}\n","import React, { useEffect, useState } from \"react\";\nimport { Portal } from \"./portal\";\nimport styles from \"./styles.css\";\n\nexport interface ExtensionOverlayProps {\n extensionName: string;\n slotModuleName: string;\n slotName: string;\n domElement: HTMLElement;\n}\n\nexport function ExtensionOverlay({\n extensionName,\n slotModuleName,\n slotName,\n domElement,\n}: ExtensionOverlayProps) {\n const [overlayDomElement, setOverlayDomElement] = useState<HTMLElement>();\n\n useEffect(() => {\n if (domElement) {\n const newOverlayDomElement = document.createElement(\"div\");\n domElement.parentElement?.appendChild(newOverlayDomElement);\n setOverlayDomElement(newOverlayDomElement);\n }\n }, [domElement]);\n\n return overlayDomElement ? (\n <Portal\n key={`extension-overlay-${slotModuleName}-${slotName}-${extensionName}`}\n el={overlayDomElement}\n >\n <Content extensionId={extensionName} />\n </Portal>\n ) : null;\n}\n\nfunction Content({ extensionId }) {\n return (\n <button className={styles.extensionOverlay}>\n <span className={styles.extensionTooltip}>{extensionId}</span>\n </button>\n );\n}\n","import React from \"react\";\nimport styles from \"./styles.css\";\nimport { Portal } from \"./portal\";\nimport { ExtensionOverlay } from \"./extension-overlay.component\";\nimport { useExtensionStore } from \"@openmrs/esm-framework\";\n\nexport function UiEditor() {\n const { slots, extensions } = useExtensionStore();\n\n return (\n <>\n {slots\n ? Object.entries(slots).map(([slotName, slotInfo]) =>\n Object.entries(slotInfo.instances).map(\n ([slotModuleName, slotInstance]) => (\n <Portal\n key={`slot-overlay-${slotModuleName}-${slotName}`}\n el={slotInstance.domElement}\n >\n <SlotOverlay slotName={slotName} />\n </Portal>\n )\n )\n )\n : null}\n {extensions\n ? Object.entries(extensions).map(([extensionName, extensionInfo]) =>\n Object.entries(extensionInfo.instances).map(\n ([slotModuleName, bySlotName]) =>\n Object.entries(bySlotName).map(\n ([slotName, extensionInstance]) => {\n return (\n <ExtensionOverlay\n extensionName={extensionName}\n slotModuleName={slotModuleName}\n slotName={slotName}\n domElement={extensionInstance.domElement}\n />\n );\n }\n )\n )\n )\n : null}\n </>\n );\n}\n\nexport function SlotOverlay({ slotName }) {\n return (\n <>\n <div className={styles.slotOverlay}></div>\n <div className={styles.slotName}>{slotName}</div>\n </>\n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport { UserHasAccess, showToast, useStore } from \"@openmrs/esm-framework\";\nimport Popup from \"./popup/popup.component\";\nimport styles from \"./implementer-tools.styles.css\";\nimport {\n checkModules,\n MissingBackendModules,\n} from \"./backend-dependencies/openmrs-backend-dependencies\";\nimport { NotificationActionButton } from \"carbon-components-react/es/components/Notification\";\nimport { UiEditor } from \"./ui-editor/ui-editor\";\nimport { implementerToolsStore } from \"./store\";\n\nexport default function ImplementerTools() {\n return (\n <UserHasAccess privilege=\"coreapps.systemAdministration\">\n <PopupHandler />\n </UserHasAccess>\n );\n}\n\nfunction PopupHandler() {\n const [hasAlert, setHasAlert] = useState(false);\n const [visibleTabIndex, setVisibleTabIndex] = useState(0);\n const [\n modulesWithMissingBackendModules,\n setModulesWithMissingBackendModules,\n ] = useState<Array<MissingBackendModules>>([]);\n const [\n modulesWithWrongBackendModulesVersion,\n setModulesWithWrongBackendModulesVersion,\n ] = useState<Array<MissingBackendModules>>([]);\n const { isOpen, isUIEditorEnabled } = useStore(implementerToolsStore);\n\n function togglePopup() {\n implementerToolsStore.setState({ isOpen: !isOpen });\n }\n\n // loading missing modules\n useEffect(() => {\n checkModules().then(\n ({\n modulesWithMissingBackendModules,\n modulesWithWrongBackendModulesVersion,\n }) => {\n setModulesWithMissingBackendModules(modulesWithMissingBackendModules);\n setModulesWithWrongBackendModulesVersion(\n modulesWithWrongBackendModulesVersion\n );\n }\n );\n }, []);\n\n // displaying toast if modules are missing\n useEffect(() => {\n if (\n !(\n modulesWithMissingBackendModules.length ||\n modulesWithWrongBackendModulesVersion.length\n )\n )\n return;\n\n const showModuleDiagnostics = () => {\n setVisibleTabIndex(1);\n if (!isOpen) {\n togglePopup();\n }\n return false;\n };\n\n showToast({\n description: \"Found modules with unresolved backend dependencies.\",\n action: (\n <NotificationActionButton onClick={showModuleDiagnostics}>\n View\n </NotificationActionButton>\n ),\n kind: \"error\",\n });\n }, [modulesWithMissingBackendModules, modulesWithWrongBackendModulesVersion]);\n\n return (\n <>\n <button\n onClick={togglePopup}\n className={`${styles.popupTriggerButton} ${\n hasAlert ? styles.triggerButtonAlert : \"\"\n }`}\n />\n {isOpen ? (\n <Popup\n close={togglePopup}\n setHasAlert={setHasAlert}\n modulesWithMissingBackendModules={modulesWithMissingBackendModules}\n modulesWithWrongBackendModulesVersion={\n modulesWithWrongBackendModulesVersion\n }\n visibleTabIndex={visibleTabIndex}\n />\n ) : null}\n {isUIEditorEnabled ? <UiEditor /> : null}\n </>\n );\n}\n","var api = require(\"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js??ref--7-1!./configuration.styles.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};"],"sourceRoot":""}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import React, { Fragment, useEffect, useState } from "react";
|
|
2
|
-
import style from "./backend-dependencies-style.css";
|
|
3
|
-
import DataTable, {
|
|
4
|
-
Table,
|
|
5
|
-
TableHead,
|
|
6
|
-
TableRow,
|
|
7
|
-
TableHeader,
|
|
8
|
-
TableBody,
|
|
9
|
-
TableCell,
|
|
10
|
-
TableContainer,
|
|
11
|
-
} from "carbon-components-react/es/components/DataTable";
|
|
12
|
-
import {
|
|
13
|
-
FrontendModule,
|
|
14
|
-
ModuleDiagnosticsProps,
|
|
15
|
-
parseUnresolvedDeps,
|
|
16
|
-
} from "./helpers/backend-dependecies-helper";
|
|
17
|
-
|
|
18
|
-
export const ModuleDiagnostics: React.FC<ModuleDiagnosticsProps> = ({
|
|
19
|
-
modulesWithMissingBackendModules,
|
|
20
|
-
modulesWithWrongBackendModulesVersion,
|
|
21
|
-
setHasAlert,
|
|
22
|
-
}) => {
|
|
23
|
-
const [unresolvedDeps, setUnresolvedDeps] = useState<Array<FrontendModule>>(
|
|
24
|
-
[]
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
if (
|
|
29
|
-
!modulesWithMissingBackendModules.length &&
|
|
30
|
-
!modulesWithWrongBackendModulesVersion.length
|
|
31
|
-
)
|
|
32
|
-
return;
|
|
33
|
-
|
|
34
|
-
setUnresolvedDeps(
|
|
35
|
-
parseUnresolvedDeps(
|
|
36
|
-
modulesWithWrongBackendModulesVersion,
|
|
37
|
-
modulesWithMissingBackendModules
|
|
38
|
-
)
|
|
39
|
-
);
|
|
40
|
-
setHasAlert(true);
|
|
41
|
-
}, [modulesWithMissingBackendModules, modulesWithWrongBackendModulesVersion]);
|
|
42
|
-
|
|
43
|
-
const headers = [
|
|
44
|
-
{
|
|
45
|
-
key: "name",
|
|
46
|
-
header: "Module Name",
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
key: "installedVersion",
|
|
50
|
-
header: "Installed Version",
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
key: "requiredVersion",
|
|
54
|
-
header: "Required Version",
|
|
55
|
-
},
|
|
56
|
-
];
|
|
57
|
-
return (
|
|
58
|
-
<div className={style.panel}>
|
|
59
|
-
<div>
|
|
60
|
-
<DataTable rows={[]} headers={headers}>
|
|
61
|
-
{({ headers, getTableProps, getHeaderProps }) => (
|
|
62
|
-
<TableContainer title={""}>
|
|
63
|
-
<Table {...getTableProps()}>
|
|
64
|
-
<TableHead>
|
|
65
|
-
<TableRow>
|
|
66
|
-
{headers.map((header) => (
|
|
67
|
-
<TableHeader {...getHeaderProps({ header })}>
|
|
68
|
-
{header.header}
|
|
69
|
-
</TableHeader>
|
|
70
|
-
))}
|
|
71
|
-
</TableRow>
|
|
72
|
-
</TableHead>
|
|
73
|
-
<TableBody>
|
|
74
|
-
{unresolvedDeps.map((esm, index) => (
|
|
75
|
-
<Fragment key={esm.name}>
|
|
76
|
-
<TableRow>
|
|
77
|
-
<TableCell>
|
|
78
|
-
<strong>{esm.name}</strong>
|
|
79
|
-
</TableCell>
|
|
80
|
-
<TableCell></TableCell>
|
|
81
|
-
<TableCell></TableCell>
|
|
82
|
-
</TableRow>
|
|
83
|
-
{esm.unresolvedDeps.map((dep) => (
|
|
84
|
-
<TableRow key={dep.name}>
|
|
85
|
-
<TableCell>{dep.name}</TableCell>
|
|
86
|
-
<TableCell>
|
|
87
|
-
{dep.type === "missing" ? (
|
|
88
|
-
<span style={{ color: "red" }}>Missing</span>
|
|
89
|
-
) : (
|
|
90
|
-
dep.installedVersion
|
|
91
|
-
)}
|
|
92
|
-
</TableCell>
|
|
93
|
-
<TableCell>{dep.requiredVersion}</TableCell>
|
|
94
|
-
</TableRow>
|
|
95
|
-
))}
|
|
96
|
-
</Fragment>
|
|
97
|
-
))}
|
|
98
|
-
</TableBody>
|
|
99
|
-
</Table>
|
|
100
|
-
</TableContainer>
|
|
101
|
-
)}
|
|
102
|
-
</DataTable>
|
|
103
|
-
</div>
|
|
104
|
-
</div>
|
|
105
|
-
);
|
|
106
|
-
};
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { parseUnresolvedDeps } from "./backend-dependecies-helper";
|
|
2
|
-
|
|
3
|
-
describe("parseUnresolvedDeps", () => {
|
|
4
|
-
it("should merge and parse missing and mismatched deps into unresolved frontend deps", () => {
|
|
5
|
-
const modulesWithMissingDeps = [
|
|
6
|
-
{
|
|
7
|
-
moduleName: "openmrs-esm-patient-registration",
|
|
8
|
-
backendModules: [
|
|
9
|
-
{
|
|
10
|
-
uuid: "fhir",
|
|
11
|
-
version: "^1.4.2",
|
|
12
|
-
},
|
|
13
|
-
],
|
|
14
|
-
},
|
|
15
|
-
];
|
|
16
|
-
const modulesWithVersionMismatchedDeps = [
|
|
17
|
-
{
|
|
18
|
-
moduleName: "openmrs-esm-home",
|
|
19
|
-
backendModules: [
|
|
20
|
-
{
|
|
21
|
-
uuid: "appui",
|
|
22
|
-
version: "1.4.2",
|
|
23
|
-
requiredVersion: "1.10.0",
|
|
24
|
-
},
|
|
25
|
-
],
|
|
26
|
-
},
|
|
27
|
-
];
|
|
28
|
-
expect(
|
|
29
|
-
parseUnresolvedDeps(
|
|
30
|
-
modulesWithVersionMismatchedDeps,
|
|
31
|
-
modulesWithMissingDeps
|
|
32
|
-
)
|
|
33
|
-
).toEqual([
|
|
34
|
-
{
|
|
35
|
-
name: "openmrs-esm-home",
|
|
36
|
-
unresolvedDeps: [
|
|
37
|
-
{
|
|
38
|
-
name: "appui",
|
|
39
|
-
installedVersion: "1.4.2",
|
|
40
|
-
requiredVersion: "1.10.0",
|
|
41
|
-
type: "version-mismatch",
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name: "openmrs-esm-patient-registration",
|
|
47
|
-
unresolvedDeps: [
|
|
48
|
-
{
|
|
49
|
-
name: "fhir",
|
|
50
|
-
requiredVersion: "^1.4.2",
|
|
51
|
-
type: "missing",
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
},
|
|
55
|
-
]);
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
it("should merge the backend deps of similar esms", () => {
|
|
59
|
-
const modulesWithMissingDeps = [
|
|
60
|
-
{
|
|
61
|
-
moduleName: "openmrs-esm-login-app",
|
|
62
|
-
backendModules: [
|
|
63
|
-
{
|
|
64
|
-
uuid: "fhir",
|
|
65
|
-
version: "^1.4.2",
|
|
66
|
-
},
|
|
67
|
-
],
|
|
68
|
-
},
|
|
69
|
-
];
|
|
70
|
-
const modulesWithVersionMismatchedDeps = [
|
|
71
|
-
{
|
|
72
|
-
moduleName: "openmrs-esm-home",
|
|
73
|
-
backendModules: [
|
|
74
|
-
{
|
|
75
|
-
uuid: "appui",
|
|
76
|
-
version: "1.4.2",
|
|
77
|
-
requiredVersion: "1.10.0",
|
|
78
|
-
},
|
|
79
|
-
],
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
moduleName: "openmrs-esm-login-app",
|
|
83
|
-
backendModules: [
|
|
84
|
-
{
|
|
85
|
-
uuid: "webservice.rest",
|
|
86
|
-
version: "2.2",
|
|
87
|
-
requiredVersion: "2.24.0",
|
|
88
|
-
},
|
|
89
|
-
],
|
|
90
|
-
},
|
|
91
|
-
];
|
|
92
|
-
expect(
|
|
93
|
-
parseUnresolvedDeps(
|
|
94
|
-
modulesWithVersionMismatchedDeps,
|
|
95
|
-
modulesWithMissingDeps
|
|
96
|
-
)
|
|
97
|
-
).toEqual([
|
|
98
|
-
{
|
|
99
|
-
name: "openmrs-esm-home",
|
|
100
|
-
unresolvedDeps: [
|
|
101
|
-
{
|
|
102
|
-
name: "appui",
|
|
103
|
-
installedVersion: "1.4.2",
|
|
104
|
-
requiredVersion: "1.10.0",
|
|
105
|
-
type: "version-mismatch",
|
|
106
|
-
},
|
|
107
|
-
],
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
name: "openmrs-esm-login-app",
|
|
111
|
-
unresolvedDeps: [
|
|
112
|
-
{
|
|
113
|
-
name: "webservice.rest",
|
|
114
|
-
installedVersion: "2.2",
|
|
115
|
-
requiredVersion: "2.24.0",
|
|
116
|
-
type: "version-mismatch",
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
name: "fhir",
|
|
120
|
-
requiredVersion: "^1.4.2",
|
|
121
|
-
type: "missing",
|
|
122
|
-
},
|
|
123
|
-
],
|
|
124
|
-
},
|
|
125
|
-
]);
|
|
126
|
-
});
|
|
127
|
-
});
|