diff --git a/ui/element/src/mixins/direction.ts b/ui/element/src/mixins/direction.ts index 7df00a38a..4dc5257d8 100644 --- a/ui/element/src/mixins/direction.ts +++ b/ui/element/src/mixins/direction.ts @@ -24,7 +24,7 @@ export function DirectionMixin>( override connectedCallback(): void { super.connectedCallback(); - this._signalListenerList.push(localeContextConsumer.subscribe(() => this._updateDir())); + this._addSignalListener(localeContextConsumer.subscribe(() => this._updateDir())); } /** diff --git a/ui/element/src/mixins/localize.ts b/ui/element/src/mixins/localize.ts index 4067e7072..bfe1c9206 100644 --- a/ui/element/src/mixins/localize.ts +++ b/ui/element/src/mixins/localize.ts @@ -13,7 +13,7 @@ export function LocalizeMixin>( class LocalizeMixinClass extends superClass { override connectedCallback(): void { super.connectedCallback(); - this._signalListenerList.push( + this._addSignalListener( l18eContextConsumer.subscribe(this._l18eContextUpdated.bind(this)), ); } diff --git a/ui/element/src/mixins/router.ts b/ui/element/src/mixins/router.ts index 6cb97f919..afa9adc1a 100644 --- a/ui/element/src/mixins/router.ts +++ b/ui/element/src/mixins/router.ts @@ -13,7 +13,7 @@ export function RouterMixin>( class RouterMixinClass extends superClass { override connectedCallback(): void { super.connectedCallback(); - this._signalListenerList.push( + this._addSignalListener( routeContextConsumer.subscribe((routeContext) => this._routeContextUpdated(routeContext), { receivePrevious: 'No', }), diff --git a/ui/pwa-helper/src/pwa-element.ts b/ui/pwa-helper/src/pwa-element.ts index e0cc02a87..a18799696 100644 --- a/ui/pwa-helper/src/pwa-element.ts +++ b/ui/pwa-helper/src/pwa-element.ts @@ -69,7 +69,7 @@ export class AlwatrPwaElement extends RouterMixin(SignalMixin(UnresolvedMixin(Al if (!localeContextConsumer.getValue()) { setLocale(); } - this._signalListenerList.push( + this._addSignalListener( commandHandler.define<{smooth?: boolean}, undefined>(scrollToTopCommand.id, (option): undefined => { this.renderRoot.querySelector('.scroll-area')?.scrollTo({ top: 0, diff --git a/ui/ui-kit/src/top-app-bar/top-app-bar.ts b/ui/ui-kit/src/top-app-bar/top-app-bar.ts index 0211c14ad..579986ff7 100644 --- a/ui/ui-kit/src/top-app-bar/top-app-bar.ts +++ b/ui/ui-kit/src/top-app-bar/top-app-bar.ts @@ -168,7 +168,7 @@ export class AlwatrTopAppBar extends LocalizeMixin(DirectionMixin(SignalMixin(Al super.connectedCallback(); const contextSignal = this.getAttribute('context-signal'); if (contextSignal) { - this._signalListenerList.push( + this._addSignalListener( contextConsumer.subscribe(contextSignal, (context) => { this.content = { type: 'small', diff --git a/uniquely/com-pwa/src/ui/page/home.ts b/uniquely/com-pwa/src/ui/page/home.ts index 7223c6e4a..b3e9fd4cd 100644 --- a/uniquely/com-pwa/src/ui/page/home.ts +++ b/uniquely/com-pwa/src/ui/page/home.ts @@ -55,7 +55,7 @@ export class AlwatrPageHome extends UnresolvedMixin(SignalMixin(AlwatrBaseElemen override connectedCallback(): void { super.connectedCallback(); - this._signalListenerList.push( + this._addSignalListener( homePageContentContextConsumer.subscribe((content) => { this.content = content; topAppBarContextProvider.setValue(content.topAppBar); diff --git a/uniquely/com-pwa/src/ui/page/new-order.ts b/uniquely/com-pwa/src/ui/page/new-order.ts index 99d652271..1fe6ee5ff 100644 --- a/uniquely/com-pwa/src/ui/page/new-order.ts +++ b/uniquely/com-pwa/src/ui/page/new-order.ts @@ -360,7 +360,7 @@ export class AlwatrPageNewOrder extends UnresolvedMixin(AlwatrOrderDetailBase) { override connectedCallback(): void { super.connectedCallback(); - this._signalListenerList.push( + this._addSignalListener( productStorageContextConsumer.subscribe( (context) => { this._stateMachine.transition(`context_request_${context.state}`, {productStorage: context.content}); @@ -369,7 +369,7 @@ export class AlwatrPageNewOrder extends UnresolvedMixin(AlwatrOrderDetailBase) { ), ); - this._signalListenerList.push( + this._addSignalListener( productPriceStorageContextProvider.subscribe( (context) => { this._stateMachine.transition(`context_request_${context.state}`, {priceStorage: context.content}); @@ -378,7 +378,7 @@ export class AlwatrPageNewOrder extends UnresolvedMixin(AlwatrOrderDetailBase) { ), ); - this._signalListenerList.push( + this._addSignalListener( finalProductPriceStorageContextProvider.subscribe( (context) => { this._stateMachine.transition(`context_request_${context.state}`, {finalPriceStorage: context.content}); @@ -387,7 +387,7 @@ export class AlwatrPageNewOrder extends UnresolvedMixin(AlwatrOrderDetailBase) { ), ); - this._signalListenerList.push( + this._addSignalListener( finalProductPriceStorageContextProvider.subscribe( (context) => { this._stateMachine.transition(`context_request_${context.state}`, {finalPriceStorage: context.content}); diff --git a/uniquely/com-pwa/src/ui/page/order-detail.ts b/uniquely/com-pwa/src/ui/page/order-detail.ts index 882a79ea8..32ef22941 100644 --- a/uniquely/com-pwa/src/ui/page/order-detail.ts +++ b/uniquely/com-pwa/src/ui/page/order-detail.ts @@ -180,7 +180,7 @@ export class AlwatrPageOrderDetail extends UnresolvedMixin(AlwatrOrderDetailBase override connectedCallback(): void { super.connectedCallback(); - this._signalListenerList.push( + this._addSignalListener( orderStorageContextConsumer.subscribe( (context) => { this._stateMachine.transition(`context_request_${context.state}`, {orderStorage: context.content}); @@ -189,7 +189,7 @@ export class AlwatrPageOrderDetail extends UnresolvedMixin(AlwatrOrderDetailBase ), ); - this._signalListenerList.push( + this._addSignalListener( productStorageContextConsumer.subscribe( (context) => { this._stateMachine.transition(`context_request_${context.state}`, {productStorage: context.content}); diff --git a/uniquely/com-pwa/src/ui/page/order-tracking.ts b/uniquely/com-pwa/src/ui/page/order-tracking.ts index bae4217d8..6907e1906 100644 --- a/uniquely/com-pwa/src/ui/page/order-tracking.ts +++ b/uniquely/com-pwa/src/ui/page/order-tracking.ts @@ -172,13 +172,13 @@ export class AlwatrPageOrderDetail extends UnresolvedMixin(AlwatrOrderDetailBase override connectedCallback(): void { super.connectedCallback(); - this._signalListenerList.push( + this._addSignalListener( orderStorageContextConsumer.subscribe((context) => { this._stateMachine.transition(`context_request_${context.state}`, {orderStorage: context.content}); }, {receivePrevious: 'NextCycle'}), ); - this._signalListenerList.push( + this._addSignalListener( productStorageContextConsumer.subscribe((context) => { this._stateMachine.transition(`context_request_${context.state}`, {productStorage: context.content}); }, {receivePrevious: 'NextCycle'}), diff --git a/uniquely/soffit-pwa/src/page-home.ts b/uniquely/soffit-pwa/src/page-home.ts index 5482808e3..6215e7aad 100644 --- a/uniquely/soffit-pwa/src/page-home.ts +++ b/uniquely/soffit-pwa/src/page-home.ts @@ -65,7 +65,7 @@ export class AlwatrPageHome extends SignalMixin(AlwatrBaseElement) { override connectedCallback(): void { super.connectedCallback(); - this._signalListenerList.push( + this._addSignalListener( homePageContentContextConsumer.subscribe((content) => { this.content = content; topAppBarContextProvider.setValue(content.topAppBar); diff --git a/uniquely/soffit-pwa/src/page-product.ts b/uniquely/soffit-pwa/src/page-product.ts index 7803fd1e0..3b15461b1 100644 --- a/uniquely/soffit-pwa/src/page-product.ts +++ b/uniquely/soffit-pwa/src/page-product.ts @@ -49,7 +49,7 @@ export class AlwatrPageHome extends SignalMixin(AlwatrBaseElement) { override connectedCallback(): void { super.connectedCallback(); - this._signalListenerList.push( + this._addSignalListener( productPageContentContextConsumer.subscribe((content) => { this.content = content; topAppBarContextProvider.setValue(content.topAppBar);