{"version":3,"file":"popup.min.js","sources":["popup.ts"],"sourcesContent":["/// <reference path=\"../../typings/jquery.popupoverlay.d.ts\" />\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<TResult> {\r\n\t\tclose(value: TResult): void;\r\n\t\treadonly isClosed: boolean;\r\n\t\treadonly promise: JQueryPromise<TResult>;\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<TCloseResult>(popupEl: HTMLElement, options: { onVisible: () => void, canUseJQueryPopup?: boolean }): IOpenedPopup<TCloseResult> {\r\n\t\tconst deferred = $.Deferred<TCloseResult>();\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\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<TResult> {\r\n\r\n\t\tprotected popupEl: HTMLElement;\r\n\t\tprivate openedPopup: IOpenedPopup<TResult> | 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<TResult> {\r\n\t\t\tthis.openedPopup = openPopupAsync(this.popupEl, { onVisible: () => this.onVisible(), canUseJQueryPopup: this.canUseJQueryPopup }); // 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\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<TResult> extends Popup<TResult | null> {\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<TResult | null> {\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<boolean> {\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<JQuery>().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<JQuery> {\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<string> {\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<JQuery> {\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`<div class=\"item new\" data-folder-id=\"${core.emptyGuid}\">\r\n\t\t\t\t\t\t\t\t<div class=\"thumb\"><span class=\"icon-new-album\" data-icon=\"&#xe916;\" aria-hidden=\"true\"></span></div>\r\n\t\t\t\t\t\t\t\t<div class=\"title\"></div>\r\n\t\t\t\t\t\t</div>`\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`<div class=\"item folder\" data-folder-id=\"${folder.id}\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"thumb ${!folder.thumbUrl ? `empty` : \"\"}\">\r\n\t\t\t\t\t\t\t\t\t\t${folder.thumbUrl ? `<img src=\"${folder.thumbUrl}\">` : \"\"}\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t<div class=\"title\">\r\n\t\t\t\t\t\t\t\t\t\t<span class=\"name\"></span>\r\n\t\t\t\t\t\t\t\t\t\t<span class=\"meta\">${folder.dateCreated ? (folder.dateCreated.toLocaleDateString() + \" - \") : \"\"}${nrOfPhotos}</span>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>`\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<boolean> {\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<JQuery> {\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<boolean> {\r\n\t\tconstructor($popup: JQuery, options: Partial<IStyleguidViewPopupOptions> = {}) {\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<JQuery> {\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<JQuery>().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<JQuery>().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<JQuery> {\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<boolean | null> {\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","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","utils","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,mBACzD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