ui-layout-manager-dev 0.0.30-dev → 0.0.32-dev
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/cjs/index.js +3 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/LayoutManager/Components/RootContainer/RootContainer.jsx +5 -5
- package/src/components/LayoutManager/Components/RootContainer/RootContainer.scss +23 -22
- package/src/components/LayoutManager/Controller/LayoutController.js +2 -2
package/package.json
CHANGED
|
@@ -30,13 +30,13 @@ export const RootContainer = () => {
|
|
|
30
30
|
const timerRef = useRef(null);
|
|
31
31
|
const resizingRef = useRef(false);
|
|
32
32
|
const loadingOverlayRef = useRef(null);
|
|
33
|
-
const [
|
|
33
|
+
const [showLoadingScreen, setShowLoadingScreen] = useState(true);
|
|
34
34
|
|
|
35
35
|
// Create the container API that will be used by the controller.
|
|
36
36
|
const rootContainerAPI = useRef({});
|
|
37
37
|
rootContainerAPI.current = {
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
hideLoadingScreen: () => {
|
|
39
|
+
setShowLoadingScreen(false);
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
|
|
@@ -124,7 +124,7 @@ export const RootContainer = () => {
|
|
|
124
124
|
observer.disconnect();
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
}, [layoutController
|
|
127
|
+
}, [layoutController]);
|
|
128
128
|
|
|
129
129
|
const sensors = useSensors(
|
|
130
130
|
useSensor(PointerSensor, {
|
|
@@ -153,7 +153,7 @@ export const RootContainer = () => {
|
|
|
153
153
|
onDragEnd={dragController.onDragEnd}
|
|
154
154
|
onDragCancel={dragController.onDragCancel}>
|
|
155
155
|
|
|
156
|
-
{
|
|
156
|
+
{showLoadingScreen && <div className="loading-overlay" ref={loadingOverlayRef}>
|
|
157
157
|
<div className="loading-bar">
|
|
158
158
|
<div className="loading-bar-fill"></div>
|
|
159
159
|
</div>
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
.relative-container {
|
|
9
9
|
position: relative;
|
|
10
|
-
display:flex;
|
|
11
|
-
width:100%;
|
|
10
|
+
display: flex;
|
|
11
|
+
width: 100%;
|
|
12
12
|
height: 100%;
|
|
13
13
|
overflow: hidden;
|
|
14
14
|
}
|
|
@@ -33,30 +33,31 @@
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
.loading-bar {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
width: 100%;
|
|
37
|
+
height: 4px;
|
|
38
|
+
background: #1a1a1a;
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
position: relative;
|
|
41
|
+
border-radius: 999px;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
.loading-bar-fill {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
45
|
+
position: absolute;
|
|
46
|
+
top: 0;
|
|
47
|
+
left: -40%;
|
|
48
|
+
width: 40%;
|
|
49
|
+
height: 100%;
|
|
50
|
+
background: #4da3ff;
|
|
51
|
+
border-radius: 999px;
|
|
52
|
+
animation: loading-slide 1.2s infinite ease-in-out;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
@keyframes loading-slide {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
0% {
|
|
57
|
+
left: -40%;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
100% {
|
|
61
|
+
left: 100%;
|
|
62
|
+
}
|
|
62
63
|
}
|
|
@@ -171,6 +171,8 @@ export class LayoutController {
|
|
|
171
171
|
};
|
|
172
172
|
if (isInitial) {
|
|
173
173
|
this.layoutLoaded = true;
|
|
174
|
+
// After initial layout is applied, we can hide the loading screen.
|
|
175
|
+
this.containers["root"].current.hideLoadingScreen();
|
|
174
176
|
}
|
|
175
177
|
});
|
|
176
178
|
};
|
|
@@ -185,8 +187,6 @@ export class LayoutController {
|
|
|
185
187
|
case LAYOUT_WORKER_PROTOCOL.INITIALIZE_FLEXBOX:
|
|
186
188
|
transformations = event.data.data;
|
|
187
189
|
this.applyTransformations(transformations, true);
|
|
188
|
-
// After initial layout is applied, we can hide the loading overlay.
|
|
189
|
-
this.containers["root"].current.hideOverlay();
|
|
190
190
|
break;
|
|
191
191
|
case LAYOUT_WORKER_PROTOCOL.TRANSFORMATIONS:
|
|
192
192
|
transformations = event.data.data;
|