@openmrs/esm-framework 11.0.1-pre.5806 → 11.0.1-pre.5830

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
- [0] Successfully compiled: 4 files with swc (135.6ms)
1
+ [0] Successfully compiled: 4 files with swc (134.99ms)
2
2
  [0] swc --strip-leading-paths src -d dist exited with code 0
3
3
  [1] tsc --project tsconfig.build.json exited with code 0
@@ -4,7 +4,7 @@
4
4
 
5
5
  > `const` **ActionMenuButton2**: `React.FC`\<`ActionMenuButtonProps2`\>
6
6
 
7
- Defined in: [packages/framework/esm-styleguide/src/workspaces2/action-menu2/action-menu-button2.component.tsx:66](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/action-menu2/action-menu-button2.component.tsx#L66)
7
+ Defined in: [packages/framework/esm-styleguide/src/workspaces2/action-menu2/action-menu-button2.component.tsx:82](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/action-menu2/action-menu-button2.component.tsx#L82)
8
8
 
9
9
  The ActionMenuButton2 component is used to render a button in the action menu of a workspace group.
10
10
  The button is associated with a specific workspace window, defined in routes.json of the app with the button.
package/mock-jest.tsx CHANGED
@@ -116,11 +116,17 @@ export const usePatientPhoto = jest.fn(() => ({
116
116
  error: null,
117
117
  }));
118
118
 
119
- export const ActionMenuButton2 = jest.fn(({ label, tagContent, icon }) => (
120
- <button>
121
- {icon} {tagContent} {label}
122
- </button>
123
- ));
119
+ export const ActionMenuButton2 = jest.fn(({ icon: getIcon, label, tagContent, hidden, disabled }) => {
120
+ if (hidden?.([])) {
121
+ return null;
122
+ }
123
+
124
+ return (
125
+ <button disabled={disabled?.([])}>
126
+ {getIcon?.({ size: 16 })} {tagContent} {label}
127
+ </button>
128
+ );
129
+ });
124
130
  export const ActionMenu = jest.fn(() => <div>Action Menu</div>);
125
131
  export const ExportedWorkspace = jest.fn(() => <div>Exported Workspace</div>);
126
132
  export const launchWorkspace2 = jest.fn();
package/mock.tsx CHANGED
@@ -117,11 +117,17 @@ export const usePatientPhoto = vi.fn(() => ({
117
117
  error: null,
118
118
  }));
119
119
 
120
- export const ActionMenuButton2 = vi.fn(({ label, tagContent, icon }) => (
121
- <button>
122
- {icon} {tagContent} {label}
123
- </button>
124
- ));
120
+ export const ActionMenuButton2 = vi.fn(({ icon: getIcon, label, tagContent, hidden, disabled }) => {
121
+ if (hidden?.([])) {
122
+ return null;
123
+ }
124
+
125
+ return (
126
+ <button disabled={disabled?.([])}>
127
+ {getIcon?.({ size: 16 })} {tagContent} {label}
128
+ </button>
129
+ );
130
+ });
125
131
  export const ActionMenu = vi.fn(() => <div>Action Menu</div>);
126
132
  export const ExportedWorkspace = vi.fn(() => <div>Exported Workspace</div>);
127
133
  export const launchWorkspace2 = vi.fn();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-framework",
3
- "version": "11.0.1-pre.5806",
3
+ "version": "11.0.1-pre.5830",
4
4
  "license": "MPL-2.0",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
@@ -60,23 +60,23 @@
60
60
  "access": "public"
61
61
  },
62
62
  "dependencies": {
63
- "@openmrs/esm-api": "11.0.1-pre.5806",
64
- "@openmrs/esm-config": "11.0.1-pre.5806",
65
- "@openmrs/esm-context": "11.0.1-pre.5806",
66
- "@openmrs/esm-dynamic-loading": "11.0.1-pre.5806",
67
- "@openmrs/esm-emr-api": "11.0.1-pre.5806",
68
- "@openmrs/esm-error-handling": "11.0.1-pre.5806",
69
- "@openmrs/esm-expression-evaluator": "11.0.1-pre.5806",
70
- "@openmrs/esm-extensions": "11.0.1-pre.5806",
71
- "@openmrs/esm-feature-flags": "11.0.1-pre.5806",
72
- "@openmrs/esm-globals": "11.0.1-pre.5806",
73
- "@openmrs/esm-navigation": "11.0.1-pre.5806",
74
- "@openmrs/esm-react-utils": "11.0.1-pre.5806",
75
- "@openmrs/esm-routes": "11.0.1-pre.5806",
76
- "@openmrs/esm-state": "11.0.1-pre.5806",
77
- "@openmrs/esm-styleguide": "11.0.1-pre.5806",
78
- "@openmrs/esm-translations": "11.0.1-pre.5806",
79
- "@openmrs/esm-utils": "11.0.1-pre.5806"
63
+ "@openmrs/esm-api": "11.0.1-pre.5830",
64
+ "@openmrs/esm-config": "11.0.1-pre.5830",
65
+ "@openmrs/esm-context": "11.0.1-pre.5830",
66
+ "@openmrs/esm-dynamic-loading": "11.0.1-pre.5830",
67
+ "@openmrs/esm-emr-api": "11.0.1-pre.5830",
68
+ "@openmrs/esm-error-handling": "11.0.1-pre.5830",
69
+ "@openmrs/esm-expression-evaluator": "11.0.1-pre.5830",
70
+ "@openmrs/esm-extensions": "11.0.1-pre.5830",
71
+ "@openmrs/esm-feature-flags": "11.0.1-pre.5830",
72
+ "@openmrs/esm-globals": "11.0.1-pre.5830",
73
+ "@openmrs/esm-navigation": "11.0.1-pre.5830",
74
+ "@openmrs/esm-react-utils": "11.0.1-pre.5830",
75
+ "@openmrs/esm-routes": "11.0.1-pre.5830",
76
+ "@openmrs/esm-state": "11.0.1-pre.5830",
77
+ "@openmrs/esm-styleguide": "11.0.1-pre.5830",
78
+ "@openmrs/esm-translations": "11.0.1-pre.5830",
79
+ "@openmrs/esm-utils": "11.0.1-pre.5830"
80
80
  },
81
81
  "peerDependencies": {
82
82
  "dayjs": "1.x",
@@ -88,7 +88,7 @@
88
88
  "swr": "2.x"
89
89
  },
90
90
  "devDependencies": {
91
- "@openmrs/typedoc-plugin-file-categories": "11.0.1-pre.5806",
91
+ "@openmrs/typedoc-plugin-file-categories": "11.0.1-pre.5830",
92
92
  "@swc/cli": "0.8.1",
93
93
  "@swc/core": "1.15.21",
94
94
  "@vitest/coverage-v8": "^4.1.2",