@everymatrix/general-styling-wrapper 1.31.1 → 1.32.4

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 (48) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +3 -2
  3. package/dist/cjs/general-styling-wrapper.cjs.entry.js +0 -88
  4. package/dist/cjs/general-styling-wrapper.cjs.js +0 -19
  5. package/dist/cjs/index-821c995f.js +0 -1396
  6. package/dist/cjs/index.cjs.js +0 -2
  7. package/dist/cjs/loader.cjs.js +0 -21
  8. package/dist/collection/collection-manifest.json +0 -12
  9. package/dist/collection/components/general-styling-wrapper/general-styling-wrapper.css +0 -3
  10. package/dist/collection/components/general-styling-wrapper/general-styling-wrapper.js +0 -146
  11. package/dist/collection/index.js +0 -1
  12. package/dist/collection/utils/device.utils.js +0 -0
  13. package/dist/collection/utils/locale.utils.js +0 -15
  14. package/dist/components/general-styling-wrapper.d.ts +0 -11
  15. package/dist/components/general-styling-wrapper.js +0 -106
  16. package/dist/components/index.d.ts +0 -26
  17. package/dist/components/index.js +0 -1
  18. package/dist/esm/general-styling-wrapper.entry.js +0 -84
  19. package/dist/esm/general-styling-wrapper.js +0 -17
  20. package/dist/esm/index-764451bb.js +0 -1370
  21. package/dist/esm/index.js +0 -1
  22. package/dist/esm/loader.js +0 -17
  23. package/dist/esm/polyfills/core-js.js +0 -11
  24. package/dist/esm/polyfills/css-shim.js +0 -1
  25. package/dist/esm/polyfills/dom.js +0 -79
  26. package/dist/esm/polyfills/es5-html-element.js +0 -1
  27. package/dist/esm/polyfills/index.js +0 -34
  28. package/dist/esm/polyfills/system.js +0 -6
  29. package/dist/general-styling-wrapper/general-styling-wrapper.esm.js +0 -1
  30. package/dist/general-styling-wrapper/index.esm.js +0 -0
  31. package/dist/general-styling-wrapper/p-789f8087.js +0 -1
  32. package/dist/general-styling-wrapper/p-a7ea48d0.entry.js +0 -1
  33. package/dist/index.cjs.js +0 -1
  34. package/dist/index.js +0 -1
  35. package/dist/stencil.config.js +0 -22
  36. package/dist/types/Users/sebastian.strulea/Documents/work/widgets-stencil/packages/general-styling-wrapper/.stencil/packages/general-styling-wrapper/stencil.config.d.ts +0 -2
  37. package/dist/types/components/general-styling-wrapper/general-styling-wrapper.d.ts +0 -26
  38. package/dist/types/components.d.ts +0 -70
  39. package/dist/types/index.d.ts +0 -1
  40. package/dist/types/stencil-public-runtime.d.ts +0 -1565
  41. package/dist/types/utils/device.utils.d.ts +0 -0
  42. package/dist/types/utils/locale.utils.d.ts +0 -8
  43. package/loader/cdn.js +0 -3
  44. package/loader/index.cjs.js +0 -3
  45. package/loader/index.d.ts +0 -12
  46. package/loader/index.es2017.js +0 -3
  47. package/loader/index.js +0 -4
  48. package/loader/package.json +0 -10
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/general-styling-wrapper",
3
- "version": "1.31.1",
3
+ "version": "1.32.4",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -12,5 +12,6 @@
12
12
  "files": [
13
13
  "dist/",
14
14
  "loader/"
15
- ]
15
+ ],
16
+ "gitHead": "69a4e0bb1b0460c07baef352d283492a6e2dc4b0"
16
17
  }
@@ -1,88 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-821c995f.js');
6
-
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);
19
- });
20
- });
21
- };
22
-
23
- const generalStylingWrapperCss = ":host{display:block}";
24
-
25
- 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;
70
- }
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);
78
- }
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); }
85
- };
86
- GeneralStylingWrapper.style = generalStylingWrapperCss;
87
-
88
- exports.general_styling_wrapper = GeneralStylingWrapper;
@@ -1,19 +0,0 @@
1
- 'use strict';
2
-
3
- const index = require('./index-821c995f.js');
4
-
5
- /*
6
- Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
7
- */
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);
15
- };
16
-
17
- patchBrowser().then(options => {
18
- 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
- });