{"version":3,"file":"popup.min.js","sources":["popup.ts"],"sourcesContent":["/// \r\n\r\nnamespace eXpress.core {\r\n\texport interface IPopupOptions {\r\n\t\treadonly canUseJQueryPopup?: boolean;\r\n\t}\r\n\r\n\texport interface IOkCancelAndClosePopupOptions {\r\n\t\treadonly dialogId?: string;\r\n\t\treadonly cssClass?: string;\r\n\t\treadonly okFunction?: () => void;\r\n\t}\r\n\r\n\texport interface IContentDialogOptions extends IOkCancelAndClosePopupOptions {\r\n\t\treadonly labelContentKey: string;\r\n\t\treadonly okContentKey?: string;\r\n\t\treadonly cancelContentKey?: string;\r\n\t\treadonly titleContentKey?: string;\r\n\t\treadonly replacements?: string[];\r\n\t\treadonly titleReplacements?: string[];\r\n\t\treadonly forceRefresh?: boolean;\r\n\t}\r\n\r\n\texport interface IViewDialogOptions {\r\n\t\treadonly dialogId: string;\r\n\t\treadonly cssClass?: string;\r\n\t\treadonly view: string;\r\n\t\treadonly forceRefresh?: boolean;\r\n\t\treadonly fromCache?: boolean;\r\n\t}\r\n\r\n\tinterface IClosablePopupOptions extends IPopupOptions {\r\n\t\treadonly $closeButtons?: JQuery;\r\n\t\treadonly hideCloseIcon?: boolean;\r\n\t\treadonly closeOnClickOutsidePopup?: boolean;\r\n\t\treadonly closeEvent?: () => void;\r\n\t}\r\n\r\n\texport interface IOpenedPopup {\r\n\t\tclose(value: TResult): void;\r\n\t\treadonly isClosed: boolean;\r\n\t\treadonly promise: JQueryPromise;\r\n\t}\r\n\r\n\tenum ProductOrientation {\r\n\t\tSquare,\r\n\t\tLandscape,\r\n\t\tPortrait\r\n\t}\r\n\r\n\t// Core function to open/close a popup\r\n\texport function openPopupAsync(popupEl: HTMLElement, options: { onVisible: () => void, canUseJQueryPopup?: boolean, onResize?: () => void }): IOpenedPopup {\r\n\t\tconst deferred = $.Deferred();\r\n\t\tconst $popup = $(popupEl);\r\n\r\n\t\tif (popupEl.id !== \"leave-intent-dialog\" && typeof window.DisableLeaveIntent !== \"undefined\") {\r\n\t\t\twindow.DisableLeaveIntent();\r\n\t\t}\r\n\r\n\t\tconst $cover = $(\"#maindialogcover\");\r\n\t\tconst $html = $(\"html\");\r\n\t\tconst $body = $(\"body\");\r\n\t\tconst currentY = window.pageYOffset;\r\n\r\n\t\t$popup.show();\r\n\t\t$cover.show();\r\n\r\n\t\tdocument.documentElement.style.marginTop = \"-\" + Math.round(currentY) + \"px\";\r\n\r\n\t\t$html.addClass(\"has-open-dialog u-no-scroll\");\r\n\t\t$body.addClass(\"u-no-scroll\");\r\n\r\n\t\tif (options.canUseJQueryPopup) {\r\n\t\t\t$popup.popup({\r\n\t\t\t\tbackground: false,\r\n\t\t\t\tescape: false,\r\n\t\t\t\tblur: false,\r\n\t\t\t\tscrolllock: false\r\n\t\t\t});\r\n\r\n\t\t\t$popup.popup('show');\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$popup.css('display', 'flex');\r\n\t\t}\r\n\r\n\t\tconst result = {\r\n\t\t\tclose: function (value: TCloseResult) {\r\n\t\t\t\tif (options.canUseJQueryPopup) {\r\n\t\t\t\t\t$popup.popup(\"hide\");\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$popup.hide();\r\n\t\t\t\t}\r\n\t\t\t\t$cover.hide();\r\n\t\t\t\t$html.removeClass(\"has-open-dialog u-no-scroll\");\r\n\t\t\t\t$body.removeClass(\"u-no-scroll\");\r\n\r\n\t\t\t\tdocument.documentElement.style.marginTop = \"0px\";\r\n\r\n\t\t\t\twindow.scroll(0, currentY);\r\n\t\t\t\tif (popupEl.id !== \"leave-intent-dialog\" && typeof window.EnableLeaveIntent !== \"undefined\") {\r\n\t\t\t\t\twindow.EnableLeaveIntent();\r\n\t\t\t\t}\r\n\t\t\t\tthis.isClosed = true;\r\n\t\t\t\tdeferred.resolve(value);\r\n\t\t\t},\r\n\t\t\tpromise: deferred.promise(),\r\n\t\t\tisClosed: false\r\n\t\t};\r\n\r\n\t\tif (options && options.onVisible)\r\n\t\t\twindow.setTimeout(() => {\r\n\t\t\t\tif (!result.isClosed)\r\n\t\t\t\t\toptions.onVisible();\r\n\t\t\t}, 200);\r\n\r\n\t\tif (options && options.onResize) {\r\n\t\t\twindow.addEventListener(\"resize\", utils.debounce(options.onResize, 250));\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t/**\r\n\t * Popup with minimum class.\r\n\t * Using this class should prevent opening/closing twice and\r\n\t * does some basic logging\r\n\t */\r\n\texport class Popup {\r\n\r\n\t\tprotected popupEl: HTMLElement;\r\n\t\tprivate openedPopup: IOpenedPopup | null;\r\n\t\tpublic canUseJQueryPopup: boolean;\r\n\r\n\t\tconstructor(popupEl: HTMLElement, { canUseJQueryPopup = true }: IPopupOptions = {}) {\r\n\t\t\tthis.popupEl = popupEl;\r\n\t\t\tthis.canUseJQueryPopup = canUseJQueryPopup;\r\n\t\t}\r\n\r\n\t\tpublic isOpen(): boolean {\r\n\t\t\treturn !!this.openedPopup;\r\n\t\t}\r\n\r\n\t\t/** Promise resolves when dialog closes */\r\n\t\tpublic openAsync(): JQueryPromise {\r\n\t\t\tthis.openedPopup = openPopupAsync(this.popupEl, { onVisible: () => this.onVisible(), canUseJQueryPopup: this.canUseJQueryPopup, onResize: () => this.onResize() }); // didn't pass options, else it will bubble through to all derived classes\r\n\r\n\t\t\treturn this.openedPopup.promise;\r\n\t\t}\r\n\r\n\t\t/** Close Dialog, specify value to resolve dialog promise with (didn't make it optional) */\r\n\t\tpublic close(value: TResult): boolean {\r\n\t\t\tif (this.isOpen() && this.openedPopup) {\r\n\t\t\t\tthis.openedPopup.close(value);\r\n\t\t\t\tthis.openedPopup = null;\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tpublic makeInvisible(): void {\r\n\t\t\tthis.popupEl.style.opacity = '0';\r\n\t\t}\r\n\r\n\t\tprotected onVisible(): void {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tprotected onResize(): void {\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\t/*\r\n\t * Used for popups that can be closed by user\r\n\t */\r\n\texport class ClosablePopup extends Popup {\r\n\r\n\t\tprotected $popup: JQuery;\r\n\t\tprivate $closeButtons: JQuery | undefined;\r\n\t\tprotected namespace: string;\r\n\t\tprotected hideCloseIcon: boolean;\r\n\t\tprivate closeOnClickOutsidePopup: boolean;\r\n\t\tprivate static popupCounter: number;\r\n\t\tprivate closeEvent?: () => void;\r\n\r\n\t\tconstructor($popup: JQuery, options: IClosablePopupOptions) {\r\n\t\t\tsuper($popup[0], options);\r\n\r\n\t\t\tconst {\r\n\t\t\t\t$closeButtons,\r\n\t\t\t\thideCloseIcon = false,\r\n\t\t\t\tcloseOnClickOutsidePopup = true,\r\n\t\t\t\tcloseEvent\r\n\t\t\t} = options;\r\n\r\n\t\t\tthis.$popup = $popup;\r\n\t\t\tthis.$closeButtons = $closeButtons;\r\n\t\t\tthis.hideCloseIcon = hideCloseIcon;\r\n\t\t\tthis.closeOnClickOutsidePopup = closeOnClickOutsidePopup;\r\n\t\t\tClosablePopup.popupCounter = (ClosablePopup.popupCounter || 0) + 1;\r\n\t\t\tthis.namespace = \".popup\" + ClosablePopup.popupCounter;\r\n\t\t\tthis.closeEvent = closeEvent;\r\n\t\t}\r\n\r\n\t\tpublic openAsync(): JQueryPromise {\r\n\t\t\tif (this.hideCloseIcon)\r\n\t\t\t\t$(this.popupEl).find(\".dialog-header .button.close\").hide();\r\n\r\n\t\t\tthis.init();\r\n\t\t\treturn super.openAsync().always(() => { this.deinit(); });\r\n\t\t}\r\n\r\n\t\tpublic close(value: TResult | null) {\r\n\t\t\tif (this.closeEvent) this.closeEvent();\r\n\t\t\treturn super.close(value);\r\n\t\t}\r\n\r\n\t\tprotected init(): void {\r\n\t\t\tif (this.$closeButtons) {\r\n\t\t\t\tthis.$closeButtons\r\n\t\t\t\t\t.on(\"click\" + this.namespace, e => {\r\n\t\t\t\t\t\tthis.close(null);\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\t// close popup when click outside the popup\r\n\t\t\tif (this.closeOnClickOutsidePopup) {\r\n\t\t\t\t$(this.popupEl).parents().on(\"mousedown\" + this.namespace, e => {\r\n\t\t\t\t\tconst $target = $(e.target);\r\n\t\t\t\t\tif (e.target.id && $target.parents('#' + this.popupEl.id).length < 1) {\r\n\t\t\t\t\t\tthis.close(null);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\t// close popup when enter is pressed\r\n\t\t\t$(document).on(\"keydown\" + this.namespace, function (e) {\r\n\t\t\t\tif (e.which === 13 || e.keyCode === 13) { // enter is 13, some browsers do not support 'keycode' others 'which'\r\n\t\t\t\t\t$('.active.main').click();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tprotected deinit(): void {\r\n\t\t\tif (this.$closeButtons) {\r\n\t\t\t\tthis.$closeButtons.off(\"click\" + this.namespace);\r\n\t\t\t}\r\n\r\n\t\t\t// close popup when click outside the popup\r\n\t\t\t$(this.popupEl).parents().off(\"mousedown\" + this.namespace);\r\n\r\n\t\t\t// close popup when enter is pressed\r\n\t\t\t$(document).off(\"keydown\" + this.namespace);\r\n\t\t}\r\n\t}\r\n\r\n\texport class OkCancelAndClosePopup extends eXpress.core.ClosablePopup {\r\n\t\tconstructor($popup: JQuery, options: IClosablePopupOptions = { hideCloseIcon: false }) {\r\n\t\t\tsuper($popup, {\r\n\t\t\t\t$closeButtons: $popup.find(\".dialog-header .button.close\"),\r\n\t\t\t\t...options\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tprotected init(): void {\r\n\t\t\tsuper.init();\r\n\r\n\t\t\tthis.$popup.find(\".ok\").on(\"click\" + this.namespace, (e) => this.close(true));\r\n\t\t\tthis.$popup.find(\".cancel\").on(\"click\" + this.namespace, (e) => this.close(false));\r\n\t\t}\r\n\r\n\t\tprotected deinit(): void {\r\n\t\t\tsuper.deinit();\r\n\r\n\t\t\tthis.$popup.find(\".ok\").off(this.namespace);\r\n\t\t\tthis.$popup.find(\".cancel\").off(this.namespace);\r\n\t\t}\r\n\t}\r\n\r\n\tinterface ICreateContentDialogOptions extends IContentDialogOptions {\r\n\t\treadonly templateSelector: string;\r\n\t\treadonly bodySelector: string;\r\n\t\treadonly titleSelector: string;\r\n\t\treadonly okSelector: string;\r\n\t\treadonly okTextSelector: string;\r\n\t\treadonly cancelSelector: string;\r\n\t\treadonly cancelTextSelector: string;\r\n\t\treadonly forceRefresh?: boolean;\r\n\t}\r\n\r\n\tconst createContentDialogAsync = (contentManager, options: ICreateContentDialogOptions) => {\r\n\t\tlet $popup: JQuery;\r\n\r\n\t\tconst { dialogId,\r\n\t\t\ttemplateSelector,\r\n\t\t\tcssClass, labelContentKey,\r\n\t\t\tcancelContentKey,\r\n\t\t\tokContentKey,\r\n\t\t\ttitleContentKey,\r\n\t\t\treplacements,\r\n\t\t\ttitleReplacements,\r\n\t\t\tbodySelector,\r\n\t\t\tokSelector,\r\n\t\t\tokTextSelector,\r\n\t\t\tcancelSelector,\r\n\t\t\tcancelTextSelector,\r\n\t\t\tforceRefresh\r\n\t\t} = options;\r\n\r\n\t\tif (dialogId) {\r\n\t\t\t$popup = $(\"#\" + dialogId);\r\n\t\t\tif (forceRefresh && $popup.length) {\r\n\t\t\t\t$popup.remove();\r\n\t\t\t}\r\n\t\t\telse if ($popup.length) {\r\n\t\t\t\treturn $.Deferred().resolve($popup).promise();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// start with a clone of the dialog template\r\n\t\t$popup = $(templateSelector).clone();\r\n\t\tif (dialogId)\r\n\t\t\t$popup.attr(\"id\", dialogId);\r\n\r\n\t\tif (cssClass) {\r\n\t\t\t$popup.addClass(cssClass);\r\n\t\t}\r\n\r\n\t\treturn contentManager.getLabelsAsync([labelContentKey, cancelContentKey, okContentKey, titleContentKey])\r\n\t\t\t.then(() => {\r\n\t\t\t\tlet titleContent = options.titleContentKey ? contentManager.getLabel(options.titleContentKey) : \"\";\r\n\t\t\t\tif (titleReplacements) {\r\n\t\t\t\t\ttitleContent = utils.formatString(titleContent, ...titleReplacements);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$popup.find(options.titleSelector).text(titleContent);\r\n\r\n\t\t\t\tif (options.cssClass)\r\n\t\t\t\t\t$popup.addClass(options.cssClass);\r\n\r\n\t\t\t\tlet bodyContent = contentManager.getLabel(options.labelContentKey);\r\n\r\n\t\t\t\tif (replacements)\r\n\t\t\t\t\tbodyContent = utils.formatString(bodyContent, ...replacements);\r\n\r\n\t\t\t\t$popup.find(bodySelector).html(bodyContent);\r\n\r\n\t\t\t\tlet okContent = \"\";\r\n\t\t\t\tif (okContentKey)\r\n\t\t\t\t\tokContent = contentManager.getLabel(okContentKey);\r\n\t\t\t\t$popup.find(okSelector)\r\n\t\t\t\t\t.toggle(!!okContent)\r\n\t\t\t\t\t.find(okTextSelector).html(okContent);\r\n\r\n\t\t\t\tlet cancelContent = \"\";\r\n\t\t\t\tif (cancelContentKey)\r\n\t\t\t\t\tcancelContent = contentManager.getLabel(cancelContentKey);\r\n\t\t\t\t$popup.find(cancelSelector)\r\n\t\t\t\t\t.toggle(!!cancelContent)\r\n\t\t\t\t\t.find(cancelTextSelector).html(cancelContent);\r\n\r\n\t\t\t\t// add popup to dom\r\n\t\t\t\tif (dialogId)\r\n\t\t\t\t\t$(\".renderedDialogs\").append($popup);\r\n\r\n\t\t\t\treturn $popup;\r\n\t\t\t});\r\n\t};\r\n\r\n\texport class ContentPopup extends eXpress.core.OkCancelAndClosePopup {\r\n\r\n\t\tconstructor($popup: JQuery, hideCloseIcon = false) {\r\n\t\t\tsuper($popup, { hideCloseIcon });\r\n\t\t}\r\n\r\n\t\tpublic static createDialogAsync(contentManager: ContentManager, options: IContentDialogOptions): JQueryPromise {\r\n\t\t\treturn createContentDialogAsync(contentManager, {\r\n\t\t\t\t...options,\r\n\t\t\t\ttemplateSelector: '#dialogTemplate div.dialog-content',\r\n\t\t\t\tbodySelector: '.dialog-body',\r\n\t\t\t\ttitleSelector: '.dialog-header .title',\r\n\t\t\t\tokSelector: '.dialog-footer .dialogbuttons .ok',\r\n\t\t\t\tokTextSelector: 'span.text',\r\n\t\t\t\tcancelSelector: '.dialog-footer .dialogbuttons .cancel',\r\n\t\t\t\tcancelTextSelector: 'span.text'\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\texport class SelectAlbumPopup extends eXpress.core.ClosablePopup {\r\n\t\tprotected $popup: JQuery;\r\n\r\n\t\tconstructor($popup: JQuery) {\r\n\t\t\tsuper($popup, {\r\n\t\t\t\t$closeButtons: $popup.find(\".dialog-header .button.close\")\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tprotected init(): void {\r\n\t\t\tsuper.init();\r\n\t\t\tthis.$popup.find(\".item\").on(\"click\" + this.namespace, (e) => {\r\n\t\t\t\tthis.close($(e.currentTarget).attr(\"data-folder-id\")!); // data() returns type ANY so could be a number instead of string!!!\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tprotected deinit(): void {\r\n\t\t\tsuper.deinit();\r\n\t\t\tthis.$popup.find(\".item\").off(this.namespace);\r\n\t\t}\r\n\r\n\t\tprotected onVisible() {\r\n\t\t\tif (this.canUseJQueryPopup) {\r\n\t\t\t\t$('.popup_wrapper_visible').on(\"click\" + this.namespace, e => {\r\n\t\t\t\t\tif (!$(e.target).closest(`#${this.popupEl.id}`).length) {\r\n\t\t\t\t\t\tthis.close(null);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tpublic static createDialogAsync(contentManager: ContentManager, titleContentKey: string, folders: core.IPhotoFolder[]): JQueryPromise {\r\n\t\t\t// start with a clone of the dialog template\r\n\t\t\tconst $popup: JQuery = $(\"#dialogTemplate div.dialog-content\").clone();\r\n\r\n\t\t\t// add default css class\r\n\t\t\t$popup.addClass(\"photo-upload-container\");\r\n\r\n\t\t\treturn contentManager.getLabelsAsync([\"Label.MyPages.Main.MyAlbums.Album.DefaultTitle\", \"Label.MyPhotos.NewAlbum\", \"Label.MyPages.MyAlbums.NumberOfPhotos\", titleContentKey])\r\n\t\t\t\t.then(() => {\r\n\t\t\t\t\t$popup.find(\".dialog-header .title\").html(contentManager.getLabel(titleContentKey));\r\n\t\t\t\t\t$popup.find(\".dialog-header\").addClass(\"photo-upload-header\");\r\n\r\n\t\t\t\t\tconst $dialogBody = $popup.find(\".dialog-body\");\r\n\t\t\t\t\t$dialogBody.addClass(\"photo-upload-content\");\r\n\r\n\t\t\t\t\tconst $newAlbum = $(\r\n\t\t\t\t\t\t`
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
`\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\t$newAlbum.find(\".title\").text(contentManager.getLabel(\"Label.MyPhotos.NewAlbum\"));\r\n\r\n\t\t\t\t\t$dialogBody.append($newAlbum);\r\n\r\n\t\t\t\t\tconst $folders = folders.map(folder => {\r\n\t\t\t\t\t\tlet nrOfPhotos = contentManager.getLabel(\"Label.MyPages.MyAlbums.NumberOfPhotos\");\r\n\t\t\t\t\t\tnrOfPhotos = utils.formatString(nrOfPhotos, folder.fileCount.toString());\r\n\r\n\t\t\t\t\t\tconst $folder = $(\r\n\t\t\t\t\t\t\t`
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t${folder.thumbUrl ? `` : \"\"}\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t${folder.dateCreated ? (folder.dateCreated.toLocaleDateString() + \" - \") : \"\"}${nrOfPhotos}\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
`\r\n\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t$folder.find(\".title span.name\").text(folder.name);\r\n\t\t\t\t\t\treturn $folder;\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\t$dialogBody.append($folders);\r\n\r\n\t\t\t\t\treturn $popup;\r\n\t\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\texport class StyleguideContentPopup extends eXpress.core.ClosablePopup {\r\n\r\n\t\tconstructor($popup: JQuery, hideCloseIcon = false) {\r\n\t\t\tsuper($popup, {\r\n\t\t\t\t$closeButtons: $popup.find(\".technical-popup-close\"),\r\n\t\t\t\thideCloseIcon: hideCloseIcon,\r\n\t\t\t\tcanUseJQueryPopup: false\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tpublic static createDialogAsync(contentManager: ContentManager, options: IContentDialogOptions): JQueryPromise {\r\n\t\t\treturn createContentDialogAsync(contentManager, {\r\n\t\t\t\t...options,\r\n\t\t\t\ttemplateSelector: '#technical-popup-template',\r\n\t\t\t\tbodySelector: '.technical-popup-content',\r\n\t\t\t\ttitleSelector: '.technical-popup-title',\r\n\t\t\t\tokSelector: '.technical-popup-okbutton',\r\n\t\t\t\tokTextSelector: 'span',\r\n\t\t\t\tcancelSelector: '.technical-popup-cancelbutton',\r\n\t\t\t\tcancelTextSelector: 'span'\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\texport interface IStyleguidViewPopupOptions {\r\n\t\treadonly closeOnClickOutsidePopup: boolean;\r\n\t\treadonly closeEvent: () => void;\r\n\t}\r\n\r\n\texport class StyleguideViewPopup extends eXpress.core.ClosablePopup {\r\n\t\tconstructor($popup: JQuery, options: Partial = {}) {\r\n\r\n\t\t\tconst {\r\n\t\t\t\tcloseOnClickOutsidePopup,\r\n\t\t\t\tcloseEvent\r\n\t\t\t} = options;\r\n\r\n\t\t\tsuper($popup, {\r\n\t\t\t\t$closeButtons: $popup.find(\".technical-popup-close\"),\r\n\t\t\t\tcanUseJQueryPopup: false,\r\n\t\t\t\tcloseEvent,\r\n\t\t\t\tcloseOnClickOutsidePopup\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tpublic static createDialogAsync(options: IViewDialogOptions, data?: any): JQueryPromise {\r\n\t\t\tlet $popup: JQuery;\r\n\t\t\tif (options.dialogId) {\r\n\t\t\t\t$popup = $(\"#\" + options.dialogId);\r\n\t\t\t\tif ($popup.length !== 0) {\r\n\t\t\t\t\tif (options.forceRefresh) {\r\n\t\t\t\t\t\t$popup.remove();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn $.Deferred().resolve($popup).promise();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Get the html from the server\r\n\t\t\treturn eXpress.services.ServiceBase.getHTML('/ajaxxhr/Dialog/' + options.view, data, options.fromCache !== false).then(\r\n\t\t\t\tres => {\r\n\t\t\t\t\tconst $res = $(res);\r\n\t\t\t\t\t$(\".renderedDialogs\").append($res);\r\n\r\n\t\t\t\t\tif (options.dialogId)\r\n\t\t\t\t\t\t$res.attr(\"id\", options.dialogId);\r\n\r\n\t\t\t\t\tif (options.cssClass)\r\n\t\t\t\t\t\t$res.addClass(options.cssClass);\r\n\r\n\t\t\t\t\treturn $res;\r\n\t\t\t\t});\r\n\t\t}\r\n\r\n\t\tpublic static createCoreDialogAsync(options: IViewDialogOptions, data?: any): any {\r\n\t\t\tlet $popup: JQuery;\r\n\t\t\tif (options.dialogId) {\r\n\t\t\t\t$popup = $(\"#\" + options.dialogId);\r\n\t\t\t\tif ($popup.length !== 0) {\r\n\t\t\t\t\tif (options.forceRefresh) {\r\n\t\t\t\t\t\t$popup.remove();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn $.Deferred().resolve($popup).promise();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn $.ajax({\r\n\t\t\t\turl: '/apicore/dialog/' + options.view,\r\n\t\t\t\ttype: 'POST',\r\n\t\t\t\tcontentType: 'application/json',\r\n\t\t\t\tdata: JSON.stringify(data)\r\n\t\t\t}).then(res => {\r\n\t\t\t\tconst $res = $(res);\r\n\t\t\t\t$(\".renderedDialogs\").append($res);\r\n\r\n\t\t\t\tif (options.dialogId)\r\n\t\t\t\t\t$res.attr(\"id\", options.dialogId);\r\n\r\n\t\t\t\tif (options.cssClass)\r\n\t\t\t\t\t$res.addClass(options.cssClass);\r\n\r\n\t\t\t\treturn $res;\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\r\n\texport class StyleguideViewDeliveryTimesPopup extends StyleguideViewPopup {\r\n\t\tprivate contentManager: ContentManager;\r\n\r\n\t\tconstructor($popup: JQuery, contentManager: ContentManager, result: IDeliveryMethodInfosResult) {\r\n\t\t\tsuper($popup);\r\n\r\n\t\t\tthis.contentManager = contentManager;\r\n\t\t\tthis.renderPopup($popup, result);\r\n\t\t}\r\n\r\n\t\tprivate addDeliveryTime(item: core.IDeliveryPriceInfo, $source: JQuery, $destination: JQuery, mobile = false) {\r\n\t\t\tconst $newRow = $source.clone();\r\n\r\n\t\t\tif (mobile) {\r\n\t\t\t\tconst deliveryCategoryHtml = $newRow.find('.technical-delivery-times-mobile-body-category').html();\r\n\t\t\t\tif (deliveryCategoryHtml) $newRow.find('.technical-delivery-times-mobile-body-category').html(deliveryCategoryHtml.replace(\"[DELIVERYCATEGORY]\", this.getDeliveryCategory(item.DeliveryCategory)));\r\n\t\t\t} else\r\n\t\t\t\t$newRow.find('.technical-delivery-times-header-category').html(this.getDeliveryCategory(item.DeliveryCategory));\r\n\r\n\t\t\t$newRow.find(\".technical-delivery-times-body-method\").html(item.DeliveryInformation);\r\n\t\t\t$newRow.find(\".technical-delivery-times-body-date\").html(item.DeliveryDate);\r\n\t\t\t$newRow.find(\".technical-delivery-times-body-price\").html(item.DeliveryPrice);\r\n\r\n\t\t\t$destination.append($newRow);\r\n\t\t}\r\n\r\n\t\tprivate getDeliveryCategory(categoryLabel: string): string {\r\n\t\t\treturn this.contentManager.getLabel(`Label.ProductCategory.DeliveryInformation.Dialog.${categoryLabel}`, categoryLabel);\r\n\t\t}\r\n\r\n\t\tprivate getDeliveryMethodDescription(deliveryInformationLabel: string, trackAndTrace: boolean): string {\r\n\t\t\tconst withTracking = utils.formatString(\" {0}\", this.contentManager.getLabel(\"Label.Delivery.DeliveryMethod.Home.WithTracking\"));\r\n\t\t\tconst withOutTracking = utils.formatString(\" {0}\", this.contentManager.getLabel(\"Label.Delivery.DeliveryMethod.Home.WithoutTracking\"));\r\n\t\t\treturn utils.formatString(deliveryInformationLabel, (trackAndTrace ? withTracking : withOutTracking));\r\n\t\t}\r\n\r\n\t\tprivate renderPopup($popup: JQuery, result: IDeliveryMethodInfosResult): void {\r\n\t\t\t$popup.find('.technical-delivery-times-title').html(result.Title);\r\n\t\t\tconst $deliveryTimes = $popup.find(\".technical-delivery-times\");\r\n\t\t\tconst $deliveryTimesMobile = $(\".technical-delivery-times-mobile\");\r\n\t\t\tconst $emptyHeader = $popup.find('.technical-delivery-times-header').first().clone();\r\n\t\t\tconst $emptyBody = $popup.find('.technical-delivery-times-body').first().clone();\r\n\t\t\tconst $emptyRowMobile = $popup.find('.technical-delivery-times-row-mobile').first().clone();\r\n\r\n\t\t\t$deliveryTimes.empty();\r\n\t\t\t$deliveryTimesMobile.empty();\r\n\r\n\t\t\tthis.contentManager.getLabelsAsync (\r\n\t\t\t\t[\r\n\t\t\t\t\t\"Label.ProductCategory.DeliveryInformation.Dialog.PickUpDelivery\",\r\n\t\t\t\t\t\"Label.ProductCategory.DeliveryInformation.Dialog.HomeDelivery\",\r\n\t\t\t\t\t\"Label.Delivery.DeliveryMethod.Home.WithTracking\",\r\n\t\t\t\t\t\"Label.Delivery.DeliveryMethod.Home.WithoutTracking\",\r\n\t\t\t\t]\r\n\t\t\t)\r\n\t\t\t.always(() => {\r\n\t\t\t\tlet oldDeliveryCategory = \"\";\r\n\t\t\t\tconst sortedArrayOfDeliveryMethodInfos = this.sortDeliveryMethodInfosArray(result.DeliveryMethodInfos, \"DeliveryPrice\");\r\n\t\t\t\tsortedArrayOfDeliveryMethodInfos.forEach(item => {\r\n\t\t\t\t\tif (oldDeliveryCategory !== item.DeliveryCategory)\r\n\t\t\t\t\t\tthis.addDeliveryTime(item, $emptyHeader, $deliveryTimes);\r\n\r\n\t\t\t\t\tthis.addDeliveryTime(item, $emptyBody, $deliveryTimes);\r\n\t\t\t\t\tthis.addDeliveryTime(item, $emptyRowMobile, $deliveryTimesMobile, true);\r\n\t\t\t\t\toldDeliveryCategory = item.DeliveryCategory;\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tpublic static createDialogAsync(options: IViewDialogOptions): JQueryPromise {\r\n\t\t\treturn super.createDialogAsync(options);\r\n\t\t}\r\n\r\n\t\tprivate sortDeliveryMethodInfosArray(array, key: string) {\r\n\t\t\treturn array.sort(function (a, b) {\r\n\t\t\t\tconst pricea = a[key];\r\n\t\t\t\tconst priceb = b[key];\r\n\r\n\t\t\t\t// converten naar double\r\n\t\t\t\tconst convertedPricea = parseFloat(pricea);\r\n\t\t\t\tconst convertedPriceb = parseFloat(priceb);\r\n\r\n\t\t\t\t// if not converted don't sort values\r\n\t\t\t\tif (!convertedPricea || !convertedPriceb)\r\n\t\t\t\t\treturn 0;\r\n\r\n\t\t\t\t// compare category\r\n\t\t\t\tif (a.DeliveryCategory !== b.DeliveryCategory)\r\n\t\t\t\t\treturn 0;\r\n\r\n\t\t\t\t// compaire keys\r\n\t\t\t\tif (convertedPricea > convertedPriceb) return 1;\r\n\t\t\t\tif (convertedPricea < convertedPriceb) return -1;\r\n\t\t\t\treturn 0;\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\texport class StyleguideViewOptionPricePopup extends StyleguideViewPopup {\r\n\r\n\t\tprivate currentPvc?: string;\r\n\r\n\t\tconstructor($popup: JQuery, closeOnClickOutsidePopup = true) {\r\n\t\t\tsuper($popup, { closeOnClickOutsidePopup });\r\n\t\t}\r\n\r\n\t\tprivate pvcSelectChange(select: Element, quantityBreakListContainer: Element, quantityBreakListItems: Element[], selectedOption: string, noOptionsDiv: Element): void {\r\n\r\n\t\t\tlet visibleItems = 0;\r\n\r\n\t\t\tif (!selectedOption)\r\n\t\t\t\tselectedOption = $(select).children(\"option\").first().val() as string;\r\n\t\t\telse\r\n\t\t\t\t$(select).val(selectedOption);\r\n\r\n\t\t\t$(quantityBreakListItems).each(function (_, item) {\r\n\t\t\t\tif ($(item).data(\"pvc\") === selectedOption) {\r\n\t\t\t\t\t$(this).show();\r\n\t\t\t\t\tvisibleItems++;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$(this).hide();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif (visibleItems > 0) {\r\n\t\t\t\t$(noOptionsDiv).hide();\r\n\t\t\t\t$(quantityBreakListContainer).show();\r\n\t\t\t} else {\r\n\t\t\t\t$(noOptionsDiv).show();\r\n\t\t\t\t$(quantityBreakListContainer).hide();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tprotected init(): void {\r\n\t\t\tsuper.init();\r\n\r\n\t\t\tconst pvcSelect = html.querySelector(this.$popup.get(0), \".technical-price-option-select\", false);\r\n\t\t\tconst quantityBreakListItemContainer = html.querySelector(this.$popup.get(0), \".p-option-price-details__body-container\", true);\r\n\t\t\tconst quantityBreakListItems = html.querySelectorAll(quantityBreakListItemContainer, \".m-quantity-break-list__item-container\");\r\n\t\t\tconst noOptionsDiv = html.querySelector(this.$popup.get(0), \"#noOptionsDiv\", true);\r\n\r\n\t\t\tif (quantityBreakListItemContainer && quantityBreakListItems && noOptionsDiv) {\r\n\t\t\t\t$(noOptionsDiv).hide();\r\n\r\n\t\t\t\tif (!pvcSelect) return;\r\n\r\n\t\t\t\tif (this.currentPvc)\r\n\t\t\t\t\tthis.pvcSelectChange(pvcSelect, quantityBreakListItemContainer, quantityBreakListItems, this.currentPvc, noOptionsDiv);\r\n\t\t\t\telse\r\n\t\t\t\t\tthis.pvcSelectChange(pvcSelect, quantityBreakListItemContainer, quantityBreakListItems, $(pvcSelect).children('option:first-child').val() as string, noOptionsDiv);\r\n\r\n\t\t\t\t$(pvcSelect).on(\"change blur\" + this.namespace, (e) => {\r\n\t\t\t\t\tthis.pvcSelectChange(e.target, quantityBreakListItemContainer, quantityBreakListItems, $(e.target).children('option:selected').val() as string, noOptionsDiv);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tprotected deinit(): void {\r\n\t\t\tsuper.deinit();\r\n\r\n\t\t\tthis.$popup.find(\".m-select-box\").off(this.namespace);\r\n\t\t}\r\n\r\n\t\tpublic openAsync(currentPvc?: string): JQueryPromise {\r\n\t\t\tthis.currentPvc = currentPvc;\r\n\t\t\tthis.init();\r\n\t\t\treturn super.openAsync();\r\n\t\t}\r\n\r\n\t\tprivate getSizeFromPvc(currentPvc: string): string {\r\n\t\t\tlet orientation = ProductOrientation.Square;\r\n\t\t\tlet ratioWidth = 0;\r\n\t\t\tlet ratioHeight = 0;\r\n\t\t\tlet width = 0;\r\n\t\t\tlet height = 0;\r\n\t\t\tlet depth = 0;\r\n\t\t\tlet calcFromRatio = false;\r\n\t\t\tconst ratioParts = currentPvc.split('~');\r\n\r\n\t\t\tif (ratioParts.length > 1) {\r\n\t\t\t\tconst ratioDimensions = ratioParts[1].split('x');\r\n\t\t\t\tratioWidth = Number(ratioDimensions[0]);\r\n\t\t\t\tratioHeight = Number(ratioDimensions[1]);\r\n\t\t\t\tif (ratioWidth > ratioHeight) {\r\n\t\t\t\t\torientation = ProductOrientation.Landscape;\r\n\t\t\t\t} else {\r\n\t\t\t\t\torientation = ProductOrientation.Portrait;\r\n\t\t\t\t}\r\n\t\t\t\tcalcFromRatio = true;\r\n\t\t\t}\r\n\r\n\t\t\tconst sizeParts = ratioParts[0].split('x');\r\n\r\n\t\t\tswitch (sizeParts.length) {\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tif (orientation === ProductOrientation.Landscape) {\r\n\t\t\t\t\t\theight = Number(sizeParts[0].replace(/[^0-9]/g, ''));\r\n\t\t\t\t\t\twidth = height * ratioWidth / ratioHeight;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\twidth = Number(sizeParts[0].replace(/[^0-9]/g, ''));\r\n\t\t\t\t\t\theight = width * ratioHeight / ratioWidth;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\twidth = Number(sizeParts[0].replace(/[^0-9]/g, ''));\r\n\t\t\t\t\theight = Number(sizeParts[1].replace(/[^0-9]/g, ''));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tdepth = Number(sizeParts[2].replace(/[^0-9]/g, ''));\r\n\t\t\t\t\tif (calcFromRatio) {\r\n\t\t\t\t\t\treturn width + \" x \" + height + \" x \" + depth + \" cm\";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (orientation === ProductOrientation.Portrait) {\r\n\t\t\t\t\t\t\treturn width + \" x \" + height + \" x \" + depth + \" cm\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\treturn height + \" x \" + width + \" x \" + depth + \" cm\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (calcFromRatio) {\r\n\t\t\t\treturn width + \" x \" + height + \" cm\";\r\n\t\t\t} else {\r\n\t\t\t\tif (orientation === ProductOrientation.Portrait) {\r\n\t\t\t\t\treturn width + \" x \" + height + \" cm\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn height + \" x \" + width + \" cm\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n"],"names":["eXpress","core","ProductOrientation","openPopupAsync","popupEl","options","deferred","$","Deferred","$popup","id","window","DisableLeaveIntent","$cover","$html","$body","currentY","pageYOffset","show","document","documentElement","style","marginTop","Math","round","addClass","canUseJQueryPopup","popup","background","escape","blur","scrolllock","css","result","close","value","hide","removeClass","scroll","EnableLeaveIntent","this","isClosed","resolve","promise","onVisible","setTimeout","onResize","addEventListener","utils","debounce","Popup","_a","_c","prototype","isOpen","openedPopup","openAsync","_this","makeInvisible","opacity","ClosablePopup","_super","call","$closeButtons","hideCloseIcon","_b","closeOnClickOutsidePopup","closeEvent","popupCounter","namespace","__extends","find","init","always","deinit","on","e","parents","$target","target","length","which","keyCode","click","off","OkCancelAndClosePopup","__assign","createContentDialogAsync","contentManager","dialogId","templateSelector","cssClass","labelContentKey","cancelContentKey","okContentKey","titleContentKey","replacements","titleReplacements","bodySelector","okSelector","okTextSelector","cancelSelector","cancelTextSelector","forceRefresh","remove","clone","attr","getLabelsAsync","then","titleContent","getLabel","formatString","apply","__spreadArray","titleSelector","text","bodyContent","html","okContent","toggle","cancelContent","append","ContentPopup","createDialogAsync","SelectAlbumPopup","currentTarget","closest","folders","$dialogBody","$newAlbum","concat","emptyGuid","$folders","map","folder","nrOfPhotos","fileCount","toString","$folder","thumbUrl","dateCreated","toLocaleDateString","name","StyleguideContentPopup","StyleguideViewPopup","data","services","ServiceBase","getHTML","view","fromCache","res","$res","createCoreDialogAsync","ajax","url","type","contentType","JSON","stringify","StyleguideViewDeliveryTimesPopup","renderPopup","addDeliveryTime","item","$source","$destination","mobile","$newRow","deliveryCategoryHtml","replace","getDeliveryCategory","DeliveryCategory","DeliveryInformation","DeliveryDate","DeliveryPrice","categoryLabel","getDeliveryMethodDescription","deliveryInformationLabel","trackAndTrace","withTracking","withOutTracking","Title","$deliveryTimes","$deliveryTimesMobile","$emptyHeader","first","$emptyBody","$emptyRowMobile","empty","oldDeliveryCategory","sortDeliveryMethodInfosArray","DeliveryMethodInfos","forEach","array","key","sort","a","b","pricea","priceb","convertedPricea","parseFloat","convertedPriceb","StyleguideViewOptionPricePopup","pvcSelectChange","select","quantityBreakListContainer","quantityBreakListItems","selectedOption","noOptionsDiv","visibleItems","val","children","each","_","pvcSelect","querySelector","get","quantityBreakListItemContainer","querySelectorAll","currentPvc","getSizeFromPvc","orientation","Square","ratioWidth","ratioHeight","width","height","depth","calcFromRatio","ratioParts","split","ratioDimensions","Number","Landscape","Portrait","sizeParts"],"mappings":"IAEUA,kkCAAV,SAAUA,UAAQ,SAAAC,MA0CjB,IAAKC,mBAOL,SAAgBC,eAA6BC,QAAsBC,SAClE,IAAMC,SAAWC,EAAEC,WACbC,OAASF,EAAEH,SAEE,wBAAfA,QAAQM,SAAqE,IAA9BC,OAAOC,oBACzDD,OAAOC,qBAGR,IAAMC,OAASN,EAAE,oBACXO,MAAQP,EAAE,QACVQ,MAAQR,EAAE,QACVS,SAAWL,OAAOM,YAExBR,OAAOS,OACPL,OAAOK,OAEPC,SAASC,gBAAgBC,MAAMC,UAAY,IAAMC,KAAKC,MAAMR,UAAY,KAExEF,MAAMW,SAAS,+BACfV,MAAMU,SAAS,eAEXpB,QAAQqB,mBACXjB,OAAOkB,MAAM,CACZC,YAAY,EACZC,QAAQ,EACRC,MAAM,EACNC,YAAY,IAGbtB,OAAOkB,MAAM,SAGblB,OAAOuB,IAAI,UAAW,QAGvB,IAAMC,OAAS,CACdC,MAAO,SAAUC,OACZ9B,QAAQqB,kBACXjB,OAAOkB,MAAM,QAGblB,OAAO2B,OAERvB,OAAOuB,OACPtB,MAAMuB,YAAY,+BAClBtB,MAAMsB,YAAY,eAElBlB,SAASC,gBAAgBC,MAAMC,UAAY,MAE3CX,OAAO2B,OAAO,EAAGtB,UACE,wBAAfZ,QAAQM,SAAoE,IAA7BC,OAAO4B,mBACzD5B,OAAO4B,oBAERC,KAAKC,UAAW,EAChBnC,SAASoC,QAAQP,MACjB,EACDQ,QAASrC,SAASqC,UAClBF,UAAU,GAaX,OAVIpC,SAAWA,QAAQuC,WACtBjC,OAAOkC,YAAW,WACZZ,OAAOQ,UACXpC,QAAQuC,WACT,GAAE,KAEAvC,SAAWA,QAAQyC,UACtBnC,OAAOoC,iBAAiB,SAAU/C,QAAAgD,MAAMC,SAAS5C,QAAQyC,SAAU,MAG7Db,MACP,EA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