@solvimon/solvimon-web 0.1.0-alpha.7 → 0.1.0-alpha.8

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.
Files changed (202) hide show
  1. package/dist/ApiStatus-CyNDp_op.mjs +9 -0
  2. package/dist/ApiStatus-oqvUEWJx.js +1 -0
  3. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-C-C0i6i6.js +1 -0
  4. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-CupcH8TZ.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-CT0Tjsnw.mjs} +2 -4
  5. package/dist/{ContentWithAsideLayout-Ct24RV-2.mjs → ContentWithAsideLayout-BTdixy3L.mjs} +2 -11
  6. package/dist/ContentWithAsideLayout-oAYVrLvL.js +1 -0
  7. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DZJ0xukI.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CK73bYUe.mjs} +2 -5
  8. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CLU7Yiyx.js +1 -0
  9. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-B_WLgBur.js +1 -0
  10. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DsrBsrtk.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Dt_Vb7Wz.mjs} +1 -2
  11. package/dist/PaymentHistoryBlock-DHM-3fh-.js +1 -0
  12. package/dist/PaymentHistoryBlock-YzJ6bxKr.mjs +4 -0
  13. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BnKwmJ2s.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-D6Cr2Uga.mjs} +1 -5
  14. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DFw8lrDv.js +1 -0
  15. package/dist/PaymentIntegrationForm-Cl5ua8v8.js +1 -0
  16. package/dist/PaymentIntegrationForm-ID4QnvA3.mjs +4 -0
  17. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BE1lWOk9.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CVWPT3Ni.mjs} +32 -189
  18. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DifRn1ok.js +1 -0
  19. package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-CKNMt-JH.js +1 -0
  20. package/dist/{PricingGroupContent.vue_vue_type_script_setup_true_lang-BbvDXvIS.mjs → PricingGroupContent.vue_vue_type_script_setup_true_lang-CzS32ZUt.mjs} +5 -31
  21. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DVhJy0t8.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BIxGqr9U.mjs} +4 -7
  22. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-CpEqDnO3.js +1 -0
  23. package/dist/adyenLoader-CEH4A2b2.js +1 -0
  24. package/dist/adyenLoader-gsbzSjYV.mjs +177 -0
  25. package/dist/component-C2Gc-wsE.js +1 -0
  26. package/dist/component-CM9g6tbD.mjs +804 -0
  27. package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
  28. package/dist/components/BillingInformation/BillingInformation.es.js +3 -7
  29. package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
  30. package/dist/components/BillingInformationForm/BillingInformationForm.es.js +9 -17
  31. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
  32. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +3 -7
  33. package/dist/components/Invoice/Invoice.cjs.js +1 -1
  34. package/dist/components/Invoice/Invoice.es.js +42 -2659
  35. package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
  36. package/dist/components/InvoiceDetails/InvoiceDetails.es.js +3 -7
  37. package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
  38. package/dist/components/InvoicesList/InvoicesList.es.js +2 -6
  39. package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
  40. package/dist/components/PaymentHistory/PaymentHistory.es.js +3 -7
  41. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
  42. package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +7 -33
  43. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
  44. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +8 -4824
  45. package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
  46. package/dist/components/SubscriptionsList/SubscriptionsList.es.js +4 -8
  47. package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
  48. package/dist/components/WalletBalances/WalletBalances.es.js +3 -7
  49. package/dist/core/index.cjs.js +1 -1
  50. package/dist/core/index.es.js +1 -1
  51. package/dist/core/types.d.ts +2 -0
  52. package/dist/{customer-CcQR-JIm.js → customer-C_Hz_npf.js} +1 -1
  53. package/dist/{customer-CJrpbGX4.mjs → customer-TIi7iZFw.mjs} +1 -1
  54. package/dist/en-US-CBoPxQwX.mjs +199 -0
  55. package/dist/en-US-DJq-9dD8.js +1 -0
  56. package/dist/index-CzL1ZcGi.mjs +85 -0
  57. package/dist/index-DRdBmZ2-.js +1 -0
  58. package/dist/index.cjs.js +1 -1
  59. package/dist/index.d.ts +1 -0
  60. package/dist/index.es.js +4 -1
  61. package/dist/{invoices-CNK1Ushv.mjs → invoices-BuVOuTOm.mjs} +2 -15
  62. package/dist/invoices-DbvwXAsm.js +1 -0
  63. package/dist/nl-NL-BB7KbK-h.mjs +181 -0
  64. package/dist/nl-NL-CtU1Lg2F.js +1 -0
  65. package/dist/paymentMethods-B4AYGf0K.js +1 -0
  66. package/dist/{paymentMethods-C-ApE-G4.mjs → paymentMethods-Di32oJ39.mjs} +2 -2
  67. package/dist/{payments-CE9U7aKK.mjs → payments-C5fD1PXB.mjs} +1 -1
  68. package/dist/{payments-CLt0SExf.js → payments-DeutKq9x.js} +1 -1
  69. package/dist/{registry-B99ZnfEn.mjs → registry-BLwMl1bK.mjs} +6 -4
  70. package/dist/registry-CMSmkLcy.js +1 -0
  71. package/dist/screens/Checkout/Checkout.cjs.js +1 -1
  72. package/dist/screens/Checkout/Checkout.es.js +420 -2388
  73. package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
  74. package/dist/screens/CustomerOverview/CustomerOverview.es.js +13 -14
  75. package/dist/screens/PayInvoice/PayInvoice.ce.d.ts +3 -0
  76. package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -0
  77. package/dist/screens/PayInvoice/PayInvoice.es.js +456 -0
  78. package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -1
  79. package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +79 -61
  80. package/dist/solvimon-web.css +1 -1
  81. package/dist/source-DKDKBlUm.mjs +179 -0
  82. package/dist/source-dkMNFWDc.js +1 -0
  83. package/dist/{subscriptions-CoeCrY1I.mjs → subscriptions-mOgjjzUi.mjs} +2 -2
  84. package/dist/subscriptions-wdMADcQZ.js +1 -0
  85. package/dist/{useActionDispatchProvider-eO2qFPGv.mjs → useActionDispatchProvider-B4gszz0Q.mjs} +1 -1
  86. package/dist/{useActionDispatchProvider-CWVV_xsi.js → useActionDispatchProvider-DfS2P0bd.js} +1 -1
  87. package/dist/{useCustomer-PthyTFLl.js → useCustomer-DanZzn-l.js} +1 -1
  88. package/dist/{useCustomer--jycAz--.mjs → useCustomer-cbhDyWJL.mjs} +2 -2
  89. package/dist/useIncrementalLoading-DFe5Yh8M.js +1 -0
  90. package/dist/{useIncrementalLoading-CcnL3flF.mjs → useIncrementalLoading-RRicokf1.mjs} +3 -8
  91. package/dist/useInvoiceData-CxxHa5R2.js +1 -0
  92. package/dist/{useInvoiceData-BiMMoVoW.mjs → useInvoiceData-fS6G_244.mjs} +6 -12
  93. package/dist/{useInvoicesList-DFhF_gp7.mjs → useInvoicesList-BQQxcPdz.mjs} +23 -260
  94. package/dist/useInvoicesList-CtJqmblZ.js +1 -0
  95. package/dist/usePaymentMethodOptions-2MloZ9bY.mjs +26 -0
  96. package/dist/usePaymentMethodOptions-D01YWW3G.js +1 -0
  97. package/dist/{usePaymentMethods-BRQ7-dUr.js → usePaymentMethods-Cm9WdSW0.js} +1 -1
  98. package/dist/{usePaymentMethods-BX2RnHZN.mjs → usePaymentMethods-DZvfWSlx.mjs} +2 -2
  99. package/dist/usePayments-B13S_yai.js +1 -0
  100. package/dist/usePayments-D4uGKBsV.mjs +36 -0
  101. package/dist/usePortal-DJDJNLbo.mjs +12 -0
  102. package/dist/usePortal-DWJEVkTj.js +1 -0
  103. package/dist/useService-9fCKPTmu.js +1 -0
  104. package/dist/useService-BuWWE5ND.mjs +68 -0
  105. package/dist/useViewport-Bu0cyeSi.mjs +38 -0
  106. package/dist/useViewport-CKRY1CKR.js +1 -0
  107. package/dist/useWalletBalanceItems-B53Gkjro.mjs +106 -0
  108. package/dist/useWalletBalanceItems-BMaVT4TW.js +1 -0
  109. package/dist/useWatchDebounced-2ZLnfgvG.js +1 -0
  110. package/dist/useWatchDebounced-D1xuIX6_.mjs +12 -0
  111. package/dist/vendor-ui-BwxuPDg8.mjs +28598 -0
  112. package/dist/vendor-ui-Ce_Yp7xA.js +1 -0
  113. package/package.json +17 -10
  114. package/dist/Alert.vue.es-DMPvSykx.js +0 -1
  115. package/dist/Alert.vue.es-DsJ1ckRU.mjs +0 -172
  116. package/dist/Amount.vue.es-C6JE5rL8.mjs +0 -23
  117. package/dist/Amount.vue.es-h8wulbBG.js +0 -1
  118. package/dist/Avatar.vue.es-Ba8ZGfm4.mjs +0 -93
  119. package/dist/Avatar.vue.es-BbyE0AjW.js +0 -1
  120. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-C4Ndo83E.js +0 -1
  121. package/dist/Button.vue.es-6sBk5tBL.mjs +0 -408
  122. package/dist/Button.vue.es-BC4_TItq.js +0 -1
  123. package/dist/CardContent.vue.es-ChEMrFCc.mjs +0 -115
  124. package/dist/CardContent.vue.es-i9ivuGKG.js +0 -1
  125. package/dist/Chip.vue.es-D0fkSe8a.js +0 -1
  126. package/dist/Chip.vue.es-DcW2CjUA.mjs +0 -1576
  127. package/dist/Comparators.vue.es-BdxDqU8o.js +0 -1
  128. package/dist/Comparators.vue.es-DdTKGB80.mjs +0 -406
  129. package/dist/ContentWithAsideLayout-UHovpjZu.js +0 -1
  130. package/dist/CustomerBillingInformation.vue.es-9rP7-RzN.js +0 -1
  131. package/dist/CustomerBillingInformation.vue.es-DBMl01Es.mjs +0 -175
  132. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CYTCcMgP.js +0 -1
  133. package/dist/Divider.vue.es-ClFG8QtG.js +0 -1
  134. package/dist/Divider.vue.es-wKkIVBgb.mjs +0 -24
  135. package/dist/DividerText.vue.es-B7oa5Xpn.mjs +0 -72
  136. package/dist/DividerText.vue.es-yiFdPQvo.js +0 -1
  137. package/dist/ErrorNotification.vue.es-Bgw0MIl8.mjs +0 -30
  138. package/dist/ErrorNotification.vue.es-FpRyg0De.js +0 -1
  139. package/dist/FormMessage.vue.es-DFQXxiSC.mjs +0 -46
  140. package/dist/FormMessage.vue.es-LeWoj774.js +0 -1
  141. package/dist/IconButton.vue.es-DNCwwH_j.mjs +0 -825
  142. package/dist/IconButton.vue.es-DiSiGPWO.js +0 -1
  143. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BDitcx8B.js +0 -1
  144. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-6yi47YWd.js +0 -1
  145. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CC3hm3nx.js +0 -1
  146. package/dist/PaymentMethod.vue.es-DYlnmZh7.js +0 -1
  147. package/dist/PaymentMethod.vue.es-nXZoQjG3.mjs +0 -1255
  148. package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-CmQILA3q.js +0 -1
  149. package/dist/Section.vue.es-3-H1pUTB.mjs +0 -79
  150. package/dist/Section.vue.es-BuzTXRLP.js +0 -1
  151. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-Pq3d7DTb.js +0 -1
  152. package/dist/TooltipParagraph.vue.es-DVJLF9Kv.mjs +0 -136
  153. package/dist/TooltipParagraph.vue.es-kTbRGoPF.js +0 -1
  154. package/dist/TrialChip.vue.es-BHYbW8b6.mjs +0 -759
  155. package/dist/TrialChip.vue.es-C6Xg_5rR.js +0 -1
  156. package/dist/_Uint8Array-DHE03FZr.mjs +0 -507
  157. package/dist/_Uint8Array-DxISR7XF.js +0 -1
  158. package/dist/_flatRest.es-BHFPCqZh.mjs +0 -642
  159. package/dist/_flatRest.es-dFffnTpX.js +0 -1
  160. package/dist/api.es-B4qAAJKr.js +0 -1
  161. package/dist/api.es-UkfpLiLL.mjs +0 -83
  162. package/dist/cloneDeep-Hs8Pp07F.js +0 -1
  163. package/dist/cloneDeep-sm9cY-u2.mjs +0 -212
  164. package/dist/cn.es-C7xoIs3C.js +0 -1
  165. package/dist/cn.es-tfxVlz02.mjs +0 -3191
  166. package/dist/component-ZRZIt3ZW.js +0 -1
  167. package/dist/component-dpA83LIN.mjs +0 -6569
  168. package/dist/countryData.es--zJAd6LA.mjs +0 -252
  169. package/dist/countryData.es-D3MFzU92.js +0 -1
  170. package/dist/customer.es-D42Md24r.js +0 -1
  171. package/dist/customer.es-LIW2YmLL.mjs +0 -30
  172. package/dist/formatting.es-9hM8aHSg.js +0 -1
  173. package/dist/formatting.es-D5H_ySFv.mjs +0 -68
  174. package/dist/getCountryNameByCode.es-fP52nO_7.js +0 -1
  175. package/dist/getCountryNameByCode.es-ymC9R46j.mjs +0 -8
  176. package/dist/index-2jo9BSPM.js +0 -1
  177. package/dist/index-BFZ0dPh9.mjs +0 -179
  178. package/dist/index-CI71bVGE.mjs +0 -2521
  179. package/dist/index-CWSXne1Q.js +0 -1
  180. package/dist/index-D3v7hAtc.mjs +0 -253
  181. package/dist/index-WLSPwi90.js +0 -1
  182. package/dist/index.es-BBJF2O2l.js +0 -1
  183. package/dist/index.es-LCAKs4tH.mjs +0 -438
  184. package/dist/invoices-3kVHsAXr.js +0 -1
  185. package/dist/isEmpty.es-Bp1SbWFu.mjs +0 -131
  186. package/dist/isEmpty.es-Dycf-CD_.js +0 -1
  187. package/dist/paymentMethods-DZRf0WRl.js +0 -1
  188. package/dist/pick.es-BgDAfhAl.js +0 -1
  189. package/dist/pick.es-DdVOyp0Q.mjs +0 -45
  190. package/dist/registry-ClZ43bQn.js +0 -1
  191. package/dist/sprite.svg.es-CCc3Mz1x.js +0 -1
  192. package/dist/sprite.svg.es-DZD704h3.mjs +0 -4
  193. package/dist/subscriptions-CS8HTxzC.js +0 -1
  194. package/dist/typeGuards.es-C4nR5FkL.js +0 -1
  195. package/dist/typeGuards.es-fwUoeMCe.mjs +0 -12
  196. package/dist/useIncrementalLoading-CAdNW-Bf.js +0 -1
  197. package/dist/useInvoiceData-DvQO_nKz.js +0 -1
  198. package/dist/useInvoicesList-CHkwSNO9.js +0 -1
  199. package/dist/useService-B67YWAcN.js +0 -1
  200. package/dist/useService-DG_zedHV.mjs +0 -282
  201. package/dist/useWalletBalanceItems-B5FMmoU2.mjs +0 -308
  202. package/dist/useWalletBalanceItems-BY3gq0fc.js +0 -1
