@saasquatch/mint-components 2.0.4-9 → 2.0.5-0
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/cjs/{IndirectTaxDetailsView-d39b895d.js → IndirectTaxDetailsView-659a139c.js} +2 -2
- package/dist/cjs/{ShadowViewAddon-7066fae7.js → ShadowViewAddon-ae3a32c3.js} +24 -22
- package/dist/cjs/{global-94f36ad7.js → global-e862bfd4.js} +54 -55
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mint-components.cjs.js +2 -2
- package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +43 -29
- package/dist/cjs/sqm-big-stat_47.cjs.entry.js +18 -27
- package/dist/cjs/sqm-code-verification.cjs.entry.js +1 -1
- package/dist/cjs/sqm-email-verification.cjs.entry.js +4 -7
- package/dist/cjs/sqm-empty_4.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-form-message_2.cjs.entry.js → sqm-form-message.cjs.entry.js} +0 -50
- package/dist/cjs/{sqm-lead-checkbox-field-view-c0123bfa.js → sqm-lead-checkbox-field-view-dca40eb4.js} +1 -1
- package/dist/cjs/sqm-lead-checkbox-field.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-lead-input-field-view-6983eaa1.js → sqm-lead-input-field-view-2006001f.js} +1 -1
- package/dist/cjs/sqm-lead-input-field.cjs.entry.js +3 -3
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +1 -1
- package/dist/cjs/sqm-pagination_3.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-email-verification-view-d968178a.js → sqm-portal-email-verification-view-1745d9a2.js} +6 -4
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-profile-view-f74b8d6c.js → sqm-portal-profile-view-5c5e29b1.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-qr-code-view-a2889aee.js → sqm-qr-code-view-4ccf89da.js} +5 -1
- package/dist/cjs/sqm-qr-code.cjs.entry.js +1 -1
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +2 -2
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +2 -2
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +52 -85
- package/dist/cjs/{useLeadFormState-f8b33c07.js → useLeadFormState-91999606.js} +1 -1
- package/dist/cjs/{utils-5ecfecd9.js → utils-4eb18a29.js} +30 -18
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/sqm-edit-profile/sqm-edit-profile-view.js +1 -1
- package/dist/collection/components/sqm-empty/EmptyState.stories.js +1 -1
- package/dist/collection/components/sqm-form-message/FormMessage.stories.js +0 -5
- package/dist/collection/components/sqm-form-message/sqm-form-message.js +0 -30
- package/dist/collection/components/sqm-invoice-table/InvoiceTable.stories.js +5 -5
- package/dist/collection/components/sqm-invoice-table/sqm-invoice-table.js +1 -1
- package/dist/collection/components/sqm-lead-form/sqm-lead-form-view.js +7 -5
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard-view.js +2 -2
- package/dist/collection/components/sqm-portal-email-verification/PortalEmailVerification.stories.js +0 -1
- package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification-view.js +5 -3
- package/dist/collection/components/sqm-qr-code/sqm-qr-code-view.js +5 -1
- package/dist/collection/components/sqm-referral-codes/sqm-referral-codes.js +1 -1
- package/dist/collection/components/sqm-referral-table/ReferralTable.stories.js +5 -5
- package/dist/collection/components/sqm-referral-table/sqm-referral-table.js +1 -1
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +8 -8
- package/dist/collection/components/sqm-rewards-table/RewardsTable.stories.js +5 -5
- package/dist/collection/components/sqm-rewards-table/sqm-rewards-table.js +1 -1
- package/dist/collection/components/sqm-stencilbook/Themes.js +0 -12
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +0 -2
- package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +5 -5
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.js +3 -6
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card-view.js +5 -5
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +14 -11
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/LoadingView.js +29 -17
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +15 -5
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +18 -14
- package/dist/collection/global/styles.js +54 -55
- package/dist/collection/global/styles.ts +1 -6
- package/dist/collection/tables/TableSlots.js +6 -6
- package/dist/esm/{IndirectTaxDetailsView-a7dd6e4c.js → IndirectTaxDetailsView-8dec05e4.js} +2 -2
- package/dist/esm/{ShadowViewAddon-fe2896cb.js → ShadowViewAddon-78a1c35c.js} +24 -22
- package/dist/esm/{global-536c422d.js → global-58a69018.js} +54 -55
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mint-components.js +2 -2
- package/dist/esm/sqm-banking-info-form_10.entry.js +43 -29
- package/dist/esm/sqm-big-stat_47.entry.js +18 -27
- package/dist/esm/sqm-code-verification.entry.js +1 -1
- package/dist/esm/sqm-email-verification.entry.js +4 -7
- package/dist/esm/sqm-empty_4.entry.js +1 -1
- package/dist/esm/{sqm-form-message_2.entry.js → sqm-form-message.entry.js} +1 -50
- package/dist/esm/{sqm-lead-checkbox-field-view-5c387852.js → sqm-lead-checkbox-field-view-81541e40.js} +1 -1
- package/dist/esm/sqm-lead-checkbox-field.entry.js +3 -3
- package/dist/esm/{sqm-lead-input-field-view-fa2488c9.js → sqm-lead-input-field-view-d543d939.js} +1 -1
- package/dist/esm/sqm-lead-input-field.entry.js +3 -3
- package/dist/esm/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm/sqm-pagination_3.entry.js +2 -2
- package/dist/esm/{sqm-portal-email-verification-view-8bbe5fcf.js → sqm-portal-email-verification-view-5fb1a99e.js} +6 -4
- package/dist/esm/sqm-portal-email-verification.entry.js +2 -2
- package/dist/esm/{sqm-portal-profile-view-9848caf1.js → sqm-portal-profile-view-e3aef106.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +2 -2
- package/dist/esm/{sqm-qr-code-view-804b8bb6.js → sqm-qr-code-view-ea505213.js} +5 -1
- package/dist/esm/sqm-qr-code.entry.js +1 -1
- package/dist/esm/sqm-referral-table_11.entry.js +2 -2
- package/dist/esm/sqm-rewards-table_9.entry.js +2 -2
- package/dist/esm/sqm-stencilbook.entry.js +52 -85
- package/dist/esm/{useLeadFormState-5a6188da.js → useLeadFormState-8d4b2620.js} +1 -1
- package/dist/esm/{utils-fafc712f.js → utils-2695a43e.js} +30 -18
- package/dist/esm-es5/{IndirectTaxDetailsView-a7dd6e4c.js → IndirectTaxDetailsView-8dec05e4.js} +1 -1
- package/dist/esm-es5/{ShadowViewAddon-fe2896cb.js → ShadowViewAddon-78a1c35c.js} +1 -1
- package/dist/esm-es5/{global-536c422d.js → global-58a69018.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
- package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
- package/dist/esm-es5/sqm-form-message.entry.js +1 -0
- package/dist/esm-es5/{sqm-lead-checkbox-field-view-5c387852.js → sqm-lead-checkbox-field-view-81541e40.js} +1 -1
- package/dist/esm-es5/sqm-lead-checkbox-field.entry.js +1 -1
- package/dist/esm-es5/{sqm-lead-input-field-view-fa2488c9.js → sqm-lead-input-field-view-d543d939.js} +1 -1
- package/dist/esm-es5/sqm-lead-input-field.entry.js +1 -1
- package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-email-verification-view-5fb1a99e.js +1 -0
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-9848caf1.js → sqm-portal-profile-view-e3aef106.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/{sqm-qr-code-view-804b8bb6.js → sqm-qr-code-view-ea505213.js} +1 -1
- package/dist/esm-es5/sqm-qr-code.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/{useLeadFormState-5a6188da.js → useLeadFormState-8d4b2620.js} +1 -1
- package/dist/esm-es5/utils-2695a43e.js +1 -0
- package/dist/mint-components/global/styles.ts +1 -6
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/{p-902b919d.system.entry.js → p-011c0990.system.entry.js} +1 -1
- package/dist/mint-components/{p-d6d31505.js → p-027c0b10.js} +32 -32
- package/dist/mint-components/{p-f6305644.js → p-088f082f.js} +1 -1
- package/dist/mint-components/{p-05e8620f.system.entry.js → p-0c024cf0.system.entry.js} +1 -1
- package/dist/mint-components/p-0d71303d.js +1 -0
- package/dist/mint-components/{p-33fff374.system.js → p-1215518e.system.js} +1 -1
- package/dist/mint-components/{p-b8878552.entry.js → p-12e6cea7.entry.js} +2 -2
- package/dist/mint-components/{p-19e407bd.system.js → p-13c6673e.system.js} +1 -1
- package/dist/mint-components/{p-4130caec.js → p-1aa9136c.js} +1 -1
- package/dist/mint-components/{p-a65610e3.entry.js → p-1b79b186.entry.js} +1 -1
- package/dist/mint-components/{p-ceb79149.js → p-1d8c5935.js} +1 -1
- package/dist/mint-components/{p-d07a46c6.system.entry.js → p-2ea3eea9.system.entry.js} +1 -1
- package/dist/mint-components/p-325c5476.js +1 -0
- package/dist/mint-components/{p-4b595fc3.system.entry.js → p-36a1fa33.system.entry.js} +1 -1
- package/dist/mint-components/p-3f661133.system.entry.js +1 -0
- package/dist/mint-components/{p-66effbef.entry.js → p-43ad51bc.entry.js} +1 -1
- package/dist/mint-components/p-478ad7c8.system.entry.js +1 -0
- package/dist/mint-components/{p-a71edffc.system.js → p-4965dae4.system.js} +1 -1
- package/dist/mint-components/{p-69bd9de3.entry.js → p-4c02afc8.entry.js} +7 -7
- package/dist/mint-components/{p-1e156272.system.js → p-4cc72a4e.system.js} +1 -1
- package/dist/mint-components/{p-8a24b9a9.entry.js → p-58c79873.entry.js} +1 -1
- package/dist/mint-components/{p-48bc3283.system.js → p-5fbe6356.system.js} +1 -1
- package/dist/mint-components/{p-30f37386.entry.js → p-6076dbaf.entry.js} +2 -2
- package/dist/mint-components/{p-1e0a8579.entry.js → p-775214ef.entry.js} +2 -2
- package/dist/mint-components/p-78dda262.system.js +1 -0
- package/dist/mint-components/p-829cb9ed.system.entry.js +1 -0
- package/dist/mint-components/{p-af02f28c.system.js → p-8618e8f6.system.js} +1 -1
- package/dist/mint-components/p-8d9fa981.system.js +1 -0
- package/dist/mint-components/p-947bacd1.system.js +1 -0
- package/dist/mint-components/{p-005ee5bf.js → p-988f236f.js} +1 -1
- package/dist/mint-components/{p-dcdd959e.entry.js → p-9a3ff9b9.entry.js} +2 -2
- package/dist/mint-components/{p-4e3303a8.system.entry.js → p-9d46f87f.system.entry.js} +1 -1
- package/dist/mint-components/{p-2192a6d7.entry.js → p-a470e203.entry.js} +2 -2
- package/dist/mint-components/p-a974c549.js +1 -0
- package/dist/mint-components/p-ab1e34f5.system.entry.js +1 -0
- package/dist/mint-components/p-ac9138fd.entry.js +1 -0
- package/dist/mint-components/{p-80196216.entry.js → p-ad3ebf4d.entry.js} +1 -1
- package/dist/mint-components/{p-78968e5f.js → p-bf044217.js} +1 -1
- package/dist/mint-components/{p-000dc98f.system.entry.js → p-c6e8086f.system.entry.js} +1 -1
- package/dist/mint-components/p-c7ac295d.system.entry.js +1 -0
- package/dist/mint-components/p-d88d8ffe.entry.js +1 -0
- package/dist/mint-components/p-dc5bca55.entry.js +1 -0
- package/dist/mint-components/{p-8f6b3391.system.entry.js → p-deecffd0.system.entry.js} +1 -1
- package/dist/mint-components/{p-e712a01d.entry.js → p-e19f0908.entry.js} +2 -2
- package/dist/mint-components/{p-648f881e.system.js → p-e3ee8c37.system.js} +1 -1
- package/dist/mint-components/p-e8bda98a.system.entry.js +1 -0
- package/dist/mint-components/p-ee3a7577.entry.js +144 -0
- package/dist/mint-components/p-ee83de0e.js +448 -0
- package/dist/mint-components/{p-f380bcd9.system.entry.js → p-f3613921.system.entry.js} +1 -1
- package/dist/mint-components/{p-a45124c1.system.entry.js → p-f5256738.system.entry.js} +1 -1
- package/dist/mint-components/p-f5820d03.system.js +1 -0
- package/dist/mint-components/{p-a7157ef3.entry.js → p-f7e49c12.entry.js} +2 -2
- package/dist/mint-components/{p-d8d818d9.system.entry.js → p-fcf8bdbc.system.entry.js} +1 -1
- package/dist/types/components/sqm-form-message/FormMessage.stories.d.ts +0 -1
- package/dist/types/components/sqm-form-message/sqm-form-message.d.ts +0 -6
- package/dist/types/components.d.ts +0 -39
- package/dist/types/saasquatch.d.ts +0 -4
- package/docs/docs.docx +0 -0
- package/docs/picklesdoc--2024-01-15--11-20-00.xlsx +0 -0
- package/docs/picklesdoc--2024-01-15--11-24-04.xlsx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/collection/components/sqm-skeleton/Skeleton.stories.js +0 -16
- package/dist/collection/components/sqm-skeleton/sqm-skeleton.js +0 -90
- package/dist/esm-es5/sqm-form-message_2.entry.js +0 -1
- package/dist/esm-es5/sqm-portal-email-verification-view-8bbe5fcf.js +0 -1
- package/dist/esm-es5/utils-fafc712f.js +0 -1
- package/dist/mint-components/p-0d3803a2.js +0 -1
- package/dist/mint-components/p-10aea972.system.js +0 -1
- package/dist/mint-components/p-28973c9b.entry.js +0 -144
- package/dist/mint-components/p-397a5adf.system.entry.js +0 -1
- package/dist/mint-components/p-3ad8e1af.system.js +0 -1
- package/dist/mint-components/p-566d837b.system.js +0 -1
- package/dist/mint-components/p-59332a30.entry.js +0 -1
- package/dist/mint-components/p-5d39d345.system.entry.js +0 -1
- package/dist/mint-components/p-6c528a8c.system.entry.js +0 -1
- package/dist/mint-components/p-7c9520b7.system.js +0 -1
- package/dist/mint-components/p-8af550b9.system.entry.js +0 -1
- package/dist/mint-components/p-a115c57a.system.entry.js +0 -1
- package/dist/mint-components/p-a92c692b.js +0 -448
- package/dist/mint-components/p-ab4c0642.js +0 -1
- package/dist/mint-components/p-af758193.entry.js +0 -1
- package/dist/mint-components/p-c37744c7.entry.js +0 -1
- package/dist/mint-components/p-e0c7640f.js +0 -1
- package/dist/mint-components/p-ede77156.system.entry.js +0 -1
- package/dist/types/components/sqm-skeleton/Skeleton.stories.d.ts +0 -8
- package/dist/types/components/sqm-skeleton/sqm-skeleton.d.ts +0 -14
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a))e[a]=t[a]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,r,n){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function s(e){try{o(n.next(e))}catch(e){i(e)}}function l(e){try{o(n["throw"](e))}catch(e){i(e)}}function o(e){e.done?r(e.value):a(e.value).then(s,l)}o((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(t){return o([e,t])}}function o(s){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,a&&(i=s[0]&2?a["return"]:s[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,s[1])).done)return i;if(a=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;a=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];a=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArrays=this&&this.__spreadArrays||function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),a=0,t=0;t<r;t++)for(var i=arguments[t],s=0,l=i.length;s<l;s++,a++)n[a]=i[s];return n};System.register(["./p-59b028db.system.js","./p-4cc72a4e.system.js","./p-4f5329a2.system.js","./p-171310d9.system.js","./p-4bd679a7.system.js","./p-6333265f.system.js","./p-1a673057.system.js","./p-8a6494c7.system.js","./p-0935f9b7.system.js","./p-bb5d153f.system.js","./p-bcac83f0.system.js","./p-7159c51c.system.js","./p-8e28333b.system.js","./p-ff0e1564.system.js","./p-67ad2252.system.js"],(function(e){"use strict";var t,r,n,a,i,s,l,o,d,u,c,f,v,p,h,m,E,_,g,T,N,D;return{setters:[function(e){t=e.r;r=e.h;n=e.g;a=e.c},function(e){i=e.i},function(e){s=e.n;l=e.j;o=e.u;d=e.f},function(e){u=e.i},function(e){c=e.c},function(e){f=e.l},function(e){v=e.c},function(){},function(e){p=e.G},function(e){h=e.a;m=e.u},function(e){E=e.u},function(e){_=e.l},function(e){g=e.g},function(e){T=e.u;N=e.t},function(e){D=e.T}],execute:function(){var y=function(e){if(e===void 0){e=4}var t=__spreadArrays(Array(e)).map((function(){return I()}));return{totalCount:6,count:e,referredByReferral:{dateConverted:null,dateReferralStarted:1643912659850,referrerUser:{firstName:"John",lastName:"Snow",rewards:[]}},data:t}};var x=[["AVAILABLE"],["PENDING"],["CANCELLED"],["EXPIRED"],["REDEEMED"]];var P=["Rajesh","Pierre","Ji-Ho","Chinua","Charleston","Sally","Gael","Jill","Jane","Khadija"];var A=["Smith","Parker","Kent","Chew","Stark","Banner","Jones","Odinson","Pym","Rogers"];var I=function(){return{id:"5cae6b0fcc540e209db45b53",referredUser:{id:"5cae6b0ce4b0d81c67b78e82",accountId:"SPX1MZBIPTFL3E1H",firstName:P[Math.floor(Math.random()*P.length)],lastName:A[Math.floor(Math.random()*A.length)],email:"example.uexwltgh@mailosaur.io",programGoals:[]},shareLinkUsed:null,referralCodeUsed:"JIMBONEUTRON2",moderationStatus:"PENDING",dateConverted:Math.floor(Math.random()*10)>=5?_.DateTime.now().minus({days:6}).toMillis():null,dateFraudChecksCompleted:null,dateModerated:1558730033306,dateModified:1554934543447,dateReferralEnded:null,dateReferralPaid:null,dateReferralStarted:_.DateTime.now().minus({days:8}).toMillis(),dateUserModified:null,programId:"sam-partner-test-2",program:{id:"sam-partner-test-2",name:"Partner Program 2.0"},rewards:Math.floor(Math.random()*10)>=5?[{id:"5cae6b16cc540e209db45cfa",type:"CREDIT",value:1,unit:"POINT",name:"Partner Reward",dateGiven:1554934550726,dateExpires:null,dateCancelled:null,dateRedeemed:1637004373582,dateScheduledFor:null,fuelTankCode:null,fuelTankType:null,currency:null,prettyValue:"1 Point",statuses:x[Math.floor(Math.random()*x.length)],globalRewardKey:null,programRewardKey:"partnerReward",meta:__assign({},g()),rewardRedemptionTransactions:{data:[{exchangedRewards:{data:[{prettyValue:"CAD10.00 Visa* Prepaid Card CAD",type:"INTEGRATION",fuelTankCode:null,globalRewardKey:"gc1"}]}}]}}]:[],childNodes:{data:[{data:{id:"5cae6b16cc540e209db45cb3",statuses:x[Math.floor(Math.random()*x.length)],type:"PCT_DISCOUNT",value:50},depth:1},{data:{id:"5cae6b16cc540e209db45cfa",statuses:x[Math.floor(Math.random()*x.length)],type:"CREDIT",value:1},depth:1}]}}};var b=e("sqm_referral_table",function(){function e(e){t(this,e);this.perPage=4;this.hideLabels=false;this.prevLabel="Prev";this.moreLabel="Next";this.showReferrer=false;this.hiddenColumns="0";this.smBreakpoint=599;this.mdBreakpoint=799;s(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=r(R,null);var t=r(w,null);var n=u()?S(this,e,t):T(this,e,t),a=n.states,i=n.data,s=n.callbacks,l=n.elements;h([this.showReferrer,this.perPage]);return r(p,{states:a,data:i,callbacks:s,elements:l})};return e}());function R(){return r("slot",{name:"empty"},r("sqm-empty",{"empty-state-image":"https://res.cloudinary.com/saasquatch/image/upload/v1644000223/squatch-assets/empty_referral2.png","empty-state-header":"View your referral details","empty-state-text":"Refer a friend to view the status of your referrals and rewards earned"}))}function w(){return r("slot",{name:"loading"},r(C,null),r(C,null),r(C,null),r(C,null))}function C(){return r("sqm-table-row",null,r("sqm-table-cell",{colspan:5},r("sl-skeleton",null)))}function S(e,t,r){var n=l((function(e,t){return __assign(__assign({},e),t)}),{columns:[],rows:[],loading:false,page:0}),a=n[0],i=n[1];var s=m();var u=o((function(){var t;return((t=e.demoData)===null||t===void 0?void 0:t.mockData)||y(e.perPage)}),[e.perPage]);var f=E();function v(t){return __awaiter(this,void 0,void 0,(function(){var r,n,a,s,l,o,d,c,f,v,p,h,m,E;var _=this;return __generator(this,(function(g){switch(g.label){case 0:a=u===null||u===void 0?void 0:u.referredByReferral;s=e.showReferrer&&!!((r=u===null||u===void 0?void 0:u.referredByReferral)===null||r===void 0?void 0:r.dateReferralStarted);if(s){n=u.data.slice(0,e.perPage-1)}else{n=u.data.slice(0,e.perPage)}l=t.filter((function(e){var t,r;return e.slot!=="loading"&&e.slot!=="empty"&&((t=e===null||e===void 0?void 0:e.firstElementChild)===null||t===void 0?void 0:t.getAttribute("slot"))!=="loading"&&((r=e===null||e===void 0?void 0:e.firstElementChild)===null||r===void 0?void 0:r.getAttribute("slot"))!=="empty"}));o=l===null||l===void 0?void 0:l.map((function(e,t){return __awaiter(_,void 0,void 0,(function(){var r,n,a;return __generator(this,(function(i){n=(r=e===null||e===void 0?void 0:e.firstElementChild)===null||r===void 0?void 0:r.getAttribute("slot");if(e.tagName==="RAISINS-PLOP-TARGET"&&n!=="loading"&&n!=="empty"){e.setAttribute("slot","column-"+t);e.style.position="absolute";a=e.firstElementChild.childNodes[1];a.innerHTML="+";a.style.lineHeight="20px";return[2,N(e,(function(){return e.renderLabel(t)}))]}return[2,N(e,(function(){return e.renderLabel()}))]}))}))}));if(!s)return[3,2];c=l===null||l===void 0?void 0:l.map((function(e){return __awaiter(_,void 0,void 0,(function(){return __generator(this,(function(t){return[2,N(e,(function t(){return e.renderCell(a,e)}))]}))}))}));return[4,Promise.all(c)];case 1:d=g.sent();g.label=2;case 2:f=n===null||n===void 0?void 0:n.map((function(e){return __awaiter(_,void 0,void 0,(function(){var t,r;var n=this;return __generator(this,(function(a){switch(a.label){case 0:t=l===null||l===void 0?void 0:l.map((function(t){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(r){return[2,N(t,(function(){return t.renderCell(e,undefined)}))]}))}))}));return[4,Promise.all(t)];case 1:r=a.sent();return[2,r]}}))}))}));p=f;if(!p)return[3,4];h=[[d]];return[4,Promise.all(f)];case 3:p=__spreadArrays.apply(void 0,h.concat([g.sent()])).filter((function(e){return e}));g.label=4;case 4:v=p;i({rows:v});E=o;if(!E)return[3,6];return[4,Promise.all(o)];case 5:E=g.sent();g.label=6;case 6:m=E;i({columns:m,loading:false,page:0});return[2]}}))}))}d((function(){i({loading:true});(u===null||u===void 0?void 0:u.data)&&v(f)}),[u===null||u===void 0?void 0:u.data,f,s]);var p=c({states:{hasPrev:false,hasNext:false,loading:false,show:"rows"},callbacks:{prevPage:function(){return console.log("Prev")},nextPage:function(){return console.log("Next")}},data:{textOverrides:{showLabels:!e.hideLabels,prevLabel:e.prevLabel,moreLabel:e.moreLabel},hiddenColumns:e.hiddenColumns,referralData:[],mdBreakpoint:799,smBreakpoint:599},elements:{columns:a.columns,rows:a.rows,emptyElement:t,loadingElement:r}},e.demoData||{},{arrayMerge:function(e,t){return t}});return p}var L=e("sqm_referral_table_cell",function(){function e(e){t(this,e);this.ignored=true;s(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){return r("div",{innerHTML:this.innerTemplate})};return e}());var O=e("sqm_referral_table_column",function(){function e(e){t(this,e);s(this)}e.prototype.disconnectedCallback=function(){};e.prototype.renderCell=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,r("sqm-referral-table-cell",{"inner-template":n(this).innerHTML})]}))}))};e.prototype.renderLabel=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,Promise.resolve(this.columnTitle)]}))}))};e.prototype.render=function(){h([this.columnTitle]);return r(a,{style:{display:"none"}},r("slot",null))};return e}());var M=e("sqm_referral_table_date_cell",function(){function e(e){t(this,e);this.ignored=true;this.locale="en";s(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e;var t=!this.date?"-":(e=_.DateTime.fromMillis(this.date))===null||e===void 0?void 0:e.setLocale(f(this.locale)).toLocaleString(_.DateTime.DATE_MED);return t};return e}());var U=e("sqm_referral_table_date_column",function(){function e(e){t(this,e);this.columnTitle="Date converted";this.dateShown="dateConverted";s(this)}e.prototype.disconnectedCallback=function(){};e.prototype.renderCell=function(e,t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,r("sqm-referral-table-date-cell",{date:e[this.dateShown],locale:t===null||t===void 0?void 0:t.locale})]}))}))};e.prototype.renderLabel=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.columnTitle]}))}))};e.prototype.renderReferrerCell=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,r("sqm-referral-table-date-cell",{date:e[this.dateShown]})]}))}))};e.prototype.render=function(){h([this.dateShown,this.columnTitle]);return r(a,{style:{display:"none"}})};return e}());var G=e("sqm_referral_table_rewards_cell",function(){function e(e){t(this,e);this.statusText="{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} PAYOUT_APPROVED {Payout Approved} PAYOUT_FAILED {Payout Failed} PAYOUT_CANCELLED {Payout Cancelled} PENDING_TAX_REVIEW {Pending} PENDING_NEW_TAX_FORM {Pending} PENDING_TAX_SUBMISSION {Pending} PENDING_PARTNER_CREATION {Pending} DENIED {Denied} EXPIRED {Expired} REDEEMED {Redeemed} other {Not available} }";this.statusLongText="{status, select, AVAILABLE {Reward expiring on} CANCELLED {Reward cancelled on} PENDING {Available on} PENDING_REVIEW {Pending since} PAYOUT_APPROVED {Reward was scheduled for payment based on your settings, barring any account holds.} PAYOUT_FAILED {Payout failed due to a fulfillment issue and is currently being retried.} PAYOUT_CANCELLED {If you think this is a mistake, contact our Support team.} PENDING_TAX_REVIEW {Awaiting tax form review} PENDING_NEW_TAX_FORM {Invalid tax form. Submit a new form to receive your rewards.} PENDING_TAX_SUBMISSION {Submit your tax documents to receive your rewards} PENDING_PARTNER_CREATION {Complete your tax and cash payout setup to receive your rewards} DENIED {Denied on} EXPIRED {Reward expired on} other {Not available} }";this.locale="en"}e.prototype.render=function(){var e=this;var t;i.locale=this.locale;var n={"@keyframes slideRight":{from:{opacity:0},to:{opacity:1}},DetailsContainer:{width:"100%",display:"flex","align-items":"center","justify-content":"space-between","margin-right":"var(--sl-spacing-small)","flex-wrap":"wrap"},Details:{"max-width":"500px","&::part(header)":{padding:"var(--sl-spacing-x-small)",cursor:""+(this.hideDetails?"default":"pointer")},"&::part(content)":{padding:"var(--sl-spacing-x-small) var(--sl-spacing-medium)"},"&::part(base)":{border:"var(--sqm-border-thickness) solid var(--sqm-border-color)",opacity:"1"},"&::part(summary-icon)":{display:""+(this.hideDetails?"none":"flex")},"&::part(summary-icon[open])":{transform:"rotate(-90deg)"}},BadgeContainer:{"& > :not(:last-child)":{"margin-right":"var(--sl-spacing-x-small)"}},BoldText:{"font-weight":"var(--sl-font-weight-semibold)"},RedeemBadge:{paddingLeft:"var(--sl-spacing-xxx-small)","&::part(base)":{textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-informative-color-icon)",color:"var(--sl-color-white)"}},DangerBadge:{paddingLeft:"var(--sl-spacing-xxx-small)","&::part(base)":{textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-danger-color-icon)",color:"var(--sl-color-white)"}},WarningBadge:{paddingLeft:"var(--sl-spacing-xxx-small)","&::part(base)":{textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-warning-color-icon)",color:"var(--sl-color-white)"}},SuccessBadge:{paddingLeft:"var(--sl-spacing-xxx-small)","&::part(base)":{textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-success-color-icon)",color:"var(--sl-color-white)"}}};var a=v(n);var s=a.toString();var l=function(e){switch(e){case"primary":return a.classes.RedeemBadge;case"danger":return a.classes.DangerBadge;case"success":return a.classes.SuccessBadge;case"warning":case"info":return a.classes.WarningBadge;default:return a.classes.WarningBadge}};var o=function(e,t){var r,n,a,i,s,l,o,d,u,c,f,v;var p=["REDEEMED","CANCELLED","EXPIRED","PENDING","AVAILABLE","PENDING_REVIEW","DENIED","PAYOUT_APPROVED","PAYOUT_CANCELLED","PAYOUT_FAILED","PENDING_TAX_REVIEW","PENDING_NEW_TAX_FORM","PENDING_TAX_SUBMISSION","PENDING_PARTNER_CREATION"];if(((n=(r=e.referral)===null||r===void 0?void 0:r.fraudData)===null||n===void 0?void 0:n.moderationStatus)!=="APPROVED"){if(((i=(a=e.referral)===null||a===void 0?void 0:a.fraudData)===null||i===void 0?void 0:i.moderationStatus)==="PENDING")return"PENDING_REVIEW";if(((l=(s=e.referral)===null||s===void 0?void 0:s.fraudData)===null||l===void 0?void 0:l.moderationStatus)==="DENIED")return"DENIED"}var h=(o=e.partnerFundsTransfer)===null||o===void 0?void 0:o.status;if(h==="NOT_YET_DUE"||h==="TRANSFERRED"){return"PAYOUT_APPROVED"}else if(h==="OVERDUE")return"PAYOUT_FAILED";else if(h==="REVERSED")return"PAYOUT_CANCELLED";if((d=e===null||e===void 0?void 0:e.pendingReasons)===null||d===void 0?void 0:d.includes("US_TAX")){if(!(t===null||t===void 0?void 0:t.taxHandlingEnabled))return"PENDING";if(!(t===null||t===void 0?void 0:t.connected))return"PENDING_PARTNER_CREATION";if((u=t===null||t===void 0?void 0:t.publisher)===null||u===void 0?void 0:u.requiredTaxDocumentType){if(!((c=t===null||t===void 0?void 0:t.publisher)===null||c===void 0?void 0:c.currentTaxDocument))return"PENDING_TAX_SUBMISSION";var m=t.publisher.currentTaxDocument.status;if(m==="INACTIVE"||m==="INVALID_W9_ELECTRONIC_DOCUMENT"||m==="INVALID_W9_ELECTRONIC_DOCUMENT_CHECK_INTERNAL")return"PENDING_NEW_TAX_FORM";if(m==="NOT_VERIFIED")return"PENDING_TAX_REVIEW"}if(!((f=t===null||t===void 0?void 0:t.publisher)===null||f===void 0?void 0:f.withdrawalSettings))return"PENDING_PARTNER_CREATION"}if((v=e===null||e===void 0?void 0:e.pendingReasons)===null||v===void 0?void 0:v.includes("MISSING_PAYOUT_CONFIGURATION")){return"PENDING_PARTNER_CREATION"}if(e.statuses.length===1)return e.statuses[0];return p.find((function(t){return e.statuses.includes(t)&&t}))};var d=function(e){switch(e){case"REDEEMED":case"PAYOUT_APPROVED":return"primary";case"DENIED":case"EXPIRED":case"CANCELLED":case"PAYOUT_FAILED":case"PAYOUT_CANCELLED":return"danger";case"PENDING":case"PENDING_REVIEW":case"PENDING_TAX_REVIEW":case"PENDING_NEW_TAX_FORM":case"PENDING_TAX_SUBMISSION":case"PENDING_PARTNER_CREATION":return"warning";case"AVAILABLE":return"success"}};var u=function(t){return _.DateTime.fromMillis(t).setLocale(f(e.locale)).toRelative().replace("in","").trim()};return(t=this.rewards)===null||t===void 0?void 0:t.map((function(t){var n,c;var v=o(t,e.taxConnection);var p=d(v);var h=i.formatMessage({id:"statusShortMessage",defaultMessage:e.statusText},{status:v});var m=i.formatMessage({id:"statusLongMessage",defaultMessage:e.statusLongText},{status:v});return r("sl-details",{class:a.classes.Details,disabled:e.hideDetails},r("style",{type:"text/css"},s),r("div",{slot:"summary",class:a.classes.DetailsContainer},r(D,{type:"p"},r("span",{part:"sqm-cell-value",class:a.classes.BoldText},t.prettyValue)),r("div",{class:a.classes.BadgeContainer},v==="PENDING"&&t.dateScheduledFor?r("sl-badge",{class:l(p),type:p,pill:true},i.formatMessage({id:"pendingForText",defaultMessage:e.pendingForText},{status:h,date:u(t.dateScheduledFor)})):r("sl-badge",{class:l(p),type:p,pill:true},h),t.dateExpires&&v==="AVAILABLE"&&r("sl-badge",{class:l(p),type:"info",pill:true},e.expiringText," "+u(t.dateExpires)))),r("div",null,v==="PENDING_REVIEW"&&((n=t.referral)===null||n===void 0?void 0:n.dateModerated)&&r("div",null,r(D,{type:"p"},m," ",r("span",{class:a.classes.BoldText,part:"sqm-cell-value"},_.DateTime.fromMillis(t.referral.dateModerated).setLocale(f(e.locale)).toLocaleString(_.DateTime.DATE_MED)))),v==="PAYOUT_APPROVED"&&r("div",null,r(D,{type:"p"},m)),v==="PAYOUT_FAILED"&&r("div",null,r(D,{type:"p"},m)),v==="PAYOUT_CANCELLED"&&r("div",null,r(D,{type:"p"},m)),v==="PENDING_TAX_REVIEW"&&r("div",null,r(D,{type:"p"},m)),v==="PENDING_NEW_TAX_FORM"&&r("div",null,r(D,{type:"p"},m)),v==="PENDING_TAX_SUBMISSION"&&r("div",null,r(D,{type:"p"},m)),v==="PENDING_PARTNER_CREATION"&&r("div",null,r(D,{type:"p"},m)),v==="DENIED"&&((c=t.referral)===null||c===void 0?void 0:c.dateModerated)&&r("div",null,r(D,{type:"p"},m," ",r("span",{class:a.classes.BoldText,part:"sqm-cell-value"},_.DateTime.fromMillis(t.referral.dateModerated).setLocale(f(e.locale)).toLocaleString(_.DateTime.DATE_MED)),".",e.deniedHelpText?" "+e.deniedHelpText:"")),t.dateGiven&&r("div",null,r(D,{type:"p"},e.rewardReceivedText," ",r("span",{class:a.classes.BoldText,part:"sqm-cell-value"},_.DateTime.fromMillis(t.dateGiven).setLocale(f(e.locale)).toLocaleString(_.DateTime.DATE_MED)))),v==="EXPIRED"&&t.dateExpires&&r("div",null,r(D,{type:"p"},m," ",r("span",{class:a.classes.BoldText,part:"sqm-cell-value"},_.DateTime.fromMillis(t.dateExpires).setLocale(f(e.locale)).toLocaleString(_.DateTime.DATE_MED)))),v==="CANCELLED"&&t.dateCancelled&&r("div",null,r(D,{type:"p"},m," ",r("span",{class:a.classes.BoldText,part:"sqm-cell-value"},_.DateTime.fromMillis(t.dateCancelled).setLocale(f(e.locale)).toLocaleString(_.DateTime.DATE_MED)))),v==="PENDING"&&t.dateScheduledFor&&r("div",null,r(D,{type:"p"},m," ",r("span",{class:a.classes.BoldText,part:"sqm-cell-value"},_.DateTime.fromMillis(t.dateScheduledFor).setLocale(f(e.locale)).toLocaleString(_.DateTime.DATE_MED))))," ",v==="AVAILABLE"&&t.dateExpires&&r("div",null,r(D,{type:"p"},m," ",r("span",{class:a.classes.BoldText,part:"sqm-cell-value"},_.DateTime.fromMillis(t.dateExpires).setLocale(f(e.locale)).toLocaleString(_.DateTime.DATE_MED)))),t.fuelTankCode&&r("div",null,e.fuelTankText," ",r("span",{class:a.classes.BoldText,part:"sqm-cell-value"},t.fuelTankCode))))}))};return e}());var B=e("sqm_referral_table_rewards_column",function(){function e(e){t(this,e);this.columnTitle="Rewards";this.statusText="{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} PAYOUT_APPROVED {Payout Approved} PAYOUT_FAILED {Payout Failed} PAYOUT_CANCELLED {Payout Cancelled} PENDING_TAX_REVIEW {Pending} PENDING_NEW_TAX_FORM {Pending} PENDING_TAX_SUBMISSION {Pending} PENDING_PARTNER_CREATION {Pending} DENIED {Denied} EXPIRED {Expired} REDEEMED {Redeemed} other {Not available} }";this.statusLongText="{status, select, AVAILABLE {Reward expiring on} CANCELLED {Reward cancelled on} PENDING {Available on} PENDING_REVIEW {Pending since} PAYOUT_APPROVED {Reward was scheduled for payment based on your settings, barring any account holds.} PAYOUT_FAILED {Payout failed due to a fulfillment issue and is currently being retried.} PAYOUT_CANCELLED {If you think this is a mistake, contact our Support team.} PENDING_TAX_REVIEW {Awaiting tax form review} PENDING_NEW_TAX_FORM {Invalid tax form. Submit a new form to receive your rewards.} PENDING_TAX_SUBMISSION {Submit your tax documents to receive your rewards} PENDING_PARTNER_CREATION {Complete your tax and cash payout setup to receive your rewards} DENIED {Denied on} EXPIRED {Reward expired on} other {Not available} }";this.fuelTankText="Your code is";this.rewardReceivedText="Reward received on";this.expiringText="Expiring in";this.pendingForText="{status} for {date}";this.deniedHelpText="Contact support if you think this is a mistake.";this.hideDetails=false;s(this)}e.prototype.disconnectedCallback=function(){};e.prototype.renderCell=function(e,t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,r("sqm-referral-table-rewards-cell",{rewards:e.rewards,taxConnection:t===null||t===void 0?void 0:t.taxConnection,statusText:this.statusText,statusLongText:this.statusLongText,fuelTankText:this.fuelTankText,rewardReceivedText:this.rewardReceivedText,expiringText:this.expiringText,pendingForText:this.pendingForText,hideDetails:this.hideDetails,deniedHelpText:this.deniedHelpText,locale:t===null||t===void 0?void 0:t.locale,exportparts:"sqm-cell-value"})]}))}))};e.prototype.renderLabel=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.columnTitle]}))}))};e.prototype.renderReferrerCell=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,r("sqm-referral-table-rewards-cell",{rewards:e.rewards,exportparts:"sqm-cell-value"})]}))}))};e.prototype.render=function(){h([this.columnTitle,this.statusText,this.statusLongText,this.fuelTankText,this.rewardReceivedText,this.expiringText,this.pendingForText,this.hideDetails]);return r(a,{style:{display:"none"}})};return e}());var k={SubText:{fontSize:"var(--sl-font-size-small)",color:"var(--sqm-text-subdued)",margin:"0"},RedeemBadge:{"&::part(base)":{fontSize:"var(--sl-font-size-small)",padding:"4px 8px",textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-informative-color-icon)",color:"var(--sl-color-white)"}},DangerBadge:{"&::part(base)":{fontSize:"var(--sl-font-size-small)",padding:"4px 8px",textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-danger-color-icon)",color:"var(--sl-color-white)"}},WarningBadge:{"&::part(base)":{fontSize:"var(--sl-font-size-small)",padding:"4px 8px",textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-warning-color-icon)",color:"var(--sl-color-white)"}},SuccessBadge:{"&::part(base)":{fontSize:"var(--sl-font-size-small)",padding:"4px 8px",textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-success-color-icon)",color:"var(--sl-color-white)"}}};var q=v(k);var V=q.toString();var W=e("sqm_referral_table_status_cell",function(){function e(e){t(this,e)}e.prototype.render=function(){var e=this;var t=v(k);var n=t.toString();var a=function(t){if(t==="PENDING")return"warning";if(t==="DENIED")return"danger";if(e.converted)return"success";return"warning"};var i=function(e){switch(e){case"primary":return t.classes.RedeemBadge;case"danger":return t.classes.DangerBadge;case"success":return t.classes.SuccessBadge;case"warning":case"info":return t.classes.WarningBadge;default:return t.classes.WarningBadge}};return r("div",null,r("style",{type:"text/css"},n),r("sl-badge",{pill:true,type:a(this.fraudStatus),class:i(a(this.fraudStatus))},this.statusText),this.statusSubText?r("p",{class:t.classes.SubText},this.statusSubText):null)};return e}());var F=e("sqm_referral_table_status_column",function(){function e(e){t(this,e);this.columnTitle="Status";this.convertedStatusText="Converted";this.inProgressStatusText="In Progress";this.pendingReviewStatusText="Pending";this.deniedStatusText="Denied";this.pendingReviewStatusSubText="Awaiting review";this.deniedStatusSubText="Detected self-referral";s(this)}e.prototype.disconnectedCallback=function(){};e.prototype.renderCell=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n,a,i;return __generator(this,(function(s){i=(t=e===null||e===void 0?void 0:e.fraudData)===null||t===void 0?void 0:t.moderationStatus;if(i==="DENIED"){n=this.deniedStatusText;a=this.deniedStatusSubText}else if(i==="PENDING"){n=this.pendingReviewStatusText;a=this.pendingReviewStatusSubText}else{n=e.dateConverted?this.convertedStatusText:this.inProgressStatusText}return[2,r("sqm-referral-table-status-cell",{"status-text":n,"status-sub-text":a,"fraud-status":i,converted:e.dateConverted?true:false})]}))}))};e.prototype.renderLabel=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.columnTitle]}))}))};e.prototype.renderReferrerCell=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){t=e.dateConverted?this.convertedStatusText:this.inProgressStatusText;return[2,r("sqm-referral-table-status-cell",{"status-text":t,converted:e.dateConverted?true:false})]}))}))};e.prototype.render=function(){h([this.columnTitle,this.convertedStatusText,this.inProgressStatusText]);return r(a,{style:{display:"none"}})};return e}());var X=e("sqm_referral_table_user_cell",function(){function e(e){t(this,e)}e.prototype.render=function(){return this.name};return e}());var Y=e("sqm_referral_table_user_column",function(){function e(e){t(this,e);this.columnTitle="Customer";this.anonymousUser="Anonymous User";this.deletedUser="Deleted User";s(this)}e.prototype.disconnectedCallback=function(){};e.prototype.renderCell=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n,a,i,s,l,o,d,u;return __generator(this,(function(c){if(!(e===null||e===void 0?void 0:e.referredUser)&&!(e===null||e===void 0?void 0:e.referrerUser)){u=this.deletedUser}else if(!((t=e===null||e===void 0?void 0:e.referredUser)===null||t===void 0?void 0:t.firstName)&&!((n=e===null||e===void 0?void 0:e.referredUser)===null||n===void 0?void 0:n.lastName)&&!((a=e===null||e===void 0?void 0:e.referrerUser)===null||a===void 0?void 0:a.firstName)&&!((i=e===null||e===void 0?void 0:e.referrerUser)===null||i===void 0?void 0:i.lastName)){u=this.anonymousUser}else if(e===null||e===void 0?void 0:e.referrerUser){u=((s=e===null||e===void 0?void 0:e.referrerUser)===null||s===void 0?void 0:s.firstName)+" "+((l=e===null||e===void 0?void 0:e.referrerUser)===null||l===void 0?void 0:l.lastName)}else{u=((o=e===null||e===void 0?void 0:e.referredUser)===null||o===void 0?void 0:o.firstName)+" "+((d=e===null||e===void 0?void 0:e.referredUser)===null||d===void 0?void 0:d.lastName)}return[2,r("sqm-referral-table-user-cell",{name:u})]}))}))};e.prototype.renderLabel=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.columnTitle]}))}))};e.prototype.renderReferrerCell=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n,a,i,s;return __generator(this,(function(l){if(!e){s=this.deletedUser}else if(!((t=e===null||e===void 0?void 0:e.referrerUser)===null||t===void 0?void 0:t.firstName)&&!((n=e.referrerUser)===null||n===void 0?void 0:n.lastName)){s=this.anonymousUser}else{s=((a=e===null||e===void 0?void 0:e.referrerUser)===null||a===void 0?void 0:a.firstName)+" "+((i=e===null||e===void 0?void 0:e.referrerUser)===null||i===void 0?void 0:i.lastName)}return[2,r("sqm-referral-table-user-cell",{name:s})]}))}))};e.prototype.render=function(){h([this.deletedUser,this.anonymousUser,this.columnTitle]);return r(a,{style:{display:"none"}})};return e}())}}}));
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import{h as e,r as t,c as a}from"./p-c7c11325.js";import{i as s}from"./p-027c0b10.js";import{b as r,j as l,f as i,n,u as o}from"./p-63e29387.js";import{d,J as c,H as u,L as h,w as m,R as p,i as v}from"./p-0ec54f97.js";import{c as E}from"./p-c1086930.js";import{l as g}from"./p-9ec99ced.js";import{c as f}from"./p-cef45012.js";import"./p-49b20dae.js";import{G as w}from"./p-f1dc581f.js";import{u as y,a as x}from"./p-f5fff87e.js";import{u as b}from"./p-976ee669.js";import{l as A}from"./p-08700497.js";import{m as D}from"./p-460155de.js";import{g as N}from"./p-49400aab.js";const R=r("sq:useRewardsTable"),T=d.gql`
|
|
2
|
+
query getRewards(
|
|
3
|
+
$limit: Int!
|
|
4
|
+
$offset: Int!
|
|
5
|
+
$rewardFilter: RewardFilterInput
|
|
6
|
+
$locale: RSLocale
|
|
7
|
+
) {
|
|
8
|
+
viewer {
|
|
9
|
+
... on User {
|
|
10
|
+
id
|
|
11
|
+
rewards(
|
|
12
|
+
limit: $limit
|
|
13
|
+
offset: $offset
|
|
14
|
+
filter: $rewardFilter
|
|
15
|
+
sortBy: { field: "dateCreated", order: DESC }
|
|
16
|
+
) {
|
|
17
|
+
totalCount
|
|
18
|
+
count
|
|
19
|
+
data {
|
|
20
|
+
meta {
|
|
21
|
+
status
|
|
22
|
+
integration {
|
|
23
|
+
name
|
|
24
|
+
}
|
|
25
|
+
message
|
|
26
|
+
customMeta
|
|
27
|
+
}
|
|
28
|
+
id
|
|
29
|
+
type
|
|
30
|
+
value
|
|
31
|
+
unit
|
|
32
|
+
name
|
|
33
|
+
dateGiven
|
|
34
|
+
dateCreated
|
|
35
|
+
dateExpires
|
|
36
|
+
dateCancelled
|
|
37
|
+
dateRedeemed
|
|
38
|
+
dateScheduledFor
|
|
39
|
+
fuelTankCode
|
|
40
|
+
fuelTankType
|
|
41
|
+
currency
|
|
42
|
+
prettyValue(locale: $locale)
|
|
43
|
+
prettyValueNumber: prettyValue(
|
|
44
|
+
formatType: NUMBER_FORMATTED
|
|
45
|
+
locale: $locale
|
|
46
|
+
)
|
|
47
|
+
prettyAvailableNumber: prettyAvailableValue(
|
|
48
|
+
formatType: NUMBER_FORMATTED
|
|
49
|
+
locale: $locale
|
|
50
|
+
)
|
|
51
|
+
prettyRedeemedNumber: prettyRedeemedCredit(
|
|
52
|
+
formatType: NUMBER_FORMATTED
|
|
53
|
+
locale: $locale
|
|
54
|
+
)
|
|
55
|
+
programId
|
|
56
|
+
program {
|
|
57
|
+
name
|
|
58
|
+
}
|
|
59
|
+
partnerFundsTransfer {
|
|
60
|
+
id
|
|
61
|
+
status
|
|
62
|
+
}
|
|
63
|
+
statuses
|
|
64
|
+
pendingReasons
|
|
65
|
+
cancelledReason
|
|
66
|
+
globalRewardKey
|
|
67
|
+
programRewardKey
|
|
68
|
+
rewardSource
|
|
69
|
+
prettyRedeemedCredit(locale: $locale)
|
|
70
|
+
prettyAssignedCredit(locale: $locale)
|
|
71
|
+
prettyAvailableValue(locale: $locale)
|
|
72
|
+
exchangedRewardRedemptionTransaction {
|
|
73
|
+
id
|
|
74
|
+
creditRedeemed
|
|
75
|
+
prettyRedeemedCredit(locale: $locale)
|
|
76
|
+
unit
|
|
77
|
+
dateRedeemed
|
|
78
|
+
}
|
|
79
|
+
referral {
|
|
80
|
+
id
|
|
81
|
+
dateModerated
|
|
82
|
+
referrerUser {
|
|
83
|
+
id
|
|
84
|
+
firstName
|
|
85
|
+
lastName
|
|
86
|
+
}
|
|
87
|
+
referredUser {
|
|
88
|
+
id
|
|
89
|
+
firstName
|
|
90
|
+
lastName
|
|
91
|
+
}
|
|
92
|
+
fraudData {
|
|
93
|
+
moderationStatus
|
|
94
|
+
autoModerationStatus
|
|
95
|
+
manualModerationStatus
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
rewardRedemptionTransactions {
|
|
100
|
+
data {
|
|
101
|
+
exchangedRewards {
|
|
102
|
+
data {
|
|
103
|
+
prettyValue(locale: $locale)
|
|
104
|
+
type
|
|
105
|
+
fuelTankCode
|
|
106
|
+
globalRewardKey
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
`,I=d.gql`
|
|
117
|
+
query getImpactTax {
|
|
118
|
+
viewer {
|
|
119
|
+
... on User {
|
|
120
|
+
id
|
|
121
|
+
impactConnection {
|
|
122
|
+
connected
|
|
123
|
+
taxHandlingEnabled
|
|
124
|
+
publisher {
|
|
125
|
+
requiredTaxDocumentType
|
|
126
|
+
currentTaxDocument {
|
|
127
|
+
status
|
|
128
|
+
type
|
|
129
|
+
dateCreated
|
|
130
|
+
}
|
|
131
|
+
withdrawalSettings {
|
|
132
|
+
paymentMethod
|
|
133
|
+
}
|
|
134
|
+
payoutsAccount {
|
|
135
|
+
hold
|
|
136
|
+
holdReasons
|
|
137
|
+
balance
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
`;async function _(t,a){const s=t.tagName.toLowerCase();let r;await customElements.whenDefined(s);try{r=a()}catch(t){return R("label promise failed",t),e("span",null)}try{return await r}catch(t){R("Error rendering label",t);const a=N(t);return e("details",null,e("summary",null,"Error"),a)}}const P=class{constructor(e){t(this,e),this.perPage=4,this.hideLabels=!1,this.prevLabel="Prev",this.moreLabel="Next",this.hiddenColumns="0",this.smBreakpoint=599,this.mdBreakpoint=799,n(this)}disconnectedCallback(){}render(){const t=e(S,null),a=e(C,null),{states:s,data:r,callbacks:n,elements:d}=v()?function(e,t,a){const[s,r]=l(((e,t)=>({...e,...t})),{columns:[],rows:[],loading:!1,page:0}),n=y(),{data:d}=o((()=>{var t;return(null===(t=e.demoData)||void 0===t?void 0:t.mockData)||D(e.perPage)}),[e.perPage]),c=b();return i((()=>{r({loading:!0}),d&&async function(t){let a=d;a=d.slice(0,e.perPage);const s=t.filter((e=>{var t,a;return"loading"!==e.slot&&"empty"!==e.slot&&"loading"!==(null===(t=null==e?void 0:e.firstElementChild)||void 0===t?void 0:t.getAttribute("slot"))&&"empty"!==(null===(a=null==e?void 0:e.firstElementChild)||void 0===a?void 0:a.getAttribute("slot"))})),l=null==s?void 0:s.map((async(e,t)=>{var a;const s=null===(a=null==e?void 0:e.firstElementChild)||void 0===a?void 0:a.getAttribute("slot");if("RAISINS-PLOP-TARGET"===e.tagName&&"loading"!==s&&"empty"!==s){e.style.position="absolute",e.setAttribute("slot","column-"+t);const a=e.firstElementChild.childNodes[1];return a.innerHTML="+",a.style.lineHeight="20px",_(e,(()=>e.renderLabel(t)))}return _(e,(()=>e.renderLabel()))})),i=null==a?void 0:a.map((async e=>{const t=null==s?void 0:s.map((async t=>_(t,(()=>t.renderCell(e,void 0,{})))));return await Promise.all(t)})),n=i&&(await Promise.all(i)).filter((e=>e));r({rows:n});const o=l&&await Promise.all(l);r({columns:o,loading:!1,page:0})}(c)}),[d,c,n]),E({states:{hasPrev:!1,hasNext:!1,loading:!1,show:"rows"},callbacks:{prevPage:()=>console.log("Prev"),nextPage:()=>console.log("Next")},data:{textOverrides:{showLabels:!e.hideLabels,prevLabel:e.prevLabel,moreLabel:e.moreLabel},referralData:[],mdBreakpoint:799,smBreakpoint:599},elements:{columns:s.columns,rows:s.rows,emptyElement:t,loadingElement:a}},e.demoData||{},{arrayMerge:(e,t)=>t})}(this,t,a):function(t,a,s){var r,n,o;const d=c(),v=u(),E=h(),g=null!==(r=t.programId)&&void 0!==r?r:v,f={userId_eq:null==d?void 0:d.id,accountId_eq:null==d?void 0:d.accountId,...g?"classic"===g?{programId_exists:!1}:{programId_eq:g}:{}},[w,x]=l(((e,t)=>({...e,...t})),{columns:[],rows:[],loading:!1,page:0}),{data:A,loading:D}=m(I,{},!(null==d?void 0:d.jwt)),{envelope:N,states:R,callbacks:P}=p(T,(e=>{var t;return null===(t=null==e?void 0:e.viewer)||void 0===t?void 0:t.rewards}),{limit:t.perPage,offset:0},{rewardFilter:f,locale:E},!(null==d?void 0:d.jwt)),S=y(),C=b(),L=null==N?void 0:N.data,q=null===(n=null==A?void 0:A.viewer)||void 0===n?void 0:n.impactConnection;i((()=>{x({loading:!0}),N&&async function(t){const a=t.filter((e=>"loading"!==e.slot&&"empty"!==e.slot)),s=null==a?void 0:a.map((async e=>_(e,(()=>e.renderLabel())))),r=null==L?void 0:L.map((async t=>{const s=null==a?void 0:a.map((async a=>_(a,(()=>a.renderCell(t,{locale:E,taxConnection:q},e)))));return await Promise.all(s)})),l=r&&(await Promise.all(r)).filter((e=>e));x({rows:l});const i=s&&await Promise.all(s);x({columns:i,loading:!1,page:R.currentPage})}(C)}),[N,C,S]);const U=!(null===(o=null==w?void 0:w.rows)||void 0===o?void 0:o.length)&&!(null==L?void 0:L.length);return{states:{hasNext:R.currentPage<R.pageCount-1,hasPrev:R.currentPage>0,show:R.loading||w.loading||D?"loading":U?"empty":"rows",namespace:"sqm-rewards-table"},data:{textOverrides:{showLabels:!t.hideLabels,prevLabel:t.prevLabel,moreLabel:t.moreLabel},hiddenColumns:t.hiddenColumns,smBreakpoint:t.smBreakpoint,mdBreakpoint:t.mdBreakpoint},elements:{columns:w.columns,rows:w.rows,emptyElement:a,loadingElement:s},callbacks:{nextPage:()=>{P.setCurrentPage(R.currentPage+1)},prevPage:()=>{P.setCurrentPage(R.currentPage-1)}}}}(this,t,a);return x([this.perPage]),e(w,{states:s,data:r,callbacks:n,elements:d})}};function S(){return e("slot",{name:"empty"},e("sqm-empty",{"empty-state-image":"https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_reward2.png","empty-state-header":"View your rewards","empty-state-text":"Refer friends and complete tasks to view the details of your rewards"}))}function C(){return e("slot",{name:"loading"},e(L,null),e(L,null),e(L,null),e(L,null))}function L(){return e("sqm-table-row",null,e("sqm-table-cell",{colspan:5},e("sl-skeleton",null)))}const q=class{constructor(e){t(this,e),this.ignored=!0,this.locale="en",n(this)}disconnectedCallback(){}render(){var e,t;return this.date?null===(t=null===(e=A.DateTime.fromMillis(this.date))||void 0===e?void 0:e.setLocale(g(this.locale)))||void 0===t?void 0:t.toLocaleString(A.DateTime.DATE_MED):"-"}},U=class{constructor(e){t(this,e),this.columnTitle="Date received",this.dateShown="dateGiven",n(this)}disconnectedCallback(){}async renderCell(t,a){return e("sqm-rewards-table-date-cell",{date:t[this.dateShown],locale:null==a?void 0:a.locale})}async renderLabel(){return this.columnTitle}render(){return x([this.dateShown,this.columnTitle]),e(a,{style:{display:"none"}})}},k=f({DetailsContainer:{width:"100%",display:"flex","align-items":"center","justify-content":"space-between","margin-right":"var(--sl-spacing-small)","flex-wrap":"wrap"},Details:{"padding-bottom":"var(--sl-spacing-small)","max-width":"500px","padding-right":"var(--sl-spacing-x-small)","&::part(header)":{padding:"var(--sl-spacing-x-small)",cursor:"default"},"&::part(content)":{padding:"var(--sl-spacing-x-small) var(--sl-spacing-medium)"},"&::part(base)":{opacity:"1"},"&::part(summary-icon)":{display:"flex"}},BadgeContainer:{"& > :not(:last-child)":{"margin-right":"var(--sl-spacing-x-small)"}},BoldText:{"font-weight":"var(--sl-font-weight-semibold)"},StatusBadge:{paddingLeft:"var(--sl-spacing-xxx-small)","&::part(base)":{textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line"}},Fueltank:{"& .code":{display:"flex",cursor:"pointer",userSelect:"none",color:"var(--sl-color-neutral-500)","&:hover":{color:"var(--sl-color-sky-500)"}},"& .text":{maxWidth:"90%",overflow:"hidden",textOverflow:"ellipsis",color:"inherit",fontSize:"var(--sl-font-size-small)",fontWeight:"var(--sl-font-weight-bold)"},"& .icon":{position:"relative",top:"1px",marginLeft:"var(--sl-spacing-x-small)",color:"inherit"}}}),O=k.toString(),F=class{constructor(e){t(this,e)}render(){return s.locale=this.locale,e("div",{style:{display:"contents"}},e("style",{type:"text/css"},O),e((({reward:t})=>{var a;const r="CENTS"===t.unit?t.prettyValue.replace(/USD/gi,"$"):null!==(a=t.prettyValue)&&void 0!==a?a:"-",l="1"===t.prettyValueNumber||t.dateRedeemed&&"0"===t.prettyAvailableNumber;if("FUELTANK"===t.type)return e("div",{class:k.classes.Fueltank},t.prettyValue,t.fuelTankCode&&e("div",{class:"code",onClick:()=>navigator.clipboard.writeText(t.fuelTankCode)},e("sl-tooltip",{trigger:"click",placement:"top",distance:5,skidding:11,content:this.copyText,"onSl-show":e=>setTimeout((()=>e.path[0].hide()),1e3)},e("span",{class:"text"},t.fuelTankCode),e("span",{class:"icon"},e("sl-icon",{name:"files"})))));if("CREDIT"===t.type&&!l){const a=parseFloat(t.prettyValueNumber)-parseFloat(t.prettyRedeemedNumber),l=Math.round(a/parseFloat(t.prettyValueNumber)*100),i=t.statuses.includes("EXPIRED")||t.statuses.includes("CANCELLED")?e("div",null,s.formatMessage({id:"redeemedText",defaultMessage:this.redeemedText},{redeemedAmount:t.prettyRedeemedCredit})):e("div",null,s.formatMessage({id:"availableText",defaultMessage:this.availableText},{availableAmount:t.statuses.includes("PENDING")?t.prettyAssignedCredit:t.prettyAvailableValue})),n=f({Progress:{height:"3px",width:"100%",margin:"var(--sl-spacing-xx-small) 0",background:"var(--sqm-border-color)","&:after":{content:'""',display:"block",background:"var(--sqm-accent-color-icon)",borderRadius:"100px",width:`${l}%`,height:"100%"}},Container:{display:"inline-block",verticalAlign:"top",width:"150px",whiteSpace:"break",overflow:"hidden",textOverflow:"ellipsis"},Text:{fontSize:"var(--sl-font-size-medium)",color:"var(--sqm-text)"},Subtext:{fontSize:"var(--sl-font-size-small)",color:"var(--sqm-text-subdued)"}}),o=n.toString();return e("div",null,e("style",{type:"text/css"},o),e("div",{class:n.classes.Container},e("span",{part:"sqm-reward-cell-value"},r+" "),e("br",null)," ",e("div",{part:"sqm-reward-cell-progress",class:n.classes.Progress}),e("span",{part:"sqm-reward-cell-subtext",class:n.classes.Subtext},i)))}return e("div",null,r)}),{reward:this.reward}))}},V=class{constructor(e){t(this,e),this.columnTitle="Reward",this.redeemedText="{redeemedAmount} redeemed",this.availableText="{availableAmount} remaining",this.copyText="Copied!",n(this)}disconnectedCallback(){}async renderCell(t,a){return e("sqm-rewards-table-reward-cell",{reward:t,redeemedText:this.redeemedText,availableText:this.availableText,copyText:this.copyText,locale:null==a?void 0:a.locale,exportparts:"sqm-rewards-cell-value, sqm-rewards-cell-progress-bar, sqm-rewards-cell-subtext"})}async renderLabel(){return this.columnTitle}render(){return x([this.columnTitle,this.redeemedText,this.availableText,this.copyText]),e(a,{style:{display:"none"}})}},M=class{constructor(e){t(this,e),this.locale="en"}render(){s.locale=this.locale;const t=({reward:t})=>{var a;return e("span",null,s.formatMessage({id:"rewardSourceText",defaultMessage:this.rewardSourceText},{rewardSource:t.rewardSource,programName:null===(a=null==t?void 0:t.program)||void 0===a?void 0:a.name}))},a=({reward:t})=>{var a;const s=e("div",null,e("span",{style:{fontSize:"var(--sl-font-size-small)",color:"var(--sqm-text-subdued)"}},this.rewardExchangeText),e("br",null),null===(a=t.exchangedRewardRedemptionTransaction)||void 0===a?void 0:a.prettyRedeemedCredit," → ",t.prettyValue);return t.exchangedRewardRedemptionTransaction.prettyRedeemedCredit.length+t.prettyValue.length<21?s:e("div",{style:{display:"inline-block",verticalAlign:"top"}},s)},r=e=>e?e.firstName||e.lastName?e.firstName?e.lastName?`${e.firstName} ${e.lastName}`:`${e.firstName}`:`${e.lastName}`:this.anonymousUserText:this.deletedUserText;return e((()=>"FRIEND_SIGNUP"===this.reward.rewardSource||"REFERRED"===this.reward.rewardSource?null===this.reward.referral?e("p",{style:{color:"var(--sqm-text-subdued)"}},this.deletedReferralText):e("div",null,e("div",{style:{fontSize:"var(--sl-font-size-small)",color:"var(--sqm-text-subdued)"}},s.formatMessage({id:"referralText",defaultMessage:this.referralText},{rewardSource:this.reward.rewardSource})),e("div",null,r("FRIEND_SIGNUP"==this.reward.rewardSource?this.reward.referral.referredUser:this.reward.referral.referrerUser))):e(this.reward.exchangedRewardRedemptionTransaction?a:t,{reward:this.reward})),null)}},G=class{constructor(e){t(this,e),this.columnTitle="Source",this.anonymousUser="Anonymous User",this.deletedUser="Deleted User",this.rewardExchangeText="Reward Exchange",this.referralText="{rewardSource, select, FRIEND_SIGNUP {Referral to} REFERRED {Referred by} other {}}",this.rewardSourceText="{rewardSource, select, MANUAL {Manual} AUTOMATED {{programName}} other {}}",n(this)}disconnectedCallback(){}async renderCell(t,a){return e("sqm-rewards-table-source-cell",{reward:t,anonymousUserText:this.anonymousUser,deletedUserText:this.deletedUser,rewardExchangeText:this.rewardExchangeText,referralText:this.referralText,rewardSourceText:this.rewardSourceText,locale:null==a?void 0:a.locale})}async renderLabel(){return this.columnTitle}render(){return x([this.deletedUser,this.anonymousUser,this.columnTitle,this.rewardExchangeText,this.referralText,this.rewardSourceText]),e(a,{style:{display:"none"}})}},B=f({Badge:{"&::part(base)":{fontSize:"var(--sl-font-size-small)",padding:"4px 8px",paddingLeft:"10px",whiteSpace:"pre-line"}},RedeemBadge:{"&::part(base)":{padding:"4px 8px",fontSize:"var(--sl-font-size-small)",textAlign:"center",whiteSpace:"pre-line",background:"var(--sqm-informative-color-icon)",color:"var(--sl-color-white)"}},DangerBadge:{"&::part(base)":{padding:"4px 8px",fontSize:"var(--sl-font-size-small)",textAlign:"center",whiteSpace:"pre-line",background:"var(--sqm-danger-color-icon)",color:"var(--sl-color-white)"}},WarningBadge:{"&::part(base)":{padding:"4px 8px",fontSize:"var(--sl-font-size-small)",textAlign:"center",whiteSpace:"pre-line",background:"var(--sqm-warning-color-icon)",color:"var(--sl-color-white)"}},SuccessBadge:{"&::part(base)":{padding:"4px 8px",fontSize:"var(--sl-font-size-small)",textAlign:"center",whiteSpace:"pre-line",background:"var(--sqm-success-color-icon)",color:"var(--sl-color-white)"}},Date:{fontSize:"var(--sl-font-size-small)",color:"var(--sqm-text-subdued)",margin:"0"}}),$=B.toString(),z=class{constructor(e){t(this,e),this.expiryText="Expires",this.locale="en",this.pendingUsTax="W-9 required",this.pendingTaxReview="Awaiting tax form review.",this.pendingNewTaxForm="Invalid tax form. Submit a new form to receive your rewards.",this.pendingTaxSubmission="Submit your tax documents to receive your rewards.",this.pendingPartnerCreation="Complete your tax and cash payout setup to receive your rewards.",this.pendingScheduled="Until",this.pendingUnhandled="Fulfillment error",this.pendingReviewText="Awaiting review",this.deniedText="Detected self-referral",this.payoutFailed="Payout failed due to a fulfillment issue and is current being retried.",this.payoutApproved="Reward was scheduled for payment based on your settings, barring any account holds.",this.payoutCancelled="If you think this is a mistake, contact our Support team."}rewardStatus(e){var t,a,s,r,l,i,n,o,d;const c=null===(t=e.statuses)||void 0===t?void 0:t.includes("EXPIRED"),u=null===(a=e.statuses)||void 0===a?void 0:a.includes("PENDING"),h="INTEGRATION"===e.type||"FUELTANK"===e.type,m=null===(r=null===(s=e.referral)||void 0===s?void 0:s.fraudData)||void 0===r?void 0:r.moderationStatus;if("DENIED"===m)return"DENIED";if("PENDING"===m)return"PENDING_REVIEW";const p=null===(l=e.partnerFundsTransfer)||void 0===l?void 0:l.status;return"TRANSFERRED"===p||"NOT_YET_DUE"===p?"PAYOUT_APPROVED":"OVERDUE"===p?"PAYOUT_FAILED":"REVERSED"===p?"PAYOUT_CANCELLED":e.dateCancelled?"CANCELLED":c?"EXPIRED":u?"PENDING":"CREDIT"===e.type?(null===(i=e.statuses)||void 0===i?void 0:i.includes("REDEEMED"))?"REDEEMED":"AVAILABLE":"PCT_DISCOUNT"===e.type&&(null===(n=e.statuses)||void 0===n?void 0:n.includes("AVAILABLE"))?"AVAILABLE":h&&u?"PENDING":h&&(null===(o=e.statuses)||void 0===o?void 0:o.includes("CANCELLED"))?"CANCELLED":h&&(null===(d=e.statuses)||void 0===d?void 0:d.includes("AVAILABLE"))?"AVAILABLE":""}getTaxPendingReasons(e,t){var a,s,r,l,i;if(null===(a=null==e?void 0:e.pendingReasons)||void 0===a?void 0:a.includes("US_TAX")){if(!(null==t?void 0:t.taxHandlingEnabled))return this.pendingUsTax;if(!(null==t?void 0:t.connected))return this.pendingPartnerCreation;if(null===(s=null==t?void 0:t.publisher)||void 0===s?void 0:s.requiredTaxDocumentType){if(!(null===(r=null==t?void 0:t.publisher)||void 0===r?void 0:r.currentTaxDocument))return this.pendingTaxSubmission;const e=t.publisher.currentTaxDocument.status;if("INACTIVE"===e)return this.pendingNewTaxForm;if("NOT_VERIFIED"===e)return this.pendingTaxReview}if(!(null===(l=null==t?void 0:t.publisher)||void 0===l?void 0:l.withdrawalSettings))return this.pendingPartnerCreation}return(null===(i=null==e?void 0:e.pendingReasons)||void 0===i?void 0:i.includes("MISSING_PAYOUT_CONFIGURATION"))?this.pendingPartnerCreation:""}getBadgeType(e){switch(e){case"AVAILABLE":return"success";case"REDEEMED":case"PAYOUT_APPROVED":return"primary";case"PENDING":case"PENDING_REVIEW":return"warning";default:return"danger"}}getPayoutStatusText(e){switch(e){case"US_TAX":return this.pendingUsTax;case"PAYOUT_APPROVED":return this.payoutApproved;case"PAYOUT_FAILED":return this.payoutFailed;case"PAYOUT_CANCELLED":return this.payoutCancelled;case"PENDING_TAX_REVIEW":return this.pendingTaxReview;case"PENDING_NEW_TAX_FORM":return this.pendingNewTaxForm;case"PENDING_TAX_SUBMISSION":return this.pendingTaxSubmission;case"PENDING_PARTNER_CREATION":return this.pendingPartnerCreation}}render(){var t;s.locale=this.locale;const a=this.rewardStatus(this.reward),r=s.formatMessage({id:"statusMessage",defaultMessage:this.statusText},{status:a}),l=this.getBadgeType(a),i=this.reward.dateCancelled||this.reward.dateExpires||this.reward.dateRedeemed||"",n=i&&`${"AVAILABLE"===a&&this.reward.dateExpires?this.expiryText+" ":""}${null===(t=A.DateTime.fromMillis(i))||void 0===t?void 0:t.setLocale(g(g(this.locale))).toLocaleString(A.DateTime.DATE_MED)}`,o="PENDING"===a?this.getTaxPendingReasons(this.reward,this.taxConnection)||function(e){var t;const a={SCHEDULED:e.reward.dateScheduledFor&&e.pendingScheduled+" "+(null===(t=A.DateTime.fromMillis(e.reward.dateScheduledFor))||void 0===t?void 0:t.setLocale(g(g(e.locale||"en"))).toLocaleString(A.DateTime.DATE_MED)),UNHANDLED_ERROR:e.pendingUnhandled,SUSPECTED_FRAUD:e.pendingReview},s=e.getTaxPendingReasons(e.reward,e.taxConnection);return[...s?[s]:[],...e.reward.pendingReasons.map((e=>{var t;return null!==(t=a[e])&&void 0!==t?t:e}))].join(", ")}(this):null,d="PENDING_REVIEW"===a?this.pendingReviewText:"DENIED"===a?this.deniedText:null,c=(()=>{switch(a){case"AVAILABLE":return B.classes.SuccessBadge;case"REDEEMED":case"PAYOUT_APPROVED":return B.classes.RedeemBadge;case"PENDING":case"PENDING_REVIEW":return B.classes.WarningBadge;default:return B.classes.DangerBadge}})();return e("div",{style:{display:"contents"}},e("style",{type:"text/css"},$),e("sl-badge",{type:l,pill:!0,class:c},r),e("p",{class:B.classes.Date},d||o||this.getPayoutStatusText(a)||n))}},j=class{constructor(e){t(this,e),this.columnTitle="Status",this.statusText="{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} PAYOUT_APPROVED {Payout Approved} PAYOUT_CANCELLED {Payout Cancelled} PAYOUT_FAILED {Payout Failed} EXPIRED {Expired} REDEEMED {Redeemed} DENIED {Denied} other {Not available} }",this.expiryText="Expires on ",this.pendingUsTax="W-9 required",this.pendingScheduled="Until",this.pendingUnhandled="Fulfillment error",this.pendingReviewText="Awaiting review",this.deniedText="Detected self-referral",this.pendingTaxReview="Awaiting tax form review.",this.pendingNewTaxForm="Invalid tax form. Submit a new form to receive your rewards.",this.pendingTaxSubmission="Submit your tax documents to receive your rewards.",this.pendingPartnerCreation="Complete your tax and cash payout setup to receive your rewards.",this.payoutFailed="Payout failed due to a fulfillment issue and is current being retried.",this.payoutCancelled="If you think this is a mistake, contact our Support team.",this.payoutApproved="Reward was scheduled for payment based on your settings, barring any account holds.",n(this)}disconnectedCallback(){}async renderCell(t,a){return e("sqm-rewards-table-status-cell",{statusText:this.statusText,reward:t,taxConnection:null==a?void 0:a.taxConnection,expiryText:this.expiryText,pendingScheduled:this.pendingScheduled,pendingUsTax:this.pendingUsTax,pendingUnhandled:this.pendingUnhandled,pendingReviewText:this.pendingReviewText,payoutFailed:this.payoutFailed,payoutApproved:this.payoutApproved,payoutCancelled:this.payoutCancelled,deniedText:this.deniedText,locale:null==a?void 0:a.locale})}async renderLabel(){return this.columnTitle}render(){return x([this.columnTitle,this.statusText,this.expiryText,this.pendingReviewText,this.pendingScheduled,this.pendingUsTax,this.pendingUnhandled]),e(a,{style:{display:"none"}})}};export{P as sqm_rewards_table,q as sqm_rewards_table_date_cell,U as sqm_rewards_table_date_column,F as sqm_rewards_table_reward_cell,V as sqm_rewards_table_reward_column,M as sqm_rewards_table_source_cell,G as sqm_rewards_table_source_column,z as sqm_rewards_table_status_cell,j as sqm_rewards_table_status_column}
|