@dooboostore/simple-web-component 1.0.41 → 1.0.42

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.
Files changed (32) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/decorators/elementDefine.js +9 -23
  3. package/dist/cjs/decorators/elementDefine.js.map +2 -2
  4. package/dist/cjs/decorators/lifecycles.js +78 -21
  5. package/dist/cjs/decorators/lifecycles.js.map +2 -2
  6. package/dist/cjs/decorators/subscribeSwcAppRouteChangeWhileConnected.js +3 -1
  7. package/dist/cjs/decorators/subscribeSwcAppRouteChangeWhileConnected.js.map +2 -2
  8. package/dist/cjs/elements/SwcAppMixin.js +4 -9
  9. package/dist/cjs/elements/SwcAppMixin.js.map +2 -2
  10. package/dist/esm/decorators/elementDefine.js +9 -23
  11. package/dist/esm/decorators/elementDefine.js.map +2 -2
  12. package/dist/esm/decorators/lifecycles.js +78 -21
  13. package/dist/esm/decorators/lifecycles.js.map +2 -2
  14. package/dist/esm/decorators/subscribeSwcAppRouteChangeWhileConnected.js +3 -1
  15. package/dist/esm/decorators/subscribeSwcAppRouteChangeWhileConnected.js.map +2 -2
  16. package/dist/esm/elements/SwcAppMixin.js +4 -9
  17. package/dist/esm/elements/SwcAppMixin.js.map +2 -2
  18. package/dist/esm-bundle/dooboostore-simple-web-component.esm.js +70 -55
  19. package/dist/esm-bundle/dooboostore-simple-web-component.esm.js.map +2 -2
  20. package/dist/types/decorators/elementDefine.d.ts.map +1 -1
  21. package/dist/types/decorators/lifecycles.d.ts +25 -11
  22. package/dist/types/decorators/lifecycles.d.ts.map +1 -1
  23. package/dist/types/decorators/subscribeSwcAppRouteChangeWhileConnected.d.ts +1 -1
  24. package/dist/types/decorators/subscribeSwcAppRouteChangeWhileConnected.d.ts.map +1 -1
  25. package/dist/types/elements/SwcAppMixin.d.ts.map +1 -1
  26. package/dist/umd-bundle/dooboostore-simple-web-component.umd.js +70 -55
  27. package/dist/umd-bundle/dooboostore-simple-web-component.umd.js.map +2 -2
  28. package/package.json +7 -7
  29. package/src/decorators/elementDefine.ts +9 -23
  30. package/src/decorators/lifecycles.ts +120 -26
  31. package/src/decorators/subscribeSwcAppRouteChangeWhileConnected.ts +6 -2
  32. package/src/elements/SwcAppMixin.ts +5 -11
