@cc-openmrs/cc-esm-active-prescriptions 1.0.46 → 1.0.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/762.js CHANGED
@@ -1 +1 @@
1
- "use strict";(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[762],{9762(c,e,s){s.r(e),s.d(e,{default:()=>t});var a=s(6072),r=s(9564);const t=function(c){var e=c.className;return a.createElement(r.Nt,{className:e,size:20})}}}]);
1
+ "use strict";(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[762],{9762(e,r,t){t.r(r),t.d(r,{default:()=>p});var c=t(6072),n=t(9564),o=t(5987);function i(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var s=(0,c.forwardRef)(function(e,r){var t,s,p=(0,c.useCallback)(function(e){e.stopPropagation(),(0,o.launchWorkspace)("cc-active-prescriptions-workspace")},[]);return c.createElement(n.Nt,(t=function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},c=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(c=c.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),c.forEach(function(r){i(e,r,t[r])})}return e}({ref:r},e),s=null!=(s={size:20,onClick:p,style:{cursor:"pointer"}})?s:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(s)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}),t))});const p=s}}]);
@@ -596,9 +596,9 @@
596
596
  "initial": false,
597
597
  "entry": false,
598
598
  "recorded": false,
599
- "size": 339,
599
+ "size": 2432,
600
600
  "sizes": {
601
- "javascript": 339
601
+ "javascript": 2432
602
602
  },
603
603
  "names": [],
604
604
  "idHints": [],
@@ -612,7 +612,7 @@
612
612
  "auxiliaryFiles": [
613
613
  "762.js.map"
614
614
  ],
615
- "hash": "6cefd8a007bf7a8f",
615
+ "hash": "a2cbf8023b529031",
616
616
  "childrenByOrder": {}
617
617
  },
618
618
  {
package/dist/routes.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":">=2.2.0"},"extensions":[{"name":"Red box","component":"redBox","slot":"Boxes"},{"name":"Blue box","component":"blueBox","slot":"Boxes"},{"name":"Brand box","component":"blueBox","slot":"Boxes"}],"pages":[{"component":"root","route":"root"}],"workspaces2":[{"name":"cc-active-prescriptions-workspace","component":"root","window":"cc-active-prescriptions-window"}],"workspaceWindows2":[{"name":"cc-active-prescriptions-window","group":"patient-chart","icon":"prescriptionsSiderailIcon","order":50}],"version":"1.0.46"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":">=2.2.0"},"extensions":[{"name":"Red box","component":"redBox","slot":"Boxes"},{"name":"Blue box","component":"blueBox","slot":"Boxes"},{"name":"Brand box","component":"blueBox","slot":"Boxes"}],"pages":[{"component":"root","route":"root"}],"workspaces2":[{"name":"cc-active-prescriptions-workspace","component":"root","window":"cc-active-prescriptions-window"}],"workspaceWindows2":[{"name":"cc-active-prescriptions-window","group":"patient-chart","icon":"prescriptionsSiderailIcon","order":50}],"version":"1.0.47"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cc-openmrs/cc-esm-active-prescriptions",
3
- "version": "1.0.46",
3
+ "version": "1.0.47",
4
4
  "license": "MPL-2.0",
5
5
  "description": "An OpenMRS seed application for building microfrontends",
6
6
  "browser": "dist/openmrs-esm-template-app.js",
@@ -1,8 +1,25 @@
1
- import React from 'react';
1
+ import React, { useCallback, forwardRef } from 'react';
2
2
  import { Pills } from '@carbon/icons-react';
3
+ import { launchWorkspace } from '@openmrs/esm-framework';
3
4
 
4
- const PrescriptionsSiderailIcon: React.FC<any> = ({ className }) => {
5
- return <Pills className={className} size={20} />;
6
- };
5
+ const PrescriptionsSiderailIcon = forwardRef<any, any>((props, ref) => {
6
+ const handleClick = useCallback(
7
+ (e) => {
8
+ e.stopPropagation(); // importante
9
+ launchWorkspace('cc-active-prescriptions-workspace');
10
+ },
11
+ []
12
+ );
13
+
14
+ return (
15
+ <Pills
16
+ ref={ref}
17
+ {...props}
18
+ size={20}
19
+ onClick={handleClick}
20
+ style={{ cursor: 'pointer' }}
21
+ />
22
+ );
23
+ });
7
24
 
8
25
  export default PrescriptionsSiderailIcon;