@epigraph/epigraph-std-lib 5.0.0-alpha.13 → 5.0.0-alpha.14
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/README.md +68 -68
- package/dist/Epigraph/epigraph.cjs +1 -1
- package/dist/Epigraph/epigraph.js +126 -94
- package/dist/Epigraph/epigraphBaseSolutions.cjs +1 -1
- package/dist/Epigraph/epigraphBaseSolutions.js +68 -60
- package/dist/EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.cjs +16 -1
- package/dist/EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.d.ts +2 -0
- package/dist/EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.js +1057 -2
- package/dist/EpigraphLibs/EpigraphAnalytics/plugins/ga4-analytics-plugin.d.ts +11 -6
- package/dist/EpigraphLibs/EpigraphAnalytics/plugins/nexus-solutions-analytics-plugin.d.ts +50 -0
- package/dist/EpigraphLibs/EpigraphLogger/epigraphLogger.cjs +1 -1
- package/dist/EpigraphLibs/EpigraphLogger/epigraphLogger.js +198 -74
- package/dist/EpigraphLibs/EpigraphNexusApi/epigraphNexusApi.cjs +1 -1
- package/dist/EpigraphLibs/EpigraphNexusApi/epigraphNexusApi.js +425 -197
- package/dist/EpigraphLibs/EpigraphQrCodeGenerator/epigraphQrCodeGenerator.cjs +7 -1
- package/dist/EpigraphLibs/EpigraphQrCodeGenerator/epigraphQrCodeGenerator.js +78 -2
- package/dist/EpigraphLibs/EpigraphResultFactory/epigraphResultFactory.cjs +1 -1
- package/dist/EpigraphLibs/EpigraphResultFactory/epigraphResultFactory.js +26 -24
- package/dist/EpigraphLibs/EpigraphUnitsConverter/epigraphUnitsConverter.cjs +1 -1
- package/dist/EpigraphLibs/EpigraphUnitsConverter/epigraphUnitsConverter.js +88 -2
- package/dist/EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.cjs +1 -1
- package/dist/EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.js +75 -44
- package/dist/enums-1vqWxJ0i.cjs +1 -0
- package/dist/enums-CvOTKyNu.js +5 -0
- package/dist/epigraph-std-lib.cjs +1 -1
- package/dist/epigraph-std-lib.js +74 -11
- package/dist/lit-element-C3moVMGu.js +524 -0
- package/dist/lit-element-CYaaFRfk.cjs +19 -0
- package/package.json +40 -40
- package/dist/enums-BSSe4NAs.js +0 -8
- package/dist/enums-PfFMiIoe.cjs +0 -1
- package/dist/epigraphAnalytics-CF9Czp8C.js +0 -722
- package/dist/epigraphAnalytics-H3EZRDUh.cjs +0 -1
- package/dist/epigraphQrCodeGenerator-BXUNL2XK.js +0 -54
- package/dist/epigraphQrCodeGenerator-F2eLrPC_.cjs +0 -7
- package/dist/epigraphUnitsConverter-CwpmWl7p.cjs +0 -1
- package/dist/epigraphUnitsConverter-DsX4Rmsp.js +0 -66
- package/dist/lit--5TUYSGn.js +0 -508
- package/dist/lit-DZtv4Pds.cjs +0 -2
|
@@ -1,2 +1,78 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { i as d, a as l, x as C } from "../../lit-element-C3moVMGu.js";
|
|
2
|
+
import { query as p } from "lit/decorators.js";
|
|
3
|
+
import m from "qr-creator";
|
|
4
|
+
var f = Object.defineProperty, c = (i, t, e, n) => {
|
|
5
|
+
for (var r = void 0, a = i.length - 1, o; a >= 0; a--)
|
|
6
|
+
(o = i[a]) && (r = o(t, e, r) || r);
|
|
7
|
+
return r && f(t, e, r), r;
|
|
8
|
+
};
|
|
9
|
+
class s extends d {
|
|
10
|
+
static {
|
|
11
|
+
this.webComponentName = "epigraph-qr-code-generator";
|
|
12
|
+
}
|
|
13
|
+
static {
|
|
14
|
+
this.styles = l`
|
|
15
|
+
:host {
|
|
16
|
+
display: none;
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
}
|
|
20
|
+
get qrCodeGenCanvasRef() {
|
|
21
|
+
return this._qrCodeGenCanvasRef;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Converts any given data uri to a blob.
|
|
25
|
+
*
|
|
26
|
+
* @param {string} dataUri Raw data URI, either fetched from an HTML Canvas or any other valid source.
|
|
27
|
+
* @returns {Blob} The generate blob.
|
|
28
|
+
*/
|
|
29
|
+
dataUritoBlob(t) {
|
|
30
|
+
const e = t.split(",");
|
|
31
|
+
if (e.length !== 2)
|
|
32
|
+
throw new Error("Invalid data URI format");
|
|
33
|
+
const n = e[0].split(":")[1].split(";")[0], r = atob(e[1]), a = new Uint8Array(Array.from(r, (o) => o.charCodeAt(0)));
|
|
34
|
+
return new Blob([a], { type: n });
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Generates a QR code as image data url for the qrCodeContent provided.
|
|
38
|
+
*
|
|
39
|
+
* @param {string} qrCodeContent The content to be embedded in the QR code.
|
|
40
|
+
* @returns {string} Session data URL for the generated QR code.
|
|
41
|
+
*/
|
|
42
|
+
generateQrCode(t = {
|
|
43
|
+
text: "www.epigraph.us",
|
|
44
|
+
radius: 0.5,
|
|
45
|
+
// 0.0 to 0.5
|
|
46
|
+
ecLevel: "H",
|
|
47
|
+
// L, M, Q, H
|
|
48
|
+
fill: "black",
|
|
49
|
+
// foreground color
|
|
50
|
+
background: null,
|
|
51
|
+
// color or null for transparent
|
|
52
|
+
size: 256
|
|
53
|
+
// in pixels
|
|
54
|
+
}) {
|
|
55
|
+
if (!this._qrCodeGenCanvasRef)
|
|
56
|
+
return "";
|
|
57
|
+
m.render(t, this._qrCodeGenCanvasRef);
|
|
58
|
+
const e = this._qrCodeGenCanvasRef.toDataURL(), n = this.dataUritoBlob(e);
|
|
59
|
+
return URL.createObjectURL(n);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Override for the LitElement's render method.
|
|
63
|
+
*
|
|
64
|
+
* @returns {html} HTML to be rendered by this component.
|
|
65
|
+
*/
|
|
66
|
+
render() {
|
|
67
|
+
return C`
|
|
68
|
+
<canvas id="qrCodeCanvas"></canvas>
|
|
69
|
+
`;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
c([
|
|
73
|
+
p("#qrCodeCanvas")
|
|
74
|
+
], s.prototype, "_qrCodeGenCanvasRef");
|
|
75
|
+
window.customElements.get(s.webComponentName) === void 0 && window.customElements.define(s.webComponentName, s);
|
|
76
|
+
export {
|
|
77
|
+
s as EpigraphQrCodeGenerator
|
|
78
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class u{constructor(s,t,r,a=""){this._success=s,this._payload=t,this._status=r,this._message=a}get success(){return this._success}get payload(){return this._payload}get status(){return this._status}get message(){return this._message}}function c(e,s,t=""){return new u(!0,e,s,t)}function l(e,s,t=""){return new u(!1,e,s,t)}exports.Result=u;exports.failureResult=l;exports.successResult=c;
|
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return new e(!0, t, n, r);
|
|
1
|
+
class u {
|
|
2
|
+
constructor(s, t, r, a = "") {
|
|
3
|
+
this._success = s, this._payload = t, this._status = r, this._message = a;
|
|
4
|
+
}
|
|
5
|
+
get success() {
|
|
6
|
+
return this._success;
|
|
7
|
+
}
|
|
8
|
+
get payload() {
|
|
9
|
+
return this._payload;
|
|
10
|
+
}
|
|
11
|
+
get status() {
|
|
12
|
+
return this._status;
|
|
13
|
+
}
|
|
14
|
+
get message() {
|
|
15
|
+
return this._message;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function c(e, s, t = "") {
|
|
19
|
+
return new u(!0, e, s, t);
|
|
21
20
|
}
|
|
22
|
-
function n(
|
|
23
|
-
|
|
21
|
+
function n(e, s, t = "") {
|
|
22
|
+
return new u(!1, e, s, t);
|
|
24
23
|
}
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
export {
|
|
25
|
+
u as Result,
|
|
26
|
+
n as failureResult,
|
|
27
|
+
c as successResult
|
|
28
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var n=(r=>(r.RAW="raw",r.DISTANCE="distance",r.WEIGHT="weight",r))(n||{}),e=(r=>(r.millimeter="mm",r.centimeter="cm",r.decimeter="dm",r.meter="m",r.decameter="dam",r.hectometer="hm",r.kilometer="km",r.inch="in",r.foot="ft",r.yard="yd",r.mile="mi",r))(e||{});let t={};t[`${e.millimeter}-${e.meter}`]=.001;t[`${e.meter}-${e.millimeter}`]=1e3;t[`${e.centimeter}-${e.meter}`]=.01;t[`${e.meter}-${e.centimeter}`]=100;t[`${e.decimeter}-${e.meter}`]=.1;t[`${e.meter}-${e.decimeter}`]=10;t[`${e.meter}-${e.meter}`]=1;t[`${e.decameter}-${e.meter}`]=10;t[`${e.meter}-${e.decameter}`]=.1;t[`${e.hectometer}-${e.meter}`]=100;t[`${e.meter}-${e.hectometer}`]=.01;t[`${e.kilometer}-${e.meter}`]=1e3;t[`${e.meter}-${e.kilometer}`]=.001;t[`${e.inch}-${e.meter}`]=.0254;t[`${e.meter}-${e.inch}`]=39.3701;t[`${e.foot}-${e.meter}`]=.3048;t[`${e.meter}-${e.foot}`]=3.28084;t[`${e.yard}-${e.meter}`]=.9144;t[`${e.meter}-${e.yard}`]=1.09361;t[`${e.mile}-${e.meter}`]=1609.34;t[`${e.meter}-${e.mile}`]=621371e-9;class m{constructor(l,i){if(this._type=n.DISTANCE,this._rawValue=l,this._rawValueUnit=i,i!==e.meter){const u=m.convert(this._rawValue,i,e.meter);this._rawValue=u.value,this._rawValueUnit=u.valueUnit}}get type(){return this._type}static buildConvertedUnitResult(l,i){return{value:l,valueUnit:i,valueWithUnit:`${l.toFixed(2)}${i}`}}static convert(l,i,u){let a=l,o=u;if(i===u)return m.buildConvertedUnitResult(a,o);const $=t[`${i}-${u}`];return a=l*$,m.buildConvertedUnitResult(a,o)}get inMillimeters(){return m.convert(this._rawValue,this._rawValueUnit,e.millimeter)}get inCentimeters(){return m.convert(this._rawValue,this._rawValueUnit,e.centimeter)}get inDecimeters(){return m.convert(this._rawValue,this._rawValueUnit,e.decimeter)}get inMeters(){return m.convert(this._rawValue,this._rawValueUnit,e.meter)}get inDecameters(){return m.convert(this._rawValue,this._rawValueUnit,e.decameter)}get inHectometers(){return m.convert(this._rawValue,this._rawValueUnit,e.hectometer)}get inKilometers(){return m.convert(this._rawValue,this._rawValueUnit,e.kilometer)}get inInches(){return m.convert(this._rawValue,this._rawValueUnit,e.inch)}get inFeet(){return m.convert(this._rawValue,this._rawValueUnit,e.foot)}get inYard(){return m.convert(this._rawValue,this._rawValueUnit,e.yard)}get inMiles(){return m.convert(this._rawValue,this._rawValueUnit,e.mile)}}exports.Distance=m;exports.DistanceUnits=e;exports.UnitTypes=n;
|
|
@@ -1,2 +1,88 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var o = /* @__PURE__ */ ((t) => (t.RAW = "raw", t.DISTANCE = "distance", t.WEIGHT = "weight", t))(o || {}), e = /* @__PURE__ */ ((t) => (t.millimeter = "mm", t.centimeter = "cm", t.decimeter = "dm", t.meter = "m", t.decameter = "dam", t.hectometer = "hm", t.kilometer = "km", t.inch = "in", t.foot = "ft", t.yard = "yd", t.mile = "mi", t))(e || {});
|
|
2
|
+
let r = {};
|
|
3
|
+
r[`${e.millimeter}-${e.meter}`] = 1e-3;
|
|
4
|
+
r[`${e.meter}-${e.millimeter}`] = 1e3;
|
|
5
|
+
r[`${e.centimeter}-${e.meter}`] = 0.01;
|
|
6
|
+
r[`${e.meter}-${e.centimeter}`] = 100;
|
|
7
|
+
r[`${e.decimeter}-${e.meter}`] = 0.1;
|
|
8
|
+
r[`${e.meter}-${e.decimeter}`] = 10;
|
|
9
|
+
r[`${e.meter}-${e.meter}`] = 1;
|
|
10
|
+
r[`${e.decameter}-${e.meter}`] = 10;
|
|
11
|
+
r[`${e.meter}-${e.decameter}`] = 0.1;
|
|
12
|
+
r[`${e.hectometer}-${e.meter}`] = 100;
|
|
13
|
+
r[`${e.meter}-${e.hectometer}`] = 0.01;
|
|
14
|
+
r[`${e.kilometer}-${e.meter}`] = 1e3;
|
|
15
|
+
r[`${e.meter}-${e.kilometer}`] = 1e-3;
|
|
16
|
+
r[`${e.inch}-${e.meter}`] = 0.0254;
|
|
17
|
+
r[`${e.meter}-${e.inch}`] = 39.3701;
|
|
18
|
+
r[`${e.foot}-${e.meter}`] = 0.3048;
|
|
19
|
+
r[`${e.meter}-${e.foot}`] = 3.28084;
|
|
20
|
+
r[`${e.yard}-${e.meter}`] = 0.9144;
|
|
21
|
+
r[`${e.meter}-${e.yard}`] = 1.09361;
|
|
22
|
+
r[`${e.mile}-${e.meter}`] = 1609.34;
|
|
23
|
+
r[`${e.meter}-${e.mile}`] = 621371e-9;
|
|
24
|
+
class m {
|
|
25
|
+
constructor(l, i) {
|
|
26
|
+
if (this._type = o.DISTANCE, this._rawValue = l, this._rawValueUnit = i, i !== e.meter) {
|
|
27
|
+
const u = m.convert(this._rawValue, i, e.meter);
|
|
28
|
+
this._rawValue = u.value, this._rawValueUnit = u.valueUnit;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
get type() {
|
|
32
|
+
return this._type;
|
|
33
|
+
}
|
|
34
|
+
static buildConvertedUnitResult(l, i) {
|
|
35
|
+
return {
|
|
36
|
+
value: l,
|
|
37
|
+
valueUnit: i,
|
|
38
|
+
valueWithUnit: `${l.toFixed(2)}${i}`
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
static convert(l, i, u) {
|
|
42
|
+
let a = l, $ = u;
|
|
43
|
+
if (i === u)
|
|
44
|
+
return m.buildConvertedUnitResult(a, $);
|
|
45
|
+
const n = r[`${i}-${u}`];
|
|
46
|
+
return a = l * n, m.buildConvertedUnitResult(a, $);
|
|
47
|
+
}
|
|
48
|
+
/** ----------------- METRIC UNITS ----------------- */
|
|
49
|
+
get inMillimeters() {
|
|
50
|
+
return m.convert(this._rawValue, this._rawValueUnit, e.millimeter);
|
|
51
|
+
}
|
|
52
|
+
get inCentimeters() {
|
|
53
|
+
return m.convert(this._rawValue, this._rawValueUnit, e.centimeter);
|
|
54
|
+
}
|
|
55
|
+
get inDecimeters() {
|
|
56
|
+
return m.convert(this._rawValue, this._rawValueUnit, e.decimeter);
|
|
57
|
+
}
|
|
58
|
+
get inMeters() {
|
|
59
|
+
return m.convert(this._rawValue, this._rawValueUnit, e.meter);
|
|
60
|
+
}
|
|
61
|
+
get inDecameters() {
|
|
62
|
+
return m.convert(this._rawValue, this._rawValueUnit, e.decameter);
|
|
63
|
+
}
|
|
64
|
+
get inHectometers() {
|
|
65
|
+
return m.convert(this._rawValue, this._rawValueUnit, e.hectometer);
|
|
66
|
+
}
|
|
67
|
+
get inKilometers() {
|
|
68
|
+
return m.convert(this._rawValue, this._rawValueUnit, e.kilometer);
|
|
69
|
+
}
|
|
70
|
+
/** ----------------- METRIC UNITS ----------------- */
|
|
71
|
+
get inInches() {
|
|
72
|
+
return m.convert(this._rawValue, this._rawValueUnit, e.inch);
|
|
73
|
+
}
|
|
74
|
+
get inFeet() {
|
|
75
|
+
return m.convert(this._rawValue, this._rawValueUnit, e.foot);
|
|
76
|
+
}
|
|
77
|
+
get inYard() {
|
|
78
|
+
return m.convert(this._rawValue, this._rawValueUnit, e.yard);
|
|
79
|
+
}
|
|
80
|
+
get inMiles() {
|
|
81
|
+
return m.convert(this._rawValue, this._rawValueUnit, e.mile);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
export {
|
|
85
|
+
m as Distance,
|
|
86
|
+
e as DistanceUnits,
|
|
87
|
+
o as UnitTypes
|
|
88
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var n=(r=>(r.AR="ar",r))(n||{}),i=(r=>(r.type="t",r.identifierType="idt",r.identifier="id",r.epigraphSessionId="eid",r.action="a",r.sharedConfig="sc",r))(i||{});class l{constructor(e=window.location.href){this._baseUrl=e}get baseUrl(){return this._baseUrl}set baseUrl(e){this._baseUrl=e}getParameterInUrl(e){const a=new URL(this._baseUrl);let t=a.searchParams.get(e);return t||(t=this.decryptQueryParametersInUrl(a).searchParams.get(e)),t}hasParameterInUrl(e){return!!this.getParameterInUrl(e)}generateQrCodeUrl(e={},a=!0){const t=new URL(this._baseUrl);for(const[s,c]of Object.entries(e))t.searchParams.set(s,c);return a&&this.encryptQueryParametersInUrl(t),t}encryptQueryParametersInUrl(e){return e.search=btoa(e.search),e}decryptQueryParametersInUrl(e){let a=e;try{e.search=atob(e.search.slice(1)),a=e}catch(t){window.epigraph.logger.info({title:`Couldn't decode URL: ${e}`,details:t})}return a}}exports.EpigraphUrlProcessor=l;exports.QUERY_PARAMETER_ACTION_NAMES=n;exports.QUERY_PARAMETER_NAMES=i;
|
|
@@ -1,45 +1,76 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
1
|
+
var i = /* @__PURE__ */ ((r) => (r.AR = "ar", r))(i || {}), c = /* @__PURE__ */ ((r) => (r.type = "t", r.identifierType = "idt", r.identifier = "id", r.epigraphSessionId = "eid", r.action = "a", r.sharedConfig = "sc", r))(c || {});
|
|
2
|
+
class l {
|
|
3
|
+
constructor(e = window.location.href) {
|
|
4
|
+
this._baseUrl = e;
|
|
5
|
+
}
|
|
6
|
+
get baseUrl() {
|
|
7
|
+
return this._baseUrl;
|
|
8
|
+
}
|
|
9
|
+
set baseUrl(e) {
|
|
10
|
+
this._baseUrl = e;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Gets the parameters from the baseUrl of this class instance.
|
|
14
|
+
* This handles both encrypted and decrypted URLs.
|
|
15
|
+
*
|
|
16
|
+
* @param {string} parameterToSearch Name of the parameter that needs to be queried from the current URL.
|
|
17
|
+
* @returns {string | null} Either the value of the parameterToSearch or null if not found.
|
|
18
|
+
*/
|
|
19
|
+
getParameterInUrl(e) {
|
|
20
|
+
const a = new URL(this._baseUrl);
|
|
21
|
+
let t = a.searchParams.get(e);
|
|
22
|
+
return t || (t = this.decryptQueryParametersInUrl(a).searchParams.get(e)), t;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A convenience wrapper to test if the URL has a given parameter name in the query parameters.
|
|
26
|
+
* This handles both encrypted and decrypted URLs.
|
|
27
|
+
*
|
|
28
|
+
* @param {string} parameterToSearch Name of the parameter that needs to be queried from the current URL.
|
|
29
|
+
* @returns {boolean} Whether the parameter exists in the current URL.
|
|
30
|
+
*/
|
|
31
|
+
hasParameterInUrl(e) {
|
|
32
|
+
return !!this.getParameterInUrl(e);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Generate the URL to be shown as View in your space QR code.
|
|
36
|
+
*
|
|
37
|
+
* @param {object} parametersToAdd Object containing <key>parameter_name: <value>parameter_value for the URL.
|
|
38
|
+
* @param {boolean} encryptParameters Whether the parameters be encrypted within the URL.
|
|
39
|
+
* @returns {URL} The generated URL.
|
|
40
|
+
*/
|
|
41
|
+
generateQrCodeUrl(e = {}, a = !0) {
|
|
42
|
+
const t = new URL(this._baseUrl);
|
|
43
|
+
for (const [s, n] of Object.entries(e))
|
|
44
|
+
t.searchParams.set(s, n);
|
|
45
|
+
return a && this.encryptQueryParametersInUrl(t), t;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Encrypts the query parameters in a given URL object using base64 encoding.
|
|
49
|
+
*
|
|
50
|
+
* @param {URL} url The original url object with query parameters.
|
|
51
|
+
* @returns {URL} Process URL object with encrypted parameters
|
|
52
|
+
*/
|
|
53
|
+
encryptQueryParametersInUrl(e) {
|
|
54
|
+
return e.search = btoa(e.search), e;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Decrypts the query parameters in a given URL object using base64 encoding.
|
|
58
|
+
*
|
|
59
|
+
* @param {URL} url The original url object with query parameters.
|
|
60
|
+
* @returns {URL} Process URL object with decrypted parameters
|
|
61
|
+
*/
|
|
62
|
+
decryptQueryParametersInUrl(e) {
|
|
63
|
+
let a = e;
|
|
64
|
+
try {
|
|
65
|
+
e.search = atob(e.search.slice(1)), a = e;
|
|
66
|
+
} catch (t) {
|
|
67
|
+
window.epigraph.logger.info({ title: `Couldn't decode URL: ${e}`, details: t });
|
|
68
|
+
}
|
|
69
|
+
return a;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
export {
|
|
73
|
+
l as EpigraphUrlProcessor,
|
|
74
|
+
i as QUERY_PARAMETER_ACTION_NAMES,
|
|
75
|
+
c as QUERY_PARAMETER_NAMES
|
|
43
76
|
};
|
|
44
|
-
//#endregion
|
|
45
|
-
export { n as EpigraphUrlProcessor, e as QUERY_PARAMETER_ACTION_NAMES, t as QUERY_PARAMETER_NAMES };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var p=(t=>(t.DEVELOPMENT="development",t.STAGING="staging",t.PRODUCTION="production",t))(p||{}),a=(t=>(t.PRODUCTION="https://api.myepigraph.com/api/",t.STAGING="https://nexus.epigraph.dev/api/",t.STAGING_CANARY="https://staging-canary.epigraph.dev/api/",t.LOCAL="https://nexus.test/api/",t))(a||{});exports.ENVIRONMENT_TYPE=p;exports.NexusEndpoints=a;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
var p = /* @__PURE__ */ ((a) => (a.DEVELOPMENT = "development", a.STAGING = "staging", a.PRODUCTION = "production", a))(p || {}), t = /* @__PURE__ */ ((a) => (a.PRODUCTION = "https://api.myepigraph.com/api/", a.STAGING = "https://nexus.epigraph.dev/api/", a.STAGING_CANARY = "https://staging-canary.epigraph.dev/api/", a.LOCAL = "https://nexus.test/api/", a))(t || {});
|
|
2
|
+
export {
|
|
3
|
+
p as E,
|
|
4
|
+
t as N
|
|
5
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./Epigraph/epigraph.cjs"),n=require("./Epigraph/epigraphBaseSolutions.cjs"),e=require("./EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.cjs"),E=require("./EpigraphLibs/EpigraphLogger/epigraphLogger.cjs"),p=require("./EpigraphLibs/EpigraphNexusApi/epigraphNexusApi.cjs"),o=require("./EpigraphLibs/EpigraphQrCodeGenerator/epigraphQrCodeGenerator.cjs"),i=require("./EpigraphLibs/EpigraphResultFactory/epigraphResultFactory.cjs"),r=require("./EpigraphLibs/EpigraphUnitsConverter/epigraphUnitsConverter.cjs"),t=require("./EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.cjs"),a=require("./enums-1vqWxJ0i.cjs");exports.Epigraph=g.Epigraph;exports.EpigraphBaseSolutionHtmlElement=n.EpigraphBaseSolutionHtmlElement;exports.EpigraphBaseSolutionLitElement=n.EpigraphBaseSolutionLitElement;exports.ACTION_PERFORMED=e.ACTION_PERFORMED;exports.BUTTON_TYPE=e.BUTTON_TYPE;exports.CONTENT_TYPES=e.CONTENT_TYPES;exports.CURRENCY=e.CURRENCY;exports.ConsentPluginNames=e.ConsentPluginNames;exports.EpigraphAddToFavouritesEvent=e.EpigraphAddToFavouritesEvent;exports.EpigraphAnalytics=e.EpigraphAnalytics;exports.EpigraphArRequestedEvent=e.EpigraphArRequestedEvent;exports.EpigraphButtonClickEvent=e.EpigraphButtonClickEvent;exports.EpigraphChangeRateEvent=e.EpigraphChangeRateEvent;exports.EpigraphCheckoutEvent=e.EpigraphCheckoutEvent;exports.EpigraphCompletionRateEvent=e.EpigraphCompletionRateEvent;exports.EpigraphContentSharedEvent=e.EpigraphContentSharedEvent;exports.EpigraphConversionEvent=e.EpigraphConversionEvent;exports.EpigraphCustomEvent=e.EpigraphCustomEvent;exports.EpigraphEngagementRateEvent=e.EpigraphEngagementRateEvent;exports.EpigraphItemAddedEvent=e.EpigraphItemAddedEvent;exports.EpigraphItemMovedEvent=e.EpigraphItemMovedEvent;exports.EpigraphItemRemovedEvent=e.EpigraphItemRemovedEvent;exports.EpigraphKeyboardInteractionEvent=e.EpigraphKeyboardInteractionEvent;exports.EpigraphModuleClosedEvent=e.EpigraphModuleClosedEvent;exports.EpigraphModuleFailedEvent=e.EpigraphModuleFailedEvent;exports.EpigraphModuleLoadingEvent=e.EpigraphModuleLoadingEvent;exports.EpigraphModuleReadyEvent=e.EpigraphModuleReadyEvent;exports.EpigraphPanelClosedEvent=e.EpigraphPanelClosedEvent;exports.EpigraphPanelOpenedEvent=e.EpigraphPanelOpenedEvent;exports.EpigraphSupportDetectedEvent=e.EpigraphSupportDetectedEvent;exports.EpigraphTouchInteractionEvent=e.EpigraphTouchInteractionEvent;exports.EpigraphVariantChangedEvent=e.EpigraphVariantChangedEvent;exports.GA4AnalyticsPlugin=e.GA4AnalyticsPlugin;exports.MODULE_FAILED_ERRORS=e.MODULE_FAILED_ERRORS;exports.NexusAnalyticsPlugin=e.NexusAnalyticsPlugin;exports.NexusSolutionsAnalyticsPlugin=e.NexusSolutionsAnalyticsPlugin;exports.OneTrustConsentPlugin=e.OneTrustConsentPlugin;exports.PANEL_TYPE=e.PANEL_TYPE;exports.SHARE_DESTINATIONS=e.SHARE_DESTINATIONS;exports.SUPPORT_TYPE=e.SUPPORT_TYPE;exports.TRIGGER_SOURCE=e.TRIGGER_SOURCE;exports.VARIANT_CHANGE_TYPES=e.VARIANT_CHANGE_TYPES;exports.EpigraphLogger=E.EpigraphLogger;exports.LogTypes=E.LogTypes;exports.LoggerModeNames=E.LoggerModeNames;exports.EpigraphNexusAPI=p.EpigraphNexusAPI;exports.HTTPMethod=p.HTTPMethod;exports.NexusAPIResourceIdentifier=p.NexusAPIResourceIdentifier;exports.NexusAPIRoutes=p.NexusAPIRoutes;exports.NexusAPIVersions=p.NexusAPIVersions;exports.EpigraphQrCodeGenerator=o.EpigraphQrCodeGenerator;exports.Result=i.Result;exports.failureResult=i.failureResult;exports.successResult=i.successResult;exports.Distance=r.Distance;exports.DistanceUnits=r.DistanceUnits;exports.UnitTypes=r.UnitTypes;exports.EpigraphUrlProcessor=t.EpigraphUrlProcessor;exports.QUERY_PARAMETER_ACTION_NAMES=t.QUERY_PARAMETER_ACTION_NAMES;exports.QUERY_PARAMETER_NAMES=t.QUERY_PARAMETER_NAMES;exports.ENVIRONMENT_TYPE=a.ENVIRONMENT_TYPE;exports.NexusEndpoints=a.NexusEndpoints;
|
package/dist/epigraph-std-lib.js
CHANGED
|
@@ -1,11 +1,74 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { Result as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
export {
|
|
1
|
+
import { Epigraph as t } from "./Epigraph/epigraph.js";
|
|
2
|
+
import { EpigraphBaseSolutionHtmlElement as r, EpigraphBaseSolutionLitElement as n } from "./Epigraph/epigraphBaseSolutions.js";
|
|
3
|
+
import { ACTION_PERFORMED as a, BUTTON_TYPE as i, CONTENT_TYPES as g, CURRENCY as s, ConsentPluginNames as h, EpigraphAddToFavouritesEvent as u, EpigraphAnalytics as l, EpigraphArRequestedEvent as R, EpigraphButtonClickEvent as d, EpigraphChangeRateEvent as v, EpigraphCheckoutEvent as A, EpigraphCompletionRateEvent as T, EpigraphContentSharedEvent as N, EpigraphConversionEvent as P, EpigraphCustomEvent as m, EpigraphEngagementRateEvent as C, EpigraphItemAddedEvent as I, EpigraphItemMovedEvent as x, EpigraphItemRemovedEvent as _, EpigraphKeyboardInteractionEvent as c, EpigraphModuleClosedEvent as S, EpigraphModuleFailedEvent as M, EpigraphModuleLoadingEvent as O, EpigraphModuleReadyEvent as f, EpigraphPanelClosedEvent as U, EpigraphPanelOpenedEvent as Y, EpigraphSupportDetectedEvent as y, EpigraphTouchInteractionEvent as L, EpigraphVariantChangedEvent as D, GA4AnalyticsPlugin as G, MODULE_FAILED_ERRORS as B, NexusAnalyticsPlugin as F, NexusSolutionsAnalyticsPlugin as H, OneTrustConsentPlugin as V, PANEL_TYPE as Q, SHARE_DESTINATIONS as k, SUPPORT_TYPE as b, TRIGGER_SOURCE as q, VARIANT_CHANGE_TYPES as K } from "./EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.js";
|
|
4
|
+
import { EpigraphLogger as w, LogTypes as z, LoggerModeNames as J } from "./EpigraphLibs/EpigraphLogger/epigraphLogger.js";
|
|
5
|
+
import { EpigraphNexusAPI as X, HTTPMethod as Z, NexusAPIResourceIdentifier as $, NexusAPIRoutes as ee, NexusAPIVersions as Ee } from "./EpigraphLibs/EpigraphNexusApi/epigraphNexusApi.js";
|
|
6
|
+
import { EpigraphQrCodeGenerator as pe } from "./EpigraphLibs/EpigraphQrCodeGenerator/epigraphQrCodeGenerator.js";
|
|
7
|
+
import { Result as ne, failureResult as oe, successResult as ae } from "./EpigraphLibs/EpigraphResultFactory/epigraphResultFactory.js";
|
|
8
|
+
import { Distance as ge, DistanceUnits as se, UnitTypes as he } from "./EpigraphLibs/EpigraphUnitsConverter/epigraphUnitsConverter.js";
|
|
9
|
+
import { EpigraphUrlProcessor as le, QUERY_PARAMETER_ACTION_NAMES as Re, QUERY_PARAMETER_NAMES as de } from "./EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.js";
|
|
10
|
+
import { E as Ae, N as Te } from "./enums-CvOTKyNu.js";
|
|
11
|
+
export {
|
|
12
|
+
a as ACTION_PERFORMED,
|
|
13
|
+
i as BUTTON_TYPE,
|
|
14
|
+
g as CONTENT_TYPES,
|
|
15
|
+
s as CURRENCY,
|
|
16
|
+
h as ConsentPluginNames,
|
|
17
|
+
ge as Distance,
|
|
18
|
+
se as DistanceUnits,
|
|
19
|
+
Ae as ENVIRONMENT_TYPE,
|
|
20
|
+
t as Epigraph,
|
|
21
|
+
u as EpigraphAddToFavouritesEvent,
|
|
22
|
+
l as EpigraphAnalytics,
|
|
23
|
+
R as EpigraphArRequestedEvent,
|
|
24
|
+
r as EpigraphBaseSolutionHtmlElement,
|
|
25
|
+
n as EpigraphBaseSolutionLitElement,
|
|
26
|
+
d as EpigraphButtonClickEvent,
|
|
27
|
+
v as EpigraphChangeRateEvent,
|
|
28
|
+
A as EpigraphCheckoutEvent,
|
|
29
|
+
T as EpigraphCompletionRateEvent,
|
|
30
|
+
N as EpigraphContentSharedEvent,
|
|
31
|
+
P as EpigraphConversionEvent,
|
|
32
|
+
m as EpigraphCustomEvent,
|
|
33
|
+
C as EpigraphEngagementRateEvent,
|
|
34
|
+
I as EpigraphItemAddedEvent,
|
|
35
|
+
x as EpigraphItemMovedEvent,
|
|
36
|
+
_ as EpigraphItemRemovedEvent,
|
|
37
|
+
c as EpigraphKeyboardInteractionEvent,
|
|
38
|
+
w as EpigraphLogger,
|
|
39
|
+
S as EpigraphModuleClosedEvent,
|
|
40
|
+
M as EpigraphModuleFailedEvent,
|
|
41
|
+
O as EpigraphModuleLoadingEvent,
|
|
42
|
+
f as EpigraphModuleReadyEvent,
|
|
43
|
+
X as EpigraphNexusAPI,
|
|
44
|
+
U as EpigraphPanelClosedEvent,
|
|
45
|
+
Y as EpigraphPanelOpenedEvent,
|
|
46
|
+
pe as EpigraphQrCodeGenerator,
|
|
47
|
+
y as EpigraphSupportDetectedEvent,
|
|
48
|
+
L as EpigraphTouchInteractionEvent,
|
|
49
|
+
le as EpigraphUrlProcessor,
|
|
50
|
+
D as EpigraphVariantChangedEvent,
|
|
51
|
+
G as GA4AnalyticsPlugin,
|
|
52
|
+
Z as HTTPMethod,
|
|
53
|
+
z as LogTypes,
|
|
54
|
+
J as LoggerModeNames,
|
|
55
|
+
B as MODULE_FAILED_ERRORS,
|
|
56
|
+
$ as NexusAPIResourceIdentifier,
|
|
57
|
+
ee as NexusAPIRoutes,
|
|
58
|
+
Ee as NexusAPIVersions,
|
|
59
|
+
F as NexusAnalyticsPlugin,
|
|
60
|
+
Te as NexusEndpoints,
|
|
61
|
+
H as NexusSolutionsAnalyticsPlugin,
|
|
62
|
+
V as OneTrustConsentPlugin,
|
|
63
|
+
Q as PANEL_TYPE,
|
|
64
|
+
Re as QUERY_PARAMETER_ACTION_NAMES,
|
|
65
|
+
de as QUERY_PARAMETER_NAMES,
|
|
66
|
+
ne as Result,
|
|
67
|
+
k as SHARE_DESTINATIONS,
|
|
68
|
+
b as SUPPORT_TYPE,
|
|
69
|
+
q as TRIGGER_SOURCE,
|
|
70
|
+
he as UnitTypes,
|
|
71
|
+
K as VARIANT_CHANGE_TYPES,
|
|
72
|
+
oe as failureResult,
|
|
73
|
+
ae as successResult
|
|
74
|
+
};
|