@commercetools-frontend/mc-html-template 21.3.3 → 21.5.0
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 +51 -5
- package/dist/commercetools-frontend-mc-html-template.cjs.d.ts +1 -0
- package/dist/commercetools-frontend-mc-html-template.cjs.dev.js +255 -0
- package/dist/commercetools-frontend-mc-html-template.cjs.js +7 -0
- package/dist/commercetools-frontend-mc-html-template.cjs.prod.js +255 -0
- package/dist/commercetools-frontend-mc-html-template.esm.js +227 -0
- package/dist/declarations/src/compile-html.d.ts +8 -0
- package/dist/declarations/src/generate-template.d.ts +6 -0
- package/dist/declarations/src/index.d.ts +4 -0
- package/dist/declarations/src/load-html-docs.d.ts +3 -0
- package/dist/declarations/src/load-html-scripts.d.ts +7 -0
- package/dist/declarations/src/load-html-styles.d.ts +5 -0
- package/dist/declarations/src/process-headers.d.ts +3 -0
- package/dist/declarations/src/replace-html-placeholders.d.ts +7 -0
- package/dist/declarations/src/utils/create-asset-hash.d.ts +2 -0
- package/dist/declarations/src/utils/sanitize-app-environment.d.ts +3 -0
- package/dist/declarations/src/webpack-html-template.d.ts +3 -0
- package/dist/generate-template-211c0b41.cjs.dev.js +16 -0
- package/dist/generate-template-600664a1.cjs.prod.js +16 -0
- package/dist/generate-template-e252c441.esm.js +14 -0
- package/package.json +16 -41
- package/webpack-html-template/dist/commercetools-frontend-mc-html-template-webpack-html-template.cjs.d.ts +2 -0
- package/webpack-html-template/dist/commercetools-frontend-mc-html-template-webpack-html-template.cjs.dev.js +57 -0
- package/webpack-html-template/dist/commercetools-frontend-mc-html-template-webpack-html-template.cjs.js +7 -0
- package/webpack-html-template/dist/commercetools-frontend-mc-html-template-webpack-html-template.cjs.prod.js +57 -0
- package/webpack-html-template/dist/commercetools-frontend-mc-html-template-webpack-html-template.esm.js +46 -0
- package/webpack-html-template/package.json +4 -0
- package/webpack.js +5 -27
- package/build/compile-html.js +0 -27
- package/build/generate-template.js +0 -82
- package/build/index.js +0 -6
- package/build/load-html-scripts.js +0 -25
- package/build/load-html-styles.js +0 -21
- package/build/process-headers.js +0 -116
- package/build/process-headers.spec.js +0 -98
- package/build/utils/create-asset-hash.js +0 -16
- package/build/utils/replace-html-placeholders.js +0 -22
- package/build/utils/sanitize-app-environment.js +0 -9
- package/build/utils/substitute-env-variable-placeholders.js +0 -74
- package/build/utils/substitute-env-variable-placeholders.spec.js +0 -42
- package/html-scripts/.eslintrc.yaml +0 -2
- package/html-scripts/data-layer.js +0 -1
- package/html-scripts/loading-screen.js +0 -26
- package/html-styles/loading-screen.css +0 -50
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// Assigning global callback used by ConfigureIntlProvider to remove
|
|
2
|
-
// loading screen.
|
|
3
|
-
window.onAppLoaded = function onAppLoaded() {
|
|
4
|
-
const appLoaderEl = document.querySelector('#app-loader');
|
|
5
|
-
|
|
6
|
-
if (appLoaderEl) {
|
|
7
|
-
appLoaderEl.parentNode.removeChild(appLoaderEl);
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
// Handles showing and hiding different loading screen elements
|
|
11
|
-
// Needs to be compatible with all browsers supported without transpilation.
|
|
12
|
-
(function removeLoaders() {
|
|
13
|
-
setTimeout(function removeLoadingScreen() {
|
|
14
|
-
const loadingScreenEl = document.querySelector('.loading-screen');
|
|
15
|
-
if (loadingScreenEl) {
|
|
16
|
-
loadingScreenEl.classList.remove('loading-screen--hidden');
|
|
17
|
-
}
|
|
18
|
-
}, 250);
|
|
19
|
-
|
|
20
|
-
setTimeout(function removeLongLoadingNotice() {
|
|
21
|
-
const longLoadingNoticeEl = document.querySelector('.long-loading-notice');
|
|
22
|
-
if (longLoadingNoticeEl) {
|
|
23
|
-
longLoadingNoticeEl.classList.remove('long-loading-notice--hidden');
|
|
24
|
-
}
|
|
25
|
-
}, 2000);
|
|
26
|
-
})();
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
.loading-screen {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
align-items: center;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
height: 100vh;
|
|
7
|
-
width: 100vw;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.loading-screen--hidden {
|
|
11
|
-
display: none;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.loading-screen > * + * {
|
|
15
|
-
margin: 24px 0 0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.loading-spinner {
|
|
19
|
-
width: 32px;
|
|
20
|
-
height: 32px;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.long-loading-notice {
|
|
24
|
-
color: #999;
|
|
25
|
-
font-family: 'Open Sans', sans-serif;
|
|
26
|
-
font-size: 12px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.long-loading-notice--hidden {
|
|
30
|
-
visibility: hidden;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.loading-spinner-circle {
|
|
34
|
-
fill: #213c45;
|
|
35
|
-
opacity: 0.2;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
@keyframes loading-spinner-animation {
|
|
39
|
-
0% {
|
|
40
|
-
transform: rotate(0deg);
|
|
41
|
-
}
|
|
42
|
-
100% {
|
|
43
|
-
transform: rotate(360deg);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.loading-spinner-pointer {
|
|
48
|
-
transform-origin: 20px 20px 0;
|
|
49
|
-
animation: loading-spinner-animation 0.5s infinite linear;
|
|
50
|
-
}
|