@dooboostore/simple-web-component 1.0.56 → 1.0.57

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 CHANGED
@@ -2088,8 +2088,15 @@ onAuth(@swcAppMessage msg: SwcAppMessage<User | null>) { ... }
2088
2088
  @subscribeSwcAppMessage('auth-changed', { subject: 'behavior', trigger: 'connectedDone' })
2089
2089
  @innerHtml('.wrap')
2090
2090
  async load(@swcAppMessage msg: SwcAppMessage<User | null>) { ... }
2091
+
2092
+ // same thing, shorter (like @subscribeSwcAppRouteChangeConnectedDone)
2093
+ @subscribeSwcAppMessageBehaviorConnectedDone('auth-changed')
2094
+ @innerHtml('.wrap')
2095
+ async load(@swcAppMessage msg: SwcAppMessage<User | null>) { ... }
2091
2096
  ```
2092
2097
 
2098
+ This also covers an element that is attached again — e.g. a header re-created when a pre-rendered page boots: with the default trigger the replay lands before its render and the template's default text stays.
2099
+
2093
2100
  Route subscribers (`@subscribeSwcAppRouteChange`) accept the same `trigger`.
2094
2101
  Live broadcasts always reach everyone regardless of trigger.
2095
2102
 
@@ -23,6 +23,7 @@ __export(subscribeSwcAppMessage_exports, {
23
23
  receiveMessage: () => receiveMessage,
24
24
  subscribeSwcAppMessage: () => subscribeSwcAppMessage,
25
25
  subscribeSwcAppMessageBehavior: () => subscribeSwcAppMessageBehavior,
26
+ subscribeSwcAppMessageBehaviorConnectedDone: () => subscribeSwcAppMessageBehaviorConnectedDone,
26
27
  subscribeSwcAppMessageReplay: () => subscribeSwcAppMessageReplay
27
28
  });
28
29
  module.exports = __toCommonJS(subscribeSwcAppMessage_exports);
@@ -59,14 +60,17 @@ function subscribeSwcAppMessage(targetOrMessageTypeOrOptions, optionsOrPropertyK
59
60
  return createSubscribeSwcAppMessage(options, messageType);
60
61
  }
61
62
  const receiveMessage = subscribeSwcAppMessage;
62
- const withSubject = (subject, a, b, descriptor) => {
63
- if (descriptor) return createSubscribeSwcAppMessage({ subject })(a, b, descriptor);
64
- if (typeof a === "string") return createSubscribeSwcAppMessage({ ...b ?? {}, subject }, a);
65
- return createSubscribeSwcAppMessage({ ...a ?? {}, subject });
63
+ const withSubject = (subject, a, b, descriptor, fixed = {}) => {
64
+ if (descriptor) return createSubscribeSwcAppMessage({ subject, ...fixed })(a, b, descriptor);
65
+ if (typeof a === "string") return createSubscribeSwcAppMessage({ ...b ?? {}, subject, ...fixed }, a);
66
+ return createSubscribeSwcAppMessage({ ...a ?? {}, subject, ...fixed });
66
67
  };
67
68
  function subscribeSwcAppMessageBehavior(a, b, descriptor) {
68
69
  return withSubject("behavior", a, b, descriptor);
69
70
  }
71
+ function subscribeSwcAppMessageBehaviorConnectedDone(a, b, descriptor) {
72
+ return withSubject("behavior", a, b, descriptor, { trigger: "connectedDone" });
73
+ }
70
74
  function subscribeSwcAppMessageReplay(a, b, descriptor) {
71
75
  return withSubject("replay", a, b, descriptor);
72
76
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/decorators/subscribeSwcAppMessage.ts"],
4
- "sourcesContent": ["import { ReflectUtils } from '@dooboostore/core';\nimport { SwcAppMessage, SwcAppMessageSubject, SpecialSelector, SwcQueryOptions, HelperHostSet } from '../types';\n\nexport const SUBSCRIBE_SWC_APP_MESSAGE_METADATA_KEY = Symbol.for('simple-web-component:subscribe-swc-app-message');\n\nexport interface SwcAppMessageOptions<Data = any, BeforeReturn = any, Result = any> {\n /** \uBA54\uC2DC\uC9C0 \uC218\uC2E0 \uC2DC \uD578\uB4E4\uB7EC \uC2E4\uD589 \uC5EC\uBD80 \uAC8C\uC774\uD2B8. Promise<boolean>\uB3C4 \uB418\uC5B4 async \uD310\uC815 \uAC00\uB2A5. false\uBA74 \uC2A4\uD0B5. */\n filter?: (message: SwcAppMessage<Data>, currentThis: any) => boolean | Promise<boolean>;\n /** filter \uD1B5\uACFC \uD6C4 \uD578\uB4E4\uB7EC \uC9C1\uC804 \uD6C5. await\uB418\uACE0, \uB9AC\uD134\uAC12\uC740 @swcAppMessageBeforeReturn \uC73C\uB85C \uD578\uB4E4\uB7EC\uC5D0 \uC8FC\uC785\uB41C\uB2E4. */\n before?: (message: SwcAppMessage<Data>, currentThis: any) => BeforeReturn | Promise<BeforeReturn>;\n /** \uD578\uB4E4\uB7EC\uAC00 \uC131\uACF5/\uC2E4\uD328\uD574\uB3C4 \uD56D\uC0C1 \uC2E4\uD589\uB418\uB294 \uC815\uB9AC \uD6C5. ctx\uB85C \uD578\uB4E4\uB7EC \uC778\uC790/\uACB0\uACFC/\uC5D0\uB7EC\uB97C \uBC1B\uB294\uB2E4. \uC5D0\uB7EC\uB294 \uC0BC\uD0A4\uC9C0 \uC54A\uACE0 \uC804\uD30C. */\n finally?: (message: SwcAppMessage<Data>, currentThis: any, ctx: { args: any[]; result?: Result; error?: any }) => any | Promise<any>;\n /**\n * \uB2A6\uAC8C \uC5F0\uACB0\uB41C \uACBD\uC6B0 \uACFC\uAC70 \uBA54\uC2DC\uC9C0 \uC7AC\uC0DD \uBC29\uC2DD. \uC774\uBBF8 \uC5F0\uACB0\uB41C \uAD6C\uB3C5\uC790\uC5D0\uAC8C\uB294 \uD56D\uC0C1 live\uB85C \uC3E8.\n * - \uBBF8\uC9C0\uC815/'subject': live\uB9CC. \uC9C0\uB098\uAC04 \uAC74 \uBABB \uBC1B\uC74C (\uAE30\uBCF8\uAC12, \uAE30\uC874 \uB3D9\uC791)\n * - 'behavior': \uB9C8\uC9C0\uB9C9 1\uAC1C \uC7AC\uC0DD\n * - 'replay': \uBC84\uD37C \uC804\uCCB4 \uC2DC\uAC04\uC21C \uC7AC\uC0DD\n */\n subject?: SwcAppMessageSubject;\n /**\n * \uC7AC\uC0DD \uC2DC\uC810. \uAE30\uBCF8 'connected' (\uC5F0\uACB0 \uC989\uC2DC).\n * - 'connectedDone': \uC5D8\uB9AC\uBA3C\uD2B8 render \uC644\uB8CC \uD6C4 (_connectedDone). @innerHtml \uB4F1\n * DOM \uD0C0\uAC9F\uC774 \uD544\uC694\uD55C \uD578\uB4E4\uB7EC\uB294 \uC774\uAC78\uB85C (replay\uAC00 render\uBCF4\uB2E4 \uBA3C\uC800 \uC640\uC11C \uC99D\uBC1C\uD558\uB294 \uB808\uC774\uC2A4 \uBC29\uC9C0).\n */\n trigger?: 'connected' | 'connectedDone';\n}\n\nexport interface SwcAppMessageSubscriberMetadata extends SwcAppMessageOptions {\n propertyKey: string | symbol;\n messageType?: string;\n}\n\nfunction createSubscribeSwcAppMessage(options?: SwcAppMessageOptions, messageType?: string): MethodDecorator {\n return (target: Object, propertyKey: string | symbol, descriptor?: PropertyDescriptor) => {\n const constructor = target.constructor;\n let list = ReflectUtils.getOwnMetadata(SUBSCRIBE_SWC_APP_MESSAGE_METADATA_KEY, constructor) as SwcAppMessageSubscriberMetadata[];\n if (!list) {\n list = [];\n ReflectUtils.defineMetadata(SUBSCRIBE_SWC_APP_MESSAGE_METADATA_KEY, list, constructor);\n }\n list.push({ propertyKey, messageType, filter: options?.filter, before: options?.before, finally: options?.finally, subject: options?.subject, trigger: options?.trigger });\n \n return descriptor;\n };\n}\n\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uC9C1\uC811 \uC0AC\uC6A9 (\uAD04\uD638 \uC5C6\uC74C)\nexport function subscribeSwcAppMessage(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uD568\uC218 \uD638\uCD9C (\uAD04\uD638 \uC788\uC74C) - \uBA54\uC2DC\uC9C0 \uD0C0\uC785\uB9CC\nexport function subscribeSwcAppMessage(messageType: string): MethodDecorator;\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uD568\uC218 \uD638\uCD9C (\uAD04\uD638 \uC788\uC74C) - \uC635\uC158\uB9CC\nexport function subscribeSwcAppMessage<Data = any, BeforeReturn = any, Result = any>(options: SwcAppMessageOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uD568\uC218 \uD638\uCD9C (\uAD04\uD638 \uC788\uC74C) - \uBA54\uC2DC\uC9C0 \uD0C0\uC785 + \uC635\uC158\nexport function subscribeSwcAppMessage<Data = any, BeforeReturn = any, Result = any>(messageType: string, options: SwcAppMessageOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;\n\nexport function subscribeSwcAppMessage(targetOrMessageTypeOrOptions?: any, optionsOrPropertyKey?: any, descriptor?: PropertyDescriptor): any {\n // \uC9C1\uC811 \uB370\uCF54\uB808\uC774\uD130\uB85C \uC0AC\uC6A9\uB41C \uACBD\uC6B0 (\uAD04\uD638 \uC5C6\uC74C): @subscribeSwcAppMessage\n if (targetOrMessageTypeOrOptions && typeof targetOrMessageTypeOrOptions === 'object' && \n optionsOrPropertyKey && (typeof optionsOrPropertyKey === 'string' || typeof optionsOrPropertyKey === 'symbol') &&\n descriptor) {\n const target = targetOrMessageTypeOrOptions;\n const propertyKey = optionsOrPropertyKey;\n return createSubscribeSwcAppMessage({})(target, propertyKey, descriptor);\n }\n\n // \uD568\uC218\uB85C \uD638\uCD9C\uB41C \uACBD\uC6B0 (\uAD04\uD638 \uC788\uC74C)\n let messageType: string | undefined;\n let options: SwcAppMessageOptions = {};\n\n if (typeof targetOrMessageTypeOrOptions === 'string') {\n // \uBA54\uC2DC\uC9C0 \uD0C0\uC785 \uC804\uB2EC: @subscribeSwcAppMessage('messageType') \uB610\uB294 @subscribeSwcAppMessage('messageType', options)\n messageType = targetOrMessageTypeOrOptions;\n if (optionsOrPropertyKey && typeof optionsOrPropertyKey === 'object') {\n options = optionsOrPropertyKey;\n }\n } else if (targetOrMessageTypeOrOptions && typeof targetOrMessageTypeOrOptions === 'object') {\n // \uC635\uC158\uB9CC \uC804\uB2EC: @subscribeSwcAppMessage({ filter: ... })\n options = targetOrMessageTypeOrOptions;\n }\n\n return createSubscribeSwcAppMessage(options, messageType);\n}\n\nexport const receiveMessage = subscribeSwcAppMessage;\n\n// \u2500\u2500 subject \uB97C \uC774\uB984\uC5D0 \uBC15\uC740 \uBCC4\uCE6D: @subscribeSwcAppMessageBehavior('auth') = @subscribeSwcAppMessage('auth', { subject: 'behavior' }) \u2500\u2500\ntype SubjectlessOptions<Data, BeforeReturn, Result> = Omit<SwcAppMessageOptions<Data, BeforeReturn, Result>, 'subject'>;\n\nconst withSubject = (subject: SwcAppMessageSubject, a?: any, b?: any, descriptor?: PropertyDescriptor): any => {\n if (descriptor) return createSubscribeSwcAppMessage({ subject })(a, b, descriptor); // \uAD04\uD638 \uC5C6\uC774\n if (typeof a === 'string') return createSubscribeSwcAppMessage({ ...(b ?? {}), subject }, a);\n return createSubscribeSwcAppMessage({ ...(a ?? {}), subject });\n};\n\n/** \uB2A6\uAC8C \uBD99\uC5B4\uB3C4 \uB9C8\uC9C0\uB9C9 \uBA54\uC2DC\uC9C0 1\uAC1C\uB97C \uBC1B\uB294\uB2E4 (subject: 'behavior') */\nexport function subscribeSwcAppMessageBehavior(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function subscribeSwcAppMessageBehavior(messageType: string): MethodDecorator;\nexport function subscribeSwcAppMessageBehavior<Data = any, BeforeReturn = any, Result = any>(options: SubjectlessOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;\nexport function subscribeSwcAppMessageBehavior<Data = any, BeforeReturn = any, Result = any>(messageType: string, options: SubjectlessOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;\nexport function subscribeSwcAppMessageBehavior(a?: any, b?: any, descriptor?: PropertyDescriptor): any {\n return withSubject('behavior', a, b, descriptor);\n}\n\n/** \uB2A6\uAC8C \uBD99\uC5B4\uB3C4 \uC9C0\uB098\uAC04 \uBA54\uC2DC\uC9C0\uB97C \uC804\uBD80 \uC2DC\uAC04\uC21C\uC73C\uB85C \uBC1B\uB294\uB2E4 (subject: 'replay') */\nexport function subscribeSwcAppMessageReplay(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function subscribeSwcAppMessageReplay(messageType: string): MethodDecorator;\nexport function subscribeSwcAppMessageReplay<Data = any, BeforeReturn = any, Result = any>(options: SubjectlessOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;\nexport function subscribeSwcAppMessageReplay<Data = any, BeforeReturn = any, Result = any>(messageType: string, options: SubjectlessOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;\nexport function subscribeSwcAppMessageReplay(a?: any, b?: any, descriptor?: PropertyDescriptor): any {\n return withSubject('replay', a, b, descriptor);\n}\n// Helper function to retrieve message subscribers metadata\nexport const getSubscribeSwcAppMessageMetadata = (target: any): SwcAppMessageSubscriberMetadata[] | undefined => {\n const constructor = typeof target === 'function' ? target : target.constructor;\n return ReflectUtils.findAllMetadata<any[]>(SUBSCRIBE_SWC_APP_MESSAGE_METADATA_KEY, constructor).flat();\n};\n\n// \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// MessageSubscribeLifeCycler\n// NOTE: \uC2E4\uC81C \uAD6C\uB3C5 \uB85C\uC9C1\uC740 SwcAppMixin._connected \uC5D0\uC11C \uCC98\uB9AC\uB41C\uB2E4.\n// \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nimport { ElementDefineLifeCycler } from '../types';\n\nexport class MessageSubscribeLifeCycler implements ElementDefineLifeCycler {\n onConnected(_helperHostSet: HelperHostSet): void {\n // \uC2E4\uC81C \uAD6C\uB3C5\uC740 SwcAppMixin._connected \uC5D0\uC11C \uCC98\uB9AC\n }\n\n /** SwcAppMixin \uC774 \uAD6C\uB3C5 \uB300\uC0C1 \uBA54\uD0C0\uB97C \uAEBC\uB0BC \uB54C \uC0AC\uC6A9 */\n getMetadata(helperHostSet: HelperHostSet): SwcAppMessageSubscriberMetadata[] | undefined {\n return getSubscribeSwcAppMessageMetadata(helperHostSet.$this);\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA6B;AAGtB,MAAM,yCAAyC,OAAO,IAAI,gDAAgD;AA6BjH,SAAS,6BAA6B,SAAgC,aAAuC;AAC3G,SAAO,CAAC,QAAgB,aAA8B,eAAoC;AACxF,UAAM,cAAc,OAAO;AAC3B,QAAI,OAAO,yBAAa,eAAe,wCAAwC,WAAW;AAC1F,QAAI,CAAC,MAAM;AACT,aAAO,CAAC;AACR,+BAAa,eAAe,wCAAwC,MAAM,WAAW;AAAA,IACvF;AACA,SAAK,KAAK,EAAE,aAAa,aAAa,QAAQ,SAAS,QAAQ,QAAQ,SAAS,QAAQ,SAAS,SAAS,SAAS,SAAS,SAAS,SAAS,SAAS,SAAS,QAAQ,CAAC;AAEzK,WAAO;AAAA,EACT;AACF;AAWO,SAAS,uBAAuB,8BAAoC,sBAA4B,YAAsC;AAE3I,MAAI,gCAAgC,OAAO,iCAAiC,YACxE,yBAAyB,OAAO,yBAAyB,YAAY,OAAO,yBAAyB,aACrG,YAAY;AACd,UAAM,SAAS;AACf,UAAM,cAAc;AACpB,WAAO,6BAA6B,CAAC,CAAC,EAAE,QAAQ,aAAa,UAAU;AAAA,EACzE;AAGA,MAAI;AACJ,MAAI,UAAgC,CAAC;AAErC,MAAI,OAAO,iCAAiC,UAAU;AAEpD,kBAAc;AACd,QAAI,wBAAwB,OAAO,yBAAyB,UAAU;AACpE,gBAAU;AAAA,IACZ;AAAA,EACF,WAAW,gCAAgC,OAAO,iCAAiC,UAAU;AAE3F,cAAU;AAAA,EACZ;AAEA,SAAO,6BAA6B,SAAS,WAAW;AAC1D;AAEO,MAAM,iBAAiB;AAK9B,MAAM,cAAc,CAAC,SAA+B,GAAS,GAAS,eAAyC;AAC7G,MAAI,WAAY,QAAO,6BAA6B,EAAE,QAAQ,CAAC,EAAE,GAAG,GAAG,UAAU;AACjF,MAAI,OAAO,MAAM,SAAU,QAAO,6BAA6B,EAAE,GAAI,KAAK,CAAC,GAAI,QAAQ,GAAG,CAAC;AAC3F,SAAO,6BAA6B,EAAE,GAAI,KAAK,CAAC,GAAI,QAAQ,CAAC;AAC/D;AAOO,SAAS,+BAA+B,GAAS,GAAS,YAAsC;AACrG,SAAO,YAAY,YAAY,GAAG,GAAG,UAAU;AACjD;AAOO,SAAS,6BAA6B,GAAS,GAAS,YAAsC;AACnG,SAAO,YAAY,UAAU,GAAG,GAAG,UAAU;AAC/C;AAEO,MAAM,oCAAoC,CAAC,WAA+D;AAC/G,QAAM,cAAc,OAAO,WAAW,aAAa,SAAS,OAAO;AACnE,SAAO,yBAAa,gBAAuB,wCAAwC,WAAW,EAAE,KAAK;AACvG;AAQO,MAAM,2BAA8D;AAAA,EACzE,YAAY,gBAAqC;AAAA,EAEjD;AAAA;AAAA,EAGA,YAAY,eAA6E;AACvF,WAAO,kCAAkC,cAAc,KAAK;AAAA,EAC9D;AACF;",
4
+ "sourcesContent": ["import { ReflectUtils } from '@dooboostore/core';\nimport { SwcAppMessage, SwcAppMessageSubject, SpecialSelector, SwcQueryOptions, HelperHostSet } from '../types';\n\nexport const SUBSCRIBE_SWC_APP_MESSAGE_METADATA_KEY = Symbol.for('simple-web-component:subscribe-swc-app-message');\n\nexport interface SwcAppMessageOptions<Data = any, BeforeReturn = any, Result = any> {\n /** \uBA54\uC2DC\uC9C0 \uC218\uC2E0 \uC2DC \uD578\uB4E4\uB7EC \uC2E4\uD589 \uC5EC\uBD80 \uAC8C\uC774\uD2B8. Promise<boolean>\uB3C4 \uB418\uC5B4 async \uD310\uC815 \uAC00\uB2A5. false\uBA74 \uC2A4\uD0B5. */\n filter?: (message: SwcAppMessage<Data>, currentThis: any) => boolean | Promise<boolean>;\n /** filter \uD1B5\uACFC \uD6C4 \uD578\uB4E4\uB7EC \uC9C1\uC804 \uD6C5. await\uB418\uACE0, \uB9AC\uD134\uAC12\uC740 @swcAppMessageBeforeReturn \uC73C\uB85C \uD578\uB4E4\uB7EC\uC5D0 \uC8FC\uC785\uB41C\uB2E4. */\n before?: (message: SwcAppMessage<Data>, currentThis: any) => BeforeReturn | Promise<BeforeReturn>;\n /** \uD578\uB4E4\uB7EC\uAC00 \uC131\uACF5/\uC2E4\uD328\uD574\uB3C4 \uD56D\uC0C1 \uC2E4\uD589\uB418\uB294 \uC815\uB9AC \uD6C5. ctx\uB85C \uD578\uB4E4\uB7EC \uC778\uC790/\uACB0\uACFC/\uC5D0\uB7EC\uB97C \uBC1B\uB294\uB2E4. \uC5D0\uB7EC\uB294 \uC0BC\uD0A4\uC9C0 \uC54A\uACE0 \uC804\uD30C. */\n finally?: (message: SwcAppMessage<Data>, currentThis: any, ctx: { args: any[]; result?: Result; error?: any }) => any | Promise<any>;\n /**\n * \uB2A6\uAC8C \uC5F0\uACB0\uB41C \uACBD\uC6B0 \uACFC\uAC70 \uBA54\uC2DC\uC9C0 \uC7AC\uC0DD \uBC29\uC2DD. \uC774\uBBF8 \uC5F0\uACB0\uB41C \uAD6C\uB3C5\uC790\uC5D0\uAC8C\uB294 \uD56D\uC0C1 live\uB85C \uC3E8.\n * - \uBBF8\uC9C0\uC815/'subject': live\uB9CC. \uC9C0\uB098\uAC04 \uAC74 \uBABB \uBC1B\uC74C (\uAE30\uBCF8\uAC12, \uAE30\uC874 \uB3D9\uC791)\n * - 'behavior': \uB9C8\uC9C0\uB9C9 1\uAC1C \uC7AC\uC0DD\n * - 'replay': \uBC84\uD37C \uC804\uCCB4 \uC2DC\uAC04\uC21C \uC7AC\uC0DD\n */\n subject?: SwcAppMessageSubject;\n /**\n * \uC7AC\uC0DD \uC2DC\uC810. \uAE30\uBCF8 'connected' (\uC5F0\uACB0 \uC989\uC2DC).\n * - 'connectedDone': \uC5D8\uB9AC\uBA3C\uD2B8 render \uC644\uB8CC \uD6C4 (_connectedDone). @innerHtml \uB4F1\n * DOM \uD0C0\uAC9F\uC774 \uD544\uC694\uD55C \uD578\uB4E4\uB7EC\uB294 \uC774\uAC78\uB85C (replay\uAC00 render\uBCF4\uB2E4 \uBA3C\uC800 \uC640\uC11C \uC99D\uBC1C\uD558\uB294 \uB808\uC774\uC2A4 \uBC29\uC9C0).\n */\n trigger?: 'connected' | 'connectedDone';\n}\n\nexport interface SwcAppMessageSubscriberMetadata extends SwcAppMessageOptions {\n propertyKey: string | symbol;\n messageType?: string;\n}\n\nfunction createSubscribeSwcAppMessage(options?: SwcAppMessageOptions, messageType?: string): MethodDecorator {\n return (target: Object, propertyKey: string | symbol, descriptor?: PropertyDescriptor) => {\n const constructor = target.constructor;\n let list = ReflectUtils.getOwnMetadata(SUBSCRIBE_SWC_APP_MESSAGE_METADATA_KEY, constructor) as SwcAppMessageSubscriberMetadata[];\n if (!list) {\n list = [];\n ReflectUtils.defineMetadata(SUBSCRIBE_SWC_APP_MESSAGE_METADATA_KEY, list, constructor);\n }\n list.push({ propertyKey, messageType, filter: options?.filter, before: options?.before, finally: options?.finally, subject: options?.subject, trigger: options?.trigger });\n \n return descriptor;\n };\n}\n\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uC9C1\uC811 \uC0AC\uC6A9 (\uAD04\uD638 \uC5C6\uC74C)\nexport function subscribeSwcAppMessage(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uD568\uC218 \uD638\uCD9C (\uAD04\uD638 \uC788\uC74C) - \uBA54\uC2DC\uC9C0 \uD0C0\uC785\uB9CC\nexport function subscribeSwcAppMessage(messageType: string): MethodDecorator;\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uD568\uC218 \uD638\uCD9C (\uAD04\uD638 \uC788\uC74C) - \uC635\uC158\uB9CC\nexport function subscribeSwcAppMessage<Data = any, BeforeReturn = any, Result = any>(options: SwcAppMessageOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uD568\uC218 \uD638\uCD9C (\uAD04\uD638 \uC788\uC74C) - \uBA54\uC2DC\uC9C0 \uD0C0\uC785 + \uC635\uC158\nexport function subscribeSwcAppMessage<Data = any, BeforeReturn = any, Result = any>(messageType: string, options: SwcAppMessageOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;\n\nexport function subscribeSwcAppMessage(targetOrMessageTypeOrOptions?: any, optionsOrPropertyKey?: any, descriptor?: PropertyDescriptor): any {\n // \uC9C1\uC811 \uB370\uCF54\uB808\uC774\uD130\uB85C \uC0AC\uC6A9\uB41C \uACBD\uC6B0 (\uAD04\uD638 \uC5C6\uC74C): @subscribeSwcAppMessage\n if (targetOrMessageTypeOrOptions && typeof targetOrMessageTypeOrOptions === 'object' && \n optionsOrPropertyKey && (typeof optionsOrPropertyKey === 'string' || typeof optionsOrPropertyKey === 'symbol') &&\n descriptor) {\n const target = targetOrMessageTypeOrOptions;\n const propertyKey = optionsOrPropertyKey;\n return createSubscribeSwcAppMessage({})(target, propertyKey, descriptor);\n }\n\n // \uD568\uC218\uB85C \uD638\uCD9C\uB41C \uACBD\uC6B0 (\uAD04\uD638 \uC788\uC74C)\n let messageType: string | undefined;\n let options: SwcAppMessageOptions = {};\n\n if (typeof targetOrMessageTypeOrOptions === 'string') {\n // \uBA54\uC2DC\uC9C0 \uD0C0\uC785 \uC804\uB2EC: @subscribeSwcAppMessage('messageType') \uB610\uB294 @subscribeSwcAppMessage('messageType', options)\n messageType = targetOrMessageTypeOrOptions;\n if (optionsOrPropertyKey && typeof optionsOrPropertyKey === 'object') {\n options = optionsOrPropertyKey;\n }\n } else if (targetOrMessageTypeOrOptions && typeof targetOrMessageTypeOrOptions === 'object') {\n // \uC635\uC158\uB9CC \uC804\uB2EC: @subscribeSwcAppMessage({ filter: ... })\n options = targetOrMessageTypeOrOptions;\n }\n\n return createSubscribeSwcAppMessage(options, messageType);\n}\n\nexport const receiveMessage = subscribeSwcAppMessage;\n\n// \u2500\u2500 subject \uB97C \uC774\uB984\uC5D0 \uBC15\uC740 \uBCC4\uCE6D: @subscribeSwcAppMessageBehavior('auth') = @subscribeSwcAppMessage('auth', { subject: 'behavior' }) \u2500\u2500\ntype SubjectlessOptions<Data, BeforeReturn, Result> = Omit<SwcAppMessageOptions<Data, BeforeReturn, Result>, 'subject'>;\n\nconst withSubject = (subject: SwcAppMessageSubject, a?: any, b?: any, descriptor?: PropertyDescriptor, fixed: Partial<SwcAppMessageOptions> = {}): any => {\n if (descriptor) return createSubscribeSwcAppMessage({ subject, ...fixed })(a, b, descriptor); // \uAD04\uD638 \uC5C6\uC774\n if (typeof a === 'string') return createSubscribeSwcAppMessage({ ...(b ?? {}), subject, ...fixed }, a);\n return createSubscribeSwcAppMessage({ ...(a ?? {}), subject, ...fixed });\n};\n\n/** \uB2A6\uAC8C \uBD99\uC5B4\uB3C4 \uB9C8\uC9C0\uB9C9 \uBA54\uC2DC\uC9C0 1\uAC1C\uB97C \uBC1B\uB294\uB2E4 (subject: 'behavior') */\nexport function subscribeSwcAppMessageBehavior(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function subscribeSwcAppMessageBehavior(messageType: string): MethodDecorator;\nexport function subscribeSwcAppMessageBehavior<Data = any, BeforeReturn = any, Result = any>(options: SubjectlessOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;\nexport function subscribeSwcAppMessageBehavior<Data = any, BeforeReturn = any, Result = any>(messageType: string, options: SubjectlessOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;\nexport function subscribeSwcAppMessageBehavior(a?: any, b?: any, descriptor?: PropertyDescriptor): any {\n return withSubject('behavior', a, b, descriptor);\n}\n\n/**\n * subscribeSwcAppMessageBehavior + trigger 'connectedDone' \u2014 \uB9C8\uC9C0\uB9C9 \uBA54\uC2DC\uC9C0\uB97C **\uC790\uAE30 \uB80C\uB354\uAC00 \uB05D\uB09C \uB4A4** \uBC1B\uB294\uB2E4.\n * \uD578\uB4E4\uB7EC\uAC00 \uC790\uAE30 DOM \uC5D0 \uC4F0\uB294 \uACBD\uC6B0(@innerHtml('.x'), @updateClass \uB4F1)\uC5D0 \uC4F4\uB2E4: \uAE30\uBCF8 trigger('connected')\uB294\n * \uB80C\uB354 \uC804\uC5D0 \uC7AC\uC0DD\uD574\uC11C \uB300\uC0C1\uC774 \uC544\uC9C1 \uC5C6\uC5B4 \uC870\uC6A9\uD788 \uBC84\uB824\uC9C4\uB2E4. (@subscribeSwcAppRouteChangeConnectedDone \uACFC \uAC19\uC740 \uADDC\uCE59)\n */\nexport function subscribeSwcAppMessageBehaviorConnectedDone(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function subscribeSwcAppMessageBehaviorConnectedDone(messageType: string): MethodDecorator;\nexport function subscribeSwcAppMessageBehaviorConnectedDone<Data = any, BeforeReturn = any, Result = any>(options: Omit<SubjectlessOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>, 'trigger'>): MethodDecorator;\nexport function subscribeSwcAppMessageBehaviorConnectedDone<Data = any, BeforeReturn = any, Result = any>(messageType: string, options: Omit<SubjectlessOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>, 'trigger'>): MethodDecorator;\nexport function subscribeSwcAppMessageBehaviorConnectedDone(a?: any, b?: any, descriptor?: PropertyDescriptor): any {\n return withSubject('behavior', a, b, descriptor, { trigger: 'connectedDone' });\n}\n\n/** \uB2A6\uAC8C \uBD99\uC5B4\uB3C4 \uC9C0\uB098\uAC04 \uBA54\uC2DC\uC9C0\uB97C \uC804\uBD80 \uC2DC\uAC04\uC21C\uC73C\uB85C \uBC1B\uB294\uB2E4 (subject: 'replay') */\nexport function subscribeSwcAppMessageReplay(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function subscribeSwcAppMessageReplay(messageType: string): MethodDecorator;\nexport function subscribeSwcAppMessageReplay<Data = any, BeforeReturn = any, Result = any>(options: SubjectlessOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;\nexport function subscribeSwcAppMessageReplay<Data = any, BeforeReturn = any, Result = any>(messageType: string, options: SubjectlessOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;\nexport function subscribeSwcAppMessageReplay(a?: any, b?: any, descriptor?: PropertyDescriptor): any {\n return withSubject('replay', a, b, descriptor);\n}\n// Helper function to retrieve message subscribers metadata\nexport const getSubscribeSwcAppMessageMetadata = (target: any): SwcAppMessageSubscriberMetadata[] | undefined => {\n const constructor = typeof target === 'function' ? target : target.constructor;\n return ReflectUtils.findAllMetadata<any[]>(SUBSCRIBE_SWC_APP_MESSAGE_METADATA_KEY, constructor).flat();\n};\n\n// \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// MessageSubscribeLifeCycler\n// NOTE: \uC2E4\uC81C \uAD6C\uB3C5 \uB85C\uC9C1\uC740 SwcAppMixin._connected \uC5D0\uC11C \uCC98\uB9AC\uB41C\uB2E4.\n// \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nimport { ElementDefineLifeCycler } from '../types';\n\nexport class MessageSubscribeLifeCycler implements ElementDefineLifeCycler {\n onConnected(_helperHostSet: HelperHostSet): void {\n // \uC2E4\uC81C \uAD6C\uB3C5\uC740 SwcAppMixin._connected \uC5D0\uC11C \uCC98\uB9AC\n }\n\n /** SwcAppMixin \uC774 \uAD6C\uB3C5 \uB300\uC0C1 \uBA54\uD0C0\uB97C \uAEBC\uB0BC \uB54C \uC0AC\uC6A9 */\n getMetadata(helperHostSet: HelperHostSet): SwcAppMessageSubscriberMetadata[] | undefined {\n return getSubscribeSwcAppMessageMetadata(helperHostSet.$this);\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA6B;AAGtB,MAAM,yCAAyC,OAAO,IAAI,gDAAgD;AA6BjH,SAAS,6BAA6B,SAAgC,aAAuC;AAC3G,SAAO,CAAC,QAAgB,aAA8B,eAAoC;AACxF,UAAM,cAAc,OAAO;AAC3B,QAAI,OAAO,yBAAa,eAAe,wCAAwC,WAAW;AAC1F,QAAI,CAAC,MAAM;AACT,aAAO,CAAC;AACR,+BAAa,eAAe,wCAAwC,MAAM,WAAW;AAAA,IACvF;AACA,SAAK,KAAK,EAAE,aAAa,aAAa,QAAQ,SAAS,QAAQ,QAAQ,SAAS,QAAQ,SAAS,SAAS,SAAS,SAAS,SAAS,SAAS,SAAS,SAAS,QAAQ,CAAC;AAEzK,WAAO;AAAA,EACT;AACF;AAWO,SAAS,uBAAuB,8BAAoC,sBAA4B,YAAsC;AAE3I,MAAI,gCAAgC,OAAO,iCAAiC,YACxE,yBAAyB,OAAO,yBAAyB,YAAY,OAAO,yBAAyB,aACrG,YAAY;AACd,UAAM,SAAS;AACf,UAAM,cAAc;AACpB,WAAO,6BAA6B,CAAC,CAAC,EAAE,QAAQ,aAAa,UAAU;AAAA,EACzE;AAGA,MAAI;AACJ,MAAI,UAAgC,CAAC;AAErC,MAAI,OAAO,iCAAiC,UAAU;AAEpD,kBAAc;AACd,QAAI,wBAAwB,OAAO,yBAAyB,UAAU;AACpE,gBAAU;AAAA,IACZ;AAAA,EACF,WAAW,gCAAgC,OAAO,iCAAiC,UAAU;AAE3F,cAAU;AAAA,EACZ;AAEA,SAAO,6BAA6B,SAAS,WAAW;AAC1D;AAEO,MAAM,iBAAiB;AAK9B,MAAM,cAAc,CAAC,SAA+B,GAAS,GAAS,YAAiC,QAAuC,CAAC,MAAW;AACxJ,MAAI,WAAY,QAAO,6BAA6B,EAAE,SAAS,GAAG,MAAM,CAAC,EAAE,GAAG,GAAG,UAAU;AAC3F,MAAI,OAAO,MAAM,SAAU,QAAO,6BAA6B,EAAE,GAAI,KAAK,CAAC,GAAI,SAAS,GAAG,MAAM,GAAG,CAAC;AACrG,SAAO,6BAA6B,EAAE,GAAI,KAAK,CAAC,GAAI,SAAS,GAAG,MAAM,CAAC;AACzE;AAOO,SAAS,+BAA+B,GAAS,GAAS,YAAsC;AACrG,SAAO,YAAY,YAAY,GAAG,GAAG,UAAU;AACjD;AAWO,SAAS,4CAA4C,GAAS,GAAS,YAAsC;AAClH,SAAO,YAAY,YAAY,GAAG,GAAG,YAAY,EAAE,SAAS,gBAAgB,CAAC;AAC/E;AAOO,SAAS,6BAA6B,GAAS,GAAS,YAAsC;AACnG,SAAO,YAAY,UAAU,GAAG,GAAG,UAAU;AAC/C;AAEO,MAAM,oCAAoC,CAAC,WAA+D;AAC/G,QAAM,cAAc,OAAO,WAAW,aAAa,SAAS,OAAO;AACnE,SAAO,yBAAa,gBAAuB,wCAAwC,WAAW,EAAE,KAAK;AACvG;AAQO,MAAM,2BAA8D;AAAA,EACzE,YAAY,gBAAqC;AAAA,EAEjD;AAAA;AAAA,EAGA,YAAY,eAA6E;AACvF,WAAO,kCAAkC,cAAc,KAAK;AAAA,EAC9D;AACF;",
6
6
  "names": []
7
7
  }
@@ -31,14 +31,17 @@ function subscribeSwcAppMessage(targetOrMessageTypeOrOptions, optionsOrPropertyK
31
31
  return createSubscribeSwcAppMessage(options, messageType);
32
32
  }
33
33
  const receiveMessage = subscribeSwcAppMessage;
34
- const withSubject = (subject, a, b, descriptor) => {
35
- if (descriptor) return createSubscribeSwcAppMessage({ subject })(a, b, descriptor);
36
- if (typeof a === "string") return createSubscribeSwcAppMessage({ ...b ?? {}, subject }, a);
37
- return createSubscribeSwcAppMessage({ ...a ?? {}, subject });
34
+ const withSubject = (subject, a, b, descriptor, fixed = {}) => {
35
+ if (descriptor) return createSubscribeSwcAppMessage({ subject, ...fixed })(a, b, descriptor);
36
+ if (typeof a === "string") return createSubscribeSwcAppMessage({ ...b ?? {}, subject, ...fixed }, a);
37
+ return createSubscribeSwcAppMessage({ ...a ?? {}, subject, ...fixed });
38
38
  };
39
39
  function subscribeSwcAppMessageBehavior(a, b, descriptor) {
40
40
  return withSubject("behavior", a, b, descriptor);
41
41
  }
42
+ function subscribeSwcAppMessageBehaviorConnectedDone(a, b, descriptor) {
43
+ return withSubject("behavior", a, b, descriptor, { trigger: "connectedDone" });
44
+ }
42
45
  function subscribeSwcAppMessageReplay(a, b, descriptor) {
43
46
  return withSubject("replay", a, b, descriptor);
44
47
  }
@@ -61,6 +64,7 @@ export {
61
64
  receiveMessage,
62
65
  subscribeSwcAppMessage,
63
66
  subscribeSwcAppMessageBehavior,
67
+ subscribeSwcAppMessageBehaviorConnectedDone,
64
68
  subscribeSwcAppMessageReplay
65
69
  };
66
70
  //# sourceMappingURL=subscribeSwcAppMessage.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/decorators/subscribeSwcAppMessage.ts"],
4
- "sourcesContent": ["import { ReflectUtils } from '@dooboostore/core';\nimport { SwcAppMessage, SwcAppMessageSubject, SpecialSelector, SwcQueryOptions, HelperHostSet } from '../types';\n\nexport const SUBSCRIBE_SWC_APP_MESSAGE_METADATA_KEY = Symbol.for('simple-web-component:subscribe-swc-app-message');\n\nexport interface SwcAppMessageOptions<Data = any, BeforeReturn = any, Result = any> {\n /** \uBA54\uC2DC\uC9C0 \uC218\uC2E0 \uC2DC \uD578\uB4E4\uB7EC \uC2E4\uD589 \uC5EC\uBD80 \uAC8C\uC774\uD2B8. Promise<boolean>\uB3C4 \uB418\uC5B4 async \uD310\uC815 \uAC00\uB2A5. false\uBA74 \uC2A4\uD0B5. */\n filter?: (message: SwcAppMessage<Data>, currentThis: any) => boolean | Promise<boolean>;\n /** filter \uD1B5\uACFC \uD6C4 \uD578\uB4E4\uB7EC \uC9C1\uC804 \uD6C5. await\uB418\uACE0, \uB9AC\uD134\uAC12\uC740 @swcAppMessageBeforeReturn \uC73C\uB85C \uD578\uB4E4\uB7EC\uC5D0 \uC8FC\uC785\uB41C\uB2E4. */\n before?: (message: SwcAppMessage<Data>, currentThis: any) => BeforeReturn | Promise<BeforeReturn>;\n /** \uD578\uB4E4\uB7EC\uAC00 \uC131\uACF5/\uC2E4\uD328\uD574\uB3C4 \uD56D\uC0C1 \uC2E4\uD589\uB418\uB294 \uC815\uB9AC \uD6C5. ctx\uB85C \uD578\uB4E4\uB7EC \uC778\uC790/\uACB0\uACFC/\uC5D0\uB7EC\uB97C \uBC1B\uB294\uB2E4. \uC5D0\uB7EC\uB294 \uC0BC\uD0A4\uC9C0 \uC54A\uACE0 \uC804\uD30C. */\n finally?: (message: SwcAppMessage<Data>, currentThis: any, ctx: { args: any[]; result?: Result; error?: any }) => any | Promise<any>;\n /**\n * \uB2A6\uAC8C \uC5F0\uACB0\uB41C \uACBD\uC6B0 \uACFC\uAC70 \uBA54\uC2DC\uC9C0 \uC7AC\uC0DD \uBC29\uC2DD. \uC774\uBBF8 \uC5F0\uACB0\uB41C \uAD6C\uB3C5\uC790\uC5D0\uAC8C\uB294 \uD56D\uC0C1 live\uB85C \uC3E8.\n * - \uBBF8\uC9C0\uC815/'subject': live\uB9CC. \uC9C0\uB098\uAC04 \uAC74 \uBABB \uBC1B\uC74C (\uAE30\uBCF8\uAC12, \uAE30\uC874 \uB3D9\uC791)\n * - 'behavior': \uB9C8\uC9C0\uB9C9 1\uAC1C \uC7AC\uC0DD\n * - 'replay': \uBC84\uD37C \uC804\uCCB4 \uC2DC\uAC04\uC21C \uC7AC\uC0DD\n */\n subject?: SwcAppMessageSubject;\n /**\n * \uC7AC\uC0DD \uC2DC\uC810. \uAE30\uBCF8 'connected' (\uC5F0\uACB0 \uC989\uC2DC).\n * - 'connectedDone': \uC5D8\uB9AC\uBA3C\uD2B8 render \uC644\uB8CC \uD6C4 (_connectedDone). @innerHtml \uB4F1\n * DOM \uD0C0\uAC9F\uC774 \uD544\uC694\uD55C \uD578\uB4E4\uB7EC\uB294 \uC774\uAC78\uB85C (replay\uAC00 render\uBCF4\uB2E4 \uBA3C\uC800 \uC640\uC11C \uC99D\uBC1C\uD558\uB294 \uB808\uC774\uC2A4 \uBC29\uC9C0).\n */\n trigger?: 'connected' | 'connectedDone';\n}\n\nexport interface SwcAppMessageSubscriberMetadata extends SwcAppMessageOptions {\n propertyKey: string | symbol;\n messageType?: string;\n}\n\nfunction createSubscribeSwcAppMessage(options?: SwcAppMessageOptions, messageType?: string): MethodDecorator {\n return (target: Object, propertyKey: string | symbol, descriptor?: PropertyDescriptor) => {\n const constructor = target.constructor;\n let list = ReflectUtils.getOwnMetadata(SUBSCRIBE_SWC_APP_MESSAGE_METADATA_KEY, constructor) as SwcAppMessageSubscriberMetadata[];\n if (!list) {\n list = [];\n ReflectUtils.defineMetadata(SUBSCRIBE_SWC_APP_MESSAGE_METADATA_KEY, list, constructor);\n }\n list.push({ propertyKey, messageType, filter: options?.filter, before: options?.before, finally: options?.finally, subject: options?.subject, trigger: options?.trigger });\n \n return descriptor;\n };\n}\n\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uC9C1\uC811 \uC0AC\uC6A9 (\uAD04\uD638 \uC5C6\uC74C)\nexport function subscribeSwcAppMessage(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uD568\uC218 \uD638\uCD9C (\uAD04\uD638 \uC788\uC74C) - \uBA54\uC2DC\uC9C0 \uD0C0\uC785\uB9CC\nexport function subscribeSwcAppMessage(messageType: string): MethodDecorator;\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uD568\uC218 \uD638\uCD9C (\uAD04\uD638 \uC788\uC74C) - \uC635\uC158\uB9CC\nexport function subscribeSwcAppMessage<Data = any, BeforeReturn = any, Result = any>(options: SwcAppMessageOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uD568\uC218 \uD638\uCD9C (\uAD04\uD638 \uC788\uC74C) - \uBA54\uC2DC\uC9C0 \uD0C0\uC785 + \uC635\uC158\nexport function subscribeSwcAppMessage<Data = any, BeforeReturn = any, Result = any>(messageType: string, options: SwcAppMessageOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;\n\nexport function subscribeSwcAppMessage(targetOrMessageTypeOrOptions?: any, optionsOrPropertyKey?: any, descriptor?: PropertyDescriptor): any {\n // \uC9C1\uC811 \uB370\uCF54\uB808\uC774\uD130\uB85C \uC0AC\uC6A9\uB41C \uACBD\uC6B0 (\uAD04\uD638 \uC5C6\uC74C): @subscribeSwcAppMessage\n if (targetOrMessageTypeOrOptions && typeof targetOrMessageTypeOrOptions === 'object' && \n optionsOrPropertyKey && (typeof optionsOrPropertyKey === 'string' || typeof optionsOrPropertyKey === 'symbol') &&\n descriptor) {\n const target = targetOrMessageTypeOrOptions;\n const propertyKey = optionsOrPropertyKey;\n return createSubscribeSwcAppMessage({})(target, propertyKey, descriptor);\n }\n\n // \uD568\uC218\uB85C \uD638\uCD9C\uB41C \uACBD\uC6B0 (\uAD04\uD638 \uC788\uC74C)\n let messageType: string | undefined;\n let options: SwcAppMessageOptions = {};\n\n if (typeof targetOrMessageTypeOrOptions === 'string') {\n // \uBA54\uC2DC\uC9C0 \uD0C0\uC785 \uC804\uB2EC: @subscribeSwcAppMessage('messageType') \uB610\uB294 @subscribeSwcAppMessage('messageType', options)\n messageType = targetOrMessageTypeOrOptions;\n if (optionsOrPropertyKey && typeof optionsOrPropertyKey === 'object') {\n options = optionsOrPropertyKey;\n }\n } else if (targetOrMessageTypeOrOptions && typeof targetOrMessageTypeOrOptions === 'object') {\n // \uC635\uC158\uB9CC \uC804\uB2EC: @subscribeSwcAppMessage({ filter: ... })\n options = targetOrMessageTypeOrOptions;\n }\n\n return createSubscribeSwcAppMessage(options, messageType);\n}\n\nexport const receiveMessage = subscribeSwcAppMessage;\n\n// \u2500\u2500 subject \uB97C \uC774\uB984\uC5D0 \uBC15\uC740 \uBCC4\uCE6D: @subscribeSwcAppMessageBehavior('auth') = @subscribeSwcAppMessage('auth', { subject: 'behavior' }) \u2500\u2500\ntype SubjectlessOptions<Data, BeforeReturn, Result> = Omit<SwcAppMessageOptions<Data, BeforeReturn, Result>, 'subject'>;\n\nconst withSubject = (subject: SwcAppMessageSubject, a?: any, b?: any, descriptor?: PropertyDescriptor): any => {\n if (descriptor) return createSubscribeSwcAppMessage({ subject })(a, b, descriptor); // \uAD04\uD638 \uC5C6\uC774\n if (typeof a === 'string') return createSubscribeSwcAppMessage({ ...(b ?? {}), subject }, a);\n return createSubscribeSwcAppMessage({ ...(a ?? {}), subject });\n};\n\n/** \uB2A6\uAC8C \uBD99\uC5B4\uB3C4 \uB9C8\uC9C0\uB9C9 \uBA54\uC2DC\uC9C0 1\uAC1C\uB97C \uBC1B\uB294\uB2E4 (subject: 'behavior') */\nexport function subscribeSwcAppMessageBehavior(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function subscribeSwcAppMessageBehavior(messageType: string): MethodDecorator;\nexport function subscribeSwcAppMessageBehavior<Data = any, BeforeReturn = any, Result = any>(options: SubjectlessOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;\nexport function subscribeSwcAppMessageBehavior<Data = any, BeforeReturn = any, Result = any>(messageType: string, options: SubjectlessOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;\nexport function subscribeSwcAppMessageBehavior(a?: any, b?: any, descriptor?: PropertyDescriptor): any {\n return withSubject('behavior', a, b, descriptor);\n}\n\n/** \uB2A6\uAC8C \uBD99\uC5B4\uB3C4 \uC9C0\uB098\uAC04 \uBA54\uC2DC\uC9C0\uB97C \uC804\uBD80 \uC2DC\uAC04\uC21C\uC73C\uB85C \uBC1B\uB294\uB2E4 (subject: 'replay') */\nexport function subscribeSwcAppMessageReplay(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function subscribeSwcAppMessageReplay(messageType: string): MethodDecorator;\nexport function subscribeSwcAppMessageReplay<Data = any, BeforeReturn = any, Result = any>(options: SubjectlessOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;\nexport function subscribeSwcAppMessageReplay<Data = any, BeforeReturn = any, Result = any>(messageType: string, options: SubjectlessOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;\nexport function subscribeSwcAppMessageReplay(a?: any, b?: any, descriptor?: PropertyDescriptor): any {\n return withSubject('replay', a, b, descriptor);\n}\n// Helper function to retrieve message subscribers metadata\nexport const getSubscribeSwcAppMessageMetadata = (target: any): SwcAppMessageSubscriberMetadata[] | undefined => {\n const constructor = typeof target === 'function' ? target : target.constructor;\n return ReflectUtils.findAllMetadata<any[]>(SUBSCRIBE_SWC_APP_MESSAGE_METADATA_KEY, constructor).flat();\n};\n\n// \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// MessageSubscribeLifeCycler\n// NOTE: \uC2E4\uC81C \uAD6C\uB3C5 \uB85C\uC9C1\uC740 SwcAppMixin._connected \uC5D0\uC11C \uCC98\uB9AC\uB41C\uB2E4.\n// \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nimport { ElementDefineLifeCycler } from '../types';\n\nexport class MessageSubscribeLifeCycler implements ElementDefineLifeCycler {\n onConnected(_helperHostSet: HelperHostSet): void {\n // \uC2E4\uC81C \uAD6C\uB3C5\uC740 SwcAppMixin._connected \uC5D0\uC11C \uCC98\uB9AC\n }\n\n /** SwcAppMixin \uC774 \uAD6C\uB3C5 \uB300\uC0C1 \uBA54\uD0C0\uB97C \uAEBC\uB0BC \uB54C \uC0AC\uC6A9 */\n getMetadata(helperHostSet: HelperHostSet): SwcAppMessageSubscriberMetadata[] | undefined {\n return getSubscribeSwcAppMessageMetadata(helperHostSet.$this);\n }\n}\n"],
5
- "mappings": "AAAA,SAAS,oBAAoB;AAGtB,MAAM,yCAAyC,OAAO,IAAI,gDAAgD;AA6BjH,SAAS,6BAA6B,SAAgC,aAAuC;AAC3G,SAAO,CAAC,QAAgB,aAA8B,eAAoC;AACxF,UAAM,cAAc,OAAO;AAC3B,QAAI,OAAO,aAAa,eAAe,wCAAwC,WAAW;AAC1F,QAAI,CAAC,MAAM;AACT,aAAO,CAAC;AACR,mBAAa,eAAe,wCAAwC,MAAM,WAAW;AAAA,IACvF;AACA,SAAK,KAAK,EAAE,aAAa,aAAa,QAAQ,SAAS,QAAQ,QAAQ,SAAS,QAAQ,SAAS,SAAS,SAAS,SAAS,SAAS,SAAS,SAAS,SAAS,QAAQ,CAAC;AAEzK,WAAO;AAAA,EACT;AACF;AAWO,SAAS,uBAAuB,8BAAoC,sBAA4B,YAAsC;AAE3I,MAAI,gCAAgC,OAAO,iCAAiC,YACxE,yBAAyB,OAAO,yBAAyB,YAAY,OAAO,yBAAyB,aACrG,YAAY;AACd,UAAM,SAAS;AACf,UAAM,cAAc;AACpB,WAAO,6BAA6B,CAAC,CAAC,EAAE,QAAQ,aAAa,UAAU;AAAA,EACzE;AAGA,MAAI;AACJ,MAAI,UAAgC,CAAC;AAErC,MAAI,OAAO,iCAAiC,UAAU;AAEpD,kBAAc;AACd,QAAI,wBAAwB,OAAO,yBAAyB,UAAU;AACpE,gBAAU;AAAA,IACZ;AAAA,EACF,WAAW,gCAAgC,OAAO,iCAAiC,UAAU;AAE3F,cAAU;AAAA,EACZ;AAEA,SAAO,6BAA6B,SAAS,WAAW;AAC1D;AAEO,MAAM,iBAAiB;AAK9B,MAAM,cAAc,CAAC,SAA+B,GAAS,GAAS,eAAyC;AAC7G,MAAI,WAAY,QAAO,6BAA6B,EAAE,QAAQ,CAAC,EAAE,GAAG,GAAG,UAAU;AACjF,MAAI,OAAO,MAAM,SAAU,QAAO,6BAA6B,EAAE,GAAI,KAAK,CAAC,GAAI,QAAQ,GAAG,CAAC;AAC3F,SAAO,6BAA6B,EAAE,GAAI,KAAK,CAAC,GAAI,QAAQ,CAAC;AAC/D;AAOO,SAAS,+BAA+B,GAAS,GAAS,YAAsC;AACrG,SAAO,YAAY,YAAY,GAAG,GAAG,UAAU;AACjD;AAOO,SAAS,6BAA6B,GAAS,GAAS,YAAsC;AACnG,SAAO,YAAY,UAAU,GAAG,GAAG,UAAU;AAC/C;AAEO,MAAM,oCAAoC,CAAC,WAA+D;AAC/G,QAAM,cAAc,OAAO,WAAW,aAAa,SAAS,OAAO;AACnE,SAAO,aAAa,gBAAuB,wCAAwC,WAAW,EAAE,KAAK;AACvG;AAQO,MAAM,2BAA8D;AAAA,EACzE,YAAY,gBAAqC;AAAA,EAEjD;AAAA;AAAA,EAGA,YAAY,eAA6E;AACvF,WAAO,kCAAkC,cAAc,KAAK;AAAA,EAC9D;AACF;",
4
+ "sourcesContent": ["import { ReflectUtils } from '@dooboostore/core';\nimport { SwcAppMessage, SwcAppMessageSubject, SpecialSelector, SwcQueryOptions, HelperHostSet } from '../types';\n\nexport const SUBSCRIBE_SWC_APP_MESSAGE_METADATA_KEY = Symbol.for('simple-web-component:subscribe-swc-app-message');\n\nexport interface SwcAppMessageOptions<Data = any, BeforeReturn = any, Result = any> {\n /** \uBA54\uC2DC\uC9C0 \uC218\uC2E0 \uC2DC \uD578\uB4E4\uB7EC \uC2E4\uD589 \uC5EC\uBD80 \uAC8C\uC774\uD2B8. Promise<boolean>\uB3C4 \uB418\uC5B4 async \uD310\uC815 \uAC00\uB2A5. false\uBA74 \uC2A4\uD0B5. */\n filter?: (message: SwcAppMessage<Data>, currentThis: any) => boolean | Promise<boolean>;\n /** filter \uD1B5\uACFC \uD6C4 \uD578\uB4E4\uB7EC \uC9C1\uC804 \uD6C5. await\uB418\uACE0, \uB9AC\uD134\uAC12\uC740 @swcAppMessageBeforeReturn \uC73C\uB85C \uD578\uB4E4\uB7EC\uC5D0 \uC8FC\uC785\uB41C\uB2E4. */\n before?: (message: SwcAppMessage<Data>, currentThis: any) => BeforeReturn | Promise<BeforeReturn>;\n /** \uD578\uB4E4\uB7EC\uAC00 \uC131\uACF5/\uC2E4\uD328\uD574\uB3C4 \uD56D\uC0C1 \uC2E4\uD589\uB418\uB294 \uC815\uB9AC \uD6C5. ctx\uB85C \uD578\uB4E4\uB7EC \uC778\uC790/\uACB0\uACFC/\uC5D0\uB7EC\uB97C \uBC1B\uB294\uB2E4. \uC5D0\uB7EC\uB294 \uC0BC\uD0A4\uC9C0 \uC54A\uACE0 \uC804\uD30C. */\n finally?: (message: SwcAppMessage<Data>, currentThis: any, ctx: { args: any[]; result?: Result; error?: any }) => any | Promise<any>;\n /**\n * \uB2A6\uAC8C \uC5F0\uACB0\uB41C \uACBD\uC6B0 \uACFC\uAC70 \uBA54\uC2DC\uC9C0 \uC7AC\uC0DD \uBC29\uC2DD. \uC774\uBBF8 \uC5F0\uACB0\uB41C \uAD6C\uB3C5\uC790\uC5D0\uAC8C\uB294 \uD56D\uC0C1 live\uB85C \uC3E8.\n * - \uBBF8\uC9C0\uC815/'subject': live\uB9CC. \uC9C0\uB098\uAC04 \uAC74 \uBABB \uBC1B\uC74C (\uAE30\uBCF8\uAC12, \uAE30\uC874 \uB3D9\uC791)\n * - 'behavior': \uB9C8\uC9C0\uB9C9 1\uAC1C \uC7AC\uC0DD\n * - 'replay': \uBC84\uD37C \uC804\uCCB4 \uC2DC\uAC04\uC21C \uC7AC\uC0DD\n */\n subject?: SwcAppMessageSubject;\n /**\n * \uC7AC\uC0DD \uC2DC\uC810. \uAE30\uBCF8 'connected' (\uC5F0\uACB0 \uC989\uC2DC).\n * - 'connectedDone': \uC5D8\uB9AC\uBA3C\uD2B8 render \uC644\uB8CC \uD6C4 (_connectedDone). @innerHtml \uB4F1\n * DOM \uD0C0\uAC9F\uC774 \uD544\uC694\uD55C \uD578\uB4E4\uB7EC\uB294 \uC774\uAC78\uB85C (replay\uAC00 render\uBCF4\uB2E4 \uBA3C\uC800 \uC640\uC11C \uC99D\uBC1C\uD558\uB294 \uB808\uC774\uC2A4 \uBC29\uC9C0).\n */\n trigger?: 'connected' | 'connectedDone';\n}\n\nexport interface SwcAppMessageSubscriberMetadata extends SwcAppMessageOptions {\n propertyKey: string | symbol;\n messageType?: string;\n}\n\nfunction createSubscribeSwcAppMessage(options?: SwcAppMessageOptions, messageType?: string): MethodDecorator {\n return (target: Object, propertyKey: string | symbol, descriptor?: PropertyDescriptor) => {\n const constructor = target.constructor;\n let list = ReflectUtils.getOwnMetadata(SUBSCRIBE_SWC_APP_MESSAGE_METADATA_KEY, constructor) as SwcAppMessageSubscriberMetadata[];\n if (!list) {\n list = [];\n ReflectUtils.defineMetadata(SUBSCRIBE_SWC_APP_MESSAGE_METADATA_KEY, list, constructor);\n }\n list.push({ propertyKey, messageType, filter: options?.filter, before: options?.before, finally: options?.finally, subject: options?.subject, trigger: options?.trigger });\n \n return descriptor;\n };\n}\n\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uC9C1\uC811 \uC0AC\uC6A9 (\uAD04\uD638 \uC5C6\uC74C)\nexport function subscribeSwcAppMessage(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uD568\uC218 \uD638\uCD9C (\uAD04\uD638 \uC788\uC74C) - \uBA54\uC2DC\uC9C0 \uD0C0\uC785\uB9CC\nexport function subscribeSwcAppMessage(messageType: string): MethodDecorator;\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uD568\uC218 \uD638\uCD9C (\uAD04\uD638 \uC788\uC74C) - \uC635\uC158\uB9CC\nexport function subscribeSwcAppMessage<Data = any, BeforeReturn = any, Result = any>(options: SwcAppMessageOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uD568\uC218 \uD638\uCD9C (\uAD04\uD638 \uC788\uC74C) - \uBA54\uC2DC\uC9C0 \uD0C0\uC785 + \uC635\uC158\nexport function subscribeSwcAppMessage<Data = any, BeforeReturn = any, Result = any>(messageType: string, options: SwcAppMessageOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;\n\nexport function subscribeSwcAppMessage(targetOrMessageTypeOrOptions?: any, optionsOrPropertyKey?: any, descriptor?: PropertyDescriptor): any {\n // \uC9C1\uC811 \uB370\uCF54\uB808\uC774\uD130\uB85C \uC0AC\uC6A9\uB41C \uACBD\uC6B0 (\uAD04\uD638 \uC5C6\uC74C): @subscribeSwcAppMessage\n if (targetOrMessageTypeOrOptions && typeof targetOrMessageTypeOrOptions === 'object' && \n optionsOrPropertyKey && (typeof optionsOrPropertyKey === 'string' || typeof optionsOrPropertyKey === 'symbol') &&\n descriptor) {\n const target = targetOrMessageTypeOrOptions;\n const propertyKey = optionsOrPropertyKey;\n return createSubscribeSwcAppMessage({})(target, propertyKey, descriptor);\n }\n\n // \uD568\uC218\uB85C \uD638\uCD9C\uB41C \uACBD\uC6B0 (\uAD04\uD638 \uC788\uC74C)\n let messageType: string | undefined;\n let options: SwcAppMessageOptions = {};\n\n if (typeof targetOrMessageTypeOrOptions === 'string') {\n // \uBA54\uC2DC\uC9C0 \uD0C0\uC785 \uC804\uB2EC: @subscribeSwcAppMessage('messageType') \uB610\uB294 @subscribeSwcAppMessage('messageType', options)\n messageType = targetOrMessageTypeOrOptions;\n if (optionsOrPropertyKey && typeof optionsOrPropertyKey === 'object') {\n options = optionsOrPropertyKey;\n }\n } else if (targetOrMessageTypeOrOptions && typeof targetOrMessageTypeOrOptions === 'object') {\n // \uC635\uC158\uB9CC \uC804\uB2EC: @subscribeSwcAppMessage({ filter: ... })\n options = targetOrMessageTypeOrOptions;\n }\n\n return createSubscribeSwcAppMessage(options, messageType);\n}\n\nexport const receiveMessage = subscribeSwcAppMessage;\n\n// \u2500\u2500 subject \uB97C \uC774\uB984\uC5D0 \uBC15\uC740 \uBCC4\uCE6D: @subscribeSwcAppMessageBehavior('auth') = @subscribeSwcAppMessage('auth', { subject: 'behavior' }) \u2500\u2500\ntype SubjectlessOptions<Data, BeforeReturn, Result> = Omit<SwcAppMessageOptions<Data, BeforeReturn, Result>, 'subject'>;\n\nconst withSubject = (subject: SwcAppMessageSubject, a?: any, b?: any, descriptor?: PropertyDescriptor, fixed: Partial<SwcAppMessageOptions> = {}): any => {\n if (descriptor) return createSubscribeSwcAppMessage({ subject, ...fixed })(a, b, descriptor); // \uAD04\uD638 \uC5C6\uC774\n if (typeof a === 'string') return createSubscribeSwcAppMessage({ ...(b ?? {}), subject, ...fixed }, a);\n return createSubscribeSwcAppMessage({ ...(a ?? {}), subject, ...fixed });\n};\n\n/** \uB2A6\uAC8C \uBD99\uC5B4\uB3C4 \uB9C8\uC9C0\uB9C9 \uBA54\uC2DC\uC9C0 1\uAC1C\uB97C \uBC1B\uB294\uB2E4 (subject: 'behavior') */\nexport function subscribeSwcAppMessageBehavior(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function subscribeSwcAppMessageBehavior(messageType: string): MethodDecorator;\nexport function subscribeSwcAppMessageBehavior<Data = any, BeforeReturn = any, Result = any>(options: SubjectlessOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;\nexport function subscribeSwcAppMessageBehavior<Data = any, BeforeReturn = any, Result = any>(messageType: string, options: SubjectlessOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;\nexport function subscribeSwcAppMessageBehavior(a?: any, b?: any, descriptor?: PropertyDescriptor): any {\n return withSubject('behavior', a, b, descriptor);\n}\n\n/**\n * subscribeSwcAppMessageBehavior + trigger 'connectedDone' \u2014 \uB9C8\uC9C0\uB9C9 \uBA54\uC2DC\uC9C0\uB97C **\uC790\uAE30 \uB80C\uB354\uAC00 \uB05D\uB09C \uB4A4** \uBC1B\uB294\uB2E4.\n * \uD578\uB4E4\uB7EC\uAC00 \uC790\uAE30 DOM \uC5D0 \uC4F0\uB294 \uACBD\uC6B0(@innerHtml('.x'), @updateClass \uB4F1)\uC5D0 \uC4F4\uB2E4: \uAE30\uBCF8 trigger('connected')\uB294\n * \uB80C\uB354 \uC804\uC5D0 \uC7AC\uC0DD\uD574\uC11C \uB300\uC0C1\uC774 \uC544\uC9C1 \uC5C6\uC5B4 \uC870\uC6A9\uD788 \uBC84\uB824\uC9C4\uB2E4. (@subscribeSwcAppRouteChangeConnectedDone \uACFC \uAC19\uC740 \uADDC\uCE59)\n */\nexport function subscribeSwcAppMessageBehaviorConnectedDone(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function subscribeSwcAppMessageBehaviorConnectedDone(messageType: string): MethodDecorator;\nexport function subscribeSwcAppMessageBehaviorConnectedDone<Data = any, BeforeReturn = any, Result = any>(options: Omit<SubjectlessOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>, 'trigger'>): MethodDecorator;\nexport function subscribeSwcAppMessageBehaviorConnectedDone<Data = any, BeforeReturn = any, Result = any>(messageType: string, options: Omit<SubjectlessOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>, 'trigger'>): MethodDecorator;\nexport function subscribeSwcAppMessageBehaviorConnectedDone(a?: any, b?: any, descriptor?: PropertyDescriptor): any {\n return withSubject('behavior', a, b, descriptor, { trigger: 'connectedDone' });\n}\n\n/** \uB2A6\uAC8C \uBD99\uC5B4\uB3C4 \uC9C0\uB098\uAC04 \uBA54\uC2DC\uC9C0\uB97C \uC804\uBD80 \uC2DC\uAC04\uC21C\uC73C\uB85C \uBC1B\uB294\uB2E4 (subject: 'replay') */\nexport function subscribeSwcAppMessageReplay(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function subscribeSwcAppMessageReplay(messageType: string): MethodDecorator;\nexport function subscribeSwcAppMessageReplay<Data = any, BeforeReturn = any, Result = any>(options: SubjectlessOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;\nexport function subscribeSwcAppMessageReplay<Data = any, BeforeReturn = any, Result = any>(messageType: string, options: SubjectlessOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;\nexport function subscribeSwcAppMessageReplay(a?: any, b?: any, descriptor?: PropertyDescriptor): any {\n return withSubject('replay', a, b, descriptor);\n}\n// Helper function to retrieve message subscribers metadata\nexport const getSubscribeSwcAppMessageMetadata = (target: any): SwcAppMessageSubscriberMetadata[] | undefined => {\n const constructor = typeof target === 'function' ? target : target.constructor;\n return ReflectUtils.findAllMetadata<any[]>(SUBSCRIBE_SWC_APP_MESSAGE_METADATA_KEY, constructor).flat();\n};\n\n// \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// MessageSubscribeLifeCycler\n// NOTE: \uC2E4\uC81C \uAD6C\uB3C5 \uB85C\uC9C1\uC740 SwcAppMixin._connected \uC5D0\uC11C \uCC98\uB9AC\uB41C\uB2E4.\n// \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nimport { ElementDefineLifeCycler } from '../types';\n\nexport class MessageSubscribeLifeCycler implements ElementDefineLifeCycler {\n onConnected(_helperHostSet: HelperHostSet): void {\n // \uC2E4\uC81C \uAD6C\uB3C5\uC740 SwcAppMixin._connected \uC5D0\uC11C \uCC98\uB9AC\n }\n\n /** SwcAppMixin \uC774 \uAD6C\uB3C5 \uB300\uC0C1 \uBA54\uD0C0\uB97C \uAEBC\uB0BC \uB54C \uC0AC\uC6A9 */\n getMetadata(helperHostSet: HelperHostSet): SwcAppMessageSubscriberMetadata[] | undefined {\n return getSubscribeSwcAppMessageMetadata(helperHostSet.$this);\n }\n}\n"],
5
+ "mappings": "AAAA,SAAS,oBAAoB;AAGtB,MAAM,yCAAyC,OAAO,IAAI,gDAAgD;AA6BjH,SAAS,6BAA6B,SAAgC,aAAuC;AAC3G,SAAO,CAAC,QAAgB,aAA8B,eAAoC;AACxF,UAAM,cAAc,OAAO;AAC3B,QAAI,OAAO,aAAa,eAAe,wCAAwC,WAAW;AAC1F,QAAI,CAAC,MAAM;AACT,aAAO,CAAC;AACR,mBAAa,eAAe,wCAAwC,MAAM,WAAW;AAAA,IACvF;AACA,SAAK,KAAK,EAAE,aAAa,aAAa,QAAQ,SAAS,QAAQ,QAAQ,SAAS,QAAQ,SAAS,SAAS,SAAS,SAAS,SAAS,SAAS,SAAS,SAAS,QAAQ,CAAC;AAEzK,WAAO;AAAA,EACT;AACF;AAWO,SAAS,uBAAuB,8BAAoC,sBAA4B,YAAsC;AAE3I,MAAI,gCAAgC,OAAO,iCAAiC,YACxE,yBAAyB,OAAO,yBAAyB,YAAY,OAAO,yBAAyB,aACrG,YAAY;AACd,UAAM,SAAS;AACf,UAAM,cAAc;AACpB,WAAO,6BAA6B,CAAC,CAAC,EAAE,QAAQ,aAAa,UAAU;AAAA,EACzE;AAGA,MAAI;AACJ,MAAI,UAAgC,CAAC;AAErC,MAAI,OAAO,iCAAiC,UAAU;AAEpD,kBAAc;AACd,QAAI,wBAAwB,OAAO,yBAAyB,UAAU;AACpE,gBAAU;AAAA,IACZ;AAAA,EACF,WAAW,gCAAgC,OAAO,iCAAiC,UAAU;AAE3F,cAAU;AAAA,EACZ;AAEA,SAAO,6BAA6B,SAAS,WAAW;AAC1D;AAEO,MAAM,iBAAiB;AAK9B,MAAM,cAAc,CAAC,SAA+B,GAAS,GAAS,YAAiC,QAAuC,CAAC,MAAW;AACxJ,MAAI,WAAY,QAAO,6BAA6B,EAAE,SAAS,GAAG,MAAM,CAAC,EAAE,GAAG,GAAG,UAAU;AAC3F,MAAI,OAAO,MAAM,SAAU,QAAO,6BAA6B,EAAE,GAAI,KAAK,CAAC,GAAI,SAAS,GAAG,MAAM,GAAG,CAAC;AACrG,SAAO,6BAA6B,EAAE,GAAI,KAAK,CAAC,GAAI,SAAS,GAAG,MAAM,CAAC;AACzE;AAOO,SAAS,+BAA+B,GAAS,GAAS,YAAsC;AACrG,SAAO,YAAY,YAAY,GAAG,GAAG,UAAU;AACjD;AAWO,SAAS,4CAA4C,GAAS,GAAS,YAAsC;AAClH,SAAO,YAAY,YAAY,GAAG,GAAG,YAAY,EAAE,SAAS,gBAAgB,CAAC;AAC/E;AAOO,SAAS,6BAA6B,GAAS,GAAS,YAAsC;AACnG,SAAO,YAAY,UAAU,GAAG,GAAG,UAAU;AAC/C;AAEO,MAAM,oCAAoC,CAAC,WAA+D;AAC/G,QAAM,cAAc,OAAO,WAAW,aAAa,SAAS,OAAO;AACnE,SAAO,aAAa,gBAAuB,wCAAwC,WAAW,EAAE,KAAK;AACvG;AAQO,MAAM,2BAA8D;AAAA,EACzE,YAAY,gBAAqC;AAAA,EAEjD;AAAA;AAAA,EAGA,YAAY,eAA6E;AACvF,WAAO,kCAAkC,cAAc,KAAK;AAAA,EAC9D;AACF;",
6
6
  "names": []
7
7
  }
@@ -15481,14 +15481,17 @@ function subscribeSwcAppMessage(targetOrMessageTypeOrOptions, optionsOrPropertyK
15481
15481
  return createSubscribeSwcAppMessage(options, messageType);
15482
15482
  }
15483
15483
  var receiveMessage = subscribeSwcAppMessage;
15484
- var withSubject = (subject, a, b, descriptor) => {
15485
- if (descriptor) return createSubscribeSwcAppMessage({ subject })(a, b, descriptor);
15486
- if (typeof a === "string") return createSubscribeSwcAppMessage({ ...b ?? {}, subject }, a);
15487
- return createSubscribeSwcAppMessage({ ...a ?? {}, subject });
15484
+ var withSubject = (subject, a, b, descriptor, fixed = {}) => {
15485
+ if (descriptor) return createSubscribeSwcAppMessage({ subject, ...fixed })(a, b, descriptor);
15486
+ if (typeof a === "string") return createSubscribeSwcAppMessage({ ...b ?? {}, subject, ...fixed }, a);
15487
+ return createSubscribeSwcAppMessage({ ...a ?? {}, subject, ...fixed });
15488
15488
  };
15489
15489
  function subscribeSwcAppMessageBehavior(a, b, descriptor) {
15490
15490
  return withSubject("behavior", a, b, descriptor);
15491
15491
  }
15492
+ function subscribeSwcAppMessageBehaviorConnectedDone(a, b, descriptor) {
15493
+ return withSubject("behavior", a, b, descriptor, { trigger: "connectedDone" });
15494
+ }
15492
15495
  function subscribeSwcAppMessageReplay(a, b, descriptor) {
15493
15496
  return withSubject("replay", a, b, descriptor);
15494
15497
  }
@@ -25212,6 +25215,7 @@ export {
25212
25215
  styleShadow,
25213
25216
  subscribeSwcAppMessage,
25214
25217
  subscribeSwcAppMessageBehavior,
25218
+ subscribeSwcAppMessageBehaviorConnectedDone,
25215
25219
  subscribeSwcAppMessageReplay,
25216
25220
  subscribeSwcAppRouteChange,
25217
25221
  subscribeSwcAppRouteChangeConnectedDone,