@everymatrix/helper-modal 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.
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/helper-modal.cjs.entry.js +48 -55
- package/dist/cjs/helper-modal.cjs.js +16 -10
- package/dist/cjs/index-68e382dd.js +1199 -0
- package/dist/cjs/loader.cjs.js +6 -12
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/helper-modal/helper-modal.js +149 -151
- package/dist/collection/components/helper-modal/index.js +1 -0
- package/dist/collection/utils/utils.js +14 -14
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/helper-modal.entry.js +48 -55
- package/dist/esm/helper-modal.js +13 -10
- package/dist/esm/index-d1cce61f.js +1172 -0
- package/dist/esm/loader.js +6 -12
- package/dist/helper-modal/helper-modal.esm.js +1 -1
- package/dist/helper-modal/p-60980584.entry.js +1 -0
- package/dist/helper-modal/p-b5badfa7.js +2 -0
- package/dist/helper-modal/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/helper-modal/.stencil/packages/stencil/helper-modal/stencil.config.d.ts +2 -0
- 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
- package/dist/types/components/helper-modal/helper-modal.d.ts +28 -28
- package/dist/types/components/helper-modal/index.d.ts +1 -0
- package/dist/types/components.d.ts +16 -1
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- 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 +8 -1
- package/dist/cjs/index-c6e4ec44.js +0 -1181
- package/dist/components/helper-modal.d.ts +0 -11
- package/dist/components/helper-modal.js +0 -96
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/esm/index-4d594e7d.js +0 -1155
- 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/helper-modal/p-1c2c3fd8.js +0 -1
- package/dist/helper-modal/p-66f1c138.entry.js +0 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/helper-modal/.stencil/packages/helper-modal/stencil.config.d.ts +0 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
this.
|
|
63
|
-
|
|
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 =
|
|
67
|
+
HelperModal.style = HelperModalStyle0;
|
|
75
68
|
|
|
76
69
|
exports.helper_modal = HelperModal;
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
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
|
|
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('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;
|