@flarehr/cars-calculator 2.12.334 → 2.12.336
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/cars-calculator/cars-calculator.esm.js +1 -1
- package/dist/lib/cars-calculator/p-1f02b90d.system.js +1 -1
- package/dist/lib/cars-calculator/p-32d62588.entry.js +1 -0
- package/dist/lib/cars-calculator/{p-bdb992a9.system.entry.js → p-83c5037d.system.entry.js} +1 -1
- package/dist/lib/cars-calculator/{p-6cf67c2a.system.entry.js → p-bab2e843.system.entry.js} +1 -1
- package/dist/lib/cars-calculator/p-cfcf3eb0.entry.js +1 -0
- package/dist/lib/cjs/ap-ben-benefit-list-item.cjs.entry.js +1 -1
- package/dist/lib/cjs/ap-ben-benefits-page.cjs.entry.js +1 -1
- package/dist/lib/collection/components/benefits-app/pages/benefits-page/benefits-list/benefits-list-item.js +1 -1
- package/dist/lib/collection/components/benefits-app/pages/benefits-page/benefits-page.js +1 -1
- package/dist/lib/esm/ap-ben-benefit-list-item.entry.js +1 -1
- package/dist/lib/esm/ap-ben-benefits-page.entry.js +1 -1
- package/dist/lib/esm-es5/ap-ben-benefit-list-item.entry.js +1 -1
- package/dist/lib/esm-es5/ap-ben-benefits-page.entry.js +1 -1
- package/package.json +1 -1
- package/dist/lib/cars-calculator/p-3d51b0e4.entry.js +0 -1
- package/dist/lib/cars-calculator/p-42c2908b.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as i}from"./p-5a1dd786.js";import{g as t}from"./p-c3b6466e.js";import"./p-f3effa5d.js";import"./p-ea120e31.js";import"./p-054d1471.js";import"./p-f63d9d89.js";(()=>{const i=import.meta.url,t={};return""!==i&&(t.resourcesUrl=new URL(".",i).href),e(t)})().then((e=>(t(),i([["p-3d1bbc52",[[0,"benefits-app-host",{sessionState:[32],jwt:[32],appConfiguration:[32]}]]],["p-
|
|
1
|
+
import{p as e,b as i}from"./p-5a1dd786.js";import{g as t}from"./p-c3b6466e.js";import"./p-f3effa5d.js";import"./p-ea120e31.js";import"./p-054d1471.js";import"./p-f63d9d89.js";(()=>{const i=import.meta.url,t={};return""!==i&&(t.resourcesUrl=new URL(".",i).href),e(t)})().then((e=>(t(),i([["p-3d1bbc52",[[0,"benefits-app-host",{sessionState:[32],jwt:[32],appConfiguration:[32]}]]],["p-32d62588",[[0,"ap-ben-benefits-page",{state:[32],shopifyUrl:[32]}]]],["p-db5e986e",[[1,"fl-style-guide",{themeCssUrl:[1,"theme-css-url"]}]]],["p-e4dfa486",[[0,"ap-ben-notifications-section"]]],["p-3fbd93d4",[[0,"ap-ben-oidc-callback-page",{history:[16],callbackMode:[1,"callback-mode"]}]]],["p-b3dba968",[[0,"context-consumer",{context:[16],renderer:[16],subscribe:[16],unsubscribe:[32]}]]],["p-db2f0d84",[[0,"stencil-async-content",{documentLocation:[1,"document-location"],content:[32]}]]],["p-0e61df11",[[0,"stencil-route-title",{titleSuffix:[1,"title-suffix"],pageTitle:[1,"page-title"]}]]],["p-25fef619",[[0,"stencil-router-prompt",{when:[4],message:[1],history:[16],unblock:[32]}]]],["p-703464e6",[[0,"stencil-router-redirect",{history:[16],root:[1],url:[1]}]]],["p-432ab22b",[[0,"fl-dropdown-async",{placeholder:[1],searchFunction:[16],value:[16],required:[4],requiredValidationMessage:[1,"required-validation-message"],disabled:[4],minSearchStringLength:[2,"min-search-string-length"],searchState:[32],inputValue:[32],isDropdownVisible:[32],filteredOptions:[32],highlightedOptionIndex:[32],selectedOption:[32]},[[2,"focus","handleFocus"],[2,"blur","handleBlur"],[2,"keydown","handleKeyDown"]]]]],["p-09dc6da3",[[0,"ap-ben-icon",{iconPrefix:[1,"icon-prefix"],iconId:[1,"icon-id"],spin:[4]}]]],["p-ac876b4a",[[0,"ap-ben-benefit-card",{benefitWithId:[16]}]]],["p-cfcf3eb0",[[0,"ap-ben-benefit-list-item",{benefitWithId:[16]}]]],["p-e62ddd59",[[0,"ap-ben-benefits-list",{benefits:[16]}],[0,"ap-ben-promoted-benefits",{benefits:[16]}],[0,"ap-ben-hero-banner",{shopifyUrl:[16]}]]],["p-61011f19",[[1,"cars-calculator-app",{isPaidCampaign:[4,"is-paid-campaign"],apiBaseUrl:[1,"api-base-url"],profileId:[1,"profile-id"],areStylesLoaded:[32],isModelSelected:[32],isVariantSelected:[32],isQuoteCalculated:[32]}],[0,"ap-ben-quote-result-section",{quote:[32],showPersonalDetailsModal:[32],showBreakdownModal:[32],showCompletePage:[32],showResultQuoteModal:[32]}],[0,"ap-ben-model-variants-section",{variantsList:[32],selectedVariant:[32]}],[0,"ap-ben-choose-vehicle-section",{makeList:[32],modelList:[32],yearList:[32],bodyTypeList:[32],vehicleInfo:[32]}],[0,"ap-ben-personal-info-section",{userInfo:[32]}],[0,"ap-ben-quote-card-section",{isResultQuoteModal:[4,"is-result-quote-modal"],isPaidCampaign:[4,"is-paid-campaign"],quote:[16]}],[0,"ap-ben-submit-quote-section",{userDetails:[32],formState:[32]}],[0,"ap-ben-complete-section"],[0,"ap-ben-cost-breakdown-section",{quote:[16]}],[0,"ap-ben-asset",{image:[1]}],[0,"ap-ben-disclaimer"],[4,"ap-ben-tooltip",{target:[16],placement:[1],isVisible:[32]}],[0,"fl-dropdown",{placeholder:[1],options:[16],value:[16],required:[4],requiredValidationMessage:[1,"required-validation-message"],disabled:[4],inputValue:[32],isDropdownVisible:[32],filteredOptions:[32],highlightedOptionIndex:[32],selectedOption:[32]},[[2,"focus","handleFocus"],[2,"blur","handleBlur"],[2,"keydown","handleKeyDown"]]],[4,"ap-ben-modal-section",{show:[8],modalTitle:[8,"modal-title"],showFooter:[4,"show-footer"],showHeader:[4,"show-header"]}],[4,"fl-promise-button",{isBlockElement:[4,"is-block-element"],isRounded:[4,"is-rounded"],disabled:[4],variant:[1],promiseFn:[16],state:[32]}],[0,"fl-loading-indicator",{theme:[1]}],[4,"fl-button",{isBlockElement:[4,"is-block-element"],disabled:[4],variant:[1],outline:[4]}]]],["p-49b3e7c7",[[0,"ap-ben-role-editors-section",{editorProfiles:[32],isEmailValid:[32],displayInvalidEmailError:[32],emailNotExist:[32],isLoading:[32]}],[0,"ap-ben-role-owner-section",{owner:[16]}],[4,"ap-ben-confirm-dialog",{titleText:[1,"title-text"],acceptText:[1,"accept-text"],declineText:[1,"decline-text"],dialogStyle:[1,"dialog-style"]}],[4,"ap-ben-ui-container",{isAppInitialised:[32]}]]],["p-e01b16ca",[[0,"ap-ben-role-management-page",{showRemoveConfirmDialog:[32],user:[32]}],[0,"ap-ben-edit-benefit-form",{isValidationDisplayed:[4,"is-validation-displayed"],disabled:[4],draftBenefit:[32]}],[0,"ap-ben-managed-benefit-item",{benefit:[16]}],[0,"ap-ben-empty-benefits"],[0,"ap-ben-upload-file",{uploadedFile:[32],uploadFileState:[32],isUploadError:[32]}],[0,"ap-ben-benefit-url",{benefitUrl:[32],uiState:[32],inputState:[32]}],[0,"ap-ben-upload-benefit-icon",{customIcon:[32],uploadIconState:[32]}],[0,"ap-ben-manage-benefits-header-row"],[0,"stencil-route",{group:[513],componentUpdated:[16],match:[1040],url:[1],component:[1],componentProps:[16],exact:[4],routeRender:[16],scrollTopOffset:[2,"scroll-top-offset"],routeViewsUpdated:[16],location:[16],history:[16],historyType:[1,"history-type"]}],[0,"ap-ben-file-icon",{fileType:[1,"file-type"],isEmpty:[4,"is-empty"]}]]],["p-660badab",[[4,"stencil-route-link",{url:[1],urlMatch:[1,"url-match"],activeClass:[1,"active-class"],exact:[4],strict:[4],custom:[1],anchorClass:[1,"anchor-class"],anchorRole:[1,"anchor-role"],anchorTitle:[1,"anchor-title"],anchorTabIndex:[1,"anchor-tab-index"],anchorId:[1,"anchor-id"],history:[16],location:[16],root:[1],ariaHaspopup:[1,"aria-haspopup"],ariaPosinset:[1,"aria-posinset"],ariaSetsize:[2,"aria-setsize"],ariaLabel:[1,"aria-label"],match:[32]}],[4,"stencil-route-switch",{group:[513],scrollTopOffset:[2,"scroll-top-offset"],location:[16],routeViewsUpdated:[16]}],[4,"stencil-router",{root:[1],historyType:[1,"history-type"],titleSuffix:[1,"title-suffix"],scrollTopOffset:[2,"scroll-top-offset"],location:[32],history:[32]}],[0,"ap-ben-edit-benefit-page",{benefitId:[16],editMode:[32],selectedBenefit:[32],draftBenefit:[32],showDeleteConfirmDialog:[32],showCancelConfirmDialog:[32],isLoading:[32],isValidationDisplayed:[32]}],[0,"ap-ben-manage-page",{showDisabledBenefits:[32],pageState:[32],isLoading:[32]}]]],["p-19553611",[[1,"benefits-app",{jwt:[1],apiBaseUrl:[1,"api-base-url"],appBaseUrl:[1,"app-base-url"],location:[16],history:[16],areStylesLoaded:[32],user:[32],signedInUserRole:[32]}],[0,"ap-ben-loading-page"]]]],e))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-8a3fa951.system.js","./p-bdb3fb61.system.js","./p-19b00569.system.js","./p-6efcc4fd.system.js","./p-0eebae53.system.js","./p-d19c8a5d.system.js"],(function(e,t){"use strict";var i,a,s;return{setters:[function(e){i=e.p;a=e.b},function(e){s=e.g},function(){},function(){},function(){},function(){}],execute:function(){var e=function(){var e=t.meta.url;var a={};if(e!==""){a.resourcesUrl=new URL(".",e).href}return i(a)};e().then((function(e){s();return a([["p-9f2b435c.system",[[0,"benefits-app-host",{sessionState:[32],jwt:[32],appConfiguration:[32]}]]],["p-
|
|
1
|
+
System.register(["./p-8a3fa951.system.js","./p-bdb3fb61.system.js","./p-19b00569.system.js","./p-6efcc4fd.system.js","./p-0eebae53.system.js","./p-d19c8a5d.system.js"],(function(e,t){"use strict";var i,a,s;return{setters:[function(e){i=e.p;a=e.b},function(e){s=e.g},function(){},function(){},function(){},function(){}],execute:function(){var e=function(){var e=t.meta.url;var a={};if(e!==""){a.resourcesUrl=new URL(".",e).href}return i(a)};e().then((function(e){s();return a([["p-9f2b435c.system",[[0,"benefits-app-host",{sessionState:[32],jwt:[32],appConfiguration:[32]}]]],["p-83c5037d.system",[[0,"ap-ben-benefits-page",{state:[32],shopifyUrl:[32]}]]],["p-1949e248.system",[[1,"fl-style-guide",{themeCssUrl:[1,"theme-css-url"]}]]],["p-44217678.system",[[0,"ap-ben-notifications-section"]]],["p-752cda07.system",[[0,"ap-ben-oidc-callback-page",{history:[16],callbackMode:[1,"callback-mode"]}]]],["p-bac02f69.system",[[0,"context-consumer",{context:[16],renderer:[16],subscribe:[16],unsubscribe:[32]}]]],["p-089f799f.system",[[0,"stencil-async-content",{documentLocation:[1,"document-location"],content:[32]}]]],["p-b5b9fbb9.system",[[0,"stencil-route-title",{titleSuffix:[1,"title-suffix"],pageTitle:[1,"page-title"]}]]],["p-427cd00b.system",[[0,"stencil-router-prompt",{when:[4],message:[1],history:[16],unblock:[32]}]]],["p-af99b02b.system",[[0,"stencil-router-redirect",{history:[16],root:[1],url:[1]}]]],["p-63d2e0d2.system",[[0,"fl-dropdown-async",{placeholder:[1],searchFunction:[16],value:[16],required:[4],requiredValidationMessage:[1,"required-validation-message"],disabled:[4],minSearchStringLength:[2,"min-search-string-length"],searchState:[32],inputValue:[32],isDropdownVisible:[32],filteredOptions:[32],highlightedOptionIndex:[32],selectedOption:[32]},[[2,"focus","handleFocus"],[2,"blur","handleBlur"],[2,"keydown","handleKeyDown"]]]]],["p-6fa886b4.system",[[0,"ap-ben-icon",{iconPrefix:[1,"icon-prefix"],iconId:[1,"icon-id"],spin:[4]}]]],["p-d40f43c4.system",[[0,"ap-ben-benefit-card",{benefitWithId:[16]}]]],["p-bab2e843.system",[[0,"ap-ben-benefit-list-item",{benefitWithId:[16]}]]],["p-603fb7eb.system",[[0,"ap-ben-benefits-list",{benefits:[16]}],[0,"ap-ben-promoted-benefits",{benefits:[16]}],[0,"ap-ben-hero-banner",{shopifyUrl:[16]}]]],["p-c6eb9031.system",[[1,"cars-calculator-app",{isPaidCampaign:[4,"is-paid-campaign"],apiBaseUrl:[1,"api-base-url"],profileId:[1,"profile-id"],areStylesLoaded:[32],isModelSelected:[32],isVariantSelected:[32],isQuoteCalculated:[32]}],[0,"ap-ben-quote-result-section",{quote:[32],showPersonalDetailsModal:[32],showBreakdownModal:[32],showCompletePage:[32],showResultQuoteModal:[32]}],[0,"ap-ben-model-variants-section",{variantsList:[32],selectedVariant:[32]}],[0,"ap-ben-choose-vehicle-section",{makeList:[32],modelList:[32],yearList:[32],bodyTypeList:[32],vehicleInfo:[32]}],[0,"ap-ben-personal-info-section",{userInfo:[32]}],[0,"ap-ben-quote-card-section",{isResultQuoteModal:[4,"is-result-quote-modal"],isPaidCampaign:[4,"is-paid-campaign"],quote:[16]}],[0,"ap-ben-submit-quote-section",{userDetails:[32],formState:[32]}],[0,"ap-ben-complete-section"],[0,"ap-ben-cost-breakdown-section",{quote:[16]}],[0,"ap-ben-asset",{image:[1]}],[0,"ap-ben-disclaimer"],[4,"ap-ben-tooltip",{target:[16],placement:[1],isVisible:[32]}],[0,"fl-dropdown",{placeholder:[1],options:[16],value:[16],required:[4],requiredValidationMessage:[1,"required-validation-message"],disabled:[4],inputValue:[32],isDropdownVisible:[32],filteredOptions:[32],highlightedOptionIndex:[32],selectedOption:[32]},[[2,"focus","handleFocus"],[2,"blur","handleBlur"],[2,"keydown","handleKeyDown"]]],[4,"ap-ben-modal-section",{show:[8],modalTitle:[8,"modal-title"],showFooter:[4,"show-footer"],showHeader:[4,"show-header"]}],[4,"fl-promise-button",{isBlockElement:[4,"is-block-element"],isRounded:[4,"is-rounded"],disabled:[4],variant:[1],promiseFn:[16],state:[32]}],[0,"fl-loading-indicator",{theme:[1]}],[4,"fl-button",{isBlockElement:[4,"is-block-element"],disabled:[4],variant:[1],outline:[4]}]]],["p-80805870.system",[[0,"ap-ben-role-editors-section",{editorProfiles:[32],isEmailValid:[32],displayInvalidEmailError:[32],emailNotExist:[32],isLoading:[32]}],[0,"ap-ben-role-owner-section",{owner:[16]}],[4,"ap-ben-confirm-dialog",{titleText:[1,"title-text"],acceptText:[1,"accept-text"],declineText:[1,"decline-text"],dialogStyle:[1,"dialog-style"]}],[4,"ap-ben-ui-container",{isAppInitialised:[32]}]]],["p-ae02f29f.system",[[0,"ap-ben-role-management-page",{showRemoveConfirmDialog:[32],user:[32]}],[0,"ap-ben-edit-benefit-form",{isValidationDisplayed:[4,"is-validation-displayed"],disabled:[4],draftBenefit:[32]}],[0,"ap-ben-managed-benefit-item",{benefit:[16]}],[0,"ap-ben-empty-benefits"],[0,"ap-ben-upload-file",{uploadedFile:[32],uploadFileState:[32],isUploadError:[32]}],[0,"ap-ben-benefit-url",{benefitUrl:[32],uiState:[32],inputState:[32]}],[0,"ap-ben-upload-benefit-icon",{customIcon:[32],uploadIconState:[32]}],[0,"ap-ben-manage-benefits-header-row"],[0,"stencil-route",{group:[513],componentUpdated:[16],match:[1040],url:[1],component:[1],componentProps:[16],exact:[4],routeRender:[16],scrollTopOffset:[2,"scroll-top-offset"],routeViewsUpdated:[16],location:[16],history:[16],historyType:[1,"history-type"]}],[0,"ap-ben-file-icon",{fileType:[1,"file-type"],isEmpty:[4,"is-empty"]}]]],["p-fe672d96.system",[[4,"stencil-route-link",{url:[1],urlMatch:[1,"url-match"],activeClass:[1,"active-class"],exact:[4],strict:[4],custom:[1],anchorClass:[1,"anchor-class"],anchorRole:[1,"anchor-role"],anchorTitle:[1,"anchor-title"],anchorTabIndex:[1,"anchor-tab-index"],anchorId:[1,"anchor-id"],history:[16],location:[16],root:[1],ariaHaspopup:[1,"aria-haspopup"],ariaPosinset:[1,"aria-posinset"],ariaSetsize:[2,"aria-setsize"],ariaLabel:[1,"aria-label"],match:[32]}],[4,"stencil-route-switch",{group:[513],scrollTopOffset:[2,"scroll-top-offset"],location:[16],routeViewsUpdated:[16]}],[4,"stencil-router",{root:[1],historyType:[1,"history-type"],titleSuffix:[1,"title-suffix"],scrollTopOffset:[2,"scroll-top-offset"],location:[32],history:[32]}],[0,"ap-ben-edit-benefit-page",{benefitId:[16],editMode:[32],selectedBenefit:[32],draftBenefit:[32],showDeleteConfirmDialog:[32],showCancelConfirmDialog:[32],isLoading:[32],isValidationDisplayed:[32]}],[0,"ap-ben-manage-page",{showDisabledBenefits:[32],pageState:[32],isLoading:[32]}]]],["p-93169a67.system",[[1,"benefits-app",{jwt:[1],apiBaseUrl:[1,"api-base-url"],appBaseUrl:[1,"app-base-url"],location:[16],history:[16],areStylesLoaded:[32],user:[32],signedInUserRole:[32]}],[0,"ap-ben-loading-page"]]]],e)}))}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,h as i,H as t}from"./p-5a1dd786.js";import{b as a,n as e,c as o,s as n}from"./p-2c9dd7c4.js";import{b as r}from"./p-bf086b51.js";import{b as p}from"./p-d54987a3.js";import"./p-7062880e.js";import"./p-7ad92407.js";import"./p-f3effa5d.js";import"./p-ea120e31.js";import"./p-054d1471.js";import"./p-f63d9d89.js";const c=new class{async getViewPageState(){return r.getBenefitsAsync()}async getShopifyUrl(){return a((await r.getShopifyUrl()).redirectUrl)}},d=class{constructor(i){s(this,i),this.urlRefreshHandle=e,this.state=void 0,this.shopifyUrl=e}async componentWillLoad(){this.state=await c.getViewPageState()}async componentDidLoad(){this.shopifyUrl=await c.getShopifyUrl(),this.setupShopifyUrlRefresh(),p.trackBenefitsOpenedAsync()}disconnectedCallback(){o(this.urlRefreshHandle)&&window.clearInterval(this.urlRefreshHandle.value)}render(){return i(t,{class:"w-100 mb-4"},i("ap-ben-ui-container",{class:"mt-4 d-none"},i("div",{class:"row"},i("div",{class:"col-12"},i("ap-ben-hero-banner",{shopifyUrl:this.shopifyUrl}))),i("div",{class:"row"},i("div",{class:"col-12"},i("ap-ben-promoted-benefits",{benefits:this.state.promotedBenefits}))),i("div",{class:"row"},i("div",{class:"col-12"},i("ap-ben-benefits-list",{benefits:this.state.availableBenefits})))))}setupShopifyUrlRefresh(){this.urlRefreshHandle=n(window.setInterval((async()=>{this.shopifyUrl=await c.getShopifyUrl()}),12e4))}};export{d as ap_ben_benefits_page}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,n,r){function i(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,s){function o(t){try{c(r.next(t))}catch(t){s(t)}}function a(t){try{c(r["throw"](t))}catch(t){s(t)}}function c(t){t.done?n(t.value):i(t.value).then(o,a)}c((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(t){return function(e){return c([t,e])}}function c(o){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(s=o[0]&2?i["return"]:o[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,o[1])).done)return s;if(i=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:n.label++;return{value:o[1],done:false};case 5:n.label++;i=o[1];o=[0];continue;case 7:o=n.ops.pop();n.trys.pop();continue;default:if(!(s=n.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){n.label=o[1];break}if(o[0]===6&&n.label<s[1]){n.label=s[1];s=o;break}if(s&&n.label<s[2]){n.label=s[2];n.ops.push(o);break}if(s[2])n.ops.pop();n.trys.pop();continue}o=e.call(t,n)}catch(t){o=[6,t];i=0}finally{r=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-8a3fa951.system.js","./p-9a8c9350.system.js","./p-b41f72c8.system.js","./p-d99bf636.system.js","./p-45d6fbc2.system.js","./p-0045ce79.system.js","./p-19b00569.system.js","./p-6efcc4fd.system.js","./p-0eebae53.system.js","./p-d19c8a5d.system.js"],(function(t){"use strict";var e,n,r,i,s,o,a,c,u;return{setters:[function(t){e=t.r;n=t.h;r=t.H},function(t){i=t.b;s=t.n;o=t.c;a=t.s},function(t){c=t.b},function(t){u=t.b},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var f=function(){function t(){}t.prototype.getViewPageState=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,c.getBenefitsAsync()]}))}))};t.prototype.getShopifyUrl=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=i;return[4,c.getShopifyUrl()];case 1:return[2,t.apply(void 0,[e.sent().redirectUrl])]}}))}))};return t}();var l=new f;var h=t("ap_ben_benefits_page",function(){function t(t){e(this,t);this.urlRefreshHandle=s;this.state=undefined;this.shopifyUrl=s}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=this;return[4,l.getViewPageState()];case 1:t.state=e.sent();return[2]}}))}))};t.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=this;return[4,l.getShopifyUrl()];case 1:t.shopifyUrl=e.sent();this.setupShopifyUrlRefresh();
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,n,r){function i(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,s){function o(t){try{c(r.next(t))}catch(t){s(t)}}function a(t){try{c(r["throw"](t))}catch(t){s(t)}}function c(t){t.done?n(t.value):i(t.value).then(o,a)}c((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(t){return function(e){return c([t,e])}}function c(o){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(s=o[0]&2?i["return"]:o[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,o[1])).done)return s;if(i=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:n.label++;return{value:o[1],done:false};case 5:n.label++;i=o[1];o=[0];continue;case 7:o=n.ops.pop();n.trys.pop();continue;default:if(!(s=n.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){n.label=o[1];break}if(o[0]===6&&n.label<s[1]){n.label=s[1];s=o;break}if(s&&n.label<s[2]){n.label=s[2];n.ops.push(o);break}if(s[2])n.ops.pop();n.trys.pop();continue}o=e.call(t,n)}catch(t){o=[6,t];i=0}finally{r=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-8a3fa951.system.js","./p-9a8c9350.system.js","./p-b41f72c8.system.js","./p-d99bf636.system.js","./p-45d6fbc2.system.js","./p-0045ce79.system.js","./p-19b00569.system.js","./p-6efcc4fd.system.js","./p-0eebae53.system.js","./p-d19c8a5d.system.js"],(function(t){"use strict";var e,n,r,i,s,o,a,c,u;return{setters:[function(t){e=t.r;n=t.h;r=t.H},function(t){i=t.b;s=t.n;o=t.c;a=t.s},function(t){c=t.b},function(t){u=t.b},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var f=function(){function t(){}t.prototype.getViewPageState=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,c.getBenefitsAsync()]}))}))};t.prototype.getShopifyUrl=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=i;return[4,c.getShopifyUrl()];case 1:return[2,t.apply(void 0,[e.sent().redirectUrl])]}}))}))};return t}();var l=new f;var h=t("ap_ben_benefits_page",function(){function t(t){e(this,t);this.urlRefreshHandle=s;this.state=undefined;this.shopifyUrl=s}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=this;return[4,l.getViewPageState()];case 1:t.state=e.sent();return[2]}}))}))};t.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=this;return[4,l.getShopifyUrl()];case 1:t.shopifyUrl=e.sent();this.setupShopifyUrlRefresh();u.trackBenefitsOpenedAsync();return[2]}}))}))};t.prototype.disconnectedCallback=function(){if(o(this.urlRefreshHandle)){window.clearInterval(this.urlRefreshHandle.value)}};t.prototype.render=function(){return n(r,{class:"w-100 mb-4"},n("ap-ben-ui-container",{class:"mt-4 d-none"},n("div",{class:"row"},n("div",{class:"col-12"},n("ap-ben-hero-banner",{shopifyUrl:this.shopifyUrl}))),n("div",{class:"row"},n("div",{class:"col-12"},n("ap-ben-promoted-benefits",{benefits:this.state.promotedBenefits}))),n("div",{class:"row"},n("div",{class:"col-12"},n("ap-ben-benefits-list",{benefits:this.state.availableBenefits})))))};t.prototype.setupShopifyUrlRefresh=function(){var t=this;var e=2*60*1e3;this.urlRefreshHandle=a(window.setInterval((function(){return __awaiter(t,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=this;return[4,l.getShopifyUrl()];case 1:t.shopifyUrl=e.sent();return[2]}}))}))}),e))};return t}())}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,n,i){function r(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function s(t){try{a(i.next(t))}catch(t){o(t)}}function c(t){try{a(i["throw"](t))}catch(t){o(t)}}function a(t){t.done?n(t.value):r(t.value).then(s,c)}a((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(t){return function(e){return a([t,e])}}function a(s){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,r&&(o=s[0]&2?r["return"]:s[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;if(r=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;r=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=e.call(t,n)}catch(t){s=[6,t];r=0}finally{i=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-8a3fa951.system.js","./p-d99bf636.system.js","./p-45d6fbc2.system.js","./p-9a8c9350.system.js","./p-0045ce79.system.js","./p-19b00569.system.js","./p-6efcc4fd.system.js","./p-0eebae53.system.js","./p-d19c8a5d.system.js"],(function(t){"use strict";var e,n,i;return{setters:[function(t){e=t.r;n=t.h},function(t){i=t.b},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var r="ap-ben-benefit-list-item .btn.btn-success{background-color:#27a88a;border-color:#27a88a}ap-ben-benefit-list-item .btn.btn-success:hover{background-color:#23967b;border-color:#23967b}ap-ben-benefit-list-item .btn.btn-success:not(:disabled):not(.disabled):active{background-color:#23967b;border-color:#23967b}@media (max-width: 575.98px){ap-ben-benefit-list-item .btn.btn-success{display:block;width:100%}}ap-ben-benefit-list-item .benefit-image{-o-object-fit:cover;object-fit:cover;width:100%;max-width:4rem}";var o=t("ap_ben_benefit_list_item",function(){function t(t){var n=this;e(this,t);this.onBenefitButtonClick=function(){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(t){
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,n,i){function r(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function s(t){try{a(i.next(t))}catch(t){o(t)}}function c(t){try{a(i["throw"](t))}catch(t){o(t)}}function a(t){t.done?n(t.value):r(t.value).then(s,c)}a((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(t){return function(e){return a([t,e])}}function a(s){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,r&&(o=s[0]&2?r["return"]:s[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;if(r=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;r=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=e.call(t,n)}catch(t){s=[6,t];r=0}finally{i=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-8a3fa951.system.js","./p-d99bf636.system.js","./p-45d6fbc2.system.js","./p-9a8c9350.system.js","./p-0045ce79.system.js","./p-19b00569.system.js","./p-6efcc4fd.system.js","./p-0eebae53.system.js","./p-d19c8a5d.system.js"],(function(t){"use strict";var e,n,i;return{setters:[function(t){e=t.r;n=t.h},function(t){i=t.b},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var r="ap-ben-benefit-list-item .btn.btn-success{background-color:#27a88a;border-color:#27a88a}ap-ben-benefit-list-item .btn.btn-success:hover{background-color:#23967b;border-color:#23967b}ap-ben-benefit-list-item .btn.btn-success:not(:disabled):not(.disabled):active{background-color:#23967b;border-color:#23967b}@media (max-width: 575.98px){ap-ben-benefit-list-item .btn.btn-success{display:block;width:100%}}ap-ben-benefit-list-item .benefit-image{-o-object-fit:cover;object-fit:cover;width:100%;max-width:4rem}";var o=t("ap_ben_benefit_list_item",function(){function t(t){var n=this;e(this,t);this.onBenefitButtonClick=function(){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(t){if(this.benefit.url===null)return[2];window.open(this.benefit.url,"_blank");i.trackBenefitLinkClickedAsync(this.benefitWithId);return[2]}))}))};this.benefitWithId=undefined}t.prototype.render=function(){return n("div",{class:"uiid-view-benefit-item-exist row align-items-top py-3 mx-0"},n("div",{class:"col-4 col-md-2 col-lg-1 px-0"},n("div",{class:"ml-0 my-lg-3 my-sm-2 my-xs-2 mr-3"},this.IconElement())),n("div",{class:"col-12 col-lg-8 text-left px-lg-2 px-0 pt-lg-0 pt-3"},n("h4",{class:"card-title mb-1 text-break"},this.benefit.title),n("span",{class:"benefit-value-description text-break"},this.benefit.subtitle),this.benefit.subtitle&&" - ",n("span",{class:"text-muted"},this.benefit.category),n("p",{class:"mb-0 pt-lg-3 pt-4 text-break"},this.benefit.description)),n("div",{class:"col-12 col-lg-3 px-0 d-flex justify-content-end align-items-start"},this.openAttachmentButton(),this.learnMoreButton()))};Object.defineProperty(t.prototype,"benefit",{get:function(){return this.benefitWithId.benefit},enumerable:false,configurable:true});t.prototype.learnMoreButton=function(){var t=this;if(this.benefit.url===null||this.benefit.url===""){return undefined}return n("button",{type:"button",class:"uiid-validate-benefit-url-exist d-block d-lg-inline-block btn btn-light px-4 py-2 ml-2",onClick:function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.onBenefitButtonClick()]}))}))}},"Learn more")};t.prototype.openAttachmentButton=function(){var t=this;var e;if(this.benefit.attachments===null||((e=this.benefit.attachments)===null||e===void 0?void 0:e.length)===0){return undefined}return n("a",{class:"uiid-validate-benefit-doc-exist d-block d-lg-inline-block btn btn-light px-4 py-2",target:"_blank",href:this.benefit.attachments[0].downloadUrl,onClick:function(e){return i.trackBenefitAttachmentClickedAsync(t.benefitWithId)}},n("span",null,"View"))};t.prototype.IconElement=function(){if(this.benefit.icon!==null){return n("img",{src:this.benefit.icon.downloadUrl,class:"img-responsive benefit-image",alt:"benefit-icon"})}else{return n("ap-ben-icon",{class:"text-black-50 fa-3x",iconPrefix:"fad",iconId:"award"})}};return t}());o.style=r}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as i}from"./p-5a1dd786.js";import{b as e}from"./p-d54987a3.js";import"./p-7062880e.js";import"./p-2c9dd7c4.js";import"./p-7ad92407.js";import"./p-f3effa5d.js";import"./p-ea120e31.js";import"./p-054d1471.js";import"./p-f63d9d89.js";const s=class{constructor(i){t(this,i),this.onBenefitButtonClick=async()=>{null!==this.benefit.url&&(window.open(this.benefit.url,"_blank"),e.trackBenefitLinkClickedAsync(this.benefitWithId))},this.benefitWithId=void 0}render(){return i("div",{class:"uiid-view-benefit-item-exist row align-items-top py-3 mx-0"},i("div",{class:"col-4 col-md-2 col-lg-1 px-0"},i("div",{class:"ml-0 my-lg-3 my-sm-2 my-xs-2 mr-3"},this.IconElement())),i("div",{class:"col-12 col-lg-8 text-left px-lg-2 px-0 pt-lg-0 pt-3"},i("h4",{class:"card-title mb-1 text-break"},this.benefit.title),i("span",{class:"benefit-value-description text-break"},this.benefit.subtitle),this.benefit.subtitle&&" - ",i("span",{class:"text-muted"},this.benefit.category),i("p",{class:"mb-0 pt-lg-3 pt-4 text-break"},this.benefit.description)),i("div",{class:"col-12 col-lg-3 px-0 d-flex justify-content-end align-items-start"},this.openAttachmentButton(),this.learnMoreButton()))}get benefit(){return this.benefitWithId.benefit}learnMoreButton(){if(null!==this.benefit.url&&""!==this.benefit.url)return i("button",{type:"button",class:"uiid-validate-benefit-url-exist d-block d-lg-inline-block btn btn-light px-4 py-2 ml-2",onClick:async()=>this.onBenefitButtonClick()},"Learn more")}openAttachmentButton(){var t;if(null!==this.benefit.attachments&&0!==(null===(t=this.benefit.attachments)||void 0===t?void 0:t.length))return i("a",{class:"uiid-validate-benefit-doc-exist d-block d-lg-inline-block btn btn-light px-4 py-2",target:"_blank",href:this.benefit.attachments[0].downloadUrl,onClick:()=>e.trackBenefitAttachmentClickedAsync(this.benefitWithId)},i("span",null,"View"))}IconElement(){return null!==this.benefit.icon?i("img",{src:this.benefit.icon.downloadUrl,class:"img-responsive benefit-image",alt:"benefit-icon"}):i("ap-ben-icon",{class:"text-black-50 fa-3x",iconPrefix:"fad",iconId:"award"})}};s.style="ap-ben-benefit-list-item .btn.btn-success{background-color:#27a88a;border-color:#27a88a}ap-ben-benefit-list-item .btn.btn-success:hover{background-color:#23967b;border-color:#23967b}ap-ben-benefit-list-item .btn.btn-success:not(:disabled):not(.disabled):active{background-color:#23967b;border-color:#23967b}@media (max-width: 575.98px){ap-ben-benefit-list-item .btn.btn-success{display:block;width:100%}}ap-ben-benefit-list-item .benefit-image{-o-object-fit:cover;object-fit:cover;width:100%;max-width:4rem}";export{s as ap_ben_benefit_list_item}
|
|
@@ -21,7 +21,7 @@ const BenefitListItem = class {
|
|
|
21
21
|
if (this.benefit.url === null)
|
|
22
22
|
return;
|
|
23
23
|
window.open(this.benefit.url, '_blank');
|
|
24
|
-
|
|
24
|
+
eventTracking_service.benefitsEventTrackingService.trackBenefitLinkClickedAsync(this.benefitWithId);
|
|
25
25
|
};
|
|
26
26
|
this.benefitWithId = undefined;
|
|
27
27
|
}
|
|
@@ -36,7 +36,7 @@ const BenefitsPage = class {
|
|
|
36
36
|
async componentDidLoad() {
|
|
37
37
|
this.shopifyUrl = await benefitsService.getShopifyUrl();
|
|
38
38
|
this.setupShopifyUrlRefresh();
|
|
39
|
-
|
|
39
|
+
eventTracking_service.benefitsEventTrackingService.trackBenefitsOpenedAsync();
|
|
40
40
|
}
|
|
41
41
|
disconnectedCallback() {
|
|
42
42
|
if (index.isSome(this.urlRefreshHandle)) {
|
|
@@ -6,7 +6,7 @@ export class BenefitListItem {
|
|
|
6
6
|
if (this.benefit.url === null)
|
|
7
7
|
return;
|
|
8
8
|
window.open(this.benefit.url, '_blank');
|
|
9
|
-
|
|
9
|
+
benefitsEventTrackingService.trackBenefitLinkClickedAsync(this.benefitWithId);
|
|
10
10
|
};
|
|
11
11
|
this.benefitWithId = undefined;
|
|
12
12
|
}
|
|
@@ -14,7 +14,7 @@ export class BenefitsPage {
|
|
|
14
14
|
async componentDidLoad() {
|
|
15
15
|
this.shopifyUrl = await benefitsService.getShopifyUrl();
|
|
16
16
|
this.setupShopifyUrlRefresh();
|
|
17
|
-
|
|
17
|
+
benefitsEventTrackingService.trackBenefitsOpenedAsync();
|
|
18
18
|
}
|
|
19
19
|
disconnectedCallback() {
|
|
20
20
|
if (O.isSome(this.urlRefreshHandle)) {
|
|
@@ -17,7 +17,7 @@ const BenefitListItem = class {
|
|
|
17
17
|
if (this.benefit.url === null)
|
|
18
18
|
return;
|
|
19
19
|
window.open(this.benefit.url, '_blank');
|
|
20
|
-
|
|
20
|
+
benefitsEventTrackingService.trackBenefitLinkClickedAsync(this.benefitWithId);
|
|
21
21
|
};
|
|
22
22
|
this.benefitWithId = undefined;
|
|
23
23
|
}
|
|
@@ -32,7 +32,7 @@ const BenefitsPage = class {
|
|
|
32
32
|
async componentDidLoad() {
|
|
33
33
|
this.shopifyUrl = await benefitsService.getShopifyUrl();
|
|
34
34
|
this.setupShopifyUrlRefresh();
|
|
35
|
-
|
|
35
|
+
benefitsEventTrackingService.trackBenefitsOpenedAsync();
|
|
36
36
|
}
|
|
37
37
|
disconnectedCallback() {
|
|
38
38
|
if (isSome(this.urlRefreshHandle)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,n,i){function r(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function a(t){try{
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,n,i){function r(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function a(t){try{l(i.next(t))}catch(t){o(t)}}function s(t){try{l(i["throw"](t))}catch(t){o(t)}}function l(t){t.done?n(t.value):r(t.value).then(a,s)}l((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return l([t,e])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;r=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1];o=a;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(a);break}if(o[2])n.ops.pop();n.trys.pop();continue}a=e.call(t,n)}catch(t){a=[6,t];r=0}finally{i=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,h}from"./index-67b83cf8.js";import{b as benefitsEventTrackingService}from"./event-tracking.service-4d5f3c3f.js";import"./api-client-a68152b8.js";import"./index-6869168f.js";import"./index-8f0ba0c8.js";import"./datorama-akita-d2413fd0.js";import"./scheduleArray-b9669898.js";import"./delay-d08c267f.js";import"./filter-aeb65cac.js";var benefitListItemCss="ap-ben-benefit-list-item .btn.btn-success{background-color:#27a88a;border-color:#27a88a}ap-ben-benefit-list-item .btn.btn-success:hover{background-color:#23967b;border-color:#23967b}ap-ben-benefit-list-item .btn.btn-success:not(:disabled):not(.disabled):active{background-color:#23967b;border-color:#23967b}@media (max-width: 575.98px){ap-ben-benefit-list-item .btn.btn-success{display:block;width:100%}}ap-ben-benefit-list-item .benefit-image{-o-object-fit:cover;object-fit:cover;width:100%;max-width:4rem}";var BenefitListItem=function(){function t(t){var e=this;registerInstance(this,t);this.onBenefitButtonClick=function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(t){if(this.benefit.url===null)return[2];window.open(this.benefit.url,"_blank");benefitsEventTrackingService.trackBenefitLinkClickedAsync(this.benefitWithId);return[2]}))}))};this.benefitWithId=undefined}t.prototype.render=function(){return h("div",{class:"uiid-view-benefit-item-exist row align-items-top py-3 mx-0"},h("div",{class:"col-4 col-md-2 col-lg-1 px-0"},h("div",{class:"ml-0 my-lg-3 my-sm-2 my-xs-2 mr-3"},this.IconElement())),h("div",{class:"col-12 col-lg-8 text-left px-lg-2 px-0 pt-lg-0 pt-3"},h("h4",{class:"card-title mb-1 text-break"},this.benefit.title),h("span",{class:"benefit-value-description text-break"},this.benefit.subtitle),this.benefit.subtitle&&" - ",h("span",{class:"text-muted"},this.benefit.category),h("p",{class:"mb-0 pt-lg-3 pt-4 text-break"},this.benefit.description)),h("div",{class:"col-12 col-lg-3 px-0 d-flex justify-content-end align-items-start"},this.openAttachmentButton(),this.learnMoreButton()))};Object.defineProperty(t.prototype,"benefit",{get:function(){return this.benefitWithId.benefit},enumerable:false,configurable:true});t.prototype.learnMoreButton=function(){var t=this;if(this.benefit.url===null||this.benefit.url===""){return undefined}return h("button",{type:"button",class:"uiid-validate-benefit-url-exist d-block d-lg-inline-block btn btn-light px-4 py-2 ml-2",onClick:function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.onBenefitButtonClick()]}))}))}},"Learn more")};t.prototype.openAttachmentButton=function(){var t=this;var e;if(this.benefit.attachments===null||((e=this.benefit.attachments)===null||e===void 0?void 0:e.length)===0){return undefined}return h("a",{class:"uiid-validate-benefit-doc-exist d-block d-lg-inline-block btn btn-light px-4 py-2",target:"_blank",href:this.benefit.attachments[0].downloadUrl,onClick:function(e){return benefitsEventTrackingService.trackBenefitAttachmentClickedAsync(t.benefitWithId)}},h("span",null,"View"))};t.prototype.IconElement=function(){if(this.benefit.icon!==null){return h("img",{src:this.benefit.icon.downloadUrl,class:"img-responsive benefit-image",alt:"benefit-icon"})}else{return h("ap-ben-icon",{class:"text-black-50 fa-3x",iconPrefix:"fad",iconId:"award"})}};return t}();BenefitListItem.style=benefitListItemCss;export{BenefitListItem as ap_ben_benefit_list_item};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r["throw"](e))}catch(e){o(e)}}function c(e){e.done?n(e.value):i(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return c([e,t])}}function c(s){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,h,H as Host}from"./index-67b83cf8.js";import{b as fromNullable,n as none,c as isSome,s as some}from"./index-6869168f.js";import{b as benefitsApi}from"./benefits.api-806ca0bc.js";import{b as benefitsEventTrackingService}from"./event-tracking.service-4d5f3c3f.js";import"./api-client-a68152b8.js";import"./index-8f0ba0c8.js";import"./datorama-akita-d2413fd0.js";import"./scheduleArray-b9669898.js";import"./delay-d08c267f.js";import"./filter-aeb65cac.js";var BenefitsService=function(){function e(){}e.prototype.getViewPageState=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,benefitsApi.getBenefitsAsync()]}))}))};e.prototype.getShopifyUrl=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=fromNullable;return[4,benefitsApi.getShopifyUrl()];case 1:return[2,e.apply(void 0,[t.sent().redirectUrl])]}}))}))};return e}();var benefitsService=new BenefitsService;var BenefitsPage=function(){function e(e){registerInstance(this,e);this.urlRefreshHandle=none;this.state=undefined;this.shopifyUrl=none}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=this;return[4,benefitsService.getViewPageState()];case 1:e.state=t.sent();return[2]}}))}))};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=this;return[4,benefitsService.getShopifyUrl()];case 1:e.shopifyUrl=t.sent();this.setupShopifyUrlRefresh();benefitsEventTrackingService.trackBenefitsOpenedAsync();return[2]}}))}))};e.prototype.disconnectedCallback=function(){if(isSome(this.urlRefreshHandle)){window.clearInterval(this.urlRefreshHandle.value)}};e.prototype.render=function(){return h(Host,{class:"w-100 mb-4"},h("ap-ben-ui-container",{class:"mt-4 d-none"},h("div",{class:"row"},h("div",{class:"col-12"},h("ap-ben-hero-banner",{shopifyUrl:this.shopifyUrl}))),h("div",{class:"row"},h("div",{class:"col-12"},h("ap-ben-promoted-benefits",{benefits:this.state.promotedBenefits}))),h("div",{class:"row"},h("div",{class:"col-12"},h("ap-ben-benefits-list",{benefits:this.state.availableBenefits})))))};e.prototype.setupShopifyUrlRefresh=function(){var e=this;var t=2*60*1e3;this.urlRefreshHandle=some(window.setInterval((function(){return __awaiter(e,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=this;return[4,benefitsService.getShopifyUrl()];case 1:e.shopifyUrl=t.sent();return[2]}}))}))}),t))};return e}();export{BenefitsPage as ap_ben_benefits_page};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,h as a,H as i}from"./p-5a1dd786.js";import{b as t,n as e,c as o,s as n}from"./p-2c9dd7c4.js";import{b as r}from"./p-bf086b51.js";import{b as p}from"./p-d54987a3.js";import"./p-7062880e.js";import"./p-7ad92407.js";import"./p-f3effa5d.js";import"./p-ea120e31.js";import"./p-054d1471.js";import"./p-f63d9d89.js";const c=new class{async getViewPageState(){return r.getBenefitsAsync()}async getShopifyUrl(){return t((await r.getShopifyUrl()).redirectUrl)}},d=class{constructor(a){s(this,a),this.urlRefreshHandle=e,this.state=void 0,this.shopifyUrl=e}async componentWillLoad(){this.state=await c.getViewPageState()}async componentDidLoad(){this.shopifyUrl=await c.getShopifyUrl(),this.setupShopifyUrlRefresh(),await p.trackBenefitsOpenedAsync()}disconnectedCallback(){o(this.urlRefreshHandle)&&window.clearInterval(this.urlRefreshHandle.value)}render(){return a(i,{class:"w-100 mb-4"},a("ap-ben-ui-container",{class:"mt-4 d-none"},a("div",{class:"row"},a("div",{class:"col-12"},a("ap-ben-hero-banner",{shopifyUrl:this.shopifyUrl}))),a("div",{class:"row"},a("div",{class:"col-12"},a("ap-ben-promoted-benefits",{benefits:this.state.promotedBenefits}))),a("div",{class:"row"},a("div",{class:"col-12"},a("ap-ben-benefits-list",{benefits:this.state.availableBenefits})))))}setupShopifyUrlRefresh(){this.urlRefreshHandle=n(window.setInterval((async()=>{this.shopifyUrl=await c.getShopifyUrl()}),12e4))}};export{d as ap_ben_benefits_page}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as i}from"./p-5a1dd786.js";import{b as e}from"./p-d54987a3.js";import"./p-7062880e.js";import"./p-2c9dd7c4.js";import"./p-7ad92407.js";import"./p-f3effa5d.js";import"./p-ea120e31.js";import"./p-054d1471.js";import"./p-f63d9d89.js";const s=class{constructor(i){t(this,i),this.onBenefitButtonClick=async()=>{null!==this.benefit.url&&(window.open(this.benefit.url,"_blank"),await e.trackBenefitLinkClickedAsync(this.benefitWithId))},this.benefitWithId=void 0}render(){return i("div",{class:"uiid-view-benefit-item-exist row align-items-top py-3 mx-0"},i("div",{class:"col-4 col-md-2 col-lg-1 px-0"},i("div",{class:"ml-0 my-lg-3 my-sm-2 my-xs-2 mr-3"},this.IconElement())),i("div",{class:"col-12 col-lg-8 text-left px-lg-2 px-0 pt-lg-0 pt-3"},i("h4",{class:"card-title mb-1 text-break"},this.benefit.title),i("span",{class:"benefit-value-description text-break"},this.benefit.subtitle),this.benefit.subtitle&&" - ",i("span",{class:"text-muted"},this.benefit.category),i("p",{class:"mb-0 pt-lg-3 pt-4 text-break"},this.benefit.description)),i("div",{class:"col-12 col-lg-3 px-0 d-flex justify-content-end align-items-start"},this.openAttachmentButton(),this.learnMoreButton()))}get benefit(){return this.benefitWithId.benefit}learnMoreButton(){if(null!==this.benefit.url&&""!==this.benefit.url)return i("button",{type:"button",class:"uiid-validate-benefit-url-exist d-block d-lg-inline-block btn btn-light px-4 py-2 ml-2",onClick:async()=>this.onBenefitButtonClick()},"Learn more")}openAttachmentButton(){var t;if(null!==this.benefit.attachments&&0!==(null===(t=this.benefit.attachments)||void 0===t?void 0:t.length))return i("a",{class:"uiid-validate-benefit-doc-exist d-block d-lg-inline-block btn btn-light px-4 py-2",target:"_blank",href:this.benefit.attachments[0].downloadUrl,onClick:()=>e.trackBenefitAttachmentClickedAsync(this.benefitWithId)},i("span",null,"View"))}IconElement(){return null!==this.benefit.icon?i("img",{src:this.benefit.icon.downloadUrl,class:"img-responsive benefit-image",alt:"benefit-icon"}):i("ap-ben-icon",{class:"text-black-50 fa-3x",iconPrefix:"fad",iconId:"award"})}};s.style="ap-ben-benefit-list-item .btn.btn-success{background-color:#27a88a;border-color:#27a88a}ap-ben-benefit-list-item .btn.btn-success:hover{background-color:#23967b;border-color:#23967b}ap-ben-benefit-list-item .btn.btn-success:not(:disabled):not(.disabled):active{background-color:#23967b;border-color:#23967b}@media (max-width: 575.98px){ap-ben-benefit-list-item .btn.btn-success{display:block;width:100%}}ap-ben-benefit-list-item .benefit-image{-o-object-fit:cover;object-fit:cover;width:100%;max-width:4rem}";export{s as ap_ben_benefit_list_item}
|