@everymatrix/general-styling-wrapper 1.44.0 → 1.45.2

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
@@ -2,20 +2,14 @@
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
+ const appGlobals = require('./app-globals-3a1e7e63.js');
6
7
 
7
- /*
8
- Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
9
- */
10
- const patchEsm = () => {
11
- return index.promiseResolve();
12
- };
13
-
14
- const defineCustomElements = (win, options) => {
15
- if (typeof window === 'undefined') return Promise.resolve();
16
- return patchEsm().then(() => {
8
+ const defineCustomElements = async (win, options) => {
9
+ if (typeof window === 'undefined') return undefined;
10
+ await appGlobals.globalScripts();
17
11
  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);
18
- });
19
12
  };
20
13
 
14
+ exports.setNonce = index.setNonce;
21
15
  exports.defineCustomElements = defineCustomElements;
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "entries": [
3
- "./components/general-styling-wrapper/general-styling-wrapper.js"
3
+ "components/general-styling-wrapper/general-styling-wrapper.js"
4
4
  ],
5
5
  "compiler": {
6
6
  "name": "@stencil/core",
7
- "version": "2.15.2",
8
- "typescriptVersion": "4.5.4"
7
+ "version": "4.20.0",
8
+ "typescriptVersion": "5.5.3"
9
9
  },
10
10
  "collections": [],
11
11
  "bundles": []
