@dooboostore/simple-web-component 1.0.30 → 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/README.md +220 -1
- 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 +29 -12
- package/dist/cjs/decorators/elementDefine.js.map +3 -3
- package/dist/cjs/elements/SwcAppEngine.js +3 -3
- package/dist/cjs/elements/SwcAppEngine.js.map +2 -2
- package/dist/cjs/elements/SwcAppMixin.js +1 -8
- package/dist/cjs/elements/SwcAppMixin.js.map +2 -2
- package/dist/cjs/elements/SwcAsync.js +71 -78
- package/dist/cjs/elements/SwcAsync.js.map +2 -2
- package/dist/cjs/elements/SwcChoose.js +66 -81
- package/dist/cjs/elements/SwcChoose.js.map +2 -2
- package/dist/cjs/elements/SwcIf.js +52 -96
- package/dist/cjs/elements/SwcIf.js.map +2 -2
- package/dist/cjs/elements/SwcLoop.js +60 -103
- package/dist/cjs/elements/SwcLoop.js.map +2 -2
- package/dist/cjs/elements/SwcSubTemplates.js +0 -27
- package/dist/cjs/elements/SwcSubTemplates.js.map +2 -2
- package/dist/cjs/elements/register.js +314 -343
- package/dist/cjs/elements/register.js.map +2 -2
- package/dist/cjs/router/ElementRouter.js +1 -8
- package/dist/cjs/router/ElementRouter.js.map +2 -2
- package/dist/cjs/types.js.map +1 -1
- package/dist/cjs/utils/Utils.js +31 -24
- 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 +27 -10
- package/dist/esm/decorators/elementDefine.js.map +3 -3
- package/dist/esm/elements/SwcAppEngine.js +3 -3
- package/dist/esm/elements/SwcAppEngine.js.map +2 -2
- package/dist/esm/elements/SwcAppMixin.js +1 -8
- package/dist/esm/elements/SwcAppMixin.js.map +2 -2
- package/dist/esm/elements/SwcAsync.js +72 -60
- package/dist/esm/elements/SwcAsync.js.map +2 -2
- package/dist/esm/elements/SwcChoose.js +67 -63
- package/dist/esm/elements/SwcChoose.js.map +2 -2
- package/dist/esm/elements/SwcIf.js +53 -78
- package/dist/esm/elements/SwcIf.js.map +2 -2
- package/dist/esm/elements/SwcLoop.js +61 -85
- package/dist/esm/elements/SwcLoop.js.map +2 -2
- package/dist/esm/elements/SwcSubTemplates.js +0 -8
- package/dist/esm/elements/SwcSubTemplates.js.map +2 -2
- package/dist/esm/elements/register.js +246 -275
- package/dist/esm/elements/register.js.map +2 -2
- package/dist/esm/router/ElementRouter.js +1 -8
- package/dist/esm/router/ElementRouter.js.map +2 -2
- package/dist/esm/types.js.map +1 -1
- package/dist/esm/utils/Utils.js +31 -24
- package/dist/esm/utils/Utils.js.map +2 -2
- package/dist/esm-bundle/dooboostore-simple-web-component.esm.js +2223 -2009
- 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/SwcAppMixin.d.ts.map +1 -1
- package/dist/types/elements/SwcAsync.d.ts +1 -11
- package/dist/types/elements/SwcAsync.d.ts.map +1 -1
- package/dist/types/elements/SwcChoose.d.ts +1 -13
- package/dist/types/elements/SwcChoose.d.ts.map +1 -1
- package/dist/types/elements/SwcIf.d.ts +1 -13
- package/dist/types/elements/SwcIf.d.ts.map +1 -1
- package/dist/types/elements/SwcLoop.d.ts +1 -13
- package/dist/types/elements/SwcLoop.d.ts.map +1 -1
- package/dist/types/elements/SwcSubTemplates.d.ts +6 -6
- package/dist/types/elements/SwcSubTemplates.d.ts.map +1 -1
- package/dist/types/elements/register.d.ts.map +1 -1
- package/dist/types/router/ElementRouter.d.ts.map +1 -1
- package/dist/types/types.d.ts +11 -1
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils/Utils.d.ts +10 -0
- package/dist/types/utils/Utils.d.ts.map +1 -1
- package/dist/umd-bundle/dooboostore-simple-web-component.umd.js +2223 -2009
- package/dist/umd-bundle/dooboostore-simple-web-component.umd.js.map +4 -4
- package/package.json +3 -3
- package/src/decorators/applyStyle.ts +1 -1
- package/src/decorators/attribute.ts +35 -30
- package/src/decorators/elementDefine.ts +32 -10
- package/src/elements/SwcAppEngine.ts +3 -3
- package/src/elements/SwcAppMixin.ts +6 -27
- package/src/elements/SwcAsync.ts +75 -57
- package/src/elements/SwcChoose.ts +69 -77
- package/src/elements/SwcIf.ts +50 -75
- package/src/elements/SwcLoop.ts +56 -82
- package/src/elements/SwcSubTemplates.ts +6 -6
- package/src/elements/register.ts +234 -285
- package/src/router/ElementRouter.ts +1 -12
- package/src/types.ts +9 -2
- package/src/utils/Utils.ts +48 -37
|
@@ -1,28 +1,8 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var SwcLoop_exports = {};
|
|
19
|
-
__export(SwcLoop_exports, {
|
|
20
|
-
SwcLoop: () => SwcLoop
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(SwcLoop_exports);
|
|
23
1
|
var import_changedAttributeHost = require("../decorators/changedAttributeHost");
|
|
24
2
|
var import_Utils = require("../utils/Utils");
|
|
25
3
|
var import_core = require("@dooboostore/core");
|
|
4
|
+
var import_core_web = require("@dooboostore/core-web");
|
|
5
|
+
var import_decorators = require("../decorators");
|
|
26
6
|
var __decorate = function(decorators, target, key, desc) {
|
|
27
7
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
28
8
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -35,111 +15,88 @@ var __metadata = function(k, v) {
|
|
|
35
15
|
class SwcLoop extends HTMLTemplateElement {
|
|
36
16
|
constructor() {
|
|
37
17
|
super(...arguments);
|
|
38
|
-
this._value = [];
|
|
39
18
|
this._nodeGroups = [];
|
|
40
19
|
}
|
|
41
20
|
get value() {
|
|
42
21
|
return this._value;
|
|
43
22
|
}
|
|
44
23
|
set value(nv) {
|
|
45
|
-
this.
|
|
46
|
-
this.render();
|
|
24
|
+
this.refresh(nv);
|
|
47
25
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
if (!portalScript)
|
|
51
|
-
return this.parentElement;
|
|
52
|
-
const win = this.ownerDocument?.defaultView || window;
|
|
53
|
-
const res = import_core.FunctionUtils.executeReturn({
|
|
54
|
-
script: portalScript,
|
|
55
|
-
context: this,
|
|
56
|
-
args: import_Utils.SwcUtils.getHelperAndHostSet(win, this)
|
|
57
|
-
});
|
|
58
|
-
if (res instanceof HTMLElement)
|
|
59
|
-
return res;
|
|
60
|
-
if (typeof res === "string")
|
|
61
|
-
return win.document.querySelector(res);
|
|
62
|
-
return this.parentElement;
|
|
63
|
-
}
|
|
64
|
-
_executeCloneCallback(attr, args) {
|
|
65
|
-
const script = this.getAttribute(attr);
|
|
66
|
-
if (!script)
|
|
67
|
-
return;
|
|
68
|
-
import_core.FunctionUtils.execute({ script, context: this, args });
|
|
26
|
+
setValue() {
|
|
27
|
+
this.refresh();
|
|
69
28
|
}
|
|
70
|
-
|
|
71
|
-
this.
|
|
72
|
-
this._nodeGroups = [];
|
|
29
|
+
setReplaceWrap() {
|
|
30
|
+
this.refresh();
|
|
73
31
|
}
|
|
74
|
-
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
32
|
+
replaceExpressions(html, groupArgs, context, wrap) {
|
|
33
|
+
const config = wrap ? { wrapExpression: wrap } : void 0;
|
|
34
|
+
const ae = new import_core.ActionExpression(html, config);
|
|
35
|
+
const filterOptions = wrap ? { type: "replace", wrap } : "replace";
|
|
80
36
|
const win = this.ownerDocument?.defaultView || window;
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
37
|
+
for (const expr of ae.getExpressions(filterOptions)) {
|
|
38
|
+
try {
|
|
39
|
+
const value = import_core.FunctionUtils.executeReturn({
|
|
40
|
+
script: import_core_web.ConvertUtils.decodeHtmlEntity(expr.script, win.document),
|
|
41
|
+
context,
|
|
42
|
+
args: groupArgs
|
|
43
|
+
});
|
|
44
|
+
ae.replace(expr, String(value));
|
|
45
|
+
} catch (e) {
|
|
46
|
+
console.error(`[SWC] Failed to execute ${expr.original}:`, e);
|
|
47
|
+
}
|
|
90
48
|
}
|
|
49
|
+
return ae.getUnprocessedTemplate();
|
|
91
50
|
}
|
|
92
|
-
|
|
93
|
-
this.
|
|
94
|
-
|
|
51
|
+
refresh(value = this._value) {
|
|
52
|
+
this.cleanup();
|
|
53
|
+
if (value?.length <= 0)
|
|
54
|
+
return;
|
|
55
|
+
const portal = this.parentElement;
|
|
95
56
|
if (!portal)
|
|
96
57
|
return;
|
|
97
58
|
const win = this.ownerDocument?.defaultView || window;
|
|
98
59
|
const helperSet = import_Utils.SwcUtils.getHelperAndHostSet(win, this);
|
|
99
60
|
const fragment = win.document.createDocumentFragment();
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
subTemplates.forEach((t) => t.remove());
|
|
113
|
-
const nodes = Array.from(clone.childNodes);
|
|
114
|
-
const elements = nodes.filter((n) => n.nodeType === 1);
|
|
115
|
-
const groupArgs = { ...helperSet, $item: item, $index: index, $value: this._value, $nodes: nodes, $elements: elements, $firstElement: elements[0] };
|
|
116
|
-
nodes.forEach((node, nodeIdx) => {
|
|
117
|
-
if (node instanceof HTMLElement)
|
|
118
|
-
node.__swc_host = this;
|
|
119
|
-
this._executeCloneCallback("on-clone-node", { ...groupArgs, $node: node, $nodeIndex: nodeIdx, $isElement: node.nodeType === 1 });
|
|
120
|
-
});
|
|
121
|
-
this._executeCloneCallback("on-clone-nodes", groupArgs);
|
|
122
|
-
this._nodeGroups.push(nodes);
|
|
123
|
-
fragment.appendChild(clone);
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
if (portal === this.parentElement) {
|
|
127
|
-
portal.insertBefore(fragment, this.nextSibling);
|
|
128
|
-
} else {
|
|
129
|
-
portal.appendChild(fragment);
|
|
130
|
-
}
|
|
61
|
+
value.forEach((item, index) => {
|
|
62
|
+
let htmlString = this.innerHTML;
|
|
63
|
+
const groupArgs = { ...helperSet, $item: item, $index: index, $value: this._value };
|
|
64
|
+
htmlString = this.replaceExpressions(htmlString, groupArgs, this, this._replaceWrap);
|
|
65
|
+
const temp = this.ownerDocument?.createElement("template") || document.createElement("template");
|
|
66
|
+
temp.innerHTML = htmlString;
|
|
67
|
+
const content = temp.content;
|
|
68
|
+
const nodes = Array.from(content.childNodes);
|
|
69
|
+
this._nodeGroups.push(nodes);
|
|
70
|
+
fragment.appendChild(content);
|
|
71
|
+
});
|
|
72
|
+
portal.insertBefore(fragment, this.nextSibling);
|
|
131
73
|
}
|
|
132
|
-
|
|
133
|
-
this.
|
|
74
|
+
cleanup() {
|
|
75
|
+
this._nodeGroups.forEach((nodes) => nodes.forEach((n) => n.parentElement?.removeChild(n)));
|
|
76
|
+
this._nodeGroups = [];
|
|
134
77
|
}
|
|
135
78
|
disconnectedCallback() {
|
|
136
|
-
this.
|
|
79
|
+
this.cleanup();
|
|
137
80
|
}
|
|
138
81
|
}
|
|
139
82
|
__decorate([
|
|
140
|
-
(0,
|
|
83
|
+
(0, import_decorators.attributeHost)("value"),
|
|
84
|
+
__metadata("design:type", Array)
|
|
85
|
+
], SwcLoop.prototype, "_value", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, import_decorators.attributeHost)("replace-wrap"),
|
|
88
|
+
__metadata("design:type", String)
|
|
89
|
+
], SwcLoop.prototype, "_replaceWrap", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, import_changedAttributeHost.changedAttributeHost)("value"),
|
|
92
|
+
__metadata("design:type", Function),
|
|
93
|
+
__metadata("design:paramtypes", []),
|
|
94
|
+
__metadata("design:returntype", void 0)
|
|
95
|
+
], SwcLoop.prototype, "setValue", null);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, import_changedAttributeHost.changedAttributeHost)("replace-wrap"),
|
|
141
98
|
__metadata("design:type", Function),
|
|
142
99
|
__metadata("design:paramtypes", []),
|
|
143
100
|
__metadata("design:returntype", void 0)
|
|
144
|
-
], SwcLoop.prototype, "
|
|
101
|
+
], SwcLoop.prototype, "setReplaceWrap", null);
|
|
145
102
|
//# sourceMappingURL=SwcLoop.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/elements/SwcLoop.ts"],
|
|
4
|
-
"sourcesContent": ["import { changedAttributeHost } from '../decorators/changedAttributeHost';\nimport { SwcUtils } from '../utils/Utils';\nimport { FunctionUtils } from '@dooboostore/core';\n\
|
|
5
|
-
"mappings": "
|
|
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 SwcLoop extends HTMLTemplateElement {\n @attributeHost('value')\n _value: any[];\n\n @attributeHost('replace-wrap')\n _replaceWrap: string | null;\n\n private _nodeGroups: Node[][] = [];\n\n get value(): any[] {\n return this._value;\n }\n set value(nv: any[]) {\n // this._value = Array.isArray(nv) ? [...nv] : [];\n this.refresh(nv);\n }\n\n @changedAttributeHost('value')\n private setValue() {\n this.refresh();\n }\n\n @changedAttributeHost('replace-wrap')\n private setReplaceWrap() {\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 this.cleanup();\n if (value?.length<=0) return;\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 fragment = win.document.createDocumentFragment();\n\n value.forEach((item, index) => {\n let htmlString = this.innerHTML;\n const groupArgs = { ...helperSet, $item: item, $index: index, $value: this._value };\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\n const content = temp.content;\n const nodes = Array.from(content.childNodes);\n this._nodeGroups.push(nodes);\n fragment.appendChild(content);\n });\n\n portal.insertBefore(fragment, this.nextSibling);\n }\n\n private cleanup() {\n this._nodeGroups.forEach(nodes => nodes.forEach(n => n.parentElement?.removeChild(n)));\n this._nodeGroups = [];\n }\n\n disconnectedCallback() {\n this.cleanup();\n }\n}\n"],
|
|
5
|
+
"mappings": "AAAA,kCAAqC;AACrC,mBAAyB;AACzB,kBAAgD;AAChD,sBAA6B;AAC7B,wBAA8B;;;;;;;;;;AAE9B,MAAM,gBAAgB,oBAAmB;EAAzC,cAAA;;AAOU,SAAA,cAAwB,CAAA;EA8ElC;EA5EE,IAAI,QAAK;AACP,WAAO,KAAK;EACd;EACA,IAAI,MAAM,IAAS;AAEjB,SAAK,QAAQ,EAAE;EACjB;EAGQ,WAAQ;AACd,SAAK,QAAO;EACd;EAGQ,iBAAc;AACpB,SAAK,QAAO;EACd;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,QAAQ,KAAK,QAAM;AACzB,SAAK,QAAO;AACZ,QAAI,OAAO,UAAQ;AAAG;AACtB,UAAM,SAAS,KAAK;AACpB,QAAI,CAAC;AAAQ;AAEb,UAAM,MAAM,KAAK,eAAe,eAAe;AAC/C,UAAM,YAAY,sBAAS,oBAAoB,KAAK,IAAI;AACxD,UAAM,WAAW,IAAI,SAAS,uBAAsB;AAEpD,UAAM,QAAQ,CAAC,MAAM,UAAS;AAC5B,UAAI,aAAa,KAAK;AACtB,YAAM,YAAY,EAAE,GAAG,WAAW,OAAO,MAAM,QAAQ,OAAO,QAAQ,KAAK,OAAM;AAEjF,mBAAa,KAAK,mBAAmB,YAAY,WAAW,MAAM,KAAK,YAAY;AAEnF,YAAM,OAAO,KAAK,eAAe,cAAc,UAAU,KAAK,SAAS,cAAc,UAAU;AAC/F,WAAK,YAAY;AAEjB,YAAM,UAAU,KAAK;AACrB,YAAM,QAAQ,MAAM,KAAK,QAAQ,UAAU;AAC3C,WAAK,YAAY,KAAK,KAAK;AAC3B,eAAS,YAAY,OAAO;IAC9B,CAAC;AAED,WAAO,aAAa,UAAU,KAAK,WAAW;EAChD;EAEQ,UAAO;AACb,SAAK,YAAY,QAAQ,WAAS,MAAM,QAAQ,OAAK,EAAE,eAAe,YAAY,CAAC,CAAC,CAAC;AACrF,SAAK,cAAc,CAAA;EACrB;EAEA,uBAAoB;AAClB,SAAK,QAAO;EACd;;AAlFA,WAAA;MADC,iCAAc,OAAO;;;AAItB,WAAA;MADC,iCAAc,cAAc;;;AAcrB,WAAA;MADP,kDAAqB,OAAO;;;;;AAMrB,WAAA;MADP,kDAAqB,cAAc;;;;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,30 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var SwcSubTemplates_exports = {};
|
|
19
|
-
__export(SwcSubTemplates_exports, {
|
|
20
|
-
SwcDefault: () => SwcDefault,
|
|
21
|
-
SwcError: () => SwcError,
|
|
22
|
-
SwcLoading: () => SwcLoading,
|
|
23
|
-
SwcOtherwise: () => SwcOtherwise,
|
|
24
|
-
SwcSuccess: () => SwcSuccess,
|
|
25
|
-
SwcWhen: () => SwcWhen
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(SwcSubTemplates_exports);
|
|
28
1
|
class SwcLoading extends HTMLTemplateElement {
|
|
29
2
|
}
|
|
30
3
|
class SwcError extends HTMLTemplateElement {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/elements/SwcSubTemplates.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["class SwcLoading extends HTMLTemplateElement {}\nclass SwcError extends HTMLTemplateElement {}\nclass SwcSuccess extends HTMLTemplateElement {}\nclass SwcWhen extends HTMLTemplateElement {}\nclass SwcOtherwise extends HTMLTemplateElement {}\nclass SwcDefault extends HTMLTemplateElement {}\n"],
|
|
5
|
+
"mappings": "AAAA,MAAM,mBAAmB,oBAAoB;AAAC;AAC9C,MAAM,iBAAiB,oBAAoB;AAAC;AAC5C,MAAM,mBAAmB,oBAAoB;AAAC;AAC9C,MAAM,gBAAgB,oBAAoB;AAAC;AAC3C,MAAM,qBAAqB,oBAAoB;AAAC;AAChD,MAAM,mBAAmB,oBAAoB;AAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|