@openmrs/esm-styleguide 8.0.1-pre.3545 → 8.0.1-pre.3549
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/.turbo/turbo-build.log +3 -3
- package/dist/openmrs-esm-styleguide.css +1 -1
- package/dist/openmrs-esm-styleguide.css.map +1 -1
- package/dist/openmrs-esm-styleguide.js +1 -1
- package/dist/openmrs-esm-styleguide.js.map +1 -1
- package/package.json +12 -12
- package/src/components/_general.scss +1 -0
- package/src/workspaces2/active-workspace-window.component.tsx +37 -5
- package/src/workspaces2/workspace-windows-and-menu.module.scss +2 -0
- package/src/workspaces2/workspace2.module.scss +9 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-styleguide",
|
|
3
|
-
"version": "8.0.1-pre.
|
|
3
|
+
"version": "8.0.1-pre.3549",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "The styleguide for OpenMRS SPA",
|
|
6
6
|
"main": "dist/openmrs-esm-styleguide.js",
|
|
@@ -98,17 +98,17 @@
|
|
|
98
98
|
"swr": "2.x"
|
|
99
99
|
},
|
|
100
100
|
"devDependencies": {
|
|
101
|
-
"@openmrs/esm-api": "8.0.1-pre.
|
|
102
|
-
"@openmrs/esm-config": "8.0.1-pre.
|
|
103
|
-
"@openmrs/esm-emr-api": "8.0.1-pre.
|
|
104
|
-
"@openmrs/esm-error-handling": "8.0.1-pre.
|
|
105
|
-
"@openmrs/esm-extensions": "8.0.1-pre.
|
|
106
|
-
"@openmrs/esm-globals": "8.0.1-pre.
|
|
107
|
-
"@openmrs/esm-navigation": "8.0.1-pre.
|
|
108
|
-
"@openmrs/esm-react-utils": "8.0.1-pre.
|
|
109
|
-
"@openmrs/esm-state": "8.0.1-pre.
|
|
110
|
-
"@openmrs/esm-translations": "8.0.1-pre.
|
|
111
|
-
"@openmrs/esm-utils": "8.0.1-pre.
|
|
101
|
+
"@openmrs/esm-api": "8.0.1-pre.3549",
|
|
102
|
+
"@openmrs/esm-config": "8.0.1-pre.3549",
|
|
103
|
+
"@openmrs/esm-emr-api": "8.0.1-pre.3549",
|
|
104
|
+
"@openmrs/esm-error-handling": "8.0.1-pre.3549",
|
|
105
|
+
"@openmrs/esm-extensions": "8.0.1-pre.3549",
|
|
106
|
+
"@openmrs/esm-globals": "8.0.1-pre.3549",
|
|
107
|
+
"@openmrs/esm-navigation": "8.0.1-pre.3549",
|
|
108
|
+
"@openmrs/esm-react-utils": "8.0.1-pre.3549",
|
|
109
|
+
"@openmrs/esm-state": "8.0.1-pre.3549",
|
|
110
|
+
"@openmrs/esm-translations": "8.0.1-pre.3549",
|
|
111
|
+
"@openmrs/esm-utils": "8.0.1-pre.3549",
|
|
112
112
|
"@rspack/cli": "^1.3.11",
|
|
113
113
|
"@rspack/core": "^1.3.11",
|
|
114
114
|
"@types/geopattern": "^1.2.9",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
2
3
|
import Parcel from 'single-spa-react/parcel';
|
|
3
4
|
import { mountRootParcel, type ParcelConfig } from 'single-spa';
|
|
4
5
|
import { InlineLoading } from '@carbon/react';
|
|
@@ -7,6 +8,7 @@ import { loadLifeCycles } from '@openmrs/esm-routes';
|
|
|
7
8
|
import { getCoreTranslation } from '@openmrs/esm-translations';
|
|
8
9
|
import { promptForClosingWorkspaces, useWorkspace2Store } from './workspace2';
|
|
9
10
|
import { type Workspace2DefinitionProps } from './workspace2.component';
|
|
11
|
+
import styles from './workspace2.module.scss';
|
|
10
12
|
|
|
11
13
|
interface WorkspaceWindowProps {
|
|
12
14
|
openedWindow: OpenedWindow;
|
|
@@ -110,11 +112,41 @@ const ActiveWorkspace: React.FC<ActiveWorkspaceProps> = ({
|
|
|
110
112
|
[openedWorkspace, closeWorkspace, openedGroup, openedWindow],
|
|
111
113
|
);
|
|
112
114
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
if (!lifeCycle) {
|
|
116
|
+
const { registeredWorkspacesByName } = workspace2Store.getState();
|
|
117
|
+
const workspaceDef = registeredWorkspacesByName[openedWorkspace.workspaceName];
|
|
118
|
+
const windowName = workspaceDef?.window;
|
|
119
|
+
const { registeredWindowsByName } = workspace2Store.getState();
|
|
120
|
+
const windowDef = registeredWindowsByName[windowName];
|
|
121
|
+
const width = windowDef?.width ?? 'narrow';
|
|
122
|
+
|
|
123
|
+
return (
|
|
124
|
+
<div
|
|
125
|
+
className={classNames(styles.workspaceOuterContainer, {
|
|
126
|
+
[styles.narrowWorkspace]: width === 'narrow',
|
|
127
|
+
[styles.widerWorkspace]: width === 'wider',
|
|
128
|
+
[styles.extraWideWorkspace]: width === 'extra-wide',
|
|
129
|
+
})}
|
|
130
|
+
>
|
|
131
|
+
<div className={styles.workspaceSpacer} />
|
|
132
|
+
<div
|
|
133
|
+
className={classNames(styles.workspaceMiddleContainer, {
|
|
134
|
+
[styles.isRootWorkspace]: isRootWorkspace,
|
|
135
|
+
})}
|
|
136
|
+
>
|
|
137
|
+
<div
|
|
138
|
+
className={classNames(styles.workspaceInnerContainer, {
|
|
139
|
+
[styles.isRootWorkspace]: isRootWorkspace,
|
|
140
|
+
})}
|
|
141
|
+
>
|
|
142
|
+
<InlineLoading className={styles.loader} description={`${getCoreTranslation('loading')} ...`} />
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return <Parcel key={openedWorkspace.workspaceName} config={lifeCycle} mountParcel={mountRootParcel} {...props} />;
|
|
118
150
|
};
|
|
119
151
|
|
|
120
152
|
export default ActiveWorkspaceWindow;
|
|
@@ -35,9 +35,10 @@ $extraWideWorkspaceWidth: 48.25rem;
|
|
|
35
35
|
bottom: 0;
|
|
36
36
|
inset-inline-end: var(--actionPanelOffset);
|
|
37
37
|
z-index: 100;
|
|
38
|
+
will-change: transform;
|
|
38
39
|
|
|
39
40
|
&.isRootWorkspace {
|
|
40
|
-
animation:
|
|
41
|
+
animation: slideFromRight 0.5s ease-in-out;
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
transition: width 0.5s ease-in-out;
|
|
@@ -49,12 +50,12 @@ $extraWideWorkspaceWidth: 48.25rem;
|
|
|
49
50
|
width: 0;
|
|
50
51
|
}
|
|
51
52
|
|
|
52
|
-
@keyframes
|
|
53
|
+
@keyframes slideFromRight {
|
|
53
54
|
from {
|
|
54
|
-
|
|
55
|
+
transform: translateX(100%);
|
|
55
56
|
}
|
|
56
57
|
to {
|
|
57
|
-
|
|
58
|
+
transform: translateX(0);
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
61
|
}
|
|
@@ -69,6 +70,7 @@ $extraWideWorkspaceWidth: 48.25rem;
|
|
|
69
70
|
width: var(--workspaceWidth);
|
|
70
71
|
border-inline-start: 1px solid $text-03;
|
|
71
72
|
background-color: #fff;
|
|
73
|
+
will-change: width;
|
|
72
74
|
|
|
73
75
|
transition: width 0.5s ease-in-out;
|
|
74
76
|
|
|
@@ -85,6 +87,7 @@ $extraWideWorkspaceWidth: 48.25rem;
|
|
|
85
87
|
.workspaceSpacer {
|
|
86
88
|
width: inherit;
|
|
87
89
|
height: 100%;
|
|
90
|
+
will-change: width;
|
|
88
91
|
animation: growToWidth 0.5s ease-in-out;
|
|
89
92
|
|
|
90
93
|
&.hidden {
|
|
@@ -113,9 +116,9 @@ $extraWideWorkspaceWidth: 48.25rem;
|
|
|
113
116
|
|
|
114
117
|
.loader {
|
|
115
118
|
display: flex;
|
|
116
|
-
background-color: $openmrs-background-grey;
|
|
117
119
|
justify-content: center;
|
|
118
|
-
|
|
120
|
+
align-items: center;
|
|
121
|
+
min-height: 50%;
|
|
119
122
|
}
|
|
120
123
|
|
|
121
124
|
.hiddenExtraWorkspace {
|