@everymatrix/helper-modal 1.44.0 → 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 (48) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/helper-modal.cjs.entry.js +48 -55
  3. package/dist/cjs/helper-modal.cjs.js +16 -10
  4. package/dist/cjs/index-68e382dd.js +1199 -0
  5. package/dist/cjs/loader.cjs.js +6 -12
  6. package/dist/collection/collection-manifest.json +3 -3
  7. package/dist/collection/components/helper-modal/helper-modal.js +149 -151
  8. package/dist/collection/components/helper-modal/index.js +1 -0
  9. package/dist/collection/utils/utils.js +14 -14
  10. package/dist/esm/app-globals-0f993ce5.js +3 -0
  11. package/dist/esm/helper-modal.entry.js +48 -55
  12. package/dist/esm/helper-modal.js +13 -10
  13. package/dist/esm/index-d1cce61f.js +1172 -0
  14. package/dist/esm/loader.js +6 -12
  15. package/dist/helper-modal/helper-modal.esm.js +1 -1
  16. package/dist/helper-modal/p-60980584.entry.js +1 -0
  17. package/dist/helper-modal/p-b5badfa7.js +2 -0
  18. package/dist/helper-modal/p-e1255160.js +1 -0
  19. package/dist/stencil.config.dev.js +17 -0
  20. package/dist/stencil.config.js +14 -19
  21. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/helper-modal/.stencil/packages/stencil/helper-modal/stencil.config.d.ts +2 -0
  22. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/helper-modal/.stencil/packages/stencil/helper-modal/stencil.config.dev.d.ts +2 -0
  23. package/dist/types/components/helper-modal/helper-modal.d.ts +28 -28
  24. package/dist/types/components/helper-modal/index.d.ts +1 -0
  25. package/dist/types/components.d.ts +16 -1
  26. package/dist/types/stencil-public-runtime.d.ts +142 -33
  27. package/loader/cdn.js +1 -3
  28. package/loader/index.cjs.js +1 -3
  29. package/loader/index.d.ts +13 -1
  30. package/loader/index.es2017.js +1 -3
  31. package/loader/index.js +1 -3
  32. package/loader/package.json +1 -0
  33. package/package.json +8 -1
  34. package/dist/cjs/index-c6e4ec44.js +0 -1181
  35. package/dist/components/helper-modal.d.ts +0 -11
  36. package/dist/components/helper-modal.js +0 -96
  37. package/dist/components/index.d.ts +0 -26
  38. package/dist/components/index.js +0 -1
  39. package/dist/esm/index-4d594e7d.js +0 -1155
  40. package/dist/esm/polyfills/core-js.js +0 -11
  41. package/dist/esm/polyfills/css-shim.js +0 -1
  42. package/dist/esm/polyfills/dom.js +0 -79
  43. package/dist/esm/polyfills/es5-html-element.js +0 -1
  44. package/dist/esm/polyfills/index.js +0 -34
  45. package/dist/esm/polyfills/system.js +0 -6
  46. package/dist/helper-modal/p-1c2c3fd8.js +0 -1
  47. package/dist/helper-modal/p-66f1c138.entry.js +0 -1
  48. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/helper-modal/.stencil/packages/helper-modal/stencil.config.d.ts +0 -2
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ const globalScripts = () => {};
4
+
5
+ exports.globalScripts = globalScripts;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-c6e4ec44.js');
5
+ const index = require('./index-68e382dd.js');
6
6
 
7
7
  /**
8
8
  * @name isMobile
@@ -11,66 +11,59 @@ const index = require('./index-c6e4ec44.js');
11
11
  * @returns {Boolean} true or false
12
12
  */