@@ -1 +0,0 @@
1
- const e=require("vue"),t=require("./Button.vue.es-BC4_TItq.js"),o=require("./Avatar.vue.es-BbyE0AjW.js"),r=require("./component-ZRZIt3ZW.js"),a=require("./formatting.es-9hM8aHSg.js"),n={equals:"equals",notEquals:"does not equal",in:"equals one of",inOutput:"equals",notIn:"does not equal one of",notInOutput:"does not equal",greaterThan:"greater than",greaterThanOrEquals:"greater than or equal to",lessThan:"less than",lessThanOrEquals:"less than or equal to",empty:"is empty",notEmpty:"is not empty",contains:"contains",notContains:"does not contain",or:"or",unsupported:"unsupported",unknown:"Unknown"},s=(e=n)=>({propertyName:t,comparator:o,value:r,values:a},{hasFormatting:s}={})=>{const l=((e=n)=>[{comparator:"CONTAINS",forType:["STRING"],requiresInput:!0,symbol:"CONTAINS",label:{input:e.contains,output:e.contains}},{comparator:"NOT_CONTAINS",forType:["STRING"],requiresInput:!0,symbol:"NOT CONTAINS",label:{input:e.notContains,output:e.notContains}},{comparator:"EMPTY",forType:["STRING"],requiresInput:!1,symbol:"EMPTY",label:{input:e.empty,output:e.empty}},{comparator:"NOT_EMPTY",forType:["STRING"],requiresInput:!1,symbol:"NOT EMPTY",label:{input:e.notEmpty,output:e.notEmpty}},{comparator:"EQUALS",forType:["NUMBER","STRING","ENUM"],requiresInput:!0,symbol:"=",label:{input:e.equals,output:e.equals}},{comparator:"NOT_EQUALS",forType:["NUMBER","STRING","ENUM"],requiresInput:!0,symbol:"!=",label:{input:e.notEquals,output:e.notEquals}},{comparator:"IN",forType:["NUMBER","STRING","ENUM"],requiresInput:!0,symbol:"IN ()",label:{input:e.in,output:e.inOutput}},{comparator:"NOT_IN",forType:["NUMBER","STRING","ENUM"],requiresInput:!0,symbol:"NOT IN()",label:{input:e.notIn,output:e.notInOutput}},{comparator:"GREATER_THAN",forType:["NUMBER"],requiresInput:!0,symbol:">",label:{input:e.greaterThan,output:e.greaterThan}},{comparator:"GREATER_THAN_OR_EQUALS",forType:["NUMBER"],requiresInput:!0,symbol:">=",label:{input:e.greaterThanOrEquals,output:e.greaterThanOrEquals}},{comparator:"LESS_THAN",forType:["NUMBER"],requiresInput:!0,symbol:"<",label:{input:e.lessThan,output:e.lessThan}},{comparator:"LESS_THAN_OR_EQUALS",forType:["NUMBER"],requiresInput:!0,symbol:"<=",label:{input:e.lessThanOrEquals,output:e.lessThanOrEquals}}])(e).find(e=>e.comparator===o),p=null==a?void 0:a.reduce((t,o,r,a)=>{const n=s?`<strong class="font-semibold">${o}</strong>`:o;return r===a.length-1?`${t} ${(null==e?void 0:e.or)??"or"} ${n}`:0===r?n:[t,n].join(", ")},"");return l?["IN","NOT_IN"].includes(l.comparator)&&a?s?`<strong>${t}</strong> ${l.label.output} <strong>${p}</strong>`:`${t} ${l.label.output} ${p}`:s?`<strong class="font-semibold">${t}</strong> ${l.label.output} <strong class="font-semibold">${r}</strong>`:`${t} ${l.label.output} ${r}`:(null==e?void 0:e.unsupported)??"Unsupported comparator"},l=t=>t.every(t=>t.type===e.Comment||(t.type===e.Text&&"string"==typeof t.children&&!t.children.trim()||!(t.type!==e.Fragment||!l(t.children)))),p={class:"grow text-ellipsis overflow-hidden"},u=e.defineComponent({__name:"IconTitle",props:{title:{},subTitle:{},icon:{},variant:{default:"default"},suffix:{},size:{default:"md"},avatar:{type:Boolean,default:!1},uppercase:{type:Boolean,default:!0},resourceId:{}},setup(a){const n=a,s=e.computed(()=>{switch(n.variant){case"transparent":return"";case"warning":return"bg-gradient-to-br backdrop-blur-sm from-orange-600/20 to-yellow-200/20";case"neutral":return"bg-neutral-100";default:return"bg-gradient-to-br backdrop-blur-sm from-peach-100/20 to-mint-100/20"}});return(n,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex items-center",{"gap-4":["md","lg"].includes(a.size),"gap-3":"sm"===a.size,"gap-2":"xs"===a.size&&"transparent"!==a.variant,"gap-1":"xs"===a.size&&"transparent"===a.variant}])},[a.icon?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([{[s.value]:!0,"w-9 h-9":["md","lg"].includes(a.size),"w-8 h-8":"sm"===a.size,"w-6 h-6":"xs"===a.size},"rounded-md flex items-center justify-center shrink-0"])},[a.icon?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:0,size:["sm","xs"].includes(a.size)?"xs":"md",icon:a.icon},null,8,["size","icon"])):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),a.avatar&&a.title?(e.openBlock(),e.createBlock(e.unref(o._sfc_main),{key:1,initials:a.title.slice(0,1),"color-hash":a.title,size:["sm","xs"].includes(a.size)?"lg":"xl"},null,8,["initials","color-hash","size"])):e.createCommentVNode("",!0),e.createElementVNode("div",p,[a.title||n.$slots.default?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([{"text-3xl":"lg"===a.size,"text-2xl":"md"===a.size,"text-base":"sm"===a.size,"text-xs text-gray-600":"xs"===a.size,"text-gray-900":"xs"!==a.size,uppercase:"xs"===a.size&&a.uppercase},"flex font-semibold items-center"])},[e.renderSlot(n.$slots,"prefix"),e.renderSlot(n.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(a.title),1)]),e.renderSlot(n.$slots,"suffix",{},()=>[e.createTextVNode(e.toDisplayString(a.suffix),1)])],2)):e.createCommentVNode("",!0),a.subTitle||n.$slots.subTitle&&!e.unref(l)(n.$slots.subTitle({}))?(e.openBlock(),e.createBlock(e.unref(r._sfc_main),{key:1,variant:"body-sm",shade:"lighter"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"subTitle",{},()=>[e.createTextVNode(e.toDisplayString(a.subTitle),1)])]),_:3})):e.createCommentVNode("",!0)])],2))}}),i=["innerHTML"],m=e.defineComponent({__name:"Comparator",props:{propertyName:{},comparator:{},value:{},values:{},hasFormatting:{type:Boolean,default:!0},i18n:{}},setup(t){const o=t,r=e.computed(()=>({propertyName:o.propertyName,comparator:o.comparator,value:o.value??"",values:o.values??[""]}));return(o,a)=>(e.openBlock(),e.createElementBlock("span",{class:"py-0.25 px-0.5",innerHTML:e.unref(s)(t.i18n)(r.value,{hasFormatting:t.hasFormatting})},null,8,i))}}),c=e.defineComponent({__name:"Comparators",props:{comparators:{},expressionComparators:{},i18n:{},display:{default:"block"},rootClass:{}},setup:t=>(o,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.comparators?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.comparators,({meter_property:o,comparator:r,value:a,values:n},s)=>{var l,p;return e.openBlock(),e.createElementBlock("span",{key:null==o?void 0:o.id,class:e.normalizeClass({block:"block"===t.display,inline:"inline"===t.display})},[e.createVNode(m,{"property-name":(null==o?void 0:o.name)??(null==(l=t.i18n)?void 0:l.unknown)??"Unknown",comparator:r,value:a,values:n},null,8,["property-name","comparator","value","values"]),s<t.comparators.length-1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(" ")+e.toDisplayString((null==(p=t.i18n)?void 0:p.and)??"and")+e.toDisplayString(" "),1)],64)):e.createCommentVNode("",!0)],2)}),128)):e.createCommentVNode("",!0),t.expressionComparators?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.expressionComparators.operands,(o,r)=>{var n,s;return e.openBlock(),e.createElementBlock("span",{key:r,class:e.normalizeClass(["bg-blue-400/25 rounded-sm px-2 mr-1",t.rootClass])},[o.meter_property?(e.openBlock(),e.createBlock(m,{key:0,"property-name":(null==(n=o.meter_property.meter_property)?void 0:n.name)??(null==(s=t.i18n)?void 0:s.unknown)??"Unknown",comparator:o.meter_property.comparator,value:o.meter_property.value,values:o.meter_property.values},null,8,["property-name","comparator","value","values"])):e.createCommentVNode("",!0),o.expression?(e.openBlock(),e.createBlock(c,{key:1,"expression-comparators":o.expression,display:t.display,i18n:t.i18n,"root-class":t.rootClass},null,8,["expression-comparators","display","i18n","root-class"])):e.createCommentVNode("",!0),r<t.expressionComparators.operands.length-1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(" ")+e.toDisplayString(e.unref(a.formatEnum)(t.expressionComparators.operator).toLocaleLowerCase())+e.toDisplayString(" "),1)],64)):e.createCommentVNode("",!0)],2)}),128)):e.createCommentVNode("",!0)],64))});exports._sfc_main=c,exports._sfc_main$1=u,exports.comparatorI18nDefaults=n,exports.getFormattedComparatorList=(e=n)=>(t,o)=>t.map(t=>s(e)(t,o)).join(" and "),exports.isVnodeEmpty=l,exports.useToggleList=t=>{const o=(null==t?void 0:t.initialToggledItems)??[],r=(null==t?void 0:t.closeOthers)??!1,a=e.ref(o??[]);return{toggledItems:a,toggle:e=>((e,t=!1)=>{const o=a.value.find(t=>t===e);a.value=t?e===o?[]:[e]:o?a.value.filter(t=>t!==e):[...a.value,e]})(e,r),getIsOpen:e=>a.value.includes(e),toggleAll:e=>{0!==e.length&&(a.value.length===e.length?a.value=[]:a.value=e)}}};
@@ -1,406 +0,0 @@
1
- import { ref, Comment, Text, Fragment, defineComponent, computed, openBlock, createElementBlock, normalizeClass, createBlock, unref, createCommentVNode, createElementVNode, renderSlot, createTextVNode, toDisplayString, withCtx, renderList, createVNode } from "vue";
2
- import { a as _sfc_main$3 } from "./Button.vue.es-6sBk5tBL.mjs";
3
- import { _ as _sfc_main$4 } from "./Avatar.vue.es-Ba8ZGfm4.mjs";
4
- import { _ as _sfc_main$5 } from "./component-dpA83LIN.mjs";
5
- import { f as formatEnum } from "./formatting.es-D5H_ySFv.mjs";
6
- const useToggleList = (params) => {
7
- const initialToggledItems = (params == null ? void 0 : params.initialToggledItems) ?? [];
8
- const closeOthers = (params == null ? void 0 : params.closeOthers) ?? false;
9
- const toggledItems = ref(initialToggledItems ?? []);
10
- const _toggle = (index, closeOthers2 = false) => {
11
- const match = toggledItems.value.find((groupIndex) => groupIndex === index);
12
- if (closeOthers2) {
13
- toggledItems.value = index === match ? [] : [index];
14
- } else if (match) {
15
- toggledItems.value = toggledItems.value.filter((groupIndex) => groupIndex !== index);
16
- } else {
17
- toggledItems.value = [...toggledItems.value, index];
18
- }
19
- };
20
- const toggle = (index) => _toggle(index, closeOthers);
21
- const toggleAll = (allItems) => {
22
- if (allItems.length === 0) {
23
- return;
24
- }
25
- if (toggledItems.value.length === allItems.length) {
26
- toggledItems.value = [];
27
- } else {
28
- toggledItems.value = allItems;
29
- }
30
- };
31
- const getIsOpen = (index) => toggledItems.value.includes(index);
32
- return { toggledItems, toggle, getIsOpen, toggleAll };
33
- };
34
- const comparatorI18nDefaults = {
35
- equals: "equals",
36
- notEquals: "does not equal",
37
- in: "equals one of",
38
- inOutput: "equals",
39
- notIn: "does not equal one of",
40
- notInOutput: "does not equal",
41
- greaterThan: "greater than",
42
- greaterThanOrEquals: "greater than or equal to",
43
- lessThan: "less than",
44
- lessThanOrEquals: "less than or equal to",
45
- empty: "is empty",
46
- notEmpty: "is not empty",
47
- contains: "contains",
48
- notContains: "does not contain",
49
- or: "or",
50
- unsupported: "unsupported",
51
- unknown: "Unknown"
52
- };
53
- const getComparatorMap = (i18n = comparatorI18nDefaults) => [
54
- {
55
- comparator: "CONTAINS",
56
- forType: ["STRING"],
57
- requiresInput: true,
58
- symbol: "CONTAINS",
59
- label: {
60
- input: i18n.contains,
61
- output: i18n.contains
62
- }
63
- },
64
- {
65
- comparator: "NOT_CONTAINS",
66
- forType: ["STRING"],
67
- requiresInput: true,
68
- symbol: "NOT CONTAINS",
69
- label: {
70
- input: i18n.notContains,
71
- output: i18n.notContains
72
- }
73
- },
74
- {
75
- comparator: "EMPTY",
76
- forType: ["STRING"],
77
- requiresInput: false,
78
- symbol: "EMPTY",
79
- label: {
80
- input: i18n.empty,
81
- output: i18n.empty
82
- }
83
- },
84
- {
85
- comparator: "NOT_EMPTY",
86
- forType: ["STRING"],
87
- requiresInput: false,
88
- symbol: "NOT EMPTY",
89
- label: {
90
- input: i18n.notEmpty,
91
- output: i18n.notEmpty
92
- }
93
- },
94
- {
95
- comparator: "EQUALS",
96
- forType: ["NUMBER", "STRING", "ENUM"],
97
- requiresInput: true,
98
- symbol: "=",
99
- label: {
100
- input: i18n.equals,
101
- output: i18n.equals
102
- }
103
- },
104
- {
105
- comparator: "NOT_EQUALS",
106
- forType: ["NUMBER", "STRING", "ENUM"],
107
- requiresInput: true,
108
- symbol: "!=",
109
- label: {
110
- input: i18n.notEquals,
111
- output: i18n.notEquals
112
- }
113
- },
114
- {
115
- comparator: "IN",
116
- forType: ["NUMBER", "STRING", "ENUM"],
117
- requiresInput: true,
118
- symbol: "IN ()",
119
- label: {
120
- input: i18n.in,
121
- output: i18n.inOutput
122
- }
123
- },
124
- {
125
- comparator: "NOT_IN",
126
- forType: ["NUMBER", "STRING", "ENUM"],
127
- requiresInput: true,
128
- symbol: "NOT IN()",
129
- label: {
130
- input: i18n.notIn,
131
- output: i18n.notInOutput
132
- }
133
- },
134
- {
135
- comparator: "GREATER_THAN",
136
- forType: ["NUMBER"],
137
- requiresInput: true,
138
- symbol: ">",
139
- label: {
140
- input: i18n.greaterThan,
141
- output: i18n.greaterThan
142
- }
143
- },
144
- {
145
- comparator: "GREATER_THAN_OR_EQUALS",
146
- forType: ["NUMBER"],
147
- requiresInput: true,
148
- symbol: ">=",
149
- label: {
150
- input: i18n.greaterThanOrEquals,
151
- output: i18n.greaterThanOrEquals
152
- }
153
- },
154
- {
155
- comparator: "LESS_THAN",
156
- forType: ["NUMBER"],
157
- requiresInput: true,
158
- symbol: "<",
159
- label: {
160
- input: i18n.lessThan,
161
- output: i18n.lessThan
162
- }
163
- },
164
- {
165
- comparator: "LESS_THAN_OR_EQUALS",
166
- forType: ["NUMBER"],
167
- requiresInput: true,
168
- symbol: "<=",
169
- label: {
170
- input: i18n.lessThanOrEquals,
171
- output: i18n.lessThanOrEquals
172
- }
173
- }
174
- ];
175
- const getFormattedComparator = (i18n = comparatorI18nDefaults) => {
176
- return ({ propertyName, comparator, value, values }, { hasFormatting } = {}) => {
177
- const comparatorEntry = getComparatorMap(i18n).find(
178
- (item) => item.comparator === comparator
179
- );
180
- const formattedList = values == null ? void 0 : values.reduce((acc, item, index, array) => {
181
- const formattedItem = hasFormatting ? `<strong class="font-semibold">${item}</strong>` : item;
182
- if (index === array.length - 1) {
183
- return `${acc} ${(i18n == null ? void 0 : i18n.or) ?? "or"} ${formattedItem}`;
184
- }
185
- if (index === 0) {
186
- return formattedItem;
187
- }
188
- return [acc, formattedItem].join(", ");
189
- }, "");
190
- if (!comparatorEntry) {
191
- return (i18n == null ? void 0 : i18n.unsupported) ?? "Unsupported comparator";
192
- }
193
- if (["IN", "NOT_IN"].includes(comparatorEntry.comparator) && values) {
194
- return hasFormatting ? `<strong>${propertyName}</strong> ${comparatorEntry.label.output} <strong>${formattedList}</strong>` : `${propertyName} ${comparatorEntry.label.output} ${formattedList}`;
195
- }
196
- return hasFormatting ? `<strong class="font-semibold">${propertyName}</strong> ${comparatorEntry.label.output} <strong class="font-semibold">${value}</strong>` : `${propertyName} ${comparatorEntry.label.output} ${value}`;
197
- };
198
- };
199
- const getFormattedComparatorList = (i18n = comparatorI18nDefaults) => {
200
- return (comparators, options) => {
201
- return comparators.map((item) => getFormattedComparator(i18n)(item, options)).join(" and ");
202
- };
203
- };
204
- const isVnodeEmpty = (vnodes) => {
205
- return vnodes.every((node) => {
206
- if (node.type === Comment) {
207
- return true;
208
- }
209
- if (node.type === Text && typeof node.children === "string" && !node.children.trim()) {
210
- return true;
211
- }
212
- if (node.type === Fragment && isVnodeEmpty(node.children)) {
213
- return true;
214
- }
215
- return false;
216
- });
217
- };
218
- const _hoisted_1$1 = { class: "grow text-ellipsis overflow-hidden" };
219
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
220
- __name: "IconTitle",
221
- props: {
222
- title: {},
223
- subTitle: {},
224
- icon: {},
225
- variant: { default: "default" },
226
- suffix: {},
227
- size: { default: "md" },
228
- avatar: { type: Boolean, default: false },
229
- uppercase: { type: Boolean, default: true },
230
- resourceId: {}
231
- },
232
- setup(__props) {
233
- const props = __props;
234
- const gradientClasses = computed(() => {
235
- switch (props.variant) {
236
- case "transparent":
237
- return "";
238
- case "warning":
239
- return "bg-gradient-to-br backdrop-blur-sm from-orange-600/20 to-yellow-200/20";
240
- case "neutral":
241
- return "bg-neutral-100";
242
- default:
243
- case "default":
244
- return "bg-gradient-to-br backdrop-blur-sm from-peach-100/20 to-mint-100/20";
245
- }
246
- });
247
- return (_ctx, _cache) => {
248
- return openBlock(), createElementBlock("div", {
249
- class: normalizeClass(["flex items-center", {
250
- "gap-4": ["md", "lg"].includes(__props.size),
251
- "gap-3": __props.size === "sm",
252
- "gap-2": __props.size === "xs" && __props.variant !== "transparent",
253
- "gap-1": __props.size === "xs" && __props.variant === "transparent"
254
- }])
255
- }, [
256
- __props.icon ? (openBlock(), createElementBlock("div", {
257
- key: 0,
258
- class: normalizeClass([{
259
- [gradientClasses.value]: true,
260
- "w-9 h-9": ["md", "lg"].includes(__props.size),
261
- "w-8 h-8": __props.size === "sm",
262
- "w-6 h-6": __props.size === "xs"
263
- }, "rounded-md flex items-center justify-center shrink-0"])
264
- }, [
265
- __props.icon ? (openBlock(), createBlock(unref(_sfc_main$3), {
266
- key: 0,
267
- size: ["sm", "xs"].includes(__props.size) ? "xs" : "md",
268
- icon: __props.icon
269
- }, null, 8, ["size", "icon"])) : createCommentVNode("", true)
270
- ], 2)) : createCommentVNode("", true),
271
- __props.avatar && __props.title ? (openBlock(), createBlock(unref(_sfc_main$4), {
272
- key: 1,
273
- initials: __props.title.slice(0, 1),
274
- "color-hash": __props.title,
275
- size: ["sm", "xs"].includes(__props.size) ? "lg" : "xl"
276
- }, null, 8, ["initials", "color-hash", "size"])) : createCommentVNode("", true),
277
- createElementVNode("div", _hoisted_1$1, [
278
- __props.title || _ctx.$slots.default ? (openBlock(), createElementBlock("div", {
279
- key: 0,
280
- class: normalizeClass([{
281
- "text-3xl": __props.size === "lg",
282
- "text-2xl": __props.size === "md",
283
- "text-base": __props.size === "sm",
284
- "text-xs text-gray-600": __props.size === "xs",
285
- "text-gray-900": __props.size !== "xs",
286
- uppercase: __props.size === "xs" && __props.uppercase
287
- }, "flex font-semibold items-center"])
288
- }, [
289
- renderSlot(_ctx.$slots, "prefix"),
290
- renderSlot(_ctx.$slots, "default", {}, () => [
291
- createTextVNode(toDisplayString(__props.title), 1)
292
- ]),
293
- renderSlot(_ctx.$slots, "suffix", {}, () => [
294
- createTextVNode(toDisplayString(__props.suffix), 1)
295
- ])
296
- ], 2)) : createCommentVNode("", true),
297
- __props.subTitle || _ctx.$slots.subTitle && !unref(isVnodeEmpty)(_ctx.$slots.subTitle({})) ? (openBlock(), createBlock(unref(_sfc_main$5), {
298
- key: 1,
299
- variant: "body-sm",
300
- shade: "lighter"
301
- }, {
302
- default: withCtx(() => [
303
- renderSlot(_ctx.$slots, "subTitle", {}, () => [
304
- createTextVNode(toDisplayString(__props.subTitle), 1)
305
- ])
306
- ]),
307
- _: 3
308
- })) : createCommentVNode("", true)
309
- ])
310
- ], 2);
311
- };
312
- }
313
- });
314
- const _hoisted_1 = ["innerHTML"];
315
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
316
- __name: "Comparator",
317
- props: {
318
- propertyName: {},
319
- comparator: {},
320
- value: {},
321
- values: {},
322
- hasFormatting: { type: Boolean, default: true },
323
- i18n: {}
324
- },
325
- setup(__props) {
326
- const props = __props;
327
- const item = computed(() => ({
328
- propertyName: props.propertyName,
329
- comparator: props.comparator,
330
- value: props.value ?? "",
331
- values: props.values ?? [""]
332
- }));
333
- return (_ctx, _cache) => {
334
- return openBlock(), createElementBlock("span", {
335
- class: "py-0.25 px-0.5",
336
- innerHTML: unref(getFormattedComparator)(__props.i18n)(item.value, { hasFormatting: __props.hasFormatting })
337
- }, null, 8, _hoisted_1);
338
- };
339
- }
340
- });
341
- const _sfc_main = /* @__PURE__ */ defineComponent({
342
- __name: "Comparators",
343
- props: {
344
- comparators: {},
345
- expressionComparators: {},
346
- i18n: {},
347
- display: { default: "block" },
348
- rootClass: {}
349
- },
350
- setup(__props) {
351
- return (_ctx, _cache) => {
352
- return openBlock(), createElementBlock(Fragment, null, [
353
- __props.comparators ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(__props.comparators, ({ meter_property, comparator, value, values }, index) => {
354
- var _a, _b;
355
- return openBlock(), createElementBlock("span", {
356
- key: meter_property == null ? void 0 : meter_property.id,
357
- class: normalizeClass({ block: __props.display === "block", inline: __props.display === "inline" })
358
- }, [
359
- createVNode(_sfc_main$1, {
360
- "property-name": (meter_property == null ? void 0 : meter_property.name) ?? ((_a = __props.i18n) == null ? void 0 : _a.unknown) ?? "Unknown",
361
- comparator,
362
- value,
363
- values
364
- }, null, 8, ["property-name", "comparator", "value", "values"]),
365
- index < __props.comparators.length - 1 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
366
- createTextVNode(toDisplayString(" ") + toDisplayString(((_b = __props.i18n) == null ? void 0 : _b.and) ?? "and") + toDisplayString(" "), 1)
367
- ], 64)) : createCommentVNode("", true)
368
- ], 2);
369
- }), 128)) : createCommentVNode("", true),
370
- __props.expressionComparators ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(__props.expressionComparators.operands, (operand, index) => {
371
- var _a, _b;
372
- return openBlock(), createElementBlock("span", {
373
- key: index,
374
- class: normalizeClass(["bg-blue-400/25 rounded-sm px-2 mr-1", __props.rootClass])
375
- }, [
376
- operand.meter_property ? (openBlock(), createBlock(_sfc_main$1, {
377
- key: 0,
378
- "property-name": ((_a = operand.meter_property.meter_property) == null ? void 0 : _a.name) ?? ((_b = __props.i18n) == null ? void 0 : _b.unknown) ?? "Unknown",
379
- comparator: operand.meter_property.comparator,
380
- value: operand.meter_property.value,
381
- values: operand.meter_property.values
382
- }, null, 8, ["property-name", "comparator", "value", "values"])) : createCommentVNode("", true),
383
- operand.expression ? (openBlock(), createBlock(_sfc_main, {
384
- key: 1,
385
- "expression-comparators": operand.expression,
386
- display: __props.display,
387
- i18n: __props.i18n,
388
- "root-class": __props.rootClass
389
- }, null, 8, ["expression-comparators", "display", "i18n", "root-class"])) : createCommentVNode("", true),
390
- index < __props.expressionComparators.operands.length - 1 ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
391
- createTextVNode(toDisplayString(" ") + toDisplayString(unref(formatEnum)(__props.expressionComparators.operator).toLocaleLowerCase()) + toDisplayString(" "), 1)
392
- ], 64)) : createCommentVNode("", true)
393
- ], 2);
394
- }), 128)) : createCommentVNode("", true)
395
- ], 64);
396
- };
397
- }
398
- });
399
- export {
400
- _sfc_main as _,
401
- _sfc_main$2 as a,
402
- comparatorI18nDefaults as c,
403
- getFormattedComparatorList as g,
404
- isVnodeEmpty as i,
405
- useToggleList as u
406
- };
@@ -1 +0,0 @@
1
- const e=require("vue"),o=require("./component-ZRZIt3ZW.js");const t={class:"grid w-full grid-cols-1 gap-4"},r={key:0},s={class:"flex flex-col items-start gap-6 md:flex-row"},l={class:"grid w-full grow grid-cols-1 gap-4 md:w-auto"},n={class:"grid w-full grid-cols-1 gap-4 md:w-80 md:shrink-0"};const c=((e,o)=>{const t=e.__vccOpts||e;for(const[r,s]of o)t[r]=s;return t})({},[["render",function(o,c){return e.openBlock(),e.createElementBlock("div",t,[o.$slots.header?(e.openBlock(),e.createElementBlock("div",r,[e.renderSlot(o.$slots,"header")])):e.createCommentVNode("",!0),e.createElementVNode("div",s,[e.createElementVNode("div",l,[e.renderSlot(o.$slots,"content")]),e.createElementVNode("aside",n,[e.renderSlot(o.$slots,"aside")])])])}]]);exports.ContentWithAsideLayout=c,exports.usePortal=function(){const t=e.inject(o.PORTAL_INJECTION_KEY);if(!t)throw new Error("PortalProvider is not provided");return t};
@@ -1 +0,0 @@
1
- const e=require("vue"),t=require("./component-ZRZIt3ZW.js"),i=require("./Section.vue.es-BuzTXRLP.js"),n=require("./getCountryNameByCode.es-fP52nO_7.js"),o=require("./customer.es-D42Md24r.js"),a=require("./typeGuards.es-C4nR5FkL.js"),r=["US","CA"];function l(e){if(r.includes(e.country)){const t=s([e.line1,e.line2],", "),i=s([e.state,e.postal_code]," "),o=n.getCountryNameByCode(e.country);return s([t,e.city,i,o],", ")}const t=s([e.line1,e.line2]," "),i=s([e.postal_code,e.city]," "),o=n.getCountryNameByCode(e.country);return s([t,i,e.state,o],", ")}function s(e,t){return e.filter(Boolean).join(t)}const c={key:0,class:"flex flex-col gap-2"},d={key:0},u={key:1},m={key:2},f={key:3},_={key:1},g=e.defineComponent({__name:"CustomerBillingInformation",props:{customer:{},title:{},fallbackToReference:{type:Boolean,default:!0}},setup(n){const{$t:r}=t.useIntl(),s=n,g=e.computed(()=>{if(!s.customer)return;const e=o.getCustomerName(s.customer);return s.fallbackToReference&&""===e?s.customer.reference:s.fallbackToReference||""!==e?e:void 0}),p=e.computed(()=>s.title||r({defaultMessage:"Billing information",description:"Title for the billing information",id:"customer_billing_information.title"})),b=e.computed(()=>{if(s.customer)return"individual"in s.customer?s.customer.individual.residential_address:"organization"in s.customer?s.customer.organization.registered_address:void 0});return(o,s)=>(e.openBlock(),e.createBlock(i._sfc_main,{title:p.value},{right:e.withCtx(()=>[e.renderSlot(o.$slots,"settings")]),default:e.withCtx(()=>{var i;return[n.customer?(e.openBlock(),e.createElementBlock("div",c,[g.value?(e.openBlock(),e.createElementBlock("div",d,[e.createVNode(t._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Name",description:"The label for the customer name in the billing information",id:"customer_billing_information.name_label"})),1)]),_:1}),e.createVNode(t._sfc_main,{variant:"body-xs"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.value),1)]),_:1})])):e.createCommentVNode("",!0),(null==(i=b.value)?void 0:i.line1)?(e.openBlock(),e.createElementBlock("div",u,[e.createVNode(t._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Billing address",description:"The label for the customer billing address in the billing information",id:"customer_billing_information.billing_address_label"})),1)]),_:1}),e.createVNode(t._sfc_main,{variant:"body-xs"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)(b.value)),1)]),_:1})])):e.createCommentVNode("",!0),n.customer.email?(e.openBlock(),e.createElementBlock("div",m,[e.createVNode(t._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Email address",description:"The label for the customer email address in the billing information",id:"customer_billing_information.email_address_label"})),1)]),_:1}),e.createVNode(t._sfc_main,{variant:"body-xs"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.customer.email),1)]),_:1})])):e.createCommentVNode("",!0),e.unref(a.isOrganization)(n.customer)?(e.openBlock(),e.createElementBlock("div",f,[e.createVNode(t._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"VAT number",description:"The label for the customer Vat number in the billing information",id:"customer_billing_information.vat_number_label"})),1)]),_:1}),e.createVNode(t._sfc_main,{variant:"body-xs"},{default:e.withCtx(()=>{var t,i;return[e.createTextVNode(e.toDisplayString(null==(i=null==(t=n.customer.organization.tax_ids)?void 0:t[0])?void 0:i.id),1)]}),_:1})])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",_,[e.createVNode(t._sfc_main,{variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"No billing information to display.",description:"Text that is being displayed when there is no active subscription in the subscriptions block",id:"customer_overview.billing_information.no_billing_information_available"})),1)]),_:1})]))]}),_:3},8,["title"]))}});exports._sfc_main=g;
@@ -1,175 +0,0 @@
1
- import { defineComponent, computed, openBlock, createBlock, withCtx, createElementBlock, createVNode, createTextVNode, toDisplayString, unref, createCommentVNode, renderSlot } from "vue";
2
- import { a as useIntl, _ as _sfc_main$2 } from "./component-dpA83LIN.mjs";
3
- import { _ as _sfc_main$1 } from "./Section.vue.es-3-H1pUTB.mjs";
4
- import { g as getCountryNameByCode } from "./getCountryNameByCode.es-ymC9R46j.mjs";
5
- import { g as getCustomerName } from "./customer.es-LIW2YmLL.mjs";
6
- import { a as isOrganization } from "./typeGuards.es-fwUoeMCe.mjs";
7
- const COUNTRIES_WITH_STATE = ["US", "CA"];
8
- function formatAddress(address) {
9
- const hasState = COUNTRIES_WITH_STATE.includes(address.country);
10
- if (hasState) {
11
- const street2 = joinParts([address.line1, address.line2], ", ");
12
- const stateAndCode = joinParts([address.state, address.postal_code], " ");
13
- const country2 = getCountryNameByCode(address.country);
14
- return joinParts([street2, address.city, stateAndCode, country2], ", ");
15
- }
16
- const street = joinParts([address.line1, address.line2], " ");
17
- const codeAndCity = joinParts([address.postal_code, address.city], " ");
18
- const country = getCountryNameByCode(address.country);
19
- return joinParts([street, codeAndCity, address.state, country], ", ");
20
- }
21
- function joinParts(parts, separator) {
22
- return parts.filter(Boolean).join(separator);
23
- }
24
- const _hoisted_1 = {
25
- key: 0,
26
- class: "flex flex-col gap-2"
27
- };
28
- const _hoisted_2 = { key: 0 };
29
- const _hoisted_3 = { key: 1 };
30
- const _hoisted_4 = { key: 2 };
31
- const _hoisted_5 = { key: 3 };
32
- const _hoisted_6 = { key: 1 };
33
- const _sfc_main = /* @__PURE__ */ defineComponent({
34
- __name: "CustomerBillingInformation",
35
- props: {
36
- customer: {},
37
- title: {},
38
- fallbackToReference: { type: Boolean, default: true }
39
- },
40
- setup(__props) {
41
- const { $t } = useIntl();
42
- const props = __props;
43
- const customerName = computed(() => {
44
- if (!props.customer) return void 0;
45
- const name = getCustomerName(props.customer);
46
- if (props.fallbackToReference && name === "") {
47
- return props.customer.reference;
48
- }
49
- if (!props.fallbackToReference && name === "") {
50
- return void 0;
51
- }
52
- return name;
53
- });
54
- const titleWithFallback = computed(() => {
55
- return props.title || $t({
56
- defaultMessage: "Billing information",
57
- description: "Title for the billing information",
58
- id: "customer_billing_information.title"
59
- });
60
- });
61
- const address = computed(() => {
62
- if (!props.customer) return void 0;
63
- if ("individual" in props.customer) return props.customer.individual.residential_address;
64
- if ("organization" in props.customer) return props.customer.organization.registered_address;
65
- return void 0;
66
- });
67
- return (_ctx, _cache) => {
68
- return openBlock(), createBlock(_sfc_main$1, { title: titleWithFallback.value }, {
69
- right: withCtx(() => [
70
- renderSlot(_ctx.$slots, "settings")
71
- ]),
72
- default: withCtx(() => {
73
- var _a;
74
- return [
75
- __props.customer ? (openBlock(), createElementBlock("div", _hoisted_1, [
76
- customerName.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
77
- createVNode(_sfc_main$2, { variant: "caps-heading" }, {
78
- default: withCtx(() => [
79
- createTextVNode(toDisplayString(unref($t)({
80
- defaultMessage: "Name",
81
- description: "The label for the customer name in the billing information",
82
- id: "customer_billing_information.name_label"
83
- })), 1)
84
- ]),
85
- _: 1
86
- }),
87
- createVNode(_sfc_main$2, { variant: "body-xs" }, {
88
- default: withCtx(() => [
89
- createTextVNode(toDisplayString(customerName.value), 1)
90
- ]),
91
- _: 1
92
- })
93
- ])) : createCommentVNode("", true),
94
- ((_a = address.value) == null ? void 0 : _a.line1) ? (openBlock(), createElementBlock("div", _hoisted_3, [
95
- createVNode(_sfc_main$2, { variant: "caps-heading" }, {
96
- default: withCtx(() => [
97
- createTextVNode(toDisplayString(unref($t)({
98
- defaultMessage: "Billing address",
99
- description: "The label for the customer billing address in the billing information",
100
- id: "customer_billing_information.billing_address_label"
101
- })), 1)
102
- ]),
103
- _: 1
104
- }),
105
- createVNode(_sfc_main$2, { variant: "body-xs" }, {
106
- default: withCtx(() => [
107
- createTextVNode(toDisplayString(unref(formatAddress)(address.value)), 1)
108
- ]),
109
- _: 1
110
- })
111
- ])) : createCommentVNode("", true),
112
- __props.customer.email ? (openBlock(), createElementBlock("div", _hoisted_4, [
113
- createVNode(_sfc_main$2, { variant: "caps-heading" }, {
114
- default: withCtx(() => [
115
- createTextVNode(toDisplayString(unref($t)({
116
- defaultMessage: "Email address",
117
- description: "The label for the customer email address in the billing information",
118
- id: "customer_billing_information.email_address_label"
119
- })), 1)
120
- ]),
121
- _: 1
122
- }),
123
- createVNode(_sfc_main$2, { variant: "body-xs" }, {
124
- default: withCtx(() => [
125
- createTextVNode(toDisplayString(__props.customer.email), 1)
126
- ]),
127
- _: 1
128
- })
129
- ])) : createCommentVNode("", true),
130
- unref(isOrganization)(__props.customer) ? (openBlock(), createElementBlock("div", _hoisted_5, [
131
- createVNode(_sfc_main$2, { variant: "caps-heading" }, {
132
- default: withCtx(() => [
133
- createTextVNode(toDisplayString(unref($t)({
134
- defaultMessage: "VAT number",
135
- description: "The label for the customer Vat number in the billing information",
136
- id: "customer_billing_information.vat_number_label"
137
- })), 1)
138
- ]),
139
- _: 1
140
- }),
141
- createVNode(_sfc_main$2, { variant: "body-xs" }, {
142
- default: withCtx(() => {
143
- var _a2, _b;
144
- return [
145
- createTextVNode(toDisplayString((_b = (_a2 = __props.customer.organization.tax_ids) == null ? void 0 : _a2[0]) == null ? void 0 : _b.id), 1)
146
- ];
147
- }),
148
- _: 1
149
- })
150
- ])) : createCommentVNode("", true)
151
- ])) : (openBlock(), createElementBlock("div", _hoisted_6, [
152
- createVNode(_sfc_main$2, {
153
- variant: "body-xs",
154
- shade: "lighter"
155
- }, {
156
- default: withCtx(() => [
157
- createTextVNode(toDisplayString(unref($t)({
158
- defaultMessage: "No billing information to display.",
159
- description: "Text that is being displayed when there is no active subscription in the subscriptions block",
160
- id: "customer_overview.billing_information.no_billing_information_available"
161
- })), 1)
162
- ]),
163
- _: 1
164
- })
165
- ]))
166
- ];
167
- }),
168
- _: 3
169
- }, 8, ["title"]);
170
- };
171
- }
172
- });
173
- export {
174
- _sfc_main as _
175
- };
@@ -1 +0,0 @@
1
- const e=require("vue"),t=require("./Section.vue.es-BuzTXRLP.js"),o=require("./PaymentMethod.vue.es-DYlnmZh7.js"),n=require("./Button.vue.es-BC4_TItq.js"),a=require("./component-ZRZIt3ZW.js"),i=require("./Skeleton.vue_vue_type_script_setup_true_lang-D1Xzfc70.js"),s=require("./useActionDispatchProvider-CWVV_xsi.js"),d={key:0,class:"flex flex-col gap-2"},r=e.defineComponent({__name:"CustomerPaymentMethodsBlock",props:{paymentMethods:{type:Array},limit:{default:2,type:Number},isLoading:{type:Boolean},showViewAllButton:{type:Boolean},showAddButton:{type:Boolean}},emits:["view-all-payment-methods","add-payment-method"],setup(i){const s=i,{$t:r}=a.useIntl(),l=e.computed(()=>s.paymentMethods.length>0);return(s,m)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{"no-spacing":"","no-border":"",title:e.unref(r)({defaultMessage:"{count, plural, one {Payment method} other {Payment methods}}",description:"Title for the payment methods block on the customer overview page",id:"customer_overview.payment_methods.title"},{count:String(i.paymentMethods.length)})},e.createSlots({default:e.withCtx(()=>[l.value?(e.openBlock(),e.createElementBlock("div",d,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.paymentMethods,n=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:n.id},{default:e.withCtx(()=>[e.createVNode(e.unref(o._sfc_main),{"payment-method":n},null,8,["payment-method"])]),_:2},1024))),128))])):(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(a._sfc_main),{variant:"body-sm",shade:"lighter","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Add a payment method for recurring invoice payments.",description:"Helper text for adding a payment method when no payment methods are configured",id:"customer_overview.payment_methods_block.add_payment_method_helper_text"})),1)]),_:1}),i.showAddButton?(e.openBlock(),e.createBlock(e.unref(n._sfc_main),{key:0,class:"mt-4 w-full",variant:"outline",color:"gray","icon-prefix":"add",type:"button",onClick:m[1]||(m[1]=e=>s.$emit("add-payment-method"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Add payment method",description:"Text for the add payment method button that is shown when no payment methods have been configured",id:"customer_overview.payment_methods_block.add_payment_method_button_label"})),1)]),_:1})):e.createCommentVNode("",!0)]),_:1}))]),_:2},[i.showViewAllButton?{name:"right",fn:e.withCtx(()=>[e.createVNode(e.unref(n._sfc_main),{size:"sm",variant:"ghost",color:"gray","icon-suffix":"arrow_right_alt",type:"button",onClick:m[0]||(m[0]=e=>s.$emit("view-all-payment-methods"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"View all",id:"customer_overview.payment_methods_block.view_all_payment_methods_link_label",description:"The link text that links to the overview page of the customer invoices"})),1)]),_:1})]),key:"0"}:void 0]),1032,["title"]))}}),l=e.defineComponent({__name:"CustomerPaymentMethods",props:{isLoading:{type:Boolean},paymentMethods:{type:Array},maxPaymentMethods:{type:Number},configuration:{default:()=>({showViewAllButton:!0,showAddButton:!0}),type:Object}},setup(t){const{dispatchAction:o}=s.useActionDispatchProvider();return(n,a)=>{var s,d;return t.isLoading?(e.openBlock(),e.createBlock(i._sfc_main,{key:0,variant:"section",class:"h-72","data-testid":"customer-payment-methods-skeleton"})):(e.openBlock(),e.createBlock(r,{key:1,"is-loading":t.isLoading,"payment-methods":t.paymentMethods,"show-view-all-button":null==(s=t.configuration)?void 0:s.showViewAllButton,"show-add-button":null==(d=t.configuration)?void 0:d.showAddButton,onViewAllPaymentMethods:a[0]||(a[0]=t=>e.unref(o)({action:"view-all-payment-methods"})),onAddPaymentMethod:a[1]||(a[1]=t=>e.unref(o)({action:"add-payment-method"}))},null,8,["is-loading","payment-methods","show-view-all-button","show-add-button"]))}}});exports._sfc_main=l;
@@ -1 +0,0 @@
1
- const s=require("vue"),e=s.defineComponent({__name:"Divider",props:{spacing:{default:"md"}},setup:e=>(n,a)=>(s.openBlock(),s.createElementBlock("hr",{class:s.normalizeClass({"my-1":"xxs"===e.spacing,"my-2":"xs"===e.spacing,"my-4":"sm"===e.spacing,"my-6":"md"===e.spacing,"my-8":"lg"===e.spacing,"my-10":"xl"===e.spacing})},null,2))});exports._sfc_main=e;
@@ -1,24 +0,0 @@
1
- import { defineComponent, openBlock, createElementBlock, normalizeClass } from "vue";
2
- const _sfc_main = /* @__PURE__ */ defineComponent({
3
- __name: "Divider",
4
- props: {
5
- spacing: { default: "md" }
6
- },
7
- setup(__props) {
8
- return (_ctx, _cache) => {
9
- return openBlock(), createElementBlock("hr", {
10
- class: normalizeClass({
11
- "my-1": __props.spacing === "xxs",
12
- "my-2": __props.spacing === "xs",
13
- "my-4": __props.spacing === "sm",
14
- "my-6": __props.spacing === "md",
15
- "my-8": __props.spacing === "lg",
16
- "my-10": __props.spacing === "xl"
17
- })
18
- }, null, 2);
19
- };
20
- }
21
- });
22
- export {
23
- _sfc_main as _
24
- };