{"version":3,"sources":["webpack:///../WCC.UI/App/components/slider/animators/base.ts","webpack:///../WCC.UI/App/components/slider/animators/fade.ts","webpack:///../WCC.UI/App/components/slider/config.ts","webpack:///../WCC.UI/App/components/slider/enums/alignment.ts","webpack:///../WCC.UI/App/components/slider/enums/autoScroll.ts","webpack:///../WCC.UI/App/components/slider/enums/itemState.ts","webpack:///../WCC.UI/App/components/slider/factories/animators.interfaces.ts","webpack:///../WCC.UI/App/components/slider/animators/slide.ts","webpack:///../WCC.UI/App/components/slider/factories/animators.ts","webpack:///../WCC.UI/App/components/slider/factories/layout.interfaces.ts","webpack:///../WCC.UI/App/components/slider/factories/layout.ts","webpack:///../WCC.UI/App/components/slider/item/adaptive/adaptive.html?d061","webpack:///../WCC.UI/App/components/slider/item/adaptive/adaptive.model.ts","webpack:///../WCC.UI/App/components/slider/item/adaptive/adaptive.ts","webpack:///../WCC.UI/App/components/slider/item/base/base.model.ts","webpack:///../WCC.UI/App/components/slider/item/base/base.scss?cbdd","webpack:///../WCC.UI/App/components/slider/item/base/base.ts","webpack:///../WCC.UI/App/components/slider/item/dynamic/dynamic.html?deec","webpack:///../WCC.UI/App/components/slider/item/dynamic/dynamic.model.ts","webpack:///../WCC.UI/App/components/slider/item/dynamic/dynamic.ts","webpack:///../WCC.UI/App/components/slider/item/fullscreen/fullscreen.html?c814","webpack:///../WCC.UI/App/components/slider/item/fullscreen/fullscreen.model.ts","webpack:///../WCC.UI/App/components/slider/item/fullscreen/fullscreen.ts","webpack:///../WCC.UI/App/components/slider/layouts/adaptive.ts","webpack:///../WCC.UI/App/components/slider/layouts/base.ts","webpack:///../WCC.UI/App/components/slider/layouts/dynamic.ts","webpack:///../WCC.UI/App/components/slider/layouts/fullscreen.ts","webpack:///../WCC.UI/App/components/slider/managers/autoScroll.ts","webpack:///../WCC.UI/App/components/slider/managers/resizer.ts","webpack:///../WCC.UI/App/components/slider/models/page.ts","webpack:///../WCC.UI/App/components/slider/slider.html?e9df","webpack:///../WCC.UI/App/components/slider/slider.model.ts","webpack:///../WCC.UI/App/components/slider/slider.scss?fc27","webpack:///../WCC.UI/App/components/slider/slider.ts","webpack:///../WCC.UI/App/decorators/componentModel.ts","webpack:///../WCC.UI/App/managers/animator_new.ts","webpack:///../WCC.UI/App/webpack/runtime/htmlExposer.js","webpack:///../WCC.UI/App/components/slider/item/base/base.scss","webpack:///../WCC.UI/App/components/slider/slider.scss","webpack:///../WCC.UI/App/components/slider/item/adaptive/adaptive.html","webpack:///../WCC.UI/App/components/slider/item/dynamic/dynamic.html","webpack:///../WCC.UI/App/components/slider/item/fullscreen/fullscreen.html","webpack:///../WCC.UI/App/components/slider/slider.html"],"names":["WCCSliderBaseAnimator","WCCAnimator","constructor","config","super","this","shift","width","ko","flattenComputed","spaceBetweenPages","otherPageElementWidth","alignment","nextShift","pureComputed","getShift","extend","rateLimit","notifyIfChanged","pages","pageIdx","areOtherPagesShown","showOtherPages","effects","register","subscribe","update","Math","ceil","getShiftRaw","currentPageIdx","WCCSliderAlignment","right","reduce","result","page","getPageWidth","left","borrowedWidth","WCCSliderFadeAnimator","prevPage","observable","activePage","_","noop","checkIfAllowedToAnimate","undefined","items","prevItems","CollectionsHelpers","compareCollections","getAnimationDuration","getAnimationContext","_page$items","_prevPage$items","prevShift","offset","beforeAnimation","context","forEach","item","opacity","onProgress","progress","newItemsOpacity","oldItemsOpacity","afterAnimation","WCCSliderConfig","WCCSliderAutoScrollMode","WCCSliderItemState","wccSliderAnimatorsFactoryKey","Symbol","WCCSliderSlideAnimator","WCCSliderAnimatorsFactory","build","type","__decorate","injectable","wccSliderLayoutsFactoryKey","WCCSliderLayoutsFactory","WCCSliderDynamicLayout","WCCSliderFullscreenLayout","WCCSliderAdaptiveLayout","content","expose","__esModule","default","WCCSliderAdaptiveItem","WCCSliderItem","component","WCCSliderAdaptiveItemVM","WCCSliderItemVM","model","info","bodyNode","bodyWidth","NodeTracker","node","saveState","applyBindingsToNode","element","__param","inject","wccModules","componentConfig","componentInfo","state","justCreated","deferred","height","isActive","paddingLeft","paddingRight","marginLeft","marginRight","data","getWidth","api","module","i","options","exports","locals","isInactive","not","tracker","isShifted","is","x","toPx","settings","isRTL","init","requestAnimationFrame","active","WCCSliderDynamicItem","borrowed","WCCSliderDynamicItemVM","WCCSliderFullscreenItem","WCCSliderFullscreenItemVM","WCCSliderBaseLayout","itemWidth","pluck","average","queueMicrotask","computed","updateSpaces","getContext","isFinal","pageWidth","isFirst","isLast","length","buildItem","canAddItem","_ref","itemOffset","totalOffset","allItems","hasMultiplePages","freeSpace","pageItems","_$first","_$last","spaceToAddToItem","spaceToAddToBoundaries","first","last","withEffects","source","mapSingle","map","getHeight","buildPages","getSpaceBetweenPages","updateBorders","dispose","Array","itemsToAdd","WCCSliderPage","canAdd","ignoreDependencies","push","fillLastPage","sourcePage","availableItems","reverse","borrowedItems","unshift","idx","minWidth","maxWidth","itemsConfig","getItemsConfig","updatePages","updateBorrowedItems","columnsCount","borrowedItem","floor","updateItems","max","_item$height","WCCSliderAutoScrollManager","_isWindowFocused","animationFrameId","animationPrevFrameTime","mode","getAutoScrollMode","delay","isReady","ready","hasNextPage","isMouseInsideSlider","defaultPage","isEnabled","checkIfShouldEnable","isPauseRequired","animationDuration","isAnimationNeeded","DOMHelpers","on","window","onPageChange","cancelAnimation","animationNeeded","animate","bind","disabled","single","loop","now","change","reset","cancelAnimationFrame","value","openNextPage","selectPage","defer","WCCSliderResizer","prevHeight","trackHeight","_this$height","_this$prevHeight","heightChange","scroll","getBoundingClientRect","top","_this$trackHeight","totalHeightChange","newHeight","scrollPos","document","documentElement","scrollTop","calcWidth","observableArray","concat","contains","includes","WCCSlider","jsonSlider","_jsonSlider$Source","_jsonSlider$Layout","_jsonSlider$Animation","_jsonSlider$SelectedI","_jsonSlider$Alignment","_jsonSlider$ShowContr","_jsonSlider$ShowContr2","_jsonSlider$ShowPages","_jsonSlider$OtherPage","_jsonSlider$AutoScrol","Source","unwrap","layout","Layout","animation","Animation","selectedItem","SelectedItem","Alignment","showControls","ShowControls","showControlsOverContent","ShowControlsOverContent","showPages","ShowPages","centerFirstPage","otherPages","OtherPages","getOtherPagesConfig","autoScroll","AutoScroll","isObject","show","components","registerLocal","require","InversifyHelpers","registerInjectable","container","to","renderStates","pending","WCCSliderVM","layoutsFactory","animatorsFactory","animator","selectedSourceItem","templates","getTemplates","templateNodes","getAlignment","getSource","filter","otherPagesConfig","otherPageElementSize","getOtherElementWidth","find","getPageIdx","nextPage","nextPages","slice","hasPrevPage","prevPages","getDefaultPage","hasInlineControls","layoutConfig","baseConfig","select","updateActiveItems","renderNext","shouldCenter","shouldAlignLeft","shouldAlignRight","mouseenter","mouseleave","openPrevPage","nodes","some","$","contents","toArray","controlNext","controlPrev","findIndex","p","min","activePageItems","canRender","every","itemToRender","componentModel","componentModelMetadataKey","ctor","Reflect","defineMetadata","isAnimationRequired","isAnimating","animationStartTime","isFastAnimationMode","animationContext","canAnimate","allowToAnimateNextFrame","isDisposed","fast","animateNextFrame","system","SystemHelpers","html","getTemplatesAndResources","head","appendChild","___CSS_LOADER_API_IMPORT___"],"mappings":"oJACA,0JAmBc,MAAgBA,UAAoCC,IAe9DC,YAAYC,GACRC,QAEAC,KAAKC,MAAQH,EAAOG,MAEpBD,KAAKE,MAAQC,EAAGC,gBAAgBN,EAAOI,OACvCF,KAAKK,kBAAoBF,EAAGC,gBAAgBN,EAAOO,mBACnDL,KAAKM,sBAAwBH,EAAGC,gBAAgBN,EAAOQ,uBAEvDN,KAAKO,UAAYJ,EAAGC,gBAAgBN,EAAOS,WAE3CP,KAAKQ,UAAYL,EAAGM,aAAa,IAAMT,KAAKU,YAAYC,OAAO,CAAEC,UAAW,GAAIC,iBAAiB,IAEjGb,KAAKc,MAAQX,EAAGC,gBAAgBN,EAAOgB,MAAO,IAC9Cd,KAAKe,QAAUZ,EAAGC,gBAAgBN,EAAOiB,SAEzCf,KAAKgB,mBAAqBb,EAAGC,gBAAgBN,EAAOmB,gBACpDjB,KAAKK,kBAAoBF,E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,EAAOC,EAAI,qnBAAsnB,KAE/oBD,EAAOG,QAAUA,G,4JCJjBA,EADkC,EAAQ,wDAChC2P,EAA4B,IAE9B9L,KAAK,CAAChE,EAAOC,EAAI,wnDAA+nD,KAExpDD,EAAOG,QAAUA,G,4HCHjBH,EAAOG,QAFI,miB,0HCEXH,EAAOG,QAFI,wgB,gICEXH,EAAOG,QAFI,2gB,4GCEXH,EAAOG,QAFI","file":"98.f1353a6377230e557908.js","sourcesContent":["import { Observable, Subscribable, SubscribableOrValue } from \"knockout\";\r\nimport WCCAnimator from \"managers/animator_new\";\r\nimport { WCCSliderAlignment } from \"../enums/alignment\";\r\nimport WCCSliderPage from \"../models/page\";\r\nimport { IWCCSliderAnimator } from \"./animator.interfaces\";\r\n\r\nexport interface WCCSliderBaseAnimatorConfig {\r\n shift: Observable\r\n\r\n width: SubscribableOrValue\r\n spaceBetweenPages: SubscribableOrValue\r\n otherPageElementWidth: SubscribableOrValue \r\n pageIdx: SubscribableOrValue\r\n alignment: SubscribableOrValue\r\n\r\n showOtherPages: SubscribableOrValue\r\n\r\n pages: SubscribableOrValue[]>\r\n}\r\n\r\nexport default abstract class WCCSliderBaseAnimator extends WCCAnimator implements IWCCSliderAnimator {\r\n protected shift: Observable\r\n\r\n protected width: Subscribable\r\n protected spaceBetweenPages: Subscribable\r\n protected otherPageElementWidth: Subscribable \r\n protected nextShift: Subscribable\r\n protected pageIdx: Subscribable\r\n\r\n protected alignment: Subscribable \r\n\r\n protected areOtherPagesShown: Subscribable\r\n\r\n protected pages: Subscribable[]>\r\n\r\n constructor(config: WCCSliderBaseAnimatorConfig) {\r\n super();\r\n\r\n this.shift = config.shift;\r\n\r\n this.width = ko.flattenComputed(config.width);\r\n this.spaceBetweenPages = ko.flattenComputed(config.spaceBetweenPages);\r\n this.otherPageElementWidth = ko.flattenComputed(config.otherPageElementWidth);\r\n\r\n this.alignment = ko.flattenComputed(config.alignment);\r\n\r\n this.nextShift = ko.pureComputed(() => this.getShift()).extend({ rateLimit: 50, notifyIfChanged: true });\r\n\r\n this.pages = ko.flattenComputed(config.pages, []);\r\n this.pageIdx = ko.flattenComputed(config.pageIdx);\r\n\r\n this.areOtherPagesShown = ko.flattenComputed(config.showOtherPages);\r\n this.spaceBetweenPages = ko.flattenComputed(config.spaceBetweenPages);\r\n this.otherPageElementWidth = ko.flattenComputed(config.otherPageElementWidth);\r\n\r\n this.effects.register(this.nextShift.subscribe(nextShift => this.update()));\r\n }\r\n\r\n private getShift() {\r\n return Math.ceil(this.getShiftRaw());\r\n }\r\n\r\n private getShiftRaw() {\r\n const currentPageIdx = this.pageIdx();\r\n\r\n switch (this.alignment()) {\r\n case WCCSliderAlignment.right:\r\n return this.pages().reduce((result, page, pageIdx) => {\r\n if (pageIdx <= currentPageIdx)\r\n return result;\r\n else\r\n return result - this.getPageWidth(page, pageIdx);\r\n }, 0);\r\n\r\n case WCCSliderAlignment.left:\r\n return this.pages().reduce((result, page, pageIdx) => {\r\n if (pageIdx < currentPageIdx)\r\n return result + this.getPageWidth(page, pageIdx);\r\n else if (pageIdx === currentPageIdx)\r\n return result - page.borrowedWidth();\r\n else\r\n return result;\r\n }, 0);\r\n }\r\n }\r\n\r\n private getPageWidth(page: WCCSliderPage, pageIdx: number) {\r\n return page.width() +\r\n (!this.areOtherPagesShown() ? this.spaceBetweenPages() : 0) +\r\n (this.areOtherPagesShown() && pageIdx === 0 ? -this.otherPageElementWidth() : 0);\r\n }\r\n}","import { CollectionsHelpers } from \"helpers/collections\";\r\nimport { Subscribable } from \"knockout\";\r\nimport WCCSliderItem from \"../item/base/base.model\";\r\nimport WCCSliderPage from \"../models/page\";\r\nimport WCCSliderBaseAnimator, { WCCSliderBaseAnimatorConfig } from \"./base\";\r\n\r\ninterface WCCSliderFadeAnimatorContext {\r\n page: WCCSliderPage | undefined\r\n prevPage: WCCSliderPage | undefined\r\n\r\n items: WCCSliderItem[]\r\n prevItems: WCCSliderItem[]\r\n\r\n offset: number\r\n nextShift: number\r\n}\r\n\r\nexport interface WCCSliderFadeAnimatorConfig { }\r\nexport interface WCCSliderFadeAnimatorConfigFull extends WCCSliderBaseAnimatorConfig, WCCSliderFadeAnimatorConfig { }\r\n\r\nexport default class WCCSliderFadeAnimator extends WCCSliderBaseAnimator> {\r\n private prevPage = ko.observable>();\r\n\r\n private activePage: Subscribable | undefined>\r\n\r\n constructor(config: WCCSliderFadeAnimatorConfigFull) {\r\n super(config);\r\n\r\n this.activePage = ko.pureComputed | undefined>(() => this.pages()[this.pageIdx()]);\r\n\r\n this.effects.register([\r\n this.activePage.subscribe(_.noop), //seems like 'beforeChange' doesn't wake up pure computed so need a regular subscription\r\n this.activePage.subscribe(page => this.prevPage(page), null, 'beforeChange')\r\n ]);\r\n }\r\n\r\n protected override checkIfAllowedToAnimate() {\r\n const page = this.activePage();\r\n const prevPage = this.prevPage();\r\n\r\n if (page == undefined || prevPage == undefined || page === prevPage)\r\n return false;\r\n\r\n const items = page.items();\r\n const prevItems = prevPage.items();\r\n\r\n const sameItems = CollectionsHelpers.compareCollections(items, prevItems);\r\n\r\n if (sameItems)\r\n return false;\r\n\r\n return super.checkIfAllowedToAnimate();\r\n }\r\n\r\n protected getAnimationDuration() {\r\n return 500;\r\n }\r\n\r\n protected getAnimationContext() {\r\n const prevShift = this.shift();\r\n const nextShift = this.nextShift();\r\n const offset = nextShift - prevShift;\r\n\r\n const page = this.activePage();\r\n const items = page?.items() ?? [];\r\n\r\n const prevPage = this.prevPage();\r\n const prevItems = prevPage?.items() ?? [];\r\n\r\n return {\r\n page: this.activePage(),\r\n prevPage: this.prevPage(),\r\n\r\n items: items,\r\n prevItems: prevItems,\r\n\r\n offset: offset,\r\n nextShift: nextShift\r\n }\r\n }\r\n\r\n protected override beforeAnimation(context: WCCSliderFadeAnimatorContext) {\r\n super.beforeAnimation(context);\r\n\r\n const {\r\n items,\r\n prevItems,\r\n offset,\r\n nextShift\r\n } = context;\r\n\r\n items.forEach(item => item.opacity(0));\r\n prevItems.forEach(item => item.offset(offset));\r\n\r\n this.shift(nextShift);\r\n }\r\n\r\n protected override onProgress(progress: number, context: WCCSliderFadeAnimatorContext) {\r\n super.onProgress(progress, context);\r\n\r\n const { items, prevItems } = context;\r\n\r\n const newItemsOpacity = progress / 100;\r\n const oldItemsOpacity = 1 - progress / 100;\r\n\r\n items.forEach(item => item.opacity(newItemsOpacity));\r\n prevItems.forEach(item => item.opacity(oldItemsOpacity));\r\n }\r\n\r\n protected override afterAnimation(context: WCCSliderFadeAnimatorContext) {\r\n super.afterAnimation(context);\r\n\r\n const { page, prevItems } = context;\r\n\r\n prevItems.forEach(item => {\r\n item.opacity(1);\r\n item.offset(0);\r\n });\r\n\r\n this.prevPage(page);\r\n }\r\n}","export module WCCSliderConfig {\r\n export const spaceBetweenPages = 80;\r\n}","export enum WCCSliderAlignment {\r\n left = 0,\r\n right = 1\r\n}","export enum WCCSliderAutoScrollMode {\r\n disabled = 0,\r\n single = 1,\r\n loop = 2\r\n}","export enum WCCSliderItemState {\r\n justCreated = 0,\r\n pending = 1,\r\n active = 2\r\n}","import { IWCCSliderAnimator } from \"../animators/animator.interfaces\";\r\nimport { WCCSliderBaseAnimatorConfig } from \"../animators/base\";\r\nimport { WCCSliderAnimatorType } from \"../types/animatorType\";\r\n\r\nexport const wccSliderAnimatorsFactoryKey = Symbol();\r\n\r\n\r\nexport interface ExtendedWCCSlideAnimatorConfig extends WCCSliderBaseAnimatorConfig {\r\n type: WCCSliderAnimatorType\r\n}\r\n\r\nexport interface IWCCSliderAnimatorsFactory {\r\n build(config: ExtendedWCCSlideAnimatorConfig): IWCCSliderAnimator\r\n}","import WCCSliderBaseAnimator, { WCCSliderBaseAnimatorConfig } from \"./base\";\r\n\r\ninterface WCCSliderSlideAnimatorContext {\r\n prevShift: number\r\n offset: number\r\n}\r\n\r\nexport interface WCCSliderSlideAnimatorConfig { }\r\nexport interface WCCSliderSlideAnimatorConfigFull extends WCCSliderBaseAnimatorConfig, WCCSliderSlideAnimatorConfig { }\r\n\r\nexport default class WCCSliderSlideAnimator extends WCCSliderBaseAnimator {\r\n constructor(config: WCCSliderSlideAnimatorConfigFull) {\r\n super(config);\r\n }\r\n\r\n protected getAnimationDuration() {\r\n return 500;\r\n }\r\n\r\n protected getAnimationContext() {\r\n const width = this.width();\r\n const nextShift = this.nextShift();\r\n\r\n let prevShift = this.shift();\r\n let offset = nextShift - prevShift;\r\n\r\n if (offset > width) {\r\n prevShift = nextShift > prevShift ? nextShift - width : nextShift + width;\r\n offset = width;\r\n }\r\n\r\n return {\r\n prevShift: prevShift,\r\n offset: offset\r\n }\r\n }\r\n\r\n protected override onProgress(progress: number, context: WCCSliderSlideAnimatorContext) {\r\n super.onProgress(progress, context);\r\n\r\n const { offset, prevShift } = context;\r\n\r\n this.shift(prevShift + offset * progress / 100);\r\n }\r\n}","import { injectable } from \"inversify\";\r\nimport WCCSliderFadeAnimator from \"../animators/fade\";\r\nimport WCCSliderSlideAnimator from \"../animators/slide\";\r\nimport { ExtendedWCCSlideAnimatorConfig, IWCCSliderAnimatorsFactory } from \"./animators.interfaces\";\r\n\r\n@injectable()\r\nexport default class WCCSliderAnimatorsFactory implements IWCCSliderAnimatorsFactory {\r\n constructor() { }\r\n\r\n build(config: ExtendedWCCSlideAnimatorConfig) {\r\n switch (config.type) {\r\n case 'fade':\r\n return new WCCSliderFadeAnimator(config);\r\n default:\r\n return new WCCSliderSlideAnimator(config);\r\n }\r\n }\r\n}","import WCCSliderAdaptiveItem from \"../item/adaptive/adaptive.model\";\r\nimport WCCSliderItem from \"../item/base/base.model\";\r\nimport WCCSliderDynamicItem from \"../item/dynamic/dynamic.model\";\r\nimport WCCSliderFullscreenItem from \"../item/fullscreen/fullscreen.model\";\r\nimport { WCCSliderAdaptiveLayoutConfig } from \"../layouts/adaptive\";\r\nimport { WCCSliderBaseLayoutConfig } from \"../layouts/base\";\r\nimport { WCCSliderDynamicLayoutConfig } from \"../layouts/dynamic\";\r\nimport { WCCSliderFullscreenLayoutConfig } from \"../layouts/fullscreen\";\r\nimport { IWCCSliderLayout } from \"../layouts/layout.interfaces\";\r\n\r\nexport const wccSliderLayoutsFactoryKey = Symbol();\r\n\r\nexport type ExtendedWCCSliderLayoutConfig = WCCSliderItem> = WCCSliderLayoutConfig & WCCSliderBaseLayoutConfig\r\nexport type ExtendedWCCSliderAdaptiveLayoutConfig = WCCSliderAdaptiveLayoutConfigPublic & WCCSliderBaseLayoutConfig>\r\nexport type ExtendedWCCSliderDynamicLayoutConfig = WCCSliderDynamicLayoutConfigPublic & WCCSliderBaseLayoutConfig>\r\nexport type ExtendedWCCSliderFullscreenLayoutConfig = WCCSliderFullscreenLayoutConfigPublic & WCCSliderBaseLayoutConfig>\r\n\r\nexport type WCCSliderLayoutConfig = WCCSliderAdaptiveLayoutConfigPublic | WCCSliderDynamicLayoutConfigPublic | WCCSliderFullscreenLayoutConfigPublic\r\n\r\nexport interface WCCSliderAdaptiveLayoutConfigPublic extends WCCSliderAdaptiveLayoutConfig {\r\n type: 'adaptive'\r\n}\r\n\r\nexport interface WCCSliderDynamicLayoutConfigPublic extends WCCSliderDynamicLayoutConfig {\r\n type: 'dynamic'\r\n}\r\n\r\nexport interface WCCSliderFullscreenLayoutConfigPublic extends WCCSliderFullscreenLayoutConfig {\r\n type: 'fullscreen'\r\n}\r\n\r\nexport interface IWCCSliderLayoutsFactory {\r\n build(config: ExtendedWCCSliderLayoutConfig): IWCCSliderLayout\r\n}","import { injectable } from \"inversify\";\r\nimport WCCSliderAdaptiveLayout from \"../layouts/adaptive\";\r\nimport WCCSliderDynamicLayout from \"../layouts/dynamic\";\r\nimport WCCSliderFullscreenLayout from \"../layouts/fullscreen\";\r\nimport { IWCCSliderLayout } from \"../layouts/layout.interfaces\";\r\nimport { ExtendedWCCSliderAdaptiveLayoutConfig, ExtendedWCCSliderDynamicLayoutConfig, ExtendedWCCSliderFullscreenLayoutConfig, ExtendedWCCSliderLayoutConfig, IWCCSliderLayoutsFactory } from \"./layout.interfaces\";\r\n\r\n@injectable()\r\nexport default class WCCSliderLayoutsFactory implements IWCCSliderLayoutsFactory {\r\n constructor() { }\r\n\r\n build(config: ExtendedWCCSliderLayoutConfig): IWCCSliderLayout {\r\n const type = config.type;\r\n\r\n switch (type) {\r\n case 'dynamic':\r\n return new WCCSliderDynamicLayout(>config) as any;\r\n case 'fullscreen':\r\n return new WCCSliderFullscreenLayout(>config);\r\n default:\r\n return new WCCSliderAdaptiveLayout(>config);\r\n }\r\n }\r\n}","define([\n \"!!../../../../../node_modules/html-loader/dist/cjs.js??ref--26-1!./adaptive.html\", \n \"!../../../../webpack/runtime/htmlExposer.js\"], function (content, expose) {\n content = content.__esModule ? content.default : content;\n expose(content);\n return content;\n });","import WCCSliderItem from \"../base/base.model\";\r\n\r\nexport default class WCCSliderAdaptiveItem extends WCCSliderItem {\r\n component = 'wcc-slider-item-adaptive';\r\n}","import { wccModules } from \"enums/wccModules\";\r\nimport { inject, injectable } from \"inversify\";\r\nimport { NodeTracker } from 'managers/nodes/tracker';\r\nimport { EffectsContainer } from \"mixins/withEffects\";\r\nimport WCCSliderItemVM from \"../base/base\";\r\nimport './adaptive.html';\r\nimport WCCSliderAdaptiveItem from \"./adaptive.model\";\r\n\r\n@injectable()\r\nexport default class WCCSliderAdaptiveItemVM extends WCCSliderItemVM {\r\n bodyNode = ko.observable();\r\n\r\n constructor(\r\n @inject(wccModules.componentConfig) model: WCCSliderAdaptiveItem,\r\n @inject(wccModules.componentInfo) info: ko.components.ComponentInfo,\r\n @inject(wccModules.effects) effects: EffectsContainer\r\n ) {\r\n super(model, info, effects);\r\n\r\n const { width: bodyWidth } = new NodeTracker({ node: this.bodyNode });\r\n\r\n effects.saveState(model.width);\r\n\r\n effects.register(bodyWidth => {\r\n model.width(bodyWidth);\r\n }, [bodyWidth]);\r\n\r\n ko.applyBindingsToNode(info.element, {\r\n 'css': {\r\n 'wcc-slider__item--adaptive': true\r\n },\r\n\r\n 'attr': {\r\n 'data-width': model.width\r\n }\r\n });\r\n }\r\n}","import { Observable } from 'knockout';\r\nimport { WCCSliderItemState } from '../../enums/itemState';\r\n\r\nexport interface WCCSliderItemConfig {\r\n data: T\r\n}\r\n\r\nexport default abstract class WCCSliderItem {\r\n abstract component: string\r\n\r\n state = ko.observable(WCCSliderItemState.justCreated);\r\n width = ko.observable(0).extend({ deferred: true });\r\n height = ko.observable().extend({ deferred: true });\r\n isActive = ko.observable(false);\r\n\r\n paddingLeft = ko.observable(0).extend({ deferred: true });\r\n paddingRight = ko.observable(0).extend({ deferred: true });\r\n marginLeft = ko.observable(0).extend({ deferred: true });\r\n marginRight = ko.observable(0).extend({ deferred: true });\r\n\r\n opacity = ko.observable(1);\r\n offset = ko.observable(0);\r\n\r\n data: Observable \r\n\r\n constructor(config: WCCSliderItemConfig) {\r\n this.data = ko.observable(config.data);\r\n }\r\n\r\n getWidth(): number {\r\n return this.width();\r\n }\r\n}","var api = require(\"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./base.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","import { WCCSliderItemState } from 'components/slider/enums/itemState';\r\nimport { wccModules } from \"enums/wccModules\";\r\nimport { inject, injectable } from \"inversify\";\r\nimport { Observable, Subscribable } from \"knockout\";\r\nimport { NodeTracker } from \"managers/nodes/tracker\";\r\nimport { EffectsContainer } from \"mixins/withEffects\";\r\nimport WCCSliderItem from \"./base.model\";\r\nimport './base.scss';\r\n\r\n@injectable()\r\nexport default class WCCSliderItemVM {\r\n data: Observable\r\n\r\n opacity: Observable\r\n offset: Observable\r\n\r\n paddingLeft: Observable\r\n paddingRight: Observable\r\n marginLeft: Observable\r\n marginRight: Observable\r\n\r\n height: Subscribable\r\n\r\n isActive: Subscribable\r\n isInactive: Subscribable\r\n isShifted: Subscribable\r\n\r\n constructor(\r\n @inject(wccModules.componentConfig) private model: WCCSliderItem,\r\n @inject(wccModules.componentInfo) info: ko.components.ComponentInfo,\r\n @inject(wccModules.effects) effects: EffectsContainer\r\n ) {\r\n this.data = model.data;\r\n\r\n this.opacity = model.opacity;\r\n this.offset = model.offset;\r\n\r\n this.isActive = model.isActive;\r\n this.isInactive = model.isActive.not();\r\n\r\n const tracker = new NodeTracker({ node: info.element });\r\n this.height = tracker.height;\r\n\r\n this.paddingLeft = model.paddingLeft;\r\n this.paddingRight = model.paddingRight;\r\n this.marginLeft = model.marginLeft;\r\n this.marginRight = model.marginRight;\r\n\r\n this.isShifted = this.offset.is(offset => offset > 0);\r\n\r\n effects.saveState(model.height);\r\n\r\n effects.register(height => {\r\n model.height(height);\r\n }, [this.height]);\r\n\r\n ko.applyBindingsToNode(info.element, {\r\n 'translate': { x: this.offset },\r\n\r\n 'css': {\r\n 'wcc-animated fadeIn': true,\r\n 'wcc-slider__item': true,\r\n 'wcc-slider__item--shifted': this.isShifted,\r\n 'wcc-slider__item--inactive': this.isInactive \r\n },\r\n\r\n 'style': {\r\n 'opacity': this.opacity,\r\n 'padding-left': this.paddingLeft.toPx(),\r\n 'padding-right': this.paddingRight.toPx(),\r\n 'margin-left': this.marginLeft.toPx(),\r\n 'margin-right': this.marginRight.toPx()\r\n },\r\n\r\n 'attr': {\r\n 'dir': ko.pureComputed(() => settings.isRTL() ? 'rtl' : 'ltr')\r\n }\r\n });\r\n }\r\n\r\n init() {\r\n requestAnimationFrame(() => {\r\n this.model.state(WCCSliderItemState.active);\r\n });\r\n }\r\n}","define([\n \"!!../../../../../node_modules/html-loader/dist/cjs.js??ref--26-1!./dynamic.html\", \n \"!../../../../webpack/runtime/htmlExposer.js\"], function (content, expose) {\n content = content.__esModule ? content.default : content;\n expose(content);\n return content;\n });","import WCCSliderItem from \"../base/base.model\";\r\n\r\nexport default class WCCSliderDynamicItem extends WCCSliderItem {\r\n component = 'wcc-slider-item-dynamic';\r\n\r\n borrowed = ko.observable(false).extend({ deferred: true });\r\n borrowedWidth = ko.observable(0).extend({ deferred: true });\r\n\r\n override getWidth(): number {\r\n return this.borrowed() ? this.borrowedWidth() : this.width();\r\n }\r\n}","import { wccModules } from \"enums/wccModules\";\r\nimport { inject } from \"inversify\";\r\nimport { Subscribable } from \"knockout\";\r\nimport { EffectsContainer } from \"mixins/withEffects\";\r\nimport WCCSliderItemVM from \"../base/base\";\r\nimport WCCSliderDynamicItem from \"./dynamic.model\";\r\nimport './dynamic.html';\r\n\r\nexport default class WCCSliderDynamicItemVM extends WCCSliderItemVM {\r\n width: Subscribable\r\n\r\n constructor(\r\n @inject(wccModules.componentConfig) model: WCCSliderDynamicItem,\r\n @inject(wccModules.componentInfo) info: ko.components.ComponentInfo,\r\n @inject(wccModules.effects) effects: EffectsContainer\r\n ) {\r\n super(model, info, effects);\r\n\r\n this.width = ko.pureComputed(() => model.getWidth());\r\n\r\n ko.applyBindingsToNode(info.element, {\r\n 'css': {\r\n 'wcc-slider__item--dynamic': true\r\n },\r\n 'style': {\r\n 'width': this.width.toPx(true)\r\n }\r\n });\r\n }\r\n}","define([\n \"!!../../../../../node_modules/html-loader/dist/cjs.js??ref--26-1!./fullscreen.html\", \n \"!../../../../webpack/runtime/htmlExposer.js\"], function (content, expose) {\n content = content.__esModule ? content.default : content;\n expose(content);\n return content;\n });","import WCCSliderItem from \"../base/base.model\";\r\n\r\nexport default class WCCSliderFullscreenItem extends WCCSliderItem {\r\n component = 'wcc-slider-item-fullscreen';\r\n}","import { wccModules } from \"enums/wccModules\";\r\nimport { inject, injectable } from \"inversify\";\r\nimport { Subscribable } from \"knockout\";\r\nimport { EffectsContainer } from \"mixins/withEffects\";\r\nimport WCCSliderItemVM from \"../base/base\";\r\nimport WCCSliderFullscreenItem from \"./fullscreen.model\";\r\nimport './fullscreen.html';\r\n\r\n@injectable()\r\nexport default class WCCSliderFullscreenItemVM extends WCCSliderItemVM {\r\n width: Subscribable\r\n\r\n constructor(\r\n @inject(wccModules.componentConfig) model: WCCSliderFullscreenItem,\r\n @inject(wccModules.componentInfo) info: ko.components.ComponentInfo,\r\n @inject(wccModules.effects) effects: EffectsContainer\r\n ) {\r\n super(model, info, effects);\r\n\r\n this.width = model.width;\r\n\r\n ko.applyBindingsToNode(info.element, {\r\n 'css': {\r\n 'wcc-slider__item--fullscreen': true\r\n },\r\n\r\n 'style': {\r\n 'width': this.width.toPx()\r\n }\r\n });\r\n }\r\n}","import { Subscribable, SubscribableOrNullableValue } from \"knockout\";\r\nimport WCCSliderAdaptiveItem from \"../item/adaptive/adaptive.model\";\r\nimport WCCSliderItem from \"../item/base/base.model\";\r\nimport WCCSliderPage from \"../models/page\";\r\nimport WCCSliderBaseLayout, { WCCSliderBaseLayoutConfig } from \"./base\";\r\n\r\nexport interface WCCSliderAdaptiveLayoutContext {\r\n page: WCCSliderPage>\r\n pageWidth: number\r\n}\r\n\r\nexport interface WCCSliderAdaptiveLayoutConfig {\r\n offset?: SubscribableOrNullableValue\r\n}\r\n\r\nexport interface WCCSliderAdaptiveLayoutConfigFull extends WCCSliderBaseLayoutConfig>, WCCSliderAdaptiveLayoutConfig { }\r\n\r\nexport default class WCCSliderAdaptiveLayout extends WCCSliderBaseLayout, WCCSliderAdaptiveLayoutContext> {\r\n private offset: Subscribable\r\n\r\n itemWidth: Subscribable \r\n\r\n constructor(config: WCCSliderAdaptiveLayoutConfigFull) {\r\n super(config);\r\n\r\n this.offset = ko.flattenComputed(config.offset);\r\n\r\n this.itemWidth = this.items.pluck(item => item.width).average(); \r\n\r\n queueMicrotask(() => {\r\n this.effects.register([\r\n ko.computed(() => this.updateSpaces()).extend({ deferred: true })\r\n ]);\r\n });\r\n }\r\n\r\n protected getContext(pages: WCCSliderPage>[], page: WCCSliderPage>, isFinal = false) {\r\n const pageWidth = this.getPageWidth({\r\n isFirst: page === pages[0],\r\n isLast: isFinal && page === pages[pages.length - 1]\r\n });\r\n\r\n return {\r\n page: page,\r\n pageWidth: pageWidth\r\n };\r\n }\r\n\r\n protected buildItem(data: T) {\r\n return new WCCSliderAdaptiveItem({ data });\r\n }\r\n\r\n protected canAddItem(item: WCCSliderItem, { page, pageWidth }: WCCSliderAdaptiveLayoutContext): boolean {\r\n const itemOffset = this.offset();\r\n const totalOffset = itemOffset != undefined ? itemOffset * (page.allItems().length + 1) : 0;\r\n\r\n return page.width() + page.borrowedWidth() + totalOffset + item.width() <= pageWidth;\r\n }\r\n\r\n private updateSpaces() {\r\n const page = this.activePage();\r\n const hasMultiplePages = this.pages().length > 1;\r\n const offset = this.offset();\r\n\r\n for (const item of this.items()) {\r\n item.paddingLeft(0);\r\n item.paddingRight(0);\r\n }\r\n\r\n if (page != undefined && (hasMultiplePages || offset != undefined)) {\r\n const context = this.getContext(this.pages(), page, true);\r\n const pageWidth = context.pageWidth;\r\n\r\n const freeSpace = pageWidth - page.width() - page.borrowedWidth();\r\n const pageItems = page.allItems();\r\n\r\n if (freeSpace > 0 && pageItems.length > 1) {\r\n let spaceToAddToItem = 0,\r\n spaceToAddToBoundaries = 0;\r\n\r\n if (offset != undefined) {\r\n spaceToAddToItem = offset;\r\n spaceToAddToBoundaries = freeSpace - offset * (page.allItems().length - 1);\r\n } else {\r\n spaceToAddToItem = freeSpace / (page.allItems().length - 1)\r\n }\r\n\r\n for (const item of pageItems) {\r\n item.paddingLeft(spaceToAddToItem / 2);\r\n item.paddingRight(spaceToAddToItem / 2);\r\n }\r\n\r\n _.first(pageItems)?.paddingLeft(spaceToAddToBoundaries / 2);\r\n _.last(pageItems)?.paddingRight(spaceToAddToBoundaries / 2);\r\n }\r\n }\r\n }\r\n}","import { Subscribable, SubscribableOrNullableValue } from \"knockout\";\r\nimport { withEffects } from \"mixins/withEffects\";\r\nimport { WCCSliderConfig } from \"../config\";\r\nimport WCCSliderItem from \"../item/base/base.model\";\r\nimport WCCSliderPage from \"../models/page\";\r\nimport { IWCCSliderLayout } from \"./layout.interfaces\";\r\n\r\nexport interface WCCSliderBaseLayoutConfig> {\r\n source: SubscribableOrNullableValue\r\n\r\n width: SubscribableOrNullableValue\r\n otherPageElementWidth: SubscribableOrNullableValue\r\n\r\n activePage: SubscribableOrNullableValue>\r\n\r\n showOtherPages: SubscribableOrNullableValue\r\n}\r\n\r\nexport interface WCCSliderLayoutPageWidthCalculationConfig {\r\n isFirst: boolean\r\n isLast: boolean\r\n}\r\n\r\nexport default abstract class WCCSliderBaseLayout, C> implements IWCCSliderLayout {\r\n protected effects = withEffects();\r\n\r\n protected width: Subscribable\r\n protected otherPageElementWidth: Subscribable\r\n protected areOtherPagesShown: Subscribable\r\n\r\n protected activePage: Subscribable | undefined>\r\n\r\n items: Subscribable\r\n pages: Subscribable[]>\r\n\r\n height: Subscribable\r\n spaceBetweenPages: Subscribable\r\n abstract itemWidth: Subscribable\r\n\r\n constructor(config: WCCSliderBaseLayoutConfig) {\r\n this.activePage = ko.flattenComputed(config.activePage);\r\n\r\n const source = ko.flattenComputed(config.source, []);\r\n\r\n this.width = ko.flattenComputed(config.width, 0);\r\n this.otherPageElementWidth = ko.flattenComputed(config.otherPageElementWidth, 0);\r\n this.areOtherPagesShown = ko.flattenComputed(config.showOtherPages, false);\r\n\r\n this.items = source\r\n .mapSingle(source => this.width() > 0 ? source : [])\r\n .map(data => this.buildItem(data), this);\r\n\r\n this.height = ko.pureComputed(() => this.getHeight());\r\n\r\n this.pages = this.items.mapSingle(items => this.buildPages(items)).extend({ deferred: true });\r\n this.spaceBetweenPages = ko.pureComputed(() => this.getSpaceBetweenPages());\r\n\r\n queueMicrotask(() => {\r\n this.effects.register([\r\n ko.computed(() => this.updateBorders(), this).extend({ deferred: true })\r\n ]);\r\n })\r\n }\r\n\r\n dispose() {\r\n this.effects.dispose();\r\n }\r\n\r\n protected abstract buildItem(data: T): I\r\n protected abstract getContext(pages: WCCSliderPage[], page: WCCSliderPage, isFinal?: boolean): C\r\n protected abstract canAddItem(item: I, context: C): boolean\r\n\r\n protected getPageWidth(config: WCCSliderLayoutPageWidthCalculationConfig) {\r\n if (config.isFirst && config.isLast || !this.areOtherPagesShown()) {\r\n return this.width();\r\n } else {\r\n if (config.isFirst || config.isLast) {\r\n return this.width() - this.otherPageElementWidth();\r\n } else {\r\n return this.width() - this.otherPageElementWidth() * 2;\r\n }\r\n }\r\n } \r\n\r\n protected getSpaceBetweenPages(): number {\r\n return WCCSliderConfig.spaceBetweenPages;\r\n }\r\n\r\n protected getHeight(): number | undefined {\r\n return undefined;\r\n }\r\n\r\n private buildPages(items: I[]) {\r\n const pages = new Array>();\r\n const itemsToAdd = [...items];\r\n\r\n while (itemsToAdd.length > 0) {\r\n const page = new WCCSliderPage();\r\n const context = this.getContext(pages.length > 0 ? pages : [page], page);\r\n\r\n const canAdd = () => itemsToAdd.length > 0 && this.canAddItem(itemsToAdd[0], context);\r\n\r\n while (ko.ignoreDependencies(canAdd)) {\r\n const item = itemsToAdd.shift();\r\n item.width(); //read width to force reevaluation on change\r\n\r\n page.items.push(item);\r\n }\r\n\r\n if (page.items().length > 0) {\r\n pages.push(page);\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n ko.ignoreDependencies(() => {\r\n if (pages.length > 1)\r\n this.fillLastPage(pages[pages.length - 1], pages[pages.length - 2], pages);\r\n });\r\n\r\n return pages;\r\n }\r\n\r\n private fillLastPage(page: WCCSliderPage, sourcePage: WCCSliderPage, pages: WCCSliderPage[]) {\r\n const context = this.getContext(pages, page, true);\r\n\r\n const availableItems = [...sourcePage.items()].reverse();\r\n\r\n for (const item of availableItems) {\r\n const canAdd = this.canAddItem(item, context);\r\n\r\n if (canAdd)\r\n page.borrowedItems.unshift(item);\r\n else\r\n break; \r\n }\r\n } \r\n\r\n private updateBorders() {\r\n if (!this.areOtherPagesShown()) {\r\n this.pages().forEach((page, pageIdx) => {\r\n const items = page === this.activePage() ? page.allItems() : page.items();\r\n\r\n items.forEach((item, idx) => { item.marginLeft(pageIdx > 0 && idx === 0 ? this.spaceBetweenPages() : 0) });\r\n }, this);\r\n }\r\n } \r\n}","import { Subscribable, SubscribableOrNullableValue, SubscribableOrValue } from \"knockout\";\r\nimport WCCSliderItem from \"../item/base/base.model\";\r\nimport WCCSliderDynamicItem from \"../item/dynamic/dynamic.model\";\r\nimport WCCSliderPage from \"../models/page\";\r\nimport WCCSliderBaseLayout, { WCCSliderBaseLayoutConfig } from \"./base\";\r\n\r\nexport interface WCCSliderDynamicLayoutContext {\r\n page: WCCSliderPage>\r\n itemWidth: number\r\n columnsCount: number\r\n}\r\n\r\nexport interface WCCSliderDynamicLayoutConfig {\r\n minWidth: SubscribableOrValue\r\n maxWidth: SubscribableOrValue\r\n offset?: SubscribableOrNullableValue\r\n}\r\n\r\nexport interface WCCSliderDynamicLayoutConfigFull extends WCCSliderBaseLayoutConfig>, WCCSliderDynamicLayoutConfig { }\r\n\r\nexport default class WCCSliderDynamicLayout extends WCCSliderBaseLayout, WCCSliderDynamicLayoutContext> {\r\n minWidth: Subscribable\r\n maxWidth: Subscribable\r\n offset: Subscribable\r\n\r\n itemWidth: Subscribable\r\n\r\n constructor(config: WCCSliderDynamicLayoutConfigFull) {\r\n super(config);\r\n\r\n this.minWidth = ko.flattenComputed(config.minWidth);\r\n this.maxWidth = ko.flattenComputed(config.maxWidth);\r\n this.offset = ko.flattenComputed(config.offset, 0);\r\n\r\n const itemsConfig = ko.pureComputed(() => this.getItemsConfig(this.width()));\r\n\r\n this.itemWidth = itemsConfig.pluck(config => config.itemWidth);\r\n\r\n queueMicrotask(() => {\r\n this.effects.register([\r\n ko.computed(() => this.updatePages()).extend({ deferred: true }),\r\n ko.computed(() => this.updateBorrowedItems()).extend({ deferred: true })\r\n ]);\r\n })\r\n }\r\n\r\n protected buildItem(data: T): WCCSliderDynamicItem {\r\n return new WCCSliderDynamicItem({ data });\r\n }\r\n\r\n protected canAddItem(item: WCCSliderItem, { page, columnsCount }: WCCSliderDynamicLayoutContext): boolean {\r\n return page.allItems().length < columnsCount;\r\n } \r\n\r\n protected getContext(pages: WCCSliderPage>[], page: WCCSliderPage>, isFinal = false) {\r\n let config = this.getItemsConfig(this.getPageWidth({\r\n isFirst: page === pages[0],\r\n isLast: isFinal && page === pages[pages.length - 1]\r\n }));\r\n\r\n return {\r\n page: page,\r\n itemWidth: config.itemWidth,\r\n columnsCount: config.columnsCount\r\n };\r\n }\r\n\r\n private updatePages() {\r\n const offset = this.offset();\r\n\r\n this.pages().forEach((page, idx, pages) => {\r\n const context = this.getContext(pages, page, true);\r\n const itemWidth = context.itemWidth;\r\n\r\n page.items().forEach((item, idx) => {\r\n item.borrowedWidth(0);\r\n\r\n if (idx > 0 || this.areOtherPagesShown()) {\r\n item.width(itemWidth + offset);\r\n item.paddingLeft(offset);\r\n } else {\r\n item.width(itemWidth);\r\n item.paddingLeft(0);\r\n }\r\n });\r\n\r\n page.borrowedItems().forEach(borrowedItem => borrowedItem.borrowedWidth(itemWidth));\r\n });\r\n }\r\n\r\n private updateBorrowedItems() {\r\n var activePage = this.activePage();\r\n\r\n this.pages().forEach(page => {\r\n page.items().forEach(item => item.borrowed(false));\r\n\r\n if (page === activePage)\r\n page.borrowedItems().forEach(item => item.borrowed(true));\r\n });\r\n }\r\n\r\n private getItemsConfig(pageWidth: number) {\r\n const minWidth = this.minWidth();\r\n const maxWidth = this.maxWidth();\r\n const offset = this.offset();\r\n\r\n if (pageWidth < minWidth)\r\n return {\r\n itemWidth: pageWidth,\r\n columnsCount: 1\r\n };\r\n\r\n let columnsCount = Math.ceil(pageWidth / maxWidth),\r\n itemWidth = Math.floor(pageWidth / columnsCount);\r\n\r\n if (itemWidth < minWidth) {\r\n columnsCount = Math.floor(pageWidth / minWidth);\r\n itemWidth = Math.floor(pageWidth / columnsCount);\r\n }\r\n\r\n if (offset > 0)\r\n itemWidth = Math.floor((pageWidth - offset * (columnsCount - 1)) / columnsCount);\r\n\r\n return {\r\n itemWidth: itemWidth,\r\n columnsCount: columnsCount\r\n }\r\n }\r\n}","import { Subscribable } from \"knockout\";\r\nimport WCCSliderFullscreenItem from \"../item/fullscreen/fullscreen.model\";\r\nimport WCCSliderPage from \"../models/page\";\r\nimport WCCSliderBaseLayout, { WCCSliderBaseLayoutConfig, WCCSliderLayoutPageWidthCalculationConfig } from \"./base\";\r\n\r\nexport interface WCCSliderFullscreenLayoutContext {\r\n page: WCCSliderPage>\r\n}\r\n\r\nexport interface WCCSliderFullscreenLayoutConfig { }\r\nexport interface WCCSliderFullscreenLayoutConfigFull extends WCCSliderBaseLayoutConfig>, WCCSliderFullscreenLayoutConfig { }\r\n\r\nexport default class WCCSliderFullscreenLayout extends WCCSliderBaseLayout, WCCSliderFullscreenLayoutContext> {\r\n itemWidth: Subscribable\r\n\r\n constructor(config: WCCSliderFullscreenLayoutConfigFull) {\r\n super(config);\r\n\r\n this.itemWidth = this.width;\r\n\r\n queueMicrotask(() => {\r\n this.effects.register([\r\n ko.computed(() => this.updateItems()).extend({ deferred: true })\r\n ]);\r\n });\r\n }\r\n\r\n protected override getPageWidth(config: WCCSliderLayoutPageWidthCalculationConfig) {\r\n return this.width();\r\n }\r\n\r\n protected override getHeight() {\r\n const page = this.activePage();\r\n\r\n if (page != undefined) {\r\n const items = page.items();\r\n\r\n if (items.length > 0)\r\n return Math.max(...items.map(item => item.height() ?? 0));\r\n }\r\n }\r\n\r\n protected getContext(pages: WCCSliderPage>[], page: WCCSliderPage>, isFinal = false) {\r\n return { page }\r\n }\r\n\r\n protected buildItem(data: T) {\r\n return new WCCSliderFullscreenItem({ data: data });\r\n }\r\n\r\n protected canAddItem(item: WCCSliderFullscreenItem, { page }: WCCSliderFullscreenLayoutContext) {\r\n return page.items().length === 0;\r\n }\r\n\r\n private updateItems() {\r\n this.items().forEach(item => item.width(this.width()));\r\n }\r\n\r\n protected override getSpaceBetweenPages() {\r\n return 0;\r\n } \r\n}","import { DOMHelpers } from \"helpers/dom\";\r\nimport { Subscribable, SubscribableOrNullableValue } from \"knockout\";\r\nimport { withEffects } from \"mixins/withEffects\";\r\nimport { WCCSliderAutoScrollMode } from \"../enums/autoScroll\";\r\nimport WCCSliderPage from \"../models/page\";\r\nimport { WCCSliderAutoScrollType } from \"../types/autoscrollType\";\r\n\r\nexport interface WCCSliderAutoScrollManagerConfig extends WCCSliderAutoScrollManagerConfigPublic {\r\n ready: SubscribableOrNullableValue\r\n hasNextPage: SubscribableOrNullableValue\r\n hasMultiplePages: SubscribableOrNullableValue\r\n isMouseInsideSlider: SubscribableOrNullableValue\r\n activePage: SubscribableOrNullableValue>\r\n defaultPage: SubscribableOrNullableValue>\r\n\r\n openNextPage: Action\r\n selectPage: Action<[page: WCCSliderPage]>\r\n}\r\n\r\nexport interface WCCSliderAutoScrollManagerConfigPublic {\r\n type?: SubscribableOrNullableValue\r\n delay?: SubscribableOrNullableValue\r\n}\r\n\r\nexport default class WCCSliderAutoScrollManager {\r\n private effects = withEffects();\r\n\r\n private _isWindowFocused = ko.observable(true);\r\n private animationFrameId = ko.observable();\r\n private animationPrevFrameTime = ko.observable();\r\n\r\n private mode: Subscribable\r\n private delay: Subscribable\r\n private animationDuration: Subscribable\r\n\r\n private activePage: Subscribable | undefined>\r\n private defaultPage: Subscribable | undefined>\r\n\r\n private isReady: Subscribable\r\n private hasNextPage: Subscribable\r\n private hasMultiplePages: Subscribable\r\n private isAnimationNeeded: Subscribable\r\n\r\n progress = ko.observable(0);\r\n\r\n isEnabled: Subscribable\r\n\r\n constructor(private config: WCCSliderAutoScrollManagerConfig) {\r\n const type = ko.flattenComputed(config.type);\r\n this.mode = ko.pureComputed(() => this.getAutoScrollMode(type()));\r\n\r\n this.delay = ko.flattenComputed(config.delay, 10); \r\n\r\n this.isReady = ko.flattenComputed(config.ready, true);\r\n this.hasNextPage = ko.flattenComputed(config.hasNextPage, false);\r\n this.hasMultiplePages = ko.flattenComputed(config.hasMultiplePages, false);\r\n const isMouseInsideSlider = ko.flattenComputed(config.isMouseInsideSlider, false);\r\n\r\n this.activePage = ko.flattenComputed(config.activePage);\r\n this.defaultPage = ko.flattenComputed(config.defaultPage);\r\n\r\n this.isEnabled = ko.pureComputed(() => this.checkIfShouldEnable());\r\n const isPauseRequired = ko.pureComputed(() => isMouseInsideSlider() || !this._isWindowFocused());\r\n \r\n this.animationDuration = ko.pureComputed(() => this.getAnimationDuration());\r\n\r\n this.isAnimationNeeded = ko.pureComputed(() => this.isReady() && this.isEnabled() && !isPauseRequired() && this.progress() < 100);\r\n\r\n queueMicrotask(() => {\r\n this.effects.register([\r\n DOMHelpers.on(window, 'focus', () => this._isWindowFocused(true)),\r\n DOMHelpers.on(window, 'blur', () => this._isWindowFocused(false)),\r\n\r\n this.progress.subscribe(progress => this.onProgress(progress)),\r\n this.activePage.subscribe(() => this.onPageChange()),\r\n\r\n { dispose: () => this.cancelAnimation() }\r\n ]); \r\n\r\n this.effects.register(animationNeeded => {\r\n if (animationNeeded) {\r\n if (this.animationFrameId() == null)\r\n this.animationFrameId(requestAnimationFrame(this.animate.bind(this)));\r\n } else {\r\n this.cancelAnimation();\r\n }\r\n }, [this.isAnimationNeeded]);\r\n });\r\n }\r\n\r\n dispose() {\r\n this.effects.dispose();\r\n }\r\n\r\n private checkIfShouldEnable() {\r\n if (this.delay() > 0) {\r\n switch (this.mode()) {\r\n case WCCSliderAutoScrollMode.disabled: return false;\r\n case WCCSliderAutoScrollMode.single: return this.hasNextPage();\r\n case WCCSliderAutoScrollMode.loop: return this.hasMultiplePages();\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private getAnimationDuration() {\r\n return this.delay();\r\n }\r\n\r\n private animate(now: number) {\r\n const animationPrevFrameTime = this.animationPrevFrameTime();\r\n\r\n if (animationPrevFrameTime != undefined) {\r\n const start = animationPrevFrameTime;\r\n const change = (now - start) / 1000;\r\n\r\n let progress = this.progress() + change / this.animationDuration() * 100;\r\n\r\n if (progress > 100)\r\n progress = 100;\r\n\r\n this.progress(progress);\r\n }\r\n\r\n if (this.isAnimationNeeded()) {\r\n this.animationPrevFrameTime(now);\r\n this.animationFrameId(requestAnimationFrame(this.animate.bind(this)));\r\n } else {\r\n this.cancelAnimation();\r\n }\r\n }\r\n\r\n private reset() {\r\n this.progress(0);\r\n }\r\n\r\n private cancelAnimation() {\r\n const animationFrameId = this.animationFrameId();\r\n\r\n if (animationFrameId != undefined) {\r\n window.cancelAnimationFrame(animationFrameId);\r\n this.animationFrameId(undefined);\r\n this.animationPrevFrameTime(undefined);\r\n }\r\n }\r\n\r\n private onProgress(value: number) {\r\n if (value === 100) {\r\n if (this.hasNextPage()) {\r\n this.config.openNextPage();\r\n } else {\r\n const defaultPage = this.defaultPage();\r\n\r\n if (defaultPage != undefined)\r\n this.config.selectPage(defaultPage);\r\n }\r\n\r\n _.defer(() => this.reset());\r\n }\r\n }\r\n\r\n private onPageChange() {\r\n this.reset();\r\n }\r\n\r\n private getAutoScrollMode(type?: WCCSliderAutoScrollType) {\r\n switch (type) {\r\n case 'single': return WCCSliderAutoScrollMode.single;\r\n case 'loop': return WCCSliderAutoScrollMode.loop;\r\n default: return WCCSliderAutoScrollMode.disabled;\r\n }\r\n }\r\n}","import { Observable, Subscribable, SubscribableOrNullableValue } from \"knockout\";\r\nimport WCCAnimator from \"managers/animator_new\";\r\n\r\ninterface WCCSliderResizerContext {\r\n height: number\r\n prevHeight: number\r\n heightChange: number\r\n scroll: boolean\r\n}\r\n\r\nexport interface WCCSliderResizerConfig {\r\n element: HTMLElement\r\n trackHeight: Observable\r\n\r\n height: SubscribableOrNullableValue \r\n}\r\n\r\nexport default class WCCSliderResizer extends WCCAnimator {\r\n private prevHeight = ko.observable();\r\n\r\n private element: HTMLElement\r\n private trackHeight: Observable\r\n\r\n private height: Subscribable \r\n\r\n constructor(config: WCCSliderResizerConfig) {\r\n super();\r\n\r\n this.element = config.element;\r\n this.trackHeight = config.trackHeight;\r\n\r\n this.height = ko.flattenComputed(config.height); \r\n\r\n queueMicrotask(() => {\r\n this.effects.register([\r\n this.trackHeight.subscribe(trackHeight => this.prevHeight(trackHeight)),\r\n this.height.subscribe(() => this.update())\r\n ]);\r\n });\r\n }\r\n\r\n protected override checkIfAllowedToAnimate() {\r\n const height = this.height();\r\n const prevHeight = this.prevHeight();\r\n\r\n return super.checkIfAllowedToAnimate() &&\r\n height != undefined &&\r\n height > 0 &&\r\n prevHeight != undefined &&\r\n prevHeight > 0;\r\n }\r\n\r\n protected getAnimationDuration() {\r\n return 500;\r\n }\r\n\r\n protected getAnimationContext() {\r\n const height = this.height() ?? 0;\r\n const prevHeight = this.prevHeight() ?? 0;\r\n const heightChange = height - prevHeight;\r\n\r\n const rect = this.element.getBoundingClientRect();\r\n const scroll = rect.top < 0;\r\n\r\n return {\r\n height: height,\r\n prevHeight: prevHeight,\r\n heightChange: heightChange,\r\n scroll: scroll\r\n }\r\n }\r\n\r\n protected override onProgress(progress: number, context: WCCSliderResizerContext) {\r\n super.onProgress(progress, context);\r\n\r\n const {\r\n prevHeight,\r\n heightChange: totalHeightChange,\r\n scroll\r\n } = context;\r\n\r\n const currentHeight = this.trackHeight() ?? 0;\r\n const newHeight = prevHeight + totalHeightChange * progress / 100;\r\n const heightChange = newHeight - currentHeight;\r\n const scrollPos = document.documentElement.scrollTop;\r\n\r\n if (progress > 0 && scroll)\r\n document.documentElement.scrollTop = scrollPos + heightChange;\r\n\r\n this.trackHeight(newHeight);\r\n }\r\n}","import { Subscribable } from \"knockout\";\r\nimport WCCSliderItem from \"../item/base/base.model\";\r\n\r\nconst calcWidth = >(result: number, item: I) => result + item.getWidth();\r\n\r\nexport default class WCCSliderPage = WCCSliderItem> {\r\n items = ko.observableArray();\r\n borrowedItems = ko.observableArray();\r\n\r\n width: Subscribable\r\n borrowedWidth: Subscribable\r\n\r\n allItems: Subscribable\r\n\r\n constructor() {\r\n this.allItems = this.borrowedItems.concat(this.items);\r\n\r\n this.width = this.items.reduce(calcWidth, () => 0);\r\n this.borrowedWidth = this.borrowedItems.reduce(calcWidth, () => 0);\r\n }\r\n\r\n contains(item: I) {\r\n return this.items().includes(item);\r\n }\r\n}","define([\n \"!!../../../node_modules/html-loader/dist/cjs.js??ref--26-1!./slider.html\", \n \"!../../webpack/runtime/htmlExposer.js\"], function (content, expose) {\n content = content.__esModule ? content.default : content;\n expose(content);\n return content;\n });","import { PureComputed } from \"knockout\"\r\nimport { WCCSliderAlignment } from \"./enums/alignment\"\r\nimport { WCCSliderLayoutConfig } from \"./factories/layout.interfaces\"\r\nimport { WCCSliderAutoScrollManagerConfigPublic } from \"./managers/autoScroll\"\r\nimport { WCCSliderConfig, WCCSliderOtherPagesConfig, WCCSliderOtherPagesNormalizedConfig } from \"./slider.interfaces\"\r\nimport { WCCSliderAnimatorType } from \"./types/animatorType\"\r\n\r\nexport class WCCSlider {\r\n source: PureComputed\r\n layout: PureComputed\r\n animation: PureComputed\r\n alignment: PureComputed\r\n\r\n otherPages: PureComputed\r\n autoScroll: PureComputed\r\n\r\n selectedItem: PureComputed\r\n\r\n showControls: PureComputed\r\n showControlsOverContent: PureComputed\r\n showPages: PureComputed\r\n centerFirstPage: PureComputed\r\n\r\n constructor(jsonSlider: WCCSliderConfig) {\r\n this.source = ko.observable(jsonSlider.Source ?? jsonSlider.source).unwrap().default([]).extend({ deferred: true });\r\n this.layout = ko.observable(jsonSlider.Layout ?? jsonSlider.layout).unwrap().default({ type: 'adaptive' });\r\n this.animation = ko.observable(jsonSlider.Animation ?? jsonSlider.animation).unwrap().default('slide');\r\n this.selectedItem = >ko.observable(jsonSlider.SelectedItem ?? jsonSlider.selectedItem).unwrap();\r\n this.alignment = ko.observable(jsonSlider.Alignment ?? jsonSlider.alignment).unwrap().default(WCCSliderAlignment.left);\r\n this.showControls = ko.observable(jsonSlider.ShowControls ?? jsonSlider.showControls).unwrap().default(true);\r\n this.showControlsOverContent = ko.observable(jsonSlider.ShowControlsOverContent ?? jsonSlider.showControlsOverContent).unwrap().default(true);\r\n this.showPages = ko.observable(jsonSlider.ShowPages ?? jsonSlider.showPages).unwrap().default(false);\r\n this.centerFirstPage = ko.observable(jsonSlider.centerFirstPage).unwrap().default(false);\r\n this.otherPages = ko.observable(jsonSlider.OtherPages ?? jsonSlider.otherPages).unwrap().mapSingle(config => this.getOtherPagesConfig(config));\r\n this.autoScroll = ko.observable(jsonSlider.AutoScroll ?? jsonSlider.autoScroll).unwrap();\r\n }\r\n\r\n private getOtherPagesConfig(config?: boolean | WCCSliderOtherPagesConfig): WCCSliderOtherPagesNormalizedConfig {\r\n if (_.isObject(config))\r\n return { show: ko.flattenComputed(config.show, true), itemWidth: ko.flattenComputed(config.itemWidth, 1) }\r\n else\r\n return { show: ko.flattenComputed(config, false), itemWidth: ko.flattenComputed(1) }\r\n } \r\n}","var api = require(\"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./slider.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","import { InversifyHelpers } from \"configuration/inversify/container/helpers\";\r\nimport componentModel from \"decorators/componentModel\";\r\nimport { wccModules } from \"enums/wccModules\";\r\nimport { inject, injectable } from \"inversify\";\r\nimport { Subscribable } from \"knockout\";\r\nimport { NodeTracker } from \"managers/nodes/tracker\";\r\nimport { EffectsContainer } from \"mixins/withEffects\";\r\nimport { IWCCSliderAnimator } from \"./animators/animator.interfaces\";\r\nimport { WCCSliderAlignment } from \"./enums/alignment\";\r\nimport { WCCSliderItemState } from \"./enums/itemState\";\r\nimport WCCSliderAnimatorsFactory from \"./factories/animators\";\r\nimport { IWCCSliderAnimatorsFactory, wccSliderAnimatorsFactoryKey } from \"./factories/animators.interfaces\";\r\nimport WCCSliderLayoutsFactory from \"./factories/layout\";\r\nimport { IWCCSliderLayoutsFactory, wccSliderLayoutsFactoryKey } from \"./factories/layout.interfaces\";\r\nimport WCCSliderItem from \"./item/base/base.model\";\r\nimport { WCCSliderBaseLayoutConfig } from \"./layouts/base\";\r\nimport { IWCCSliderLayout } from \"./layouts/layout.interfaces\";\r\nimport WCCSliderAutoScrollManager from \"./managers/autoScroll\";\r\nimport WCCSliderResizer from \"./managers/resizer\";\r\nimport WCCSliderPage from \"./models/page\";\r\nimport './slider.html';\r\nimport { WCCSlider } from \"./slider.model\";\r\nimport './slider.scss';\r\n\r\ncomponents\r\n .registerLocal('wcc-slider-item-adaptive', () => require('components/slider/item/adaptive/adaptive'))\r\n .registerLocal('wcc-slider-item-dynamic', () => require('components/slider/item/dynamic/dynamic'))\r\n .registerLocal('wcc-slider-item-fullscreen', () => require('components/slider/item/fullscreen/fullscreen'));\r\n\r\nInversifyHelpers\r\n .registerInjectable(container => container.bind(wccSliderAnimatorsFactoryKey).to(WCCSliderAnimatorsFactory))\r\n .registerInjectable(container => container.bind(wccSliderLayoutsFactoryKey).to(WCCSliderLayoutsFactory));\r\n\r\nconst renderStates = [\r\n WCCSliderItemState.pending,\r\n WCCSliderItemState.active\r\n]\r\n\r\ninterface WCCSliderTemplates {\r\n item: Node[]\r\n controlNext: Node[]\r\n controlPrev: Node[]\r\n}\r\n\r\n@injectable()\r\n@componentModel(WCCSlider)\r\nexport default class WCCSliderVM {\r\n private animator = ko.observable();\r\n private layout = ko.observable>();\r\n\r\n bodyNode = ko.observable();\r\n\r\n selectedSourceItem = ko.observable();\r\n\r\n shift = ko.observable(0);\r\n trackHeight = ko.observable();\r\n\r\n isMouseInsideSlider = ko.observable(false);\r\n\r\n templates: WCCSliderTemplates\r\n \r\n width: Subscribable\r\n height: Subscribable\r\n spaceBetweenPages: Subscribable\r\n otherPageElementSize: Subscribable\r\n otherPageElementWidth: Subscribable\r\n\r\n pageIdx: Subscribable\r\n alignment: Subscribable\r\n\r\n showOtherPages: Subscribable\r\n showControls: Subscribable\r\n showPages: Subscribable\r\n hasInlineControls: Subscribable\r\n hasMultiplePages: Subscribable\r\n hasNextPage: Subscribable\r\n hasPrevPage: Subscribable\r\n ready: Subscribable\r\n\r\n selectedItem: Subscribable | undefined>\r\n activePage: Subscribable | undefined>\r\n defaultPage: Subscribable | undefined>\r\n nextPage: Subscribable | undefined>\r\n prevPage: Subscribable | undefined>\r\n\r\n source: Subscribable \r\n pages: Subscribable[]>\r\n nextPages: Subscribable[]> //used in plugins\r\n prevPages: Subscribable[]> //used in plugins\r\n allItems: Subscribable[]>\r\n items: Subscribable[]>\r\n\r\n autoScroll: WCCSliderAutoScrollManager\r\n\r\n constructor(\r\n @inject(wccModules.componentConfig) private model: WCCSlider,\r\n @inject(wccModules.componentInfo) info: ko.components.ComponentInfo,\r\n @inject(wccSliderLayoutsFactoryKey) layoutsFactory: IWCCSliderLayoutsFactory,\r\n @inject(wccSliderAnimatorsFactoryKey) animatorsFactory: IWCCSliderAnimatorsFactory,\r\n @inject(wccModules.effects) effects: EffectsContainer\r\n ) {\r\n this.templates = this.getTemplates(info.templateNodes);\r\n\r\n const { width: bodyWidth } = new NodeTracker({ node: this.bodyNode });\r\n this.width = bodyWidth;\r\n\r\n this.alignment = ko.pureComputed(() => this.getAlignment());\r\n this.source = ko.pureComputed(() => this.getSource());\r\n\r\n this.pages = this.layout.pluck(layout => layout.pages, []);\r\n this.allItems = this.layout.pluck(layout => layout.items, []);\r\n\r\n this.spaceBetweenPages = this.layout.pluck(layout => layout.spaceBetweenPages, 0);\r\n this.height = this.layout.pluck(layout => layout.height);\r\n\r\n this.items = this.allItems.filter(item => renderStates.includes(item.state()));\r\n\r\n const otherPagesConfig = this.model.otherPages;\r\n this.showOtherPages = otherPagesConfig.pluck(config => config.show, false);\r\n this.otherPageElementSize = otherPagesConfig.pluck(config => config.itemWidth);\r\n this.otherPageElementWidth = this.layout.pluck(layout => this.getOtherElementWidth(layout), 0);\r\n \r\n this.selectedItem = this.items.find(item => item.data() === this.selectedSourceItem());\r\n this.pageIdx = ko.pureComputed(() => this.getPageIdx());\r\n\r\n this.hasNextPage = this.pageIdx.mapSingle(idx => idx < this.pages().length - 1);\r\n this.nextPage = this.pageIdx.mapSingle | undefined>(idx => this.pages()[idx + 1]);\r\n this.nextPages = this.pageIdx.mapSingle(idx => this.pages().slice(idx + 1));\r\n\r\n this.hasPrevPage = this.pageIdx.mapSingle(idx => idx > 0);\r\n this.prevPage = this.pageIdx.mapSingle | undefined>(idx => this.pages()[idx - 1]);\r\n this.prevPages = this.pageIdx.mapSingle(idx => this.pages().slice(0, idx));\r\n\r\n this.activePage = this.pageIdx.mapSingle | undefined>(idx => this.pages()[idx]);\r\n this.defaultPage = ko.pureComputed(() => this.getDefaultPage());\r\n\r\n this.hasMultiplePages = this.pages.is(pages => pages.length > 1);\r\n this.showControls = ko.pureComputed(() => this.model.showControls() && this.hasMultiplePages());\r\n this.hasInlineControls = ko.pureComputed(() => this.showControls() && !this.model.showControlsOverContent());\r\n\r\n this.showPages = ko.pureComputed(() => this.model.showPages() && this.hasMultiplePages());\r\n this.ready = ko.pureComputed(() => true); \r\n\r\n this.autoScroll = effects.register(new WCCSliderAutoScrollManager({\r\n ...model.autoScroll(),\r\n\r\n activePage: this.activePage,\r\n defaultPage: this.defaultPage,\r\n hasMultiplePages: this.hasMultiplePages,\r\n hasNextPage: this.hasNextPage,\r\n isMouseInsideSlider: this.isMouseInsideSlider,\r\n ready: this.ready,\r\n openNextPage: () => this.openNextPage(),\r\n selectPage: page => this.selectPage(page)\r\n }));\r\n\r\n effects.register(layoutConfig => {\r\n const baseConfig: WCCSliderBaseLayoutConfig> = {\r\n width: this.width,\r\n source: this.source,\r\n activePage: this.activePage,\r\n otherPageElementWidth: this.otherPageElementWidth,\r\n showOtherPages: this.showOtherPages\r\n }\r\n\r\n const layout = layoutsFactory.build({\r\n ...layoutConfig,\r\n ...baseConfig\r\n });\r\n\r\n this.layout(layout);\r\n\r\n return () => this.layout(undefined);\r\n }, [this.model.layout]);\r\n\r\n effects.register(animation => {\r\n const animator = animatorsFactory.build({\r\n type: animation,\r\n width: this.width,\r\n shift: this.shift,\r\n alignment: this.alignment,\r\n pageIdx: this.pageIdx,\r\n pages: this.pages,\r\n showOtherPages: this.showOtherPages,\r\n otherPageElementWidth: this.otherPageElementWidth,\r\n spaceBetweenPages: this.spaceBetweenPages\r\n });\r\n\r\n this.animator(animator);\r\n\r\n return () => this.animator(undefined);\r\n }, [this.model.animation]); \r\n\r\n effects.register(new WCCSliderResizer({\r\n element: info.element,\r\n height: this.height,\r\n trackHeight: this.trackHeight\r\n }));\r\n\r\n effects.register(item => {\r\n if (item != undefined)\r\n this.select(item);\r\n }, [this.model.selectedItem]);\r\n\r\n effects.register([\r\n ko.computed(() => this.updateActiveItems()).extend({ deferred: true }),\r\n ko.computed(() => this.renderNext()).extend({ deferred: true })\r\n ]);\r\n\r\n const shouldCenter = ko.pureComputed(() => this.model.centerFirstPage() && this.pages().length == 1);\r\n const shouldAlignLeft = ko.pureComputed(() => !shouldCenter() && this.alignment() == WCCSliderAlignment.left);\r\n const shouldAlignRight = ko.pureComputed(() => !shouldCenter() && this.alignment() == WCCSliderAlignment.right);\r\n\r\n ko.applyBindingsToNode(info.element, {\r\n 'css': {\r\n 'wcc-slider': true,\r\n 'wcc-slider--with-controls': this.hasInlineControls,\r\n 'wcc-slider--align-left': shouldAlignLeft,\r\n 'wcc-slider--align-right': shouldAlignRight,\r\n 'wcc-slider--align-center': shouldCenter\r\n },\r\n\r\n 'event': {\r\n 'mouseenter': () => this.isMouseInsideSlider(true),\r\n 'mouseleave': () => this.isMouseInsideSlider(false)\r\n },\r\n\r\n 'attr': {\r\n 'dir': 'ltr'\r\n }\r\n });\r\n }\r\n\r\n select(item?: T) {\r\n if (item != undefined && this.source().includes(item))\r\n this.selectedSourceItem(item);\r\n else\r\n this.selectedSourceItem(undefined);\r\n }\r\n\r\n selectPage(page: WCCSliderPage) {\r\n if (page === this.defaultPage()) {\r\n this.select(undefined);\r\n } else {\r\n const item = this.alignment() === WCCSliderAlignment.right ?\r\n _.last(page.items()) :\r\n _.first(page.items());\r\n\r\n this.select(item?.data());\r\n }\r\n }\r\n\r\n openNextPage() {\r\n if (this.hasNextPage())\r\n this.selectPage(>this.nextPage());\r\n }\r\n\r\n openPrevPage() {\r\n if (this.hasPrevPage())\r\n this.selectPage(>this.prevPage());\r\n }\r\n\r\n private getAlignment() {\r\n if (settings.isRTL())\r\n return WCCSliderAlignment.right;\r\n\r\n return this.model.alignment();\r\n }\r\n\r\n private getSource() {\r\n if (settings.isRTL())\r\n return [...this.model.source()].reverse();\r\n\r\n return this.model.source();\r\n }\r\n\r\n private getTemplates(nodes: Node[]): WCCSliderTemplates {\r\n const hasSliderItem = nodes.some(node => $(node).is('slider-item'));\r\n\r\n if (hasSliderItem) {\r\n return {\r\n item: $(nodes).filter(function (idx, node) { return $(node).is('slider-item') }).contents().toArray() as Node[],\r\n controlNext: $(nodes).filter(function (idx, node) { return $(node).is('slider-control-next') }).contents().toArray() as Node[],\r\n controlPrev: $(nodes).filter(function (idx, node) { return $(node).is('slider-control-prev') }).contents().toArray() as Node[]\r\n }\r\n } else {\r\n return {\r\n item: nodes,\r\n controlNext: [],\r\n controlPrev: []\r\n }\r\n }\r\n }\r\n\r\n private getDefaultPage() {\r\n if (this.alignment() === WCCSliderAlignment.right)\r\n return _.last(this.pages());\r\n\r\n if (this.alignment() === WCCSliderAlignment.left)\r\n return _.first(this.pages());\r\n }\r\n\r\n private getPageIdx() {\r\n const selectedItem = this.selectedItem();\r\n\r\n if (selectedItem != undefined) {\r\n const idx = this.pages().findIndex(p => p.contains(selectedItem));\r\n\r\n return idx !== -1 ? idx : 0;\r\n } else if (this.alignment() === WCCSliderAlignment.right) {\r\n return this.pages().length - 1;\r\n } else {\r\n return 0;\r\n }\r\n }\r\n\r\n private getOtherElementWidth(layout: IWCCSliderLayout) {\r\n const width = layout.itemWidth() * this.otherPageElementSize();\r\n const maxWidth = this.width() * 0.15;\r\n\r\n return Math.min(width, maxWidth);\r\n }\r\n\r\n private updateActiveItems() {\r\n const activePage = this.activePage();\r\n\r\n if (activePage != undefined) {\r\n const activePageItems = activePage.items();\r\n\r\n this.items().forEach(item => item.isActive(false));\r\n activePageItems.forEach(item => item.isActive(true));\r\n }\r\n }\r\n\r\n private renderNext() {\r\n const canRender = this.allItems().every(item => item.state() != WCCSliderItemState.pending);\r\n const itemToRender = this.allItems().find(item => item.state() == WCCSliderItemState.justCreated);\r\n\r\n if (canRender && itemToRender !== undefined)\r\n itemToRender.state(WCCSliderItemState.pending);\r\n }\r\n}","export const componentModelMetadataKey = Symbol('component:template');\r\n\r\nexport default function componentModel(model: any) {\r\n return (ctor: any) => {\r\n Reflect.defineMetadata(componentModelMetadataKey, model, ctor);\r\n return ctor;\r\n }\r\n}","import { Subscribable } from \"knockout\";\r\nimport { withEffects } from \"mixins/withEffects\";\r\n\r\nexport default abstract class WCCAnimator {\r\n protected effects = withEffects();\r\n\r\n private isAnimationRequired = ko.observable(false);\r\n private isAnimating = ko.observable(false);\r\n\r\n private animationDuration: Subscribable\r\n private animationStartTime = ko.observable();\r\n private isFastAnimationMode = ko.observable(false);\r\n private animationContext = ko.observable();\r\n\r\n private canAnimate: Subscribable\r\n\r\n constructor() {\r\n this.animationDuration = ko.pureComputed(() => this.getAnimationDuration());\r\n\r\n this.canAnimate = ko.pureComputed(() => this.checkIfAllowedToAnimate());\r\n\r\n const allowToAnimateNextFrame = ko.pureComputed(() => this.isAnimationRequired() && !this.isAnimating());\r\n\r\n queueMicrotask(() => {\r\n this.effects.register(allowToAnimateNextFrame => {\r\n if (allowToAnimateNextFrame) {\r\n this.isAnimating(true);\r\n this.isAnimationRequired(false);\r\n\r\n this.animate(!this.canAnimate());\r\n }\r\n }, [allowToAnimateNextFrame]); \r\n });\r\n }\r\n\r\n update() {\r\n this.isAnimationRequired(true);\r\n }\r\n\r\n dispose() {\r\n this.effects.dispose();\r\n }\r\n\r\n protected abstract getAnimationDuration(): number\r\n protected abstract getAnimationContext(): C\r\n\r\n protected checkIfAllowedToAnimate() {\r\n return this.animationDuration() > 0 && !this.effects.isDisposed();\r\n } \r\n\r\n protected onProgress(progress: number, context: C) { }\r\n protected beforeAnimation(context: C) { }\r\n protected afterAnimation(context: C) { }\r\n\r\n private animate(fast = false) {\r\n this.animationStartTime(undefined);\r\n this.isFastAnimationMode(fast);\r\n this.animationContext(this.getAnimationContext());\r\n\r\n requestAnimationFrame(now => this.animateNextFrame(now));\r\n }\r\n\r\n private animateNextFrame(now: number) {\r\n const context = this.animationContext();\r\n\r\n if (this.animationStartTime() == undefined)\r\n this.animationStartTime(now);\r\n\r\n const start = this.animationStartTime();\r\n const change = now - start;\r\n\r\n let progress = change / this.animationDuration() * 100;\r\n\r\n if (progress > 0 && this.isFastAnimationMode())\r\n progress = 100;\r\n\r\n if (progress > 100)\r\n progress = 100;\r\n\r\n if (progress === 0)\r\n this.beforeAnimation(context);\r\n\r\n this.onProgress(progress, context);\r\n\r\n if (progress < 100 && (progress === 0 || this.canAnimate())) {\r\n requestAnimationFrame(now => this.animateNextFrame(now));\r\n } else {\r\n this.afterAnimation(context);\r\n this.isAnimating(false);\r\n }\r\n }\r\n}","define(function () {\r\n const system = require('helpers/system').SystemHelpers;\r\n\r\n return function (html) {\r\n system.getTemplatesAndResources(html)\r\n .forEach(function (node) { document.head.appendChild(node) });\r\n }\r\n});","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".wcc-slider__item{-webkit-transition:width ease-in-out .4s,margin ease-in-out .4s,padding ease-in-out .4s;-moz-transition:width ease-in-out .4s,margin ease-in-out .4s,padding ease-in-out .4s;-o-transition:width ease-in-out .4s,margin ease-in-out .4s,padding ease-in-out .4s;transition:width ease-in-out .4s,margin ease-in-out .4s,padding ease-in-out .4s;flex-shrink:0;position:relative;display:inline-block;font-size:14px;vertical-align:middle;animation-fill-mode:none !important;white-space:normal}.wcc-slider__item--shifted{z-index:1}.wcc-slider__item--inactive{max-height:100%}.wcc-slider__item--fullscreen{transition:none}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".wcc-slider{position:relative;display:block;overflow:hidden}.wcc-slider.wcc-slider--align-right .wcc-slider__track{justify-content:flex-end}.wcc-slider.wcc-slider--align-left .wcc-slider__track{justify-content:flex-start}.wcc-slider.wcc-slider--align-center .wcc-slider__track{justify-content:center}.wcc-slider--with-controls{padding:0 42px}.wcc-slider__auto-scroll-progress{position:absolute;top:0px;left:0;height:5px;background:rgba(0,0,0,.15);z-index:200}.wcc-slider__track{display:flex;align-items:flex-start}.wcc-slider__control{position:absolute;top:50%;transform:translateY(-50%)}.wcc-slider__control:hover .wcc-slider__control__body{opacity:1}.wcc-slider__control--next{right:10px}.wcc-slider__control--next .wcc-slider__control__body:before{content:\\\"\\\"}.wcc-slider__control--prev{left:10px}.wcc-slider__control--prev .wcc-slider__control__body:before{content:\\\"\\\"}.wcc-slider__control--disabled .wcc-slider__control__body{opacity:.25 !important}.wcc-slider__control__body{position:relative;width:22px;height:22px;cursor:pointer;border:none;border-radius:22px;color:#fff;outline:none;background-color:#595959;opacity:.75}.wcc-slider__control__body:before{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);font-family:\\\"Glyphicons Regular\\\" !important;font-size:12px;font-weight:normal}.wcc-slider__pages{position:absolute;bottom:10px;left:50%;transform:translateX(-50%)}.wcc-slider__page-anchor{display:inline-block;margin-right:3px;background-color:#c6c6c6;border:3px solid #fff;border-radius:100%;padding:6px;cursor:pointer}.wcc-slider__page-anchor:hover,.wcc-slider__page-anchor--active{background-color:#fff;border-color:#000}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","// Module\nvar code = \"\";\n// Exports\nmodule.exports = code;","// Module\nvar code = \"\";\n// Exports\nmodule.exports = code;","// Module\nvar code = \"\";\n// Exports\nmodule.exports = code;","// Module\nvar code = \"\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\";\n// Exports\nmodule.exports = code;"],"sourceRoot":""}