@everymatrix/general-styling-wrapper 1.43.4 → 1.45.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/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/general-styling-wrapper.cjs.entry.js +64 -71
- package/dist/cjs/general-styling-wrapper.cjs.js +16 -10
- package/dist/cjs/index-a5dafaa1.js +1383 -0
- package/dist/cjs/loader.cjs.js +6 -12
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/general-styling-wrapper/general-styling-wrapper.js +138 -140
- package/dist/collection/components/general-styling-wrapper/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +12 -12
- package/dist/collection/utils/utils.js +3 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/general-styling-wrapper.entry.js +64 -71
- package/dist/esm/general-styling-wrapper.js +13 -10
- package/dist/esm/index-17391e29.js +1356 -0
- package/dist/esm/loader.js +6 -12
- package/dist/general-styling-wrapper/general-styling-wrapper.esm.js +1 -1
- package/dist/general-styling-wrapper/p-6458f4e1.js +2 -0
- package/dist/general-styling-wrapper/p-a40e8b20.entry.js +1 -0
- package/dist/general-styling-wrapper/p-e1255160.js +1 -0
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +14 -19
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-styling-wrapper/.stencil/packages/stencil/general-styling-wrapper/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-styling-wrapper/.stencil/packages/stencil/general-styling-wrapper/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/general-styling-wrapper/general-styling-wrapper.d.ts +23 -23
- package/dist/types/components/general-styling-wrapper/index.d.ts +1 -0
- package/dist/types/components.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/dist/types/utils/locale.utils.d.ts +2 -2
- package/dist/types/utils/utils.d.ts +1 -0
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +13 -1
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/loader/package.json +1 -0
- package/package.json +12 -2
- package/dist/cjs/index-821c995f.js +0 -1396
- package/dist/components/general-styling-wrapper.d.ts +0 -11
- package/dist/components/general-styling-wrapper.js +0 -106
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/esm/index-764451bb.js +0 -1370
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/general-styling-wrapper/p-789f8087.js +0 -1
- package/dist/general-styling-wrapper/p-a7ea48d0.entry.js +0 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/general-styling-wrapper/.stencil/packages/general-styling-wrapper/stencil.config.d.ts +0 -2
|
@@ -2,87 +2,80 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-a5dafaa1.js');
|
|
6
6
|
|
|
7
7
|
const mergeTranslations = (url, target) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
return new Promise((resolve) => {
|
|
9
|
+
fetch(url)
|
|
10
|
+
.then((res) => res.json())
|
|
11
|
+
.then((data) => {
|
|
12
|
+
Object.keys(data).forEach((item) => {
|
|
13
|
+
target[item] = target[item] ? target[item] : {};
|
|
14
|
+
for (let key in data[item]) {
|
|
15
|
+
target[item][key] = data[item][key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
resolve(true);
|
|
19
|
+
});
|
|
19
20
|
});
|
|
20
|
-
});
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
const generalStylingWrapperCss = ":host{display:block}";
|
|
24
|
+
const GeneralStylingWrapperStyle0 = generalStylingWrapperCss;
|
|
24
25
|
|
|
25
26
|
const GeneralStylingWrapper = class {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
.
|
|
51
|
-
.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
27
|
+
constructor(hostRef) {
|
|
28
|
+
index.registerInstance(this, hostRef);
|
|
29
|
+
this.stylingAppends = false;
|
|
30
|
+
this.setClientStyling = () => {
|
|
31
|
+
let sheet = document.createElement('style');
|
|
32
|
+
sheet.innerHTML = this.clientStyling;
|
|
33
|
+
this.el.prepend(sheet);
|
|
34
|
+
};
|
|
35
|
+
this.setClientStylingURL = () => {
|
|
36
|
+
let url = new URL(this.clientStylingUrl);
|
|
37
|
+
let cssFile = document.createElement('style');
|
|
38
|
+
fetch(url.href)
|
|
39
|
+
.then((res) => res.text())
|
|
40
|
+
.then((data) => {
|
|
41
|
+
cssFile.innerHTML = data;
|
|
42
|
+
setTimeout(() => {
|
|
43
|
+
this.el.prepend(cssFile);
|
|
44
|
+
}, 1);
|
|
45
|
+
})
|
|
46
|
+
.catch((err) => {
|
|
47
|
+
console.log('error ', err);
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
this.clientStyling = '';
|
|
51
|
+
this.clientStylingUrl = '';
|
|
52
|
+
this.translationUrl = '';
|
|
53
|
+
this.targetTranslations = undefined;
|
|
54
|
+
}
|
|
55
|
+
componentDidRender() {
|
|
56
|
+
// start custom styling area
|
|
57
|
+
if (!this.stylingAppends) {
|
|
58
|
+
if (this.clientStyling)
|
|
59
|
+
this.setClientStyling();
|
|
60
|
+
if (this.clientStylingUrl)
|
|
61
|
+
this.setClientStylingURL();
|
|
62
|
+
this.stylingAppends = true;
|
|
63
|
+
}
|
|
64
|
+
// end custom styling area
|
|
65
|
+
}
|
|
66
|
+
async componentWillLoad() {
|
|
67
|
+
const promises = [];
|
|
68
|
+
if (this.translationUrl) {
|
|
69
|
+
const translationPromise = mergeTranslations(this.translationUrl, this.targetTranslations);
|
|
70
|
+
promises.push(translationPromise);
|
|
71
|
+
}
|
|
72
|
+
return await Promise.all(promises);
|
|
70
73
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
async componentWillLoad() {
|
|
74
|
-
const promises = [];
|
|
75
|
-
if (this.translationUrl) {
|
|
76
|
-
const translationPromise = mergeTranslations(this.translationUrl, this.targetTranslations);
|
|
77
|
-
promises.push(translationPromise);
|
|
74
|
+
render() {
|
|
75
|
+
return (index.h("div", { key: '4d3414408c7662f88331dbe655966237f74d6958', class: "StyleShell" }, index.h("slot", { key: '1d004644d84602c4314bdf5dfc26b55b160f57df', name: "mainContent" })));
|
|
78
76
|
}
|
|
79
|
-
return
|
|
80
|
-
}
|
|
81
|
-
render() {
|
|
82
|
-
return (index.h("div", { class: "StyleShell" }, index.h("slot", { name: "mainContent" })));
|
|
83
|
-
}
|
|
84
|
-
get el() { return index.getElement(this); }
|
|
77
|
+
get el() { return index.getElement(this); }
|
|
85
78
|
};
|
|
86
|
-
GeneralStylingWrapper.style =
|
|
79
|
+
GeneralStylingWrapper.style = GeneralStylingWrapperStyle0;
|
|
87
80
|
|
|
88
81
|
exports.general_styling_wrapper = GeneralStylingWrapper;
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-a5dafaa1.js');
|
|
6
|
+
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
4
7
|
|
|
5
8
|
/*
|
|
6
|
-
Stencil Client Patch Browser
|
|
9
|
+
Stencil Client Patch Browser v4.20.0 | MIT Licensed | https://stenciljs.com
|
|
7
10
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
var patchBrowser = () => {
|
|
12
|
+
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('general-styling-wrapper.cjs.js', document.baseURI).href));
|
|
13
|
+
const opts = {};
|
|
14
|
+
if (importMeta !== "") {
|
|
15
|
+
opts.resourcesUrl = new URL(".", importMeta).href;
|
|
16
|
+
}
|
|
17
|
+
return index.promiseResolve(opts);
|
|
15
18
|
};
|
|
16
19
|
|
|
17
|
-
patchBrowser().then(options => {
|
|
20
|
+
patchBrowser().then(async (options) => {
|
|
21
|
+
await appGlobals.globalScripts();
|
|
18
22
|
return index.bootstrapLazy([["general-styling-wrapper.cjs",[[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]]], options);
|
|
19
23
|
});
|
|
24
|
+
|
|
25
|
+
exports.setNonce = index.setNonce;
|