@epigraph/epigraph-std-lib 4.0.2-alpha → 4.2.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 (43) hide show
  1. package/dist/Epigraph/epigraph.cjs +1 -0
  2. package/dist/Epigraph/epigraph.d.ts +10 -3
  3. package/dist/Epigraph/epigraph.js +33 -20
  4. package/dist/Epigraph/epigraphBaseSolutions.cjs +1 -0
  5. package/dist/Epigraph/{epigraphBaseSolution.d.ts → epigraphBaseSolutions.d.ts} +1 -1
  6. package/dist/{lib/Epigraph/epigraphBaseSolution.js → Epigraph/epigraphBaseSolutions.js} +2 -2
  7. package/dist/EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.cjs +16 -0
  8. package/dist/EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.js +354 -27
  9. package/dist/EpigraphLibs/EpigraphLogger/epigraphLogger.cjs +1 -0
  10. package/dist/EpigraphLibs/EpigraphNexusApi/epigraphNexusApi.cjs +1 -0
  11. package/dist/EpigraphLibs/EpigraphNexusApi/epigraphNexusApi.d.ts +34 -5
  12. package/dist/EpigraphLibs/EpigraphNexusApi/epigraphNexusApi.js +229 -64
  13. package/dist/EpigraphLibs/EpigraphQrCodeGenerator/epigraphQrCodeGenerator.cjs +7 -0
  14. package/dist/EpigraphLibs/EpigraphQrCodeGenerator/epigraphQrCodeGenerator.d.ts +2 -2
  15. package/dist/EpigraphLibs/EpigraphQrCodeGenerator/epigraphQrCodeGenerator.js +31 -22
  16. package/dist/EpigraphLibs/EpigraphResultFactory/epigraphResultFactory.cjs +1 -0
  17. package/dist/EpigraphLibs/EpigraphUnitsConverter/epigraphUnitsConverter.cjs +1 -0
  18. package/dist/EpigraphLibs/EpigraphUnitsConverter/epigraphUnitsConverter.js +51 -30
  19. package/dist/EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.cjs +1 -0
  20. package/dist/epigraph-std-lib.cjs +1 -0
  21. package/dist/epigraph-std-lib.d.ts +9 -1
  22. package/dist/epigraph-std-lib.js +40 -1
  23. package/dist/lit-element-C3moVMGu.js +524 -0
  24. package/dist/lit-element-CYaaFRfk.cjs +19 -0
  25. package/package.json +4 -35
  26. package/dist/EpigraphLibs/EpigraphAnalytics/types/index.d.ts +0 -7
  27. package/dist/lib/Epigraph/constants/enums.js +0 -4
  28. package/dist/lib/EpigraphLibs/EpigraphAnalytics/consent-plugins/consent-plugin-names.js +0 -4
  29. package/dist/lib/EpigraphLibs/EpigraphAnalytics/consent-plugins/one-trust-consent-plugin.js +0 -29
  30. package/dist/lib/EpigraphLibs/EpigraphAnalytics/generics/node.js +0 -22
  31. package/dist/lib/EpigraphLibs/EpigraphAnalytics/generics/queue.js +0 -23
  32. package/dist/lib/EpigraphLibs/EpigraphAnalytics/generics/single-linked-list.js +0 -30
  33. package/dist/lib/EpigraphLibs/EpigraphAnalytics/plugins/ga3-analytics-plugin.js +0 -87
  34. package/dist/lib/EpigraphLibs/EpigraphAnalytics/plugins/ga4-analytics-plugin.js +0 -121
  35. package/dist/lib/EpigraphLibs/EpigraphAnalytics/plugins/nexus-analytics-plugin.js +0 -45
  36. package/dist/lib/EpigraphLibs/EpigraphUnitsConverter/conversions.js +0 -26
  37. package/dist/lib/EpigraphLibs/EpigraphUnitsConverter/enums.js +0 -5
  38. package/dist/node_modules/lit-html/async-directive.js +0 -67
  39. package/dist/node_modules/lit-html/directive-helpers.js +0 -10
  40. package/dist/node_modules/lit-html/directive.js +0 -27
  41. package/dist/node_modules/lit-html/directives/ref.js +0 -40
  42. package/dist/node_modules/lit-html/lit-html.js +0 -225
  43. package/dist/vite-env.d.ts +0 -1
