Skip to content

Commit

Permalink
Merge pull request #299 from wmde/C23_WMDE_Mobile_DE_11
Browse files Browse the repository at this point in the history
C23_WMDE_Mobile_DE_11
  • Loading branch information
moiikana authored Dec 5, 2023
2 parents 0965fd0 + 7abf71c commit 25e15ff
Show file tree
Hide file tree
Showing 47 changed files with 1,410 additions and 89 deletions.
4 changes: 2 additions & 2 deletions archive/desktop/C23_WMDE_Desktop_DE_14/banner_ctrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { LocaleFactoryDe } from '@src/utils/LocaleFactory/LocaleFactoryDe';
// Channel specific form setup
import { createFormItems } from './form_items';
import { createFormActions } from '@src/createFormActions';
import { createFallbackDonationLink } from '@src/createFallbackDonationLink';
import { createFallbackDonationURL } from '@src/createFallbackDonationURL';

const localeFactory = new LocaleFactoryDe();
const translator = new Translator( messages );
Expand All @@ -44,7 +44,7 @@ const app = createVueApp( BannerConductor, {
bannerProps: {
useOfFundsContent: localeFactory.getUseOfFundsLoader().getContent(),
remainingImpressions: impressionCount.getRemainingImpressions( page.getMaxBannerImpressions( 'desktop' ) ),
donationLink: createFallbackDonationLink( page.getTracking(), impressionCount )
donationLink: createFallbackDonationURL( page.getTracking(), impressionCount )
},
resizeHandler: new WindowResizeHandler(),
banner: Banner,
Expand Down
4 changes: 2 additions & 2 deletions archive/desktop/C23_WMDE_Desktop_DE_14/banner_var.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { LocaleFactoryDe } from '@src/utils/LocaleFactory/LocaleFactoryDe';
// Channel specific form setup
import { createFormItems } from './form_items';
import { createFormActions } from '@src/createFormActions';
import { createFallbackDonationLink } from '@src/createFallbackDonationLink';
import { createFallbackDonationURL } from '@src/createFallbackDonationURL';

const localeFactory = new LocaleFactoryDe();
const translator = new Translator( messages );
Expand All @@ -44,7 +44,7 @@ const app = createVueApp( BannerConductor, {
bannerProps: {
useOfFundsContent: localeFactory.getUseOfFundsLoader().getContent(),
remainingImpressions: impressionCount.getRemainingImpressions( page.getMaxBannerImpressions( 'desktop' ) ),
donationLink: createFallbackDonationLink( page.getTracking(), impressionCount )
donationLink: createFallbackDonationURL( page.getTracking(), impressionCount )
},
resizeHandler: new WindowResizeHandler(),
banner: Banner,
Expand Down
4 changes: 2 additions & 2 deletions archive/desktop/C23_WMDE_Desktop_DE_15/banner_ctrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { LocaleFactoryDe } from '@src/utils/LocaleFactory/LocaleFactoryDe';
// Channel specific form setup
import { createFormItems } from './form_items';
import { createFormActions } from '@src/createFormActions';
import { createFallbackDonationLink } from '@src/createFallbackDonationLink';
import { createFallbackDonationURL } from '@src/createFallbackDonationURL';

const localeFactory = new LocaleFactoryDe();
const translator = new Translator( messages );
Expand All @@ -44,7 +44,7 @@ const app = createVueApp( BannerConductor, {
bannerProps: {
useOfFundsContent: localeFactory.getUseOfFundsLoader().getContent(),
remainingImpressions: impressionCount.getRemainingImpressions( page.getMaxBannerImpressions( 'desktop' ) ),
donationLink: createFallbackDonationLink( page.getTracking(), impressionCount )
donationLink: createFallbackDonationURL( page.getTracking(), impressionCount )
},
resizeHandler: new WindowResizeHandler(),
banner: Banner,
Expand Down
4 changes: 2 additions & 2 deletions archive/desktop/C23_WMDE_Desktop_DE_15/banner_var.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { LocaleFactoryDe } from '@src/utils/LocaleFactory/LocaleFactoryDe';
// Channel specific form setup
import { createFormItems } from './form_items';
import { createFormActions } from '@src/createFormActions';
import { createFallbackDonationLink } from '@src/createFallbackDonationLink';
import { createFallbackDonationURL } from '@src/createFallbackDonationURL';

const localeFactory = new LocaleFactoryDe();
const translator = new Translator( messages );
Expand All @@ -44,7 +44,7 @@ const app = createVueApp( BannerConductor, {
bannerProps: {
useOfFundsContent: localeFactory.getUseOfFundsLoader().getContent(),
remainingImpressions: impressionCount.getRemainingImpressions( page.getMaxBannerImpressions( 'desktop' ) ),
donationLink: createFallbackDonationLink( page.getTracking(), impressionCount )
donationLink: createFallbackDonationURL( page.getTracking(), impressionCount )
},
resizeHandler: new WindowResizeHandler(),
banner: Banner,
Expand Down
68 changes: 68 additions & 0 deletions archive/mobile/C23_WMDE_Mobile_DE_10/banner_ctrl.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import { createVueApp } from '@src/createVueApp';

import './styles/styles.scss';

import BannerConductor from '@src/components/BannerConductor/BannerConductor.vue';
import Banner from './components/BannerCtrl.vue';
import { UrlRuntimeEnvironment } from '@src/utils/RuntimeEnvironment';
import { WindowResizeHandler } from '@src/utils/ResizeHandler';
import PageWPORG from '@src/page/PageWPORG';
import { WindowMediaWiki } from '@src/page/MediaWiki/WindowMediaWiki';
import { SkinFactory } from '@src/page/skin/SkinFactory';
import { WindowSizeIssueChecker } from '@src/utils/SizeIssueChecker/WindowSizeIssueChecker';
import TranslationPlugin from '@src/TranslationPlugin';
import { Translator } from '@src/Translator';
import DynamicTextPlugin from '@src/DynamicTextPlugin';
import { LocalImpressionCount } from '@src/utils/LocalImpressionCount';
import { WindowPageScroller } from '@src/utils/PageScroller/WindowPageScroller';
import { LegacyTrackerWPORG } from '@src/tracking/LegacyTrackerWPORG';
import eventMappings from './event_map';

// Locale-specific imports
import messages from './messages';
import { LocaleFactoryDe } from '@src/utils/LocaleFactory/LocaleFactoryDe';

// Channel specific form setup
import { createFormItems } from './form_items';
import { createFormActions } from '@src/createFormActions';

const localeFactory = new LocaleFactoryDe();
const translator = new Translator( messages );
const mediaWiki = new WindowMediaWiki();
const page = new PageWPORG( mediaWiki, ( new SkinFactory( mediaWiki ) ).getSkin(), new WindowSizeIssueChecker() );
const runtimeEnvironment = new UrlRuntimeEnvironment( window.location );
const impressionCount = new LocalImpressionCount( page.getTracking().keyword, runtimeEnvironment );
const tracker = new LegacyTrackerWPORG( mediaWiki, page.getTracking().keyword, eventMappings, runtimeEnvironment );

const app = createVueApp( BannerConductor, {
page,
bannerConfig: {
delay: runtimeEnvironment.getBannerDelay( 7500 ),
transitionDuration: 1000
},
bannerProps: {
useOfFundsContent: localeFactory.getUseOfFundsLoader().getContent(),
pageScroller: new WindowPageScroller(),
remainingImpressions: impressionCount.getRemainingImpressions( page.getMaxBannerImpressions( 'mobile' ) )
},
resizeHandler: new WindowResizeHandler(),
banner: Banner,
impressionCount
} );

app.use( TranslationPlugin, translator );
app.use( DynamicTextPlugin, {
campaignParameters: page.getCampaignParameters(),
date: new Date(),
formatters: localeFactory.getFormatters(),
impressionCount,
translator
} );
const currencyFormatter = localeFactory.getCurrencyFormatter();

app.provide( 'currencyFormatter', currencyFormatter );
app.provide( 'formItems', createFormItems( translator, currencyFormatter.euroAmount.bind( currencyFormatter ) ) );
app.provide( 'formActions', createFormActions( page.getTracking(), impressionCount ) );
app.provide( 'tracker', tracker );

app.mount( page.getBannerContainer() );
68 changes: 68 additions & 0 deletions archive/mobile/C23_WMDE_Mobile_DE_10/banner_var.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import { createVueApp } from '@src/createVueApp';

import './styles/styles.scss';

import BannerConductor from '@src/components/BannerConductor/BannerConductor.vue';
import Banner from './components/BannerVar.vue';
import { UrlRuntimeEnvironment } from '@src/utils/RuntimeEnvironment';
import { WindowResizeHandler } from '@src/utils/ResizeHandler';
import PageWPORG from '@src/page/PageWPORG';
import { WindowMediaWiki } from '@src/page/MediaWiki/WindowMediaWiki';
import { SkinFactory } from '@src/page/skin/SkinFactory';
import { WindowSizeIssueChecker } from '@src/utils/SizeIssueChecker/WindowSizeIssueChecker';
import TranslationPlugin from '@src/TranslationPlugin';
import { Translator } from '@src/Translator';
import DynamicTextPlugin from '@src/DynamicTextPlugin';
import { LocalImpressionCount } from '@src/utils/LocalImpressionCount';
import { WindowPageScroller } from '@src/utils/PageScroller/WindowPageScroller';
import { LegacyTrackerWPORG } from '@src/tracking/LegacyTrackerWPORG';
import eventMappings from './event_map';

// Locale-specific imports
import messages from './messages_var';
import { LocaleFactoryDe } from '@src/utils/LocaleFactory/LocaleFactoryDe';

// Channel specific form setup
import { createFormItems } from './form_items';
import { createFormActions } from '@src/createFormActions';

const localeFactory = new LocaleFactoryDe();
const translator = new Translator( messages );
const mediaWiki = new WindowMediaWiki();
const page = new PageWPORG( mediaWiki, ( new SkinFactory( mediaWiki ) ).getSkin(), new WindowSizeIssueChecker() );
const runtimeEnvironment = new UrlRuntimeEnvironment( window.location );
const impressionCount = new LocalImpressionCount( page.getTracking().keyword, runtimeEnvironment );
const tracker = new LegacyTrackerWPORG( mediaWiki, page.getTracking().keyword, eventMappings, runtimeEnvironment );

const app = createVueApp( BannerConductor, {
page,
bannerConfig: {
delay: runtimeEnvironment.getBannerDelay( 7500 ),
transitionDuration: 1000
},
bannerProps: {
useOfFundsContent: localeFactory.getUseOfFundsLoader().getContent(),
pageScroller: new WindowPageScroller(),
remainingImpressions: impressionCount.getRemainingImpressions( page.getMaxBannerImpressions( 'mobile' ) )
},
resizeHandler: new WindowResizeHandler(),
banner: Banner,
impressionCount
} );

app.use( TranslationPlugin, translator );
app.use( DynamicTextPlugin, {
campaignParameters: page.getCampaignParameters(),
date: new Date(),
formatters: localeFactory.getFormatters(),
impressionCount,
translator
} );
const currencyFormatter = localeFactory.getCurrencyFormatter();

app.provide( 'currencyFormatter', currencyFormatter );
app.provide( 'formItems', createFormItems( translator, currencyFormatter.euroAmount.bind( currencyFormatter ) ) );
app.provide( 'formActions', createFormActions( page.getTracking(), impressionCount ) );
app.provide( 'tracker', tracker );

app.mount( page.getBannerContainer() );
Loading

0 comments on commit 25e15ff

Please sign in to comment.