13
13
  const isMobile = (userAgent) => {
14
- return !!(userAgent.toLowerCase().match(/android/i) ||
15
- userAgent.toLowerCase().match(/blackberry|bb/i) ||
16
- userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
17
- userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
14
+ return !!(userAgent.toLowerCase().match(/android/i) ||
15
+ userAgent.toLowerCase().match(/blackberry|bb/i) ||
16
+ userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
17
+ userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
18
18
  };
19
19
 
20
20
  const helperModalCss = ":host{display:block}.HelperModalWrapper{position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.7);opacity:0;visibility:hidden;transform:scale(1.1);transition:visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;z-index:1}.HelperModalVisible{opacity:1;visibility:visible;transform:scale(1);transition:visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s}.HelperModalContent{position:relative;border:solid 1px #848e97;box-shadow:2px 2px 2px rgba(0, 0, 0, 0.007);font-size:14px;padding:10px 10px 5px 10px;background-color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:600px;max-height:600px;overflow-y:scroll}.HelperModalMobileContent{background:#FFF;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:80%;max-height:350px}.HelperModalClose{cursor:pointer;position:absolute;top:15px;right:15px;font-size:20px;color:#000}.HelperModalMobileClose{position:absolute;top:15px;right:15px;font-size:20px;color:#000}";
21
+ const HelperModalStyle0 = helperModalCss;
21
22
 
22
23
  const HelperModal = class {
23
- constructor(hostRef) {
24
- index.registerInstance(this, hostRef);
25
- this.cancel = index.createEvent(this, "modalCloseEvent", 7);
26
- /**
27
- * Toggles if the helper is visible or not
28
- */
29
- this.visible = true;
30
- /**
31
- * Client custom styling via string
32
- */
33
- this.clientStyling = '';
34
- /**
35
- * Client custom styling via url content
36
- */
37
- this.clientStylingUrlContent = '';
38
- this.limitStylingAppends = false;
39
- this.userAgent = window.navigator.userAgent;
40
- this.setClientStyling = () => {
41
- let sheet = document.createElement('style');
42
- sheet.innerHTML = this.clientStyling;
43
- this.stylingContainer.prepend(sheet);
44
- };
45
- this.setClientStylingURL = () => {
46
- let cssFile = document.createElement('style');
47
- setTimeout(() => {
48
- cssFile.innerHTML = this.clientStylingUrlContent;
49
- this.stylingContainer.prepend(cssFile);
50
- }, 1);
51
- };
52
- }
53
- handleHelperModalClose() {
54
- this.visible = false;
55
- this.cancel.emit();
56
- }
57
- ;
58
- componentDidRender() {
59
- // start custom styling area
60
- if (!this.limitStylingAppends && this.stylingContainer) {
61
- if (this.clientStyling)
62
- this.setClientStyling();
63
- if (this.clientStylingUrlContent)
64
- this.setClientStylingURL();
65
- this.limitStylingAppends = true;
24
+ constructor(hostRef) {
25
+ index.registerInstance(this, hostRef);
26
+ this.cancel = index.createEvent(this, "modalCloseEvent", 7);
27
+ this.userAgent = window.navigator.userAgent;
28
+ this.setClientStyling = () => {
29
+ let sheet = document.createElement('style');
30
+ sheet.innerHTML = this.clientStyling;
31
+ this.stylingContainer.prepend(sheet);
32
+ };
33
+ this.setClientStylingURL = () => {
34
+ let cssFile = document.createElement('style');
35
+ setTimeout(() => {
36
+ cssFile.innerHTML = this.clientStylingUrlContent;
37
+ this.stylingContainer.prepend(cssFile);
38
+ }, 1);
39
+ };
40
+ this.titleModal = undefined;
41
+ this.visible = true;
42
+ this.clientStyling = '';
43
+ this.clientStylingUrlContent = '';
44
+ this.limitStylingAppends = false;
45
+ }
46
+ handleHelperModalClose() {
47
+ this.visible = false;
48
+ this.cancel.emit();
49
+ }
50
+ ;
51
+ componentDidRender() {
52
+ // start custom styling area
53
+ if (!this.limitStylingAppends && this.stylingContainer) {
54
+ if (this.clientStyling)
55
+ this.setClientStyling();
56
+ if (this.clientStylingUrlContent)
57
+ this.setClientStylingURL();
58
+ this.limitStylingAppends = true;
59
+ }
60
+ // end custom styling area
61
+ }
62
+ render() {
63
+ return ((this.visible &&
64
+ index.h("div", { key: 'ba2aed789565b37bfdbb34bdf3ccace827231653', class: this.visible ? "HelperModalWrapper HelperModalVisible" : "HelperModalWrapper", ref: el => this.stylingContainer = el }, index.h("div", { key: '151ca4cd80d259ac955b92b10bf6f0df2698a937', class: "HelperModalWrapper HelperModalVisible" }, index.h("div", { key: '804cb1dea73321c4935e4a8ddb1136e98e89a070', class: "HelperModalContent" + (isMobile(this.userAgent) ? ' HelperModalMobileContent' : '') }, index.h("span", { key: '30cf7928c1e4baa53f3514fc1930823db76c874c', class: "HelperModalClose" + (isMobile(this.userAgent) ? ' HelperModalMobileClose' : ''), onClick: this.handleHelperModalClose.bind(this) }, "X"), index.h("slot", { key: '5c1323a98cdcd09669020a00affe5673856e807e' }))))));
66
65
  }
67
- // end custom styling area
68
- }
69
- render() {
70
- return ((this.visible &&
71
- index.h("div", { class: this.visible ? "HelperModalWrapper HelperModalVisible" : "HelperModalWrapper", ref: el => this.stylingContainer = el }, index.h("div", { class: "HelperModalWrapper HelperModalVisible" }, index.h("div", { class: "HelperModalContent" + (isMobile(this.userAgent) ? ' HelperModalMobileContent' : '') }, index.h("span", { class: "HelperModalClose" + (isMobile(this.userAgent) ? ' HelperModalMobileClose' : ''), onClick: this.handleHelperModalClose.bind(this) }, "X"), index.h("slot", null))))));
72
- }
73
66
  };
74
- HelperModal.style = helperModalCss;
67
+ HelperModal.style = HelperModalStyle0;
75
68
 
76
69
  exports.helper_modal = HelperModal;
@@ -1,19 +1,25 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-c6e4ec44.js');
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-68e382dd.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('helper-modal.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('helper-modal.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([["helper-modal.cjs",[[1,"helper-modal",{"titleModal":[513,"title-modal"],"visible":[1540],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
19
23
  });
24
+
25
+ exports.setNonce = index.setNonce;