@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.
Files changed (51) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/general-styling-wrapper.cjs.entry.js +64 -71
  3. package/dist/cjs/general-styling-wrapper.cjs.js +16 -10
  4. package/dist/cjs/index-a5dafaa1.js +1383 -0
  5. package/dist/cjs/loader.cjs.js +6 -12
  6. package/dist/collection/collection-manifest.json +3 -3
  7. package/dist/collection/components/general-styling-wrapper/general-styling-wrapper.js +138 -140
  8. package/dist/collection/components/general-styling-wrapper/index.js +1 -0
  9. package/dist/collection/utils/locale.utils.js +12 -12
  10. package/dist/collection/utils/utils.js +3 -0
  11. package/dist/esm/app-globals-0f993ce5.js +3 -0
  12. package/dist/esm/general-styling-wrapper.entry.js +64 -71
  13. package/dist/esm/general-styling-wrapper.js +13 -10
  14. package/dist/esm/index-17391e29.js +1356 -0
  15. package/dist/esm/loader.js +6 -12
  16. package/dist/general-styling-wrapper/general-styling-wrapper.esm.js +1 -1
  17. package/dist/general-styling-wrapper/p-6458f4e1.js +2 -0
  18. package/dist/general-styling-wrapper/p-a40e8b20.entry.js +1 -0
  19. package/dist/general-styling-wrapper/p-e1255160.js +1 -0
  20. package/dist/stencil.config.dev.js +17 -0
  21. package/dist/stencil.config.js +14 -19
  22. 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
  23. 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
  24. package/dist/types/components/general-styling-wrapper/general-styling-wrapper.d.ts +23 -23
  25. package/dist/types/components/general-styling-wrapper/index.d.ts +1 -0
  26. package/dist/types/components.d.ts +1 -0
  27. package/dist/types/stencil-public-runtime.d.ts +142 -33
  28. package/dist/types/utils/locale.utils.d.ts +2 -2
  29. package/dist/types/utils/utils.d.ts +1 -0
  30. package/loader/cdn.js +1 -3
  31. package/loader/index.cjs.js +1 -3
  32. package/loader/index.d.ts +13 -1
  33. package/loader/index.es2017.js +1 -3
  34. package/loader/index.js +1 -3
  35. package/loader/package.json +1 -0
  36. package/package.json +12 -2
  37. package/dist/cjs/index-821c995f.js +0 -1396
  38. package/dist/components/general-styling-wrapper.d.ts +0 -11
  39. package/dist/components/general-styling-wrapper.js +0 -106
  40. package/dist/components/index.d.ts +0 -26
  41. package/dist/components/index.js +0 -1
  42. package/dist/esm/index-764451bb.js +0 -1370
  43. package/dist/esm/polyfills/core-js.js +0 -11
  44. package/dist/esm/polyfills/css-shim.js +0 -1
  45. package/dist/esm/polyfills/dom.js +0 -79
  46. package/dist/esm/polyfills/es5-html-element.js +0 -1
  47. package/dist/esm/polyfills/index.js +0 -34
  48. package/dist/esm/polyfills/system.js +0 -6
  49. package/dist/general-styling-wrapper/p-789f8087.js +0 -1
  50. package/dist/general-styling-wrapper/p-a7ea48d0.entry.js +0 -1
  51. 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
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ const globalScripts = () => {};
4
+
5
+ exports.globalScripts = globalScripts;
@@ -2,87 +2,80 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-821c995f.js');
5
+ const index = require('./index-a5dafaa1.js');
6
6
 
7
7
  const mergeTranslations = (url, target) => {
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);
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
- constructor(hostRef) {
27
- index.registerInstance(this, hostRef);
28
- /**
29
- * Client custom styling via inline styles
30
- */
31
- this.clientStyling = '';
32
- /**
33
- * Client custom styling via url
34
- */
35
- this.clientStylingUrl = '';
36
- /**
37
- * Translation via url
38
- */
39
- this.translationUrl = '';
40
- this.stylingAppends = false;
41
- this.setClientStyling = () => {
42
- let sheet = document.createElement('style');
43
- sheet.innerHTML = this.clientStyling;
44
- this.el.prepend(sheet);
45
- };
46
- this.setClientStylingURL = () => {
47
- let url = new URL(this.clientStylingUrl);
48
- let cssFile = document.createElement('style');
49
- fetch(url.href)
50
- .then((res) => res.text())
51
- .then((data) => {
52
- cssFile.innerHTML = data;
53
- setTimeout(() => {
54
- this.el.prepend(cssFile);
55
- }, 1);
56
- })
57
- .catch((err) => {
58
- console.log('error ', err);
59
- });
60
- };
61
- }
62
- componentDidRender() {
63
- // start custom styling area
64
- if (!this.stylingAppends) {
65
- if (this.clientStyling)
66
- this.setClientStyling();
67
- if (this.clientStylingUrl)
68
- this.setClientStylingURL();
69
- this.stylingAppends = true;
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
- // end custom styling area
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 await Promise.all(promises);
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 = generalStylingWrapperCss;
79
+ GeneralStylingWrapper.style = GeneralStylingWrapperStyle0;
87
80
 
88
81
  exports.general_styling_wrapper = GeneralStylingWrapper;
@@ -1,19 +1,25 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-821c995f.js');
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 v2.15.2 | MIT Licensed | https://stenciljs.com
9
+ Stencil Client Patch Browser v4.20.0 | MIT Licensed | https://stenciljs.com
7
10
  */
8
- const patchBrowser = () => {
9
- 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));
10
- const opts = {};
11
- if (importMeta !== '') {
12
- opts.resourcesUrl = new URL('.', importMeta).href;
13
- }
14
- return index.promiseResolve(opts);
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;