@@ -1 +1 @@
1
- {"version":3,"file":"elementDefine.d.ts","sourceRoot":"","sources":["../../../src/decorators/elementDefine.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,kBAAkB,eAAoD,CAAC;AAEpF,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,qBAAqB,CAAC,EAAE,GAAG,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;CACzC;AAED,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,gBAAgB,GAAI,QAAQ,GAAG,KAAG,eAAe,GAAG,SAGhE,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,MAAM,GAAG,SA8FnC,CAAC;AAyLF,eAAO,MAAM,aAAa,GACvB,MAAM,MAAM,EAAE,SAAQ,OAAO,CAAC,aAAa,CAAM,KAAG,cA2blD,CAAC"}
1
+ {"version":3,"file":"elementDefine.d.ts","sourceRoot":"","sources":["../../../src/decorators/elementDefine.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,kBAAkB,eAAoD,CAAC;AAEpF,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,qBAAqB,CAAC,EAAE,GAAG,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;CACzC;AAED,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,gBAAgB,GAAI,QAAQ,GAAG,KAAG,eAAe,GAAG,SAGhE,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,MAAM,GAAG,SA4FnC,CAAC;AAyLF,eAAO,MAAM,aAAa,GACvB,MAAM,MAAM,EAAE,SAAQ,OAAO,CAAC,aAAa,CAAM,KAAG,cA+alD,CAAC"}
@@ -20,25 +20,39 @@ export interface InnerHtmlMetadata {
20
20
  }
21
21
  export interface OnConnectedOptions {
22
22
  ssrFirst?: boolean;
23
+ order?: number;
23
24
  }
24
25
  export interface OnConnectedMetadata {
25
26
  propertyKey: string | symbol;
26
27
  options: OnConnectedOptions;
27
28
  }
29
+ export interface LifecycleOptions {
30
+ order?: number;
31
+ }
32
+ export interface LifecycleMetadata {
33
+ propertyKey: string | symbol;
34
+ order?: number;
35
+ }
28
36
  export declare function onConnectedBefore(options: OnConnectedOptions): MethodDecorator;
29
37
  export declare function onConnectedBefore(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;
30
38
  export declare function onConnectedAfter(options: OnConnectedOptions): MethodDecorator;
31
39
  export declare function onConnectedAfter(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;
32
- export declare const onInitialize: MethodDecorator;
33
- export declare const onDisconnectedBefore: MethodDecorator;
34
- export declare const onDisconnectedAfter: MethodDecorator;
35
- export declare const onDisconnected: MethodDecorator;
36
- export declare const onAdoptedBefore: MethodDecorator;
37
- export declare const onAdoptedAfter: MethodDecorator;
38
- export declare const onAdopted: MethodDecorator;
39
- export declare const onAddEventListener: MethodDecorator;
40
- export declare const onConnectedSwcApp: MethodDecorator;
41
- export declare const onConnectedCompleted: MethodDecorator;
40
+ export declare function onInitialize(options?: LifecycleOptions): MethodDecorator;
41
+ export declare function onInitialize(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;
42
+ export declare function onDisconnectedBefore(options?: LifecycleOptions): MethodDecorator;
43
+ export declare function onDisconnectedBefore(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;
44
+ export declare function onDisconnectedAfter(options?: LifecycleOptions): MethodDecorator;
45
+ export declare function onDisconnectedAfter(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;
46
+ export declare const onDisconnected: typeof onDisconnectedAfter;
47
+ export declare function onAdoptedBefore(options?: LifecycleOptions): MethodDecorator;
48
+ export declare function onAdoptedBefore(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;
49
+ export declare function onAdoptedAfter(options?: LifecycleOptions): MethodDecorator;
50
+ export declare function onAdoptedAfter(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;
51
+ export declare const onAdopted: typeof onAdoptedAfter;
52
+ export declare function onConnectedSwcApp(options?: LifecycleOptions): MethodDecorator;
53
+ export declare function onConnectedSwcApp(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;
54
+ export declare function onConnectedCompleted(options?: LifecycleOptions): MethodDecorator;
55
+ export declare function onConnectedCompleted(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;
42
56
  export declare function onConnectedShadow(options: Omit<InnerHtmlOptions, 'useShadow'>): MethodDecorator;
43
57
  export declare function onConnectedShadow(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;
44
58
  export declare function onConnectedLight(options: Omit<InnerHtmlOptions, 'useShadow'>): MethodDecorator;
@@ -48,7 +62,7 @@ export declare function onConnected(target: Object, propertyKey: string | symbol
48
62
  /**
49
63
  * 프로토타입 체인을 순회하며 모든 라이프사이클 메서드를 수집합니다.
50
64
  */
51
- export declare const findAllLifecycleMetadata: (target: any, metadataKey: symbol) => (string | symbol)[];
65
+ export declare const findAllLifecycleMetadata: (target: any, metadataKey: symbol) => LifecycleMetadata[];
52
66
  export declare const findAllOnConnectedMetadata: (target: any) => InnerHtmlMetadata[];
53
67
  export declare const findAllOnConnectedBeforeMetadata: (target: any) => OnConnectedMetadata[];
54
68
  export declare const findAllOnConnectedAfterMetadata: (target: any) => OnConnectedMetadata[];
@@ -1 +1 @@
1
- {"version":3,"file":"lifecycles.d.ts","sourceRoot":"","sources":["../../../src/decorators/lifecycles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,0BAA0B,eAAoD,CAAC;AAC5F,eAAO,MAAM,gCAAgC,eAAyD,CAAC;AACvG,eAAO,MAAM,+BAA+B,eAAwD,CAAC;AACrG,eAAO,MAAM,mCAAmC,eAA4D,CAAC;AAC7G,eAAO,MAAM,kCAAkC,eAA2D,CAAC;AAC3G,eAAO,MAAM,8BAA8B,eAAuD,CAAC;AACnG,eAAO,MAAM,6BAA6B,eAAsD,CAAC;AACjG,eAAO,MAAM,kCAAkC,eAA2D,CAAC;AAC3G,eAAO,MAAM,yBAAyB,eAAqC,CAAC;AAC5E,eAAO,MAAM,iCAAiC,eAA0D,CAAC;AACzG,eAAO,MAAM,mCAAmC,eAAkD,CAAC;AAEnG,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAE9C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AACD,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AACD,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,OAAO,EAAE,kBAAkB,CAAC;CAC7B;AAGD,wBAAgB,iBAAiB,CAAC,OAAO,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CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,kBAAkB,GAAG,IAAI,CAAC;AAWtH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAE,WAAW,CAAC,GAAG,eAAe,CAAC;AAChG,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,kBAAkB,GAAG,IAAI,CAAC;AAUrH,wBAAgB,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,eAAe,CAAC;AACxE,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,kBAAkB,GAAG,IAAI,CAAC;AAWhH;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,QAAQ,GAAG,EAAE,aAAa,MAAM,KAAG,iBAAiB,EAK5F,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,QAAQ,GAAG,KAAG,iBAAiB,EASzE,CAAC;AAEF,eAAO,MAAM,gCAAgC,GAAI,QAAQ,GAAG,KAAG,mBAAmB,EAKjF,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAAI,QAAQ,GAAG,KAAG,mBAAmB,EAKhF,CAAC"}
@@ -19,5 +19,5 @@ export declare function subscribeSwcAppRouteChangeWhileConnected(): MethodDecora
19
19
  export declare function subscribeSwcAppRouteChangeWhileConnected(pathPattern: RoutePathType): MethodDecorator;
20
20
  export declare function subscribeSwcAppRouteChangeWhileConnected(pathPattern: RoutePathType, config: Omit<SwcAppRouteChangeOptions, 'path'>): MethodDecorator;
21
21
  export declare function subscribeSwcAppRouteChangeWhileConnected(options: SwcAppRouteChangeOptions): MethodDecorator;
22
- export declare const getSubscribeSwcAppRouteChangeWhileConnectedMetadata: (target: any) => SwcAppRouteChangeSubscriberMetadata[] | undefined;
22
+ export declare const getSubscribeSwcAppRouteChangeWhileConnectedMetadata: (target: any) => SwcAppRouteChangeSubscriberMetadata[];
23
23
  //# sourceMappingURL=subscribeSwcAppRouteChangeWhileConnected.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"subscribeSwcAppRouteChangeWhileConnected.d.ts","sourceRoot":"","sources":["../../../src/decorators/subscribeSwcAppRouteChangeWhileConnected.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AAEvC,eAAO,MAAM,2DAA2D,eAAoF,CAAC;AAE7J,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;AAE1F,MAAM,WAAW,mCAAmC;IAClD,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,wBAAwB,CAAC;CACpC;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE;QAAC,WAAW,EAAE,GAAG,CAAC;QAAC,MAAM,EAAE,aAAa,CAAA;KAAC,KAAK,OAAO,CAAC;IACtF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAoBD,wBAAgB,wCAAwC,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,kBAAkB,GAAG,kBAAkB,GAAG,IAAI,CAAC;AAElK,wBAAgB,wCAAwC,IAAI,eAAe,CAAC;AAC5E,wBAAgB,wCAAwC,CAAC,WAAW,EAAE,aAAa,GAAG,eAAe,CAAC;AACtG,wBAAgB,wCAAwC,CAAC,WAAW,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,wBAAw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Y,EAAE,OAAO,CAAA;SAAE;iCAqD3C,GAAG;gCAQV,GAAG;kCAOK,eAAe;yBAOxB,sBAAsB;;;sBAsEzB,MAAM;gBAIlB,IAAI;mBAID,IAAI;kBAIL,IAAI;gCAIU,aAAa,GAAG,IAAI;4CAMR,GAAG,WAAW,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA2BlE"}
@@ -1264,7 +1264,6 @@ var dooboostoreSimpleWebComponent = (() => {
1264
1264
  innerTextNodeThis: () => innerTextNodeThis,
1265
1265
  innerTextShadowNode: () => innerTextShadowNode,
1266
1266
  isSSR: () => isSSR,
1267
- onAddEventListener: () => onAddEventListener,
1268
1267
  onAdopted: () => onAdopted,
1269
1268
  onAdoptedAfter: () => onAdoptedAfter,
1270
1269
  onAdoptedBefore: () => onAdoptedBefore,
@@ -6609,27 +6608,52 @@ var dooboostoreSimpleWebComponent = (() => {
6609
6608
  decorator2(arg1 || {}, target, propertyKey);
6610
6609
  };
6611
6610
  }
6612
- function createLifecycleDecorator(metadataKey) {
6613
- return (target, propertyKey) => {
6614
- const constructor = target.constructor;
6615
- let list = ReflectUtils.getOwnMetadata(metadataKey, constructor);
6616
- if (!list) {
6617
- list = [];
6618
- ReflectUtils.defineMetadata(metadataKey, list, constructor);
6611
+ function createLifecycleDecoratorWithOptions(metadataKey) {
6612
+ return function(optionOrTarget, propertyKey) {
6613
+ if (propertyKey) {
6614
+ const constructor = optionOrTarget.constructor;
6615
+ let list = ReflectUtils.getOwnMetadata(metadataKey, constructor);
6616
+ if (!list) {
6617
+ list = [];
6618
+ ReflectUtils.defineMetadata(metadataKey, list, constructor);
6619
+ }
6620
+ list.push({ propertyKey, order: 0 });
6621
+ return;
6619
6622
  }
6620
- list.push(propertyKey);
6623
+ return (target, propertyKey2) => {
6624
+ const constructor = target.constructor;
6625
+ let list = ReflectUtils.getOwnMetadata(metadataKey, constructor);
6626
+ if (!list) {
6627
+ list = [];
6628
+ ReflectUtils.defineMetadata(metadataKey, list, constructor);
6629
+ }
6630
+ list.push({ propertyKey: propertyKey2, order: optionOrTarget?.order ?? 0 });
6631
+ };
6621
6632
  };
6622
6633
  }
6623
- var onInitialize = createLifecycleDecorator(ON_INITIALIZE_METADATA_KEY);
6624
- var onDisconnectedBefore = createLifecycleDecorator(ON_BEFORE_DISCONNECTED_METADATA_KEY);
6625
- var onDisconnectedAfter = createLifecycleDecorator(ON_AFTER_DISCONNECTED_METADATA_KEY);
6634
+ function onInitialize(optionOrTarget, propertyKey) {
6635
+ return createLifecycleDecoratorWithOptions(ON_INITIALIZE_METADATA_KEY)(optionOrTarget, propertyKey);
6636
+ }
6637
+ function onDisconnectedBefore(optionOrTarget, propertyKey) {
6638
+ return createLifecycleDecoratorWithOptions(ON_BEFORE_DISCONNECTED_METADATA_KEY)(optionOrTarget, propertyKey);
6639
+ }
6640
+ function onDisconnectedAfter(optionOrTarget, propertyKey) {
6641
+ return createLifecycleDecoratorWithOptions(ON_AFTER_DISCONNECTED_METADATA_KEY)(optionOrTarget, propertyKey);
6642
+ }
6626
6643
  var onDisconnected = onDisconnectedAfter;
6627
- var onAdoptedBefore = createLifecycleDecorator(ON_BEFORE_ADOPTED_METADATA_KEY);
6628
- var onAdoptedAfter = createLifecycleDecorator(ON_AFTER_ADOPTED_METADATA_KEY);
6644
+ function onAdoptedBefore(optionOrTarget, propertyKey) {
6645
+ return createLifecycleDecoratorWithOptions(ON_BEFORE_ADOPTED_METADATA_KEY)(optionOrTarget, propertyKey);
6646
+ }
6647
+ function onAdoptedAfter(optionOrTarget, propertyKey) {
6648
+ return createLifecycleDecoratorWithOptions(ON_AFTER_ADOPTED_METADATA_KEY)(optionOrTarget, propertyKey);
6649
+ }
6629
6650
  var onAdopted = onAdoptedAfter;
6630
- var onAddEventListener = createLifecycleDecorator(ON_ADD_EVENT_LISTENER_METADATA_KEY);
6631
- var onConnectedSwcApp = createLifecycleDecorator(ON_CONNECTED_SWC_APP_METADATA_KEY);
6632
- var onConnectedCompleted = createLifecycleDecorator(ON_CONNECTED_COMPLETED_METADATA_KEY);
6651
+ function onConnectedSwcApp(optionOrTarget, propertyKey) {
6652
+ return createLifecycleDecoratorWithOptions(ON_CONNECTED_SWC_APP_METADATA_KEY)(optionOrTarget, propertyKey);
6653
+ }
6654
+ function onConnectedCompleted(optionOrTarget, propertyKey) {
6655
+ return createLifecycleDecoratorWithOptions(ON_CONNECTED_COMPLETED_METADATA_KEY)(optionOrTarget, propertyKey);
6656
+ }
6633
6657
  var decorator = (options, target, propertyKey) => {
6634
6658
  const constructor = target.constructor;
6635
6659
  let list = ReflectUtils.getMetadata(ON_CONNECTED_METADATA_KEY, constructor);
@@ -6664,20 +6688,28 @@ var dooboostoreSimpleWebComponent = (() => {
6664
6688
  };
6665
6689
  }
6666
6690
  var findAllLifecycleMetadata = (target, metadataKey) => {
6667
- const results = ReflectUtils.findAllMetadataFlatten(metadataKey, target) ?? [];
6668
- return results;
6691
+ const constructor = target instanceof Function ? target : target.constructor;
6692
+ const results = ReflectUtils.getOwnMetadata(metadataKey, constructor) ?? [];
6693
+ return [...results].sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
6669
6694
  };
6670
6695
  var findAllOnConnectedMetadata = (target) => {
6671
6696
  const constructor = target instanceof Function ? target : target.constructor;
6672
- return ReflectUtils.getMetadata(ON_CONNECTED_METADATA_KEY, constructor) ?? [];
6697
+ const results = ReflectUtils.getMetadata(ON_CONNECTED_METADATA_KEY, constructor) ?? [];
6698
+ return [...results].sort((a, b) => {
6699
+ const orderA = a.options?.order ?? 0;
6700
+ const orderB = b.options?.order ?? 0;
6701
+ return orderA - orderB;
6702
+ });
6673
6703
  };
6674
6704
  var findAllOnConnectedBeforeMetadata = (target) => {
6675
6705
  const constructor = target instanceof Function ? target : target.constructor;
6676
- return ReflectUtils.getMetadata(ON_BEFORE_CONNECTED_METADATA_KEY, constructor) ?? [];
6706
+ const results = ReflectUtils.getMetadata(ON_BEFORE_CONNECTED_METADATA_KEY, constructor) ?? [];
6707
+ return [...results].sort((a, b) => (a.options?.order ?? 0) - (b.options?.order ?? 0));
6677
6708
  };
6678
6709
  var findAllOnConnectedAfterMetadata = (target) => {
6679
6710
  const constructor = target instanceof Function ? target : target.constructor;
6680
- return ReflectUtils.getMetadata(ON_AFTER_CONNECTED_METADATA_KEY, constructor) ?? [];
6711
+ const results = ReflectUtils.getMetadata(ON_AFTER_CONNECTED_METADATA_KEY, constructor) ?? [];
6712
+ return [...results].sort((a, b) => (a.options?.order ?? 0) - (b.options?.order ?? 0));
6681
6713
  };
6682
6714
 
6683
6715
  // ../core-web/dist/esm/element/CanvasUtils.js
@@ -9826,9 +9858,7 @@ var dooboostoreSimpleWebComponent = (() => {
9826
9858
  const appHosts = SwcUtils.findAllAppHostsIncludingSelfDirect(inst);
9827
9859
  inst._executeSwcScript?.("swc-on-constructor", hostSet);
9828
9860
  const cMethods = findAllLifecycleMetadata(inst, ON_INITIALIZE_METADATA_KEY);
9829
- if (cMethods) {
9830
- for (const m of cMethods) inst._invokeLifecycleMethod(m, hostSet);
9831
- }
9861
+ for (const m of cMethods) inst._invokeLifecycleMethod(m.propertyKey, hostSet);
9832
9862
  }
9833
9863
  };
9834
9864
  var globalDelegatedRoots = /* @__PURE__ */ new WeakSet();
@@ -10019,9 +10049,7 @@ var dooboostoreSimpleWebComponent = (() => {
10019
10049
  const conf = getElementConfig(this);
10020
10050
  const currentWin = this._resolveWindow(conf);
10021
10051
  const bMethods = findAllOnConnectedBeforeMetadata(this).filter((it) => useSsr ? !it.options.ssrFirst : true);
10022
- if (bMethods) {
10023
- for (const m of bMethods) await this._invokeLifecycleMethod(m.propertyKey, helperHostSet);
10024
- }
10052
+ for (const m of bMethods) await this._invokeLifecycleMethod(m.propertyKey, helperHostSet);
10025
10053
  this._executeSwcScript("swc-on-before-connected", helperHostSet);
10026
10054
  const targetConnectedList = findAllOnConnectedMetadata(constructor).filter((it) => useSsr ? !it.options.ssrFirst : true);
10027
10055
  const shadowMode = conf?.useShadow || targetConnectedList.find((it) => it.options.useShadow)?.options.useShadow;
@@ -10200,9 +10228,7 @@ var dooboostoreSimpleWebComponent = (() => {
10200
10228
  const aMethods = findAllOnConnectedAfterMetadata(this).filter((it) => {
10201
10229
  return useSsr ? !it.options.ssrFirst : true;
10202
10230
  });
10203
- if (aMethods) {
10204
- for (const m of aMethods) await this._invokeLifecycleMethod(m.propertyKey, helperHostSet);
10205
- }
10231
+ for (const m of aMethods) await this._invokeLifecycleMethod(m.propertyKey, helperHostSet);
10206
10232
  this._executeSwcScript("swc-on-connected", helperHostSet);
10207
10233
  this._executeSwcScript("swc-on-after-connected", helperHostSet);
10208
10234
  this.__swc_connected = true;
@@ -10217,8 +10243,8 @@ var dooboostoreSimpleWebComponent = (() => {
10217
10243
  }
10218
10244
  }
10219
10245
  } finally {
10220
- for (let mPropertyKey of findAllLifecycleMetadata(this, ON_CONNECTED_COMPLETED_METADATA_KEY)) {
10221
- await this._invokeLifecycleMethod(mPropertyKey, helperHostSet);
10246
+ for (let m of findAllLifecycleMetadata(this, ON_CONNECTED_COMPLETED_METADATA_KEY)) {
10247
+ await this._invokeLifecycleMethod(m.propertyKey, helperHostSet);
10222
10248
  }
10223
10249
  if (appHost && typeof appHost._connectedDone === "function") {
10224
10250
  await appHost._connectedDone(this);
@@ -10233,9 +10259,7 @@ var dooboostoreSimpleWebComponent = (() => {
10233
10259
  }
10234
10260
  this._executeSwcScript("swc-on-before-disconnected", helperHostSet);
10235
10261
  const bMethods = findAllLifecycleMetadata(this, ON_BEFORE_DISCONNECTED_METADATA_KEY);
10236
- if (bMethods) {
10237
- for (const m of bMethods) this._invokeLifecycleMethod(m, helperHostSet);
10238
- }
10262
+ for (const m of bMethods) this._invokeLifecycleMethod(m.propertyKey, helperHostSet);
10239
10263
  if (this._boundListeners) {
10240
10264
  this._boundListeners.forEach((l) => l.target.removeEventListener(l.type, l.handler, l.options));
10241
10265
  this._boundListeners = [];
@@ -10243,9 +10267,7 @@ var dooboostoreSimpleWebComponent = (() => {
10243
10267
  new ElementApply(this, { id: this._swcId }).removeAllEventListener();
10244
10268
  if (originalDisconnected) originalDisconnected.apply(this);
10245
10269
  const aMethods = findAllLifecycleMetadata(this, ON_AFTER_DISCONNECTED_METADATA_KEY);
10246
- if (aMethods) {
10247
- for (const m of aMethods) this._invokeLifecycleMethod(m, helperHostSet);
10248
- }
10270
+ for (const m of aMethods) this._invokeLifecycleMethod(m.propertyKey, helperHostSet);
10249
10271
  this._executeSwcScript("swc-on-disconnected", helperHostSet);
10250
10272
  this._executeSwcScript("swc-on-after-disconnected", helperHostSet);
10251
10273
  this.__swc_connected = false;
@@ -10255,14 +10277,10 @@ var dooboostoreSimpleWebComponent = (() => {
10255
10277
  const hostSet = SwcUtils.getHostSet(this);
10256
10278
  this._executeSwcScript("swc-on-before-adopted", hostSet);
10257
10279
  const bMethods = findAllLifecycleMetadata(this, ON_BEFORE_ADOPTED_METADATA_KEY);
10258
- if (bMethods) {
10259
- for (const m of bMethods) this._invokeLifecycleMethod(m, hostSet);
10260
- }
10280
+ for (const m of bMethods) this._invokeLifecycleMethod(m.propertyKey, hostSet);
10261
10281
  if (originalAdopted) originalAdopted.apply(this);
10262
10282
  const aMethods = findAllLifecycleMetadata(this, ON_AFTER_ADOPTED_METADATA_KEY);
10263
- if (aMethods) {
10264
- for (const m of aMethods) this._invokeLifecycleMethod(m, hostSet);
10265
- }
10283
+ for (const m of aMethods) this._invokeLifecycleMethod(m.propertyKey, hostSet);
10266
10284
  this._executeSwcScript("swc-on-adopted", hostSet);
10267
10285
  this._executeSwcScript("swc-on-after-adopted", hostSet);
10268
10286
  };
@@ -11017,7 +11035,9 @@ var dooboostoreSimpleWebComponent = (() => {
11017
11035
  }
11018
11036
  var getSubscribeSwcAppRouteChangeWhileConnectedMetadata = (target) => {
11019
11037
  const constructor = target instanceof Function ? target : target.constructor;
11020
- return ReflectUtils.getOwnMetadata(SUBSCRIBE_SWC_APP_ROUTE_CHANGE_WHILE_CONNECTED_METADATA_KEY, constructor);
11038
+ const results = ReflectUtils.getOwnMetadata(SUBSCRIBE_SWC_APP_ROUTE_CHANGE_WHILE_CONNECTED_METADATA_KEY, constructor);
11039
+ if (!results) return [];
11040
+ return [...results].sort((a, b) => (a.options?.order ?? 0) - (b.options?.order ?? 0));
11021
11041
  };
11022
11042
 
11023
11043
  // src/decorators/subscribeSwcAppMessageWhileConnected.ts
@@ -13463,14 +13483,9 @@ var dooboostoreSimpleWebComponent = (() => {
13463
13483
  );
13464
13484
  try {
13465
13485
  const routeChangeSubscribers = getSubscribeSwcAppRouteChangeWhileConnectedMetadata(instance);
13466
- if (routeChangeSubscribers && Array.isArray(routeChangeSubscribers)) {
13486
+ if (routeChangeSubscribers.length > 0) {
13467
13487
  console.log("[SWC-MIXIN] Route change subscribers found");
13468
- const sortedSubscribers = [...routeChangeSubscribers].sort((a, b) => {
13469
- const orderA = a.options?.order ?? 0;
13470
- const orderB = b.options?.order ?? 0;
13471
- return orderA - orderB;
13472
- });
13473
- for (const metadata of sortedSubscribers) {
13488
+ for (const metadata of routeChangeSubscribers) {
13474
13489
  const methodName = metadata.propertyKey;
13475
13490
  let pathPattern = metadata.options?.path;
13476
13491
  const filter = metadata.options?.filter;
@@ -13525,9 +13540,9 @@ var dooboostoreSimpleWebComponent = (() => {
13525
13540
  this._connectedInvocations++;
13526
13541
  }
13527
13542
  this._swc_connected_instance.add(instance);
13528
- const connectedSwcAppCallBacks = findAllLifecycleMetadata(instance, ON_CONNECTED_SWC_APP_METADATA_KEY) ?? [];
13543
+ const connectedSwcAppCallBacks = findAllLifecycleMetadata(instance, ON_CONNECTED_SWC_APP_METADATA_KEY);
13529
13544
  for (let connectedSwcAppCallBack of connectedSwcAppCallBacks) {
13530
- await instance?._invokeLifecycleMethod?.(connectedSwcAppCallBack);
13545
+ await instance?._invokeLifecycleMethod?.(connectedSwcAppCallBack.propertyKey);
13531
13546
  }
13532
13547
  if (this._childrenConnectedDoneInterval) {
13533
13548
  this.config.window.clearInterval(this._childrenConnectedDoneInterval);