@dooboostore/simple-web-component 1.0.31 → 1.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/decorators/applyStyle.js +1 -1
- package/dist/cjs/decorators/applyStyle.js.map +2 -2
- package/dist/cjs/decorators/attribute.js +17 -1
- package/dist/cjs/decorators/attribute.js.map +2 -2
- package/dist/cjs/decorators/elementDefine.js +26 -9
- package/dist/cjs/decorators/elementDefine.js.map +3 -3
- package/dist/cjs/elements/SwcAppMixin.js +1 -1
- package/dist/cjs/elements/SwcAppMixin.js.map +2 -2
- package/dist/cjs/elements/SwcAsync.js +69 -57
- package/dist/cjs/elements/SwcAsync.js.map +2 -2
- package/dist/cjs/elements/SwcChoose.js +66 -60
- package/dist/cjs/elements/SwcChoose.js.map +2 -2
- package/dist/cjs/elements/SwcIf.js +51 -66
- package/dist/cjs/elements/SwcIf.js.map +2 -2
- package/dist/cjs/elements/SwcLoop.js +58 -78
- package/dist/cjs/elements/SwcLoop.js.map +2 -2
- package/dist/cjs/elements/register.js +310 -335
- package/dist/cjs/elements/register.js.map +2 -2
- package/dist/cjs/types.js.map +1 -1
- package/dist/cjs/utils/Utils.js +7 -13
- package/dist/cjs/utils/Utils.js.map +2 -2
- package/dist/esm/decorators/applyStyle.js +1 -1
- package/dist/esm/decorators/applyStyle.js.map +2 -2
- package/dist/esm/decorators/attribute.js +18 -2
- package/dist/esm/decorators/attribute.js.map +2 -2
- package/dist/esm/decorators/elementDefine.js +24 -7
- package/dist/esm/decorators/elementDefine.js.map +3 -3
- package/dist/esm/elements/SwcAppMixin.js +1 -1
- package/dist/esm/elements/SwcAppMixin.js.map +2 -2
- package/dist/esm/elements/SwcAsync.js +70 -58
- package/dist/esm/elements/SwcAsync.js.map +2 -2
- package/dist/esm/elements/SwcChoose.js +67 -61
- package/dist/esm/elements/SwcChoose.js.map +2 -2
- package/dist/esm/elements/SwcIf.js +52 -67
- package/dist/esm/elements/SwcIf.js.map +2 -2
- package/dist/esm/elements/SwcLoop.js +59 -79
- package/dist/esm/elements/SwcLoop.js.map +2 -2
- package/dist/esm/elements/register.js +239 -264
- package/dist/esm/elements/register.js.map +2 -2
- package/dist/esm/types.js.map +1 -1
- package/dist/esm/utils/Utils.js +7 -13
- package/dist/esm/utils/Utils.js.map +2 -2
- package/dist/esm-bundle/dooboostore-simple-web-component.esm.js +2623 -2422
- package/dist/esm-bundle/dooboostore-simple-web-component.esm.js.map +4 -4
- package/dist/types/decorators/attribute.d.ts.map +1 -1
- package/dist/types/decorators/elementDefine.d.ts.map +1 -1
- package/dist/types/elements/register.d.ts.map +1 -1
- package/dist/types/types.d.ts +8 -1
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils/Utils.d.ts.map +1 -1
- package/dist/umd-bundle/dooboostore-simple-web-component.umd.js +2623 -2422
- package/dist/umd-bundle/dooboostore-simple-web-component.umd.js.map +4 -4
- package/package.json +1 -1
- package/src/decorators/applyStyle.ts +1 -1
- package/src/decorators/attribute.ts +35 -30
- package/src/decorators/elementDefine.ts +26 -7
- package/src/elements/SwcAppMixin.ts +1 -1
- package/src/elements/SwcAsync.ts +75 -69
- package/src/elements/SwcChoose.ts +67 -80
- package/src/elements/SwcIf.ts +51 -76
- package/src/elements/SwcLoop.ts +56 -87
- package/src/elements/register.ts +235 -307
- package/src/types.ts +6 -1
- package/src/utils/Utils.ts +11 -17
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
var import_changedAttributeHost = require("../decorators/changedAttributeHost");
|
|
2
2
|
var import_Utils = require("../utils/Utils");
|
|
3
3
|
var import_core = require("@dooboostore/core");
|
|
4
|
+
var import_core_web = require("@dooboostore/core-web");
|
|
5
|
+
var import_decorators = require("../decorators");
|
|
4
6
|
var __decorate = function(decorators, target, key, desc) {
|
|
5
7
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
6
8
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -14,46 +16,60 @@ class SwcAsync extends HTMLTemplateElement {
|
|
|
14
16
|
constructor() {
|
|
15
17
|
super(...arguments);
|
|
16
18
|
this._nodes = [];
|
|
17
|
-
this._value = null;
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
get value() {
|
|
21
|
+
return this._value;
|
|
22
|
+
}
|
|
23
|
+
set value(nv) {
|
|
24
|
+
this.executeAsync(nv);
|
|
25
|
+
}
|
|
26
|
+
setValue(valueAttr) {
|
|
27
|
+
this.executeAsync(this._value);
|
|
24
28
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
setReplaceWrap() {
|
|
30
|
+
this.executeAsync(this._value);
|
|
31
|
+
}
|
|
32
|
+
executeAsync(result = this._value) {
|
|
33
|
+
if (result === void 0 || result === null) {
|
|
34
|
+
this.refresh("default");
|
|
29
35
|
return;
|
|
30
36
|
}
|
|
31
|
-
if (
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
if (result instanceof Promise) {
|
|
38
|
+
this.refresh("loading");
|
|
39
|
+
result.then((v) => {
|
|
40
|
+
this.resultValue = v;
|
|
41
|
+
this.refresh("success");
|
|
42
|
+
}).catch((e) => {
|
|
43
|
+
console.error("[SWC-ASYNC] Promise rejected:", e);
|
|
44
|
+
this.resultValue = e;
|
|
45
|
+
this.refresh("error");
|
|
38
46
|
});
|
|
39
|
-
this.executeAsync(result);
|
|
40
47
|
} else {
|
|
41
|
-
this.
|
|
48
|
+
this.resultValue = result;
|
|
49
|
+
this.refresh("success");
|
|
42
50
|
}
|
|
43
51
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
replaceExpressions(html, groupArgs, context, wrap) {
|
|
53
|
+
const config = wrap ? { wrapExpression: wrap } : void 0;
|
|
54
|
+
const ae = new import_core.ActionExpression(html, config);
|
|
55
|
+
const filterOptions = wrap ? { type: "replace", wrap } : "replace";
|
|
56
|
+
const win = this.ownerDocument?.defaultView || window;
|
|
57
|
+
for (const expr of ae.getExpressions(filterOptions)) {
|
|
58
|
+
try {
|
|
59
|
+
const value = import_core.FunctionUtils.executeReturn({
|
|
60
|
+
script: import_core_web.ConvertUtils.decodeHtmlEntity(expr.script, win.document),
|
|
61
|
+
context,
|
|
62
|
+
args: groupArgs
|
|
63
|
+
});
|
|
64
|
+
ae.replace(expr, String(value));
|
|
65
|
+
} catch (e) {
|
|
66
|
+
console.error(`[SWC] Failed to execute ${expr.original}:`, e);
|
|
67
|
+
}
|
|
54
68
|
}
|
|
69
|
+
return ae.getUnprocessedTemplate();
|
|
55
70
|
}
|
|
56
|
-
|
|
71
|
+
refresh(state = "default") {
|
|
72
|
+
console.log("rrrrrrrrrrrrrrrrr", state);
|
|
57
73
|
this.cleanup();
|
|
58
74
|
const portal = this.parentElement;
|
|
59
75
|
if (!portal)
|
|
@@ -62,46 +78,42 @@ class SwcAsync extends HTMLTemplateElement {
|
|
|
62
78
|
const helperSet = import_Utils.SwcUtils.getHelperAndHostSet(win, this);
|
|
63
79
|
const t = this.content.querySelector(`template[is="swc-${state}"]`);
|
|
64
80
|
if (t) {
|
|
65
|
-
|
|
66
|
-
this.
|
|
67
|
-
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
const value = attr.value || "";
|
|
74
|
-
if (value.startsWith("{{") && value.endsWith("}}")) {
|
|
75
|
-
const script = value.slice(2, -2).trim();
|
|
76
|
-
const result = import_core.FunctionUtils.executeReturn({
|
|
77
|
-
script,
|
|
78
|
-
context: n,
|
|
79
|
-
args: groupArgs
|
|
80
|
-
});
|
|
81
|
-
n.setAttribute(attr.name, String(result));
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
this._executeCloneCallback("on-clone-nodes", groupArgs);
|
|
87
|
-
portal.insertBefore(clone, this.nextSibling);
|
|
81
|
+
let htmlString = t.innerHTML;
|
|
82
|
+
const groupArgs = { ...helperSet, $value: this._value, $state: state };
|
|
83
|
+
htmlString = this.replaceExpressions(htmlString, groupArgs, this, this._replaceWrap);
|
|
84
|
+
const temp = this.ownerDocument?.createElement("template") || document.createElement("template");
|
|
85
|
+
temp.innerHTML = htmlString;
|
|
86
|
+
const content = temp.content;
|
|
87
|
+
this._nodes = Array.from(content.childNodes);
|
|
88
|
+
portal.insertBefore(content, this.nextSibling);
|
|
88
89
|
}
|
|
89
90
|
}
|
|
90
91
|
cleanup() {
|
|
91
92
|
this._nodes.forEach((n) => n.parentElement?.removeChild(n));
|
|
92
93
|
this._nodes = [];
|
|
93
94
|
}
|
|
94
|
-
connectedCallback() {
|
|
95
|
-
this.refresh();
|
|
96
|
-
}
|
|
97
95
|
disconnectedCallback() {
|
|
98
96
|
this.cleanup();
|
|
99
97
|
}
|
|
100
98
|
}
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, import_decorators.attributeHost)("value"),
|
|
101
|
+
__metadata("design:type", Object)
|
|
102
|
+
], SwcAsync.prototype, "_value", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, import_decorators.attributeHost)("replace-wrap"),
|
|
105
|
+
__metadata("design:type", String)
|
|
106
|
+
], SwcAsync.prototype, "_replaceWrap", void 0);
|
|
101
107
|
__decorate([
|
|
102
108
|
(0, import_changedAttributeHost.changedAttributeHost)("value"),
|
|
103
109
|
__metadata("design:type", Function),
|
|
104
110
|
__metadata("design:paramtypes", [String]),
|
|
105
111
|
__metadata("design:returntype", void 0)
|
|
106
|
-
], SwcAsync.prototype, "
|
|
112
|
+
], SwcAsync.prototype, "setValue", null);
|
|
113
|
+
__decorate([
|
|
114
|
+
(0, import_changedAttributeHost.changedAttributeHost)("replace-wrap"),
|
|
115
|
+
__metadata("design:type", Function),
|
|
116
|
+
__metadata("design:paramtypes", []),
|
|
117
|
+
__metadata("design:returntype", void 0)
|
|
118
|
+
], SwcAsync.prototype, "setReplaceWrap", null);
|
|
107
119
|
//# sourceMappingURL=SwcAsync.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/elements/SwcAsync.ts"],
|
|
4
|
-
"sourcesContent": ["import { changedAttributeHost } from '../decorators/changedAttributeHost';\nimport { SwcUtils } from '../utils/Utils';\nimport { FunctionUtils } from '@dooboostore/core';\n\nclass SwcAsync extends HTMLTemplateElement {\n
|
|
5
|
-
"mappings": "AAAA,kCAAqC;AACrC,mBAAyB;AACzB,
|
|
4
|
+
"sourcesContent": ["import { changedAttributeHost } from '../decorators/changedAttributeHost';\nimport { SwcUtils } from '../utils/Utils';\nimport { FunctionUtils, ActionExpression } from '@dooboostore/core';\nimport { ConvertUtils } from '@dooboostore/core-web';\nimport { attributeHost } from '../decorators';\n\nclass SwcAsync extends HTMLTemplateElement {\n @attributeHost('value')\n _value: any;\n\n @attributeHost('replace-wrap')\n _replaceWrap: string | null;\n\n resultValue?: any;\n\n get value(): boolean {\n return this._value;\n }\n\n set value(nv: any) {\n this.executeAsync(nv);\n }\n\n private _nodes: Node[] = [];\n\n @changedAttributeHost('value')\n private setValue(valueAttr?: string | null) {\n this.executeAsync(this._value);\n }\n\n @changedAttributeHost('replace-wrap')\n private setReplaceWrap() {\n this.executeAsync(this._value);\n }\n\n private executeAsync(result: any = this._value) {\n if (result === undefined || result === null) {\n this.refresh('default');\n return;\n }\n\n if (result instanceof Promise) {\n this.refresh('loading');\n result\n .then(v => {\n this.resultValue = v;\n this.refresh('success');\n })\n .catch(e => {\n console.error('[SWC-ASYNC] Promise rejected:', e);\n this.resultValue = e;\n this.refresh('error');\n });\n } else {\n this.resultValue = result;\n this.refresh('success');\n }\n }\n\n private replaceExpressions(html: string, groupArgs: any, context: any, wrap?: string | null): string {\n const config = wrap ? { wrapExpression: wrap } : undefined;\n const ae = new ActionExpression(html, config);\n const filterOptions = wrap ? { type: 'replace' as const, wrap } : 'replace';\n const win = this.ownerDocument?.defaultView || window;\n\n // @ts-ignore\n for (const expr of ae.getExpressions(filterOptions)) {\n try {\n const value = FunctionUtils.executeReturn({\n script: ConvertUtils.decodeHtmlEntity(expr.script, win.document),\n context,\n args: groupArgs\n });\n ae.replace(expr, String(value));\n } catch (e) {\n console.error(`[SWC] Failed to execute ${expr.original}:`, e);\n }\n }\n return ae.getUnprocessedTemplate();\n }\n\n refresh(state: string = 'default') {\n console.log('rrrrrrrrrrrrrrrrr', state);\n this.cleanup();\n const portal = this.parentElement;\n if (!portal) return;\n\n const win = this.ownerDocument?.defaultView || window;\n const helperSet = SwcUtils.getHelperAndHostSet(win, this);\n\n const t = this.content.querySelector(`template[is=\"swc-${state}\"]`) as HTMLTemplateElement;\n if (t) {\n let htmlString = t.innerHTML;\n const groupArgs = { ...helperSet, $value: this._value, $state: state };\n\n htmlString = this.replaceExpressions(htmlString, groupArgs, this, this._replaceWrap);\n\n const temp = this.ownerDocument?.createElement('template') || document.createElement('template');\n temp.innerHTML = htmlString;\n const content = temp.content;\n\n this._nodes = Array.from(content.childNodes);\n portal.insertBefore(content, this.nextSibling);\n }\n }\n\n private cleanup() {\n this._nodes.forEach(n => n.parentElement?.removeChild(n));\n this._nodes = [];\n }\n\n disconnectedCallback() {\n this.cleanup();\n }\n}\n"],
|
|
5
|
+
"mappings": "AAAA,kCAAqC;AACrC,mBAAyB;AACzB,kBAAgD;AAChD,sBAA6B;AAC7B,wBAA8B;;;;;;;;;;AAE9B,MAAM,iBAAiB,oBAAmB;EAA1C,cAAA;;AAiBU,SAAA,SAAiB,CAAA;EA2F3B;EAnGE,IAAI,QAAK;AACP,WAAO,KAAK;EACd;EAEA,IAAI,MAAM,IAAO;AACf,SAAK,aAAa,EAAE;EACtB;EAKQ,SAAS,WAAyB;AACxC,SAAK,aAAa,KAAK,MAAM;EAC/B;EAGQ,iBAAc;AACpB,SAAK,aAAa,KAAK,MAAM;EAC/B;EAEQ,aAAa,SAAc,KAAK,QAAM;AAC5C,QAAI,WAAW,UAAa,WAAW,MAAM;AAC3C,WAAK,QAAQ,SAAS;AACtB;IACF;AAEA,QAAI,kBAAkB,SAAS;AAC7B,WAAK,QAAQ,SAAS;AACtB,aACG,KAAK,OAAI;AACR,aAAK,cAAc;AACnB,aAAK,QAAQ,SAAS;MACxB,CAAC,EACA,MAAM,OAAI;AACT,gBAAQ,MAAM,iCAAiC,CAAC;AAChD,aAAK,cAAc;AACnB,aAAK,QAAQ,OAAO;MACtB,CAAC;IACL,OAAO;AACL,WAAK,cAAc;AACnB,WAAK,QAAQ,SAAS;IACxB;EACF;EAEQ,mBAAmB,MAAc,WAAgB,SAAc,MAAoB;AACzF,UAAM,SAAS,OAAO,EAAE,gBAAgB,KAAI,IAAK;AACjD,UAAM,KAAK,IAAI,6BAAiB,MAAM,MAAM;AAC5C,UAAM,gBAAgB,OAAO,EAAE,MAAM,WAAoB,KAAI,IAAK;AAClE,UAAM,MAAM,KAAK,eAAe,eAAe;AAG/C,eAAW,QAAQ,GAAG,eAAe,aAAa,GAAG;AACnD,UAAI;AACF,cAAM,QAAQ,0BAAc,cAAc;UACxC,QAAQ,6BAAa,iBAAiB,KAAK,QAAQ,IAAI,QAAQ;UAC/D;UACA,MAAM;SACP;AACD,WAAG,QAAQ,MAAM,OAAO,KAAK,CAAC;MAChC,SAAS,GAAG;AACV,gBAAQ,MAAM,2BAA2B,KAAK,QAAQ,KAAK,CAAC;MAC9D;IACF;AACA,WAAO,GAAG,uBAAsB;EAClC;EAEA,QAAQ,QAAgB,WAAS;AAC/B,YAAQ,IAAI,qBAAqB,KAAK;AACtC,SAAK,QAAO;AACZ,UAAM,SAAS,KAAK;AACpB,QAAI,CAAC;AAAQ;AAEb,UAAM,MAAM,KAAK,eAAe,eAAe;AAC/C,UAAM,YAAY,sBAAS,oBAAoB,KAAK,IAAI;AAExD,UAAM,IAAI,KAAK,QAAQ,cAAc,oBAAoB,KAAK,IAAI;AAClE,QAAI,GAAG;AACL,UAAI,aAAa,EAAE;AACnB,YAAM,YAAY,EAAE,GAAG,WAAW,QAAQ,KAAK,QAAQ,QAAQ,MAAK;AAEpE,mBAAa,KAAK,mBAAmB,YAAY,WAAW,MAAM,KAAK,YAAY;AAEnF,YAAM,OAAO,KAAK,eAAe,cAAc,UAAU,KAAK,SAAS,cAAc,UAAU;AAC/F,WAAK,YAAY;AACjB,YAAM,UAAU,KAAK;AAErB,WAAK,SAAS,MAAM,KAAK,QAAQ,UAAU;AAC3C,aAAO,aAAa,SAAS,KAAK,WAAW;IAC/C;EACF;EAEQ,UAAO;AACb,SAAK,OAAO,QAAQ,OAAK,EAAE,eAAe,YAAY,CAAC,CAAC;AACxD,SAAK,SAAS,CAAA;EAChB;EAEA,uBAAoB;AAClB,SAAK,QAAO;EACd;;AAzGA,WAAA;MADC,iCAAc,OAAO;;;AAItB,WAAA;MADC,iCAAc,cAAc;;;AAgBrB,WAAA;MADP,kDAAqB,OAAO;;;;;AAMrB,WAAA;MADP,kDAAqB,cAAc;;;;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
var import_changedAttributeHost = require("../decorators/changedAttributeHost");
|
|
2
2
|
var import_Utils = require("../utils/Utils");
|
|
3
3
|
var import_core = require("@dooboostore/core");
|
|
4
|
+
var import_core_web = require("@dooboostore/core-web");
|
|
5
|
+
var import_decorators = require("../decorators");
|
|
4
6
|
var __decorate = function(decorators, target, key, desc) {
|
|
5
7
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
6
8
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -14,57 +16,64 @@ class SwcChoose extends HTMLTemplateElement {
|
|
|
14
16
|
constructor() {
|
|
15
17
|
super(...arguments);
|
|
16
18
|
this._nodes = [];
|
|
17
|
-
this._value = null;
|
|
18
19
|
this._previousTemplate = null;
|
|
19
20
|
}
|
|
20
21
|
get value() {
|
|
21
22
|
return this._value;
|
|
22
23
|
}
|
|
23
24
|
set value(nv) {
|
|
24
|
-
this.
|
|
25
|
-
this.render();
|
|
25
|
+
this.refresh(nv);
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
if (!script)
|
|
30
|
-
return;
|
|
31
|
-
import_core.FunctionUtils.execute({ script, context: this, args });
|
|
27
|
+
setValue() {
|
|
28
|
+
this.refresh();
|
|
32
29
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
30
|
+
setReplaceWrap(replaceWrapAttr) {
|
|
31
|
+
this.refresh();
|
|
32
|
+
}
|
|
33
|
+
replaceExpressions(html, groupArgs, context, wrap) {
|
|
34
|
+
const config = wrap ? { wrapExpression: wrap } : void 0;
|
|
35
|
+
const ae = new import_core.ActionExpression(html, config);
|
|
36
|
+
const filterOptions = wrap ? { type: "replace", wrap } : "replace";
|
|
37
|
+
const win = this.ownerDocument?.defaultView || window;
|
|
38
|
+
for (const expr of ae.getExpressions(filterOptions)) {
|
|
39
|
+
try {
|
|
40
|
+
const value = import_core.FunctionUtils.executeReturn({
|
|
41
|
+
script: import_core_web.ConvertUtils.decodeHtmlEntity(expr.script, win.document),
|
|
42
|
+
context,
|
|
43
|
+
args: groupArgs
|
|
44
|
+
});
|
|
45
|
+
ae.replace(expr, String(value));
|
|
46
|
+
} catch (e) {
|
|
47
|
+
console.error(`[SWC] Failed to execute ${expr.original}:`, e);
|
|
48
|
+
}
|
|
47
49
|
}
|
|
50
|
+
return ae.getUnprocessedTemplate();
|
|
48
51
|
}
|
|
49
|
-
|
|
52
|
+
refresh(value = this._value) {
|
|
53
|
+
const portal = this.parentElement;
|
|
54
|
+
if (!portal)
|
|
55
|
+
return;
|
|
50
56
|
const win = this.ownerDocument?.defaultView || window;
|
|
51
57
|
const helperSet = import_Utils.SwcUtils.getHelperAndHostSet(win, this);
|
|
58
|
+
const groupArgs = { ...helperSet, $value: value };
|
|
52
59
|
const templates = Array.from(this.content.querySelectorAll("template"));
|
|
53
60
|
let selected = null;
|
|
54
61
|
for (const t of templates) {
|
|
55
62
|
if (t.getAttribute("is") === "swc-when") {
|
|
63
|
+
const attrVal = t.getAttribute("value") || "";
|
|
56
64
|
let matches = false;
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
65
|
+
const ae = new import_core.ActionExpression(attrVal);
|
|
66
|
+
const expr = ae.getFirstExpression("replace");
|
|
67
|
+
if (expr) {
|
|
68
|
+
const decodedScript = import_core_web.ConvertUtils.decodeHtmlEntity(expr.script, win.document);
|
|
60
69
|
const result = import_core.FunctionUtils.executeReturn({
|
|
61
|
-
script,
|
|
70
|
+
script: decodedScript,
|
|
62
71
|
context: t,
|
|
63
|
-
args:
|
|
72
|
+
args: groupArgs
|
|
64
73
|
});
|
|
65
|
-
matches = result
|
|
74
|
+
matches = !!result;
|
|
66
75
|
} else {
|
|
67
|
-
matches = String(
|
|
76
|
+
matches = String(attrVal) === String(value);
|
|
68
77
|
}
|
|
69
78
|
if (matches) {
|
|
70
79
|
selected = t;
|
|
@@ -73,54 +82,51 @@ class SwcChoose extends HTMLTemplateElement {
|
|
|
73
82
|
}
|
|
74
83
|
}
|
|
75
84
|
const target = selected || this.content.querySelector('template[is="swc-otherwise"]');
|
|
76
|
-
const
|
|
77
|
-
const
|
|
78
|
-
|
|
85
|
+
const skipValue = target?.getAttribute?.("skip-if-same");
|
|
86
|
+
const skipValue2 = this._previousTemplate?.getAttribute?.("skip-if-same");
|
|
87
|
+
const hasSkipIfSame = target?.hasAttribute?.("skip-if-same");
|
|
88
|
+
const isSame = this._previousTemplate === target;
|
|
89
|
+
if (hasSkipIfSame && isSame) {
|
|
79
90
|
return;
|
|
80
91
|
}
|
|
81
92
|
this.cleanup();
|
|
82
93
|
this._previousTemplate = target;
|
|
83
94
|
if (target) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
Array.from(n.attributes).forEach((attr) => {
|
|
92
|
-
const value = attr.value || "";
|
|
93
|
-
if (value.startsWith("{{") && value.endsWith("}}")) {
|
|
94
|
-
const script = value.slice(2, -2).trim();
|
|
95
|
-
const result = import_core.FunctionUtils.executeReturn({
|
|
96
|
-
script,
|
|
97
|
-
context: n,
|
|
98
|
-
args: { ...groupArgs, $value: this._value }
|
|
99
|
-
});
|
|
100
|
-
n.setAttribute(attr.name, String(result));
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
this._executeCloneCallback("on-clone-nodes", groupArgs);
|
|
106
|
-
this.parentElement?.insertBefore(clone, this.nextSibling);
|
|
95
|
+
let htmlString = target.innerHTML;
|
|
96
|
+
htmlString = this.replaceExpressions(htmlString, groupArgs, this, this._replaceWrap);
|
|
97
|
+
const result = this.ownerDocument?.createElement("template") || document.createElement("template");
|
|
98
|
+
result.innerHTML = htmlString;
|
|
99
|
+
const processedFragment = result.content;
|
|
100
|
+
this._nodes = Array.from(processedFragment.childNodes);
|
|
101
|
+
portal.insertBefore(processedFragment, this.nextSibling);
|
|
107
102
|
}
|
|
108
103
|
}
|
|
109
104
|
cleanup() {
|
|
110
105
|
this._nodes.forEach((n) => n.parentElement?.removeChild(n));
|
|
111
106
|
this._nodes = [];
|
|
112
107
|
}
|
|
113
|
-
connectedCallback() {
|
|
114
|
-
this.refresh();
|
|
115
|
-
}
|
|
116
108
|
disconnectedCallback() {
|
|
117
109
|
this.cleanup();
|
|
118
110
|
}
|
|
119
111
|
}
|
|
112
|
+
__decorate([
|
|
113
|
+
(0, import_decorators.attributeHost)("value"),
|
|
114
|
+
__metadata("design:type", Object)
|
|
115
|
+
], SwcChoose.prototype, "_value", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, import_decorators.attributeHost)("replace-wrap"),
|
|
118
|
+
__metadata("design:type", String)
|
|
119
|
+
], SwcChoose.prototype, "_replaceWrap", void 0);
|
|
120
120
|
__decorate([
|
|
121
121
|
(0, import_changedAttributeHost.changedAttributeHost)("value"),
|
|
122
122
|
__metadata("design:type", Function),
|
|
123
|
+
__metadata("design:paramtypes", []),
|
|
124
|
+
__metadata("design:returntype", void 0)
|
|
125
|
+
], SwcChoose.prototype, "setValue", null);
|
|
126
|
+
__decorate([
|
|
127
|
+
(0, import_changedAttributeHost.changedAttributeHost)("replace-wrap"),
|
|
128
|
+
__metadata("design:type", Function),
|
|
123
129
|
__metadata("design:paramtypes", [String]),
|
|
124
130
|
__metadata("design:returntype", void 0)
|
|
125
|
-
], SwcChoose.prototype, "
|
|
131
|
+
], SwcChoose.prototype, "setReplaceWrap", null);
|
|
126
132
|
//# sourceMappingURL=SwcChoose.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/elements/SwcChoose.ts"],
|
|
4
|
-
"sourcesContent": ["import { changedAttributeHost } from '../decorators/changedAttributeHost';\nimport { SwcUtils } from '../utils/Utils';\nimport { FunctionUtils } from '@dooboostore/core';\nimport { SwcChooseInterface } from '../types';\n\nclass SwcChoose extends HTMLTemplateElement implements SwcChooseInterface {\n
|
|
5
|
-
"mappings": "AAAA,kCAAqC;AACrC,mBAAyB;AACzB,
|
|
4
|
+
"sourcesContent": ["import { changedAttributeHost } from '../decorators/changedAttributeHost';\nimport { SwcUtils } from '../utils/Utils';\nimport { FunctionUtils, ActionExpression } from '@dooboostore/core';\nimport { ConvertUtils } from '@dooboostore/core-web';\nimport { SwcChooseInterface } from '../types';\nimport { attributeHost } from '../decorators';\n\nclass SwcChoose extends HTMLTemplateElement implements SwcChooseInterface {\n @attributeHost('value')\n _value: any;\n\n @attributeHost('replace-wrap')\n _replaceWrap: string | null;\n\n private _nodes: Node[] = [];\n private _previousTemplate: HTMLTemplateElement | null = null;\n\n get value(): any {\n return this._value;\n }\n\n set value(nv: any) {\n this.refresh(nv);\n }\n\n @changedAttributeHost('value')\n private setValue() {\n this.refresh();\n }\n\n @changedAttributeHost('replace-wrap')\n private setReplaceWrap(replaceWrapAttr?: string | null) {\n this.refresh();\n }\n\n private replaceExpressions(html: string, groupArgs: any, context: any, wrap?: string | null): string {\n const config = wrap ? { wrapExpression: wrap } : undefined;\n const ae = new ActionExpression(html, config);\n const filterOptions = wrap ? { type: 'replace' as const, wrap } : 'replace';\n const win = this.ownerDocument?.defaultView || window;\n\n // @ts-ignore\n for (const expr of ae.getExpressions(filterOptions)) {\n try {\n const value = FunctionUtils.executeReturn({\n script: ConvertUtils.decodeHtmlEntity(expr.script, win.document),\n context,\n args: groupArgs\n });\n ae.replace(expr, String(value));\n } catch (e) {\n console.error(`[SWC] Failed to execute ${expr.original}:`, e);\n }\n }\n return ae.getUnprocessedTemplate();\n }\n\n refresh(value = this._value) {\n const portal = this.parentElement;\n if (!portal) return;\n\n const win = this.ownerDocument?.defaultView || window;\n const helperSet = SwcUtils.getHelperAndHostSet(win, this);\n const groupArgs = { ...helperSet, $value: value };\n\n const templates = Array.from(this.content.querySelectorAll('template'));\n let selected: HTMLTemplateElement | null = null;\n\n for (const t of templates) {\n if (t.getAttribute('is') === 'swc-when') {\n const attrVal = t.getAttribute('value') || '';\n let matches = false;\n\n // Use ActionExpression to parse and extract script from value attribute\n const ae = new ActionExpression(attrVal);\n const expr = ae.getFirstExpression('replace');\n\n if (expr) {\n const decodedScript = ConvertUtils.decodeHtmlEntity(expr.script, win.document);\n const result = FunctionUtils.executeReturn({\n script: decodedScript,\n context: t,\n args: groupArgs\n });\n matches = !!result;\n } else {\n matches = String(attrVal) === String(value);\n }\n\n if (matches) {\n selected = t;\n break;\n }\n }\n }\n\n const target = selected || (this.content.querySelector('template[is=\"swc-otherwise\"]') as HTMLTemplateElement);\n\n const skipValue = target?.getAttribute?.('skip-if-same');\n const skipValue2 = this._previousTemplate?.getAttribute?.('skip-if-same');\n const hasSkipIfSame = target?.hasAttribute?.('skip-if-same');\n const isSame = this._previousTemplate === target;\n // console.log('---rrrr---', this._previousTemplate, target, hasSkipIfSame, isSame, skipValue, skipValue2);\n if (hasSkipIfSame && isSame) {\n return;\n }\n\n this.cleanup();\n this._previousTemplate = target;\n\n if (target) {\n let htmlString = target.innerHTML;\n htmlString = this.replaceExpressions(htmlString, groupArgs, this, this._replaceWrap);\n\n const result = this.ownerDocument?.createElement('template') || document.createElement('template');\n result.innerHTML = htmlString;\n const processedFragment = result.content;\n\n this._nodes = Array.from(processedFragment.childNodes);\n portal.insertBefore(processedFragment, this.nextSibling);\n }\n }\n\n private cleanup() {\n this._nodes.forEach(n => n.parentElement?.removeChild(n));\n this._nodes = [];\n }\n\n disconnectedCallback() {\n this.cleanup();\n }\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
var import_changedAttributeHost = require("../decorators/changedAttributeHost");
|
|
2
2
|
var import_Utils = require("../utils/Utils");
|
|
3
3
|
var import_core = require("@dooboostore/core");
|
|
4
|
+
var import_core_web = require("@dooboostore/core-web");
|
|
5
|
+
var import_decorators = require("../decorators");
|
|
4
6
|
var __decorate = function(decorators, target, key, desc) {
|
|
5
7
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
6
8
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -13,98 +15,81 @@ var __metadata = function(k, v) {
|
|
|
13
15
|
class SwcIf extends HTMLTemplateElement {
|
|
14
16
|
constructor() {
|
|
15
17
|
super(...arguments);
|
|
16
|
-
this._value = false;
|
|
17
18
|
this._nodes = [];
|
|
18
19
|
}
|
|
19
20
|
get value() {
|
|
20
21
|
return this._value;
|
|
21
22
|
}
|
|
22
23
|
set value(nv) {
|
|
23
|
-
this.
|
|
24
|
-
this.render();
|
|
24
|
+
this.refresh(nv);
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
script,
|
|
43
|
-
context: this,
|
|
44
|
-
args: import_Utils.SwcUtils.getHelperAndHostSet(win, this)
|
|
45
|
-
});
|
|
46
|
-
this.value = result;
|
|
47
|
-
} else {
|
|
48
|
-
this.value = Boolean(valueAttr);
|
|
26
|
+
replaceExpressions(html, groupArgs, context, wrap) {
|
|
27
|
+
const config = wrap ? { wrapExpression: wrap } : void 0;
|
|
28
|
+
const ae = new import_core.ActionExpression(html, config);
|
|
29
|
+
const filterOptions = wrap ? { type: "replace", wrap } : "replace";
|
|
30
|
+
const win = this.ownerDocument?.defaultView || window;
|
|
31
|
+
for (const expr of ae.getExpressions(filterOptions)) {
|
|
32
|
+
try {
|
|
33
|
+
const value = import_core.FunctionUtils.executeReturn({
|
|
34
|
+
script: import_core_web.ConvertUtils.decodeHtmlEntity(expr.script, win.document),
|
|
35
|
+
context,
|
|
36
|
+
args: groupArgs
|
|
37
|
+
});
|
|
38
|
+
ae.replace(expr, String(value));
|
|
39
|
+
} catch (e) {
|
|
40
|
+
console.error(`[SWC] Failed to execute ${expr.original}:`, e);
|
|
41
|
+
}
|
|
49
42
|
}
|
|
43
|
+
return ae.getUnprocessedTemplate();
|
|
44
|
+
}
|
|
45
|
+
setValue(valueAttr) {
|
|
46
|
+
this.refresh();
|
|
50
47
|
}
|
|
51
|
-
|
|
48
|
+
setReplaceWrap(replaceWrapAttr) {
|
|
49
|
+
this.refresh();
|
|
50
|
+
}
|
|
51
|
+
refresh(value = this._value) {
|
|
52
52
|
this.cleanup();
|
|
53
53
|
const portal = this.parentElement;
|
|
54
|
-
if (!portal)
|
|
54
|
+
if (!portal || !value)
|
|
55
55
|
return;
|
|
56
56
|
const win = this.ownerDocument?.defaultView || window;
|
|
57
57
|
const helperSet = import_Utils.SwcUtils.getHelperAndHostSet(win, this);
|
|
58
|
-
let
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
if (targetTpl === this) {
|
|
67
|
-
clone.querySelectorAll('template[is^="swc-"]').forEach((t) => t.remove());
|
|
68
|
-
}
|
|
69
|
-
this._nodes = Array.from(clone.childNodes);
|
|
70
|
-
const elements = this._nodes.filter((n) => n.nodeType === 1);
|
|
71
|
-
const groupArgs = { ...helperSet, $value: this._value, $nodes: this._nodes, $elements: elements, $firstElement: elements[0] };
|
|
72
|
-
this._nodes.forEach((node, nodeIdx) => {
|
|
73
|
-
this._executeCloneCallback("on-clone-node", { ...groupArgs, $node: node, $nodeIndex: nodeIdx, $isElement: node.nodeType === 1 });
|
|
74
|
-
if (node instanceof HTMLElement) {
|
|
75
|
-
Array.from(node.attributes).forEach((attr) => {
|
|
76
|
-
const value = attr.value || "";
|
|
77
|
-
if (value.startsWith("{{") && value.endsWith("}}")) {
|
|
78
|
-
const script = value.slice(2, -2).trim();
|
|
79
|
-
const result = import_core.FunctionUtils.executeReturn({
|
|
80
|
-
script,
|
|
81
|
-
context: node,
|
|
82
|
-
args: { ...groupArgs, $value: this._value }
|
|
83
|
-
});
|
|
84
|
-
node.setAttribute(attr.name, String(result));
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
this._executeCloneCallback("on-clone-nodes", groupArgs);
|
|
90
|
-
portal.insertBefore(clone, this.nextSibling);
|
|
91
|
-
}
|
|
58
|
+
let htmlString = this.innerHTML;
|
|
59
|
+
const groupArgs = { ...helperSet, $value: value };
|
|
60
|
+
htmlString = this.replaceExpressions(htmlString, groupArgs, this, this._replaceWrap);
|
|
61
|
+
const result = this.ownerDocument?.createElement("template") || document.createElement("template");
|
|
62
|
+
result.innerHTML = htmlString;
|
|
63
|
+
const processedFragment = result.content;
|
|
64
|
+
this._nodes = Array.from(processedFragment.childNodes);
|
|
65
|
+
portal.insertBefore(processedFragment, this.nextSibling);
|
|
92
66
|
}
|
|
93
67
|
cleanup() {
|
|
94
68
|
this._nodes.forEach((n) => n.parentElement?.removeChild(n));
|
|
95
69
|
this._nodes = [];
|
|
96
70
|
}
|
|
97
|
-
connectedCallback() {
|
|
98
|
-
this.refreshValue();
|
|
99
|
-
}
|
|
100
71
|
disconnectedCallback() {
|
|
101
72
|
this.cleanup();
|
|
102
73
|
}
|
|
103
74
|
}
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, import_decorators.attributeHost)("value"),
|
|
77
|
+
__metadata("design:type", Object)
|
|
78
|
+
], SwcIf.prototype, "_value", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, import_decorators.attributeHost)("replace-wrap"),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], SwcIf.prototype, "_replaceWrap", void 0);
|
|
104
83
|
__decorate([
|
|
105
84
|
(0, import_changedAttributeHost.changedAttributeHost)("value"),
|
|
106
85
|
__metadata("design:type", Function),
|
|
107
86
|
__metadata("design:paramtypes", [String]),
|
|
108
87
|
__metadata("design:returntype", void 0)
|
|
109
|
-
], SwcIf.prototype, "
|
|
88
|
+
], SwcIf.prototype, "setValue", null);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, import_changedAttributeHost.changedAttributeHost)("replace-wrap"),
|
|
91
|
+
__metadata("design:type", Function),
|
|
92
|
+
__metadata("design:paramtypes", [String]),
|
|
93
|
+
__metadata("design:returntype", void 0)
|
|
94
|
+
], SwcIf.prototype, "setReplaceWrap", null);
|
|
110
95
|
//# sourceMappingURL=SwcIf.js.map
|