@globalpayments/vega 2.69.0 → 2.70.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/{app-globals-2dfd2b65.js → app-globals-837be7a6.js} +6 -6
- package/dist/cjs/{code-block-39074880.js → code-block-bb4cbafa.js} +1 -1
- package/dist/cjs/{component-global-style-slimmer-d5216fa7.js → component-global-style-slimmer-adfa2e59.js} +1 -1
- package/dist/cjs/{component-value-history-controller-slimmer.abstract-ddedf543.js → component-value-history-controller-slimmer.abstract-cf7b4bda.js} +2 -2
- package/dist/cjs/{dark-mode-style-controller-27809ff8.js → dark-mode-style-controller-c21172aa.js} +1 -1
- package/dist/cjs/{design-token-bab85370.js → design-token-00fe8d2f.js} +1 -1
- package/dist/cjs/{dto-renderer-manager-b7969d6c.js → dto-renderer-manager-c917dade.js} +1 -1
- package/dist/cjs/{element-appender-slimmer-2b4eccdc.js → element-appender-slimmer-f8e89f37.js} +2 -2
- package/dist/cjs/{function-extension-7c4f55ab.js → function-extension-28a4d781.js} +6 -4
- package/dist/cjs/{image-annotation-action-7f0626c8.js → image-annotation-action-8843adbf.js} +3 -3
- package/dist/cjs/index.cjs.js +10 -10
- package/dist/cjs/{language-extension-9f771818.js → language-extension-99c6fb40.js} +2 -2
- package/dist/cjs/loader.cjs.js +7 -7
- package/dist/cjs/{public-rules-8b67eaba.js → public-rules-759c745b.js} +5 -5
- package/dist/cjs/{range-002671b6.js → range-0b597850.js} +1 -1
- package/dist/cjs/{responsive-format-facade-d673f4bd.js → responsive-format-facade-1d9c13a9.js} +4 -4
- package/dist/cjs/{rich-text-editor-required-rule-5392bd8a.js → rich-text-editor-required-rule-92d0640e.js} +1 -1
- package/dist/cjs/{style-formatter-72a8b6ac.js → style-formatter-1daa8371.js} +1 -1
- package/dist/cjs/vega-accordion.cjs.entry.js +7 -7
- package/dist/cjs/vega-app-footer.cjs.entry.js +2 -2
- package/dist/cjs/vega-app-header-button.cjs.entry.js +7 -7
- package/dist/cjs/vega-box.cjs.entry.js +8 -8
- package/dist/cjs/vega-brand-logo.cjs.entry.js +2 -2
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/vega-button-circle.cjs.entry.js +7 -7
- package/dist/cjs/vega-button.cjs.entry.js +7 -7
- package/dist/cjs/vega-calendar_4.cjs.entry.js +1 -1
- package/dist/cjs/vega-card.cjs.entry.js +7 -7
- package/dist/cjs/vega-carousel.cjs.entry.js +6 -6
- package/dist/cjs/vega-chip.cjs.entry.js +7 -7
- package/dist/cjs/vega-code-block.cjs.entry.js +6 -6
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +7 -7
- package/dist/cjs/vega-dialog_2.cjs.entry.js +8 -8
- package/dist/cjs/vega-divider.cjs.entry.js +7 -7
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +8 -8
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-flag-icon.cjs.entry.js +7 -7
- package/dist/cjs/vega-flex.cjs.entry.js +8 -8
- package/dist/cjs/vega-font.cjs.entry.js +7 -7
- package/dist/cjs/vega-grid.cjs.entry.js +7 -7
- package/dist/cjs/vega-icon.cjs.entry.js +7 -7
- package/dist/cjs/vega-image-uploader.cjs.entry.js +6 -6
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +5 -5
- package/dist/cjs/vega-input-select.cjs.entry.js +6 -6
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +8 -8
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +6 -6
- package/dist/cjs/{vega-nonce-manager-f927497f.js → vega-nonce-manager-df69d3ed.js} +2 -2
- package/dist/cjs/vega-pagination.cjs.entry.js +6 -6
- package/dist/cjs/vega-popover_2.cjs.entry.js +8 -8
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +5 -5
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +8 -8
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +6 -6
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +6 -6
- package/dist/cjs/vega-signature-capture.cjs.entry.js +7 -7
- package/dist/cjs/vega-table_11.cjs.entry.js +6 -6
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +7 -7
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +7 -7
- package/dist/cjs/vega.cjs.js +7 -7
- package/dist/collection/components/vega-button/vega-button.css +20 -12
- package/dist/collection/components/vega-rich-text-editor/extensions/base-extension-renderer.js +3 -1
- package/dist/collection/helpers/csp/test/vega-nonce-manager.test.js +11 -0
- package/dist/collection/helpers/csp/vega-nonce-manager.js +2 -2
- package/dist/esm/{app-globals-92d24d99.js → app-globals-fd4b7d97.js} +6 -6
- package/dist/esm/{code-block-e8839202.js → code-block-ecb4491b.js} +1 -1
- package/dist/esm/{component-global-style-slimmer-5d437fdf.js → component-global-style-slimmer-08046b38.js} +1 -1
- package/dist/esm/{component-value-history-controller-slimmer.abstract-c6f94113.js → component-value-history-controller-slimmer.abstract-5d618b88.js} +2 -2
- package/dist/esm/{dark-mode-style-controller-b7e85b6a.js → dark-mode-style-controller-de88a117.js} +1 -1
- package/dist/esm/{design-token-64e09c2a.js → design-token-2d77e8f5.js} +1 -1
- package/dist/esm/{dto-renderer-manager-7abc53bf.js → dto-renderer-manager-d862ae78.js} +1 -1
- package/dist/esm/{element-appender-slimmer-5c85b48f.js → element-appender-slimmer-6791c332.js} +2 -2
- package/dist/esm/{function-extension-7ce27a8e.js → function-extension-8d39db56.js} +6 -4
- package/dist/esm/{image-annotation-action-7957653a.js → image-annotation-action-d0af138c.js} +3 -3
- package/dist/esm/index.js +10 -10
- package/dist/esm/{language-extension-44413556.js → language-extension-8f51f5ff.js} +2 -2
- package/dist/esm/loader.js +7 -7
- package/dist/esm/{public-rules-e613dead.js → public-rules-d10e76f4.js} +5 -5
- package/dist/esm/{range-adf206fd.js → range-f7b9e2fb.js} +1 -1
- package/dist/esm/{responsive-format-facade-f88850c5.js → responsive-format-facade-267935ae.js} +4 -4
- package/dist/esm/{rich-text-editor-required-rule-43857573.js → rich-text-editor-required-rule-774b822b.js} +1 -1
- package/dist/esm/{style-formatter-7dd2c026.js → style-formatter-3f88c491.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +7 -7
- package/dist/esm/vega-app-footer.entry.js +2 -2
- package/dist/esm/vega-app-header-button.entry.js +7 -7
- package/dist/esm/vega-box.entry.js +8 -8
- package/dist/esm/vega-brand-logo.entry.js +2 -2
- package/dist/esm/vega-breadcrumb.entry.js +2 -2
- package/dist/esm/vega-button-circle.entry.js +7 -7
- package/dist/esm/vega-button.entry.js +7 -7
- package/dist/esm/vega-calendar_4.entry.js +1 -1
- package/dist/esm/vega-card.entry.js +7 -7
- package/dist/esm/vega-carousel.entry.js +6 -6
- package/dist/esm/vega-chip.entry.js +7 -7
- package/dist/esm/vega-code-block.entry.js +6 -6
- package/dist/esm/vega-date-picker_2.entry.js +7 -7
- package/dist/esm/vega-dialog_2.entry.js +8 -8
- package/dist/esm/vega-divider.entry.js +7 -7
- package/dist/esm/vega-dropdown_5.entry.js +8 -8
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-flag-icon.entry.js +7 -7
- package/dist/esm/vega-flex.entry.js +8 -8
- package/dist/esm/vega-font.entry.js +7 -7
- package/dist/esm/vega-grid.entry.js +7 -7
- package/dist/esm/vega-icon.entry.js +7 -7
- package/dist/esm/vega-image-uploader.entry.js +6 -6
- package/dist/esm/vega-input-phone-number.entry.js +5 -5
- package/dist/esm/vega-input-select.entry.js +6 -6
- package/dist/esm/vega-left-nav_5.entry.js +8 -8
- package/dist/esm/vega-loader-wrapper_2.entry.js +6 -6
- package/dist/esm/{vega-nonce-manager-87615d3c.js → vega-nonce-manager-497e5eb5.js} +2 -2
- package/dist/esm/vega-pagination.entry.js +6 -6
- package/dist/esm/vega-popover_2.entry.js +8 -8
- package/dist/esm/vega-rich-text-content.entry.js +5 -5
- package/dist/esm/vega-rich-text-editor_4.entry.js +8 -8
- package/dist/esm/vega-selection-chip_2.entry.js +6 -6
- package/dist/esm/vega-sidenav_3.entry.js +6 -6
- package/dist/esm/vega-signature-capture.entry.js +7 -7
- package/dist/esm/vega-table_11.entry.js +6 -6
- package/dist/esm/vega-time-picker_2.entry.js +7 -7
- package/dist/esm/vega-tooltip_2.entry.js +7 -7
- package/dist/esm/vega.js +7 -7
- package/dist/sri/vega-sri-manifest.json +198 -198
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/{p-8506e8c3.js → p-0cdb38d3.js} +1 -1
- package/dist/vega/{p-9a507d97.entry.js → p-0e5297b9.entry.js} +1 -1
- package/dist/vega/{p-f6d84ffc.entry.js → p-0feceaac.entry.js} +1 -1
- package/dist/vega/{p-e9c323a4.js → p-1372b984.js} +1 -1
- package/dist/vega/{p-bcdd3495.entry.js → p-1739a877.entry.js} +1 -1
- package/dist/vega/{p-dbcd70cc.entry.js → p-1a59703b.entry.js} +1 -1
- package/dist/vega/{p-2c8e5ecb.js → p-1bb0c934.js} +1 -1
- package/dist/vega/{p-0cefecb6.entry.js → p-1e92737c.entry.js} +1 -1
- package/dist/vega/{p-560d29f8.entry.js → p-257ff60b.entry.js} +1 -1
- package/dist/vega/{p-3ad87199.entry.js → p-25a3fad7.entry.js} +1 -1
- package/dist/vega/{p-1d5f57ec.entry.js → p-2622f0a8.entry.js} +1 -1
- package/dist/vega/{p-a5ec6ca4.entry.js → p-26c4f07c.entry.js} +1 -1
- package/dist/vega/{p-c73aeafc.entry.js → p-2ec7e020.entry.js} +1 -1
- package/dist/vega/{p-895560eb.js → p-2f09c6aa.js} +1 -1
- package/dist/vega/{p-001a56b3.entry.js → p-330c224f.entry.js} +1 -1
- package/dist/vega/{p-369810ae.js → p-33f3f306.js} +1 -1
- package/dist/vega/{p-2f04d2ac.js → p-35252108.js} +1 -1
- package/dist/vega/{p-85935dd4.entry.js → p-37020002.entry.js} +1 -1
- package/dist/vega/{p-7cd09051.entry.js → p-379f1b40.entry.js} +1 -1
- package/dist/vega/{p-dda5a984.js → p-38cb2b40.js} +1 -1
- package/dist/vega/{p-54ae02db.js → p-4866e390.js} +1 -1
- package/dist/vega/{p-79e6e12c.js → p-4a467973.js} +1 -1
- package/dist/vega/{p-d4893487.js → p-4e13a26f.js} +1 -1
- package/dist/vega/{p-04134522.entry.js → p-54e56f0d.entry.js} +1 -1
- package/dist/vega/{p-3d13b234.js → p-5d827fe5.js} +1 -1
- package/dist/vega/{p-304275ae.entry.js → p-5e708ad5.entry.js} +1 -1
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/{p-71e36fae.entry.js → p-65a9af84.entry.js} +1 -1
- package/dist/vega/{p-cdac385a.entry.js → p-67eb405d.entry.js} +1 -1
- package/dist/vega/{p-df58f29b.entry.js → p-69aec6af.entry.js} +1 -1
- package/dist/vega/{p-69335c91.entry.js → p-71ddccf2.entry.js} +1 -1
- package/dist/vega/{p-05d64537.entry.js → p-785d9ac3.entry.js} +1 -1
- package/dist/vega/{p-54776c23.entry.js → p-8ac2f43f.entry.js} +1 -1
- package/dist/vega/{p-a31e6ff6.entry.js → p-8c6b6ad7.entry.js} +1 -1
- package/dist/vega/{p-97e2b6c8.entry.js → p-8ff96b8c.entry.js} +2 -2
- package/dist/vega/{p-cebd6896.entry.js → p-9794fd88.entry.js} +1 -1
- package/dist/vega/{p-d6934517.entry.js → p-9e59345f.entry.js} +1 -1
- package/dist/vega/{p-6ce1e9d4.entry.js → p-9fd503e9.entry.js} +1 -1
- package/dist/vega/{p-997308b1.entry.js → p-a630ce73.entry.js} +1 -1
- package/dist/vega/{p-67db4cea.entry.js → p-b27fcac4.entry.js} +1 -1
- package/dist/vega/{p-a211ae63.js → p-b5ba0c11.js} +1 -1
- package/dist/vega/{p-0fe9cff6.js → p-b8b9ed2c.js} +1 -1
- package/dist/vega/{p-bb37a401.js → p-b9798158.js} +1 -1
- package/dist/vega/{p-ed111a57.entry.js → p-bcc396c2.entry.js} +1 -1
- package/dist/vega/{p-4fe4d946.entry.js → p-bfb86c3e.entry.js} +1 -1
- package/dist/vega/p-c224b44c.js +1 -0
- package/dist/vega/{p-54ddd06f.entry.js → p-c2f21426.entry.js} +1 -1
- package/dist/vega/{p-117be41b.js → p-c616c592.js} +1 -1
- package/dist/vega/{p-6078bbac.entry.js → p-c6ae78f2.entry.js} +1 -1
- package/dist/vega/{p-c4b9fbc8.entry.js → p-cbabb07a.entry.js} +1 -1
- package/dist/vega/{p-719354e7.entry.js → p-ea04a387.entry.js} +1 -1
- package/dist/vega/{p-4c192985.js → p-ef9cbad1.js} +1 -1
- package/dist/vega/{p-e2ab52cd.entry.js → p-f21b893b.entry.js} +1 -1
- package/dist/vega/{p-45dd1adf.entry.js → p-fb320b50.entry.js} +1 -1
- package/dist/vega/{p-fd43d473.entry.js → p-ff470366.entry.js} +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +2 -1
- package/dist/vega/p-d70e178a.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,f as e,r as s,H as o,g as i}from"./p-6b2342e0.js";import{s as r}from"./p-519a7d55.js";import{c as p,V as a,M as c,L as n,I as m}from"./p-6e1ab235.js";import{V as l,I as
|
|
1
|
+
import{h as t,f as e,r as s,H as o,g as i}from"./p-6b2342e0.js";import{s as r}from"./p-519a7d55.js";import{c as p,V as a,M as c,L as n,I as m}from"./p-6e1ab235.js";import{V as l,I as d}from"./p-d849e0f5.js";import{a as f,V as j}from"./p-8c9ea6f4.js";import{f as h}from"./p-1372b984.js";import{f as b}from"./p-a528714c.js";import{O as u}from"./p-331a62d5.js";import{C as v}from"./p-2d0d575f.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-b1faebe0.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-d884c644.js";import"./p-1bb0c934.js";import"./p-7d9cd9c8.js";import"./p-b75ee3ba.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-5f377954.js";import"./p-b8b9ed2c.js";import"./p-d9671d27.js";import"./p-ef9cbad1.js";import"./p-112455b1.js";import"./p-4866e390.js";import"./p-bccee21e.js";import"./p-447c7590.js";import"./p-4e13a26f.js";import"./p-0cdb38d3.js";import"./p-308aa2e3.js";import"./p-02841589.js";import"./p-bf19682d.js";import"./p-a7b5f497.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-5d676a94.js";import"./p-f69f84a7.js";import"./p-824a06ba.js";var g=function(t,e,s,o){var i,r=arguments.length,p=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,s):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(t,e,s,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(p=(r<3?i(p):r>3?i(e,s,p):i(e,s))||p);return r>3&&p&&Object.defineProperty(e,s,p),p};class y extends a{render(){const e=f.getIconKey(this.country),s=j.hasIcon(e),o=h(this.size,"widthAndHeight"),i=`calc(${o} * 4 / 3)`;return s?t("vega-icon",{icon:e,size:this.size,style:{"--vega-icon-width":i}}):t("vega-skeleton",{type:"image",corners:"rounded-2",height:o,width:i})}}g([p()],y.prototype,"size",void 0),g([p()],y.prototype,"country",void 0);var R=function(t,e,s,o){var i,r=arguments.length,p=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,s):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(t,e,s,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(p=(r<3?i(p):r>3?i(e,s,p):i(e,s))||p);return r>3&&p&&Object.defineProperty(e,s,p),p};class w extends a{constructor(){super(...arguments),this.isAcceptObserver=()=>!0,this.listenerCallback=()=>{e(this.host)}}componentWillLoad(){this.country&&(this.isFlagForCountryCodeLoaded(this.country)||this.registerObserver())}unRegisterObserver(){this.observer&&(v.unregister(b,this.observer),this.observer=null)}registerObserver(){this.observer=new u(this.isAcceptObserver.bind(this),this.listenerCallback.bind(this)),v.register(b,this.observer)}isFlagForCountryCodeLoaded(t){const e=f.getIconKey(t);return f.hasIcon(e)}}!async function(){try{const t=(await import("./p-3e258753.js")).CountryFlags;f.register(t),v.notify(b,{})}catch(t){n.error("Error loading flag module:",t)}}(),R([p()],w.prototype,"host",void 0),R([p()],w.prototype,"country",void 0),R([c("componentWillLoad")],w.prototype,"componentWillLoad",null),R([c("disconnectedCallback")],w.prototype,"unRegisterObserver",null);var O=function(t,e,s,o){var i,r=arguments.length,p=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,s):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(t,e,s,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(p=(r<3?i(p):r>3?i(e,s,p):i(e,s))||p);return r>3&&p&&Object.defineProperty(e,s,p),p};const C=class{constructor(t){s(this,t),this.globalSlimmers={},this.renderer=new y,this.vegaFlagIconController=new w,this.vegaComponentUsageRuntimeMetricsSlimmer=new l,this.size="size-16"}render(){return r(t(o,null,this.renderer.render()),this.host)}get host(){return i(this)}};O([d()],C.prototype,"globalSlimmers",void 0),O([m()],C.prototype,"renderer",void 0),O([m()],C.prototype,"vegaFlagIconController",void 0),O([m()],C.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),C.style=":host{display:inline-block}:host vega-icon,:host vega-skeleton,:host svg{display:block;border-radius:2px}:host vega-icon{width:var(--vega-icon-width, 24px)}";export{C as vega_flag_icon}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,H as e,g as a}from"./p-6b2342e0.js";import{S as r}from"./p-1fb56e14.js";import{c as o}from"./p-86194314.js";import{s as n}from"./p-519a7d55.js";import{r as c,e as h}from"./p-272440e8.js";import{R as p}from"./p-2c8e5ecb.js";import{I as d}from"./p-6e1ab235.js";import{V as l,I as m}from"./p-d849e0f5.js";import{P as u}from"./p-7d9cd9c8.js";import{c as v}from"./p-de97c6d9.js";import{k as g}from"./p-447c7590.js";import{c as b}from"./p-8852361b.js";import{t as f}from"./p-b75ee3ba.js";import"./p-b1faebe0.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-d884c644.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-5f377954.js";import"./p-0fe9cff6.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-d9671d27.js";import"./p-4c192985.js";import"./p-a528714c.js";import"./p-2d0d575f.js";import"./p-331a62d5.js";import"./p-112455b1.js";import"./p-54ae02db.js";import"./p-bccee21e.js";import"./p-d4893487.js";import"./p-8506e8c3.js";import"./p-308aa2e3.js";import"./p-02841589.js";import"./p-bf19682d.js";import"./p-8c9ea6f4.js";import"./p-a7b5f497.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-5d676a94.js";import"./p-f69f84a7.js";var j;!function(t){t.RIGHT="TOUCH_DIR_RIGHT",t.LEFT="TOUCH_DIR_LEFT",t.UP="TOUCH_DIR_UP",t.DOWN="TOUCH_DIR_DOWN"}(j||(j={}));class y{constructor(t){this.touchStart=this.onTouchStart.bind(this),this.touchMove=this.onTouchMove.bind(this),this.touchEnd=this.onTouchEnd.bind(this),this.touchableParams=t,this.attachListeners()}static init(t){return new y(t)}static getTouchDirectionAndDistance(t,s,i,e){const a=i-t,r=e-s;return Math.abs(a)>Math.abs(r)?{direction:a>0?j.RIGHT:j.LEFT,distance:Math.abs(a)}:{direction:r>0?j.UP:j.DOWN,distance:Math.abs(r)}}static getTouchEventCoordinates(t){return{x:t.changedTouches[0].screenX,y:t.changedTouches[0].screenY}}destroy(){this.touchableParams.touchable.removeEventListener("touchstart",this.touchStart),this.touchableParams.touchable.removeEventListener("touchmove",this.touchMove),this.touchableParams.touchable.removeEventListener("touchend",this.touchEnd)}attachListeners(){this.touchableParams.touchable.addEventListener("touchstart",this.touchStart),this.touchableParams.touchable.addEventListener("touchmove",this.touchMove),this.touchableParams.touchable.addEventListener("touchend",this.touchEnd)}onTouchStart(t){var s,i;this.touchStartState=y.getTouchEventCoordinates(t),null===(i=(s=this.touchableParams).onTouchStart)||void 0===i||i.call(s,this.touchStartState.x,this.touchStartState.y)}onTouchMove(t){var s,i;const{x:e,y:a}=y.getTouchEventCoordinates(t),{direction:r,distance:o}=y.getTouchDirectionAndDistance(this.touchStartState.x,this.touchStartState.y,e,a);null===(i=(s=this.touchableParams).onTouchMove)||void 0===i||i.call(s,r,o)}onTouchEnd(t){var s,i;const{x:e,y:a}=y.getTouchEventCoordinates(t),{direction:r}=y.getTouchDirectionAndDistance(this.touchStartState.x,this.touchStartState.y,e,a);null===(i=(s=this.touchableParams).onTouchEnd)||void 0===i||i.call(s,r),this.resetStartState()}resetStartState(){this.touchStartState={x:0,y:0}}}const P=[{payloadKey:"PER_PAGE_IS_ONE",payloadDescription:"@deprecated Specifies the number of elements displayed per page in the carousel.",payloadValue:t=>1===t.perPage},{payloadKey:"PER_PAGE_IS_NOT_ONE",payloadDescription:"@deprecated Specifies the number of elements displayed per page in the carousel.",payloadValue:t=>1!==t.perPage}];var w=function(t,s,i,e){var a,r=arguments.length,o=r<3?s:null===e?e=Object.getOwnPropertyDescriptor(s,i):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,s,i,e);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(o=(r<3?a(o):r>3?a(s,i,o):a(s,i))||o);return r>3&&o&&Object.defineProperty(s,i,o),o};const x=class{constructor(i){t(this,i),this.vegaPageUpdate=s(this,"vegaPageUpdate",7),this.pageUpdate=s(this,"pageUpdate",7),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new l(P),this.pageResizeObserverSlimmer=new u({callback:()=>{this.getCarouselItemsPerPage()!==this.currentItemsPerPage&&this.updatePageLayout()}}),this.pageUpdateEventEmitter=v(x,g),this.deprecatedPropertySlimmer=b(x,"itemsPerPage","perPage",1),this.carouselContentElements=[],this.slideTaskQueue=new r,this.currentItemsPerPage=1,this.page=1,this.perPage=1,this.itemsPerPage=1,this.showSlider=!0,this.spacing="size-16",this.canSwipe=!0,this.onClickIndicators=async t=>{const s=Number(t.currentTarget.dataset.page);await this.goToPage(s)},this.getTotalPage=()=>Math.ceil(this.carouselContentElements.length/this.currentItemsPerPage),this.updatePageLayout=()=>{this.currentItemsPerPage=this.getCarouselItemsPerPage(),this.totalPages=this.getTotalPage(),this.page=1,this.wrapChildContentAsCarouselItem()},this.initMutationObserver=()=>{this.mutationObserver=new MutationObserver((async()=>{await this.updateContentByObserverSlotChange()})),this.mutationObserver.observe(this.host,{childList:!0})},this.initTouchEvent=()=>{this.touchListener=y.init({touchable:this.listContainer,onTouchEnd:async t=>{const s=this.page+(t===j.RIGHT?-1:t===j.LEFT?1:0);await this.goToPage(s)}})}}watchPage(){this.pageUpdateEventEmitter.emit(this.page)}watchPerPage(){this.updatePageLayout()}watchItemsPerPage(){this.updatePageLayout()}onSpacingPropsChange(){this.host.querySelectorAll("vega-grid").forEach((t=>{t.gap=this.spacing}))}disconnectedCallback(){this.mutationObserver&&this.mutationObserver.disconnect(),this.touchListener&&this.touchListener.destroy()}componentDidLoad(){this.carouselContentElements=Array.from(this.host.children),this.updatePageLayout(),this.initMutationObserver(),this.initTouchEvent()}async nextPage(){const t=this.page<this.totalPages?this.page+1:this.page;await this.goToPage(t)}async prevPage(){const t=this.page>1?this.page-1:this.page;await this.goToPage(t)}async goToPage(t){await this.goToPageInternal(t)}render(){return n(i(e,null,i("div",{class:{"carousel-inner":!0,"carousel-stop-swipe":!this.canSwipe},ref:t=>this.listContainer=t},i("slot",null)),this.renderIndicatorDom()),this.host)}async goToPageInternal(t,s=!0){t>=1&&t<=this.totalPages&&t!==this.page&&(this.page=t,await this.slideTaskQueue.enqueue({run:()=>this.doSlide(t,s)}))}renderIndicatorDom(){return this.showSlider&&i("div",{class:"vega-carousel-indicators-container"},new Array(this.totalPages).fill("").map(((t,s)=>i("div",{key:s,class:{"vega-carousel-indicator-active":s+1===this.page},"data-page":s+1,role:"button","aria-label":"No label defined",tabIndex:0,onKeyDown:o(),onClick:this.onClickIndicators}))))}async updateContentByObserverSlotChange(){const t=this.page,s=Array.from(this.host.children).filter((t=>!t.classList.contains("carousel-item"))),i=Array.from(this.host.querySelectorAll(".carousel-item vega-grid > div > *"));(i.length!==this.carouselContentElements.length||s.length>0)&&(this.carouselContentElements=i.concat(s),this.updatePageLayout()),await this.goToPageInternal(t,!1)}wrapChildContentAsCarouselItem(){const t=[],s=this.carouselContentElements;if(f()){for(let i=0;i<this.totalPages;i++){const e=f().createElement("vega-grid");e.setAttribute("gap",this.spacing),e.setAttribute("column",this.currentItemsPerPage.toString()),e.setAttribute("row","1");for(let t=i*this.currentItemsPerPage;t<s.length&&t<this.currentItemsPerPage*(i+1);t++){const i=f().createElement("div");i.appendChild(s[t]),e.appendChild(i)}const a=f().createElement("div");a.classList.add("carousel-item"),0===i&&a.classList.add("active"),a.appendChild(e),t.push(a)}this.host.replaceChildren(...t)}}doSlide(t,s){return new Promise(((i,e)=>{const a=this.host.querySelector(".active"),r=t-1>Array.from(this.host.children).indexOf(a),o=this.host.children[t-1],n=r?"carousel-item-start":"carousel-item-end",p=r?"carousel-item-next":"carousel-item-prev";a&&o?s?(o.classList.add(p),c(o),o.classList.add(n),a.classList.add(n),h((()=>{o.classList.remove(n,p),a.classList.remove("active",n),o.classList.add("active"),i()}),a,600)):(a.classList.remove("active"),c(o),o.classList.add("active"),i()):e("Cannot find active and target item in carousel list")}))}getCarouselItemsPerPage(){const t=p.formatCustom(this.deprecatedPropertySlimmer.getValue());return t?Math.max(1,Math.min(4,t,this.carouselContentElements.length)):1}get host(){return a(this)}static get watchers(){return{page:["watchPage"],perPage:["watchPerPage"],itemsPerPage:["watchItemsPerPage"],spacing:["onSpacingPropsChange"]}}};w([m()],x.prototype,"globalSlimmers",void 0),w([d()],x.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),w([d()],x.prototype,"pageResizeObserverSlimmer",void 0),w([d()],x.prototype,"pageUpdateEventEmitter",void 0),w([d()],x.prototype,"deprecatedPropertySlimmer",void 0),x.style=":host{display:block}:host .vega-carousel-indicators-container{display:flex;justify-content:center;align-items:center;margin-top:24px}:host .vega-carousel-indicators-container>div{border-radius:9999px;width:16px;height:16px;border-width:2px;border-style:solid;margin-right:24px;cursor:pointer;border:2px solid rgba(var(--v-border-secondary-btn, 19, 98, 226, 1))}:host .vega-carousel-indicators-container>div:focus{border:2px solid rgba(var(--v-border-secondary-btn-hover, 4, 112, 236, 1));background-color:rgba(var(--v-bg-quaternary, 241, 248, 251, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .vega-carousel-indicators-container>div:hover{border:2px solid rgba(var(--v-border-secondary-btn-hover, 4, 112, 236, 1));background-color:rgba(var(--v-bg-quaternary, 241, 248, 251, 1))}:host .vega-carousel-indicators-container>div.vega-carousel-indicator-active{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}:host .vega-carousel-indicators-container>div.vega-carousel-indicator-active:hover{border:2px solid rgba(var(--v-border-secondary-btn, 19, 98, 226, 1))}:host .vega-carousel-indicators-container>div:last-child{margin-right:0px}:host .carousel-inner{position:relative;width:100%;overflow:hidden}:host .carousel-inner.carousel-stop-swipe{pointer-events:none}:host ::slotted(.carousel-item){width:100%;position:relative;display:none;float:left;transition:transform 0.6s ease;margin-right:-100%}:host ::slotted(.carousel-item.active),:host ::slotted(.carousel-item-next),:host ::slotted(.carousel-item-prev){display:block}:host ::slotted(.carousel-item-next:not(.carousel-item-start)),:host ::slotted(.active.carousel-item-end){transform:translateX(100%)}:host ::slotted(.carousel-item-prev:not(.carousel-item-end)),:host ::slotted(.active.carousel-item-start){transform:translateX(-100%)}";export{x as vega_carousel}
|
|
1
|
+
import{r as t,c as s,h as i,H as e,g as a}from"./p-6b2342e0.js";import{S as r}from"./p-1fb56e14.js";import{c as o}from"./p-86194314.js";import{s as n}from"./p-519a7d55.js";import{r as h,e as c}from"./p-272440e8.js";import{R as p}from"./p-1bb0c934.js";import{I as d}from"./p-6e1ab235.js";import{V as l,I as m}from"./p-d849e0f5.js";import{P as u}from"./p-7d9cd9c8.js";import{c as v}from"./p-de97c6d9.js";import{k as g}from"./p-447c7590.js";import{c as b}from"./p-8852361b.js";import{t as f}from"./p-b75ee3ba.js";import"./p-b1faebe0.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-d884c644.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-5f377954.js";import"./p-b8b9ed2c.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-d9671d27.js";import"./p-ef9cbad1.js";import"./p-a528714c.js";import"./p-2d0d575f.js";import"./p-331a62d5.js";import"./p-112455b1.js";import"./p-4866e390.js";import"./p-bccee21e.js";import"./p-4e13a26f.js";import"./p-0cdb38d3.js";import"./p-308aa2e3.js";import"./p-02841589.js";import"./p-bf19682d.js";import"./p-8c9ea6f4.js";import"./p-a7b5f497.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-5d676a94.js";import"./p-f69f84a7.js";var j;!function(t){t.RIGHT="TOUCH_DIR_RIGHT",t.LEFT="TOUCH_DIR_LEFT",t.UP="TOUCH_DIR_UP",t.DOWN="TOUCH_DIR_DOWN"}(j||(j={}));class y{constructor(t){this.touchStart=this.onTouchStart.bind(this),this.touchMove=this.onTouchMove.bind(this),this.touchEnd=this.onTouchEnd.bind(this),this.touchableParams=t,this.attachListeners()}static init(t){return new y(t)}static getTouchDirectionAndDistance(t,s,i,e){const a=i-t,r=e-s;return Math.abs(a)>Math.abs(r)?{direction:a>0?j.RIGHT:j.LEFT,distance:Math.abs(a)}:{direction:r>0?j.UP:j.DOWN,distance:Math.abs(r)}}static getTouchEventCoordinates(t){return{x:t.changedTouches[0].screenX,y:t.changedTouches[0].screenY}}destroy(){this.touchableParams.touchable.removeEventListener("touchstart",this.touchStart),this.touchableParams.touchable.removeEventListener("touchmove",this.touchMove),this.touchableParams.touchable.removeEventListener("touchend",this.touchEnd)}attachListeners(){this.touchableParams.touchable.addEventListener("touchstart",this.touchStart),this.touchableParams.touchable.addEventListener("touchmove",this.touchMove),this.touchableParams.touchable.addEventListener("touchend",this.touchEnd)}onTouchStart(t){var s,i;this.touchStartState=y.getTouchEventCoordinates(t),null===(i=(s=this.touchableParams).onTouchStart)||void 0===i||i.call(s,this.touchStartState.x,this.touchStartState.y)}onTouchMove(t){var s,i;const{x:e,y:a}=y.getTouchEventCoordinates(t),{direction:r,distance:o}=y.getTouchDirectionAndDistance(this.touchStartState.x,this.touchStartState.y,e,a);null===(i=(s=this.touchableParams).onTouchMove)||void 0===i||i.call(s,r,o)}onTouchEnd(t){var s,i;const{x:e,y:a}=y.getTouchEventCoordinates(t),{direction:r}=y.getTouchDirectionAndDistance(this.touchStartState.x,this.touchStartState.y,e,a);null===(i=(s=this.touchableParams).onTouchEnd)||void 0===i||i.call(s,r),this.resetStartState()}resetStartState(){this.touchStartState={x:0,y:0}}}const P=[{payloadKey:"PER_PAGE_IS_ONE",payloadDescription:"@deprecated Specifies the number of elements displayed per page in the carousel.",payloadValue:t=>1===t.perPage},{payloadKey:"PER_PAGE_IS_NOT_ONE",payloadDescription:"@deprecated Specifies the number of elements displayed per page in the carousel.",payloadValue:t=>1!==t.perPage}];var w=function(t,s,i,e){var a,r=arguments.length,o=r<3?s:null===e?e=Object.getOwnPropertyDescriptor(s,i):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,s,i,e);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(o=(r<3?a(o):r>3?a(s,i,o):a(s,i))||o);return r>3&&o&&Object.defineProperty(s,i,o),o};const x=class{constructor(i){t(this,i),this.vegaPageUpdate=s(this,"vegaPageUpdate",7),this.pageUpdate=s(this,"pageUpdate",7),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new l(P),this.pageResizeObserverSlimmer=new u({callback:()=>{this.getCarouselItemsPerPage()!==this.currentItemsPerPage&&this.updatePageLayout()}}),this.pageUpdateEventEmitter=v(x,g),this.deprecatedPropertySlimmer=b(x,"itemsPerPage","perPage",1),this.carouselContentElements=[],this.slideTaskQueue=new r,this.currentItemsPerPage=1,this.page=1,this.perPage=1,this.itemsPerPage=1,this.showSlider=!0,this.spacing="size-16",this.canSwipe=!0,this.onClickIndicators=async t=>{const s=Number(t.currentTarget.dataset.page);await this.goToPage(s)},this.getTotalPage=()=>Math.ceil(this.carouselContentElements.length/this.currentItemsPerPage),this.updatePageLayout=()=>{this.currentItemsPerPage=this.getCarouselItemsPerPage(),this.totalPages=this.getTotalPage(),this.page=1,this.wrapChildContentAsCarouselItem()},this.initMutationObserver=()=>{this.mutationObserver=new MutationObserver((async()=>{await this.updateContentByObserverSlotChange()})),this.mutationObserver.observe(this.host,{childList:!0})},this.initTouchEvent=()=>{this.touchListener=y.init({touchable:this.listContainer,onTouchEnd:async t=>{const s=this.page+(t===j.RIGHT?-1:t===j.LEFT?1:0);await this.goToPage(s)}})}}watchPage(){this.pageUpdateEventEmitter.emit(this.page)}watchPerPage(){this.updatePageLayout()}watchItemsPerPage(){this.updatePageLayout()}onSpacingPropsChange(){this.host.querySelectorAll("vega-grid").forEach((t=>{t.gap=this.spacing}))}disconnectedCallback(){this.mutationObserver&&this.mutationObserver.disconnect(),this.touchListener&&this.touchListener.destroy()}componentDidLoad(){this.carouselContentElements=Array.from(this.host.children),this.updatePageLayout(),this.initMutationObserver(),this.initTouchEvent()}async nextPage(){const t=this.page<this.totalPages?this.page+1:this.page;await this.goToPage(t)}async prevPage(){const t=this.page>1?this.page-1:this.page;await this.goToPage(t)}async goToPage(t){await this.goToPageInternal(t)}render(){return n(i(e,null,i("div",{class:{"carousel-inner":!0,"carousel-stop-swipe":!this.canSwipe},ref:t=>this.listContainer=t},i("slot",null)),this.renderIndicatorDom()),this.host)}async goToPageInternal(t,s=!0){t>=1&&t<=this.totalPages&&t!==this.page&&(this.page=t,await this.slideTaskQueue.enqueue({run:()=>this.doSlide(t,s)}))}renderIndicatorDom(){return this.showSlider&&i("div",{class:"vega-carousel-indicators-container"},new Array(this.totalPages).fill("").map(((t,s)=>i("div",{key:s,class:{"vega-carousel-indicator-active":s+1===this.page},"data-page":s+1,role:"button","aria-label":"No label defined",tabIndex:0,onKeyDown:o(),onClick:this.onClickIndicators}))))}async updateContentByObserverSlotChange(){const t=this.page,s=Array.from(this.host.children).filter((t=>!t.classList.contains("carousel-item"))),i=Array.from(this.host.querySelectorAll(".carousel-item vega-grid > div > *"));(i.length!==this.carouselContentElements.length||s.length>0)&&(this.carouselContentElements=i.concat(s),this.updatePageLayout()),await this.goToPageInternal(t,!1)}wrapChildContentAsCarouselItem(){const t=[],s=this.carouselContentElements;if(f()){for(let i=0;i<this.totalPages;i++){const e=f().createElement("vega-grid");e.setAttribute("gap",this.spacing),e.setAttribute("column",this.currentItemsPerPage.toString()),e.setAttribute("row","1");for(let t=i*this.currentItemsPerPage;t<s.length&&t<this.currentItemsPerPage*(i+1);t++){const i=f().createElement("div");i.appendChild(s[t]),e.appendChild(i)}const a=f().createElement("div");a.classList.add("carousel-item"),0===i&&a.classList.add("active"),a.appendChild(e),t.push(a)}this.host.replaceChildren(...t)}}doSlide(t,s){return new Promise(((i,e)=>{const a=this.host.querySelector(".active"),r=t-1>Array.from(this.host.children).indexOf(a),o=this.host.children[t-1],n=r?"carousel-item-start":"carousel-item-end",p=r?"carousel-item-next":"carousel-item-prev";a&&o?s?(o.classList.add(p),h(o),o.classList.add(n),a.classList.add(n),c((()=>{o.classList.remove(n,p),a.classList.remove("active",n),o.classList.add("active"),i()}),a,600)):(a.classList.remove("active"),h(o),o.classList.add("active"),i()):e("Cannot find active and target item in carousel list")}))}getCarouselItemsPerPage(){const t=p.formatCustom(this.deprecatedPropertySlimmer.getValue());return t?Math.max(1,Math.min(4,t,this.carouselContentElements.length)):1}get host(){return a(this)}static get watchers(){return{page:["watchPage"],perPage:["watchPerPage"],itemsPerPage:["watchItemsPerPage"],spacing:["onSpacingPropsChange"]}}};w([m()],x.prototype,"globalSlimmers",void 0),w([d()],x.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),w([d()],x.prototype,"pageResizeObserverSlimmer",void 0),w([d()],x.prototype,"pageUpdateEventEmitter",void 0),w([d()],x.prototype,"deprecatedPropertySlimmer",void 0),x.style=":host{display:block}:host .vega-carousel-indicators-container{display:flex;justify-content:center;align-items:center;margin-top:24px}:host .vega-carousel-indicators-container>div{border-radius:9999px;width:16px;height:16px;border-width:2px;border-style:solid;margin-right:24px;cursor:pointer;border:2px solid rgba(var(--v-border-secondary-btn, 19, 98, 226, 1))}:host .vega-carousel-indicators-container>div:focus{border:2px solid rgba(var(--v-border-secondary-btn-hover, 4, 112, 236, 1));background-color:rgba(var(--v-bg-quaternary, 241, 248, 251, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .vega-carousel-indicators-container>div:hover{border:2px solid rgba(var(--v-border-secondary-btn-hover, 4, 112, 236, 1));background-color:rgba(var(--v-bg-quaternary, 241, 248, 251, 1))}:host .vega-carousel-indicators-container>div.vega-carousel-indicator-active{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}:host .vega-carousel-indicators-container>div.vega-carousel-indicator-active:hover{border:2px solid rgba(var(--v-border-secondary-btn, 19, 98, 226, 1))}:host .vega-carousel-indicators-container>div:last-child{margin-right:0px}:host .carousel-inner{position:relative;width:100%;overflow:hidden}:host .carousel-inner.carousel-stop-swipe{pointer-events:none}:host ::slotted(.carousel-item){width:100%;position:relative;display:none;float:left;transition:transform 0.6s ease;margin-right:-100%}:host ::slotted(.carousel-item.active),:host ::slotted(.carousel-item-next),:host ::slotted(.carousel-item-prev){display:block}:host ::slotted(.carousel-item-next:not(.carousel-item-start)),:host ::slotted(.active.carousel-item-end){transform:translateX(100%)}:host ::slotted(.carousel-item-prev:not(.carousel-item-end)),:host ::slotted(.active.carousel-item-start){transform:translateX(-100%)}";export{x as vega_carousel}
|