@dooboostore/simple-web-component 1.0.36 → 1.0.37
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 +41 -4
- package/dist/cjs/{elements/SwcAppEngine.js → SwcAppEngine.js} +6 -6
- package/dist/cjs/SwcAppEngine.js.map +7 -0
- package/dist/cjs/decorators/applyNode.js +14 -13
- package/dist/cjs/decorators/applyNode.js.map +2 -2
- package/dist/cjs/decorators/applySlot.js +122 -0
- package/dist/cjs/decorators/applySlot.js.map +7 -0
- package/dist/cjs/decorators/elementDefine.js +38 -30
- package/dist/cjs/decorators/elementDefine.js.map +2 -2
- package/dist/cjs/decorators/index.js +1 -0
- package/dist/cjs/decorators/index.js.map +2 -2
- package/dist/cjs/decorators/lifecycles.js +56 -8
- package/dist/cjs/decorators/lifecycles.js.map +2 -2
- package/dist/cjs/elements/{SwcAppMixin.js → SwcApp.js} +107 -57
- package/dist/cjs/elements/SwcApp.js.map +7 -0
- package/dist/cjs/elements/index.js +21 -2
- package/dist/cjs/elements/index.js.map +3 -3
- package/dist/cjs/elements/tt/SwcAppMixin.js +1 -0
- package/dist/cjs/elements/tt/SwcAppMixin.js.map +7 -0
- package/dist/cjs/elements/tt/SwcAsync.js +1 -0
- package/dist/cjs/elements/tt/SwcAsync.js.map +7 -0
- package/dist/cjs/elements/tt/SwcAsyncTemplate.js +1 -0
- package/dist/cjs/elements/tt/SwcAsyncTemplate.js.map +7 -0
- package/dist/cjs/elements/tt/SwcChoose.js +1 -0
- package/dist/cjs/elements/tt/SwcChoose.js.map +7 -0
- package/dist/cjs/elements/tt/SwcChooseTemplate.js +1 -0
- package/dist/cjs/elements/tt/SwcChooseTemplate.js.map +7 -0
- package/dist/cjs/elements/tt/SwcIf.js +1 -0
- package/dist/cjs/elements/tt/SwcIf.js.map +7 -0
- package/dist/cjs/elements/tt/SwcIfTemplate.js +1 -0
- package/dist/cjs/elements/tt/SwcIfTemplate.js.map +7 -0
- package/dist/cjs/elements/tt/SwcLoop.js +1 -0
- package/dist/cjs/elements/tt/SwcLoop.js.map +7 -0
- package/dist/cjs/elements/tt/SwcLoopTemplate.js +1 -0
- package/dist/cjs/elements/tt/SwcLoopTemplate.js.map +7 -0
- package/dist/cjs/elements/tt/SwcSubTemplates.js +1 -0
- package/dist/cjs/elements/tt/SwcSubTemplates.js.map +7 -0
- package/dist/cjs/elements/tt/register.js +1 -0
- package/dist/cjs/elements/tt/register.js.map +7 -0
- package/dist/cjs/index.js +12 -8
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/types/window.d.js +16 -0
- package/dist/cjs/types/window.d.js.map +7 -0
- package/dist/cjs/types.js.map +1 -1
- package/dist/cjs/utils/Utils.js +9 -6
- package/dist/cjs/utils/Utils.js.map +2 -2
- package/dist/esm/{elements/SwcAppEngine.js → SwcAppEngine.js} +4 -4
- package/dist/esm/SwcAppEngine.js.map +7 -0
- package/dist/esm/decorators/applyNode.js +14 -13
- package/dist/esm/decorators/applyNode.js.map +2 -2
- package/dist/esm/decorators/applySlot.js +103 -0
- package/dist/esm/decorators/applySlot.js.map +7 -0
- package/dist/esm/decorators/elementDefine.js +41 -33
- package/dist/esm/decorators/elementDefine.js.map +2 -2
- package/dist/esm/decorators/index.js +1 -0
- package/dist/esm/decorators/index.js.map +2 -2
- package/dist/esm/decorators/lifecycles.js +56 -8
- package/dist/esm/decorators/lifecycles.js.map +2 -2
- package/dist/esm/elements/{SwcAppMixin.js → SwcApp.js} +102 -53
- package/dist/esm/elements/SwcApp.js.map +7 -0
- package/dist/esm/elements/index.js +7 -1
- package/dist/esm/elements/index.js.map +2 -2
- package/dist/esm/elements/tt/SwcAppMixin.js +1 -0
- package/dist/esm/elements/tt/SwcAppMixin.js.map +7 -0
- package/dist/esm/elements/tt/SwcAsync.js +1 -0
- package/dist/esm/elements/tt/SwcAsync.js.map +7 -0
- package/dist/esm/elements/tt/SwcAsyncTemplate.js +1 -0
- package/dist/esm/elements/tt/SwcAsyncTemplate.js.map +7 -0
- package/dist/esm/elements/tt/SwcChoose.js +1 -0
- package/dist/esm/elements/tt/SwcChoose.js.map +7 -0
- package/dist/esm/elements/tt/SwcChooseTemplate.js +1 -0
- package/dist/esm/elements/tt/SwcChooseTemplate.js.map +7 -0
- package/dist/esm/elements/tt/SwcIf.js +1 -0
- package/dist/esm/elements/tt/SwcIf.js.map +7 -0
- package/dist/esm/elements/tt/SwcIfTemplate.js +1 -0
- package/dist/esm/elements/tt/SwcIfTemplate.js.map +7 -0
- package/dist/esm/elements/tt/SwcLoop.js +1 -0
- package/dist/esm/elements/tt/SwcLoop.js.map +7 -0
- package/dist/esm/elements/tt/SwcLoopTemplate.js +1 -0
- package/dist/esm/elements/tt/SwcLoopTemplate.js.map +7 -0
- package/dist/esm/elements/tt/SwcSubTemplates.js +1 -0
- package/dist/esm/elements/tt/SwcSubTemplates.js.map +7 -0
- package/dist/esm/elements/tt/register.js +1 -0
- package/dist/esm/elements/tt/register.js.map +7 -0
- package/dist/esm/index.js +13 -9
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/types/window.d.js +1 -0
- package/dist/esm/types/window.d.js.map +7 -0
- package/dist/esm/types.js.map +1 -1
- package/dist/esm/utils/Utils.js +9 -6
- package/dist/esm/utils/Utils.js.map +2 -2
- package/dist/esm-bundle/dooboostore-simple-web-component.esm.js +3867 -97
- package/dist/esm-bundle/dooboostore-simple-web-component.esm.js.map +4 -4
- package/dist/types/{elements/SwcAppEngine.d.ts → SwcAppEngine.d.ts} +9 -4
- package/dist/types/SwcAppEngine.d.ts.map +1 -0
- package/dist/types/decorators/applyNode.d.ts +7 -7
- package/dist/types/decorators/applyNode.d.ts.map +1 -1
- package/dist/types/decorators/applySlot.d.ts +27 -0
- package/dist/types/decorators/applySlot.d.ts.map +1 -0
- package/dist/types/decorators/elementDefine.d.ts.map +1 -1
- package/dist/types/decorators/index.d.ts +1 -0
- package/dist/types/decorators/index.d.ts.map +1 -1
- package/dist/types/decorators/lifecycles.d.ts +21 -6
- package/dist/types/decorators/lifecycles.d.ts.map +1 -1
- package/dist/types/elements/SwcApp.d.ts +7 -0
- package/dist/types/elements/SwcApp.d.ts.map +1 -0
- package/dist/types/elements/index.d.ts +2 -1
- package/dist/types/elements/index.d.ts.map +1 -1
- package/dist/types/elements/tt/SwcAppMixin.d.ts +1 -0
- package/dist/types/elements/tt/SwcAppMixin.d.ts.map +1 -0
- package/dist/types/elements/tt/SwcAsync.d.ts +1 -0
- package/dist/types/elements/tt/SwcAsync.d.ts.map +1 -0
- package/dist/types/elements/tt/SwcAsyncTemplate.d.ts +1 -0
- package/dist/types/elements/tt/SwcAsyncTemplate.d.ts.map +1 -0
- package/dist/types/elements/tt/SwcChoose.d.ts +1 -0
- package/dist/types/elements/tt/SwcChoose.d.ts.map +1 -0
- package/dist/types/elements/tt/SwcChooseTemplate.d.ts +1 -0
- package/dist/types/elements/tt/SwcChooseTemplate.d.ts.map +1 -0
- package/dist/types/elements/tt/SwcIf.d.ts +1 -0
- package/dist/types/elements/{SwcIf.d.ts.map → tt/SwcIf.d.ts.map} +1 -1
- package/dist/types/elements/tt/SwcIfTemplate.d.ts +1 -0
- package/dist/types/elements/tt/SwcIfTemplate.d.ts.map +1 -0
- package/dist/types/elements/tt/SwcLoop.d.ts +1 -0
- package/dist/types/elements/tt/SwcLoop.d.ts.map +1 -0
- package/dist/types/elements/tt/SwcLoopTemplate.d.ts +1 -0
- package/dist/types/elements/tt/SwcLoopTemplate.d.ts.map +1 -0
- package/dist/types/elements/tt/SwcSubTemplates.d.ts +1 -0
- package/dist/types/elements/tt/SwcSubTemplates.d.ts.map +1 -0
- package/dist/types/elements/tt/register.d.ts +1 -0
- package/dist/types/elements/tt/register.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types.d.ts +3 -3
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils/Utils.d.ts +6 -5
- package/dist/types/utils/Utils.d.ts.map +1 -1
- package/dist/umd-bundle/dooboostore-simple-web-component.umd.js +3867 -97
- package/dist/umd-bundle/dooboostore-simple-web-component.umd.js.map +4 -4
- package/package.json +2 -2
- package/src/{elements/SwcAppEngine.ts → SwcAppEngine.ts} +12 -7
- package/src/decorators/applyNode.ts +15 -13
- package/src/decorators/applySlot.ts +228 -0
- package/src/decorators/elementDefine.ts +59 -37
- package/src/decorators/index.ts +1 -0
- package/src/decorators/lifecycles.ts +76 -11
- package/src/elements/{SwcAppMixin.ts → SwcApp.ts} +98 -31
- package/src/elements/index.ts +11 -1
- package/src/elements/tt/SwcAppMixin.ts +13 -0
- package/src/elements/tt/SwcAsync.ts +139 -0
- package/src/elements/tt/SwcAsyncTemplate.ts +126 -0
- package/src/elements/tt/SwcChoose.ts +182 -0
- package/src/elements/tt/SwcChooseTemplate.ts +229 -0
- package/src/elements/tt/SwcIf.ts +145 -0
- package/src/elements/tt/SwcIfTemplate.ts +158 -0
- package/src/elements/tt/SwcLoop.ts +222 -0
- package/src/elements/tt/SwcLoopTemplate.ts +255 -0
- package/src/elements/tt/SwcSubTemplates.ts +6 -0
- package/src/elements/tt/register.ts +720 -0
- package/src/index.ts +13 -9
- package/src/types/window.d.ts +43 -0
- package/src/types.ts +4 -3
- package/src/utils/Utils.ts +11 -6
- package/dist/cjs/elements/SwcAppEngine.js.map +0 -7
- package/dist/cjs/elements/SwcAppMixin.js.map +0 -7
- package/dist/cjs/elements/SwcAsync.js +0 -129
- package/dist/cjs/elements/SwcAsync.js.map +0 -7
- package/dist/cjs/elements/SwcChoose.js +0 -155
- package/dist/cjs/elements/SwcChoose.js.map +0 -7
- package/dist/cjs/elements/SwcIf.js +0 -117
- package/dist/cjs/elements/SwcIf.js.map +0 -7
- package/dist/cjs/elements/SwcLoop.js +0 -176
- package/dist/cjs/elements/SwcLoop.js.map +0 -7
- package/dist/cjs/elements/SwcSubTemplates.js +0 -13
- package/dist/cjs/elements/SwcSubTemplates.js.map +0 -7
- package/dist/cjs/elements/register.js +0 -1026
- package/dist/cjs/elements/register.js.map +0 -7
- package/dist/esm/elements/SwcAppEngine.js.map +0 -7
- package/dist/esm/elements/SwcAppMixin.js.map +0 -7
- package/dist/esm/elements/SwcAsync.js +0 -129
- package/dist/esm/elements/SwcAsync.js.map +0 -7
- package/dist/esm/elements/SwcChoose.js +0 -155
- package/dist/esm/elements/SwcChoose.js.map +0 -7
- package/dist/esm/elements/SwcIf.js +0 -117
- package/dist/esm/elements/SwcIf.js.map +0 -7
- package/dist/esm/elements/SwcLoop.js +0 -176
- package/dist/esm/elements/SwcLoop.js.map +0 -7
- package/dist/esm/elements/SwcSubTemplates.js +0 -13
- package/dist/esm/elements/SwcSubTemplates.js.map +0 -7
- package/dist/esm/elements/register.js +0 -1007
- package/dist/esm/elements/register.js.map +0 -7
- package/dist/types/elements/SwcAppEngine.d.ts.map +0 -1
- package/dist/types/elements/SwcAppMixin.d.ts +0 -386
- package/dist/types/elements/SwcAppMixin.d.ts.map +0 -1
- package/dist/types/elements/SwcAsync.d.ts +0 -2
- package/dist/types/elements/SwcAsync.d.ts.map +0 -1
- package/dist/types/elements/SwcChoose.d.ts +0 -2
- package/dist/types/elements/SwcChoose.d.ts.map +0 -1
- package/dist/types/elements/SwcIf.d.ts +0 -2
- package/dist/types/elements/SwcLoop.d.ts +0 -2
- package/dist/types/elements/SwcLoop.d.ts.map +0 -1
- package/dist/types/elements/SwcSubTemplates.d.ts +0 -13
- package/dist/types/elements/SwcSubTemplates.d.ts.map +0 -1
- package/dist/types/elements/register.d.ts +0 -4
- package/dist/types/elements/register.d.ts.map +0 -1
- package/src/elements/SwcAsync.ts +0 -126
- package/src/elements/SwcChoose.ts +0 -190
- package/src/elements/SwcIf.ts +0 -124
- package/src/elements/SwcLoop.ts +0 -205
- package/src/elements/SwcSubTemplates.ts +0 -6
- package/src/elements/register.ts +0 -1022
|
@@ -1,1007 +0,0 @@
|
|
|
1
|
-
var __decorate = function(decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = function(k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { getElementConfig, elementDefine, attributeThis, changedAttributeThis, getAttributeValue } from "../decorators/index.js";
|
|
11
|
-
import { SwcAppMixin } from "./SwcAppMixin.js";
|
|
12
|
-
import { SwcUtils } from "../utils/Utils.js";
|
|
13
|
-
import { FunctionUtils, ActionExpression } from "@dooboostore/core";
|
|
14
|
-
import { ConvertUtils } from "@dooboostore/core-web";
|
|
15
|
-
const registerAllElements = (w) => {
|
|
16
|
-
const { HTMLElement: _HTMLElement, HTMLTemplateElement: _HTMLTemplateElement, DocumentFragment: _DocumentFragment, Node: _Node, Element: _Element, HTMLAnchorElement: _HTMLAnchorElement, HTMLAreaElement: _HTMLAreaElement, HTMLAudioElement: _HTMLAudioElement, HTMLBaseElement: _HTMLBaseElement, HTMLButtonElement: _HTMLButtonElement, HTMLCanvasElement: _HTMLCanvasElement, HTMLDataElement: _HTMLDataElement, HTMLDataListElement: _HTMLDataListElement, HTMLDetailsElement: _HTMLDetailsElement, HTMLDialogElement: _HTMLDialogElement, HTMLDivElement: _HTMLDivElement, HTMLDListElement: _HTMLDListElement, HTMLEmbedElement: _HTMLEmbedElement, HTMLFieldSetElement: _HTMLFieldSetElement, HTMLFormElement: _HTMLFormElement, HTMLHRElement: _HTMLHRElement, HTMLIFrameElement: _HTMLIFrameElement, HTMLImageElement: _HTMLImageElement, HTMLInputElement: _HTMLInputElement, HTMLLabelElement: _HTMLLabelElement, HTMLLegendElement: _HTMLLegendElement, HTMLLIElement: _HTMLLIElement, HTMLLinkElement: _HTMLLinkElement, HTMLMapElement: _HTMLMapElement, HTMLMetaElement: _HTMLMetaElement, HTMLMeterElement: _HTMLMeterElement, HTMLModElement: _HTMLModElement, HTMLObjectElement: _HTMLObjectElement, HTMLOListElement: _HTMLOListElement, HTMLOptGroupElement: _HTMLOptGroupElement, HTMLOptionElement: _HTMLOptionElement, HTMLOutputElement: _HTMLOutputElement, HTMLParagraphElement: _HTMLParagraphElement, HTMLParamElement: _HTMLParamElement, HTMLPictureElement: _HTMLPictureElement, HTMLPreElement: _HTMLPreElement, HTMLProgressElement: _HTMLProgressElement, HTMLQuoteElement: _HTMLQuoteElement, HTMLScriptElement: _HTMLScriptElement, HTMLSelectElement: _HTMLSelectElement, HTMLSlotElement: _HTMLSlotElement, HTMLSourceElement: _HTMLSourceElement, HTMLSpanElement: _HTMLSpanElement, HTMLStyleElement: _HTMLStyleElement, HTMLTableElement: _HTMLTableElement, HTMLTableSectionElement: _HTMLTableSectionElement, HTMLTableCellElement: _HTMLTableCellElement, HTMLTextAreaElement: _HTMLTextAreaElement, HTMLTimeElement: _HTMLTimeElement, HTMLTitleElement: _HTMLTitleElement, HTMLTableRowElement: _HTMLTableRowElement, HTMLTrackElement: _HTMLTrackElement, HTMLUListElement: _HTMLUListElement, HTMLVideoElement: _HTMLVideoElement, HTMLHeadingElement: _HTMLHeadingElement, HTMLBodyElement: _HTMLBodyElement } = w;
|
|
17
|
-
const HTMLElement = _HTMLElement;
|
|
18
|
-
const HTMLTemplateElement = _HTMLTemplateElement;
|
|
19
|
-
const DocumentFragment = _DocumentFragment;
|
|
20
|
-
const Node = _Node;
|
|
21
|
-
const Element = _Element;
|
|
22
|
-
const HTMLAnchorElement = _HTMLAnchorElement;
|
|
23
|
-
const HTMLAreaElement = _HTMLAreaElement;
|
|
24
|
-
const HTMLAudioElement = _HTMLAudioElement;
|
|
25
|
-
const HTMLBaseElement = _HTMLBaseElement;
|
|
26
|
-
const HTMLButtonElement = _HTMLButtonElement;
|
|
27
|
-
const HTMLCanvasElement = _HTMLCanvasElement;
|
|
28
|
-
const HTMLDataElement = _HTMLDataElement;
|
|
29
|
-
const HTMLDataListElement = _HTMLDataListElement;
|
|
30
|
-
const HTMLDetailsElement = _HTMLDetailsElement;
|
|
31
|
-
const HTMLDialogElement = _HTMLDialogElement;
|
|
32
|
-
const HTMLDivElement = _HTMLDivElement;
|
|
33
|
-
const HTMLDListElement = _HTMLDListElement;
|
|
34
|
-
const HTMLEmbedElement = _HTMLEmbedElement;
|
|
35
|
-
const HTMLFieldSetElement = _HTMLFieldSetElement;
|
|
36
|
-
const HTMLFormElement = _HTMLFormElement;
|
|
37
|
-
const HTMLHRElement = _HTMLHRElement;
|
|
38
|
-
const HTMLIFrameElement = _HTMLIFrameElement;
|
|
39
|
-
const HTMLImageElement = _HTMLImageElement;
|
|
40
|
-
const HTMLInputElement = _HTMLInputElement;
|
|
41
|
-
const HTMLLabelElement = _HTMLLabelElement;
|
|
42
|
-
const HTMLLegendElement = _HTMLLegendElement;
|
|
43
|
-
const HTMLLIElement = _HTMLLIElement;
|
|
44
|
-
const HTMLLinkElement = _HTMLLinkElement;
|
|
45
|
-
const HTMLMapElement = _HTMLMapElement;
|
|
46
|
-
const HTMLMetaElement = _HTMLMetaElement;
|
|
47
|
-
const HTMLMeterElement = _HTMLMeterElement;
|
|
48
|
-
const HTMLModElement = _HTMLModElement;
|
|
49
|
-
const HTMLObjectElement = _HTMLObjectElement;
|
|
50
|
-
const HTMLOListElement = _HTMLOListElement;
|
|
51
|
-
const HTMLOptGroupElement = _HTMLOptGroupElement;
|
|
52
|
-
const HTMLOptionElement = _HTMLOptionElement;
|
|
53
|
-
const HTMLOutputElement = _HTMLOutputElement;
|
|
54
|
-
const HTMLParagraphElement = _HTMLParagraphElement;
|
|
55
|
-
const HTMLParamElement = _HTMLParamElement;
|
|
56
|
-
const HTMLPictureElement = _HTMLPictureElement;
|
|
57
|
-
const HTMLPreElement = _HTMLPreElement;
|
|
58
|
-
const HTMLProgressElement = _HTMLProgressElement;
|
|
59
|
-
const HTMLQuoteElement = _HTMLQuoteElement;
|
|
60
|
-
const HTMLScriptElement = _HTMLScriptElement;
|
|
61
|
-
const HTMLSelectElement = _HTMLSelectElement;
|
|
62
|
-
const HTMLSlotElement = _HTMLSlotElement;
|
|
63
|
-
const HTMLSourceElement = _HTMLSourceElement;
|
|
64
|
-
const HTMLSpanElement = _HTMLSpanElement;
|
|
65
|
-
const HTMLStyleElement = _HTMLStyleElement;
|
|
66
|
-
const HTMLTableElement = _HTMLTableElement;
|
|
67
|
-
const HTMLTableSectionElement = _HTMLTableSectionElement;
|
|
68
|
-
const HTMLTableCellElement = _HTMLTableCellElement;
|
|
69
|
-
const HTMLTextAreaElement = _HTMLTextAreaElement;
|
|
70
|
-
const HTMLTimeElement = _HTMLTimeElement;
|
|
71
|
-
const HTMLTitleElement = _HTMLTitleElement;
|
|
72
|
-
const HTMLTableRowElement = _HTMLTableRowElement;
|
|
73
|
-
const HTMLTrackElement = _HTMLTrackElement;
|
|
74
|
-
const HTMLUListElement = _HTMLUListElement;
|
|
75
|
-
const HTMLVideoElement = _HTMLVideoElement;
|
|
76
|
-
const HTMLHeadingElement = _HTMLHeadingElement;
|
|
77
|
-
const HTMLBodyElement = _HTMLBodyElement;
|
|
78
|
-
let SwcLoading = class SwcLoading extends HTMLTemplateElement {
|
|
79
|
-
};
|
|
80
|
-
SwcLoading = __decorate([
|
|
81
|
-
elementDefine("swc-loading", { extends: "template", window: w })
|
|
82
|
-
], SwcLoading);
|
|
83
|
-
let SwcError = class SwcError extends HTMLTemplateElement {
|
|
84
|
-
};
|
|
85
|
-
SwcError = __decorate([
|
|
86
|
-
elementDefine("swc-error", { extends: "template", window: w })
|
|
87
|
-
], SwcError);
|
|
88
|
-
let SwcSuccess = class SwcSuccess extends HTMLTemplateElement {
|
|
89
|
-
};
|
|
90
|
-
SwcSuccess = __decorate([
|
|
91
|
-
elementDefine("swc-success", { extends: "template", window: w })
|
|
92
|
-
], SwcSuccess);
|
|
93
|
-
let SwcWhen = class SwcWhen extends HTMLTemplateElement {
|
|
94
|
-
};
|
|
95
|
-
SwcWhen = __decorate([
|
|
96
|
-
elementDefine("swc-when", { extends: "template", window: w })
|
|
97
|
-
], SwcWhen);
|
|
98
|
-
let SwcOtherwise = class SwcOtherwise extends HTMLTemplateElement {
|
|
99
|
-
};
|
|
100
|
-
SwcOtherwise = __decorate([
|
|
101
|
-
elementDefine("swc-otherwise", { extends: "template", window: w })
|
|
102
|
-
], SwcOtherwise);
|
|
103
|
-
let SwcDefault = class SwcDefault extends HTMLTemplateElement {
|
|
104
|
-
};
|
|
105
|
-
SwcDefault = __decorate([
|
|
106
|
-
elementDefine("swc-default", { extends: "template", window: w })
|
|
107
|
-
], SwcDefault);
|
|
108
|
-
let SwcApp = class SwcApp extends SwcAppMixin(HTMLElement) {
|
|
109
|
-
};
|
|
110
|
-
SwcApp = __decorate([
|
|
111
|
-
elementDefine("swc-app", { window: w })
|
|
112
|
-
], SwcApp);
|
|
113
|
-
let SwcIf = class SwcIf extends HTMLTemplateElement {
|
|
114
|
-
get value() {
|
|
115
|
-
return this._value;
|
|
116
|
-
}
|
|
117
|
-
set value(nv) {
|
|
118
|
-
this.refresh(nv);
|
|
119
|
-
}
|
|
120
|
-
constructor() {
|
|
121
|
-
super();
|
|
122
|
-
this._nodes = [];
|
|
123
|
-
}
|
|
124
|
-
setValue(value, o, n) {
|
|
125
|
-
this._value = value;
|
|
126
|
-
this.refresh(this._value);
|
|
127
|
-
}
|
|
128
|
-
// @changedAttributeThis('replace-wrap')
|
|
129
|
-
// private setReplaceWrap(replaceWrapAttr?: string | null) {
|
|
130
|
-
// this.refresh();
|
|
131
|
-
// }
|
|
132
|
-
replaceExpressions(html, groupArgs, context, wrap) {
|
|
133
|
-
let config = void 0;
|
|
134
|
-
if (wrap) {
|
|
135
|
-
config = {
|
|
136
|
-
expression: {
|
|
137
|
-
replace: { start: `${wrap.start}`, end: `${wrap.end}` },
|
|
138
|
-
callReturn: { start: `${wrap.start}=`, end: `${wrap.end}` },
|
|
139
|
-
call: { start: `${wrap.start}@`, end: `${wrap.end}` }
|
|
140
|
-
}
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
const ae = new ActionExpression(html, config);
|
|
144
|
-
const win = this.ownerDocument?.defaultView || window;
|
|
145
|
-
for (const expr of ae.getExpressions("replace")) {
|
|
146
|
-
try {
|
|
147
|
-
const value = FunctionUtils.executeReturn({
|
|
148
|
-
script: ConvertUtils.decodeHtmlEntity(expr.script, win.document),
|
|
149
|
-
context,
|
|
150
|
-
args: groupArgs
|
|
151
|
-
});
|
|
152
|
-
ae.replace(expr, String(value));
|
|
153
|
-
} catch (e) {
|
|
154
|
-
console.error(`[SWC] Failed to execute ${expr.original}:`, e);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
return ae.getUnprocessedTemplate();
|
|
158
|
-
}
|
|
159
|
-
refresh(value) {
|
|
160
|
-
const targetValue = value !== void 0 ? value : getAttributeValue(this, "value") ?? this._value;
|
|
161
|
-
if (this.hasAttribute("skip-if-same") && this._value === targetValue && this._nodes.length > 0) {
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
this.cleanup();
|
|
165
|
-
this._value = targetValue;
|
|
166
|
-
const portal = this.parentElement;
|
|
167
|
-
if (!portal || !this._value)
|
|
168
|
-
return;
|
|
169
|
-
const win = this.ownerDocument?.defaultView || window;
|
|
170
|
-
const helperSet = SwcUtils.getHelperAndHostSet(win, this);
|
|
171
|
-
let htmlString = this.innerHTML;
|
|
172
|
-
const groupArgs = { ...helperSet, $value: this._value, $templateHost: this };
|
|
173
|
-
htmlString = this.replaceExpressions(htmlString, groupArgs, this, { start: this._replaceWrapStart ?? "{#{", end: this._replaceWrapEnd ?? "}#}" });
|
|
174
|
-
const result = this.ownerDocument?.createElement("template") || document.createElement("template");
|
|
175
|
-
result.innerHTML = htmlString;
|
|
176
|
-
const processedFragment = result.content;
|
|
177
|
-
this._nodes = Array.from(processedFragment.childNodes);
|
|
178
|
-
this._nodes.forEach((node) => {
|
|
179
|
-
if (node instanceof HTMLElement)
|
|
180
|
-
node.__swc_template_host = this;
|
|
181
|
-
});
|
|
182
|
-
portal.insertBefore(processedFragment, this.nextSibling);
|
|
183
|
-
}
|
|
184
|
-
cleanup() {
|
|
185
|
-
this._nodes.forEach((n) => {
|
|
186
|
-
const realNode = n.__upgraded_instance || n;
|
|
187
|
-
if (realNode.parentElement) {
|
|
188
|
-
realNode.parentElement.removeChild(realNode);
|
|
189
|
-
}
|
|
190
|
-
});
|
|
191
|
-
this._nodes = [];
|
|
192
|
-
}
|
|
193
|
-
disconnectedCallback() {
|
|
194
|
-
this.cleanup();
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
__decorate([
|
|
198
|
-
attributeThis("replace-wrap-start"),
|
|
199
|
-
__metadata("design:type", String)
|
|
200
|
-
], SwcIf.prototype, "_replaceWrapStart", void 0);
|
|
201
|
-
__decorate([
|
|
202
|
-
attributeThis("replace-wrap-end"),
|
|
203
|
-
__metadata("design:type", String)
|
|
204
|
-
], SwcIf.prototype, "_replaceWrapEnd", void 0);
|
|
205
|
-
__decorate([
|
|
206
|
-
attributeThis("skip-if-same"),
|
|
207
|
-
__metadata("design:type", String)
|
|
208
|
-
], SwcIf.prototype, "_skipIfSame", void 0);
|
|
209
|
-
__decorate([
|
|
210
|
-
changedAttributeThis("value"),
|
|
211
|
-
__metadata("design:type", Function),
|
|
212
|
-
__metadata("design:paramtypes", [Object, String, String]),
|
|
213
|
-
__metadata("design:returntype", void 0)
|
|
214
|
-
], SwcIf.prototype, "setValue", null);
|
|
215
|
-
SwcIf = __decorate([
|
|
216
|
-
elementDefine("swc-if", { extends: "template", window: w }),
|
|
217
|
-
__metadata("design:paramtypes", [])
|
|
218
|
-
], SwcIf);
|
|
219
|
-
let SwcLoop = class SwcLoop extends HTMLTemplateElement {
|
|
220
|
-
get value() {
|
|
221
|
-
return this._value;
|
|
222
|
-
}
|
|
223
|
-
set value(nv) {
|
|
224
|
-
this._value = nv;
|
|
225
|
-
this.refresh(nv);
|
|
226
|
-
}
|
|
227
|
-
getValue(index) {
|
|
228
|
-
return this._value?.[index];
|
|
229
|
-
}
|
|
230
|
-
constructor() {
|
|
231
|
-
super();
|
|
232
|
-
this._value = [];
|
|
233
|
-
this._nodeGroups = [];
|
|
234
|
-
}
|
|
235
|
-
setValue(value, o, n) {
|
|
236
|
-
this._value = value;
|
|
237
|
-
this.refresh(this._value);
|
|
238
|
-
}
|
|
239
|
-
// @changedAttributeThis('replace-wrap')
|
|
240
|
-
// private setReplaceWrap(replaceWrapAttr?: string | null) {
|
|
241
|
-
// this.refresh();
|
|
242
|
-
// }
|
|
243
|
-
replaceExpressions(html, groupArgs, context, wrap) {
|
|
244
|
-
let config = void 0;
|
|
245
|
-
config = {
|
|
246
|
-
expression: {
|
|
247
|
-
replace: { start: `${wrap.start}`, end: `${wrap.end}` },
|
|
248
|
-
callReturn: { start: `${wrap.start}=`, end: `${wrap.end}` },
|
|
249
|
-
call: { start: `${wrap.start}@`, end: `${wrap.end}` }
|
|
250
|
-
}
|
|
251
|
-
};
|
|
252
|
-
const ae = new ActionExpression(html, config);
|
|
253
|
-
const win = this.ownerDocument?.defaultView || window;
|
|
254
|
-
const expressions = ae.getExpressions("replace");
|
|
255
|
-
for (const expr of expressions) {
|
|
256
|
-
const script = ConvertUtils.decodeHtmlEntity(expr.script, win.document);
|
|
257
|
-
try {
|
|
258
|
-
const value = FunctionUtils.executeReturn({
|
|
259
|
-
script,
|
|
260
|
-
context,
|
|
261
|
-
args: groupArgs
|
|
262
|
-
});
|
|
263
|
-
ae.replace(expr, String(value));
|
|
264
|
-
} catch (e) {
|
|
265
|
-
console.error(`[SWC] Failed to execute ${expr.original}:`, e);
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
return ae.getUnprocessedTemplate();
|
|
269
|
-
}
|
|
270
|
-
createFragmentAndNodes(items, helperSet, startIndex = 0) {
|
|
271
|
-
const win = this.ownerDocument?.defaultView || window;
|
|
272
|
-
const fragment = win.document.createDocumentFragment();
|
|
273
|
-
const newNodesGroup = [];
|
|
274
|
-
items.forEach((item, i) => {
|
|
275
|
-
const index = startIndex + i;
|
|
276
|
-
let htmlString = this.innerHTML;
|
|
277
|
-
const groupArgs = { ...helperSet, $item: item, $index: index, $value: this._value };
|
|
278
|
-
htmlString = this.replaceExpressions(htmlString, groupArgs, this, { start: this._replaceWrapStart ?? "{#{", end: this._replaceWrapEnd ?? "}#}" });
|
|
279
|
-
const temp = this.ownerDocument?.createElement("template") || document.createElement("template");
|
|
280
|
-
temp.innerHTML = htmlString;
|
|
281
|
-
const content = temp.content;
|
|
282
|
-
const nodes = Array.from(content.childNodes);
|
|
283
|
-
const setTemplateHost = (element) => {
|
|
284
|
-
element.__swc_template_host = this;
|
|
285
|
-
Array.from(element.children).forEach((child) => {
|
|
286
|
-
if (child instanceof HTMLElement) {
|
|
287
|
-
setTemplateHost(child);
|
|
288
|
-
}
|
|
289
|
-
});
|
|
290
|
-
};
|
|
291
|
-
nodes.forEach((node) => {
|
|
292
|
-
if (node instanceof HTMLElement) {
|
|
293
|
-
setTemplateHost(node);
|
|
294
|
-
}
|
|
295
|
-
});
|
|
296
|
-
newNodesGroup.push(nodes);
|
|
297
|
-
fragment.appendChild(content);
|
|
298
|
-
});
|
|
299
|
-
return { fragment, newNodesGroup };
|
|
300
|
-
}
|
|
301
|
-
appendItem(...items) {
|
|
302
|
-
if (!items || items.length <= 0)
|
|
303
|
-
return;
|
|
304
|
-
const portal = SwcUtils.getParentContainer(this);
|
|
305
|
-
if (!portal)
|
|
306
|
-
return;
|
|
307
|
-
const win = this.ownerDocument?.defaultView || window;
|
|
308
|
-
const helperSet = SwcUtils.getHelperAndHostSet(win, this);
|
|
309
|
-
const startIndex = this._value ? this._value.length : 0;
|
|
310
|
-
if (this._value !== items) {
|
|
311
|
-
this._value = [...this._value || [], ...items];
|
|
312
|
-
}
|
|
313
|
-
const { fragment, newNodesGroup } = this.createFragmentAndNodes(items, helperSet, startIndex);
|
|
314
|
-
this._nodeGroups.push(...newNodesGroup);
|
|
315
|
-
console.log("\uBB50\uC57C \uC528\uBC1C");
|
|
316
|
-
let insertReference = this.nextSibling;
|
|
317
|
-
if (this._nodeGroups.length > items.length) {
|
|
318
|
-
const lastExistingGroup = this._nodeGroups[this._nodeGroups.length - items.length - 1];
|
|
319
|
-
if (lastExistingGroup && lastExistingGroup.length > 0) {
|
|
320
|
-
const lastNode = lastExistingGroup[lastExistingGroup.length - 1];
|
|
321
|
-
insertReference = lastNode.nextSibling;
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
portal.insertBefore(fragment, insertReference);
|
|
325
|
-
}
|
|
326
|
-
async prependItem(...items) {
|
|
327
|
-
if (!items || items.length <= 0)
|
|
328
|
-
return;
|
|
329
|
-
const portal = SwcUtils.getParentContainer(this);
|
|
330
|
-
if (!portal)
|
|
331
|
-
return;
|
|
332
|
-
const win = this.ownerDocument?.defaultView || window;
|
|
333
|
-
const helperSet = SwcUtils.getHelperAndHostSet(win, this);
|
|
334
|
-
if (this._value !== items) {
|
|
335
|
-
this._value = [...items, ...this._value || []];
|
|
336
|
-
}
|
|
337
|
-
const { fragment, newNodesGroup } = this.createFragmentAndNodes(items, helperSet, 0);
|
|
338
|
-
this._nodeGroups = [...newNodesGroup, ...this._nodeGroups];
|
|
339
|
-
portal.insertBefore(fragment, this.nextSibling);
|
|
340
|
-
}
|
|
341
|
-
refresh(value) {
|
|
342
|
-
const targetValue = value !== void 0 ? value : getAttributeValue(this, "value") ?? this._value ?? [];
|
|
343
|
-
this.cleanup();
|
|
344
|
-
this._value = targetValue;
|
|
345
|
-
if (!this._value || this._value.length <= 0)
|
|
346
|
-
return;
|
|
347
|
-
const win = this.ownerDocument?.defaultView || window;
|
|
348
|
-
const helperSet = SwcUtils.getHelperAndHostSet(win, this);
|
|
349
|
-
helperSet.$templateHost = this;
|
|
350
|
-
const { fragment, newNodesGroup } = this.createFragmentAndNodes(this._value, helperSet, 0);
|
|
351
|
-
this._nodeGroups = newNodesGroup;
|
|
352
|
-
const portal = SwcUtils.getParentContainer(this);
|
|
353
|
-
if (portal) {
|
|
354
|
-
portal.insertBefore(fragment, this.nextSibling);
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
cleanup() {
|
|
358
|
-
console.log("\uB204\uAC00 cleanup");
|
|
359
|
-
this._nodeGroups.forEach((nodes) => nodes.forEach((n) => n.parentElement?.removeChild(n)));
|
|
360
|
-
this._nodeGroups = [];
|
|
361
|
-
}
|
|
362
|
-
disconnectedCallback() {
|
|
363
|
-
this.cleanup();
|
|
364
|
-
}
|
|
365
|
-
};
|
|
366
|
-
__decorate([
|
|
367
|
-
attributeThis("replace-wrap-start"),
|
|
368
|
-
__metadata("design:type", String)
|
|
369
|
-
], SwcLoop.prototype, "_replaceWrapStart", void 0);
|
|
370
|
-
__decorate([
|
|
371
|
-
attributeThis("replace-wrap-end"),
|
|
372
|
-
__metadata("design:type", String)
|
|
373
|
-
], SwcLoop.prototype, "_replaceWrapEnd", void 0);
|
|
374
|
-
__decorate([
|
|
375
|
-
changedAttributeThis("value"),
|
|
376
|
-
__metadata("design:type", Function),
|
|
377
|
-
__metadata("design:paramtypes", [Object, String, String]),
|
|
378
|
-
__metadata("design:returntype", void 0)
|
|
379
|
-
], SwcLoop.prototype, "setValue", null);
|
|
380
|
-
SwcLoop = __decorate([
|
|
381
|
-
elementDefine("swc-loop", { extends: "template", window: w }),
|
|
382
|
-
__metadata("design:paramtypes", [])
|
|
383
|
-
], SwcLoop);
|
|
384
|
-
let SwcChoose = class SwcChoose extends HTMLTemplateElement {
|
|
385
|
-
get value() {
|
|
386
|
-
return this._value;
|
|
387
|
-
}
|
|
388
|
-
set value(nv) {
|
|
389
|
-
this._value = nv;
|
|
390
|
-
this.refresh(this._value);
|
|
391
|
-
}
|
|
392
|
-
constructor() {
|
|
393
|
-
super();
|
|
394
|
-
this._nodes = [];
|
|
395
|
-
this._previousTemplate = null;
|
|
396
|
-
}
|
|
397
|
-
// static get observedAttributes() {
|
|
398
|
-
// return ['value'];
|
|
399
|
-
// }
|
|
400
|
-
attributeChangedCallback(na, o, n) {
|
|
401
|
-
}
|
|
402
|
-
setValue(value, o, n) {
|
|
403
|
-
console.log("chooooooose value", value);
|
|
404
|
-
this._value = value;
|
|
405
|
-
this.refresh(this._value);
|
|
406
|
-
}
|
|
407
|
-
// @changedAttributeThis('replace-wrap')
|
|
408
|
-
// private setReplaceWrap(replaceWrapAttr?: string | null) {
|
|
409
|
-
// this.refresh();
|
|
410
|
-
// }
|
|
411
|
-
replaceExpressions(html, groupArgs, context, wrap) {
|
|
412
|
-
let config = void 0;
|
|
413
|
-
if (wrap) {
|
|
414
|
-
config = {
|
|
415
|
-
expression: {
|
|
416
|
-
replace: { start: `${wrap.start}`, end: `${wrap.end}` },
|
|
417
|
-
callReturn: { start: `${wrap.start}=`, end: `${wrap.end}` },
|
|
418
|
-
call: { start: `${wrap.start}@`, end: `${wrap.end}` }
|
|
419
|
-
}
|
|
420
|
-
};
|
|
421
|
-
}
|
|
422
|
-
const ae = new ActionExpression(html, config);
|
|
423
|
-
const win = this.ownerDocument?.defaultView || window;
|
|
424
|
-
for (const expr of ae.getExpressions("replace")) {
|
|
425
|
-
try {
|
|
426
|
-
const value = FunctionUtils.executeReturn({
|
|
427
|
-
script: ConvertUtils.decodeHtmlEntity(expr.script, win.document),
|
|
428
|
-
context,
|
|
429
|
-
args: groupArgs
|
|
430
|
-
});
|
|
431
|
-
ae.replace(expr, String(value));
|
|
432
|
-
} catch (e) {
|
|
433
|
-
console.error(`[SWC] Failed to execute ${expr.original}:`, e);
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
return ae.getUnprocessedTemplate();
|
|
437
|
-
}
|
|
438
|
-
refresh(value) {
|
|
439
|
-
value = getAttributeValue(this, "value") ?? this._value;
|
|
440
|
-
console.log("[DEBUG] SwcChoose.refresh called, value:", value);
|
|
441
|
-
const portal = SwcUtils.getParentContainer(this);
|
|
442
|
-
if (!portal) {
|
|
443
|
-
console.log("[DEBUG] SwcChoose portal is null!");
|
|
444
|
-
return;
|
|
445
|
-
}
|
|
446
|
-
const win = (getElementConfig(this).window ?? this.ownerDocument?.defaultView) || window;
|
|
447
|
-
const helperSet = SwcUtils.getHelperAndHostSet(win, this);
|
|
448
|
-
const groupArgs = { ...helperSet, $value: value, $templateHost: this };
|
|
449
|
-
const templates = Array.from(this.content.querySelectorAll("template"));
|
|
450
|
-
let selected = null;
|
|
451
|
-
for (const t of templates) {
|
|
452
|
-
if (t.getAttribute("is") === "swc-when") {
|
|
453
|
-
const attrVal = t.getAttribute("test") || "";
|
|
454
|
-
let matches = false;
|
|
455
|
-
const result = FunctionUtils.executeReturn({
|
|
456
|
-
script: attrVal,
|
|
457
|
-
context: t,
|
|
458
|
-
args: groupArgs
|
|
459
|
-
});
|
|
460
|
-
matches = !!result;
|
|
461
|
-
if (matches) {
|
|
462
|
-
selected = t;
|
|
463
|
-
break;
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
const target = selected || this.content.querySelector('template[is="swc-otherwise"]');
|
|
468
|
-
const skipValue = target?.getAttribute?.("skip-if-same");
|
|
469
|
-
const skipValue2 = this._previousTemplate?.getAttribute?.("skip-if-same");
|
|
470
|
-
const hasSkipIfSame = target?.hasAttribute?.("skip-if-same");
|
|
471
|
-
const isSame = this._previousTemplate === target;
|
|
472
|
-
if (hasSkipIfSame && isSame) {
|
|
473
|
-
return;
|
|
474
|
-
}
|
|
475
|
-
this.cleanup();
|
|
476
|
-
this._previousTemplate = target;
|
|
477
|
-
if (target) {
|
|
478
|
-
let htmlString = target.innerHTML;
|
|
479
|
-
htmlString = this.replaceExpressions(htmlString, groupArgs, this, { start: this._replaceWrapStart ?? "{#{", end: this._replaceWrapEnd ?? "}#}" });
|
|
480
|
-
const result = this.ownerDocument?.createElement("template") || document.createElement("template");
|
|
481
|
-
result.innerHTML = htmlString;
|
|
482
|
-
const processedFragment = result.content;
|
|
483
|
-
this._nodes = Array.from(processedFragment.childNodes);
|
|
484
|
-
const setTemplateHost = (element) => {
|
|
485
|
-
element.__swc_template_host = this;
|
|
486
|
-
Array.from(element.children).forEach((child) => {
|
|
487
|
-
if (child instanceof HTMLElement) {
|
|
488
|
-
setTemplateHost(child);
|
|
489
|
-
}
|
|
490
|
-
});
|
|
491
|
-
};
|
|
492
|
-
this._nodes.forEach((node) => {
|
|
493
|
-
if (node instanceof HTMLElement) {
|
|
494
|
-
setTemplateHost(node);
|
|
495
|
-
}
|
|
496
|
-
});
|
|
497
|
-
console.log(`[DEBUG] SwcChoose before insertBefore, portal: ${portal?.tagName}, isConnected: ${portal?.isConnected}`);
|
|
498
|
-
portal.insertBefore(processedFragment, this.nextSibling);
|
|
499
|
-
console.log("[DEBUG] SwcChoose after insertBefore");
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
cleanup() {
|
|
503
|
-
this._nodes.forEach((n) => n.parentElement?.removeChild(n));
|
|
504
|
-
this._nodes = [];
|
|
505
|
-
}
|
|
506
|
-
disconnectedCallback() {
|
|
507
|
-
this.cleanup();
|
|
508
|
-
}
|
|
509
|
-
};
|
|
510
|
-
__decorate([
|
|
511
|
-
attributeThis("replace-wrap-start"),
|
|
512
|
-
__metadata("design:type", String)
|
|
513
|
-
], SwcChoose.prototype, "_replaceWrapStart", void 0);
|
|
514
|
-
__decorate([
|
|
515
|
-
attributeThis("replace-wrap-end"),
|
|
516
|
-
__metadata("design:type", String)
|
|
517
|
-
], SwcChoose.prototype, "_replaceWrapEnd", void 0);
|
|
518
|
-
__decorate([
|
|
519
|
-
changedAttributeThis("value"),
|
|
520
|
-
__metadata("design:type", Function),
|
|
521
|
-
__metadata("design:paramtypes", [Object, String, String]),
|
|
522
|
-
__metadata("design:returntype", void 0)
|
|
523
|
-
], SwcChoose.prototype, "setValue", null);
|
|
524
|
-
SwcChoose = __decorate([
|
|
525
|
-
elementDefine("swc-choose", { extends: "template", window: w }),
|
|
526
|
-
__metadata("design:paramtypes", [])
|
|
527
|
-
], SwcChoose);
|
|
528
|
-
let SwcAsync = class SwcAsync extends HTMLTemplateElement {
|
|
529
|
-
constructor() {
|
|
530
|
-
super(...arguments);
|
|
531
|
-
this._nodes = [];
|
|
532
|
-
}
|
|
533
|
-
get value() {
|
|
534
|
-
return this._value;
|
|
535
|
-
}
|
|
536
|
-
set value(nv) {
|
|
537
|
-
this.executeAsync(nv);
|
|
538
|
-
}
|
|
539
|
-
setValue(valueAttr) {
|
|
540
|
-
this.executeAsync(this._value);
|
|
541
|
-
}
|
|
542
|
-
// @changedAttributeThis('replace-wrap')
|
|
543
|
-
// private setReplaceWrap() {
|
|
544
|
-
// this.executeAsync(this._value);
|
|
545
|
-
// }
|
|
546
|
-
executeAsync(result = this._value) {
|
|
547
|
-
if (result === void 0 || result === null) {
|
|
548
|
-
this.refresh("default");
|
|
549
|
-
return;
|
|
550
|
-
}
|
|
551
|
-
if (result instanceof Promise) {
|
|
552
|
-
this.refresh("loading");
|
|
553
|
-
result.then((v) => {
|
|
554
|
-
this.resultValue = v;
|
|
555
|
-
this.refresh("success");
|
|
556
|
-
}).catch((e) => {
|
|
557
|
-
console.error("[SWC-ASYNC] Promise rejected:", e);
|
|
558
|
-
this.resultValue = e;
|
|
559
|
-
this.refresh("error");
|
|
560
|
-
});
|
|
561
|
-
} else {
|
|
562
|
-
this.resultValue = result;
|
|
563
|
-
this.refresh("success");
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
replaceExpressions(html, groupArgs, context, wrap) {
|
|
567
|
-
let config = void 0;
|
|
568
|
-
if (wrap) {
|
|
569
|
-
config = {
|
|
570
|
-
expression: {
|
|
571
|
-
replace: { start: `${wrap.start}`, end: `${wrap.end}` },
|
|
572
|
-
callReturn: { start: `${wrap.start}=`, end: `${wrap.end}` },
|
|
573
|
-
call: { start: `${wrap.start}@`, end: `${wrap.end}` }
|
|
574
|
-
}
|
|
575
|
-
};
|
|
576
|
-
}
|
|
577
|
-
const ae = new ActionExpression(html, config);
|
|
578
|
-
const win = this.ownerDocument?.defaultView || window;
|
|
579
|
-
for (const expr of ae.getExpressions("replace")) {
|
|
580
|
-
try {
|
|
581
|
-
const value = FunctionUtils.executeReturn({
|
|
582
|
-
script: ConvertUtils.decodeHtmlEntity(expr.script, win.document),
|
|
583
|
-
context,
|
|
584
|
-
args: groupArgs
|
|
585
|
-
});
|
|
586
|
-
ae.replace(expr, String(value));
|
|
587
|
-
} catch (e) {
|
|
588
|
-
console.error(`[SWC] Failed to execute ${expr.original}:`, e);
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
return ae.getUnprocessedTemplate();
|
|
592
|
-
}
|
|
593
|
-
refresh(state = "default") {
|
|
594
|
-
this.cleanup();
|
|
595
|
-
const portal = SwcUtils.getParentContainer(this);
|
|
596
|
-
if (!portal)
|
|
597
|
-
return;
|
|
598
|
-
const win = this.ownerDocument?.defaultView || window;
|
|
599
|
-
const helperSet = SwcUtils.getHelperAndHostSet(win, this);
|
|
600
|
-
const t = this.content.querySelector(`template[is="swc-${state}"]`);
|
|
601
|
-
if (t) {
|
|
602
|
-
let htmlString = t.innerHTML;
|
|
603
|
-
const groupArgs = { ...helperSet, $value: this._value, $state: state, $templateHost: this };
|
|
604
|
-
htmlString = this.replaceExpressions(htmlString, groupArgs, this, { start: this._replaceWrapStart ?? "{#{", end: this._replaceWrapEnd ?? "}#}" });
|
|
605
|
-
const temp = this.ownerDocument?.createElement("template") || document.createElement("template");
|
|
606
|
-
temp.innerHTML = htmlString;
|
|
607
|
-
const content = temp.content;
|
|
608
|
-
this._nodes = Array.from(content.childNodes);
|
|
609
|
-
this._nodes.forEach((node) => {
|
|
610
|
-
if (node instanceof HTMLElement)
|
|
611
|
-
node.__template_swc_host = this;
|
|
612
|
-
});
|
|
613
|
-
portal.insertBefore(content, this.nextSibling);
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
cleanup() {
|
|
617
|
-
this._nodes.forEach((n) => n.parentElement?.removeChild(n));
|
|
618
|
-
this._nodes = [];
|
|
619
|
-
}
|
|
620
|
-
disconnectedCallback() {
|
|
621
|
-
this.cleanup();
|
|
622
|
-
}
|
|
623
|
-
};
|
|
624
|
-
__decorate([
|
|
625
|
-
attributeThis("value"),
|
|
626
|
-
__metadata("design:type", Object)
|
|
627
|
-
], SwcAsync.prototype, "_value", void 0);
|
|
628
|
-
__decorate([
|
|
629
|
-
attributeThis("replace-wrap-start"),
|
|
630
|
-
__metadata("design:type", String)
|
|
631
|
-
], SwcAsync.prototype, "_replaceWrapStart", void 0);
|
|
632
|
-
__decorate([
|
|
633
|
-
attributeThis("replace-wrap-end"),
|
|
634
|
-
__metadata("design:type", String)
|
|
635
|
-
], SwcAsync.prototype, "_replaceWrapEnd", void 0);
|
|
636
|
-
__decorate([
|
|
637
|
-
changedAttributeThis("value"),
|
|
638
|
-
__metadata("design:type", Function),
|
|
639
|
-
__metadata("design:paramtypes", [String]),
|
|
640
|
-
__metadata("design:returntype", void 0)
|
|
641
|
-
], SwcAsync.prototype, "setValue", null);
|
|
642
|
-
SwcAsync = __decorate([
|
|
643
|
-
elementDefine("swc-async", { extends: "template", window: w })
|
|
644
|
-
], SwcAsync);
|
|
645
|
-
let SwcAppAnchor = class SwcAppAnchor extends SwcAppMixin(HTMLAnchorElement) {
|
|
646
|
-
};
|
|
647
|
-
SwcAppAnchor = __decorate([
|
|
648
|
-
elementDefine("swc-app-a", { extends: "a", window: w })
|
|
649
|
-
], SwcAppAnchor);
|
|
650
|
-
let SwcAppArea = class SwcAppArea extends SwcAppMixin(HTMLAreaElement) {
|
|
651
|
-
};
|
|
652
|
-
SwcAppArea = __decorate([
|
|
653
|
-
elementDefine("swc-app-area", { extends: "area", window: w })
|
|
654
|
-
], SwcAppArea);
|
|
655
|
-
let SwcAppAudio = class SwcAppAudio extends SwcAppMixin(HTMLAudioElement) {
|
|
656
|
-
};
|
|
657
|
-
SwcAppAudio = __decorate([
|
|
658
|
-
elementDefine("swc-app-audio", { extends: "audio", window: w })
|
|
659
|
-
], SwcAppAudio);
|
|
660
|
-
let SwcAppBase = class SwcAppBase extends SwcAppMixin(HTMLBaseElement) {
|
|
661
|
-
};
|
|
662
|
-
SwcAppBase = __decorate([
|
|
663
|
-
elementDefine("swc-app-base", { extends: "base", window: w })
|
|
664
|
-
], SwcAppBase);
|
|
665
|
-
let SwcAppButton = class SwcAppButton extends SwcAppMixin(HTMLButtonElement) {
|
|
666
|
-
};
|
|
667
|
-
SwcAppButton = __decorate([
|
|
668
|
-
elementDefine("swc-app-button", { extends: "button", window: w })
|
|
669
|
-
], SwcAppButton);
|
|
670
|
-
let SwcAppCanvas = class SwcAppCanvas extends SwcAppMixin(HTMLCanvasElement) {
|
|
671
|
-
};
|
|
672
|
-
SwcAppCanvas = __decorate([
|
|
673
|
-
elementDefine("swc-app-canvas", { extends: "canvas", window: w })
|
|
674
|
-
], SwcAppCanvas);
|
|
675
|
-
let SwcAppData = class SwcAppData extends SwcAppMixin(HTMLDataElement) {
|
|
676
|
-
};
|
|
677
|
-
SwcAppData = __decorate([
|
|
678
|
-
elementDefine("swc-app-data", { extends: "data", window: w })
|
|
679
|
-
], SwcAppData);
|
|
680
|
-
let SwcAppDataList = class SwcAppDataList extends SwcAppMixin(HTMLDataListElement) {
|
|
681
|
-
};
|
|
682
|
-
SwcAppDataList = __decorate([
|
|
683
|
-
elementDefine("swc-app-datalist", { extends: "datalist", window: w })
|
|
684
|
-
], SwcAppDataList);
|
|
685
|
-
let SwcAppDetails = class SwcAppDetails extends SwcAppMixin(HTMLDetailsElement) {
|
|
686
|
-
};
|
|
687
|
-
SwcAppDetails = __decorate([
|
|
688
|
-
elementDefine("swc-app-details", { extends: "details", window: w })
|
|
689
|
-
], SwcAppDetails);
|
|
690
|
-
let SwcAppDialog = class SwcAppDialog extends SwcAppMixin(HTMLDialogElement) {
|
|
691
|
-
};
|
|
692
|
-
SwcAppDialog = __decorate([
|
|
693
|
-
elementDefine("swc-app-dialog", { extends: "dialog", window: w })
|
|
694
|
-
], SwcAppDialog);
|
|
695
|
-
let SwcAppDiv = class SwcAppDiv extends SwcAppMixin(HTMLDivElement) {
|
|
696
|
-
};
|
|
697
|
-
SwcAppDiv = __decorate([
|
|
698
|
-
elementDefine("swc-app-div", { extends: "div", window: w })
|
|
699
|
-
], SwcAppDiv);
|
|
700
|
-
let SwcAppDList = class SwcAppDList extends SwcAppMixin(HTMLDListElement) {
|
|
701
|
-
};
|
|
702
|
-
SwcAppDList = __decorate([
|
|
703
|
-
elementDefine("swc-app-dl", { extends: "dl", window: w })
|
|
704
|
-
], SwcAppDList);
|
|
705
|
-
let SwcAppEmbed = class SwcAppEmbed extends SwcAppMixin(HTMLEmbedElement) {
|
|
706
|
-
};
|
|
707
|
-
SwcAppEmbed = __decorate([
|
|
708
|
-
elementDefine("swc-app-embed", { extends: "embed", window: w })
|
|
709
|
-
], SwcAppEmbed);
|
|
710
|
-
let SwcAppFieldSet = class SwcAppFieldSet extends SwcAppMixin(HTMLFieldSetElement) {
|
|
711
|
-
};
|
|
712
|
-
SwcAppFieldSet = __decorate([
|
|
713
|
-
elementDefine("swc-app-fieldset", { extends: "fieldset", window: w })
|
|
714
|
-
], SwcAppFieldSet);
|
|
715
|
-
let SwcAppForm = class SwcAppForm extends SwcAppMixin(HTMLFormElement) {
|
|
716
|
-
};
|
|
717
|
-
SwcAppForm = __decorate([
|
|
718
|
-
elementDefine("swc-app-form", { extends: "form", window: w })
|
|
719
|
-
], SwcAppForm);
|
|
720
|
-
let SwcAppHR = class SwcAppHR extends SwcAppMixin(HTMLHRElement) {
|
|
721
|
-
};
|
|
722
|
-
SwcAppHR = __decorate([
|
|
723
|
-
elementDefine("swc-app-hr", { extends: "hr", window: w })
|
|
724
|
-
], SwcAppHR);
|
|
725
|
-
let SwcAppIFrame = class SwcAppIFrame extends SwcAppMixin(HTMLIFrameElement) {
|
|
726
|
-
};
|
|
727
|
-
SwcAppIFrame = __decorate([
|
|
728
|
-
elementDefine("swc-app-iframe", { extends: "iframe", window: w })
|
|
729
|
-
], SwcAppIFrame);
|
|
730
|
-
let SwcAppImage = class SwcAppImage extends SwcAppMixin(HTMLImageElement) {
|
|
731
|
-
};
|
|
732
|
-
SwcAppImage = __decorate([
|
|
733
|
-
elementDefine("swc-app-img", { extends: "img", window: w })
|
|
734
|
-
], SwcAppImage);
|
|
735
|
-
let SwcAppInput = class SwcAppInput extends SwcAppMixin(HTMLInputElement) {
|
|
736
|
-
};
|
|
737
|
-
SwcAppInput = __decorate([
|
|
738
|
-
elementDefine("swc-app-input", { extends: "input", window: w })
|
|
739
|
-
], SwcAppInput);
|
|
740
|
-
let SwcAppLabel = class SwcAppLabel extends SwcAppMixin(HTMLLabelElement) {
|
|
741
|
-
};
|
|
742
|
-
SwcAppLabel = __decorate([
|
|
743
|
-
elementDefine("swc-app-label", { extends: "label", window: w })
|
|
744
|
-
], SwcAppLabel);
|
|
745
|
-
let SwcAppLegend = class SwcAppLegend extends SwcAppMixin(HTMLLegendElement) {
|
|
746
|
-
};
|
|
747
|
-
SwcAppLegend = __decorate([
|
|
748
|
-
elementDefine("swc-app-legend", { extends: "legend", window: w })
|
|
749
|
-
], SwcAppLegend);
|
|
750
|
-
let SwcAppLI = class SwcAppLI extends SwcAppMixin(HTMLLIElement) {
|
|
751
|
-
};
|
|
752
|
-
SwcAppLI = __decorate([
|
|
753
|
-
elementDefine("swc-app-li", { extends: "li", window: w })
|
|
754
|
-
], SwcAppLI);
|
|
755
|
-
let SwcAppLink = class SwcAppLink extends SwcAppMixin(HTMLLinkElement) {
|
|
756
|
-
};
|
|
757
|
-
SwcAppLink = __decorate([
|
|
758
|
-
elementDefine("swc-app-link", { extends: "link", window: w })
|
|
759
|
-
], SwcAppLink);
|
|
760
|
-
let SwcAppMap = class SwcAppMap extends SwcAppMixin(HTMLMapElement) {
|
|
761
|
-
};
|
|
762
|
-
SwcAppMap = __decorate([
|
|
763
|
-
elementDefine("swc-app-map", { extends: "map", window: w })
|
|
764
|
-
], SwcAppMap);
|
|
765
|
-
let SwcAppMeta = class SwcAppMeta extends SwcAppMixin(HTMLMetaElement) {
|
|
766
|
-
};
|
|
767
|
-
SwcAppMeta = __decorate([
|
|
768
|
-
elementDefine("swc-app-meta", { extends: "meta", window: w })
|
|
769
|
-
], SwcAppMeta);
|
|
770
|
-
let SwcAppMeter = class SwcAppMeter extends SwcAppMixin(HTMLMeterElement) {
|
|
771
|
-
};
|
|
772
|
-
SwcAppMeter = __decorate([
|
|
773
|
-
elementDefine("swc-app-meter", { extends: "meter", window: w })
|
|
774
|
-
], SwcAppMeter);
|
|
775
|
-
let SwcAppMod = class SwcAppMod extends SwcAppMixin(HTMLModElement) {
|
|
776
|
-
};
|
|
777
|
-
SwcAppMod = __decorate([
|
|
778
|
-
elementDefine("swc-app-del", { extends: "del", window: w })
|
|
779
|
-
], SwcAppMod);
|
|
780
|
-
let SwcAppObject = class SwcAppObject extends SwcAppMixin(HTMLObjectElement) {
|
|
781
|
-
};
|
|
782
|
-
SwcAppObject = __decorate([
|
|
783
|
-
elementDefine("swc-app-object", { extends: "object", window: w })
|
|
784
|
-
], SwcAppObject);
|
|
785
|
-
let SwcAppOList = class SwcAppOList extends SwcAppMixin(HTMLOListElement) {
|
|
786
|
-
};
|
|
787
|
-
SwcAppOList = __decorate([
|
|
788
|
-
elementDefine("swc-app-ol", { extends: "ol", window: w })
|
|
789
|
-
], SwcAppOList);
|
|
790
|
-
let SwcAppOptGroup = class SwcAppOptGroup extends SwcAppMixin(HTMLOptGroupElement) {
|
|
791
|
-
};
|
|
792
|
-
SwcAppOptGroup = __decorate([
|
|
793
|
-
elementDefine("swc-app-optgroup", { extends: "optgroup", window: w })
|
|
794
|
-
], SwcAppOptGroup);
|
|
795
|
-
let SwcAppOption = class SwcAppOption extends SwcAppMixin(HTMLOptionElement) {
|
|
796
|
-
};
|
|
797
|
-
SwcAppOption = __decorate([
|
|
798
|
-
elementDefine("swc-app-option", { extends: "option", window: w })
|
|
799
|
-
], SwcAppOption);
|
|
800
|
-
let SwcAppOutput = class SwcAppOutput extends SwcAppMixin(HTMLOutputElement) {
|
|
801
|
-
};
|
|
802
|
-
SwcAppOutput = __decorate([
|
|
803
|
-
elementDefine("swc-app-output", { extends: "output", window: w })
|
|
804
|
-
], SwcAppOutput);
|
|
805
|
-
let SwcAppParagraph = class SwcAppParagraph extends SwcAppMixin(HTMLParagraphElement) {
|
|
806
|
-
};
|
|
807
|
-
SwcAppParagraph = __decorate([
|
|
808
|
-
elementDefine("swc-app-p", { extends: "p", window: w })
|
|
809
|
-
], SwcAppParagraph);
|
|
810
|
-
let SwcAppParam = class SwcAppParam extends SwcAppMixin(HTMLParamElement) {
|
|
811
|
-
};
|
|
812
|
-
SwcAppParam = __decorate([
|
|
813
|
-
elementDefine("swc-app-param", { extends: "param", window: w })
|
|
814
|
-
], SwcAppParam);
|
|
815
|
-
let SwcAppPicture = class SwcAppPicture extends SwcAppMixin(HTMLPictureElement) {
|
|
816
|
-
};
|
|
817
|
-
SwcAppPicture = __decorate([
|
|
818
|
-
elementDefine("swc-app-picture", { extends: "picture", window: w })
|
|
819
|
-
], SwcAppPicture);
|
|
820
|
-
let SwcAppPre = class SwcAppPre extends SwcAppMixin(HTMLPreElement) {
|
|
821
|
-
};
|
|
822
|
-
SwcAppPre = __decorate([
|
|
823
|
-
elementDefine("swc-app-pre", { extends: "pre", window: w })
|
|
824
|
-
], SwcAppPre);
|
|
825
|
-
let SwcAppProgress = class SwcAppProgress extends SwcAppMixin(HTMLProgressElement) {
|
|
826
|
-
};
|
|
827
|
-
SwcAppProgress = __decorate([
|
|
828
|
-
elementDefine("swc-app-progress", { extends: "progress", window: w })
|
|
829
|
-
], SwcAppProgress);
|
|
830
|
-
let SwcAppQuote = class SwcAppQuote extends SwcAppMixin(HTMLQuoteElement) {
|
|
831
|
-
};
|
|
832
|
-
SwcAppQuote = __decorate([
|
|
833
|
-
elementDefine("swc-app-blockquote", { extends: "blockquote", window: w })
|
|
834
|
-
], SwcAppQuote);
|
|
835
|
-
let SwcAppScript = class SwcAppScript extends SwcAppMixin(HTMLScriptElement) {
|
|
836
|
-
};
|
|
837
|
-
SwcAppScript = __decorate([
|
|
838
|
-
elementDefine("swc-app-script", { extends: "script", window: w })
|
|
839
|
-
], SwcAppScript);
|
|
840
|
-
let SwcAppSelect = class SwcAppSelect extends SwcAppMixin(HTMLSelectElement) {
|
|
841
|
-
};
|
|
842
|
-
SwcAppSelect = __decorate([
|
|
843
|
-
elementDefine("swc-app-select", { extends: "select", window: w })
|
|
844
|
-
], SwcAppSelect);
|
|
845
|
-
let SwcAppSlot = class SwcAppSlot extends SwcAppMixin(HTMLSlotElement) {
|
|
846
|
-
};
|
|
847
|
-
SwcAppSlot = __decorate([
|
|
848
|
-
elementDefine("swc-app-slot", { extends: "slot", window: w })
|
|
849
|
-
], SwcAppSlot);
|
|
850
|
-
let SwcAppSource = class SwcAppSource extends SwcAppMixin(HTMLSourceElement) {
|
|
851
|
-
};
|
|
852
|
-
SwcAppSource = __decorate([
|
|
853
|
-
elementDefine("swc-app-source", { extends: "source", window: w })
|
|
854
|
-
], SwcAppSource);
|
|
855
|
-
let SwcAppSpan = class SwcAppSpan extends SwcAppMixin(HTMLSpanElement) {
|
|
856
|
-
};
|
|
857
|
-
SwcAppSpan = __decorate([
|
|
858
|
-
elementDefine("swc-app-span", { extends: "span", window: w })
|
|
859
|
-
], SwcAppSpan);
|
|
860
|
-
let SwcAppStyle = class SwcAppStyle extends SwcAppMixin(HTMLStyleElement) {
|
|
861
|
-
};
|
|
862
|
-
SwcAppStyle = __decorate([
|
|
863
|
-
elementDefine("swc-app-style", { extends: "style", window: w })
|
|
864
|
-
], SwcAppStyle);
|
|
865
|
-
let SwcAppTable = class SwcAppTable extends SwcAppMixin(HTMLTableElement) {
|
|
866
|
-
};
|
|
867
|
-
SwcAppTable = __decorate([
|
|
868
|
-
elementDefine("swc-app-table", { extends: "table", window: w })
|
|
869
|
-
], SwcAppTable);
|
|
870
|
-
let SwcAppTableSection = class SwcAppTableSection extends SwcAppMixin(HTMLTableSectionElement) {
|
|
871
|
-
};
|
|
872
|
-
SwcAppTableSection = __decorate([
|
|
873
|
-
elementDefine("swc-app-tbody", { extends: "tbody", window: w })
|
|
874
|
-
], SwcAppTableSection);
|
|
875
|
-
let SwcAppTableCell = class SwcAppTableCell extends SwcAppMixin(HTMLTableCellElement) {
|
|
876
|
-
};
|
|
877
|
-
SwcAppTableCell = __decorate([
|
|
878
|
-
elementDefine("swc-app-td", { extends: "td", window: w })
|
|
879
|
-
], SwcAppTableCell);
|
|
880
|
-
let SwcAppTemplate = class SwcAppTemplate extends SwcAppMixin(HTMLTemplateElement) {
|
|
881
|
-
};
|
|
882
|
-
SwcAppTemplate = __decorate([
|
|
883
|
-
elementDefine("swc-app-template", { extends: "template", window: w })
|
|
884
|
-
], SwcAppTemplate);
|
|
885
|
-
let SwcAppTextArea = class SwcAppTextArea extends SwcAppMixin(HTMLTextAreaElement) {
|
|
886
|
-
};
|
|
887
|
-
SwcAppTextArea = __decorate([
|
|
888
|
-
elementDefine("swc-app-textarea", { extends: "textarea", window: w })
|
|
889
|
-
], SwcAppTextArea);
|
|
890
|
-
let SwcAppTime = class SwcAppTime extends SwcAppMixin(HTMLTimeElement) {
|
|
891
|
-
};
|
|
892
|
-
SwcAppTime = __decorate([
|
|
893
|
-
elementDefine("swc-app-time", { extends: "time", window: w })
|
|
894
|
-
], SwcAppTime);
|
|
895
|
-
let SwcAppTitle = class SwcAppTitle extends SwcAppMixin(HTMLTitleElement) {
|
|
896
|
-
};
|
|
897
|
-
SwcAppTitle = __decorate([
|
|
898
|
-
elementDefine("swc-app-title", { extends: "title", window: w })
|
|
899
|
-
], SwcAppTitle);
|
|
900
|
-
let SwcAppTableRow = class SwcAppTableRow extends SwcAppMixin(HTMLTableRowElement) {
|
|
901
|
-
};
|
|
902
|
-
SwcAppTableRow = __decorate([
|
|
903
|
-
elementDefine("swc-app-tr", { extends: "tr", window: w })
|
|
904
|
-
], SwcAppTableRow);
|
|
905
|
-
let SwcAppTrack = class SwcAppTrack extends SwcAppMixin(HTMLTrackElement) {
|
|
906
|
-
};
|
|
907
|
-
SwcAppTrack = __decorate([
|
|
908
|
-
elementDefine("swc-app-track", { extends: "track", window: w })
|
|
909
|
-
], SwcAppTrack);
|
|
910
|
-
let SwcAppUList = class SwcAppUList extends SwcAppMixin(HTMLUListElement) {
|
|
911
|
-
};
|
|
912
|
-
SwcAppUList = __decorate([
|
|
913
|
-
elementDefine("swc-app-ul", { extends: "ul", window: w })
|
|
914
|
-
], SwcAppUList);
|
|
915
|
-
let SwcAppVideo = class SwcAppVideo extends SwcAppMixin(HTMLVideoElement) {
|
|
916
|
-
};
|
|
917
|
-
SwcAppVideo = __decorate([
|
|
918
|
-
elementDefine("swc-app-video", { extends: "video", window: w })
|
|
919
|
-
], SwcAppVideo);
|
|
920
|
-
let SwcAppHeading = class SwcAppHeading extends SwcAppMixin(HTMLHeadingElement) {
|
|
921
|
-
};
|
|
922
|
-
SwcAppHeading = __decorate([
|
|
923
|
-
elementDefine("swc-app-h1", { extends: "h1", window: w })
|
|
924
|
-
], SwcAppHeading);
|
|
925
|
-
let SwcAppBody = class SwcAppBody extends SwcAppMixin(HTMLBodyElement) {
|
|
926
|
-
};
|
|
927
|
-
SwcAppBody = __decorate([
|
|
928
|
-
elementDefine("swc-app-body", { extends: "body", window: w })
|
|
929
|
-
], SwcAppBody);
|
|
930
|
-
return {
|
|
931
|
-
// Sub Templates
|
|
932
|
-
SwcLoading,
|
|
933
|
-
SwcError,
|
|
934
|
-
SwcSuccess,
|
|
935
|
-
SwcWhen,
|
|
936
|
-
SwcOtherwise,
|
|
937
|
-
SwcDefault,
|
|
938
|
-
// Core Elements
|
|
939
|
-
SwcApp,
|
|
940
|
-
SwcIf,
|
|
941
|
-
SwcLoop,
|
|
942
|
-
SwcChoose,
|
|
943
|
-
SwcAsync,
|
|
944
|
-
// App Elements
|
|
945
|
-
SwcAppAnchor,
|
|
946
|
-
SwcAppArea,
|
|
947
|
-
SwcAppAudio,
|
|
948
|
-
SwcAppBase,
|
|
949
|
-
SwcAppButton,
|
|
950
|
-
SwcAppCanvas,
|
|
951
|
-
SwcAppData,
|
|
952
|
-
SwcAppDataList,
|
|
953
|
-
SwcAppDetails,
|
|
954
|
-
SwcAppDialog,
|
|
955
|
-
SwcAppDiv,
|
|
956
|
-
SwcAppDList,
|
|
957
|
-
SwcAppEmbed,
|
|
958
|
-
SwcAppFieldSet,
|
|
959
|
-
SwcAppForm,
|
|
960
|
-
SwcAppHR,
|
|
961
|
-
SwcAppIFrame,
|
|
962
|
-
SwcAppImage,
|
|
963
|
-
SwcAppInput,
|
|
964
|
-
SwcAppLabel,
|
|
965
|
-
SwcAppLegend,
|
|
966
|
-
SwcAppLI,
|
|
967
|
-
SwcAppLink,
|
|
968
|
-
SwcAppMap,
|
|
969
|
-
SwcAppMeta,
|
|
970
|
-
SwcAppMeter,
|
|
971
|
-
SwcAppMod,
|
|
972
|
-
SwcAppObject,
|
|
973
|
-
SwcAppOList,
|
|
974
|
-
SwcAppOptGroup,
|
|
975
|
-
SwcAppOption,
|
|
976
|
-
SwcAppOutput,
|
|
977
|
-
SwcAppParagraph,
|
|
978
|
-
SwcAppParam,
|
|
979
|
-
SwcAppPicture,
|
|
980
|
-
SwcAppPre,
|
|
981
|
-
SwcAppProgress,
|
|
982
|
-
SwcAppQuote,
|
|
983
|
-
SwcAppScript,
|
|
984
|
-
SwcAppSelect,
|
|
985
|
-
SwcAppSlot,
|
|
986
|
-
SwcAppSource,
|
|
987
|
-
SwcAppSpan,
|
|
988
|
-
SwcAppStyle,
|
|
989
|
-
SwcAppTable,
|
|
990
|
-
SwcAppTableSection,
|
|
991
|
-
SwcAppTableCell,
|
|
992
|
-
SwcAppTemplate,
|
|
993
|
-
SwcAppTextArea,
|
|
994
|
-
SwcAppTime,
|
|
995
|
-
SwcAppTitle,
|
|
996
|
-
SwcAppTableRow,
|
|
997
|
-
SwcAppTrack,
|
|
998
|
-
SwcAppUList,
|
|
999
|
-
SwcAppVideo,
|
|
1000
|
-
SwcAppHeading,
|
|
1001
|
-
SwcAppBody
|
|
1002
|
-
};
|
|
1003
|
-
};
|
|
1004
|
-
export {
|
|
1005
|
-
registerAllElements
|
|
1006
|
-
};
|
|
1007
|
-
//# sourceMappingURL=register.js.map
|