@@ -1,67 +1,88 @@
1
- import { ConversionFactors as s } from "../../lib/EpigraphLibs/EpigraphUnitsConverter/conversions.js";
2
- import { UnitTypes as o, DistanceUnits as t } from "../../lib/EpigraphLibs/EpigraphUnitsConverter/enums.js";
3
- class e {
4
- constructor(i, r) {
5
- if (this._type = o.DISTANCE, this._rawValue = i, this._rawValueUnit = r, r !== t.meter) {
6
- const n = e.convert(this._rawValue, r, t.meter);
7
- this._rawValue = n.value, this._rawValueUnit = n.valueUnit;
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;
8
29
  }
9
30
  }
10
31
  get type() {
11
32
  return this._type;
12
33
  }
13
- static buildConvertedUnitResult(i, r) {
34
+ static buildConvertedUnitResult(l, i) {
14
35
  return {
15
- value: i,
16
- valueUnit: r,
17
- valueWithUnit: `${i.toFixed(2)}${r}`
36
+ value: l,
37
+ valueUnit: i,
38
+ valueWithUnit: `${l.toFixed(2)}${i}`
18
39
  };
19
40
  }
20
- static convert(i, r, n) {
21
- let a = i, u = n;
22
- if (r === n)
23
- return e.buildConvertedUnitResult(a, u);
24
- const l = s[`${r}-${n}`];
25
- return a = i * l, e.buildConvertedUnitResult(a, u);
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, $);
26
47
  }
27
48
  /** ----------------- METRIC UNITS ----------------- */
28
49
  get inMillimeters() {
29
- return e.convert(this._rawValue, this._rawValueUnit, t.millimeter);
50
+ return m.convert(this._rawValue, this._rawValueUnit, e.millimeter);
30
51
  }
31
52
  get inCentimeters() {
32
- return e.convert(this._rawValue, this._rawValueUnit, t.centimeter);
53
+ return m.convert(this._rawValue, this._rawValueUnit, e.centimeter);
33
54
  }
34
55
  get inDecimeters() {
35
- return e.convert(this._rawValue, this._rawValueUnit, t.decimeter);
56
+ return m.convert(this._rawValue, this._rawValueUnit, e.decimeter);
36
57
  }
37
58
  get inMeters() {
38
- return e.convert(this._rawValue, this._rawValueUnit, t.meter);
59
+ return m.convert(this._rawValue, this._rawValueUnit, e.meter);
39
60
  }
40
61
  get inDecameters() {
41
- return e.convert(this._rawValue, this._rawValueUnit, t.decameter);
62
+ return m.convert(this._rawValue, this._rawValueUnit, e.decameter);
42
63
  }
43
64
  get inHectometers() {
44
- return e.convert(this._rawValue, this._rawValueUnit, t.hectometer);
65
+ return m.convert(this._rawValue, this._rawValueUnit, e.hectometer);
45
66
  }
46
67
  get inKilometers() {
47
- return e.convert(this._rawValue, this._rawValueUnit, t.kilometer);
68
+ return m.convert(this._rawValue, this._rawValueUnit, e.kilometer);
48
69
  }
49
70
  /** ----------------- METRIC UNITS ----------------- */
50
71
  get inInches() {
51
- return e.convert(this._rawValue, this._rawValueUnit, t.inch);
72
+ return m.convert(this._rawValue, this._rawValueUnit, e.inch);
52
73
  }
53
74
  get inFeet() {
54
- return e.convert(this._rawValue, this._rawValueUnit, t.foot);
75
+ return m.convert(this._rawValue, this._rawValueUnit, e.foot);
55
76
  }
56
77
  get inYard() {
57
- return e.convert(this._rawValue, this._rawValueUnit, t.yard);
78
+ return m.convert(this._rawValue, this._rawValueUnit, e.yard);
58
79
  }
59
80
  get inMiles() {
60
- return e.convert(this._rawValue, this._rawValueUnit, t.mile);
81
+ return m.convert(this._rawValue, this._rawValueUnit, e.mile);
61
82
  }
62
83
  }
63
84
  export {
64
- e as Distance,
65
- t as DistanceUnits,
85
+ m as Distance,
86
+ e as DistanceUnits,
66
87
  o as UnitTypes
67
88
  };
