@dooboostore/simple-web-component 1.0.37 → 1.0.38
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 +384 -93
- package/dist/cjs/SwcAppEngine.js +3 -0
- package/dist/cjs/SwcAppEngine.js.map +2 -2
- package/dist/cjs/decorators/addEventListener.js +20 -4
- package/dist/cjs/decorators/addEventListener.js.map +2 -2
- package/dist/cjs/decorators/applyAttribute.js.map +1 -1
- package/dist/cjs/decorators/applyClass.js.map +1 -1
- package/dist/cjs/decorators/applyNode.js +97 -15
- package/dist/cjs/decorators/applyNode.js.map +2 -2
- package/dist/cjs/decorators/applySlot.js +16 -9
- package/dist/cjs/decorators/applySlot.js.map +2 -2
- package/dist/cjs/decorators/applyStyle.js.map +2 -2
- package/dist/cjs/decorators/attribute.js.map +1 -1
- package/dist/cjs/decorators/elementDefine.js +68 -38
- package/dist/cjs/decorators/elementDefine.js.map +2 -2
- package/dist/cjs/decorators/emitCustomEvent.js.map +1 -1
- package/dist/cjs/decorators/index.js +1 -0
- package/dist/cjs/decorators/index.js.map +2 -2
- package/dist/cjs/decorators/lifecycles.js +47 -31
- package/dist/cjs/decorators/lifecycles.js.map +3 -3
- package/dist/cjs/decorators/publishSwcAppMessage.js.map +2 -2
- package/dist/cjs/decorators/query.js +1 -1
- package/dist/cjs/decorators/query.js.map +2 -2
- package/dist/cjs/decorators/queryAll.js.map +1 -1
- package/dist/cjs/decorators/setProperty.js.map +1 -1
- package/dist/cjs/decorators/state.js +84 -0
- package/dist/cjs/decorators/state.js.map +7 -0
- package/dist/cjs/decorators/subscribeSwcAppMessageWhileConnected.js.map +1 -1
- package/dist/cjs/decorators/subscribeSwcAppRouteChangeWhileConnected.js.map +2 -2
- package/dist/cjs/elements/SwcApp.js +193 -305
- package/dist/cjs/elements/SwcApp.js.map +3 -3
- package/dist/cjs/elements/SwcAppMixin.js +291 -0
- package/dist/cjs/elements/SwcAppMixin.js.map +7 -0
- package/dist/cjs/elements/index.js +3 -21
- package/dist/cjs/elements/index.js.map +3 -3
- package/dist/cjs/index.js +1 -3
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/{types.js → types/index.js} +1 -1
- package/dist/cjs/types/index.js.map +7 -0
- package/dist/cjs/types/window.d.js.map +1 -1
- package/dist/cjs/utils/Utils.js +159 -20
- package/dist/cjs/utils/Utils.js.map +3 -3
- package/dist/esm/SwcAppEngine.js +3 -0
- package/dist/esm/SwcAppEngine.js.map +2 -2
- package/dist/esm/decorators/addEventListener.js +20 -4
- package/dist/esm/decorators/addEventListener.js.map +2 -2
- package/dist/esm/decorators/applyAttribute.js.map +1 -1
- package/dist/esm/decorators/applyClass.js.map +1 -1
- package/dist/esm/decorators/applyNode.js +97 -15
- package/dist/esm/decorators/applyNode.js.map +2 -2
- package/dist/esm/decorators/applySlot.js +16 -9
- package/dist/esm/decorators/applySlot.js.map +2 -2
- package/dist/esm/decorators/applyStyle.js.map +2 -2
- package/dist/esm/decorators/attribute.js.map +1 -1
- package/dist/esm/decorators/elementDefine.js +72 -42
- package/dist/esm/decorators/elementDefine.js.map +2 -2
- package/dist/esm/decorators/emitCustomEvent.js.map +1 -1
- package/dist/esm/decorators/index.js +1 -0
- package/dist/esm/decorators/index.js.map +2 -2
- package/dist/esm/decorators/lifecycles.js +47 -31
- package/dist/esm/decorators/lifecycles.js.map +3 -3
- package/dist/esm/decorators/publishSwcAppMessage.js.map +2 -2
- package/dist/esm/decorators/query.js +1 -1
- package/dist/esm/decorators/query.js.map +2 -2
- package/dist/esm/decorators/queryAll.js.map +1 -1
- package/dist/esm/decorators/setProperty.js.map +1 -1
- package/dist/esm/decorators/state.js +65 -0
- package/dist/esm/decorators/state.js.map +7 -0
- package/dist/esm/decorators/subscribeSwcAppMessageWhileConnected.js.map +1 -1
- package/dist/esm/decorators/subscribeSwcAppRouteChangeWhileConnected.js.map +2 -2
- package/dist/esm/elements/SwcApp.js +195 -307
- package/dist/esm/elements/SwcApp.js.map +3 -3
- package/dist/esm/elements/SwcAppMixin.js +273 -0
- package/dist/esm/elements/SwcAppMixin.js.map +7 -0
- package/dist/esm/elements/index.js +2 -7
- package/dist/esm/elements/index.js.map +2 -2
- package/dist/esm/index.js +2 -4
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/{types.js → types/index.js} +1 -1
- package/dist/esm/types/index.js.map +7 -0
- package/dist/esm/utils/Utils.js +159 -20
- package/dist/esm/utils/Utils.js.map +3 -3
- package/dist/esm-bundle/dooboostore-simple-web-component.esm.js +3356 -2477
- package/dist/esm-bundle/dooboostore-simple-web-component.esm.js.map +4 -4
- package/dist/types/SwcAppEngine.d.ts +1 -1
- package/dist/types/SwcAppEngine.d.ts.map +1 -1
- package/dist/types/decorators/addEventListener.d.ts +5 -2
- package/dist/types/decorators/addEventListener.d.ts.map +1 -1
- package/dist/types/decorators/applyAttribute.d.ts.map +1 -1
- package/dist/types/decorators/applyClass.d.ts.map +1 -1
- package/dist/types/decorators/applyNode.d.ts +22 -6
- package/dist/types/decorators/applyNode.d.ts.map +1 -1
- package/dist/types/decorators/applySlot.d.ts.map +1 -1
- package/dist/types/decorators/applyStyle.d.ts.map +1 -1
- package/dist/types/decorators/attribute.d.ts.map +1 -1
- package/dist/types/decorators/elementDefine.d.ts.map +1 -1
- package/dist/types/decorators/emitCustomEvent.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 +10 -14
- package/dist/types/decorators/lifecycles.d.ts.map +1 -1
- package/dist/types/decorators/publishSwcAppMessage.d.ts.map +1 -1
- package/dist/types/decorators/query.d.ts +1 -1
- package/dist/types/decorators/query.d.ts.map +1 -1
- 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/decorators/state.d.ts +9 -0
- package/dist/types/decorators/state.d.ts.map +1 -0
- package/dist/types/decorators/subscribeSwcAppMessageWhileConnected.d.ts.map +1 -1
- package/dist/types/decorators/subscribeSwcAppRouteChangeWhileConnected.d.ts +5 -1
- package/dist/types/decorators/subscribeSwcAppRouteChangeWhileConnected.d.ts.map +1 -1
- package/dist/types/elements/SwcApp.d.ts +35 -6
- package/dist/types/elements/SwcApp.d.ts.map +1 -1
- package/dist/types/elements/SwcAppMixin.d.ts +405 -0
- package/dist/types/elements/SwcAppMixin.d.ts.map +1 -0
- package/dist/types/elements/index.d.ts +2 -2
- package/dist/types/elements/index.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/{types.d.ts → types/index.d.ts} +11 -11
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/utils/Utils.d.ts +14 -2
- package/dist/types/utils/Utils.d.ts.map +1 -1
- package/dist/umd-bundle/dooboostore-simple-web-component.umd.js +3358 -2479
- package/dist/umd-bundle/dooboostore-simple-web-component.umd.js.map +4 -4
- package/package.json +4 -4
- package/src/SwcAppEngine.ts +6 -2
- package/src/decorators/addEventListener.ts +21 -5
- package/src/decorators/applyAttribute.ts +1 -1
- package/src/decorators/applyClass.ts +1 -1
- package/src/decorators/applyNode.ts +180 -62
- package/src/decorators/applySlot.ts +27 -67
- package/src/decorators/applyStyle.ts +4 -4
- package/src/decorators/attribute.ts +1 -1
- package/src/decorators/elementDefine.ts +110 -58
- package/src/decorators/emitCustomEvent.ts +1 -1
- package/src/decorators/index.ts +2 -0
- package/src/decorators/lifecycles.ts +50 -26
- package/src/decorators/publishSwcAppMessage.ts +2 -3
- package/src/decorators/query.ts +4 -4
- package/src/decorators/queryAll.ts +1 -1
- package/src/decorators/setProperty.ts +1 -1
- package/src/decorators/state.ts +84 -0
- package/src/decorators/subscribeSwcAppMessageWhileConnected.ts +1 -1
- package/src/decorators/subscribeSwcAppRouteChangeWhileConnected.ts +4 -3
- package/src/elements/SwcApp.ts +239 -441
- package/src/elements/SwcAppMixin.ts +328 -0
- package/src/elements/index.ts +2 -9
- package/src/index.ts +2 -4
- package/src/{types.ts → types/index.ts} +13 -10
- package/src/types/window.d.ts +3 -0
- package/src/utils/Utils.ts +205 -20
- package/dist/cjs/types.js.map +0 -7
- package/dist/esm/types.js.map +0 -7
- package/dist/types/types.d.ts.map +0 -1
|
@@ -4,321 +4,209 @@ var __decorate = function(decorators, target, key, desc) {
|
|
|
4
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
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { elementDefine
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
return
|
|
7
|
+
import { elementDefine } from "../decorators/index.js";
|
|
8
|
+
import { SwcAppMixin } from "./SwcAppMixin.js";
|
|
9
|
+
import { createElement } from "../utils/Utils.js";
|
|
10
|
+
const swcAppTagName = "swc-app";
|
|
11
|
+
const SwcApp = (w, data) => {
|
|
12
|
+
return createElement(w, swcAppTagName, data);
|
|
13
13
|
};
|
|
14
|
-
const
|
|
15
|
-
|
|
14
|
+
const defineSwcApp = async (w) => {
|
|
15
|
+
const existing = w.customElements.get(swcAppTagName);
|
|
16
|
+
if (existing)
|
|
17
|
+
return existing;
|
|
18
|
+
let SwcAppImpl = class SwcAppImpl extends SwcAppMixin(w.HTMLElement) {
|
|
19
|
+
};
|
|
20
|
+
SwcAppImpl = __decorate([
|
|
21
|
+
elementDefine(swcAppTagName, { window: w })
|
|
22
|
+
], SwcAppImpl);
|
|
23
|
+
return w.customElements.whenDefined(swcAppTagName);
|
|
24
|
+
};
|
|
25
|
+
const swcAppBodyTagName = "swc-app-body";
|
|
26
|
+
const SwcAppBody = (w, data) => {
|
|
27
|
+
return createElement(w, swcAppBodyTagName, data);
|
|
28
|
+
};
|
|
29
|
+
const defineSwcAppBody = async (w) => {
|
|
30
|
+
const existing = w.customElements.get(swcAppBodyTagName);
|
|
31
|
+
if (existing)
|
|
32
|
+
return existing;
|
|
33
|
+
let SwcAppBodyImpl = class SwcAppBodyImpl extends SwcAppMixin(w.HTMLBodyElement) {
|
|
34
|
+
};
|
|
35
|
+
SwcAppBodyImpl = __decorate([
|
|
36
|
+
elementDefine(swcAppBodyTagName, { window: w, extends: "body" })
|
|
37
|
+
], SwcAppBodyImpl);
|
|
38
|
+
return w.customElements.whenDefined(swcAppBodyTagName);
|
|
39
|
+
};
|
|
40
|
+
const swcAppDivTagName = "swc-app-div";
|
|
41
|
+
const SwcAppDiv = (w, data) => {
|
|
42
|
+
return createElement(w, swcAppDivTagName, data);
|
|
43
|
+
};
|
|
44
|
+
const defineSwcAppDiv = async (w) => {
|
|
45
|
+
const existing = w.customElements.get(swcAppDivTagName);
|
|
46
|
+
if (existing)
|
|
47
|
+
return existing;
|
|
48
|
+
let SwcAppDivImpl = class SwcAppDivImpl extends SwcAppMixin(w.HTMLDivElement) {
|
|
49
|
+
};
|
|
50
|
+
SwcAppDivImpl = __decorate([
|
|
51
|
+
elementDefine(swcAppDivTagName, { window: w, extends: "div" })
|
|
52
|
+
], SwcAppDivImpl);
|
|
53
|
+
return w.customElements.whenDefined(swcAppDivTagName);
|
|
54
|
+
};
|
|
55
|
+
const swcAppSectionTagName = "swc-app-section";
|
|
56
|
+
const SwcAppSection = (w, data) => {
|
|
57
|
+
return createElement(w, swcAppSectionTagName, data);
|
|
58
|
+
};
|
|
59
|
+
const defineSwcAppSection = async (w) => {
|
|
60
|
+
const existing = w.customElements.get(swcAppSectionTagName);
|
|
61
|
+
if (existing)
|
|
62
|
+
return existing;
|
|
63
|
+
let SwcAppSectionImpl = class SwcAppSectionImpl extends SwcAppMixin(w.HTMLElement) {
|
|
64
|
+
};
|
|
65
|
+
SwcAppSectionImpl = __decorate([
|
|
66
|
+
elementDefine(swcAppSectionTagName, { window: w, extends: "section" })
|
|
67
|
+
], SwcAppSectionImpl);
|
|
68
|
+
return w.customElements.whenDefined(swcAppSectionTagName);
|
|
69
|
+
};
|
|
70
|
+
const swcAppMainTagName = "swc-app-main";
|
|
71
|
+
const SwcAppMain = (w, data) => {
|
|
72
|
+
return createElement(w, swcAppMainTagName, data);
|
|
73
|
+
};
|
|
74
|
+
const defineSwcAppMain = async (w) => {
|
|
75
|
+
const existing = w.customElements.get(swcAppMainTagName);
|
|
76
|
+
if (existing)
|
|
77
|
+
return existing;
|
|
78
|
+
let SwcAppMainImpl = class SwcAppMainImpl extends SwcAppMixin(w.HTMLElement) {
|
|
79
|
+
};
|
|
80
|
+
SwcAppMainImpl = __decorate([
|
|
81
|
+
elementDefine(swcAppMainTagName, { window: w, extends: "main" })
|
|
82
|
+
], SwcAppMainImpl);
|
|
83
|
+
return w.customElements.whenDefined(swcAppMainTagName);
|
|
84
|
+
};
|
|
85
|
+
const swcAppArticleTagName = "swc-app-article";
|
|
86
|
+
const SwcAppArticle = (w, data) => {
|
|
87
|
+
return createElement(w, swcAppArticleTagName, data);
|
|
88
|
+
};
|
|
89
|
+
const defineSwcAppArticle = async (w) => {
|
|
90
|
+
const existing = w.customElements.get(swcAppArticleTagName);
|
|
91
|
+
if (existing)
|
|
92
|
+
return existing;
|
|
93
|
+
let SwcAppArticleImpl = class SwcAppArticleImpl extends SwcAppMixin(w.HTMLElement) {
|
|
94
|
+
};
|
|
95
|
+
SwcAppArticleImpl = __decorate([
|
|
96
|
+
elementDefine(swcAppArticleTagName, { window: w, extends: "article" })
|
|
97
|
+
], SwcAppArticleImpl);
|
|
98
|
+
return w.customElements.whenDefined(swcAppArticleTagName);
|
|
99
|
+
};
|
|
100
|
+
const swcAppHeaderTagName = "swc-app-header";
|
|
101
|
+
const SwcAppHeader = (w, data) => {
|
|
102
|
+
return createElement(w, swcAppHeaderTagName, data);
|
|
103
|
+
};
|
|
104
|
+
const defineSwcAppHeader = async (w) => {
|
|
105
|
+
const existing = w.customElements.get(swcAppHeaderTagName);
|
|
106
|
+
if (existing)
|
|
107
|
+
return existing;
|
|
108
|
+
let SwcAppHeaderImpl = class SwcAppHeaderImpl extends SwcAppMixin(w.HTMLElement) {
|
|
109
|
+
};
|
|
110
|
+
SwcAppHeaderImpl = __decorate([
|
|
111
|
+
elementDefine(swcAppHeaderTagName, { window: w, extends: "header" })
|
|
112
|
+
], SwcAppHeaderImpl);
|
|
113
|
+
return w.customElements.whenDefined(swcAppHeaderTagName);
|
|
16
114
|
};
|
|
17
|
-
const
|
|
18
|
-
|
|
115
|
+
const swcAppFooterTagName = "swc-app-footer";
|
|
116
|
+
const SwcAppFooter = (w, data) => {
|
|
117
|
+
return createElement(w, swcAppFooterTagName, data);
|
|
19
118
|
};
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
const existing = w.customElements.get(tagName);
|
|
119
|
+
const defineSwcAppFooter = async (w) => {
|
|
120
|
+
const existing = w.customElements.get(swcAppFooterTagName);
|
|
23
121
|
if (existing)
|
|
24
122
|
return existing;
|
|
25
|
-
let
|
|
26
|
-
constructor() {
|
|
27
|
-
super(...arguments);
|
|
28
|
-
this.__swc_engine = new SwcAppEngine(this);
|
|
29
|
-
this._swc_connected_instance = /* @__PURE__ */ new Set();
|
|
30
|
-
this._routeChangeInvocations = 0;
|
|
31
|
-
this._connectedInvocations = 0;
|
|
32
|
-
this._connected_safari_and_standby = [];
|
|
33
|
-
}
|
|
34
|
-
get simpleApplication() {
|
|
35
|
-
return this.__swc_engine.simpleApplication;
|
|
36
|
-
}
|
|
37
|
-
get config() {
|
|
38
|
-
return this.__swc_engine?.config;
|
|
39
|
-
}
|
|
40
|
-
get router() {
|
|
41
|
-
return this.__swc_engine?.router;
|
|
42
|
-
}
|
|
43
|
-
async _invokeRouteChangeSubscribers(instance, re) {
|
|
44
|
-
if (instance.isConnected === false)
|
|
45
|
-
return;
|
|
46
|
-
this._routeChangeInvocations++;
|
|
47
|
-
if (this._childrenRouteChangedInterval) {
|
|
48
|
-
this.config.window.clearInterval(this._childrenRouteChangedInterval);
|
|
49
|
-
}
|
|
50
|
-
const intervalConfig = { setInterval: this.config.window.setInterval.bind(this.config.window), clearInterval: this.config.window.clearInterval.bind(this.config.window) };
|
|
51
|
-
this._childrenRouteChangedInterval = debounceTimeIntervalLock(
|
|
52
|
-
() => this._routeChangeInvocations === 0,
|
|
53
|
-
() => {
|
|
54
|
-
this._childrenRouteChangedInterval = null;
|
|
55
|
-
this.config.onChildrenRouteChanged?.(re, this);
|
|
56
|
-
},
|
|
57
|
-
this.config?.childrenConnectedDoneCheckIntervalTime ?? 30,
|
|
58
|
-
intervalConfig
|
|
59
|
-
// {setInterval: window.setInterval, clearInterval: window.clearInterval}
|
|
60
|
-
);
|
|
61
|
-
try {
|
|
62
|
-
const routeChangeSubscribers = getSubscribeSwcAppRouteChangeWhileConnectedMetadata(instance);
|
|
63
|
-
if (routeChangeSubscribers && Array.isArray(routeChangeSubscribers)) {
|
|
64
|
-
const ps = routeChangeSubscribers.map(async (metadata) => {
|
|
65
|
-
const methodName = metadata.propertyKey;
|
|
66
|
-
let pathPattern = metadata.options?.path;
|
|
67
|
-
const filter = metadata.options?.filter;
|
|
68
|
-
if (typeof pathPattern === "function") {
|
|
69
|
-
pathPattern = pathPattern(instance);
|
|
70
|
-
}
|
|
71
|
-
let pathMatched = false;
|
|
72
|
-
let pathData = null;
|
|
73
|
-
if (!pathPattern) {
|
|
74
|
-
pathMatched = true;
|
|
75
|
-
pathData = {};
|
|
76
|
-
} else if (Array.isArray(pathPattern)) {
|
|
77
|
-
for (const pattern of pathPattern) {
|
|
78
|
-
const data = SwcUtils.parsePathPattern(pattern, re.path || "/");
|
|
79
|
-
if (data !== null) {
|
|
80
|
-
pathMatched = true;
|
|
81
|
-
pathData = data;
|
|
82
|
-
break;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
} else {
|
|
86
|
-
pathData = SwcUtils.parsePathPattern(pathPattern, re.path || "/");
|
|
87
|
-
pathMatched = pathData !== null;
|
|
88
|
-
}
|
|
89
|
-
const filterPassed = !filter || filter(this.router, instance);
|
|
90
|
-
if (pathMatched && filterPassed && instance[methodName]) {
|
|
91
|
-
await instance[methodName]({ ...re, pathData });
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
await Promise.allSettled(ps);
|
|
95
|
-
}
|
|
96
|
-
} finally {
|
|
97
|
-
if (this.config?.ssr) {
|
|
98
|
-
setSSRAttribute(instance);
|
|
99
|
-
} else {
|
|
100
|
-
removeSSRAttribute(instance);
|
|
101
|
-
}
|
|
102
|
-
this._routeChangeInvocations = Math.max(0, this._routeChangeInvocations - 1);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
async _connected(instance, option) {
|
|
106
|
-
if (instance) {
|
|
107
|
-
if (!this.simpleApplication && !this.config) {
|
|
108
|
-
this._connected_safari_and_standby.push(instance);
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
this.config.onConnectedChildBefore?.(instance);
|
|
112
|
-
if (!option?.noIncrements) {
|
|
113
|
-
this._connectedInvocations++;
|
|
114
|
-
}
|
|
115
|
-
this._swc_connected_instance.add(instance);
|
|
116
|
-
const connectedSwcAppCallBacks = findAllLifecycleMetadata(instance, ON_CONNECTED_SWC_APP_METADATA_KEY) ?? [];
|
|
117
|
-
for (let connectedSwcAppCallBack of connectedSwcAppCallBacks) {
|
|
118
|
-
await instance?._invokeLifecycleMethod?.(connectedSwcAppCallBack);
|
|
119
|
-
}
|
|
120
|
-
if (this._childrenConnectedDoneInterval) {
|
|
121
|
-
this.config.window.clearInterval(this._childrenConnectedDoneInterval);
|
|
122
|
-
}
|
|
123
|
-
const intervalConfig = { setInterval: this.config.window.setInterval.bind(this.config.window), clearInterval: this.config.window.clearInterval.bind(this.config.window) };
|
|
124
|
-
this._childrenConnectedDoneInterval = debounceTimeIntervalLock(() => this._connectedInvocations === 0, () => {
|
|
125
|
-
this._childrenConnectedDoneInterval = null;
|
|
126
|
-
this.config.onChildrenConnectedDone?.(this);
|
|
127
|
-
}, this.config?.childrenConnectedDoneCheckIntervalTime ?? 30, intervalConfig);
|
|
128
|
-
if (this.simpleApplication) {
|
|
129
|
-
try {
|
|
130
|
-
if (this.router && this._lastRouterEvent) {
|
|
131
|
-
await this._invokeRouteChangeSubscribers(instance, this._lastRouterEvent);
|
|
132
|
-
}
|
|
133
|
-
} catch (e) {
|
|
134
|
-
throw e;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
if (this.config?.ssr) {
|
|
138
|
-
setSSRAttribute(instance);
|
|
139
|
-
} else {
|
|
140
|
-
removeSSRAttribute(instance);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
this.config.onConnectedChildAfter?.(instance);
|
|
144
|
-
return this;
|
|
145
|
-
}
|
|
146
|
-
async _connectedDone(instance) {
|
|
147
|
-
try {
|
|
148
|
-
} finally {
|
|
149
|
-
this._connectedInvocations = Math.max(0, this._connectedInvocations - 1);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
_disconnected(instance) {
|
|
153
|
-
if (instance) {
|
|
154
|
-
this._swc_connected_instance.delete(instance);
|
|
155
|
-
this.config?.onDisconnectedChildAfter?.(instance);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
async _handleRouteChange(route) {
|
|
159
|
-
this._lastRouterEvent = route;
|
|
160
|
-
const swcConnectedInstance = Array.from(this._swc_connected_instance);
|
|
161
|
-
const ps = swcConnectedInstance.map((instance) => this._invokeRouteChangeSubscribers(instance, route));
|
|
162
|
-
await Promise.allSettled(ps);
|
|
163
|
-
}
|
|
164
|
-
async connect(config) {
|
|
165
|
-
console.log("[SWC] connect");
|
|
166
|
-
const swcConfig = {
|
|
167
|
-
routeType: "element",
|
|
168
|
-
window: config?.window,
|
|
169
|
-
...config
|
|
170
|
-
};
|
|
171
|
-
const mode = config?.connectMode || "direct";
|
|
172
|
-
if (mode === "direct" || mode === "hydrate") {
|
|
173
|
-
this.setAttribute("swc-connect-mode", mode);
|
|
174
|
-
await this.__swc_engine.connect(swcConfig);
|
|
175
|
-
} else if (mode === "swap" || mode === "clear-swap") {
|
|
176
|
-
if (!this.parentNode) {
|
|
177
|
-
await this.__swc_engine.connect(swcConfig);
|
|
178
|
-
this.setAttribute("swc-connect-mode", "direct");
|
|
179
|
-
} else {
|
|
180
|
-
const clonedApp = this.cloneNode(mode === "swap");
|
|
181
|
-
clonedApp.style.display = "none";
|
|
182
|
-
this.parentNode.insertBefore(clonedApp, this.nextSibling);
|
|
183
|
-
try {
|
|
184
|
-
await clonedApp.connect({ ...config || {}, connectMode: "direct" });
|
|
185
|
-
if (this.parentNode) {
|
|
186
|
-
this.parentNode.removeChild(this);
|
|
187
|
-
}
|
|
188
|
-
clonedApp.style.display = "";
|
|
189
|
-
clonedApp.setAttribute("swc-connect-mode", mode);
|
|
190
|
-
return;
|
|
191
|
-
} catch (e) {
|
|
192
|
-
if (clonedApp.parentNode) {
|
|
193
|
-
clonedApp.parentNode.removeChild(clonedApp);
|
|
194
|
-
}
|
|
195
|
-
await this.__swc_engine.connect(swcConfig);
|
|
196
|
-
this.setAttribute("swc-connect-mode", "direct");
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
this._connected_safari_and_standby.forEach((instance) => {
|
|
201
|
-
this._connected(instance, { noIncrements: true });
|
|
202
|
-
});
|
|
203
|
-
if (!this._routerSubscription && this.router) {
|
|
204
|
-
const config2 = this.__swc_engine.config;
|
|
205
|
-
this._routerSubscription = this.router.observable.subscribe(async (route) => {
|
|
206
|
-
console.log("[SWC] Router event received:", route.triggerPoint);
|
|
207
|
-
if (route.triggerPoint === "end") {
|
|
208
|
-
await this._handleRouteChange(route);
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
|
-
if (config2?.path) {
|
|
212
|
-
console.log("[DEBUG] Navigating to initial path:", config2.path);
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
// async _invokeOnConnectedSwcAppStarted(instance: any) {
|
|
217
|
-
// this._swcAppStartedInvocations++;
|
|
218
|
-
// try {
|
|
219
|
-
// // 이미 시작된 인스턴스라면 스킵 (비동기 병렬 중복 호출 방지)
|
|
220
|
-
// if (this._swc_started_instances.has(instance)) return;
|
|
221
|
-
// this._swc_started_instances.add(instance);
|
|
222
|
-
//
|
|
223
|
-
// const startedMethods = findAllLifecycleMetadata(instance, ON_CONNECTED_SWC_APP_METADATA_KEY);
|
|
224
|
-
// if (startedMethods) {
|
|
225
|
-
// const ps = startedMethods.map(m => instance._invokeLifecycleMethod(m));
|
|
226
|
-
// await Promise.allSettled(ps);
|
|
227
|
-
// }
|
|
228
|
-
// } finally {
|
|
229
|
-
// this._swcAppStartedInvocations--;
|
|
230
|
-
// }
|
|
231
|
-
// }
|
|
232
|
-
connectedCallback() {
|
|
233
|
-
if (super.connectedCallback)
|
|
234
|
-
super.connectedCallback();
|
|
235
|
-
const configStr = this.getAttribute("swc-get-application-config");
|
|
236
|
-
const win = this.ownerDocument?.defaultView || window;
|
|
237
|
-
if (configStr && win) {
|
|
238
|
-
try {
|
|
239
|
-
const userConfig = FunctionUtils.executeReturn({
|
|
240
|
-
script: configStr,
|
|
241
|
-
context: this,
|
|
242
|
-
args: SwcUtils.getHelperAndHostSet(win, this)
|
|
243
|
-
});
|
|
244
|
-
this.connect(userConfig);
|
|
245
|
-
} catch (e) {
|
|
246
|
-
console.error("[SWC-APP-ENGINE] Script execution failed:", e);
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
this._connected(this);
|
|
250
|
-
this.__swc_engine?.config?.onConnected?.(this);
|
|
251
|
-
this._connectedDone(this);
|
|
252
|
-
}
|
|
253
|
-
disconnectedCallback() {
|
|
254
|
-
if (super.disconnectedCallback)
|
|
255
|
-
super.disconnectedCallback();
|
|
256
|
-
this._routerSubscription?.unsubscribe();
|
|
257
|
-
this._routerSubscription = void 0;
|
|
258
|
-
this._lastRouterEvent = void 0;
|
|
259
|
-
this.__swc_engine.disconnect();
|
|
260
|
-
this.__swc_engine?.config?.onDisconnected?.(this);
|
|
261
|
-
this._disconnected(this);
|
|
262
|
-
}
|
|
263
|
-
async routing(path) {
|
|
264
|
-
await this.router?.go(path);
|
|
265
|
-
}
|
|
266
|
-
back() {
|
|
267
|
-
this.router?.back();
|
|
268
|
-
}
|
|
269
|
-
forward() {
|
|
270
|
-
this.router?.forward();
|
|
271
|
-
}
|
|
272
|
-
reload() {
|
|
273
|
-
this.router?.reload();
|
|
274
|
-
}
|
|
275
|
-
// async completedSwcApp() {
|
|
276
|
-
// const ss = Array.from(this._swc_connected_instance).flatMap((it) => {
|
|
277
|
-
// const ms = findAllLifecycleMetadata(it, ON_CONNECTED_COMPLETED_SWC_APP_METADATA_KEY) ?? [];
|
|
278
|
-
// return ms.map((sit) => it[sit](this));
|
|
279
|
-
// });
|
|
280
|
-
// await Promise.allSettled(ss);
|
|
281
|
-
// }
|
|
282
|
-
publishMessage(message) {
|
|
283
|
-
this._swc_connected_instance.forEach((instance) => {
|
|
284
|
-
this._invokeMessageSubscribers(instance, message);
|
|
285
|
-
});
|
|
286
|
-
}
|
|
287
|
-
_invokeMessageSubscribers(instance, message) {
|
|
288
|
-
const messageSubscribers = getSubscribeSwcAppMessageWhileConnectedMetadata(instance);
|
|
289
|
-
if (messageSubscribers && Array.isArray(messageSubscribers)) {
|
|
290
|
-
messageSubscribers.forEach((metadata) => {
|
|
291
|
-
const methodName = metadata.propertyKey;
|
|
292
|
-
const messageType = metadata.messageType;
|
|
293
|
-
const filter = metadata.filter;
|
|
294
|
-
let typeMatched = false;
|
|
295
|
-
if (!messageType) {
|
|
296
|
-
typeMatched = true;
|
|
297
|
-
} else if (message.type === messageType) {
|
|
298
|
-
typeMatched = true;
|
|
299
|
-
}
|
|
300
|
-
let filterMatched = true;
|
|
301
|
-
if (filter && typeMatched) {
|
|
302
|
-
filterMatched = filter(message, instance);
|
|
303
|
-
}
|
|
304
|
-
if (typeMatched && filterMatched && typeof instance[methodName] === "function") {
|
|
305
|
-
instance[methodName](message);
|
|
306
|
-
}
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
}
|
|
123
|
+
let SwcAppFooterImpl = class SwcAppFooterImpl extends SwcAppMixin(w.HTMLElement) {
|
|
310
124
|
};
|
|
311
|
-
|
|
312
|
-
elementDefine(
|
|
313
|
-
],
|
|
314
|
-
;
|
|
315
|
-
|
|
125
|
+
SwcAppFooterImpl = __decorate([
|
|
126
|
+
elementDefine(swcAppFooterTagName, { window: w, extends: "footer" })
|
|
127
|
+
], SwcAppFooterImpl);
|
|
128
|
+
return w.customElements.whenDefined(swcAppFooterTagName);
|
|
129
|
+
};
|
|
130
|
+
const swcAppNavTagName = "swc-app-nav";
|
|
131
|
+
const SwcAppNav = (w, data) => {
|
|
132
|
+
return createElement(w, swcAppNavTagName, data);
|
|
133
|
+
};
|
|
134
|
+
const defineSwcAppNav = async (w) => {
|
|
135
|
+
const existing = w.customElements.get(swcAppNavTagName);
|
|
136
|
+
if (existing)
|
|
137
|
+
return existing;
|
|
138
|
+
let SwcAppNavImpl = class SwcAppNavImpl extends SwcAppMixin(w.HTMLElement) {
|
|
139
|
+
};
|
|
140
|
+
SwcAppNavImpl = __decorate([
|
|
141
|
+
elementDefine(swcAppNavTagName, { window: w, extends: "nav" })
|
|
142
|
+
], SwcAppNavImpl);
|
|
143
|
+
return w.customElements.whenDefined(swcAppNavTagName);
|
|
144
|
+
};
|
|
145
|
+
const swcAppAsideTagName = "swc-app-aside";
|
|
146
|
+
const SwcAppAside = (w, data) => {
|
|
147
|
+
return createElement(w, swcAppAsideTagName, data);
|
|
148
|
+
};
|
|
149
|
+
const defineSwcAppAside = async (w) => {
|
|
150
|
+
const existing = w.customElements.get(swcAppAsideTagName);
|
|
151
|
+
if (existing)
|
|
152
|
+
return existing;
|
|
153
|
+
let SwcAppAsideImpl = class SwcAppAsideImpl extends SwcAppMixin(w.HTMLElement) {
|
|
154
|
+
};
|
|
155
|
+
SwcAppAsideImpl = __decorate([
|
|
156
|
+
elementDefine(swcAppAsideTagName, { window: w, extends: "aside" })
|
|
157
|
+
], SwcAppAsideImpl);
|
|
158
|
+
return w.customElements.whenDefined(swcAppAsideTagName);
|
|
159
|
+
};
|
|
160
|
+
const swcAppFactories = [
|
|
161
|
+
defineSwcApp,
|
|
162
|
+
defineSwcAppBody,
|
|
163
|
+
defineSwcAppDiv,
|
|
164
|
+
defineSwcAppSection,
|
|
165
|
+
defineSwcAppMain,
|
|
166
|
+
defineSwcAppArticle,
|
|
167
|
+
defineSwcAppHeader,
|
|
168
|
+
defineSwcAppFooter,
|
|
169
|
+
defineSwcAppNav,
|
|
170
|
+
defineSwcAppAside
|
|
171
|
+
];
|
|
172
|
+
const defineSwcAppAll = async (w) => {
|
|
173
|
+
await Promise.all(swcAppFactories.map((factory) => factory(w)));
|
|
174
|
+
return w.customElements.whenDefined(swcAppTagName);
|
|
316
175
|
};
|
|
176
|
+
var SwcApp_default = defineSwcAppAll;
|
|
317
177
|
export {
|
|
178
|
+
SwcApp,
|
|
179
|
+
SwcAppArticle,
|
|
180
|
+
SwcAppAside,
|
|
181
|
+
SwcAppBody,
|
|
182
|
+
SwcAppDiv,
|
|
183
|
+
SwcAppFooter,
|
|
184
|
+
SwcAppHeader,
|
|
185
|
+
SwcAppMain,
|
|
186
|
+
SwcAppNav,
|
|
187
|
+
SwcAppSection,
|
|
318
188
|
SwcApp_default as default,
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
189
|
+
defineSwcApp,
|
|
190
|
+
defineSwcAppAll,
|
|
191
|
+
defineSwcAppArticle,
|
|
192
|
+
defineSwcAppAside,
|
|
193
|
+
defineSwcAppBody,
|
|
194
|
+
defineSwcAppDiv,
|
|
195
|
+
defineSwcAppFooter,
|
|
196
|
+
defineSwcAppHeader,
|
|
197
|
+
defineSwcAppMain,
|
|
198
|
+
defineSwcAppNav,
|
|
199
|
+
defineSwcAppSection,
|
|
200
|
+
swcAppArticleTagName,
|
|
201
|
+
swcAppAsideTagName,
|
|
202
|
+
swcAppBodyTagName,
|
|
203
|
+
swcAppDivTagName,
|
|
204
|
+
swcAppFactories,
|
|
205
|
+
swcAppFooterTagName,
|
|
206
|
+
swcAppHeaderTagName,
|
|
207
|
+
swcAppMainTagName,
|
|
208
|
+
swcAppNavTagName,
|
|
209
|
+
swcAppSectionTagName,
|
|
210
|
+
swcAppTagName
|
|
323
211
|
};
|
|
324
212
|
//# sourceMappingURL=SwcApp.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/elements/SwcApp.ts"],
|
|
4
|
-
"sourcesContent": ["import {SwcAppInterface, SwcAppMessage} from \"../types\";\nimport {elementDefine, findAllLifecycleMetadata, getSubscribeSwcAppMessageWhileConnectedMetadata, getSubscribeSwcAppRouteChangeWhileConnectedMetadata, ON_CONNECTED_SWC_APP_METADATA_KEY} from \"../decorators\";\nimport {SwcAppEngine, SwcAttributeConfigType, SwcConfigType} from \"../SwcAppEngine\";\nimport {debounceTimeIntervalLock, FunctionUtils, Subscription} from \"@dooboostore/core\";\nimport {RouterEventType} from \"@dooboostore/core-web\";\nimport {SwcUtils} from \"../utils/Utils\";\n\nexport const isSSR = (i: HTMLElement) => {\n return i.hasAttribute('swc-use-ssr');\n}\nexport const setSSRAttribute = (i: HTMLElement) => {\n i.setAttribute('swc-use-ssr', (i as any)._swcId ?? '');\n}\nexport const removeSSRAttribute = (i: HTMLElement) => {\n i.removeAttribute('swc-use-ssr');\n}\n\n\nexport const tagName = 'swc-app';\nexport default async (w: Window) => {\n const existing = w.customElements.get(tagName);\n if (existing) return existing;\n\n @elementDefine(tagName, {window: w})\n class SwcApp extends w.HTMLElement implements SwcAppInterface {\n __swc_engine = new SwcAppEngine(this as any);\n _swc_connected_instance = new Set<any>();\n // _swc_notified_routes = new WeakMap<any, RouterEventType>();\n _routerSubscription?: Subscription;\n _lastRouterEvent?: RouterEventType;\n _routeChangeInvocations = 0;\n _connectedInvocations = 0;\n\n _childrenRouteChangedInterval: any;\n _childrenConnectedDoneInterval: any;\n\n /*\n 사파리 is 일경우\n <script src=\"https://unpkg.com/@ungap/custom-elements\"></script>\n 이걸사용하는데 is 대응하는거다 그런데 이때 처리되는 순서가 크롬이나 표준에서는 부모부터 만들어지고 자식들이 만들어지는데\n 저 polyfill에서는 자식부터 만들어지고 부모가 만들어진다 is일때 아 .. 이문제때문에 자식이 _connected_safari 에 강제로 자기자식넣어준다\n */\n _connected_safari_and_standby = [];\n\n get simpleApplication() {\n return this.__swc_engine.simpleApplication;\n }\n\n get config() {\n return this.__swc_engine?.config;\n }\n\n get router() {\n return this.__swc_engine?.router;\n }\n\n async _invokeRouteChangeSubscribers(instance: HTMLElement, re: RouterEventType) {\n if (instance.isConnected === false) return;\n\n this._routeChangeInvocations++;\n\n if (this._childrenRouteChangedInterval) {\n this.config.window.clearInterval(this._childrenRouteChangedInterval);\n }\n const intervalConfig = {setInterval: this.config.window.setInterval.bind(this.config.window), clearInterval: this.config.window.clearInterval.bind(this.config.window)};\n this._childrenRouteChangedInterval = debounceTimeIntervalLock(\n () => this._routeChangeInvocations === 0,\n () => {\n this._childrenRouteChangedInterval = null;\n this.config.onChildrenRouteChanged?.(re, this)\n },\n this.config?.childrenConnectedDoneCheckIntervalTime ?? 30,\n intervalConfig\n // {setInterval: window.setInterval, clearInterval: window.clearInterval}\n );\n\n\n // debounceTimeIntervalLock({\n // unlockChecker: () => this._routeChangeInvocations === 0,\n // unlocked: () => this.config.onChildrenRouteChanged(re, this)\n // }, {\n // intervalId: this._childrenRouteChangedInterval,\n // setIntervalId: (id) => this._childrenRouteChangedInterval = id,\n // intervalTime: this.config?.childrenRouteChangedCheckIntervalTime ?? 30\n // }, {\n // setInterval: window.setInterval,\n // clearInterval: window.clearInterval\n // });\n\n try {\n // if (this._swc_notified_routes.get(instance) === re) {\n // return;\n // }\n // this._swc_notified_routes.set(instance, re);\n\n const routeChangeSubscribers = getSubscribeSwcAppRouteChangeWhileConnectedMetadata(instance);\n if (routeChangeSubscribers && Array.isArray(routeChangeSubscribers)) {\n const ps = routeChangeSubscribers.map(async metadata => {\n const methodName = metadata.propertyKey;\n let pathPattern = metadata.options?.path as any;\n const filter = metadata.options?.filter;\n\n if (typeof pathPattern === 'function') {\n pathPattern = (pathPattern as Function)(instance);\n }\n\n let pathMatched = false;\n let pathData: any = null;\n\n if (!pathPattern) {\n pathMatched = true;\n pathData = {};\n } else if (Array.isArray(pathPattern)) {\n for (const pattern of pathPattern) {\n const data = SwcUtils.parsePathPattern(pattern, re.path || '/');\n if (data !== null) {\n pathMatched = true;\n pathData = data;\n break;\n }\n }\n } else {\n pathData = SwcUtils.parsePathPattern(pathPattern, re.path || '/');\n pathMatched = pathData !== null;\n }\n\n const filterPassed = !filter || filter(this.router!, instance);\n\n if (pathMatched && filterPassed && instance[methodName]) {\n await instance[methodName]({...re, pathData: pathData});\n }\n });\n await Promise.allSettled(ps);\n }\n } finally {\n if (this.config?.ssr) {\n setSSRAttribute(instance);\n } else {\n removeSSRAttribute(instance);\n }\n this._routeChangeInvocations = Math.max(0, this._routeChangeInvocations - 1);\n }\n }\n\n async _connected(instance: HTMLElement, option?: { noIncrements: boolean }) {\n if (instance) {\n // console.log('_connected-->', instance.tagName, this._connectedInvocations)\n\n if (!this.simpleApplication && !this.config) {\n this._connected_safari_and_standby.push(instance);\n return;\n }\n\n this.config.onConnectedChildBefore?.(instance);\n if (!option?.noIncrements) {\n this._connectedInvocations++;\n }\n this._swc_connected_instance.add(instance);\n\n const connectedSwcAppCallBacks = findAllLifecycleMetadata(instance, ON_CONNECTED_SWC_APP_METADATA_KEY) ?? [];\n for (let connectedSwcAppCallBack of connectedSwcAppCallBacks) {\n await (instance as any)?._invokeLifecycleMethod?.(connectedSwcAppCallBack);\n }\n\n if (this._childrenConnectedDoneInterval) {\n this.config.window.clearInterval(this._childrenConnectedDoneInterval);\n }\n const intervalConfig = {setInterval: this.config.window.setInterval.bind(this.config.window), clearInterval: this.config.window.clearInterval.bind(this.config.window)};\n this._childrenConnectedDoneInterval = debounceTimeIntervalLock(\n () => this._connectedInvocations === 0,\n () => {\n this._childrenConnectedDoneInterval = null;\n this.config.onChildrenConnectedDone?.(this)\n },\n this.config?.childrenConnectedDoneCheckIntervalTime ?? 30,\n intervalConfig\n );\n\n // console.log('onChildConnectedDone-->')\n\n if (this.simpleApplication) {\n try {\n // await this._invokeOnConnectedSwcAppStarted(instance);\n\n if (this.router && this._lastRouterEvent) {\n await this._invokeRouteChangeSubscribers(instance, this._lastRouterEvent!);\n }\n } catch (e) {\n throw e;\n }\n }\n\n if (this.config?.ssr) {\n setSSRAttribute(instance);\n } else {\n removeSSRAttribute(instance);\n }\n }\n\n\n this.config.onConnectedChildAfter?.(instance);\n return this;\n }\n\n async _connectedDone(instance: any) {\n try {\n // 내부 연결 처리 로직이 있다면 여기에 추가\n // console.log('_connectedDone-->', instance, this._connectedInvocations)\n } finally {\n this._connectedInvocations = Math.max(0, this._connectedInvocations - 1);\n }\n }\n\n _disconnected(instance: any) {\n // console.log('_disconnected', instance);\n if (instance) {\n this._swc_connected_instance.delete(instance);\n this.config?.onDisconnectedChildAfter?.(instance);\n // this._swc_notified_routes.delete(instance);\n }\n }\n\n async _handleRouteChange(route: RouterEventType) {\n // Save last router event\n this._lastRouterEvent = route;\n // if (route.triggerPoint === 'end') {\n // Iterate through all connected component instances\n const swcConnectedInstance = Array.from(this._swc_connected_instance);\n // console.log('routing handle-->', swcConnectedInstance)\n const ps = swcConnectedInstance.map((instance: any) => this._invokeRouteChangeSubscribers(instance, route));\n await Promise.allSettled(ps);\n // }\n }\n\n async connect(config?: SwcAttributeConfigType) {\n console.log('[SWC] connect')\n const swcConfig = {\n routeType: 'element',\n window: config?.window,\n ...config\n } as SwcConfigType;\n\n const mode = config?.connectMode || 'direct';\n\n if (mode === 'direct' || mode === 'hydrate') {\n this.setAttribute('swc-connect-mode', mode);\n await this.__swc_engine.connect(swcConfig);\n } else if (mode === 'swap' || mode === 'clear-swap') {\n if (!this.parentNode) {\n // 부모가 없으면 swap을 할 수 없으므로 direct로 폴백합니다.\n await this.__swc_engine.connect(swcConfig);\n this.setAttribute('swc-connect-mode', 'direct');\n } else {\n // 1. 현재 SSR 상태(화면)를 그대로 유지한 채로, 백그라운드용 클론을 만듭니다.\n const clonedApp = this.cloneNode(mode === 'swap') as any; // clear-swap 모드면 자식 노드를 클론하지 않음(false)\n clonedApp.style.display = 'none';\n\n // 2. DOM에 클론을 몰래 붙입니다.\n this.parentNode.insertBefore(clonedApp, this.nextSibling);\n\n try {\n // 3. 클론을 direct 모드로 연결(초기화/렌더링) 시킵니다.\n await clonedApp.connect({...(config || {}), connectMode: 'direct'});\n\n // 4. 클론의 렌더링이 완전히 끝나면, 기존 SSR 화면(this)을 지우고 클론을 보여줍니다.\n if (this.parentNode) {\n this.parentNode.removeChild(this);\n }\n clonedApp.style.display = '';\n clonedApp.setAttribute('swc-connect-mode', mode);\n\n // ★ 매우 중요: 교체가 완료되었으므로 기존 앱(this)은 여기서 즉시 종료하여 불필요한 라우터/이벤트 구독을 막아야 합니다!\n return;\n } catch (e) {\n // 실패 시 클론을 지우고 원본을 direct로 강제 연결합니다.\n if (clonedApp.parentNode) {\n clonedApp.parentNode.removeChild(clonedApp);\n }\n await this.__swc_engine.connect(swcConfig);\n this.setAttribute('swc-connect-mode', 'direct');\n }\n }\n }\n\n // 사파리일떄 예외이다 is 일때 polyfill되는데 이떄 부모부터 만들어지는게 아니라 자식부터 만들어진다 그래서 부모가 만들어질때 자식들이 이미 만들어져있어서 부모가 자식들을 등록해주는 형태로 강제로 등록해준다\n this._connected_safari_and_standby.forEach((instance: any) => {\n // console.log('safari!!!!!!!!!!', instance)\n this._connected(instance, {noIncrements: true});\n // this._swc_connected_instance.add(instance);\n });\n // Invoke @onConnectedSwcApp lifecycle methods on all connected component instances\n // const hostSet = SwcUtils.getHostSet(this as any);\n\n // const scis = Array.from(this._swc_connected_instance);\n // await Promise.allSettled(scis.map(instance => this._invokeOnConnectedSwcAppStarted(instance)));\n\n // this._swc_connected_instance.forEach((instance: any) => {\n // this._invokeOnConnectedSwcAppStarted(instance);\n // });\n\n // Subscribe to router changes after connect\n if (!this._routerSubscription && this.router) {\n const config = this.__swc_engine.config;\n\n this._routerSubscription = this.router.observable.subscribe(async (route: RouterEventType) => {\n console.log('[SWC] Router event received:', route.triggerPoint);\n if (route.triggerPoint === 'end') {\n // 1. 모든 기존 연결된 자식들에게 라우트 이벤트 알림\n await this._handleRouteChange(route);\n }\n });\n\n // Navigate to initial path if specified\n if (config?.path) {\n console.log('[DEBUG] Navigating to initial path:', config.path);\n // this.router.go(config.path);\n }\n }\n }\n\n // async _invokeOnConnectedSwcAppStarted(instance: any) {\n // this._swcAppStartedInvocations++;\n // try {\n // // 이미 시작된 인스턴스라면 스킵 (비동기 병렬 중복 호출 방지)\n // if (this._swc_started_instances.has(instance)) return;\n // this._swc_started_instances.add(instance);\n //\n // const startedMethods = findAllLifecycleMetadata(instance, ON_CONNECTED_SWC_APP_METADATA_KEY);\n // if (startedMethods) {\n // const ps = startedMethods.map(m => instance._invokeLifecycleMethod(m));\n // await Promise.allSettled(ps);\n // }\n // } finally {\n // this._swcAppStartedInvocations--;\n // }\n // }\n\n connectedCallback() {\n // this.innerHTML='';\n // @ts-ignore\n if (super.connectedCallback) super.connectedCallback();\n\n const configStr = this.getAttribute('swc-get-application-config');\n const win = this.ownerDocument?.defaultView || window;\n if (configStr && win) {\n try {\n // console.log('vvvvvvvvvvvvvvvv->>>>', SwcUtils.findNearestSwcHost(this.host), SwcUtils.getHostSet(this.host))\n const userConfig = FunctionUtils.executeReturn({\n script: configStr,\n context: this,\n args: SwcUtils.getHelperAndHostSet(win, this)\n });\n this.connect(userConfig);\n } catch (e) {\n console.error('[SWC-APP-ENGINE] Script execution failed:', e);\n }\n }\n\n // 자기자신은 apphost로 포함이 도지않으니(부모) 내자신은 self로 넣는다\n this._connected(this);\n this.__swc_engine?.config?.onConnected?.(this);\n this._connectedDone(this);\n }\n\n disconnectedCallback() {\n // @ts-ignore\n if (super.disconnectedCallback) super.disconnectedCallback();\n this._routerSubscription?.unsubscribe();\n this._routerSubscription = undefined;\n this._lastRouterEvent = undefined;\n this.__swc_engine.disconnect();\n this.__swc_engine?.config?.onDisconnected?.(this);\n this._disconnected(this);\n }\n\n async routing(path: string) {\n await this.router?.go(path);\n }\n\n back(): void {\n this.router?.back();\n }\n\n forward(): void {\n this.router?.forward();\n }\n\n reload(): void {\n this.router?.reload();\n }\n\n // async completedSwcApp() {\n // const ss = Array.from(this._swc_connected_instance).flatMap((it) => {\n // const ms = findAllLifecycleMetadata(it, ON_CONNECTED_COMPLETED_SWC_APP_METADATA_KEY) ?? [];\n // return ms.map((sit) => it[sit](this));\n // });\n // await Promise.allSettled(ss);\n // }\n\n publishMessage(message: SwcAppMessage): void {\n // 메시지를 모든 connected component instances로 분배\n this._swc_connected_instance.forEach((instance: any) => {\n this._invokeMessageSubscribers(instance, message);\n });\n }\n\n _invokeMessageSubscribers(instance: any, message: SwcAppMessage) {\n const messageSubscribers = getSubscribeSwcAppMessageWhileConnectedMetadata(instance);\n if (messageSubscribers && Array.isArray(messageSubscribers)) {\n messageSubscribers.forEach(metadata => {\n const methodName = metadata.propertyKey;\n const messageType = metadata.messageType;\n const filter = metadata.filter;\n\n // 메시지 타입 확인\n let typeMatched = false;\n if (!messageType) {\n // messageType이 없으면 모든 메시지 매칭 (와일드카드)\n typeMatched = true;\n } else if (message.type === messageType) {\n typeMatched = true;\n }\n\n // 필터 적용\n let filterMatched = true;\n if (filter && typeMatched) {\n filterMatched = filter(message, instance);\n }\n\n // 조건을 만족하면 메서드 호출\n if (typeMatched && filterMatched && typeof instance[methodName] === 'function') {\n instance[methodName](message);\n }\n });\n }\n }\n };\n\n\n return w.customElements.whenDefined(tagName);\n\n\n}"],
|
|
5
|
-
"mappings": ";;;;;;
|
|
6
|
-
"names": [
|
|
4
|
+
"sourcesContent": ["import {elementDefine} from \"../decorators\";\nimport {SwcAppInterface} from \"../types\";\nimport {SwcAppMixin} from \"./SwcAppMixin\";\nimport {SwcUtils, createElement, CreateElementConfig} from \"../utils/Utils\";\n\n// ============================================\n// SwcApp (HTMLElement)\n// ============================================\nexport const swcAppTagName = 'swc-app';\n\nexport const SwcApp = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface>(w, swcAppTagName, data);\n};\n\nexport const defineSwcApp = async (w: Window) => {\n const existing = w.customElements.get(swcAppTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppTagName, {window: w})\n class SwcAppImpl extends SwcAppMixin(w.HTMLElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음\n }\n\n return w.customElements.whenDefined(swcAppTagName);\n};\n\n// ============================================\n// SwcAppBody (HTMLBodyElement)\n// ============================================\nexport const swcAppBodyTagName = 'swc-app-body';\n\nexport const SwcAppBody = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLBodyElement>(w, swcAppBodyTagName, data);\n};\n\nexport const defineSwcAppBody = async (w: Window) => {\n const existing = w.customElements.get(swcAppBodyTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppBodyTagName, {window: w, extends: 'body'})\n class SwcAppBodyImpl extends SwcAppMixin(w.HTMLBodyElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음\n }\n\n return w.customElements.whenDefined(swcAppBodyTagName);\n};\n\n// ============================================\n// SwcAppDiv (HTMLDivElement)\n// ============================================\nexport const swcAppDivTagName = 'swc-app-div';\n\nexport const SwcAppDiv = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLDivElement>(w, swcAppDivTagName, data);\n};\n\nexport const defineSwcAppDiv = async (w: Window) => {\n const existing = w.customElements.get(swcAppDivTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppDivTagName, {window: w, extends: 'div'})\n class SwcAppDivImpl extends SwcAppMixin(w.HTMLDivElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음\n }\n\n return w.customElements.whenDefined(swcAppDivTagName);\n};\n\n// ============================================\n// SwcAppSection (HTMLElement)\n// ============================================\nexport const swcAppSectionTagName = 'swc-app-section';\n\nexport const SwcAppSection = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLElement>(w, swcAppSectionTagName, data);\n};\n\nexport const defineSwcAppSection = async (w: Window) => {\n const existing = w.customElements.get(swcAppSectionTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppSectionTagName, {window: w, extends: 'section'})\n class SwcAppSectionImpl extends SwcAppMixin(w.HTMLElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음\n }\n\n return w.customElements.whenDefined(swcAppSectionTagName);\n};\n\n// ============================================\n// SwcAppMain (HTMLElement)\n// ============================================\nexport const swcAppMainTagName = 'swc-app-main';\n\nexport const SwcAppMain = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLElement>(w, swcAppMainTagName, data);\n};\n\nexport const defineSwcAppMain = async (w: Window) => {\n const existing = w.customElements.get(swcAppMainTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppMainTagName, {window: w, extends: 'main'})\n class SwcAppMainImpl extends SwcAppMixin(w.HTMLElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음\n }\n\n return w.customElements.whenDefined(swcAppMainTagName);\n};\n\n// ============================================\n// SwcAppArticle (HTMLElement)\n// ============================================\nexport const swcAppArticleTagName = 'swc-app-article';\n\nexport const SwcAppArticle = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLElement>(w, swcAppArticleTagName, data);\n};\n\nexport const defineSwcAppArticle = async (w: Window) => {\n const existing = w.customElements.get(swcAppArticleTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppArticleTagName, {window: w, extends: 'article'})\n class SwcAppArticleImpl extends SwcAppMixin(w.HTMLElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음\n }\n\n return w.customElements.whenDefined(swcAppArticleTagName);\n};\n\n// ============================================\n// SwcAppHeader (HTMLElement)\n// ============================================\nexport const swcAppHeaderTagName = 'swc-app-header';\n\nexport const SwcAppHeader = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLElement>(w, swcAppHeaderTagName, data);\n};\n\nexport const defineSwcAppHeader = async (w: Window) => {\n const existing = w.customElements.get(swcAppHeaderTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppHeaderTagName, {window: w, extends: 'header'})\n class SwcAppHeaderImpl extends SwcAppMixin(w.HTMLElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음\n }\n\n return w.customElements.whenDefined(swcAppHeaderTagName);\n};\n\n// ============================================\n// SwcAppFooter (HTMLElement)\n// ============================================\nexport const swcAppFooterTagName = 'swc-app-footer';\n\nexport const SwcAppFooter = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLElement>(w, swcAppFooterTagName, data);\n};\n\nexport const defineSwcAppFooter = async (w: Window) => {\n const existing = w.customElements.get(swcAppFooterTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppFooterTagName, {window: w, extends: 'footer'})\n class SwcAppFooterImpl extends SwcAppMixin(w.HTMLElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음\n }\n\n return w.customElements.whenDefined(swcAppFooterTagName);\n};\n\n// ============================================\n// SwcAppNav (HTMLElement)\n// ============================================\nexport const swcAppNavTagName = 'swc-app-nav';\n\nexport const SwcAppNav = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLElement>(w, swcAppNavTagName, data);\n};\n\nexport const defineSwcAppNav = async (w: Window) => {\n const existing = w.customElements.get(swcAppNavTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppNavTagName, {window: w, extends: 'nav'})\n class SwcAppNavImpl extends SwcAppMixin(w.HTMLElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음\n }\n\n return w.customElements.whenDefined(swcAppNavTagName);\n};\n\n// ============================================\n// SwcAppAside (HTMLElement)\n// ============================================\nexport const swcAppAsideTagName = 'swc-app-aside';\n\nexport const SwcAppAside = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLElement>(w, swcAppAsideTagName, data);\n};\n\nexport const defineSwcAppAside = async (w: Window) => {\n const existing = w.customElements.get(swcAppAsideTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppAsideTagName, {window: w, extends: 'aside'})\n class SwcAppAsideImpl extends SwcAppMixin(w.HTMLElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음\n }\n\n return w.customElements.whenDefined(swcAppAsideTagName);\n};\n\n// ============================================\n// Factory Array\n// ============================================\nexport const swcAppFactories = [\n defineSwcApp,\n defineSwcAppBody,\n defineSwcAppDiv,\n defineSwcAppSection,\n defineSwcAppMain,\n defineSwcAppArticle,\n defineSwcAppHeader,\n defineSwcAppFooter,\n defineSwcAppNav,\n defineSwcAppAside\n];\n\n// ============================================\n// Define All SwcApp Elements\n// ============================================\nexport const defineSwcAppAll = async (w: Window) => {\n await Promise.all(swcAppFactories.map(factory => factory(w)));\n return w.customElements.whenDefined(swcAppTagName);\n};\n\n// Default export for backward compatibility\nexport default defineSwcAppAll;"],
|
|
5
|
+
"mappings": ";;;;;;AAAA,SAAQ,qBAAoB;AAE5B,SAAQ,mBAAkB;AAC1B,SAAkB,qBAAyC;AAKpD,MAAM,gBAAgB;AAEtB,MAAM,SAAS,CAAC,GAAW,SAA8B;AAC9D,SAAO,cAA+B,GAAG,eAAe,IAAI;AAC9D;AAEO,MAAM,eAAe,OAAO,MAAa;AAC9C,QAAM,WAAW,EAAE,eAAe,IAAI,aAAa;AACnD,MAAI;AAAU,WAAO;AAGrB,MAAM,aAAN,MAAM,mBAAmB,YAAY,EAAE,WAAW,EAAC;;AAA7C,eAAU,WAAA;IADf,cAAc,eAAe,EAAC,QAAQ,EAAC,CAAC;KACnC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