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