@@ -0,0 +1 @@
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))(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;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./Epigraph/epigraph.cjs"),n=require("./Epigraph/epigraphBaseSolutions.cjs"),e=require("./EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.cjs"),r=require("./EpigraphLibs/EpigraphLogger/epigraphLogger.cjs"),i=require("./EpigraphLibs/EpigraphNexusApi/epigraphNexusApi.cjs"),g=require("./EpigraphLibs/EpigraphQrCodeGenerator/epigraphQrCodeGenerator.cjs"),s=require("./EpigraphLibs/EpigraphResultFactory/epigraphResultFactory.cjs"),p=require("./EpigraphLibs/EpigraphUnitsConverter/epigraphUnitsConverter.cjs"),t=require("./EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.cjs");exports.ENVIRONMENT_TYPE=a.ENVIRONMENT_TYPE;exports.Epigraph=a.Epigraph;exports.EpigraphBaseSolutionHtmlElement=n.EpigraphBaseSolutionHtmlElement;exports.EpigraphBaseSolutionLitElement=n.EpigraphBaseSolutionLitElement;exports.ConsentPluginNames=e.ConsentPluginNames;exports.EpigraphAnalytics=e.EpigraphAnalytics;exports.GA3AnalyticsPlugin=e.GA3AnalyticsPlugin;exports.GA4AnalyticsPlugin=e.GA4AnalyticsPlugin;exports.NexusAnalyticsPlugin=e.NexusAnalyticsPlugin;exports.OneTrustConsentPlugin=e.OneTrustConsentPlugin;exports.EpigraphLogger=r.EpigraphLogger;exports.LogTypes=r.LogTypes;exports.LoggerModeNames=r.LoggerModeNames;exports.EpigraphNexusAPI=i.EpigraphNexusAPI;exports.HTTPMethod=i.HTTPMethod;exports.NexusAPIResourceIdentifier=i.NexusAPIResourceIdentifier;exports.NexusAPIRoutes=i.NexusAPIRoutes;exports.NexusAPIVersions=i.NexusAPIVersions;exports.NexusEndpoints=i.NexusEndpoints;exports.EpigraphQrCodeGenerator=g.EpigraphQrCodeGenerator;exports.Result=s.Result;exports.failureResult=s.failureResult;exports.successResult=s.successResult;exports.Distance=p.Distance;exports.DistanceUnits=p.DistanceUnits;exports.UnitTypes=p.UnitTypes;exports.EpigraphUrlProcessor=t.EpigraphUrlProcessor;exports.QUERY_PARAMETER_ACTION_NAMES=t.QUERY_PARAMETER_ACTION_NAMES;exports.QUERY_PARAMETER_NAMES=t.QUERY_PARAMETER_NAMES;
@@ -1 +1,9 @@
1
- export {};
1
+ export * from './Epigraph/epigraph';
2
+ export * from './Epigraph/epigraphBaseSolutions';
3
+ export * from './EpigraphLibs/EpigraphAnalytics/epigraphAnalytics';
4
+ export * from './EpigraphLibs/EpigraphLogger/epigraphLogger';
5
+ export * from './EpigraphLibs/EpigraphNexusApi/epigraphNexusApi';
6
+ export * from './EpigraphLibs/EpigraphQrCodeGenerator/epigraphQrCodeGenerator';
7
+ export * from './EpigraphLibs/EpigraphResultFactory/epigraphResultFactory';
8
+ export * from './EpigraphLibs/EpigraphUnitsConverter/epigraphUnitsConverter';
9
+ export * from './EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor';
@@ -1 +1,40 @@
1
-
1
+ import { ENVIRONMENT_TYPE as o, Epigraph as s } from "./Epigraph/epigraph.js";
2
+ import { EpigraphBaseSolutionHtmlElement as i, EpigraphBaseSolutionLitElement as p } from "./Epigraph/epigraphBaseSolutions.js";
3
+ import { ConsentPluginNames as E, EpigraphAnalytics as u, GA3AnalyticsPlugin as a, GA4AnalyticsPlugin as l, NexusAnalyticsPlugin as g, OneTrustConsentPlugin as A } from "./EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.js";
4
+ import { EpigraphLogger as m, LogTypes as N, LoggerModeNames as P } from "./EpigraphLibs/EpigraphLogger/epigraphLogger.js";
5
+ import { EpigraphNexusAPI as f, HTTPMethod as c, NexusAPIResourceIdentifier as T, NexusAPIRoutes as h, NexusAPIVersions as I, NexusEndpoints as M } from "./EpigraphLibs/EpigraphNexusApi/epigraphNexusApi.js";
6
+ import { EpigraphQrCodeGenerator as _ } from "./EpigraphLibs/EpigraphQrCodeGenerator/epigraphQrCodeGenerator.js";
7
+ import { Result as U, failureResult as C, successResult as L } from "./EpigraphLibs/EpigraphResultFactory/epigraphResultFactory.js";
8
+ import { Distance as G, DistanceUnits as O, UnitTypes as Q } from "./EpigraphLibs/EpigraphUnitsConverter/epigraphUnitsConverter.js";
9
+ import { EpigraphUrlProcessor as B, QUERY_PARAMETER_ACTION_NAMES as D, QUERY_PARAMETER_NAMES as H } from "./EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.js";
10
+ export {
11
+ E as ConsentPluginNames,
12
+ G as Distance,
13
+ O as DistanceUnits,
14
+ o as ENVIRONMENT_TYPE,
15
+ s as Epigraph,
16
+ u as EpigraphAnalytics,
17
+ i as EpigraphBaseSolutionHtmlElement,
18
+ p as EpigraphBaseSolutionLitElement,
19
+ m as EpigraphLogger,
20
+ f as EpigraphNexusAPI,
21
+ _ as EpigraphQrCodeGenerator,
22
+ B as EpigraphUrlProcessor,
23
+ a as GA3AnalyticsPlugin,
24
+ l as GA4AnalyticsPlugin,
25
+ c as HTTPMethod,
26
+ N as LogTypes,
27
+ P as LoggerModeNames,
28
+ T as NexusAPIResourceIdentifier,
29
+ h as NexusAPIRoutes,
30
+ I as NexusAPIVersions,
31
+ g as NexusAnalyticsPlugin,
32
+ M as NexusEndpoints,
33
+ A as OneTrustConsentPlugin,
34
+ D as QUERY_PARAMETER_ACTION_NAMES,
35
+ H as QUERY_PARAMETER_NAMES,
36
+ U as Result,
37
+ Q as UnitTypes,
38
+ C as failureResult,
39
+ L as successResult
40
+ };