peryl 1.4.49 → 1.4.52
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 +2 -2
- package/dist/google-analytics.d.ts +13 -2
- package/dist/google-analytics.js +30 -4
- package/dist/google-analytics.js.map +1 -1
- package/dist/hash.d.ts +4 -4
- package/dist/hash.js +11 -11
- package/dist/hash.js.map +1 -1
- package/dist/hsml-app.d.ts +2 -1
- package/dist/hsml-app.js +3 -3
- package/dist/hsml-app.js.map +1 -1
- package/dist/umd/google-analytics.js +1 -1
- package/dist/umd/google-analytics.js.map +1 -1
- package/dist/umd/hash.js +1 -1
- package/dist/umd/hash.js.map +1 -1
- package/dist/umd/hsml-app.js +1 -1
- package/dist/umd/hsml-app.js.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
- package/src/google-analytics.ts +36 -4
- package/src/hash.ts +10 -10
- package/src/hsml-app.ts +6 -4
package/README.md
CHANGED
|
@@ -34,8 +34,8 @@ HSML App [demo](https://peryl.gitlab.io/peryl/demo/hsml-app-js_demo.html), sourc
|
|
|
34
34
|
<!-- <script src="https://peryl.gitlab.io/peryl/incremental-dom/dist/umd/incremental-dom.js"></script> -->
|
|
35
35
|
<!-- <script src="https://peryl.gitlab.io/peryl/dist/umd/hsml-app.js"></script> -->
|
|
36
36
|
|
|
37
|
-
<!-- <script src="https://unpkg.com/
|
|
38
|
-
<!-- <script src="https://unpkg.com/
|
|
37
|
+
<!-- <script src="https://unpkg.com/pery/incremental-dom/dist/umd/incremental-dom.js"></script> -->
|
|
38
|
+
<!-- <script src="https://unpkg.com/pery/dist/umd/hsml-app.js"></script> -->
|
|
39
39
|
|
|
40
40
|
<script>
|
|
41
41
|
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
export declare class GA {
|
|
2
2
|
static ga: GA;
|
|
3
|
+
static init(trackingId: string, dimensions?: Object): void;
|
|
4
|
+
static pageview(path: string, title?: string): void;
|
|
5
|
+
static event(name: string, parameters?: {
|
|
6
|
+
[k: string]: string;
|
|
7
|
+
}): void;
|
|
8
|
+
static set(parameters: {
|
|
9
|
+
[k: string]: string;
|
|
10
|
+
}): void;
|
|
3
11
|
private _trackingId;
|
|
4
12
|
constructor(trackingId: string, dimensions?: Object);
|
|
5
|
-
pageview(path: string): void;
|
|
6
|
-
event(
|
|
13
|
+
pageview(path: string, title?: string): void;
|
|
14
|
+
event(name: string, parameters?: {
|
|
15
|
+
[k: string]: string;
|
|
16
|
+
}): void;
|
|
17
|
+
set(parameters: {
|
|
7
18
|
[k: string]: string;
|
|
8
19
|
}): void;
|
|
9
20
|
private _load;
|
package/dist/google-analytics.js
CHANGED
|
@@ -6,14 +6,40 @@ class GA {
|
|
|
6
6
|
this._trackingId = trackingId;
|
|
7
7
|
this._load();
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
static init(trackingId, dimensions) {
|
|
10
|
+
GA.ga = new GA(trackingId, dimensions);
|
|
11
|
+
}
|
|
12
|
+
static pageview(path, title) {
|
|
13
|
+
if (GA.ga) {
|
|
14
|
+
GA.ga.pageview(path, title);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
static event(name, parameters) {
|
|
18
|
+
if (GA.ga) {
|
|
19
|
+
GA.ga.event(name, parameters);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
static set(parameters) {
|
|
23
|
+
if (GA.ga) {
|
|
24
|
+
GA.ga.set(parameters);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
pageview(path, title) {
|
|
28
|
+
if (this._trackingId) {
|
|
29
|
+
self.gtag("config", this._trackingId, {
|
|
30
|
+
page_path: path,
|
|
31
|
+
page_title: title
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
event(name, parameters) {
|
|
10
36
|
if (this._trackingId) {
|
|
11
|
-
self.gtag("
|
|
37
|
+
self.gtag("event", name, parameters);
|
|
12
38
|
}
|
|
13
39
|
}
|
|
14
|
-
|
|
40
|
+
set(parameters) {
|
|
15
41
|
if (this._trackingId) {
|
|
16
|
-
self.gtag("
|
|
42
|
+
self.gtag("set", parameters);
|
|
17
43
|
}
|
|
18
44
|
}
|
|
19
45
|
_load() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-analytics.js","sourceRoot":"","sources":["../src/google-analytics.ts"],"names":[],"mappings":";;;AACA,MAAa,EAAE;
|
|
1
|
+
{"version":3,"file":"google-analytics.js","sourceRoot":"","sources":["../src/google-analytics.ts"],"names":[],"mappings":";;;AACA,MAAa,EAAE;IA4BX,YAAY,UAAkB,EAAE,UAAmB;QAC/C,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,IAAI,CAAC,KAAK,EAAE,CAAC;IACjB,CAAC;IA3BD,MAAM,CAAC,IAAI,CAAC,UAAkB,EAAE,UAAmB;QAC/C,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAC3C,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,IAAY,EAAE,KAAc;QACxC,IAAI,EAAE,CAAC,EAAE,EAAE;YACP,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;SAC/B;IACL,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,IAAY,EAAE,UAAoC;QAC3D,IAAI,EAAE,CAAC,EAAE,EAAE;YACP,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;SACjC;IACL,CAAC;IAED,MAAM,CAAC,GAAG,CAAC,UAAmC;QAC1C,IAAI,EAAE,CAAC,EAAE,EAAE;YACP,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;SACzB;IACL,CAAC;IASD,QAAQ,CAAC,IAAY,EAAE,KAAc;QACjC,IAAI,IAAI,CAAC,WAAW,EAAE;YACjB,IAAY,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,WAAW,EACzC;gBACI,SAAS,EAAE,IAAI;gBACf,UAAU,EAAE,KAAK;aACpB,CAAC,CAAC;SACV;IACL,CAAC;IAED,KAAK,CAAC,IAAY,EAAE,UAAoC;QACpD,IAAI,IAAI,CAAC,WAAW,EAAE;YACjB,IAAY,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;SACjD;IACL,CAAC;IAED,GAAG,CAAC,UAAmC;QACnC,IAAI,IAAI,CAAC,WAAW,EAAE;YACjB,IAAY,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;SACzC;IACL,CAAC;IAEO,KAAK;QACT,IAAI,IAAI,CAAC,WAAW,EAAE;YAClB,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;YAChD,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC;YACpB,MAAM,CAAC,GAAG,GAAG,+CAA+C,IAAI,CAAC,WAAW,EAAE,CAAC;YAC/E,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;YAE7D,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;YACjD,OAAO,CAAC,WAAW,GAAG;;;;kCAIA,IAAI,CAAC,WAAW;aACrC,CAAC;YACF,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;SACjE;IACL,CAAC;CAEJ;AAzED,gBAyEC"}
|
package/dist/hash.d.ts
CHANGED
|
@@ -4,10 +4,10 @@ export interface HashUrlData {
|
|
|
4
4
|
[key: string]: string | string[];
|
|
5
5
|
};
|
|
6
6
|
}
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
7
|
+
export declare const hashJsonEncode: (data: any) => string;
|
|
8
|
+
export declare const hashJsonDecode: (str: string) => any;
|
|
9
|
+
export declare const hashUrlEncode: (data: HashUrlData) => string;
|
|
10
|
+
export declare const hashUrlDecode: (str: string) => HashUrlData;
|
|
11
11
|
export declare class Hash<T = string> {
|
|
12
12
|
private _cb?;
|
|
13
13
|
private _emitWritten;
|
package/dist/hash.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Hash = exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
3
|
+
exports.Hash = exports.hashUrlDecode = exports.hashUrlEncode = exports.hashJsonDecode = exports.hashJsonEncode = void 0;
|
|
4
|
+
exports.hashJsonEncode = (data) => data ? encodeURIComponent(JSON.stringify(data)) : "";
|
|
5
|
+
exports.hashJsonDecode = (str) => str ? JSON.parse(decodeURIComponent(str)) : undefined;
|
|
6
|
+
exports.hashUrlEncode = (data) => {
|
|
7
7
|
const d = typeof data === "string"
|
|
8
|
-
? exports.
|
|
8
|
+
? exports.hashUrlDecode(data)
|
|
9
9
|
: data;
|
|
10
10
|
const dpath = d.path || [];
|
|
11
11
|
const dquery = d.query || {};
|
|
12
|
-
const path = dpath.join("/");
|
|
12
|
+
const path = dpath.map(p => encodeURIComponent(p)).join("/");
|
|
13
13
|
const query = Object.entries(dquery)
|
|
14
14
|
.reduce((p, c) => {
|
|
15
15
|
if (typeof c[1] === "string") {
|
|
@@ -21,12 +21,12 @@ exports.hashUrlEncoder = (data) => {
|
|
|
21
21
|
return p;
|
|
22
22
|
}, new URLSearchParams())
|
|
23
23
|
.toString();
|
|
24
|
-
const str = `${path}
|
|
24
|
+
const str = `${path}${query ? "?" : ""}${query}`;
|
|
25
25
|
return str;
|
|
26
26
|
};
|
|
27
|
-
exports.
|
|
27
|
+
exports.hashUrlDecode = (str) => {
|
|
28
28
|
const [pathStr, queryStr] = str.split("?");
|
|
29
|
-
const path = pathStr.split("/");
|
|
29
|
+
const path = pathStr.split("/").map(p => decodeURIComponent(p));
|
|
30
30
|
const query = {};
|
|
31
31
|
for (const e of new URLSearchParams(queryStr).entries()) {
|
|
32
32
|
const [k, v] = e;
|
|
@@ -83,10 +83,10 @@ class Hash {
|
|
|
83
83
|
return this;
|
|
84
84
|
}
|
|
85
85
|
read() {
|
|
86
|
-
return this._decode(
|
|
86
|
+
return this._decode(location.hash.slice(1));
|
|
87
87
|
}
|
|
88
88
|
write(data) {
|
|
89
|
-
location.hash = "#" +
|
|
89
|
+
location.hash = "#" + this._encode(data);
|
|
90
90
|
if (!this._emitWritten) {
|
|
91
91
|
this._writtenDataJson = JSON.stringify(data);
|
|
92
92
|
this._cb && this._cb(data);
|
package/dist/hash.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash.js","sourceRoot":"","sources":["../src/hash.ts"],"names":[],"mappings":";;;AAQa,QAAA,
|
|
1
|
+
{"version":3,"file":"hash.js","sourceRoot":"","sources":["../src/hash.ts"],"names":[],"mappings":";;;AAQa,QAAA,cAAc,GAAG,CAAC,IAAS,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACrF,QAAA,cAAc,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAExF,QAAA,aAAa,GAAG,CAAC,IAAiB,EAAU,EAAE;IAEvD,MAAM,CAAC,GAAG,OAAO,IAAI,KAAK,QAAQ;QAC9B,CAAC,CAAC,qBAAa,CAAC,IAAI,CAAC;QACrB,CAAC,CAAC,IAAmB,CAAC;IAC1B,MAA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event?: HAction["event"]) => Promise<void>;
|
|
10
10
|
export declare type HUpdate = () => void;
|
|
11
|
-
export declare type
|
|
11
|
+
export declare type HRefs<STATE> = HApp<STATE>["refs"];
|
|
12
|
+
export declare type HDispatcher<STATE> = (this: HApp<any>, action: HAction, state: STATE, dispatch: HDispatch, refs: HRefs<STATE>) => Promise<void>;
|
|
12
13
|
export declare enum HAppAction {
|
|
13
14
|
_init = "_init",
|
|
14
15
|
_mount = "_mount",
|
package/dist/hsml-app.js
CHANGED
|
@@ -35,7 +35,7 @@ class HApp {
|
|
|
35
35
|
log(msgAction, { type, data, event });
|
|
36
36
|
const t0 = performance.now();
|
|
37
37
|
try {
|
|
38
|
-
yield this.dispatcher({ type, data, event }, this.state, this.dispatch);
|
|
38
|
+
yield this.dispatcher({ type, data, event }, this.state, this.dispatch, this.refs);
|
|
39
39
|
this.update();
|
|
40
40
|
}
|
|
41
41
|
catch (e) {
|
|
@@ -46,7 +46,7 @@ class HApp {
|
|
|
46
46
|
}
|
|
47
47
|
else {
|
|
48
48
|
try {
|
|
49
|
-
yield this.dispatcher({ type, data, event }, this.state, this.dispatch);
|
|
49
|
+
yield this.dispatcher({ type, data, event }, this.state, this.dispatch, this.refs);
|
|
50
50
|
this.update();
|
|
51
51
|
}
|
|
52
52
|
catch (e) {
|
|
@@ -168,7 +168,7 @@ class HApp {
|
|
|
168
168
|
this.state = state;
|
|
169
169
|
this.view = view;
|
|
170
170
|
this.dispatcher = dispatcher || ((a) => __awaiter(this, void 0, void 0, function* () { return log(msgAction, a.type, a.data); }));
|
|
171
|
-
this.dispatch(HAppAction._init).then(() => this.mount(e));
|
|
171
|
+
this.dispatch(HAppAction._init, this).then(() => this.mount(e));
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
exports.HApp = HApp;
|
package/dist/hsml-app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hsml-app.js","sourceRoot":"","sources":["../src/hsml-app.ts"],"names":[],"mappings":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C,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC;aACpC;iBAAM;gBACH,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC;aACpB;YACD,MAAM;QACV,KAAK,QAAQ;YACT,MAAM,GAAG,GAAG,EAAuB,CAAC;YACpC,IAAI,GAAG,CAAC,IAAI,EAAE;gBACV,IAAI,GAAG,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC;aACpC;iBAAM;gBACH,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC;aACpB;YACD,MAAM;KACb;IACD,OAAO,IAAI,CAAC;AAChB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=28)}({28:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GA=void 0;class r{constructor(e,t){this._trackingId=e,this._load()}static init(e,t){r.ga=new r(e,t)}static pageview(e,t){r.ga&&r.ga.pageview(e,t)}static event(e,t){r.ga&&r.ga.event(e,t)}static set(e){r.ga&&r.ga.set(e)}pageview(e,t){this._trackingId&&self.gtag("config",this._trackingId,{page_path:e,page_title:t})}event(e,t){this._trackingId&&self.gtag("event",e,t)}set(e){this._trackingId&&self.gtag("set",e)}_load(){if(this._trackingId){const e=document.createElement("script");e.async=!0,e.src="https://www.googletagmanager.com/gtag/js?id="+this._trackingId,document.getElementsByTagName("head")[0].appendChild(e);const t=document.createElement("script");t.textContent=`\n window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n gtag('config', '${this._trackingId}');\n `,document.getElementsByTagName("head")[0].appendChild(t)}}}t.GA=r}})}));
|
|
2
2
|
//# sourceMappingURL=google-analytics.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///./src/google-analytics.ts"],"names":["root","factory","exports","module","define","amd","a","i","window","installedModules","__webpack_require__","moduleId","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","trackingId","dimensions","this","_trackingId","_load","path","self","gtag","page_path","
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///./src/google-analytics.ts"],"names":["root","factory","exports","module","define","amd","a","i","window","installedModules","__webpack_require__","moduleId","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","GA","trackingId","dimensions","this","_trackingId","_load","ga","path","title","pageview","parameters","event","set","self","gtag","page_path","page_title","script","document","createElement","async","src","getElementsByTagName","appendChild","script1","textContent"],"mappings":"CAAA,SAA2CA,EAAMC,GAChD,GAAsB,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,SACb,GAAqB,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,OACP,CACJ,IAAIK,EAAIL,IACR,IAAI,IAAIM,KAAKD,GAAuB,iBAAZJ,QAAuBA,QAAUF,GAAMO,GAAKD,EAAEC,IAPxE,CASGC,QAAQ,WACX,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUT,QAGnC,IAAIC,EAASM,EAAiBE,GAAY,CACzCJ,EAAGI,EACHC,GAAG,EACHV,QAAS,IAUV,OANAW,EAAQF,GAAUG,KAAKX,EAAOD,QAASC,EAAQA,EAAOD,QAASQ,GAG/DP,EAAOS,GAAI,EAGJT,EAAOD,QA0Df,OArDAQ,EAAoBK,EAAIF,EAGxBH,EAAoBM,EAAIP,EAGxBC,EAAoBO,EAAI,SAASf,EAASgB,EAAMC,GAC3CT,EAAoBU,EAAElB,EAASgB,IAClCG,OAAOC,eAAepB,EAASgB,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhET,EAAoBe,EAAI,SAASvB,GACX,oBAAXwB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAepB,EAASwB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAepB,EAAS,aAAc,CAAE0B,OAAO,KAQvDlB,EAAoBmB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQlB,EAAoBkB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,E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,MAAMa,EAASC,SAASC,cAAc,UACtCF,EAAOG,OAAQ,EACfH,EAAOI,IAAM,+CAA+ClB,KAAKC,YACjEc,SAASI,qBAAqB,QAAQ,GAAGC,YAAYN,GAErD,MAAMO,EAAUN,SAASC,cAAc,UACvCK,EAAQC,YAAc,uMAIAtB,KAAKC,+BAE3Bc,SAASI,qBAAqB,QAAQ,GAAGC,YAAYC,KArEjE","file":"google-analytics.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 28);\n","\nexport class GA {\n\n static ga: GA;\n\n static init(trackingId: string, dimensions?: Object) {\n GA.ga = new GA(trackingId, dimensions);\n }\n\n static pageview(path: string, title?: string): void {\n if (GA.ga) {\n GA.ga.pageview(path, title);\n }\n }\n\n static event(name: string, parameters?: { [k: string]: string }): void {\n if (GA.ga) {\n GA.ga.event(name, parameters);\n }\n }\n\n static set(parameters: { [k: string]: string }): void {\n if (GA.ga) {\n GA.ga.set(parameters);\n }\n }\n\n private _trackingId: string;\n\n constructor(trackingId: string, dimensions?: Object) {\n this._trackingId = trackingId;\n this._load();\n }\n\n pageview(path: string, title?: string): void {\n if (this._trackingId) {\n (self as any).gtag(\"config\", this._trackingId,\n {\n page_path: path,\n page_title: title\n });\n }\n }\n\n event(name: string, parameters?: { [k: string]: string }): void {\n if (this._trackingId) {\n (self as any).gtag(\"event\", name, parameters);\n }\n }\n\n set(parameters: { [k: string]: string }): void {\n if (this._trackingId) {\n (self as any).gtag(\"set\", parameters);\n }\n }\n\n private _load(): void {\n if (this._trackingId) {\n const script = document.createElement(\"script\");\n script.async = true;\n script.src = `https://www.googletagmanager.com/gtag/js?id=${this._trackingId}`;\n document.getElementsByTagName(\"head\")[0].appendChild(script);\n\n const script1 = document.createElement(\"script\");\n script1.textContent = `\n window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n gtag('config', '${this._trackingId}');\n `;\n document.getElementsByTagName(\"head\")[0].appendChild(script1);\n }\n }\n\n}\n\n// const ga = new GA(\"track-id\");\n// GA.ga = ga;\n// ga.pageview(\"my-page\");\n"],"sourceRoot":""}
|
package/dist/umd/hash.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(window,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=10)}({10:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hash=t.hashUrlDecode=t.hashUrlEncode=t.hashJsonDecode=t.hashJsonEncode=void 0,t.hashJsonEncode=e=>e?encodeURIComponent(JSON.stringify(e)):"",t.hashJsonDecode=e=>e?JSON.parse(decodeURIComponent(e)):void 0,t.hashUrlEncode=e=>{const n="string"==typeof e?t.hashUrlDecode(e):e,o=n.path||[],r=n.query||{},i=o.map(e=>encodeURIComponent(e)).join("/"),s=Object.entries(r).reduce((e,t)=>("string"==typeof t[1]?e.append(t[0],t[1]):t[1].forEach(n=>e.append(t[0],n)),e),new URLSearchParams).toString();return`${i}${s?"?":""}${s}`},t.hashUrlDecode=e=>{const[t,n]=e.split("?"),o=t.split("/").map(e=>decodeURIComponent(e)),r={};for(const e of new URLSearchParams(n).entries()){const[t,n]=e;t in r?"string"==typeof r[t]?r[t]=[r[t],n]:r[t].push(n):r[t]=n}return{path:o,query:r}};t.Hash=class{constructor(e=!0){this._encode=e=>String(e),this._decode=e=>e,this._emitWritten=e}onChange(e){return this._cb=e,this}coders(e,t){return this._encode=e,this._decode=t,this}listen(){return this._cb&&this._cb(this.read()),"onhashchange"in window?onhashchange=()=>{const e=this.read();if(this._emitWritten)this._cb&&this._cb(e);else{const t=this._writtenDataJson===JSON.stringify(e);this._writtenDataJson=void 0,t||this._cb&&this._cb(e)}}:alert('Browser "window.onhashchange" not implemented'),this}read(){return this._decode(location.hash.slice(1))}write(e){return location.hash="#"+this._encode(e),this._emitWritten||(this._writtenDataJson=JSON.stringify(e),this._cb&&this._cb(e)),this}}}})}));
|
|
2
2
|
//# sourceMappingURL=hash.js.map
|
package/dist/umd/hash.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///./src/hash.ts"],"names":["root","factory","exports","module","define","amd","a","i","window","installedModules","__webpack_require__","moduleId","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","hashJsonEncoder","data","JSON","stringify","hashJsonDecoder","str","parse","undefined","hashUrlEncoder","hashUrlDecoder","dpath","path","dquery","query","join","entries","reduce","append","forEach","v","URLSearchParams","toString","pathStr","queryStr","split","e","k","push","emitWritten","_encode","String","_decode","this","_emitWritten","cb","_cb","encode","decode","read","onhashchange","written","_writtenDataJson","alert","decodeURIComponent","location","hash","slice","encodeURI"],"mappings":"CAAA,SAA2CA,EAAMC,GAChD,GAAsB,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,SACb,GAAqB,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,OACP,CACJ,IAAIK,EAAIL,IACR,IAAI,IAAIM,KAAKD,GAAuB,iBAAZJ,QAAuBA,QAAUF,GAAMO,GAAKD,EAAEC,IAPxE,CASGC,QAAQ,WACX,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUT,QAGnC,IAAIC,EAASM,EAAiBE,GAAY,CACzCJ,EAAGI,EACHC,GAAG,EACHV,QAAS,IAUV,OANAW,EAAQF,GAAUG,KAAKX,EAAOD,QAASC,EAAQA,EAAOD,QAASQ,GAG/DP,EAAOS,GAAI,EAGJT,EAAOD,QA0Df,OArDAQ,EAAoBK,EAAIF,EAGxBH,EAAoBM,EAAIP,EAGxBC,EAAoBO,EAAI,SAASf,EAASgB,EA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AM,iDAgBHV,KAGX,OACI,OAAOA,KAAKD,QAAQY,mBAAmBC,SAASC,KAAKC,MAAM,KAG/D,MAAM7C,GAOF,OANA2C,SAASC,KAAO,IAAME,UAAUf,KAAKH,QAAQ5B,IAExC+B,KAAKC,eACND,KAAKS,iBAAmBvC,KAAKC,UAAUF,GACvC+B,KAAKG,KAAOH,KAAKG,IAAIlC,IAElB+B","file":"hash.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 10);\n","\nexport interface HashUrlData {\n path: string[];\n query: {\n [key: string]: string | string[];\n };\n}\n\nexport const hashJsonEncoder = (data: any) => data ? JSON.stringify(data) : \"\";\nexport const hashJsonDecoder = (str: string) => str ? JSON.parse(str) : undefined;\n\nexport const hashUrlEncoder = (data: HashUrlData): string => {\n // console.log(data);\n const d = typeof data === \"string\"\n ? hashUrlDecoder(data)\n : data as HashUrlData;\n const dpath = d.path || [];\n const dquery = d.query || {};\n const path = dpath.join(\"/\");\n // const params = new URLSearchParams();\n const query = Object.entries(dquery)\n .reduce(\n (p, c) => {\n if (typeof c[1] === \"string\") {\n p.append(c[0], c[1]);\n } else {\n c[1].forEach(v => p.append(c[0], v));\n }\n return p;\n },\n new URLSearchParams())\n .toString();\n const str = `${path}?${query}`;\n // console.log(str);\n return str;\n};\nexport const hashUrlDecoder = (str: string): HashUrlData => {\n // console.log(str);\n const [pathStr, queryStr] = str.split(\"?\");\n // const pathStr = str.substring(0, str.indexOf(\"?\"));\n // const queryStr = str.substring(str.indexOf(\"?\") + 1);\n const path = pathStr.split(\"/\");\n const query = {} as any;\n for (const e of new URLSearchParams(queryStr).entries()) {\n const [k, v] = e;\n if (k in query) {\n if (typeof query[k] === \"string\") {\n query[k] = [query[k], v];\n } else {\n query[k].push(v);\n }\n } else {\n query[k] = v;\n }\n }\n const data = { path, query };\n // console.log(data);\n return data;\n};\n\nexport class Hash<T = string> {\n\n private _cb?: (data: T) => void;\n\n private _emitWritten: boolean;\n private _writtenDataJson?: string;\n\n private _encode = (data: T) => String(data);\n private _decode = (str: string) => str as any as T;\n\n constructor(emitWritten = true) {\n this._emitWritten = emitWritten;\n }\n\n onChange(cb: (data: T) => void): this {\n this._cb = cb;\n return this;\n }\n\n coders(encode: (data: T) => string,\n decode: (data: string) => T): this {\n this._encode = encode;\n this._decode = decode;\n return this;\n }\n\n listen(): this {\n this._cb && this._cb(this.read());\n if (\"onhashchange\" in window) {\n onhashchange = () => {\n const data = this.read();\n // console.log(\"onhashchange\", location.hash, data);\n if (!this._emitWritten) {\n const written = this._writtenDataJson === JSON.stringify(data);\n this._writtenDataJson = undefined;\n if (!written) {\n this._cb && this._cb(data);\n }\n } else {\n this._cb && this._cb(data);\n }\n };\n } else {\n alert(`Browser \"window.onhashchange\" not implemented`);\n // let prevHash = location.hash;\n // if (this._iId) {\n // clearInterval(this._iId);\n // }\n // this._iId = setInterval(() => {\n // if (location.hash !== prevHash) {\n // prevHash = location.hash;\n // const written = this._dataJson === location.hash;\n // this._dataJson = undefined;\n // if (this._emitWritten || !written) {\n // this._cb && this._cb(data);\n // }\n // }\n // }, 500);\n }\n return this;\n }\n\n read(): T {\n return this._decode(decodeURIComponent(location.hash.slice(1)));\n }\n\n write(data: T): this {\n location.hash = \"#\" + encodeURI(this._encode(data));\n // location.hash = \"#\" + this._encode(data);\n if (!this._emitWritten) {\n this._writtenDataJson = JSON.stringify(data);\n this._cb && this._cb(data);\n }\n return this;\n }\n\n}\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///./src/hash.ts"],"names":["root","factory","exports","module","define","amd","a","i","window","installedModules","__webpack_require__","moduleId","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","hashJsonEncode","data","encodeURIComponent","JSON","stringify","hashJsonDecode","str","parse","decodeURIComponent","undefined","hashUrlEncode","hashUrlDecode","dpath","path","dquery","query","map","join","entries","reduce","append","forEach","v","URLSearchParams","toString","pathStr","queryStr","split","e","k","push","emitWritten","_encode","String","_decode","this","_emitWritten","cb","_cb","encode","decode","read","onhashchange","written","_writtenDataJson","alert","location","hash","slice"],"mappings":"CAAA,SAA2CA,EAAMC,GAChD,GAAsB,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,SACb,GAAqB,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,OACP,CACJ,IAAIK,EAAIL,IACR,IAAI,IAAIM,KAAKD,GAAuB,iBAAZJ,QAAuBA,QAAUF,GAAMO,GAAKD,EAAEC,IAPxE,CASGC,QAAQ,WACX,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUT,QAGnC,IAAIC,EAASM,EAAiBE,GAAY,CACzCJ,EAAGI,EACHC,GAAG,EACHV,QAAS,IAUV,OANAW,EAAQF,GAAUG,KAAKX,EAAOD,QAASC,EAAQA,EAAOD,QAASQ,GAG/DP,EAAOS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5E,OAClB6E,aAAe,KACX,MAAMzC,EAAOkC,KAAKM,OAElB,GAAKN,KAAKC,aAOND,KAAKG,KAAOH,KAAKG,IAAIrC,OAPD,CACpB,MAAM0C,EAAUR,KAAKS,mBAAqBzC,KAAKC,UAAUH,GACzDkC,KAAKS,sBAAmBnC,EACnBkC,GACDR,KAAKG,KAAOH,KAAKG,IAAIrC,KAOjC4C,MAAM,iDAgBHV,KAGX,OACI,OAAOA,KAAKD,QAAQY,SAASC,KAAKC,MAAM,IAG5C,MAAM/C,GAOF,OANA6C,SAASC,KAAO,IAAMZ,KAAKH,QAAQ/B,GAE9BkC,KAAKC,eACND,KAAKS,iBAAmBzC,KAAKC,UAAUH,GACvCkC,KAAKG,KAAOH,KAAKG,IAAIrC,IAElBkC","file":"hash.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 10);\n","\nexport interface HashUrlData {\n path: string[];\n query: {\n [key: string]: string | string[];\n };\n}\n\nexport const hashJsonEncode = (data: any) => data ? encodeURIComponent(JSON.stringify(data)) : \"\";\nexport const hashJsonDecode = (str: string) => str ? JSON.parse(decodeURIComponent(str)) : undefined;\n\nexport const hashUrlEncode = (data: HashUrlData): string => {\n // console.log(data);\n const d = typeof data === \"string\"\n ? hashUrlDecode(data)\n : data as HashUrlData;\n const dpath = d.path || [];\n const dquery = d.query || {};\n const path = dpath.map(p => encodeURIComponent(p)).join(\"/\");\n // const params = new URLSearchParams();\n const query = Object.entries(dquery)\n .reduce(\n (p, c) => {\n if (typeof c[1] === \"string\") {\n p.append(c[0], c[1]);\n } else {\n c[1].forEach(v => p.append(c[0], v));\n }\n return p;\n },\n new URLSearchParams())\n .toString();\n const str = `${path}${query ? \"?\" : \"\"}${query}`;\n // console.log(str);\n return str;\n};\nexport const hashUrlDecode = (str: string): HashUrlData => {\n // console.log(str);\n const [pathStr, queryStr] = str.split(\"?\");\n // const pathStr = str.substring(0, str.indexOf(\"?\"));\n // const queryStr = str.substring(str.indexOf(\"?\") + 1);\n const path = pathStr.split(\"/\").map(p => decodeURIComponent(p));\n const query = {} as any;\n for (const e of new URLSearchParams(queryStr).entries()) {\n const [k, v] = e;\n if (k in query) {\n if (typeof query[k] === \"string\") {\n query[k] = [query[k], v];\n } else {\n query[k].push(v);\n }\n } else {\n query[k] = v;\n }\n }\n const data = { path, query };\n // console.log(data);\n return data;\n};\n\nexport class Hash<T = string> {\n\n private _cb?: (data: T) => void;\n\n private _emitWritten: boolean;\n private _writtenDataJson?: string;\n\n private _encode = (data: T) => String(data);\n private _decode = (str: string) => str as any as T;\n\n constructor(emitWritten = true) {\n this._emitWritten = emitWritten;\n }\n\n onChange(cb: (data: T) => void): this {\n this._cb = cb;\n return this;\n }\n\n coders(encode: (data: T) => string,\n decode: (data: string) => T): this {\n this._encode = encode;\n this._decode = decode;\n return this;\n }\n\n listen(): this {\n this._cb && this._cb(this.read());\n if (\"onhashchange\" in window) {\n onhashchange = () => {\n const data = this.read();\n // console.log(\"onhashchange\", location.hash, data);\n if (!this._emitWritten) {\n const written = this._writtenDataJson === JSON.stringify(data);\n this._writtenDataJson = undefined;\n if (!written) {\n this._cb && this._cb(data);\n }\n } else {\n this._cb && this._cb(data);\n }\n };\n } else {\n alert(`Browser \"window.onhashchange\" not implemented`);\n // let prevHash = location.hash;\n // if (this._iId) {\n // clearInterval(this._iId);\n // }\n // this._iId = setInterval(() => {\n // if (location.hash !== prevHash) {\n // prevHash = location.hash;\n // const written = this._dataJson === location.hash;\n // this._dataJson = undefined;\n // if (this._emitWritten || !written) {\n // this._cb && this._cb(data);\n // }\n // }\n // }, 500);\n }\n return this;\n }\n\n read(): T {\n return this._decode(location.hash.slice(1));\n }\n\n write(data: T): this {\n location.hash = \"#\" + this._encode(data);\n // location.hash = \"#\" + this._encode(data);\n if (!this._emitWritten) {\n this._writtenDataJson = JSON.stringify(data);\n this._cb && this._cb(data);\n }\n return this;\n }\n\n}\n"],"sourceRoot":""}
|
package/dist/umd/hsml-app.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("IncrementalDOM"));else if("function"==typeof define&&define.amd)define(["IncrementalDOM"],e);else{var n="object"==typeof exports?e(require("IncrementalDOM")):e(t.IncrementalDOM);for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(window,(function(t){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var s=e[o]={i:o,l:!1,exports:{}};return t[o].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(o,s,function(e){return t[e]}.bind(null,s));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=12)}({0:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hjoin=e.hsml=e.NBSP=void 0,e.NBSP=" ",e.hsml=function t(e,n,o){if(null!=e)switch(e.constructor){case Array:!function(e,n,o){if("string"!=typeof e[0])return void console.error("HSML tag head not string:",e);const s=e[0],i=e[1],c=i&&i.constructor===Object;let a,r,u=[];const h=e[c?2:1];switch(null!=h&&h.constructor){case Array:u=h;break;case Function:a=h;break;case String:case Boolean:case Number:case Date:u=[h];break;default:r=h}const d=s.split("~"),l=d[1],p=d[0].split("."),f=p[0].split("#"),m=f[0]||"div",b=f[1],y=p.slice(1);let v;v=c?i:{};b&&(v._id=b);y.length&&(v._classes=y);l&&(v._ref=l);r&&(v._hObj=r);const _=n.open(m,v,u,o);a&&n.fnc(a,o);_||u.forEach(e=>t(e,n,o));n.close(m,u,o)}(e,n,o);break;case Function:n.fnc(e,o);break;case String:n.text(e,o);break;case Boolean:n.text(""+e,o);break;case Number:const s=e,i=s.toLocaleString?s.toLocaleString():s.toString();n.text(i,o);break;case Date:const c=e,a=c.toLocaleString?c.toLocaleString():c.toString();n.text(a,o);break;default:n.obj(e,o)}},e.hjoin=function(t,e){const n=t.reduce((t,n)=>(t.push(n,e),t),[]);return n.splice(-1),n}},1:function(e,n){e.exports=t},12:function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(s,i){function c(t){try{r(o.next(t))}catch(t){i(t)}}function a(t){try{r(o.throw(t))}catch(t){i(t)}}function r(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(c,a)}r((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.HApp=e.HAppAction=void 0;const s=n(2),i=console.log,c=console.error;var a;!function(t){t._init="_init",t._mount="_mount",t._umount="_umount"}(a=e.HAppAction||(e.HAppAction={}));const r=window.requestAnimationFrame||function(t){window.setTimeout(t,1e3/60)},u=window.cancelAnimationFrame||function(t){window.clearTimeout(t)};class h{constructor(t,e,n,s=document.body){this.refs={},this.dispatch=(t,e,n)=>o(this,void 0,void 0,(function*(){if(h.debug){i("HApp action:",{type:t,data:e,event:n});const o=performance.now();try{yield this.dispatcher({type:t,data:e,event:n},this.state,this.dispatch),this.update()}catch(t){c("HApp dispatch:",t)}const s=performance.now();i("HApp dispatch:",s-o+" ms",this.state)}else try{yield this.dispatcher({type:t,data:e,event:n},this.state,this.dispatch),this.update()}catch(t){c("HApp dispatch:",t)}})),this.render=()=>{if(h.debug){const t=performance.now();let e;try{e=this.view(this.state)}catch(t){c("HApp render:",t)}const n=performance.now();return i("HApp render:",n-t+" ms",e),e||[]}{let t;try{t=this.view(this.state)}catch(t){c("HApp render:",t)}return t||[]}},this.actionCb=(t,e,n)=>{void 0===(e=e&&e.constructor===Function?e(n):e)&&n&&(e=function(t){const e=t.target;switch(e.nodeName){case"FORM":t.preventDefault();const n=e.elements,o={};for(let t=0;t<n.length;t++){const e=l(n[t]);if("object"==typeof e){const s=Object.keys(e);if(s.length){const i=s[0],c=e[i];void 0===o[i]?o[i]=c:"string"==typeof o[i]||o[i]instanceof String?o[i]=c instanceof Array?[o[i],...c]:[o[i],c]:o[i]instanceof Array?c instanceof Array?o[i]=o[i].concat(c):o[i].push(c):o[i]=c instanceof Array?[o[i],...c]:[o[i],c],o[i]instanceof Array&&(o[i]=o[i].filter(t=>null!==t),"radio"===n[t].type&&(o[i]=o[i].length?o[i][0]:null))}}}return o;default:return l(e)}}(n)),this.dispatch(t,e,n)},this.mount=(t=document.body)=>{const e="string"==typeof t?document.getElementById(t)||document.body:t||document.body;if(e.app){e.app.umount()}if(!this.dom){this.dom=e,e.app=this;d(e,this.render(),this),this._onUpdate&&this._onUpdate(this),this.dispatch(a._mount,this.dom)}return this},this.umount=()=>{if(this.dom){this.dispatch(a._umount,this.dom),this.dom.hasAttribute("app")&&this.dom.removeAttribute("app");const t=this.dom.querySelectorAll("[app]");for(let e=0;e<t.length;e++){const n=t[e].app;n&&n.umount()}for(;this.dom.firstChild;)this.dom.removeChild(this.dom.firstChild);delete this.dom.app,this.dom=void 0}return this},this.update=()=>(this.dom&&!this._updateSched&&(this._updateSched=r(()=>{if(this.dom){const t=this.render();d(this.dom,t,this)}this._updateSched=void 0,this._onUpdate&&this._onUpdate(this)})),this),this.onUpdate=t=>(this._onUpdate=t,this),this.toHsml=()=>{if(this.dom){if(!this._updateSched)return["div",{_skip:!0}];u(this._updateSched),this._updateSched=void 0}const t=this.render();return t.push(t=>{this.dom||(this.dom=t,t.app=this,this.dispatch(a._mount,this.dom))}),["div",t]},this.toHtml=()=>this.dom?this.dom.outerHTML:"",this.state=t,this.view=e,this.dispatcher=n||(t=>o(this,void 0,void 0,(function*(){return i("HApp action:",t.type,t.data)}))),this.dispatch(a._init).then(()=>this.mount(s))}}function d(t,e,n){if(h.debug){const o=performance.now();s.hsmls2idomPatch(t,e,n);const c=performance.now();i("HApp update:",c-o+" ms",t)}else s.hsmls2idomPatch(t,e,n)}function l(t){let e=null;switch(t.nodeName){case"INPUT":const n=t;switch(n.type){case"text":case"hidden":case"password":case"email":case"number":case"search":case"url":case"tel":case"color":case"date":case"datetime-local":case"month":case"range":case"time":case"week":case"submit":case"button":e=n.name?{[n.name]:n.value}:n.value;break;case"radio":e=n.name?{[n.name]:n.checked?n.value:null}:n.checked?n.value:null;break;case"checkbox":e="on"===n.value?n.name?{[n.name]:String(n.checked)}:String(n.checked):n.name?{[n.name]:n.checked?String(n.value):null}:n.checked?String(n.value):null}break;case"SELECT":const o=t;if(o.multiple){const t=Array.from(o.selectedOptions).map(t=>t.value);e=o.name?{[o.name]:t}:t}else e=o.name?{[o.name]:o.value}:o.value;break;case"TEXTAREA":const s=t;e=s.name?{[s.name]:s.value}:s.value;break;case"BUTTON":const i=t;e=i.name?{[i.name]:i.value}:i.value}return e}e.HApp=h,h.debug=!1},2:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hsmls2idomPatch=e.hsml2idomPatch=void 0;const o=n(0),s=n(1);class i{open(t,e,n,o){const i=[];let c=e._id,a=e._classes?e._classes:[],r=e._ref,u=e._hObj;for(const t in e)if(e.hasOwnProperty(t))switch(t){case"_id":case"_classes":case"_ref":case"_key":case"_skip":case"_hObj":break;case"id":c=e[t];break;case"classes":const n=e[t];a=a.concat(n?n.map(t=>t.constructor===String?t:t[1]?t[0]:void 0).filter(t=>void 0!==t):[]);break;case"class":a=a.concat(e[t].split(" "));break;case"data":const s=e[t];for(const t in s)s.hasOwnProperty(t)&&(s[t].constructor===String?i.push("data-"+t,s[t]):i.push("data-"+t,JSON.stringify(s[t])));break;case"styles":i.push("style",e[t]);break;case"on":const r=e[t];"string"==typeof r[0]?"function"==typeof r[1]?i.push("on"+r[0],r[1]):i.push("on"+r[0],t=>{o&&o.actionCb&&"function"==typeof o.actionCb&&o.actionCb(r[1],r[2],t)}):r.forEach(t=>{"function"==typeof t[1]?i.push("on"+t[0],t[1]):i.push("on"+t[0],e=>{o&&o.actionCb&&"function"==typeof o.actionCb&&o.actionCb(t[1],t[2],e)})});break;default:switch(typeof e[t]){case"function":i.push("on"+t,e[t]);break;case"object":i.push(t,e[t]);break;case"boolean":e[t]&&i.push(t,t);break;default:i.push(t,e[t])}}return a.length&&i.unshift("class",a.join(" ")),c&&i.unshift("id",c),s.elementOpen(t,e._key,void 0,...i),e._skip&&s.skip(),o&&r&&(o.refs[r]=s.currentElement()),u&&u.mount&&u.mount.constructor===Function&&(u.mount(s.currentElement()),s.skip()),!!e._skip}close(t,e,n){s.elementClose(t)}text(t,e){s.text(t)}fnc(t,e){t(s.currentElement())&&s.skip()}obj(t,e){"toHsml"in t?t.toHsml&&o.hsml(t.toHsml(),this,t):this.text(""+t,e)}}function c(t,e){o.hsml(t,new i,e)}e.hsml2idomPatch=function(t,e,n){s.patch(t,t=>t&&c(t,n),e)},e.hsmls2idomPatch=function(t,e,n){s.patch(t,t=>t&&function(t,e){for(const n of t)if(null!=n)if(n.constructor===String)s.text(n);else if("toHsml"in n){const t=n;t.toHsml&&c(t.toHsml(),t)}else c(n,e)}(t,n),e)}}})}));
|
|
1
|
+
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("IncrementalDOM"));else if("function"==typeof define&&define.amd)define(["IncrementalDOM"],e);else{var n="object"==typeof exports?e(require("IncrementalDOM")):e(t.IncrementalDOM);for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(window,(function(t){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var s=e[o]={i:o,l:!1,exports:{}};return t[o].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(o,s,function(e){return t[e]}.bind(null,s));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=12)}({0:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hjoin=e.hsml=e.NBSP=void 0,e.NBSP=" ",e.hsml=function t(e,n,o){if(null!=e)switch(e.constructor){case Array:!function(e,n,o){if("string"!=typeof e[0])return void console.error("HSML tag head not string:",e);const s=e[0],i=e[1],c=i&&i.constructor===Object;let a,r,u=[];const h=e[c?2:1];switch(null!=h&&h.constructor){case Array:u=h;break;case Function:a=h;break;case String:case Boolean:case Number:case Date:u=[h];break;default:r=h}const d=s.split("~"),l=d[1],p=d[0].split("."),f=p[0].split("#"),m=f[0]||"div",b=f[1],y=p.slice(1);let v;v=c?i:{};b&&(v._id=b);y.length&&(v._classes=y);l&&(v._ref=l);r&&(v._hObj=r);const _=n.open(m,v,u,o);a&&n.fnc(a,o);_||u.forEach(e=>t(e,n,o));n.close(m,u,o)}(e,n,o);break;case Function:n.fnc(e,o);break;case String:n.text(e,o);break;case Boolean:n.text(""+e,o);break;case Number:const s=e,i=s.toLocaleString?s.toLocaleString():s.toString();n.text(i,o);break;case Date:const c=e,a=c.toLocaleString?c.toLocaleString():c.toString();n.text(a,o);break;default:n.obj(e,o)}},e.hjoin=function(t,e){const n=t.reduce((t,n)=>(t.push(n,e),t),[]);return n.splice(-1),n}},1:function(e,n){e.exports=t},12:function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(s,i){function c(t){try{r(o.next(t))}catch(t){i(t)}}function a(t){try{r(o.throw(t))}catch(t){i(t)}}function r(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(c,a)}r((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.HApp=e.HAppAction=void 0;const s=n(2),i=console.log,c=console.error;var a;!function(t){t._init="_init",t._mount="_mount",t._umount="_umount"}(a=e.HAppAction||(e.HAppAction={}));const r=window.requestAnimationFrame||function(t){window.setTimeout(t,1e3/60)},u=window.cancelAnimationFrame||function(t){window.clearTimeout(t)};class h{constructor(t,e,n,s=document.body){this.refs={},this.dispatch=(t,e,n)=>o(this,void 0,void 0,(function*(){if(h.debug){i("HApp action:",{type:t,data:e,event:n});const o=performance.now();try{yield this.dispatcher({type:t,data:e,event:n},this.state,this.dispatch,this.refs),this.update()}catch(t){c("HApp dispatch:",t)}const s=performance.now();i("HApp dispatch:",s-o+" ms",this.state)}else try{yield this.dispatcher({type:t,data:e,event:n},this.state,this.dispatch,this.refs),this.update()}catch(t){c("HApp dispatch:",t)}})),this.render=()=>{if(h.debug){const t=performance.now();let e;try{e=this.view(this.state)}catch(t){c("HApp render:",t)}const n=performance.now();return i("HApp render:",n-t+" ms",e),e||[]}{let t;try{t=this.view(this.state)}catch(t){c("HApp render:",t)}return t||[]}},this.actionCb=(t,e,n)=>{void 0===(e=e&&e.constructor===Function?e(n):e)&&n&&(e=function(t){const e=t.target;switch(e.nodeName){case"FORM":t.preventDefault();const n=e.elements,o={};for(let t=0;t<n.length;t++){const e=l(n[t]);if("object"==typeof e){const s=Object.keys(e);if(s.length){const i=s[0],c=e[i];void 0===o[i]?o[i]=c:"string"==typeof o[i]||o[i]instanceof String?o[i]=c instanceof Array?[o[i],...c]:[o[i],c]:o[i]instanceof Array?c instanceof Array?o[i]=o[i].concat(c):o[i].push(c):o[i]=c instanceof Array?[o[i],...c]:[o[i],c],o[i]instanceof Array&&(o[i]=o[i].filter(t=>null!==t),"radio"===n[t].type&&(o[i]=o[i].length?o[i][0]:null))}}}return o;default:return l(e)}}(n)),this.dispatch(t,e,n)},this.mount=(t=document.body)=>{const e="string"==typeof t?document.getElementById(t)||document.body:t||document.body;if(e.app){e.app.umount()}if(!this.dom){this.dom=e,e.app=this;d(e,this.render(),this),this._onUpdate&&this._onUpdate(this),this.dispatch(a._mount,this.dom)}return this},this.umount=()=>{if(this.dom){this.dispatch(a._umount,this.dom),this.dom.hasAttribute("app")&&this.dom.removeAttribute("app");const t=this.dom.querySelectorAll("[app]");for(let e=0;e<t.length;e++){const n=t[e].app;n&&n.umount()}for(;this.dom.firstChild;)this.dom.removeChild(this.dom.firstChild);delete this.dom.app,this.dom=void 0}return this},this.update=()=>(this.dom&&!this._updateSched&&(this._updateSched=r(()=>{if(this.dom){const t=this.render();d(this.dom,t,this)}this._updateSched=void 0,this._onUpdate&&this._onUpdate(this)})),this),this.onUpdate=t=>(this._onUpdate=t,this),this.toHsml=()=>{if(this.dom){if(!this._updateSched)return["div",{_skip:!0}];u(this._updateSched),this._updateSched=void 0}const t=this.render();return t.push(t=>{this.dom||(this.dom=t,t.app=this,this.dispatch(a._mount,this.dom))}),["div",t]},this.toHtml=()=>this.dom?this.dom.outerHTML:"",this.state=t,this.view=e,this.dispatcher=n||(t=>o(this,void 0,void 0,(function*(){return i("HApp action:",t.type,t.data)}))),this.dispatch(a._init,this).then(()=>this.mount(s))}}function d(t,e,n){if(h.debug){const o=performance.now();s.hsmls2idomPatch(t,e,n);const c=performance.now();i("HApp update:",c-o+" ms",t)}else s.hsmls2idomPatch(t,e,n)}function l(t){let e=null;switch(t.nodeName){case"INPUT":const n=t;switch(n.type){case"text":case"hidden":case"password":case"email":case"number":case"search":case"url":case"tel":case"color":case"date":case"datetime-local":case"month":case"range":case"time":case"week":case"submit":case"button":e=n.name?{[n.name]:n.value}:n.value;break;case"radio":e=n.name?{[n.name]:n.checked?n.value:null}:n.checked?n.value:null;break;case"checkbox":e="on"===n.value?n.name?{[n.name]:String(n.checked)}:String(n.checked):n.name?{[n.name]:n.checked?String(n.value):null}:n.checked?String(n.value):null}break;case"SELECT":const o=t;if(o.multiple){const t=Array.from(o.selectedOptions).map(t=>t.value);e=o.name?{[o.name]:t}:t}else e=o.name?{[o.name]:o.value}:o.value;break;case"TEXTAREA":const s=t;e=s.name?{[s.name]:s.value}:s.value;break;case"BUTTON":const i=t;e=i.name?{[i.name]:i.value}:i.value}return e}e.HApp=h,h.debug=!1},2:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hsmls2idomPatch=e.hsml2idomPatch=void 0;const o=n(0),s=n(1);class i{open(t,e,n,o){const i=[];let c=e._id,a=e._classes?e._classes:[],r=e._ref,u=e._hObj;for(const t in e)if(e.hasOwnProperty(t))switch(t){case"_id":case"_classes":case"_ref":case"_key":case"_skip":case"_hObj":break;case"id":c=e[t];break;case"classes":const n=e[t];a=a.concat(n?n.map(t=>t.constructor===String?t:t[1]?t[0]:void 0).filter(t=>void 0!==t):[]);break;case"class":a=a.concat(e[t].split(" "));break;case"data":const s=e[t];for(const t in s)s.hasOwnProperty(t)&&(s[t].constructor===String?i.push("data-"+t,s[t]):i.push("data-"+t,JSON.stringify(s[t])));break;case"styles":i.push("style",e[t]);break;case"on":const r=e[t];"string"==typeof r[0]?"function"==typeof r[1]?i.push("on"+r[0],r[1]):i.push("on"+r[0],t=>{o&&o.actionCb&&"function"==typeof o.actionCb&&o.actionCb(r[1],r[2],t)}):r.forEach(t=>{"function"==typeof t[1]?i.push("on"+t[0],t[1]):i.push("on"+t[0],e=>{o&&o.actionCb&&"function"==typeof o.actionCb&&o.actionCb(t[1],t[2],e)})});break;default:switch(typeof e[t]){case"function":i.push("on"+t,e[t]);break;case"object":i.push(t,e[t]);break;case"boolean":e[t]&&i.push(t,t);break;default:i.push(t,e[t])}}return a.length&&i.unshift("class",a.join(" ")),c&&i.unshift("id",c),s.elementOpen(t,e._key,void 0,...i),e._skip&&s.skip(),o&&r&&(o.refs[r]=s.currentElement()),u&&u.mount&&u.mount.constructor===Function&&(u.mount(s.currentElement()),s.skip()),!!e._skip}close(t,e,n){s.elementClose(t)}text(t,e){s.text(t)}fnc(t,e){t(s.currentElement())&&s.skip()}obj(t,e){"toHsml"in t?t.toHsml&&o.hsml(t.toHsml(),this,t):this.text(""+t,e)}}function c(t,e){o.hsml(t,new i,e)}e.hsml2idomPatch=function(t,e,n){s.patch(t,t=>t&&c(t,n),e)},e.hsmls2idomPatch=function(t,e,n){s.patch(t,t=>t&&function(t,e){for(const n of t)if(null!=n)if(n.constructor===String)s.text(n);else if("toHsml"in n){const t=n;t.toHsml&&c(t.toHsml(),t)}else c(n,e)}(t,n),e)}}})}));
|
|
2
2
|
//# sourceMappingURL=hsml-app.js.map
|