@@ -1,146 +1,144 @@
1
- import { Component, Prop, h, Element } from '@stencil/core';
2
- import { mergeTranslations } from '../../utils/locale.utils';
1
+ import { h } from "@stencil/core";
2
+ import { mergeTranslations } from "../../utils/locale.utils";
3
3
  export class GeneralStylingWrapper {
4
- constructor() {
5
- /**
6
- * Client custom styling via inline styles
7
- */
8
- this.clientStyling = '';
9
- /**
10
- * Client custom styling via url
11
- */
12
- this.clientStylingUrl = '';
13
- /**
14
- * Translation via url
15
- */
16
- this.translationUrl = '';
17
- this.stylingAppends = false;
18
- this.setClientStyling = () => {
19
- let sheet = document.createElement('style');
20
- sheet.innerHTML = this.clientStyling;
21
- this.el.prepend(sheet);
22
- };
23
- this.setClientStylingURL = () => {
24
- let url = new URL(this.clientStylingUrl);
25
- let cssFile = document.createElement('style');
26
- fetch(url.href)
27
- .then((res) => res.text())
28
- .then((data) => {
29
- cssFile.innerHTML = data;
30
- setTimeout(() => {
31
- this.el.prepend(cssFile);
32
- }, 1);
33
- })
34
- .catch((err) => {
35
- console.log('error ', err);
36
- });
37
- };
38
- }
39
- componentDidRender() {
40
- // start custom styling area
41
- if (!this.stylingAppends) {
42
- if (this.clientStyling)
43
- this.setClientStyling();
44
- if (this.clientStylingUrl)
45
- this.setClientStylingURL();
46
- this.stylingAppends = true;
4
+ constructor() {
5
+ this.stylingAppends = false;
6
+ this.setClientStyling = () => {
7
+ let sheet = document.createElement('style');
8
+ sheet.innerHTML = this.clientStyling;
9
+ this.el.prepend(sheet);
10
+ };
11
+ this.setClientStylingURL = () => {
12
+ let url = new URL(this.clientStylingUrl);
13
+ let cssFile = document.createElement('style');
14
+ fetch(url.href)
15
+ .then((res) => res.text())
16
+ .then((data) => {
17
+ cssFile.innerHTML = data;
18
+ setTimeout(() => {
19
+ this.el.prepend(cssFile);
20
+ }, 1);
21
+ })
22
+ .catch((err) => {
23
+ console.log('error ', err);
24
+ });
25
+ };
26
+ this.clientStyling = '';
27
+ this.clientStylingUrl = '';
28
+ this.translationUrl = '';
29
+ this.targetTranslations = undefined;
47
30
  }
48
- // end custom styling area
49
- }
50
- async componentWillLoad() {
51
- const promises = [];
52
- if (this.translationUrl) {
53
- const translationPromise = mergeTranslations(this.translationUrl, this.targetTranslations);
54
- promises.push(translationPromise);
31
+ componentDidRender() {
32
+ // start custom styling area
33
+ if (!this.stylingAppends) {
34
+ if (this.clientStyling)
35
+ this.setClientStyling();
36
+ if (this.clientStylingUrl)
37
+ this.setClientStylingURL();
38
+ this.stylingAppends = true;
39
+ }
40
+ // end custom styling area
55
41
  }
56
- return await Promise.all(promises);
57
- }
58
- render() {
59
- return (h("div", { class: "StyleShell" },
60
- h("slot", { name: "mainContent" })));
61
- }
62
- static get is() { return "general-styling-wrapper"; }
63
- static get originalStyleUrls() { return {
64
- "$": ["general-styling-wrapper.scss"]
65
- }; }
66
- static get styleUrls() { return {
67
- "$": ["general-styling-wrapper.css"]
68
- }; }
69
- static get properties() { return {
70
- "clientStyling": {
71
- "type": "string",
72
- "mutable": false,
73
- "complexType": {
74
- "original": "string",
75
- "resolved": "string",
76
- "references": {}
77
- },
78
- "required": false,
79
- "optional": false,
80
- "docs": {
81
- "tags": [],
82
- "text": "Client custom styling via inline styles"
83
- },
84
- "attribute": "client-styling",
85
- "reflect": false,
86
- "defaultValue": "''"
87
- },
88
- "clientStylingUrl": {
89
- "type": "string",
90
- "mutable": false,
91
- "complexType": {
92
- "original": "string",
93
- "resolved": "string",
94
- "references": {}
95
- },
96
- "required": false,
97
- "optional": false,
98
- "docs": {
99
- "tags": [],
100
- "text": "Client custom styling via url"
101
- },
102
- "attribute": "client-styling-url",
103
- "reflect": false,
104
- "defaultValue": "''"
105
- },
106
- "translationUrl": {
107
- "type": "string",
108
- "mutable": false,
109
- "complexType": {
110
- "original": "string",
111
- "resolved": "string",
112
- "references": {}
113
- },
114
- "required": false,
115
- "optional": false,
116
- "docs": {
117
- "tags": [],
118
- "text": "Translation via url"
119
- },
120
- "attribute": "translation-url",
121
- "reflect": false,
122
- "defaultValue": "''"
123
- },
124
- "targetTranslations": {
125
- "type": "unknown",
126
- "mutable": false,
127
- "complexType": {
128
- "original": "Translations",
129
- "resolved": "Translations",
130
- "references": {
131
- "Translations": {
132
- "location": "import",
133
- "path": "../../utils/locale.utils"
134
- }
42
+ async componentWillLoad() {
43
+ const promises = [];
44
+ if (this.translationUrl) {
45
+ const translationPromise = mergeTranslations(this.translationUrl, this.targetTranslations);
46
+ promises.push(translationPromise);
135
47
  }
136
- },
137
- "required": false,
138
- "optional": false,
139
- "docs": {
140
- "tags": [],
141
- "text": "Translation be merged to"
142
- }
48
+ return await Promise.all(promises);
49
+ }
50
+ render() {
51
+ return (h("div", { key: '4d3414408c7662f88331dbe655966237f74d6958', class: "StyleShell" }, h("slot", { key: '1d004644d84602c4314bdf5dfc26b55b160f57df', name: "mainContent" })));
52
+ }
53
+ static get is() { return "general-styling-wrapper"; }
54
+ static get originalStyleUrls() {
55
+ return {
56
+ "$": ["general-styling-wrapper.scss"]
57
+ };
58
+ }
59
+ static get styleUrls() {
60
+ return {
61
+ "$": ["general-styling-wrapper.css"]
62
+ };
63
+ }
64
+ static get properties() {
65
+ return {
66
+ "clientStyling": {
67
+ "type": "string",
68
+ "mutable": false,
69
+ "complexType": {
70
+ "original": "string",
71
+ "resolved": "string",
72
+ "references": {}
73
+ },
74
+ "required": false,
75
+ "optional": false,
76
+ "docs": {
77
+ "tags": [],
78
+ "text": "Client custom styling via inline styles"
79
+ },
80
+ "attribute": "client-styling",
81
+ "reflect": false,
82
+ "defaultValue": "''"
83
+ },
84
+ "clientStylingUrl": {
85
+ "type": "string",
86
+ "mutable": false,
87
+ "complexType": {
88
+ "original": "string",
89
+ "resolved": "string",
90
+ "references": {}
91
+ },
92
+ "required": false,
93
+ "optional": false,
94
+ "docs": {
95
+ "tags": [],
96
+ "text": "Client custom styling via url"
97
+ },
98
+ "attribute": "client-styling-url",
99
+ "reflect": false,
100
+ "defaultValue": "''"
101
+ },
102
+ "translationUrl": {
103
+ "type": "string",
104
+ "mutable": false,
105
+ "complexType": {
106
+ "original": "string",
107
+ "resolved": "string",
108
+ "references": {}
109
+ },
110
+ "required": false,
111
+ "optional": false,
112
+ "docs": {
113
+ "tags": [],
114
+ "text": "Translation via url"
115
+ },
116
+ "attribute": "translation-url",
117
+ "reflect": false,
118
+ "defaultValue": "''"
119
+ },
120
+ "targetTranslations": {
121
+ "type": "unknown",
122
+ "mutable": false,
123
+ "complexType": {
124
+ "original": "Translations",
125
+ "resolved": "Translations",
126
+ "references": {
127
+ "Translations": {
128
+ "location": "import",
129
+ "path": "../../utils/locale.utils",
130
+ "id": "../../../../packages/stencil/general-styling-wrapper/src/utils/locale.utils.ts::Translations"
131
+ }
132
+ }
133
+ },
134
+ "required": false,
135
+ "optional": false,
136
+ "docs": {
137
+ "tags": [],
138
+ "text": "Translation be merged to"
139
+ }
140
+ }
141
+ };
143
142
  }
144
- }; }
145
- static get elementRef() { return "el"; }
143
+ static get elementRef() { return "el"; }
146
144
  }
@@ -0,0 +1 @@
1
+ export { GeneralStylingWrapper } from './general-styling-wrapper';
@@ -1,15 +1,15 @@
1
1
  export const mergeTranslations = (url, target) => {
2
- return new Promise((resolve) => {
3
- fetch(url)
4
- .then((res) => res.json())
5
- .then((data) => {
6
- Object.keys(data).forEach((item) => {
7
- target[item] = target[item] ? target[item] : {};
8
- for (let key in data[item]) {
9
- target[item][key] = data[item][key];
10
- }
11
- });
12
- resolve(true);
2
+ return new Promise((resolve) => {
3
+ fetch(url)
4
+ .then((res) => res.json())
5
+ .then((data) => {
6
+ Object.keys(data).forEach((item) => {
7
+ target[item] = target[item] ? target[item] : {};
8
+ for (let key in data[item]) {
9
+ target[item][key] = data[item][key];
10
+ }
11
+ });
12
+ resolve(true);
13
+ });
13
14
  });
14
- });
15
15
  };
@@ -0,0 +1,3 @@
1
+ export function format(first, middle, last) {
2
+ return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');
3
+ }
@@ -0,0 +1,3 @@
1
+ const globalScripts = () => {};
2
+
3
+ export { globalScripts as g };
@@ -1,84 +1,77 @@
1
- import { r as registerInstance, h, g as getElement } from './index-764451bb.js';
1
+ import { r as registerInstance, h, g as getElement } from './index-17391e29.js';
2
2
 
3
3
  const mergeTranslations = (url, target) => {
4
- return new Promise((resolve) => {
5
- fetch(url)
6
- .then((res) => res.json())
7
- .then((data) => {
8
- Object.keys(data).forEach((item) => {
9
- target[item] = target[item] ? target[item] : {};
10
- for (let key in data[item]) {
11
- target[item][key] = data[item][key];
12
- }
13
- });
14
- resolve(true);
4
+ return new Promise((resolve) => {
5
+ fetch(url)
6
+ .then((res) => res.json())
7
+ .then((data) => {
8
+ Object.keys(data).forEach((item) => {
9
+ target[item] = target[item] ? target[item] : {};
10
+ for (let key in data[item]) {
11
+ target[item][key] = data[item][key];
12
+ }
13
+ });
14
+ resolve(true);
15
+ });
15
16
  });
16
- });
17
17
  };
18
18
 
19
19
  const generalStylingWrapperCss = ":host{display:block}";
20
+ const GeneralStylingWrapperStyle0 = generalStylingWrapperCss;
20
21
 
21
22
  const GeneralStylingWrapper = class {
22
- constructor(hostRef) {
23
- registerInstance(this, hostRef);
24
- /**
25
- * Client custom styling via inline styles
26
- */
27
- this.clientStyling = '';
28
- /**
29
- * Client custom styling via url
30
- */
31
- this.clientStylingUrl = '';
32
- /**
33
- * Translation via url
34
- */
35
- this.translationUrl = '';
36
- this.stylingAppends = false;
37
- this.setClientStyling = () => {
38
- let sheet = document.createElement('style');
39
- sheet.innerHTML = this.clientStyling;
40
- this.el.prepend(sheet);
41
- };
42
- this.setClientStylingURL = () => {
43
- let url = new URL(this.clientStylingUrl);
44
- let cssFile = document.createElement('style');
45
- fetch(url.href)
46
- .then((res) => res.text())
47
- .then((data) => {
48
- cssFile.innerHTML = data;
49
- setTimeout(() => {
50
- this.el.prepend(cssFile);
51
- }, 1);
52
- })
53
- .catch((err) => {
54
- console.log('error ', err);
55
- });
56
- };
57
- }
58
- componentDidRender() {
59
- // start custom styling area
60
- if (!this.stylingAppends) {
61
- if (this.clientStyling)
62
- this.setClientStyling();
63
- if (this.clientStylingUrl)
64
- this.setClientStylingURL();
65
- this.stylingAppends = true;
23
+ constructor(hostRef) {
24
+ registerInstance(this, hostRef);
25
+ this.stylingAppends = false;
26
+ this.setClientStyling = () => {
27
+ let sheet = document.createElement('style');
28
+ sheet.innerHTML = this.clientStyling;
29
+ this.el.prepend(sheet);
30
+ };
31
+ this.setClientStylingURL = () => {
32
+ let url = new URL(this.clientStylingUrl);
33
+ let cssFile = document.createElement('style');
34
+ fetch(url.href)
35
+ .then((res) => res.text())
36
+ .then((data) => {
37
+ cssFile.innerHTML = data;
38
+ setTimeout(() => {
39
+ this.el.prepend(cssFile);
40
+ }, 1);
41
+ })
42
+ .catch((err) => {
43
+ console.log('error ', err);
44
+ });
45
+ };
46
+ this.clientStyling = '';
47
+ this.clientStylingUrl = '';
48
+ this.translationUrl = '';
49
+ this.targetTranslations = undefined;
50
+ }
51
+ componentDidRender() {
52
+ // start custom styling area
53
+ if (!this.stylingAppends) {
54
+ if (this.clientStyling)
55
+ this.setClientStyling();
56
+ if (this.clientStylingUrl)
57
+ this.setClientStylingURL();
58
+ this.stylingAppends = true;
59
+ }
60
+ // end custom styling area
61
+ }
62
+ async componentWillLoad() {
63
+ const promises = [];
64
+ if (this.translationUrl) {
65
+ const translationPromise = mergeTranslations(this.translationUrl, this.targetTranslations);
66
+ promises.push(translationPromise);
67
+ }
68
+ return await Promise.all(promises);
66
69
  }
67
- // end custom styling area
68
- }
69
- async componentWillLoad() {
70
- const promises = [];
71
- if (this.translationUrl) {
72
- const translationPromise = mergeTranslations(this.translationUrl, this.targetTranslations);
73
- promises.push(translationPromise);
70
+ render() {
71
+ return (h("div", { key: '4d3414408c7662f88331dbe655966237f74d6958', class: "StyleShell" }, h("slot", { key: '1d004644d84602c4314bdf5dfc26b55b160f57df', name: "mainContent" })));
74
72
  }
75
- return await Promise.all(promises);
76
- }
77
- render() {
78
- return (h("div", { class: "StyleShell" }, h("slot", { name: "mainContent" })));
79
- }
80
- get el() { return getElement(this); }
73
+ get el() { return getElement(this); }
81
74
  };
82
- GeneralStylingWrapper.style = generalStylingWrapperCss;
75
+ GeneralStylingWrapper.style = GeneralStylingWrapperStyle0;
83
76
 
84
77
  export { GeneralStylingWrapper as general_styling_wrapper };
@@ -1,17 +1,20 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-764451bb.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-17391e29.js';
2
+ export { s as setNonce } from './index-17391e29.js';
3
+ import { g as globalScripts } from './app-globals-0f993ce5.js';
2
4
 
3
5
  /*
4
- Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v4.20.0 | MIT Licensed | https://stenciljs.com
5
7
  */
6
- const patchBrowser = () => {
7
- const importMeta = import.meta.url;
8
- const opts = {};
9
- if (importMeta !== '') {
10
- opts.resourcesUrl = new URL('.', importMeta).href;
11
- }
12
- return promiseResolve(opts);
8
+ var patchBrowser = () => {
9
+ const importMeta = import.meta.url;
10
+ const opts = {};
11
+ if (importMeta !== "") {
12
+ opts.resourcesUrl = new URL(".", importMeta).href;
13
+ }
14
+ return promiseResolve(opts);
13
15
  };
14
16
 
15
- patchBrowser().then(options => {
17
+ patchBrowser().then(async (options) => {
18
+ await globalScripts();
16
19
  return bootstrapLazy([["general-styling-wrapper",[[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]]], options);
17
20
  });